opencode-froggy 0.1.0 → 0.3.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.
Files changed (51) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +508 -246
  3. package/agent/architect.md +91 -0
  4. package/agent/partner.md +143 -0
  5. package/agent/rubber-duck.md +129 -0
  6. package/command/commit-push.md +21 -0
  7. package/command/doc-changes.md +45 -0
  8. package/command/review-changes.md +1 -21
  9. package/command/review-pr.md +1 -22
  10. package/command/send-to.md +21 -0
  11. package/command/simplify-changes.md +2 -20
  12. package/dist/index.d.ts +1 -1
  13. package/dist/index.js +27 -52
  14. package/dist/index.test.js +29 -8
  15. package/dist/loaders.d.ts +9 -5
  16. package/dist/loaders.js +5 -1
  17. package/dist/tools/blockchain/eth-address-balance.d.ts +20 -0
  18. package/dist/tools/blockchain/eth-address-balance.js +37 -0
  19. package/dist/tools/blockchain/eth-address-txs.d.ts +23 -0
  20. package/dist/tools/blockchain/eth-address-txs.js +41 -0
  21. package/dist/tools/blockchain/eth-token-transfers.d.ts +23 -0
  22. package/dist/tools/blockchain/eth-token-transfers.js +41 -0
  23. package/dist/tools/blockchain/eth-transaction.d.ts +20 -0
  24. package/dist/tools/blockchain/eth-transaction.js +40 -0
  25. package/dist/tools/blockchain/etherscan-client.d.ts +25 -0
  26. package/dist/tools/blockchain/etherscan-client.js +156 -0
  27. package/dist/tools/blockchain/etherscan-client.test.d.ts +1 -0
  28. package/dist/tools/blockchain/etherscan-client.test.js +211 -0
  29. package/dist/tools/blockchain/formatters.d.ts +10 -0
  30. package/dist/tools/blockchain/formatters.js +147 -0
  31. package/dist/tools/blockchain/index.d.ts +10 -0
  32. package/dist/tools/blockchain/index.js +10 -0
  33. package/dist/tools/blockchain/tools.test.d.ts +1 -0
  34. package/dist/tools/blockchain/tools.test.js +208 -0
  35. package/dist/tools/blockchain/types.d.ts +90 -0
  36. package/dist/tools/blockchain/types.js +8 -0
  37. package/dist/tools/diff-summary.d.ts +20 -0
  38. package/dist/tools/diff-summary.js +111 -0
  39. package/dist/tools/gitingest.d.ts +26 -0
  40. package/dist/tools/gitingest.js +41 -0
  41. package/dist/tools/index.d.ts +5 -0
  42. package/dist/tools/index.js +5 -0
  43. package/dist/tools/list-child-sessions.d.ts +9 -0
  44. package/dist/tools/list-child-sessions.js +24 -0
  45. package/dist/tools/prompt-session.d.ts +19 -0
  46. package/dist/tools/prompt-session.js +39 -0
  47. package/dist/tools/reply-child.d.ts +19 -0
  48. package/dist/tools/reply-child.js +42 -0
  49. package/images/logo.png +0 -0
  50. package/package.json +4 -2
  51. package/command/commit.md +0 -18
@@ -0,0 +1,42 @@
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
+ }
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-froggy",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "OpenCode plugin with a hook layer (tool.before.*, session.idle...), agents (code-reviewer, doc-writer), and commands (/review-pr, /commit)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -9,7 +9,9 @@
9
9
  "dist",
10
10
  "agent",
11
11
  "command",
12
- "skill"
12
+ "skill",
13
+ "images",
14
+ "README.md"
13
15
  ],
14
16
  "scripts": {
15
17
  "build": "tsc",
package/command/commit.md DELETED
@@ -1,18 +0,0 @@
1
- ---
2
- description: Commit and push
3
- agent: build
4
- ---
5
-
6
- ## Context
7
-
8
- - Current git status: !`git status`
9
- - Current git diff (staged and unstaged changes): !`git diff HEAD`
10
- - Current branch: !`git branch --show-current`
11
-
12
- ## Your task
13
-
14
- Based on the above changes:
15
- 1. Create a new branch if on main or master
16
- 2. Create a single commit with an appropriate message
17
- 3. Push the branch to origin
18
- 4. You have the capability to call multiple tools in a single response. You MUST do all of the above in a single message. Do not use any other tools or do anything else. Do not send any other text or messages besides these tool calls.