@intentic/sandbox-contract 1.422.0 → 1.424.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 (204) hide show
  1. package/dist/chores/chores.d.ts.map +1 -1
  2. package/dist/chores/chores.js +1 -48
  3. package/dist/chores/chores.js.map +1 -1
  4. package/dist/chores/index.d.ts +1 -1
  5. package/dist/chores/index.d.ts.map +1 -1
  6. package/dist/chores/index.js +1 -1
  7. package/dist/chores/index.js.map +1 -1
  8. package/dist/chores/prompt.d.ts +0 -1
  9. package/dist/chores/prompt.d.ts.map +1 -1
  10. package/dist/chores/prompt.js +0 -2
  11. package/dist/chores/prompt.js.map +1 -1
  12. package/dist/contracts/capabilities.contract.d.ts +0 -28
  13. package/dist/contracts/capabilities.contract.d.ts.map +1 -1
  14. package/dist/contracts/issues.contract.d.ts +6 -0
  15. package/dist/contracts/issues.contract.d.ts.map +1 -1
  16. package/dist/contracts/offload.contract.d.ts +14 -14
  17. package/dist/contracts/panels.contract.d.ts +0 -7
  18. package/dist/contracts/panels.contract.d.ts.map +1 -1
  19. package/dist/contracts/seal.contract.d.ts +1 -25
  20. package/dist/contracts/seal.contract.d.ts.map +1 -1
  21. package/dist/contracts/seal.contract.js +3 -14
  22. package/dist/contracts/seal.contract.js.map +1 -1
  23. package/dist/contracts/secrets.contract.d.ts +2 -17
  24. package/dist/contracts/secrets.contract.d.ts.map +1 -1
  25. package/dist/contracts/secrets.contract.js +2 -2
  26. package/dist/contracts/secrets.contract.js.map +1 -1
  27. package/dist/contracts/settings.contract.d.ts +0 -135
  28. package/dist/contracts/settings.contract.d.ts.map +1 -1
  29. package/dist/contracts/system.contract.d.ts +18 -18
  30. package/dist/contracts/workspace.contract.d.ts +0 -60
  31. package/dist/contracts/workspace.contract.d.ts.map +1 -1
  32. package/dist/contracts/workspace.contract.js +1 -11
  33. package/dist/contracts/workspace.contract.js.map +1 -1
  34. package/dist/ids/project-id.d.ts +3 -0
  35. package/dist/ids/project-id.d.ts.map +1 -0
  36. package/dist/ids/project-id.js +25 -0
  37. package/dist/ids/project-id.js.map +1 -0
  38. package/dist/ids/tunnel-ids.d.ts +0 -1
  39. package/dist/ids/tunnel-ids.d.ts.map +1 -1
  40. package/dist/ids/tunnel-ids.js +0 -1
  41. package/dist/ids/tunnel-ids.js.map +1 -1
  42. package/dist/index.d.ts +0 -4
  43. package/dist/index.d.ts.map +1 -1
  44. package/dist/index.js +0 -4
  45. package/dist/index.js.map +1 -1
  46. package/dist/models/model-roles.d.ts +1 -1
  47. package/dist/models/model-roles.d.ts.map +1 -1
  48. package/dist/models/model-roles.js +1 -1
  49. package/dist/models/model-roles.js.map +1 -1
  50. package/dist/protocol/doors/sandbox-pass.d.ts +22 -0
  51. package/dist/protocol/doors/sandbox-pass.d.ts.map +1 -0
  52. package/dist/protocol/doors/sandbox-pass.js +72 -0
  53. package/dist/protocol/doors/sandbox-pass.js.map +1 -0
  54. package/dist/protocol/raw/raw-json-routes.d.ts +92 -9
  55. package/dist/protocol/raw/raw-json-routes.d.ts.map +1 -1
  56. package/dist/protocol/raw/raw-json-routes.js +6 -2
  57. package/dist/protocol/raw/raw-json-routes.js.map +1 -1
  58. package/dist/protocol/raw/raw-routes.d.ts +16 -7
  59. package/dist/protocol/raw/raw-routes.d.ts.map +1 -1
  60. package/dist/protocol/raw/raw-routes.js +4 -2
  61. package/dist/protocol/raw/raw-routes.js.map +1 -1
  62. package/dist/schemas/capabilities.d.ts +0 -14
  63. package/dist/schemas/capabilities.d.ts.map +1 -1
  64. package/dist/schemas/capabilities.js +0 -4
  65. package/dist/schemas/capabilities.js.map +1 -1
  66. package/dist/schemas/certificate-request.d.ts +0 -2
  67. package/dist/schemas/certificate-request.d.ts.map +1 -1
  68. package/dist/schemas/issues.d.ts +133 -0
  69. package/dist/schemas/issues.d.ts.map +1 -1
  70. package/dist/schemas/issues.js +34 -0
  71. package/dist/schemas/issues.js.map +1 -1
  72. package/dist/schemas/maintenance.d.ts.map +1 -1
  73. package/dist/schemas/maintenance.js +16 -10
  74. package/dist/schemas/maintenance.js.map +1 -1
  75. package/dist/schemas/metrics.d.ts.map +1 -1
  76. package/dist/schemas/metrics.js.map +1 -1
  77. package/dist/schemas/panels.d.ts +0 -14
  78. package/dist/schemas/panels.d.ts.map +1 -1
  79. package/dist/schemas/panels.js +0 -6
  80. package/dist/schemas/panels.js.map +1 -1
  81. package/dist/schemas/personas.d.ts.map +1 -1
  82. package/dist/schemas/personas.js +0 -6
  83. package/dist/schemas/personas.js.map +1 -1
  84. package/dist/schemas/providers/usage.d.ts +0 -12
  85. package/dist/schemas/providers/usage.d.ts.map +1 -1
  86. package/dist/schemas/providers/usage.js +0 -5
  87. package/dist/schemas/providers/usage.js.map +1 -1
  88. package/dist/schemas/seal.d.ts +2 -21
  89. package/dist/schemas/seal.d.ts.map +1 -1
  90. package/dist/schemas/seal.js +1 -16
  91. package/dist/schemas/seal.js.map +1 -1
  92. package/dist/schemas/secrets.d.ts +1 -22
  93. package/dist/schemas/secrets.d.ts.map +1 -1
  94. package/dist/schemas/secrets.js +3 -13
  95. package/dist/schemas/secrets.js.map +1 -1
  96. package/dist/schemas/settings-experiments.d.ts +0 -4
  97. package/dist/schemas/settings-experiments.d.ts.map +1 -1
  98. package/dist/schemas/settings-experiments.js +0 -12
  99. package/dist/schemas/settings-experiments.js.map +1 -1
  100. package/dist/schemas/settings-history.d.ts +1 -1
  101. package/dist/schemas/settings-history.d.ts.map +1 -1
  102. package/dist/schemas/settings-history.js +1 -0
  103. package/dist/schemas/settings-history.js.map +1 -1
  104. package/dist/schemas/settings-savings.d.ts +0 -144
  105. package/dist/schemas/settings-savings.d.ts.map +1 -1
  106. package/dist/schemas/settings-savings.js +1 -3
  107. package/dist/schemas/settings-savings.js.map +1 -1
  108. package/dist/schemas/settings.d.ts +0 -4
  109. package/dist/schemas/settings.d.ts.map +1 -1
  110. package/dist/schemas/settings.js +2 -3
  111. package/dist/schemas/settings.js.map +1 -1
  112. package/dist/schemas/short-codes.d.ts +0 -10
  113. package/dist/schemas/short-codes.d.ts.map +1 -1
  114. package/dist/schemas/short-codes.js +1 -9
  115. package/dist/schemas/short-codes.js.map +1 -1
  116. package/dist/schemas/workspace/workspace-search.d.ts +0 -12
  117. package/dist/schemas/workspace/workspace-search.d.ts.map +1 -1
  118. package/dist/schemas/workspace/workspace-search.js +5 -12
  119. package/dist/schemas/workspace/workspace-search.js.map +1 -1
  120. package/dist/state/definition.d.ts +0 -24
  121. package/dist/state/definition.d.ts.map +1 -1
  122. package/dist/state/update-probation.d.ts +1 -1
  123. package/dist/state/update-probation.d.ts.map +1 -1
  124. package/dist/state/update-probation.js +1 -1
  125. package/dist/state/update-probation.js.map +1 -1
  126. package/dist/state/workspace-state.d.ts +6 -1
  127. package/dist/state/workspace-state.d.ts.map +1 -1
  128. package/dist/state/workspace-state.js +7 -1
  129. package/dist/state/workspace-state.js.map +1 -1
  130. package/package.json +27 -5
  131. package/src/chores/chores.test.ts +1 -2
  132. package/src/chores/chores.ts +2 -62
  133. package/src/chores/index.ts +1 -1
  134. package/src/chores/prompt.ts +1 -6
  135. package/src/chores/verdict.test.ts +3 -44
  136. package/src/contracts/seal.contract.ts +3 -18
  137. package/src/contracts/secrets.contract.ts +4 -5
  138. package/src/contracts/workspace.contract.ts +2 -14
  139. package/src/events/system-events.ts +2 -2
  140. package/src/ids/project-id.test.ts +26 -0
  141. package/src/ids/project-id.ts +34 -0
  142. package/src/ids/tunnel-ids.test.ts +2 -23
  143. package/src/ids/tunnel-ids.ts +0 -4
  144. package/src/index.ts +0 -6
  145. package/src/models/model-roles.ts +3 -1
  146. package/src/policy/persona-capability.ts +1 -1
  147. package/src/protocol/doors/sandbox-pass.test.ts +51 -0
  148. package/src/protocol/doors/sandbox-pass.ts +119 -0
  149. package/src/protocol/headers.ts +2 -2
  150. package/src/protocol/member-reach.test.ts +0 -1
  151. package/src/protocol/raw/raw-json-routes.ts +14 -2
  152. package/src/protocol/raw/raw-routes.ts +9 -5
  153. package/src/protocol/routes.test.ts +0 -4
  154. package/src/schemas/capabilities.ts +0 -6
  155. package/src/schemas/issues.ts +54 -0
  156. package/src/schemas/maintenance.ts +20 -12
  157. package/src/schemas/metrics.ts +2 -0
  158. package/src/schemas/panels.ts +0 -8
  159. package/src/schemas/personas.ts +2 -6
  160. package/src/schemas/providers/usage.ts +5 -14
  161. package/src/schemas/seal.ts +5 -30
  162. package/src/schemas/secrets.ts +8 -20
  163. package/src/schemas/settings-experiments.ts +0 -17
  164. package/src/schemas/settings-history.ts +3 -0
  165. package/src/schemas/settings-savings.ts +2 -9
  166. package/src/schemas/settings.test.ts +16 -9
  167. package/src/schemas/settings.ts +4 -4
  168. package/src/schemas/short-codes.ts +2 -14
  169. package/src/schemas/version-seam.test.ts +2 -2
  170. package/src/schemas/workspace/workspace-search.ts +12 -25
  171. package/src/state/update-probation.ts +4 -3
  172. package/src/state/workspace-state.test.ts +2 -2
  173. package/src/state/workspace-state.ts +10 -1
  174. package/src/text/path-refs.test.ts +1 -1
  175. package/dist/contracts/intentic.contract.d.ts +0 -30
  176. package/dist/contracts/intentic.contract.d.ts.map +0 -1
  177. package/dist/contracts/intentic.contract.js +0 -34
  178. package/dist/contracts/intentic.contract.js.map +0 -1
  179. package/dist/contracts/inventory.contract.d.ts +0 -138
  180. package/dist/contracts/inventory.contract.d.ts.map +0 -1
  181. package/dist/contracts/inventory.contract.js +0 -31
  182. package/dist/contracts/inventory.contract.js.map +0 -1
  183. package/dist/schemas/codebase-health.d.ts +0 -56
  184. package/dist/schemas/codebase-health.d.ts.map +0 -1
  185. package/dist/schemas/codebase-health.js +0 -43
  186. package/dist/schemas/codebase-health.js.map +0 -1
  187. package/dist/schemas/intentic.d.ts +0 -5
  188. package/dist/schemas/intentic.d.ts.map +0 -1
  189. package/dist/schemas/intentic.js +0 -3
  190. package/dist/schemas/intentic.js.map +0 -1
  191. package/dist/schemas/inventory.d.ts +0 -175
  192. package/dist/schemas/inventory.d.ts.map +0 -1
  193. package/dist/schemas/inventory.js +0 -62
  194. package/dist/schemas/inventory.js.map +0 -1
  195. package/dist/schemas/seal-proof.d.ts +0 -20
  196. package/dist/schemas/seal-proof.d.ts.map +0 -1
  197. package/dist/schemas/seal-proof.js +0 -8
  198. package/dist/schemas/seal-proof.js.map +0 -1
  199. package/src/contracts/intentic.contract.ts +0 -45
  200. package/src/contracts/inventory.contract.ts +0 -35
  201. package/src/schemas/codebase-health.ts +0 -60
  202. package/src/schemas/intentic.ts +0 -2
  203. package/src/schemas/inventory.ts +0 -83
  204. package/src/schemas/seal-proof.ts +0 -12
