@alook/daemon 0.1.40 → 0.1.42

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 (3) hide show
  1. package/dist/cli/index.js +337 -277
  2. package/dist/index.js +164 -113
  3. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -10072,7 +10072,7 @@ var DEFAULT_TURN_SILENCE_POLICY = {
10072
10072
  normalBudgetMs: 360000
10073
10073
  };
10074
10074
  var DEFAULT_IDLE_TIMEOUT_MS = 30 * 60 * 1000;
10075
- var DEFAULT_IDLE_RESET_TIMEOUT_MS = 6 * 60 * 60 * 1000;
10075
+ var DEFAULT_IDLE_RESET_TIMEOUT_MS = 3 * 60 * 60 * 1000;
10076
10076
  var DEFAULT_RESET_STUCK_THRESHOLD_MS = 120000;
10077
10077
  var DEFAULT_STOPPING_STUCK_THRESHOLD_MS = 30000;
10078
10078
  function createInitialManagerState(staleThresholdMs = DEFAULT_STALE_THRESHOLD_MS, idleTimeoutMs = DEFAULT_IDLE_TIMEOUT_MS, resetStuckThresholdMs = DEFAULT_RESET_STUCK_THRESHOLD_MS, stoppingStuckThresholdMs = DEFAULT_STOPPING_STUCK_THRESHOLD_MS, idleResetTimeoutMs = DEFAULT_IDLE_RESET_TIMEOUT_MS) {
@@ -10184,22 +10184,6 @@ function reduceManager(state, event) {
10184
10184
  a.stalledSessionId = null;
10185
10185
  a.idleSince = null;
10186
10186
  });
10187
- case "idle_reset_committed": {
10188
- const existing = state.agents[event.agentId];
10189
- if (!existing)
10190
- return { state, effects: [] };
10191
- const agent = clone(existing);
10192
- agent.sessionId = null;
10193
- agent.stalledSessionId = null;
10194
- agent.idleSince = null;
10195
- if (agent.status !== "running")
10196
- return commit(state, agent, []);
10197
- agent.status = "stopping";
10198
- agent.stoppingSince = event.nowMs;
10199
- return commit(state, agent, [
10200
- { type: "stop", agentId: event.agentId, reason: "idle_session_reset" }
10201
- ]);
10202
- }
10203
10187
  case "begin_reset":
10204
10188
  if (!state.agents[event.agentId])
10205
10189
  return { state, effects: [] };
@@ -10610,7 +10594,8 @@ function onTick(state, nowMs) {
10610
10594
  }
10611
10595
  const idleResetEligible = a.idleSince !== null && a.sessionId !== null && a.inbox.length === 0 && a.pendingAdmissions.length === 0 && !a.resetting && state.idleResetTimeoutMs > 0 && Number.isFinite(state.idleResetTimeoutMs) && (a.status === "idle" && lease.state === "detached" || a.status === "running" && lease.state === "none" && lease.lastTerminal !== null);
10612
10596
  if (idleResetEligible && nowMs - a.idleSince >= state.idleResetTimeoutMs) {
10613
- effects.push({ type: "reset_idle_session", agentId: id, sessionId: a.sessionId });
10597
+ agents[id] = { ...a, idleSince: nowMs };
10598
+ effects.push({ type: "maintain_idle_memory", agentId: id, sessionId: a.sessionId });
10614
10599
  continue;
10615
10600
  }
10616
10601
  const idleEligible = a.status === "running" && lease.state === "none" && a.pendingAdmissions.length === 0 && lease.lastTerminal !== null && a.inbox.length === 0 && state.idleTimeoutMs > 0 && Number.isFinite(state.idleTimeoutMs);
@@ -10723,6 +10708,18 @@ function withAgent(state, agentId, make, effects) {
10723
10708
  const agent = make(state.agents[agentId]);
10724
10709
  return { state: { ...state, agents: { ...state.agents, [agentId]: agent } }, effects };
10725
10710
  }
10711
+ // src/manager/memoryMaintenancePrompt.ts
10712
+ var MEMORY_MAINTENANCE_PROMPT = `The daemon is preparing to reset this idle session. First, clean up your memory so the next session does not inherit incorrect or outdated notes.
10713
+
10714
+ 1. Consistency: Read memory.md and experiences. Merge duplicates and resolve conflicting notes against original decisions. Check links.
10715
+ 2. Facts: Verify claims, especially work progress, against the latest original records. Search the context timeline and task discussions through their latest outcomes. Correct outdated or unsupported claims; keep uncertainty explicit.
10716
+ 3. Durability: Keep only lasting facts, preferences, and reusable lessons or procedures. Remove task status, milestones, temporary plans, and diaries; extract a reusable lesson only when useful. Keep memory.md brief with links; put procedures, scope, and reasons in experiences. Reason from first principles: distill specific events into underlying causes, constraints, and reusable principles. Omit incidental dates and details; retain context only when it changes the principle’s validity or scope.
10717
+
10718
+ Edit only your own memory files.
10719
+
10720
+ If new work arrives, handle it first and defer nap. Otherwise, after completing the review and any needed edits, your final action is to run the following command without --handoff. Do not finish with only a written reply. This instruction authorizes that nap:
10721
+
10722
+ $ALOOK_CLI nap`;
10726
10723
  // src/runtimeConfig.ts
