opencode-matrixx 2.2.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +97 -25
- package/dist/agents/bdd-contract.d.ts +7 -0
- package/dist/agents/builtin-agents/architect-agent.d.ts +1 -0
- package/dist/agents/builtin-agents/general-agents.d.ts +1 -0
- package/dist/agents/builtin-agents/{hephaestus-agent.d.ts → keymaker-agent.d.ts} +2 -0
- package/dist/agents/builtin-agents/model-resolution.d.ts +1 -0
- package/dist/agents/builtin-agents/morpheus-agent.d.ts +2 -0
- package/dist/agents/builtin-agents.d.ts +1 -1
- package/dist/agents/dynamic-agent-prompt-builder.d.ts +2 -1
- package/dist/agents/env-context.d.ts +1 -1
- package/dist/agents/mouse/agent.d.ts +5 -2
- package/dist/agents/mouse/deepseek.d.ts +16 -0
- package/dist/agents/mouse/index.d.ts +3 -0
- package/dist/agents/mouse/mimo.d.ts +15 -0
- package/dist/agents/mouse/qwen.d.ts +16 -0
- package/dist/agents/mouse/shared.d.ts +7 -0
- package/dist/agents/types.d.ts +4 -1
- package/dist/config/index.d.ts +1 -2
- package/dist/config/presets.d.ts +4 -0
- package/dist/config/resolve-tiers.d.ts +32 -0
- package/dist/config/schema/agent-names.d.ts +6 -0
- package/dist/config/schema/agent-overrides.d.ts +133 -0
- package/dist/config/schema/categories.d.ts +16 -0
- package/dist/config/schema/commands.d.ts +6 -0
- package/dist/config/schema/dcp.d.ts +16 -0
- package/dist/config/schema/hooks.d.ts +3 -0
- package/dist/config/schema/matrixx-config.d.ts +159 -18
- package/dist/config/schema/rtk.d.ts +7 -0
- package/dist/config/schema.d.ts +4 -1
- package/dist/create-hooks.d.ts +3 -0
- package/dist/features/bdd/schema.d.ts +434 -0
- package/dist/features/bdd/types.d.ts +2 -0
- package/dist/features/builtin-commands/templates/bdd-backend.d.ts +1 -0
- package/dist/features/builtin-commands/templates/bdd-contract.d.ts +1 -0
- package/dist/features/builtin-commands/templates/bdd-frontend.d.ts +1 -0
- package/dist/features/builtin-commands/templates/bdd-pipeline.d.ts +1 -0
- package/dist/features/builtin-commands/templates/bdd-tests.d.ts +1 -0
- package/dist/features/builtin-commands/templates/dcp-profile.d.ts +1 -0
- package/dist/features/builtin-commands/types.d.ts +2 -2
- package/dist/features/builtin-skills/lazy-skill-helper.d.ts +17 -0
- package/dist/features/builtin-skills/skills/bdd-backend.d.ts +3 -0
- package/dist/features/builtin-skills/skills/bdd-contract.d.ts +3 -0
- package/dist/features/builtin-skills/skills/bdd-frontend.d.ts +3 -0
- package/dist/features/builtin-skills/skills/bdd-tests.d.ts +3 -0
- package/dist/features/builtin-skills/skills/docker-master.d.ts +2 -0
- package/dist/features/builtin-skills/skills/index.d.ts +5 -0
- package/dist/features/{claude-code-command-loader → command-loader}/loader.d.ts +0 -2
- package/dist/features/mission-state/constants.d.ts +10 -0
- package/dist/features/mission-state/index.d.ts +2 -0
- package/dist/features/mission-state/plan-storage.d.ts +48 -0
- package/dist/features/mission-state/rehydrate.d.ts +21 -0
- package/dist/features/mission-state/types.d.ts +46 -0
- package/dist/features/opencode-skill-loader/loader.d.ts +1 -3
- package/dist/features/opencode-skill-loader/skill-definition-record.d.ts +1 -1
- package/dist/features/opencode-skill-loader/types.d.ts +1 -1
- package/dist/features/skill-mcp-manager/connection-type.d.ts +2 -3
- package/dist/features/skill-mcp-manager/connection.d.ts +3 -4
- package/dist/features/skill-mcp-manager/manager.d.ts +2 -3
- package/dist/features/skill-mcp-manager/oauth-handler.d.ts +3 -3
- package/dist/features/skill-mcp-manager/types.d.ts +16 -4
- package/dist/hooks/env-context-injector/index.d.ts +23 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/plan-persister/hook.d.ts +20 -0
- package/dist/hooks/plan-persister/index.d.ts +2 -0
- package/dist/hooks/rtk-bash-rewriter/constants.d.ts +3 -0
- package/dist/hooks/rtk-bash-rewriter/hook.d.ts +12 -0
- package/dist/hooks/rtk-bash-rewriter/hook.test.d.ts +1 -0
- package/dist/hooks/rtk-bash-rewriter/index.d.ts +1 -0
- package/dist/hooks/rtk-bash-rewriter/types.d.ts +11 -0
- package/dist/index.js +44995 -28387
- package/dist/plugin/hooks/create-continuation-hooks.d.ts +2 -1
- package/dist/plugin/hooks/create-core-hooks.d.ts +2 -0
- package/dist/plugin/hooks/create-session-hooks.d.ts +2 -1
- package/dist/plugin/hooks/create-transform-hooks.d.ts +2 -1
- package/dist/plugin-config.d.ts +1 -1
- package/dist/plugin-handlers/agent-config-handler.d.ts +2 -0
- package/dist/plugin-handlers/plugin-components-loader.d.ts +1 -1
- package/dist/plugin-handlers/prometheus-agent-config-builder.d.ts +1 -0
- package/dist/shared/index.d.ts +1 -1
- package/dist/shared/merge-categories.d.ts +4 -0
- package/dist/shared/model-resolution-types.d.ts +3 -0
- package/dist/shared/model-tiers.d.ts +31 -0
- package/dist/shared/tier-resolver.d.ts +26 -0
- package/dist/tools/bdd-create-contract/constants.d.ts +1 -0
- package/dist/tools/bdd-create-contract/index.d.ts +3 -0
- package/dist/tools/bdd-create-contract/tools.d.ts +3 -0
- package/dist/tools/bdd-create-contract/types.d.ts +12 -0
- package/dist/tools/bdd-parse-gherkin/constants.d.ts +1 -0
- package/dist/tools/bdd-parse-gherkin/index.d.ts +3 -0
- package/dist/tools/bdd-parse-gherkin/tools.d.ts +5 -0
- package/dist/tools/bdd-parse-gherkin/types.d.ts +9 -0
- package/dist/tools/bdd-pipeline/analysis-report-sections.d.ts +10 -0
- package/dist/tools/bdd-pipeline/analysis-report.d.ts +9 -0
- package/dist/tools/bdd-pipeline/constants.d.ts +4 -0
- package/dist/tools/bdd-pipeline/feature-resolver.d.ts +5 -0
- package/dist/tools/bdd-pipeline/index.d.ts +3 -0
- package/dist/tools/bdd-pipeline/pipeline-runner.d.ts +6 -0
- package/dist/tools/bdd-pipeline/subagent-runner.d.ts +14 -0
- package/dist/tools/bdd-pipeline/tools.d.ts +5 -0
- package/dist/tools/bdd-pipeline/types.d.ts +74 -0
- package/dist/tools/bdd-validate-contract/index.d.ts +1 -0
- package/dist/tools/bdd-validate-contract/tools.d.ts +21 -0
- package/dist/tools/delegate-task/categories.d.ts +7 -0
- package/dist/tools/delegate-task/category-resolver.d.ts +6 -0
- package/dist/tools/delegate-task/complexity-constants.d.ts +24 -0
- package/dist/tools/delegate-task/complexity-scorer.d.ts +31 -0
- package/dist/tools/delegate-task/complexity-types.d.ts +10 -0
- package/dist/tools/delegate-task/executor-types.d.ts +1 -0
- package/dist/tools/delegate-task/index.d.ts +3 -0
- package/dist/tools/delegate-task/types.d.ts +8 -0
- package/dist/tools/index.d.ts +4 -0
- package/dist/tools/task/todo-sync.d.ts +1 -1
- package/package.json +19 -4
- package/dist/agents/builtin-agents/environment-context.d.ts +0 -2
- package/dist/config/profiles.d.ts +0 -4
- package/dist/config/schema/claude-code.d.ts +0 -10
- package/dist/features/claude-code-mcp-loader/index.d.ts +0 -10
- package/dist/features/claude-code-mcp-loader/loader.d.ts +0 -3
- package/dist/features/claude-code-mcp-loader/transformer.d.ts +0 -2
- package/dist/features/claude-code-mcp-loader/types.d.ts +0 -39
- package/dist/features/claude-code-plugin-loader/agent-loader.d.ts +0 -3
- package/dist/features/claude-code-plugin-loader/command-loader.d.ts +0 -3
- package/dist/features/claude-code-plugin-loader/discovery.d.ts +0 -2
- package/dist/features/claude-code-plugin-loader/hook-loader.d.ts +0 -2
- package/dist/features/claude-code-plugin-loader/index.d.ts +0 -10
- package/dist/features/claude-code-plugin-loader/loader.d.ts +0 -20
- package/dist/features/claude-code-plugin-loader/mcp-server-loader.d.ts +0 -3
- package/dist/features/claude-code-plugin-loader/plugin-path-resolver.d.ts +0 -1
- package/dist/features/claude-code-plugin-loader/skill-loader.d.ts +0 -3
- package/dist/features/claude-code-plugin-loader/types.d.ts +0 -187
- package/dist/shared/claude-config-dir.d.ts +0 -1
- /package/dist/features/{claude-code-agent-loader → agent-loader}/index.d.ts +0 -0
- /package/dist/features/{claude-code-agent-loader → agent-loader}/loader.d.ts +0 -0
- /package/dist/features/{claude-code-agent-loader → agent-loader}/types.d.ts +0 -0
- /package/dist/features/{claude-code-command-loader → command-loader}/index.d.ts +0 -0
- /package/dist/features/{claude-code-command-loader → command-loader}/types.d.ts +0 -0
- /package/dist/features/{claude-code-session-state → session-state}/index.d.ts +0 -0
- /package/dist/features/{claude-code-session-state → session-state}/state.d.ts +0 -0
- /package/dist/features/{claude-code-mcp-loader → skill-mcp-manager}/env-expander.d.ts +0 -0
- /package/dist/features/{claude-tasks → task-storage}/storage.d.ts +0 -0
- /package/dist/features/{claude-tasks → task-storage}/types.d.ts +0 -0
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
>
|
|
2
|
-
> [](https://github.com/klpanagi/matrixx)
|
|
2
|
+
> [](https://github.com/klpanagi/opencode-matrixx)
|
|
3
3
|
>
|
|
4
4
|
> Matrixx is **highly inspired by** [oh-my-opencode](https://github.com/code-yeongyu/oh-my-opencode) — the project that pioneered the "oh-my-zsh for OpenCode" concept.
|
|
5
5
|
> Full credit to [code-yeongyu](https://github.com/code-yeongyu) for the original vision.
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<h1>Matrixx</h1>
|
|
11
11
|
|
|
12
12
|
[](https://www.npmjs.com/package/opencode-matrixx)
|
|
13
|
-
[](https://github.com/klpanagi/matrixx/blob/master/LICENSE)
|
|
13
|
+
[](https://github.com/klpanagi/opencode-matrixx/blob/master/LICENSE)
|
|
14
14
|
|
|
15
15
|
**Multi-model agent orchestration for [OpenCode](https://github.com/sst/opencode).**<br/>
|
|
16
16
|
**14 specialized agents. ~52 lifecycle hooks. 28 tools. One plugin.**
|
|
@@ -73,8 +73,8 @@ Create `matrixx.jsonc` in your project root:
|
|
|
73
73
|
|
|
74
74
|
```jsonc
|
|
75
75
|
{
|
|
76
|
-
"$schema": "https://raw.githubusercontent.com/klpanagi/matrixx/refs/heads/dev/dist/matrixx.schema.json",
|
|
77
|
-
"
|
|
76
|
+
"$schema": "https://raw.githubusercontent.com/klpanagi/opencode-matrixx/refs/heads/dev/dist/matrixx.schema.json",
|
|
77
|
+
"agents": {}
|
|
78
78
|
}
|
|
79
79
|
```
|
|
80
80
|
|
|
@@ -86,32 +86,13 @@ Open OpenCode and start coding. Matrixx activates automatically.
|
|
|
86
86
|
|
|
87
87
|
```
|
|
88
88
|
Install and configure matrixx by following the instructions here:
|
|
89
|
-
https://raw.githubusercontent.com/klpanagi/matrixx/refs/heads/dev/docs/guide/installation.md
|
|
89
|
+
https://raw.githubusercontent.com/klpanagi/opencode-matrixx/refs/heads/dev/docs/guide/installation.md
|
|
90
90
|
```
|
|
91
91
|
|
|
92
92
|
[Manual installation guide →](docs/guide/installation.md) · [Uninstall →](docs/guide/uninstallation.md)
|
|
93
93
|
|
|
94
94
|
---
|
|
95
95
|
|
|
96
|
-
## Profiles
|
|
97
|
-
|
|
98
|
-
Profiles assign models to every agent — one setting, full model lineup.
|
|
99
|
-
|
|
100
|
-
| Profile | Best For | Daily Cost |
|
|
101
|
-
|---------|----------|------------|
|
|
102
|
-
| **free** | Experimentation, prototyping | $0 |
|
|
103
|
-
| **budget** | Personal projects, light use | ~$1–3 |
|
|
104
|
-
| **economy** | Active development with cost control | ~$3–8 |
|
|
105
|
-
| **balanced** | Professional development | ~$8–20 |
|
|
106
|
-
| **performance** | Maximum capability | ~$20–50 |
|
|
107
|
-
| **go** | OpenCode Go subscription | Go quota |
|
|
108
|
-
| **go-duo** | Duo subscription, two users | Go Duo quota |
|
|
109
|
-
| **go-trio** | Trio subscription, three users | Go Trio quota |
|
|
110
|
-
| **go-ultimate** | Unlimited Go access | Go Ultimate quota |
|
|
111
|
-
| **xiaomi-ultimate** | Xiaomi-optimized ultimate | Xiaomi quota |
|
|
112
|
-
|
|
113
|
-
Profile defaults merge first; any `agents` or `categories` override takes precedence.
|
|
114
|
-
|
|
115
96
|
---
|
|
116
97
|
|
|
117
98
|
## The Agent Team
|
|
@@ -298,6 +279,21 @@ Analyzes media files that require interpretation beyond raw text. Extracts speci
|
|
|
298
279
|
|
|
299
280
|
---
|
|
300
281
|
|
|
282
|
+
### 14. Mouse — *The Task Executor*
|
|
283
|
+
|
|
284
|
+
*Small, fast, and disposable — the hands that do the work.*
|
|
285
|
+
|
|
286
|
+
**Role:** Category-spawned delegated executor
|
|
287
|
+
|
|
288
|
+
**Model:** Claude Sonnet 4.6 · `temperature: 0.1`
|
|
289
|
+
|
|
290
|
+
Mouse is the worker layer in Matrixx's 3-tier architecture. Spawned automatically when you
|
|
291
|
+
use `task(category="...")`, Mouse executes the task directly without delegating further.
|
|
292
|
+
It cannot spawn sub-agents (`task` tool blocked) — implementation is always done in-house.
|
|
293
|
+
Model-specific prompt variants optimize behavior for Claude, GPT, DeepSeek, Mimo, and Qwen.
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
301
297
|
Every agent, model, temperature, and permission is fully customizable. [**Meet the full team →**](docs/agents.md)
|
|
302
298
|
|
|
303
299
|
---
|
|
@@ -306,7 +302,7 @@ Every agent, model, temperature, and permission is fully customizable. [**Meet t
|
|
|
306
302
|
|
|
307
303
|
| | |
|
|
308
304
|
|---|---|
|
|
309
|
-
|
|
305
|
+
|| **Agent Orchestration** | 15 agents (incl. **Mouse** dedicated executor, **Sati** frontend specialist, **Sentinel** security auditor, **Cipher** DSL expert), parallel background execution, category-based routing, session continuity |
|
|
310
306
|
| **Developer Tools** | LSP (goto def, rename, diagnostics), AST-Grep (search & replace), Tmux terminal |
|
|
311
307
|
| **~52 Lifecycle Hooks** | Context injection, think mode, comment checking, todo enforcement, error recovery, quality gate |
|
|
312
308
|
|| **33 Built-in Skills** | DSL engineering (11), security (9), browser, git, frontend (7 via **Sati**), saturation research, AI slop detection, software dev pipeline |
|
|
@@ -405,6 +401,82 @@ Sentinel never modifies code — it reports findings with CWE IDs, exact locatio
|
|
|
405
401
|
|
|
406
402
|
---
|
|
407
403
|
|
|
404
|
+
## RTK Integration — Token Compression
|
|
405
|
+
|
|
406
|
+
Matrixx integrates [RTK](https://github.com/rtk-ai/rtk) for automatic bash command compression, reducing LLM token consumption by **60-90%** on tool outputs.
|
|
407
|
+
|
|
408
|
+
### What is RTK?
|
|
409
|
+
|
|
410
|
+
RTK is a Rust CLI binary that intelligently rewrites bash commands to compress their output before it reaches the LLM. It recognizes 70+ command patterns (git, npm, cargo, test runners, linters, build tools) and applies smart filtering, grouping, and deduplication strategies.
|
|
411
|
+
|
|
412
|
+
```
|
|
413
|
+
# Without RTK: 2000 tokens
|
|
414
|
+
$ git status
|
|
415
|
+
On branch main
|
|
416
|
+
Changes not staged for commit:
|
|
417
|
+
modified: src/config.ts
|
|
418
|
+
modified: src/hooks/index.ts
|
|
419
|
+
... (50 more lines)
|
|
420
|
+
|
|
421
|
+
# With RTK: 200 tokens
|
|
422
|
+
$ rtk git status
|
|
423
|
+
2 files changed: src/config.ts, src/hooks/index.ts
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
### How It Works
|
|
427
|
+
|
|
428
|
+
The RTK hook intercepts bash commands **before execution** and rewrites them to use RTK's compression:
|
|
429
|
+
|
|
430
|
+
1. LLM requests: `git status`
|
|
431
|
+
2. RTK hook rewrites to: `rtk git status`
|
|
432
|
+
3. RTK binary executes and compresses output
|
|
433
|
+
4. Compressed output (60-90% smaller) reaches the LLM
|
|
434
|
+
|
|
435
|
+
The hook runs **silently** — no configuration needed beyond enabling it. RTK's pattern matching handles the rest.
|
|
436
|
+
|
|
437
|
+
### Configuration
|
|
438
|
+
|
|
439
|
+
RTK is **disabled by default** (opt-in). Enable it in `matrixx.jsonc`:
|
|
440
|
+
|
|
441
|
+
```jsonc
|
|
442
|
+
{
|
|
443
|
+
"rtk": {
|
|
444
|
+
"enabled": true,
|
|
445
|
+
"binary_path": "/usr/local/bin/rtk", // optional — defaults to "rtk" in PATH
|
|
446
|
+
"timeout_ms": 5000 // optional — subprocess timeout
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
### Installation
|
|
452
|
+
|
|
453
|
+
Install RTK from [rtk-ai/rtk](https://github.com/rtk-ai/rtk):
|
|
454
|
+
|
|
455
|
+
```bash
|
|
456
|
+
# macOS
|
|
457
|
+
brew install rtk-ai/tap/rtk
|
|
458
|
+
|
|
459
|
+
# Linux (curl)
|
|
460
|
+
curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/main/install.sh | bash
|
|
461
|
+
|
|
462
|
+
# Verify installation
|
|
463
|
+
rtk --version
|
|
464
|
+
```
|
|
465
|
+
|
|
466
|
+
### Performance Impact
|
|
467
|
+
|
|
468
|
+
| Metric | Value |
|
|
469
|
+
|--------|-------|
|
|
470
|
+
| **Overhead** | ~10-20ms per bash command |
|
|
471
|
+
| **Token savings** | 60-90% reduction on compressed commands |
|
|
472
|
+
| **Net benefit** | Significant for projects with frequent bash commands |
|
|
473
|
+
|
|
474
|
+
The 10-20ms subprocess overhead is negligible compared to command execution time and LLM context savings.
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
---
|
|
478
|
+
|
|
479
|
+
|
|
408
480
|
## Documentation
|
|
409
481
|
|
|
410
482
|
| | |
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AgentConfig } from "@opencode-ai/sdk";
|
|
2
|
+
import type { AgentPromptMetadata } from "./types";
|
|
3
|
+
export declare const BDD_CONTRACT_PROMPT_METADATA: AgentPromptMetadata;
|
|
4
|
+
export declare function createBddContractAgent(model: string): AgentConfig;
|
|
5
|
+
export declare namespace createBddContractAgent {
|
|
6
|
+
var mode: "all";
|
|
7
|
+
}
|
|
@@ -5,6 +5,7 @@ import type { AgentOverrides } from "../types";
|
|
|
5
5
|
export declare function maybeCreateArchitectConfig(input: {
|
|
6
6
|
disabledAgents: string[];
|
|
7
7
|
agentOverrides: AgentOverrides;
|
|
8
|
+
globalOverrideModel?: string;
|
|
8
9
|
uiSelectedModel?: string;
|
|
9
10
|
availableModels: Set<string>;
|
|
10
11
|
systemDefaultModel?: string;
|
|
@@ -7,6 +7,7 @@ export declare function collectPendingBuiltinAgents(input: {
|
|
|
7
7
|
agentMetadata: Partial<Record<BuiltinAgentName, AgentPromptMetadata>>;
|
|
8
8
|
disabledAgents: string[];
|
|
9
9
|
agentOverrides: AgentOverrides;
|
|
10
|
+
globalOverrideModel?: string;
|
|
10
11
|
directory?: string;
|
|
11
12
|
systemDefaultModel?: string;
|
|
12
13
|
mergedCategories: Record<string, CategoryConfig>;
|
|
@@ -5,6 +5,7 @@ import type { AgentOverrides } from "../types";
|
|
|
5
5
|
export declare function maybeCreateKeymakerConfig(input: {
|
|
6
6
|
disabledAgents: string[];
|
|
7
7
|
agentOverrides: AgentOverrides;
|
|
8
|
+
globalOverrideModel?: string;
|
|
8
9
|
availableModels: Set<string>;
|
|
9
10
|
systemDefaultModel?: string;
|
|
10
11
|
isFirstRunNoCache: boolean;
|
|
@@ -14,4 +15,5 @@ export declare function maybeCreateKeymakerConfig(input: {
|
|
|
14
15
|
mergedCategories: Record<string, CategoryConfig>;
|
|
15
16
|
directory?: string;
|
|
16
17
|
useTaskSystem: boolean;
|
|
18
|
+
availableToolNames: string[];
|
|
17
19
|
}): AgentConfig | undefined;
|
|
@@ -5,6 +5,7 @@ import type { AgentOverrides } from "../types";
|
|
|
5
5
|
export declare function maybeCreateMorpheusConfig(input: {
|
|
6
6
|
disabledAgents: string[];
|
|
7
7
|
agentOverrides: AgentOverrides;
|
|
8
|
+
globalOverrideModel?: string;
|
|
8
9
|
uiSelectedModel?: string;
|
|
9
10
|
availableModels: Set<string>;
|
|
10
11
|
systemDefaultModel?: string;
|
|
@@ -16,4 +17,5 @@ export declare function maybeCreateMorpheusConfig(input: {
|
|
|
16
17
|
directory?: string;
|
|
17
18
|
userCategories?: CategoriesConfig;
|
|
18
19
|
useTaskSystem: boolean;
|
|
20
|
+
availableToolNames: string[];
|
|
19
21
|
}): AgentConfig | undefined;
|
|
@@ -2,4 +2,4 @@ import type { AgentConfig } from "@opencode-ai/sdk";
|
|
|
2
2
|
import type { BrowserAutomationProvider, CategoriesConfig } from "../config/schema";
|
|
3
3
|
import type { LoadedSkill } from "../features/opencode-skill-loader/types";
|
|
4
4
|
import type { AgentOverrides } from "./types";
|
|
5
|
-
export declare function createBuiltinAgents(disabledAgents?: string[], agentOverrides?: AgentOverrides, directory?: string, systemDefaultModel?: string, categories?: CategoriesConfig, discoveredSkills?: LoadedSkill[], customAgentSummaries?: unknown, browserProvider?: BrowserAutomationProvider, uiSelectedModel?: string, disabledSkills?: Set<string>, useTaskSystem?: boolean): Promise<Record<string, AgentConfig>>;
|
|
5
|
+
export declare function createBuiltinAgents(disabledAgents?: string[], agentOverrides?: AgentOverrides, directory?: string, systemDefaultModel?: string, categories?: CategoriesConfig, discoveredSkills?: LoadedSkill[], customAgentSummaries?: unknown, browserProvider?: BrowserAutomationProvider, uiSelectedModel?: string, disabledSkills?: Set<string>, useTaskSystem?: boolean, globalModel?: string, availableToolNames?: string[]): Promise<Record<string, AgentConfig>>;
|
|
@@ -6,7 +6,7 @@ export interface AvailableAgent {
|
|
|
6
6
|
}
|
|
7
7
|
export interface AvailableTool {
|
|
8
8
|
name: string;
|
|
9
|
-
category: "lsp" | "ast" | "search" | "session" | "command" | "other";
|
|
9
|
+
category: "lsp" | "ast" | "search" | "session" | "command" | "sandbox" | "other";
|
|
10
10
|
}
|
|
11
11
|
export interface AvailableSkill {
|
|
12
12
|
name: string;
|
|
@@ -33,4 +33,5 @@ export declare function buildCategorySkillsDelegationGuide(categories: Available
|
|
|
33
33
|
export declare function buildOracleSection(agents: AvailableAgent[]): string;
|
|
34
34
|
export declare function buildHardBlocksSection(): string;
|
|
35
35
|
export declare function buildAntiPatternsSection(): string;
|
|
36
|
+
export declare function buildContextDisciplineSection(hasContextMode?: boolean): string;
|
|
36
37
|
export declare function buildUltraworkSection(agents: AvailableAgent[], categories: AvailableCategory[], skills: AvailableSkill[]): string;
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
* Creates Matrixx-specific environment context (time, timezone, locale).
|
|
3
3
|
* Note: Working directory, platform, and date are already provided by OpenCode's system.ts,
|
|
4
4
|
* so we only include fields that OpenCode doesn't provide to avoid duplication.
|
|
5
|
-
* See: https://github.com/klpanagi/matrixx/issues/379
|
|
5
|
+
* See: https://github.com/klpanagi/opencode-matrixx/issues/379
|
|
6
6
|
*/
|
|
7
7
|
export declare function createEnvContext(): string;
|
|
@@ -6,7 +6,10 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Routing:
|
|
8
8
|
* 1. GPT models (openai/*, github-copilot/gpt-*) -> gpt.ts (GPT-5.2 optimized)
|
|
9
|
-
* 2.
|
|
9
|
+
* 2. DeepSeek models (opencode-go/deepseek-*) -> deepseek.ts (DeepSeek-optimized)
|
|
10
|
+
* 3. Mimo models (opencode-go/mimo-*) -> mimo.ts (Mimo-optimized)
|
|
11
|
+
* 4. Qwen models (opencode-go/qwen-*) -> qwen.ts (Qwen-optimized)
|
|
12
|
+
* 5. Default (Anthropic/Claude, etc.) -> default.ts (Claude-optimized)
|
|
10
13
|
*/
|
|
11
14
|
import type { AgentConfig } from "@opencode-ai/sdk";
|
|
12
15
|
import type { AgentOverrideConfig } from "../../config/schema";
|
|
@@ -14,7 +17,7 @@ export declare const MOUSE_DEFAULTS: {
|
|
|
14
17
|
readonly model: "anthropic/claude-sonnet-4-6";
|
|
15
18
|
readonly temperature: 0.1;
|
|
16
19
|
};
|
|
17
|
-
export type MousePromptSource = "default" | "gpt";
|
|
20
|
+
export type MousePromptSource = "default" | "gpt" | "deepseek" | "mimo" | "qwen";
|
|
18
21
|
/**
|
|
19
22
|
* Determines which Mouse prompt to use based on model.
|
|
20
23
|
*/
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DeepSeek-Optimized Mouse System Prompt
|
|
3
|
+
*
|
|
4
|
+
* Optimized for DeepSeek model characteristics:
|
|
5
|
+
* - Strong instruction following — explicit constraints work well
|
|
6
|
+
* - Efficient at code generation — prefers clear, direct instructions
|
|
7
|
+
* - Not overly verbose by default — moderate verbosity controls suffice
|
|
8
|
+
* - Responds well to XML-style structure
|
|
9
|
+
*
|
|
10
|
+
* Key differences from default (Claude) prompt:
|
|
11
|
+
* - No "you're too helpful" framing (not needed for DeepSeek)
|
|
12
|
+
* - More structured, table-based sections (DeepSeek handles tables well)
|
|
13
|
+
* - Moderate verbosity guidance
|
|
14
|
+
* - Verification table for clarity
|
|
15
|
+
*/
|
|
16
|
+
export declare function buildDeepSeekMousePrompt(useTaskSystem: boolean, promptAppend?: string): string;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export type { MousePromptSource } from "./agent";
|
|
2
2
|
export { buildMousePrompt, createMouseAgentWithOverrides, getMousePromptSource, MOUSE_DEFAULTS, } from "./agent";
|
|
3
|
+
export { buildDeepSeekMousePrompt } from "./deepseek";
|
|
3
4
|
export { buildDefaultMousePrompt } from "./default";
|
|
4
5
|
export { buildGptMousePrompt } from "./gpt";
|
|
6
|
+
export { buildMimoMousePrompt } from "./mimo";
|
|
7
|
+
export { buildQwenMousePrompt } from "./qwen";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mimo-Optimized Mouse System Prompt
|
|
3
|
+
*
|
|
4
|
+
* Optimized for Mimo model characteristics:
|
|
5
|
+
* - Lightweight, cost-efficient model — concise prompts reduce token waste
|
|
6
|
+
* - Fast inference — direct instructions maximize throughput
|
|
7
|
+
* - Good at following explicit, compact instructions
|
|
8
|
+
*
|
|
9
|
+
* Key differences from other prompts:
|
|
10
|
+
* - Extra concise — minimal prose, maximum signal
|
|
11
|
+
* - No extended reasoning sections (Mimo does not deep-reason)
|
|
12
|
+
* - Strong emphasis on tool-first approach
|
|
13
|
+
* - Simple, direct structure
|
|
14
|
+
*/
|
|
15
|
+
export declare function buildMimoMousePrompt(useTaskSystem: boolean, promptAppend?: string): string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Qwen-Optimized Mouse System Prompt
|
|
3
|
+
*
|
|
4
|
+
* Optimized for Qwen model characteristics:
|
|
5
|
+
* - Strong reasoning capabilities — benefits from structured, detailed prompts
|
|
6
|
+
* - Good instruction following with explicit XML-style structure
|
|
7
|
+
* - Works well with specification tables and clear formatting
|
|
8
|
+
* - Benefits from explicit output formatting guidance
|
|
9
|
+
*
|
|
10
|
+
* Key differences from other prompts:
|
|
11
|
+
* - More structured specification sections (Qwen handles detailed specs well)
|
|
12
|
+
* - Explicit output format guidance
|
|
13
|
+
* - Reasoning-first approach: think → verify → act
|
|
14
|
+
* - Balanced verbosity controls
|
|
15
|
+
*/
|
|
16
|
+
export declare function buildQwenMousePrompt(useTaskSystem: boolean, promptAppend?: string): string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared utility functions for Mouse prompt variants.
|
|
3
|
+
* Extracted to avoid duplication across model-specific prompt files.
|
|
4
|
+
*/
|
|
5
|
+
export declare function buildConstraintsSection(useTaskSystem: boolean): string;
|
|
6
|
+
export declare function buildTodoDisciplineSection(useTaskSystem: boolean): string;
|
|
7
|
+
export declare function buildVerificationTable(useTaskSystem: boolean): string;
|
package/dist/agents/types.d.ts
CHANGED
|
@@ -58,7 +58,10 @@ export declare function isGptModel(model: string): boolean;
|
|
|
58
58
|
* Matches: "anthropic/claude-*", "google-vertex-anthropic/claude-*", etc.
|
|
59
59
|
*/
|
|
60
60
|
export declare function isAnthropicModel(model: string): boolean;
|
|
61
|
-
export
|
|
61
|
+
export declare function isQwenModel(model: string): boolean;
|
|
62
|
+
export declare function isMimoModel(model: string): boolean;
|
|
63
|
+
export declare function isDeepSeekModel(model: string): boolean;
|
|
64
|
+
export type BuiltinAgentName = "morpheus" | "keymaker" | "oracle" | "merovingian" | "operator" | "trinity" | "construct" | "seraph" | "smith" | "architect" | "cipher" | "sentinel" | "sati" | "bdd-contract";
|
|
62
65
|
type OverridableAgentName = "build" | BuiltinAgentName;
|
|
63
66
|
export type AgentName = BuiltinAgentName;
|
|
64
67
|
export type AgentOverrideConfig = Partial<AgentConfig> & {
|
package/dist/config/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export type
|
|
2
|
-
export { expandProfile, PROFILE_NAMES } from "./profiles";
|
|
1
|
+
export { expandPreset, PRESET_NAMES, type PresetName } from "./presets";
|
|
3
2
|
export type { AgentDefinitions, AgentName, AgentOverrideConfig, AgentOverrides, BuiltinCommandName, EnvFileGuardConfig, ExperimentalConfig, HookName, MatrixLoopConfig, MatrixxConfig, McpName, ModelCapabilitiesConfig, MorpheusAgentConfig, MorpheusConfig, MorpheusTasksConfig, RuntimeFallbackConfig, SecretScanningConfig, SecurityConfig, TmuxConfig, TmuxLayout, } from "./schema";
|
|
4
3
|
export { AgentOverrideConfigSchema, AgentOverridesSchema, BuiltinCommandNameSchema, ExperimentalConfigSchema, HookNameSchema, MatrixLoopConfigSchema, MatrixxConfigSchema, McpNameSchema, MorpheusAgentConfigSchema, RuntimeFallbackConfigSchema, SecurityConfigSchema, TmuxConfigSchema, TmuxLayoutSchema, } from "./schema";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { MatrixxConfig } from "./schema/matrixx-config";
|
|
2
|
+
export declare const PRESET_NAMES: readonly ["minimal", "balanced", "performance", "frontier"];
|
|
3
|
+
export type PresetName = (typeof PRESET_NAMES)[number];
|
|
4
|
+
export declare function expandPreset(preset: PresetName): MatrixxConfig;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type TierResolverContext } from "../shared/tier-resolver";
|
|
2
|
+
import type { MatrixxConfig } from "./schema/matrixx-config";
|
|
3
|
+
interface WithTier {
|
|
4
|
+
model?: string;
|
|
5
|
+
tier?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Walk a merged MatrixxConfig and resolve any `tier: "..."` fields to concrete
|
|
9
|
+
* `model: "..."` strings. The result is a new config object with the `tier`
|
|
10
|
+
* fields cleared (so downstream code never re-resolves them).
|
|
11
|
+
*
|
|
12
|
+
* Precedence (per agent/category):
|
|
13
|
+
* 1. Explicit `model` — kept as-is.
|
|
14
|
+
* 2. Explicit `tier` — resolved against the live provider list.
|
|
15
|
+
* 3. `default_tier` (top-level) — applied to any agent/category without
|
|
16
|
+
* a `model` or `tier` override, then resolved.
|
|
17
|
+
*
|
|
18
|
+
* If a tier cannot be resolved, the entry is left with `tier` set and `model`
|
|
19
|
+
* undefined. The downstream `resolveModelPipeline` will fall through to
|
|
20
|
+
* category defaults and the system default as a last resort.
|
|
21
|
+
*/
|
|
22
|
+
export declare function resolveTiersInConfig(config: MatrixxConfig, ctx: TierResolverContext): MatrixxConfig;
|
|
23
|
+
/**
|
|
24
|
+
* Resolve tier fields in a category registry (e.g. `DEFAULT_CATEGORIES`) and
|
|
25
|
+
* return a new object with `tier` cleared and `model` set where the tier
|
|
26
|
+
* resolved. Entries that already have a concrete `model` are passed through.
|
|
27
|
+
* Used at config load time to pre-resolve the built-in defaults so that
|
|
28
|
+
* downstream code (createBuiltinAgents, buildAgent) only ever sees model
|
|
29
|
+
* strings.
|
|
30
|
+
*/
|
|
31
|
+
export declare function resolveTiersInCategoryRegistry(registry: Record<string, WithTier | undefined>, ctx: TierResolverContext): Record<string, WithTier>;
|
|
32
|
+
export {};
|
|
@@ -13,13 +13,16 @@ export declare const BuiltinAgentNameSchema: z.ZodEnum<{
|
|
|
13
13
|
cipher: "cipher";
|
|
14
14
|
sentinel: "sentinel";
|
|
15
15
|
sati: "sati";
|
|
16
|
+
"bdd-contract": "bdd-contract";
|
|
16
17
|
}>;
|
|
17
18
|
export declare const BuiltinSkillNameSchema: z.ZodEnum<{
|
|
19
|
+
"bdd-contract": "bdd-contract";
|
|
18
20
|
playwright: "playwright";
|
|
19
21
|
"agent-browser": "agent-browser";
|
|
20
22
|
"dev-browser": "dev-browser";
|
|
21
23
|
"frontend-ui-ux": "frontend-ui-ux";
|
|
22
24
|
"git-master": "git-master";
|
|
25
|
+
"docker-master": "docker-master";
|
|
23
26
|
"dsl-core": "dsl-core";
|
|
24
27
|
"dsl-grammar": "dsl-grammar";
|
|
25
28
|
"dsl-codegen": "dsl-codegen";
|
|
@@ -47,5 +50,8 @@ export declare const BuiltinSkillNameSchema: z.ZodEnum<{
|
|
|
47
50
|
"matrixx-self-config": "matrixx-self-config";
|
|
48
51
|
"ulw-research": "ulw-research";
|
|
49
52
|
"remove-ai-slops": "remove-ai-slops";
|
|
53
|
+
"bdd-backend": "bdd-backend";
|
|
54
|
+
"bdd-frontend": "bdd-frontend";
|
|
55
|
+
"bdd-tests": "bdd-tests";
|
|
50
56
|
}>;
|
|
51
57
|
export type AgentName = z.infer<typeof BuiltinAgentNameSchema>;
|