opencode-matrixx 2.6.11 → 2.6.13

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 (125) hide show
  1. package/dist/agents/architect/default.d.ts +1 -1
  2. package/dist/agents/architect/gpt.d.ts +1 -1
  3. package/dist/agents/dynamic-agent-prompt-builder.d.ts +4 -4
  4. package/dist/agents/model-directives.d.ts +7 -0
  5. package/dist/agents/oracle/plan-template.d.ts +1 -7
  6. package/dist/agents/oracle/system-prompt.d.ts +1 -1
  7. package/dist/cli.js +7 -12
  8. package/dist/config/schema/dcp.d.ts +15 -11
  9. package/dist/config/schema/hooks.d.ts +2 -2
  10. package/dist/config/schema/matrixx-config.d.ts +4 -7
  11. package/dist/config/schema.d.ts +0 -1
  12. package/dist/create-hooks.d.ts +2 -2
  13. package/dist/features/builtin-commands/templates/evolution.d.ts +1 -1
  14. package/dist/features/builtin-commands/templates/start-work.d.ts +1 -1
  15. package/dist/features/evolution/compressor/index.d.ts +2 -2
  16. package/dist/features/evolution/compressor/interface.d.ts +9 -4
  17. package/dist/features/evolution/compressor/llm.d.ts +14 -4
  18. package/dist/features/evolution/evaluator.d.ts +10 -0
  19. package/dist/features/evolution/pipeline.d.ts +3 -1
  20. package/dist/features/evolution/schema.d.ts +46 -0
  21. package/dist/features/evolution/store/budget-ledger.d.ts +46 -0
  22. package/dist/features/evolution/store/index.d.ts +5 -0
  23. package/dist/features/evolution/store/lifecycle.d.ts +52 -0
  24. package/dist/features/evolution/store/project-identity.d.ts +27 -0
  25. package/dist/features/evolution/store/query.d.ts +23 -0
  26. package/dist/features/evolution/{store.d.ts → store/trace-store.d.ts} +1 -1
  27. package/dist/features/evolution/types.d.ts +34 -1
  28. package/dist/features/evolution/writer-emit.d.ts +17 -0
  29. package/dist/features/evolution/writer-frontmatter.d.ts +23 -0
  30. package/dist/features/evolution/writer-supersede.d.ts +20 -0
  31. package/dist/features/evolution/writer.d.ts +4 -0
  32. package/dist/features/plan-contract/appendix.d.ts +14 -0
  33. package/dist/features/plan-contract/constants.d.ts +16 -0
  34. package/dist/features/plan-contract/front-matter.d.ts +34 -0
  35. package/dist/features/plan-contract/index.d.ts +14 -0
  36. package/dist/features/plan-contract/migration.d.ts +36 -0
  37. package/dist/features/plan-contract/schema.d.ts +32 -0
  38. package/dist/features/plan-contract/skeleton.d.ts +5 -0
  39. package/dist/features/plan-contract/types.d.ts +56 -0
  40. package/dist/features/plan-contract/validate.d.ts +9 -0
  41. package/dist/features/session-state/state.d.ts +3 -11
  42. package/dist/hooks/dcp-nudge-sanitizer/constants.d.ts +2 -0
  43. package/dist/hooks/dcp-nudge-sanitizer/hook.d.ts +25 -0
  44. package/dist/hooks/dcp-nudge-sanitizer/index.d.ts +1 -0
  45. package/dist/hooks/evolution-compressor/host-llm-call.d.ts +17 -0
  46. package/dist/hooks/index.d.ts +2 -2
  47. package/dist/hooks/nudge-loop-breaker/constants.d.ts +9 -0
  48. package/dist/hooks/nudge-loop-breaker/hook.d.ts +18 -0
  49. package/dist/hooks/nudge-loop-breaker/index.d.ts +1 -0
  50. package/dist/hooks/nudge-loop-breaker/session-state.d.ts +11 -0
  51. package/dist/hooks/task-continuation-enforcer/constants.d.ts +0 -5
  52. package/dist/index.js +3155 -1624
  53. package/dist/matrixx.schema.json +39 -28
  54. package/dist/plugin/hooks/create-continuation-hooks.d.ts +2 -1
  55. package/dist/plugin/hooks/create-core-hooks.d.ts +1 -2
  56. package/dist/plugin/hooks/create-session-hooks.d.ts +1 -2
  57. package/dist/plugin/hooks/create-tool-guard-hooks.d.ts +1 -2
  58. package/dist/plugin/hooks/create-transform-hooks.d.ts +2 -0
  59. package/dist/plugin/tool-gating.d.ts +2 -0
  60. package/dist/shared/dcp-switch-profile.d.ts +12 -0
  61. package/dist/tools/evolution/constants.d.ts +24 -0
  62. package/dist/tools/evolution/index.d.ts +3 -0
  63. package/dist/tools/evolution/query-actions.d.ts +3 -0
  64. package/dist/tools/evolution/tools.d.ts +16 -0
  65. package/dist/tools/evolution/types.d.ts +20 -0
  66. package/dist/tools/index.d.ts +1 -0
  67. package/dist/tools/plan/constants.d.ts +1 -0
  68. package/dist/tools/plan/index.d.ts +1 -0
  69. package/dist/tools/plan/plan-tasks.d.ts +3 -0
  70. package/dist/tools/plan/types.d.ts +10 -0
  71. package/package.json +1 -1
  72. package/dist/cli/setup/config-writer.test.d.ts +0 -1
  73. package/dist/cli/setup/deps.test.d.ts +0 -1
  74. package/dist/cli/setup/index.test.d.ts +0 -1
  75. package/dist/cli/setup/opencode-sync.test.d.ts +0 -1
  76. package/dist/cli/setup/prompts.test.d.ts +0 -1
  77. package/dist/config/schema/failure-counter.d.ts +0 -7
  78. package/dist/features/background-agent/handle-index.test.d.ts +0 -1
  79. package/dist/features/background-agent/manager-handles.test.d.ts +0 -1
  80. package/dist/features/knowledge-hub/loader.test.d.ts +0 -1
  81. package/dist/features/knowledge-hub/resolver.test.d.ts +0 -1
  82. package/dist/features/mission-state/plan-storage.test.d.ts +0 -1
  83. package/dist/features/mission-state/reconcile.test.d.ts +0 -1
  84. package/dist/features/session-state/state.test.d.ts +0 -1
  85. package/dist/hooks/failure-counter/counter.d.ts +0 -7
  86. package/dist/hooks/failure-counter/counter.test.d.ts +0 -1
  87. package/dist/hooks/failure-counter/hook.d.ts +0 -18
  88. package/dist/hooks/failure-counter/index.d.ts +0 -3
  89. package/dist/hooks/failure-counter/patterns.d.ts +0 -6
  90. package/dist/hooks/failure-counter/patterns.test.d.ts +0 -1
  91. package/dist/hooks/hashline-edit-diff-enhancer/hook.d.ts +0 -28
  92. package/dist/hooks/hashline-edit-diff-enhancer/index.d.ts +0 -1
  93. package/dist/hooks/input-secret-guard/detector.test.d.ts +0 -1
  94. package/dist/hooks/input-secret-guard/hook.test.d.ts +0 -1
  95. package/dist/hooks/input-secret-guard/redactor.test.d.ts +0 -1
  96. package/dist/hooks/input-secret-guard/session-allow-cache.test.d.ts +0 -1
  97. package/dist/hooks/interactive-bash-session/hook.test.d.ts +0 -1
  98. package/dist/hooks/knowledge-hub-guard/hook.test.d.ts +0 -1
  99. package/dist/hooks/knowledge-hub-injector/hook.test.d.ts +0 -1
  100. package/dist/hooks/knowledge-hub-search-nudge/hook.test.d.ts +0 -1
  101. package/dist/hooks/plan-persister/task-sync.test.d.ts +0 -1
  102. package/dist/hooks/rtk-bash-rewriter/hook.test.d.ts +0 -1
  103. package/dist/hooks/stop-continuation-guard/repro.test.d.ts +0 -1
  104. package/dist/hooks/task-continuation-enforcer/awaiting-user.test.d.ts +0 -1
  105. package/dist/hooks/task-continuation-enforcer/continuation-injection.test.d.ts +0 -1
  106. package/dist/hooks/task-continuation-enforcer/countdown.test.d.ts +0 -1
  107. package/dist/hooks/task-continuation-enforcer/idle-event.test.d.ts +0 -1
  108. package/dist/hooks/task-continuation-enforcer/staleness.test.d.ts +0 -1
  109. package/dist/hooks/task-continuation-enforcer/todo.test.d.ts +0 -1
  110. package/dist/hooks/task-continuation-enforcer/ulw-bootstrap.test.d.ts +0 -1
  111. package/dist/hooks/todo-continuation-enforcer/awaiting-user.test.d.ts +0 -1
  112. package/dist/hooks/todo-continuation-enforcer/countdown.test.d.ts +0 -1
  113. package/dist/hooks/todo-continuation-enforcer/idle-event.test.d.ts +0 -1
  114. package/dist/shared/format-bytes.test.d.ts +0 -1
  115. package/dist/shared/is-abort-error.test.d.ts +0 -1
  116. package/dist/shared/task-system-gating.test.d.ts +0 -1
  117. package/dist/shared/with-timeout.test.d.ts +0 -1
  118. package/dist/tools/delegate-task/poll-timeout-outcome.test.d.ts +0 -1
  119. package/dist/tools/delegate-task/prompt-builder.tdd.test.d.ts +0 -1
  120. package/dist/tools/delegate-task/sync-task.test.d.ts +0 -1
  121. package/dist/tools/delegate-task/tdd-enforcement.test.d.ts +0 -1
  122. package/dist/tools/delegate-task/timing.test.d.ts +0 -1
  123. package/dist/tools/github-search/result-formatter.test.d.ts +0 -1
  124. package/dist/tools/knowledge-hub-confirm/tools.test.d.ts +0 -1
  125. package/dist/tools/task/task-cleanup.test.d.ts +0 -1
@@ -209,7 +209,6 @@
209
209
  "runtime-fallback",
210
210
  "read-image-resizer",
211
211
  "webfetch-redirect-guard",
212
- "hashline-edit-diff-enhancer",
213
212
  "tool-pair-validator",
214
213
  "quality-gate",
215
214
  "task-notepad",
@@ -221,10 +220,11 @@
221
220
  "context-mode-enforcer",
222
221
  "task-edit-guard",
223
222
  "document-reader-guard",
224
- "failure-counter",
225
223
  "knowledge-hub-guard",
226
224
  "knowledge-hub-injector",
227
- "knowledge-hub-search-nudge"
225
+ "knowledge-hub-search-nudge",
226
+ "dcp-nudge-sanitizer",
227
+ "nudge-loop-breaker"
228
228
  ]
229
229
  },
230
230
  {}
@@ -4015,6 +4015,42 @@
4015
4015
  }
4016
4016
  ]
4017
4017
  },
4018
+ "modelMaxLimits": {
4019
+ "type": "object",
4020
+ "propertyNames": {
4021
+ "type": "string",
4022
+ "pattern": "^[^/]+\\/[^/]+$"
4023
+ },
4024
+ "additionalProperties": {
4025
+ "anyOf": [
4026
+ {
4027
+ "type": "number"
4028
+ },
4029
+ {
4030
+ "type": "string",
4031
+ "pattern": "^\\d+%$"
4032
+ }
4033
+ ]
4034
+ }
4035
+ },
4036
+ "modelMinLimits": {
4037
+ "type": "object",
4038
+ "propertyNames": {
4039
+ "type": "string",
4040
+ "pattern": "^[^/]+\\/[^/]+$"
4041
+ },
4042
+ "additionalProperties": {
4043
+ "anyOf": [
4044
+ {
4045
+ "type": "number"
4046
+ },
4047
+ {
4048
+ "type": "string",
4049
+ "pattern": "^\\d+%$"
4050
+ }
4051
+ ]
4052
+ }
4053
+ },
4018
4054
  "nudgeFrequency": {
4019
4055
  "type": "integer",
4020
4056
  "minimum": 1,
@@ -4622,31 +4658,6 @@
4622
4658
  ],
