pi-smart-router 0.1.0 → 0.1.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.
Files changed (2) hide show
  1. package/README.md +17 -7
  2. package/package.json +5 -4
package/README.md CHANGED
@@ -526,7 +526,8 @@ Contributors must run `npm run build` before publishing or consuming the library
526
526
  | Script | Purpose |
527
527
  |--------|---------|
528
528
  | `npm run build` | Compile library to `dist/` (`tsc --project tsconfig.build.json`) |
529
- | `npm run release:check` | Pre-release gate (same as `verify:ci`) |
529
+ | `npm run release:check` | Pre-release gate: `verify:ci` + consumer pack (`npm install --omit=dev` on tarball) |
530
+ | `npm run release:consumer-pack` | Pack tarball and verify production dependencies resolve (catches missing runtime deps) |
530
531
  | `npm run verify:ci` | Full CI parity: build, typecheck, lint, test, coverage |
531
532
  | `npm run typecheck` | TypeScript strict mode check (`tsc --noEmit`) |
532
533
  | `npm test` | Run test suite (`vitest run`) |
@@ -539,15 +540,14 @@ Contributors must run `npm run build` before publishing or consuming the library
539
540
 
540
541
  ### Releasing
541
542
 
542
- Tag-triggered publish via GitHub Actions (requires `NPMSECRET` repository secret):
543
+ Tag-triggered publish via GitHub Actions (requires `NPMSECRET` repository secret). pi.dev gallery listing syncs automatically from npm (`pi-package` keyword); no separate submit step.
543
544
 
544
- 1. `npm run release:check`
545
- 2. `npm version 0.1.0` (creates commit + `v0.1.0` tag)
545
+ 1. `npm run release:check` (includes consumer pack verify)
546
+ 2. `npm version 0.1.1` (creates commit + `v0.1.1` tag)
546
547
  3. `git push && git push --tags`
547
- 4. Actions → **Release** runs `npm publish` and creates a GitHub Release
548
- 5. Post-publish smoke: `pi install npm:pi-smart-router` and `/model smart-router/auto`
548
+ 4. Actions → **Release** runs pack smoke, consumer pack verify, `npm publish`, and creates a GitHub Release
549
549
 
550
- Re-publish a failed release: Actions → Release → Run workflow with existing tag (e.g. `v0.1.0`).
550
+ Re-publish a failed release: Actions → Release → Run workflow with existing tag (e.g. `v0.1.1`).
551
551
 
552
552
  Dry-run tarball contents locally:
553
553
 
@@ -556,6 +556,16 @@ npm run release:check
556
556
  npm pack --dry-run
557
557
  ```
558
558
 
559
+ **Post-publish smoke (manual, macOS):** CI does not run `pi install`. After publish:
560
+
561
+ ```bash
562
+ pi install npm:pi-smart-router@0.1.1
563
+ pi --list-models | grep smart-router
564
+ # in pi: /model smart-router/auto, /smart-router status
565
+ ```
566
+
567
+ Confirm https://pi.dev/packages/pi-smart-router shows the new version (may lag npm by a few minutes).
568
+
559
569
  ### Test suite
560
570
 
561
571
  1117 tests across 61 test files covering:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-smart-router",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Auto-model router middleware for the pi.dev coding agent",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -51,7 +51,8 @@
51
51
  "scripts": {
52
52
  "build": "tsc --project tsconfig.build.json",
53
53
  "prepublishOnly": "npm run release:check",
54
- "release:check": "npm run verify:ci",
54
+ "release:check": "npm run verify:ci && npm run release:consumer-pack",
55
+ "release:consumer-pack": "bash scripts/verify-consumer-pack.sh",
55
56
  "typecheck": "tsc --noEmit",
56
57
  "test": "vitest run",
57
58
  "coverage:check": "vitest run --coverage",
@@ -86,13 +87,13 @@
86
87
  "eslint": "^8.57.1",
87
88
  "typescript": "^5.8.3",
88
89
  "@vitest/coverage-v8": "^3.2.3",
89
- "vitest": "^3.2.3",
90
- "yaml": "^2.9.0"
90
+ "vitest": "^3.2.3"
91
91
  },
92
92
  "dependencies": {
93
93
  "@earendil-works/pi-ai": "^0.80.3",
94
94
  "@huggingface/transformers": "^4.2.0",
95
95
  "better-sqlite3": "^12.11.1",
96
+ "yaml": "^2.9.0",
96
97
  "zod": "^4.4.3"
97
98
  },
98
99
  "allowScripts": {