@ouro.bot/cli 0.1.0-alpha.522 → 0.1.0-alpha.524

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.
Files changed (30) hide show
  1. package/README.md +1 -1
  2. package/changelog.json +16 -0
  3. package/dist/heart/daemon/cli-exec.js +10 -10
  4. package/dist/heart/daemon/cli-help.js +5 -0
  5. package/dist/heart/daemon/cli-parse.js +1 -1
  6. package/dist/heart/daemon/cli-render.js +6 -2
  7. package/dist/heart/daemon/daemon-entry.js +26 -12
  8. package/dist/heart/daemon/daemon.js +33 -27
  9. package/dist/heart/{outlook/outlook-http-hooks.js → mailbox/mailbox-http-hooks.js} +23 -23
  10. package/dist/heart/{outlook/outlook-http-routes.js → mailbox/mailbox-http-routes.js} +45 -43
  11. package/dist/heart/{outlook/outlook-http-static.js → mailbox/mailbox-http-static.js} +13 -13
  12. package/dist/heart/{outlook/outlook-http-transport.js → mailbox/mailbox-http-transport.js} +1 -1
  13. package/dist/heart/{outlook/outlook-http.js → mailbox/mailbox-http.js} +15 -15
  14. package/dist/heart/{outlook/outlook-read.js → mailbox/mailbox-read.js} +4 -4
  15. package/dist/heart/{outlook/outlook-types.js → mailbox/mailbox-types.js} +9 -9
  16. package/dist/heart/{outlook/outlook-view.js → mailbox/mailbox-view.js} +11 -11
  17. package/dist/heart/{outlook → mailbox}/readers/agent-machine.js +10 -10
  18. package/dist/heart/{outlook → mailbox}/readers/continuity-readers.js +18 -16
  19. package/dist/heart/{outlook → mailbox}/readers/mail.js +11 -11
  20. package/dist/heart/{outlook → mailbox}/readers/runtime-readers.js +6 -5
  21. package/dist/heart/{outlook → mailbox}/readers/sessions.js +2 -2
  22. package/dist/heart/{outlook → mailbox}/readers/shared.js +2 -2
  23. package/dist/nerves/coverage/file-completeness.js +10 -10
  24. package/dist/senses/bluebubbles/index.js +15 -7
  25. package/dist/senses/cli/ouro-tui.js +1 -1
  26. package/package.json +4 -4
  27. /package/dist/heart/{outlook/outlook-http-response.js → mailbox/mailbox-http-response.js} +0 -0
  28. /package/dist/{outlook-ui → mailbox-ui}/assets/index-BPr5vNuM.css +0 -0
  29. /package/dist/{outlook-ui → mailbox-ui}/assets/index-Cm51CY9W.js +0 -0
  30. /package/dist/{outlook-ui → mailbox-ui}/index.html +0 -0
package/README.md CHANGED
@@ -41,7 +41,7 @@ The shared harness lives in `src/`:
41
41
  - `src/arc/`
42
42
  Durable continuity state — obligations, cares, episodes, intentions, presence, and attention types. The agent's sense of ongoing story.
43
43
  - `src/heart/`
44
- Core runtime, provider adapters, daemon, bootstrap, identity, and entrypoints. Organized into topic subdirectories: daemon/ (lifecycle), outlook/ (calendar), habits/ (scheduling), hatch/ (agent creation), versioning/ (updates), auth/, mcp/, providers/, bridges/.
44
+ Core runtime, provider adapters, daemon, bootstrap, identity, and entrypoints. Organized into topic subdirectories: daemon/ (lifecycle), mailbox/ (calendar), habits/ (scheduling), hatch/ (agent creation), versioning/ (updates), auth/, mcp/, providers/, bridges/.
45
45
  - `src/mind/`
46
46
  Prompt assembly, session persistence, bundle manifest enforcement, phrases, formatting, diary, note search, embedding providers, journal, obligation steering, and friend resolution.
47
47
  - `src/repertoire/`
