opencode-matrixx 2.4.0 → 2.6.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.
Files changed (186) hide show
  1. package/README.md +181 -8
  2. package/dist/agents/builtin-agents/available-skills.d.ts +2 -2
  3. package/dist/agents/builtin-agents.d.ts +2 -2
  4. package/dist/agents/construct.d.ts +3 -3
  5. package/dist/agents/dynamic-agent-prompt-builder.d.ts +3 -0
  6. package/dist/agents/index.d.ts +3 -3
  7. package/dist/agents/operator.d.ts +3 -3
  8. package/dist/agents/oracle/identity-constraints.d.ts +1 -1
  9. package/dist/agents/oracle/system-prompt.d.ts +2 -2
  10. package/dist/agents/trinity.d.ts +3 -3
  11. package/dist/cli/doctor/checks/auth.d.ts +2 -0
  12. package/dist/cli/doctor/checks/config.d.ts +2 -0
  13. package/dist/cli/doctor/checks/index.d.ts +10 -0
  14. package/dist/cli/doctor/checks/mcp.d.ts +2 -0
  15. package/dist/cli/doctor/checks/optional.d.ts +2 -0
  16. package/dist/cli/doctor/checks/plugin.d.ts +2 -0
  17. package/dist/cli/doctor/checks/runtime.d.ts +2 -0
  18. package/dist/cli/doctor/format.d.ts +3 -0
  19. package/dist/cli/doctor/index.d.ts +9 -0
  20. package/dist/cli/doctor/types.d.ts +24 -0
  21. package/dist/cli/index.d.ts +13 -0
  22. package/dist/cli/install/index.d.ts +12 -0
  23. package/dist/cli.js +927 -0
  24. package/dist/config/index.d.ts +1 -1
  25. package/dist/config/schema/dcp.d.ts +231 -2
  26. package/dist/config/schema/evolution.d.ts +89 -0
  27. package/dist/config/schema/headroom.d.ts +23 -0
  28. package/dist/config/schema/hooks.d.ts +7 -1
  29. package/dist/config/schema/matrixx-config.d.ts +134 -9
  30. package/dist/config/schema.d.ts +3 -3
  31. package/dist/create-hooks.d.ts +8 -3
  32. package/dist/create-managers.d.ts +0 -2
  33. package/dist/create-tools.d.ts +3 -3
  34. package/dist/features/background-agent/error-helpers.d.ts +0 -2
  35. package/dist/features/builtin-commands/templates/dcp-profile.d.ts +1 -1
  36. package/dist/features/builtin-commands/templates/evolution.d.ts +1 -0
  37. package/dist/features/builtin-commands/types.d.ts +1 -1
  38. package/dist/features/builtin-skills/types.d.ts +10 -1
  39. package/dist/features/command-loader/index.d.ts +1 -1
  40. package/dist/features/evolution/compressor/index.d.ts +5 -0
  41. package/dist/features/evolution/compressor/interface.d.ts +5 -0
  42. package/dist/features/evolution/compressor/llm.d.ts +12 -0
  43. package/dist/features/evolution/evaluator.d.ts +11 -0
  44. package/dist/features/evolution/index.d.ts +7 -0
  45. package/dist/features/evolution/pipeline.d.ts +7 -0
  46. package/dist/features/evolution/store.d.ts +22 -0
  47. package/dist/features/evolution/types.d.ts +51 -0
  48. package/dist/features/evolution/writer.d.ts +20 -0
  49. package/dist/features/task-storage/types.d.ts +2 -2
  50. package/dist/features/task-toast-manager/types.d.ts +2 -2
  51. package/dist/hooks/anthropic-context-window-limit-recovery/message-builder.d.ts +0 -1
  52. package/dist/hooks/anthropic-context-window-limit-recovery/tool-part-types.d.ts +2 -1
  53. package/dist/hooks/auto-slash-command/executor.d.ts +5 -2
  54. package/dist/hooks/auto-slash-command/hook.d.ts +4 -2
  55. package/dist/hooks/evolution-compressor/index.d.ts +15 -0
  56. package/dist/hooks/evolution-hitl/index.d.ts +12 -0
  57. package/dist/hooks/evolution-quality-gate/index.d.ts +6 -0
  58. package/dist/hooks/evolution-watcher/index.d.ts +21 -0
  59. package/dist/hooks/evolution-watcher/utils.d.ts +5 -0
  60. package/dist/hooks/index.d.ts +7 -1
  61. package/dist/hooks/keyword-detector/analyze/default.d.ts +1 -1
  62. package/dist/hooks/keyword-detector/constants.d.ts +1 -1
  63. package/dist/hooks/keyword-detector/search/default.d.ts +1 -1
  64. package/dist/hooks/keyword-detector/ultrawork/deepseek.d.ts +16 -0
  65. package/dist/hooks/keyword-detector/ultrawork/default.d.ts +5 -2
  66. package/dist/hooks/keyword-detector/ultrawork/gemini.d.ts +12 -0
  67. package/dist/hooks/keyword-detector/ultrawork/glm.d.ts +11 -0
  68. package/dist/hooks/keyword-detector/ultrawork/gpt5.2.d.ts +4 -7
  69. package/dist/hooks/keyword-detector/ultrawork/index.d.ts +12 -4
  70. package/dist/hooks/keyword-detector/ultrawork/mimo.d.ts +16 -0
  71. package/dist/hooks/keyword-detector/ultrawork/source-detector.d.ts +18 -6
  72. package/dist/hooks/matrix-loop/with-timeout.d.ts +1 -1
  73. package/dist/hooks/mcp-startup-notification/index.d.ts +9 -0
  74. package/dist/hooks/{prometheus-md-only → oracle-md-only}/constants.d.ts +2 -2
  75. package/dist/hooks/session-recovery/types.d.ts +2 -1
  76. package/dist/hooks/task-todo-mirror/constants.d.ts +3 -0
  77. package/dist/hooks/task-todo-mirror/hook.d.ts +43 -0
  78. package/dist/hooks/task-todo-mirror/index.d.ts +2 -0
  79. package/dist/hooks/think-mode/types.d.ts +3 -0
  80. package/dist/index.js +85417 -96112
  81. package/dist/matrixx.schema.json +5412 -0
  82. package/dist/mcp/index.d.ts +10 -1
  83. package/dist/mcp/mcp-startup-state.d.ts +4 -0
  84. package/dist/mcp/mcp-validator.d.ts +13 -0
  85. package/dist/plugin/hooks/create-continuation-hooks.d.ts +3 -1
  86. package/dist/plugin/hooks/create-core-hooks.d.ts +4 -1
  87. package/dist/plugin/hooks/create-session-hooks.d.ts +3 -2
  88. package/dist/plugin/hooks/create-skill-hooks.d.ts +2 -2
  89. package/dist/plugin/hooks/create-tool-guard-hooks.d.ts +3 -1
  90. package/dist/plugin/skill-context.d.ts +2 -2
  91. package/dist/plugin/tool-registry.d.ts +1 -1
  92. package/dist/plugin-handlers/agent-config-handler.d.ts +1 -0
  93. package/dist/plugin-handlers/index.d.ts +1 -1
  94. package/dist/plugin-handlers/plan-model-inheritance.d.ts +1 -1
  95. package/dist/shared/delay.d.ts +1 -0
  96. package/dist/shared/error-formatting.d.ts +1 -0
  97. package/dist/shared/format-bytes.d.ts +1 -0
  98. package/dist/shared/format-bytes.test.d.ts +1 -0
  99. package/dist/shared/index.d.ts +7 -9
  100. package/dist/shared/is-abort-error.test.d.ts +1 -0
  101. package/dist/shared/model-resolution-pipeline.d.ts +26 -1
  102. package/dist/shared/opencode-config-dir.d.ts +13 -2
  103. package/dist/shared/sentinels.d.ts +2 -0
  104. package/dist/shared/session-state.d.ts +15 -0
  105. package/dist/shared/status-types.d.ts +1 -0
  106. package/dist/shared/system-directive.d.ts +1 -1
  107. package/dist/shared/with-timeout.d.ts +1 -0
  108. package/dist/shared/with-timeout.test.d.ts +1 -0
  109. package/dist/tools/background-task/delay.d.ts +1 -1
  110. package/dist/tools/dcp-switch-profile/index.d.ts +1 -0
  111. package/dist/tools/dcp-switch-profile/tools.d.ts +8 -0
  112. package/dist/tools/delegate-agent/constants.d.ts +1 -1
  113. package/dist/tools/delegate-task/constants.d.ts +1 -1
  114. package/dist/tools/delegate-task/skill-resolver.d.ts +2 -2
  115. package/dist/tools/index.d.ts +2 -1
  116. package/dist/tools/pdf-extract-figures/index.d.ts +1 -0
  117. package/dist/tools/pdf-extract-figures/tools.d.ts +11 -0
  118. package/dist/tools/skill/types.d.ts +3 -7
  119. package/dist/tools/slashcommand/skill-command-converter.d.ts +2 -2
  120. package/dist/tools/slashcommand/types.d.ts +10 -3
  121. package/dist/tools/task/todo-sync.d.ts +1 -1
  122. package/dist/tools/task/types.d.ts +5 -5
  123. package/package.json +15 -4
  124. package/dist/config/schema/model-capabilities.d.ts +0 -8
  125. package/dist/features/agent-loader/index.d.ts +0 -2
  126. package/dist/features/agent-loader/loader.d.ts +0 -3
  127. package/dist/features/agent-loader/types.d.ts +0 -14
  128. package/dist/features/command-loader/loader.d.ts +0 -3
  129. package/dist/features/mcp-oauth/callback-server.d.ts +0 -11
  130. package/dist/features/mcp-oauth/dcr.d.ts +0 -28
  131. package/dist/features/mcp-oauth/discovery.d.ts +0 -8
  132. package/dist/features/mcp-oauth/oauth-authorization-flow.d.ts +0 -26
  133. package/dist/features/mcp-oauth/provider.d.ts +0 -29
  134. package/dist/features/mcp-oauth/step-up.d.ts +0 -9
  135. package/dist/features/mcp-oauth/storage.d.ts +0 -17
  136. package/dist/features/opencode-skill-loader/allowed-tools-parser.d.ts +0 -1
  137. package/dist/features/opencode-skill-loader/config-source-discovery.d.ts +0 -7
  138. package/dist/features/opencode-skill-loader/index.d.ts +0 -14
  139. package/dist/features/opencode-skill-loader/loaded-skill-from-path.d.ts +0 -9
  140. package/dist/features/opencode-skill-loader/loaded-skill-template-extractor.d.ts +0 -2
  141. package/dist/features/opencode-skill-loader/loader.d.ts +0 -17
  142. package/dist/features/opencode-skill-loader/merger/builtin-skill-converter.d.ts +0 -3
  143. package/dist/features/opencode-skill-loader/merger/config-skill-entry-loader.d.ts +0 -3
  144. package/dist/features/opencode-skill-loader/merger/scope-priority.d.ts +0 -2
  145. package/dist/features/opencode-skill-loader/merger/skill-definition-merger.d.ts +0 -3
  146. package/dist/features/opencode-skill-loader/merger/skills-config-normalizer.d.ts +0 -11
  147. package/dist/features/opencode-skill-loader/merger.d.ts +0 -8
  148. package/dist/features/opencode-skill-loader/skill-content.d.ts +0 -4
  149. package/dist/features/opencode-skill-loader/skill-deduplication.d.ts +0 -2
  150. package/dist/features/opencode-skill-loader/skill-definition-record.d.ts +0 -3
  151. package/dist/features/opencode-skill-loader/skill-directory-loader.d.ts +0 -8
  152. package/dist/features/opencode-skill-loader/skill-discovery.d.ts +0 -4
  153. package/dist/features/opencode-skill-loader/skill-mcp-config.d.ts +0 -3
  154. package/dist/features/opencode-skill-loader/skill-resolution-options.d.ts +0 -7
  155. package/dist/features/opencode-skill-loader/skill-template-resolver.d.ts +0 -11
  156. package/dist/features/opencode-skill-loader/types.d.ts +0 -34
  157. package/dist/features/skill-mcp-manager/cleanup.d.ts +0 -7
  158. package/dist/features/skill-mcp-manager/connection-type.d.ts +0 -6
  159. package/dist/features/skill-mcp-manager/connection.d.ts +0 -14
  160. package/dist/features/skill-mcp-manager/env-cleaner.d.ts +0 -2
  161. package/dist/features/skill-mcp-manager/env-expander.d.ts +0 -1
  162. package/dist/features/skill-mcp-manager/http-client.d.ts +0 -3
  163. package/dist/features/skill-mcp-manager/index.d.ts +0 -2
  164. package/dist/features/skill-mcp-manager/manager.d.ts +0 -20
  165. package/dist/features/skill-mcp-manager/oauth-handler.d.ts +0 -8
  166. package/dist/features/skill-mcp-manager/stdio-client.d.ts +0 -3
  167. package/dist/features/skill-mcp-manager/types.d.ts +0 -68
  168. package/dist/hooks/runtime-fallback/is-abort-error.d.ts +0 -1
  169. package/dist/shared/is-object.d.ts +0 -1
  170. package/dist/shared/model-resolution-types.d.ts +0 -27
  171. package/dist/shared/model-resolver.d.ts +0 -24
  172. package/dist/shared/opencode-config-dir-types.d.ts +0 -13
  173. package/dist/shared/session-model-state.d.ts +0 -6
  174. package/dist/shared/session-temperature-store.d.ts +0 -3
  175. package/dist/shared/session-tools-store.d.ts +0 -3
  176. package/dist/tools/skill-mcp/constants.d.ts +0 -1
  177. package/dist/tools/skill-mcp/index.d.ts +0 -3
  178. package/dist/tools/skill-mcp/tools.d.ts +0 -11
  179. package/dist/tools/skill-mcp/types.d.ts +0 -8
  180. /package/dist/hooks/{prometheus-md-only → oracle-md-only}/agent-matcher.d.ts +0 -0
  181. /package/dist/hooks/{prometheus-md-only → oracle-md-only}/agent-resolution.d.ts +0 -0
  182. /package/dist/hooks/{prometheus-md-only → oracle-md-only}/hook.d.ts +0 -0
  183. /package/dist/hooks/{prometheus-md-only → oracle-md-only}/index.d.ts +0 -0
  184. /package/dist/hooks/{prometheus-md-only → oracle-md-only}/path-policy.d.ts +0 -0
  185. /package/dist/plugin-handlers/{prometheus-agent-config-builder.d.ts → oracle-agent-config-builder.d.ts} +0 -0
  186. /package/dist/{hooks/architect → shared}/is-abort-error.d.ts +0 -0
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Ultrawork message optimized for GLM series models.
3
+ *
4
+ * Key characteristics:
5
+ * - Concise, focused instruction set (GLM models prefer precision over verbosity)
6
+ * - Output verbosity and scope constraints
7
+ * - Scenario contract, TDD workflow, manual QA
8
+ * - Goal registration and todo discipline
9
+ */
10
+ export declare const ULTRAWORK_GLM_MESSAGE = "<ultrawork-mode>\n\n**MANDATORY**: The FIRST time you respond after this mode activates in a conversation, you MUST say \"ULTRAWORK MODE ENABLED!\" to the user. Say it ONCE per conversation: if \"ULTRAWORK MODE ENABLED!\" already appears in an earlier turn, do NOT say it again.\n\n[CODE RED] Maximum precision required. Outcome first, scope tight, evidence mandatory.\n\n<output_verbosity_spec>\n- Default: 1-2 focused paragraphs.\n- Simple yes/no questions: 2 sentences or fewer.\n- Complex multi-file work: 1 overview paragraph plus up to 4 outcome-grouped sections.\n- Use lists only for distinct items, steps, scenarios, or options.\n- Do not restate the user's request unless it changes the interpretation.\n- Lead with the result, then the evidence, then any remaining blocker.\n</output_verbosity_spec>\n\n<scope_constraints>\n- Implement EXACTLY and ONLY what the user requested.\n- No bonus features, opportunistic refactors, style embellishments, or speculative cleanup.\n- A fix does not need surrounding cleanup unless the cleanup is required for the fix.\n- A one-shot operation does not need a helper, abstraction, flag, shim, or future-proofing.\n- Validate only at boundaries. Trust internal guarantees unless evidence proves otherwise.\n</scope_constraints>\n\n## CERTAINTY PROTOCOL\n\nBefore implementation, reach operational certainty:\n\n- Understand the user's actual deliverable and success criteria.\n- Read the relevant files and existing patterns before editing.\n- Know which files you will touch and why.\n- Know how you will prove the result on the real surface.\n- Resolve ambiguity through tools before asking the user.\n\n<uncertainty_handling>\n- If the request is underspecified, EXPLORE FIRST with tools.\n- If the missing information may exist in the repo, search or delegate exploration.\n- If multiple interpretations remain, state the simplest valid interpretation and proceed.\n- Ask the user only when the choice changes the deliverable and no tool can resolve it.\n- Never fabricate exact line numbers, files, APIs, results, or test status.\n</uncertainty_handling>\n\n## GLM CALIBRATION\n\nGLM models in this system are tuned for code generation. Use shallow deliberation for routine edits and deep deliberation for architecture decisions, bug chains, concurrency, and security-sensitive work.\n\n## NO EXCUSES. NO COMPROMISES.\n\nThe requested outcome is the contract.\n\n| Failure mode | Required response |\n|---|---|\n| Missing context | Explore with tools or delegate exploration. |\n| Unknown library behavior | Use operator/docs or inspect examples. |\n| Architecture uncertainty | Consult oracle after forming concrete options. |\n| Implementation obstacle | Try a different route and verify again. |\n| True user-only blocker | Ask one precise question and stop. |\n\nDeliver exactly what was asked. No subset. No demo. No partial completion.\n\n## DECISION FRAMEWORK: SELF VS DELEGATE\n\nUse the fastest path that increases certainty.\n\n| Work shape | Decision |\n|---|---|\n| Trivial, visible pattern, single file | Do it yourself. |\n| Moderate, one domain, clear local tests | Do it yourself. |\n| Broad codebase search | Delegate trinity in background, then keep working on non-overlapping tasks. |\n| External docs or API uncertainty | Delegate operator or query docs. |\n| Hard architecture/debugging after 2 attempts | Ask oracle with evidence and options. |\n| 5+ dependent steps or unclear sequencing | Use a plan agent before implementation. |\n\nDelegation is not a substitute for ownership. You remain responsible for synthesis, edits, and verification.\n\n## AVAILABLE RESOURCES\n\nSurvey applicable skills before working raw. Use only resources that fit the task.\n\n| Resource | Use when | Output needed |\n|---|---|---|\n| trinity agent | Repo patterns, ownership, hidden call sites | File paths, conventions, risks |\n| operator agent | Official docs, external examples, APIs | Current guidance with source names |\n| oracle agent | Conflicting evidence or hard design choice | Recommendation with tradeoffs |\n| plan agent | Large dependent work | Ordered waves and verification plan |\n| category + skill | Domain work exists | Specialized execution with criteria |\n\n<tool_usage_rules>\n- Use tools for user-specific facts, file contents, repo state, and verification.\n- Parallelize independent reads and searches.\n- When a delegated search is running, do not duplicate that same search yourself.\n- Continue only with non-overlapping work while background agents run.\n- After any edit, state what changed, where, and what verification follows.\n</tool_usage_rules>\n\n## EXECUTION PATTERN\n\n1. Re-read the user request and extract the exact deliverables.\n2. Load matching skills and project rules.\n3. Read relevant files before editing.\n4. Define binary success criteria and real-surface checks.\n5. Make the smallest change that satisfies the contract.\n6. Verify after each meaningful change, not only at the end.\n7. Re-read the original request before final response.\n\n<implementation_rules>\n- Match existing naming, imports, formatting, and error-handling conventions.\n- Prefer existing abstractions over new ones.\n- Create new files only when the request or architecture requires them.\n- Keep edits surgical and reversible.\n- Do not modify unrelated files.\n- Do not delete or weaken tests to pass verification.\n</implementation_rules>\n\n## VERIFICATION GUARANTEE\n\nNothing is done without evidence.\n\nFor each scenario, capture:\n- The automated check that proves the behavior.\n- The real-surface artifact that proves what the user would experience.\n- Clean diagnostics on changed source files.\n- Build/typecheck/test command output when applicable.\n\n## GOAL REGISTRATION\n\nWhen the `todowrite` tool exists, register the run's goal with it before implementation: the objective, the scenario contract, and one WHEN TO STOP line naming the observable end state. Record the same contract in your working notes and treat it as binding.\n\n## TODO DISCIPLINE\n\nTrack every multi-step task in a live todo list: one atomic item per action with its verification, exactly one item in progress, status updated the instant it changes, newly discovered work added immediately. Never batch completions.\n\n## SCENARIO CONTRACT\n\nBefore production changes, define scenarios covering:\n\n| Class | Required proof |\n|---|---|\n| Happy path | Requested behavior works on the real surface. |\n| Edge case | Boundary, empty, malformed, or concurrent condition behaves correctly. |\n| Adjacent regression | A nearby caller, route, command, or config path still works. |\n\nEach scenario needs a binary pass condition. \"Looks good\" is not a pass condition.\n\n## TDD WORKFLOW\n\nTDD is mandatory on production behavior changes.\n\n1. RED: write or identify a failing test that proves the needed behavior.\n2. GREEN: make the smallest change that flips the test to passing.\n3. SURFACE: exercise the real user path and capture the artifact.\n4. REFACTOR: improve structure only while tests stay green.\n5. REGRESSION: rerun the scenario list.\n\nExemptions: pure prompt text, formatting, comment-only edits, version bumps with no behavior delta, and rename-only moves. Justify every exemption in the final report.\n\n## COMMIT DISCIPLINE\n\nCommit one atomic commit per verified increment; never one end-of-run omnibus. Before composing each message, read `git log --oneline -20` and `git log -5 -- <touched paths>`, then match the observed subject shape, scope names, message language, body style, and commit size. Skip only when the user forbade commits this session.\n\n## MANUAL QA MANDATE\n\nTests are necessary and insufficient. Exercise the real surface.\n\n| Change type | Manual QA |\n|---|---|\n| CLI | Run the command and show stdout/stderr. |\n| API | Call the endpoint and show status/body. |\n| UI | Drive the page in a browser and capture a screenshot or trace. |\n| TUI | Render through the real terminal and screenshot it. |\n| Config | Load the config and verify the parsed shape. |\n| Prompt or mode | Verify the prompt loads or the registry resolves it. |\n| Build output | Run build and verify exit code 0. |\n\nIf QA starts a server, browser, port, temp dir, or background process, clean it up and record the cleanup.\n\n## REVIEWER GATE\n\nUse a high-rigor reviewer when the task touches 3+ files, changes security/performance/migration behavior, lasts 30+ minutes, or the user asks for strict review.\n\nA reviewer concern binds only when it cites a success criterion the evidence fails; other concerns are notes. Fix cited blockers, rerun the affected verification, and resubmit the delta at most twice; then surface remaining blockers to the user.\n\n## ZERO TOLERANCE FAILURES\n- No scope reduction.\n- No mock implementation when real implementation was requested.\n- No partial completion.\n- No unverified success claims.\n- No deleted, skipped, or weakened failing tests.\n- No fabricated evidence.\n- No final answer that hides failures.\n- No stopping while required work remains.\n\n## COMPLETION CRITERIA\n\nDone means all are true:\n1. The requested deliverable exists exactly where expected.\n2. Every touched file matches local patterns.\n3. Verification ran and produced evidence.\n4. No unrelated files changed.\n5. Remaining risks, if any, are explicit and evidence-based.\n\n</ultrawork-mode>\n\n---\n\n";
11
+ export declare function getGlmUltraworkMessage(): string;
@@ -1,15 +1,12 @@
1
1
  /**
2
2
  * Ultrawork message optimized for GPT 5.2 series models.
3
3
  *
4
- * Key characteristics (from GPT 5.2 Prompting Guide):
5
- * - "Stronger instruction adherence" - follows instructions more literally
6
- * - "Conservative grounding bias" - prefers correctness over speed
7
- * - "Parallelize independent reads to reduce latency" - official guidance
8
- *
9
- * Design principles:
4
+ * Key characteristics:
10
5
  * - Two-track parallel context gathering (Direct tools + Background agents)
11
6
  * - Fire background agents, then use direct tools while waiting
12
7
  * - Explicit complexity-based decision criteria
8
+ * - Durable notepad, goal registration, scenario contracts
9
+ * - TDD workflow, manual QA mandate, reviewer gate
13
10
  */
