opencode-matrixx 2.6.2 → 2.6.4

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 (151) hide show
  1. package/README.md +0 -2
  2. package/dist/agents/dynamic-agent-prompt-builder.d.ts +5 -3
  3. package/dist/agents/mouse/agent.d.ts +1 -1
  4. package/dist/agents/oracle/behavioral-summary.d.ts +1 -1
  5. package/dist/agents/oracle/identity-constraints.d.ts +1 -1
  6. package/dist/agents/oracle/plan-generation.d.ts +1 -1
  7. package/dist/agents/oracle/plan-template.d.ts +1 -1
  8. package/dist/agents/oracle/system-prompt.d.ts +4 -3
  9. package/dist/agents/smith.d.ts +1 -1
  10. package/dist/agents/types.d.ts +1 -1
  11. package/dist/cli.js +138 -20
  12. package/dist/config/migrations/index.d.ts +1 -0
  13. package/dist/config/migrations/model-migration.d.ts +18 -0
  14. package/dist/config/resolve-tiers.d.ts +1 -1
  15. package/dist/config/schema/experimental.d.ts +2 -0
  16. package/dist/config/schema/failure-counter.d.ts +7 -0
  17. package/dist/config/schema/headroom.d.ts +1 -1
  18. package/dist/config/schema/hooks.d.ts +5 -8
  19. package/dist/config/schema/matrixx-config.d.ts +70 -9
  20. package/dist/config/schema/model-config.d.ts +81 -0
  21. package/dist/config/schema/morpheus.d.ts +4 -2
  22. package/dist/config/schema/security.d.ts +49 -0
  23. package/dist/config/schema.d.ts +2 -0
  24. package/dist/create-hooks.d.ts +3 -4
  25. package/dist/features/background-agent/manager.d.ts +8 -0
  26. package/dist/features/builtin-commands/templates/start-work.d.ts +1 -1
  27. package/dist/features/mission-state/plan-storage.d.ts +1 -0
  28. package/dist/features/mission-state/plan-storage.test.d.ts +1 -0
  29. package/dist/features/session-state/state.d.ts +26 -0
  30. package/dist/features/session-state/state.test.d.ts +1 -0
  31. package/dist/features/task-storage/types.d.ts +1 -0
  32. package/dist/hooks/context-mode-enforcer/constants.d.ts +1 -1
  33. package/dist/hooks/context-window-limit-recovery/index.d.ts +8 -0
  34. package/dist/hooks/context-window-limit-recovery/parser-patterns.d.ts +11 -0
  35. package/dist/hooks/context-window-limit-recovery/parser.d.ts +15 -0
  36. package/dist/hooks/{anthropic-context-window-limit-recovery → context-window-limit-recovery}/recovery-hook.d.ts +2 -0
  37. package/dist/hooks/context-window-limit-recovery/storage.d.ts +3 -0
  38. package/dist/hooks/{anthropic-context-window-limit-recovery/tool-result-storage-sdk.d.ts → context-window-limit-recovery/tool-result-store.d.ts} +10 -0
  39. package/dist/hooks/{anthropic-context-window-limit-recovery → context-window-limit-recovery}/types.d.ts +1 -1
  40. package/dist/hooks/context-window-monitor.d.ts +5 -1
  41. package/dist/hooks/failure-counter/counter.d.ts +7 -0
  42. package/dist/hooks/failure-counter/counter.test.d.ts +1 -0
  43. package/dist/hooks/failure-counter/hook.d.ts +18 -0
  44. package/dist/hooks/failure-counter/index.d.ts +3 -0
  45. package/dist/hooks/failure-counter/patterns.d.ts +6 -0
  46. package/dist/hooks/failure-counter/patterns.test.d.ts +1 -0
  47. package/dist/hooks/index.d.ts +3 -4
  48. package/dist/hooks/input-secret-guard/detection-rules.d.ts +10 -0
  49. package/dist/hooks/input-secret-guard/detector.d.ts +22 -0
  50. package/dist/hooks/input-secret-guard/detector.test.d.ts +1 -0
  51. package/dist/hooks/input-secret-guard/hook.d.ts +19 -0
  52. package/dist/hooks/input-secret-guard/hook.test.d.ts +1 -0
  53. package/dist/hooks/input-secret-guard/index.d.ts +1 -0
  54. package/dist/hooks/input-secret-guard/redactor.d.ts +2 -0
  55. package/dist/hooks/input-secret-guard/redactor.test.d.ts +1 -0
  56. package/dist/hooks/input-secret-guard/session-allow-cache.d.ts +6 -0
  57. package/dist/hooks/input-secret-guard/session-allow-cache.test.d.ts +1 -0
  58. package/dist/hooks/interactive-bash-session/hook.test.d.ts +1 -0
  59. package/dist/hooks/keyword-detector/analyze/default.d.ts +1 -1
  60. package/dist/hooks/keyword-detector/search/default.d.ts +1 -1
  61. package/dist/hooks/keyword-detector/ultrawork/deepseek.d.ts +1 -1
  62. package/dist/hooks/keyword-detector/ultrawork/default.d.ts +2 -9
  63. package/dist/hooks/keyword-detector/ultrawork/gemini.d.ts +1 -1
  64. package/dist/hooks/keyword-detector/ultrawork/glm.d.ts +1 -1
  65. package/dist/hooks/keyword-detector/ultrawork/mimo.d.ts +1 -1
  66. package/dist/hooks/preemptive-compaction-trigger.d.ts +1 -1
  67. package/dist/hooks/rules-injector/constants.d.ts +0 -1
  68. package/dist/hooks/rules-injector/parser.d.ts +0 -1
  69. package/dist/hooks/rules-injector/rule-file-finder.d.ts +2 -4
  70. package/dist/hooks/rules-injector/types.d.ts +2 -3
  71. package/dist/hooks/stop-continuation-guard/hook.d.ts +3 -2
  72. package/dist/hooks/stop-continuation-guard/repro.test.d.ts +1 -0
  73. package/dist/hooks/task-continuation-enforcer/awaiting-user.test.d.ts +1 -0
  74. package/dist/hooks/task-continuation-enforcer/constants.d.ts +1 -0
  75. package/dist/hooks/task-continuation-enforcer/continuation-injection.d.ts +2 -0
  76. package/dist/hooks/task-continuation-enforcer/countdown.d.ts +2 -0
  77. package/dist/hooks/task-continuation-enforcer/handler.d.ts +2 -0
  78. package/dist/hooks/task-continuation-enforcer/idle-event.d.ts +2 -0
  79. package/dist/hooks/task-continuation-enforcer/staleness.d.ts +16 -0
  80. package/dist/hooks/task-continuation-enforcer/staleness.test.d.ts +1 -0
  81. package/dist/hooks/task-continuation-enforcer/todo.d.ts +15 -0
  82. package/dist/hooks/task-continuation-enforcer/types.d.ts +6 -0
  83. package/dist/hooks/task-continuation-enforcer/ulw-bootstrap.test.d.ts +1 -0
  84. package/dist/hooks/task-edit-guard/constants.d.ts +2 -0
  85. package/dist/hooks/todo-continuation-enforcer/awaiting-user.test.d.ts +1 -0
  86. package/dist/hooks/todo-continuation-enforcer/types.d.ts +3 -0
  87. package/dist/index.js +36175 -35248
  88. package/dist/matrixx.schema.json +373 -73
  89. package/dist/plugin/hooks/create-core-hooks.d.ts +3 -4
  90. package/dist/plugin/hooks/create-session-hooks.d.ts +3 -4
  91. package/dist/plugin/hooks/create-tool-guard-hooks.d.ts +1 -2
  92. package/dist/plugin/hooks/create-transform-hooks.d.ts +2 -0
  93. package/dist/plugin-handlers/oracle-agent-config-builder.d.ts +2 -1
  94. package/dist/shared/awaiting-user.d.ts +12 -0
  95. package/dist/shared/context-limit-resolver.d.ts +1 -0
  96. package/dist/shared/context-limits.d.ts +36 -0
  97. package/dist/shared/index.d.ts +0 -1
  98. package/dist/shared/merge-categories.d.ts +12 -1
  99. package/dist/shared/migration/hook-names.d.ts +1 -0
  100. package/dist/shared/model-requirements.d.ts +9 -0
  101. package/dist/shared/model-sanitizer.d.ts +1 -1
  102. package/dist/shared/model-tiers.d.ts +28 -15
  103. package/dist/shared/tier-resolver.d.ts +9 -9
  104. package/dist/tools/delegate-task/categories.d.ts +12 -1
  105. package/dist/tools/delegate-task/complexity-constants.d.ts +15 -11
  106. package/dist/tools/delegate-task/executor-types.d.ts +4 -1
  107. package/dist/tools/delegate-task/index.d.ts +1 -1
  108. package/dist/tools/delegate-task/types.d.ts +4 -1
  109. package/dist/tools/index.d.ts +5 -0
  110. package/dist/tools/plan/constants.d.ts +10 -0
  111. package/dist/tools/plan/index.d.ts +6 -0
  112. package/dist/tools/plan/plan-create.d.ts +3 -0
  113. package/dist/tools/plan/plan-delete.d.ts +3 -0
  114. package/dist/tools/plan/plan-list.d.ts +3 -0
  115. package/dist/tools/plan/plan-read.d.ts +3 -0
  116. package/dist/tools/plan/plan-update.d.ts +3 -0
  117. package/dist/tools/plan/types.d.ts +28 -0
  118. package/dist/tools/task/constants.d.ts +5 -0
  119. package/dist/tools/task/types.d.ts +2 -0
  120. package/package.json +1 -1
  121. package/dist/hooks/anthropic-context-window-limit-recovery/empty-content-recovery-sdk.d.ts +0 -11
  122. package/dist/hooks/anthropic-context-window-limit-recovery/index.d.ts +0 -8
  123. package/dist/hooks/anthropic-context-window-limit-recovery/message-storage-directory.d.ts +0 -3
  124. package/dist/hooks/anthropic-context-window-limit-recovery/parser.d.ts +0 -2
  125. package/dist/hooks/anthropic-context-window-limit-recovery/storage-paths.d.ts +0 -3
  126. package/dist/hooks/anthropic-context-window-limit-recovery/storage.d.ts +0 -4
  127. package/dist/hooks/anthropic-context-window-limit-recovery/tool-result-storage.d.ts +0 -10
  128. package/dist/hooks/directory-readme-injector/constants.d.ts +0 -2
  129. package/dist/hooks/directory-readme-injector/finder.d.ts +0 -5
  130. package/dist/hooks/directory-readme-injector/hook.d.ts +0 -6
  131. package/dist/hooks/directory-readme-injector/index.d.ts +0 -1
  132. package/dist/hooks/directory-readme-injector/injector.d.ts +0 -16
  133. package/dist/hooks/directory-readme-injector/storage.d.ts +0 -1
  134. package/dist/hooks/mcp-startup-notification/index.d.ts +0 -9
  135. package/dist/hooks/question-label-truncator/hook.d.ts +0 -7
  136. package/dist/hooks/question-label-truncator/index.d.ts +0 -1
  137. package/dist/shared/migration/agent-category.d.ts +0 -19
  138. package/dist/shared/migration/agent-names.d.ts +0 -6
  139. package/dist/shared/migration/config-migration.d.ts +0 -1
  140. package/dist/shared/migration/model-versions.d.ts +0 -13
  141. package/dist/shared/migration.d.ts +0 -5
  142. /package/dist/hooks/{anthropic-context-window-limit-recovery → context-window-limit-recovery}/aggressive-truncation-strategy.d.ts +0 -0
  143. /package/dist/hooks/{anthropic-context-window-limit-recovery → context-window-limit-recovery}/client.d.ts +0 -0
  144. /package/dist/hooks/{anthropic-context-window-limit-recovery → context-window-limit-recovery}/empty-content-recovery.d.ts +0 -0
  145. /package/dist/hooks/{anthropic-context-window-limit-recovery → context-window-limit-recovery}/executor.d.ts +0 -0
  146. /package/dist/hooks/{anthropic-context-window-limit-recovery → context-window-limit-recovery}/message-builder.d.ts +0 -0
  147. /package/dist/hooks/{anthropic-context-window-limit-recovery → context-window-limit-recovery}/recovery-strategy.d.ts +0 -0
  148. /package/dist/hooks/{anthropic-context-window-limit-recovery → context-window-limit-recovery}/state.d.ts +0 -0
  149. /package/dist/hooks/{anthropic-context-window-limit-recovery → context-window-limit-recovery}/summarize-retry-strategy.d.ts +0 -0
  150. /package/dist/hooks/{anthropic-context-window-limit-recovery → context-window-limit-recovery}/target-token-truncation.d.ts +0 -0
  151. /package/dist/hooks/{anthropic-context-window-limit-recovery → context-window-limit-recovery}/tool-part-types.d.ts +0 -0
