@intentic/sandbox-contract 1.214.0 → 1.215.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 (44) hide show
  1. package/dist/capability-secrets.d.ts +3 -0
  2. package/dist/capability-secrets.d.ts.map +1 -0
  3. package/dist/capability-secrets.js +3 -0
  4. package/dist/capability-secrets.js.map +1 -0
  5. package/dist/contracts/agent.contract.d.ts +10 -0
  6. package/dist/contracts/agent.contract.d.ts.map +1 -1
  7. package/dist/contracts/capabilities.contract.d.ts +1 -0
  8. package/dist/contracts/capabilities.contract.d.ts.map +1 -1
  9. package/dist/contracts/capabilities.contract.js.map +1 -1
  10. package/dist/contracts/git.contract.d.ts +21 -0
  11. package/dist/contracts/git.contract.d.ts.map +1 -1
  12. package/dist/contracts/git.contract.js +3 -1
  13. package/dist/contracts/git.contract.js.map +1 -1
  14. package/dist/contracts/host.contract.d.ts +1 -0
  15. package/dist/contracts/host.contract.d.ts.map +1 -1
  16. package/dist/contracts/settings.contract.d.ts +2 -0
  17. package/dist/contracts/settings.contract.d.ts.map +1 -1
  18. package/dist/contracts/system.contract.d.ts +6 -0
  19. package/dist/contracts/system.contract.d.ts.map +1 -1
  20. package/dist/events.d.ts +10 -0
  21. package/dist/events.d.ts.map +1 -1
  22. package/dist/events.js +1 -0
  23. package/dist/events.js.map +1 -1
  24. package/dist/index.d.ts +41 -0
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +1 -0
  27. package/dist/index.js.map +1 -1
  28. package/dist/schemas.d.ts +47 -0
  29. package/dist/schemas.d.ts.map +1 -1
  30. package/dist/schemas.js +21 -1
  31. package/dist/schemas.js.map +1 -1
  32. package/dist/workspace-state.d.ts +1 -0
  33. package/dist/workspace-state.d.ts.map +1 -1
  34. package/dist/workspace-state.js +10 -1
  35. package/dist/workspace-state.js.map +1 -1
  36. package/package.json +4 -4
  37. package/src/capability-secrets.ts +20 -0
  38. package/src/contracts/capabilities.contract.ts +12 -5
  39. package/src/contracts/git.contract.ts +10 -0
  40. package/src/events.ts +23 -0
  41. package/src/index.ts +1 -0
  42. package/src/schemas.ts +122 -9
  43. package/src/workspace-state.test.ts +40 -0
  44. package/src/workspace-state.ts +29 -1
@@ -278,6 +278,7 @@ export declare const RETIRED_WORKSPACE_STATE_DIRS: {
278
278
  readonly artifacts: readonly ["attachments", "acceptance", "loops", "workflow-runs", "transcripts"];
279
279
  };
280
280
  export declare const isLockedWorkspacePath: (relPath: string) => boolean;
281
+ export declare const isReviewableLockedPath: (relPath: string) => boolean;
281
282
  export type WorkspaceStatePath = (typeof STATE_FILES)[number]["path"];
282
283
  export declare const staleQueryKeys: (paths: readonly string[], contributed: readonly FileContribution[]) => readonly string[];
283
284
  export declare const fileBoundQueryKeys: (contributed: readonly FileContribution[]) => readonly string[];
