@sorbetai/acp 0.1.0-alpha.7 → 0.1.0-alpha.9

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 (82) hide show
  1. package/COMPATIBILITY.md +48 -44
  2. package/README.md +45 -8
  3. package/agent.json +1 -1
  4. package/dist/W3CTraceContextPropagator-CYvR_PEk.js +1843 -0
  5. package/dist/W3CTraceContextPropagator-CYvR_PEk.js.map +1 -0
  6. package/dist/{agent-Hg6W1x79.js → agent-Bs84eg_g.js} +184 -32
  7. package/dist/agent-Bs84eg_g.js.map +1 -0
  8. package/dist/{agent-C4eZ3fM5.d.ts → agent-KSnP8v2b.d.ts} +3 -3
  9. package/dist/{authentication-DqnfuE1j.js → authentication-7awbNfzM.js} +36 -16
  10. package/dist/authentication-7awbNfzM.js.map +1 -0
  11. package/dist/{compatibility-Ct84-yRf.d.ts → compatibility-BPwcjEUV.d.ts} +23 -7
  12. package/dist/{compatibility-B8zJ4Hvy.js → compatibility-BqOhyCUP.js} +23 -7
  13. package/dist/compatibility-BqOhyCUP.js.map +1 -0
  14. package/dist/compatibility.d.ts +1 -1
  15. package/dist/compatibility.js +1 -1
  16. package/dist/{credentials-Bx8QHoD8.d.ts → credentials-BGUQSiGW.d.ts} +663 -744
  17. package/dist/{environment-7S0-Wqln.js → environment-BePz_waz.js} +1 -1
  18. package/dist/{environment-7S0-Wqln.js.map → environment-BePz_waz.js.map} +1 -1
  19. package/dist/{experimental-v2-BNgyrD04.js → experimental-v2-CyhruLgy.js} +95 -24
  20. package/dist/experimental-v2-CyhruLgy.js.map +1 -0
  21. package/dist/{experimental-v2-CRebIPzb.d.ts → experimental-v2-DInv67sS.d.ts} +5 -5
  22. package/dist/experimental-v2.d.ts +4 -4
  23. package/dist/experimental-v2.js +6 -6
  24. package/dist/extensions-91p5K6rB.js +22 -0
  25. package/dist/extensions-91p5K6rB.js.map +1 -0
  26. package/dist/extensions-br2BE0bG.d.ts +90 -0
  27. package/dist/extensions.d.ts +2 -2
  28. package/dist/extensions.js +2 -2
  29. package/dist/filesystem-worker.js +1474 -1530
  30. package/dist/filesystem-worker.js.map +1 -1
  31. package/dist/{index-B1Rr3ylL.d.ts → index-BOkVkd2m.d.ts} +7 -7
  32. package/dist/index.d.ts +5 -5
  33. package/dist/index.js +8 -8
  34. package/dist/isolate-worker.mjs +1883 -1900
  35. package/dist/managed-worker.js +2 -2
  36. package/dist/{mcp-host-profile-DwqBWLFr.js → mcp-host-profile-aRxoHzko.js} +24 -21
  37. package/dist/mcp-host-profile-aRxoHzko.js.map +1 -0
  38. package/dist/mcp-host.d.ts +1 -1
  39. package/dist/mcp-host.js +1 -1
  40. package/dist/otlp-DFJoZXtn.js +4290 -0
  41. package/dist/otlp-DFJoZXtn.js.map +1 -0
  42. package/dist/process-worker.js +1 -1
  43. package/dist/{prompt-work-CuU_ae0j.js → prompt-work-Bf2rt1f_.js} +2465 -1512
  44. package/dist/prompt-work-Bf2rt1f_.js.map +1 -0
  45. package/dist/{stdio-kKREJ6jP.js → stdio-BuZXlxA2.js} +3 -3
  46. package/dist/{stdio-kKREJ6jP.js.map → stdio-BuZXlxA2.js.map} +1 -1
  47. package/dist/{stdio-cli-main-LPIpwqu4.js → stdio-cli-main-Bu_9UK9F.js} +132 -177
  48. package/dist/stdio-cli-main-Bu_9UK9F.js.map +1 -0
  49. package/dist/stdio-cli.js +1 -1
  50. package/dist/stdio.d.ts +5 -5
  51. package/dist/stdio.js +8 -8
  52. package/dist/{supervised-command-bugWwh_y-CN8RpnOM.js → supervised-command-bugWwh_y-CZrLe3ON.js} +1 -1
  53. package/dist/{supervised-command-bugWwh_y-CN8RpnOM.js.map → supervised-command-bugWwh_y-CZrLe3ON.js.map} +1 -1
  54. package/package.json +38 -37
  55. package/dist/agent-Hg6W1x79.js.map +0 -1
  56. package/dist/authentication-DqnfuE1j.js.map +0 -1
  57. package/dist/compatibility-B8zJ4Hvy.js.map +0 -1
  58. package/dist/esm-ADdBCfsU.js +0 -1762
  59. package/dist/esm-ADdBCfsU.js.map +0 -1
  60. package/dist/execAsync-BvmYsUWQ.js +0 -14
  61. package/dist/execAsync-BvmYsUWQ.js.map +0 -1
  62. package/dist/experimental-v2-BNgyrD04.js.map +0 -1
  63. package/dist/extensions-8WYNyhPy.d.ts +0 -47
  64. package/dist/extensions-Eaix9kSN.js +0 -17
  65. package/dist/extensions-Eaix9kSN.js.map +0 -1
  66. package/dist/getMachineId-bsd-DMi4LSrq.js +0 -30
  67. package/dist/getMachineId-bsd-DMi4LSrq.js.map +0 -1
  68. package/dist/getMachineId-darwin-D4kzFBWw.js +0 -27
  69. package/dist/getMachineId-darwin-D4kzFBWw.js.map +0 -1
  70. package/dist/getMachineId-linux-BaClIYJg.js +0 -23
  71. package/dist/getMachineId-linux-BaClIYJg.js.map +0 -1
  72. package/dist/getMachineId-unsupported-BTb7CCyX.js +0 -18
  73. package/dist/getMachineId-unsupported-BTb7CCyX.js.map +0 -1
  74. package/dist/getMachineId-win-S5PVECTO.js +0 -29
  75. package/dist/getMachineId-win-S5PVECTO.js.map +0 -1
  76. package/dist/mcp-host-profile-DwqBWLFr.js.map +0 -1
  77. package/dist/otlp-DkgxJDmt.js +0 -12259
  78. package/dist/otlp-DkgxJDmt.js.map +0 -1
  79. package/dist/prompt-work-CuU_ae0j.js.map +0 -1
  80. package/dist/src-BS-YX8_H.js +0 -4753
  81. package/dist/src-BS-YX8_H.js.map +0 -1
  82. package/dist/stdio-cli-main-LPIpwqu4.js.map +0 -1
