opencode-agent-kit 1.0.12 → 1.0.13

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.
@@ -246,8 +246,13 @@ export async function init(options) {
246
246
  }
247
247
  }
248
248
 
249
- // 9. Done
250
- console.log(`\n ✅ opencode-agent-kit installed!\n`);
249
+ // 9. Write .kit-version for agent update checking
250
+ const pkgJson = JSON.parse(readFileSync(join(PKG_ROOT, 'package.json'), 'utf-8'));
251
+ const versionFile = join(opencodeDir, '.kit-version');
252
+ writeFileSync(versionFile, pkgJson.version + '\n', 'utf-8');
253
+
254
+ // 10. Done
255
+ console.log(`\n ✅ opencode-agent-kit v${pkgJson.version} installed!\n`);
251
256
  console.log(` Location: ${targetDir}`);
252
257
  console.log(` What you got:`);
253
258
  console.log(` • opencode.json — 13 agents config with MCP servers`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-agent-kit",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "description": "Multi-stack OpenCode agent toolkit — 13 specialized AI agents (Nuxt, React, Node.js, Laravel, CI3, Android, Flutter, DevOps, SEO) with 62 skills, 36 commands, and 6 MCP servers",
5
5
  "type": "module",
6
6
  "bin": {
@@ -884,6 +884,25 @@ When `multiple: true`, the user can select several options at once. The result r
884
884
 
885
885
  ## Session Workflow
886
886
 
887
+ ### Version Check (Session Start)
888
+
889
+ At the start of every session, check if `opencode-agent-kit` has an update:
890
+
891
+ 1. Read `.opencode/.kit-version` — if found, this is the installed version
892
+ 2. Run `npm view opencode-agent-kit version` to get the latest version on npm
893
+ 3. Compare versions (skip check if `.opencode/.kit-version` does not exist)
894
+ 4. If the latest version is greater than the installed version, notify the user:
895
+ ```
896
+ ╭─ Update Available ─────────────────────────────────────╮
897
+ │ │
898
+ │ A newer version of opencode-agent-kit is available: │
899
+ │ Installed: v{installed} Latest: v{latest} │
900
+ │ │
901
+ │ Run `npx opencode-agent-kit init` to update. │
902
+ │ │
903
+ ╰───────────────────────────────────────────────────────╯
904
+ ```
905
+
887
906
  ### Starting a Session
888
907
 
889
908
  ```markdown
@@ -326,6 +326,12 @@ Use these prompts across services with this stack.
326
326
 
327
327
  ## Session Workflow
328
328
 
329
+ ### Version Check (Session Start)
330
+ Before starting work, check if `opencode-agent-kit` has an update:
331
+ 1. Read `.opencode/.kit-version` if it exists
332
+ 2. Run `npm view opencode-agent-kit version` to get the latest version
333
+ 3. If the latest version > installed version, notify the user to run `npx opencode-agent-kit init`
334
+
329
335
  ### Starting a Session
330
336
  - Analyze project structure and identify existing patterns
331
337
  - Use question tool to ask the task type (first option marked "(Recommended)")
@@ -1471,6 +1471,14 @@ questions: [
1471
1471
 
1472
1472
  ## Session Workflow
1473
1473
 
1474
+ ### Version Check (Session Start)
1475
+
1476
+ Before starting work, check if `opencode-agent-kit` has an update:
1477
+
1478
+ 1. Read `.opencode/.kit-version` if it exists
1479
+ 2. Run `npm view opencode-agent-kit version` to get the latest version
1480
+ 3. If the latest version > installed version, notify the user to run `npx opencode-agent-kit init`
1481
+
1474
1482
  ### Starting a Session
1475
1483
 
1476
1484
  ```markdown
@@ -943,6 +943,14 @@ options: [
943
943
 
944
944
  ## Session Workflow
945
945
 
946
+ ### Version Check (Session Start)
947
+
948
+ Before starting work, check if `opencode-agent-kit` has an update:
949
+
950
+ 1. Read `.opencode/.kit-version` if it exists
951
+ 2. Run `npm view opencode-agent-kit version` to get the latest version
952
+ 3. If the latest version > installed version, notify the user to run `npx opencode-agent-kit init`
953
+
946
954
  ### Starting a Session
947
955
 
948
956
  ```
@@ -378,6 +378,19 @@ flutter analyze # Static analysis
378
378
  3. Integration tests — Full user flows (integration_test package)
379
379
  4. Golden tests — Visual regression (golden_toolkit, alchemist)
380
380
 
381
+ ---
382
+
383
+ ## opencode-agent-kit Version Check
384
+
385
+ If `.opencode/.kit-version` exists, your agent toolkit has a recorded installed version.
386
+
387
+ **At session start**, check for updates:
388
+ 1. Read `.opencode/.kit-version` to get the installed version
389
+ 2. Run `npm view opencode-agent-kit version` to get the latest
390
+ 3. If latest > installed, notify the user with the update command
391
+
392
+ This applies to IT-Leader (primary) and frontend/backend subagents when called directly.
393
+
381
394
  ## Success Metrics
382
395
 
383
396
  You are successful when: