@plasius/ai-router 0.1.7 → 0.1.9

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/CHANGELOG.md CHANGED
@@ -13,11 +13,46 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
13
13
  - (placeholder)
14
14
 
15
15
  - **Fixed**
16
+ - Restored exact branch and main validation on explicit GitHub-hosted runners with package-manager caching disabled and public-package integrity enforced.
16
17
  - (placeholder)
17
18
 
18
19
  - **Security**
19
20
  - (placeholder)
20
21
 
22
+ ## [0.1.9] - 2026-08-31
23
+
24
+ - **Added**
25
+ - (placeholder)
26
+
27
+ - **Changed**
28
+ - (placeholder)
29
+
30
+ - **Fixed**
31
+ - (placeholder)
32
+
33
+ - **Security**
34
+ - (placeholder)
35
+
36
+ ## [0.1.8] - 2026-08-30
37
+
38
+ - **Added**
39
+ - (placeholder)
40
+
41
+ - **Changed**
42
+ - Restored exact-main npm publication on a GitHub-hosted runner through
43
+ short-lived OIDC, with an enforced Node/npm runtime and no long-lived
44
+ write-token fallback.
45
+ - Moved public package CI to GitHub-hosted capacity so internal and external
46
+ branches cannot queue on or execute against company-managed runners.
47
+ - (placeholder)
48
+
49
+ - **Fixed**
50
+ - (placeholder)
51
+
52
+ - **Security**
53
+ - Pinned patched transitive npm dependencies to clear the current audit baseline.
54
+ - (placeholder)
55
+
21
56
  ## [0.1.7] - 2026-07-12
22
57
 
23
58
  - **Added**
@@ -118,3 +153,5 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
118
153
  [0.1.5]: https://github.com/Plasius-LTD/ai-router/releases/tag/v0.1.5
119
154
  [0.1.6]: https://github.com/Plasius-LTD/ai-router/releases/tag/v0.1.6
120
155
  [0.1.7]: https://github.com/Plasius-LTD/ai-router/releases/tag/v0.1.7
156
+ [0.1.8]: https://github.com/Plasius-LTD/ai-router/releases/tag/v0.1.8
157
+ [0.1.9]: https://github.com/Plasius-LTD/ai-router/releases/tag/v0.1.9
package/README.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @plasius/ai-router
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/@plasius/ai-router.svg)](https://www.npmjs.com/package/@plasius/ai-router)
4
+ [![Build Status](https://img.shields.io/github/actions/workflow/status/Plasius-LTD/ai-router/ci.yml?branch=main&label=build&style=flat)](https://github.com/Plasius-LTD/ai-router/actions/workflows/ci.yml)
5
+ [![coverage](https://img.shields.io/codecov/c/github/Plasius-LTD/ai-router)](https://codecov.io/gh/Plasius-LTD/ai-router)
6
+ [![License](https://img.shields.io/github/license/Plasius-LTD/ai-router)](./LICENSE)
7
+ [![Code of Conduct](https://img.shields.io/badge/code%20of%20conduct-yes-blue.svg)](./CODE_OF_CONDUCT.md)
8
+ [![Security Policy](https://img.shields.io/badge/security%20policy-yes-orange.svg)](./SECURITY.md)
9
+ [![Changelog](https://img.shields.io/badge/changelog-md-blue.svg)](./CHANGELOG.md)
10
+
3
11
  Cost-aware AI task routing, budget, confidence, and SLO policy for Plasius agentic AI workloads.
4
12
 
5
13
  ## Scope
@@ -66,3 +74,15 @@ Protected `main` releases use a two-step flow:
66
74
  ## License
67
75
 
68
76
  Apache-2.0
77
+ <!-- BEGIN PLASIUS RELEASE INTEGRITY -->
78
+ ## Release integrity
79
+
80
+ Production package publication runs only from `.github/workflows/cd.yml` on
81
+ protected `main`. The job verifies that the prepared commit is still the
82
+ current main commit and has an exact successful `ci.yml` push result before it
83
+ mutates release state. Public package CI runs on GitHub-hosted capacity so it
84
+ cannot execute on company-managed runners. npm publication runs on
85
+ GitHub-hosted Node.js 24 with pinned npm 11.6.2, uses the protected `production` environment and
86
+ short-lived npm OIDC with provenance, and has no long-lived npm write-token
87
+ fallback. Rollback disables CD; it never rewrites published package history.
88
+ <!-- END PLASIUS RELEASE INTEGRITY -->
@@ -0,0 +1,55 @@
1
+ # ADR-0003: Hosted OIDC package publication
2
+
3
+ - Status: Accepted
4
+ - Date: 2026-08-09
5
+
6
+ ## Context
7
+
8
+ npm trusted publishing accepts GitHub Actions only from GitHub-hosted runners.
9
+ The previous `ai-router` release job selected self-hosted infrastructure and
10
+ required a long-lived npm write token. That prevented the package from using
11
+ its configured trusted-publisher binding and left release availability coupled
12
+ to a reusable credential.
13
+
14
+ The parent rollout control is
15
+ `platform.public-artifact-integrity.enabled`. It governs staged release
16
+ restoration but cannot bypass source, CI, package, or publication integrity
17
+ checks. No product capability is introduced.
18
+
19
+ ## Decision
20
+
21
+ Publication is phase-isolated: dependency installation, package validation, SBOM generation, and immutable tarball packing run in `validate_and_pack` without the `production` environment or OIDC permission. The final hosted `publish` job downloads only that sealed artifact, explicitly installs npm 11.6.2, runs no repository dependency code, and publishes the tarball with lifecycle scripts disabled. It re-fetches current `main` immediately before the first release mutation and again immediately before npm publication. `.npmrc` contains no registry-auth placeholder, and release preparation returns the reviewed current `main` HEAD rather than package-file history.
22
+
23
+ Reviewed CI runs on explicit GitHub-hosted capacity with package-manager caching
24
+ disabled. Fork pull-request code is rejected before package validation, and the
25
+ same exact workflow can be dispatched manually for branch-head verification.
26
+
27
+ The final npm publication job in `.github/workflows/cd.yml`:
28
+
29
+ 1. runs on the literal `ubuntu-latest` GitHub-hosted runner;
30
+ 2. remains bound to protected `main` and the GitHub `production`
31
+ environment;
32
+ 3. verifies that the prepared commit still equals remote `main` and that an
33
+ exact-SHA `ci.yml` push run completed successfully;
34
+ 4. verifies Node.js 24 and npm 11.5.1 or newer before publication;
35
+ 5. receives least-privilege `id-token: write` and publishes only through npm
36
+ OIDC with provenance; and
37
+ 6. has no `NPM_TOKEN`, `NODE_AUTH_TOKEN`, or long-lived write-token
38
+ fallback.
39
+
40
+ The external npm trusted publisher is bound exactly to organization
41
+ `Plasius-LTD`, repository `ai-router`, workflow `cd.yml`, environment
42
+ `production`, and action `npm publish`.
43
+
44
+ ## Consequences
45
+
46
+ - A moved main branch, absent exact-SHA CI result, unsupported runtime, missing
47
+ trusted-publisher binding, or OIDC failure stops publication before npm
48
+ mutation.
49
+ - Public package CI and the narrow publication boundary use isolated
50
+ GitHub-hosted capacity, keeping untrusted repository code away from company
51
+ runners and avoiding private runner-group availability drift.
52
+ - Releases use short-lived workflow identity and retain npm provenance without
53
+ a reusable write credential.
54
+ - Rollback disables `cd.yml` or the release-integrity flag. Published package
55
+ history, tags, and registry versions are never rewritten or deleted.
@@ -2,3 +2,4 @@
2
2
 
3
3
  - [ADR-0001: @plasius/ai-router Package Boundary](./adr-0001-package-boundary.md)
4
4
  - [ADR-0002: Cost-aware routing policy engine in @plasius/ai-router](./adr-0002-cost-aware-routing-policy.md)
5
+ - [ADR-0003: Hosted OIDC Package Publication](./adr-0003-hosted-oidc-package-publication.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plasius/ai-router",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "Cost-aware AI task routing, budget, confidence, and SLO policy for Plasius agentic AI workloads.",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -54,7 +54,7 @@
54
54
  "author": "Plasius LTD <development@plasius.co.uk>",
55
55
  "license": "Apache-2.0",
56
56
  "dependencies": {
57
- "@plasius/ai-providers": "^0.1.8"
57
+ "@plasius/ai-providers": "^0.1.9"
58
58
  },
59
59
  "repository": {
60
60
  "type": "git",
@@ -66,17 +66,17 @@
66
66
  "homepage": "https://github.com/Plasius-LTD/ai-router#readme",
67
67
  "devDependencies": {
68
68
  "@eslint/js": "^10.0.1",
69
- "@plasius/ai-config": "^0.1.7",
70
- "@types/node": "^26.0.1",
71
- "@typescript-eslint/eslint-plugin": "^8.62.0",
72
- "@typescript-eslint/parser": "^8.62.0",
73
- "@vitest/coverage-v8": "^4.1.9",
74
- "eslint": "^10.6.0",
75
- "globals": "^17.7.0",
69
+ "@plasius/ai-config": "^0.1.9",
70
+ "@types/node": "^26.4.0",
71
+ "@typescript-eslint/eslint-plugin": "^8.69.0",
72
+ "@typescript-eslint/parser": "^8.69.0",
73
+ "@vitest/coverage-v8": "^4.1.11",
74
+ "eslint": "^10.9.1",
75
+ "globals": "^17.11.0",
76
76
  "rimraf": "^6.1.3",
77
77
  "tsup": "^8.5.1",
78
78
  "typescript": "^6.0.3",
79
- "vitest": "^4.1.9"
79
+ "vitest": "^4.1.11"
80
80
  },
81
81
  "publishConfig": {
82
82
  "access": "public"
@@ -95,6 +95,10 @@
95
95
  "node": ">=24"
96
96
  },
97
97
  "overrides": {
98
+ "esbuild": "^0.28.1",
99
+ "brace-expansion": "5.0.9",
100
+ "nanoid": "3.3.18",
101
+ "postcss": "8.5.26",
98
102
  "minimatch": "^10.2.1"
99
103
  }
100
104
  }