@@ -104,72 +104,74 @@
104
104
  "disabled_hooks": {
105
105
  "type": "array",
106
106
  "items": {
107
- "type": "string",
108
- "enum": [
109
- "task-continuation-enforcer",
110
- "todo-continuation-enforcer",
111
- "context-window-monitor",
112
- "session-recovery",
113
- "session-notification",
114
- "comment-checker",
115
- "grep-output-truncator",
116
- "tool-output-truncator",
117
- "question-label-truncator",
118
- "directory-agents-injector",
119
- "directory-readme-injector",
120
- "empty-task-response-detector",
121
- "think-mode",
122
- "anthropic-context-window-limit-recovery",
123
- "preemptive-compaction",
124
- "rules-injector",
125
- "background-notification",
126
- "auto-update-checker",
127
- "startup-toast",
128
- "keyword-detector",
129
- "agent-usage-reminder",
130
- "non-interactive-env",
131
- "interactive-bash-session",
132
- "thinking-block-validator",
133
- "matrix-loop",
134
- "category-skill-reminder",
135
- "compaction-context-injector",
136
- "compaction-todo-preserver",
137
- "auto-slash-command",
138
- "edit-error-recovery",
139
- "delegate-task-retry",
140
- "oracle-md-only",
141
- "plan-persister",
142
- "mouse-notepad",
143
- "start-work",
144
- "architect",
145
- "unstable-agent-babysitter",
146
- "task-resume-info",
147
- "stop-continuation-guard",
148
- "tasks-todowrite-disabler",
149
- "write-existing-file-guard",
150
- "anthropic-effort",
151
- "hashline-read-enhancer",
152
- "secret-leak-guard",
153
- "env-context-injector",
154
- "env-file-write-guard",
155
- "json-error-recovery",
156
- "bash-file-read-guard",
157
- "runtime-fallback",
158
- "read-image-resizer",
159
- "webfetch-redirect-guard",
160
- "hashline-edit-diff-enhancer",
161
- "tool-pair-validator",
162
- "quality-gate",
163
- "task-notepad",
164
- "design-intent-preserver",
165
- "rtk-bash-rewriter",
166
- "mcp-startup-notification",
167
- "evolution-watcher",
168
- "evolution-compressor",
169
- "evolution-quality-gate",
170
- "evolution-hitl",
171
- "context-mode-enforcer",
172
- "task-edit-guard"
107
+ "anyOf": [
108
+ {
109
+ "type": "string",
110
+ "enum": [
111
+ "task-continuation-enforcer",
112
+ "todo-continuation-enforcer",
113
+ "context-window-monitor",
114
+ "session-recovery",
115
+ "session-notification",
116
+ "comment-checker",
117
+ "tool-output-truncator",
118
+ "directory-agents-injector",
119
+ "empty-task-response-detector",
120
+ "think-mode",
121
+ "context-window-limit-recovery",
122
+ "preemptive-compaction",
123
+ "rules-injector",
124
+ "background-notification",
125
+ "auto-update-checker",
126
+ "startup-toast",
127
+ "keyword-detector",
128
+ "agent-usage-reminder",
129
+ "non-interactive-env",
130
+ "interactive-bash-session",
131
+ "thinking-block-validator",
132
+ "matrix-loop",
133
+ "category-skill-reminder",
134
+ "compaction-context-injector",
135
+ "compaction-todo-preserver",
136
+ "auto-slash-command",
137
+ "edit-error-recovery",
138
+ "delegate-task-retry",
139
+ "oracle-md-only",
140
+ "plan-persister",
141
+ "mouse-notepad",
142
+ "start-work",
143
+ "architect",
144
+ "unstable-agent-babysitter",
145
+ "task-resume-info",
146
+ "stop-continuation-guard",
147
+ "tasks-todowrite-disabler",
148
+ "write-existing-file-guard",
149
+ "anthropic-effort",
150
+ "hashline-read-enhancer",
151
+ "secret-leak-guard",
152
+ "input-secret-guard",
153
+ "env-context-injector",
154
+ "env-file-write-guard",
155
+ "json-error-recovery",
156
+ "bash-file-read-guard",
157
+ "runtime-fallback",
158
+ "read-image-resizer",
159
+ "webfetch-redirect-guard",
160
+ "hashline-edit-diff-enhancer",
161
+ "tool-pair-validator",
162
+ "quality-gate",
163
+ "task-notepad",
164
+ "design-intent-preserver",
165
+ "rtk-bash-rewriter",
166
+ "evolution-watcher",
167
+ "evolution-compressor",
168
+ "evolution-hitl",
169
+ "context-mode-enforcer",
170
+ "task-edit-guard",
171
+ "failure-counter"
172
+ ]
173
+ },
174
+ {}
173
175
  ]
174
176
  }
175
177
  },
@@ -4071,6 +4073,16 @@
4071
4073
  "type": "number",
4072
4074
  "minimum": 1000
4073
4075
  },
