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
|
@@ -49,6 +49,9 @@ type RalphLoopHook = {
|
|
|
49
49
|
resumeLoop?: (sessionID: string) => boolean;
|
|
50
50
|
cancelLoop: (sessionID: string) => boolean | void;
|
|
51
51
|
};
|
|
52
|
+
type TodoContinuationEnforcerHook = {
|
|
53
|
+
cancelAllCountdowns: () => void;
|
|
54
|
+
};
|
|
52
55
|
export type ChatMessageHooks = {
|
|
53
56
|
modelFallback?: ChatMessageHook | null;
|
|
54
57
|
stopContinuationGuard?: StopContinuationGuard | null;
|
|
@@ -63,5 +66,6 @@ export type ChatMessageHooks = {
|
|
|
63
66
|
hephaestusAgentsMdInjector?: ChatMessageHook | null;
|
|
64
67
|
startWork?: ChatMessageHook | null;
|
|
65
68
|
ralphLoop?: RalphLoopHook | null;
|
|
69
|
+
todoContinuationEnforcer?: TodoContinuationEnforcerHook | null;
|
|
66
70
|
};
|
|
67
71
|
export {};
|
|
@@ -14,6 +14,7 @@ type CommandExecuteBeforeOutput = {
|
|
|
14
14
|
};
|
|
15
15
|
declare const NATIVE_LOOP_TRIGGERED_FLAG = "__omoNativeLoopTriggered";
|
|
16
16
|
export declare function createCommandExecuteBeforeHandler(args: {
|
|
17
|
+
directory: string;
|
|
17
18
|
hooks: CreatedHooks;
|
|
18
19
|
}): (input: CommandExecuteBeforeInput, output: CommandExecuteBeforeOutput) => Promise<void>;
|
|
19
20
|
export { NATIVE_LOOP_TRIGGERED_FLAG };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
type StopContinuationHooks = {
|
|
2
|
+
readonly stopContinuationGuard?: {
|
|
3
|
+
readonly stop?: (sessionID: string) => void;
|
|
4
|
+
} | null;
|
|
5
|
+
readonly todoContinuationEnforcer?: {
|
|
6
|
+
readonly cancelAllCountdowns: () => void;
|
|
7
|
+
} | null;
|
|
8
|
+
readonly ralphLoop?: {
|
|
9
|
+
readonly cancelLoop: (sessionID: string) => boolean | void;
|
|
10
|
+
} | null;
|
|
11
|
+
};
|
|
12
|
+
export declare function stopContinuation(args: {
|
|
13
|
+
readonly directory: string;
|
|
14
|
+
readonly hooks: StopContinuationHooks;
|
|
15
|
+
readonly sessionID: string;
|
|
16
|
+
}): void;
|
|
17
|
+
export {};
|
|
@@ -3,7 +3,7 @@ export declare const LIVE_ROUTE_UNAVAILABLE_LOG = "[live-server-route] route una
|
|
|
3
3
|
type RouteResult = {
|
|
4
4
|
client: unknown;
|
|
5
5
|
route: "live" | "in-process";
|
|
6
|
-
reason: "identity" | "flag" | "child" | "unavailable" | "live";
|
|
6
|
+
reason: "identity" | "flag" | "child" | "unavailable" | "live" | "affinity";
|
|
7
7
|
};
|
|
8
8
|
type FetchImpl = typeof fetch;
|
|
9
9
|
export declare function _setFetchImplementationForTesting(impl: FetchImpl | undefined): void;
|
|
@@ -62,7 +62,7 @@ The agent looks for these nine categories. The first three are stylistic, the ne
|
|
|
62
62
|
**Hard rule**: only apply when behavior equivalence is obvious. Do NOT change algorithms with subtle correctness implications. Do NOT micro-optimize hot paths without a benchmark. If in doubt, SKIP.
|
|
63
63
|
|
|
64
64
|
### Behavior coverage
|
|
65
|
-
9. **Missing tests** — behavior present in changed files that is not locked by any regression test. The fix is not to remove code but to ADD the narrowest test that pins the behavior.
|
|
65
|
+
9. **Missing tests** — behavior present in changed files that is not locked by any regression test. The fix is not to remove code but to ADD the narrowest test that pins the behavior. EXCEPTION: a PROSE file (prompt, `SKILL.md`, rule, markdown) has no behavioral seam — do NOT add a text/word-count/phrase pin for it; that guards a diff, not behavior. Cover only a machine-consumed value (parsed field, sentinel a runtime greps, a doc JSON sample through its real validator) or leave it to review.
|
|
66
66
|
|
|
67
67
|
### Structural
|
|
68
68
|
10. **Oversized modules** — any source file exceeding **250 pure LOC** (non-blank, non-comment lines). This is an architectural defect, not a style preference. Measure: `awk '!/^[[:space:]]*$/ && !/^[[:space:]]*(#|\/\/)/' <file> | wc -l`.
|
|
@@ -122,7 +122,7 @@ For each in-scope source file:
|
|
|
122
122
|
|
|
123
123
|
1. Identify the public/observable behavior the file exposes (exported functions, HTTP handlers, CLI commands, classes used elsewhere).
|
|
124
124
|
2. Check whether existing tests cover that behavior. Use `git grep` / project test conventions to find related test files.
|
|
125
|
-
3. **If behavior is uncovered or weakly covered, write the narrowest regression test that pins current behavior BEFORE editing the file.** Tests should pin observable outputs, not implementation details.
|
|
125
|
+
3. **If behavior is uncovered or weakly covered, write the narrowest regression test that pins current behavior BEFORE editing the file.** Tests should pin observable outputs, not implementation details. A PROSE file (prompt/`SKILL.md`/rule/markdown) is exempt — its wording is not behavior; skip the test and rely on review, or assert only a machine-consumed value.
|
|
126
126
|
4. Run the test suite (or at minimum the relevant tests). They must be **green** before any cleanup begins.
|
|
127
127
|
|
|
128
128
|
If you cannot establish a green baseline (e.g., test runner is broken), STOP and report. Do not proceed with cleanup on unverified ground.
|
|
@@ -14,7 +14,7 @@ This skill may include examples copied from the OpenCode harness. In Codex, do n
|
|
|
14
14
|
| `task(subagent_type="oracle", ...)` for final verification | `multi_agent_v1.spawn_agent({"message":"TASK: act as a rigorous reviewer. ...","agent_type":"lazycodex-gate-reviewer","fork_context":false})` |
|
|
15
15
|
| `task(category="...", ...)` for implementation or QA | `multi_agent_v1.spawn_agent({"message":"TASK: act as an implementation or QA worker. ...","fork_context":false})` |
|
|
16
16
|
| `background_output(task_id="...")` | `multi_agent_v1.wait_agent(...)` for mailbox signals |
|
|
17
|
-
| `team_*(...)` | Use Codex native subagents via `multi_agent_v1.spawn_agent
|
|
17
|
+
| `team_*(...)` | Use Codex native subagents via `multi_agent_v1.spawn_agent` and `multi_agent_v1.wait_agent`; use `multi_agent_v1.send_input` and `multi_agent_v1.close_agent` only when exposed in the active tools list |
|
|
18
18
|
|
|
19
19
|
Role-specific behavior must be described in a self-contained `message`. Use `fork_context: false` to start the child with only the initial prompt (no parent history); use `fork_context: true` only when full parent history is truly required. Include any required conversation context, files, diffs, constraints, and requested skill names directly in the spawned agent's `message`. OMO installs these selectable agent roles into `~/.codex/agents/`: `explorer`, `librarian`, `plan`, `momus`, `metis`, `lazycodex-code-reviewer`, `lazycodex-qa-executor`, and `lazycodex-gate-reviewer` — pass the matching name as `agent_type` so the child gets that role's model and instructions. If the spawn tool exposes no `agent_type` parameter, omit it and describe the role inside `message`. If a code block below conflicts with this section, this section wins.
|
|
20
20
|
|
|
@@ -14,13 +14,16 @@ Translate any OpenCode-only tool name in an inherited example to its Codex equiv
|
|
|
14
14
|
| OpenCode example | Codex tool to use |
|
|
15
15
|
| --- | --- |
|
|
16
16
|
| final-review `task(...)` | `multi_agent_v1.spawn_agent({"message":"TASK: act as a rigorous reviewer. ...","agent_type":"lazycodex-gate-reviewer","fork_context":false})` |
|
|
17
|
-
| worker `task(...)` | `multi_agent_v1.spawn_agent({"message":"TASK: act as <role>. ...","fork_context":false})` |
|
|
17
|
+
| worker `task(...)` | `multi_agent_v1.spawn_agent({"message":"TASK: act as <role>. ...","fork_context":false})` — for implementation workers add `agent_type: "lazycodex-worker-<low|medium|high>"` when the spawn schema exposes `agent_type` |
|
|
18
18
|
| `background_output(task_id="...")` | `multi_agent_v1.wait_agent(...)` for mailbox signals |
|
|
19
19
|
| `team_*(...)` | `multi_agent_v1.spawn_agent` + `multi_agent_v1.send_input` + `multi_agent_v1.wait_agent` + `multi_agent_v1.close_agent` |
|
|
20
20
|
|
|
21
21
|
When translating `load_skills=[...]`, name the skills inside the spawned agent's `message`. If a code block below conflicts with this section, this section wins.
|
|
22
22
|
|
|
23
|
-
Codex exposes ONE of two subagent tool surfaces per session; check your own tool list and route accordingly. If `multi_agent_v1.*` tools exist, use the table above as written. If instead a flat `spawn_agent` with a required `task_name` exists (`multi_agent_v2`), rewrite every `multi_agent_v1.*` example: `multi_agent_v1.spawn_agent({...,"fork_context":false})` becomes `spawn_agent({"task_name":"<lowercase_digits_underscores>","message":...,"agent_type":...,"fork_turns":"none"})` (`"all"` only when full parent history is truly required); `send_input` becomes `send_message`; do not call `close_agent`/`resume_agent` (finished agents end on their own; `followup_task` re-tasks one, `interrupt_agent` stops one); `wait_agent` takes only `timeout_ms` and returns on any child mailbox activity. `agent_type`
|
|
23
|
+
Codex exposes ONE of two subagent tool surfaces per session; check your own tool list and route accordingly. If `multi_agent_v1.*` tools exist, use the table above as written. If instead a flat `spawn_agent` with a required `task_name` exists (`multi_agent_v2`), rewrite every `multi_agent_v1.*` example: `multi_agent_v1.spawn_agent({...,"fork_context":false})` becomes `spawn_agent({"task_name":"<lowercase_digits_underscores>","message":...,"agent_type":...,"fork_turns":"none"})` (`"all"` only when full parent history is truly required); `send_input` becomes `send_message`; do not call `close_agent`/`resume_agent` (finished agents end on their own; `followup_task` re-tasks one, `interrupt_agent` stops one); `wait_agent` takes only `timeout_ms` and returns on any child mailbox activity. On the v2 surface `agent_type` may be absent from the spawn schema — when absent, omit it and describe the role inside `message`. If a code block below conflicts with this section, this section wins.
|
|
24
|
+
|
|
25
|
+
### Delegation by difficulty (Codex tier workers)
|
|
26
|
+
When tier worker agents are installed (Codex), size each implementation lane by difficulty and pass the matching `agent_type` where the spawn schema exposes it: LOW (one-file fix, boilerplate, config/copy) -> `lazycodex-worker-low`; MEDIUM (standard feature, few files, known patterns) -> `lazycodex-worker-medium`; HIGH (new module, cross-module refactor, concurrency/security/migration) -> `lazycodex-worker-high`. Explorer/librarian research lanes keep their own roles. Difficulty (model power) is orthogonal to the LIGHT/HEAVY rigor tier in step 4 — judge each on its own facts. On spawn surfaces without `agent_type` (deployed v2), state the tier inside `message`.
|
|
24
27
|
|
|
25
28
|
## Codex Subagent Reliability
|
|
26
29
|
|
|
@@ -85,7 +85,7 @@ Runs in parallel; ALL must APPROVE; surface results and wait for the user's expl
|
|
|
85
85
|
- UNCLEAR: run the high-accuracy review AUTOMATICALLY before presenting (unless Classify=Trivial), then present a brief that LEADS with the derived approach and the adopted defaults; still wait for the user's explicit okay.
|
|
86
86
|
|
|
87
87
|
### High-accuracy review (dual review)
|
|
88
|
-
The high-accuracy review is DUAL and both passes must return OKAY before handoff: (1) the native `momus` reviewer subagent, and (2) an independent Oracle review via `task(subagent_type="oracle", ...)` on the strongest available reasoning model, in a fully isolated sub-session with normal approval and sandbox policy. Do not add flags that disable approvals or sandboxing. One round = exactly ONE `momus` + ONE independent review, dispatched together against the COMPLETE plan file (todos + TL;DR filled)
|
|
88
|
+
The high-accuracy review is DUAL and both passes must return OKAY before handoff: (1) the native `momus` reviewer subagent, and (2) an independent Oracle review via `task(subagent_type="oracle", ...)` on the strongest available reasoning model, in a fully isolated sub-session with normal approval and sandbox policy. Do not add flags that disable approvals or sandboxing. Momus runs at Ultra and may take substantially longer than other agents. One round = exactly ONE `momus` + ONE independent review, dispatched together against the COMPLETE plan file (todos + TL;DR filled). Keep Momus in flight and wait for its terminal result: elapsed time alone never justifies cancelling, duplicating, replacing, or treating it as failed. After both verdicts return, fix every cited issue and resubmit both fresh until each approves. CLEAR: runs when the user opts in or `review_required: true`. UNCLEAR: runs automatically unless Classify=Trivial.
|
|
89
89
|
|
|
90
90
|
The draft must record the native Momus session/result, the independent review session/result, and the fix/retry summary. Do not say "high-accuracy review completed" unless both receipts exist and both final verdicts are unconditional approval.
|
|
91
91
|
|
|
@@ -221,7 +221,7 @@ Your next move: <fill - e.g. approve, or run a high-accuracy review>. Full execu
|
|
|
221
221
|
## Verification strategy
|
|
222
222
|
> Zero human intervention - all verification is agent-executed.
|
|
223
223
|
- Test decision: <TDD | tests-after | none> + framework
|
|
224
|
-
- Evidence:
|
|
224
|
+
- Evidence: <attemptDir>/task-<N>-${slug}.<ext> (attemptDir = currentAttemptDir from 'omo ulw-loop status --json', .omo/evidence/ulw/<session>/<goalId>/a<attempt>; outside ulw-loop use .omo/evidence/)
|
|
225
225
|
|
|
226
226
|
## Execution strategy
|
|
227
227
|
### Parallel execution waves
|
|
@@ -239,7 +239,7 @@ Your next move: <fill - e.g. approve, or run a high-accuracy review>. Full execu
|
|
|
239
239
|
Parallelization: Wave <N> | Blocked by: <...> | Blocks: <...>
|
|
240
240
|
References (executor has NO interview context - be exhaustive): <src/path:lines>
|
|
241
241
|
Acceptance criteria (agent-executable): <exact command or assertion>
|
|
242
|
-
QA scenarios (name the exact tool + invocation): happy + failure, Evidence
|
|
242
|
+
QA scenarios (name the exact tool + invocation): happy + failure, Evidence <attemptDir>/task-1-${slug}.<ext>
|
|
243
243
|
Commit: <Y/N> | <type>(<scope>): <summary>
|
|
244
244
|
|
|
245
245
|
## Final verification wave
|
|
@@ -15,7 +15,7 @@ This skill may include examples copied from the OpenCode harness. In Codex, do n
|
|
|
15
15
|
| `task(subagent_type="oracle", ...)` for final verification | `multi_agent_v1.spawn_agent({"message":"TASK: act as a rigorous reviewer. ...","agent_type":"lazycodex-gate-reviewer","fork_context":false})` |
|
|
16
16
|
| `task(category="...", ...)` for implementation or QA | `multi_agent_v1.spawn_agent({"message":"TASK: act as an implementation or QA worker. ...","fork_context":false})` |
|
|
17
17
|
| `background_output(task_id="...")` | `multi_agent_v1.wait_agent(...)` for mailbox signals |
|
|
18
|
-
| `team_*(...)` | Use Codex native subagents via `multi_agent_v1.spawn_agent
|
|
18
|
+
| `team_*(...)` | Use Codex native subagents via `multi_agent_v1.spawn_agent` and `multi_agent_v1.wait_agent`; use `multi_agent_v1.send_input` and `multi_agent_v1.close_agent` only when exposed in the active tools list |
|
|
19
19
|
|
|
20
20
|
Role-specific behavior must be described in a self-contained `message`. Use `fork_context: false` to start the child with only the initial prompt (no parent history); use `fork_context: true` only when full parent history is truly required. Include any required conversation context, files, diffs, constraints, and requested skill names directly in the spawned agent's `message`. OMO installs these selectable agent roles into `~/.codex/agents/`: `explorer`, `librarian`, `plan`, `momus`, `metis`, `lazycodex-code-reviewer`, `lazycodex-qa-executor`, and `lazycodex-gate-reviewer` — pass the matching name as `agent_type` so the child gets that role's model and instructions. If the spawn tool exposes no `agent_type` parameter, omit it and describe the role inside `message`. If a code block below conflicts with this section, this section wins.
|
|
21
21
|
|
|
@@ -69,7 +69,7 @@ Observation candidates and claim candidates travel back from workers as message
|
|
|
69
69
|
|
|
70
70
|
## Run the swarm as a cooperating team
|
|
71
71
|
|
|
72
|
-
Saturation research defaults to teammode, not isolated fire-and-forget workers: a lead one worker surfaces almost always reshapes what another should search next. When your harness gives you real cooperating members — Codex: the `teammode` skill (`codex_app` threads); OpenCode: `team_mode` — run this swarm as a team. Fall back to the background-worker swarm below only when team mode is unavailable, or the axes are genuinely independent with no cross-pollination expected.
|
|
72
|
+
Saturation research defaults to teammode, not isolated fire-and-forget workers: a lead one worker surfaces almost always reshapes what another should search next. When your harness gives you real cooperating members — Codex: the `teammode` skill (MultiAgentV2 agents, or `codex_app` threads as its fallback); OpenCode: `team_mode` — run this swarm as a team. Fall back to the background-worker swarm below only when team mode is unavailable, or the axes are genuinely independent with no cross-pollination expected.
|
|
73
73
|
|
|
74
74
|
- **One member per axis — by part, ownership, or perspective, never a job title.** Each Phase 0 axis is one member owning one concrete slice: a codebase part, a source territory, or a question lens. No two members share an angle. "Backend researcher" or "the web person" gives no real boundary and invites overlap — name what the member owns.
|
|
75
75
|
- **Many teammates by default.** Prefer a larger roster, usually 5-8 teammates, whenever the axes can be made distinct. Add at least one skeptic or red-team perspective for hyperdebate/ultradebate: cross-critique claims, evidence quality, synthesis structure, and visual-report choices before they reach the final deliverable.
|
|
@@ -249,7 +249,7 @@ If any page fails, you are not done: fix it, re-capture the full set, re-dispatc
|
|
|
249
249
|
|
|
250
250
|
Run this step IN ADDITION to Steps 1-4 when the original user task has a concrete visual target: "clone this site", "move this Figma design to code", "rebuild this screen", "make it look exactly like X", or "build this Imagen/Stitch/generated mockup and overview". For these tasks the normal dual-oracle is necessary but NOT sufficient. After it returns, run the following TWO additional MANDATORY verifications and LOOP until BOTH pass.
|
|
251
251
|
|
|
252
|
-
1. Pixel-perfect design-compare subagent (visual oracle). Dispatch a focused, read-only design-compare reviewer (recommend `gpt-5.
|
|
252
|
+
1. Pixel-perfect design-compare subagent (visual oracle). Dispatch a focused, read-only design-compare reviewer (recommend `gpt-5.6-sol` with xhigh reasoning). It must crop/zoom BOTH the reference (target / Figma export / source-site screenshot / generated page snapshot) and the ACTUAL screenshot into matching regions and read them **pixel-by-pixel** - header, nav, each card, spacing, type ramp, color tokens - not at a glance. It must also compare the overview text or annotations against the rendered content and DOM text. Anchor every claim with the bundled tool:
|
|
253
253
|
|
|
254
254
|
```
|
|
255
255
|
node "$SKILL_DIR/scripts/visual-qa.mjs" image-diff <reference.png> <actual.png>
|
package/dist/tui.js
CHANGED
|
@@ -20694,6 +20694,11 @@ var init_agent_model_requirements = __esm(() => {
|
|
|
20694
20694
|
},
|
|
20695
20695
|
hephaestus: {
|
|
20696
20696
|
fallbackChain: [
|
|
20697
|
+
{
|
|
20698
|
+
providers: ["openai", "vercel"],
|
|
20699
|
+
model: "gpt-5.6-sol",
|
|
20700
|
+
variant: "medium"
|
|
20701
|
+
},
|
|
20697
20702
|
{
|
|
20698
20703
|
providers: ["openai", "github-copilot", "opencode", "vercel"],
|
|
20699
20704
|
model: "gpt-5.5",
|
|
@@ -20720,7 +20725,7 @@ var init_agent_model_requirements = __esm(() => {
|
|
|
20720
20725
|
model: "claude-opus-4-7",
|
|
20721
20726
|
variant: "max"
|
|
20722
20727
|
},
|
|
20723
|
-
{ providers: ["opencode-go", "vercel"], model: "glm-5.
|
|
20728
|
+
{ providers: ["opencode-go", "vercel"], model: "glm-5.2" }
|
|
20724
20729
|
]
|
|
20725
20730
|
},
|
|
20726
20731
|
librarian: {
|
|
@@ -20767,7 +20772,7 @@ var init_agent_model_requirements = __esm(() => {
|
|
|
20767
20772
|
model: "gpt-5.5",
|
|
20768
20773
|
variant: "high"
|
|
20769
20774
|
},
|
|
20770
|
-
{ providers: ["opencode-go", "vercel"], model: "glm-5.
|
|
20775
|
+
{ providers: ["opencode-go", "vercel"], model: "glm-5.2" },
|
|
20771
20776
|
{
|
|
20772
20777
|
providers: ["google", "github-copilot", "opencode", "vercel"],
|
|
20773
20778
|
model: "gemini-3.1-pro"
|
|
@@ -20790,12 +20795,17 @@ var init_agent_model_requirements = __esm(() => {
|
|
|
20790
20795
|
model: "gpt-5.5",
|
|
20791
20796
|
variant: "high"
|
|
20792
20797
|
},
|
|
20793
|
-
{ providers: ["opencode-go", "vercel"], model: "glm-5.
|
|
20798
|
+
{ providers: ["opencode-go", "vercel"], model: "glm-5.2" },
|
|
20794
20799
|
{ providers: ["kimi-for-coding"], model: "k2p5" }
|
|
20795
20800
|
]
|
|
20796
20801
|
},
|
|
20797
20802
|
momus: {
|
|
20798
20803
|
fallbackChain: [
|
|
20804
|
+
{
|
|
20805
|
+
providers: ["openai", "vercel"],
|
|
20806
|
+
model: "gpt-5.6-sol",
|
|
20807
|
+
variant: "xhigh"
|
|
20808
|
+
},
|
|
20799
20809
|
{
|
|
20800
20810
|
providers: ["openai", "github-copilot", "opencode", "vercel"],
|
|
20801
20811
|
model: "gpt-5.5",
|
|
@@ -20811,7 +20821,7 @@ var init_agent_model_requirements = __esm(() => {
|
|
|
20811
20821
|
model: "gemini-3.1-pro",
|
|
20812
20822
|
variant: "high"
|
|
20813
20823
|
},
|
|
20814
|
-
{ providers: ["opencode-go", "vercel"], model: "glm-5.
|
|
20824
|
+
{ providers: ["opencode-go", "vercel"], model: "glm-5.2" }
|
|
20815
20825
|
]
|
|
20816
20826
|
},
|
|
20817
20827
|
atlas: {
|
|
@@ -20863,12 +20873,17 @@ var init_category_model_requirements = __esm(() => {
|
|
|
20863
20873
|
model: "claude-opus-4-7",
|
|
20864
20874
|
variant: "max"
|
|
20865
20875
|
},
|
|
20866
|
-
{ providers: ["opencode-go", "vercel"], model: "glm-5.
|
|
20876
|
+
{ providers: ["opencode-go", "vercel"], model: "glm-5.2" },
|
|
20867
20877
|
{ providers: ["kimi-for-coding"], model: "k2p5" }
|
|
20868
20878
|
]
|
|
20869
20879
|
},
|
|
20870
20880
|
ultrabrain: {
|
|
20871
20881
|
fallbackChain: [
|
|
20882
|
+
{
|
|
20883
|
+
providers: ["openai", "vercel"],
|
|
20884
|
+
model: "gpt-5.6-sol",
|
|
20885
|
+
variant: "xhigh"
|
|
20886
|
+
},
|
|
20872
20887
|
{
|
|
20873
20888
|
providers: ["openai", "opencode", "vercel"],
|
|
20874
20889
|
model: "gpt-5.5",
|
|
@@ -20884,11 +20899,21 @@ var init_category_model_requirements = __esm(() => {
|
|
|
20884
20899
|
model: "claude-opus-4-7",
|
|
20885
20900
|
variant: "max"
|
|
20886
20901
|
},
|
|
20887
|
-
{ providers: ["opencode-go", "vercel"], model: "glm-5.
|
|
20902
|
+
{ providers: ["opencode-go", "vercel"], model: "glm-5.2" }
|
|
20888
20903
|
]
|
|
20889
20904
|
},
|
|
20890
20905
|
deep: {
|
|
20891
20906
|
fallbackChain: [
|
|
20907
|
+
{
|
|
20908
|
+
providers: ["openai", "vercel"],
|
|
20909
|
+
model: "gpt-5.6-terra",
|
|
20910
|
+
variant: "xhigh"
|
|
20911
|
+
},
|
|
20912
|
+
{
|
|
20913
|
+
providers: ["openai", "vercel"],
|
|
20914
|
+
model: "gpt-5.6-sol",
|
|
20915
|
+
variant: "high"
|
|
20916
|
+
},
|
|
20892
20917
|
{
|
|
20893
20918
|
providers: ["openai", "github-copilot", "opencode", "vercel"],
|
|
20894
20919
|
model: "gpt-5.5",
|
|
@@ -20905,7 +20930,7 @@ var init_category_model_requirements = __esm(() => {
|
|
|
20905
20930
|
variant: "high"
|
|
20906
20931
|
},
|
|
20907
20932
|
{ providers: ["opencode-go", "vercel"], model: "kimi-k2.6" },
|
|
20908
|
-
{ providers: ["opencode-go", "vercel"], model: "glm-5.
|
|
20933
|
+
{ providers: ["opencode-go", "vercel"], model: "glm-5.2" }
|
|
20909
20934
|
]
|
|
20910
20935
|
},
|
|
20911
20936
|
artistry: {
|
|
@@ -20922,7 +20947,7 @@ var init_category_model_requirements = __esm(() => {
|
|
|
20922
20947
|
},
|
|
20923
20948
|
{ providers: ["openai", "github-copilot", "opencode", "vercel"], model: "gpt-5.5" },
|
|
20924
20949
|
{ providers: ["opencode-go", "vercel"], model: "kimi-k2.6" },
|
|
20925
|
-
{ providers: ["opencode-go", "vercel"], model: "glm-5.
|
|
20950
|
+
{ providers: ["opencode-go", "vercel"], model: "glm-5.2" }
|
|
20926
20951
|
]
|
|
20927
20952
|
},
|
|
20928
20953
|
quick: {
|
|
@@ -20947,6 +20972,11 @@ var init_category_model_requirements = __esm(() => {
|
|
|
20947
20972
|
},
|
|
20948
20973
|
"unspecified-low": {
|
|
20949
20974
|
fallbackChain: [
|
|
20975
|
+
{
|
|
20976
|
+
providers: ["openai", "vercel"],
|
|
20977
|
+
model: "gpt-5.6-luna",
|
|
20978
|
+
variant: "xhigh"
|
|
20979
|
+
},
|
|
20950
20980
|
{
|
|
20951
20981
|
providers: ["anthropic", "github-copilot", "opencode", "vercel"],
|
|
20952
20982
|
model: "claude-sonnet-4-6"
|
|
@@ -20980,7 +21010,7 @@ var init_category_model_requirements = __esm(() => {
|
|
|
20980
21010
|
},
|
|
20981
21011
|
{ providers: ["zai-coding-plan", "opencode", "bailian-coding-plan", "vercel"], model: "glm-5" },
|
|
20982
21012
|
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
|
20983
|
-
{ providers: ["opencode-go", "vercel"], model: "glm-5.
|
|
21013
|
+
{ providers: ["opencode-go", "vercel"], model: "glm-5.2" },
|
|
20984
21014
|
{ providers: ["opencode", "bailian-coding-plan", "vercel"], model: "kimi-k2.5" },
|
|
20985
21015
|
{
|
|
20986
21016
|
providers: [
|
|
@@ -21328,6 +21358,54 @@ var init_supplemental_entries = __esm(() => {
|
|
|
21328
21358
|
output: 262144
|
|
21329
21359
|
}
|
|
21330
21360
|
},
|
|
21361
|
+
"gpt-5.6-sol": {
|
|
21362
|
+
id: "gpt-5.6-sol",
|
|
21363
|
+
family: "gpt",
|
|
21364
|
+
reasoning: true,
|
|
21365
|
+
temperature: false,
|
|
21366
|
+
toolCall: true,
|
|
21367
|
+
modalities: {
|
|
21368
|
+
input: ["text", "image", "pdf"],
|
|
21369
|
+
output: ["text"]
|
|
21370
|
+
},
|
|
21371
|
+
limit: {
|
|
21372
|
+
context: 1050000,
|
|
21373
|
+
input: 922000,
|
|
21374
|
+
output: 128000
|
|
21375
|
+
}
|
|
21376
|
+
},
|
|
21377
|
+
"gpt-5.6-terra": {
|
|
21378
|
+
id: "gpt-5.6-terra",
|
|
21379
|
+
family: "gpt-mini",
|
|
21380
|
+
reasoning: true,
|
|
21381
|
+
temperature: false,
|
|
21382
|
+
toolCall: true,
|
|
21383
|
+
modalities: {
|
|
21384
|
+
input: ["text", "image", "pdf"],
|
|
21385
|
+
output: ["text"]
|
|
21386
|
+
},
|
|
21387
|
+
limit: {
|
|
21388
|
+
context: 1050000,
|
|
21389
|
+
input: 922000,
|
|
21390
|
+
output: 128000
|
|
21391
|
+
}
|
|
21392
|
+
},
|
|
21393
|
+
"gpt-5.6-luna": {
|
|
21394
|
+
id: "gpt-5.6-luna",
|
|
21395
|
+
family: "gpt-nano",
|
|
21396
|
+
reasoning: true,
|
|
21397
|
+
temperature: false,
|
|
21398
|
+
toolCall: true,
|
|
21399
|
+
modalities: {
|
|
21400
|
+
input: ["text", "image", "pdf"],
|
|
21401
|
+
output: ["text"]
|
|
21402
|
+
},
|
|
21403
|
+
limit: {
|
|
21404
|
+
context: 1050000,
|
|
21405
|
+
input: 922000,
|
|
21406
|
+
output: 128000
|
|
21407
|
+
}
|
|
21408
|
+
},
|
|
21331
21409
|
"gpt-5.5": {
|
|
21332
21410
|
id: "gpt-5.5",
|
|
21333
21411
|
family: "gpt",
|
|
@@ -21846,28 +21924,7 @@ var init_agent_display_names = __esm(() => {
|
|
|
21846
21924
|
REVERSE_DISPLAY_NAMES = Object.fromEntries(Object.entries(AGENT_DISPLAY_NAMES).map(([key, displayName]) => [displayName.toLowerCase(), key]));
|
|
21847
21925
|
});
|
|
21848
21926
|
// packages/omo-opencode/src/tools/delegate-task/anthropic-categories.ts
|
|
21849
|
-
var
|
|
21850
|
-
You are working on tasks that don't fit specific categories but require moderate effort.
|
|
21851
|
-
|
|
21852
|
-
<Selection_Gate>
|
|
21853
|
-
BEFORE selecting this category, VERIFY ALL conditions:
|
|
21854
|
-
1. Task does NOT fit: quick (trivial), visual-engineering (UI), ultrabrain (deep logic), artistry (creative), writing (docs)
|
|
21855
|
-
2. Task requires more than trivial effort but is NOT system-wide
|
|
21856
|
-
3. Scope is contained within a few files/modules
|
|
21857
|
-
|
|
21858
|
-
If task fits ANY other category, DO NOT select unspecified-low.
|
|
21859
|
-
This is NOT a default choice - it's for genuinely unclassifiable moderate-effort work.
|
|
21860
|
-
</Selection_Gate>
|
|
21861
|
-
</Category_Context>
|
|
21862
|
-
|
|
21863
|
-
<Caller_Warning>
|
|
21864
|
-
THIS CATEGORY USES A MID-TIER MODEL (claude-sonnet-4-6).
|
|
21865
|
-
|
|
21866
|
-
**PROVIDE CLEAR STRUCTURE:**
|
|
21867
|
-
1. MUST DO: Enumerate required actions explicitly
|
|
21868
|
-
2. MUST NOT DO: State forbidden actions to prevent scope creep
|
|
21869
|
-
3. EXPECTED OUTPUT: Define concrete success criteria
|
|
21870
|
-
</Caller_Warning>`, UNSPECIFIED_HIGH_CATEGORY_PROMPT_APPEND = `<Category_Context>
|
|
21927
|
+
var UNSPECIFIED_HIGH_CATEGORY_PROMPT_APPEND = `<Category_Context>
|
|
21871
21928
|
You are working on tasks that don't fit specific categories but require substantial effort.
|
|
21872
21929
|
|
|
21873
21930
|
<Selection_Gate>
|
|
@@ -21883,12 +21940,6 @@ If task is unclassifiable but moderate-effort, use unspecified-low instead.
|
|
|
21883
21940
|
</Category_Context>`, ANTHROPIC_CATEGORIES;
|
|
21884
21941
|
var init_anthropic_categories = __esm(() => {
|
|
21885
21942
|
ANTHROPIC_CATEGORIES = [
|
|
21886
|
-
{
|
|
21887
|
-
name: "unspecified-low",
|
|
21888
|
-
config: { model: "anthropic/claude-sonnet-4-6" },
|
|
21889
|
-
description: "Tasks that don't fit other categories, low effort required",
|
|
21890
|
-
promptAppend: UNSPECIFIED_LOW_CATEGORY_PROMPT_APPEND
|
|
21891
|
-
},
|
|
21892
21943
|
{
|
|
21893
21944
|
name: "unspecified-high",
|
|
21894
21945
|
config: { model: "anthropic/claude-opus-4-7", variant: "max" },
|
|
@@ -22064,11 +22115,15 @@ function isGpt5_5Model(model) {
|
|
|
22064
22115
|
const modelName = extractModelName(model).toLowerCase();
|
|
22065
22116
|
return modelName.includes("gpt-5.5") || modelName.includes("gpt-5-5");
|
|
22066
22117
|
}
|
|
22118
|
+
function isGpt5_6Model(model) {
|
|
22119
|
+
const modelName = extractModelName(model).toLowerCase();
|
|
22120
|
+
return modelName.includes("gpt-5.6") || modelName.includes("gpt-5-6");
|
|
22121
|
+
}
|
|
22067
22122
|
var init_types3 = () => {};
|
|
22068
22123
|
|
|
22069
22124
|
// packages/omo-opencode/src/tools/delegate-task/openai-categories.ts
|
|
22070
22125
|
function resolveDeepCategoryPromptAppend(model) {
|
|
22071
|
-
if (model && isGpt5_5Model(model)) {
|
|
22126
|
+
if (model && (isGpt5_5Model(model) || isGpt5_6Model(model))) {
|
|
22072
22127
|
return DEEP_CATEGORY_PROMPT_APPEND_GPT_5_5;
|
|
22073
22128
|
}
|
|
22074
22129
|
return DEEP_CATEGORY_PROMPT_APPEND;
|
|
@@ -22181,19 +22236,40 @@ EXPECTED OUTPUT:
|
|
|
22181
22236
|
\`\`\`
|
|
22182
22237
|
|
|
22183
22238
|
If your prompt lacks this structure, REWRITE IT before delegating.
|
|
22239
|
+
</Caller_Warning>`, UNSPECIFIED_LOW_CATEGORY_PROMPT_APPEND = `<Category_Context>
|
|
22240
|
+
You are working on tasks that don't fit specific categories but require moderate effort.
|
|
22241
|
+
|
|
22242
|
+
<Selection_Gate>
|
|
22243
|
+
BEFORE selecting this category, VERIFY ALL conditions:
|
|
22244
|
+
1. Task does NOT fit: quick (trivial), visual-engineering (UI), ultrabrain (deep logic), artistry (creative), writing (docs)
|
|
22245
|
+
2. Task requires more than trivial effort but is NOT system-wide
|
|
22246
|
+
3. Scope is contained within a few files/modules
|
|
22247
|
+
|
|
22248
|
+
If task fits ANY other category, DO NOT select unspecified-low.
|
|
22249
|
+
This is NOT a default choice - it's for genuinely unclassifiable moderate-effort work.
|
|
22250
|
+
</Selection_Gate>
|
|
22251
|
+
</Category_Context>
|
|
22252
|
+
|
|
22253
|
+
<Caller_Warning>
|
|
22254
|
+
THIS CATEGORY USES A LIGHTWEIGHT MODEL (gpt-5.6-luna).
|
|
22255
|
+
|
|
22256
|
+
**PROVIDE CLEAR STRUCTURE:**
|
|
22257
|
+
1. MUST DO: Enumerate required actions explicitly
|
|
22258
|
+
2. MUST NOT DO: State forbidden actions to prevent scope creep
|
|
22259
|
+
3. EXPECTED OUTPUT: Define concrete success criteria
|
|
22184
22260
|
</Caller_Warning>`, OPENAI_CATEGORIES;
|
|
22185
22261
|
var init_openai_categories = __esm(() => {
|
|
22186
22262
|
init_types3();
|
|
22187
22263
|
OPENAI_CATEGORIES = [
|
|
22188
22264
|
{
|
|
22189
22265
|
name: "ultrabrain",
|
|
22190
|
-
config: { model: "openai/gpt-5.
|
|
22266
|
+
config: { model: "openai/gpt-5.6-sol", variant: "xhigh" },
|
|
22191
22267
|
description: "Use ONLY for genuinely hard, logic-heavy tasks. Give clear goals only, not step-by-step instructions.",
|
|
22192
22268
|
promptAppend: ULTRABRAIN_CATEGORY_PROMPT_APPEND
|
|
22193
22269
|
},
|
|
22194
22270
|
{
|
|
22195
22271
|
name: "deep",
|
|
22196
|
-
config: { model: "openai/gpt-5.
|
|
22272
|
+
config: { model: "openai/gpt-5.6-terra", variant: "xhigh" },
|
|
22197
22273
|
description: "Goal-oriented autonomous problem-solving on hairy problems requiring deep research. ONE goal + ONE deliverable per call \u2014 multiple goals must fan out as parallel `deep` calls, never bundled into one.",
|
|
22198
22274
|
promptAppend: DEEP_CATEGORY_PROMPT_APPEND,
|
|
22199
22275
|
resolvePromptAppend: resolveDeepCategoryPromptAppend
|
|
@@ -22203,6 +22279,12 @@ var init_openai_categories = __esm(() => {
|
|
|
22203
22279
|
config: { model: "openai/gpt-5.4-mini" },
|
|
22204
22280
|
description: "Trivial tasks - single file changes, typo fixes, simple modifications",
|
|
22205
22281
|
promptAppend: QUICK_CATEGORY_PROMPT_APPEND
|
|
22282
|
+
},
|
|
22283
|
+
{
|
|
22284
|
+
name: "unspecified-low",
|
|
22285
|
+
config: { model: "openai/gpt-5.6-luna", variant: "xhigh" },
|
|
22286
|
+
description: "Tasks that don't fit other categories, low effort required",
|
|
22287
|
+
promptAppend: UNSPECIFIED_LOW_CATEGORY_PROMPT_APPEND
|
|
22206
22288
|
}
|
|
22207
22289
|
];
|
|
22208
22290
|
});
|
|
@@ -75205,6 +75287,66 @@ async function probe(registration) {
|
|
|
75205
75287
|
return false;
|
|
75206
75288
|
}
|
|
75207
75289
|
}
|
|
75290
|
+
async function probeSessionAffinity(registration, sessionID) {
|
|
75291
|
+
if (!registration.serverUrl) {
|
|
75292
|
+
return;
|
|
75293
|
+
}
|
|
75294
|
+
const probeUrl = new URL(`/session/${sessionID}`, registration.serverUrl);
|
|
75295
|
+
const authHeader = getServerBasicAuthHeader();
|
|
75296
|
+
const headers = authHeader ? { Authorization: authHeader } : {};
|
|
75297
|
+
try {
|
|
75298
|
+
const controller = new AbortController;
|
|
75299
|
+
const timeoutId = setTimeout(() => controller.abort(), PROBE_ABORT_MS);
|
|
75300
|
+
let response;
|
|
75301
|
+
try {
|
|
75302
|
+
response = await getFetch()(probeUrl, { headers, signal: controller.signal });
|
|
75303
|
+
} finally {
|
|
75304
|
+
clearTimeout(timeoutId);
|
|
75305
|
+
}
|
|
75306
|
+
if (response.ok) {
|
|
75307
|
+
setSessionAffinity(registration, sessionID, true);
|
|
75308
|
+
return true;
|
|
75309
|
+
}
|
|
75310
|
+
if (response.status === 404) {
|
|
75311
|
+
setSessionAffinity(registration, sessionID, false);
|
|
75312
|
+
log2("[live-server-route] live listener does not own session; falling back to in-process client", { sessionID });
|
|
75313
|
+
return false;
|
|
75314
|
+
}
|
|
75315
|
+
return;
|
|
75316
|
+
} catch {
|
|
75317
|
+
return;
|
|
75318
|
+
}
|
|
75319
|
+
}
|
|
75320
|
+
function setSessionAffinity(registration, sessionID, owned) {
|
|
75321
|
+
const now = Date.now();
|
|
75322
|
+
for (const [key, entry] of registration.sessionAffinity) {
|
|
75323
|
+
if (now - entry.timestamp >= AFFINITY_TTL_MS) {
|
|
75324
|
+
registration.sessionAffinity.delete(key);
|
|
75325
|
+
}
|
|
75326
|
+
}
|
|
75327
|
+
registration.sessionAffinity.set(sessionID, { owned, timestamp: now });
|
|
75328
|
+
}
|
|
75329
|
+
function getFreshSessionAffinity(registration, sessionID) {
|
|
75330
|
+
const entry = registration.sessionAffinity.get(sessionID);
|
|
75331
|
+
if (!entry || Date.now() - entry.timestamp >= AFFINITY_TTL_MS) {
|
|
75332
|
+
return;
|
|
75333
|
+
}
|
|
75334
|
+
return entry.owned;
|
|
75335
|
+
}
|
|
75336
|
+
async function resolveSessionAffinity(registration, sessionID) {
|
|
75337
|
+
const cached2 = getFreshSessionAffinity(registration, sessionID);
|
|
75338
|
+
if (cached2 !== undefined) {
|
|
75339
|
+
return cached2;
|
|
75340
|
+
}
|
|
75341
|
+
let inFlight = registration.inFlightAffinity.get(sessionID);
|
|
75342
|
+
if (!inFlight) {
|
|
75343
|
+
inFlight = probeSessionAffinity(registration, sessionID).finally(() => {
|
|
75344
|
+
registration.inFlightAffinity.delete(sessionID);
|
|
75345
|
+
});
|
|
75346
|
+
registration.inFlightAffinity.set(sessionID, inFlight);
|
|
75347
|
+
}
|
|
75348
|
+
return inFlight;
|
|
75349
|
+
}
|
|
75208
75350
|
function getFreshProbeAvailability(registration) {
|
|
75209
75351
|
const available = registration.available;
|
|
75210
75352
|
if (available === undefined || Date.now() - registration.probeTimestamp >= PROBE_TTL_MS) {
|
|
@@ -75257,6 +75399,13 @@ function tryResolveDispatchClientSync(client3, sessionID) {
|
|
|
75257
75399
|
if (!freshAvailability) {
|
|
75258
75400
|
return { client: client3, route: "in-process", reason: "unavailable" };
|
|
75259
75401
|
}
|
|
75402
|
+
const cachedAffinity = getFreshSessionAffinity(registration, sessionID);
|
|
75403
|
+
if (cachedAffinity === undefined) {
|
|
75404
|
+
return;
|
|
75405
|
+
}
|
|
75406
|
+
if (!cachedAffinity) {
|
|
75407
|
+
return { client: client3, route: "in-process", reason: "affinity" };
|
|
75408
|
+
}
|
|
75260
75409
|
const resolvedLiveClient = getOrBuildLiveClient(registration);
|
|
75261
75410
|
if (!resolvedLiveClient) {
|
|
75262
75411
|
return { client: client3, route: "in-process", reason: "unavailable" };
|
|
@@ -75276,6 +75425,10 @@ async function resolveDispatchClient(client3, sessionID) {
|
|
|
75276
75425
|
if (!isAvailable) {
|
|
75277
75426
|
return { client: client3, route: "in-process", reason: "unavailable" };
|
|
75278
75427
|
}
|
|
75428
|
+
const affinity = await resolveSessionAffinity(registration, sessionID);
|
|
75429
|
+
if (affinity === false) {
|
|
75430
|
+
return { client: client3, route: "in-process", reason: "affinity" };
|
|
75431
|
+
}
|
|
75279
75432
|
const resolvedLiveClient = getOrBuildLiveClient(registration);
|
|
75280
75433
|
if (!resolvedLiveClient) {
|
|
75281
75434
|
return { client: client3, route: "in-process", reason: "unavailable" };
|
|
@@ -75313,10 +75466,11 @@ function markLiveRouteUnavailable(reason) {
|
|
|
75313
75466
|
for (const registration of registrations.values()) {
|
|
75314
75467
|
registration.available = false;
|
|
75315
75468
|
registration.probeTimestamp = Date.now();
|
|
75469
|
+
registration.sessionAffinity.clear();
|
|
75316
75470
|
}
|
|
75317
75471
|
log2(`[live-server-route] marked unavailable: ${reason}`);
|
|
75318
75472
|
}
|
|
75319
|
-
var PROBE_TTL_MS = 60000, PROBE_ABORT_MS = 1500, registrations, liveParentWakeRoutingDisabled = false, fetchImplementationForTesting;
|
|
75473
|
+
var PROBE_TTL_MS = 60000, PROBE_ABORT_MS = 1500, AFFINITY_TTL_MS = 60000, registrations, liveParentWakeRoutingDisabled = false, fetchImplementationForTesting;
|
|
75320
75474
|
var init_live_server_route = __esm(() => {
|
|
75321
75475
|
init_dist();
|
|
75322
75476
|
init_state();
|