@@ -1 +1 @@
1
- {"version":3,"file":"workspace-state.d.ts","sourceRoot":"","sources":["../src/workspace-state.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AA0CxD,MAAM,WAAW,kBAAmB,SAAQ,SAAS;IAKjD,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IAExC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAgCtB,QAAQ,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC;IAY1B,QAAQ,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC;IAKzB,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACnC;AAOD,QAAA,MAAM,WAAW;mBA2BL,6BAA6B;;0BAAoF,OAAO;;;mBAOxH,sCAAsC;;0BAA8C,OAAO;;;mBAO3F,4BAA4B;;0BAAyC,OAAO;;mBAc5E,yBAAyB;;0BAAuE,OAAO;;;mBAYvG,yCAAyC;;0BAA6C,OAAO;;;mBAC7F,kCA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AG,MAA4F,CAAC;AAmBrJ,eAAO,MAAM,uBAAuB,EAAE,SAAS,MAAM,EAEpD,CAAC;AAIF,eAAO,MAAM,kBAAkB,YAAa,MAAM,KAAG,OAA0E,CAAC;AAShI,eAAO,MAAM,4BAA4B;aACrC,MAAM,YAAG,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU;aAC1D,OAAO,YAAG,IAAI,EAAE,oBAAoB,EAAE,SAAS,EAAE,gBAAgB;aACjE,SAAS,YAAG,aAAa,EAAE,YAAY,EAAE,OAAO,EAAE,eAAe,EAAE,aAAa;CAC1E,CAAC;AAmCX,eAAO,MAAM,qBAAqB,YAAa,MAAM,KAAG,OAMvD,CAAC;AAoBF,eAAO,MAAM,sBAAsB,YAAa,MAAM,KAAG,OAGxD,CAAC;AAaF,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AActE,eAAO,MAAM,cAAc,UAAW,SAAS,MAAM,EAAE,eAAe,SAAS,gBAAgB,EAAE,KAAG,SAAS,MAAM,EAMlH,CAAC;AAOF,eAAO,MAAM,kBAAkB,gBAAiB,SAAS,gBAAgB,EAAE,KAAG,SAAS,MAAM,EAE5F,CAAC"}
@@ -1,6 +1,11 @@
1
1
  import { STATE_DIR } from "@intentic/constants";
2
2
  const STATE_FILES = [
3
- { path: ".intentic/capabilities.json", invalidates: ["capabilities", "environment", "panels", "manifests"], portability: "carry", versioned: true },
3
+ {
4
+ path: ".intentic/capabilities.json",
5
+ invalidates: ["capabilities", "environment", "panels", "manifests"],
6
+ portability: "carry",
7
+ versioned: true,
8
+ },
4
9
  { path: ".intentic/capability-dismissals.json", invalidates: ["capabilities"], portability: "carry", versioned: true },
5
10
  { path: ".intentic/secret-uses.json", invalidates: ["secrets"], portability: "carry" },
6
11
  { path: ".intentic/personas.json", invalidates: ["personas", "capabilities", "manifests"], portability: "carry", versioned: true },
@@ -248,6 +253,10 @@ export const isLockedWorkspacePath = (relPath) => {
248
253
  }
249
254
  return segments.length >= 2 && segments[0] === STATE_DIR && LOCKED_STATE_ENTRIES.has(segments[1] ?? "");
250
255
  };
256
+ export const isReviewableLockedPath = (relPath) => {
257
+ const rel = relPath.replaceAll("\\", "/").replace(/^\.\//, "");
258
+ return isLockedWorkspacePath(rel) && VERSIONED_STATE_PATHS.some((path) => (path.endsWith("/") ? rel.startsWith(path) : rel === path));
259
+ };
251
260
  export const staleQueryKeys = (paths, contributed) => [
252
261
  ...new Set([...WORKSPACE_STATE_FILES, ...contributed]
253
262
  .filter((file) => file.invalidates.length > 0 && paths.some((path) => path.startsWith(file.path)))
@@ -1 +1 @@
1
- {"version":3,"file":"workspace-state.js","sourceRoot":"","sources":["../src/workspace-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AA4GhD,MAAM,WAAW,GAAG;IA2BhB,EAAE,IAAI,EAAE,6BAA6B,EAAE,WAAW,EAAE,CAAC,cAAc,EAAE,aAAa,EAAE,QAAQ,EAAE,WAAW,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE;IAOnJ,EAAE,IAAI,EAAE,sCAAsC,EAAE,WAAW,EAAE,CAAC,cAAc,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE;IAOtH,EAAE,IAAI,EAAE,4BAA4B,EAAE,WAAW,EAAE,CAAC,SAAS,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE;IActF,EAAE,IAAI,EAAE,yBAAyB,EAAE,WAAW,EAAE,CAAC,UAAU,EAAE,cAAc,EAAE,WAAW,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE;IAYlI,EAAE,IAAI,EAAE,yCAAyC,EAAE,WAAW,EAAE,CAAC,aAAa,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI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KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;SACjG,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAC3C;CACJ,CAAC;AAOF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,WAAwC,EAAqB,EAAE,CAAC;IAC/F,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,qBAAqB,EAAE,GAAG,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;CAC7F,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentic/sandbox-contract",
3
- "version": "1.214.0",
3
+ "version": "1.215.0",
4
4
  "description": "oRPC wire contract for the intentic sandbox daemon — shared by the daemon and its browser client",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -89,9 +89,9 @@
89
89
  "@orpc/contract": "1.14.13",
90
90
  "tslib": "2.8.1",
91
91
  "zod": "4.4.3",
92
- "@intentic/constants": "1.214.0",
93
- "@intentic/registry": "1.214.0",
94
- "@intentic/extension-manifest": "1.214.0"
92
+ "@intentic/registry": "1.215.0",
93
+ "@intentic/extension-manifest": "1.215.0",
94
+ "@intentic/constants": "1.215.0"
95
95
  },
96
96
  "devDependencies": {
97
97
  "@types/node": "24.13.2",
@@ -0,0 +1,20 @@
1
+ /* THE ONE VALUE THAT MEANS "WHATEVER IS ALREADY STORED" — the rule both ends of the capability wire apply.
2
+ *
3
+ * A capability's credentials never reach a browser: the list route echoes the shape of a connection and drops
4
+ * every secret in it, and the manifest on disk holds this marker where each value used to be (the vault keeps
5
+ * the value itself). That is what makes a connection EDITABLE without being re-typed: a form that wants to
6
+ * change a tunnel's routed networks sends this back in place of the pre-shared key it was never shown, and both
7
+ * the write path and the storage layer read it as "leave that one alone".
8
+ *
9
+ * Deliberately not an empty string and not a dropped key. The entry still has to satisfy CapabilitySchema — a
10
+ * connector's required token, an ssh key — and a reader that somehow bypasses rehydration must fail LOUDLY: a
11
+ * service refusing this string is a clear auth error, where an empty value reads as "not configured yet" and a
12
+ * missing key as a shape change.
13
+ *
14
+ * It lives in the contract rather than in the daemon's store because it is now spoken on the wire. The browser
15
+ * has to be able to say it, the add route has to resolve it before a handler ever sees it, and the store has to
16
+ * refuse to write it over a real value — three places, one spelling. */
17
+ export const VAULTED = "__intentic_vaulted__";
18
+
19
+ /** Whether a config value is the marker rather than a credential — the check, so the string is typed once. */
20
+ export const isVaulted = (value: unknown): boolean => value === VAULTED;
@@ -16,11 +16,18 @@ import {
16
16
  OkSchema,
17
17
  } from "../schemas.js";
18
18
 
19
- // The sandbox's unified capability manifest. `list` returns each active capability with its live status. `add`
20
- // upserts a capability and STREAMS its apply (devops scaffolding / service provisioning emit ndjson progress;
21
- // mcp/integration emit a terminal frame), mirroring the /intentic runner. `remove` tears it down (devops refuses
22
- // deleting the repos is data loss). `status` re-probes a single capability for a lazy UI refresh. `marketplace`
23
- // resolves a Claude Code plugin marketplace repo into installable plugin-capability configs.
19
+ /* The sandbox's unified capability manifest. `list` returns each active capability with its live status, the
20
+ * non-secret echo of its config, and the NAMES of the credentials it holds. `add` upserts a capability and
21
+ * STREAMS its apply (devops scaffolding / service provisioning emit ndjson progress; mcp/integration emit a
22
+ * terminal frame), mirroring the /intentic runner. `remove` tears it down (devops refuses deleting the repos
23
+ * is data loss). `status` re-probes a single capability for a lazy UI refresh. `marketplace` resolves a Claude
24
+ * Code plugin marketplace repo into installable plugin-capability configs.
25
+ *
26
+ * `add` IS ALSO THE EDIT, because the write is an upsert: the same id with a changed config changes that
27
+ * connection. A caller editing one has never been shown its credentials, so it sends VAULTED
28
+ * (capability-secrets.ts) for each it is leaving alone and the daemon resolves those from what is stored before
29
+ * anything runs — the only way to change one setting on a tunnel without re-typing its key. A marker with
30
+ * nothing behind it is refused rather than written. */
24
31
  export const capabilitiesContract = {
25
32
  list: oc.route({ method: "GET", path: "/capabilities" }).output(CapabilitiesListSchema),
26
33
  add: oc.route({ method: "POST", path: "/capabilities" }).input(CapabilitySchema).output(eventIterator(IntenticLineSchema)),
@@ -23,8 +23,11 @@ import {
23
23
  GitLogQuerySchema,
24
24
  GitLogSchema,
25
25
  GitOperationStateSchema,
26
+ GitPublishFileResultSchema,
27
+ GitPublishFileSchema,
26
28
  GitUndoSchema,
27
29
  GitUndoStateSchema,
30
+ GitRemoteReposSchema,
28
31
  GitRemoteStateSchema,
29
32
  GitReposSchema,
30
33
  GitResetSchema,
@@ -53,6 +56,9 @@ export const gitContract = {
53
56
  // one repo's commit log, and lazy per-commit detail (changed files, then a file's before/after AT the
54
57
  // commit). Read-only — commit/discard on the working tree stay the write path (above).
55
58
  repos: oc.route({ method: "GET", path: "/git/repos" }).output(GitReposSchema),
59
+ // The same repos with the host + project their remote names — how a caller recognises a workspace repo in a
60
+ // list of `owner/name` strings that came from somewhere else. Kept off `repos` (a `git remote -v` per repo).
61
+ remoteRepos: oc.route({ method: "GET", path: "/git/remote-repos" }).output(GitRemoteReposSchema),
56
62
  log: oc.route({ method: "GET", path: "/git/{repo}/log" }).input(GitLogQuerySchema).output(GitLogSchema),
57
63
  commitDiff: oc.route({ method: "GET", path: "/git/{repo}/commit-diff" }).input(GitCommitDiffQuerySchema).output(GitCommitDiffSchema),
58
64
  commitFileDiff: oc.route({ method: "GET", path: "/git/{repo}/commit-file-diff" }).input(GitCommitFileDiffQuerySchema).output(FileDiffSchema),
@@ -115,4 +121,8 @@ export const gitContract = {
115
121
  files: oc.route({ method: "GET", path: "/git/{repo}/files" }).input(RepoParamSchema).output(GitFilesSchema),
116
122
  readFile: oc.route({ method: "GET", path: "/git/{repo}/file" }).input(GitFileQuerySchema).output(GitFileSchema),
117
123
  writeFile: oc.route({ method: "PUT", path: "/git/{repo}/file" }).input(GitFileWriteSchema).output(OkSchema),
124
+ // Write + commit-that-path-only + push, as one step with one answer. Reports rather than throws for the
125
+ // same reason the remote trio above does: no remote, no credentials and "you are on a side branch" are
126
+ // ordinary outcomes a screen renders, not 500s.
127
+ publishFile: oc.route({ method: "POST", path: "/git/{repo}/publish-file" }).input(GitPublishFileSchema).output(GitPublishFileResultSchema),
118
128
  };
package/src/events.ts CHANGED
@@ -403,6 +403,29 @@ export const AgentEventSchema = z.discriminatedUnion("kind", [
403
403
  * route addresses it by; absent on a turn with no conversation behind it (the bench, a one-shot), where
404
404
  * the id still powers a plain restore but there is no message to rewind to. */
405
405
  z.object({ kind: z.literal("checkpoint"), id: z.string(), index: z.number().int().nonnegative().optional() }),
406
+ /* A MESSAGE THE USER SENT INTO THE TURN WHILE IT RAN — the mid-turn steer, at the point in the stream where
407
+ * the daemon accepted it (agent/agent-steering.ts).
408
+ *
409
+ * A frame rather than a client-local write, because all three things that were wrong about the steer are the
410
+ * same missing fact: nothing in the run's log said WHEN it arrived.
411
+ * - POSITION. The harness injects a steer between tool calls and the model simply keeps writing, with no
412
+ * `result` in between — so there is no `usage` boundary to retire the open bubble. The sending window
413
+ * appended the user's words at the END of its transcript while the turn kept typing into the bubble
414
+ * ABOVE them, and the answer to a question landed over the question.
415
+ * - EVERY OTHER WINDOW. A run is rendered by any number of attached clients; only the one that posted the
416
+ * steer knew about it, so the same conversation read differently in two places.
417
+ * - THE RECORD. The settled turn is written down from this log (sessions/turn-transcript.ts), and one that
418
+ * never held the steer wrote a transcript the message was missing from entirely — which also put the
419
+ * client's row count one ahead of the daemon's for the rest of the conversation, and those counts are
420
+ * what a fork copies a prefix of and a rewind addresses.
421
+ *
422
+ * `text` is what the user typed, never the composed prompt: the editor-context and attachment notes the
423
+ * route wraps around it are protocol, and redrawing them as the user's words is the same lie the stored
424
+ * prompt is unwrapped to avoid. `attachments` are workspace-relative, like the turn's own. `sentAt` is the
425
+ * instant the turn took the message, carried so the bubble wears the same clock live and after a reopen —
426
+ * a turn's own user row is stamped from the daemon's clock too, and a live bubble stamped from the
427
+ * browser's would visibly jump when the record replaced it. */
428
+ z.object({ kind: z.literal("steer"), text: z.string(), sentAt: z.number(), attachments: z.array(z.string()).optional() }),
406
429
  z.object({ kind: z.literal("delta"), text: z.string(), parentToolUseId: z.string().optional() }),
407
430
  // The prose block the `delta` frames were writing is finished. A turn emits several: the model says what
408
431
  // it is about to do, runs tools, reports what it found, runs more, then summarizes — each a separate text
package/src/index.ts CHANGED
@@ -97,6 +97,7 @@ export * from "./history-state.js";
97
97
  export * from "./agent-catalog.js";
98
98
  export * from "./agent-run-model.js";
99
99
  export * from "./capability-env.js";
100
+ export * from "./capability-secrets.js";
100
101
  export * from "./conversation-ids.js";
101
102
  export * from "./host-protocol.js";
102
103
  export * from "./listener-protocol.js";
package/src/schemas.ts CHANGED
@@ -1730,6 +1730,9 @@ export const SkillRemoveSchema = z.object({ name: SkillNameSchema });
1730
1730
  // find them. Independent of iqSearch: that one teaches the agent to search, this one
1731
1731
  // answers ahead of it.
1732
1732
  // iqContextHoldout — measurement control for iqContext, same shape as terseHoldout (UsageTurn.iqContext).
1733
+ // workspaceMap — computes an AREA index of the project a run starts in and prepends it to the
1734
+ // conversation's opening message, so the turn does not have to buy its own orientation
1735
+ // with a directory listing. Generated from the filesystem every time, never stored.
1733
1736
  // outputCleaners — the Bash output-cleaner spec (agent-output-filter): "off" = filter disabled (default),
1734
1737
  // "" = all cleaners on, else an iq-style allow-list / default-minus
1735
1738
  // spec ("git,pnpm" = only those; "-cap" = all except). Threaded to the filter via env.
@@ -1811,6 +1814,25 @@ export const SandboxSettingsSchema = z.object({
1811
1814
  // otherwise-eligible turns run WITHOUT the retrieved context and stamp their arm onto the ledger
1812
1815
  // (UsageTurn.iqContext), so the report compares two real populations of turns instead of asserting a saving.
1813
1816
  iqContextHoldout: z.number().min(0).max(1).default(0),
1817
+ /* THE MAP THE TURN OPENS WITH — which areas the project a run starts in has, one derived line on what each
1818
+ * is for, and where the run is standing among them (agent/workspace-map.ts).
1819
+ *
1820
+ * A different answer to the same question `iqContext` answers. That one retrieves for the WORDS of the
1821
+ * message and is only as good as the question; this one answers the question every first turn has whatever
1822
+ * it was asked — "what is this and where am I in it" — which across a hundred sessions of this workspace was
1823
+ * being bought with a directory listing in two turns out of five, and with ~5.3k tokens of tool results
1824
+ * before the job was touched. The two compose: this says which area, retrieval says which file.
1825
+ *
1826
+ * ROOTED AT THE RUN'S STARTING FOLDER rather than at the workspace: a persona's start folder, an isolated
1827
+ * conversation's worktree, or wherever the turn's cwd is. It maps the project containing that folder and
1828
+ * names the rest of the workspace on one line, because a run three levels inside one project is not asking
1829
+ * about the others.
1830
+ *
1831
+ * REGENERATED, NEVER STORED, which is the whole reason it is a mechanism rather than a paragraph in the
1832
+ * system prompt or a hand-written CLAUDE.md: in the ten days that motivated it this repo's two busiest
1833
+ * top-level directories stopped existing, and every written-down copy of the layout was wrong by the end of
1834
+ * the window. Off by default — it spends its tokens on the opening message of every conversation. */
1835
+ workspaceMap: z.boolean().default(false),
1814
1836
  outputCleaners: z.string().default("off"),
1815
1837
  outputHoldout: z.number().min(0).max(1).default(0),
1816
1838
  /* The models behind the small automatic jobs that are not a conversation — today the commit message
@@ -2507,6 +2529,52 @@ export const GitLogQuerySchema = RepoParamSchema.extend({
2507
2529
  // Every real git repo under /work as root-relative dir ids ("root" is implicit — the /work repo itself).
2508
2530
  export const GitReposSchema = z.object({ repos: z.array(z.string()) });
2509
2531
  export type GitRepos = z.infer<typeof GitReposSchema>;
2532
+
2533
+ /* WHERE EACH WORKSPACE REPO LIVES ONLINE — one entry per repo that has a parseable remote, as the host and the
2534
+ * `owner/name` project it names. Separate from `repos` above rather than folded into it because that route is
2535
+ * on the file tree's hot path and this costs a `git remote -v` per repo; a caller that wants to recognise a
2536
+ * workspace repo in somebody else's list (the publisher claim does exactly that) asks for it deliberately.
2537
+ *
2538
+ * A repo with no remote, or one naming a local path, is absent rather than present-and-empty: "this repo is
2539
+ * nowhere online" and "this repo is at X" are different answers and only one of them can be matched against. */
2540
+ export const GitRemoteRepoSchema = z.object({ repo: z.string(), host: z.string(), project: z.string() });
2541
+ export type GitRemoteRepo = z.infer<typeof GitRemoteRepoSchema>;
2542
+ export const GitRemoteReposSchema = z.object({ repos: z.array(GitRemoteRepoSchema) });
2543
+ export type GitRemoteRepos = z.infer<typeof GitRemoteReposSchema>;
2544
+
2545
+ /* PUT ONE FILE ON THE DEFAULT BRANCH AND PUBLISH IT — write, commit that path alone, push, in one call.
2546
+ *
2547
+ * One route rather than three because the interesting states are the ones BETWEEN the steps: a file written but
2548
+ * not committed, or committed but not pushed, is a repo the user now has to clean up by hand, and a browser
2549
+ * making three requests owns that mess without being able to describe it. Here the caller gets one answer that
2550
+ * says how far it got.
2551
+ *
2552
+ * `message` is the caller's because the commit shows up in the user's own history and a generic subject there
2553
+ * is litter. */
2554
+ export const GitPublishFileSchema = RepoParamSchema.extend({ path: z.string().min(1), content: z.string(), message: z.string().min(1) });
2555
+
2556
+ /* HOW FAR THE PUBLISH GOT, in the terms the screen has to explain it in. `ok` is "the file is on the default
2557
+ * branch of the remote" and nothing less — the only state that makes a public read of it succeed.
2558
+ *
2559
+ * The three steps are reported SEPARATELY because every boundary between them is a state a user can be left
2560
+ * in and would otherwise have to discover: a file written but not committed, a commit that exists locally but
2561
+ * was refused by the remote for credentials. Each of those needs a different sentence and a different next
2562
+ * move, and one `ok: false` cannot carry either. It is also what tells the daemon whether the worktree moved
2563
+ * at all, which decides whether this counts as a user write on the timeline.
2564
+ *
2565
+ * `branch` and `defaultBranch` ride along so a refusal can name both sides of the mismatch rather than saying
2566
+ * "wrong branch" at someone who cannot see which one they are on. */
2567
+ export const GitPublishFileResultSchema = z.object({
2568
+ ok: z.boolean(),
2569
+ wrote: z.boolean(),
2570
+ committed: z.boolean(),
2571
+ pushed: z.boolean(),
2572
+ branch: z.string().optional(),
2573
+ defaultBranch: z.string().optional(),
2574
+ reason: z.string().optional(),
2575
+ });
2576
+ export type GitPublishFileResult = z.infer<typeof GitPublishFileResultSchema>;
2577
+
2510
2578
  export const GitCommitDiffQuerySchema = RepoParamSchema.extend({ sha: ShaSchema });
2511
2579
  // A commit's changed files (vs its first parent; a root commit vs the empty tree) — the graph's detail tree
2512
2580
  // renders these (line stats included) and reuses the diff UI on click. Just GitChanges: the line stats live on
@@ -3871,12 +3939,25 @@ export const CapabilityStatusSchema = z.object({
3871
3939
  code: z.string().optional(),
3872
3940
  });
3873
3941
  export type CapabilityStatus = z.infer<typeof CapabilityStatusSchema>;
3874
- // The list row: manifest entry + live status. Secrets are never returned (an mcp token becomes hasToken).
3942
+ /* The list row: manifest entry + live status. Secrets are never returned (an mcp token becomes hasToken).
3943
+ *
3944
+ * `secrets` NAMES them without carrying them — the config keys this connection is actually holding a credential
3945
+ * under. It is what makes an edit form possible at all: `config` is everything the browser may see, so a form
3946
+ * seeded from it alone cannot tell "this tunnel has a pre-shared key I'm not allowed to show you" from "this
3947
+ * tunnel has no pre-shared key", and both render as an empty required box. Saving one then wipes the
3948
+ * credential, which is why changing a routed network used to mean re-typing a key.
3949
+ *
3950
+ * Keys, never values, and never a boolean per known field: the set is derived from what the entry stores, so a
3951
+ * field the user left blank is absent and a card that gained a credential since is present. The form reads it as
3952
+ * "show dots, and let blank mean keep" (VAULTED — capability-secrets.ts). */
3875
3953
  export const CapabilitySummarySchema = z.object({
3876
3954
  id: z.string(),
3877
3955
  kind: CapabilityKindSchema,
3878
3956
  status: CapabilityStatusSchema,
3879
3957
  config: z.record(z.string(), z.union([z.string(), z.number(), z.boolean()])),
3958
+ // Defaulted for the daemon-older-than-browser seam, like `recommendations` below: a required field would
3959
+ // fail the whole list parse against a sandbox predating this, taking the page down to hide some dots.
3960
+ secrets: z.array(z.string()).default([]),
3880
3961
  });
3881
3962
  /* A capability the WORKSPACE asks for but the manifest doesn't carry — derived from what is checked out under
3882
3963
  * /work, not from anything the user configured. It exists because the failures it prevents are illegible: a
@@ -5421,19 +5502,23 @@ export type MachineSandbox = z.infer<typeof MachineSandboxSchema>;
5421
5502
  /* ONE OPERATION ON ONE SANDBOX ON ONE MACHINE — the Computers view's buttons, and the only thing that changes a
5422
5503
  * machine's fleet from a browser.
5423
5504
  *
5424
- * All eight ops travel one route because they are one decision to the person clicking, however differently they
5425
- * behave underneath: three are a docker call that returns in a second, three run the `ic` flow for minutes, one
5505
+ * All nine ops travel one route because they are one decision to the person clicking, however differently they
5506
+ * behave underneath: three are a docker call that returns in a second, four run the `ic` flow for minutes, one
5426
5507
  * deletes, and one only reads. Splitting them by duration would put the same button on two doors and give the
5427
5508
  * view two shapes to render. So every op answers as a STREAM of lines ending in a result — the fast ones simply
5428
5509
  * have little to say, and `logs` is the case where the lines ARE the answer.
5429
5510
  *
5430
- * `logs` is here rather than on a route of its own for the same reason: it is a button in the same row as the
5431
- * other seven, on a container that may be too broken to answer any other way, and the stream shape already
5432
- * carries "many lines, then an outcome" exactly as a log tail wants to arrive.
5511
+ * `prepare` is the one that changes nothing on purpose: it downloads and builds the next update and stops
5512
+ * there, leaving the container running the image it was already running. It is what turns `update` from a wait
5513
+ * of minutes into a restart of seconds, and it is safe to offer at any moment for exactly that reason.
5514
+ *
5515
+ * `logs` is here rather than on a route of its own for the same reason the rest share it: it is a button in the
5516
+ * same row as the others, on a container that may be too broken to answer any other way, and the stream shape
5517
+ * already carries "many lines, then an outcome" exactly as a log tail wants to arrive.
5433
5518
  *
5434
- * The machine enforces which of them it will do: `sandboxes` covers the first six and the log tail, removal takes
5435
- * its own switch, and a refusal comes back as the machine's own sentence naming the control to flip. */
5436
- export const MachineSandboxOpSchema = z.enum(["start", "stop", "restart", "update", "rebuild", "rollback", "remove", "logs"]);
5519
+ * The machine enforces which of them it will do: `sandboxes` covers everything but removal, which takes its own
5520
+ * switch, and a refusal comes back as the machine's own sentence naming the control to flip. */
5521
+ export const MachineSandboxOpSchema = z.enum(["start", "stop", "restart", "prepare", "update", "rebuild", "rollback", "remove", "logs"]);
5437
5522
  export type MachineSandboxOp = z.infer<typeof MachineSandboxOpSchema>;
5438
5523
 
5439
5524
  export const MachineSandboxFlowSchema = z.object({
@@ -6198,6 +6283,31 @@ export const AdapterHealthSchema = z.object({
6198
6283
  });
6199
6284
  export type AdapterHealthReport = z.infer<typeof AdapterHealthSchema>;
6200
6285
 
6286
+ /* AN UPDATE ALREADY DOWNLOADED AND BUILT, waiting for the restart that applies it.
6287
+ *
6288
+ * An update is one blocking operation but it was never one kind of work: pulling the new image and re-applying
6289
+ * the environment recipe take the overwhelming majority of the wall clock, and the sandbox is up and serving
6290
+ * through both of them. Only the cutover is downtime, and it is seconds.
6291
+ *
6292
+ * The daemon cannot know any of this by itself — it holds no host Docker socket — so `ic sandbox prepare`
6293
+ * tells it, on the machine that runs the container. That is the whole reason this exists: without it, the
6294
+ * update card had to quote the download as if it were an outage, and "a few minutes, this page loses the
6295
+ * sandbox" is a completely different decision from "about half a minute".
6296
+ *
6297
+ * Advisory only, in the strict sense: it decides what a card SAYS and never what gets installed. The swap
6298
+ * re-derives every one of these facts from the host-side record and refuses the fast path if any has drifted. */
6299
+ export const StagedUpdateSchema = z.object({
6300
+ // The version the staged image reports about itself. Absent when the image would not say (an older build,
6301
+ // a probe that failed), which reads as "ready, version unknown" — never as nothing being ready.
6302
+ version: z.string().optional(),
6303
+ // The release channel it was staged FROM, which is not necessarily the one this sandbox follows: preparing
6304
+ // a beta build is not moving onto beta.
6305
+ channel: z.string(),
6306
+ // When it finished downloading, epoch ms — what answers "is this still the update I am being offered?"
6307
+ at: z.number(),
6308
+ });
6309
+ export type StagedUpdate = z.infer<typeof StagedUpdateSchema>;
6310
+
6201
6311
  export const InfoSchema = z.object({
6202
6312
  name: z.string().optional(),
6203
6313
  image: z.string().optional(),
@@ -6233,6 +6343,9 @@ export const InfoSchema = z.object({
6233
6343
  * turns the update card from an offer into a warning that asks to be read before it hands over the
6234
6344
  * command. Absent for the overwhelming majority of updates, which break nothing. */
6235
6345
  breakingNotes: z.array(z.string()).optional(),
6346
+ /* AN UPDATE THAT HAS ALREADY BEEN DOWNLOADED AND BUILT on the machine that runs this container, and is
6347
+ * waiting for the restart that applies it. Absent for the ordinary case where nothing is staged. */
6348
+ staged: StagedUpdateSchema.optional(),
6236
6349
  });
6237
6350
  export type Info = z.infer<typeof InfoSchema>;
6238
6351
 
@@ -4,6 +4,7 @@ import { describe, expect, it } from "vitest";
4
4
  import {
5
5
  isLockedWorkspacePath,
6
6
  isReportedManifest,
7
+ isReviewableLockedPath,
7
8
  REPORTED_MANIFEST_PATHS,
8
9
  staleQueryKeys,
9
10
  VERSIONED_STATE_PATHS,
@@ -229,6 +230,45 @@ describe(`isLockedWorkspacePath`, () => {
229
230
  });
230
231
  });
231
232
 
233
+ /* The carve-out the diff routes ask for, and the reason it is derived: a locked entry the root repo TRACKS has
234
+ * a diff by construction, and refusing to serve it made the Changes panel list a row it could not open. */
235
+ describe(`isReviewableLockedPath`, () => {
236
+ it(`admits the locked entry the root repo tracks, and nothing else locked`, () => {
237
+ expect(isReviewableLockedPath(`.intentic/capabilities.json`)).toBe(true);
238
+ // Every other locked entry is a credential, an identity binding or private runtime state. None is
239
+ // versioned, so none is reachable through a diff — the carve-out cannot widen without the flag.
240
+ expect(isReviewableLockedPath(`.intentic/owner.json`)).toBe(false);
241
+ expect(isReviewableLockedPath(`.intentic/members.json`)).toBe(false);
242
+ expect(isReviewableLockedPath(`.intentic/ci.json`)).toBe(false);
243
+ expect(isReviewableLockedPath(`.intentic/auth/codex/auth.json`)).toBe(false);
244
+ expect(isReviewableLockedPath(`.intentic/sessions/claude/x.jsonl`)).toBe(false);
245
+ expect(isReviewableLockedPath(`.intentic/browser/Default/Cookies`)).toBe(false);
246
+ expect(isReviewableLockedPath(`.git/config`)).toBe(false);
247
+ });
248
+
249
+ it(`answers only for the locked set — an ordinary path was never refused to begin with`, () => {
250
+ // Tracked, but not locked: the guards never ask this of them, and a `true` here would read as "this
251
+ // path needed a carve-out", which is a different and wrong statement.
252
+ expect(isReviewableLockedPath(`.intentic/settings.json`)).toBe(false);
253
+ expect(isReviewableLockedPath(`src/app.ts`)).toBe(false);
254
+ // A repo's own nested state dir is its project's content, exactly as the lock reads it.
255
+ expect(isReviewableLockedPath(`myrepo/.intentic/capabilities.json`)).toBe(false);
256
+ });
257
+
258
+ it(`reads a platform path and a dot-relative one the same as a posix one`, () => {
259
+ expect(isReviewableLockedPath(`.intentic\\capabilities.json`)).toBe(true);
260
+ expect(isReviewableLockedPath(`./.intentic/capabilities.json`)).toBe(true);
261
+ });
262
+
263
+ it(`stays a strict subset of the lock`, () => {
264
+ // The carve-out is about which locked paths a DIFF may serve. A path it admits that the lock never
265
+ // held would mean the guards had stopped agreeing on what the control plane is.
266
+ for (const path of VERSIONED_STATE_PATHS) {
267
+ expect([path, isReviewableLockedPath(path) && !isLockedWorkspacePath(path)]).toEqual([path, false]);
268
+ }
269
+ });
270
+ });
271
+
232
272
  describe(`VERSIONED_STATE_PATHS`, () => {
233
273
  /* THE ONE ASSERTION THAT MUST NEVER GO GREEN BY ACCIDENT.
234
274
  *
@@ -133,7 +133,12 @@ const STATE_FILES = [
133
133
  * left a diff nowhere. One consequence worth stating rather than discovering: an identifier that pairs with a
134
134
  * credential — Komodo's api key beside its api secret, which its own connector card calls "like a database
135
135
  * user" — is echoed, and therefore lands in the diff exactly as a database username would. */
136
- { path: ".intentic/capabilities.json", invalidates: ["capabilities", "environment", "panels", "manifests"], portability: "carry", versioned: true },
136
+ {
137
+ path: ".intentic/capabilities.json",
138
+ invalidates: ["capabilities", "environment", "panels", "manifests"],
139
+ portability: "carry",
140
+ versioned: true,
141
+ },
137
142
 
138
143
  /* Which workspace-derived recommendations the owner has said "not needed" to, and the evidence each was
139
144
  * declined against. It rides the `capabilities` key because the catalog is what changes when one lands, and
@@ -692,6 +697,29 @@ export const isLockedWorkspacePath = (relPath: string): boolean => {
692
697
  return segments.length >= 2 && segments[0] === STATE_DIR && LOCKED_STATE_ENTRIES.has(segments[1] ?? "");
693
698
  };
694
699
 
700
+ /* THE LOCKED ENTRIES THE ROOT REPO TRACKS — refused by the file API, and diffable anyway.
701
+ *
702
+ * `capabilities.json` is the only one today and the whole reason this exists. Both of its rules are right on
703
+ * their own: it is `versioned`, because connecting this sandbox to a deployment orchestrator is the largest
704
+ * change anyone makes to what it can DO and that belongs in review; and it is locked, because a member who
705
+ * could PUT one through the generic file API would be granting themselves a capability the owner never
706
+ * approved. The lock was always about that WRITE — its credentials live in the vault, not in the file.
707
+ *
708
+ * Together, though, the second silently cancelled the first. The Changes panel listed the file (git tracks it,
709
+ * so `git status` reports it), and clicking the row asked a diff route that refuses every control-plane path —
710
+ * a 404 on the one surface `versioned` exists to produce. The bytes were already in `git log`, in every clone
711
+ * of the root repo and in the workspace search; only the review was missing.
712
+ *
713
+ * So the review surfaces ask THIS instead of the flat lock, and it derives from the same flag rather than
714
+ * naming the file, so marking another locked entry `versioned` cannot reproduce the contradiction. Every other
715
+ * surface — read, write, move, delete, publish — still asks `isLockedWorkspacePath` and still refuses.
716
+ *
717
+ * Accepts either slash, like the rule above it. */
718
+ export const isReviewableLockedPath = (relPath: string): boolean => {
719
+ const rel = relPath.replaceAll("\\", "/").replace(/^\.\//, "");
720
+ return isLockedWorkspacePath(rel) && VERSIONED_STATE_PATHS.some((path) => (path.endsWith("/") ? rel.startsWith(path) : rel === path));
721
+ };
722
+
695
723
  /* Every path this table declares, as a type. `as const` above is what makes it one, and it is what finally makes
696
724
  * the first sentence of this file's header TRUE rather than aspirational.
697
725
  *