@goah/cli 0.13.3 → 0.13.5
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/{chunk-7E7V6OIU.js → chunk-24NAHA3D.js} +16 -6
- package/dist/{chunk-YH6YJ2IB.js → chunk-CDELLMIJ.js} +37 -10
- package/dist/{chunk-D2DVAH37.js → chunk-J32EKOQ4.js} +1 -1
- package/dist/{chunk-KJ4HJCTK.js → chunk-ORAANUAR.js} +18 -25
- package/dist/{chunk-QBD6EJ2Z.js → chunk-RDUUXBZ2.js} +114 -51
- package/dist/cli.js +38 -18
- package/dist/console/assets/{index-B1vGMXKr.js → index-DYdJZskp.js} +5 -5
- package/dist/console/assets/{index-B1vGMXKr.js.map → index-DYdJZskp.js.map} +1 -1
- package/dist/console/index.html +1 -1
- package/dist/{dist-KNR2XL6J.js → dist-EYYNPOYG.js} +1 -1
- package/dist/execution.d.ts +29 -6
- package/dist/faux-runner-worker.js +13 -6
- package/dist/index.d.ts +29 -6
- package/dist/index.js +5 -5
- package/dist/pi-worker.js +59 -17
- package/dist/runner-pi.d.ts +26 -9
- package/dist/runner-pi.js +1 -1
- package/dist/{runner-registry-GD4BYCQC.js → runner-registry-XCGUS2P3.js} +2 -2
- package/dist/sqlite.d.ts +4 -2
- package/dist/sqlite.js +1 -1
- package/dist/supervisor.d.ts +27 -5
- package/dist/supervisor.js +1 -1
- package/dist/testkit.d.ts +26 -7
- package/dist/testkit.js +5 -1
- package/package.json +1 -1
package/dist/supervisor.d.ts
CHANGED
|
@@ -277,6 +277,28 @@ interface RunnerTraceEvent {
|
|
|
277
277
|
type: string;
|
|
278
278
|
data: JsonValue;
|
|
279
279
|
}
|
|
280
|
+
type AssistantLiveDelta = {
|
|
281
|
+
type: "start" | "text_start" | "text_end" | "thinking_start" | "thinking_end" | "toolcall_start" | "toolcall_end";
|
|
282
|
+
contentIndex?: number;
|
|
283
|
+
} | {
|
|
284
|
+
type: "text_delta" | "thinking_delta" | "toolcall_delta";
|
|
285
|
+
contentIndex: number;
|
|
286
|
+
delta: string;
|
|
287
|
+
};
|
|
288
|
+
interface RunnerLiveEvent {
|
|
289
|
+
type: "message.assistant.delta";
|
|
290
|
+
data: {
|
|
291
|
+
messageId: string;
|
|
292
|
+
delta: AssistantLiveDelta;
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
interface TurnLiveSnapshot {
|
|
296
|
+
revision: number;
|
|
297
|
+
messageId: string;
|
|
298
|
+
text: string;
|
|
299
|
+
thinking: string;
|
|
300
|
+
thinkingActive: boolean;
|
|
301
|
+
}
|
|
280
302
|
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
303
|
type RunnerControlMethod = "goal.handoff.validate";
|
|
282
304
|
type RunnerRpcMethod = AgentCapability | RunnerControlMethod;
|
|
@@ -304,9 +326,6 @@ interface TurnContext {
|
|
|
304
326
|
activeGoal: GoalSnapshot | null;
|
|
305
327
|
goalCommitment: GoalCommitment | null;
|
|
306
328
|
}
|
|
307
|
-
interface AssistantResponse {
|
|
308
|
-
content: string;
|
|
309
|
-
}
|
|
310
329
|
interface RunRequest {
|
|
311
330
|
agent: string;
|
|
312
331
|
execution: TurnSnapshot;
|
|
@@ -316,11 +335,12 @@ interface RunRequest {
|
|
|
316
335
|
context: JsonValue;
|
|
317
336
|
now(): string;
|
|
318
337
|
emit(event: RunnerTraceEvent): void;
|
|
338
|
+
emitLive?(event: RunnerLiveEvent): void;
|
|
319
339
|
rpc?(method: RunnerRpcMethod, params: JsonValue): Promise<JsonValue>;
|
|
320
340
|
}
|
|
321
341
|
type RunnerCandidateResult = {
|
|
322
342
|
outcome: "completed";
|
|
323
|
-
|
|
343
|
+
finalMessageId: string;
|
|
324
344
|
handoff?: TurnOutput;
|
|
325
345
|
} | {
|
|
326
346
|
outcome: "abnormal";
|
|
@@ -398,7 +418,8 @@ interface Ledger extends EventStore {
|
|
|
398
418
|
renewTurnLease(id: string, leaseToken: string, leaseUntil: string, now: string): TurnSnapshot;
|
|
399
419
|
appendTurnEvent(input: EventInput, leaseToken: string): EventRecord;
|
|
400
420
|
repairTurnAttempt(id: string, reason: string, now: string, actor: string): TurnItemSnapshot[];
|
|
401
|
-
finishTurn(id: string, status: "
|
|
421
|
+
finishTurn(id: string, status: "failed" | "interrupted", error: JsonValue, now: string, actor: string): TurnSnapshot;
|
|
422
|
+
commitTurnResponse(id: string, responseItemId: string, now: string, actor: string, mailIds?: string[]): TurnSnapshot;
|
|
402
423
|
releaseTurnProcess(id: string, actor: string): TurnSnapshot;
|
|
403
424
|
putMail(mail: MailSnapshot, actor: string, wakeId?: string): EventRecord;
|
|
404
425
|
putMails(mail: MailSnapshot[], actor: string, wakeId?: string): EventRecord[];
|
|
@@ -576,6 +597,7 @@ declare class Supervisor {
|
|
|
576
597
|
goal: GoalSnapshot;
|
|
577
598
|
}>;
|
|
578
599
|
interruptTurn(turnId: string): Promise<TurnSnapshot>;
|
|
600
|
+
liveTurnSnapshot(turnId: string, afterRevision?: number): TurnLiveSnapshot | null;
|
|
579
601
|
sendToCeo(body: JsonValue): Promise<{
|
|
580
602
|
threadId: string;
|
|
581
603
|
turnId: string;
|
package/dist/supervisor.js
CHANGED
package/dist/testkit.d.ts
CHANGED
|
@@ -269,6 +269,7 @@ type HandoffValidationResult = {
|
|
|
269
269
|
token: string;
|
|
270
270
|
goalId: string;
|
|
271
271
|
goalRevision: number;
|
|
272
|
+
messageItemId: string;
|
|
272
273
|
} | {
|
|
273
274
|
accepted: false;
|
|
274
275
|
fatal: boolean;
|
|
@@ -282,6 +283,21 @@ interface RunnerTraceEvent {
|
|
|
282
283
|
type: string;
|
|
283
284
|
data: JsonValue;
|
|
284
285
|
}
|
|
286
|
+
type AssistantLiveDelta = {
|
|
287
|
+
type: "start" | "text_start" | "text_end" | "thinking_start" | "thinking_end" | "toolcall_start" | "toolcall_end";
|
|
288
|
+
contentIndex?: number;
|
|
289
|
+
} | {
|
|
290
|
+
type: "text_delta" | "thinking_delta" | "toolcall_delta";
|
|
291
|
+
contentIndex: number;
|
|
292
|
+
delta: string;
|
|
293
|
+
};
|
|
294
|
+
interface RunnerLiveEvent {
|
|
295
|
+
type: "message.assistant.delta";
|
|
296
|
+
data: {
|
|
297
|
+
messageId: string;
|
|
298
|
+
delta: AssistantLiveDelta;
|
|
299
|
+
};
|
|
300
|
+
}
|
|
285
301
|
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";
|
|
286
302
|
type RunnerControlMethod = "goal.handoff.validate";
|
|
287
303
|
type RunnerRpcMethod = AgentCapability | RunnerControlMethod;
|
|
@@ -296,9 +312,6 @@ interface TurnContext {
|
|
|
296
312
|
activeGoal: GoalSnapshot | null;
|
|
297
313
|
goalCommitment: GoalCommitment | null;
|
|
298
314
|
}
|
|
299
|
-
interface AssistantResponse {
|
|
300
|
-
content: string;
|
|
301
|
-
}
|
|
302
315
|
interface RunRequest {
|
|
303
316
|
agent: string;
|
|
304
317
|
execution: TurnSnapshot;
|
|
@@ -308,6 +321,7 @@ interface RunRequest {
|
|
|
308
321
|
context: JsonValue;
|
|
309
322
|
now(): string;
|
|
310
323
|
emit(event: RunnerTraceEvent): void;
|
|
324
|
+
emitLive?(event: RunnerLiveEvent): void;
|
|
311
325
|
rpc?(method: RunnerRpcMethod, params: JsonValue): Promise<JsonValue>;
|
|
312
326
|
}
|
|
313
327
|
interface HandoffCommit {
|
|
@@ -370,7 +384,8 @@ interface Ledger extends EventStore {
|
|
|
370
384
|
renewTurnLease(id: string, leaseToken: string, leaseUntil: string, now: string): TurnSnapshot;
|
|
371
385
|
appendTurnEvent(input: EventInput, leaseToken: string): EventRecord;
|
|
372
386
|
repairTurnAttempt(id: string, reason: string, now: string, actor: string): TurnItemSnapshot[];
|
|
373
|
-
finishTurn(id: string, status: "
|
|
387
|
+
finishTurn(id: string, status: "failed" | "interrupted", error: JsonValue, now: string, actor: string): TurnSnapshot;
|
|
388
|
+
commitTurnResponse(id: string, responseItemId: string, now: string, actor: string, mailIds?: string[]): TurnSnapshot;
|
|
374
389
|
releaseTurnProcess(id: string, actor: string): TurnSnapshot;
|
|
375
390
|
putMail(mail: MailSnapshot, actor: string, wakeId?: string): EventRecord;
|
|
376
391
|
putMails(mail: MailSnapshot[], actor: string, wakeId?: string): EventRecord[];
|
|
@@ -457,7 +472,8 @@ declare class SqliteLedger implements Ledger {
|
|
|
457
472
|
renewTurnLease(id: string, leaseToken: string, leaseUntil: string, now: string): TurnSnapshot;
|
|
458
473
|
appendTurnEvent(input: EventInput, leaseToken: string): EventRecord;
|
|
459
474
|
repairTurnAttempt(id: string, reason: string, now: string, actor: string): TurnItemSnapshot[];
|
|
460
|
-
finishTurn(id: string, status: "
|
|
475
|
+
finishTurn(id: string, status: "failed" | "interrupted", error: JsonValue, now: string, actor: string): TurnSnapshot;
|
|
476
|
+
commitTurnResponse(id: string, responseItemId: string, now: string, actor: string, mailIds?: string[]): TurnSnapshot;
|
|
461
477
|
releaseTurnProcess(id: string, actor: string): TurnSnapshot;
|
|
462
478
|
putMail(mail: MailSnapshot, actor: string, wakeId?: string): EventRecord;
|
|
463
479
|
putMails(mails: MailSnapshot[], actor: string, wakeId?: string): EventRecord[];
|
|
@@ -491,14 +507,17 @@ declare class SqliteLedger implements Ledger {
|
|
|
491
507
|
rebuildProjections(): void;
|
|
492
508
|
}
|
|
493
509
|
|
|
510
|
+
interface PiAssistantResponse {
|
|
511
|
+
content: string;
|
|
512
|
+
}
|
|
494
513
|
interface PiStep {
|
|
495
514
|
trace?: Array<{
|
|
496
515
|
type: string;
|
|
497
516
|
data: JsonValue;
|
|
498
517
|
}>;
|
|
499
|
-
response?:
|
|
518
|
+
response?: PiAssistantResponse;
|
|
500
519
|
handoff?: {
|
|
501
|
-
response:
|
|
520
|
+
response: PiAssistantResponse;
|
|
502
521
|
handoff: AgentHandoff;
|
|
503
522
|
};
|
|
504
523
|
stopped?: boolean;
|
package/dist/testkit.js
CHANGED
|
@@ -2,7 +2,7 @@ import { createRequire as __goahCreateRequire } from "node:module";
|
|
|
2
2
|
const require = __goahCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
SqliteLedger
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-CDELLMIJ.js";
|
|
6
6
|
import "./chunk-4KA63VNZ.js";
|
|
7
7
|
import "./chunk-KAO7WIXG.js";
|
|
8
8
|
import "./chunk-R6I3VKME.js";
|
|
@@ -107,6 +107,10 @@ function assertLedgerConformance(create) {
|
|
|
107
107
|
throw new Error("ledger conformance: consumed Wake did not link its Turn");
|
|
108
108
|
if (ledger.wakeTriggers("z").some((trigger) => trigger.status !== "resolved"))
|
|
109
109
|
throw new Error("ledger conformance: consumed Wake retained pending triggers");
|
|
110
|
+
ledger.putTurnItem({ id: "turn:a:answer", turnId: turn.id, ordinal: 1, type: "assistant_message", status: "completed", data: { text: "verified" }, createdAt: clock.now().toISOString(), completedAt: clock.now().toISOString() }, "a");
|
|
111
|
+
ledger.commitTurnResponse(turn.id, "turn:a:answer", clock.now().toISOString(), "supervisor");
|
|
112
|
+
if (ledger.turn(turn.id)?.status !== "completed" || !ledger.readStream(`turn:${turn.id}`).some((item) => item.type === "response.committed" && item.data.messageItemId === "turn:a:answer"))
|
|
113
|
+
throw new Error("ledger conformance: canonical Assistant response was not committed");
|
|
110
114
|
if (first.event.ts !== clock.now().toISOString())
|
|
111
115
|
throw new Error("ledger conformance: injected clock was ignored");
|
|
112
116
|
const informational = ledger.appendEvent({ streamId: "conformance:events", ts: clock.now().toISOString(), actor: "a", type: "transcript.conformance_info", data: {}, ignorable: true });
|