oira666_pi-npm-token 0.1.2 → 0.1.3

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 +5 -3
  2. package/package.json +6 -4
package/README.md CHANGED
@@ -80,8 +80,8 @@ This extension does not forward credentials to SSH hosts. Other extensions contr
80
80
 
81
81
  ```bash
82
82
  npm install
83
- npm test
84
- PI_EVERGREEN_PI_BIN=/absolute/path/to/global/pi npm run test:e2e
83
+ EVERGREEN_E2E_MODEL=openai-codex/gpt-6-luna:low npm run test:evergreen
84
+ EVERGREEN_PI_BIN=/absolute/path/to/global/pi EVERGREEN_E2E_MODEL=openai-codex/gpt-6-luna:low npm run test:e2e
85
85
  npm pack --dry-run --ignore-scripts
86
86
  ```
87
87
 
@@ -89,6 +89,8 @@ npm pack --dry-run --ignore-scripts
89
89
 
90
90
  Tests use dummy credentials and local subprocesses. They cover configuration, project trust, private-file handling, npm environment inheritance, lifecycle behavior, and cleanup. They do not contact npm to authenticate or publish a package, and do not prove that a real token has publishing permission.
91
91
 
92
- `npm run test:e2e` requires `PI_EVERGREEN_PI_BIN` pointing to the installed global Pi CLI; it never installs a runtime or skips coverage. It explicitly loads this extension into isolated RPC sessions and uses Pi's real OpenAI-compatible transport against a deterministic loopback SSE server, without model credentials or remote model calls. It verifies actual provider-bound requests and persisted sessions for sentinel-token leaks across tool turns, retries, compaction, credential reload, runtime reload, and session replacement. It also checks trusted/untrusted configuration, error recovery, environment restoration, and temporary-file cleanup. Negative controls exercise both the shell-auth probe and leak detector. Provider/model/reasoning labels honor `PI_EVERGREEN_E2E_PROVIDER`, `PI_EVERGREEN_E2E_MODEL`, and `PI_EVERGREEN_E2E_REASONING` (defaults: `openai`, `gpt-6-luna`, `medium`); these select the isolated test endpoint, not a live service.
92
+ `npm run test:evergreen` runs unit tests, SDK integration tests, and e2e tests, including the dependency refresh and typecheck above. Integration tests load the real extension through Pi's resource loader and exercise local npm, credential reload, runtime reload, invalid-settings recovery, and settings removal without model calls.
93
+
94
+ `npm run test:e2e` uses the globally installed CLI from `EVERGREEN_PI_BIN`, falling back to `pi` on PATH, with stdin ignored. Set `EVERGREEN_E2E_MODEL` to a model you can access; these tests make real model calls and require its credentials. Isolated agent directories copy your model login from `auth.json` (then delete it during cleanup); provider environment credentials are also inherited. The test runs real bash/npm probes with dummy npm credentials for trusted, untrusted, and missing configuration. It checks provider-bound payloads, CLI output, and persisted sessions for dummy-token leaks, plus shutdown environment restoration and temporary-file cleanup. It never authenticates to npm or publishes. Retry, compaction, interactive UI, and session replacement are not covered by this suite. See [EVERGREEN.md](EVERGREEN.md) for intent and compatibility watch points.
93
95
 
94
96
  Before every release, update the tested-against line at the top of this README to the actual Pi version that passed the checks. Keep the supported Pi peer range in `package.json` accurate, and inspect `npm pack --dry-run --ignore-scripts` to ensure no credentials or temporary files are packaged. The tracked root `AGENTS.md` contains the release instructions and code quality bar.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oira666_pi-npm-token",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Load npm publishing credentials from Pi settings for local shell commands.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -30,14 +30,16 @@
30
30
  "devDependencies": {
31
31
  "@earendil-works/pi-coding-agent": "^1.4.0",
32
32
  "@types/ini": "^4.1.1",
33
- "@types/node": "^24.0.0",
34
- "typescript": "^5.9.3"
33
+ "@types/node": "^26.6.5",
34
+ "typescript": "^7.0.2"
35
35
  },
36
36
  "scripts": {
37
37
  "typecheck": "tsc --noEmit",
38
38
  "pretest": "npm install --save-dev --ignore-scripts @earendil-works/pi-coding-agent@latest && npm run typecheck",
39
39
  "test": "node --experimental-strip-types --test test/*.test.ts",
40
- "test:e2e": "node --test test/*.e2e.mjs"
40
+ "test:integration": "node --experimental-strip-types --test test/*.integration.ts",
41
+ "test:e2e": "node --test test/*.e2e.mjs",
42
+ "test:evergreen": "npm test && npm run test:integration && npm run test:e2e"
41
43
  },
42
44
  "dependencies": {
43
45
  "ini": "^7.0.0"