lobstah 0.7.9 → 0.7.10

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/main.js CHANGED
@@ -4870,6 +4870,12 @@ function write3(key, value) {
4870
4870
  fs22.writeFileSync(tmp, JSON.stringify(value));
4871
4871
  atomicRenameSync(tmp, file3);
4872
4872
  }
4873
+ function injectedPrompt(prompt) {
4874
+ if (typeof prompt !== "string" || !/<task-notification>[\s\S]*?<\/task-notification>/.test(prompt))
4875
+ return false;
4876
+ const rest = prompt.replace(/<task-notification>[\s\S]*?<\/task-notification>/g, "").replace(/<system-reminder\b[^>]*>[\s\S]*?<\/system-reminder\b[^>]*>/g, "");
4877
+ return rest.trim() === "";
4878
+ }
4873
4879
  function resetWaitBackoff(session) {
4874
4880
  write3(session ? resetKey(session) : "activity", randomUUID2());
4875
4881
  }
@@ -11216,6 +11222,7 @@ __export(dist_exports, {
11216
11222
  humanGatesFor: () => humanGatesFor,
11217
11223
  identifyPrStacks: () => identifyPrStacks,
11218
11224
  idleWorkingTrap: () => idleWorkingTrap,
11225
+ injectedPrompt: () => injectedPrompt,
11219
11226
  inspectTrapWorktree: () => inspectTrapWorktree,
11220
11227
  isBackoffKind: () => isBackoffKind,
11221
11228
  isBoatCredential: () => isBoatCredential,
@@ -14241,7 +14248,7 @@ async function wharfHook(cmd, args) {
14241
14248
  if (scope?.kind !== "wharf") return false;
14242
14249
  const input2 = readHookStdin(), agent = readBrokerAgent(scope.grounds, input2?.cwd ?? process.cwd());
14243
14250
  try {
14244
- if (args[0] === "user-prompt-submit" && input2?.session_id) resetWaitBackoff(input2.session_id);
14251
+ if (args[0] === "user-prompt-submit" && input2?.session_id && !injectedPrompt(input2.prompt)) resetWaitBackoff(input2.session_id);
14245
14252
  if (agent) {
14246
14253
  if (input2?.session_id && input2.session_id !== agent.session) return true;
14247
14254
  if (args[0] === "session-end") await endBrokerAgent(agent);
@@ -27352,12 +27359,13 @@ async function mainCli() {
27352
27359
  try {
27353
27360
  const hook = readHookStdin();
27354
27361
  const trap = hook?.session_id ? trapBySession(hook.session_id) : void 0;
27355
- if (hook?.session_id && (trap || helmOf(hook.session_id))) resetWaitBackoff(hook.session_id);
27362
+ const person = !injectedPrompt(hook?.prompt);
27363
+ if (hook?.session_id && (trap || helmOf(hook.session_id)) && person) resetWaitBackoff(hook.session_id);
27356
27364
  if (trap) resumeTrapTurn(trap, true);
27357
27365
  if (hook?.session_id && !trapBySession(hook.session_id) && helmOf(hook.session_id)) {
27358
27366
  const { dailyGoalsContext: dailyGoalsContext2 } = await Promise.resolve().then(() => (init_goals2(), goals_exports));
27359
27367
  const helm = helmOf(hook.session_id);
27360
- const daily = dailyGoalsContext2(helm.grounds, loadConfig());
27368
+ const daily = person ? dailyGoalsContext2(helm.grounds, loadConfig()) : void 0;
27361
27369
  console.log(JSON.stringify({ hookSpecificOutput: { hookEventName: "UserPromptSubmit", additionalContext: [HELM_REMINDER, daily].filter(Boolean).join("\n") } }));
27362
27370
  }
27363
27371
  } catch {
@@ -189,7 +189,10 @@ send a continuation.
189
189
 
190
190
  The defaults wait 900, 900, 900, 1800, 3600, 7200, then 14400 seconds.
191
191
  History is stored per session across re-arms. An event or user prompt resets
192
- that session; a dispatch or send resets all this boat's waiters. Already-armed
192
+ that session; a dispatch or send resets all this boat's waiters. A prompt the
193
+ harness injects when a background task finishes (a `<task-notification>`,
194
+ which is how a backgrounded `man wait` or `soak --wait` ending quietly comes
195
+ back) is not a user prompt and does not reset. Already-armed
193
196
  waiters adopt a fresh base deadline on their next poll. Polling and liveness
194
197
  heartbeats keep their usual cadence, so events still wake immediately.
195
198
  `--peek` and zero-time trap probes do not advance the backoff.
package/docs/man.md CHANGED
@@ -90,7 +90,9 @@ for writes. Files are editable Markdown at
90
90
 
91
91
  The first user prompt of a new day adds a non-blocking reminder to the helm:
92
92
  handle that message, then put yesterday's recap and a draft of today's goals
93
- on one card. Existing goals, a `Goals for YYYY-MM-DD` card, or an already
93
+ on one card. A turn the harness injects when a background task finishes (a
94
+ `<task-notification>`, such as a quiet `man wait` ending) is not a user
95
+ prompt: it neither gets the reminder nor uses it up. Existing goals, a `Goals for YYYY-MM-DD` card, or an already
94
96
  delivered reminder suppress another ask. The helm saves the answered goals
95
97
  with `goals set`; the first reminder leaves a comment in that same daily file.
96
98
  The helm uses them to order work and choose the next quiet step.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lobstah",
3
- "version": "0.7.9",
3
+ "version": "0.7.10",
4
4
  "description": "Harness-agnostic, token-efficient supervision framework for coding agents",
5
5
  "license": "MIT",
6
6
  "author": "aequitas labs LLC",