4076
+ "context_warning_threshold": {
4077
+ "type": "number",
4078
+ "minimum": 0.1,
4079
+ "maximum": 0.95
4080
+ },
4081
+ "preemptive_compaction_threshold": {
4082
+ "type": "number",
4083
+ "minimum": 0.1,
4084
+ "maximum": 0.95
4085
+ },
4074
4086
  "safe_hook_creation": {
4075
4087
  "type": "boolean"
4076
4088
  },
@@ -4711,6 +4723,31 @@
4711
4723
  ],
4712
4724
  "additionalProperties": false
4713
4725
  },
4726
+ "failure_counter": {
4727
+ "type": "object",
4728
+ "properties": {
4729
+ "enabled": {
4730
+ "default": true,
4731
+ "type": "boolean"
4732
+ },
4733
+ "threshold": {
4734
+ "default": 2,
4735
+ "type": "number",
4736
+ "minimum": 1,
4737
+ "maximum": 10
4738
+ },
4739
+ "resetOnSuccess": {
4740
+ "default": true,
4741
+ "type": "boolean"
4742
+ }
4743
+ },
4744
+ "required": [
4745
+ "enabled",
4746
+ "threshold",
4747
+ "resetOnSuccess"
4748
+ ],
4749
+ "additionalProperties": false
4750
+ },
4714
4751
  "background_task": {
4715
4752
  "type": "object",
4716
4753
  "properties": {
@@ -4896,10 +4933,6 @@
4896
4933
  "task_list_id": {
4897
4934
  "type": "string"
4898
4935
  },
4899
- "claude_code_compat": {
4900
- "default": false,
4901
- "type": "boolean"
4902
- },
4903
4936
  "scope": {
4904
4937
  "description": "Task storage scope: project → .matrixx/tasks per project (default), global → ~/.config/opencode/tasks/{listId}",
4905
4938
  "default": "project",
@@ -4908,11 +4941,19 @@
4908
4941
  "global",
4909
4942
  "project"
4910
4943
  ]
4944
+ },
4945
+ "stale_after_hours": {
4946
+ "description": "Pending tasks with no file activity for this many hours are considered stale (default: 24). Stale tasks are excluded from task-continuation directives.",
4947
+ "type": "integer",
4948
+ "minimum": 1,
4949
+ "maximum": 9007199254740991
4950
+ },
4951
+ "session_scoped": {
4952
+ "description": "When true, the task-continuation-enforcer only considers tasks created by the current session (or its subagent sessions). When false, all project tasks are considered regardless of session origin.",
4953
+ "default": true,
4954
+ "type": "boolean"
4911
4955
  }
4912
4956
  },
