opencode-matrixx 1.0.3 → 1.1.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 (117) hide show
  1. package/README.md +49 -7
  2. package/dist/agents/architect/default.d.ts +1 -1
  3. package/dist/agents/architect/gpt.d.ts +1 -1
  4. package/dist/agents/index.d.ts +1 -0
  5. package/dist/agents/mouse/agent.d.ts +1 -1
  6. package/dist/agents/oracle/behavioral-summary.d.ts +1 -1
  7. package/dist/agents/oracle/high-accuracy-mode.d.ts +1 -1
  8. package/dist/agents/oracle/identity-constraints.d.ts +1 -1
  9. package/dist/agents/oracle/interview-mode.d.ts +1 -1
  10. package/dist/agents/oracle/plan-generation.d.ts +1 -1
  11. package/dist/agents/oracle/plan-template.d.ts +1 -1
  12. package/dist/agents/oracle/system-prompt.d.ts +1 -1
  13. package/dist/agents/smith.d.ts +1 -1
  14. package/dist/agents/types.d.ts +1 -1
  15. package/dist/agents/zion.d.ts +7 -0
  16. package/dist/cli/index.js +706 -166
  17. package/dist/config/index.d.ts +2 -2
  18. package/dist/config/schema/agent-definitions.d.ts +4 -0
  19. package/dist/config/schema/agent-names.d.ts +7 -0
  20. package/dist/config/schema/categories.d.ts +2 -0
  21. package/dist/config/schema/hooks.d.ts +6 -0
  22. package/dist/config/schema/matrixx-config.d.ts +30 -0
  23. package/dist/config/schema/model-capabilities.d.ts +8 -0
  24. package/dist/config/schema/runtime-fallback.d.ts +10 -0
  25. package/dist/config/schema/tdd-enforcer.d.ts +5 -0
  26. package/dist/config/schema.d.ts +4 -0
  27. package/dist/create-hooks.d.ts +6 -0
  28. package/dist/features/builtin-commands/templates/handoff.d.ts +1 -1
  29. package/dist/features/builtin-commands/templates/pickup.d.ts +1 -1
  30. package/dist/features/builtin-commands/templates/start-work.d.ts +1 -1
  31. package/dist/features/builtin-skills/skills/crypto-market-analysis.d.ts +4 -0
  32. package/dist/features/builtin-skills/skills/crypto-onchain.d.ts +4 -0
  33. package/dist/features/builtin-skills/skills/crypto-trading.d.ts +4 -0
  34. package/dist/features/builtin-skills/skills/index.d.ts +5 -0
  35. package/dist/features/builtin-skills/skills/review-work.d.ts +4 -0
  36. package/dist/features/builtin-skills/skills/tdd-enforcer.d.ts +4 -0
  37. package/dist/features/mission-state/constants.d.ts +4 -4
  38. package/dist/features/mission-state/storage.d.ts +1 -1
  39. package/dist/features/run-continuation-state/constants.d.ts +1 -0
  40. package/dist/features/run-continuation-state/index.d.ts +3 -0
  41. package/dist/features/run-continuation-state/storage.d.ts +6 -0
  42. package/dist/features/run-continuation-state/types.d.ts +12 -0
  43. package/dist/features/team-mode/index.d.ts +2 -0
  44. package/dist/features/team-mode/team-layout-tmux/index.d.ts +1 -0
  45. package/dist/features/team-mode/team-layout-tmux/layout.d.ts +15 -0
  46. package/dist/features/team-mode/team-worktree/cleanup.d.ts +3 -0
  47. package/dist/features/team-mode/team-worktree/index.d.ts +2 -0
  48. package/dist/features/team-mode/team-worktree/manager.d.ts +15 -0
  49. package/dist/features/team-mode/types.d.ts +210 -0
  50. package/dist/hooks/handoff-injector/constants.d.ts +2 -2
  51. package/dist/hooks/hashline-edit-diff-enhancer/hook.d.ts +28 -0
  52. package/dist/hooks/hashline-edit-diff-enhancer/index.d.ts +1 -0
  53. package/dist/hooks/index.d.ts +6 -0
  54. package/dist/hooks/keyword-detector/ultrawork/planner.d.ts +1 -1
  55. package/dist/hooks/matrix-loop/constants.d.ts +1 -1
  56. package/dist/hooks/mouse-notepad/constants.d.ts +1 -1
  57. package/dist/hooks/preemptive-compaction-degradation-monitor.d.ts +55 -0
  58. package/dist/hooks/preemptive-compaction-no-text-tail.d.ts +18 -0
  59. package/dist/hooks/preemptive-compaction-trigger.d.ts +13 -0
  60. package/dist/hooks/preemptive-compaction-types.d.ts +53 -0
  61. package/dist/hooks/preemptive-compaction.d.ts +5 -13
  62. package/dist/hooks/prometheus-md-only/constants.d.ts +1 -1
  63. package/dist/hooks/prometheus-md-only/path-policy.d.ts +3 -3
  64. package/dist/hooks/read-image-resizer/hook.d.ts +12 -0
  65. package/dist/hooks/read-image-resizer/image-dimensions.d.ts +2 -0
  66. package/dist/hooks/read-image-resizer/image-resizer.d.ts +5 -0
  67. package/dist/hooks/read-image-resizer/index.d.ts +1 -0
  68. package/dist/hooks/read-image-resizer/png-fallback-resizer.d.ts +2 -0
  69. package/dist/hooks/read-image-resizer/types.d.ts +14 -0
  70. package/dist/hooks/runtime-fallback/agent-resolver.d.ts +6 -0
  71. package/dist/hooks/runtime-fallback/auto-retry-signal.d.ts +4 -0
  72. package/dist/hooks/runtime-fallback/auto-retry.d.ts +10 -0
  73. package/dist/hooks/runtime-fallback/chat-message-handler.d.ts +20 -0
  74. package/dist/hooks/runtime-fallback/constants.d.ts +4 -0
  75. package/dist/hooks/runtime-fallback/error-classifier.d.ts +13 -0
  76. package/dist/hooks/runtime-fallback/event-handler.d.ts +8 -0
  77. package/dist/hooks/runtime-fallback/fallback-bootstrap-model.d.ts +10 -0
  78. package/dist/hooks/runtime-fallback/fallback-models.d.ts +2 -0
  79. package/dist/hooks/runtime-fallback/fallback-retry-dispatcher.d.ts +11 -0
  80. package/dist/hooks/runtime-fallback/fallback-state.d.ts +6 -0
  81. package/dist/hooks/runtime-fallback/hook.d.ts +2 -0
  82. package/dist/hooks/runtime-fallback/index.d.ts +3 -0
  83. package/dist/hooks/runtime-fallback/is-abort-error.d.ts +1 -0
  84. package/dist/hooks/runtime-fallback/last-user-retry-parts.d.ts +4 -0
  85. package/dist/hooks/runtime-fallback/message-update-handler.d.ts +4 -0
  86. package/dist/hooks/runtime-fallback/model-utils.d.ts +7 -0
  87. package/dist/hooks/runtime-fallback/retry-model-payload.d.ts +11 -0
  88. package/dist/hooks/runtime-fallback/retry-status-utils.d.ts +2 -0
  89. package/dist/hooks/runtime-fallback/session-category-registry.d.ts +6 -0
  90. package/dist/hooks/runtime-fallback/session-messages.d.ts +9 -0
  91. package/dist/hooks/runtime-fallback/session-status-handler.d.ts +3 -0
  92. package/dist/hooks/runtime-fallback/types.d.ts +113 -0
  93. package/dist/hooks/runtime-fallback/visible-assistant-response.d.ts +3 -0
  94. package/dist/hooks/shared/compaction-model-resolver.d.ts +5 -0
  95. package/dist/hooks/todo-description-override/description.d.ts +1 -0
  96. package/dist/hooks/todo-description-override/hook.d.ts +8 -0
  97. package/dist/hooks/todo-description-override/index.d.ts +1 -0
  98. package/dist/hooks/tool-pair-validator/hook.d.ts +28 -0
  99. package/dist/hooks/tool-pair-validator/index.d.ts +1 -0
  100. package/dist/hooks/webfetch-redirect-guard/constants.d.ts +6 -0
  101. package/dist/hooks/webfetch-redirect-guard/hook.d.ts +19 -0
  102. package/dist/hooks/webfetch-redirect-guard/index.d.ts +1 -0
  103. package/dist/hooks/webfetch-redirect-guard/redirect-resolution.d.ts +16 -0
  104. package/dist/index.js +5562 -792
  105. package/dist/plugin/hooks/create-core-hooks.d.ts +6 -0
  106. package/dist/plugin/hooks/create-session-hooks.d.ts +2 -1
  107. package/dist/plugin/hooks/create-tool-guard-hooks.d.ts +5 -1
  108. package/dist/plugin/hooks/create-transform-hooks.d.ts +2 -1
  109. package/dist/plugin/tool-definition.d.ts +9 -0
  110. package/dist/shared/context-limit-resolver.d.ts +5 -0
  111. package/dist/shared/session-model-state.d.ts +7 -0
  112. package/dist/shared/tmux/tmux-utils/spawn-process.d.ts +1 -0
  113. package/dist/tools/ast-grep/pattern-hints.d.ts +4 -0
  114. package/dist/tools/ast-grep/tool-descriptions.d.ts +3 -0
  115. package/dist/tools/delegate-task/constants.d.ts +2 -3
  116. package/dist/tools/delegate-task/prompt-builder.d.ts +1 -0
  117. package/package.json +10 -10
