moi-computer 0.9.0 → 0.9.1-next.0

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.
Files changed (87) hide show
  1. package/client/assets/hermes.png +0 -0
  2. package/client/components/shared/IconGhost.tsx +15 -18
  3. package/client/components/ui/button.tsx +2 -2
  4. package/client/components/ui/hover-card.tsx +1 -1
  5. package/client/components/ui/popover.tsx +3 -1
  6. package/client/features/chat/ChatEmptyState.tsx +25 -7
  7. package/client/features/chat/ChatPanel.tsx +70 -28
  8. package/client/features/chat/ChatPopup.tsx +3 -2
  9. package/client/features/chat/ChatPromptBubbles.tsx +1 -1
  10. package/client/features/chat/MarkdownContent.tsx +1 -1
  11. package/client/features/chat/attachment-staging.ts +153 -0
  12. package/client/features/chat/chat-send.ts +55 -0
  13. package/client/features/chat/chat-store.ts +32 -8
  14. package/client/features/chat/composer/ChatComposer.tsx +190 -77
  15. package/client/features/chat/{ModelPicker.tsx → composer/ModelPicker.tsx} +29 -25
  16. package/client/features/chat/composer/banners/ComposerBanner.tsx +1 -1
  17. package/client/features/chat/composer/banners/WorkspaceAgentAvailabilityBanner.tsx +4 -13
  18. package/client/features/chat/{model-order.ts → composer/model-order.ts} +16 -0
  19. package/client/features/chat/composer/useWorkspaceComposerState.tsx +9 -4
  20. package/client/features/chat/tool-group/format/claude.ts +48 -0
  21. package/client/features/chat/tool-group/format/codex.ts +126 -0
  22. package/client/features/chat/tool-group/format/hermes.ts +68 -0
  23. package/client/features/chat/tool-group/format/index.ts +34 -0
  24. package/client/features/chat/tool-group/format/mcp.ts +64 -0
  25. package/client/features/chat/tool-group/format/openclaw.ts +116 -0
  26. package/client/features/chat/tool-group/format/shared.ts +49 -0
  27. package/client/features/chat/useChat.ts +5 -10
  28. package/client/features/drawings/DrawingLayer.tsx +49 -0
  29. package/client/features/drawings/DrawingToolbar.tsx +95 -0
  30. package/client/features/drawings/annotation-availability.ts +10 -0
  31. package/client/features/drawings/capture-element.ts +45 -0
  32. package/client/features/drawings/useChatAnnotation.ts +222 -0
  33. package/client/features/drawings/useDrawingLayer.ts +758 -0
  34. package/client/features/drawings/useViewBuilderSketch.ts +151 -0
  35. package/client/features/home/workspace-presentation.tsx +6 -2
  36. package/client/features/home/workspace-setup/WorkspaceAgentStep.tsx +12 -6
  37. package/client/features/scratchpad/ScratchpadControls.tsx +19 -5
  38. package/client/features/views/ViewBuilder.tsx +224 -0
  39. package/client/features/views/api.ts +1 -0
  40. package/client/features/views/useViewBuilderActions.ts +24 -3
  41. package/client/features/views/useViewBuilderDrafts.ts +66 -0
  42. package/client/features/widgets/Widgets.tsx +23 -39
  43. package/client/features/workspace/CustomizePanel.tsx +1 -1
  44. package/client/features/workspace/WorkspaceScreen.tsx +157 -57
  45. package/client/features/workspace/WorkspaceTabs.tsx +3 -3
  46. package/client/features/workspace/useFitsSplitLayout.ts +14 -8
  47. package/client/index.css +8 -0
  48. package/client/store/ui.ts +19 -0
  49. package/client/theme.css +33 -8
  50. package/dist/chunk-3becmq75.js +81 -0
  51. package/dist/{chunk-kkj86722.js → chunk-6w6j9g4b.js} +78 -78
  52. package/dist/{chunk-xeyxk7ep.js → chunk-8ew39cvq.js} +4 -4
  53. package/dist/chunk-c8gtrjwp.js +1 -0
  54. package/dist/{chunk-2vaafjp4.js → chunk-pp62fnxh.js} +1 -1
  55. package/dist/{chunk-35fq49qa.js → chunk-sxc24vfp.js} +1 -1
  56. package/dist/{chunk-3b3rkjet.js → chunk-v964b5g7.js} +1 -1
  57. package/dist/chunk-zx33ts9d.css +1 -0
  58. package/dist/hermes-pznd63x9.png +0 -0
  59. package/dist/index.html +1 -1
  60. package/lib/format.ts +1 -1
  61. package/lib/themes.ts +8 -8
  62. package/lib/types.ts +8 -1
  63. package/lib/workspace-types.ts +2 -1
  64. package/package.json +2 -1
  65. package/server/api.ts +21 -2
  66. package/server/cli.ts +188 -3
  67. package/server/harness/README.md +64 -17
  68. package/server/harness/acp/adapter.ts +220 -0
  69. package/server/harness/acp/archived.ts +88 -0
  70. package/server/harness/acp/client.ts +328 -0
  71. package/server/harness/acp/discovery.ts +130 -0
  72. package/server/harness/acp/run-durations.ts +68 -0
  73. package/server/harness/acp/session.ts +788 -0
  74. package/server/harness/acp/wire.ts +132 -0
  75. package/server/harness/executable.ts +15 -1
  76. package/server/harness/hermes/NOTES.md +815 -0
  77. package/server/harness/hermes/discovery.ts +155 -0
  78. package/server/harness/hermes/index.ts +155 -0
  79. package/server/harness/hermes/models.ts +79 -0
  80. package/server/harness/registry.ts +3 -1
  81. package/server/view-builders.ts +4 -2
  82. package/server/workspace-import.ts +30 -1
  83. package/client/features/chat/tool-group/format.ts +0 -384
  84. package/client/features/views/ViewBuilderTab.tsx +0 -152
  85. package/dist/chunk-gt7n06ef.js +0 -1
  86. package/dist/chunk-ty1sqbmn.js +0 -80
  87. package/dist/chunk-yz6wd5vc.css +0 -1
