@ccx-agent/opencode-ccx 0.2.5 → 0.2.6
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-message.d.ts +1 -1
- package/dist/index.js +3 -16
- package/package.json +1 -1
|
@@ -17,5 +17,5 @@ type ChatMessageOutput = {
|
|
|
17
17
|
}>;
|
|
18
18
|
};
|
|
19
19
|
export declare function recordToolCall(sessionID: string, tool: string, file?: string): void;
|
|
20
|
-
export declare function createChatMessageHook(
|
|
20
|
+
export declare function createChatMessageHook(_config: OhMyCCAgentConfig): (input: ChatMessageInput, _output: ChatMessageOutput) => Promise<void>;
|
|
21
21
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -13714,9 +13714,9 @@ function recordToolCall(sessionID, tool, file2) {
|
|
|
13714
13714
|
calls.shift();
|
|
13715
13715
|
recentToolCalls.set(sessionID, calls);
|
|
13716
13716
|
}
|
|
13717
|
-
function createChatMessageHook(
|
|
13718
|
-
return async (input,
|
|
13719
|
-
if (!
|
|
13717
|
+
function createChatMessageHook(_config) {
|
|
13718
|
+
return async (input, _output) => {
|
|
13719
|
+
if (!_config.enabled)
|
|
13720
13720
|
return;
|
|
13721
13721
|
const { sessionID, agent } = input;
|
|
13722
13722
|
if (!sessionID)
|
|
@@ -13730,19 +13730,6 @@ function createChatMessageHook(config2) {
|
|
|
13730
13730
|
}
|
|
13731
13731
|
if (agent && !agent.startsWith("ccx"))
|
|
13732
13732
|
return;
|
|
13733
|
-
const reminders = [];
|
|
13734
|
-
if (config2.verification.auto_remind && calls && calls.filter((c) => EDIT_TOOLS.has(c.tool)).length >= config2.verification.min_file_edits) {
|
|
13735
|
-
reminders.push(`<system-reminder>You have made file edits. Remember the verification contract: run ccx-verification before declaring completion if you have 3+ file edits, backend/API changes, or infrastructure changes.</system-reminder>`);
|
|
13736
|
-
}
|
|
13737
|
-
if (reminders.length > 0) {
|
|
13738
|
-
output.parts.push({
|
|
13739
|
-
type: "text",
|
|
13740
|
-
text: reminders.join(`
|
|
13741
|
-
`),
|
|
13742
|
-
sessionID,
|
|
13743
|
-
messageID: input.messageID
|
|
13744
|
-
});
|
|
13745
|
-
}
|
|
13746
13733
|
};
|
|
13747
13734
|
}
|
|
13748
13735
|
|
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.6",
|
|
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",
|