@intentic/sandbox-contract 1.334.0 → 1.336.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 (238) hide show
  1. package/README.md +8 -3
  2. package/dist/contracts/accounts.contract.d.ts +11 -11
  3. package/dist/contracts/activity.contract.d.ts +1 -0
  4. package/dist/contracts/activity.contract.d.ts.map +1 -1
  5. package/dist/contracts/activity.contract.js +1 -1
  6. package/dist/contracts/activity.contract.js.map +1 -1
  7. package/dist/contracts/agent.contract.d.ts +102 -18
  8. package/dist/contracts/agent.contract.d.ts.map +1 -1
  9. package/dist/contracts/agents.contract.d.ts +163 -0
  10. package/dist/contracts/agents.contract.d.ts.map +1 -1
  11. package/dist/contracts/agents.contract.js +10 -1
  12. package/dist/contracts/agents.contract.js.map +1 -1
  13. package/dist/contracts/audit.contract.d.ts +84 -0
  14. package/dist/contracts/audit.contract.d.ts.map +1 -0
  15. package/dist/contracts/audit.contract.js +43 -0
  16. package/dist/contracts/audit.contract.js.map +1 -0
  17. package/dist/contracts/automations.contract.d.ts +15 -0
  18. package/dist/contracts/automations.contract.d.ts.map +1 -1
  19. package/dist/contracts/ci.contract.d.ts +10 -0
  20. package/dist/contracts/ci.contract.d.ts.map +1 -1
  21. package/dist/contracts/compliance.contract.d.ts +163 -0
  22. package/dist/contracts/compliance.contract.d.ts.map +1 -0
  23. package/dist/contracts/compliance.contract.js +41 -0
  24. package/dist/contracts/compliance.contract.js.map +1 -0
  25. package/dist/contracts/device.contract.d.ts +6 -0
  26. package/dist/contracts/device.contract.d.ts.map +1 -1
  27. package/dist/contracts/extensions.contract.d.ts +2 -0
  28. package/dist/contracts/extensions.contract.d.ts.map +1 -1
  29. package/dist/contracts/loops.contract.d.ts +15 -0
  30. package/dist/contracts/loops.contract.d.ts.map +1 -1
  31. package/dist/contracts/needs.contract.d.ts +49 -0
  32. package/dist/contracts/needs.contract.d.ts.map +1 -1
  33. package/dist/contracts/offload.contract.d.ts +5 -0
  34. package/dist/contracts/offload.contract.d.ts.map +1 -1
  35. package/dist/contracts/personas.contract.d.ts +10 -0
  36. package/dist/contracts/personas.contract.d.ts.map +1 -1
  37. package/dist/contracts/providers.contract.d.ts +2 -0
  38. package/dist/contracts/providers.contract.d.ts.map +1 -1
  39. package/dist/contracts/providers.contract.js +4 -0
  40. package/dist/contracts/providers.contract.js.map +1 -1
  41. package/dist/contracts/runner.contract.d.ts +42 -10
  42. package/dist/contracts/runner.contract.d.ts.map +1 -1
  43. package/dist/contracts/sessions.contract.d.ts +17 -0
  44. package/dist/contracts/sessions.contract.d.ts.map +1 -1
  45. package/dist/contracts/settings.contract.d.ts +168 -6
  46. package/dist/contracts/settings.contract.d.ts.map +1 -1
  47. package/dist/contracts/settings.contract.js +7 -0
  48. package/dist/contracts/settings.contract.js.map +1 -1
  49. package/dist/contracts/system.contract.d.ts +16 -2
  50. package/dist/contracts/system.contract.d.ts.map +1 -1
  51. package/dist/contracts/workflows.contract.d.ts +30 -0
  52. package/dist/contracts/workflows.contract.d.ts.map +1 -1
  53. package/dist/contracts/workspace.contract.d.ts +3 -0
  54. package/dist/contracts/workspace.contract.d.ts.map +1 -1
  55. package/dist/events/agent-events.d.ts +74 -0
  56. package/dist/events/agent-events.d.ts.map +1 -1
  57. package/dist/events/agent-events.js +1 -0
  58. package/dist/events/agent-events.js.map +1 -1
  59. package/dist/events/requests.d.ts +45 -0
  60. package/dist/events/requests.d.ts.map +1 -1
  61. package/dist/events/system-events.d.ts +12 -0
  62. package/dist/events/system-events.d.ts.map +1 -1
  63. package/dist/events/transcript.d.ts +117 -0
  64. package/dist/events/transcript.d.ts.map +1 -1
  65. package/dist/index.d.ts +912 -79
  66. package/dist/index.d.ts.map +1 -1
  67. package/dist/index.js +11 -0
  68. package/dist/index.js.map +1 -1
  69. package/dist/models/agent-catalog.d.ts +18 -3
  70. package/dist/models/agent-catalog.d.ts.map +1 -1
  71. package/dist/models/agent-catalog.js +61 -12
  72. package/dist/models/agent-catalog.js.map +1 -1
  73. package/dist/models/agent-runtimes.d.ts +5 -2
  74. package/dist/models/agent-runtimes.d.ts.map +1 -1
  75. package/dist/models/agent-runtimes.js +73 -40
  76. package/dist/models/agent-runtimes.js.map +1 -1
  77. package/dist/models/model-setups.d.ts +5 -0
  78. package/dist/models/model-setups.d.ts.map +1 -1
  79. package/dist/models/provider-specs.d.ts +153 -32
  80. package/dist/models/provider-specs.d.ts.map +1 -1
  81. package/dist/models/provider-specs.js +97 -11
  82. package/dist/models/provider-specs.js.map +1 -1
  83. package/dist/policy/reserved-servers.d.ts.map +1 -1
  84. package/dist/policy/reserved-servers.js +1 -0
  85. package/dist/policy/reserved-servers.js.map +1 -1
  86. package/dist/policy/sandbox-power.d.ts +7 -2
  87. package/dist/policy/sandbox-power.d.ts.map +1 -1
  88. package/dist/policy/sandbox-power.js +34 -1
  89. package/dist/policy/sandbox-power.js.map +1 -1
  90. package/dist/policy/turned-away.d.ts.map +1 -1
  91. package/dist/policy/turned-away.js +1 -0
  92. package/dist/policy/turned-away.js.map +1 -1
  93. package/dist/protocol/doors/listener-protocol.d.ts +43 -1
  94. package/dist/protocol/doors/listener-protocol.d.ts.map +1 -1
  95. package/dist/protocol/doors/listener-protocol.js +10 -0
  96. package/dist/protocol/doors/listener-protocol.js.map +1 -1
  97. package/dist/protocol/raw/raw-json-routes.d.ts +92 -0
  98. package/dist/protocol/raw/raw-json-routes.d.ts.map +1 -1
  99. package/dist/protocol/raw/raw-json-routes.js +2 -1
  100. package/dist/protocol/raw/raw-json-routes.js.map +1 -1
  101. package/dist/protocol/raw/raw-routes.d.ts +13 -0
  102. package/dist/protocol/raw/raw-routes.d.ts.map +1 -1
  103. package/dist/protocol/raw/raw-routes.js +3 -0
  104. package/dist/protocol/raw/raw-routes.js.map +1 -1
  105. package/dist/schemas/activity.d.ts +2 -0
  106. package/dist/schemas/activity.d.ts.map +1 -1
  107. package/dist/schemas/agent.d.ts +34 -0
  108. package/dist/schemas/agent.d.ts.map +1 -1
  109. package/dist/schemas/agent.js +7 -6
  110. package/dist/schemas/agent.js.map +1 -1
  111. package/dist/schemas/agents-list.d.ts +7 -0
  112. package/dist/schemas/agents-list.d.ts.map +1 -1
  113. package/dist/schemas/agents.d.ts +18 -0
  114. package/dist/schemas/agents.d.ts.map +1 -1
  115. package/dist/schemas/ai-literacy.d.ts +54 -0
  116. package/dist/schemas/ai-literacy.d.ts.map +1 -0
  117. package/dist/schemas/ai-literacy.js +15 -0
  118. package/dist/schemas/ai-literacy.js.map +1 -0
  119. package/dist/schemas/audit.d.ts +166 -0
  120. package/dist/schemas/audit.d.ts.map +1 -0
  121. package/dist/schemas/audit.js +100 -0
  122. package/dist/schemas/audit.js.map +1 -0
  123. package/dist/schemas/automations.d.ts +27 -0
  124. package/dist/schemas/automations.d.ts.map +1 -1
  125. package/dist/schemas/automations.js +11 -0
  126. package/dist/schemas/automations.js.map +1 -1
  127. package/dist/schemas/ci.d.ts +10 -0
  128. package/dist/schemas/ci.d.ts.map +1 -1
  129. package/dist/schemas/compliance.d.ts +423 -0
  130. package/dist/schemas/compliance.d.ts.map +1 -0
  131. package/dist/schemas/compliance.js +135 -0
  132. package/dist/schemas/compliance.js.map +1 -0
  133. package/dist/schemas/data-protection.d.ts +28 -0
  134. package/dist/schemas/data-protection.d.ts.map +1 -0
  135. package/dist/schemas/data-protection.js +49 -0
  136. package/dist/schemas/data-protection.js.map +1 -0
  137. package/dist/schemas/devices.d.ts +12 -0
  138. package/dist/schemas/devices.d.ts.map +1 -1
  139. package/dist/schemas/engines.d.ts +22 -1
  140. package/dist/schemas/engines.d.ts.map +1 -1
  141. package/dist/schemas/engines.js +1 -1
  142. package/dist/schemas/engines.js.map +1 -1
  143. package/dist/schemas/extension-updates.d.ts +4 -0
  144. package/dist/schemas/extension-updates.d.ts.map +1 -1
  145. package/dist/schemas/git/git.d.ts +33 -0
  146. package/dist/schemas/git/git.d.ts.map +1 -1
  147. package/dist/schemas/git/git.js +29 -0
  148. package/dist/schemas/git/git.js.map +1 -1
  149. package/dist/schemas/hosts.d.ts +36 -0
  150. package/dist/schemas/hosts.d.ts.map +1 -1
  151. package/dist/schemas/hosts.js +2 -0
  152. package/dist/schemas/hosts.js.map +1 -1
  153. package/dist/schemas/intentic-os.d.ts +117 -0
  154. package/dist/schemas/intentic-os.d.ts.map +1 -0
  155. package/dist/schemas/intentic-os.js +66 -0
  156. package/dist/schemas/intentic-os.js.map +1 -0
  157. package/dist/schemas/loops.d.ts +15 -0
  158. package/dist/schemas/loops.d.ts.map +1 -1
  159. package/dist/schemas/members.d.ts +90 -0
  160. package/dist/schemas/members.d.ts.map +1 -1
  161. package/dist/schemas/members.js +73 -3
  162. package/dist/schemas/members.js.map +1 -1
  163. package/dist/schemas/needs.d.ts +56 -0
  164. package/dist/schemas/needs.d.ts.map +1 -1
  165. package/dist/schemas/offload.d.ts +5 -0
  166. package/dist/schemas/offload.d.ts.map +1 -1
  167. package/dist/schemas/personas.d.ts +10 -0
  168. package/dist/schemas/personas.d.ts.map +1 -1
  169. package/dist/schemas/providers/plan-limits.d.ts +20 -0
  170. package/dist/schemas/providers/plan-limits.d.ts.map +1 -1
  171. package/dist/schemas/providers/provider-oauth.js +1 -1
  172. package/dist/schemas/providers/provider-oauth.js.map +1 -1
  173. package/dist/schemas/providers/usage.d.ts +1 -0
  174. package/dist/schemas/providers/usage.d.ts.map +1 -1
  175. package/dist/schemas/providers/usage.js +4 -0
  176. package/dist/schemas/providers/usage.js.map +1 -1
  177. package/dist/schemas/settings.d.ts +161 -9
  178. package/dist/schemas/settings.d.ts.map +1 -1
  179. package/dist/schemas/settings.js +18 -1
  180. package/dist/schemas/settings.js.map +1 -1
  181. package/dist/schemas/system.d.ts +8 -0
  182. package/dist/schemas/system.d.ts.map +1 -1
  183. package/dist/schemas/system.js +2 -0
  184. package/dist/schemas/system.js.map +1 -1
  185. package/dist/schemas/workflows.d.ts +50 -0
  186. package/dist/schemas/workflows.d.ts.map +1 -1
  187. package/dist/schemas/workspace/workspace-tree.d.ts +4 -0
  188. package/dist/schemas/workspace/workspace-tree.d.ts.map +1 -1
  189. package/dist/schemas/workspace/workspace-tree.js +16 -1
  190. package/dist/schemas/workspace/workspace-tree.js.map +1 -1
  191. package/dist/state/definition.d.ts +80 -4
  192. package/dist/state/definition.d.ts.map +1 -1
  193. package/dist/state/history-state.d.ts.map +1 -1
  194. package/dist/state/history-state.js +2 -0
  195. package/dist/state/history-state.js.map +1 -1
  196. package/package.json +5 -5
  197. package/src/contracts/activity.contract.ts +1 -1
  198. package/src/contracts/agents.contract.ts +13 -1
  199. package/src/contracts/audit.contract.ts +48 -0
  200. package/src/contracts/compliance.contract.ts +57 -0
  201. package/src/contracts/providers.contract.ts +9 -0
  202. package/src/contracts/settings.contract.ts +7 -0
  203. package/src/events/agent-events.ts +4 -0
  204. package/src/index.ts +11 -0
  205. package/src/models/agent-catalog.test.ts +317 -53
  206. package/src/models/agent-catalog.ts +115 -22
  207. package/src/models/agent-runtimes.ts +273 -75
  208. package/src/models/capability-ledger.test.ts +12 -1
  209. package/src/models/provider-specs.test.ts +42 -7
  210. package/src/models/provider-specs.ts +160 -20
  211. package/src/policy/reserved-servers.ts +2 -1
  212. package/src/policy/sandbox-power.ts +67 -8
  213. package/src/policy/tests/sandbox-power.test.ts +59 -1
  214. package/src/policy/turned-away.ts +2 -0
  215. package/src/protocol/doors/listener-protocol.ts +74 -6
  216. package/src/protocol/raw/raw-json-routes.ts +2 -1
  217. package/src/protocol/raw/raw-routes.ts +7 -0
  218. package/src/schemas/activity.ts +2 -2
  219. package/src/schemas/agent.ts +22 -9
  220. package/src/schemas/ai-literacy.ts +17 -0
  221. package/src/schemas/audit.ts +131 -0
  222. package/src/schemas/automations.ts +13 -0
  223. package/src/schemas/compliance.ts +195 -0
  224. package/src/schemas/daemon-health.test.ts +2 -0
  225. package/src/schemas/data-protection.ts +99 -0
  226. package/src/schemas/engines.ts +1 -1
  227. package/src/schemas/git/git.ts +46 -0
  228. package/src/schemas/hosts.ts +5 -0
  229. package/src/schemas/intentic-os.test.ts +86 -0
  230. package/src/schemas/intentic-os.ts +130 -0
  231. package/src/schemas/members.test.ts +47 -0
  232. package/src/schemas/members.ts +141 -6
  233. package/src/schemas/providers/provider-oauth.ts +1 -1
  234. package/src/schemas/providers/usage.ts +8 -1
  235. package/src/schemas/settings.ts +42 -2
  236. package/src/schemas/system.ts +2 -0
  237. package/src/schemas/workspace/workspace-tree.ts +26 -1
  238. package/src/state/history-state.ts +7 -0