package/COMPATIBILITY.md CHANGED
@@ -35,7 +35,7 @@ supported behavior is connected and operational.
35
35
  | Shared protocol methods | 1 | 0 | 0 | 1 |
36
36
  | Lody extension capabilities | 8 | 0 | 3 | 11 |
37
37
  | Lody custom methods | 8 | 0 | 2 | 10 |
38
- | Sorbet extensions | 9 | 0 | 1 | 10 |
38
+ | Sorbet extensions | 13 | 0 | 1 | 14 |
39
39
 
40
40
  ## Status definitions
41
41
 
@@ -52,9 +52,9 @@ supported behavior is connected and operational.
52
52
  | `initialize` | ✅ Supported | Negotiates ACP v1, Client capabilities, Sorbet extensions, and advertised features. |
53
53
  | `authenticate` | ✅ Supported | Dispatches only authentication methods supplied by the injected authentication port. |
54
54
  | `logout` | ✅ Supported | Uses the injected authentication port or logs out NodeAgent provider credentials. |
55
- | `providers/list` | ✅ Supported | Lists stable Pi Provider slots with non-secret process-local endpoint state. |
56
- | `providers/set` | ✅ Supported | Fully replaces a known Provider endpoint without persisting headers or routing state. |
57
- | `providers/disable` | ✅ Supported | Disables a Provider endpoint while preserving its stable discoverable definition. |
55
+ | `providers/list` | ✅ Supported | Lists stable Pi Provider slots with non-secret endpoint state that survives a restart. |
56
+ | `providers/set` | ✅ Supported | Fully replaces a known Provider endpoint; the protocol and base URL persist while request headers stay in the process. |
57
+ | `providers/disable` | ✅ Supported | Disables a Provider endpoint while preserving its stable discoverable definition, and forgets the stored endpoint. |
58
58
  | `session/new` | ✅ Supported | Creates a durable Sorbet Session with workspace, MCP, and model bindings. |
