opencode-agent-kit 1.0.18 → 1.1.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/bin/init.mjs CHANGED
@@ -1,21 +1,44 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { Command } from "commander";
4
- import { init } from "./commands/init.mjs";
3
+ import { Command } from 'commander';
4
+ import { init } from './commands/init.mjs';
5
+ import { upgrade } from './commands/upgrade.mjs';
6
+ import { doctor } from './commands/doctor.mjs';
7
+ import { uninstall } from './commands/uninstall.mjs';
5
8
 
6
9
  const program = new Command();
7
10
 
8
11
  program
9
- .name("opencode-agent-kit")
10
- .description("Install OpenCode multi-agent toolkit into your project")
11
- .version("1.0.0");
12
+ .name('opencode-agent-kit')
13
+ .description('Multi-stack OpenCode agent toolkit 13 specialized AI agents, 60+ skills, 35+ commands')
14
+ .version('1.0.0');
12
15
 
13
16
  program
14
- .command("init")
15
- .description("Initialize .opencode/ configuration in current project")
16
- .option("-f, --force", "Overwrite existing files without prompt")
17
- .option("-d, --dir <path>", "Target project directory", process.cwd())
18
- .option("--skip-install", "Skip npm/bun install step in .opencode/")
17
+ .command('init')
18
+ .description('Initialize .opencode/ configuration in current project')
19
+ .option('-f, --force', 'Overwrite existing files without prompt')
20
+ .option('-d, --dir <path>', 'Target project directory', process.cwd())
21
+ .option('--skip-install', 'Skip npm/bun install step in .opencode/')
19
22
  .action(init);
20
23
 
24
+ program
25
+ .command('upgrade')
26
+ .description('Check for and apply the latest version of opencode-agent-kit')
27
+ .option('-v, --verbose', 'Show detailed upgrade output')
28
+ .action(upgrade);
29
+
30
+ program
31
+ .command('doctor')
32
+ .description('Diagnose common setup issues in the target project')
33
+ .option('-d, --dir <path>', 'Target project directory', process.cwd())
34
+ .option('--fix', 'Show actionable fix suggestions')
35
+ .action(doctor);
36
+
37
+ program
38
+ .command('uninstall')
39
+ .description('Remove opencode-agent-kit configuration from the target project')
40
+ .option('-d, --dir <path>', 'Target project directory', process.cwd())
41
+ .option('-f, --force', 'Skip confirmation prompt')
42
+ .action(uninstall);
43
+
21
44
  program.parse();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "opencode-agent-kit",
3
- "version": "1.0.18",
4
- "description": "Multi-stack OpenCode agent toolkit 13 specialized AI agents (Nuxt, React, Node.js, Laravel, CI3, Android, Flutter, DevOps, SEO, SonarQube) with 62 skills, 37 commands, and 7 MCP servers",
3
+ "version": "1.1.0",
4
+ "description": "Multi-stack OpenCode agent toolkit \u2014 13 specialized AI agents (Nuxt, React, Node.js, Laravel, CI3, Android, Flutter, DevOps, SEO, SonarQube) with 62 skills, 37 commands, and 7 MCP servers",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "opencode-agent-kit": "./bin/init.mjs"
@@ -25,6 +25,13 @@
25
25
  "engines": {
26
26
  "node": ">=18"
27
27
  },
28
+ "scripts": {
29
+ "lint": "eslint bin/ --ext .mjs,.js",
30
+ "format": "prettier --write 'bin/**/*.mjs' '*.md' '*.json'",
31
+ "format:check": "prettier --check 'bin/**/*.mjs' '*.md' '*.json'",
32
+ "generate-template": "bash scripts/generate-template.sh",
33
+ "prepare": "node -e \"try { require('husky').install() } catch {}\""
34
+ },
28
35
  "keywords": [
29
36
  "opencode",
30
37
  "ai-agent",
@@ -43,6 +50,7 @@
43
50
  "devops",
44
51
  "seo",
45
52
  "sonarqube",
53
+ "agentmemory",
46
54
  "coding-agent",
47
55
  "mcp",
48
56
  "playwright",
@@ -55,5 +63,11 @@
55
63
  "dependencies": {
56
64
  "commander": "^13.0.0",
57
65
  "fs-extra": "^11.0.0"
66
+ },
67
+ "devDependencies": {
68
+ "@eslint/js": "^10.0.1",
69
+ "eslint": "^9.0.0",
70
+ "eslint-config-prettier": "^9.1.0",
71
+ "prettier": "^3.4.0"
58
72
  }
59
73
  }
