Skip to content

Dev comfyui v2 #250

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 351 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
351 commits
Select commit Hold shift + click to select a range
70dd8d9
Merge branch 'dev_comfyui_v2' of github.com:myshell-ai/ShellAgent int…
wl-zhao Oct 17, 2024
c256dfc
update
yuxumin Oct 17, 2024
c0cc24d
Merge branch 'dev_comfyui_v2' of github.com:myshell-ai/ShellAgent int…
yuxumin Oct 17, 2024
a611713
feat: 修改comfyui reload文案
myshell-joe Oct 18, 2024
b8abbe5
Merge branch '36-feat-app-builder-support-comfyui-widget' of github.c…
myshell-joe Oct 18, 2024
531ca22
trigger release
yuxumin Oct 18, 2024
b301ccc
Merge branch 'dev_comfyui_v2' of github.com:myshell-ai/ShellAgent int…
yuxumin Oct 18, 2024
3948a69
update
wl-zhao Oct 18, 2024
5ea2938
Merge branch 'dev_comfyui_v2' of github.com:myshell-ai/ShellAgent int…
wl-zhao Oct 18, 2024
df6a0ff
auto build
yuxumin Oct 18, 2024
152a952
Merge branch 'dev_comfyui_v2' of github.com:myshell-ai/ShellAgent int…
yuxumin Oct 18, 2024
32bab57
fix convert cdn bug
wl-zhao Oct 18, 2024
c4c7b0b
Merge branch 'dev_comfyui_v2' of github.com:myshell-ai/ShellAgent int…
wl-zhao Oct 18, 2024
3a8fc35
update
yuxumin Oct 18, 2024
e4f3a82
Merge branch 'dev_comfyui_v2' of github.com:myshell-ai/ShellAgent int…
yuxumin Oct 18, 2024
c38af74
Merge branch 'dev_comfyui_v2' of github.com:myshell-ai/ShellAgent int…
myshell-joe Oct 18, 2024
09dce97
update
yuxumin Oct 18, 2024
ac22af1
fix: 删掉manager所有入口
myshell-joe Oct 18, 2024
aa3fa4e
Merge branch 'dev_comfyui_v2' of github.com:myshell-ai/ShellAgent int…
myshell-joe Oct 18, 2024
faea68d
auto update in comfyui v2 (#76)
Cherwayway Oct 18, 2024
7e39482
Make settings envs obervable
shanexi Oct 21, 2024
c1c5569
fix: 修复custom nodes的表单输入问题&修改Additional Metadata表单文案
myshell-joe Oct 21, 2024
bd438fb
Merge branch 'main' of github.com:myshell-ai/ShellAgent into 36-feat-…
myshell-joe Oct 21, 2024
2b48622
Fix ComfyUIPlugin, add observer
shanexi Oct 21, 2024
7d4a250
Hide software update in web version
shanexi Oct 21, 2024
8324163
fix: 修复文案&修复无法连接到comfyui服务的问题
myshell-joe Oct 21, 2024
11dd481
Merge branches '36-feat-app-builder-support-comfyui-widget' and '36-f…
myshell-joe Oct 21, 2024
266d80a
fix: 修复文案&修复无法连接到comfyui服务的问题
myshell-joe Oct 21, 2024
6dd9ba0
Merge branch 'dev_comfyui_v2' of github.com:myshell-ai/ShellAgent int…
myshell-joe Oct 21, 2024
56d17a1
fix: 修复output默认值问题
myshell-joe Oct 21, 2024
c7ef1d2
Fix chat run button color on windows
shanexi Oct 21, 2024
eecb509
Merge branch '36-feat-app-builder-support-comfyui-widget' of github.c…
shanexi Oct 21, 2024
77ec878
Fix chat run button color on windows
shanexi Oct 21, 2024
a6e7e15
remove useless files
wl-zhao Oct 21, 2024
ce025b3
add error_reporting of comfyui_widget
wl-zhao Oct 21, 2024
29f7ce1
remove useless files
wl-zhao Oct 21, 2024
2616279
Merge branch 'dev_comfyui_v2' of github.com:myshell-ai/ShellAgent int…
myshell-joe Oct 21, 2024
4d0174c
Merge branch 'main' of github.com:myshell-ai/ShellAgent into 36-feat-…
myshell-joe Oct 21, 2024
ee94128
feat: lint
myshell-joe Oct 21, 2024
3a652e3
fix: 修复submit问题
myshell-joe Oct 21, 2024
0c671ca
feat: 下线Model Configuration字段&下线PerformanceMonitor
myshell-joe Oct 21, 2024
589d346
feat: 下线Model Configuration字段&下线PerformanceMonitor
myshell-joe Oct 21, 2024
8e41c5b
remove requirements.txt
wl-zhao Oct 21, 2024
c416d54
Merge branch 'dev_comfyui_v2' of github.com:myshell-ai/ShellAgent int…
wl-zhao Oct 21, 2024
7d4714d
Merge branch '36-feat-app-builder-support-comfyui-widget' of github.c…
myshell-joe Oct 21, 2024
5d3f91a
Merge branch 'main' of github.com:myshell-ai/ShellAgent into dev_comf…
myshell-joe Oct 21, 2024
331e1ec
add update dependency
wl-zhao Oct 21, 2024
d3426d6
add update dependency
wl-zhao Oct 21, 2024
6cd92ac
Merge branch 'dev_comfyui_v2' of github.com:myshell-ai/ShellAgent int…
wl-zhao Oct 21, 2024
4797a06
update output nodes & update save_path
wl-zhao Oct 22, 2024
70a455b
ignore hidden .DS_Store in MacOS
wl-zhao Oct 24, 2024
4f31234
add workflow to /prompt; add warning message
wl-zhao Oct 24, 2024
7c305d4
add source for video
wl-zhao Oct 24, 2024
5f3b06a
update path
wl-zhao Oct 24, 2024
262e92d
fix repeat export automata dependency
wl-zhao Oct 24, 2024
70dd920
Update automata.py
yuxumin Oct 27, 2024
030bf22
fix priority payload
wl-zhao Oct 28, 2024
a12d47e
target_inputs bugs
wl-zhao Oct 28, 2024
c3cfa82
Merge branch 'dev_comfyui_v2' of github.com:myshell-ai/ShellAgent int…
wl-zhao Oct 28, 2024
a6d75c2
Merge branch 'main' of github.com:myshell-ai/ShellAgent into dev_comf…
wl-zhao Oct 28, 2024
239ebb0
update to fastapi backend
wl-zhao Oct 29, 2024
7f1c70c
fix upload bug
wl-zhao Oct 29, 2024
b44e260
update fastapi dependency
wl-zhao Oct 29, 2024
922cdc1
make pypi more robust
wl-zhao Oct 29, 2024
33b01a6
fix settings save bug
wl-zhao Oct 29, 2024
496ea44
fix bug
wl-zhao Oct 29, 2024
dae2e66
Merge branch 'main' of github.com:myshell-ai/ShellAgent into dev_comf…
wl-zhao Oct 29, 2024
afa1a37
fix bug
wl-zhao Oct 29, 2024
2c1e912
fix windows deploy bug
wl-zhao Oct 29, 2024
4c0eac1
fix mode:comfy_workflow for multiple used ones; webbrowser; improve u…
wl-zhao Oct 31, 2024
5d1516d
fix conflict
wl-zhao Oct 31, 2024
82686d2
chat message payload
wl-zhao Oct 31, 2024
3ed07b9
add flag auto-launch
wl-zhao Nov 1, 2024
af4d82f
pass metadata to release
wl-zhao Nov 1, 2024
a796c13
improved error reporting
wl-zhao Nov 1, 2024
a34dd30
improved error reporting
wl-zhao Nov 1, 2024
93da8f5
add new_file_uri isfile chck
wl-zhao Nov 1, 2024
f2b82b8
assert task.mode
wl-zhao Nov 1, 2024
2cfadbc
merge conflict
wl-zhao Nov 1, 2024
73faab3
merge conflict
wl-zhao Nov 1, 2024
4991880
handle local video_path
wl-zhao Nov 4, 2024
0674e4c
fix comfyui_widget video path bug
wl-zhao Nov 4, 2024
7083388
pydantic sess state
wl-zhao Nov 7, 2024
3ed7344
Merge branch 'main' of github.com:myshell-ai/ShellAgent into dev_comf…
wl-zhao Nov 7, 2024
20f63a8
update
wl-zhao Nov 8, 2024
0de42b5
fix conflict
wl-zhao Nov 8, 2024
56559f4
Merge branch 'main' of github.com:myshell-ai/ShellAgent into dev_comf…
yuxumin Nov 14, 2024
0dacadd
update error msg for comfyui widget
yuxumin Nov 14, 2024
1a50894
add templates
wl-zhao Nov 15, 2024
9a8264a
add twitter search
wl-zhao Nov 15, 2024
a92396f
Merge branch 'main' of github.com:myshell-ai/ShellAgent into dev_comf…
wl-zhao Nov 15, 2024
8fdf310
add shellagent helper; compatible with myshell
wl-zhao Nov 15, 2024
322140f
Merge branch 'dev_comfyui_v2' of github.com:myshell-ai/ShellAgent int…
wl-zhao Nov 15, 2024
a3ab5d4
fix bug
wl-zhao Nov 15, 2024
f382fe4
Merge branch 'main' of github.com:myshell-ai/ShellAgent into dev_comf…
yuxumin Nov 17, 2024
29a648f
fix bug
yuxumin Nov 17, 2024
709b0e7
Merge branch 'main' of github.com:myshell-ai/ShellAgent into dev_comf…
yuxumin Nov 17, 2024
3108d21
Merge branch 'main' of github.com:myshell-ai/ShellAgent into dev_comf…
wl-zhao Nov 18, 2024
e1a1d28
Merge branch 'main' of github.com:myshell-ai/ShellAgent into dev_comf…
wl-zhao Nov 20, 2024
188a5b7
add error reporting; fix bugs when running on myshell
wl-zhao Nov 21, 2024
e294767
Merge branch 'main' of github.com:myshell-ai/ShellAgent into dev_comf…
wl-zhao Nov 21, 2024
54eb91c
Merge branch 'dev_comfyui_v2' of github.com:myshell-ai/ShellAgent int…
wl-zhao Nov 21, 2024
3dddf05
new comfyui logic; add trace_id
wl-zhao Nov 21, 2024
cc09e0d
new comfyui logic; add trace_id
wl-zhao Nov 21, 2024
cc77af2
add get_cwd
wl-zhao Nov 22, 2024
1c489df
categories
wl-zhao Nov 22, 2024
89bd0e9
fix bug
wl-zhao Nov 25, 2024
7952e54
modify update_dependency to support duplicate
wl-zhao Nov 25, 2024
253c315
add error_message and error_message_detail back
wl-zhao Nov 28, 2024
ff89514
support images for helper
wl-zhao Nov 28, 2024
e65143d
merge conflict
wl-zhao Nov 28, 2024
d37c1b8
Update comfyui_widget.py
yuxumin Nov 29, 2024
2047d47
fix bug with remote url
wl-zhao Dec 4, 2024
9bdff6d
fix bug with remote url
wl-zhao Dec 4, 2024
d2245cf
add msg to exception init
wl-zhao Dec 5, 2024
58519b7
add helper related
wl-zhao Dec 5, 2024
10dd859
merge conflict
wl-zhao Dec 5, 2024
11a1be1
fix export bug; remove useless code; add get current version
wl-zhao Dec 5, 2024
3512171
Merge branch 'main' of github.com:myshell-ai/ShellAgent into dev_comf…
wl-zhao Dec 5, 2024
2f09d81
comfyui check output exception bug
wl-zhao Dec 6, 2024
cc6aeb9
update error reporting logic
yuxumin Dec 6, 2024
b4462cf
support audio
wl-zhao Dec 11, 2024
db369cd
Merge branch 'dev_comfyui_v2' of github.com:myshell-ai/ShellAgent int…
wl-zhao Dec 11, 2024
4722afa
fix error data bug
wl-zhao Dec 11, 2024
f83c827
add auto update for both stable and preview
Cherwayway Dec 12, 2024
a4240cb
merge conflict
Cherwayway Dec 12, 2024
69112c3
fix export bug for comfyui widget
wl-zhao Dec 12, 2024
fad1dd8
delete config location
wl-zhao Dec 12, 2024
2e0021b
198 support stable and next update channels (#202)
shanexi Dec 16, 2024
943e8fa
update compute save root code
wl-zhao Dec 17, 2024
c77ca7c
add running_error for stateless endpoint
wl-zhao Dec 17, 2024
a380ab2
feat: double click;button reorder;form validator (#204)
ikun97 Dec 18, 2024
d402ffe
feat: dbclick (#205)
ikun97 Dec 18, 2024
9343650
raise when upload to myshell error; double check is_local; import logic
wl-zhao Dec 19, 2024
874edcf
merge conflict
wl-zhao Dec 19, 2024
9832a4d
Dev comfyui v2 (#209)
wl-zhao Dec 19, 2024
cdfc1d3
Hotfix online bug (#210)
myshell-joe Dec 19, 2024
09bc2a9
feat: note node;import app (#211)
ikun97 Dec 19, 2024
95af13a
feat: template (#213)
ikun97 Dec 19, 2024
0a9be1e
add auto update for both stable and preview (#200)
Cherwayway Dec 18, 2024
b597964
Hotfix online bug (#215)
myshell-joe Dec 19, 2024
5f3c6a2
Update bundled image canvas (#212)
shanexi Dec 23, 2024
b25e118
Update bundled chat (#203)
shanexi Dec 23, 2024
e3ff815
Dev optimize auto update (#217)
Cherwayway Dec 24, 2024
86bf176
(to beta) Revert 195 revert 173 comfyui widget supports reuse and per…
shanexi Dec 25, 2024
5e00e3c
support image file chat input; helper feedback submit
wl-zhao Dec 25, 2024
e313fd5
fix chat im bug
wl-zhao Dec 25, 2024
9df1e68
Chat IM images; expression add random; submit feedback
wl-zhao Dec 27, 2024
f8028f4
bypass web-build path
wl-zhao Dec 27, 2024
6708f3e
merge conflict
wl-zhao Dec 27, 2024
afaa24a
新增部署配置
myshell-leon Dec 23, 2024
2716ad0
更新监听端口
myshell-leon Dec 26, 2024
40899ef
Dev code mode editor (#222)
myshell-joe Dec 27, 2024
03e59c8
fix trace_id bug
wl-zhao Dec 29, 2024
ae86ee5
update gitignore
wl-zhao Dec 29, 2024
0b5aa72
update gitignore
wl-zhao Dec 29, 2024
97c523b
Dev fix encoding (#223)
wl-zhao Dec 29, 2024
7222cc6
add print message
wl-zhao Dec 30, 2024
998e7ac
启动时打印注入的环境变量
myshell-leon Dec 30, 2024
e00bd69
tag名称修改
myshell-leon Dec 30, 2024
653e99e
fix conflict
wl-zhao Dec 30, 2024
58d9586
Dev comfyui v2 (#224)
wl-zhao Dec 30, 2024
4944c02
fix save template bug
wl-zhao Dec 30, 2024
d043354
Dev feedback (#225)
ikun97 Dec 30, 2024
f3f1475
update bundled chat (#226)
shanexi Dec 30, 2024
9323446
feat: template (#227)
ikun97 Dec 30, 2024
1431d43
feat: template (#228)
ikun97 Dec 30, 2024
2025af5
Test images
tiancheng-myshell Dec 30, 2024
6cd3c61
Dev optimize auto update (#230)
Cherwayway Dec 30, 2024
96b8312
add response status code
wl-zhao Dec 30, 2024
9f1c633
请求openapi run接口响应非200状态码异常处理修改
myshell-leon Dec 31, 2024
07c3c6d
feat: random transition (#231)
ikun97 Dec 31, 2024
ccf872e
Fix code mode editor merge (#232)
myshell-joe Dec 31, 2024
8cd31f6
recover code #212 #203 #218 #226 (#234)
shanexi Jan 2, 2025
71d0683
Dockerfile新增环境变量
myshell-leon Jan 2, 2025
3ae669b
IM input supports image (#219)
shanexi Jan 2, 2025
7e1a075
ignore product.release for auto update (#235)
Cherwayway Jan 2, 2025
be5ad09
安装playwright
myshell-leon Jan 2, 2025
5af8a88
安装playwright依赖
myshell-leon Jan 2, 2025
df8161e
fix create temp file on windows (#237)
wl-zhao Jan 3, 2025
e0efe37
add IP check; ALWAYS support target_inputs; supportedFileInfos
wl-zhao Jan 7, 2025
4d86338
Merge branch 'dev_comfyui_v2' of github.com:myshell-ai/ShellAgent int…
wl-zhao Jan 7, 2025
e7e9cc3
online bug fix (#239)
myshell-joe Jan 7, 2025
37d880a
Dev temp (#240)
ikun97 Jan 7, 2025
b55791e
fix bug
wl-zhao Jan 8, 2025
e37690c
type: proconfig for X bot
tiancheng-myshell Jan 8, 2025
17a3db3
feat: delete manager
ikun97 Jan 8, 2025
b45ef02
print supportedFileInfos
wl-zhao Jan 8, 2025
b117f03
add print
wl-zhao Jan 8, 2025
27eb431
update dockerfile
wl-zhao Jan 8, 2025
391c76f
update dockerfile
wl-zhao Jan 8, 2025
0315075
update dockerfile
wl-zhao Jan 8, 2025
c9947d7
workflow更新
myshell-leon Jan 8, 2025
319d2f7
workflow更新
myshell-leon Jan 8, 2025
a2f389a
221 image choices 3 (#236)
shanexi Jan 9, 2025
d45c7a0
feat: hide in web
ikun97 Jan 9, 2025
1d606e5
Merge branch 'beta' of github.com:myshell-ai/ShellAgent into x-bot-pr…
myshell-joe Jan 9, 2025
85dee5d
Dev automata validate (#238)
myshell-joe Jan 9, 2025
703adeb
Merge branch 'beta' of github.com:myshell-ai/ShellAgent into x-bot-pr…
myshell-joe Jan 9, 2025
ca7a0ce
Fix ComfyUI dependencies check (#243)
shanexi Jan 9, 2025
97b53f0
feat: home support app_type
myshell-joe Jan 9, 2025
f386703
feat: support new proconfig protocol
myshell-joe Jan 9, 2025
914fe8a
Fix revert code mode (#245)
myshell-joe Jan 9, 2025
db24b5b
Merge branch 'beta' of github.com:myshell-ai/ShellAgent into x-bot-pr…
myshell-joe Jan 9, 2025
f920479
feat: 首页done
myshell-joe Jan 9, 2025
00de35e
type: timer
tiancheng-myshell Jan 10, 2025
ae2c58e
fix merge conflict
wl-zhao Jan 10, 2025
d14003c
Dev comfyui v2 (#246)
wl-zhao Jan 10, 2025
0bbfd80
type: twitter payload
tiancheng-myshell Jan 10, 2025
a56aafd
type: speficy image type for tweet detail
tiancheng-myshell Jan 10, 2025
74697ed
feat: api
ikun97 Jan 10, 2025
b6beec6
feat: pull beta
ikun97 Jan 10, 2025
92dd7a1
WIP: x appbuilder
myshell-joe Jan 10, 2025
b19c925
Merge branch 'x-bot-proconfig' of github.com:myshell-ai/ShellAgent in…
myshell-joe Jan 10, 2025
90fb609
Merge branch 'beta' of github.com:myshell-ai/ShellAgent into x-bot-pr…
myshell-joe Jan 10, 2025
9902280
fix: button content maxLength (#247)
myshell-joe Jan 10, 2025
91849b1
feat: pull beta
ikun97 Jan 10, 2025
03bc0fd
feat: content type
ikun97 Jan 10, 2025
692adf7
feat: get wigets from backend
shanexi Jan 13, 2025
4b3da13
fix: material list search filter
shanexi Jan 13, 2025
7f45789
fix: lint
shanexi Jan 13, 2025
8f5a197
fix: apply to backend api change
shanexi Jan 13, 2025
a1a8e86
feat: api files
ikun97 Jan 13, 2025
7a0607c
get_widget_schema add params myshell_widget_name
shanexi Jan 13, 2025
e36fe68
fix: type
shanexi Jan 13, 2025
d634c1a
type: x bot hello world example
tiancheng-myshell Jan 13, 2025
162c400
WIP
myshell-joe Jan 14, 2025
21232c6
Merge branch 'x-bot-proconfig' of github.com:myshell-ai/ShellAgent in…
myshell-joe Jan 14, 2025
6a51a7c
feat: convert to x bot
shanexi Jan 14, 2025
90a8d0b
fix: fix x_bot
shanexi Jan 14, 2025
bff8f52
[WIP] ui done
myshell-joe Jan 14, 2025
148b234
Merge branch 'x-bot-proconfig' of github.com:myshell-ai/ShellAgent in…
myshell-joe Jan 14, 2025
dc8822f
[WIP] add twiter payload
myshell-joe Jan 14, 2025
f3d0b8b
feat: merge by title
shanexi Jan 15, 2025
a450574
fix: widget schema stale data
shanexi Jan 15, 2025
f7bc95b
[WIP] transition form
myshell-joe Jan 15, 2025
8977364
done
myshell-joe Jan 15, 2025
6adcd2c
Merge branch 'x-bot-proconfig' of github.com:myshell-ai/ShellAgent in…
myshell-joe Jan 15, 2025
9a75ae0
fix
myshell-joe Jan 15, 2025
755e269
Merge branch '248-access-myshell-widgets' into dev-x-bot
shanexi Jan 15, 2025
395d4af
merge
shanexi Jan 15, 2025
2f31286
Merge branch 'dev-x-bot' of github.com:myshell-ai/ShellAgent into dev…
shanexi Jan 15, 2025
eaf869c
feat: merge login
ikun97 Jan 15, 2025
5962b8c
feat: merge login
ikun97 Jan 15, 2025
6b4044b
Merge branch 'dev-x-bot' of github.com:myshell-ai/ShellAgent into dev…
wl-zhao Jan 15, 2025
8527d2c
x_bot
wl-zhao Jan 15, 2025
7ce6a22
update error reporting
wl-zhao Jan 16, 2025
1763a4c
add widget list
wl-zhao Jan 16, 2025
d9ce62d
add myshell_widget_list
wl-zhao Jan 16, 2025
15324f1
update myshell list
wl-zhao Jan 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
65 changes: 65 additions & 0 deletions .aws/task-definition-shellagent-prod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"containerDefinitions": [
{
"name": "shellagent_myshell_python_engine",
"image": "813449244180.dkr.ecr.us-west-2.amazonaws.com/shellagent:1.0.0",
"cpu": 0,
"portMappings": [
{
"name": "shellagent_myshell_python_engine_prod_tcp_8089",
"containerPort": 8089,
"hostPort": 8089,
"protocol": "tcp",
"appProtocol": "http"
}
],
"essential": true,
"environment": [
{
"name": "MYSHELL_DEPLOY",
"value": "1"
},
{
"name": "MYSHELL_API_DEPLOY_KEY",
"value": ""
}
],
"command": null,
"environmentFiles": [],
"mountPoints": [],
"volumesFrom": [],
"ulimits": [],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/shellagent_myshell_python_engine_prod",
"mode": "non-blocking",
"awslogs-create-group": "true",
"max-buffer-size": "25m",
"awslogs-region": "us-west-2",
"awslogs-stream-prefix": "ecs"
},
"secretOptions": []
},
"systemControls": []
}
],
"family": "shellagent_myshell_python_engine_prod",
"taskRoleArn": "arn:aws:iam::813449244180:role/ecsTaskRole",
"executionRoleArn": "arn:aws:iam::813449244180:role/ecsTaskExecutionRole",
"networkMode": "awsvpc",
"volumes": [],
"placementConstraints": [],
"requiresCompatibilities": [
"FARGATE"
],
"cpu": "4096",
"memory": "8192",
"runtimePlatform": {
"cpuArchitecture": "X86_64",
"operatingSystemFamily": "LINUX"
},
"enableFaultInjection": false,
"tags": [],
"enableExecuteCommand": true
}
45 changes: 27 additions & 18 deletions .ci/update/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def pull(repo, remote_name='origin', branch='main'):
print('Conflicts found in:', conflict[0].path)
error = {
'error_code': 'SHELL-1116',
'error_head': 'Auto-update Error',
'error_head': 'Auto-update Error',
'msg': f"find conflicts",
}
raise ShellException(**error)
Expand All @@ -55,7 +55,7 @@ def pull(repo, remote_name='origin', branch='main'):
else:
error = {
'error_code': 'SHELL-1116',
'error_head': 'Auto-update Error',
'error_head': 'Auto-update Error',
'msg':'Unknown merge analysis result',
}
raise ShellException(**error)
Expand All @@ -80,8 +80,26 @@ def pull(repo, remote_name='origin', branch='main'):
repo = pygit2.Repository(repo_path)
ident = pygit2.Signature('shellagent', '[email protected]')

def decrypt_token(token):
# Shift each character back by 1 in the alphabet
decrypted = ''
for char in token:
if char.isalpha():
# Handle both uppercase and lowercase letters
ascii_offset = ord('A') if char.isupper() else ord('a')
# Shift back by 1 and wrap around if needed
decrypted += chr((ord(char) - ascii_offset - 1) % 26 + ascii_offset)
elif char.isdigit():
# For digits, shift back by 1 and wrap 0 back to 9
decrypted += str((int(char) - 1) % 10)
else:
# Keep non-alphanumeric characters unchanged
decrypted += char

return decrypted

headers = {
'Authorization': f'token {os.environ.get("GITHUB_TOKEN")}',
'Authorization': f'token {decrypt_token("hjuivc_qbu_22B5KIA4R1VKZqKvXDWyLI_frc7Df6T3z2Zuohamc6k5SVjUZkqXIU2s6wAUAvF73eACZEQ73RUhJKsBWA")}',
'Accept': 'application/vnd.github+json'
}

Expand All @@ -99,16 +117,13 @@ def download_latest_web_build():
artifact_id = parts[-1]
owner = "myshell-ai"
repo = "ShellAgent"

# Construct GitHub API URL
api_url = f"https://api.github.com/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/zip"

if os.environ.get('GITHUB_TOKEN', '') == '':
response = requests.get(api_url)
else:
response = requests.get(api_url, headers=headers)

response = requests.get(api_url, headers=headers)
response.raise_for_status()

with open('web-build.zip', 'wb') as f:
f.write(response.content)
print("Download completed successfully")
Expand All @@ -126,10 +141,7 @@ def download_latest_web_build():
api_url = f"https://api.github.com/repos/myshell-ai/ShellAgent/releases/latest"
else:
api_url = f"https://api.github.com/repos/myshell-ai/ShellAgent/releases/tags/{latest_tag_name}"
if os.environ.get('GITHUB_TOKEN', '') == '':
response = requests.get(api_url)
else:
response = requests.get(api_url, headers=headers)
response = requests.get(api_url, headers=headers)
if response.status_code != 200:
print("Failed to get the latest release information")
return
Expand All @@ -144,10 +156,7 @@ def download_latest_web_build():
# Download web-build
download_url = web_build_asset['browser_download_url']

if os.environ.get('GITHUB_TOKEN', '') == '':
response = requests.get(download_url)
else:
response = requests.get(download_url, headers=headers)
response = requests.get(download_url, headers=headers)

if response.status_code != 200:
print("Failed to download web-build")
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/build-web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ jobs:
- working-directory: "./web"
run: pnpm install

- working-directory: "./web"
run: pnpm run test

- working-directory: "./web"
run: pnpm turbo run build --filter=web
env:
Expand Down
79 changes: 79 additions & 0 deletions .github/workflows/deploy-shellagent-prod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Deploy ShellAgent To Amazon Prod ECS

on:
push:
branches:
- 'prod.release-v*.*.*'
- 'prod.release-v*.*.*-hotfix-*'

env:
AWS_REGION: us-west-2
ECR_REPOSITORY: shellagent-python-engine
ECS_CLUSTER: ShellAgentProdCluster
ECS_SERVICE: shellagent-myshell-python-engine
CONTAINER_NAME: shellagent_myshell_python_engine
REPOSITORY_NAME: shellagent-python-engine
ECS_TASK_DEFINITION: .aws/task-definition-shellagent-prod.json

jobs:
deploy-shellagent-engine-prod:
runs-on: ubuntu-latest
permissions:
issues: write
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Determine Cluster and Task Definition
run: |
if [[ "${{ github.ref }}" =~ ^refs/heads/prod.release-v([0-9]+\.[0-9]+\.[0-9]+(-hotfix-[0-9]+)?)$ ]]; then
VERSION=${BASH_REMATCH[1]}
echo "IMAGE_TAG=$VERSION" >> $GITHUB_ENV
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
fi

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_REGION }}

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1

- name: Build and push Docker image
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
run: |
docker build --no-cache -t $ECR_REGISTRY/$ECR_REPOSITORY:${{ env.IMAGE_TAG }} .
docker run --rm $ECR_REGISTRY/$ECR_REPOSITORY:${{ env.IMAGE_TAG }} /app/.venv/bin/python -c "import fastapi; print('FastAPI loaded successfully')"
docker push $ECR_REGISTRY/$ECR_REPOSITORY:${{ env.IMAGE_TAG }}
echo "image=$ECR_REGISTRY/$ECR_REPOSITORY:${{ env.IMAGE_TAG }}" >> $GITHUB_ENV

- name: Fill in the new image ID in the Amazon ECS task definition
id: task-def
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition: ${{ env.ECS_TASK_DEFINITION }}
container-name: ${{ env.CONTAINER_NAME }}
image: ${{ steps.login-ecr.outputs.registry }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }}
environment-variables: |
MYSHELL_DEPLOY=1
MYSHELL_API_DEPLOY_KEY=${{ secrets.MYSHELL_API_DEPLOY_KEY }}

- name: Deploy Amazon ECS task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@v2
with:
task-definition: ${{ steps.task-def.outputs.task-definition }}
service: ${{ env.ECS_SERVICE }}
cluster: ${{ env.ECS_CLUSTER }}
wait-for-service-stability: true
force-new-deployment: true

- name: Create Tag
run: |
git tag prod.release-v${{ env.RELEASE_VERSION }}
git push --tags
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@ web/extensions
package_models
hf_repo
*.7z
/data*
/trash
launch.sh
.idea/
.DS_Store
47 changes: 47 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
FROM python:3.10-slim

WORKDIR /app

RUN apt-get update && apt-get install -y \
curl \
gcc \
libpq-dev \
libssl-dev \
libffi-dev \
build-essential \
wget \
libnss3 \
libatk1.0-0 \
libatk-bridge2.0-0 \
libcups2 \
libxcomposite1 \
libxrandr2 \
libxdamage1 \
libx11-xcb1 \
libxcb-dri3-0 \
libgbm1 \
libasound2 \
fonts-liberation \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

RUN pip install --upgrade pip
RUN pip install playwright
RUN playwright install-deps
RUN playwright install chromium

RUN curl -sSL https://install.python-poetry.org | python3 -
ENV PATH="/root/.local/bin:$PATH"

RUN poetry config virtualenvs.in-project true

COPY pyproject.toml poetry.lock ./

RUN poetry install --no-root && ls -l /app/.venv/bin/python

COPY . .
ENV PYTHONPATH="/app"
ENV MYSHELL_KEY="OPENSOURCE_FIXED"

EXPOSE 8089

CMD ["sh", "-c", "MYSHELL_API_KEY=$MYSHELL_API_DEPLOY_KEY MYSHELL_DEPLOY=$MYSHELL_DEPLOY MYSHELL_KEY=$MYSHELL_KEY /app/.venv/bin/python servers/main.py --port 8089 --device 0 --project_root /app/data --disable_auto_launch"]
Loading
Loading