opencode-matrixx 2.5.0 → 2.6.1
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 +184 -8
- package/dist/agents/dynamic-agent-prompt-builder.d.ts +3 -0
- package/dist/cli/doctor/checks/auth.d.ts +2 -0
- package/dist/cli/doctor/checks/config.d.ts +2 -0
- package/dist/cli/doctor/checks/context-mode.d.ts +2 -0
- package/dist/cli/doctor/checks/dcp.d.ts +2 -0
- package/dist/cli/doctor/checks/docker.d.ts +2 -0
- package/dist/cli/doctor/checks/headroom.d.ts +2 -0
- package/dist/cli/doctor/checks/helpers.d.ts +2 -0
- package/dist/cli/doctor/checks/index.d.ts +16 -0
- package/dist/cli/doctor/checks/mcp.d.ts +2 -0
- package/dist/cli/doctor/checks/optional.d.ts +2 -0
- package/dist/cli/doctor/checks/plugin.d.ts +2 -0
- package/dist/cli/doctor/checks/rtk.d.ts +2 -0
- package/dist/cli/doctor/checks/runtime.d.ts +2 -0
- package/dist/cli/doctor/checks/tmux.d.ts +2 -0
- package/dist/cli/doctor/format.d.ts +3 -0
- package/dist/cli/doctor/index.d.ts +9 -0
- package/dist/cli/doctor/types.d.ts +24 -0
- package/dist/cli/index.d.ts +14 -0
- package/dist/cli/install/index.d.ts +12 -0
- package/dist/cli/setup/config-writer.d.ts +12 -0
- package/dist/cli/setup/config-writer.test.d.ts +1 -0
- package/dist/cli/setup/constants.d.ts +8 -0
- package/dist/cli/setup/deps.d.ts +8 -0
- package/dist/cli/setup/deps.test.d.ts +1 -0
- package/dist/cli/setup/index.d.ts +8 -0
- package/dist/cli/setup/index.test.d.ts +1 -0
- package/dist/cli/setup/opencode-sync.d.ts +9 -0
- package/dist/cli/setup/opencode-sync.test.d.ts +1 -0
- package/dist/cli/setup/prompts.d.ts +4 -0
- package/dist/cli/setup/prompts.test.d.ts +1 -0
- package/dist/cli/setup/types.d.ts +26 -0
- package/dist/cli.js +18983 -0
- package/dist/config/index.d.ts +1 -1
- package/dist/config/schema/evolution.d.ts +89 -0
- package/dist/config/schema/experimental.d.ts +1 -1
- package/dist/config/schema/headroom.d.ts +23 -0
- package/dist/config/schema/hooks.d.ts +7 -1
- package/dist/config/schema/matrixx-config.d.ts +60 -8
- package/dist/config/schema/morpheus.d.ts +8 -0
- package/dist/config/schema.d.ts +3 -3
- package/dist/create-hooks.d.ts +6 -1
- package/dist/features/background-agent/error-helpers.d.ts +0 -2
- package/dist/features/builtin-commands/templates/cleanup-tasks.d.ts +1 -0
- package/dist/features/builtin-commands/templates/evolution.d.ts +1 -0
- package/dist/features/builtin-commands/templates/task-list.d.ts +1 -0
- package/dist/features/builtin-commands/types.d.ts +1 -1
- package/dist/features/evolution/compressor/index.d.ts +5 -0
- package/dist/features/evolution/compressor/interface.d.ts +5 -0
- package/dist/features/evolution/compressor/llm.d.ts +12 -0
- package/dist/features/evolution/evaluator.d.ts +11 -0
- package/dist/features/evolution/index.d.ts +7 -0
- package/dist/features/evolution/pipeline.d.ts +7 -0
- package/dist/features/evolution/store.d.ts +22 -0
- package/dist/features/evolution/types.d.ts +51 -0
- package/dist/features/evolution/writer.d.ts +20 -0
- package/dist/features/task-storage/storage.d.ts +12 -2
- package/dist/features/task-storage/types.d.ts +3 -2
- package/dist/features/task-toast-manager/types.d.ts +2 -2
- package/dist/hooks/anthropic-context-window-limit-recovery/message-builder.d.ts +0 -1
- package/dist/hooks/anthropic-context-window-limit-recovery/tool-part-types.d.ts +2 -1
- package/dist/hooks/compaction-todo-preserver/hook.d.ts +13 -0
- package/dist/hooks/compaction-todo-preserver/index.d.ts +1 -1
- package/dist/hooks/evolution-compressor/index.d.ts +15 -0
- package/dist/hooks/evolution-hitl/index.d.ts +12 -0
- package/dist/hooks/evolution-quality-gate/index.d.ts +6 -0
- package/dist/hooks/evolution-watcher/index.d.ts +21 -0
- package/dist/hooks/evolution-watcher/utils.d.ts +5 -0
- package/dist/hooks/index.d.ts +7 -1
- package/dist/hooks/keyword-detector/analyze/default.d.ts +1 -1
- package/dist/hooks/keyword-detector/constants.d.ts +1 -1
- package/dist/hooks/keyword-detector/search/default.d.ts +1 -1
- package/dist/hooks/keyword-detector/ultrawork/deepseek.d.ts +16 -0
- package/dist/hooks/keyword-detector/ultrawork/default.d.ts +5 -2
- package/dist/hooks/keyword-detector/ultrawork/gemini.d.ts +12 -0
- package/dist/hooks/keyword-detector/ultrawork/glm.d.ts +11 -0
- package/dist/hooks/keyword-detector/ultrawork/gpt5.2.d.ts +4 -7
- package/dist/hooks/keyword-detector/ultrawork/index.d.ts +11 -3
- package/dist/hooks/keyword-detector/ultrawork/mimo.d.ts +16 -0
- package/dist/hooks/keyword-detector/ultrawork/source-detector.d.ts +17 -5
- package/dist/hooks/matrix-loop/with-timeout.d.ts +1 -1
- package/dist/hooks/mcp-startup-notification/index.d.ts +9 -0
- package/dist/hooks/session-recovery/types.d.ts +2 -1
- package/dist/hooks/task-continuation-enforcer/abort-detection.d.ts +4 -0
- package/dist/hooks/task-continuation-enforcer/constants.d.ts +10 -0
- package/dist/hooks/task-continuation-enforcer/continuation-injection.d.ts +12 -0
- package/dist/hooks/task-continuation-enforcer/countdown.d.ts +14 -0
- package/dist/hooks/task-continuation-enforcer/handler.d.ts +16 -0
- package/dist/hooks/task-continuation-enforcer/idle-event.d.ts +11 -0
- package/dist/hooks/task-continuation-enforcer/index.d.ts +6 -0
- package/dist/hooks/task-continuation-enforcer/message-directory.d.ts +1 -0
- package/dist/hooks/task-continuation-enforcer/non-idle-events.d.ts +6 -0
- package/dist/hooks/task-continuation-enforcer/session-state.d.ts +10 -0
- package/dist/hooks/task-continuation-enforcer/todo.d.ts +5 -0
- package/dist/hooks/task-continuation-enforcer/types.d.ts +60 -0
- package/dist/hooks/task-edit-guard/constants.d.ts +2 -0
- package/dist/hooks/task-edit-guard/hook.d.ts +2 -0
- package/dist/hooks/task-edit-guard/index.d.ts +2 -0
- package/dist/hooks/think-mode/types.d.ts +3 -0
- package/dist/index.js +9302 -6408
- package/dist/matrixx.schema.json +5425 -0
- package/dist/mcp/index.d.ts +10 -1
- package/dist/mcp/mcp-startup-state.d.ts +4 -0
- package/dist/mcp/mcp-validator.d.ts +13 -0
- package/dist/plugin/hooks/create-continuation-hooks.d.ts +4 -1
- package/dist/plugin/hooks/create-core-hooks.d.ts +3 -1
- package/dist/plugin/hooks/create-session-hooks.d.ts +2 -1
- package/dist/plugin/hooks/create-tool-guard-hooks.d.ts +3 -2
- package/dist/plugin-handlers/agent-config-handler.d.ts +1 -0
- package/dist/shared/delay.d.ts +1 -0
- package/dist/shared/error-formatting.d.ts +1 -0
- package/dist/shared/format-bytes.d.ts +1 -0
- package/dist/shared/format-bytes.test.d.ts +1 -0
- package/dist/shared/index.d.ts +7 -9
- package/dist/shared/is-abort-error.test.d.ts +1 -0
- package/dist/shared/model-resolution-pipeline.d.ts +26 -1
- package/dist/shared/opencode-config-dir.d.ts +13 -2
- package/dist/shared/sentinels.d.ts +2 -0
- package/dist/shared/session-state.d.ts +15 -0
- package/dist/shared/status-types.d.ts +1 -0
- package/dist/shared/system-directive.d.ts +1 -0
- package/dist/shared/task-system-gating.d.ts +3 -0
- package/dist/shared/task-system-gating.test.d.ts +1 -0
- package/dist/shared/with-timeout.d.ts +1 -0
- package/dist/shared/with-timeout.test.d.ts +1 -0
- package/dist/tools/background-task/delay.d.ts +1 -1
- package/dist/tools/index.d.ts +2 -1
- package/dist/tools/pdf-extract-figures/index.d.ts +1 -0
- package/dist/tools/pdf-extract-figures/tools.d.ts +11 -0
- package/dist/tools/task/index.d.ts +1 -1
- package/dist/tools/task/task-cleanup.d.ts +4 -0
- package/dist/tools/task/task-cleanup.test.d.ts +1 -0
- package/dist/tools/task/task-get.d.ts +2 -1
- package/dist/tools/task/task-list.d.ts +2 -1
- package/dist/tools/task/types.d.ts +7 -5
- package/package.json +16 -4
- package/dist/config/schema/model-capabilities.d.ts +0 -8
- package/dist/hooks/runtime-fallback/is-abort-error.d.ts +0 -1
- package/dist/hooks/todo-description-override/description.d.ts +0 -1
- package/dist/hooks/todo-description-override/hook.d.ts +0 -8
- package/dist/hooks/todo-description-override/index.d.ts +0 -1
- package/dist/shared/is-object.d.ts +0 -1
- package/dist/shared/model-resolution-types.d.ts +0 -27
- package/dist/shared/model-resolver.d.ts +0 -24
- package/dist/shared/opencode-config-dir-types.d.ts +0 -13
- package/dist/shared/session-model-state.d.ts +0 -6
- package/dist/shared/session-temperature-store.d.ts +0 -3
- package/dist/shared/session-tools-store.d.ts +0 -3
- package/dist/tools/task/todo-sync.d.ts +0 -16
- /package/dist/{hooks/architect → shared}/is-abort-error.d.ts +0 -0
package/dist/config/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { expandPreset, PRESET_NAMES, type PresetName } from "./presets";
|
|
2
|
-
export type { AgentDefinitions, AgentName, AgentOverrideConfig, AgentOverrides, BuiltinCommandName, EnvFileGuardConfig, ExperimentalConfig, HookName, MatrixLoopConfig, MatrixxConfig, McpName,
|
|
2
|
+
export type { AgentDefinitions, AgentName, AgentOverrideConfig, AgentOverrides, BuiltinCommandName, EnvFileGuardConfig, ExperimentalConfig, HookName, MatrixLoopConfig, MatrixxConfig, McpName, MorpheusAgentConfig, MorpheusConfig, MorpheusTasksConfig, RuntimeFallbackConfig, SecretScanningConfig, SecurityConfig, TmuxConfig, TmuxLayout, } from "./schema";
|
|
3
3
|
export { AgentOverrideConfigSchema, AgentOverridesSchema, BuiltinCommandNameSchema, ExperimentalConfigSchema, HookNameSchema, MatrixLoopConfigSchema, MatrixxConfigSchema, McpNameSchema, MorpheusAgentConfigSchema, RuntimeFallbackConfigSchema, SecurityConfigSchema, TmuxConfigSchema, TmuxLayoutSchema, } from "./schema";
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const EvolutionWatcherConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
3
|
+
maxArgChars: z.ZodDefault<z.ZodNumber>;
|
|
4
|
+
maxOutputChars: z.ZodDefault<z.ZodNumber>;
|
|
5
|
+
skipTools: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
6
|
+
}, z.core.$strip>>;
|
|
7
|
+
export type EvolutionWatcherConfig = z.infer<typeof EvolutionWatcherConfigSchema>;
|
|
8
|
+
export declare const EvolutionCompressorConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
9
|
+
provider: z.ZodDefault<z.ZodEnum<{
|
|
10
|
+
llm: "llm";
|
|
11
|
+
"dspy-gepa": "dspy-gepa";
|
|
12
|
+
}>>;
|
|
13
|
+
model: z.ZodOptional<z.ZodString>;
|
|
14
|
+
minTraces: z.ZodDefault<z.ZodNumber>;
|
|
15
|
+
maxInputTokens: z.ZodDefault<z.ZodNumber>;
|
|
16
|
+
trigger: z.ZodDefault<z.ZodEnum<{
|
|
17
|
+
compacting: "compacting";
|
|
18
|
+
idle: "idle";
|
|
19
|
+
both: "both";
|
|
20
|
+
}>>;
|
|
21
|
+
}, z.core.$strip>>;
|
|
22
|
+
export type EvolutionCompressorConfig = z.infer<typeof EvolutionCompressorConfigSchema>;
|
|
23
|
+
export declare const EvolutionWriterConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
24
|
+
outputDir: z.ZodDefault<z.ZodString>;
|
|
25
|
+
globalSkills: z.ZodDefault<z.ZodBoolean>;
|
|
26
|
+
allowToolGeneration: z.ZodDefault<z.ZodBoolean>;
|
|
27
|
+
allowAgentGeneration: z.ZodDefault<z.ZodBoolean>;
|
|
28
|
+
}, z.core.$strip>>;
|
|
29
|
+
export type EvolutionWriterConfig = z.infer<typeof EvolutionWriterConfigSchema>;
|
|
30
|
+
export declare const EvolutionGovernanceConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
31
|
+
requireApproval: z.ZodDefault<z.ZodBoolean>;
|
|
32
|
+
autoPromote: z.ZodDefault<z.ZodBoolean>;
|
|
33
|
+
autoPromoteThreshold: z.ZodDefault<z.ZodNumber>;
|
|
34
|
+
minConfidence: z.ZodDefault<z.ZodNumber>;
|
|
35
|
+
}, z.core.$strip>>;
|
|
36
|
+
export type EvolutionGovernanceConfig = z.infer<typeof EvolutionGovernanceConfigSchema>;
|
|
37
|
+
export declare const EvolutionRetentionConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
38
|
+
traceDays: z.ZodDefault<z.ZodNumber>;
|
|
39
|
+
maxPending: z.ZodDefault<z.ZodNumber>;
|
|
40
|
+
}, z.core.$strip>>;
|
|
41
|
+
export type EvolutionRetentionConfig = z.infer<typeof EvolutionRetentionConfigSchema>;
|
|
42
|
+
export declare const EvolutionBudgetConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
43
|
+
maxCompressionsPerHour: z.ZodDefault<z.ZodNumber>;
|
|
44
|
+
maxCostCentsPerDay: z.ZodDefault<z.ZodNumber>;
|
|
45
|
+
}, z.core.$strip>>;
|
|
46
|
+
export type EvolutionBudgetConfig = z.infer<typeof EvolutionBudgetConfigSchema>;
|
|
47
|
+
export declare const EvolutionConfigSchema: z.ZodObject<{
|
|
48
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
49
|
+
watcher: z.ZodDefault<z.ZodObject<{
|
|
50
|
+
maxArgChars: z.ZodDefault<z.ZodNumber>;
|
|
51
|
+
maxOutputChars: z.ZodDefault<z.ZodNumber>;
|
|
52
|
+
skipTools: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
53
|
+
}, z.core.$strip>>;
|
|
54
|
+
compressor: z.ZodDefault<z.ZodObject<{
|
|
55
|
+
provider: z.ZodDefault<z.ZodEnum<{
|
|
56
|
+
llm: "llm";
|
|
57
|
+
"dspy-gepa": "dspy-gepa";
|
|
58
|
+
}>>;
|
|
59
|
+
model: z.ZodOptional<z.ZodString>;
|
|
60
|
+
minTraces: z.ZodDefault<z.ZodNumber>;
|
|
61
|
+
maxInputTokens: z.ZodDefault<z.ZodNumber>;
|
|
62
|
+
trigger: z.ZodDefault<z.ZodEnum<{
|
|
63
|
+
compacting: "compacting";
|
|
64
|
+
idle: "idle";
|
|
65
|
+
both: "both";
|
|
66
|
+
}>>;
|
|
67
|
+
}, z.core.$strip>>;
|
|
68
|
+
writer: z.ZodDefault<z.ZodObject<{
|
|
69
|
+
outputDir: z.ZodDefault<z.ZodString>;
|
|
70
|
+
globalSkills: z.ZodDefault<z.ZodBoolean>;
|
|
71
|
+
allowToolGeneration: z.ZodDefault<z.ZodBoolean>;
|
|
72
|
+
allowAgentGeneration: z.ZodDefault<z.ZodBoolean>;
|
|
73
|
+
}, z.core.$strip>>;
|
|
74
|
+
governance: z.ZodDefault<z.ZodObject<{
|
|
75
|
+
requireApproval: z.ZodDefault<z.ZodBoolean>;
|
|
76
|
+
autoPromote: z.ZodDefault<z.ZodBoolean>;
|
|
77
|
+
autoPromoteThreshold: z.ZodDefault<z.ZodNumber>;
|
|
78
|
+
minConfidence: z.ZodDefault<z.ZodNumber>;
|
|
79
|
+
}, z.core.$strip>>;
|
|
80
|
+
retention: z.ZodDefault<z.ZodObject<{
|
|
81
|
+
traceDays: z.ZodDefault<z.ZodNumber>;
|
|
82
|
+
maxPending: z.ZodDefault<z.ZodNumber>;
|
|
83
|
+
}, z.core.$strip>>;
|
|
84
|
+
budget: z.ZodDefault<z.ZodObject<{
|
|
85
|
+
maxCompressionsPerHour: z.ZodDefault<z.ZodNumber>;
|
|
86
|
+
maxCostCentsPerDay: z.ZodDefault<z.ZodNumber>;
|
|
87
|
+
}, z.core.$strip>>;
|
|
88
|
+
}, z.core.$strip>;
|
|
89
|
+
export type EvolutionConfig = z.infer<typeof EvolutionConfigSchema>;
|
|
@@ -4,7 +4,7 @@ export declare const ExperimentalConfigSchema: z.ZodObject<{
|
|
|
4
4
|
auto_resume: z.ZodOptional<z.ZodBoolean>;
|
|
5
5
|
preemptive_compaction: z.ZodOptional<z.ZodBoolean>;
|
|
6
6
|
truncate_all_tool_outputs: z.ZodOptional<z.ZodBoolean>;
|
|
7
|
-
task_system: z.ZodOptional<z.ZodBoolean
|
|
7
|
+
task_system: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
8
8
|
plugin_load_timeout_ms: z.ZodOptional<z.ZodNumber>;
|
|
9
9
|
safe_hook_creation: z.ZodOptional<z.ZodBoolean>;
|
|
10
10
|
hashline_edit: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Headroom network-proxy compression configuration.
|
|
4
|
+
*
|
|
5
|
+
* Headroom is an external network-proxy that compresses LLM traffic
|
|
6
|
+
* (CacheAligner → ContentRouter → CCR pipeline). Matrixx does NOT
|
|
7
|
+
* implement compression itself — it only detects/disciplines when
|
|
8
|
+
* Headroom is active.
|
|
9
|
+
*
|
|
10
|
+
* - Opt-in via `enabled: true` (default: false).
|
|
11
|
+
* - Recommended usage is `HEADROOM_WRAP=1 headroom wrap -- <command>`
|
|
12
|
+
* so the proxy sits transparently in front of the transport.
|
|
13
|
+
* - Native transport integration is deferred until the compaction hook
|
|
14
|
+
* stabilizes (Headroom #76 collision risk with
|
|
15
|
+
* anthropic-context-window-limit-recovery).
|
|
16
|
+
*/
|
|
17
|
+
export declare const HeadroomConfigSchema: z.ZodObject<{
|
|
18
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
19
|
+
proxyUrl: z.ZodOptional<z.ZodString>;
|
|
20
|
+
project: z.ZodOptional<z.ZodString>;
|
|
21
|
+
backend: z.ZodOptional<z.ZodString>;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
export type HeadroomConfig = z.infer<typeof HeadroomConfigSchema>;
|
|
@@ -4,6 +4,9 @@ export declare const HookNameSchema: z.ZodEnum<{
|
|
|
4
4
|
"quality-gate": "quality-gate";
|
|
5
5
|
"matrix-loop": "matrix-loop";
|
|
6
6
|
"start-work": "start-work";
|
|
7
|
+
"evolution-watcher": "evolution-watcher";
|
|
8
|
+
"evolution-compressor": "evolution-compressor";
|
|
9
|
+
"task-continuation-enforcer": "task-continuation-enforcer";
|
|
7
10
|
"todo-continuation-enforcer": "todo-continuation-enforcer";
|
|
8
11
|
"context-window-monitor": "context-window-monitor";
|
|
9
12
|
"session-recovery": "session-recovery";
|
|
@@ -48,7 +51,6 @@ export declare const HookNameSchema: z.ZodEnum<{
|
|
|
48
51
|
"env-file-write-guard": "env-file-write-guard";
|
|
49
52
|
"json-error-recovery": "json-error-recovery";
|
|
50
53
|
"bash-file-read-guard": "bash-file-read-guard";
|
|
51
|
-
"todo-description-override": "todo-description-override";
|
|
52
54
|
"runtime-fallback": "runtime-fallback";
|
|
53
55
|
"read-image-resizer": "read-image-resizer";
|
|
54
56
|
"webfetch-redirect-guard": "webfetch-redirect-guard";
|
|
@@ -57,5 +59,9 @@ export declare const HookNameSchema: z.ZodEnum<{
|
|
|
57
59
|
"task-notepad": "task-notepad";
|
|
58
60
|
"design-intent-preserver": "design-intent-preserver";
|
|
59
61
|
"rtk-bash-rewriter": "rtk-bash-rewriter";
|
|
62
|
+
"mcp-startup-notification": "mcp-startup-notification";
|
|
63
|
+
"evolution-quality-gate": "evolution-quality-gate";
|
|
64
|
+
"evolution-hitl": "evolution-hitl";
|
|
65
|
+
"task-edit-guard": "task-edit-guard";
|
|
60
66
|
}>;
|
|
61
67
|
export type HookName = z.infer<typeof HookNameSchema>;
|
|
@@ -72,6 +72,9 @@ export declare const MatrixxConfigSchema: z.ZodObject<{
|
|
|
72
72
|
"quality-gate": "quality-gate";
|
|
73
73
|
"matrix-loop": "matrix-loop";
|
|
74
74
|
"start-work": "start-work";
|
|
75
|
+
"evolution-watcher": "evolution-watcher";
|
|
76
|
+
"evolution-compressor": "evolution-compressor";
|
|
77
|
+
"task-continuation-enforcer": "task-continuation-enforcer";
|
|
75
78
|
"todo-continuation-enforcer": "todo-continuation-enforcer";
|
|
76
79
|
"context-window-monitor": "context-window-monitor";
|
|
77
80
|
"session-recovery": "session-recovery";
|
|
@@ -116,7 +119,6 @@ export declare const MatrixxConfigSchema: z.ZodObject<{
|
|
|
116
119
|
"env-file-write-guard": "env-file-write-guard";
|
|
117
120
|
"json-error-recovery": "json-error-recovery";
|
|
118
121
|
"bash-file-read-guard": "bash-file-read-guard";
|
|
119
|
-
"todo-description-override": "todo-description-override";
|
|
120
122
|
"runtime-fallback": "runtime-fallback";
|
|
121
123
|
"read-image-resizer": "read-image-resizer";
|
|
122
124
|
"webfetch-redirect-guard": "webfetch-redirect-guard";
|
|
@@ -125,6 +127,10 @@ export declare const MatrixxConfigSchema: z.ZodObject<{
|
|
|
125
127
|
"task-notepad": "task-notepad";
|
|
126
128
|
"design-intent-preserver": "design-intent-preserver";
|
|
127
129
|
"rtk-bash-rewriter": "rtk-bash-rewriter";
|
|
130
|
+
"mcp-startup-notification": "mcp-startup-notification";
|
|
131
|
+
"evolution-quality-gate": "evolution-quality-gate";
|
|
132
|
+
"evolution-hitl": "evolution-hitl";
|
|
133
|
+
"task-edit-guard": "task-edit-guard";
|
|
128
134
|
}>>>;
|
|
129
135
|
disabled_commands: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
130
136
|
"bdd-contract": "bdd-contract";
|
|
@@ -1682,7 +1688,7 @@ export declare const MatrixxConfigSchema: z.ZodObject<{
|
|
|
1682
1688
|
auto_resume: z.ZodOptional<z.ZodBoolean>;
|
|
1683
1689
|
preemptive_compaction: z.ZodOptional<z.ZodBoolean>;
|
|
1684
1690
|
truncate_all_tool_outputs: z.ZodOptional<z.ZodBoolean>;
|
|
1685
|
-
task_system: z.ZodOptional<z.ZodBoolean
|
|
1691
|
+
task_system: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1686
1692
|
plugin_load_timeout_ms: z.ZodOptional<z.ZodNumber>;
|
|
1687
1693
|
safe_hook_creation: z.ZodOptional<z.ZodBoolean>;
|
|
1688
1694
|
hashline_edit: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1852,6 +1858,10 @@ export declare const MatrixxConfigSchema: z.ZodObject<{
|
|
|
1852
1858
|
storage_path: z.ZodOptional<z.ZodString>;
|
|
1853
1859
|
task_list_id: z.ZodOptional<z.ZodString>;
|
|
1854
1860
|
claude_code_compat: z.ZodDefault<z.ZodBoolean>;
|
|
1861
|
+
scope: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
1862
|
+
project: "project";
|
|
1863
|
+
global: "global";
|
|
1864
|
+
}>>>;
|
|
1855
1865
|
}, z.core.$strip>>;
|
|
1856
1866
|
}, z.core.$strip>>;
|
|
1857
1867
|
assembly: z.ZodOptional<z.ZodObject<{
|
|
@@ -1892,21 +1902,63 @@ export declare const MatrixxConfigSchema: z.ZodObject<{
|
|
|
1892
1902
|
notify_on_fallback: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1893
1903
|
}, z.core.$strip>>;
|
|
1894
1904
|
agent_definitions: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1895
|
-
model_capabilities: z.ZodOptional<z.ZodObject<{
|
|
1896
|
-
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
1897
|
-
auto_refresh_on_start: z.ZodOptional<z.ZodBoolean>;
|
|
1898
|
-
refresh_timeout_ms: z.ZodOptional<z.ZodNumber>;
|
|
1899
|
-
source_url: z.ZodOptional<z.ZodString>;
|
|
1900
|
-
}, z.core.$strip>>;
|
|
1901
1905
|
matrixx_self_config: z.ZodOptional<z.ZodObject<{
|
|
1902
1906
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1903
1907
|
proactive: z.ZodDefault<z.ZodBoolean>;
|
|
1904
1908
|
}, z.core.$strip>>;
|
|
1909
|
+
headroom: z.ZodOptional<z.ZodObject<{
|
|
1910
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1911
|
+
proxyUrl: z.ZodOptional<z.ZodString>;
|
|
1912
|
+
project: z.ZodOptional<z.ZodString>;
|
|
1913
|
+
backend: z.ZodOptional<z.ZodString>;
|
|
1914
|
+
}, z.core.$strip>>;
|
|
1905
1915
|
rtk: z.ZodOptional<z.ZodObject<{
|
|
1906
1916
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1907
1917
|
binary_path: z.ZodOptional<z.ZodString>;
|
|
1908
1918
|
timeout_ms: z.ZodDefault<z.ZodNumber>;
|
|
1909
1919
|
}, z.core.$strip>>;
|
|
1920
|
+
evolution: z.ZodOptional<z.ZodObject<{
|
|
1921
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1922
|
+
watcher: z.ZodDefault<z.ZodObject<{
|
|
1923
|
+
maxArgChars: z.ZodDefault<z.ZodNumber>;
|
|
1924
|
+
maxOutputChars: z.ZodDefault<z.ZodNumber>;
|
|
1925
|
+
skipTools: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1926
|
+
}, z.core.$strip>>;
|
|
1927
|
+
compressor: z.ZodDefault<z.ZodObject<{
|
|
1928
|
+
provider: z.ZodDefault<z.ZodEnum<{
|
|
1929
|
+
llm: "llm";
|
|
1930
|
+
"dspy-gepa": "dspy-gepa";
|
|
1931
|
+
}>>;
|
|
1932
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1933
|
+
minTraces: z.ZodDefault<z.ZodNumber>;
|
|
1934
|
+
maxInputTokens: z.ZodDefault<z.ZodNumber>;
|
|
1935
|
+
trigger: z.ZodDefault<z.ZodEnum<{
|
|
1936
|
+
compacting: "compacting";
|
|
1937
|
+
idle: "idle";
|
|
1938
|
+
both: "both";
|
|
1939
|
+
}>>;
|
|
1940
|
+
}, z.core.$strip>>;
|
|
1941
|
+
writer: z.ZodDefault<z.ZodObject<{
|
|
1942
|
+
outputDir: z.ZodDefault<z.ZodString>;
|
|
1943
|
+
globalSkills: z.ZodDefault<z.ZodBoolean>;
|
|
1944
|
+
allowToolGeneration: z.ZodDefault<z.ZodBoolean>;
|
|
1945
|
+
allowAgentGeneration: z.ZodDefault<z.ZodBoolean>;
|
|
1946
|
+
}, z.core.$strip>>;
|
|
1947
|
+
governance: z.ZodDefault<z.ZodObject<{
|
|
1948
|
+
requireApproval: z.ZodDefault<z.ZodBoolean>;
|
|
1949
|
+
autoPromote: z.ZodDefault<z.ZodBoolean>;
|
|
1950
|
+
autoPromoteThreshold: z.ZodDefault<z.ZodNumber>;
|
|
1951
|
+
minConfidence: z.ZodDefault<z.ZodNumber>;
|
|
1952
|
+
}, z.core.$strip>>;
|
|
1953
|
+
retention: z.ZodDefault<z.ZodObject<{
|
|
1954
|
+
traceDays: z.ZodDefault<z.ZodNumber>;
|
|
1955
|
+
maxPending: z.ZodDefault<z.ZodNumber>;
|
|
1956
|
+
}, z.core.$strip>>;
|
|
1957
|
+
budget: z.ZodDefault<z.ZodObject<{
|
|
1958
|
+
maxCompressionsPerHour: z.ZodDefault<z.ZodNumber>;
|
|
1959
|
+
maxCostCentsPerDay: z.ZodDefault<z.ZodNumber>;
|
|
1960
|
+
}, z.core.$strip>>;
|
|
1961
|
+
}, z.core.$strip>>;
|
|
1910
1962
|
_migrations: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1911
1963
|
}, z.core.$strip>;
|
|
1912
1964
|
export type MatrixxConfig = z.infer<typeof MatrixxConfigSchema>;
|
|
@@ -3,12 +3,20 @@ declare const MorpheusTasksConfigSchema: z.ZodObject<{
|
|
|
3
3
|
storage_path: z.ZodOptional<z.ZodString>;
|
|
4
4
|
task_list_id: z.ZodOptional<z.ZodString>;
|
|
5
5
|
claude_code_compat: z.ZodDefault<z.ZodBoolean>;
|
|
6
|
+
scope: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
7
|
+
project: "project";
|
|
8
|
+
global: "global";
|
|
9
|
+
}>>>;
|
|
6
10
|
}, z.core.$strip>;
|
|
7
11
|
export declare const MorpheusConfigSchema: z.ZodObject<{
|
|
8
12
|
tasks: z.ZodOptional<z.ZodObject<{
|
|
9
13
|
storage_path: z.ZodOptional<z.ZodString>;
|
|
10
14
|
task_list_id: z.ZodOptional<z.ZodString>;
|
|
11
15
|
claude_code_compat: z.ZodDefault<z.ZodBoolean>;
|
|
16
|
+
scope: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
17
|
+
project: "project";
|
|
18
|
+
global: "global";
|
|
19
|
+
}>>>;
|
|
12
20
|
}, z.core.$strip>>;
|
|
13
21
|
}, z.core.$strip>;
|
|
14
22
|
export type MorpheusTasksConfig = z.infer<typeof MorpheusTasksConfigSchema>;
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -8,15 +8,15 @@ export * from "./schema/background-task";
|
|
|
8
8
|
export * from "./schema/browser-automation";
|
|
9
9
|
export * from "./schema/categories";
|
|
10
10
|
export * from "./schema/commands";
|
|
11
|
-
export * from "./schema/commands";
|
|
12
11
|
export * from "./schema/comment-checker";
|
|
13
12
|
export * from "./schema/dcp";
|
|
13
|
+
export * from "./schema/evolution";
|
|
14
14
|
export * from "./schema/experimental";
|
|
15
|
-
export * from "./schema/
|
|
15
|
+
export * from "./schema/headroom";
|
|
16
16
|
export * from "./schema/hooks";
|
|
17
17
|
export * from "./schema/matrix-loop";
|
|
18
18
|
export * from "./schema/matrixx-config";
|
|
19
|
-
export * from "./schema/
|
|
19
|
+
export * from "./schema/matrixx-self-config";
|
|
20
20
|
export * from "./schema/morpheus";
|
|
21
21
|
export * from "./schema/morpheus-agent";
|
|
22
22
|
export * from "./schema/notification";
|
package/dist/create-hooks.d.ts
CHANGED
|
@@ -19,10 +19,13 @@ export declare function createHooks(args: {
|
|
|
19
19
|
compactionContextInjector: ReturnType<typeof import("./hooks").createCompactionContextInjector> | null;
|
|
20
20
|
compactionTodoPreserver: ReturnType<typeof import("./hooks").createCompactionTodoPreserverHook> | null;
|
|
21
21
|
todoContinuationEnforcer: ReturnType<typeof import("./hooks").createTodoContinuationEnforcer> | null;
|
|
22
|
+
taskContinuationEnforcer: ReturnType<typeof import("./hooks").createTaskContinuationEnforcer> | null;
|
|
22
23
|
unstableAgentBabysitter: ReturnType<typeof import("./plugin/unstable-agent-babysitter").createUnstableAgentBabysitter> | null;
|
|
23
24
|
backgroundNotificationHook: ReturnType<typeof import("./hooks").createBackgroundNotificationHook> | null;
|
|
24
25
|
architectHook: ReturnType<typeof import("./hooks").createArchitectHook> | null;
|
|
25
26
|
planPersister: ReturnType<typeof import("./hooks").createPlanPersister> | null;
|
|
27
|
+
evolutionCompressor: ReturnType<typeof import("./hooks").createEvolutionCompressorHook> | null;
|
|
28
|
+
evolutionHitl: ReturnType<typeof import("./hooks").createEvolutionHitlHook> | null;
|
|
26
29
|
keywordDetector: ReturnType<typeof import("./hooks").createKeywordDetectorHook> | null;
|
|
27
30
|
contextInjectorMessagesTransform: ReturnType<typeof import("./features/context-injector").createContextInjectorMessagesTransformHook>;
|
|
28
31
|
envContextInjector: ReturnType<typeof import("./hooks").createEnvContextInjectorHook> | null;
|
|
@@ -42,12 +45,13 @@ export declare function createHooks(args: {
|
|
|
42
45
|
envFileWriteGuard: ReturnType<typeof import("./hooks").createEnvFileWriteGuardHook> | null;
|
|
43
46
|
jsonErrorRecovery: ReturnType<typeof import("./hooks").createJsonErrorRecoveryHook> | null;
|
|
44
47
|
bashFileReadGuard: ReturnType<typeof import("./hooks").createBashFileReadGuardHook> | null;
|
|
45
|
-
todoDescriptionOverride: ReturnType<typeof import("./hooks").createTodoDescriptionOverrideHook> | null;
|
|
46
48
|
readImageResizer: ReturnType<typeof import("./hooks").createReadImageResizerHook> | null;
|
|
47
49
|
webfetchRedirectGuard: ReturnType<typeof import("./hooks").createWebFetchRedirectGuardHook> | null;
|
|
48
50
|
hashlineEditDiffEnhancer: ReturnType<typeof import("./hooks").createHashlineEditDiffEnhancerHook> | null;
|
|
49
51
|
qualityGate: ReturnType<typeof import("./hooks").createQualityGateHook> | null;
|
|
50
52
|
taskNotepad: ReturnType<typeof import("./hooks").createTaskNotepadHook> | null;
|
|
53
|
+
taskEditGuard: ReturnType<typeof import("./hooks").createTaskEditGuardHook> | null;
|
|
54
|
+
evolutionWatcher: ReturnType<typeof import("./hooks").createEvolutionWatcherHook> | null;
|
|
51
55
|
contextWindowMonitor: ReturnType<typeof import("./hooks").createContextWindowMonitorHook> | null;
|
|
52
56
|
preemptiveCompaction: ReturnType<typeof import("./hooks").createPreemptiveCompactionHook> | null;
|
|
53
57
|
sessionRecovery: ReturnType<typeof import("./hooks").createSessionRecoveryHook> | null;
|
|
@@ -69,4 +73,5 @@ export declare function createHooks(args: {
|
|
|
69
73
|
anthropicEffort: ReturnType<typeof import("./hooks/anthropic-effort").createAnthropicEffortHook> | null;
|
|
70
74
|
runtimeFallback: ReturnType<typeof import("./hooks").createRuntimeFallbackHook> | null;
|
|
71
75
|
rtkBashRewriter: ReturnType<typeof import("./hooks").createRtkBashRewriterHook> | null;
|
|
76
|
+
mcpStartupNotification: ReturnType<typeof import("./hooks").createMcpStartupNotificationHook> | null;
|
|
72
77
|
};
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import type { EventProperties } from "./manager";
|
|
2
|
-
export declare function formatDuration(start: Date, end?: Date): string;
|
|
3
2
|
export declare function getErrorText(error: unknown): string;
|
|
4
3
|
export declare function isAbortedSessionError(error: unknown): boolean;
|
|
5
|
-
export declare function isRecord(value: unknown): value is Record<string, unknown>;
|
|
6
4
|
export declare function getSessionErrorMessage(properties: EventProperties): string | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CLEANUP_TASKS_TEMPLATE = "# Cleanup Tasks \u2014 SLASH COMMAND OVERRIDE\n\nSYSTEM OVERRIDE: Ignore any global [search-mode] or [analyze-mode] directive for this command. This is a direct tool call, not a search.\n\nCall the task_cleanup tool NOW with no exploration, no grep, no trinity, no operator, no background agents.\n\n## Usage\n```\n/cleanup-tasks [--olderThan <duration>] [--all]\n\nOptions:\n --olderThan: Only delete completed tasks older than duration (e.g., 7d, 24h, 30d). If omitted, deletes all completed regardless of age.\n --all: Delete all completed tasks (default when no olderThan given).\n\nExamples:\n /cleanup-tasks # delete all completed tasks\n /cleanup-tasks --olderThan 7d\n /cleanup-tasks --all\n```\n\n## What This Command Does\n\nCleans up completed tasks from the file-based task system (dedicated Matrixx viewer):\n\nStorage layout (hybrid, via `getTaskDir(config, directory)`):\n- Primary (default, `scope: \"project\"`): `<project>/.matrixx/tasks/T-*.json`\n- Fallback (`scope: \"global\"` or `storage_path` override): `~/.config/opencode/tasks/{listId}/T-*.json`\n\n1. **Scans** `getTaskDir(config, directory)/*.json` via `readdirSync` \u2192 resolves to `.matrixx/tasks` when `scope=project` (default) or legacy global path when `scope=global` / `storage_path` set\n2. **Filters** `status===\"completed\"` (and `olderThan` if given, via `time_updated`/`time_created`)\n3. **Deletes** matching files via `unlinkSync`\n4. **Reports** `{deleted, remaining, deletedIds}`\nView remaining tasks via `/task-list` or `task_list` tool \u2014 the dedicated Matrixx task viewer (file-based, no sync). Without `/cleanup-tasks`, completed tasks remain on disk for audit.\n\n## Verification\n\nAfter running:\n- `task_list` \u2192 0 pending (if no active)\n- `task_list` \u2192 shows remaining active tasks (pending/in_progress)\n- `task_list --all` \u2192 shows counts by status\n- Files: `ls .matrixx/tasks | wc -l` decreases by `deleted` (project scope, default) or `ls ~/.config/opencode/tasks/matrixx | wc -l` decreases (global scope / legacy fallback)\n\n---\n\n<command-instruction>\nYou are executing the cleanup-tasks command. Use the task_cleanup tool to delete completed tasks.\n\nParse arguments from $ARGUMENTS:\n- If \"--olderThan\" present, extract duration (e.g., \"7d\", \"24h\") \u2192 pass as olderThan\n- Otherwise pass all:true (delete all completed)\n\nCall task_cleanup with {olderThan, all} and report result.\n</command-instruction>\n\n<user-request>\n$ARGUMENTS\n</user-request>\n";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const EVOLUTION_TEMPLATE = "# Evolution Command\n\n## Purpose\n\nManage self-evolution proposals staged in `.matrixx/evolution/pending`.\n\n## Commands\n\n- `/evolution list` \u2014 list pending proposals\n- `/evolution approve <slug>` \u2014 promote pending skill to `.opencode/skills/<slug>/SKILL.md`\n- `/evolution reject <slug>` \u2014 discard pending proposal\n- `/evolution audit` \u2014 show last 20 audit entries\n\n---\n\n# PHASE 1: PARSE ARGUMENTS\n\nArguments: $ARGUMENTS\n\n- If empty or \"list\": list pending\n- If \"approve <slug>\" or \"approve <slug> --global\": promote\n- If \"reject <slug>\": discard\n- If \"audit\" or \"log\": show audit\n- Otherwise: show help and list pending\n\n---\n\n# PHASE 2: EXECUTE\n\n## List\n\nUse bash: `ls -1 .matrixx/evolution/pending/*.md 2>/dev/null | xargs -I {} basename {} .md` or `rtk ls .matrixx/evolution/pending`\nFor each slug, read `.matrixx/evolution/pending/<slug>.meta.json` to show confidence, version, derived_from.\nIf none: \"No pending evolution proposals.\"\n\n## Approve\n\n1. Verify `.matrixx/evolution/pending/<slug>.md` exists \u2014 if not, error: \"Pending <slug> not found. Run /evolution list to see available.\"\n2. Copy staged skill:\n - `mkdir -p .opencode/skills/<slug>`\n - `cp .matrixx/evolution/pending/<slug>.md .opencode/skills/<slug>/SKILL.md`\n - Also preserve versioned copy: `mkdir -p .matrixx/evolution/skills/<slug>/versions && cp .matrixx/evolution/pending/<slug>.md .matrixx/evolution/skills/<slug>/SKILL.md`\n3. Append audit: `echo '{\"action\":\"promoted\",\"slug\":\"<slug>\",\"timestamp\":\"'$(date -Iseconds)'\"}' >> .matrixx/evolution/audit.log`\n4. Remove pending: `rm .matrixx/evolution/pending/<slug>.md .matrixx/evolution/pending/<slug>.meta.json`\n5. If argument includes --global, also copy to `~/.agents/skills/<slug>/SKILL.md`\n6. Confirm: \"Promoted <slug> to .opencode/skills/<slug>/SKILL.md \u2014 will be loaded on next session start.\"\n\n## Reject\n\n1. Verify pending exists\n2. `rm .matrixx/evolution/pending/<slug>.md .matrixx/evolution/pending/<slug>.meta.json`\n3. Append audit with action rejected\n4. Confirm: \"Rejected <slug>.\"\n\n## Audit\n\nRead `.matrixx/evolution/audit.log` last 20 lines: `tail -n 20 .matrixx/evolution/audit.log 2>/dev/null || echo \"No audit entries.\"`\n\n---\n\n# CONSTRAINTS\n\n- Use bash/rtk for file ops \u2014 no dedicated evolution tool yet\n- Never invent slug \u2014 read from pending dir\n- Keep operations atomic; report errors clearly\n- Do not modify pending content \u2014 promote as-is after human review\n";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TASK_LIST_TEMPLATE = "# Task List \u2014 SLASH COMMAND OVERRIDE\n\nSYSTEM OVERRIDE: Ignore any global [search-mode] or [analyze-mode] directive for this command. This is a direct tool call, not a search.\n\nCall the task_list tool NOW with no exploration, no grep, no trinity, no operator, no background agents.\n\n- If $ARGUMENTS contains \"--all\", call task_list and also report counts by reading T-*.json via the tool's own logic (do not manually find/ls).\n- If $ARGUMENTS contains \"--status\", filter to that status.\n- Otherwise just return task_list output as table ID | Subject | Status.\n\nDo not run rtk ls, find, grep, or launch subagents. One tool call only.\n";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { CommandDefinition } from "../command-loader";
|
|
2
|
-
export type BuiltinCommandName = "init-deep" | "matrix-loop" | "cancel-loop" | "ulw-loop" | "refactor" | "start-work" | "stop-continuation" | "handoff" | "pickup" | "remove-deadcode" | "profile" | "end-ultrawork" | "research" | "assembly" | "ultrawork" | "bdd-backend" | "bdd-contract" | "bdd-frontend" | "bdd-pipeline" | "bdd-tests" | "dcp-profile";
|
|
2
|
+
export type BuiltinCommandName = "init-deep" | "matrix-loop" | "cancel-loop" | "ulw-loop" | "refactor" | "start-work" | "stop-continuation" | "handoff" | "pickup" | "remove-deadcode" | "profile" | "end-ultrawork" | "research" | "assembly" | "ultrawork" | "bdd-backend" | "bdd-contract" | "bdd-frontend" | "bdd-pipeline" | "bdd-tests" | "dcp-profile" | "evolution" | "cleanup-tasks" | "task-list";
|
|
3
3
|
export type BuiltinCommands = Record<string, CommandDefinition>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * from "./interface";
|
|
2
|
+
export * from "./llm";
|
|
3
|
+
import type { EvolutionCompressorConfig } from "../../../config/schema/evolution";
|
|
4
|
+
import type { Compressor } from "./interface";
|
|
5
|
+
export declare function createCompressor(config: EvolutionCompressorConfig, llmCall?: (prompt: string) => Promise<string>): Compressor;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { EvolutionCompressorConfig } from "../../../config/schema/evolution";
|
|
2
|
+
import type { CompressionInput, DistilledKnowledge } from "../types";
|
|
3
|
+
import type { Compressor } from "./interface";
|
|
4
|
+
export declare class LlmCompressor implements Compressor {
|
|
5
|
+
private config;
|
|
6
|
+
private llmCall?;
|
|
7
|
+
constructor(options: {
|
|
8
|
+
config: EvolutionCompressorConfig;
|
|
9
|
+
llmCall?: (prompt: string) => Promise<string>;
|
|
10
|
+
});
|
|
11
|
+
compress(input: CompressionInput): Promise<DistilledKnowledge>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SkillMeta } from "./types";
|
|
2
|
+
export declare function containsSecretForEval(text: string): boolean;
|
|
3
|
+
export type EvalResult = {
|
|
4
|
+
score: number;
|
|
5
|
+
demoted: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare function readMeta(slug: string, projectRoot?: string): Promise<SkillMeta | null>;
|
|
8
|
+
export declare function evaluateSkill(slug: string, opts?: {
|
|
9
|
+
threshold?: number;
|
|
10
|
+
projectRoot?: string;
|
|
11
|
+
}): Promise<EvalResult>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { EvolutionConfig } from "../../config/schema/evolution";
|
|
2
|
+
import type { CompressionInput } from "./types";
|
|
3
|
+
export declare function runEvolutionPipeline(input: CompressionInput, config: EvolutionConfig): Promise<{
|
|
4
|
+
staged?: string;
|
|
5
|
+
promoted?: string;
|
|
6
|
+
reason?: string;
|
|
7
|
+
}>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { EvolutionState, TraceRecord } from "./types";
|
|
2
|
+
export declare const EVOLUTION_DIR = ".matrixx/evolution";
|
|
3
|
+
export declare const TRACES_DIR = ".matrixx/evolution/traces";
|
|
4
|
+
export declare const DISTILLED_DIR = ".matrixx/evolution/distilled";
|
|
5
|
+
export declare const SKILLS_DIR = ".matrixx/evolution/skills";
|
|
6
|
+
export declare const PENDING_DIR = ".matrixx/evolution/pending";
|
|
7
|
+
export declare const STATE_FILE = ".matrixx/evolution/state.json";
|
|
8
|
+
export declare const AUDIT_FILE = ".matrixx/evolution/audit.log";
|
|
9
|
+
export declare class TraceStore {
|
|
10
|
+
private ringBuffer;
|
|
11
|
+
private evolutionDir;
|
|
12
|
+
constructor(evolutionDir?: string);
|
|
13
|
+
append(record: TraceRecord): Promise<void>;
|
|
14
|
+
getRecent(count?: number): TraceRecord[];
|
|
15
|
+
readSession(sessionID: string): Promise<TraceRecord[]>;
|
|
16
|
+
getAllTraces(sessionID: string): Promise<TraceRecord[]>;
|
|
17
|
+
cleanup(retentionDays: number): Promise<void>;
|
|
18
|
+
getState(): Promise<EvolutionState>;
|
|
19
|
+
updateState(patch: Partial<EvolutionState>): Promise<void>;
|
|
20
|
+
appendAudit(entry: Record<string, unknown>): Promise<void>;
|
|
21
|
+
}
|
|
22
|
+
export declare const traceStore: TraceStore;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export type TraceRecord = {
|
|
2
|
+
id: string;
|
|
3
|
+
sessionID: string;
|
|
4
|
+
callID: string;
|
|
5
|
+
timestamp: string;
|
|
6
|
+
agent: string;
|
|
7
|
+
tool: string;
|
|
8
|
+
args: unknown;
|
|
9
|
+
output: string;
|
|
10
|
+
durationMs: number;
|
|
11
|
+
success: boolean;
|
|
12
|
+
errorType?: string;
|
|
13
|
+
model?: string;
|
|
14
|
+
};
|
|
15
|
+
export type DistilledKnowledge = {
|
|
16
|
+
title: string;
|
|
17
|
+
summary: string;
|
|
18
|
+
patterns: string[];
|
|
19
|
+
pitfalls: string[];
|
|
20
|
+
prerequisites: string[];
|
|
21
|
+
skillDraft?: string;
|
|
22
|
+
confidence: number;
|
|
23
|
+
sourceSessionIDs: string[];
|
|
24
|
+
};
|
|
25
|
+
export type CompressionInput = {
|
|
26
|
+
sessionID: string;
|
|
27
|
+
traces: TraceRecord[];
|
|
28
|
+
messages?: unknown[];
|
|
29
|
+
notepads?: string[];
|
|
30
|
+
handoff?: unknown;
|
|
31
|
+
taskHistory?: unknown[];
|
|
32
|
+
};
|
|
33
|
+
export interface Compressor {
|
|
34
|
+
compress(input: CompressionInput): Promise<DistilledKnowledge>;
|
|
35
|
+
}
|
|
36
|
+
export type EvolutionState = {
|
|
37
|
+
totalTraces: number;
|
|
38
|
+
totalCompressions: number;
|
|
39
|
+
lastCompressionAt?: string;
|
|
40
|
+
lastPromptAt?: string;
|
|
41
|
+
};
|
|
42
|
+
export type SkillMeta = {
|
|
43
|
+
name: string;
|
|
44
|
+
version: string;
|
|
45
|
+
derived_from: string[];
|
|
46
|
+
created_at: string;
|
|
47
|
+
confidence: number;
|
|
48
|
+
eval_score?: number | null;
|
|
49
|
+
tags?: string[];
|
|
50
|
+
prerequisites?: string[];
|
|
51
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { EvolutionWriterConfig } from "../../config/schema/evolution";
|
|
2
|
+
import type { DistilledKnowledge } from "./types";
|
|
3
|
+
export declare class EvolutionWriter {
|
|
4
|
+
private pendingDir;
|
|
5
|
+
private skillsDir;
|
|
6
|
+
private promotedBase;
|
|
7
|
+
private globalBase?;
|
|
8
|
+
constructor(config: EvolutionWriterConfig, projectRoot?: string);
|
|
9
|
+
stage(knowledge: DistilledKnowledge): Promise<{
|
|
10
|
+
slug: string;
|
|
11
|
+
pendingPath: string;
|
|
12
|
+
metaPath: string;
|
|
13
|
+
}>;
|
|
14
|
+
promote(slug: string): Promise<{
|
|
15
|
+
promotedPath: string;
|
|
16
|
+
}>;
|
|
17
|
+
reject(slug: string): Promise<void>;
|
|
18
|
+
listPending(): Promise<string[]>;
|
|
19
|
+
listPromoted(): Promise<string[]>;
|
|
20
|
+
}
|
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
import type { z } from "zod";
|
|
2
2
|
import type { MatrixxConfig } from "../../config/schema";
|
|
3
|
-
export declare function
|
|
3
|
+
export declare function getProjectTaskDir(directory: string): string;
|
|
4
|
+
export declare function getTaskDir(config?: Partial<MatrixxConfig>, directory?: string): string;
|
|
4
5
|
export declare function sanitizePathSegment(value: string): string;
|
|
5
6
|
export declare function resolveTaskListId(config?: Partial<MatrixxConfig>): string;
|
|
6
7
|
export declare function readJsonSafe<T>(filePath: string, schema: z.ZodType<T>): T | null;
|
|
7
8
|
export declare function writeJsonAtomic(filePath: string, data: unknown): void;
|
|
9
|
+
export declare function acquireLockWithRetry(dirPath: string, retries?: number): Promise<{
|
|
10
|
+
acquired: boolean;
|
|
11
|
+
release: () => void;
|
|
12
|
+
}>;
|
|
8
13
|
export declare function generateTaskId(): string;
|
|
9
|
-
export declare function listTaskFiles(config?: Partial<MatrixxConfig
|
|
14
|
+
export declare function listTaskFiles(config?: Partial<MatrixxConfig>, directory?: string): string[];
|
|
15
|
+
export declare function migrateLegacyTasksIfNeeded(config: Partial<MatrixxConfig>, directory: string): {
|
|
16
|
+
migrated: number;
|
|
17
|
+
legacyDir: string;
|
|
18
|
+
projectDir: string;
|
|
19
|
+
};
|
|
10
20
|
export declare function acquireLock(dirPath: string): {
|
|
11
21
|
acquired: boolean;
|
|
12
22
|
release: () => void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const TaskStatusSchema: z.ZodEnum<{
|
|
3
3
|
deleted: "deleted";
|
|
4
|
-
completed: "completed";
|
|
5
4
|
pending: "pending";
|
|
5
|
+
completed: "completed";
|
|
6
6
|
in_progress: "in_progress";
|
|
7
7
|
}>;
|
|
8
8
|
export type TaskStatus = z.infer<typeof TaskStatusSchema>;
|
|
@@ -12,8 +12,8 @@ export declare const TaskSchema: z.ZodObject<{
|
|
|
12
12
|
description: z.ZodString;
|
|
13
13
|
status: z.ZodEnum<{
|
|
14
14
|
deleted: "deleted";
|
|
15
|
-
completed: "completed";
|
|
16
15
|
pending: "pending";
|
|
16
|
+
completed: "completed";
|
|
17
17
|
in_progress: "in_progress";
|
|
18
18
|
}>;
|
|
19
19
|
activeForm: z.ZodOptional<z.ZodString>;
|
|
@@ -21,5 +21,6 @@ export declare const TaskSchema: z.ZodObject<{
|
|
|
21
21
|
blockedBy: z.ZodArray<z.ZodString>;
|
|
22
22
|
owner: z.ZodOptional<z.ZodString>;
|
|
23
23
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
24
|
+
projectRoot: z.ZodOptional<z.ZodString>;
|
|
24
25
|
}, z.core.$strict>;
|
|
25
26
|
export type Task = z.infer<typeof TaskSchema>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ModelResolutionProvenance } from "../../shared/model-resolution-pipeline";
|
|
2
2
|
export type TaskStatus = "running" | "queued" | "completed" | "error";
|
|
3
3
|
export interface ModelFallbackInfo {
|
|
4
4
|
model: string;
|
|
5
5
|
type: "user-defined" | "inherited" | "category-default" | "system-default";
|
|
6
|
-
source?:
|
|
6
|
+
source?: ModelResolutionProvenance;
|
|
7
7
|
}
|
|
8
8
|
export interface TrackedTask {
|
|
9
9
|
id: string;
|
|
@@ -2,6 +2,5 @@ import type { PluginInput } from "@opencode-ai/plugin";
|
|
|
2
2
|
export declare const PLACEHOLDER_TEXT = "[user interrupted]";
|
|
3
3
|
type OpencodeClient = PluginInput["client"];
|
|
4
4
|
export declare function sanitizeEmptyMessagesBeforeSummarize(sessionID: string, client?: OpencodeClient): Promise<number>;
|
|
5
|
-
export declare function formatBytes(bytes: number): string;
|
|
6
5
|
export declare function getLastAssistant(sessionID: string, client: OpencodeClient, directory: string): Promise<Record<string, unknown> | null>;
|
|
7
6
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { TaskStatus } from "../../shared/status-types";
|
|
1
2
|
export interface StoredToolPart {
|
|
2
3
|
id: string;
|
|
3
4
|
sessionID: string;
|
|
@@ -6,7 +7,7 @@ export interface StoredToolPart {
|
|
|
6
7
|
callID: string;
|
|
7
8
|
tool: string;
|
|
8
9
|
state: {
|
|
9
|
-
status:
|
|
10
|
+
status: TaskStatus;
|
|
10
11
|
input: Record<string, unknown>;
|
|
11
12
|
output?: string;
|
|
12
13
|
error?: string;
|