59
59
  | `session/load` | ✅ Supported | Reopens an unattached Session, resumes unparked interrupted Runs through NodeAgent, and replays durable conversation and Plan projections. Recovery never re-executes an Effect attempt. |
60
60
  | `session/list` | ✅ Supported | Provides cwd filtering and opaque cursor pagination. |
@@ -119,34 +119,34 @@ supported behavior is connected and operational.
119
119
 
120
120
  ## Experimental v2 Agent methods
121
121
 
122
- | Protocol item | Status | Notes |
123
- | --------------------------- | -------------- | ------------------------------------------------------------------------------------------------------ |
124
- | `initialize` | ✅ Supported | Negotiates ACP v2 and advertises only operational draft capabilities. |
125
- | `auth/login` | ✅ Supported | Dispatches only methods supplied by the injected authentication port. |
126
- | `auth/logout` | ✅ Supported | Uses the injected authentication port or NodeAgent provider logout. |
127
- | `providers/list` | ✅ Supported | Lists stable Pi Provider slots with non-secret process-local endpoint state. |
128
- | `providers/set` | ✅ Supported | Fully replaces a known Provider endpoint without persisting headers or routing state. |
129
- | `providers/disable` | ✅ Supported | Disables a Provider endpoint while preserving its stable discoverable definition. |
130
- | `session/new` | ✅ Supported | Creates a durable Session with stdio, HTTP, or ACP-relayed MCP Tools. |
131
- | `session/list` | ✅ Supported | Provides cwd filtering and opaque cursor pagination. |
132
- | `session/delete` | ✅ Supported | Closes connection state and idempotently deletes the Session. |
133
- | `session/fork` | ✅ Supported | Creates an independent durable Session from a committed conversation boundary. |
134
- | `session/resume` | ⚠️ Partial | Unattached Session resume, replay-from-start, and MCP work; draft update-ID replay does not. |
135
- | `session/close` | ✅ Supported | Aborts active work and releases connection-scoped Session resources. |
136
- | `session/set_config_option` | ✅ Supported | Applies advertised model, thinking-level, and permission selectors and publishes updated option state. |
137
- | `session/prompt` | ✅ Supported | Acknowledges before execution, reviews Plan proposals, and completes through background state updates. |
138
- | `session/cancel` | ✅ Supported | Aborts the active Sorbet Run and propagates cancellation to Pi. |
139
- | `mcp/message` | ✅ Supported | Routes MCP server requests and notifications over active ACP relay connections. |
140
- | `nes/start` | ❌ Unsupported | No Next Edit Suggestions engine is connected or advertised. |
141
- | `nes/suggest` | ❌ Unsupported | No Next Edit Suggestions engine is connected or advertised. |
142
- | `nes/accept` | ❌ Unsupported | No Next Edit Suggestions engine is connected or advertised. |
143
- | `nes/reject` | ❌ Unsupported | No Next Edit Suggestions engine is connected or advertised. |
144
- | `nes/close` | ❌ Unsupported | No Next Edit Suggestions engine is connected or advertised. |
145
- | `document/didOpen` | ❌ Unsupported | No editor document-state port is connected or advertised. |
146
- | `document/didChange` | ❌ Unsupported | No editor document-state port is connected or advertised. |
147
- | `document/didClose` | ❌ Unsupported | No editor document-state port is connected or advertised. |
148
- | `document/didSave` | ❌ Unsupported | No editor document-state port is connected or advertised. |
149
- | `document/didFocus` | ❌ Unsupported | No editor document-state port is connected or advertised. |
122
+ | Protocol item | Status | Notes |
123
+ | --------------------------- | -------------- | ---------------------------------------------------------------------------------------------------------------------- |
124
+ | `initialize` | ✅ Supported | Negotiates ACP v2 and advertises only operational draft capabilities. |
125
+ | `auth/login` | ✅ Supported | Dispatches only methods supplied by the injected authentication port. |
126
+ | `auth/logout` | ✅ Supported | Uses the injected authentication port or NodeAgent provider logout. |
127
+ | `providers/list` | ✅ Supported | Lists stable Pi Provider slots with non-secret endpoint state that survives a restart. |
128
+ | `providers/set` | ✅ Supported | Fully replaces a known Provider endpoint; the protocol and base URL persist while request headers stay in the process. |
129
+ | `providers/disable` | ✅ Supported | Disables a Provider endpoint while preserving its stable discoverable definition, and forgets the stored endpoint. |
130
+ | `session/new` | ✅ Supported | Creates a durable Session with stdio, HTTP, or ACP-relayed MCP Tools. |
131
+ | `session/list` | ✅ Supported | Provides cwd filtering and opaque cursor pagination. |
132
+ | `session/delete` | ✅ Supported | Closes connection state and idempotently deletes the Session. |
133
+ | `session/fork` | ✅ Supported | Creates an independent durable Session from a committed conversation boundary. |
134
+ | `session/resume` | ⚠️ Partial | Unattached Session resume, replay-from-start, and MCP work; draft update-ID replay does not. |
135
+ | `session/close` | ✅ Supported | Aborts active work and releases connection-scoped Session resources. |
136
+ | `session/set_config_option` | ✅ Supported | Applies advertised model, thinking-level, and permission selectors and publishes updated option state. |
137
+ | `session/prompt` | ✅ Supported | Acknowledges before execution, reviews Plan proposals, and completes through background state updates. |
138
+ | `session/cancel` | ✅ Supported | Aborts the active Sorbet Run and propagates cancellation to Pi. |
139
+ | `mcp/message` | ✅ Supported | Routes MCP server requests and notifications over active ACP relay connections. |
140
+ | `nes/start` | ❌ Unsupported | No Next Edit Suggestions engine is connected or advertised. |
141
+ | `nes/suggest` | ❌ Unsupported | No Next Edit Suggestions engine is connected or advertised. |
142
+ | `nes/accept` | ❌ Unsupported | No Next Edit Suggestions engine is connected or advertised. |
143
+ | `nes/reject` | ❌ Unsupported | No Next Edit Suggestions engine is connected or advertised. |
144
+ | `nes/close` | ❌ Unsupported | No Next Edit Suggestions engine is connected or advertised. |
145
+ | `document/didOpen` | ❌ Unsupported | No editor document-state port is connected or advertised. |
146
+ | `document/didChange` | ❌ Unsupported | No editor document-state port is connected or advertised. |
147
+ | `document/didClose` | ❌ Unsupported | No editor document-state port is connected or advertised. |
148
+ | `document/didSave` | ❌ Unsupported | No editor document-state port is connected or advertised. |
149
+ | `document/didFocus` | ❌ Unsupported | No editor document-state port is connected or advertised. |
150
150
 
