agentikit-opencode 0.0.7 → 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.
Files changed (3) hide show
  1. package/README.md +57 -0
  2. package/index.ts +5 -14
  3. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,57 @@
1
+ # agentikit-opencode
2
+
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
+
5
+ ## Installation
6
+
7
+ Add to your OpenCode config (`opencode.json`):
8
+
9
+ ```json
10
+ {
11
+ "plugin": ["agentikit-opencode"]
12
+ }
13
+ ```
14
+
15
+ ## Tools
16
+
17
+ | Tool | Description |
18
+ |------|-------------|
19
+ | `agentikit_search` | Search the stash for tools, skills, commands, agents, and knowledge |
20
+ | `agentikit_show` | Show a stash asset by its ref |
21
+ | `agentikit_index` | Build or rebuild the search index |
22
+
23
+ ## Prerequisites
24
+
25
+ The `akm` CLI must be installed and available on PATH. Install it from the [agentikit repo](https://github.com/itlackey/agentikit).
26
+
27
+ ```sh
28
+ # macOS / Linux
29
+ curl -fsSL https://raw.githubusercontent.com/itlackey/agentikit/main/install.sh | bash
30
+ # PowerShell (Windows)
31
+ irm https://raw.githubusercontent.com/itlackey/agentikit/main/install.ps1 -OutFile install.ps1; ./install.ps1
32
+ ```
33
+
34
+ ## Stash model
35
+
36
+ Set a stash path via `AGENTIKIT_STASH_DIR`:
37
+
38
+ ```sh
39
+ export AGENTIKIT_STASH_DIR=/abs/path/to/your-stash
40
+ ```
41
+
42
+ Expected layout:
43
+
44
+ ```
45
+ $AGENTIKIT_STASH_DIR/
46
+ ├── tools/ # executable scripts (.sh, .ts, .js, .ps1, .cmd, .bat)
47
+ ├── skills/ # skill directories containing SKILL.md
48
+ ├── commands/ # markdown files
49
+ ├── agents/ # markdown files
50
+ └── knowledge/ # markdown files
51
+ ```
52
+
53
+ ## Docs
54
+
55
+ - [Agentikit CLI](https://github.com/itlackey/agentikit)
56
+ - [OpenCode Plugins](https://opencode.ai/docs/plugins/)
57
+ - [OpenCode Custom Tools](https://opencode.ai/docs/custom-tools/)
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("agentikit", args, {
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
- agentikit_open: tool({
36
- description: "Open a stash asset by ref. For knowledge assets, use view_mode to retrieve specific content (toc, section, lines, frontmatter).",
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("Open reference returned by agentikit_search."),
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 = ["open", ref]
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.7",
3
+ "version": "0.0.9",
4
4
  "type": "module",
5
- "description": "OpenCode plugin for Agentikit - search, open, and run extension assets via the agentikit CLI.",
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",