opencode-matrixx 2.2.0 → 2.3.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 +21 -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 +2 -0
- package/dist/config/schema/matrixx-config.d.ts +153 -18
- package/dist/config/schema.d.ts +3 -1
- package/dist/create-hooks.d.ts +2 -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 +2 -0
- package/dist/hooks/plan-persister/hook.d.ts +20 -0
- package/dist/hooks/plan-persister/index.d.ts +2 -0
- package/dist/index.js +44907 -28359
- package/dist/plugin/hooks/create-continuation-hooks.d.ts +2 -1
- package/dist/plugin/hooks/create-core-hooks.d.ts +1 -0
- 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
|
@@ -24,3 +24,49 @@ export interface PlanProgress {
|
|
|
24
24
|
/** Whether all tasks are done */
|
|
25
25
|
isComplete: boolean;
|
|
26
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Plan Persistence Types
|
|
29
|
+
* Machine-parseable metadata appended as HTML comment to plan files
|
|
30
|
+
*/
|
|
31
|
+
/** Machine-parseable metadata appended as HTML comment to plan files */
|
|
32
|
+
export interface PlanMeta {
|
|
33
|
+
/** Plan file name without .md extension */
|
|
34
|
+
id: string;
|
|
35
|
+
/** ISO timestamp of last write */
|
|
36
|
+
updatedAt: string;
|
|
37
|
+
/** Session ID that triggered the last write */
|
|
38
|
+
sessionId: string;
|
|
39
|
+
/** Total todo count at time of write */
|
|
40
|
+
todoTotal: number;
|
|
41
|
+
/** Completed todo count at time of write */
|
|
42
|
+
todoCompleted: number;
|
|
43
|
+
/** Git HEAD at time of write (optional) */
|
|
44
|
+
gitHead?: {
|
|
45
|
+
sha: string;
|
|
46
|
+
branch?: string;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
/** Events the plan-persister hook listens to */
|
|
50
|
+
export type PlanPersistEvent = {
|
|
51
|
+
type: "session.idle";
|
|
52
|
+
sessionID: string;
|
|
53
|
+
} | {
|
|
54
|
+
type: "session.compacted";
|
|
55
|
+
sessionID: string;
|
|
56
|
+
};
|
|
57
|
+
/** Return value of buildRehydrationContext */
|
|
58
|
+
export interface RehydrationContext {
|
|
59
|
+
planName: string;
|
|
60
|
+
planPath: string;
|
|
61
|
+
content: string;
|
|
62
|
+
progress: {
|
|
63
|
+
total: number;
|
|
64
|
+
completed: number;
|
|
65
|
+
};
|
|
66
|
+
directive: string;
|
|
67
|
+
}
|
|
68
|
+
/** Options for the plan-persister hook */
|
|
69
|
+
export interface PlanPersistenceOptions {
|
|
70
|
+
/** Project root directory */
|
|
71
|
+
directory: string;
|
|
72
|
+
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import type { CommandDefinition } from "../
|
|
1
|
+
import type { CommandDefinition } from "../command-loader/types";
|
|
2
2
|
import type { LoadedSkill } from "./types";
|
|
3
|
-
export declare function loadUserSkills(): Promise<Record<string, CommandDefinition>>;
|
|
4
|
-
export declare function loadProjectSkills(directory?: string): Promise<Record<string, CommandDefinition>>;
|
|
5
3
|
export declare function loadOpencodeGlobalSkills(): Promise<Record<string, CommandDefinition>>;
|
|
6
4
|
export declare function loadOpencodeProjectSkills(directory?: string): Promise<Record<string, CommandDefinition>>;
|
|
7
5
|
interface DiscoverSkillsOptions {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { CommandDefinition } from "../
|
|
1
|
+
import type { CommandDefinition } from "../command-loader/types";
|
|
2
2
|
import type { LoadedSkill } from "./types";
|
|
3
3
|
export declare function skillsToCommandDefinitionRecord(skills: LoadedSkill[]): Record<string, CommandDefinition>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CommandDefinition } from "../
|
|
1
|
+
import type { CommandDefinition } from "../command-loader/types";
|
|
2
2
|
import type { SkillMcpConfig } from "../skill-mcp-manager/types";
|
|
3
3
|
export type SkillScope = "builtin" | "config" | "user" | "project" | "opencode" | "opencode-project";
|
|
4
4
|
export interface SkillMetadata {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { ConnectionType } from "./types";
|
|
1
|
+
import type { ConnectionType, McpServerDefinition } from "./types";
|
|
3
2
|
/**
|
|
4
3
|
* Determines connection type from MCP server configuration.
|
|
5
4
|
* Priority: explicit type field > url presence > command presence
|
|
6
5
|
*/
|
|
7
|
-
export declare function getConnectionType(config:
|
|
6
|
+
export declare function getConnectionType(config: McpServerDefinition): ConnectionType | null;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import type { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
2
|
-
import type {
|
|
3
|
-
import type { SkillMcpClientInfo, SkillMcpManagerState } from "./types";
|
|
2
|
+
import type { McpServerDefinition, SkillMcpClientInfo, SkillMcpManagerState } from "./types";
|
|
4
3
|
export declare function getOrCreateClient(params: {
|
|
5
4
|
state: SkillMcpManagerState;
|
|
6
5
|
clientKey: string;
|
|
7
6
|
info: SkillMcpClientInfo;
|
|
8
|
-
config:
|
|
7
|
+
config: McpServerDefinition;
|
|
9
8
|
}): Promise<Client>;
|
|
10
9
|
export declare function getOrCreateClientWithRetryImpl(params: {
|
|
11
10
|
state: SkillMcpManagerState;
|
|
12
11
|
clientKey: string;
|
|
13
12
|
info: SkillMcpClientInfo;
|
|
14
|
-
config:
|
|
13
|
+
config: McpServerDefinition;
|
|
15
14
|
}): Promise<Client>;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import type { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
2
2
|
import type { Prompt, Resource, Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
3
|
-
import type {
|
|
4
|
-
import type { SkillMcpClientInfo, SkillMcpServerContext } from "./types";
|
|
3
|
+
import type { McpServerDefinition, SkillMcpClientInfo, SkillMcpServerContext } from "./types";
|
|
5
4
|
export declare class SkillMcpManager {
|
|
6
5
|
private readonly state;
|
|
7
6
|
private getClientKey;
|
|
8
|
-
getOrCreateClient(info: SkillMcpClientInfo, config:
|
|
7
|
+
getOrCreateClient(info: SkillMcpClientInfo, config: McpServerDefinition): Promise<Client>;
|
|
9
8
|
disconnectSession(sessionID: string): Promise<void>;
|
|
10
9
|
disconnectAll(): Promise<void>;
|
|
11
10
|
listTools(info: SkillMcpClientInfo, context: SkillMcpServerContext): Promise<Tool[]>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { ClaudeCodeMcpServer } from "../claude-code-mcp-loader/types";
|
|
2
1
|
import { McpOAuthProvider } from "../mcp-oauth/provider";
|
|
3
|
-
|
|
2
|
+
import type { McpServerDefinition } from "./types";
|
|
3
|
+
export declare function buildHttpRequestInit(config: McpServerDefinition, authProviders: Map<string, McpOAuthProvider>): Promise<RequestInit | undefined>;
|
|
4
4
|
export declare function handleStepUpIfNeeded(params: {
|
|
5
5
|
error: Error;
|
|
6
|
-
config:
|
|
6
|
+
config: McpServerDefinition;
|
|
7
7
|
authProviders: Map<string, McpOAuthProvider>;
|
|
8
8
|
}): Promise<boolean>;
|
|
@@ -1,16 +1,28 @@
|
|
|
1
1
|
import type { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
2
2
|
import type { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
|
|
3
3
|
import type { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
|
|
4
|
-
import type { ClaudeCodeMcpServer } from "../claude-code-mcp-loader/types";
|
|
5
4
|
import type { McpOAuthProvider } from "../mcp-oauth/provider";
|
|
6
|
-
export
|
|
5
|
+
export interface McpServerDefinition {
|
|
6
|
+
type?: "http" | "sse" | "stdio";
|
|
7
|
+
url?: string;
|
|
8
|
+
command?: string;
|
|
9
|
+
args?: string[];
|
|
10
|
+
env?: Record<string, string>;
|
|
11
|
+
headers?: Record<string, string>;
|
|
12
|
+
oauth?: {
|
|
13
|
+
clientId?: string;
|
|
14
|
+
scopes?: string[];
|
|
15
|
+
};
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export type SkillMcpConfig = Record<string, McpServerDefinition>;
|
|
7
19
|
export interface SkillMcpClientInfo {
|
|
8
20
|
serverName: string;
|
|
9
21
|
skillName: string;
|
|
10
22
|
sessionID: string;
|
|
11
23
|
}
|
|
12
24
|
export interface SkillMcpServerContext {
|
|
13
|
-
config:
|
|
25
|
+
config: McpServerDefinition;
|
|
14
26
|
skillName: string;
|
|
15
27
|
}
|
|
16
28
|
/**
|
|
@@ -51,6 +63,6 @@ export interface SkillMcpClientConnectionParams {
|
|
|
51
63
|
state: SkillMcpManagerState;
|
|
52
64
|
clientKey: string;
|
|
53
65
|
info: SkillMcpClientInfo;
|
|
54
|
-
config:
|
|
66
|
+
config: McpServerDefinition;
|
|
55
67
|
}
|
|
56
68
|
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Message, Part } from "@opencode-ai/sdk";
|
|
2
|
+
interface MessageWithParts {
|
|
3
|
+
info: Message;
|
|
4
|
+
parts: Part[];
|
|
5
|
+
}
|
|
6
|
+
type MessagesTransformHook = {
|
|
7
|
+
"experimental.chat.messages.transform"?: (input: Record<string, never>, output: {
|
|
8
|
+
messages: MessageWithParts[];
|
|
9
|
+
}) => Promise<void>;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Env-Context Injector Transform Hook
|
|
13
|
+
*
|
|
14
|
+
* Appends the <matrixx-env> block (date, time, timezone, locale, year)
|
|
15
|
+
* to the last user message in each turn.
|
|
16
|
+
*
|
|
17
|
+
* This ensures the system prompt (agent config) is 100% static and
|
|
18
|
+
* byte-identical across all turns in a session, enabling provider-side
|
|
19
|
+
* prefix caching (Anthropic prompt caching, DeepSeek KV cache, OpenAI
|
|
20
|
+
* auto-cache).
|
|
21
|
+
*/
|
|
22
|
+
export declare function createEnvContextInjectorHook(): MessagesTransformHook;
|
|
23
|
+
export {};
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export { createDirectoryAgentsInjectorHook } from "./directory-agents-injector";
|
|
|
16
16
|
export { createDirectoryReadmeInjectorHook } from "./directory-readme-injector";
|
|
17
17
|
export { createEditErrorRecoveryHook } from "./edit-error-recovery";
|
|
18
18
|
export { createEmptyTaskResponseDetectorHook } from "./empty-task-response-detector";
|
|
19
|
+
export { createEnvContextInjectorHook } from "./env-context-injector";
|
|
19
20
|
export { createEnvFileWriteGuardHook } from "./env-file-write-guard";
|
|
20
21
|
export { createHashlineEditDiffEnhancerHook } from "./hashline-edit-diff-enhancer";
|
|
21
22
|
export { createHashlineReadEnhancerHook } from "./hashline-read-enhancer";
|
|
@@ -25,6 +26,7 @@ export { createKeywordDetectorHook } from "./keyword-detector";
|
|
|
25
26
|
export { createMatrixLoopHook, type MatrixLoopHook } from "./matrix-loop";
|
|
26
27
|
export { createMouseNotepadHook } from "./mouse-notepad";
|
|
27
28
|
export { createNonInteractiveEnvHook } from "./non-interactive-env";
|
|
29
|
+
export { createPlanPersister } from "./plan-persister";
|
|
28
30
|
export { createPreemptiveCompactionHook } from "./preemptive-compaction";
|
|
29
31
|
export { createOracleMdOnlyHook } from "./prometheus-md-only";
|
|
30
32
|
export { createQualityGateHook } from "./quality-gate/hook";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plan Persister Hook
|
|
3
|
+
*
|
|
4
|
+
* Continuation hook that persists active plan state (todos + metadata)
|
|
5
|
+
* to the plan file on session.idle, and builds rehydration context
|
|
6
|
+
* for injection after compaction.
|
|
7
|
+
*/
|
|
8
|
+
import type { PluginInput } from "@opencode-ai/plugin";
|
|
9
|
+
import type { PlanPersistenceOptions } from "../../features/mission-state/types";
|
|
10
|
+
export interface PlanPersister {
|
|
11
|
+
buildRehydrationContext: (sessionID: string) => string | null;
|
|
12
|
+
capture: (sessionID: string) => Promise<void>;
|
|
13
|
+
event: (input: {
|
|
14
|
+
event: {
|
|
15
|
+
type: string;
|
|
16
|
+
properties?: unknown;
|
|
17
|
+
};
|
|
18
|
+
}) => Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
export declare function createPlanPersister(ctx: PluginInput, options: PlanPersistenceOptions): PlanPersister;
|