@intentic/sandbox-contract 1.231.0 → 1.232.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 +6 -0
- package/dist/contracts/agent.contract.d.ts +11 -0
- package/dist/contracts/agent.contract.d.ts.map +1 -1
- package/dist/contracts/agent.contract.js +10 -1
- package/dist/contracts/agent.contract.js.map +1 -1
- package/dist/contracts/host.contract.d.ts +4 -0
- package/dist/contracts/host.contract.d.ts.map +1 -1
- package/dist/contracts/runner.contract.d.ts +106 -41
- package/dist/contracts/runner.contract.d.ts.map +1 -1
- package/dist/contracts/runner.contract.js +6 -1
- package/dist/contracts/runner.contract.js.map +1 -1
- package/dist/contracts/system.contract.d.ts +4 -0
- package/dist/contracts/system.contract.d.ts.map +1 -1
- package/dist/definition.d.ts +961 -0
- package/dist/definition.d.ts.map +1 -0
- package/dist/definition.js +71 -0
- package/dist/definition.js.map +1 -0
- package/dist/events.d.ts +8 -0
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +5 -0
- package/dist/events.js.map +1 -1
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/schemas.d.ts +132 -23
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +50 -14
- package/dist/schemas.js.map +1 -1
- package/dist/workspace-state.d.ts +9 -0
- package/dist/workspace-state.d.ts.map +1 -1
- package/dist/workspace-state.js +2 -0
- package/dist/workspace-state.js.map +1 -1
- package/package.json +6 -6
- package/src/contracts/agent.contract.ts +19 -0
- package/src/contracts/runner.contract.ts +17 -1
- package/src/definition.ts +171 -0
- package/src/events.ts +44 -0
- package/src/index.ts +1 -0
- package/src/schemas.ts +119 -28
- package/src/workspace-state.test.ts +4 -0
- package/src/workspace-state.ts +19 -0
|
@@ -57,11 +57,20 @@ declare const STATE_FILES: readonly [{
|
|
|
57
57
|
readonly invalidates: readonly ["settings", "manifests"];
|
|
58
58
|
readonly portability: "carry";
|
|
59
59
|
readonly versioned: true;
|
|
60
|
+
}, {
|
|
61
|
+
readonly path: ".intentic/config/heavy-commands.json";
|
|
62
|
+
readonly invalidates: readonly ["settings"];
|
|
63
|
+
readonly portability: "carry";
|
|
64
|
+
readonly versioned: true;
|
|
60
65
|
}, {
|
|
61
66
|
readonly path: ".intentic/local/rule-firings.json";
|
|
62
67
|
readonly invalidates: readonly ["rule-firings"];
|
|
63
68
|
readonly portability: "derived";
|
|
64
69
|
readonly note: "Stamps of when each rule last did something; the new sandbox starts its own record.";
|
|
70
|
+
}, {
|
|
71
|
+
readonly path: ".intentic/records/runtime-installs.json";
|
|
72
|
+
readonly invalidates: readonly ["environment"];
|
|
73
|
+
readonly portability: "carry";
|
|
65
74
|
}, {
|
|
66
75
|
readonly path: ".intentic/config/drafts/";
|
|
67
76
|
readonly invalidates: readonly ["drafts"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-state.d.ts","sourceRoot":"","sources":["../src/workspace-state.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AA0CxD,MAAM,WAAW,kBAAmB,SAAQ,SAAS;IAKjD,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IAExC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAgCtB,QAAQ,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC;IAY1B,QAAQ,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC;IAoBzB,QAAQ,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC;IAKxB,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACnC;AAOD,QAAA,MAAM,WAAW;mBA4BH,oCAAoC;;0BAE7B,OAAO;;;mBAShB,6CAA6C;;0BAA8C,OAAO;;;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MlH,CAAC;AAOF,eAAO,MAAM,kBAAkB,gBAAiB,SAAS,gBAAgB,EAAE,KAAG,SAAS,MAAM,EAE5F,CAAC"}
|
package/dist/workspace-state.js
CHANGED
|
@@ -25,12 +25,14 @@ const STATE_FILES = [
|
|
|
25
25
|
note: "The target composes its own overlay on first boot; rebuild it there to install the tools it names.",
|
|
26
26
|
},
|
|
27
27
|
{ path: ".intentic/config/settings.json", invalidates: ["settings", "manifests"], portability: "carry", versioned: true },
|
|
28
|
+
{ path: ".intentic/config/heavy-commands.json", invalidates: ["settings"], portability: "carry", versioned: true },
|
|
28
29
|
{
|
|
29
30
|
path: ".intentic/local/rule-firings.json",
|
|
30
31
|
invalidates: ["rule-firings"],
|
|
31
32
|
portability: "derived",
|
|
32
33
|
note: "Stamps of when each rule last did something; the new sandbox starts its own record.",
|
|
33
34
|
},
|
|
35
|
+
{ path: ".intentic/records/runtime-installs.json", invalidates: ["environment"], portability: "carry" },
|
|
34
36
|
{ path: ".intentic/config/drafts/", invalidates: ["drafts"], portability: "carry", versioned: true, authored: true },
|
|
35
37
|
{
|
|
36
38
|
path: ".intentic/config/automations.json",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-state.js","sourceRoot":"","sources":["../src/workspace-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAgIhD,MAAM,WAAW,GAAG;IA2BhB;QACI,IAAI,EAAE,oCAAoC;QAC1C,WAAW,EAAE,CAAC,cAAc,EAAE,aAAa,EAAE,QAAQ,EAAE,WAAW,CAAC;QACnE,WAAW,EAAE,OAAO;QACpB,SAAS,EAAE,IAAI;KAClB;IAOD,EAAE,IAAI,EAAE,6CAA6C,EAAE,WAAW,EAAE,CAAC,cAAc,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE;IAO7H,EAAE,IAAI,EAAE,oCAAoC,EAAE,WAAW,EAAE,CAAC,SAAS,C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WAAwC,EAAqB,EAAE,CAAC;IACrH,GAAG,IAAI,GAAG,CACN,CAAC,GAAG,qBAAqB,EAAE,GAAG,WAAW,CAAC;SACrC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;SACjG,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAC3C;CACJ,CAAC;AAOF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,WAAwC,EAAqB,EAAE,CAAC;IAC/F,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,qBAAqB,EAAE,GAAG,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;CAC7F,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentic/sandbox-contract",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.232.0",
|
|
4
4
|
"description": "oRPC wire contract for the intentic sandbox daemon, shared by the daemon and its browser client",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -89,16 +89,16 @@
|
|
|
89
89
|
"@orpc/contract": "1.14.13",
|
|
90
90
|
"tslib": "2.8.1",
|
|
91
91
|
"zod": "4.4.3",
|
|
92
|
-
"@intentic/
|
|
93
|
-
"@intentic/
|
|
94
|
-
"@intentic/
|
|
92
|
+
"@intentic/registry": "1.232.0",
|
|
93
|
+
"@intentic/constants": "1.232.0",
|
|
94
|
+
"@intentic/extension-manifest": "1.232.0"
|
|
95
95
|
},
|
|
96
96
|
"devDependencies": {
|
|
97
97
|
"@types/node": "24.13.2",
|
|
98
98
|
"@typescript/native-preview": "7.0.0-dev.20260707.2",
|
|
99
99
|
"vitest": "4.1.10",
|
|
100
|
-
"@intentic/
|
|
101
|
-
"@intentic/
|
|
100
|
+
"@intentic/testing": "0.0.0",
|
|
101
|
+
"@intentic/tsconfig": "0.0.0"
|
|
102
102
|
},
|
|
103
103
|
"scripts": {
|
|
104
104
|
"build": "tsgo",
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
AttachTurnSchema,
|
|
7
7
|
OkSchema,
|
|
8
8
|
ProviderRefusalsSchema,
|
|
9
|
+
ResumeTurnSchema,
|
|
9
10
|
RewindResultSchema,
|
|
10
11
|
RewindTurnSchema,
|
|
11
12
|
StartedTurnSchema,
|
|
@@ -68,6 +69,24 @@ export const agentContract = {
|
|
|
68
69
|
})
|
|
69
70
|
.input(StopTurnSchema)
|
|
70
71
|
.output(OkSchema),
|
|
72
|
+
/* Run the conversation's HELD turn again: the one a spent allowance refused, which the daemon kept whole.
|
|
73
|
+
* NOT_FOUND when it holds none (nothing was stranded, another turn has since superseded it, or the daemon
|
|
74
|
+
* restarted), which is what tells a client to fall back to saying something itself.
|
|
75
|
+
*
|
|
76
|
+
* Separate from `run` because it is a different act. `run` says something new; this repeats something already
|
|
77
|
+
* said, and the difference has to survive onto the wire or it cannot survive into the transcript: a repeat
|
|
78
|
+
* sent as a new turn is a new user message, and four presses against one spent allowance then read back, to
|
|
79
|
+
* the model as much as to the reader, as four things the user said and nobody answered. */
|
|
80
|
+
resume: oc
|
|
81
|
+
.route({
|
|
82
|
+
method: "POST",
|
|
83
|
+
path: "/agent/resume",
|
|
84
|
+
summary: "Run a refused turn again",
|
|
85
|
+
description:
|
|
86
|
+
"Sends the same turn again when the model provider's allowance refused it, with everything it originally carried. It repeats the request rather than adding a new message to the conversation, so pressing it twice costs nothing and the agent is never told to continue work it has not started.",
|
|
87
|
+
})
|
|
88
|
+
.input(ResumeTurnSchema)
|
|
89
|
+
.output(StartedTurnSchema),
|
|
71
90
|
// Go back to a message: restore the workspace to that turn's checkpoint, drop the messages after it, and
|
|
72
91
|
// forget the provider session. CONFLICT while a turn is running, a restore cannot overwrite files an
|
|
73
92
|
// agent is editing. NOT_FOUND when that message has no checkpoint to go back to.
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { eventIterator, oc } from "@orpc/contract";
|
|
2
|
+
import { z } from "zod";
|
|
2
3
|
import { AgentEventSchema } from "../events.js";
|
|
3
4
|
import { RunnerFactsSchema, RunnerSyncLineSchema, RunnerSyncSchema, RunnerTurnSchema } from "../runner-protocol.js";
|
|
4
|
-
import { OkSchema } from "../schemas.js";
|
|
5
|
+
import { AgentReplySchema, EditorContextSchema, OkSchema } from "../schemas.js";
|
|
5
6
|
|
|
6
7
|
/* What a RUNNER can be asked, over the socket it opened to its parent sandbox. Phase-1 skeleton: the shape is
|
|
7
8
|
* decided (docs/remote-runners-plan.md §5, workspace root), the implementations land with runner mode.
|
|
@@ -26,6 +27,21 @@ export const runnerContract = {
|
|
|
26
27
|
// The dispatch: one turn in, the frames a local turn would have produced out. The parent republishes them
|
|
27
28
|
// into the same pipeline local frames enter, which is the whole "feels local" mechanism.
|
|
28
29
|
runTurn: oc.input(RunnerTurnSchema).output(eventIterator(AgentEventSchema)),
|
|
30
|
+
/* THE USER, REACHING THE TURN THEY ARE WATCHING. A remote turn's question, permission prompt and plan
|
|
31
|
+
* approval are minted in the RUNNER's request registry, and the answer arrives at the PARENT (that is
|
|
32
|
+
* where the browser is). So it travels back down the same socket and is applied there by the same code a
|
|
33
|
+
* local answer takes (agent/turn-interactions.ts).
|
|
34
|
+
*
|
|
35
|
+
* `applied` rather than a throw: "nothing holds that id any more" is an ordinary race (the card was
|
|
36
|
+
* answered in another window, or the turn ended while the user was reading), and the parent turns it
|
|
37
|
+
* into the same NOT_FOUND its local path gives. */
|
|
38
|
+
reply: oc.input(AgentReplySchema).output(z.object({ applied: z.boolean() })),
|
|
39
|
+
/* Speaking into a running remote turn. The parent sends the user's words, the attachment paths and the
|
|
40
|
+
* editor context UNCOMPOSED: the note over those paths has to be built against the runner's own
|
|
41
|
+
* workspace root, since that is the machine whose files the agent will open. */
|
|
42
|
+
steer: oc
|
|
43
|
+
.input(z.object({ conversationId: z.string().min(1), text: z.string(), attachments: z.array(z.string()).optional(), editorContext: EditorContextSchema.optional() }))
|
|
44
|
+
.output(z.object({ applied: z.boolean(), invalid: z.string().optional() })),
|
|
29
45
|
// Stop the running turn; the parent's stop button reaching through.
|
|
30
46
|
interrupt: oc.input(RunnerTurnSchema.pick({ conversationId: true })).output(OkSchema),
|
|
31
47
|
// Liveness, driven by the parent: keepalive and gone-detection in one, the host hub's heartbeat verbatim.
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { CapabilitySchema, SandboxSettingsSchema } from "./schemas.js";
|
|
3
|
+
|
|
4
|
+
/* THE SANDBOX DEFINITION: the declarable SHAPE of a sandbox, split off from its state.
|
|
5
|
+
*
|
|
6
|
+
* A bundle (portability section of schemas.ts) moves everything a sandbox holds; this is the half of it that
|
|
7
|
+
* is a REFERENCE to a source of truth rather than bytes only this sandbox has: which repos (as remotes a
|
|
8
|
+
* target can clone), which connections (as shapes a target re-authenticates), which overlay steps (as source
|
|
9
|
+
* a target's owner approves), which secrets (as NAMES a target asks for), which agent settings. Everything
|
|
10
|
+
* here can be reproduced against the world; everything a bundle carries beyond it (transcripts, checkpoint
|
|
11
|
+
* timelines, unpushed branches, ledgers) cannot, which is the line between the two formats.
|
|
12
|
+
*
|
|
13
|
+
* ON THE WIRE AND ON DISK IT IS TOML (`sandbox.toml`), hand-writable and diffable; these schemas are what the
|
|
14
|
+
* parsed document must satisfy. The choice of a definition never relaxes the consent model: applying one
|
|
15
|
+
* writes the overlay as a PROPOSAL for the owner's approval gate, lands capabilities unauthenticated, and
|
|
16
|
+
* never carries a credential value, so a definition is safe to publish in a way a bundle never is.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
// One repository, by reference: the id it lands under in the workspace, where a target clones it from, and
|
|
20
|
+
// (optionally) the branch to check out. A repo with NO remote cannot appear here, the exporter reports it as
|
|
21
|
+
// omitted instead of inventing a source for bytes only the source sandbox holds.
|
|
22
|
+
export const DefinitionRepositorySchema = z.object({
|
|
23
|
+
// Workspace-relative repo id ("intentic", "clients/foo"), the same id the wire {repo} routes use.
|
|
24
|
+
id: z.string().min(1),
|
|
25
|
+
// The clone URL, verbatim from the source repo's own remote.
|
|
26
|
+
remote: z.string().min(1),
|
|
27
|
+
// The branch to check out; absent means the remote's default.
|
|
28
|
+
ref: z.string().optional(),
|
|
29
|
+
});
|
|
30
|
+
export type DefinitionRepository = z.infer<typeof DefinitionRepositorySchema>;
|
|
31
|
+
|
|
32
|
+
export const DefinitionEnvironmentSchema = z.object({
|
|
33
|
+
// The image the overlay extends, informational: the target composes against ITS OWN base (see
|
|
34
|
+
// composeEnvironment's baseImageOf), this records what the source was on.
|
|
35
|
+
baseImage: z.string().optional(),
|
|
36
|
+
/* The owner-approved CUSTOM overlay section, as source. Deliberately not the composed file and
|
|
37
|
+
* deliberately without the approval hash: consent does not travel, so an applied definition parks this at
|
|
38
|
+
* the target owner's approval gate rather than executing it. */
|
|
39
|
+
dockerfile: z.string().optional(),
|
|
40
|
+
});
|
|
41
|
+
export type DefinitionEnvironment = z.infer<typeof DefinitionEnvironmentSchema>;
|
|
42
|
+
|
|
43
|
+
/* The settings section: every SandboxSettings field, optional, WITHOUT its default. `.partial()` alone keeps
|
|
44
|
+
* each field's `.default()`, so a document naming two flags would parse into the whole surface at today's
|
|
45
|
+
* defaults — the opposite of "state only decisions", and it would freeze those defaults into every future
|
|
46
|
+
* apply. Unwrapping first is what makes an absent key STAY absent, so applying merges over the target's own
|
|
47
|
+
* settings and a definition round-trips through parse byte-identically. */
|
|
48
|
+
// Both wrapper classes, in a loop: a field can be a default inside a prefault, and either one left on would
|
|
49
|
+
// re-materialize its value for an absent key.
|
|
50
|
+
const bareField = (field: z.ZodType): z.ZodType => {
|
|
51
|
+
let inner = field;
|
|
52
|
+
while (inner instanceof z.ZodDefault || inner instanceof z.ZodPrefault) {
|
|
53
|
+
inner = inner.unwrap() as z.ZodType;
|
|
54
|
+
}
|
|
55
|
+
return inner;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const definitionSettings = (): z.ZodType<Partial<z.infer<typeof SandboxSettingsSchema>>> => {
|
|
59
|
+
const shape = Object.fromEntries(Object.entries(SandboxSettingsSchema.shape).map(([key, field]) => [key, bareField(field).optional()]));
|
|
60
|
+
return z.object(shape).prefault({}) as unknown as z.ZodType<Partial<z.infer<typeof SandboxSettingsSchema>>>;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export const SandboxDefinitionSchema = z.object({
|
|
64
|
+
// Bumped when the layout changes in a way an older daemon would misread. Refused rather than guessed at,
|
|
65
|
+
// the bundle manifest's own rule.
|
|
66
|
+
schemaVersion: z.literal(1),
|
|
67
|
+
// What the source sandbox was called, for the reader; never used to authorize anything.
|
|
68
|
+
name: z.string().optional(),
|
|
69
|
+
environment: DefinitionEnvironmentSchema.prefault({}),
|
|
70
|
+
repositories: z.array(DefinitionRepositorySchema).prefault([]),
|
|
71
|
+
/* Each connection IN FULL (id, kind, config), not merely named: the manifest they come from carries the
|
|
72
|
+
* SHAPE of a connection and never its credential (workspace-state.ts argues the split on the
|
|
73
|
+
* capabilities.json entry, and the exporter sweeps before reading), so what lands on a target is the card,
|
|
74
|
+
* visibly unauthenticated, waiting for one credential apiece. */
|
|
75
|
+
capabilities: z.array(CapabilitySchema).prefault([]),
|
|
76
|
+
// Secret NAMES only, what the target should ask its owner for. Values never enter a definition.
|
|
77
|
+
secrets: z.array(z.string()).prefault([]),
|
|
78
|
+
// The agent settings that differ from their defaults. Partial on purpose: a definition states decisions,
|
|
79
|
+
// not the whole flag surface, so a flag it does not mention keeps the target's own default.
|
|
80
|
+
settings: definitionSettings(),
|
|
81
|
+
});
|
|
82
|
+
export type SandboxDefinition = z.infer<typeof SandboxDefinitionSchema>;
|
|
83
|
+
|
|
84
|
+
// One "do this by hand" line, the same honesty unit ImportReportSchema carries: a subject the UI bolds and a
|
|
85
|
+
// detail written as an instruction to the owner.
|
|
86
|
+
export const DefinitionActionSchema = z.object({ subject: z.string(), detail: z.string() });
|
|
87
|
+
export type DefinitionAction = z.infer<typeof DefinitionActionSchema>;
|
|
88
|
+
|
|
89
|
+
// What GET /definition answers: the emitted TOML, plus what the derivation could not express (a repo with no
|
|
90
|
+
// remote), listed rather than silent, the export's own `excluded` discipline.
|
|
91
|
+
export const DefinitionExportSchema = z.object({
|
|
92
|
+
toml: z.string(),
|
|
93
|
+
omitted: z.array(DefinitionActionSchema),
|
|
94
|
+
});
|
|
95
|
+
export type DefinitionExport = z.infer<typeof DefinitionExportSchema>;
|
|
96
|
+
|
|
97
|
+
// One appliable piece of a held definition, the checklist row the owner ticks. Mirrors MigrationItemSchema's
|
|
98
|
+
// role; the ids are deterministic ("repo:intentic", "capability:github") so the re-derived apply names the
|
|
99
|
+
// same items the owner reviewed.
|
|
100
|
+
export const DefinitionItemSchema = z.object({
|
|
101
|
+
id: z.string(),
|
|
102
|
+
kind: z.enum(["repo", "capability", "environment", "settings"]),
|
|
103
|
+
label: z.string(),
|
|
104
|
+
detail: z.string().optional(),
|
|
105
|
+
/* False when the target already holds this piece (the repo's directory exists, a capability with that id
|
|
106
|
+
* exists): a definition lands BESIDE what is there, never over it, so an inapplicable item renders greyed
|
|
107
|
+
* with its reason rather than disappearing. */
|
|
108
|
+
applicable: z.boolean(),
|
|
109
|
+
reason: z.string().optional(),
|
|
110
|
+
});
|
|
111
|
+
export type DefinitionItem = z.infer<typeof DefinitionItemSchema>;
|
|
112
|
+
|
|
113
|
+
export const DefinitionPlanSchema = z.object({
|
|
114
|
+
// Names the held definition for the apply call. Minted per plan; a new plan replaces the held one.
|
|
115
|
+
token: z.string(),
|
|
116
|
+
name: z.string().optional(),
|
|
117
|
+
items: z.array(DefinitionItemSchema),
|
|
118
|
+
// What is already known not to move mechanically (credentials to enter, an overlay to approve), surfaced
|
|
119
|
+
// at PREVIEW time so the owner ticks with open eyes, the migration surface's rule.
|
|
120
|
+
needsAction: z.array(DefinitionActionSchema),
|
|
121
|
+
});
|
|
122
|
+
export type DefinitionPlan = z.infer<typeof DefinitionPlanSchema>;
|
|
123
|
+
|
|
124
|
+
export const DefinitionApplySchema = z.object({
|
|
125
|
+
token: z.string(),
|
|
126
|
+
// The ticked item ids. Ids the re-derived plan does not contain are ignored rather than erroring.
|
|
127
|
+
items: z.array(z.string()),
|
|
128
|
+
});
|
|
129
|
+
export type DefinitionApply = z.infer<typeof DefinitionApplySchema>;
|
|
130
|
+
|
|
131
|
+
export const DefinitionReportSchema = z.object({
|
|
132
|
+
applied: z.array(z.object({ id: z.string(), label: z.string() })),
|
|
133
|
+
// Ticked and did not land, each with the reason (a clone that failed, a full disk). Distinct from
|
|
134
|
+
// inapplicable items, which were never attempted.
|
|
135
|
+
failed: z.array(z.object({ id: z.string(), label: z.string(), error: z.string() })),
|
|
136
|
+
needsAction: z.array(DefinitionActionSchema),
|
|
137
|
+
});
|
|
138
|
+
export type DefinitionReport = z.infer<typeof DefinitionReportSchema>;
|
|
139
|
+
|
|
140
|
+
// Where this sandbox stands relative to a definition: one line per difference, empty when they agree. The
|
|
141
|
+
// drift answer, computable because the emitter is deterministic.
|
|
142
|
+
export const DefinitionDiffSchema = z.object({
|
|
143
|
+
differences: z.array(DefinitionActionSchema),
|
|
144
|
+
});
|
|
145
|
+
export type DefinitionDiff = z.infer<typeof DefinitionDiffSchema>;
|
|
146
|
+
|
|
147
|
+
/* ---- the bundle manifest, restated on the definition ----
|
|
148
|
+
*
|
|
149
|
+
* A bundle is DEFINITION + STATE: its manifest embeds the same definition `GET /definition` emits, and the
|
|
150
|
+
* tar entries behind it carry what no definition can reference (git dirs, transcripts, ledgers). One schema,
|
|
151
|
+
* two doors, which is what keeps the two formats from drifting into different answers about what an
|
|
152
|
+
* environment IS. Version 2 replaced the ad-hoc `environment` facts block with the definition; a v1 bundle is
|
|
153
|
+
* refused by version rather than guessed at, like any other manifest this daemon cannot read.
|
|
154
|
+
*/
|
|
155
|
+
export const BundleManifestSchema = z.object({
|
|
156
|
+
// Bumped when the layout changes in a way an older daemon would misread. Refused rather than guessed at.
|
|
157
|
+
version: z.literal(2),
|
|
158
|
+
// Where it came from, for the report's first line. Never used to authorize anything.
|
|
159
|
+
sandbox: z.object({ name: z.string() }).optional(),
|
|
160
|
+
createdAt: z.number(),
|
|
161
|
+
// The owner's export-time choice; the restorer re-derives every decision from the manifests rather than
|
|
162
|
+
// trusting this, and uses it only to explain what is missing.
|
|
163
|
+
secrets: z.boolean(),
|
|
164
|
+
// The declarable shape, exactly what a definition export emits, so the restore report reasons over the
|
|
165
|
+
// same facts either door delivers.
|
|
166
|
+
definition: SandboxDefinitionSchema,
|
|
167
|
+
// Every path class the bundle deliberately left out, with the manifest's own note where it has one. This is
|
|
168
|
+
// what turns "the export skipped things" from a silence into a list the owner can act on.
|
|
169
|
+
excluded: z.array(z.object({ path: z.string(), portability: z.string(), note: z.string().optional() })),
|
|
170
|
+
});
|
|
171
|
+
export type BundleManifest = z.infer<typeof BundleManifestSchema>;
|
package/src/events.ts
CHANGED
|
@@ -971,6 +971,25 @@ export const AgentEventSchema = z.discriminatedUnion("kind", [
|
|
|
971
971
|
// Absent means there is nothing automatic to resume: a spent usage limit never has one,
|
|
972
972
|
// and a refused credential has none once re-minting it has already been tried and failed.
|
|
973
973
|
autoResume: z.enum(["scheduled", "available"]).optional(),
|
|
974
|
+
/* THE DAEMON IS STILL HOLDING THIS EXACT TURN, so the way on is to RE-RUN it rather than to send
|
|
975
|
+
* something after it. rate_limit only, and the counterpart to `autoResume` rather than a member of it:
|
|
976
|
+
* that field answers "is a machine bringing this back", and a spent allowance is the one failure where
|
|
977
|
+
* the answer is deliberately no (the allowance is the user's own budget to spend, turn-resume.ts). This
|
|
978
|
+
* answers the question that was never asked, "and if the user says go, what happens", which had exactly
|
|
979
|
+
* one possible answer for as long as it went unasked: a new user message reading "Continue".
|
|
980
|
+
*
|
|
981
|
+
* That answer was wrong in a way the chat could not show. The press is not a new instruction, it is the
|
|
982
|
+
* same one again, and appending it said otherwise to the only reader that matters: the provider session
|
|
983
|
+
* grew one "Continue" per press, each with a synthetic "No response requested." above it, so a chat that
|
|
984
|
+
* bounced four times handed the model four turns in which it appeared to have declined to answer. With
|
|
985
|
+
* this field the press re-runs the held turn instead, which is idempotent by construction (a second press
|
|
986
|
+
* finds a live turn and supersedes nothing) and leaves the transcript one row for one press.
|
|
987
|
+
*
|
|
988
|
+
* `ran` is whether the held turn got anywhere before it was refused, and it changes both what the model
|
|
989
|
+
* is told (RESUME_NOTES.limit vs .refused, and telling a model to carry on from work that never happened
|
|
990
|
+
* is how it comes to invent some) and what the strip can honestly say. A spent allowance refuses the
|
|
991
|
+
* FIRST request most of the time, so false is the common case, not the corner. */
|
|
992
|
+
held: z.object({ ran: z.boolean() }).optional(),
|
|
974
993
|
/* provider-outage only: the shape of the wait. `retryAt` (epoch seconds) is when the next attempt is
|
|
975
994
|
* due, not a fixed cadence, because an outage has no reset instant to aim at and hammering a provider
|
|
976
995
|
* that is down only spends tokens on refusals, so each attempt waits longer than the last
|
|
@@ -1035,6 +1054,23 @@ export const RESUME_NOTES = {
|
|
|
1035
1054
|
auth: `The Claude credential that interrupted this conversation has been renewed, and this turn resumed automatically. ${REPEATED}`,
|
|
1036
1055
|
outage: `The model provider was briefly unavailable and interrupted this conversation; this turn resumed automatically. ${REPEATED}`,
|
|
1037
1056
|
restart: `The sandbox restarted while this turn was running, which stopped it, and this turn resumed automatically once it came back. ${REPEATED}`,
|
|
1057
|
+
/* A SPENT ALLOWANCE STRANDS A TURN IN TWO SHAPES, and they must not share a note.
|
|
1058
|
+
*
|
|
1059
|
+
* `limit` is the mid-turn one and reads like its three neighbours above: the session holds real work, and
|
|
1060
|
+
* carrying on from it is exactly right.
|
|
1061
|
+
*
|
|
1062
|
+
* `refused` is the turn the provider turned away at the door, before the model read one word of it, and it
|
|
1063
|
+
* is the COMMONER of the two, because an allowance that is already spent refuses the first request it is
|
|
1064
|
+
* asked. REPEATED is actively wrong for it: "part of it was already completed in this session, continue from
|
|
1065
|
+
* that point instead of starting over" is an instruction to continue from work that does not exist, and a
|
|
1066
|
+
* model handed that instruction answers it by inventing the work. So it says the opposite, plainly.
|
|
1067
|
+
*
|
|
1068
|
+
* Both are unlike their neighbours in one way worth stating: nothing resumed automatically. A spent
|
|
1069
|
+
* allowance is the user's own budget and stays their call to spend (turn-resume.ts), so what re-ran this
|
|
1070
|
+
* turn was a person pressing Continue. */
|
|
1071
|
+
limit: `The model provider's usage allowance ran out while this turn was running, which stopped it, and it has been sent again. ${REPEATED}`,
|
|
1072
|
+
refused:
|
|
1073
|
+
"The model provider refused the previous attempt at this request outright, because its usage allowance was spent: no part of the request below was read or acted on, and nothing has been done towards it. It has been sent again, and starts from the beginning.",
|
|
1038
1074
|
// A turn that was PARKED on the user when the daemon died: nothing re-runs at boot, the card is restored
|
|
1039
1075
|
// instead, and this is the turn their answer starts (turn-resume.ts). What rides below the note is the
|
|
1040
1076
|
// answer itself, so the model picks the session back up at exactly the decision it had handed over.
|
|
@@ -1080,6 +1116,14 @@ const RESUME_DISCLOSURES: Record<ResumeReason, ResumeDisclosure> = {
|
|
|
1080
1116
|
auth: { kind: "notice", text: "Claude sign-in renewed, this turn picked up where it left off." },
|
|
1081
1117
|
outage: { kind: "notice", text: "The model provider came back, this turn picked up where it left off." },
|
|
1082
1118
|
restart: { kind: "notice", text: "The sandbox came back, this turn picked up where it left off." },
|
|
1119
|
+
/* THE ONE PAIR NOBODY AUTOMATED, said in the passive voice the other three earn honestly and these two do
|
|
1120
|
+
* not: a person pressed Continue. Which is the whole reason these rows exist at all. A press used to append
|
|
1121
|
+
* the word "Continue" as a message of its own, so a chat that bounced off a spent allowance four times read
|
|
1122
|
+
* back as the user saying "Continue" four times to an agent that had answered none of them, and the provider
|
|
1123
|
+
* session the model actually reads accumulated all four (plus a synthetic "No response requested." per
|
|
1124
|
+
* press). One row for one press was never the problem; a row that claims the user said something new is. */
|
|
1125
|
+
limit: { kind: "notice", text: "Sent again after the allowance ran out mid-turn, picking up where it left off." },
|
|
1126
|
+
refused: { kind: "notice", text: "Sent again after the allowance refused it: nothing had run." },
|
|
1083
1127
|
answered: { kind: "note", note: { title: "Picked back up after a sandbox restart", text: RESUME_NOTES.answered } },
|
|
1084
1128
|
};
|
|
1085
1129
|
|
package/src/index.ts
CHANGED
|
@@ -119,6 +119,7 @@ export * from "./quick-model.js";
|
|
|
119
119
|
export * from "./output-fields.js";
|
|
120
120
|
export * from "./publish-drafts.js";
|
|
121
121
|
export * from "./schemas.js";
|
|
122
|
+
export * from "./definition.js";
|
|
122
123
|
export * from "./search-globs.js";
|
|
123
124
|
export * from "./starter.js";
|
|
124
125
|
export * from "./terminal-protocol.js";
|