package/dist/cli/index.js CHANGED
@@ -6775,158 +6775,136 @@ var init_model_requirements = __esm(() => {
6775
6775
  morpheus: {
6776
6776
  fallbackChain: [
6777
6777
  { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
6778
- { providers: ["zai-coding-plan", "opencode"], model: "glm-5" },
6779
- { providers: ["opencode"], model: "big-pickle" }
6778
+ { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-6" }
6780
6779
  ],
6781
6780
  requiresAnyModel: true
6782
6781
  },
6783
6782
  keymaker: {
6784
6783
  fallbackChain: [
6785
- { providers: ["openai", "venice", "github-copilot", "opencode"], model: "gpt-5.3-codex", variant: "medium" },
6786
- { providers: ["github-copilot"], model: "gpt-5.2", variant: "medium" }
6787
- ],
6788
- requiresProvider: ["openai", "github-copilot", "venice", "opencode"]
6784
+ { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
6785
+ { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-6" }
6786
+ ]
6789
6787
  },
6790
6788
  merovingian: {
6791
6789
  fallbackChain: [
6792
- { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2", variant: "high" },
6793
- { providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro", variant: "high" },
6790
+ { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-6" },
6794
6791
  { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" }
6795
6792
  ]
6796
6793
  },
6797
6794
  operator: {
6798
6795
  fallbackChain: [
6799
- { providers: ["opencode"], model: "glm-4.7-free" },
6800
- { providers: ["opencode"], model: "minimax-m2.5-free" },
6796
+ { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-haiku-4-5" },
6801
6797
  { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-6" }
6802
6798
  ]
6803
6799
  },
6804
6800
  trinity: {
6805
6801
  fallbackChain: [
6806
- { providers: ["github-copilot"], model: "grok-code-fast-1" },
6807
- { providers: ["opencode"], model: "minimax-m2.5-free" },
6808
- { providers: ["anthropic", "opencode"], model: "claude-haiku-4-5" },
6809
- { providers: ["opencode"], model: "gpt-5-nano" }
6802
+ { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-haiku-4-5" },
6803
+ { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-6" }
6810
6804
  ]
6811
6805
  },
6812
6806
  construct: {
6813
6807
  fallbackChain: [
6814
- { providers: ["google", "github-copilot", "opencode"], model: "gemini-3-flash" },
6815
- { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2" },
6816
- { providers: ["zai-coding-plan"], model: "glm-4.6v" },
6817
- { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5-nano" }
6808
+ { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-6" },
6809
+ { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" }
6818
6810
  ]
6819
6811
  },
6820
6812
  oracle: {
6821
6813
  fallbackChain: [
6822
6814
  { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
6823
- { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.4", variant: "high" },
6824
- { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2", variant: "high" },
6825
- { providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro" }
6815
+ { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-6" }
6826
6816
  ]
6827
6817
  },
6828
6818
  seraph: {
6829
6819
  fallbackChain: [
6830
6820
  { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
6831
- { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2", variant: "high" },
6832
- { providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro", variant: "high" }
6821
+ { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-6" }
6833
6822
  ]
6834
6823
  },
6835
6824
  smith: {
6836
6825
  fallbackChain: [
6837
- { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2", variant: "medium" },
6838
- { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
6839
- { providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro", variant: "high" }
6826
+ { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-6" },
6827
+ { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" }
6840
6828
  ]
6841
6829
  },
6842
6830
  architect: {
6843
6831
  fallbackChain: [
6844
6832
  { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-6" },
6845
- { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2" }
6833
+ { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-haiku-4-5" }
6846
6834
  ]
6847
6835
  },
6848
6836
  cipher: {
6849
6837
  fallbackChain: [
6850
6838
  { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
6851
- { providers: ["google-vertex-anthropic"], model: "claude-opus-4-6@default", variant: "max" },
6852
- { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2", variant: "high" },
6853
- { providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro" }
6839
+ { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-6" }
6854
6840
  ]
6855
6841
  },
6856
6842
  niobe: {
6857
6843
  fallbackChain: [
6858
- { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
6859
- { providers: ["google-vertex-anthropic"], model: "claude-opus-4-6@default", variant: "max" },
6860
- { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2", variant: "high" },
6861
- { providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro" }
6844
+ { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-6" },
6845
+ { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" }
6862
6846
  ]
6863
6847
  },
6864
6848
  sentinel: {
6865
6849
  fallbackChain: [
6866
- { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
6867
- { providers: ["google-vertex-anthropic"], model: "claude-opus-4-6@default", variant: "max" },
6868
- { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2", variant: "high" },
6869
- { providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro" }
6850
+ { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-6" },
6851
+ { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" }
6852
+ ]
6853
+ },
6854
+ zion: {
6855
+ fallbackChain: [
6856
+ { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-6" },
6857
+ { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" }
6870
6858
  ]
6871
6859
  }
6872
6860
  };
6873
6861
  CATEGORY_MODEL_REQUIREMENTS = {
6874
6862
  construct: {
6875
6863
  fallbackChain: [
6876
- { providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro", variant: "high" },
6877
- { providers: ["zai-coding-plan", "opencode"], model: "glm-5" },
6864
+ { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-6" },
6878
6865
  { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" }
6879
6866
  ]
6880
6867
  },
6881
6868
  source: {
6882
6869
  fallbackChain: [
6883
- { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.3-codex", variant: "xhigh" },
6884
- { providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro", variant: "high" },
6885
- { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" }
6870
+ { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
6871
+ { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-6" }
6886
6872
  ]
6887
6873
  },
6888
6874
  "deep-jack": {
6889
6875
  fallbackChain: [
6890
- { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.3-codex", variant: "medium" },
6891
6876
  { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
6892
- { providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro", variant: "high" }
6893
- ],
6894
- requiresModel: "gpt-5.3-codex"
6877
+ { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-6" }
6878
+ ]
6895
6879
  },
6896
6880
  "matrix-bend": {
6897
6881
  fallbackChain: [
6898
- { providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro", variant: "high" },
6899
- { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
6900
- { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2" }
6901
- ],
6902
- requiresModel: "gemini-3.1-pro"
6882
+ { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-6" },
6883
+ { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" }
6884
+ ]
6903
6885
  },
6904
6886
  "bullet-time": {
6905
6887
  fallbackChain: [
6906
- { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.4-mini" },
6907
6888
  { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-haiku-4-5" },
6908
- { providers: ["google", "github-copilot", "opencode"], model: "gemini-3-flash" },
6909
- { providers: ["opencode"], model: "gpt-5-nano" }
6889
+ { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-6" }
6910
6890
  ]
6911
6891
  },
6912
6892
  "blue-pill": {
6913
6893
  fallbackChain: [
6914
6894
  { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-6" },
6915
- { providers: ["openai", "opencode"], model: "gpt-5.3-codex", variant: "medium" },
6916
- { providers: ["google", "github-copilot", "opencode"], model: "gemini-3-flash" }
6895
+ { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-haiku-4-5" }
6917
6896
  ]
6918
6897
  },
6919
6898
  "red-pill": {
6920
6899
  fallbackChain: [
6921
6900
  { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-6", variant: "max" },
6922
- { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2", variant: "high" },
6923
- { providers: ["google", "github-copilot", "opencode"], model: "gemini-3.1-pro" }
6901
+ { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-6" }
6924
6902
  ]
6925
6903
  },
6926
6904
  broadcast: {
6927
6905
  fallbackChain: [
6928
- { providers: ["google", "github-copilot", "opencode"], model: "gemini-3-flash" },
6929
- { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-6" }
6906
+ { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-6" },
6907
+ { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-haiku-4-5" }
6930
6908
  ]
6931
6909
  }
6932
6910
  };
@@ -8268,6 +8246,462 @@ var require_src = __commonJS((exports, module) => {
8268
8246
  module.exports = { cursor, scroll, erase, beep };
8269
8247
  });
8270
8248
 
8249
+ // node_modules/isexe/windows.js
8250
+ var require_windows = __commonJS((exports, module) => {
8251
+ module.exports = isexe;
8252
+ isexe.sync = sync;
8253
+ var fs4 = __require("fs");
8254
+ function checkPathExt(path4, options) {
8255
+ var pathext = options.pathExt !== undefined ? options.pathExt : process.env.PATHEXT;
8256
+ if (!pathext) {
8257
+ return true;
8258
+ }
8259
+ pathext = pathext.split(";");
8260
+ if (pathext.indexOf("") !== -1) {
8261
+ return true;
8262
+ }
8263
+ for (var i2 = 0;i2 < pathext.length; i2++) {
8264
+ var p2 = pathext[i2].toLowerCase();
8265
+ if (p2 && path4.substr(-p2.length).toLowerCase() === p2) {
8266
+ return true;
8267
+ }
8268
+ }
8269
+ return false;
8270
+ }
8271
+ function checkStat(stat, path4, options) {
8272
+ if (!stat.isSymbolicLink() && !stat.isFile()) {
8273
+ return false;
8274
+ }
8275
+ return checkPathExt(path4, options);
8276
+ }
8277
+ function isexe(path4, options, cb) {
8278
+ fs4.stat(path4, function(er, stat) {
8279
+ cb(er, er ? false : checkStat(stat, path4, options));
8280
+ });
8281
+ }
8282
+ function sync(path4, options) {
8283
+ return checkStat(fs4.statSync(path4), path4, options);
8284
+ }
8285
+ });
8286
+
8287
+ // node_modules/isexe/mode.js
8288
+ var require_mode = __commonJS((exports, module) => {
8289
+ module.exports = isexe;
8290
+ isexe.sync = sync;
8291
+ var fs4 = __require("fs");
8292
+ function isexe(path4, options, cb) {
8293
+ fs4.stat(path4, function(er, stat) {
8294
+ cb(er, er ? false : checkStat(stat, options));
8295
+ });
8296
+ }
8297
+ function sync(path4, options) {
8298
+ return checkStat(fs4.statSync(path4), options);
8299
+ }
8300
+ function checkStat(stat, options) {
8301
+ return stat.isFile() && checkMode(stat, options);
8302
+ }
8303
+ function checkMode(stat, options) {
8304
+ var mod = stat.mode;
8305
+ var uid = stat.uid;
8306
+ var gid = stat.gid;
8307
+ var myUid = options.uid !== undefined ? options.uid : process.getuid && process.getuid();
8308
+ var myGid = options.gid !== undefined ? options.gid : process.getgid && process.getgid();
8309
+ var u2 = parseInt("100", 8);
8310
+ var g2 = parseInt("010", 8);
8311
+ var o2 = parseInt("001", 8);
8312
+ var ug = u2 | g2;
8313
+ var ret = mod & o2 || mod & g2 && gid === myGid || mod & u2 && uid === myUid || mod & ug && myUid === 0;
8314
+ return ret;
8315
+ }
8316
+ });
8317
+
8318
+ // node_modules/isexe/index.js
8319
+ var require_isexe = __commonJS((exports, module) => {
8320
+ var fs4 = __require("fs");
8321
+ var core3;
8322
+ if (process.platform === "win32" || global.TESTING_WINDOWS) {
8323
+ core3 = require_windows();
8324
+ } else {
8325
+ core3 = require_mode();
8326
+ }
8327
+ module.exports = isexe;
8328
+ isexe.sync = sync;
8329
+ function isexe(path4, options, cb) {
8330
+ if (typeof options === "function") {
8331
+ cb = options;
8332
+ options = {};
8333
+ }
8334
+ if (!cb) {
8335
+ if (typeof Promise !== "function") {
8336
+ throw new TypeError("callback not provided");
8337
+ }
8338
+ return new Promise(function(resolve2, reject) {
8339
+ isexe(path4, options || {}, function(er, is) {
8340
+ if (er) {
8341
+ reject(er);
8342
+ } else {
8343
+ resolve2(is);
8344
+ }
8345
+ });
8346
+ });
8347
+ }
8348
+ core3(path4, options || {}, function(er, is) {
8349
+ if (er) {
8350
+ if (er.code === "EACCES" || options && options.ignoreErrors) {
8351
+ er = null;
8352
+ is = false;
8353
+ }
8354
+ }
8355
+ cb(er, is);
8356
+ });
8357
+ }
8358
+ function sync(path4, options) {
8359
+ try {
8360
+ return core3.sync(path4, options || {});
8361
+ } catch (er) {
8362
+ if (options && options.ignoreErrors || er.code === "EACCES") {
8363
+ return false;
8364
+ } else {
8365
+ throw er;
8366
+ }
8367
+ }
8368
+ }
8369
+ });
8370
+
8371
+ // node_modules/which/which.js
8372
+ var require_which = __commonJS((exports, module) => {
8373
+ var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
8374
+ var path4 = __require("path");
8375
+ var COLON = isWindows ? ";" : ":";
8376
+ var isexe = require_isexe();
8377
+ var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
8378
+ var getPathInfo = (cmd, opt) => {
8379
+ const colon = opt.colon || COLON;
8380
+ const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [""] : [
8381
+ ...isWindows ? [process.cwd()] : [],
8382
+ ...(opt.path || process.env.PATH || "").split(colon)
8383
+ ];
8384
+ const pathExtExe = isWindows ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
8385
+ const pathExt = isWindows ? pathExtExe.split(colon) : [""];
8386
+ if (isWindows) {
8387
+ if (cmd.indexOf(".") !== -1 && pathExt[0] !== "")
8388
+ pathExt.unshift("");
8389
+ }
8390
+ return {
8391
+ pathEnv,
8392
+ pathExt,
8393
+ pathExtExe
8394
+ };
8395
+ };
8396
+ var which = (cmd, opt, cb) => {
8397
+ if (typeof opt === "function") {
8398
+ cb = opt;
8399
+ opt = {};
8400
+ }
8401
+ if (!opt)
8402
+ opt = {};
8403
+ const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
8404
+ const found = [];
8405
+ const step = (i2) => new Promise((resolve2, reject) => {
8406
+ if (i2 === pathEnv.length)
8407
+ return opt.all && found.length ? resolve2(found) : reject(getNotFoundError(cmd));
8408
+ const ppRaw = pathEnv[i2];
8409
+ const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
8410
+ const pCmd = path4.join(pathPart, cmd);
8411
+ const p2 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
8412
+ resolve2(subStep(p2, i2, 0));
8413
+ });
8414
+ const subStep = (p2, i2, ii) => new Promise((resolve2, reject) => {
8415
+ if (ii === pathExt.length)
8416
+ return resolve2(step(i2 + 1));
8417
+ const ext = pathExt[ii];
8418
+ isexe(p2 + ext, { pathExt: pathExtExe }, (er, is) => {
8419
+ if (!er && is) {
8420
+ if (opt.all)
8421
+ found.push(p2 + ext);
8422
+ else
8423
+ return resolve2(p2 + ext);
8424
+ }
8425
+ return resolve2(subStep(p2, i2, ii + 1));
8426
+ });
8427
+ });
8428
+ return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
8429
+ };
8430
+ var whichSync = (cmd, opt) => {
8431
+ opt = opt || {};
8432
+ const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
8433
+ const found = [];
8434
+ for (let i2 = 0;i2 < pathEnv.length; i2++) {
8435
+ const ppRaw = pathEnv[i2];
8436
+ const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
8437
+ const pCmd = path4.join(pathPart, cmd);
8438
+ const p2 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
8439
+ for (let j2 = 0;j2 < pathExt.length; j2++) {
8440
+ const cur = p2 + pathExt[j2];
8441
+ try {
8442
+ const is = isexe.sync(cur, { pathExt: pathExtExe });
8443
+ if (is) {
8444
+ if (opt.all)
8445
+ found.push(cur);
8446
+ else
8447
+ return cur;
8448
+ }
8449
+ } catch (ex) {}
8450
+ }
8451
+ }
8452
+ if (opt.all && found.length)
8453
+ return found;
8454
+ if (opt.nothrow)
8455
+ return null;
8456
+ throw getNotFoundError(cmd);
8457
+ };
8458
+ module.exports = which;
8459
+ which.sync = whichSync;
8460
+ });
8461
+
8462
+ // node_modules/path-key/index.js
8463
+ var require_path_key = __commonJS((exports, module) => {
8464
+ var pathKey = (options = {}) => {
8465
+ const environment = options.env || process.env;
8466
+ const platform = options.platform || process.platform;
8467
+ if (platform !== "win32") {
8468
+ return "PATH";
8469
+ }
8470
+ return Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
8471
+ };
8472
+ module.exports = pathKey;
8473
+ module.exports.default = pathKey;
8474
+ });
8475
+
8476
+ // node_modules/cross-spawn/lib/util/resolveCommand.js
8477
+ var require_resolveCommand = __commonJS((exports, module) => {
8478
+ var path4 = __require("path");
8479
+ var which = require_which();
8480
+ var getPathKey = require_path_key();
8481
+ function resolveCommandAttempt(parsed, withoutPathExt) {
8482
+ const env = parsed.options.env || process.env;
8483
+ const cwd = process.cwd();
8484
+ const hasCustomCwd = parsed.options.cwd != null;
8485
+ const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined && !process.chdir.disabled;
8486
+ if (shouldSwitchCwd) {
8487
+ try {
8488
+ process.chdir(parsed.options.cwd);
8489
+ } catch (err) {}
8490
+ }
8491
+ let resolved;
8492
+ try {
8493
+ resolved = which.sync(parsed.command, {
8494
+ path: env[getPathKey({ env })],
8495
+ pathExt: withoutPathExt ? path4.delimiter : undefined
8496
+ });
8497
+ } catch (e2) {} finally {
8498
+ if (shouldSwitchCwd) {
8499
+ process.chdir(cwd);
8500
+ }
8501
+ }
8502
+ if (resolved) {
8503
+ resolved = path4.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
8504
+ }
8505
+ return resolved;
8506
+ }
8507
+ function resolveCommand(parsed) {
8508
+ return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
8509
+ }
8510
+ module.exports = resolveCommand;
8511
+ });
8512
+
8513
+ // node_modules/cross-spawn/lib/util/escape.js
8514
+ var require_escape = __commonJS((exports, module) => {
8515
+ var metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
8516
+ function escapeCommand(arg) {
8517
+ arg = arg.replace(metaCharsRegExp, "^$1");
8518
+ return arg;
8519
+ }
8520
+ function escapeArgument(arg, doubleEscapeMetaChars) {
8521
+ arg = `${arg}`;
8522
+ arg = arg.replace(/(?=(\\+?)?)\1"/g, "$1$1\\\"");
8523
+ arg = arg.replace(/(?=(\\+?)?)\1$/, "$1$1");
8524
+ arg = `"${arg}"`;
8525
+ arg = arg.replace(metaCharsRegExp, "^$1");
8526
+ if (doubleEscapeMetaChars) {
8527
+ arg = arg.replace(metaCharsRegExp, "^$1");
8528
+ }
8529
+ return arg;
8530
+ }
8531
+ exports.command = escapeCommand;
8532
+ exports.argument = escapeArgument;
8533
+ });
8534
+
8535
+ // node_modules/shebang-regex/index.js
8536
+ var require_shebang_regex = __commonJS((exports, module) => {
8537
+ module.exports = /^#!(.*)/;
8538
+ });
8539
+
8540
+ // node_modules/shebang-command/index.js
8541
+ var require_shebang_command = __commonJS((exports, module) => {
8542
+ var shebangRegex = require_shebang_regex();
8543
+ module.exports = (string4 = "") => {
8544
+ const match = string4.match(shebangRegex);
8545
+ if (!match) {
8546
+ return null;
8547
+ }
8548
+ const [path4, argument] = match[0].replace(/#! ?/, "").split(" ");
8549
+ const binary2 = path4.split("/").pop();
8550
+ if (binary2 === "env") {
8551
+ return argument;
8552
+ }
8553
+ return argument ? `${binary2} ${argument}` : binary2;
8554
+ };
8555
+ });
8556
+
8557
+ // node_modules/cross-spawn/lib/util/readShebang.js
8558
+ var require_readShebang = __commonJS((exports, module) => {
8559
+ var fs4 = __require("fs");
8560
+ var shebangCommand = require_shebang_command();
8561
+ function readShebang(command) {
8562
+ const size = 150;
8563
+ const buffer = Buffer.alloc(size);
8564
+ let fd;
8565
+ try {
8566
+ fd = fs4.openSync(command, "r");
8567
+ fs4.readSync(fd, buffer, 0, size, 0);
8568
+ fs4.closeSync(fd);
8569
+ } catch (e2) {}
8570
+ return shebangCommand(buffer.toString());
8571
+ }
8572
+ module.exports = readShebang;
8573
+ });
8574
+
8575
+ // node_modules/cross-spawn/lib/parse.js
8576
+ var require_parse = __commonJS((exports, module) => {
8577
+ var path4 = __require("path");
8578
+ var resolveCommand = require_resolveCommand();
8579
+ var escape = require_escape();
8580
+ var readShebang = require_readShebang();
8581
+ var isWin = process.platform === "win32";
8582
+ var isExecutableRegExp = /\.(?:com|exe)$/i;
8583
+ var isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
8584
+ function detectShebang(parsed) {
8585
+ parsed.file = resolveCommand(parsed);
8586
+ const shebang = parsed.file && readShebang(parsed.file);
8587
+ if (shebang) {
8588
+ parsed.args.unshift(parsed.file);
8589
+ parsed.command = shebang;
8590
+ return resolveCommand(parsed);
8591
+ }
8592
+ return parsed.file;
8593
+ }
8594
+ function parseNonShell(parsed) {
8595
+ if (!isWin) {
8596
+ return parsed;
8597
+ }
8598
+ const commandFile = detectShebang(parsed);
8599
+ const needsShell = !isExecutableRegExp.test(commandFile);
8600
+ if (parsed.options.forceShell || needsShell) {
8601
+ const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
8602
+ parsed.command = path4.normalize(parsed.command);
8603
+ parsed.command = escape.command(parsed.command);
8604
+ parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
8605
+ const shellCommand = [parsed.command].concat(parsed.args).join(" ");
8606
+ parsed.args = ["/d", "/s", "/c", `"${shellCommand}"`];
8607
+ parsed.command = process.env.comspec || "cmd.exe";
8608
+ parsed.options.windowsVerbatimArguments = true;
8609
+ }
8610
+ return parsed;
8611
+ }
8612
+ function parse7(command, args, options) {
8613
+ if (args && !Array.isArray(args)) {
8614
+ options = args;
8615
+ args = null;
8616
+ }
8617
+ args = args ? args.slice(0) : [];
8618
+ options = Object.assign({}, options);
8619
+ const parsed = {
8620
+ command,
8621
+ args,
8622
+ options,
8623
+ file: undefined,
8624
+ original: {
8625
+ command,
8626
+ args
8627
+ }
8628
+ };
8629
+ return options.shell ? parsed : parseNonShell(parsed);
8630
+ }
8631
+ module.exports = parse7;
8632
+ });
8633
+
8634
+ // node_modules/cross-spawn/lib/enoent.js
8635
+ var require_enoent = __commonJS((exports, module) => {
8636
+ var isWin = process.platform === "win32";
8637
+ function notFoundError(original, syscall) {
8638
+ return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {
8639
+ code: "ENOENT",
8640
+ errno: "ENOENT",
8641
+ syscall: `${syscall} ${original.command}`,
8642
+ path: original.command,
8643
+ spawnargs: original.args
8644
+ });
8645
+ }
8646
+ function hookChildProcess(cp, parsed) {
8647
+ if (!isWin) {
8648
+ return;
8649
+ }
8650
+ const originalEmit = cp.emit;
8651
+ cp.emit = function(name, arg1) {
8652
+ if (name === "exit") {
8653
+ const err = verifyENOENT(arg1, parsed);
8654
+ if (err) {
8655
+ return originalEmit.call(cp, "error", err);
8656
+ }
8657
+ }
8658
+ return originalEmit.apply(cp, arguments);
8659
+ };
8660
+ }
8661
+ function verifyENOENT(status, parsed) {
8662
+ if (isWin && status === 1 && !parsed.file) {
8663
+ return notFoundError(parsed.original, "spawn");
8664
+ }
8665
+ return null;
8666
+ }
8667
+ function verifyENOENTSync(status, parsed) {
8668
+ if (isWin && status === 1 && !parsed.file) {
8669
+ return notFoundError(parsed.original, "spawnSync");
8670
+ }
8671
+ return null;
8672
+ }
8673
+ module.exports = {
8674
+ hookChildProcess,
8675
+ verifyENOENT,
8676
+ verifyENOENTSync,
8677
+ notFoundError
8678
+ };
8679
+ });
8680
+
8681
+ // node_modules/cross-spawn/index.js
8682
+ var require_cross_spawn = __commonJS((exports, module) => {
8683
+ var cp = __require("child_process");
8684
+ var parse7 = require_parse();
8685
+ var enoent = require_enoent();
8686
+ function spawn(command, args, options) {
8687
+ const parsed = parse7(command, args, options);
8688
+ const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
8689
+ enoent.hookChildProcess(spawned, parsed);
8690
+ return spawned;
8691
+ }
8692
+ function spawnSync(command, args, options) {
8693
+ const parsed = parse7(command, args, options);
8694
+ const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
8695
+ result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
8696
+ return result;
8697
+ }
8698
+ module.exports = spawn;
8699
+ module.exports.spawn = spawn;
8700
+ module.exports.sync = spawnSync;
8701
+ module.exports._parse = parse7;
8702
+ module.exports._enoent = enoent;
8703
+ });
8704
+
8271
8705
  // src/hooks/auto-update-checker/constants.ts
8272
8706
  import * as path4 from "path";
8273
8707
  import * as os3 from "os";
@@ -9040,7 +9474,7 @@ var {
9040
9474
  // package.json
9041
9475
  var package_default = {
9042
9476
  name: "opencode-matrixx",
9043
- version: "1.0.3",
9477
+ version: "1.1.0",
9044
9478
  description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
9045
9479
  main: "dist/index.js",
9046
9480
  types: "dist/index.d.ts",
@@ -9109,8 +9543,8 @@ var package_default = {
9109
9543
  "@clack/prompts": "^0.11.0",
9110
9544
  "@code-yeongyu/comment-checker": "^0.6.1",
9111
9545
  "@modelcontextprotocol/sdk": "^1.25.1",
9112
- "@opencode-ai/plugin": "^1.1.19",
9113
- "@opencode-ai/sdk": "^1.1.19",
9546
+ "@opencode-ai/plugin": "1.3.15",
9547
+ "@opencode-ai/sdk": "1.3.15",
9114
9548
  commander: "^14.0.2",
9115
9549
  "detect-libc": "^2.0.0",
9116
9550
  "js-yaml": "^4.1.1",
@@ -9128,13 +9562,13 @@ var package_default = {
9128
9562
  typescript: "^5.7.3"
9129
9563
  },
9130
9564
  optionalDependencies: {
9131
- "opencode-matrixx-darwin-arm64": "1.0.3",
9132
- "opencode-matrixx-darwin-x64": "1.0.3",
9133
- "opencode-matrixx-linux-arm64": "1.0.3",
9134
- "opencode-matrixx-linux-arm64-musl": "1.0.3",
9135
- "opencode-matrixx-linux-x64": "1.0.3",
9136
- "opencode-matrixx-linux-x64-musl": "1.0.3",
9137
- "opencode-matrixx-windows-x64": "1.0.3"
9565
+ "opencode-matrixx-darwin-arm64": "1.1.0",
9566
+ "opencode-matrixx-darwin-x64": "1.1.0",
9567
+ "opencode-matrixx-linux-arm64": "1.1.0",
9568
+ "opencode-matrixx-linux-arm64-musl": "1.1.0",
9569
+ "opencode-matrixx-linux-x64": "1.1.0",
9570
+ "opencode-matrixx-linux-x64-musl": "1.1.0",
9571
+ "opencode-matrixx-windows-x64": "1.1.0"
9138
9572
  },
9139
9573
  trustedDependencies: [
9140
9574
  "@ast-grep/cli",
@@ -10517,92 +10951,86 @@ import * as path3 from "path";
10517
10951
 
10518
10952
  // src/config/profiles.ts
10519
10953
  var PROFILE_NAMES = ["budget", "economy", "balanced", "performance"];
10520
- var OPUS = "google-vertex-anthropic/claude-opus-4-6@default";
10521
- var SONNET = "google-vertex-anthropic/claude-sonnet-4-6@default";
10522
- var HAIKU = "google-vertex-anthropic/claude-haiku-4-5@20251001";
10523
- var GEMINI_PRO = "google-vertex/gemini-3.1-pro-preview";
10524
- var GEMINI_FLASH = "google-vertex/gemini-3-flash-preview";
10525
- var GEMINI_FAST = "google-vertex/gemini-2.5-flash";
10954
+ var OPUS = "anthropic/claude-opus-4-6";
10955
+ var SONNET = "anthropic/claude-sonnet-4-6";
10956
+ var HAIKU = "anthropic/claude-haiku-4-5";
10526
10957
  var PROFILES = {
10527
10958
  budget: {
10528
10959
  agents: {
10529
10960
  morpheus: { model: SONNET },
10530
- oracle: { model: GEMINI_PRO },
10531
- cipher: { model: GEMINI_PRO },
10532
- niobe: { model: GEMINI_PRO },
10533
- sentinel: { model: GEMINI_PRO },
10534
- seraph: { model: GEMINI_PRO },
10535
- merovingian: { model: GEMINI_PRO },
10536
- smith: { model: GEMINI_PRO },
10537
- architect: { model: GEMINI_FAST },
10538
- construct: { model: GEMINI_FAST },
10539
- trinity: { model: GEMINI_FAST },
10540
- operator: { model: GEMINI_FAST }
10541
- },
10542
- categories: {
10543
- source: { model: GEMINI_PRO },
10544
- "dsl-engineering": { model: GEMINI_PRO },
10545
- "deep-jack": { model: GEMINI_FAST },
10546
- "matrix-bend": { model: GEMINI_FAST },
10547
- construct: { model: GEMINI_FAST },
10548
- "red-pill": { model: GEMINI_FAST },
10549
- "blue-pill": { model: GEMINI_FAST },
10550
- broadcast: { model: GEMINI_FAST },
10551
- "bullet-time": { model: GEMINI_FAST }
10552
- }
10553
- },
10554
- economy: {
10555
- agents: {
10556
- morpheus: { model: HAIKU },
10557
10961
  oracle: { model: HAIKU },
10558
10962
  cipher: { model: HAIKU },
10559
10963
  niobe: { model: HAIKU },
10560
10964
  sentinel: { model: HAIKU },
10561
10965
  seraph: { model: HAIKU },
10562
- merovingian: { model: GEMINI_PRO },
10563
- smith: { model: GEMINI_PRO },
10564
- architect: { model: GEMINI_FLASH },
10565
- construct: { model: GEMINI_FLASH },
10566
- trinity: { model: GEMINI_FAST },
10567
- operator: { model: GEMINI_FAST }
10966
+ merovingian: { model: HAIKU },
10967
+ smith: { model: HAIKU },
10968
+ architect: { model: HAIKU },
10969
+ construct: { model: HAIKU },
10970
+ trinity: { model: HAIKU },
10971
+ operator: { model: HAIKU }
10568
10972
  },
10569
10973
  categories: {
10570
- source: { model: HAIKU },
10571
- "dsl-engineering": { model: HAIKU },
10572
- "deep-jack": { model: GEMINI_PRO },
10573
- "matrix-bend": { model: GEMINI_PRO },
10574
- construct: { model: GEMINI_PRO },
10575
- "red-pill": { model: GEMINI_PRO },
10974
+ source: { model: SONNET },
10975
+ "deep-jack": { model: HAIKU },
10976
+ "matrix-bend": { model: HAIKU },
10977
+ construct: { model: HAIKU },
10978
+ "red-pill": { model: SONNET },
10576
10979
  "blue-pill": { model: HAIKU },
10577
- broadcast: { model: GEMINI_FLASH },
10578
- "bullet-time": { model: GEMINI_FAST }
10980
+ broadcast: { model: HAIKU },
10981
+ "bullet-time": { model: HAIKU }
10579
10982
  }
10580
10983
  },
10581
- balanced: {
10984
+ economy: {
10582
10985
  agents: {
10583
- morpheus: { model: OPUS },
10986
+ morpheus: { model: SONNET },
10584
10987
  oracle: { model: SONNET },
10585
10988
  cipher: { model: SONNET },
10586
10989
  niobe: { model: SONNET },
10587
10990
  sentinel: { model: SONNET },
10588
10991
  seraph: { model: SONNET },
10589
- merovingian: { model: GEMINI_PRO },
10590
- smith: { model: GEMINI_PRO },
10591
- architect: { model: GEMINI_FLASH },
10592
- construct: { model: GEMINI_FLASH },
10593
- trinity: { model: GEMINI_FAST },
10594
- operator: { model: GEMINI_FAST }
10992
+ merovingian: { model: SONNET },
10993
+ smith: { model: SONNET },
10994
+ architect: { model: HAIKU },
10995
+ construct: { model: HAIKU },
10996
+ trinity: { model: HAIKU },
10997
+ operator: { model: HAIKU }
10595
10998
  },
10596
10999
  categories: {
10597
11000
  source: { model: SONNET },
10598
- "dsl-engineering": { model: SONNET },
10599
- "deep-jack": { model: GEMINI_PRO },
10600
- "matrix-bend": { model: GEMINI_PRO },
10601
- construct: { model: GEMINI_PRO },
10602
- "red-pill": { model: GEMINI_PRO },
11001
+ "deep-jack": { model: SONNET },
11002
+ "matrix-bend": { model: SONNET },
11003
+ construct: { model: SONNET },
11004
+ "red-pill": { model: SONNET },
10603
11005
  "blue-pill": { model: SONNET },
10604
- broadcast: { model: GEMINI_FLASH },
10605
- "bullet-time": { model: GEMINI_FAST }
11006
+ broadcast: { model: HAIKU },
11007
+ "bullet-time": { model: HAIKU }
11008
+ }
11009
+ },
11010
+ balanced: {
11011
+ agents: {
11012
+ morpheus: { model: OPUS },
11013
+ oracle: { model: SONNET },
11014
+ cipher: { model: SONNET },
11015
+ niobe: { model: SONNET },
11016
+ sentinel: { model: SONNET },
11017
+ seraph: { model: OPUS },
11018
+ merovingian: { model: SONNET },
11019
+ smith: { model: SONNET },
11020
+ architect: { model: SONNET },
11021
+ construct: { model: SONNET },
11022
+ trinity: { model: HAIKU },
11023
+ operator: { model: HAIKU }
11024
+ },
11025
+ categories: {
11026
+ source: { model: OPUS },
11027
+ "deep-jack": { model: SONNET },
11028
+ "matrix-bend": { model: SONNET },
11029
+ construct: { model: SONNET },
11030
+ "red-pill": { model: OPUS },
11031
+ "blue-pill": { model: SONNET },
11032
+ broadcast: { model: SONNET },
11033
+ "bullet-time": { model: HAIKU }
10606
11034
  }
10607
11035
  },
10608
11036
  performance: {
@@ -10612,24 +11040,23 @@ var PROFILES = {
10612
11040
  cipher: { model: OPUS },
10613
11041
  niobe: { model: OPUS },
10614
11042
  sentinel: { model: OPUS },
10615
- seraph: { model: SONNET },
10616
- merovingian: { model: GEMINI_PRO },
10617
- smith: { model: GEMINI_PRO },
10618
- architect: { model: GEMINI_FLASH },
10619
- construct: { model: GEMINI_FLASH },
10620
- trinity: { model: GEMINI_FAST },
10621
- operator: { model: GEMINI_FAST }
11043
+ seraph: { model: OPUS },
11044
+ merovingian: { model: SONNET },
11045
+ smith: { model: SONNET },
11046
+ architect: { model: SONNET },
11047
+ construct: { model: SONNET },
11048
+ trinity: { model: HAIKU },
11049
+ operator: { model: SONNET }
10622
11050
  },
10623
11051
  categories: {
10624
11052
  source: { model: OPUS },
10625
- "dsl-engineering": { model: OPUS },
10626
- "deep-jack": { model: GEMINI_PRO },
10627
- "matrix-bend": { model: GEMINI_PRO },
10628
- construct: { model: GEMINI_PRO },
10629
- "red-pill": { model: GEMINI_PRO },
11053
+ "deep-jack": { model: OPUS },
11054
+ "matrix-bend": { model: OPUS },
11055
+ construct: { model: OPUS },
11056
+ "red-pill": { model: OPUS },
10630
11057
  "blue-pill": { model: SONNET },
10631
- broadcast: { model: GEMINI_FLASH },
10632
- "bullet-time": { model: GEMINI_FAST }
11058
+ broadcast: { model: SONNET },
11059
+ "bullet-time": { model: HAIKU }
10633
11060
  }
10634
11061
  }
10635
11062
  };
@@ -22965,7 +23392,8 @@ var BuiltinAgentNameSchema = exports_external.enum([
22965
23392
  "architect",
22966
23393
  "cipher",
22967
23394
  "niobe",
22968
- "sentinel"
23395
+ "sentinel",
23396
+ "zion"
22969
23397
  ]);
22970
23398
  var BuiltinSkillNameSchema = exports_external.enum([
22971
23399
  "playwright",
@@ -23004,7 +23432,11 @@ var BuiltinSkillNameSchema = exports_external.enum([
23004
23432
  "security-api",
23005
23433
  "security-crypto",
23006
23434
  "security-infra",
23007
- "security-review"
23435
+ "security-review",
23436
+ "crypto-market-analysis",
23437
+ "crypto-trading",
23438
+ "crypto-onchain",
23439
+ "tdd-enforcer"
23008
23440
  ]);
23009
23441
  var OverridableAgentNameSchema = exports_external.enum([
23010
23442
  "build",
@@ -23023,7 +23455,8 @@ var OverridableAgentNameSchema = exports_external.enum([
23023
23455
  "architect",
23024
23456
  "cipher",
23025
23457
  "niobe",
23026
- "sentinel"
23458
+ "sentinel",
23459
+ "zion"
23027
23460
  ]);
23028
23461
  // src/config/schema/internal/permission.ts
23029
23462
  var PermissionValueSchema = exports_external.enum(["ask", "allow", "deny"]);
@@ -23135,7 +23568,8 @@ var CategoryConfigSchema = exports_external.object({
23135
23568
  tools: exports_external.record(exports_external.string(), exports_external.boolean()).optional(),
23136
23569
  prompt_append: exports_external.string().optional(),
23137
23570
  is_unstable_agent: exports_external.boolean().optional(),
23138
- disable: exports_external.boolean().optional()
23571
+ disable: exports_external.boolean().optional(),
23572
+ fallback_models: exports_external.union([exports_external.string(), exports_external.array(exports_external.string())]).optional()
23139
23573
  });
23140
23574
  var BuiltinCategoryNameSchema = exports_external.enum([
23141
23575
  "construct",
@@ -23220,6 +23654,10 @@ var GitMasterConfigSchema = exports_external.object({
23220
23654
  commit_footer: exports_external.union([exports_external.boolean(), exports_external.string()]).default(false),
23221
23655
  include_co_authored_by: exports_external.boolean().default(false)
23222
23656
  });
23657
+ // src/config/schema/tdd-enforcer.ts
23658
+ var TddEnforcerConfigSchema = exports_external.object({
23659
+ enabled: exports_external.boolean().default(false)
23660
+ });
23223
23661
  // src/config/schema/hooks.ts
23224
23662
  var HookNameSchema = exports_external.enum([
23225
23663
  "todo-continuation-enforcer",
@@ -23268,7 +23706,13 @@ var HookNameSchema = exports_external.enum([
23268
23706
  "secret-leak-guard",
23269
23707
  "env-file-write-guard",
23270
23708
  "json-error-recovery",
23271
- "bash-file-read-guard"
23709
+ "bash-file-read-guard",
23710
+ "todo-description-override",
23711
+ "runtime-fallback",
23712
+ "read-image-resizer",
23713
+ "webfetch-redirect-guard",
23714
+ "hashline-edit-diff-enhancer",
23715
+ "tool-pair-validator"
23272
23716
  ]);
23273
23717
  // src/config/schema/notification.ts
23274
23718
  var NotificationConfigSchema = exports_external.object({
@@ -23396,6 +23840,28 @@ var WebsearchConfigSchema = exports_external.object({
23396
23840
  provider: WebsearchProviderSchema.optional()
23397
23841
  });
23398
23842
 
23843
+ // src/config/schema/runtime-fallback.ts
23844
+ var RuntimeFallbackConfigSchema = exports_external.object({
23845
+ enabled: exports_external.boolean().optional().default(false),
23846
+ retry_on_errors: exports_external.array(exports_external.number()).optional().default([429, 500, 502, 503, 504]),
23847
+ max_fallback_attempts: exports_external.number().optional().default(3),
23848
+ cooldown_seconds: exports_external.number().optional().default(60),
23849
+ timeout_seconds: exports_external.number().optional().default(30),
23850
+ notify_on_fallback: exports_external.boolean().optional().default(true)
23851
+ });
23852
+
23853
+ // src/config/schema/agent-definitions.ts
23854
+ var AgentDefinitionPathSchema = exports_external.string().min(1);
23855
+ var AgentDefinitionsConfigSchema = exports_external.array(AgentDefinitionPathSchema).optional();
23856
+
23857
+ // src/config/schema/model-capabilities.ts
23858
+ var ModelCapabilitiesConfigSchema = exports_external.object({
23859
+ enabled: exports_external.boolean().optional(),
23860
+ auto_refresh_on_start: exports_external.boolean().optional(),
23861
+ refresh_timeout_ms: exports_external.number().int().positive().optional(),
23862
+ source_url: exports_external.string().url().optional()
23863
+ });
23864
+
23399
23865
  // src/config/schema/matrixx-config.ts
23400
23866
  var MatrixxConfigSchema = exports_external.object({
23401
23867
  $schema: exports_external.string().optional(),
@@ -23421,11 +23887,15 @@ var MatrixxConfigSchema = exports_external.object({
23421
23887
  notification: NotificationConfigSchema.optional(),
23422
23888
  babysitting: BabysittingConfigSchema.optional(),
23423
23889
  git_master: GitMasterConfigSchema.optional(),
23890
+ tdd_enforcer: TddEnforcerConfigSchema.optional(),
23424
23891
  browser_automation_engine: BrowserAutomationConfigSchema.optional(),
23425
23892
  websearch: WebsearchConfigSchema.optional(),
23426
23893
  tmux: TmuxConfigSchema.optional(),
23427
23894
  morpheus: MorpheusConfigSchema.optional(),
23428
23895
  security: SecurityConfigSchema.optional(),
23896
+ runtime_fallback: RuntimeFallbackConfigSchema.optional(),
23897
+ agent_definitions: AgentDefinitionsConfigSchema.optional(),
23898
+ model_capabilities: ModelCapabilitiesConfigSchema.optional(),
23429
23899
  _migrations: exports_external.array(exports_external.string()).optional()
23430
23900
  });
23431
23901
  // src/plugin-config.ts
@@ -24902,6 +25372,31 @@ class OpencodeClient extends _HeyApiClient {
24902
25372
  }
24903
25373
 
24904
25374
  // node_modules/@opencode-ai/sdk/dist/client.js
25375
+ function pick2(value, fallback) {
25376
+ if (!value)
25377
+ return;
25378
+ if (!fallback)
25379
+ return value;
25380
+ if (value === fallback)
25381
+ return fallback;
25382
+ if (value === encodeURIComponent(fallback))
25383
+ return fallback;
25384
+ return value;
25385
+ }
25386
+ function rewrite(request, directory) {
25387
+ if (request.method !== "GET" && request.method !== "HEAD")
25388
+ return request;
25389
+ const value = pick2(request.headers.get("x-opencode-directory"), directory);
25390
+ if (!value)
25391
+ return request;
25392
+ const url2 = new URL(request.url);
25393
+ if (!url2.searchParams.has("directory")) {
25394
+ url2.searchParams.set("directory", value);
25395
+ }
25396
+ const next = new Request(url2, request);
25397
+ next.headers.delete("x-opencode-directory");
25398
+ return next;
25399
+ }
24905
25400
  function createOpencodeClient(config2) {
24906
25401
  if (!config2?.fetch) {
24907
25402
  const customFetch = (req) => {
@@ -24916,14 +25411,50 @@ function createOpencodeClient(config2) {
24916
25411
  if (config2?.directory) {
24917
25412
  config2.headers = {
24918
25413
  ...config2.headers,
24919
- "x-opencode-directory": config2.directory
25414
+ "x-opencode-directory": encodeURIComponent(config2.directory)
24920
25415
  };
24921
25416
  }
24922
25417
  const client2 = createClient(config2);
25418
+ client2.interceptors.request.use((request) => rewrite(request, config2?.directory));
24923
25419
  return new OpencodeClient({ client: client2 });
24924
25420
  }
24925
25421
  // node_modules/@opencode-ai/sdk/dist/server.js
24926
- import { spawn } from "child_process";
25422
+ var import_cross_spawn = __toESM(require_cross_spawn(), 1);
25423
+
25424
+ // node_modules/@opencode-ai/sdk/dist/process.js
25425
+ import { spawnSync } from "child_process";
25426
+ function stop(proc) {
25427
+ if (proc.exitCode !== null || proc.signalCode !== null)
25428
+ return;
25429
+ if (process.platform === "win32" && proc.pid) {
25430
+ const out = spawnSync("taskkill", ["/pid", String(proc.pid), "/T", "/F"], { windowsHide: true });
25431
+ if (!out.error && out.status === 0)
25432
+ return;
25433
+ }
25434
+ proc.kill();
25435
+ }
25436
+ function bindAbort(proc, signal, onAbort) {
25437
+ if (!signal)
25438
+ return () => {};
25439
+ const abort = () => {
25440
+ clear();
25441
+ stop(proc);
25442
+ onAbort?.();
25443
+ };
25444
+ const clear = () => {
25445
+ signal.removeEventListener("abort", abort);
25446
+ proc.off("exit", clear);
25447
+ proc.off("error", clear);
25448
+ };
25449
+ signal.addEventListener("abort", abort, { once: true });
25450
+ proc.on("exit", clear);
25451
+ proc.on("error", clear);
25452
+ if (signal.aborted)
25453
+ abort();
25454
+ return clear;
25455
+ }
25456
+
25457
+ // node_modules/@opencode-ai/sdk/dist/server.js
24927
25458
  async function createOpencodeServer(options) {
24928
25459
  options = Object.assign({
24929
25460
  hostname: "127.0.0.1",
@@ -24933,19 +25464,24 @@ async function createOpencodeServer(options) {
24933
25464
  const args = [`serve`, `--hostname=${options.hostname}`, `--port=${options.port}`];
24934
25465
  if (options.config?.logLevel)
24935
25466
  args.push(`--log-level=${options.config.logLevel}`);
24936
- const proc = spawn(`opencode`, args, {
24937
- signal: options.signal,
25467
+ const proc = import_cross_spawn.default(`opencode`, args, {
24938
25468
  env: {
24939
25469
  ...process.env,
24940
25470
  OPENCODE_CONFIG_CONTENT: JSON.stringify(options.config ?? {})
24941
25471
  }
24942
25472
  });
25473
+ let clear = () => {};
24943
25474
  const url2 = await new Promise((resolve2, reject) => {
24944
25475
  const id = setTimeout(() => {
25476
+ clear();
25477
+ stop(proc);
24945
25478
  reject(new Error(`Timeout waiting for server to start after ${options.timeout}ms`));
24946
25479
  }, options.timeout);
24947
25480
  let output = "";
25481
+ let resolved = false;
24948
25482
  proc.stdout?.on("data", (chunk) => {
25483
+ if (resolved)
25484
+ return;
24949
25485
  output += chunk.toString();
24950
25486
  const lines = output.split(`
24951
25487
  `);
@@ -24953,9 +25489,14 @@ async function createOpencodeServer(options) {
24953
25489
  if (line.startsWith("opencode server listening")) {
24954
25490
  const match = line.match(/on\s+(https?:\/\/[^\s]+)/);
24955
25491
  if (!match) {
24956
- throw new Error(`Failed to parse server url from output: ${line}`);
25492
+ clear();
25493
+ stop(proc);
25494
+ clearTimeout(id);
25495
+ reject(new Error(`Failed to parse server url from output: ${line}`));
25496
+ return;
24957
25497
  }
24958
25498
  clearTimeout(id);
25499
+ resolved = true;
24959
25500
  resolve2(match[1]);
24960
25501
  return;
24961
25502
  }
@@ -24977,17 +25518,16 @@ Server output: ${output}`;
24977
25518
  clearTimeout(id);
24978
25519
  reject(error45);
24979
25520
  });
24980
- if (options.signal) {
24981
- options.signal.addEventListener("abort", () => {
24982
- clearTimeout(id);
24983
- reject(new Error("Aborted"));
24984
- });
24985
- }
25521
+ clear = bindAbort(proc, options.signal, () => {
25522
+ clearTimeout(id);
25523
+ reject(options.signal?.reason);
25524
+ });
24986
25525
  });
24987
25526
  return {
24988
25527
  url: url2,
24989
25528
  close() {
24990
- proc.kill();
25529
+ clear();
25530
+ stop(proc);
24991
25531
  }
24992
25532
  };
24993
25533
  }
@@ -27427,7 +27967,7 @@ async function findAvailablePort2(startPort = DEFAULT_PORT) {
27427
27967
  }
27428
27968
 
27429
27969
  // src/features/mcp-oauth/oauth-authorization-flow.ts
27430
- import { spawn as spawn2 } from "child_process";
27970
+ import { spawn } from "child_process";
27431
27971
  import { createHash, randomBytes } from "crypto";
27432
27972
  import { createServer } from "http";
27433
27973
  function generateCodeVerifier() {
@@ -27508,7 +28048,7 @@ function openBrowser(url2) {
27508
28048
  args = [url2];
27509
28049
  }
27510
28050
  try {
27511
- const child = spawn2(command, args, { stdio: "ignore", detached: true });
28051
+ const child = spawn(command, args, { stdio: "ignore", detached: true });
27512
28052
  child.on("error", () => {});
27513
28053
  child.unref();
27514
28054
  } catch {}