@agimon-ai/po-wake 0.0.1-alpha.16 → 0.0.1-alpha.17

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.
@@ -1268,17 +1268,21 @@ function createWakeSessionState(agent, root, owner) {
1268
1268
  } })),
1269
1269
  () => whileBot(() => {
1270
1270
  if (!agent?.registerHook) return void 0;
1271
- const settled = agent.registerHook({
1271
+ const settled = agent.registerHook((0, _agimon_ai_po_core_extensionFile.defineHook)({
1272
+ name: "wake-check-settled-run",
1273
+ description: "Evaluate a settled run for a tracked nudge or routine wake.",
1272
1274
  event: "agent_settled",
1273
1275
  handle: (event) => check(() => wake.settled(event))
1274
- });
1275
- const started = agent.registerHook({
1276
+ }));
1277
+ const started = agent.registerHook((0, _agimon_ai_po_core_extensionFile.defineHook)({
1278
+ name: "wake-withdraw-routine-on-start",
1279
+ description: "Withdraw the routine wake when a run starts and warn if withdrawal fails.",
1276
1280
  event: "agent_start",
1277
1281
  handle: () => wake.started().catch(() => agent.context.client.notify({
1278
1282
  body: t("wake.notice.withdrawFailed", "Po could not withdraw the routine wake."),
1279
1283
  level: "warning"
1280
1284
  }))
1281
- });
1285
+ }));
1282
1286
  const detach = root.attach(owner.sessionId, () => check(() => wake.recover()), async (row, current) => {
1283
1287
  await ready();
1284
1288
  return wake.due(row, current);