@jungjaehoon/mama-os 0.24.1 → 0.25.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 +14 -0
- package/README.md +9 -6
- package/dist/agent/agent-loop.d.ts.map +1 -1
- package/dist/agent/agent-loop.js +8 -0
- package/dist/agent/agent-loop.js.map +1 -1
- package/dist/agent/code-act/constants.js +2 -2
- package/dist/agent/code-act/host-bridge.d.ts.map +1 -1
- package/dist/agent/code-act/host-bridge.js +37 -4
- package/dist/agent/code-act/host-bridge.js.map +1 -1
- package/dist/agent/code-act/type-definition-generator.d.ts.map +1 -1
- package/dist/agent/code-act/type-definition-generator.js +2 -4
- package/dist/agent/code-act/type-definition-generator.js.map +1 -1
- package/dist/agent/context-compile-service.d.ts +2 -0
- package/dist/agent/context-compile-service.d.ts.map +1 -1
- package/dist/agent/context-compile-service.js +26 -7
- package/dist/agent/context-compile-service.js.map +1 -1
- package/dist/agent/gateway-tool-executor.d.ts +2 -0
- package/dist/agent/gateway-tool-executor.d.ts.map +1 -1
- package/dist/agent/gateway-tool-executor.js +312 -18
- package/dist/agent/gateway-tool-executor.js.map +1 -1
- package/dist/agent/gateway-tools.md +4 -3
- package/dist/agent/tool-registry.d.ts.map +1 -1
- package/dist/agent/tool-registry.js +9 -3
- package/dist/agent/tool-registry.js.map +1 -1
- package/dist/agent/types.d.ts +27 -6
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/types.js.map +1 -1
- package/dist/api/operator-tasks-handler.d.ts.map +1 -1
- package/dist/api/operator-tasks-handler.js +23 -1
- package/dist/api/operator-tasks-handler.js.map +1 -1
- package/dist/cli/commands/start.d.ts +7 -3
- package/dist/cli/commands/start.d.ts.map +1 -1
- package/dist/cli/commands/start.js +113 -65
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/cli/runtime/agent-loop-init.d.ts +2 -0
- package/dist/cli/runtime/agent-loop-init.d.ts.map +1 -1
- package/dist/cli/runtime/agent-loop-init.js +37 -12
- package/dist/cli/runtime/agent-loop-init.js.map +1 -1
- package/dist/cli/runtime/api-routes-init.js +3 -3
- package/dist/cli/runtime/api-routes-init.js.map +1 -1
- package/dist/cli/runtime/temporal-init.d.ts +28 -0
- package/dist/cli/runtime/temporal-init.d.ts.map +1 -0
- package/dist/cli/runtime/temporal-init.js +74 -0
- package/dist/cli/runtime/temporal-init.js.map +1 -0
- package/dist/db/migrations/operator-task-temporal.d.ts +8 -0
- package/dist/db/migrations/operator-task-temporal.d.ts.map +1 -0
- package/dist/db/migrations/operator-task-temporal.js +209 -0
- package/dist/db/migrations/operator-task-temporal.js.map +1 -0
- package/dist/envelope/enforcer.d.ts.map +1 -1
- package/dist/envelope/enforcer.js +6 -6
- package/dist/envelope/enforcer.js.map +1 -1
- package/dist/multi-agent/dashboard-agent-persona.d.ts.map +1 -1
- package/dist/multi-agent/dashboard-agent-persona.js +9 -4
- package/dist/multi-agent/dashboard-agent-persona.js.map +1 -1
- package/dist/operator/action-verifier.d.ts +23 -0
- package/dist/operator/action-verifier.d.ts.map +1 -1
- package/dist/operator/action-verifier.js +76 -0
- package/dist/operator/action-verifier.js.map +1 -1
- package/dist/operator/board-reconcile.d.ts.map +1 -1
- package/dist/operator/board-reconcile.js +3 -0
- package/dist/operator/board-reconcile.js.map +1 -1
- package/dist/operator/board-slot-instructions.d.ts +3 -3
- package/dist/operator/board-slot-instructions.d.ts.map +1 -1
- package/dist/operator/board-slot-instructions.js +17 -8
- package/dist/operator/board-slot-instructions.js.map +1 -1
- package/dist/operator/briefs.d.ts.map +1 -1
- package/dist/operator/briefs.js +3 -0
- package/dist/operator/briefs.js.map +1 -1
- package/dist/operator/task-ledger.d.ts +134 -8
- package/dist/operator/task-ledger.d.ts.map +1 -1
- package/dist/operator/task-ledger.js +1181 -74
- package/dist/operator/task-ledger.js.map +1 -1
- package/dist/operator/task-temporal.d.ts +21 -0
- package/dist/operator/task-temporal.d.ts.map +1 -0
- package/dist/operator/task-temporal.js +111 -0
- package/dist/operator/task-temporal.js.map +1 -0
- package/dist/operator/temporal-effect.d.ts +62 -0
- package/dist/operator/temporal-effect.d.ts.map +1 -0
- package/dist/operator/temporal-effect.js +71 -0
- package/dist/operator/temporal-effect.js.map +1 -0
- package/dist/operator/temporal-reconcile.d.ts +48 -0
- package/dist/operator/temporal-reconcile.d.ts.map +1 -0
- package/dist/operator/temporal-reconcile.js +215 -0
- package/dist/operator/temporal-reconcile.js.map +1 -0
- package/dist/operator/temporal-runtime.d.ts +54 -0
- package/dist/operator/temporal-runtime.d.ts.map +1 -0
- package/dist/operator/temporal-runtime.js +110 -0
- package/dist/operator/temporal-runtime.js.map +1 -0
- package/dist/operator/temporal-worker.d.ts +19 -0
- package/dist/operator/temporal-worker.d.ts.map +1 -0
- package/dist/operator/temporal-worker.js +105 -0
- package/dist/operator/temporal-worker.js.map +1 -0
- package/dist/operator/worker-run.d.ts +6 -2
- package/dist/operator/worker-run.d.ts.map +1 -1
- package/dist/operator/worker-run.js +14 -0
- package/dist/operator/worker-run.js.map +1 -1
- package/dist/operator/workorder-consumer.d.ts +27 -10
- package/dist/operator/workorder-consumer.d.ts.map +1 -1
- package/dist/operator/workorder-consumer.js +195 -14
- package/dist/operator/workorder-consumer.js.map +1 -1
- package/dist/operator/workorder-hooks.d.ts +3 -0
- package/dist/operator/workorder-hooks.d.ts.map +1 -1
- package/dist/operator/workorder-hooks.js +23 -0
- package/dist/operator/workorder-hooks.js.map +1 -1
- package/dist/operator/workorder-publishers.d.ts +10 -1
- package/dist/operator/workorder-publishers.d.ts.map +1 -1
- package/dist/operator/workorder-publishers.js +40 -3
- package/dist/operator/workorder-publishers.js.map +1 -1
- package/package.json +1 -1
- package/public/ui/assets/{index-OSgiwL24.js → index-BDXDGEV6.js} +15 -15
- package/public/ui/assets/index-po2tN0xq.css +1 -0
- package/public/ui/index.html +2 -2
- package/public/ui/assets/index-CKOJQYXA.css +0 -1
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.applyOperatorTaskTemporalMigration = applyOperatorTaskTemporalMigration;
|
|
4
|
+
const TEMPORAL_TASK_COLUMNS = [
|
|
5
|
+
['due_at', 'INTEGER'],
|
|
6
|
+
['deadline_offset_minutes', 'INTEGER CHECK (deadline_offset_minutes BETWEEN -840 AND 840)'],
|
|
7
|
+
['revision', 'INTEGER NOT NULL DEFAULT 0 CHECK (revision >= 0)'],
|
|
8
|
+
['temporal_epoch', 'INTEGER NOT NULL DEFAULT 0 CHECK (temporal_epoch >= 0)'],
|
|
9
|
+
['temporal_reconciled_occurrence_key', 'TEXT'],
|
|
10
|
+
['last_temporal_checked_at', 'INTEGER'],
|
|
11
|
+
['next_temporal_check_at', 'INTEGER'],
|
|
12
|
+
['last_temporal_attempt_id', 'INTEGER'],
|
|
13
|
+
];
|
|
14
|
+
/**
|
|
15
|
+
* Adds temporal task storage inside TaskLedger's existing BEGIN IMMEDIATE.
|
|
16
|
+
* This function deliberately owns no transaction so it cannot commit a
|
|
17
|
+
* partially upgraded legacy copy-swap.
|
|
18
|
+
*/
|
|
19
|
+
function applyOperatorTaskTemporalMigration(db) {
|
|
20
|
+
const columns = new Set(db.prepare('PRAGMA table_info(operator_tasks)').all().map((column) => column.name));
|
|
21
|
+
for (const [name, definition] of TEMPORAL_TASK_COLUMNS) {
|
|
22
|
+
if (!columns.has(name)) {
|
|
23
|
+
db.exec(`ALTER TABLE operator_tasks ADD COLUMN ${name} ${definition}`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
db.exec(`
|
|
27
|
+
DROP INDEX IF EXISTS idx_operator_temporal_generations_task_occurrence;
|
|
28
|
+
DROP INDEX IF EXISTS idx_operator_tasks_temporal_candidates;
|
|
29
|
+
|
|
30
|
+
CREATE TABLE IF NOT EXISTS operator_temporal_generations (
|
|
31
|
+
generation_key TEXT PRIMARY KEY,
|
|
32
|
+
task_id INTEGER NOT NULL REFERENCES operator_tasks(id),
|
|
33
|
+
temporal_epoch INTEGER NOT NULL CHECK (temporal_epoch >= 0),
|
|
34
|
+
occurrence_key TEXT NOT NULL,
|
|
35
|
+
check_at INTEGER NOT NULL,
|
|
36
|
+
disposition TEXT NOT NULL DEFAULT 'active'
|
|
37
|
+
CHECK (disposition IN ('active','resolved','final_no_update','deferred','exhausted','superseded')),
|
|
38
|
+
last_workorder_id INTEGER REFERENCES operator_tasks(id),
|
|
39
|
+
reason TEXT,
|
|
40
|
+
created_at INTEGER NOT NULL,
|
|
41
|
+
updated_at INTEGER NOT NULL
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
CREATE TABLE IF NOT EXISTS operator_temporal_effects (
|
|
45
|
+
workorder_attempt_id INTEGER PRIMARY KEY REFERENCES operator_tasks(id),
|
|
46
|
+
task_id INTEGER NOT NULL REFERENCES operator_tasks(id),
|
|
47
|
+
generation_key TEXT NOT NULL REFERENCES operator_temporal_generations(generation_key),
|
|
48
|
+
occurrence_key TEXT NOT NULL,
|
|
49
|
+
outcome TEXT NOT NULL
|
|
50
|
+
CHECK (outcome IN ('resolved','final_no_update','deferred')),
|
|
51
|
+
before_revision INTEGER NOT NULL CHECK (before_revision >= 0),
|
|
52
|
+
after_revision INTEGER NOT NULL CHECK (after_revision >= 0),
|
|
53
|
+
changed_fields TEXT NOT NULL,
|
|
54
|
+
reason TEXT NOT NULL,
|
|
55
|
+
attestation_version INTEGER NOT NULL DEFAULT 0 CHECK (attestation_version IN (0, 1)),
|
|
56
|
+
context_packet_id TEXT NOT NULL,
|
|
57
|
+
context_packet_sha256 TEXT NOT NULL,
|
|
58
|
+
next_temporal_check_at INTEGER,
|
|
59
|
+
created_at INTEGER NOT NULL
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
CREATE INDEX IF NOT EXISTS idx_operator_tasks_temporal_scan_id
|
|
63
|
+
ON operator_tasks(id)
|
|
64
|
+
WHERE kind = 'owner' AND status IN ('pending','in_progress','review','blocked')
|
|
65
|
+
AND (due_at IS NOT NULL OR deadline IS NOT NULL OR next_temporal_check_at IS NOT NULL);
|
|
66
|
+
CREATE INDEX IF NOT EXISTS idx_operator_tasks_temporal_open_event
|
|
67
|
+
ON operator_tasks(source_event_id, id)
|
|
68
|
+
WHERE kind = 'system' AND source_channel = 'workorder:temporal'
|
|
69
|
+
AND status IN ('pending','in_progress');
|
|
70
|
+
CREATE UNIQUE INDEX IF NOT EXISTS idx_operator_temporal_generations_identity
|
|
71
|
+
ON operator_temporal_generations(task_id, temporal_epoch, occurrence_key, check_at);
|
|
72
|
+
CREATE INDEX IF NOT EXISTS idx_operator_temporal_generations_active
|
|
73
|
+
ON operator_temporal_generations(generation_key, last_workorder_id)
|
|
74
|
+
WHERE disposition = 'active' AND last_workorder_id IS NOT NULL;
|
|
75
|
+
CREATE INDEX IF NOT EXISTS idx_operator_temporal_generations_workorder
|
|
76
|
+
ON operator_temporal_generations(last_workorder_id);
|
|
77
|
+
CREATE INDEX IF NOT EXISTS idx_operator_temporal_effects_task_occurrence
|
|
78
|
+
ON operator_temporal_effects(task_id, occurrence_key, created_at);
|
|
79
|
+
|
|
80
|
+
CREATE TRIGGER IF NOT EXISTS trg_operator_tasks_legacy_deadline_write
|
|
81
|
+
AFTER UPDATE OF deadline ON operator_tasks
|
|
82
|
+
WHEN NEW.kind = 'owner'
|
|
83
|
+
AND NEW.deadline IS NOT OLD.deadline
|
|
84
|
+
AND NEW.due_at IS OLD.due_at
|
|
85
|
+
AND NEW.temporal_epoch = OLD.temporal_epoch
|
|
86
|
+
BEGIN
|
|
87
|
+
UPDATE operator_tasks
|
|
88
|
+
SET due_at = NULL,
|
|
89
|
+
deadline_offset_minutes = NULL,
|
|
90
|
+
revision = OLD.revision + 1,
|
|
91
|
+
temporal_epoch = OLD.temporal_epoch + 1,
|
|
92
|
+
temporal_reconciled_occurrence_key = NULL,
|
|
93
|
+
last_temporal_checked_at = NULL,
|
|
94
|
+
next_temporal_check_at = NULL,
|
|
95
|
+
last_temporal_attempt_id = NULL
|
|
96
|
+
WHERE id = NEW.id;
|
|
97
|
+
UPDATE operator_temporal_generations
|
|
98
|
+
SET disposition = 'superseded', reason = 'legacy-deadline-write', updated_at = NEW.updated_at
|
|
99
|
+
WHERE task_id = NEW.id AND disposition = 'active';
|
|
100
|
+
UPDATE operator_tasks
|
|
101
|
+
SET status = 'cancelled', latest_event = 'legacy-deadline-write', updated_at = NEW.updated_at
|
|
102
|
+
WHERE kind = 'system' AND source_channel = 'workorder:temporal'
|
|
103
|
+
AND status IN ('pending','in_progress')
|
|
104
|
+
AND source_event_id IN (
|
|
105
|
+
SELECT generation_key FROM operator_temporal_generations WHERE task_id = NEW.id
|
|
106
|
+
);
|
|
107
|
+
END;
|
|
108
|
+
|
|
109
|
+
CREATE TRIGGER IF NOT EXISTS trg_operator_tasks_legacy_status_write
|
|
110
|
+
AFTER UPDATE OF status ON operator_tasks
|
|
111
|
+
WHEN NEW.kind = 'owner'
|
|
112
|
+
AND NEW.status IS NOT OLD.status
|
|
113
|
+
AND NEW.revision = OLD.revision
|
|
114
|
+
BEGIN
|
|
115
|
+
UPDATE operator_tasks
|
|
116
|
+
SET revision = OLD.revision + 1,
|
|
117
|
+
temporal_epoch = CASE
|
|
118
|
+
WHEN OLD.status IN ('done','cancelled')
|
|
119
|
+
AND NEW.status NOT IN ('done','cancelled')
|
|
120
|
+
THEN OLD.temporal_epoch + 1
|
|
121
|
+
ELSE OLD.temporal_epoch
|
|
122
|
+
END,
|
|
123
|
+
temporal_reconciled_occurrence_key = CASE
|
|
124
|
+
WHEN OLD.status IN ('done','cancelled')
|
|
125
|
+
AND NEW.status NOT IN ('done','cancelled')
|
|
126
|
+
THEN NULL
|
|
127
|
+
ELSE NEW.temporal_reconciled_occurrence_key
|
|
128
|
+
END,
|
|
129
|
+
last_temporal_checked_at = CASE
|
|
130
|
+
WHEN OLD.status IN ('done','cancelled')
|
|
131
|
+
AND NEW.status NOT IN ('done','cancelled')
|
|
132
|
+
THEN NULL
|
|
133
|
+
ELSE NEW.last_temporal_checked_at
|
|
134
|
+
END,
|
|
135
|
+
next_temporal_check_at = CASE
|
|
136
|
+
WHEN OLD.status IN ('done','cancelled')
|
|
137
|
+
AND NEW.status NOT IN ('done','cancelled')
|
|
138
|
+
THEN NULL
|
|
139
|
+
ELSE NEW.next_temporal_check_at
|
|
140
|
+
END,
|
|
141
|
+
last_temporal_attempt_id = CASE
|
|
142
|
+
WHEN OLD.status IN ('done','cancelled')
|
|
143
|
+
AND NEW.status NOT IN ('done','cancelled')
|
|
144
|
+
THEN NULL
|
|
145
|
+
ELSE NEW.last_temporal_attempt_id
|
|
146
|
+
END
|
|
147
|
+
WHERE id = NEW.id;
|
|
148
|
+
UPDATE operator_tasks
|
|
149
|
+
SET status = 'cancelled',
|
|
150
|
+
latest_event = CASE
|
|
151
|
+
WHEN NEW.status IN ('done','cancelled') THEN 'legacy-owner-task-closed'
|
|
152
|
+
ELSE 'legacy-owner-task-reopened'
|
|
153
|
+
END,
|
|
154
|
+
updated_at = NEW.updated_at
|
|
155
|
+
WHERE kind = 'system' AND source_channel = 'workorder:temporal'
|
|
156
|
+
AND status IN ('pending','in_progress')
|
|
157
|
+
AND source_event_id IN (
|
|
158
|
+
SELECT generation_key FROM operator_temporal_generations
|
|
159
|
+
WHERE task_id = NEW.id AND disposition = 'active'
|
|
160
|
+
)
|
|
161
|
+
AND (
|
|
162
|
+
(OLD.status IN ('done','cancelled') AND NEW.status NOT IN ('done','cancelled'))
|
|
163
|
+
OR
|
|
164
|
+
(OLD.status NOT IN ('done','cancelled') AND NEW.status IN ('done','cancelled'))
|
|
165
|
+
);
|
|
166
|
+
UPDATE operator_temporal_generations
|
|
167
|
+
SET disposition = 'superseded',
|
|
168
|
+
reason = CASE
|
|
169
|
+
WHEN NEW.status IN ('done','cancelled') THEN 'legacy-owner-task-closed'
|
|
170
|
+
ELSE 'legacy-owner-task-reopened'
|
|
171
|
+
END,
|
|
172
|
+
updated_at = NEW.updated_at
|
|
173
|
+
WHERE task_id = NEW.id AND disposition = 'active'
|
|
174
|
+
AND (
|
|
175
|
+
(OLD.status IN ('done','cancelled') AND NEW.status NOT IN ('done','cancelled'))
|
|
176
|
+
OR
|
|
177
|
+
(OLD.status NOT IN ('done','cancelled') AND NEW.status IN ('done','cancelled'))
|
|
178
|
+
);
|
|
179
|
+
END;
|
|
180
|
+
|
|
181
|
+
CREATE TRIGGER IF NOT EXISTS trg_operator_tasks_legacy_content_write
|
|
182
|
+
AFTER UPDATE OF title, priority, assignee, latest_event, confirmed ON operator_tasks
|
|
183
|
+
WHEN NEW.kind = 'owner'
|
|
184
|
+
AND NEW.revision = OLD.revision
|
|
185
|
+
AND (
|
|
186
|
+
NEW.title IS NOT OLD.title
|
|
187
|
+
OR NEW.priority IS NOT OLD.priority
|
|
188
|
+
OR NEW.assignee IS NOT OLD.assignee
|
|
189
|
+
OR NEW.latest_event IS NOT OLD.latest_event
|
|
190
|
+
OR NEW.confirmed IS NOT OLD.confirmed
|
|
191
|
+
)
|
|
192
|
+
BEGIN
|
|
193
|
+
UPDATE operator_tasks SET revision = OLD.revision + 1 WHERE id = NEW.id;
|
|
194
|
+
END;
|
|
195
|
+
`);
|
|
196
|
+
const effectColumns = new Set(db.prepare('PRAGMA table_info(operator_temporal_effects)').all().map((column) => column.name));
|
|
197
|
+
if (!effectColumns.has('context_packet_id')) {
|
|
198
|
+
db.exec(`ALTER TABLE operator_temporal_effects ADD COLUMN context_packet_id TEXT`);
|
|
199
|
+
}
|
|
200
|
+
if (!effectColumns.has('context_packet_sha256')) {
|
|
201
|
+
db.exec(`ALTER TABLE operator_temporal_effects ADD COLUMN context_packet_sha256 TEXT`);
|
|
202
|
+
}
|
|
203
|
+
if (!effectColumns.has('attestation_version')) {
|
|
204
|
+
db.exec(`ALTER TABLE operator_temporal_effects
|
|
205
|
+
ADD COLUMN attestation_version INTEGER NOT NULL DEFAULT 0
|
|
206
|
+
CHECK (attestation_version IN (0, 1))`);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
//# sourceMappingURL=operator-task-temporal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operator-task-temporal.js","sourceRoot":"","sources":["../../../src/db/migrations/operator-task-temporal.ts"],"names":[],"mappings":";;AAkBA,gFAyMC;AAzND,MAAM,qBAAqB,GAAG;IAC5B,CAAC,QAAQ,EAAE,SAAS,CAAC;IACrB,CAAC,yBAAyB,EAAE,8DAA8D,CAAC;IAC3F,CAAC,UAAU,EAAE,kDAAkD,CAAC;IAChE,CAAC,gBAAgB,EAAE,wDAAwD,CAAC;IAC5E,CAAC,oCAAoC,EAAE,MAAM,CAAC;IAC9C,CAAC,0BAA0B,EAAE,SAAS,CAAC;IACvC,CAAC,wBAAwB,EAAE,SAAS,CAAC;IACrC,CAAC,0BAA0B,EAAE,SAAS,CAAC;CAC/B,CAAC;AAEX;;;;GAIG;AACH,SAAgB,kCAAkC,CAAC,EAAkB;IACnE,MAAM,OAAO,GAAG,IAAI,GAAG,CACpB,EAAE,CAAC,OAAO,CAAC,mCAAmC,CAAC,CAAC,GAAG,EAA8B,CAAC,GAAG,CACpF,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CACxB,CACF,CAAC;IACF,KAAK,MAAM,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,qBAAqB,EAAE,CAAC;QACvD,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YACvB,EAAE,CAAC,IAAI,CAAC,yCAAyC,IAAI,IAAI,UAAU,EAAE,CAAC,CAAC;QACzE,CAAC;IACH,CAAC;IAED,EAAE,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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","sourceRoot":"","sources":["../../src/envelope/enforcer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAe,MAAM,YAAY,CAAC;AAGxD,qBAAa,iBAAkB,SAAQ,KAAK;aAGxB,IAAI,EAAE,MAAM;aACZ,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;gBAFjD,OAAO,EAAE,MAAM,EACC,IAAI,EAAE,MAAM,EACZ,QAAQ,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM;CAKzD;AAqCD,qBAAa,gBAAgB;IAC3B,KAAK,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI;IAYnF,OAAO,CAAC,WAAW;IAYnB,OAAO,CAAC,gBAAgB;IAyBxB,OAAO,CAAC,kBAAkB;IAiB1B,OAAO,CAAC,iBAAiB;IAkDzB,OAAO,CAAC,SAAS;CAQlB"}
|
|
@@ -62,10 +62,10 @@ class EnvelopeEnforcer {
|
|
|
62
62
|
expiresAt = (0, expiry_js_1.parseEnvelopeExpiresAt)(envelope.expires_at);
|
|
63
63
|
}
|
|
64
64
|
catch {
|
|
65
|
-
throw new EnvelopeViolation(
|
|
65
|
+
throw new EnvelopeViolation('Envelope expiry is invalid', 'invalid_expiry');
|
|
66
66
|
}
|
|
67
67
|
if (expiresAt <= Date.now()) {
|
|
68
|
-
throw new EnvelopeViolation(
|
|
68
|
+
throw new EnvelopeViolation('Envelope has expired', 'expired');
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
checkDestination(envelope, toolName, args) {
|
|
@@ -79,7 +79,7 @@ class EnvelopeEnforcer {
|
|
|
79
79
|
}
|
|
80
80
|
const allowed = envelope.scope.allowed_destinations.some((destination) => destination.kind === destinationKind && destination.id === destinationId);
|
|
81
81
|
if (!allowed) {
|
|
82
|
-
throw new EnvelopeViolation(
|
|
82
|
+
throw new EnvelopeViolation('Requested destination is outside envelope.scope.allowed_destinations', 'destination_out_of_scope');
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
checkRawConnectors(envelope, toolName, args) {
|
|
@@ -89,7 +89,7 @@ class EnvelopeEnforcer {
|
|
|
89
89
|
}
|
|
90
90
|
const outOfScope = requestedConnectors.filter((connector) => !envelope.scope.raw_connectors.includes(connector));
|
|
91
91
|
if (outOfScope.length > 0) {
|
|
92
|
-
throw new EnvelopeViolation(
|
|
92
|
+
throw new EnvelopeViolation('Requested raw connector is outside envelope.scope.raw_connectors', 'connector_out_of_scope');
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
checkMemoryScopes(envelope, toolName, args) {
|
|
@@ -115,7 +115,7 @@ class EnvelopeEnforcer {
|
|
|
115
115
|
if (toolName === 'context_compile' && isRecord(args) && Array.isArray(args.scopes)) {
|
|
116
116
|
return;
|
|
117
117
|
}
|
|
118
|
-
throw new EnvelopeViolation('Memory tools must execute with an explicit envelope memory scope', 'memory_scope_out_of_scope'
|
|
118
|
+
throw new EnvelopeViolation('Memory tools must execute with an explicit envelope memory scope', 'memory_scope_out_of_scope');
|
|
119
119
|
}
|
|
120
120
|
const allowedScopeKeys = new Set(envelope.scope.memory_scopes.map((scope) => `${scope.kind}:${scope.id}`));
|
|
121
121
|
const outOfScope = requestedScopes.some((scope) => !allowedScopeKeys.has(`${scope.kind}:${scope.id}`));
|
|
@@ -125,7 +125,7 @@ class EnvelopeEnforcer {
|
|
|
125
125
|
}
|
|
126
126
|
checkTier(envelope, toolName) {
|
|
127
127
|
if (envelope.tier === 3 && WRITE_OR_SEND_TOOLS.has(toolName)) {
|
|
128
|
-
throw new EnvelopeViolation(`Tool ${toolName} not allowed at tier 3 (read-only)`, 'tier_violation'
|
|
128
|
+
throw new EnvelopeViolation(`Tool ${toolName} not allowed at tier 3 (read-only)`, 'tier_violation');
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
}
|
|
@@ -1 +1 @@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B,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC;QAC5E,CAAC,CAAC,KAAK;QACP,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC;AACrD,CAAC;AAED,SAAS,aAAa,CAAC,KAAc;IACnC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QACrB,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,CACL,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACrE,OAAO,KAAK,CAAC,EAAE,KAAK,QAAQ;QAC5B,KAAK,CAAC,EAAE,CAAC,MAAM,GAAG,CAAC,CACpB,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,QAiFG,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 v14 -->';
|
|
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
|
|
@@ -37,10 +37,15 @@ operator board (/ui): a four-slot, card-based situation report.
|
|
|
37
37
|
|
|
38
38
|
## Task state discipline (NON-NEGOTIABLE)
|
|
39
39
|
- kagemusha_tasks is the read-only project-task truth. task_list/task_create/task_update is the native owner-task ledger and the pipeline projection source. Never infer or copy lifecycle status across those stores.
|
|
40
|
+
- Never copy Trello or Kagemusha lifecycle status into the native ledger.
|
|
40
41
|
- Project-task completion/progress comes ONLY from kagemusha_tasks. NEVER infer a project task's state from message archaeology ("no approval message found" is not a status).
|
|
41
|
-
-
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
- Workflow judgment: render the source-of-truth lifecycle status without changing it because time elapsed.
|
|
43
|
+
- Temporal fact: use the native ledger's server-derived temporal_state. Render exact_overdue as
|
|
44
|
+
"overdue since <due_at>" and date_overdue as "overdue since <deadline>" in a separate badge/fact.
|
|
45
|
+
- System condition: reconciliation retrying or authority unavailable is operational state, not blocked/done/pending.
|
|
46
|
+
- Never infer completion from calendar disappearance.
|
|
47
|
+
- Set due_at only from trusted, unambiguous time and time zone evidence; otherwise retain date-only precision.
|
|
48
|
+
- Deadlines come from trusted task/calendar evidence, never guessed from chat.
|
|
44
49
|
- The pipeline slot is an ITEM TRACKER projected from the NATIVE ledger (task_list):
|
|
45
50
|
${(0, board_slot_instructions_js_1.buildPipelineTrackerInstructions)().join('\n')}
|
|
46
51
|
|
|
@@ -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;;;AAmGH,wDAyBC;AA1HD,2BAAwE;AACxE,+BAA4B;AAC5B,2BAA6B;AAC7B,uFAGgD;AAEhD,MAAM,gCAAgC,GAAG,6CAA6C,CAAC;AAE1E,QAAA,uBAAuB,GAAG,GAAG,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+BxE,IAAA,6DAAgC,GAAE,CAAC,IAAI,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;EAiB7C,IAAA,qDAAwB,GAAE,CAAC,IAAI,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uCAiCA,CAAC;AAExC;;;GAGG;AACH,SAAgB,sBAAsB,CAAC,cAAsB,IAAA,WAAI,EAAC,IAAA,YAAO,GAAE,EAAE,OAAO,CAAC;IACnF,MAAM,UAAU,GAAG,IAAA,WAAI,EAAC,WAAW,EAAE,UAAU,CAAC,CAAC;IACjD,MAAM,WAAW,GAAG,IAAA,WAAI,EAAC,UAAU,EAAE,cAAc,CAAC,CAAC;IAErD,IAAI,CAAC,IAAA,eAAU,EAAC,UAAU,CAAC,EAAE,CAAC;QAC5B,IAAA,cAAS,EAAC,UAAU,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7C,CAAC;IAED,IAAI,CAAC,IAAA,eAAU,EAAC,WAAW,CAAC,EAAE,CAAC;QAC7B,IAAA,kBAAa,EAAC,WAAW,EAAE,+BAAuB,EAAE,OAAO,CAAC,CAAC;QAC7D,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,MAAM,eAAe,GAAG,IAAA,iBAAY,EAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAE3D,oDAAoD;IACpD,yDAAyD;IACzD,IACE,eAAe,CAAC,QAAQ,CAAC,qCAAqC,CAAC;QAC/D,eAAe,KAAK,+BAAuB,EAC3C,CAAC;QACD,IAAA,kBAAa,EAAC,WAAW,EAAE,+BAAuB,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;IAED,OAAO,WAAW,CAAC;AACrB,CAAC"}
|
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
* Observe, never block: the caller records the outcome and emits a notice;
|
|
16
16
|
* an unverified run is a loud signal, not a rejection.
|
|
17
17
|
*/
|
|
18
|
+
import type { TaskRecord, TemporalGenerationRecord } from './task-ledger.js';
|
|
19
|
+
import { type TemporalEffectReceipt, type TemporalWorkContext } from './temporal-effect.js';
|
|
18
20
|
export declare const OBLIGATED_TOOLS: readonly ["report_publish", "task_create", "task_update", "contract_no_update"];
|
|
19
21
|
export interface VerifierDeps {
|
|
20
22
|
/** Current report slots (id -> html). */
|
|
@@ -47,4 +49,25 @@ export interface VerifyResult {
|
|
|
47
49
|
}
|
|
48
50
|
export declare function captureSnapshot(deps: VerifierDeps, scope: string): ActionSnapshot;
|
|
49
51
|
export declare function verifyAfterRun(deps: VerifierDeps, before: ActionSnapshot, scope: string): VerifyResult;
|
|
52
|
+
export interface TemporalVerifierDeps {
|
|
53
|
+
loadTemporalWorkContext: (attemptId: number) => TemporalWorkContext;
|
|
54
|
+
getTemporalEffect: (attemptId: number) => TemporalEffectReceipt | null;
|
|
55
|
+
getTask: (taskId: number) => TaskRecord | null;
|
|
56
|
+
getTemporalGeneration: (generationKey: string) => TemporalGenerationRecord | null;
|
|
57
|
+
getScopedNoteMaxId: (scope: string) => number;
|
|
58
|
+
}
|
|
59
|
+
export type TemporalEffectSnapshot = Readonly<TemporalWorkContext & {
|
|
60
|
+
scopedNoteMaxId: number;
|
|
61
|
+
}>;
|
|
62
|
+
export type TemporalVerifyResult = {
|
|
63
|
+
verified: true;
|
|
64
|
+
outcome: TemporalEffectReceipt['outcome'] | 'verified_superseded';
|
|
65
|
+
effects: string[];
|
|
66
|
+
} | {
|
|
67
|
+
verified: false;
|
|
68
|
+
reason: string;
|
|
69
|
+
effects: string[];
|
|
70
|
+
};
|
|
71
|
+
export declare function captureTemporalEffectSnapshot(deps: TemporalVerifierDeps, attemptId: number): TemporalEffectSnapshot;
|
|
72
|
+
export declare function verifyTemporalEffect(deps: TemporalVerifierDeps, before: TemporalEffectSnapshot): TemporalVerifyResult;
|
|
50
73
|
//# sourceMappingURL=action-verifier.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-verifier.d.ts","sourceRoot":"","sources":["../../src/operator/action-verifier.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;
|
|
1
|
+
{"version":3,"file":"action-verifier.d.ts","sourceRoot":"","sources":["../../src/operator/action-verifier.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAGL,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACzB,MAAM,sBAAsB,CAAC;AAE9B,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,EAA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,CAC3C,IAAI,EAAE,oBAAoB,EAC1B,SAAS,EAAE,MAAM,GAChB,sBAAsB,CASxB;AAED,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,oBAAoB,EAC1B,MAAM,EAAE,sBAAsB,GAC7B,oBAAoB,CAkEtB"}
|
|
@@ -20,7 +20,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
20
20
|
exports.OBLIGATED_TOOLS = void 0;
|
|
21
21
|
exports.captureSnapshot = captureSnapshot;
|
|
22
22
|
exports.verifyAfterRun = verifyAfterRun;
|
|
23
|
+
exports.captureTemporalEffectSnapshot = captureTemporalEffectSnapshot;
|
|
24
|
+
exports.verifyTemporalEffect = verifyTemporalEffect;
|
|
23
25
|
const node_crypto_1 = require("node:crypto");
|
|
26
|
+
const temporal_effect_js_1 = require("./temporal-effect.js");
|
|
24
27
|
exports.OBLIGATED_TOOLS = [
|
|
25
28
|
'report_publish',
|
|
26
29
|
'task_create',
|
|
@@ -65,4 +68,77 @@ function verifyAfterRun(deps, before, scope) {
|
|
|
65
68
|
}
|
|
66
69
|
return { verified, effects };
|
|
67
70
|
}
|
|
71
|
+
function captureTemporalEffectSnapshot(deps, attemptId) {
|
|
72
|
+
const context = deps.loadTemporalWorkContext(attemptId);
|
|
73
|
+
if (context.attemptId !== attemptId) {
|
|
74
|
+
throw new Error(`temporal verifier context attempt mismatch for ${attemptId}`);
|
|
75
|
+
}
|
|
76
|
+
return Object.freeze({
|
|
77
|
+
...context,
|
|
78
|
+
scopedNoteMaxId: deps.getScopedNoteMaxId((0, temporal_effect_js_1.temporalNoUpdateScope)(context)),
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
function verifyTemporalEffect(deps, before) {
|
|
82
|
+
const effects = [];
|
|
83
|
+
const receipt = deps.getTemporalEffect(before.attemptId);
|
|
84
|
+
if (!receipt)
|
|
85
|
+
return temporalFailure('temporal effect receipt missing', effects);
|
|
86
|
+
const receiptError = (0, temporal_effect_js_1.temporalReceiptInvariantError)(receipt, {
|
|
87
|
+
attemptId: before.attemptId,
|
|
88
|
+
taskId: before.taskId,
|
|
89
|
+
generationKey: before.generationKey,
|
|
90
|
+
occurrenceKey: before.occurrenceKey,
|
|
91
|
+
beforeRevision: before.revision,
|
|
92
|
+
});
|
|
93
|
+
if (receiptError)
|
|
94
|
+
return temporalFailure(receiptError, effects);
|
|
95
|
+
const generation = deps.getTemporalGeneration(before.generationKey);
|
|
96
|
+
if (!generation ||
|
|
97
|
+
generation.generationKey !== before.generationKey ||
|
|
98
|
+
generation.taskId !== before.taskId ||
|
|
99
|
+
generation.temporalEpoch !== before.temporalEpoch ||
|
|
100
|
+
generation.occurrenceKey !== before.occurrenceKey ||
|
|
101
|
+
generation.checkAt !== before.checkAt ||
|
|
102
|
+
generation.lastWorkOrderId !== before.attemptId ||
|
|
103
|
+
generation.disposition !== receipt.outcome) {
|
|
104
|
+
return temporalFailure('temporal generation invariant failed', effects);
|
|
105
|
+
}
|
|
106
|
+
const requiresNote = receipt.outcome === 'final_no_update' || receipt.outcome === 'deferred';
|
|
107
|
+
if (requiresNote &&
|
|
108
|
+
deps.getScopedNoteMaxId((0, temporal_effect_js_1.temporalNoUpdateScope)(before)) <= before.scopedNoteMaxId) {
|
|
109
|
+
return temporalFailure('exact-scope temporal no-update note missing', effects);
|
|
110
|
+
}
|
|
111
|
+
const task = deps.getTask(before.taskId);
|
|
112
|
+
if (!task)
|
|
113
|
+
return temporalFailure('temporal receipt owner task missing', effects);
|
|
114
|
+
if (task.id !== before.taskId) {
|
|
115
|
+
return temporalFailure('temporal owner task identity mismatch', effects);
|
|
116
|
+
}
|
|
117
|
+
if (task.revision < receipt.afterRevision) {
|
|
118
|
+
return temporalFailure('temporal owner task revision precedes receipt', effects);
|
|
119
|
+
}
|
|
120
|
+
effects.push(`receipt:${receipt.workorderAttemptId}`);
|
|
121
|
+
effects.push(`outcome:${receipt.outcome}`);
|
|
122
|
+
if (task.revision > receipt.afterRevision) {
|
|
123
|
+
effects.push(`owner task advanced to revision ${task.revision}`);
|
|
124
|
+
return { verified: true, outcome: 'verified_superseded', effects };
|
|
125
|
+
}
|
|
126
|
+
if (task.lastTemporalAttemptId !== before.attemptId ||
|
|
127
|
+
task.lastTemporalCheckedAt !== receipt.createdAt) {
|
|
128
|
+
return temporalFailure('temporal owner task attempt marker mismatch', effects);
|
|
129
|
+
}
|
|
130
|
+
if (receipt.outcome === 'resolved' || receipt.outcome === 'final_no_update') {
|
|
131
|
+
if (task.temporalReconciledOccurrenceKey !== before.occurrenceKey ||
|
|
132
|
+
task.nextTemporalCheckAt !== null) {
|
|
133
|
+
return temporalFailure('temporal owner task final markers are invalid', effects);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
else if (task.nextTemporalCheckAt !== receipt.nextTemporalCheckAt) {
|
|
137
|
+
return temporalFailure('temporal owner task deferred check mismatch', effects);
|
|
138
|
+
}
|
|
139
|
+
return { verified: true, outcome: receipt.outcome, effects };
|
|
140
|
+
}
|
|
141
|
+
function temporalFailure(reason, effects) {
|
|
142
|
+
return { verified: false, reason, effects };
|
|
143
|
+
}
|
|
68
144
|
//# sourceMappingURL=action-verifier.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-verifier.js","sourceRoot":"","sources":["../../src/operator/action-verifier.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;
|
|
1
|
+
{"version":3,"file":"action-verifier.js","sourceRoot":"","sources":["../../src/operator/action-verifier.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;AA+CH,0CAWC;AAED,wCAmCC;AAoBD,sEAYC;AAED,oDAqEC;AApMD,6CAAyC;AAEzC,6DAK8B;AAEjB,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,C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AA6C,EAAE,OAAO,CAAC,CAAC;IACjF,CAAC;IACD,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,CAAC;AAC/D,CAAC;AAED,SAAS,eAAe,CAAC,MAAc,EAAE,OAAiB;IACxD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;AAC9C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"board-reconcile.d.ts","sourceRoot":"","sources":["../../src/operator/board-reconcile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,WAAW,oBAAoB;IACnC,uEAAuE;IACvE,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,mFAAmF;IACnF,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,yFAAyF;AACzF,eAAO,MAAM,mBAAmB,kBAAkB,CAAC;AAEnD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,oBAAoB,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"board-reconcile.d.ts","sourceRoot":"","sources":["../../src/operator/board-reconcile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,WAAW,oBAAoB;IACnC,uEAAuE;IACvE,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,mFAAmF;IACnF,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,yFAAyF;AACzF,eAAO,MAAM,mBAAmB,kBAAkB,CAAC;AAEnD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,oBAAoB,GA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|
38
38
|
'5. Finish with exactly one line: RECONCILED <comma-separated slots or none>.',
|
|
39
39
|
'',
|
|
40
40
|
'Constraints: do not rewrite unaffected slots; no mama_save; no follow-up questions.',
|
|
41
|
+
'- Set due_at only from trusted, unambiguous time and time zone evidence; otherwise retain date-only precision.',
|
|
42
|
+
'- Never infer completion from calendar disappearance.',
|
|
43
|
+
'- Never copy Trello or Kagemusha lifecycle status into the native ledger.',
|
|
41
44
|
'',
|
|
42
45
|
`<latest-delta channel="${input.channelKey}">`,
|
|
43
46
|
...input.deltaLines,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"board-reconcile.js","sourceRoot":"","sources":["../../src/operator/board-reconcile.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAeH,
|
|
1
|
+
{"version":3,"file":"board-reconcile.js","sourceRoot":"","sources":["../../src/operator/board-reconcile.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAeH,oDA2BC;AA9BD,yFAAyF;AAC5E,QAAA,mBAAmB,GAAG,eAAe,CAAC;AAEnD,SAAgB,oBAAoB,CAAC,KAA2B;IAC9D,MAAM,KAAK,GAAG,KAAK,CAAC,YAAY,IAAI,KAAK,CAAC,UAAU,CAAC;IACrD,MAAM,KAAK,GAAG,aAAa,KAAK,CAAC,UAAU,EAAE,CAAC;IAC9C,OAAO;QACL,GAAG,2BAAmB,gBAAgB,KAAK,KAAK,KAAK,CAAC,UAAU,eAAe,KAAK,CAAC,QAAQ,GAAG;QAChG,wFAAwF;QACxF,wCAAwC;QACxC,gCAAgC;QAChC,yCAAyC,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,yFAAyF,CAAC,CAAC,CAAC,EAAE,GAAG;QACnK,wFAAwF;QACxF,gFAAgF;QAChF,mFAAmF;QACnF,mFAAmF;QACnF,qFAAqF;QACrF,mFAAmF;QACnF,wDAAwD,KAAK,cAAc;QAC3E,8EAA8E;QAC9E,EAAE;QACF,qFAAq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AG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,wBAAwB,CACtH,CAAC;YACF,IAAI,CAAC,aAAa,EAAE,CAAC;QACvB,CAAC;IACH,CAAC;CACF;AApHD,gDAoHC"}
|
|
@@ -16,9 +16,9 @@ export declare function buildBoardHtmlVocabulary(): string[];
|
|
|
16
16
|
/**
|
|
17
17
|
* Pipeline slot = item tracker projection (M8 Phase 3). Injected into EVERY
|
|
18
18
|
* board writer (dashboard persona, cron prompt, the trigger loop's full
|
|
19
|
-
* report) so both writers project the same tracker.
|
|
20
|
-
*
|
|
21
|
-
* and must never
|
|
19
|
+
* report) so both writers project the same tracker. The server-derived
|
|
20
|
+
* temporal_state is the canonical time category; personas are static files
|
|
21
|
+
* and must never recompute it from a baked-in date.
|
|
22
22
|
*/
|
|
23
23
|
export declare function buildPipelineTrackerInstructions(): string[];
|
|
24
24
|
/** Instruction block that makes a report run also publish the board slots. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"board-slot-instructions.d.ts","sourceRoot":"","sources":["../../src/operator/board-slot-instructions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,eAAO,MAAM,gBAAgB,mEAAoE,CAAC;AAElG,8DAA8D;AAC9D,wBAAgB,wBAAwB,IAAI,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"board-slot-instructions.d.ts","sourceRoot":"","sources":["../../src/operator/board-slot-instructions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,eAAO,MAAM,gBAAgB,mEAAoE,CAAC;AAElG,8DAA8D;AAC9D,wBAAgB,wBAAwB,IAAI,MAAM,EAAE,CAiBnD;AAED;;;;;;GAMG;AACH,wBAAgB,gCAAgC,IAAI,MAAM,EAAE,CAsB3D;AAED,8EAA8E;AAC9E,wBAAgB,sBAAsB,IAAI,MAAM,EAAE,CAcjD"}
|
|
@@ -28,8 +28,10 @@ function buildBoardHtmlVocabulary() {
|
|
|
28
28
|
' <span class="card-badge badge-warning">STATE</span></div>',
|
|
29
29
|
' <div class="card-tags"><span class="tag tag-channel">CHANNEL</span></div>',
|
|
30
30
|
' <div class="card-action">CONCRETE NEXT ACTION</div></div>',
|
|
31
|
-
'-
|
|
31
|
+
'- Workflow badge classes: badge-danger (blocked), badge-warning (waiting/needs confirmation),',
|
|
32
32
|
' badge-info (in progress), badge-success (done/quiet).',
|
|
33
|
+
'- Temporal badges are separate facts: badge-danger (overdue), badge-warning (due today),',
|
|
34
|
+
' badge-info (upcoming), badge-success (closed).',
|
|
33
35
|
'- Pipeline table: <table class="report-table"><thead><tr><th>...</th></tr></thead><tbody>rows</tbody></table>',
|
|
34
36
|
'No <script>, <iframe>, or event handlers: the board sanitizes them out and the CSP blocks them.',
|
|
35
37
|
];
|
|
@@ -37,19 +39,26 @@ function buildBoardHtmlVocabulary() {
|
|
|
37
39
|
/**
|
|
38
40
|
* Pipeline slot = item tracker projection (M8 Phase 3). Injected into EVERY
|
|
39
41
|
* board writer (dashboard persona, cron prompt, the trigger loop's full
|
|
40
|
-
* report) so both writers project the same tracker.
|
|
41
|
-
*
|
|
42
|
-
* and must never
|
|
42
|
+
* report) so both writers project the same tracker. The server-derived
|
|
43
|
+
* temporal_state is the canonical time category; personas are static files
|
|
44
|
+
* and must never recompute it from a baked-in date.
|
|
43
45
|
*/
|
|
44
46
|
function buildPipelineTrackerInstructions() {
|
|
45
47
|
return [
|
|
46
48
|
'The pipeline slot is an ITEM TRACKER, not a summary. Build it from',
|
|
47
49
|
'task_list({order: "deadline_priority", limit: 12}) -- the native task ledger is the',
|
|
48
50
|
'projection source. Render one report-table with a row per open item:',
|
|
49
|
-
' #id | title | status
|
|
50
|
-
'-
|
|
51
|
-
'
|
|
52
|
-
'-
|
|
51
|
+
' #id | title | workflow status | temporal fact | D-day | assignee (or "unassigned") | source | latest event',
|
|
52
|
+
'- Temporal fact: use temporal_state as the canonical category. Show exact_overdue as',
|
|
53
|
+
' "overdue since <due_at>" and date_overdue as "overdue since <deadline>".',
|
|
54
|
+
'- Workflow judgment: render status independently; overdue never changes status to blocked.',
|
|
55
|
+
'- System condition: report reconciliation retrying/authority unavailable separately; never',
|
|
56
|
+
' turn an infrastructure condition into a task lifecycle status.',
|
|
57
|
+
'- D-day is an optional display aid computed from deadline and the run date; never use it',
|
|
58
|
+
' to replace or recompute temporal_state.',
|
|
59
|
+
'- Never infer completion from calendar disappearance.',
|
|
60
|
+
'- Never copy Trello or Kagemusha lifecycle status into the native ledger.',
|
|
61
|
+
'- Unassigned AND due within 7 days -> badge-warning with the',
|
|
53
62
|
' literal word "unassigned" visible.',
|
|
54
63
|
'- Items with auto_created true and confirmed false render "(unconfirmed)" after the title',
|
|
55
64
|
' so model-created items are visually distinct from owner-confirmed ones.',
|