@openagents-org/agent-launcher 0.2.173 → 0.2.176

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 137 137" role="img" style="flex:none;line-height:1">
2
+ <title>Command Code</title>
3
+ <path d="m0 66.7959c0-31.4879 0-47.2318 9.78204-57.01386 9.78206-9.78204 25.52596-9.78204 57.01396-9.78204h2.5357c31.4883 0 47.2323 0 57.0143 9.78204 9.782 9.78206 9.782 25.52596 9.782 57.01396v2.5357c0 31.4883 0 47.2323-9.782 57.0143s-25.526 9.782-57.0144 9.782h-2.5357c-31.4879 0-47.2318 0-57.01386-9.782-9.78204-9.782-9.78204-25.526-9.78204-57.0144z" fill="#000"/><path d="m69.3317 5.56633h-2.5357c-15.9014 0-27.2674.01182-35.905 1.17312-8.4775 1.13977-13.4886 3.29415-17.173 6.97855s-5.83878 8.6955-6.97855 17.173c-1.1613 8.6376-1.17312 20.0036-1.17312 35.9049v2.5357c0 15.9014.01182 27.2674 1.17312 35.9054 1.13977 8.477 3.29415 13.488 6.97855 17.173 3.6844 3.684 8.6955 5.838 17.173 6.978 8.6376 1.161 20.0036 1.173 35.9049 1.173h2.5357c15.9014 0 27.2674-.012 35.9054-1.173 8.477-1.14 13.488-3.294 17.173-6.978 3.684-3.685 5.838-8.696 6.978-17.173 1.161-8.638 1.173-20.004 1.173-35.9053v-2.5357c0-15.9014-.012-27.2674-1.173-35.905-1.14-8.4775-3.294-13.4886-6.978-17.173-3.685-3.6844-8.696-5.83878-17.173-6.97855-8.638-1.1613-20.004-1.17312-35.9053-1.17312zm-59.54966 4.21571c-9.78204 9.78206-9.78204 25.52596-9.78204 57.01386v2.5357c0 31.4884 0 47.2324 9.78204 57.0144 9.78206 9.782 25.52596 9.782 57.01386 9.782h2.5357c31.4884 0 47.2324 0 57.0144-9.782s9.782-25.526 9.782-57.0143v-2.5357c0-31.488 0-47.2319-9.782-57.01396-9.782-9.78204-25.526-9.78204-57.0143-9.78204h-2.5357c-31.488 0-47.2319 0-57.01396 9.78204z" fill="#000" fill-rule="evenodd"/><path d="m93.6604 26.1784c-8.982 0-16.2887 7.3067-16.2887 16.2888v6.9809h-18.6158v-6.9809c0-8.9821-7.3067-16.2888-16.2887-16.2888-8.9821 0-16.2888 7.3067-16.2888 16.2888s7.3067 16.2887 16.2888 16.2887h6.9809v18.6158h-6.9809c-8.9821 0-16.2888 7.3067-16.2888 16.2888 0 8.9825 7.3067 16.2885 16.2888 16.2885 8.982 0 16.2887-7.306 16.2887-16.2885v-6.981h18.6158v6.981c0 8.9825 7.3067 16.2885 16.2887 16.2885 8.9826 0 16.2886-7.306 16.2886-16.2885 0-8.9821-7.306-16.2888-16.2886-16.2888h-6.9809v-18.6158h6.9809c8.9826 0 16.2886-7.3066 16.2886-16.2887s-7.306-16.2888-16.2886-16.2888zm-6.9809 23.2697v-6.9809c0-3.8628 3.1182-6.9809 6.9809-6.9809 3.8628 0 6.9806 3.1181 6.9806 6.9809 0 3.8627-3.1178 6.9809-6.9806 6.9809zm-44.2123 0c-3.8628 0-6.9809-3.1182-6.9809-6.9809 0-3.8628 3.1181-6.9809 6.9809-6.9809 3.8627 0 6.9809 3.1181 6.9809 6.9809v6.9809zm16.2887 27.9236v-18.6158h18.6158v18.6158zm34.9045 23.2693c-3.8627 0-6.9809-3.1178-6.9809-6.9805v-6.981h6.9809c3.8628 0 6.9806 3.1182 6.9806 6.981 0 3.8627-3.1178 6.9805-6.9806 6.9805zm-51.1932 0c-3.8628 0-6.9809-3.1178-6.9809-6.9805 0-3.8628 3.1181-6.981 6.9809-6.981h6.9809v6.981c0 3.8627-3.1182 6.9805-6.9809 6.9805z" fill="#fff"/></svg>
package/icons/kimi.svg CHANGED
@@ -1,11 +1,6 @@
1
- <svg viewBox="0 0 24 24" width="1em" height="1em" xmlns="http://www.w3.org/2000/svg">
2
- <defs>
3
- <linearGradient id="kimi-g" x1="4" y1="4" x2="20" y2="20" gradientUnits="userSpaceOnUse">
4
- <stop stop-color="#141821"/>
5
- <stop offset="0.52" stop-color="#2f6df6"/>
6
- <stop offset="1" stop-color="#49d2ff"/>
7
- </linearGradient>
8
- </defs>
9
- <rect x="2" y="2" width="20" height="20" rx="6" fill="url(#kimi-g)"/>
10
- <path d="M7 6.5h2.6v4.1l4.2-4.1H17l-4.7 4.7 5 6.3h-3.2l-3.6-4.7-.9.9v3.8H7z" fill="#fff"/>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 112 112" role="img" style="flex:none;line-height:1">
2
+ <title>Kimi Code CLI</title>
3
+ <rect width="112" height="112" rx="28" fill="#000"/>
4
+ <path d="M30 34 38 34 38 56 39 57 63 34 75 34 53 57 65 66 77 73 77 81 73 81 67 78 46 63 38 71 38 81 30 81Z" fill="#fff"/>
5
+ <circle cx="86" cy="28" r="5.5" fill="#1783FF"/>
11
6
  </svg>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openagents-org/agent-launcher",
