tryharness 0.7.33 → 0.7.34

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 (2) hide show
  1. package/lib/threadRuns.mjs +17 -1
  2. package/package.json +1 -1
@@ -203,6 +203,16 @@ export function createThreadRuns({
203
203
  );
204
204
  });
205
205
  };
206
+ // The person's go reaches a turn another agent's ask left waiting for their Start, so it starts now rather than
207
+ // after a turn that would never come (October 17: Grok Bot's mention held Claude Code in the person's own folder, and
208
+ // their @claude-code queued behind it). The pending call stays, so the turn's brief carries the person's words.
209
+ const startHeldWake = (goalId, agent) => {
210
+ const wake = store.getTask(store.openWake(goalId, agent));
211
+ if (wake?.status !== "open" || wake.run_authorized_at) return;
212
+ if (!threadMayRun(store.getTask(goalId))) return;
213
+ store.meta(`person-wake:${wake.id}`, "1");
214
+ if (store.authorizeGoalRun(wake.id)) notifyBoard(store.getTask(wake.id));
215
+ };
206
216
  const wakeAgent = (
207
217
  goalId,
208
218
  agent,
@@ -247,6 +257,7 @@ export function createThreadRuns({
247
257
  at: new Date().toISOString(),
248
258
  };
249
259
  pendingWakes.set(`${goalId}:${agent}`, pending);
260
+ if (pending.go) startHeldWake(goalId, agent);
250
261
  if (asker === "user" && words)
251
262
  steerRunning(goalId, agent, words, pending);
252
263
  return;
@@ -431,7 +442,12 @@ export function createThreadRuns({
431
442
  for (const agent of RUNNERS) {
432
443
  const key = goal.id + ":" + agent;
433
444
  const pending = pendingWakes.get(key);
434
- if (!pending || store.openWake(goal.id, agent)) continue;
445
+ if (!pending) continue;
446
+ // A waiting turn never started, so nothing of it is unknown: the person's go still starts it.
447
+ if (store.openWake(goal.id, agent)) {
448
+ if (pending.go) startHeldWake(goal.id, agent);
449
+ continue;
450
+ }
435
451
  // The previous turn's effects are unknown. Preserve the new call, but let the person inspect before starting it.
436
452
  const wakeId = wakeAgent(goal.id, agent, pending.reason, {
437
453
  asker: pending.asker,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tryharness",
3
- "version": "0.7.33",
3
+ "version": "0.7.34",
4
4
  "description": "Harness Relay: the daemon that turns the agents on this machine into your personal swarm. Memory, history, and work handed between any of them.",
5
5
  "bin": {
6
6
  "tryharness": "cli.mjs"