oh-my-opencode 4.2.2 → 4.3.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/README.ja.md +8 -0
- package/README.ko.md +8 -0
- package/README.md +16 -2
- package/README.ru.md +7 -0
- package/README.zh-cn.md +8 -0
- package/dist/agents/atlas/default-prompt-sections.d.ts +1 -1
- package/dist/agents/builtin-agents/available-skills.d.ts +1 -1
- package/dist/agents/builtin-agents/model-resolution.d.ts +1 -1
- package/dist/agents/prometheus/plan-generation.d.ts +1 -1
- package/dist/agents/prometheus/plan-template.d.ts +1 -1
- package/dist/agents/prometheus/spec-driven-mode.d.ts +7 -0
- package/dist/cli/doctor/checks/system-binary.d.ts +1 -1
- package/dist/cli/doctor/checks/tools-lsp.d.ts +6 -1
- package/dist/cli/doctor/checks/tui-plugin-config.d.ts +14 -0
- package/dist/cli/doctor/constants.d.ts +1 -0
- package/dist/cli/index.js +5295 -3353
- package/dist/cli/provider-model-id-transform.d.ts +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/schema/agent-overrides.d.ts +147 -1
- package/dist/config/schema/background-task.d.ts +1 -0
- package/dist/config/schema/default-mode.d.ts +6 -0
- package/dist/config/schema/hooks.d.ts +2 -0
- package/dist/config/schema/i18n.d.ts +5 -0
- package/dist/config/schema/keyword-detector.d.ts +8 -0
- package/dist/config/schema/oh-my-opencode-config.d.ts +163 -1
- package/dist/config/schema.d.ts +2 -0
- package/dist/create-hooks.d.ts +2 -0
- package/dist/features/background-agent/fallback-retry-handler.d.ts +3 -0
- package/dist/features/background-agent/manager.d.ts +0 -1
- package/dist/features/background-agent/parent-wake-notifier.d.ts +5 -1
- package/dist/features/background-agent/session-activity.d.ts +12 -0
- package/dist/features/background-agent/session-existence.d.ts +2 -0
- package/dist/features/background-agent/session-stream-activity.d.ts +18 -0
- package/dist/features/background-agent/task-activity-refresh.d.ts +11 -0
- package/dist/features/background-agent/task-poller.d.ts +2 -0
- package/dist/features/boulder-state/constants.d.ts +1 -10
- package/dist/features/boulder-state/format-duration.d.ts +1 -1
- package/dist/features/boulder-state/storage.d.ts +1 -83
- package/dist/features/boulder-state/top-level-task.d.ts +1 -2
- package/dist/features/boulder-state/types.d.ts +1 -100
- package/dist/features/task-toast-manager/manager.d.ts +1 -1
- package/dist/features/team-mode/team-state-store/locks.d.ts +7 -4
- package/dist/features/tmux-subagent/manager.d.ts +2 -0
- package/dist/hooks/atlas/system-reminder-templates.d.ts +1 -1
- package/dist/hooks/claude-code-hooks/config-loader.d.ts +7 -0
- package/dist/hooks/claude-code-hooks/config.d.ts +4 -1
- package/dist/hooks/claude-code-hooks/types.d.ts +17 -1
- package/dist/hooks/comment-checker/cli.d.ts +2 -22
- package/dist/hooks/comment-checker/hook.d.ts +1 -0
- package/dist/hooks/comment-checker/initialization-gate.d.ts +1 -0
- package/dist/hooks/comment-checker/types.d.ts +1 -31
- package/dist/hooks/directory-agents-injector/finder.d.ts +2 -5
- package/dist/hooks/directory-agents-injector/injector.d.ts +1 -16
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/keyword-detector/analyze/default.d.ts +1 -1
- package/dist/hooks/keyword-detector/constants.d.ts +10 -5
- package/dist/hooks/keyword-detector/detector.d.ts +2 -2
- package/dist/hooks/keyword-detector/hook.d.ts +2 -1
- package/dist/hooks/keyword-detector/hyperplan/default.d.ts +5 -0
- package/dist/hooks/notepad-write-guard/index.d.ts +2 -0
- package/dist/hooks/plan-format-validator/hook.d.ts +21 -0
- package/dist/hooks/plan-format-validator/index.d.ts +1 -0
- package/dist/hooks/prometheus-md-only/constants.d.ts +8 -0
- package/dist/hooks/rules-injector/constants.d.ts +1 -7
- package/dist/hooks/rules-injector/injector.d.ts +7 -3
- package/dist/hooks/rules-injector/matcher.d.ts +3 -24
- package/dist/hooks/rules-injector/parser.d.ts +2 -18
- package/dist/hooks/rules-injector/project-root-finder.d.ts +1 -13
- package/dist/hooks/rules-injector/rule-distance.d.ts +1 -10
- package/dist/hooks/rules-injector/rule-file-finder.d.ts +2 -6
- package/dist/hooks/rules-injector/rule-file-scanner.d.ts +2 -13
- package/dist/hooks/rules-injector/rule-scan-cache.d.ts +2 -13
- package/dist/hooks/rules-injector/transcript-hydration.d.ts +18 -0
- package/dist/hooks/rules-injector/types.d.ts +2 -38
- package/dist/hooks/runtime-fallback/types.d.ts +1 -0
- package/dist/hooks/session-todo-status.d.ts +1 -0
- package/dist/hooks/sisyphus-junior-notepad/constants.d.ts +1 -1
- package/dist/hooks/start-work/context-info-builder.d.ts +1 -0
- package/dist/hooks/start-work/session-plan-affinity.d.ts +7 -0
- package/dist/hooks/team-session-events/team-member-error-handler.d.ts +14 -1
- package/dist/hooks/todo-continuation-enforcer/types.d.ts +1 -0
- package/dist/hooks/unstable-agent-babysitter/unstable-agent-babysitter-hook.d.ts +0 -21
- package/dist/index.js +20128 -17181
- package/dist/locales/en.d.ts +18 -0
- package/dist/locales/index.d.ts +6 -0
- package/dist/locales/zh.d.ts +17 -0
- package/dist/mcp/ast-grep.d.ts +11 -0
- package/dist/mcp/cli-suffix.d.ts +1 -0
- package/dist/mcp/index.d.ts +6 -1
- package/dist/mcp/lsp.d.ts +2 -0
- package/dist/mcp/runtime-executable.d.ts +11 -0
- package/dist/mcp/types.d.ts +1 -0
- package/dist/oh-my-opencode.schema.json +449 -1
- package/dist/plugin/hooks/create-core-hooks.d.ts +2 -0
- package/dist/plugin/hooks/create-tool-guard-hooks.d.ts +3 -1
- package/dist/plugin/system-transform.d.ts +2 -1
- package/dist/plugin/tool-definition.d.ts +9 -0
- package/dist/plugin/tool-execute-after.d.ts +15 -9
- package/dist/plugin/tool-registry.d.ts +1 -2
- package/dist/plugin-handlers/agent-key-remapper.d.ts +5 -1
- package/dist/plugin-handlers/hook-config-handler.d.ts +7 -0
- package/dist/plugin-handlers/index.d.ts +1 -0
- package/dist/plugin-handlers/mcp-config-handler.d.ts +3 -0
- package/dist/plugin-handlers/plugin-components-loader.d.ts +2 -3
- package/dist/shared/agent-display-names.d.ts +10 -2
- package/dist/shared/command-executor/execute-hook-command.d.ts +2 -0
- package/dist/shared/contains-path.d.ts +1 -2
- package/dist/shared/context-limit-resolver.d.ts +2 -5
- package/dist/shared/deep-merge.d.ts +1 -13
- package/dist/shared/disabled-providers.d.ts +14 -0
- package/dist/shared/extract-semver.d.ts +1 -1
- package/dist/shared/fallback-chain-from-models.d.ts +1 -12
- package/dist/shared/file-utils.d.ts +1 -7
- package/dist/shared/frontmatter.d.ts +1 -7
- package/dist/shared/i18n.d.ts +9 -0
- package/dist/shared/index.d.ts +1 -1
- package/dist/shared/jsonc-parser.d.ts +1 -23
- package/dist/shared/model-availability.d.ts +18 -5
- package/dist/shared/model-capabilities/index.d.ts +6 -3
- package/dist/shared/model-capabilities-cache.d.ts +4 -8
- package/dist/shared/model-error-classifier.d.ts +4 -33
- package/dist/shared/model-format-normalizer.d.ts +1 -7
- package/dist/shared/model-normalization.d.ts +1 -2
- package/dist/shared/model-requirements.d.ts +2 -22
- package/dist/shared/model-resolution-pipeline.d.ts +5 -30
- package/dist/shared/model-resolution-types.d.ts +1 -36
- package/dist/shared/model-resolver.d.ts +8 -35
- package/dist/shared/model-sanitizer.d.ts +1 -3
- package/dist/shared/model-settings-compatibility.d.ts +2 -40
- package/dist/shared/model-string-parser.d.ts +1 -9
- package/dist/shared/model-suggestion-retry.d.ts +3 -7
- package/dist/shared/opencode-config-dir.d.ts +1 -0
- package/dist/shared/port-utils.d.ts +1 -9
- package/dist/shared/prompt-async-gate/pending-tool-turn.d.ts +9 -0
- package/dist/shared/prompt-async-gate/queue.d.ts +8 -0
- package/dist/shared/prompt-async-gate/reservations.d.ts +9 -0
- package/dist/shared/prompt-async-gate/session-idle-dispatch.d.ts +15 -0
- package/dist/shared/prompt-async-gate/timing.d.ts +8 -0
- package/dist/shared/prompt-async-gate/types.d.ts +120 -0
- package/dist/shared/prompt-async-gate.d.ts +4 -79
- package/dist/shared/prompt-failure-classifier.d.ts +9 -0
- package/dist/shared/prompt-timeout-context.d.ts +1 -0
- package/dist/shared/provider-model-id-transform.d.ts +1 -1
- package/dist/shared/record-type-guard.d.ts +1 -1
- package/dist/shared/replace-tool-args.d.ts +1 -13
- package/dist/shared/session-idle-settle.d.ts +2 -1
- package/dist/shared/shell-env.d.ts +7 -5
- package/dist/shared/snake-case.d.ts +1 -5
- package/dist/shared/tool-name.d.ts +1 -1
- package/dist/testing/create-plugin-module.d.ts +2 -0
- package/dist/tools/delegate-task/constants.d.ts +19 -0
- package/dist/tools/delegate-task/skill-resolver.d.ts +9 -2
- package/dist/tools/delegate-task/sync-prompt-sender.d.ts +1 -2
- package/dist/tools/delegate-task/types.d.ts +32 -0
- package/dist/tools/glob/constants.d.ts +1 -1
- package/dist/tools/grep/constants.d.ts +1 -1
- package/dist/tools/hashline-edit/autocorrect-replacement-lines.d.ts +1 -6
- package/dist/tools/hashline-edit/constants.d.ts +1 -4
- package/dist/tools/hashline-edit/diff-utils.d.ts +1 -6
- package/dist/tools/hashline-edit/edit-deduplication.d.ts +1 -5
- package/dist/tools/hashline-edit/edit-operation-primitives.d.ts +1 -10
- package/dist/tools/hashline-edit/edit-operations.d.ts +2 -8
- package/dist/tools/hashline-edit/edit-ordering.d.ts +1 -4
- package/dist/tools/hashline-edit/edit-text-normalization.d.ts +1 -7
- package/dist/tools/hashline-edit/file-text-canonicalization.d.ts +2 -7
- package/dist/tools/hashline-edit/hash-computation.d.ts +2 -11
- package/dist/tools/hashline-edit/hashline-chunk-formatter.d.ts +2 -10
- package/dist/tools/hashline-edit/hashline-edit-diff.d.ts +1 -1
- package/dist/tools/hashline-edit/normalize-edits.d.ts +2 -10
- package/dist/tools/hashline-edit/types.d.ts +1 -17
- package/dist/tools/hashline-edit/validation.d.ts +2 -20
- package/dist/tools/index.d.ts +0 -1
- package/dist/tools/look-at/assistant-message-extractor.d.ts +7 -0
- package/dist/tools/look-at/session-poller.d.ts +9 -1
- package/dist/tools/skill/tools.d.ts +1 -1
- package/dist/tools/skill/types.d.ts +2 -0
- package/package.json +53 -28
- package/packages/ast-grep-mcp/dist/cli.js +885 -0
- package/packages/lsp-tools-mcp/dist/cli.d.ts +0 -1
- package/packages/lsp-tools-mcp/dist/cli.js +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/cleanup-errors.d.ts +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/cleanup-errors.js +1 -2
- package/packages/lsp-tools-mcp/dist/lsp/client-wrapper.d.ts +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/client-wrapper.js +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/client.d.ts +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/client.js +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/config-loader.d.ts +1 -10
- package/packages/lsp-tools-mcp/dist/lsp/config-loader.js +55 -10
- package/packages/lsp-tools-mcp/dist/lsp/connection.d.ts +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/connection.js +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/constants.d.ts +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/constants.js +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/directory-diagnostics.d.ts +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/directory-diagnostics.js +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/errors.d.ts +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/errors.js +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/formatters.d.ts +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/formatters.js +7 -10
- package/packages/lsp-tools-mcp/dist/lsp/infer-extension.d.ts +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/infer-extension.js +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/json-rpc-connection.d.ts +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/json-rpc-connection.js +10 -11
- package/packages/lsp-tools-mcp/dist/lsp/language-mappings.d.ts +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/language-mappings.js +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/manager.d.ts +1 -3
- package/packages/lsp-tools-mcp/dist/lsp/manager.js +6 -23
- package/packages/lsp-tools-mcp/dist/lsp/process-signal-cleanup.d.ts +1 -0
- package/packages/lsp-tools-mcp/dist/lsp/process-signal-cleanup.js +17 -0
- package/packages/lsp-tools-mcp/dist/lsp/process.d.ts +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/process.js +41 -12
- package/packages/lsp-tools-mcp/dist/lsp/server-definitions.d.ts +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/server-definitions.js +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/server-installation.d.ts +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/server-installation.js +3 -4
- package/packages/lsp-tools-mcp/dist/lsp/server-resolution.d.ts +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/server-resolution.js +18 -7
- package/packages/lsp-tools-mcp/dist/lsp/transport.d.ts +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/transport.js +20 -11
- package/packages/lsp-tools-mcp/dist/lsp/types.d.ts +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/types.js +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/utils.d.ts +0 -2
- package/packages/lsp-tools-mcp/dist/lsp/utils.js +0 -8
- package/packages/lsp-tools-mcp/dist/lsp/workspace-edit.d.ts +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/workspace-edit.js +0 -1
- package/packages/lsp-tools-mcp/dist/mcp.d.ts +0 -1
- package/packages/lsp-tools-mcp/dist/mcp.js +14 -14
- package/packages/lsp-tools-mcp/dist/tools.d.ts +0 -1
- package/packages/lsp-tools-mcp/dist/tools.js +21 -14
- package/dist/shared/known-variants.d.ts +0 -6
- package/dist/shared/model-capabilities/bundled-snapshot.d.ts +0 -2
- package/dist/shared/model-capabilities/get-model-capabilities.d.ts +0 -2
- package/dist/shared/model-capabilities/runtime-model-readers.d.ts +0 -11
- package/dist/shared/model-capabilities/supplemental-entries.d.ts +0 -2
- package/dist/shared/model-capabilities/types.d.ts +0 -94
- package/dist/shared/model-capability-aliases.d.ts +0 -21
- package/dist/shared/model-capability-guardrails.d.ts +0 -38
- package/dist/shared/model-capability-heuristics.d.ts +0 -11
- package/dist/tools/ast-grep/cli-binary-path-resolution.d.ts +0 -5
- package/dist/tools/ast-grep/cli.d.ts +0 -12
- package/dist/tools/ast-grep/constants.d.ts +0 -5
- package/dist/tools/ast-grep/downloader.d.ts +0 -5
- package/dist/tools/ast-grep/environment-check.d.ts +0 -20
- package/dist/tools/ast-grep/index.d.ts +0 -5
- package/dist/tools/ast-grep/language-support.d.ts +0 -6
- package/dist/tools/ast-grep/pattern-hints.d.ts +0 -4
- package/dist/tools/ast-grep/process-output-timeout.d.ts +0 -12
- package/dist/tools/ast-grep/result-formatter.d.ts +0 -5
- package/dist/tools/ast-grep/sg-cli-path.d.ts +0 -3
- package/dist/tools/ast-grep/sg-compact-json-output.d.ts +0 -2
- package/dist/tools/ast-grep/tool-descriptions.d.ts +0 -3
- package/dist/tools/ast-grep/tools.d.ts +0 -3
- package/dist/tools/ast-grep/types.d.ts +0 -58
- package/packages/lsp-tools-mcp/dist/cli.d.ts.map +0 -1
- package/packages/lsp-tools-mcp/dist/cli.js.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/cleanup-errors.d.ts.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/cleanup-errors.js.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/client-wrapper.d.ts.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/client-wrapper.js.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/client.d.ts.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/client.js.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/config-loader.d.ts.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/config-loader.js.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/connection.d.ts.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/connection.js.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/constants.d.ts.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/constants.js.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/directory-diagnostics.d.ts.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/directory-diagnostics.js.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/errors.d.ts.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/errors.js.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/formatters.d.ts.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/formatters.js.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/infer-extension.d.ts.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/infer-extension.js.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/json-rpc-connection.d.ts.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/json-rpc-connection.js.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/language-mappings.d.ts.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/language-mappings.js.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/manager.d.ts.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/manager.js.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/process.d.ts.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/process.js.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/server-definitions.d.ts.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/server-definitions.js.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/server-installation.d.ts.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/server-installation.js.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/server-resolution.d.ts.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/server-resolution.js.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/transport.d.ts.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/transport.js.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/types.d.ts.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/types.js.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/utils.d.ts.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/utils.js.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/workspace-edit.d.ts.map +0 -1
- package/packages/lsp-tools-mcp/dist/lsp/workspace-edit.js.map +0 -1
- package/packages/lsp-tools-mcp/dist/mcp.d.ts.map +0 -1
- package/packages/lsp-tools-mcp/dist/mcp.js.map +0 -1
- package/packages/lsp-tools-mcp/dist/tools.d.ts.map +0 -1
- package/packages/lsp-tools-mcp/dist/tools.js.map +0 -1
|
@@ -8,6 +8,11 @@
|
|
|
8
8
|
*
|
|
9
9
|
* The detector injects a thin wrapper that loads the `hyperplan` skill, which
|
|
10
10
|
* carries the full orchestration instructions for the 5-member adversarial team.
|
|
11
|
+
*
|
|
12
|
+
* The `hpp` shorthand uses an extra negative-lookbehind so that the very common
|
|
13
|
+
* C++ header-file extension `.hpp` (e.g. `interface.hpp`, `src/buffer.hpp`)
|
|
14
|
+
* does NOT falsely trigger hyperplan mode. A leading `.` would otherwise
|
|
15
|
+
* satisfy `\b` because the dot is a non-word character. See issue #4215.
|
|
11
16
|
*/
|
|
12
17
|
export declare const HYPERPLAN_PATTERN: RegExp;
|
|
13
18
|
export declare const HYPERPLAN_MESSAGE = "<hyperplan-mode>\n**MANDATORY**: Say \"HYPERPLAN MODE ENABLED!\" as your first response, exactly once.\n\nThe user invoked **hyperplan mode** \u2014 adversarial multi-agent planning via team-mode.\n\nLOAD THE HYPERPLAN SKILL IMMEDIATELY:\n\n```\nskill(name=\"hyperplan\")\n```\n\nAfter loading, follow the skill's full workflow EXACTLY:\n1. Acknowledge and capture the planning request\n2. Spawn the adversarial team via `team_create` with category members `unspecified-low`, `unspecified-high`, `ultrabrain`, and `artistry`; include `deep` only if the category is enabled\n3. Round 1 \u2014 Independent analysis (each member produces findings)\n4. Round 2 \u2014 Cross-attack (each member ruthlessly attacks the other 4's findings)\n5. Round 3 \u2014 Defend, refine, or concede\n6. Distill defensible insights into a structured bundle (Lead does NOT write the plan)\n7. MANDATORY: hand the bundle to the `plan` agent via `task(subagent_type=\"plan\", ...)` \u2014 the plan agent owns sequencing, parallelization, and verification gates\n8. Present the plan agent's output verbatim with provenance line, then clean up the team\n\nDo NOT improvise. Do NOT skip rounds. Do NOT write the plan yourself in step 6 \u2014 the handoff to the plan agent in step 7 is non-negotiable. Be the lead orchestrator and let the adversarial members do the cross-critique.\n\nIf team-mode is unavailable (`team_*` tools missing), instruct the user to set `team_mode.enabled: true` in `~/.config/opencode/oh-my-opencode.jsonc` and restart opencode.\n</hyperplan-mode>";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
+
/**
|
|
3
|
+
* Programmatic plan format validator.
|
|
4
|
+
*
|
|
5
|
+
* After any agent writes to a `.omo/plans/*.md` file, compares the
|
|
6
|
+
* raw top-level checkbox count against `getPlanProgress()` to detect
|
|
7
|
+
* malformed task labels. Warns the agent when some or all tasks
|
|
8
|
+
* will be skipped by the progress counter.
|
|
9
|
+
*/
|
|
10
|
+
export declare function createPlanFormatValidatorHook(_ctx: PluginInput): {
|
|
11
|
+
"tool.execute.after": (input: {
|
|
12
|
+
tool: string;
|
|
13
|
+
sessionID: string;
|
|
14
|
+
callID: string;
|
|
15
|
+
args?: Record<string, unknown>;
|
|
16
|
+
}, output: {
|
|
17
|
+
title: string;
|
|
18
|
+
output: string;
|
|
19
|
+
metadata: unknown;
|
|
20
|
+
}) => Promise<void>;
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createPlanFormatValidatorHook } from "./hook";
|
|
@@ -3,5 +3,13 @@ export declare const PROMETHEUS_AGENT = "prometheus";
|
|
|
3
3
|
export declare const ALLOWED_EXTENSIONS: string[];
|
|
4
4
|
export declare const ALLOWED_PATH_PREFIX = ".omo";
|
|
5
5
|
export declare const BLOCKED_TOOLS: string[];
|
|
6
|
+
/**
|
|
7
|
+
* XML-tag wrapper used to mark the planning-context boundary in prompts
|
|
8
|
+
* forwarded to external LLMs via task(). This format intentionally avoids
|
|
9
|
+
* the `[SYSTEM DIRECTIVE: ...]` bracket syntax that Azure OpenAI Prompt Shield
|
|
10
|
+
* flags as indirect prompt injection in user-role content (#4036).
|
|
11
|
+
*/
|
|
12
|
+
export declare const PLANNING_CONTEXT_OPEN = "<planning-context source=\"prometheus-read-only\">";
|
|
13
|
+
export declare const PLANNING_CONTEXT_CLOSE = "</planning-context>";
|
|
6
14
|
export declare const PLANNING_CONSULT_WARNING: string;
|
|
7
15
|
export declare const PROMETHEUS_WORKFLOW_REMINDER: string;
|
|
@@ -1,8 +1,2 @@
|
|
|
1
1
|
export declare const RULES_INJECTOR_STORAGE: string;
|
|
2
|
-
export
|
|
3
|
-
export declare const PROJECT_RULE_SUBDIRS: [string, string][];
|
|
4
|
-
export declare const PROJECT_RULE_FILES: string[];
|
|
5
|
-
export declare const GITHUB_INSTRUCTIONS_PATTERN: RegExp;
|
|
6
|
-
export declare const USER_RULE_DIR = ".claude/rules";
|
|
7
|
-
export declare const OPENCODE_USER_RULE_DIRS: string[];
|
|
8
|
-
export declare const RULE_EXTENSIONS: string[];
|
|
2
|
+
export { GITHUB_INSTRUCTIONS_PATTERN, OPENCODE_USER_RULE_DIRS, PROJECT_MARKERS, PROJECT_RULE_FILES, PROJECT_RULE_SUBDIRS, RULE_EXTENSIONS, USER_RULE_DIR, } from "@oh-my-opencode/rules-engine";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { statSync } from "node:fs";
|
|
2
2
|
import { homedir } from "node:os";
|
|
3
|
-
import type { FindRuleFilesOptions } from "./rule-file-finder";
|
|
4
|
-
import { createContentHash, isDuplicateByContentHash, isDuplicateByRealPath, shouldApplyRule } from "./matcher";
|
|
5
|
-
import { saveInjectedRules } from "./storage";
|
|
6
3
|
import type { SessionInjectedRulesCache } from "./cache";
|
|
4
|
+
import { createContentHash, isDuplicateByContentHash, isDuplicateByRealPath, shouldApplyRule } from "./matcher";
|
|
5
|
+
import type { FindRuleFilesOptions } from "./rule-file-finder";
|
|
7
6
|
import type { RuleScanCache } from "./rule-scan-cache";
|
|
7
|
+
import { saveInjectedRules } from "./storage";
|
|
8
8
|
type ToolExecuteOutput = {
|
|
9
9
|
title: string;
|
|
10
10
|
output: string;
|
|
@@ -23,6 +23,9 @@ export interface ParsedRuleCacheStats {
|
|
|
23
23
|
}
|
|
24
24
|
export declare function clearParsedRuleCache(): void;
|
|
25
25
|
export declare function getParsedRuleCacheStats(): ParsedRuleCacheStats;
|
|
26
|
+
export interface TranscriptHydrationHook {
|
|
27
|
+
hydrateSession(sessionID: string): Promise<ReadonlySet<string>>;
|
|
28
|
+
}
|
|
26
29
|
export declare function createRuleInjectionProcessor(deps: {
|
|
27
30
|
workspaceDirectory: string;
|
|
28
31
|
truncator: DynamicTruncator;
|
|
@@ -37,6 +40,7 @@ export declare function createRuleInjectionProcessor(deps: {
|
|
|
37
40
|
createContentHash?: typeof createContentHash;
|
|
38
41
|
isDuplicateByContentHash?: typeof isDuplicateByContentHash;
|
|
39
42
|
saveInjectedRules?: typeof saveInjectedRules;
|
|
43
|
+
transcriptHydration?: TranscriptHydrationHook;
|
|
40
44
|
}): {
|
|
41
45
|
processFilePathForInjection: (filePath: string, sessionID: string, output: ToolExecuteOutput) => Promise<void>;
|
|
42
46
|
};
|
|
@@ -1,26 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
applies: boolean;
|
|
4
|
-
reason?: string;
|
|
5
|
-
}
|
|
1
|
+
export { createContentHash, getMatcherCacheStats, isDuplicateByContentHash, isDuplicateByRealPath, resetMatcherCache, shouldApplyRule, } from "@oh-my-opencode/rules-engine";
|
|
2
|
+
export type { MatchResult } from "@oh-my-opencode/rules-engine";
|
|
6
3
|
export interface MatcherCacheStats {
|
|
7
|
-
entries: number;
|
|
4
|
+
readonly entries: number;
|
|
8
5
|
}
|
|
9
|
-
export declare function resetMatcherCache(): void;
|
|
10
|
-
export declare function getMatcherCacheStats(): MatcherCacheStats;
|
|
11
|
-
/**
|
|
12
|
-
* Check if a rule should apply to the current file based on metadata
|
|
13
|
-
*/
|
|
14
|
-
export declare function shouldApplyRule(metadata: RuleMetadata, currentFilePath: string, projectRoot: string | null): MatchResult;
|
|
15
|
-
/**
|
|
16
|
-
* Check if realPath already exists in cache (symlink deduplication)
|
|
17
|
-
*/
|
|
18
|
-
export declare function isDuplicateByRealPath(realPath: string, cache: Set<string>): boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Create SHA-256 hash of content, truncated to 16 chars
|
|
21
|
-
*/
|
|
22
|
-
export declare function createContentHash(content: string): string;
|
|
23
|
-
/**
|
|
24
|
-
* Check if content hash already exists in cache
|
|
25
|
-
*/
|
|
26
|
-
export declare function isDuplicateByContentHash(hash: string, cache: Set<string>): boolean;
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
metadata: RuleMetadata;
|
|
4
|
-
body: string;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Parse YAML frontmatter from rule file content
|
|
8
|
-
* Supports:
|
|
9
|
-
* - Single string: globs: "**\/*.py"
|
|
10
|
-
* - Inline array: globs: ["**\/*.py", "src/**\/*.ts"]
|
|
11
|
-
* - Multi-line array:
|
|
12
|
-
* globs:
|
|
13
|
-
* - "**\/*.py"
|
|
14
|
-
* - "src/**\/*.ts"
|
|
15
|
-
* - Comma-separated: globs: "**\/*.py, src/**\/*.ts"
|
|
16
|
-
* - Claude Code 'paths' field (alias for globs)
|
|
17
|
-
*/
|
|
18
|
-
export declare function parseRuleFrontmatter(content: string): RuleFrontmatterResult;
|
|
1
|
+
export { parseRuleFrontmatter } from "@oh-my-opencode/rules-engine";
|
|
2
|
+
export type { RuleFrontmatterResult } from "@oh-my-opencode/rules-engine";
|
|
@@ -1,13 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
/**
|
|
3
|
-
* Find project root by walking up from startPath.
|
|
4
|
-
* Checks for PROJECT_MARKERS (.git, pyproject.toml, package.json, etc.)
|
|
5
|
-
*
|
|
6
|
-
* Memoizes every directory visited during the walk so subsequent lookups for
|
|
7
|
-
* any descendant path resolve in O(1) without re-running marker existsSync
|
|
8
|
-
* probes.
|
|
9
|
-
*
|
|
10
|
-
* @param startPath - Starting path to search from (file or directory)
|
|
11
|
-
* @returns Project root path or null if not found
|
|
12
|
-
*/
|
|
13
|
-
export declare function findProjectRoot(startPath: string): string | null;
|
|
1
|
+
export { clearProjectRootCache, findProjectRoot } from "@oh-my-opencode/rules-engine";
|
|
@@ -1,10 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Calculate directory distance between a rule file and current file.
|
|
3
|
-
* Distance is based on common ancestor within project root.
|
|
4
|
-
*
|
|
5
|
-
* @param rulePath - Path to the rule file
|
|
6
|
-
* @param currentFile - Path to the current file being edited
|
|
7
|
-
* @param projectRoot - Project root for relative path calculation
|
|
8
|
-
* @returns Distance (0 = same directory, higher = further)
|
|
9
|
-
*/
|
|
10
|
-
export declare function calculateDistance(rulePath: string, currentFile: string, projectRoot: string | null): number;
|
|
1
|
+
export { calculateDistance } from "@oh-my-opencode/rules-engine";
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export interface FindRuleFilesOptions {
|
|
4
|
-
skipClaudeUserRules?: boolean;
|
|
5
|
-
}
|
|
6
|
-
export declare function findRuleFiles(projectRoot: string | null, homeDir: string, currentFile: string, options?: FindRuleFilesOptions, cache?: RuleScanCache): RuleFileCandidate[];
|
|
1
|
+
export { findRuleFiles } from "@oh-my-opencode/rules-engine";
|
|
2
|
+
export type { FindRuleFilesOptions } from "@oh-my-opencode/rules-engine";
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* @param dir - Directory to search
|
|
5
|
-
* @param results - Array to accumulate results
|
|
6
|
-
*/
|
|
1
|
+
import { safeRealpathSync } from "@oh-my-opencode/rules-engine";
|
|
2
|
+
export { safeRealpathSync };
|
|
7
3
|
export declare function findRuleFilesRecursive(dir: string, results: string[]): void;
|
|
8
|
-
/**
|
|
9
|
-
* Resolve symlinks safely with fallback to original path
|
|
10
|
-
*
|
|
11
|
-
* @param filePath - Path to resolve
|
|
12
|
-
* @returns Real path or original path if resolution fails
|
|
13
|
-
*/
|
|
14
|
-
export declare function safeRealpathSync(filePath: string): string;
|
|
@@ -1,13 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export type DirectoryScanEntry
|
|
3
|
-
path: string;
|
|
4
|
-
realPath: string;
|
|
5
|
-
};
|
|
6
|
-
export type RuleScanCache = {
|
|
7
|
-
get: (key: string) => RuleFileCandidate[] | undefined;
|
|
8
|
-
set: (key: string, value: RuleFileCandidate[]) => void;
|
|
9
|
-
getDirScan: (dir: string) => DirectoryScanEntry[] | undefined;
|
|
10
|
-
setDirScan: (dir: string, entries: DirectoryScanEntry[]) => void;
|
|
11
|
-
clear: () => void;
|
|
12
|
-
};
|
|
13
|
-
export declare function createRuleScanCache(): RuleScanCache;
|
|
1
|
+
export { createRuleScanCache } from "@oh-my-opencode/rules-engine";
|
|
2
|
+
export type { DirectoryScanEntry, RuleScanCache } from "@oh-my-opencode/rules-engine";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
+
export interface TranscriptHydrationDeps {
|
|
3
|
+
readonly client: PluginInput["client"];
|
|
4
|
+
}
|
|
5
|
+
export interface TranscriptHydrationStore {
|
|
6
|
+
hydrateSession(sessionID: string): Promise<ReadonlySet<string>>;
|
|
7
|
+
getHydratedRelativePaths(sessionID: string): ReadonlySet<string>;
|
|
8
|
+
clearSession(sessionID: string): void;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Builds an in-memory store keyed by sessionID that lazily scans the session
|
|
12
|
+
* transcript for `[Rule: <relativePath>]` markers and exposes the set of
|
|
13
|
+
* already-injected rule relative paths. The store is consulted by the
|
|
14
|
+
* injector before emitting a rule so a process that lost its persisted cache
|
|
15
|
+
* file but whose model context still contains prior `[Rule: ...]` markers
|
|
16
|
+
* does not re-inject duplicates.
|
|
17
|
+
*/
|
|
18
|
+
export declare function createTranscriptHydrationStore(deps: TranscriptHydrationDeps): TranscriptHydrationStore;
|
|
@@ -1,54 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* Supports both Claude Code format (globs, paths) and GitHub Copilot format (applyTo)
|
|
4
|
-
* @see https://docs.anthropic.com/en/docs/claude-code/settings#rule-files
|
|
5
|
-
* @see https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot
|
|
6
|
-
*/
|
|
7
|
-
export interface RuleMetadata {
|
|
8
|
-
description?: string;
|
|
9
|
-
globs?: string | string[];
|
|
10
|
-
alwaysApply?: boolean;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Rule information with path context and content
|
|
14
|
-
*/
|
|
1
|
+
import type { RuleFileCandidate, RuleMetadata } from "@oh-my-opencode/rules-engine";
|
|
2
|
+
export type { RuleFileCandidate, RuleMetadata };
|
|
15
3
|
export interface RuleInfo {
|
|
16
|
-
/** Absolute path to the rule file */
|
|
17
4
|
path: string;
|
|
18
|
-
/** Path relative to project root */
|
|
19
5
|
relativePath: string;
|
|
20
|
-
/** Directory distance from target file (0 = same dir) */
|
|
21
6
|
distance: number;
|
|
22
|
-
/** Rule file content (without frontmatter) */
|
|
23
7
|
content: string;
|
|
24
|
-
/** SHA-256 hash of content for deduplication */
|
|
25
8
|
contentHash: string;
|
|
26
|
-
/** Parsed frontmatter metadata */
|
|
27
9
|
metadata: RuleMetadata;
|
|
28
|
-
/** Why this rule matched (e.g., "alwaysApply", "glob: *.ts", "path match") */
|
|
29
10
|
matchReason: string;
|
|
30
|
-
/** Real path after symlink resolution (for duplicate detection) */
|
|
31
11
|
realPath: string;
|
|
32
12
|
}
|
|
33
|
-
/**
|
|
34
|
-
* Rule file candidate with discovery context
|
|
35
|
-
*/
|
|
36
|
-
export interface RuleFileCandidate {
|
|
37
|
-
path: string;
|
|
38
|
-
realPath: string;
|
|
39
|
-
isGlobal: boolean;
|
|
40
|
-
distance: number;
|
|
41
|
-
/** Single-file rules (e.g., .github/copilot-instructions.md) always apply without frontmatter */
|
|
42
|
-
isSingleFile?: boolean;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Session storage for injected rules tracking
|
|
46
|
-
*/
|
|
47
13
|
export interface InjectedRulesData {
|
|
48
14
|
sessionID: string;
|
|
49
|
-
/** Content hashes of already injected rules */
|
|
50
15
|
injectedHashes: string[];
|
|
51
|
-
/** Real paths of already injected rules (for symlink deduplication) */
|
|
52
16
|
injectedRealPaths: string[];
|
|
53
17
|
updatedAt: number;
|
|
54
18
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const HOOK_NAME = "sisyphus-junior-notepad";
|
|
2
|
-
export declare const NOTEPAD_DIRECTIVE = "\n<Work_Context>\n## Notepad Location (for recording learnings)\nNOTEPAD PATH: .omo/notepads/{plan-name}/\n- learnings.md: Record patterns, conventions, successful approaches\n- issues.md: Record problems, blockers, gotchas encountered\n- decisions.md: Record architectural choices and rationales\n- problems.md: Record unresolved issues, technical debt\n\nYou SHOULD append findings to notepad files after completing work.\nIMPORTANT: Always APPEND to notepad files - never overwrite or use Edit tool.\n\n## Plan Location (READ ONLY)\nPLAN PATH: .omo/plans/{plan-name}.md\n\
|
|
2
|
+
export declare const NOTEPAD_DIRECTIVE = "\n<Work_Context>\n## Notepad Location (for recording learnings)\nNOTEPAD PATH: .omo/notepads/{plan-name}/\n- learnings.md: Record patterns, conventions, successful approaches\n- issues.md: Record problems, blockers, gotchas encountered\n- decisions.md: Record architectural choices and rationales\n- problems.md: Record unresolved issues, technical debt\n\nYou SHOULD append findings to notepad files after completing work.\nIMPORTANT: Always APPEND to notepad files - never overwrite or use Edit tool.\n\n## Plan Location (subagent: READ ONLY)\nPLAN PATH: .omo/plans/{plan-name}.md\n\nSUBAGENT PLAN RESTRICTION (applies to YOU, the delegated worker \u2014 NOT to the Orchestrator):\n- You may READ the plan to understand your assigned tasks\n- You may READ checkbox items to know what to work on\n- You MUST NOT edit the plan file or mark checkboxes \u2014 that is the Orchestrator's job\n- The Orchestrator (Atlas) updates checkboxes after verifying your completed work\n</Work_Context>\n";
|
|
@@ -6,5 +6,18 @@ type HookInput = {
|
|
|
6
6
|
};
|
|
7
7
|
};
|
|
8
8
|
export type HookImpl = (input: HookInput) => Promise<void>;
|
|
9
|
-
|
|
9
|
+
type TeamMemberErrorHandlerDeps = {
|
|
10
|
+
client?: {
|
|
11
|
+
session?: {
|
|
12
|
+
status?: () => Promise<unknown>;
|
|
13
|
+
messages?: (input: {
|
|
14
|
+
path: {
|
|
15
|
+
id: string;
|
|
16
|
+
};
|
|
17
|
+
}) => Promise<unknown>;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
settleMs?: number;
|
|
21
|
+
};
|
|
22
|
+
export declare function createTeamMemberErrorHandler(config: TeamModeConfig, deps?: TeamMemberErrorHandlerDeps): HookImpl;
|
|
10
23
|
export {};
|
|
@@ -13,27 +13,6 @@ type BabysitterContext = {
|
|
|
13
13
|
}) => Promise<{
|
|
14
14
|
data?: unknown;
|
|
15
15
|
} | unknown[]>;
|
|
16
|
-
prompt: (args: {
|
|
17
|
-
path: {
|
|
18
|
-
id: string;
|
|
19
|
-
};
|
|
20
|
-
body: {
|
|
21
|
-
parts: Array<{
|
|
22
|
-
type: "text";
|
|
23
|
-
text: string;
|
|
24
|
-
}>;
|
|
25
|
-
agent?: string;
|
|
26
|
-
variant?: string;
|
|
27
|
-
model?: {
|
|
28
|
-
providerID: string;
|
|
29
|
-
modelID: string;
|
|
30
|
-
};
|
|
31
|
-
tools?: Record<string, boolean>;
|
|
32
|
-
};
|
|
33
|
-
query?: {
|
|
34
|
-
directory?: string;
|
|
35
|
-
};
|
|
36
|
-
}) => Promise<unknown>;
|
|
37
16
|
promptAsync: (args: {
|
|
38
17
|
path: {
|
|
39
18
|
id: string;
|