opencode-matrixx 2.6.10 → 2.6.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -5
- package/dist/agents/architect/default.d.ts +1 -1
- package/dist/agents/architect/gpt.d.ts +1 -1
- package/dist/agents/dynamic-agent-prompt-builder.d.ts +6 -5
- package/dist/cli.js +30 -77
- package/dist/config/schema/agent-overrides.d.ts +126 -126
- package/dist/config/schema/commands.d.ts +0 -5
- package/dist/config/schema/dcp.d.ts +3 -3
- package/dist/config/schema/hooks.d.ts +3 -0
- package/dist/config/schema/internal/permission.d.ts +8 -8
- package/dist/config/schema/knowledge.d.ts +34 -0
- package/dist/config/schema/matrixx-config.d.ts +145 -125
- package/dist/config/schema/tool-gating.d.ts +9 -0
- package/dist/config/schema.d.ts +2 -0
- package/dist/create-hooks.d.ts +3 -0
- package/dist/features/background-agent/manager.d.ts +19 -0
- package/dist/features/bdd/schema.d.ts +5 -5
- package/dist/features/builtin-commands/types.d.ts +1 -1
- package/dist/features/knowledge-hub/index.d.ts +3 -0
- package/dist/features/knowledge-hub/loader.d.ts +11 -0
- package/dist/features/knowledge-hub/loader.test.d.ts +1 -0
- package/dist/features/knowledge-hub/resolver.d.ts +2 -0
- package/dist/features/knowledge-hub/resolver.test.d.ts +1 -0
- package/dist/features/mission-state/constants.d.ts +20 -0
- package/dist/features/mission-state/index.d.ts +1 -0
- package/dist/features/mission-state/plan-storage.d.ts +32 -6
- package/dist/features/mission-state/reconcile.d.ts +75 -0
- package/dist/features/mission-state/reconcile.test.d.ts +1 -0
- package/dist/features/mission-state/storage.d.ts +26 -0
- package/dist/features/mission-state/types.d.ts +6 -0
- package/dist/hooks/auto-slash-command/executor.d.ts +11 -3
- package/dist/hooks/auto-slash-command/hook.d.ts +0 -2
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/knowledge-hub-guard/approvals.d.ts +5 -0
- package/dist/hooks/knowledge-hub-guard/hook.d.ts +15 -0
- package/dist/hooks/knowledge-hub-guard/hook.test.d.ts +1 -0
- package/dist/hooks/knowledge-hub-guard/index.d.ts +3 -0
- package/dist/hooks/knowledge-hub-injector/hook.d.ts +26 -0
- package/dist/hooks/knowledge-hub-injector/hook.test.d.ts +1 -0
- package/dist/hooks/knowledge-hub-injector/index.d.ts +2 -0
- package/dist/hooks/knowledge-hub-search-nudge/hook.d.ts +16 -0
- package/dist/hooks/knowledge-hub-search-nudge/hook.test.d.ts +1 -0
- package/dist/hooks/knowledge-hub-search-nudge/index.d.ts +2 -0
- package/dist/hooks/plan-persister/index.d.ts +4 -0
- package/dist/hooks/plan-persister/task-link.d.ts +31 -0
- package/dist/hooks/plan-persister/task-sync.d.ts +39 -0
- package/dist/hooks/plan-persister/task-sync.test.d.ts +1 -0
- package/dist/hooks/start-work/index.d.ts +1 -0
- package/dist/hooks/start-work/plan-filter.d.ts +48 -0
- package/dist/index.js +2970 -2122
- package/dist/matrixx.schema.json +89 -119
- package/dist/plugin/hooks/create-core-hooks.d.ts +3 -0
- package/dist/plugin/hooks/create-tool-guard-hooks.d.ts +3 -1
- package/dist/plugin/hooks/create-transform-hooks.d.ts +2 -1
- package/dist/plugin/tool-gating.d.ts +33 -0
- package/dist/shared/dcp-guidance.d.ts +16 -0
- package/dist/{tools/dcp-switch-profile/tools.d.ts → shared/dcp-switch-profile.d.ts} +1 -3
- package/dist/shared/index.d.ts +1 -0
- package/dist/tools/background-task/constants.d.ts +1 -0
- package/dist/tools/background-task/create-background-wait-all.d.ts +3 -0
- package/dist/tools/background-task/index.d.ts +1 -1
- package/dist/tools/background-task/tools.d.ts +1 -0
- package/dist/tools/background-task/types.d.ts +3 -0
- package/dist/tools/delegate-task/constants.d.ts +6 -0
- package/dist/tools/delegate-task/prompt-builder.d.ts +1 -0
- package/dist/tools/delegate-task/prompt-builder.tdd.test.d.ts +1 -0
- package/dist/tools/delegate-task/tdd-enforcement.test.d.ts +1 -0
- package/dist/tools/delegate-task/tools.d.ts +6 -0
- package/dist/tools/delegate-task/types.d.ts +1 -0
- package/dist/tools/index.d.ts +1 -1
- package/dist/tools/knowledge-hub-confirm/index.d.ts +1 -0
- package/dist/tools/knowledge-hub-confirm/tools.d.ts +12 -0
- package/dist/tools/knowledge-hub-confirm/tools.test.d.ts +1 -0
- package/package.json +1 -1
- package/dist/features/builtin-commands/templates/bdd-backend.d.ts +0 -1
- package/dist/features/builtin-commands/templates/bdd-contract.d.ts +0 -1
- package/dist/features/builtin-commands/templates/bdd-frontend.d.ts +0 -1
- package/dist/features/builtin-commands/templates/bdd-tests.d.ts +0 -1
- package/dist/features/builtin-commands/templates/dcp-profile.d.ts +0 -1
- package/dist/tools/dcp-switch-profile/index.d.ts +0 -1
package/dist/matrixx.schema.json
CHANGED
|
@@ -221,7 +221,10 @@
|
|
|
221
221
|
"context-mode-enforcer",
|
|
222
222
|
"task-edit-guard",
|
|
223
223
|
"document-reader-guard",
|
|
224
|
-
"failure-counter"
|
|
224
|
+
"failure-counter",
|
|
225
|
+
"knowledge-hub-guard",
|
|
226
|
+
"knowledge-hub-injector",
|
|
227
|
+
"knowledge-hub-search-nudge"
|
|
225
228
|
]
|
|
226
229
|
},
|
|
227
230
|
{}
|
|
@@ -246,12 +249,7 @@
|
|
|
246
249
|
"research",
|
|
247
250
|
"assembly",
|
|
248
251
|
"ultrawork",
|
|
249
|
-
"bdd-
|
|
250
|
-
"bdd-contract",
|
|
251
|
-
"bdd-frontend",
|
|
252
|
-
"bdd-pipeline",
|
|
253
|
-
"bdd-tests",
|
|
254
|
-
"dcp-profile"
|
|
252
|
+
"bdd-pipeline"
|
|
255
253
|
]
|
|
256
254
|
}
|
|
257
255
|
},
|
|
@@ -3976,117 +3974,7 @@
|
|
|
3976
3974
|
"type": "boolean"
|
|
3977
3975
|
},
|
|
3978
3976
|
"profiles": {
|
|
3979
|
-
"default": {
|
|
3980
|
-
"economy": {
|
|
3981
|
-
"pruneNotification": "off",
|
|
3982
|
-
"compress": {
|
|
3983
|
-
"maxContextLimit": "30%",
|
|
3984
|
-
"minContextLimit": "20%",
|
|
3985
|
-
"nudgeFrequency": 2,
|
|
3986
|
-
"nudgeForce": "strong",
|
|
3987
|
-
"iterationNudgeThreshold": 7
|
|
3988
|
-
},
|
|
3989
|
-
"turnProtection": {
|
|
3990
|
-
"enabled": false
|
|
3991
|
-
},
|
|
3992
|
-
"experimental": {
|
|
3993
|
-
"allowSubAgents": false
|
|
3994
|
-
},
|
|
3995
|
-
"strategies": {
|
|
3996
|
-
"purgeErrors": {
|
|
3997
|
-
"turns": 1
|
|
3998
|
-
}
|
|
3999
|
-
}
|
|
4000
|
-
},
|
|
4001
|
-
"balanced": {
|
|
4002
|
-
"pruneNotification": "minimal",
|
|
4003
|
-
"compress": {
|
|
4004
|
-
"maxContextLimit": "60%",
|
|
4005
|
-
"minContextLimit": "30%",
|
|
4006
|
-
"nudgeFrequency": 3,
|
|
4007
|
-
"nudgeForce": "strong",
|
|
4008
|
-
"iterationNudgeThreshold": 10
|
|
4009
|
-
},
|
|
4010
|
-
"turnProtection": {
|
|
4011
|
-
"enabled": true,
|
|
4012
|
-
"turns": 2
|
|
4013
|
-
},
|
|
4014
|
-
"experimental": {
|
|
4015
|
-
"allowSubAgents": true
|
|
4016
|
-
},
|
|
4017
|
-
"strategies": {
|
|
4018
|
-
"purgeErrors": {
|
|
4019
|
-
"turns": 2
|
|
4020
|
-
}
|
|
4021
|
-
}
|
|
4022
|
-
},
|
|
4023
|
-
"performance": {
|
|
4024
|
-
"pruneNotification": "minimal",
|
|
4025
|
-
"compress": {
|
|
4026
|
-
"maxContextLimit": "80%",
|
|
4027
|
-
"minContextLimit": "35%",
|
|
4028
|
-
"nudgeFrequency": 4,
|
|
4029
|
-
"nudgeForce": "strong",
|
|
4030
|
-
"iterationNudgeThreshold": 12
|
|
4031
|
-
},
|
|
4032
|
-
"turnProtection": {
|
|
4033
|
-
"enabled": true,
|
|
4034
|
-
"turns": 3
|
|
4035
|
-
},
|
|
4036
|
-
"experimental": {
|
|
4037
|
-
"allowSubAgents": true
|
|
4038
|
-
},
|
|
4039
|
-
"strategies": {
|
|
4040
|
-
"purgeErrors": {
|
|
4041
|
-
"turns": 2
|
|
4042
|
-
}
|
|
4043
|
-
}
|
|
4044
|
-
},
|
|
4045
|
-
"ultimate": {
|
|
4046
|
-
"pruneNotification": "detailed",
|
|
4047
|
-
"compress": {
|
|
4048
|
-
"maxContextLimit": "85%",
|
|
4049
|
-
"minContextLimit": "40%",
|
|
4050
|
-
"nudgeFrequency": 5,
|
|
4051
|
-
"nudgeForce": "strong",
|
|
4052
|
-
"iterationNudgeThreshold": 15,
|
|
4053
|
-
"protectTags": true
|
|
4054
|
-
},
|
|
4055
|
-
"turnProtection": {
|
|
4056
|
-
"enabled": true,
|
|
4057
|
-
"turns": 5
|
|
4058
|
-
},
|
|
4059
|
-
"experimental": {
|
|
4060
|
-
"allowSubAgents": true
|
|
4061
|
-
},
|
|
4062
|
-
"strategies": {
|
|
4063
|
-
"purgeErrors": {
|
|
4064
|
-
"turns": 4
|
|
4065
|
-
}
|
|
4066
|
-
}
|
|
4067
|
-
},
|
|
4068
|
-
"brutal": {
|
|
4069
|
-
"pruneNotification": "off",
|
|
4070
|
-
"compress": {
|
|
4071
|
-
"maxContextLimit": "20%",
|
|
4072
|
-
"minContextLimit": "10%",
|
|
4073
|
-
"nudgeFrequency": 1,
|
|
4074
|
-
"nudgeForce": "strong",
|
|
4075
|
-
"iterationNudgeThreshold": 1
|
|
4076
|
-
},
|
|
4077
|
-
"turnProtection": {
|
|
4078
|
-
"enabled": false
|
|
4079
|
-
},
|
|
4080
|
-
"experimental": {
|
|
4081
|
-
"allowSubAgents": false
|
|
4082
|
-
},
|
|
4083
|
-
"strategies": {
|
|
4084
|
-
"purgeErrors": {
|
|
4085
|
-
"turns": 1
|
|
4086
|
-
}
|
|
4087
|
-
}
|
|
4088
|
-
}
|
|
4089
|
-
},
|
|
3977
|
+
"default": {},
|
|
4090
3978
|
"type": "object",
|
|
4091
3979
|
"propertyNames": {
|
|
4092
3980
|
"type": "string"
|
|
@@ -4651,6 +4539,66 @@
|
|
|
4651
4539
|
}
|
|
4652
4540
|
]
|
|
4653
4541
|
},
|
|
4542
|
+
"knowledge": {
|
|
4543
|
+
"type": "object",
|
|
4544
|
+
"properties": {
|
|
4545
|
+
"hubs": {
|
|
4546
|
+
"default": [],
|
|
4547
|
+
"type": "array",
|
|
4548
|
+
"items": {
|
|
4549
|
+
"type": "object",
|
|
4550
|
+
"properties": {
|
|
4551
|
+
"name": {
|
|
4552
|
+
"type": "string"
|
|
4553
|
+
},
|
|
4554
|
+
"path": {
|
|
4555
|
+
"type": "string"
|
|
4556
|
+
},
|
|
4557
|
+
"index": {
|
|
4558
|
+
"default": "_index.md",
|
|
4559
|
+
"type": "string"
|
|
4560
|
+
},
|
|
4561
|
+
"scope": {
|
|
4562
|
+
"default": "global",
|
|
4563
|
+
"type": "string",
|
|
4564
|
+
"enum": [
|
|
4565
|
+
"global",
|
|
4566
|
+
"project"
|
|
4567
|
+
]
|
|
4568
|
+
},
|
|
4569
|
+
"mode": {
|
|
4570
|
+
"default": "router-only",
|
|
4571
|
+
"type": "string",
|
|
4572
|
+
"enum": [
|
|
4573
|
+
"router-only",
|
|
4574
|
+
"pinned"
|
|
4575
|
+
]
|
|
4576
|
+
},
|
|
4577
|
+
"exclude": {
|
|
4578
|
+
"default": [],
|
|
4579
|
+
"type": "array",
|
|
4580
|
+
"items": {
|
|
4581
|
+
"type": "string"
|
|
4582
|
+
}
|
|
4583
|
+
}
|
|
4584
|
+
},
|
|
4585
|
+
"required": [
|
|
4586
|
+
"name",
|
|
4587
|
+
"path",
|
|
4588
|
+
"index",
|
|
4589
|
+
"scope",
|
|
4590
|
+
"mode",
|
|
4591
|
+
"exclude"
|
|
4592
|
+
],
|
|
4593
|
+
"additionalProperties": false
|
|
4594
|
+
}
|
|
4595
|
+
}
|
|
4596
|
+
},
|
|
4597
|
+
"required": [
|
|
4598
|
+
"hubs"
|
|
4599
|
+
],
|
|
4600
|
+
"additionalProperties": false
|
|
4601
|
+
},
|
|
4654
4602
|
"matrix_loop": {
|
|
4655
4603
|
"type": "object",
|
|
4656
4604
|
"properties": {
|
|
@@ -4925,7 +4873,7 @@
|
|
|
4925
4873
|
"type": "object",
|
|
4926
4874
|
"properties": {
|
|
4927
4875
|
"enabled": {
|
|
4928
|
-
"default":
|
|
4876
|
+
"default": true,
|
|
4929
4877
|
"type": "boolean"
|
|
4930
4878
|
}
|
|
4931
4879
|
},
|
|
@@ -5095,6 +5043,28 @@
|
|
|
5095
5043
|
],
|
|
5096
5044
|
"additionalProperties": false
|
|
5097
5045
|
},
|
|
5046
|
+
"tool_gating": {
|
|
5047
|
+
"type": "object",
|
|
5048
|
+
"properties": {
|
|
5049
|
+
"bdd_tools": {
|
|
5050
|
+
"type": "boolean"
|
|
5051
|
+
},
|
|
5052
|
+
"pdf_figures": {
|
|
5053
|
+
"type": "boolean"
|
|
5054
|
+
},
|
|
5055
|
+
"look_at": {
|
|
5056
|
+
"type": "boolean"
|
|
5057
|
+
},
|
|
5058
|
+
"preset_tools": {
|
|
5059
|
+
"default": false,
|
|
5060
|
+
"type": "boolean"
|
|
5061
|
+
}
|
|
5062
|
+
},
|
|
5063
|
+
"required": [
|
|
5064
|
+
"preset_tools"
|
|
5065
|
+
],
|
|
5066
|
+
"additionalProperties": false
|
|
5067
|
+
},
|
|
5098
5068
|
"security": {
|
|
5099
5069
|
"type": "object",
|
|
5100
5070
|
"properties": {
|
|
@@ -9,6 +9,7 @@ export declare function createCoreHooks(args: {
|
|
|
9
9
|
inputSecretGuard: ReturnType<typeof import("../../hooks").createInputSecretGuardHook> | null;
|
|
10
10
|
keywordDetector: ReturnType<typeof import("../../hooks").createKeywordDetectorHook> | null;
|
|
11
11
|
contextInjectorMessagesTransform: ReturnType<typeof import("../../features/context-injector").createContextInjectorMessagesTransformHook>;
|
|
12
|
+
knowledgeHubInjector: ReturnType<typeof import("../../hooks").createKnowledgeHubInjectorHook> | null;
|
|
12
13
|
envContextInjector: ReturnType<typeof import("../../hooks").createEnvContextInjectorHook> | null;
|
|
13
14
|
thinkingBlockValidator: ReturnType<typeof import("../../hooks").createThinkingBlockValidatorHook> | null;
|
|
14
15
|
toolPairValidator: ReturnType<typeof import("../../hooks").createToolPairValidatorHook> | null;
|
|
@@ -34,6 +35,8 @@ export declare function createCoreHooks(args: {
|
|
|
34
35
|
taskNotepad: ReturnType<typeof import("../../hooks").createTaskNotepadHook> | null;
|
|
35
36
|
taskEditGuard: ReturnType<typeof import("../../hooks").createTaskEditGuardHook> | null;
|
|
36
37
|
documentReaderGuard: ReturnType<typeof import("../../hooks").createDocumentReaderGuardHook> | null;
|
|
38
|
+
knowledgeHubGuard: ReturnType<typeof import("../../hooks").createKnowledgeHubGuardHook> | null;
|
|
39
|
+
knowledgeHubSearchNudge: ReturnType<typeof import("../../hooks").createKnowledgeHubSearchNudgeHook> | null;
|
|
37
40
|
evolutionWatcher: ReturnType<typeof import("../../hooks").createEvolutionWatcherHook> | null;
|
|
38
41
|
contextWindowMonitor: ReturnType<typeof import("../../hooks").createContextWindowMonitorHook> | null;
|
|
39
42
|
preemptiveCompaction: ReturnType<typeof import("../../hooks").createPreemptiveCompactionHook> | 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, createQualityGateHook, createReadImageResizerHook, createRulesInjectorHook, createSecretLeakGuardHook, createTaskEditGuardHook, createTaskNotepadHook, createTasksTodowriteDisablerHook, createToolOutputTruncatorHook, createWebFetchRedirectGuardHook, createWriteExistingFileGuardHook } from "../../hooks";
|
|
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";
|
|
3
3
|
import type { PluginContext } from "../types";
|
|
4
4
|
export type ToolGuardHooks = {
|
|
5
5
|
backgroundTaskBlocker: ReturnType<typeof createBackgroundTaskBlockerHook> | null;
|
|
@@ -23,6 +23,8 @@ export type ToolGuardHooks = {
|
|
|
23
23
|
taskNotepad: ReturnType<typeof createTaskNotepadHook> | null;
|
|
24
24
|
taskEditGuard: ReturnType<typeof createTaskEditGuardHook> | null;
|
|
25
25
|
documentReaderGuard: ReturnType<typeof createDocumentReaderGuardHook> | null;
|
|
26
|
+
knowledgeHubGuard: ReturnType<typeof createKnowledgeHubGuardHook> | null;
|
|
27
|
+
knowledgeHubSearchNudge: ReturnType<typeof createKnowledgeHubSearchNudgeHook> | null;
|
|
26
28
|
evolutionWatcher: ReturnType<typeof createEvolutionWatcherHook> | null;
|
|
27
29
|
};
|
|
28
30
|
export declare function createToolGuardHooks(args: {
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { MatrixxConfig } from "../../config";
|
|
2
2
|
import { createContextInjectorMessagesTransformHook } from "../../features/context-injector";
|
|
3
|
-
import { createDesignIntentPreserverHook, createEnvContextInjectorHook, createKeywordDetectorHook, createThinkingBlockValidatorHook, createToolPairValidatorHook } from "../../hooks";
|
|
3
|
+
import { createDesignIntentPreserverHook, createEnvContextInjectorHook, createKeywordDetectorHook, createKnowledgeHubInjectorHook, createThinkingBlockValidatorHook, createToolPairValidatorHook } from "../../hooks";
|
|
4
4
|
import { createInputSecretGuardHook } from "../../hooks/input-secret-guard";
|
|
5
5
|
import type { PluginContext } from "../types";
|
|
6
6
|
export type TransformHooks = {
|
|
7
7
|
inputSecretGuard: ReturnType<typeof createInputSecretGuardHook> | null;
|
|
8
8
|
keywordDetector: ReturnType<typeof createKeywordDetectorHook> | null;
|
|
9
9
|
contextInjectorMessagesTransform: ReturnType<typeof createContextInjectorMessagesTransformHook>;
|
|
10
|
+
knowledgeHubInjector: ReturnType<typeof createKnowledgeHubInjectorHook> | null;
|
|
10
11
|
envContextInjector: ReturnType<typeof createEnvContextInjectorHook> | null;
|
|
11
12
|
thinkingBlockValidator: ReturnType<typeof createThinkingBlockValidatorHook> | null;
|
|
12
13
|
toolPairValidator: ReturnType<typeof createToolPairValidatorHook> | null;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/** Directories never descended into during the bounded startup scan. */
|
|
2
|
+
export declare const TOOL_GATING_SKIP_DIRS: readonly string[];
|
|
3
|
+
/** Maximum directory depth visited by the startup scan. */
|
|
4
|
+
export declare const TOOL_GATING_MAX_DEPTH = 4;
|
|
5
|
+
/** Maximum filesystem entries visited before the scan gives up. */
|
|
6
|
+
export declare const TOOL_GATING_MAX_ENTRIES = 2000;
|
|
7
|
+
/** File extensions that trigger look_at registration (lowercase, with leading dot). */
|
|
8
|
+
export declare const LOOK_AT_MEDIA_EXTENSIONS: readonly string[];
|
|
9
|
+
/** File extension that triggers BDD tool registration. */
|
|
10
|
+
export declare const BDD_FILE_EXTENSION = ".feature";
|
|
11
|
+
/** File extension that triggers pdf_extract_figures registration. */
|
|
12
|
+
export declare const PDF_FILE_EXTENSION = ".pdf";
|
|
13
|
+
/**
|
|
14
|
+
* Bounded sync scan: true when a file with one of the given extensions exists
|
|
15
|
+
* under the directory. Skips ignored dirs, caps depth and entries, exits early
|
|
16
|
+
* on the first match. Never throws — returns false on any filesystem error.
|
|
17
|
+
*/
|
|
18
|
+
export declare function directoryHasMatch(directory: string | undefined, extensions: readonly string[]): boolean;
|
|
19
|
+
/** True unless the construct agent is listed in disabled_agents (case-insensitive). */
|
|
20
|
+
export declare function isConstructAgentEnabled(disabledAgents: readonly string[] | undefined): boolean;
|
|
21
|
+
/** BDD tools: explicit override wins, otherwise auto iff a *.feature file is found. */
|
|
22
|
+
export declare function shouldEnableBddTools(directory: string | undefined, override: boolean | undefined): boolean;
|
|
23
|
+
/** pdf_extract_figures: explicit override wins, otherwise auto iff a *.pdf file is found. */
|
|
24
|
+
export declare function shouldEnablePdfFigures(directory: string | undefined, override: boolean | undefined): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* look_at: explicit true forces registration (bypasses both gates), explicit
|
|
27
|
+
* false forces skip, otherwise requires construct enabled AND a media file.
|
|
28
|
+
*/
|
|
29
|
+
export declare function shouldEnableLookAt(directory: string | undefined, constructEnabled: boolean, override: boolean | undefined): boolean;
|
|
30
|
+
/** knowledge_hub_confirm: register iff at least one knowledge hub is configured. */
|
|
31
|
+
export declare function shouldEnableKnowledgeHubConfirm(hubs: readonly unknown[] | undefined): boolean;
|
|
32
|
+
/** preset: opt-in only, default false. */
|
|
33
|
+
export declare function shouldEnablePresetTools(override: boolean | undefined): boolean;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How DCP compression is available. "guided" = DCP auto-mode (nudges drive
|
|
3
|
+
* DCP's `compress` tool); "manual" = DCP manualMode (tool exists,
|
|
4
|
+
* trigger-only, no nudges); "none" = no `compress` tool exists.
|
|
5
|
+
*/
|
|
6
|
+
export type DcpCompressionMode = "guided" | "manual" | "none";
|
|
7
|
+
export declare function _setDcpConfigPathForTesting(p: string | null | undefined): void;
|
|
8
|
+
export declare function _resetDcpGuidanceForTesting(): void;
|
|
9
|
+
/**
|
|
10
|
+
* How DCP compression is available in this environment.
|
|
11
|
+
* True model (DCP owns the only `compress` tool — the host has none):
|
|
12
|
+
* - "guided": DCP auto-mode — never bare without message IDs; proactive on closed sections with IDs + usage signals.
|
|
13
|
+
* - "manual": DCP manualMode — call `compress` only after the manual trigger; no nudges.
|
|
14
|
+
* - "none": no `compress` tool exists — never call it.
|
|
15
|
+
*/
|
|
16
|
+
export declare function resolveDcpCompressionMode(): DcpCompressionMode;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { DcpConfig } from "../../config/schema/dcp";
|
|
1
|
+
import type { DcpConfig } from "../config/schema/dcp";
|
|
3
2
|
export interface DcpSwitchProfileOptions {
|
|
4
3
|
pluginConfig?: {
|
|
5
4
|
dcp?: DcpConfig;
|
|
@@ -12,4 +11,3 @@ export declare function deepMergeProfile(builtin: Record<string, unknown>, overr
|
|
|
12
11
|
* a full inline DCP config to ~/.config/opencode/dcp.jsonc.
|
|
13
12
|
*/
|
|
14
13
|
export declare function switchProfile(profile: string, options?: DcpSwitchProfileOptions): string;
|
|
15
|
-
export declare function createDcpSwitchProfileTool(options?: DcpSwitchProfileOptions): Record<string, ToolDefinition>;
|
package/dist/shared/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export * from "./config-errors";
|
|
|
6
6
|
export * from "./connected-providers-cache";
|
|
7
7
|
export * from "./context-mode-enforcement";
|
|
8
8
|
export * from "./data-path";
|
|
9
|
+
export * from "./dcp-switch-profile";
|
|
9
10
|
export * from "./deep-merge";
|
|
10
11
|
export * from "./delay";
|
|
11
12
|
export * from "./dynamic-truncator";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare const BACKGROUND_OUTPUT_DESCRIPTION = "Get output from background task. Use full_session=true to fetch session messages with filters. System notifies on completion, so block=true rarely needed.";
|
|
2
2
|
export declare const BACKGROUND_CANCEL_DESCRIPTION = "Cancel running background task(s). Use all=true to cancel ALL before final answer.";
|
|
3
3
|
export declare const BACKGROUND_REVIVE_DESCRIPTION = "Revive a retained terminal background task with a NEW instruction.\n\nCall with no arguments (or list=true) to DISCOVER revivable tasks.\n\nRevivable: cancelled, stopped, interrupt, error, completed \u2014 provided the task still has a session ID.\nNot revivable: pending/running (still active \u2014 use background_output), statusUncertain (unknown liveness \u2014 pass force=true to acknowledge), and tasks that never produced a session (e.g. queue-saturated).\n\nHandles are retained for 30 minutes, so revive works after a task was pruned or the plugin restarted.";
|
|
4
|
+
export declare const BACKGROUND_WAIT_ALL_DESCRIPTION = "Wait for ALL running/pending background tasks in the current session to complete. Polls until all tasks reach a terminal state or timeout. Use this BEFORE background_cancel(all=true) to allow exploration tasks to finish and return their results.";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export * from "./constants";
|
|
2
|
-
export { createBackgroundCancel, createBackgroundOutput, createBackgroundRevive, } from "./tools";
|
|
2
|
+
export { createBackgroundCancel, createBackgroundOutput, createBackgroundRevive, createBackgroundWaitAll, } from "./tools";
|
|
3
3
|
export type * from "./types";
|
|
@@ -2,3 +2,4 @@ export type { BackgroundCancelClient, BackgroundOutputClient, BackgroundOutputMa
|
|
|
2
2
|
export { createBackgroundCancel } from "./create-background-cancel";
|
|
3
3
|
export { createBackgroundOutput } from "./create-background-output";
|
|
4
4
|
export { createBackgroundRevive } from "./create-background-revive";
|
|
5
|
+
export { createBackgroundWaitAll } from "./create-background-wait-all";
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import type { AvailableCategory, AvailableSkill } from "../../agents/dynamic-agent-prompt-builder";
|
|
2
2
|
import type { CategoryConfig } from "../../config/schema";
|
|
3
|
+
export declare const TDD_TEST_FIRST_APPEND = "<TDD_Test_First>\n**NO IMPLEMENTATION WITHOUT A FAILING TEST FIRST.**\n\nMandatory RED-GREEN-REFACTOR cycle:\n- RED: write a failing test first; run it and confirm it fails for the right reason.\n- GREEN: write the minimum code to make the test pass.\n- REFACTOR: clean up; tests stay green throughout.\n\nEvery test uses //#given (setup), //#when (action), //#then (assert) markers.\nVerify with `bun test` (0 failures) before reporting done.\n</TDD_Test_First>";
|
|
4
|
+
/**
|
|
5
|
+
* Code-writing categories requiring TDD enforcement (issue #127).
|
|
6
|
+
* Single source of truth for banner gating + fail-closed guard.
|
|
7
|
+
*/
|
|
8
|
+
export declare function isCodeWritingCategory(category: string | undefined): boolean;
|
|
3
9
|
export declare const DEFAULT_CATEGORIES: Record<string, CategoryConfig>;
|
|
4
10
|
export declare const CATEGORY_PROMPT_APPENDS: Record<string, string>;
|
|
5
11
|
export declare const CATEGORY_DESCRIPTIONS: Record<string, string>;
|
|
@@ -2,5 +2,6 @@ import type { BuildSystemContentInput } from "./types";
|
|
|
2
2
|
/**
|
|
3
3
|
* Build the system content to inject into the agent prompt.
|
|
4
4
|
* Combines skill content, category prompt append, and plan agent system prepend.
|
|
5
|
+
* Appends the TDD test-first banner LAST only for code-writing categories.
|
|
5
6
|
*/
|
|
6
7
|
export declare function buildSystemContent(input: BuildSystemContentInput): string | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -3,4 +3,10 @@ import type { DelegateTaskToolOptions } from "./types";
|
|
|
3
3
|
export { resolveCategoryConfig } from "./categories";
|
|
4
4
|
export { buildSystemContent } from "./prompt-builder";
|
|
5
5
|
export type { BuildSystemContentInput, DelegateTaskToolOptions, SyncSessionCreatedEvent } from "./types";
|
|
6
|
+
/**
|
|
7
|
+
* Fail-closed TDD enforcement for code-writing delegations (issue #127).
|
|
8
|
+
* Returns a hard error string when the delegation must be rejected, else null.
|
|
9
|
+
* Complexity: 1 — single exception path (source without the skill).
|
|
10
|
+
*/
|
|
11
|
+
export declare function requireTddEnforcerForCodeWriting(category: string | undefined, loadSkills: string[]): string | null;
|
|
6
12
|
export declare function createDelegateTask(options: DelegateTaskToolOptions): ToolDefinition;
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export { createGlobTools } from "./glob";
|
|
|
9
9
|
export { createGrepTools } from "./grep";
|
|
10
10
|
export { createHandoffTools } from "./handoff";
|
|
11
11
|
export { interactive_bash, startBackgroundCheck as startTmuxCheck } from "./interactive-bash";
|
|
12
|
+
export { createKnowledgeHubConfirmTool } from "./knowledge-hub-confirm";
|
|
12
13
|
export { createPdfExtractFiguresTool } from "./pdf-extract-figures";
|
|
13
14
|
export { createPlanCreateTool } from "./plan/plan-create";
|
|
14
15
|
export { createPlanDeleteTool } from "./plan/plan-delete";
|
|
@@ -25,7 +26,6 @@ import type { PluginInput, ToolDefinition } from "@opencode-ai/plugin";
|
|
|
25
26
|
import type { BackgroundManager } from "../features/background-agent";
|
|
26
27
|
type OpencodeClient = PluginInput["client"];
|
|
27
28
|
export { createAssemblyTool } from "./assembly";
|
|
28
|
-
export { createDcpSwitchProfileTool } from "./dcp-switch-profile";
|
|
29
29
|
export { createDelegateTask } from "./delegate-task";
|
|
30
30
|
export { createHashlineEditTool } from "./hashline-edit";
|
|
31
31
|
export { createLookAt } from "./look-at";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createKnowledgeHubConfirmTool } from "./tools";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
+
import { type ToolDefinition } from "@opencode-ai/plugin/tool";
|
|
3
|
+
/**
|
|
4
|
+
* `knowledge_hub_confirm` tool — records a user-confirmed override for the
|
|
5
|
+
* knowledge-hub read-only guard.
|
|
6
|
+
*
|
|
7
|
+
* Call this ONLY after the user explicitly approved the write via the
|
|
8
|
+
* question tool. It records a session-scoped approval (default TTL 10 min)
|
|
9
|
+
* for the resolved absolute path, then the agent retries the blocked write
|
|
10
|
+
* and the guard lets it through.
|
|
11
|
+
*/
|
|
12
|
+
export declare function createKnowledgeHubConfirmTool(ctx: PluginInput): ToolDefinition;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-matrixx",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.11",
|
|
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 declare const BDD_BACKEND_TEMPLATE = "# /bdd-backend\n\nGenerate typed API services from one or more BDD Contract JSON files.\n\n## Usage\n\nSingle file:\n```\n/bdd-backend <contract.json> --out <out-dir>\n```\n\nBatch (directory or glob):\n```\n/bdd-backend <dir> --out <out-dir>\n/bdd-backend \"<dir>/**/*.contract.json\" --out <out-dir>\n```\n\n## Workflow\n\nSingle file:\n1. Read the Contract JSON\n2. Extract @api:endpoint and @api:response annotations\n3. Generate typed service files with Zod request/response schemas\n4. One service function per endpoint\n5. Report generated file paths\n\nBatch input (directory or glob):\n1. Expand the input into a list of .contract.json files\n2. For each contract, run the single-file workflow above\n3. Use background subagents (`task(run_in_background=true)`) to run each in parallel (up to 5 concurrent)\n4. Wait for all to finish, then collect results and report a summary\n\n## Output\n\nSingle file: TypeScript service files (.ts) with Zod validation schemas for each API endpoint.\n\nBatch: per-feature service subdirectory tree under `<out-dir>/<feature>/backend/`.\n\n## Git Actions (HARD RULE)\nNEVER run `git commit`, `git add`, `git push`, `git rebase`, `git reset`, `git tag`, or any other git command in this command context. The pipeline runner is responsible for version control. You may only create/edit the generated files in the target output directory.\n";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const BDD_CONTRACT_TEMPLATE = "# /bdd-contract\n\nGenerate BDD Contract JSON from one or more Gherkin .feature files. The .feature file must be 100% pure Gherkin (no '# @annotation' comments). The bdd-contract agent infers all annotations (api/ui/state/assumptions) via LLM reasoning from feature content.\n\n## Usage\n\nSingle file:\n```\n/bdd-contract <feature-path> [--force]\n```\n\nBatch (directory or glob):\n```\n/bdd-contract <dir> [--force]\n/bdd-contract \"<dir>/**/*.feature\" [--force]\n```\n\n## Workflow\n\nSingle file:\n1. Parse the .feature file using bdd_parse_gherkin tool (deterministic AST)\n2. Create initial Contract JSON using bdd_create_contract tool (deterministic, empty annotations)\n3. ENRICH the Contract: the bdd-contract agent infers annotations (api/ui/state/assumptions) via LLM reasoning from feature content and edits the Contract JSON file in place\n4. **VALIDATE**: call bdd_validate_contract on the file -- if it returns errors, fix the contract and re-validate. The contract must conform to the strict ContractSchema (all annotation field names must match the required naming conventions: kebab-case for routes/testIds, camelCase for state variables, dotted kebab-case for string keys).\n5. Report the Contract file path, key features identified, and annotations inferred\n\nBatch input (directory or glob):\n1. Expand the input into a list of .feature files\n2. For each .feature file, run the single-file workflow above\n3. Report a summary of all generated contracts (count, paths, any failures)\n\n## Output\n\nSingle file: a `<file>.contract.json` alongside the source .feature file, conforming to ContractSchema v1 with schemaVersion: 1, scenarios, and LLM-inferred annotations.\n\nBatch: one contract file per source .feature, written next to each source file.\n\n## Git Actions (HARD RULE)\nNEVER run `git commit`, `git add`, `git push`, `git rebase`, `git reset`, `git tag`, or any other git command in this command context. The pipeline runner is responsible for version control. You may only create/edit the generated contract JSON.\n";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const BDD_FRONTEND_TEMPLATE = "# /bdd-frontend\n\nGenerate React components and a dev preview server from one or more BDD Contract JSON files.\n\n## Usage\n\nSingle file:\n```\n/bdd-frontend <contract.json>\n```\n\nBatch (directory or glob):\n```\n/bdd-frontend <dir> --out <out-dir>\n/bdd-frontend \"<dir>/**/*.contract.json\" --out <out-dir>\n```\n\n## Workflow\n\nSingle file:\n1. Read the Contract JSON\n2. Extract @ui:* annotations (routes, testIds, strings)\n3. Generate React components for each route/feature\n4. Implement form fields from state variables\n5. Apply test IDs and accessibility attributes\n6. Generate a preview-server.ts for visual review\n\nBatch input (directory or glob):\n1. Expand the input into a list of .contract.json files\n2. For each contract, run the single-file workflow above\n3. Use background subagents (`task(run_in_background=true)`) to run each in parallel (up to 5 concurrent)\n4. Wait for all to finish, then collect results and report a summary\n\n## Output\n\nSingle file: React component files (.tsx) with TypeScript props, design tokens, data-testid attributes, and a preview-server.ts for visual review.\n\nBatch: per-feature component subdirectory tree under `<out-dir>/<feature>/components/`, with one preview-server.ts per feature.\n\n## Git Actions (HARD RULE)\nNEVER run `git commit`, `git add`, `git push`, `git rebase`, `git reset`, `git tag`, or any other git command in this command context. The pipeline runner is responsible for version control. You may only create/edit the generated files in the target output directory.\n";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const BDD_TESTS_TEMPLATE = "# /bdd-tests\n\nGenerate Cucumber step definitions and page objects from one or more BDD Contract JSON files.\n\n## Usage\n\nSingle file:\n```\n/bdd-tests <contract.json> --out <out-dir>\n```\n\nBatch (directory or glob):\n```\n/bdd-tests <dir> --out <out-dir>\n/bdd-tests \"<dir>/**/*.contract.json\" --out <out-dir>\n```\n\n## Workflow\n\nSingle file:\n1. Read the Contract JSON file\n2. Extract feature scenarios and their steps\n3. Generate Cucumber step definition files (Given/When/Then/And/But)\n4. Generate page object classes for UI interactions\n5. Generate `cucumber.cjs` (CommonJS, NOT `cucumber.js`) + a per-feature `Dockerfile` + `run-tests.sh` so the tests are runnable in CI and locally\n6. Verify with `npx cucumber-js` via bash (use the generated `run-tests.sh` if it exists, else invoke cucumber directly)\n\nBatch input (directory or glob):\n1. Expand the input into a list of .contract.json files\n2. For each contract, run the single-file workflow above (including the per-feature Dockerfile + run-tests.sh generation)\n3. Use background subagents (`task(run_in_background=true)`) to run each in parallel (up to 5 concurrent)\n4. Wait for all to finish and collect results\n5. AFTER all per-feature runs finish, generate TWO parent-shared files at the input directory root:\n - `<input-dir>/Dockerfile` -- same base image as the per-feature one, CMD points to the parent run-tests.sh\n - `<input-dir>/run-tests.sh` -- iterates every feature subdir that has a run-tests.sh and invokes it in sequence (with BDD_FEATURE filter support)\n6. Report a summary that lists the per-feature outputs AND the parent batch runner\n\n## Output\n\nSingle file: `<out-dir>/<feature>/` containing `cucumber.cjs`, `Dockerfile`, `run-tests.sh`, plus `tests/` (step definitions, page objects, world, hooks).\n\nBatch: per-feature subdirectory tree under `<input-dir>/<feature>/` with the same layout for each feature, PLUS parent-shared `<input-dir>/Dockerfile` and `<input-dir>/run-tests.sh` for running every feature in one go.\n\n## Git Actions (HARD RULE)\nNEVER run `git commit`, `git add`, `git push`, `git rebase`, `git reset`, `git tag`, or any other git command in this command context. The pipeline runner is responsible for version control. You may only create/edit the generated files in the target output directory.\n";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const DCP_PROFILE_TEMPLATE = "You are switching the active DCP (Dynamic Context Pruning) profile tier.\n\nThis command is provided by the Matrixx plugin. It uses the built-in `dcp_switch_profile` tool to apply DCP profile configurations \u2014 no external scripts needed.\n\n## Step 1: Verify DCP is installed\n\nCheck whether the DCP plugin is installed at the standard OpenCode plugin location:\n\n```bash\nif [ ! -d \"$HOME/.config/opencode/node_modules/@tarquinen/opencode-dcp\" ]; then\n echo \"DCP is not installed at the standard OpenCode plugin location.\" >&2\n echo \"Install it with: npm install --prefix ~/.config/opencode @tarquinen/opencode-dcp\" >&2\n exit 1\nfi\n```\n\nIf the directory does not exist, stop immediately and report the error to the user. Do not proceed.\n\n## Step 2: Determine the target profile\n\nParse the arguments passed to this command. The user invoked `/dcp-profile <arguments>` where `<arguments>` is the first positional argument.\n\n- If the argument is a known profile name (one of: economy, balanced, performance, ultimate), use it directly.\n- If the argument is empty or missing, read `dcp.default_profile` from the user's `matrixx.jsonc` config; if absent, default to `balanced`.\n- If the argument is not a recognized profile name, list the available profiles and stop. Do NOT guess or pass invalid names.\n\n## Step 3: Call the built-in `dcp_switch_profile` tool\n\nUse the `dcp_switch_profile` tool with the resolved profile name. This tool reads profile parameters from the Matrixx plugin configuration and writes the full inline DCP config to `~/.config/opencode/dcp.jsonc`.\n\nThe tool will handle all file operations \u2014 you do NOT need to run any external scripts or edit DCP config files directly.\n\n## Step 4: Confirm and instruct\n\nAfter a successful switch:\n\n1. Report the tool's output to the user.\n2. Tell the user that the new DCP configuration will take effect after they restart their OpenCode session (the active session has already loaded the previous config into memory).\n3. Do not attempt to reload DCP in-place; a session restart is required.\n\n## Important constraints\n\n- Use the built-in `dcp_switch_profile` tool. Do NOT bypass it by editing DCP config files directly.\n- Do not install, upgrade, or modify the DCP plugin from this command. If the user needs to install or upgrade DCP, instruct them to run `opencode plugin @tarquinen/opencode-dcp@<version>` (or use `npm install --prefix ~/.config/opencode` for cached installs).\n";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { createDcpSwitchProfileTool } from "./tools";
|