@intentic/sandbox-contract 1.223.0 → 1.225.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 (165) hide show
  1. package/README.md +14 -14
  2. package/dist/agent-catalog.js +3 -3
  3. package/dist/agent-catalog.js.map +1 -1
  4. package/dist/chores/chores.js +43 -43
  5. package/dist/chores/chores.js.map +1 -1
  6. package/dist/chores/extension-update.js +2 -2
  7. package/dist/chores/extension-update.js.map +1 -1
  8. package/dist/chores/fix-deps.js +1 -1
  9. package/dist/chores/fix-deps.js.map +1 -1
  10. package/dist/chores/probes.js +1 -1
  11. package/dist/chores/probes.js.map +1 -1
  12. package/dist/chores/prompt.d.ts.map +1 -1
  13. package/dist/chores/prompt.js +3 -3
  14. package/dist/chores/prompt.js.map +1 -1
  15. package/dist/chores/verdict.js +2 -2
  16. package/dist/chores/verdict.js.map +1 -1
  17. package/dist/contracts/capabilities.contract.d.ts +41 -0
  18. package/dist/contracts/capabilities.contract.d.ts.map +1 -1
  19. package/dist/contracts/exit.contract.d.ts +80 -0
  20. package/dist/contracts/exit.contract.d.ts.map +1 -0
  21. package/dist/contracts/exit.contract.js +13 -0
  22. package/dist/contracts/exit.contract.js.map +1 -0
  23. package/dist/contracts/ports.contract.d.ts +11 -0
  24. package/dist/contracts/ports.contract.d.ts.map +1 -1
  25. package/dist/contracts/settings.contract.d.ts +12 -0
  26. package/dist/contracts/settings.contract.d.ts.map +1 -1
  27. package/dist/events.d.ts +4 -4
  28. package/dist/events.d.ts.map +1 -1
  29. package/dist/events.js +5 -5
  30. package/dist/events.js.map +1 -1
  31. package/dist/fast-tier.d.ts +9 -0
  32. package/dist/fast-tier.d.ts.map +1 -0
  33. package/dist/fast-tier.js +19 -0
  34. package/dist/fast-tier.js.map +1 -0
  35. package/dist/history-state.js +3 -3
  36. package/dist/history-state.js.map +1 -1
  37. package/dist/index.d.ts +214 -68
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/index.js +5 -0
  40. package/dist/index.js.map +1 -1
  41. package/dist/model-order.d.ts +1 -0
  42. package/dist/model-order.d.ts.map +1 -1
  43. package/dist/model-order.js +5 -0
  44. package/dist/model-order.js.map +1 -1
  45. package/dist/output-fields.d.ts.map +1 -1
  46. package/dist/output-fields.js +2 -2
  47. package/dist/output-fields.js.map +1 -1
  48. package/dist/prompt-complexity.d.ts +19 -0
  49. package/dist/prompt-complexity.d.ts.map +1 -0
  50. package/dist/prompt-complexity.js +83 -0
  51. package/dist/prompt-complexity.js.map +1 -0
  52. package/dist/publish-drafts.js +2 -2
  53. package/dist/publish-drafts.js.map +1 -1
  54. package/dist/schemas.d.ts +236 -0
  55. package/dist/schemas.d.ts.map +1 -1
  56. package/dist/schemas.js +116 -2
  57. package/dist/schemas.js.map +1 -1
  58. package/dist/workflow-faults.js +3 -3
  59. package/dist/workflow-faults.js.map +1 -1
  60. package/dist/workspace-state.d.ts +20 -20
  61. package/dist/workspace-state.d.ts.map +1 -1
  62. package/dist/workspace-state.js +20 -20
  63. package/dist/workspace-state.js.map +1 -1
  64. package/package.json +5 -5
  65. package/src/agent-catalog.test.ts +25 -25
  66. package/src/agent-catalog.ts +81 -81
  67. package/src/agent-run-model.test.ts +3 -3
  68. package/src/agent-run-model.ts +8 -8
  69. package/src/capability-env.ts +3 -3
  70. package/src/capability-ledger.test.ts +13 -13
  71. package/src/capability-secrets.ts +5 -5
  72. package/src/chores/chores.test.ts +1 -1
  73. package/src/chores/chores.ts +109 -109
  74. package/src/chores/digest.test.ts +1 -1
  75. package/src/chores/digest.ts +3 -3
  76. package/src/chores/extension-update.ts +5 -5
  77. package/src/chores/fix-deps.ts +4 -4
  78. package/src/chores/probes.test.ts +6 -6
  79. package/src/chores/probes.ts +17 -17
  80. package/src/chores/prompt.ts +9 -9
  81. package/src/chores/stack.test.ts +3 -3
  82. package/src/chores/stack.ts +17 -17
  83. package/src/chores/verdict.test.ts +20 -20
  84. package/src/chores/verdict.ts +25 -25
  85. package/src/contract-lock.test.ts +1 -1
  86. package/src/contract-lock.ts +7 -7
  87. package/src/contracts/activity.contract.ts +1 -1
  88. package/src/contracts/agent.contract.ts +2 -2
  89. package/src/contracts/agents.contract.ts +11 -11
  90. package/src/contracts/automations.contract.ts +5 -5
  91. package/src/contracts/capabilities.contract.ts +7 -7
  92. package/src/contracts/chores.contract.ts +3 -3
  93. package/src/contracts/ci.contract.ts +2 -2
  94. package/src/contracts/claude.contract.ts +3 -3
  95. package/src/contracts/drafts.contract.ts +1 -1
  96. package/src/contracts/endpoints.contract.ts +2 -2
  97. package/src/contracts/exit.contract.ts +42 -0
  98. package/src/contracts/extensions.contract.ts +8 -8
  99. package/src/contracts/git.contract.ts +6 -6
  100. package/src/contracts/grok.contract.ts +4 -4
  101. package/src/contracts/host.contract.ts +5 -5
  102. package/src/contracts/intentic.contract.ts +2 -2
  103. package/src/contracts/logs.contract.ts +1 -1
  104. package/src/contracts/loops.contract.ts +8 -8
  105. package/src/contracts/personas.contract.ts +8 -8
  106. package/src/contracts/ports.contract.ts +1 -1
  107. package/src/contracts/prepush.contract.ts +2 -2
  108. package/src/contracts/providers.contract.ts +4 -4
  109. package/src/contracts/public.contract.ts +1 -1
  110. package/src/contracts/push.contract.ts +2 -2
  111. package/src/contracts/secrets.contract.ts +2 -2
  112. package/src/contracts/sessions.contract.ts +2 -2
  113. package/src/contracts/settings.contract.ts +3 -3
  114. package/src/contracts/share.contract.ts +1 -1
  115. package/src/contracts/skills.contract.ts +2 -2
  116. package/src/contracts/system.contract.ts +9 -9
  117. package/src/contracts/usage.contract.ts +1 -1
  118. package/src/contracts/vpn.contract.ts +5 -5
  119. package/src/contracts/workflows.contract.ts +12 -12
  120. package/src/contracts/workspace.contract.ts +13 -13
  121. package/src/conversation-ids.ts +8 -8
  122. package/src/events.test.ts +3 -3
  123. package/src/events.ts +142 -142
  124. package/src/fast-tier.test.ts +88 -0
  125. package/src/fast-tier.ts +72 -0
  126. package/src/history-state.ts +15 -15
  127. package/src/host-protocol.ts +7 -7
  128. package/src/hostnames.test.ts +1 -1
  129. package/src/hostnames.ts +15 -15
  130. package/src/index.ts +13 -8
  131. package/src/listener-protocol.ts +12 -12
  132. package/src/model-order.test.ts +11 -11
  133. package/src/model-order.ts +52 -30
  134. package/src/output-fields.ts +11 -11
  135. package/src/path-refs.test.ts +4 -4
  136. package/src/path-refs.ts +6 -6
  137. package/src/prompt-complexity.test.ts +160 -0
  138. package/src/prompt-complexity.ts +271 -0
  139. package/src/publish-drafts.ts +8 -8
  140. package/src/quick-model.test.ts +11 -11
  141. package/src/quick-model.ts +15 -15
  142. package/src/routes.test.ts +11 -5
  143. package/src/routes.ts +19 -19
  144. package/src/runtime-state.test.ts +1 -1
  145. package/src/runtime-state.ts +22 -22
  146. package/src/schemas.test.ts +8 -8
  147. package/src/schemas.ts +1238 -921
  148. package/src/search-globs.test.ts +2 -2
  149. package/src/search-globs.ts +6 -6
  150. package/src/session-names.ts +5 -5
  151. package/src/share-paths.test.ts +1 -1
  152. package/src/share-paths.ts +7 -7
  153. package/src/sse.ts +1 -1
  154. package/src/state-portability.ts +8 -8
  155. package/src/terminal-protocol.ts +3 -3
  156. package/src/title.test.ts +9 -9
  157. package/src/title.ts +21 -21
  158. package/src/tunnel-ids.test.ts +3 -3
  159. package/src/tunnel-ids.ts +7 -7
  160. package/src/versions.test.ts +3 -3
  161. package/src/versions.ts +6 -6
  162. package/src/workflow-faults.test.ts +6 -6
  163. package/src/workflow-faults.ts +14 -14
  164. package/src/workspace-state.test.ts +32 -32
  165. package/src/workspace-state.ts +139 -139
