@intentic/sandbox-contract 1.214.0 → 1.216.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/dist/capability-secrets.d.ts +3 -0
- package/dist/capability-secrets.d.ts.map +1 -0
- package/dist/capability-secrets.js +3 -0
- package/dist/capability-secrets.js.map +1 -0
- package/dist/contracts/agent.contract.d.ts +10 -0
- package/dist/contracts/agent.contract.d.ts.map +1 -1
- package/dist/contracts/capabilities.contract.d.ts +1 -0
- package/dist/contracts/capabilities.contract.d.ts.map +1 -1
- package/dist/contracts/capabilities.contract.js.map +1 -1
- package/dist/contracts/git.contract.d.ts +21 -0
- package/dist/contracts/git.contract.d.ts.map +1 -1
- package/dist/contracts/git.contract.js +3 -1
- package/dist/contracts/git.contract.js.map +1 -1
- package/dist/contracts/host.contract.d.ts +1 -0
- package/dist/contracts/host.contract.d.ts.map +1 -1
- package/dist/contracts/settings.contract.d.ts +2 -85
- package/dist/contracts/settings.contract.d.ts.map +1 -1
- package/dist/contracts/system.contract.d.ts +6 -0
- package/dist/contracts/system.contract.d.ts.map +1 -1
- package/dist/events.d.ts +10 -0
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +1 -0
- package/dist/events.js.map +1 -1
- package/dist/index.d.ts +41 -85
- 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 +50 -114
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +23 -10
- package/dist/schemas.js.map +1 -1
- package/dist/workspace-state.d.ts +1 -0
- package/dist/workspace-state.d.ts.map +1 -1
- package/dist/workspace-state.js +10 -1
- package/dist/workspace-state.js.map +1 -1
- package/package.json +4 -4
- package/src/capability-secrets.ts +20 -0
- package/src/contracts/capabilities.contract.ts +12 -5
- package/src/contracts/git.contract.ts +10 -0
- package/src/events.ts +23 -0
- package/src/index.ts +1 -0
- package/src/schemas.ts +159 -117
- package/src/workspace-state.test.ts +40 -0
- package/src/workspace-state.ts +29 -1
|
@@ -278,6 +278,7 @@ export declare const RETIRED_WORKSPACE_STATE_DIRS: {
|
|
|
278
278
|
readonly artifacts: readonly ["attachments", "acceptance", "loops", "workflow-runs", "transcripts"];
|
|
279
279
|
};
|
|
280
280
|
export declare const isLockedWorkspacePath: (relPath: string) => boolean;
|
|
281
|
+
export declare const isReviewableLockedPath: (relPath: string) => boolean;
|
|
281
282
|
export type WorkspaceStatePath = (typeof STATE_FILES)[number]["path"];
|
|
282
283
|
export declare const staleQueryKeys: (paths: readonly string[], contributed: readonly FileContribution[]) => readonly string[];
|
|
283
284
|
export declare const fileBoundQueryKeys: (contributed: readonly FileContribution[]) => readonly string[];
|
|
@@ -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;IAKzB,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACnC;AAOD,QAAA,MAAM,WAAW;
|
|
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;I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_DIR } from "@intentic/constants";
|
|
2
2
|
const STATE_FILES = [
|
|
3
|
-
{
|
|
3
|
+
{
|
|
4
|
+
path: ".intentic/capabilities.json",
|
|
5
|
+
invalidates: ["capabilities", "environment", "panels", "manifests"],
|
|
6
|
+
portability: "carry",
|
|
7
|
+
versioned: true,
|
|
8
|
+
},
|
|
4
9
|
{ path: ".intentic/capability-dismissals.json", invalidates: ["capabilities"], portability: "carry", versioned: true },
|
|
5
10
|
{ path: ".intentic/secret-uses.json", invalidates: ["secrets"], portability: "carry" },
|
|
6
11
|
{ path: ".intentic/personas.json", invalidates: ["personas", "capabilities", "manifests"], portability: "carry", versioned: true },
|
|
@@ -248,6 +253,10 @@ export const isLockedWorkspacePath = (relPath) => {
|
|
|
248
253
|
}
|
|
249
254
|
return segments.length >= 2 && segments[0] === STATE_DIR && LOCKED_STATE_ENTRIES.has(segments[1] ?? "");
|
|
250
255
|
};
|
|
256
|
+
export const isReviewableLockedPath = (relPath) => {
|
|
257
|
+
const rel = relPath.replaceAll("\\", "/").replace(/^\.\//, "");
|
|
258
|
+
return isLockedWorkspacePath(rel) && VERSIONED_STATE_PATHS.some((path) => (path.endsWith("/") ? rel.startsWith(path) : rel === path));
|
|
259
|
+
};
|
|
251
260
|
export const staleQueryKeys = (paths, contributed) => [
|
|
252
261
|
...new Set([...WORKSPACE_STATE_FILES, ...contributed]
|
|
253
262
|
.filter((file) => file.invalidates.length > 0 && paths.some((path) => path.startsWith(file.path)))
|
|
@@ -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;AA4GhD,MAAM,WAAW,GAAG;IA2BhB,
|
|
1
|
+
{"version":3,"file":"workspace-state.js","sourceRoot":"","sources":["../src/workspace-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AA4GhD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C;AAC1I,CAAC,CAAC;AA2BF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAwB,EAAE,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.216.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,9 +89,9 @@
|
|
|
89
89
|
"@orpc/contract": "1.14.13",
|
|
90
90
|
"tslib": "2.8.1",
|
|
91
91
|
"zod": "4.4.3",
|
|
92
|
-
"@intentic/constants": "1.
|
|
93
|
-
"@intentic/
|
|
94
|
-
"@intentic/
|
|
92
|
+
"@intentic/constants": "1.216.0",
|
|
93
|
+
"@intentic/extension-manifest": "1.216.0",
|
|
94
|
+
"@intentic/registry": "1.216.0"
|
|
95
95
|
},
|
|
96
96
|
"devDependencies": {
|
|
97
97
|
"@types/node": "24.13.2",
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/* THE ONE VALUE THAT MEANS "WHATEVER IS ALREADY STORED" — the rule both ends of the capability wire apply.
|
|
2
|
+
*
|
|
3
|
+
* A capability's credentials never reach a browser: the list route echoes the shape of a connection and drops
|
|
4
|
+
* every secret in it, and the manifest on disk holds this marker where each value used to be (the vault keeps
|
|
5
|
+
* the value itself). That is what makes a connection EDITABLE without being re-typed: a form that wants to
|
|
6
|
+
* change a tunnel's routed networks sends this back in place of the pre-shared key it was never shown, and both
|
|
7
|
+
* the write path and the storage layer read it as "leave that one alone".
|
|
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
|
|
11
|
+
* service refusing this string is a clear auth error, where an empty value reads as "not configured yet" and a
|
|
12
|
+
* missing key as a shape change.
|
|
13
|
+
*
|
|
14
|
+
* It lives in the contract rather than in the daemon's store because it is now spoken on the wire. The browser
|
|
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. */
|
|
17
|
+
export const VAULTED = "__intentic_vaulted__";
|
|
18
|
+
|
|
19
|
+
/** Whether a config value is the marker rather than a credential — the check, so the string is typed once. */
|
|
20
|
+
export const isVaulted = (value: unknown): boolean => value === VAULTED;
|
|
@@ -16,11 +16,18 @@ import {
|
|
|
16
16
|
OkSchema,
|
|
17
17
|
} from "../schemas.js";
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
/* The sandbox's unified capability manifest. `list` returns each active capability with its live status, the
|
|
20
|
+
* non-secret echo of its config, and the NAMES of the credentials it holds. `add` upserts a capability and
|
|
21
|
+
* STREAMS its apply (devops scaffolding / service provisioning emit ndjson progress; mcp/integration emit a
|
|
22
|
+
* terminal frame), mirroring the /intentic runner. `remove` tears it down (devops refuses — deleting the repos
|
|
23
|
+
* is data loss). `status` re-probes a single capability for a lazy UI refresh. `marketplace` resolves a Claude
|
|
24
|
+
* Code plugin marketplace repo into installable plugin-capability configs.
|
|
25
|
+
*
|
|
26
|
+
* `add` IS ALSO THE EDIT, because the write is an upsert: the same id with a changed config changes that
|
|
27
|
+
* connection. A caller editing one has never been shown its credentials, so it sends VAULTED
|
|
28
|
+
* (capability-secrets.ts) for each it is leaving alone and the daemon resolves those from what is stored before
|
|
29
|
+
* anything runs — the only way to change one setting on a tunnel without re-typing its key. A marker with
|
|
30
|
+
* nothing behind it is refused rather than written. */
|
|
24
31
|
export const capabilitiesContract = {
|
|
25
32
|
list: oc.route({ method: "GET", path: "/capabilities" }).output(CapabilitiesListSchema),
|
|
26
33
|
add: oc.route({ method: "POST", path: "/capabilities" }).input(CapabilitySchema).output(eventIterator(IntenticLineSchema)),
|
|
@@ -23,8 +23,11 @@ import {
|
|
|
23
23
|
GitLogQuerySchema,
|
|
24
24
|
GitLogSchema,
|
|
25
25
|
GitOperationStateSchema,
|
|
26
|
+
GitPublishFileResultSchema,
|
|
27
|
+
GitPublishFileSchema,
|
|
26
28
|
GitUndoSchema,
|
|
27
29
|
GitUndoStateSchema,
|
|
30
|
+
GitRemoteReposSchema,
|
|
28
31
|
GitRemoteStateSchema,
|
|
29
32
|
GitReposSchema,
|
|
30
33
|
GitResetSchema,
|
|
@@ -53,6 +56,9 @@ export const gitContract = {
|
|
|
53
56
|
// one repo's commit log, and lazy per-commit detail (changed files, then a file's before/after AT the
|
|
54
57
|
// commit). Read-only — commit/discard on the working tree stay the write path (above).
|
|
55
58
|
repos: oc.route({ method: "GET", path: "/git/repos" }).output(GitReposSchema),
|
|
59
|
+
// The same repos with the host + project their remote names — how a caller recognises a workspace repo in a
|
|
60
|
+
// list of `owner/name` strings that came from somewhere else. Kept off `repos` (a `git remote -v` per repo).
|
|
61
|
+
remoteRepos: oc.route({ method: "GET", path: "/git/remote-repos" }).output(GitRemoteReposSchema),
|
|
56
62
|
log: oc.route({ method: "GET", path: "/git/{repo}/log" }).input(GitLogQuerySchema).output(GitLogSchema),
|
|
57
63
|
commitDiff: oc.route({ method: "GET", path: "/git/{repo}/commit-diff" }).input(GitCommitDiffQuerySchema).output(GitCommitDiffSchema),
|
|
58
64
|
commitFileDiff: oc.route({ method: "GET", path: "/git/{repo}/commit-file-diff" }).input(GitCommitFileDiffQuerySchema).output(FileDiffSchema),
|
|
@@ -115,4 +121,8 @@ export const gitContract = {
|
|
|
115
121
|
files: oc.route({ method: "GET", path: "/git/{repo}/files" }).input(RepoParamSchema).output(GitFilesSchema),
|
|
116
122
|
readFile: oc.route({ method: "GET", path: "/git/{repo}/file" }).input(GitFileQuerySchema).output(GitFileSchema),
|
|
117
123
|
writeFile: oc.route({ method: "PUT", path: "/git/{repo}/file" }).input(GitFileWriteSchema).output(OkSchema),
|
|
124
|
+
// Write + commit-that-path-only + push, as one step with one answer. Reports rather than throws for the
|
|
125
|
+
// same reason the remote trio above does: no remote, no credentials and "you are on a side branch" are
|
|
126
|
+
// ordinary outcomes a screen renders, not 500s.
|
|
127
|
+
publishFile: oc.route({ method: "POST", path: "/git/{repo}/publish-file" }).input(GitPublishFileSchema).output(GitPublishFileResultSchema),
|
|
118
128
|
};
|
package/src/events.ts
CHANGED
|
@@ -403,6 +403,29 @@ export const AgentEventSchema = z.discriminatedUnion("kind", [
|
|
|
403
403
|
* route addresses it by; absent on a turn with no conversation behind it (the bench, a one-shot), where
|
|
404
404
|
* the id still powers a plain restore but there is no message to rewind to. */
|
|
405
405
|
z.object({ kind: z.literal("checkpoint"), id: z.string(), index: z.number().int().nonnegative().optional() }),
|
|
406
|
+
/* A MESSAGE THE USER SENT INTO THE TURN WHILE IT RAN — the mid-turn steer, at the point in the stream where
|
|
407
|
+
* the daemon accepted it (agent/agent-steering.ts).
|
|
408
|
+
*
|
|
409
|
+
* A frame rather than a client-local write, because all three things that were wrong about the steer are the
|
|
410
|
+
* same missing fact: nothing in the run's log said WHEN it arrived.
|
|
411
|
+
* - POSITION. The harness injects a steer between tool calls and the model simply keeps writing, with no
|
|
412
|
+
* `result` in between — so there is no `usage` boundary to retire the open bubble. The sending window
|
|
413
|
+
* appended the user's words at the END of its transcript while the turn kept typing into the bubble
|
|
414
|
+
* ABOVE them, and the answer to a question landed over the question.
|
|
415
|
+
* - EVERY OTHER WINDOW. A run is rendered by any number of attached clients; only the one that posted the
|
|
416
|
+
* steer knew about it, so the same conversation read differently in two places.
|
|
417
|
+
* - THE RECORD. The settled turn is written down from this log (sessions/turn-transcript.ts), and one that
|
|
418
|
+
* never held the steer wrote a transcript the message was missing from entirely — which also put the
|
|
419
|
+
* client's row count one ahead of the daemon's for the rest of the conversation, and those counts are
|
|
420
|
+
* what a fork copies a prefix of and a rewind addresses.
|
|
421
|
+
*
|
|
422
|
+
* `text` is what the user typed, never the composed prompt: the editor-context and attachment notes the
|
|
423
|
+
* route wraps around it are protocol, and redrawing them as the user's words is the same lie the stored
|
|
424
|
+
* prompt is unwrapped to avoid. `attachments` are workspace-relative, like the turn's own. `sentAt` is the
|
|
425
|
+
* instant the turn took the message, carried so the bubble wears the same clock live and after a reopen —
|
|
426
|
+
* a turn's own user row is stamped from the daemon's clock too, and a live bubble stamped from the
|
|
427
|
+
* browser's would visibly jump when the record replaced it. */
|
|
428
|
+
z.object({ kind: z.literal("steer"), text: z.string(), sentAt: z.number(), attachments: z.array(z.string()).optional() }),
|
|
406
429
|
z.object({ kind: z.literal("delta"), text: z.string(), parentToolUseId: z.string().optional() }),
|
|
407
430
|
// The prose block the `delta` frames were writing is finished. A turn emits several: the model says what
|
|
408
431
|
// it is about to do, runs tools, reports what it found, runs more, then summarizes — each a separate text
|
package/src/index.ts
CHANGED
|
@@ -97,6 +97,7 @@ export * from "./history-state.js";
|
|
|
97
97
|
export * from "./agent-catalog.js";
|
|
98
98
|
export * from "./agent-run-model.js";
|
|
99
99
|
export * from "./capability-env.js";
|
|
100
|
+
export * from "./capability-secrets.js";
|
|
100
101
|
export * from "./conversation-ids.js";
|
|
101
102
|
export * from "./host-protocol.js";
|
|
102
103
|
export * from "./listener-protocol.js";
|