@@ -0,0 +1,119 @@
1
+ import { createPrivateKey, createPublicKey, randomBytes, sign as edSign, verify as edVerify } from "node:crypto";
2
+ import { parseJsonWith } from "@intentic/base/json";
3
+ import { z } from "zod";
4
+ import { SANDBOX_ID } from "../../ids/tunnel-ids.js";
5
+
6
+ // The platform's signed word that one sandbox may report to another ON THE SAME ACCOUNT about one project: the
7
+ // credential behind account-level report routing. The sending daemon asks the platform who owns a project
8
+ // (`projectResolve`, authenticated by its connect token, so `from` is the platform's own reading, never the sender's
9
+ // claim); the platform answers with the owner's address and this pass; the receiving daemon checks it against the
10
+ // platform's identity key it already holds (the announce answer's `identityKey`). Signed with the same key as the
11
+ // identity assertion, under its own prefix, so neither can ever stand in for the other.
12
+
13
+ const PASS_PREFIX = "sp1";
14
+
15
+ // Long enough for an outbox to drain a few reports through one resolve; short enough that a lifted pass is soon dead.
16
+ export const SANDBOX_PASS_TTL_MS = 10 * 60_000;
17
+ // What a daemon accepts whatever the claim says, so a platform minting with a wrong ttl cannot hand out a long credential.
18
+ export const SANDBOX_PASS_MAX_TTL_MS = 15 * 60_000;
19
+
20
+ // The header a pass rides on the receiving daemon's `/account/` routes.
21
+ export const SANDBOX_PASS_HEADER = "x-intentic-sandbox-pass";
22
+
23
+ export interface SandboxPass {
24
+ // The sending sandbox's tunnel id, and the name its owner gave it (for the inbox; display only).
25
+ readonly from: string;
26
+ readonly fromName: string;
27
+ // The receiving sandbox's tunnel id: a daemon refuses a pass addressed to anyone else.
28
+ readonly to: string;
29
+ // The normalized project id the receiver claims (project-id.ts).
30
+ readonly project: string;
31
+ readonly issuedAt: number;
32
+ readonly expiresAt: number;
33
+ }
34
+
35
+ const base64url = (bytes: Buffer): string => bytes.toString("base64url");
36
+
37
+ // The prefix is part of what is signed: a pass is never a valid signature over an identity assertion, nor the reverse.
38
+ const signedBytes = (payload: Buffer): Buffer => Buffer.concat([Buffer.from(`${PASS_PREFIX}.`, "utf8"), payload]);
39
+
40
+ export const isSandboxPass = (token: string): boolean => token.startsWith(`${PASS_PREFIX}.`);
41
+
42
+ export const mintSandboxPass = (
43
+ privateKeyPem: string,
44
+ claim: {
45
+ readonly from: string;
46
+ readonly fromName: string;
47
+ readonly to: string;
48
+ readonly project: string;
49
+ readonly issuedAtMs: number;
50
+ readonly ttlMs?: number;
51
+ },
52
+ ): string => {
53
+ if (!SANDBOX_ID.test(claim.from) || !SANDBOX_ID.test(claim.to)) {
54
+ throw new Error("a sandbox pass names two 12-hex sandbox ids");
55
+ }
56
+ if (claim.from === claim.to) {
57
+ throw new Error("a sandbox pass is from one sandbox to another");
58
+ }
59
+ if (claim.project.trim() === "") {
60
+ throw new Error("a sandbox pass names a project");
61
+ }
62
+ const ttlMs = claim.ttlMs ?? SANDBOX_PASS_TTL_MS;
63
+ if (ttlMs <= 0 || ttlMs > SANDBOX_PASS_MAX_TTL_MS) {
64
+ throw new Error(`a sandbox pass lives at most ${SANDBOX_PASS_MAX_TTL_MS} ms`);
65
+ }
66
+ const payload = Buffer.from(
67
+ JSON.stringify({
68
+ v: 1,
69
+ iss: claim.from,
70
+ name: claim.fromName.slice(0, 120),
71
+ aud: claim.to,
72
+ prj: claim.project,
73
+ iat: Math.floor(claim.issuedAtMs / 1000),
74
+ exp: Math.floor((claim.issuedAtMs + ttlMs) / 1000),
75
+ jti: base64url(randomBytes(12)),
76
+ }),
77
+ "utf8",
78
+ );
79
+ const signature = edSign(null, signedBytes(payload), createPrivateKey(privateKeyPem));
80
+ return `${PASS_PREFIX}.${base64url(payload)}.${base64url(signature)}`;
81
+ };
82
+
83
+ const PassPayloadSchema = z.object({
84
+ v: z.literal(1),
85
+ iss: z.string().regex(SANDBOX_ID),
86
+ name: z.string(),
87
+ aud: z.string().regex(SANDBOX_ID),
88
+ prj: z.string().min(1),
89
+ iat: z.number(),
90
+ exp: z.number(),
91
+ jti: z.string().min(1),
92
+ });
93
+
94
+ // Verifies a pass against the platform's public key at nowMs; undefined for any way of being invalid (wrong prefix, bad
95
+ // signature, malformed claim, expired, issued in the future, living longer than allowed). The caller checks `to`
96
+ // against its own id and `project` against its own claims.
97
+ export const verifySandboxPass = (publicKeyPem: string, token: string, nowMs: number): SandboxPass | undefined => {
98
+ const [prefix, encodedPayload, encodedSignature, ...rest] = token.split(".");
99
+ if (prefix !== PASS_PREFIX || encodedPayload === undefined || encodedSignature === undefined || rest.length > 0) {
100
+ return undefined;
101
+ }
102
+ const payload = Buffer.from(encodedPayload, "base64url");
103
+ try {
104
+ if (!edVerify(null, signedBytes(payload), createPublicKey(publicKeyPem), Buffer.from(encodedSignature, "base64url"))) {
105
+ return undefined;
106
+ }
107
+ } catch {
108
+ // allow(silent-catch): a key or signature that does not parse verifies nothing: the pass is invalid, said as undefined.
109
+ return undefined;
110
+ }
111
+ const claim = parseJsonWith(payload.toString("utf8"), PassPayloadSchema);
112
+ if (claim === undefined || claim.iss === claim.aud) {
113
+ return undefined;
114
+ }
115
+ if (claim.exp * 1000 <= nowMs || claim.iat * 1000 > nowMs + 60_000 || (claim.exp - claim.iat) * 1000 > SANDBOX_PASS_MAX_TTL_MS) {
116
+ return undefined;
117
+ }
118
+ return { from: claim.iss, fromName: claim.name, to: claim.aud, project: claim.prj, issuedAt: claim.iat, expiresAt: claim.exp };
119
+ };
@@ -4,8 +4,8 @@
4
4
  export const REQUEST_ID_HEADER = "x-intentic-request-id";
