@ccx-agent/opencode-ccx 0.4.0 → 0.6.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/dist/config/schema.d.ts +16 -0
- package/dist/hooks/bash-analyzer.d.ts +9 -0
- package/dist/hooks/compaction.d.ts +2 -1
- package/dist/hooks/context-bundle.d.ts +1 -0
- package/dist/hooks/git-context.d.ts +6 -0
- package/dist/hooks/session-agent.d.ts +8 -0
- package/dist/index.js +1095 -200
- package/dist/prompts/compose.d.ts +3 -0
- package/dist/prompts/output-efficiency.d.ts +2 -1
- package/dist/prompts/tone-style.d.ts +2 -1
- package/dist/prompts/tool-hints.d.ts +7 -7
- package/package.json +1 -1
- package/dist/hooks/chat-message.d.ts +0 -21
package/dist/config/schema.d.ts
CHANGED
|
@@ -35,6 +35,22 @@ export declare const configSchema: z.ZodObject<{
|
|
|
35
35
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
36
36
|
disabled_tools: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
37
37
|
}, z.core.$strip>>;
|
|
38
|
+
compaction: z.ZodDefault<z.ZodObject<{
|
|
39
|
+
replace_prompt: z.ZodDefault<z.ZodBoolean>;
|
|
40
|
+
no_tools_guard: z.ZodDefault<z.ZodBoolean>;
|
|
41
|
+
}, z.core.$strip>>;
|
|
42
|
+
tone_style: z.ZodDefault<z.ZodObject<{
|
|
43
|
+
numeric_length_anchors: z.ZodDefault<z.ZodBoolean>;
|
|
44
|
+
max_words_between_tools: z.ZodDefault<z.ZodInt>;
|
|
45
|
+
max_words_final_response: z.ZodDefault<z.ZodInt>;
|
|
46
|
+
}, z.core.$strip>>;
|
|
47
|
+
output_efficiency: z.ZodDefault<z.ZodObject<{
|
|
48
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
49
|
+
prose: "prose";
|
|
50
|
+
concise: "concise";
|
|
51
|
+
off: "off";
|
|
52
|
+
}>>;
|
|
53
|
+
}, z.core.$strip>>;
|
|
38
54
|
subagent_orchestration: z.ZodDefault<z.ZodObject<{
|
|
39
55
|
explore_min_queries: z.ZodDefault<z.ZodInt>;
|
|
40
56
|
coordinator_enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -10,4 +10,13 @@ export type AnalyzerOptions = {
|
|
|
10
10
|
extraAllowedCommands?: string[];
|
|
11
11
|
};
|
|
12
12
|
export declare function analyzeBashCommand(source: string, options?: AnalyzerOptions): RiskFinding[];
|
|
13
|
+
/**
|
|
14
|
+
* Extract the top-level command names from a bash source string, with wrapper
|
|
15
|
+
* commands (sudo, xargs, env, timeout, …) unwrapped to the inner command.
|
|
16
|
+
*
|
|
17
|
+
* Used by the risk-guard to enforce a read-only command allowlist for agents
|
|
18
|
+
* that declared `readOnly: true`. Returns lowercased command names only —
|
|
19
|
+
* arguments and redirections are not included in the returned list.
|
|
20
|
+
*/
|
|
21
|
+
export declare function extractCommandNames(source: string): string[];
|
|
13
22
|
export declare function pickHighestFinding(findings: RiskFinding[]): RiskFinding | null;
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
export declare function getGitSnapshotSection(sessionID: string): string | null;
|
|
2
|
+
/**
|
|
3
|
+
* Refresh the git snapshot for a session if it's older than SNAPSHOT_TTL_MS.
|
|
4
|
+
* Called lazily from context-bundle so subagents see current git state rather
|
|
5
|
+
* than a stale session.created snapshot from hours ago.
|
|
6
|
+
*/
|
|
7
|
+
export declare function refreshGitSnapshot(sessionID: string, cwd: string): Promise<void>;
|
|
2
8
|
export declare function createGitContextHook(directory: string): (input: unknown, _output: unknown) => Promise<void>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function recordSessionAgent(sessionID: string, agent: string | undefined): void;
|
|
2
|
+
export declare function getSessionAgent(sessionID: string): string | undefined;
|
|
3
|
+
type ChatMessageInput = {
|
|
4
|
+
sessionID?: string;
|
|
5
|
+
agent?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function createSessionAgentTracker(): (input: ChatMessageInput, _output: unknown) => Promise<void>;
|
|
8
|
+
export {};
|