opencode-matrixx 2.6.8 → 2.6.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/README.md +1 -1
  2. package/dist/agents/dynamic-agent-prompt-builder.d.ts +3 -0
  3. package/dist/cli.js +2 -1
  4. package/dist/config/schema/hooks.d.ts +1 -0
  5. package/dist/config/schema/matrixx-config.d.ts +1 -0
  6. package/dist/create-hooks.d.ts +1 -0
  7. package/dist/hooks/directory-agents-injector/hook.d.ts +22 -3
  8. package/dist/hooks/document-reader-guard/constants.d.ts +5 -0
  9. package/dist/hooks/document-reader-guard/hook.d.ts +2 -0
  10. package/dist/hooks/document-reader-guard/index.d.ts +2 -0
  11. package/dist/hooks/index.d.ts +2 -0
  12. package/dist/hooks/json-error-recovery/hook.d.ts +1 -1
  13. package/dist/hooks/post-read-injector/block.d.ts +1 -0
  14. package/dist/hooks/post-read-injector/constants.d.ts +4 -0
  15. package/dist/hooks/post-read-injector/hook.d.ts +27 -0
  16. package/dist/hooks/post-read-injector/index.d.ts +8 -0
  17. package/dist/hooks/post-read-injector/injector.d.ts +18 -0
  18. package/dist/hooks/post-read-injector/sections.d.ts +7 -0
  19. package/dist/hooks/post-read-injector/unified-walk.d.ts +6 -0
  20. package/dist/hooks/rules-injector/hook.d.ts +22 -23
  21. package/dist/index.js +1635 -1418
  22. package/dist/matrixx.schema.json +1 -0
  23. package/dist/mcp/types.d.ts +0 -1
  24. package/dist/plugin/hooks/create-core-hooks.d.ts +1 -0
  25. package/dist/plugin/hooks/create-tool-guard-hooks.d.ts +2 -1
  26. package/dist/plugin-handlers/agent-tool-allowlist.d.ts +11 -0
  27. package/dist/tools/github-search/cli.d.ts +7 -0
  28. package/dist/tools/github-search/constants.d.ts +6 -0
  29. package/dist/tools/github-search/index.d.ts +1 -0
  30. package/dist/tools/github-search/result-formatter.d.ts +2 -0
  31. package/dist/tools/github-search/result-formatter.test.d.ts +1 -0
  32. package/dist/tools/github-search/tools.d.ts +3 -0
  33. package/dist/tools/github-search/types.d.ts +20 -0
  34. package/dist/tools/index.d.ts +1 -0
  35. package/package.json +1 -1
  36. package/dist/mcp/white-rabbit.d.ts +0 -6