3
- "version": "0.2.173",
3
+ "version": "0.2.176",
4
4
  "description": "OpenAgents Launcher — install, configure, and run AI coding agents from your terminal",
5
5
  "main": "src/index.js",
6
6
  "bin": {
package/registry.json CHANGED
@@ -10,7 +10,11 @@
10
10
  "open-source"
11
11
  ],
12
12
  "builtin": true,
13
- "support": { "install": true, "workspace": true, "collaboration": true },
13
+ "support": {
14
+ "install": true,
15
+ "workspace": true,
16
+ "collaboration": true
17
+ },
14
18
  "install": {
15
19
  "binary": "aider",
16
20
  "macos": "curl -LsSf https://aider.chat/install.sh | sh",
@@ -75,7 +79,11 @@
75
79
  "vscode"
76
80
  ],
77
81
  "builtin": true,
78
- "support": { "install": true, "workspace": true, "collaboration": true },
82
+ "support": {
83
+ "install": true,
84
+ "workspace": true,
85
+ "collaboration": true
86
+ },
79
87
  "install": {
80
88
  "binary": "amp",
81
89
  "macos": "curl -fsSL https://ampcode.com/install.sh | bash",
@@ -119,7 +127,11 @@
119
127
  ],
120
128
  "featured": true,
121
129
  "order": 1,
122
- "support": { "install": true, "workspace": true, "collaboration": true },
130
+ "support": {
131
+ "install": true,
132
+ "workspace": true,
133
+ "collaboration": true
134
+ },
123
135
  "builtin": true,
124
136
  "install": {
125
137
  "binary": "claude",
@@ -143,7 +155,8 @@
143
155
  },
144
156
  "check_ready": {
145
157
  "env_vars": [
146
- "ANTHROPIC_API_KEY"
158
+ "ANTHROPIC_API_KEY",
159
+ "ANTHROPIC_AUTH_TOKEN"
147
160
  ],
148
161
  "creds_file": "~/.claude/sessions",
149
162
  "creds_key": null,
@@ -152,8 +165,37 @@
152
165
  "login_command": "claude login",
153
166
  "alt_check": "claude --print hi"
154
167
  },