14
- export declare const ULTRAWORK_GPT_MESSAGE = "<ultrawork-mode>\n\n**MANDATORY**: You MUST say \"ULTRAWORK MODE ENABLED!\" to the user as your first response when this mode activates. This is non-negotiable.\n\n[CODE RED] Maximum precision required. Think deeply before acting.\n\n<output_verbosity_spec>\n- Default: 3-6 sentences or \u22645 bullets for typical answers\n- Simple yes/no questions: \u22642 sentences\n- Complex multi-file tasks: 1 short overview paragraph + \u22645 bullets (What, Where, Risks, Next, Open)\n- Avoid long narrative paragraphs; prefer compact bullets\n- Do not rephrase the user's request unless it changes semantics\n</output_verbosity_spec>\n\n<scope_constraints>\n- Implement EXACTLY and ONLY what the user requests\n- No extra features, no added components, no embellishments\n- If any instruction is ambiguous, choose the simplest valid interpretation\n- Do NOT expand the task beyond what was asked\n</scope_constraints>\n\n## CERTAINTY PROTOCOL\n\n**Before implementation, ensure you have:**\n- Full understanding of the user's actual intent\n- Explored the codebase to understand existing patterns\n- A clear work plan (mental or written)\n- Resolved any ambiguities through exploration (not questions)\n\n<uncertainty_handling>\n- If the question is ambiguous or underspecified:\n - EXPLORE FIRST using tools (grep, file reads, explore agents)\n - If still unclear, state your interpretation and proceed\n - Ask clarifying questions ONLY as last resort\n- Never fabricate exact figures, line numbers, or references when uncertain\n- Prefer \"Based on the provided context...\" over absolute claims when unsure\n</uncertainty_handling>\n\n## DECISION FRAMEWORK: Self vs Delegate\n\n**Evaluate each task against these criteria to decide:**\n\n| Complexity | Criteria | Decision |\n|------------|----------|----------|\n| **Trivial** | <10 lines, single file, obvious pattern | **DO IT YOURSELF** |\n| **Moderate** | Single domain, clear pattern, <100 lines | **DO IT YOURSELF** (faster than delegation overhead) |\n| **Complex** | Multi-file, unfamiliar domain, >100 lines, needs specialized expertise | **DELEGATE** to appropriate category+skills |\n| **Research** | Need broad codebase context or external docs | **DELEGATE** to explore/librarian (background, parallel) |\n\n**Decision Factors:**\n- Delegation overhead \u2248 10-15 seconds. If task takes less, do it yourself.\n- If you already have full context loaded, do it yourself.\n- If task requires specialized expertise (frontend-ui-ux, git operations), delegate.\n- If you need information from multiple sources, fire parallel background agents.\n\n## AVAILABLE RESOURCES\n\nUse these when they provide clear value based on the decision framework above:\n\n| Resource | When to Use | How to Use |\n|----------|-------------|------------|\n| explore agent | Need codebase patterns you don't have | `task(subagent_type=\"trinity\", load_skills=[], run_in_background=true, ...)` |\n| librarian agent | External library docs, OSS examples | `task(subagent_type=\"operator\", load_skills=[], run_in_background=true, ...)` |\n| oracle agent | Stuck on architecture/debugging after 2+ attempts | `task(subagent_type=\"oracle\", load_skills=[], ...)` |\n| plan agent | Complex multi-step with dependencies (5+ steps) | `task(subagent_type=\"plan\", load_skills=[], ...)` |\n| task category | Specialized work matching a category | `task(category=\"...\", load_skills=[...])` |\n\n<tool_usage_rules>\n- Prefer tools over internal knowledge for fresh or user-specific data\n- Parallelize independent reads (read_file, grep, explore, librarian) to reduce latency\n- After any write/update, briefly restate: What changed, Where (path), Follow-up needed\n</tool_usage_rules>\n\n## EXECUTION PATTERN\n\n**Context gathering uses TWO parallel tracks:**\n\n| Track | Tools | Speed | Purpose |\n|-------|-------|-------|---------|\n| **Direct** | Grep, Read, LSP, AST-grep | Instant | Quick wins, known locations |\n| **Background** | explore, librarian agents | Async | Deep search, external docs |\n\n**ALWAYS run both tracks in parallel:**\n```\n// Fire background agents for deep exploration\ntask(subagent_type=\"trinity\", load_skills=[], prompt=\"I'm implementing [TASK] and need to understand [KNOWLEDGE GAP]. Find [X] patterns in the codebase \u2014 file paths, implementation approach, conventions used, and how modules connect. I'll use this to [DOWNSTREAM DECISION]. Focus on production code in src/. Return file paths with brief descriptions.\", run_in_background=true)\ntask(subagent_type=\"operator\", load_skills=[], prompt=\"I'm working with [TECHNOLOGY] and need [SPECIFIC INFO]. Find official docs and production examples for [Y] \u2014 API reference, configuration, recommended patterns, and pitfalls. Skip tutorials. I'll use this to [DECISION THIS INFORMS].\", run_in_background=true)\n\n// WHILE THEY RUN - use direct tools for immediate context\ngrep(pattern=\"relevant_pattern\", path=\"src/\")\nread_file(filePath=\"known/important/file.ts\")\n\n// Collect background results when ready\ndeep_context = background_output(task_id=...)\n\n// Merge ALL findings for comprehensive understanding\n```\n\n**Plan agent (complex tasks only):**\n- Only if 5+ interdependent steps\n- Invoke AFTER gathering context from both tracks\n\n**Execute:**\n- Surgical, minimal changes matching existing patterns\n- If delegating: provide exhaustive context and success criteria\n\n**Verify:**\n- `lsp_diagnostics` on modified files\n- Run tests if available\n\n## QUALITY STANDARDS\n\n| Phase | Action | Required Evidence |\n|-------|--------|-------------------|\n| Build | Run build command | Exit code 0 |\n| Test | Execute test suite | All tests pass |\n| Lint | Run lsp_diagnostics | Zero new errors |\n\n## MANDATORY: ACCEPTANCE CRITERIA DEFINITION (NON-NEGOTIABLE)\n\n**BEFORE writing ANY code, output an Acceptance Criteria block.**\n\n<acceptance_criteria_spec>\n- Implementation without defined acceptance criteria = REJECTED\n- Each criterion: binary PASS/FAIL, verifiable via command or observable behavior\n- Minimum 3 criteria for non-trivial tasks\n- Must cover: functional correctness, no regressions, code quality\n- Include exact verification commands to run during QA\n</acceptance_criteria_spec>\n\n**Required format:**\n```\n## Acceptance Criteria\n1. [CRITERION]: [Binary pass/fail condition]\n2. [CRITERION]: [Binary pass/fail condition]\n### Verification Commands:\n- [command] \u2192 [expected output]\n```\n\n## MANDATORY: QA EXECUTION (NON-NEGOTIABLE)\n\n**AFTER implementation, execute ALL verification commands from Acceptance Criteria.**\n\n<qa_protocol>\n- Run every verification command \u2014 do not assume \"it should work\"\n- Report each criterion: \u2705 PASS or \u274C FAIL with evidence\n- If ANY fails: fix, then re-run ALL commands\n- Do not report completion until ALL criteria pass\n</qa_protocol>\n\n**Required output:**\n```\n## QA Report\n| # | Criterion | Result | Evidence |\n|---|-----------|--------|----------|\n| 1 | [criterion] | \u2705 PASS | [observed] |\n\n**Overall: [X/Y PASS]** \u2014 [ACCEPTED/NEEDS FIX]\n```\n\n**NO EVIDENCE = NOT VERIFIED = NOT DONE.**\n\n## COMPLETION CRITERIA\n\nA task is complete when:\n1. Acceptance Criteria defined before implementation\n2. Requested functionality is fully implemented (not partial, not simplified)\n3. lsp_diagnostics shows zero errors on modified files\n4. Tests pass (or pre-existing failures documented)\n5. QA Report output with all criteria passing\n6. Code matches existing codebase patterns\n\n**Deliver exactly what was asked. No more, no less.**\n\n</ultrawork-mode>\n\n---\n\n";
11
+ export declare const ULTRAWORK_GPT_MESSAGE: string;
15
12
  export declare function getGptUltraworkMessage(): string;
