@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.
- package/README.md +14 -14
- package/dist/agent-catalog.js +3 -3
- package/dist/agent-catalog.js.map +1 -1
- package/dist/chores/chores.js +43 -43
- package/dist/chores/chores.js.map +1 -1
- package/dist/chores/extension-update.js +2 -2
- package/dist/chores/extension-update.js.map +1 -1
- package/dist/chores/fix-deps.js +1 -1
- package/dist/chores/fix-deps.js.map +1 -1
- package/dist/chores/probes.js +1 -1
- package/dist/chores/probes.js.map +1 -1
- package/dist/chores/prompt.d.ts.map +1 -1
- package/dist/chores/prompt.js +3 -3
- package/dist/chores/prompt.js.map +1 -1
- package/dist/chores/verdict.js +2 -2
- package/dist/chores/verdict.js.map +1 -1
- package/dist/contracts/capabilities.contract.d.ts +41 -0
- package/dist/contracts/capabilities.contract.d.ts.map +1 -1
- package/dist/contracts/exit.contract.d.ts +80 -0
- package/dist/contracts/exit.contract.d.ts.map +1 -0
- package/dist/contracts/exit.contract.js +13 -0
- package/dist/contracts/exit.contract.js.map +1 -0
- package/dist/contracts/ports.contract.d.ts +11 -0
- package/dist/contracts/ports.contract.d.ts.map +1 -1
- package/dist/contracts/settings.contract.d.ts +12 -0
- package/dist/contracts/settings.contract.d.ts.map +1 -1
- package/dist/events.d.ts +4 -4
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +5 -5
- package/dist/events.js.map +1 -1
- package/dist/fast-tier.d.ts +9 -0
- package/dist/fast-tier.d.ts.map +1 -0
- package/dist/fast-tier.js +19 -0
- package/dist/fast-tier.js.map +1 -0
- package/dist/history-state.js +3 -3
- package/dist/history-state.js.map +1 -1
- package/dist/index.d.ts +214 -68
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/model-order.d.ts +1 -0
- package/dist/model-order.d.ts.map +1 -1
- package/dist/model-order.js +5 -0
- package/dist/model-order.js.map +1 -1
- package/dist/output-fields.d.ts.map +1 -1
- package/dist/output-fields.js +2 -2
- package/dist/output-fields.js.map +1 -1
- package/dist/prompt-complexity.d.ts +19 -0
- package/dist/prompt-complexity.d.ts.map +1 -0
- package/dist/prompt-complexity.js +83 -0
- package/dist/prompt-complexity.js.map +1 -0
- package/dist/publish-drafts.js +2 -2
- package/dist/publish-drafts.js.map +1 -1
- package/dist/schemas.d.ts +236 -0
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +116 -2
- package/dist/schemas.js.map +1 -1
- package/dist/workflow-faults.js +3 -3
- package/dist/workflow-faults.js.map +1 -1
- package/dist/workspace-state.d.ts +20 -20
- package/dist/workspace-state.d.ts.map +1 -1
- package/dist/workspace-state.js +20 -20
- package/dist/workspace-state.js.map +1 -1
- package/package.json +5 -5
- package/src/agent-catalog.test.ts +25 -25
- package/src/agent-catalog.ts +81 -81
- package/src/agent-run-model.test.ts +3 -3
- package/src/agent-run-model.ts +8 -8
- package/src/capability-env.ts +3 -3
- package/src/capability-ledger.test.ts +13 -13
- package/src/capability-secrets.ts +5 -5
- package/src/chores/chores.test.ts +1 -1
- package/src/chores/chores.ts +109 -109
- package/src/chores/digest.test.ts +1 -1
- package/src/chores/digest.ts +3 -3
- package/src/chores/extension-update.ts +5 -5
- package/src/chores/fix-deps.ts +4 -4
- package/src/chores/probes.test.ts +6 -6
- package/src/chores/probes.ts +17 -17
- package/src/chores/prompt.ts +9 -9
- package/src/chores/stack.test.ts +3 -3
- package/src/chores/stack.ts +17 -17
- package/src/chores/verdict.test.ts +20 -20
- package/src/chores/verdict.ts +25 -25
- package/src/contract-lock.test.ts +1 -1
- package/src/contract-lock.ts +7 -7
- package/src/contracts/activity.contract.ts +1 -1
- package/src/contracts/agent.contract.ts +2 -2
- package/src/contracts/agents.contract.ts +11 -11
- package/src/contracts/automations.contract.ts +5 -5
- package/src/contracts/capabilities.contract.ts +7 -7
- package/src/contracts/chores.contract.ts +3 -3
- package/src/contracts/ci.contract.ts +2 -2
- package/src/contracts/claude.contract.ts +3 -3
- package/src/contracts/drafts.contract.ts +1 -1
- package/src/contracts/endpoints.contract.ts +2 -2
- package/src/contracts/exit.contract.ts +42 -0
- package/src/contracts/extensions.contract.ts +8 -8
- package/src/contracts/git.contract.ts +6 -6
- package/src/contracts/grok.contract.ts +4 -4
- package/src/contracts/host.contract.ts +5 -5
- package/src/contracts/intentic.contract.ts +2 -2
- package/src/contracts/logs.contract.ts +1 -1
- package/src/contracts/loops.contract.ts +8 -8
- package/src/contracts/personas.contract.ts +8 -8
- package/src/contracts/ports.contract.ts +1 -1
- package/src/contracts/prepush.contract.ts +2 -2
- package/src/contracts/providers.contract.ts +4 -4
- package/src/contracts/public.contract.ts +1 -1
- package/src/contracts/push.contract.ts +2 -2
- package/src/contracts/secrets.contract.ts +2 -2
- package/src/contracts/sessions.contract.ts +2 -2
- package/src/contracts/settings.contract.ts +3 -3
- package/src/contracts/share.contract.ts +1 -1
- package/src/contracts/skills.contract.ts +2 -2
- package/src/contracts/system.contract.ts +9 -9
- package/src/contracts/usage.contract.ts +1 -1
- package/src/contracts/vpn.contract.ts +5 -5
- package/src/contracts/workflows.contract.ts +12 -12
- package/src/contracts/workspace.contract.ts +13 -13
- package/src/conversation-ids.ts +8 -8
- package/src/events.test.ts +3 -3
- package/src/events.ts +142 -142
- package/src/fast-tier.test.ts +88 -0
- package/src/fast-tier.ts +72 -0
- package/src/history-state.ts +15 -15
- package/src/host-protocol.ts +7 -7
- package/src/hostnames.test.ts +1 -1
- package/src/hostnames.ts +15 -15
- package/src/index.ts +13 -8
- package/src/listener-protocol.ts +12 -12
- package/src/model-order.test.ts +11 -11
- package/src/model-order.ts +52 -30
- package/src/output-fields.ts +11 -11
- package/src/path-refs.test.ts +4 -4
- package/src/path-refs.ts +6 -6
- package/src/prompt-complexity.test.ts +160 -0
- package/src/prompt-complexity.ts +271 -0
- package/src/publish-drafts.ts +8 -8
- package/src/quick-model.test.ts +11 -11
- package/src/quick-model.ts +15 -15
- package/src/routes.test.ts +11 -5
- package/src/routes.ts +19 -19
- package/src/runtime-state.test.ts +1 -1
- package/src/runtime-state.ts +22 -22
- package/src/schemas.test.ts +8 -8
- package/src/schemas.ts +1238 -921
- package/src/search-globs.test.ts +2 -2
- package/src/search-globs.ts +6 -6
- package/src/session-names.ts +5 -5
- package/src/share-paths.test.ts +1 -1
- package/src/share-paths.ts +7 -7
- package/src/sse.ts +1 -1
- package/src/state-portability.ts +8 -8
- package/src/terminal-protocol.ts +3 -3
- package/src/title.test.ts +9 -9
- package/src/title.ts +21 -21
- package/src/tunnel-ids.test.ts +3 -3
- package/src/tunnel-ids.ts +7 -7
- package/src/versions.test.ts +3 -3
- package/src/versions.ts +6 -6
- package/src/workflow-faults.test.ts +6 -6
- package/src/workflow-faults.ts +14 -14
- package/src/workspace-state.test.ts +32 -32
- 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
|
|
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
|
|
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
|
|
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"
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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"
|
|
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
|
|
10
|
-
* connector's required token, an ssh key
|
|
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
|
|
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
|
|
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
|
|
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);
|