@oh-my-pi/pi-catalog 18.4.4 → 18.4.6
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 +31 -0
- package/dist/types/compat/auth-ids.d.ts +2 -2
- package/dist/types/compat/axes.d.ts +3 -1
- package/dist/types/compat/factory-droid.d.ts +65 -0
- package/dist/types/compat/provider-ids.d.ts +1 -1
- package/dist/types/compat/resolve.d.ts +8 -2
- package/dist/types/compat/types.d.ts +26 -1
- package/dist/types/discovery/cursor-proto.d.ts +284 -0
- package/dist/types/discovery/cursor.d.ts +12 -6
- package/dist/types/discovery/factory-droid.d.ts +28 -0
- package/dist/types/discovery/index.d.ts +1 -0
- package/dist/types/discovery/protobuf.d.ts +3 -3
- package/dist/types/model-manager.d.ts +10 -0
- package/dist/types/models.d.ts +5 -1
- package/dist/types/provider-models/cache-provider-id.d.ts +2 -1
- package/dist/types/provider-models/descriptor-types.d.ts +2 -1
- package/dist/types/provider-models/openai-compat.d.ts +21 -0
- package/dist/types/provider-models/special.d.ts +2 -0
- package/dist/types/types.d.ts +100 -3
- package/dist/types/wire/cursor.d.ts +20 -0
- package/dist/types/wire/factory-droid.d.ts +45 -0
- package/package.json +4 -4
- package/src/build.ts +21 -0
- package/src/compat/auth-ids.ts +4 -0
- package/src/compat/axes.ts +113 -2
- package/src/compat/cascade.ts +8 -1
- package/src/compat/collapse.ts +3 -0
- package/src/compat/factory-droid.ts +170 -0
- package/src/compat/provider-ids.ts +2 -0
- package/src/compat/resolve.ts +47 -5
- package/src/compat/rules/README.md +18 -8
- package/src/compat/rules/auth/_order.kdl +2 -2
- package/src/compat/rules/auth/factory-droid.kdl +28 -0
- package/src/compat/rules/auth/helmcode.kdl +9 -0
- package/src/compat/rules/classes/anthropic.kdl +195 -80
- package/src/compat/rules/providers/commandcode.kdl +21 -5
- package/src/compat/rules/providers/cursor.kdl +29 -17
- package/src/compat/rules/providers/factory-droid.kdl +1166 -0
- package/src/compat/rules/providers/helmcode.kdl +120 -0
- package/src/compat/rules/runtime/behavior.kdl +65 -4
- package/src/compat/rules/taxonomy/_collapse.kdl +36 -14
- package/src/compat/rules.json +1 -1
- package/src/compat/types.ts +27 -1
- package/src/discovery/cursor-models.proto +261 -0
- package/src/discovery/cursor-proto.ts +471 -0
- package/src/discovery/cursor.ts +817 -88
- package/src/discovery/devin.ts +1 -3
- package/src/discovery/factory-droid.ts +296 -0
- package/src/discovery/index.ts +1 -0
- package/src/discovery/protobuf.ts +16 -7
- package/src/model-manager.ts +13 -0
- package/src/models.json +1 -1
- package/src/models.ts +13 -0
- package/src/provider-models/cache-provider-id.ts +37 -6
- package/src/provider-models/descriptor-types.ts +2 -1
- package/src/provider-models/descriptors.ts +4 -0
- package/src/provider-models/openai-compat.ts +83 -17
- package/src/provider-models/special.ts +26 -2
- package/src/types.ts +112 -1
- package/src/wire/cursor.ts +32 -0
- package/src/wire/factory-droid.ts +130 -0
package/src/compat/types.ts
CHANGED
|
@@ -213,6 +213,8 @@ export interface CompiledRule {
|
|
|
213
213
|
providers?: string[];
|
|
214
214
|
/** Request adapter identifiers matched by an `on-api` selector. */
|
|
215
215
|
apis?: string[];
|
|
216
|
+
/** Selected upstream behind a deployment, matched by `on-upstream`. */
|
|
217
|
+
upstreams?: string[];
|
|
216
218
|
family?: string;
|
|
217
219
|
revision?: CompiledRevisionTerm[];
|
|
218
220
|
models?: CompiledSelector[];
|
|
@@ -593,8 +595,9 @@ export interface CompiledAuth {
|
|
|
593
595
|
* - `always`: every regeneration; same-id upstream/discovery rows win dedup.
|
|
594
596
|
* - `fallback`: only when authoritative catalog discovery did not succeed.
|
|
595
597
|
* - `empty`: only when no other source produced a row for the provider.
|
|
598
|
+
* - `never`: runtime-only; the provider's model manager is the sole consumer.
|
|
596
599
|
*/
|
|
597
|
-
export type SeedBundlePolicy = "always" | "fallback" | "empty";
|
|
600
|
+
export type SeedBundlePolicy = "always" | "fallback" | "empty" | "never";
|
|
598
601
|
|
|
599
602
|
/** Catalog-generation discovery settings (`discovery` node in `providers/<id>.kdl`). */
|
|
600
603
|
export interface CompiledProviderDiscovery {
|
|
@@ -705,6 +708,8 @@ export interface ResolveTarget {
|
|
|
705
708
|
provider: string;
|
|
706
709
|
/** Request adapter used to serialize the model. */
|
|
707
710
|
api: string;
|
|
711
|
+
/** Actual upstream chosen for this request, not the deployment provider. */
|
|
712
|
+
upstream?: string;
|
|
708
713
|
/** Centrally classified vendor lineage. */
|
|
709
714
|
class: string;
|
|
710
715
|
/** Classified product family within the class, when known. */
|
|
@@ -731,3 +736,24 @@ export interface ResolvedAxes {
|
|
|
731
736
|
*/
|
|
732
737
|
reasoning: boolean;
|
|
733
738
|
}
|
|
739
|
+
|
|
740
|
+
/** Selected-route request dialect. Absent fields impose no deployment override. */
|
|
741
|
+
export interface RequestPolicy {
|
|
742
|
+
completionsReasoningMode?: "none" | "effort" | "opt-in" | "forced-on";
|
|
743
|
+
completionsReasoningHistory?: "omit" | "preserved" | "interleaved";
|
|
744
|
+
anthropicThinking?: "adaptive" | "adaptive-summarized" | "budget-interleaved" | "budget-effort";
|
|
745
|
+
/** Advertise `fine-grained-tool-streaming-2025-05-14` on requests that carry tools. */
|
|
746
|
+
anthropicToolStreamingBeta?: boolean;
|
|
747
|
+
/** `OpenAI-Platform` header value the route sends on OpenAI-family wires. */
|
|
748
|
+
openaiPlatformHeader?: string;
|
|
749
|
+
responsesCacheRetention?: boolean;
|
|
750
|
+
responsesVerbosity?: "low";
|
|
751
|
+
responsesServiceTier?: "priority";
|
|
752
|
+
responsesParallelToolCalls?: boolean;
|
|
753
|
+
responsesSafetyIdentifier?: boolean;
|
|
754
|
+
/** Default `tool_choice` to `auto` when the request carries tools and the caller picks none. */
|
|
755
|
+
responsesToolChoiceAuto?: boolean;
|
|
756
|
+
googleThinking?: "level" | "level-medium";
|
|
757
|
+
/** The route locks its upstream for the session (`x-provider-routing-source: session_lock`). */
|
|
758
|
+
routingSessionLock?: boolean;
|
|
759
|
+
}
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package aiserver.v1;
|
|
4
|
+
|
|
5
|
+
// Sanitized subset of Cursor's current AvailableModels protocol. Field numbers
|
|
6
|
+
// and wire types match the official CLI; unknown fields remain forward-compatible.
|
|
7
|
+
message AvailableModelsRequest {
|
|
8
|
+
bool is_nightly = 1;
|
|
9
|
+
bool include_long_context_models = 2;
|
|
10
|
+
bool exclude_max_named_models = 3;
|
|
11
|
+
repeated string additional_model_names = 4;
|
|
12
|
+
optional bool use_model_parameters = 5;
|
|
13
|
+
optional bool include_hidden_models = 6;
|
|
14
|
+
optional bool do_not_use_markdown = 7;
|
|
15
|
+
optional bool variants_will_be_shown_in_exploded_list = 8;
|
|
16
|
+
optional bool for_automations = 9;
|
|
17
|
+
optional int32 scope = 10;
|
|
18
|
+
optional bool use_react_model_picker = 11;
|
|
19
|
+
optional bool use_cloud_agent_effort_modes = 12;
|
|
20
|
+
optional string admin_settings_group_public_id = 13;
|
|
21
|
+
optional bool byok_enabled = 14;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
message AvailableModelsResponse {
|
|
25
|
+
repeated string model_names = 1;
|
|
26
|
+
repeated ModelDetails models = 2;
|
|
27
|
+
bool use_model_parameters = 11;
|
|
28
|
+
|
|
29
|
+
enum DegradationStatus {
|
|
30
|
+
DEGRADATION_STATUS_UNSPECIFIED = 0;
|
|
31
|
+
DEGRADATION_STATUS_DEGRADED = 1;
|
|
32
|
+
DEGRADATION_STATUS_DISABLED = 2;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
enum ModelVendorId {
|
|
36
|
+
MODEL_VENDOR_ID_UNSPECIFIED = 0;
|
|
37
|
+
MODEL_VENDOR_ID_ANTHROPIC = 1;
|
|
38
|
+
MODEL_VENDOR_ID_OPENAI = 2;
|
|
39
|
+
MODEL_VENDOR_ID_GOOGLE = 3;
|
|
40
|
+
MODEL_VENDOR_ID_XAI = 4;
|
|
41
|
+
MODEL_VENDOR_ID_MOONSHOT = 5;
|
|
42
|
+
MODEL_VENDOR_ID_CURSOR = 6;
|
|
43
|
+
MODEL_VENDOR_ID_NVIDIA = 7;
|
|
44
|
+
MODEL_VENDOR_ID_ZAI = 8;
|
|
45
|
+
MODEL_VENDOR_ID_META = 9;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
message TooltipData {
|
|
49
|
+
string primary_text = 1;
|
|
50
|
+
string secondary_text = 2;
|
|
51
|
+
string secondary_warning_text = 3;
|
|
52
|
+
string icon = 4;
|
|
53
|
+
string tertiary_text = 5;
|
|
54
|
+
optional string tertiary_text_url = 6;
|
|
55
|
+
optional string markdown_content = 7;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
message ModelVendor {
|
|
59
|
+
ModelVendorId id = 1;
|
|
60
|
+
string display_name = 2;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
message ModelVariantConfig {
|
|
64
|
+
repeated ModelParameterValue parameter_values = 1;
|
|
65
|
+
optional string display_name = 2;
|
|
66
|
+
optional bool is_max_mode = 3;
|
|
67
|
+
optional bool is_default_max_config = 4;
|
|
68
|
+
optional bool is_default_non_max_config = 5;
|
|
69
|
+
optional TooltipData tooltip_data = 6;
|
|
70
|
+
optional string tagline = 7;
|
|
71
|
+
optional string display_name_outside_picker = 8;
|
|
72
|
+
optional string variant_string_representation = 9;
|
|
73
|
+
optional ConfirmationDialogue confirmation_dialogue = 10;
|
|
74
|
+
optional string legacy_slug = 11;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
message ConfirmationDialogue {
|
|
78
|
+
string title = 1;
|
|
79
|
+
string body = 2;
|
|
80
|
+
string key = 3;
|
|
81
|
+
bool blocks_submission = 4;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
message ModelDetails {
|
|
85
|
+
string name = 1;
|
|
86
|
+
bool default_on = 2;
|
|
87
|
+
optional bool is_long_context_only = 3;
|
|
88
|
+
optional bool is_chat_only = 4;
|
|
89
|
+
optional bool supports_agent = 5;
|
|
90
|
+
optional DegradationStatus degradation_status = 6;
|
|
91
|
+
optional double price = 7;
|
|
92
|
+
optional TooltipData tooltip_data = 8;
|
|
93
|
+
optional bool supports_thinking = 9;
|
|
94
|
+
optional bool supports_images = 10;
|
|
95
|
+
optional bool supports_auto_context = 11;
|
|
96
|
+
optional uint32 auto_context_max_tokens = 12;
|
|
97
|
+
optional uint32 auto_context_extended_max_tokens = 13;
|
|
98
|
+
optional bool supports_max_mode = 14;
|
|
99
|
+
optional uint32 context_token_limit = 15;
|
|
100
|
+
optional uint32 context_token_limit_for_max_mode = 16;
|
|
101
|
+
optional string client_display_name = 17;
|
|
102
|
+
optional string server_model_name = 18;
|
|
103
|
+
optional bool supports_non_max_mode = 19;
|
|
104
|
+
optional TooltipData tooltip_data_for_max_mode = 20;
|
|
105
|
+
optional bool is_recommended_for_background_composer = 21;
|
|
106
|
+
optional bool supports_plan_mode = 22;
|
|
107
|
+
optional bool is_user_added = 23;
|
|
108
|
+
optional string inputbox_short_model_name = 24;
|
|
109
|
+
optional bool supports_sandboxing = 25;
|
|
110
|
+
optional bool supports_cmd_k = 26;
|
|
111
|
+
optional bool only_supports_cmd_k = 27;
|
|
112
|
+
optional uint32 background_composer_sort_order = 28;
|
|
113
|
+
repeated ModelParameterDefinition parameter_definitions = 29;
|
|
114
|
+
repeated ModelVariantConfig variants = 30;
|
|
115
|
+
optional int32 cloud_agent_effort_mode = 32;
|
|
116
|
+
optional string cloud_migrate_to_model = 33;
|
|
117
|
+
optional string upgrade_model_id = 34;
|
|
118
|
+
optional bool is_hidden = 35;
|
|
119
|
+
repeated string legacy_slugs = 36;
|
|
120
|
+
repeated string id_aliases = 37;
|
|
121
|
+
optional uint32 named_model_section_index = 38;
|
|
122
|
+
optional string tagline = 39;
|
|
123
|
+
optional bool visible_in_routed_model_view = 40;
|
|
124
|
+
optional string vendor_name = 41;
|
|
125
|
+
optional ModelVendor vendor = 42;
|
|
126
|
+
optional bool default_disabled_in_admin_allowlist = 43;
|
|
127
|
+
repeated int32 cloud_agent_effort_modes = 44;
|
|
128
|
+
optional bool supports_smart_mode_classifier = 45;
|
|
129
|
+
optional bool requires_data_retention = 46;
|
|
130
|
+
optional string reason_for_zdr_consent_block = 47;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
message ModelParameterValue {
|
|
135
|
+
string id = 1;
|
|
136
|
+
string value = 2;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
message ModelParameterDefinition {
|
|
140
|
+
string id = 1;
|
|
141
|
+
string name = 2;
|
|
142
|
+
optional string markdown_tooltip = 3;
|
|
143
|
+
ModelParameterType parameter_type = 4;
|
|
144
|
+
optional bool is_cycleable_by_hotkey = 5;
|
|
145
|
+
|
|
146
|
+
message ModelParameterType {
|
|
147
|
+
optional BooleanParameterDefinition boolean_parameter = 1;
|
|
148
|
+
optional EnumParameterDefinition enum_parameter = 2;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
message BooleanParameterDefinition {
|
|
152
|
+
repeated BooleanParameterValue values = 1;
|
|
153
|
+
|
|
154
|
+
message BooleanParameterValue {
|
|
155
|
+
string value = 1;
|
|
156
|
+
optional string display_name = 2;
|
|
157
|
+
optional bool increases_model_cost = 3;
|
|
158
|
+
optional bool default_blocked_in_admin_allowlist = 4;
|
|
159
|
+
optional bool hide_from_user_picker_when_admin_blocked = 5;
|
|
160
|
+
optional bool blocked_by_admin_allowlist = 6;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
message EnumParameterDefinition {
|
|
165
|
+
repeated EnumParameterValue values = 1;
|
|
166
|
+
|
|
167
|
+
message EnumParameterValue {
|
|
168
|
+
string value = 1;
|
|
169
|
+
optional string display_name = 2;
|
|
170
|
+
optional bool increases_model_cost = 3;
|
|
171
|
+
optional bool blocked_by_admin_allowlist = 4;
|
|
172
|
+
optional string markdown_tooltip = 5;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
message ErrorDetails {
|
|
178
|
+
CursorError error = 1;
|
|
179
|
+
CustomErrorDetails details = 2;
|
|
180
|
+
optional bool is_expected = 3;
|
|
181
|
+
|
|
182
|
+
enum CursorError {
|
|
183
|
+
ERROR_UNSPECIFIED = 0;
|
|
184
|
+
ERROR_BAD_API_KEY = 1;
|
|
185
|
+
ERROR_NOT_LOGGED_IN = 2;
|
|
186
|
+
ERROR_INVALID_AUTH_ID = 3;
|
|
187
|
+
ERROR_NOT_HIGH_ENOUGH_PERMISSIONS = 4;
|
|
188
|
+
ERROR_BAD_MODEL_NAME = 5;
|
|
189
|
+
ERROR_USER_NOT_FOUND = 6;
|
|
190
|
+
ERROR_FREE_USER_RATE_LIMIT_EXCEEDED = 7;
|
|
191
|
+
ERROR_PRO_USER_RATE_LIMIT_EXCEEDED = 8;
|
|
192
|
+
ERROR_FREE_USER_USAGE_LIMIT = 9;
|
|
193
|
+
ERROR_PRO_USER_USAGE_LIMIT = 10;
|
|
194
|
+
ERROR_AUTH_TOKEN_NOT_FOUND = 11;
|
|
195
|
+
ERROR_AUTH_TOKEN_EXPIRED = 12;
|
|
196
|
+
ERROR_OPENAI = 13;
|
|
197
|
+
ERROR_OPENAI_RATE_LIMIT_EXCEEDED = 14;
|
|
198
|
+
ERROR_AGENT_REQUIRES_LOGIN = 18;
|
|
199
|
+
ERROR_MAX_TOKENS = 20;
|
|
200
|
+
ERROR_USER_ABORTED_REQUEST = 21;
|
|
201
|
+
ERROR_GENERIC_RATE_LIMIT_EXCEEDED = 22;
|
|
202
|
+
ERROR_PRO_USER_ONLY = 23;
|
|
203
|
+
ERROR_TIMEOUT = 25;
|
|
204
|
+
ERROR_GPT_4_VISION_PREVIEW_RATE_LIMIT = 28;
|
|
205
|
+
ERROR_CUSTOM_MESSAGE = 29;
|
|
206
|
+
ERROR_OUTDATED_CLIENT = 30;
|
|
207
|
+
ERROR_CLAUDE_IMAGE_TOO_LARGE = 31;
|
|
208
|
+
ERROR_FILE_NOT_FOUND = 33;
|
|
209
|
+
ERROR_API_KEY_RATE_LIMIT = 34;
|
|
210
|
+
ERROR_DEBOUNCED = 35;
|
|
211
|
+
ERROR_BAD_REQUEST = 36;
|
|
212
|
+
ERROR_REPOSITORY_SERVICE_REPOSITORY_IS_NOT_INITIALIZED = 37;
|
|
213
|
+
ERROR_UNAUTHORIZED = 38;
|
|
214
|
+
ERROR_NOT_FOUND = 39;
|
|
215
|
+
ERROR_DEPRECATED = 40;
|
|
216
|
+
ERROR_RESOURCE_EXHAUSTED = 41;
|
|
217
|
+
ERROR_BAD_USER_API_KEY = 42;
|
|
218
|
+
ERROR_CONVERSATION_TOO_LONG = 43;
|
|
219
|
+
ERROR_USAGE_PRICING_REQUIRED = 44;
|
|
220
|
+
ERROR_USAGE_PRICING_REQUIRED_CHANGEABLE = 45;
|
|
221
|
+
ERROR_GITHUB_NO_USER_CREDENTIALS = 46;
|
|
222
|
+
ERROR_GITHUB_USER_NO_ACCESS = 47;
|
|
223
|
+
ERROR_GITHUB_APP_NO_ACCESS = 48;
|
|
224
|
+
ERROR_GITHUB_MULTIPLE_OWNERS = 49;
|
|
225
|
+
ERROR_RATE_LIMITED = 50;
|
|
226
|
+
ERROR_RATE_LIMITED_CHANGEABLE = 51;
|
|
227
|
+
ERROR_CUSTOM = 52;
|
|
228
|
+
ERROR_HOOKS_BLOCKED = 53;
|
|
229
|
+
ERROR_SUSPICIOUS_USAGE_BLOCKED = 54;
|
|
230
|
+
ERROR_EXTENSION_HOST_TIMEOUT = 55;
|
|
231
|
+
ERROR_NETWORK_ERROR = 56;
|
|
232
|
+
ERROR_PROVIDER_ERROR = 57;
|
|
233
|
+
ERROR_MODEL_BLOCKED = 58;
|
|
234
|
+
ERROR_INTERNAL = 59;
|
|
235
|
+
ERROR_MAX_MODE_REQUIRED = 60;
|
|
236
|
+
ERROR_MODEL_NO_LONGER_SUPPORTED = 61;
|
|
237
|
+
ERROR_PRICING_WARNING = 62;
|
|
238
|
+
ERROR_SLOW_POOL = 63;
|
|
239
|
+
ERROR_UNSUPPORTED_REGION = 64;
|
|
240
|
+
ERROR_ACCOUNT_CLOSED = 65;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
message CustomErrorDetails {
|
|
245
|
+
string title = 1;
|
|
246
|
+
string detail = 2;
|
|
247
|
+
optional bool allow_command_links_potentially_unsafe_please_only_use_for_handwritten_trusted_markdown = 3;
|
|
248
|
+
optional bool is_retryable = 4;
|
|
249
|
+
optional bool show_request_id = 5;
|
|
250
|
+
optional bool should_show_immediate_error = 6;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
message BidiAppendRequest {
|
|
255
|
+
string data = 1;
|
|
256
|
+
agent.v1.BidiRequestId request_id = 2;
|
|
257
|
+
int64 append_seqno = 3;
|
|
258
|
+
bytes data_binary = 4;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
message BidiAppendResponse {}
|