@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,63 +0,0 @@
1
- import type { EventInput, EventRecord, JsonValue } from "./kernel.js";
2
- export declare const SESSION_FORMAT_VERSION = 1;
3
- export declare const SESSION_MIN_READABLE_VERSION = 0;
4
- export type SessionEventType = "session.started" | "request.prepared" | "turn.started" | "message.user" | "message.assistant.delta" | "message.assistant.completed" | "tool.called" | "tool.completed" | "context.compacted" | "turn.completed" | "session.completed" | "session.interrupted";
5
- export interface SessionStarted {
6
- formatVersion: typeof SESSION_FORMAT_VERSION;
7
- provider: string;
8
- model: string;
9
- runner: string;
10
- contextWindowTokens: number;
11
- maxOutputTokensPerTurn: number;
12
- }
13
- export interface SessionMessage {
14
- id: string;
15
- role: "user" | "assistant" | "tool";
16
- content: JsonValue;
17
- toolCallId?: string;
18
- usage?: JsonValue;
19
- stopReason?: string;
20
- errorMessage?: string;
21
- }
22
- export interface RequestSnapshot {
23
- provider: string;
24
- model: string;
25
- systemPrompt: string;
26
- activeContext: string;
27
- messages: JsonValue[];
28
- tools: JsonValue[];
29
- modelConfig: JsonValue;
30
- sourceSeqs: number[];
31
- }
32
- export interface ReplayedSession {
33
- messages: SessionMessage[];
34
- status: "running" | "completed" | "interrupted";
35
- openToolCalls: Array<{
36
- callId: string;
37
- name: string;
38
- arguments: JsonValue;
39
- }>;
40
- lastRequest: RequestSnapshot | null;
41
- }
42
- export declare function isSessionEvent(event: Pick<EventRecord, "type">): event is EventRecord & {
43
- type: SessionEventType;
44
- };
45
- export declare class SessionFormatUnsupportedError extends Error {
46
- readonly foundVersion: number;
47
- readonly supportedVersion: number;
48
- constructor(foundVersion: number, supportedVersion?: number);
49
- }
50
- export declare class SessionEventUnsupportedError extends Error {
51
- readonly eventType: string;
52
- constructor(eventType: string);
53
- }
54
- export declare class SessionCorruptionError extends Error {
55
- constructor(message: string);
56
- }
57
- /** Import supported legacy records without rewriting the append-only source log. */
58
- export declare function upgradeSessionEvents(source: readonly EventRecord[]): EventRecord[];
59
- /** Rebuild the model-visible transcript from canonical, normalized session events. */
60
- export declare function replaySession(events: readonly EventRecord[]): ReplayedSession;
61
- /** Synthetic facts that close an interrupted session without hiding unknown tool outcomes. */
62
- export declare function interruptedSessionEvents(events: readonly EventRecord[], ts: string, actor: string): EventInput[];
63
- //# sourceMappingURL=session.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE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G,WAAW,GAAG,aAAa,CAAC;IAAC,aAAa,EAAE,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,SAAS,CAAA;KAAE,CAAC,CAAC;IAAC,WAAW,EAAE,eAAe,GAAG,IAAI,CAAA;CAAE;AAGnO,wBAAgB,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,GAAG,KAAK,IAAI,WAAW,GAAG;IAAE,IAAI,EAAE,gBAAgB,CAAA;CAAE,CAA8D;AAEjL,qBAAa,6BAA8B,SAAQ,KAAK;IAC1C,QAAQ,CAAC,YAAY,EAAE,MAAM;IAAE,QAAQ,CAAC,gBAAgB;gBAA/C,YAAY,EAAE,MAAM,EAAW,gBAAgB,SAAyB;CAC9F;AACD,qBAAa,4BAA6B,SAAQ,KAAK;IAAe,QAAQ,CAAC,SAAS,EAAE,MAAM;gBAAjB,SAAS,EAAE,MAAM;CAA6H;AAC7N,qBAAa,sBAAuB,SAAQ,KAAK;gBAAe,OAAO,EAAE,MAAM;CAA6D;AAE5I,oFAAoF;AACpF,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,WAAW,EAAE,GAAG,WAAW,EAAE,CAuBlF;AAED,sFAAsF;AACtF,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,WAAW,EAAE,GAAG,eAAe,CA2B7E;AAED,8FAA8F;AAC9F,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,SAAS,WAAW,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,UAAU,EAAE,CAOhH"}
@@ -1,115 +0,0 @@
1
- export const SESSION_FORMAT_VERSION = 1;
2
- export const SESSION_MIN_READABLE_VERSION = 0;
3
- const SESSION_TYPES = new Set(["session.started", "request.prepared", "turn.started", "message.user", "message.assistant.delta", "message.assistant.completed", "tool.called", "tool.completed", "context.compacted", "turn.completed", "session.completed", "session.interrupted"]);
4
- export function isSessionEvent(event) { return SESSION_TYPES.has(event.type); }
5
- export class SessionFormatUnsupportedError extends Error {
6
- foundVersion;
7
- supportedVersion;
8
- constructor(foundVersion, supportedVersion = SESSION_FORMAT_VERSION) {
9
- super(`session format ${foundVersion} is unsupported by this harness (supports ${supportedVersion}); upgrade the harness`);
10
- this.foundVersion = foundVersion;
11
- this.supportedVersion = supportedVersion;
12
- this.name = "SessionFormatUnsupportedError";
13
- }
14
- }
15
- export class SessionEventUnsupportedError extends Error {
16
- eventType;
17
- constructor(eventType) {
18
- super(`required session event is unknown to this harness: ${eventType}`);
19
- this.eventType = eventType;
20
- this.name = "SessionEventUnsupportedError";
21
- }
22
- }
23
- export class SessionCorruptionError extends Error {
24
- constructor(message) { super(message); this.name = "SessionCorruptionError"; }
25
- }
26
- /** Import supported legacy records without rewriting the append-only source log. */
27
- export function upgradeSessionEvents(source) {
28
- assertContiguous(source);
29
- const starts = source.filter((event) => event.type === "session.started");
30
- if (starts.length === 0) {
31
- if (source.some((event) => isSessionNamespace(event.type)))
32
- throw new SessionCorruptionError("session events exist without session.started");
33
- return [...source];
34
- }
35
- if (starts.length !== 1)
36
- throw new SessionCorruptionError("session stream contains multiple session.started events");
37
- const rawVersion = field(starts[0].data, "formatVersion");
38
- let version = rawVersion === undefined ? 0 : Number(rawVersion);
39
- if (!Number.isSafeInteger(version) || version < SESSION_MIN_READABLE_VERSION)
40
- throw new SessionCorruptionError(`invalid session format version: ${String(rawVersion)}`);
41
- if (version > SESSION_FORMAT_VERSION)
42
- throw new SessionFormatUnsupportedError(version);
43
- let events = [...source];
44
- while (version < SESSION_FORMAT_VERSION) {
45
- if (version === 0) {
46
- events = events.map((event) => event.type === "session.started" ? { ...event, data: { ...event.data, formatVersion: 1 } } : event);
47
- version = 1;
48
- }
49
- else
50
- throw new SessionFormatUnsupportedError(version);
51
- }
52
- for (const event of events) {
53
- if (!isSessionEvent(event) && isSessionNamespace(event.type) && event.ignorable !== true)
54
- throw new SessionEventUnsupportedError(event.type);
55
- }
56
- return events;
57
- }
58
- /** Rebuild the model-visible transcript from canonical, normalized session events. */
59
- export function replaySession(events) {
60
- const upgraded = upgradeSessionEvents(events);
61
- const messages = [];
62
- const calls = new Map();
63
- let status = "running";
64
- let lastRequest = null;
65
- for (const event of upgraded) {
66
- if (!isSessionEvent(event))
67
- continue;
68
- const data = event.data;
69
- if (event.type === "message.user" || event.type === "message.assistant.completed")
70
- messages.push(data.message);
71
- else if (event.type === "tool.called") {
72
- const call = { callId: String(data.callId), name: String(data.name), arguments: (data.arguments ?? null) };
73
- calls.set(call.callId, call);
74
- }
75
- else if (event.type === "tool.completed") {
76
- const callId = String(data.callId);
77
- calls.delete(callId);
78
- messages.push({ id: String(data.messageId ?? `tool:${callId}`), role: "tool", toolCallId: callId, content: (data.result ?? null) });
79
- }
80
- else if (event.type === "context.compacted") {
81
- const replaced = new Set(Array.isArray(data.replacedMessageIds) ? data.replacedMessageIds.map(String) : []);
82
- const kept = messages.filter((message) => !replaced.has(message.id));
83
- messages.splice(0, messages.length, ...kept);
84
- messages.unshift({ id: String(data.summaryMessageId), role: "user", content: String(data.summary) });
85
- }
86
- else if (event.type === "request.prepared")
87
- lastRequest = event.data;
88
- else if (event.type === "session.completed")
89
- status = "completed";
90
- else if (event.type === "session.interrupted")
91
- status = "interrupted";
92
- }
93
- return { messages, status, openToolCalls: [...calls.values()], lastRequest };
94
- }
95
- /** Synthetic facts that close an interrupted session without hiding unknown tool outcomes. */
96
- export function interruptedSessionEvents(events, ts, actor) {
97
- const replayed = replaySession(events);
98
- if (replayed.status !== "running" || !events.some((event) => event.type === "session.started"))
99
- return [];
100
- const streamId = events[0].streamId;
101
- const repairs = replayed.openToolCalls.map((call) => ({ streamId, ts, actor, type: "tool.completed", data: { callId: call.callId, messageId: `repair:${call.callId}`, result: { outcome: "unknown", synthetic: true, reason: "runner interrupted before a durable result" } } }));
102
- repairs.push({ streamId, ts, actor, type: "session.interrupted", data: { reason: "runner interrupted" } });
103
- return repairs;
104
- }
105
- function assertContiguous(events) {
106
- let expected = events[0]?.streamSeq ?? 1;
107
- for (const event of events) {
108
- if (event.streamSeq !== expected)
109
- throw new SessionCorruptionError(`session stream gap: expected ${expected}, got ${event.streamSeq}`);
110
- expected += 1;
111
- }
112
- }
113
- function isSessionNamespace(type) { return ["session.", "request.", "turn.", "message.", "tool.", "context."].some((prefix) => type.startsWith(prefix)); }
114
- function field(value, key) { return value && typeof value === "object" && !Array.isArray(value) ? value[key] : undefined; }
115
- //# sourceMappingURL=session.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"session.js","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC;AACxC,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC;AAO9C,MAAM,aAAa,GAAG,IAAI,GAAG,CAAmB,CAAC,iBAAiB,EAAE,kBAAkB,EAAE,cAAc,EAAE,cAAc,EAAE,yBAAyB,EAAE,6BAA6B,EAAE,aAAa,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,qBAAqB,CAAC,CAAC,CAAC;AACvS,MAAM,UAAU,cAAc,CAAC,KAAgC,IAAuD,OAAO,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,IAAwB,CAAC,CAAC,CAAC,CAAC;AAEjL,MAAM,OAAO,6BAA8B,SAAQ,KAAK;IACjC;IAA+B;IAApD,YAAqB,YAAoB,EAAW,mBAAmB,sBAAsB;QAAI,KAAK,CAAC,kBAAkB,YAAY,6CAA6C,gBAAgB,wBAAwB,CAAC,CAAC;QAAvM,iBAAY,GAAZ,YAAY,CAAQ;QAAW,qBAAgB,GAAhB,gBAAgB,CAAyB;QAAgI,IAAI,CAAC,IAAI,GAAG,+BAA+B,CAAC;IAAC,CAAC;CAC5Q;AACD,MAAM,OAAO,4BAA6B,SAAQ,KAAK;IAAwB;IAArB,YAAqB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OAAO,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAE,KAAiC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC"}
@@ -1,29 +0,0 @@
1
- {
2
- "name": "goah-ledger-contract",
3
- "private": true,
4
- "version": "0.6.0",
5
- "license": "Apache-2.0",
6
- "repository": {
7
- "type": "git",
8
- "url": "git+https://github.com/billc8128/opengoah.git",
9
- "directory": "packages/ledger-contract"
10
- },
11
- "engines": {
12
- "node": ">=24.0.0"
13
- },
14
- "files": [
15
- "dist",
16
- "!dist/**/*.test.*",
17
- "!dist/.tsbuildinfo"
18
- ],
19
- "type": "module",
20
- "main": "./dist/index.js",
21
- "types": "./dist/index.d.ts",
22
- "exports": {
23
- ".": "./dist/index.js",
24
- "./kernel": "./dist/kernel.js",
25
- "./session": "./dist/session.js",
26
- "./execution": "./dist/execution.js",
27
- "./metrics": "./dist/metrics.js"
28
- }
29
- }
@@ -1,77 +0,0 @@
1
- import { DatabaseSync } from "node:sqlite";
2
- import { type ActionSnapshot, type ActionStatus, type AuditAdvice, type Clock, type DelegationRequest, type DelegationResult, type EventInput, type EventRecord, type GoalSnapshot, type GoalCompletionRequest, type HandoffCommit, type InteractionCommit, type Ledger, type MailSnapshot, type MetricSample, type ReassignmentRequest, type ReassignmentResult, type ScheduleSnapshot, type WakeSnapshot, type WorkRecordSnapshot, type WorkRecordDiff, type WorkRecordUpdateRequest } from "goah-ledger-contract";
3
- type FaultPoint = "after_event_before_projection" | "after_delegation_event" | "after_reassignment_event";
4
- type FaultInjector = (point: FaultPoint) => void;
5
- export declare const SQLITE_SCHEMA_VERSION = 9;
6
- export interface SqliteLedgerOptions {
7
- faultInjector?: FaultInjector;
8
- clock?: Clock;
9
- busyTimeoutMs?: number;
10
- }
11
- export declare class SqliteLedger implements Ledger {
12
- #private;
13
- readonly db: DatabaseSync;
14
- constructor(path?: string, options?: SqliteLedgerOptions);
15
- close(): void;
16
- appendEvent(input: EventInput): EventRecord;
17
- appendEvents(inputs: EventInput[]): EventRecord[];
18
- readStream(streamId: string, fromStreamSeq?: number): EventRecord[];
19
- putGoal(goal: GoalSnapshot, actor: string, wakeId?: string): EventRecord;
20
- updateWorkRecord(request: WorkRecordUpdateRequest, actor: string): WorkRecordSnapshot;
21
- commitDelegation(request: DelegationRequest, actor: string, wakeId?: string): DelegationResult;
22
- commitReassignment(request: ReassignmentRequest, actor: string, wakeId?: string): ReassignmentResult;
23
- completeGoal(request: GoalCompletionRequest, actor: string, wakeId?: string): GoalSnapshot;
24
- putSchedule(value: ScheduleSnapshot, actor: string, wakeId?: string): EventRecord;
25
- enqueueWake(input: WakeSnapshot, actor: string): {
26
- event: EventRecord;
27
- created: boolean;
28
- };
29
- claimNextWake(now: string, leaseUntil: string, leaseToken: string): WakeSnapshot | null;
30
- markWakeRunning(id: string, now: string, leaseToken: string): WakeSnapshot;
31
- attachWakeProcess(id: string, leaseToken: string, pid: number, now: string): WakeSnapshot;
32
- renewWakeLease(id: string, leaseToken: string, leaseUntil: string, now: string): WakeSnapshot;
33
- finishWake(id: string, status: "done" | "abnormal" | "merge_blocked", now: string): WakeSnapshot;
34
- expiredWakes(now: string): WakeSnapshot[];
35
- recoverExpiredWake(id: string, now: string): WakeSnapshot;
36
- appendRunnerEvent(input: EventInput, leaseToken: string): EventRecord;
37
- requestAction(action: ActionSnapshot, actor: string, wakeId?: string): EventRecord;
38
- approveAction(id: string, approver: string, reason: string, evidence: number[]): ActionSnapshot;
39
- rejectAction(id: string, approver: string, reason: string, evidence: number[]): ActionSnapshot;
40
- transitionAction(id: string, status: ActionStatus, patch?: Partial<Pick<ActionSnapshot, "externalRef" | "reconciledAt">>): ActionSnapshot;
41
- recoverDispatchingActions(): ActionSnapshot[];
42
- putAuditAdvice(id: string, input: Omit<AuditAdvice, "at">, wakeId?: string): ActionSnapshot;
43
- ackAuditAdvice(id: string, agent: string): ActionSnapshot;
44
- putMail(mail: MailSnapshot, actor: string, wakeId?: string): EventRecord;
45
- commitHandoff(commit: HandoffCommit): EventRecord;
46
- commitInteraction(commit: InteractionCommit): EventRecord;
47
- dueSchedules(now: string): ScheduleSnapshot[];
48
- unreadMail(agent: string): MailSnapshot[];
49
- unackedAuditAdvice(agent: string): ActionSnapshot[];
50
- lastEvent(actor: string, type: string): EventRecord | null;
51
- latestEvent(): EventRecord | null;
52
- eventsForWake(wakeId: string): EventRecord[];
53
- wake(id: string): WakeSnapshot | null;
54
- wakeByTrigger(agent: string, triggerRef: string): WakeSnapshot | null;
55
- queuedWakeForAgent(agent: string): WakeSnapshot | null;
56
- action(id: string): ActionSnapshot | null;
57
- goalsForOwner(owner: string): GoalSnapshot[];
58
- goal(id: string): GoalSnapshot | null;
59
- workRecord(goalId: string): WorkRecordSnapshot | null;
60
- workRecordHistory(goalId: string): WorkRecordSnapshot[];
61
- workRecordDiff(goalId: string, fromRevision: number, toRevision: number): WorkRecordDiff;
62
- searchWorkRecords(query: string, limit?: number): WorkRecordSnapshot[];
63
- triggeringMail(): MailSnapshot[];
64
- eventsSince(seq: number, types?: string[]): EventRecord[];
65
- searchEvents(query: string, limit?: number): EventRecord[];
66
- metricSamples(goalId: string): MetricSample[];
67
- events(): EventRecord[];
68
- goals(): GoalSnapshot[];
69
- workRecords(): WorkRecordSnapshot[];
70
- schedules(): ScheduleSnapshot[];
71
- wakes(): WakeSnapshot[];
72
- actions(): ActionSnapshot[];
73
- mailbox(): MailSnapshot[];
74
- rebuildProjections(): void;
75
- }
76
- export {};
77
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAKL,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,KAAK,EAEV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