opencode-froggy 0.3.0 → 0.4.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/README.md +127 -27
- package/command/commit-push.md +1 -1
- package/command/diff-summary.md +19 -0
- package/command/doc-changes.md +1 -1
- package/command/review-changes.md +15 -1
- package/command/review-pr.md +17 -2
- package/command/simplify-changes.md +1 -1
- package/dist/index.js +1 -3
- package/dist/tools/blockchain/eth-transaction.d.ts +15 -1
- package/dist/tools/blockchain/eth-transaction.js +180 -17
- package/dist/tools/blockchain/etherscan-client.d.ts +3 -2
- package/dist/tools/blockchain/etherscan-client.js +23 -5
- package/dist/tools/blockchain/event-decoder.d.ts +14 -0
- package/dist/tools/blockchain/event-decoder.js +96 -0
- package/dist/tools/blockchain/event-decoder.test.d.ts +1 -0
- package/dist/tools/blockchain/event-decoder.test.js +197 -0
- package/dist/tools/blockchain/types.d.ts +64 -0
- package/dist/tools/blockchain/viem-client.d.ts +9 -0
- package/dist/tools/blockchain/viem-client.js +98 -0
- package/dist/tools/index.d.ts +0 -1
- package/dist/tools/index.js +0 -1
- package/package.json +3 -2
- package/skill/code-simplify/SKILL.md +6 -0
- package/dist/tools/diff-summary.d.ts +0 -20
- package/dist/tools/diff-summary.js +0 -111
- package/dist/tools/reply-child.d.ts +0 -19
- package/dist/tools/reply-child.js +0 -42
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { tool } from "@opencode-ai/plugin";
|
|
2
|
-
import { log } from "../logger";
|
|
3
|
-
export function createReplyChildTool(client) {
|
|
4
|
-
return tool({
|
|
5
|
-
description: "Send a message to the last child session (subagent) to continue the conversation",
|
|
6
|
-
args: {
|
|
7
|
-
message: tool.schema.string().describe("The message to send to the child session"),
|
|
8
|
-
sessionId: tool.schema.string().optional().describe("The child session ID to target (optional - uses last child if not provided)"),
|
|
9
|
-
},
|
|
10
|
-
async execute(args, context) {
|
|
11
|
-
let targetSessionId = args.sessionId;
|
|
12
|
-
if (!targetSessionId) {
|
|
13
|
-
const children = await client.session.children({
|
|
14
|
-
path: { id: context.sessionID },
|
|
15
|
-
});
|
|
16
|
-
const lastChild = (children.data ?? []).at(-1);
|
|
17
|
-
if (!lastChild) {
|
|
18
|
-
return "Error: No child session found for current session";
|
|
19
|
-
}
|
|
20
|
-
targetSessionId = lastChild.id;
|
|
21
|
-
}
|
|
22
|
-
log("[reply-child] Sending message to child session", {
|
|
23
|
-
parentSessionID: context.sessionID,
|
|
24
|
-
childSessionID: targetSessionId,
|
|
25
|
-
message: args.message.slice(0, 100),
|
|
26
|
-
});
|
|
27
|
-
const response = await client.session.prompt({
|
|
28
|
-
path: { id: targetSessionId },
|
|
29
|
-
body: { parts: [{ type: "text", text: args.message }] },
|
|
30
|
-
});
|
|
31
|
-
log("[reply-child] Response received", {
|
|
32
|
-
childSessionID: targetSessionId,
|
|
33
|
-
});
|
|
34
|
-
const parts = response.data?.parts ?? [];
|
|
35
|
-
const textContent = parts
|
|
36
|
-
.filter((p) => p.type === "text" && p.text)
|
|
37
|
-
.map((p) => p.text)
|
|
38
|
-
.join("\n");
|
|
39
|
-
return textContent || "Message sent to child session";
|
|
40
|
-
},
|
|
41
|
-
});
|
|
42
|
-
}
|