@polpo-ai/core 0.1.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/LICENSE +21 -0
- package/dist/adapter.d.ts +61 -0
- package/dist/adapter.d.ts.map +1 -0
- package/dist/adapter.js +9 -0
- package/dist/adapter.js.map +1 -0
- package/dist/agent-manager.d.ts +36 -0
- package/dist/agent-manager.d.ts.map +1 -0
- package/dist/agent-manager.js +176 -0
- package/dist/agent-manager.js.map +1 -0
- package/dist/approval-manager.d.ts +49 -0
- package/dist/approval-manager.d.ts.map +1 -0
- package/dist/approval-manager.js +325 -0
- package/dist/approval-manager.js.map +1 -0
- package/dist/approval-store.d.ts +19 -0
- package/dist/approval-store.d.ts.map +1 -0
- package/dist/approval-store.js +2 -0
- package/dist/approval-store.js.map +1 -0
- package/dist/checkpoint-store.d.ts +20 -0
- package/dist/checkpoint-store.d.ts.map +1 -0
- package/dist/checkpoint-store.js +2 -0
- package/dist/checkpoint-store.js.map +1 -0
- package/dist/config-store.d.ts +13 -0
- package/dist/config-store.d.ts.map +1 -0
- package/dist/config-store.js +2 -0
- package/dist/config-store.js.map +1 -0
- package/dist/cron.d.ts +29 -0
- package/dist/cron.d.ts.map +1 -0
- package/dist/cron.js +105 -0
- package/dist/cron.js.map +1 -0
- package/dist/delay-store.d.ts +21 -0
- package/dist/delay-store.d.ts.map +1 -0
- package/dist/delay-store.js +2 -0
- package/dist/delay-store.js.map +1 -0
- package/dist/escalation-manager.d.ts +31 -0
- package/dist/escalation-manager.d.ts.map +1 -0
- package/dist/escalation-manager.js +281 -0
- package/dist/escalation-manager.js.map +1 -0
- package/dist/event-bus.d.ts +18 -0
- package/dist/event-bus.d.ts.map +1 -0
- package/dist/event-bus.js +2 -0
- package/dist/event-bus.js.map +1 -0
- package/dist/events.d.ts +377 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +9 -0
- package/dist/events.js.map +1 -0
- package/dist/hooks.d.ts +185 -0
- package/dist/hooks.d.ts.map +1 -0
- package/dist/hooks.js +152 -0
- package/dist/hooks.js.map +1 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -0
- package/dist/log-store.d.ts +31 -0
- package/dist/log-store.d.ts.map +1 -0
- package/dist/log-store.js +6 -0
- package/dist/log-store.js.map +1 -0
- package/dist/memory-store.d.ts +17 -0
- package/dist/memory-store.d.ts.map +1 -0
- package/dist/memory-store.js +2 -0
- package/dist/memory-store.js.map +1 -0
- package/dist/notification-router-port.d.ts +11 -0
- package/dist/notification-router-port.d.ts.map +1 -0
- package/dist/notification-router-port.js +2 -0
- package/dist/notification-router-port.js.map +1 -0
- package/dist/notification-store.d.ts +58 -0
- package/dist/notification-store.d.ts.map +1 -0
- package/dist/notification-store.js +9 -0
- package/dist/notification-store.js.map +1 -0
- package/dist/orchestrator-context.d.ts +87 -0
- package/dist/orchestrator-context.d.ts.map +1 -0
- package/dist/orchestrator-context.js +2 -0
- package/dist/orchestrator-context.js.map +1 -0
- package/dist/peer-store.d.ts +29 -0
- package/dist/peer-store.d.ts.map +1 -0
- package/dist/peer-store.js +6 -0
- package/dist/peer-store.js.map +1 -0
- package/dist/quality-controller.d.ts +46 -0
- package/dist/quality-controller.d.ts.map +1 -0
- package/dist/quality-controller.js +373 -0
- package/dist/quality-controller.js.map +1 -0
- package/dist/run-store.d.ts +31 -0
- package/dist/run-store.d.ts.map +1 -0
- package/dist/run-store.js +2 -0
- package/dist/run-store.js.map +1 -0
- package/dist/scheduler.d.ts +35 -0
- package/dist/scheduler.d.ts.map +1 -0
- package/dist/scheduler.js +195 -0
- package/dist/scheduler.js.map +1 -0
- package/dist/schemas.d.ts +104 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +200 -0
- package/dist/schemas.js.map +1 -0
- package/dist/session-store.d.ts +50 -0
- package/dist/session-store.d.ts.map +1 -0
- package/dist/session-store.js +6 -0
- package/dist/session-store.js.map +1 -0
- package/dist/sla-monitor.d.ts +30 -0
- package/dist/sla-monitor.d.ts.map +1 -0
- package/dist/sla-monitor.js +156 -0
- package/dist/sla-monitor.js.map +1 -0
- package/dist/state-machine.d.ts +8 -0
- package/dist/state-machine.d.ts.map +1 -0
- package/dist/state-machine.js +23 -0
- package/dist/state-machine.js.map +1 -0
- package/dist/task-manager.d.ts +38 -0
- package/dist/task-manager.d.ts.map +1 -0
- package/dist/task-manager.js +308 -0
- package/dist/task-manager.js.map +1 -0
- package/dist/task-store.d.ts +33 -0
- package/dist/task-store.d.ts.map +1 -0
- package/dist/task-store.js +2 -0
- package/dist/task-store.js.map +1 -0
- package/dist/task-watcher.d.ts +38 -0
- package/dist/task-watcher.d.ts.map +1 -0
- package/dist/task-watcher.js +103 -0
- package/dist/task-watcher.js.map +1 -0
- package/dist/types.d.ts +1073 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +35 -0
- package/dist/types.js.map +1 -0
- package/package.json +170 -0
package/dist/hooks.js
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Central registry for lifecycle hooks.
|
|
3
|
+
*
|
|
4
|
+
* "before" hooks run before an operation and can cancel or modify the payload.
|
|
5
|
+
* "after" hooks run after the operation completes (fire-and-forget, observe-only).
|
|
6
|
+
*
|
|
7
|
+
* Handlers are sorted by priority (ascending) and run sequentially.
|
|
8
|
+
* Async handlers are awaited — a slow hook delays the operation.
|
|
9
|
+
*/
|
|
10
|
+
export class HookRegistry {
|
|
11
|
+
registrations = [];
|
|
12
|
+
/**
|
|
13
|
+
* Register a lifecycle hook handler.
|
|
14
|
+
* Returns an unsubscribe function.
|
|
15
|
+
*/
|
|
16
|
+
register(reg) {
|
|
17
|
+
const stored = {
|
|
18
|
+
hook: reg.hook,
|
|
19
|
+
phase: reg.phase,
|
|
20
|
+
handler: reg.handler,
|
|
21
|
+
priority: reg.priority ?? 100,
|
|
22
|
+
name: reg.name,
|
|
23
|
+
};
|
|
24
|
+
this.registrations.push(stored);
|
|
25
|
+
// Keep sorted by priority (stable sort)
|
|
26
|
+
this.registrations.sort((a, b) => a.priority - b.priority);
|
|
27
|
+
return () => {
|
|
28
|
+
const idx = this.registrations.indexOf(stored);
|
|
29
|
+
if (idx >= 0)
|
|
30
|
+
this.registrations.splice(idx, 1);
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Run all "before" hooks for a lifecycle point.
|
|
35
|
+
* Returns whether the operation was cancelled and the (possibly modified) data.
|
|
36
|
+
*
|
|
37
|
+
* Handlers run sequentially in priority order.
|
|
38
|
+
* If a handler calls `cancel()`, remaining handlers still run but the operation is blocked.
|
|
39
|
+
*/
|
|
40
|
+
async runBefore(hook, data) {
|
|
41
|
+
const handlers = this.registrations.filter(r => r.hook === hook && r.phase === "before");
|
|
42
|
+
if (handlers.length === 0)
|
|
43
|
+
return { cancelled: false, data };
|
|
44
|
+
let cancelled = false;
|
|
45
|
+
let cancelReason;
|
|
46
|
+
const ctx = {
|
|
47
|
+
hook,
|
|
48
|
+
phase: "before",
|
|
49
|
+
data,
|
|
50
|
+
cancel(reason) {
|
|
51
|
+
cancelled = true;
|
|
52
|
+
cancelReason = reason;
|
|
53
|
+
},
|
|
54
|
+
get cancelled() { return cancelled; },
|
|
55
|
+
get cancelReason() { return cancelReason; },
|
|
56
|
+
timestamp: new Date().toISOString(),
|
|
57
|
+
};
|
|
58
|
+
for (const reg of handlers) {
|
|
59
|
+
try {
|
|
60
|
+
await reg.handler(ctx);
|
|
61
|
+
}
|
|
62
|
+
catch (err) {
|
|
63
|
+
// A throwing hook does NOT cancel the operation — it's a hook bug.
|
|
64
|
+
// Log but continue.
|
|
65
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
66
|
+
console.error(`[HookRegistry] Error in before:${hook} handler "${reg.name ?? "anonymous"}": ${msg}`);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return { cancelled, cancelReason, data: ctx.data };
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Run all "after" hooks for a lifecycle point.
|
|
73
|
+
* Fire-and-forget: errors are logged but never propagate.
|
|
74
|
+
* "after" hooks cannot cancel or modify anything.
|
|
75
|
+
*/
|
|
76
|
+
async runAfter(hook, data) {
|
|
77
|
+
const handlers = this.registrations.filter(r => r.hook === hook && r.phase === "after");
|
|
78
|
+
if (handlers.length === 0)
|
|
79
|
+
return;
|
|
80
|
+
const ctx = {
|
|
81
|
+
hook,
|
|
82
|
+
phase: "after",
|
|
83
|
+
data,
|
|
84
|
+
cancel() { },
|
|
85
|
+
get cancelled() { return false; },
|
|
86
|
+
timestamp: new Date().toISOString(),
|
|
87
|
+
};
|
|
88
|
+
for (const reg of handlers) {
|
|
89
|
+
try {
|
|
90
|
+
await reg.handler(ctx);
|
|
91
|
+
}
|
|
92
|
+
catch (err) {
|
|
93
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
94
|
+
console.error(`[HookRegistry] Error in after:${hook} handler "${reg.name ?? "anonymous"}": ${msg}`);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Synchronous variant of runBefore — for hot paths where async is not feasible.
|
|
100
|
+
* Only runs synchronous handlers; async handlers are skipped with a warning.
|
|
101
|
+
*/
|
|
102
|
+
runBeforeSync(hook, data) {
|
|
103
|
+
const handlers = this.registrations.filter(r => r.hook === hook && r.phase === "before");
|
|
104
|
+
if (handlers.length === 0)
|
|
105
|
+
return { cancelled: false, data };
|
|
106
|
+
let cancelled = false;
|
|
107
|
+
let cancelReason;
|
|
108
|
+
const ctx = {
|
|
109
|
+
hook,
|
|
110
|
+
phase: "before",
|
|
111
|
+
data,
|
|
112
|
+
cancel(reason) {
|
|
113
|
+
cancelled = true;
|
|
114
|
+
cancelReason = reason;
|
|
115
|
+
},
|
|
116
|
+
get cancelled() { return cancelled; },
|
|
117
|
+
get cancelReason() { return cancelReason; },
|
|
118
|
+
timestamp: new Date().toISOString(),
|
|
119
|
+
};
|
|
120
|
+
for (const reg of handlers) {
|
|
121
|
+
try {
|
|
122
|
+
const result = reg.handler(ctx);
|
|
123
|
+
if (result instanceof Promise) {
|
|
124
|
+
console.warn(`[HookRegistry] Async handler "${reg.name ?? "anonymous"}" skipped in sync runBefore for ${hook}`);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
catch (err) {
|
|
128
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
129
|
+
console.error(`[HookRegistry] Error in before:${hook} handler "${reg.name ?? "anonymous"}": ${msg}`);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
return { cancelled, cancelReason, data: ctx.data };
|
|
133
|
+
}
|
|
134
|
+
/** Get the count of registered handlers (for diagnostics). */
|
|
135
|
+
get size() {
|
|
136
|
+
return this.registrations.length;
|
|
137
|
+
}
|
|
138
|
+
/** List all registered hooks (for diagnostics). */
|
|
139
|
+
list() {
|
|
140
|
+
return this.registrations.map(r => ({
|
|
141
|
+
hook: r.hook,
|
|
142
|
+
phase: r.phase,
|
|
143
|
+
priority: r.priority,
|
|
144
|
+
name: r.name,
|
|
145
|
+
}));
|
|
146
|
+
}
|
|
147
|
+
/** Remove all registered hooks. */
|
|
148
|
+
clear() {
|
|
149
|
+
this.registrations.length = 0;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
//# sourceMappingURL=hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../src/hooks.ts"],"names":[],"mappings":"AAqLA;;;;;;;;GAQG;AACH,MAAM,OAAO,YAAY;IACf,aAAa,GAAyB,EAAE,CAAC;IAEjD;;;OAGG;IACH,QAAQ,CAA0B,GAAwB;QACxD,MAAM,MAAM,GAAuB;YACjC,IAAI,EAAE,GAAG,CAAC,IAAI;YACd,KAAK,EAAE,GAAG,CAAC,KAAK;YAChB,OAAO,EAAE,GAAG,CAAC,OAA2B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AO,CAAC,IAAI,CAAC,iCAAiC,GAAG,CAAC,IAAI,IAAI,WAAW,mCAAmC,IAAI,EAAE,CAAC,CAAC;gBAClH,CAAC;YACH,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,MAAM,GAAG,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;gBAC7D,OAAO,CAAC,KAAK,CAAC,kCAAkC,IAAI,aAAa,GAAG,CAAC,IAAI,IAAI,WAAW,MAAM,GAAG,EAAE,CAAC,CAAC;YACvG,CAAC;QACH,CAAC;QAED,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,CAAC;IACrD,CAAC;IAED,8DAA8D;IAC9D,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC;IACnC,CAAC;IAED,mDAAmD;IACnD,IAAI;QACF,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YAClC,IAAI,EAAE,CAAC,CAAC,IAAI;YACZ,KAAK,EAAE,CAAC,CAAC,KAAK;YACd,QAAQ,EAAE,CAAC,CAAC,QAAQ;YACpB,IAAI,EAAE,CAAC,CAAC,IAAI;SACb,CAAC,CAAC,CAAC;IACN,CAAC;IAED,mCAAmC;IACnC,KAAK;QACH,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC;IAChC,CAAC;CACF"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export * from "./types.js";
|
|
2
|
+
export * from "./events.js";
|
|
3
|
+
export { VALID_TRANSITIONS, isValidTransition, assertValidTransition } from "./state-machine.js";
|
|
4
|
+
export * from "./schemas.js";
|
|
5
|
+
export { HookRegistry } from "./hooks.js";
|
|
6
|
+
export type { LifecycleHook, HookPhase, HookContext, HookHandler, HookRegistration, HookPayloads, BeforeHookResult, } from "./hooks.js";
|
|
7
|
+
export type { TaskStore } from "./task-store.js";
|
|
8
|
+
export type { RunStore, RunRecord, RunStatus } from "./run-store.js";
|
|
9
|
+
export type { ConfigStore } from "./config-store.js";
|
|
10
|
+
export type { MemoryStore } from "./memory-store.js";
|
|
11
|
+
export type { LogStore, LogEntry, SessionInfo } from "./log-store.js";
|
|
12
|
+
export type { SessionStore, Session, Message, MessageRole, ToolCallInfo, ToolCallState } from "./session-store.js";
|
|
13
|
+
export type { ApprovalStore } from "./approval-store.js";
|
|
14
|
+
export type { NotificationStore, NotificationRecord, NotificationStatus } from "./notification-store.js";
|
|
15
|
+
export type { PeerStore } from "./peer-store.js";
|
|
16
|
+
export type { EventBus } from "./event-bus.js";
|
|
17
|
+
export type { CheckpointStore, CheckpointState } from "./checkpoint-store.js";
|
|
18
|
+
export type { DelayStore, DelayState } from "./delay-store.js";
|
|
19
|
+
export type { NotificationRouterPort } from "./notification-router-port.js";
|
|
20
|
+
export type { OrchestratorContext, AssessFn, CheckProgressEvent } from "./orchestrator-context.js";
|
|
21
|
+
export { parseCron, matchesCron, nextCronOccurrence, isCronExpression } from "./cron.js";
|
|
22
|
+
export { TaskManager } from "./task-manager.js";
|
|
23
|
+
export { AgentManager } from "./agent-manager.js";
|
|
24
|
+
export { ApprovalManager } from "./approval-manager.js";
|
|
25
|
+
export { EscalationManager } from "./escalation-manager.js";
|
|
26
|
+
export { TaskWatcherManager } from "./task-watcher.js";
|
|
27
|
+
export { QualityController } from "./quality-controller.js";
|
|
28
|
+
export { SLAMonitor } from "./sla-monitor.js";
|
|
29
|
+
export { Scheduler } from "./scheduler.js";
|
|
30
|
+
export type { AgentHandle, SpawnContext } from "./adapter.js";
|
|
31
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,Y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GnG,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAGzF,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAG3C,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// ── Types ────────────────────────────────────────────────────────────────
|
|
2
|
+
export * from "./types.js";
|
|
3
|
+
// ── Events (pure type definitions only, TypedEmitter lives in shell) ─────
|
|
4
|
+
export * from "./events.js";
|
|
5
|
+
// ── State Machine ────────────────────────────────────────────────────────
|
|
6
|
+
export { VALID_TRANSITIONS, isValidTransition, assertValidTransition } from "./state-machine.js";
|
|
7
|
+
// ── Schemas (Zod validation) ─────────────────────────────────────────────
|
|
8
|
+
export * from "./schemas.js";
|
|
9
|
+
// ── Hooks ────────────────────────────────────────────────────────────────
|
|
10
|
+
export { HookRegistry } from "./hooks.js";
|
|
11
|
+
// ── Cron (pure) ─────────────────────────────────────────────────────────
|
|
12
|
+
export { parseCron, matchesCron, nextCronOccurrence, isCronExpression } from "./cron.js";
|
|
13
|
+
// ── Core Managers ───────────────────────────────────────────────────────
|
|
14
|
+
export { TaskManager } from "./task-manager.js";
|
|
15
|
+
export { AgentManager } from "./agent-manager.js";
|
|
16
|
+
export { ApprovalManager } from "./approval-manager.js";
|
|
17
|
+
export { EscalationManager } from "./escalation-manager.js";
|
|
18
|
+
export { TaskWatcherManager } from "./task-watcher.js";
|
|
19
|
+
export { QualityController } from "./quality-controller.js";
|
|
20
|
+
export { SLAMonitor } from "./sla-monitor.js";
|
|
21
|
+
export { Scheduler } from "./scheduler.js";
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,cAAc,YAAY,CAAC;AAE3B,4EAA4E;AAC5E,cAAc,aAAa,CAAC;AAE5B,4EAA4E;AAC5E,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEjG,4EAA4E;AAC5E,cAAc,cAAc,CAAC;AAE7B,4EAA4E;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAiC1C,2EAA2E;AAC3E,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAEzF,2EAA2E;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Persistent log storage — captures orchestrator events across sessions.
|
|
3
|
+
* Lives at the core level, independent of TUI or CLI.
|
|
4
|
+
*/
|
|
5
|
+
export interface LogEntry {
|
|
6
|
+
ts: string;
|
|
7
|
+
event: string;
|
|
8
|
+
data: unknown;
|
|
9
|
+
}
|
|
10
|
+
export interface SessionInfo {
|
|
11
|
+
sessionId: string;
|
|
12
|
+
startedAt: string;
|
|
13
|
+
entries: number;
|
|
14
|
+
}
|
|
15
|
+
export interface LogStore {
|
|
16
|
+
/** Start a new logging session. Returns session ID. */
|
|
17
|
+
startSession(): Promise<string>;
|
|
18
|
+
/** Get current session ID (undefined if not started). */
|
|
19
|
+
getSessionId(): Promise<string | undefined>;
|
|
20
|
+
/** Append a log entry to the current session. */
|
|
21
|
+
append(entry: LogEntry): Promise<void>;
|
|
22
|
+
/** Read entries for a session (default: current). */
|
|
23
|
+
getSessionEntries(sessionId?: string): Promise<LogEntry[]>;
|
|
24
|
+
/** List all sessions, most recent first. */
|
|
25
|
+
listSessions(): Promise<SessionInfo[]>;
|
|
26
|
+
/** Remove old sessions, keeping the most recent N. Returns number pruned. */
|
|
27
|
+
prune(keepSessions: number): Promise<number>;
|
|
28
|
+
/** Flush/close. */
|
|
29
|
+
close(): Promise<void> | void;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=log-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log-store.d.ts","sourceRoot":"","sources":["../src/log-store.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,QAAQ;IACvB,uDAAuD;IACvD,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAChC,yDAAyD;IACzD,YAAY,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC5C,iDAAiD;IACjD,MAAM,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,qDAAqD;IACrD,iBAAiB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC3D,4CAA4C;IAC5C,YAAY,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IACvC,6EAA6E;IAC7E,KAAK,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC7C,mBAAmB;IACnB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CAC/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log-store.js","sourceRoot":"","sources":["../src/log-store.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Persistent project memory — shared context that survives across sessions.
|
|
3
|
+
* Injected into every agent's prompt so they have project knowledge.
|
|
4
|
+
*/
|
|
5
|
+
export interface MemoryStore {
|
|
6
|
+
/** Check if memory exists. */
|
|
7
|
+
exists(): Promise<boolean>;
|
|
8
|
+
/** Read the full memory content. Returns empty string if none. */
|
|
9
|
+
get(): Promise<string>;
|
|
10
|
+
/** Overwrite the memory content. */
|
|
11
|
+
save(content: string): Promise<void>;
|
|
12
|
+
/** Append a line to the memory (with timestamp). */
|
|
13
|
+
append(line: string): Promise<void>;
|
|
14
|
+
/** Replace a unique substring in the memory. Returns true if replaced, string error otherwise. */
|
|
15
|
+
update(oldText: string, newText: string): Promise<true | string>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=memory-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory-store.d.ts","sourceRoot":"","sources":["../src/memory-store.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,8BAA8B;IAC9B,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAC3B,kEAAkE;IAClE,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACvB,oCAAoC;IACpC,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,oDAAoD;IACpD,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,kGAAkG;IAClG,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC,CAAC;CAClE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory-store.js","sourceRoot":"","sources":["../src/memory-store.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NotificationRouterPort — minimal interface consumed by core managers.
|
|
3
|
+
*
|
|
4
|
+
* The full NotificationRouter implementation lives in the shell (src/notifications/).
|
|
5
|
+
* Core managers only need the ability to register notification rules dynamically.
|
|
6
|
+
*/
|
|
7
|
+
import type { NotificationRule } from "./types.js";
|
|
8
|
+
export interface NotificationRouterPort {
|
|
9
|
+
addRule(rule: NotificationRule): void;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=notification-router-port.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-router-port.d.ts","sourceRoot":"","sources":["../src/notification-router-port.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,MAAM,WAAW,sBAAsB;IACrC,OAAO,CAAC,IAAI,EAAE,gBAAgB,GAAG,IAAI,CAAC;CACvC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-router-port.js","sourceRoot":"","sources":["../src/notification-router-port.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Persistent notification storage — tracks every notification sent or failed.
|
|
3
|
+
*
|
|
4
|
+
* Follows the same pattern as LogStore / RunStore:
|
|
5
|
+
* - Interface lives in core/
|
|
6
|
+
* - Implementations in stores/ (file + sqlite)
|
|
7
|
+
*/
|
|
8
|
+
import type { NotificationSeverity, OutcomeType } from "./types.js";
|
|
9
|
+
export type NotificationStatus = "sent" | "failed";
|
|
10
|
+
export interface NotificationRecord {
|
|
11
|
+
/** Unique notification ID. */
|
|
12
|
+
id: string;
|
|
13
|
+
/** ISO timestamp when the notification was dispatched. */
|
|
14
|
+
timestamp: string;
|
|
15
|
+
/** The notification rule that triggered this. */
|
|
16
|
+
ruleId: string;
|
|
17
|
+
/** Rule name (human-readable). */
|
|
18
|
+
ruleName: string;
|
|
19
|
+
/** Target channel ID. */
|
|
20
|
+
channel: string;
|
|
21
|
+
/** Channel type (telegram, slack, email, webhook). */
|
|
22
|
+
channelType: string;
|
|
23
|
+
/** Delivery status. */
|
|
24
|
+
status: NotificationStatus;
|
|
25
|
+
/** Error message (only for failed notifications). */
|
|
26
|
+
error?: string;
|
|
27
|
+
/** Notification title. */
|
|
28
|
+
title: string;
|
|
29
|
+
/** Notification body (may contain markdown/HTML). */
|
|
30
|
+
body: string;
|
|
31
|
+
/** Severity level. */
|
|
32
|
+
severity: NotificationSeverity;
|
|
33
|
+
/** The event that triggered this notification. */
|
|
34
|
+
sourceEvent: string;
|
|
35
|
+
/** Number of outcome attachments sent (0 if none). */
|
|
36
|
+
attachmentCount: number;
|
|
37
|
+
/** Outcome types attached (if any). */
|
|
38
|
+
attachmentTypes?: OutcomeType[];
|
|
39
|
+
}
|
|
40
|
+
export interface NotificationStore {
|
|
41
|
+
/** Persist a notification record (sent or failed). */
|
|
42
|
+
append(record: NotificationRecord): Promise<void>;
|
|
43
|
+
/** Get all notifications, most recent first. Optional limit (default 100). */
|
|
44
|
+
list(limit?: number): Promise<NotificationRecord[]>;
|
|
45
|
+
/** Get notifications by channel ID. */
|
|
46
|
+
listByChannel(channelId: string, limit?: number): Promise<NotificationRecord[]>;
|
|
47
|
+
/** Get notifications by rule ID. */
|
|
48
|
+
listByRule(ruleId: string, limit?: number): Promise<NotificationRecord[]>;
|
|
49
|
+
/** Get notifications by status. */
|
|
50
|
+
listByStatus(status: NotificationStatus, limit?: number): Promise<NotificationRecord[]>;
|
|
51
|
+
/** Count notifications by status. */
|
|
52
|
+
count(status?: NotificationStatus): Promise<number>;
|
|
53
|
+
/** Prune old records, keeping the most recent N. Returns number pruned. */
|
|
54
|
+
prune(keep: number): Promise<number>;
|
|
55
|
+
/** Flush/close. */
|
|
56
|
+
close(): Promise<void> | void;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=notification-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-store.d.ts","sourceRoot":"","sources":["../src/notification-store.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEpE,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEnD,MAAM,WAAW,kBAAkB;IACjC,8BAA8B;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,0DAA0D;IAC1D,SAAS,EAAE,MAAM,CAAC;IAClB,iDAAiD;IACjD,MAAM,EAAE,MAAM,CAAC;IACf,kCAAkC;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,yBAAyB;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,sDAAsD;IACtD,WAAW,EAAE,MAAM,CAAC;IACpB,uBAAuB;IACvB,MAAM,EAAE,kBAAkB,CAAC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|
1
|
+
/**
|
|
2
|
+
* Persistent notification storage — tracks every notification sent or failed.
|
|
3
|
+
*
|
|
4
|
+
* Follows the same pattern as LogStore / RunStore:
|
|
5
|
+
* - Interface lives in core/
|
|
6
|
+
* - Implementations in stores/ (file + sqlite)
|
|
7
|
+
*/
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=notification-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-store.js","sourceRoot":"","sources":["../src/notification-store.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OrchestratorContext — shared dependency injection container for all core managers.
|
|
3
|
+
*
|
|
4
|
+
* All store fields are interfaces (not concrete implementations).
|
|
5
|
+
* The shell layer creates concrete stores and assembles this context.
|
|
6
|
+
*/
|
|
7
|
+
import type { EventBus } from "./event-bus.js";
|
|
8
|
+
import type { TaskStore } from "./task-store.js";
|
|
9
|
+
import type { RunStore } from "./run-store.js";
|
|
10
|
+
import type { MemoryStore } from "./memory-store.js";
|
|
11
|
+
import type { LogStore } from "./log-store.js";
|
|
12
|
+
import type { SessionStore } from "./session-store.js";
|
|
13
|
+
import type { ApprovalStore } from "./approval-store.js";
|
|
14
|
+
import type { NotificationStore } from "./notification-store.js";
|
|
15
|
+
import type { CheckpointStore } from "./checkpoint-store.js";
|
|
16
|
+
import type { DelayStore } from "./delay-store.js";
|
|
17
|
+
import type { PeerStore } from "./peer-store.js";
|
|
18
|
+
import type { ConfigStore } from "./config-store.js";
|
|
19
|
+
import type { PolpoConfig, PolpoFileConfig, Task, AssessmentResult, ReviewContext, ReasoningLevel, ModelConfig } from "./types.js";
|
|
20
|
+
import type { HookRegistry } from "./hooks.js";
|
|
21
|
+
/** Progress event for individual assessment checks. */
|
|
22
|
+
export interface CheckProgressEvent {
|
|
23
|
+
index: number;
|
|
24
|
+
total: number;
|
|
25
|
+
type: string;
|
|
26
|
+
label: string;
|
|
27
|
+
phase: "started" | "complete";
|
|
28
|
+
passed?: boolean;
|
|
29
|
+
message?: string;
|
|
30
|
+
}
|
|
31
|
+
export type AssessFn = (task: Task, cwd: string, onProgress?: (msg: string) => void, context?: ReviewContext, reasoning?: ReasoningLevel, onCheckProgress?: (event: CheckProgressEvent) => void) => Promise<AssessmentResult>;
|
|
32
|
+
/**
|
|
33
|
+
* Shared context injected into all manager classes.
|
|
34
|
+
*
|
|
35
|
+
* Required fields are the minimum for any runtime (Node, Convex, Workers).
|
|
36
|
+
* Optional port fields allow the shell to inject runtime-specific capabilities.
|
|
37
|
+
*/
|
|
38
|
+
export interface OrchestratorContext {
|
|
39
|
+
readonly emitter: EventBus;
|
|
40
|
+
readonly registry: TaskStore;
|
|
41
|
+
readonly runStore: RunStore;
|
|
42
|
+
readonly memoryStore: MemoryStore;
|
|
43
|
+
readonly logStore: LogStore;
|
|
44
|
+
readonly sessionStore: SessionStore;
|
|
45
|
+
readonly hooks: HookRegistry;
|
|
46
|
+
config: PolpoConfig;
|
|
47
|
+
readonly workDir: string;
|
|
48
|
+
/** Resolved working directory for agent processes (settings.workDir resolved against workDir). */
|
|
49
|
+
readonly agentWorkDir: string;
|
|
50
|
+
readonly polpoDir: string;
|
|
51
|
+
readonly assessFn: AssessFn;
|
|
52
|
+
/** Kill an OS process by PID (Node shell: process.kill). */
|
|
53
|
+
readonly killProcess?: (pid: number, signal?: string) => void;
|
|
54
|
+
/** Load polpo.json config from disk. */
|
|
55
|
+
readonly loadConfig?: () => PolpoFileConfig | undefined;
|
|
56
|
+
/** Save polpo.json config to disk. */
|
|
57
|
+
readonly saveConfig?: (config: PolpoFileConfig) => void;
|
|
58
|
+
/** Query LLM for text completion (used by escalation, deadlock resolver). */
|
|
59
|
+
readonly queryLLM?: (prompt: string, model?: string | ModelConfig) => Promise<{
|
|
60
|
+
text: string;
|
|
61
|
+
}>;
|
|
62
|
+
/** Find JSONL activity log path for a task/run. */
|
|
63
|
+
readonly findLogForTask?: (polpoDir: string, taskId: string, runId?: string) => string | null;
|
|
64
|
+
/** Build execution summary from JSONL log. */
|
|
65
|
+
readonly buildExecutionSummary?: (logPath: string) => {
|
|
66
|
+
summary: string;
|
|
67
|
+
toolsSummary?: string;
|
|
68
|
+
};
|
|
69
|
+
/** Validate that provider API keys are configured. */
|
|
70
|
+
readonly validateProviderKeys?: (config: PolpoConfig) => {
|
|
71
|
+
valid: boolean;
|
|
72
|
+
missing: string[];
|
|
73
|
+
};
|
|
74
|
+
/** Approval request store (when storage is "postgres", injected by shell). */
|
|
75
|
+
readonly approvalStore?: ApprovalStore;
|
|
76
|
+
/** Notification record store (when storage is "postgres", injected by shell). */
|
|
77
|
+
readonly notificationStore?: NotificationStore;
|
|
78
|
+
/** Checkpoint persistence store (when storage is "postgres", injected by shell). */
|
|
79
|
+
readonly checkpointStore?: CheckpointStore;
|
|
80
|
+
/** Delay persistence store (when storage is "postgres", injected by shell). */
|
|
81
|
+
readonly delayStore?: DelayStore;
|
|
82
|
+
/** Peer identity store (when storage is "postgres", injected by shell). */
|
|
83
|
+
readonly peerStore?: PeerStore;
|
|
84
|
+
/** Config persistence store (when storage is "postgres", injected by shell). */
|
|
85
|
+
readonly configStore?: ConfigStore;
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=orchestrator-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orchestrator-context.d.ts","sourceRoot":"","sources":["../src/orchestrator-context.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CA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AAO,EAAE,MAAM,KAAK;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAEjG,sDAAsD;IACtD,QAAQ,CAAC,oBAAoB,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IAI/F,8EAA8E;IAC9E,QAAQ,CAAC,aAAa,CAAC,EAAE,aAAa,CAAC;IACvC,iFAAiF;IACjF,QAAQ,CAAC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IAC/C,oFAAoF;IACpF,QAAQ,CAAC,eAAe,CAAC,EAAE,eAAe,CAAC;IAC3C,+EAA+E;IAC/E,QAAQ,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC;IACjC,2EAA2E;IAC3E,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC;IAC/B,gFAAgF;IAChF,QAAQ,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC;CACpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orchestrator-context.js","sourceRoot":"","sources":["../src/orchestrator-context.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Peer identity store interface.
|
|
3
|
+
* Pure contract — implementation (FilePeerStore) lives in the shell layer.
|
|
4
|
+
*/
|
|
5
|
+
import type { PeerIdentity, PairingRequest, ChannelType, ChannelGatewayConfig, PresenceEntry } from "./types.js";
|
|
6
|
+
export interface PeerStore {
|
|
7
|
+
getPeer(peerId: string): Promise<PeerIdentity | undefined>;
|
|
8
|
+
upsertPeer(peer: Omit<PeerIdentity, "id" | "firstSeenAt"> & {
|
|
9
|
+
id?: string;
|
|
10
|
+
}): Promise<PeerIdentity>;
|
|
11
|
+
listPeers(channel?: ChannelType): Promise<PeerIdentity[]>;
|
|
12
|
+
isAllowed(peerId: string, channelConfig?: ChannelGatewayConfig): Promise<boolean>;
|
|
13
|
+
addToAllowlist(peerId: string): Promise<void>;
|
|
14
|
+
removeFromAllowlist(peerId: string): Promise<void>;
|
|
15
|
+
getAllowlist(): Promise<string[]>;
|
|
16
|
+
createPairingRequest(channel: ChannelType, externalId: string, displayName?: string): Promise<PairingRequest>;
|
|
17
|
+
resolvePairing(code: string): Promise<PairingRequest | undefined>;
|
|
18
|
+
getPendingPairing(peerId: string): Promise<PairingRequest | undefined>;
|
|
19
|
+
cleanExpiredPairings(): Promise<number>;
|
|
20
|
+
getSessionId(peerId: string): Promise<string | undefined>;
|
|
21
|
+
setSessionId(peerId: string, sessionId: string): Promise<void>;
|
|
22
|
+
clearSession(peerId: string): Promise<void>;
|
|
23
|
+
linkPeers(peerId: string, linkedTo: string): Promise<void>;
|
|
24
|
+
resolveCanonicalId(peerId: string): Promise<string>;
|
|
25
|
+
updatePresence(peerId: string, activity: PresenceEntry["activity"]): Promise<void>;
|
|
26
|
+
getPresence(): Promise<PresenceEntry[]>;
|
|
27
|
+
prunePresence(ttlMs?: number): Promise<number>;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=peer-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"peer-store.d.ts","sourceRoot":"","sources":["../src/peer-store.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,cAAc,EACd,WAAW,EACX,oBAAoB,EACpB,aAAa,EACd,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,SAAS;IAExB,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAAC;IAC3D,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,GAAG,aAAa,CAAC,GAAG;QAAE,EAAE,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,YAAY,CAAC,CA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AE,aAAa,CAAC,UAAU,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnF,WAAW,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC;IACxC,aAAa,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAChD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"peer-store.js","sourceRoot":"","sources":["../src/peer-store.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { OrchestratorContext } from "./orchestrator-context.js";
|
|
2
|
+
import type { NotificationRouterPort } from "./notification-router-port.js";
|
|
3
|
+
import type { MissionQualityGate, QualityMetrics, Task, Mission } from "./types.js";
|
|
4
|
+
/**
|
|
5
|
+
* QualityController — manages quality gates within missions and aggregates
|
|
6
|
+
* quality metrics across tasks, agents, and missions.
|
|
7
|
+
*/
|
|
8
|
+
export declare class QualityController {
|
|
9
|
+
private ctx;
|
|
10
|
+
private metrics;
|
|
11
|
+
private evaluatedGates;
|
|
12
|
+
private registeredGateRules;
|
|
13
|
+
private notificationRouter?;
|
|
14
|
+
constructor(ctx: OrchestratorContext);
|
|
15
|
+
setNotificationRouter(router: NotificationRouterPort): void;
|
|
16
|
+
init(): void;
|
|
17
|
+
evaluateGate(missionId: string, gate: MissionQualityGate, tasks: Task[]): {
|
|
18
|
+
passed: boolean;
|
|
19
|
+
reason?: string;
|
|
20
|
+
avgScore?: number;
|
|
21
|
+
};
|
|
22
|
+
getBlockingGate(missionId: string, taskTitle: string, taskId: string, gates: MissionQualityGate[], tasks: Task[]): {
|
|
23
|
+
gate: MissionQualityGate;
|
|
24
|
+
result: {
|
|
25
|
+
passed: boolean;
|
|
26
|
+
reason?: string;
|
|
27
|
+
avgScore?: number;
|
|
28
|
+
};
|
|
29
|
+
} | undefined;
|
|
30
|
+
checkMissionThreshold(mission: Mission, tasks: Task[], defaultThreshold?: number): {
|
|
31
|
+
avgScore?: number;
|
|
32
|
+
threshold?: number;
|
|
33
|
+
passed: boolean;
|
|
34
|
+
};
|
|
35
|
+
private recordAssessment;
|
|
36
|
+
getMetrics(entityType: "task" | "agent" | "mission", entityId: string): QualityMetrics | undefined;
|
|
37
|
+
getAllMetrics(entityType?: "task" | "agent" | "mission"): QualityMetrics[];
|
|
38
|
+
aggregateMissionMetrics(missionId: string, tasks: Task[]): QualityMetrics;
|
|
39
|
+
private metricsKey;
|
|
40
|
+
private getOrCreate;
|
|
41
|
+
private getScoresArray;
|
|
42
|
+
private ensureGateNotificationRules;
|
|
43
|
+
clearGateCache(missionId?: string): void;
|
|
44
|
+
dispose(): void;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=quality-controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quality-controller.d.ts","sourceRoot":"","sources":["../src/quality-controller.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,IAAI,EAAE,OAAO,EAAoB,MAAM,YAAY,CAAC;AAEtG;;;GAGG;AACH,qBAAa,iBAAiB;IAO1B,OAAO,CAAC,GAAG;IANb,OAAO,CAAC,OAAO,CAAqC;IACpD,OAAO,CAAC,cAAc,CAAqB;IAC3C,OAAO,CAAC,mBAAmB,CAAqB;IAChD,OAAO,CAAC,kBAAkB,CAAC,CAAyB;gBAG1C,GAAG,EAAE,mBAAmB;IAGlC,qBAAqB,CAAC,MAAM,EAAE,sBAAsB,GAAG,IAAI;IAI3D,IAAI,IAAI,IAAI;IA2DZ,YAAY,CACV,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,kBAAkB,EACxB,KAAK,EAAE,IAAI,EAAE,GACZ;QAAE,MAAM,EAAE,OAAO,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