@agent-plan/pi-adapter 0.2.21 → 0.2.22

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 CHANGED
@@ -10,10 +10,22 @@ pi install npm:@agent-plan/pi-adapter
10
10
 
11
11
  Then restart Pi in a project directory to enable planning.
12
12
 
13
+ Check the version actually loaded by Pi:
14
+
15
+ ```text
16
+ /planner version
17
+ ```
18
+
19
+ From a shell, inspect the installed package directly:
20
+
21
+ ```bash
22
+ npm --prefix "$HOME/.pi/agent/npm" list @agent-plan/pi-adapter --depth=0
23
+ ```
24
+
13
25
  ## Commands
14
26
 
15
27
  Once installed, use `/planner init` to initialize planning in a project,
16
- then `/planner feature add`, `/planner phase add`, `/planner task add`,
28
+ then `/planner version`, `/planner feature add`, `/planner phase add`, `/planner task add`,
17
29
  and the lifecycle commands `/planner task start`/`/planner task complete`.
18
30
 
19
31
  See the [root README](https://github.com/ovidius72/agent-planner#readme) for the full command reference.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAoB,MAAM,iCAAiC,CAAC;AAgzBtF,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EAAE,EAAE,YAAY,GAAG,IAAI,CAiwH9D"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAoB,MAAM,iCAAiC,CAAC;AAozBtF,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EAAE,EAAE,YAAY,GAAG,IAAI,CA4wH9D"}
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@
9
9
  * - inject context into prompts
10
10
  */
11
11
  import { Type } from "typebox";
12
- import { ExportService, PlanStore, setWriteBusyHook, setWriteNotifyHook, withFeatureLock, needsMotivation, findPhaseByRef, findTaskByRef, buildRecap, addChecklistItem, removeChecklistItem, toggleChecklistItem, buildPhaseContextBlock, checkExplicitTaskStart, recommendNextTask } from "@agent-plan/core";
12
+ import { ExportService, PlanStore, setWriteBusyHook, setWriteNotifyHook, withFeatureLock, needsMotivation, findPhaseByRef, findTaskByRef, buildRecap, addChecklistItem, removeChecklistItem, toggleChecklistItem, buildPhaseContextBlock, checkExplicitTaskStart, recommendNextTask, packageVersionFromModule, resolvedPackageVersion } from "@agent-plan/core";
13
13
  import { createChecklistItemId, createFeatureId, createPhaseId, createTaskId, clampSlug, normalizeSlug, formatPhaseRef, formatFeatureRef, featureNumberOfPhase, validateResolvedTarget } from "@agent-plan/core/naming";
14
14
  import { join, dirname } from "node:path";
15
15
  import { homedir } from "node:os";
@@ -21,6 +21,9 @@ import { serve } from "@agent-plan/server/serve";
21
21
  // ─── State (module-level) ───────────────────────────────────────────────
22
22
  const PI_CONFIG_DIR_NAME = ".pi";
23
23
  const PLAN_DIR_NAME = ".planner";
24
+ const PI_ADAPTER_PACKAGE = packageVersionFromModule(import.meta.url, "@agent-plan/pi-adapter");
25
+ const CORE_PACKAGE = resolvedPackageVersion("@agent-plan/core", import.meta.url);
26
+ const SERVER_PACKAGE = resolvedPackageVersion("@agent-plan/server", import.meta.url);
24
27
  let capturedPi = null;
25
28
  let store = null;
26
29
  let server = null;
@@ -104,6 +107,7 @@ const healedStatusRoots = new Set();
104
107
  const PLANNER_COMMAND_COMPLETIONS = [
105
108
  { value: "init", label: "init", description: "Initialize planner in this project" },
106
109
  { value: "show", label: "show", description: "Show planner overview" },
110
+ { value: "version", label: "version", description: "Show loaded Agent Plan package versions" },
107
111
  { value: "repair", label: "repair", description: "Repair planner integrity" },
108
112
  { value: "cleanup-orphans", label: "cleanup-orphans", description: "List and remove orphan phase files" },
109
113
  { value: "project discuss", label: "project discuss", description: "Run project discovery" },
@@ -1041,6 +1045,7 @@ export default function planPiExtension(pi) {
1041
1045
  const PLANNER_MENU_ACTIONS = [
1042
1046
  "init",
1043
1047
  "show",
1048
+ "version",
1044
1049
  "repair",
1045
1050
  "cleanup-orphans",
1046
1051
  "project discuss",
@@ -1076,7 +1081,7 @@ export default function planPiExtension(pi) {
1076
1081
  "load",
1077
1082
  "stop",
1078
1083
  ];
1079
- const SUB_HELP = "Available: init, show, repair, cleanup-orphans, project, feature, phase, task, discuss, handoff, web, export, export-full, bypass, clear-bypass, load, stop\n" +
1084
+ const SUB_HELP = "Available: init, show, version, repair, cleanup-orphans, project, feature, phase, task, discuss, handoff, web, export, export-full, bypass, clear-bypass, load, stop\n" +
1080
1085
  "Try: /planner <TAB> | /planner feature list | /planner task start | /planner cleanup-orphans\n" +
1081
1086
  "Handoff actions: /planner handoff list | show P00x | write P00x | clear P00x | prepare (prepare proposes a target and asks for confirmation)";
1082
1087
  if (!a) {
@@ -1088,6 +1093,15 @@ export default function planPiExtension(pi) {
1088
1093
  await runPlanner(action, ctx);
1089
1094
  return;
1090
1095
  }
1096
+ if (a === "version") {
1097
+ ctx.ui.notify([
1098
+ "Agent Plan runtime versions",
1099
+ `${PI_ADAPTER_PACKAGE.name}: ${PI_ADAPTER_PACKAGE.version}`,
1100
+ `${CORE_PACKAGE.name}: ${CORE_PACKAGE.version}`,
1101
+ `${SERVER_PACKAGE.name}: ${SERVER_PACKAGE.version}`,
1102
+ ].join("\n"), "info");
1103
+ return;
1104
+ }
1091
1105
  const st = ensureStore(ctx);
1092
1106
  // ── init ──
1093
1107
  if (a === "init") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-plan/pi-adapter",
3
- "version": "0.2.21",
3
+ "version": "0.2.22",
4
4
  "private": false,
5
5
  "description": "Pi agent extension for Agent Plan — structured project planning in .planner/",
6
6
  "keywords": [
@@ -28,8 +28,8 @@
28
28
  "dependencies": {
29
29
  "typebox": "^1.1.24",
30
30
  "zod": "^3.24.0",
31
- "@agent-plan/core": "0.2.21",
32
- "@agent-plan/server": "0.2.21"
31
+ "@agent-plan/core": "0.2.22",
32
+ "@agent-plan/server": "0.2.22"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@earendil-works/pi-coding-agent": "^0.74.0",