155
- "probe": { "args": ["--print", "hi"], "timeout_s": 120 },
156
- "env_config": []
168
+ "probe": {
169
+ "args": [
170
+ "--print",
171
+ "hi"
172
+ ],
173
+ "timeout_s": 120
174
+ },
175
+ "env_config": [],
176
+ "resolve_env": {
177
+ "rules": [
178
+ {
179
+ "from": "LLM_API_KEY",
180
+ "to": "ANTHROPIC_AUTH_TOKEN",
181
+ "if_base_url_contains": "://"
182
+ },
183
+ {
184
+ "from": "LLM_API_KEY",
185
+ "to": "ANTHROPIC_API_KEY",
186
+ "unless_base_url_contains": "://"
187
+ },
188
+ {
189
+ "from": "LLM_BASE_URL",
190
+ "to": "ANTHROPIC_BASE_URL"
191
+ },
192
+ {
193
+ "from": "LLM_MODEL",
194
+ "to": "ANTHROPIC_MODEL"
195
+ }
196
+ ]
197
+ },
198
+ "protocol": "anthropic"
157
199
  },
158
200
  {
159
201
  "name": "cline",
@@ -166,7 +208,11 @@
166
208
  "autonomous"
167
209
  ],
168
210
  "builtin": true,
169
- "support": { "install": true, "workspace": true, "collaboration": false },
211
+ "support": {
212
+ "install": true,
213
+ "workspace": true,
214
+ "collaboration": false
215
+ },
170
216
  "install": {
171
217
  "binary": "cline",
172
218
  "requires": [
@@ -230,7 +276,11 @@
230
276
  ],
231
277
  "featured": true,
232
278
  "order": 3,
233
- "support": { "install": true, "workspace": true, "collaboration": true },
279
+ "support": {
280
+ "install": true,
281
+ "workspace": true,
282
+ "collaboration": true
283
+ },
234
284
  "builtin": true,
235
285
  "install": {
236
286
  "binary": "codex",
@@ -305,7 +355,11 @@
305
355
  "cli"
306
356
  ],
307
357
  "order": 9,
308
- "support": { "install": true, "workspace": true, "collaboration": false },
358
+ "support": {
359
+ "install": true,
360
+ "workspace": true,
361
+ "collaboration": false
362
+ },
309
363
  "builtin": true,
310
364
  "install": {
311
365
  "binary": "copilot",
@@ -400,7 +454,11 @@
400
454
  ],
401
455
  "check_ready": {
402
456
  "binary": "agent",
403
- "not_ready_message": "Cursor CLI not found \u2014 install with: curl https://cursor.com/install -fsSL | bash"
457
+ "not_ready_message": "Cursor is installed but not signed in — run `cursor-agent login` on the device, or set a CURSOR_API_KEY from cursor.com/settings. Third-party or relay API keys do not work with Cursor.",
458
+ "env_vars": [
459
+ "CURSOR_API_KEY"
460
+ ],
461
+ "login_command": "cursor-agent login"
404
462
  },
405
463
  "resolve_env": {
406
464
  "rules": [
@@ -413,7 +471,8 @@
413
471
  "to": "CURSOR_MODEL"
414
472
  }
415
473
  ]
416
- }
474
+ },
475
+ "provider_locked": true
417
476
  },
418
477
  {
419
478
  "name": "gemini",
@@ -427,7 +486,11 @@
427
486
  "cli"
428
487
  ],
429
488
  "builtin": true,
430
- "support": { "install": true, "workspace": true, "collaboration": true },
489
+ "support": {
490
+ "install": true,
491
+ "workspace": true,
492
+ "collaboration": true
493
+ },
431
494
  "install": {
432
495
  "binary": "gemini",
433
496
  "requires": [
@@ -470,7 +533,13 @@
470
533
  "api_key": "API key detected"
471
534
  }
472
535
  },
473
- "probe": { "args": ["-p", "hi"], "timeout_s": 120 },
536
+ "probe": {
537
+ "args": [
538
+ "-p",
539
+ "hi"
540
+ ],
541
+ "timeout_s": 120
542
+ },
474
543
  "env_config": []
475
544
  },
476
545
  {
@@ -484,7 +553,11 @@
484
553
  "cli"
485
554
  ],
486
555
  "builtin": true,
