@camstack/types 1.2.386 → 1.2.387

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.
@@ -6,37 +6,58 @@
6
6
  * (hub-placed); the cap stays open for future providers.
7
7
  *
8
8
  * Profiles are ROWS (data), not addons: one row = one usable model endpoint.
9
- * `apiKey` is a password field — providers REDACT it on read and merge on
10
- * write; a stored key NEVER round-trips to a client.
9
+ * A row is common fields plus `providerConfig`, which the provider owning the
10
+ * row's kind declares (`connectionSchema`) and validates. The kind is an open
11
+ * id declared by that provider (D893). A `password` field of the provider's
12
+ * schema is a secret — providers REDACT it on read and merge on write; a
13
+ * stored key NEVER round-trips to a client.
11
14
  */
12
15
  import { z } from 'zod';
13
16
  import type { ConfigUISchema } from '../interfaces/config-ui.js';
14
17
  import { type InferProvider } from './capability-definition.js';
15
- export declare const LlmProfileKindSchema: z.ZodEnum<{
16
- anthropic: "anthropic";
17
- "apple-foundation": "apple-foundation";
18
- google: "google";
19
- "managed-local": "managed-local";
20
- openai: "openai";
21
- "openai-compatible": "openai-compatible";
22
- }>;
18
+ /**
19
+ * A profile kind is an OPEN id, declared by the provider that serves it
20
+ * (`listProfileKinds`). The cap names no kind: a new provider ships a new kind
21
+ * without a framework change. Lower-case, digits and dashes, so it stays safe
22
+ * as a URL segment, a record field and a CSS hook.
23
+ */
24
+ export declare const LLM_PROFILE_KIND_PATTERN: RegExp;
25
+ export declare const LlmProfileKindSchema: z.ZodString;
23
26
  export type LlmProfileKind = z.infer<typeof LlmProfileKindSchema>;