4913
- "required": [
4914
- "claude_code_compat"
4915
- ],
4916
4957
  "additionalProperties": false
4917
4958
  }
4918
4959
  },
@@ -5059,6 +5100,75 @@
5059
5100
  "on_package_change"
5060
5101
  ],
5061
5102
  "additionalProperties": false
5103
+ },
5104
+ "input_secret_guard": {
5105
+ "type": "object",
5106
+ "properties": {
5107
+ "enabled": {
5108
+ "default": true,
5109
+ "type": "boolean"
5110
+ },
5111
+ "mode": {
5112
+ "default": "prompt",
5113
+ "type": "string",
5114
+ "enum": [
5115
+ "prompt",
5116
+ "block",
5117
+ "off"
5118
+ ]
5119
+ },
5120
+ "blocklist_mode": {
5121
+ "default": "prompt",
5122
+ "type": "string",
5123
+ "enum": [
5124
+ "prompt",
5125
+ "block"
5126
+ ]
5127
+ },
5128
+ "warnlist_mode": {
5129
+ "default": "prompt",
5130
+ "type": "string",
5131
+ "enum": [
5132
+ "prompt",
5133
+ "off"
5134
+ ]
5135
+ },
5136
+ "allowlist_patterns": {
5137
+ "type": "array",
5138
+ "items": {
5139
+ "type": "string"
5140
+ }
5141
+ },
5142
+ "detection": {
5143
+ "type": "object",
5144
+ "properties": {
5145
+ "entropy_threshold": {
5146
+ "default": 4.5,
5147
+ "type": "number",
5148
+ "minimum": 0,
5149
+ "maximum": 8
5150
+ },
5151
+ "max_scan_bytes": {
5152
+ "default": 65536,
5153
+ "type": "integer",
5154
+ "minimum": 1024,
5155
+ "maximum": 262144
5156
+ }
5157
+ },
5158
+ "required": [
5159
+ "entropy_threshold",
5160
+ "max_scan_bytes"
5161
+ ],
5162
+ "additionalProperties": false
5163
+ }
5164
+ },
5165
+ "required": [
5166
+ "enabled",
5167
+ "mode",
5168
+ "blocklist_mode",
5169
+ "warnlist_mode"
5170
+ ],
5171
+ "additionalProperties": false
5062
5172
  }
