@mnemom/mnemom 0.17.33 → 0.17.34-next.2

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 (236) hide show
  1. package/dist/base-url-proxy.mjs +18 -4
  2. package/dist/commands/agent-config.js +5 -1
  3. package/dist/commands/agent-doctor.d.ts +9 -0
  4. package/dist/commands/agent-doctor.js +4 -0
  5. package/dist/commands/agent-session.d.ts +1 -2
  6. package/dist/commands/agent-session.js +1 -2
  7. package/dist/commands/agent-setup.d.ts +6 -0
  8. package/dist/commands/agent-setup.js +12 -1
  9. package/dist/commands/agent-share-render.d.ts +1 -1
  10. package/dist/commands/agent-share-render.js +1 -1
  11. package/dist/commands/agent.d.ts +26 -0
  12. package/dist/commands/agent.js +228 -53
  13. package/dist/commands/durable-doctor.d.ts +50 -0
  14. package/dist/commands/durable-doctor.js +186 -0
  15. package/dist/commands/durable-lock.d.ts +254 -0
  16. package/dist/commands/durable-lock.js +595 -0
  17. package/dist/commands/durable-sessions.d.ts +87 -0
  18. package/dist/commands/durable-sessions.js +303 -0
  19. package/dist/commands/durable-verbs.d.ts +116 -0
  20. package/dist/commands/durable-verbs.js +393 -0
  21. package/dist/commands/protection.js +1 -1
  22. package/dist/commands/scan.d.ts +97 -0
  23. package/dist/commands/scan.js +238 -0
  24. package/dist/durable/flock.d.ts +26 -0
  25. package/dist/durable/flock.js +80 -0
  26. package/dist/durable/launch-spec.d.ts +7 -1
  27. package/dist/durable/launch-spec.js +10 -3
  28. package/dist/durable/seat-proxy-entry.d.ts +11 -0
  29. package/dist/durable/seat-proxy-entry.js +25 -0
  30. package/dist/durable/seat-proxy.d.ts +107 -0
  31. package/dist/durable/seat-proxy.js +599 -0
  32. package/dist/durable/seat-socket.d.ts +46 -0
  33. package/dist/durable/seat-socket.js +179 -0
  34. package/dist/durable/seat-spec-validator.d.ts +28 -0
  35. package/dist/durable/seat-spec-validator.js +59 -0
  36. package/dist/durable/test-mode.mjs +81 -0
  37. package/dist/durable/turn-chain.d.ts +55 -0
  38. package/dist/durable/turn-chain.js +178 -0
  39. package/dist/host/auto-continue.d.ts +67 -0
  40. package/dist/host/auto-continue.js +118 -0
  41. package/dist/host/bootid.d.ts +13 -0
  42. package/dist/host/bootid.js +41 -0
  43. package/dist/host/client.d.ts +123 -0
  44. package/dist/host/client.js +171 -0
  45. package/dist/host/commands.d.ts +2 -0
  46. package/dist/host/commands.js +122 -0
  47. package/dist/host/control.d.ts +33 -0
  48. package/dist/host/control.js +144 -0
  49. package/dist/host/daemon.d.ts +217 -0
  50. package/dist/host/daemon.js +606 -0
  51. package/dist/host/gate.d.ts +46 -0
  52. package/dist/host/gate.js +82 -0
  53. package/dist/host/grant.d.ts +24 -0
  54. package/dist/host/grant.js +24 -0
  55. package/dist/host/instance.d.ts +35 -0
  56. package/dist/host/instance.js +62 -0
  57. package/dist/host/integrity.d.ts +35 -0
  58. package/dist/host/integrity.js +115 -0
  59. package/dist/host/launchd.d.ts +16 -0
  60. package/dist/host/launchd.js +45 -0
  61. package/dist/host/lock.d.ts +20 -0
  62. package/dist/host/lock.js +63 -0
  63. package/dist/host/owner.d.ts +55 -0
  64. package/dist/host/owner.js +121 -0
  65. package/dist/host/plist.d.ts +16 -0
  66. package/dist/host/plist.js +85 -0
  67. package/dist/host/procs.d.ts +27 -0
  68. package/dist/host/procs.js +105 -0
  69. package/dist/host/run.d.ts +66 -0
  70. package/dist/host/run.js +314 -0
  71. package/dist/host/runtime.d.ts +8 -0
  72. package/dist/host/runtime.js +22 -0
  73. package/dist/host/s1-names.d.ts +22 -0
  74. package/dist/host/s1-names.js +21 -0
  75. package/dist/host/seat-credential.d.ts +27 -0
  76. package/dist/host/seat-credential.js +41 -0
  77. package/dist/host/seat-launch-main.d.ts +1 -0
  78. package/dist/host/seat-launch-main.js +59 -0
  79. package/dist/host/seat-launch.d.ts +116 -0
  80. package/dist/host/seat-launch.js +302 -0
  81. package/dist/host/seat.d.ts +48 -0
  82. package/dist/host/seat.js +149 -0
  83. package/dist/host/state.d.ts +33 -0
  84. package/dist/host/state.js +117 -0
  85. package/dist/host/status.d.ts +101 -0
  86. package/dist/host/status.js +307 -0
  87. package/dist/host/tmux.d.ts +56 -0
  88. package/dist/host/tmux.js +182 -0
  89. package/dist/host/transcript.d.ts +30 -0
  90. package/dist/host/transcript.js +130 -0
  91. package/dist/host/verbs.d.ts +50 -0
  92. package/dist/host/verbs.js +271 -0
  93. package/dist/index.d.ts +8 -6
  94. package/dist/index.js +232 -35
  95. package/dist/lib/agent.d.ts +8 -26
  96. package/dist/lib/agent.js +11 -26
  97. package/dist/lib/api.d.ts +13 -0
  98. package/dist/lib/api.js +8 -0
  99. package/dist/lib/claude-plugin.d.ts +11 -2
  100. package/dist/lib/claude-plugin.js +10 -1
  101. package/dist/lib/durable/api.d.ts +136 -0
  102. package/dist/lib/durable/api.js +220 -0
  103. package/dist/lib/durable/codes.d.ts +8 -0
  104. package/dist/lib/durable/codes.js +2 -0
  105. package/dist/lib/durable/first-turn.d.ts +50 -0
  106. package/dist/lib/durable/first-turn.js +102 -0
  107. package/dist/lib/durable/gate.d.ts +48 -0
  108. package/dist/lib/durable/gate.js +122 -0
  109. package/dist/lib/durable/handover.d.ts +101 -0
  110. package/dist/lib/durable/handover.js +175 -0
  111. package/dist/lib/durable/launch.d.ts +182 -0
  112. package/dist/lib/durable/launch.js +443 -0
  113. package/dist/lib/durable/launching.d.ts +15 -0
  114. package/dist/lib/durable/launching.js +70 -0
  115. package/dist/lib/durable/live.d.ts +194 -0
  116. package/dist/lib/durable/live.js +635 -0
  117. package/dist/lib/durable/refusal.d.ts +57 -0
  118. package/dist/lib/durable/refusal.js +78 -0
  119. package/dist/lib/durable/view.d.ts +83 -0
  120. package/dist/lib/durable/view.js +244 -0
  121. package/dist/lib/experimental.d.ts +0 -9
  122. package/dist/lib/experimental.js +18 -17
  123. package/dist/lib/launcher-config.d.ts +7 -0
  124. package/dist/lib/launcher-config.js +21 -0
  125. package/dist/lib/scan/caps.d.ts +35 -0
  126. package/dist/lib/scan/caps.js +67 -0
  127. package/dist/lib/scan/credential.d.ts +37 -0
  128. package/dist/lib/scan/credential.js +104 -0
  129. package/dist/lib/scan/failure.d.ts +10 -0
  130. package/dist/lib/scan/failure.js +43 -0
  131. package/dist/lib/scan/pr-source.d.ts +57 -0
  132. package/dist/lib/scan/pr-source.js +130 -0
  133. package/dist/lib/scan/record.d.ts +49 -0
  134. package/dist/lib/scan/record.js +85 -0
  135. package/dist/lib/scan/report-email.d.ts +92 -0
  136. package/dist/lib/scan/report-email.js +144 -0
  137. package/dist/lib/scan/report.d.ts +13 -0
  138. package/dist/lib/scan/report.js +30 -0
  139. package/dist/lib/scan/scan.d.ts +64 -0
  140. package/dist/lib/scan/scan.js +182 -0
  141. package/dist/lib/scan/share.d.ts +38 -0
  142. package/dist/lib/scan/share.js +47 -0
  143. package/dist/lib/scan/spend/ai-tool-detect.d.ts +6 -0
  144. package/dist/lib/scan/spend/ai-tool-detect.js +18 -0
  145. package/dist/lib/scan/spend/anthropic-usage.d.ts +57 -0
  146. package/dist/lib/scan/spend/anthropic-usage.js +244 -0
  147. package/dist/lib/scan/spend/cost-corpus.v1.d.ts +56 -0
  148. package/dist/lib/scan/spend/cost-corpus.v1.js +64 -0
  149. package/dist/lib/scan/spend/prices.d.ts +33 -0
  150. package/dist/lib/scan/spend/prices.js +57 -0
  151. package/dist/lib/scan/spend/spend-estimate.d.ts +30 -0
  152. package/dist/lib/scan/spend/spend-estimate.js +70 -0
  153. package/dist/lib/scan/spend/spend-tiers.d.ts +25 -0
  154. package/dist/lib/scan/spend/spend-tiers.js +42 -0
  155. package/dist/lib/scan/spend/token-rate.d.ts +30 -0
  156. package/dist/lib/scan/spend/token-rate.js +54 -0
  157. package/dist/lib/session-key.d.ts +41 -0
  158. package/dist/lib/session-key.js +124 -0
  159. package/dist/lib/subscription-login.d.ts +15 -0
  160. package/dist/lib/subscription-login.js +28 -1
  161. package/dist/rc-key-401.mjs +75 -0
  162. package/dist/rc-proxy.mjs +221 -25
  163. package/dist/vendor/durable-contract/index.js +240 -18
  164. package/dist/vendor/shared/durable-contract/admission.d.ts +240 -0
  165. package/dist/vendor/shared/durable-contract/admission.js +533 -0
  166. package/dist/vendor/shared/durable-contract/arm.d.ts +51 -0
  167. package/dist/vendor/shared/durable-contract/arm.js +133 -0
  168. package/dist/vendor/shared/durable-contract/canonical.d.ts +29 -0
  169. package/dist/vendor/shared/durable-contract/canonical.js +98 -0
  170. package/dist/vendor/shared/durable-contract/cell-id.d.ts +22 -0
  171. package/dist/vendor/shared/durable-contract/cell-id.js +38 -0
  172. package/dist/vendor/shared/durable-contract/cli-output.d.ts +342 -0
  173. package/dist/vendor/shared/durable-contract/cli-output.js +201 -0
  174. package/dist/vendor/shared/durable-contract/cli-surface.d.ts +119 -0
  175. package/dist/vendor/shared/durable-contract/cli-surface.js +270 -0
  176. package/dist/vendor/shared/durable-contract/codes.d.ts +537 -0
  177. package/dist/vendor/shared/durable-contract/codes.js +475 -0
  178. package/dist/vendor/shared/durable-contract/constants.d.ts +153 -0
  179. package/dist/vendor/shared/durable-contract/constants.js +179 -0
  180. package/dist/vendor/shared/durable-contract/doors.d.ts +119 -0
  181. package/dist/vendor/shared/durable-contract/doors.js +249 -0
  182. package/dist/vendor/shared/durable-contract/envelope.d.ts +103 -0
  183. package/dist/vendor/shared/durable-contract/envelope.js +317 -0
  184. package/dist/vendor/shared/durable-contract/events.d.ts +147 -0
  185. package/dist/vendor/shared/durable-contract/events.js +630 -0
  186. package/dist/vendor/shared/durable-contract/executor-state.d.ts +41 -0
  187. package/dist/vendor/shared/durable-contract/executor-state.js +32 -0
  188. package/dist/vendor/shared/durable-contract/fixlines.d.ts +318 -0
  189. package/dist/vendor/shared/durable-contract/fixlines.js +483 -0
  190. package/dist/vendor/shared/durable-contract/freeze-record.d.ts +787 -0
  191. package/dist/vendor/shared/durable-contract/freeze-record.js +361 -0
  192. package/dist/vendor/shared/durable-contract/index.d.ts +36 -0
  193. package/dist/vendor/shared/durable-contract/index.js +37 -0
  194. package/dist/vendor/shared/durable-contract/journal-approvals.d.ts +29 -0
  195. package/dist/vendor/shared/durable-contract/journal-approvals.js +60 -0
  196. package/dist/vendor/shared/durable-contract/keys.d.ts +24 -0
  197. package/dist/vendor/shared/durable-contract/keys.js +66 -0
  198. package/dist/vendor/shared/durable-contract/lock.d.ts +128 -0
  199. package/dist/vendor/shared/durable-contract/lock.js +151 -0
  200. package/dist/vendor/shared/durable-contract/names.d.ts +25 -0
  201. package/dist/vendor/shared/durable-contract/names.js +78 -0
  202. package/dist/vendor/shared/durable-contract/owner-verbs.d.ts +175 -0
  203. package/dist/vendor/shared/durable-contract/owner-verbs.js +403 -0
  204. package/dist/vendor/shared/durable-contract/paths.d.ts +23 -0
  205. package/dist/vendor/shared/durable-contract/paths.js +35 -0
  206. package/dist/vendor/shared/durable-contract/pure-fn.d.ts +48 -0
  207. package/dist/vendor/shared/durable-contract/pure-fn.js +89 -0
  208. package/dist/vendor/shared/durable-contract/routes.d.ts +205 -0
  209. package/dist/vendor/shared/durable-contract/routes.js +315 -0
  210. package/dist/vendor/shared/durable-contract/schema.d.ts +126 -0
  211. package/dist/vendor/shared/durable-contract/schema.js +441 -0
  212. package/dist/vendor/shared/durable-contract/seal.d.ts +54 -0
  213. package/dist/vendor/shared/durable-contract/seal.js +99 -0
  214. package/dist/vendor/shared/durable-contract/secret-scope.d.ts +28 -0
  215. package/dist/vendor/shared/durable-contract/secret-scope.js +76 -0
  216. package/dist/vendor/shared/durable-contract/session-id.d.ts +21 -0
  217. package/dist/vendor/shared/durable-contract/session-id.js +58 -0
  218. package/dist/vendor/shared/durable-contract/spec.d.ts +162 -0
  219. package/dist/vendor/shared/durable-contract/spec.js +286 -0
  220. package/dist/vendor/shared/durable-contract/states.d.ts +96 -0
  221. package/dist/vendor/shared/durable-contract/states.js +218 -0
  222. package/dist/vendor/shared/durable-contract/telemetry.d.ts +94 -0
  223. package/dist/vendor/shared/durable-contract/telemetry.js +180 -0
  224. package/dist/vendor/shared/durable-contract/test-mode.d.ts +62 -0
  225. package/dist/vendor/shared/durable-contract/test-mode.js +140 -0
  226. package/dist/vendor/shared/durable-contract/turn.d.ts +57 -0
  227. package/dist/vendor/shared/durable-contract/turn.js +81 -0
  228. package/dist/vendor/shared/durable-contract/vectors.d.ts +191 -0
  229. package/dist/vendor/shared/durable-contract/vectors.js +208 -0
  230. package/package.json +4 -3
  231. package/plugins/integrity-manifest.json +35 -0
  232. package/plugins/mnemom/hooks/hooks.json +15 -1
  233. package/plugins/mnemom/hooks/register.tsx +60 -2
  234. package/plugins/mnemom/hooks/seat-hello.mjs +116 -0
  235. package/dist/commands/agent-implicit-notice.d.ts +0 -31
  236. package/dist/commands/agent-implicit-notice.js +0 -73