27
+ /** What a model (or, by default, every model of a kind) can do. */
28
+ export declare const LlmModelFeaturesSchema: z.ZodObject<{
29
+ vision: z.ZodBoolean;
30
+ tools: z.ZodBoolean;
31
+ streaming: z.ZodBoolean;
32
+ }, z.core.$strip>;
33
+ export type LlmModelFeatures = z.infer<typeof LlmModelFeaturesSchema>;
34
+ /** One model a provider offers. `features` overrides the kind's defaults, per field. */
35
+ export declare const LlmModelInfoSchema: z.ZodObject<{
36
+ id: z.ZodString;
37
+ label: z.ZodOptional<z.ZodString>;
38
+ contextLength: z.ZodOptional<z.ZodNumber>;
39
+ features: z.ZodOptional<z.ZodObject<{
40
+ vision: z.ZodOptional<z.ZodBoolean>;
41
+ tools: z.ZodOptional<z.ZodBoolean>;
42
+ streaming: z.ZodOptional<z.ZodBoolean>;
43
+ }, z.core.$strip>>;
44
+ }, z.core.$strip>;
45
+ export type LlmModelInfo = z.infer<typeof LlmModelInfoSchema>;
46
+ /**
47
+ * The provider-specific part of a profile, validated by the provider that owns
48
+ * the kind (`upsertProfile` refuses what it does not accept). A field its
49
+ * `connectionSchema` declares `type: 'password'` is a secret: it is held in the
50
+ * keychain, never in the row, and reads back as the redaction marker.
51
+ */
52
+ export declare const LlmProviderConfigSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
53
+ export type LlmProviderConfig = z.infer<typeof LlmProviderConfigSchema>;
24
54
  export declare const LlmProfileSchema: z.ZodObject<{
25
55
  id: z.ZodString;
26
56
  name: z.ZodString;
27
- kind: z.ZodEnum<{
28
- anthropic: "anthropic";
29
- "apple-foundation": "apple-foundation";
30
- google: "google";
31
- "managed-local": "managed-local";
32
- openai: "openai";
33
- "openai-compatible": "openai-compatible";
34
- }>;
57
+ kind: z.ZodString;
35
58
  addonId: z.ZodString;
36
59
  enabled: z.ZodBoolean;
37
60
  model: z.ZodString;
38
- baseUrl: z.ZodOptional<z.ZodString>;
39
- apiKey: z.ZodOptional<z.ZodString>;
40
61
  supportsVision: z.ZodBoolean;
41
62
  temperature: z.ZodOptional<z.ZodNumber>;
42
63
  topP: z.ZodOptional<z.ZodNumber>;
@@ -53,84 +74,141 @@ export declare const LlmProfileSchema: z.ZodObject<{
53
74
  maxAttempts: z.ZodDefault<z.ZodNumber>;
54
75
  }, z.core.$strip>>;
55
76
  toolsEnabled: z.ZodDefault<z.ZodBoolean>;
56
- extraHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
57
- runtime: z.ZodOptional<z.ZodObject<{
58
- nodeId: z.ZodString;
59
- engine: z.ZodEnum<{
60
- "llama-cpp": "llama-cpp";
61
- }>;
62
- model: z.ZodDiscriminatedUnion<[z.ZodObject<{
63
- kind: z.ZodLiteral<"catalog">;
64
- catalogId: z.ZodString;
65
- }, z.core.$strip>, z.ZodObject<{
66
- kind: z.ZodLiteral<"url">;
67
- url: z.ZodString;
68
- sha256: z.ZodOptional<z.ZodString>;
69
- label: z.ZodOptional<z.ZodString>;
70
- sizeBytes: z.ZodOptional<z.ZodNumber>;
71
- extraFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
72
- url: z.ZodString;
73
- filename: z.ZodString;
74
- sizeBytes: z.ZodNumber;
75
- sha256: z.ZodOptional<z.ZodString>;
76
- }, z.core.$strip>>>;
77
- }, z.core.$strip>, z.ZodObject<{
78
- kind: z.ZodLiteral<"path">;
79
- path: z.ZodString;
80
- }, z.core.$strip>], "kind">;
81
- contextSize: z.ZodDefault<z.ZodNumber>;
82
- gpuLayers: z.ZodDefault<z.ZodNumber>;
83
- threads: z.ZodOptional<z.ZodNumber>;
84
- parallel: z.ZodDefault<z.ZodNumber>;
85
- batchSize: z.ZodOptional<z.ZodNumber>;
86
- ubatchSize: z.ZodOptional<z.ZodNumber>;
87
- flashAttention: z.ZodDefault<z.ZodBoolean>;
88
- mlock: z.ZodDefault<z.ZodBoolean>;
89
- noMmap: z.ZodDefault<z.ZodBoolean>;
90
- cacheTypeK: z.ZodOptional<z.ZodEnum<{
91
- f16: "f16";
92
- f32: "f32";
93
- q4_0: "q4_0";
94
- q4_1: "q4_1";
95
- q5_0: "q5_0";
96
- q5_1: "q5_1";
97
- q8_0: "q8_0";
98
- }>>;
99
- cacheTypeV: z.ZodOptional<z.ZodEnum<{
100
- f16: "f16";
101
- f32: "f32";
102
- q4_0: "q4_0";
103
- q4_1: "q4_1";
104
- q5_0: "q5_0";
105
- q5_1: "q5_1";
106
- q8_0: "q8_0";
107
- }>>;
108
- extraArgs: z.ZodDefault<z.ZodArray<z.ZodString>>;
109
- autoStart: z.ZodDefault<z.ZodBoolean>;
110
- idleStopMinutes: z.ZodDefault<z.ZodNumber>;
111
- }, z.core.$strip>>;
112
- appleFoundation: z.ZodOptional<z.ZodObject<{
113
- nodeId: z.ZodString;
114
- }, z.core.$strip>>;
77
+ providerConfig: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
115
78
  }, z.core.$strip>;
116
79
  export type LlmProfile = z.infer<typeof LlmProfileSchema>;
