@omnicross/contracts 0.1.3 → 0.1.4
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/LICENSE +21 -21
- package/README.md +15 -15
- package/dist/index.cjs +15 -0
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +13 -0
- package/dist/subscription-model-catalog.cjs +40 -0
- package/dist/subscription-model-catalog.d.cts +34 -0
- package/dist/subscription-model-catalog.d.ts +34 -0
- package/dist/subscription-model-catalog.js +14 -0
- package/package.json +156 -151
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Sayo
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Sayo
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
# @omnicross/contracts
|
|
2
|
-
|
|
3
|
-
Dependency-light, host-agnostic contract types + runtime-value helpers shared across the omnicross packages: LLM config, completion types + message blocks, provider presets, thinking config, usage, and subscription/account-token types.
|
|
4
|
-
|
|
5
|
-
Consumed via subpaths to keep the dependency graph tight, e.g. `@omnicross/contracts/llm-config`, `@omnicross/contracts/provider-presets`, `@omnicross/contracts/completion-types`.
|
|
6
|
-
|
|
7
|
-
Part of the [omnicross](https://github.com/Dumoedss/omnicross) monorepo — see the root README for the full overview.
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npm install @omnicross/contracts
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## License
|
|
14
|
-
|
|
15
|
-
[MIT](LICENSE)
|
|
1
|
+
# @omnicross/contracts
|
|
2
|
+
|
|
3
|
+
Dependency-light, host-agnostic contract types + runtime-value helpers shared across the omnicross packages: LLM config, completion types + message blocks, provider presets, thinking config, usage, and subscription/account-token types.
|
|
4
|
+
|
|
5
|
+
Consumed via subpaths to keep the dependency graph tight, e.g. `@omnicross/contracts/llm-config`, `@omnicross/contracts/provider-presets`, `@omnicross/contracts/completion-types`.
|
|
6
|
+
|
|
7
|
+
Part of the [omnicross](https://github.com/Dumoedss/omnicross) monorepo — see the root README for the full overview.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @omnicross/contracts
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## License
|
|
14
|
+
|
|
15
|
+
[MIT](LICENSE)
|
package/dist/index.cjs
CHANGED
|
@@ -40,6 +40,7 @@ __export(index_exports, {
|
|
|
40
40
|
PROVIDER_MODEL_MAPPINGS: () => PROVIDER_MODEL_MAPPINGS,
|
|
41
41
|
PROVIDER_SEARCH_CONFIGS: () => PROVIDER_SEARCH_CONFIGS,
|
|
42
42
|
REASONING_MODEL_PATTERNS: () => REASONING_MODEL_PATTERNS,
|
|
43
|
+
SUBSCRIPTION_MODEL_CATALOG: () => SUBSCRIPTION_MODEL_CATALOG,
|
|
43
44
|
THINKING_TOKEN_MAP: () => THINKING_TOKEN_MAP,
|
|
44
45
|
WEBHOOK_DESTINATION_TYPES: () => WEBHOOK_DESTINATION_TYPES,
|
|
45
46
|
WEBHOOK_EVENT_KINDS: () => WEBHOOK_EVENT_KINDS,
|
|
@@ -68,6 +69,7 @@ __export(index_exports, {
|
|
|
68
69
|
resolveFollowProviderModel: () => resolveFollowProviderModel,
|
|
69
70
|
resolveModelCapabilities: () => resolveModelCapabilities,
|
|
70
71
|
resolveProviderEndpoint: () => resolveProviderEndpoint,
|
|
72
|
+
subscriptionProviderHasCatalog: () => subscriptionProviderHasCatalog,
|
|
71
73
|
subscriptionTargetForSession: () => subscriptionTargetForSession
|
|
72
74
|
});
|
|
73
75
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -2491,6 +2493,17 @@ function getProviderSearchConfig(presetId) {
|
|
|
2491
2493
|
return PROVIDER_SEARCH_CONFIGS[presetId];
|
|
2492
2494
|
}
|
|
2493
2495
|
|
|
2496
|
+
// src/subscription-model-catalog.ts
|
|
2497
|
+
var SUBSCRIPTION_MODEL_CATALOG = {
|
|
2498
|
+
claude: ["claude-haiku-4-5", "claude-sonnet-5", "claude-opus-5", "claude-fable-5"],
|
|
2499
|
+
codex: ["gpt-5.6-luna", "gpt-5.6-terra", "gpt-5.6-sol"],
|
|
2500
|
+
gemini: [],
|
|
2501
|
+
opencodego: []
|
|
2502
|
+
};
|
|
2503
|
+
function subscriptionProviderHasCatalog(providerId) {
|
|
2504
|
+
return SUBSCRIPTION_MODEL_CATALOG[providerId].length > 0;
|
|
2505
|
+
}
|
|
2506
|
+
|
|
2494
2507
|
// src/subscription-types.ts
|
|
2495
2508
|
function legacyCliBackendToSubscriptionProvider(cliBackend) {
|
|
2496
2509
|
switch (cliBackend) {
|
|
@@ -2745,6 +2758,7 @@ function isLocalProvider(id) {
|
|
|
2745
2758
|
PROVIDER_MODEL_MAPPINGS,
|
|
2746
2759
|
PROVIDER_SEARCH_CONFIGS,
|
|
2747
2760
|
REASONING_MODEL_PATTERNS,
|
|
2761
|
+
SUBSCRIPTION_MODEL_CATALOG,
|
|
2748
2762
|
THINKING_TOKEN_MAP,
|
|
2749
2763
|
WEBHOOK_DESTINATION_TYPES,
|
|
2750
2764
|
WEBHOOK_EVENT_KINDS,
|
|
@@ -2773,5 +2787,6 @@ function isLocalProvider(id) {
|
|
|
2773
2787
|
resolveFollowProviderModel,
|
|
2774
2788
|
resolveModelCapabilities,
|
|
2775
2789
|
resolveProviderEndpoint,
|
|
2790
|
+
subscriptionProviderHasCatalog,
|
|
2776
2791
|
subscriptionTargetForSession
|
|
2777
2792
|
});
|
package/dist/index.d.cts
CHANGED
|
@@ -12,6 +12,7 @@ export { DEFAULT_MCP_SESSION_CONFIG, MCPCallToolResponse, MCPTool, MCPToolRespon
|
|
|
12
12
|
export { MessageBlock, MessageBlockBase, MessageBlockType, TextBlock, ThinkingBlock, ToolResultBlock, ToolUseBlock } from './message-blocks.cjs';
|
|
13
13
|
export { DEFAULT_LITELLM_PRICING_URL, PricingConflict, PricingConflictDecision, PricingEntry, PricingEntryInput, PricingFetchResult, PricingResolution, PricingSource } from './pricing-types.cjs';
|
|
14
14
|
export { CATALOG_VERSION, CODING_PLAN_URL_PRESETS, DEFAULT_SEED_PRESET_IDS, LLM_PROVIDER_PRESETS, MAX_CONCURRENCY_DEFAULTS, PROVIDER_MODEL_MAPPINGS, PROVIDER_SEARCH_CONFIGS, getAllProviderPresets, getCodingPlanBaseUrl, getPresetById, getPresetRevision, getProviderSearchConfig, resolveFollowProviderModel } from './provider-presets/index.cjs';
|
|
15
|
+
export { SUBSCRIPTION_MODEL_CATALOG, subscriptionProviderHasCatalog } from './subscription-model-catalog.cjs';
|
|
15
16
|
export { OpenCodeGoModelEntry, OpenCodeGoScenario, OpenCodeGoTokenConfig, OpenCodeGoTokenSanitized, ProviderChannel, SubscriptionListEntry, SubscriptionProviderId, SubscriptionStatusEntry, legacyCliBackendToSubscriptionProvider, subscriptionTargetForSession } from './subscription-types.cjs';
|
|
16
17
|
export { CANNOT_DISABLE_THINKING_PATTERNS, DEFAULT_MAX_TOKENS, EFFORT_RATIO, REASONING_MODEL_PATTERNS, THINKING_TOKEN_MAP, buildAnthropicThinking, buildGeminiThinkingConfig, buildQwenThinkingConfig, calculateThinkingBudget, canDisableThinking, findTokenLimit, getClaudeMaxTokens, getOpenAIReasoningEffort, isReasoningModel } from './thinking-config.cjs';
|
|
17
18
|
export { ApiKeyUsageRow, MessageUsageRow, ModelUsageRow, SessionCacheStats, UsageDateRange, UsageEventInput, UsageEventRecord, UsageQueryParams, UsageTimeBucket, UsageTimeSeriesBucket, UsageTotals } from './usage-stats-types.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export { DEFAULT_MCP_SESSION_CONFIG, MCPCallToolResponse, MCPTool, MCPToolRespon
|
|
|
12
12
|
export { MessageBlock, MessageBlockBase, MessageBlockType, TextBlock, ThinkingBlock, ToolResultBlock, ToolUseBlock } from './message-blocks.js';
|
|
13
13
|
export { DEFAULT_LITELLM_PRICING_URL, PricingConflict, PricingConflictDecision, PricingEntry, PricingEntryInput, PricingFetchResult, PricingResolution, PricingSource } from './pricing-types.js';
|
|
14
14
|
export { CATALOG_VERSION, CODING_PLAN_URL_PRESETS, DEFAULT_SEED_PRESET_IDS, LLM_PROVIDER_PRESETS, MAX_CONCURRENCY_DEFAULTS, PROVIDER_MODEL_MAPPINGS, PROVIDER_SEARCH_CONFIGS, getAllProviderPresets, getCodingPlanBaseUrl, getPresetById, getPresetRevision, getProviderSearchConfig, resolveFollowProviderModel } from './provider-presets/index.js';
|
|
15
|
+
export { SUBSCRIPTION_MODEL_CATALOG, subscriptionProviderHasCatalog } from './subscription-model-catalog.js';
|
|
15
16
|
export { OpenCodeGoModelEntry, OpenCodeGoScenario, OpenCodeGoTokenConfig, OpenCodeGoTokenSanitized, ProviderChannel, SubscriptionListEntry, SubscriptionProviderId, SubscriptionStatusEntry, legacyCliBackendToSubscriptionProvider, subscriptionTargetForSession } from './subscription-types.js';
|
|
16
17
|
export { CANNOT_DISABLE_THINKING_PATTERNS, DEFAULT_MAX_TOKENS, EFFORT_RATIO, REASONING_MODEL_PATTERNS, THINKING_TOKEN_MAP, buildAnthropicThinking, buildGeminiThinkingConfig, buildQwenThinkingConfig, calculateThinkingBudget, canDisableThinking, findTokenLimit, getClaudeMaxTokens, getOpenAIReasoningEffort, isReasoningModel } from './thinking-config.js';
|
|
17
18
|
export { ApiKeyUsageRow, MessageUsageRow, ModelUsageRow, SessionCacheStats, UsageDateRange, UsageEventInput, UsageEventRecord, UsageQueryParams, UsageTimeBucket, UsageTimeSeriesBucket, UsageTotals } from './usage-stats-types.js';
|
package/dist/index.js
CHANGED
|
@@ -2417,6 +2417,17 @@ function getProviderSearchConfig(presetId) {
|
|
|
2417
2417
|
return PROVIDER_SEARCH_CONFIGS[presetId];
|
|
2418
2418
|
}
|
|
2419
2419
|
|
|
2420
|
+
// src/subscription-model-catalog.ts
|
|
2421
|
+
var SUBSCRIPTION_MODEL_CATALOG = {
|
|
2422
|
+
claude: ["claude-haiku-4-5", "claude-sonnet-5", "claude-opus-5", "claude-fable-5"],
|
|
2423
|
+
codex: ["gpt-5.6-luna", "gpt-5.6-terra", "gpt-5.6-sol"],
|
|
2424
|
+
gemini: [],
|
|
2425
|
+
opencodego: []
|
|
2426
|
+
};
|
|
2427
|
+
function subscriptionProviderHasCatalog(providerId) {
|
|
2428
|
+
return SUBSCRIPTION_MODEL_CATALOG[providerId].length > 0;
|
|
2429
|
+
}
|
|
2430
|
+
|
|
2420
2431
|
// src/subscription-types.ts
|
|
2421
2432
|
function legacyCliBackendToSubscriptionProvider(cliBackend) {
|
|
2422
2433
|
switch (cliBackend) {
|
|
@@ -2670,6 +2681,7 @@ export {
|
|
|
2670
2681
|
PROVIDER_MODEL_MAPPINGS,
|
|
2671
2682
|
PROVIDER_SEARCH_CONFIGS,
|
|
2672
2683
|
REASONING_MODEL_PATTERNS,
|
|
2684
|
+
SUBSCRIPTION_MODEL_CATALOG,
|
|
2673
2685
|
THINKING_TOKEN_MAP,
|
|
2674
2686
|
WEBHOOK_DESTINATION_TYPES,
|
|
2675
2687
|
WEBHOOK_EVENT_KINDS,
|
|
@@ -2698,5 +2710,6 @@ export {
|
|
|
2698
2710
|
resolveFollowProviderModel,
|
|
2699
2711
|
resolveModelCapabilities,
|
|
2700
2712
|
resolveProviderEndpoint,
|
|
2713
|
+
subscriptionProviderHasCatalog,
|
|
2701
2714
|
subscriptionTargetForSession
|
|
2702
2715
|
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/subscription-model-catalog.ts
|
|
21
|
+
var subscription_model_catalog_exports = {};
|
|
22
|
+
__export(subscription_model_catalog_exports, {
|
|
23
|
+
SUBSCRIPTION_MODEL_CATALOG: () => SUBSCRIPTION_MODEL_CATALOG,
|
|
24
|
+
subscriptionProviderHasCatalog: () => subscriptionProviderHasCatalog
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(subscription_model_catalog_exports);
|
|
27
|
+
var SUBSCRIPTION_MODEL_CATALOG = {
|
|
28
|
+
claude: ["claude-haiku-4-5", "claude-sonnet-5", "claude-opus-5", "claude-fable-5"],
|
|
29
|
+
codex: ["gpt-5.6-luna", "gpt-5.6-terra", "gpt-5.6-sol"],
|
|
30
|
+
gemini: [],
|
|
31
|
+
opencodego: []
|
|
32
|
+
};
|
|
33
|
+
function subscriptionProviderHasCatalog(providerId) {
|
|
34
|
+
return SUBSCRIPTION_MODEL_CATALOG[providerId].length > 0;
|
|
35
|
+
}
|
|
36
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
37
|
+
0 && (module.exports = {
|
|
38
|
+
SUBSCRIPTION_MODEL_CATALOG,
|
|
39
|
+
subscriptionProviderHasCatalog
|
|
40
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { SubscriptionProviderId } from './subscription-types.cjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* subscription-model-catalog — the static model-id catalog each built-in
|
|
5
|
+
* subscription provider exposes on its upstream, used to populate the
|
|
6
|
+
* subscription-mode model pickers in the API Service routing editor.
|
|
7
|
+
*
|
|
8
|
+
* These are the model ids the upstream subscription backend actually accepts
|
|
9
|
+
* (Codex → `chatgpt.com/backend-api/codex/responses`, Claude → Anthropic,
|
|
10
|
+
* etc.). They are maintained by hand against the upstream catalog — same
|
|
11
|
+
* convention as `outbound-api`'s `ENDPOINT_MODEL_KINDS`. The UI carries a
|
|
12
|
+
* mirror pinned by test (it ships as standalone static assets with no
|
|
13
|
+
* contracts runtime dep); update both in lockstep.
|
|
14
|
+
*
|
|
15
|
+
* Ordering is small → large within each provider (matches the editor's
|
|
16
|
+
* picker render order).
|
|
17
|
+
*
|
|
18
|
+
* `gemini` / `opencodego` are intentionally empty for now — their upstream
|
|
19
|
+
* subscription model ids are not yet confirmed; the UI disables model
|
|
20
|
+
* selection for those types until they are filled in (does not block the
|
|
21
|
+
* Claude/Codex paths).
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The model ids each subscription provider serves, small → large.
|
|
26
|
+
*
|
|
27
|
+
* - claude: `claude-haiku-4-5` < `claude-sonnet-5` < `claude-opus-5` < `claude-fable-5`
|
|
28
|
+
* - codex: `gpt-5.6-luna` (nano) < `gpt-5.6-terra` (mini) < `gpt-5.6-sol` (flagship)
|
|
29
|
+
*/
|
|
30
|
+
declare const SUBSCRIPTION_MODEL_CATALOG: Record<SubscriptionProviderId, string[]>;
|
|
31
|
+
/** Whether a provider has any cataloged models (drives UI model-picker gating). */
|
|
32
|
+
declare function subscriptionProviderHasCatalog(providerId: SubscriptionProviderId): boolean;
|
|
33
|
+
|
|
34
|
+
export { SUBSCRIPTION_MODEL_CATALOG, subscriptionProviderHasCatalog };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { SubscriptionProviderId } from './subscription-types.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* subscription-model-catalog — the static model-id catalog each built-in
|
|
5
|
+
* subscription provider exposes on its upstream, used to populate the
|
|
6
|
+
* subscription-mode model pickers in the API Service routing editor.
|
|
7
|
+
*
|
|
8
|
+
* These are the model ids the upstream subscription backend actually accepts
|
|
9
|
+
* (Codex → `chatgpt.com/backend-api/codex/responses`, Claude → Anthropic,
|
|
10
|
+
* etc.). They are maintained by hand against the upstream catalog — same
|
|
11
|
+
* convention as `outbound-api`'s `ENDPOINT_MODEL_KINDS`. The UI carries a
|
|
12
|
+
* mirror pinned by test (it ships as standalone static assets with no
|
|
13
|
+
* contracts runtime dep); update both in lockstep.
|
|
14
|
+
*
|
|
15
|
+
* Ordering is small → large within each provider (matches the editor's
|
|
16
|
+
* picker render order).
|
|
17
|
+
*
|
|
18
|
+
* `gemini` / `opencodego` are intentionally empty for now — their upstream
|
|
19
|
+
* subscription model ids are not yet confirmed; the UI disables model
|
|
20
|
+
* selection for those types until they are filled in (does not block the
|
|
21
|
+
* Claude/Codex paths).
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The model ids each subscription provider serves, small → large.
|
|
26
|
+
*
|
|
27
|
+
* - claude: `claude-haiku-4-5` < `claude-sonnet-5` < `claude-opus-5` < `claude-fable-5`
|
|
28
|
+
* - codex: `gpt-5.6-luna` (nano) < `gpt-5.6-terra` (mini) < `gpt-5.6-sol` (flagship)
|
|
29
|
+
*/
|
|
30
|
+
declare const SUBSCRIPTION_MODEL_CATALOG: Record<SubscriptionProviderId, string[]>;
|
|
31
|
+
/** Whether a provider has any cataloged models (drives UI model-picker gating). */
|
|
32
|
+
declare function subscriptionProviderHasCatalog(providerId: SubscriptionProviderId): boolean;
|
|
33
|
+
|
|
34
|
+
export { SUBSCRIPTION_MODEL_CATALOG, subscriptionProviderHasCatalog };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// src/subscription-model-catalog.ts
|
|
2
|
+
var SUBSCRIPTION_MODEL_CATALOG = {
|
|
3
|
+
claude: ["claude-haiku-4-5", "claude-sonnet-5", "claude-opus-5", "claude-fable-5"],
|
|
4
|
+
codex: ["gpt-5.6-luna", "gpt-5.6-terra", "gpt-5.6-sol"],
|
|
5
|
+
gemini: [],
|
|
6
|
+
opencodego: []
|
|
7
|
+
};
|
|
8
|
+
function subscriptionProviderHasCatalog(providerId) {
|
|
9
|
+
return SUBSCRIPTION_MODEL_CATALOG[providerId].length > 0;
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
SUBSCRIPTION_MODEL_CATALOG,
|
|
13
|
+
subscriptionProviderHasCatalog
|
|
14
|
+
};
|
package/package.json
CHANGED
|
@@ -1,151 +1,156 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@omnicross/contracts",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Dependency-light, host-agnostic contract types + runtime-value helpers shared by the @omnicross/* packages.",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"author": "Sayo (https://github.com/Dumoedss)",
|
|
7
|
-
"homepage": "https://github.com/Dumoedss/omnicross#readme",
|
|
8
|
-
"keywords": [
|
|
9
|
-
"omnicross",
|
|
10
|
-
"llm",
|
|
11
|
-
"openai",
|
|
12
|
-
"anthropic",
|
|
13
|
-
"gemini",
|
|
14
|
-
"types",
|
|
15
|
-
"contracts"
|
|
16
|
-
],
|
|
17
|
-
"repository": {
|
|
18
|
-
"type": "git",
|
|
19
|
-
"url": "git+https://github.com/Dumoedss/omnicross.git",
|
|
20
|
-
"directory": "packages/contracts"
|
|
21
|
-
},
|
|
22
|
-
"publishConfig": {
|
|
23
|
-
"access": "public"
|
|
24
|
-
},
|
|
25
|
-
"engines": {
|
|
26
|
-
"node": ">=20"
|
|
27
|
-
},
|
|
28
|
-
"type": "module",
|
|
29
|
-
"main": "dist/index.cjs",
|
|
30
|
-
"module": "dist/index.js",
|
|
31
|
-
"types": "dist/index.d.ts",
|
|
32
|
-
"exports": {
|
|
33
|
-
".": {
|
|
34
|
-
"types": "./dist/index.d.ts",
|
|
35
|
-
"import": "./dist/index.js",
|
|
36
|
-
"require": "./dist/index.cjs"
|
|
37
|
-
},
|
|
38
|
-
"./account-tokens-types": {
|
|
39
|
-
"types": "./dist/account-tokens-types.d.ts",
|
|
40
|
-
"import": "./dist/account-tokens-types.js",
|
|
41
|
-
"require": "./dist/account-tokens-types.cjs"
|
|
42
|
-
},
|
|
43
|
-
"./audit-types": {
|
|
44
|
-
"types": "./dist/audit-types.d.ts",
|
|
45
|
-
"import": "./dist/audit-types.js",
|
|
46
|
-
"require": "./dist/audit-types.cjs"
|
|
47
|
-
},
|
|
48
|
-
"./billing-types": {
|
|
49
|
-
"types": "./dist/billing-types.d.ts",
|
|
50
|
-
"import": "./dist/billing-types.js",
|
|
51
|
-
"require": "./dist/billing-types.cjs"
|
|
52
|
-
},
|
|
53
|
-
"./canonical-models": {
|
|
54
|
-
"types": "./dist/canonical-models.d.ts",
|
|
55
|
-
"import": "./dist/canonical-models.js",
|
|
56
|
-
"require": "./dist/canonical-models.cjs"
|
|
57
|
-
},
|
|
58
|
-
"./completion-types": {
|
|
59
|
-
"types": "./dist/completion-types.d.ts",
|
|
60
|
-
"import": "./dist/completion-types.js",
|
|
61
|
-
"require": "./dist/completion-types.cjs"
|
|
62
|
-
},
|
|
63
|
-
"./endpoint-resolver": {
|
|
64
|
-
"types": "./dist/endpoint-resolver.d.ts",
|
|
65
|
-
"import": "./dist/endpoint-resolver.js",
|
|
66
|
-
"require": "./dist/endpoint-resolver.cjs"
|
|
67
|
-
},
|
|
68
|
-
"./extended-context": {
|
|
69
|
-
"types": "./dist/extended-context.d.ts",
|
|
70
|
-
"import": "./dist/extended-context.js",
|
|
71
|
-
"require": "./dist/extended-context.cjs"
|
|
72
|
-
},
|
|
73
|
-
"./health-logging-types": {
|
|
74
|
-
"types": "./dist/health-logging-types.d.ts",
|
|
75
|
-
"import": "./dist/health-logging-types.js",
|
|
76
|
-
"require": "./dist/health-logging-types.cjs"
|
|
77
|
-
},
|
|
78
|
-
"./llm-config": {
|
|
79
|
-
"types": "./dist/llm-config.d.ts",
|
|
80
|
-
"import": "./dist/llm-config.js",
|
|
81
|
-
"require": "./dist/llm-config.cjs"
|
|
82
|
-
},
|
|
83
|
-
"./mcp-types": {
|
|
84
|
-
"types": "./dist/mcp-types.d.ts",
|
|
85
|
-
"import": "./dist/mcp-types.js",
|
|
86
|
-
"require": "./dist/mcp-types.cjs"
|
|
87
|
-
},
|
|
88
|
-
"./message-blocks": {
|
|
89
|
-
"types": "./dist/message-blocks.d.ts",
|
|
90
|
-
"import": "./dist/message-blocks.js",
|
|
91
|
-
"require": "./dist/message-blocks.cjs"
|
|
92
|
-
},
|
|
93
|
-
"./pricing-types": {
|
|
94
|
-
"types": "./dist/pricing-types.d.ts",
|
|
95
|
-
"import": "./dist/pricing-types.js",
|
|
96
|
-
"require": "./dist/pricing-types.cjs"
|
|
97
|
-
},
|
|
98
|
-
"./provider-presets": {
|
|
99
|
-
"types": "./dist/provider-presets/index.d.ts",
|
|
100
|
-
"import": "./dist/provider-presets/index.js",
|
|
101
|
-
"require": "./dist/provider-presets/index.cjs"
|
|
102
|
-
},
|
|
103
|
-
"./subscription-
|
|
104
|
-
"types": "./dist/subscription-
|
|
105
|
-
"import": "./dist/subscription-
|
|
106
|
-
"require": "./dist/subscription-
|
|
107
|
-
},
|
|
108
|
-
"./
|
|
109
|
-
"types": "./dist/
|
|
110
|
-
"import": "./dist/
|
|
111
|
-
"require": "./dist/
|
|
112
|
-
},
|
|
113
|
-
"./
|
|
114
|
-
"types": "./dist/
|
|
115
|
-
"import": "./dist/
|
|
116
|
-
"require": "./dist/
|
|
117
|
-
},
|
|
118
|
-
"./usage-types": {
|
|
119
|
-
"types": "./dist/usage-types.d.ts",
|
|
120
|
-
"import": "./dist/usage-types.js",
|
|
121
|
-
"require": "./dist/usage-types.cjs"
|
|
122
|
-
},
|
|
123
|
-
"./
|
|
124
|
-
"types": "./dist/
|
|
125
|
-
"import": "./dist/
|
|
126
|
-
"require": "./dist/
|
|
127
|
-
},
|
|
128
|
-
"./
|
|
129
|
-
"types": "./dist/
|
|
130
|
-
"import": "./dist/
|
|
131
|
-
"require": "./dist/
|
|
132
|
-
},
|
|
133
|
-
"./
|
|
134
|
-
"types": "./dist/
|
|
135
|
-
"import": "./dist/
|
|
136
|
-
"require": "./dist/
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
"
|
|
145
|
-
"
|
|
146
|
-
"
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@omnicross/contracts",
|
|
3
|
+
"version": "0.1.4",
|
|
4
|
+
"description": "Dependency-light, host-agnostic contract types + runtime-value helpers shared by the @omnicross/* packages.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Sayo (https://github.com/Dumoedss)",
|
|
7
|
+
"homepage": "https://github.com/Dumoedss/omnicross#readme",
|
|
8
|
+
"keywords": [
|
|
9
|
+
"omnicross",
|
|
10
|
+
"llm",
|
|
11
|
+
"openai",
|
|
12
|
+
"anthropic",
|
|
13
|
+
"gemini",
|
|
14
|
+
"types",
|
|
15
|
+
"contracts"
|
|
16
|
+
],
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/Dumoedss/omnicross.git",
|
|
20
|
+
"directory": "packages/contracts"
|
|
21
|
+
},
|
|
22
|
+
"publishConfig": {
|
|
23
|
+
"access": "public"
|
|
24
|
+
},
|
|
25
|
+
"engines": {
|
|
26
|
+
"node": ">=20"
|
|
27
|
+
},
|
|
28
|
+
"type": "module",
|
|
29
|
+
"main": "dist/index.cjs",
|
|
30
|
+
"module": "dist/index.js",
|
|
31
|
+
"types": "dist/index.d.ts",
|
|
32
|
+
"exports": {
|
|
33
|
+
".": {
|
|
34
|
+
"types": "./dist/index.d.ts",
|
|
35
|
+
"import": "./dist/index.js",
|
|
36
|
+
"require": "./dist/index.cjs"
|
|
37
|
+
},
|
|
38
|
+
"./account-tokens-types": {
|
|
39
|
+
"types": "./dist/account-tokens-types.d.ts",
|
|
40
|
+
"import": "./dist/account-tokens-types.js",
|
|
41
|
+
"require": "./dist/account-tokens-types.cjs"
|
|
42
|
+
},
|
|
43
|
+
"./audit-types": {
|
|
44
|
+
"types": "./dist/audit-types.d.ts",
|
|
45
|
+
"import": "./dist/audit-types.js",
|
|
46
|
+
"require": "./dist/audit-types.cjs"
|
|
47
|
+
},
|
|
48
|
+
"./billing-types": {
|
|
49
|
+
"types": "./dist/billing-types.d.ts",
|
|
50
|
+
"import": "./dist/billing-types.js",
|
|
51
|
+
"require": "./dist/billing-types.cjs"
|
|
52
|
+
},
|
|
53
|
+
"./canonical-models": {
|
|
54
|
+
"types": "./dist/canonical-models.d.ts",
|
|
55
|
+
"import": "./dist/canonical-models.js",
|
|
56
|
+
"require": "./dist/canonical-models.cjs"
|
|
57
|
+
},
|
|
58
|
+
"./completion-types": {
|
|
59
|
+
"types": "./dist/completion-types.d.ts",
|
|
60
|
+
"import": "./dist/completion-types.js",
|
|
61
|
+
"require": "./dist/completion-types.cjs"
|
|
62
|
+
},
|
|
63
|
+
"./endpoint-resolver": {
|
|
64
|
+
"types": "./dist/endpoint-resolver.d.ts",
|
|
65
|
+
"import": "./dist/endpoint-resolver.js",
|
|
66
|
+
"require": "./dist/endpoint-resolver.cjs"
|
|
67
|
+
},
|
|
68
|
+
"./extended-context": {
|
|
69
|
+
"types": "./dist/extended-context.d.ts",
|
|
70
|
+
"import": "./dist/extended-context.js",
|
|
71
|
+
"require": "./dist/extended-context.cjs"
|
|
72
|
+
},
|
|
73
|
+
"./health-logging-types": {
|
|
74
|
+
"types": "./dist/health-logging-types.d.ts",
|
|
75
|
+
"import": "./dist/health-logging-types.js",
|
|
76
|
+
"require": "./dist/health-logging-types.cjs"
|
|
77
|
+
},
|
|
78
|
+
"./llm-config": {
|
|
79
|
+
"types": "./dist/llm-config.d.ts",
|
|
80
|
+
"import": "./dist/llm-config.js",
|
|
81
|
+
"require": "./dist/llm-config.cjs"
|
|
82
|
+
},
|
|
83
|
+
"./mcp-types": {
|
|
84
|
+
"types": "./dist/mcp-types.d.ts",
|
|
85
|
+
"import": "./dist/mcp-types.js",
|
|
86
|
+
"require": "./dist/mcp-types.cjs"
|
|
87
|
+
},
|
|
88
|
+
"./message-blocks": {
|
|
89
|
+
"types": "./dist/message-blocks.d.ts",
|
|
90
|
+
"import": "./dist/message-blocks.js",
|
|
91
|
+
"require": "./dist/message-blocks.cjs"
|
|
92
|
+
},
|
|
93
|
+
"./pricing-types": {
|
|
94
|
+
"types": "./dist/pricing-types.d.ts",
|
|
95
|
+
"import": "./dist/pricing-types.js",
|
|
96
|
+
"require": "./dist/pricing-types.cjs"
|
|
97
|
+
},
|
|
98
|
+
"./provider-presets": {
|
|
99
|
+
"types": "./dist/provider-presets/index.d.ts",
|
|
100
|
+
"import": "./dist/provider-presets/index.js",
|
|
101
|
+
"require": "./dist/provider-presets/index.cjs"
|
|
102
|
+
},
|
|
103
|
+
"./subscription-model-catalog": {
|
|
104
|
+
"types": "./dist/subscription-model-catalog.d.ts",
|
|
105
|
+
"import": "./dist/subscription-model-catalog.js",
|
|
106
|
+
"require": "./dist/subscription-model-catalog.cjs"
|
|
107
|
+
},
|
|
108
|
+
"./subscription-types": {
|
|
109
|
+
"types": "./dist/subscription-types.d.ts",
|
|
110
|
+
"import": "./dist/subscription-types.js",
|
|
111
|
+
"require": "./dist/subscription-types.cjs"
|
|
112
|
+
},
|
|
113
|
+
"./thinking-config": {
|
|
114
|
+
"types": "./dist/thinking-config.d.ts",
|
|
115
|
+
"import": "./dist/thinking-config.js",
|
|
116
|
+
"require": "./dist/thinking-config.cjs"
|
|
117
|
+
},
|
|
118
|
+
"./usage-stats-types": {
|
|
119
|
+
"types": "./dist/usage-stats-types.d.ts",
|
|
120
|
+
"import": "./dist/usage-stats-types.js",
|
|
121
|
+
"require": "./dist/usage-stats-types.cjs"
|
|
122
|
+
},
|
|
123
|
+
"./usage-types": {
|
|
124
|
+
"types": "./dist/usage-types.d.ts",
|
|
125
|
+
"import": "./dist/usage-types.js",
|
|
126
|
+
"require": "./dist/usage-types.cjs"
|
|
127
|
+
},
|
|
128
|
+
"./voucher-types": {
|
|
129
|
+
"types": "./dist/voucher-types.d.ts",
|
|
130
|
+
"import": "./dist/voucher-types.js",
|
|
131
|
+
"require": "./dist/voucher-types.cjs"
|
|
132
|
+
},
|
|
133
|
+
"./webhook-types": {
|
|
134
|
+
"types": "./dist/webhook-types.d.ts",
|
|
135
|
+
"import": "./dist/webhook-types.js",
|
|
136
|
+
"require": "./dist/webhook-types.cjs"
|
|
137
|
+
},
|
|
138
|
+
"./websearch-types": {
|
|
139
|
+
"types": "./dist/websearch-types.d.ts",
|
|
140
|
+
"import": "./dist/websearch-types.js",
|
|
141
|
+
"require": "./dist/websearch-types.cjs"
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"files": [
|
|
145
|
+
"dist",
|
|
146
|
+
"LICENSE",
|
|
147
|
+
"README.md"
|
|
148
|
+
],
|
|
149
|
+
"scripts": {
|
|
150
|
+
"build": "tsup",
|
|
151
|
+
"typecheck": "tsc -p tsconfig.typecheck.json --noEmit"
|
|
152
|
+
},
|
|
153
|
+
"dependencies": {
|
|
154
|
+
"zod": "^4.3.6"
|
|
155
|
+
}
|
|
156
|
+
}
|