5063
5173
  },
5064
5174
  "additionalProperties": false
@@ -5450,6 +5560,196 @@
5450
5560
  "items": {
5451
5561
  "type": "string"
5452
5562
  }
5563
+ },
5564
+ "tiers": {
5565
+ "type": "object",
5566
+ "propertyNames": {
5567
+ "type": "string"
5568
+ },
5569
+ "additionalProperties": {
5570
+ "type": "object",
5571
+ "properties": {
5572
+ "providerPriority": {
5573
+ "type": "array",
5574
+ "items": {
5575
+ "type": "string"
5576
+ }
5577
+ },
5578
+ "modelPattern": {
5579
+ "type": "string"
5580
+ },
5581
+ "fallbackTier": {
5582
+ "type": "string"
5583
+ },
5584
+ "fallback": {
5585
+ "type": "array",
5586
+ "items": {
5587
+ "type": "object",
5588
+ "properties": {
5589
+ "providers": {
5590
+ "type": "array",
5591
+ "items": {
5592
+ "type": "string",
5593
+ "minLength": 1
5594
+ }
5595
+ },
5596
+ "model": {
5597
+ "type": "string",
5598
+ "minLength": 1
5599
+ },
5600
+ "variant": {
5601
+ "type": "string"
5602
+ }
5603
+ },
5604
+ "required": [
5605
+ "providers",
5606
+ "model"
5607
+ ],
5608
+ "additionalProperties": false
5609
+ }
5610
+ }
5611
+ },
5612
+ "required": [
5613
+ "providerPriority",
5614
+ "modelPattern"
5615
+ ],
5616
+ "additionalProperties": false
5617
+ }
5618
+ },
5619
+ "modelRequirements": {
5620
+ "type": "object",
5621
+ "properties": {
5622
+ "agents": {
5623
+ "type": "object",
5624
+ "propertyNames": {
5625
+ "type": "string"
5626
+ },
5627
+ "additionalProperties": {
5628
+ "type": "object",
5629
+ "properties": {
5630
+ "fallbackChain": {
5631
+ "type": "array",
5632
+ "items": {
5633
+ "type": "object",
5634
+ "properties": {
5635
+ "providers": {
5636
+ "type": "array",
5637
+ "items": {
5638
+ "type": "string",
5639
+ "minLength": 1
5640
+ }
5641
+ },
5642
+ "model": {
5643
+ "type": "string",
5644
+ "minLength": 1
5645
+ },
5646
+ "variant": {
5647
+ "type": "string"
5648
+ }
5649
+ },
5650
+ "required": [
5651
+ "providers",
5652
+ "model"
5653
+ ],
5654
+ "additionalProperties": false
5655
+ }
5656
+ },
5657
+ "requiresModel": {
5658
+ "type": "string"
5659
+ },
5660
+ "requiresAnyModel": {
5661
+ "type": "boolean"
5662
+ },
5663
+ "requiresProvider": {
5664
+ "type": "array",
5665
+ "items": {
5666
+ "type": "string"
5667
+ }
5668
+ },
5669
+ "variant": {
5670
+ "type": "string"
5671
+ }
5672
+ },
5673
+ "required": [
5674
+ "fallbackChain"
5675
+ ],
5676
+ "additionalProperties": false
5677
+ }
5678
+ },
5679
+ "categories": {
5680
+ "type": "object",
5681
+ "propertyNames": {
5682
+ "type": "string"
5683
+ },
5684
+ "additionalProperties": {
5685
+ "type": "object",
5686
+ "properties": {
5687
+ "fallbackChain": {
5688
+ "type": "array",
5689
+ "items": {
5690
+ "type": "object",
5691
+ "properties": {
5692
+ "providers": {
5693
+ "type": "array",
5694
+ "items": {
5695
+ "type": "string",
5696
+ "minLength": 1
5697
+ }
5698
+ },
5699
+ "model": {
5700
+ "type": "string",
5701
+ "minLength": 1
5702
+ },
5703
+ "variant": {
5704
+ "type": "string"
5705
+ }
5706
+ },
5707
+ "required": [
5708
+ "providers",
5709
+ "model"
5710
+ ],
5711
+ "additionalProperties": false
5712
+ }
5713
+ },
5714
+ "requiresModel": {
5715
+ "type": "string"
5716
+ },
5717
+ "requiresAnyModel": {
5718
+ "type": "boolean"
5719
+ },
5720
+ "requiresProvider": {
5721
+ "type": "array",
5722
+ "items": {
5723
+ "type": "string"
5724
+ }
5725
+ },
5726
+ "variant": {
5727
+ "type": "string"
5728
+ }
5729
+ },
5730
+ "required": [
5731
+ "fallbackChain"
5732
+ ],
5733
+ "additionalProperties": false
5734
+ }
5735
+ }
5736
+ },
5737
+ "additionalProperties": false
5738
+ },
5739
+ "complexityDowngrades": {
5740
+ "type": "object",
5741
+ "propertyNames": {
5742
+ "type": "string"
5743
+ },
5744
+ "additionalProperties": {
5745
+ "type": "object",
5746
+ "propertyNames": {
5747
+ "type": "string"
5748
+ },
5749
+ "additionalProperties": {
5750
+ "type": "string"
5751
+ }
5752
+ }
5453
5753
  }