@@ -1,16 +1,16 @@
1
1
  import { describe, expect, it } from "vitest";
2
2
  import { type AgentCapabilities, capabilitiesOf, limitationsOf } from "./agent-catalog.js";
3
3
 
4
- /* THE CAPABILITY LEDGER which claims in the record are backed by machinery, and which by prose.
4
+ /* THE CAPABILITY LEDGER, which claims in the record are backed by machinery, and which by prose.
5
5
  *
6
6
  * agent-catalog.test.ts asks two other questions: does every provider/harness pair HAVE a row, and does every
7
7
  * axis a record can lack have words for it. A row can pass both and still be a lie. The ability is declared,
8
- * the sentence renders in the picker's footer, and nothing anywhere behaves differently so the day the
8
+ * the sentence renders in the picker's footer, and nothing anywhere behaves differently, so the day the
9
9
  * runtime gains the ability (or loses it), the declaration keeps its old value and the footer keeps telling the
10
10
  * user something that stopped being true. Over-promising is the direction that hurts: told a runtime can be
11
11
  * steered, someone types a mid-turn correction into a queue that does not exist.
12
12
  *
13
- * The record's header already states the rule "a capability is listed here only if something READS it". This
13
+ * The record's header already states the rule: "a capability is listed here only if something READS it". This
14
14
  * is the rule with teeth. Every field is ENFORCED (a seam opens or closes on it, and the entry cites where) or
15
15
  * DESCRIPTIVE (it gates nothing; its whole job is that one sentence). `Record<keyof AgentCapabilities, …>`
16
16
  * makes the split exhaustive at COMPILE time: a field added to the interface without an entry here does not
@@ -19,7 +19,7 @@ import { type AgentCapabilities, capabilitiesOf, limitationsOf } from "./agent-c
19
19
  *
20
20
  * WHAT THIS DOES NOT DO, deliberately: prove an ENFORCED gate exists. Those gates live in the daemon and the
21
21
  * web, which sit ABOVE this package and must not be imported back into it. So an enforced entry's citation is a
22
- * comment a reader checks, and the honest reading is "someone verified this once" not "CI verifies it". The
22
+ * comment a reader checks, and the honest reading is "someone verified this once", not "CI verifies it". The
23
23
  * descriptive half IS machine-checked below, because it can be: those claims reach the user through
24
24
  * `limitationsOf`, which is right here.
25
25
  *
@@ -31,7 +31,7 @@ const LEDGER: Record<keyof AgentCapabilities, Backing> = {
31
31
  // adapter-registry.ts maps runtime → the adapter that serves the turn; getting it wrong runs the turn on
32
32
  // the wrong loop entirely. Also keys the daemon's per-runtime health probes (useSandboxVersion.ts).
33
33
  runtime: "enforced",
34
- // conversation.ts's `steerable` the composer offers mid-turn injection only where there is a queue.
34
+ // conversation.ts's `steerable`: the composer offers mid-turn injection only where there is a queue.
35
35
  steering: "enforced",
36
36
  // turn-plan.ts forwards `permissionMode` only under "modes" (bar plan); modesFor/clampMode build the
37
37
  // composer's mode list from it, so a plan-only runtime is offered two postures rather than four names.
@@ -47,23 +47,23 @@ const LEDGER: Record<keyof AgentCapabilities, Backing> = {
47
47
  // turn-plan.ts tells a "cwd" turn where its worktree is, because an absolute /work path still reaches the
48
48
  // shared checkout there. Under "namespace" the mount does it and the note would be noise.
49
49
  isolation: "enforced",
50
- /* system-prompt.ts composes a turn's standing instructions AGAINST this value a replacement where one may
50
+ /* system-prompt.ts composes a turn's standing instructions AGAINST this value: a replacement where one may
51
51
  * be sent, an addition where only that is possible, and the user-message door for the persona note where
52
- * there is no system seam at all and each adapter reads the field the composition set (codex-agent.ts's
52
+ * there is no system seam at all, and each adapter reads the field the composition set (codex-agent.ts's
53
53
  * two config keys, grok-agent.ts's per-message `system`). It is also the one axis whose absence was the bug
54
54
  * that produced it: before the field existed, every runtime was composed for as though it were the Claude
55
55
  * Code loop, and five of the six silently dropped the owner's prompt. */