117
- export declare const LlmProfileKindDescriptorSchema: z.ZodObject<{
118
- kind: z.ZodEnum<{
119
- anthropic: "anthropic";
120
- "apple-foundation": "apple-foundation";
121
- google: "google";
122
- "managed-local": "managed-local";
123
- openai: "openai";
124
- "openai-compatible": "openai-compatible";
80
+ /**
81
+ * The common profile fields a kind's editor offers. The editor owns how each
82
+ * one is drawn; the provider says which of them mean something on its wire.
83
+ */
84
+ export declare const LlmProfileFieldSchema: z.ZodEnum<{
85
+ connectTimeoutMs: "connectTimeoutMs";
86
+ contextLength: "contextLength";
87
+ firstTokenTimeoutMs: "firstTokenTimeoutMs";
88
+ idleTimeoutMs: "idleTimeoutMs";
89
+ maxTokens: "maxTokens";
90
+ retry: "retry";
91
+ systemPrompt: "systemPrompt";
92
+ temperature: "temperature";
93
+ timeoutMs: "timeoutMs";
94
+ toolsEnabled: "toolsEnabled";
95
+ topK: "topK";
96
+ topP: "topP";
97
+ }>;
98
+ export type LlmProfileField = z.infer<typeof LlmProfileFieldSchema>;
99
+ /**
100
+ * A provider-drawn part of the editor, by a generic widget id the admin UI
101
+ * registers (`ai/apple-node`). `placement: 'model'` replaces the generic model
102
+ * picker: that widget owns the model choice.
103
+ */
104
+ export declare const LlmProviderWidgetSchema: z.ZodObject<{
105
+ id: z.ZodString;
106
+ placement: z.ZodEnum<{
107
+ connection: "connection";
108
+ model: "model";
125
109
  }>;
110
+ requires: z.ZodOptional<z.ZodArray<z.ZodString>>;
111
+ }, z.core.$strip>;
112
+ export type LlmProviderWidget = z.infer<typeof LlmProviderWidgetSchema>;
113
+ export declare const LlmProfileKindDescriptorSchema: z.ZodObject<{
114
+ kind: z.ZodString;
126
115
  label: z.ZodString;
127
116
  icon: z.ZodString;
128
117
  addonId: z.ZodString;
129
- configSchema: z.ZodUnknown;
118
+ connectionSchema: z.ZodUnknown;
119
+ advancedSchema: z.ZodOptional<z.ZodUnknown>;
120
+ features: z.ZodObject<{
121
+ vision: z.ZodBoolean;
122
+ tools: z.ZodBoolean;
123
+ streaming: z.ZodBoolean;
124
+ }, z.core.$strip>;
125
+ visionEditable: z.ZodBoolean;
126
+ modelCatalog: z.ZodEnum<{
127
+ fetch: "fetch";
128
+ none: "none";
129
+ static: "static";
130
+ }>;
131
+ staticModels: z.ZodOptional<z.ZodArray<z.ZodObject<{
132
+ id: z.ZodString;
133
+ label: z.ZodOptional<z.ZodString>;
134
+ contextLength: z.ZodOptional<z.ZodNumber>;
135
+ features: z.ZodOptional<z.ZodObject<{
136
+ vision: z.ZodOptional<z.ZodBoolean>;
137
+ tools: z.ZodOptional<z.ZodBoolean>;
138
+ streaming: z.ZodOptional<z.ZodBoolean>;
139
+ }, z.core.$strip>>;
140
+ }, z.core.$strip>>>;
141
+ profileFields: z.ZodArray<z.ZodEnum<{
142
+ connectTimeoutMs: "connectTimeoutMs";
143
+ contextLength: "contextLength";
144
+ firstTokenTimeoutMs: "firstTokenTimeoutMs";
145
+ idleTimeoutMs: "idleTimeoutMs";
146
+ maxTokens: "maxTokens";
147
+ retry: "retry";
148
+ systemPrompt: "systemPrompt";
149
+ temperature: "temperature";
150
+ timeoutMs: "timeoutMs";
151
+ toolsEnabled: "toolsEnabled";
152
+ topK: "topK";
153
+ topP: "topP";
154
+ }>>;
155
+ providerWidgets: z.ZodOptional<z.ZodArray<z.ZodObject<{
156
+ id: z.ZodString;
157
+ placement: z.ZodEnum<{
158
+ connection: "connection";
159
+ model: "model";
160
+ }>;
161
+ requires: z.ZodOptional<z.ZodArray<z.ZodString>>;
162
+ }, z.core.$strip>>>;
130
163
  }, z.core.$strip>;
131
- export type LlmProfileKindDescriptor = Omit<z.infer<typeof LlmProfileKindDescriptorSchema>, 'configSchema'> & {
132
- readonly configSchema: ConfigUISchema;
164
+ export type LlmProfileKindDescriptor = Omit<z.infer<typeof LlmProfileKindDescriptorSchema>, 'connectionSchema' | 'advancedSchema'> & {
165
+ readonly connectionSchema: ConfigUISchema;
166
+ readonly advancedSchema?: ConfigUISchema;
133
167
  };
168
+ /**
169
+ * `listModels` input. `connection` is an UNSAVED draft of `providerConfig`
170
+ * (the editor's form); with `profileId` too, a secret the draft leaves
171
+ * untouched (absent or the redaction marker) is resolved server-side from the
172
+ * stored profile — the browser never receives it.
173
+ */
174
+ export declare const LlmListModelsInputSchema: z.ZodObject<{
175
+ addonId: z.ZodString;
176
+ kind: z.ZodString;
177
+ profileId: z.ZodOptional<z.ZodString>;
178
+ connection: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
179
+ }, z.core.$strip>;
180
+ export type LlmListModelsInput = z.infer<typeof LlmListModelsInputSchema>;
181
+ export declare const LlmListModelsErrorCodeSchema: z.ZodEnum<{
182
+ auth: "auth";
183
+ invalid: "invalid";
184
+ network: "network";
185
+ unsupported: "unsupported";
186
+ }>;
187
+ export type LlmListModelsErrorCode = z.infer<typeof LlmListModelsErrorCodeSchema>;
188
+ /** A RESULT, never a throw: "wrong key" is an answer the editor renders inline. */
189
+ export declare const LlmListModelsResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
190
+ ok: z.ZodLiteral<true>;
191
+ models: z.ZodArray<z.ZodObject<{
192
+ id: z.ZodString;
193
+ label: z.ZodOptional<z.ZodString>;
194
+ contextLength: z.ZodOptional<z.ZodNumber>;
195
+ features: z.ZodOptional<z.ZodObject<{
196
+ vision: z.ZodOptional<z.ZodBoolean>;
197
+ tools: z.ZodOptional<z.ZodBoolean>;
198
+ streaming: z.ZodOptional<z.ZodBoolean>;
199
+ }, z.core.$strip>>;
200
+ }, z.core.$strip>>;
201
+ }, z.core.$strip>, z.ZodObject<{
202
+ ok: z.ZodLiteral<false>;
203
+ code: z.ZodEnum<{
204
+ auth: "auth";
205
+ invalid: "invalid";
206
+ network: "network";
207
+ unsupported: "unsupported";
208
+ }>;
209
+ message: z.ZodString;
210
+ }, z.core.$strip>], "ok">;
211
+ export type LlmListModelsResult = z.infer<typeof LlmListModelsResultSchema>;
134
212
  export declare const LlmDefaultSelectorSchema: z.ZodUnion<readonly [z.ZodObject<{
135
213
  consumer: z.ZodString;
136
214
  }, z.core.$strip>, z.ZodObject<{
@@ -416,35 +494,63 @@ export declare const llmCapability: {
416
494
  requestId: z.ZodString;
417
495
  }, z.core.$strip>, z.ZodVoid, "mutation">;
418
496
  readonly listProfileKinds: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{}, z.core.$strip>, z.ZodArray<z.ZodObject<{
419
- kind: z.ZodEnum<{
420
- anthropic: "anthropic";
421
- "apple-foundation": "apple-foundation";
422
- google: "google";
423
- "managed-local": "managed-local";
424
- openai: "openai";
425
- "openai-compatible": "openai-compatible";
426
- }>;
497
+ kind: z.ZodString;
427
498
  label: z.ZodString;
428
499
  icon: z.ZodString;
429
500
  addonId: z.ZodString;
430
- configSchema: z.ZodUnknown;
501
+ connectionSchema: z.ZodUnknown;
502
+ advancedSchema: z.ZodOptional<z.ZodUnknown>;
503
+ features: z.ZodObject<{
504
+ vision: z.ZodBoolean;
505
+ tools: z.ZodBoolean;
506
+ streaming: z.ZodBoolean;
507
+ }, z.core.$strip>;
508
+ visionEditable: z.ZodBoolean;
509
+ modelCatalog: z.ZodEnum<{
510
+ fetch: "fetch";
511
+ none: "none";
512
+ static: "static";
513
+ }>;
514
+ staticModels: z.ZodOptional<z.ZodArray<z.ZodObject<{
515
+ id: z.ZodString;
516
+ label: z.ZodOptional<z.ZodString>;
517
+ contextLength: z.ZodOptional<z.ZodNumber>;
518
+ features: z.ZodOptional<z.ZodObject<{
519
+ vision: z.ZodOptional<z.ZodBoolean>;
520
+ tools: z.ZodOptional<z.ZodBoolean>;
521
+ streaming: z.ZodOptional<z.ZodBoolean>;
522
+ }, z.core.$strip>>;
523
+ }, z.core.$strip>>>;
524
+ profileFields: z.ZodArray<z.ZodEnum<{
525
+ connectTimeoutMs: "connectTimeoutMs";
526
+ contextLength: "contextLength";
527
+ firstTokenTimeoutMs: "firstTokenTimeoutMs";
528
+ idleTimeoutMs: "idleTimeoutMs";
529
+ maxTokens: "maxTokens";
530
+ retry: "retry";
531
+ systemPrompt: "systemPrompt";
532
+ temperature: "temperature";
533
+ timeoutMs: "timeoutMs";
534
+ toolsEnabled: "toolsEnabled";
535
+ topK: "topK";
536
+ topP: "topP";
537
+ }>>;
538
+ providerWidgets: z.ZodOptional<z.ZodArray<z.ZodObject<{
539
+ id: z.ZodString;
540
+ placement: z.ZodEnum<{
541
+ connection: "connection";
542
+ model: "model";
543
+ }>;
544
+ requires: z.ZodOptional<z.ZodArray<z.ZodString>>;
545
+ }, z.core.$strip>>>;
431
546
  }, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
432
547
  readonly listProfiles: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{}, z.core.$strip>, z.ZodArray<z.ZodObject<{
433
548
  id: z.ZodString;
434
549
  name: z.ZodString;
435
- kind: z.ZodEnum<{
436
- anthropic: "anthropic";
437
- "apple-foundation": "apple-foundation";
438
- google: "google";
439
- "managed-local": "managed-local";
440
- openai: "openai";
441
- "openai-compatible": "openai-compatible";
442
- }>;
550
+ kind: z.ZodString;
443
551
  addonId: z.ZodString;
444
552
  enabled: z.ZodBoolean;
445
553
  model: z.ZodString;
446
- baseUrl: z.ZodOptional<z.ZodString>;
447
- apiKey: z.ZodOptional<z.ZodString>;
448
554
  supportsVision: z.ZodBoolean;
449
555
  temperature: z.ZodOptional<z.ZodNumber>;
450
556
  topP: z.ZodOptional<z.ZodNumber>;
@@ -461,83 +567,16 @@ export declare const llmCapability: {
461
567
  maxAttempts: z.ZodDefault<z.ZodNumber>;
462
568
  }, z.core.$strip>>;
463
569
  toolsEnabled: z.ZodDefault<z.ZodBoolean>;
464
- extraHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
465
- runtime: z.ZodOptional<z.ZodObject<{
466
- nodeId: z.ZodString;
467
- engine: z.ZodEnum<{
468
- "llama-cpp": "llama-cpp";
469
- }>;
470
- model: z.ZodDiscriminatedUnion<[z.ZodObject<{
471
- kind: z.ZodLiteral<"catalog">;
472
- catalogId: z.ZodString;
473
- }, z.core.$strip>, z.ZodObject<{
474
- kind: z.ZodLiteral<"url">;
475
- url: z.ZodString;
476
- sha256: z.ZodOptional<z.ZodString>;
477
- label: z.ZodOptional<z.ZodString>;
478
- sizeBytes: z.ZodOptional<z.ZodNumber>;
479
- extraFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
480
- url: z.ZodString;
481
- filename: z.ZodString;
482
- sizeBytes: z.ZodNumber;
483
- sha256: z.ZodOptional<z.ZodString>;
484
- }, z.core.$strip>>>;
485
- }, z.core.$strip>, z.ZodObject<{
486
- kind: z.ZodLiteral<"path">;
487
- path: z.ZodString;
488
- }, z.core.$strip>], "kind">;
489
- contextSize: z.ZodDefault<z.ZodNumber>;
490
- gpuLayers: z.ZodDefault<z.ZodNumber>;
491
- threads: z.ZodOptional<z.ZodNumber>;
492
- parallel: z.ZodDefault<z.ZodNumber>;
493
- batchSize: z.ZodOptional<z.ZodNumber>;
494
- ubatchSize: z.ZodOptional<z.ZodNumber>;
495
- flashAttention: z.ZodDefault<z.ZodBoolean>;
496
- mlock: z.ZodDefault<z.ZodBoolean>;
497
- noMmap: z.ZodDefault<z.ZodBoolean>;
498
- cacheTypeK: z.ZodOptional<z.ZodEnum<{
499
- f16: "f16";
500
- f32: "f32";
501
- q4_0: "q4_0";
502
- q4_1: "q4_1";
503
- q5_0: "q5_0";
504
- q5_1: "q5_1";
505
- q8_0: "q8_0";
506
- }>>;
507
- cacheTypeV: z.ZodOptional<z.ZodEnum<{
508
- f16: "f16";
509
- f32: "f32";
510
- q4_0: "q4_0";
511
- q4_1: "q4_1";
512
- q5_0: "q5_0";
513
- q5_1: "q5_1";
514
- q8_0: "q8_0";
515
- }>>;
516
- extraArgs: z.ZodDefault<z.ZodArray<z.ZodString>>;
517
- autoStart: z.ZodDefault<z.ZodBoolean>;
518
- idleStopMinutes: z.ZodDefault<z.ZodNumber>;
519
- }, z.core.$strip>>;
520
- appleFoundation: z.ZodOptional<z.ZodObject<{
521
- nodeId: z.ZodString;
522
- }, z.core.$strip>>;
570
+ providerConfig: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
523
571
  }, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
524
572
  readonly upsertProfile: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
525
573
  profile: z.ZodObject<{
526
574
  id: z.ZodString;
527
575
  name: z.ZodString;
528
- kind: z.ZodEnum<{
529
- anthropic: "anthropic";
530
- "apple-foundation": "apple-foundation";
531
- google: "google";
532
- "managed-local": "managed-local";
533
- openai: "openai";
534
- "openai-compatible": "openai-compatible";
535
- }>;
576
+ kind: z.ZodString;
536
577
  addonId: z.ZodString;
537
578
  enabled: z.ZodBoolean;
538
579
  model: z.ZodString;
539
- baseUrl: z.ZodOptional<z.ZodString>;
540
- apiKey: z.ZodOptional<z.ZodString>;
541
580
  supportsVision: z.ZodBoolean;
542
581
  temperature: z.ZodOptional<z.ZodNumber>;
543
582
  topP: z.ZodOptional<z.ZodNumber>;
@@ -554,82 +593,15 @@ export declare const llmCapability: {
554
593
  maxAttempts: z.ZodDefault<z.ZodNumber>;
555
594
  }, z.core.$strip>>;
556
595
  toolsEnabled: z.ZodDefault<z.ZodBoolean>;
557
- extraHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
558
- runtime: z.ZodOptional<z.ZodObject<{
559
- nodeId: z.ZodString;
560
- engine: z.ZodEnum<{
561
- "llama-cpp": "llama-cpp";
562
- }>;
563
- model: z.ZodDiscriminatedUnion<[z.ZodObject<{
564
- kind: z.ZodLiteral<"catalog">;
565
- catalogId: z.ZodString;
566
- }, z.core.$strip>, z.ZodObject<{
567
- kind: z.ZodLiteral<"url">;
568
- url: z.ZodString;
569
- sha256: z.ZodOptional<z.ZodString>;
570
- label: z.ZodOptional<z.ZodString>;
571
- sizeBytes: z.ZodOptional<z.ZodNumber>;
572
- extraFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
573
- url: z.ZodString;
574
- filename: z.ZodString;
575
- sizeBytes: z.ZodNumber;
576
- sha256: z.ZodOptional<z.ZodString>;
577
- }, z.core.$strip>>>;
578
- }, z.core.$strip>, z.ZodObject<{
579
- kind: z.ZodLiteral<"path">;
580
- path: z.ZodString;
581
- }, z.core.$strip>], "kind">;
582
- contextSize: z.ZodDefault<z.ZodNumber>;
583
- gpuLayers: z.ZodDefault<z.ZodNumber>;
584
- threads: z.ZodOptional<z.ZodNumber>;
585
- parallel: z.ZodDefault<z.ZodNumber>;
586
- batchSize: z.ZodOptional<z.ZodNumber>;
587
- ubatchSize: z.ZodOptional<z.ZodNumber>;
588
- flashAttention: z.ZodDefault<z.ZodBoolean>;
589
- mlock: z.ZodDefault<z.ZodBoolean>;
590
- noMmap: z.ZodDefault<z.ZodBoolean>;
591
- cacheTypeK: z.ZodOptional<z.ZodEnum<{
592
- f16: "f16";
593
- f32: "f32";
594
- q4_0: "q4_0";
595
- q4_1: "q4_1";
596
- q5_0: "q5_0";
597
- q5_1: "q5_1";
598
- q8_0: "q8_0";
599
- }>>;
600
- cacheTypeV: z.ZodOptional<z.ZodEnum<{
601
- f16: "f16";
602
- f32: "f32";
603
- q4_0: "q4_0";
604
- q4_1: "q4_1";
605
- q5_0: "q5_0";
606
- q5_1: "q5_1";
607
- q8_0: "q8_0";
608
- }>>;
609
- extraArgs: z.ZodDefault<z.ZodArray<z.ZodString>>;
610
- autoStart: z.ZodDefault<z.ZodBoolean>;
611
- idleStopMinutes: z.ZodDefault<z.ZodNumber>;
612
- }, z.core.$strip>>;
613
- appleFoundation: z.ZodOptional<z.ZodObject<{
614
- nodeId: z.ZodString;
615
- }, z.core.$strip>>;
596
+ providerConfig: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
616
597
  }, z.core.$strip>;
617
598
  }, z.core.$strip>, z.ZodObject<{
618
599
  id: z.ZodString;
619
600
  name: z.ZodString;
620
- kind: z.ZodEnum<{
621
- anthropic: "anthropic";
622
- "apple-foundation": "apple-foundation";
623
- google: "google";
624
- "managed-local": "managed-local";
625
- openai: "openai";
626
- "openai-compatible": "openai-compatible";
627
- }>;
601
+ kind: z.ZodString;
628
602
  addonId: z.ZodString;
629
603
  enabled: z.ZodBoolean;
630
604
  model: z.ZodString;
631
- baseUrl: z.ZodOptional<z.ZodString>;
632
- apiKey: z.ZodOptional<z.ZodString>;
633
605
  supportsVision: z.ZodBoolean;
634
606
  temperature: z.ZodOptional<z.ZodNumber>;
635
607
  topP: z.ZodOptional<z.ZodNumber>;
@@ -646,65 +618,7 @@ export declare const llmCapability: {
646
618
  maxAttempts: z.ZodDefault<z.ZodNumber>;
647
619
  }, z.core.$strip>>;
648
620
  toolsEnabled: z.ZodDefault<z.ZodBoolean>;
649
- extraHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
650
- runtime: z.ZodOptional<z.ZodObject<{
651
- nodeId: z.ZodString;
652
- engine: z.ZodEnum<{
653
- "llama-cpp": "llama-cpp";
654
- }>;
655
- model: z.ZodDiscriminatedUnion<[z.ZodObject<{
656
- kind: z.ZodLiteral<"catalog">;
657
- catalogId: z.ZodString;
658
- }, z.core.$strip>, z.ZodObject<{
659
- kind: z.ZodLiteral<"url">;
660
- url: z.ZodString;
661
- sha256: z.ZodOptional<z.ZodString>;
662
- label: z.ZodOptional<z.ZodString>;
663
- sizeBytes: z.ZodOptional<z.ZodNumber>;
664
- extraFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
665
- url: z.ZodString;
666
- filename: z.ZodString;
667
- sizeBytes: z.ZodNumber;
668
- sha256: z.ZodOptional<z.ZodString>;
669
- }, z.core.$strip>>>;
670
- }, z.core.$strip>, z.ZodObject<{
671
- kind: z.ZodLiteral<"path">;
672
- path: z.ZodString;
673
- }, z.core.$strip>], "kind">;
674
- contextSize: z.ZodDefault<z.ZodNumber>;
675
- gpuLayers: z.ZodDefault<z.ZodNumber>;
676
- threads: z.ZodOptional<z.ZodNumber>;
677
- parallel: z.ZodDefault<z.ZodNumber>;
678
- batchSize: z.ZodOptional<z.ZodNumber>;
679
- ubatchSize: z.ZodOptional<z.ZodNumber>;
680
- flashAttention: z.ZodDefault<z.ZodBoolean>;
681
- mlock: z.ZodDefault<z.ZodBoolean>;
682
- noMmap: z.ZodDefault<z.ZodBoolean>;
683
- cacheTypeK: z.ZodOptional<z.ZodEnum<{
684
- f16: "f16";
685
- f32: "f32";
686
- q4_0: "q4_0";
687
- q4_1: "q4_1";
688
- q5_0: "q5_0";
689
- q5_1: "q5_1";
690
- q8_0: "q8_0";
691
- }>>;
692
- cacheTypeV: z.ZodOptional<z.ZodEnum<{
693
- f16: "f16";
694
- f32: "f32";
695
- q4_0: "q4_0";
696
- q4_1: "q4_1";
697
- q5_0: "q5_0";
698
- q5_1: "q5_1";
699
- q8_0: "q8_0";
700
- }>>;
701
- extraArgs: z.ZodDefault<z.ZodArray<z.ZodString>>;
702
- autoStart: z.ZodDefault<z.ZodBoolean>;
703
- idleStopMinutes: z.ZodDefault<z.ZodNumber>;
704
- }, z.core.$strip>>;
705
- appleFoundation: z.ZodOptional<z.ZodObject<{
706
- nodeId: z.ZodString;
707
- }, z.core.$strip>>;
621
+ providerConfig: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
708
622
  }, z.core.$strip>, "mutation">;