151
151
  ## Experimental v2 Client methods
152
152
 
@@ -223,15 +223,19 @@ supported behavior is connected and operational.
223
223
 
224
224
  ## Sorbet extensions
225
225
 
226
- | Protocol item | Status | Notes |
227
- | --------------------------------- | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
228
- | `_sorbet/auth/credentials/list` | ✅ Supported | Lists non-secret stored credential metadata when the authentication port provides credential management. |
229
- | `_sorbet/auth/credentials/logout` | ✅ Supported | Logs out one Provider through the authentication port credential management capability. |
230
- | `_session/steering` | ✅ Supported | Stable v1 injects steering into an active Run or starts a new turn. |
231
- | `_sorbet/session/run/get` | ✅ Supported | Stable v1 returns the durable Sorbet Run snapshot. |
232
- | `_sorbet/session/replay` | ✅ Supported | Stable v1 returns cursor-based Journal fact summaries. |
233
- | `_sorbet/plugins/query` | ✅ Supported | Negotiated v1/v2 transport reads the attached Session’s Host-bound, filtered composition facade. |
234
- | `_sorbet/plugins/apply` | ✅ Supported | Submits patches to the Host-bound facade; the transport cannot supply authorization. Desired concurrency and durable command identity apply. |
235
- | `_sorbet/plugins/watch` | ✅ Supported | Starts or stops one coalesced snapshot subscription per attached Session; cleanup follows the connection. |
236
- | `_sorbet/plugins/changed` | ✅ Supported | Publishes initial and changed composition snapshots, including Service-driven Mount changes without a Desired edit. |
237
- | `_sorbet/session/activity` | ❌ Unsupported | The name is reserved, but no activity notification is emitted yet. |
226
+ | Protocol item | Status | Notes |
227
+ | --------------------------------- | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
228
+ | `_sorbet/auth/credentials/list` | ✅ Supported | Lists non-secret stored credential metadata when the authentication port provides credential management. |
229
+ | `_sorbet/auth/credentials/logout` | ✅ Supported | Logs out one Provider through the authentication port credential management capability. |
230
+ | `_sorbet/providers/custom/list` | ✅ Supported | Lists persisted custom Provider definitions without exposing credentials. |
231
+ | `_sorbet/providers/custom/create` | ✅ Supported | Creates a custom Provider endpoint; Sorbet assigns the ID and adds it to the live catalog. |
232
+ | `_sorbet/providers/custom/update` | ✅ Supported | Replaces one custom Provider definition in place, keeping its ID and stored credential. |
233
+ | `_sorbet/providers/custom/delete` | ✅ Supported | Removes a custom Provider with its stored credential and endpoint; a Session or the approval reviewer still referencing it rejects the request. |
234
+ | `_session/steering` | ✅ Supported | Stable v1 injects steering into an active Run or starts a new turn. |
235
+ | `_sorbet/session/run/get` | ✅ Supported | Stable v1 returns the durable Sorbet Run snapshot. |
236
+ | `_sorbet/session/replay` | ✅ Supported | Stable v1 returns cursor-based Journal fact summaries. |
237
+ | `_sorbet/plugins/query` | ✅ Supported | Negotiated v1/v2 transport reads the attached Session’s Host-bound, filtered composition facade. |
238
+ | `_sorbet/plugins/apply` | ✅ Supported | Submits patches to the Host-bound facade; the transport cannot supply authorization. Desired concurrency and durable command identity apply. |
239
+ | `_sorbet/plugins/watch` | ✅ Supported | Starts or stops one coalesced snapshot subscription per attached Session; cleanup follows the connection. |
240
+ | `_sorbet/plugins/changed` | ✅ Supported | Publishes initial and changed composition snapshots, including Service-driven Mount changes without a Desired edit. |
241
+ | `_sorbet/session/activity` | ❌ Unsupported | The name is reserved, but no activity notification is emitted yet. |
package/README.md CHANGED
@@ -251,7 +251,7 @@ Only the ACP tarball needs to be published. The stdio integration test extracts
251
251
  that tarball, supplies only its third-party runtime dependencies, and exercises