56
56
  instructions: "enforced",
57
57
  // turn-plan.ts (honoured) plans the JS backend only where "js" is declared, so a runtime without it is
58
- // handed no `jsExecution` and mounts no Code tool the same drop-what-you-can't-honour rule as `effort`.
58
+ // handed no `jsExecution` and mounts no Code tool: the same drop-what-you-can't-honour rule as `effort`.
59
59
  execution: "enforced",
60
60
 
61
- /* DESCRIPTIVE true of the runtime, and nothing consults them. Each describes behaviour that is emergent
61
+ /* DESCRIPTIVE: true of the runtime, and nothing consults them. Each describes behaviour that is emergent
62
62
  * rather than gated: an agent that never emits `question` frames simply never asks, one that publishes no
63
63
  * commands leaves the `/` popover empty. Nothing has to switch off, which is why nothing does. That also
64
64
  * means the declaration and the behaviour are two independent facts, and only the reader below keeps them
65
65
  * from disagreeing in the one place a user can see. Wiring one up (hiding the terminal tab, skipping
66
- * auto-resume) moves it to ENFORCED in the change that wires it. */
66
+ * auto-resume) moves it to ENFORCED: in the change that wires it. */
67
67
  questions: "descriptive",
68
68
  commands: "descriptive",
69
69
  terminals: "descriptive",
