@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/runner-pi.d.ts
CHANGED
|
@@ -1,2 +1,342 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
type JsonPrimitive = string | number | boolean | null;
|
|
2
|
+
type JsonValue = JsonPrimitive | JsonValue[] | {
|
|
3
|
+
[key: string]: JsonValue;
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
type WakeStatus = "queued" | "claimed" | "consumed" | "cancelled";
|
|
7
|
+
type WakeTriggerStatus = "pending" | "resolved";
|
|
8
|
+
type GoalPhase = "active" | "paused" | "blocked" | "complete";
|
|
9
|
+
type TurnStatus = "in_progress" | "completed" | "failed" | "interrupted";
|
|
10
|
+
type TurnTriggerKind = "user_message" | "wake";
|
|
11
|
+
type SpecialistRole = "verifier" | "audit";
|
|
12
|
+
type AutomaticTarget = {
|
|
13
|
+
targetKind: "goal";
|
|
14
|
+
agent: string;
|
|
15
|
+
goalId: string;
|
|
16
|
+
specialistRole: null;
|
|
17
|
+
} | {
|
|
18
|
+
targetKind: "specialist";
|
|
19
|
+
agent: string;
|
|
20
|
+
goalId: null;
|
|
21
|
+
specialistRole: SpecialistRole;
|
|
22
|
+
};
|
|
23
|
+
interface GoalCommitment {
|
|
24
|
+
goalId: string;
|
|
25
|
+
goalRevision: number;
|
|
26
|
+
}
|
|
27
|
+
type TurnSnapshot = {
|
|
28
|
+
id: string;
|
|
29
|
+
threadId: string;
|
|
30
|
+
triggerKind: TurnTriggerKind;
|
|
31
|
+
goalId: string | null;
|
|
32
|
+
goalRevision: number | null;
|
|
33
|
+
status: TurnStatus;
|
|
34
|
+
attempt: number;
|
|
35
|
+
error: JsonValue | null;
|
|
36
|
+
startedAt: string;
|
|
37
|
+
endedAt: string | null;
|
|
38
|
+
leaseUntil: string | null;
|
|
39
|
+
leaseToken: string | null;
|
|
40
|
+
runnerPid: number | null;
|
|
41
|
+
runnerProfileId?: string;
|
|
42
|
+
};
|
|
43
|
+
interface GoalSnapshot {
|
|
44
|
+
id: string;
|
|
45
|
+
parentId: string | null;
|
|
46
|
+
objective: string;
|
|
47
|
+
observationMethod: string | null;
|
|
48
|
+
verificationMethod: string | null;
|
|
49
|
+
owner: string;
|
|
50
|
+
phase: GoalPhase;
|
|
51
|
+
revision: number;
|
|
52
|
+
}
|
|
53
|
+
type WakeSnapshot = AutomaticTarget & {
|
|
54
|
+
id: string;
|
|
55
|
+
/** Initial trigger retained for display and provenance. Runtime decisions use WakeTriggerSnapshot. */
|
|
56
|
+
triggerRef: string;
|
|
57
|
+
status: WakeStatus;
|
|
58
|
+
attempt: number;
|
|
59
|
+
enqueuedSeq: number;
|
|
60
|
+
claimedAt: string | null;
|
|
61
|
+
consumedAt: string | null;
|
|
62
|
+
turnId: string | null;
|
|
63
|
+
};
|
|
64
|
+
interface WakeTriggerSnapshot {
|
|
65
|
+
wakeId: string;
|
|
66
|
+
agent: string;
|
|
67
|
+
triggerRef: string;
|
|
68
|
+
source: "goal" | "system";
|
|
69
|
+
status: WakeTriggerStatus;
|
|
70
|
+
addedAt: string;
|
|
71
|
+
resolvedAt: string | null;
|
|
72
|
+
}
|
|
73
|
+
type GoalOutcome = "progress" | "waiting" | "blocked" | "completion_proposed";
|
|
74
|
+
interface AgentHandoff {
|
|
75
|
+
outcome: GoalOutcome;
|
|
76
|
+
evidence: number[];
|
|
77
|
+
}
|
|
78
|
+
interface HandoffValidationIssue {
|
|
79
|
+
code: string;
|
|
80
|
+
message: string;
|
|
81
|
+
details?: JsonValue;
|
|
82
|
+
}
|
|
83
|
+
type HandoffValidationResult = {
|
|
84
|
+
accepted: true;
|
|
85
|
+
fatal: false;
|
|
86
|
+
attemptId: number;
|
|
87
|
+
token: string;
|
|
88
|
+
goalId: string;
|
|
89
|
+
goalRevision: number;
|
|
90
|
+
} | {
|
|
91
|
+
accepted: false;
|
|
92
|
+
fatal: boolean;
|
|
93
|
+
attemptId: number;
|
|
94
|
+
issues: HandoffValidationIssue[];
|
|
95
|
+
};
|
|
96
|
+
interface TurnOutput {
|
|
97
|
+
validationAttemptId: number;
|
|
98
|
+
validationToken: string;
|
|
99
|
+
handoff: AgentHandoff;
|
|
100
|
+
}
|
|
101
|
+
interface RunnerTraceEvent {
|
|
102
|
+
type: string;
|
|
103
|
+
data: JsonValue;
|
|
104
|
+
}
|
|
105
|
+
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";
|
|
106
|
+
type RunnerControlMethod = "goal.handoff.validate";
|
|
107
|
+
type RunnerRpcMethod = AgentCapability | RunnerControlMethod;
|
|
108
|
+
interface RunnerChoice {
|
|
109
|
+
value: string;
|
|
110
|
+
label: string;
|
|
111
|
+
description?: string;
|
|
112
|
+
}
|
|
113
|
+
interface RunnerSetupProgress {
|
|
114
|
+
current: number;
|
|
115
|
+
total: number;
|
|
116
|
+
}
|
|
117
|
+
interface RunnerSetupInteraction {
|
|
118
|
+
select(input: {
|
|
119
|
+
title: string;
|
|
120
|
+
description?: string;
|
|
121
|
+
choices: RunnerChoice[];
|
|
122
|
+
progress?: RunnerSetupProgress;
|
|
123
|
+
}): Promise<string | null>;
|
|
124
|
+
input(input: {
|
|
125
|
+
title: string;
|
|
126
|
+
description?: string;
|
|
127
|
+
prompt: string;
|
|
128
|
+
initial?: string;
|
|
129
|
+
secret?: boolean;
|
|
130
|
+
progress?: RunnerSetupProgress;
|
|
131
|
+
}): Promise<string | null>;
|
|
132
|
+
notify(message: string): void;
|
|
133
|
+
openUrl?(url: string): void;
|
|
134
|
+
}
|
|
135
|
+
interface RunnerManifest {
|
|
136
|
+
id: string;
|
|
137
|
+
name: string;
|
|
138
|
+
description: string;
|
|
139
|
+
commands?: Array<{
|
|
140
|
+
name: string;
|
|
141
|
+
description: string;
|
|
142
|
+
}>;
|
|
143
|
+
}
|
|
144
|
+
interface RunnerDiagnostic {
|
|
145
|
+
ok: boolean;
|
|
146
|
+
name: string;
|
|
147
|
+
detail: string;
|
|
148
|
+
severity?: "warning" | "error";
|
|
149
|
+
}
|
|
150
|
+
interface RunnerCommandResult {
|
|
151
|
+
config?: JsonValue;
|
|
152
|
+
output: string[];
|
|
153
|
+
rollback?(): Promise<void>;
|
|
154
|
+
}
|
|
155
|
+
interface RunnerSetupTransaction {
|
|
156
|
+
config: JsonValue | null;
|
|
157
|
+
commit(): Promise<JsonValue | null>;
|
|
158
|
+
rollback(): Promise<void>;
|
|
159
|
+
}
|
|
160
|
+
interface RunnerConfigurator {
|
|
161
|
+
describe(): RunnerManifest;
|
|
162
|
+
setup(current: JsonValue | null, interaction: RunnerSetupInteraction): Promise<JsonValue | null>;
|
|
163
|
+
beginSetup?(current: JsonValue | null, interaction: RunnerSetupInteraction): Promise<RunnerSetupTransaction>;
|
|
164
|
+
doctor(config: JsonValue, context?: {
|
|
165
|
+
root: string;
|
|
166
|
+
}): Promise<RunnerDiagnostic[]>;
|
|
167
|
+
summarize?(config: JsonValue): Array<{
|
|
168
|
+
label: string;
|
|
169
|
+
value: string;
|
|
170
|
+
}>;
|
|
171
|
+
runCommand?(command: string, args: string[], config: JsonValue, interaction: RunnerSetupInteraction): Promise<RunnerCommandResult>;
|
|
172
|
+
}
|
|
173
|
+
type TurnTrigger = {
|
|
174
|
+
kind: "user_message";
|
|
175
|
+
} | {
|
|
176
|
+
kind: "wake";
|
|
177
|
+
reasons: string[];
|
|
178
|
+
};
|
|
179
|
+
interface TurnContext {
|
|
180
|
+
trigger: TurnTrigger;
|
|
181
|
+
activeGoal: GoalSnapshot | null;
|
|
182
|
+
goalCommitment: GoalCommitment | null;
|
|
183
|
+
}
|
|
184
|
+
interface AssistantResponse {
|
|
185
|
+
content: string;
|
|
186
|
+
}
|
|
187
|
+
interface RunRequest {
|
|
188
|
+
agent: string;
|
|
189
|
+
execution: TurnSnapshot;
|
|
190
|
+
sourceWake?: WakeSnapshot;
|
|
191
|
+
sourceWakeTriggers?: WakeTriggerSnapshot[];
|
|
192
|
+
turn: TurnContext;
|
|
193
|
+
context: JsonValue;
|
|
194
|
+
now(): string;
|
|
195
|
+
emit(event: RunnerTraceEvent): void;
|
|
196
|
+
rpc?(method: RunnerRpcMethod, params: JsonValue): Promise<JsonValue>;
|
|
197
|
+
}
|
|
198
|
+
type RunnerCandidateResult = {
|
|
199
|
+
outcome: "completed";
|
|
200
|
+
response: AssistantResponse;
|
|
201
|
+
handoff?: TurnOutput;
|
|
202
|
+
} | {
|
|
203
|
+
outcome: "abnormal";
|
|
204
|
+
reason: string;
|
|
205
|
+
};
|
|
206
|
+
interface RunnerHandle {
|
|
207
|
+
pid: number | null;
|
|
208
|
+
begin(): void;
|
|
209
|
+
result: Promise<RunnerCandidateResult>;
|
|
210
|
+
steer?(message: string): Promise<void>;
|
|
211
|
+
terminate(): Promise<void>;
|
|
212
|
+
}
|
|
213
|
+
interface Runner {
|
|
214
|
+
readonly isolation: "process";
|
|
215
|
+
prepare(request: RunRequest): RunnerHandle;
|
|
216
|
+
terminateProcess(pid: number, runnerProfileId?: string): Promise<void>;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
declare const LOCAL_PROVIDERS: readonly ["ollama", "lm-studio", "llama.cpp"];
|
|
220
|
+
interface ProviderSummary {
|
|
221
|
+
id: string;
|
|
222
|
+
name: string;
|
|
223
|
+
modelCount: number;
|
|
224
|
+
oauth: boolean;
|
|
225
|
+
apiKey: boolean;
|
|
226
|
+
local: boolean;
|
|
227
|
+
}
|
|
228
|
+
interface ModelSummary {
|
|
229
|
+
provider: string;
|
|
230
|
+
id: string;
|
|
231
|
+
name: string;
|
|
232
|
+
contextWindow: number;
|
|
233
|
+
maxTokens: number;
|
|
234
|
+
reasoning: boolean;
|
|
235
|
+
}
|
|
236
|
+
declare function defaultAuthFile(): string;
|
|
237
|
+
declare function providerCatalog(): ProviderSummary[];
|
|
238
|
+
declare function modelCatalog(provider?: string): ModelSummary[];
|
|
239
|
+
|
|
240
|
+
interface PiRunnerConfig {
|
|
241
|
+
provider: string;
|
|
242
|
+
model: string;
|
|
243
|
+
thinking?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
|
|
244
|
+
apiKeyEnv?: string;
|
|
245
|
+
baseUrl?: string;
|
|
246
|
+
contextWindowTokens?: number;
|
|
247
|
+
maxOutputTokens?: number;
|
|
248
|
+
authFile?: string;
|
|
249
|
+
fauxHandoff?: JsonValue;
|
|
250
|
+
api?: "openai-completions" | "openai-responses" | "anthropic-messages";
|
|
251
|
+
authMode?: "oauth" | "stored-key" | "environment" | "local" | "unconfigured";
|
|
252
|
+
}
|
|
253
|
+
declare function piRunnerConfigurator(): RunnerConfigurator;
|
|
254
|
+
declare function createPiProcessRunner(configValue: JsonValue, root: string): ProcessRunner;
|
|
255
|
+
declare function piConfig(value: JsonValue): PiRunnerConfig;
|
|
256
|
+
declare function piEnvironment(config: PiRunnerConfig): Record<string, string>;
|
|
257
|
+
|
|
258
|
+
interface EnvSpecSource {
|
|
259
|
+
/** Absolute path of the workspace root whose `.env` is consulted. */
|
|
260
|
+
root: string;
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Resolve an env spec for one spawn. Literal values pass through; `env:NAME`
|
|
264
|
+
* references consult the chain above. An unresolvable reference throws with the
|
|
265
|
+
* variable name so the wake fails honestly instead of spawning a child that
|
|
266
|
+
* would fail opaquely at its first model call.
|
|
267
|
+
*/
|
|
268
|
+
declare function resolveEnvSpec(spec: Record<string, string> | undefined, source: EnvSpecSource | undefined): Record<string, string>;
|
|
269
|
+
|
|
270
|
+
interface PiStep {
|
|
271
|
+
trace?: Array<{
|
|
272
|
+
type: string;
|
|
273
|
+
data: JsonValue;
|
|
274
|
+
}>;
|
|
275
|
+
response?: AssistantResponse;
|
|
276
|
+
handoff?: {
|
|
277
|
+
response: AssistantResponse;
|
|
278
|
+
handoff: AgentHandoff;
|
|
279
|
+
};
|
|
280
|
+
stopped?: boolean;
|
|
281
|
+
}
|
|
282
|
+
interface PiRunnerSession {
|
|
283
|
+
step(): Promise<PiStep>;
|
|
284
|
+
feedback(validation: Exclude<HandoffValidationResult, {
|
|
285
|
+
accepted: true;
|
|
286
|
+
}>): Promise<void>;
|
|
287
|
+
close(): Promise<void>;
|
|
288
|
+
}
|
|
289
|
+
interface PiDriver {
|
|
290
|
+
createRunnerSession(request: RunRequest): Promise<PiRunnerSession>;
|
|
291
|
+
}
|
|
292
|
+
/** In-process adapter for tests and for use inside a ProcessRunner worker. */
|
|
293
|
+
declare class PiRunnerAdapter {
|
|
294
|
+
#private;
|
|
295
|
+
private readonly driver;
|
|
296
|
+
constructor(driver: PiDriver);
|
|
297
|
+
prepare(request: RunRequest): RunnerHandle;
|
|
298
|
+
terminateProcess(pid: number): Promise<void>;
|
|
299
|
+
}
|
|
300
|
+
interface ProcessRunnerOptions {
|
|
301
|
+
command: string;
|
|
302
|
+
args?: string[];
|
|
303
|
+
cwd?: string;
|
|
304
|
+
env?: Record<string, string>;
|
|
305
|
+
/** Unresolved env spec (may contain `env:NAME` references); resolved at every spawn. */
|
|
306
|
+
envSpec?: Record<string, string> | undefined;
|
|
307
|
+
inheritEnv?: string[];
|
|
308
|
+
/** Worker implements the live steering control message. */
|
|
309
|
+
steering?: boolean;
|
|
310
|
+
steerAckTimeoutMs?: number;
|
|
311
|
+
killGraceMs?: number;
|
|
312
|
+
timeoutMs?: number;
|
|
313
|
+
/** Resolve private per-wake runtime material (for example scoped model auth) before the worker starts. Never enters RunRequest context or Ledger events. */
|
|
314
|
+
prepareRuntime?: (request: RunRequest) => Promise<JsonValue | undefined>;
|
|
315
|
+
}
|
|
316
|
+
declare function piWorkerPath(): string;
|
|
317
|
+
declare function verificationWorkerPath(): string;
|
|
318
|
+
type WorkerRequest = Omit<RunRequest, "now" | "emit" | "rpc" | "turn"> & {
|
|
319
|
+
turn?: TurnContext;
|
|
320
|
+
runtime?: JsonValue;
|
|
321
|
+
};
|
|
322
|
+
/** Real process boundary. The child stays idle until begin() sends its request. */
|
|
323
|
+
declare class ProcessRunner implements Runner {
|
|
324
|
+
readonly options: ProcessRunnerOptions;
|
|
325
|
+
readonly isolation: "process";
|
|
326
|
+
constructor(options: ProcessRunnerOptions);
|
|
327
|
+
prepare(request: RunRequest): RunnerHandle;
|
|
328
|
+
terminateProcess(pid: number): Promise<void>;
|
|
329
|
+
}
|
|
330
|
+
type WorkerRpc = (method: RunnerRpcMethod, params: JsonValue) => Promise<JsonValue>;
|
|
331
|
+
interface WorkerControls {
|
|
332
|
+
onSteer(listener: (message: string) => boolean): void;
|
|
333
|
+
}
|
|
334
|
+
type WorkerRun = (request: WorkerRequest, emit: (event: {
|
|
335
|
+
type: string;
|
|
336
|
+
data: JsonValue;
|
|
337
|
+
}) => void, rpc: WorkerRpc, controls: WorkerControls) => Promise<RunnerCandidateResult>;
|
|
338
|
+
/** Entry helper for runner executables. It exits when its parent disappears. */
|
|
339
|
+
declare function runProcessWorker(run: WorkerRun): Promise<void>;
|
|
340
|
+
|
|
341
|
+
export { LOCAL_PROVIDERS, PiRunnerAdapter, ProcessRunner, createPiProcessRunner, defaultAuthFile, modelCatalog, piConfig, piEnvironment, piRunnerConfigurator, piWorkerPath, providerCatalog, resolveEnvSpec, runProcessWorker, verificationWorkerPath };
|
|
342
|
+
export type { ModelSummary, PiDriver, PiRunnerConfig, PiRunnerSession, PiStep, ProcessRunnerOptions, ProviderSummary, WorkerControls, WorkerRpc, WorkerRun };
|
package/dist/runner-pi.js
CHANGED
|
@@ -1,2 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { createRequire as __goahCreateRequire } from "node:module";
|
|
2
|
+
const require = __goahCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
PiRunnerAdapter,
|
|
5
|
+
ProcessRunner,
|
|
6
|
+
createPiProcessRunner,
|
|
7
|
+
piConfig,
|
|
8
|
+
piEnvironment,
|
|
9
|
+
piRunnerConfigurator,
|
|
10
|
+
piWorkerPath,
|
|
11
|
+
resolveEnvSpec,
|
|
12
|
+
runProcessWorker,
|
|
13
|
+
verificationWorkerPath
|
|
14
|
+
} from "./chunk-7E7V6OIU.js";
|
|
15
|
+
import {
|
|
16
|
+
LOCAL_PROVIDERS,
|
|
17
|
+
defaultAuthFile,
|
|
18
|
+
modelCatalog,
|
|
19
|
+
providerCatalog
|
|
20
|
+
} from "./chunk-6M3OOCKO.js";
|
|
21
|
+
import "./chunk-K26BVR6O.js";
|
|
22
|
+
import "./chunk-IIJQ3DW4.js";
|
|
23
|
+
import "./chunk-2ZP2NBW3.js";
|
|
24
|
+
import "./chunk-MPXK7QBL.js";
|
|
25
|
+
import "./chunk-2QBQZGXF.js";
|
|
26
|
+
import "./chunk-4KA63VNZ.js";
|
|
27
|
+
import "./chunk-KAO7WIXG.js";
|
|
28
|
+
import "./chunk-R6I3VKME.js";
|
|
29
|
+
import "./chunk-TJON22J4.js";
|
|
30
|
+
import "./chunk-XPQKM3L7.js";
|
|
31
|
+
export {
|
|
32
|
+
LOCAL_PROVIDERS,
|
|
33
|
+
PiRunnerAdapter,
|
|
34
|
+
ProcessRunner,
|
|
35
|
+
createPiProcessRunner,
|
|
36
|
+
defaultAuthFile,
|
|
37
|
+
modelCatalog,
|
|
38
|
+
piConfig,
|
|
39
|
+
piEnvironment,
|
|
40
|
+
piRunnerConfigurator,
|
|
41
|
+
piWorkerPath,
|
|
42
|
+
providerCatalog,
|
|
43
|
+
resolveEnvSpec,
|
|
44
|
+
runProcessWorker,
|
|
45
|
+
verificationWorkerPath
|
|
46
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { createRequire as __goahCreateRequire } from "node:module";
|
|
2
|
+
const require = __goahCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
runnerManifests,
|
|
5
|
+
runnerPlugin
|
|
6
|
+
} from "./chunk-D2DVAH37.js";
|
|
7
|
+
import "./chunk-7E7V6OIU.js";
|
|
8
|
+
import "./chunk-6M3OOCKO.js";
|
|
9
|
+
import "./chunk-K26BVR6O.js";
|
|
10
|
+
import "./chunk-IIJQ3DW4.js";
|
|
11
|
+
import "./chunk-2ZP2NBW3.js";
|
|
12
|
+
import "./chunk-MPXK7QBL.js";
|
|
13
|
+
import "./chunk-2QBQZGXF.js";
|
|
14
|
+
import "./chunk-4KA63VNZ.js";
|
|
15
|
+
import "./chunk-KAO7WIXG.js";
|
|
16
|
+
import "./chunk-R6I3VKME.js";
|
|
17
|
+
import "./chunk-TJON22J4.js";
|
|
18
|
+
import "./chunk-XPQKM3L7.js";
|
|
19
|
+
export {
|
|
20
|
+
runnerManifests,
|
|
21
|
+
runnerPlugin
|
|
22
|
+
};
|