252
252
  the packaged CLI, sandboxed filesystem worker, and command execution.
253
253
  Use pnpm for packing and publishing so catalog dependency versions are resolved.
254
- The package requires Node.js 22.19.0 or later.
254
+ The package requires Node.js 22.22.0 or later.
255
255
 
256
256
  ## Lody Setup
257
257
 
@@ -271,13 +271,20 @@ may instead launch `node packages/acp/dist/stdio-cli.js`; production configs
271
271
  should use the PATH-resolved executable so they do not depend on a checkout's
272
272
  absolute path.
273
273
 
274
- Stable v1 advertises Provider OAuth methods when the Client supports both form and URL
275
- elicitation. Generic ACP does not expose API-key login; a Provider that only supports an
276
- API key must be configured by the embedding Host outside ACP. Lody selects a method and
277
- relays request-scoped URL, device-code, text, or select elicitations; secret and manual-code
278
- forms additionally require Lody's credential-safe form capability. Sorbet persists the result
279
- in its credential store; credentials are never returned in ACP capability data or Lody
280
- workspace configuration.
274
+ The CLI advertises one `authenticate` method per Provider and interactive mechanism:
275
+ `sorbet:<providerId>:oauth` for OAuth and `sorbet:<providerId>:api_key` for interactive
276
+ API keys. Both require form and URL elicitation and Lody's credential-safe form capability:
277
+ OAuth can request a secret manual code. Providers configured through the environment or an
278
+ endpoint override do not advertise an interactive method for that configuration. Sorbet stores
279
+ one credential per Provider, so authenticating a second mechanism replaces the first.
280
+
281
+ Lody relays request-scoped URL, device-code, text, and select elicitations. Secret and
282
+ manual-code forms carry `_meta.lody.elicitation.secret`. For remote agents, device-code
283
+ flows do not require a browser connection to the agent; when the Provider offers manual
284
+ callback input, the Client can return the redirected URL through the secret form. Loopback
285
+ callbacks require the browser to reach the agent's loopback interface. Declining a URL
286
+ presentation cancels the login. Sorbet persists credentials in its credential store and does
287
+ not return them in ACP capability data or Lody workspace configuration.
281
288
 
