@intentic/sandbox-contract 1.408.1 → 1.410.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 (211) hide show
  1. package/dist/contracts/accounts.contract.d.ts +0 -16
  2. package/dist/contracts/accounts.contract.d.ts.map +1 -1
  3. package/dist/contracts/agent.contract.d.ts +54 -0
  4. package/dist/contracts/agent.contract.d.ts.map +1 -1
  5. package/dist/contracts/agents.contract.d.ts +12 -0
  6. package/dist/contracts/agents.contract.d.ts.map +1 -1
  7. package/dist/contracts/automations.contract.d.ts.map +1 -1
  8. package/dist/contracts/automations.contract.js +1 -0
  9. package/dist/contracts/automations.contract.js.map +1 -1
  10. package/dist/contracts/capabilities.contract.d.ts +504 -8
  11. package/dist/contracts/capabilities.contract.d.ts.map +1 -1
  12. package/dist/contracts/capabilities.contract.js +74 -1
  13. package/dist/contracts/capabilities.contract.js.map +1 -1
  14. package/dist/contracts/device.contract.d.ts +23 -0
  15. package/dist/contracts/device.contract.d.ts.map +1 -1
  16. package/dist/contracts/extensions.contract.d.ts +350 -4
  17. package/dist/contracts/extensions.contract.d.ts.map +1 -1
  18. package/dist/contracts/hub.contract.d.ts +121 -0
  19. package/dist/contracts/hub.contract.d.ts.map +1 -0
  20. package/dist/contracts/hub.contract.js +32 -0
  21. package/dist/contracts/hub.contract.js.map +1 -0
  22. package/dist/contracts/needs.contract.d.ts +9 -0
  23. package/dist/contracts/needs.contract.d.ts.map +1 -1
  24. package/dist/contracts/runner.contract.d.ts +288 -250
  25. package/dist/contracts/runner.contract.d.ts.map +1 -1
  26. package/dist/contracts/secrets.contract.d.ts +1 -73
  27. package/dist/contracts/secrets.contract.d.ts.map +1 -1
  28. package/dist/contracts/secrets.contract.js +4 -20
  29. package/dist/contracts/secrets.contract.js.map +1 -1
  30. package/dist/contracts/sessions.contract.d.ts +6 -0
  31. package/dist/contracts/sessions.contract.d.ts.map +1 -1
  32. package/dist/contracts/system.contract.d.ts +27 -0
  33. package/dist/contracts/system.contract.d.ts.map +1 -1
  34. package/dist/events/agent-events.d.ts +26 -0
  35. package/dist/events/agent-events.d.ts.map +1 -1
  36. package/dist/events/agent-events.js +3 -0
  37. package/dist/events/agent-events.js.map +1 -1
  38. package/dist/events/agent-transcript.d.ts +6 -0
  39. package/dist/events/agent-transcript.d.ts.map +1 -1
  40. package/dist/events/prompt-origins.d.ts +54 -0
  41. package/dist/events/prompt-origins.d.ts.map +1 -0
  42. package/dist/events/prompt-origins.js +44 -0
  43. package/dist/events/prompt-origins.js.map +1 -0
  44. package/dist/events/transcript.d.ts +31 -45
  45. package/dist/events/transcript.d.ts.map +1 -1
  46. package/dist/events/transcript.js +3 -27
  47. package/dist/events/transcript.js.map +1 -1
  48. package/dist/index.d.ts +2 -2
  49. package/dist/index.d.ts.map +1 -1
  50. package/dist/index.js +2 -2
  51. package/dist/index.js.map +1 -1
  52. package/dist/netd/generated/wire.d.ts +4 -0
  53. package/dist/netd/generated/wire.d.ts.map +1 -1
  54. package/dist/oauth/google-workspace.d.ts +4 -0
  55. package/dist/oauth/google-workspace.d.ts.map +1 -0
  56. package/dist/oauth/google-workspace.js +6 -0
  57. package/dist/oauth/google-workspace.js.map +1 -0
  58. package/dist/policy/failure-codes.d.ts +4 -0
  59. package/dist/policy/failure-codes.d.ts.map +1 -1
  60. package/dist/policy/failure-codes.js +1 -0
  61. package/dist/policy/failure-codes.js.map +1 -1
  62. package/dist/policy/git/git-connections.d.ts +15 -0
  63. package/dist/policy/git/git-connections.d.ts.map +1 -0
  64. package/dist/policy/git/git-connections.js +34 -0
  65. package/dist/policy/git/git-connections.js.map +1 -0
  66. package/dist/policy/org-locks.d.ts +1 -1
  67. package/dist/policy/org-locks.d.ts.map +1 -1
  68. package/dist/policy/org-locks.js +1 -0
  69. package/dist/policy/org-locks.js.map +1 -1
  70. package/dist/protocol/doors/runner-wake.d.ts +46 -0
  71. package/dist/protocol/doors/runner-wake.d.ts.map +1 -0
  72. package/dist/protocol/doors/runner-wake.js +21 -0
  73. package/dist/protocol/doors/runner-wake.js.map +1 -0
  74. package/dist/protocol/raw/raw-json-routes.d.ts +135 -145
  75. package/dist/protocol/raw/raw-json-routes.d.ts.map +1 -1
  76. package/dist/protocol/raw/raw-json-routes.js +7 -7
  77. package/dist/protocol/raw/raw-json-routes.js.map +1 -1
  78. package/dist/protocol/raw/raw-routes.d.ts +19 -4
  79. package/dist/protocol/raw/raw-routes.d.ts.map +1 -1
  80. package/dist/protocol/raw/raw-routes.js +8 -4
  81. package/dist/protocol/raw/raw-routes.js.map +1 -1
  82. package/dist/schemas/capabilities.d.ts +8 -24
  83. package/dist/schemas/capabilities.d.ts.map +1 -1
  84. package/dist/schemas/capabilities.js +12 -43
  85. package/dist/schemas/capabilities.js.map +1 -1
  86. package/dist/schemas/certificate-request.d.ts +38 -0
  87. package/dist/schemas/certificate-request.d.ts.map +1 -0
  88. package/dist/schemas/certificate-request.js +18 -0
  89. package/dist/schemas/certificate-request.js.map +1 -0
  90. package/dist/schemas/connection-hub.d.ts +347 -0
  91. package/dist/schemas/connection-hub.d.ts.map +1 -0
  92. package/dist/schemas/connection-hub.js +118 -0
  93. package/dist/schemas/connection-hub.js.map +1 -0
  94. package/dist/schemas/device-move.d.ts +46 -0
  95. package/dist/schemas/device-move.d.ts.map +1 -0
  96. package/dist/schemas/device-move.js +34 -0
  97. package/dist/schemas/device-move.js.map +1 -0
  98. package/dist/schemas/device-sign-in.d.ts +25 -0
  99. package/dist/schemas/device-sign-in.d.ts.map +1 -0
  100. package/dist/schemas/device-sign-in.js +24 -0
  101. package/dist/schemas/device-sign-in.js.map +1 -0
  102. package/dist/schemas/devices.d.ts +50 -0
  103. package/dist/schemas/devices.d.ts.map +1 -1
  104. package/dist/schemas/devices.js +6 -0
  105. package/dist/schemas/devices.js.map +1 -1
  106. package/dist/schemas/diagnostics.d.ts +22 -1
  107. package/dist/schemas/diagnostics.d.ts.map +1 -1
  108. package/dist/schemas/diagnostics.js +13 -1
  109. package/dist/schemas/diagnostics.js.map +1 -1
  110. package/dist/schemas/extension-updates.d.ts +700 -8
  111. package/dist/schemas/extension-updates.d.ts.map +1 -1
  112. package/dist/schemas/git/remote-refs.d.ts +1 -0
  113. package/dist/schemas/git/remote-refs.d.ts.map +1 -1
  114. package/dist/schemas/git/remote-refs.js +5 -0
  115. package/dist/schemas/git/remote-refs.js.map +1 -1
  116. package/dist/schemas/git-installs.d.ts +20 -0
  117. package/dist/schemas/git-installs.d.ts.map +1 -0
  118. package/dist/schemas/git-installs.js +46 -0
  119. package/dist/schemas/git-installs.js.map +1 -0
  120. package/dist/schemas/hosts.d.ts +2 -0
  121. package/dist/schemas/hosts.d.ts.map +1 -1
  122. package/dist/schemas/hosts.js +2 -0
  123. package/dist/schemas/hosts.js.map +1 -1
  124. package/dist/schemas/links.d.ts +89 -21
  125. package/dist/schemas/links.d.ts.map +1 -1
  126. package/dist/schemas/links.js +73 -9
  127. package/dist/schemas/links.js.map +1 -1
  128. package/dist/schemas/mcp-sign-in.d.ts +46 -0
  129. package/dist/schemas/mcp-sign-in.d.ts.map +1 -0
  130. package/dist/schemas/mcp-sign-in.js +54 -0
  131. package/dist/schemas/mcp-sign-in.js.map +1 -0
  132. package/dist/schemas/needs.d.ts +8 -0
  133. package/dist/schemas/needs.d.ts.map +1 -1
  134. package/dist/schemas/needs.js +5 -1
  135. package/dist/schemas/needs.js.map +1 -1
  136. package/dist/schemas/providers/provider-oauth.d.ts +0 -16
  137. package/dist/schemas/providers/provider-oauth.d.ts.map +1 -1
  138. package/dist/schemas/providers/provider-oauth.js +0 -4
  139. package/dist/schemas/providers/provider-oauth.js.map +1 -1
  140. package/dist/schemas/sandbox-passwords.d.ts +0 -142
  141. package/dist/schemas/sandbox-passwords.d.ts.map +1 -1
  142. package/dist/schemas/sandbox-passwords.js +1 -33
  143. package/dist/schemas/sandbox-passwords.js.map +1 -1
  144. package/dist/schemas/system.d.ts +4 -0
  145. package/dist/schemas/system.d.ts.map +1 -1
  146. package/dist/schemas/system.js +4 -0
  147. package/dist/schemas/system.js.map +1 -1
  148. package/dist/state/auth-state.d.ts.map +1 -1
  149. package/dist/state/auth-state.js +1 -0
  150. package/dist/state/auth-state.js.map +1 -1
  151. package/dist/state/definition.d.ts +6 -8
  152. package/dist/state/definition.d.ts.map +1 -1
  153. package/dist/text/mentions.d.ts +5 -0
  154. package/dist/text/mentions.d.ts.map +1 -1
  155. package/dist/text/mentions.js +15 -3
  156. package/dist/text/mentions.js.map +1 -1
  157. package/dist/text/transcript-fold.d.ts.map +1 -1
  158. package/dist/text/transcript-fold.js +4 -8
  159. package/dist/text/transcript-fold.js.map +1 -1
  160. package/package.json +5 -5
  161. package/src/contracts/automations.contract.ts +3 -0
  162. package/src/contracts/capabilities.contract.ts +98 -0
  163. package/src/contracts/hub.contract.ts +39 -0
  164. package/src/contracts/secrets.contract.ts +5 -21
  165. package/src/events/agent-events.ts +5 -0
  166. package/src/events/prompt-origins.ts +65 -0
  167. package/src/events/transcript.ts +4 -40
  168. package/src/index.ts +3 -3
  169. package/src/netd/generated/netd-wire.json +24 -0
  170. package/src/netd/generated/wire.ts +8 -2
  171. package/src/oauth/google-workspace.ts +16 -0
  172. package/src/policy/failure-codes.ts +1 -0
  173. package/src/policy/git/git-connections.test.ts +46 -0
  174. package/src/policy/git/git-connections.ts +68 -0
  175. package/src/policy/org-locks.ts +1 -0
  176. package/src/policy/tests/failure-codes.test.ts +3 -1
  177. package/src/protocol/doors/runner-wake.ts +36 -0
  178. package/src/protocol/raw/raw-json-routes.ts +13 -10
  179. package/src/protocol/raw/raw-routes.ts +15 -7
  180. package/src/schemas/capabilities.ts +16 -64
  181. package/src/schemas/certificate-request.ts +28 -0
  182. package/src/schemas/connection-hub.test.ts +28 -0
  183. package/src/schemas/connection-hub.ts +191 -0
  184. package/src/schemas/device-move.ts +54 -0
  185. package/src/schemas/device-sign-in.ts +37 -0
  186. package/src/schemas/devices.ts +11 -0
  187. package/src/schemas/diagnostics.ts +19 -2
  188. package/src/schemas/git/remote-refs.ts +7 -0
  189. package/src/schemas/git-installs.ts +72 -0
  190. package/src/schemas/hosts.ts +4 -0
  191. package/src/schemas/links.ts +108 -14
  192. package/src/schemas/mcp-sign-in.ts +72 -0
  193. package/src/schemas/needs.ts +8 -1
  194. package/src/schemas/providers/provider-oauth.ts +0 -6
  195. package/src/schemas/sandbox-passwords.ts +5 -46
  196. package/src/schemas/system.ts +6 -0
  197. package/src/state/auth-state.ts +3 -0
  198. package/src/text/mentions.test.ts +16 -1
  199. package/src/text/mentions.ts +18 -4
  200. package/src/text/transcript-fold.test.ts +8 -0
  201. package/src/text/transcript-fold.ts +4 -8
  202. package/dist/contracts/sharing.contract.d.ts +0 -58
  203. package/dist/contracts/sharing.contract.d.ts.map +0 -1
  204. package/dist/contracts/sharing.contract.js +0 -41
  205. package/dist/contracts/sharing.contract.js.map +0 -1
  206. package/dist/schemas/providers/account-sharing.d.ts +0 -277
  207. package/dist/schemas/providers/account-sharing.d.ts.map +0 -1
  208. package/dist/schemas/providers/account-sharing.js +0 -68
  209. package/dist/schemas/providers/account-sharing.js.map +0 -1
  210. package/src/contracts/sharing.contract.ts +0 -54
  211. package/src/schemas/providers/account-sharing.ts +0 -123