709
623
  /**
710
624
  * D878: move every profile's plaintext `apiKey` into the keychain (owner
@@ -763,11 +677,40 @@ export declare const llmCapability: {
763
677
  model: "model";
764
678
  }>>;
765
679
  }, z.core.$strip>], "ok">, "mutation">;
766
- /** Live vendor enumeration (GET /models etc.). */
680
+ /**
681
+ * The models a kind offers, for a SAVED profile or an unsaved draft
682
+ * (`connection`). A mutation, not a query: a draft may carry a key, and a
683
+ * query's input travels in the URL. Admin: it dials whatever endpoint the
684
+ * draft names and may resolve a stored key to do it. The answer never
685
+ * carries a secret — failures are a typed result, never a throw.
686
+ */
767
687
  readonly listModels: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
768
688
  addonId: z.ZodString;
769
- profileId: z.ZodString;
770
- }, z.core.$strip>, z.ZodArray<z.ZodString>, import("./capability-definition.js").CapabilityMethodKind>;
689
+ kind: z.ZodString;
690
+ profileId: z.ZodOptional<z.ZodString>;
691
+ connection: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
692
+ }, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
693
+ ok: z.ZodLiteral<true>;
694
+ models: z.ZodArray<z.ZodObject<{
695
+ id: z.ZodString;
696
+ label: z.ZodOptional<z.ZodString>;
697
+ contextLength: z.ZodOptional<z.ZodNumber>;
698
+ features: z.ZodOptional<z.ZodObject<{
699
+ vision: z.ZodOptional<z.ZodBoolean>;
700
+ tools: z.ZodOptional<z.ZodBoolean>;
701
+ streaming: z.ZodOptional<z.ZodBoolean>;
702
+ }, z.core.$strip>>;
703
+ }, z.core.$strip>>;
704
+ }, z.core.$strip>, z.ZodObject<{
705
+ ok: z.ZodLiteral<false>;
706
+ code: z.ZodEnum<{
707
+ auth: "auth";
708
+ invalid: "invalid";
709
+ network: "network";
710
+ unsupported: "unsupported";
711
+ }>;
712
+ message: z.ZodString;
713
+ }, z.core.$strip>], "ok">, "mutation">;
771
714
  readonly getDefaults: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{}, z.core.$strip>, z.ZodArray<z.ZodObject<{
772
715
  selector: z.ZodUnion<readonly [z.ZodObject<{
773
716
  consumer: z.ZodString;