487
- "support": { "install": true, "workspace": true, "collaboration": true },
556
+ "support": {
557
+ "install": true,
558
+ "workspace": true,
559
+ "collaboration": true
560
+ },
488
561
  "install": {
489
562
  "binary": "agy",
490
563
  "macos": "curl -fsSL https://antigravity.google/cli/install.sh | bash",
@@ -586,7 +659,7 @@
586
659
  {
587
660
  "name": "nanoclaw",
588
661
  "label": "NanoClaw",
589
- "description": "Containerized agent runtime \u2014 each Agent Group runs in its own Docker container (Claude Agent SDK). Bridged to the Workspace via a native OpenAgents channel.",
662
+ "description": "Containerized agent runtime — each Agent Group runs in its own Docker container (Claude Agent SDK). Bridged to the Workspace via a native OpenAgents channel.",
590
663
  "homepage": "https://github.com/nanocoai/nanoclaw",
591
664
  "tags": [
592
665
  "coding",
@@ -596,7 +669,11 @@
596
669
  "open-source"
597
670
  ],
598
671
  "builtin": true,
599
- "support": { "install": true, "workspace": true, "collaboration": false },
672
+ "support": {
673
+ "install": true,
674
+ "workspace": true,
675
+ "collaboration": false
676
+ },
600
677
  "install": {
601
678
  "binary": "ncl",
602
679
  "requires": [
@@ -632,7 +709,7 @@
632
709
  "NANOCLAW_AGENT_GROUP"
633
710
  ],
634
711
  "saved_env_key": "NANOCLAW_AGENT_GROUP",
635
- "not_ready_message": "Set NANOCLAW_AGENT_GROUP (and NANOCLAW_HOME) \u2014 press e to configure"
712
+ "not_ready_message": "Set NANOCLAW_AGENT_GROUP (and NANOCLAW_HOME) — press e to configure"
636
713
  }
637
714
  },
638
715
  {
@@ -646,7 +723,11 @@
646
723
  ],
647
724
  "featured": true,
648
725
  "order": 2,
649
- "support": { "install": true, "workspace": true, "collaboration": true },
726
+ "support": {
727
+ "install": true,
728
+ "workspace": true,
729
+ "collaboration": true
730
+ },
650
731
  "builtin": true,
651
732
  "install": {
652
733
  "binary": "openclaw",
@@ -716,7 +797,7 @@
716
797
  "OPENAI_API_KEY"
717
798
  ],
718
799
  "saved_env_key": "LLM_API_KEY",
719
- "not_ready_message": "Not configured \u2014 press e to configure"
800
+ "not_ready_message": "Not configured — press e to configure"
720
801
  }
721
802
  },
722
803
  {
@@ -790,29 +871,38 @@
790
871
  ],
791
872
  "saved_env_key": "LLM_API_KEY",
792
873
  "min_version": "1.17.0",
793
- "not_ready_message": "Not configured \u2014 press e to configure"
874
+ "not_ready_message": "Not configured — press e to configure"
794
875
  }
795
876
  },
796
877
  {
797
878
  "name": "kimi",
798
- "label": "Kimi",
799
- "description": "Kimi agent powered by Moonshot AI, OpenAI-compatible API.",
800
- "homepage": "https://platform.moonshot.ai",
879
+ "label": "Kimi Code CLI",
880
+ "description": "Kimi Code CLI — Moonshot AI's terminal coding agent.",
881
+ "homepage": "https://moonshotai.github.io/kimi-code",
801
882
  "tags": [
802
883
  "coding",
884
+ "cli",
803
885
  "moonshot",
804
886
  "open-source"
805
887
  ],
806
888
  "featured": true,
807
889
  "order": 7,
808
- "support": { "install": true, "workspace": true, "collaboration": true },
890
+ "support": {
891
+ "install": true,
892
+ "workspace": true,
893
+ "collaboration": true
894
+ },
809
895
  "builtin": true,
810
896
  "install": {
811
897
  "binary": "kimi",
812
- "api_only": true,
813
- "macos": "echo 'Kimi uses direct API mode — no binary install needed'",
814
- "linux": "echo 'Kimi uses direct API mode — no binary install needed'",
815
- "windows": "echo 'Kimi uses direct API mode — no binary install needed'"
898
+ "requires": [
899
+ "nodejs"
900
+ ],
901
+ "verify": "kimi --version",
902
+ "verify_win": "kimi --version",
903
+ "macos": "npm install -g @moonshot-ai/kimi-code",
904
+ "linux": "npm install -g @moonshot-ai/kimi-code",
905
+ "windows": "npm install -g @moonshot-ai/kimi-code"
816
906
  },
817
907
  "adapter": {
818
908
  "module": "openagents.adapters.kimi",
@@ -824,8 +914,8 @@
824
914
  "env_config": [
825
915
  {
826
916
  "name": "KIMI_API_KEY",
827
- "description": "Moonshot/Kimi API key (also accepts MOONSHOT_API_KEY env var)",
828
- "required": true,
917
+ "description": "Moonshot/Kimi API key (also accepts MOONSHOT_API_KEY). Leave blank to use `kimi login`.",
918
+ "required": false,
829
919
  "password": true
830
920
  },
831
921
  {
@@ -849,8 +939,10 @@
849
939
  "MOONSHOT_API_KEY"
850
940
  ],
851
941
  "saved_env_key": "KIMI_API_KEY",
852
- "not_ready_message": "No API key — press e to configure"
853
- }
942
+ "login_command": "kimi login",
943
+ "not_ready_message": "Not configured — set an API key (press e) or run: kimi login"
944
+ },
945
+ "tagline": "Moonshot AI's Kimi Code CLI coding agent."
854
946
  },
