@goah/cli 0.13.0 → 0.13.2
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/LICENSE +201 -0
- package/dist/THIRD-PARTY-NOTICES.md +2319 -0
- package/dist/anthropic-messages-WBFOHES5.js +7214 -0
- package/dist/azure-openai-responses-NZFH3PO6.js +253 -0
- package/dist/chunk-25XSBFX6.js +639 -0
- package/dist/chunk-2QBQZGXF.js +110 -0
- package/dist/chunk-2ZP2NBW3.js +345 -0
- package/dist/chunk-4KA63VNZ.js +2 -0
- package/dist/chunk-4M6TXTT5.js +86 -0
- package/dist/chunk-4US7ZHT3.js +20 -0
- package/dist/chunk-6M3OOCKO.js +11809 -0
- package/dist/chunk-7AXAFDPG.js +17 -0
- package/dist/chunk-7E7V6OIU.js +920 -0
- package/dist/chunk-BXA47DTF.js +548 -0
- package/dist/chunk-D2DVAH37.js +25 -0
- package/dist/chunk-FSBUS2BI.js +26 -0
- package/dist/chunk-GKDRAHLI.js +4787 -0
- package/dist/chunk-H462EFJP.js +89 -0
- package/dist/chunk-IIJQ3DW4.js +35 -0
- package/dist/chunk-JQD5EWJY.js +34 -0
- package/dist/chunk-K26BVR6O.js +61 -0
- package/dist/chunk-KAO7WIXG.js +31 -0
- package/dist/chunk-KJ4HJCTK.js +1178 -0
- package/dist/chunk-LBKI23CC.js +9810 -0
- package/dist/chunk-LKBKZEHT.js +41 -0
- package/dist/chunk-MD7TLTXZ.js +18 -0
- package/dist/chunk-MPXK7QBL.js +868 -0
- package/dist/chunk-NRLGWZJC.js +11 -0
- package/dist/chunk-QBD6EJ2Z.js +1746 -0
- package/dist/chunk-R6I3VKME.js +132 -0
- package/dist/chunk-TJON22J4.js +87 -0
- package/dist/chunk-ULY36ME4.js +33097 -0
- package/dist/chunk-XALZLRYK.js +9221 -0
- package/dist/chunk-XPQKM3L7.js +57 -0
- package/dist/chunk-YH6YJ2IB.js +1773 -0
- package/dist/cli.d.ts +0 -2
- package/dist/cli.js +13716 -580
- package/dist/console/assets/{index-Rtc_B7cs.js → index-B1vGMXKr.js} +11 -11
- package/dist/console/assets/{index-Rtc_B7cs.js.map → index-B1vGMXKr.js.map} +1 -1
- package/dist/console/index.html +1 -1
- package/dist/dist-65MDQA4Q.js +1126 -0
- package/dist/dist-KNR2XL6J.js +39 -0
- package/dist/execution.d.ts +557 -2
- package/dist/execution.js +37 -2
- package/dist/faux-runner-worker.js +128 -0
- package/dist/google-generative-ai-YMHXZSFE.js +422 -0
- package/dist/google-vertex-X6DB3ZQ6.js +471 -0
- package/dist/index.d.ts +853 -25
- package/dist/index.js +84 -385
- package/dist/kernel.d.ts +39 -2
- package/dist/kernel.js +21 -2
- package/dist/mistral-conversations-TY3MMD6G.js +718 -0
- package/dist/multipart-parser-F6M4NJZU.js +373 -0
- package/dist/openai-codex-responses-BRDUMLN5.js +1374 -0
- package/dist/openai-completions-CX634XN3.js +1139 -0
- package/dist/openai-responses-HMCXJIHT.js +300 -0
- package/dist/openrouter-images-KTWET2H2.js +148 -0
- package/dist/pi-messages-XL5OEC4K.js +307 -0
- package/dist/pi-worker.js +671 -0
- package/dist/runner-pi.d.ts +342 -2
- package/dist/runner-pi.js +46 -2
- package/dist/runner-registry-GD4BYCQC.js +22 -0
- package/dist/sqlite.d.ts +446 -2
- package/dist/sqlite.js +15 -2
- package/dist/src-F2KBSV4T.js +1398 -0
- package/dist/supervisor.d.ts +625 -2
- package/dist/supervisor.js +39 -2
- package/dist/testkit.d.ts +564 -2
- package/dist/testkit.js +127 -2
- package/dist/transcript.d.ts +84 -2
- package/dist/transcript.js +25 -2
- package/dist/verification-worker.js +72 -0
- package/package.json +2 -26
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/control.d.ts +0 -106
- package/dist/control.d.ts.map +0 -1
- package/dist/control.js +0 -242
- package/dist/control.js.map +0 -1
- package/dist/execution.d.ts.map +0 -1
- package/dist/execution.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/kernel.d.ts.map +0 -1
- package/dist/kernel.js.map +0 -1
- package/dist/live-config.d.ts +0 -10
- package/dist/live-config.d.ts.map +0 -1
- package/dist/live-config.js +0 -44
- package/dist/live-config.js.map +0 -1
- package/dist/prompt-queue.d.ts +0 -13
- package/dist/prompt-queue.d.ts.map +0 -1
- package/dist/prompt-queue.js +0 -35
- package/dist/prompt-queue.js.map +0 -1
- package/dist/runner-pi.d.ts.map +0 -1
- package/dist/runner-pi.js.map +0 -1
- package/dist/runner-registry.d.ts +0 -8
- package/dist/runner-registry.d.ts.map +0 -1
- package/dist/runner-registry.js +0 -12
- package/dist/runner-registry.js.map +0 -1
- package/dist/searchable-select.d.ts +0 -24
- package/dist/searchable-select.d.ts.map +0 -1
- package/dist/searchable-select.js +0 -61
- package/dist/searchable-select.js.map +0 -1
- package/dist/secret-input.d.ts +0 -8
- package/dist/secret-input.d.ts.map +0 -1
- package/dist/secret-input.js +0 -14
- package/dist/secret-input.js.map +0 -1
- package/dist/setup-wizard.d.ts +0 -22
- package/dist/setup-wizard.d.ts.map +0 -1
- package/dist/setup-wizard.js +0 -154
- package/dist/setup-wizard.js.map +0 -1
- package/dist/sqlite.d.ts.map +0 -1
- package/dist/sqlite.js.map +0 -1
- package/dist/supervisor.d.ts.map +0 -1
- package/dist/supervisor.js.map +0 -1
- package/dist/testkit.d.ts.map +0 -1
- package/dist/testkit.js.map +0 -1
- package/dist/thread-inspect.d.ts +0 -47
- package/dist/thread-inspect.d.ts.map +0 -1
- package/dist/thread-inspect.js +0 -78
- package/dist/thread-inspect.js.map +0 -1
- package/dist/transcript.d.ts.map +0 -1
- package/dist/transcript.js.map +0 -1
- package/dist/tui-theme.d.ts +0 -17
- package/dist/tui-theme.d.ts.map +0 -1
- package/dist/tui-theme.js +0 -19
- package/dist/tui-theme.js.map +0 -1
- package/dist/tui.d.ts +0 -24
- package/dist/tui.d.ts.map +0 -1
- package/dist/tui.js +0 -784
- package/dist/tui.js.map +0 -1
- package/dist/update.d.ts +0 -16
- package/dist/update.d.ts.map +0 -1
- package/dist/update.js +0 -67
- package/dist/update.js.map +0 -1
- package/dist/web-console.d.ts +0 -33
- package/dist/web-console.d.ts.map +0 -1
- package/dist/web-console.js +0 -242
- package/dist/web-console.js.map +0 -1
- package/dist/welcome.d.ts +0 -30
- package/dist/welcome.d.ts.map +0 -1
- package/dist/welcome.js +0 -69
- package/dist/welcome.js.map +0 -1
- package/node_modules/goah-ledger-contract/dist/execution.d.ts +0 -544
- package/node_modules/goah-ledger-contract/dist/execution.d.ts.map +0 -1
- package/node_modules/goah-ledger-contract/dist/execution.js +0 -52
- package/node_modules/goah-ledger-contract/dist/execution.js.map +0 -1
- package/node_modules/goah-ledger-contract/dist/index.d.ts +0 -4
- package/node_modules/goah-ledger-contract/dist/index.d.ts.map +0 -1
- package/node_modules/goah-ledger-contract/dist/index.js +0 -4
- package/node_modules/goah-ledger-contract/dist/index.js.map +0 -1
- package/node_modules/goah-ledger-contract/dist/kernel.d.ts +0 -37
- package/node_modules/goah-ledger-contract/dist/kernel.d.ts.map +0 -1
- package/node_modules/goah-ledger-contract/dist/kernel.js +0 -8
- package/node_modules/goah-ledger-contract/dist/kernel.js.map +0 -1
- package/node_modules/goah-ledger-contract/dist/transcript.d.ts +0 -63
- package/node_modules/goah-ledger-contract/dist/transcript.d.ts.map +0 -1
- package/node_modules/goah-ledger-contract/dist/transcript.js +0 -115
- package/node_modules/goah-ledger-contract/dist/transcript.js.map +0 -1
- package/node_modules/goah-ledger-contract/package.json +0 -28
- package/node_modules/goah-ledger-sqlite/dist/index.d.ts +0 -86
- package/node_modules/goah-ledger-sqlite/dist/index.d.ts.map +0 -1
- package/node_modules/goah-ledger-sqlite/dist/index.js +0 -1254
- package/node_modules/goah-ledger-sqlite/dist/index.js.map +0 -1
- package/node_modules/goah-ledger-sqlite/package.json +0 -26
- package/node_modules/goah-runner-pi/dist/configurator.d.ts +0 -20
- package/node_modules/goah-runner-pi/dist/configurator.d.ts.map +0 -1
- package/node_modules/goah-runner-pi/dist/configurator.js +0 -423
- package/node_modules/goah-runner-pi/dist/configurator.js.map +0 -1
- package/node_modules/goah-runner-pi/dist/credential-store.d.ts +0 -14
- package/node_modules/goah-runner-pi/dist/credential-store.d.ts.map +0 -1
- package/node_modules/goah-runner-pi/dist/credential-store.js +0 -163
- package/node_modules/goah-runner-pi/dist/credential-store.js.map +0 -1
- package/node_modules/goah-runner-pi/dist/env-spec.d.ts +0 -17
- package/node_modules/goah-runner-pi/dist/env-spec.d.ts.map +0 -1
- package/node_modules/goah-runner-pi/dist/env-spec.js +0 -95
- package/node_modules/goah-runner-pi/dist/env-spec.js.map +0 -1
- package/node_modules/goah-runner-pi/dist/index.d.ts +0 -76
- package/node_modules/goah-runner-pi/dist/index.d.ts.map +0 -1
- package/node_modules/goah-runner-pi/dist/index.js +0 -326
- package/node_modules/goah-runner-pi/dist/index.js.map +0 -1
- package/node_modules/goah-runner-pi/dist/model-provider.d.ts +0 -30
- package/node_modules/goah-runner-pi/dist/model-provider.d.ts.map +0 -1
- package/node_modules/goah-runner-pi/dist/model-provider.js +0 -96
- package/node_modules/goah-runner-pi/dist/model-provider.js.map +0 -1
- package/node_modules/goah-runner-pi/dist/pi-worker.d.ts +0 -31
- package/node_modules/goah-runner-pi/dist/pi-worker.d.ts.map +0 -1
- package/node_modules/goah-runner-pi/dist/pi-worker.js +0 -579
- package/node_modules/goah-runner-pi/dist/pi-worker.js.map +0 -1
- package/node_modules/goah-runner-pi/dist/steering-no-ack.test-fixture.d.ts +0 -2
- package/node_modules/goah-runner-pi/dist/steering-no-ack.test-fixture.d.ts.map +0 -1
- package/node_modules/goah-runner-pi/dist/steering-no-ack.test-fixture.js +0 -3
- package/node_modules/goah-runner-pi/dist/steering-no-ack.test-fixture.js.map +0 -1
- package/node_modules/goah-runner-pi/dist/steering-reject.test-fixture.d.ts +0 -2
- package/node_modules/goah-runner-pi/dist/steering-reject.test-fixture.d.ts.map +0 -1
- package/node_modules/goah-runner-pi/dist/steering-reject.test-fixture.js +0 -5
- package/node_modules/goah-runner-pi/dist/steering-reject.test-fixture.js.map +0 -1
- package/node_modules/goah-runner-pi/dist/steering-worker.test-fixture.d.ts +0 -2
- package/node_modules/goah-runner-pi/dist/steering-worker.test-fixture.d.ts.map +0 -1
- package/node_modules/goah-runner-pi/dist/steering-worker.test-fixture.js +0 -5
- package/node_modules/goah-runner-pi/dist/steering-worker.test-fixture.js.map +0 -1
- package/node_modules/goah-runner-pi/dist/test-helpers.d.ts +0 -4
- package/node_modules/goah-runner-pi/dist/test-helpers.d.ts.map +0 -1
- package/node_modules/goah-runner-pi/dist/test-helpers.js +0 -13
- package/node_modules/goah-runner-pi/dist/test-helpers.js.map +0 -1
- package/node_modules/goah-runner-pi/dist/verification-worker.d.ts +0 -2
- package/node_modules/goah-runner-pi/dist/verification-worker.d.ts.map +0 -1
- package/node_modules/goah-runner-pi/dist/verification-worker.js +0 -46
- package/node_modules/goah-runner-pi/dist/verification-worker.js.map +0 -1
- package/node_modules/goah-runner-pi/package.json +0 -28
- package/node_modules/goah-supervisor/dist/context-view.d.ts +0 -30
- package/node_modules/goah-supervisor/dist/context-view.d.ts.map +0 -1
- package/node_modules/goah-supervisor/dist/context-view.js +0 -58
- package/node_modules/goah-supervisor/dist/context-view.js.map +0 -1
- package/node_modules/goah-supervisor/dist/index.d.ts +0 -96
- package/node_modules/goah-supervisor/dist/index.d.ts.map +0 -1
- package/node_modules/goah-supervisor/dist/index.js +0 -1075
- package/node_modules/goah-supervisor/dist/index.js.map +0 -1
- package/node_modules/goah-supervisor/dist/roles.d.ts +0 -4
- package/node_modules/goah-supervisor/dist/roles.d.ts.map +0 -1
- package/node_modules/goah-supervisor/dist/roles.js +0 -29
- package/node_modules/goah-supervisor/dist/roles.js.map +0 -1
- package/node_modules/goah-supervisor/dist/verification.d.ts +0 -61
- package/node_modules/goah-supervisor/dist/verification.d.ts.map +0 -1
- package/node_modules/goah-supervisor/dist/verification.js +0 -135
- package/node_modules/goah-supervisor/dist/verification.js.map +0 -1
- package/node_modules/goah-supervisor/package.json +0 -26
- package/node_modules/goah-testkit/dist/faux-runner-worker.d.ts +0 -2
- package/node_modules/goah-testkit/dist/faux-runner-worker.d.ts.map +0 -1
- package/node_modules/goah-testkit/dist/faux-runner-worker.js +0 -82
- package/node_modules/goah-testkit/dist/faux-runner-worker.js.map +0 -1
- package/node_modules/goah-testkit/dist/index.d.ts +0 -49
- package/node_modules/goah-testkit/dist/index.d.ts.map +0 -1
- package/node_modules/goah-testkit/dist/index.js +0 -96
- package/node_modules/goah-testkit/dist/index.js.map +0 -1
- package/node_modules/goah-testkit/package.json +0 -29
package/dist/supervisor.d.ts
CHANGED
|
@@ -1,2 +1,625 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
type JsonPrimitive = string | number | boolean | null;
|
|
2
|
+
type JsonValue = JsonPrimitive | JsonValue[] | {
|
|
3
|
+
[key: string]: JsonValue;
|
|
4
|
+
};
|
|
5
|
+
/** One append request. Sequence numbers are assigned by the ledger. */
|
|
6
|
+
interface EventInput {
|
|
7
|
+
streamId: string;
|
|
8
|
+
ts: string;
|
|
9
|
+
actor: string;
|
|
10
|
+
type: string;
|
|
11
|
+
data: JsonValue;
|
|
12
|
+
/** An unfamiliar reader may skip this event without changing replay semantics. */
|
|
13
|
+
ignorable?: true;
|
|
14
|
+
}
|
|
15
|
+
/** One immutable fact in the global ledger and in one logical stream. */
|
|
16
|
+
interface EventRecord extends EventInput {
|
|
17
|
+
seq: number;
|
|
18
|
+
streamSeq: number;
|
|
19
|
+
}
|
|
20
|
+
interface EventStore {
|
|
21
|
+
appendEvent(input: EventInput): EventRecord;
|
|
22
|
+
appendEvents(inputs: EventInput[]): EventRecord[];
|
|
23
|
+
readStream(streamId: string, fromStreamSeq?: number): EventRecord[];
|
|
24
|
+
eventsSince(seq: number, types?: string[]): EventRecord[];
|
|
25
|
+
events(): EventRecord[];
|
|
26
|
+
}
|
|
27
|
+
interface Clock {
|
|
28
|
+
now(): Date;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
type WakeStatus = "queued" | "claimed" | "consumed" | "cancelled";
|
|
32
|
+
type WakeTriggerStatus = "pending" | "resolved";
|
|
33
|
+
type ScheduleStatus = "pending" | "consumed" | "cancelled" | "superseded";
|
|
34
|
+
type GoalPhase = "active" | "paused" | "blocked" | "complete";
|
|
35
|
+
type TurnStatus = "in_progress" | "completed" | "failed" | "interrupted";
|
|
36
|
+
type TurnTriggerKind = "user_message" | "wake";
|
|
37
|
+
type SpecialistRole = "verifier" | "audit";
|
|
38
|
+
type AgentRole = "child" | "ceo" | "verifier" | "audit";
|
|
39
|
+
type AutomaticTarget = {
|
|
40
|
+
targetKind: "goal";
|
|
41
|
+
agent: string;
|
|
42
|
+
goalId: string;
|
|
43
|
+
specialistRole: null;
|
|
44
|
+
} | {
|
|
45
|
+
targetKind: "specialist";
|
|
46
|
+
agent: string;
|
|
47
|
+
goalId: null;
|
|
48
|
+
specialistRole: SpecialistRole;
|
|
49
|
+
};
|
|
50
|
+
type MailRoute = {
|
|
51
|
+
routeKind: "goal";
|
|
52
|
+
goalId: string;
|
|
53
|
+
specialistRole: null;
|
|
54
|
+
} | {
|
|
55
|
+
routeKind: "human_inbox";
|
|
56
|
+
goalId: null;
|
|
57
|
+
specialistRole: null;
|
|
58
|
+
} | {
|
|
59
|
+
routeKind: "human_request";
|
|
60
|
+
goalId: null;
|
|
61
|
+
specialistRole: null;
|
|
62
|
+
} | {
|
|
63
|
+
routeKind: "specialist_inbox";
|
|
64
|
+
goalId: null;
|
|
65
|
+
specialistRole: SpecialistRole;
|
|
66
|
+
};
|
|
67
|
+
type TurnItemType = "user_message" | "assistant_message" | "reasoning" | "tool_call" | "tool_result" | "plan" | "handoff";
|
|
68
|
+
type TurnItemStatus = "in_progress" | "completed" | "failed";
|
|
69
|
+
interface ThreadSnapshot {
|
|
70
|
+
id: string;
|
|
71
|
+
agent: string;
|
|
72
|
+
role: AgentRole;
|
|
73
|
+
parentThreadId: string | null;
|
|
74
|
+
createdAt: string;
|
|
75
|
+
updatedAt: string;
|
|
76
|
+
}
|
|
77
|
+
interface GoalCommitment {
|
|
78
|
+
goalId: string;
|
|
79
|
+
goalRevision: number;
|
|
80
|
+
}
|
|
81
|
+
type TurnSnapshot = {
|
|
82
|
+
id: string;
|
|
83
|
+
threadId: string;
|
|
84
|
+
triggerKind: TurnTriggerKind;
|
|
85
|
+
goalId: string | null;
|
|
86
|
+
goalRevision: number | null;
|
|
87
|
+
status: TurnStatus;
|
|
88
|
+
attempt: number;
|
|
89
|
+
error: JsonValue | null;
|
|
90
|
+
startedAt: string;
|
|
91
|
+
endedAt: string | null;
|
|
92
|
+
leaseUntil: string | null;
|
|
93
|
+
leaseToken: string | null;
|
|
94
|
+
runnerPid: number | null;
|
|
95
|
+
runnerProfileId?: string;
|
|
96
|
+
};
|
|
97
|
+
interface TurnItemSnapshot {
|
|
98
|
+
id: string;
|
|
99
|
+
turnId: string;
|
|
100
|
+
ordinal: number;
|
|
101
|
+
type: TurnItemType;
|
|
102
|
+
status: TurnItemStatus;
|
|
103
|
+
data: JsonValue;
|
|
104
|
+
createdAt: string;
|
|
105
|
+
completedAt: string | null;
|
|
106
|
+
}
|
|
107
|
+
interface GoalSnapshot {
|
|
108
|
+
id: string;
|
|
109
|
+
parentId: string | null;
|
|
110
|
+
objective: string;
|
|
111
|
+
observationMethod: string | null;
|
|
112
|
+
verificationMethod: string | null;
|
|
113
|
+
owner: string;
|
|
114
|
+
phase: GoalPhase;
|
|
115
|
+
revision: number;
|
|
116
|
+
}
|
|
117
|
+
type GoalChangeOperation = "create" | "revise" | "pause" | "resume" | "block" | "complete" | "reassign";
|
|
118
|
+
type GoalChangeAuthority = {
|
|
119
|
+
kind: "human";
|
|
120
|
+
} | {
|
|
121
|
+
kind: "parent_goal";
|
|
122
|
+
goalId: string;
|
|
123
|
+
goalRevision: number;
|
|
124
|
+
} | {
|
|
125
|
+
kind: "system";
|
|
126
|
+
reason: string;
|
|
127
|
+
};
|
|
128
|
+
interface GoalChangeMetadata {
|
|
129
|
+
operation: GoalChangeOperation;
|
|
130
|
+
reason: string;
|
|
131
|
+
evidence: number[];
|
|
132
|
+
authority?: GoalChangeAuthority;
|
|
133
|
+
sourceTurnId?: string;
|
|
134
|
+
sourceWakeId?: string;
|
|
135
|
+
idempotencyKey?: string;
|
|
136
|
+
}
|
|
137
|
+
interface WorkRecordSnapshot {
|
|
138
|
+
goalId: string;
|
|
139
|
+
recordRevision: number;
|
|
140
|
+
goalRevision: number;
|
|
141
|
+
content: string;
|
|
142
|
+
updatedBy: string;
|
|
143
|
+
updatedInTurn: string;
|
|
144
|
+
sourceWakeId: string | null;
|
|
145
|
+
updatedAt: string;
|
|
146
|
+
reason: string;
|
|
147
|
+
evidence: number[];
|
|
148
|
+
lastEventSeq: number;
|
|
149
|
+
}
|
|
150
|
+
interface WorkRecordUpdateRequest {
|
|
151
|
+
goalId: string;
|
|
152
|
+
expectedRevision: number;
|
|
153
|
+
goalRevision: number;
|
|
154
|
+
content: string;
|
|
155
|
+
reason: string;
|
|
156
|
+
evidence: number[];
|
|
157
|
+
turnId: string;
|
|
158
|
+
sourceWakeId?: string;
|
|
159
|
+
}
|
|
160
|
+
interface WorkRecordDiff {
|
|
161
|
+
goalId: string;
|
|
162
|
+
fromRevision: number;
|
|
163
|
+
toRevision: number;
|
|
164
|
+
text: string;
|
|
165
|
+
}
|
|
166
|
+
type ScheduleSnapshot = AutomaticTarget & {
|
|
167
|
+
id: string;
|
|
168
|
+
nextWakeAt: string;
|
|
169
|
+
reason: string;
|
|
170
|
+
setBy: string;
|
|
171
|
+
status: ScheduleStatus;
|
|
172
|
+
resolvedAt: string | null;
|
|
173
|
+
};
|
|
174
|
+
type WakeSnapshot = AutomaticTarget & {
|
|
175
|
+
id: string;
|
|
176
|
+
/** Initial trigger retained for display and provenance. Runtime decisions use WakeTriggerSnapshot. */
|
|
177
|
+
triggerRef: string;
|
|
178
|
+
status: WakeStatus;
|
|
179
|
+
attempt: number;
|
|
180
|
+
enqueuedSeq: number;
|
|
181
|
+
claimedAt: string | null;
|
|
182
|
+
consumedAt: string | null;
|
|
183
|
+
turnId: string | null;
|
|
184
|
+
};
|
|
185
|
+
interface WakeTriggerSnapshot {
|
|
186
|
+
wakeId: string;
|
|
187
|
+
agent: string;
|
|
188
|
+
triggerRef: string;
|
|
189
|
+
source: "goal" | "system";
|
|
190
|
+
status: WakeTriggerStatus;
|
|
191
|
+
addedAt: string;
|
|
192
|
+
resolvedAt: string | null;
|
|
193
|
+
}
|
|
194
|
+
type MailLevel = "fyi" | "decision" | "emergency";
|
|
195
|
+
type MailSnapshot = MailRoute & {
|
|
196
|
+
id: string;
|
|
197
|
+
to: string;
|
|
198
|
+
from: string;
|
|
199
|
+
level: MailLevel;
|
|
200
|
+
body: JsonValue;
|
|
201
|
+
readAt: string | null;
|
|
202
|
+
};
|
|
203
|
+
interface DelegationRequest {
|
|
204
|
+
id: string;
|
|
205
|
+
parentGoalId: string;
|
|
206
|
+
expectedParentRevision: number;
|
|
207
|
+
childGoal: {
|
|
208
|
+
id: string;
|
|
209
|
+
objective: string;
|
|
210
|
+
observationMethod: string;
|
|
211
|
+
verificationMethod: string;
|
|
212
|
+
owner: string;
|
|
213
|
+
};
|
|
214
|
+
brief: JsonValue;
|
|
215
|
+
reason: string;
|
|
216
|
+
evidence: number[];
|
|
217
|
+
sourceTurnId?: string;
|
|
218
|
+
}
|
|
219
|
+
interface DelegationResult {
|
|
220
|
+
delegationId: string;
|
|
221
|
+
goal: GoalSnapshot;
|
|
222
|
+
mail: MailSnapshot;
|
|
223
|
+
wake: WakeSnapshot;
|
|
224
|
+
}
|
|
225
|
+
interface ReassignmentRequest {
|
|
226
|
+
id: string;
|
|
227
|
+
goalId: string;
|
|
228
|
+
expectedGoalRevision: number;
|
|
229
|
+
newOwner: string;
|
|
230
|
+
brief: JsonValue;
|
|
231
|
+
reason: string;
|
|
232
|
+
evidence: number[];
|
|
233
|
+
sourceTurnId?: string;
|
|
234
|
+
}
|
|
235
|
+
interface ReassignmentResult {
|
|
236
|
+
reassignmentId: string;
|
|
237
|
+
goal: GoalSnapshot;
|
|
238
|
+
mail: MailSnapshot[];
|
|
239
|
+
wake: WakeSnapshot | null;
|
|
240
|
+
}
|
|
241
|
+
interface GoalCompletionRequest {
|
|
242
|
+
goalId: string;
|
|
243
|
+
revision: number;
|
|
244
|
+
reason: string;
|
|
245
|
+
evidence: number[];
|
|
246
|
+
sourceTurnId?: string;
|
|
247
|
+
}
|
|
248
|
+
type TeamMemberMotion = "running" | "queued" | "scheduled" | "idle" | "retired";
|
|
249
|
+
interface TeamMemberView {
|
|
250
|
+
agent: string;
|
|
251
|
+
goalIds: string[];
|
|
252
|
+
motion: TeamMemberMotion;
|
|
253
|
+
lastOutcome: GoalOutcome | null;
|
|
254
|
+
lastHandoffSeq: number | null;
|
|
255
|
+
lastWakeStatus: WakeStatus | null;
|
|
256
|
+
nextWakeAt: string | null;
|
|
257
|
+
}
|
|
258
|
+
type GoalOutcome = "progress" | "waiting" | "blocked" | "completion_proposed";
|
|
259
|
+
interface AgentHandoff {
|
|
260
|
+
outcome: GoalOutcome;
|
|
261
|
+
evidence: number[];
|
|
262
|
+
}
|
|
263
|
+
interface GoalHandoff extends AgentHandoff {
|
|
264
|
+
goalId: string;
|
|
265
|
+
goalRevision: number;
|
|
266
|
+
recordRevision: number;
|
|
267
|
+
}
|
|
268
|
+
interface TurnOutput {
|
|
269
|
+
validationAttemptId: number;
|
|
270
|
+
validationToken: string;
|
|
271
|
+
handoff: AgentHandoff;
|
|
272
|
+
}
|
|
273
|
+
interface CommittedTurnOutput {
|
|
274
|
+
handoff: GoalHandoff;
|
|
275
|
+
}
|
|
276
|
+
interface RunnerTraceEvent {
|
|
277
|
+
type: string;
|
|
278
|
+
data: JsonValue;
|
|
279
|
+
}
|
|
280
|
+
type AgentCapability = "ledger.search" | "mail.send" | "schedule.set" | "goal.put" | "team.list" | "goal.get" | "goal.create" | "goal.work" | "goal.delegate" | "goal.reassign" | "goal.revise" | "goal.pause" | "goal.resume" | "goal.complete" | "human.request" | "work_record.list" | "work_record.read" | "work_record.history" | "work_record.diff" | "work_record.search" | "work_record.update" | "memory.append";
|
|
281
|
+
type RunnerControlMethod = "goal.handoff.validate";
|
|
282
|
+
type RunnerRpcMethod = AgentCapability | RunnerControlMethod;
|
|
283
|
+
interface RunnerProfile {
|
|
284
|
+
id: string;
|
|
285
|
+
runner: string;
|
|
286
|
+
config: JsonValue;
|
|
287
|
+
credentialRefs?: string[];
|
|
288
|
+
}
|
|
289
|
+
interface AgentProfile {
|
|
290
|
+
agent: string;
|
|
291
|
+
role: AgentRole;
|
|
292
|
+
capabilities?: AgentCapability[];
|
|
293
|
+
systemPrompt?: string;
|
|
294
|
+
runnerProfile?: string;
|
|
295
|
+
}
|
|
296
|
+
type TurnTrigger = {
|
|
297
|
+
kind: "user_message";
|
|
298
|
+
} | {
|
|
299
|
+
kind: "wake";
|
|
300
|
+
reasons: string[];
|
|
301
|
+
};
|
|
302
|
+
interface TurnContext {
|
|
303
|
+
trigger: TurnTrigger;
|
|
304
|
+
activeGoal: GoalSnapshot | null;
|
|
305
|
+
goalCommitment: GoalCommitment | null;
|
|
306
|
+
}
|
|
307
|
+
interface AssistantResponse {
|
|
308
|
+
content: string;
|
|
309
|
+
}
|
|
310
|
+
interface RunRequest {
|
|
311
|
+
agent: string;
|
|
312
|
+
execution: TurnSnapshot;
|
|
313
|
+
sourceWake?: WakeSnapshot;
|
|
314
|
+
sourceWakeTriggers?: WakeTriggerSnapshot[];
|
|
315
|
+
turn: TurnContext;
|
|
316
|
+
context: JsonValue;
|
|
317
|
+
now(): string;
|
|
318
|
+
emit(event: RunnerTraceEvent): void;
|
|
319
|
+
rpc?(method: RunnerRpcMethod, params: JsonValue): Promise<JsonValue>;
|
|
320
|
+
}
|
|
321
|
+
type RunnerCandidateResult = {
|
|
322
|
+
outcome: "completed";
|
|
323
|
+
response: AssistantResponse;
|
|
324
|
+
handoff?: TurnOutput;
|
|
325
|
+
} | {
|
|
326
|
+
outcome: "abnormal";
|
|
327
|
+
reason: string;
|
|
328
|
+
};
|
|
329
|
+
interface RunnerHandle {
|
|
330
|
+
pid: number | null;
|
|
331
|
+
begin(): void;
|
|
332
|
+
result: Promise<RunnerCandidateResult>;
|
|
333
|
+
steer?(message: string): Promise<void>;
|
|
334
|
+
terminate(): Promise<void>;
|
|
335
|
+
}
|
|
336
|
+
interface Runner {
|
|
337
|
+
readonly isolation: "process";
|
|
338
|
+
prepare(request: RunRequest): RunnerHandle;
|
|
339
|
+
terminateProcess(pid: number, runnerProfileId?: string): Promise<void>;
|
|
340
|
+
}
|
|
341
|
+
interface HandoffCommit {
|
|
342
|
+
agent: string;
|
|
343
|
+
turnId: string;
|
|
344
|
+
sourceWakeId: string | null;
|
|
345
|
+
mailIds: string[];
|
|
346
|
+
ts: string;
|
|
347
|
+
output: CommittedTurnOutput;
|
|
348
|
+
responseItemId: string;
|
|
349
|
+
item: TurnItemSnapshot;
|
|
350
|
+
}
|
|
351
|
+
interface HumanTurnAdmissionRequest {
|
|
352
|
+
thread: ThreadSnapshot;
|
|
353
|
+
turn: TurnSnapshot;
|
|
354
|
+
messageItem: TurnItemSnapshot;
|
|
355
|
+
replaceTurnId: string | null;
|
|
356
|
+
rootGoal?: GoalSnapshot;
|
|
357
|
+
}
|
|
358
|
+
interface HumanTurnAdmissionResult {
|
|
359
|
+
turn: TurnSnapshot;
|
|
360
|
+
replacedTurn: TurnSnapshot | null;
|
|
361
|
+
goal: GoalSnapshot | null;
|
|
362
|
+
}
|
|
363
|
+
/** Standard execution modules composed on top of the generic event store. */
|
|
364
|
+
interface Ledger extends EventStore {
|
|
365
|
+
putThread(thread: ThreadSnapshot, actor: string): EventRecord;
|
|
366
|
+
putTurn(turn: TurnSnapshot, actor: string): EventRecord;
|
|
367
|
+
admitHumanTurn(request: HumanTurnAdmissionRequest): HumanTurnAdmissionResult;
|
|
368
|
+
commitTurnToGoal(turnId: string, goal: GoalCommitment, actor: string): TurnSnapshot;
|
|
369
|
+
putTurnItem(item: TurnItemSnapshot, actor: string): EventRecord;
|
|
370
|
+
thread(id: string): ThreadSnapshot | null;
|
|
371
|
+
threads(): ThreadSnapshot[];
|
|
372
|
+
turn(id: string): TurnSnapshot | null;
|
|
373
|
+
turns(threadId?: string): TurnSnapshot[];
|
|
374
|
+
turnItems(turnId: string): TurnItemSnapshot[];
|
|
375
|
+
activeTurn(threadId: string): TurnSnapshot | null;
|
|
376
|
+
putGoal(goal: GoalSnapshot, actor: string, wakeId?: string, change?: GoalChangeMetadata): EventRecord;
|
|
377
|
+
updateWorkRecord(request: WorkRecordUpdateRequest, actor: string): WorkRecordSnapshot;
|
|
378
|
+
commitDelegation(request: DelegationRequest, actor: string, wakeId?: string): DelegationResult;
|
|
379
|
+
commitReassignment(request: ReassignmentRequest, actor: string, wakeId?: string): ReassignmentResult;
|
|
380
|
+
completeGoal(request: GoalCompletionRequest, actor: string, wakeId?: string): GoalSnapshot;
|
|
381
|
+
putSchedule(schedule: ScheduleSnapshot, actor: string, wakeId?: string): EventRecord;
|
|
382
|
+
consumeSchedule(id: string, wake: WakeSnapshot, now: string): {
|
|
383
|
+
schedule: ScheduleSnapshot;
|
|
384
|
+
wake: WakeSnapshot;
|
|
385
|
+
};
|
|
386
|
+
cancelSchedule(id: string, now: string): ScheduleSnapshot;
|
|
387
|
+
supersedeSchedule(id: string, now: string): ScheduleSnapshot;
|
|
388
|
+
enqueueWake(wake: WakeSnapshot, actor: string): {
|
|
389
|
+
event: EventRecord;
|
|
390
|
+
created: boolean;
|
|
391
|
+
};
|
|
392
|
+
addWakeTrigger(wakeId: string, triggerRef: string, actor: string): WakeTriggerSnapshot;
|
|
393
|
+
claimNextWake(now: string): WakeSnapshot | null;
|
|
394
|
+
startTurnFromWake(id: string, turn: TurnSnapshot, now: string): WakeSnapshot;
|
|
395
|
+
releaseWake(id: string, now: string): WakeSnapshot;
|
|
396
|
+
cancelWake(id: string, now: string): WakeSnapshot;
|
|
397
|
+
attachTurnProcess(id: string, leaseToken: string, pid: number): TurnSnapshot;
|
|
398
|
+
renewTurnLease(id: string, leaseToken: string, leaseUntil: string, now: string): TurnSnapshot;
|
|
399
|
+
appendTurnEvent(input: EventInput, leaseToken: string): EventRecord;
|
|
400
|
+
repairTurnAttempt(id: string, reason: string, now: string, actor: string): TurnItemSnapshot[];
|
|
401
|
+
finishTurn(id: string, status: "completed" | "failed" | "interrupted", error: JsonValue | null, now: string, actor: string, mailIds?: string[]): TurnSnapshot;
|
|
402
|
+
releaseTurnProcess(id: string, actor: string): TurnSnapshot;
|
|
403
|
+
putMail(mail: MailSnapshot, actor: string, wakeId?: string): EventRecord;
|
|
404
|
+
putMails(mail: MailSnapshot[], actor: string, wakeId?: string): EventRecord[];
|
|
405
|
+
commitHandoff(commit: HandoffCommit): EventRecord;
|
|
406
|
+
dueSchedules(now: string): ScheduleSnapshot[];
|
|
407
|
+
unreadMail(agent: string): MailSnapshot[];
|
|
408
|
+
lastEvent(actor: string, type: string): EventRecord | null;
|
|
409
|
+
lastGoalHandoff(goalId: string): EventRecord | null;
|
|
410
|
+
latestEvent(): EventRecord | null;
|
|
411
|
+
eventsForWake(wakeId: string): EventRecord[];
|
|
412
|
+
wake(id: string): WakeSnapshot | null;
|
|
413
|
+
wakeByTrigger(agent: string, triggerRef: string): WakeSnapshot | null;
|
|
414
|
+
wakeTriggers(wakeId: string): WakeTriggerSnapshot[];
|
|
415
|
+
wakeTriggersForAgent(agent: string): WakeTriggerSnapshot[];
|
|
416
|
+
queuedWakeForAgent(agent: string): WakeSnapshot | null;
|
|
417
|
+
goalsForOwner(owner: string): GoalSnapshot[];
|
|
418
|
+
goal(id: string): GoalSnapshot | null;
|
|
419
|
+
workRecord(goalId: string): WorkRecordSnapshot | null;
|
|
420
|
+
workRecordHistory(goalId: string): WorkRecordSnapshot[];
|
|
421
|
+
workRecordDiff(goalId: string, fromRevision: number, toRevision: number): WorkRecordDiff;
|
|
422
|
+
searchWorkRecords(query: string, limit?: number): WorkRecordSnapshot[];
|
|
423
|
+
triggeringMail(): MailSnapshot[];
|
|
424
|
+
searchEvents(query: string, limit?: number): EventRecord[];
|
|
425
|
+
goals(): GoalSnapshot[];
|
|
426
|
+
workRecords(): WorkRecordSnapshot[];
|
|
427
|
+
schedules(): ScheduleSnapshot[];
|
|
428
|
+
wakes(): WakeSnapshot[];
|
|
429
|
+
mailbox(): MailSnapshot[];
|
|
430
|
+
rebuildProjections(): void;
|
|
431
|
+
close(): void;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
interface ActiveContextView {
|
|
435
|
+
role: AgentRole;
|
|
436
|
+
capabilities: AgentCapability[];
|
|
437
|
+
systemPrompt: string;
|
|
438
|
+
text: string;
|
|
439
|
+
sourceSeqs: number[];
|
|
440
|
+
}
|
|
441
|
+
interface ActiveContextInput {
|
|
442
|
+
role: AgentRole;
|
|
443
|
+
capabilities: AgentCapability[];
|
|
444
|
+
systemPrompt: string;
|
|
445
|
+
wake: Pick<WakeSnapshot, "attempt"> & Partial<WakeSnapshot>;
|
|
446
|
+
wakeTriggers: WakeTriggerSnapshot[];
|
|
447
|
+
goals: GoalSnapshot[];
|
|
448
|
+
mail: MailSnapshot[];
|
|
449
|
+
lastHandoff: EventRecord | null;
|
|
450
|
+
teamHandoffs: EventRecord[];
|
|
451
|
+
team: TeamMemberView[];
|
|
452
|
+
recoveryEvents: EventRecord[];
|
|
453
|
+
/** Durable agent-owned working-memory facts; injected as a bounded advisory tail. */
|
|
454
|
+
workingMemory?: readonly EventRecord[];
|
|
455
|
+
}
|
|
456
|
+
/** Keep recovery actionable and bounded; raw Turn transcript remains queryable in the ledger. */
|
|
457
|
+
declare function selectRecoveryEvents(events: EventRecord[]): EventRecord[];
|
|
458
|
+
/** Deterministically render structured projections into the model's short working set. */
|
|
459
|
+
declare function composeActiveContext(input: ActiveContextInput): ActiveContextView;
|
|
460
|
+
|
|
461
|
+
interface VerificationFinding {
|
|
462
|
+
id: string;
|
|
463
|
+
body: JsonValue;
|
|
464
|
+
evidence: number[];
|
|
465
|
+
riskWeight: number;
|
|
466
|
+
}
|
|
467
|
+
interface VerificationResult {
|
|
468
|
+
findings: VerificationFinding[];
|
|
469
|
+
tokensUsed: number;
|
|
470
|
+
}
|
|
471
|
+
interface VerifierModel {
|
|
472
|
+
verifyTurn(input: {
|
|
473
|
+
turnId: string;
|
|
474
|
+
handoff: JsonValue | null;
|
|
475
|
+
trace: EventRecord[];
|
|
476
|
+
}): Promise<VerificationResult>;
|
|
477
|
+
blindAudit(facts: EventRecord[]): Promise<VerificationResult>;
|
|
478
|
+
}
|
|
479
|
+
interface VerifierProcessSpec {
|
|
480
|
+
command: string;
|
|
481
|
+
args: string[];
|
|
482
|
+
env?: Record<string, string>;
|
|
483
|
+
timeoutMs?: number;
|
|
484
|
+
}
|
|
485
|
+
declare class ProcessVerifierModel implements VerifierModel {
|
|
486
|
+
#private;
|
|
487
|
+
readonly spec: VerifierProcessSpec;
|
|
488
|
+
constructor(spec: VerifierProcessSpec);
|
|
489
|
+
verifyTurn(input: {
|
|
490
|
+
turnId: string;
|
|
491
|
+
handoff: JsonValue | null;
|
|
492
|
+
trace: EventRecord[];
|
|
493
|
+
}): Promise<VerificationResult>;
|
|
494
|
+
blindAudit(facts: EventRecord[]): Promise<VerificationResult>;
|
|
495
|
+
}
|
|
496
|
+
declare class VerificationPlane {
|
|
497
|
+
#private;
|
|
498
|
+
readonly ledger: Ledger;
|
|
499
|
+
readonly supervisor: Supervisor;
|
|
500
|
+
readonly model: VerifierModel;
|
|
501
|
+
constructor(ledger: Ledger, supervisor: Supervisor, model: VerifierModel);
|
|
502
|
+
verifyTurn(turnId: string): Promise<VerificationResult>;
|
|
503
|
+
auditGlobal(sinceSeq?: number): Promise<VerificationResult>;
|
|
504
|
+
}
|
|
505
|
+
interface VerificationLabel {
|
|
506
|
+
id: string;
|
|
507
|
+
shouldFlag: boolean;
|
|
508
|
+
riskWeight: number;
|
|
509
|
+
}
|
|
510
|
+
interface ScoredPrediction {
|
|
511
|
+
id: string;
|
|
512
|
+
score: number;
|
|
513
|
+
}
|
|
514
|
+
declare function evaluateVerification(labels: VerificationLabel[], predictedIds: string[]): {
|
|
515
|
+
precision: number;
|
|
516
|
+
riskWeightedRecall: number;
|
|
517
|
+
};
|
|
518
|
+
declare function calibrateVerificationThreshold(labels: VerificationLabel[], predictions: ScoredPrediction[], minimumPrecision: number): number;
|
|
519
|
+
|
|
520
|
+
declare function defaultRolePrompt(role: AgentRole): string;
|
|
521
|
+
declare function defaultTurnPrompt(role: AgentRole, agent: string, turn: TurnContext): string;
|
|
522
|
+
|
|
523
|
+
/** Dispatches each wake to the runner selected by its opaque Runner Profile. */
|
|
524
|
+
declare class RunnerRouter implements Runner {
|
|
525
|
+
#private;
|
|
526
|
+
readonly runners: ReadonlyMap<string, Runner>;
|
|
527
|
+
readonly fallback: string;
|
|
528
|
+
readonly isolation: "process";
|
|
529
|
+
constructor(runners: ReadonlyMap<string, Runner>, fallback?: string);
|
|
530
|
+
prepare(request: Parameters<Runner["prepare"]>[0]): RunnerHandle;
|
|
531
|
+
terminateProcess(pid: number, runnerProfileId?: string): Promise<void>;
|
|
532
|
+
}
|
|
533
|
+
interface SupervisorOptions {
|
|
534
|
+
leaseMs?: number;
|
|
535
|
+
memoryTailChars?: number;
|
|
536
|
+
retryPolicy?: {
|
|
537
|
+
maxAttempts: number;
|
|
538
|
+
baseDelayMs: number;
|
|
539
|
+
};
|
|
540
|
+
turnRetryPolicy?: {
|
|
541
|
+
maxAttempts: number;
|
|
542
|
+
baseDelayMs: number;
|
|
543
|
+
};
|
|
544
|
+
profiles?: AgentProfile[];
|
|
545
|
+
runnerProfiles?: RunnerProfile[];
|
|
546
|
+
}
|
|
547
|
+
declare class Supervisor {
|
|
548
|
+
#private;
|
|
549
|
+
readonly ledger: Ledger;
|
|
550
|
+
readonly clock: Clock;
|
|
551
|
+
constructor(ledger: Ledger, runner: Runner, clock: Clock, options?: SupervisorOptions);
|
|
552
|
+
/**
|
|
553
|
+
* Hot-swap the runner after a config reload. Refused while a Turn is active:
|
|
554
|
+
* a live child must never observe its runner vanish mid-flight.
|
|
555
|
+
* The next Turn uses the new runner, and spawn-time env
|
|
556
|
+
* resolution applies the new credentials to the next spawn.
|
|
557
|
+
*/
|
|
558
|
+
swapRunner(runner: Runner, profiles?: RunnerProfile[]): void;
|
|
559
|
+
get runner(): Runner;
|
|
560
|
+
createGoal(goal: GoalSnapshot, actor?: string): void;
|
|
561
|
+
createRootGoal(objective: string, id?: string, sourceTurnId?: string): GoalSnapshot;
|
|
562
|
+
startGoal(objective: string, id?: string): {
|
|
563
|
+
goal: GoalSnapshot;
|
|
564
|
+
wake: WakeSnapshot;
|
|
565
|
+
};
|
|
566
|
+
threadFor(agent?: string): ThreadSnapshot;
|
|
567
|
+
startHumanTurn(message: string): Promise<{
|
|
568
|
+
threadId: string;
|
|
569
|
+
turnId: string;
|
|
570
|
+
steered: boolean;
|
|
571
|
+
}>;
|
|
572
|
+
startHumanGoalTurn(objective: string, id?: string): Promise<{
|
|
573
|
+
threadId: string;
|
|
574
|
+
turnId: string;
|
|
575
|
+
steered: false;
|
|
576
|
+
goal: GoalSnapshot;
|
|
577
|
+
}>;
|
|
578
|
+
interruptTurn(turnId: string): Promise<TurnSnapshot>;
|
|
579
|
+
sendToCeo(body: JsonValue): Promise<{
|
|
580
|
+
threadId: string;
|
|
581
|
+
turnId: string;
|
|
582
|
+
steered: boolean;
|
|
583
|
+
}>;
|
|
584
|
+
waitForTurn(turnId: string): Promise<void>;
|
|
585
|
+
delegate(request: DelegationRequest, actor?: string, wakeId?: string): DelegationResult;
|
|
586
|
+
reassignGoal(request: ReassignmentRequest, actor?: string, wakeId?: string): Promise<ReassignmentResult>;
|
|
587
|
+
teamList(now?: string): TeamMemberView[];
|
|
588
|
+
currentRoot(): GoalSnapshot | null;
|
|
589
|
+
agentRole(agent: string): AgentRole;
|
|
590
|
+
updateGoal(id: string, patch: Partial<Pick<GoalSnapshot, "objective" | "observationMethod" | "verificationMethod">>, actor?: string, change?: {
|
|
591
|
+
reason: string;
|
|
592
|
+
evidence: number[];
|
|
593
|
+
sourceTurnId?: string;
|
|
594
|
+
sourceWakeId?: string;
|
|
595
|
+
}): GoalSnapshot;
|
|
596
|
+
confirmObservationMethod(id: string, observationMethod: string): GoalSnapshot;
|
|
597
|
+
reviseChildGoal(id: string, objective: string, observationMethod: string, verificationMethod: string, actor: string, reason: string, evidence: number[], wakeId?: string, sourceTurnId?: string): GoalSnapshot;
|
|
598
|
+
completeGoal(request: GoalCompletionRequest, actor?: string, wakeId?: string): GoalSnapshot;
|
|
599
|
+
transitionGoal(id: string, phase: GoalPhase, actor?: string, scheduleMotion?: boolean, sourceTurnId?: string): GoalSnapshot;
|
|
600
|
+
planWake(agent: string, at: string, reason: string, setBy?: string, target?: {
|
|
601
|
+
goalId: string;
|
|
602
|
+
}): WakeSnapshot | null;
|
|
603
|
+
stopAgentWake(agent: string, goalId?: string): Promise<WakeSnapshot | null>;
|
|
604
|
+
recover(): Promise<void>;
|
|
605
|
+
tick(): Promise<WakeSnapshot | null>;
|
|
606
|
+
runAvailable(concurrency?: number, maxWakes?: number): Promise<WakeSnapshot[]>;
|
|
607
|
+
}
|
|
608
|
+
declare function runSupervisorDaemon(supervisor: Supervisor, options?: {
|
|
609
|
+
pollMs?: number;
|
|
610
|
+
concurrency?: number;
|
|
611
|
+
signal?: AbortSignal;
|
|
612
|
+
onError?: (error: unknown) => void;
|
|
613
|
+
}): Promise<void>;
|
|
614
|
+
declare function deriveTeam(ledger: Ledger, now?: string): TeamMemberView[];
|
|
615
|
+
interface RecoveryView {
|
|
616
|
+
turnId: string;
|
|
617
|
+
agent: string;
|
|
618
|
+
state: "scheduled" | "queued" | "running" | "recovered" | "escalated" | "superseded" | "needed";
|
|
619
|
+
actionable: boolean;
|
|
620
|
+
}
|
|
621
|
+
declare function deriveRecoveryViews(ledger: Ledger): RecoveryView[];
|
|
622
|
+
declare function renderDashboard(ledger: Ledger): string;
|
|
623
|
+
|
|
624
|
+
export { ProcessVerifierModel, RunnerRouter, Supervisor, VerificationPlane, calibrateVerificationThreshold, composeActiveContext, defaultRolePrompt, defaultTurnPrompt, deriveRecoveryViews, deriveTeam, evaluateVerification, renderDashboard, runSupervisorDaemon, selectRecoveryEvents };
|
|
625
|
+
export type { ActiveContextInput, ActiveContextView, RecoveryView, ScoredPrediction, SupervisorOptions, VerificationFinding, VerificationLabel, VerificationResult, VerifierModel, VerifierProcessSpec };
|
package/dist/supervisor.js
CHANGED
|
@@ -1,2 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { createRequire as __goahCreateRequire } from "node:module";
|
|
2
|
+
const require = __goahCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
ProcessVerifierModel,
|
|
5
|
+
RunnerRouter,
|
|
6
|
+
Supervisor,
|
|
7
|
+
VerificationPlane,
|
|
8
|
+
calibrateVerificationThreshold,
|
|
9
|
+
composeActiveContext,
|
|
10
|
+
defaultRolePrompt,
|
|
11
|
+
defaultTurnPrompt,
|
|
12
|
+
deriveRecoveryViews,
|
|
13
|
+
deriveTeam,
|
|
14
|
+
evaluateVerification,
|
|
15
|
+
renderDashboard,
|
|
16
|
+
runSupervisorDaemon,
|
|
17
|
+
selectRecoveryEvents
|
|
18
|
+
} from "./chunk-QBD6EJ2Z.js";
|
|
19
|
+
import "./chunk-4KA63VNZ.js";
|
|
20
|
+
import "./chunk-KAO7WIXG.js";
|
|
21
|
+
import "./chunk-R6I3VKME.js";
|
|
22
|
+
import "./chunk-TJON22J4.js";
|
|
23
|
+
import "./chunk-XPQKM3L7.js";
|
|
24
|
+
export {
|
|
25
|
+
ProcessVerifierModel,
|
|
26
|
+
RunnerRouter,
|
|
27
|
+
Supervisor,
|
|
28
|
+
VerificationPlane,
|
|
29
|
+
calibrateVerificationThreshold,
|
|
30
|
+
composeActiveContext,
|
|
31
|
+
defaultRolePrompt,
|
|
32
|
+
defaultTurnPrompt,
|
|
33
|
+
deriveRecoveryViews,
|
|
34
|
+
deriveTeam,
|
|
35
|
+
evaluateVerification,
|
|
36
|
+
renderDashboard,
|
|
37
|
+
runSupervisorDaemon,
|
|
38
|
+
selectRecoveryEvents
|
|
39
|
+
};
|