@aliou/pi-dev-kit 0.7.0 → 0.7.2

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
@@ -1,4 +1,4 @@
1
- ![banner](https://assets.aliou.me/pi-extensions/banners/pi-dev-kit.png)
1
+ ![banner](https://assets.aliou.me/github/aliou/pi-dev-kit/banner.png)
2
2
 
3
3
  # Pi Dev Kit
4
4
 
@@ -11,7 +11,7 @@ Tools and commands for building, maintaining, and updating Pi extensions.
11
11
  https://github.com/user-attachments/assets/44a96009-0653-4803-8590-d5a8a5131f4c
12
12
 
13
13
  <small>
14
- <a href="https://assets.aliou.me/pi-extensions/2026-02-02-pi-extension-dev-demo.mp4">Non sped-up version</a>
14
+ <a href="https://assets.aliou.me/github/aliou/pi-dev-kit/demo.mp4">Non sped-up version</a>
15
15
  </small>
16
16
 
17
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aliou/pi-dev-kit",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "private": false,
@@ -26,7 +26,7 @@
26
26
  "prompts": [
27
27
  "./src/prompts"
28
28
  ],
29
- "video": "https://assets.aliou.me/pi-extensions/2026-02-02-pi-extension-dev-demo.mp4"
29
+ "video": "https://assets.aliou.me/github/aliou/pi-dev-kit/demo.mp4"
30
30
  },
31
31
  "publishConfig": {
32
32
  "access": "public"
@@ -44,14 +44,15 @@
44
44
  "typebox": "*"
45
45
  },
46
46
  "devDependencies": {
47
- "@biomejs/biome": "^2.3.13",
47
+ "@biomejs/biome": "^2.4.15",
48
48
  "@changesets/cli": "^2.27.11",
49
49
  "@earendil-works/pi-coding-agent": "0.74.0",
50
50
  "@earendil-works/pi-tui": "0.74.0",
51
51
  "typebox": "1.1.24",
52
52
  "@types/node": "^25.0.10",
53
53
  "husky": "^9.1.7",
54
- "typescript": "^5.9.3"
54
+ "typescript": "^5.9.3",
55
+ "@aliou/biome-plugins": "^0.8.1"
55
56
  },
56
57
  "peerDependenciesMeta": {
57
58
  "@earendil-works/pi-coding-agent": {
@@ -1,23 +1,18 @@
1
1
  import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
2
2
  import { VERSION } from "@earendil-works/pi-coding-agent";
3
3
 
4
- const NPM_REGISTRY_URLS = [
5
- "https://registry.npmjs.org/@earendil-works/pi-coding-agent/latest",
6
- "https://registry.npmjs.org/@mariozechner/pi-coding-agent/latest",
7
- ] as const;
4
+ const NPM_REGISTRY_URL =
5
+ "https://registry.npmjs.org/@earendil-works/pi-coding-agent/latest";
8
6
 
9
7
  async function fetchLatestVersion(): Promise<string | null> {
10
- for (const url of NPM_REGISTRY_URLS) {
11
- try {
12
- const res = await fetch(url);
13
- if (!res.ok) continue;
14
- const data = (await res.json()) as { version?: string };
15
- if (data.version) return data.version;
16
- } catch {
17
- // Try the next registry URL.
18
- }
8
+ try {
9
+ const res = await fetch(NPM_REGISTRY_URL);
10
+ if (!res.ok) return null;
11
+ const data = (await res.json()) as { version?: string };
12
+ return data.version ?? null;
13
+ } catch {
14
+ return null;
19
15
  }
20
- return null;
21
16
  }
22
17
 
23
18
  const UPDATE_PROMPT = `# Update Pi Extensions
@@ -47,10 +42,11 @@ Current Pi core packages are:
47
42
  - \`@earendil-works/pi-tui\`
48
43
  - \`typebox\`
49
44
 
50
- Legacy packages under \`@mariozechner/*\` may still be present. Treat them as Pi core packages. Prefer \`@earendil-works/*\` when the target version exists on npm; if the new namespace is not published for the target version yet, keep the legacy namespace and report that decision.
51
45
 
52
46
  For distributed Pi packages:
53
- - Put imported Pi core packages in \`peerDependencies\` with \`"*"\` and mark each one \`optional: true\` in \`peerDependenciesMeta\`.
47
+ - Put imported Pi core packages in \`peerDependencies\` and mark each one \`optional: true\` in \`peerDependenciesMeta\`.
48
+ - Use \`"*"\` for Pi core peer ranges by default, per Pi package docs.
49
+ - Only use a minimum range such as \`">=0.75.0"\` when source code uses an API that the changelog/docs show was introduced after Pi 0.74.0. In that case, set the minimum to the exact version that introduced the required API.
54
50
  - Keep the same Pi core packages in \`devDependencies\` at the exact target version for local type checking.
55
51
  - Keep \`typebox\` 1.x. Do not use \`@sinclair/typebox\` in new code.
56
52
 
@@ -81,7 +77,7 @@ For tools, verify:
81
77
  - Every \`promptGuidelines\` bullet names the exact tool, because Pi injects bullets flat into the global Guidelines section. Do not write "this tool".
82
78
  - Execute signature is \`(toolCallId, params, signal, onUpdate, ctx)\`; signal comes before \`onUpdate\`.
83
79
  - Use \`onUpdate?.(...)\` and forward \`signal\` to \`fetch\`, \`pi.exec\`, SDK clients, and long work.
84
- - Use \`StringEnum\` from \`@earendil-works/pi-ai\`/legacy \`@mariozechner/pi-ai\` for string enums; avoid \`Type.Union([Type.Literal(...)])\` for model-facing enums.
80
+ - Use \`StringEnum\` from \`@earendil-works/pi-ai\` for string enums; avoid \`Type.Union([Type.Literal(...)])\` for model-facing enums.
85
81
  - Use \`prepareArguments(args)\` only for backward-compatible schema shims before validation.
86
82
  - Use \`executionMode: "sequential"\` for tools whose sibling calls mutate shared in-memory state or otherwise must not run concurrently.
87
83
  - File-mutating tools normalize leading \`@\` in paths and wrap the full read-modify-write window in \`withFileMutationQueue()\`.
@@ -116,7 +112,7 @@ For project structure and package docs, verify:
116
112
  ## 5. Create Update Plan
117
113
 
118
114
  Present a detailed plan with:
119
- - Package namespace/version changes and whether \`@earendil-works/*\` is available for the target.
115
+ - Package namespace/version changes.
120
116
  - Files to change and why.
121
117
  - API migrations required by changelogs/docs.
122
118
  - Best-practice cleanups found in source, README, skills, prompts, and examples.
@@ -117,7 +117,7 @@ If using the legacy namespace, replace `@earendil-works/*` with the matching `@m
117
117
  22. Provider dynamic model discovery belongs in an async extension factory, not `session_start`.
118
118
  23. Use SDK helpers for Pi paths instead of `homedir()` when helpers exist.
119
119
  24. No `.js` extensions in TypeScript imports.
120
- 25. Pi core packages you import belong in optional `peerDependencies` with `"*"`, and exact target versions in `devDependencies`.
120
+ 25. Pi core packages you import belong in optional `peerDependencies`; use `"*"` by default, or `">=x.y.z"` only when code needs an API introduced after Pi 0.74.0. Keep exact target versions in `devDependencies`.
121
121
 
122
122
  ## Completion Checklist
123
123
 
@@ -32,7 +32,7 @@ A publishable package needs Pi metadata and discoverability fields.
32
32
 
33
33
  Use the legacy `@mariozechner/*` namespace only while the target Pi packages are not published under `@earendil-works/*`.
34
34
 
35
- Pi core packages imported at runtime belong in optional `peerDependencies` with `"*"`. Keep exact target versions in `devDependencies` for local type checking. Third-party runtime packages belong in `dependencies`.
35
+ Pi core packages imported at runtime belong in optional `peerDependencies`. Use `"*"` by default. Only use a minimum range such as `">=0.75.0"` when code requires an API introduced after Pi 0.74.0, and set the minimum to the introducing version. Keep exact target versions in `devDependencies` for local type checking. Third-party runtime packages belong in `dependencies`.
36
36
 
37
37
  ## Installation Specs
38
38
 
@@ -140,7 +140,7 @@ Run the repo's public-dependency check when available, for example `pnpm run che
140
140
  - [ ] `files` lists only shipped files users need.
141
141
  - [ ] `pi.extensions`, `pi.skills`, `pi.prompts`, and `pi.themes` paths are correct.
142
142
  - [ ] Demo `pi.video` or `pi.image` metadata is present when available.
143
- - [ ] Imported Pi core packages are optional peers with `"*"`.
143
+ - [ ] Imported Pi core packages are optional peers with `"*"`, unless a post-0.74.0 API requires a documented minimum range.
144
144
  - [ ] Imported Pi core packages are exact dev dependencies for type checking.
145
145
  - [ ] Third-party runtime packages are in `dependencies`.
146
146
  - [ ] No private workspace dependencies in public packages.
@@ -146,7 +146,8 @@ Pi provides these runtime packages to extensions:
146
146
 
147
147
  For any of these that you import:
148
148
 
149
- - Put them in `peerDependencies` with `"*"`.
149
+ - Put them in `peerDependencies` with `"*"` by default.
150
+ - Use a minimum range such as `">=0.75.0"` only when code requires an API introduced after Pi 0.74.0, using the introducing version as the minimum.
150
151
  - Mark them `optional: true` in `peerDependenciesMeta`.
151
152
  - Put exact target versions in `devDependencies` for type checking.
152
153
  - Do not bundle them.
@@ -428,7 +429,7 @@ Do not publish packages that depend on private workspace packages.
428
429
 
429
430
  - [ ] One entry point per feature directory.
430
431
  - [ ] No root fan-out registrar in new code.
431
- - [ ] Pi core imports are optional peers with `"*"` and exact dev deps.
432
+ - [ ] Pi core imports are optional peers with `"*"` unless a post-0.74.0 API requires a documented minimum range, and exact dev deps.
432
433
  - [ ] Third-party runtime packages are in `dependencies`.
433
434
  - [ ] Config uses raw/resolved TypeScript interfaces.
434
435
  - [ ] Settings use `registerSettingsCommand` when configurable.