@@ -2,15 +2,23 @@
2
2
  * Ultrawork message module - routes to appropriate message based on agent/model.
3
3
  *
4
4
  * Routing:
5
- * 1. Planner agents (prometheus, plan) → planner.ts
6
- * 2. GPT 5.2 models → gpt5.2.ts
7
- * 3. Default (Claude, etc.) → default.ts (optimized for Claude series)
5
+ * 1. Planner agents (oracle, plan) → planner.ts
6
+ * 2. DeepSeek models → deepseek.ts
7
+ * 3. Mimo models → mimo.ts
8
+ * 4. GPT models → gpt5.2.ts
9
+ * 5. Gemini models → gemini.ts
10
+ * 6. GLM models → glm.ts
11
+ * 7. Default (Claude, etc.) → default.ts
8
12
  */
13
+ export { getDeepseekUltraworkMessage, ULTRAWORK_DEEPSEEK_MESSAGE } from "./deepseek";
9
14
  export { getDefaultUltraworkMessage, ULTRAWORK_DEFAULT_MESSAGE } from "./default";
15
+ export { getGeminiUltraworkMessage, ULTRAWORK_GEMINI_MESSAGE } from "./gemini";
16
+ export { getGlmUltraworkMessage, ULTRAWORK_GLM_MESSAGE } from "./glm";
10
17
  export { getGptUltraworkMessage, ULTRAWORK_GPT_MESSAGE } from "./gpt5.2";
