@jungjaehoon/mama-os 0.48.3 → 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 +2 -10
- 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 +1 -2
- 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 +2 -8
- 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/dist/wiki/wiki-turn-contract.d.ts.map +1 -1
- package/dist/wiki/wiki-turn-contract.js +1 -0
- package/dist/wiki/wiki-turn-contract.js.map +1 -1
- package/dist/wiki-artifacts/wiki-publish-adapter.d.ts.map +1 -1
- package/dist/wiki-artifacts/wiki-publish-adapter.js +11 -1
- package/dist/wiki-artifacts/wiki-publish-adapter.js.map +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
package/dist/api/graph-api.js
CHANGED
|
@@ -1290,87 +1290,15 @@ function createGraphHandler(options = {}) {
|
|
|
1290
1290
|
}
|
|
1291
1291
|
return true;
|
|
1292
1292
|
}
|
|
1293
|
-
//
|
|
1294
|
-
//
|
|
1295
|
-
if (pathname === '/api/memory-agent/ingest'
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
}
|
|
1303
|
-
if (!options.auditConversation) {
|
|
1304
|
-
res.writeHead(501, { 'Content-Type': 'application/json' });
|
|
1305
|
-
res.end(JSON.stringify({ error: true, message: 'Audit conversation not available' }));
|
|
1306
|
-
return true;
|
|
1307
|
-
}
|
|
1308
|
-
// Cast to unknown[] first for safe per-element validation (user-supplied HTTP input)
|
|
1309
|
-
const rawMessages = body.messages;
|
|
1310
|
-
const messages = rawMessages.filter((m) => m !== null &&
|
|
1311
|
-
typeof m === 'object' &&
|
|
1312
|
-
'role' in m &&
|
|
1313
|
-
typeof m.role === 'string' &&
|
|
1314
|
-
'content' in m &&
|
|
1315
|
-
typeof m.content === 'string');
|
|
1316
|
-
if (messages.length === 0) {
|
|
1317
|
-
res.writeHead(400, { 'Content-Type': 'application/json' });
|
|
1318
|
-
res.end(JSON.stringify({ error: true, message: 'No valid messages after filtering' }));
|
|
1319
|
-
return true;
|
|
1320
|
-
}
|
|
1321
|
-
const conversation = messages.map((m) => `${m.role}: ${m.content}`).join('\n');
|
|
1322
|
-
const scopes = (body.scopes || []);
|
|
1323
|
-
// Fire-and-forget so hook returns quickly
|
|
1324
|
-
options
|
|
1325
|
-
.auditConversation({ conversation, scopes })
|
|
1326
|
-
.catch((err) => logger.error('[MemoryAgent] ingest failed', err));
|
|
1327
|
-
res.writeHead(202, { 'Content-Type': 'application/json' });
|
|
1328
|
-
res.end(JSON.stringify({ accepted: true, queued: messages.length }));
|
|
1329
|
-
}
|
|
1330
|
-
catch (error) {
|
|
1331
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
1332
|
-
res.writeHead(500, { 'Content-Type': 'application/json' });
|
|
1333
|
-
res.end(JSON.stringify({ error: true, message }));
|
|
1334
|
-
}
|
|
1335
|
-
return true;
|
|
1336
|
-
}
|
|
1337
|
-
// Route: POST /api/mama/audit-conversation - ingest via memory agent (creates edges)
|
|
1338
|
-
if (pathname === '/api/mama/audit-conversation' && req.method === 'POST') {
|
|
1339
|
-
try {
|
|
1340
|
-
// Express may have already parsed the body; use req.body if available
|
|
1341
|
-
const body = req.body ?? (await readBody(req));
|
|
1342
|
-
if (!options.auditConversation) {
|
|
1343
|
-
res.writeHead(501, { 'Content-Type': 'application/json' });
|
|
1344
|
-
res.end(JSON.stringify({ error: true, message: 'Audit conversation not available' }));
|
|
1345
|
-
return true;
|
|
1346
|
-
}
|
|
1347
|
-
const messages = (body.messages || []);
|
|
1348
|
-
const conversation = messages.map((m) => `${m.role}: ${m.content}`).join('\n');
|
|
1349
|
-
const scopes = (body.scopes || []);
|
|
1350
|
-
const candidates = body.candidates;
|
|
1351
|
-
const ack = await options.auditConversation({ conversation, scopes, candidates });
|
|
1352
|
-
if (!ack || (typeof ack === 'object' && ack.error)) {
|
|
1353
|
-
const errMsg = (typeof ack === 'object' && ack.message) ||
|
|
1354
|
-
'Audit conversation failed';
|
|
1355
|
-
res.writeHead(500, { 'Content-Type': 'application/json' });
|
|
1356
|
-
res.end(JSON.stringify({ success: false, error: String(errMsg) }));
|
|
1357
|
-
}
|
|
1358
|
-
else if (typeof ack === 'object' &&
|
|
1359
|
-
ack.status === 'failed') {
|
|
1360
|
-
const reason = ack.reason || 'Audit agent returned failed status';
|
|
1361
|
-
res.writeHead(502, { 'Content-Type': 'application/json' });
|
|
1362
|
-
res.end(JSON.stringify({ success: false, error: String(reason), ack }));
|
|
1363
|
-
}
|
|
1364
|
-
else {
|
|
1365
|
-
res.writeHead(200, { 'Content-Type': 'application/json' });
|
|
1366
|
-
res.end(JSON.stringify({ success: true, ack }));
|
|
1367
|
-
}
|
|
1368
|
-
}
|
|
1369
|
-
catch (error) {
|
|
1370
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
1371
|
-
res.writeHead(500, { 'Content-Type': 'application/json' });
|
|
1372
|
-
res.end(JSON.stringify({ error: true, message }));
|
|
1373
|
-
}
|
|
1293
|
+
// Retired model-as-function endpoints fail explicitly. Conversation memory
|
|
1294
|
+
// is handled by the standing owner through mama_save, not a hidden agent.
|
|
1295
|
+
if ((pathname === '/api/memory-agent/ingest' || pathname === '/api/mama/audit-conversation') &&
|
|
1296
|
+
req.method === 'POST') {
|
|
1297
|
+
res.writeHead(410, { 'Content-Type': 'application/json' });
|
|
1298
|
+
res.end(JSON.stringify({
|
|
1299
|
+
error: true,
|
|
1300
|
+
message: 'Separate memory-agent ingestion was retired; use the One MAMA owner runtime',
|
|
1301
|
+
}));
|
|
1374
1302
|
return true;
|
|
1375
1303
|
}
|
|
1376
1304
|
// Alias: POST /api/update -> /graph/update
|