@@ -23,6 +23,12 @@ export const UsageTurnSchema = z.object({
23
23
  .optional()
24
24
  .describe("The model that was asked for, when one was named. Differs from `model` when something resolved it."),
25
25
  harness: z.string().describe("Which agentic loop it ran on."),
26
+ // The runtime that served it, resolved from provider and harness: `harness` is what was asked for, and rows written
27
+ // before requests were normalized carry "claude-code" for providers that only ever run their own loop.
28
+ runtime: z
29
+ .string()
30
+ .optional()
31
+ .describe("The runtime that actually served it (claude-code, codex, opencode, cursor, acp, pi…). Absent on rows written before it was recorded."),
26
32
  // cancelled: stopped before it finished, not a failure: the user pressed Stop, or a daemon restart cut it (then
27
33
  // `errorCode` is `interrupted` and `errorMessage` says what became of it).
28
34
  // error: the provider or request killed the turn.
@@ -81,7 +87,8 @@ export const UsageTurnSchema = z.object({
81
87
  mapArm: z.boolean().optional(),
82
88
  mapChars: z.number().optional(),
83
89
  // Which comparison `mapArm` belongs to: absent on the first map-or-none rows; "compact-vs-full" from 2026-10-06 to
84
- // 10-12, when the arm was the compact map and the holdout the full one; "map-vs-none" since, the map against none.
90
+ // 10-12, when the arm was the compact map and the holdout the full one; "map-vs-none" for 2026-10-12 to 10-13, the map
91
+ // against none; "map-vs-none-2" since, the same with readings off the main agent's calls and spawned children out.
85
92
  mapCohort: z.string().optional(),
86
93
  // Arm of the field-notes experiment, stable per conversation; notesChars is what the budget let through.
87
94
  notesArm: z.boolean().optional(),
@@ -11,6 +11,7 @@ import { SessionsPlacementSchema } from "./offload.js";
11
11
  import { LimitPolicySchema, RetryPolicySchema, RoomPolicySchema } from "./turn-break.js";
12
12
  import { ZoneSchema } from "../time/zone.js";
13
13
  import { VoiceSettingsSchema } from "./voice.js";
14
+ import { AiNoticeSchema, AuditSettingsSchema, RetentionSettingsSchema } from "./data-protection.js";
14
15
  // Which prompt base the agent runs before this turn composes anything on top: Intentic's own (default), Claude Code's
15
16
  // preset, or the owner's text. Declared out here since both the daemon and the browser branch on it.
16
17
  // Kept in the daemon's auth root, never in SandboxSettings: an agent cannot edit its execution boundary.
@@ -566,6 +567,25 @@ export const SandboxSettingsSchema = z.object({
566
567
  voice: VoiceSettingsSchema.prefault({}).describe(
567
568
  "How the agent's replies are spoken aloud: whether a hands-free conversation is answered out loud, which voice speaks each language, and a speech provider of your own if you connected one.",
568
569
  ),
570
+ // What a data protection officer asks about (schemas/data-protection.ts). Every default is the behaviour from before
571
+ // these existed; the public-office preset on the data protection page is what turns them on, never a default.
572
+ retention: RetentionSettingsSchema.prefault({}).describe(
573
+ "How long this sandbox keeps each kind of copy it makes of what people and agents wrote: transcripts, restore points, the privacy shield's memory, converted documents and raw command output. Each defaults to forever.",
574
+ ),
575
+ audit: AuditSettingsSchema.prefault({}).describe(
576
+ "The audit trail: who changed a policy, a member, a gate or a setting, and optionally who read what. How long it is kept, and where a copy is sent.",
577
+ ),
578
+ // Read by the editor, not the daemon: the product analytics run in the browser, so the switch is honoured there for
579
+ // as long as this sandbox is the one open.
580
+ productAnalytics: z
581
+ .boolean()
582
+ .default(true)
583
+ .describe(
584
+ "Let Intentic's product analytics (usage events and session recordings in the editor, for people who agreed to them) run while this sandbox is open. Off sends nothing about any visit to this sandbox, whatever each person agreed to.",
585
+ ),
586
+ aiNotice: AiNoticeSchema.prefault({}).describe(
587
+ "A notice members confirm once, telling them they are working with an AI and what to check before relying on it.",
588
+ ),
569
589
  // Defaults all-allow, so a fresh sandbox behaves as it did before this floor existed.
570
590
  admission: AdmissionPolicySchema.prefault({}).describe(
571
591
  "Whether work started from outside may run, per kind of trigger: let it, hold it for approval, or refuse it. Composes with each automation's own setting, and the stricter of the two wins, so holding every visitor's message needs no edit to each automation.",
@@ -601,6 +621,18 @@ export const SandboxSettingsSchema = z.object({
601
621
  .max(10)
602
622
  .default(3)
603
623
  .describe("How many levels deep the delegation may go, since a subagent can start subagents of its own."),
624
+ // Width again, for a team-chat automation rather than a turn: each thread a message lands in is a conversation of
625
+ // its own, and threads of one automation are worked on side by side up to this many (automations/scheduler.ts in
626
+ // the daemon); one more waits, told it is queued, until a slot frees. Read per fire, so a change holds from the next
627
+ // thread on.
628
+ automationThreadsAtOnce: z
629
+ .number()
630
+ .min(1)
631
+ .max(20)
632
+ .default(3)
633
+ .describe(
634
+ "How many threads of one team-chat automation may be worked on at the same time. Each is its own agent turn, so this is how many agents one busy channel can start at once.",
635
+ ),
604
636
  });
605
637
  export type SandboxSettings = z.infer<typeof SandboxSettingsSchema>;
606
638
  // What a save takes: the settings as read, less what is only read. `turn.ending` holds only the checks a repository
@@ -685,17 +717,19 @@ export const InputSavingsSchema = z.object({
685
717
  export type InputSavings = z.infer<typeof InputSavingsSchema>;
686
718
  // One arm of a turn-level experiment; mean is per turn, since the two arms never hold the same count.
687
719
  // `mean` is over samples capped at both arms' pooled 95th percentile, so one runaway conversation cannot carry an arm.
720
+ // For a yes/no reading (`openedWithListing`) it is the share of yeses, 0 to 1, and uncapped.
688
721
  export const SavingsArmSchema = z.object({ turns: z.number(), mean: z.number() });
689
722
  // One metric's reading of a turn-level experiment (the two arms, plus the arithmetic over them). `metric` says what
690
723
  // `mean`/`deltaPct` count:
691
724
  // searchCalls: searches a turn ran (the search teaching).
692
725
  // openingSearches: same, narrowed to before the turn first touched a file.
693
- // openingListings: directory listings a turn ran to orient itself (the project map).
726
+ // openedWithListing: whether a turn listed directories to orient itself, as a share of turns (the project map).
694
727
  // callsBeforeTarget: how far a turn walked before touching a file it went on to edit.
695
728
  // failedCalls: tool calls that ended in error (the field notes, whose largest section is a failure taxonomy).
729
+ // Every reading is the main agent's own: a subagent's calls are counted toward the turn and read for nothing.
696
730
  // Never cost: each mechanism moves one small part of a turn's work, inside the noise of the rest.
697
731
  export const TurnMetricReadingSchema = z.object({
698
- metric: z.enum(["searchCalls", "openingSearches", "openingListings", "callsBeforeTarget", "failedCalls"]),
732
+ metric: z.enum(["searchCalls", "openingSearches", "openedWithListing", "callsBeforeTarget", "failedCalls"]),
699
733
  on: SavingsArmSchema,
700
734
  off: SavingsArmSchema,
701
735
  // Additional control turns to reach a fixed target resolution, not today's delta (which inherits noise and always
@@ -728,6 +762,12 @@ export const TurnExperimentSchema = z.object({
728
762
  // Content-addressed treatment version; the reader filters to the latest so two instruction revisions don't blur
729
763
  // into one experiment.
730
764
  cohort: z.string().optional(),
765
+ // The latest earlier cohort that reached an answer, with only its answered readings (a margin, with or without a
766
+ // delta), so restarting a comparison does not wipe a finding off the screen while the new one is early. `from` and
767
+ // `to` are its first and last measured turn inside the window read, epoch ms. Absent when no earlier one answered.
768
+ previous: z
769
+ .object({ from: z.number(), to: z.number(), cohort: z.string().optional(), metrics: z.array(TurnMetricReadingSchema) })
770
+ .optional(),
731
771
  });
732
772
  export type TurnExperiment = z.infer<typeof TurnExperimentSchema>;
733
773
  // What the settings row can say about the brief without opening it: whether there is one, how much of it this budget
@@ -390,6 +390,7 @@ export const DaemonHealthSchema = z.object({
390
390
  // How the world reaches here: a dialed tunnel, or loopback only.
391
391
  reachedBy: z.enum(["tunnel", "loopback"]),
392
392
  build: BuildStampSchema,
393
+ atRestEncryption: z.object({ active: z.boolean(), stores: z.array(z.string()) }),
393
394
  // Which proofs this daemon takes to open a session, read before any sign-in since the route list arrives only after
394
395
  // one. Absent on a daemon from before email sign-in: Google, and the owner ticket on a hosted machine.
395
396
  signIn: z.object({ proofs: z.array(ProofMethodSchema) }).optional(),
@@ -410,6 +411,7 @@ export const DaemonHealthReadingSchema = z.object({
410
411
  reach: ReachStateSchema.optional().catch(undefined),
411
412
  reachedBy: z.string().optional().catch(undefined),
412
413
  build: BuildStampSchema.optional().catch(undefined),
414
+ atRestEncryption: z.object({ active: z.boolean(), stores: z.array(z.string()) }).optional().catch(undefined),
413
415
  // Proof names this build may not know are kept as text, so a newer daemon's list still reads.
414
416
  signIn: z
415
417
  .object({ proofs: z.array(z.string()).catch([]) })
@@ -295,9 +295,34 @@ export const WorkspaceResolveQuerySchema = WorkspaceScopeSchema.extend({
295
295
  "The reference as somebody wrote it. Often only the tail of the real path, which is why this is matched against the tree rather than read as-is.",
296
296
  ),
297
297
  });
298
+ // Three answers, told apart by which fields are present: one file (`path` alone), several equally plausible ones (`path`
299
+ // with `others`), or none (no `path`, perhaps `nearby`). "None" is an answer, not a path to try: opening the reference as
300
+ // written then fails as if the file had been deleted, when it never existed under that name.
298
301
  export const WorkspaceResolveSchema = z.object({
299
- path: z.string().optional().describe("The real path it means. Absent when nothing in the workspace ends that way."),
302
+ path: z
303
+ .string()
304
+ .optional()
305
+ .describe(
306
+ "The real path it means: the only match, or the most likely of several. Absent when nothing in that copy of the workspace ends that way.",
307
+ ),
308
+ others: z
309
+ .array(z.string())
310
+ .optional()
311
+ .describe("The other files it could just as well mean, most likely first, when more than one ends that way. Absent when it names exactly one."),
312
+ renamedFrom: z
313
+ .string()
314
+ .optional()
315
+ .describe(
316
+ "The path the reference named, when the conversation has since renamed or moved that file to `path`. Absent for a file still under the name it was given.",
317
+ ),
318
+ nearby: z
319
+ .array(z.string())
320
+ .optional()
321
+ .describe(
322
+ "Only when nothing matched: files it may have meant instead, most likely first. A file in the folder it named whose name contains the one asked for (renamed in place), then files with that same name elsewhere (moved).",
323
+ ),
300
324
  });
325
+ export type WorkspaceResolve = z.infer<typeof WorkspaceResolveSchema>;
301
326
  // Direct file management (delete, new folder, rename/move, copy). Byte writes and editor saves go through POST
302
327
  // /workspace/upload instead, since oRPC can't carry a body.
303
328
  export const WorkspaceDirSchema = z.object({ path: z.string().min(1).describe("The folder to create. Missing folders above it are created too.") });
@@ -35,7 +35,14 @@ export const HISTORY_STATE_FILES: readonly StateFile[] = [
35
35
  // address (settings/member-getting-started.ts). Carried for the same reason: a checklist someone put away should not
36
36
  // come back after a move.
37
37
  { path: "member-getting-started.json", portability: "carry" },
38
+ // Who confirmed the AI notice, and which wording (settings/member-ai-literacy.ts). Carried: it is the record an office
39
+ // shows for the AI Act's literacy duty, and a move must not make everyone confirm again or lose who already did.
40
+ { path: "member-ai-literacy.json", portability: "carry" },
38
41
  { path: "activity.jsonl", portability: "carry" },
42
+ // The audit trail (one hash-chained file per month, the checkpoint retention leaves, the forwarder's cursor and the
43
+ // audit settings last seen). Carried: an office's trail has to survive the sandbox moving, and a fresh chain on the
44
+ // target would read as the old one having been deleted.
45
+ { path: "audit/", portability: "carry" },
39
46
  { path: "usage.jsonl", portability: "carry" },
40
47
  { path: "account-usage.json", portability: "carry" },
41
48
  // Per-account stay-away for a provider's usage endpoint. Carried, not re-earned: earning one costs the very read it