@ccx-agent/opencode-ccx 0.2.7 → 0.2.8
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/hooks/chat-params.d.ts +2 -1
- package/dist/index.js +9 -17
- package/package.json +1 -1
|
@@ -11,8 +11,9 @@ type ChatParamsInput = {
|
|
|
11
11
|
type ChatParamsOutput = {
|
|
12
12
|
temperature: number;
|
|
13
13
|
topP: number;
|
|
14
|
+
top_p?: number;
|
|
14
15
|
topK: number;
|
|
15
16
|
options: Record<string, unknown>;
|
|
16
17
|
};
|
|
17
|
-
export declare function createChatParamsHook(): (
|
|
18
|
+
export declare function createChatParamsHook(): (_input: ChatParamsInput, output: ChatParamsOutput) => Promise<void>;
|
|
18
19
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -13734,24 +13734,16 @@ function createChatMessageHook(_config) {
|
|
|
13734
13734
|
}
|
|
13735
13735
|
|
|
13736
13736
|
// src/hooks/chat-params.ts
|
|
13737
|
-
var AGENT_PARAMS = {
|
|
13738
|
-
"ccx-plan": { temperature: 0.3 },
|
|
13739
|
-
"ccx-verification": { temperature: 0.2 },
|
|
13740
|
-
"ccx-explore": { temperature: 0.5 },
|
|
13741
|
-
"ccx-coordinator": { temperature: 0.4 },
|
|
13742
|
-
"ccx-general-purpose": { temperature: 0.5 }
|
|
13743
|
-
};
|
|
13744
13737
|
function createChatParamsHook() {
|
|
13745
|
-
return async (
|
|
13746
|
-
const
|
|
13747
|
-
|
|
13748
|
-
|
|
13749
|
-
|
|
13750
|
-
|
|
13751
|
-
|
|
13752
|
-
|
|
13753
|
-
|
|
13754
|
-
output.topK = agentParams.topK;
|
|
13738
|
+
return async (_input, output) => {
|
|
13739
|
+
const out = output;
|
|
13740
|
+
const hasTemperature = out.temperature !== undefined;
|
|
13741
|
+
const hasTopP = out.topP !== undefined || out.top_p !== undefined;
|
|
13742
|
+
const hasBoth = hasTemperature && hasTopP;
|
|
13743
|
+
if (hasBoth) {
|
|
13744
|
+
delete out.topP;
|
|
13745
|
+
delete out.top_p;
|
|
13746
|
+
}
|
|
13755
13747
|
};
|
|
13756
13748
|
}
|
|
13757
13749
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ccx-agent/opencode-ccx",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"description": "Production-grade prompt engineering for OpenCode — disciplined coding, risk-aware actions, adversarial verification",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|