18
+ export { getMimoUltraworkMessage, ULTRAWORK_MIMO_MESSAGE } from "./mimo";
11
19
  export { getPlannerUltraworkMessage, ULTRAWORK_PLANNER_SECTION } from "./planner";
12
20
  export type { UltraworkSource } from "./source-detector";
13
- export { getUltraworkSource, isGptModel, isPlannerAgent } from "./source-detector";
21
+ export { getUltraworkSource, isDeepseekModel, isGeminiModel, isGlmModel, isGptModel, isMimoModel, isNonOmoAgent, isPlannerAgent } from "./source-detector";
14
22
  /**
15
23
  * Gets the appropriate ultrawork message based on agent and model context.
16
24
  */
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Ultrawork message optimized for Xiaomi MiMo-V2.5 models.
3
+ *
4
+ * Key characteristics (from MiMo-V2.5 research):
5
+ * - Lightweight, cost-efficient — concise prompts reduce token waste
6
+ * - 1M token context — structure matters, task after long content
7
+ * - Responds best to labeled sections (Task:, Context:, Constraints:)
8
+ * - Good at following explicit, compact instructions
9
+ * - Native <think> tags for reasoning — preserve across multi-turn
10
+ * - Temperature 0.1-0.3 for deterministic coding/agentic tasks
11
+ * - Token-efficient: 40-60% fewer tokens than Claude on same trajectories
12
+ * - Strong agentic capability with RL + MOPD post-training
13
+ * - Built-in content moderation
14
+ */
15
+ export declare const ULTRAWORK_MIMO_MESSAGE = "<ultrawork-mode>\n\n**MANDATORY**: You MUST say \"ULTRAWORK MODE ENABLED!\" to the user as your first response when this mode activates.\n\n<think>\nSet mission, constraints, and the stop condition. Plan before acting.\n</think>\n\nMission: Deliver EXACTLY what the user asked, end-to-end working, with captured evidence. Tests alone never prove done.\n\nTier: LIGHT (known pattern, 1-2 criteria) or HEAVY (new module/auth/concurrency, 3+ criteria with review). Default LIGHT. Upgrade when unsure.\n\n**MANDATORY CERTAINTY PROTOCOL**\n\nDo NOT start implementation until 100% certain.\n\n- Understand the actual intent, not the words\n- Explore the codebase for existing patterns\n- Have a clear work plan\n- Resolve ambiguity through exploration, not guessing\n\nWhen uncertain:\n1. Fire trinity (codebase search) + operator (external research) in parallel background\n2. Consult oracle for architecture/debugging after 2+ attempts\n3. Ask user only as last resort\n\nNot ready: making assumptions, unsure which files, plan has \"maybe\", can't explain steps.\n\n**NO EXCUSES. DELIVER WHAT WAS ASKED.**\n\n| Violation | Response |\n|-----------|----------|\n| \"I couldn't because...\" | Find a way or ask for help |\n| \"Simplified version...\" | Deliver full implementation |\n| \"You can extend this later...\" | Finish it NOW |\n| \"Due to limitations...\" | Use agents, tools, whatever it takes |\n| \"I made assumptions...\" | Should have asked FIRST |\n\nBlocker? Consult oracle (conventional) or matrix-bend (non-conventional). Never compromise.\n\n**Delegation Framework**\n\n| Task | Action |\n|------|--------|\n| Codebase exploration | task(subagent_type=\"trinity\", run_in_background=true) |\n| Documentation/research | task(subagent_type=\"operator\", run_in_background=true) |\n| Planning (2+ steps) | task(subagent_type=\"plan\") |\n| Hard problem | task(subagent_type=\"oracle\") |\n| Non-conventional | task(category=\"matrix-bend\") |\n| Implementation | task(category=\"...\", load_skills=[...]) |\n\nDo it yourself only when trivial (<10 lines) or you have full context loaded.\n\n**Verification Guarantee**\n\nGoal: Register with todowrite before implementation \u2014 objective, scenarios, stop condition.\n\nScenarios: 3+ binary pass/fail \u2014 happy path, edge, regression. Each with real-surface proof and test id.\n\n| Gate | Required |\n|------|----------|\n| RED | Failing assertion before production code |\n| GREEN | Same test passing |\n| Surface | CLI/curl/browser artifact |\n| Build | Exit code 0 |\n| Suite | All green, no skip/.only/xfail |\n| Lint | lsp_diagnostics clean |\n\nAcceptance Criteria: Define before code. Binary PASS/FAIL. Run ALL verification commands. Report results.\n\n**TDD Workflow**: RED \u2192 GREEN \u2192 SURFACE \u2192 REFACTOR \u2192 REGRESSION. Test-first is mandatory. Exception: formatting, comments, version bumps, renames.\n\n**Execution Rules**\n\n- TODO format: path \u2192 action for scenario \u2014 verify by check\n- One in_progress at a time. Mark completed IMMEDIATELY.\n- Parallel independent background agents. Never parallelise RED and GREEN of same scenario.\n- Re-read the request before final answer.\n\n**Output Discipline**\n\nFirst line: \"ULTRAWORK MODE ENABLED!\"\nDuring: surface state changes and evidence only.\nFinal: outcome + criteria checklist + evidence refs.\n\n**Stop Rules**\n\n- If user's problem is solved with evidence in hand, answer now.\n- STOP GOAL: all scenarios PASS, evidence captured, cleanup done.\n- After 2 failed attempts at one step, surface and ask.\n- After 2 exploration waves with no new facts, stop.\n\n</ultrawork-mode>\n\n---\n\n";
16
+ export declare function getMimoUltraworkMessage(): string;
@@ -2,19 +2,31 @@
2
2
  * Agent/model detection utilities for ultrawork message routing.