5
5
 
6
6
  // The header a sandbox's connect token travels in: the platform's routes a sandbox calls as itself
7
- // (api-contract's PLATFORM_INGRESS), the daemon's own gate, which takes the token from `ic` and the owner's browser,
8
- // and its `/enroll`. `ic` spells it in Rust; api-contract's ingress test holds that spelling to this value.
7
+ // (api-contract's PLATFORM_INGRESS) and the daemon's own gate, which takes the token from `ic` and the owner's
8
+ // browser. `ic` spells it in Rust; api-contract's ingress test holds that spelling to this value.
9
9
  export const CONNECT_TOKEN_HEADER = "x-intentic-connect";
10
10
 
11
11
  // The header an extension's backend and its processes present their per-extension token in, checked against the
@@ -143,7 +143,6 @@ describe("memberRefusal for a person given part of the sandbox", () => {
143
143
  expect(memberRefusal(maintainer, "GET", "/members")).toBeUndefined();
144
144
  expect(memberRefusal(maintainer, "POST", "/privacy/reveal")).toBeUndefined();
145
145
  expect(memberRefusal(maintainer, "POST", "/settings/agent-domain")).toBeUndefined();
146
- expect(memberRefusal(maintainer, "POST", "/system/enroll/code")).toBeUndefined();
147
146
  expect(memberRefusal(maintainer, "POST", "/system/passkeys/policy")).toMatchObject({ floor: "owner" });
148
147
  expect(memberRefusal(maintainer, "POST", "/platform/relink")).toMatchObject({ floor: "owner" });
149
148
  });