package/changelog.json CHANGED
@@ -1,6 +1,22 @@
1
1
  {
2
2
  "_note": "This changelog is maintained as part of the PR/version-bump workflow. Agent-curated, not auto-generated. Agents read this file directly via read_file to understand what changed between versions.",
3
3
  "versions": [
4
+ {
5
+ "version": "0.1.0-alpha.524",
6
+ "changes": [
7
+ "Completes the human-facing Ouro Mailbox rename by moving the former Outlook source, tests, UI package, build scripts, and package asset checks onto mailbox naming.",
8
+ "Keeps compatibility aliases for `ouro outlook`, legacy `/outlook` API paths, old `outlookUrl` status consumers, and existing Outlook-named local preference/state files during the transition.",
9
+ "Cleans stale legacy Outlook UI package output during Mailbox UI builds so published packages carry the renamed asset tree without leftover old paths."
10
+ ]
11
+ },
12
+ {
13
+ "version": "0.1.0-alpha.523",
14
+ "changes": [
15
+ "Exits the daemon entrypoint after a command-plane `daemon.stop`, preventing a stopped daemon from staying alive without its command socket and leaving Slugger's iMessage worker marked degraded.",
16
+ "Shares daemon entrypoint cleanup between signal stops and command stops, stopping habit schedulers and daemon health polling before the process exits.",
17
+ "Keeps BlueBubbles runtime health green as soon as upstream is reachable while queued captured-inbound, mutation, or catch-up recovery work remains visible in `pendingRecoveryCount` instead of making live iMessage look down."
18
+ ]
19
+ },
4
20
  {
5
21
  "version": "0.1.0-alpha.522",
6
22
  "changes": [
@@ -6251,7 +6251,7 @@ async function runOuroCli(args, deps = (0, cli_defaults_1.createDefaultOuroCliDe
6251
6251
  deps.writeStdout(message);
6252
6252
  return message;
6253
6253
  }
6254
- if (command.kind === "outlook") {
6254
+ if (command.kind === "mailbox") {
6255
6255
  let status;
6256
6256
  try {
6257
6257
  status = await deps.sendCommand(deps.socketPath, { kind: "daemon.status" });
@@ -6264,23 +6264,23 @@ async function runOuroCli(args, deps = (0, cli_defaults_1.createDefaultOuroCliDe
6264
6264
  }
6265
6265
  /* v8 ignore stop */
6266
6266
  const payload = (0, cli_render_1.parseStatusPayload)(status.data);
6267
- /* v8 ignore start -- ?? branch: outlookUrl always present in test fixtures */
6268
- const outlookUrl = payload?.overview.outlookUrl ?? "unavailable";
6267
+ /* v8 ignore start -- ?? branch: mailboxUrl always present in test fixtures */
6268
+ const mailboxUrl = payload?.overview.mailboxUrl ?? payload?.overview.outlookUrl ?? "unavailable";
6269
6269
  /* v8 ignore stop */
6270
6270
  if (!command.json) {
6271
- deps.writeStdout(outlookUrl);
6272
- return outlookUrl;
6271
+ deps.writeStdout(mailboxUrl);
6272
+ return mailboxUrl;
6273
6273
  }
6274
- /* v8 ignore start — error path: outlook URL not available */
6275
- if (outlookUrl === "unavailable") {
6276
- deps.writeStdout(outlookUrl);
6277
- return outlookUrl;
6274
+ /* v8 ignore start — error path: mailbox URL not available */
6275
+ if (mailboxUrl === "unavailable") {
6276
+ deps.writeStdout(mailboxUrl);
6277
+ return mailboxUrl;
6278
6278
  }
6279
6279
  /* v8 ignore stop */
6280
6280
  /* v8 ignore start -- ?? branch: tests always inject fetchImpl */
6281
6281
  const fetchImpl = deps.fetchImpl ?? fetch;
6282
6282
  /* v8 ignore stop */
6283
- const response = await fetchImpl(`${outlookUrl}/api/machine`);
6283
+ const response = await fetchImpl(`${mailboxUrl}/api/machine`);
6284
6284
  const data = await response.json();
6285
6285
  const text = JSON.stringify(data, null, 2);
6286
6286
  deps.writeStdout(text);
@@ -90,6 +90,7 @@ exports.COMMAND_REGISTRY = {
90
90
  description: "Deprecated alias for `ouro mailbox`",
91
91
  usage: "ouro outlook [--json]",
92
92
  example: "ouro outlook --json",
93
+ hidden: true,
93
94
  },
94
95
  whoami: {
95
96
  category: "Agents",
@@ -433,6 +434,8 @@ function suggestCommand(input) {
433
434
  let bestMatch = null;
434
435
  let bestDistance = Infinity;
435
436
  for (const name of Object.keys(exports.COMMAND_REGISTRY)) {
437
+ if (exports.COMMAND_REGISTRY[name].hidden)
438
+ continue;
436
439
  const distance = levenshteinDistance(input, name);
437
440
  if (distance < bestDistance) {
438
441
  bestDistance = distance;
@@ -459,6 +462,8 @@ function getGroupedHelp() {
459
462
  for (const category of CATEGORY_ORDER) {
460
463
  lines.push(` ${category}:`);
461
464
  for (const [name, entry] of Object.entries(exports.COMMAND_REGISTRY)) {
465
+ if (entry.hidden)
466
+ continue;
462
467
  if (entry.category === category) {
463
468
  lines.push(` ${name.padEnd(16)} ${entry.description}`);
464
469
  }
@@ -1459,7 +1459,7 @@ function parseOuroCommand(args) {
1459
1459
  return { kind: "daemon.logs" };
1460
1460
  }
1461
1461
  if (head === "mailbox" || head === "outlook")
1462
- return { kind: "outlook", ...(args.includes("--json") ? { json: true } : {}) };
1462
+ return { kind: "mailbox", ...(args.includes("--json") ? { json: true } : {}) };
1463
1463
  if (head === "hatch")
1464
1464
  return parseHatchCommand(args.slice(1));
1465
1465
  if (head === "auth")
@@ -92,7 +92,10 @@ function parseStatusPayload(data) {
92
92
  daemon: stringField(overview.daemon) ?? "unknown",
93
93
  health: stringField(overview.health) ?? "unknown",
94
94
  socketPath: stringField(overview.socketPath) ?? "unknown",
95
- outlookUrl: stringField(overview.outlookUrl) ?? "unavailable",
95
+ mailboxUrl: stringField(overview.mailboxUrl)
96
+ ?? stringField(overview.outlookUrl)
97
+ ?? "unavailable",
98
+ outlookUrl: stringField(overview.outlookUrl) ?? undefined,
96
99
  version: stringField(overview.version) ?? "unknown",
97
100
  lastUpdated: stringField(overview.lastUpdated) ?? "unknown",
98
101
  repoRoot: stringField(overview.repoRoot) ?? "unknown",
@@ -309,7 +312,7 @@ function formatDaemonStatusOutput(response, fallback) {
309
312
  // ── Key-value overview ──
310
313
  const kvLine = (label, value) => ` ${teal(label.padEnd(11))} ${value}`;
311
314
  lines.push(kvLine("Socket", ov.socketPath));
312
- lines.push(kvLine("Mailbox", ov.outlookUrl));
315
+ lines.push(kvLine("Mailbox", ov.mailboxUrl));
313
316
  lines.push(kvLine("Health", `${statusDot(ov.health)} ${ov.health}`));
314
317
  lines.push(kvLine("Updated", ov.lastUpdated));
315
318
  lines.push("");
@@ -456,6 +459,7 @@ function buildStoppedStatusPayload(socketPath, syncRows = [], agentRows = []) {
456
459
  daemon: "stopped",
457
460
  health: "warn",
458
461
  socketPath,
462
+ mailboxUrl: "unavailable",
459
463
  outlookUrl: "unavailable",
460
464
  version: metadata.version,
461
465
  lastUpdated: metadata.lastUpdated,
@@ -149,6 +149,25 @@ const healthMonitor = new health_monitor_1.HealthMonitor({
149
149
  catch { /* recovery is best-effort */ }
150
150
  },
151
151
  });
152
+ const habitSchedulers = [];
153
+ let entryRuntimeStopping = false;
154
+ let stopCommandExitScheduled = false;
155
+ function stopEntryRuntime() {
156
+ if (entryRuntimeStopping)
157
+ return;
158
+ entryRuntimeStopping = true;
159
+ for (const s of habitSchedulers) {
160
+ s.stopWatching();
161
+ s.stop();
162
+ }
163
+ healthMonitor.stopPeriodicChecks();
164
+ }
165
+ function scheduleCleanProcessExitAfterStopCommand() {
166
+ if (stopCommandExitScheduled)
167
+ return;
168
+ stopCommandExitScheduled = true;
169
+ setTimeout(() => process.exit(0), 100);
170
+ }
152
171
  const daemon = new daemon_1.OuroDaemon({
153
172
  socketPath,
154
173
  processManager,
@@ -157,6 +176,10 @@ const daemon = new daemon_1.OuroDaemon({
157
176
  healthMonitor,
158
177
  router,
159
178
  mode,
179
+ onStopCommandComplete: () => {
180
+ stopEntryRuntime();
181
+ scheduleCleanProcessExitAfterStopCommand();
182
+ },
160
183
  });
161
184
  const daemonStartedAt = new Date().toISOString();
162
185
  const degradedComponents = [];
@@ -176,7 +199,7 @@ function buildDaemonHealthState() {
176
199
  };
177
200
  });
178
201
  // Preserved for backwards-compatible inspection: callers (status
179
- // command, outlook surface, etc.) may still read this combined list
202
+ // command, mailbox surface, etc.) may still read this combined list
180
203
  // for per-component reasons. The rollup status field above is what
181
204
  // changed meaning — the array is still the union of bootstrap +
182
205
  // agent-derived degradation entries.
@@ -298,7 +321,6 @@ const healthWriter = new daemon_health_1.DaemonHealthWriter((0, daemon_health_1.
298
321
  const healthSink = (0, daemon_health_1.createHealthNervesSink)(healthWriter, buildDaemonHealthState);
299
322
  (0, index_1.registerGlobalLogSink)(healthSink);
300
323
  /* v8 ignore stop */
301
- const habitSchedulers = [];
302
324
  /* v8 ignore start -- habit wiring: lambdas delegate to processManager/fs; tested via HabitScheduler unit tests @preserve */
303
325
  void daemon.start().then(() => {
304
326
  const bundlesRoot = (0, identity_1.getAgentBundlesRoot)();
@@ -392,22 +414,14 @@ process.on("SIGINT", () => {
392
414
  // tombstone is strictly better than silence.
393
415
  _tombstoneWritten = true;
394
416
  (0, daemon_tombstone_1.writeDaemonTombstone)("sigint", new Error("daemon received SIGINT"));
395
- for (const s of habitSchedulers) {
396
- s.stopWatching();
397
- s.stop();
398
- }
399
- healthMonitor.stopPeriodicChecks();
417
+ stopEntryRuntime();
400
418
  setTimeout(() => process.exit(1), 5_000).unref();
401
419
  void daemon.stop().then(() => process.exit(0));
402
420
  });
403
421
  process.on("SIGTERM", () => {
404
422
  _tombstoneWritten = true;
405
423
  (0, daemon_tombstone_1.writeDaemonTombstone)("sigterm", new Error("daemon received SIGTERM"));
406
- for (const s of habitSchedulers) {
407
- s.stopWatching();
408
- s.stop();
409
- }
410
- healthMonitor.stopPeriodicChecks();
424
+ stopEntryRuntime();
411
425
  setTimeout(() => process.exit(1), 5_000).unref();
412
426
  void daemon.stop().then(() => process.exit(0));
413
427
  });
@@ -61,10 +61,10 @@ const pending_1 = require("../../mind/pending");
61
61
  const agent_service_1 = require("./agent-service");
62
62
  const channel_1 = require("../../mind/friends/channel");
63
63
  const mcp_manager_1 = require("../../repertoire/mcp-manager");
64
- const outlook_http_1 = require("../outlook/outlook-http");
65
- const outlook_types_1 = require("../outlook/outlook-types");
66
- const outlook_read_1 = require("../outlook/outlook-read");
67
- const outlook_view_1 = require("../outlook/outlook-view");
64
+ const mailbox_http_1 = require("../mailbox/mailbox-http");
65
+ const mailbox_types_1 = require("../mailbox/mailbox-types");
66
+ const mailbox_read_1 = require("../mailbox/mailbox-read");
67
+ const mailbox_view_1 = require("../mailbox/mailbox-view");
68
68
  const provider_visibility_1 = require("../provider-visibility");
69
69
  const socket_client_1 = require("./socket-client");
70
70
  const PIDFILE_PATH = path.join(os.homedir(), ".ouro-cli", "daemon.pids");
@@ -414,10 +414,11 @@ class OuroDaemon {
414
414
  bundlesRoot;
415
415
  mode;
416
416
  server = null;
417
- outlookServer = null;
417
+ mailboxServer = null;
418
418
  socketIdentity = null;
419
419
  senseAutostartTimer = null;
420
- outlookServerFactory;
420
+ mailboxServerFactory;
421
+ onStopCommandComplete;
421
422
  constructor(options) {
422
423
  this.socketPath = options.socketPath;
423
424
  this.processManager = options.processManager;
@@ -427,35 +428,36 @@ class OuroDaemon {
427
428
  this.senseManager = options.senseManager ?? null;
428
429
  this.bundlesRoot = options.bundlesRoot ?? (0, identity_1.getAgentBundlesRoot)();
429
430
  this.mode = options.mode ?? "production";
430
- this.outlookServerFactory = options.outlookServerFactory ?? this.createDefaultOutlookServer.bind(this);
431
+ this.mailboxServerFactory = options.mailboxServerFactory ?? this.createDefaultMailboxServer.bind(this);
432
+ this.onStopCommandComplete = options.onStopCommandComplete ?? null;
431
433
  }
432
- /* v8 ignore start -- default outlook server wiring: production-only path, tests inject outlookServerFactory stub instead. startOutlookHttpServer itself has full coverage in outlook-http.test.ts @preserve */
433
- createDefaultOutlookServer() {
434
- return (0, outlook_http_1.startOutlookHttpServer)({
434
+ /* v8 ignore start -- default mailbox server wiring: production-only path, tests inject mailboxServerFactory stub instead. startMailboxHttpServer itself has full coverage in mailbox-http.test.ts @preserve */
435
+ createDefaultMailboxServer() {
436
+ return (0, mailbox_http_1.startMailboxHttpServer)({
435
437
  host: "127.0.0.1",
436
- port: outlook_types_1.OUTLOOK_DEFAULT_PORT,
438
+ port: mailbox_types_1.MAILBOX_DEFAULT_PORT,
437
439
  bundlesRoot: this.bundlesRoot,
438
- readMachineState: () => (0, outlook_read_1.readOutlookMachineState)({ bundlesRoot: this.bundlesRoot }),
440
+ readMachineState: () => (0, mailbox_read_1.readMailboxMachineState)({ bundlesRoot: this.bundlesRoot }),
439
441
  readMachineView: ({ machine }) => {
440
442
  const overview = this.buildStatusPayload().overview;
441
- return (0, outlook_view_1.buildOutlookMachineView)({
443
+ return (0, mailbox_view_1.buildMailboxMachineView)({
442
444
  machine,
443
445
  daemon: {
444
446
  status: overview.daemon,
445
447
  health: overview.health,
446
448
  mode: overview.mode,
447
449
  socketPath: overview.socketPath,
448
- outlookUrl: overview.outlookUrl,
450
+ mailboxUrl: overview.mailboxUrl,
449
451
  entryPath: overview.entryPath,
450
452
  workerCount: overview.workerCount,
451
453
  senseCount: overview.senseCount,
452
454
  },
453
455
  });
454
456
  },
455
- readAgentState: (agentName) => (0, outlook_read_1.readOutlookAgentState)(agentName, { bundlesRoot: this.bundlesRoot }),
457
+ readAgentState: (agentName) => (0, mailbox_read_1.readMailboxAgentState)(agentName, { bundlesRoot: this.bundlesRoot }),
456
458
  readAgentView: (agentName) => {
457
- const agent = (0, outlook_read_1.readOutlookAgentState)(agentName, { bundlesRoot: this.bundlesRoot });
458
- return (0, outlook_view_1.buildOutlookAgentView)({
459
+ const agent = (0, mailbox_read_1.readMailboxAgentState)(agentName, { bundlesRoot: this.bundlesRoot });
460
+ return (0, mailbox_view_1.buildMailboxAgentView)({
459
461
  agent,
460
462
  viewer: { kind: "human" },
461
463
  });
@@ -474,12 +476,14 @@ class OuroDaemon {
474
476
  agentName: agent.name,
475
477
  agentRoot: path.join(this.bundlesRoot, `${agent.name}.ouro`),
476
478
  })));
479
+ const mailboxUrl = this.mailboxServer?.origin ?? "http://127.0.0.1:0";
477
480
  return {
478
481
  overview: {
479
482
  daemon: "running",
480
483
  health: workers.every((worker) => worker.status === "running") ? "ok" : "warn",
481
484
  socketPath: this.socketPath,
482
- outlookUrl: this.outlookServer?.origin ?? "http://127.0.0.1:0",
485
+ mailboxUrl,
486
+ outlookUrl: mailboxUrl,
483
487
  ...(0, runtime_metadata_1.getRuntimeMetadata)(),
484
488
  workerCount: workers.length,
485
489
  senseCount: senses.length,
@@ -620,18 +624,18 @@ class OuroDaemon {
620
624
  await this.drainPendingBundleMessages();
621
625
  await this.drainPendingSenseMessages();
622
626
  // startInner is only reachable when this.server is null (guarded in
623
- // start()), and stop() nulls out this.outlookServer alongside this.server,
624
- // so outlookServer is guaranteed unset here — no need for a guard.
627
+ // start()), and stop() nulls out this.mailboxServer alongside this.server,
628
+ // so mailboxServer is guaranteed unset here — no need for a guard.
625
629
  try {
626
- this.outlookServer = await this.outlookServerFactory();
630
+ this.mailboxServer = await this.mailboxServerFactory();
627
631
  }
628
632
  catch (error) {
629
633
  (0, runtime_1.emitNervesEvent)({
630
634
  level: "warn",
631
635
  component: "daemon",
632
- event: "daemon.outlook_start_failed",
633
- message: `Outlook server failed to start: ${String(error)}`,
634
- meta: { port: outlook_types_1.OUTLOOK_DEFAULT_PORT },
636
+ event: "daemon.mailbox_start_failed",
637
+ message: `Mailbox server failed to start: ${String(error)}`,
638
+ meta: { port: mailbox_types_1.MAILBOX_DEFAULT_PORT },
635
639
  });
636
640
  }
637
641
  }
@@ -906,6 +910,7 @@ class OuroDaemon {
906
910
  (0, update_checker_1.stopUpdateChecker)();
907
911
  (0, mcp_manager_1.shutdownSharedMcpManager)();
908
912
  this.scheduler.stop?.();
913
+ this.healthMonitor.stopPeriodicChecks?.();
909
914
  if (this.senseAutostartTimer) {
910
915
  clearTimeout(this.senseAutostartTimer);
911
916
  this.senseAutostartTimer = null;
@@ -945,9 +950,9 @@ class OuroDaemon {
945
950
  this.server.close();
946
951
  this.server = null;
947
952
  }
948
- if (this.outlookServer) {
949
- await this.outlookServer.stop();
950
- this.outlookServer = null;
953
+ if (this.mailboxServer) {
954
+ await this.mailboxServer.stop();
955
+ this.mailboxServer = null;
951
956
  }
952
957
  const socketPathExists = fs.existsSync(this.socketPath);
953
958
  const currentSocketIdentity = socketPathExists ? readSocketIdentity(this.socketPath) : null;
@@ -1022,6 +1027,7 @@ class OuroDaemon {
1022
1027
  return { ok: true, message: "daemon started" };
1023
1028
  case "daemon.stop":
1024
1029
  await this.stop();
1030
+ this.onStopCommandComplete?.();
1025
1031
  return { ok: true, message: "daemon stopped" };
1026
1032
  case "daemon.status": {
1027
1033
  const data = this.buildStatusPayload();
@@ -33,34 +33,34 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.createOutlookHttpReadHooks = createOutlookHttpReadHooks;
36
+ exports.createMailboxHttpReadHooks = createMailboxHttpReadHooks;
37
37
  const path = __importStar(require("path"));
38
- const outlook_read_1 = require("./outlook-read");
39
- function createOutlookHttpReadHooks(options) {
38
+ const mailbox_read_1 = require("./mailbox-read");
39
+ function createMailboxHttpReadHooks(options) {
40
40
  const bundlesRoot = options.bundlesRoot;
41
41
  const readOptions = bundlesRoot ? { bundlesRoot } : undefined;
42
42
  const agentRoot = (agentName) => path.join(bundlesRoot ?? "", `${agentName}.ouro`);
43
43
  return {
44
44
  agentRoot,
45
- readAgentSessions: options.readAgentSessions ?? ((agentName) => (0, outlook_read_1.readSessionInventory)(agentName, readOptions)),
46
- readAgentTranscript: options.readAgentTranscript ?? ((agentName, friendId, channel, key) => (0, outlook_read_1.readSessionTranscript)(agentName, friendId, channel, key, readOptions)),
47
- readAgentCoding: options.readAgentCoding ?? ((agentName) => (0, outlook_read_1.readCodingDeep)(agentRoot(agentName))),
48
- readAgentAttention: options.readAgentAttention ?? ((agentName) => (0, outlook_read_1.readAttentionView)(agentName, readOptions)),
49
- readAgentBridges: options.readAgentBridges ?? ((agentName) => (0, outlook_read_1.readBridgeInventory)(agentRoot(agentName))),
50
- readAgentNotes: options.readAgentNotes ?? ((agentName) => (0, outlook_read_1.readNotesView)(agentRoot(agentName))),
51
- readAgentFriends: options.readAgentFriends ?? ((agentName) => (0, outlook_read_1.readFriendView)(agentName, readOptions)),
52
- readAgentContinuity: options.readAgentContinuity ?? ((agentName) => (0, outlook_read_1.readOutlookContinuity)(agentRoot(agentName), agentName)),
53
- readAgentOrientation: options.readAgentOrientation ?? ((agentName) => (0, outlook_read_1.readOrientationView)(agentRoot(agentName), agentName)),
54
- readAgentObligations: options.readAgentObligations ?? ((agentName) => (0, outlook_read_1.readObligationDetailView)(agentRoot(agentName))),
55
- readAgentChanges: options.readAgentChanges ?? ((agentName) => (0, outlook_read_1.readChangesView)(agentRoot(agentName))),
56
- readAgentSelfFix: options.readAgentSelfFix ?? ((agentName) => (0, outlook_read_1.readSelfFixView)(agentRoot(agentName))),
57
- readAgentNoteDecisions: options.readAgentNoteDecisions ?? ((agentName) => (0, outlook_read_1.readNoteDecisionView)(agentRoot(agentName))),
58
- readAgentHabits: options.readAgentHabits ?? ((agentName) => (0, outlook_read_1.readHabitView)(agentRoot(agentName))),
59
- readAgentMail: options.readAgentMail ?? ((agentName) => (0, outlook_read_1.readMailView)(agentName)),
60
- readAgentMailMessage: options.readAgentMailMessage ?? ((agentName, messageId) => (0, outlook_read_1.readMailMessageView)(agentName, messageId)),
61
- readDaemonHealth: options.readDaemonHealth ?? (() => (0, outlook_read_1.readDaemonHealthDeep)(options.healthPath)),
62
- readLogs: options.readLogs ?? (() => (0, outlook_read_1.readLogView)(options.logPath ?? null)),
63
- readDeskPrefs: (agentName) => (0, outlook_read_1.readDeskPrefs)(agentRoot(agentName)),
64
- readNeedsMe: (agentName) => (0, outlook_read_1.readNeedsMeView)(agentName, readOptions),
45
+ readAgentSessions: options.readAgentSessions ?? ((agentName) => (0, mailbox_read_1.readSessionInventory)(agentName, readOptions)),
46
+ readAgentTranscript: options.readAgentTranscript ?? ((agentName, friendId, channel, key) => (0, mailbox_read_1.readSessionTranscript)(agentName, friendId, channel, key, readOptions)),
47
+ readAgentCoding: options.readAgentCoding ?? ((agentName) => (0, mailbox_read_1.readCodingDeep)(agentRoot(agentName))),
48
+ readAgentAttention: options.readAgentAttention ?? ((agentName) => (0, mailbox_read_1.readAttentionView)(agentName, readOptions)),
49
+ readAgentBridges: options.readAgentBridges ?? ((agentName) => (0, mailbox_read_1.readBridgeInventory)(agentRoot(agentName))),
50
+ readAgentNotes: options.readAgentNotes ?? ((agentName) => (0, mailbox_read_1.readNotesView)(agentRoot(agentName))),
51
+ readAgentFriends: options.readAgentFriends ?? ((agentName) => (0, mailbox_read_1.readFriendView)(agentName, readOptions)),
52
+ readAgentContinuity: options.readAgentContinuity ?? ((agentName) => (0, mailbox_read_1.readMailboxContinuity)(agentRoot(agentName), agentName)),
53
+ readAgentOrientation: options.readAgentOrientation ?? ((agentName) => (0, mailbox_read_1.readOrientationView)(agentRoot(agentName), agentName)),
54
+ readAgentObligations: options.readAgentObligations ?? ((agentName) => (0, mailbox_read_1.readObligationDetailView)(agentRoot(agentName))),
55
+ readAgentChanges: options.readAgentChanges ?? ((agentName) => (0, mailbox_read_1.readChangesView)(agentRoot(agentName))),
56
+ readAgentSelfFix: options.readAgentSelfFix ?? ((agentName) => (0, mailbox_read_1.readSelfFixView)(agentRoot(agentName))),
57
+ readAgentNoteDecisions: options.readAgentNoteDecisions ?? ((agentName) => (0, mailbox_read_1.readNoteDecisionView)(agentRoot(agentName))),
58
+ readAgentHabits: options.readAgentHabits ?? ((agentName) => (0, mailbox_read_1.readHabitView)(agentRoot(agentName))),
59
+ readAgentMail: options.readAgentMail ?? ((agentName) => (0, mailbox_read_1.readMailView)(agentName)),
60
+ readAgentMailMessage: options.readAgentMailMessage ?? ((agentName, messageId) => (0, mailbox_read_1.readMailMessageView)(agentName, messageId)),
61
+ readDaemonHealth: options.readDaemonHealth ?? (() => (0, mailbox_read_1.readDaemonHealthDeep)(options.healthPath)),
62
+ readLogs: options.readLogs ?? (() => (0, mailbox_read_1.readLogView)(options.logPath ?? null)),
63
+ readDeskPrefs: (agentName) => (0, mailbox_read_1.readDeskPrefs)(agentRoot(agentName)),
64
+ readNeedsMe: (agentName) => (0, mailbox_read_1.readNeedsMeView)(agentName, readOptions),
65
65
  };
66
66
  }