3
3
  *
4
4
  * Routing logic:
5
- * 1. Planner agents (prometheus, plan) → planner.ts
6
- * 2. GPT 5.2 models → gpt5.2.ts
7
- * 3. Everything else (Claude, etc.) → default.ts
5
+ * 1. Planner agents (oracle, plan) → planner.ts
6
+ * 2. DeepSeek models → deepseek.ts
7
+ * 3. Mimo models → mimo.ts
8
+ * 4. GPT models → gpt5.2.ts
9
+ * 5. Gemini models → gemini.ts
10
+ * 6. GLM models → glm.ts
11
+ * 7. Everything else (Claude, etc.) → default.ts
8
12
  */
9
- import { isGptModel } from "../../../agents/types";
13
+ import { isGptModel, isMimoModel } from "../../../agents/types";
10
14
  /**
11
15
  * Checks if agent is a planner-type agent.
12
16
  * Planners don't need ultrawork injection (they ARE the planner).
13
17
  */
14
18
  export declare function isPlannerAgent(agentName?: string): boolean;
15
- export { isGptModel };
19
+ /**
20
+ * Checks if agent is a non-Matrixx agent (e.g., OpenCode's built-in Builder/Plan).
21
+ * Non-Matrixx agents should not receive ultrawork injection.
22
+ */
23
+ export declare function isNonOmoAgent(agentName?: string): boolean;
24
+ export { isGptModel, isMimoModel };
25
+ export declare function isGeminiModel(model: string): boolean;
26
+ export declare function isGlmModel(model: string): boolean;
27
+ export declare function isDeepseekModel(model: string): boolean;
16
28
  /** Ultrawork message source type */
