@intentic/sandbox-contract 1.337.0 → 1.339.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 +41 -0
- package/dist/chores/probes.d.ts.map +1 -1
- package/dist/chores/probes.js +4 -7
- package/dist/chores/probes.js.map +1 -1
- package/dist/contracts/agent.contract.d.ts +32 -23
- package/dist/contracts/agent.contract.d.ts.map +1 -1
- package/dist/contracts/agents.contract.d.ts +6020 -5994
- package/dist/contracts/agents.contract.d.ts.map +1 -1
- package/dist/contracts/agents.contract.js +13 -1
- package/dist/contracts/agents.contract.js.map +1 -1
- package/dist/contracts/approvals.contract.d.ts +8 -0
- package/dist/contracts/approvals.contract.d.ts.map +1 -1
- package/dist/contracts/automations.contract.d.ts +3 -3
- package/dist/contracts/capabilities.contract.d.ts +28 -0
- package/dist/contracts/capabilities.contract.d.ts.map +1 -1
- package/dist/contracts/capabilities.contract.js +11 -1
- package/dist/contracts/capabilities.contract.js.map +1 -1
- package/dist/contracts/device.contract.d.ts +225 -0
- package/dist/contracts/device.contract.d.ts.map +1 -1
- package/dist/contracts/device.contract.js +10 -0
- package/dist/contracts/device.contract.js.map +1 -1
- package/dist/contracts/extensions.contract.d.ts +16 -0
- package/dist/contracts/extensions.contract.d.ts.map +1 -1
- package/dist/contracts/needs.contract.d.ts +22 -7
- package/dist/contracts/needs.contract.d.ts.map +1 -1
- package/dist/contracts/org.contract.d.ts +35 -0
- package/dist/contracts/org.contract.d.ts.map +1 -0
- package/dist/contracts/org.contract.js +14 -0
- package/dist/contracts/org.contract.js.map +1 -0
- package/dist/contracts/phone.contract.d.ts +1 -0
- package/dist/contracts/phone.contract.d.ts.map +1 -1
- package/dist/contracts/privacy.contract.d.ts +115 -0
- package/dist/contracts/privacy.contract.d.ts.map +1 -1
- package/dist/contracts/privacy.contract.js +11 -2
- package/dist/contracts/privacy.contract.js.map +1 -1
- package/dist/contracts/runner.contract.d.ts +11 -7
- package/dist/contracts/runner.contract.d.ts.map +1 -1
- package/dist/contracts/secrets.contract.d.ts +85 -0
- package/dist/contracts/secrets.contract.d.ts.map +1 -1
- package/dist/contracts/secrets.contract.js +48 -1
- package/dist/contracts/secrets.contract.js.map +1 -1
- package/dist/contracts/sessions.contract.d.ts +4 -1
- package/dist/contracts/sessions.contract.d.ts.map +1 -1
- package/dist/contracts/settings.contract.d.ts +11 -3
- package/dist/contracts/settings.contract.d.ts.map +1 -1
- package/dist/contracts/system.contract.d.ts +23 -2
- package/dist/contracts/system.contract.d.ts.map +1 -1
- package/dist/events/agent-events.d.ts +17 -4
- package/dist/events/agent-events.d.ts.map +1 -1
- package/dist/events/requests.d.ts +4 -0
- package/dist/events/requests.d.ts.map +1 -1
- package/dist/events/requests.js +1 -1
- package/dist/events/requests.js.map +1 -1
- package/dist/events/system-events.d.ts +4 -0
- package/dist/events/system-events.d.ts.map +1 -1
- package/dist/events/system-events.js +2 -0
- package/dist/events/system-events.js.map +1 -1
- package/dist/events/transcript.d.ts +27 -6
- package/dist/events/transcript.d.ts.map +1 -1
- package/dist/index.d.ts +7562 -7426
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +31 -257
- package/dist/index.js.map +1 -1
- package/dist/models/agent-lanes.d.ts +30 -0
- package/dist/models/agent-lanes.d.ts.map +1 -0
- package/dist/models/agent-lanes.js +67 -0
- package/dist/models/agent-lanes.js.map +1 -0
- package/dist/models/agent-standing.d.ts +55 -0
- package/dist/models/agent-standing.d.ts.map +1 -0
- package/dist/models/agent-standing.js +82 -0
- package/dist/models/agent-standing.js.map +1 -0
- package/dist/models/agent-starter.d.ts +10 -0
- package/dist/models/agent-starter.d.ts.map +1 -0
- package/dist/models/agent-starter.js +16 -0
- package/dist/models/agent-starter.js.map +1 -0
- package/dist/netd/generated/wire.d.ts +1 -1
- package/dist/netd/generated/wire.d.ts.map +1 -1
- package/dist/policy/identity-assertion.d.ts.map +1 -1
- package/dist/policy/identity-assertion.js +2 -8
- package/dist/policy/identity-assertion.js.map +1 -1
- package/dist/policy/keyring-seal.d.ts +48 -0
- package/dist/policy/keyring-seal.d.ts.map +1 -0
- package/dist/policy/keyring-seal.js +94 -0
- package/dist/policy/keyring-seal.js.map +1 -0
- package/dist/policy/message-limits.d.ts +2 -0
- package/dist/policy/message-limits.d.ts.map +1 -1
- package/dist/policy/message-limits.js +2 -0
- package/dist/policy/message-limits.js.map +1 -1
- package/dist/policy/org-locks.d.ts +58 -0
- package/dist/policy/org-locks.d.ts.map +1 -0
- package/dist/policy/org-locks.js +113 -0
- package/dist/policy/org-locks.js.map +1 -0
- package/dist/policy/persona-capability.d.ts +14 -0
- package/dist/policy/persona-capability.d.ts.map +1 -0
- package/dist/policy/persona-capability.js +23 -0
- package/dist/policy/persona-capability.js.map +1 -0
- package/dist/policy/reserved-servers.d.ts.map +1 -1
- package/dist/policy/reserved-servers.js +1 -1
- package/dist/policy/reserved-servers.js.map +1 -1
- package/dist/protocol/doors/phone-links.d.ts +5 -0
- package/dist/protocol/doors/phone-links.d.ts.map +1 -1
- package/dist/protocol/doors/phone-links.js +3 -1
- package/dist/protocol/doors/phone-links.js.map +1 -1
- package/dist/protocol/doors/webext-links.d.ts +3 -0
- package/dist/protocol/doors/webext-links.d.ts.map +1 -1
- package/dist/protocol/doors/webext-links.js +3 -0
- package/dist/protocol/doors/webext-links.js.map +1 -1
- package/dist/protocol/raw/raw-json-routes.d.ts +270 -0
- package/dist/protocol/raw/raw-json-routes.d.ts.map +1 -1
- package/dist/protocol/raw/raw-json-routes.js +14 -1
- package/dist/protocol/raw/raw-json-routes.js.map +1 -1
- package/dist/protocol/raw/raw-routes.d.ts +70 -0
- package/dist/protocol/raw/raw-routes.d.ts.map +1 -1
- package/dist/protocol/raw/raw-routes.js +18 -0
- package/dist/protocol/raw/raw-routes.js.map +1 -1
- package/dist/protocol/route-meta.d.ts.map +1 -1
- package/dist/protocol/route-meta.js.map +1 -1
- package/dist/protocol/routes.d.ts +4 -0
- package/dist/protocol/routes.d.ts.map +1 -1
- package/dist/protocol/routes.js +12 -0
- package/dist/protocol/routes.js.map +1 -1
- package/dist/schemas/agents-list.d.ts +5 -0
- package/dist/schemas/agents-list.d.ts.map +1 -1
- package/dist/schemas/agents-list.js +8 -0
- package/dist/schemas/agents-list.js.map +1 -1
- package/dist/schemas/agents.d.ts +1 -0
- package/dist/schemas/agents.d.ts.map +1 -1
- package/dist/schemas/agents.js +1 -0
- package/dist/schemas/agents.js.map +1 -1
- package/dist/schemas/approvals.d.ts +20 -0
- package/dist/schemas/approvals.d.ts.map +1 -1
- package/dist/schemas/approvals.js +10 -0
- package/dist/schemas/approvals.js.map +1 -1
- package/dist/schemas/capabilities.d.ts +26 -0
- package/dist/schemas/capabilities.d.ts.map +1 -1
- package/dist/schemas/capabilities.js +17 -0
- package/dist/schemas/capabilities.js.map +1 -1
- package/dist/schemas/data-protection.d.ts +5 -0
- package/dist/schemas/data-protection.d.ts.map +1 -1
- package/dist/schemas/data-protection.js +29 -0
- package/dist/schemas/data-protection.js.map +1 -1
- package/dist/schemas/devices.d.ts +20 -0
- package/dist/schemas/devices.d.ts.map +1 -1
- package/dist/schemas/devices.js +5 -1
- package/dist/schemas/devices.js.map +1 -1
- package/dist/schemas/extension-updates.d.ts +32 -0
- package/dist/schemas/extension-updates.d.ts.map +1 -1
- package/dist/schemas/git/git.d.ts +19 -0
- package/dist/schemas/git/git.d.ts.map +1 -1
- package/dist/schemas/git/git.js +12 -1
- package/dist/schemas/git/git.js.map +1 -1
- package/dist/schemas/hosts.d.ts +2 -0
- package/dist/schemas/hosts.d.ts.map +1 -1
- package/dist/schemas/hosts.js +11 -1
- package/dist/schemas/hosts.js.map +1 -1
- package/dist/schemas/intentic-os.d.ts +218 -0
- package/dist/schemas/intentic-os.d.ts.map +1 -1
- package/dist/schemas/intentic-os.js +166 -0
- package/dist/schemas/intentic-os.js.map +1 -1
- package/dist/schemas/keyring.d.ts +421 -0
- package/dist/schemas/keyring.d.ts.map +1 -0
- package/dist/schemas/keyring.js +176 -0
- package/dist/schemas/keyring.js.map +1 -0
- package/dist/schemas/links.d.ts +208 -0
- package/dist/schemas/links.d.ts.map +1 -0
- package/dist/schemas/links.js +116 -0
- package/dist/schemas/links.js.map +1 -0
- package/dist/schemas/maintenance.d.ts.map +1 -1
- package/dist/schemas/maintenance.js.map +1 -1
- package/dist/schemas/members.d.ts.map +1 -1
- package/dist/schemas/members.js +2 -0
- package/dist/schemas/members.js.map +1 -1
- package/dist/schemas/needs.d.ts +25 -8
- package/dist/schemas/needs.d.ts.map +1 -1
- package/dist/schemas/needs.js +15 -3
- package/dist/schemas/needs.js.map +1 -1
- package/dist/schemas/organisation.d.ts +106 -0
- package/dist/schemas/organisation.d.ts.map +1 -0
- package/dist/schemas/organisation.js +52 -0
- package/dist/schemas/organisation.js.map +1 -0
- package/dist/schemas/phone.d.ts +3 -0
- package/dist/schemas/phone.d.ts.map +1 -1
- package/dist/schemas/phone.js +1 -0
- package/dist/schemas/phone.js.map +1 -1
- package/dist/schemas/privacy.d.ts +232 -0
- package/dist/schemas/privacy.d.ts.map +1 -1
- package/dist/schemas/privacy.js +154 -4
- package/dist/schemas/privacy.js.map +1 -1
- package/dist/schemas/secrets.d.ts +151 -0
- package/dist/schemas/secrets.d.ts.map +1 -1
- package/dist/schemas/secrets.js +71 -8
- package/dist/schemas/secrets.js.map +1 -1
- package/dist/schemas/settings.d.ts +8 -0
- package/dist/schemas/settings.d.ts.map +1 -1
- package/dist/schemas/settings.js +4 -0
- package/dist/schemas/settings.js.map +1 -1
- package/dist/schemas/speech.d.ts +12 -0
- package/dist/schemas/speech.d.ts.map +1 -1
- package/dist/schemas/speech.js +23 -0
- package/dist/schemas/speech.js.map +1 -1
- package/dist/schemas/system.d.ts +2 -0
- package/dist/schemas/system.d.ts.map +1 -1
- package/dist/schemas/system.js +1 -1
- package/dist/schemas/system.js.map +1 -1
- package/dist/schemas/terminal.d.ts +15 -0
- package/dist/schemas/terminal.d.ts.map +1 -1
- package/dist/schemas/terminal.js +11 -2
- package/dist/schemas/terminal.js.map +1 -1
- package/dist/schemas/voice.d.ts +3 -0
- package/dist/schemas/voice.d.ts.map +1 -1
- package/dist/schemas/voice.js +7 -0
- package/dist/schemas/voice.js.map +1 -1
- package/dist/schemas/webext.d.ts +17 -0
- package/dist/schemas/webext.d.ts.map +1 -1
- package/dist/schemas/webext.js +7 -1
- package/dist/schemas/webext.js.map +1 -1
- package/dist/state/contract-lock.d.ts +3 -1
- package/dist/state/contract-lock.d.ts.map +1 -1
- package/dist/state/contract-lock.js +34 -9
- package/dist/state/contract-lock.js.map +1 -1
- package/dist/state/contract-modules.d.ts +4 -0
- package/dist/state/contract-modules.d.ts.map +1 -0
- package/dist/state/contract-modules.js +28 -0
- package/dist/state/contract-modules.js.map +1 -0
- package/dist/state/daemon-floor.d.ts +4 -0
- package/dist/state/daemon-floor.d.ts.map +1 -0
- package/dist/state/daemon-floor.js +8 -0
- package/dist/state/daemon-floor.js.map +1 -0
- package/dist/state/definition.d.ts +34 -0
- package/dist/state/definition.d.ts.map +1 -1
- package/dist/state/history-state.d.ts.map +1 -1
- package/dist/state/history-state.js +8 -0
- package/dist/state/history-state.js.map +1 -1
- package/dist/text/documents.d.ts +3 -1
- package/dist/text/documents.d.ts.map +1 -1
- package/dist/text/documents.js +30 -0
- package/dist/text/documents.js.map +1 -1
- package/dist/text/pages.d.ts.map +1 -1
- package/dist/text/pages.js +3 -7
- package/dist/text/pages.js.map +1 -1
- package/package.json +27 -5
- package/src/chores/probes.ts +4 -6
- package/src/contracts/agents.contract.ts +18 -1
- package/src/contracts/capabilities.contract.ts +14 -0
- package/src/contracts/device.contract.ts +30 -0
- package/src/contracts/org.contract.ts +19 -0
- package/src/contracts/privacy.contract.ts +13 -1
- package/src/contracts/secrets.contract.ts +64 -0
- package/src/events/requests.ts +3 -1
- package/src/events/system-events.ts +9 -0
- package/src/index.ts +41 -279
- package/src/models/agent-lanes.ts +152 -0
- package/src/models/agent-standing.ts +279 -0
- package/src/models/agent-starter.ts +26 -0
- package/src/netd/generated/netd-wire.json +2 -1
- package/src/netd/generated/wire.ts +1 -1
- package/src/policy/identity-assertion.ts +2 -8
- package/src/policy/keyring-seal.test.ts +93 -0
- package/src/policy/keyring-seal.ts +148 -0
- package/src/policy/message-limits.ts +3 -0
- package/src/policy/org-locks.ts +173 -0
- package/src/policy/persona-capability.ts +57 -0
- package/src/policy/reserved-servers.ts +3 -2
- package/src/policy/tests/org-locks.test.ts +92 -0
- package/src/policy/tests/reserved-servers.test.ts +3 -2
- package/src/protocol/doors/listener-protocol.ts +1 -1
- package/src/protocol/doors/phone-links.ts +11 -2
- package/src/protocol/doors/phone-protocol.test.ts +8 -1
- package/src/protocol/doors/webext-links.ts +13 -0
- package/src/protocol/ingress-contract.fixture.json +2 -0
- package/src/protocol/pairing-redeem.ts +1 -1
- package/src/protocol/peer-dial.test.ts +6 -6
- package/src/protocol/peer-mcp-server.test.ts +2 -1
- package/src/protocol/raw/raw-json-routes.ts +31 -1
- package/src/protocol/raw/raw-routes.ts +35 -1
- package/src/protocol/route-meta.ts +2 -1
- package/src/protocol/routes.test.ts +33 -1
- package/src/protocol/routes.ts +18 -0
- package/src/protocol/sse.ts +1 -1
- package/src/schemas/agent.ts +1 -1
- package/src/schemas/agents-list.ts +13 -0
- package/src/schemas/agents.ts +1 -0
- package/src/schemas/approvals.ts +14 -0
- package/src/schemas/capabilities.ts +25 -0
- package/src/schemas/data-protection.ts +47 -0
- package/src/schemas/devices.ts +15 -1
- package/src/schemas/git/git.ts +22 -2
- package/src/schemas/hosts.ts +14 -1
- package/src/schemas/intentic-os.test.ts +148 -0
- package/src/schemas/intentic-os.ts +259 -0
- package/src/schemas/keyring.ts +277 -0
- package/src/schemas/links.ts +180 -0
- package/src/schemas/maintenance.ts +1 -0
- package/src/schemas/members.ts +4 -0
- package/src/schemas/needs.ts +21 -5
- package/src/schemas/organisation.ts +110 -0
- package/src/schemas/phone.ts +3 -0
- package/src/schemas/privacy.test.ts +63 -0
- package/src/schemas/privacy.ts +213 -5
- package/src/schemas/secrets.ts +96 -8
- package/src/schemas/settings.ts +8 -0
- package/src/schemas/speech.ts +38 -1
- package/src/schemas/system.ts +5 -2
- package/src/schemas/terminal.ts +13 -2
- package/src/schemas/voice.ts +11 -0
- package/src/schemas/webext.ts +16 -1
- package/src/state/contract-lock.test.ts +12 -12
- package/src/state/contract-lock.ts +43 -12
- package/src/state/contract-modules.ts +41 -0
- package/src/state/daemon-floor.test.ts +81 -0
- package/src/state/daemon-floor.ts +32 -0
- package/src/state/history-state.ts +17 -0
- package/src/state/workspace-state.ts +1 -1
- package/src/text/documents.test.ts +30 -1
- package/src/text/documents.ts +43 -1
- package/src/text/pages.ts +5 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentic/sandbox-contract",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.339.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",
|
|
@@ -238,6 +238,17 @@
|
|
|
238
238
|
"default": "./dist/policy/identity-assertion.js"
|
|
239
239
|
}
|
|
240
240
|
},
|
|
241
|
+
"./keyring-seal": {
|
|
242
|
+
"types": "./dist/policy/keyring-seal.d.ts",
|
|
243
|
+
"import": {
|
|
244
|
+
"@intentic/src": "./src/policy/keyring-seal.ts",
|
|
245
|
+
"default": "./dist/policy/keyring-seal.js"
|
|
246
|
+
},
|
|
247
|
+
"require": {
|
|
248
|
+
"@intentic/src": "./src/policy/keyring-seal.ts",
|
|
249
|
+
"default": "./dist/policy/keyring-seal.js"
|
|
250
|
+
}
|
|
251
|
+
},
|
|
241
252
|
"./owner-ticket": {
|
|
242
253
|
"types": "./dist/policy/owner-ticket.d.ts",
|
|
243
254
|
"import": {
|
|
@@ -336,13 +347,24 @@
|
|
|
336
347
|
"@intentic/src": "./src/protocol/doors/webext-links.ts",
|
|
337
348
|
"default": "./dist/protocol/doors/webext-links.js"
|
|
338
349
|
}
|
|
350
|
+
},
|
|
351
|
+
"./*": {
|
|
352
|
+
"types": "./dist/*.d.ts",
|
|
353
|
+
"import": {
|
|
354
|
+
"@intentic/src": "./src/*.ts",
|
|
355
|
+
"default": "./dist/*.js"
|
|
356
|
+
},
|
|
357
|
+
"require": {
|
|
358
|
+
"@intentic/src": "./src/*.ts",
|
|
359
|
+
"default": "./dist/*.js"
|
|
360
|
+
}
|
|
339
361
|
}
|
|
340
362
|
},
|
|
341
363
|
"dependencies": {
|
|
342
|
-
"@intentic/base": "1.
|
|
343
|
-
"@intentic/constants": "1.
|
|
344
|
-
"@intentic/extension-manifest": "1.
|
|
345
|
-
"@intentic/registry": "1.
|
|
364
|
+
"@intentic/base": "1.339.0",
|
|
365
|
+
"@intentic/constants": "1.339.0",
|
|
366
|
+
"@intentic/extension-manifest": "1.339.0",
|
|
367
|
+
"@intentic/registry": "1.339.0",
|
|
346
368
|
"@orpc/contract": "1.15.4",
|
|
347
369
|
"tslib": "2.8.1",
|
|
348
370
|
"zod": "4.6.5"
|
package/src/chores/probes.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { parseJsonOr } from "@intentic/base/json";
|
|
2
|
+
import { isRecord } from "@intentic/base/escape";
|
|
1
3
|
import type { Advisory, Bundle, DeadCode, Duplication, MutationScore, OutdatedPackage, ProbeFacts, ProbeId, UiScan } from "../schemas/maintenance.js";
|
|
2
4
|
import type { IdiomRule } from "./stack.js";
|
|
3
5
|
import {
|
|
@@ -46,12 +48,8 @@ const asObject = (text: string): Record<string, unknown> | undefined => {
|
|
|
46
48
|
if (start === -1) {
|
|
47
49
|
return undefined;
|
|
48
50
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
return typeof parsed === `object` && parsed !== null && !Array.isArray(parsed) ? (parsed as Record<string, unknown>) : undefined;
|
|
52
|
-
} catch {
|
|
53
|
-
return undefined;
|
|
54
|
-
}
|
|
51
|
+
const parsed = parseJsonOr(text.slice(start), undefined);
|
|
52
|
+
return isRecord(parsed) ? parsed : undefined;
|
|
55
53
|
};
|
|
56
54
|
|
|
57
55
|
const asString = (value: unknown): string | undefined => (typeof value === `string` && value !== `` ? value : undefined);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
1
2
|
import { procedure } from "../protocol/route-meta.js";
|
|
2
3
|
import { AgentToolChildrenSchema, AgentTranscriptSchema, SessionTranscriptSchema } from "../events/transcript.js";
|
|
3
4
|
import {
|
|
@@ -25,7 +26,7 @@ import {
|
|
|
25
26
|
AgentUnsentSchema,
|
|
26
27
|
LandResultSchema,
|
|
27
28
|
} from "../schemas/agents.js";
|
|
28
|
-
import { AgentsListSchema } from "../schemas/agents-list.js";
|
|
29
|
+
import { AgentsAttentionSchema, AgentsListSchema } from "../schemas/agents-list.js";
|
|
29
30
|
import { AgentChangesSchema, AgentConflictsSchema, AgentIgnoredSchema, AgentScratchSchema, AgentHistorySchema } from "../schemas/git/git.js";
|
|
30
31
|
import { FileDiffSchema } from "../schemas/history.js";
|
|
31
32
|
import { OkSchema } from "../schemas/shared.js";
|
|
@@ -36,6 +37,10 @@ import { ConversationPromptSchema } from "../schemas/system-prompt.js";
|
|
|
36
37
|
// `archive` is the non-destructive counterpart to `discard` (worktree committed, entry kept); `purge` is `discard`
|
|
37
38
|
// applied to every already-archived agent.
|
|
38
39
|
export const agentsContract = {
|
|
40
|
+
// The documents a conversation's calls recorded writing (producedDocumentPaths), which its owner may take as bytes at
|
|
41
|
+
// GET /agents/{id}/documents/raw; a guest's too, since a guest has no Files to find them in.
|
|
42
|
+
documents: procedure.route({ method: "GET", path: "/agents/{id}/documents", summary: "Recorded result documents" })
|
|
43
|
+
.meta({ guest: true }).input(AgentIdSchema).output(z.object({ paths: z.array(z.string()) })),
|
|
39
44
|
list: procedure
|
|
40
45
|
.route({
|
|
41
46
|
method: "GET",
|
|
@@ -46,6 +51,18 @@ export const agentsContract = {
|
|
|
46
51
|
})
|
|
47
52
|
.meta({ guest: true })
|
|
48
53
|
.output(AgentsListSchema),
|
|
54
|
+
// The owner's only, and never a program's or a panel's: it is how the machine that runs the sandbox reads it with a
|
|
55
|
+
// session it minted for the owner (`ic sandbox attention`), and a member's count would not be the owner's anyway.
|
|
56
|
+
attention: procedure
|
|
57
|
+
.route({
|
|
58
|
+
method: "GET",
|
|
59
|
+
path: "/agents/attention",
|
|
60
|
+
summary: "What needs you, and what is working",
|
|
61
|
+
description:
|
|
62
|
+
"Two counts over the live fleet, by the board's own rules: the cards in its Attention lane plus the automations waiting for a yes, and the conversations producing something right now. What a status bar shows without reading the whole fleet.",
|
|
63
|
+
})
|
|
64
|
+
.meta({ floor: "owner", control: "never", panel: false })
|
|
65
|
+
.output(AgentsAttentionSchema),
|
|
49
66
|
archived: procedure
|
|
50
67
|
.route({
|
|
51
68
|
method: "GET",
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
CapabilityLoginSchema,
|
|
10
10
|
CapabilityOtpSchema,
|
|
11
11
|
CapabilityProbeSchema,
|
|
12
|
+
CapabilityRefreshTokenInputSchema,
|
|
12
13
|
CapabilityRenameSchema,
|
|
13
14
|
CapabilitySchema,
|
|
14
15
|
CapabilitySecretInputSchema,
|
|
@@ -99,6 +100,19 @@ export const capabilitiesContract = {
|
|
|
99
100
|
})
|
|
100
101
|
.input(CapabilitySecretInputSchema)
|
|
101
102
|
.output(OkSchema),
|
|
103
|
+
// Called by a connector's own CLI and listener process, never by a page: a sign-in on the agent's side stores its
|
|
104
|
+
// refresh token here rather than printing it for someone to paste.
|
|
105
|
+
oauthToken: capabilityRoute
|
|
106
|
+
.route({
|
|
107
|
+
method: "POST",
|
|
108
|
+
path: "/capabilities/{id}/oauth-token",
|
|
109
|
+
summary: "Store a delegated sign-in's refresh token",
|
|
110
|
+
description:
|
|
111
|
+
"Write-only. Only for a card whose manifest declares `refreshToken`, only with the card's current token in hand, and only while the card still holds the settings the sign-in was made against. Never returns a token or changes any other setting.",
|
|
112
|
+
})
|
|
113
|
+
.meta({ agent: true, panel: false })
|
|
114
|
+
.input(CapabilityRefreshTokenInputSchema)
|
|
115
|
+
.output(OkSchema),
|
|
102
116
|
status: capabilityRoute
|
|
103
117
|
.route({
|
|
104
118
|
method: "GET",
|
|
@@ -8,6 +8,22 @@ import { LoopbackCatchEventSchema, LoopbackCatchSchema } from "../schemas/loopba
|
|
|
8
8
|
import { OkSchema } from "../schemas/shared.js";
|
|
9
9
|
import { ProjectDeliveryResultSchema, ProjectDeliverySchema } from "../schemas/project-delivery.js";
|
|
10
10
|
import { DialLoopbackSchema, StageArtifactResultSchema, StageArtifactSchema } from "../schemas/device-artifacts.js";
|
|
11
|
+
import {
|
|
12
|
+
KeyringCopiesSchema,
|
|
13
|
+
KeyringInboxItemSchema,
|
|
14
|
+
KeyringInboxResultSchema,
|
|
15
|
+
KeyringReleaseResultSchema,
|
|
16
|
+
KeyringSharesSchema,
|
|
17
|
+
KeyringSyncDeliverResultSchema,
|
|
18
|
+
KeyringSyncDeliverSchema,
|
|
19
|
+
KeyringSyncOutboxSchema,
|
|
20
|
+
KeyringSyncPairResultSchema,
|
|
21
|
+
KeyringSyncPairSchema,
|
|
22
|
+
KeyringSyncStateSchema,
|
|
23
|
+
KeyringTypeInputSchema,
|
|
24
|
+
KeyringTypeResultSchema,
|
|
25
|
+
SignedKeyringGrantSchema,
|
|
26
|
+
} from "../schemas/keyring.js";
|
|
11
27
|
|
|
12
28
|
// What a connected device can be asked, over the socket it opened; the machine is the oRPC server, the daemon the
|
|
13
29
|
// client. No `.route()`: the procedure path is the address, not HTTP. Every input is strict (devices.ts says why). `mcp` stays opaque (`z.unknown()`) so a machine
|
|
@@ -46,4 +62,18 @@ export const deviceContract = {
|
|
|
46
62
|
// the connection, or throws (nothing listening there, the switch is off). Advertised with `programs`; the machine
|
|
47
63
|
// allows it when "Run commands" or "Run programs this sandbox sends" is on, either of which already reaches it.
|
|
48
64
|
dialLoopback: oc.input(DialLoopbackSchema).output(z.object({ ok: z.literal(true) })),
|
|
65
|
+
// The keyring on this computer (schemas/keyring.ts), relayed: the machine passes each call to intentic-keyring over its
|
|
66
|
+
// local pipe and carries the answer back, ciphertext both ways where a value rides. Only the daemon calls these,
|
|
67
|
+
// never a tool, so no turn can reach the keyring by naming a procedure; sent only to an agent advertising `keyring`.
|
|
68
|
+
// `keyringShares` answers for the asking sandbox alone: the machine names it from the link the call came in on.
|
|
69
|
+
keyringShares: oc.output(KeyringSharesSchema),
|
|
70
|
+
keyringRelease: oc.input(SignedKeyringGrantSchema).output(KeyringReleaseResultSchema),
|
|
71
|
+
keyringType: oc.input(KeyringTypeInputSchema).output(KeyringTypeResultSchema),
|
|
72
|
+
keyringInbox: oc.input(KeyringInboxItemSchema).output(KeyringInboxResultSchema),
|
|
73
|
+
keyringCopies: oc.output(KeyringCopiesSchema),
|
|
74
|
+
// Keeping two of the owner's keyrings in step through this sandbox, which carries only what is sealed between them.
|
|
75
|
+
keyringSyncState: oc.output(KeyringSyncStateSchema),
|
|
76
|
+
keyringSyncPair: oc.input(KeyringSyncPairSchema).output(KeyringSyncPairResultSchema),
|
|
77
|
+
keyringSyncOutbox: oc.output(KeyringSyncOutboxSchema),
|
|
78
|
+
keyringSyncDeliver: oc.input(KeyringSyncDeliverSchema).output(KeyringSyncDeliverResultSchema),
|
|
49
79
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { procedure } from "../protocol/route-meta.js";
|
|
2
|
+
import { OrgPolicyStateSchema } from "../schemas/organisation.js";
|
|
3
|
+
|
|
4
|
+
// The organisation this sandbox belongs to, as the daemon enforces it (docs/architecture/organisations.md). The
|
|
5
|
+
// platform hands the policy over the sandbox's own connect token; this is the editor's read of the copy that decides,
|
|
6
|
+
// so the hub hides and locks what the daemon will refuse rather than what the platform last said. A guest may read it:
|
|
7
|
+
// it names the organisation and which sections are held, nothing about anyone.
|
|
8
|
+
export const orgContract = {
|
|
9
|
+
policy: procedure
|
|
10
|
+
.route({
|
|
11
|
+
method: "GET",
|
|
12
|
+
path: "/org/policy",
|
|
13
|
+
summary: "Which organisation manages this sandbox, and what it holds",
|
|
14
|
+
description:
|
|
15
|
+
"Unbound for a personal sandbox. For one an organisation manages: its policy as this sandbox enforces it, section by section, and when that edition arrived.",
|
|
16
|
+
})
|
|
17
|
+
.meta({ guest: true })
|
|
18
|
+
.output(OrgPolicyStateSchema),
|
|
19
|
+
};
|
|
@@ -8,6 +8,8 @@ import {
|
|
|
8
8
|
PrivacyKnownSourceSchema,
|
|
9
9
|
PrivacyKnownValueSchema,
|
|
10
10
|
PrivacyLedgerEntrySchema,
|
|
11
|
+
PRIVACY_PREVIEW_MAX,
|
|
12
|
+
PrivacyPreviewSchema,
|
|
11
13
|
PrivacyRevealSchema,
|
|
12
14
|
PrivacyShieldPolicySchema,
|
|
13
15
|
PrivacyShieldStatusSchema,
|
|
@@ -76,11 +78,21 @@ export const privacyContract = {
|
|
|
76
78
|
path: "/privacy/dictionary",
|
|
77
79
|
summary: "The name lists the shield finds names by",
|
|
78
80
|
description:
|
|
79
|
-
"Every list the dictionary holds (first names, surnames, words that are names only beside other evidence, titles), how many words each has and where they come from. With a query, what the dictionary makes of it as a name, and for one word the listed words starting with it.",
|
|
81
|
+
"Every list the dictionary holds (first names, surnames, words that are names only beside other evidence, titles), the owner's own lists among them, whether each is switched on, how many words each has and where they come from. With a query, what the dictionary as the owner set it makes of it as a name, and for one word the listed words starting with it.",
|
|
80
82
|
})
|
|
81
83
|
.meta({ agent: true })
|
|
82
84
|
.input(z.object({ query: z.string().max(100).optional().describe("A word, the start of one, or a full name.") }))
|
|
83
85
|
.output(PrivacyDictionarySchema),
|
|
86
|
+
preview: procedure
|
|
87
|
+
.route({
|
|
88
|
+
method: "POST",
|
|
89
|
+
path: "/privacy/preview",
|
|
90
|
+
summary: "Try the shield on a text",
|
|
91
|
+
description:
|
|
92
|
+
"What the shield would mask in the text with the policy as saved (every detector, the name lists, the owner's own rules, the values the vault knows) and what found each. Nothing is given a token or kept, whatever the switch says.",
|
|
93
|
+
})
|
|
94
|
+
.input(z.object({ text: z.string().max(PRIVACY_PREVIEW_MAX) }))
|
|
95
|
+
.output(PrivacyPreviewSchema),
|
|
84
96
|
sources: procedure
|
|
85
97
|
.route({
|
|
86
98
|
method: "GET",
|
|
@@ -15,6 +15,14 @@ import {
|
|
|
15
15
|
SecretHostGuardSetSchema,
|
|
16
16
|
SecretHostGuardsSchema,
|
|
17
17
|
SecretKeysSchema,
|
|
18
|
+
SecretProgramGuardSetResultSchema,
|
|
19
|
+
SecretProgramGuardSetSchema,
|
|
20
|
+
SecretProgramGuardsSchema,
|
|
21
|
+
SecretTypeIntoResultSchema,
|
|
22
|
+
SecretTypeIntoSchema,
|
|
23
|
+
SandboxKeyringPairResultSchema,
|
|
24
|
+
SandboxKeyringPairSchema,
|
|
25
|
+
SandboxKeyringsSchema,
|
|
18
26
|
SecretRevealSchema,
|
|
19
27
|
SecretSetSchema,
|
|
20
28
|
} from "../schemas/secrets.js";
|
|
@@ -143,6 +151,62 @@ export const secretsContract = {
|
|
|
143
151
|
.meta({ agent: true })
|
|
144
152
|
.input(SecretHostGuardSetSchema)
|
|
145
153
|
.output(SecretHostGuardSetResultSchema),
|
|
154
|
+
// The program guard, the host guard's counterpart for typing into windows on the owner's computers (schemas/secrets.ts
|
|
155
|
+
// SecretProgramsSchema): read by the agent so a use aims where it may go; narrowing is anybody's, widening the owner's.
|
|
156
|
+
programs: secretRoute
|
|
157
|
+
.route({
|
|
158
|
+
method: "GET",
|
|
159
|
+
path: "/secrets/programs",
|
|
160
|
+
summary: "Which programs each secret may be typed into",
|
|
161
|
+
description:
|
|
162
|
+
"Every sandbox-held secret whose program list is set: the programs on the owner's computers and the phone apps it goes into unasked. A secret held in a computer's keyring carries its own list, shown on its inventory row. Names and programs only, never values.",
|
|
163
|
+
})
|
|
164
|
+
.meta({ agent: true })
|
|
165
|
+
.output(SecretProgramGuardsSchema),
|
|
166
|
+
setPrograms: secretRoute
|
|
167
|
+
.route({
|
|
168
|
+
method: "PUT",
|
|
169
|
+
path: "/secrets/programs/{subject}",
|
|
170
|
+
summary: "Set which programs a secret may be typed into",
|
|
171
|
+
description:
|
|
172
|
+
"Replaces one sandbox-held secret's program list. Taking programs away, or turning `anyField` off, is open to anybody who may use secrets; adding one is the owner's: from the agent it raises a card for the owner in the live conversation and waits. Refused for a secret a computer's keyring holds, whose list is changed on that computer.",
|
|
173
|
+
})
|
|
174
|
+
.meta({ agent: true })
|
|
175
|
+
.input(SecretProgramGuardSetSchema)
|
|
176
|
+
.output(SecretProgramGuardSetResultSchema),
|
|
177
|
+
// The owner's own Type into…, never the agent's: it types into whatever has focus, which only a person at that
|
|
178
|
+
// computer can aim.
|
|
179
|
+
typeInto: secretRoute
|
|
180
|
+
.route({
|
|
181
|
+
method: "POST",
|
|
182
|
+
path: "/secrets/type-into",
|
|
183
|
+
summary: "Type a secret into the focused window on one of your computers",
|
|
184
|
+
description:
|
|
185
|
+
"After a short countdown, types one secret into whatever has focus on the computer named, through its keyring, which checks the window and still asks there when the entry's share says to. Answers what it went into, never the value.",
|
|
186
|
+
})
|
|
187
|
+
.meta({ panel: false })
|
|
188
|
+
.input(SecretTypeIntoSchema)
|
|
189
|
+
.output(SecretTypeIntoResultSchema),
|
|
190
|
+
keyrings: secretRoute
|
|
191
|
+
.route({
|
|
192
|
+
method: "GET",
|
|
193
|
+
path: "/secrets/keyrings",
|
|
194
|
+
summary: "The keyrings on your computers",
|
|
195
|
+
description:
|
|
196
|
+
"Every connected computer with a keyring this sandbox can reach: whether it answers and is unlocked, how many of its entries are shared here, and whom it is paired with. Names and counts only, never values.",
|
|
197
|
+
})
|
|
198
|
+
.output(SandboxKeyringsSchema),
|
|
199
|
+
keyringPair: secretRoute
|
|
200
|
+
.route({
|
|
201
|
+
method: "POST",
|
|
202
|
+
path: "/secrets/keyrings/pair",
|
|
203
|
+
summary: "Pair the keyrings on two of your computers",
|
|
204
|
+
description:
|
|
205
|
+
"Asks each computer's keyring to pair with the other: each shows a prompt with both fingerprints, and only a yes on both pairs them. After that each keeps the other's entries in step, sealed between them and carried by this sandbox, which cannot open what it carries.",
|
|
206
|
+
})
|
|
207
|
+
.meta({ panel: false })
|
|
208
|
+
.input(SandboxKeyringPairSchema)
|
|
209
|
+
.output(SandboxKeyringPairResultSchema),
|
|
146
210
|
// The credential gateway's say over one connection: how its credential reaches the agent, and what it may do there.
|
|
147
211
|
policy: secretRoute
|
|
148
212
|
.route({
|
package/src/events/requests.ts
CHANGED
|
@@ -68,7 +68,9 @@ export const ChildAgentAskSchema = ChildRunSchema.extend({
|
|
|
68
68
|
message: z
|
|
69
69
|
.string()
|
|
70
70
|
.optional()
|
|
71
|
-
.describe(
|
|
71
|
+
.describe(
|
|
72
|
+
"What the parent would say to it: the prompt a described start opens on, the message it sends, or the answers it gives. Clipped for the request, with an ellipsis where it was cut.",
|
|
73
|
+
),
|
|
72
74
|
on: z.string().optional().describe('Which machine it runs on, when one is named: a runner, or "here" for this sandbox.'),
|
|
73
75
|
proposed: ChildRunSchema.optional().describe(
|
|
74
76
|
"What the agent asked to start it on, when the owner started it on something else instead. Present only once the request has settled that way.",
|
|
@@ -51,6 +51,15 @@ export const HelloSchema = z.object({
|
|
|
51
51
|
workspaceId: z.string(),
|
|
52
52
|
routes: z.array(z.string()).optional(),
|
|
53
53
|
shapes: z.record(z.string(), z.string()).optional(),
|
|
54
|
+
// The same two for the hand-written routes (`POST /workspace/upload-diff`), which are half the daemon's surface and
|
|
55
|
+
// used to be advertised nowhere: a call onto a raw route an older daemon predates could only come back as a bare
|
|
56
|
+
// 404. Their own fields rather than more entries in `routes`, which an older browser reads as proof that it is
|
|
57
|
+
// itself the stale side. Absent means a daemon from before this field, and no evidence either way.
|
|
58
|
+
// `rawFingerprints` is what `shapes` is for a procedure, under the name the rest of the code gives it.
|
|
59
|
+
rawRoutes: z.array(z.string()).optional(),
|
|
60
|
+
rawFingerprints: z.record(z.string(), z.string()).optional(),
|
|
61
|
+
// `<version>:<newest mtime of the compiled tree>`, as every release since 1.0.0 sends it. The version at its head
|
|
62
|
+
// is what the browser holds against the oldest daemon it supports (state/daemon-floor.ts), so it stays first.
|
|
54
63
|
build: z.string().optional(),
|
|
55
64
|
boot: BootProgressSchema.optional(),
|
|
56
65
|
// A project sandbox's folder, workspace-relative (`my-app` for /work/my-app): the owner's own folder, synced live
|