@@ -26,7 +26,7 @@ import {
26
26
  SecretRevealSchema,
27
27
  SecretSetSchema,
28
28
  } from "../schemas/secrets.js";
29
- import { SandboxNeedsSchema, SandboxPasswordsActivitySchema, SandboxPasswordsSchema, SecretWantResultSchema, SecretWantSchema } from "../schemas/sandbox-passwords.js";
29
+ import { SandboxNeedsSchema, SecretWantResultSchema, SecretWantSchema } from "../schemas/sandbox-passwords.js";
30
30
  import { OkSchema } from "../schemas/shared.js";
31
31
 
32
32
  // Credentials are the operating tier's, reads included: maintainer is the highest revokable grant, and no token's.
@@ -224,31 +224,15 @@ export const secretsContract = {
224
224
  .meta({ agent: true })
225
225
  .input(SecretWantSchema)
226
226
  .output(SecretWantResultSchema),
227
- passwords: secretRoute
227
+ // The want's other half: what this sandbox asked for that still waits, drawn in the Secrets view's "Needs attention".
228
+ wants: secretRoute
228
229
  .route({
229
230
  method: "GET",
230
- path: "/secrets/passwords",
231
- summary: "The passwords this sandbox may use",
232
- description:
233
- "Every entry the keyrings on the owner's computers share with this sandbox, where each works and how this sandbox may use it, and each computer's Passwords state. Names and places only, never values.",
234
- })
235
- .output(SandboxPasswordsSchema),
236
- passwordNeeds: secretRoute
237
- .route({
238
- method: "GET",
239
- path: "/secrets/passwords/needs",
231
+ path: "/secrets/wants",
240
232
  summary: "Credentials this sandbox asked for that wait for an answer",
241
- description: "The needs this sandbox raised (`secrets want`) that the owner has not answered yet, and on which computer each waits.",
233
+ description: "The credentials this sandbox asked the owner's computers for (`secrets want`) that nobody has answered yet, and on which computer each waits. Names and places only, never a value.",
242
234
  })
243
235
  .output(SandboxNeedsSchema),
244
- passwordActivity: secretRoute
245
- .route({
246
- method: "GET",
247
- path: "/secrets/passwords/activity",
248
- summary: "This sandbox's uses of the owner's passwords",
249
- description: "Each time this sandbox used a password one of the owner's keyrings keeps, newest first, from its own use ledger. Never a value.",
250
- })
251
- .output(SandboxPasswordsActivitySchema),
252
236
  // The credential gateway's say over one connection: how its credential reaches the agent, and what it may do there.
253
237
  policy: secretRoute
254
238
  .route({
@@ -15,6 +15,7 @@ import { FreshStartSchema, HandedOffSchema, HandoffOfferSchema } from "../schema
15
15
  import { SwitchedSchema } from "../schemas/providers/switched.js";
16
16
  import { AgentCommandSchema, browserHelpRequest, capabilityOfferRequest, CapabilityOutcomeSchema, ContextUsageSchema, credentialOfferRequest, CredentialReceiptSchema, pageAskRequest, PageSchema, paymentOfferRequest, PaymentReceiptSchema, PermissionRequestSchema, PlanRequestSchema, QuestionRequestSchema, terminalHelpRequest, TodoItemSchema, ToolCallContentSchema, ToolCallLocationSchema, ToolCallStatusSchema, ToolKindSchema } from "./requests.js";
17
17
  import { TranscriptPatchSchema, TranscriptRowSchema, TurnNoteSchema } from "./transcript.js";
18
+ import { TranscriptEditorContextSchema } from "./prompt-origins.js";
18
19
  import { ReviewFindingsSchema } from "./review.js";
19
20
  import { agentNoticeEvent, agentStatusEvent } from "./agent-ui.js";
20
21
 
@@ -77,6 +78,8 @@ export const AgentErrorCodeSchema = z.enum([
77
78
  "tools-unenforced",
78
79
  // The protected execution-domain policy is unsupported or unreadable; refused before any model/helper ran.
79
80
  "agent-domain-refused",
81
+ // (2026-11-11) This copy of the sandbox is on standby: another machine runs it, and no turn starts here.
82
+ "standby",
80
83
  // The privacy shield found personal data in instructions the runtime loads itself, past every channel it
81
84
  // could mask (Cursor's project rules, AGENTS.md), refused before sending; the words wait for the owner to
82
85
  // let the provider read this conversation, trust it, or take the data out of those files.
@@ -174,6 +177,8 @@ export const AgentEventSchema = z.discriminatedUnion("kind", [
174
177
  text: z.string(),
175
178
  sentAt: z.number(),
176
179
  attachments: z.array(z.string()).optional(),
180
+ // The file (and lines) the person was looking at, stamped on the row it becomes (TranscriptRow.editorContext).
181
+ editorContext: TranscriptEditorContextSchema.optional(),
177
182
  voice: z.enum(["sandbox", "agent"]).optional(),
178
183
  // What a composed message is for, stamped on the row it becomes (TranscriptRow.errand).
179
184
  errand: TurnErrandSchema.optional(),
@@ -0,0 +1,65 @@
1
+ import { z } from "zod";
2
+
3
+ // What reached a conversation as a prompt, and what came with one, as its user row carries it: a watch, a need or another
4
+ // agent that woke it, and the file a person was looking at when they wrote it. Re-exported by transcript.ts.
5
+
6
+ // Every ending that wakes a conversation off a condition watch; composing and parsing the wake is watch-wake.ts.
7
+ export const WatchOutcomeSchema = z.enum(["met", "timeout", "restart-expired", "broken"]);
8
+ export type WatchOutcome = z.infer<typeof WatchOutcomeSchema>;
9
+
10
+ // A condition watch waking the conversation, as the row carries it. The wake arrives as an ordinary turn prompt that
11
+ // nobody typed, so the row keeps that prompt verbatim rather than a summary of it.
12
+ export const TranscriptWatchWakeSchema = z.object({
13
+ outcome: WatchOutcomeSchema.describe("How the watch ended: the condition held, the deadline passed, or a restart cut it short."),
14
+ note: z.string().describe("The agent's own line on what it was waiting for."),
15
+ elapsed: z
16
+ .string()
17
+ .describe("How long the watch stood, already worded ('43m'): carried rather than recomputed, since the arming instant is not on the row."),
18
+ sent: z.string().describe("The whole prompt the model was woken with, disclosed under the row."),
19
+ });
20
+ export type TranscriptWatchWake = z.infer<typeof TranscriptWatchWakeSchema>;
21
+
22
+ // A need's answer that reached this conversation as a prompt (need-wake.ts); the row keeps the prompt and names the need.
23
+ export const TranscriptNeedWakeSchema = z.object({
24
+ outcome: z.enum(["met", "declined"]).describe("How the need ended: a person gave it, or said no."),
25
+ title: z.string().describe("The need, as its card leads with it."),
26
+ id: z.string().describe("The need's handle, which its live card is keyed by."),
27
+ sent: z.string().describe("The whole prompt the model received, disclosed under the row."),
28
+ });
29
+ export type TranscriptNeedWake = z.infer<typeof TranscriptNeedWakeSchema>;
30
+
31
+ // Another agent's words that reached this conversation as a prompt; the row keeps the prompt and names the sender.
32
+ export const TranscriptAgentWordsSchema = z.object({
33
+ kind: z.enum(["peer", "child"]).describe("Who sent it: another conversation in the workspace, or a subagent this one started."),
34
+ from: z.string().describe("The sending conversation's id."),
35
+ title: z.string().optional().describe("The sender's title, when it had one."),
36
+ failed: z.boolean().optional().describe("A child's report on a turn that failed rather than finished."),
37
+ machine: z.string().optional().describe("The runner a child's turn ran on; absent for a child that ran in this sandbox."),
38
+ review: z
39
+ .enum(["review", "test"])
40
+ .optional()
41
+ .describe("A child's report from a code review or test pass a person opened on this conversation's work, not a subagent it spawned."),
42
+ sent: z.string().describe("The whole prompt the model received, disclosed under the row."),
43
+ });
44
+ export type TranscriptAgentWords = z.infer<typeof TranscriptAgentWordsSchema>;
45
+
46
+ // What a user row says the person was looking at when they sent it (the composer's "Viewing" chip): the file and the
47
+ // selected lines, never the selected text, which rode that one prompt and is not worth keeping on every copy of the row.
48
+ export const TranscriptEditorContextSchema = z.object({
49
+ file: z.string().describe("The file open in the editor, as a workspace path."),
50
+ startLine: z.number().int().min(1).optional().describe("First selected line, counting from one."),
51
+ endLine: z.number().int().min(1).optional().describe("Last selected line, counting from one."),
52
+ });
53
+ export type TranscriptEditorContext = z.infer<typeof TranscriptEditorContextSchema>;
54
+
55
+ // The pointer a sent editor context leaves on its row: its file and lines, the selection's text dropped.
56
+ export const editorContextPointer = (context: TranscriptEditorContext): TranscriptEditorContext => {
57
+ const pointer: TranscriptEditorContext = { file: context.file };
58
+ if (context.startLine !== undefined) {
59
+ pointer.startLine = context.startLine;
60
+ }
61
+ if (context.endLine !== undefined) {
62
+ pointer.endLine = context.endLine;
63
+ }
64
+ return pointer;
65
+ };
@@ -8,6 +8,7 @@ import { HeldEndingSchema, MemoryKillMarkSchema, RetryLadderSchema } from "../sc
8
8
  import { HandoffOfferSchema } from "../schemas/providers/handoff.js";
9
9
  import { NoticeCodeSchema } from "./sandbox-notice.js";
10
10
  import { TranscriptAgentNoticeSchema } from "./agent-ui.js";
11
+ import { TranscriptAgentWordsSchema, TranscriptEditorContextSchema, TranscriptNeedWakeSchema, TranscriptWatchWakeSchema } from "./prompt-origins.js";
11
12
  import { ReviewFindingsSchema } from "./review.js";
12
13
  import type { ToolCallContent, ToolCallLocation, ToolCallStatus, ToolKind } from "./requests.js";
13
14
  import {
@@ -31,6 +32,7 @@ import {
31
32
  ToolCallStatusSchema,
32
33
  ToolKindSchema,
33
34
  } from "./requests.js";
35
+ export * from "./prompt-origins.js";
34
36
 
35
37
  // A conversation as recorded and replayed: the rows, the cards they carry, and the patches that change them while a
36
38
  // turn runs. One shape for the live row and the recorded one, since they're the same row.
@@ -216,46 +218,6 @@ export interface TranscriptTool {
216
218
  exitCode?: number | undefined;
217
219
  }
218
220
 
219
- // Every ending that wakes a conversation off a condition watch; composing and parsing the wake is watch-wake.ts.
220
- export const WatchOutcomeSchema = z.enum(["met", "timeout", "restart-expired", "broken"]);
221
- export type WatchOutcome = z.infer<typeof WatchOutcomeSchema>;
222
-
223
- // A condition watch waking the conversation, as the row carries it. The wake arrives as an ordinary turn prompt that
224
- // nobody typed, so the row keeps that prompt verbatim rather than a summary of it.
225
- export const TranscriptWatchWakeSchema = z.object({
226
- outcome: WatchOutcomeSchema.describe("How the watch ended: the condition held, the deadline passed, or a restart cut it short."),
227
- note: z.string().describe("The agent's own line on what it was waiting for."),
228
- elapsed: z
229
- .string()
230
- .describe("How long the watch stood, already worded ('43m'): carried rather than recomputed, since the arming instant is not on the row."),
231
- sent: z.string().describe("The whole prompt the model was woken with, disclosed under the row."),
232
- });
233
- export type TranscriptWatchWake = z.infer<typeof TranscriptWatchWakeSchema>;
234
-
235
- // A need's answer that reached this conversation as a prompt (need-wake.ts); the row keeps the prompt and names the need.
236
- export const TranscriptNeedWakeSchema = z.object({
237
- outcome: z.enum(["met", "declined"]).describe("How the need ended: a person gave it, or said no."),
238
- title: z.string().describe("The need, as its card leads with it."),
239
- id: z.string().describe("The need's handle, which its live card is keyed by."),
240
- sent: z.string().describe("The whole prompt the model received, disclosed under the row."),
241
- });
242
- export type TranscriptNeedWake = z.infer<typeof TranscriptNeedWakeSchema>;
243
-
244
- // Another agent's words that reached this conversation as a prompt; the row keeps the prompt and names the sender.
245
- export const TranscriptAgentWordsSchema = z.object({
246
- kind: z.enum(["peer", "child"]).describe("Who sent it: another conversation in the workspace, or a subagent this one started."),
247
- from: z.string().describe("The sending conversation's id."),
248
- title: z.string().optional().describe("The sender's title, when it had one."),
249
- failed: z.boolean().optional().describe("A child's report on a turn that failed rather than finished."),
250
- machine: z.string().optional().describe("The runner a child's turn ran on; absent for a child that ran in this sandbox."),
251
- review: z
252
- .enum(["review", "test"])
253
- .optional()
254
- .describe("A child's report from a code review or test pass a person opened on this conversation's work, not a subagent it spawned."),
255
- sent: z.string().describe("The whole prompt the model received, disclosed under the row."),
256
- });
257
- export type TranscriptAgentWords = z.infer<typeof TranscriptAgentWordsSchema>;
258
-
259
221
  // A command the agent left running past its own call; how it is doing now is live state on the card (AgentSummary.jobs).
260
222
  export const TranscriptBackgroundJobSchema = z.object({
261
223
  id: z.string().describe("The daemon's handle for the job, which its live state on the conversation's card is keyed by."),
@@ -333,6 +295,8 @@ export const TranscriptRowSchema = z.object({
333
295
  ),
334
296
  // Uploaded files only (user rows); a path already @-mentioned inline is not drawn again as a chip.
335
297
  attachments: z.array(z.string()).optional().describe("Files attached to this message, as workspace paths."),
298
+ // The composer's "Viewing" chip as it went; the selected text itself rode the prompt only.
299
+ editorContext: TranscriptEditorContextSchema.optional().describe("The file, and lines if any, the person had open in the editor and sent along."),
336
300
  // Never stored: looked up each read from the daemon's rewind points, matching what's still there.
337
301
  checkpointId: z
338
302
  .string()
package/src/index.ts CHANGED
@@ -22,6 +22,7 @@ import { exitContract } from "./contracts/exit.contract.js";
22
22
  import { extensionsContract } from "./contracts/extensions.contract.js";
23
23
  import { gitContract } from "./contracts/git.contract.js";
24
24
  import { historyContract } from "./contracts/history.contract.js";
25
+ import { hubContract } from "./contracts/hub.contract.js";
25
26
  import { intenticContract } from "./contracts/intentic.contract.js";
26
27
  import { inventoryContract } from "./contracts/inventory.contract.js";
27
28
  import { issuesContract } from "./contracts/issues.contract.js";
@@ -47,7 +48,6 @@ import { sessionsContract } from "./contracts/sessions.contract.js";
47
48
  import { settingsContract } from "./contracts/settings.contract.js";
48
49
  import { sealContract } from "./contracts/seal.contract.js";
49
50
  import { shareContract } from "./contracts/share.contract.js";
50
- import { sharingContract } from "./contracts/sharing.contract.js";
51
51
  import { skillsContract } from "./contracts/skills.contract.js";
52
52
  import { systemContract } from "./contracts/system.contract.js";
53
53
  import { translatorContract } from "./contracts/translator.contract.js";
@@ -81,6 +81,7 @@ export const sandboxContract: {
81
81
  extensions: typeof extensionsContract;
82
82
  git: typeof gitContract;
83
83
  history: typeof historyContract;
84
+ hub: typeof hubContract;
84
85
  intentic: typeof intenticContract;
85
86
  inventory: typeof inventoryContract;
86
87
  issues: typeof issuesContract;
@@ -106,7 +107,6 @@ export const sandboxContract: {
106
107
  settings: typeof settingsContract;
107
108
  seal: typeof sealContract;
108
109
  share: typeof shareContract;
109
- sharing: typeof sharingContract;
110
110
  skills: typeof skillsContract;
111
111
  system: typeof systemContract;
112
112
  translator: typeof translatorContract;
@@ -134,6 +134,7 @@ export const sandboxContract: {
134
134
  extensions: extensionsContract,
135
135
  git: gitContract,
136
136
  history: historyContract,
137
+ hub: hubContract,
137
138
  intentic: intenticContract,
138
139
  inventory: inventoryContract,
139
140
  issues: issuesContract,
@@ -159,7 +160,6 @@ export const sandboxContract: {
159
160
  settings: settingsContract,
160
161
  seal: sealContract,
161
162
  share: shareContract,
162
- sharing: sharingContract,
163
163
  skills: skillsContract,
164
164
  system: systemContract,
165
165
  translator: translatorContract,
@@ -552,6 +552,13 @@
552
552
  "const": "tunnel",
553
553
  "type": "string"
554
554
  },
555
+ "superseded": {
556
+ "description": "With no `tunnel`: this copy of the sandbox is on standby, and `superseded` names the host the platform holds to\nrun it (2026-11-11). netd dials nothing until Node sends a tunnel again, and tells Node `Superseded` rather than\na plain \"off\". A netd older than it reads the frame as a bare stand-down, which stops dialling all the same.",
557
+ "type": [
558
+ "string",
559
+ "null"
560
+ ]
561
+ },
555
562
  "tunnel": {
556
563
  "anyOf": [
557
564
  {
@@ -814,6 +821,23 @@
814
821
  "refusal"
815
822
  ],
816
823
  "type": "object"
824
+ },
825
+ {
826
+ "description": "Another copy of this sandbox, on `host`, is the one the platform holds to run it: Node put this copy on standby\nand told netd to stand down, and netd dials nothing until Node sends a tunnel again (2026-11-11). Rejected: the\n15-minute redial `Elsewhere` keeps, under which a standby copy would take the address back whenever the active\none dropped for a moment.",
827
+ "properties": {
828
+ "host": {
829
+ "type": "string"
830
+ },
831
+ "refusal": {
832
+ "const": "superseded",
833
+ "type": "string"
834
+ }
835
+ },
836
+ "required": [
837
+ "refusal",
838
+ "host"
839
+ ],
840
+ "type": "object"
817
841
  }
818
842
  ]
819
843
  }
@@ -16,7 +16,13 @@ export type Endpoint = { host: string, port: number, };
16
16
  /**
17
17
  * Everything Node sends netd.
18
18
  */
19
- export type FromNode = { "kind": "hello", build: string, pid: number, generation?: number, } | { "kind": "listen", config: ListenConfig, } | { "kind": "certificate", certificate?: Certificate, } | { "kind": "tunnel", tunnel?: TunnelConfig, } | { "kind": "ask", id: number, question: NetdQuestion, } | { "kind": "answer", id: number, answer: Answer, } | { "kind": "refused", id: number, message: string, } | { "kind": "revoke", member?: string, } | { "kind": "watch", checkout: WatchedCheckout, } | { "kind": "unwatch", dir: string, };
19
+ export type FromNode = { "kind": "hello", build: string, pid: number, generation?: number, } | { "kind": "listen", config: ListenConfig, } | { "kind": "certificate", certificate?: Certificate, } | { "kind": "tunnel", tunnel?: TunnelConfig,
20
+ /**
21
+ * With no `tunnel`: this copy of the sandbox is on standby, and `superseded` names the host the platform holds to
22
+ * run it (2026-11-11). netd dials nothing until Node sends a tunnel again, and tells Node `Superseded` rather than
23
+ * a plain "off". A netd older than it reads the frame as a bare stand-down, which stops dialling all the same.
24
+ */
25
+ superseded?: string, } | { "kind": "ask", id: number, question: NetdQuestion, } | { "kind": "answer", id: number, answer: Answer, } | { "kind": "refused", id: number, message: string, } | { "kind": "revoke", member?: string, } | { "kind": "watch", checkout: WatchedCheckout, } | { "kind": "unwatch", dir: string, };
20
26
 
21
27
  /**
22
28
  * Every port netd binds, as Node's config names them; an absent one is not bound.
@@ -119,7 +125,7 @@ export type TunnelConfig = { url: string, grant: string, bulk: Array<string>, };
119
125
  /**
120
126
  * Why netd stopped dialling the ingress at its usual pace, past an ordinary drop it redials at once.
121
127
  */
122
- export type TunnelRefusal = { "refusal": "elsewhere", host: string, } | { "refusal": "deleted" };
128
+ export type TunnelRefusal = { "refusal": "elsewhere", host: string, } | { "refusal": "deleted" } | { "refusal": "superseded", host: string, };
123
129
 
124
130
  /**
125
131
  * A local upstream a preview host relays to.
@@ -0,0 +1,16 @@
1
+ // What the Google Workspace card asks Google for, in one place for the three parties that ask: the platform's own OAuth
2
+ // client behind the card's Connect Google button, `gw auth login` on a client the owner brought, and a company
3
+ // service account's delegated token. Two lists, not one plus a check: Google enforces the scope set itself, while the
4
+ // `writes` flag on each `gw` command makes the refusal legible.
5
+
6
+ export type GoogleAccess = "read" | "write";
7
+
8
+ const BASE = "https://www.googleapis.com/auth/";
9
+
10
+ const WRITE = ["gmail.modify", "gmail.send", "calendar", "drive", "documents", "spreadsheets", "contacts"];
11
+ const READ = ["gmail.readonly", "calendar.readonly", "drive.readonly", "documents.readonly", "spreadsheets.readonly", "contacts.readonly"];
12
+
13
+ export const googleWorkspaceScopes = (access: GoogleAccess): string[] => (access === "read" ? READ : WRITE).map((scope) => `${BASE}${scope}`);
14
+
15
+ // Added to a sign-in so the token answer names the account it was made for, which fills the card's address.
16
+ export const GOOGLE_IDENTITY_SCOPES = ["openid", "email"] as const;
@@ -107,6 +107,7 @@ export const FAILURE_CODES = {
107
107
  "tools-unenforced": { kind: "held", course: "door" },
108
108
  // The protected execution boundary refused admission, not an executed provider/runtime failure.
109
109
  "agent-domain-refused": { kind: "held", course: "door" },
110
+ standby: { kind: "held", course: "door" },
110
111
  // The privacy shield found personal data in instructions a runtime loads itself, where it could not mask them.
111
112
  "privacy-instructions": { kind: "privacy", course: "door" },
112
113
  "context-overflow": { kind: "contextFull", course: "overflow" },
@@ -0,0 +1,46 @@
1
+ import { type GitConnectionCandidate, gitConnectionsFor, gitUrlHost } from "./git-connections.js";
2
+
3
+ const github = (id: string, git = "on"): GitConnectionCandidate => ({ id, kind: "cli", config: { provider: "github", git, hasSecret: true } });
4
+ const gitlab = (id: string, url: string): GitConnectionCandidate => ({ id, kind: "cli", config: { provider: "gitlab", url, git: "on" } });
5
+
6
+ describe("which connection reads a repository", () => {
7
+ it("matches GitHub cards to github.com and orders them by id, whatever order they were listed in", () => {
8
+ const found = gitConnectionsFor([github("github-zed"), github("github-ada"), gitlab("gitlab", "https://gitlab.com")], "https://github.com/o/r");
9
+ expect(found).toEqual([
10
+ { id: "github-ada", provider: "github", host: "github.com" },
11
+ { id: "github-zed", provider: "github", host: "github.com" },
12
+ ]);
13
+ });
14
+
15
+ it("matches a GitLab card to its own instance's host, port included", () => {
16
+ const cards = [gitlab("gitlab", "https://gitlab.com"), gitlab("work", "https://git.example.test:8443/")];
17
+ expect(gitConnectionsFor(cards, "https://git.example.test:8443/team/plugin.git")).toEqual([
18
+ { id: "work", provider: "gitlab", host: "git.example.test:8443" },
19
+ ]);
20
+ expect(gitConnectionsFor(cards, "https://git.example.test/team/plugin.git")).toEqual([]);
21
+ });
22
+
23
+ it("skips a card whose git access is off, a card of another provider, and any other kind", () => {
24
+ const cards: GitConnectionCandidate[] = [
25
+ github("github", "off"),
26
+ { id: "slack", kind: "cli", config: { provider: "slack" } },
27
+ { id: "custom", kind: "mcp", config: { url: "https://github.com/mcp" } },
28
+ ];
29
+ expect(gitConnectionsFor(cards, "https://github.com/o/r")).toEqual([]);
30
+ });
31
+
32
+ it("never lends a token over plain http, except to a GitLab instance the card itself names at http", () => {
33
+ const cards = [github("github"), gitlab("secure", "https://git.example.test"), gitlab("lan", "http://git.lan.test")];
34
+ expect(gitConnectionsFor(cards, "http://github.com/o/r")).toEqual([]);
35
+ expect(gitConnectionsFor(cards, "http://git.example.test/team/plugin.git")).toEqual([]);
36
+ expect(gitConnectionsFor(cards, "http://git.lan.test/team/plugin.git")).toEqual([{ id: "lan", provider: "gitlab", host: "git.lan.test" }]);
37
+ expect(gitConnectionsFor(cards, "https://git.lan.test/team/plugin.git")).toEqual([{ id: "lan", provider: "gitlab", host: "git.lan.test" }]);
38
+ });
39
+
40
+ it("reads only http(s) addresses: an ssh remote or a path has no host a token answers for", () => {
41
+ expect(gitUrlHost("git@github.com:o/r.git")).toBeUndefined();
42
+ expect(gitUrlHost("/srv/repos/plugin")).toBeUndefined();
43
+ expect(gitUrlHost(" HTTPS://GitHub.com/o/r ")).toBe("github.com");
44
+ expect(gitConnectionsFor([github("github")], "ssh://git@github.com/o/r.git")).toEqual([]);
45
+ });
46
+ });
@@ -0,0 +1,68 @@
1
+ // WHICH GITHUB OR GITLAB CONNECTION READS A REPOSITORY, when a plugin or an extension is installed from one without a
2
+ // token of its own. One rule for the install form, which says which connection it will use, and for the daemon, which
3
+ // clones with it: the two sides read the same list of connections, so they cannot name different ones.
4
+
5
+ // A connection as either side holds it: the daemon a `cli` entry's config, the editor the list's echo of it
6
+ // (CapabilitySummary). Only the non-secret fields are read (`provider`, a GitLab instance's `url`, the `git` switch),
7
+ // which both sides have.
8
+ export interface GitConnectionCandidate {
9
+ readonly id: string;
10
+ readonly kind: string;
11
+ readonly config: Readonly<Record<string, string | number | boolean>>;
12
+ }
13
+
14
+ export interface GitConnection {
15
+ readonly id: string;
16
+ readonly provider: "github" | "gitlab";
17
+ // The host its token is good for: github.com, or the GitLab instance's host (with a port, when it has one).
18
+ readonly host: string;
19
+ }
20
+
21
+ /** The provider's name as a person reads it. */
22
+ export const gitProviderName = (provider: GitConnection["provider"]): string => (provider === "github" ? "GitHub" : "GitLab");
23
+
24
+ /** The host a GitHub or GitLab card's token answers for, or undefined for any other card or an unreadable instance URL. */
25
+ export const gitConnectionOf = (candidate: GitConnectionCandidate): GitConnection | undefined => {
26
+ const { provider, url, git } = candidate.config;
27
+ // Git access switched off on the card is the owner saying its token is not for git.
28
+ if (candidate.kind !== "cli" || git === "off") {
29
+ return undefined;
30
+ }
31
+ if (provider === "github") {
32
+ return { id: candidate.id, provider, host: "github.com" };
33
+ }
34
+ if (provider !== "gitlab") {
35
+ return undefined;
36
+ }
37
+ const host = URL.parse(String(url ?? ""))?.host.toLowerCase() ?? "";
38
+ return host === "" ? undefined : { id: candidate.id, provider, host };
39
+ };
40
+
41
+ /** The repository's host, for an http(s) URL; undefined for anything git would reach another way (ssh, a path). */
42
+ export const gitUrlHost = (url: string): string | undefined => {
43
+ const parsed = URL.parse(url.trim());
44
+ return parsed === null || (parsed.protocol !== "https:" && parsed.protocol !== "http:") || parsed.host === "" ? undefined : parsed.host.toLowerCase();
45
+ };
46
+
47
+ // The scheme a card's token may travel over: https, or plain http only for a GitLab instance the owner set up at an
48
+ // http address themselves. An `http://github.com/…` typed on a plugin card must never carry the GitHub token in clear.
49
+ const lendsOver = (candidate: GitConnectionCandidate, connection: GitConnection, protocol: string): boolean =>
50
+ protocol === "https:" || (connection.provider === "gitlab" && URL.parse(String(candidate.config["url"] ?? ""))?.protocol === protocol);
51
+
52
+ /**
53
+ * The connections whose token is good for the repository's host, in the order the first of them is chosen: by id, so
54
+ * the pick never depends on which card was connected first or on the list's order.
55
+ */
56
+ export const gitConnectionsFor = (candidates: readonly GitConnectionCandidate[], url: string): readonly GitConnection[] => {
57
+ const host = gitUrlHost(url);
58
+ const protocol = URL.parse(url.trim())?.protocol;
59
+ if (host === undefined || protocol === undefined) {
60
+ return [];
61
+ }
62
+ return candidates
63
+ .flatMap((candidate) => {
64
+ const connection = gitConnectionOf(candidate);
65
+ return connection !== undefined && connection.host === host && lendsOver(candidate, connection, protocol) ? [connection] : [];
66
+ })
67
+ .toSorted((left, right) => (left.id < right.id ? -1 : left.id > right.id ? 1 : 0));
68
+ };
@@ -58,6 +58,7 @@ export const ORG_SECTION_ROUTES = {
58
58
  "capabilities.rename",
59
59
  "capabilities.setSecret",
60
60
  "capabilities.sshKey",
61
+ "capabilities.certificateRequest",
61
62
  "capabilities.login",
62
63
  ],
63
64
  reveals: ["secrets.reveal"],
@@ -13,7 +13,7 @@ test("every code the wire names has a row, and the table names no code the wire
13
13
  });
14
14
 
15
15
  // The door course names the codes refused before the model saw a word.
16
- test("the codes turned away at the door are exactly the twenty refused before the model saw a word", () => {
16
+ test("the codes turned away at the door are exactly the twenty-one refused before the model saw a word", () => {
17
17
  const door = codesWhere((code) => failureCourseOf(code) === "door");
18
18
  expect(door).toEqual(
19
19
  [
@@ -37,6 +37,7 @@ test("the codes turned away at the door are exactly the twenty refused before th
37
37
  "trial-exhausted",
38
38
  "model-unavailable",
39
39
  "engine-version-floor",
40
+ "standby",
40
41
  ].toSorted(),
41
42
  );
42
43
  expect(codesWhere(turnedAwayCode)).toEqual(door);
@@ -109,6 +110,7 @@ test("every code keeps the kind the board named it by", () => {
109
110
  "harness-incomplete": "cutShort",
110
111
  "privacy-unshielded": "privacy",
111
112
  "privacy-instructions": "privacy",
113
+ standby: "held",
112
114
  } as const;
113
115
  expect(Object.fromEntries(Object.entries(FAILURE_CODES).map(([code, traits]) => [code, traits.kind]))).toEqual(pinned);
114
116
  });
@@ -0,0 +1,36 @@
1
+ import { z } from "zod";
2
+ import { MessageReceiptSchema } from "../../schemas/agent.js";
3
+ import { TurnErrandSchema } from "../../schemas/speaker.js";
4
+
5
+ // The wake door: words the runner's own sandbox has for a conversation its parent dispatched there (a watch that fired,
6
+ // a background job that ended, a child's report), handed to the parent, which owns the conversation. The parent says
7
+ // them as it would its own wake, so the turn they start is dispatched from the parent like any other: the parent's card,
8
+ // board and record follow it, and its work comes back to land. Kept apart from runner-protocol.ts, which schemas/agent.ts
9
+ // imports and so cannot import the receipt from.
10
+ export const runnerWakeUrl = (parentUrl: string): string => `${parentUrl.replace(/\/$/, "")}/system/runners/wake`;
11
+
12
+ export const RunnerWakeRequestSchema = z.object({
13
+ conversationId: z.string().min(1),
14
+ prompt: z.string(),
15
+ // Nobody at a composer: the runner's sandbox, or an agent there (a child reporting).
16
+ voice: z.enum(["sandbox", "agent"]),
17
+ // The source of outside content in the prompt; whatever turn it reaches is tainted by it.
18
+ outside: z.string().optional(),
19
+ errand: TurnErrandSchema.optional(),
20
+ // What on the runner sent it (`automation:<id>`, a job), said on the row it opens.
21
+ source: z.string().optional(),
22
+ // The id its words wait under, so the same wake sent twice is delivered once.
23
+ messageId: z.string().optional(),
24
+ });
25
+ export type RunnerWakeRequest = z.infer<typeof RunnerWakeRequestSchema>;
26
+
27
+ // `forwarded: false`: the conversation is not one the parent dispatched to this runner, so the runner keeps the wake.
28
+ // Otherwise what the parent did with it: a receipt, or why it took nothing (`invalid`, `why`), as a local wake answers.
29
+ export const RunnerWakeAnswerSchema = z.union([
30
+ z.object({ forwarded: z.literal(false) }),
31
+ z.object({
32
+ forwarded: z.literal(true),
33
+ said: z.union([MessageReceiptSchema, z.object({ invalid: z.string() }), z.object({ why: z.string() })]),
34
+ }),
35
+ ]);
36
+ export type RunnerWakeAnswer = z.infer<typeof RunnerWakeAnswerSchema>;
@@ -61,12 +61,18 @@ import {
61
61
  InboundLinkSummarySchema,
62
62
  InboundLinkTermsUpdateSchema,
63
63
  LinkAnswerSchema,
64
+ LinkExecSchema,
65
+ LinkExecStatusSchema,
64
66
  LinkHelloSchema,
65
67
  LinkMessageReceiptSchema,
66
68
  LinkMessageSchema,
69
+ LinkReadAnswerSchema,
70
+ LinkReadSchema,
67
71
  LinkRequestDecisionSchema,
68
72
  LinkTaskSchema,
69
73
  LinkTaskStatusSchema,
74
+ LinkWriteAnswerSchema,
75
+ LinkWriteSchema,
70
76
  } from "../../schemas/links.js";
71
77
  import { UploadManifestSchema, UploadSkipSchema } from "../../schemas/workspace/workspace-upload.js";
72
78
  import {
@@ -82,14 +88,9 @@ import {
82
88
  } from "../../state/arrival.js";
83
89
  import { DefinitionDiffSchema, DefinitionExportSchema, WorkspacePublishResultSchema, WorkspacePublishSchema, WorkspaceRemoteSchema } from "../../state/definition.js";
84
90
  import {
85
- RunnerCredentialRefreshRequestSchema,
86
- RunnerCredentialRefreshSchema,
87
- RunnerCredentialRequestSchema,
88
- RunnerCredentialSchema,
89
91
  RunnerDefinitionAppliedSchema,
90
92
  RunnersListSchema,
91
93
  } from "../doors/runner-protocol.js";
92
- import { LinkAccountCopySchema, LinkAccountsSchema, SharedAccountRefSchema } from "../../schemas/providers/account-sharing.js";
93
94
  import type { RawRouteKey } from "./raw-routes.js";
94
95
 
95
96
  // What a raw route that answers plain JSON takes and answers, under its RAW_ROUTES key. `input` is the JSON body a write
@@ -196,13 +197,15 @@ export const RAW_JSON_ROUTES = {
196
197
  // command's own routes do, which have no shared schema.
197
198
  "POST /link/records/diagnostics": { input: DiagnosticsQuerySchema, output: DiagnosticsAnswerSchema },
198
199
  "GET /link/records/fleet/{handle}/bundle": { output: ConversationBundleSchema },
200
+ // A link's operating doors: a command started and read again (`?wait=<seconds>` holds a read until it ends), stopped,
201
+ // a file or directory read, and a file written.
202
+ "POST /link/operate/exec": { input: LinkExecSchema, output: LinkExecStatusSchema },
203
+ "GET /link/operate/exec/{id}": { output: LinkExecStatusSchema },
204
+ "POST /link/operate/exec/{id}/stop": { output: LinkExecStatusSchema },
205
+ "POST /link/operate/read": { input: LinkReadSchema, output: LinkReadAnswerSchema },
206
+ "POST /link/operate/write": { input: LinkWriteSchema, output: LinkWriteAnswerSchema },
199
207
  "POST /diagnostics": { input: DiagnosticsAskSchema, output: DiagnosticsAnswerSchema },
200
208
  "GET /fleet/{handle}/bundle": { output: ConversationBundleSchema },
201
- // An accounts link: what it may use, one static key's copy, and a lent sign-in's per-turn credential.
202
- "GET /link/accounts": { output: LinkAccountsSchema },
203
- "POST /link/accounts/copy": { input: SharedAccountRefSchema, output: LinkAccountCopySchema },
204
- "POST /link/credentials": { input: RunnerCredentialRequestSchema, output: RunnerCredentialSchema },
205
- "POST /link/credentials/refresh": { input: RunnerCredentialRefreshRequestSchema, output: RunnerCredentialRefreshSchema },
206
209
  "GET /system/control/tokens": { output: ControlTokensListSchema },
207
210
  "POST /system/control/tokens": { input: ControlTokenMintSchema, output: ControlTokenMintedSchema },
208
211
  "DELETE /system/control/tokens/{id}": { output: OkSchema },