package/dist/index.html CHANGED
@@ -21,7 +21,7 @@
21
21
  }
22
22
  </script>
23
23
 
24
- <link rel="stylesheet" crossorigin href="/chunk-yz6wd5vc.css"><script type="module" crossorigin src="/chunk-3b3rkjet.js"></script></head>
24
+ <link rel="stylesheet" crossorigin href="/chunk-zx33ts9d.css"><script type="module" crossorigin src="/chunk-v964b5g7.js"></script></head>
25
25
  <body>
26
26
  <div id="root"></div>
27
27
 
package/lib/format.ts CHANGED
@@ -36,7 +36,7 @@ export type ToolCall = {
36
36
  // for the same canonical action (`read` vs `Read`, `exec` vs `Bash`).
37
37
  // Adapters are responsible for setting it; UI defaults to a generic
38
38
  // rendering when absent.
39
- provider?: 'claude-code' | 'openclaw' | 'codex'
39
+ provider?: 'claude-code' | 'openclaw' | 'codex' | 'hermes'
40
40
  mcpServer?: string
41
41
  state: ToolState
42
42
  input: unknown
package/lib/themes.ts CHANGED
@@ -104,24 +104,24 @@ const THEME_COLOR_DERIVATIONS = {
104
104
  workspace: {
105
105
  primary: primary => primary,
106
106
  primaryForeground: primary => foregroundForPrimary(primary),
107
- background: () => 'color-mix(var(--primary) 3%, oklch(1 0 0) 97%)',
107
+ background: () => 'color-mix(in oklch, var(--primary) 3%, oklch(1 0 0) 97%)',
108
108
  foreground: () => 'color-mix(var(--primary) 20%, oklch(0 0 0) 80%)',
109
- muted: () => 'color-mix(var(--background) 96%, var(--foreground) 4%)',
109
+ muted: () => 'color-mix(in oklch, var(--background) 97%, var(--foreground) 3%)',
110
110
  mutedForeground: () => 'color-mix(var(--background) 50%, var(--foreground) 50%)',
111
- accent: () => 'color-mix(var(--primary) 4%, var(--foreground) 4%)',
111
+ accent: () => 'color-mix(in oklch, var(--primary) 4%, var(--foreground) 4%)',
112
112
  accentForeground: () => 'var(--foreground)',
113
- border: () => 'color-mix(var(--foreground) 7%, transparent)'
113
+ border: () => 'color-mix(in oklch, var(--foreground) 7%, transparent)'
114
114
  },
115
115
  widget: {
116
116
  background: primary => primary,
117
117
  foreground: primary => foregroundForPrimary(primary),
118
- primary: () => 'color-mix(var(--background) 3%, oklch(1 0 0) 97%)',
118
+ primary: () => 'color-mix(in oklch, var(--background) 3%, oklch(1 0 0) 97%)',
119
119
  primaryForeground: () => 'color-mix(var(--background) 20%, oklch(0 0 0) 80%)',
120
- muted: () => 'color-mix(var(--background) 97%, var(--foreground) 3%)',
120
+ muted: () => 'color-mix(in oklch, var(--background) 97%, var(--foreground) 3%)',
121
121
  mutedForeground: () => 'color-mix(var(--background) 50%, var(--foreground) 50%)',
122
- accent: () => 'color-mix(var(--primary) 4%, var(--foreground) 4%)',
122
+ accent: () => 'color-mix(in oklch, var(--primary) 4%, var(--foreground) 4%)',
123
123
  accentForeground: () => 'var(--foreground)',
124
- border: () => 'color-mix(var(--foreground) 15%, transparent)'
124
+ border: () => 'color-mix(in oklch, var(--foreground) 15%, transparent)'
125
125
  }
126
126
  } satisfies Record<ThemeColorMode, Record<string, (primary: string) => string>>
127
127
 
package/lib/types.ts CHANGED
@@ -381,7 +381,7 @@ export type WorkspaceSwitchMessage = {
381
381
  workspaceId: string
382
382
  }
383
383
 
384
- export type WorkspaceType = 'claude-code' | 'openclaw' | 'codex'
384
+ export type WorkspaceType = 'claude-code' | 'openclaw' | 'codex' | 'hermes'
385
385
 
386
386
  export type WorkspaceSkillStatus = {
387
387
  name: string
@@ -626,6 +626,13 @@ export type Model = {
626
626
  displayName: string
627
627
  // " · "-joined blurb (Claude): "<headline> · <tagline> · …". Absent for OpenClaw.
628
628
  description?: string
629
+ // Heading this model sits under in the picker (Hermes: the upstream provider,
630
+ // e.g. 'Ollama'). Absent when the backend serves one flat catalog.
631
+ group?: string
632
+ // Machine id of that group (Hermes: 'ollama-launch' for the 'Ollama' heading).
633
+ // Unlike `group`, the backend does not reword it — use it as the key whenever
634
+ // a provider needs pinning, ordering or storing.
635
+ providerId?: string
629
636
  // Effort/reasoning support (Claude). `supportedEffortLevels` can include values
630
637
  // the SDK under-types (e.g. 'xhigh'), so it stays string[].
631
638
  supportsEffort?: boolean
@@ -3,7 +3,8 @@ import type { WorkspaceType } from './types'
3
3
  export const WORKSPACE_TYPE_ORDER = [
4
4
  'claude-code',
5
5
  'codex',
6
- 'openclaw'
6
+ 'openclaw',
7
+ 'hermes'
7
8
  ] as const satisfies readonly WorkspaceType[]
8
9
 
9
10
  export function orderWorkspaceTypes(types: Iterable<WorkspaceType>): WorkspaceType[] {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "moi-computer",
3
- "version": "0.9.0",
3
+ "version": "0.9.1-next.0",
4
4
  "description": "Local AI workspace powered by the Claude Agent SDK, Bun, React, and Tailwind. Requires Bun.",
5
5
  "license": "Elastic-2.0",
6
6
  "type": "module",
@@ -106,6 +106,7 @@
106
106
  "openclaw": "2026.7.1"
107
107
  },
108
108
  "devDependencies": {
109
+ "@agentclientprotocol/sdk": "^1.3.0",
109
110
  "@babel/types": "^7.29.8",
110
111
  "@types/bun": "latest",
111
112
  "@types/culori": "^4.0.1",
package/server/api.ts CHANGED
@@ -250,6 +250,7 @@ one.post('/view-builders/:builderId/submit', async c => {
250
250
  fastMode?: boolean
251
251
  stream?: boolean
252
252
  availableIcons?: unknown
253
+ attachments?: unknown
253
254
  }>()
254
255
  if (typeof body?.input?.requirements !== 'string') {
255
256
  return c.text('Expected { input: { requirements: string } }', 400)
@@ -259,6 +260,17 @@ one.post('/view-builders/:builderId/submit', async c => {
259
260
  }
260
261
  const availableIcons = parseAvailableViewIcons(body.availableIcons)
261
262
  if (!availableIcons) return c.text('Available view icons are required', 400)
263
+ const attachments = body.attachments ?? []
264
+ if (
265
+ !Array.isArray(attachments) ||
266
+ attachments.length > 1 ||
267
+ !attachments.every(id => typeof id === 'string' && /^[a-f0-9]{64}$/.test(id))
268
+ ) {
269
+ return c.text('Invalid sketch attachment', 400)
270
+ }
271
+ if (attachments.some(id => getUpload(ws.id, id)?.kind !== 'image')) {
272
+ return c.text('Sketch attachment not found or expired', 400)
273
+ }
262
274
  const availability = await workspaceTypeAvailability(ws.type ?? 'claude-code')
263
275
  if (!availability.available) return c.text(availability.reason, 400)
264
276
  try {
@@ -266,14 +278,20 @@ one.post('/view-builders/:builderId/submit', async c => {
266
278
  ws.id,
267
279
  ws.path,
268
280
  c.req.param('builderId'),
269
- body.input.requirements
281
+ body.input.requirements,
282
+ attachments.length > 0
270
283
  )
271
284
  // The bootstrap instructions ride the moi-context envelope, injected by
272
285
  // the harness like any other ambient context; the user text stays bare.
273
286
  // The user submits from the builder's own tab, so that's the active tab.
274
287
  const context: MoiContext = {
275
288
  activeTab: `view-builder:${builder.id}`,
276
- directives: viewBuilderDirectives(builder.id, availableIcons)
289
+ directives: [
290
+ ...viewBuilderDirectives(builder.id, availableIcons),
291
+ ...(attachments.length > 0
292
+ ? ["The attached image is the user's sketch of the intended view layout."]
293
+ : [])
294
+ ]
277
295
  }
278
296
  try {
279
297
  publishSelectedSession(ws.id, await saveSelectedSession(ws.path, builder.sessionId))
@@ -283,6 +301,7 @@ one.post('/view-builders/:builderId/submit', async c => {
283
301
  sessionId: builder.sessionId,
284
302
  isNew: true,
285
303
  content: builder.input.requirements,
304
+ attachments,
286
305
  context,
287
306
  optimisticId: body.optimisticId,
288
307
  model: typeof body.model === 'string' ? body.model : undefined,
package/server/cli.ts CHANGED
@@ -39,9 +39,14 @@ import {
39
39
  renderEnvView,
40
40
  resolveCwdWorkspace
41
41
  } from './cli-env'
42
- import { columns } from './cli-ui'
42
+ import { columns, keyValue } from './cli-ui'
43
43
  import { CONTROL_HOST, CONTROL_PORT, CONTROL_URL, PORT } from './constants'
44
44
  import { type ControlProbe, controlFailureMessage, probeControlServer } from './control-client'
45
+ import {
46
+ type HermesProfile,
47
+ discoverHermesProfiles,
48
+ matchHermesProfile
49
+ } from './harness/hermes/discovery'
45
50
  import { type OpenClawAgent, discoverOpenClawAgents } from './harness/openclaw/discovery'
46
51
  import { liftToWorkspaceRoot, registerWorkspace } from './registry'
47
52
  import { serverCwd } from './server-cwd'
@@ -1062,6 +1067,31 @@ const env = defineCommand({
1062
1067
  }
1063
1068
  })
1064
1069
 
1070
+ // ---- provider commands (openclaw / hermes) ----------------------------------
1071
+
1072
+ // `moi <provider>` on its own lists the commands AND what they can be run
1073
+ // against, so discovering the installable agents never requires `init`.
1074
+ function printProviderCommands(provider: string, argHint: string) {
1075
+ console.log('\n' + pc.bold(' Commands'))
1076
+ console.log(
1077
+ keyValue(
1078
+ [
1079
+ [
1080
+ pc.bold(`moi ${provider} init`) + ' ' + pc.dim(argHint),
1081
+ 'Install moi skills and register the workspace'
1082
+ ]
1083
+ ],
1084
+ ' '
1085
+ )
1086
+ )
1087
+ }
1088
+
1089
+ // The argument is optional when there is exactly one candidate, so the hint
1090
+ // should not demand one that isn't needed.
1091
+ function initHint(provider: string, count: number, label: string): string {
1092
+ return count === 1 ? `moi ${provider} init` : `moi ${provider} init <${label}>`
1093
+ }
1094
+
1065
1095
  // ---- openclaw subcommands ---------------------------------------------------
1066
1096
 
1067
1097
  // Match an `agent` argument against `agentId` (exact) or `name`
@@ -1114,7 +1144,9 @@ const openclawInit = defineCommand({
1114
1144
  process.exit(1)
1115
1145
  }
1116
1146
 
1117
- if (!args.agent) {
1147
+ // No argument: with a single agent there is nothing to choose, so install
1148
+ // into it. Only an ambiguous choice needs the list.
1149
+ if (!args.agent && agents.length > 1) {
1118
1150
  console.log('\n' + pc.bold('OpenClaw agents'))
1119
1151
  console.log(
1120
1152
  pc.dim(' Run ' + pc.bold('moi openclaw init <agentId>') + ' to install skills.\n')
@@ -1124,7 +1156,7 @@ const openclawInit = defineCommand({
1124
1156
  process.exit(0)
1125
1157
  }
1126
1158
 
1127
- const target = findAgent(agents, args.agent)
1159
+ const target = args.agent ? findAgent(agents, args.agent) : agents[0]
1128
1160
  if (!target) {
1129
1161
  console.error('\n' + pc.red('✗') + ' Agent not found: ' + pc.bold(args.agent) + '\n')
1130
1162
  console.log(' Available:\n')
@@ -1188,9 +1220,161 @@ const openclawInit = defineCommand({
1188
1220
 
1189
1221
  const openclaw = defineCommand({
1190
1222
  meta: { name: 'openclaw', description: 'OpenClaw integration commands' },
1223
+ async run({ rawArgs }) {
1224
+ // citty runs the parent even after dispatching a subcommand — the bare
1225
+ // form is the only one this handles.
1226
+ if (rawArgs.some(arg => !arg.startsWith('-'))) return
1227
+ console.log('\n' + pc.bold('OpenClaw'))
1228
+ printProviderCommands('openclaw', '[agent]')
1229
+ const agents = await discoverOpenClawAgents().catch(() => [])
1230
+ if (agents.length === 0) {
1231
+ console.log(
1232
+ '\n ' +
1233
+ pc.dim('No agents discovered — start the OpenClaw gateway and check ') +
1234
+ pc.dim('~/.openclaw/openclaw.json') +
1235
+ '\n'
1236
+ )
1237
+ return
1238
+ }
1239
+ console.log('\n' + pc.bold(' Agents'))
1240
+ printAgentTable(agents)
1241
+ console.log(pc.dim('\n Run ') + pc.bold(initHint('openclaw', agents.length, 'agentId')) + '\n')
1242
+ },
1191
1243
  subCommands: { init: openclawInit }
1192
1244
  })
1193
1245
 
1246
+ // ---- hermes subcommands -----------------------------------------------------
1247
+
1248
+ function printProfileTable(profiles: HermesProfile[]) {
1249
+ console.log(
1250
+ columns(
1251
+ ['', 'profile', 'model', 'workspace'].map(h => pc.dim(h)),
1252
+ profiles.map(p => [
1253
+ p.isDefault ? pc.green('●') : ' ',
1254
+ p.isDefault ? pc.bold(p.agentId) : p.agentId,
1255
+ p.model ?? pc.dim('—'),
1256
+ pc.dim(p.path)
1257
+ ])
1258
+ )
1259
+ )
1260
+ }
1261
+
1262
+ const hermesInit = defineCommand({
1263
+ meta: {
1264
+ name: 'init',
1265
+ description:
1266
+ 'Install moi skills into a Hermes profile workspace. Run without args to list discovered profiles.'
1267
+ },
1268
+ args: {
1269
+ profile: {
1270
+ type: 'positional',
1271
+ required: false,
1272
+ description: 'Profile id or description (omit to list profiles)'
1273
+ }
1274
+ },
1275
+ async run({ args }) {
1276
+ const profiles = await discoverHermesProfiles()
1277
+ if (profiles.length === 0) {
1278
+ console.error(
1279
+ '\n' +
1280
+ pc.red('✗') +
1281
+ ' No Hermes profiles discovered.\n' +
1282
+ pc.dim(' Install Hermes and run ' + pc.bold('hermes setup') + ' first.\n')
1283
+ )
1284
+ process.exit(1)
1285
+ }
1286
+
1287
+ // No argument: with a single profile there is nothing to choose, so
1288
+ // install into it. Only an ambiguous choice needs the list.
1289
+ if (!args.profile && profiles.length > 1) {
1290
+ console.log('\n' + pc.bold('Hermes profiles'))
1291
+ console.log(pc.dim(' Run ' + pc.bold('moi hermes init <profile>') + ' to install skills.\n'))
1292
+ printProfileTable(profiles)
1293
+ console.log()
1294
+ process.exit(0)
1295
+ }
1296
+
1297
+ const target = args.profile ? matchHermesProfile(profiles, args.profile) : profiles[0]
1298
+ if (!target) {
1299
+ console.error('\n' + pc.red('✗') + ' Profile not found: ' + pc.bold(args.profile) + '\n')
1300
+ console.log(' Available:\n')
1301
+ printProfileTable(profiles)
1302
+ console.log()
1303
+ process.exit(1)
1304
+ }
1305
+
1306
+ // Shared provisioning path with `moi init`: skills land in
1307
+ // <profile>/workspace/skills/<name>/ (Hermes resolves the workspace skills
1308
+ // dir with the highest precedence, so these win over bundled ones), plus
1309
+ // the `.moi/` bootstrap. The default profile has no workspace directory
1310
+ // until now — provisionWorkspace creates it.
1311
+ const { scaffold, skillsDir: skillsRoot } = await provisionWorkspace(target.path, 'hermes')
1312
+ if (scaffold !== 'exists') {
1313
+ if (scaffold === 'installing') {
1314
+ console.log('\n' + pc.dim(' Widget dependencies still installing in .moi/ (background)'))
1315
+ } else if (scaffold === 0) {
1316
+ console.log('\n' + pc.dim(' Installed widget dependencies in .moi/'))
1317
+ } else {
1318
+ console.warn('\n' + pc.yellow(' bun install failed — run it manually in .moi/'))
1319
+ }
1320
+ }
1321
+
1322
+ const entry = await registerWorkspace(target.path, {
1323
+ type: 'hermes',
1324
+ name: target.name,
1325
+ agentId: target.agentId,
1326
+ isDefault: target.isDefault
1327
+ })
1328
+
1329
+ console.log('\n' + pc.green('✓') + ' Installed skills to ' + pc.bold(skillsRoot))
1330
+ console.log(
1331
+ pc.dim(' Profile: ') +
1332
+ pc.bold(target.agentId) +
1333
+ (target.model ? pc.dim(' (' + target.model + ')') : '')
1334
+ )
1335
+ const isInteractive = process.stdout.isTTY
1336
+ const running = await isServerRunning()
1337
+ if (running) {
1338
+ const url = `http://localhost:${PORT}/workspace/${entry.id}`
1339
+ await registerViaControl(target.path)
1340
+ if (isInteractive) {
1341
+ console.log(' Opening ' + pc.bold(url) + '\n')
1342
+ await openBrowser(url)
1343
+ } else {
1344
+ console.log(' Ready at ' + pc.bold(url) + '\n')
1345
+ }
1346
+ } else {
1347
+ console.log(' Run ' + pc.bold('moi start') + ' to open in the browser\n')
1348
+ }
1349
+ process.exit(0)
1350
+ }
1351
+ })
1352
+
1353
+ const hermes = defineCommand({
1354
+ meta: { name: 'hermes', description: 'Hermes Agent integration commands' },
1355
+ async run({ rawArgs }) {
1356
+ // citty runs the parent even after dispatching a subcommand — the bare
1357
+ // form is the only one this handles.
1358
+ if (rawArgs.some(arg => !arg.startsWith('-'))) return
1359
+ console.log('\n' + pc.bold('Hermes'))
1360
+ printProviderCommands('hermes', '[profile]')
1361
+ const profiles = await discoverHermesProfiles().catch(() => [])
1362
+ if (profiles.length === 0) {
1363
+ console.log(
1364
+ '\n ' +
1365
+ pc.dim('No profiles discovered — install Hermes and run ') +
1366
+ pc.dim('hermes setup') +
1367
+ '\n'
1368
+ )
1369
+ return
1370
+ }
1371
+ console.log('\n' + pc.bold(' Profiles'))
1372
+ printProfileTable(profiles)
1373
+ console.log(pc.dim('\n Run ') + pc.bold(initHint('hermes', profiles.length, 'profile')) + '\n')
1374
+ },
1375
+ subCommands: { init: hermesInit }
1376
+ })
1377
+
1194
1378
  async function sendConfig(payload: {
1195
1379
  path: string
1196
1380
  name?: string
@@ -2641,6 +2825,7 @@ const systemCommands = {
2641
2825
  service,
2642
2826
  update,
2643
2827
  openclaw,
2828
+ hermes,
2644
2829
  version
2645
2830
  }
2646
2831
 
@@ -97,6 +97,36 @@ Current harnesses:
97
97
  | Claude Code (Agent SDK) | `claude-code/session.ts` | `claude-code/adapter.ts` | shipped, primary |
98
98
  | OpenClaw (gateway) | `openclaw/session.ts` | `openclaw/adapter.ts` | shipped, experimental |
99
99
  | Codex (app-server) | `codex/session.ts` | `codex/adapter.ts` | shipped, experimental |
100
+ | Hermes (ACP) | `acp/session.ts` | `acp/adapter.ts` | shipped, experimental |
101
+
102
+ `acp/` is the odd one out: it is **not** a harness, it is the shared
103
+ implementation of the Agent Client Protocol (stdio JSON-RPC), and `hermes/`
104
+ is the first provider built on it. Any other ACP-speaking agent (Gemini CLI,
105
+ opencode, Zed's agents) should become another thin folder next to `hermes/`
106
+ rather than a copy of the protocol. The split is:
107
+
108
+ ```
109
+ acp/ provider-agnostic protocol
110
+ wire.ts ACP message types (re-exported from the official SDK)
111
+ client.ts spawn + stdio JSON-RPC framing, one process per workspace
112
+ adapter.ts session/update → Turn/ToolCall (+ chunk accumulation)
113
+ session.ts per-session state machine, driven by AcpProviderConfig
114
+ discovery.ts session/list, model catalog, home-card preview
115
+ hermes/ provider specifics only
116
+ discovery.ts profile discovery (the importable "agents")
117
+ index.ts the Harness object + AcpProviderConfig
118
+ NOTES.md protocol research + backend quirks
119
+ ```
120
+
121
+ A new ACP provider supplies an `AcpProviderConfig`: an id, the spawn spec
122
+ (binary + args), the no-prompt mode id, and whether images ride inline.
123
+
124
+ `wire.ts` re-exports the schema-generated types from
125
+ `@agentclientprotocol/sdk` — a **types-only, dev-only** dependency, since
126
+ importing values from it would pull zod in at runtime. It adds one labelled
127
+ "pre-1.0 additions" block for the model-selection surface the spec dropped and
128
+ Hermes still implements; delete that block when agents move to
129
+ `session/set_config_option`. See `hermes/NOTES.md` §12.
100
130
 
101
131
  Dev tooling: `/dev/harness` (live wire log + client frames + trigger
102
132
  scenarios for any workspace, backed by `GET /api/workspaces/:id/harness/debug`
@@ -134,6 +164,23 @@ replayed against the real session code by `openclaw/wire-replay.test.ts`. Known
134
164
  `sessions.send`), and the gateway is the sole source of truth (no local
135
165
  persistence; cold restarts re-seed).
136
166
 
167
+ **Hermes — shipped, experimental.** Chat over `hermes acp` (stdio JSON-RPC,
168
+ one process per workspace so `workspaceEnv` injects at spawn — `acp/client.ts`),
169
+ built on the provider-agnostic `acp/` layer. Session create/resume with temp-id
170
+ rename, `session/load` history replay, interrupt via `session/cancel`, per-turn
171
+ token usage, token streaming for thinking _and_ text, inline base64 images,
172
+ per-chat model switching from the catalog `session/new` returns inline, and
173
+ backend-generated session titles surfaced through `sessions_changed`. Agents are
174
+ Hermes **profiles** — discovered from `$HERMES_HOME`, imported with
175
+ `moi hermes init <profile>`, never created from the UI (OpenClaw's model).
176
+ Sessions run in Hermes's `dont_ask` mode to match moi's bypass-permissions trust
177
+ model. Known gaps: no mid-turn steering (moi queues instead), no subagent lanes,
178
+ no reasoning-effort control, and `session/set_model` drops session-scoped MCP
179
+ servers upstream. Two backend quirks are worked around in `acp/session.ts`:
180
+ tool calls left unsettled at turn end are closed (Hermes never completes file
181
+ read/write calls live), and a completing `tool_call_update` carries no title, so
182
+ the established name is kept. See `hermes/NOTES.md`.
183
+
137
184
  **Codex — shipped, experimental.** Chat over `codex app-server` (stdio
138
185
  JSON-RPC, one process per workspace so `workspaceEnv` injects at spawn —
139
186
  `codex/client.ts`): thread create/resume with temp-id rename, per-turn model +
@@ -248,23 +295,23 @@ doubles as the evaluation rubric for new harnesses.
248
295
 
249
296
  Legend: ✅ supported · ⚠️ partial/workaround · ❌ missing.
250
297
 
251
- | Feature | Claude Agent SDK | OpenClaw gateway | Codex app-server |
252
- | ------------------------ | --------------------------------------------------- | ------------------------- | ------------------------------------- |
253
- | Long-lived session | ✅ subprocess per session | ✅ gateway-side | ✅ server-side, N threads/process |
254
- | Queue/steer mid-turn | ⚠️ queued next turn | ⚠️ | ✅ `turn/steer` into live turn |
255
- | Resume | ✅ | ✅ | ✅ + fork |
256
- | Interrupt | ✅ `interrupt()` | ✅ | ✅ `turn/interrupt` |
257
- | List models | ✅ `supportedModels()` | ✅ `models.list` | ✅ `model/list` |
258
- | Live model switch | ✅ `setModel()` | ✅ `sessions.patch` | ✅ per-turn override |
259
- | Live effort switch | ❌ rebuild | ✅ `thinkingLevel` patch | ✅ per-turn |
260
- | Token deltas | ✅ opt-in | ✅ `chat` frames | ✅ `item/*/delta` |
261
- | Images in input | ✅ base64 blocks | ⚠️ materialize to path | ✅ data URL or path |
262
- | Interactive approvals | ⚠️ (we bypass) | ✅ | ✅ server→client requests (we bypass) |
263
- | Session list/history API | ✅ `listSessions()` + jsonl | ✅ `sessions.get` | ✅ `thread/list`/`read` |
264
- | Home card preview | ✅ session file scan | ✅ cached first message | ⚠️ live app-server only |
265
- | MCP status | ✅ `mcpServerStatus()` | n/a | ✅ `mcpServerStatus/list` |
266
- | Usage reporting | ⚠️ cost/duration on `result` (adapter drops tokens) | ✅ tokens + cost per turn | ✅ live + rate limits |
267
- | Structured output | ❌ | ❌ | ✅ per turn |
298
+ | Feature | Claude Agent SDK | OpenClaw gateway | Codex app-server | Hermes (ACP) |
299
+ | ------------------------ | --------------------------------------------------- | ------------------------- | ------------------------------------- | ------------------------------------ |
300
+ | Long-lived session | ✅ subprocess per session | ✅ gateway-side | ✅ server-side, N threads/process | ✅ process per workspace, N sessions |
301
+ | Queue/steer mid-turn | ⚠️ queued next turn | ⚠️ | ✅ `turn/steer` into live turn | ⚠️ queued (ACP has no steer) |
302
+ | Resume | ✅ | ✅ | ✅ + fork | ✅ `session/load` (+ fork) |
303
+ | Interrupt | ✅ `interrupt()` | ✅ | ✅ `turn/interrupt` | ✅ `session/cancel` → `cancelled` |
304
+ | List models | ✅ `supportedModels()` | ✅ `models.list` | ✅ `model/list` | ✅ inline on `session/new` |
305
+ | Live model switch | ✅ `setModel()` | ✅ `sessions.patch` | ✅ per-turn override | ⚠️ drops session MCP servers |
306
+ | Live effort switch | ❌ rebuild | ✅ `thinkingLevel` patch | ✅ per-turn | ❌ no effort concept in ACP |
307
+ | Token deltas | ✅ opt-in | ✅ `chat` frames | ✅ `item/*/delta` | ✅ always on, thinking + text |
308
+ | Images in input | ✅ base64 blocks | ⚠️ materialize to path | ✅ data URL or path | ✅ base64 blocks |
309
+ | Interactive approvals | ⚠️ (we bypass) | ✅ | ✅ server→client requests (we bypass) | ✅ real, with diffs (we bypass) |
310
+ | Session list/history API | ✅ `listSessions()` + jsonl | ✅ `sessions.get` | ✅ `thread/list`/`read` | ✅ `session/list` (cwd + cursor) |
311
+ | Home card preview | ✅ session file scan | ✅ cached first message | ⚠️ live app-server only | ⚠️ live process only |
312
+ | MCP status | ✅ `mcpServerStatus()` | n/a | ✅ `mcpServerStatus/list` | ⚠️ per-session config, no status RPC |
313
+ | Usage reporting | ⚠️ cost/duration on `result` (adapter drops tokens) | ✅ tokens + cost per turn | ✅ live + rate limits | ✅ tokens per turn |
314
+ | Structured output | ❌ | ❌ | ✅ per turn | ❌ |
268
315
 
269
316
  ## Design lessons so far
270
317