17
- export type UltraworkSource = "planner" | "gpt" | "default";
29
+ export type UltraworkSource = "planner" | "deepseek" | "mimo" | "gpt" | "gemini" | "glm" | "default";
18
30
  /**
19
31
  * Determines which ultrawork message source to use.
20
32
  */
@@ -1 +1 @@
1
- export declare function withTimeout<TData>(promise: Promise<TData>, timeoutMs: number): Promise<TData>;
1
+ export { withTimeout } from "../../shared/with-timeout";
@@ -0,0 +1,9 @@
1
+ import type { PluginInput } from "@opencode-ai/plugin";
2
+ export declare function createMcpStartupNotificationHook(ctx: PluginInput): {
3
+ event: ({ event }: {
4
+ event: {
5
+ type: string;
6
+ properties?: unknown;
7
+ };
8
+ }) => void;
9
+ };
@@ -1,6 +1,6 @@
1
- export declare const HOOK_NAME = "prometheus-md-only";
1
+ export declare const HOOK_NAME = "oracle-md-only";
2
2
  export declare const ORACLE_AGENT = "oracle";
3
3
  export declare const ALLOWED_EXTENSIONS: string[];
4
4
  export declare const BLOCKED_TOOLS: string[];
5
5
  export declare const PLANNING_CONSULT_WARNING: string;
