@goah/cli 0.11.5 → 0.13.1

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.
Files changed (242) hide show
  1. package/dist/LICENSE +201 -0
  2. package/dist/THIRD-PARTY-NOTICES.md +2319 -0
  3. package/dist/anthropic-messages-WBFOHES5.js +7214 -0
  4. package/dist/azure-openai-responses-NZFH3PO6.js +253 -0
  5. package/dist/chunk-25XSBFX6.js +639 -0
  6. package/dist/chunk-2QBQZGXF.js +110 -0
  7. package/dist/chunk-2ZP2NBW3.js +345 -0
  8. package/dist/chunk-4KA63VNZ.js +2 -0
  9. package/dist/chunk-4M6TXTT5.js +86 -0
  10. package/dist/chunk-4US7ZHT3.js +20 -0
  11. package/dist/chunk-6M3OOCKO.js +11809 -0
  12. package/dist/chunk-7AXAFDPG.js +17 -0
  13. package/dist/chunk-BXA47DTF.js +548 -0
  14. package/dist/chunk-FSBUS2BI.js +26 -0
  15. package/dist/chunk-GKDRAHLI.js +4787 -0
  16. package/dist/chunk-H462EFJP.js +89 -0
  17. package/dist/chunk-IIJQ3DW4.js +35 -0
  18. package/dist/chunk-JQD5EWJY.js +34 -0
  19. package/dist/chunk-K26BVR6O.js +61 -0
  20. package/dist/chunk-KAO7WIXG.js +31 -0
  21. package/dist/chunk-LBKI23CC.js +9810 -0
  22. package/dist/chunk-LKBKZEHT.js +41 -0
  23. package/dist/chunk-MD7TLTXZ.js +18 -0
  24. package/dist/chunk-MPXK7QBL.js +868 -0
  25. package/dist/chunk-NRLGWZJC.js +11 -0
  26. package/dist/chunk-PFEV3HWI.js +1178 -0
  27. package/dist/chunk-QBD6EJ2Z.js +1746 -0
  28. package/dist/chunk-R6I3VKME.js +132 -0
  29. package/dist/chunk-TJON22J4.js +87 -0
  30. package/dist/chunk-ULY36ME4.js +33097 -0
  31. package/dist/chunk-VWEV4LTH.js +25 -0
  32. package/dist/chunk-X7UWW2PN.js +883 -0
  33. package/dist/chunk-XALZLRYK.js +9221 -0
  34. package/dist/chunk-XPQKM3L7.js +57 -0
  35. package/dist/chunk-YH6YJ2IB.js +1773 -0
  36. package/dist/cli.d.ts +0 -2
  37. package/dist/cli.js +13148 -506
  38. package/dist/console/assets/index-3sYrDMmt.css +1 -0
  39. package/dist/console/assets/index-B1vGMXKr.js +52 -0
  40. package/dist/console/assets/index-B1vGMXKr.js.map +1 -0
  41. package/dist/console/index.html +2 -2
  42. package/dist/dist-65MDQA4Q.js +1126 -0
  43. package/dist/dist-KNR2XL6J.js +39 -0
  44. package/dist/execution.d.ts +557 -2
  45. package/dist/execution.js +37 -2
  46. package/dist/faux-runner-worker.js +128 -0
  47. package/dist/google-generative-ai-YMHXZSFE.js +422 -0
  48. package/dist/google-vertex-X6DB3ZQ6.js +471 -0
  49. package/dist/index.d.ts +855 -44
  50. package/dist/index.js +84 -257
  51. package/dist/kernel.d.ts +39 -2
  52. package/dist/kernel.js +21 -2
  53. package/dist/mistral-conversations-TY3MMD6G.js +718 -0
  54. package/dist/multipart-parser-F6M4NJZU.js +373 -0
  55. package/dist/openai-codex-responses-BRDUMLN5.js +1374 -0
  56. package/dist/openai-completions-CX634XN3.js +1139 -0
  57. package/dist/openai-responses-HMCXJIHT.js +300 -0
  58. package/dist/openrouter-images-KTWET2H2.js +148 -0
  59. package/dist/pi-messages-XL5OEC4K.js +307 -0
  60. package/dist/pi-worker.js +671 -0
  61. package/dist/runner-pi.d.ts +342 -2
  62. package/dist/runner-pi.js +46 -2
  63. package/dist/runner-registry-M776E3SE.js +22 -0
  64. package/dist/sqlite.d.ts +446 -2
  65. package/dist/sqlite.js +15 -2
  66. package/dist/src-F2KBSV4T.js +1398 -0
  67. package/dist/supervisor.d.ts +625 -2
  68. package/dist/supervisor.js +39 -2
  69. package/dist/testkit.d.ts +564 -2
  70. package/dist/testkit.js +127 -2
  71. package/dist/transcript.d.ts +84 -0
  72. package/dist/transcript.js +25 -0
  73. package/dist/verification-worker.js +72 -0
  74. package/package.json +3 -28
  75. package/dist/cli.d.ts.map +0 -1
  76. package/dist/cli.js.map +0 -1
  77. package/dist/console/assets/index-BJTGvlCH.js +0 -52
  78. package/dist/console/assets/index-BJTGvlCH.js.map +0 -1
  79. package/dist/console/assets/index-msBn41Cl.css +0 -1
  80. package/dist/control.d.ts +0 -106
  81. package/dist/control.d.ts.map +0 -1
  82. package/dist/control.js +0 -215
  83. package/dist/control.js.map +0 -1
  84. package/dist/execution.d.ts.map +0 -1
  85. package/dist/execution.js.map +0 -1
  86. package/dist/index.d.ts.map +0 -1
  87. package/dist/index.js.map +0 -1
  88. package/dist/inspect.d.ts +0 -61
  89. package/dist/inspect.d.ts.map +0 -1
  90. package/dist/inspect.js +0 -110
  91. package/dist/inspect.js.map +0 -1
  92. package/dist/kernel.d.ts.map +0 -1
  93. package/dist/kernel.js.map +0 -1
  94. package/dist/live-config.d.ts +0 -10
  95. package/dist/live-config.d.ts.map +0 -1
  96. package/dist/live-config.js +0 -44
  97. package/dist/live-config.js.map +0 -1
  98. package/dist/metrics.d.ts +0 -2
  99. package/dist/metrics.d.ts.map +0 -1
  100. package/dist/metrics.js +0 -2
  101. package/dist/metrics.js.map +0 -1
  102. package/dist/prompt-queue.d.ts +0 -13
  103. package/dist/prompt-queue.d.ts.map +0 -1
  104. package/dist/prompt-queue.js +0 -30
  105. package/dist/prompt-queue.js.map +0 -1
  106. package/dist/runner-pi.d.ts.map +0 -1
  107. package/dist/runner-pi.js.map +0 -1
  108. package/dist/runner-registry.d.ts +0 -8
  109. package/dist/runner-registry.d.ts.map +0 -1
  110. package/dist/runner-registry.js +0 -12
  111. package/dist/runner-registry.js.map +0 -1
  112. package/dist/searchable-select.d.ts +0 -24
  113. package/dist/searchable-select.d.ts.map +0 -1
  114. package/dist/searchable-select.js +0 -61
  115. package/dist/searchable-select.js.map +0 -1
  116. package/dist/secret-input.d.ts +0 -8
  117. package/dist/secret-input.d.ts.map +0 -1
  118. package/dist/secret-input.js +0 -14
  119. package/dist/secret-input.js.map +0 -1
  120. package/dist/session.d.ts +0 -2
  121. package/dist/session.d.ts.map +0 -1
  122. package/dist/session.js +0 -2
  123. package/dist/session.js.map +0 -1
  124. package/dist/setup-wizard.d.ts +0 -11
  125. package/dist/setup-wizard.d.ts.map +0 -1
  126. package/dist/setup-wizard.js +0 -130
  127. package/dist/setup-wizard.js.map +0 -1
  128. package/dist/sqlite.d.ts.map +0 -1
  129. package/dist/sqlite.js.map +0 -1
  130. package/dist/supervisor.d.ts.map +0 -1
  131. package/dist/supervisor.js.map +0 -1
  132. package/dist/testkit.d.ts.map +0 -1
  133. package/dist/testkit.js.map +0 -1
  134. package/dist/tui-theme.d.ts +0 -16
  135. package/dist/tui-theme.d.ts.map +0 -1
  136. package/dist/tui-theme.js +0 -18
  137. package/dist/tui-theme.js.map +0 -1
  138. package/dist/tui.d.ts +0 -18
  139. package/dist/tui.d.ts.map +0 -1
  140. package/dist/tui.js +0 -583
  141. package/dist/tui.js.map +0 -1
  142. package/dist/update.d.ts +0 -15
  143. package/dist/update.d.ts.map +0 -1
  144. package/dist/update.js +0 -59
  145. package/dist/update.js.map +0 -1
  146. package/dist/web-console.d.ts +0 -33
  147. package/dist/web-console.d.ts.map +0 -1
  148. package/dist/web-console.js +0 -252
  149. package/dist/web-console.js.map +0 -1
  150. package/dist/welcome.d.ts +0 -30
  151. package/dist/welcome.d.ts.map +0 -1
  152. package/dist/welcome.js +0 -81
  153. package/dist/welcome.js.map +0 -1
  154. package/node_modules/goah-ledger-contract/dist/execution.d.ts +0 -402
  155. package/node_modules/goah-ledger-contract/dist/execution.d.ts.map +0 -1
  156. package/node_modules/goah-ledger-contract/dist/execution.js +0 -40
  157. package/node_modules/goah-ledger-contract/dist/execution.js.map +0 -1
  158. package/node_modules/goah-ledger-contract/dist/index.d.ts +0 -5
  159. package/node_modules/goah-ledger-contract/dist/index.d.ts.map +0 -1
  160. package/node_modules/goah-ledger-contract/dist/index.js +0 -5
  161. package/node_modules/goah-ledger-contract/dist/index.js.map +0 -1
  162. package/node_modules/goah-ledger-contract/dist/kernel.d.ts +0 -37
  163. package/node_modules/goah-ledger-contract/dist/kernel.d.ts.map +0 -1
  164. package/node_modules/goah-ledger-contract/dist/kernel.js +0 -8
  165. package/node_modules/goah-ledger-contract/dist/kernel.js.map +0 -1
  166. package/node_modules/goah-ledger-contract/dist/metrics.d.ts +0 -40
  167. package/node_modules/goah-ledger-contract/dist/metrics.d.ts.map +0 -1
  168. package/node_modules/goah-ledger-contract/dist/metrics.js +0 -25
  169. package/node_modules/goah-ledger-contract/dist/metrics.js.map +0 -1
  170. package/node_modules/goah-ledger-contract/dist/session.d.ts +0 -63
  171. package/node_modules/goah-ledger-contract/dist/session.d.ts.map +0 -1
  172. package/node_modules/goah-ledger-contract/dist/session.js +0 -115
  173. package/node_modules/goah-ledger-contract/dist/session.js.map +0 -1
  174. package/node_modules/goah-ledger-contract/package.json +0 -29
  175. package/node_modules/goah-ledger-sqlite/dist/index.d.ts +0 -77
  176. package/node_modules/goah-ledger-sqlite/dist/index.d.ts.map +0 -1
  177. package/node_modules/goah-ledger-sqlite/dist/index.js +0 -884
  178. package/node_modules/goah-ledger-sqlite/dist/index.js.map +0 -1
  179. package/node_modules/goah-ledger-sqlite/package.json +0 -26
  180. package/node_modules/goah-runner-pi/dist/configurator.d.ts +0 -20
  181. package/node_modules/goah-runner-pi/dist/configurator.d.ts.map +0 -1
  182. package/node_modules/goah-runner-pi/dist/configurator.js +0 -267
  183. package/node_modules/goah-runner-pi/dist/configurator.js.map +0 -1
  184. package/node_modules/goah-runner-pi/dist/credential-store.d.ts +0 -12
  185. package/node_modules/goah-runner-pi/dist/credential-store.d.ts.map +0 -1
  186. package/node_modules/goah-runner-pi/dist/credential-store.js +0 -69
  187. package/node_modules/goah-runner-pi/dist/credential-store.js.map +0 -1
  188. package/node_modules/goah-runner-pi/dist/env-spec.d.ts +0 -17
  189. package/node_modules/goah-runner-pi/dist/env-spec.d.ts.map +0 -1
  190. package/node_modules/goah-runner-pi/dist/env-spec.js +0 -95
  191. package/node_modules/goah-runner-pi/dist/env-spec.js.map +0 -1
  192. package/node_modules/goah-runner-pi/dist/index.d.ts +0 -64
  193. package/node_modules/goah-runner-pi/dist/index.d.ts.map +0 -1
  194. package/node_modules/goah-runner-pi/dist/index.js +0 -241
  195. package/node_modules/goah-runner-pi/dist/index.js.map +0 -1
  196. package/node_modules/goah-runner-pi/dist/model-provider.d.ts +0 -30
  197. package/node_modules/goah-runner-pi/dist/model-provider.d.ts.map +0 -1
  198. package/node_modules/goah-runner-pi/dist/model-provider.js +0 -96
  199. package/node_modules/goah-runner-pi/dist/model-provider.js.map +0 -1
  200. package/node_modules/goah-runner-pi/dist/pi-worker.d.ts +0 -29
  201. package/node_modules/goah-runner-pi/dist/pi-worker.d.ts.map +0 -1
  202. package/node_modules/goah-runner-pi/dist/pi-worker.js +0 -428
  203. package/node_modules/goah-runner-pi/dist/pi-worker.js.map +0 -1
  204. package/node_modules/goah-runner-pi/dist/test-helpers.d.ts +0 -4
  205. package/node_modules/goah-runner-pi/dist/test-helpers.d.ts.map +0 -1
  206. package/node_modules/goah-runner-pi/dist/test-helpers.js +0 -11
  207. package/node_modules/goah-runner-pi/dist/test-helpers.js.map +0 -1
  208. package/node_modules/goah-runner-pi/dist/verification-worker.d.ts +0 -2
  209. package/node_modules/goah-runner-pi/dist/verification-worker.d.ts.map +0 -1
  210. package/node_modules/goah-runner-pi/dist/verification-worker.js +0 -48
  211. package/node_modules/goah-runner-pi/dist/verification-worker.js.map +0 -1
  212. package/node_modules/goah-runner-pi/package.json +0 -28
  213. package/node_modules/goah-supervisor/dist/context-view.d.ts +0 -31
  214. package/node_modules/goah-supervisor/dist/context-view.d.ts.map +0 -1
  215. package/node_modules/goah-supervisor/dist/context-view.js +0 -71
  216. package/node_modules/goah-supervisor/dist/context-view.js.map +0 -1
  217. package/node_modules/goah-supervisor/dist/index.d.ts +0 -94
  218. package/node_modules/goah-supervisor/dist/index.d.ts.map +0 -1
  219. package/node_modules/goah-supervisor/dist/index.js +0 -888
  220. package/node_modules/goah-supervisor/dist/index.js.map +0 -1
  221. package/node_modules/goah-supervisor/dist/roles.d.ts +0 -3
  222. package/node_modules/goah-supervisor/dist/roles.d.ts.map +0 -1
  223. package/node_modules/goah-supervisor/dist/roles.js +0 -14
  224. package/node_modules/goah-supervisor/dist/roles.js.map +0 -1
  225. package/node_modules/goah-supervisor/dist/verification.d.ts +0 -82
  226. package/node_modules/goah-supervisor/dist/verification.d.ts.map +0 -1
  227. package/node_modules/goah-supervisor/dist/verification.js +0 -110
  228. package/node_modules/goah-supervisor/dist/verification.js.map +0 -1
  229. package/node_modules/goah-supervisor/package.json +0 -26
  230. package/node_modules/goah-testkit/dist/faux-runner-worker.d.ts +0 -2
  231. package/node_modules/goah-testkit/dist/faux-runner-worker.d.ts.map +0 -1
  232. package/node_modules/goah-testkit/dist/faux-runner-worker.js +0 -75
  233. package/node_modules/goah-testkit/dist/faux-runner-worker.js.map +0 -1
  234. package/node_modules/goah-testkit/dist/index.d.ts +0 -52
  235. package/node_modules/goah-testkit/dist/index.d.ts.map +0 -1
  236. package/node_modules/goah-testkit/dist/index.js +0 -113
  237. package/node_modules/goah-testkit/dist/index.js.map +0 -1
  238. package/node_modules/goah-testkit/dist/mock-connector-worker.d.ts +0 -2
  239. package/node_modules/goah-testkit/dist/mock-connector-worker.d.ts.map +0 -1
  240. package/node_modules/goah-testkit/dist/mock-connector-worker.js +0 -29
  241. package/node_modules/goah-testkit/dist/mock-connector-worker.js.map +0 -1
  242. package/node_modules/goah-testkit/package.json +0 -29
@@ -1,2 +1,342 @@
1
- export * from "goah-runner-pi";
2
- //# sourceMappingURL=runner-pi.d.ts.map
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
- export * from "goah-runner-pi";
2
- //# sourceMappingURL=runner-pi.js.map
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-X7UWW2PN.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-VWEV4LTH.js";
7
+ import "./chunk-X7UWW2PN.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
+ };