855
947
  {
856
948
  "name": "hermes",
@@ -865,11 +957,18 @@
865
957
  ],
866
958
  "featured": true,
867
959
  "order": 6,
868
- "support": { "install": true, "workspace": true, "collaboration": true },
960
+ "support": {
961
+ "install": true,
962
+ "workspace": true,
963
+ "collaboration": true
964
+ },
869
965
  "builtin": true,
870
966
  "install": {
871
967
  "binary": "hermes",
872
- "requires": ["python3", "git"],
968
+ "requires": [
969
+ "python3",
970
+ "git"
971
+ ],
873
972
  "macos": "curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash -s -- --skip-setup",
874
973
  "linux": "curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash -s -- --skip-setup",
875
974
  "windows": "\"%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe\" -NoProfile -ExecutionPolicy Bypass -Command \"Invoke-RestMethod -UseBasicParsing 'https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.ps1' | Invoke-Expression\""
@@ -882,7 +981,38 @@
882
981
  "creds_no_parse": true,
883
982
  "status_command": "hermes status",
884
983
  "login_command": "hermes setup",
885
- "not_ready_message": "Hermes not configured — run: hermes setup"
984
+ "not_ready_message": "Hermes not configured — run: hermes setup",
985
+ "env_vars": [
986
+ "OPENAI_API_KEY"
987
+ ],
988
+ "saved_env_key": "LLM_API_KEY"
989
+ },
990
+ "env_config": [
991
+ {
992
+ "name": "LLM_API_KEY",
993
+ "description": "API key for a custom OpenAI-compatible endpoint (optional if you sign in with `hermes setup`)",
994
+ "required": false,
995
+ "password": true
996
+ },
997
+ {
998
+ "name": "LLM_BASE_URL",
999
+ "description": "Custom OpenAI-compatible base URL (leave empty to use Hermes's own provider login)",
1000
+ "required": false,
1001
+ "placeholder": "https://api.openai.com/v1"
1002
+ },
1003
+ {
1004
+ "name": "LLM_MODEL",
1005
+ "description": "Model name served by the endpoint above",
1006
+ "required": false
1007
+ }
1008
+ ],
1009
+ "resolve_env": {
1010
+ "rules": [
1011
+ {
1012
+ "from": "LLM_API_KEY",
1013
+ "to": "OPENAI_API_KEY"
1014
+ }
1015
+ ]
886
1016
  }
887
1017
  },
888
1018
  {
@@ -1136,7 +1266,11 @@
1136
1266
  "headless"
1137
1267
  ],
1138
1268
  "builtin": true,
1139
- "support": { "install": true, "workspace": true, "collaboration": true },
1269
+ "support": {
1270
+ "install": true,
1271
+ "workspace": true,
1272
+ "collaboration": true
1273
+ },
1140
1274
  "install": {
1141
1275
  "binary": "dsh",
1142
1276
  "npm_package": "@deepseek-ai/dsh",
@@ -1212,5 +1346,96 @@
1212
1346
  }
