pi-zro-provider 1.3.27 → 1.3.29
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 +10 -15
- package/CHANGELOG.md +4 -0
- package/README.md +2 -1
- package/models.json +29 -0
- package/package.json +3 -3
- package/scripts/test-pi-compat.mjs +4 -4
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
name: Publish
|
|
2
|
+
|
|
3
|
+
# Releases of pi-zro-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-zro-provider --repo monotykamary/pi-zro-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
|
|
@@ -5,12 +5,12 @@ on:
|
|
|
5
5
|
- cron: "7 0 * * *" # 07:07 Asia/Ho_Chi_Minh
|
|
6
6
|
workflow_dispatch:
|
|
7
7
|
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
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
11
|
permissions:
|
|
12
12
|
contents: write
|
|
13
|
-
|
|
13
|
+
actions: write
|
|
14
14
|
|
|
15
15
|
concurrency:
|
|
16
16
|
group: update-models
|
|
@@ -47,14 +47,9 @@ jobs:
|
|
|
47
47
|
git commit -am "chore(release): v$version"
|
|
48
48
|
git push origin HEAD:main
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
exit 0
|
|
57
|
-
fi
|
|
58
|
-
# Trusted publishing needs npm 11.5.1 or newer.
|
|
59
|
-
npm install --global npm@latest
|
|
60
|
-
npm publish --access public --provenance
|
|
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.3.28
|
|
4
|
+
|
|
5
|
+
- Pin Pi SDK development dependencies to 1.3.0 while retaining wildcard host peers; verify real manifest loading, lifecycle and native/bundled Pi hosts offline.
|
|
6
|
+
|
|
3
7
|
## 1.3.27
|
|
4
8
|
|
|
5
9
|
- 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.
|
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ _GLM-5.2, Kimi K3, and DeepSeek V4 / V4.1 Flash — run through the Zro inferenc
|
|
|
15
15
|
|
|
16
16
|
## Features
|
|
17
17
|
|
|
18
|
-
- **
|
|
18
|
+
- **7+ AI Models** — GLM-5.2 (default), Kimi K3, DeepSeek V4 Flash, and DeepSeek V4.1 Flash, straight from Zro's production catalog
|
|
19
19
|
- **Native reasoning effort** — every model ships an endpoint-verified `piLevel` → level-id map (`glm-5.2`, `glm-5.3-flash`, `deepseek-v4-flash-0731`: full `off`–`max` ladder; `deepseek-v4.1-flash`: `low`/`high`/`max` — catalog has no `none`, and `xhigh`/`max` both send `max`; `kimi-k3`: `low`/`high`/`max` — the proxy rejects `medium` there), so `/thinking low` etc. maps exactly to what the Zro proxy accepts. Quirks: `glm-5.3-flash` silently disables thinking at `low`, so `minimal`/`low` map to `minimal`; `glm-5.3` mirrors flash's full ladder — Z.ai officially removed `none` for the 5.3 family, but the proxy accepts it and streams cleanly (occasionally a short chain-of-thought preamble surfaces in `content` before the answer), and `xhigh`/`max` both send `max`
|
|
20
20
|
- **OpenAI-compatible API** at `https://zro.moonmath.ai/v1`
|
|
21
21
|
- **Official catalog sync** from Zro's `/api/cli/models` endpoint — same one `zro models` uses
|
|
@@ -30,6 +30,7 @@ _GLM-5.2, Kimi K3, and DeepSeek V4 / V4.1 Flash — run through the Zro inferenc
|
|
|
30
30
|
| Auto | Text | 1.0M | 131K | — | — |
|
|
31
31
|
| DeepSeek V4.1 Flash | Text + Image | 1.0M | 384K | $0.14 | $0.28 |
|
|
32
32
|
| Dolly 1 Security | Text | 1.0M | 64K | — | — |
|
|
33
|
+
| Dolly 2 Security | Text | 1.0M | 131K | — | — |
|
|
33
34
|
| GLM-5.3 | Text | 1.0M | 131K | $1.40 | $4.40 |
|
|
34
35
|
| GLM-5.3 Flash | Text + Image | 1.0M | 64K | $0.15 | $0.50 |
|
|
35
36
|
| Kimi K3 | Text + Image | 1.0M | 131K | $2.50 | $12.00 |
|
package/models.json
CHANGED
|
@@ -86,6 +86,35 @@
|
|
|
86
86
|
"maxTokensField": "max_tokens"
|
|
87
87
|
}
|
|
88
88
|
},
|
|
89
|
+
{
|
|
90
|
+
"id": "dolly2-security",
|
|
91
|
+
"name": "Dolly 2 Security",
|
|
92
|
+
"reasoning": true,
|
|
93
|
+
"thinkingLevelMap": {
|
|
94
|
+
"off": null,
|
|
95
|
+
"minimal": null,
|
|
96
|
+
"low": "low",
|
|
97
|
+
"medium": null,
|
|
98
|
+
"high": "high",
|
|
99
|
+
"xhigh": "max"
|
|
100
|
+
},
|
|
101
|
+
"input": [
|
|
102
|
+
"text"
|
|
103
|
+
],
|
|
104
|
+
"cost": {
|
|
105
|
+
"input": 0,
|
|
106
|
+
"output": 0,
|
|
107
|
+
"cacheRead": 0,
|
|
108
|
+
"cacheWrite": 0
|
|
109
|
+
},
|
|
110
|
+
"contextWindow": 1048576,
|
|
111
|
+
"maxTokens": 131000,
|
|
112
|
+
"compat": {
|
|
113
|
+
"supportsDeveloperRole": false,
|
|
114
|
+
"supportsReasoningEffort": true,
|
|
115
|
+
"maxTokensField": "max_tokens"
|
|
116
|
+
}
|
|
117
|
+
},
|
|
89
118
|
{
|
|
90
119
|
"id": "glm-5.3",
|
|
91
120
|
"name": "GLM-5.3",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-zro-provider",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.29",
|
|
4
4
|
"description": "Zro provider extension for pi - GLM-5.2, GLM-5.3 Flash, Kimi K3, DeepSeek V4 Flash & DeepSeek V4.1 Flash through the Zro inference endpoint",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.ts",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"brace-expansion": "5.0.12"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@earendil-works/pi-ai": "1.
|
|
42
|
-
"@earendil-works/pi-coding-agent": "1.
|
|
41
|
+
"@earendil-works/pi-ai": "1.3.0",
|
|
42
|
+
"@earendil-works/pi-coding-agent": "1.3.0",
|
|
43
43
|
"@types/node": "^24.10.1",
|
|
44
44
|
"typescript": "6.0.3",
|
|
45
45
|
"vitest": "4.1.7"
|
|
@@ -13,7 +13,7 @@ globalThis.fetch = async () => new Response('', { status: 503 });
|
|
|
13
13
|
let session;
|
|
14
14
|
try {
|
|
15
15
|
const { createAgentSession, DefaultResourceLoader, ModelRuntime, SessionManager, SettingsManager, VERSION } = await import('@earendil-works/pi-coding-agent');
|
|
16
|
-
assert.equal(VERSION, '1.
|
|
16
|
+
assert.equal(VERSION, '1.3.0', 'test the actual pinned Pi host, not a stale override');
|
|
17
17
|
const manifest = JSON.parse(await readFile(join(root, 'package.json'), 'utf8'));
|
|
18
18
|
for (const name of ['@earendil-works/pi-ai', '@earendil-works/pi-agent-core', '@earendil-works/pi-coding-agent', '@earendil-works/pi-tui', 'typebox']) {
|
|
19
19
|
assert.equal(manifest.dependencies?.[name], undefined, `${name}: host packages must not be runtime dependencies`);
|
|
@@ -58,7 +58,7 @@ try {
|
|
|
58
58
|
{ id: label, choices: [{ index: 0, delta: {}, finish_reason: 'stop' }], usage: { prompt_tokens: 3, completion_tokens: 2, total_tokens: 5, total_cost: 0.001 } },
|
|
59
59
|
];
|
|
60
60
|
const result = await modelRuntime.streamSimple(model, { messages: [
|
|
61
|
-
{ role: 'system', content: 'Offline Pi 1.
|
|
61
|
+
{ role: 'system', content: 'Offline Pi 1.3.0 transcript', timestamp: 0 },
|
|
62
62
|
{ role: 'user', content: label, timestamp: 1 },
|
|
63
63
|
] }, {
|
|
64
64
|
maxTokens: 32,
|
|
@@ -77,13 +77,13 @@ try {
|
|
|
77
77
|
assert.equal(result.usage.totalTokens, 5);
|
|
78
78
|
assert.equal(requestBody.user, label, 'request-scoped instrumentation must not cross concurrent streams');
|
|
79
79
|
assert.equal(requestBody.max_tokens ?? requestBody.max_completion_tokens, 32);
|
|
80
|
-
assert.ok(requestBody.messages.some(message => typeof message.content === 'string' && message.content.includes('Offline Pi 1.
|
|
80
|
+
assert.ok(requestBody.messages.some(message => typeof message.content === 'string' && message.content.includes('Offline Pi 1.3.0 transcript')));
|
|
81
81
|
assert.deepEqual(hooks.slice(0, 2), ['payload', 'response']);
|
|
82
82
|
assert.equal(hooks.filter(hook => hook === 'stream').length, 2);
|
|
83
83
|
}));
|
|
84
84
|
assert.equal(globalThis.fetch, offlineFetch, 'Zro must never monkey-patch global fetch');
|
|
85
85
|
await session.extensionRunner.emit({ type: 'session_shutdown' });
|
|
86
|
-
assert.deepEqual(errors, [], 'Pi 1.
|
|
86
|
+
assert.deepEqual(errors, [], 'Pi 1.3.0 startup and shutdown must be clean');
|
|
87
87
|
console.log(`${manifest.name}: Pi ${VERSION} manifest, ${models.length} models, startup/shutdown, concurrent streams and instrumentation OK`);
|
|
88
88
|
} finally {
|
|
89
89
|
session?.dispose();
|