@herbertgao/pi-extensions 2026.11.0 → 2026.11.2
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 +768 -0
- package/README.md +7 -7
- package/THIRD_PARTY_NOTICES.md +2 -2
- package/extensions/clef.mjs +1 -1
- package/node_modules/@herbertgao/pi-agency/CHANGELOG.md +19 -0
- package/node_modules/@herbertgao/pi-agency/package.json +4 -2
- package/node_modules/@herbertgao/pi-agency/src/index.ts +1 -1
- package/node_modules/@herbertgao/pi-bark/CHANGELOG.md +52 -0
- package/node_modules/@herbertgao/pi-bark/package.json +2 -1
- package/node_modules/@herbertgao/pi-cc-extensions/CHANGELOG.md +207 -0
- package/node_modules/@herbertgao/pi-cc-extensions/README.en.md +7 -5
- package/node_modules/@herbertgao/pi-cc-extensions/README.md +10 -7
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/config/config.ts +20 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/config/panel.ts +61 -6
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/agent-summary/core.ts +11 -16
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/agent-summary/index.ts +60 -11
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/compact-thinking.ts +29 -11
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/shell/footer-layout.ts +54 -6
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/shell/footer.ts +23 -5
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/shell/session-tokens.ts +52 -0
- package/node_modules/@herbertgao/pi-cc-extensions/package.json +5 -4
- package/node_modules/@herbertgao/pi-impeccable/CHANGELOG.md +13 -0
- package/node_modules/@herbertgao/pi-impeccable/package.json +2 -1
- package/node_modules/@herbertgao/pi-subagents/CHANGELOG.md +6 -0
- package/node_modules/@herbertgao/pi-subagents/README.md +43 -33
- package/node_modules/@herbertgao/pi-subagents/docs/rpc.md +1 -1
- package/node_modules/@herbertgao/pi-subagents/docs/workflows.md +2 -0
- package/node_modules/@herbertgao/pi-subagents/package.json +4 -4
- package/node_modules/@herbertgao/pi-subagents/src/agent-file-toggle.ts +9 -8
- package/node_modules/@herbertgao/pi-subagents/src/agent-manager.ts +70 -9
- package/node_modules/@herbertgao/pi-subagents/src/agent-record-entry.ts +167 -0
- package/node_modules/@herbertgao/pi-subagents/src/agent-runner.ts +156 -13
- package/node_modules/@herbertgao/pi-subagents/src/custom-agents.ts +52 -8
- package/node_modules/@herbertgao/pi-subagents/src/default-agents.ts +3 -4
- package/node_modules/@herbertgao/pi-subagents/src/index.ts +153 -56
- package/node_modules/@herbertgao/pi-subagents/src/settings.ts +3 -2
- package/node_modules/@herbertgao/pi-subagents/src/status-note.ts +3 -1
- package/node_modules/@herbertgao/pi-subagents/src/types.ts +5 -0
- package/node_modules/@herbertgao/pi-subagents/src/workflow/host.ts +88 -6
- package/node_modules/@herbertgao/pi-subagents/src/workflow/progress.ts +3 -2
- package/node_modules/@herbertgao/sol-pi/CHANGELOG.md +84 -0
- package/node_modules/@herbertgao/sol-pi/README.md +3 -3
- package/node_modules/@herbertgao/sol-pi/THIRD_PARTY_NOTICES.md +4 -4
- package/node_modules/@herbertgao/sol-pi/agents-install.md +3 -3
- package/node_modules/@herbertgao/sol-pi/docs/compatibility.md +1 -1
- package/node_modules/@herbertgao/sol-pi/package.json +2 -1
- package/node_modules/pi-provider-qoder/README.md +40 -0
- package/node_modules/pi-provider-qoder/dist/index.js +69 -1
- package/node_modules/pi-provider-qoder/package.json +4 -3
- package/node_modules/pi-typesafe/README.md +3 -3
- package/node_modules/pi-typesafe/dist/auth.d.ts +21 -4
- package/node_modules/pi-typesafe/dist/auth.js +32 -7
- package/node_modules/pi-typesafe/dist/backends.d.ts +2 -2
- package/node_modules/pi-typesafe/dist/backends.js +9 -0
- package/node_modules/pi-typesafe/dist/client.js +7 -12
- package/node_modules/pi-typesafe/dist/errors.d.ts +3 -2
- package/node_modules/pi-typesafe/dist/errors.js +12 -10
- package/node_modules/pi-typesafe/dist/extension.js +14 -10
- package/node_modules/pi-typesafe/package.json +1 -1
- package/package.json +10 -9
|
@@ -23,20 +23,22 @@ function retryAfterSeconds(error) {
|
|
|
23
23
|
return Number.isSafeInteger(seconds) && seconds >= 0 ? seconds : undefined;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
|
-
* Classify an error into a message safe to display.
|
|
27
|
-
*
|
|
26
|
+
* Classify an error into a message safe to display. The subject of every message is the backend that answered — its
|
|
27
|
+
* `label`, or the caller's endpoint label — falling back to TypeSafe when no backend is passed. `backend` also names
|
|
28
|
+
* the key variable the 401 advice tells the user to check and selects the 402 wording.
|
|
28
29
|
*/
|
|
29
30
|
export function safeError(error, backend) {
|
|
30
31
|
if (error instanceof TypeSafeIntegrationError)
|
|
31
32
|
return error;
|
|
33
|
+
const config = backend === undefined ? undefined : typeof backend === "string" ? backendConfig(backend) : backend;
|
|
34
|
+
const subject = config?.label ?? "TypeSafe";
|
|
35
|
+
const keyEnv = config?.keyEnv ?? TYPESAFE_KEY_ENV;
|
|
36
|
+
const openrouter = config !== undefined && config.host === DECISIONS_BACKENDS.openrouter.host;
|
|
32
37
|
if (error instanceof APIUserAbortError)
|
|
33
|
-
return new TypeSafeIntegrationError("aborted",
|
|
38
|
+
return new TypeSafeIntegrationError("aborted", `${subject} request cancelled; an already submitted request may still be billed.`);
|
|
34
39
|
if (error instanceof APITimeoutError)
|
|
35
|
-
return new TypeSafeIntegrationError("timeout",
|
|
40
|
+
return new TypeSafeIntegrationError("timeout", `${subject} request timed out; it was not retried and may still be billed.`);
|
|
36
41
|
if (error instanceof APIError) {
|
|
37
|
-
const config = backend === undefined ? undefined : typeof backend === "string" ? backendConfig(backend) : backend;
|
|
38
|
-
const keyEnv = config?.keyEnv ?? TYPESAFE_KEY_ENV;
|
|
39
|
-
const openrouter = config !== undefined && config.host === DECISIONS_BACKENDS.openrouter.host;
|
|
40
42
|
const retry = error.status === 429 ? retryAfterSeconds(error) : undefined;
|
|
41
43
|
const advice = error.status === 401 ? `Check ${keyEnv}.`
|
|
42
44
|
: error.status === 402 ? (openrouter ? "Insufficient credits. Add credits at https://openrouter.ai/credits." : "Check your account balance.")
|
|
@@ -44,9 +46,9 @@ export function safeError(error, backend) {
|
|
|
44
46
|
: error.status === 429 ? `Check your account quota and try again later.${retry === undefined ? "" : ` Retry after ${retry} seconds.`}`
|
|
45
47
|
: error.status === 400 || error.status === 422 ? "Check the question format and model limits."
|
|
46
48
|
: "Try again later or check the service status.";
|
|
47
|
-
return new TypeSafeIntegrationError("http",
|
|
49
|
+
return new TypeSafeIntegrationError("http", `${subject} returned HTTP ${error.status}. ${advice} No automatic retry was made.`, error.status);
|
|
48
50
|
}
|
|
49
51
|
if (error instanceof APIConnectionError)
|
|
50
|
-
return new TypeSafeIntegrationError("connection",
|
|
51
|
-
return new TypeSafeIntegrationError("response",
|
|
52
|
+
return new TypeSafeIntegrationError("connection", `Could not complete the ${subject} connection. No automatic retry was made.`);
|
|
53
|
+
return new TypeSafeIntegrationError("response", `${subject} returned an unreadable or unexpected response.`);
|
|
52
54
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Text } from "@earendil-works/pi-tui";
|
|
2
2
|
import { BACKEND_ENV, DEFAULT_BACKEND, DECISIONS_BACKENDS, MODEL_ENV, backendFromEnvironment, backendHost, modelFromEnvironment, resolveBackend, sentModelId } from "./backends.js";
|
|
3
3
|
import { createTypeSafe, DEFAULT_MAX_REQUESTS } from "./client.js";
|
|
4
|
-
import { authState, clearAuthState, describeAuth } from "./auth.js";
|
|
4
|
+
import { authState, clearAuthState, describeAuth, isKeyRejection } from "./auth.js";
|
|
5
5
|
import { clearStoredApiKey, credentialsPath, keySituation, keySourceLabel } from "./credentials.js";
|
|
6
6
|
import { TypeSafeIntegrationError, safeError } from "./errors.js";
|
|
7
7
|
import { loginWithPrompt } from "./login.js";
|
|
@@ -100,9 +100,9 @@ export default function typesafeExtension(pi) {
|
|
|
100
100
|
const auth = describeAuth(authState({ backend }));
|
|
101
101
|
// A backend name the registry does not know means no judgment can be sent at all, whether or not it is enabled.
|
|
102
102
|
if (backendError !== undefined)
|
|
103
|
-
callOut(ctx, `start:backend`, `${backendError} Judgments
|
|
103
|
+
callOut(ctx, `start:backend`, `${backendError} Judgments will fail until ${BACKEND_ENV} names a valid backend or is unset.`);
|
|
104
104
|
else if (enabled && auth.level === "error")
|
|
105
|
-
callOut(ctx, `start:${auth.level}`, `TypeSafe is enabled but judgments
|
|
105
|
+
callOut(ctx, `start:${auth.level}`, `TypeSafe is enabled but judgments will fail. ${auth.text}`);
|
|
106
106
|
});
|
|
107
107
|
pi.registerEntryRenderer("typesafe-result", (entry, { expanded }) => new Text(entry.data ? format(entry.data, expanded) : "TypeSafe · no result", 0, 0));
|
|
108
108
|
pi.registerTool({
|
|
@@ -134,11 +134,15 @@ export default function typesafeExtension(pi) {
|
|
|
134
134
|
return { content: [{ type: "text", text: JSON.stringify(result) }], details: result };
|
|
135
135
|
}
|
|
136
136
|
catch (error) {
|
|
137
|
-
const safe = safeError(error);
|
|
138
|
-
//
|
|
139
|
-
|
|
140
|
-
if (
|
|
141
|
-
|
|
137
|
+
const safe = safeError(error, backend);
|
|
138
|
+
// A 401 is about the key, so it outlives this call and is called out once; a 403 refuses one request and is
|
|
139
|
+
// only thrown. The client recorded the failure before throwing, so describeAuth describes that failure.
|
|
140
|
+
if (isKeyRejection(safe.status)) {
|
|
141
|
+
const auth = describeAuth(authState({ backend }));
|
|
142
|
+
callOut(ctx, `run:${safe.code}:${safe.status ?? ""}`, `${auth.text} Judgments will fail until the key is fixed.`);
|
|
143
|
+
}
|
|
144
|
+
else if (safe.code === "configuration") {
|
|
145
|
+
callOut(ctx, `run:configuration`, `${safe.message} Judgments will fail until that is fixed.`);
|
|
142
146
|
}
|
|
143
147
|
throw safe;
|
|
144
148
|
}
|
|
@@ -205,7 +209,7 @@ export default function typesafeExtension(pi) {
|
|
|
205
209
|
// one that names none, otherwise by the consent sentence itself. An unusable name sends nothing, so that
|
|
206
210
|
// status names no model and quotes no consent.
|
|
207
211
|
const route = backendError !== undefined
|
|
208
|
-
? `Backend: ${BACKEND_ENV} is invalid — ${backendError} Judgments
|
|
212
|
+
? `Backend: ${BACKEND_ENV} is invalid — ${backendError} Judgments will fail.`
|
|
209
213
|
: backendLine(backend);
|
|
210
214
|
const version = backendError === undefined && !consent.namesModel ? `Model: ${sentModelId(backend, model)}.` : "";
|
|
211
215
|
report([
|
|
@@ -311,7 +315,7 @@ export default function typesafeExtension(pi) {
|
|
|
311
315
|
pi.appendEntry("typesafe-result", result);
|
|
312
316
|
}
|
|
313
317
|
catch (error) {
|
|
314
|
-
report(safeError(error).message, "error");
|
|
318
|
+
report(safeError(error, backend).message, "error");
|
|
315
319
|
}
|
|
316
320
|
},
|
|
317
321
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-typesafe",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "TypeSafe AI (Jev) decisions for Pi: batched Choice/Score/Noul evaluation tool, terminal playground, and a typed API other extensions build on.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@herbertgao/pi-extensions",
|
|
3
|
-
"version": "2026.11.
|
|
3
|
+
"version": "2026.11.2",
|
|
4
4
|
"description": "Aggregate installer for HerbertGao-maintained Pi extensions.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"extensions",
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"files": [
|
|
23
23
|
"README.md",
|
|
24
|
+
"CHANGELOG.md",
|
|
24
25
|
"LICENSE",
|
|
25
26
|
"THIRD_PARTY_NOTICES.md",
|
|
26
27
|
"extensions"
|
|
@@ -38,12 +39,12 @@
|
|
|
38
39
|
"@ast-grep/cli": "0.51.0",
|
|
39
40
|
"@ast-grep/napi": "^0.51.0",
|
|
40
41
|
"@dietrichgebert/ponytail": "5.3.3",
|
|
41
|
-
"@herbertgao/pi-agency": "0.1.
|
|
42
|
-
"@herbertgao/pi-bark": "0.2.
|
|
43
|
-
"@herbertgao/pi-cc-extensions": "1.0.
|
|
44
|
-
"@herbertgao/pi-impeccable": "0.1.
|
|
45
|
-
"@herbertgao/pi-subagents": "0.
|
|
46
|
-
"@herbertgao/sol-pi": "0.4.
|
|
42
|
+
"@herbertgao/pi-agency": "0.1.3",
|
|
43
|
+
"@herbertgao/pi-bark": "0.2.2",
|
|
44
|
+
"@herbertgao/pi-cc-extensions": "1.0.13-local.1",
|
|
45
|
+
"@herbertgao/pi-impeccable": "0.1.1",
|
|
46
|
+
"@herbertgao/pi-subagents": "0.23.0-local.1",
|
|
47
|
+
"@herbertgao/sol-pi": "0.4.3",
|
|
47
48
|
"@juicesharp/rpiv-ask-user-question": "2.15.0",
|
|
48
49
|
"@juicesharp/rpiv-config": "^2.15.0",
|
|
49
50
|
"@modelcontextprotocol/sdk": "^1.32.1",
|
|
@@ -75,8 +76,8 @@
|
|
|
75
76
|
"pi-commandcode-provider": "0.7.11",
|
|
76
77
|
"pi-lens": "4.4.8",
|
|
77
78
|
"pi-next-cue": "1.0.8",
|
|
78
|
-
"pi-provider-qoder": "0.6.
|
|
79
|
-
"pi-typesafe": "0.
|
|
79
|
+
"pi-provider-qoder": "0.6.10",
|
|
80
|
+
"pi-typesafe": "0.14.0",
|
|
80
81
|
"pi-web-access": "0.46.0",
|
|
81
82
|
"pidusage": "^4.0.1",
|
|
82
83
|
"promise.try": "^2.0.1",
|