package/README.md CHANGED
@@ -357,7 +357,7 @@ Every agent, model, temperature, and permission is fully customizable. [**Meet t
357
357
  | **Developer Tools** | LSP (goto def, rename, diagnostics), AST-Grep (search & replace), Tmux terminal |
358
358
  | **64 Lifecycle Hooks** | Context injection, think mode, comment checking, task/todo continuation enforcement, error recovery, quality gate, preemptive compaction, session recovery |
359
359
  | **36 Built-in Skills** | DSL engineering (11), security (9), browser, git, frontend (7 via **Sati**), BDD (4: `bdd-contract`/`backend`/`frontend`/`tests` + pipeline), saturation research, AI slop detection, TDD (`tdd-enforcer` opt-in), software dev pipeline |
360
- | **Curated MCPs** | Exa (web search), Context7 (official docs), Grep.app (GitHub code search), Document Reader |
360
+ | **Curated MCPs** | Exa (web search), Context7 (official docs), Document Reader + native `github_search` (local gh/git/rg) |
361
361
  | **Claude Code Compat** | Full compatibility — commands, agents, skills, MCPs, hooks from `settings.json` |
362
362
  | **Software Dev Pipeline** | 6-phase TDD workflow (PLAN→BUILD→VERIFY→REVIEW→SECURE→SHIP), 5 team roles, adaptive phases |
363
363
  ||| **Assembly Tool** | Multi-model debate that spawns 3-5 parallel voters from different providers, collects independent reasoning, and synthesizes unified decisions with confidence scoring |
@@ -31,10 +31,13 @@ export declare function buildDelegationTable(agents: AvailableAgent[]): string;
31
31
  export declare function formatCustomSkillsBlock(customRows: string[], customSkills: AvailableSkill[], headerLevel?: "####" | "**"): string;
32
32
  export declare function buildCategorySkillsDelegationGuide(categories: AvailableCategory[], skills: AvailableSkill[]): string;
33
33
  export declare function buildOracleSection(agents: AvailableAgent[]): string;
34
+ export declare function buildArchitectReferralSection(): string;
34
35
  export declare function buildHardBlocksSection(): string;
35
36
  export declare function buildAntiPatternsSection(): string;
36
37
  export declare function _resetDisciplineCacheForTesting(): void;
37
38
  export declare function hasGrepGlobToolNames(toolNames: readonly string[]): boolean;
39
+ export declare function fallbackFullDiscipline(hasGrepGlob: boolean): string;
40
+ export declare function fallbackCompactDiscipline(hasGrepGlob: boolean): string;
38
41
  export declare function buildContextDisciplineSection(hasContextMode?: boolean, hasGrepGlob?: boolean): string;
39
42
  export declare function buildHeadroomSection(hasHeadroom?: boolean): string;
40
43
  export declare function buildCompactContextDisciplineSection(hasContextMode?: boolean, hasGrepGlob?: boolean): string;
package/dist/cli.js CHANGED
@@ -15635,7 +15635,7 @@ function date4(params) {
15635
15635
  // node_modules/zod/v4/classic/external.js
15636
15636
  config(en_default());
15637
15637
  // src/mcp/types.ts
15638
- var McpNameSchema = exports_external.enum(["websearch", "context7", "white_rabbit", "document_reader"]);
15638
+ var McpNameSchema = exports_external.enum(["websearch", "context7", "document_reader"]);
15639
15639
  var AnyMcpNameSchema = exports_external.string().min(1);
15640
15640
 
15641
15641
  // src/config/schema/agent-definitions.ts
@@ -16254,6 +16254,7 @@ var HookNameEnum = exports_external.enum([
16254
16254
  "context-mode-enforcer",
16255
16255
  "context-mode-enforcer",
16256
16256
  "task-edit-guard",
16257
+ "document-reader-guard",
16257
16258
  "failure-counter"
16258
16259
  ]);
16259
16260
  var HookNameSchema = exports_external.union([
@@ -61,6 +61,7 @@ export declare const HookNameSchema: z.ZodUnion<readonly [z.ZodEnum<{
61
61
  "evolution-hitl": "evolution-hitl";
62
62
  "context-mode-enforcer": "context-mode-enforcer";
63
63
  "task-edit-guard": "task-edit-guard";
64
+ "document-reader-guard": "document-reader-guard";
64
65
  "failure-counter": "failure-counter";
65
66
  }>, z.ZodPipe<z.ZodLiteral<"anthropic-context-window-limit-recovery">, z.ZodTransform<"context-window-limit-recovery", "anthropic-context-window-limit-recovery">>]>;
66
67
  export type HookName = z.infer<typeof HookNameSchema>;
@@ -134,6 +134,7 @@ export declare const MatrixxConfigSchema: z.ZodObject<{
134
134
  "evolution-hitl": "evolution-hitl";
135
135
  "context-mode-enforcer": "context-mode-enforcer";
136
136
  "task-edit-guard": "task-edit-guard";
137
+ "document-reader-guard": "document-reader-guard";
137
138
  "failure-counter": "failure-counter";
138
139
  }>, z.ZodPipe<z.ZodLiteral<"anthropic-context-window-limit-recovery">, z.ZodTransform<"context-window-limit-recovery", "anthropic-context-window-limit-recovery">>]>>>;
139
140
  disabled_commands: z.ZodOptional<z.ZodArray<z.ZodEnum<{
@@ -53,6 +53,7 @@ export declare function createHooks(args: {
53
53
  qualityGate: ReturnType<typeof import("./hooks").createQualityGateHook> | null;
54
54
  taskNotepad: ReturnType<typeof import("./hooks").createTaskNotepadHook> | null;
55
55
  taskEditGuard: ReturnType<typeof import("./hooks").createTaskEditGuardHook> | null;
56
+ documentReaderGuard: ReturnType<typeof import("./hooks").createDocumentReaderGuardHook> | null;
56
57
  evolutionWatcher: ReturnType<typeof import("./hooks").createEvolutionWatcherHook> | null;
57
58
  contextWindowMonitor: ReturnType<typeof import("./hooks").createContextWindowMonitorHook> | null;
58
59
  preemptiveCompaction: ReturnType<typeof import("./hooks").createPreemptiveCompactionHook> | null;
@@ -1,6 +1,25 @@
1
1
  import type { PluginInput } from "@opencode-ai/plugin";
2
2
  export declare function createDirectoryAgentsInjectorHook(ctx: PluginInput): {
3
- "tool.execute.before": (input: import("../directory-injector/factory").ToolExecuteInput, output: import("../directory-injector/factory").ToolExecuteBeforeOutput) => Promise<void>;
4
- "tool.execute.after": (input: import("../directory-injector/factory").ToolExecuteInput, output: import("../directory-injector/factory").ToolExecuteOutput) => Promise<void>;
5
- event: ({ event }: import("../directory-injector/factory").EventInput) => Promise<void>;
3
+ "tool.execute.before": (input: {
4
+ tool: string;
5
+ sessionID: string;
6
+ callID: string;
7
+ }, output: {
8
+ args: unknown;
9
+ }) => Promise<void>;
10
+ "tool.execute.after": (input: {
11
+ tool: string;
12
+ sessionID: string;
13
+ callID: string;
14
+ }, output: {
15
+ title: string;
16
+ output: string;
17
+ metadata: unknown;
18
+ }) => Promise<void>;
19
+ event: ({ event }: {
20
+ event: {
21
+ type: string;
22
+ properties?: unknown;
23
+ };
24
+ }) => Promise<void>;
6
25
  };
@@ -0,0 +1,5 @@
1
+ export declare const HOOK_NAME = "document-reader-guard";
2
+ export declare const BINARY_EXTENSIONS: readonly [".pdf", ".docx", ".doc", ".xlsx", ".xls", ".pptx", ".ppt", ".jpg", ".jpeg", ".png", ".gif", ".webp", ".mp3", ".wav"];
3
+ export declare const BLOCKED_PATTERNS: RegExp[];
4
+ export declare const READ_BLOCK_MESSAGE: string;
5
+ export declare const BASH_BLOCK_MESSAGE: string;
@@ -0,0 +1,2 @@
1
+ import type { Hooks, PluginInput } from "@opencode-ai/plugin";
2
+ export declare function createDocumentReaderGuardHook(ctx: PluginInput): Hooks;
@@ -0,0 +1,2 @@
1
+ export { BASH_BLOCK_MESSAGE, BINARY_EXTENSIONS, BLOCKED_PATTERNS, HOOK_NAME, READ_BLOCK_MESSAGE } from "./constants";
2
+ export { createDocumentReaderGuardHook } from "./hook";
@@ -15,6 +15,7 @@ export { createContextWindowMonitorHook } from "./context-window-monitor";
15
15
  export { createDelegateTaskRetryHook } from "./delegate-task-retry";
16
16
  export { createDesignIntentPreserverHook } from "./design-intent-preserver";
17
17
  export { createDirectoryAgentsInjectorHook } from "./directory-agents-injector";
18
+ export { createDocumentReaderGuardHook } from "./document-reader-guard";
18
19
  export { createEditErrorRecoveryHook } from "./edit-error-recovery";
19
20
  export { createEmptyTaskResponseDetectorHook } from "./empty-task-response-detector";
20
21
  export { createEnvContextInjectorHook } from "./env-context-injector";
@@ -35,6 +36,7 @@ export { createMouseNotepadHook } from "./mouse-notepad";
35
36
  export { createNonInteractiveEnvHook } from "./non-interactive-env";
36
37
  export { createOracleMdOnlyHook } from "./oracle-md-only";
37
38
  export { createPlanPersister } from "./plan-persister";
39
+ export { createPostReadInjectorHook } from "./post-read-injector";
38
40
  export { createPreemptiveCompactionHook } from "./preemptive-compaction";
39
41
  export { createQualityGateHook } from "./quality-gate/hook";
40
42
  export { createReadImageResizerHook } from "./read-image-resizer";
@@ -1,5 +1,5 @@
1
1
  import type { PluginInput } from "@opencode-ai/plugin";
2
- export declare const JSON_ERROR_TOOL_EXCLUDE_LIST: readonly ["bash", "read", "glob", "grep", "webfetch", "look_at", "white_rabbit_searchgithub", "websearch_web_search_exa"];
2
+ export declare const JSON_ERROR_TOOL_EXCLUDE_LIST: readonly ["bash", "read", "glob", "grep", "webfetch", "look_at", "github_search", "websearch_web_search_exa"];
3
3
  export declare const JSON_ERROR_PATTERNS: readonly RegExp[];
4
4
  export declare const JSON_ERROR_REMINDER = "\n[JSON PARSE ERROR - IMMEDIATE ACTION REQUIRED]\n\nYou sent invalid JSON arguments to a tool. STOP and do this NOW:\n\n1. DO NOT retry with the same malformed JSON\n2. CORRECT the JSON syntax \u2014 check for: missing quotes, trailing commas, unmatched braces\n3. RETRY the tool call with valid JSON arguments\n\nThis usually means you garbled a string parameter or forgot to escape a character.\n";
5
5
  export declare function createJsonErrorRecoveryHook(_ctx: PluginInput): {
@@ -0,0 +1 @@
1
+ export declare function buildDirectoryContextBlock(sections: string[]): string;
@@ -0,0 +1,4 @@
1
+ export declare const MAX_DIRECTORY_CONTEXT_BYTES = 6144;
2
+ export declare const DIRECTORY_CONTEXT_HEADER = "Directory Context";
3
+ export declare const DIRECTORY_CONTEXT_SEPARATOR = "\n---\n";
4
+ export declare function buildTruncationMarker(omittedChars: number): string;
@@ -0,0 +1,27 @@
1
+ import type { PluginInput } from "@opencode-ai/plugin";
2
+ export declare function createPostReadInjectorHook(ctx: PluginInput, options?: {
3
+ trackedTools?: string[];
4
+ }): {
5
+ "tool.execute.before": (input: {
6
+ tool: string;
7
+ sessionID: string;
8
+ callID: string;
9
+ }, output: {
10
+ args: unknown;
11
+ }) => Promise<void>;
12
+ "tool.execute.after": (input: {
13
+ tool: string;
14
+ sessionID: string;
15
+ callID: string;
16
+ }, output: {
17
+ title: string;
18
+ output: string;
19
+ metadata: unknown;
20
+ }) => Promise<void>;
21
+ event: ({ event }: {
22
+ event: {
23
+ type: string;
24
+ properties?: unknown;
25
+ };
26
+ }) => Promise<void>;
27
+ };
@@ -0,0 +1,8 @@
1
+ export { buildDirectoryContextBlock } from "./block";
2
+ export { buildTruncationMarker, DIRECTORY_CONTEXT_HEADER, DIRECTORY_CONTEXT_SEPARATOR, MAX_DIRECTORY_CONTEXT_BYTES, } from "./constants";
3
+ export { createPostReadInjectorHook } from "./hook";
4
+ export type { UnifiedTruncator } from "./injector";
5
+ export { createUnifiedPostReadProcessor } from "./injector";
6
+ export type { RulesCache } from "./sections";
7
+ export { readAgentsSection, readRuleSection } from "./sections";
8
+ export { collectAncestorDirs } from "./unified-walk";
@@ -0,0 +1,18 @@
1
+ export type UnifiedTruncator = {
2
+ truncate: (sessionID: string, content: string) => Promise<{
3
+ result: string;
4
+ truncated: boolean;
5
+ }>;
6
+ };
7
+ export declare function createUnifiedPostReadProcessor(deps: {
8
+ workspaceDirectory: string;
9
+ truncator: UnifiedTruncator;
10
+ onVisitDir?: (dir: string) => void;
11
+ }): {
12
+ processFilePathForInjection: (filePath: string, sessionID: string, output: {
13
+ title: string;
14
+ output: string;
15
+ metadata: unknown;
16
+ }) => Promise<void>;
17
+ clearSessionCache: (sessionID: string) => void;
18
+ };
@@ -0,0 +1,7 @@
1
+ import type { UnifiedTruncator } from "./injector";
2
+ export type RulesCache = {
3
+ contentHashes: Set<string>;
4
+ realPaths: Set<string>;
5
+ };
6
+ export declare function readAgentsSection(agentsPath: string, sessionID: string, truncator: UnifiedTruncator): Promise<string | null>;
7
+ export declare function readRuleSection(candidate: string, rel: string, reason: string, sessionID: string, truncator: UnifiedTruncator, rulesCache: RulesCache): Promise<string | null>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Single upward walk from the file's directory toward the filesystem root.
3
+ * Visits each ancestor exactly once (leaf-first) and reports visits via onVisit.
4
+ * rootDir/projectRoot only document the shared prefix — the walk itself is one loop.
5
+ */
6
+ export declare function collectAncestorDirs(filePath: string, rootDir?: string | ((dir: string) => void), projectRoot?: string | ((dir: string) => void) | null, onVisit?: (dir: string) => void): string[];
@@ -1,26 +1,25 @@
1
1
  import type { PluginInput } from "@opencode-ai/plugin";
2
- interface ToolExecuteInput {
3
- tool: string;
4
- sessionID: string;
5
- callID: string;
6
- }
7
- interface ToolExecuteOutput {
8
- title: string;
9
- output: string;
10
- metadata: unknown;
11
- }
12
- interface ToolExecuteBeforeOutput {
13
- args: unknown;
14
- }
15
- interface EventInput {
16
- event: {
17
- type: string;
18
- properties?: unknown;
19
- };
20
- }
21
2
  export declare function createRulesInjectorHook(ctx: PluginInput): {
22
- "tool.execute.before": (input: ToolExecuteInput, output: ToolExecuteBeforeOutput) => Promise<void>;
23
- "tool.execute.after": (input: ToolExecuteInput, output: ToolExecuteOutput) => Promise<void>;
24
- event: ({ event }: EventInput) => Promise<void>;
3
+ "tool.execute.before": (input: {
4
+ tool: string;
5
+ sessionID: string;
6
+ callID: string;
7
+ }, output: {
8
+ args: unknown;
9
+ }) => Promise<void>;
10
+ "tool.execute.after": (input: {
11
+ tool: string;
12
+ sessionID: string;
13
+ callID: string;
14
+ }, output: {
15
+ title: string;
16
+ output: string;
17
+ metadata: unknown;
18
+ }) => Promise<void>;
19
+ event: ({ event }: {
20
+ event: {
21
+ type: string;
22
+ properties?: unknown;
23
+ };
24
+ }) => Promise<void>;
25
25
  };
26
- export {};