@@ -0,0 +1,787 @@
1
+ /**
2
+ * The freeze record: every frozen value by name, as the eval runner reads `$S1.<NAME>` and
3
+ * `$S1.<NAME>.<path>` (CASE-DSL section 5.2). Built from the modules, never restated.
4
+ *
5
+ * FREEZE_RECORD scalars (string, number, boolean, or null while a calibration is pending)
6
+ * FREEZE_STRUCTURED frozen lists, tables and maps (JSON values)
7
+ * FREEZE_ALIASES the DSL spellings datasets already use, each naming one canonical entry
8
+ *
9
+ * A name lives in exactly one of the three. Names the datasets cite that are not S1 values (lane
10
+ * URLs, installed versions, baselines, module paths of other lanes) are not here on purpose: they
11
+ * are lane or case bindings.
12
+ */
13
+ export declare const FREEZE_RECORD: Readonly<{
14
+ DURABLE_CONTRACT_VERSION: "1.0.0";
15
+ DURABLE_SCHEMA_VERSION: 1;
16
+ LEASE_SECONDS_DEFAULT: 90;
17
+ LEASE_SECONDS_MIN: 5;
18
+ LEASE_SECONDS_MAX: 90;
19
+ RESUME_RESET_SECONDS_DEFAULT: 600;
20
+ RESUME_RESET_SECONDS_MIN: 5;
21
+ RESUME_RESET_SECONDS_MAX: 600;
22
+ HEARTBEAT_DIVISOR: 3;
23
+ RESPAWN_FAILURES_SUSPEND_AT: 3;
24
+ RESPAWN_CONCURRENCY: 4;
25
+ LEASE_KEY_TOUCH_SECONDS: 60;
26
+ STALE_SERVE_M1: false;
27
+ NOFENCE_M1: true;
28
+ NOFENCE_ADMIT_VALUE: "nofence";
29
+ RESOLVER_TIMEOUT_MS: 2000;
30
+ ARM_PROBE_TIMEOUT_MS: 2000;
31
+ ARM_PROBE_TTL_S: 10;
32
+ PROTECTION_CACHE_S: 300;
33
+ GRANT_TTL_S: number;
34
+ GRANT_WARNING_S: number;
35
+ CLEAN_EXIT_MAX: 3;
36
+ CLEAN_EXIT_WINDOW_S: 600;
37
+ EXECUTOR_POLL_S: 10;
38
+ EXECUTOR_LIVE_S: number;
39
+ ATTACH_WAIT_S: number;
40
+ CLAIM_BACKOFF_BASE_S: 2;
41
+ CLAIM_BACKOFF_MAX_S: 60;
42
+ CLAIM_BACKOFF_JITTER: 0.2;
43
+ CLAIM_UNAVAILABLE_SURFACE_N: 5;
44
+ TRACKED_STOP_GRACE_S: 5;
45
+ SEAT_MAX_ATTEMPTS_NONRETRY: 1;
46
+ TURN_WAIT_MS: 500;
47
+ TURN_HEADER_MAX_LEN: 8192;
48
+ TURN_ENTRIES_MAX: 32;
49
+ SWEEP_MAX_ROWS: 200;
50
+ SWEEP_BATCH_SIZE: 50;
51
+ SWEEP_TIME_BUDGET_MS: 10000;
52
+ SWEEP_CRON: "*/5 * * * *";
53
+ PER_SESSION_BUDGET_LIMIT_USD: 20;
54
+ CONTRACT_STATEMENT_MAX_CHARS: 4000;
55
+ CONTRACT_JSON_MAX_BYTES: 8192;
56
+ EVENT_DETAIL_MAX_CHARS: 280;
57
+ CONTRACT_PURGE_AFTER_S: number;
58
+ DEVICE_STEP_FRESHNESS_S: 300;
59
+ STEP_UP_BLOB_FIELD: "su";
60
+ /** test_integrity baseline runs and flaky retry cap (ruling 31.1). */
61
+ TEST_FLAKY_RUNS: 3;
62
+ /** durable_approvals target CHECK text A1 mirrors (ruling 32.12). */
63
+ DURABLE_APPROVALS_TARGET_CHECK: string;
64
+ OWNER_MUTATION_APPROVAL_TTL_S: number;
65
+ DEVICE_POLL_INTERVAL_S: 5;
66
+ RISK_LINE_VERSION: 1;
67
+ RISK_LINE_VERSION_TEXT: string;
68
+ RENDERER_VERSION: 1;
69
+ PLUGIN_HASH_RECIPE_VERSION: 1;
70
+ ADMIT_SWEEP_VECTORS_PATH: "src/vectors/admit-sweep-vectors.json";
71
+ FINGERPRINT_HEX_CHARS: 12;
72
+ PLUGIN_DIR: "plugins/mnemom";
73
+ PLUGIN_MANIFEST_PATH: "plugins/integrity-manifest.json";
74
+ EVENT_PREIMAGE_VERSION: 1;
75
+ /** The calibrated names (CALIBRATED_PENDING) carry the DSL spelling; L_SPAWN / T_HELLO_S are aliases. */
76
+ L_spawn: number | null;
77
+ T_hello: number | null;
78
+ L_SPAWN_MIN: 20;
79
+ L_SPAWN_MAX: 90;
80
+ API_CELL_ID_VECTORS_SHA256: "0fe7b8e6583c18e534e6021701d58260be3538073701c0ce87173b9810748cb8";
81
+ LEASE_KEY_PREFIX: "mnm_ds_";
82
+ ARM_HEADER: "x-mnemom-durable-arm";
83
+ ARM_VERSION: "1";
84
+ GENESIS_PREV_HASH: string;
85
+ GATEWAY_EVENTS_ROUTE: "/internal/durable/events";
86
+ CHARTER_PREIMAGE_VERSION: 1;
87
+ SESSION_NAME_MAX_CHARS: 64;
88
+ RISK_LINE_TEXT: "Here the session acts with your account's access on this machine. Never-rules and holds are tripwires, not walls; a container is the recommended home for work on its own.";
89
+ TEST_MODE_ENV: "DURABLE_SESSIONS_TEST_MODE";
90
+ DEVICE_VERIFY_AAL_DEFAULT: "off";
91
+ SPAN_DURABLE_ADMISSION: "durable_admission";
92
+ SPAN_DURABLE_CLAIM: "durable_claim";
93
+ SPAN_DURABLE_SEAT_HELLO: "durable_seat_hello";
94
+ SPAN_DURABLE_SWEEP: "durable_sweep";
95
+ SPAN_DEVICE_VERIFY_WOULD_REFUSE: "device_verify_would_refuse";
96
+ SWEEP_LOG_NAME: "durable_sweep_run";
97
+ OWNER_MUTATION_CLIENT_ID: "mnemom-durable-owner-mutation";
98
+ EXECUTOR_STATE_DIR: ".mnemom/durable";
99
+ EXECUTOR_STATE_FILE: ".mnemom/durable/executor-state.json";
100
+ EXECUTOR_STATE_DIR_MODE: 448;
101
+ EXECUTOR_STATE_FILE_MODE: 384;
102
+ OLD_ROUTE_BRANCH: "amend";
103
+ OLD_ROUTE_REFRESH: "lazy";
104
+ U05_FIXTURE_CHECK: "12";
105
+ U05_CHECK_TEXT_RESPAWN_FAILED: string;
106
+ U05_CHECK_TEXT_ATTESTATION_FAILED: string;
107
+ RISK_SENTENCE_ID_HOST: "laptop";
108
+ SPAN_DURABLE_ENROLLMENT: "durable_enrollment";
109
+ ENROLL_POLL_ERROR_STATUS: 400;
110
+ /** Ruling 19: every refusal exits 1 (with or without --json); usage errors and the gate exit 2. */
111
+ CLI_REFUSAL_EXIT: 1;
112
+ CLI_USAGE_EXIT: 2;
113
+ EXECUTOR_KEY_HEADER: "X-Mnemom-Api-Key";
114
+ INTERNAL_KEY_HEADER: "X-Internal-Key";
115
+ CHARTER_SEALED_AT_PATTERN: string;
116
+ DURABLE_POOL_CLAIM_FLAG: "DURABLE_POOL_CLAIM";
117
+ OIDC_EXCHANGE_AUDIENCE: "mnemom-executor";
118
+ LIVE_LEASE_CAP_MIN: 1;
119
+ LIVE_LEASE_CAP_MAX: 1000;
120
+ ORG_CAP_LOCK_PREFIX: "durable_org_cap:";
121
+ DEFAULT_LEASE_CAP_ENV: "DURABLE_DEFAULT_LEASE_CAP";
122
+ DISPATCH_SESSION_CID_PREFIX: "dispatch-";
123
+ DISPATCH_SESSION_NAME_PREFIX: "job-";
124
+ READY_SESSIONS_LIMIT_MIN: 1;
125
+ READY_SESSIONS_LIMIT_MAX: 50;
126
+ READY_USER_TEXT: "waiting for a runner";
127
+ RUNNER_FAILED_PHASE_PATTERN: string;
128
+ AGENT_SESSIONS_READY_CHECK: string;
129
+ AGENT_SESSIONS_WAIT_PARKED_CHECK: string;
130
+ AGENT_EXECUTORS_SCOPE_CHECK: "scope IN ('user','org')";
131
+ }>;
132
+ export type FreezeName = keyof typeof FREEZE_RECORD;
133
+ export declare const FREEZE_STRUCTURED: Readonly<{
134
+ /** Every frozen error code, keyed by itself (`$S1.CODES.durable_lease_fenced` is the code). */
135
+ CODES: {
136
+ readonly [x: string]: string;
137
+ };
138
+ /** durable_claim_outcome values, keyed by themselves. */
139
+ CLAIM_OUTCOME: {
140
+ readonly unavailable: "unavailable";
141
+ readonly acquired: "acquired";
142
+ readonly reclaimed: "reclaimed";
143
+ readonly epoch_bump: "epoch_bump";
144
+ readonly needs_key: "needs_key";
145
+ readonly lost_race: "lost_race";
146
+ readonly ineligible: "ineligible";
147
+ readonly rate_limited: "rate_limited";
148
+ };
149
+ /**
150
+ * The C10-R0 (i)-(k) journal refusals by role, as C10 cases cite them
151
+ * (`$S1.JOURNAL_CODES.unknown_kind`). No "not homed" entry: S1 freezes no such code.
152
+ */
153
+ JOURNAL_CODES: Readonly<{
154
+ readonly append_conflict: "durable_append_conflict";
155
+ readonly idempotency_conflict: "durable_idempotency_conflict";
156
+ readonly unknown_kind: "durable_unknown_kind";
157
+ readonly writer_class: "durable_writer_refused";
158
+ readonly refs_invalid: "durable_refs_invalid";
159
+ }>;
160
+ EXECUTOR_WRITABLE_KINDS: readonly ["executor.spawned", "session.waiting", "executor.turn_continued"];
161
+ GATEWAY_WRITABLE_KINDS: readonly ["lease.zombie_call", "identity.mismatch", "guard.unavailable"];
162
+ EVENT_PREIMAGE_FIELDS: readonly ["v", "session_id", "seq", "ts", "kind", "epoch", "idempotency_key", "principal_ref", "detail_sha256", "refs_sha256", "prev_hash"];
163
+ CHARTER_PREIMAGE_FIELDS: readonly ["v", "session_id", "version", "prev_hash", "charter", "created_at"];
164
+ CHARTER_HASH_EXCLUDED_COLUMNS: readonly ["hash", "contract_ciphertext", "wrapped_data_key", "cipher_key_ref", "contract_purge_after", "signature"];
165
+ PIN_KEYS: readonly ["card_content_hash", "policy_engine_major"];
166
+ M1_SPAN_NAMES: readonly ["durable_admission", "durable_claim", "durable_seat_hello", "durable_sweep", "device_verify_would_refuse", "durable_enrollment"];
167
+ SPAN_ATTRIBUTE_KEYS: {
168
+ readonly durable_admission: readonly import("./telemetry.js").DurableAttributeKey[];
169
+ readonly durable_claim: readonly import("./telemetry.js").DurableAttributeKey[];
170
+ readonly durable_seat_hello: readonly import("./telemetry.js").DurableAttributeKey[];
171
+ readonly durable_sweep: readonly import("./telemetry.js").DurableAttributeKey[];
172
+ readonly device_verify_would_refuse: readonly import("./telemetry.js").DurableAttributeKey[];
173
+ readonly durable_enrollment: readonly import("./telemetry.js").DurableAttributeKey[];
174
+ };
175
+ ATTRIBUTE_VALUES: {
176
+ readonly durable_refusal: readonly ["none", "unknown_key", "durable_admission_unavailable", "durable_key_revoked", "durable_identity_mismatch", "durable_unlocked", "durable_session_ended", "durable_lease_fenced", "durable_session_stopped", "durable_guard_unavailable", "durable_unattended_unavailable", "goal_contract_enforce_refused", "durable_route_refused", "durable_executor_key_refused", "contract_mismatch"];
177
+ readonly durable_posture: readonly ["attended", "unattended"];
178
+ readonly durable_door: readonly ["match", "mismatch", "unmapped"];
179
+ readonly durable_effective_state: readonly ["resuming", "running", "detached", "parked", "suspended", "suspended_grant_expired", "paused", "completed", "failed", "killed", "expired", "ready", "unknown"];
180
+ readonly durable_fence_source: readonly ["fresh", "nofence"];
181
+ readonly durable_charter_source: readonly ["pg", "rehydrated", "lru", "kv", "unavailable", "none"];
182
+ readonly durable_arm: readonly ["anchor", "key_gate"];
183
+ readonly durable_never_hold: readonly ["off"];
184
+ readonly durable_guard: readonly ["ok", "unavailable", "not_applicable"];
185
+ readonly durable_claim_outcome: readonly ["acquired", "reclaimed", "epoch_bump", "needs_key", "lost_race", "ineligible", "unavailable", "rate_limited"];
186
+ readonly durable_claim_cause: readonly ["schema", "arm_probe", "entitlement_lookup", "protection_probe", "guard", "lease_cap_config"];
187
+ readonly durable_hello_outcome: readonly ["accepted", "repeat", "late", "refused"];
188
+ readonly outcome: readonly ["ok", "error", "disabled"];
189
+ readonly budget_exhausted: readonly ["true", "false"];
190
+ readonly lag_bucket: readonly ["none", "<1m", "1-5m", "5-30m", ">30m"];
191
+ readonly device_verify_would_refuse: readonly ["true"];
192
+ readonly device_verify_reason: readonly ["aal", "freshness"];
193
+ readonly device_verify_assurance: readonly ["aal1", "aal2"];
194
+ readonly durable_enrollment_outcome: readonly ["started", "approved", "refused_aal", "refused_stale", "refused_not_self", "refused_machine", "refused_entitlement", "denied", "expired", "consumed", "replay"];
195
+ };
196
+ M1_TABLES: readonly ["agent_sessions", "durable_lease_keys", "agent_session_charters", "agent_session_events", "durable_event_kinds", "agent_session_chains", "agent_executors", "agent_durable_profiles", "durable_cell_state", "durable_org_policy", "durable_user_policy", "durable_approvals", "durable_approval_attestations"];
197
+ M1_COLUMNS: {
198
+ readonly agent_sessions: readonly string[];
199
+ readonly durable_lease_keys: readonly string[];
200
+ readonly agent_session_charters: readonly string[];
201
+ readonly agent_session_events: readonly string[];
202
+ readonly durable_event_kinds: readonly string[];
203
+ readonly agent_session_chains: readonly string[];
204
+ readonly agent_executors: readonly string[];
205
+ readonly agent_durable_profiles: readonly string[];
206
+ readonly durable_cell_state: readonly string[];
207
+ readonly durable_org_policy: readonly string[];
208
+ readonly durable_user_policy: readonly string[];
209
+ readonly durable_approvals: readonly string[];
210
+ readonly durable_approval_attestations: readonly string[];
211
+ };
212
+ M1_FUNCTIONS: readonly ["resolve_durable_session_key", "agent_durable_only", "durable_schema_version", "durable_attest_begin", "durable_claim_lease", "durable_heartbeat", "durable_seat_hello", "durable_seat_exit", "durable_fail_session", "durable_release_lease", "durable_append_event", "durable_fence_check", "durable_guard_add", "durable_revoke_executor", "durable_sweep", "durable_kill_agent_sessions", "durable_agent_killed"];
213
+ M1_ARBITERS: readonly import("./schema.js").Arbiter[];
214
+ EXECUTE_EXCEPTIONS: readonly string[];
215
+ /** durable_approvals subjects and target rule (ruling 32.12). */
216
+ DURABLE_APPROVAL_SUBJECTS: readonly ["unlock", "unpause_contained", "grant_renewal", "budget_raise", "enrollment", "question"];
217
+ DURABLE_APPROVAL_SESSIONLESS_SUBJECTS: readonly ["grant_renewal", "enrollment"];
218
+ FIX_LINES: {
219
+ readonly budget_reached: import("./fixlines.js").FixEntry;
220
+ readonly above_limit_raise: import("./fixlines.js").FixEntry;
221
+ readonly budget_at_limit: import("./fixlines.js").FixEntry;
222
+ readonly agent_killed: import("./fixlines.js").FixEntry;
223
+ readonly session_ended: import("./fixlines.js").FixEntry;
224
+ readonly session_transcript_missing: import("./fixlines.js").FixEntry;
225
+ readonly paused_owner: import("./fixlines.js").FixEntry;
226
+ readonly agent_contained: import("./fixlines.js").FixEntry;
227
+ readonly respawn_failed: import("./fixlines.js").FixEntry;
228
+ readonly attestation_failed: import("./fixlines.js").FixEntry;
229
+ readonly approval_expired: import("./fixlines.js").FixEntry;
230
+ readonly approval_denied: import("./fixlines.js").FixEntry;
231
+ readonly attestation_cwd_missing: import("./fixlines.js").FixEntry;
232
+ readonly attestation_cwd_not_toplevel: import("./fixlines.js").FixEntry;
233
+ readonly grant_expired: import("./fixlines.js").FixEntry;
234
+ readonly grant_warning: import("./fixlines.js").FixEntry;
235
+ readonly identity_mismatch: import("./fixlines.js").FixEntry;
236
+ readonly stopped_no_m1_remedy: import("./fixlines.js").FixEntry;
237
+ readonly account_balance: import("./fixlines.js").FixEntry;
238
+ readonly budget_while_paused: import("./fixlines.js").FixEntry;
239
+ readonly guard: import("./fixlines.js").FixEntry;
240
+ readonly seat_wait_timeout: import("./fixlines.js").FixEntry;
241
+ readonly daemon_not_running: import("./fixlines.js").FixEntry;
242
+ readonly daemon_idle: import("./fixlines.js").FixEntry;
243
+ readonly unreachable_home: import("./fixlines.js").FixEntry;
244
+ readonly session_homed_elsewhere: import("./fixlines.js").FixEntry;
245
+ readonly session_homed_elsewhere_stale: import("./fixlines.js").FixEntry;
246
+ readonly resume_live: import("./fixlines.js").FixEntry;
247
+ readonly lock_not_entitled: import("./fixlines.js").FixEntry;
248
+ readonly lock_mfa_required: import("./fixlines.js").FixEntry;
249
+ readonly lock_branch_unprotected: import("./fixlines.js").FixEntry;
250
+ readonly lock_agent_shared: import("./fixlines.js").FixEntry;
251
+ readonly no_executor: import("./fixlines.js").FixEntry;
252
+ readonly tool_classes: import("./fixlines.js").FixEntry;
253
+ readonly remote_control: import("./fixlines.js").FixEntry;
254
+ readonly cwd_subdirectory: import("./fixlines.js").FixEntry;
255
+ readonly cwd_not_git: import("./fixlines.js").FixEntry;
256
+ readonly cwd_symlink_transcript: import("./fixlines.js").FixEntry;
257
+ readonly launch_spec_change: import("./fixlines.js").FixEntry;
258
+ readonly launch_spec_change_sole_unlock: import("./fixlines.js").FixEntry;
259
+ readonly durable_only_agent: import("./fixlines.js").FixEntry;
260
+ readonly durable_only_held: import("./fixlines.js").FixEntry;
261
+ readonly not_owner_admin: import("./fixlines.js").FixEntry;
262
+ readonly not_owner_info: import("./fixlines.js").FixEntry;
263
+ readonly tracked_pause: import("./fixlines.js").FixEntry;
264
+ readonly tracked_resume: import("./fixlines.js").FixEntry;
265
+ readonly tracked_budget: import("./fixlines.js").FixEntry;
266
+ readonly device_step_login: import("./fixlines.js").FixEntry;
267
+ readonly containment_login: import("./fixlines.js").FixEntry;
268
+ readonly integrity: import("./fixlines.js").FixEntry;
269
+ readonly unattended: import("./fixlines.js").FixEntry;
270
+ };
271
+ RESERVED_SESSION_VERBS: readonly ["sessions", "show", "setup", "doctor", "config", "list", "claim", "move", "export", "help", "invite", "lock", "done", "kill", "pause", "resume", "amend", "host", "containment"];
272
+ CANONICAL_CELL_IDS: readonly ["test", "us-1", "us-2"];
273
+ KEY_EFFECT_OF_TRANSITION: {
274
+ readonly pause: "fence";
275
+ readonly complete: "fence";
276
+ readonly kill: "fence";
277
+ readonly expire: "fence";
278
+ readonly fail: "fence";
279
+ readonly containment: "fence";
280
+ readonly unlock: "revoke";
281
+ readonly claim_supersede: "revoke";
282
+ readonly executor_revoke: "revoke";
283
+ readonly respawn_failed_suspend: "revoke";
284
+ };
285
+ REVOKING_TRANSITIONS: readonly ["claim_supersede", "executor_revoke", "unlock", "respawn_failed_suspend"];
286
+ TEST_MODE_GUARD_LISTS: {
287
+ readonly gateway: readonly string[];
288
+ readonly api: readonly string[];
289
+ readonly cli: readonly string[];
290
+ };
291
+ TEST_MODE_MODULE: {
292
+ readonly gateway: string;
293
+ readonly api: string;
294
+ readonly cli: string;
295
+ };
296
+ /** The C17-R18 integrity allowlist (ruling 31(2)). */
297
+ TEST_ALLOWLIST: readonly import("./test-mode.js").TestAllowlistEntry[];
298
+ /** M1 CLI command paths and long options (ruling 32.01; E4 D1 product_missing). */
299
+ M1_CLI_SURFACE: readonly import("./cli-surface.js").CliSurfaceEntry[];
300
+ /** Pre-M1 `mnemom agent` launcher sub-verbs, first word only (ruling 32.35). */
301
+ PRE_M1_LAUNCHER_SUBVERBS: readonly ["config", "doctor", "help", "setup", "slack"];
302
+ /** The exports a pure_fn step may call (ruling 32.34; CASE-DSL rule 30). */
303
+ PURE_FN_EXPORTS: readonly import("./pure-fn.js").PureFnExport[];
304
+ /** M1 exports a pure_fn step may name before they land (ruling 33.01; E4 detector D4). */
305
+ PURE_FN_M1_PENDING: readonly import("./pure-fn.js").PureFnPending[];
306
+ /** The resolver per-field schema (C06-R15). */
307
+ RESOLVER_SCHEMA: Readonly<Record<string, import("./admission.js").FieldSpec>>;
308
+ /** guard_state fixtures (jsonb) the datasets write: passes guardStateOk / the shape fault. */
309
+ GUARD_STATE_OK: Readonly<{
310
+ spend_usd: number;
311
+ }>;
312
+ GUARD_STATE_FAULT: Readonly<{
313
+ spend_usd: string;
314
+ }>;
315
+ /** Executor and internal routes: `$S1.ROUTES.<name>.path`, or `.pre` + id + `.post`. */
316
+ ROUTES: Readonly<{
317
+ exec_enroll: import("./routes.js").FixedRoute;
318
+ exec_enroll_poll: import("./routes.js").FixedRoute;
319
+ exec_list: import("./routes.js").FixedRoute;
320
+ exec_revoke: import("./routes.js").ScopedRoute;
321
+ exec_renew: import("./routes.js").ScopedRoute;
322
+ exec_sessions: import("./routes.js").FixedRoute;
323
+ exec_attest: import("./routes.js").ScopedRoute;
324
+ exec_claim: import("./routes.js").ScopedRoute;
325
+ exec_hello: import("./routes.js").ScopedRoute;
326
+ exec_release: import("./routes.js").ScopedRoute;
327
+ exec_append: import("./routes.js").ScopedRoute;
328
+ exec_seat_exit: import("./routes.js").ScopedRoute;
329
+ exec_fail: import("./routes.js").ScopedRoute;
330
+ exec_heartbeat: import("./routes.js").FixedRoute;
331
+ exec_ready_list: import("./routes.js").FixedRoute;
332
+ exec_oidc_exchange: import("./routes.js").FixedRoute;
333
+ own_lock: import("./routes.js").ScopedRoute;
334
+ own_unlock: import("./routes.js").ScopedRoute;
335
+ own_pause: import("./routes.js").ScopedRoute;
336
+ own_resume: import("./routes.js").ScopedRoute;
337
+ own_complete: import("./routes.js").ScopedRoute;
338
+ own_kill: import("./routes.js").ScopedRoute;
339
+ own_amend: import("./routes.js").ScopedRoute;
340
+ own_fail: import("./routes.js").ScopedRoute;
341
+ own_events: import("./routes.js").ScopedRoute;
342
+ int_events: import("./routes.js").FixedRoute;
343
+ int_arm: import("./routes.js").FixedRoute;
344
+ int_sweep: import("./routes.js").FixedRoute;
345
+ int_charter: import("./routes.js").FixedRoute;
346
+ }>;
347
+ /**
348
+ * The closed list of freeze-record names allowed to be null (ruling 1.03): null until ruling 34.17.
349
+ * Empty since the ruling 34.17 calibration set L_spawn and T_hello.
350
+ */
351
+ CALIBRATED_PENDING: readonly [];
352
+ TERMINAL_EVENT_KINDS: readonly ["session.completed", "session.failed", "session.killed", "session.expired"];
353
+ SECRET_SCOPE: Readonly<{
354
+ secrets: readonly ["owner_jwt", "owner_refresh_token", "owner_api_key", "lease_key", "executor_key", "enroll_poll_secret"];
355
+ encodings: readonly ["raw", "base64", "base64url", "hex", "percent", "json_escaped"];
356
+ surfaces: readonly ["host_files", "process_env", "process_argv", "tmux_global_env", "tmux_session_env", "tmux_scrollback", "tmpdir_files", "seat_transcripts", "durable_spans", "durable_logs"];
357
+ allow: readonly Readonly<{
358
+ secret: import("./secret-scope.js").SecretKind;
359
+ path: ".mnemom/durable/executor-state.json";
360
+ }>[];
361
+ excluded_paths: readonly string[];
362
+ }>;
363
+ ENROLL_POLL_ERRORS: readonly ["authorization_pending", "slow_down", "access_denied", "expired_token", "already_consumed"];
364
+ DEVICE_PAGE_MARKERS: readonly ["data-subject-kind", "data-subject-runtime", "data-runtime-self-declared", "data-risk-sentence-id", "data-risk-line-version"];
365
+ STOPPED_FIX: Readonly<{
366
+ readonly paused: Readonly<{
367
+ null: "stopped_no_m1_remedy";
368
+ owner: "paused_owner";
369
+ agent_contained: "agent_contained";
370
+ breakglass: "stopped_no_m1_remedy";
371
+ }>;
372
+ readonly suspended: Readonly<{
373
+ budget_reached: "budget_reached";
374
+ enforce_refused: "stopped_no_m1_remedy";
375
+ charter_breach: "stopped_no_m1_remedy";
376
+ account_balance: "account_balance";
377
+ identity_mismatch: "identity_mismatch";
378
+ grant_expired: "grant_expired";
379
+ card_drift: "stopped_no_m1_remedy";
380
+ attestation_failed: "attestation_failed";
381
+ owner_departed: "stopped_no_m1_remedy";
382
+ respawn_failed: "respawn_failed";
383
+ approval_expired: "approval_expired";
384
+ approval_denied: "approval_denied";
385
+ }>;
386
+ readonly suspended_grant_expired: Readonly<{
387
+ "*": "grant_expired";
388
+ }>;
389
+ }>;
390
+ STOPPED_REASON_TEXT: Readonly<{
391
+ respawn_failed: "the seat failed to start <n> times in a row";
392
+ attestation_failed: "the claim check <check> failed";
393
+ }>;
394
+ /** executor-state.json: closed {version: 1, executor_id, executor_key, nonce, boot_id} (24.14). */
395
+ EXECUTOR_STATE_SCHEMA: Readonly<{
396
+ readonly version: {
397
+ readonly type: "integer";
398
+ readonly nullable: false;
399
+ };
400
+ readonly executor_id: {
401
+ readonly type: "uuid";
402
+ readonly nullable: false;
403
+ };
404
+ readonly executor_key: {
405
+ readonly type: "string";
406
+ readonly nullable: false;
407
+ };
408
+ readonly nonce: {
409
+ readonly type: "string";
410
+ readonly nullable: false;
411
+ };
412
+ readonly boot_id: {
413
+ readonly type: "string";
414
+ readonly nullable: false;
415
+ };
416
+ }>;
417
+ /** Heartbeat request entry / response entry keys; match results by session_id (24.15). */
418
+ HEARTBEAT_ENTRY_FIELDS: readonly ["session_id", "epoch", "spawn_id"];
419
+ HEARTBEAT_RESULT_FIELDS: readonly ["session_id", "extended", "reason", "lease_expires_at"];
420
+ /** GET exec_sessions body: only sessions[] and each item's uuid id are frozen (24.16). */
421
+ EXEC_SESSIONS_RESPONSE: Readonly<{
422
+ sessions: Readonly<{
423
+ item: Readonly<{
424
+ id: "uuid";
425
+ agent_id: "string";
426
+ state: "session_state";
427
+ state_reason: "state_reason|null";
428
+ lease_epoch: "integer";
429
+ lease_expires_at: "timestamp|null";
430
+ held_here: "boolean";
431
+ cc_session_id: "string|null";
432
+ cwd: "string|null";
433
+ spec: "object|null";
434
+ }>;
435
+ }>;
436
+ grant_expired: Readonly<{
437
+ sessions: "empty";
438
+ grant_expires_at: "timestamp";
439
+ grant_expired: true;
440
+ }>;
441
+ }>;
442
+ /** Owner session view: cc_session_id present, string or null; the view is otherwise open (#1085). */
443
+ OWNER_SESSION_VIEW_FIELDS: Readonly<{
444
+ cc_session_id: "string|null";
445
+ }>;
446
+ /** Claim refusal details (24.22.1): lost_race reasons, ineligible reasons and their presence rules. */
447
+ CLAIM_LOST_RACE_REASONS: readonly ["stale_tokens", "lease_live", "org_lease_cap"];
448
+ CLAIM_INELIGIBLE_REASONS: readonly ["bad_nonce", "bad_attest_failure", "not_found", "not_locked", "not_home", "not_owner", "executor_revoked", "executor_breakglass", "terminal", "expired", "cell_unmapped", "agent_killed", "paused", "agent_contained", "suspended", "profile", "respawn_failed", "attestation_failed", "identity_mismatch", "budget_reached", "grant_expired", "not_pool_member", "waiting"];
449
+ CLAIM_INELIGIBLE_DETAILS: Readonly<{
450
+ readonly bad_nonce: {};
451
+ readonly bad_attest_failure: {};
452
+ readonly not_found: {};
453
+ readonly not_locked: {};
454
+ readonly not_home: {};
455
+ readonly not_owner: {};
456
+ readonly executor_revoked: {};
457
+ readonly executor_breakglass: {};
458
+ readonly terminal: {
459
+ readonly state: "terminal_state";
460
+ };
461
+ readonly expired: {};
462
+ readonly cell_unmapped: {};
463
+ readonly agent_killed: {};
464
+ readonly paused: {
465
+ readonly state_reason: "paused";
466
+ };
467
+ readonly agent_contained: {
468
+ readonly state_reason: "agent_contained";
469
+ };
470
+ readonly suspended: {
471
+ readonly state_reason: "suspended";
472
+ };
473
+ readonly profile: {};
474
+ readonly respawn_failed: {
475
+ readonly state_reason: "reason";
476
+ };
477
+ readonly attestation_failed: {
478
+ readonly state_reason: "reason";
479
+ readonly check: "attestation_check";
480
+ };
481
+ readonly identity_mismatch: {
482
+ readonly state_reason: "reason";
483
+ readonly check: "attestation_check";
484
+ };
485
+ readonly budget_reached: {
486
+ readonly state_reason: "reason";
487
+ readonly check: "attestation_check";
488
+ };
489
+ readonly grant_expired: {
490
+ readonly state_reason: "reason";
491
+ readonly check: "attestation_check";
492
+ };
493
+ readonly not_pool_member: {};
494
+ readonly waiting: {
495
+ readonly wait_reason: "parked_only";
496
+ };
497
+ }>;
498
+ /** durable_refs_invalid details.reason for a refused park (34.06.3.1). */
499
+ PARK_REFUSAL_REASONS: readonly ["approval_not_open", "approval_wrong_session", "approval_wrong_subject", "wait_ref_shape"];
500
+ /** host status --json, closed: top level, seats[] and sessions[] (rulings 26, 24.12). */
501
+ HOST_STATUS_JSON: Readonly<{
502
+ installed: {
503
+ type: "boolean";
504
+ nullable: false;
505
+ };
506
+ loaded: {
507
+ type: "boolean";
508
+ nullable: false;
509
+ };
510
+ instance: {
511
+ type: "string";
512
+ nullable: false;
513
+ };
514
+ daemon_pid: {
515
+ type: "pid";
516
+ nullable: true;
517
+ };
518
+ lock_holder_pid: {
519
+ type: "pid";
520
+ nullable: true;
521
+ };
522
+ lock_path: {
523
+ type: "string";
524
+ nullable: false;
525
+ };
526
+ transcript_guard: {
527
+ type: "enum";
528
+ nullable: false;
529
+ values: readonly ["link", "copy"];
530
+ };
531
+ nonce_fingerprint: {
532
+ type: "fingerprint";
533
+ nullable: true;
534
+ };
535
+ key_fingerprint: {
536
+ type: "fingerprint";
537
+ nullable: true;
538
+ };
539
+ seats: {
540
+ type: "array";
541
+ nullable: false;
542
+ item: Readonly<{
543
+ session_id: {
544
+ type: "uuid";
545
+ nullable: false;
546
+ };
547
+ epoch: {
548
+ type: "integer";
549
+ nullable: false;
550
+ };
551
+ spawn_id: {
552
+ type: "uuid";
553
+ nullable: false;
554
+ };
555
+ state: {
556
+ type: "enum";
557
+ nullable: false;
558
+ values: readonly ["resuming", "running", "detached", "parked", "suspended", "paused", "completed", "failed", "killed", "expired", "ready"];
559
+ };
560
+ pid: {
561
+ type: "pid";
562
+ nullable: false;
563
+ };
564
+ proxy_pid: {
565
+ type: "pid";
566
+ nullable: true;
567
+ };
568
+ claude_pid: {
569
+ type: "pid";
570
+ nullable: true;
571
+ };
572
+ proxy_port: {
573
+ type: "port";
574
+ nullable: true;
575
+ };
576
+ socket_path: {
577
+ type: "string";
578
+ nullable: true;
579
+ };
580
+ spec_path: {
581
+ type: "string";
582
+ nullable: false;
583
+ };
584
+ spec_sha256: {
585
+ type: "hex64";
586
+ nullable: false;
587
+ };
588
+ }>;
589
+ };
590
+ sessions: {
591
+ type: "array";
592
+ nullable: false;
593
+ item: Readonly<{
594
+ session_id: {
595
+ type: "uuid";
596
+ nullable: false;
597
+ };
598
+ claim_unavailable: {
599
+ type: "object";
600
+ nullable: true;
601
+ fields: Readonly<{
602
+ cause: {
603
+ type: "enum";
604
+ nullable: false;
605
+ values: readonly ["schema", "arm_probe", "entitlement_lookup", "protection_probe", "guard", "lease_cap_config"];
606
+ };
607
+ consecutive: {
608
+ type: "positive_integer";
609
+ nullable: false;
610
+ };
611
+ }>;
612
+ };
613
+ }>;
614
+ };
615
+ }>;
616
+ /** host status --json for no state file, enrolled with no nonce, uninstalled with a state file (26.1). */
617
+ HOST_STATUS_JSON_VECTORS: Readonly<{
618
+ no_state_file: Readonly<{
619
+ installed: false;
620
+ loaded: false;
621
+ daemon_pid: null;
622
+ lock_holder_pid: null;
623
+ nonce_fingerprint: null;
624
+ key_fingerprint: null;
625
+ instance: "ai.mnemom.agent-host.default";
626
+ lock_path: "/Users/dev/.mnemom/durable/host.lock";
627
+ transcript_guard: "link";
628
+ seats: readonly [];
629
+ sessions: readonly [];
630
+ }>;
631
+ enrolled_no_nonce: Readonly<{
632
+ nonce_fingerprint: null;
633
+ key_fingerprint: "4b27142c3a90";
634
+ installed: true;
635
+ loaded: true;
636
+ instance: "ai.mnemom.agent-host.default";
637
+ daemon_pid: 4000;
638
+ lock_holder_pid: 4000;
639
+ lock_path: "/Users/dev/.mnemom/durable/host.lock";
640
+ transcript_guard: "link";
641
+ seats: readonly [];
642
+ sessions: readonly [];
643
+ }>;
644
+ not_installed_with_state_file: Readonly<{
645
+ installed: false;
646
+ loaded: false;
647
+ daemon_pid: null;
648
+ lock_holder_pid: null;
649
+ nonce_fingerprint: "55ccea8c7f0d";
650
+ key_fingerprint: "4b27142c3a90";
651
+ instance: "ai.mnemom.agent-host.default";
652
+ lock_path: "/Users/dev/.mnemom/durable/host.lock";
653
+ transcript_guard: "link";
654
+ seats: readonly [];
655
+ sessions: readonly [];
656
+ }>;
657
+ }>;
658
+ /** C06 sweep dimension vocabulary admitSweepDigest accepts; dims arrive ordered (24.11.1). */
659
+ ADMIT_SWEEP_VALUES: Readonly<Record<string, readonly unknown[]>>;
660
+ /** Pack-time plugin integrity manifest, closed (ruling 25). */
661
+ PLUGIN_MANIFEST_SCHEMA: Readonly<{
662
+ readonly type: "object";
663
+ readonly additionalProperties: false;
664
+ readonly required: readonly ["recipe_version", "plugin_dir", "files", "dir_hash"];
665
+ readonly properties: {
666
+ readonly recipe_version: {
667
+ readonly const: 1;
668
+ };
669
+ readonly plugin_dir: {
670
+ readonly const: "plugins/mnemom";
671
+ };
672
+ readonly files: {
673
+ readonly type: "array";
674
+ readonly items: {
675
+ readonly type: "object";
676
+ readonly additionalProperties: false;
677
+ readonly required: readonly ["path", "sha256"];
678
+ readonly properties: {
679
+ readonly path: {
680
+ readonly type: "string";
681
+ readonly pattern: "^(?!.*(?:^|/)\\.{1,2}(?:/|$))[^/\\\\\\u0000]+(?:/[^/\\\\\\u0000]+)*$";
682
+ };
683
+ readonly sha256: {
684
+ readonly type: "string";
685
+ readonly pattern: "^[0-9a-f]{64}$";
686
+ };
687
+ };
688
+ };
689
+ };
690
+ readonly dir_hash: {
691
+ readonly type: "string";
692
+ readonly pattern: "^[0-9a-f]{64}$";
693
+ };
694
+ };
695
+ }>;
696
+ PLUGIN_MANIFEST_FAILURES: readonly ["missing", "unparseable", "recipe", "dir_hash", "not_regular", "added", "removed", "edited"];
697
+ HEARTBEAT_REQUEST_KEYS: readonly ["nonce", "entries"];
698
+ CLAIM_BODY_KEYS: readonly ["nonce", "tokens", "new_key"];
699
+ CHARTER_BY_HASH_BODY_KEYS: readonly ["session_id", "charter_hash"];
700
+ CHARTER_BY_HASH_RESPONSE: Readonly<{
701
+ conversation_id: "string";
702
+ version: "integer>=1";
703
+ sealed_at: "utc_timestamp";
704
+ contract: Readonly<{
705
+ statement: "string";
706
+ requirements: "string[]";
707
+ allowed_paths: "string[]";
708
+ forbidden_paths: "string[]";
709
+ }>;
710
+ }>;
711
+ GATEWAY_EVENTS_BODY_KEYS: readonly ["session_id", "kind", "epoch", "idempotency_key", "refs"];
712
+ READY_CAUSES: readonly ["dispatched", "lease_expired", "wait_cleared"];
713
+ WAIT_REASONS: readonly ["approval", "moving", "mnemom_unavailable", "ci", "question", "budget"];
714
+ PARKED_ONLY_WAIT_REASONS: readonly ["ci", "question", "budget"];
715
+ WAIT_REF_KEYS: Readonly<{
716
+ readonly ci: readonly ["repo_id", "head_sha"];
717
+ readonly question: readonly ["approval_id"];
718
+ readonly budget: readonly ["approval_id"];
719
+ }>;
720
+ CLEAR_WAIT_OUTCOMES: readonly ["cleared", "stale_ref", "already_clear"];
721
+ EXECUTOR_SCOPES: readonly ["user", "org"];
722
+ ORG_SCOPE_EXECUTOR_KINDS: readonly ["container", "fleet"];
723
+ OIDC_EXCHANGE_REFUSALS: readonly ["bad_issuer", "repo_not_enrolled", "ref_not_allowed", "pool_flag_off"];
724
+ ORG_POLICY_LIMIT_KEYS: readonly ["per_session_budget_usd", "live_lease_cap"];
725
+ POOL_CLAIM_FIELDS: readonly ["contract_sha256", "contract_version", "cap"];
726
+ CREATE_READY_SESSION_REFUSALS: readonly ["no_dispatch_agent", "seal_not_found", "cell_unmapped", "charter_mismatch"];
727
+ CREATE_READY_SESSION_OUTCOMES: readonly ["created", "existing", "refused"];
728
+ CREATE_READY_SESSION_ANSWERS: Readonly<{
729
+ readonly created: readonly ["outcome", "session_id"];
730
+ readonly existing: readonly ["outcome", "session_id"];
731
+ readonly refused: readonly ["outcome", "reason"];
732
+ }>;
733
+ JOURNAL_APPROVAL_KINDS: readonly ["approval.resolved", "approval.consumed"];
734
+ RUNNER_OUTCOMES: readonly ["done", "no_job", "failed", "refused"];
735
+ RUNNER_OUTCOME_FIELDS: readonly ["v", "outcome", "session_id", "lease_epoch", "contract_sha256", "contract_version", "merge_strategy", "pr_url", "reason"];
736
+ RUNNER_EXIT_CODES: Readonly<{
737
+ readonly done: 0;
738
+ readonly no_job: 0;
739
+ readonly failed: 1;
740
+ readonly usage: 2;
741
+ readonly refused: 3;
742
+ }>;
743
+ RUNNER_FAILED_REASONS: readonly ["pr_open_failed"];
744
+ RUNNER_REFUSED_REASONS: readonly ["bundle_too_large", "bundle_malformed", "bundle_wrong_typ", "bundle_schema", "bundle_unknown_key", "bundle_unusable_key", "bundle_retired_key", "bundle_bad_signature", "bundle_code_digest_mismatch", "bundle_not_yet_valid", "bundle_expired", "bundle_binding_mismatch", "bundle_unavailable", "job_unavailable", "contract_bad_sha", "contract_too_large", "contract_sha_mismatch", "contract_not_a_contract", "contract_mismatch_unrecoverable", "claim_needs_key", "claim_ineligible", "claim_unavailable", "lease_lost", "executor_revoked", "executor_unauthorized", "oidc_bad_issuer", "oidc_repo_not_enrolled", "oidc_ref_not_allowed", "oidc_pool_flag_off", "oidc_unavailable", "api_unavailable"];
745
+ RUNNER_OPEN_MODE_TOLERATED: readonly ["bundle_unavailable", "job_unavailable", "api_unavailable"];
746
+ RUNNER_MERGE_STRATEGIES: readonly ["external", "merge_on_green"];
747
+ }>;
748
+ export type StructuredName = keyof typeof FREEZE_STRUCTURED;
749
+ /** DSL spellings already in the case files (CASE-DSL section 5.2 names $S1.L_spawn), each to one canonical name. */
750
+ export declare const FREEZE_ALIASES: Readonly<{
751
+ readonly L_SPAWN: "L_spawn";
752
+ readonly T_HELLO_S: "T_hello";
753
+ readonly PER_SESSION_BUDGET_LIMIT: "PER_SESSION_BUDGET_LIMIT_USD";
754
+ readonly PER_SESSION_LIMIT: "PER_SESSION_BUDGET_LIMIT_USD";
755
+ readonly DEFAULT_LEASE_SECONDS: "LEASE_SECONDS_DEFAULT";
756
+ readonly STATEMENT_MAX: "CONTRACT_STATEMENT_MAX_CHARS";
757
+ readonly GATEWAY_EVENTS_PATH: "GATEWAY_EVENTS_ROUTE";
758
+ readonly SPAN_NAME_HELLO: "SPAN_DURABLE_SEAT_HELLO";
759
+ readonly DEVICE_VERIFY_WOULD_REFUSE_SPAN: "SPAN_DEVICE_VERIFY_WOULD_REFUSE";
760
+ readonly SPAN_NAMES_M1: "M1_SPAN_NAMES";
761
+ readonly SPAN_KEYS_M1: "SPAN_ATTRIBUTE_KEYS";
762
+ readonly ARBITERS: "M1_ARBITERS";
763
+ readonly FUNCTION_EXECUTE_EXCEPTIONS: "EXECUTE_EXCEPTIONS";
764
+ readonly TEST_MODE_GUARD_URLS: "TEST_MODE_GUARD_LISTS";
765
+ }>;
766
+ /** True when `name` is a frozen S1 name (canonical or alias), set or not. */
767
+ export declare function s1Has(name: string): boolean;
768
+ /**
769
+ * True when `name` (canonical or alias) is a CALIBRATED_PENDING name whose value is still null: the
770
+ * G4 resolution check counts it RESOLVED_PENDING and the runner reports a case reading it NOT_RUN
771
+ * (s1_uncalibrated:<name>), never substituting a default (ruling 1.03).
772
+ */
773
+ export declare function s1Pending(name: string): boolean;
774
+ /**
775
+ * The ruling 1.03 test behind s1Pending: `canonical` is listed in `pending` and still null in
776
+ * `record`. Kept apart so the rule stays tested while CALIBRATED_PENDING is empty (ruling 34.17).
777
+ */
778
+ export declare function pendingIn(record: Readonly<Record<string, unknown>>, pending: readonly string[], canonical: string): boolean;
779
+ /**
780
+ * `record[canonical]` for s1Value: throws on an unknown name or an unset (null) value, naming the
781
+ * spelling the case used. Kept apart for the same reason as pendingIn.
782
+ */
783
+ export declare function recordValueIn(record: Readonly<Record<string, unknown>>, canonical: string, name: string): unknown;
784
+ /** `$S1.<NAME>` lookup for the case runner; throws on an unknown name or an unset (null) value. */
785
+ export declare function s1Value(name: string): unknown;
786
+ /** `$S1.<NAME>.<path>` lookup: `.field` segments and `[n]` indexes; throws on any missing segment. */
787
+ export declare function s1Resolve(ref: string): unknown;