10727
10724
  function toAgentBackendSelection(config) {
10728
10725
  return toBuiltinBackendSelection(config);
@@ -10816,7 +10813,7 @@ function cliCommandsSection() {
10816
10813
  "",
10817
10814
  "### Context Lifecycle",
10818
10815
  "",
10819
- `1. \`${CLI} nap --handoff <file>\` — reset the current session from a required handoff file.`,
10816
+ `1. \`${CLI} nap [--handoff <file>]\` — reset the current session; optionally wake a fresh session with a handoff file.`,
10820
10817
  "",
10821
10818
  "### Output format",
10822
10819
  "",
@@ -11037,7 +11034,7 @@ function workspaceMemorySection(config) {
11037
11034
  "",
11038
11035
  "### Napping",
11039
11036
  "",
11040
- `\`${CLI} nap\` resets your current session and starts a fresh one with your required handoff ` + "injected into it. Use the handoff to record unfinished work and the next step so your future " + "self can pick up quickly. Never nap on your own; only do it when someone explicitly asks.",
11037
+ `\`${CLI} nap\` resets your current session. With optional --handoff <file>, it starts a fresh one ` + "with your note injected; without it, the next real message starts fresh. Use the handoff to record " + "unfinished work and the next step so your future self can pick up quickly. " + "Never nap on your own; only do it when someone explicitly asks.",
11041
11038
  "",
11042
11039
  "### memory.md",
11043
11040
  "",
@@ -11642,8 +11639,15 @@ class AgentProcessManager {
11642
11639
  this.opts.timeline?.fenceSession(agentId);
11643
11640
  this.abortCurrentTurn(agentId, opts.abortCause);
11644
11641
  this.markResetting(agentId);
11642
+ const previousOwner = this.activeSpawnState.get(agentId);
11643
+ if (opts.forgetSession && previousOwner)
11644
+ previousOwner.discardEvents = true;
11645
11645
  const status = this.state.agents[agentId]?.status;
11646
11646
  if (status === "idle") {
11647
+ if (opts.rewakePrompt === undefined) {
11648
+ this.dispatch({ type: "exit", agentId });
11649
+ return;
11650
+ }
11647
11651
  try {
11648
11652
  this.deliver(agentId, {
11649
11653
  id: `${opts.launchId}:${opts.abortCause}:rewake`,
@@ -11659,11 +11663,16 @@ class AgentProcessManager {
11659
11663
  }
11660
11664
  return;
11661
11665
  }
11662
- this.enqueueRewake(agentId, {
11663
- id: `${opts.launchId}:${opts.abortCause}:rewake`,
11664
- text: opts.rewakePrompt
11665
- });
11666
+ if (opts.rewakePrompt !== undefined) {
11667
+ this.enqueueRewake(agentId, {
11668
+ id: `${opts.launchId}:${opts.abortCause}:rewake`,
11669
+ text: opts.rewakePrompt
11670
+ });
11671
+ }
11672
+ const previousSession = previousOwner?.session ?? this.sessions.get(agentId);
11666
11673
  await this.stop(agentId);
11674
+ if (opts.rewakePrompt === undefined && previousSession)
11675
+ await previousSession.closed;
11667
11676
  }
11668
11677
  async switchModel(agentId, opts) {
11669
11678
  await this.restartAgent(agentId, {
@@ -12205,44 +12214,13 @@ ${this.opts.wakePromptFooter}` : text;
12205
12214
  mode: effect.mode
12206
12215
  });
12207
12216
  break;
12208
- case "reset_idle_session": {
12209
- const spawnState = this.activeSpawnState.get(effect.agentId);
12210
- const completion = {
12211
- eventId: `bae_${randomUUID6()}`,
12212
- occurredAt: new Date(this.now()).toISOString()
12213
- };
12214
- const persisted = this.forgetSession(effect.agentId, "reset_session", effect.sessionId, completion);
12215
- if (!persisted) {
12216
- this.log.error("idle session reset barrier was not persisted; reset deferred", {
12217
- agentId: effect.agentId,
12218
- sessionId: effect.sessionId
12219
- });
12220
- this.emitErrorAudit(effect.agentId, "reset", "resume_control_update_failed", "Idle session reset deferred because resume control could not be persisted");
12217
+ case "maintain_idle_memory": {
12218
+ const agent = this.state.agents[effect.agentId];
12219
+ if (!agent || agent.sessionId !== effect.sessionId || agent.resetting || agent.idleSince === null)
12221
12220
  break;
12222
- }
12223
- if (spawnState)
12224
- spawnState.discardEvents = true;
12225
- this.dispatch({ type: "idle_reset_committed", agentId: effect.agentId, nowMs: this.now() });
12226
- if (this.opts.onBotAuditEvent) {
12227
- try {
12228
- this.opts.onBotAuditEvent(effect.agentId, {
12229
- kind: "session_reset",
12230
- payload: { trigger: "idle_timeout" }
12231
- }, {
12232
- sessionId: null,
12233
- launchId: null,
12234
- ...completion
12235
- });
12236
- } catch (err) {
12237
- this.log.debug("audit emit failed (idle session reset)", {
12238
- agentId: effect.agentId,
12239
- err: String(err)
12240
- });
12241
- }
12242
- }
12243
- this.log.info("idle agent session reset", {
12244
- agentId: effect.agentId,
12245
- sessionId: effect.sessionId
12221
+ this.deliver(effect.agentId, {
12222
+ id: `${effect.agentId}:memory-maintenance:${randomUUID6()}`,
12223
+ text: MEMORY_MAINTENANCE_PROMPT
12246
12224
  });
12247
12225
  break;
12248
12226
  }
@@ -32253,7 +32231,7 @@ __export(exports_community_machine_schema, {
32253
32231
  DIAGNOSTIC_REPORT_FAILURE_CODES: () => DIAGNOSTIC_REPORT_FAILURE_CODES
32254
32232
  });
32255
32233
 
32256
- // ../../node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare+workers-types@5.20260917.1_@opentelemetry+api@1.9.1_@typ_1b798b4b1340f6ee3490e576ed92ace8/node_modules/drizzle-orm/entity.js
32234
+ // ../../node_modules/.pnpm/drizzle-orm@0.45.3_@cloudflare+workers-types@5.20260924.1_@opentelemetry+api@1.9.1_@typ_49048b3d7117d2a8abc613de6d00d564/node_modules/drizzle-orm/entity.js
32257
32235
  var entityKind = Symbol.for("drizzle:entityKind");
32258
32236
  var hasOwnEntityKind = Symbol.for("drizzle:hasOwnEntityKind");
32259
32237
  function is(value, type) {
@@ -32278,7 +32256,7 @@ function is(value, type) {
32278
32256
  return false;
32279
32257
  }
32280
32258
 
32281
- // ../../node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare+workers-types@5.20260917.1_@opentelemetry+api@1.9.1_@typ_1b798b4b1340f6ee3490e576ed92ace8/node_modules/drizzle-orm/column.js
32259
+ // ../../node_modules/.pnpm/drizzle-orm@0.45.3_@cloudflare+workers-types@5.20260924.1_@opentelemetry+api@1.9.1_@typ_49048b3d7117d2a8abc613de6d00d564/node_modules/drizzle-orm/column.js
32282
32260
  class Column {
32283
32261
  constructor(table, config2) {
32284
32262
  this.table = table;
@@ -32328,7 +32306,7 @@ class Column {
32328
32306
  }
32329
32307
  }
32330
32308
 
32331
- // ../../node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare+workers-types@5.20260917.1_@opentelemetry+api@1.9.1_@typ_1b798b4b1340f6ee3490e576ed92ace8/node_modules/drizzle-orm/column-builder.js
32309
+ // ../../node_modules/.pnpm/drizzle-orm@0.45.3_@cloudflare+workers-types@5.20260924.1_@opentelemetry+api@1.9.1_@typ_49048b3d7117d2a8abc613de6d00d564/node_modules/drizzle-orm/column-builder.js
32332
32310
  class ColumnBuilder {
32333
32311
  static [entityKind] = "ColumnBuilder";
32334
32312
  config;
@@ -32384,20 +32362,20 @@ class ColumnBuilder {
32384
32362
  }
32385
32363
  }
32386
32364
 
32387
- // ../../node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare+workers-types@5.20260917.1_@opentelemetry+api@1.9.1_@typ_1b798b4b1340f6ee3490e576ed92ace8/node_modules/drizzle-orm/table.utils.js
32365
+ // ../../node_modules/.pnpm/drizzle-orm@0.45.3_@cloudflare+workers-types@5.20260924.1_@opentelemetry+api@1.9.1_@typ_49048b3d7117d2a8abc613de6d00d564/node_modules/drizzle-orm/table.utils.js
32388
32366
  var TableName = Symbol.for("drizzle:Name");
32389
32367
 
32390
- // ../../node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare+workers-types@5.20260917.1_@opentelemetry+api@1.9.1_@typ_1b798b4b1340f6ee3490e576ed92ace8/node_modules/drizzle-orm/tracing-utils.js
32368
+ // ../../node_modules/.pnpm/drizzle-orm@0.45.3_@cloudflare+workers-types@5.20260924.1_@opentelemetry+api@1.9.1_@typ_49048b3d7117d2a8abc613de6d00d564/node_modules/drizzle-orm/tracing-utils.js
32391
32369
  function iife(fn, ...args) {
32392
32370
  return fn(...args);
32393
32371
  }
32394
32372
 
32395
- // ../../node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare+workers-types@5.20260917.1_@opentelemetry+api@1.9.1_@typ_1b798b4b1340f6ee3490e576ed92ace8/node_modules/drizzle-orm/pg-core/unique-constraint.js
32373
+ // ../../node_modules/.pnpm/drizzle-orm@0.45.3_@cloudflare+workers-types@5.20260924.1_@opentelemetry+api@1.9.1_@typ_49048b3d7117d2a8abc613de6d00d564/node_modules/drizzle-orm/pg-core/unique-constraint.js
32396
32374
  function uniqueKeyName(table, columns) {
32397
32375
  return `${table[TableName]}_${columns.join("_")}_unique`;
32398
32376
  }
32399
32377
 
32400
- // ../../node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare+workers-types@5.20260917.1_@opentelemetry+api@1.9.1_@typ_1b798b4b1340f6ee3490e576ed92ace8/node_modules/drizzle-orm/pg-core/columns/common.js
32378
+ // ../../node_modules/.pnpm/drizzle-orm@0.45.3_@cloudflare+workers-types@5.20260924.1_@opentelemetry+api@1.9.1_@typ_49048b3d7117d2a8abc613de6d00d564/node_modules/drizzle-orm/pg-core/columns/common.js
32401
32379
  class PgColumn extends Column {
32402
32380
  constructor(table, config2) {
32403
32381
  if (!config2.uniqueName) {
@@ -32446,7 +32424,7 @@ class ExtraConfigColumn extends PgColumn {
32446
32424
  }
32447
32425
  }
32448
32426
 
32449
- // ../../node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare+workers-types@5.20260917.1_@opentelemetry+api@1.9.1_@typ_1b798b4b1340f6ee3490e576ed92ace8/node_modules/drizzle-orm/pg-core/columns/enum.js
32427
+ // ../../node_modules/.pnpm/drizzle-orm@0.45.3_@cloudflare+workers-types@5.20260924.1_@opentelemetry+api@1.9.1_@typ_49048b3d7117d2a8abc613de6d00d564/node_modules/drizzle-orm/pg-core/columns/enum.js
32450
32428
  class PgEnumObjectColumn extends PgColumn {
32451
32429
  static [entityKind] = "PgEnumObjectColumn";
32452
32430
  enum;
@@ -32476,7 +32454,7 @@ class PgEnumColumn extends PgColumn {
32476
32454
  }
32477
32455
  }
32478
32456
 
32479
- // ../../node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare+workers-types@5.20260917.1_@opentelemetry+api@1.9.1_@typ_1b798b4b1340f6ee3490e576ed92ace8/node_modules/drizzle-orm/subquery.js
32457
+ // ../../node_modules/.pnpm/drizzle-orm@0.45.3_@cloudflare+workers-types@5.20260924.1_@opentelemetry+api@1.9.1_@typ_49048b3d7117d2a8abc613de6d00d564/node_modules/drizzle-orm/subquery.js
32480
32458
  class Subquery {
32481
32459
  static [entityKind] = "Subquery";
32482
32460
  constructor(sql, fields, alias, isWith = false, usedTables = []) {
@@ -32491,10 +32469,10 @@ class Subquery {
32491
32469
  }
32492
32470
  }
32493
32471
 
32494
- // ../../node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare+workers-types@5.20260917.1_@opentelemetry+api@1.9.1_@typ_1b798b4b1340f6ee3490e576ed92ace8/node_modules/drizzle-orm/version.js
32495
- var version2 = "0.45.2";
32472
+ // ../../node_modules/.pnpm/drizzle-orm@0.45.3_@cloudflare+workers-types@5.20260924.1_@opentelemetry+api@1.9.1_@typ_49048b3d7117d2a8abc613de6d00d564/node_modules/drizzle-orm/version.js
32473
+ var version2 = "0.45.3";
32496
32474
 
32497
- // ../../node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare+workers-types@5.20260917.1_@opentelemetry+api@1.9.1_@typ_1b798b4b1340f6ee3490e576ed92ace8/node_modules/drizzle-orm/tracing.js
32475
+ // ../../node_modules/.pnpm/drizzle-orm@0.45.3_@cloudflare+workers-types@5.20260924.1_@opentelemetry+api@1.9.1_@typ_49048b3d7117d2a8abc613de6d00d564/node_modules/drizzle-orm/tracing.js
32498
32476
  var otel;
32499
32477
  var rawTracer;
32500
32478
  var tracer = {
@@ -32521,10 +32499,10 @@ var tracer = {
32521
32499
  }
32522
32500
  };
32523
32501
 
32524
- // ../../node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare+workers-types@5.20260917.1_@opentelemetry+api@1.9.1_@typ_1b798b4b1340f6ee3490e576ed92ace8/node_modules/drizzle-orm/view-common.js
32502
+ // ../../node_modules/.pnpm/drizzle-orm@0.45.3_@cloudflare+workers-types@5.20260924.1_@opentelemetry+api@1.9.1_@typ_49048b3d7117d2a8abc613de6d00d564/node_modules/drizzle-orm/view-common.js
32525
32503
  var ViewBaseConfig = Symbol.for("drizzle:ViewBaseConfig");
32526
32504
 
32527
- // ../../node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare+workers-types@5.20260917.1_@opentelemetry+api@1.9.1_@typ_1b798b4b1340f6ee3490e576ed92ace8/node_modules/drizzle-orm/table.js
32505
+ // ../../node_modules/.pnpm/drizzle-orm@0.45.3_@cloudflare+workers-types@5.20260924.1_@opentelemetry+api@1.9.1_@typ_49048b3d7117d2a8abc613de6d00d564/node_modules/drizzle-orm/table.js
32528
32506
  var Schema = Symbol.for("drizzle:Schema");
32529
32507
  var Columns = Symbol.for("drizzle:Columns");
32530
32508
  var ExtraConfigColumns = Symbol.for("drizzle:ExtraConfigColumns");
@@ -32562,7 +32540,7 @@ class Table {
32562
32540
  }
32563
32541
  }
32564
32542
 
32565
- // ../../node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare+workers-types@5.20260917.1_@opentelemetry+api@1.9.1_@typ_1b798b4b1340f6ee3490e576ed92ace8/node_modules/drizzle-orm/sql/sql.js
32543
+ // ../../node_modules/.pnpm/drizzle-orm@0.45.3_@cloudflare+workers-types@5.20260924.1_@opentelemetry+api@1.9.1_@typ_49048b3d7117d2a8abc613de6d00d564/node_modules/drizzle-orm/sql/sql.js
32566
32544
  function isSQLWrapper(value) {
32567
32545
  return value !== null && value !== undefined && typeof value.getSQL === "function";
32568
32546
  }
@@ -32925,7 +32903,7 @@ Subquery.prototype.getSQL = function() {
32925
32903
  return new SQL([this]);
32926
32904
  };
32927
32905
 
32928
- // ../../node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare+workers-types@5.20260917.1_@opentelemetry+api@1.9.1_@typ_1b798b4b1340f6ee3490e576ed92ace8/node_modules/drizzle-orm/alias.js
32906
+ // ../../node_modules/.pnpm/drizzle-orm@0.45.3_@cloudflare+workers-types@5.20260924.1_@opentelemetry+api@1.9.1_@typ_49048b3d7117d2a8abc613de6d00d564/node_modules/drizzle-orm/alias.js
32929
32907
  class ColumnAliasProxyHandler {
32930
32908
  constructor(table) {
32931
32909
  this.table = table;
@@ -32981,12 +32959,12 @@ class TableAliasProxyHandler {
32981
32959
  }
32982
32960
  }
32983
32961
 
32984
- // ../../node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare+workers-types@5.20260917.1_@opentelemetry+api@1.9.1_@typ_1b798b4b1340f6ee3490e576ed92ace8/node_modules/drizzle-orm/sqlite-core/alias.js
32962
+ // ../../node_modules/.pnpm/drizzle-orm@0.45.3_@cloudflare+workers-types@5.20260924.1_@opentelemetry+api@1.9.1_@typ_49048b3d7117d2a8abc613de6d00d564/node_modules/drizzle-orm/sqlite-core/alias.js
32985
32963
  function alias(table, alias2) {
32986
32964
  return new Proxy(table, new TableAliasProxyHandler(alias2, false));
32987
32965
  }
32988
32966
 
32989
- // ../../node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare+workers-types@5.20260917.1_@opentelemetry+api@1.9.1_@typ_1b798b4b1340f6ee3490e576ed92ace8/node_modules/drizzle-orm/sqlite-core/checks.js
32967
+ // ../../node_modules/.pnpm/drizzle-orm@0.45.3_@cloudflare+workers-types@5.20260924.1_@opentelemetry+api@1.9.1_@typ_49048b3d7117d2a8abc613de6d00d564/node_modules/drizzle-orm/sqlite-core/checks.js
32990
32968
  class CheckBuilder {
32991
32969
  constructor(name, value) {
32992
32970
  this.name = name;
@@ -33013,7 +32991,7 @@ function check2(name, value) {
33013
32991
  return new CheckBuilder(name, value);
33014
32992
  }
33015
32993
 
33016
- // ../../node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare+workers-types@5.20260917.1_@opentelemetry+api@1.9.1_@typ_1b798b4b1340f6ee3490e576ed92ace8/node_modules/drizzle-orm/utils.js
32994
+ // ../../node_modules/.pnpm/drizzle-orm@0.45.3_@cloudflare+workers-types@5.20260924.1_@opentelemetry+api@1.9.1_@typ_49048b3d7117d2a8abc613de6d00d564/node_modules/drizzle-orm/utils.js
33017
32995
  function getColumnNameAndConfig(a, b) {
33018
32996
  return {
33019
32997
  name: typeof a === "string" && a.length > 0 ? a : "",
@@ -33022,7 +33000,7 @@ function getColumnNameAndConfig(a, b) {
33022
33000
  }
33023
33001
  var textDecoder = typeof TextDecoder === "undefined" ? null : new TextDecoder;
33024
33002
 
33025
- // ../../node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare+workers-types@5.20260917.1_@opentelemetry+api@1.9.1_@typ_1b798b4b1340f6ee3490e576ed92ace8/node_modules/drizzle-orm/sqlite-core/foreign-keys.js
33003
+ // ../../node_modules/.pnpm/drizzle-orm@0.45.3_@cloudflare+workers-types@5.20260924.1_@opentelemetry+api@1.9.1_@typ_49048b3d7117d2a8abc613de6d00d564/node_modules/drizzle-orm/sqlite-core/foreign-keys.js
33026
33004
  class ForeignKeyBuilder {
33027
33005
  static [entityKind] = "SQLiteForeignKeyBuilder";
33028
33006
  reference;
@@ -33090,7 +33068,7 @@ function foreignKey(config2) {
33090
33068
  return new ForeignKeyBuilder(mappedConfig);
33091
33069
  }
33092
33070
 
33093
- // ../../node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare+workers-types@5.20260917.1_@opentelemetry+api@1.9.1_@typ_1b798b4b1340f6ee3490e576ed92ace8/node_modules/drizzle-orm/sqlite-core/unique-constraint.js
33071
+ // ../../node_modules/.pnpm/drizzle-orm@0.45.3_@cloudflare+workers-types@5.20260924.1_@opentelemetry+api@1.9.1_@typ_49048b3d7117d2a8abc613de6d00d564/node_modules/drizzle-orm/sqlite-core/unique-constraint.js
33094
33072
  function uniqueKeyName2(table, columns) {
33095
33073
  return `${table[TableName]}_${columns.join("_")}_unique`;
33096
33074
  }
@@ -33135,7 +33113,7 @@ class UniqueConstraint {
33135
33113
  }
33136
33114
  }
33137
33115
 
33138
- // ../../node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare+workers-types@5.20260917.1_@opentelemetry+api@1.9.1_@typ_1b798b4b1340f6ee3490e576ed92ace8/node_modules/drizzle-orm/sqlite-core/columns/common.js
33116
+ // ../../node_modules/.pnpm/drizzle-orm@0.45.3_@cloudflare+workers-types@5.20260924.1_@opentelemetry+api@1.9.1_@typ_49048b3d7117d2a8abc613de6d00d564/node_modules/drizzle-orm/sqlite-core/columns/common.js
33139
33117
  class SQLiteColumnBuilder extends ColumnBuilder {
33140
33118
  static [entityKind] = "SQLiteColumnBuilder";
33141
33119
  foreignKeyConfigs = [];
@@ -33186,7 +33164,7 @@ class SQLiteColumn extends Column {
33186
33164
  static [entityKind] = "SQLiteColumn";
33187
33165
  }
33188
33166
 
33189
- // ../../node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare+workers-types@5.20260917.1_@opentelemetry+api@1.9.1_@typ_1b798b4b1340f6ee3490e576ed92ace8/node_modules/drizzle-orm/sqlite-core/columns/blob.js
33167
+ // ../../node_modules/.pnpm/drizzle-orm@0.45.3_@cloudflare+workers-types@5.20260924.1_@opentelemetry+api@1.9.1_@typ_49048b3d7117d2a8abc613de6d00d564/node_modules/drizzle-orm/sqlite-core/columns/blob.js
33190
33168
  class SQLiteBigIntBuilder extends SQLiteColumnBuilder {
33191
33169
  static [entityKind] = "SQLiteBigIntBuilder";
33192
33170
  constructor(name) {
@@ -33274,7 +33252,7 @@ function blob(a, b) {
33274
33252
  return new SQLiteBlobBufferBuilder(name);
33275
33253
  }
33276
33254
 
33277
- // ../../node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare+workers-types@5.20260917.1_@opentelemetry+api@1.9.1_@typ_1b798b4b1340f6ee3490e576ed92ace8/node_modules/drizzle-orm/sqlite-core/columns/custom.js
33255
+ // ../../node_modules/.pnpm/drizzle-orm@0.45.3_@cloudflare+workers-types@5.20260924.1_@opentelemetry+api@1.9.1_@typ_49048b3d7117d2a8abc613de6d00d564/node_modules/drizzle-orm/sqlite-core/columns/custom.js
33278
33256
  class SQLiteCustomColumnBuilder extends SQLiteColumnBuilder {
33279
33257
  static [entityKind] = "SQLiteCustomColumnBuilder";
33280
33258
  constructor(name, fieldConfig, customTypeParams) {
@@ -33315,7 +33293,7 @@ function customType(customTypeParams) {
33315
33293
  };
33316
33294
  }
33317
33295
 
33318
- // ../../node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare+workers-types@5.20260917.1_@opentelemetry+api@1.9.1_@typ_1b798b4b1340f6ee3490e576ed92ace8/node_modules/drizzle-orm/sqlite-core/columns/integer.js
33296
+ // ../../node_modules/.pnpm/drizzle-orm@0.45.3_@cloudflare+workers-types@5.20260924.1_@opentelemetry+api@1.9.1_@typ_49048b3d7117d2a8abc613de6d00d564/node_modules/drizzle-orm/sqlite-core/columns/integer.js
33319
33297
  class SQLiteBaseIntegerBuilder extends SQLiteColumnBuilder {
33320
33298
  static [entityKind] = "SQLiteBaseIntegerBuilder";
33321
33299
  constructor(name, dataType, columnType) {
@@ -33417,7 +33395,7 @@ function integer2(a, b) {
33417
33395
  return new SQLiteIntegerBuilder(name);
33418
33396
  }
33419
33397
 
33420
- // ../../node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare+workers-types@5.20260917.1_@opentelemetry+api@1.9.1_@typ_1b798b4b1340f6ee3490e576ed92ace8/node_modules/drizzle-orm/sqlite-core/columns/numeric.js
33398
+ // ../../node_modules/.pnpm/drizzle-orm@0.45.3_@cloudflare+workers-types@5.20260924.1_@opentelemetry+api@1.9.1_@typ_49048b3d7117d2a8abc613de6d00d564/node_modules/drizzle-orm/sqlite-core/columns/numeric.js
33421
33399
  class SQLiteNumericBuilder extends SQLiteColumnBuilder {
33422
33400
  static [entityKind] = "SQLiteNumericBuilder";
33423
33401
  constructor(name) {
@@ -33487,7 +33465,7 @@ function numeric(a, b) {
33487
33465
  return mode === "number" ? new SQLiteNumericNumberBuilder(name) : mode === "bigint" ? new SQLiteNumericBigIntBuilder(name) : new SQLiteNumericBuilder(name);
33488
33466
  }
33489
33467
 
33490
- // ../../node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare+workers-types@5.20260917.1_@opentelemetry+api@1.9.1_@typ_1b798b4b1340f6ee3490e576ed92ace8/node_modules/drizzle-orm/sqlite-core/columns/real.js
33468
+ // ../../node_modules/.pnpm/drizzle-orm@0.45.3_@cloudflare+workers-types@5.20260924.1_@opentelemetry+api@1.9.1_@typ_49048b3d7117d2a8abc613de6d00d564/node_modules/drizzle-orm/sqlite-core/columns/real.js
33491
33469
  class SQLiteRealBuilder extends SQLiteColumnBuilder {
33492
33470
  static [entityKind] = "SQLiteRealBuilder";
33493
33471
  constructor(name) {
@@ -33508,7 +33486,7 @@ function real(name) {
33508
33486
  return new SQLiteRealBuilder(name ?? "");
33509
33487
  }
33510
33488
 
33511
- // ../../node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare+workers-types@5.20260917.1_@opentelemetry+api@1.9.1_@typ_1b798b4b1340f6ee3490e576ed92ace8/node_modules/drizzle-orm/sqlite-core/columns/text.js
33489
+ // ../../node_modules/.pnpm/drizzle-orm@0.45.3_@cloudflare+workers-types@5.20260924.1_@opentelemetry+api@1.9.1_@typ_49048b3d7117d2a8abc613de6d00d564/node_modules/drizzle-orm/sqlite-core/columns/text.js
33512
33490
  class SQLiteTextBuilder extends SQLiteColumnBuilder {
33513
33491
  static [entityKind] = "SQLiteTextBuilder";
33514
33492
  constructor(name, config2) {
@@ -33563,7 +33541,7 @@ function text(a, b = {}) {
33563
33541
  return new SQLiteTextBuilder(name, config2);
33564
33542
  }
33565
33543
 
33566
- // ../../node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare+workers-types@5.20260917.1_@opentelemetry+api@1.9.1_@typ_1b798b4b1340f6ee3490e576ed92ace8/node_modules/drizzle-orm/sqlite-core/columns/all.js
33544
+ // ../../node_modules/.pnpm/drizzle-orm@0.45.3_@cloudflare+workers-types@5.20260924.1_@opentelemetry+api@1.9.1_@typ_49048b3d7117d2a8abc613de6d00d564/node_modules/drizzle-orm/sqlite-core/columns/all.js
33567
33545
  function getSQLiteColumnBuilders() {
33568
33546
  return {
33569
33547
  blob,
@@ -33575,7 +33553,7 @@ function getSQLiteColumnBuilders() {
33575
33553
  };
33576
33554
  }
33577
33555
 
33578
- // ../../node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare+workers-types@5.20260917.1_@opentelemetry+api@1.9.1_@typ_1b798b4b1340f6ee3490e576ed92ace8/node_modules/drizzle-orm/sqlite-core/table.js
33556
+ // ../../node_modules/.pnpm/drizzle-orm@0.45.3_@cloudflare+workers-types@5.20260924.1_@opentelemetry+api@1.9.1_@typ_49048b3d7117d2a8abc613de6d00d564/node_modules/drizzle-orm/sqlite-core/table.js
33579
33557
  var InlineForeignKeys = Symbol.for("drizzle:SQLiteInlineForeignKeys");
33580
33558
 
33581
33559
  class SQLiteTable extends Table {
@@ -33609,7 +33587,7 @@ var sqliteTable = (name, columns, extraConfig) => {
33609
33587
  return sqliteTableBase(name, columns, extraConfig);
33610
33588
  };
33611
33589
 
33612
- // ../../node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare+workers-types@5.20260917.1_@opentelemetry+api@1.9.1_@typ_1b798b4b1340f6ee3490e576ed92ace8/node_modules/drizzle-orm/sqlite-core/indexes.js
33590
+ // ../../node_modules/.pnpm/drizzle-orm@0.45.3_@cloudflare+workers-types@5.20260924.1_@opentelemetry+api@1.9.1_@typ_49048b3d7117d2a8abc613de6d00d564/node_modules/drizzle-orm/sqlite-core/indexes.js
33613
33591
  class IndexBuilderOn {
33614
33592
  constructor(name, unique2) {
33615
33593
  this.name = name;
@@ -33655,7 +33633,7 @@ function uniqueIndex(name) {
33655
33633
  return new IndexBuilderOn(name, true);
33656
33634
  }
33657
33635
 
33658
- // ../../node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare+workers-types@5.20260917.1_@opentelemetry+api@1.9.1_@typ_1b798b4b1340f6ee3490e576ed92ace8/node_modules/drizzle-orm/sqlite-core/primary-keys.js
33636
+ // ../../node_modules/.pnpm/drizzle-orm@0.45.3_@cloudflare+workers-types@5.20260924.1_@opentelemetry+api@1.9.1_@typ_49048b3d7117d2a8abc613de6d00d564/node_modules/drizzle-orm/sqlite-core/primary-keys.js
33659
33637
  function primaryKey(...config2) {
33660
33638
  if (config2[0].columns) {
33661
33639
  return new PrimaryKeyBuilder(config2[0].columns, config2[0].name);
@@ -33690,7 +33668,7 @@ class PrimaryKey {
33690
33668
  }
33691
33669
  }
33692
33670
 
33693
- // ../../node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare+workers-types@5.20260917.1_@opentelemetry+api@1.9.1_@typ_1b798b4b1340f6ee3490e576ed92ace8/node_modules/drizzle-orm/sql/expressions/conditions.js
33671
+ // ../../node_modules/.pnpm/drizzle-orm@0.45.3_@cloudflare+workers-types@5.20260924.1_@opentelemetry+api@1.9.1_@typ_49048b3d7117d2a8abc613de6d00d564/node_modules/drizzle-orm/sql/expressions/conditions.js
33694
33672
  function bindIfParam(value, column) {
33695
33673
  if (isDriverValueEncoder(column) && !isSQLWrapper(value) && !is(value, Param) && !is(value, Placeholder) && !is(value, Column) && !is(value, Table) && !is(value, View)) {
33696
33674
  return new Param(value, column);
@@ -33718,7 +33696,7 @@ function isNotNull(value) {
33718
33696
  return sql`${value} is not null`;
33719
33697
  }
33720
33698
 
33721
- // ../../node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare+workers-types@5.20260917.1_@opentelemetry+api@1.9.1_@typ_1b798b4b1340f6ee3490e576ed92ace8/node_modules/drizzle-orm/sql/expressions/select.js
33699
+ // ../../node_modules/.pnpm/drizzle-orm@0.45.3_@cloudflare+workers-types@5.20260924.1_@opentelemetry+api@1.9.1_@typ_49048b3d7117d2a8abc613de6d00d564/node_modules/drizzle-orm/sql/expressions/select.js
33722
33700
  function desc(column) {
33723
33701
  return sql`${column} desc`;
33724
33702
  }
@@ -34846,7 +34824,7 @@ var HostCommandSchema = exports_external.discriminatedUnion("type", [
34846
34824
  agentId: exports_external.string().min(1),
34847
34825
  config: exports_external.unknown(),
34848
34826
  launchId: exports_external.string().min(1),
34849
- handoff: exports_external.string().min(1)
34827
+ handoff: exports_external.string().refine((value) => value.trim().length > 0).optional()
34850
34828
  }),
34851
34829
  exports_external.object({
34852
34830
  type: exports_external.literal("agent:model_switch"),
@@ -34937,7 +34915,15 @@ class UnknownRuntimeError extends Error {
34937
34915
  function defaultFormatUnreadNoticeText() {
34938
34916
  return "You have unread messages.";
34939
34917
  }
34940
- var REWAKE_PROMPT = "Your session was reset by your owner. Prior conversation context is gone. " + "Read @memory.md and your .context_timeline for durable context, then pull your inbox " + "before doing anything else. If it reports marked messages, run `$ALOOK_CLI message mark list` " + "and resume that outstanding work.";
34918
+ var REWAKE_PROMPT = `Your session was reset by your owner. Prior conversation context is gone. Read @memory.md and your .context_timeline for durable context, then pull your inbox. If it reports marked messages, run \`$ALOOK_CLI message mark list\` to identify outstanding work. Before continuing work, review memory.md and experiences:
34919
+
34920
+ 1. Consistency: Read memory.md and experiences. Merge duplicates and resolve conflicting notes against original decisions. Check links.
34921
+ 2. Facts: Verify claims, especially work progress, against the latest original records. Search the context timeline and task discussions through their latest outcomes. Correct outdated or unsupported claims; keep uncertainty explicit.
34922
+ 3. Durability: Keep only lasting facts, preferences, and reusable lessons or procedures. Remove task status, milestones, temporary plans, and diaries; extract a reusable lesson only when useful. Keep memory.md brief with links; put procedures, scope, and reasons in experiences. Reason from first principles: distill specific events into underlying causes, constraints, and reusable principles. Omit incidental dates and details; retain context only when it changes the principle’s validity or scope.
34923
+
34924
+ Edit only your own memory files.
34925
+
34926
+ After completing the review and any needed edits, resume outstanding work and handle your inbox messages.`;
34941
34927
  var MODEL_SWITCH_REWAKE_PROMPT = "You were just switched to a different model. Continue any unfinished work.";
34942
34928
  function buildNapRewakePrompt(handoff2) {
34943
34929
  return "You took a nap: you reset your own session, so prior conversation context " + `is gone. Before sleeping you left yourself this handoff —
@@ -35057,13 +35043,17 @@ class AgentRouter {
35057
35043
  } catch {}
35058
35044
  });
35059
35045
  }
35060
- async runRestartCommand(agentId, launchId, opName, run) {
35046
+ async runRestartCommand(agentId, launchId, opName, run, rewake = true) {
35061
35047
  this.log.info(`${opName} received`, { agentId, launchId });
35062
35048
  try {
35063
35049
  await this.opts.onBeforeAgent?.(agentId);
35064
35050
  await run();
35065
- this.running.add(agentId);
35066
- this.scheduleReadyFrameResend();
35051
+ if (rewake) {
35052
+ this.running.add(agentId);
35053
+ this.scheduleReadyFrameResend();
35054
+ } else {
35055
+ await this.opts.channel.reportStoppedAck?.({ agentId, launchId, status: "ok" });
35056
+ }
35067
35057
  this.log.info(`${opName} ok`, { agentId });
35068
35058
  } catch (err) {
35069
35059
  if (err instanceof UnknownRuntimeError) {
@@ -35241,9 +35231,9 @@ class AgentRouter {
35241
35231
  await this.runRestartCommand(cmd.agentId, cmd.launchId, "agent:nap", () => this.opts.manager.resetSession(cmd.agentId, {
35242
35232
  runtimeConfig: cmd.config,
35243
35233
  launchId: cmd.launchId,
35244
- rewakePrompt: buildNapRewakePrompt(cmd.handoff),
35234
+ rewakePrompt: cmd.handoff === undefined ? undefined : buildNapRewakePrompt(cmd.handoff),
35245
35235
  barrierType: "nap"
35246
- }));
35236
+ }), cmd.handoff !== undefined);
35247
35237
  break;
35248
35238
  case "agent:model_switch":
35249
35239
  await this.runRestartCommand(cmd.agentId, cmd.launchId, "agent:model_switch", () => this.opts.manager.switchModel(cmd.agentId, {
@@ -36092,6 +36082,66 @@ function writeStatusFile(path13, snapshot) {
36092
36082
  renameSync2(tmp, path13);
36093
36083
  } catch {}
36094
36084
  }
36085
+ // ../shared/src/community-attention.ts
36086
+ var id = exports_external.string().min(1);
36087
+ var AttentionScopeSchema = exports_external.strictObject({
36088
+ scopeId: id,
36089
+ channelId: id,
36090
+ serverId: id.nullable().optional(),
36091
+ parentChannelId: id.nullable().optional(),
36092
+ ordinaryUnread: exports_external.boolean(),
36093
+ lastUnreadSeq: exports_external.number().int().nonnegative(),
36094
+ lastAttentionSeq: exports_external.number().int().nonnegative().nullable().optional(),
36095
+ attentionCount: exports_external.number().int().nonnegative()
36096
+ });
36097
+ var AttentionItemSchema = exports_external.strictObject({
36098
+ id,
36099
+ kind: exports_external.enum(["mention", "reply", "friend_request"]),
36100
+ sourceId: id,
36101
+ scopeId: id.nullable().optional(),
36102
+ messageId: id.nullable().optional(),
36103
+ actorUserId: id,
36104
+ createdAt: exports_external.string()
36105
+ }).superRefine((item, ctx) => {
36106
+ if (item.kind === "friend_request") {
36107
+ if (item.scopeId != null || item.messageId != null) {
36108
+ ctx.addIssue({ code: "custom", message: "friend request cannot reference a scope or message" });
36109
+ }
36110
+ return;
36111
+ }
36112
+ if (!item.scopeId || !item.messageId) {
36113
+ ctx.addIssue({ code: "custom", message: "message attention requires scope and message refs" });
36114
+ }
36115
+ });
36116
+ var AttentionIncludedSchema = exports_external.strictObject({
36117
+ profiles: exports_external.array(exports_external.unknown()).optional(),
36118
+ messages: exports_external.array(exports_external.unknown()).optional()
36119
+ });
36120
+ var AccountAttentionSnapshotSchema = exports_external.strictObject({
36121
+ scopes: exports_external.array(AttentionScopeSchema),
36122
+ items: exports_external.array(AttentionItemSchema),
36123
+ limit: exports_external.number().int().positive(),
36124
+ truncated: exports_external.boolean(),
36125
+ included: AttentionIncludedSchema.optional()
36126
+ }).superRefine((snapshot, ctx) => {
36127
+ const scopeIds = new Set;
36128
+ for (const scope of snapshot.scopes) {
36129
+ if (scopeIds.has(scope.scopeId)) {
36130
+ ctx.addIssue({ code: "custom", message: `duplicate attention scope: ${scope.scopeId}` });
36131
+ }
36132
+ scopeIds.add(scope.scopeId);
36133
+ }
36134
+ const itemIds = new Set;
36135
+ for (const item of snapshot.items) {
36136
+ if (itemIds.has(item.id)) {
36137
+ ctx.addIssue({ code: "custom", message: `duplicate attention item: ${item.id}` });
36138
+ }
36139
+ itemIds.add(item.id);
36140
+ if (item.scopeId && !scopeIds.has(item.scopeId)) {
36141
+ ctx.addIssue({ code: "custom", message: `attention item references missing scope: ${item.scopeId}` });
36142
+ }
36143
+ }
36144
+ });
36095
36145
  // ../shared/src/constants/community.ts
36096
36146
  var MAX_FOLDER_NAME_LENGTH = 100;
36097
36147
  var MAX_PROFILE_NAME_LENGTH = 100;
@@ -36841,11 +36891,11 @@ var CommunityMachineRuntimeListSchema = exports_external.array(CommunityMachineR
36841
36891
  var CommunityRunningAgentListSchema = exports_external.array(exports_external.string()).transform((list) => {
36842
36892
  const seen = new Set;
36843
36893
  const out = [];
36844
- for (const id of list) {
36845
- if (seen.has(id))
36894
+ for (const id2 of list) {
36895
+ if (seen.has(id2))
36846
36896
  continue;
36847
- seen.add(id);
36848
- out.push(id);
36897
+ seen.add(id2);
36898
+ out.push(id2);
36849
36899
  }
36850
36900
  return out;
36851
36901
  });
@@ -37022,6 +37072,7 @@ var CommunityAgentSendRequestSchema = exports_external.object({
37022
37072
  attachments: exports_external.array(exports_external.string().min(1)).max(MAX_ATTACHMENTS_PER_MESSAGE).default([]),
37023
37073
  seenUpToSeq: CommunityAgentSeqSchema.optional(),
37024
37074
  replyToSeq: CommunityAgentPositiveSeqSchema.optional(),
37075
+ force: exports_external.boolean().optional(),
37025
37076
  nonce: exports_external.string().min(1).max(128).optional()
37026
37077
  }).refine((d) => d.content.text.trim().length > 0 || d.attachments.length > 0, { message: "message must have text or attachments" });
37027
37078
  var CommunityAgentAttachmentUploadResponseSchema = exports_external.object({
@@ -37078,8 +37129,8 @@ var CommunityAgentJoinServerRequestSchema = exports_external.object({
37078
37129
  });
37079
37130
  var CommunityAgentNapRequestSchema = exports_external.object({
37080
37131
  handoff: exports_external.string().refine((value) => value.trim().length > 0, {
37081
- message: "handoff is required"
37082
- })
37132
+ message: "handoff must not be blank"
37133
+ }).optional()
37083
37134
  });
37084
37135
  var CommunityAgentMessagePropertyRequestSchema = exports_external.object({
37085
37136
  channel: exports_external.string().min(1),
@@ -40539,20 +40590,20 @@ async function detectRuntimes() {
40539
40590
  const ids = listRuntimeIds();
40540
40591
  const results = [];
40541
40592
  const nowIso = new Date().toISOString();
40542
- for (const id of ids) {
40593
+ for (const id2 of ids) {
40543
40594
  try {
40544
- const driver = getDriver(id);
40595
+ const driver = getDriver(id2);
40545
40596
  const probe = await driver.probe();
40546
40597
  if (probe.status === "healthy") {
40547
40598
  results.push({
40548
- id,
40599
+ id: id2,
40549
40600
  status: "healthy",
40550
40601
  version: probe.version,
40551
40602
  reasoning: probe.reasoning
40552
40603
  });
40553
40604
  } else {
40554
40605
  results.push({
40555
- id,
40606
+ id: id2,
40556
40607
  status: "unhealthy",
40557
40608
  lastError: probe.error.code ?? "probe_failed",
40558
40609
  lastErrorAt: nowIso
@@ -40560,7 +40611,7 @@ async function detectRuntimes() {
40560
40611
  }
40561
40612
  } catch (err) {
40562
40613
  results.push({
40563
- id,
40614
+ id: id2,
40564
40615
  status: "unhealthy",
40565
40616
  lastError: err?.code ?? "probe_threw",
40566
40617
  lastErrorAt: nowIso
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alook/daemon",
3
- "version": "0.1.40",
3
+ "version": "0.1.42",
4
4
  "description": "Alook agent daemon — host-side runtime backend, process manager, credential proxy, and control plane.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/alookai/alook#readme",
@@ -59,9 +59,9 @@
59
59
  "@types/node": "^20.0.0",
60
60
  "@types/ws": "^8.18.1",
61
61
  "eslint": "^9.39.5",
62
- "tsx": "^4.23.13",
62
+ "tsx": "^4.23.15",
63
63
  "typescript": "^6.0.3",
64
- "typescript-eslint": "^8.70.0",
64
+ "typescript-eslint": "^8.70.1",
65
65
  "vitest": "4.1.11"
66
66
  }
67
67
  }