opencode-matrixx 2.6.8 → 2.6.9
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/dist/agents/dynamic-agent-prompt-builder.d.ts +3 -0
- package/dist/hooks/directory-agents-injector/hook.d.ts +22 -3
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/post-read-injector/block.d.ts +1 -0
- package/dist/hooks/post-read-injector/constants.d.ts +4 -0
- package/dist/hooks/post-read-injector/hook.d.ts +27 -0
- package/dist/hooks/post-read-injector/index.d.ts +8 -0
- package/dist/hooks/post-read-injector/injector.d.ts +18 -0
- package/dist/hooks/post-read-injector/sections.d.ts +7 -0
- package/dist/hooks/post-read-injector/unified-walk.d.ts +6 -0
- package/dist/hooks/rules-injector/hook.d.ts +22 -23
- package/dist/index.js +968 -1042
- package/dist/plugin-handlers/agent-tool-allowlist.d.ts +11 -0
- package/package.json +1 -1
|
@@ -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;
|
|
@@ -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:
|
|
4
|
-
|
|
5
|
-
|
|
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
|
};
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ export { createMouseNotepadHook } from "./mouse-notepad";
|
|
|
35
35
|
export { createNonInteractiveEnvHook } from "./non-interactive-env";
|
|
36
36
|
export { createOracleMdOnlyHook } from "./oracle-md-only";
|
|
37
37
|
export { createPlanPersister } from "./plan-persister";
|
|
38
|
+
export { createPostReadInjectorHook } from "./post-read-injector";
|
|
38
39
|
export { createPreemptiveCompactionHook } from "./preemptive-compaction";
|
|
39
40
|
export { createQualityGateHook } from "./quality-gate/hook";
|
|
40
41
|
export { createReadImageResizerHook } from "./read-image-resizer";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function buildDirectoryContextBlock(sections: string[]): 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:
|
|
23
|
-
|
|
24
|
-
|
|
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 {};
|