@goah/cli 0.10.2 → 0.11.0
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/cli.js +6 -3
- package/dist/cli.js.map +1 -1
- package/dist/console/assets/{index-BPOrMqEr.js → index-BJTGvlCH.js} +2 -2
- package/dist/console/assets/{index-BPOrMqEr.js.map → index-BJTGvlCH.js.map} +1 -1
- package/dist/console/index.html +1 -1
- package/dist/control.d.ts +14 -0
- package/dist/control.d.ts.map +1 -1
- package/dist/control.js +13 -5
- package/dist/control.js.map +1 -1
- package/dist/tui.d.ts +1 -1
- package/dist/tui.d.ts.map +1 -1
- package/dist/tui.js +51 -10
- package/dist/tui.js.map +1 -1
- package/dist/web-console.js +1 -2
- package/dist/web-console.js.map +1 -1
- package/node_modules/goah-ledger-contract/dist/execution.d.ts +79 -2
- package/node_modules/goah-ledger-contract/dist/execution.d.ts.map +1 -1
- package/node_modules/goah-ledger-contract/dist/execution.js +13 -2
- package/node_modules/goah-ledger-contract/dist/execution.js.map +1 -1
- package/node_modules/goah-ledger-contract/dist/kernel.d.ts +2 -1
- package/node_modules/goah-ledger-contract/dist/kernel.d.ts.map +1 -1
- package/node_modules/goah-ledger-contract/dist/kernel.js +2 -1
- package/node_modules/goah-ledger-contract/dist/kernel.js.map +1 -1
- package/node_modules/goah-ledger-sqlite/dist/index.d.ts +9 -2
- package/node_modules/goah-ledger-sqlite/dist/index.d.ts.map +1 -1
- package/node_modules/goah-ledger-sqlite/dist/index.js +183 -25
- package/node_modules/goah-ledger-sqlite/dist/index.js.map +1 -1
- package/node_modules/goah-runner-pi/dist/index.d.ts +2 -1
- package/node_modules/goah-runner-pi/dist/index.d.ts.map +1 -1
- package/node_modules/goah-runner-pi/dist/index.js +4 -2
- package/node_modules/goah-runner-pi/dist/index.js.map +1 -1
- package/node_modules/goah-runner-pi/dist/pi-worker.d.ts.map +1 -1
- package/node_modules/goah-runner-pi/dist/pi-worker.js +60 -16
- package/node_modules/goah-runner-pi/dist/pi-worker.js.map +1 -1
- package/node_modules/goah-runner-pi/dist/test-helpers.d.ts.map +1 -1
- package/node_modules/goah-runner-pi/dist/test-helpers.js +1 -0
- package/node_modules/goah-runner-pi/dist/test-helpers.js.map +1 -1
- package/node_modules/goah-supervisor/dist/context-view.d.ts.map +1 -1
- package/node_modules/goah-supervisor/dist/context-view.js +1 -0
- package/node_modules/goah-supervisor/dist/context-view.js.map +1 -1
- package/node_modules/goah-supervisor/dist/index.d.ts +7 -2
- package/node_modules/goah-supervisor/dist/index.d.ts.map +1 -1
- package/node_modules/goah-supervisor/dist/index.js +185 -34
- package/node_modules/goah-supervisor/dist/index.js.map +1 -1
- package/node_modules/goah-supervisor/dist/roles.js +2 -2
- package/node_modules/goah-supervisor/dist/roles.js.map +1 -1
- package/node_modules/goah-testkit/dist/faux-runner-worker.js +34 -7
- package/node_modules/goah-testkit/dist/faux-runner-worker.js.map +1 -1
- package/node_modules/goah-testkit/dist/index.d.ts +1 -0
- package/node_modules/goah-testkit/dist/index.d.ts.map +1 -1
- package/node_modules/goah-testkit/dist/index.js +5 -5
- package/node_modules/goah-testkit/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution.d.ts","sourceRoot":"","sources":["../src/execution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,KAAK,UAAU,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AACnH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEjD,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,UAAU,GAAG,eAAe,CAAC;AACjG,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG,UAAU,GAAG,aAAa,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;AACzG,MAAM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AAC,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,GAAG,IAAI,CAA0H;AACpM,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAMlD;AACD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI,CAAyZ;AACzd,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,CAO5D;AACD,wBAAgB,aAAa,CAAC,QAAQ,EAAE,iBAAiB,EAAE,IAAI,EAAE,MAAM,GAAG,mBAAmB,GAAG,IAAI,CAAyF"}
|
|
@@ -7,8 +7,15 @@ export function assertActionTransition(from, to) { if (!actionTransitions[from].
|
|
|
7
7
|
throw new Error(`invalid action transition: ${from} -> ${to}`); }
|
|
8
8
|
export function assertGoalTransition(from, to) { if (from !== to && !goalTransitions[from].includes(to))
|
|
9
9
|
throw new Error(`invalid goal transition: ${from} -> ${to}`); }
|
|
10
|
-
export function assertHandoff(value) {
|
|
11
|
-
|
|
10
|
+
export function assertHandoff(value) {
|
|
11
|
+
if ("goalId" in value) {
|
|
12
|
+
if (!value.goalId.trim() || !Number.isInteger(value.goalRevision) || !Number.isInteger(value.recordRevision) || !["progress", "waiting", "blocked", "completion_proposed"].includes(value.outcome) || !Array.isArray(value.evidence))
|
|
13
|
+
throw new Error("invalid Goal handoff");
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
if (!Array.isArray(value.observations) || !Array.isArray(value.results) || !Array.isArray(value.nextSteps))
|
|
17
|
+
throw new Error("invalid handoff: observations, results and nextSteps are required arrays");
|
|
18
|
+
}
|
|
12
19
|
export function assertActionRequest(value) { if (!value.reason.trim())
|
|
13
20
|
throw new Error("action reason is required"); if (value.evidence.length === 0)
|
|
14
21
|
throw new Error("action evidence is required"); if (value.status !== "requested")
|
|
@@ -20,8 +27,12 @@ export function assertGoalSnapshot(value) {
|
|
|
20
27
|
throw new Error("goal objective and owner are required");
|
|
21
28
|
if (value.observationMethod !== null && !value.observationMethod.trim())
|
|
22
29
|
throw new Error("goal observation method cannot be blank");
|
|
30
|
+
if (value.verificationMethod !== null && !value.verificationMethod.trim())
|
|
31
|
+
throw new Error("goal verification method cannot be blank");
|
|
23
32
|
if (value.parentId !== null && value.observationMethod === null)
|
|
24
33
|
throw new Error("child goal observation method is required");
|
|
34
|
+
if (value.parentId !== null && value.verificationMethod === null)
|
|
35
|
+
throw new Error("child goal verification method is required");
|
|
25
36
|
if (!["active", "paused", "blocked", "complete"].includes(value.phase))
|
|
26
37
|
throw new Error(`invalid goal phase: ${value.phase}`);
|
|
27
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution.js","sourceRoot":"","sources":["../src/execution.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"execution.js","sourceRoot":"","sources":["../src/execution.ts"],"names":[],"mappings":"AA0KA,MAAM,eAAe,GAA8C,EAAE,MAAM,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,UAAU,CAAC,EAAE,OAAO,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,eAAe,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,CAAC;AAC5O,MAAM,iBAAiB,GAAkD,EAAE,SAAS,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC,aAAa,EAAE,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAC,WAAW,EAAE,QAAQ,EAAE,SAAS,CAAC,EAAE,OAAO,EAAE,CAAC,aAAa,EAAE,WAAW,EAAE,QAAQ,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;AACjR,MAAM,eAAe,GAA4C,EAAE,MAAM,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,UAAU,CAAC,EAAE,MA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B,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,IAAI,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;IACvI,IAAI,KAAK,CAAC,QAAQ,KAAK,IAAI,IAAI,KAAK,CAAC,iBAAiB,KAAK,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;IAC9H,IAAI,KAAK,CAAC,QAAQ,KAAK,IAAI,IAAI,KAAK,CAAC,kBAAkB,KAAK,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;IAChI,IAAI,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,uBAAuB,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;AAChI,CAAC;AACD,MAAM,UAAU,aAAa,CAAC,QAA2B,EAAE,IAAY,IAAgC,OAAO,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const CONTRACT_VERSION: "0.
|
|
1
|
+
export declare const CONTRACT_VERSION: "0.6.0";
|
|
2
2
|
export declare const CONTRACT_STABILITY: "experimental";
|
|
3
3
|
export type JsonPrimitive = string | number | boolean | null;
|
|
4
4
|
export type JsonValue = JsonPrimitive | JsonValue[] | {
|
|
@@ -32,5 +32,6 @@ export interface Clock {
|
|
|
32
32
|
export declare function wakeStream(wakeId: string): string;
|
|
33
33
|
export declare function controlStream(actor?: string): string;
|
|
34
34
|
export declare function goalStream(goalId: string): string;
|
|
35
|
+
export declare function workRecordStream(goalId: string): string;
|
|
35
36
|
export declare function memoryStream(agent: string): string;
|
|
36
37
|
//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E,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IAC1D,MAAM,IAAI,WAAW,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,KAAK;IAAG,GAAG,IAAI,IAAI,CAAA;CAAE;AAEtC,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAA6B;AAC/E,wBAAgB,aAAa,CAAC,KAAK,SAAe,GAAG,MAAM,CAA+B;AAC1F,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAA6B;AAC/E,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAoC;AAC5F,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAA8B"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export const CONTRACT_VERSION = "0.
|
|
1
|
+
export const CONTRACT_VERSION = "0.6.0";
|
|
2
2
|
export const CONTRACT_STABILITY = "experimental";
|
|
3
3
|
export function wakeStream(wakeId) { return `wake:${wakeId}`; }
|
|
4
4
|
export function controlStream(actor = "supervisor") { return `control:${actor}`; }
|
|
5
5
|
export function goalStream(goalId) { return `goal:${goalId}`; }
|
|
6
|
+
export function workRecordStream(goalId) { return `work-record:${goalId}`; }
|
|
6
7
|
export function memoryStream(agent) { return `memory:${agent}`; }
|
|
7
8
|
//# sourceMappingURL=kernel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kernel.js","sourceRoot":"","sources":["../src/kernel.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,OAAgB,CAAC;AACjD,MAAM,CAAC,MAAM,kBAAkB,GAAG,cAAuB,CAAC;AAgC1D,MAAM,UAAU,UAAU,CAAC,MAAc,IAAY,OAAO,QAAQ,MAAM,EAAE,CAAC,CAAC,CAAC;AAC/E,MAAM,UAAU,aAAa,CAAC,KAAK,GAAG,YAAY,IAAY,OAAO,WAAW,KAAK,EAAE,CAAC,CAAC,CAAC;AAC1F,MAAM,UAAU,UAAU,CAAC,MAAc,IAAY,OAAO,QAAQ,MAAM,EAAE,CAAC,CAAC,CAAC;AAC/E,MAAM,UAAU,YAAY,CAAC,KAAa,IAAY,OAAO,UAAU,KAAK,EAAE,CAAC,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"kernel.js","sourceRoot":"","sources":["../src/kernel.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,OAAgB,CAAC;AACjD,MAAM,CAAC,MAAM,kBAAkB,GAAG,cAAuB,CAAC;AAgC1D,MAAM,UAAU,UAAU,CAAC,MAAc,IAAY,OAAO,QAAQ,MAAM,EAAE,CAAC,CAAC,CAAC;AAC/E,MAAM,UAAU,aAAa,CAAC,KAAK,GAAG,YAAY,IAAY,OAAO,WAAW,KAAK,EAAE,CAAC,CAAC,CAAC;AAC1F,MAAM,UAAU,UAAU,CAAC,MAAc,IAAY,OAAO,QAAQ,MAAM,EAAE,CAAC,CAAC,CAAC;AAC/E,MAAM,UAAU,gBAAgB,CAAC,MAAc,IAAY,OAAO,eAAe,MAAM,EAAE,CAAC,CAAC,CAAC;AAC5F,MAAM,UAAU,YAAY,CAAC,KAAa,IAAY,OAAO,UAAU,KAAK,EAAE,CAAC,CAAC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
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 Ledger, type MailSnapshot, type MetricSample, type ReassignmentRequest, type ReassignmentResult, type ScheduleSnapshot, type WakeSnapshot } from "goah-ledger-contract";
|
|
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
3
|
type FaultPoint = "after_event_before_projection" | "after_delegation_event" | "after_reassignment_event";
|
|
4
4
|
type FaultInjector = (point: FaultPoint) => void;
|
|
5
|
-
export declare const SQLITE_SCHEMA_VERSION =
|
|
5
|
+
export declare const SQLITE_SCHEMA_VERSION = 9;
|
|
6
6
|
export interface SqliteLedgerOptions {
|
|
7
7
|
faultInjector?: FaultInjector;
|
|
8
8
|
clock?: Clock;
|
|
@@ -17,6 +17,7 @@ export declare class SqliteLedger implements Ledger {
|
|
|
17
17
|
appendEvents(inputs: EventInput[]): EventRecord[];
|
|
18
18
|
readStream(streamId: string, fromStreamSeq?: number): EventRecord[];
|
|
19
19
|
putGoal(goal: GoalSnapshot, actor: string, wakeId?: string): EventRecord;
|
|
20
|
+
updateWorkRecord(request: WorkRecordUpdateRequest, actor: string): WorkRecordSnapshot;
|
|
20
21
|
commitDelegation(request: DelegationRequest, actor: string, wakeId?: string): DelegationResult;
|
|
21
22
|
commitReassignment(request: ReassignmentRequest, actor: string, wakeId?: string): ReassignmentResult;
|
|
22
23
|
completeGoal(request: GoalCompletionRequest, actor: string, wakeId?: string): GoalSnapshot;
|
|
@@ -42,6 +43,7 @@ export declare class SqliteLedger implements Ledger {
|
|
|
42
43
|
ackAuditAdvice(id: string, agent: string): ActionSnapshot;
|
|
43
44
|
putMail(mail: MailSnapshot, actor: string, wakeId?: string): EventRecord;
|
|
44
45
|
commitHandoff(commit: HandoffCommit): EventRecord;
|
|
46
|
+
commitInteraction(commit: InteractionCommit): EventRecord;
|
|
45
47
|
dueSchedules(now: string): ScheduleSnapshot[];
|
|
46
48
|
unreadMail(agent: string): MailSnapshot[];
|
|
47
49
|
unackedAuditAdvice(agent: string): ActionSnapshot[];
|
|
@@ -54,12 +56,17 @@ export declare class SqliteLedger implements Ledger {
|
|
|
54
56
|
action(id: string): ActionSnapshot | null;
|
|
55
57
|
goalsForOwner(owner: string): GoalSnapshot[];
|
|
56
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[];
|
|
57
63
|
triggeringMail(): MailSnapshot[];
|
|
58
64
|
eventsSince(seq: number, types?: string[]): EventRecord[];
|
|
59
65
|
searchEvents(query: string, limit?: number): EventRecord[];
|
|
60
66
|
metricSamples(goalId: string): MetricSample[];
|
|
61
67
|
events(): EventRecord[];
|
|
62
68
|
goals(): GoalSnapshot[];
|
|
69
|
+
workRecords(): WorkRecordSnapshot[];
|
|
63
70
|
schedules(): ScheduleSnapshot[];
|
|
64
71
|
wakes(): WakeSnapshot[];
|
|
65
72
|
actions(): ActionSnapshot[];
|
|
@@ -1 +1 @@
|
|
|
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,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,WAAW,EAEhB,KAAK,YAAY,EACjB,KAAK,qBAAqB,EAC1B,KAAK,aAAa,
|
|
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,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,kBAAkB,EAAE;IACnC,SAAS,IAAI,gBAAgB,EAAE;IAC/B,KAAK,IAAI,YAAY,EAAE;IACvB,OAAO,IAAI,cAAc,EAAE;IAC3B,OAAO,IAAI,YAAY,EAAE;IAEzB,kBAAkB,IAAI,IAAI;CAkP3B"}
|
|
@@ -1,15 +1,29 @@
|
|
|
1
1
|
import { DatabaseSync } from "node:sqlite";
|
|
2
|
-
import { assertActionRequest, assertActionTransition, assertGoalSnapshot, assertGoalTransition, controlStream, goalStream, wakeStream, } from "goah-ledger-contract";
|
|
3
|
-
export const SQLITE_SCHEMA_VERSION =
|
|
2
|
+
import { assertActionRequest, assertActionTransition, assertGoalSnapshot, assertGoalTransition, controlStream, goalStream, wakeStream, workRecordStream, } from "goah-ledger-contract";
|
|
3
|
+
export const SQLITE_SCHEMA_VERSION = 9;
|
|
4
4
|
const createGoals = `CREATE TABLE IF NOT EXISTS goals (
|
|
5
5
|
id TEXT PRIMARY KEY,
|
|
6
6
|
parent_id TEXT REFERENCES goals(id),
|
|
7
7
|
objective TEXT NOT NULL,
|
|
8
8
|
observation_method TEXT CHECK(observation_method IS NULL OR length(trim(observation_method)) > 0),
|
|
9
|
+
verification_method TEXT CHECK(verification_method IS NULL OR length(trim(verification_method)) > 0),
|
|
9
10
|
owner TEXT NOT NULL,
|
|
10
11
|
phase TEXT NOT NULL CHECK(phase IN ('active','paused','blocked','complete')),
|
|
11
12
|
revision INTEGER NOT NULL CHECK(revision >= 0)
|
|
12
13
|
) STRICT;`;
|
|
14
|
+
const createWorkRecords = `CREATE TABLE IF NOT EXISTS work_records (
|
|
15
|
+
goal_id TEXT PRIMARY KEY REFERENCES goals(id),
|
|
16
|
+
record_revision INTEGER NOT NULL CHECK(record_revision >= 0),
|
|
17
|
+
goal_revision INTEGER NOT NULL CHECK(goal_revision >= 0),
|
|
18
|
+
content TEXT NOT NULL CHECK(length(trim(content)) > 0),
|
|
19
|
+
updated_by TEXT NOT NULL,
|
|
20
|
+
updated_in_turn TEXT NOT NULL,
|
|
21
|
+
updated_in_wake TEXT,
|
|
22
|
+
updated_at TEXT NOT NULL,
|
|
23
|
+
reason TEXT NOT NULL CHECK(length(trim(reason)) > 0),
|
|
24
|
+
evidence TEXT NOT NULL CHECK(json_valid(evidence)),
|
|
25
|
+
last_event_seq INTEGER NOT NULL REFERENCES events(seq)
|
|
26
|
+
) STRICT;`;
|
|
13
27
|
const createWakes = `CREATE TABLE IF NOT EXISTS wakes (
|
|
14
28
|
id TEXT PRIMARY KEY,
|
|
15
29
|
agent TEXT NOT NULL,
|
|
@@ -97,6 +111,7 @@ CREATE TABLE IF NOT EXISTS events (
|
|
|
97
111
|
UNIQUE(stream_id, stream_seq)
|
|
98
112
|
) STRICT;
|
|
99
113
|
${createGoals}
|
|
114
|
+
${createWorkRecords}
|
|
100
115
|
CREATE TABLE IF NOT EXISTS schedule (
|
|
101
116
|
id TEXT PRIMARY KEY,
|
|
102
117
|
agent TEXT NOT NULL,
|
|
@@ -150,33 +165,69 @@ export class SqliteLedger {
|
|
|
150
165
|
return this.db.prepare("SELECT * FROM events WHERE stream_id=? AND stream_seq>=? ORDER BY stream_seq").all(streamId, fromStreamSeq).map(mapEvent);
|
|
151
166
|
}
|
|
152
167
|
putGoal(goal, actor, wakeId) {
|
|
153
|
-
|
|
154
|
-
|
|
168
|
+
const normalized = normalizeGoal(goal);
|
|
169
|
+
assertGoalSnapshot(normalized);
|
|
170
|
+
const current = this.#getGoal(normalized.id);
|
|
155
171
|
if (current) {
|
|
156
|
-
if (
|
|
172
|
+
if (normalized.revision !== current.revision + 1)
|
|
157
173
|
throw new Error("goal revision CAS failed");
|
|
158
174
|
if (current.phase === "complete")
|
|
159
175
|
throw new Error("completed goal cannot be modified");
|
|
160
|
-
if (
|
|
176
|
+
if (normalized.parentId !== current.parentId)
|
|
161
177
|
throw new Error("goal reparenting is not supported");
|
|
162
|
-
if (
|
|
178
|
+
if (normalized.phase === "complete")
|
|
163
179
|
throw new Error("goal completion requires reason and evidence");
|
|
164
|
-
if (
|
|
165
|
-
throw new Error("objective revision must replace or invalidate
|
|
166
|
-
assertGoalTransition(current.phase,
|
|
180
|
+
if (normalized.objective !== current.objective && ((current.observationMethod !== null && normalized.observationMethod === current.observationMethod) || (current.verificationMethod !== null && normalized.verificationMethod === current.verificationMethod)))
|
|
181
|
+
throw new Error("objective revision must replace or invalidate observation and verification methods");
|
|
182
|
+
assertGoalTransition(current.phase, normalized.phase);
|
|
167
183
|
this.#assertGoalAuthority(current.parentId, actor);
|
|
168
184
|
}
|
|
169
185
|
else {
|
|
170
|
-
if (
|
|
186
|
+
if (normalized.revision !== 0)
|
|
171
187
|
throw new Error("new goal revision must be 0");
|
|
172
|
-
this.#assertGoalAuthority(
|
|
188
|
+
this.#assertGoalAuthority(normalized.parentId, actor);
|
|
173
189
|
}
|
|
174
|
-
return this.#
|
|
190
|
+
return this.#transaction(() => {
|
|
191
|
+
const event = this.#recordProjection("goals", normalized, actor, "goal.put", wakeId, undefined, undefined, goalStream(normalized.id));
|
|
192
|
+
if (!current)
|
|
193
|
+
this.#createWorkRecord(normalized, actor, wakeId ?? `goal:create:${normalized.id}`, wakeId);
|
|
194
|
+
return event;
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
updateWorkRecord(request, actor) {
|
|
198
|
+
if (!request.turnId.trim() || !request.reason.trim() || !request.content.trim())
|
|
199
|
+
throw new Error("work record turn, reason and content are required");
|
|
200
|
+
this.#assertEvidenceExists(request.evidence);
|
|
201
|
+
const goal = this.#getGoal(request.goalId);
|
|
202
|
+
if (!goal)
|
|
203
|
+
throw new Error("work record goal does not exist");
|
|
204
|
+
if (goal.revision !== request.goalRevision)
|
|
205
|
+
throw new Error("work record goal revision is stale");
|
|
206
|
+
this.#assertWorkRecordAuthority(goal, actor);
|
|
207
|
+
const current = this.workRecord(goal.id);
|
|
208
|
+
if (!current)
|
|
209
|
+
throw new Error("work record does not exist");
|
|
210
|
+
if (current.recordRevision !== request.expectedRevision)
|
|
211
|
+
throw new Error("work record revision CAS failed");
|
|
212
|
+
if (current.content === request.content)
|
|
213
|
+
throw new Error("work record content is unchanged");
|
|
214
|
+
return this.#transaction(() => this.#recordWorkRecord({
|
|
215
|
+
...current,
|
|
216
|
+
recordRevision: current.recordRevision + 1,
|
|
217
|
+
goalRevision: goal.revision,
|
|
218
|
+
content: request.content,
|
|
219
|
+
updatedBy: actor,
|
|
220
|
+
updatedInTurn: request.turnId,
|
|
221
|
+
updatedInWake: request.wakeId ?? null,
|
|
222
|
+
updatedAt: this.#now(),
|
|
223
|
+
reason: request.reason,
|
|
224
|
+
evidence: request.evidence,
|
|
225
|
+
}, "work_record.updated"));
|
|
175
226
|
}
|
|
176
227
|
commitDelegation(request, actor, wakeId) {
|
|
177
228
|
const existing = this.#delegationResult(request.id);
|
|
178
229
|
if (existing) {
|
|
179
|
-
if (existing.goal.id !== request.childGoal.id || existing.goal.parentId !== request.parentGoalId || existing.goal.objective !== request.childGoal.objective || existing.goal.observationMethod !== request.childGoal.observationMethod || existing.goal.owner !== request.childGoal.owner)
|
|
230
|
+
if (existing.goal.id !== request.childGoal.id || existing.goal.parentId !== request.parentGoalId || existing.goal.objective !== request.childGoal.objective || existing.goal.observationMethod !== request.childGoal.observationMethod || existing.goal.verificationMethod !== request.childGoal.verificationMethod || existing.goal.owner !== request.childGoal.owner)
|
|
180
231
|
throw new Error("delegation id was reused with a different child goal");
|
|
181
232
|
return existing;
|
|
182
233
|
}
|
|
@@ -184,7 +235,7 @@ export class SqliteLedger {
|
|
|
184
235
|
throw new Error("delegation id and reason are required");
|
|
185
236
|
if (request.childGoal.owner === actor)
|
|
186
237
|
throw new Error("delegate to a distinct worker agent; use goal.put for self-owned subgoals");
|
|
187
|
-
if (!request.childGoal.id.trim() || !request.childGoal.objective.trim() || !request.childGoal.observationMethod.trim() || !request.childGoal.owner.trim())
|
|
238
|
+
if (!request.childGoal.id.trim() || !request.childGoal.objective.trim() || !request.childGoal.observationMethod.trim() || !request.childGoal.verificationMethod.trim() || !request.childGoal.owner.trim())
|
|
188
239
|
throw new Error("delegation child goal is incomplete");
|
|
189
240
|
this.#assertEvidenceExists(request.evidence);
|
|
190
241
|
const parent = this.#getGoal(request.parentGoalId);
|
|
@@ -197,13 +248,13 @@ export class SqliteLedger {
|
|
|
197
248
|
if (this.#getGoal(request.childGoal.id))
|
|
198
249
|
throw new Error("delegation child goal already exists");
|
|
199
250
|
return this.#transaction(() => {
|
|
200
|
-
const goal = { ...request.childGoal, parentId: request.parentGoalId, phase: "active", revision: 0 };
|
|
251
|
+
const goal = normalizeGoal({ ...request.childGoal, parentId: request.parentGoalId, phase: "active", revision: 0 });
|
|
201
252
|
const mail = {
|
|
202
253
|
id: `delegation-mail:${request.id}`,
|
|
203
254
|
to: goal.owner,
|
|
204
255
|
from: actor,
|
|
205
256
|
level: "decision",
|
|
206
|
-
body: { type: "delegation", delegationId: request.id, goalId: goal.id, parentGoalId: request.parentGoalId, objective: goal.objective, observationMethod: goal.observationMethod, brief: request.brief, reason: request.reason, evidence: request.evidence },
|
|
257
|
+
body: { type: "delegation", delegationId: request.id, goalId: goal.id, parentGoalId: request.parentGoalId, objective: goal.objective, observationMethod: goal.observationMethod, verificationMethod: goal.verificationMethod ?? null, brief: request.brief, reason: request.reason, evidence: request.evidence },
|
|
207
258
|
readAt: null,
|
|
208
259
|
};
|
|
209
260
|
const wakeBase = {
|
|
@@ -228,6 +279,7 @@ export class SqliteLedger {
|
|
|
228
279
|
});
|
|
229
280
|
this.#faultInjector?.("after_delegation_event");
|
|
230
281
|
this.#recordProjection("goals", goal, actor, "goal.put", wakeId, undefined, undefined, goalStream(goal.id));
|
|
282
|
+
this.#createWorkRecord(goal, actor, wakeId ?? `delegation:${request.id}`, wakeId);
|
|
231
283
|
this.#recordProjection("mailbox", mail, actor, "mail.put", wakeId);
|
|
232
284
|
const wake = { ...wakeBase, enqueuedSeq: this.#nextEventSeq() };
|
|
233
285
|
this.#recordProjection("wakes", wake, "supervisor", "wake.enqueued", wake.id, undefined, wake.enqueuedSeq);
|
|
@@ -287,6 +339,8 @@ export class SqliteLedger {
|
|
|
287
339
|
return current;
|
|
288
340
|
if (current.observationMethod === null)
|
|
289
341
|
throw new Error("goal completion requires an observation method");
|
|
342
|
+
if (current.verificationMethod === null || current.verificationMethod === undefined)
|
|
343
|
+
throw new Error("goal completion requires a verification method");
|
|
290
344
|
this.#assertGoalAuthority(current.parentId, actor);
|
|
291
345
|
if (current.parentId === null && this.#hasNonCompleteDescendant(current.id))
|
|
292
346
|
throw new Error("root goal cannot complete while descendants remain non-complete");
|
|
@@ -296,7 +350,7 @@ export class SqliteLedger {
|
|
|
296
350
|
if (request.evidence.some((seq) => seq <= source.seq))
|
|
297
351
|
throw new Error("goal completion evidence predates the current revision");
|
|
298
352
|
return this.#transaction(() => {
|
|
299
|
-
this.#insertEvent({ streamId: goalStream(current.id), ts: this.#now(), actor, type: "goal.completion_decided", data: { goalId: current.id, revision: current.revision, observationMethod: current.observationMethod, reason: request.reason, evidence: request.evidence } });
|
|
353
|
+
this.#insertEvent({ streamId: goalStream(current.id), ts: this.#now(), actor, type: "goal.completion_decided", data: { goalId: current.id, revision: current.revision, observationMethod: current.observationMethod, verificationMethod: current.verificationMethod ?? null, reason: request.reason, evidence: request.evidence } });
|
|
300
354
|
const next = { ...current, phase: "complete", revision: current.revision + 1 };
|
|
301
355
|
this.#recordProjection("goals", next, actor, "goal.put", wakeId, undefined, undefined, goalStream(current.id));
|
|
302
356
|
return next;
|
|
@@ -331,7 +385,7 @@ export class SqliteLedger {
|
|
|
331
385
|
return this.#transaction(() => {
|
|
332
386
|
const row = this.db.prepare(`SELECT * FROM wakes w WHERE status='queued' AND NOT EXISTS (
|
|
333
387
|
SELECT 1 FROM wakes active WHERE active.agent=w.agent AND active.status IN ('leased','running')
|
|
334
|
-
) ORDER BY enqueued_seq LIMIT 1`).get();
|
|
388
|
+
) ORDER BY CASE WHEN trigger_ref LIKE 'interaction:%' THEN 0 ELSE 1 END,enqueued_seq LIMIT 1`).get();
|
|
335
389
|
if (!row)
|
|
336
390
|
return null;
|
|
337
391
|
const current = mapWake(row);
|
|
@@ -473,6 +527,22 @@ export class SqliteLedger {
|
|
|
473
527
|
return event;
|
|
474
528
|
});
|
|
475
529
|
}
|
|
530
|
+
commitInteraction(commit) {
|
|
531
|
+
return this.#transaction(() => {
|
|
532
|
+
const wake = this.#requiredWake(commit.wakeId);
|
|
533
|
+
if (wake.status !== "running" || wake.agent !== commit.agent)
|
|
534
|
+
throw new Error("interaction does not match a running wake");
|
|
535
|
+
const mailRow = this.db.prepare("SELECT * FROM mailbox WHERE id=?").get(commit.mailId);
|
|
536
|
+
if (!mailRow)
|
|
537
|
+
throw new Error("interaction mail does not exist");
|
|
538
|
+
const mail = mapMail(mailRow);
|
|
539
|
+
if (mail.to !== commit.agent || mail.readAt !== null)
|
|
540
|
+
throw new Error("interaction mail is not unread for the agent");
|
|
541
|
+
const event = this.#insertEvent({ streamId: wakeStream(commit.wakeId), ts: commit.ts, actor: commit.agent, type: "interaction.completed", data: { mailId: mail.id, response: commit.response } });
|
|
542
|
+
this.#recordProjection("mailbox", { ...mail, readAt: commit.ts }, "supervisor", "mail.read", commit.wakeId, commit.ts);
|
|
543
|
+
return event;
|
|
544
|
+
});
|
|
545
|
+
}
|
|
476
546
|
dueSchedules(now) { return this.db.prepare("SELECT * FROM schedule WHERE next_wake_at <= ? ORDER BY next_wake_at,id").all(now).map(mapSchedule); }
|
|
477
547
|
unreadMail(agent) { return this.db.prepare("SELECT * FROM mailbox WHERE to_agent=? AND read_at IS NULL ORDER BY rowid").all(agent).map(mapMail); }
|
|
478
548
|
unackedAuditAdvice(agent) { return this.db.prepare("SELECT * FROM actions WHERE agent=? AND audit_advice IS NOT NULL AND advice_acked=0 ORDER BY rowid").all(agent).map(mapAction); }
|
|
@@ -492,6 +562,22 @@ export class SqliteLedger {
|
|
|
492
562
|
action(id) { const row = this.db.prepare("SELECT * FROM actions WHERE id=?").get(id); return row ? mapAction(row) : null; }
|
|
493
563
|
goalsForOwner(owner) { return this.db.prepare("SELECT * FROM goals WHERE owner=? ORDER BY id").all(owner).map(mapGoal); }
|
|
494
564
|
goal(id) { return this.#getGoal(id); }
|
|
565
|
+
workRecord(goalId) { const row = this.db.prepare("SELECT * FROM work_records WHERE goal_id=?").get(goalId); return row ? mapWorkRecord(row) : null; }
|
|
566
|
+
workRecordHistory(goalId) {
|
|
567
|
+
return this.readStream(workRecordStream(goalId)).filter((event) => event.type === "work_record.created" || event.type === "work_record.updated").map((event) => mapWorkRecordEvent(event));
|
|
568
|
+
}
|
|
569
|
+
workRecordDiff(goalId, fromRevision, toRevision) {
|
|
570
|
+
const history = this.workRecordHistory(goalId);
|
|
571
|
+
const from = history.find((record) => record.recordRevision === fromRevision);
|
|
572
|
+
const to = history.find((record) => record.recordRevision === toRevision);
|
|
573
|
+
if (!from || !to)
|
|
574
|
+
throw new Error("work record diff revision does not exist");
|
|
575
|
+
return { goalId, fromRevision, toRevision, text: lineDiff(from.content, to.content) };
|
|
576
|
+
}
|
|
577
|
+
searchWorkRecords(query, limit = 50) {
|
|
578
|
+
return this.db.prepare(`SELECT e.* FROM events_fts f JOIN events e ON e.seq=f.rowid
|
|
579
|
+
WHERE events_fts MATCH ? AND e.type IN ('work_record.created','work_record.updated') ORDER BY rank LIMIT ?`).all(query, limit).map((row) => mapWorkRecordEvent(mapEvent(row)));
|
|
580
|
+
}
|
|
495
581
|
triggeringMail() { return this.db.prepare("SELECT * FROM mailbox WHERE read_at IS NULL AND level IN ('decision','emergency') ORDER BY rowid").all().map(mapMail); }
|
|
496
582
|
eventsSince(seq, types) {
|
|
497
583
|
const events = this.db.prepare("SELECT * FROM events WHERE seq>? ORDER BY seq").all(seq).map(mapEvent);
|
|
@@ -505,6 +591,7 @@ export class SqliteLedger {
|
|
|
505
591
|
}
|
|
506
592
|
events() { return this.db.prepare("SELECT * FROM events ORDER BY seq").all().map(mapEvent); }
|
|
507
593
|
goals() { return this.db.prepare("SELECT * FROM goals ORDER BY id").all().map(mapGoal); }
|
|
594
|
+
workRecords() { return this.db.prepare("SELECT * FROM work_records ORDER BY goal_id").all().map(mapWorkRecord); }
|
|
508
595
|
schedules() { return this.db.prepare("SELECT * FROM schedule ORDER BY id").all().map(mapSchedule); }
|
|
509
596
|
wakes() { return this.db.prepare("SELECT * FROM wakes ORDER BY enqueued_seq").all().map(mapWake); }
|
|
510
597
|
actions() { return this.db.prepare("SELECT * FROM actions ORDER BY id").all().map(mapAction); }
|
|
@@ -512,7 +599,7 @@ export class SqliteLedger {
|
|
|
512
599
|
rebuildProjections() {
|
|
513
600
|
const source = this.events();
|
|
514
601
|
this.#transaction(() => {
|
|
515
|
-
this.db.exec("DELETE FROM actions; DELETE FROM mailbox; DELETE FROM wakes; DELETE FROM schedule; DELETE FROM goals;");
|
|
602
|
+
this.db.exec("DELETE FROM work_records; DELETE FROM actions; DELETE FROM mailbox; DELETE FROM wakes; DELETE FROM schedule; DELETE FROM goals;");
|
|
516
603
|
for (const event of source) {
|
|
517
604
|
const data = event.data;
|
|
518
605
|
if (data.projection && data.snapshot)
|
|
@@ -562,6 +649,34 @@ export class SqliteLedger {
|
|
|
562
649
|
return next;
|
|
563
650
|
});
|
|
564
651
|
}
|
|
652
|
+
#createWorkRecord(goal, actor, turnId, wakeId, seed) {
|
|
653
|
+
return this.#recordWorkRecord({
|
|
654
|
+
goalId: goal.id,
|
|
655
|
+
recordRevision: 0,
|
|
656
|
+
goalRevision: goal.revision,
|
|
657
|
+
content: seed?.content ?? initialWorkRecord(),
|
|
658
|
+
updatedBy: actor,
|
|
659
|
+
updatedInTurn: turnId,
|
|
660
|
+
updatedInWake: wakeId ?? null,
|
|
661
|
+
updatedAt: this.#now(),
|
|
662
|
+
reason: "Goal created",
|
|
663
|
+
evidence: seed?.evidence ?? [],
|
|
664
|
+
lastEventSeq: 0,
|
|
665
|
+
}, "work_record.created");
|
|
666
|
+
}
|
|
667
|
+
#recordWorkRecord(snapshot, type) {
|
|
668
|
+
const seq = this.#nextEventSeq();
|
|
669
|
+
const committed = { ...snapshot, lastEventSeq: seq };
|
|
670
|
+
this.#recordProjection("work_records", committed, committed.updatedBy, type, committed.updatedInWake ?? undefined, committed.updatedAt, seq, workRecordStream(committed.goalId));
|
|
671
|
+
return committed;
|
|
672
|
+
}
|
|
673
|
+
#assertWorkRecordAuthority(goal, actor) {
|
|
674
|
+
if (goal.owner === actor || (goal.parentId === null && actor === "human"))
|
|
675
|
+
return;
|
|
676
|
+
const parent = goal.parentId ? this.#getGoal(goal.parentId) : null;
|
|
677
|
+
if (parent?.owner !== actor)
|
|
678
|
+
throw new Error("only the goal owner or parent owner may update its work record");
|
|
679
|
+
}
|
|
565
680
|
#assertGoalAuthority(parentId, actor) {
|
|
566
681
|
if (parentId === null) {
|
|
567
682
|
if (actor !== "human")
|
|
@@ -619,9 +734,12 @@ export class SqliteLedger {
|
|
|
619
734
|
}
|
|
620
735
|
#applyProjection(projection, raw, sourceSeq) {
|
|
621
736
|
if (projection === "goals") {
|
|
622
|
-
const
|
|
623
|
-
|
|
624
|
-
|
|
737
|
+
const v = normalizeGoal(raw);
|
|
738
|
+
this.db.prepare(`INSERT INTO goals VALUES (?,?,?,?,?,?,?,?) ON CONFLICT(id) DO UPDATE SET parent_id=excluded.parent_id,objective=excluded.objective,observation_method=excluded.observation_method,verification_method=excluded.verification_method,owner=excluded.owner,phase=excluded.phase,revision=excluded.revision`).run(v.id, v.parentId, v.objective, v.observationMethod, v.verificationMethod ?? null, v.owner, v.phase, v.revision);
|
|
739
|
+
}
|
|
740
|
+
else if (projection === "work_records") {
|
|
741
|
+
const v = raw;
|
|
742
|
+
this.db.prepare(`INSERT INTO work_records VALUES (?,?,?,?,?,?,?,?,?,?,?) ON CONFLICT(goal_id) DO UPDATE SET record_revision=excluded.record_revision,goal_revision=excluded.goal_revision,content=excluded.content,updated_by=excluded.updated_by,updated_in_turn=excluded.updated_in_turn,updated_in_wake=excluded.updated_in_wake,updated_at=excluded.updated_at,reason=excluded.reason,evidence=excluded.evidence,last_event_seq=excluded.last_event_seq`).run(v.goalId, v.recordRevision, v.goalRevision, v.content, v.updatedBy, v.updatedInTurn, v.updatedInWake, v.updatedAt, v.reason, JSON.stringify(v.evidence), v.lastEventSeq || sourceSeq);
|
|
625
743
|
}
|
|
626
744
|
else if (projection === "schedule") {
|
|
627
745
|
const v = raw;
|
|
@@ -649,11 +767,24 @@ export class SqliteLedger {
|
|
|
649
767
|
this.db.prepare(`INSERT INTO actions VALUES (?,?,?,?,json(?),?,json(?),?,?,?,?,?,?) ON CONFLICT(id) DO UPDATE SET agent=excluded.agent,kind=excluded.kind,connector=excluded.connector,payload=excluded.payload,reason=excluded.reason,evidence=excluded.evidence,gated=excluded.gated,status=excluded.status,reconciled_at=excluded.reconciled_at,external_ref=excluded.external_ref,audit_advice=excluded.audit_advice,advice_acked=excluded.advice_acked`).run(v.id, v.agent, v.kind, v.connector, JSON.stringify(v.payload), v.reason, JSON.stringify(v.evidence), v.gated ? 1 : 0, v.status, v.reconciledAt, v.externalRef, v.auditAdvice === null ? null : JSON.stringify(v.auditAdvice), v.adviceAcked ? 1 : 0);
|
|
650
768
|
}
|
|
651
769
|
}
|
|
770
|
+
#legacyWorkRecord(goal) {
|
|
771
|
+
const handoff = this.lastEvent(goal.owner, "handoff.recorded");
|
|
772
|
+
const legacy = handoff?.data && typeof handoff.data === "object" && !Array.isArray(handoff.data) && !("goalId" in handoff.data) ? handoff.data : null;
|
|
773
|
+
const notes = this.readStream(`memory:${goal.owner}`).filter((event) => event.type === "memory.appended");
|
|
774
|
+
const list = (items) => items?.length ? items.map((item) => `- ${item}`).join("\n") : "None recorded.";
|
|
775
|
+
const decisions = notes.length ? notes.map((event) => `- ${String(event.data.note ?? "")} [event:${event.seq}]`).join("\n") : "None recorded.";
|
|
776
|
+
return {
|
|
777
|
+
content: `# Current State\n\nMigrated from the previous Goal continuity model.\n\n# Observations\n\n${list(legacy?.observations)}\n\n# Work Completed\n\n${list(legacy?.results)}\n\n# Decisions\n\n${decisions}\n\n# Blockers\n\n${legacy?.blocker ?? "None recorded."}\n\n# Next Steps\n\n${list(legacy?.nextSteps)}\n`,
|
|
778
|
+
evidence: [...(handoff ? [handoff.seq] : []), ...notes.map((event) => event.seq)],
|
|
779
|
+
};
|
|
780
|
+
}
|
|
652
781
|
#migrateLegacy() {
|
|
653
782
|
this.#transaction(() => {
|
|
654
783
|
const goalColumns = new Set(this.db.prepare("PRAGMA table_info(goals)").all().map((row) => row.name));
|
|
655
784
|
const observationSource = goalColumns.has("observation_method") ? "observation_method" : "NULL";
|
|
785
|
+
const verificationSource = goalColumns.has("verification_method") ? "verification_method" : observationSource;
|
|
656
786
|
this.db.exec(`PRAGMA defer_foreign_keys=ON;
|
|
787
|
+
DROP TABLE IF EXISTS work_records;
|
|
657
788
|
DROP TRIGGER IF EXISTS events_no_update; DROP TRIGGER IF EXISTS events_no_delete; DROP TRIGGER IF EXISTS events_fts_insert;
|
|
658
789
|
DROP TRIGGER IF EXISTS wakes_valid_transition; DROP TRIGGER IF EXISTS actions_valid_transition; DROP TRIGGER IF EXISTS goals_valid_transition;
|
|
659
790
|
DROP INDEX IF EXISTS events_agent_kind_seq; DROP INDEX IF EXISTS events_wake_seq; DROP INDEX IF EXISTS events_coalesced_trigger;
|
|
@@ -662,7 +793,7 @@ export class SqliteLedger {
|
|
|
662
793
|
DROP TABLE IF EXISTS events_fts;
|
|
663
794
|
|
|
664
795
|
ALTER TABLE goals RENAME TO goals_legacy; ${createGoals}
|
|
665
|
-
INSERT INTO goals(id,parent_id,objective,observation_method,owner,phase,revision) SELECT id,parent_id,objective,${observationSource},owner,phase,revision FROM goals_legacy;
|
|
796
|
+
INSERT INTO goals(id,parent_id,objective,observation_method,verification_method,owner,phase,revision) SELECT id,parent_id,objective,${observationSource},${verificationSource},owner,phase,revision FROM goals_legacy;
|
|
666
797
|
DROP TABLE goals_legacy;`);
|
|
667
798
|
const wakeColumns = new Set(this.db.prepare("PRAGMA table_info(wakes)").all().map((row) => row.name));
|
|
668
799
|
if (!wakeColumns.has("enqueued_seq")) {
|
|
@@ -700,6 +831,11 @@ export class SqliteLedger {
|
|
|
700
831
|
else if (!eventColumns.has("ignorable")) {
|
|
701
832
|
this.db.exec("ALTER TABLE events ADD COLUMN ignorable INTEGER CHECK(ignorable IS NULL OR ignorable = 1)");
|
|
702
833
|
}
|
|
834
|
+
this.db.exec(createWorkRecords);
|
|
835
|
+
for (const goal of this.goals()) {
|
|
836
|
+
if (!this.workRecord(goal.id))
|
|
837
|
+
this.#createWorkRecord(goal, "supervisor", `migration:work-record:${goal.id}`, undefined, this.#legacyWorkRecord(goal));
|
|
838
|
+
}
|
|
703
839
|
this.db.exec(`${indexesAndTriggers} INSERT INTO events_fts(events_fts) VALUES('rebuild'); PRAGMA user_version=${SQLITE_SCHEMA_VERSION};`);
|
|
704
840
|
});
|
|
705
841
|
}
|
|
@@ -718,7 +854,29 @@ export class SqliteLedger {
|
|
|
718
854
|
#now() { return this.#clock.now().toISOString(); }
|
|
719
855
|
}
|
|
720
856
|
function mapEvent(r) { return { seq: Number(r.seq), streamId: String(r.stream_id), streamSeq: Number(r.stream_seq), ts: String(r.ts), actor: String(r.actor), type: String(r.type), data: JSON.parse(String(r.data)), ...(Number(r.ignorable) === 1 ? { ignorable: true } : {}) }; }
|
|
721
|
-
function
|
|
857
|
+
function normalizeGoal(goal) { return { ...goal, observationMethod: goal.observationMethod ?? null, verificationMethod: goal.verificationMethod === undefined ? goal.observationMethod ?? null : goal.verificationMethod }; }
|
|
858
|
+
function mapGoal(r) { return { id: String(r.id), parentId: r.parent_id === null ? null : String(r.parent_id), objective: String(r.objective), observationMethod: r.observation_method === null || r.observation_method === undefined ? null : String(r.observation_method), verificationMethod: r.verification_method === null || r.verification_method === undefined ? null : String(r.verification_method), owner: String(r.owner), phase: String(r.phase), revision: Number(r.revision) }; }
|
|
859
|
+
function mapWorkRecord(r) { return { goalId: String(r.goal_id), recordRevision: Number(r.record_revision), goalRevision: Number(r.goal_revision), content: String(r.content), updatedBy: String(r.updated_by), updatedInTurn: String(r.updated_in_turn), updatedInWake: r.updated_in_wake === null ? null : String(r.updated_in_wake), updatedAt: String(r.updated_at), reason: String(r.reason), evidence: JSON.parse(String(r.evidence)), lastEventSeq: Number(r.last_event_seq) }; }
|
|
860
|
+
function mapWorkRecordEvent(event) { const data = event.data; if (!data.snapshot)
|
|
861
|
+
throw new Error(`work record event ${event.seq} has no snapshot`); return { ...data.snapshot, lastEventSeq: event.seq }; }
|
|
862
|
+
function initialWorkRecord() { return "# Current State\n\nGoal created. Work has not started.\n\n# Observations\n\n# Work Completed\n\n# Decisions\n\n# Blockers\n\n# Next Steps\n"; }
|
|
863
|
+
function lineDiff(from, to) {
|
|
864
|
+
const before = from.split("\n");
|
|
865
|
+
const after = to.split("\n");
|
|
866
|
+
const lines = [];
|
|
867
|
+
for (let index = 0; index < Math.max(before.length, after.length); index += 1) {
|
|
868
|
+
if (before[index] === after[index]) {
|
|
869
|
+
if (before[index] !== undefined)
|
|
870
|
+
lines.push(` ${before[index]}`);
|
|
871
|
+
continue;
|
|
872
|
+
}
|
|
873
|
+
if (before[index] !== undefined)
|
|
874
|
+
lines.push(`-${before[index]}`);
|
|
875
|
+
if (after[index] !== undefined)
|
|
876
|
+
lines.push(`+${after[index]}`);
|
|
877
|
+
}
|
|
878
|
+
return lines.join("\n");
|
|
879
|
+
}
|
|
722
880
|
function mapSchedule(r) { return { id: String(r.id), agent: String(r.agent), nextWakeAt: String(r.next_wake_at), reason: String(r.reason), setBy: String(r.set_by) }; }
|
|
723
881
|
function mapWake(r) { return { id: String(r.id), agent: String(r.agent), triggerRef: String(r.trigger_ref), status: String(r.status), leaseUntil: r.lease_until === null ? null : String(r.lease_until), attempt: Number(r.attempt), startedAt: r.started_at === null ? null : String(r.started_at), endedAt: r.ended_at === null ? null : String(r.ended_at), enqueuedSeq: Number(r.enqueued_seq), leaseToken: r.lease_token === null ? null : String(r.lease_token), runnerPid: r.runner_pid === null ? null : Number(r.runner_pid) }; }
|
|
724
882
|
function mapMail(r) { return { id: String(r.id), to: String(r.to_agent), from: String(r.from_agent), level: String(r.level), body: JSON.parse(String(r.body)), readAt: r.read_at === null ? null : String(r.read_at) }; }
|