oh-my-opencode 4.16.2 → 4.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/command/omomomo.md +1 -1
- package/.agents/skills/hyperplan/SKILL.md +3 -3
- package/.agents/skills/omomomo/SKILL.md +1 -1
- package/.agents/skills/pre-publish-review/SKILL.md +3 -0
- package/.opencode/command/omomomo.md +1 -1
- package/.opencode/skills/hyperplan/SKILL.md +3 -3
- package/.opencode/skills/pre-publish-review/SKILL.md +3 -0
- package/README.ja.md +4 -4
- package/README.ko.md +4 -4
- package/README.md +4 -4
- package/README.ru.md +4 -4
- package/README.zh-cn.md +4 -4
- package/dist/agents/hephaestus/agent.d.ts +1 -1
- package/dist/agents/hephaestus/gpt-5-6.d.ts +2 -0
- package/dist/agents/momus-gpt-5-6.d.ts +1 -0
- package/dist/agents/types.d.ts +2 -0
- package/dist/cli/index.js +947 -567
- package/dist/cli-node/index.js +947 -567
- package/dist/features/background-agent/error-classifier.d.ts +5 -0
- package/dist/features/builtin-commands/templates/refactor-sections/intro-and-analysis.d.ts +1 -1
- package/dist/features/builtin-commands/templates/remove-ai-slops.d.ts +1 -1
- package/dist/features/team-mode/test-support/async-test-helpers.d.ts +2 -2
- package/dist/index.js +523 -81
- package/dist/plugin/chat-message/types.d.ts +4 -0
- package/dist/plugin/command-execute-before.d.ts +1 -0
- package/dist/plugin/stop-continuation.d.ts +17 -0
- package/dist/shared/live-server-route.d.ts +1 -1
- package/dist/skills/remove-ai-slops/SKILL.md +2 -2
- package/dist/skills/review-work/SKILL.md +1 -1
- package/dist/skills/start-work/SKILL.md +5 -2
- package/dist/skills/ulw-plan/references/full-workflow.md +1 -1
- package/dist/skills/ulw-plan/scripts/scaffold-plan.mjs +2 -2
- package/dist/skills/ulw-research/SKILL.md +2 -2
- package/dist/skills/visual-qa/SKILL.md +1 -1
- package/dist/tui.js +195 -41
- package/package.json +15 -14
- package/packages/git-bash-mcp/package.json +27 -0
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +3 -1
- package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +465 -248
- package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
- package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
- package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/AGENTS.md +2 -2
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/dist/cli.js +6 -2
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/dist/codex-hook.js +6 -2
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/src/codex-hook.ts +6 -2
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/test/cli.test.ts +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/test/codex-hook.test.ts +67 -2
- package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
- package/packages/omo-codex/plugin/components/lsp/test/package-smoke.test.ts +0 -13
- package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus/gpt-5.6.md +93 -0
- package/packages/omo-codex/plugin/components/rules/dist/cli.js +43 -24
- package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/rules/package.json +1 -1
- package/packages/omo-codex/plugin/components/rules/src/codex-hook.ts +2 -1
- package/packages/omo-codex/plugin/components/rules/src/dynamic-target-fingerprints.ts +15 -6
- package/packages/omo-codex/plugin/components/rules/src/rules-engine-factory.ts +7 -2
- package/packages/omo-codex/plugin/components/rules/src/static-injection.ts +2 -2
- package/packages/omo-codex/plugin/components/rules/test/codex-hook.test.ts +32 -0
- package/packages/omo-codex/plugin/components/rules/test/hephaestus-model-variant.test.ts +106 -0
- package/packages/omo-codex/plugin/components/start-work-continuation/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/start-work-continuation/package.json +1 -1
- package/packages/omo-codex/plugin/components/start-work-continuation/test/codex-hook.test.ts +1 -79
- package/packages/omo-codex/plugin/components/teammode/AGENTS.md +12 -9
- package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/skills/teammode/SKILL.md +136 -76
- package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team-guide.mjs +94 -23
- package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team-state.mjs +94 -14
- package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team-transport.mjs +55 -0
- package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team.mjs +72 -18
- package/packages/omo-codex/plugin/components/teammode/test/thread-title-hook.test.ts +23 -0
- package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/explorer.toml +23 -40
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-clone-fidelity-reviewer.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-code-reviewer.toml +3 -3
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-gate-reviewer.toml +7 -7
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-qa-executor.toml +5 -5
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-worker-high.toml +26 -0
- package/packages/omo-codex/plugin/components/ultrawork/agents/{lazycodex-executor.toml → lazycodex-worker-low.toml} +7 -5
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-worker-medium.toml +26 -0
- package/packages/omo-codex/plugin/components/ultrawork/agents/librarian.toml +20 -48
- package/packages/omo-codex/plugin/components/ultrawork/agents/metis.toml +17 -29
- package/packages/omo-codex/plugin/components/ultrawork/agents/momus.toml +20 -50
- package/packages/omo-codex/plugin/components/ultrawork/agents/plan.toml +22 -43
- package/packages/omo-codex/plugin/components/ultrawork/directive.md +55 -28
- package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/skills/ultrawork/SKILL.md +55 -28
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/full-workflow.md +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/scripts/scaffold-plan.mjs +2 -2
- package/packages/omo-codex/plugin/components/ultrawork/test/codex-hook.test.ts +22 -0
- package/packages/omo-codex/plugin/components/ultrawork/test/package-smoke.test.ts +0 -68
- package/packages/omo-codex/plugin/components/ulw-loop/AGENTS.md +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/CHANGELOG.md +2 -0
- package/packages/omo-codex/plugin/components/ulw-loop/README.md +3 -1
- package/packages/omo-codex/plugin/components/ulw-loop/directive.md +55 -28
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint.js +6 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-subcommands.d.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-subcommands.js +13 -2
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +405 -25
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-instruction.js +12 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/domain-types.d.ts +4 -2
- package/packages/omo-codex/plugin/components/ulw-loop/dist/paths.d.ts +7 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/paths.js +16 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-crud.js +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate-verdicts.d.ts +6 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate-verdicts.js +20 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate.d.ts +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate.js +12 -9
- package/packages/omo-codex/plugin/components/ulw-loop/dist/spawn-guard.d.ts +3 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/spawn-guard.js +148 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/stop-resume-hook.d.ts +2 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/stop-resume-hook.js +209 -0
- package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +25 -2
- package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/SKILL.md +14 -15
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +29 -27
- package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint.ts +6 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-subcommands.ts +14 -3
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli.ts +10 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/codex-goal-instruction.ts +12 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/domain-types.ts +4 -2
- package/packages/omo-codex/plugin/components/ulw-loop/src/paths.ts +27 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/plan-crud.ts +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/quality-gate-verdicts.ts +23 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/quality-gate.ts +16 -9
- package/packages/omo-codex/plugin/components/ulw-loop/src/spawn-guard.ts +138 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/stop-resume-hook.ts +208 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-create-goals.test.ts +12 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-entrypoint.test.ts +4 -1
- package/packages/omo-codex/plugin/components/ulw-loop/test/codex-goal-instruction.test.ts +8 -35
- package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/quality-gate-builder.ts +24 -13
- package/packages/omo-codex/plugin/components/ulw-loop/test/package-smoke.test.ts +5 -2
- package/packages/omo-codex/plugin/components/ulw-loop/test/paths.test.ts +43 -8
- package/packages/omo-codex/plugin/components/ulw-loop/test/quality-gate.test.ts +55 -2
- package/packages/omo-codex/plugin/components/ulw-loop/test/spawn-guard.test.ts +228 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/stop-resume-hook.test.ts +193 -0
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +18 -0
- package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-start-work-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +17 -0
- package/packages/omo-codex/plugin/hooks/subagent-stop-checking-start-work-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +2 -2
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/model-catalog.json +16 -7
- package/packages/omo-codex/plugin/package-lock.json +13 -13
- package/packages/omo-codex/plugin/package.json +1 -1
- package/packages/omo-codex/plugin/scripts/auto-update.mjs +9 -2
- package/packages/omo-codex/plugin/scripts/entry-guard.mjs +26 -0
- package/packages/omo-codex/plugin/scripts/materialize-shared-upstreams.mjs +3 -1
- package/packages/omo-codex/plugin/scripts/migrate-codex-config/catalog.mjs +16 -7
- package/packages/omo-codex/plugin/scripts/migrate-codex-config/multi-agent-v2-guard.mjs +39 -4
- package/packages/omo-codex/plugin/scripts/migrate-codex-config/subagent-limit-guard.mjs +24 -4
- package/packages/omo-codex/plugin/scripts/migrate-codex-config.mjs +3 -3
- package/packages/omo-codex/plugin/scripts/migrate-omo-sot.mjs +2 -2
- package/packages/omo-codex/plugin/scripts/sync-hook-status-messages.mjs +2 -2
- package/packages/omo-codex/plugin/scripts/sync-skills.mjs +14 -6
- package/packages/omo-codex/plugin/scripts/sync-version.mjs +4 -2
- package/packages/omo-codex/plugin/skills/init-deep/SKILL.md +3 -3
- package/packages/omo-codex/plugin/skills/refactor/SKILL.md +3 -3
- package/packages/omo-codex/plugin/skills/remove-ai-slops/SKILL.md +5 -5
- package/packages/omo-codex/plugin/skills/review-work/SKILL.md +9 -3
- package/packages/omo-codex/plugin/skills/start-work/SKILL.md +6 -3
- package/packages/omo-codex/plugin/skills/teammode/SKILL.md +136 -76
- package/packages/omo-codex/plugin/skills/teammode/scripts/team-guide.mjs +94 -23
- package/packages/omo-codex/plugin/skills/teammode/scripts/team-state.mjs +94 -14
- package/packages/omo-codex/plugin/skills/teammode/scripts/team-transport.mjs +55 -0
- package/packages/omo-codex/plugin/skills/teammode/scripts/team.mjs +72 -18
- package/packages/omo-codex/plugin/skills/ultrawork/SKILL.md +55 -28
- package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +14 -15
- package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +29 -27
- package/packages/omo-codex/plugin/skills/ulw-plan/references/full-workflow.md +1 -1
- package/packages/omo-codex/plugin/skills/ulw-plan/scripts/scaffold-plan.mjs +2 -2
- package/packages/omo-codex/plugin/skills/ulw-research/SKILL.md +4 -4
- package/packages/omo-codex/plugin/skills/visual-qa/SKILL.md +4 -4
- package/packages/omo-codex/plugin/test/aggregate-agents.test.mjs +116 -10
- package/packages/omo-codex/plugin/test/aggregate-hooks.test.mjs +23 -2
- package/packages/omo-codex/plugin/test/aggregate-manifest.test.mjs +1 -1
- package/packages/omo-codex/plugin/test/aggregate-model-catalog.test.mjs +4 -4
- package/packages/omo-codex/plugin/test/aggregate-skills.test.mjs +4 -2
- package/packages/omo-codex/plugin/test/auto-update-restart-notice.test.mjs +33 -0
- package/packages/omo-codex/plugin/test/auto-update.test.mjs +4 -4
- package/packages/omo-codex/plugin/test/component-hook-contract-cases.mjs +2 -2
- package/packages/omo-codex/plugin/test/lcx-bug-skills.test.mjs +4 -101
- package/packages/omo-codex/plugin/test/migrate-codex-config.test.mjs +160 -23
- package/packages/omo-codex/plugin/test/multi-agent-v2-regression.test.mjs +71 -0
- package/packages/omo-codex/plugin/test/subagent-limit-migration.test.mjs +32 -0
- package/packages/omo-codex/plugin/test/sync-skills-orchestration.test.mjs +20 -2
- package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +1 -1
- package/packages/omo-codex/plugin/test/sync-skills.test.mjs +4 -2
- package/packages/omo-codex/plugin/test/teammode-transport.test.mjs +345 -0
- package/packages/omo-codex/plugin/test/ulw-plan-skill-contract.test.mjs +9 -40
- package/packages/omo-codex/plugin/test/ulw-research-skill-contract.test.mjs +4 -277
- package/packages/omo-codex/scripts/install-config-reasoning.test.mjs +5 -5
- package/packages/omo-codex/scripts/install-config.test.mjs +22 -3
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +508 -286
- package/packages/omo-codex/scripts/install-generated-bundle.test.mjs +111 -1
- package/packages/shared-skills/skills/remove-ai-slops/SKILL.md +2 -2
- package/packages/shared-skills/skills/review-work/SKILL.md +1 -1
- package/packages/shared-skills/skills/start-work/SKILL.md +5 -2
- package/packages/shared-skills/skills/ulw-plan/references/full-workflow.md +1 -1
- package/packages/shared-skills/skills/ulw-plan/scripts/scaffold-plan.mjs +2 -2
- package/packages/shared-skills/skills/ulw-research/SKILL.md +2 -2
- package/packages/shared-skills/skills/visual-qa/SKILL.md +1 -1
- package/dist/skills/visual-qa/scripts/skill-prompt-contract.test.ts +0 -296
- package/packages/omo-codex/plugin/components/ulw-loop/test/skill-contract.test.ts +0 -70
- package/packages/omo-codex/plugin/test/ulw-research-epistemic-contract.test.mjs +0 -98
- package/packages/shared-skills/skills/visual-qa/scripts/skill-prompt-contract.test.ts +0 -296
- /package/packages/omo-codex/plugin/components/rules/bundled-rules/{hephaestus.md → hephaestus/gpt-5.5.md} +0 -0
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { mkdtemp, rm } from "node:fs/promises";
|
|
3
|
+
import { tmpdir } from "node:os";
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
|
6
|
+
|
|
7
|
+
import type { PreToolUsePayload } from "../src/codex-hook.ts";
|
|
8
|
+
import { applySpawnGuards } from "../src/spawn-guard.ts";
|
|
9
|
+
|
|
10
|
+
let workDir: string;
|
|
11
|
+
let originalLimit: string | undefined;
|
|
12
|
+
|
|
13
|
+
beforeEach(async () => {
|
|
14
|
+
workDir = await mkdtemp(join(tmpdir(), "ulw-spawn-guard-"));
|
|
15
|
+
originalLimit = process.env["OMO_SPAWN_FANOUT_LIMIT"];
|
|
16
|
+
delete process.env["OMO_SPAWN_FANOUT_LIMIT"];
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
afterEach(async () => {
|
|
20
|
+
if (originalLimit === undefined) delete process.env["OMO_SPAWN_FANOUT_LIMIT"];
|
|
21
|
+
else process.env["OMO_SPAWN_FANOUT_LIMIT"] = originalLimit;
|
|
22
|
+
await rm(workDir, { recursive: true, force: true });
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
function payload(toolName: string, toolInput: Record<string, unknown>): PreToolUsePayload {
|
|
26
|
+
return {
|
|
27
|
+
hook_event_name: "PreToolUse",
|
|
28
|
+
session_id: "s1",
|
|
29
|
+
turn_id: "t1",
|
|
30
|
+
transcript_path: null,
|
|
31
|
+
cwd: workDir,
|
|
32
|
+
model: "gpt-5.6-sol",
|
|
33
|
+
permission_mode: "default",
|
|
34
|
+
tool_name: toolName,
|
|
35
|
+
tool_use_id: "tu1",
|
|
36
|
+
tool_input: toolInput,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function sessionDir(): string {
|
|
41
|
+
return join(workDir, ".omo", "ulw-loop", "s1");
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function criterion(id: string): Record<string, unknown> {
|
|
45
|
+
return {
|
|
46
|
+
id,
|
|
47
|
+
scenario: `scenario ${id}`,
|
|
48
|
+
userModel: "happy",
|
|
49
|
+
expectedEvidence: "evidence",
|
|
50
|
+
capturedEvidence: "captured",
|
|
51
|
+
status: "pass",
|
|
52
|
+
capturedAt: "2026-07-11T00:00:00.000Z",
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function writeGoals(planOverrides: Record<string, unknown> = {}): void {
|
|
57
|
+
mkdirSync(sessionDir(), { recursive: true });
|
|
58
|
+
writeFileSync(
|
|
59
|
+
join(sessionDir(), "goals.json"),
|
|
60
|
+
JSON.stringify({
|
|
61
|
+
version: 1,
|
|
62
|
+
createdAt: "2026-07-11T00:00:00.000Z",
|
|
63
|
+
updatedAt: "2026-07-11T00:00:00.000Z",
|
|
64
|
+
briefPath: ".omo/ulw-loop/s1/brief.md",
|
|
65
|
+
goalsPath: ".omo/ulw-loop/s1/goals.json",
|
|
66
|
+
ledgerPath: ".omo/ulw-loop/s1/ledger.jsonl",
|
|
67
|
+
codexGoalMode: "aggregate",
|
|
68
|
+
goals: [
|
|
69
|
+
{
|
|
70
|
+
id: "g1",
|
|
71
|
+
title: "Final goal",
|
|
72
|
+
objective: "Final goal",
|
|
73
|
+
status: "in_progress",
|
|
74
|
+
successCriteria: [criterion("C001"), criterion("C002")],
|
|
75
|
+
attempt: 1,
|
|
76
|
+
createdAt: "2026-07-11T00:00:00.000Z",
|
|
77
|
+
updatedAt: "2026-07-11T00:00:00.000Z",
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
activeGoalId: "g1",
|
|
81
|
+
...planOverrides,
|
|
82
|
+
}),
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function deny(output: string): { permissionDecision: string; permissionDecisionReason: string } {
|
|
87
|
+
return JSON.parse(output).hookSpecificOutput;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
describe("applySpawnGuards fan-out cap", () => {
|
|
91
|
+
it("#given spawns under the limit #when guarded #then allows and counts", () => {
|
|
92
|
+
writeGoals();
|
|
93
|
+
|
|
94
|
+
expect(applySpawnGuards(payload("spawn_agent", { message: "scan" }))).toBe("");
|
|
95
|
+
|
|
96
|
+
const counter = JSON.parse(readFileSync(join(sessionDir(), "spawn-count.json"), "utf8"));
|
|
97
|
+
expect(counter.count).toBe(1);
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
it("#given the env limit exceeded #when guarded #then denies naming count/limit", () => {
|
|
101
|
+
writeGoals();
|
|
102
|
+
process.env["OMO_SPAWN_FANOUT_LIMIT"] = "3";
|
|
103
|
+
|
|
104
|
+
expect(applySpawnGuards(payload("spawn_agent", { message: "scan" }))).toBe("");
|
|
105
|
+
expect(applySpawnGuards(payload("spawn_agent", { message: "scan" }))).toBe("");
|
|
106
|
+
expect(applySpawnGuards(payload("spawn_agent", { message: "scan" }))).toBe("");
|
|
107
|
+
const fourth = applySpawnGuards(payload("spawn_agent", { message: "scan" }));
|
|
108
|
+
|
|
109
|
+
const output = deny(fourth);
|
|
110
|
+
expect(output.permissionDecision).toBe("deny");
|
|
111
|
+
expect(output.permissionDecisionReason).toContain("4/3");
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
it("#given no ulw-loop session state #when guarded #then no-ops without counting", () => {
|
|
115
|
+
expect(applySpawnGuards(payload("spawn_agent", { message: "scan" }))).toBe("");
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
it("#given a non-spawn tool #when guarded #then no-ops", () => {
|
|
119
|
+
writeGoals();
|
|
120
|
+
|
|
121
|
+
expect(applySpawnGuards(payload("create_goal", { objective: "x" }))).toBe("");
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
it("#given the observed dotted v2 token #when guarded #then it counts too", () => {
|
|
125
|
+
writeGoals();
|
|
126
|
+
process.env["OMO_SPAWN_FANOUT_LIMIT"] = "1";
|
|
127
|
+
|
|
128
|
+
expect(applySpawnGuards(payload("collaboration.spawn_agent", { message: "scan" }))).toBe("");
|
|
129
|
+
const second = applySpawnGuards(payload("collaborationspawn_agent", { message: "scan" }));
|
|
130
|
+
|
|
131
|
+
expect(deny(second).permissionDecisionReason).toContain("2/1");
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
describe("applySpawnGuards gate-artifact guard", () => {
|
|
136
|
+
it("#given a gate spawn by agent_type without artifacts #when guarded #then denies naming the missing path", () => {
|
|
137
|
+
writeGoals();
|
|
138
|
+
|
|
139
|
+
const output = applySpawnGuards(
|
|
140
|
+
payload("collaborationspawn_agent", { agent_type: "lazycodex-gate-reviewer", message: "final gate review" }),
|
|
141
|
+
);
|
|
142
|
+
|
|
143
|
+
const parsed = deny(output);
|
|
144
|
+
expect(parsed.permissionDecision).toBe("deny");
|
|
145
|
+
expect(parsed.permissionDecisionReason).toContain("missing");
|
|
146
|
+
expect(parsed.permissionDecisionReason).toContain("g1-code-review.md");
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
it("#given a gate spawn identified by message only #when guarded #then still denies", () => {
|
|
150
|
+
writeGoals();
|
|
151
|
+
|
|
152
|
+
const output = applySpawnGuards(payload("spawn_agent", { message: "run the FINAL GATE REVIEW now" }));
|
|
153
|
+
|
|
154
|
+
expect(deny(output).permissionDecision).toBe("deny");
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
it("#given v1 artifacts on disk #when the gate spawns #then allows", () => {
|
|
158
|
+
writeGoals();
|
|
159
|
+
mkdirSync(join(workDir, ".omo", "evidence"), { recursive: true });
|
|
160
|
+
writeFileSync(join(workDir, ".omo", "evidence", "g1-code-review.md"), "report\n");
|
|
161
|
+
writeFileSync(join(workDir, ".omo", "evidence", "g1-manual-qa.md"), "matrix\n");
|
|
162
|
+
|
|
163
|
+
const output = applySpawnGuards(
|
|
164
|
+
payload("spawn_agent", { agent_type: "lazycodex-gate-reviewer", message: "final gate review" }),
|
|
165
|
+
);
|
|
166
|
+
|
|
167
|
+
expect(output).toBe("");
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
it("#given a v2 plan #when the gate spawns without attempt-dir artifacts #then denies naming the attempt path", () => {
|
|
171
|
+
writeGoals({ evidenceLayoutVersion: 2 });
|
|
172
|
+
mkdirSync(join(workDir, ".omo", "evidence"), { recursive: true });
|
|
173
|
+
writeFileSync(join(workDir, ".omo", "evidence", "g1-code-review.md"), "stale flat report\n");
|
|
174
|
+
|
|
175
|
+
const output = applySpawnGuards(
|
|
176
|
+
payload("spawn_agent", { agent_type: "lazycodex-gate-reviewer", message: "final gate review" }),
|
|
177
|
+
);
|
|
178
|
+
|
|
179
|
+
expect(deny(output).permissionDecisionReason).toContain(".omo/evidence/ulw/s1/g1/a1/g1-code-review.md");
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
it("#given a v2 plan with attempt-dir artifacts #when the gate spawns #then allows", () => {
|
|
183
|
+
writeGoals({ evidenceLayoutVersion: 2 });
|
|
184
|
+
const attemptDir = join(workDir, ".omo", "evidence", "ulw", "s1", "g1", "a1");
|
|
185
|
+
mkdirSync(attemptDir, { recursive: true });
|
|
186
|
+
writeFileSync(join(attemptDir, "g1-code-review.md"), "report\n");
|
|
187
|
+
writeFileSync(join(attemptDir, "g1-manual-qa.md"), "matrix\n");
|
|
188
|
+
|
|
189
|
+
const output = applySpawnGuards(
|
|
190
|
+
payload("spawn_agent", { agent_type: "lazycodex-gate-reviewer", message: "final gate review" }),
|
|
191
|
+
);
|
|
192
|
+
|
|
193
|
+
expect(output).toBe("");
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
it("#given the final goal's criteria are not all pass #when the gate spawns #then no-ops", () => {
|
|
197
|
+
writeGoals({
|
|
198
|
+
goals: [
|
|
199
|
+
{
|
|
200
|
+
id: "g1",
|
|
201
|
+
title: "Final goal",
|
|
202
|
+
objective: "Final goal",
|
|
203
|
+
status: "in_progress",
|
|
204
|
+
successCriteria: [criterion("C001"), { ...criterion("C002"), status: "pending" }],
|
|
205
|
+
attempt: 1,
|
|
206
|
+
createdAt: "2026-07-11T00:00:00.000Z",
|
|
207
|
+
updatedAt: "2026-07-11T00:00:00.000Z",
|
|
208
|
+
},
|
|
209
|
+
],
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
const output = applySpawnGuards(
|
|
213
|
+
payload("spawn_agent", { agent_type: "lazycodex-gate-reviewer", message: "final gate review" }),
|
|
214
|
+
);
|
|
215
|
+
|
|
216
|
+
expect(output).toBe("");
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
it("#given a non-gate reviewer spawn #when artifacts are missing #then never denies on the artifact rule", () => {
|
|
220
|
+
writeGoals();
|
|
221
|
+
|
|
222
|
+
const output = applySpawnGuards(
|
|
223
|
+
payload("spawn_agent", { agent_type: "lazycodex-code-reviewer", message: "review the diff" }),
|
|
224
|
+
);
|
|
225
|
+
|
|
226
|
+
expect(output).toBe("");
|
|
227
|
+
});
|
|
228
|
+
});
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { appendFileSync, existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { mkdtemp, rm } from "node:fs/promises";
|
|
3
|
+
import { tmpdir } from "node:os";
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
|
6
|
+
|
|
7
|
+
import { runStopResumeHook } from "../src/stop-resume-hook.ts";
|
|
8
|
+
|
|
9
|
+
let workDir: string;
|
|
10
|
+
|
|
11
|
+
beforeEach(async () => {
|
|
12
|
+
workDir = await mkdtemp(join(tmpdir(), "ulw-stop-resume-"));
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
afterEach(async () => {
|
|
16
|
+
await rm(workDir, { recursive: true, force: true });
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
function stopPayload(overrides: Record<string, unknown> = {}): Record<string, unknown> {
|
|
20
|
+
return {
|
|
21
|
+
hook_event_name: "Stop",
|
|
22
|
+
session_id: "s1",
|
|
23
|
+
turn_id: "t1",
|
|
24
|
+
transcript_path: join(workDir, "transcript.jsonl"),
|
|
25
|
+
cwd: workDir,
|
|
26
|
+
model: "gpt-5.6-sol",
|
|
27
|
+
permission_mode: "default",
|
|
28
|
+
stop_hook_active: false,
|
|
29
|
+
...overrides,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function sessionDir(): string {
|
|
34
|
+
return join(workDir, ".omo", "ulw-loop", "s1");
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function writeGoals(goals: readonly Record<string, unknown>[], planOverrides: Record<string, unknown> = {}): void {
|
|
38
|
+
mkdirSync(sessionDir(), { recursive: true });
|
|
39
|
+
writeFileSync(
|
|
40
|
+
join(sessionDir(), "goals.json"),
|
|
41
|
+
JSON.stringify({
|
|
42
|
+
version: 1,
|
|
43
|
+
createdAt: "2026-07-11T00:00:00.000Z",
|
|
44
|
+
updatedAt: "2026-07-11T00:00:00.000Z",
|
|
45
|
+
briefPath: ".omo/ulw-loop/s1/brief.md",
|
|
46
|
+
goalsPath: ".omo/ulw-loop/s1/goals.json",
|
|
47
|
+
ledgerPath: ".omo/ulw-loop/s1/ledger.jsonl",
|
|
48
|
+
codexGoalMode: "aggregate",
|
|
49
|
+
goals,
|
|
50
|
+
...planOverrides,
|
|
51
|
+
}),
|
|
52
|
+
);
|
|
53
|
+
writeFileSync(join(sessionDir(), "ledger.jsonl"), "");
|
|
54
|
+
writeFileSync(join(workDir, "transcript.jsonl"), "");
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function writeBoulderPlan(remaining: boolean): string {
|
|
58
|
+
mkdirSync(join(workDir, ".omo", "plans"), { recursive: true });
|
|
59
|
+
writeFileSync(
|
|
60
|
+
join(workDir, ".omo", "plans", "p.md"),
|
|
61
|
+
remaining ? "## TODOs\n- [ ] pending task\n" : "## TODOs\n- [x] done task\n",
|
|
62
|
+
);
|
|
63
|
+
return ".omo/plans/p.md";
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function pendingGoal(id = "g1", status = "pending"): Record<string, unknown> {
|
|
67
|
+
return {
|
|
68
|
+
id,
|
|
69
|
+
title: `Goal ${id}`,
|
|
70
|
+
objective: `Objective ${id}`,
|
|
71
|
+
status,
|
|
72
|
+
successCriteria: [],
|
|
73
|
+
attempt: 1,
|
|
74
|
+
createdAt: "2026-07-11T00:00:00.000Z",
|
|
75
|
+
updatedAt: "2026-07-11T00:00:00.000Z",
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
describe("runStopResumeHook", () => {
|
|
80
|
+
it("#given a pending goal #when the turn stops #then blocks with a resume directive", () => {
|
|
81
|
+
writeGoals([pendingGoal()]);
|
|
82
|
+
|
|
83
|
+
const output = runStopResumeHook(stopPayload());
|
|
84
|
+
|
|
85
|
+
const parsed = JSON.parse(output);
|
|
86
|
+
expect(parsed.decision).toBe("block");
|
|
87
|
+
expect(parsed.reason).toContain("omo ulw-loop status");
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
it("#given stop_hook_active #when the hook runs #then no-ops", () => {
|
|
91
|
+
writeGoals([pendingGoal()]);
|
|
92
|
+
|
|
93
|
+
expect(runStopResumeHook(stopPayload({ stop_hook_active: true }))).toBe("");
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
it("#given a malformed payload #when the hook runs #then no-ops", () => {
|
|
97
|
+
writeGoals([pendingGoal()]);
|
|
98
|
+
|
|
99
|
+
expect(runStopResumeHook({ hook_event_name: "Stop" })).toBe("");
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
it("#given an active boulder work with remaining plan tasks #when the hook runs #then defers to start-work-continuation", () => {
|
|
103
|
+
writeGoals([pendingGoal()]);
|
|
104
|
+
const plan = writeBoulderPlan(true);
|
|
105
|
+
writeFileSync(
|
|
106
|
+
join(workDir, ".omo", "boulder.json"),
|
|
107
|
+
JSON.stringify({ works: { w1: { session_ids: ["codex:s1"], status: "active", active_plan: plan } } }),
|
|
108
|
+
);
|
|
109
|
+
|
|
110
|
+
expect(runStopResumeHook(stopPayload())).toBe("");
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
it("#given an active boulder work whose plan is exhausted #when the hook runs #then resumes instead of deferring", () => {
|
|
114
|
+
writeGoals([pendingGoal()]);
|
|
115
|
+
const plan = writeBoulderPlan(false);
|
|
116
|
+
writeFileSync(
|
|
117
|
+
join(workDir, ".omo", "boulder.json"),
|
|
118
|
+
JSON.stringify({ works: { w1: { session_ids: ["codex:s1"], status: "active", active_plan: plan } } }),
|
|
119
|
+
);
|
|
120
|
+
|
|
121
|
+
expect(JSON.parse(runStopResumeHook(stopPayload())).decision).toBe("block");
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
it("#given a flat legacy boulder work with remaining plan tasks #when the hook runs #then still defers", () => {
|
|
125
|
+
writeGoals([pendingGoal()]);
|
|
126
|
+
const plan = writeBoulderPlan(true);
|
|
127
|
+
writeFileSync(
|
|
128
|
+
join(workDir, ".omo", "boulder.json"),
|
|
129
|
+
JSON.stringify({ session_ids: ["codex:s1"], status: "active", active_plan: plan }),
|
|
130
|
+
);
|
|
131
|
+
|
|
132
|
+
expect(runStopResumeHook(stopPayload())).toBe("");
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
it("#given a context-pressure marker in the transcript #when the hook runs #then no-ops", () => {
|
|
136
|
+
writeGoals([pendingGoal()]);
|
|
137
|
+
writeFileSync(join(workDir, "transcript.jsonl"), "note: context compacted mid-run\n");
|
|
138
|
+
|
|
139
|
+
expect(runStopResumeHook(stopPayload())).toBe("");
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
it("#given no ulw-loop state #when the hook runs #then no-ops", () => {
|
|
143
|
+
expect(runStopResumeHook(stopPayload())).toBe("");
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
it("#given all goals complete #when the hook runs #then no-ops", () => {
|
|
147
|
+
writeGoals([pendingGoal("g1", "complete"), pendingGoal("g2", "complete")]);
|
|
148
|
+
|
|
149
|
+
expect(runStopResumeHook(stopPayload())).toBe("");
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
it("#given blocked and failed goals only #when the hook runs #then no-ops", () => {
|
|
153
|
+
writeGoals([pendingGoal("g1", "blocked"), pendingGoal("g2", "failed")]);
|
|
154
|
+
|
|
155
|
+
expect(runStopResumeHook(stopPayload())).toBe("");
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
it("#given a static ledger #when the hook fires three times #then caps after two and marks stuck", () => {
|
|
159
|
+
writeGoals([pendingGoal()]);
|
|
160
|
+
|
|
161
|
+
const first = runStopResumeHook(stopPayload());
|
|
162
|
+
const second = runStopResumeHook(stopPayload());
|
|
163
|
+
const third = runStopResumeHook(stopPayload());
|
|
164
|
+
|
|
165
|
+
expect(JSON.parse(first).decision).toBe("block");
|
|
166
|
+
expect(JSON.parse(second).decision).toBe("block");
|
|
167
|
+
expect(third).toBe("");
|
|
168
|
+
const counter = JSON.parse(readFileSync(join(sessionDir(), "auto-resume-g1.json"), "utf8"));
|
|
169
|
+
expect(counter.count).toBe(2);
|
|
170
|
+
expect(existsSync(join(sessionDir(), "auto-resume-g1.stuck"))).toBe(true);
|
|
171
|
+
expect(readFileSync(join(sessionDir(), "ledger.jsonl"), "utf8")).toBe("");
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
it("#given a session id needing normalization #when the hook blocks #then the directive carries the normalized flag", () => {
|
|
175
|
+
writeGoals([pendingGoal()]);
|
|
176
|
+
|
|
177
|
+
const output = runStopResumeHook(stopPayload({ session_id: "s1/" }));
|
|
178
|
+
|
|
179
|
+
expect(JSON.parse(output).reason).toContain("--session-id s1");
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
it("#given ledger movement between stops #when the hook fires again #then the cap resets", () => {
|
|
183
|
+
writeGoals([pendingGoal()]);
|
|
184
|
+
|
|
185
|
+
runStopResumeHook(stopPayload());
|
|
186
|
+
runStopResumeHook(stopPayload());
|
|
187
|
+
appendFileSync(join(sessionDir(), "ledger.jsonl"), '{"kind":"goal_started"}\n');
|
|
188
|
+
const third = runStopResumeHook(stopPayload());
|
|
189
|
+
|
|
190
|
+
expect(JSON.parse(third).decision).toBe("block");
|
|
191
|
+
expect(existsSync(join(sessionDir(), "auto-resume-g1.stuck"))).toBe(false);
|
|
192
|
+
});
|
|
193
|
+
});
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"type": "command",
|
|
8
8
|
"command": "node \"${PLUGIN_ROOT}/components/git-bash/dist/cli.js\" hook post-compact",
|
|
9
9
|
"timeout": 5,
|
|
10
|
-
"statusMessage": "(OmO 4.
|
|
10
|
+
"statusMessage": "(OmO 4.17.0) Resetting Git Bash MCP Reminder",
|
|
11
11
|
"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"
|
|
12
12
|
}
|
|
13
13
|
],
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"type": "command",
|
|
8
8
|
"command": "node \"${PLUGIN_ROOT}/components/lsp/dist/cli.js\" hook post-compact",
|
|
9
9
|
"timeout": 5,
|
|
10
|
-
"statusMessage": "(OmO 4.
|
|
10
|
+
"statusMessage": "(OmO 4.17.0) Resetting LSP Diagnostics Cache",
|
|
11
11
|
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\lsp\\dist\\cli.js\" hook post-compact"
|
|
12
12
|
}
|
|
13
13
|
],
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"type": "command",
|
|
8
8
|
"command": "node \"${PLUGIN_ROOT}/components/rules/dist/cli.js\" hook post-compact",
|
|
9
9
|
"timeout": 10,
|
|
10
|
-
"statusMessage": "(OmO 4.
|
|
10
|
+
"statusMessage": "(OmO 4.17.0) Resetting Project Rule Cache",
|
|
11
11
|
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\rules\\dist\\cli.js\" hook post-compact"
|
|
12
12
|
}
|
|
13
13
|
],
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"type": "command",
|
|
8
8
|
"command": "node \"${PLUGIN_ROOT}/components/codegraph/dist/cli.js\" hook post-tool-use",
|
|
9
9
|
"timeout": 5,
|
|
10
|
-
"statusMessage": "(OmO 4.
|
|
10
|
+
"statusMessage": "(OmO 4.17.0) Checking CodeGraph Init Guidance",
|
|
11
11
|
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\codegraph\\dist\\cli.js\" hook post-tool-use"
|
|
12
12
|
}
|
|
13
13
|
],
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"type": "command",
|
|
8
8
|
"command": "node \"${PLUGIN_ROOT}/components/comment-checker/dist/cli.js\" hook post-tool-use",
|
|
9
9
|
"timeout": 30,
|
|
10
|
-
"statusMessage": "(OmO 4.
|
|
10
|
+
"statusMessage": "(OmO 4.17.0) Checking Comments",
|
|
11
11
|
"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"
|
|
12
12
|
}
|
|
13
13
|
],
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"type": "command",
|
|
8
8
|
"command": "node \"${PLUGIN_ROOT}/components/lsp/dist/cli.js\" hook post-tool-use",
|
|
9
9
|
"timeout": 60,
|
|
10
|
-
"statusMessage": "(OmO 4.
|
|
10
|
+
"statusMessage": "(OmO 4.17.0) Checking LSP Diagnostics",
|
|
11
11
|
"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"
|
|
12
12
|
}
|
|
13
13
|
],
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"type": "command",
|
|
9
9
|
"command": "node \"${PLUGIN_ROOT}/components/teammode/dist/cli.js\" hook post-tool-use",
|
|
10
10
|
"timeout": 10,
|
|
11
|
-
"statusMessage": "(OmO 4.
|
|
11
|
+
"statusMessage": "(OmO 4.17.0) Checking Thread Title Hygiene",
|
|
12
12
|
"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"
|
|
13
13
|
}
|
|
14
14
|
]
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"type": "command",
|
|
8
8
|
"command": "node \"${PLUGIN_ROOT}/components/rules/dist/cli.js\" hook post-tool-use",
|
|
9
9
|
"timeout": 10,
|
|
10
|
-
"statusMessage": "(OmO 4.
|
|
10
|
+
"statusMessage": "(OmO 4.17.0) Matching Project Rules",
|
|
11
11
|
"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"
|
|
12
12
|
}
|
|
13
13
|
],
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"type": "command",
|
|
8
8
|
"command": "node \"${PLUGIN_ROOT}/components/ulw-loop/dist/cli.js\" hook pre-tool-use",
|
|
9
9
|
"timeout": 5,
|
|
10
|
-
"statusMessage": "(OmO 4.
|
|
10
|
+
"statusMessage": "(OmO 4.17.0) Enforcing Unlimited Goal Budget",
|
|
11
11
|
"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"
|
|
12
12
|
}
|
|
13
13
|
],
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"PreToolUse": [
|
|
4
|
+
{
|
|
5
|
+
"matcher": "^(spawn_agent|collaborationspawn_agent|collaboration\\.spawn_agent)$",
|
|
6
|
+
"hooks": [
|
|
7
|
+
{
|
|
8
|
+
"type": "command",
|
|
9
|
+
"command": "node \"${PLUGIN_ROOT}/components/ulw-loop/dist/cli.js\" hook pre-tool-use-spawn",
|
|
10
|
+
"timeout": 5,
|
|
11
|
+
"statusMessage": "(OmO 4.17.0) Guarding Ulw-Loop Spawns",
|
|
12
|
+
"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"
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"type": "command",
|
|
8
8
|
"command": "node \"${PLUGIN_ROOT}/components/git-bash/dist/cli.js\" hook pre-tool-use",
|
|
9
9
|
"timeout": 5,
|
|
10
|
-
"statusMessage": "(OmO 4.
|
|
10
|
+
"statusMessage": "(OmO 4.17.0) Recommending Git Bash MCP",
|
|
11
11
|
"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"
|
|
12
12
|
}
|
|
13
13
|
],
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"type": "command",
|
|
8
8
|
"command": "node \"${PLUGIN_ROOT}/scripts/auto-update.mjs\" hook session-start",
|
|
9
9
|
"timeout": 5,
|
|
10
|
-
"statusMessage": "(OmO 4.
|
|
10
|
+
"statusMessage": "(OmO 4.17.0) Checking Auto Update",
|
|
11
11
|
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\scripts\\auto-update.mjs\" hook session-start"
|
|
12
12
|
}
|
|
13
13
|
],
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"command": "node \"${PLUGIN_ROOT}/components/bootstrap/dist/cli.js\" hook session-start",
|
|
9
9
|
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\bootstrap.ps1\"",
|
|
10
10
|
"timeout": 30,
|
|
11
|
-
"statusMessage": "(OmO 4.
|
|
11
|
+
"statusMessage": "(OmO 4.17.0) Checking Bootstrap Provisioning"
|
|
12
12
|
}
|
|
13
13
|
]
|
|
14
14
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"type": "command",
|
|
8
8
|
"command": "node \"${PLUGIN_ROOT}/components/codegraph/dist/cli.js\" hook session-start",
|
|
9
9
|
"timeout": 5,
|
|
10
|
-
"statusMessage": "(OmO 4.
|
|
10
|
+
"statusMessage": "(OmO 4.17.0) Checking CodeGraph Bootstrap",
|
|
11
11
|
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\codegraph\\dist\\cli.js\" hook session-start"
|
|
12
12
|
}
|
|
13
13
|
]
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"type": "command",
|
|
8
8
|
"command": "node \"${PLUGIN_ROOT}/components/rules/dist/cli.js\" hook session-start",
|
|
9
9
|
"timeout": 10,
|
|
10
|
-
"statusMessage": "(OmO 4.
|
|
10
|
+
"statusMessage": "(OmO 4.17.0) Loading Project Rules",
|
|
11
11
|
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\rules\\dist\\cli.js\" hook session-start"
|
|
12
12
|
}
|
|
13
13
|
]
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"type": "command",
|
|
8
8
|
"command": "node \"${PLUGIN_ROOT}/components/telemetry/dist/cli.js\" hook session-start",
|
|
9
9
|
"timeout": 5,
|
|
10
|
-
"statusMessage": "(OmO 4.
|
|
10
|
+
"statusMessage": "(OmO 4.17.0) Recording Session Telemetry",
|
|
11
11
|
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\telemetry\\dist\\cli.js\" hook session-start"
|
|
12
12
|
}
|
|
13
13
|
]
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"type": "command",
|
|
8
8
|
"command": "node \"${PLUGIN_ROOT}/components/start-work-continuation/dist/cli.js\" hook stop",
|
|
9
9
|
"timeout": 10,
|
|
10
|
-
"statusMessage": "(OmO 4.
|
|
10
|
+
"statusMessage": "(OmO 4.17.0) Checking Start-Work Continuation",
|
|
11
11
|
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\start-work-continuation\\dist\\cli.js\" hook stop"
|
|
12
12
|
}
|
|
13
13
|
]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"Stop": [
|
|
4
|
+
{
|
|
5
|
+
"hooks": [
|
|
6
|
+
{
|
|
7
|
+
"type": "command",
|
|
8
|
+
"command": "node \"${PLUGIN_ROOT}/components/ulw-loop/dist/cli.js\" hook stop",
|
|
9
|
+
"timeout": 10,
|
|
10
|
+
"statusMessage": "(OmO 4.17.0) Checking Ulw-Loop Resume",
|
|
11
|
+
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\ulw-loop\\dist\\cli.js\" hook stop"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"type": "command",
|
|
8
8
|
"command": "node \"${PLUGIN_ROOT}/components/start-work-continuation/dist/cli.js\" hook subagent-stop",
|
|
9
9
|
"timeout": 10,
|
|
10
|
-
"statusMessage": "(OmO 4.
|
|
10
|
+
"statusMessage": "(OmO 4.17.0) Checking Start-Work Continuation",
|
|
11
11
|
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\start-work-continuation\\dist\\cli.js\" hook subagent-stop"
|
|
12
12
|
}
|
|
13
13
|
]
|
package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json
CHANGED
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
"type": "command",
|
|
8
8
|
"command": "node \"${PLUGIN_ROOT}/components/lazycodex-executor-verify/dist/cli.js\" hook subagent-stop",
|
|
9
9
|
"timeout": 10,
|
|
10
|
-
"statusMessage": "(OmO 4.
|
|
10
|
+
"statusMessage": "(OmO 4.17.0) Verifying LazyCodex Executor Evidence",
|
|
11
11
|
"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"
|
|
12
12
|
}
|
|
13
13
|
],
|
|
14
|
-
"matcher": "^lazycodex-
|
|
14
|
+
"matcher": "^lazycodex-worker-(low|medium|high)$"
|
|
15
15
|
}
|
|
16
16
|
]
|
|
17
17
|
}
|