oira666_pi-limits-wait 0.6.7 → 0.6.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/README.md +7 -3
- package/package.json +6 -3
- package/src/constants.ts +1 -1
- package/src/retry-errors.ts +2 -0
package/README.md
CHANGED
|
@@ -42,7 +42,11 @@ Pi 1.4.0 has no public stream middleware that can intercept a failed provider st
|
|
|
42
42
|
|
|
43
43
|
## Compatibility tests
|
|
44
44
|
|
|
45
|
-
Run `npm
|
|
45
|
+
Run `npm run test:evergreen` for the strict TypeScript check, unit tests, integration tests, and required global-CLI e2e tests. Also run `npm run pack:check` before release. There is no separate build or lint task.
|
|
46
|
+
|
|
47
|
+
Evergreen e2e uses `$EVERGREEN_PI_BIN` (or `pi` on PATH) with stdin ignored. Set `$EVERGREEN_E2E_MODEL` to the live model, e.g. `openai-codex/gpt-6-luna:low`. It exercises a real rate-limit/retry transport, OAuth prompt cleaning, the kill switch, durable retry summaries outside model context, session resume, and a live two-turn conversation using normal Pi authentication. Missing CLI or model access fails rather than skips. Temporary sessions are removed afterward. See [EVERGREEN.md](EVERGREEN.md) for the intent and compatibility risks.
|
|
48
|
+
|
|
49
|
+
The separate `npm run test:e2e` suite is a legacy RPC diagnostic; unlike Evergreen's print-mode tests it requires a command pipe on stdin.
|
|
46
50
|
|
|
47
51
|
`test:e2e` requires `PI_EVERGREEN_PI_BIN` pointing to the installed global Pi executable. It explicitly loads this checkout and never installs a CLI. Loopback HTTP tests use dummy OAuth-shaped credentials in an isolated agent directory and exercise retries, tools, prompt changes, manual/overflow compaction, abort, session replacement, and reload. They also verify real cross-provider fallback headers (target insertion/deletion, native attribution, source-secret exclusion and parsed-stream events) across multiple turns and lifecycle transitions, plus OpenAI Responses workspace limits with retry-all enabled/disabled and Pi auto-retry enabled. A negative control without the extension proves the transport assertions detect prompt leaks.
|
|
48
52
|
|
|
@@ -286,9 +290,9 @@ TMPDIR="$PWD/tmp" npm test
|
|
|
286
290
|
npm run pack:check
|
|
287
291
|
```
|
|
288
292
|
|
|
289
|
-
`npm test`
|
|
293
|
+
`npm test` runs `npm run check` and the tests against the installed development dependencies. Tests target only the latest npm Pi release; update the pinned Pi development dependencies before testing a newer release. Before each release, update the tested version above and the Pi peer dependency baseline after all checks pass. No lint command is configured.
|
|
290
294
|
|
|
291
|
-
|
|
295
|
+
`npm test` covers retries against a local HTTP server and editor focus/key routing without live model calls. `npm run test:evergreen` adds integration and live global-CLI e2e coverage; README snippets are not separately executed.
|
|
292
296
|
|
|
293
297
|
## License
|
|
294
298
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oira666_pi-limits-wait",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.9",
|
|
4
4
|
"description": "Extension for PI that allows to automatically wait for limits to reset and retry the request",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -32,6 +32,9 @@
|
|
|
32
32
|
"pretest": "npm run check",
|
|
33
33
|
"test": "tsx src/__tests__/test-extension.ts && tsx src/__tests__/test-wait-ui.ts",
|
|
34
34
|
"test:e2e": "node scripts/test-e2e.mjs",
|
|
35
|
+
"test:integration": "tsx src/__tests__/test-integration.ts",
|
|
36
|
+
"test:e2e:evergreen": "node scripts/test-evergreen-e2e.mjs",
|
|
37
|
+
"test:evergreen": "npm test && npm run test:integration && npm run test:e2e:evergreen",
|
|
35
38
|
"pack:check": "npm pack --dry-run",
|
|
36
39
|
"prepublishOnly": "npm run check && npm test && npm run pack:check"
|
|
37
40
|
},
|
|
@@ -47,7 +50,7 @@
|
|
|
47
50
|
"devDependencies": {
|
|
48
51
|
"@earendil-works/pi-ai": "1.4.0",
|
|
49
52
|
"@earendil-works/pi-coding-agent": "1.4.0",
|
|
50
|
-
"tsx": "^4.
|
|
51
|
-
"typescript": "^
|
|
53
|
+
"tsx": "^4.23.15",
|
|
54
|
+
"typescript": "^7.0.2"
|
|
52
55
|
}
|
|
53
56
|
}
|
package/src/constants.ts
CHANGED
|
@@ -43,7 +43,7 @@ export const DEFAULT_LIVELINESS_INTERVAL_MS = 15 * 1_000; // 15 seconds
|
|
|
43
43
|
export const LIVELINESS_JSON_STATUS_KEY = "oira666.pi-limits-wait.json";
|
|
44
44
|
/** Payload schema version for LIVELINESS_JSON_STATUS_KEY. Bump only on a breaking change. */
|
|
45
45
|
export const LIVELINESS_JSON_VERSION = 1;
|
|
46
|
-
export const EXTENSION_VERSION = "0.6.
|
|
46
|
+
export const EXTENSION_VERSION = "0.6.8";
|
|
47
47
|
|
|
48
48
|
export const SETTINGS_FILE_NAME = "limits-wait.json";
|
|
49
49
|
export const FALLBACK_MODELS_KEY = "fallback-models";
|
package/src/retry-errors.ts
CHANGED
|
@@ -51,6 +51,8 @@ export function isTransientNetworkError(msg: string): boolean {
|
|
|
51
51
|
lower.includes("terminated") ||
|
|
52
52
|
lower.includes("socket hang up") ||
|
|
53
53
|
lower.includes("other side closed") ||
|
|
54
|
+
/websocket closed 1006\b/.test(lower) ||
|
|
55
|
+
lower.includes("connection ended") ||
|
|
54
56
|
lower.includes("network_error") ||
|
|
55
57
|
lower.includes("network error") ||
|
|
56
58
|
lower.includes("econnreset") ||
|