1213
1347
  ]
1214
1348
  }
1349
+ },
1350
+ {
1351
+ "name": "commandcode",
1352
+ "label": "Command Code",
1353
+ "description": "Terminal coding agent that learns your coding taste, driven headlessly for workspace tasks",
1354
+ "homepage": "https://commandcode.ai",
1355
+ "tags": [
1356
+ "coding",
1357
+ "cli",
1358
+ "terminal",
1359
+ "headless"
1360
+ ],
1361
+ "builtin": true,
1362
+ "support": {
1363
+ "install": true,
1364
+ "workspace": true,
1365
+ "collaboration": true
1366
+ },
1367
+ "install": {
1368
+ "binary": "command-code",
1369
+ "binary_aliases": [
1370
+ "commandcode",
1371
+ "cmdc"
1372
+ ],
1373
+ "npm_package": "command-code",
1374
+ "requires": [
1375
+ "nodejs"
1376
+ ],
1377
+ "verify": "command-code --version",
1378
+ "verify_win": "command-code --version",
1379
+ "macos": "npm install -g command-code",
1380
+ "linux": "npm install -g command-code",
1381
+ "windows": "npm install -g command-code"
1382
+ },
1383
+ "adapter": {
1384
+ "module": "openagents.adapters.commandcode",
1385
+ "class": "CommandCodeAdapter"
1386
+ },
1387
+ "launch": null,
1388
+ "env_config": [
1389
+ {
1390
+ "name": "COMMAND_CODE_API_KEY",
1391
+ "description": "Command Code API key for headless/CI auth. Optional — leave blank if you signed in with `command-code login` instead.",
1392
+ "required": false,
1393
+ "password": true
1394
+ },
1395
+ {
1396
+ "name": "COMMANDCODE_MODEL",
1397
+ "description": "Model id to run on. Leave empty for the account default; BYOK models are prefixed with their provider (for example openrouter/deepseek-v4-flash).",
1398
+ "required": false,
1399
+ "placeholder": "claude-sonnet-4-6"
1400
+ },
1401
+ {
1402
+ "name": "COMMANDCODE_EFFORT",
1403
+ "description": "Reasoning effort for each run. Leave empty for the model default.",
1404
+ "required": false,
1405
+ "options": [
1406
+ "low",
1407
+ "medium",
1408
+ "high"
1409
+ ]
1410
+ },
1411
+ {
1412
+ "name": "COMMANDCODE_MAX_TURNS",
1413
+ "description": "Maximum tool-use turns per message. Leave empty for the CLI default of 100; a run that hits the limit still returns its partial answer.",
1414
+ "required": false,
1415
+ "placeholder": "100"
1416
+ }
1417
+ ],
1418
+ "check_ready": {
1419
+ "min_version": "1.0.0",
1420
+ "env_vars": [
1421
+ "COMMAND_CODE_API_KEY"
1422
+ ],
1423
+ "saved_env_key": "COMMAND_CODE_API_KEY",
1424
+ "login_command": "command-code login",
1425
+ "not_ready_message": "Not configured — sign in with `command-code login`, or set COMMAND_CODE_API_KEY (press e)",
1426
+ "unreadable_message": "Command Code credentials could not be read. Sign in again with `command-code login`, or re-enter COMMAND_CODE_API_KEY in the Configure screen."
1427
+ },
1428
+ "resolve_env": {
1429
+ "rules": [
1430
+ {
1431
+ "from": "LLM_API_KEY",
1432
+ "to": "COMMAND_CODE_API_KEY"
1433
+ },
1434
+ {
1435
+ "from": "LLM_MODEL",
1436
+ "to": "COMMANDCODE_MODEL"
1437
+ }
1438
+ ]
1439
+ }
1215
1440
  }
1216
1441
  ]
@@ -30,6 +30,7 @@ const {
30
30
  REASON,
31
31
  classifyJoinError,
32
32
  classifyHeartbeatError,
33
+ httpStatusOf,
33
34
  } = require('./health-status');
34
35
 
35
36
  const DEFAULT_ENDPOINT = 'https://workspace-endpoint.openagents.org';