@@ -0,0 +1,19 @@
1
+ Search past session observations and lessons for relevant context. Wraps the `memory_smart_search` and `memory_lesson_recall` MCP tools.
2
+
3
+ ## Usage
4
+
5
+ ```
6
+ /recall [query]
7
+ ```
8
+
9
+ ## Instructions
10
+
11
+ 1. Call `memory_smart_search` with the query and `limit: 10` (hybrid BM25 + vector + graph search).
12
+ 2. Call `memory_lesson_recall` with the same query and `limit: 5` (lesson search).
13
+ 3. Combine results and present to the user:
14
+ - Group by session
15
+ - Show type, title, and narrative for each observation
16
+ - Highlight high-importance observations
17
+ - Show lessons separately with confidence scores
18
+ 4. If no results, suggest 2-3 alternative search terms.
19
+ 5. **Never hallucinate results.** Only present what the MCP tools actually return.
@@ -0,0 +1,19 @@
1
+ Explicitly save an insight, decision, or learning to agentmemory for future sessions. Wraps the `memory_save` MCP tool.
2
+
3
+ ## Usage
4
+
5
+ ```
6
+ /remember [what to remember]
7
+ ```
8
+
9
+ ## Instructions
10
+
11
+ 1. Analyze what needs to be remembered — extract the core insight, decision, or fact.
12
+ 2. Extract 2-5 searchable concepts (lowercased keyword phrases). Prefer specific terms ("jwt-refresh-rotation" over "auth").
13
+ 3. Extract relevant file paths the memory references.
14
+ 4. Call `memory_save` with:
15
+ - `content` — full text to remember (preserve user's phrasing)
16
+ - `concepts` — extracted concept list
17
+ - `files` — extracted file list (empty array if none)
18
+ - `type` — choose from: pattern, preference, architecture, bug, workflow, fact
19
+ 5. Confirm the save and show the concepts tagged so the user knows retrieval terms.
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env bash
2
+ set -e
3
+
4
+ AGENTMEMORY_URL="${AGENTMEMORY_URL:-http://localhost:3111}"
5
+ HEALTH_URL="$AGENTMEMORY_URL/agentmemory/livez"
6
+
7
+ if ! curl -sf "$HEALTH_URL" > /dev/null 2>&1; then
8
+ npx @agentmemory/agentmemory > /dev/null 2>&1 &
9
+ for i in $(seq 1 15); do
10
+ if curl -sf "$HEALTH_URL" > /dev/null 2>&1; then
11
+ break
12
+ fi
13
+ sleep 1
14
+ done
15
+ fi
16
+
17
+ exec npx -y @agentmemory/mcp "$@"
@@ -380,6 +380,55 @@ flutter analyze # Static analysis
380
380
 
381
381
  ---
382
382
 
383
+ ## Agentmemory: Persistent Cross-Session Memory
384
+
385
+ agentmemory provides persistent memory for all agents. It captures session history, saves decisions/insights, and injects relevant context from past sessions into the current session.
386
+
387
+ ### Prerequisites
388
+
389
+ ```bash
390
+ npm install -g @agentmemory/agentmemory # Install globally
391
+ agentmemory # Start server on :3111
392
+ ```
393
+
394
+ ### MCP Tools (53 tools)
395
+
396
+ All agents have access to agentmemory MCP tools prefixed with `agentmemory_memory_`:
397
+
398
+ | Tool | Purpose |
399
+ |------|---------|
400
+ | `memory_save` | Save insights, decisions, facts to long-term memory |
401
+ | `memory_recall` | Search past observations by keywords |
402
+ | `memory_smart_search` | Hybrid semantic+keyword search for conceptual queries |
403
+ | `memory_sessions` | List recent sessions with status and observation counts |
404
+ | `memory_file_history` | Get past observations about specific files |
405
+ | `memory_lesson_save` | Save a lesson learned with confidence scoring |
406
+ | `memory_lesson_recall` | Search lessons by query, sorted by confidence |
407
+ | `memory_governance_delete` | Delete specific memories (requires confirmation) |
408
+ | `memory_patterns` | Detect recurring patterns across sessions |
409
+ | `memory_consolidate` | Run 4-tier memory consolidation pipeline |
410
+
411
+ ### Available Commands
412
+
413
+ - `/recall [query]` — Search past observations and lessons
414
+ - `/remember [text]` — Explicitly save an insight to long-term memory
415
+
416
+ ### Auto-Capture Plugin
417
+
418
+ The `agentmemory-capture.ts` plugin (registered in `opencode.json`) captures 22 lifecycle events automatically:
419
+ - Session lifecycle: created, idle, compacted, updated, deleted, error
420
+ - Messages & prompts: user messages, assistant responses, removed messages
421
+ - Parts & steps: subagent starts, tool calls, reasoning, step-finish, patches, compaction events
422
+ - File enrichment: auto-injects file-specific context into system prompt
423
+ - Permissions: captures permission prompts and replies
424
+ - Tasks & commands: captures todo changes and command execution
425
+
426
+ ### Skills
427
+
428
+ The `agentmemory` skill (`.opencode/skills/agentmemory/SKILL.md`) teaches agents when and how to use the memory tools effectively.
429
+
430
+ ---
431
+
383
432
  ## opencode-agent-kit Version Check
384
433
 
385
434
  If `.opencode/.kit-version` exists, your agent toolkit has a recorded installed version.