@@ -37,7 +37,7 @@ import {
37
37
  PhonePasswordsPairSchema,
38
38
  } from "../../schemas/phone-passwords.js";
39
39
  import { OkSchema } from "../../schemas/shared.js";
40
- import { EnrollCodeAnswerSchema, EnrollCodeRequestSchema, PeerPairingAnswerSchema, SyncPairAnswerSchema, SyncPairRequestSchema } from "../../schemas/short-codes.js";
40
+ import { PeerPairingAnswerSchema, SyncPairAnswerSchema, SyncPairRequestSchema } from "../../schemas/short-codes.js";
41
41
  import { SpeechStatusSchema, SpeechTranscriptSchema, SpeechWakeClaimSchema, SpeechWakeGrantSchema } from "../../schemas/speech.js";
42
42
  import {
43
43
  AuthenticationOptionsSchema,
@@ -74,6 +74,14 @@ import {
74
74
  LinkWriteAnswerSchema,
75
75
  LinkWriteSchema,
76
76
  } from "../../schemas/links.js";
77
+ import {
78
+ AccountOutboxSchema,
79
+ AccountProjectsSchema,
80
+ AccountReportSchema,
81
+ AccountSendOutcomeSchema,
82
+ AccountSendSchema,
83
+ IssueAcceptedSchema,
84
+ } from "../../schemas/issues.js";
77
85
  import { UploadManifestSchema, UploadSkipSchema } from "../../schemas/workspace/workspace-upload.js";
78
86
  import {
79
87
  ArrivalAbandonedSchema,
@@ -111,7 +119,6 @@ export const RAW_JSON_ROUTES = {
111
119
  // The voices a sandbox speaks with, for the Voice settings (schemas/voice.ts).
112
120
  "GET /speech/voices": { output: VoicesViewSchema },
113
121
  // A server-connect code for the owner's command (short-codes.ts).
114
- "POST /system/enroll/code": { input: EnrollCodeRequestSchema, output: EnrollCodeAnswerSchema },
115
122
  // The roster is ownership's; every write answers the roster after it.
116
123
  "GET /members": { output: MembersRosterSchema },
117
124
  "POST /members": { input: MemberGrantSchema, output: MembersListSchema },
@@ -185,6 +192,11 @@ export const RAW_JSON_ROUTES = {
185
192
  "POST /system/links/{id}": { input: InboundLinkTermsUpdateSchema, output: InboundLinkSummarySchema },
186
193
  "DELETE /system/links/{id}": { output: OkSchema },
187
194
  "POST /system/links/{id}/requests/{request}": { input: LinkRequestDecisionSchema, output: InboundLinkSummarySchema },
195
+ // Another sandbox on the owner's account reporting a problem about a project this one claims (schemas/issues.ts).
196
+ "POST /account/report": { input: AccountReportSchema, output: IssueAcceptedSchema },
197
+ "POST /account/outbox": { input: AccountSendSchema, output: AccountSendOutcomeSchema },
198
+ "GET /account/outbox": { output: AccountOutboxSchema },
199
+ "GET /account/projects": { output: AccountProjectsSchema },
188
200
  // The link doors, as the asking sandbox's daemon reads them. A status takes `?after=<version>&wait=<seconds>` to
189
201
  // be held until it moves past that version.
190
202
  "GET /link": { output: LinkHelloSchema },
@@ -66,11 +66,6 @@ export const RAW_ROUTES = {
66
66
  "GET /system/browser-view": { auth: "door", beforeBoot: true, control: "never" },
67
67
  // The sandbox's own desktop, watched and driven by the owner (desktop/desktop-view.ts); the same query ticket.
68
68
  "GET /system/desktop-view": { auth: "door", beforeBoot: true, control: "never" },
69
- // Deploy-target enrollment, gated by the connect token.
70
- "POST /enroll": { auth: "door", control: "never" },
71
- // A server-connect code for the command that connects a server: its single-use enroll token stands in for the connect
72
- // token. Anybody who operates the sandbox may connect a server to it.
73
- "POST /system/enroll/code": { control: "never" },
74
69
  // An event automation's webhook, gated by the automation's own token.
75
70
  "POST /automations/{id}/fire": { auth: "door" },
76
71
  // The release gate a pipeline runner waits on, gated by the workflow's minted gate token.
@@ -304,6 +299,15 @@ export const RAW_ROUTES = {
304
299
  "POST /system/links/{id}": { control: "never" },
305
300
  "DELETE /system/links/{id}": { control: "never" },
306
301
  "POST /system/links/{id}/requests/{request}": { control: "never" },
302
+ // Account-level report routing: another sandbox on the owner's account reporting a problem about a project this one
303
+ // claims. Checked in the handler against a pass the platform signed (policy/sandbox-pass.ts); it only ever records
304
+ // into the issues inbox, and wakes an agent only as the inbox's own escalation rule says.
305
+ "POST /account/report": { auth: "door", control: "never" },
306
+ // The sending side, for the `projects` command on the agent's PATH: report a problem to whichever sandbox claims a
307
+ // project (delivered now or kept in the outbox), what is still waiting, and the projects this sandbox claims.
308
+ "POST /account/outbox": { agent: true, control: "never" },
309
+ "GET /account/outbox": { agent: true, control: "never" },
310
+ "GET /account/projects": { agent: true, control: "never" },
307
311
  // The link doors, called by the asking sandbox's daemon: each checks the link token itself (x-intentic-link) and
308
312
  // reaches only the conversations that link opened, which is the whole of a link's reach.
309
313
  "GET /link": { auth: "door", control: "never" },
@@ -346,8 +346,6 @@ describe(`the real sandbox contract`, () => {
346
346
  `exit.rotate`,
347
347
  `exit.start`,
348
348
  `exit.use`,
349
- `intentic.applyEvents`,
350
- `intentic.run`,
351
349
  `netdisk.mount`,
352
350
  `system.events`,
353
351
  `system.manageDeviceSandbox`,
@@ -362,8 +360,6 @@ describe(`the real sandbox contract`, () => {
362
360
  `exit.rotate`,
363
361
  `exit.start`,
364
362
  `exit.use`,
365
- `intentic.applyEvents`,
366
- `intentic.run`,
367
363
  `netdisk.mount`,
368
364
  `system.events`,
369
365
  `system.manageDeviceSandbox`,
@@ -13,8 +13,6 @@ import { PhoneConfigSchema } from "./phone.js";
13
13
  // truth for what's active, and `mcp`-kind entries also feed the agent's MCP servers each turn.
14
14
 
15
15
  export const CapabilityKindSchema = z.enum([
16
- "devops",
17
- "monorepo",
18
16
  "mcp",
19
17
  "cli",
20
18
  "plugin",
@@ -365,10 +363,6 @@ export type DeviceConfig = z.infer<typeof DeviceConfigSchema>;
365
363
  export type AcpAgentConfig = z.infer<typeof AcpAgentConfigSchema>;
366
364
  export type EndpointConfig = z.infer<typeof EndpointConfigSchema>;
367
365
  export const CapabilitySchema = z.discriminatedUnion("kind", [
368
- z.object({ id: entryId, kind: z.literal("devops"), config: z.object({}) }),
369
- // A pnpm+turbo monorepo the user scaffolds as its own repo, named by `id`; apps are added afterwards from its
370
- // operator panel.
371
- z.object({ id: entryId, kind: z.literal("monorepo"), config: z.object({}) }),
372
366
  z.object({ id: entryId, kind: z.literal("mcp"), config: McpConfigSchema }),
373
367
  z.object({ id: entryId, kind: z.literal("cli"), config: CliConfigSchema }),
374
368
  z.object({ id: entryId, kind: z.literal("plugin"), config: PluginConfigSchema }),
@@ -83,6 +83,58 @@ export const IssueRunSchema = z.object({
83
83
  });
84
84
  export type IssueRun = z.infer<typeof IssueRunSchema>;
85
85
 
86
+ // Who reported it, when the reporter was another sandbox on the owner's account (account-level report routing). Read
87
+ // from the platform-signed pass, except `conversationId`, which the sending daemon names for its own conversation.
88
+ export const IssueSenderSchema = z.object({
89
+ sandboxId: z.string().max(40).describe("The reporting sandbox's id."),
90
+ sandboxName: z.string().max(120).describe("Its name on your account."),
91
+ project: z.string().max(200).describe("The project it reported about, as this sandbox claims it."),
92
+ conversationId: z.string().max(120).optional().describe("The conversation over there that reported it."),
93
+ });
94
+ export type IssueSender = z.infer<typeof IssueSenderSchema>;
95
+
96
+ // POSTed to /account/report by another of the owner's sandboxes, under a pass (sandbox-contract policy/sandbox-pass.ts).
97
+ // Only what groups: an agent's problem is a `detection` (or a `crash` with a stack), never an ungrouped `report`, so five
98
+ // sandboxes seeing one broken thing fold into one issue. `times` carries repeats the sender folded while it could not
99
+ // deliver.
100
+ export const AccountProblemSchema = IssueReportSchema.extend({ kind: z.enum(["crash", "detection"]) });
101
+ export type AccountProblem = z.infer<typeof AccountProblemSchema>;
102
+ export const AccountReportSchema = z.object({
103
+ report: AccountProblemSchema,
104
+ conversationId: z.string().max(120).optional(),
105
+ times: z.number().int().min(1).max(10_000).optional(),
106
+ });
107
+ export type AccountReport = z.infer<typeof AccountReportSchema>;
108
+
109
+ // The sending side, over loopback from the `projects report` command: a problem for whichever sandbox on the owner's
110
+ // account claims `project`, and what came of it (delivered now, waiting in the outbox, or refused for good).
111
+ export const AccountSendSchema = z.object({
112
+ project: z.string().min(1).max(300),
113
+ report: AccountProblemSchema,
114
+ });
115
+ export type AccountSend = z.infer<typeof AccountSendSchema>;
116
+ export const AccountSendOutcomeSchema = z.discriminatedUnion("state", [
117
+ z.object({ state: z.literal("delivered"), to: z.string(), id: z.string() }),
118
+ z.object({ state: z.literal("queued"), to: z.string().optional(), reason: z.string(), times: z.number() }),
119
+ z.object({ state: z.literal("refused"), reason: z.string() }),
120
+ ]);
121
+ export type AccountSendOutcome = z.infer<typeof AccountSendOutcomeSchema>;
122
+ export const AccountOutboxSchema = z.object({
123
+ waiting: z.array(
124
+ z.object({
125
+ id: z.string(),
126
+ project: z.string(),
127
+ title: z.string(),
128
+ times: z.number(),
129
+ firstAt: z.number(),
130
+ nextAt: z.number(),
131
+ lastError: z.string().optional(),
132
+ }),
133
+ ),
134
+ });
135
+ export type AccountOutbox = z.infer<typeof AccountOutboxSchema>;
136
+ export const AccountProjectsSchema = z.object({ projects: z.array(z.string()) });
137
+
86
138
  // One group; the id is the fingerprint and the filename, never in the body, so a body cannot disagree with its own
87
139
  // grouping.
88
140
  export const IssueSchema = z.object({
@@ -106,6 +158,8 @@ export const IssueSchema = z.object({
106
158
  // Stored, since a restart can't derive it from a count and timestamp.
107
159
  firedAt: z.number().optional().describe("What the count stood at the last time this woke an agent."),
108
160
  runs: z.array(IssueRunSchema).max(20).optional().describe("The turns started for it."),
161
+ // Set only by the daemon, from a pass the platform signed: never a field a reporter can type.
162
+ sender: IssueSenderSchema.optional().describe("The sandbox on your account that reported the latest one, when another sandbox did."),
109
163
  });
110
164
  export type Issue = z.infer<typeof IssueSchema>;
111
165
 
@@ -1,6 +1,5 @@
1
1
  // maintenance: the standing evidence a chore is decided from
2
2
  import { z } from "zod";
3
- import { WorkspaceHotspotSchema, WorkspaceKeyModuleSchema } from "./codebase-health.js";
4
3
  // The daemon serves facts, never a verdict: which chore is due is computed by shared code
5
4
  // (`@intentic/sandbox-contract/chores`) so the tile and panel can't disagree. Split by cost: probes (subprocesses,
6
5
  // cached with a TTL) vs signals (cheap, recomputed per request).
@@ -246,24 +245,33 @@ export const ChoreShapeSchema = z.object({
246
245
  ),
247
246
  });
248
247
  export type ChoreShape = z.infer<typeof ChoreShapeSchema>;
248
+ // A file iq once ranked as churning and tangled; kept only as the shape of the retired `hotspots` field.
249
+ const RetiredHotspotSchema = z.object({
250
+ path: z.string(),
251
+ commits: z.number(),
252
+ adds: z.number(),
253
+ dels: z.number(),
254
+ complexity: z.number(),
255
+ score: z.number(),
256
+ latestMs: z.number(),
257
+ });
249
258
  export const ChoreSignalsSchema = z.object({
250
259
  packages: z.array(ChorePackageSchema).describe("Each package in the repository, as its own manifest declares it."),
251
260
  shape: ChoreShapeSchema.describe("What the repository is made of, which decides whether a given chore is even a sensible question to ask of it."),
252
- hotspots: z
253
- .array(WorkspaceHotspotSchema)
254
- .describe(
255
- "Files that change often and are complicated at once, capped tight: a chore only asks whether something has entered the top of the ranking.",
256
- ),
257
- keyModules: z.array(WorkspaceKeyModuleSchema).describe("The parts the rest of the code leans on most, capped the same way."),
261
+ // Retired with iq (2026-11-18), which ranked them: always empty, zeros and false now, nothing reads them, and they stay
262
+ // so a Maintenance extension built before then still parses the report. `totals.files` is still counted: older
263
+ // builds gate the cross-cutting-patterns survey on it.
264
+ hotspots: z.array(RetiredHotspotSchema).describe("Retired: always empty."),
265
+ keyModules: z.array(z.object({ path: z.string(), exports: z.number() })).describe("Retired: always empty."),
258
266
  totals: z
259
267
  .object({
260
- files: z.number().describe("Files counted."),
261
- symbols: z.number().describe("Named things they export."),
262
- complexity: z.number().describe("Branch points added up."),
263
- hotspots: z.number().describe("How many files qualify as hotspots at all."),
268
+ files: z.number().describe("Code files in the repository: source, not data, configuration or prose."),
269
+ symbols: z.number().describe("Retired: always zero."),
270
+ complexity: z.number().describe("Retired: always zero."),
271
+ hotspots: z.number().describe("Retired: always zero."),
264
272
  })
265
273
  .describe("The repository in numbers."),
266
- indexed: z.boolean().describe("Whether the index these rankings came from is finished. Nothing should act on a half-built one."),
274
+ indexed: z.boolean().describe("Retired: always false, so a build that still ranks hotspots never acts on these."),
267
275
  });
268
276
  export type ChoreSignals = z.infer<typeof ChoreSignalsSchema>;
269
277
  // `clean` is the important value: without it, a false-positive finding restarts the same turn forever.
@@ -6,6 +6,8 @@ import { z } from "zod";
6
6
  // The kinds of process a sandbox runs, as the daemon classifies them by command line.
7
7
  export const PROCESS_ROLES = [
8
8
  "languageServer",
9
+ // iq's resident engine, removed 2026-11-18: no daemon classifies a process as it now, but an editor reads an older
10
+ // daemon's metrics against this list, and an unknown role would fail the whole reading.
9
11
  "searchEngine",
10
12
  "agentRuntime",
11
13
  "browser",
@@ -93,20 +93,12 @@ export const PanelSummarySchema = z.object({
93
93
  .string()
94
94
  .optional()
95
95
  .describe("Where to open it from outside, present only while that address really serves it. Absent on a sandbox with no outside address."),
96
- role: z
97
- .enum(["intent", "desired-state", "app"])
98
- .optional()
99
- .describe("Which of the workspace's three fixed roles this repository fills. Absent for one that was simply cloned in."),
100
96
  // Detected from specific files:
101
- // deployConfig: deploy.config.ts.
102
- // desiredState: desired-state.json (present after the first resolve).
103
97
  // directoryUi: .intentic/ui/index.html.
104
98
  // monorepo: pnpm-workspace.yaml + turbo.json.
105
99
  // tests: a root `test` script or runner config (vitest.config.ts, bunfig.toml), or "vitest" in the workspace catalog.
106
100
  // userStories: docs/user-stories.
107
101
  // docs: docs/architecture.
108
- deployConfig: z.boolean().describe("It declares infrastructure."),
109
- desiredState: z.boolean().describe("That declaration has been resolved at least once."),
110
102
  directoryUi: z.boolean().describe("It carries a small interface of its own."),
111
103
  monorepo: z.boolean().describe("It holds several packages."),
112
104
  tests: z.boolean().describe("It has tests that can be run."),
@@ -91,6 +91,8 @@ export type PersonaContext = z.infer<typeof PersonaContextSchema>;
91
91
  // editor has to name the same rows the transcript does, and two lists would drift into two vocabularies for one thing.
92
92
  // Ids, not titles, are what a card stores: a title is display text and gets reworded, and a reworded title must not
93
93
  // silently switch a note back on. The daemon maps each id to the titles it covers (agent/prompt/turn-briefing.ts).
94
+ // `search` named the iq teaching note, removed with iq (2026-11-18); it stays readable because a saved card may still
95
+ // list it, and covers no row now.
94
96
  export const TurnBriefingNoteIdSchema = z.enum(["map", "context", "skills", "search", "delegation", "checks", "dependencies", "repoSync", "handoff"]);
95
97
  export type TurnBriefingNoteId = z.infer<typeof TurnBriefingNoteIdSchema>;
96
98
 
@@ -128,12 +130,6 @@ export const TURN_BRIEFING_NOTES: readonly TurnBriefingNote[] = [
128
130
  when: "First message, on a runtime that cannot read the skills folder for itself.",
129
131
  cost: "On those runtimes the agent never learns its skills exist, so it will not load one.",
130
132
  },
131
- {
132
- id: "search",
133
- label: "Using iq for workspace search",
134
- when: "First message, when the workspace search setting is on and the runtime has no plugin seam.",
135
- cost: "The agent falls back to grep-style searching, which it can already do.",
136
- },
137
133
  {
138
134
  id: "delegation",
139
135
  label: "Spawning subagents",
@@ -69,14 +69,10 @@ export const UsageTurnSchema = z.object({
69
69
  // with `costUsd: 0, costKnown: false` rather than silently claiming they were free.
70
70
  costKnown: z.boolean().optional().describe("False when the vendor did not report a cost and the recorded zero is a placeholder, not a price. Absent or true means the cost is real."),
71
71
  durationMs: z.number().describe("How long it took, in milliseconds."),
72
- // Arm of the search-teaching experiment; stable per conversation. Absent means unmeasured.
73
- iqSearchArm: z.boolean().optional(),
74
- // Hash of the plugin nudge and skill body for this arm; recorded on control turns too, for report pairing.
75
- iqSearchCohort: z.string().optional(),
76
- // Every tool call that searched, including CLI searches like `iq q`; absent means unmeasured, not zero.
72
+ // Every tool call that searched, including CLI searches like `rg`; absent means unmeasured, not zero. Rows written
73
+ // before 2026-11-18 can also carry the iq teaching's arm, cohort and uptake (iqSearchArm, iqSearchCohort,
74
+ // iqSearches) and its pre-turn retrieval (turnContext, turnContextMs), which nothing reads now that iq is gone.
77
75
  searchCalls: z.number().optional(),
78
- // Of searchCalls, the ones that ran iq: the search teaching's uptake. Absent on rows written before 2026-10-19.
79
- iqSearches: z.number().optional(),
80
76
  // Search calls before the first file touch; absent as searchCalls; a turn touching nothing counts them all.
81
77
  openingSearches: z.number().optional(),
82
78
  // Directory listings (ls, tree, LS tool) before the turn's first file touch, same window as openingSearches.
@@ -91,7 +87,8 @@ export const UsageTurnSchema = z.object({
91
87
  mapChars: z.number().optional(),
92
88
  // Which comparison `mapArm` belongs to: absent on the first map-or-none rows; "compact-vs-full" from 2026-10-06 to
93
89
  // 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
94
- // against none; "map-vs-none-2" since, the same with readings off the main agent's calls and spawned children out.
90
+ // against none; "map-vs-none-2" for 2026-10-13 to 11-18, the same with readings off the main agent's calls and spawned
91
+ // children out; "map-vs-none-3" since, the map pointing at `rg --files` once iq was gone.
95
92
  mapCohort: z.string().optional(),
96
93
  // Arm of the tool-search experiment, stable per conversation: true loads connected tools' schemas on demand, false
97
94
  // sends them all with every request. Absent where the turn was not a native Claude one on the Claude Code loop.
@@ -105,12 +102,6 @@ export const UsageTurnSchema = z.object({
105
102
  // A home conversation's turn that opened a fresh session rather than resuming its old one, and why (handoff.ts
106
103
  // FreshStartSchema). Absent on every other turn, a home's included. What `bench:home` reads the rollover's cost off.
107
104
  homeFresh: FreshStartWhySchema.optional(),
108
- // What became of pre-turn retrieval on this turn, and how long it took. Assignment and DELIVERY are different
109
- // facts: the first version of this mechanism was assigned to every eligible turn and reached four in five of them,
110
- // which is the difference between a null result and a mechanism that never ran. Absent means the flag was off, so
111
- // nothing was attempted; `ineligible` means the message carried nothing to look up.
112
- turnContext: z.enum(["delivered", "ineligible", "deadline", "indexing", "no-hits", "failed"]).optional(),
113
- turnContextMs: z.number().optional(),
114
105
  // Zero-based turn count in its conversation; 0 marks the opening turn. Absent means unmeasured.
115
106
  turnIndex: z.number().optional(),
116
107
  // outcome alone can't tell a turn that finished from one that stopped talking; these fields carry the difference
@@ -4,8 +4,8 @@
4
4
  // event: whose it is, which lane it stands in, and its diff once there is work to land. Never its title.
5
5
  //
6
6
  // The owner reads a sealed conversation the way anyone else does, by asking its author. The one other door is opening it
7
- // without asking: the sandbox owner alone (never Full access, never an agent), with a written reason and the owner's
8
- // passkey over it, read-only for a day, told to the author at once and recorded on the conversation for good.
7
+ // without asking: the sandbox owner alone (never Full access, never an agent), with a written reason, read-only for a
8
+ // day, told to the author at once and recorded on the conversation for good.
9
9
  import { z } from "zod";
10
10
 
11
11
  // ---- The house rule ----
@@ -139,37 +139,12 @@ export const SealAnswerSchema = SealIdSchema.extend({
139
139
  });
140
140
  export type SealAnswer = z.infer<typeof SealAnswerSchema>;
141
141
 
142
- // What the owner's passkey signs to open a conversation without asking. The challenge is the sha256 of this document's
143
- // text exactly as `SealOpenProof.document` carries it, so the daemon checks the same bytes it parses.
144
- export const SealOpenDocumentSchema = z.strictObject({
145
- v: z.literal(1),
146
- purpose: z.literal("intentic-conversation-open"),
147
- conversationId: z.string().min(1),
148
- reason: z.string().min(SEAL_REASON_MIN).max(SEAL_REASON_MAX),
149
- nonce: z.string().min(16).max(64),
150
- expiresAt: z.number().int().positive(),
151
- });
152
- export type SealOpenDocument = z.infer<typeof SealOpenDocumentSchema>;
153
- export const SEAL_PROOF_MAX_AGE_MS = 5 * 60_000;
154
-
155
- export const SealOpenPrepareSchema = SealIdSchema.extend({ reason: z.string().trim().min(SEAL_REASON_MIN).max(SEAL_REASON_MAX) });
156
-
157
- // The signed document travels as `SealOpenProofSchema` (seal-proof.ts), apart from this file so the summary schema that
158
- // reads this one does not import the passkey shapes, which sit behind the event frames that import the summary.
159
-
160
- // What the editor needs to run the ceremony: the document text to hash, the relying party and the owner's credentials.
161
- export const SealOpenCeremonySchema = z.object({
162
- document: z.string().min(1).max(4096),
163
- rpId: z.string().min(1),
164
- credentials: z.array(z.object({ id: z.string(), transports: z.array(z.string()).optional() })),
165
- });
166
- export type SealOpenCeremony = z.infer<typeof SealOpenCeremonySchema>;
142
+ // The owner's opening without asking: which conversation, and the reason its author reads.
143
+ export const SealOpenRequestSchema = SealIdSchema.extend({ reason: z.string().trim().min(SEAL_REASON_MIN).max(SEAL_REASON_MAX) });
144
+ export type SealOpenRequest = z.infer<typeof SealOpenRequestSchema>;
167
145
 
168
146
  export const SealApproveSchema = SealIdSchema.extend({
169
147
  open: z.string().min(1).describe("Which opening."),
170
148
  agree: z.boolean(),
171
149
  });
172
150
  export type SealApprove = z.infer<typeof SealApproveSchema>;
173
-
174
- /** The document's text as it is signed and sent. */
175
- export const sealOpenDocumentText = (document: SealOpenDocument): string => JSON.stringify(document);
@@ -1,9 +1,9 @@
1
- // secrets: user-supplied env-var secrets the daemon writes to desired-state/.env
1
+ // secrets: user-supplied env-var secrets the daemon keeps in the sandbox's own secret store
2
2
  import { BrokerRuleSchema } from "@intentic/extension-manifest";
3
3
  import { z } from "zod";
4
4
  import { KEYRING_PROGRAMS_MAX, KeyringPackageSchema, KeyringProgramSchema, KeyringShareModeSchema, KeyringSourceSchema } from "./keyring.js";
5
5
  import { SECRET_HOST_MAX, SECRET_HOST_PATTERN_RE, SECRET_HOSTS_MAX } from "../policy/secret-hosts.js";
6
- // Straight to the sandbox daemon, never through the platform; `apply` reloads .env with no restart. `list` returns keys
6
+ // Straight to the sandbox daemon, never through the platform; a set value resolves with no restart. `list` returns keys
7
7
  // only; `reveal` is the one owner-only exception that returns a value.
8
8
  // An env var name, as a shell exports it. Exported so the browser validates against this rather than restating it:
9
9
  // stated twice, the two drifted, and a box with no limit fed a rejection the user could not have predicted.
@@ -52,7 +52,7 @@ export const SecretRegenerateSchema = SecretGenerateSchema.extend({
52
52
  export const SecretGeneratedSchema = z.object({
53
53
  key: z.string().describe("The name it is stored under."),
54
54
  length: z.number().int().describe("How many characters it is, which a reader's validation may care about."),
55
- stored: z.enum(["env", "sandbox"]).describe("Where it was kept: desired-state/.env once DevOps is active, the sandbox's own store before that."),
55
+ stored: z.literal("sandbox").describe("Where it was kept: the sandbox's own secret store."),
56
56
  });
57
57
 
58
58
  // A wall against the agent's own judgment, not a compromised container: a shell here can read the policy same as the
@@ -294,21 +294,17 @@ export const SandboxKeyringPairResultSchema = z.object({
294
294
  });
295
295
 
296
296
  export const SecretInventoryEntrySchema = z.object({
297
- // Env-var key for env|generated; `<provider>:<accountId>` for provider; capability instance id otherwise.
297
+ // Env-var key for env; `<provider>:<accountId>` for provider; capability instance id otherwise.
298
298
  key: z.string().describe("What identifies it. Unique across the whole inventory, so several accounts of one provider each get their own entry."),
299
299
  kind: z
300
- .enum(["env", "generated", "capability", "provider", "device"])
300
+ .enum(["env", "capability", "provider", "device"])
301
301
  .describe(
302
- "Where it came from: you set it, the sandbox generated it, a connection needs it, it is a model account's credential, or it lives in the keyring on one of your computers and this sandbox holds only a pointer to it.",
302
+ "Where it came from: you set it (or had the sandbox generate it), a connection needs it, it is a model account's credential, or it lives in the keyring on one of your computers and this sandbox holds only a pointer to it.",
303
303
  ),
304
- // e.g. "<ProviderName> · <accountLabel>" for provider entries; absent on env/generated.
304
+ // e.g. "<ProviderName> · <accountLabel>" for provider entries; absent on env.
305
305
  label: z.string().optional().describe("A friendlier name, for entries that have one."),
306
306
  status: z.enum(["missing", "set", "connected"]).describe("Whether it exists and, for a connection, whether it is working."),
307
- // Resources referencing it via `{$secret}` refs.
308
- requiredBy: z
309
- .array(z.object({ resourceId: z.string().describe("Which resource."), type: z.string().describe("What kind of resource it is.") }))
310
- .describe("What is waiting on it. Empty for a connection's or an account's own credential."),
311
- // e.g. "desired-state/.env".
307
+ // e.g. ".intentic/secrets/auth/sandbox-secrets.json".
312
308
  storedAt: z.string().describe("Where it actually lives, in words."),
313
309
  revealable: z.boolean().describe("Whether its value can be shown at all. Everything except a model account's credential can be."),
314
310
  // From the masking floor (agent-redaction.ts): names only, never values or lengths.
@@ -318,14 +314,6 @@ export const SecretInventoryEntrySchema = z.object({
318
314
  .describe(
319
315
  "Which of its values are too short for the sandbox to hide from the model everywhere, by the name the agent sees each under. They are hidden only right after a word, flag or address that names a secret, and read in full anywhere else. Absent when none are.",
320
316
  ),
321
- // Forgejo Actions only, and only after adopt, on env|generated entries.
322
- ci: z
323
- .object({
324
- synced: z.boolean().describe("Whether the pipeline has it."),
325
- pushedAt: z.string().optional().describe("When it was last sent there."),
326
- })
327
- .optional()
328
- .describe("Whether a copy has been given to the build pipeline."),
329
317
  // Records only the lane and a destination (command/script head, or page host) — never values.
330
318
  lastUse: z
331
319
  .object({
@@ -67,20 +67,3 @@ export const claudeExperimentSettings = {
67
67
  "How many measured context tokens a Claude Code session must exceed before a cold follow-up can clear older tool output. Smaller sessions save little from trimming.",
68
68
  ),
69
69
  };
70
-
71
- // On for new sandboxes from 2026-11-04; one from before keeps it off unless its owner switched it on (the daemon's
72
- // settings-store.ts pins the old default, settings/earlier-defaults-step.ts writes it down where never saved).
73
- export const iqSearchSettings = {
74
- iqSearch: z
75
- .boolean()
76
- .default(true)
77
- .describe("Teach the agent how to use this workspace's own search tool, rather than leaving it to grep around."),
78
- iqSearchHoldout: z
79
- .number()
80
- .min(0)
81
- .max(1)
82
- .default(0)
83
- .describe(
84
- "What share of conversations to run without that teaching, so the two can be compared. Whole conversations rather than individual turns, because once the teaching is in a session, withholding it from the next request does not make the model forget it.",
85
- ),
86
- };
@@ -177,4 +177,7 @@ export const SETTINGS_HISTORY = [
177
177
  // The field notes (2026-11-06): a ranked brief on this place's traps sent with every turn moved neither failed calls
178
178
  // nor calls before the edited file against a held-out half, across two revisions of it, while every call carried it.
179
179
  ...dropAll(["fieldNotes", "fieldNotesBudget", "fieldNotesHoldout"]),
180
+ // iq (2026-11-18): teaching agents the workspace search tool moved neither cost, calls nor searches against a held-out
181
+ // half over 1,480 conversations, and the tool itself was removed.
182
+ ...dropAll(["iqSearch", "iqSearchHoldout"]),
180
183
  ] as const;