@@ -661,11 +662,29 @@ class BaseAdapter {
661
662
  messages = result.messages;
662
663
  rawCursor = result.cursor;
663
664
  composingActive = !!result.composing;
665
+ this._pollAuthFailStreak = 0;
664
666
  if (pollCount <= 3 || pollCount % 20 === 0) {
665
667
  this._log(`Poll #${pollCount}: ${messages.length} messages, cursor=${rawCursor || 'none'}${composingActive ? ' composing' : ''}`);
666
668
  }
667
669
  } catch (e) {
668
670
  this._log(`Poll #${pollCount} failed: ${e.message} \nStack: ${e.stack}`);
671
+ // A rejected credential never heals by retrying with the same token —
672
+ // it means the device was re-paired/unpaired and this adapter is
673
+ // running on a revoked one. After a few consecutive rejections (not
674
+ // one: a server redeploy can 401 transiently), surface a hard error
675
+ // so status/heartbeat stop claiming "running" while nothing works.
676
+ // The daemon's credential watch restarts the adapter when a fresh
677
+ // token lands on disk, which also clears this state.
678
+ const sc = httpStatusOf(e);
679
+ if (sc === 401 || sc === 403 || /invalid workspace credentials/i.test(e.message || '')) {
680
+ this._pollAuthFailStreak = (this._pollAuthFailStreak || 0) + 1;
681
+ if (this._pollAuthFailStreak >= 3) {
682
+ this._reportStatus(
683
+ REASON.WORKSPACE_JOIN_FAILED,
684
+ 'Workspace rejected this agent\'s credentials — re-pair the device or reconnect the agent to the workspace',
685
+ );
686
+ }
687
+ }
669
688
  await this._sleep(5000);
670
689
  continue;
671
690
  }
@@ -490,7 +490,47 @@ class CodexAdapter extends BaseAdapter {
490
490
  const raw = String(errorMessage || '').trim()
491
491
  || stderrTail
492
492
  || (exitCode ? `codex exited with code ${exitCode}` : '');
493
- return CodexAdapter._redact(raw).slice(0, 500).trim();
493
+ const detail = CodexAdapter._explain(CodexAdapter._unwrap(raw));
494
+ return CodexAdapter._redact(detail).slice(0, 500).trim();
495
+ }
496
+
497
+ /**
498
+ * Unwrap the API's JSON error envelope so the user reads the sentence, not
499
+ * the transport. The backend rejects a run with a body like
500
+ * `{"detail":"The 'gpt-5.6-sol' model requires a newer version of Codex."}`
501
+ * and it was surfaced verbatim, braces and all (#649).
502
+ */
503
+ static _unwrap(raw) {
504
+ const text = String(raw || '').trim();
505
+ if (!text.startsWith('{') && !text.startsWith('[')) return text;
506
+ try {
507
+ const parsed = JSON.parse(text);
508
+ for (const key of ['detail', 'message', 'error']) {
509
+ const v = parsed && parsed[key];
510
+ if (typeof v === 'string' && v.trim()) return v.trim();
511
+ // OpenAI also nests as { error: { message } }.
512
+ if (v && typeof v.message === 'string' && v.message.trim()) return v.message.trim();
513
+ }
514
+ } catch {}
515
+ return text;
516
+ }
517
+
518
+ /**
519
+ * Add the missing half of a backend rejection: what to actually do about it.
520
+ *
521
+ * "Please upgrade to the latest app or CLI" is true but unactionable inside a
522
+ * workspace chat — the user is not at a terminal and does not necessarily
523
+ * know the CLI is theirs to update. Name where the update button lives. The
524
+ * match is on the backend's own wording, so an unrelated failure is passed
525
+ * through untouched.
526
+ */
527
+ static _explain(detail) {
528
+ if (!/requires a newer version|upgrade to the latest (app|version)/i.test(detail)) {
529
+ return detail;
530
+ }
531
+ return `${detail}\n\nUpdate the Codex CLI from OpenAgents Launcher ` +
532
+ '(Agents → Codex → Update), or run `npm install -g @openai/codex@latest`, ' +
533
+ 'then try again. Picking an older model also works around it for now.';
494
534
  }
495
535
 
496
536
  /** Redact secrets (keys, tokens, bearer/authorization, query secrets) from diagnostics. */