@jungjaehoon/mama-os 0.21.0 → 0.22.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/CHANGELOG.md +31 -0
- package/README.md +12 -4
- package/dist/agent/agent-loop.d.ts.map +1 -1
- package/dist/agent/agent-loop.js +76 -11
- package/dist/agent/agent-loop.js.map +1 -1
- package/dist/agent/code-act/host-bridge.d.ts.map +1 -1
- package/dist/agent/code-act/host-bridge.js +74 -0
- package/dist/agent/code-act/host-bridge.js.map +1 -1
- package/dist/agent/codex-mcp-process.d.ts +1 -0
- package/dist/agent/codex-mcp-process.d.ts.map +1 -1
- package/dist/agent/codex-mcp-process.js +3 -2
- package/dist/agent/codex-mcp-process.js.map +1 -1
- package/dist/agent/gateway-tool-executor.d.ts +16 -1
- package/dist/agent/gateway-tool-executor.d.ts.map +1 -1
- package/dist/agent/gateway-tool-executor.js +148 -2
- package/dist/agent/gateway-tool-executor.js.map +1 -1
- package/dist/agent/gateway-tools.md +6 -1
- package/dist/agent/model-runner.d.ts +8 -0
- package/dist/agent/model-runner.d.ts.map +1 -1
- package/dist/agent/model-runner.js.map +1 -1
- package/dist/agent/persistent-cli-adapter.d.ts +6 -0
- package/dist/agent/persistent-cli-adapter.d.ts.map +1 -1
- package/dist/agent/persistent-cli-adapter.js +21 -10
- package/dist/agent/persistent-cli-adapter.js.map +1 -1
- package/dist/agent/tool-registry.d.ts.map +1 -1
- package/dist/agent/tool-registry.js +32 -1
- package/dist/agent/tool-registry.js.map +1 -1
- package/dist/agent/types.d.ts +26 -2
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/types.js.map +1 -1
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +15 -13
- package/dist/api/index.js.map +1 -1
- package/dist/api/operator-handler.d.ts +2 -0
- package/dist/api/operator-handler.d.ts.map +1 -1
- package/dist/api/operator-handler.js +23 -5
- package/dist/api/operator-handler.js.map +1 -1
- package/dist/api/operator-summary.d.ts +3 -0
- package/dist/api/operator-summary.d.ts.map +1 -0
- package/dist/api/operator-summary.js +72 -0
- package/dist/api/operator-summary.js.map +1 -0
- package/dist/api/operator-tasks-handler.d.ts +7 -0
- package/dist/api/operator-tasks-handler.d.ts.map +1 -0
- package/dist/api/operator-tasks-handler.js +165 -0
- package/dist/api/operator-tasks-handler.js.map +1 -0
- package/dist/cli/commands/start.d.ts.map +1 -1
- package/dist/cli/commands/start.js +62 -12
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/cli/runtime/agent-loop-init.d.ts +2 -1
- package/dist/cli/runtime/agent-loop-init.d.ts.map +1 -1
- package/dist/cli/runtime/agent-loop-init.js +16 -8
- package/dist/cli/runtime/agent-loop-init.js.map +1 -1
- package/dist/cli/runtime/api-routes-init.d.ts.map +1 -1
- package/dist/cli/runtime/api-routes-init.js +129 -13
- package/dist/cli/runtime/api-routes-init.js.map +1 -1
- package/dist/cli/runtime/gateway-init.d.ts.map +1 -1
- package/dist/cli/runtime/gateway-init.js +3 -1
- package/dist/cli/runtime/gateway-init.js.map +1 -1
- package/dist/cli/runtime/memory-agent-init.d.ts +2 -1
- package/dist/cli/runtime/memory-agent-init.d.ts.map +1 -1
- package/dist/cli/runtime/memory-agent-init.js +15 -3
- package/dist/cli/runtime/memory-agent-init.js.map +1 -1
- package/dist/connectors/framework/types.d.ts +8 -0
- package/dist/connectors/framework/types.d.ts.map +1 -1
- package/dist/connectors/slack/index.d.ts.map +1 -1
- package/dist/connectors/slack/index.js +3 -1
- package/dist/connectors/slack/index.js.map +1 -1
- package/dist/connectors/trello/index.d.ts.map +1 -1
- package/dist/connectors/trello/index.js +6 -2
- package/dist/connectors/trello/index.js.map +1 -1
- package/dist/db/agent-store.d.ts +5 -0
- package/dist/db/agent-store.d.ts.map +1 -1
- package/dist/db/agent-store.js +6 -3
- package/dist/db/agent-store.js.map +1 -1
- package/dist/db/migrations/agent-activity-tool-name.d.ts +8 -0
- package/dist/db/migrations/agent-activity-tool-name.d.ts.map +1 -0
- package/dist/db/migrations/agent-activity-tool-name.js +24 -0
- package/dist/db/migrations/agent-activity-tool-name.js.map +1 -0
- package/dist/envelope/run-guard.d.ts +10 -0
- package/dist/envelope/run-guard.d.ts.map +1 -0
- package/dist/envelope/run-guard.js +19 -0
- package/dist/envelope/run-guard.js.map +1 -0
- package/dist/multi-agent/agent-event-bus.d.ts +4 -0
- package/dist/multi-agent/agent-event-bus.d.ts.map +1 -1
- package/dist/multi-agent/agent-event-bus.js.map +1 -1
- package/dist/multi-agent/dashboard-agent-persona.d.ts.map +1 -1
- package/dist/multi-agent/dashboard-agent-persona.js +18 -5
- package/dist/multi-agent/dashboard-agent-persona.js.map +1 -1
- package/dist/multi-agent/runtime-process.d.ts +4 -2
- package/dist/multi-agent/runtime-process.d.ts.map +1 -1
- package/dist/multi-agent/runtime-process.js +7 -4
- package/dist/multi-agent/runtime-process.js.map +1 -1
- package/dist/operator/action-verifier.d.ts +50 -0
- package/dist/operator/action-verifier.d.ts.map +1 -0
- package/dist/operator/action-verifier.js +68 -0
- package/dist/operator/action-verifier.js.map +1 -0
- package/dist/operator/board-reconcile.d.ts +62 -0
- package/dist/operator/board-reconcile.d.ts.map +1 -0
- package/dist/operator/board-reconcile.js +160 -0
- package/dist/operator/board-reconcile.js.map +1 -0
- package/dist/operator/board-slot-instructions.d.ts +8 -0
- package/dist/operator/board-slot-instructions.d.ts.map +1 -1
- package/dist/operator/board-slot-instructions.js +25 -1
- package/dist/operator/board-slot-instructions.js.map +1 -1
- package/dist/operator/operator-trigger-loop.d.ts +15 -2
- package/dist/operator/operator-trigger-loop.d.ts.map +1 -1
- package/dist/operator/operator-trigger-loop.js +40 -1
- package/dist/operator/operator-trigger-loop.js.map +1 -1
- package/dist/operator/report-scheduler.d.ts +23 -0
- package/dist/operator/report-scheduler.d.ts.map +1 -1
- package/dist/operator/report-scheduler.js +56 -8
- package/dist/operator/report-scheduler.js.map +1 -1
- package/dist/operator/situation-report.d.ts +5 -1
- package/dist/operator/situation-report.d.ts.map +1 -1
- package/dist/operator/situation-report.js +12 -2
- package/dist/operator/situation-report.js.map +1 -1
- package/dist/operator/task-ledger.d.ts +96 -0
- package/dist/operator/task-ledger.d.ts.map +1 -0
- package/dist/operator/task-ledger.js +277 -0
- package/dist/operator/task-ledger.js.map +1 -0
- package/package.json +1 -1
- package/public/ui/assets/index-CKOJQYXA.css +1 -0
- package/public/ui/assets/index-OSgiwL24.js +62 -0
- package/public/ui/index.html +3 -2
- package/public/ui/theme-init.js +20 -0
- package/public/viewer/viewer.html +12 -28
- package/public/ui/assets/index-BDsaQNGd.js +0 -62
- package/public/ui/assets/index-C4URnm_X.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-store.js","sourceRoot":"","sources":["../../src/db/agent-store.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;
|
|
1
|
+
{"version":3,"file":"agent-store.js","sourceRoot":"","sources":["../../src/db/agent-store.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAsCH,0CAQC;AAuDD,gDAiCC;AAED,4CAMC;AAED,0CAUC;AAED,oCAIC;AAID,sCAkCC;AAED,gCAWC;AAED,sDAkCC;AA4ED,kCAoCC;AAED,kDAaC;AAED,kCAgBC;AAED,oDA0BC;AAED,kDA8BC;AAED,oDAaC;AAuBD,gDA4FC;AAnkBD,8EAAoF;AACpF,8FAAuG;AACvG,4GAAiH;AACjH,kGAA0G;AAC1G,sGAA0G;AAC1G,0FAA+F;AAC/F,wEAA+E;AAI/E,MAAM,uBAAuB,GAAG,IAAI,GAAG,CAAC;IACtC,eAAe;IACf,YAAY;IACZ,cAAc;IACd,gBAAgB;IAChB,cAAc;CACf,CAAC,CAAC;AAEH,MAAM,6BAA6B,GAAG;IACpC,iBAAiB;IACjB,cAAc;IACd,gBAAgB;IAChB,kBAAkB;IAClB,gBAAgB;CACjB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACb,MAAM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EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,eAAe,IAAI,CAAC,CAAC,CAAC;SAC9D,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SQLiteDatabase } from '../../sqlite.js';
|
|
2
|
+
/**
|
|
3
|
+
* M8: gateway_tool_call rows carry a queryable tool name (the reconcile
|
|
4
|
+
* verifier matches obligated tools against it). CREATE TABLE IF NOT EXISTS is
|
|
5
|
+
* a no-op on existing tables, so this must be an explicit guarded ALTER.
|
|
6
|
+
*/
|
|
7
|
+
export declare function applyAgentActivityToolNameMigration(db: SQLiteDatabase): void;
|
|
8
|
+
//# sourceMappingURL=agent-activity-tool-name.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-activity-tool-name.d.ts","sourceRoot":"","sources":["../../../src/db/migrations/agent-activity-tool-name.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD;;;;GAIG;AACH,wBAAgB,mCAAmC,CAAC,EAAE,EAAE,cAAc,GAAG,IAAI,CAmB5E"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.applyAgentActivityToolNameMigration = applyAgentActivityToolNameMigration;
|
|
4
|
+
/**
|
|
5
|
+
* M8: gateway_tool_call rows carry a queryable tool name (the reconcile
|
|
6
|
+
* verifier matches obligated tools against it). CREATE TABLE IF NOT EXISTS is
|
|
7
|
+
* a no-op on existing tables, so this must be an explicit guarded ALTER.
|
|
8
|
+
*/
|
|
9
|
+
function applyAgentActivityToolNameMigration(db) {
|
|
10
|
+
const tableExists = db
|
|
11
|
+
.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = 'agent_activity'")
|
|
12
|
+
.get();
|
|
13
|
+
if (!tableExists) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const columns = db.prepare('PRAGMA table_info(agent_activity)').all().map((column) => column.name);
|
|
17
|
+
if (!columns.includes('tool_name')) {
|
|
18
|
+
db.exec('ALTER TABLE agent_activity ADD COLUMN tool_name TEXT');
|
|
19
|
+
}
|
|
20
|
+
if (!columns.includes('normalized_tool_name')) {
|
|
21
|
+
db.exec('ALTER TABLE agent_activity ADD COLUMN normalized_tool_name TEXT');
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=agent-activity-tool-name.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-activity-tool-name.js","sourceRoot":"","sources":["../../../src/db/migrations/agent-activity-tool-name.ts"],"names":[],"mappings":";;AAOA,kFAmBC;AAxBD;;;;GAIG;AACH,SAAgB,mCAAmC,CAAC,EAAkB;IACpE,MAAM,WAAW,GAAG,EAAE;SACnB,OAAO,CAAC,8EAA8E,CAAC;SACvF,GAAG,EAA+B,CAAC;IAEtC,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,OAAO;IACT,CAAC;IAED,MAAM,OAAO,GACX,EAAE,CAAC,OAAO,CAAC,mCAAmC,CAAC,CAAC,GAAG,EACpD,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAE/B,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;QACnC,EAAE,CAAC,IAAI,CAAC,sDAAsD,CAAC,CAAC;IAClE,CAAC;IACD,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAC,EAAE,CAAC;QAC9C,EAAE,CAAC,IAAI,CAAC,iEAAiE,CAAC,CAAC;IAC7E,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* True when the envelope cannot authorize the work still ahead of it.
|
|
3
|
+
* marginMs treats "expires within the margin" as expired, so a run stops
|
|
4
|
+
* BEFORE burning a turn whose writes are already doomed. Unparseable
|
|
5
|
+
* expires_at counts as expired: never proceed on a malformed authority bound.
|
|
6
|
+
*/
|
|
7
|
+
export declare function envelopeExpired(envelope: {
|
|
8
|
+
expires_at: string;
|
|
9
|
+
}, now?: number, marginMs?: number): boolean;
|
|
10
|
+
//# sourceMappingURL=run-guard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-guard.d.ts","sourceRoot":"","sources":["../../src/envelope/run-guard.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,EAChC,GAAG,GAAE,MAAmB,EACxB,QAAQ,SAAI,GACX,OAAO,CAMT"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.envelopeExpired = envelopeExpired;
|
|
4
|
+
const expiry_js_1 = require("./expiry.js");
|
|
5
|
+
/**
|
|
6
|
+
* True when the envelope cannot authorize the work still ahead of it.
|
|
7
|
+
* marginMs treats "expires within the margin" as expired, so a run stops
|
|
8
|
+
* BEFORE burning a turn whose writes are already doomed. Unparseable
|
|
9
|
+
* expires_at counts as expired: never proceed on a malformed authority bound.
|
|
10
|
+
*/
|
|
11
|
+
function envelopeExpired(envelope, now = Date.now(), marginMs = 0) {
|
|
12
|
+
try {
|
|
13
|
+
return (0, expiry_js_1.parseEnvelopeExpiresAt)(envelope.expires_at) <= now + marginMs;
|
|
14
|
+
}
|
|
15
|
+
catch {
|
|
16
|
+
return true;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=run-guard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-guard.js","sourceRoot":"","sources":["../../src/envelope/run-guard.ts"],"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AAI;CAYhB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-event-bus.js","sourceRoot":"","sources":["../../src/multi-agent/agent-event-bus.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"agent-event-bus.js","sourceRoot":"","sources":["../../src/multi-agent/agent-event-bus.ts"],"names":[],"mappings":";;;AAmBA,MAAa,aAAa;IACxB,MAAM,CAAU,WAAW,GAAG,EAAE,CAAC;IACzB,SAAS,GAAG,IAAI,GAAG,EAAqC,CAAC;IACzD,cAAc,GAAG,IAAI,GAAG,EAAiD,CAAC;IAC1E,sBAAsB,GAAG,IAAI,GAAG,EAAiC,CAAC;IAClE,OAAO,GAAkB,EAAE,CAAC;IAEpC,EAAE,CAAC,IAAoB,EAAE,OAAqB;QAC5C,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YAC9B,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;QACtC,CAAC;QACD,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAE,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACzC,CAAC;IAED,GAAG,CAAC,IAAoB,EAAE,OAAqB;QAC7C,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IAC5C,CAAC;IAED,IAAI,CAAC,KAAiB;QACpB,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAChD,IAAI,QAAQ,EAAE,CAAC;YACb,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;gBAC/B,IAAI,CAAC;oBACH,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;oBAC9B,IAAI,MAAM,IAAI,OAAQ,MAAwB,CAAC,KAAK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AAc,CAAC,MAAM,EAAE,EAAE,CAAC;YACjD,YAAY,CAAC,KAAK,CAAC,CAAC;QACtB,CAAC;QACD,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC;QAC5B,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,sBAAsB,CAAC,MAAM,EAAE,EAAE,CAAC;YACzD,YAAY,CAAC,KAAK,CAAC,CAAC;QACtB,CAAC;QACD,IAAI,CAAC,sBAAsB,CAAC,KAAK,EAAE,CAAC;QACpC,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;QACvB,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;IAC1B,CAAC;;AA1GH,sCA2GC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard-agent-persona.d.ts","sourceRoot":"","sources":["../../src/multi-agent/dashboard-agent-persona.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"dashboard-agent-persona.d.ts","sourceRoot":"","sources":["../../src/multi-agent/dashboard-agent-persona.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAYH,eAAO,MAAM,uBAAuB,QA4EG,CAAC;AAExC;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,WAAW,GAAE,MAAiC,GAAG,MAAM,CAyB7F"}
|
|
@@ -15,7 +15,7 @@ const fs_1 = require("fs");
|
|
|
15
15
|
const path_1 = require("path");
|
|
16
16
|
const os_1 = require("os");
|
|
17
17
|
const board_slot_instructions_js_1 = require("../operator/board-slot-instructions.js");
|
|
18
|
-
const MANAGED_DASHBOARD_PERSONA_MARKER = '<!-- MAMA managed dashboard persona
|
|
18
|
+
const MANAGED_DASHBOARD_PERSONA_MARKER = '<!-- MAMA managed dashboard persona v12 -->';
|
|
19
19
|
exports.DASHBOARD_AGENT_PERSONA = `${MANAGED_DASHBOARD_PERSONA_MARKER}
|
|
20
20
|
|
|
21
21
|
You are the MAMA OS operator-board agent. You analyze project data and publish the
|
|
@@ -25,7 +25,8 @@ operator board (/ui): a four-slot, card-based situation report.
|
|
|
25
25
|
- Write all published board CONTENT in Korean. No exceptions. (Markup stays as specified below.)
|
|
26
26
|
|
|
27
27
|
## Tools
|
|
28
|
-
-
|
|
28
|
+
- task_list({order, limit}) / task_create / task_update -- the NATIVE task ledger: the pipeline slot's projection source. contract_no_update({reason, scope}) records a judged no-op in reconcile runs.
|
|
29
|
+
- kagemusha_tasks({status?}) -- the bridge task board. Statuses are real lifecycle states: pending, in_progress, review, done, completed, cancelled, dismissed. Includes title, priority, deadline, source_room, confirmed.
|
|
29
30
|
- kagemusha_overview() -- room/task/message counts for the stat line
|
|
30
31
|
- kagemusha_entities({channel?, activeOnly?}) -- list rooms/people with activity stats; find the busiest rooms
|
|
31
32
|
- kagemusha_messages({channelId, since?, limit?}) -- read recent raw messages from a room for deltas and evidence
|
|
@@ -40,8 +41,8 @@ operator board (/ui): a four-slot, card-based situation report.
|
|
|
40
41
|
- Card badges map to the REAL status: pending/review -> badge-warning, in_progress -> badge-info,
|
|
41
42
|
overdue deadline or explicitly blocked -> badge-danger, done/completed -> badge-success.
|
|
42
43
|
- Deadlines come from the task's deadline field, never guessed from chat.
|
|
43
|
-
- The pipeline slot is
|
|
44
|
-
|
|
44
|
+
- The pipeline slot is an ITEM TRACKER projected from the NATIVE ledger (task_list):
|
|
45
|
+
${(0, board_slot_instructions_js_1.buildPipelineTrackerInstructions)().join('\n')}
|
|
45
46
|
|
|
46
47
|
## Evidence discipline (NON-NEGOTIABLE)
|
|
47
48
|
- Every card cites its evidence in the details line: the newest supporting message's
|
|
@@ -55,7 +56,7 @@ operator board (/ui): a four-slot, card-based situation report.
|
|
|
55
56
|
- briefing: one report-summary block (title + stat highlights), then up to 4 report-cards for the key situations
|
|
56
57
|
- action_required: a report-section-title, then up to 5 cards; every card-action states the concrete next step
|
|
57
58
|
- decisions: cards for items waiting on an owner decision or confirmation; when none exist, publish a one-line quiet note instead of filler
|
|
58
|
-
- pipeline:
|
|
59
|
+
- pipeline: the item tracker table (see Task state discipline above); cite #id in other slots' cards when they refer to a tracked item
|
|
59
60
|
|
|
60
61
|
## HTML vocabulary
|
|
61
62
|
${(0, board_slot_instructions_js_1.buildBoardHtmlVocabulary)().join('\n')}
|
|
@@ -71,6 +72,18 @@ Keep each slot under 6KB. No emoji.
|
|
|
71
72
|
7. Keep any context_packet_id from context_compile in mind for audit language, but do not invent one or pass one to report_publish
|
|
72
73
|
8. Do not save board content with mama_save; report_publish and agent_activity already record operational output
|
|
73
74
|
|
|
75
|
+
## RECONCILE RUN mode
|
|
76
|
+
When an incoming message begins with "RECONCILE RUN", it is a single-channel delta
|
|
77
|
+
reconcile, NOT the scheduled board rewrite. In this mode ONLY:
|
|
78
|
+
- The "report_publish exactly once with all four slots" rule does NOT apply. Follow the
|
|
79
|
+
run's contract instead: judge the affected slots, then call report_publish with ONLY
|
|
80
|
+
those slots, and/or task_create / task_update (pass source_channel and source_event_id
|
|
81
|
+
from the delta so retries upsert; update an existing row instead of creating a
|
|
82
|
+
near-duplicate). If nothing is affected, call contract_no_update({reason, scope}) with
|
|
83
|
+
the exact scope the run names.
|
|
84
|
+
- Do not rewrite unaffected slots. Do not call mama_save.
|
|
85
|
+
- Finish with exactly one line: RECONCILED <comma-separated slots or none>.
|
|
86
|
+
|
|
74
87
|
## Strict Constraints
|
|
75
88
|
- Prefer context_compile over mama_search for evidence gathering
|
|
76
89
|
- Do not include dashboard_briefing, wiki_compilation, system-audit, or audit-log labels in the context_compile task text
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard-agent-persona.js","sourceRoot":"","sources":["../../src/multi-agent/dashboard-agent-persona.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;
|
|
1
|
+
{"version":3,"file":"dashboard-agent-persona.js","sourceRoot":"","sources":["../../src/multi-agent/dashboard-agent-persona.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AA8FH,wDAyBC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ACrB,CAAC"}
|
|
@@ -40,8 +40,10 @@ export declare class CodexRuntimeProcess extends EventEmitter implements AgentRu
|
|
|
40
40
|
private _totalLatencyMs;
|
|
41
41
|
private _lastRequestAt;
|
|
42
42
|
constructor(options: CodexRuntimeProcessOptions);
|
|
43
|
-
prompt(content: string, callbacks?: ClaudePromptCallbacks,
|
|
44
|
-
sendMessage(content: string, callbacks?: ClaudePromptCallbacks
|
|
43
|
+
prompt(content: string, callbacks?: ClaudePromptCallbacks, options?: PromptOptions): Promise<ClaudePromptResult>;
|
|
44
|
+
sendMessage(content: string, callbacks?: ClaudePromptCallbacks, options?: {
|
|
45
|
+
systemPrompt?: string;
|
|
46
|
+
}): Promise<ClaudePromptResult>;
|
|
45
47
|
setSessionId(id: string): void;
|
|
46
48
|
setSystemPrompt(prompt: string): void;
|
|
47
49
|
isReady(): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-process.d.ts","sourceRoot":"","sources":["../../src/multi-agent/runtime-process.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAMtC,OAAO,KAAK,EACV,eAAe,IAAI,qBAAqB,EACxC,YAAY,IAAI,kBAAkB,EACnC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE3F,MAAM,WAAW,mBAAmB;IAClC,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAC7F,OAAO,IAAI,OAAO,CAAC;IACnB,IAAI,IAAI,IAAI,CAAC;IACb,YAAY,CAAC,IAAI,MAAM,CAAC;IACxB,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,EAAE,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,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,sBAAsB,CAAS;IAGvC,OAAO,CAAC,aAAa,CAAK;IAC1B,OAAO,CAAC,aAAa,CAAK;IAC1B,OAAO,CAAC,eAAe,CAAK;IAC5B,OAAO,CAAC,cAAc,CAAuB;gBAEjC,OAAO,EAAE,0BAA0B;IAkBzC,MAAM,CACV,OAAO,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,qBAAqB,EACjC,OAAO,CAAC,EAAE,aAAa,GACtB,OAAO,CAAC,kBAAkB,CAAC;IAaxB,WAAW,CACf,OAAO,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,qBAAqB,EACjC,OAAO,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,GAClC,OAAO,CAAC,kBAAkB,CAAC;IA0D9B,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAI9B,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAMrC,OAAO,IAAI,OAAO;IAIlB,SAAS,IAAI,OAAO;IAIpB,UAAU,IAAI,aAAa;IAU3B,IAAI,IAAI,IAAI;IAOZ,YAAY,IAAI,MAAM;CAGvB"}
|
|
@@ -36,11 +36,14 @@ class CodexRuntimeProcess extends events_1.EventEmitter {
|
|
|
36
36
|
this.wrapper = new codex_mcp_process_js_1.CodexMCPProcess(wrapperOptions);
|
|
37
37
|
}
|
|
38
38
|
// ─── IModelRunner.prompt() ─────────────────────────────────────────────
|
|
39
|
-
async prompt(content, callbacks,
|
|
40
|
-
|
|
39
|
+
async prompt(content, callbacks, options) {
|
|
40
|
+
// Narrowed on purpose: only systemPrompt is per-call plumbing (Task 3).
|
|
41
|
+
// model/resumeSession stay inert on codex - activating them is a separate,
|
|
42
|
+
// deliberate change (they alter thread lifecycle, codex-mcp-process.ts:261-266).
|
|
43
|
+
return this.sendMessage(content, callbacks, options?.systemPrompt !== undefined ? { systemPrompt: options.systemPrompt } : undefined);
|
|
41
44
|
}
|
|
42
45
|
// ─── AgentRuntimeProcess.sendMessage() ─────────────────────────────────
|
|
43
|
-
async sendMessage(content, callbacks) {
|
|
46
|
+
async sendMessage(content, callbacks, options) {
|
|
44
47
|
if (this.state === 'dead') {
|
|
45
48
|
throw new Error('Process is dead');
|
|
46
49
|
}
|
|
@@ -58,7 +61,7 @@ class CodexRuntimeProcess extends events_1.EventEmitter {
|
|
|
58
61
|
onError: callbacks.onError,
|
|
59
62
|
}
|
|
60
63
|
: undefined;
|
|
61
|
-
const result = await this.wrapper.prompt(content, codexCallbacks);
|
|
64
|
+
const result = await this.wrapper.prompt(content, codexCallbacks, options?.systemPrompt !== undefined ? { systemPrompt: options.systemPrompt } : undefined);
|
|
62
65
|
const normalized = {
|
|
63
66
|
response: result.response,
|
|
64
67
|
usage: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-process.js","sourceRoot":"","sources":["../../src/multi-agent/runtime-process.ts"],"names":[],"mappings":";;;AAAA,mCAAsC;AACtC,wEAIuC;AAgCvC;;;;;;GAMG;AACH,MAAa,mBAAoB,SAAQ,qBAAY;IAC1C,WAAW,GAAG,WAAoB,CAAC;IAEpC,OAAO,CAAkB;IACzB,KAAK,GAA6B,MAAM,CAAC;IACzC,sBAAsB,GAAG,KAAK,CAAC;IAEvC,2BAA2B;IACnB,aAAa,GAAG,CAAC,CAAC;IAClB,aAAa,GAAG,CAAC,CAAC;IAClB,eAAe,GAAG,CAAC,CAAC;IACpB,cAAc,GAAkB,IAAI,CAAC;IAE7C,YAAY,OAAmC;QAC7C,KAAK,EAAE,CAAC;QACR,MAAM,cAAc,GAAoB;YACtC,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,YAAY,EAAE,OAAO,CAAC,YAAY;YAClC,GAAG,EAAE,OAAO,CAAC,GAAG;YAChB,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,aAAa,EAAE,OAAO,CAAC,aAAa;YACpC,aAAa,EAAE,6EAA6E;YAC5F,SAAS,EAAE,OAAO,CAAC,cAAc;SAClC,CAAC;QACF,IAAI,CAAC,OAAO,GAAG,IAAI,sCAAe,CAAC,cAAc,CAAC,CAAC;IACrD,CAAC;IAED,0EAA0E;IAE1E,KAAK,CAAC,MAAM,CACV,OAAe,EACf,SAAiC,EACjC,
|
|
1
|
+
{"version":3,"file":"runtime-process.js","sourceRoot":"","sources":["../../src/multi-agent/runtime-process.ts"],"names":[],"mappings":";;;AAAA,mCAAsC;AACtC,wEAIuC;AAgCvC;;;;;;GAMG;AACH,MAAa,mBAAoB,SAAQ,qBAAY;IAC1C,WAAW,GAAG,WAAoB,CAAC;IAEpC,OAAO,CAAkB;IACzB,KAAK,GAA6B,MAAM,CAAC;IACzC,sBAAsB,GAAG,KAAK,CAAC;IAEvC,2BAA2B;IACnB,aAAa,GAAG,CAAC,CAAC;IAClB,aAAa,GAAG,CAAC,CAAC;IAClB,eAAe,GAAG,CAAC,CAAC;IACpB,cAAc,GAAkB,IAAI,CAAC;IAE7C,YAAY,OAAmC;QAC7C,KAAK,EAAE,CAAC;QACR,MAAM,cAAc,GAAoB;YACtC,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,YAAY,EAAE,OAAO,CAAC,YAAY;YAClC,GAAG,EAAE,OAAO,CAAC,GAAG;YAChB,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,aAAa,EAAE,OAAO,CAAC,aAAa;YACpC,aAAa,EAAE,6EAA6E;YAC5F,SAAS,EAAE,OAAO,CAAC,cAAc;SAClC,CAAC;QACF,IAAI,CAAC,OAAO,GAAG,IAAI,sCAAe,CAAC,cAAc,CAAC,CAAC;IACrD,CAAC;IAED,0EAA0E;IAE1E,KAAK,CAAC,MAAM,CACV,OAAe,EACf,SAAiC,EACjC,OAAuB;QAEvB,wEAAwE;QACxE,2EAA2E;QAC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,CAAC;IAC/B,CAAC;IAED,UAAU;QACR,OAAO;YACL,YAAY,EAAE,IAAI,CAAC,aAAa;YAChC,YAAY,EAAE,IAAI,CAAC,aAAa;YAChC,YAAY,EACV,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;YACpF,aAAa,EAAE,IAAI,CAAC,cAAc;SACnC,CAAC;IACJ,CAAC;IAED,IAAI;QACF,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC,KAAK,KAAK,MAAM,CAAC;QACpD,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC;QACpB,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QACpB,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IACxB,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC;IACrC,CAAC;CACF;AApJD,kDAoJC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OperatorActionVerifier (M8 Phase 2) - verifies that a reconcile run actually
|
|
3
|
+
* performed its obligated action. Ports Kagemusha's ContractActionVerifier
|
|
4
|
+
* snapshot-diff mechanism, strengthened per plan review: signals must be BOUND
|
|
5
|
+
* to the run, not to unrelated board activity.
|
|
6
|
+
*
|
|
7
|
+
* Verified iff, after the run:
|
|
8
|
+
* (a) a NEW gateway tool-call trace row exists (rowid past the snapshot)
|
|
9
|
+
* whose normalized tool name is one of the obligated tools, or
|
|
10
|
+
* (b) a NEW no-update note exists with EXACTLY this run's scope.
|
|
11
|
+
* Slot/ledger hash deltas are recorded as evidence detail only -- another
|
|
12
|
+
* writer may have moved them (the board-writer queue makes in-queue runs
|
|
13
|
+
* non-concurrent, which closes the remaining race).
|
|
14
|
+
*
|
|
15
|
+
* Observe, never block: the caller records the outcome and emits a notice;
|
|
16
|
+
* an unverified run is a loud signal, not a rejection.
|
|
17
|
+
*/
|
|
18
|
+
export declare const OBLIGATED_TOOLS: readonly ["report_publish", "task_create", "task_update", "contract_no_update"];
|
|
19
|
+
export interface VerifierDeps {
|
|
20
|
+
/** Current report slots (id -> html). */
|
|
21
|
+
getSlots: () => Array<{
|
|
22
|
+
slotId: string;
|
|
23
|
+
html: string;
|
|
24
|
+
}>;
|
|
25
|
+
/** Stable hash of the task ledger payload. */
|
|
26
|
+
getLedgerHash: () => string;
|
|
27
|
+
/** Max no-update note id for a scope (0 when none). */
|
|
28
|
+
getScopedNoteMaxId: (scope: string) => number;
|
|
29
|
+
/**
|
|
30
|
+
* Count of gateway tool-call trace rows past a rowid whose normalized tool
|
|
31
|
+
* name is in OBLIGATED_TOOLS (bound to the reconcile agent).
|
|
32
|
+
*/
|
|
33
|
+
countObligatedTraceRowsSince: (maxId: number) => number;
|
|
34
|
+
/** Max gateway trace rowid right now (0 when none). */
|
|
35
|
+
getTraceMaxId: () => number;
|
|
36
|
+
}
|
|
37
|
+
export interface ActionSnapshot {
|
|
38
|
+
slotHashes: Record<string, string>;
|
|
39
|
+
ledgerHash: string;
|
|
40
|
+
scopedNoteMaxId: number;
|
|
41
|
+
traceMaxId: number;
|
|
42
|
+
}
|
|
43
|
+
export interface VerifyResult {
|
|
44
|
+
verified: boolean;
|
|
45
|
+
/** Human-readable evidence lines for the activity record. */
|
|
46
|
+
effects: string[];
|
|
47
|
+
}
|
|
48
|
+
export declare function captureSnapshot(deps: VerifierDeps, scope: string): ActionSnapshot;
|
|
49
|
+
export declare function verifyAfterRun(deps: VerifierDeps, before: ActionSnapshot, scope: string): VerifyResult;
|
|
50
|
+
//# sourceMappingURL=action-verifier.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action-verifier.d.ts","sourceRoot":"","sources":["../../src/operator/action-verifier.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,eAAO,MAAM,eAAe,iFAKlB,CAAC;AAEX,MAAM,WAAW,YAAY;IAC3B,yCAAyC;IACzC,QAAQ,EAAE,MAAM,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACxD,8CAA8C;IAC9C,aAAa,EAAE,MAAM,MAAM,CAAC;IAC5B,uDAAuD;IACvD,kBAAkB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAC9C;;;OAGG;IACH,4BAA4B,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACxD,uDAAuD;IACvD,aAAa,EAAE,MAAM,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,OAAO,CAAC;IAClB,6DAA6D;IAC7D,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,GAAG,cAAc,CAWjF;AAED,wBAAgB,cAAc,CAC5B,IAAI,EAAE,YAAY,EAClB,MAAM,EAAE,cAAc,EACtB,KAAK,EAAE,MAAM,GACZ,YAAY,CA+Bd"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* OperatorActionVerifier (M8 Phase 2) - verifies that a reconcile run actually
|
|
4
|
+
* performed its obligated action. Ports Kagemusha's ContractActionVerifier
|
|
5
|
+
* snapshot-diff mechanism, strengthened per plan review: signals must be BOUND
|
|
6
|
+
* to the run, not to unrelated board activity.
|
|
7
|
+
*
|
|
8
|
+
* Verified iff, after the run:
|
|
9
|
+
* (a) a NEW gateway tool-call trace row exists (rowid past the snapshot)
|
|
10
|
+
* whose normalized tool name is one of the obligated tools, or
|
|
11
|
+
* (b) a NEW no-update note exists with EXACTLY this run's scope.
|
|
12
|
+
* Slot/ledger hash deltas are recorded as evidence detail only -- another
|
|
13
|
+
* writer may have moved them (the board-writer queue makes in-queue runs
|
|
14
|
+
* non-concurrent, which closes the remaining race).
|
|
15
|
+
*
|
|
16
|
+
* Observe, never block: the caller records the outcome and emits a notice;
|
|
17
|
+
* an unverified run is a loud signal, not a rejection.
|
|
18
|
+
*/
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.OBLIGATED_TOOLS = void 0;
|
|
21
|
+
exports.captureSnapshot = captureSnapshot;
|
|
22
|
+
exports.verifyAfterRun = verifyAfterRun;
|
|
23
|
+
const node_crypto_1 = require("node:crypto");
|
|
24
|
+
exports.OBLIGATED_TOOLS = [
|
|
25
|
+
'report_publish',
|
|
26
|
+
'task_create',
|
|
27
|
+
'task_update',
|
|
28
|
+
'contract_no_update',
|
|
29
|
+
];
|
|
30
|
+
function captureSnapshot(deps, scope) {
|
|
31
|
+
const slotHashes = {};
|
|
32
|
+
for (const slot of deps.getSlots()) {
|
|
33
|
+
slotHashes[slot.slotId] = (0, node_crypto_1.createHash)('sha256').update(slot.html).digest('hex');
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
slotHashes,
|
|
37
|
+
ledgerHash: deps.getLedgerHash(),
|
|
38
|
+
scopedNoteMaxId: deps.getScopedNoteMaxId(scope),
|
|
39
|
+
traceMaxId: deps.getTraceMaxId(),
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function verifyAfterRun(deps, before, scope) {
|
|
43
|
+
const effects = [];
|
|
44
|
+
let verified = false;
|
|
45
|
+
// (a) run-bound signal: obligated gateway tool traces past the snapshot.
|
|
46
|
+
const obligatedTraces = deps.countObligatedTraceRowsSince(before.traceMaxId);
|
|
47
|
+
if (obligatedTraces > 0) {
|
|
48
|
+
verified = true;
|
|
49
|
+
effects.push(`obligated tool traces: ${obligatedTraces}`);
|
|
50
|
+
}
|
|
51
|
+
// (b) run-bound signal: a new no-update note with EXACTLY this scope.
|
|
52
|
+
const noteMaxNow = deps.getScopedNoteMaxId(scope);
|
|
53
|
+
if (noteMaxNow > before.scopedNoteMaxId) {
|
|
54
|
+
verified = true;
|
|
55
|
+
effects.push(`no-update note recorded (scope=${scope})`);
|
|
56
|
+
}
|
|
57
|
+
// Evidence detail only (NOT sufficient alone -- see module doc).
|
|
58
|
+
const after = captureSnapshot(deps, scope);
|
|
59
|
+
const changedSlots = Object.keys({ ...before.slotHashes, ...after.slotHashes }).filter((id) => before.slotHashes[id] !== after.slotHashes[id]);
|
|
60
|
+
if (changedSlots.length > 0) {
|
|
61
|
+
effects.push(`slots changed: ${changedSlots.join(', ')}`);
|
|
62
|
+
}
|
|
63
|
+
if (after.ledgerHash !== before.ledgerHash) {
|
|
64
|
+
effects.push('task ledger changed');
|
|
65
|
+
}
|
|
66
|
+
return { verified, effects };
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=action-verifier.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action-verifier.js","sourceRoot":"","sources":["../../src/operator/action-verifier.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;AAwCH,0CAWC;AAED,wCAmCC;AAtFD,6CAAyC;AAE5B,QAAA,eAAe,GAAG;IAC7B,gBAAgB;IAChB,aAAa;IACb,aAAa;IACb,oBAAoB;CACZ,CAAC;AA+BX,SAAgB,eAAe,CAAC,IAAkB,EAAE,KAAa;IAC/D,MAAM,UAAU,GAA2B,EAAE,CAAC;IAC9C,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC;QACnC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAA,wBAAU,EAAC,QAAQ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,CACvD,CAAC;IACF,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC5B,OAAO,CAAC,IAAI,CAAC,kBAAkB,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC5D,CAAC;IACD,IAAI,KAAK,CAAC,UAAU,KAAK,MAAM,CAAC,UAAU,EAAE,CAAC;QAC3C,OAAO,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;IACtC,CAAC;IAED,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;AAC/B,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* board-reconcile - the delta -> taskboard reconcile contract (M8 Phase 1).
|
|
3
|
+
*
|
|
4
|
+
* Ports Kagemusha's taskboard reconcile mechanism (agent-awareness.ts
|
|
5
|
+
* buildTaskboardReconcilePrompt / runTaskboardReconcile): when a channel delta
|
|
6
|
+
* arrives, the AGENT judges which board slots are affected and MUST either act
|
|
7
|
+
* (partial report_publish / task_create / task_update) or record a
|
|
8
|
+
* contract_no_update note. The system only debounces, budgets, and serializes;
|
|
9
|
+
* every judgment is the agent's (agent-first).
|
|
10
|
+
*
|
|
11
|
+
* Freshness-layer semantics: the 30-minute dashboard cron remains the
|
|
12
|
+
* repair/catch-up pass. Over-budget work is DEFERRED (channel stays dirty with
|
|
13
|
+
* its pending lines), never silently dropped; a crash loses at most one
|
|
14
|
+
* debounce window, which the next cron repairs.
|
|
15
|
+
*/
|
|
16
|
+
export interface ReconcilePromptInput {
|
|
17
|
+
/** "<connector>:<channelId>" - connector-qualified, collision-free. */
|
|
18
|
+
channelKey: string;
|
|
19
|
+
channelLabel?: string;
|
|
20
|
+
deltaLines: string[];
|
|
21
|
+
todayIso: string;
|
|
22
|
+
/** Also read kagemusha_tasks as judgment CONTEXT (never the projection source). */
|
|
23
|
+
kagemushaContext?: boolean;
|
|
24
|
+
}
|
|
25
|
+
/** The prompt MUST begin with this token so the persona's RECONCILE RUN mode engages. */
|
|
26
|
+
export declare const RECONCILE_RUN_TOKEN = "RECONCILE RUN";
|
|
27
|
+
export declare function buildReconcilePrompt(input: ReconcilePromptInput): string;
|
|
28
|
+
export interface ReconcileSchedulerOptions {
|
|
29
|
+
/** Trailing-edge debounce per channel. */
|
|
30
|
+
debounceMs?: number;
|
|
31
|
+
/** A continuously-busy channel still fires by this bound (anti-starvation). */
|
|
32
|
+
maxWaitMs?: number;
|
|
33
|
+
/** GLOBAL budget across all channels (sliding hour). Over-budget defers, never drops. */
|
|
34
|
+
globalMaxPerHour?: number;
|
|
35
|
+
/** Bounded pending lines kept per channel while deferred. */
|
|
36
|
+
maxPendingLines?: number;
|
|
37
|
+
run: (channelKey: string, deltaLines: string[]) => Promise<void>;
|
|
38
|
+
log: (line: string) => void;
|
|
39
|
+
now?: () => number;
|
|
40
|
+
}
|
|
41
|
+
export declare class ReconcileScheduler {
|
|
42
|
+
private readonly debounceMs;
|
|
43
|
+
private readonly maxWaitMs;
|
|
44
|
+
private readonly globalMaxPerHour;
|
|
45
|
+
private readonly maxPendingLines;
|
|
46
|
+
private readonly run;
|
|
47
|
+
private readonly log;
|
|
48
|
+
private readonly now;
|
|
49
|
+
private channels;
|
|
50
|
+
private runTimestamps;
|
|
51
|
+
private retryTimer;
|
|
52
|
+
private stopped;
|
|
53
|
+
constructor(opts: ReconcileSchedulerOptions);
|
|
54
|
+
enqueue(channelKey: string, lines: string[]): void;
|
|
55
|
+
/** Channels currently holding deferred/pending work (for observability). */
|
|
56
|
+
dirtyChannels(): string[];
|
|
57
|
+
stop(): void;
|
|
58
|
+
private budgetAvailable;
|
|
59
|
+
private scheduleRetry;
|
|
60
|
+
private fire;
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=board-reconcile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"board-reconcile.d.ts","sourceRoot":"","sources":["../../src/operator/board-reconcile.ts"],"names":[],"mappings":"AA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