@jungjaehoon/mama-os 0.22.0 → 0.23.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 +22 -0
- package/README.md +3 -1
- package/dist/agent/agent-loop.d.ts +0 -3
- package/dist/agent/agent-loop.d.ts.map +1 -1
- package/dist/agent/agent-loop.js +49 -34
- package/dist/agent/agent-loop.js.map +1 -1
- package/dist/agent/gateway-tool-executor.d.ts +18 -0
- package/dist/agent/gateway-tool-executor.d.ts.map +1 -1
- package/dist/agent/gateway-tool-executor.js +185 -6
- package/dist/agent/gateway-tool-executor.js.map +1 -1
- package/dist/agent/gateway-tools.md +10 -5
- package/dist/agent/role-manager.d.ts +22 -1
- package/dist/agent/role-manager.d.ts.map +1 -1
- package/dist/agent/role-manager.js +39 -2
- package/dist/agent/role-manager.js.map +1 -1
- package/dist/agent/tool-registry.d.ts.map +1 -1
- package/dist/agent/tool-registry.js +35 -5
- package/dist/agent/tool-registry.js.map +1 -1
- package/dist/agent/types.d.ts +9 -1
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/types.js.map +1 -1
- package/dist/api/graph-api.d.ts.map +1 -1
- package/dist/api/graph-api.js +43 -33
- package/dist/api/graph-api.js.map +1 -1
- package/dist/api/operator-tasks-handler.d.ts.map +1 -1
- package/dist/api/operator-tasks-handler.js +6 -2
- package/dist/api/operator-tasks-handler.js.map +1 -1
- package/dist/cli/commands/start.d.ts.map +1 -1
- package/dist/cli/commands/start.js +185 -2
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/cli/config/config-manager.d.ts +0 -5
- package/dist/cli/config/config-manager.d.ts.map +1 -1
- package/dist/cli/config/config-manager.js +57 -2
- package/dist/cli/config/config-manager.js.map +1 -1
- package/dist/cli/config/types.d.ts.map +1 -1
- package/dist/cli/config/types.js +35 -0
- package/dist/cli/config/types.js.map +1 -1
- package/dist/cli/runtime/agent-loop-init.d.ts.map +1 -1
- package/dist/cli/runtime/agent-loop-init.js +96 -51
- package/dist/cli/runtime/agent-loop-init.js.map +1 -1
- package/dist/cli/runtime/api-routes-init.d.ts +3 -0
- package/dist/cli/runtime/api-routes-init.d.ts.map +1 -1
- package/dist/cli/runtime/api-routes-init.js +293 -196
- 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 +5 -0
- package/dist/cli/runtime/gateway-init.js.map +1 -1
- package/dist/cli/runtime/gateway-wiring.d.ts.map +1 -1
- package/dist/cli/runtime/gateway-wiring.js +6 -0
- package/dist/cli/runtime/gateway-wiring.js.map +1 -1
- package/dist/envelope/reactive-config.d.ts.map +1 -1
- package/dist/envelope/reactive-config.js +26 -1
- package/dist/envelope/reactive-config.js.map +1 -1
- package/dist/gateways/message-router.d.ts +18 -1
- package/dist/gateways/message-router.d.ts.map +1 -1
- package/dist/gateways/message-router.js +155 -22
- package/dist/gateways/message-router.js.map +1 -1
- package/dist/gateways/telegram.d.ts +1 -0
- package/dist/gateways/telegram.d.ts.map +1 -1
- package/dist/gateways/telegram.js +38 -1
- package/dist/gateways/telegram.js.map +1 -1
- package/dist/gateways/types.d.ts +3 -0
- package/dist/gateways/types.d.ts.map +1 -1
- package/dist/memory/history-extractor.d.ts +0 -24
- package/dist/memory/history-extractor.d.ts.map +1 -1
- package/dist/memory/history-extractor.js +0 -127
- package/dist/memory/history-extractor.js.map +1 -1
- package/dist/memory/save-candidate-extractor.d.ts +3 -0
- package/dist/memory/save-candidate-extractor.d.ts.map +1 -1
- package/dist/memory/save-candidate-extractor.js +12 -1
- package/dist/memory/save-candidate-extractor.js.map +1 -1
- package/dist/memory/secret-filter.d.ts +22 -0
- package/dist/memory/secret-filter.d.ts.map +1 -0
- package/dist/memory/secret-filter.js +77 -0
- package/dist/memory/secret-filter.js.map +1 -0
- package/dist/observability/code-audit.d.ts +87 -0
- package/dist/observability/code-audit.d.ts.map +1 -0
- package/dist/observability/code-audit.js +403 -0
- package/dist/observability/code-audit.js.map +1 -0
- package/dist/operator/briefs.d.ts +26 -0
- package/dist/operator/briefs.d.ts.map +1 -0
- package/dist/operator/briefs.js +128 -0
- package/dist/operator/briefs.js.map +1 -0
- package/dist/operator/operator-trigger-loop.d.ts +24 -0
- package/dist/operator/operator-trigger-loop.d.ts.map +1 -1
- package/dist/operator/operator-trigger-loop.js +71 -12
- package/dist/operator/operator-trigger-loop.js.map +1 -1
- package/dist/operator/report-carry.d.ts +29 -0
- package/dist/operator/report-carry.d.ts.map +1 -0
- package/dist/operator/report-carry.js +81 -0
- package/dist/operator/report-carry.js.map +1 -0
- package/dist/operator/shadow-capture.d.ts +20 -0
- package/dist/operator/shadow-capture.d.ts.map +1 -0
- package/dist/operator/shadow-capture.js +34 -0
- package/dist/operator/shadow-capture.js.map +1 -0
- package/dist/operator/situation-report.d.ts +6 -0
- package/dist/operator/situation-report.d.ts.map +1 -1
- package/dist/operator/situation-report.js +15 -1
- package/dist/operator/situation-report.js.map +1 -1
- package/dist/operator/task-ledger.d.ts +90 -2
- package/dist/operator/task-ledger.d.ts.map +1 -1
- package/dist/operator/task-ledger.js +359 -23
- package/dist/operator/task-ledger.js.map +1 -1
- package/dist/operator/worker-run.d.ts +59 -0
- package/dist/operator/worker-run.d.ts.map +1 -0
- package/dist/operator/worker-run.js +64 -0
- package/dist/operator/worker-run.js.map +1 -0
- package/dist/operator/workorder-consumer.d.ts +118 -0
- package/dist/operator/workorder-consumer.d.ts.map +1 -0
- package/dist/operator/workorder-consumer.js +248 -0
- package/dist/operator/workorder-consumer.js.map +1 -0
- package/dist/operator/workorder-hooks.d.ts +30 -0
- package/dist/operator/workorder-hooks.d.ts.map +1 -0
- package/dist/operator/workorder-hooks.js +70 -0
- package/dist/operator/workorder-hooks.js.map +1 -0
- package/dist/operator/workorder-publishers.d.ts +68 -0
- package/dist/operator/workorder-publishers.d.ts.map +1 -0
- package/dist/operator/workorder-publishers.js +150 -0
- package/dist/operator/workorder-publishers.js.map +1 -0
- package/dist/security/security-monitor.d.ts +19 -0
- package/dist/security/security-monitor.d.ts.map +1 -1
- package/dist/security/security-monitor.js +68 -14
- package/dist/security/security-monitor.js.map +1 -1
- package/dist/utils/untrusted-content.d.ts +31 -0
- package/dist/utils/untrusted-content.d.ts.map +1 -0
- package/dist/utils/untrusted-content.js +77 -0
- package/dist/utils/untrusted-content.js.map +1 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gateway-tool-executor.d.ts","sourceRoot":"","sources":["../../src/agent/gateway-tool-executor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;
|
|
1
|
+
{"version":3,"file":"gateway-tool-executor.d.ts","sourceRoot":"","sources":["../../src/agent/gateway-tool-executor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAyBH,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EASjB,0BAA0B,EAE1B,gBAAgB,EAShB,YAAY,EASZ,WAAW,EAGX,2BAA2B,EAE3B,kBAAkB,EAClB,cAAc,EAEf,MAAM,YAAY,CAAC;AAYpB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AA0BnE,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,2CAA2C,CAAC;AACnD,OAAO,KAAK,EAAE,iBAAiB,EAAwB,MAAM,4BAA4B,CAAC;AAuB1F,KAAK,uBAAuB,GAAG,2BAA2B,CAAC;AAC3D,KAAK,sBAAsB,GAAG;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE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const util_1 = require("util");
|
|
|
59
59
|
const debugLogger = __importStar(require("@jungjaehoon/mama-core/debug-logger"));
|
|
60
60
|
const mama_core_1 = require("@jungjaehoon/mama-core");
|
|
61
61
|
const security_monitor_js_1 = require("../security/security-monitor.js");
|
|
62
|
+
const secret_filter_js_1 = require("../memory/secret-filter.js");
|
|
62
63
|
const scope_context_js_1 = require("../memory/scope-context.js");
|
|
63
64
|
const types_js_1 = require("./types.js");
|
|
64
65
|
const sqlite_js_1 = __importDefault(require("../sqlite.js"));
|
|
@@ -292,6 +293,9 @@ class GatewayToolExecutor {
|
|
|
292
293
|
currentChannelId = '';
|
|
293
294
|
disallowedGatewayTools = new Set();
|
|
294
295
|
reportPublisher = null;
|
|
296
|
+
reportRequestHandler = null;
|
|
297
|
+
workOrderRequestHandler = null;
|
|
298
|
+
reportReader = null;
|
|
295
299
|
wikiPublisher = null;
|
|
296
300
|
wikiPublishAdapter = null;
|
|
297
301
|
obsidianVaultPath = null;
|
|
@@ -376,6 +380,7 @@ class GatewayToolExecutor {
|
|
|
376
380
|
gatewayCallId: executionContext?.gatewayCallId,
|
|
377
381
|
backgroundTasks: executionContext?.backgroundTasks,
|
|
378
382
|
disallowedGatewayTools: executionContext?.disallowedGatewayTools,
|
|
383
|
+
reportPublisherOverride: executionContext?.reportPublisherOverride,
|
|
379
384
|
};
|
|
380
385
|
}
|
|
381
386
|
getExecutionState() {
|
|
@@ -409,6 +414,9 @@ class GatewayToolExecutor {
|
|
|
409
414
|
backgroundTasks: active.backgroundTasks ?? fallback.backgroundTasks,
|
|
410
415
|
// Never merged from fallback - blocks are strictly per-call.
|
|
411
416
|
disallowedGatewayTools: active.disallowedGatewayTools,
|
|
417
|
+
// Never merged from fallback - a lingering global capture override
|
|
418
|
+
// would swallow LIVE publishes (Stage-2 shadow seam).
|
|
419
|
+
reportPublisherOverride: active.reportPublisherOverride,
|
|
412
420
|
};
|
|
413
421
|
}
|
|
414
422
|
getActiveContext() {
|
|
@@ -533,6 +541,18 @@ class GatewayToolExecutor {
|
|
|
533
541
|
setReportPublisher(fn) {
|
|
534
542
|
this.reportPublisher = fn;
|
|
535
543
|
}
|
|
544
|
+
/** Forwarder hook for on-demand full reports (plan v6 S1-T3). */
|
|
545
|
+
setReportRequestHandler(fn) {
|
|
546
|
+
this.reportRequestHandler = fn;
|
|
547
|
+
}
|
|
548
|
+
/** Forwarder hook for owner-issued workorders (Stage-2 S2-T4; enqueue+ack only). */
|
|
549
|
+
setWorkOrderRequestHandler(fn) {
|
|
550
|
+
this.workOrderRequestHandler = fn;
|
|
551
|
+
}
|
|
552
|
+
/** Read seam for the owner board slots (plan v6 S1-T4 artifact hub). */
|
|
553
|
+
setReportReader(fn) {
|
|
554
|
+
this.reportReader = fn;
|
|
555
|
+
}
|
|
536
556
|
setWikiPublisher(fn) {
|
|
537
557
|
this.wikiPublisher = fn;
|
|
538
558
|
}
|
|
@@ -1564,6 +1584,18 @@ class GatewayToolExecutor {
|
|
|
1564
1584
|
switch (toolName) {
|
|
1565
1585
|
case 'mama_save': {
|
|
1566
1586
|
const saveInput = input;
|
|
1587
|
+
// Secret inviolability (plan v6 S1-T7): a secret saved as a
|
|
1588
|
+
// "decision" would resurface later via mama_search/recall - the one
|
|
1589
|
+
// leak path a chat-reachable tool has. Refuse loudly at the choke.
|
|
1590
|
+
const saveSecretScan = (0, secret_filter_js_1.scanMemoryWriteInput)(saveInput);
|
|
1591
|
+
if (!saveSecretScan.clean) {
|
|
1592
|
+
console.warn(`[Security] mama_save refused: secret-shaped content (${saveSecretScan.matches.join(', ')})`);
|
|
1593
|
+
return {
|
|
1594
|
+
success: false,
|
|
1595
|
+
code: 'secret_material_refused',
|
|
1596
|
+
error: `Refusing to save: content matches secret pattern(s): ${saveSecretScan.matches.join(', ')}. Secrets must never enter memory.`,
|
|
1597
|
+
};
|
|
1598
|
+
}
|
|
1567
1599
|
const api = await getApi();
|
|
1568
1600
|
let trustedOptions;
|
|
1569
1601
|
let effectiveSaveInput = saveInput;
|
|
@@ -1631,17 +1663,45 @@ class GatewayToolExecutor {
|
|
|
1631
1663
|
return await this.handleMamaRecall(input);
|
|
1632
1664
|
case 'context_compile':
|
|
1633
1665
|
return await this.handleContextCompile(input);
|
|
1634
|
-
case 'mama_update':
|
|
1666
|
+
case 'mama_update': {
|
|
1667
|
+
const updateSecretScan = (0, secret_filter_js_1.scanMemoryWriteInput)(input);
|
|
1668
|
+
if (!updateSecretScan.clean) {
|
|
1669
|
+
console.warn(`[Security] mama_update refused: secret-shaped content (${updateSecretScan.matches.join(', ')})`);
|
|
1670
|
+
return {
|
|
1671
|
+
success: false,
|
|
1672
|
+
code: 'secret_material_refused',
|
|
1673
|
+
error: `Refusing to update: content matches secret pattern(s): ${updateSecretScan.matches.join(', ')}. Secrets must never enter memory.`,
|
|
1674
|
+
};
|
|
1675
|
+
}
|
|
1635
1676
|
return await (0, mama_tool_handlers_js_1.handleUpdate)(await getApi(), input);
|
|
1677
|
+
}
|
|
1636
1678
|
case 'mama_load_checkpoint':
|
|
1637
1679
|
return await (0, mama_tool_handlers_js_1.handleLoadCheckpoint)(await getApi(), input);
|
|
1638
1680
|
case 'mama_add': {
|
|
1681
|
+
const addSecretScan = (0, secret_filter_js_1.scanMemoryWriteInput)(input);
|
|
1682
|
+
if (!addSecretScan.clean) {
|
|
1683
|
+
console.warn(`[Security] mama_add refused: secret-shaped content (${addSecretScan.matches.join(', ')})`);
|
|
1684
|
+
return {
|
|
1685
|
+
success: false,
|
|
1686
|
+
code: 'secret_material_refused',
|
|
1687
|
+
error: `Refusing to add: content matches secret pattern(s): ${addSecretScan.matches.join(', ')}. Secrets must never enter memory.`,
|
|
1688
|
+
};
|
|
1689
|
+
}
|
|
1639
1690
|
const api = await getApi();
|
|
1640
1691
|
return await this.handleMamaAdd(input, this.supportsTrustedIngest(api)
|
|
1641
1692
|
? (await this.buildTrustedMemoryWriteOptions('mama_add', gatewayCallId)).options
|
|
1642
1693
|
: undefined);
|
|
1643
1694
|
}
|
|
1644
1695
|
case 'mama_ingest': {
|
|
1696
|
+
const ingestSecretScan = (0, secret_filter_js_1.scanMemoryWriteInput)(input);
|
|
1697
|
+
if (!ingestSecretScan.clean) {
|
|
1698
|
+
console.warn(`[Security] mama_ingest refused: secret-shaped content (${ingestSecretScan.matches.join(', ')})`);
|
|
1699
|
+
return {
|
|
1700
|
+
success: false,
|
|
1701
|
+
code: 'secret_material_refused',
|
|
1702
|
+
error: `Refusing to ingest: content matches secret pattern(s): ${ingestSecretScan.matches.join(', ')}. Secrets must never enter memory.`,
|
|
1703
|
+
};
|
|
1704
|
+
}
|
|
1645
1705
|
const api = await getApi();
|
|
1646
1706
|
return await this.handleMamaIngest(input, this.supportsTrustedIngest(api)
|
|
1647
1707
|
? (await this.buildTrustedMemoryWriteOptions('mama_ingest', gatewayCallId)).options
|
|
@@ -1652,8 +1712,11 @@ class GatewayToolExecutor {
|
|
|
1652
1712
|
if (!slotsInput || typeof slotsInput !== 'object') {
|
|
1653
1713
|
throw new types_js_1.AgentError('report_publish requires slots object', 'TOOL_ERROR', undefined, false);
|
|
1654
1714
|
}
|
|
1655
|
-
|
|
1656
|
-
|
|
1715
|
+
// Stage-2 shadow seam: a per-run capture override takes precedence
|
|
1716
|
+
// over the global singleton (capture runs never touch the live store).
|
|
1717
|
+
const activePublisher = this.getExecutionState().reportPublisherOverride ?? this.reportPublisher;
|
|
1718
|
+
if (activePublisher) {
|
|
1719
|
+
activePublisher(slotsInput);
|
|
1657
1720
|
const slotNames = Object.keys(slotsInput);
|
|
1658
1721
|
return {
|
|
1659
1722
|
success: true,
|
|
@@ -1662,6 +1725,111 @@ class GatewayToolExecutor {
|
|
|
1662
1725
|
}
|
|
1663
1726
|
throw new types_js_1.AgentError('Report publisher not configured', 'TOOL_ERROR', undefined, false);
|
|
1664
1727
|
}
|
|
1728
|
+
case 'report_request': {
|
|
1729
|
+
// Owner intent -> the REAL report machinery. Fire-and-forget: the
|
|
1730
|
+
// report runs on the operator lane and is delivered by the owner
|
|
1731
|
+
// leg; awaiting ~260s here would block the chat turn (and the plan
|
|
1732
|
+
// bans nested awaited lane runs).
|
|
1733
|
+
if (!this.reportRequestHandler) {
|
|
1734
|
+
return {
|
|
1735
|
+
success: false,
|
|
1736
|
+
code: 'report_leg_disabled',
|
|
1737
|
+
error: 'Full-report machinery is not enabled (trigger loop off or report channel unset). ' +
|
|
1738
|
+
'The scheduled report legs are inactive on this deployment.',
|
|
1739
|
+
};
|
|
1740
|
+
}
|
|
1741
|
+
const started = this.reportRequestHandler();
|
|
1742
|
+
if (!started.accepted) {
|
|
1743
|
+
return {
|
|
1744
|
+
success: false,
|
|
1745
|
+
code: `report_${started.reason ?? 'unavailable'}`,
|
|
1746
|
+
error: started.reason === 'busy'
|
|
1747
|
+
? 'The operator lane is busy (a report or tick is in progress). Retry shortly.'
|
|
1748
|
+
: 'Report machinery unavailable (no output sink).',
|
|
1749
|
+
};
|
|
1750
|
+
}
|
|
1751
|
+
return {
|
|
1752
|
+
success: true,
|
|
1753
|
+
message: 'Full report started. It will be generated fresh (delta-anchored) and delivered to the owner channel - tell the owner it is on its way; do not fabricate its contents.',
|
|
1754
|
+
};
|
|
1755
|
+
}
|
|
1756
|
+
case 'workorder_request': {
|
|
1757
|
+
// Owner intent -> a priority workorder. Enqueue + ack ONLY - the
|
|
1758
|
+
// run happens on the operator lane later; awaiting it here would
|
|
1759
|
+
// block the chat turn (plan B6: issue tools are enqueue+ack only).
|
|
1760
|
+
const requestedKind = input.kind;
|
|
1761
|
+
if (requestedKind !== 'board' &&
|
|
1762
|
+
requestedKind !== 'wiki' &&
|
|
1763
|
+
requestedKind !== 'memory-curation') {
|
|
1764
|
+
return {
|
|
1765
|
+
success: false,
|
|
1766
|
+
code: 'invalid_workorder_kind',
|
|
1767
|
+
error: `kind must be one of board|wiki|memory-curation, got: ${String(requestedKind)}`,
|
|
1768
|
+
};
|
|
1769
|
+
}
|
|
1770
|
+
if (!this.workOrderRequestHandler) {
|
|
1771
|
+
return {
|
|
1772
|
+
success: false,
|
|
1773
|
+
code: 'workorder_machinery_disabled',
|
|
1774
|
+
error: 'Stage-2 workorders are not enabled on this deployment (MAMA_STAGE2_WORKORDERS=off).',
|
|
1775
|
+
};
|
|
1776
|
+
}
|
|
1777
|
+
const enqueued = this.workOrderRequestHandler(requestedKind);
|
|
1778
|
+
if (!enqueued.accepted) {
|
|
1779
|
+
return {
|
|
1780
|
+
success: false,
|
|
1781
|
+
code: `workorder_${enqueued.reason ?? 'unavailable'}`,
|
|
1782
|
+
error: `Workorder enqueue failed: ${enqueued.reason ?? 'unknown'}`,
|
|
1783
|
+
};
|
|
1784
|
+
}
|
|
1785
|
+
return {
|
|
1786
|
+
success: true,
|
|
1787
|
+
message: 'Workorder enqueued at priority high. It will run on the operator lane shortly - tell the owner it is queued; do not wait for it or fabricate its result.',
|
|
1788
|
+
};
|
|
1789
|
+
}
|
|
1790
|
+
case 'workorder_status': {
|
|
1791
|
+
if (!this.taskLedger) {
|
|
1792
|
+
return {
|
|
1793
|
+
success: false,
|
|
1794
|
+
code: 'ledger_unavailable',
|
|
1795
|
+
error: 'Task ledger is not wired on this deployment.',
|
|
1796
|
+
};
|
|
1797
|
+
}
|
|
1798
|
+
return { success: true, data: { kinds: this.taskLedger.workOrderStats() } };
|
|
1799
|
+
}
|
|
1800
|
+
case 'board_read': {
|
|
1801
|
+
if (!this.reportReader) {
|
|
1802
|
+
return {
|
|
1803
|
+
success: false,
|
|
1804
|
+
code: 'board_unavailable',
|
|
1805
|
+
error: 'Report store not wired (board_read requires the API server report store).',
|
|
1806
|
+
};
|
|
1807
|
+
}
|
|
1808
|
+
const slots = this.reportReader();
|
|
1809
|
+
return { success: true, slots };
|
|
1810
|
+
}
|
|
1811
|
+
case 'audit_findings_read': {
|
|
1812
|
+
const auditStatePath = (0, path_1.join)(process.env.HOME || (0, os_1.homedir)(), '.mama', 'state', 'audit-findings.json');
|
|
1813
|
+
try {
|
|
1814
|
+
const raw = (0, fs_1.readFileSync)(auditStatePath, 'utf8');
|
|
1815
|
+
return { success: true, findings: JSON.parse(raw) };
|
|
1816
|
+
}
|
|
1817
|
+
catch (error) {
|
|
1818
|
+
const code = error.code;
|
|
1819
|
+
if (code === 'ENOENT') {
|
|
1820
|
+
return {
|
|
1821
|
+
success: true,
|
|
1822
|
+
findings: null,
|
|
1823
|
+
message: 'No audit findings recorded yet (first audit has not run).',
|
|
1824
|
+
};
|
|
1825
|
+
}
|
|
1826
|
+
return {
|
|
1827
|
+
success: false,
|
|
1828
|
+
code: 'audit_state_unreadable',
|
|
1829
|
+
error: `Failed to read audit findings: ${error instanceof Error ? error.message : String(error)}`,
|
|
1830
|
+
};
|
|
1831
|
+
}
|
|
1832
|
+
}
|
|
1665
1833
|
case 'wiki_publish': {
|
|
1666
1834
|
const pagesInput = input.pages;
|
|
1667
1835
|
if (!pagesInput || !Array.isArray(pagesInput)) {
|
|
@@ -1696,7 +1864,15 @@ class GatewayToolExecutor {
|
|
|
1696
1864
|
case 'kagemusha_tasks': {
|
|
1697
1865
|
const { queryTasks } = await import('../connectors/kagemusha/query-tools.js');
|
|
1698
1866
|
const taskInput = input;
|
|
1699
|
-
|
|
1867
|
+
// Vocabulary annotation (Stage-2 S2-T7): this source's status set
|
|
1868
|
+
// differs from the native ledger's - an empty result for an
|
|
1869
|
+
// out-of-vocabulary status (e.g. 'blocked') is a vocabulary miss,
|
|
1870
|
+
// not evidence the work disappeared. Observe-only.
|
|
1871
|
+
return {
|
|
1872
|
+
success: true,
|
|
1873
|
+
tasks: queryTasks(taskInput),
|
|
1874
|
+
vocabularyNote: "Statuses in this source: pending|in_progress|review|done|completed|cancelled|dismissed|active. 'blocked' does NOT exist here - if memory mentions blocked work, compare vocabularies instead of reporting a contradiction.",
|
|
1875
|
+
};
|
|
1700
1876
|
}
|
|
1701
1877
|
case 'kagemusha_messages': {
|
|
1702
1878
|
const { queryMessages } = await import('../connectors/kagemusha/query-tools.js');
|
|
@@ -2386,8 +2562,10 @@ class GatewayToolExecutor {
|
|
|
2386
2562
|
config.roles.sourceMapping[mapSource] = role;
|
|
2387
2563
|
}
|
|
2388
2564
|
await (0, config_manager_js_1.saveConfig)(config);
|
|
2389
|
-
// Update RoleManager with new config
|
|
2565
|
+
// Update RoleManager with new config (trust anchor included: telegram
|
|
2566
|
+
// allowed_chats may have changed alongside roles in the saved config)
|
|
2390
2567
|
this.roleManager.updateRolesConfig(config.roles);
|
|
2568
|
+
this.roleManager.setTelegramTrust(config.telegram?.allowed_chats);
|
|
2391
2569
|
return {
|
|
2392
2570
|
success: true,
|
|
2393
2571
|
message: `Role "${role}" updated successfully.${mapSource ? ` Source "${mapSource}" now maps to this role.` : ''}`,
|
|
@@ -2511,8 +2689,9 @@ class GatewayToolExecutor {
|
|
|
2511
2689
|
config.roles.definitions[role].maxTurns = maxTurns;
|
|
2512
2690
|
}
|
|
2513
2691
|
await (0, config_manager_js_1.saveConfig)(config);
|
|
2514
|
-
// Update RoleManager with new config
|
|
2692
|
+
// Update RoleManager with new config (trust anchor included)
|
|
2515
2693
|
this.roleManager.updateRolesConfig(config.roles);
|
|
2694
|
+
this.roleManager.setTelegramTrust(config.telegram?.allowed_chats);
|
|
2516
2695
|
const changes = [`model: ${model}`];
|
|
2517
2696
|
if (maxTurns !== undefined)
|
|
2518
2697
|
changes.push(`maxTurns: ${maxTurns}`);
|