pi-wafer-provider 1.1.41 → 1.1.43
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/.github/workflows/publish.yml +114 -0
- package/.github/workflows/update-models.yml +55 -0
- package/CHANGELOG.md +4 -0
- package/README.md +0 -1
- package/deprecated-models.json +26 -1
- package/models.json +0 -23
- package/package.json +7 -3
- package/scripts/test-pi-compat.mjs +2 -2
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
name: Publish
|
|
2
|
+
|
|
3
|
+
# Releases of pi-wafer-provider go out from here, and only from here.
|
|
4
|
+
#
|
|
5
|
+
# 1. Bump "version" in package.json (the `chore(release): X.Y.Z` commit).
|
|
6
|
+
# 2. Push it to main. This workflow publishes every version that npm does
|
|
7
|
+
# not have yet; any other push is a no-op.
|
|
8
|
+
#
|
|
9
|
+
# Run it from the Actions tab to retry a failed release, or tick "dry_run" to
|
|
10
|
+
# build, check and pack without publishing.
|
|
11
|
+
#
|
|
12
|
+
# Auth is npm Trusted Publishing (OIDC): npm trusts this file, so no npm token
|
|
13
|
+
# is stored anywhere. Registered once with
|
|
14
|
+
# npm trust github pi-wafer-provider --repo monotykamary/pi-wafer-provider --file publish.yml --allow-publish
|
|
15
|
+
#
|
|
16
|
+
# Bun installs and packs exactly as `bun publish` does; npm uploads the
|
|
17
|
+
# tarballs because only the npm CLI speaks trusted publishing.
|
|
18
|
+
|
|
19
|
+
on:
|
|
20
|
+
push:
|
|
21
|
+
branches: [main]
|
|
22
|
+
paths: [package.json]
|
|
23
|
+
workflow_dispatch:
|
|
24
|
+
inputs:
|
|
25
|
+
dry_run:
|
|
26
|
+
description: Build, check and pack, but do not publish
|
|
27
|
+
type: boolean
|
|
28
|
+
default: false
|
|
29
|
+
|
|
30
|
+
permissions:
|
|
31
|
+
contents: read
|
|
32
|
+
id-token: write
|
|
33
|
+
|
|
34
|
+
concurrency:
|
|
35
|
+
group: publish
|
|
36
|
+
cancel-in-progress: false
|
|
37
|
+
|
|
38
|
+
jobs:
|
|
39
|
+
publish:
|
|
40
|
+
runs-on: ubuntu-latest
|
|
41
|
+
timeout-minutes: 45
|
|
42
|
+
steps:
|
|
43
|
+
- uses: actions/checkout@v5
|
|
44
|
+
|
|
45
|
+
- uses: actions/setup-node@v5
|
|
46
|
+
with:
|
|
47
|
+
node-version: 24
|
|
48
|
+
|
|
49
|
+
- uses: oven-sh/setup-bun@v2
|
|
50
|
+
|
|
51
|
+
- name: Find versions npm does not have
|
|
52
|
+
id: release
|
|
53
|
+
env:
|
|
54
|
+
DRY_RUN: ${{ inputs.dry_run }}
|
|
55
|
+
run: |
|
|
56
|
+
specs=$(
|
|
57
|
+
node -p "const p = require('./package.json'); p.name + '@' + p.version"
|
|
58
|
+
)
|
|
59
|
+
missing=""
|
|
60
|
+
for spec in $specs; do
|
|
61
|
+
# npm runs from outside the checkout so the repo's devEngines do not apply.
|
|
62
|
+
if (cd "$RUNNER_TEMP" && npm view "$spec" version >/dev/null 2>&1); then
|
|
63
|
+
echo "$spec is already on npm"
|
|
64
|
+
else
|
|
65
|
+
missing="$missing $spec"
|
|
66
|
+
fi
|
|
67
|
+
done
|
|
68
|
+
if [ "$DRY_RUN" = "true" ]; then
|
|
69
|
+
mode=dry-run
|
|
70
|
+
elif [ -n "$missing" ]; then
|
|
71
|
+
mode=publish
|
|
72
|
+
echo "::notice::Publishing$missing"
|
|
73
|
+
else
|
|
74
|
+
mode=skip
|
|
75
|
+
echo "::notice::Nothing to publish"
|
|
76
|
+
fi
|
|
77
|
+
echo "mode=$mode" >> "$GITHUB_OUTPUT"
|
|
78
|
+
|
|
79
|
+
- name: Install dependencies
|
|
80
|
+
if: steps.release.outputs.mode != 'skip'
|
|
81
|
+
run: bun install --frozen-lockfile
|
|
82
|
+
|
|
83
|
+
- name: Check
|
|
84
|
+
if: steps.release.outputs.mode != 'skip'
|
|
85
|
+
run: bun run check
|
|
86
|
+
|
|
87
|
+
- name: Pack
|
|
88
|
+
if: steps.release.outputs.mode != 'skip'
|
|
89
|
+
run: |
|
|
90
|
+
bun run --if-present prepublishOnly
|
|
91
|
+
bun pm pack --destination "$RUNNER_TEMP/pack"
|
|
92
|
+
|
|
93
|
+
- name: Publish
|
|
94
|
+
if: steps.release.outputs.mode != 'skip'
|
|
95
|
+
env:
|
|
96
|
+
MODE: ${{ steps.release.outputs.mode }}
|
|
97
|
+
run: |
|
|
98
|
+
# Trusted publishing needs npm 11.5.1 or newer.
|
|
99
|
+
npm install --global npm@latest
|
|
100
|
+
cd "$RUNNER_TEMP"
|
|
101
|
+
# ./ keeps npm from reading pack/name.tgz as a GitHub repo shorthand.
|
|
102
|
+
for tarball in ./pack/*.tgz; do
|
|
103
|
+
spec=$(tar -xOzf "$tarball" package/package.json | node -p "const p = JSON.parse(require('fs').readFileSync(0, 'utf8')); p.name + '@' + p.version")
|
|
104
|
+
echo "::group::$spec"
|
|
105
|
+
tar -tzf "$tarball"
|
|
106
|
+
echo "::endgroup::"
|
|
107
|
+
if [ "$MODE" = "dry-run" ]; then
|
|
108
|
+
echo "Dry run: not publishing $spec"
|
|
109
|
+
elif npm view "$spec" version >/dev/null 2>&1; then
|
|
110
|
+
echo "$spec is already on npm"
|
|
111
|
+
else
|
|
112
|
+
npm publish "$tarball" --access public --provenance
|
|
113
|
+
fi
|
|
114
|
+
done
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
name: Update models
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
- cron: "7 0 * * *" # 07:07 Asia/Ho_Chi_Minh
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
# This workflow only syncs the catalog and bumps the version; publish.yml does
|
|
9
|
+
# the releasing. It publishes any version npm does not have yet, so a release
|
|
10
|
+
# that failed earlier goes out with the next hand-off.
|
|
11
|
+
permissions:
|
|
12
|
+
contents: write
|
|
13
|
+
actions: write
|
|
14
|
+
|
|
15
|
+
concurrency:
|
|
16
|
+
group: update-models
|
|
17
|
+
cancel-in-progress: false
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
update:
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
timeout-minutes: 15
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v5
|
|
25
|
+
|
|
26
|
+
- uses: actions/setup-node@v5
|
|
27
|
+
with:
|
|
28
|
+
node-version: 24
|
|
29
|
+
|
|
30
|
+
- name: Fetch the model catalog
|
|
31
|
+
env:
|
|
32
|
+
WAFER_SERVERLESS_API_KEY: ${{ secrets.WAFER_SERVERLESS_API_KEY }}
|
|
33
|
+
run: node scripts/update-models.js
|
|
34
|
+
|
|
35
|
+
- name: Commit, bump and push
|
|
36
|
+
run: |
|
|
37
|
+
if git diff --quiet; then
|
|
38
|
+
echo "No model changes."
|
|
39
|
+
exit 0
|
|
40
|
+
fi
|
|
41
|
+
git config user.name "github-actions[bot]"
|
|
42
|
+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
43
|
+
git add -A
|
|
44
|
+
git commit -m "feat: update wafer models from API"
|
|
45
|
+
npm version patch --no-git-tag-version
|
|
46
|
+
version=$(node -p "require('./package.json').version")
|
|
47
|
+
git commit -am "chore(release): v$version"
|
|
48
|
+
git push origin HEAD:main
|
|
49
|
+
|
|
50
|
+
# Pushes made with GITHUB_TOKEN do not start other workflows, so hand the
|
|
51
|
+
# release to publish.yml explicitly.
|
|
52
|
+
- name: Hand off to publish.yml
|
|
53
|
+
env:
|
|
54
|
+
GH_TOKEN: ${{ github.token }}
|
|
55
|
+
run: gh workflow run publish.yml --ref main
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.1.42
|
|
4
|
+
|
|
5
|
+
- Pin Pi SDK development dependencies to 1.2.0 while retaining wildcard host peers; verify real manifest loading, lifecycle and native/bundled Pi hosts offline.
|
|
6
|
+
|
|
3
7
|
## 1.1.41
|
|
4
8
|
|
|
5
9
|
- Quiet startup sync: background `/v1/models` revalidation runs only with an API key, only when the disk cache is older than 1 hour (`PI_PROVIDER_SYNC_TTL_MS`, `0` = always), missing, or fetched with a different key, and only in one pi process at a time (lock file next to the cache). Failed refreshes back off for 5 minutes; sessions that skip adopt a cache refreshed by another process.
|
package/README.md
CHANGED
|
@@ -85,7 +85,6 @@ pi
|
|
|
85
85
|
| GLM-5.3 | Text | 1M | 1M | $1.40 | $4.40 | $0.26 |
|
|
86
86
|
| GLM-5.3-Flash | Text + Image | 1M | 1M | $0.15 | $0.50 | $0.03 |
|
|
87
87
|
| Kimi-K3 | Text + Image | 1M | 16K | $3.00 | $15.00 | $0.30 |
|
|
88
|
-
| Nemotron-3.5-Lightning | Text | 262K | 262K | $0.05 | $0.20 | $0.03 |
|
|
89
88
|
| Qwen3.8-27B | Text + Image | 262K | 262K | $0.42 | $2.55 | $0.09 |
|
|
90
89
|
|
|
91
90
|
*Costs are per million tokens. Prices based on official provider pricing.*
|
package/deprecated-models.json
CHANGED
|
@@ -1 +1,26 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"Nemotron-3.5-Lightning": {
|
|
3
|
+
"id": "Nemotron-3.5-Lightning",
|
|
4
|
+
"name": "Nemotron-3.5-Lightning",
|
|
5
|
+
"reasoning": true,
|
|
6
|
+
"input": [
|
|
7
|
+
"text"
|
|
8
|
+
],
|
|
9
|
+
"cost": {
|
|
10
|
+
"input": 0.05,
|
|
11
|
+
"output": 0.2,
|
|
12
|
+
"cacheRead": 0.03,
|
|
13
|
+
"cacheWrite": 0
|
|
14
|
+
},
|
|
15
|
+
"contextWindow": 262144,
|
|
16
|
+
"maxTokens": 262144,
|
|
17
|
+
"compat": {
|
|
18
|
+
"maxTokensField": "max_completion_tokens",
|
|
19
|
+
"supportsDeveloperRole": false,
|
|
20
|
+
"supportsStore": false,
|
|
21
|
+
"supportsZdr": true,
|
|
22
|
+
"supportsReasoningEffort": true
|
|
23
|
+
},
|
|
24
|
+
"deprecatedAt": "2026-10-16T04:18:49.906Z"
|
|
25
|
+
}
|
|
26
|
+
}
|
package/models.json
CHANGED
|
@@ -186,29 +186,6 @@
|
|
|
186
186
|
"supportsReasoningEffort": true
|
|
187
187
|
}
|
|
188
188
|
},
|
|
189
|
-
{
|
|
190
|
-
"id": "Nemotron-3.5-Lightning",
|
|
191
|
-
"name": "Nemotron-3.5-Lightning",
|
|
192
|
-
"reasoning": true,
|
|
193
|
-
"input": [
|
|
194
|
-
"text"
|
|
195
|
-
],
|
|
196
|
-
"cost": {
|
|
197
|
-
"input": 0.05,
|
|
198
|
-
"output": 0.2,
|
|
199
|
-
"cacheRead": 0.03,
|
|
200
|
-
"cacheWrite": 0
|
|
201
|
-
},
|
|
202
|
-
"contextWindow": 262144,
|
|
203
|
-
"maxTokens": 262144,
|
|
204
|
-
"compat": {
|
|
205
|
-
"maxTokensField": "max_completion_tokens",
|
|
206
|
-
"supportsDeveloperRole": false,
|
|
207
|
-
"supportsStore": false,
|
|
208
|
-
"supportsZdr": true,
|
|
209
|
-
"supportsReasoningEffort": true
|
|
210
|
-
}
|
|
211
|
-
},
|
|
212
189
|
{
|
|
213
190
|
"id": "Qwen3.8-27B",
|
|
214
191
|
"name": "Qwen3.8-27B",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-wafer-provider",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.43",
|
|
4
4
|
"description": "Wafer Serverless provider extension for pi - Access Qwen3.5-397B-A17B, GLM-5.1, Kimi K2.6, and DeepSeek-V4 through the Wafer Serverless API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.ts",
|
|
@@ -35,12 +35,16 @@
|
|
|
35
35
|
"brace-expansion": "5.0.12"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@earendil-works/pi-coding-agent": "1.
|
|
39
|
-
"typescript": "6.0.3",
|
|
38
|
+
"@earendil-works/pi-coding-agent": "1.2.0",
|
|
40
39
|
"@types/node": "^25.9.1",
|
|
40
|
+
"typescript": "6.0.3",
|
|
41
41
|
"vitest": "4.1.7"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"@earendil-works/pi-coding-agent": "*"
|
|
45
|
+
},
|
|
46
|
+
"repository": {
|
|
47
|
+
"type": "git",
|
|
48
|
+
"url": "git+https://github.com/monotykamary/pi-wafer-provider.git"
|
|
45
49
|
}
|
|
46
50
|
}
|
|
@@ -14,7 +14,7 @@ globalThis.fetch = async () => new Response('', { status: 503 });
|
|
|
14
14
|
let session;
|
|
15
15
|
try {
|
|
16
16
|
const { createAgentSession, DefaultResourceLoader, ModelRuntime, SessionManager, SettingsManager, VERSION } = await import('@earendil-works/pi-coding-agent');
|
|
17
|
-
assert.equal(VERSION, '1.
|
|
17
|
+
assert.equal(VERSION, '1.2.0', 'run compatibility checks against the pinned host');
|
|
18
18
|
const manifest = JSON.parse(await readFile(join(root, 'package.json'), 'utf8'));
|
|
19
19
|
const hostPackages = ['@earendil-works/pi-ai', '@earendil-works/pi-agent-core', '@earendil-works/pi-coding-agent', '@earendil-works/pi-tui', 'typebox'];
|
|
20
20
|
for (const name of hostPackages) {
|
|
@@ -65,7 +65,7 @@ try {
|
|
|
65
65
|
modelCount += models.length;
|
|
66
66
|
}
|
|
67
67
|
await session.extensionRunner.emit({ type: 'session_shutdown' });
|
|
68
|
-
assert.deepEqual(errors, [], 'startup and shutdown handlers must work with Pi 1.
|
|
68
|
+
assert.deepEqual(errors, [], 'startup and shutdown handlers must work with Pi 1.2.0 contexts');
|
|
69
69
|
console.log(`${manifest.name}: Pi ${VERSION} loader, manifest, session startup, and ${modelCount} models OK`);
|
|
70
70
|
} finally {
|
|
71
71
|
session?.dispose();
|