@jungjaehoon/mama-os 0.48.4 → 0.49.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/agent-loop.d.ts +6 -7
- package/dist/agent/agent-loop.d.ts.map +1 -1
- package/dist/agent/agent-loop.js +93 -79
- 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 +0 -8
- package/dist/agent/code-act/host-bridge.js.map +1 -1
- package/dist/agent/codex-home.d.ts.map +1 -1
- package/dist/agent/codex-home.js +3 -1
- package/dist/agent/codex-home.js.map +1 -1
- package/dist/agent/gateway-tool-executor.d.ts +0 -16
- package/dist/agent/gateway-tool-executor.d.ts.map +1 -1
- package/dist/agent/gateway-tool-executor.js +0 -51
- package/dist/agent/gateway-tool-executor.js.map +1 -1
- package/dist/agent/gateway-tools.md +0 -1
- package/dist/agent/os-agent-capabilities.md +14 -34
- package/dist/agent/role-manager.d.ts.map +1 -1
- package/dist/agent/role-manager.js +6 -3
- 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 +0 -6
- package/dist/agent/tool-registry.js.map +1 -1
- package/dist/agent/types.d.ts +18 -6
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/types.js.map +1 -1
- package/dist/api/graph-api-types.d.ts +0 -18
- package/dist/api/graph-api-types.d.ts.map +1 -1
- package/dist/api/graph-api.d.ts.map +1 -1
- package/dist/api/graph-api.js +9 -81
- package/dist/api/graph-api.js.map +1 -1
- package/dist/cli/commands/start.d.ts +7 -16
- package/dist/cli/commands/start.d.ts.map +1 -1
- package/dist/cli/commands/start.js +181 -188
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/cli/config/types.d.ts.map +1 -1
- package/dist/cli/config/types.js +11 -4
- 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 +28 -11
- package/dist/cli/runtime/agent-loop-init.js.map +1 -1
- package/dist/cli/runtime/api-routes-init.d.ts +0 -2
- package/dist/cli/runtime/api-routes-init.d.ts.map +1 -1
- package/dist/cli/runtime/api-routes-init.js +9 -95
- package/dist/cli/runtime/api-routes-init.js.map +1 -1
- package/dist/cli/runtime/api-server-init.d.ts +2 -2
- package/dist/cli/runtime/api-server-init.d.ts.map +1 -1
- package/dist/cli/runtime/api-server-init.js +2 -2
- package/dist/cli/runtime/api-server-init.js.map +1 -1
- package/dist/cli/runtime/scheduler-init.d.ts +3 -4
- package/dist/cli/runtime/scheduler-init.d.ts.map +1 -1
- package/dist/cli/runtime/scheduler-init.js +6 -16
- package/dist/cli/runtime/scheduler-init.js.map +1 -1
- package/dist/cli/runtime/shutdown.d.ts +0 -1
- package/dist/cli/runtime/shutdown.d.ts.map +1 -1
- package/dist/cli/runtime/shutdown.js +1 -1
- package/dist/cli/runtime/shutdown.js.map +1 -1
- package/dist/cli/runtime/types.d.ts +0 -5
- package/dist/cli/runtime/types.d.ts.map +1 -1
- package/dist/concurrency/lane-manager.d.ts +1 -1
- package/dist/concurrency/lane-manager.d.ts.map +1 -1
- package/dist/concurrency/lane-manager.js +4 -2
- package/dist/concurrency/lane-manager.js.map +1 -1
- package/dist/concurrency/types.d.ts +4 -0
- package/dist/concurrency/types.d.ts.map +1 -1
- package/dist/concurrency/types.js.map +1 -1
- package/dist/envelope/types.d.ts +1 -1
- package/dist/envelope/types.d.ts.map +1 -1
- package/dist/envelope/types.js.map +1 -1
- package/dist/gateways/message-router.d.ts +13 -71
- package/dist/gateways/message-router.d.ts.map +1 -1
- package/dist/gateways/message-router.js +99 -489
- package/dist/gateways/message-router.js.map +1 -1
- package/dist/gateways/session-store.d.ts +3 -23
- package/dist/gateways/session-store.d.ts.map +1 -1
- package/dist/gateways/session-store.js +2 -64
- package/dist/gateways/session-store.js.map +1 -1
- package/dist/gateways/telegram-report-context-store.d.ts +4 -66
- package/dist/gateways/telegram-report-context-store.d.ts.map +1 -1
- package/dist/gateways/telegram-report-context-store.js +11 -235
- package/dist/gateways/telegram-report-context-store.js.map +1 -1
- package/dist/gateways/turn-contract.d.ts +7 -3
- package/dist/gateways/turn-contract.d.ts.map +1 -1
- package/dist/operator/operator-trigger-loop.d.ts +1 -12
- package/dist/operator/operator-trigger-loop.d.ts.map +1 -1
- package/dist/operator/operator-trigger-loop.js +6 -40
- package/dist/operator/operator-trigger-loop.js.map +1 -1
- package/dist/operator/owner-event-loop.d.ts +8 -7
- package/dist/operator/owner-event-loop.d.ts.map +1 -1
- package/dist/operator/owner-event-loop.js +7 -20
- package/dist/operator/owner-event-loop.js.map +1 -1
- package/dist/operator/owner-event-policy.d.ts.map +1 -1
- package/dist/operator/owner-event-policy.js +0 -2
- package/dist/operator/owner-event-policy.js.map +1 -1
- package/dist/operator/owner-event-prompt.d.ts +0 -2
- package/dist/operator/owner-event-prompt.d.ts.map +1 -1
- package/dist/operator/owner-event-prompt.js +1 -8
- package/dist/operator/owner-event-prompt.js.map +1 -1
- package/dist/operator/owner-runtime-journal.d.ts +21 -0
- package/dist/operator/owner-runtime-journal.d.ts.map +1 -0
- package/dist/operator/owner-runtime-journal.js +131 -0
- package/dist/operator/owner-runtime-journal.js.map +1 -0
- package/dist/operator/owner-runtime.d.ts +32 -0
- package/dist/operator/owner-runtime.d.ts.map +1 -0
- package/dist/operator/owner-runtime.js +31 -0
- package/dist/operator/owner-runtime.js.map +1 -0
- package/dist/operator/pending-report-store.d.ts +2 -2
- package/dist/operator/pending-report-store.d.ts.map +1 -1
- package/dist/operator/pending-report-store.js +4 -1
- package/dist/operator/pending-report-store.js.map +1 -1
- package/dist/operator/report-run.d.ts +7 -10
- package/dist/operator/report-run.d.ts.map +1 -1
- package/dist/operator/report-run.js +5 -26
- package/dist/operator/report-run.js.map +1 -1
- package/dist/operator/situation-report.d.ts +25 -6
- package/dist/operator/situation-report.d.ts.map +1 -1
- package/dist/operator/situation-report.js +25 -37
- package/dist/operator/situation-report.js.map +1 -1
- package/dist/operator/trigger-author.d.ts +0 -45
- package/dist/operator/trigger-author.d.ts.map +1 -1
- package/dist/operator/trigger-author.js +0 -122
- package/dist/operator/trigger-author.js.map +1 -1
- package/dist/operator/worker-run.d.ts +9 -23
- package/dist/operator/worker-run.d.ts.map +1 -1
- package/dist/operator/worker-run.js +18 -74
- package/dist/operator/worker-run.js.map +1 -1
- package/dist/operator/workorder-consumer.d.ts.map +1 -1
- package/dist/operator/workorder-consumer.js +7 -0
- package/dist/operator/workorder-consumer.js.map +1 -1
- package/dist/scheduler/cron-worker.d.ts +0 -3
- package/dist/scheduler/cron-worker.d.ts.map +1 -1
- package/dist/scheduler/cron-worker.js +2 -13
- package/dist/scheduler/cron-worker.js.map +1 -1
- package/dist/scheduler/heartbeat.d.ts +3 -1
- package/dist/scheduler/heartbeat.d.ts.map +1 -1
- package/dist/scheduler/heartbeat.js +13 -4
- package/dist/scheduler/heartbeat.js.map +1 -1
- package/dist/validation/types.d.ts +1 -1
- package/dist/validation/types.js +1 -1
- package/package.json +1 -1
- package/dist/cli/runtime/memory-agent-init.d.ts +0 -37
- package/dist/cli/runtime/memory-agent-init.d.ts.map +0 -1
- package/dist/cli/runtime/memory-agent-init.js +0 -202
- package/dist/cli/runtime/memory-agent-init.js.map +0 -1
- package/dist/gateways/owner-report-inbox.d.ts +0 -40
- package/dist/gateways/owner-report-inbox.d.ts.map +0 -1
- package/dist/gateways/owner-report-inbox.js +0 -128
- package/dist/gateways/owner-report-inbox.js.map +0 -1
- package/dist/multi-agent/memory-agent-persona.d.ts +0 -11
- package/dist/multi-agent/memory-agent-persona.d.ts.map +0 -1
- package/dist/multi-agent/memory-agent-persona.js +0 -175
- package/dist/multi-agent/memory-agent-persona.js.map +0 -1
- package/dist/operator/report-context.d.ts +0 -184
- package/dist/operator/report-context.d.ts.map +0 -1
- package/dist/operator/report-context.js +0 -1052
- package/dist/operator/report-context.js.map +0 -1
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TG-05/TG-06: owner-report inbox - the read surface a verified owner turn
|
|
3
|
-
* uses to consume delivered-pending reports as bounded model context
|
|
4
|
-
* (docs/development/telegram-outbound-context-inbox-design.md, Decision 5-6).
|
|
5
|
-
*
|
|
6
|
-
* Lookup must happen only after the Telegram owner-console trust check; the
|
|
7
|
-
* caller (MessageRouter) gates on the resolved role, and the store scopes
|
|
8
|
-
* every read to one exact target.
|
|
9
|
-
*/
|
|
10
|
-
import type { ReportContextTarget, TelegramReportContextStore } from './telegram-report-context-store.js';
|
|
11
|
-
import type { ConversationTurn } from './types.js';
|
|
12
|
-
export interface OwnerReportSnapshot {
|
|
13
|
-
version: 'v1';
|
|
14
|
-
/** The exact complete Projection V1 block. */
|
|
15
|
-
text: string;
|
|
16
|
-
/** Lowercase hex SHA-256 over the exact UTF-8 bytes of `text`. */
|
|
17
|
-
projectionHash: string;
|
|
18
|
-
/** Ordered delivery IDs rendered in the block - the only consumable set. */
|
|
19
|
-
deliveryIds: string[];
|
|
20
|
-
}
|
|
21
|
-
export interface OwnerReportInboxPort {
|
|
22
|
-
snapshot(target: ReportContextTarget): OwnerReportSnapshot | null;
|
|
23
|
-
/** Committed-projection history for an actual new backend conversation. */
|
|
24
|
-
historyBlock(target: ReportContextTarget, turns: ConversationTurn[], nowIso?: string): string;
|
|
25
|
-
}
|
|
26
|
-
export declare class OwnerReportInbox implements OwnerReportInboxPort {
|
|
27
|
-
private readonly store;
|
|
28
|
-
constructor(store: TelegramReportContextStore);
|
|
29
|
-
snapshot(target: ReportContextTarget): OwnerReportSnapshot | null;
|
|
30
|
-
/**
|
|
31
|
-
* Startup restoration for an actual new backend conversation (design
|
|
32
|
-
* Decision 7): emit the already-committed Projection V1 text of the
|
|
33
|
-
* restored final turns' receipts, grouped in messenger-turn order. Bounded
|
|
34
|
-
* by 48,000 code points, 64 events, and five normal receipts; the newest
|
|
35
|
-
* complete receipt suffix that fits is taken and a receipt projection is
|
|
36
|
-
* never sliced. Returns '' when nothing restores.
|
|
37
|
-
*/
|
|
38
|
-
historyBlock(target: ReportContextTarget, turns: ConversationTurn[], nowIso?: string): string;
|
|
39
|
-
}
|
|
40
|
-
//# sourceMappingURL=owner-report-inbox.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"owner-report-inbox.d.ts","sourceRoot":"","sources":["../../src/gateways/owner-report-inbox.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EACV,mBAAmB,EACnB,0BAA0B,EAC3B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAsBnD,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,IAAI,CAAC;IACd,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,kEAAkE;IAClE,cAAc,EAAE,MAAM,CAAC;IACvB,4EAA4E;IAC5E,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,MAAM,EAAE,mBAAmB,GAAG,mBAAmB,GAAG,IAAI,CAAC;IAClE,2EAA2E;IAC3E,YAAY,CAAC,MAAM,EAAE,mBAAmB,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC/F;AAED,qBAAa,gBAAiB,YAAW,oBAAoB;IAC/C,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,0BAA0B;IAE9D,QAAQ,CAAC,MAAM,EAAE,mBAAmB,GAAG,mBAAmB,GAAG,IAAI;IAiBjE;;;;;;;OAOG;IACH,YAAY,CAAC,MAAM,EAAE,mBAAmB,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM;CAsE9F"}
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* TG-05/TG-06: owner-report inbox - the read surface a verified owner turn
|
|
4
|
-
* uses to consume delivered-pending reports as bounded model context
|
|
5
|
-
* (docs/development/telegram-outbound-context-inbox-design.md, Decision 5-6).
|
|
6
|
-
*
|
|
7
|
-
* Lookup must happen only after the Telegram owner-console trust check; the
|
|
8
|
-
* caller (MessageRouter) gates on the resolved role, and the store scopes
|
|
9
|
-
* every read to one exact target.
|
|
10
|
-
*/
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.OwnerReportInbox = void 0;
|
|
13
|
-
const node_crypto_1 = require("node:crypto");
|
|
14
|
-
const report_projection_v1_js_1 = require("./report-projection-v1.js");
|
|
15
|
-
/** Design Decision 7 startup-history caps. */
|
|
16
|
-
const HISTORY_CAP_CP = 48_000;
|
|
17
|
-
const HISTORY_MAX_EVENTS = 64;
|
|
18
|
-
const HISTORY_MAX_RECEIPTS = 5;
|
|
19
|
-
const HISTORY_OPEN_TAG = '<recent_owner_report_history projection="v1">';
|
|
20
|
-
const HISTORY_CLOSE_TAG = '</recent_owner_report_history>';
|
|
21
|
-
function countCodePoints(text) {
|
|
22
|
-
let count = 0;
|
|
23
|
-
let index = 0;
|
|
24
|
-
while (index < text.length) {
|
|
25
|
-
const codePoint = text.codePointAt(index);
|
|
26
|
-
count += 1;
|
|
27
|
-
index += codePoint > 0xffff ? 2 : 1;
|
|
28
|
-
}
|
|
29
|
-
return count;
|
|
30
|
-
}
|
|
31
|
-
class OwnerReportInbox {
|
|
32
|
-
store;
|
|
33
|
-
constructor(store) {
|
|
34
|
-
this.store = store;
|
|
35
|
-
}
|
|
36
|
-
snapshot(target) {
|
|
37
|
-
const pending = this.store.listDeliveredPending(target);
|
|
38
|
-
if (pending.length === 0) {
|
|
39
|
-
return null;
|
|
40
|
-
}
|
|
41
|
-
const projection = (0, report_projection_v1_js_1.buildOwnerReportProjectionV1)(pending);
|
|
42
|
-
if (projection.text === '' || projection.selectedDeliveryIds.length === 0) {
|
|
43
|
-
return null;
|
|
44
|
-
}
|
|
45
|
-
return {
|
|
46
|
-
version: 'v1',
|
|
47
|
-
text: projection.text,
|
|
48
|
-
projectionHash: projection.projectionHash,
|
|
49
|
-
deliveryIds: projection.selectedDeliveryIds,
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Startup restoration for an actual new backend conversation (design
|
|
54
|
-
* Decision 7): emit the already-committed Projection V1 text of the
|
|
55
|
-
* restored final turns' receipts, grouped in messenger-turn order. Bounded
|
|
56
|
-
* by 48,000 code points, 64 events, and five normal receipts; the newest
|
|
57
|
-
* complete receipt suffix that fits is taken and a receipt projection is
|
|
58
|
-
* never sliced. Returns '' when nothing restores.
|
|
59
|
-
*/
|
|
60
|
-
historyBlock(target, turns, nowIso) {
|
|
61
|
-
const now = nowIso ?? new Date().toISOString();
|
|
62
|
-
const refs = turns
|
|
63
|
-
.filter((turn) => turn.state !== 'provisional' && turn.sourceMessageRef)
|
|
64
|
-
.map((turn) => turn.sourceMessageRef);
|
|
65
|
-
const receipts = refs.length > 0 ? this.store.listReceiptsByRefs(refs) : [];
|
|
66
|
-
const legacy = this.store.listLegacyRestorations(target, now);
|
|
67
|
-
if (receipts.length === 0 && legacy.length === 0) {
|
|
68
|
-
return '';
|
|
69
|
-
}
|
|
70
|
-
const groups = [
|
|
71
|
-
...legacy.map((entry) => ({
|
|
72
|
-
kind: 'legacy',
|
|
73
|
-
time: entry.consumedAtIso ?? entry.deliveredAtIso,
|
|
74
|
-
tieBreak: entry.deliveryId,
|
|
75
|
-
eventCount: 1,
|
|
76
|
-
render: `[legacy_v2_consumed delivery_sha256=${sha256Hex(entry.deliveryId)} consumed_at=${entry.consumedAtIso}]\n${entry.restorationText}`,
|
|
77
|
-
})),
|
|
78
|
-
...receipts.map((receipt) => ({
|
|
79
|
-
kind: 'receipt',
|
|
80
|
-
time: receipt.committedAtIso,
|
|
81
|
-
tieBreak: receipt.sourceMessageRef,
|
|
82
|
-
eventCount: receipt.deliveryIds.length,
|
|
83
|
-
render: `[before_turn source_message_ref_sha256=${sha256Hex(receipt.sourceMessageRef)}]\n${receipt.projectionText}`,
|
|
84
|
-
})),
|
|
85
|
-
].sort((a, b) => {
|
|
86
|
-
if (a.time !== b.time)
|
|
87
|
-
return a.time < b.time ? -1 : 1;
|
|
88
|
-
if (a.kind !== b.kind)
|
|
89
|
-
return a.kind === 'legacy' ? -1 : 1;
|
|
90
|
-
return a.tieBreak < b.tieBreak ? -1 : 1;
|
|
91
|
-
});
|
|
92
|
-
// Newest complete suffix under the caps: 48k code points and 64 events in
|
|
93
|
-
// aggregate, at most five NORMAL receipts. A group is never sliced.
|
|
94
|
-
const selected = [];
|
|
95
|
-
let eventCount = 0;
|
|
96
|
-
let receiptCount = 0;
|
|
97
|
-
for (let index = groups.length - 1; index >= 0; index -= 1) {
|
|
98
|
-
const group = groups[index];
|
|
99
|
-
if (group.kind === 'receipt' && receiptCount + 1 > HISTORY_MAX_RECEIPTS) {
|
|
100
|
-
break;
|
|
101
|
-
}
|
|
102
|
-
if (eventCount + group.eventCount > HISTORY_MAX_EVENTS) {
|
|
103
|
-
break;
|
|
104
|
-
}
|
|
105
|
-
const candidate = [group, ...selected];
|
|
106
|
-
if (countCodePoints(renderHistoryBlock(candidate)) > HISTORY_CAP_CP) {
|
|
107
|
-
break;
|
|
108
|
-
}
|
|
109
|
-
selected.unshift(group);
|
|
110
|
-
eventCount += group.eventCount;
|
|
111
|
-
if (group.kind === 'receipt') {
|
|
112
|
-
receiptCount += 1;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
if (selected.length === 0) {
|
|
116
|
-
return '';
|
|
117
|
-
}
|
|
118
|
-
return renderHistoryBlock(selected);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
exports.OwnerReportInbox = OwnerReportInbox;
|
|
122
|
-
function sha256Hex(text) {
|
|
123
|
-
return (0, node_crypto_1.createHash)('sha256').update(text, 'utf8').digest('hex');
|
|
124
|
-
}
|
|
125
|
-
function renderHistoryBlock(groups) {
|
|
126
|
-
return `${HISTORY_OPEN_TAG}\n${groups.map((group) => group.render).join('\n\n')}\n${HISTORY_CLOSE_TAG}`;
|
|
127
|
-
}
|
|
128
|
-
//# sourceMappingURL=owner-report-inbox.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"owner-report-inbox.js","sourceRoot":"","sources":["../../src/gateways/owner-report-inbox.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAEH,6CAAyC;AAMzC,uEAAyE;AAEzE,8CAA8C;AAC9C,MAAM,cAAc,GAAG,MAAM,CAAC;AAC9B,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAC9B,MAAM,oBAAoB,GAAG,CAAC,CAAC;AAE/B,MAAM,gBAAgB,GAAG,+CAA+C,CAAC;AACzE,MAAM,iBAAiB,GAAG,gCAAgC,CAAC;AAE3D,SAAS,eAAe,CAAC,IAAY;IACnC,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,OAAO,KAAK,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;QAC3B,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAW,CAAC;QACpD,KAAK,IAAI,CAAC,CAAC;QACX,KAAK,IAAI,SAAS,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACtC,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAkBD,MAAa,gBAAgB;IACE;IAA7B,YAA6B,KAAiC;QAAjC,UAAK,GAAL,KAAK,CAA4B;IAAG,CAAC;IAElE,QAAQ,CAAC,MAA2B;QAClC,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC;QACxD,IAAI,OAAO,CAAC,MAAM,K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C;IAC3D,OAAO,GAAG,gBAAgB,KAAK,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,iBAAiB,EAAE,CAAC;AAC1G,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Default persona for the memory agent.
|
|
3
|
-
* Written to ~/.mama/personas/memory.md on first use if not present.
|
|
4
|
-
*/
|
|
5
|
-
export declare const MEMORY_AGENT_PERSONA = "<!-- MAMA managed memory persona v6 -->\n\nYou are MAMA's memory auditor and curator \u2014 an internal agent that watches conversations, maintains current truth, and advises the main agent when memory matters.\n\n## Your Role\n- Observe every conversation turn between users and the main agent\n- Distinguish time-ordered memory history from current truth\n- Use memory tools directly to inspect, evolve, and save memory\n- Notify the main agent only when evidence-backed memory findings are relevant\n- Never rely on the caller to parse JSON and save for you\n\n## Topic Rules\n- MUST reuse existing topic if same subject (provided in context)\n- Use lowercase snake_case: auth_strategy, database_choice\n- Same topic = evolution chain (supersedes)\n- Related topic = builds_on or synthesizes\n\n## Mandatory Tool Workflow\nKeep the workflow minimal and terminate quickly.\n\n**Step 1 \u2014 ALWAYS call `mama_search` first.**\nSearch for existing memories related to the conversation topic. This is mandatory even if you believe nothing is worth saving \u2014 you need context to make that judgment.\n\n**Step 2 \u2014 Decide: save or no-op.**\nBased on search results and the conversation, decide whether to save or skip.\n\n**Step 3 \u2014 Call `mama_save` when the conversation contains ANY of these:**\n- A decision, preference, or technical choice\n- A constraint, requirement, or lesson learned\n- A fact about architecture, tooling, or workflow\n- A change that supersedes a prior memory\n\nWhen calling `mama_save`, always include the `scopes` field from the Memory scopes listed at the top of the prompt. Parse the scope entries (e.g., \"project:/path, channel:telegram:123\") into `[{kind: \"project\", id: \"/path\"}, {kind: \"channel\", id: \"telegram:123\"}]`.\n\n**Step 4 \u2014 Only skip (no-op) when the conversation is ALL of these:**\n- Pure greeting, thanks, or confirmation (\"ok\", \"got it\", \"thanks\")\n- Contains zero decisions, preferences, facts, or choices\n- Even then, you must have called `mama_search` first before deciding to skip\n\n## Strict Limits\n- Call `mama_search` at most once per audit.\n- Call `mama_save` at most once per audit.\n- Do NOT call resource discovery tools such as `list_mcp_resources` or `list_mcp_resource_templates`.\n- Do NOT ask follow-up questions.\n- Do NOT continue reasoning after the required tool calls finish.\n- After finishing tool work, respond with exactly one token:\n - `DONE` if a save occurred\n - `SKIP` if nothing should be saved\n\n## Relationship Types\n- supersedes: replaces a previous decision on same topic\n- builds_on: adds information to existing topic without replacing\n- synthesizes: merges multiple decisions or infers connections\n\n## Truth Model\n- Preserve history, but maintain current truth separately\n- Old memories may remain in history while becoming stale, contradicted, or superseded\n- When uncertain about relationship type, prefer builds_on over supersedes to avoid data loss\n\n## Temporal Marker Extraction\n\nWhen the conversation contains relative time expressions, extract an explicit event_date and include it in `mama_save` as the `event_date` field (ISO 8601: \"YYYY-MM-DD\").\n\n**Extract event_date when you see:**\n- Yesterday \u2192 today - 1 day\n- Last week / last month \u2192 approximate Monday or 1st of previous period\n- \"In March\", \"in January 2023\" \u2192 first day of that month (e.g., \"2023-03-01\")\n- \"A year ago\", \"3 months ago\" \u2192 today minus that duration\n- \"On Tuesday\", \"last Friday\" \u2192 nearest past occurrence of that weekday\n- An explicit date mentioned in the conversation (e.g., \"December 28th\")\n\n**How to apply:**\n1. Identify the most precise date derivable from context\n2. Pass `event_date: \"YYYY-MM-DD\"` in `mama_save` alongside the decision\n3. If no temporal marker is present, omit event_date (system defaults to created_at)\n\n## What to Save\n- Architecture decisions, technical choices, tooling preferences\n- User preferences and working style\n- Constraints, requirements, lessons learned\n- Decision changes that should supersede prior memory\n\n## What to Skip\n- Greetings, casual chat, thanks\n- Questions without answers\n- Temporary debugging steps\n- Code snippets\n\n## Response Rules\n- You MUST call at least `mama_search` before any text response.\n- Do not return JSON for the caller to parse\n- Do the memory work yourself with tools, then terminate immediately with `DONE` or `SKIP`\n- When in doubt, save \u2014 false negatives (missing a memory) are worse than false positives\n- You are an internal subagent, not the user-facing assistant\n\n## PROMOTION RUN mode\nWhen an incoming message begins with \"PROMOTION RUN\", it is a scheduled batch\npass over recent business data, NOT a turn audit. In this mode ONLY:\n- The per-audit limits above do not apply: you may call mama_search several\n times and mama_save up to 5 times, and you gather evidence yourself with\n the business-data tools projected for this run plus agent_notices as the run\n instructions describe.\n- Promote ONLY durable judgments: pricing/scope agreements, a client's standing\n preference or boundary, a process rule, a recurring risk pattern. Things that\n change how future work is done.\n- NEVER promote task lifecycle states (\"X was submitted\", \"Y is in progress\") --\n the task board owns those. Never promote greetings, scheduling chatter, or\n one-off logistics.\n- Every save needs scopes (parse from the run instructions or the source\n channel) and an event_date for when the judgment was actually made.\n- Reuse existing topics found via mama_search so evolution chains stay intact.\n- Finish with exactly one line: `PROMOTED <n>` (n = number of saves) or\n `NO_UPDATE` when nothing qualifies. When in doubt in THIS mode, do NOT save --\n promotion is curation, and a wrong policy in memory misleads every consumer.";
|
|
6
|
-
/**
|
|
7
|
-
* Ensure persona file exists at ~/.mama/personas/memory.md
|
|
8
|
-
* Creates it from default if not present and upgrades legacy managed personas.
|
|
9
|
-
*/
|
|
10
|
-
export declare function ensureMemoryPersona(mamaHomeDir?: string): string;
|
|
11
|
-
//# sourceMappingURL=memory-agent-persona.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"memory-agent-persona.d.ts","sourceRoot":"","sources":["../../src/multi-agent/memory-agent-persona.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,eAAO,MAAM,oBAAoB,uyLAiH8C,CAAC;AA2BhF;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,GAAE,MAAiC,GAAG,MAAM,CA4B1F"}
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Default persona for the memory agent.
|
|
4
|
-
* Written to ~/.mama/personas/memory.md on first use if not present.
|
|
5
|
-
*/
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.MEMORY_AGENT_PERSONA = void 0;
|
|
8
|
-
exports.ensureMemoryPersona = ensureMemoryPersona;
|
|
9
|
-
const fs_1 = require("fs");
|
|
10
|
-
const path_1 = require("path");
|
|
11
|
-
const os_1 = require("os");
|
|
12
|
-
const MANAGED_MEMORY_PERSONA_MARKER = '<!-- MAMA managed memory persona v6 -->';
|
|
13
|
-
exports.MEMORY_AGENT_PERSONA = `${MANAGED_MEMORY_PERSONA_MARKER}
|
|
14
|
-
|
|
15
|
-
You are MAMA's memory auditor and curator — an internal agent that watches conversations, maintains current truth, and advises the main agent when memory matters.
|
|
16
|
-
|
|
17
|
-
## Your Role
|
|
18
|
-
- Observe every conversation turn between users and the main agent
|
|
19
|
-
- Distinguish time-ordered memory history from current truth
|
|
20
|
-
- Use memory tools directly to inspect, evolve, and save memory
|
|
21
|
-
- Notify the main agent only when evidence-backed memory findings are relevant
|
|
22
|
-
- Never rely on the caller to parse JSON and save for you
|
|
23
|
-
|
|
24
|
-
## Topic Rules
|
|
25
|
-
- MUST reuse existing topic if same subject (provided in context)
|
|
26
|
-
- Use lowercase snake_case: auth_strategy, database_choice
|
|
27
|
-
- Same topic = evolution chain (supersedes)
|
|
28
|
-
- Related topic = builds_on or synthesizes
|
|
29
|
-
|
|
30
|
-
## Mandatory Tool Workflow
|
|
31
|
-
Keep the workflow minimal and terminate quickly.
|
|
32
|
-
|
|
33
|
-
**Step 1 — ALWAYS call \`mama_search\` first.**
|
|
34
|
-
Search for existing memories related to the conversation topic. This is mandatory even if you believe nothing is worth saving — you need context to make that judgment.
|
|
35
|
-
|
|
36
|
-
**Step 2 — Decide: save or no-op.**
|
|
37
|
-
Based on search results and the conversation, decide whether to save or skip.
|
|
38
|
-
|
|
39
|
-
**Step 3 — Call \`mama_save\` when the conversation contains ANY of these:**
|
|
40
|
-
- A decision, preference, or technical choice
|
|
41
|
-
- A constraint, requirement, or lesson learned
|
|
42
|
-
- A fact about architecture, tooling, or workflow
|
|
43
|
-
- A change that supersedes a prior memory
|
|
44
|
-
|
|
45
|
-
When calling \`mama_save\`, always include the \`scopes\` field from the Memory scopes listed at the top of the prompt. Parse the scope entries (e.g., "project:/path, channel:telegram:123") into \`[{kind: "project", id: "/path"}, {kind: "channel", id: "telegram:123"}]\`.
|
|
46
|
-
|
|
47
|
-
**Step 4 — Only skip (no-op) when the conversation is ALL of these:**
|
|
48
|
-
- Pure greeting, thanks, or confirmation ("ok", "got it", "thanks")
|
|
49
|
-
- Contains zero decisions, preferences, facts, or choices
|
|
50
|
-
- Even then, you must have called \`mama_search\` first before deciding to skip
|
|
51
|
-
|
|
52
|
-
## Strict Limits
|
|
53
|
-
- Call \`mama_search\` at most once per audit.
|
|
54
|
-
- Call \`mama_save\` at most once per audit.
|
|
55
|
-
- Do NOT call resource discovery tools such as \`list_mcp_resources\` or \`list_mcp_resource_templates\`.
|
|
56
|
-
- Do NOT ask follow-up questions.
|
|
57
|
-
- Do NOT continue reasoning after the required tool calls finish.
|
|
58
|
-
- After finishing tool work, respond with exactly one token:
|
|
59
|
-
- \`DONE\` if a save occurred
|
|
60
|
-
- \`SKIP\` if nothing should be saved
|
|
61
|
-
|
|
62
|
-
## Relationship Types
|
|
63
|
-
- supersedes: replaces a previous decision on same topic
|
|
64
|
-
- builds_on: adds information to existing topic without replacing
|
|
65
|
-
- synthesizes: merges multiple decisions or infers connections
|
|
66
|
-
|
|
67
|
-
## Truth Model
|
|
68
|
-
- Preserve history, but maintain current truth separately
|
|
69
|
-
- Old memories may remain in history while becoming stale, contradicted, or superseded
|
|
70
|
-
- When uncertain about relationship type, prefer builds_on over supersedes to avoid data loss
|
|
71
|
-
|
|
72
|
-
## Temporal Marker Extraction
|
|
73
|
-
|
|
74
|
-
When the conversation contains relative time expressions, extract an explicit event_date and include it in \`mama_save\` as the \`event_date\` field (ISO 8601: "YYYY-MM-DD").
|
|
75
|
-
|
|
76
|
-
**Extract event_date when you see:**
|
|
77
|
-
- Yesterday → today - 1 day
|
|
78
|
-
- Last week / last month → approximate Monday or 1st of previous period
|
|
79
|
-
- "In March", "in January 2023" → first day of that month (e.g., "2023-03-01")
|
|
80
|
-
- "A year ago", "3 months ago" → today minus that duration
|
|
81
|
-
- "On Tuesday", "last Friday" → nearest past occurrence of that weekday
|
|
82
|
-
- An explicit date mentioned in the conversation (e.g., "December 28th")
|
|
83
|
-
|
|
84
|
-
**How to apply:**
|
|
85
|
-
1. Identify the most precise date derivable from context
|
|
86
|
-
2. Pass \`event_date: "YYYY-MM-DD"\` in \`mama_save\` alongside the decision
|
|
87
|
-
3. If no temporal marker is present, omit event_date (system defaults to created_at)
|
|
88
|
-
|
|
89
|
-
## What to Save
|
|
90
|
-
- Architecture decisions, technical choices, tooling preferences
|
|
91
|
-
- User preferences and working style
|
|
92
|
-
- Constraints, requirements, lessons learned
|
|
93
|
-
- Decision changes that should supersede prior memory
|
|
94
|
-
|
|
95
|
-
## What to Skip
|
|
96
|
-
- Greetings, casual chat, thanks
|
|
97
|
-
- Questions without answers
|
|
98
|
-
- Temporary debugging steps
|
|
99
|
-
- Code snippets
|
|
100
|
-
|
|
101
|
-
## Response Rules
|
|
102
|
-
- You MUST call at least \`mama_search\` before any text response.
|
|
103
|
-
- Do not return JSON for the caller to parse
|
|
104
|
-
- Do the memory work yourself with tools, then terminate immediately with \`DONE\` or \`SKIP\`
|
|
105
|
-
- When in doubt, save — false negatives (missing a memory) are worse than false positives
|
|
106
|
-
- You are an internal subagent, not the user-facing assistant
|
|
107
|
-
|
|
108
|
-
## PROMOTION RUN mode
|
|
109
|
-
When an incoming message begins with "PROMOTION RUN", it is a scheduled batch
|
|
110
|
-
pass over recent business data, NOT a turn audit. In this mode ONLY:
|
|
111
|
-
- The per-audit limits above do not apply: you may call mama_search several
|
|
112
|
-
times and mama_save up to 5 times, and you gather evidence yourself with
|
|
113
|
-
the business-data tools projected for this run plus agent_notices as the run
|
|
114
|
-
instructions describe.
|
|
115
|
-
- Promote ONLY durable judgments: pricing/scope agreements, a client's standing
|
|
116
|
-
preference or boundary, a process rule, a recurring risk pattern. Things that
|
|
117
|
-
change how future work is done.
|
|
118
|
-
- NEVER promote task lifecycle states ("X was submitted", "Y is in progress") --
|
|
119
|
-
the task board owns those. Never promote greetings, scheduling chatter, or
|
|
120
|
-
one-off logistics.
|
|
121
|
-
- Every save needs scopes (parse from the run instructions or the source
|
|
122
|
-
channel) and an event_date for when the judgment was actually made.
|
|
123
|
-
- Reuse existing topics found via mama_search so evolution chains stay intact.
|
|
124
|
-
- Finish with exactly one line: \`PROMOTED <n>\` (n = number of saves) or
|
|
125
|
-
\`NO_UPDATE\` when nothing qualifies. When in doubt in THIS mode, do NOT save --
|
|
126
|
-
promotion is curation, and a wrong policy in memory misleads every consumer.`;
|
|
127
|
-
function isLegacyManagedPersona(content) {
|
|
128
|
-
// v1: old JSON-return persona
|
|
129
|
-
if (content.includes("You are MAMA's memory agent") &&
|
|
130
|
-
(content.includes('Return ONLY a JSON object') ||
|
|
131
|
-
content.includes('Return ONLY JSON') ||
|
|
132
|
-
content.includes('Return ONLY the JSON'))) {
|
|
133
|
-
return true;
|
|
134
|
-
}
|
|
135
|
-
// v2: soft tool instructions (didn't enforce tool calls)
|
|
136
|
-
if (content.includes('<!-- MAMA managed memory persona v2 -->')) {
|
|
137
|
-
return true;
|
|
138
|
-
}
|
|
139
|
-
// v3: allowed too many follow-up turns and resource-discovery loops
|
|
140
|
-
if (content.includes('<!-- MAMA managed memory persona v3 -->')) {
|
|
141
|
-
return true;
|
|
142
|
-
}
|
|
143
|
-
// v4: missing temporal marker extraction
|
|
144
|
-
if (content.includes('<!-- MAMA managed memory persona v4 -->')) {
|
|
145
|
-
return true;
|
|
146
|
-
}
|
|
147
|
-
return false;
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* Ensure persona file exists at ~/.mama/personas/memory.md
|
|
151
|
-
* Creates it from default if not present and upgrades legacy managed personas.
|
|
152
|
-
*/
|
|
153
|
-
function ensureMemoryPersona(mamaHomeDir = (0, path_1.join)((0, os_1.homedir)(), '.mama')) {
|
|
154
|
-
const personaDir = (0, path_1.join)(mamaHomeDir, 'personas');
|
|
155
|
-
const personaPath = (0, path_1.join)(personaDir, 'memory.md');
|
|
156
|
-
if (!(0, fs_1.existsSync)(personaDir)) {
|
|
157
|
-
(0, fs_1.mkdirSync)(personaDir, { recursive: true });
|
|
158
|
-
}
|
|
159
|
-
if (!(0, fs_1.existsSync)(personaPath)) {
|
|
160
|
-
(0, fs_1.writeFileSync)(personaPath, exports.MEMORY_AGENT_PERSONA, 'utf-8');
|
|
161
|
-
return personaPath;
|
|
162
|
-
}
|
|
163
|
-
const existingContent = (0, fs_1.readFileSync)(personaPath, 'utf-8');
|
|
164
|
-
if (isLegacyManagedPersona(existingContent)) {
|
|
165
|
-
(0, fs_1.writeFileSync)(personaPath, exports.MEMORY_AGENT_PERSONA, 'utf-8');
|
|
166
|
-
}
|
|
167
|
-
// Upgrade ANY older managed persona version (match the marker prefix, not the
|
|
168
|
-
// exact current version -- an exact match can never upgrade v5 -> v6).
|
|
169
|
-
if (existingContent.includes('<!-- MAMA managed memory persona') &&
|
|
170
|
-
existingContent !== exports.MEMORY_AGENT_PERSONA) {
|
|
171
|
-
(0, fs_1.writeFileSync)(personaPath, exports.MEMORY_AGENT_PERSONA, 'utf-8');
|
|
172
|
-
}
|
|
173
|
-
return personaPath;
|
|
174
|
-
}
|
|
175
|
-
//# sourceMappingURL=memory-agent-persona.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"memory-agent-persona.js","sourceRoot":"","sources":["../../src/multi-agent/memory-agent-persona.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAwJH,kDA4BC;AAlLD,2BAAwE;AACxE,+BAA4B;AAC5B,2BAA6B;AAE7B,MAAM,6BAA6B,GAAG,yCAAyC,CAAC;AAEnE,QAAA,oBAAoB,GAAG,GAAG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AAI,CAAC,IAAA,eAAU,EAAC,WAAW,CAAC,EAAE,CAAC;QAC7B,IAAA,kBAAa,EAAC,WAAW,EAAE,4BAAoB,EAAE,OAAO,CAAC,CAAC;QAC1D,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,MAAM,eAAe,GAAG,IAAA,iBAAY,EAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAC3D,IAAI,sBAAsB,CAAC,eAAe,CAAC,EAAE,CAAC;QAC5C,IAAA,kBAAa,EAAC,WAAW,EAAE,4BAAoB,EAAE,OAAO,CAAC,CAAC;IAC5D,CAAC;IAED,8EAA8E;IAC9E,uEAAuE;IACvE,IACE,eAAe,CAAC,QAAQ,CAAC,kCAAkC,CAAC;QAC5D,eAAe,KAAK,4BAAoB,EACxC,CAAC;QACD,IAAA,kBAAa,EAAC,WAAW,EAAE,4BAAoB,EAAE,OAAO,CAAC,CAAC;IAC5D,CAAC;IAED,OAAO,WAAW,CAAC;AACrB,CAAC"}
|
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
import type { MemoryScopeRef } from '@jungjaehoon/mama-core';
|
|
2
|
-
import type { MemoryTruthRow } from '@jungjaehoon/mama-core/memory/types';
|
|
3
|
-
import type { TrelloKanbanSnapshot } from '../connectors/trello/query-tools.js';
|
|
4
|
-
import type { ChangesReadFailure, ChangesReadInput, ChangesReadResult } from './changes-projection.js';
|
|
5
|
-
import type { CorrelationInput, CorrelationOutcome, CorrelationReason, CorrelationResult } from './external-correlation.js';
|
|
6
|
-
import type { ListTasksPage } from './task-ledger.js';
|
|
7
|
-
export interface OwnerReportReadScope {
|
|
8
|
-
projectRefs: Array<{
|
|
9
|
-
kind: 'project';
|
|
10
|
-
id: string;
|
|
11
|
-
}>;
|
|
12
|
-
memoryScopes: MemoryScopeRef[];
|
|
13
|
-
rawConnectors: string[];
|
|
14
|
-
}
|
|
15
|
-
export interface ReportWindowEvidence {
|
|
16
|
-
start: string;
|
|
17
|
-
end: string;
|
|
18
|
-
channelCount: number;
|
|
19
|
-
messageCount: number;
|
|
20
|
-
channels: Array<{
|
|
21
|
-
label: string;
|
|
22
|
-
count: number;
|
|
23
|
-
excerpts: Array<{
|
|
24
|
-
authorLabel: string;
|
|
25
|
-
text: string;
|
|
26
|
-
observedAt: string | null;
|
|
27
|
-
}>;
|
|
28
|
-
}>;
|
|
29
|
-
triggerActivity: Array<{
|
|
30
|
-
kind: string;
|
|
31
|
-
count: number;
|
|
32
|
-
topics: string[];
|
|
33
|
-
}>;
|
|
34
|
-
}
|
|
35
|
-
export type SourceState = {
|
|
36
|
-
state: 'complete';
|
|
37
|
-
observedAt: string;
|
|
38
|
-
} | {
|
|
39
|
-
state: 'partial';
|
|
40
|
-
observedAt: string | null;
|
|
41
|
-
reason: string;
|
|
42
|
-
} | {
|
|
43
|
-
state: 'unavailable';
|
|
44
|
-
observedAt: null;
|
|
45
|
-
reason: string;
|
|
46
|
-
};
|
|
47
|
-
export interface CurrentClaimSummary {
|
|
48
|
-
id: string;
|
|
49
|
-
topic: string;
|
|
50
|
-
summary: string;
|
|
51
|
-
status: string;
|
|
52
|
-
confidence: number;
|
|
53
|
-
}
|
|
54
|
-
export interface OwnerTaskSummary {
|
|
55
|
-
id: number;
|
|
56
|
-
revision: number;
|
|
57
|
-
title: string;
|
|
58
|
-
status: string;
|
|
59
|
-
latestEvent: string | null;
|
|
60
|
-
updatedAt: string;
|
|
61
|
-
/** Owner-entered ISO date (YYYY-MM-DD) or null. Overdue work is unanswerable without it. */
|
|
62
|
-
deadline: string | null;
|
|
63
|
-
/** Host-derived RFC 3339 instant (e.g. review + 14 days) or null. */
|
|
64
|
-
dueAt: string | null;
|
|
65
|
-
sourceLabel: string | null;
|
|
66
|
-
}
|
|
67
|
-
export interface TrelloReportSnapshot {
|
|
68
|
-
observedAt: string;
|
|
69
|
-
complete: boolean;
|
|
70
|
-
truncated: boolean;
|
|
71
|
-
boards: Array<{
|
|
72
|
-
board: string;
|
|
73
|
-
status: 'ok' | 'failed';
|
|
74
|
-
rosterDegraded: boolean;
|
|
75
|
-
}>;
|
|
76
|
-
columns: Array<{
|
|
77
|
-
board: string;
|
|
78
|
-
list: string;
|
|
79
|
-
count: number;
|
|
80
|
-
returned: number;
|
|
81
|
-
cards: Array<{
|
|
82
|
-
name: string;
|
|
83
|
-
labels: string[];
|
|
84
|
-
assignees: string[];
|
|
85
|
-
due: string | null;
|
|
86
|
-
lastActivity: string;
|
|
87
|
-
}>;
|
|
88
|
-
}>;
|
|
89
|
-
}
|
|
90
|
-
export interface CorrelationReport {
|
|
91
|
-
coverage: Record<CorrelationOutcome | 'total', number>;
|
|
92
|
-
rows: Array<{
|
|
93
|
-
taskId: number;
|
|
94
|
-
outcome: CorrelationOutcome;
|
|
95
|
-
reason: CorrelationReason;
|
|
96
|
-
live: {
|
|
97
|
-
board: string;
|
|
98
|
-
list: string;
|
|
99
|
-
} | null;
|
|
100
|
-
}>;
|
|
101
|
-
}
|
|
102
|
-
export interface ChangesReport {
|
|
103
|
-
since: string;
|
|
104
|
-
total: number;
|
|
105
|
-
returned: number;
|
|
106
|
-
coverage: {
|
|
107
|
-
attributed: number;
|
|
108
|
-
unattributed: number;
|
|
109
|
-
};
|
|
110
|
-
rows: Array<{
|
|
111
|
-
kind: string;
|
|
112
|
-
targetType: string;
|
|
113
|
-
causeState: 'attributed' | 'unattributed';
|
|
114
|
-
causeKind: string;
|
|
115
|
-
at: string;
|
|
116
|
-
}>;
|
|
117
|
-
}
|
|
118
|
-
export interface OwnerReportContextV1 {
|
|
119
|
-
schemaVersion: 'mama.owner-report-context/v1';
|
|
120
|
-
observedAt: string;
|
|
121
|
-
windowEvidence: ReportWindowEvidence;
|
|
122
|
-
sources: Record<'claims' | 'tasks' | 'trello' | 'changes', SourceState>;
|
|
123
|
-
packet: {
|
|
124
|
-
bytes: number;
|
|
125
|
-
truncated: boolean;
|
|
126
|
-
};
|
|
127
|
-
taskCoverage: {
|
|
128
|
-
total: number;
|
|
129
|
-
returned: number;
|
|
130
|
-
truncated: boolean;
|
|
131
|
-
};
|
|
132
|
-
currentClaims: CurrentClaimSummary[];
|
|
133
|
-
tasks: OwnerTaskSummary[];
|
|
134
|
-
trello: TrelloReportSnapshot;
|
|
135
|
-
correlations: CorrelationReport;
|
|
136
|
-
changes: ChangesReport;
|
|
137
|
-
caveats: string[];
|
|
138
|
-
/** The system's own open failures (One MAMA Phase 3); bounded to 20, highest severity first. */
|
|
139
|
-
operationalIssues: OperationalIssueSummary[];
|
|
140
|
-
}
|
|
141
|
-
export interface OperationalIssueSummary {
|
|
142
|
-
issueId: string;
|
|
143
|
-
surface: string;
|
|
144
|
-
severity: 'info' | 'warn' | 'error';
|
|
145
|
-
summary: string;
|
|
146
|
-
occurrences: number;
|
|
147
|
-
firstSeenAt: string;
|
|
148
|
-
}
|
|
149
|
-
export interface OwnerReportContextDeps {
|
|
150
|
-
listTaskPage(input: {
|
|
151
|
-
includeTerminal: false;
|
|
152
|
-
order: 'updated';
|
|
153
|
-
limit: number;
|
|
154
|
-
cursor?: string;
|
|
155
|
-
}): ListTasksPage;
|
|
156
|
-
readClaims(scope: OwnerReportReadScope): Promise<MemoryTruthRow[]>;
|
|
157
|
-
readTrello(scope: OwnerReportReadScope): Promise<TrelloKanbanSnapshot>;
|
|
158
|
-
buildProvenanceLookup(): Promise<CorrelationInput['lookupProvenance']>;
|
|
159
|
-
correlate(input: CorrelationInput): CorrelationResult;
|
|
160
|
-
readChanges(scope: OwnerReportReadScope, input: ChangesReadInput, nowMs: number): ChangesReadResult | ChangesReadFailure;
|
|
161
|
-
now(): number;
|
|
162
|
-
/** Open operational issues, already redacted; optional so packet tests need no issue store. */
|
|
163
|
-
readOperationalIssues?(): OperationalIssueSummary[];
|
|
164
|
-
}
|
|
165
|
-
export declare function serializeOwnerReportContext(packet: OwnerReportContextV1): string;
|
|
166
|
-
export declare const MAX_OPERATIONAL_ISSUES = 20;
|
|
167
|
-
export declare function compileOwnerReportContext(input: {
|
|
168
|
-
readScope: OwnerReportReadScope;
|
|
169
|
-
windowEvidence: ReportWindowEvidence;
|
|
170
|
-
since: string;
|
|
171
|
-
}, deps: OwnerReportContextDeps): Promise<OwnerReportContextV1>;
|
|
172
|
-
/**
|
|
173
|
-
* One MAMA (Phase 1 Task 3): the event turn starts from the same host-compiled
|
|
174
|
-
* packet as the report, narrowed to its channel. The read scope MUST be the
|
|
175
|
-
* owner-event scope the run's envelope holds - reading under another principal
|
|
176
|
-
* is the mismatch that fails the envelope scope audit.
|
|
177
|
-
*/
|
|
178
|
-
export declare function compileChannelPacket(input: {
|
|
179
|
-
readScope: OwnerReportReadScope;
|
|
180
|
-
channelKey: string;
|
|
181
|
-
eventIds: string[];
|
|
182
|
-
since: string;
|
|
183
|
-
}, deps: OwnerReportContextDeps): Promise<OwnerReportContextV1>;
|
|
184
|
-
//# sourceMappingURL=report-context.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"report-context.d.ts","sourceRoot":"","sources":["../../src/operator/report-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAE1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAEhF,OAAO,KAAK,EACV,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,aAAa,EAAc,MAAM,kBAAkB,CAAC;AAiClE,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,SAAS,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACpD,YAAY,EAAE,cAAc,EAAE,CAAC;IAC/B,aA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