@oh-my-pi/pi-catalog 18.2.11 → 18.3.0

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 CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [18.3.0] - 2026-09-24
6
+
7
+ ### Added
8
+
9
+ - Added compaction support for the `claude-mythos-preview` model.
10
+ - Added provider and authentication rule definitions for on-device Apple Foundation Models.
11
+ - Added per-account discovery of Codex cyber access entitlements.
12
+ - Added `org-scoped-identity` and `oauth-token-env` authentication rules for providers.
13
+
5
14
  ## [18.2.11] - 2026-09-23
6
15
 
7
16
  ### Added
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @oh-my-pi/pi-catalog
2
2
 
3
- Model catalog for [oh-my-pi](https://github.com/can1357/oh-my-pi): bundled model database, provider discovery, model identity, classification, and equivalence.
3
+ Model catalog for [omp](https://github.com/can1357/oh-my-pi): bundled model database, provider discovery, model identity, classification, and equivalence.
4
4
 
5
5
  ## What's inside
6
6
 
@@ -293,7 +293,7 @@ MIT License
293
293
  Copyright (c) 2026 Sander Land
294
294
  (measured tokenizer vocabulary data, reconstruction model, and reference
295
295
  implementation: https://github.com/sanderland/ctok)
296
- Copyright (c) 2026 Can Bölük and the Oh My Pi contributors
296
+ Copyright (c) 2026 Can Bölük and the omp contributors
297
297
  Copyright (c) 2026 Stencil Labs, Inc.
298
298
  (Rust implementation and the compact binary vocabulary encoding in
299
299
  crates/pi-natives/src/utok/claude)
@@ -1,4 +1,4 @@
1
1
  /** Every provider with an `auth/<id>.kdl` policy. */
2
- export type AuthProviderId = "abliteration" | "aiand" | "aimlapi" | "alibaba-coding-plan" | "alibaba-token-plan" | "amazon-bedrock" | "anthropic" | "azure" | "baseten" | "bedrock-mantle" | "cerebras" | "charm-hyper" | "cline-pass" | "cloudflare-ai-gateway" | "commandcode" | "coreweave" | "cursor" | "deepinfra" | "deepseek" | "devin" | "exa" | "firepass" | "fireworks" | "github-copilot" | "gitlab-duo" | "gitlab-duo-agent" | "gmi-cloud" | "google" | "google-antigravity" | "google-gemini-cli" | "google-vertex" | "groq" | "huggingface" | "kagi" | "kilo" | "kimi-code" | "litellm" | "llama.cpp" | "lm-studio" | "local" | "meta" | "minimax" | "minimax-code" | "minimax-code-cn" | "mistral" | "moonshot" | "muse-code" | "nanogpt" | "novita" | "nvidia" | "ollama" | "ollama-cloud" | "openai" | "openai-codex" | "openai-codex-device" | "opencode-go" | "opencode-zen" | "openrouter" | "parallel" | "perplexity" | "qianfan" | "qwen-portal" | "sakana" | "siliconflow" | "siliconflow-cn" | "singularityapi-dev" | "singularityapi-tech" | "stencil" | "stepfun" | "synthetic" | "tavily" | "together" | "typesafe" | "umans" | "venice" | "vercel-ai-gateway" | "vllm" | "wafer-serverless" | "web" | "xai" | "xai-oauth" | "xiaomi" | "xiaomi-token-plan-ams" | "xiaomi-token-plan-cn" | "xiaomi-token-plan-sgp" | "yolo-auto" | "zai" | "zai-coding-plan" | "zenmux" | "zhipu-coding-plan";
2
+ export type AuthProviderId = "abliteration" | "aiand" | "aimlapi" | "alibaba-coding-plan" | "alibaba-token-plan" | "amazon-bedrock" | "anthropic" | "apple" | "azure" | "baseten" | "bedrock-mantle" | "cerebras" | "charm-hyper" | "cline-pass" | "cloudflare-ai-gateway" | "commandcode" | "coreweave" | "cursor" | "deepinfra" | "deepseek" | "devin" | "exa" | "firepass" | "fireworks" | "github-copilot" | "gitlab-duo" | "gitlab-duo-agent" | "gmi-cloud" | "google" | "google-antigravity" | "google-gemini-cli" | "google-vertex" | "groq" | "huggingface" | "kagi" | "kilo" | "kimi-code" | "litellm" | "llama.cpp" | "lm-studio" | "local" | "meta" | "minimax" | "minimax-code" | "minimax-code-cn" | "mistral" | "moonshot" | "muse-code" | "nanogpt" | "novita" | "nvidia" | "ollama" | "ollama-cloud" | "openai" | "openai-codex" | "openai-codex-device" | "opencode-go" | "opencode-zen" | "openrouter" | "parallel" | "perplexity" | "qianfan" | "qwen-portal" | "sakana" | "siliconflow" | "siliconflow-cn" | "singularityapi-dev" | "singularityapi-tech" | "stencil" | "stepfun" | "synthetic" | "tavily" | "together" | "typesafe" | "umans" | "venice" | "vercel-ai-gateway" | "vllm" | "wafer-serverless" | "web" | "xai" | "xai-oauth" | "xiaomi" | "xiaomi-token-plan-ams" | "xiaomi-token-plan-cn" | "xiaomi-token-plan-sgp" | "yolo-auto" | "zai" | "zai-coding-plan" | "zenmux" | "zhipu-coding-plan";
3
3
  /** Providers whose policy declares a `login` flow (the `/login` roster). */
4
4
  export type LoginProviderId = "abliteration" | "aiand" | "alibaba-coding-plan" | "alibaba-token-plan" | "anthropic" | "baseten" | "cerebras" | "charm-hyper" | "cline-pass" | "cloudflare-ai-gateway" | "commandcode" | "coreweave" | "cursor" | "deepinfra" | "deepseek" | "devin" | "exa" | "firepass" | "fireworks" | "github-copilot" | "gitlab-duo" | "gitlab-duo-agent" | "gmi-cloud" | "google-antigravity" | "google-gemini-cli" | "huggingface" | "kagi" | "kilo" | "kimi-code" | "litellm" | "llama.cpp" | "lm-studio" | "meta" | "minimax-code" | "minimax-code-cn" | "moonshot" | "muse-code" | "nanogpt" | "novita" | "nvidia" | "ollama" | "ollama-cloud" | "openai-codex" | "openai-codex-device" | "opencode-go" | "opencode-zen" | "openrouter" | "parallel" | "perplexity" | "qianfan" | "qwen-portal" | "sakana" | "siliconflow" | "siliconflow-cn" | "singularityapi-dev" | "singularityapi-tech" | "stencil" | "stepfun" | "synthetic" | "tavily" | "together" | "typesafe" | "umans" | "venice" | "vercel-ai-gateway" | "vllm" | "wafer-serverless" | "xai" | "xai-oauth" | "xiaomi" | "xiaomi-token-plan-ams" | "xiaomi-token-plan-cn" | "xiaomi-token-plan-sgp" | "yolo-auto" | "zai" | "zai-coding-plan" | "zenmux" | "zhipu-coding-plan";
@@ -1,2 +1,2 @@
1
1
  /** Every chat-model provider with a catalog entry (`default-model` in its provider rules). */
2
- export type KnownProvider = "abliteration" | "aiand" | "aimlapi" | "alibaba-coding-plan" | "alibaba-token-plan" | "amazon-bedrock" | "anthropic" | "azure" | "baseten" | "bedrock-mantle" | "cerebras" | "charm-hyper" | "cline-pass" | "cloudflare-ai-gateway" | "commandcode" | "coreweave" | "cursor" | "deepinfra" | "deepseek" | "devin" | "firepass" | "fireworks" | "github-copilot" | "gitlab-duo" | "gitlab-duo-agent" | "gmi-cloud" | "google" | "google-antigravity" | "google-gemini-cli" | "google-vertex" | "groq" | "huggingface" | "kilo" | "kimi-code" | "litellm" | "lm-studio" | "local" | "meta" | "minimax" | "minimax-code" | "minimax-code-cn" | "mistral" | "moonshot" | "muse-code" | "nanogpt" | "novita" | "nvidia" | "ollama" | "ollama-cloud" | "openai" | "openai-codex" | "opencode-go" | "opencode-zen" | "openrouter" | "qianfan" | "qwen-portal" | "sakana" | "siliconflow" | "siliconflow-cn" | "singularityapi-dev" | "singularityapi-tech" | "stepfun" | "synthetic" | "together" | "typesafe" | "umans" | "venice" | "vercel-ai-gateway" | "vllm" | "wafer-serverless" | "web" | "xai" | "xai-oauth" | "xiaomi" | "xiaomi-token-plan-ams" | "xiaomi-token-plan-cn" | "xiaomi-token-plan-sgp" | "yolo-auto" | "zai" | "zenmux" | "zhipu-coding-plan";
2
+ export type KnownProvider = "abliteration" | "aiand" | "aimlapi" | "alibaba-coding-plan" | "alibaba-token-plan" | "amazon-bedrock" | "anthropic" | "apple" | "azure" | "baseten" | "bedrock-mantle" | "cerebras" | "charm-hyper" | "cline-pass" | "cloudflare-ai-gateway" | "commandcode" | "coreweave" | "cursor" | "deepinfra" | "deepseek" | "devin" | "firepass" | "fireworks" | "github-copilot" | "gitlab-duo" | "gitlab-duo-agent" | "gmi-cloud" | "google" | "google-antigravity" | "google-gemini-cli" | "google-vertex" | "groq" | "huggingface" | "kilo" | "kimi-code" | "litellm" | "lm-studio" | "local" | "meta" | "minimax" | "minimax-code" | "minimax-code-cn" | "mistral" | "moonshot" | "muse-code" | "nanogpt" | "novita" | "nvidia" | "ollama" | "ollama-cloud" | "openai" | "openai-codex" | "opencode-go" | "opencode-zen" | "openrouter" | "qianfan" | "qwen-portal" | "sakana" | "siliconflow" | "siliconflow-cn" | "singularityapi-dev" | "singularityapi-tech" | "stepfun" | "synthetic" | "together" | "typesafe" | "umans" | "venice" | "vercel-ai-gateway" | "vllm" | "wafer-serverless" | "web" | "xai" | "xai-oauth" | "xiaomi" | "xiaomi-token-plan-ams" | "xiaomi-token-plan-cn" | "xiaomi-token-plan-sgp" | "yolo-auto" | "zai" | "zenmux" | "zhipu-coding-plan";
@@ -530,6 +530,10 @@ export interface CompiledAuthProvider {
530
530
  hook: string;
531
531
  };
532
532
  allowsMissingApiKey?: boolean;
533
+ /** Qualify credential and usage-report identity by org when an email may have multiple subscriptions. */
534
+ orgScopedIdentity?: boolean;
535
+ /** Environment variables carrying this provider's own OAuth bearer, excluding borrowed API-key aliases. */
536
+ oauthTokenEnv?: string[];
533
537
  /** APIs whose provider transport resolves credentials without a stored account. */
534
538
  nativeAuthApis?: string[];
535
539
  available?: boolean;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Cursor agent protocol declarations used by Oh My Pi.
2
+ * Cursor agent protocol declarations used by omp.
3
3
  *
4
4
  * Each declaration retains only fields consumed by the client or its protocol tests.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Devin protocol declarations used by Oh My Pi.
2
+ * Devin protocol declarations used by omp.
3
3
  *
4
4
  * Each declaration retains only fields consumed by the client or its protocol tests.
5
5
  */
@@ -2,7 +2,7 @@ import type { ModelIdentity } from "./compat/types.js";
2
2
  import type { Effort } from "./effort.js";
3
3
  export type { FetchImpl } from "@oh-my-pi/pi-utils";
4
4
  export type { KnownProvider } from "./provider-models/descriptors.js";
5
- export type KnownApi = "openai-completions" | "openai-responses" | "openrouter" | "openai-codex-responses" | "azure-openai-responses" | "anthropic-messages" | "bedrock-converse-stream" | "google-generative-ai" | "google-gemini-cli" | "google-vertex" | "ollama-chat" | "cursor-agent" | "gitlab-duo-agent" | "devin-agent";
5
+ export type KnownApi = "openai-completions" | "openai-responses" | "openrouter" | "openai-codex-responses" | "azure-openai-responses" | "anthropic-messages" | "bedrock-converse-stream" | "google-generative-ai" | "google-gemini-cli" | "google-vertex" | "ollama-chat" | "cursor-agent" | "gitlab-duo-agent" | "devin-agent" | "apple-foundation-models";
6
6
  export type Api = KnownApi | (string & {});
7
7
  /** Catalog kinds used to isolate role-specific runners from session chat models. */
8
8
  export declare const MODEL_KINDS: readonly ["chat", "tiny", "image", "tts", "stt", "search", "judge", "embedding", "rerank", "video"];
@@ -441,17 +441,17 @@ export interface AnthropicCompat {
441
441
  /** Whether thinking requests may include `context_management` and its beta header. Default: true. */
442
442
  supportsContextManagement?: boolean;
443
443
  /**
444
- * Whether the model lineage supports Anthropic server-side compaction
445
- * (`compact-2026-01-12`: the `compact_20260112` edit and replayed
446
- * `compaction` blocks). Rule-owned per model line; the beta covers the
447
- * adaptive-thinking generation onward and rejects older lines. Default: false.
444
+ * Whether the model and host support Anthropic on-demand compaction
445
+ * (`compact-2026-09-04` requests and signed replay). Enabled on Opus 4.6+,
446
+ * Sonnet 4.6+, Fable/Mythos 5+ on supported hosts. Default: false.
448
447
  */
449
448
  supportsServerCompaction?: boolean;
450
449
  /**
451
450
  * Whether the model is served by the first-party Anthropic provider (its
452
451
  * default route is the official API). Rule-owned on the provider; the
453
452
  * compaction transport pairs it with a per-request effective-URL check
454
- * because reroutes leave it stale-true. Default: false.
453
+ * because reroutes leave it stale-true. Vertex is selected by its provider
454
+ * contract instead. Default: false.
455
455
  */
456
456
  firstPartyProvider?: boolean;
457
457
  /**
@@ -953,6 +953,15 @@ export interface ModelCost extends TokenCost {
953
953
  * `"deepseek-v3"`; Kimi K2 through K3 share `"kimi-k2"`.
954
954
  */
955
955
  export type ModelTokenizer = "claude-v3" | "claude-v47" | "claude-v5" | "claude-v5-sonnet" | "qwen3" | "deepseek-v3" | "kimi-k2" | "glm5";
956
+ /** One account's discovered entitlements on a model; see {@link Model.accountAccess}. */
957
+ export interface ModelAccountAccess {
958
+ /**
959
+ * Codex `available_access_programs.cyber`: cyber access programs this account
960
+ * may request on the model (`standard`, `daybreak_blue`, `daybreak_red`).
961
+ * Absent when the backend reported no program metadata.
962
+ */
963
+ cyberPrograms?: readonly string[];
964
+ }
956
965
  export interface Model<TApi extends Api = Api> {
957
966
  id: string;
958
967
  /** Role-specific runner capability; omitted for ordinary chat models. */
@@ -1046,6 +1055,15 @@ export interface Model<TApi extends Api = Api> {
1046
1055
  * their single wire id) and on bundled snapshots that predate discovery.
1047
1056
  */
1048
1057
  cursorMaxModeRoutes?: Readonly<Record<string, boolean>>;
1058
+ /**
1059
+ * Per-account availability recorded by multi-account discovery: provider
1060
+ * account id (Codex: ChatGPT `chatgpt_account_id`) → that account's
1061
+ * entitlements on this model. An account appears only when its own catalog
1062
+ * lists the model, so credential selection can route account-gated models
1063
+ * (e.g. `gpt-daybreak-blue-latest`) straight to eligible accounts. Absent on
1064
+ * bundled/config rows and on single-account discovery.
1065
+ */
1066
+ accountAccess?: Readonly<Record<string, ModelAccountAccess>>;
1049
1067
  cost: ModelCost;
1050
1068
  /** Premium Copilot requests charged per user-initiated request (defaults to 1). */
1051
1069
  premiumMultiplier?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oh-my-pi/pi-catalog",
3
- "version": "18.2.11",
3
+ "version": "18.3.0",
4
4
  "description": "Model catalog for omp: bundled model database, provider discovery descriptors, model identity, classification, and equivalence",
5
5
  "keywords": [
6
6
  "ai",
@@ -14,7 +14,10 @@
14
14
  "url": "https://github.com/can1357/oh-my-pi/issues"
15
15
  },
16
16
  "license": "MIT",
17
- "author": "Stencil Labs, Inc.",
17
+ "author": {
18
+ "name": "Stencil Labs, Inc.",
19
+ "url": "https://stencil.so"
20
+ },
18
21
  "repository": {
19
22
  "type": "git",
20
23
  "url": "git+https://github.com/can1357/oh-my-pi.git",
@@ -90,12 +93,12 @@
90
93
  "gen:proto": "bun scripts/generate-protocols.ts"
91
94
  },
92
95
  "dependencies": {
93
- "@oh-my-pi/omptype": "18.2.11",
94
- "@oh-my-pi/pi-utils": "18.2.11"
96
+ "@oh-my-pi/omptype": "18.3.0",
97
+ "@oh-my-pi/pi-utils": "18.3.0"
95
98
  },
96
99
  "devDependencies": {
97
100
  "@bgotink/kdl": "0.4.0",
98
- "@oh-my-pi/pi-ai": "18.2.11",
101
+ "@oh-my-pi/pi-ai": "18.3.0",
99
102
  "@types/bun": "^1.3.14"
100
103
  },
101
104
  "engines": {
@@ -9,6 +9,7 @@ export type AuthProviderId =
9
9
  | "alibaba-token-plan"
10
10
  | "amazon-bedrock"
11
11
  | "anthropic"
12
+ | "apple"
12
13
  | "azure"
13
14
  | "baseten"
14
15
  | "bedrock-mantle"
@@ -9,6 +9,7 @@ export type KnownProvider =
9
9
  | "alibaba-token-plan"
10
10
  | "amazon-bedrock"
11
11
  | "anthropic"
12
+ | "apple"
12
13
  | "azure"
13
14
  | "baseten"
14
15
  | "bedrock-mantle"
@@ -346,12 +346,16 @@ auth "anthropic" {
346
346
  expiry "jwt-or-never" // session-JWT expiry policy
347
347
  result "api-key" // OAuth login persists only credentials.access as a plain API key
348
348
  allows-missing-api-key #true
349
+ org-scoped-identity #true // qualify credential/report identity by org (one email can have multiple subscriptions)
350
+ oauth-token-env "PROVIDER_OAUTH_TOKEN" // dedicated OAuth bearer env vars, excluding borrowed API-key aliases in provider env
349
351
  native-auth-api "bedrock-converse-stream" // provider transport resolves auth; scan plans pin this API without secrets
350
352
  available #false
351
353
  show-in-login-list #false
352
354
  }
353
355
  ```
354
356
 
357
+ `org-scoped-identity #true` keeps credentials and usage reports for different organizations separate even when they share an email; absent or `#false` uses ordinary account identity. `oauth-token-env` takes one or more ordered, non-empty env names carrying this provider's own OAuth bearer. When present, availability ignores other provider-env aliases, and usage probes accept only stored OAuth credentials or the first set bearer from that list; absent providers keep the ordinary API-key env behavior.
358
+
355
359
  Login kinds:
356
360
 
357
361
  - `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).
@@ -1,5 +1,6 @@
1
1
  auth "anthropic" {
2
2
  name "Anthropic (Claude Pro/Max)"
3
+ org-scoped-identity #true
3
4
  // Foundry mode optionally switches Anthropic auth to enterprise gateway credentials.
4
5
  env hook="anthropic-foundry"
5
6
  login "oauth-code" {
@@ -0,0 +1,4 @@
1
+ auth "apple" {
2
+ name "Apple Foundation Models (on-device)"
3
+ allows-missing-api-key #true
4
+ }
@@ -1,5 +1,6 @@
1
1
  auth "openai-codex" {
2
2
  name "ChatGPT Plus/Pro (Codex Subscription)"
3
+ org-scoped-identity #true
3
4
  login "oauth-code" {
4
5
  client-id "app_EMoamEEZ73f0CkXaXp7hrann"
5
6
  authorize-url "https://auth.openai.com/oauth/authorize"
@@ -1,6 +1,7 @@
1
1
  // Device authorization and token refresh adapted from NousResearch/hermes-agent (MIT).
2
2
  auth "xai-oauth" {
3
3
  name "xAI Grok OAuth (SuperGrok or X Premium+)"
4
+ oauth-token-env "XAI_OAUTH_TOKEN"
4
5
  login "device-code" {
5
6
  client-id "b1a00492-073a-47ea-816f-4c329264a828"
6
7
  scopes "openid" "profile" "email" "offline_access" "grok-cli:access" "api:access"
@@ -7,27 +7,32 @@ class "anthropic" {
7
7
  thinking-prefix-binding #true
8
8
  }
9
9
  }
10
- // Server-side compaction (compact-2026-01-12) is a lineage capability: the
11
- // documented model list is the adaptive-thinking generation onward (Opus
12
- // 4.6+, Sonnet 4.6+, Fable/Mythos 5+). Whether a host delivers the beta is
13
- // decided at request time from the effective endpoint, not here.
14
- family "fable" {
15
- revision ">=5" {
16
- supports-server-compaction #true
10
+ // On-demand compaction (compact-2026-09-04) is available on the Claude
11
+ // API and Vertex, not Amazon Bedrock or unverified gateway deployments.
12
+ // Foundry / Claude Platform on AWS are first-party Anthropic routes whose
13
+ // effective URLs are checked at request time.
14
+ on "anthropic" "google-vertex" {
15
+ family "fable" {
16
+ revision ">=5" {
17
+ supports-server-compaction #true
18
+ }
17
19
  }
18
- }
19
- family "mythos" {
20
- revision ">=5" {
21
- supports-server-compaction #true
20
+ family "mythos" {
21
+ revision ">=5" {
22
+ supports-server-compaction #true
23
+ }
22
24
  }
23
- }
24
- family "opus" {
25
- revision ">=4.6" {
26
- supports-server-compaction #true
25
+ family "opus" {
26
+ revision ">=4.6" {
27
+ supports-server-compaction #true
28
+ }
27
29
  }
28
- }
29
- family "sonnet" {
30
- revision ">=4.6" {
30
+ family "sonnet" {
31
+ revision ">=4.6" {
32
+ supports-server-compaction #true
33
+ }
34
+ }
35
+ models "claude-mythos-preview" {
31
36
  supports-server-compaction #true
32
37
  }
33
38
  }
@@ -0,0 +1,8 @@
1
+ // Apple Foundation Models: the on-device system language model (macOS 27+,
2
+ // Apple silicon), bridged in-process by pi-natives. Models are discovered at
3
+ // runtime from the model's availability; nothing is bundled.
4
+
5
+ provider "apple" {
6
+ default-model "on-device"
7
+ allow-unauthenticated #true
8
+ }