@intentic/sandbox-contract 1.423.0 → 1.425.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/contracts/access-profiles.contract.d.ts +7 -3
- package/dist/contracts/access-profiles.contract.d.ts.map +1 -1
- package/dist/contracts/agent.contract.d.ts +51 -10
- package/dist/contracts/agent.contract.d.ts.map +1 -1
- package/dist/contracts/agent.contract.js +1 -1
- package/dist/contracts/agent.contract.js.map +1 -1
- package/dist/contracts/agents.contract.d.ts +13 -5
- package/dist/contracts/agents.contract.d.ts.map +1 -1
- package/dist/contracts/agents.contract.js +1 -1
- package/dist/contracts/agents.contract.js.map +1 -1
- package/dist/contracts/approvals.contract.d.ts +1 -1
- package/dist/contracts/needs.contract.d.ts +41 -26
- package/dist/contracts/needs.contract.d.ts.map +1 -1
- package/dist/contracts/needs.contract.js +2 -2
- package/dist/contracts/needs.contract.js.map +1 -1
- package/dist/contracts/org.contract.d.ts +3 -0
- package/dist/contracts/org.contract.d.ts.map +1 -1
- package/dist/contracts/{personas.contract.d.ts → roles.contract.d.ts} +3 -39
- package/dist/contracts/roles.contract.d.ts.map +1 -0
- package/dist/contracts/roles.contract.js +78 -0
- package/dist/contracts/roles.contract.js.map +1 -0
- package/dist/contracts/runner.contract.d.ts +276 -252
- package/dist/contracts/runner.contract.d.ts.map +1 -1
- package/dist/contracts/seal.contract.d.ts +1 -25
- package/dist/contracts/seal.contract.d.ts.map +1 -1
- package/dist/contracts/seal.contract.js +3 -14
- package/dist/contracts/seal.contract.js.map +1 -1
- package/dist/contracts/sessions.contract.d.ts +5 -1
- package/dist/contracts/sessions.contract.d.ts.map +1 -1
- package/dist/contracts/settings.contract.d.ts +2 -2
- package/dist/contracts/skills.contract.d.ts +3 -3
- package/dist/contracts/skills.contract.js +1 -1
- package/dist/contracts/skills.contract.js.map +1 -1
- package/dist/contracts/system.contract.d.ts +11 -16
- package/dist/contracts/system.contract.d.ts.map +1 -1
- package/dist/events/agent-events.d.ts +20 -4
- package/dist/events/agent-events.d.ts.map +1 -1
- package/dist/events/agent-transcript.d.ts +5 -1
- package/dist/events/agent-transcript.d.ts.map +1 -1
- package/dist/events/system-events.d.ts +7 -7
- package/dist/events/system-events.d.ts.map +1 -1
- package/dist/events/system-events.js +3 -3
- package/dist/events/system-events.js.map +1 -1
- package/dist/events/transcript.d.ts +25 -5
- package/dist/events/transcript.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/models/model-roles.d.ts +1 -1
- package/dist/models/model-roles.d.ts.map +1 -1
- package/dist/models/model-roles.js +1 -1
- package/dist/models/model-roles.js.map +1 -1
- package/dist/policy/org-locks.d.ts +1 -1
- package/dist/policy/org-locks.d.ts.map +1 -1
- package/dist/policy/org-locks.js +1 -1
- package/dist/policy/org-locks.js.map +1 -1
- package/dist/policy/role-capability.d.ts +7 -0
- package/dist/policy/role-capability.d.ts.map +1 -0
- package/dist/policy/role-capability.js +3 -0
- package/dist/policy/role-capability.js.map +1 -0
- package/dist/policy/role-home.d.ts +9 -0
- package/dist/policy/role-home.d.ts.map +1 -0
- package/dist/policy/role-home.js +7 -0
- package/dist/policy/role-home.js.map +1 -0
- package/dist/protocol/member-reach.d.ts +4 -4
- package/dist/protocol/member-reach.js +3 -3
- package/dist/protocol/raw/raw-json-routes.d.ts +29 -23
- package/dist/protocol/raw/raw-json-routes.d.ts.map +1 -1
- package/dist/protocol/route-meta.d.ts +4 -4
- package/dist/schemas/access-profiles.d.ts +10 -4
- package/dist/schemas/access-profiles.d.ts.map +1 -1
- package/dist/schemas/access-profiles.js +9 -4
- package/dist/schemas/access-profiles.js.map +1 -1
- package/dist/schemas/agent.js +3 -3
- package/dist/schemas/agent.js.map +1 -1
- package/dist/schemas/agents.js +2 -2
- package/dist/schemas/agents.js.map +1 -1
- package/dist/schemas/approvals.d.ts +3 -3
- package/dist/schemas/approvals.js +3 -3
- package/dist/schemas/approvals.js.map +1 -1
- package/dist/schemas/automations.js +6 -6
- package/dist/schemas/automations.js.map +1 -1
- package/dist/schemas/chat-route.d.ts +7 -2
- package/dist/schemas/chat-route.d.ts.map +1 -1
- package/dist/schemas/chat-route.js +11 -6
- package/dist/schemas/chat-route.js.map +1 -1
- package/dist/schemas/context-trim.js +1 -1
- package/dist/schemas/context-trim.js.map +1 -1
- package/dist/schemas/diagnostics.d.ts +3 -3
- package/dist/schemas/git/git.js +1 -1
- package/dist/schemas/git/git.js.map +1 -1
- package/dist/schemas/links.d.ts +1 -1
- package/dist/schemas/links.js +4 -4
- package/dist/schemas/links.js.map +1 -1
- package/dist/schemas/loops.js +1 -1
- package/dist/schemas/loops.js.map +1 -1
- package/dist/schemas/members.d.ts +162 -20
- package/dist/schemas/members.d.ts.map +1 -1
- package/dist/schemas/members.js +19 -16
- package/dist/schemas/members.js.map +1 -1
- package/dist/schemas/needs.d.ts +37 -42
- package/dist/schemas/needs.d.ts.map +1 -1
- package/dist/schemas/needs.js +18 -16
- package/dist/schemas/needs.js.map +1 -1
- package/dist/schemas/organisation.d.ts +10 -0
- package/dist/schemas/organisation.d.ts.map +1 -1
- package/dist/schemas/organisation.js.map +1 -1
- package/dist/schemas/{personas.d.ts → roles.d.ts} +37 -72
- package/dist/schemas/roles.d.ts.map +1 -0
- package/dist/schemas/{personas.js → roles.js} +45 -67
- package/dist/schemas/roles.js.map +1 -0
- package/dist/schemas/seal.d.ts +2 -21
- package/dist/schemas/seal.d.ts.map +1 -1
- package/dist/schemas/seal.js +1 -16
- package/dist/schemas/seal.js.map +1 -1
- package/dist/schemas/settings-history.d.ts +1 -1
- package/dist/schemas/settings-history.d.ts.map +1 -1
- package/dist/schemas/settings-history.js +2 -1
- package/dist/schemas/settings-history.js.map +1 -1
- package/dist/schemas/settings.d.ts +11 -11
- package/dist/schemas/settings.d.ts.map +1 -1
- package/dist/schemas/settings.js +3 -3
- package/dist/schemas/settings.js.map +1 -1
- package/dist/schemas/shared.d.ts +6 -5
- package/dist/schemas/shared.d.ts.map +1 -1
- package/dist/schemas/shared.js +14 -5
- package/dist/schemas/shared.js.map +1 -1
- package/dist/schemas/system-prompt.d.ts +12 -12
- package/dist/schemas/system-prompt.d.ts.map +1 -1
- package/dist/schemas/system-prompt.js +1 -1
- package/dist/schemas/system-prompt.js.map +1 -1
- package/dist/schemas/terminal.d.ts +18 -0
- package/dist/schemas/terminal.d.ts.map +1 -1
- package/dist/schemas/terminal.js +16 -1
- package/dist/schemas/terminal.js.map +1 -1
- package/dist/schemas/tool-ceiling.d.ts +4 -2
- package/dist/schemas/tool-ceiling.d.ts.map +1 -1
- package/dist/schemas/tool-ceiling.js +29 -3
- package/dist/schemas/tool-ceiling.js.map +1 -1
- package/dist/schemas/workflows.js +1 -1
- package/dist/schemas/workflows.js.map +1 -1
- package/dist/state/definition.d.ts +4 -4
- package/dist/state/workspace-state.d.ts +4 -4
- package/dist/state/workspace-state.d.ts.map +1 -1
- package/dist/state/workspace-state.js +2 -2
- package/dist/state/workspace-state.js.map +1 -1
- package/package.json +5 -5
- package/src/contracts/agent.contract.ts +2 -2
- package/src/contracts/agents.contract.ts +1 -1
- package/src/contracts/automations.contract.ts +1 -1
- package/src/contracts/logs.contract.ts +1 -1
- package/src/contracts/needs.contract.ts +2 -2
- package/src/contracts/roles.contract.ts +108 -0
- package/src/contracts/seal.contract.ts +3 -18
- package/src/contracts/skills.contract.ts +2 -2
- package/src/events/system-events.ts +5 -4
- package/src/index.ts +3 -3
- package/src/models/agent-runtimes.ts +8 -8
- package/src/models/model-roles.ts +3 -3
- package/src/policy/control-scopes.ts +1 -1
- package/src/policy/fence-paths.ts +2 -2
- package/src/policy/org-locks.ts +2 -1
- package/src/policy/role-capability.ts +29 -0
- package/src/policy/role-home.ts +29 -0
- package/src/policy/tests/fence-paths.test.ts +1 -1
- package/src/policy/tests/role-home.test.ts +40 -0
- package/src/protocol/member-reach.test.ts +17 -17
- package/src/protocol/member-reach.ts +7 -7
- package/src/protocol/route-meta.ts +6 -6
- package/src/schemas/access-profiles.ts +20 -9
- package/src/schemas/agent.ts +4 -4
- package/src/schemas/agents.ts +2 -2
- package/src/schemas/approvals.ts +3 -3
- package/src/schemas/automations.ts +14 -14
- package/src/schemas/capabilities.ts +1 -1
- package/src/schemas/chat-route.ts +18 -9
- package/src/schemas/context-trim.ts +1 -1
- package/src/schemas/diagnostics.ts +1 -1
- package/src/schemas/git/git.ts +1 -1
- package/src/schemas/internal.ts +1 -1
- package/src/schemas/links.ts +7 -7
- package/src/schemas/loops.ts +1 -1
- package/src/schemas/members.test.ts +31 -31
- package/src/schemas/members.ts +37 -29
- package/src/schemas/needs.ts +35 -22
- package/src/schemas/organisation.ts +2 -0
- package/src/schemas/{personas.ts → roles.ts} +83 -113
- package/src/schemas/seal.ts +5 -30
- package/src/schemas/settings-history.ts +3 -1
- package/src/schemas/settings.ts +10 -6
- package/src/schemas/shared.ts +24 -10
- package/src/schemas/state-plan.test.ts +3 -3
- package/src/schemas/system-prompt.ts +2 -1
- package/src/schemas/terminal.ts +18 -1
- package/src/schemas/tool-ceiling.test.ts +14 -8
- package/src/schemas/tool-ceiling.ts +42 -11
- package/src/schemas/workflows.ts +1 -1
- package/src/state/auth-state.ts +1 -1
- package/src/state/definition.ts +1 -1
- package/src/state/workspace-state.test.ts +5 -5
- package/src/state/workspace-state.ts +11 -11
- package/dist/contracts/personas.contract.d.ts.map +0 -1
- package/dist/contracts/personas.contract.js +0 -78
- package/dist/contracts/personas.contract.js.map +0 -1
- package/dist/policy/persona-capability.d.ts +0 -14
- package/dist/policy/persona-capability.d.ts.map +0 -1
- package/dist/policy/persona-capability.js +0 -24
- package/dist/policy/persona-capability.js.map +0 -1
- package/dist/policy/persona-home.d.ts +0 -10
- package/dist/policy/persona-home.d.ts.map +0 -1
- package/dist/policy/persona-home.js +0 -11
- package/dist/policy/persona-home.js.map +0 -1
- package/dist/schemas/personas.d.ts.map +0 -1
- package/dist/schemas/personas.js.map +0 -1
- package/dist/schemas/seal-proof.d.ts +0 -20
- package/dist/schemas/seal-proof.d.ts.map +0 -1
- package/dist/schemas/seal-proof.js +0 -8
- package/dist/schemas/seal-proof.js.map +0 -1
- package/src/contracts/personas.contract.ts +0 -106
- package/src/policy/persona-capability.ts +0 -64
- package/src/policy/persona-home.ts +0 -39
- package/src/policy/tests/persona-home.test.ts +0 -51
- package/src/schemas/seal-proof.ts +0 -12
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import type {
|
|
2
|
+
import type { RolePowers } from "./roles.js";
|
|
3
|
+
|
|
4
|
+
// THE MOST A TURN'S TOOLS MAY BE, as everything it acts for is held to it (docs/architecture/access.md): one answer
|
|
5
|
+
// per shelf, each an upper bound. A shelf left out is not limited. Every limit on a turn's tools is one of these: a
|
|
6
|
+
// person's, a service's, the role's (a profile listing it) and the organisation's, held together.
|
|
7
|
+
// The same names and order as a turn's resolved shelves (schemas/roles.ts RolePowersSchema), with no defaults:
|
|
8
|
+
// an absent answer here is "no limit", where an absent resolved shelf is "on".
|
|
9
|
+
// An extension by its id (`publisher.name`, or a git install's card id).
|
|
10
|
+
export const ExtensionIdSchema = z
|
|
11
|
+
.string()
|
|
12
|
+
.min(1)
|
|
13
|
+
.max(121)
|
|
14
|
+
.regex(/^[a-zA-Z0-9][a-zA-Z0-9_.-]*$/);
|
|
3
15
|
|
|
4
|
-
// THE MOST A TURN'S TOOLS MAY BE, as the principals it acts for are held to it (docs/architecture/access.md): one answer
|
|
5
|
-
// per persona shelf, each an upper bound. A shelf left out is not limited. A persona's own shelves are posture and only
|
|
6
|
-
// narrow inside this; a conversation grant lifts what a persona withheld and never what a ceiling did.
|
|
7
|
-
// The same names and order as a persona's shelves (schemas/personas.ts PersonaPowersSchema), so one vocabulary covers
|
|
8
|
-
// both, with no defaults: an absent answer here is "no limit", where an absent shelf on a card is "on".
|
|
9
16
|
export const ToolCeilingSchema = z.object({
|
|
10
17
|
files: z.enum(["none", "read", "write"]).optional().describe("The most it may do with files: nothing, look and search, or also create and change."),
|
|
11
18
|
shell: z
|
|
@@ -17,6 +24,12 @@ export const ToolCeilingSchema = z.object({
|
|
|
17
24
|
browser: z.boolean().optional().describe("False takes away the credential-free browser."),
|
|
18
25
|
delegate: z.boolean().optional().describe("False takes away spawning subagents and running workflows."),
|
|
19
26
|
sandbox: z.boolean().optional().describe("False takes away changing the sandbox's own settings, manifests and public outbox."),
|
|
27
|
+
// Added 2026-11-18, optional: until then a role card held this list itself.
|
|
28
|
+
extensions: z
|
|
29
|
+
.array(ExtensionIdSchema)
|
|
30
|
+
.max(100)
|
|
31
|
+
.optional()
|
|
32
|
+
.describe("Which extensions' own agent tools and agent plugin (skills, commands, subagents) its turns may get, by extension id. Absent means every enabled one; empty means none."),
|
|
20
33
|
});
|
|
21
34
|
export type ToolCeiling = z.infer<typeof ToolCeilingSchema>;
|
|
22
35
|
|
|
@@ -39,7 +52,16 @@ const lowerFiles = (left: FilesAnswer | undefined, right: FilesAnswer | undefine
|
|
|
39
52
|
|
|
40
53
|
/** Whether a ceiling limits anything at all; undefined and an empty one do not. */
|
|
41
54
|
export const ceilingLimits = (ceiling: ToolCeiling | undefined): boolean =>
|
|
42
|
-
ceiling !== undefined &&
|
|
55
|
+
ceiling !== undefined &&
|
|
56
|
+
((ceiling.files !== undefined && ceiling.files !== "write") || CEILING_SWITCHES.some((shelf) => ceiling[shelf] === false) || ceiling.extensions !== undefined);
|
|
57
|
+
|
|
58
|
+
// Two extension lists held together: undefined is every one, so the narrower list wins and two lists keep what both name.
|
|
59
|
+
const lowerList = (left: readonly string[] | undefined, right: readonly string[] | undefined): string[] | undefined => {
|
|
60
|
+
if (left === undefined) {
|
|
61
|
+
return right === undefined ? undefined : [...right];
|
|
62
|
+
}
|
|
63
|
+
return right === undefined ? [...left] : left.filter((id) => right.includes(id));
|
|
64
|
+
};
|
|
43
65
|
|
|
44
66
|
/**
|
|
45
67
|
* Two ceilings held together: the lower answer of each shelf, so a turn acting for several principals is held to what
|
|
@@ -53,7 +75,8 @@ export const intersectCeilings = (left: ToolCeiling | undefined, right: ToolCeil
|
|
|
53
75
|
return left;
|
|
54
76
|
}
|
|
55
77
|
const files = lowerFiles(left.files, right.files);
|
|
56
|
-
const
|
|
78
|
+
const extensions = lowerList(left.extensions, right.extensions);
|
|
79
|
+
const held: ToolCeiling = { ...(files === undefined ? {} : { files }), ...(extensions === undefined ? {} : { extensions }) };
|
|
57
80
|
for (const shelf of CEILING_SWITCHES) {
|
|
58
81
|
if (left[shelf] === false || right[shelf] === false) {
|
|
59
82
|
held[shelf] = false;
|
|
@@ -62,12 +85,17 @@ export const intersectCeilings = (left: ToolCeiling | undefined, right: ToolCeil
|
|
|
62
85
|
return held;
|
|
63
86
|
};
|
|
64
87
|
|
|
65
|
-
/** A
|
|
66
|
-
export const capPowers = (powers:
|
|
88
|
+
/** A turn's shelves held under a ceiling: each shelf the lower of the two, and only the extensions both allow. */
|
|
89
|
+
export const capPowers = (powers: RolePowers, ceiling: ToolCeiling | undefined): RolePowers => {
|
|
67
90
|
if (!ceilingLimits(ceiling) || ceiling === undefined) {
|
|
68
91
|
return powers;
|
|
69
92
|
}
|
|
70
|
-
const
|
|
93
|
+
const extensions = lowerList(powers.extensions, ceiling.extensions);
|
|
94
|
+
const capped: RolePowers = {
|
|
95
|
+
...powers,
|
|
96
|
+
files: lowerFiles(powers.files, ceiling.files) ?? powers.files,
|
|
97
|
+
...(extensions === undefined ? {} : { extensions }),
|
|
98
|
+
};
|
|
71
99
|
for (const shelf of CEILING_SWITCHES) {
|
|
72
100
|
if (ceiling[shelf] === false) {
|
|
73
101
|
capped[shelf] = false;
|
|
@@ -109,5 +137,8 @@ export const ceilingWords = (ceiling: ToolCeiling | undefined): string[] => {
|
|
|
109
137
|
words.push(SWITCH_WORDS[shelf]);
|
|
110
138
|
}
|
|
111
139
|
}
|
|
140
|
+
if (ceiling.extensions !== undefined) {
|
|
141
|
+
words.push(ceiling.extensions.length === 0 ? "no extension tools" : `only ${ceiling.extensions.length} extension${ceiling.extensions.length === 1 ? "" : "s"}' tools`);
|
|
142
|
+
}
|
|
112
143
|
return words;
|
|
113
144
|
};
|
package/src/schemas/workflows.ts
CHANGED
|
@@ -70,7 +70,7 @@ export const WorkflowStepSchema = z.object({
|
|
|
70
70
|
actsAs: entryId
|
|
71
71
|
.optional()
|
|
72
72
|
.describe(
|
|
73
|
-
"Which
|
|
73
|
+
"Which role it acts as. Unpinned, a step gets the strict unwatched default: every tool, and no signed-in accounts at all. Pinning one is how a release check gets a voice, a folder to work in, or the single account it may post from.",
|
|
74
74
|
),
|
|
75
75
|
});
|
|
76
76
|
export type WorkflowStep = z.infer<typeof WorkflowStepSchema>;
|
package/src/state/auth-state.ts
CHANGED
|
@@ -51,7 +51,7 @@ export const AUTH_STATE_FILES: readonly StateFile[] = [
|
|
|
51
51
|
|
|
52
52
|
/* ---- yeses the owner gave here: decided again on the target ---- */
|
|
53
53
|
|
|
54
|
-
// Sandbox-wide permissions ("Always: <line>") and each conversation's own (
|
|
54
|
+
// Sandbox-wide permissions ("Always: <line>") and each conversation's own (roles/owner-grants.ts,
|
|
55
55
|
// conversation-grants.ts); a conversation's card simply asks again, so only the sandbox-wide ones carry a note.
|
|
56
56
|
{ path: "owner-grants.json", portability: "identity", note: "Give sandbox-wide permissions again from the Access tab." },
|
|
57
57
|
{ path: "conversation-grants.json", portability: "identity" },
|
package/src/state/definition.ts
CHANGED
|
@@ -19,7 +19,7 @@ export const DefinitionRepositorySchema = z.strictObject({
|
|
|
19
19
|
});
|
|
20
20
|
export type DefinitionRepository = z.infer<typeof DefinitionRepositorySchema>;
|
|
21
21
|
|
|
22
|
-
// The /work git repo, by reference: tracks the owner's authored content (notes, skills,
|
|
22
|
+
// The /work git repo, by reference: tracks the owner's authored content (notes, skills, roles, automations, designs,
|
|
23
23
|
// approvals). With a remote it's referenceable like any repo; without one it's omitted, not invented.
|
|
24
24
|
export const DefinitionWorkspaceSchema = z.strictObject({
|
|
25
25
|
// The clone URL, verbatim from the workspace repo's own remote.
|
|
@@ -45,7 +45,7 @@ describe(`staleQueryKeys`, () => {
|
|
|
45
45
|
expect(carries.toSorted()).toEqual([
|
|
46
46
|
`.intentic/config/areas.json`,
|
|
47
47
|
`.intentic/config/capabilities.json`,
|
|
48
|
-
`.intentic/config/
|
|
48
|
+
`.intentic/config/roles.json`,
|
|
49
49
|
`.intentic/config/settings.json`,
|
|
50
50
|
]);
|
|
51
51
|
});
|
|
@@ -397,9 +397,9 @@ describe(`VERSIONED_STATE_PATHS`, () => {
|
|
|
397
397
|
// What a home conversation reviews, merges and asks a person about; same reason as the safety policy.
|
|
398
398
|
`${STATE_DIR}/config/home.md`,
|
|
399
399
|
`${STATE_DIR}/config/loop-designs.json`,
|
|
400
|
-
`${STATE_DIR}/config/
|
|
401
|
-
// A
|
|
402
|
-
`${STATE_DIR}/config/
|
|
400
|
+
`${STATE_DIR}/config/roles.json`,
|
|
401
|
+
// A role's prompt and reachable skills: the text that decides how it behaves, same reason as its card.
|
|
402
|
+
`${STATE_DIR}/config/roles/`,
|
|
403
403
|
// Prose deciding when the agent stops to ask; the standing answer to "since when did we allow this".
|
|
404
404
|
`${STATE_DIR}/config/safety.md`,
|
|
405
405
|
`${STATE_DIR}/config/settings.json`,
|
|
@@ -470,7 +470,7 @@ describe(`state groups`, () => {
|
|
|
470
470
|
});
|
|
471
471
|
|
|
472
472
|
it(`sorts the entries a browsing owner would recognise`, () => {
|
|
473
|
-
expect(stateGroupPaths(`config`)).toContain(`.intentic/config/
|
|
473
|
+
expect(stateGroupPaths(`config`)).toContain(`.intentic/config/roles/`);
|
|
474
474
|
expect(stateGroupPaths(`config`)).toContain(`.intentic/config/approvals/`);
|
|
475
475
|
expect(stateGroupPaths(`records`)).toContain(`.intentic/records/sessions/claude/`);
|
|
476
476
|
expect(stateGroupPaths(`records`)).toContain(`.intentic/records/artifacts/`);
|
|
@@ -19,7 +19,7 @@ export interface WorkspaceStateFile extends StateFile {
|
|
|
19
19
|
// Present only on entries with no invalidations.
|
|
20
20
|
readonly why?: string;
|
|
21
21
|
// Whether this entry is tracked by the root repo, so its diff is reviewable in Changes and `git log`. Absent by
|
|
22
|
-
// default; only configuration (settings,
|
|
22
|
+
// default; only configuration (settings, roles, skills, automations, workflow designs, environment overlay,
|
|
23
23
|
// which extensions are on) or authored content whose consequences leave the sandbox (workspace extensions, drafts
|
|
24
24
|
// posted under the owner's name) earns it. Ledgers and bulk content stay out even when `carry`. Narrower than
|
|
25
25
|
// `carry`: `carry` asks whether it moves to a new sandbox, this asks whether a human should review it changing.
|
|
@@ -70,15 +70,15 @@ const STATE_FILES = [
|
|
|
70
70
|
portability: "carry",
|
|
71
71
|
},
|
|
72
72
|
|
|
73
|
-
// Named
|
|
74
|
-
// (
|
|
73
|
+
// Named roles: which connected accounts each speaks for, what a session wearing it may do, where it works
|
|
74
|
+
// (RoleSchema). Invalidates `capabilities` too since a role's account list is read together with the
|
|
75
75
|
// capability catalog. `carry`: a card is a name and ids, never a credential.
|
|
76
|
-
{ path: ".intentic/config/
|
|
76
|
+
{ path: ".intentic/config/roles.json", invalidates: ["roles", "capabilities", "manifests"], portability: "carry", versioned: true },
|
|
77
77
|
|
|
78
78
|
// Named parts of the workspace (AreaSchema), the unit a person's reach is granted in. `carry`: folder names, no
|
|
79
79
|
// credential, and a workspace that moves keeps the shape of its own fences. `versioned` because editing an area
|
|
80
80
|
// changes what people already granted it can see, which is precisely a change a human should review. It stays
|
|
81
|
-
// agent-writable like
|
|
81
|
+
// agent-writable like roles.json, and is safe there for a reason worth stating: a fenced conversation's own
|
|
82
82
|
// fence has to admit `.intentic` before its agent can reach this file, so no fence can widen itself.
|
|
83
83
|
{ path: ".intentic/config/areas.json", invalidates: ["areas", "manifests"], portability: "carry", versioned: true },
|
|
84
84
|
|
|
@@ -468,7 +468,7 @@ const STATE_FILES = [
|
|
|
468
468
|
portability: "secret",
|
|
469
469
|
note: "Webhook, gate and intake URLs are minted fresh on the first read here: re-copy each into its caller's secret store.",
|
|
470
470
|
},
|
|
471
|
-
// The one `identity` entry that opts out of backup: unlike the rows beside it (a name, an id, a
|
|
471
|
+
// The one `identity` entry that opts out of backup: unlike the rows beside it (a name, an id, a tier), these
|
|
472
472
|
// tokens authenticate against this sandbox from outside it, so a copy has no business surviving the sandbox it
|
|
473
473
|
// admits callers to. Re-minted on a new sandbox regardless, so nothing is lost by excluding it.
|
|
474
474
|
{
|
|
@@ -529,11 +529,11 @@ const STATE_FILES = [
|
|
|
529
529
|
// (settings.json's `skills` list); a skill switched off keeps its text here rather than nowhere. `versioned`+
|
|
530
530
|
// `carry`: it changes agent behavior and holds no credential.
|
|
531
531
|
{ path: ".intentic/config/skills/", invalidates: ["skills"], portability: "carry", versioned: true },
|
|
532
|
-
// One folder per
|
|
532
|
+
// One folder per role: its system prompt, skills and tools, laid out as a Claude Code plugin
|
|
533
533
|
// (`.claude-plugin/plugin.json`, `skills/`, `agents/`, `commands/`, `hooks/`, `.mcp.json`) so the runtime's own
|
|
534
|
-
// loader reads it directly. Kept separate from `
|
|
534
|
+
// loader reads it directly. Kept separate from `roles.json` because this is prose and files rather than a
|
|
535
535
|
// diffable record; folding a 20k prompt into JSON would make every edit unreadable.
|
|
536
|
-
{ path: ".intentic/config/
|
|
536
|
+
{ path: ".intentic/config/roles/", invalidates: ["roles"], portability: "carry", versioned: true },
|
|
537
537
|
] as const satisfies readonly WorkspaceStateFile[];
|
|
538
538
|
|
|
539
539
|
export const WORKSPACE_STATE_FILES: readonly WorkspaceStateFile[] = STATE_FILES;
|
|
@@ -554,7 +554,7 @@ export const SEARCHABLE_STATE_PATHS: readonly string[] = WORKSPACE_STATE_FILES.f
|
|
|
554
554
|
// cleanly (every `versioned` and `authored` entry is `carry`), declaring the group separately would be a fourth
|
|
555
555
|
// fact to keep in step.
|
|
556
556
|
export type StateGroup =
|
|
557
|
-
// Reviewed and reviewable: settings,
|
|
557
|
+
// Reviewed and reviewable: settings, roles, skills, approvals, staged docs, environment overlay. Tracked,
|
|
558
558
|
// searchable, backed up, carried. Called `config` even though approvals and staged docs are authored content, not
|
|
559
559
|
// settings, since most members are.
|
|
560
560
|
| "config"
|
|
@@ -707,7 +707,7 @@ export const LOCKED_STATE_ENTRIES: ReadonlySet<string> = new Set([
|
|
|
707
707
|
export const PLAN_DOCUMENTS_DIR = `${STATE_DIR}/records/sessions/claude/plans`;
|
|
708
708
|
|
|
709
709
|
// Where message attachments land: the browser posts to `<this>/<uuid>/<name>` before the message is sent, and the
|
|
710
|
-
// turn reads them back (schemas/agent.ts). The
|
|
710
|
+
// turn reads them back (schemas/agent.ts). The tier floor (protocol/member-reach.ts) keys off this path: attaching is
|
|
711
711
|
// part of sending (a collaborator's grant), writing elsewhere in the workspace is the operating tier's, and both
|
|
712
712
|
// travel through the same upload route.
|
|
713
713
|
export const ATTACHMENTS_DIR = `${STATE_DIR}/records/artifacts/attachments`;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"personas.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/personas.contract.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,gBAAgB;IACzB,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAWJ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAYJ,MAAM;;;;;IAeN,GAAG;;;;;;;;;IAWH,UAAU;;;;;;IAUV,SAAS;;;;;;;;IAUT,SAAS;;;;;;;;IAUT,WAAW;;;;;;CASd,CAAC"}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { procedure } from "../protocol/route-meta.js";
|
|
2
|
-
import { PersonaIdParamSchema, PersonaKitSchema, PersonaPromptSchema, PersonaSchema, PersonaSkillBodySchema, PersonaSkillNameSchema, PersonaSkillSchema, PersonasListSchema, } from "../schemas/personas.js";
|
|
3
|
-
import { OkSchema } from "../schemas/shared.js";
|
|
4
|
-
export const personasContract = {
|
|
5
|
-
list: procedure
|
|
6
|
-
.route({
|
|
7
|
-
method: "GET",
|
|
8
|
-
path: "/personas",
|
|
9
|
-
summary: "The characters an agent can wear",
|
|
10
|
-
description: "Each persona with the connected accounts it speaks for, what a conversation wearing it is allowed to do, and where it works.",
|
|
11
|
-
})
|
|
12
|
-
.meta({ guest: true })
|
|
13
|
-
.output(PersonasListSchema),
|
|
14
|
-
save: procedure
|
|
15
|
-
.route({
|
|
16
|
-
method: "POST",
|
|
17
|
-
path: "/personas",
|
|
18
|
-
summary: "Create or edit a persona",
|
|
19
|
-
description: "Writes the whole card; sending an id that exists edits it. Nothing is connected, installed or spent by saving one, because a persona only records a decision about accounts that already exist. It is stored as a file you can equally well edit by hand, which is why this writes the card whole rather than patching a field: a round trip through a screen should leave a change a reviewer recognises.",
|
|
20
|
-
})
|
|
21
|
-
.input(PersonaSchema)
|
|
22
|
-
.output(OkSchema),
|
|
23
|
-
remove: procedure
|
|
24
|
-
.route({
|
|
25
|
-
method: "DELETE",
|
|
26
|
-
path: "/personas/{id}",
|
|
27
|
-
summary: "Delete a persona",
|
|
28
|
-
description: "Takes away the character, never the accounts: every login it named stays connected. Its own prompt and skills go with it, since a folder nothing can reach is worse than deleting what somebody just asked to delete. Anything still pointed at it goes quiet rather than falling back to speaking as everyone.",
|
|
29
|
-
})
|
|
30
|
-
.input(PersonaIdParamSchema)
|
|
31
|
-
.output(OkSchema),
|
|
32
|
-
kit: procedure
|
|
33
|
-
.route({
|
|
34
|
-
method: "GET",
|
|
35
|
-
path: "/personas/{id}/kit",
|
|
36
|
-
summary: "What one persona carries",
|
|
37
|
-
description: "The instructions this persona is given and the skills only its conversations can reach. A different question from what the agent knows generally, with a different answer.",
|
|
38
|
-
})
|
|
39
|
-
.input(PersonaIdParamSchema)
|
|
40
|
-
.output(PersonaKitSchema),
|
|
41
|
-
savePrompt: procedure
|
|
42
|
-
.route({
|
|
43
|
-
method: "POST",
|
|
44
|
-
path: "/personas/{id}/prompt",
|
|
45
|
-
summary: "Write a persona's instructions",
|
|
46
|
-
description: "Sets what this persona is told. Saving an empty one removes it entirely rather than storing a blank, so the persona simply falls back to the sandbox's own instructions.",
|
|
47
|
-
})
|
|
48
|
-
.input(PersonaPromptSchema)
|
|
49
|
-
.output(OkSchema),
|
|
50
|
-
readSkill: procedure
|
|
51
|
-
.route({
|
|
52
|
-
method: "GET",
|
|
53
|
-
path: "/personas/{id}/skills/read",
|
|
54
|
-
summary: "Read one of a persona's skills",
|
|
55
|
-
description: "The full text of a single skill belonging to this persona.",
|
|
56
|
-
})
|
|
57
|
-
.input(PersonaSkillNameSchema)
|
|
58
|
-
.output(PersonaSkillBodySchema),
|
|
59
|
-
saveSkill: procedure
|
|
60
|
-
.route({
|
|
61
|
-
method: "POST",
|
|
62
|
-
path: "/personas/{id}/skills",
|
|
63
|
-
summary: "Write one of a persona's skills",
|
|
64
|
-
description: "Creates or replaces a skill by name. There is nothing to switch on: a persona's skill is available exactly when that persona is worn, which is what belonging to it has to mean.",
|
|
65
|
-
})
|
|
66
|
-
.input(PersonaSkillSchema)
|
|
67
|
-
.output(OkSchema),
|
|
68
|
-
removeSkill: procedure
|
|
69
|
-
.route({
|
|
70
|
-
method: "POST",
|
|
71
|
-
path: "/personas/{id}/skills/remove",
|
|
72
|
-
summary: "Delete one of a persona's skills",
|
|
73
|
-
description: "Removes a single skill from this persona and leaves the rest of its kit alone.",
|
|
74
|
-
})
|
|
75
|
-
.input(PersonaSkillNameSchema)
|
|
76
|
-
.output(OkSchema),
|
|
77
|
-
};
|
|
78
|
-
//# sourceMappingURL=personas.contract.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"personas.contract.js","sourceRoot":"","sources":["../../src/contracts/personas.contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EACH,oBAAoB,EACpB,gBA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EACP,0KAA0K;KACjL,CAAC;SACD,KAAK,CAAC,mBAAmB,CAAC;SAC1B,MAAM,CAAC,QAAQ,CAAC;IACrB,SAAS,EAAE,SAAS;SACf,KAAK,CAAC;QACH,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,4BAA4B;QAClC,OAAO,EAAE,gCAAgC;QACzC,WAAW,EAAE,4DAA4D;KAC5E,CAAC;SACD,KAAK,CAAC,sBAAsB,CAAC;SAC7B,MAAM,CAAC,sBAAsB,CAAC;IAEnC,SAAS,EAAE,SAAS;SACf,KAAK,CAAC;QACH,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,uBAAuB;QAC7B,OAAO,EAAE,iCAAiC;QAC1C,WAAW,EACP,kLAAkL;KACzL,CAAC;SACD,KAAK,CAAC,kBAAkB,CAAC;SACzB,MAAM,CAAC,QAAQ,CAAC;IACrB,WAAW,EAAE,SAAS;SACjB,KAAK,CAAC;QACH,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,8BAA8B;QACpC,OAAO,EAAE,kCAAkC;QAC3C,WAAW,EAAE,gFAAgF;KAChG,CAAC;SACD,KAAK,CAAC,sBAAsB,CAAC;SAC7B,MAAM,CAAC,QAAQ,CAAC;CACxB,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export interface CapabilityRef {
|
|
2
|
-
readonly id: string;
|
|
3
|
-
readonly kind: string;
|
|
4
|
-
}
|
|
5
|
-
export interface PersonaShelves {
|
|
6
|
-
readonly sandbox: boolean;
|
|
7
|
-
readonly delegate: boolean;
|
|
8
|
-
readonly connectors?: readonly string[] | undefined;
|
|
9
|
-
readonly devices?: readonly string[] | undefined;
|
|
10
|
-
readonly mcp?: readonly string[] | undefined;
|
|
11
|
-
}
|
|
12
|
-
export declare const isSignedInAccount: (kind: string) => boolean;
|
|
13
|
-
export declare const personaAllowsCapability: (capability: CapabilityRef, accounts: readonly string[], shelves: PersonaShelves) => boolean;
|
|
14
|
-
//# sourceMappingURL=persona-capability.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"persona-capability.d.ts","sourceRoot":"","sources":["../../src/policy/persona-capability.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,aAAa;IAC1B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACzB;AAID,MAAM,WAAW,cAAc;IAC3B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;IACpD,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;IACjD,QAAQ,CAAC,GAAG,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;CAChD;AAQD,eAAO,MAAM,iBAAiB,SAAU,MAAM,KAAG,OAAyE,CAAC;AAS3H,eAAO,MAAM,uBAAuB,eAAgB,aAAa,YAAY,SAAS,MAAM,EAAE,WAAW,cAAc,KAAG,OA4BzH,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export const isSignedInAccount = (kind) => kind === "browser" || kind === "identity" || kind === "webext";
|
|
2
|
-
const listed = (list, id) => list === undefined || list.includes(id);
|
|
3
|
-
export const personaAllowsCapability = (capability, accounts, shelves) => {
|
|
4
|
-
switch (capability.kind) {
|
|
5
|
-
case "browser":
|
|
6
|
-
case "identity":
|
|
7
|
-
case "webext":
|
|
8
|
-
return accounts.includes(capability.id);
|
|
9
|
-
case "cli":
|
|
10
|
-
return listed(shelves.connectors, capability.id);
|
|
11
|
-
case "device":
|
|
12
|
-
case "phone":
|
|
13
|
-
return listed(shelves.devices, capability.id);
|
|
14
|
-
case "mcp":
|
|
15
|
-
return listed(shelves.mcp, capability.id);
|
|
16
|
-
case "fleet":
|
|
17
|
-
return shelves.sandbox;
|
|
18
|
-
case "link":
|
|
19
|
-
return shelves.delegate && listed(shelves.devices, capability.id);
|
|
20
|
-
default:
|
|
21
|
-
return true;
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
//# sourceMappingURL=persona-capability.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"persona-capability.js","sourceRoot":"","sources":["../../src/policy/persona-capability.ts"],"names":[],"mappings":"AA0BA,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,IAAY,EAAW,EAAE,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,UAAU,IAAI,IAAI,KAAK,QAAQ,CAAC;AAE3H,MAAM,MAAM,GAAG,CAAC,IAAmC,EAAE,EAAU,EAAW,EAAE,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;AAOrH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,UAAyB,EAAE,QAA2B,EAAE,OAAuB,EAAW,EAAE;IAChI,QAAQ,UAAU,CAAC,IAAI,EAAE,CAAC;QAItB,KAAK,SAAS,CAAC;QACf,KAAK,UAAU,CAAC;QAChB,KAAK,QAAQ;YACT,OAAO,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;QAE5C,KAAK,KAAK;YACN,OAAO,MAAM,CAAC,OAAO,CAAC,UAAU,EAAE,UAAU,CAAC,EAAE,CAAC,CAAC;QAErD,KAAK,QAAQ,CAAC;QACd,KAAK,OAAO;YACR,OAAO,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE,CAAC,CAAC;QAClD,KAAK,KAAK;YACN,OAAO,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,UAAU,CAAC,EAAE,CAAC,CAAC;QAE9C,KAAK,OAAO;YACR,OAAO,OAAO,CAAC,OAAO,CAAC;QAG3B,KAAK,MAAM;YACP,OAAO,OAAO,CAAC,QAAQ,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE,CAAC,CAAC;QACtE;YACI,OAAO,IAAI,CAAC;IACpB,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type Fence } from "./fence-paths.js";
|
|
2
|
-
export interface PersonaPlace {
|
|
3
|
-
readonly workspace?: {
|
|
4
|
-
readonly startIn?: string | undefined;
|
|
5
|
-
readonly folders?: readonly string[] | undefined;
|
|
6
|
-
} | undefined;
|
|
7
|
-
}
|
|
8
|
-
export declare const personaHome: (card: PersonaPlace) => Fence;
|
|
9
|
-
export declare const fenceHoldsPersona: (fence: Fence, card: PersonaPlace) => boolean;
|
|
10
|
-
//# sourceMappingURL=persona-home.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"persona-home.d.ts","sourceRoot":"","sources":["../../src/policy/persona-home.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAe,MAAM,kBAAkB,CAAC;AAS3D,MAAM,WAAW,YAAY;IACzB,QAAQ,CAAC,SAAS,CAAC,EACb;QACI,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QACtC,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;KACpD,GACD,SAAS,CAAC;CACnB;AASD,eAAO,MAAM,WAAW,SAAU,YAAY,KAAG,KAOhD,CAAC;AAMF,eAAO,MAAM,iBAAiB,UAAW,KAAK,QAAQ,YAAY,KAAG,OAAgD,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { fenceCovers } from "./fence-paths.js";
|
|
2
|
-
export const personaHome = (card) => {
|
|
3
|
-
const startIn = card.workspace?.startIn;
|
|
4
|
-
if (startIn !== undefined && startIn !== "") {
|
|
5
|
-
return [startIn];
|
|
6
|
-
}
|
|
7
|
-
const folders = card.workspace?.folders;
|
|
8
|
-
return folders === undefined || folders.length === 0 ? undefined : folders;
|
|
9
|
-
};
|
|
10
|
-
export const fenceHoldsPersona = (fence, card) => fenceCovers(fence, personaHome(card));
|
|
11
|
-
//# sourceMappingURL=persona-home.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"persona-home.js","sourceRoot":"","sources":["../../src/policy/persona-home.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAyB3D,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,IAAkB,EAAS,EAAE;IACrD,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC;IACxC,IAAI,OAAO,KAAK,SAAS,IAAI,OAAO,KAAK,EAAE,EAAE,CAAC;QAC1C,OAAO,CAAC,OAAO,CAAC,CAAC;IACrB,CAAC;IACD,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC;IACxC,OAAO,OAAO,KAAK,SAAS,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC;AAC/E,CAAC,CAAC;AAMF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAAY,EAAE,IAAkB,EAAW,EAAE,CAAC,WAAW,CAAC,KAAK,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"personas.d.ts","sourceRoot":"","sources":["../../src/schemas/personas.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,KAAK,WAAW,EAAc,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,KAAK,QAAQ,EAAkB,MAAM,YAAY,CAAC;AAW3D,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;iBA8C9B,CAAC;AACH,MAAM,MAAM,aA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CAAC,KAAK,CAAC,CAAC;AACtF,MAAM,CAAC,MAAM,sBAAsB,GAAG,oBAAoB,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,eAAe,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;AAEtH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC;IAC9C,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC;IACnD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,4BAA4B,CAAC;CAC1D,CAAC,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const SealOpenProofSchema: z.ZodObject<{
|
|
3
|
-
id: z.ZodString;
|
|
4
|
-
document: z.ZodString;
|
|
5
|
-
assertion: z.ZodObject<{
|
|
6
|
-
id: z.ZodString;
|
|
7
|
-
rawId: z.ZodString;
|
|
8
|
-
type: z.ZodLiteral<"public-key">;
|
|
9
|
-
response: z.ZodObject<{
|
|
10
|
-
clientDataJSON: z.ZodString;
|
|
11
|
-
authenticatorData: z.ZodString;
|
|
12
|
-
signature: z.ZodString;
|
|
13
|
-
userHandle: z.ZodOptional<z.ZodString>;
|
|
14
|
-
}, z.core.$strip>;
|
|
15
|
-
authenticatorAttachment: z.ZodOptional<z.ZodString>;
|
|
16
|
-
clientExtensionResults: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
17
|
-
}, z.core.$strip>;
|
|
18
|
-
}, z.core.$strip>;
|
|
19
|
-
export type SealOpenProof = z.infer<typeof SealOpenProofSchema>;
|
|
20
|
-
//# sourceMappingURL=seal-proof.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"seal-proof.d.ts","sourceRoot":"","sources":["../../src/schemas/seal-proof.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;iBAG9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { SealIdSchema } from "./seal.js";
|
|
3
|
-
import { AuthenticationResponseSchema } from "./system.js";
|
|
4
|
-
export const SealOpenProofSchema = SealIdSchema.extend({
|
|
5
|
-
document: z.string().min(1).max(4096).describe("The document text, byte for byte what the challenge hashed."),
|
|
6
|
-
assertion: AuthenticationResponseSchema,
|
|
7
|
-
});
|
|
8
|
-
//# sourceMappingURL=seal-proof.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"seal-proof.js","sourceRoot":"","sources":["../../src/schemas/seal-proof.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAC;AAE3D,MAAM,CAAC,MAAM,mBAAmB,GAAG,YAAY,CAAC,MAAM,CAAC;IACnD,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,6DAA6D,CAAC;IAC7G,SAAS,EAAE,4BAA4B;CAC1C,CAAC,CAAC"}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { procedure } from "../protocol/route-meta.js";
|
|
2
|
-
import {
|
|
3
|
-
PersonaIdParamSchema,
|
|
4
|
-
PersonaKitSchema,
|
|
5
|
-
PersonaPromptSchema,
|
|
6
|
-
PersonaSchema,
|
|
7
|
-
PersonaSkillBodySchema,
|
|
8
|
-
PersonaSkillNameSchema,
|
|
9
|
-
PersonaSkillSchema,
|
|
10
|
-
PersonasListSchema,
|
|
11
|
-
} from "../schemas/personas.js";
|
|
12
|
-
import { OkSchema } from "../schemas/shared.js";
|
|
13
|
-
|
|
14
|
-
// Named personas (PersonaSchema): accounts each speaks for, what it may do, what it is told. Card CRUD provisions
|
|
15
|
-
// nothing, only a decision about existing accounts. The kit routes below edit its files (prompt, skills only its turns
|
|
16
|
-
// reach) per verb, not one whole-kit PUT, so one skill's edit cannot delete another.
|
|
17
|
-
export const personasContract = {
|
|
18
|
-
list: procedure
|
|
19
|
-
.route({
|
|
20
|
-
method: "GET",
|
|
21
|
-
path: "/personas",
|
|
22
|
-
summary: "The characters an agent can wear",
|
|
23
|
-
description:
|
|
24
|
-
"Each persona with the connected accounts it speaks for, what a conversation wearing it is allowed to do, and where it works.",
|
|
25
|
-
})
|
|
26
|
-
.meta({ guest: true })
|
|
27
|
-
.output(PersonasListSchema),
|
|
28
|
-
// Upsert by id, re-saving the same id edits that card.
|
|
29
|
-
save: procedure
|
|
30
|
-
.route({
|
|
31
|
-
method: "POST",
|
|
32
|
-
path: "/personas",
|
|
33
|
-
summary: "Create or edit a persona",
|
|
34
|
-
description:
|
|
35
|
-
"Writes the whole card; sending an id that exists edits it. Nothing is connected, installed or spent by saving one, because a persona only records a decision about accounts that already exist. It is stored as a file you can equally well edit by hand, which is why this writes the card whole rather than patching a field: a round trip through a screen should leave a change a reviewer recognises.",
|
|
36
|
-
})
|
|
37
|
-
.input(PersonaSchema)
|
|
38
|
-
.output(OkSchema),
|
|
39
|
-
// Never removes the account; an automation pinned to this id resolves as no accounts, and goes quiet.
|
|
40
|
-
// Also deletes the persona's kit folder (prompt + skills), rather than leaving it orphaned on disk.
|
|
41
|
-
remove: procedure
|
|
42
|
-
.route({
|
|
43
|
-
method: "DELETE",
|
|
44
|
-
path: "/personas/{id}",
|
|
45
|
-
summary: "Delete a persona",
|
|
46
|
-
description:
|
|
47
|
-
"Takes away the character, never the accounts: every login it named stays connected. Its own prompt and skills go with it, since a folder nothing can reach is worse than deleting what somebody just asked to delete. Anything still pointed at it goes quiet rather than falling back to speaking as everyone.",
|
|
48
|
-
})
|
|
49
|
-
.input(PersonaIdParamSchema)
|
|
50
|
-
.output(OkSchema),
|
|
51
|
-
|
|
52
|
-
// Which persona a new chat belongs to is answered by `agent.routeChat`, in the same reading that chooses its model.
|
|
53
|
-
|
|
54
|
-
// The kit: what this card is told, and the skills only it reaches.
|
|
55
|
-
|
|
56
|
-
kit: procedure
|
|
57
|
-
.route({
|
|
58
|
-
method: "GET",
|
|
59
|
-
path: "/personas/{id}/kit",
|
|
60
|
-
summary: "What one persona carries",
|
|
61
|
-
description:
|
|
62
|
-
"The instructions this persona is given and the skills only its conversations can reach. A different question from what the agent knows generally, with a different answer.",
|
|
63
|
-
})
|
|
64
|
-
.input(PersonaIdParamSchema)
|
|
65
|
-
.output(PersonaKitSchema),
|
|
66
|
-
// An empty prompt deletes the file rather than storing a blank; it then falls back to the sandbox's own prompt.
|
|
67
|
-
savePrompt: procedure
|
|
68
|
-
.route({
|
|
69
|
-
method: "POST",
|
|
70
|
-
path: "/personas/{id}/prompt",
|
|
71
|
-
summary: "Write a persona's instructions",
|
|
72
|
-
description:
|
|
73
|
-
"Sets what this persona is told. Saving an empty one removes it entirely rather than storing a blank, so the persona simply falls back to the sandbox's own instructions.",
|
|
74
|
-
})
|
|
75
|
-
.input(PersonaPromptSchema)
|
|
76
|
-
.output(OkSchema),
|
|
77
|
-
readSkill: procedure
|
|
78
|
-
.route({
|
|
79
|
-
method: "GET",
|
|
80
|
-
path: "/personas/{id}/skills/read",
|
|
81
|
-
summary: "Read one of a persona's skills",
|
|
82
|
-
description: "The full text of a single skill belonging to this persona.",
|
|
83
|
-
})
|
|
84
|
-
.input(PersonaSkillNameSchema)
|
|
85
|
-
.output(PersonaSkillBodySchema),
|
|
86
|
-
// Upsert by name, no enabled list to write: a kit skill is on exactly when its persona is worn.
|
|
87
|
-
saveSkill: procedure
|
|
88
|
-
.route({
|
|
89
|
-
method: "POST",
|
|
90
|
-
path: "/personas/{id}/skills",
|
|
91
|
-
summary: "Write one of a persona's skills",
|
|
92
|
-
description:
|
|
93
|
-
"Creates or replaces a skill by name. There is nothing to switch on: a persona's skill is available exactly when that persona is worn, which is what belonging to it has to mean.",
|
|
94
|
-
})
|
|
95
|
-
.input(PersonaSkillSchema)
|
|
96
|
-
.output(OkSchema),
|
|
97
|
-
removeSkill: procedure
|
|
98
|
-
.route({
|
|
99
|
-
method: "POST",
|
|
100
|
-
path: "/personas/{id}/skills/remove",
|
|
101
|
-
summary: "Delete one of a persona's skills",
|
|
102
|
-
description: "Removes a single skill from this persona and leaves the rest of its kit alone.",
|
|
103
|
-
})
|
|
104
|
-
.input(PersonaSkillNameSchema)
|
|
105
|
-
.output(OkSchema),
|
|
106
|
-
};
|