4623
4659
  "additionalProperties": false
4624
4660
  },
4625
- "failure_counter": {
4626
- "type": "object",
4627
- "properties": {
4628
- "enabled": {
4629
- "default": true,
4630
- "type": "boolean"
4631
- },
4632
- "threshold": {
4633
- "default": 2,
4634
- "type": "number",
4635
- "minimum": 1,
4636
- "maximum": 10
4637
- },
4638
- "resetOnSuccess": {
4639
- "default": true,
4640
- "type": "boolean"
4641
- }
4642
- },
4643
- "required": [
4644
- "enabled",
4645
- "threshold",
4646
- "resetOnSuccess"
4647
- ],
4648
- "additionalProperties": false
4649
- },
4650
4661
  "background_task": {
4651
4662
  "type": "object",
4652
4663
  "properties": {
@@ -1,6 +1,6 @@
1
1
  import type { HookName, MatrixxConfig } from "../../config";
2
2
  import type { BackgroundManager } from "../../features/background-agent";
3
- import { createArchitectHook, createBackgroundNotificationHook, createCompactionContextInjector, createCompactionTodoPreserverHook, createEvolutionCompressorHook, createEvolutionHitlHook, createPlanPersister, createStopContinuationGuardHook, createTaskContinuationEnforcer, createTodoContinuationEnforcer } from "../../hooks";
3
+ import { createArchitectHook, createBackgroundNotificationHook, createCompactionContextInjector, createCompactionTodoPreserverHook, createEvolutionCompressorHook, createEvolutionHitlHook, createNudgeLoopBreakerHook, createPlanPersister, createStopContinuationGuardHook, createTaskContinuationEnforcer, createTodoContinuationEnforcer } from "../../hooks";
4
4
  import type { PluginContext } from "../types";
5
5
  import { createUnstableAgentBabysitter } from "../unstable-agent-babysitter";
6
6
  export type ContinuationHooks = {
@@ -10,6 +10,7 @@ export type ContinuationHooks = {
10
10
  todoContinuationEnforcer: ReturnType<typeof createTodoContinuationEnforcer> | null;
11
11
  taskContinuationEnforcer: ReturnType<typeof createTaskContinuationEnforcer> | null;
12
12
  unstableAgentBabysitter: ReturnType<typeof createUnstableAgentBabysitter> | null;
13
+ nudgeLoopBreaker: ReturnType<typeof createNudgeLoopBreakerHook> | null;
13
14
  backgroundNotificationHook: ReturnType<typeof createBackgroundNotificationHook> | null;
14
15
  architectHook: ReturnType<typeof createArchitectHook> | null;
15
16
  planPersister: ReturnType<typeof createPlanPersister> | null;
@@ -12,6 +12,7 @@ export declare function createCoreHooks(args: {
12
12
  knowledgeHubInjector: ReturnType<typeof import("../../hooks").createKnowledgeHubInjectorHook> | null;
13
13
  envContextInjector: ReturnType<typeof import("../../hooks").createEnvContextInjectorHook> | null;
14
14
  thinkingBlockValidator: ReturnType<typeof import("../../hooks").createThinkingBlockValidatorHook> | null;
15
+ dcpNudgeSanitizer: ReturnType<typeof import("../../hooks").createDcpNudgeSanitizerHook> | null;
15
16
  toolPairValidator: ReturnType<typeof import("../../hooks").createToolPairValidatorHook> | null;
16
17
  designIntentPreserver: ReturnType<typeof import("../../hooks").createDesignIntentPreserverHook> | null;
17
18
  backgroundTaskBlocker: ReturnType<typeof import("../../hooks").createBackgroundTaskBlockerHook> | null;
@@ -30,7 +31,6 @@ export declare function createCoreHooks(args: {
30
31
  contextModeEnforcer: ReturnType<typeof import("../../hooks").createContextModeEnforcerHook> | null;
31
32
  readImageResizer: ReturnType<typeof import("../../hooks").createReadImageResizerHook> | null;
32
33
  webfetchRedirectGuard: ReturnType<typeof import("../../hooks").createWebFetchRedirectGuardHook> | null;
33
- hashlineEditDiffEnhancer: ReturnType<typeof import("../../hooks").createHashlineEditDiffEnhancerHook> | null;
34
34
  qualityGate: ReturnType<typeof import("../../hooks").createQualityGateHook> | null;
35
35
  taskNotepad: ReturnType<typeof import("../../hooks").createTaskNotepadHook> | null;
36
36
  taskEditGuard: ReturnType<typeof import("../../hooks").createTaskEditGuardHook> | null;
@@ -51,7 +51,6 @@ export declare function createCoreHooks(args: {
51
51
  matrixLoop: ReturnType<typeof import("../../hooks").createMatrixLoopHook> | null;
52
52
  editErrorRecovery: ReturnType<typeof import("../../hooks").createEditErrorRecoveryHook> | null;
53
53
  delegateTaskRetry: ReturnType<typeof import("../../hooks").createDelegateTaskRetryHook> | null;
54
- failureCounter: ReturnType<typeof import("../../hooks").createFailureCounterHook> | null;
55
54
  startWork: ReturnType<typeof import("../../hooks").createStartWorkHook> | null;
56
55
  oracleMdOnly: ReturnType<typeof import("../../hooks").createOracleMdOnlyHook> | null;
57
56
  mouseNotepad: ReturnType<typeof import("../../hooks").createMouseNotepadHook> | null;
@@ -1,5 +1,5 @@
1
1
  import type { HookName, MatrixxConfig } from "../../config";
2
- import { createAgentUsageReminderHook, createAutoUpdateCheckerHook, createContextWindowLimitRecoveryHook, createContextWindowMonitorHook, createDelegateTaskRetryHook, createEditErrorRecoveryHook, createFailureCounterHook, createInteractiveBashSessionHook, createMatrixLoopHook, createMouseNotepadHook, createNonInteractiveEnvHook, createOracleMdOnlyHook, createPreemptiveCompactionHook, createRtkBashRewriterHook, createRuntimeFallbackHook, createSessionNotification, createSessionRecoveryHook, createStartWorkHook, createTaskResumeInfoHook, createThinkModeHook } from "../../hooks";
2
+ import { createAgentUsageReminderHook, createAutoUpdateCheckerHook, createContextWindowLimitRecoveryHook, createContextWindowMonitorHook, createDelegateTaskRetryHook, createEditErrorRecoveryHook, 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 = {
@@ -16,7 +16,6 @@ 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;
20
19
  startWork: ReturnType<typeof createStartWorkHook> | null;
21
20
  oracleMdOnly: ReturnType<typeof createOracleMdOnlyHook> | null;
22
21
  mouseNotepad: ReturnType<typeof createMouseNotepadHook> | null;
@@ -1,5 +1,5 @@
1
1
  import type { HookName, MatrixxConfig } from "../../config";
2
- import { createBackgroundTaskBlockerHook, createBashFileReadGuardHook, createCommentCheckerHooks, createContextModeEnforcerHook, createDirectoryAgentsInjectorHook, createDocumentReaderGuardHook, createEmptyTaskResponseDetectorHook, createEnvFileWriteGuardHook, createEvolutionWatcherHook, createHashlineEditDiffEnhancerHook, createHashlineReadEnhancerHook, createJsonErrorRecoveryHook, createKnowledgeHubGuardHook, createKnowledgeHubSearchNudgeHook, createQualityGateHook, createReadImageResizerHook, createRulesInjectorHook, createSecretLeakGuardHook, createTaskEditGuardHook, createTaskNotepadHook, createTasksTodowriteDisablerHook, createToolOutputTruncatorHook, createWebFetchRedirectGuardHook, createWriteExistingFileGuardHook } from "../../hooks";
2
+ import { createBackgroundTaskBlockerHook, createBashFileReadGuardHook, createCommentCheckerHooks, createContextModeEnforcerHook, createDirectoryAgentsInjectorHook, createDocumentReaderGuardHook, createEmptyTaskResponseDetectorHook, createEnvFileWriteGuardHook, createEvolutionWatcherHook, createHashlineReadEnhancerHook, createJsonErrorRecoveryHook, createKnowledgeHubGuardHook, createKnowledgeHubSearchNudgeHook, 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
  backgroundTaskBlocker: ReturnType<typeof createBackgroundTaskBlockerHook> | null;
@@ -18,7 +18,6 @@ export type ToolGuardHooks = {
18
18
  contextModeEnforcer: ReturnType<typeof createContextModeEnforcerHook> | null;
19
19
  readImageResizer: ReturnType<typeof createReadImageResizerHook> | null;
20
20
  webfetchRedirectGuard: ReturnType<typeof createWebFetchRedirectGuardHook> | null;
21
- hashlineEditDiffEnhancer: ReturnType<typeof createHashlineEditDiffEnhancerHook> | null;
22
21
  qualityGate: ReturnType<typeof createQualityGateHook> | null;
23
22
  taskNotepad: ReturnType<typeof createTaskNotepadHook> | null;
24
23
  taskEditGuard: ReturnType<typeof createTaskEditGuardHook> | null;
@@ -1,6 +1,7 @@
1
1
  import type { MatrixxConfig } from "../../config";
2
2
  import { createContextInjectorMessagesTransformHook } from "../../features/context-injector";
3
3
  import { createDesignIntentPreserverHook, createEnvContextInjectorHook, createKeywordDetectorHook, createKnowledgeHubInjectorHook, createThinkingBlockValidatorHook, createToolPairValidatorHook } from "../../hooks";
4
+ import { createDcpNudgeSanitizerHook } from "../../hooks/dcp-nudge-sanitizer";
4
5
  import { createInputSecretGuardHook } from "../../hooks/input-secret-guard";
5
6
  import type { PluginContext } from "../types";
6
7
  export type TransformHooks = {
@@ -10,6 +11,7 @@ export type TransformHooks = {
10
11
  knowledgeHubInjector: ReturnType<typeof createKnowledgeHubInjectorHook> | null;
11
12
  envContextInjector: ReturnType<typeof createEnvContextInjectorHook> | null;
12
13
  thinkingBlockValidator: ReturnType<typeof createThinkingBlockValidatorHook> | null;
14
+ dcpNudgeSanitizer: ReturnType<typeof createDcpNudgeSanitizerHook> | null;
13
15
  toolPairValidator: ReturnType<typeof createToolPairValidatorHook> | null;
14
16
  designIntentPreserver: ReturnType<typeof createDesignIntentPreserverHook> | null;
15
17
  };
@@ -31,3 +31,5 @@ export declare function shouldEnableLookAt(directory: string | undefined, constr
31
31
  export declare function shouldEnableKnowledgeHubConfirm(hubs: readonly unknown[] | undefined): boolean;
32
32
  /** preset: opt-in only, default false. */
33
33
  export declare function shouldEnablePresetTools(override: boolean | undefined): boolean;
34
+ /** evolution tool: register iff evolution.enabled is true (default false). */
35
+ export declare function shouldEnableEvolutionTool(enabled: boolean | undefined): boolean;
@@ -5,6 +5,18 @@ export interface DcpSwitchProfileOptions {
5
5
  };
6
6
  }
7
7
  export declare function deepMergeProfile(builtin: Record<string, unknown>, override: Record<string, unknown>): Record<string, unknown>;
8
+ /**
9
+ * Build a full inline DCP PluginConfig object for the given profile.
10
+ * Starts with base values from dcpConfig.base, overlays profile-specific
11
+ * values from dcpConfig.profiles[profile], and falls back to built-in
12
+ * profile definitions when no Matrixx config is provided.
13
+ *
14
+ * NOTE: DCP also supports per-model context limits via modelMaxLimits
15
+ * and modelMinLimits in the compress section. These allow fine-grained
16
+ * control per LLM provider/model (e.g., {"anthropic/claude-sonnet-4-20250514": "80%"}).
17
+ * Exposed via DcpCompressOverrideSchema and propagated below.
18
+ */
19
+ export declare function buildInlineConfig(profile: string, options?: DcpSwitchProfileOptions): Record<string, unknown>;
8
20
  /**
9
21
  * Switch the active DCP profile.
10
22
  * Reads profile parameters from the Matrixx plugin configuration and writes
@@ -0,0 +1,24 @@
1
+ /**
2
+ * evolution tool — description string and shared constants.
3
+ *
4
+ * The tool description is referenced by the tool factory and included in the
5
+ * LLM-facing tool schema, so keep it factual, concise, and triggerable.
6
+ */
7
+ /** Tool description — governance plus read-only retrieval actions. */
8
+ export declare const EVOLUTION_DESCRIPTION = "Govern self-evolution proposals staged in .matrixx/evolution/pending, and retrieve approved knowledge. Actions: 'list' (show pending proposals with version and confidence), 'get' (show a staged proposal), 'approve' (promote a pending skill and record the audit entry), 'reject' (discard a pending proposal), 'status' (state totals, pending count, and audit tail), 'search' (read-only scoped search over approved knowledge), 'get_context' (read-only scoped context, truncated at a char cap). Use this tool instead of shell commands for all evolution state.";
9
+ /** Allowlisted actions: Wave1 governance plus read-only retrieval queries. */
10
+ export declare const EVOLUTION_TOOL_ACTIONS: readonly ["list", "get", "approve", "reject", "status", "search", "get_context"];
11
+ /** The read-only retrieval surface — no action here may mutate evolution state. */
12
+ export declare const EVOLUTION_QUERY_ACTIONS: readonly ["search", "get_context"];
13
+ /** How many audit lines `status` reports. */
14
+ export declare const AUDIT_TAIL_LIMIT = 20;
15
+ /** Hard char cap for `get_context` output; cut text gets a truncation marker. */
16
+ export declare const GET_CONTEXT_CHAR_CAP = 4000;
17
+ /** Max records `search` reports. */
18
+ export declare const SEARCH_RESULT_LIMIT = 20;
19
+ /** Message when the scoped query finds nothing. */
20
+ export declare const NO_RETRIEVABLE_MESSAGE = "No retrievable knowledge for this scope.";
21
+ /** Slugs must stay inside the pending dir — no separators, no traversal. */
22
+ export declare const SLUG_PATTERN: RegExp;
23
+ /** Message when nothing is staged. */
24
+ export declare const NO_PENDING_MESSAGE = "No pending evolution proposals.";
@@ -0,0 +1,3 @@
1
+ export { AUDIT_TAIL_LIMIT, EVOLUTION_DESCRIPTION, EVOLUTION_QUERY_ACTIONS, EVOLUTION_TOOL_ACTIONS, GET_CONTEXT_CHAR_CAP, NO_PENDING_MESSAGE, NO_RETRIEVABLE_MESSAGE, SEARCH_RESULT_LIMIT, SLUG_PATTERN, } from "./constants";
2
+ export { createEvolutionTool, type EvolutionToolOptions } from "./tools";
3
+ export type { EvolutionToolAction, EvolutionToolArgs, PendingProposalSummary } from "./types";
@@ -0,0 +1,3 @@
1
+ import type { EvolutionToolArgs } from "./types";
2
+ export declare function handleSearch(projectRoot: string, args: EvolutionToolArgs): string;
3
+ export declare function handleGetContext(projectRoot: string, args: EvolutionToolArgs): string;
@@ -0,0 +1,16 @@
1
+ import type { PluginInput } from "@opencode-ai/plugin";
2
+ import { type ToolDefinition } from "@opencode-ai/plugin/tool";
3
+ import { type EvolutionWriterConfig } from "../../config/schema/evolution";
4
+ export type EvolutionToolOptions = {
5
+ writerConfig?: EvolutionWriterConfig;
6
+ };
7
+ /**
8
+ * `evolution` tool factory — governance + query host for self-evolution.
9
+ *
10
+ * Wave1 exposes the governance actions `list/get/approve/reject/status`,
11
+ * all delegated to the evolution store APIs (`EvolutionWriter`, `TraceStore`)
12
+ * so no shell command ever touches evolution state. T9 adds the read-only
13
+ * retrieval actions `search` and `get_context`, filtered through the T4a
14
+ * retrieval contract and scoped to the current project.
15
+ */
16
+ export declare function createEvolutionTool(ctx: PluginInput, options?: EvolutionToolOptions): Record<string, ToolDefinition>;
@@ -0,0 +1,20 @@
1
+ import type { KnowledgeKind } from "../../features/evolution/types";
2
+ import type { EVOLUTION_TOOL_ACTIONS } from "./constants";
3
+ /** Allowlisted actions for the `evolution` tool. */
4
+ export type EvolutionToolAction = (typeof EVOLUTION_TOOL_ACTIONS)[number];
5
+ /** Flat args shape for the multi-action `evolution` tool. */
6
+ export type EvolutionToolArgs = {
7
+ action: EvolutionToolAction;
8
+ slug?: string;
9
+ global?: boolean;
10
+ /** (action=search/get_context) Case-insensitive text match; absent returns all in scope. */
11
+ query?: string;
12
+ /** (action=search/get_context) Restrict results to one knowledge kind. */
13
+ kind?: KnowledgeKind;
14
+ };
15
+ /** Pending proposal summary shown by the `list` action. */
16
+ export type PendingProposalSummary = {
17
+ slug: string;
18
+ version: string | null;
19
+ confidence: number | null;
20
+ };
@@ -4,6 +4,7 @@ export { createBddCreateContractTool } from "./bdd-create-contract";
4
4
  export { createBddParseGherkinTool } from "./bdd-parse-gherkin";
5
5
  export { createBddPipelineTool } from "./bdd-pipeline";
6
6
  export { createBddValidateContractTool } from "./bdd-validate-contract";
7
+ export { createEvolutionTool } from "./evolution";
7
8
  export { createGithubSearchTools } from "./github-search";
8
9
  export { createGlobTools } from "./glob";
9
10
  export { createGrepTools } from "./grep";
@@ -4,6 +4,7 @@
4
4
  */
5
5
  export declare const PLANS_DIR = ".matrixx/plans";
6
6
  export declare const MAX_PLAN_FILE_BYTES = 102400;
7
+ export declare const MAX_PLAN_READ_RENDERED_BYTES = 40000;
7
8
  export declare const PLAN_FILENAME_KEBAB_REGEX: RegExp;
8
9
  export declare const PLAN_BASENAME_KEBAB_REGEX: RegExp;
9
10
  export declare const META_TAG_PREFIX = "<!-- plan-persister:";
@@ -3,4 +3,5 @@ export { createPlanCreateTool } from "./plan-create";
3
3
  export { createPlanDeleteTool } from "./plan-delete";
4
4
  export { createPlanListTool } from "./plan-list";
5
5
  export { createPlanReadTool } from "./plan-read";
6
+ export { createPlanTasksTool } from "./plan-tasks";
6
7
  export { createPlanUpdateTool } from "./plan-update";
@@ -0,0 +1,3 @@
1
+ import { type ToolDefinition } from "@opencode-ai/plugin/tool";
2
+ import type { PluginContext } from "../../plugin/types";
3
+ export declare function createPlanTasksTool(ctx?: PluginContext): ToolDefinition;
@@ -9,8 +9,18 @@ export interface PlanCreateArgs {
9
9
  filePath: string;
10
10
  content: string;
11
11
  }
12
+ export type PlanReadFormat = "hashline" | "content";
13
+ export interface PlanOutlineEntry {
14
+ level: 2 | 3;
15
+ text: string;
16
+ line: number;
17
+ anchor: string;
18
+ }
12
19
  export interface PlanReadArgs {
13
20
  filePath: string;
21
+ format?: PlanReadFormat;
22
+ offset?: number;
23
+ limit?: number;
14
24
  }
15
25
  export interface PlanUpdateArgs {
16
26
  filePath: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-matrixx",
3
- "version": "2.6.11",
3
+ "version": "2.6.13",
4
4
  "description": "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,7 +0,0 @@
1
- import { z } from "zod";
2
- export declare const FailureCounterConfigSchema: z.ZodObject<{
3
- enabled: z.ZodDefault<z.ZodBoolean>;
4
- threshold: z.ZodDefault<z.ZodNumber>;
5
- resetOnSuccess: z.ZodDefault<z.ZodBoolean>;
6
- }, z.core.$strip>;
7
- export type FailureCounterConfig = z.infer<typeof FailureCounterConfigSchema>;
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,7 +0,0 @@
1
- import { clearFailureCounter, getFailureCount, resetFailureCounter } from "../../features/session-state/state";
2
- export declare const CONTINUATION_COOLDOWN_MS = 30000;
3
- export interface HandleToolAfterOptions {
4
- parentSessionID?: string;
5
- }
6
- export declare function handleToolAfter(sessionID: string, output: string, isSuccess: boolean, options?: HandleToolAfterOptions): void;
7
- export { clearFailureCounter, getFailureCount, resetFailureCounter };
@@ -1 +0,0 @@
1
- export {};
@@ -1,18 +0,0 @@
1
- import type { PluginInput } from "@opencode-ai/plugin";
2
- export declare function createFailureCounterHook(_ctx: PluginInput): {
3
- "tool.execute.after": (input: {
4
- tool: string;
5
- sessionID: string;
6
- callID: string;
7
- }, output: {
8
- title: string;
9
- output: string;
10
- metadata: unknown;
11
- }) => Promise<void>;
12
- event: (input: {
13
- event: {
14
- type: string;
15
- properties: Record<string, unknown>;
16
- };
17
- }) => Promise<void>;
18
- };
@@ -1,3 +0,0 @@
1
- export * from "./counter";
2
- export { createFailureCounterHook } from "./hook";
3
- export * from "./patterns";
@@ -1,6 +0,0 @@
1
- export interface FailureSignature {
2
- pattern: string | RegExp;
3
- kind: "task_error" | "timeout" | "abort_excluded";
4
- }
5
- export declare const FAILURE_COUNTER_PATTERNS: FailureSignature[];
6
- export declare function isCountableFailure(output: string): boolean;
@@ -1 +0,0 @@
1
- export {};
@@ -1,28 +0,0 @@
1
- interface HashlineEditDiffEnhancerConfig {
2
- hashline_edit?: {
3
- enabled: boolean;
4
- };
5
- }
6
- type BeforeInput = {
7
- tool: string;
8
- sessionID: string;
9
- callID: string;
10
- };
11
- type BeforeOutput = {
12
- args: Record<string, unknown>;
13
- };
14
- type AfterInput = {
15
- tool: string;
16
- sessionID: string;
17
- callID: string;
18
- };
19
- type AfterOutput = {
20
- title: string;
21
- output: string;
22
- metadata: Record<string, unknown>;
23
- };
24
- export declare function createHashlineEditDiffEnhancerHook(config: HashlineEditDiffEnhancerConfig): {
25
- "tool.execute.before": (input: BeforeInput, output: BeforeOutput) => Promise<void>;
26
- "tool.execute.after": (input: AfterInput, output: AfterOutput) => Promise<void>;
27
- };
28
- export {};
@@ -1 +0,0 @@
1
- export { createHashlineEditDiffEnhancerHook } from "./hook";
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};