@oh-my-pi/pi-catalog 18.1.8 → 18.1.10
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 +14 -0
- package/dist/types/compat/axes.d.ts +8 -0
- package/dist/types/compat/delegation.d.ts +19 -0
- package/dist/types/compat/types.d.ts +4 -2
- package/package.json +4 -4
- package/src/compat/axes.ts +10 -0
- package/src/compat/delegation.ts +37 -0
- package/src/compat/rules/README.md +1 -1
- package/src/compat/rules/auth/zai-coding-plan.kdl +7 -3
- package/src/compat/rules/classes/openai.kdl +10 -0
- package/src/compat/rules.json +52 -14
- package/src/compat/types.ts +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [18.1.9] - 2026-09-04
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Added the `delegation-bias` capability for tuning how agents delegate work to subagents.
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- Adjusted subagent delegation for GPT-6 and newer OpenAI models to reduce unnecessary delegation.
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- Fixed `/login zai` for Z.AI GLM Coding Plan by supporting the provider’s updated authentication flow, including local desktop sign-in, remote paste-code completion, and the configurable `ZAI_OAUTH_REDIRECT_URI`.
|
|
18
|
+
|
|
5
19
|
## [18.1.8] - 2026-09-03
|
|
6
20
|
|
|
7
21
|
### Added
|
|
@@ -36,6 +36,14 @@ export interface AxisDef {
|
|
|
36
36
|
}
|
|
37
37
|
/** Effort tiers accepted by taxonomy collapse/override vocabulary (`Effort` ∪ `"off"`). */
|
|
38
38
|
export declare const EFFORT_TIERS: readonly string[];
|
|
39
|
+
/**
|
|
40
|
+
* How hard agent prompts push subagent delegation for a model lineage
|
|
41
|
+
* (`delegation-bias` axis). `eager` is the unassigned default: the prompt
|
|
42
|
+
* actively pushes fan-out. `restrained` keeps fan-out for genuinely parallel
|
|
43
|
+
* slices but forbids reflexive scouts and single-agent babysitting. `gated`
|
|
44
|
+
* forbids subagents unless the user or a skill asks.
|
|
45
|
+
*/
|
|
46
|
+
export declare const DELEGATION_BIASES: readonly ["eager", "restrained", "gated"];
|
|
39
47
|
/** Narrow a KDL string to an effort tier (`Effort` ∪ `"off"`). */
|
|
40
48
|
export declare function isEffortTier(value: string): value is Effort | "off";
|
|
41
49
|
/** Narrow a KDL string to a thinking control mode. */
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Delegation bias: how hard the coding agent's prompts push subagent
|
|
3
|
+
* delegation for a model lineage. Authored on the `delegation-bias` catalog
|
|
4
|
+
* axis in `rules/classes/*.kdl` so appetite corrections live beside the other
|
|
5
|
+
* lineage truths instead of as revision compares in TypeScript.
|
|
6
|
+
*
|
|
7
|
+
* Resolved through the cascade at prompt-build time (session start, model
|
|
8
|
+
* switch) rather than baked onto `Model`: bundled rows are frozen by the
|
|
9
|
+
* generator, and the bias is read once per prompt rebuild, not per request.
|
|
10
|
+
*/
|
|
11
|
+
import type { Model } from "../types.js";
|
|
12
|
+
import { DELEGATION_BIASES } from "./axes.js";
|
|
13
|
+
/** One of `DELEGATION_BIASES`; see that constant for the semantics of each tier. */
|
|
14
|
+
export type DelegationBias = (typeof DELEGATION_BIASES)[number];
|
|
15
|
+
/**
|
|
16
|
+
* Delegation bias for a built model; `eager` when no rule assigns one.
|
|
17
|
+
* Callers: system-prompt and tool-description rendering in the coding agent.
|
|
18
|
+
*/
|
|
19
|
+
export declare function resolveDelegationBias(model: Model): DelegationBias;
|
|
@@ -407,7 +407,7 @@ export interface CompiledOAuthRequest {
|
|
|
407
407
|
headers: Record<string, string>;
|
|
408
408
|
timeoutMs?: number;
|
|
409
409
|
}
|
|
410
|
-
/**
|
|
410
|
+
/** Callback transport configuration for authorization-code logins. */
|
|
411
411
|
export interface CompiledCallback {
|
|
412
412
|
port: number;
|
|
413
413
|
path: string;
|
|
@@ -415,8 +415,10 @@ export interface CompiledCallback {
|
|
|
415
415
|
redirectUri?: CompiledAuthValue;
|
|
416
416
|
portFallback: boolean;
|
|
417
417
|
manualOnly: boolean;
|
|
418
|
+
/** Temporarily receive a custom-scheme redirect through the native OS handler. */
|
|
419
|
+
nativeScheme: boolean;
|
|
418
420
|
}
|
|
419
|
-
/** Authorization-code login through
|
|
421
|
+
/** Authorization-code login through a loopback, native-scheme, or manual callback. */
|
|
420
422
|
export interface CompiledOAuthCodeLogin {
|
|
421
423
|
kind: "oauth-code";
|
|
422
424
|
clientId?: CompiledAuthValue;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@oh-my-pi/pi-catalog",
|
|
4
|
-
"version": "18.1.
|
|
4
|
+
"version": "18.1.10",
|
|
5
5
|
"description": "Model catalog for omp: bundled model database, provider discovery descriptors, model identity, classification, and equivalence",
|
|
6
6
|
"homepage": "https://omp.sh",
|
|
7
7
|
"author": "Stencil Labs, Inc.",
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
"gen:proto": "bun scripts/generate-protocols.ts"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@oh-my-pi/omptype": "18.1.
|
|
39
|
-
"@oh-my-pi/pi-utils": "18.1.
|
|
38
|
+
"@oh-my-pi/omptype": "18.1.10",
|
|
39
|
+
"@oh-my-pi/pi-utils": "18.1.10"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@bgotink/kdl": "0.4.0",
|
|
43
|
-
"@oh-my-pi/pi-ai": "18.1.
|
|
43
|
+
"@oh-my-pi/pi-ai": "18.1.10",
|
|
44
44
|
"@types/bun": "^1.3.14"
|
|
45
45
|
},
|
|
46
46
|
"engines": {
|
package/src/compat/axes.ts
CHANGED
|
@@ -44,6 +44,15 @@ const EFFORTS = ["minimal", "low", "medium", "high", "xhigh", "max"] as const;
|
|
|
44
44
|
|
|
45
45
|
/** Effort tiers accepted by taxonomy collapse/override vocabulary (`Effort` ∪ `"off"`). */
|
|
46
46
|
export const EFFORT_TIERS: readonly string[] = [...EFFORTS, "off"];
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* How hard agent prompts push subagent delegation for a model lineage
|
|
50
|
+
* (`delegation-bias` axis). `eager` is the unassigned default: the prompt
|
|
51
|
+
* actively pushes fan-out. `restrained` keeps fan-out for genuinely parallel
|
|
52
|
+
* slices but forbids reflexive scouts and single-agent babysitting. `gated`
|
|
53
|
+
* forbids subagents unless the user or a skill asks.
|
|
54
|
+
*/
|
|
55
|
+
export const DELEGATION_BIASES = ["eager", "restrained", "gated"] as const;
|
|
47
56
|
const THINKING_MODES = [
|
|
48
57
|
"effort",
|
|
49
58
|
"budget",
|
|
@@ -261,6 +270,7 @@ export const AXES: Readonly<Record<string, AxisDef>> = {
|
|
|
261
270
|
"context-promotion-target": { key: "contextPromotionTarget", set: "catalog", shape: "scalar" },
|
|
262
271
|
"context-window-floor": { key: "contextWindowFloor", set: "catalog", shape: "scalar" },
|
|
263
272
|
"cost-patch": { key: "costPatch", set: "catalog", shape: "object" },
|
|
273
|
+
"delegation-bias": { key: "delegationBias", set: "catalog", shape: "scalar", values: DELEGATION_BIASES },
|
|
264
274
|
"edit-revision": { key: "editRevision", set: "catalog", shape: "scalar" },
|
|
265
275
|
"input-modalities": { key: "inputModalities", set: "catalog", shape: "array", values: ["text", "image"] },
|
|
266
276
|
"limits-patch": { key: "limitsPatch", set: "catalog", shape: "object" },
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Delegation bias: how hard the coding agent's prompts push subagent
|
|
3
|
+
* delegation for a model lineage. Authored on the `delegation-bias` catalog
|
|
4
|
+
* axis in `rules/classes/*.kdl` so appetite corrections live beside the other
|
|
5
|
+
* lineage truths instead of as revision compares in TypeScript.
|
|
6
|
+
*
|
|
7
|
+
* Resolved through the cascade at prompt-build time (session start, model
|
|
8
|
+
* switch) rather than baked onto `Model`: bundled rows are frozen by the
|
|
9
|
+
* generator, and the bias is read once per prompt rebuild, not per request.
|
|
10
|
+
*/
|
|
11
|
+
import type { Model } from "../types";
|
|
12
|
+
import { DELEGATION_BIASES } from "./axes";
|
|
13
|
+
import { resolveCascade } from "./cascade";
|
|
14
|
+
|
|
15
|
+
/** One of `DELEGATION_BIASES`; see that constant for the semantics of each tier. */
|
|
16
|
+
export type DelegationBias = (typeof DELEGATION_BIASES)[number];
|
|
17
|
+
|
|
18
|
+
function isDelegationBias(value: unknown): value is DelegationBias {
|
|
19
|
+
return typeof value === "string" && (DELEGATION_BIASES as readonly string[]).includes(value);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Delegation bias for a built model; `eager` when no rule assigns one.
|
|
24
|
+
* Callers: system-prompt and tool-description rendering in the coding agent.
|
|
25
|
+
*/
|
|
26
|
+
export function resolveDelegationBias(model: Model): DelegationBias {
|
|
27
|
+
const { identity } = model;
|
|
28
|
+
const bias = resolveCascade({
|
|
29
|
+
provider: model.provider,
|
|
30
|
+
class: identity.class,
|
|
31
|
+
model: model.id,
|
|
32
|
+
reasoning: Boolean(model.reasoning),
|
|
33
|
+
...(identity.family !== undefined && { family: identity.family }),
|
|
34
|
+
...(identity.revision !== undefined && { revision: identity.revision }),
|
|
35
|
+
}).catalog.delegationBias;
|
|
36
|
+
return isDelegationBias(bias) ? bias : "eager";
|
|
37
|
+
}
|
|
@@ -271,7 +271,7 @@ auth "anthropic" {
|
|
|
271
271
|
state "hex" // hex | uuid | none
|
|
272
272
|
authorize-params { code "true" } // standard=#false drops client_id/response_type/redirect_uri/scope/PKCE/state
|
|
273
273
|
instructions "Complete login in your browser…"
|
|
274
|
-
callback port=54545 path="/callback" hostname="localhost" redirect-uri="…" redirect-uri-env="VAR" port-fallback=#true manual-only=#false
|
|
274
|
+
callback port=54545 path="/callback" hostname="localhost" redirect-uri="…" redirect-uri-env="VAR" port-fallback=#true manual-only=#false native-scheme=#false
|
|
275
275
|
token url="https://api.anthropic.com/v1/oauth/token" body="json" { params { state "{state}" } headers { X "y" } }
|
|
276
276
|
credential {
|
|
277
277
|
access "access_token" // dot path; `claim="a|b"` reads JWT claims; `literal="…"` pins a value
|
|
@@ -4,9 +4,13 @@ auth "zai-coding-plan" {
|
|
|
4
4
|
client-id "client_P8X5CMWmlaRO9gyO-KSqtg" env="ZAI_OAUTH_CLIENT_ID"
|
|
5
5
|
authorize-url "https://chat.z.ai/api/oauth/authorize" env="ZAI_OAUTH_AUTHORIZE_URL"
|
|
6
6
|
// No PKCE: matches ZCode's authorize request verbatim.
|
|
7
|
-
//
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
// Z.AI's server-side allowlist now rejects every loopback redirect_uri for
|
|
8
|
+
// this client (#10745); only ZCode's desktop scheme still validates. On a
|
|
9
|
+
// supported local desktop, temporarily receive that scheme and restore its
|
|
10
|
+
// previous handler. Remote and unsupported sessions retain manual input.
|
|
11
|
+
// `redirect-uri-env` lets users adapt to further allowlist shifts without a release.
|
|
12
|
+
callback port=0 redirect-uri="zcode://zai-auth/callback" redirect-uri-env="ZAI_OAUTH_REDIRECT_URI" manual-only=#true native-scheme=#true
|
|
13
|
+
instructions "Complete Z.ai login in your browser. On supported local desktops, omp captures the zcode:// callback and restores its previous handler automatically. You can also paste the final redirect URL or authorization code when prompted."
|
|
10
14
|
token url="https://zcode.z.ai/api/v1/oauth/token" url-env="ZAI_OAUTH_TOKEN_URL" body="json" standard=#false {
|
|
11
15
|
params {
|
|
12
16
|
provider "zai"
|
|
@@ -30,6 +30,16 @@ class "openai" {
|
|
|
30
30
|
thinking-efforts "low" "medium" "high" "xhigh" "max"
|
|
31
31
|
requires-reasoning-off-juice-instruction #true
|
|
32
32
|
}
|
|
33
|
+
// Delegation appetite is a lineage trait. GPT-5.6 was trained on Codex's
|
|
34
|
+
// "no subagents unless asked" developer message; GPT-6 fans out on its own
|
|
35
|
+
// and over-delegates under Claude-calibrated prompts (reflexive scouts,
|
|
36
|
+
// single-agent babysitting), so it gets the restrained tier instead.
|
|
37
|
+
revision "=5.6" {
|
|
38
|
+
delegation-bias "gated"
|
|
39
|
+
}
|
|
40
|
+
revision ">=6" {
|
|
41
|
+
delegation-bias "restrained"
|
|
42
|
+
}
|
|
33
43
|
// GPT-6 Astra changes reasoning effort mid-conversation through a
|
|
34
44
|
// `configuration_update` input item so the request-level effort (and the
|
|
35
45
|
// cached prompt prefix) stays put; every other SKU 400s on the item type.
|
package/src/compat/rules.json
CHANGED
|
@@ -6224,7 +6224,33 @@
|
|
|
6224
6224
|
}
|
|
6225
6225
|
},
|
|
6226
6226
|
{
|
|
6227
|
-
"source": "classes/openai.kdl:
|
|
6227
|
+
"source": "classes/openai.kdl:37",
|
|
6228
|
+
"class": "openai",
|
|
6229
|
+
"revision": [
|
|
6230
|
+
{
|
|
6231
|
+
"op": "=",
|
|
6232
|
+
"revision": "5.6.0"
|
|
6233
|
+
}
|
|
6234
|
+
],
|
|
6235
|
+
"catalog": {
|
|
6236
|
+
"delegationBias": "gated"
|
|
6237
|
+
}
|
|
6238
|
+
},
|
|
6239
|
+
{
|
|
6240
|
+
"source": "classes/openai.kdl:40",
|
|
6241
|
+
"class": "openai",
|
|
6242
|
+
"revision": [
|
|
6243
|
+
{
|
|
6244
|
+
"op": ">=",
|
|
6245
|
+
"revision": "6.0.0"
|
|
6246
|
+
}
|
|
6247
|
+
],
|
|
6248
|
+
"catalog": {
|
|
6249
|
+
"delegationBias": "restrained"
|
|
6250
|
+
}
|
|
6251
|
+
},
|
|
6252
|
+
{
|
|
6253
|
+
"source": "classes/openai.kdl:46",
|
|
6228
6254
|
"class": "openai",
|
|
6229
6255
|
"models": [
|
|
6230
6256
|
{
|
|
@@ -6237,7 +6263,7 @@
|
|
|
6237
6263
|
}
|
|
6238
6264
|
},
|
|
6239
6265
|
{
|
|
6240
|
-
"source": "classes/openai.kdl:
|
|
6266
|
+
"source": "classes/openai.kdl:52",
|
|
6241
6267
|
"class": "openai",
|
|
6242
6268
|
"family": "codex",
|
|
6243
6269
|
"revision": [
|
|
@@ -14947,6 +14973,7 @@
|
|
|
14947
14973
|
"hostname": "localhost",
|
|
14948
14974
|
"portFallback": false,
|
|
14949
14975
|
"manualOnly": false,
|
|
14976
|
+
"nativeScheme": false,
|
|
14950
14977
|
"redirectUri": {
|
|
14951
14978
|
"value": "http://localhost:1455/auth/callback"
|
|
14952
14979
|
}
|
|
@@ -15044,7 +15071,8 @@
|
|
|
15044
15071
|
"path": "/callback",
|
|
15045
15072
|
"hostname": "localhost",
|
|
15046
15073
|
"portFallback": true,
|
|
15047
|
-
"manualOnly": false
|
|
15074
|
+
"manualOnly": false,
|
|
15075
|
+
"nativeScheme": false
|
|
15048
15076
|
},
|
|
15049
15077
|
"token": {
|
|
15050
15078
|
"url": {
|
|
@@ -15166,16 +15194,20 @@
|
|
|
15166
15194
|
]
|
|
15167
15195
|
},
|
|
15168
15196
|
"callback": {
|
|
15169
|
-
"port":
|
|
15197
|
+
"port": 0,
|
|
15170
15198
|
"path": "/callback",
|
|
15171
|
-
"hostname": "
|
|
15172
|
-
"portFallback":
|
|
15173
|
-
"manualOnly":
|
|
15199
|
+
"hostname": "localhost",
|
|
15200
|
+
"portFallback": true,
|
|
15201
|
+
"manualOnly": true,
|
|
15202
|
+
"nativeScheme": true,
|
|
15174
15203
|
"redirectUri": {
|
|
15175
|
-
"value": "
|
|
15204
|
+
"value": "zcode://zai-auth/callback",
|
|
15205
|
+
"env": [
|
|
15206
|
+
"ZAI_OAUTH_REDIRECT_URI"
|
|
15207
|
+
]
|
|
15176
15208
|
}
|
|
15177
15209
|
},
|
|
15178
|
-
"instructions": "Complete Z.ai login in your browser.
|
|
15210
|
+
"instructions": "Complete Z.ai login in your browser. On supported local desktops, omp captures the zcode:// callback and restores its previous handler automatically. You can also paste the final redirect URL or authorization code when prompted.",
|
|
15179
15211
|
"token": {
|
|
15180
15212
|
"url": {
|
|
15181
15213
|
"value": "https://zcode.z.ai/api/v1/oauth/token",
|
|
@@ -15216,7 +15248,7 @@
|
|
|
15216
15248
|
"refresh": {
|
|
15217
15249
|
"kind": "none"
|
|
15218
15250
|
},
|
|
15219
|
-
"callbackPort":
|
|
15251
|
+
"callbackPort": 0,
|
|
15220
15252
|
"pasteCode": true
|
|
15221
15253
|
},
|
|
15222
15254
|
{
|
|
@@ -15343,7 +15375,8 @@
|
|
|
15343
15375
|
"path": "/callback",
|
|
15344
15376
|
"hostname": "localhost",
|
|
15345
15377
|
"portFallback": true,
|
|
15346
|
-
"manualOnly": false
|
|
15378
|
+
"manualOnly": false,
|
|
15379
|
+
"nativeScheme": false
|
|
15347
15380
|
},
|
|
15348
15381
|
"token": {
|
|
15349
15382
|
"url": {
|
|
@@ -15430,7 +15463,8 @@
|
|
|
15430
15463
|
"path": "/callback",
|
|
15431
15464
|
"hostname": "127.0.0.1",
|
|
15432
15465
|
"portFallback": true,
|
|
15433
|
-
"manualOnly": false
|
|
15466
|
+
"manualOnly": false,
|
|
15467
|
+
"nativeScheme": false
|
|
15434
15468
|
},
|
|
15435
15469
|
"token": {
|
|
15436
15470
|
"url": {
|
|
@@ -15510,7 +15544,8 @@
|
|
|
15510
15544
|
"path": "/oauth-callback",
|
|
15511
15545
|
"hostname": "127.0.0.1",
|
|
15512
15546
|
"portFallback": true,
|
|
15513
|
-
"manualOnly": false
|
|
15547
|
+
"manualOnly": false,
|
|
15548
|
+
"nativeScheme": false
|
|
15514
15549
|
},
|
|
15515
15550
|
"token": {
|
|
15516
15551
|
"url": {
|
|
@@ -15608,7 +15643,8 @@
|
|
|
15608
15643
|
"path": "/oauth2callback",
|
|
15609
15644
|
"hostname": "127.0.0.1",
|
|
15610
15645
|
"portFallback": true,
|
|
15611
|
-
"manualOnly": false
|
|
15646
|
+
"manualOnly": false,
|
|
15647
|
+
"nativeScheme": false
|
|
15612
15648
|
},
|
|
15613
15649
|
"token": {
|
|
15614
15650
|
"url": {
|
|
@@ -15874,6 +15910,7 @@
|
|
|
15874
15910
|
"hostname": "localhost",
|
|
15875
15911
|
"portFallback": true,
|
|
15876
15912
|
"manualOnly": false,
|
|
15913
|
+
"nativeScheme": false,
|
|
15877
15914
|
"redirectUri": {
|
|
15878
15915
|
"env": [
|
|
15879
15916
|
"GITLAB_REDIRECT_URI"
|
|
@@ -15968,6 +16005,7 @@
|
|
|
15968
16005
|
"hostname": "localhost",
|
|
15969
16006
|
"portFallback": true,
|
|
15970
16007
|
"manualOnly": true,
|
|
16008
|
+
"nativeScheme": false,
|
|
15971
16009
|
"redirectUri": {
|
|
15972
16010
|
"value": "vscode://gitlab.gitlab-workflow/authentication"
|
|
15973
16011
|
}
|
package/src/compat/types.ts
CHANGED
|
@@ -422,7 +422,7 @@ export interface CompiledOAuthRequest {
|
|
|
422
422
|
timeoutMs?: number;
|
|
423
423
|
}
|
|
424
424
|
|
|
425
|
-
/**
|
|
425
|
+
/** Callback transport configuration for authorization-code logins. */
|
|
426
426
|
export interface CompiledCallback {
|
|
427
427
|
port: number;
|
|
428
428
|
path: string;
|
|
@@ -430,9 +430,11 @@ export interface CompiledCallback {
|
|
|
430
430
|
redirectUri?: CompiledAuthValue;
|
|
431
431
|
portFallback: boolean;
|
|
432
432
|
manualOnly: boolean;
|
|
433
|
+
/** Temporarily receive a custom-scheme redirect through the native OS handler. */
|
|
434
|
+
nativeScheme: boolean;
|
|
433
435
|
}
|
|
434
436
|
|
|
435
|
-
/** Authorization-code login through
|
|
437
|
+
/** Authorization-code login through a loopback, native-scheme, or manual callback. */
|
|
436
438
|
export interface CompiledOAuthCodeLogin {
|
|
437
439
|
kind: "oauth-code";
|
|
438
440
|
clientId?: CompiledAuthValue;
|