6
- export declare const PROMETHEUS_WORKFLOW_REMINDER: string;
6
+ export declare const ORACLE_WORKFLOW_REMINDER: string;
@@ -1,3 +1,4 @@
1
+ import type { TaskStatus } from "../../shared/status-types";
1
2
  export interface StoredMessageMeta {
2
3
  id: string;
3
4
  sessionID: string;
@@ -26,7 +27,7 @@ export interface StoredToolPart {
26
27
  callID: string;
27
28
  tool: string;
28
29
  state: {
29
- status: "pending" | "running" | "completed" | "error";
30
+ status: TaskStatus;
30
31
  input: Record<string, unknown>;
31
32
  output?: string;
32
33
  error?: string;
@@ -0,0 +1,3 @@
1
+ export declare const HOOK_NAME = "task-todo-mirror";
2
+ export declare const TASK_TOOL_NAMES: Set<string>;
3
+ export declare const DEBOUNCE_MS = 300;
@@ -0,0 +1,43 @@
1
+ import type { PluginInput } from "@opencode-ai/plugin";
2
+ import type { MatrixxConfig } from "../../config/schema";
3
+ type TodoSyncCtx = PluginInput;
4
+ export declare function createTaskTodoMirrorHook(ctx: TodoSyncCtx, pluginConfig: MatrixxConfig): {
5
+ "tool.execute.after": (input: {
6
+ tool: string;
7
+ sessionID: string;
8
+ callID: string;
9
+ }, _output: {
10
+ title: string;
11
+ output: string;
12
+ metadata: Record<string, unknown>;
13
+ } | undefined) => Promise<void>;
14
+ "chat.message": (input: {
15
+ sessionID: string;
16
+ agent?: string;
17
+ model?: {
18
+ providerID: string;
19
+ modelID: string;
20
+ };
21
+ }, _output: {
22
+ message: Record<string, unknown>;
23
+ parts: Array<{
24
+ type: string;
25
+ text?: string;
26
+ }>;
27
+ }) => Promise<void>;
28
+ "experimental.chat.messages.transform": (_input: Record<string, never>, output: {
29
+ messages: Array<{
30
+ info: {
31
+ sessionID?: string;
32
+ };
33
+ }>;
34
+ }) => Promise<void>;
35
+ event: (input: {
36
+ event: {
37
+ type: string;
38
+ properties?: unknown;
39
+ };
40
+ }) => Promise<void>;
41
+ _syncForSession: (sessionID: string | undefined) => Promise<void>;
42
+ };
43
+ export {};
@@ -0,0 +1,2 @@
1
+ export { DEBOUNCE_MS, HOOK_NAME, TASK_TOOL_NAMES } from "./constants";
2
+ export { createTaskTodoMirrorHook } from "./hook";
@@ -11,6 +11,9 @@ interface ModelRef {
11
11
  }
12
12
  interface MessageWithModel {
13
13
  model?: ModelRef;
14
+ tool_choice?: unknown;
15
+ toolChoice?: unknown;
16
+ tools?: unknown[];
14
17
  }
15
18
  export interface ThinkModeInput {
16
19
  parts: Array<{