@@ -86,7 +86,7 @@ it("classifies exactly the fields a live record carries", () => {
86
86
  /* A DESCRIPTIVE field earns its place by reaching the user, since by definition it does nothing else. Checked
87
87
  * per field rather than by counting sentences: an aggregate is satisfied by one axis contributing two lines
88
88
  * while another contributes none, which is exactly the case worth catching. Anything that survives here without
89
- * a sentence is decoration, and the fix is to delete the field or wire it up not to add an exemption. */
89
+ * a sentence is decoration, and the fix is to delete the field or wire it up, not to add an exemption. */
90
90
  describe("a descriptive claim reaches the user", () => {
91
91
  it("has something to disclose against: the ceiling discloses nothing", () => {
92
92
  expect(limitationsOf(CEILING)).toEqual([]);
@@ -102,9 +102,9 @@ describe("a descriptive claim reaches the user", () => {
102
102
  });
103
103
 
104
104
  /* The ledger is a split, not a label: a set that swallowed everything would typecheck and prove nothing. Both
105
- * sides being occupied is what makes reading an entry informative and if the descriptive side ever empties
105
+ * sides being occupied is what makes reading an entry informative, and if the descriptive side ever empties
106
106
  * because every axis got wired up, that is a real event, and deleting this file is the right response to it. */
107
- it("is a real split neither side is empty", () => {
107
+ it("is a real split: neither side is empty", () => {
108
108
  expect(fieldsWhere("enforced").length).toBeGreaterThan(0);
109
109
  expect(fieldsWhere("descriptive").length).toBeGreaterThan(0);
110
110
  });
@@ -1,4 +1,4 @@
1
- /* THE ONE VALUE THAT MEANS "WHATEVER IS ALREADY STORED" the rule both ends of the capability wire apply.
1
+ /* THE ONE VALUE THAT MEANS "WHATEVER IS ALREADY STORED", the rule both ends of the capability wire apply.
2
2
  *
3
3
  * A capability's credentials never reach a browser: the list route echoes the shape of a connection and drops
4
4
  * every secret in it, and the manifest on disk holds this marker where each value used to be (the vault keeps
@@ -6,15 +6,15 @@
6
6
  * change a tunnel's routed networks sends this back in place of the pre-shared key it was never shown, and both
7
7
  * the write path and the storage layer read it as "leave that one alone".
8
8
  *
9
- * Deliberately not an empty string and not a dropped key. The entry still has to satisfy CapabilitySchema a
10
- * connector's required token, an ssh key and a reader that somehow bypasses rehydration must fail LOUDLY: a
9
+ * Deliberately not an empty string and not a dropped key. The entry still has to satisfy CapabilitySchema, a
10
+ * connector's required token, an ssh key, and a reader that somehow bypasses rehydration must fail LOUDLY: a
11
11
  * service refusing this string is a clear auth error, where an empty value reads as "not configured yet" and a
12
12
  * missing key as a shape change.
13
13
  *
14
14
  * It lives in the contract rather than in the daemon's store because it is now spoken on the wire. The browser
15
15
  * has to be able to say it, the add route has to resolve it before a handler ever sees it, and the store has to
16
- * refuse to write it over a real value three places, one spelling. */
16
+ * refuse to write it over a real value, three places, one spelling. */
17
17
  export const VAULTED = "__intentic_vaulted__";
18
18
 
19
- /** Whether a config value is the marker rather than a credential the check, so the string is typed once. */
19
+ /** Whether a config value is the marker rather than a credential, the check, so the string is typed once. */
20
20
  export const isVaulted = (value: unknown): boolean => value === VAULTED;
@@ -16,7 +16,7 @@ describe(`the chore book's order`, () => {
16
16
  });
17
17
 
18
18
  it(`keeps every chore in the book`, () => {
19
- // The sort cannot drop an entry but a future refactor to a filter-into-groups could, so the count is
19
+ // The sort cannot drop an entry, but a future refactor to a filter-into-groups could, so the count is
20
20
  // pinned to the ids rather than to a number, which says which one went missing.
21
21
  expect(new Set(CHORES.map((chore) => chore.id)).size).toBe(CHORES.length);
22
22
  expect(CHORES.length).toBe(17);