@aliou/pi-dev-kit 0.7.0 → 0.7.1

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/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.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "private": false,
@@ -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,7 +42,6 @@ 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
47
  - Put imported Pi core packages in \`peerDependencies\` with \`"*"\` and mark each one \`optional: true\` in \`peerDependenciesMeta\`.
@@ -81,7 +75,7 @@ For tools, verify:
81
75
  - Every \`promptGuidelines\` bullet names the exact tool, because Pi injects bullets flat into the global Guidelines section. Do not write "this tool".
82
76
  - Execute signature is \`(toolCallId, params, signal, onUpdate, ctx)\`; signal comes before \`onUpdate\`.
83
77
  - 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.
78
+ - Use \`StringEnum\` from \`@earendil-works/pi-ai\` for string enums; avoid \`Type.Union([Type.Literal(...)])\` for model-facing enums.
85
79
  - Use \`prepareArguments(args)\` only for backward-compatible schema shims before validation.
86
80
  - Use \`executionMode: "sequential"\` for tools whose sibling calls mutate shared in-memory state or otherwise must not run concurrently.
87
81
  - File-mutating tools normalize leading \`@\` in paths and wrap the full read-modify-write window in \`withFileMutationQueue()\`.
@@ -116,7 +110,7 @@ For project structure and package docs, verify:
116
110
  ## 5. Create Update Plan
117
111
 
118
112
  Present a detailed plan with:
119
- - Package namespace/version changes and whether \`@earendil-works/*\` is available for the target.
113
+ - Package namespace/version changes.
120
114
  - Files to change and why.
121
115
  - API migrations required by changelogs/docs.
122
116
  - Best-practice cleanups found in source, README, skills, prompts, and examples.