agentikit-opencode 0.0.8 → 0.0.9
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 +3 -4
- package/index.ts +5 -14
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# agentikit-opencode
|
|
2
2
|
|
|
3
|
-
OpenCode plugin for the [Agentikit](https://github.com/itlackey/agentikit) CLI. Registers tools that let your AI agent **search
|
|
3
|
+
OpenCode plugin for the [Agentikit](https://github.com/itlackey/agentikit) CLI. Registers tools that let your AI agent **search** and **show** extension assets from a stash directory.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -17,13 +17,12 @@ Add to your OpenCode config (`opencode.json`):
|
|
|
17
17
|
| Tool | Description |
|
|
18
18
|
|------|-------------|
|
|
19
19
|
| `agentikit_search` | Search the stash for tools, skills, commands, agents, and knowledge |
|
|
20
|
-
| `
|
|
21
|
-
| `agentikit_run` | Run a tool by its ref |
|
|
20
|
+
| `agentikit_show` | Show a stash asset by its ref |
|
|
22
21
|
| `agentikit_index` | Build or rebuild the search index |
|
|
23
22
|
|
|
24
23
|
## Prerequisites
|
|
25
24
|
|
|
26
|
-
The `
|
|
25
|
+
The `akm` CLI must be installed and available on PATH. Install it from the [agentikit repo](https://github.com/itlackey/agentikit).
|
|
27
26
|
|
|
28
27
|
```sh
|
|
29
28
|
# macOS / Linux
|
package/index.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { execFileSync } from "node:child_process"
|
|
|
3
3
|
|
|
4
4
|
function runCli(args: string[]): string {
|
|
5
5
|
try {
|
|
6
|
-
return execFileSync("
|
|
6
|
+
return execFileSync("akm", args, {
|
|
7
7
|
encoding: "utf8",
|
|
8
8
|
timeout: 60_000,
|
|
9
9
|
})
|
|
@@ -32,10 +32,10 @@ export const AgentikitPlugin: Plugin = async ({ directory }) => ({
|
|
|
32
32
|
return runCli(args)
|
|
33
33
|
},
|
|
34
34
|
}),
|
|
35
|
-
|
|
36
|
-
description: "
|
|
35
|
+
agentikit_show: tool({
|
|
36
|
+
description: "Show a stash asset by ref. For knowledge assets, use view_mode to retrieve specific content (toc, section, lines, frontmatter).",
|
|
37
37
|
args: {
|
|
38
|
-
ref: tool.schema.string().describe("
|
|
38
|
+
ref: tool.schema.string().describe("Asset reference returned by agentikit_search."),
|
|
39
39
|
view_mode: tool.schema
|
|
40
40
|
.enum(["full", "toc", "frontmatter", "section", "lines"])
|
|
41
41
|
.optional()
|
|
@@ -48,7 +48,7 @@ export const AgentikitPlugin: Plugin = async ({ directory }) => ({
|
|
|
48
48
|
.describe("End line number, 1-based inclusive (for view_mode 'lines')."),
|
|
49
49
|
},
|
|
50
50
|
async execute({ ref, view_mode, heading, start_line, end_line }) {
|
|
51
|
-
const args = ["
|
|
51
|
+
const args = ["show", ref]
|
|
52
52
|
if (view_mode) args.push("--view", view_mode)
|
|
53
53
|
if (heading) args.push("--heading", heading)
|
|
54
54
|
if (start_line != null) args.push("--start", String(start_line))
|
|
@@ -56,15 +56,6 @@ export const AgentikitPlugin: Plugin = async ({ directory }) => ({
|
|
|
56
56
|
return runCli(args)
|
|
57
57
|
},
|
|
58
58
|
}),
|
|
59
|
-
agentikit_run: tool({
|
|
60
|
-
description: "Run a tool from the Agentikit stash by its openRef. Only tool refs are supported.",
|
|
61
|
-
args: {
|
|
62
|
-
ref: tool.schema.string().describe("Open reference of a tool returned by agentikit_search."),
|
|
63
|
-
},
|
|
64
|
-
async execute({ ref }) {
|
|
65
|
-
return runCli(["run", ref])
|
|
66
|
-
},
|
|
67
|
-
}),
|
|
68
59
|
agentikit_index: tool({
|
|
69
60
|
description: "Build or rebuild the Agentikit search index. Scans stash directories, generates missing .stash.json metadata, and builds a semantic search index.",
|
|
70
61
|
args: {},
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentikit-opencode",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "OpenCode plugin for Agentikit - search
|
|
5
|
+
"description": "OpenCode plugin for Agentikit - search and show extension assets via the akm CLI.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"opencode",
|
|
8
8
|
"opencode-ai",
|