282
289
  Session create, load, resume, and fork responses publish each advertised
283
290
  model's model-dependent ACP config options under
@@ -479,6 +486,36 @@ supply `credentials` for the same authentication store to advertise the extensio
479
486
  methods return method-not-found. The ACP connection is trusted to manage these credentials;
480
487
  Hosts accepting untrusted Clients must enforce access at their transport boundary.
481
488
 
489
+ ## Custom Provider extension
490
+
491
+ ACP `providers/list|set|disable` select the endpoint of a Provider both sides already know.
492
+ A Provider whose identity, protocol, and model list come from the Client is a Sorbet
493
+ extension. ACP v1 and experimental v2 advertise `_meta["sorbet.dev"].customProviders:
494
+ { "version": 1 }`; Clients should check it before issuing these connection-level requests:
495
+
496
+ - `_sorbet/providers/custom/list` takes `{}` and returns `{ "providers": [...] }`.
497
+ - `_sorbet/providers/custom/create` takes `{ name, protocol, baseUrl, catalogRefs?, models }`
498
+ and returns `{ "provider": { "id": "..." } }`. Sorbet assigns the ID.
499
+ - `_sorbet/providers/custom/update` takes the same configuration plus `providerId` and
500
+ returns `{ "provider": ... }`. The ID and any stored credential stay.
501
+ - `_sorbet/providers/custom/delete` takes `{ "providerId": "..." }` and returns `{}`. It also
502
+ removes the stored credential and endpoint selection; a definition a Session or the
503
+ approval reviewer still references rejects the request.
504
+
505
+ `protocol` is `anthropic-messages`, `openai-responses`, or `openai-completions`. Each `models`
506
+ entry is `{ id, name?, reasoning?, thinkingLevelMap?, input?, contextWindow?, maxTokens? }`;
507
+ explicit fields take precedence over endpoint discovery and catalog metadata, and an omitted
508
+ field is inferred from that discovery. A rejected request — unknown Provider, conflicting
509
+ definition, Provider in use, or a configuration Sorbet cannot parse — is returned as an
510
+ invalid-params error instead of failing the Run.
511
+
512
+ Definitions are persisted in the Node Agent data directory, so a later process — including
513
+ one that never saw the request — offers the same Provider. `providers/set` persists the
514
+ protocol and base URL for the same reason; request headers carry credentials and are applied
515
+ in the current process only, so a Host that supplies headers must re-supply them after a
516
+ restart. Like the credential extension, this surface can point Sorbet at any endpoint, so a
517
+ Host exposing ACP to untrusted Clients must enforce access at its transport boundary.
518
+
482
519
  ## MCP Protocol Compatibility
483
520
 
484
521
  SDK embeddings and ACP Clients own MCP UI and credentials. Standard MCP form/URL
package/agent.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "sorbet",
3
3
  "name": "Sorbet",
4
- "version": "0.1.0-alpha.7",
4
+ "version": "0.1.0-alpha.9",
5
5
  "description": "A durable Agent Harness with Pi-backed model access and ACP v1 plus experimental ACP v2 support.",
6
6
  "repository": "https://github.com/lodyspeak/sorbet",
7
7
  "license": "MIT",