The one and only agent harness for complex codebases. Project memory, planning, execution, and verified completion inside Codex.
JavaScript aiai-agentsclaudeclaude-codeclicodexdeveloper-toolslazylazycodexoh-my-openagentomoopenaiorchestrationtypescript
chore: sync Codex marketplace v5.0.0-beta.64
github-actions[bot]1e81037655a0
diff --git a/plugins/omo/.codex-plugin/plugin.json b/plugins/omo/.codex-plugin/plugin.jsonindex f57dacc2..8787f6d8 100644--- a/plugins/omo/.codex-plugin/plugin.json+++ b/plugins/omo/.codex-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "omo",- "version": "5.0.0-beta.63",+ "version": "5.0.0-beta.64","description": "One Codex plugin namespace for Yeongyu's local Codex components.","author": {"name": "Yeongyu Kim",diff --git a/plugins/omo/components/bootstrap/dist/cli.js b/plugins/omo/components/bootstrap/dist/cli.jsindex 2ad01c02..0fd29e45 100755--- a/plugins/omo/components/bootstrap/dist/cli.js+++ b/plugins/omo/components/bootstrap/dist/cli.js@@ -5839,8 +5839,8 @@ var OmoGitMasterSettingsShape = {};var OmoGitMasterSettingsLayerSchema = object(OmoGitMasterSettingsShape).partial().strict();var OmoGitMasterSettingsSchema = OmoGitMasterSettingsLayerSchema.extend({- commit_footer: union([boolean2(), string2()]).default(true),- include_co_authored_by: boolean2().default(true)+ commit_footer: union([boolean2(), string2()]).default(false),+ include_co_authored_by: boolean2().default(false)}).strict();// ../../omo-config-core/src/schema/harness.tsdiff --git a/plugins/omo/components/bootstrap/hooks/hooks.json b/plugins/omo/components/bootstrap/hooks/hooks.jsonindex dbd59590..8d08a52e 100644--- a/plugins/omo/components/bootstrap/hooks/hooks.json+++ b/plugins/omo/components/bootstrap/hooks/hooks.json@@ -8,7 +8,7 @@"command": "node \"${PLUGIN_ROOT}/components/bootstrap/dist/cli.js\" hook session-start","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\bootstrap.ps1\"","timeout": 30,- "statusMessage": "(OmO 5.0.0-beta.63) Checking Bootstrap Provisioning"+ "statusMessage": "(OmO 5.0.0-beta.64) Checking Bootstrap Provisioning"}]}diff --git a/plugins/omo/components/bootstrap/package.json b/plugins/omo/components/bootstrap/package.jsonindex 17812102..a7f6ebbf 100644--- a/plugins/omo/components/bootstrap/package.json+++ b/plugins/omo/components/bootstrap/package.json@@ -1,6 +1,6 @@{"name": "@sisyphuslabs/codex-bootstrap",- "version": "5.0.0-beta.63",+ "version": "5.0.0-beta.64","description": "Codex SessionStart bootstrap component that provisions LazyCodex runtime dependencies from a detached worker.","type": "module","private": true,diff --git a/plugins/omo/components/comment-checker/hooks/hooks.json b/plugins/omo/components/comment-checker/hooks/hooks.jsonindex 61c72bcf..fe3e0f1c 100644--- a/plugins/omo/components/comment-checker/hooks/hooks.json+++ b/plugins/omo/components/comment-checker/hooks/hooks.json@@ -8,7 +8,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use","timeout": 30,- "statusMessage": "(OmO 5.0.0-beta.63) Checking Comments"+ "statusMessage": "(OmO 5.0.0-beta.64) Checking Comments"}]}diff --git a/plugins/omo/components/comment-checker/package.json b/plugins/omo/components/comment-checker/package.jsonindex b1fa2949..a225c811 100644--- a/plugins/omo/components/comment-checker/package.json+++ b/plugins/omo/components/comment-checker/package.json@@ -1,6 +1,6 @@{"name": "@code-yeongyu/codex-comment-checker",- "version": "5.0.0-beta.63",+ "version": "5.0.0-beta.64","description": "Codex plugin that runs comment-checker after edit-like PostToolUse hooks.","type": "module","packageManager": "[email protected]",diff --git a/plugins/omo/components/git-bash/hooks/hooks.json b/plugins/omo/components/git-bash/hooks/hooks.jsonindex a200719d..bb75341a 100644--- a/plugins/omo/components/git-bash/hooks/hooks.json+++ b/plugins/omo/components/git-bash/hooks/hooks.json@@ -8,7 +8,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook pre-tool-use","timeout": 5,- "statusMessage": "(OmO 5.0.0-beta.63) Recommending Git Bash MCP"+ "statusMessage": "(OmO 5.0.0-beta.64) Recommending Git Bash MCP"}]}@@ -20,7 +20,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-compact","timeout": 5,- "statusMessage": "(OmO 5.0.0-beta.63) Resetting Git Bash MCP Reminder"+ "statusMessage": "(OmO 5.0.0-beta.64) Resetting Git Bash MCP Reminder"}]}diff --git a/plugins/omo/components/git-bash/package.json b/plugins/omo/components/git-bash/package.jsonindex dee4173f..93cc5c36 100644--- a/plugins/omo/components/git-bash/package.json+++ b/plugins/omo/components/git-bash/package.json@@ -1,6 +1,6 @@{"name": "@sisyphuslabs/codex-git-bash-hook",- "version": "5.0.0-beta.63",+ "version": "5.0.0-beta.64","description": "Codex hook component that reminds Windows sessions to prefer the OMO git_bash MCP.","type": "module","private": true,diff --git a/plugins/omo/components/lazycodex-executor-verify/hooks/hooks.json b/plugins/omo/components/lazycodex-executor-verify/hooks/hooks.jsonindex 9270d1ac..8d98abd6 100644--- a/plugins/omo/components/lazycodex-executor-verify/hooks/hooks.json+++ b/plugins/omo/components/lazycodex-executor-verify/hooks/hooks.json@@ -8,7 +8,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/lazycodex-executor-verify/dist/cli.js\" hook subagent-stop","timeout": 10,- "statusMessage": "(OmO 5.0.0-beta.63) Verifying LazyCodex Executor Evidence"+ "statusMessage": "(OmO 5.0.0-beta.64) Verifying LazyCodex Executor Evidence"}]}diff --git a/plugins/omo/components/lazycodex-executor-verify/package.json b/plugins/omo/components/lazycodex-executor-verify/package.jsonindex 60437222..5903af15 100644--- a/plugins/omo/components/lazycodex-executor-verify/package.json+++ b/plugins/omo/components/lazycodex-executor-verify/package.json@@ -1,6 +1,6 @@{"name": "@code-yeongyu/codex-lazycodex-executor-verify",- "version": "5.0.0-beta.63",+ "version": "5.0.0-beta.64","description": "Codex SubagentStop evidence verifier for LazyCodex executor completions.","type": "module","packageManager": "[email protected]",diff --git a/plugins/omo/components/lsp/dist/.omo-runtime-manifest.json b/plugins/omo/components/lsp/dist/.omo-runtime-manifest.jsonindex 336a3236..bbaf8290 100644--- a/plugins/omo/components/lsp/dist/.omo-runtime-manifest.json+++ b/plugins/omo/components/lsp/dist/.omo-runtime-manifest.json@@ -1,7 +1,7 @@{"schemaVersion": 1,- "version": "5.0.0-beta.63",- "inputDigest": "sha256:3a61242cf504041a49eedabaef45c33f1b57d48589074efffeccfa0820dcfdef",+ "version": "5.0.0-beta.64",+ "inputDigest": "sha256:b05044768de129d89cc5a81fb6c5b5b57840df8783827b60c1dbf4c892c34715","outputs": [{"path": "cli.d.ts",diff --git a/plugins/omo/components/lsp/hooks/hooks.json b/plugins/omo/components/lsp/hooks/hooks.jsonindex 2129011f..f8688ae7 100644--- a/plugins/omo/components/lsp/hooks/hooks.json+++ b/plugins/omo/components/lsp/hooks/hooks.json@@ -8,7 +8,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use","timeout": 60,- "statusMessage": "(OmO 5.0.0-beta.63) Checking LSP Diagnostics"+ "statusMessage": "(OmO 5.0.0-beta.64) Checking LSP Diagnostics"}]}@@ -21,7 +21,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-compact","timeout": 5,- "statusMessage": "(OmO 5.0.0-beta.63) Resetting LSP Diagnostics Cache"+ "statusMessage": "(OmO 5.0.0-beta.64) Resetting LSP Diagnostics Cache"}]}diff --git a/plugins/omo/components/lsp/package.json b/plugins/omo/components/lsp/package.jsonindex f4b519a6..4ee6c98d 100644--- a/plugins/omo/components/lsp/package.json+++ b/plugins/omo/components/lsp/package.json@@ -1,6 +1,6 @@{"name": "@code-yeongyu/codex-lsp",- "version": "5.0.0-beta.63",+ "version": "5.0.0-beta.64","description": "Codex plugin that exposes Language Server Protocol tools and post-edit diagnostics.","type": "module","packageManager": "[email protected]",diff --git a/plugins/omo/components/rules/hooks/hooks.json b/plugins/omo/components/rules/hooks/hooks.jsonindex 631cb5d1..22f2f62c 100644--- a/plugins/omo/components/rules/hooks/hooks.json+++ b/plugins/omo/components/rules/hooks/hooks.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook session-start","timeout": 10,- "statusMessage": "(OmO 5.0.0-beta.63) Loading Project Rules"+ "statusMessage": "(OmO 5.0.0-beta.64) Loading Project Rules"}]}@@ -19,7 +19,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook user-prompt-submit","timeout": 10,- "statusMessage": "(OmO 5.0.0-beta.63) Loading Project Rules"+ "statusMessage": "(OmO 5.0.0-beta.64) Loading Project Rules"}]}@@ -32,7 +32,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use","timeout": 10,- "statusMessage": "(OmO 5.0.0-beta.63) Matching Project Rules"+ "statusMessage": "(OmO 5.0.0-beta.64) Matching Project Rules"}]}@@ -45,7 +45,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-compact","timeout": 10,- "statusMessage": "(OmO 5.0.0-beta.63) Resetting Project Rule Cache"+ "statusMessage": "(OmO 5.0.0-beta.64) Resetting Project Rule Cache"}]}diff --git a/plugins/omo/components/rules/package.json b/plugins/omo/components/rules/package.jsonindex 2b82500b..b0684fa9 100644--- a/plugins/omo/components/rules/package.json+++ b/plugins/omo/components/rules/package.json@@ -1,6 +1,6 @@{"name": "@code-yeongyu/codex-rules",- "version": "5.0.0-beta.63",+ "version": "5.0.0-beta.64","description": "Codex plugin that injects project rule files into model context through lifecycle hooks.","type": "module","packageManager": "[email protected]",diff --git a/plugins/omo/components/teammode/hooks/hooks.json b/plugins/omo/components/teammode/hooks/hooks.jsonindex 16f8bffd..f6593c35 100644--- a/plugins/omo/components/teammode/hooks/hooks.json+++ b/plugins/omo/components/teammode/hooks/hooks.json@@ -8,7 +8,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use","timeout": 10,- "statusMessage": "(OmO 5.0.0-beta.63) Checking Thread Title Hygiene"+ "statusMessage": "(OmO 5.0.0-beta.64) Checking Thread Title Hygiene"}]}diff --git a/plugins/omo/components/teammode/package.json b/plugins/omo/components/teammode/package.jsonindex 78286aca..3afa4766 100644--- a/plugins/omo/components/teammode/package.json+++ b/plugins/omo/components/teammode/package.json@@ -1,6 +1,6 @@{"name": "@sisyphuslabs/codex-teammode",- "version": "5.0.0-beta.63",+ "version": "5.0.0-beta.64","description": "Codex team-mode hook component that keeps background thread titles descriptive after create_thread.","type": "module","private": true,diff --git a/plugins/omo/components/telemetry/hooks/hooks.json b/plugins/omo/components/telemetry/hooks/hooks.jsonindex d4564e1a..aff7a22e 100644--- a/plugins/omo/components/telemetry/hooks/hooks.json+++ b/plugins/omo/components/telemetry/hooks/hooks.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook session-start","timeout": 5,- "statusMessage": "(OmO 5.0.0-beta.63) Recording Session Telemetry"+ "statusMessage": "(OmO 5.0.0-beta.64) Recording Session Telemetry"}]}diff --git a/plugins/omo/components/telemetry/package.json b/plugins/omo/components/telemetry/package.jsonindex bf2317b3..41fda7f4 100644--- a/plugins/omo/components/telemetry/package.json+++ b/plugins/omo/components/telemetry/package.json@@ -1,6 +1,6 @@{"name": "@code-yeongyu/codex-telemetry",- "version": "5.0.0-beta.63",+ "version": "5.0.0-beta.64","description": "Codex plugin component that emits omo-codex anonymous daily-active telemetry on SessionStart.","type": "module","packageManager": "[email protected]",diff --git a/plugins/omo/components/ultrawork/hooks/hooks.json b/plugins/omo/components/ultrawork/hooks/hooks.jsonindex 47c6fdae..032df1a3 100644--- a/plugins/omo/components/ultrawork/hooks/hooks.json+++ b/plugins/omo/components/ultrawork/hooks/hooks.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook user-prompt-submit","timeout": 5,- "statusMessage": "(OmO 5.0.0-beta.63) Checking Ultrawork Trigger"+ "statusMessage": "(OmO 5.0.0-beta.64) Checking Ultrawork Trigger"}]}diff --git a/plugins/omo/components/ultrawork/package.json b/plugins/omo/components/ultrawork/package.jsonindex 08135588..53bb3f7c 100644--- a/plugins/omo/components/ultrawork/package.json+++ b/plugins/omo/components/ultrawork/package.json@@ -1,6 +1,6 @@{"name": "@code-yeongyu/codex-ultrawork",- "version": "5.0.0-beta.63",+ "version": "5.0.0-beta.64","description": "Codex plugin that injects the ultrawork orchestration directive and ships LazyCodex planning, review, QA, and gate agent roles.","type": "module","packageManager": "[email protected]",diff --git a/plugins/omo/components/ulw-execute-continuation/hooks/hooks.json b/plugins/omo/components/ulw-execute-continuation/hooks/hooks.jsonindex 36252b65..c478e49f 100644--- a/plugins/omo/components/ulw-execute-continuation/hooks/hooks.json+++ b/plugins/omo/components/ulw-execute-continuation/hooks/hooks.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/ulw-execute-continuation/dist/cli.js\" hook stop","timeout": 10,- "statusMessage": "(OmO 5.0.0-beta.63) Checking Ulw-Execute Continuation"+ "statusMessage": "(OmO 5.0.0-beta.64) Checking Ulw-Execute Continuation"}]}diff --git a/plugins/omo/components/ulw-execute-continuation/package.json b/plugins/omo/components/ulw-execute-continuation/package.jsonindex e722179c..ba689d2e 100644--- a/plugins/omo/components/ulw-execute-continuation/package.json+++ b/plugins/omo/components/ulw-execute-continuation/package.json@@ -1,6 +1,6 @@{"name": "@code-yeongyu/codex-ulw-execute-continuation",- "version": "5.0.0-beta.63",+ "version": "5.0.0-beta.64","description": "Codex Stop hook continuation injector for omo-codex ulw-execute plans.","type": "module","packageManager": "[email protected]",diff --git a/plugins/omo/components/ulw-loop/dist/checkpoint-codex-validation.d.ts b/plugins/omo/components/ulw-loop/dist/checkpoint-codex-validation.d.tsindex a1cb38f0..9c2ab617 100644--- a/plugins/omo/components/ulw-loop/dist/checkpoint-codex-validation.d.ts+++ b/plugins/omo/components/ulw-loop/dist/checkpoint-codex-validation.d.ts@@ -1,6 +1,12 @@import type { UlwLoopScope } from "./paths.js";import type { UlwLoopItem, UlwLoopPlan } from "./types.js";import { UlwLoopError } from "./types.js";+export interface CheckpointCodexGoalValidation {+ readonly raw: unknown;+ readonly nextActions: readonly string[];+ readonly warnings: readonly string[];+ readonly unacknowledgedObjective?: string;+}export declare function validateCheckpointCodexGoal(input: {readonly repoRoot: string;readonly plan: UlwLoopPlan;@@ -8,9 +14,5 @@ export declare function validateCheckpointCodexGoal(input: {readonly raw: string | undefined;readonly evidence: string;readonly scope?: UlwLoopScope;-}): Promise<{- readonly raw: unknown;- readonly nextActions: readonly string[];- readonly warnings: readonly string[];-}>;+}): Promise<CheckpointCodexGoalValidation>;export declare function combineCheckpointValidationErrors(codexError: UlwLoopError, gateError: UlwLoopError): UlwLoopError;diff --git a/plugins/omo/components/ulw-loop/dist/checkpoint-codex-validation.js b/plugins/omo/components/ulw-loop/dist/checkpoint-codex-validation.jsindex 642c7088..67e0eac6 100644--- a/plugins/omo/components/ulw-loop/dist/checkpoint-codex-validation.js+++ b/plugins/omo/components/ulw-loop/dist/checkpoint-codex-validation.js@@ -1,4 +1,5 @@import { CodexGoalSnapshotError, formatCodexGoalReconciliation, readCodexGoalSnapshotInput, reconcileCodexGoalSnapshot, } from "./codex-goal-snapshot.js";+import { acknowledgedDriverObjectives } from "./driver-objective-ack.js";import { codexGoalMode, compatibleCodexObjectives, expectedCodexObjective } from "./goal-status.js";import { UlwLoopError } from "./types.js";export async function validateCheckpointCodexGoal(input) {@@ -6,6 +7,7 @@ export async function validateCheckpointCodexGoal(input) {const expected = expectedCodexObjective(input.plan, input.goal);const reconciliation = reconcileCodexGoalSnapshot(snapshot, {expectedObjective: expected,+ acknowledgedObjectives: acknowledgedDriverObjectives(input.plan),...(codexGoalMode(input.plan) === "aggregate"? { acceptedObjectives: compatibleCodexObjectives(input.plan) }: {}),@@ -14,8 +16,11 @@ export async function validateCheckpointCodexGoal(input) {throw new CodexGoalSnapshotError(formatCodexGoalReconciliation(reconciliation));return {raw: snapshot?.raw,- nextActions: reconciliation.warnings,- warnings: reconciliation.warnings.filter((warning) => warning.startsWith("driver_objective_differs")),+ nextActions: reconciliation.nextActions,+ warnings: reconciliation.warnings,+ ...(reconciliation.unacknowledgedObjective === undefined+ ? {}+ : { unacknowledgedObjective: reconciliation.unacknowledgedObjective }),};}export function combineCheckpointValidationErrors(codexError, gateError) {diff --git a/plugins/omo/components/ulw-loop/dist/checkpoint.js b/plugins/omo/components/ulw-loop/dist/checkpoint.jsindex 8b6699b0..5642405f 100644--- a/plugins/omo/components/ulw-loop/dist/checkpoint.js+++ b/plugins/omo/components/ulw-loop/dist/checkpoint.js@@ -3,6 +3,7 @@ import { existsSync, statSync } from "node:fs";import { readFile } from "node:fs/promises";import { resolve } from "node:path";import { combineCheckpointValidationErrors, validateCheckpointCodexGoal, } from "./checkpoint-codex-validation.js";+import { acknowledgeDriverObjective } from "./driver-objective-ack.js";import { requireAllCriteriaPass, requireAllPlanCriteriaPass, requireEssentialCriteriaPass } from "./evidence.js";import { codexGoalMode, isFinalRunCompletionCandidate } from "./goal-status.js";import { ulwLoopAttemptEvidenceDir } from "./paths.js";@@ -139,6 +140,7 @@ export async function checkpointUlwLoop(repoRoot, args, scope, dependencies) {codexGoal = validation.raw;nextActions = validation.nextActions;warnings = validation.warnings;+ acknowledgeDriverObjective(plan, validation.unacknowledgedObjective);}catch (error) {if (!(error instanceof UlwLoopError))diff --git a/plugins/omo/components/ulw-loop/dist/cli.js b/plugins/omo/components/ulw-loop/dist/cli.jsindex ac8712b5..865d3efe 100644--- a/plugins/omo/components/ulw-loop/dist/cli.js+++ b/plugins/omo/components/ulw-loop/dist/cli.js@@ -1,9 +1,9 @@#!/usr/bin/env node// components/ulw-loop/src/checkpoint.ts-import { existsSync as existsSync4, statSync as statSync2 } from "node:fs";+import { existsSync as existsSync5, statSync as statSync2 } from "node:fs";import { readFile as readFile3 } from "node:fs/promises";-import { resolve as resolve3 } from "node:path";+import { resolve as resolve4 } from "node:path";// components/ulw-loop/src/codex-goal-snapshot.tsimport { existsSync } from "node:fs";@@ -80,33 +80,58 @@ function reconcileCodexGoalSnapshot(snapshot, options) {const effectiveSnapshot = snapshot ?? { available: false, raw: null };const errors = [];const warnings = [];+ const nextActions = [];const expected = options.expectedObjective;- const normalizedExpected = normalizeObjective(expected);if (!effectiveSnapshot.available) {- warnings.push(`call get_goal; if none, create_goal with codexObjective "${expected}" verbatim`);- return { ok: errors.length === 0, snapshot: effectiveSnapshot, warnings, errors };+ nextActions.push(`call get_goal; if none, create_goal with codexObjective "${expected}" verbatim`);+ return { ok: errors.length === 0, snapshot: effectiveSnapshot, warnings, nextActions, errors };}- const accepted = new Set([- normalizedExpected,- ...(options.acceptedObjectives ?? []).map((objective) => normalizeObjective(objective))- ].filter(Boolean));+ const normalized = (objectives) => new Set(objectives.map(normalizeObjective).filter(Boolean));+ const accepted = normalized([expected, ...options.acceptedObjectives ?? []]);+ const acknowledged = normalized(options.acknowledgedObjectives ?? []);const actual = normalizeObjective(effectiveSnapshot.objective ?? "");- if (actual && !accepted.has(normalizeObjective(actual))) {+ let unacknowledgedObjective;+ if (actual && !accepted.has(actual) && !acknowledged.has(actual)) {warnings.push(`driver_objective_differs: expected "${expected}", got "${actual}".`);+ unacknowledgedObjective = actual;}const actualStatus = effectiveSnapshot.status ?? "unknown";if (actualStatus === "paused" || actualStatus === "usage_limited" || actualStatus === "budget_limited") {- warnings.push("/goal resume or raise the budget");+ nextActions.push("/goal resume or raise the budget");}if (actualStatus === "complete")- warnings.push(`driver closed early: call create_goal with codexObjective "${expected}" verbatim`);- return { ok: errors.length === 0, snapshot: effectiveSnapshot, warnings, errors };+ nextActions.push(`driver closed early: call create_goal with codexObjective "${expected}" verbatim`);+ return {+ ok: errors.length === 0,+ snapshot: effectiveSnapshot,+ warnings,+ nextActions,+ errors,+ ...unacknowledgedObjective === undefined ? {} : { unacknowledgedObjective }+ };}function formatCodexGoalReconciliation(reconciliation) {- const parts = [...reconciliation.errors, ...reconciliation.warnings];+ const parts = [...reconciliation.errors, ...reconciliation.nextActions, ...reconciliation.warnings];return parts.join(" ");}+// components/ulw-loop/src/driver-objective-ack.ts+function normalizeDriverObjective(value) {+ return value.replace(/\s+/g, " ").trim();+}+function acknowledgedDriverObjectives(plan) {+ return plan.acknowledgedDriverObjectives ?? [];+}+function acknowledgeDriverObjective(plan, objective) {+ if (objective === undefined)+ return false;+ const normalized = normalizeDriverObjective(objective);+ if (!normalized || acknowledgedDriverObjectives(plan).includes(normalized))+ return false;+ plan.acknowledgedDriverObjectives = [...acknowledgedDriverObjectives(plan), normalized];+ return true;+}+// components/ulw-loop/src/paths.tsimport { isAbsolute, join, relative, sep } from "node:path";// components/ulw-loop/src/constants.ts@@ -193,6 +218,10 @@ function repoRelative(absolutePath, repoRoot) {return absolutePath.slice(backslashPrefix.length).split("\\").join("/");return absolutePath.split("\\").join("/");}+function ulwLoopEvidenceRoot(scope) {+ const sessionId = normalizeUlwLoopSessionId(scope?.sessionId);+ return sessionId === null ? ".omo/evidence" : `.omo/evidence/ulw/${sessionId}`;+}function ulwLoopAttemptEvidenceDir(goalId, attempt, scope) {const sessionId = normalizeUlwLoopSessionId(scope?.sessionId);if (sessionId === null) {@@ -299,14 +328,16 @@ async function validateCheckpointCodexGoal(input) {const expected = expectedCodexObjective(input.plan, input.goal);const reconciliation = reconcileCodexGoalSnapshot(snapshot, {expectedObjective: expected,+ acknowledgedObjectives: acknowledgedDriverObjectives(input.plan),...codexGoalMode(input.plan) === "aggregate" ? { acceptedObjectives: compatibleCodexObjectives(input.plan) } : {}});if (!reconciliation.ok)throw new CodexGoalSnapshotError(formatCodexGoalReconciliation(reconciliation));return {raw: snapshot?.raw,- nextActions: reconciliation.warnings,- warnings: reconciliation.warnings.filter((warning) => warning.startsWith("driver_objective_differs"))+ nextActions: reconciliation.nextActions,+ warnings: reconciliation.warnings,+ ...reconciliation.unacknowledgedObjective === undefined ? {} : { unacknowledgedObjective: reconciliation.unacknowledgedObjective }};}function combineCheckpointValidationErrors(codexError, gateError) {@@ -316,6 +347,41 @@ ${gateError.message}`, "ULW_LOOP_QUALITY_GATE_INVALID", {});}+// components/ulw-loop/src/evidence-artifacts.ts+import { existsSync as existsSync2 } from "node:fs";+import { isAbsolute as isAbsolute2, relative as relative2, resolve as resolve2, sep as sep2 } from "node:path";+function fail(message, code, details) {+ throw new UlwLoopError(message, code, { details });+}+function stored(repoRoot, absolute) {+ const rel = relative2(repoRoot, absolute);+ const inside = rel !== "" && !rel.startsWith("..") && !isAbsolute2(rel);+ return inside ? rel.split(sep2).join("/") : absolute;+}+function resolveEvidenceArtifacts(repoRoot, artifacts) {+ if (artifacts === undefined)+ return;+ const seen = new Set;+ const resolved = [];+ for (const [index, candidate] of artifacts.entries()) {+ const path = typeof candidate === "string" ? candidate.trim() : "";+ if (!path)+ fail(`Artifact ${index + 1} must be a non-empty path.`, "ULW_LOOP_ARGUMENT_INVALID", { index });+ const absolute = resolve2(repoRoot, path);+ if (!existsSync2(absolute))+ fail(`Evidence artifact does not exist: ${path} (resolved to ${absolute}).`, "ULW_LOOP_EVIDENCE_ARTIFACT_MISSING", {+ path,+ resolved: absolute+ });+ const value = stored(repoRoot, absolute);+ if (!seen.has(value)) {+ seen.add(value);+ resolved.push(value);+ }+ }+ return resolved;+}+// components/ulw-loop/src/plan-commit.tsimport { AsyncLocalStorage as AsyncLocalStorage2 } from "node:async_hooks";import { randomUUID as randomUUID2 } from "node:crypto";@@ -327,7 +393,7 @@ import { join as join4 } from "node:path";import { join as join3 } from "node:path";// components/ulw-loop/src/plan-log.ts-import { existsSync as existsSync2, readdirSync, readFileSync } from "node:fs";+import { existsSync as existsSync3, readdirSync, readFileSync } from "node:fs";import { join as join2 } from "node:path";function hasCode(error, code) {return error instanceof Error && "code" in error && error.code === code;@@ -394,7 +460,7 @@ function reconcilePlan(dir) {}function planExists(repoRoot, scope) {const dir = ulwLoopDir(repoRoot, scope);- return existsSync2(join2(dir, "goals.json")) || logNames(dir).length > 0;+ return existsSync3(join2(dir, "goals.json")) || logNames(dir).length > 0;}// components/ulw-loop/src/ledger.ts@@ -965,6 +1031,7 @@ async function recordEvidence(repoRoot, args, scope) {const goal = findGoal(plan, args.goalId);const criterion = findCriterion(goal, args.criterionId);const evidence = nonEmptyEvidence(args.evidence);+ const artifacts = resolveEvidenceArtifacts(repoRoot, args.artifacts);const kind = ledgerKind(args.status);const prevStatus = criterion.status;const capturedAt = iso();@@ -973,6 +1040,10 @@ async function recordEvidence(repoRoot, args, scope) {criterion.capturedAt = capturedAt;if (args.notes !== undefined)criterion.notes = args.notes;+ if (artifacts !== undefined)+ criterion.artifacts = artifacts;+ else+ delete criterion.artifacts;goal.updatedAt = capturedAt;plan.updatedAt = capturedAt;const ledgerEntry = {@@ -983,6 +1054,7 @@ async function recordEvidence(repoRoot, args, scope) {criterionStatus: args.status,evidence,capturedEvidence: evidence,+ ...artifacts === undefined ? {} : { artifacts },before: { status: prevStatus },after: { goalId: goal.id, criterionId: criterion.id, status: args.status, evidence, capturedAt, prevStatus }};@@ -1034,7 +1106,7 @@ function requireEssentialCriteriaPass(goal) {}// components/ulw-loop/src/quality-gate-artifacts.ts-import { resolve as resolve2 } from "node:path";+import { resolve as resolve3 } from "node:path";// components/ulw-loop/src/quality-gate-fields.tsvar PLACEHOLDER_PATTERN = /^(?:<replace:[^>]+>|placeholder|todo|tbd|n\/a|stub)$/i;@@ -1173,14 +1245,14 @@ function artifactCompatible(surface, kind) {function checkFile(path, field, opts) {if (opts?.repoRoot === undefined || opts.fs === undefined || isPoisoned(field))return;- const absolute = resolve2(opts.repoRoot, path);+ const absolute = resolve3(opts.repoRoot, path);if (!opts.fs.existsSync(absolute)) {invalid(`${field} must point to an existing artifact.`, field);return;}if (opts.fs.statSync(absolute).size <= 0)invalid(`${field} must point to a non-empty artifact.`, field);- if (opts.currentAttemptDir !== undefined && !isWithinAttemptDir(absolute, resolve2(opts.repoRoot, opts.currentAttemptDir)))+ if (opts.currentAttemptDir !== undefined && !isWithinAttemptDir(absolute, resolve3(opts.repoRoot, opts.currentAttemptDir)))invalid(`${field} (${path}) must point to an artifact from the current attempt (${opts.currentAttemptDir}).`, field);}function artifactMap(refs) {@@ -1256,7 +1328,7 @@ function adversarialVerdict(row, field) {}// components/ulw-loop/src/surface.ts-import { existsSync as existsSync3, readFileSync as readFileSync3 } from "node:fs";+import { existsSync as existsSync4, readFileSync as readFileSync3 } from "node:fs";import { dirname as dirname2, join as join5 } from "node:path";import { fileURLToPath } from "node:url";var REVIEWER_ROLES_BY_SURFACE = {@@ -1316,7 +1388,7 @@ function resolveToolkitSurface(options) {}function readMarkerSurface(markerPath) {try {- if (!existsSync3(markerPath))+ if (!existsSync4(markerPath))return null;const parsed = JSON.parse(readFileSync3(markerPath, "utf8"));return parseSurface(parsed["surface"]);@@ -1629,23 +1701,23 @@ async function parseValidationBatches(input, goals) {if (raw === undefined)return;if (!Array.isArray(raw))- fail("--validation-batch-json must be a JSON array.");+ fail2("--validation-batch-json must be a JSON array.");const batches = raw.map(batchFromObject);validateBatches(batches, goals);return batches;}function batchFromObject(value) {if (!isObject(value))- fail("validation batch entries must be objects.");+ fail2("validation batch entries must be objects.");const batchId = text(value, "batchId");const memberIds = strings(value, "memberIds");const finalGoalId = text(value, "finalGoalId");if (batchId === undefined)- fail("validation batch requires batchId.");+ fail2("validation batch requires batchId.");if (memberIds === undefined || memberIds.length < 2)- fail("validation batch requires at least two memberIds.");+ fail2("validation batch requires at least two memberIds.");if (finalGoalId === undefined)- fail("validation batch requires finalGoalId.");+ fail2("validation batch requires finalGoalId.");return { batchId, memberIds, finalGoalId };}function validateBatches(batches, goals) {@@ -1654,17 +1726,17 @@ function validateBatches(batches, goals) {const members = new Set;for (const batch of batches) {if (batchIds.has(batch.batchId))- fail(`duplicate validation batch id: ${batch.batchId}.`);+ fail2(`duplicate validation batch id: ${batch.batchId}.`);batchIds.add(batch.batchId);if (new Set(batch.memberIds).size !== batch.memberIds.length)- fail(`validation batch ${batch.batchId} has duplicate memberIds.`);+ fail2(`validation batch ${batch.batchId} has duplicate memberIds.`);if (!batch.memberIds.includes(batch.finalGoalId))- fail(`validation batch ${batch.batchId} finalGoalId must be a member.`, "ULW_LOOP_VALIDATION_BATCH_FINAL_NOT_MEMBER");+ fail2(`validation batch ${batch.batchId} finalGoalId must be a member.`, "ULW_LOOP_VALIDATION_BATCH_FINAL_NOT_MEMBER");for (const memberId of batch.memberIds) {if (!goalIds.has(memberId))- fail(`validation batch ${batch.batchId} references unknown goal: ${memberId}.`, "ULW_LOOP_VALIDATION_BATCH_MEMBER_UNKNOWN");+ fail2(`validation batch ${batch.batchId} references unknown goal: ${memberId}.`, "ULW_LOOP_VALIDATION_BATCH_MEMBER_UNKNOWN");if (members.has(memberId))- fail(`goal appears in multiple validation batches: ${memberId}.`, "ULW_LOOP_VALIDATION_BATCH_OVERLAP");+ fail2(`goal appears in multiple validation batches: ${memberId}.`, "ULW_LOOP_VALIDATION_BATCH_OVERLAP");members.add(memberId);}}@@ -1723,12 +1795,12 @@ function memberResolved(plan, goalId) {const goal = plan.goals.find((candidate) => candidate.id === goalId);return goal !== undefined && isMemberResolved(goal, plan);}-function fail(message, code = "ULW_LOOP_VALIDATION_BATCH_INVALID") {+function fail2(message, code = "ULW_LOOP_VALIDATION_BATCH_INVALID") {throw new UlwLoopError(message, code);}// components/ulw-loop/src/checkpoint.ts-var QUALITY_GATE_FS = { existsSync: existsSync4, statSync: statSync2 };+var QUALITY_GATE_FS = { existsSync: existsSync5, statSync: statSync2 };function ulwLoopFail2(message, code) {throw new UlwLoopError(message, code);}@@ -1750,8 +1822,8 @@ async function readJsonInput2(raw, repoRoot) {if (!(error instanceof SyntaxError))throw error;}- const path = resolve3(repoRoot, trimmed);- if (!existsSync4(path))+ const path = resolve4(repoRoot, trimmed);+ if (!existsSync5(path))return ulwLoopFail2("Quality gate JSON is neither valid JSON nor a readable path.", "ulw_loop_json_input_invalid");try {return JSON.parse(await readFile3(path, "utf8"));@@ -1850,6 +1922,7 @@ async function checkpointUlwLoop(repoRoot, args, scope, dependencies) {codexGoal = validation.raw;nextActions = validation.nextActions;warnings = validation.warnings;+ acknowledgeDriverObjective(plan, validation.unacknowledgedObjective);} catch (error) {if (!(error instanceof UlwLoopError))throw error;@@ -2235,6 +2308,48 @@ function joinLines(lines) {`);}+// components/ulw-loop/src/success-criteria-input.ts+function invalid2(message, details) {+ throw new UlwLoopError(`Invalid successCriteria: ${message}`, "ULW_LOOP_ARGUMENT_INVALID", { details });+}+function isUserModel(value) {+ return typeof value === "string" && ULW_LOOP_SUCCESS_CRITERION_USER_MODELS.some((model) => model === value);+}+function requireText(value, field, index) {+ const trimmed = typeof value === "string" ? value.trim() : "";+ return trimmed || invalid2(`entry ${index + 1} needs a non-empty ${field}.`, { index, field });+}+function criterionId(index) {+ return `C${String(index + 1).padStart(3, "0")}`;+}+function criteriaFromInput(input) {+ if (input.length === 0)+ invalid2("provide at least one criterion or omit the field for placeholders.", { count: 0 });+ return input.map((entry, index) => {+ if (typeof entry !== "object" || entry === null || Array.isArray(entry))+ return invalid2(`entry ${index + 1} must be an object.`, { index });+ const record = { ...entry };+ const userModel = record["userModel"] ?? "happy";+ if (!isUserModel(userModel))+ return invalid2(`entry ${index + 1} userModel must be one of ${ULW_LOOP_SUCCESS_CRITERION_USER_MODELS.join(", ")}.`, {+ index,+ userModel: String(userModel)+ });+ const essential = record["essential"];+ if (essential !== undefined && typeof essential !== "boolean")+ return invalid2(`entry ${index + 1} essential must be a boolean.`, { index });+ return {+ id: criterionId(index),+ scenario: requireText(record["scenario"], "scenario", index),+ userModel,+ expectedEvidence: requireText(record["expectedEvidence"], "expectedEvidence", index),+ essential: essential ?? true,+ capturedEvidence: null,+ status: "pending"+ };+ });+}+// components/ulw-loop/src/plan-goal-factory.tsfunction cleanLine(line) {return line.replace(/^\s*(?:[-*+]\s+|\d+[.)]\s+)/, "").trim();@@ -2259,40 +2374,35 @@ function assertNonEmpty(value, label) {function truncateObjective(objective) {return objective.length > 80 ? `${objective.slice(0, 77).trimEnd()}...` : objective;}-function seedDefaultSuccessCriteria(goalIndex, objective) {+function replaceVia(goalId, id, surface) {+ return surface === "omo-senpi" ? `Replace via agentToolkit.steer({ kind: "revise_criterion", source: "finding", goalId: "${goalId}", criterionId: "${id}", scenario, expectedEvidence, evidence, rationale }) (or pass successCriteria to addGoal)` : `Replace via omo-agent-toolkit ulw-loop steer --kind revise_criterion --goal-id ${goalId} --criterion-id ${id} --scenario "<scenario>" --expected-evidence "<proof>" --evidence "<why>" --rationale "<why>"`;+}+function seedDefaultSuccessCriteria(goalIndex, objective, options = {}) {const subject = truncateObjective(normalizeObjective2(objective) || `Goal ${goalIndex + 1}`);+ const goalId = options.goalId ?? `G${String(goalIndex + 1).padStart(3, "0")}`;+ const surface = options.surface ?? "lazycodex";const rows = [+ ["happy", `happy path for: ${subject}`, `observable happy-path proof for goal ${goalIndex + 1}`, true],+ ["edge", "edge case (boundary/empty/malformed)", `boundary or malformed-input proof for: ${subject}`, true],[- "C001",- "happy",- `happy path for: ${subject}`,- `Replace via revise_criterion with observable happy-path proof for goal ${goalIndex + 1}.`,- true- ],- [- "C002",- "edge",- "edge case (boundary/empty/malformed)",- `Replace via revise_criterion with boundary or malformed-input proof for: ${subject}.`,- true- ],- [- "C003","regression","regression: adjacent surface still works",- `Replace via revise_criterion with regression proof for neighboring behavior after: ${subject}.`,+ `regression proof for neighboring behavior after: ${subject}`,false]];- return rows.map(([id, userModel, scenario, expectedEvidence, essential]) => ({- id,- scenario,- userModel,- expectedEvidence,- essential,- capturedEvidence: null,- status: "pending"- }));+ return rows.map(([userModel, scenario, proof, essential], index) => {+ const id = criterionId(index);+ return {+ id,+ scenario,+ userModel,+ expectedEvidence: `${replaceVia(goalId, id, surface)} with ${proof}.`,+ essential,+ capturedEvidence: null,+ status: "pending"+ };+ });}function deriveGoalCandidates(brief) {const bulletGoals = brief.split(/\r?\n/).map((line) => ({ original: line, cleaned: normalizeObjective2(cleanLine(line)) })).filter(({ cleaned }) => cleaned.length > 0 && cleaned.length <= 1200).filter(({ original, cleaned }, index, all) => /^\s*(?:[-*+]\s+|\d+[.)]\s+)/.test(original) && all.findIndex((candidate) => candidate.cleaned === cleaned) === index).map(({ cleaned }) => cleaned);@@ -2303,22 +2413,27 @@ function deriveGoalCandidates(brief) {objective}));}-function makeGoal(title, objective, index, now) {+function makeGoal(title, objective, index, now, options = {}) {const cleanTitle = assertNonEmpty(title, "title");const cleanObjective = assertNonEmpty(objective, "objective");+ const id = normalizeGoalId(cleanTitle, index);+ const successCriteria = options.successCriteria === undefined ? seedDefaultSuccessCriteria(index, cleanObjective, {+ goalId: id,+ ...options.surface === undefined ? {} : { surface: options.surface }+ }) : criteriaFromInput(options.successCriteria);return {- id: normalizeGoalId(cleanTitle, index),+ id,title: cleanTitle,objective: cleanObjective,status: "pending",- successCriteria: seedDefaultSuccessCriteria(index, cleanObjective),+ successCriteria,attempt: 0,createdAt: now,updatedAt: now};}-function appendGoalToPlan(plan, title, objective, now) {- const goal = makeGoal(title, objective, plan.goals.length, now);+function appendGoalToPlan(plan, title, objective, now, options = {}) {+ const goal = makeGoal(title, objective, plan.goals.length, now, options);plan.goals.push(goal);plan.updatedAt = now;return goal;@@ -2357,7 +2472,7 @@ async function createUlwLoopPlan(repoRoot, args, scope, surface = "lazycodex") {throw new UlwLoopError(`Refusing to overwrite existing ${ulwLoopGoalsRelativePath(scope)}; pass --force to recreate it.`, "ULW_LOOP_PLAN_EXISTS");}const now = iso();- const goals = deriveGoalCandidates(args.brief).map((goal, index) => makeGoal(goal.title, goal.objective, index, now));+ const goals = deriveGoalCandidates(args.brief).map((goal, index) => makeGoal(goal.title, goal.objective, index, now, { surface }));const plan = {version: 1,revision: existing?.revision ?? 0,@@ -2398,11 +2513,14 @@ function completedPlanExistsError(scope, surface) {]].join(" "), "ULW_LOOP_PLAN_EXISTS_COMPLETE");}-async function addUlwLoopGoal(repoRoot, args, scope) {+async function addUlwLoopGoal(repoRoot, args, scope, surface = "lazycodex") {return withUlwLoopMutationLock(repoRoot, scope, async () => {const plan = await readUlwLoopPlan(repoRoot, scope);const now = iso();- const goal = appendGoalToPlan(plan, args.title, args.objective, now);+ const goal = appendGoalToPlan(plan, args.title, args.objective, now, {+ surface,+ ...args.successCriteria === undefined ? {} : { successCriteria: args.successCriteria }+ });await commit(repoRoot, scope, {plan,entries: [{ at: now, kind: "goal_added", goalId: goal.id, status: goal.status, message: goal.title }]@@ -2570,7 +2688,7 @@ function isSource(value) {function isModel(value) {return ULW_LOOP_SUCCESS_CRITERION_USER_MODELS.some((model) => model === value);}-function fail2(message, code, details) {+function fail3(message, code, details) {throw new UlwLoopError(message, code, { details });}function kindMessage(prefix) {@@ -2584,15 +2702,15 @@ function text2(value, field) {const trimmed = value.trim();if (trimmed.length > 0)return trimmed;- return fail2(`Empty ${field}.`, "ULW_LOOP_STEERING_FIELD_EMPTY", { field });+ return fail3(`Empty ${field}.`, "ULW_LOOP_STEERING_FIELD_EMPTY", { field });}function required3(argv, flag) {const value = text2(readValue(argv, flag), flag);- return value ?? fail2(`Missing ${flag}.`, "ULW_LOOP_STEERING_FIELD_REQUIRED", { flag });+ return value ?? fail3(`Missing ${flag}.`, "ULW_LOOP_STEERING_FIELD_REQUIRED", { flag });}function requiredGoal(argv) {const value = text2(parseGoalArg(argv), "--goal-id");- return value ?? fail2("Missing --goal-id.", "ULW_LOOP_GOAL_ID_REQUIRED", { flag: "--goal-id" });+ return value ?? fail3("Missing --goal-id.", "ULW_LOOP_GOAL_ID_REQUIRED", { flag: "--goal-id" });}function readObject(value, key) {return Object.entries(value).find(([name]) => name === key)?.[1];@@ -2616,7 +2734,7 @@ function objectChildren(value, key) {for (const item of candidate) {const next = child(item);if (next === null)- return fail2(`${key} entries require title/objective.`, "ULW_LOOP_STEERING_CHILD_INVALID", { key });+ return fail3(`${key} entries require title/objective.`, "ULW_LOOP_STEERING_CHILD_INVALID", { key });parsed.push(next);}return parsed;@@ -2631,13 +2749,13 @@ function parseSteeringKind(argv) {const value = readValue(argv, "--kind");if (isKind(value))return value;- return value === undefined ? fail2(kindMessage("Missing --kind."), "ULW_LOOP_STEERING_KIND_REQUIRED", { flag: "--kind", expected: ULW_LOOP_STEERING_MUTATION_KINDS, usage: STEERING_KIND_HELP }) : fail2(kindMessage(`Invalid --kind: ${value}.`), "ULW_LOOP_STEERING_KIND_INVALID", { value, expected: ULW_LOOP_STEERING_MUTATION_KINDS, usage: STEERING_KIND_HELP });+ return value === undefined ? fail3(kindMessage("Missing --kind."), "ULW_LOOP_STEERING_KIND_REQUIRED", { flag: "--kind", expected: ULW_LOOP_STEERING_MUTATION_KINDS, usage: STEERING_KIND_HELP }) : fail3(kindMessage(`Invalid --kind: ${value}.`), "ULW_LOOP_STEERING_KIND_INVALID", { value, expected: ULW_LOOP_STEERING_MUTATION_KINDS, usage: STEERING_KIND_HELP });}function parseSteeringSource(argv) {const value = readValue(argv, "--source");if (value === undefined)return "cli";- return isSource(value) ? value : fail2(`Invalid --source: ${value}.`, "ULW_LOOP_STEERING_SOURCE_INVALID", { value, expected: SOURCES });+ return isSource(value) ? value : fail3(`Invalid --source: ${value}.`, "ULW_LOOP_STEERING_SOURCE_INVALID", { value, expected: SOURCES });}function child(value) {if (!isPlain(value))@@ -2654,12 +2772,12 @@ async function children(argv, flag, needed) {return [];const raw = await readJsonInput(input);if (!Array.isArray(raw))- return fail2(`${flag} must be a JSON array.`, "ULW_LOOP_STEERING_JSON_ARRAY_REQUIRED", { flag });+ return fail3(`${flag} must be a JSON array.`, "ULW_LOOP_STEERING_JSON_ARRAY_REQUIRED", { flag });const parsed = [];for (const item of raw) {const next = child(item);if (next === null)- return fail2(`${flag} entries require title/objective.`, "ULW_LOOP_STEERING_CHILD_INVALID", { flag });+ return fail3(`${flag} entries require title/objective.`, "ULW_LOOP_STEERING_CHILD_INVALID", { flag });parsed.push(next);}return parsed;@@ -2667,11 +2785,11 @@ async function children(argv, flag, needed) {async function stringArray2(argv, flag) {const raw = await readJsonInput(required3(argv, flag));if (!Array.isArray(raw))- return fail2(`${flag} must be a JSON array.`, "ULW_LOOP_STEERING_JSON_ARRAY_REQUIRED", { flag });+ return fail3(`${flag} must be a JSON array.`, "ULW_LOOP_STEERING_JSON_ARRAY_REQUIRED", { flag });const values = [];for (const item of raw) {if (typeof item !== "string")- return fail2(`${flag} entries must be strings.`, "ULW_LOOP_STEERING_STRING_ARRAY_REQUIRED", { flag });+ return fail3(`${flag} entries must be strings.`, "ULW_LOOP_STEERING_STRING_ARRAY_REQUIRED", { flag });values.push(text2(item, flag) ?? "");}return values;@@ -2680,10 +2798,10 @@ function model(value) {const trimmed = text2(value, "--user-model");if (trimmed === undefined)return;- return isModel(trimmed) ? trimmed : fail2(`Invalid --user-model: ${trimmed}.`, "ULW_LOOP_STEERING_USER_MODEL_INVALID", { value: trimmed, expected: ULW_LOOP_SUCCESS_CRITERION_USER_MODELS });+ return isModel(trimmed) ? trimmed : fail3(`Invalid --user-model: ${trimmed}.`, "ULW_LOOP_STEERING_USER_MODEL_INVALID", { value: trimmed, expected: ULW_LOOP_SUCCESS_CRITERION_USER_MODELS });}function neverKind(kind) {- return fail2(`Unsupported steering kind: ${String(kind)}.`, "ULW_LOOP_STEERING_KIND_UNSUPPORTED", { kind });+ return fail3(`Unsupported steering kind: ${String(kind)}.`, "ULW_LOOP_STEERING_KIND_UNSUPPORTED", { kind });}async function parseSteeringProposal(argv) {const kind = parseSteeringKind(argv);@@ -2704,7 +2822,7 @@ async function parseSteeringProposal(argv) {const revisedTitle = readValue(argv, "--title");const revisedObjective = readValue(argv, "--objective");if (revisedTitle === undefined && revisedObjective === undefined)- return fail2("revise_pending_wording requires --title or --objective.", "ULW_LOOP_STEERING_UPDATE_REQUIRED", { kind });+ return fail3("revise_pending_wording requires --title or --objective.", "ULW_LOOP_STEERING_UPDATE_REQUIRED", { kind });return normalizeSteeringProposal({ ...base, goalId, targetGoalId: goalId, ...revisedTitle === undefined ? {} : { revisedTitle }, ...revisedObjective === undefined ? {} : { revisedObjective } });}case "revise_criterion": {@@ -2714,7 +2832,7 @@ async function parseSteeringProposal(argv) {const expectedEvidence = readValue(argv, "--expected-evidence");const userModel = model(readValue(argv, "--user-model"));if (scenario === undefined && expectedEvidence === undefined && userModel === undefined)- return fail2("revise_criterion requires scenario, expected-evidence, or user-model.", "ULW_LOOP_STEERING_UPDATE_REQUIRED", { kind });+ return fail3("revise_criterion requires scenario, expected-evidence, or user-model.", "ULW_LOOP_STEERING_UPDATE_REQUIRED", { kind });return normalizeSteeringProposal({ ...base, goalId, targetGoalId: goalId, criterionId, ...scenario === undefined ? {} : { scenario }, ...expectedEvidence === undefined ? {} : { expectedEvidence }, ...userModel === undefined ? {} : { userModel } });}case "annotate_ledger":@@ -2764,10 +2882,10 @@ async function parseSteeringProposals(argv) {if (input === undefined)return [await parseSteeringProposal(argv)];if (readValue(argv, "--kind") !== undefined)- return fail2("--kind and --proposals-json are mutually exclusive.", "ULW_LOOP_STEERING_BATCH_CONFLICT", { flags: ["--kind", "--proposals-json"] });+ return fail3("--kind and --proposals-json are mutually exclusive.", "ULW_LOOP_STEERING_BATCH_CONFLICT", { flags: ["--kind", "--proposals-json"] });const raw = await readJsonInput(input);if (!Array.isArray(raw) || raw.length === 0)- return fail2("--proposals-json must be a non-empty JSON array.", "ULW_LOOP_STEERING_BATCH_ARRAY_REQUIRED", { flag: "--proposals-json" });+ return fail3("--proposals-json must be a non-empty JSON array.", "ULW_LOOP_STEERING_BATCH_ARRAY_REQUIRED", { flag: "--proposals-json" });const proposals = [];for (const item of raw)proposals.push(normalizeSteeringProposal(proposalFromObject(item)));@@ -2775,13 +2893,13 @@ async function parseSteeringProposals(argv) {}function proposalFromObject(value) {if (!isPlain(value))- return fail2("--proposals-json entries must be objects.", "ULW_LOOP_STEERING_BATCH_ITEM_INVALID", { flag: "--proposals-json" });+ return fail3("--proposals-json entries must be objects.", "ULW_LOOP_STEERING_BATCH_ITEM_INVALID", { flag: "--proposals-json" });const kind = readObject(value, "kind");const source = readObject(value, "source") ?? "cli";if (!isProposalKind(kind))- return fail2(`Invalid batch steering kind: ${String(kind)}.`, "ULW_LOOP_STEERING_KIND_INVALID", { value: kind });+ return fail3(`Invalid batch steering kind: ${String(kind)}.`, "ULW_LOOP_STEERING_KIND_INVALID", { value: kind });if (!isProposalSource(source))- return fail2(`Invalid batch steering source: ${String(source)}.`, "ULW_LOOP_STEERING_SOURCE_INVALID", { value: source });+ return fail3(`Invalid batch steering source: ${String(source)}.`, "ULW_LOOP_STEERING_SOURCE_INVALID", { value: source });let proposal = { kind, source, evidence: objectText(value, "evidence") ?? "", rationale: objectText(value, "rationale") ?? "" };const goalId = objectText(value, "goalId");const targetGoalId = objectText(value, "targetGoalId");@@ -2867,12 +2985,13 @@ function nextGoalId(plan) {}function appendBlockerGoal(plan, args, now) {const index = plan.goals.length;+ const id = nextGoalId(plan);const goal = {- id: nextGoalId(plan),+ id,title: args.title,objective: args.objective,status: "pending",- successCriteria: seedDefaultSuccessCriteria(index, args.objective),+ successCriteria: seedDefaultSuccessCriteria(index, args.objective, { goalId: id }),attempt: 0,createdAt: now,updatedAt: now@@ -2893,10 +3012,12 @@ async function recordFinalReviewBlockers(repoRoot, args, scope) {const snapshot = await readCodexGoalSnapshotInput(args.codexGoalJson, repoRoot);const reconciliation = reconcileCodexGoalSnapshot(snapshot, {expectedObjective: expectedCodexObjective(plan, goal),- acceptedObjectives: compatibleCodexObjectives(plan)+ acceptedObjectives: compatibleCodexObjectives(plan),+ acknowledgedObjectives: acknowledgedDriverObjectives(plan)});if (!reconciliation.ok)throw new CodexGoalSnapshotError(formatCodexGoalReconciliation(reconciliation));+ acknowledgeDriverObjective(plan, reconciliation.unacknowledgedObjective);const now = iso();for (const field of BLOCKER_FIELDS)Reflect.deleteProperty(goal, field);@@ -2920,8 +3041,8 @@ async function recordFinalReviewBlockers(repoRoot, args, scope) {blockedGoal: goal,newGoal,ledgerEntries,- nextActions: reconciliation.warnings,- warnings: reconciliation.warnings.filter((warning) => warning.startsWith("driver_objective_differs"))+ nextActions: reconciliation.nextActions,+ warnings: reconciliation.warnings};});}@@ -2992,11 +3113,11 @@ function nextId(plan, offset) {}, 0);return `G${String(max + offset).padStart(3, "0")}`;}-function makeGoal2(plan, childGoal, evidence, now, offset) {+function makeGoal2(plan, childGoal, evidence, now, offset, surface = "lazycodex") {const id = nextId(plan, offset);const digits = /^G(\d+)/u.exec(id)?.[1];const goalIndex = digits === undefined ? plan.goals.length + offset - 1 : Number(digits) - 1;- return { id, title: childGoal.title, objective: childGoal.objective, status: "pending", successCriteria: seedDefaultSuccessCriteria(goalIndex, childGoal.objective), attempt: 0, createdAt: now, updatedAt: now, evidence };+ return { id, title: childGoal.title, objective: childGoal.objective, status: "pending", successCriteria: seedDefaultSuccessCriteria(goalIndex, childGoal.objective, { goalId: id, surface }), attempt: 0, createdAt: now, updatedAt: now, evidence };}function reviseWording(plan, proposal, now) {const target = goal(plan, targets(proposal)[0]);@@ -3008,11 +3129,11 @@ function reviseWording(plan, proposal, now) {target.steeringRationale = proposal.rationale;target.updatedAt = now;}-function splitOrBlock(plan, proposal, now) {+function splitOrBlock(plan, proposal, now, surface = "lazycodex") {const target = goal(plan, targets(proposal)[0]);if (target === undefined)return;- const replacements = children2(proposal).map((item, index) => makeGoal2(plan, item, proposal.evidence, now, index + 1));+ const replacements = children2(proposal).map((item, index) => makeGoal2(plan, item, proposal.evidence, now, index + 1, surface));target.steeringEvidence = proposal.evidence;target.steeringRationale = proposal.rationale;target.updatedAt = now;@@ -3068,7 +3189,7 @@ function changedGoalIdsBetween(before, after) {// components/ulw-loop/src/steering.tsvar SOURCES2 = ["user_prompt_submit", "finding", "cli"];-var PROTECTED = new Set(["aggregateCompletion", "codexObjective", "codexObjectiveAliases", "originalConstraints", "qualityGate", "status", "completedAt", "completionStatus"]);+var PROTECTED = new Set(["aggregateCompletion", "codexObjective", "codexObjectiveAliases", "acknowledgedDriverObjectives", "originalConstraints", "qualityGate", "status", "completedAt", "completionStatus"]);var isObject2 = (value) => typeof value === "object" && value !== null;var isPlain2 = (value) => isObject2(value) && !Array.isArray(value);var read3 = (value, key) => Object.entries(value).find(([name]) => name === key)?.[1];@@ -3226,13 +3347,13 @@ function validateCriterion(plan, proposal, reasons) {if (model !== undefined && !isModel3(model))reasons.push("invalid userModel");}-function applySteeringMutation(plan, proposal, audit) {+function applySteeringMutation(plan, proposal, audit, surface = "lazycodex") {const next = structuredClone(plan);if (!audit.invariant.accepted)return next;const now = proposal.now?.toISOString() ?? iso();if (proposal.kind === "add_subgoal")- next.goals.push(makeGoal2(next, { title: proposal.title ?? "", objective: proposal.objective ?? "" }, proposal.evidence, now, 1));+ next.goals.push(makeGoal2(next, { title: proposal.title ?? "", objective: proposal.objective ?? "" }, proposal.evidence, now, 1, surface));if (proposal.kind === "reorder_pending") {const order = pendingOrder(proposal);next.goals = [...order.map((id) => goal2(next, id)).filter((item) => item !== undefined), ...next.goals.filter((item) => !order.includes(item.id))];@@ -3240,7 +3361,7 @@ function applySteeringMutation(plan, proposal, audit) {if (proposal.kind === "revise_pending_wording")reviseWording(next, proposal, now);if (proposal.kind === "split_subgoal" || proposal.kind === "mark_blocked_superseded")- splitOrBlock(next, proposal, now);+ splitOrBlock(next, proposal, now, surface);if (proposal.kind === "revise_criterion")reviseCriterion(next, proposal, now);if (proposal.kind !== "annotate_ledger")@@ -3263,7 +3384,7 @@ function parseUlwLoopSteeringDirective(text) {throw error;}}-async function steerUlwLoop(repoRoot, proposal, scope) {+async function steerUlwLoop(repoRoot, proposal, scope, surface = "lazycodex") {return withUlwLoopMutationLock(repoRoot, scope, async () => {const plan = await readUlwLoopPlan(repoRoot, scope);const key = proposal.idempotencyKey ?? proposal.promptSignature;@@ -3274,7 +3395,7 @@ async function steerUlwLoop(repoRoot, proposal, scope) {}const audit = validateUlwLoopSteeringProposal(plan, proposal);const accepted = audit.invariant.accepted;- const next = accepted ? applySteeringMutation(plan, proposal, audit) : plan;+ const next = accepted ? applySteeringMutation(plan, proposal, audit, surface) : plan;const finalAudit = { ...audit };if (accepted) {const changed = changedGoalIdsBetween(plan, next);@@ -3303,20 +3424,119 @@ function ledgerEntry(proposal, audit, at) {}// components/ulw-loop/src/sdk/manifest.ts+var CRITERION_INPUT = '{ scenario: string, expectedEvidence: string, userModel?: "happy" | "edge" | "regression" | "adversarial", essential?: boolean }';+var STEER_KINDS = '"add_subgoal" | "split_subgoal" | "reorder_pending" | "revise_pending_wording" | "revise_criterion" | "annotate_ledger" | "mark_blocked_superseded"';var ULW_LOOP_MANIFEST = {version: 1,name: "ulw-loop",operations: [- { name: "help", mutating: false },- { name: "create-goals", mutating: true },- { name: "status", mutating: false },- { name: "complete-goals", mutating: true },- { name: "checkpoint", mutating: true },- { name: "steer", mutating: true },- { name: "add-goal", mutating: true },- { name: "criteria", mutating: false },- { name: "record-evidence", mutating: true },- { name: "record-review-blockers", mutating: true }+ {+ name: "help",+ method: "help",+ mutating: false,+ description: "Return this manifest: every operation with its method name, argument fields, and what it does.",+ args: {}+ },+ {+ name: "create-goals",+ method: "createGoals",+ mutating: true,+ description: "Create the session plan from a brief; one goal per bullet, each seeded with placeholder criteria until revised.",+ args: {+ brief: "string",+ codexGoalMode: '"aggregate" | "per_story"?',+ force: "boolean?",+ validationBatchesJson: "string?"+ }+ },+ {+ name: "status",+ method: "status",+ mutating: false,+ description: "Read the plan, its summary, structured nextActions, the stable evidenceRoot, and the active goal's currentAttemptDir.",+ args: {}+ },+ {+ name: "complete-goals",+ method: "completeGoals",+ mutating: true,+ description: "Acquire the next eligible goal or resume the in-progress one; returns { done: true } once the aggregate is complete.",+ args: { retryFailed: "boolean?" }+ },+ {+ name: "checkpoint",+ method: "checkpoint",+ mutating: true,+ description: "Close the goal as complete, failed, or blocked with evidence; the final goal also needs the quality gate. printTemplate returns that gate's template instead.",+ args: {+ goalId: "string",+ status: '"complete" | "failed" | "blocked"',+ evidence: "string",+ codexGoalJson: "string?",+ qualityGateJson: "string?",+ printTemplate: "true? (with goalId? only)"+ }+ },+ {+ name: "steer",+ method: "steer",+ mutating: true,+ description: "Propose an evidence-backed plan mutation; revise_criterion replaces a criterion's scenario, expectedEvidence, or userModel.",+ args: {+ kind: STEER_KINDS,+ source: '"finding" | "user_prompt_submit" | "cli"',+ evidence: "string",+ rationale: "string",+ goalId: "string?",+ criterionId: "string? (revise_criterion)",+ scenario: "string? (revise_criterion)",+ expectedEvidence: "string? (revise_criterion)",+ userModel: '"happy" | "edge" | "regression" | "adversarial"? (revise_criterion)',+ title: "string? (add_subgoal)",+ objective: "string? (add_subgoal)",+ childGoals: "{ title: string, objective: string }[]? (split_subgoal)",+ revisedTitle: "string? (revise_pending_wording)",+ revisedObjective: "string? (revise_pending_wording)",+ pendingOrder: "string[]? (reorder_pending)",+ blockedReason: "string? (mark_blocked_superseded)",+ idempotencyKey: "string?"+ }+ },+ {+ name: "add-goal",+ method: "addGoal",+ mutating: true,+ description: "Append a goal; pass successCriteria to define its criteria in the same call, otherwise placeholders name the revise call.",+ args: { title: "string", objective: "string", successCriteria: `${CRITERION_INPUT}[]?` }+ },+ {+ name: "criteria",+ method: "criteria",+ mutating: false,+ description: "List one goal's success criteria with their status and captured evidence.",+ args: { goalId: "string" }+ },+ {+ name: "record-evidence",+ method: "recordEvidence",+ mutating: true,+ description: "Record a criterion's pass, fail, or blocked evidence; artifacts must exist (resolved against the session cwd) and are stored with the criterion and the ledger entry.",+ args: {+ goalId: "string",+ criterionId: "string",+ status: '"pass" | "fail" | "blocked"',+ evidence: "string",+ notes: "string?",+ artifacts: "string[]?"+ }+ },+ {+ name: "record-review-blockers",+ method: "recordReviewBlockers",+ mutating: true,+ description: "Mark the final goal review_blocked and append the blocker goal the reviewer verdict names.",+ args: { goalId: "string", title: "string", objective: "string", evidence: "string", codexGoalJson: "string?" }+ }]};@@ -3358,10 +3578,11 @@ function isKnownRequest(request) {function unreachable(value) {throw new UlwLoopError(`Unhandled operation: ${String(value)}`, "ULW_LOOP_OPERATION_UNHANDLED");}-function nextActionsFrom(result) {- if (!("nextActions" in result) || !Array.isArray(result.nextActions))+function stringsFrom(result, key) {+ if (!(key in result))return [];- return result.nextActions.filter((action) => typeof action === "string").slice(0, 8);+ const value = Object.entries(result).find(([name]) => name === key)?.[1];+ return Array.isArray(value) ? value.filter((item) => typeof item === "string").slice(0, 8) : [];}function checkpointWithValidatedSnapshot(context, scope, args) {validateCodexGoalJson(args.codexGoalJson);@@ -3378,8 +3599,15 @@ function createAgentToolkit(context, deps = {}) {const invoke = async (operation, fn) => {try {const result = await fn();- const nextActions = typeof result === "object" && result !== null ? nextActionsFrom(result) : [];- return await notify(operation, { ok: true, operation, result, nextActions });+ const nextActions = typeof result === "object" && result !== null ? stringsFrom(result, "nextActions") : [];+ const warnings = typeof result === "object" && result !== null ? stringsFrom(result, "warnings") : [];+ return await notify(operation, {+ ok: true,+ operation,+ result,+ nextActions,+ ...warnings.length === 0 ? {} : { warnings }+ });} catch (error) {if (error instanceof UlwLoopError && error.code === "ULW_LOOP_PLAN_MISSING" && context.surface === "omo-senpi")return notify(operation, failure(operation, planMissingError(ulwLoopGoalsRelativePath(scope), listUlwLoopSessionIds(context.cwd), context.surface)));@@ -3425,13 +3653,14 @@ function createAgentToolkit(context, deps = {}) {plan,summary: summarizeUlwLoopPlan(plan),nextActions: statusNextActions(plan, context.surface),+ evidenceRoot: ulwLoopEvidenceRoot(scope),...active === undefined || plan.evidenceLayoutVersion !== 2 ? {} : { currentAttemptDir: ulwLoopAttemptEvidenceDir(active.id, active.attempt, scope) }};}),completeGoals: (args = {}) => invoke("complete-goals", () => startNextUlwLoop(context.cwd, args, scope)),checkpoint: (args) => invoke("checkpoint", () => args.printTemplate === true ? checkpointTemplate(context.cwd, scope, args.goalId, { surface: context.surface }) : checkpointWithValidatedSnapshot(context, scope, args)),- steer: (args) => invoke("steer", () => steerUlwLoop(context.cwd, args, scope)),- addGoal: (args) => invoke("add-goal", () => addUlwLoopGoal(context.cwd, args, scope)),+ steer: (args) => invoke("steer", () => steerUlwLoop(context.cwd, args, scope, context.surface)),+ addGoal: (args) => invoke("add-goal", () => addUlwLoopGoal(context.cwd, args, scope, context.surface)),criteria: (args) => invoke("criteria", async () => {const plan = await readUlwLoopPlan(context.cwd, scope);const goal = plan.goals.find((candidate) => candidate.id === args.goalId);@@ -3798,7 +4027,7 @@ function commandScope(repoRoot, argv) {import { readFileSync as readFileSync5 } from "node:fs";// components/ulw-loop/src/ultrawork-skill-pointer.ts-import { existsSync as existsSync5, readFileSync as readFileSync4 } from "node:fs";+import { existsSync as existsSync6, readFileSync as readFileSync4 } from "node:fs";import { fileURLToPath as fileURLToPath2 } from "node:url";var ULTRAWORK_SKILL_POINTER_TEMPLATE = `<ultrawork-mode>ULTRAWORK MODE IS ACTIVE FOR THIS TASK.@@ -3839,7 +4068,7 @@ function buildUltraworkSkillPointer(skillFilePath) {}function buildUltraworkAdditionalContext(options = {}) {const skillFilePath = options.skillFilePath === undefined ? resolveUltraworkSkillFilePath() : options.skillFilePath;- if (skillFilePath !== null && existsSync5(skillFilePath)) {+ if (skillFilePath !== null && existsSync6(skillFilePath)) {return buildUltraworkSkillPointer(skillFilePath);}return ULTRAWORK_DIRECTIVE;@@ -4091,7 +4320,7 @@ import { join as join7 } from "node:path";// components/ulw-loop/src/spawn-budget-io.tsimport { randomBytes } from "node:crypto";-import { existsSync as existsSync6, readFileSync as readFileSync6, renameSync as renameSync2, statSync as statSync3, writeFileSync as writeFileSync2 } from "node:fs";+import { existsSync as existsSync7, readFileSync as readFileSync6, renameSync as renameSync2, statSync as statSync3, writeFileSync as writeFileSync2 } from "node:fs";import { dirname as dirname3, join as join6 } from "node:path";function readAdmissionBreaker(sessionId) {const dataDir = process.env["PLUGIN_DATA"];@@ -4111,7 +4340,7 @@ function atomicWriteJson(targetPath, data) {}function isNonEmptyFile(path) {try {- return existsSync6(path) && statSync3(path).size > 0;+ return existsSync7(path) && statSync3(path).size > 0;} catch (error) {if (error instanceof Error)return false;@@ -4409,8 +4638,8 @@ function readPlan(repoRoot, sessionId) {}// components/ulw-loop/src/stop-resume-hook.ts-import { existsSync as existsSync7, readFileSync as readFileSync7, writeFileSync as writeFileSync3 } from "node:fs";-import { isAbsolute as isAbsolute2, join as join8, resolve as resolve4, sep as sep2 } from "node:path";+import { existsSync as existsSync8, readFileSync as readFileSync7, writeFileSync as writeFileSync3 } from "node:fs";+import { isAbsolute as isAbsolute3, join as join8, resolve as resolve5, sep as sep3 } from "node:path";var RESUME_CAP = 2;var CONTEXT_PRESSURE_MARKERS2 = ["context compacted",@@ -4478,8 +4707,8 @@ function consumeResumeBudgetLocked(lockPath, stateDir, goalId) {}function consumeResumeBudget(stateDir, goalId) {const ledgerLineCount = readLedgerAt(stateDir).length;- const counterPath = resolve4(stateDir, `auto-resume-${goalId}.json`);- const stuckPath = resolve4(stateDir, `auto-resume-${goalId}.stuck`);+ const counterPath = resolve5(stateDir, `auto-resume-${goalId}.json`);+ const stuckPath = resolve5(stateDir, `auto-resume-${goalId}.stuck`);if (!isInsideDir(stateDir, counterPath) || !isInsideDir(stateDir, stuckPath))return false;const previous = readCounter(counterPath);@@ -4493,7 +4722,7 @@ function consumeResumeBudget(stateDir, goalId) {return true;}function isInsideDir(dir, candidate) {- return candidate.startsWith(resolve4(dir) + sep2);+ return candidate.startsWith(resolve5(dir) + sep3);}function renderResumeDirective(plan, goal, sessionId) {const normalized = normalizeUlwLoopSessionId(sessionId);@@ -4519,7 +4748,7 @@ function readPlan2(repoRoot, sessionId) {}function readCounter(counterPath) {try {- if (!existsSync7(counterPath))+ if (!existsSync8(counterPath))return null;const parsed = JSON.parse(readFileSync7(counterPath, "utf8"));if (typeof parsed["count"] !== "number" || typeof parsed["ledgerLineCount"] !== "number")@@ -4564,9 +4793,9 @@ function boulderPlanHasChecklist(cwd, entry) {const activePlan = entry["active_plan"];if (typeof activePlan !== "string" || activePlan.trim().length === 0)return false;- const planPath = isAbsolute2(activePlan) ? activePlan : join8(cwd, activePlan);+ const planPath = isAbsolute3(activePlan) ? activePlan : join8(cwd, activePlan);const worktree = entry["worktree_path"];- const candidates = typeof worktree === "string" && worktree.trim().length > 0 && !isAbsolute2(activePlan) ? [join8(isAbsolute2(worktree) ? worktree : join8(cwd, worktree), activePlan), planPath] : [planPath];+ const candidates = typeof worktree === "string" && worktree.trim().length > 0 && !isAbsolute3(activePlan) ? [join8(isAbsolute3(worktree) ? worktree : join8(cwd, worktree), activePlan), planPath] : [planPath];for (const candidate of candidates) {try {return readFileSync7(candidate, "utf8").split(/\r?\n/).some((line) => line.startsWith("- [ ] ") || line.startsWith("- [x] ") || line.startsWith("- [X] "));diff --git a/plugins/omo/components/ulw-loop/dist/codex-goal-snapshot.d.ts b/plugins/omo/components/ulw-loop/dist/codex-goal-snapshot.d.tsindex c95f3eb2..e72fbc22 100644--- a/plugins/omo/components/ulw-loop/dist/codex-goal-snapshot.d.ts+++ b/plugins/omo/components/ulw-loop/dist/codex-goal-snapshot.d.ts@@ -8,12 +8,18 @@ export interface CodexGoalSnapshot {export interface CodexGoalReconciliation {ok: boolean;snapshot: CodexGoalSnapshot;+ /** Facts to know (a differing driver objective); never something to do. */warnings: string[];+ /** Things to do next (create, re-create, or resume the driver goal). */+ nextActions: string[];errors: string[];+ /** The differing objective this reconciliation reported for the first time, for the caller to acknowledge. */+ unacknowledgedObjective?: string;}export interface ReconcileCodexGoalOptions {expectedObjective: string;readonly acceptedObjectives?: readonly string[];+ readonly acknowledgedObjectives?: readonly string[];}export declare class CodexGoalSnapshotError extends Error {}diff --git a/plugins/omo/components/ulw-loop/dist/codex-goal-snapshot.js b/plugins/omo/components/ulw-loop/dist/codex-goal-snapshot.jsindex c488682a..8d5ad74b 100644--- a/plugins/omo/components/ulw-loop/dist/codex-goal-snapshot.js+++ b/plugins/omo/components/ulw-loop/dist/codex-goal-snapshot.js@@ -73,29 +73,37 @@ export function reconcileCodexGoalSnapshot(snapshot, options) {const effectiveSnapshot = snapshot ?? { available: false, raw: null };const errors = [];const warnings = [];+ const nextActions = [];const expected = options.expectedObjective;- const normalizedExpected = normalizeObjective(expected);if (!effectiveSnapshot.available) {- warnings.push(`call get_goal; if none, create_goal with codexObjective "${expected}" verbatim`);- return { ok: errors.length === 0, snapshot: effectiveSnapshot, warnings, errors };+ nextActions.push(`call get_goal; if none, create_goal with codexObjective "${expected}" verbatim`);+ return { ok: errors.length === 0, snapshot: effectiveSnapshot, warnings, nextActions, errors };}- const accepted = new Set([- normalizedExpected,- ...(options.acceptedObjectives ?? []).map((objective) => normalizeObjective(objective)),- ].filter(Boolean));+ const normalized = (objectives) => new Set(objectives.map(normalizeObjective).filter(Boolean));+ const accepted = normalized([expected, ...(options.acceptedObjectives ?? [])]);+ const acknowledged = normalized(options.acknowledgedObjectives ?? []);const actual = normalizeObjective(effectiveSnapshot.objective ?? "");- if (actual && !accepted.has(normalizeObjective(actual))) {+ let unacknowledgedObjective;+ if (actual && !accepted.has(actual) && !acknowledged.has(actual)) {warnings.push(`driver_objective_differs: expected "${expected}", got "${actual}".`);+ unacknowledgedObjective = actual;}const actualStatus = effectiveSnapshot.status ?? "unknown";if (actualStatus === "paused" || actualStatus === "usage_limited" || actualStatus === "budget_limited") {- warnings.push("/goal resume or raise the budget");+ nextActions.push("/goal resume or raise the budget");}if (actualStatus === "complete")- warnings.push(`driver closed early: call create_goal with codexObjective "${expected}" verbatim`);- return { ok: errors.length === 0, snapshot: effectiveSnapshot, warnings, errors };+ nextActions.push(`driver closed early: call create_goal with codexObjective "${expected}" verbatim`);+ return {+ ok: errors.length === 0,+ snapshot: effectiveSnapshot,+ warnings,+ nextActions,+ errors,+ ...(unacknowledgedObjective === undefined ? {} : { unacknowledgedObjective }),+ };}export function formatCodexGoalReconciliation(reconciliation) {- const parts = [...reconciliation.errors, ...reconciliation.warnings];+ const parts = [...reconciliation.errors, ...reconciliation.nextActions, ...reconciliation.warnings];return parts.join(" ");}diff --git a/plugins/omo/components/ulw-loop/dist/domain-types.d.ts b/plugins/omo/components/ulw-loop/dist/domain-types.d.tsindex 899a4c91..0d3fd1bb 100644--- a/plugins/omo/components/ulw-loop/dist/domain-types.d.ts+++ b/plugins/omo/components/ulw-loop/dist/domain-types.d.ts@@ -10,6 +10,7 @@ export interface UlwLoopSuccessCriterion {status: UlwLoopCriterionStatus;capturedAt?: string;notes?: string;+ artifacts?: string[];}export interface UlwLoopItem {id: string;@@ -62,6 +63,7 @@ export interface UlwLoopPlan {codexGoalMode?: UlwLoopCodexGoalMode;codexObjective?: string;codexObjectiveAliases?: string[];+ acknowledgedDriverObjectives?: string[];aggregateCompletion?: UlwLoopAggregateCompletion;activeGoalId?: string;validationBatches?: readonly UlwLoopValidationBatch[];@@ -151,6 +153,7 @@ export interface UlwLoopLedgerEntry {codexGoal?: unknown;evidence?: string;capturedEvidence?: string;+ artifacts?: string[];qualityGate?: unknown;steering?: UlwLoopSteeringAudit;before?: unknown;diff --git a/plugins/omo/components/ulw-loop/dist/driver-objective-ack.d.ts b/plugins/omo/components/ulw-loop/dist/driver-objective-ack.d.tsnew file mode 100644index 00000000..4c98d04a--- /dev/null+++ b/plugins/omo/components/ulw-loop/dist/driver-objective-ack.d.ts@@ -0,0 +1,4 @@+import type { UlwLoopPlan } from "./types.js";+export declare function normalizeDriverObjective(value: string): string;+export declare function acknowledgedDriverObjectives(plan: UlwLoopPlan): readonly string[];+export declare function acknowledgeDriverObjective(plan: UlwLoopPlan, objective: string | undefined): boolean;diff --git a/plugins/omo/components/ulw-loop/dist/driver-objective-ack.js b/plugins/omo/components/ulw-loop/dist/driver-objective-ack.jsnew file mode 100644index 00000000..4bbae0b8--- /dev/null+++ b/plugins/omo/components/ulw-loop/dist/driver-objective-ack.js@@ -0,0 +1,18 @@+export function normalizeDriverObjective(value) {+ return value.replace(/\s+/g, " ").trim();+}+export function acknowledgedDriverObjectives(plan) {+ return plan.acknowledgedDriverObjectives ?? [];+}+// A differing driver objective is reported once; the plan remembers the exact text so every later+// checkpoint under the same driver stays quiet, while a driver rewritten to a third objective is+// reported again.+export function acknowledgeDriverObjective(plan, objective) {+ if (objective === undefined)+ return false;+ const normalized = normalizeDriverObjective(objective);+ if (!normalized || acknowledgedDriverObjectives(plan).includes(normalized))+ return false;+ plan.acknowledgedDriverObjectives = [...acknowledgedDriverObjectives(plan), normalized];+ return true;+}diff --git a/plugins/omo/components/ulw-loop/dist/evidence-artifacts.d.ts b/plugins/omo/components/ulw-loop/dist/evidence-artifacts.d.tsnew file mode 100644index 00000000..cccc6dbc--- /dev/null+++ b/plugins/omo/components/ulw-loop/dist/evidence-artifacts.d.ts@@ -0,0 +1 @@+export declare function resolveEvidenceArtifacts(repoRoot: string, artifacts: readonly unknown[] | undefined): string[] | undefined;diff --git a/plugins/omo/components/ulw-loop/dist/evidence-artifacts.js b/plugins/omo/components/ulw-loop/dist/evidence-artifacts.jsnew file mode 100644index 00000000..f1c94e51--- /dev/null+++ b/plugins/omo/components/ulw-loop/dist/evidence-artifacts.js@@ -0,0 +1,37 @@+import { existsSync } from "node:fs";+import { isAbsolute, relative, resolve, sep } from "node:path";+import { UlwLoopError } from "./types.js";+function fail(message, code, details) {+ throw new UlwLoopError(message, code, { details });+}+function stored(repoRoot, absolute) {+ const rel = relative(repoRoot, absolute);+ const inside = rel !== "" && !rel.startsWith("..") && !isAbsolute(rel);+ return inside ? rel.split(sep).join("/") : absolute;+}+// Artifacts are bound at record time: a cited path that does not exist is a claim without a file,+// so the whole record is refused before any state changes. Paths inside the session cwd persist+// repo-relative (portable across machines); paths outside persist absolute.+export function resolveEvidenceArtifacts(repoRoot, artifacts) {+ if (artifacts === undefined)+ return undefined;+ const seen = new Set();+ const resolved = [];+ for (const [index, candidate] of artifacts.entries()) {+ const path = typeof candidate === "string" ? candidate.trim() : "";+ if (!path)+ fail(`Artifact ${index + 1} must be a non-empty path.`, "ULW_LOOP_ARGUMENT_INVALID", { index });+ const absolute = resolve(repoRoot, path);+ if (!existsSync(absolute))+ fail(`Evidence artifact does not exist: ${path} (resolved to ${absolute}).`, "ULW_LOOP_EVIDENCE_ARTIFACT_MISSING", {+ path,+ resolved: absolute,+ });+ const value = stored(repoRoot, absolute);+ if (!seen.has(value)) {+ seen.add(value);+ resolved.push(value);+ }+ }+ return resolved;+}diff --git a/plugins/omo/components/ulw-loop/dist/evidence.d.ts b/plugins/omo/components/ulw-loop/dist/evidence.d.tsindex 686b11b6..02d9e6f7 100644--- a/plugins/omo/components/ulw-loop/dist/evidence.d.ts+++ b/plugins/omo/components/ulw-loop/dist/evidence.d.ts@@ -7,6 +7,7 @@ type RecordEvidenceArgs = {readonly status: EvidenceStatus;readonly evidence: string;readonly notes?: string;+ readonly artifacts?: readonly string[];};export declare function recordEvidence(repoRoot: string, args: RecordEvidenceArgs, scope?: UlwLoopScope): Promise<{plan: UlwLoopPlan;diff --git a/plugins/omo/components/ulw-loop/dist/evidence.js b/plugins/omo/components/ulw-loop/dist/evidence.jsindex 1f892cbe..488e2181 100644--- a/plugins/omo/components/ulw-loop/dist/evidence.js+++ b/plugins/omo/components/ulw-loop/dist/evidence.js@@ -1,3 +1,4 @@+import { resolveEvidenceArtifacts } from "./evidence-artifacts.js";import { essentialCriteriaOf, hasAllCriteriaPass, hasEssentialCriteriaPass } from "./goal-status.js";import { commit } from "./plan-commit.js";import { readUlwLoopPlan, withUlwLoopMutationLock } from "./plan-io.js";@@ -39,6 +40,7 @@ export async function recordEvidence(repoRoot, args, scope) {const goal = findGoal(plan, args.goalId);const criterion = findCriterion(goal, args.criterionId);const evidence = nonEmptyEvidence(args.evidence);+ const artifacts = resolveEvidenceArtifacts(repoRoot, args.artifacts);const kind = ledgerKind(args.status);const prevStatus = criterion.status;const capturedAt = iso();@@ -47,6 +49,10 @@ export async function recordEvidence(repoRoot, args, scope) {criterion.capturedAt = capturedAt;if (args.notes !== undefined)criterion.notes = args.notes;+ if (artifacts !== undefined)+ criterion.artifacts = artifacts;+ else+ delete criterion.artifacts;goal.updatedAt = capturedAt;plan.updatedAt = capturedAt;const ledgerEntry = {@@ -57,6 +63,7 @@ export async function recordEvidence(repoRoot, args, scope) {criterionStatus: args.status,evidence,capturedEvidence: evidence,+ ...(artifacts === undefined ? {} : { artifacts }),before: { status: prevStatus },after: { goalId: goal.id, criterionId: criterion.id, status: args.status, evidence, capturedAt, prevStatus },};@@ -80,6 +87,7 @@ export async function markCriteriaPendingResetForGoal(repoRoot, goalId, scope) {criterion.capturedEvidence = null;delete criterion.capturedAt;delete criterion.notes;+ delete criterion.artifacts;}goal.updatedAt = now;plan.updatedAt = now;diff --git a/plugins/omo/components/ulw-loop/dist/paths.d.ts b/plugins/omo/components/ulw-loop/dist/paths.d.tsindex 15a957b8..2dfeef9f 100644--- a/plugins/omo/components/ulw-loop/dist/paths.d.ts+++ b/plugins/omo/components/ulw-loop/dist/paths.d.ts@@ -14,6 +14,7 @@ export declare function ulwLoopGoalsPath(repoRoot: string, scope?: UlwLoopScope)export declare function ulwLoopLedgerPath(repoRoot: string, scope?: UlwLoopScope): string;export declare function ulwLoopStateLockPath(repoRoot: string, scope?: UlwLoopScope): string;export declare function repoRelative(absolutePath: string, repoRoot: string): string;+export declare function ulwLoopEvidenceRoot(scope?: UlwLoopScope): string;export declare function ulwLoopAttemptEvidenceDir(goalId: string, attempt: number, scope?: UlwLoopScope): string;interface AttemptPathApi {relative(from: string, to: string): string;diff --git a/plugins/omo/components/ulw-loop/dist/paths.js b/plugins/omo/components/ulw-loop/dist/paths.jsindex 3f1b8ef1..e4594d9e 100644--- a/plugins/omo/components/ulw-loop/dist/paths.js+++ b/plugins/omo/components/ulw-loop/dist/paths.js@@ -62,6 +62,12 @@ export function repoRelative(absolutePath, repoRoot) {return absolutePath.slice(backslashPrefix.length).split("\\").join("/");return absolutePath.split("\\").join("/");}+// The plan-level evidence root stays fixed for the whole run, unlike the per-goal attempt dir, so+// long lanes that span goals have one stable place to write artifacts.+export function ulwLoopEvidenceRoot(scope) {+ const sessionId = normalizeUlwLoopSessionId(scope?.sessionId);+ return sessionId === null ? ".omo/evidence" : `.omo/evidence/ulw/${sessionId}`;+}// Both the status --json emitter and the checkpoint enforcement resolve the attempt dir through// this function from the scope alone; a second resolution path (env, a literal placeholder)// would let the gate reject its own advertised directory.diff --git a/plugins/omo/components/ulw-loop/dist/plan-crud.d.ts b/plugins/omo/components/ulw-loop/dist/plan-crud.d.tsindex 25644414..9261327d 100644--- a/plugins/omo/components/ulw-loop/dist/plan-crud.d.ts+++ b/plugins/omo/components/ulw-loop/dist/plan-crud.d.ts@@ -1,7 +1,9 @@import { type UlwLoopScope } from "./paths.js";+import type { SuccessCriterionInput } from "./success-criteria-input.js";import type { UlwLoopToolkitSurface } from "./surface.js";import type { UlwLoopCodexGoalMode, UlwLoopItem, UlwLoopPlan } from "./types.js";export { deriveGoalCandidates, seedDefaultSuccessCriteria } from "./plan-goal-factory.js";+export type { SuccessCriterionInput } from "./success-criteria-input.js";export type UlwLoopPlanSummary = {readonly total: number;readonly pending: number;@@ -29,7 +31,8 @@ export declare function createUlwLoopPlan(repoRoot: string, args: {export declare function addUlwLoopGoal(repoRoot: string, args: {title: string;objective: string;-}, scope?: UlwLoopScope): Promise<{+ successCriteria?: readonly SuccessCriterionInput[];+}, scope?: UlwLoopScope, surface?: UlwLoopToolkitSurface): Promise<{plan: UlwLoopPlan;goal: UlwLoopItem;}>;diff --git a/plugins/omo/components/ulw-loop/dist/plan-crud.js b/plugins/omo/components/ulw-loop/dist/plan-crud.jsindex e2435d39..5ccc6302 100644--- a/plugins/omo/components/ulw-loop/dist/plan-crud.js+++ b/plugins/omo/components/ulw-loop/dist/plan-crud.js@@ -39,7 +39,7 @@ export async function createUlwLoopPlan(repoRoot, args, scope, surface = "lazycothrow new UlwLoopError(`Refusing to overwrite existing ${ulwLoopGoalsRelativePath(scope)}; pass --force to recreate it.`, "ULW_LOOP_PLAN_EXISTS");}const now = iso();- const goals = deriveGoalCandidates(args.brief).map((goal, index) => makeGoal(goal.title, goal.objective, index, now));+ const goals = deriveGoalCandidates(args.brief).map((goal, index) => makeGoal(goal.title, goal.objective, index, now, { surface }));const plan = {version: 1,revision: existing?.revision ?? 0,@@ -80,11 +80,14 @@ function completedPlanExistsError(scope, surface) {]),].join(" "), "ULW_LOOP_PLAN_EXISTS_COMPLETE");}-export async function addUlwLoopGoal(repoRoot, args, scope) {+export async function addUlwLoopGoal(repoRoot, args, scope, surface = "lazycodex") {return withUlwLoopMutationLock(repoRoot, scope, async () => {const plan = await readUlwLoopPlan(repoRoot, scope);const now = iso();- const goal = appendGoalToPlan(plan, args.title, args.objective, now);+ const goal = appendGoalToPlan(plan, args.title, args.objective, now, {+ surface,+ ...(args.successCriteria === undefined ? {} : { successCriteria: args.successCriteria }),+ });await commit(repoRoot, scope, {plan,entries: [{ at: now, kind: "goal_added", goalId: goal.id, status: goal.status, message: goal.title }],diff --git a/plugins/omo/components/ulw-loop/dist/plan-goal-factory.d.ts b/plugins/omo/components/ulw-loop/dist/plan-goal-factory.d.tsindex a1c1f81b..58c734c4 100644--- a/plugins/omo/components/ulw-loop/dist/plan-goal-factory.d.ts+++ b/plugins/omo/components/ulw-loop/dist/plan-goal-factory.d.ts@@ -1,8 +1,15 @@+import { type SuccessCriterionInput } from "./success-criteria-input.js";+import type { UlwLoopToolkitSurface } from "./surface.js";import type { UlwLoopItem, UlwLoopPlan, UlwLoopSuccessCriterion } from "./types.js";-export declare function seedDefaultSuccessCriteria(goalIndex: number, objective: string): UlwLoopSuccessCriterion[];+export interface GoalSeedOptions {+ readonly goalId?: string;+ readonly surface?: UlwLoopToolkitSurface;+ readonly successCriteria?: readonly SuccessCriterionInput[];+}+export declare function seedDefaultSuccessCriteria(goalIndex: number, objective: string, options?: Pick<GoalSeedOptions, "goalId" | "surface">): UlwLoopSuccessCriterion[];export declare function deriveGoalCandidates(brief: string): Array<{title: string;objective: string;}>;-export declare function makeGoal(title: string, objective: string, index: number, now: string): UlwLoopItem;-export declare function appendGoalToPlan(plan: UlwLoopPlan, title: string, objective: string, now: string): UlwLoopItem;+export declare function makeGoal(title: string, objective: string, index: number, now: string, options?: GoalSeedOptions): UlwLoopItem;+export declare function appendGoalToPlan(plan: UlwLoopPlan, title: string, objective: string, now: string, options?: GoalSeedOptions): UlwLoopItem;diff --git a/plugins/omo/components/ulw-loop/dist/plan-goal-factory.js b/plugins/omo/components/ulw-loop/dist/plan-goal-factory.jsindex 8c1e1c8a..1c8b8d81 100644--- a/plugins/omo/components/ulw-loop/dist/plan-goal-factory.js+++ b/plugins/omo/components/ulw-loop/dist/plan-goal-factory.js@@ -1,3 +1,4 @@+import { criteriaFromInput, criterionId } from "./success-criteria-input.js";import { UlwLoopError } from "./types.js";function cleanLine(line) {return line.replace(/^\s*(?:[-*+]\s+|\d+[.)]\s+)/, "").trim();@@ -30,40 +31,39 @@ function assertNonEmpty(value, label) {function truncateObjective(objective) {return objective.length > 80 ? `${objective.slice(0, 77).trimEnd()}...` : objective;}-export function seedDefaultSuccessCriteria(goalIndex, objective) {+// The placeholder must name the exact call that replaces it on the surface the plan is driven from,+// so a goal seeded without criteria costs one documented call per criterion instead of a doc hunt.+function replaceVia(goalId, id, surface) {+ return surface === "omo-senpi"+ ? `Replace via agentToolkit.steer({ kind: "revise_criterion", source: "finding", goalId: "${goalId}", criterionId: "${id}", scenario, expectedEvidence, evidence, rationale }) (or pass successCriteria to addGoal)`+ : `Replace via omo-agent-toolkit ulw-loop steer --kind revise_criterion --goal-id ${goalId} --criterion-id ${id} --scenario "<scenario>" --expected-evidence "<proof>" --evidence "<why>" --rationale "<why>"`;+}+export function seedDefaultSuccessCriteria(goalIndex, objective, options = {}) {const subject = truncateObjective(normalizeObjective(objective) || `Goal ${goalIndex + 1}`);+ const goalId = options.goalId ?? `G${String(goalIndex + 1).padStart(3, "0")}`;+ const surface = options.surface ?? "lazycodex";const rows = [+ ["happy", `happy path for: ${subject}`, `observable happy-path proof for goal ${goalIndex + 1}`, true],+ ["edge", "edge case (boundary/empty/malformed)", `boundary or malformed-input proof for: ${subject}`, true],[- "C001",- "happy",- `happy path for: ${subject}`,- `Replace via revise_criterion with observable happy-path proof for goal ${goalIndex + 1}.`,- true,- ],- [- "C002",- "edge",- "edge case (boundary/empty/malformed)",- `Replace via revise_criterion with boundary or malformed-input proof for: ${subject}.`,- true,- ],- [- "C003","regression","regression: adjacent surface still works",- `Replace via revise_criterion with regression proof for neighboring behavior after: ${subject}.`,+ `regression proof for neighboring behavior after: ${subject}`,false,],];- return rows.map(([id, userModel, scenario, expectedEvidence, essential]) => ({- id,- scenario,- userModel,- expectedEvidence,- essential,- capturedEvidence: null,- status: "pending",- }));+ return rows.map(([userModel, scenario, proof, essential], index) => {+ const id = criterionId(index);+ return {+ id,+ scenario,+ userModel,+ expectedEvidence: `${replaceVia(goalId, id, surface)} with ${proof}.`,+ essential,+ capturedEvidence: null,+ status: "pending",+ };+ });}export function deriveGoalCandidates(brief) {const bulletGoals = brief@@ -87,22 +87,29 @@ export function deriveGoalCandidates(brief) {objective,}));}-export function makeGoal(title, objective, index, now) {+export function makeGoal(title, objective, index, now, options = {}) {const cleanTitle = assertNonEmpty(title, "title");const cleanObjective = assertNonEmpty(objective, "objective");+ const id = normalizeGoalId(cleanTitle, index);+ const successCriteria = options.successCriteria === undefined+ ? seedDefaultSuccessCriteria(index, cleanObjective, {+ goalId: id,+ ...(options.surface === undefined ? {} : { surface: options.surface }),+ })+ : criteriaFromInput(options.successCriteria);return {- id: normalizeGoalId(cleanTitle, index),+ id,title: cleanTitle,objective: cleanObjective,status: "pending",- successCriteria: seedDefaultSuccessCriteria(index, cleanObjective),+ successCriteria,attempt: 0,createdAt: now,updatedAt: now,};}-export function appendGoalToPlan(plan, title, objective, now) {- const goal = makeGoal(title, objective, plan.goals.length, now);+export function appendGoalToPlan(plan, title, objective, now, options = {}) {+ const goal = makeGoal(title, objective, plan.goals.length, now, options);plan.goals.push(goal);plan.updatedAt = now;return goal;diff --git a/plugins/omo/components/ulw-loop/dist/review-blockers.js b/plugins/omo/components/ulw-loop/dist/review-blockers.jsindex 8ebaf3f2..6c8911c1 100644--- a/plugins/omo/components/ulw-loop/dist/review-blockers.js+++ b/plugins/omo/components/ulw-loop/dist/review-blockers.js@@ -1,5 +1,6 @@// biome-ignore-all format: compact port must stay within the requested pure LOC budget.import { CodexGoalSnapshotError, formatCodexGoalReconciliation, readCodexGoalSnapshotInput, reconcileCodexGoalSnapshot, } from "./codex-goal-snapshot.js";+import { acknowledgeDriverObjective, acknowledgedDriverObjectives } from "./driver-objective-ack.js";import { compatibleCodexObjectives, expectedCodexObjective, isFinalRunCompletionCandidate } from "./goal-status.js";import { commit } from "./plan-commit.js";import { seedDefaultSuccessCriteria } from "./plan-crud.js";@@ -18,12 +19,13 @@ function nextGoalId(plan) {}function appendBlockerGoal(plan, args, now) {const index = plan.goals.length;+ const id = nextGoalId(plan);const goal = {- id: nextGoalId(plan),+ id,title: args.title,objective: args.objective,status: "pending",- successCriteria: seedDefaultSuccessCriteria(index, args.objective),+ successCriteria: seedDefaultSuccessCriteria(index, args.objective, { goalId: id }),attempt: 0,createdAt: now,updatedAt: now,@@ -45,9 +47,11 @@ export async function recordFinalReviewBlockers(repoRoot, args, scope) {const reconciliation = reconcileCodexGoalSnapshot(snapshot, {expectedObjective: expectedCodexObjective(plan, goal),acceptedObjectives: compatibleCodexObjectives(plan),+ acknowledgedObjectives: acknowledgedDriverObjectives(plan),});if (!reconciliation.ok)throw new CodexGoalSnapshotError(formatCodexGoalReconciliation(reconciliation));+ acknowledgeDriverObjective(plan, reconciliation.unacknowledgedObjective);const now = iso();for (const field of BLOCKER_FIELDS)Reflect.deleteProperty(goal, field);@@ -71,8 +75,8 @@ export async function recordFinalReviewBlockers(repoRoot, args, scope) {blockedGoal: goal,newGoal,ledgerEntries,- nextActions: reconciliation.warnings,- warnings: reconciliation.warnings.filter((warning) => warning.startsWith("driver_objective_differs")),+ nextActions: reconciliation.nextActions,+ warnings: reconciliation.warnings,};});}diff --git a/plugins/omo/components/ulw-loop/dist/sdk/factory.js b/plugins/omo/components/ulw-loop/dist/sdk/factory.jsindex f1ac443f..26ea2303 100644--- a/plugins/omo/components/ulw-loop/dist/sdk/factory.js+++ b/plugins/omo/components/ulw-loop/dist/sdk/factory.js@@ -1,7 +1,7 @@import { checkpointUlwLoop } from "../checkpoint.js";import { checkpointTemplate } from "../checkpoint-template.js";import { recordEvidence } from "../evidence.js";-import { normalizeUlwLoopSessionId, ulwLoopAttemptEvidenceDir, ulwLoopGoalsRelativePath, } from "../paths.js";+import { normalizeUlwLoopSessionId, ulwLoopAttemptEvidenceDir, ulwLoopEvidenceRoot, ulwLoopGoalsRelativePath, } from "../paths.js";import { addUlwLoopGoal, createUlwLoopPlan, startNextUlwLoop, summarizeUlwLoopPlan } from "../plan-crud.js";import { listUlwLoopSessionIds, readUlwLoopPlan } from "../plan-io.js";import { planMissingError } from "../plan-missing-recovery.js";@@ -54,10 +54,11 @@ function isKnownRequest(request) {function unreachable(value) {throw new UlwLoopError(`Unhandled operation: ${String(value)}`, "ULW_LOOP_OPERATION_UNHANDLED");}-function nextActionsFrom(result) {- if (!("nextActions" in result) || !Array.isArray(result.nextActions))+function stringsFrom(result, key) {+ if (!(key in result))return [];- return result.nextActions.filter((action) => typeof action === "string").slice(0, 8);+ const value = Object.entries(result).find(([name]) => name === key)?.[1];+ return Array.isArray(value) ? value.filter((item) => typeof item === "string").slice(0, 8) : [];}function checkpointWithValidatedSnapshot(context, scope, args) {validateCodexGoalJson(args.codexGoalJson);@@ -74,8 +75,15 @@ export function createAgentToolkit(context, deps = {}) {const invoke = async (operation, fn) => {try {const result = await fn();- const nextActions = typeof result === "object" && result !== null ? nextActionsFrom(result) : [];- return await notify(operation, { ok: true, operation, result, nextActions });+ const nextActions = typeof result === "object" && result !== null ? stringsFrom(result, "nextActions") : [];+ const warnings = typeof result === "object" && result !== null ? stringsFrom(result, "warnings") : [];+ return await notify(operation, {+ ok: true,+ operation,+ result,+ nextActions,+ ...(warnings.length === 0 ? {} : { warnings }),+ });}catch (error) {if (error instanceof UlwLoopError && error.code === "ULW_LOOP_PLAN_MISSING" && context.surface === "omo-senpi")@@ -122,6 +130,7 @@ export function createAgentToolkit(context, deps = {}) {plan,summary: summarizeUlwLoopPlan(plan),nextActions: statusNextActions(plan, context.surface),+ evidenceRoot: ulwLoopEvidenceRoot(scope),// Attempt directories are an evidence-layout v2 concept; a v1 plan must not advertise one....(active === undefined || plan.evidenceLayoutVersion !== 2? {}@@ -132,8 +141,8 @@ export function createAgentToolkit(context, deps = {}) {checkpoint: (args) => invoke("checkpoint", () => args.printTemplate === true? checkpointTemplate(context.cwd, scope, args.goalId, { surface: context.surface }): checkpointWithValidatedSnapshot(context, scope, args)),- steer: (args) => invoke("steer", () => steerUlwLoop(context.cwd, args, scope)),- addGoal: (args) => invoke("add-goal", () => addUlwLoopGoal(context.cwd, args, scope)),+ steer: (args) => invoke("steer", () => steerUlwLoop(context.cwd, args, scope, context.surface)),+ addGoal: (args) => invoke("add-goal", () => addUlwLoopGoal(context.cwd, args, scope, context.surface)),criteria: (args) => invoke("criteria", async () => {const plan = await readUlwLoopPlan(context.cwd, scope);const goal = plan.goals.find((candidate) => candidate.id === args.goalId);diff --git a/plugins/omo/components/ulw-loop/dist/sdk/manifest.d.ts b/plugins/omo/components/ulw-loop/dist/sdk/manifest.d.tsindex 757dc761..22dd5b93 100644--- a/plugins/omo/components/ulw-loop/dist/sdk/manifest.d.ts+++ b/plugins/omo/components/ulw-loop/dist/sdk/manifest.d.ts@@ -2,7 +2,12 @@ export declare const ULW_LOOP_OPERATIONS: readonly ["help", "create-goals", "staexport type UlwLoopOperation = (typeof ULW_LOOP_OPERATIONS)[number];export interface ToolkitOperationManifest {readonly name: UlwLoopOperation;+ /** The camelCase method that runs this operation on every SDK surface. */+ readonly method: string;readonly mutating: boolean;+ readonly description: string;+ /** Argument field -> type notation; a trailing `?` marks an optional field. */+ readonly args: Readonly<Record<string, string>>;}export interface ToolkitManifest {readonly version: 1;@@ -14,33 +19,363 @@ export declare const ULW_LOOP_MANIFEST: {name: "ulw-loop";operations: ({name: "help";+ method: string;mutating: false;+ description: string;+ args: {+ brief?: never;+ codexGoalMode?: never;+ force?: never;+ validationBatchesJson?: never;+ retryFailed?: never;+ qualityGateJson?: never;+ printTemplate?: never;+ kind?: never;+ source?: never;+ rationale?: never;+ scenario?: never;+ expectedEvidence?: never;+ userModel?: never;+ childGoals?: never;+ revisedTitle?: never;+ revisedObjective?: never;+ pendingOrder?: never;+ blockedReason?: never;+ idempotencyKey?: never;+ successCriteria?: never;+ criterionId?: never;+ status?: never;+ notes?: never;+ artifacts?: never;+ goalId?: never;+ title?: never;+ objective?: never;+ evidence?: never;+ codexGoalJson?: never;+ };} | {name: "create-goals";+ method: string;mutating: true;+ description: string;+ args: {+ brief: string;+ codexGoalMode: string;+ force: string;+ validationBatchesJson: string;+ retryFailed?: never;+ qualityGateJson?: never;+ printTemplate?: never;+ kind?: never;+ source?: never;+ rationale?: never;+ scenario?: never;+ expectedEvidence?: never;+ userModel?: never;+ childGoals?: never;+ revisedTitle?: never;+ revisedObjective?: never;+ pendingOrder?: never;+ blockedReason?: never;+ idempotencyKey?: never;+ successCriteria?: never;+ criterionId?: never;+ status?: never;+ notes?: never;+ artifacts?: never;+ goalId?: never;+ title?: never;+ objective?: never;+ evidence?: never;+ codexGoalJson?: never;+ };} | {name: "status";+ method: string;mutating: false;+ description: string;+ args: {+ brief?: never;+ codexGoalMode?: never;+ force?: never;+ validationBatchesJson?: never;+ retryFailed?: never;+ qualityGateJson?: never;+ printTemplate?: never;+ kind?: never;+ source?: never;+ rationale?: never;+ scenario?: never;+ expectedEvidence?: never;+ userModel?: never;+ childGoals?: never;+ revisedTitle?: never;+ revisedObjective?: never;+ pendingOrder?: never;+ blockedReason?: never;+ idempotencyKey?: never;+ successCriteria?: never;+ criterionId?: never;+ status?: never;+ notes?: never;+ artifacts?: never;+ goalId?: never;+ title?: never;+ objective?: never;+ evidence?: never;+ codexGoalJson?: never;+ };} | {name: "complete-goals";+ method: string;mutating: true;+ description: string;+ args: {+ brief?: never;+ codexGoalMode?: never;+ force?: never;+ validationBatchesJson?: never;+ retryFailed: string;+ qualityGateJson?: never;+ printTemplate?: never;+ kind?: never;+ source?: never;+ rationale?: never;+ scenario?: never;+ expectedEvidence?: never;+ userModel?: never;+ childGoals?: never;+ revisedTitle?: never;+ revisedObjective?: never;+ pendingOrder?: never;+ blockedReason?: never;+ idempotencyKey?: never;+ successCriteria?: never;+ criterionId?: never;+ status?: never;+ notes?: never;+ artifacts?: never;+ goalId?: never;+ title?: never;+ objective?: never;+ evidence?: never;+ codexGoalJson?: never;+ };} | {name: "checkpoint";+ method: string;mutating: true;+ description: string;+ args: {+ brief?: never;+ codexGoalMode?: never;+ force?: never;+ validationBatchesJson?: never;+ retryFailed?: never;+ goalId: string;+ status: string;+ evidence: string;+ codexGoalJson: string;+ qualityGateJson: string;+ printTemplate: string;+ kind?: never;+ source?: never;+ rationale?: never;+ scenario?: never;+ expectedEvidence?: never;+ userModel?: never;+ childGoals?: never;+ revisedTitle?: never;+ revisedObjective?: never;+ pendingOrder?: never;+ blockedReason?: never;+ idempotencyKey?: never;+ successCriteria?: never;+ criterionId?: never;+ notes?: never;+ artifacts?: never;+ title?: never;+ objective?: never;+ };} | {name: "steer";+ method: string;mutating: true;+ description: string;+ args: {+ brief?: never;+ codexGoalMode?: never;+ force?: never;+ validationBatchesJson?: never;+ retryFailed?: never;+ qualityGateJson?: never;+ printTemplate?: never;+ kind: string;+ source: string;+ evidence: string;+ rationale: string;+ goalId: string;+ criterionId: string;+ scenario: string;+ expectedEvidence: string;+ userModel: string;+ title: string;+ objective: string;+ childGoals: string;+ revisedTitle: string;+ revisedObjective: string;+ pendingOrder: string;+ blockedReason: string;+ idempotencyKey: string;+ successCriteria?: never;+ status?: never;+ notes?: never;+ artifacts?: never;+ codexGoalJson?: never;+ };} | {name: "add-goal";+ method: string;mutating: true;+ description: string;+ args: {+ brief?: never;+ codexGoalMode?: never;+ force?: never;+ validationBatchesJson?: never;+ retryFailed?: never;+ qualityGateJson?: never;+ printTemplate?: never;+ kind?: never;+ source?: never;+ rationale?: never;+ scenario?: never;+ expectedEvidence?: never;+ userModel?: never;+ childGoals?: never;+ revisedTitle?: never;+ revisedObjective?: never;+ pendingOrder?: never;+ blockedReason?: never;+ idempotencyKey?: never;+ title: string;+ objective: string;+ successCriteria: string;+ criterionId?: never;+ status?: never;+ notes?: never;+ artifacts?: never;+ goalId?: never;+ evidence?: never;+ codexGoalJson?: never;+ };} | {name: "criteria";+ method: string;mutating: false;+ description: string;+ args: {+ brief?: never;+ codexGoalMode?: never;+ force?: never;+ validationBatchesJson?: never;+ retryFailed?: never;+ qualityGateJson?: never;+ printTemplate?: never;+ kind?: never;+ source?: never;+ rationale?: never;+ scenario?: never;+ expectedEvidence?: never;+ userModel?: never;+ childGoals?: never;+ revisedTitle?: never;+ revisedObjective?: never;+ pendingOrder?: never;+ blockedReason?: never;+ idempotencyKey?: never;+ successCriteria?: never;+ goalId: string;+ criterionId?: never;+ status?: never;+ notes?: never;+ artifacts?: never;+ title?: never;+ objective?: never;+ evidence?: never;+ codexGoalJson?: never;+ };} | {name: "record-evidence";+ method: string;mutating: true;+ description: string;+ args: {+ brief?: never;+ codexGoalMode?: never;+ force?: never;+ validationBatchesJson?: never;+ retryFailed?: never;+ qualityGateJson?: never;+ printTemplate?: never;+ kind?: never;+ source?: never;+ rationale?: never;+ scenario?: never;+ expectedEvidence?: never;+ userModel?: never;+ childGoals?: never;+ revisedTitle?: never;+ revisedObjective?: never;+ pendingOrder?: never;+ blockedReason?: never;+ idempotencyKey?: never;+ successCriteria?: never;+ goalId: string;+ criterionId: string;+ status: string;+ evidence: string;+ notes: string;+ artifacts: string;+ title?: never;+ objective?: never;+ codexGoalJson?: never;+ };} | {name: "record-review-blockers";+ method: string;mutating: true;+ description: string;+ args: {+ brief?: never;+ codexGoalMode?: never;+ force?: never;+ validationBatchesJson?: never;+ retryFailed?: never;+ qualityGateJson?: never;+ printTemplate?: never;+ kind?: never;+ source?: never;+ rationale?: never;+ scenario?: never;+ expectedEvidence?: never;+ userModel?: never;+ childGoals?: never;+ revisedTitle?: never;+ revisedObjective?: never;+ pendingOrder?: never;+ blockedReason?: never;+ idempotencyKey?: never;+ successCriteria?: never;+ criterionId?: never;+ status?: never;+ notes?: never;+ artifacts?: never;+ goalId: string;+ title: string;+ objective: string;+ evidence: string;+ codexGoalJson: string;+ };})[];};diff --git a/plugins/omo/components/ulw-loop/dist/sdk/manifest.js b/plugins/omo/components/ulw-loop/dist/sdk/manifest.jsindex 82998572..e72430cf 100644--- a/plugins/omo/components/ulw-loop/dist/sdk/manifest.js+++ b/plugins/omo/components/ulw-loop/dist/sdk/manifest.js@@ -10,19 +10,118 @@ export const ULW_LOOP_OPERATIONS = ["record-evidence","record-review-blockers",];+const CRITERION_INPUT = '{ scenario: string, expectedEvidence: string, userModel?: "happy" | "edge" | "regression" | "adversarial", essential?: boolean }';+const STEER_KINDS = '"add_subgoal" | "split_subgoal" | "reorder_pending" | "revise_pending_wording" | "revise_criterion" | "annotate_ledger" | "mark_blocked_superseded"';export const ULW_LOOP_MANIFEST = {version: 1,name: "ulw-loop",operations: [- { name: "help", mutating: false },- { name: "create-goals", mutating: true },- { name: "status", mutating: false },- { name: "complete-goals", mutating: true },- { name: "checkpoint", mutating: true },- { name: "steer", mutating: true },- { name: "add-goal", mutating: true },- { name: "criteria", mutating: false },- { name: "record-evidence", mutating: true },- { name: "record-review-blockers", mutating: true },+ {+ name: "help",+ method: "help",+ mutating: false,+ description: "Return this manifest: every operation with its method name, argument fields, and what it does.",+ args: {},+ },+ {+ name: "create-goals",+ method: "createGoals",+ mutating: true,+ description: "Create the session plan from a brief; one goal per bullet, each seeded with placeholder criteria until revised.",+ args: {+ brief: "string",+ codexGoalMode: '"aggregate" | "per_story"?',+ force: "boolean?",+ validationBatchesJson: "string?",+ },+ },+ {+ name: "status",+ method: "status",+ mutating: false,+ description: "Read the plan, its summary, structured nextActions, the stable evidenceRoot, and the active goal's currentAttemptDir.",+ args: {},+ },+ {+ name: "complete-goals",+ method: "completeGoals",+ mutating: true,+ description: "Acquire the next eligible goal or resume the in-progress one; returns { done: true } once the aggregate is complete.",+ args: { retryFailed: "boolean?" },+ },+ {+ name: "checkpoint",+ method: "checkpoint",+ mutating: true,+ description: "Close the goal as complete, failed, or blocked with evidence; the final goal also needs the quality gate. printTemplate returns that gate's template instead.",+ args: {+ goalId: "string",+ status: '"complete" | "failed" | "blocked"',+ evidence: "string",+ codexGoalJson: "string?",+ qualityGateJson: "string?",+ printTemplate: "true? (with goalId? only)",+ },+ },+ {+ name: "steer",+ method: "steer",+ mutating: true,+ description: "Propose an evidence-backed plan mutation; revise_criterion replaces a criterion's scenario, expectedEvidence, or userModel.",+ args: {+ kind: STEER_KINDS,+ source: '"finding" | "user_prompt_submit" | "cli"',+ evidence: "string",+ rationale: "string",+ goalId: "string?",+ criterionId: "string? (revise_criterion)",+ scenario: "string? (revise_criterion)",+ expectedEvidence: "string? (revise_criterion)",+ userModel: '"happy" | "edge" | "regression" | "adversarial"? (revise_criterion)',+ title: "string? (add_subgoal)",+ objective: "string? (add_subgoal)",+ childGoals: "{ title: string, objective: string }[]? (split_subgoal)",+ revisedTitle: "string? (revise_pending_wording)",+ revisedObjective: "string? (revise_pending_wording)",+ pendingOrder: "string[]? (reorder_pending)",+ blockedReason: "string? (mark_blocked_superseded)",+ idempotencyKey: "string?",+ },+ },+ {+ name: "add-goal",+ method: "addGoal",+ mutating: true,+ description: "Append a goal; pass successCriteria to define its criteria in the same call, otherwise placeholders name the revise call.",+ args: { title: "string", objective: "string", successCriteria: `${CRITERION_INPUT}[]?` },+ },+ {+ name: "criteria",+ method: "criteria",+ mutating: false,+ description: "List one goal's success criteria with their status and captured evidence.",+ args: { goalId: "string" },+ },+ {+ name: "record-evidence",+ method: "recordEvidence",+ mutating: true,+ description: "Record a criterion's pass, fail, or blocked evidence; artifacts must exist (resolved against the session cwd) and are stored with the criterion and the ledger entry.",+ args: {+ goalId: "string",+ criterionId: "string",+ status: '"pass" | "fail" | "blocked"',+ evidence: "string",+ notes: "string?",+ artifacts: "string[]?",+ },+ },+ {+ name: "record-review-blockers",+ method: "recordReviewBlockers",+ mutating: true,+ description: "Mark the final goal review_blocked and append the blocker goal the reviewer verdict names.",+ args: { goalId: "string", title: "string", objective: "string", evidence: "string", codexGoalJson: "string?" },+ },],};diff --git a/plugins/omo/components/ulw-loop/dist/sdk/types.d.ts b/plugins/omo/components/ulw-loop/dist/sdk/types.d.tsindex 6ccda3b9..3eb600b5 100644--- a/plugins/omo/components/ulw-loop/dist/sdk/types.d.ts+++ b/plugins/omo/components/ulw-loop/dist/sdk/types.d.ts@@ -82,11 +82,14 @@ export interface ToolkitFailure<Operation extends string = string> {readonly ok: false;readonly operation: Operation;readonly error: ToolkitError;+ readonly warnings?: readonly string[];}type StatusResult = {readonly plan: UlwLoopPlan;readonly summary: ReturnType<typeof summarizeUlwLoopPlan>;readonly nextActions: readonly string[];+ /** Plan-level evidence directory, stable for the whole run (relative to the session cwd). */+ readonly evidenceRoot: string;readonly currentAttemptDir?: string;};type ResultFor<Operation extends UlwLoopOperation> = Operation extends "help" ? typeof ULW_LOOP_MANIFEST : Operation extends "create-goals" ? Awaited<ReturnType<typeof createUlwLoopPlan>> : Operation extends "status" ? StatusResult : Operation extends "complete-goals" ? Awaited<ReturnType<typeof startNextUlwLoop>> : Operation extends "checkpoint" ? CheckpointUlwLoopResult | CheckpointTemplate : Operation extends "steer" ? Awaited<ReturnType<typeof steerUlwLoop>> : Operation extends "add-goal" ? Awaited<ReturnType<typeof addUlwLoopGoal>> : Operation extends "criteria" ? {diff --git a/plugins/omo/components/ulw-loop/dist/steering-mutations.d.ts b/plugins/omo/components/ulw-loop/dist/steering-mutations.d.tsindex aac183b4..b7974f5d 100644--- a/plugins/omo/components/ulw-loop/dist/steering-mutations.d.ts+++ b/plugins/omo/components/ulw-loop/dist/steering-mutations.d.ts@@ -1,5 +1,6 @@+import type { UlwLoopToolkitSurface } from "./surface.js";import type { UlwLoopItem, UlwLoopPlan, UlwLoopSteeringChildGoal, UlwLoopSteeringProposal } from "./types.js";-export declare function makeGoal(plan: UlwLoopPlan, childGoal: UlwLoopSteeringChildGoal, evidence: string, now: string, offset: number): UlwLoopItem;+export declare function makeGoal(plan: UlwLoopPlan, childGoal: UlwLoopSteeringChildGoal, evidence: string, now: string, offset: number, surface?: UlwLoopToolkitSurface): UlwLoopItem;export declare function reviseWording(plan: UlwLoopPlan, proposal: UlwLoopSteeringProposal, now: string): void;-export declare function splitOrBlock(plan: UlwLoopPlan, proposal: UlwLoopSteeringProposal, now: string): void;+export declare function splitOrBlock(plan: UlwLoopPlan, proposal: UlwLoopSteeringProposal, now: string, surface?: UlwLoopToolkitSurface): void;export declare function reviseCriterion(plan: UlwLoopPlan, proposal: UlwLoopSteeringProposal, now: string): void;diff --git a/plugins/omo/components/ulw-loop/dist/steering-mutations.js b/plugins/omo/components/ulw-loop/dist/steering-mutations.jsindex ccc14402..dd977078 100644--- a/plugins/omo/components/ulw-loop/dist/steering-mutations.js+++ b/plugins/omo/components/ulw-loop/dist/steering-mutations.js@@ -29,11 +29,11 @@ function nextId(plan, offset) {const max = plan.goals.reduce((current, item) => { const digits = /^G(\d+)(?:-|$)/u.exec(item.id)?.[1]; return digits === undefined ? current : Math.max(current, Number(digits)); }, 0);return `G${String(max + offset).padStart(3, "0")}`;}-export function makeGoal(plan, childGoal, evidence, now, offset) {+export function makeGoal(plan, childGoal, evidence, now, offset, surface = "lazycodex") {const id = nextId(plan, offset);const digits = /^G(\d+)/u.exec(id)?.[1];const goalIndex = digits === undefined ? plan.goals.length + offset - 1 : Number(digits) - 1;- return { id, title: childGoal.title, objective: childGoal.objective, status: "pending", successCriteria: seedDefaultSuccessCriteria(goalIndex, childGoal.objective), attempt: 0, createdAt: now, updatedAt: now, evidence };+ return { id, title: childGoal.title, objective: childGoal.objective, status: "pending", successCriteria: seedDefaultSuccessCriteria(goalIndex, childGoal.objective, { goalId: id, surface }), attempt: 0, createdAt: now, updatedAt: now, evidence };}export function reviseWording(plan, proposal, now) {const target = goal(plan, targets(proposal)[0]);@@ -45,11 +45,11 @@ export function reviseWording(plan, proposal, now) {target.steeringRationale = proposal.rationale;target.updatedAt = now;}-export function splitOrBlock(plan, proposal, now) {+export function splitOrBlock(plan, proposal, now, surface = "lazycodex") {const target = goal(plan, targets(proposal)[0]);if (target === undefined)return;- const replacements = children(proposal).map((item, index) => makeGoal(plan, item, proposal.evidence, now, index + 1));+ const replacements = children(proposal).map((item, index) => makeGoal(plan, item, proposal.evidence, now, index + 1, surface));target.steeringEvidence = proposal.evidence;target.steeringRationale = proposal.rationale;target.updatedAt = now;diff --git a/plugins/omo/components/ulw-loop/dist/steering-types.d.ts b/plugins/omo/components/ulw-loop/dist/steering-types.d.tsindex 0b5d28d2..b77e0537 100644--- a/plugins/omo/components/ulw-loop/dist/steering-types.d.ts+++ b/plugins/omo/components/ulw-loop/dist/steering-types.d.ts@@ -1,4 +1,4 @@-import type { UlwLoopSteeringMutationKind, UlwLoopSteeringSource } from "./constants.js";+import type { UlwLoopSteeringMutationKind, UlwLoopSteeringSource, UlwLoopSuccessCriterionUserModel } from "./constants.js";import type { UlwLoopItem, UlwLoopPlan } from "./domain-types.js";export interface UlwLoopSteeringInvariantResult {accepted: boolean;@@ -21,9 +21,17 @@ export interface UlwLoopSteeringAfterPayload {export interface UlwLoopSteeringProposal {kind: UlwLoopSteeringMutationKind;source: UlwLoopSteeringSource;+ /** Alias of `targetGoalId`; the SDK documentation uses `goalId` like every other operation. */+ goalId?: string;targetGoalId?: string;targetGoalIds?: string[];criterionId?: string;+ /** `revise_criterion` payload: the replacement scenario text. */+ scenario?: string;+ /** `revise_criterion` payload: the replacement observable-proof text. */+ expectedEvidence?: string;+ /** `revise_criterion` payload: the replacement user model. */+ userModel?: UlwLoopSuccessCriterionUserModel;evidence: string;rationale: string;title?: string;diff --git a/plugins/omo/components/ulw-loop/dist/steering.d.ts b/plugins/omo/components/ulw-loop/dist/steering.d.tsindex 01a8a86f..ceea2084 100644--- a/plugins/omo/components/ulw-loop/dist/steering.d.ts+++ b/plugins/omo/components/ulw-loop/dist/steering.d.ts@@ -1,6 +1,7 @@import type { UlwLoopScope } from "./paths.js";+import type { UlwLoopToolkitSurface } from "./surface.js";import type { SteerUlwLoopResult, UlwLoopPlan, UlwLoopSteeringAudit, UlwLoopSteeringProposal } from "./types.js";export declare function validateUlwLoopSteeringProposal(plan: UlwLoopPlan, proposal: unknown): UlwLoopSteeringAudit;-export declare function applySteeringMutation(plan: UlwLoopPlan, proposal: UlwLoopSteeringProposal, audit: UlwLoopSteeringAudit): UlwLoopPlan;+export declare function applySteeringMutation(plan: UlwLoopPlan, proposal: UlwLoopSteeringProposal, audit: UlwLoopSteeringAudit, surface?: UlwLoopToolkitSurface): UlwLoopPlan;export declare function parseUlwLoopSteeringDirective(text: string): UlwLoopSteeringProposal | null;-export declare function steerUlwLoop(repoRoot: string, proposal: UlwLoopSteeringProposal, scope?: UlwLoopScope): Promise<SteerUlwLoopResult>;+export declare function steerUlwLoop(repoRoot: string, proposal: UlwLoopSteeringProposal, scope?: UlwLoopScope, surface?: UlwLoopToolkitSurface): Promise<SteerUlwLoopResult>;diff --git a/plugins/omo/components/ulw-loop/dist/steering.js b/plugins/omo/components/ulw-loop/dist/steering.jsindex 3cc2707f..aff0185a 100644--- a/plugins/omo/components/ulw-loop/dist/steering.js+++ b/plugins/omo/components/ulw-loop/dist/steering.js@@ -7,7 +7,7 @@ import { buildSteeringPlanSnapshot, changedGoalIdsBetween } from "./steering-snaimport { iso, ULW_LOOP_STEERING_MUTATION_KINDS, ULW_LOOP_SUCCESS_CRITERION_USER_MODELS } from "./types.js";import { batchUpdateLedgerEntry } from "./validation-batch.js";const SOURCES = ["user_prompt_submit", "finding", "cli"];-const PROTECTED = new Set(["aggregateCompletion", "codexObjective", "codexObjectiveAliases", "originalConstraints", "qualityGate", "status", "completedAt", "completionStatus"]);+const PROTECTED = new Set(["aggregateCompletion", "codexObjective", "codexObjectiveAliases", "acknowledgedDriverObjectives", "originalConstraints", "qualityGate", "status", "completedAt", "completionStatus"]);const isObject = (value) => typeof value === "object" && value !== null;const isPlain = (value) => isObject(value) && !Array.isArray(value);const read = (value, key) => Object.entries(value).find(([name]) => name === key)?.[1];@@ -164,13 +164,13 @@ function validateCriterion(plan, proposal, reasons) {if (model !== undefined && !isModel(model))reasons.push("invalid userModel");}-export function applySteeringMutation(plan, proposal, audit) {+export function applySteeringMutation(plan, proposal, audit, surface = "lazycodex") {const next = structuredClone(plan);if (!audit.invariant.accepted)return next;const now = proposal.now?.toISOString() ?? iso();if (proposal.kind === "add_subgoal")- next.goals.push(makeGoal(next, { title: proposal.title ?? "", objective: proposal.objective ?? "" }, proposal.evidence, now, 1));+ next.goals.push(makeGoal(next, { title: proposal.title ?? "", objective: proposal.objective ?? "" }, proposal.evidence, now, 1, surface));if (proposal.kind === "reorder_pending") {const order = pendingOrder(proposal);next.goals = [...order.map((id) => goal(next, id)).filter((item) => item !== undefined), ...next.goals.filter((item) => !order.includes(item.id))];@@ -178,7 +178,7 @@ export function applySteeringMutation(plan, proposal, audit) {if (proposal.kind === "revise_pending_wording")reviseWording(next, proposal, now);if (proposal.kind === "split_subgoal" || proposal.kind === "mark_blocked_superseded")- splitOrBlock(next, proposal, now);+ splitOrBlock(next, proposal, now, surface);if (proposal.kind === "revise_criterion")reviseCriterion(next, proposal, now);if (proposal.kind !== "annotate_ledger")@@ -202,7 +202,7 @@ export function parseUlwLoopSteeringDirective(text) {throw error;}}-export async function steerUlwLoop(repoRoot, proposal, scope) {+export async function steerUlwLoop(repoRoot, proposal, scope, surface = "lazycodex") {return withUlwLoopMutationLock(repoRoot, scope, async () => {const plan = await readUlwLoopPlan(repoRoot, scope);const key = proposal.idempotencyKey ?? proposal.promptSignature;@@ -215,7 +215,7 @@ export async function steerUlwLoop(repoRoot, proposal, scope) {}const audit = validateUlwLoopSteeringProposal(plan, proposal);const accepted = audit.invariant.accepted;- const next = accepted ? applySteeringMutation(plan, proposal, audit) : plan;+ const next = accepted ? applySteeringMutation(plan, proposal, audit, surface) : plan;const finalAudit = { ...audit };if (accepted) {const changed = changedGoalIdsBetween(plan, next);diff --git a/plugins/omo/components/ulw-loop/dist/success-criteria-input.d.ts b/plugins/omo/components/ulw-loop/dist/success-criteria-input.d.tsnew file mode 100644index 00000000..cb959b2a--- /dev/null+++ b/plugins/omo/components/ulw-loop/dist/success-criteria-input.d.ts@@ -0,0 +1,9 @@+import type { UlwLoopSuccessCriterion, UlwLoopSuccessCriterionUserModel } from "./types.js";+export interface SuccessCriterionInput {+ readonly scenario: string;+ readonly expectedEvidence: string;+ readonly userModel?: UlwLoopSuccessCriterionUserModel;+ readonly essential?: boolean;+}+export declare function criterionId(index: number): string;+export declare function criteriaFromInput(input: readonly unknown[]): UlwLoopSuccessCriterion[];diff --git a/plugins/omo/components/ulw-loop/dist/success-criteria-input.js b/plugins/omo/components/ulw-loop/dist/success-criteria-input.jsnew file mode 100644index 00000000..441aad75--- /dev/null+++ b/plugins/omo/components/ulw-loop/dist/success-criteria-input.js@@ -0,0 +1,41 @@+import { ULW_LOOP_SUCCESS_CRITERION_USER_MODELS, UlwLoopError } from "./types.js";+function invalid(message, details) {+ throw new UlwLoopError(`Invalid successCriteria: ${message}`, "ULW_LOOP_ARGUMENT_INVALID", { details });+}+function isUserModel(value) {+ return typeof value === "string" && ULW_LOOP_SUCCESS_CRITERION_USER_MODELS.some((model) => model === value);+}+function requireText(value, field, index) {+ const trimmed = typeof value === "string" ? value.trim() : "";+ return trimmed || invalid(`entry ${index + 1} needs a non-empty ${field}.`, { index, field });+}+export function criterionId(index) {+ return `C${String(index + 1).padStart(3, "0")}`;+}+export function criteriaFromInput(input) {+ if (input.length === 0)+ invalid("provide at least one criterion or omit the field for placeholders.", { count: 0 });+ return input.map((entry, index) => {+ if (typeof entry !== "object" || entry === null || Array.isArray(entry))+ return invalid(`entry ${index + 1} must be an object.`, { index });+ const record = { ...entry };+ const userModel = record["userModel"] ?? "happy";+ if (!isUserModel(userModel))+ return invalid(`entry ${index + 1} userModel must be one of ${ULW_LOOP_SUCCESS_CRITERION_USER_MODELS.join(", ")}.`, {+ index,+ userModel: String(userModel),+ });+ const essential = record["essential"];+ if (essential !== undefined && typeof essential !== "boolean")+ return invalid(`entry ${index + 1} essential must be a boolean.`, { index });+ return {+ id: criterionId(index),+ scenario: requireText(record["scenario"], "scenario", index),+ userModel,+ expectedEvidence: requireText(record["expectedEvidence"], "expectedEvidence", index),+ essential: essential ?? true,+ capturedEvidence: null,+ status: "pending",+ };+ });+}diff --git a/plugins/omo/components/ulw-loop/hooks/hooks.json b/plugins/omo/components/ulw-loop/hooks/hooks.jsonindex 650f63a1..9a25214b 100644--- a/plugins/omo/components/ulw-loop/hooks/hooks.json+++ b/plugins/omo/components/ulw-loop/hooks/hooks.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook user-prompt-submit --with-ultrawork","timeout": 10,- "statusMessage": "(OmO 5.0.0-beta.63) Checking Ulw-Loop Steering"+ "statusMessage": "(OmO 5.0.0-beta.64) Checking Ulw-Loop Steering"}]}@@ -20,7 +20,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use-spawn","timeout": 5,- "statusMessage": "(OmO 5.0.0-beta.63) Recording Spawn Admission"+ "statusMessage": "(OmO 5.0.0-beta.64) Recording Spawn Admission"}]}@@ -33,7 +33,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook pre-tool-use","timeout": 5,- "statusMessage": "(OmO 5.0.0-beta.63) Enforcing Unlimited Ulw-Loop Budget"+ "statusMessage": "(OmO 5.0.0-beta.64) Enforcing Unlimited Ulw-Loop Budget"}]},@@ -44,7 +44,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook pre-tool-use-spawn","timeout": 5,- "statusMessage": "(OmO 5.0.0-beta.63) Guarding Ulw-Loop Spawns"+ "statusMessage": "(OmO 5.0.0-beta.64) Guarding Ulw-Loop Spawns"}]}@@ -56,7 +56,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook stop","timeout": 10,- "statusMessage": "(OmO 5.0.0-beta.63) Checking Ulw-Loop Resume"+ "statusMessage": "(OmO 5.0.0-beta.64) Checking Ulw-Loop Resume"}]}diff --git a/plugins/omo/components/ulw-loop/package.json b/plugins/omo/components/ulw-loop/package.jsonindex 3454dc4a..9cbffdc4 100644--- a/plugins/omo/components/ulw-loop/package.json+++ b/plugins/omo/components/ulw-loop/package.json@@ -1,6 +1,6 @@{"name": "@code-yeongyu/codex-ulw-loop",- "version": "5.0.0-beta.63",+ "version": "5.0.0-beta.64","description": "Codex plugin: durable repo-native multi-goal orchestration with embedded success criteria and observable evidence audit.","type": "module","packageManager": "[email protected]",diff --git a/plugins/omo/components/ulw-loop/src/checkpoint-codex-validation.ts b/plugins/omo/components/ulw-loop/src/checkpoint-codex-validation.tsindex 4ef7de12..18479f07 100644--- a/plugins/omo/components/ulw-loop/src/checkpoint-codex-validation.ts+++ b/plugins/omo/components/ulw-loop/src/checkpoint-codex-validation.ts@@ -4,11 +4,19 @@ import {readCodexGoalSnapshotInput,reconcileCodexGoalSnapshot,} from "./codex-goal-snapshot.js";+import { acknowledgedDriverObjectives } from "./driver-objective-ack.js";import { codexGoalMode, compatibleCodexObjectives, expectedCodexObjective } from "./goal-status.js";import type { UlwLoopScope } from "./paths.js";import type { UlwLoopItem, UlwLoopPlan } from "./types.js";import { UlwLoopError } from "./types.js";+export interface CheckpointCodexGoalValidation {+ readonly raw: unknown;+ readonly nextActions: readonly string[];+ readonly warnings: readonly string[];+ readonly unacknowledgedObjective?: string;+}+export async function validateCheckpointCodexGoal(input: {readonly repoRoot: string;readonly plan: UlwLoopPlan;@@ -16,11 +24,12 @@ export async function validateCheckpointCodexGoal(input: {readonly raw: string | undefined;readonly evidence: string;readonly scope?: UlwLoopScope;-}): Promise<{ readonly raw: unknown; readonly nextActions: readonly string[]; readonly warnings: readonly string[] }> {+}): Promise<CheckpointCodexGoalValidation> {const snapshot = await readCodexGoalSnapshotInput(input.raw, input.repoRoot);const expected = expectedCodexObjective(input.plan, input.goal);const reconciliation = reconcileCodexGoalSnapshot(snapshot, {expectedObjective: expected,+ acknowledgedObjectives: acknowledgedDriverObjectives(input.plan),...(codexGoalMode(input.plan) === "aggregate"? { acceptedObjectives: compatibleCodexObjectives(input.plan) }: {}),@@ -28,8 +37,11 @@ export async function validateCheckpointCodexGoal(input: {if (!reconciliation.ok) throw new CodexGoalSnapshotError(formatCodexGoalReconciliation(reconciliation));return {raw: snapshot?.raw,- nextActions: reconciliation.warnings,- warnings: reconciliation.warnings.filter((warning) => warning.startsWith("driver_objective_differs")),+ nextActions: reconciliation.nextActions,+ warnings: reconciliation.warnings,+ ...(reconciliation.unacknowledgedObjective === undefined+ ? {}+ : { unacknowledgedObjective: reconciliation.unacknowledgedObjective }),};}diff --git a/plugins/omo/components/ulw-loop/src/checkpoint.ts b/plugins/omo/components/ulw-loop/src/checkpoint.tsindex f9efb8b4..0158a597 100644--- a/plugins/omo/components/ulw-loop/src/checkpoint.ts+++ b/plugins/omo/components/ulw-loop/src/checkpoint.ts@@ -6,6 +6,7 @@ import {combineCheckpointValidationErrors,validateCheckpointCodexGoal,} from "./checkpoint-codex-validation.js";+import { acknowledgeDriverObjective } from "./driver-objective-ack.js";import { requireAllCriteriaPass, requireAllPlanCriteriaPass, requireEssentialCriteriaPass } from "./evidence.js";import { codexGoalMode, isFinalRunCompletionCandidate } from "./goal-status.js";import type { UlwLoopScope } from "./paths.js";@@ -190,6 +191,7 @@ export async function checkpointUlwLoop(codexGoal = validation.raw;nextActions = validation.nextActions;warnings = validation.warnings;+ acknowledgeDriverObjective(plan, validation.unacknowledgedObjective);} catch (error) {if (!(error instanceof UlwLoopError)) throw error;codexValidationError = error;diff --git a/plugins/omo/components/ulw-loop/src/codex-goal-snapshot.ts b/plugins/omo/components/ulw-loop/src/codex-goal-snapshot.tsindex 63948c9c..f0527d39 100644--- a/plugins/omo/components/ulw-loop/src/codex-goal-snapshot.ts+++ b/plugins/omo/components/ulw-loop/src/codex-goal-snapshot.ts@@ -22,13 +22,19 @@ export interface CodexGoalSnapshot {export interface CodexGoalReconciliation {ok: boolean;snapshot: CodexGoalSnapshot;+ /** Facts to know (a differing driver objective); never something to do. */warnings: string[];+ /** Things to do next (create, re-create, or resume the driver goal). */+ nextActions: string[];errors: string[];+ /** The differing objective this reconciliation reported for the first time, for the caller to acknowledge. */+ unacknowledgedObjective?: string;}export interface ReconcileCodexGoalOptions {expectedObjective: string;readonly acceptedObjectives?: readonly string[];+ readonly acknowledgedObjectives?: readonly string[];}export class CodexGoalSnapshotError extends Error {}@@ -111,35 +117,41 @@ export function reconcileCodexGoalSnapshot(const effectiveSnapshot = snapshot ?? { available: false, raw: null };const errors: string[] = [];const warnings: string[] = [];+ const nextActions: string[] = [];const expected = options.expectedObjective;- const normalizedExpected = normalizeObjective(expected);if (!effectiveSnapshot.available) {- warnings.push(`call get_goal; if none, create_goal with codexObjective "${expected}" verbatim`);- return { ok: errors.length === 0, snapshot: effectiveSnapshot, warnings, errors };+ nextActions.push(`call get_goal; if none, create_goal with codexObjective "${expected}" verbatim`);+ return { ok: errors.length === 0, snapshot: effectiveSnapshot, warnings, nextActions, errors };}- const accepted = new Set(- [- normalizedExpected,- ...(options.acceptedObjectives ?? []).map((objective) => normalizeObjective(objective)),- ].filter(Boolean),- );+ const normalized = (objectives: readonly string[]) => new Set(objectives.map(normalizeObjective).filter(Boolean));+ const accepted = normalized([expected, ...(options.acceptedObjectives ?? [])]);+ const acknowledged = normalized(options.acknowledgedObjectives ?? []);const actual = normalizeObjective(effectiveSnapshot.objective ?? "");- if (actual && !accepted.has(normalizeObjective(actual))) {+ let unacknowledgedObjective: string | undefined;+ if (actual && !accepted.has(actual) && !acknowledged.has(actual)) {warnings.push(`driver_objective_differs: expected "${expected}", got "${actual}".`);+ unacknowledgedObjective = actual;}const actualStatus = effectiveSnapshot.status ?? "unknown";if (actualStatus === "paused" || actualStatus === "usage_limited" || actualStatus === "budget_limited") {- warnings.push("/goal resume or raise the budget");+ nextActions.push("/goal resume or raise the budget");}if (actualStatus === "complete")- warnings.push(`driver closed early: call create_goal with codexObjective "${expected}" verbatim`);- return { ok: errors.length === 0, snapshot: effectiveSnapshot, warnings, errors };+ nextActions.push(`driver closed early: call create_goal with codexObjective "${expected}" verbatim`);+ return {+ ok: errors.length === 0,+ snapshot: effectiveSnapshot,+ warnings,+ nextActions,+ errors,+ ...(unacknowledgedObjective === undefined ? {} : { unacknowledgedObjective }),+ };}export function formatCodexGoalReconciliation(reconciliation: CodexGoalReconciliation): string {- const parts = [...reconciliation.errors, ...reconciliation.warnings];+ const parts = [...reconciliation.errors, ...reconciliation.nextActions, ...reconciliation.warnings];return parts.join(" ");}diff --git a/plugins/omo/components/ulw-loop/src/domain-types.ts b/plugins/omo/components/ulw-loop/src/domain-types.tsindex 5f39255c..1c721f6b 100644--- a/plugins/omo/components/ulw-loop/src/domain-types.ts+++ b/plugins/omo/components/ulw-loop/src/domain-types.ts@@ -19,6 +19,7 @@ export interface UlwLoopSuccessCriterion {status: UlwLoopCriterionStatus;capturedAt?: string;notes?: string;+ artifacts?: string[];}export interface UlwLoopItem {@@ -75,6 +76,7 @@ export interface UlwLoopPlan {codexGoalMode?: UlwLoopCodexGoalMode;codexObjective?: string;codexObjectiveAliases?: string[];+ acknowledgedDriverObjectives?: string[];aggregateCompletion?: UlwLoopAggregateCompletion;activeGoalId?: string;validationBatches?: readonly UlwLoopValidationBatch[];@@ -173,6 +175,7 @@ export interface UlwLoopLedgerEntry {codexGoal?: unknown;evidence?: string;capturedEvidence?: string;+ artifacts?: string[];qualityGate?: unknown;steering?: UlwLoopSteeringAudit;before?: unknown;diff --git a/plugins/omo/components/ulw-loop/src/driver-objective-ack.ts b/plugins/omo/components/ulw-loop/src/driver-objective-ack.tsnew file mode 100644index 00000000..e4dd9589--- /dev/null+++ b/plugins/omo/components/ulw-loop/src/driver-objective-ack.ts@@ -0,0 +1,20 @@+import type { UlwLoopPlan } from "./types.js";++export function normalizeDriverObjective(value: string): string {+ return value.replace(/\s+/g, " ").trim();+}++export function acknowledgedDriverObjectives(plan: UlwLoopPlan): readonly string[] {+ return plan.acknowledgedDriverObjectives ?? [];+}++// A differing driver objective is reported once; the plan remembers the exact text so every later+// checkpoint under the same driver stays quiet, while a driver rewritten to a third objective is+// reported again.+export function acknowledgeDriverObjective(plan: UlwLoopPlan, objective: string | undefined): boolean {+ if (objective === undefined) return false;+ const normalized = normalizeDriverObjective(objective);+ if (!normalized || acknowledgedDriverObjectives(plan).includes(normalized)) return false;+ plan.acknowledgedDriverObjectives = [...acknowledgedDriverObjectives(plan), normalized];+ return true;+}diff --git a/plugins/omo/components/ulw-loop/src/evidence-artifacts.ts b/plugins/omo/components/ulw-loop/src/evidence-artifacts.tsnew file mode 100644index 00000000..5a861e16--- /dev/null+++ b/plugins/omo/components/ulw-loop/src/evidence-artifacts.ts@@ -0,0 +1,45 @@+import { existsSync } from "node:fs";+import { isAbsolute, relative, resolve, sep } from "node:path";+import { UlwLoopError } from "./types.js";++function fail(message: string, code: string, details: Record<string, unknown>): never {+ throw new UlwLoopError(message, code, { details });+}++function stored(repoRoot: string, absolute: string): string {+ const rel = relative(repoRoot, absolute);+ const inside = rel !== "" && !rel.startsWith("..") && !isAbsolute(rel);+ return inside ? rel.split(sep).join("/") : absolute;+}++// Artifacts are bound at record time: a cited path that does not exist is a claim without a file,+// so the whole record is refused before any state changes. Paths inside the session cwd persist+// repo-relative (portable across machines); paths outside persist absolute.+export function resolveEvidenceArtifacts(+ repoRoot: string,+ artifacts: readonly unknown[] | undefined,+): string[] | undefined {+ if (artifacts === undefined) return undefined;+ const seen = new Set<string>();+ const resolved: string[] = [];+ for (const [index, candidate] of artifacts.entries()) {+ const path = typeof candidate === "string" ? candidate.trim() : "";+ if (!path) fail(`Artifact ${index + 1} must be a non-empty path.`, "ULW_LOOP_ARGUMENT_INVALID", { index });+ const absolute = resolve(repoRoot, path);+ if (!existsSync(absolute))+ fail(+ `Evidence artifact does not exist: ${path} (resolved to ${absolute}).`,+ "ULW_LOOP_EVIDENCE_ARTIFACT_MISSING",+ {+ path,+ resolved: absolute,+ },+ );+ const value = stored(repoRoot, absolute);+ if (!seen.has(value)) {+ seen.add(value);+ resolved.push(value);+ }+ }+ return resolved;+}diff --git a/plugins/omo/components/ulw-loop/src/evidence.ts b/plugins/omo/components/ulw-loop/src/evidence.tsindex 36cbb378..c6bb6286 100644--- a/plugins/omo/components/ulw-loop/src/evidence.ts+++ b/plugins/omo/components/ulw-loop/src/evidence.ts@@ -1,3 +1,4 @@+import { resolveEvidenceArtifacts } from "./evidence-artifacts.js";import { essentialCriteriaOf, hasAllCriteriaPass, hasEssentialCriteriaPass } from "./goal-status.js";import type { UlwLoopScope } from "./paths.js";import { commit } from "./plan-commit.js";@@ -12,6 +13,7 @@ type RecordEvidenceArgs = {readonly status: EvidenceStatus;readonly evidence: string;readonly notes?: string;+ readonly artifacts?: readonly string[];};function ulwLoopFail(message: string, code: string, details: Record<string, unknown>): never {@@ -67,6 +69,7 @@ export async function recordEvidence(const goal = findGoal(plan, args.goalId);const criterion = findCriterion(goal, args.criterionId);const evidence = nonEmptyEvidence(args.evidence);+ const artifacts = resolveEvidenceArtifacts(repoRoot, args.artifacts);const kind = ledgerKind(args.status);const prevStatus = criterion.status;const capturedAt = iso();@@ -74,6 +77,8 @@ export async function recordEvidence(criterion.capturedEvidence = evidence;criterion.capturedAt = capturedAt;if (args.notes !== undefined) criterion.notes = args.notes;+ if (artifacts !== undefined) criterion.artifacts = artifacts;+ else delete criterion.artifacts;goal.updatedAt = capturedAt;plan.updatedAt = capturedAt;const ledgerEntry: UlwLoopLedgerEntry = {@@ -84,6 +89,7 @@ export async function recordEvidence(criterionStatus: args.status,evidence,capturedEvidence: evidence,+ ...(artifacts === undefined ? {} : { artifacts }),before: { status: prevStatus },after: { goalId: goal.id, criterionId: criterion.id, status: args.status, evidence, capturedAt, prevStatus },};@@ -112,6 +118,7 @@ export async function markCriteriaPendingResetForGoal(criterion.capturedEvidence = null;delete criterion.capturedAt;delete criterion.notes;+ delete criterion.artifacts;}goal.updatedAt = now;plan.updatedAt = now;diff --git a/plugins/omo/components/ulw-loop/src/paths.ts b/plugins/omo/components/ulw-loop/src/paths.tsindex c19e4bdd..87a8f958 100644--- a/plugins/omo/components/ulw-loop/src/paths.ts+++ b/plugins/omo/components/ulw-loop/src/paths.ts@@ -85,6 +85,13 @@ export function repoRelative(absolutePath: string, repoRoot: string): string {return absolutePath.split("\\").join("/");}+// The plan-level evidence root stays fixed for the whole run, unlike the per-goal attempt dir, so+// long lanes that span goals have one stable place to write artifacts.+export function ulwLoopEvidenceRoot(scope?: UlwLoopScope): string {+ const sessionId = normalizeUlwLoopSessionId(scope?.sessionId);+ return sessionId === null ? ".omo/evidence" : `.omo/evidence/ulw/${sessionId}`;+}+// Both the status --json emitter and the checkpoint enforcement resolve the attempt dir through// this function from the scope alone; a second resolution path (env, a literal placeholder)// would let the gate reject its own advertised directory.diff --git a/plugins/omo/components/ulw-loop/src/plan-crud.ts b/plugins/omo/components/ulw-loop/src/plan-crud.tsindex dcc9e10b..82f2e5af 100644--- a/plugins/omo/components/ulw-loop/src/plan-crud.ts+++ b/plugins/omo/components/ulw-loop/src/plan-crud.ts@@ -8,6 +8,7 @@ import {import { beforePlanMutation, commit } from "./plan-commit.js";import { appendGoalToPlan, deriveGoalCandidates, makeGoal } from "./plan-goal-factory.js";import { planExists, readUlwLoopPlan, withUlwLoopMutationLock } from "./plan-io.js";+import type { SuccessCriterionInput } from "./success-criteria-input.js";import type { UlwLoopToolkitSurface } from "./surface.js";import type {UlwLoopCodexGoalMode,@@ -20,6 +21,7 @@ import { iso, UlwLoopError } from "./types.js";import { parseValidationBatches } from "./validation-batch.js";export { deriveGoalCandidates, seedDefaultSuccessCriteria } from "./plan-goal-factory.js";+export type { SuccessCriterionInput } from "./success-criteria-input.js";export type UlwLoopPlanSummary = {readonly total: number;@@ -81,7 +83,7 @@ export async function createUlwLoopPlan(}const now = iso();const goals = deriveGoalCandidates(args.brief).map((goal, index) =>- makeGoal(goal.title, goal.objective, index, now),+ makeGoal(goal.title, goal.objective, index, now, { surface }),);const plan: UlwLoopPlan = {version: 1,@@ -128,13 +130,17 @@ function completedPlanExistsError(scope: UlwLoopScope | undefined, surface: UlwLexport async function addUlwLoopGoal(repoRoot: string,- args: { title: string; objective: string },+ args: { title: string; objective: string; successCriteria?: readonly SuccessCriterionInput[] },scope?: UlwLoopScope,+ surface: UlwLoopToolkitSurface = "lazycodex",): Promise<{ plan: UlwLoopPlan; goal: UlwLoopItem }> {return withUlwLoopMutationLock(repoRoot, scope, async () => {const plan = await readUlwLoopPlan(repoRoot, scope);const now = iso();- const goal = appendGoalToPlan(plan, args.title, args.objective, now);+ const goal = appendGoalToPlan(plan, args.title, args.objective, now, {+ surface,+ ...(args.successCriteria === undefined ? {} : { successCriteria: args.successCriteria }),+ });await commit(repoRoot, scope, {plan,entries: [{ at: now, kind: "goal_added", goalId: goal.id, status: goal.status, message: goal.title }],diff --git a/plugins/omo/components/ulw-loop/src/plan-goal-factory.ts b/plugins/omo/components/ulw-loop/src/plan-goal-factory.tsindex a1f2a880..9ee26bee 100644--- a/plugins/omo/components/ulw-loop/src/plan-goal-factory.ts+++ b/plugins/omo/components/ulw-loop/src/plan-goal-factory.ts@@ -1,6 +1,14 @@+import { criteriaFromInput, criterionId, type SuccessCriterionInput } from "./success-criteria-input.js";+import type { UlwLoopToolkitSurface } from "./surface.js";import type { UlwLoopItem, UlwLoopPlan, UlwLoopSuccessCriterion } from "./types.js";import { UlwLoopError } from "./types.js";+export interface GoalSeedOptions {+ readonly goalId?: string;+ readonly surface?: UlwLoopToolkitSurface;+ readonly successCriteria?: readonly SuccessCriterionInput[];+}+function cleanLine(line: string): string {return line.replace(/^\s*(?:[-*+]\s+|\d+[.)]\s+)/, "").trim();}@@ -38,40 +46,44 @@ function truncateObjective(objective: string): string {return objective.length > 80 ? `${objective.slice(0, 77).trimEnd()}...` : objective;}-export function seedDefaultSuccessCriteria(goalIndex: number, objective: string): UlwLoopSuccessCriterion[] {+// The placeholder must name the exact call that replaces it on the surface the plan is driven from,+// so a goal seeded without criteria costs one documented call per criterion instead of a doc hunt.+function replaceVia(goalId: string, id: string, surface: UlwLoopToolkitSurface): string {+ return surface === "omo-senpi"+ ? `Replace via agentToolkit.steer({ kind: "revise_criterion", source: "finding", goalId: "${goalId}", criterionId: "${id}", scenario, expectedEvidence, evidence, rationale }) (or pass successCriteria to addGoal)`+ : `Replace via omo-agent-toolkit ulw-loop steer --kind revise_criterion --goal-id ${goalId} --criterion-id ${id} --scenario "<scenario>" --expected-evidence "<proof>" --evidence "<why>" --rationale "<why>"`;+}++export function seedDefaultSuccessCriteria(+ goalIndex: number,+ objective: string,+ options: Pick<GoalSeedOptions, "goalId" | "surface"> = {},+): UlwLoopSuccessCriterion[] {const subject = truncateObjective(normalizeObjective(objective) || `Goal ${goalIndex + 1}`);+ const goalId = options.goalId ?? `G${String(goalIndex + 1).padStart(3, "0")}`;+ const surface = options.surface ?? "lazycodex";const rows = [+ ["happy", `happy path for: ${subject}`, `observable happy-path proof for goal ${goalIndex + 1}`, true],+ ["edge", "edge case (boundary/empty/malformed)", `boundary or malformed-input proof for: ${subject}`, true],[- "C001",- "happy",- `happy path for: ${subject}`,- `Replace via revise_criterion with observable happy-path proof for goal ${goalIndex + 1}.`,- true,- ],- [- "C002",- "edge",- "edge case (boundary/empty/malformed)",- `Replace via revise_criterion with boundary or malformed-input proof for: ${subject}.`,- true,- ],- [- "C003","regression","regression: adjacent surface still works",- `Replace via revise_criterion with regression proof for neighboring behavior after: ${subject}.`,+ `regression proof for neighboring behavior after: ${subject}`,false,],] as const;- return rows.map(([id, userModel, scenario, expectedEvidence, essential]) => ({- id,- scenario,- userModel,- expectedEvidence,- essential,- capturedEvidence: null,- status: "pending",- }));+ return rows.map(([userModel, scenario, proof, essential], index) => {+ const id = criterionId(index);+ return {+ id,+ scenario,+ userModel,+ expectedEvidence: `${replaceVia(goalId, id, surface)} with ${proof}.`,+ essential,+ capturedEvidence: null,+ status: "pending",+ };+ });}export function deriveGoalCandidates(brief: string): Array<{ title: string; objective: string }> {@@ -101,23 +113,43 @@ export function deriveGoalCandidates(brief: string): Array<{ title: string; obje}));}-export function makeGoal(title: string, objective: string, index: number, now: string): UlwLoopItem {+export function makeGoal(+ title: string,+ objective: string,+ index: number,+ now: string,+ options: GoalSeedOptions = {},+): UlwLoopItem {const cleanTitle = assertNonEmpty(title, "title");const cleanObjective = assertNonEmpty(objective, "objective");+ const id = normalizeGoalId(cleanTitle, index);+ const successCriteria =+ options.successCriteria === undefined+ ? seedDefaultSuccessCriteria(index, cleanObjective, {+ goalId: id,+ ...(options.surface === undefined ? {} : { surface: options.surface }),+ })+ : criteriaFromInput(options.successCriteria);return {- id: normalizeGoalId(cleanTitle, index),+ id,title: cleanTitle,objective: cleanObjective,status: "pending",- successCriteria: seedDefaultSuccessCriteria(index, cleanObjective),+ successCriteria,attempt: 0,createdAt: now,updatedAt: now,};}-export function appendGoalToPlan(plan: UlwLoopPlan, title: string, objective: string, now: string): UlwLoopItem {- const goal = makeGoal(title, objective, plan.goals.length, now);+export function appendGoalToPlan(+ plan: UlwLoopPlan,+ title: string,+ objective: string,+ now: string,+ options: GoalSeedOptions = {},+): UlwLoopItem {+ const goal = makeGoal(title, objective, plan.goals.length, now, options);plan.goals.push(goal);plan.updatedAt = now;return goal;diff --git a/plugins/omo/components/ulw-loop/src/review-blockers.ts b/plugins/omo/components/ulw-loop/src/review-blockers.tsindex 0e2aa107..92497794 100644--- a/plugins/omo/components/ulw-loop/src/review-blockers.ts+++ b/plugins/omo/components/ulw-loop/src/review-blockers.ts@@ -6,6 +6,7 @@ import {readCodexGoalSnapshotInput,reconcileCodexGoalSnapshot,} from "./codex-goal-snapshot.js";+import { acknowledgeDriverObjective, acknowledgedDriverObjectives } from "./driver-objective-ack.js";import { compatibleCodexObjectives, expectedCodexObjective, isFinalRunCompletionCandidate } from "./goal-status.js";import type { UlwLoopScope } from "./paths.js";import { commit } from "./plan-commit.js";@@ -40,12 +41,13 @@ function nextGoalId(plan: UlwLoopPlan): string {function appendBlockerGoal(plan: UlwLoopPlan, args: RecordFinalReviewBlockersArgs, now: string): UlwLoopItem {const index = plan.goals.length;+ const id = nextGoalId(plan);const goal: UlwLoopItem = {- id: nextGoalId(plan),+ id,title: args.title,objective: args.objective,status: "pending",- successCriteria: seedDefaultSuccessCriteria(index, args.objective),+ successCriteria: seedDefaultSuccessCriteria(index, args.objective, { goalId: id }),attempt: 0,createdAt: now,updatedAt: now,@@ -70,8 +72,10 @@ export async function recordFinalReviewBlockers(const reconciliation = reconcileCodexGoalSnapshot(snapshot, {expectedObjective: expectedCodexObjective(plan, goal),acceptedObjectives: compatibleCodexObjectives(plan),+ acknowledgedObjectives: acknowledgedDriverObjectives(plan),});if (!reconciliation.ok) throw new CodexGoalSnapshotError(formatCodexGoalReconciliation(reconciliation));+ acknowledgeDriverObjective(plan, reconciliation.unacknowledgedObjective);const now = iso();for (const field of BLOCKER_FIELDS) Reflect.deleteProperty(goal, field);@@ -95,8 +99,8 @@ export async function recordFinalReviewBlockers(blockedGoal: goal,newGoal,ledgerEntries,- nextActions: reconciliation.warnings,- warnings: reconciliation.warnings.filter((warning) => warning.startsWith("driver_objective_differs")),+ nextActions: reconciliation.nextActions,+ warnings: reconciliation.warnings,};});}diff --git a/plugins/omo/components/ulw-loop/src/sdk/factory.ts b/plugins/omo/components/ulw-loop/src/sdk/factory.tsindex 17aa0e72..2a80e306 100644--- a/plugins/omo/components/ulw-loop/src/sdk/factory.ts+++ b/plugins/omo/components/ulw-loop/src/sdk/factory.ts@@ -5,6 +5,7 @@ import {normalizeUlwLoopSessionId,type UlwLoopScope,ulwLoopAttemptEvidenceDir,+ ulwLoopEvidenceRoot,ulwLoopGoalsRelativePath,} from "../paths.js";import { addUlwLoopGoal, createUlwLoopPlan, startNextUlwLoop, summarizeUlwLoopPlan } from "../plan-crud.js";@@ -86,9 +87,10 @@ function unreachable(value: never): never {throw new UlwLoopError(`Unhandled operation: ${String(value)}`, "ULW_LOOP_OPERATION_UNHANDLED");}-function nextActionsFrom(result: object): readonly string[] {- if (!("nextActions" in result) || !Array.isArray(result.nextActions)) return [];- return result.nextActions.filter((action): action is string => typeof action === "string").slice(0, 8);+function stringsFrom(result: object, key: "nextActions" | "warnings"): readonly string[] {+ if (!(key in result)) return [];+ const value = Object.entries(result).find(([name]) => name === key)?.[1];+ return Array.isArray(value) ? value.filter((item): item is string => typeof item === "string").slice(0, 8) : [];}function checkpointWithValidatedSnapshot(@@ -116,8 +118,15 @@ export function createAgentToolkit(context: ToolkitContext, deps: AgentToolkitDe): Promise<ToolkitResponseFor<Operation>> => {try {const result = await fn();- const nextActions = typeof result === "object" && result !== null ? nextActionsFrom(result) : [];- return await notify(operation, { ok: true, operation, result, nextActions });+ const nextActions = typeof result === "object" && result !== null ? stringsFrom(result, "nextActions") : [];+ const warnings = typeof result === "object" && result !== null ? stringsFrom(result, "warnings") : [];+ return await notify(operation, {+ ok: true,+ operation,+ result,+ nextActions,+ ...(warnings.length === 0 ? {} : { warnings }),+ });} catch (error) {if (error instanceof UlwLoopError && error.code === "ULW_LOOP_PLAN_MISSING" && context.surface === "omo-senpi")return notify(@@ -177,6 +186,7 @@ export function createAgentToolkit(context: ToolkitContext, deps: AgentToolkitDeplan,summary: summarizeUlwLoopPlan(plan),nextActions: statusNextActions(plan, context.surface),+ evidenceRoot: ulwLoopEvidenceRoot(scope),// Attempt directories are an evidence-layout v2 concept; a v1 plan must not advertise one....(active === undefined || plan.evidenceLayoutVersion !== 2? {}@@ -190,8 +200,8 @@ export function createAgentToolkit(context: ToolkitContext, deps: AgentToolkitDe? checkpointTemplate(context.cwd, scope, args.goalId, { surface: context.surface }): checkpointWithValidatedSnapshot(context, scope, args),),- steer: (args) => invoke("steer", () => steerUlwLoop(context.cwd, args, scope)),- addGoal: (args) => invoke("add-goal", () => addUlwLoopGoal(context.cwd, args, scope)),+ steer: (args) => invoke("steer", () => steerUlwLoop(context.cwd, args, scope, context.surface)),+ addGoal: (args) => invoke("add-goal", () => addUlwLoopGoal(context.cwd, args, scope, context.surface)),criteria: (args) =>invoke("criteria", async () => {const plan = await readUlwLoopPlan(context.cwd, scope);diff --git a/plugins/omo/components/ulw-loop/src/sdk/manifest.ts b/plugins/omo/components/ulw-loop/src/sdk/manifest.tsindex 0fa2c888..f790ac77 100644--- a/plugins/omo/components/ulw-loop/src/sdk/manifest.ts+++ b/plugins/omo/components/ulw-loop/src/sdk/manifest.ts@@ -15,7 +15,12 @@ export type UlwLoopOperation = (typeof ULW_LOOP_OPERATIONS)[number];export interface ToolkitOperationManifest {readonly name: UlwLoopOperation;+ /** The camelCase method that runs this operation on every SDK surface. */+ readonly method: string;readonly mutating: boolean;+ readonly description: string;+ /** Argument field -> type notation; a trailing `?` marks an optional field. */+ readonly args: Readonly<Record<string, string>>;}export interface ToolkitManifest {@@ -24,19 +29,128 @@ export interface ToolkitManifest {readonly operations: readonly ToolkitOperationManifest[];}+const CRITERION_INPUT =+ '{ scenario: string, expectedEvidence: string, userModel?: "happy" | "edge" | "regression" | "adversarial", essential?: boolean }';+const STEER_KINDS =+ '"add_subgoal" | "split_subgoal" | "reorder_pending" | "revise_pending_wording" | "revise_criterion" | "annotate_ledger" | "mark_blocked_superseded"';+export const ULW_LOOP_MANIFEST = {version: 1,name: "ulw-loop",operations: [- { name: "help", mutating: false },- { name: "create-goals", mutating: true },- { name: "status", mutating: false },- { name: "complete-goals", mutating: true },- { name: "checkpoint", mutating: true },- { name: "steer", mutating: true },- { name: "add-goal", mutating: true },- { name: "criteria", mutating: false },- { name: "record-evidence", mutating: true },- { name: "record-review-blockers", mutating: true },+ {+ name: "help",+ method: "help",+ mutating: false,+ description: "Return this manifest: every operation with its method name, argument fields, and what it does.",+ args: {},+ },+ {+ name: "create-goals",+ method: "createGoals",+ mutating: true,+ description:+ "Create the session plan from a brief; one goal per bullet, each seeded with placeholder criteria until revised.",+ args: {+ brief: "string",+ codexGoalMode: '"aggregate" | "per_story"?',+ force: "boolean?",+ validationBatchesJson: "string?",+ },+ },+ {+ name: "status",+ method: "status",+ mutating: false,+ description:+ "Read the plan, its summary, structured nextActions, the stable evidenceRoot, and the active goal's currentAttemptDir.",+ args: {},+ },+ {+ name: "complete-goals",+ method: "completeGoals",+ mutating: true,+ description:+ "Acquire the next eligible goal or resume the in-progress one; returns { done: true } once the aggregate is complete.",+ args: { retryFailed: "boolean?" },+ },+ {+ name: "checkpoint",+ method: "checkpoint",+ mutating: true,+ description:+ "Close the goal as complete, failed, or blocked with evidence; the final goal also needs the quality gate. printTemplate returns that gate's template instead.",+ args: {+ goalId: "string",+ status: '"complete" | "failed" | "blocked"',+ evidence: "string",+ codexGoalJson: "string?",+ qualityGateJson: "string?",+ printTemplate: "true? (with goalId? only)",+ },+ },+ {+ name: "steer",+ method: "steer",+ mutating: true,+ description:+ "Propose an evidence-backed plan mutation; revise_criterion replaces a criterion's scenario, expectedEvidence, or userModel.",+ args: {+ kind: STEER_KINDS,+ source: '"finding" | "user_prompt_submit" | "cli"',+ evidence: "string",+ rationale: "string",+ goalId: "string?",+ criterionId: "string? (revise_criterion)",+ scenario: "string? (revise_criterion)",+ expectedEvidence: "string? (revise_criterion)",+ userModel: '"happy" | "edge" | "regression" | "adversarial"? (revise_criterion)',+ title: "string? (add_subgoal)",+ objective: "string? (add_subgoal)",+ childGoals: "{ title: string, objective: string }[]? (split_subgoal)",+ revisedTitle: "string? (revise_pending_wording)",+ revisedObjective: "string? (revise_pending_wording)",+ pendingOrder: "string[]? (reorder_pending)",+ blockedReason: "string? (mark_blocked_superseded)",+ idempotencyKey: "string?",+ },+ },+ {+ name: "add-goal",+ method: "addGoal",+ mutating: true,+ description:+ "Append a goal; pass successCriteria to define its criteria in the same call, otherwise placeholders name the revise call.",+ args: { title: "string", objective: "string", successCriteria: `${CRITERION_INPUT}[]?` },+ },+ {+ name: "criteria",+ method: "criteria",+ mutating: false,+ description: "List one goal's success criteria with their status and captured evidence.",+ args: { goalId: "string" },+ },+ {+ name: "record-evidence",+ method: "recordEvidence",+ mutating: true,+ description:+ "Record a criterion's pass, fail, or blocked evidence; artifacts must exist (resolved against the session cwd) and are stored with the criterion and the ledger entry.",+ args: {+ goalId: "string",+ criterionId: "string",+ status: '"pass" | "fail" | "blocked"',+ evidence: "string",+ notes: "string?",+ artifacts: "string[]?",+ },+ },+ {+ name: "record-review-blockers",+ method: "recordReviewBlockers",+ mutating: true,+ description: "Mark the final goal review_blocked and append the blocker goal the reviewer verdict names.",+ args: { goalId: "string", title: "string", objective: "string", evidence: "string", codexGoalJson: "string?" },+ },] satisfies readonly ToolkitOperationManifest[],} satisfies ToolkitManifest;diff --git a/plugins/omo/components/ulw-loop/src/sdk/types.ts b/plugins/omo/components/ulw-loop/src/sdk/types.tsindex 713601f4..8979c320 100644--- a/plugins/omo/components/ulw-loop/src/sdk/types.ts+++ b/plugins/omo/components/ulw-loop/src/sdk/types.ts@@ -63,12 +63,15 @@ export interface ToolkitFailure<Operation extends string = string> {readonly ok: false;readonly operation: Operation;readonly error: ToolkitError;+ readonly warnings?: readonly string[];}type StatusResult = {readonly plan: UlwLoopPlan;readonly summary: ReturnType<typeof summarizeUlwLoopPlan>;readonly nextActions: readonly string[];+ /** Plan-level evidence directory, stable for the whole run (relative to the session cwd). */+ readonly evidenceRoot: string;readonly currentAttemptDir?: string;};diff --git a/plugins/omo/components/ulw-loop/src/steering-mutations.ts b/plugins/omo/components/ulw-loop/src/steering-mutations.tsindex 738ff199..d9854075 100644--- a/plugins/omo/components/ulw-loop/src/steering-mutations.ts+++ b/plugins/omo/components/ulw-loop/src/steering-mutations.ts@@ -1,5 +1,6 @@// biome-ignore-all format: compact extracted steering mutations stay below the pure LOC budget.import { seedDefaultSuccessCriteria } from "./plan-crud.js";+import type { UlwLoopToolkitSurface } from "./surface.js";import type { UlwLoopItem, UlwLoopPlan, UlwLoopSteeringChildGoal, UlwLoopSteeringProposal, UlwLoopSuccessCriterionUserModel } from "./types.js";import { ULW_LOOP_SUCCESS_CRITERION_USER_MODELS } from "./types.js";import { updateBatchesAfterSupersede } from "./validation-batch.js";@@ -30,9 +31,9 @@ function nextId(plan: UlwLoopPlan, offset: number): string {return `G${String(max + offset).padStart(3, "0")}`;}-export function makeGoal(plan: UlwLoopPlan, childGoal: UlwLoopSteeringChildGoal, evidence: string, now: string, offset: number): UlwLoopItem {+export function makeGoal(plan: UlwLoopPlan, childGoal: UlwLoopSteeringChildGoal, evidence: string, now: string, offset: number, surface: UlwLoopToolkitSurface = "lazycodex"): UlwLoopItem {const id = nextId(plan, offset); const digits = /^G(\d+)/u.exec(id)?.[1]; const goalIndex = digits === undefined ? plan.goals.length + offset - 1 : Number(digits) - 1;- return { id, title: childGoal.title, objective: childGoal.objective, status: "pending", successCriteria: seedDefaultSuccessCriteria(goalIndex, childGoal.objective), attempt: 0, createdAt: now, updatedAt: now, evidence };+ return { id, title: childGoal.title, objective: childGoal.objective, status: "pending", successCriteria: seedDefaultSuccessCriteria(goalIndex, childGoal.objective, { goalId: id, surface }), attempt: 0, createdAt: now, updatedAt: now, evidence };}export function reviseWording(plan: UlwLoopPlan, proposal: UlwLoopSteeringProposal, now: string): void {@@ -41,9 +42,9 @@ export function reviseWording(plan: UlwLoopPlan, proposal: UlwLoopSteeringPropostarget.steeringEvidence = proposal.evidence; target.steeringRationale = proposal.rationale; target.updatedAt = now;}-export function splitOrBlock(plan: UlwLoopPlan, proposal: UlwLoopSteeringProposal, now: string): void {+export function splitOrBlock(plan: UlwLoopPlan, proposal: UlwLoopSteeringProposal, now: string, surface: UlwLoopToolkitSurface = "lazycodex"): void {const target = goal(plan, targets(proposal)[0]); if (target === undefined) return;- const replacements = children(proposal).map((item, index) => makeGoal(plan, item, proposal.evidence, now, index + 1));+ const replacements = children(proposal).map((item, index) => makeGoal(plan, item, proposal.evidence, now, index + 1, surface));target.steeringEvidence = proposal.evidence; target.steeringRationale = proposal.rationale; target.updatedAt = now;if (replacements.length === 0) { target.status = "blocked"; target.steeringStatus = "blocked"; target.blockedReason = proposal.blockedReason ?? proposal.rationale; }else { target.steeringStatus = "superseded"; target.supersededBy = replacements.map((item) => item.id); for (const item of replacements) item.supersedes = [target.id]; plan.goals.splice(plan.goals.indexOf(target) + 1, 0, ...replacements); updateBatchesAfterSupersede(plan, target.id, replacements.map((item) => item.id)); }diff --git a/plugins/omo/components/ulw-loop/src/steering-types.ts b/plugins/omo/components/ulw-loop/src/steering-types.tsindex f9063098..7d908a7b 100644--- a/plugins/omo/components/ulw-loop/src/steering-types.ts+++ b/plugins/omo/components/ulw-loop/src/steering-types.ts@@ -1,4 +1,8 @@-import type { UlwLoopSteeringMutationKind, UlwLoopSteeringSource } from "./constants.js";+import type {+ UlwLoopSteeringMutationKind,+ UlwLoopSteeringSource,+ UlwLoopSuccessCriterionUserModel,+} from "./constants.js";import type { UlwLoopItem, UlwLoopPlan } from "./domain-types.js";export interface UlwLoopSteeringInvariantResult {@@ -25,9 +29,17 @@ export interface UlwLoopSteeringAfterPayload {export interface UlwLoopSteeringProposal {kind: UlwLoopSteeringMutationKind;source: UlwLoopSteeringSource;+ /** Alias of `targetGoalId`; the SDK documentation uses `goalId` like every other operation. */+ goalId?: string;targetGoalId?: string;targetGoalIds?: string[];criterionId?: string;+ /** `revise_criterion` payload: the replacement scenario text. */+ scenario?: string;+ /** `revise_criterion` payload: the replacement observable-proof text. */+ expectedEvidence?: string;+ /** `revise_criterion` payload: the replacement user model. */+ userModel?: UlwLoopSuccessCriterionUserModel;evidence: string;rationale: string;title?: string;diff --git a/plugins/omo/components/ulw-loop/src/steering.ts b/plugins/omo/components/ulw-loop/src/steering.tsindex 0734ce8d..ad727f27 100644--- a/plugins/omo/components/ulw-loop/src/steering.ts+++ b/plugins/omo/components/ulw-loop/src/steering.ts@@ -5,6 +5,7 @@ import { commit } from "./plan-commit.js";import { findAcceptedSteeringLedgerEntry, readUlwLoopPlan, withUlwLoopMutationLock } from "./plan-io.js";import { makeGoal, reviseCriterion, reviseWording, splitOrBlock } from "./steering-mutations.js";import { buildSteeringPlanSnapshot, changedGoalIdsBetween } from "./steering-snapshot.js";+import type { UlwLoopToolkitSurface } from "./surface.js";import type {SteerUlwLoopResult,UlwLoopItem,@@ -21,7 +22,7 @@ import { iso, ULW_LOOP_STEERING_MUTATION_KINDS, ULW_LOOP_SUCCESS_CRITERION_USER_import { batchUpdateLedgerEntry } from "./validation-batch.js";const SOURCES = ["user_prompt_submit", "finding", "cli"] as const satisfies readonly UlwLoopSteeringSource[];-const PROTECTED = new Set(["aggregateCompletion", "codexObjective", "codexObjectiveAliases", "originalConstraints", "qualityGate", "status", "completedAt", "completionStatus"]);+const PROTECTED = new Set(["aggregateCompletion", "codexObjective", "codexObjectiveAliases", "acknowledgedDriverObjectives", "originalConstraints", "qualityGate", "status", "completedAt", "completionStatus"]);const isObject = (value: unknown): value is object => typeof value === "object" && value !== null; const isPlain = (value: unknown): value is object => isObject(value) && !Array.isArray(value);const read = (value: object, key: string): unknown => Object.entries(value).find(([name]) => name === key)?.[1];const isText = (value: unknown): value is string => typeof value === "string" && value.trim().length > 0;@@ -156,17 +157,17 @@ function validateCriterion(plan: UlwLoopPlan, proposal: object, reasons: string[if (model !== undefined && !isModel(model)) reasons.push("invalid userModel");}-export function applySteeringMutation(plan: UlwLoopPlan, proposal: UlwLoopSteeringProposal, audit: UlwLoopSteeringAudit): UlwLoopPlan {+export function applySteeringMutation(plan: UlwLoopPlan, proposal: UlwLoopSteeringProposal, audit: UlwLoopSteeringAudit, surface: UlwLoopToolkitSurface = "lazycodex"): UlwLoopPlan {const next = structuredClone(plan);if (!audit.invariant.accepted) return next;const now = proposal.now?.toISOString() ?? iso();- if (proposal.kind === "add_subgoal") next.goals.push(makeGoal(next, { title: proposal.title ?? "", objective: proposal.objective ?? "" }, proposal.evidence, now, 1));+ if (proposal.kind === "add_subgoal") next.goals.push(makeGoal(next, { title: proposal.title ?? "", objective: proposal.objective ?? "" }, proposal.evidence, now, 1, surface));if (proposal.kind === "reorder_pending") {const order = pendingOrder(proposal);next.goals = [...order.map((id) => goal(next, id)).filter((item): item is UlwLoopItem => item !== undefined), ...next.goals.filter((item) => !order.includes(item.id))];}if (proposal.kind === "revise_pending_wording") reviseWording(next, proposal, now);- if (proposal.kind === "split_subgoal" || proposal.kind === "mark_blocked_superseded") splitOrBlock(next, proposal, now);+ if (proposal.kind === "split_subgoal" || proposal.kind === "mark_blocked_superseded") splitOrBlock(next, proposal, now, surface);if (proposal.kind === "revise_criterion") reviseCriterion(next, proposal, now);if (proposal.kind !== "annotate_ledger") next.updatedAt = now;return next;@@ -188,7 +189,7 @@ export function parseUlwLoopSteeringDirective(text: string): UlwLoopSteeringProp}}-export async function steerUlwLoop(repoRoot: string, proposal: UlwLoopSteeringProposal, scope?: UlwLoopScope): Promise<SteerUlwLoopResult> {+export async function steerUlwLoop(repoRoot: string, proposal: UlwLoopSteeringProposal, scope?: UlwLoopScope, surface: UlwLoopToolkitSurface = "lazycodex"): Promise<SteerUlwLoopResult> {return withUlwLoopMutationLock(repoRoot, scope, async () => {const plan = await readUlwLoopPlan(repoRoot, scope);const key = proposal.idempotencyKey ?? proposal.promptSignature;@@ -201,7 +202,7 @@ export async function steerUlwLoop(repoRoot: string, proposal: UlwLoopSteeringPr}const audit = validateUlwLoopSteeringProposal(plan, proposal);const accepted = audit.invariant.accepted;- const next = accepted ? applySteeringMutation(plan, proposal, audit) : plan;+ const next = accepted ? applySteeringMutation(plan, proposal, audit, surface) : plan;const finalAudit: UlwLoopSteeringAudit = { ...audit };if (accepted) {const changed = changedGoalIdsBetween(plan, next);diff --git a/plugins/omo/components/ulw-loop/src/success-criteria-input.ts b/plugins/omo/components/ulw-loop/src/success-criteria-input.tsnew file mode 100644index 00000000..b568a2d2--- /dev/null+++ b/plugins/omo/components/ulw-loop/src/success-criteria-input.ts@@ -0,0 +1,56 @@+import type { UlwLoopSuccessCriterion, UlwLoopSuccessCriterionUserModel } from "./types.js";+import { ULW_LOOP_SUCCESS_CRITERION_USER_MODELS, UlwLoopError } from "./types.js";++export interface SuccessCriterionInput {+ readonly scenario: string;+ readonly expectedEvidence: string;+ readonly userModel?: UlwLoopSuccessCriterionUserModel;+ readonly essential?: boolean;+}++function invalid(message: string, details: Record<string, unknown>): never {+ throw new UlwLoopError(`Invalid successCriteria: ${message}`, "ULW_LOOP_ARGUMENT_INVALID", { details });+}++function isUserModel(value: unknown): value is UlwLoopSuccessCriterionUserModel {+ return typeof value === "string" && ULW_LOOP_SUCCESS_CRITERION_USER_MODELS.some((model) => model === value);+}++function requireText(value: unknown, field: string, index: number): string {+ const trimmed = typeof value === "string" ? value.trim() : "";+ return trimmed || invalid(`entry ${index + 1} needs a non-empty ${field}.`, { index, field });+}++export function criterionId(index: number): string {+ return `C${String(index + 1).padStart(3, "0")}`;+}++export function criteriaFromInput(input: readonly unknown[]): UlwLoopSuccessCriterion[] {+ if (input.length === 0) invalid("provide at least one criterion or omit the field for placeholders.", { count: 0 });+ return input.map((entry, index) => {+ if (typeof entry !== "object" || entry === null || Array.isArray(entry))+ return invalid(`entry ${index + 1} must be an object.`, { index });+ const record: Record<string, unknown> = { ...entry };+ const userModel = record["userModel"] ?? "happy";+ if (!isUserModel(userModel))+ return invalid(+ `entry ${index + 1} userModel must be one of ${ULW_LOOP_SUCCESS_CRITERION_USER_MODELS.join(", ")}.`,+ {+ index,+ userModel: String(userModel),+ },+ );+ const essential = record["essential"];+ if (essential !== undefined && typeof essential !== "boolean")+ return invalid(`entry ${index + 1} essential must be a boolean.`, { index });+ return {+ id: criterionId(index),+ scenario: requireText(record["scenario"], "scenario", index),+ userModel,+ expectedEvidence: requireText(record["expectedEvidence"], "expectedEvidence", index),+ essential: essential ?? true,+ capturedEvidence: null,+ status: "pending",+ };+ });+}diff --git a/plugins/omo/components/ulw-loop/test/codex-goal-snapshot.test.ts b/plugins/omo/components/ulw-loop/test/codex-goal-snapshot.test.tsindex a05f015e..eabde3de 100644--- a/plugins/omo/components/ulw-loop/test/codex-goal-snapshot.test.ts+++ b/plugins/omo/components/ulw-loop/test/codex-goal-snapshot.test.ts@@ -152,6 +152,41 @@ describe("reconcileCodexGoalSnapshot", () => {expect(reconciliation.ok).toBe(true);expect(reconciliation.errors).toHaveLength(0);expect(reconciliation.warnings.join(" ")).toContain("driver_objective_differs");+ expect(reconciliation.nextActions).toEqual([]);+ expect(reconciliation.unacknowledgedObjective).toBe("X");+ });++ it("#given the differing objective was acknowledged #when reconciled again #then it is silent", () => {+ const reconciliation = reconcileCodexGoalSnapshot(+ { available: true, objective: " X \n", status: "active", raw: null },+ { expectedObjective: "Y", acknowledgedObjectives: ["X"] },+ );++ expect(reconciliation.warnings).toEqual([]);+ expect(reconciliation.nextActions).toEqual([]);+ expect(reconciliation.unacknowledgedObjective).toBeUndefined();+ });++ it("#given no driver snapshot #when reconciled #then create_goal is a next action, not a warning", () => {+ const reconciliation = reconcileCodexGoalSnapshot(null, { expectedObjective: "Y" });++ expect(reconciliation.nextActions.join(" ")).toContain("create_goal");+ expect(reconciliation.warnings).toEqual([]);+ });++ it("#given a completed or limited driver #when reconciled #then the advice is a next action", () => {+ const completed = reconcileCodexGoalSnapshot(+ { available: true, objective: "Y", status: "complete", raw: null },+ { expectedObjective: "Y" },+ );+ const limited = reconcileCodexGoalSnapshot(+ { available: true, objective: "Y", status: "usage_limited", raw: null },+ { expectedObjective: "Y" },+ );++ expect(completed.nextActions.join(" ")).toContain("create_goal");+ expect(limited.nextActions.join(" ")).toContain("/goal resume");+ expect([...completed.warnings, ...limited.warnings]).toEqual([]);});it("accepts a parsable snapshot without objective as advisory", () => {@@ -176,7 +211,8 @@ describe("reconcileCodexGoalSnapshot", () => {// thenexpect(reconciliation.ok).toBe(true);expect(reconciliation.errors).toHaveLength(0);- expect(reconciliation.warnings.join(" ")).toContain("/goal resume");+ expect(reconciliation.nextActions.join(" ")).toContain("/goal resume");+ expect(reconciliation.warnings).toEqual([]);});});diff --git a/plugins/omo/components/ulw-loop/test/sdk-driver-states.test.ts b/plugins/omo/components/ulw-loop/test/sdk-driver-states.test.tsindex f0391def..3c6efe4f 100644--- a/plugins/omo/components/ulw-loop/test/sdk-driver-states.test.ts+++ b/plugins/omo/components/ulw-loop/test/sdk-driver-states.test.ts@@ -21,12 +21,17 @@ interface Seeded {// One fixture shape for every driver state: a real plan whose first goal is ready to close, so the// only thing under test is what the driver snapshot does to the checkpoint.-async function seed(sessionId: string): Promise<Seeded> {+async function seed(sessionId: string, brief = "- alpha goal\n- beta goal"): Promise<Seeded> {const cwd = await mkdtemp(join(tmpdir(), "ulw-driver-"));workDirs.push(cwd);const toolkit = createAgentToolkit({ cwd, sessionId, surface: "omo-senpi" });- const created = await toolkit.createGoals({ brief: "- alpha goal\n- beta goal" });+ const created = await toolkit.createGoals({ brief });if (!created.ok) throw new Error("fixture could not create goals");+ return passNextGoal(cwd, sessionId);+}++async function passNextGoal(cwd: string, sessionId: string): Promise<Seeded> {+ const toolkit = createAgentToolkit({ cwd, sessionId, surface: "omo-senpi" });const started = await toolkit.completeGoals({});if (!started.ok || started.operation !== "complete-goals" || "done" in started.result)throw new Error("fixture could not start a goal");@@ -46,6 +51,10 @@ async function seed(sessionId: string): Promise<Seeded> {return { cwd, sessionId, goalId, objective: plan.codexObjective ?? "" };}+function warningsOf(result: object): readonly string[] {+ return "warnings" in result && Array.isArray(result.warnings) ? result.warnings : [];+}+async function closeWith(seeded: Seeded, snapshot?: Record<string, unknown>) {const toolkit = createAgentToolkit({ cwd: seeded.cwd, sessionId: seeded.sessionId, surface: "omo-senpi" });return toolkit.checkpoint({@@ -108,15 +117,35 @@ describe("SDK driver-goal states", () => {});describe("#given a driver whose objective differs from the plan", () => {- it("#when the goal is checkpointed #then the difference is reported, never a rejection", async () => {+ it("#when the goal is checkpointed #then the difference is a warning, never a rejection and never a next action", async () => {const seeded = await seed("driver-differs");const closed = await closeWith(seeded, { goal: { objective: "a different objective", status: "active" } });expect(closed.ok).toBe(true);if (closed.ok) {- expect([...(closed.warnings ?? []), ...closed.nextActions].join(" ")).toContain("driver_objective_differs");+ expect(warningsOf(closed.result).join(" ")).toContain("driver_objective_differs");+ expect(closed.nextActions.join(" ")).not.toContain("driver_objective_differs");+ expect(closed.nextActions.join(" ")).not.toContain("create_goal");+ }+ });++ it("#when a later goal is checkpointed under the same driver #then the difference is acknowledged in the plan and not repeated", async () => {+ const first = await seed("driver-differs-once", "- alpha goal\n- beta goal\n- gamma goal");+ const driver = { goal: { objective: " a different\n objective ", status: "active" } };++ const firstClose = await closeWith(first, driver);+ const second = await passNextGoal(first.cwd, first.sessionId);+ const secondClose = await closeWith(second, driver);++ expect(firstClose.ok && secondClose.ok).toBe(true);+ if (firstClose.ok && secondClose.ok) {+ expect(warningsOf(firstClose.result).join(" ")).toContain("driver_objective_differs");+ expect(warningsOf(secondClose.result)).toEqual([]);+ expect(secondClose.nextActions).toEqual([]);}+ const plan = await readUlwLoopPlan(first.cwd, { sessionId: first.sessionId });+ expect(plan.acknowledgedDriverObjectives).toEqual(["a different objective"]);});});diff --git a/plugins/omo/components/ulw-loop/test/sdk-dx.test.ts b/plugins/omo/components/ulw-loop/test/sdk-dx.test.tsnew file mode 100644index 00000000..bcc9ac3d--- /dev/null+++ b/plugins/omo/components/ulw-loop/test/sdk-dx.test.ts@@ -0,0 +1,219 @@+import { mkdir, mkdtemp, readFile, rm, writeFile } from "node:fs/promises";+import { tmpdir } from "node:os";+import { join } from "node:path";+import { afterEach, describe, expect, it } from "vitest";++import { readUlwLoopPlan } from "../src/plan-io.js";+import { createAgentToolkit, ULW_LOOP_MANIFEST, type ULW_LOOP_OPERATIONS } from "../src/sdk.js";++const workDirs: string[] = [];+afterEach(async () => {+ for (const dir of workDirs.splice(0)) await rm(dir, { recursive: true, force: true });+});++async function fixture(sessionId: string, surface: "omo-senpi" | "lazycodex" = "omo-senpi") {+ const cwd = await mkdtemp(join(tmpdir(), "ulw-dx-"));+ workDirs.push(cwd);+ const toolkit = createAgentToolkit({ cwd, sessionId, surface });+ const created = await toolkit.createGoals({ brief: "- alpha goal\n- beta goal" });+ if (!created.ok) throw new Error("fixture could not create goals");+ return { cwd, toolkit };+}++describe("help() is self-describing", () => {+ it("#given the manifest #when read #then every operation carries its camelCase method, a description, and an args map", () => {+ const methods: Record<(typeof ULW_LOOP_OPERATIONS)[number], string> = {+ help: "help",+ "create-goals": "createGoals",+ status: "status",+ "complete-goals": "completeGoals",+ checkpoint: "checkpoint",+ steer: "steer",+ "add-goal": "addGoal",+ criteria: "criteria",+ "record-evidence": "recordEvidence",+ "record-review-blockers": "recordReviewBlockers",+ };+ for (const operation of ULW_LOOP_MANIFEST.operations) {+ expect(operation.method).toBe(methods[operation.name]);+ expect(operation.description.length).toBeGreaterThan(20);+ expect(typeof operation.args).toBe("object");+ }+ const record = ULW_LOOP_MANIFEST.operations.find((operation) => operation.name === "record-evidence");+ expect(record?.args).toMatchObject({ goalId: "string", criterionId: "string", evidence: "string" });+ expect(Object.keys(record?.args ?? {})).toEqual(expect.arrayContaining(["status", "notes", "artifacts"]));+ const add = ULW_LOOP_MANIFEST.operations.find((operation) => operation.name === "add-goal");+ expect(Object.keys(add?.args ?? {})).toEqual(expect.arrayContaining(["title", "objective", "successCriteria"]));+ const steer = ULW_LOOP_MANIFEST.operations.find((operation) => operation.name === "steer");+ expect(Object.keys(steer?.args ?? {})).toEqual(+ expect.arrayContaining([+ "kind",+ "source",+ "evidence",+ "rationale",+ "goalId",+ "criterionId",+ "scenario",+ "expectedEvidence",+ ]),+ );+ });++ it("#given a toolkit #when help() runs #then the result is the manifest", async () => {+ const { toolkit } = await fixture("dx-help");+ const help = await toolkit.help();+ expect(help.ok).toBe(true);+ if (help.ok) expect(help.result.operations.map((operation) => operation.method)).toContain("recordEvidence");+ });+});++describe("addGoal accepts success criteria", () => {+ it("#given explicit successCriteria #when the goal is added #then exactly those criteria persist with sequential ids", async () => {+ const { cwd, toolkit } = await fixture("dx-add-criteria");+ const added = await toolkit.addGoal({+ title: "lane",+ objective: "ship the lane",+ successCriteria: [+ { scenario: "curl -i /health returns 200", expectedEvidence: "status line captured in health.log" },+ {+ scenario: "malformed body returns 400",+ expectedEvidence: "curl transcript",+ userModel: "edge",+ essential: false,+ },+ ],+ });+ expect(added.ok).toBe(true);+ if (!added.ok) return;+ expect(added.result.goal.successCriteria).toEqual([+ expect.objectContaining({+ id: "C001",+ scenario: "curl -i /health returns 200",+ expectedEvidence: "status line captured in health.log",+ userModel: "happy",+ essential: true,+ status: "pending",+ }),+ expect.objectContaining({+ id: "C002",+ scenario: "malformed body returns 400",+ userModel: "edge",+ essential: false,+ status: "pending",+ }),+ ]);+ const plan = await readUlwLoopPlan(cwd, { sessionId: "dx-add-criteria" });+ expect(plan.goals.at(-1)?.successCriteria).toHaveLength(2);+ });++ it("#given invalid successCriteria #when the goal is added #then the call fails closed with ULW_LOOP_ARGUMENT_INVALID and nothing persists", async () => {+ const { cwd, toolkit } = await fixture("dx-add-invalid");+ const attempts = [+ { successCriteria: [] },+ { successCriteria: [{ scenario: " ", expectedEvidence: "x" }] },+ { successCriteria: [{ scenario: "s", expectedEvidence: "" }] },+ { successCriteria: [{ scenario: "s", expectedEvidence: "e", userModel: "vibes" }] },+ ];+ for (const attempt of attempts) {+ const added = await toolkit.addGoal({+ title: "lane",+ objective: "ship the lane",+ ...(attempt as { successCriteria: never }),+ });+ expect(added.ok).toBe(false);+ if (!added.ok) expect(added.error.code).toBe("ULW_LOOP_ARGUMENT_INVALID");+ }+ const plan = await readUlwLoopPlan(cwd, { sessionId: "dx-add-invalid" });+ expect(plan.goals).toHaveLength(2);+ });++ it("#given no successCriteria #when the goal is added #then the placeholders name the exact surface call", async () => {+ const senpi = await fixture("dx-add-placeholder", "omo-senpi");+ const added = await senpi.toolkit.addGoal({ title: "lane", objective: "ship the lane" });+ expect(added.ok).toBe(true);+ if (!added.ok) return;+ const placeholder = added.result.goal.successCriteria[0]?.expectedEvidence ?? "";+ expect(placeholder).toContain('agentToolkit.steer({ kind: "revise_criterion"');+ expect(placeholder).toContain(`goalId: "${added.result.goal.id}"`);+ expect(placeholder).toContain('criterionId: "C001"');+ expect(placeholder).toContain("successCriteria");+ expect(placeholder).not.toContain("Replace via revise_criterion with");++ const codex = await fixture("dx-add-placeholder-cli", "lazycodex");+ const cliAdded = await codex.toolkit.addGoal({ title: "lane", objective: "ship the lane" });+ expect(cliAdded.ok).toBe(true);+ if (cliAdded.ok) {+ expect(cliAdded.result.goal.successCriteria[0]?.expectedEvidence).toContain(+ `omo-agent-toolkit ulw-loop steer --kind revise_criterion --goal-id ${cliAdded.result.goal.id} --criterion-id C001`,+ );+ }+ });+});++describe("recordEvidence binds artifacts", () => {+ it("#given existing artifact paths #when evidence is recorded #then repo-relative paths persist on the criterion and the ledger", async () => {+ const { cwd, toolkit } = await fixture("dx-artifacts");+ await mkdir(join(cwd, "evidence"), { recursive: true });+ await writeFile(join(cwd, "evidence", "gate.log"), "exit 0\n");+ const outside = join(await mkdtemp(join(tmpdir(), "ulw-dx-outside-")), "shot.png");+ workDirs.push(join(outside, ".."));+ await writeFile(outside, "png");+ const started = await toolkit.completeGoals({});+ if (!started.ok || started.operation !== "complete-goals" || "done" in started.result) throw new Error("fixture");+ const goalId = started.result.goal.id;+ const recorded = await toolkit.recordEvidence({+ goalId,+ criterionId: "C001",+ status: "pass",+ evidence: "gate green",+ artifacts: ["evidence/gate.log", join(cwd, "evidence", "gate.log"), outside],+ });+ expect(recorded.ok).toBe(true);+ if (!recorded.ok) return;+ expect(recorded.result.criterion.artifacts).toEqual(["evidence/gate.log", outside]);+ expect(recorded.result.ledgerEntry.artifacts).toEqual(["evidence/gate.log", outside]);+ const ledger = (await readFile(join(cwd, ".omo", "ulw-loop", "dx-artifacts", "ledger.jsonl"), "utf8"))+ .trim()+ .split("\n");+ expect(ledger.at(-1)).toContain('"artifacts":["evidence/gate.log"');+ });++ it("#given a missing artifact #when evidence is recorded #then it fails with ULW_LOOP_EVIDENCE_ARTIFACT_MISSING naming the path and records nothing", async () => {+ const { cwd, toolkit } = await fixture("dx-artifact-missing");+ const started = await toolkit.completeGoals({});+ if (!started.ok || started.operation !== "complete-goals" || "done" in started.result) throw new Error("fixture");+ const goalId = started.result.goal.id;+ const recorded = await toolkit.recordEvidence({+ goalId,+ criterionId: "C001",+ status: "pass",+ evidence: "gate green",+ artifacts: ["evidence/does-not-exist.log"],+ });+ expect(recorded.ok).toBe(false);+ if (!recorded.ok) {+ expect(recorded.error.code).toBe("ULW_LOOP_EVIDENCE_ARTIFACT_MISSING");+ expect(recorded.error.message).toContain("evidence/does-not-exist.log");+ }+ const plan = await readUlwLoopPlan(cwd, { sessionId: "dx-artifact-missing" });+ expect(plan.goals[0]?.successCriteria[0]?.status).toBe("pending");+ });+});++describe("status() exposes a stable evidence root", () => {+ it("#given a session-scoped plan #when status runs #then evidenceRoot is the plan-level directory beside the moving attempt dir", async () => {+ const { toolkit } = await fixture("dx-evidence-root");+ const before = await toolkit.status();+ expect(before.ok).toBe(true);+ if (before.ok) expect(before.result.evidenceRoot).toBe(".omo/evidence/ulw/dx-evidence-root");+ await toolkit.completeGoals({});+ const after = await toolkit.status();+ expect(after.ok).toBe(true);+ if (after.ok) {+ expect(after.result.evidenceRoot).toBe(".omo/evidence/ulw/dx-evidence-root");+ expect(after.result.currentAttemptDir).toMatch(+ /^\.omo\/evidence\/ulw\/dx-evidence-root\/G001-alpha-goal\/a\d+$/,+ );+ }+ });+});diff --git a/plugins/omo/dist/cli-node/index.js b/plugins/omo/dist/cli-node/index.jsindex 67dc0ec7..37f1a2a7 100755--- a/plugins/omo/dist/cli-node/index.js+++ b/plugins/omo/dist/cli-node/index.js@@ -65,7 +65,7 @@ var package_default;var init_package = __esm(() => {package_default = {name: "oh-my-opencode",- version: "5.0.0-beta.63",+ version: "5.0.0-beta.64",description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",main: "./dist/index.js",types: "dist/index.d.ts",@@ -247,7 +247,7 @@ var init_package = __esm(() => {zod: "^4.4.3"},devDependencies: {- "@code-yeongyu/senpi": "2026.9.15-2",+ "@code-yeongyu/senpi": "2026.9.16","@oh-my-opencode/agents-md-core": "workspace:*","@oh-my-opencode/ast-grep-mcp": "workspace:*","@oh-my-opencode/boulder-state": "workspace:*",@@ -286,18 +286,18 @@ var init_package = __esm(() => {typescript: "^7.0.2"},optionalDependencies: {- "oh-my-opencode-darwin-arm64": "5.0.0-beta.63",- "oh-my-opencode-darwin-x64": "5.0.0-beta.63",- "oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.63",- "oh-my-opencode-linux-arm64": "5.0.0-beta.63",- "oh-my-opencode-linux-arm64-musl": "5.0.0-beta.63",- "oh-my-opencode-linux-x64": "5.0.0-beta.63",- "oh-my-opencode-linux-x64-baseline": "5.0.0-beta.63",- "oh-my-opencode-linux-x64-musl": "5.0.0-beta.63",- "oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.63",- "oh-my-opencode-windows-arm64": "5.0.0-beta.63",- "oh-my-opencode-windows-x64": "5.0.0-beta.63",- "oh-my-opencode-windows-x64-baseline": "5.0.0-beta.63"+ "oh-my-opencode-darwin-arm64": "5.0.0-beta.64",+ "oh-my-opencode-darwin-x64": "5.0.0-beta.64",+ "oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.64",+ "oh-my-opencode-linux-arm64": "5.0.0-beta.64",+ "oh-my-opencode-linux-arm64-musl": "5.0.0-beta.64",+ "oh-my-opencode-linux-x64": "5.0.0-beta.64",+ "oh-my-opencode-linux-x64-baseline": "5.0.0-beta.64",+ "oh-my-opencode-linux-x64-musl": "5.0.0-beta.64",+ "oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.64",+ "oh-my-opencode-windows-arm64": "5.0.0-beta.64",+ "oh-my-opencode-windows-x64": "5.0.0-beta.64",+ "oh-my-opencode-windows-x64-baseline": "5.0.0-beta.64"},overrides: {"@earendil-works/pi-agent-core": "0.84.2",@@ -72714,8 +72714,8 @@ var init_git_master = __esm(() => {};OmoGitMasterSettingsLayerSchema = object(OmoGitMasterSettingsShape).partial().strict();OmoGitMasterSettingsSchema = OmoGitMasterSettingsLayerSchema.extend({- commit_footer: union([boolean2(), string2()]).default(true),- include_co_authored_by: boolean2().default(true)+ commit_footer: union([boolean2(), string2()]).default(false),+ include_co_authored_by: boolean2().default(false)}).strict();});@@ -84621,7 +84621,7 @@ var package_default2;var init_package2 = __esm(() => {package_default2 = {name: "@oh-my-opencode/omo-codex",- version: "5.0.0-beta.63",+ version: "5.0.0-beta.64",type: "module",private: true,description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",@@ -97292,8 +97292,8 @@ var GitEnvPrefixSchema = string2().refine(isValidGitEnvPrefix, { message: GIT_EN// packages/omo-opencode/src/config/schema/git-master.tsinit_zod();var GitMasterConfigSchema = object({- commit_footer: union([boolean2(), string2()]).default(true),- include_co_authored_by: boolean2().default(true),+ commit_footer: union([boolean2(), string2()]).default(false),+ include_co_authored_by: boolean2().default(false),git_env_prefix: GitEnvPrefixSchema});// packages/omo-opencode/src/config/schema/hooks.ts@@ -97600,8 +97600,8 @@ var OhMyOpenCodeConfigSchema = object({keyword_detector: KeywordDetectorConfigSchema.optional(),babysitting: BabysittingConfigSchema.optional(),git_master: GitMasterConfigSchema.default({- commit_footer: true,- include_co_authored_by: true,+ commit_footer: false,+ include_co_authored_by: false,git_env_prefix: "GIT_MASTER=1"}),browser_automation_engine: BrowserAutomationConfigSchema.optional(),diff --git a/plugins/omo/dist/cli/index.js b/plugins/omo/dist/cli/index.jsindex 09bf1888..7deeb6fa 100755--- a/plugins/omo/dist/cli/index.js+++ b/plugins/omo/dist/cli/index.js@@ -64,7 +64,7 @@ var package_default;var init_package = __esm(() => {package_default = {name: "oh-my-opencode",- version: "5.0.0-beta.63",+ version: "5.0.0-beta.64",description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",main: "./dist/index.js",types: "dist/index.d.ts",@@ -246,7 +246,7 @@ var init_package = __esm(() => {zod: "^4.4.3"},devDependencies: {- "@code-yeongyu/senpi": "2026.9.15-2",+ "@code-yeongyu/senpi": "2026.9.16","@oh-my-opencode/agents-md-core": "workspace:*","@oh-my-opencode/ast-grep-mcp": "workspace:*","@oh-my-opencode/boulder-state": "workspace:*",@@ -285,18 +285,18 @@ var init_package = __esm(() => {typescript: "^7.0.2"},optionalDependencies: {- "oh-my-opencode-darwin-arm64": "5.0.0-beta.63",- "oh-my-opencode-darwin-x64": "5.0.0-beta.63",- "oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.63",- "oh-my-opencode-linux-arm64": "5.0.0-beta.63",- "oh-my-opencode-linux-arm64-musl": "5.0.0-beta.63",- "oh-my-opencode-linux-x64": "5.0.0-beta.63",- "oh-my-opencode-linux-x64-baseline": "5.0.0-beta.63",- "oh-my-opencode-linux-x64-musl": "5.0.0-beta.63",- "oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.63",- "oh-my-opencode-windows-arm64": "5.0.0-beta.63",- "oh-my-opencode-windows-x64": "5.0.0-beta.63",- "oh-my-opencode-windows-x64-baseline": "5.0.0-beta.63"+ "oh-my-opencode-darwin-arm64": "5.0.0-beta.64",+ "oh-my-opencode-darwin-x64": "5.0.0-beta.64",+ "oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.64",+ "oh-my-opencode-linux-arm64": "5.0.0-beta.64",+ "oh-my-opencode-linux-arm64-musl": "5.0.0-beta.64",+ "oh-my-opencode-linux-x64": "5.0.0-beta.64",+ "oh-my-opencode-linux-x64-baseline": "5.0.0-beta.64",+ "oh-my-opencode-linux-x64-musl": "5.0.0-beta.64",+ "oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.64",+ "oh-my-opencode-windows-arm64": "5.0.0-beta.64",+ "oh-my-opencode-windows-x64": "5.0.0-beta.64",+ "oh-my-opencode-windows-x64-baseline": "5.0.0-beta.64"},overrides: {"@earendil-works/pi-agent-core": "0.84.2",@@ -72635,8 +72635,8 @@ var init_git_master = __esm(() => {};OmoGitMasterSettingsLayerSchema = object(OmoGitMasterSettingsShape).partial().strict();OmoGitMasterSettingsSchema = OmoGitMasterSettingsLayerSchema.extend({- commit_footer: union([boolean2(), string2()]).default(true),- include_co_authored_by: boolean2().default(true)+ commit_footer: union([boolean2(), string2()]).default(false),+ include_co_authored_by: boolean2().default(false)}).strict();});@@ -84542,7 +84542,7 @@ var package_default2;var init_package2 = __esm(() => {package_default2 = {name: "@oh-my-opencode/omo-codex",- version: "5.0.0-beta.63",+ version: "5.0.0-beta.64",type: "module",private: true,description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",@@ -97213,8 +97213,8 @@ var GitEnvPrefixSchema = string2().refine(isValidGitEnvPrefix, { message: GIT_EN// packages/omo-opencode/src/config/schema/git-master.tsinit_zod();var GitMasterConfigSchema = object({- commit_footer: union([boolean2(), string2()]).default(true),- include_co_authored_by: boolean2().default(true),+ commit_footer: union([boolean2(), string2()]).default(false),+ include_co_authored_by: boolean2().default(false),git_env_prefix: GitEnvPrefixSchema});// packages/omo-opencode/src/config/schema/hooks.ts@@ -97521,8 +97521,8 @@ var OhMyOpenCodeConfigSchema = object({keyword_detector: KeywordDetectorConfigSchema.optional(),babysitting: BabysittingConfigSchema.optional(),git_master: GitMasterConfigSchema.default({- commit_footer: true,- include_co_authored_by: true,+ commit_footer: false,+ include_co_authored_by: false,git_env_prefix: "GIT_MASTER=1"}),browser_automation_engine: BrowserAutomationConfigSchema.optional(),diff --git a/plugins/omo/hooks/post-compact-resetting-git-bash-mcp-reminder.json b/plugins/omo/hooks/post-compact-resetting-git-bash-mcp-reminder.jsonindex 3a225909..a2028045 100644--- a/plugins/omo/hooks/post-compact-resetting-git-bash-mcp-reminder.json+++ b/plugins/omo/hooks/post-compact-resetting-git-bash-mcp-reminder.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/git-bash/dist/cli.js\" hook post-compact","timeout": 5,- "statusMessage": "(OmO 5.0.0-beta.63) Resetting Git Bash MCP Reminder",+ "statusMessage": "(OmO 5.0.0-beta.64) Resetting Git Bash MCP Reminder","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\git-bash\\dist\\cli.js\" hook post-compact"}],diff --git a/plugins/omo/hooks/post-compact-resetting-lsp-diagnostics-cache.json b/plugins/omo/hooks/post-compact-resetting-lsp-diagnostics-cache.jsonindex e8edb0bc..f5477ae4 100644--- a/plugins/omo/hooks/post-compact-resetting-lsp-diagnostics-cache.json+++ b/plugins/omo/hooks/post-compact-resetting-lsp-diagnostics-cache.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/lsp/dist/cli.js\" hook post-compact","timeout": 5,- "statusMessage": "(OmO 5.0.0-beta.63) Resetting LSP Diagnostics Cache",+ "statusMessage": "(OmO 5.0.0-beta.64) Resetting LSP Diagnostics Cache","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\lsp\\dist\\cli.js\" hook post-compact"}],diff --git a/plugins/omo/hooks/post-compact-resetting-project-rule-cache.json b/plugins/omo/hooks/post-compact-resetting-project-rule-cache.jsonindex 0580b5fa..8850f52d 100644--- a/plugins/omo/hooks/post-compact-resetting-project-rule-cache.json+++ b/plugins/omo/hooks/post-compact-resetting-project-rule-cache.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/rules/dist/cli.js\" hook post-compact","timeout": 10,- "statusMessage": "(OmO 5.0.0-beta.63) Resetting Project Rule Cache",+ "statusMessage": "(OmO 5.0.0-beta.64) Resetting Project Rule Cache","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\rules\\dist\\cli.js\" hook post-compact"}],diff --git a/plugins/omo/hooks/post-tool-use-checking-comments.json b/plugins/omo/hooks/post-tool-use-checking-comments.jsonindex aabf8f38..266a5cea 100644--- a/plugins/omo/hooks/post-tool-use-checking-comments.json+++ b/plugins/omo/hooks/post-tool-use-checking-comments.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/comment-checker/dist/cli.js\" hook post-tool-use","timeout": 30,- "statusMessage": "(OmO 5.0.0-beta.63) Checking Comments",+ "statusMessage": "(OmO 5.0.0-beta.64) Checking Comments","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\comment-checker\\dist\\cli.js\" hook post-tool-use"}],diff --git a/plugins/omo/hooks/post-tool-use-checking-lsp-diagnostics.json b/plugins/omo/hooks/post-tool-use-checking-lsp-diagnostics.jsonindex a1ff73b4..2734303e 100644--- a/plugins/omo/hooks/post-tool-use-checking-lsp-diagnostics.json+++ b/plugins/omo/hooks/post-tool-use-checking-lsp-diagnostics.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/lsp/dist/cli.js\" hook post-tool-use","timeout": 60,- "statusMessage": "(OmO 5.0.0-beta.63) Checking LSP Diagnostics",+ "statusMessage": "(OmO 5.0.0-beta.64) Checking LSP Diagnostics","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\lsp\\dist\\cli.js\" hook post-tool-use"}],diff --git a/plugins/omo/hooks/post-tool-use-checking-thread-title-hygiene.json b/plugins/omo/hooks/post-tool-use-checking-thread-title-hygiene.jsonindex 6a9b0ed1..cd59a075 100644--- a/plugins/omo/hooks/post-tool-use-checking-thread-title-hygiene.json+++ b/plugins/omo/hooks/post-tool-use-checking-thread-title-hygiene.json@@ -8,7 +8,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/teammode/dist/cli.js\" hook post-tool-use","timeout": 10,- "statusMessage": "(OmO 5.0.0-beta.63) Checking Thread Title Hygiene",+ "statusMessage": "(OmO 5.0.0-beta.64) Checking Thread Title Hygiene","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\teammode\\dist\\cli.js\" hook post-tool-use"}]diff --git a/plugins/omo/hooks/post-tool-use-matching-project-rules.json b/plugins/omo/hooks/post-tool-use-matching-project-rules.jsonindex 3ffec820..13822038 100644--- a/plugins/omo/hooks/post-tool-use-matching-project-rules.json+++ b/plugins/omo/hooks/post-tool-use-matching-project-rules.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/rules/dist/cli.js\" hook post-tool-use","timeout": 10,- "statusMessage": "(OmO 5.0.0-beta.63) Matching Project Rules",+ "statusMessage": "(OmO 5.0.0-beta.64) Matching Project Rules","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\rules\\dist\\cli.js\" hook post-tool-use"}],diff --git a/plugins/omo/hooks/post-tool-use-recording-spawn-admission.json b/plugins/omo/hooks/post-tool-use-recording-spawn-admission.jsonindex 89f7c86b..e4e95424 100644--- a/plugins/omo/hooks/post-tool-use-recording-spawn-admission.json+++ b/plugins/omo/hooks/post-tool-use-recording-spawn-admission.json@@ -8,7 +8,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/ulw-loop/dist/cli.js\" hook post-tool-use-spawn","timeout": 5,- "statusMessage": "(OmO 5.0.0-beta.63) Recording Spawn Admission",+ "statusMessage": "(OmO 5.0.0-beta.64) Recording Spawn Admission","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\ulw-loop\\dist\\cli.js\" hook post-tool-use-spawn"}]diff --git a/plugins/omo/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json b/plugins/omo/hooks/pre-tool-use-enforcing-unlimited-goal-budget.jsonindex 00578ef4..8b988a95 100644--- a/plugins/omo/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json+++ b/plugins/omo/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/ulw-loop/dist/cli.js\" hook pre-tool-use","timeout": 5,- "statusMessage": "(OmO 5.0.0-beta.63) Enforcing Unlimited Goal Budget",+ "statusMessage": "(OmO 5.0.0-beta.64) Enforcing Unlimited Goal Budget","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\ulw-loop\\dist\\cli.js\" hook pre-tool-use"}],diff --git a/plugins/omo/hooks/pre-tool-use-guarding-ulw-loop-spawns.json b/plugins/omo/hooks/pre-tool-use-guarding-ulw-loop-spawns.jsonindex b292b53f..f36a3b8a 100644--- a/plugins/omo/hooks/pre-tool-use-guarding-ulw-loop-spawns.json+++ b/plugins/omo/hooks/pre-tool-use-guarding-ulw-loop-spawns.json@@ -8,7 +8,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/ulw-loop/dist/cli.js\" hook pre-tool-use-spawn","timeout": 5,- "statusMessage": "(OmO 5.0.0-beta.63) Guarding Ulw-Loop Spawns",+ "statusMessage": "(OmO 5.0.0-beta.64) Guarding Ulw-Loop Spawns","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\ulw-loop\\dist\\cli.js\" hook pre-tool-use-spawn"}]diff --git a/plugins/omo/hooks/pre-tool-use-recommending-git-bash-mcp.json b/plugins/omo/hooks/pre-tool-use-recommending-git-bash-mcp.jsonindex a58868c1..2913d779 100644--- a/plugins/omo/hooks/pre-tool-use-recommending-git-bash-mcp.json+++ b/plugins/omo/hooks/pre-tool-use-recommending-git-bash-mcp.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/git-bash/dist/cli.js\" hook pre-tool-use","timeout": 5,- "statusMessage": "(OmO 5.0.0-beta.63) Recommending Git Bash MCP",+ "statusMessage": "(OmO 5.0.0-beta.64) Recommending Git Bash MCP","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\git-bash\\dist\\cli.js\" hook pre-tool-use"}],diff --git a/plugins/omo/hooks/session-start-checking-auto-update.json b/plugins/omo/hooks/session-start-checking-auto-update.jsonindex 54e2632d..5dc084a2 100644--- a/plugins/omo/hooks/session-start-checking-auto-update.json+++ b/plugins/omo/hooks/session-start-checking-auto-update.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/scripts/auto-update.mjs\" hook session-start","timeout": 15,- "statusMessage": "(OmO 5.0.0-beta.63) Checking Auto Update",+ "statusMessage": "(OmO 5.0.0-beta.64) Checking Auto Update","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\scripts\\auto-update.mjs\" hook session-start"}],diff --git a/plugins/omo/hooks/session-start-checking-bootstrap-provisioning.json b/plugins/omo/hooks/session-start-checking-bootstrap-provisioning.jsonindex dbd59590..8d08a52e 100644--- a/plugins/omo/hooks/session-start-checking-bootstrap-provisioning.json+++ b/plugins/omo/hooks/session-start-checking-bootstrap-provisioning.json@@ -8,7 +8,7 @@"command": "node \"${PLUGIN_ROOT}/components/bootstrap/dist/cli.js\" hook session-start","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\bootstrap.ps1\"","timeout": 30,- "statusMessage": "(OmO 5.0.0-beta.63) Checking Bootstrap Provisioning"+ "statusMessage": "(OmO 5.0.0-beta.64) Checking Bootstrap Provisioning"}]}diff --git a/plugins/omo/hooks/session-start-loading-project-rules.json b/plugins/omo/hooks/session-start-loading-project-rules.jsonindex ccce7932..2dff856f 100644--- a/plugins/omo/hooks/session-start-loading-project-rules.json+++ b/plugins/omo/hooks/session-start-loading-project-rules.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/rules/dist/cli.js\" hook session-start","timeout": 10,- "statusMessage": "(OmO 5.0.0-beta.63) Loading Project Rules",+ "statusMessage": "(OmO 5.0.0-beta.64) Loading Project Rules","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\rules\\dist\\cli.js\" hook session-start"}]diff --git a/plugins/omo/hooks/session-start-recording-session-telemetry.json b/plugins/omo/hooks/session-start-recording-session-telemetry.jsonindex 97483cc7..ff36e7ed 100644--- a/plugins/omo/hooks/session-start-recording-session-telemetry.json+++ b/plugins/omo/hooks/session-start-recording-session-telemetry.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/telemetry/dist/cli.js\" hook session-start","timeout": 15,- "statusMessage": "(OmO 5.0.0-beta.63) Recording Session Telemetry",+ "statusMessage": "(OmO 5.0.0-beta.64) Recording Session Telemetry","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\telemetry\\dist\\cli.js\" hook session-start"}]diff --git a/plugins/omo/hooks/stop-checking-ulw-execute-continuation.json b/plugins/omo/hooks/stop-checking-ulw-execute-continuation.jsonindex 36db922f..321233d1 100644--- a/plugins/omo/hooks/stop-checking-ulw-execute-continuation.json+++ b/plugins/omo/hooks/stop-checking-ulw-execute-continuation.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/ulw-execute-continuation/dist/cli.js\" hook stop","timeout": 10,- "statusMessage": "(OmO 5.0.0-beta.63) Checking Ulw-Execute Continuation",+ "statusMessage": "(OmO 5.0.0-beta.64) Checking Ulw-Execute Continuation","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\ulw-execute-continuation\\dist\\cli.js\" hook stop"}]diff --git a/plugins/omo/hooks/stop-checking-ulw-loop-resume.json b/plugins/omo/hooks/stop-checking-ulw-loop-resume.jsonindex 2e122c52..3193b693 100644--- a/plugins/omo/hooks/stop-checking-ulw-loop-resume.json+++ b/plugins/omo/hooks/stop-checking-ulw-loop-resume.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/ulw-loop/dist/cli.js\" hook stop","timeout": 10,- "statusMessage": "(OmO 5.0.0-beta.63) Checking Ulw-Loop Resume",+ "statusMessage": "(OmO 5.0.0-beta.64) Checking Ulw-Loop Resume","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\ulw-loop\\dist\\cli.js\" hook stop"}]diff --git a/plugins/omo/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json b/plugins/omo/hooks/subagent-stop-verifying-lazycodex-executor-evidence.jsonindex 344803a7..fc531258 100644--- a/plugins/omo/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json+++ b/plugins/omo/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/lazycodex-executor-verify/dist/cli.js\" hook subagent-stop","timeout": 10,- "statusMessage": "(OmO 5.0.0-beta.63) Verifying LazyCodex Executor Evidence",+ "statusMessage": "(OmO 5.0.0-beta.64) Verifying LazyCodex Executor Evidence","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\lazycodex-executor-verify\\dist\\cli.js\" hook subagent-stop"}],diff --git a/plugins/omo/hooks/user-prompt-submit-checking-ultrawork-trigger.json b/plugins/omo/hooks/user-prompt-submit-checking-ultrawork-trigger.jsonindex a8d65bb0..fd09409c 100644--- a/plugins/omo/hooks/user-prompt-submit-checking-ultrawork-trigger.json+++ b/plugins/omo/hooks/user-prompt-submit-checking-ultrawork-trigger.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/ultrawork/dist/cli.js\" hook user-prompt-submit","timeout": 5,- "statusMessage": "(OmO 5.0.0-beta.63) Checking Ultrawork Trigger",+ "statusMessage": "(OmO 5.0.0-beta.64) Checking Ultrawork Trigger","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\ultrawork\\dist\\cli.js\" hook user-prompt-submit"}]diff --git a/plugins/omo/hooks/user-prompt-submit-checking-ulw-loop-steering.json b/plugins/omo/hooks/user-prompt-submit-checking-ulw-loop-steering.jsonindex 0b36a604..5d3e3af3 100644--- a/plugins/omo/hooks/user-prompt-submit-checking-ulw-loop-steering.json+++ b/plugins/omo/hooks/user-prompt-submit-checking-ulw-loop-steering.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/ulw-loop/dist/cli.js\" hook user-prompt-submit","timeout": 10,- "statusMessage": "(OmO 5.0.0-beta.63) Checking Ulw-Loop Steering",+ "statusMessage": "(OmO 5.0.0-beta.64) Checking Ulw-Loop Steering","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\ulw-loop\\dist\\cli.js\" hook user-prompt-submit"}]diff --git a/plugins/omo/hooks/user-prompt-submit-loading-project-rules.json b/plugins/omo/hooks/user-prompt-submit-loading-project-rules.jsonindex 44a922ce..7b67de77 100644--- a/plugins/omo/hooks/user-prompt-submit-loading-project-rules.json+++ b/plugins/omo/hooks/user-prompt-submit-loading-project-rules.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/rules/dist/cli.js\" hook user-prompt-submit","timeout": 10,- "statusMessage": "(OmO 5.0.0-beta.63) Loading Project Rules",+ "statusMessage": "(OmO 5.0.0-beta.64) Loading Project Rules","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\rules\\dist\\cli.js\" hook user-prompt-submit"}]diff --git a/plugins/omo/package-lock.json b/plugins/omo/package-lock.jsonindex 309a2a74..d4c6008a 100644--- a/plugins/omo/package-lock.json+++ b/plugins/omo/package-lock.json@@ -1,12 +1,12 @@{"name": "@sisyphuslabs/omo-codex-plugin",- "version": "5.0.0-beta.63",+ "version": "5.0.0-beta.64","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "@sisyphuslabs/omo-codex-plugin",- "version": "5.0.0-beta.63",+ "version": "5.0.0-beta.64","workspaces": ["components/comment-checker","components/git-bash",@@ -90,7 +90,7 @@},"components/comment-checker": {"name": "@code-yeongyu/codex-comment-checker",- "version": "5.0.0-beta.63",+ "version": "5.0.0-beta.64","license": "MIT","bin": {"omo-comment-checker": "dist/cli.js"@@ -111,7 +111,7 @@},"components/git-bash": {"name": "@sisyphuslabs/codex-git-bash-hook",- "version": "5.0.0-beta.63",+ "version": "5.0.0-beta.64","bin": {"omo-git-bash-hook": "dist/cli.js"},@@ -125,7 +125,7 @@},"components/lazycodex-executor-verify": {"name": "@code-yeongyu/codex-lazycodex-executor-verify",- "version": "5.0.0-beta.63",+ "version": "5.0.0-beta.64","license": "MIT","bin": {"lazycodex-executor-verify": "dist/cli.js"@@ -142,7 +142,7 @@},"components/lsp": {"name": "@code-yeongyu/codex-lsp",- "version": "5.0.0-beta.63",+ "version": "5.0.0-beta.64","license": "MIT","dependencies": {"@code-yeongyu/lsp-daemon": "file:../../../../lsp-daemon",@@ -163,7 +163,7 @@},"components/rules": {"name": "@code-yeongyu/codex-rules",- "version": "5.0.0-beta.63",+ "version": "5.0.0-beta.64","license": "MIT","dependencies": {"picomatch": "^4.0.7"@@ -185,7 +185,7 @@},"components/teammode": {"name": "@sisyphuslabs/codex-teammode",- "version": "5.0.0-beta.63",+ "version": "5.0.0-beta.64","devDependencies": {"@types/node": "^26.2.0","bun-types": "^1.4.2",@@ -198,7 +198,7 @@},"components/telemetry": {"name": "@code-yeongyu/codex-telemetry",- "version": "5.0.0-beta.63",+ "version": "5.0.0-beta.64","license": "MIT","bin": {"omo-telemetry": "dist/cli.js"@@ -216,7 +216,7 @@},"components/ultrawork": {"name": "@code-yeongyu/codex-ultrawork",- "version": "5.0.0-beta.63",+ "version": "5.0.0-beta.64","license": "MIT","bin": {"omo-ultrawork": "dist/cli.js"@@ -234,7 +234,7 @@},"components/ulw-execute-continuation": {"name": "@code-yeongyu/codex-ulw-execute-continuation",- "version": "5.0.0-beta.63",+ "version": "5.0.0-beta.64","license": "MIT","bin": {"omo-ulw-execute-continuation": "dist/cli.js"@@ -251,7 +251,7 @@},"components/ulw-loop": {"name": "@code-yeongyu/codex-ulw-loop",- "version": "5.0.0-beta.63",+ "version": "5.0.0-beta.64","license": "MIT","bin": {"omo-ulw-loop": "dist/cli.js",diff --git a/plugins/omo/package.json b/plugins/omo/package.jsonindex 47001640..527003dc 100644--- a/plugins/omo/package.json+++ b/plugins/omo/package.json@@ -1,6 +1,6 @@{"name": "@sisyphuslabs/omo-codex-plugin",- "version": "5.0.0-beta.63",+ "version": "5.0.0-beta.64","description": "Aggregate Codex plugin root for OMO components.","type": "module","packageManager": "[email protected]",