zob-harness 0.15.3 → 0.15.4
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.
|
@@ -39,7 +39,7 @@ export { pathMatches } from "./src/core/utils/paths.js";
|
|
|
39
39
|
|
|
40
40
|
export { parseGoalState, validateGoalState, validateStrictGoalSpecAnchor, parseBillableJobIntake, validateBillableJobIntake } from "./src/domains/goal/goal.js";
|
|
41
41
|
export type { StrictGoalSpecAnchor, StrictGoalSpecAnchorKind } from "./src/domains/goal/goal.js";
|
|
42
|
-
export { DEFAULT_GOAL_ACTIVATION_MODE, clearRuntimeGoalContinuationState, clearRuntimeGoalContinuationStateFor, formatGoalActivationMode, formatRuntimeGoalSummary, queueRuntimeGoalContinuation, restoreRuntimeGoalFromBranch, resumeRuntimeGoal, runtimeGoalStatusLine } from "./src/runtime/goal-runtime.js";
|
|
42
|
+
export { DEFAULT_GOAL_ACTIVATION_MODE, clearRuntimeGoalContinuationState, clearRuntimeGoalContinuationStateFor, formatGoalActivationMode, formatRuntimeGoalSummary, hasPendingUndeliveredZpeerInbound, queueRuntimeGoalContinuation, restoreRuntimeGoalFromBranch, resumeRuntimeGoal, runtimeGoalStatusLine } from "./src/runtime/goal-runtime.js";
|
|
43
43
|
export type { GoalActivationMode, RuntimeGoal, RuntimeGoalStatus, RuntimeGoalOracleStatus, RuntimeGoalOracleVerdict } from "./src/runtime/goal-runtime.js";
|
|
44
44
|
export { extractModeIntent, looksLikeCompletePlanResponse, stripModeIntentMarkup, validateModeIntent } from "./src/runtime/mode-intent.js";
|
|
45
45
|
export type { ZobModeIntent, ZobModeIntentConfidence, ZobModeIntentRisk, ZobModeIntentValidation } from "./src/runtime/mode-intent.js";
|
|
@@ -529,6 +529,21 @@ export function resumeRuntimeGoal(goal: RuntimeGoal, requestedAdditionalTurns?:
|
|
|
529
529
|
return { previousBlocker, additionalTurns: extendWindow ? additionalTurns : undefined };
|
|
530
530
|
}
|
|
531
531
|
|
|
532
|
+
// Pending inbound ZPeer prompts whose transient body has not yet been delivered
|
|
533
|
+
// to a turn starve the goal-continuation loop: the body (deliverAs "followUp")
|
|
534
|
+
// never reaches a turn slot while continuation keeps re-arming every turn. Yield
|
|
535
|
+
// the loop until EVERY pending inbound has started its turn (turnStartedAt) or
|
|
536
|
+
// been answered, mirroring the outbound passivePeerWait suppression.
|
|
537
|
+
export function hasPendingUndeliveredZpeerInbound(state: HarnessRuntimeState): boolean {
|
|
538
|
+
const queue = state.zobLive.inboundQueue;
|
|
539
|
+
const byMsgId = state.zobLive.inboundByMsgId;
|
|
540
|
+
if (!queue || queue.length === 0 || !byMsgId) return false;
|
|
541
|
+
return queue.some((msgId) => {
|
|
542
|
+
const inbound = byMsgId[msgId];
|
|
543
|
+
return Boolean(inbound && !inbound.responseSent && !inbound.turnStartedAt);
|
|
544
|
+
});
|
|
545
|
+
}
|
|
546
|
+
|
|
532
547
|
export function queueRuntimeGoalContinuation(pi: ExtensionAPI, state: HarnessRuntimeState, ctx: ExtensionContext, options: { userVisible?: boolean; retryMs?: number } = {}): void {
|
|
533
548
|
const goal = state.runtimeGoal;
|
|
534
549
|
if (!canContinue(goal)) return;
|
|
@@ -536,6 +551,10 @@ export function queueRuntimeGoalContinuation(pi: ExtensionAPI, state: HarnessRun
|
|
|
536
551
|
clearRuntimeGoalContinuationTimer(state);
|
|
537
552
|
return;
|
|
538
553
|
}
|
|
554
|
+
if (hasPendingUndeliveredZpeerInbound(state)) {
|
|
555
|
+
clearRuntimeGoalContinuationTimer(state);
|
|
556
|
+
return;
|
|
557
|
+
}
|
|
539
558
|
const humanDecision = pauseIfHumanDecisionRequired(pi, state, goal);
|
|
540
559
|
if (humanDecision) {
|
|
541
560
|
ctx.ui.notify(`ZOB /goal paused: ${goal.oracle.blockerSummary}`, "warning");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { DEFAULT_GOAL_ACTIVATION_MODE, DEFAULT_GOAL_MAX_TURNS, DEFAULT_GOAL_RESUME_TURN_EXTENSION, HUMAN_DECISION_REQUIRED_THRESHOLD, ZOB_GOAL_MODE_ENTRY_TYPE, ZOB_RUNTIME_GOAL_CONTINUATION_TYPE, ZOB_RUNTIME_GOAL_ENTRY_TYPE, accountRuntimeGoalTurn, asGoalActivationMode, clearRuntimeGoalContinuationState, clearRuntimeGoalContinuationStateFor, clearRuntimeGoalContinuationTimer, continuationGoalIdFromPrompt, formatGoalActivationMode, formatRuntimeGoalSummary, isRuntimeGoal, pauseRuntimeGoalForStop, persistGoalActivationMode, persistRuntimeGoal, queueRuntimeGoalContinuation, restoreGoalActivationModeFromBranch, restoreRuntimeGoalFromBranch, resumeRuntimeGoal, runtimeGoalStatusLine, scoreGoalHumanDecisionRequired } from "./goal-runtime/state.js";
|
|
1
|
+
export { DEFAULT_GOAL_ACTIVATION_MODE, DEFAULT_GOAL_MAX_TURNS, DEFAULT_GOAL_RESUME_TURN_EXTENSION, HUMAN_DECISION_REQUIRED_THRESHOLD, ZOB_GOAL_MODE_ENTRY_TYPE, ZOB_RUNTIME_GOAL_CONTINUATION_TYPE, ZOB_RUNTIME_GOAL_ENTRY_TYPE, accountRuntimeGoalTurn, asGoalActivationMode, clearRuntimeGoalContinuationState, clearRuntimeGoalContinuationStateFor, clearRuntimeGoalContinuationTimer, continuationGoalIdFromPrompt, formatGoalActivationMode, formatRuntimeGoalSummary, hasPendingUndeliveredZpeerInbound, isRuntimeGoal, pauseRuntimeGoalForStop, persistGoalActivationMode, persistRuntimeGoal, queueRuntimeGoalContinuation, restoreGoalActivationModeFromBranch, restoreRuntimeGoalFromBranch, resumeRuntimeGoal, runtimeGoalStatusLine, scoreGoalHumanDecisionRequired } from "./goal-runtime/state.js";
|
|
2
2
|
export type { GoalActivationMode, HumanDecisionRequiredScore, RuntimeGoal, RuntimeGoalCompletionProposal, RuntimeGoalLoopState, RuntimeGoalOracleState, RuntimeGoalOracleStatus, RuntimeGoalOracleVerdict, RuntimeGoalStatus, RuntimeGoalUsage } from "./goal-runtime/state.js";
|
|
3
3
|
export { handleGoalCommand, handleGoalGateCommand } from "./goal-runtime/commands.js";
|
|
4
4
|
export { registerGoalRuntimeTools } from "./goal-runtime/tools.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zob-harness",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A governed Agent Factory for Pi: launch communicating agent teams, run tmux-backed factories, validate artifacts, and package repeatable workflows.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -263,6 +263,9 @@ const goalRuntime = contents['.pi/extensions/zob-harness/src/runtime/goal-runtim
|
|
|
263
263
|
for (const needle of ['state.zobLive.passivePeerWait?.suppressGoalContinuation === true', 'clearRuntimeGoalContinuationTimer(state)', 'return;']) {
|
|
264
264
|
if (!goalRuntime.includes(needle)) failures.push(`goal runtime missing passive peer continuation suppression ${needle}`);
|
|
265
265
|
}
|
|
266
|
+
for (const needle of ['export function hasPendingUndeliveredZpeerInbound(state: HarnessRuntimeState): boolean', '!inbound.responseSent && !inbound.turnStartedAt', 'if (hasPendingUndeliveredZpeerInbound(state)) {']) {
|
|
267
|
+
if (!goalRuntime.includes(needle)) failures.push(`goal runtime missing inbound ZPeer body-delivery continuation suppression ${needle}`);
|
|
268
|
+
}
|
|
266
269
|
|
|
267
270
|
const childRunner = contents['.pi/extensions/zob-harness/src/domains/delegation/child-runner.ts'];
|
|
268
271
|
for (const needle of ['childModelPattern', 'ctx.model', 'resolveCodexFastModeExtension', 'getAgentDir()', 'codex-fast-mode.ts', 'childCodexFastModeExtension', 'args.push("-e", childCodexFastModeExtension)', 'const model = resolvedModel']) {
|