@linxiraos/pi-catalog 1.1.8 → 1.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 +2 -3
- package/package.json +96 -102
- package/src/compat/axes.ts +11 -0
- package/src/compat/delegation.ts +37 -0
- package/src/compat/resolve.ts +2 -0
- package/src/compat/rules/README.md +5 -5
- package/src/compat/rules/auth/openai-codex.kdl +1 -1
- package/src/compat/rules/auth/zai-coding-plan.kdl +7 -3
- package/src/compat/rules/classes/openai.kdl +16 -0
- package/src/compat/rules/providers/openai-codex.kdl +2 -2
- package/src/compat/rules/providers/openai.kdl +1 -1
- package/src/compat/rules.json +67 -16
- package/src/compat/types.ts +4 -2
- package/src/discovery/codex.ts +10 -0
- package/src/identity/metrics.ts +165 -0
- package/src/identity/reference.ts +7 -1
- package/src/model-manager.ts +15 -2
- package/src/models.json +4861 -382
- package/src/provider-models/openai-compat.ts +4 -0
- package/src/provider-models/special.ts +25 -10
- package/src/types.ts +17 -0
- package/src/wire/codex.ts +23 -2
- package/THIRD-PARTY-NOTICES.txt +0 -22909
- package/dist/types/build.d.ts +0 -24
- package/dist/types/cline-pass-model-id.d.ts +0 -4
- package/dist/types/compat/anthropic.d.ts +0 -24
- package/dist/types/compat/apply.d.ts +0 -7
- package/dist/types/compat/auth-ids.d.ts +0 -4
- package/dist/types/compat/auth.d.ts +0 -7
- package/dist/types/compat/axes.d.ts +0 -50
- package/dist/types/compat/behavior.d.ts +0 -69
- package/dist/types/compat/cascade.d.ts +0 -37
- package/dist/types/compat/collapse.d.ts +0 -171
- package/dist/types/compat/openai.d.ts +0 -9
- package/dist/types/compat/resolve.d.ts +0 -15
- package/dist/types/compat/revision.d.ts +0 -41
- package/dist/types/compat/taxonomy.d.ts +0 -93
- package/dist/types/compat/types.d.ts +0 -565
- package/dist/types/discovery/antigravity.d.ts +0 -70
- package/dist/types/discovery/codex.d.ts +0 -36
- package/dist/types/discovery/cursor-proto.d.ts +0 -5368
- package/dist/types/discovery/cursor.d.ts +0 -31
- package/dist/types/discovery/devin-proto.d.ts +0 -1912
- package/dist/types/discovery/devin.d.ts +0 -24
- package/dist/types/discovery/gemini-cli.d.ts +0 -33
- package/dist/types/discovery/gemini.d.ts +0 -25
- package/dist/types/discovery/gitlab-duo-workflow.d.ts +0 -30
- package/dist/types/discovery/index.d.ts +0 -7
- package/dist/types/discovery/openai-compatible.d.ts +0 -89
- package/dist/types/discovery/protobuf.d.ts +0 -102
- package/dist/types/effort.d.ts +0 -10
- package/dist/types/fireworks-model-id.d.ts +0 -23
- package/dist/types/hosts.d.ts +0 -169
- package/dist/types/identity/bundled.d.ts +0 -3
- package/dist/types/identity/dialect.d.ts +0 -3
- package/dist/types/identity/id.d.ts +0 -13
- package/dist/types/identity/index.d.ts +0 -8
- package/dist/types/identity/priority.d.ts +0 -1
- package/dist/types/identity/reference.d.ts +0 -19
- package/dist/types/index.d.ts +0 -19
- package/dist/types/model-cache.d.ts +0 -23
- package/dist/types/model-manager.d.ts +0 -93
- package/dist/types/model-thinking.d.ts +0 -63
- package/dist/types/model-tokenizer.d.ts +0 -8
- package/dist/types/models.d.ts +0 -17
- package/dist/types/provider-models/bundled-references.d.ts +0 -13
- package/dist/types/provider-models/cache-provider-id.d.ts +0 -11
- package/dist/types/provider-models/cline-pass.d.ts +0 -22
- package/dist/types/provider-models/descriptor-types.d.ts +0 -76
- package/dist/types/provider-models/descriptors.d.ts +0 -543
- package/dist/types/provider-models/google.d.ts +0 -29
- package/dist/types/provider-models/index.d.ts +0 -7
- package/dist/types/provider-models/models-dev-policies.d.ts +0 -9
- package/dist/types/provider-models/ollama.d.ts +0 -22
- package/dist/types/provider-models/openai-compat.d.ts +0 -716
- package/dist/types/provider-models/special.d.ts +0 -74
- package/dist/types/types.d.ts +0 -1043
- package/dist/types/utils.d.ts +0 -20
- package/dist/types/wire/alibaba-token-plan.d.ts +0 -22
- package/dist/types/wire/cline-pass.d.ts +0 -21
- package/dist/types/wire/cloudflare-ai-gateway.d.ts +0 -18
- package/dist/types/wire/codex.d.ts +0 -66
- package/dist/types/wire/coreweave.d.ts +0 -12
- package/dist/types/wire/devin-proto.d.ts +0 -14
- package/dist/types/wire/devin.d.ts +0 -36
- package/dist/types/wire/gemini-headers.d.ts +0 -62
- package/dist/types/wire/github-copilot.d.ts +0 -66
- package/dist/types/wire/image-fetchers.d.ts +0 -76
package/CHANGELOG.md
CHANGED
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
-
## [1.1.
|
|
5
|
+
## [1.1.9] - 2026-09-05
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
- Restored the biome toolchain for catalog scripts after the v18.1.5 merge briefly adopted the upstream oxlint/oxfmt configuration.
|
|
7
|
+
- v18.1.10 sync baseline; retired pi-hashline catalog entry removed from the version-line catalogs.
|
|
9
8
|
|
|
10
9
|
## [1.1.6] - 2026-08-30
|
|
11
10
|
|
package/package.json
CHANGED
|
@@ -1,104 +1,98 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
"./*": {
|
|
99
|
-
"types": "./dist/types/*.d.ts",
|
|
100
|
-
"import": "./src/*.ts"
|
|
101
|
-
},
|
|
102
|
-
"./*.js": "./src/*.ts"
|
|
103
|
-
}
|
|
2
|
+
"exports": {
|
|
3
|
+
"./*.js": "./src/*.ts",
|
|
4
|
+
"./*": {
|
|
5
|
+
"import": "./src/*.ts",
|
|
6
|
+
"types": "./src/*.ts"
|
|
7
|
+
},
|
|
8
|
+
"./compat/*": {
|
|
9
|
+
"import": "./src/compat/*.ts",
|
|
10
|
+
"types": "./src/compat/*.ts"
|
|
11
|
+
},
|
|
12
|
+
"./wire/*": {
|
|
13
|
+
"import": "./src/wire/*.ts",
|
|
14
|
+
"types": "./src/wire/*.ts"
|
|
15
|
+
},
|
|
16
|
+
"./identity/*": {
|
|
17
|
+
"import": "./src/identity/*.ts",
|
|
18
|
+
"types": "./src/identity/*.ts"
|
|
19
|
+
},
|
|
20
|
+
"./identity": {
|
|
21
|
+
"import": "./src/identity/index.ts",
|
|
22
|
+
"types": "./src/identity/index.ts"
|
|
23
|
+
},
|
|
24
|
+
"./discovery/*": {
|
|
25
|
+
"import": "./src/discovery/*.ts",
|
|
26
|
+
"types": "./src/discovery/*.ts"
|
|
27
|
+
},
|
|
28
|
+
"./discovery": {
|
|
29
|
+
"import": "./src/discovery/index.ts",
|
|
30
|
+
"types": "./src/discovery/index.ts"
|
|
31
|
+
},
|
|
32
|
+
"./provider-models/*": {
|
|
33
|
+
"import": "./src/provider-models/*.ts",
|
|
34
|
+
"types": "./src/provider-models/*.ts"
|
|
35
|
+
},
|
|
36
|
+
"./provider-models": {
|
|
37
|
+
"import": "./src/provider-models/index.ts",
|
|
38
|
+
"types": "./src/provider-models/index.ts"
|
|
39
|
+
},
|
|
40
|
+
"./models.json": {
|
|
41
|
+
"import": "./src/models.json",
|
|
42
|
+
"types": "./src/models.json.d.ts"
|
|
43
|
+
},
|
|
44
|
+
".": {
|
|
45
|
+
"import": "./src/index.ts",
|
|
46
|
+
"types": "./src/index.ts"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"files": [
|
|
50
|
+
"src",
|
|
51
|
+
"README.md",
|
|
52
|
+
"CHANGELOG.md"
|
|
53
|
+
],
|
|
54
|
+
"engines": {
|
|
55
|
+
"bun": ">=1.3.14"
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"@linxiraos/pi-ai": "1.1.9",
|
|
59
|
+
"@types/bun": "^1.3.14",
|
|
60
|
+
"@bgotink/kdl": "0.4.0"
|
|
61
|
+
},
|
|
62
|
+
"dependencies": {
|
|
63
|
+
"@linxiraos/pi-utils": "1.1.9",
|
|
64
|
+
"@linxiraos/pi-omptype": "1.1.9"
|
|
65
|
+
},
|
|
66
|
+
"scripts": {
|
|
67
|
+
"gen:proto": "bun scripts/generate-protocols.ts",
|
|
68
|
+
"gen:compat": "bun scripts/compile-compat.ts",
|
|
69
|
+
"gen:models": "bun scripts/generate-models.ts",
|
|
70
|
+
"test": "bun test --parallel",
|
|
71
|
+
"check:types": "tsgo -p tsconfig.json --noEmit",
|
|
72
|
+
"check": "tsgo -p tsconfig.json --noEmit"
|
|
73
|
+
},
|
|
74
|
+
"types": "./src/index.ts",
|
|
75
|
+
"main": "./src/index.ts",
|
|
76
|
+
"keywords": [
|
|
77
|
+
"ai",
|
|
78
|
+
"llm",
|
|
79
|
+
"models",
|
|
80
|
+
"catalog",
|
|
81
|
+
"discovery"
|
|
82
|
+
],
|
|
83
|
+
"bugs": {
|
|
84
|
+
"url": "https://github.com/Linxira-OS/linxira-zeta/issues"
|
|
85
|
+
},
|
|
86
|
+
"repository": {
|
|
87
|
+
"directory": "packages/catalog",
|
|
88
|
+
"url": "git+https://github.com/Linxira-OS/linxira-zeta.git",
|
|
89
|
+
"type": "git"
|
|
90
|
+
},
|
|
91
|
+
"license": "MIT",
|
|
92
|
+
"author": "Can Boluk",
|
|
93
|
+
"homepage": "https://linxira-os.github.io/zeta/",
|
|
94
|
+
"description": "Model catalog for omp: bundled model database, provider discovery descriptors, model identity, classification, and equivalence",
|
|
95
|
+
"version": "1.1.9",
|
|
96
|
+
"name": "@linxiraos/pi-catalog",
|
|
97
|
+
"type": "module"
|
|
104
98
|
}
|
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",
|
|
@@ -128,6 +137,7 @@ export const AXES: Readonly<Record<string, AxisDef>> = {
|
|
|
128
137
|
"strict-responses-pairing": wire("strictResponsesPairing", ["openai-responses"]),
|
|
129
138
|
"requires-reasoning-off-juice-instruction": wire("requiresReasoningOffJuiceInstruction", ["openai-responses"]),
|
|
130
139
|
"supports-all-turns-reasoning-context": wire("supportsAllTurnsReasoningContext", ["openai-responses"]),
|
|
140
|
+
"supports-configuration-update": wire("supportsConfigurationUpdate", ["openai-responses"]),
|
|
131
141
|
"strip-deepseek-special-tokens": wire("stripDeepseekSpecialTokens", OAI),
|
|
132
142
|
"stream-markup-healing-pattern": wire("streamMarkupHealingPattern", OAI, "scalar", [
|
|
133
143
|
"kimi",
|
|
@@ -260,6 +270,7 @@ export const AXES: Readonly<Record<string, AxisDef>> = {
|
|
|
260
270
|
"context-promotion-target": { key: "contextPromotionTarget", set: "catalog", shape: "scalar" },
|
|
261
271
|
"context-window-floor": { key: "contextWindowFloor", set: "catalog", shape: "scalar" },
|
|
262
272
|
"cost-patch": { key: "costPatch", set: "catalog", shape: "object" },
|
|
273
|
+
"delegation-bias": { key: "delegationBias", set: "catalog", shape: "scalar", values: DELEGATION_BIASES },
|
|
263
274
|
"edit-revision": { key: "editRevision", set: "catalog", shape: "scalar" },
|
|
264
275
|
"input-modalities": { key: "inputModalities", set: "catalog", shape: "array", values: ["text", "image"] },
|
|
265
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
|
+
}
|
package/src/compat/resolve.ts
CHANGED
|
@@ -714,6 +714,7 @@ function resolveOpenAIResponsesPolicy(
|
|
|
714
714
|
supportsImageDetailOriginal: !isXaiHost && !modelMatchesHost(hostModel, "githubCopilot"),
|
|
715
715
|
supportsReasoningSummary: !isXaiHost,
|
|
716
716
|
supportsAllTurnsReasoningContext: false,
|
|
717
|
+
supportsConfigurationUpdate: false,
|
|
717
718
|
requiresReasoningOffJuiceInstruction: false,
|
|
718
719
|
stripImageInput: false,
|
|
719
720
|
thinkingLoopGuard: undefined,
|
|
@@ -815,6 +816,7 @@ function pickResponsesOnly(compat: ResolvedOpenAIResponsesCompat): ResponsesOnly
|
|
|
815
816
|
supportsImageDetailOriginal: compat.supportsImageDetailOriginal,
|
|
816
817
|
supportsObfuscationOptOut: compat.supportsObfuscationOptOut,
|
|
817
818
|
supportsAllTurnsReasoningContext: compat.supportsAllTurnsReasoningContext,
|
|
819
|
+
supportsConfigurationUpdate: compat.supportsConfigurationUpdate,
|
|
818
820
|
officialEndpoint: compat.officialEndpoint,
|
|
819
821
|
harmonyLeakMitigation: compat.harmonyLeakMitigation,
|
|
820
822
|
cacheControlFormat: compat.cacheControlFormat,
|
|
@@ -8,7 +8,7 @@ There are three ownership strata:
|
|
|
8
8
|
- `classes/*.kdl` defines model-lineage truths: behavior inherent to a model line, optionally scoped to the providers where the census established it.
|
|
9
9
|
- `providers/*.kdl` defines deployment contracts: behavior imposed by a host, plus documented per-model residue that taxonomy cannot express exactly.
|
|
10
10
|
- `runtime/behavior.kdl` defines heuristics used before or outside exact model lookup: responses routing, API routes, quota tiers, plan requirements, model limits, roster exclusions, hosted defaults, pricing peers.
|
|
11
|
-
- `auth/<provider>.kdl` defines the provider's auth contract: display name, env-var fallback, credential storage/format, and the declarative login / refresh flow that `@
|
|
11
|
+
- `auth/<provider>.kdl` defines the provider's auth contract: display name, env-var fallback, credential storage/format, and the declarative login / refresh flow that `@linxiraos/pi-ai`'s registry engines interpret (see [Auth grammar](#auth-grammar)).
|
|
12
12
|
|
|
13
13
|
Do not move a statistically common provider behavior into a class file, or a lineage truth into a provider file. Absence is not evidence that a capability is stripped. Preserve comments that record census provenance, reviewed exceptions, and why a `models` residue remains.
|
|
14
14
|
|
|
@@ -257,7 +257,7 @@ Matcher properties on `route` / `exclude-models` / `tier` nodes are `exact=` / `
|
|
|
257
257
|
|
|
258
258
|
## Auth grammar
|
|
259
259
|
|
|
260
|
-
Every provider has exactly one `auth "<id>" { … }` node under `auth/`; `auth/_order.kdl` holds a single `login-order "id" …` node pinning the `/login` roster order (every provider with a `login` and `show-in-login-list` unset/true must appear; providers without a login sort alphabetically after it). Runtime accessors live in `src/compat/auth.ts`; the id unions in the generated `src/compat/auth-ids.ts`. Every provider in `provider-models/descriptors.ts` needs an auth node (`@
|
|
260
|
+
Every provider has exactly one `auth "<id>" { … }` node under `auth/`; `auth/_order.kdl` holds a single `login-order "id" …` node pinning the `/login` roster order (every provider with a `login` and `show-in-login-list` unset/true must appear; providers without a login sort alphabetically after it). Runtime accessors live in `src/compat/auth.ts`; the id unions in the generated `src/compat/auth-ids.ts`. Every provider in `provider-models/descriptors.ts` needs an auth node (`@linxiraos/pi-ai` type-checks this).
|
|
261
261
|
|
|
262
262
|
```kdl
|
|
263
263
|
auth "anthropic" {
|
|
@@ -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
|
|
@@ -306,9 +306,9 @@ Login kinds:
|
|
|
306
306
|
- `login "api-key" { auth-url "…"; instructions "…"; prompt "…" placeholder="…"; empty-fallback "…"; normalize "strip-bearer"; validate … }` — `validate "chat-completions" base-url= model= tolerate-model-denied= max-tokens-field= max-tokens=`, `validate "anthropic-messages" base-url= model=`, or `validate "models-endpoint" url= base-url-env= headers-hook=`; all accept `label=` (error-message label, defaults to `name`) and `optional=#true` (only auth failures reject).
|
|
307
307
|
- `login "oauth-code" { … }` as above; `token`/`refresh` `params` values may use `{code}`, `{state}`, `{redirect_uri}`, `{code_verifier}`, `{client_id}`, `{client_secret}`, `{refresh_token}`, `{scope}`; the standard grant parameters are sent unless `standard=#false`.
|
|
308
308
|
- `login "device-code" { client-id …; base-url "…"; scopes …; headers-hook "…"; device url="{base}/…" body="form" { params {…} headers {…} }; token url="…" url-hook="…"; response user-code= device-code= verification-uri= verification-uri-complete= interval= expires-in=; instructions "Enter code: {user_code}"; credential {…}; userinfo …; after-exchange hook=… }`.
|
|
309
|
-
- `login "custom" hook="name"` — the whole flow is a named `@
|
|
309
|
+
- `login "custom" hook="name"` — the whole flow is a named `@linxiraos/pi-ai` hook (`src/registry/hooks/custom.ts`).
|
|
310
310
|
|
|
311
|
-
Hook names are validated against the hook tables in `@
|
|
311
|
+
Hook names are validated against the hook tables in `@linxiraos/pi-ai/src/registry/hooks` by that package's `auth-hooks-registry` test. Values marked `encoding="base64"` are public OAuth client ids stored obfuscated to keep secret scanners quiet; they are decoded at runtime.
|
|
312
312
|
|
|
313
313
|
## Vendoring provenance
|
|
314
314
|
|
|
@@ -8,7 +8,7 @@ auth "openai-codex" {
|
|
|
8
8
|
authorize-params {
|
|
9
9
|
id_token_add_organizations "true"
|
|
10
10
|
codex_cli_simplified_flow "true"
|
|
11
|
-
originator "
|
|
11
|
+
originator "omp"
|
|
12
12
|
}
|
|
13
13
|
instructions "A browser window should open. Complete login to finish."
|
|
14
14
|
// OpenAI only allowlists this exact URI; a busy port must fail rather than fall back.
|
|
@@ -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,22 @@ 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
|
+
}
|
|
43
|
+
// GPT-6 Astra changes reasoning effort mid-conversation through a
|
|
44
|
+
// `configuration_update` input item so the request-level effort (and the
|
|
45
|
+
// cached prompt prefix) stays put; every other SKU 400s on the item type.
|
|
46
|
+
models "gpt-6-astra" {
|
|
47
|
+
supports-configuration-update #true
|
|
48
|
+
}
|
|
33
49
|
// Codex SKUs: the advertised 400K figure includes the output budget; the
|
|
34
50
|
// true prompt window is 272K. Spark budgets are its own family's.
|
|
35
51
|
family "codex" {
|
|
@@ -69,9 +69,9 @@ provider "openai-codex" {
|
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
// First-party GPT-5 Responses SKUs support the freeform apply_patch
|
|
72
|
+
// First-party GPT-5/GPT-6 Responses SKUs support the freeform apply_patch
|
|
73
73
|
// custom tool with a Lark grammar.
|
|
74
|
-
revision ">=5 <
|
|
74
|
+
revision ">=5 <7" {
|
|
75
75
|
apply-patch-tool-type "freeform"
|
|
76
76
|
}
|
|
77
77
|
}
|
package/src/compat/rules.json
CHANGED
|
@@ -6224,7 +6224,46 @@
|
|
|
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",
|
|
6254
|
+
"class": "openai",
|
|
6255
|
+
"models": [
|
|
6256
|
+
{
|
|
6257
|
+
"kind": "exact",
|
|
6258
|
+
"value": "gpt-6-astra"
|
|
6259
|
+
}
|
|
6260
|
+
],
|
|
6261
|
+
"wire": {
|
|
6262
|
+
"supportsConfigurationUpdate": true
|
|
6263
|
+
}
|
|
6264
|
+
},
|
|
6265
|
+
{
|
|
6266
|
+
"source": "classes/openai.kdl:52",
|
|
6228
6267
|
"class": "openai",
|
|
6229
6268
|
"family": "codex",
|
|
6230
6269
|
"revision": [
|
|
@@ -10650,7 +10689,7 @@
|
|
|
10650
10689
|
},
|
|
10651
10690
|
{
|
|
10652
10691
|
"op": "<",
|
|
10653
|
-
"revision": "
|
|
10692
|
+
"revision": "7.0.0"
|
|
10654
10693
|
}
|
|
10655
10694
|
],
|
|
10656
10695
|
"catalog": {
|
|
@@ -10955,7 +10994,7 @@
|
|
|
10955
10994
|
},
|
|
10956
10995
|
{
|
|
10957
10996
|
"op": "<",
|
|
10958
|
-
"revision": "
|
|
10997
|
+
"revision": "7.0.0"
|
|
10959
10998
|
}
|
|
10960
10999
|
],
|
|
10961
11000
|
"catalog": {
|
|
@@ -14919,7 +14958,7 @@
|
|
|
14919
14958
|
"authorizeParams": {
|
|
14920
14959
|
"id_token_add_organizations": "true",
|
|
14921
14960
|
"codex_cli_simplified_flow": "true",
|
|
14922
|
-
"originator": "
|
|
14961
|
+
"originator": "omp"
|
|
14923
14962
|
},
|
|
14924
14963
|
"clientId": {
|
|
14925
14964
|
"value": "app_EMoamEEZ73f0CkXaXp7hrann"
|
|
@@ -14934,6 +14973,7 @@
|
|
|
14934
14973
|
"hostname": "localhost",
|
|
14935
14974
|
"portFallback": false,
|
|
14936
14975
|
"manualOnly": false,
|
|
14976
|
+
"nativeScheme": false,
|
|
14937
14977
|
"redirectUri": {
|
|
14938
14978
|
"value": "http://localhost:1455/auth/callback"
|
|
14939
14979
|
}
|
|
@@ -15031,7 +15071,8 @@
|
|
|
15031
15071
|
"path": "/callback",
|
|
15032
15072
|
"hostname": "localhost",
|
|
15033
15073
|
"portFallback": true,
|
|
15034
|
-
"manualOnly": false
|
|
15074
|
+
"manualOnly": false,
|
|
15075
|
+
"nativeScheme": false
|
|
15035
15076
|
},
|
|
15036
15077
|
"token": {
|
|
15037
15078
|
"url": {
|
|
@@ -15153,16 +15194,20 @@
|
|
|
15153
15194
|
]
|
|
15154
15195
|
},
|
|
15155
15196
|
"callback": {
|
|
15156
|
-
"port":
|
|
15197
|
+
"port": 0,
|
|
15157
15198
|
"path": "/callback",
|
|
15158
|
-
"hostname": "
|
|
15159
|
-
"portFallback":
|
|
15160
|
-
"manualOnly":
|
|
15199
|
+
"hostname": "localhost",
|
|
15200
|
+
"portFallback": true,
|
|
15201
|
+
"manualOnly": true,
|
|
15202
|
+
"nativeScheme": true,
|
|
15161
15203
|
"redirectUri": {
|
|
15162
|
-
"value": "
|
|
15204
|
+
"value": "zcode://zai-auth/callback",
|
|
15205
|
+
"env": [
|
|
15206
|
+
"ZAI_OAUTH_REDIRECT_URI"
|
|
15207
|
+
]
|
|
15163
15208
|
}
|
|
15164
15209
|
},
|
|
15165
|
-
"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.",
|
|
15166
15211
|
"token": {
|
|
15167
15212
|
"url": {
|
|
15168
15213
|
"value": "https://zcode.z.ai/api/v1/oauth/token",
|
|
@@ -15203,7 +15248,7 @@
|
|
|
15203
15248
|
"refresh": {
|
|
15204
15249
|
"kind": "none"
|
|
15205
15250
|
},
|
|
15206
|
-
"callbackPort":
|
|
15251
|
+
"callbackPort": 0,
|
|
15207
15252
|
"pasteCode": true
|
|
15208
15253
|
},
|
|
15209
15254
|
{
|
|
@@ -15330,7 +15375,8 @@
|
|
|
15330
15375
|
"path": "/callback",
|
|
15331
15376
|
"hostname": "localhost",
|
|
15332
15377
|
"portFallback": true,
|
|
15333
|
-
"manualOnly": false
|
|
15378
|
+
"manualOnly": false,
|
|
15379
|
+
"nativeScheme": false
|
|
15334
15380
|
},
|
|
15335
15381
|
"token": {
|
|
15336
15382
|
"url": {
|
|
@@ -15417,7 +15463,8 @@
|
|
|
15417
15463
|
"path": "/callback",
|
|
15418
15464
|
"hostname": "127.0.0.1",
|
|
15419
15465
|
"portFallback": true,
|
|
15420
|
-
"manualOnly": false
|
|
15466
|
+
"manualOnly": false,
|
|
15467
|
+
"nativeScheme": false
|
|
15421
15468
|
},
|
|
15422
15469
|
"token": {
|
|
15423
15470
|
"url": {
|
|
@@ -15497,7 +15544,8 @@
|
|
|
15497
15544
|
"path": "/oauth-callback",
|
|
15498
15545
|
"hostname": "127.0.0.1",
|
|
15499
15546
|
"portFallback": true,
|
|
15500
|
-
"manualOnly": false
|
|
15547
|
+
"manualOnly": false,
|
|
15548
|
+
"nativeScheme": false
|
|
15501
15549
|
},
|
|
15502
15550
|
"token": {
|
|
15503
15551
|
"url": {
|
|
@@ -15595,7 +15643,8 @@
|
|
|
15595
15643
|
"path": "/oauth2callback",
|
|
15596
15644
|
"hostname": "127.0.0.1",
|
|
15597
15645
|
"portFallback": true,
|
|
15598
|
-
"manualOnly": false
|
|
15646
|
+
"manualOnly": false,
|
|
15647
|
+
"nativeScheme": false
|
|
15599
15648
|
},
|
|
15600
15649
|
"token": {
|
|
15601
15650
|
"url": {
|
|
@@ -15861,6 +15910,7 @@
|
|
|
15861
15910
|
"hostname": "localhost",
|
|
15862
15911
|
"portFallback": true,
|
|
15863
15912
|
"manualOnly": false,
|
|
15913
|
+
"nativeScheme": false,
|
|
15864
15914
|
"redirectUri": {
|
|
15865
15915
|
"env": [
|
|
15866
15916
|
"GITLAB_REDIRECT_URI"
|
|
@@ -15955,6 +16005,7 @@
|
|
|
15955
16005
|
"hostname": "localhost",
|
|
15956
16006
|
"portFallback": true,
|
|
15957
16007
|
"manualOnly": true,
|
|
16008
|
+
"nativeScheme": false,
|
|
15958
16009
|
"redirectUri": {
|
|
15959
16010
|
"value": "vscode://gitlab.gitlab-workflow/authentication"
|
|
15960
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;
|