5454
5754
  },
5455
5755
  "additionalProperties": false
@@ -6,6 +6,7 @@ export declare function createCoreHooks(args: {
6
6
  isHookEnabled: (hookName: HookName) => boolean;
7
7
  safeHookEnabled: boolean;
8
8
  }): {
9
+ inputSecretGuard: ReturnType<typeof import("../../hooks").createInputSecretGuardHook> | null;
9
10
  keywordDetector: ReturnType<typeof import("../../hooks").createKeywordDetectorHook> | null;
10
11
  contextInjectorMessagesTransform: ReturnType<typeof import("../../features/context-injector").createContextInjectorMessagesTransformHook>;
11
12
  envContextInjector: ReturnType<typeof import("../../hooks").createEnvContextInjectorHook> | null;
@@ -15,7 +16,6 @@ export declare function createCoreHooks(args: {
15
16
  commentChecker: ReturnType<typeof import("../../hooks").createCommentCheckerHooks> | null;
16
17
  toolOutputTruncator: ReturnType<typeof import("../../hooks").createToolOutputTruncatorHook> | null;
17
18
  directoryAgentsInjector: ReturnType<typeof import("../../hooks").createDirectoryAgentsInjectorHook> | null;
18
- directoryReadmeInjector: ReturnType<typeof import("../../hooks").createDirectoryReadmeInjectorHook> | null;
19
19
  emptyTaskResponseDetector: ReturnType<typeof import("../../hooks").createEmptyTaskResponseDetectorHook> | null;
20
20
  rulesInjector: ReturnType<typeof import("../../hooks").createRulesInjectorHook> | null;
21
21
  tasksTodowriteDisabler: ReturnType<typeof import("../../hooks").createTasksTodowriteDisablerHook> | null;
@@ -38,7 +38,7 @@ export declare function createCoreHooks(args: {
38
38
  sessionRecovery: ReturnType<typeof import("../../hooks").createSessionRecoveryHook> | null;
39
39
  sessionNotification: ReturnType<typeof import("../../hooks").createSessionNotification> | null;
40
40
  thinkMode: ReturnType<typeof import("../../hooks").createThinkModeHook> | null;
41
- anthropicContextWindowLimitRecovery: ReturnType<typeof import("../../hooks").createAnthropicContextWindowLimitRecoveryHook> | null;
41
+ contextWindowLimitRecovery: ReturnType<typeof import("../../hooks").createContextWindowLimitRecoveryHook> | null;
42
42
  autoUpdateChecker: ReturnType<typeof import("../../hooks").createAutoUpdateCheckerHook> | null;
43
43
  agentUsageReminder: ReturnType<typeof import("../../hooks").createAgentUsageReminderHook> | null;
44
44
  nonInteractiveEnv: ReturnType<typeof import("../../hooks").createNonInteractiveEnvHook> | null;
@@ -46,13 +46,12 @@ export declare function createCoreHooks(args: {
46
46
  matrixLoop: ReturnType<typeof import("../../hooks").createMatrixLoopHook> | null;
47
47
  editErrorRecovery: ReturnType<typeof import("../../hooks").createEditErrorRecoveryHook> | null;
48
48
  delegateTaskRetry: ReturnType<typeof import("../../hooks").createDelegateTaskRetryHook> | null;
49
+ failureCounter: ReturnType<typeof import("../../hooks").createFailureCounterHook> | null;
49
50
  startWork: ReturnType<typeof import("../../hooks").createStartWorkHook> | null;
50
51
  oracleMdOnly: ReturnType<typeof import("../../hooks").createOracleMdOnlyHook> | null;
51
52
  mouseNotepad: ReturnType<typeof import("../../hooks").createMouseNotepadHook> | null;
52
- questionLabelTruncator: ReturnType<typeof import("../../hooks").createQuestionLabelTruncatorHook>;
53
53
  taskResumeInfo: ReturnType<typeof import("../../hooks").createTaskResumeInfoHook>;
54
54
  anthropicEffort: ReturnType<typeof import("../../hooks/anthropic-effort").createAnthropicEffortHook> | null;
55
55
  runtimeFallback: ReturnType<typeof import("../../hooks").createRuntimeFallbackHook> | null;
56
56
  rtkBashRewriter: ReturnType<typeof import("../../hooks").createRtkBashRewriterHook> | null;
57
- mcpStartupNotification: ReturnType<typeof import("../../hooks").createMcpStartupNotificationHook> | null;
58
57
  };
@@ -1,5 +1,5 @@
1
1
  import type { HookName, MatrixxConfig } from "../../config";
2
- import { createAgentUsageReminderHook, createAnthropicContextWindowLimitRecoveryHook, createAutoUpdateCheckerHook, createContextWindowMonitorHook, createDelegateTaskRetryHook, createEditErrorRecoveryHook, createInteractiveBashSessionHook, createMatrixLoopHook, createMcpStartupNotificationHook, createMouseNotepadHook, createNonInteractiveEnvHook, createOracleMdOnlyHook, createPreemptiveCompactionHook, createQuestionLabelTruncatorHook, createRtkBashRewriterHook, createRuntimeFallbackHook, createSessionNotification, createSessionRecoveryHook, createStartWorkHook, createTaskResumeInfoHook, createThinkModeHook } from "../../hooks";
2
+ import { createAgentUsageReminderHook, createAutoUpdateCheckerHook, createContextWindowLimitRecoveryHook, createContextWindowMonitorHook, createDelegateTaskRetryHook, createEditErrorRecoveryHook, createFailureCounterHook, createInteractiveBashSessionHook, createMatrixLoopHook, createMouseNotepadHook, createNonInteractiveEnvHook, createOracleMdOnlyHook, createPreemptiveCompactionHook, createRtkBashRewriterHook, createRuntimeFallbackHook, createSessionNotification, createSessionRecoveryHook, createStartWorkHook, createTaskResumeInfoHook, createThinkModeHook } from "../../hooks";
3
3
  import { createAnthropicEffortHook } from "../../hooks/anthropic-effort";
4
4
  import type { PluginContext } from "../types";
5
5
  export type SessionHooks = {
@@ -8,7 +8,7 @@ export type SessionHooks = {
8
8
  sessionRecovery: ReturnType<typeof createSessionRecoveryHook> | null;
9
9
  sessionNotification: ReturnType<typeof createSessionNotification> | null;
10
10
  thinkMode: ReturnType<typeof createThinkModeHook> | null;
11
- anthropicContextWindowLimitRecovery: ReturnType<typeof createAnthropicContextWindowLimitRecoveryHook> | null;
11
+ contextWindowLimitRecovery: ReturnType<typeof createContextWindowLimitRecoveryHook> | null;
12
12
  autoUpdateChecker: ReturnType<typeof createAutoUpdateCheckerHook> | null;
13
13
  agentUsageReminder: ReturnType<typeof createAgentUsageReminderHook> | null;
14
14
  nonInteractiveEnv: ReturnType<typeof createNonInteractiveEnvHook> | null;
@@ -16,15 +16,14 @@ export type SessionHooks = {
16
16
  matrixLoop: ReturnType<typeof createMatrixLoopHook> | null;
17
17
  editErrorRecovery: ReturnType<typeof createEditErrorRecoveryHook> | null;
18
18
  delegateTaskRetry: ReturnType<typeof createDelegateTaskRetryHook> | null;
19
+ failureCounter: ReturnType<typeof createFailureCounterHook> | null;
19
20
  startWork: ReturnType<typeof createStartWorkHook> | null;
20
21
  oracleMdOnly: ReturnType<typeof createOracleMdOnlyHook> | null;
21
22
  mouseNotepad: ReturnType<typeof createMouseNotepadHook> | null;
22
- questionLabelTruncator: ReturnType<typeof createQuestionLabelTruncatorHook>;
23
23
  taskResumeInfo: ReturnType<typeof createTaskResumeInfoHook>;
24
24
  anthropicEffort: ReturnType<typeof createAnthropicEffortHook> | null;
25
25
  runtimeFallback: ReturnType<typeof createRuntimeFallbackHook> | null;
26
26
  rtkBashRewriter: ReturnType<typeof createRtkBashRewriterHook> | null;
27
- mcpStartupNotification: ReturnType<typeof createMcpStartupNotificationHook> | null;
28
27
  };
29
28
  export declare function createSessionHooks(args: {
30
29
  ctx: PluginContext;
@@ -1,11 +1,10 @@
1
1
  import type { HookName, MatrixxConfig } from "../../config";
2
- import { createBashFileReadGuardHook, createCommentCheckerHooks, createContextModeEnforcerHook, createDirectoryAgentsInjectorHook, createDirectoryReadmeInjectorHook, createEmptyTaskResponseDetectorHook, createEnvFileWriteGuardHook, createEvolutionWatcherHook, createHashlineEditDiffEnhancerHook, createHashlineReadEnhancerHook, createJsonErrorRecoveryHook, createQualityGateHook, createReadImageResizerHook, createRulesInjectorHook, createSecretLeakGuardHook, createTaskEditGuardHook, createTaskNotepadHook, createTasksTodowriteDisablerHook, createToolOutputTruncatorHook, createWebFetchRedirectGuardHook, createWriteExistingFileGuardHook } from "../../hooks";
2
+ import { createBashFileReadGuardHook, createCommentCheckerHooks, createContextModeEnforcerHook, createDirectoryAgentsInjectorHook, createEmptyTaskResponseDetectorHook, createEnvFileWriteGuardHook, createEvolutionWatcherHook, createHashlineEditDiffEnhancerHook, createHashlineReadEnhancerHook, createJsonErrorRecoveryHook, createQualityGateHook, createReadImageResizerHook, createRulesInjectorHook, createSecretLeakGuardHook, createTaskEditGuardHook, createTaskNotepadHook, createTasksTodowriteDisablerHook, createToolOutputTruncatorHook, createWebFetchRedirectGuardHook, createWriteExistingFileGuardHook } from "../../hooks";
3
3
  import type { PluginContext } from "../types";
4
4
  export type ToolGuardHooks = {
5
5
  commentChecker: ReturnType<typeof createCommentCheckerHooks> | null;
6
6
  toolOutputTruncator: ReturnType<typeof createToolOutputTruncatorHook> | null;
7
7
  directoryAgentsInjector: ReturnType<typeof createDirectoryAgentsInjectorHook> | null;
8
- directoryReadmeInjector: ReturnType<typeof createDirectoryReadmeInjectorHook> | null;
9
8
  emptyTaskResponseDetector: ReturnType<typeof createEmptyTaskResponseDetectorHook> | null;
10
9
  rulesInjector: ReturnType<typeof createRulesInjectorHook> | null;
11
10
  tasksTodowriteDisabler: ReturnType<typeof createTasksTodowriteDisablerHook> | null;
@@ -1,8 +1,10 @@
1
1
  import type { MatrixxConfig } from "../../config";
2
2
  import { createContextInjectorMessagesTransformHook } from "../../features/context-injector";
3
3
  import { createDesignIntentPreserverHook, createEnvContextInjectorHook, createKeywordDetectorHook, createThinkingBlockValidatorHook, createToolPairValidatorHook } from "../../hooks";
4
+ import { createInputSecretGuardHook } from "../../hooks/input-secret-guard";
4
5
  import type { PluginContext } from "../types";
5
6
  export type TransformHooks = {
7
+ inputSecretGuard: ReturnType<typeof createInputSecretGuardHook> | null;
6
8
  keywordDetector: ReturnType<typeof createKeywordDetectorHook> | null;
7
9
  contextInjectorMessagesTransform: ReturnType<typeof createContextInjectorMessagesTransformHook>;
8
10
  envContextInjector: ReturnType<typeof createEnvContextInjectorHook> | null;
@@ -1,4 +1,4 @@
1
- import type { CategoryConfig } from "../config/schema";
1
+ import type { CategoryConfig, ModelRequirements } from "../config/schema";
2
2
  type OracleOverride = Record<string, unknown> & {
3
3
  category?: string;
4
4
  model?: string;
@@ -20,5 +20,6 @@ export declare function buildOracleAgentConfig(params: {
20
20
  userCategories: Record<string, CategoryConfig> | undefined;
21
21
  currentModel: string | undefined;
22
22
  globalOverrideModel?: string;
23
+ modelRequirements?: ModelRequirements;
23
24
  }): Promise<Record<string, unknown>>;
24
25
  export {};
@@ -0,0 +1,12 @@
1
+ export declare const AWAITING_USER_SUPPRESS_MS: number;
2
+ export interface AwaitingUserState {
3
+ awaitingUser?: boolean;
4
+ awaitingUserSince?: number;
5
+ }
6
+ export declare function isAwaitingUserState(state: unknown): boolean;
7
+ export declare function markAwaitingUser(state: unknown, now?: number): void;
8
+ export declare function clearAwaitingUser(state: unknown): void;
9
+ export declare function hasPendingQuestionMessage(messages: Array<unknown>): boolean;
10
+ export declare function isAwaitingUser(state: unknown, messages?: Array<unknown>): boolean;
11
+ export declare function getToolName(properties: Record<string, unknown> | undefined): string | undefined;
12
+ export declare function isQuestionTool(properties: Record<string, unknown> | undefined): boolean;
@@ -2,4 +2,5 @@ export type ContextLimitModelCacheState = {
2
2
  anthropicContext1MEnabled: boolean;
3
3
  modelContextLimitsCache?: Map<string, number>;
4
4
  };
5
+ export declare function isAnthropicProvider(providerID: string): boolean;
5
6
  export declare function resolveActualContextLimit(providerID: string, modelID: string, modelCacheState?: ContextLimitModelCacheState): number | null;