@pellux/goodvibes-contracts 0.18.3 → 0.30.1
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/README.md +13 -9
- package/artifacts/operator-contract.json +24370 -10474
- package/dist/generated/foundation-client-types.d.ts +106 -19
- package/dist/generated/foundation-client-types.d.ts.map +1 -1
- package/dist/generated/foundation-metadata.d.ts +3 -3
- package/dist/generated/foundation-metadata.js +3 -3
- package/dist/generated/operator-contract.d.ts.map +1 -1
- package/dist/generated/operator-contract.js +24370 -10474
- package/dist/generated/operator-method-ids.d.ts +1 -1
- package/dist/generated/operator-method-ids.d.ts.map +1 -1
- package/dist/generated/operator-method-ids.js +51 -0
- package/dist/generated/peer-contract.d.ts.map +1 -1
- package/dist/generated/runtime-event-domains.d.ts +1 -1
- package/dist/generated/runtime-event-domains.d.ts.map +1 -1
- package/dist/generated/runtime-event-domains.js +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -2
- package/dist/types.d.ts +6 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/zod-schemas/accounts.d.ts +81 -0
- package/dist/zod-schemas/accounts.d.ts.map +1 -0
- package/dist/zod-schemas/accounts.js +47 -0
- package/dist/zod-schemas/auth.d.ts +42 -0
- package/dist/zod-schemas/auth.d.ts.map +1 -0
- package/dist/zod-schemas/auth.js +29 -0
- package/dist/zod-schemas/events.d.ts +37 -0
- package/dist/zod-schemas/events.d.ts.map +1 -0
- package/dist/zod-schemas/events.js +26 -0
- package/dist/zod-schemas/index.d.ts +11 -0
- package/dist/zod-schemas/index.d.ts.map +1 -0
- package/dist/zod-schemas/index.js +5 -0
- package/dist/zod-schemas/providers.d.ts +271 -0
- package/dist/zod-schemas/providers.d.ts.map +1 -0
- package/dist/zod-schemas/providers.js +80 -0
- package/dist/zod-schemas/session.d.ts +22 -0
- package/dist/zod-schemas/session.d.ts.map +1 -0
- package/dist/zod-schemas/session.js +19 -0
- package/package.json +59 -1
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
/**
|
|
3
|
+
* Schemas for the provider/model discovery and selection HTTP API.
|
|
4
|
+
*
|
|
5
|
+
* Endpoints:
|
|
6
|
+
* GET /api/providers → ListProvidersResponseSchema
|
|
7
|
+
* GET /api/providers/current → CurrentModelResponseSchema
|
|
8
|
+
* PATCH /api/providers/current → PatchCurrentModelBodySchema (request) / CurrentModelResponseSchema (response)
|
|
9
|
+
*/
|
|
10
|
+
export declare const ProviderModelRefSchema: z.ZodObject<{
|
|
11
|
+
registryKey: z.ZodString;
|
|
12
|
+
provider: z.ZodString;
|
|
13
|
+
id: z.ZodString;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export type ProviderModelRef = z.infer<typeof ProviderModelRefSchema>;
|
|
16
|
+
export declare const ProviderModelEntrySchema: z.ZodObject<{
|
|
17
|
+
id: z.ZodString;
|
|
18
|
+
registryKey: z.ZodString;
|
|
19
|
+
provider: z.ZodString;
|
|
20
|
+
label: z.ZodOptional<z.ZodString>;
|
|
21
|
+
contextWindow: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
export type ProviderModelEntry = z.infer<typeof ProviderModelEntrySchema>;
|
|
24
|
+
export declare const ConfiguredViaSchema: z.ZodEnum<{
|
|
25
|
+
anonymous: "anonymous";
|
|
26
|
+
subscription: "subscription";
|
|
27
|
+
secrets: "secrets";
|
|
28
|
+
env: "env";
|
|
29
|
+
}>;
|
|
30
|
+
export type ConfiguredVia = z.infer<typeof ConfiguredViaSchema>;
|
|
31
|
+
export declare const ProviderAuthRouteDescriptorSchema: z.ZodObject<{
|
|
32
|
+
route: z.ZodEnum<{
|
|
33
|
+
none: "none";
|
|
34
|
+
anonymous: "anonymous";
|
|
35
|
+
"api-key": "api-key";
|
|
36
|
+
"service-oauth": "service-oauth";
|
|
37
|
+
"secret-ref": "secret-ref";
|
|
38
|
+
"subscription-oauth": "subscription-oauth";
|
|
39
|
+
}>;
|
|
40
|
+
label: z.ZodString;
|
|
41
|
+
configured: z.ZodBoolean;
|
|
42
|
+
usable: z.ZodOptional<z.ZodBoolean>;
|
|
43
|
+
freshness: z.ZodOptional<z.ZodEnum<{
|
|
44
|
+
expired: "expired";
|
|
45
|
+
unconfigured: "unconfigured";
|
|
46
|
+
healthy: "healthy";
|
|
47
|
+
expiring: "expiring";
|
|
48
|
+
pending: "pending";
|
|
49
|
+
}>>;
|
|
50
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
51
|
+
envVars: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
52
|
+
secretKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
53
|
+
serviceNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
54
|
+
providerId: z.ZodOptional<z.ZodString>;
|
|
55
|
+
repairHints: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
56
|
+
}, z.core.$strip>;
|
|
57
|
+
export type ProviderAuthRouteDescriptor = z.infer<typeof ProviderAuthRouteDescriptorSchema>;
|
|
58
|
+
export declare const ProviderEntrySchema: z.ZodObject<{
|
|
59
|
+
id: z.ZodString;
|
|
60
|
+
label: z.ZodString;
|
|
61
|
+
configured: z.ZodBoolean;
|
|
62
|
+
configuredVia: z.ZodOptional<z.ZodEnum<{
|
|
63
|
+
anonymous: "anonymous";
|
|
64
|
+
subscription: "subscription";
|
|
65
|
+
secrets: "secrets";
|
|
66
|
+
env: "env";
|
|
67
|
+
}>>;
|
|
68
|
+
envVars: z.ZodArray<z.ZodString>;
|
|
69
|
+
routes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
70
|
+
route: z.ZodEnum<{
|
|
71
|
+
none: "none";
|
|
72
|
+
anonymous: "anonymous";
|
|
73
|
+
"api-key": "api-key";
|
|
74
|
+
"service-oauth": "service-oauth";
|
|
75
|
+
"secret-ref": "secret-ref";
|
|
76
|
+
"subscription-oauth": "subscription-oauth";
|
|
77
|
+
}>;
|
|
78
|
+
label: z.ZodString;
|
|
79
|
+
configured: z.ZodBoolean;
|
|
80
|
+
usable: z.ZodOptional<z.ZodBoolean>;
|
|
81
|
+
freshness: z.ZodOptional<z.ZodEnum<{
|
|
82
|
+
expired: "expired";
|
|
83
|
+
unconfigured: "unconfigured";
|
|
84
|
+
healthy: "healthy";
|
|
85
|
+
expiring: "expiring";
|
|
86
|
+
pending: "pending";
|
|
87
|
+
}>>;
|
|
88
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
89
|
+
envVars: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
90
|
+
secretKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
91
|
+
serviceNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
92
|
+
providerId: z.ZodOptional<z.ZodString>;
|
|
93
|
+
repairHints: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
94
|
+
}, z.core.$strip>>>;
|
|
95
|
+
models: z.ZodArray<z.ZodObject<{
|
|
96
|
+
id: z.ZodString;
|
|
97
|
+
registryKey: z.ZodString;
|
|
98
|
+
provider: z.ZodString;
|
|
99
|
+
label: z.ZodOptional<z.ZodString>;
|
|
100
|
+
contextWindow: z.ZodOptional<z.ZodNumber>;
|
|
101
|
+
}, z.core.$strip>>;
|
|
102
|
+
}, z.core.$strip>;
|
|
103
|
+
export type ProviderEntry = z.infer<typeof ProviderEntrySchema>;
|
|
104
|
+
export declare const ListProvidersResponseSchema: z.ZodObject<{
|
|
105
|
+
providers: z.ZodArray<z.ZodObject<{
|
|
106
|
+
id: z.ZodString;
|
|
107
|
+
label: z.ZodString;
|
|
108
|
+
configured: z.ZodBoolean;
|
|
109
|
+
configuredVia: z.ZodOptional<z.ZodEnum<{
|
|
110
|
+
anonymous: "anonymous";
|
|
111
|
+
subscription: "subscription";
|
|
112
|
+
secrets: "secrets";
|
|
113
|
+
env: "env";
|
|
114
|
+
}>>;
|
|
115
|
+
envVars: z.ZodArray<z.ZodString>;
|
|
116
|
+
routes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
117
|
+
route: z.ZodEnum<{
|
|
118
|
+
none: "none";
|
|
119
|
+
anonymous: "anonymous";
|
|
120
|
+
"api-key": "api-key";
|
|
121
|
+
"service-oauth": "service-oauth";
|
|
122
|
+
"secret-ref": "secret-ref";
|
|
123
|
+
"subscription-oauth": "subscription-oauth";
|
|
124
|
+
}>;
|
|
125
|
+
label: z.ZodString;
|
|
126
|
+
configured: z.ZodBoolean;
|
|
127
|
+
usable: z.ZodOptional<z.ZodBoolean>;
|
|
128
|
+
freshness: z.ZodOptional<z.ZodEnum<{
|
|
129
|
+
expired: "expired";
|
|
130
|
+
unconfigured: "unconfigured";
|
|
131
|
+
healthy: "healthy";
|
|
132
|
+
expiring: "expiring";
|
|
133
|
+
pending: "pending";
|
|
134
|
+
}>>;
|
|
135
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
136
|
+
envVars: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
137
|
+
secretKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
138
|
+
serviceNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
139
|
+
providerId: z.ZodOptional<z.ZodString>;
|
|
140
|
+
repairHints: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
141
|
+
}, z.core.$strip>>>;
|
|
142
|
+
models: z.ZodArray<z.ZodObject<{
|
|
143
|
+
id: z.ZodString;
|
|
144
|
+
registryKey: z.ZodString;
|
|
145
|
+
provider: z.ZodString;
|
|
146
|
+
label: z.ZodOptional<z.ZodString>;
|
|
147
|
+
contextWindow: z.ZodOptional<z.ZodNumber>;
|
|
148
|
+
}, z.core.$strip>>;
|
|
149
|
+
}, z.core.$strip>>;
|
|
150
|
+
currentModel: z.ZodNullable<z.ZodObject<{
|
|
151
|
+
registryKey: z.ZodString;
|
|
152
|
+
provider: z.ZodString;
|
|
153
|
+
id: z.ZodString;
|
|
154
|
+
}, z.core.$strip>>;
|
|
155
|
+
secretsResolutionSkipped: z.ZodOptional<z.ZodBoolean>;
|
|
156
|
+
}, z.core.$strip>;
|
|
157
|
+
export type ListProvidersResponse = z.infer<typeof ListProvidersResponseSchema>;
|
|
158
|
+
export declare const CurrentModelResponseSchema: z.ZodObject<{
|
|
159
|
+
model: z.ZodNullable<z.ZodObject<{
|
|
160
|
+
registryKey: z.ZodString;
|
|
161
|
+
provider: z.ZodString;
|
|
162
|
+
id: z.ZodString;
|
|
163
|
+
}, z.core.$strip>>;
|
|
164
|
+
configured: z.ZodBoolean;
|
|
165
|
+
configuredVia: z.ZodOptional<z.ZodEnum<{
|
|
166
|
+
anonymous: "anonymous";
|
|
167
|
+
subscription: "subscription";
|
|
168
|
+
secrets: "secrets";
|
|
169
|
+
env: "env";
|
|
170
|
+
}>>;
|
|
171
|
+
routes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
172
|
+
route: z.ZodEnum<{
|
|
173
|
+
none: "none";
|
|
174
|
+
anonymous: "anonymous";
|
|
175
|
+
"api-key": "api-key";
|
|
176
|
+
"service-oauth": "service-oauth";
|
|
177
|
+
"secret-ref": "secret-ref";
|
|
178
|
+
"subscription-oauth": "subscription-oauth";
|
|
179
|
+
}>;
|
|
180
|
+
label: z.ZodString;
|
|
181
|
+
configured: z.ZodBoolean;
|
|
182
|
+
usable: z.ZodOptional<z.ZodBoolean>;
|
|
183
|
+
freshness: z.ZodOptional<z.ZodEnum<{
|
|
184
|
+
expired: "expired";
|
|
185
|
+
unconfigured: "unconfigured";
|
|
186
|
+
healthy: "healthy";
|
|
187
|
+
expiring: "expiring";
|
|
188
|
+
pending: "pending";
|
|
189
|
+
}>>;
|
|
190
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
191
|
+
envVars: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
192
|
+
secretKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
193
|
+
serviceNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
194
|
+
providerId: z.ZodOptional<z.ZodString>;
|
|
195
|
+
repairHints: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
196
|
+
}, z.core.$strip>>>;
|
|
197
|
+
}, z.core.$strip>;
|
|
198
|
+
export type CurrentModelResponse = z.infer<typeof CurrentModelResponseSchema>;
|
|
199
|
+
export declare const PatchCurrentModelBodySchema: z.ZodObject<{
|
|
200
|
+
registryKey: z.ZodString;
|
|
201
|
+
}, z.core.$strip>;
|
|
202
|
+
export type PatchCurrentModelBody = z.infer<typeof PatchCurrentModelBodySchema>;
|
|
203
|
+
export declare const PatchCurrentModelErrorSchema: z.ZodObject<{
|
|
204
|
+
error: z.ZodString;
|
|
205
|
+
code: z.ZodEnum<{
|
|
206
|
+
INVALID_REQUEST: "INVALID_REQUEST";
|
|
207
|
+
MODEL_NOT_FOUND: "MODEL_NOT_FOUND";
|
|
208
|
+
PROVIDER_NOT_CONFIGURED: "PROVIDER_NOT_CONFIGURED";
|
|
209
|
+
SET_MODEL_FAILED: "SET_MODEL_FAILED";
|
|
210
|
+
}>;
|
|
211
|
+
missingEnvVars: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
212
|
+
}, z.core.$strip>;
|
|
213
|
+
export type PatchCurrentModelError = z.infer<typeof PatchCurrentModelErrorSchema>;
|
|
214
|
+
export declare const PatchCurrentModelResponseSchema: z.ZodObject<{
|
|
215
|
+
model: z.ZodNullable<z.ZodObject<{
|
|
216
|
+
registryKey: z.ZodString;
|
|
217
|
+
provider: z.ZodString;
|
|
218
|
+
id: z.ZodString;
|
|
219
|
+
}, z.core.$strip>>;
|
|
220
|
+
configured: z.ZodBoolean;
|
|
221
|
+
configuredVia: z.ZodOptional<z.ZodEnum<{
|
|
222
|
+
anonymous: "anonymous";
|
|
223
|
+
subscription: "subscription";
|
|
224
|
+
secrets: "secrets";
|
|
225
|
+
env: "env";
|
|
226
|
+
}>>;
|
|
227
|
+
routes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
228
|
+
route: z.ZodEnum<{
|
|
229
|
+
none: "none";
|
|
230
|
+
anonymous: "anonymous";
|
|
231
|
+
"api-key": "api-key";
|
|
232
|
+
"service-oauth": "service-oauth";
|
|
233
|
+
"secret-ref": "secret-ref";
|
|
234
|
+
"subscription-oauth": "subscription-oauth";
|
|
235
|
+
}>;
|
|
236
|
+
label: z.ZodString;
|
|
237
|
+
configured: z.ZodBoolean;
|
|
238
|
+
usable: z.ZodOptional<z.ZodBoolean>;
|
|
239
|
+
freshness: z.ZodOptional<z.ZodEnum<{
|
|
240
|
+
expired: "expired";
|
|
241
|
+
unconfigured: "unconfigured";
|
|
242
|
+
healthy: "healthy";
|
|
243
|
+
expiring: "expiring";
|
|
244
|
+
pending: "pending";
|
|
245
|
+
}>>;
|
|
246
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
247
|
+
envVars: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
248
|
+
secretKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
249
|
+
serviceNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
250
|
+
providerId: z.ZodOptional<z.ZodString>;
|
|
251
|
+
repairHints: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
252
|
+
}, z.core.$strip>>>;
|
|
253
|
+
persisted: z.ZodBoolean;
|
|
254
|
+
}, z.core.$strip>;
|
|
255
|
+
export type PatchCurrentModelResponse = z.infer<typeof PatchCurrentModelResponseSchema>;
|
|
256
|
+
/**
|
|
257
|
+
* SSE event shape emitted on `model.changed` events.
|
|
258
|
+
*
|
|
259
|
+
* Forwarded to companion SSE streams when the current model changes.
|
|
260
|
+
*/
|
|
261
|
+
export declare const ModelChangedEventSchema: z.ZodObject<{
|
|
262
|
+
type: z.ZodLiteral<"MODEL_CHANGED">;
|
|
263
|
+
registryKey: z.ZodString;
|
|
264
|
+
provider: z.ZodString;
|
|
265
|
+
previous: z.ZodOptional<z.ZodObject<{
|
|
266
|
+
registryKey: z.ZodString;
|
|
267
|
+
provider: z.ZodString;
|
|
268
|
+
}, z.core.$strip>>;
|
|
269
|
+
}, z.core.$strip>;
|
|
270
|
+
export type ModelChangedEvent = z.infer<typeof ModelChangedEventSchema>;
|
|
271
|
+
//# sourceMappingURL=providers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../src/zod-schemas/providers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B;;;;;;;GAOG;AAEH,eAAO,MAAM,sBAAsB;;;;iBAIjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,wBAAwB;;;;;;iBAMnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,mBAAmB;;;;;EAA0D,CAAC;AAC3F,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;iBAY5C,CAAC;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAE5F,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAQ9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAItC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAKrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,2BAA2B;;iBAEtC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,4BAA4B;;;;;;;;;iBAIvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAE1C,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAExF;;;;GAIG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;iBAQlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
/**
|
|
3
|
+
* Schemas for the provider/model discovery and selection HTTP API.
|
|
4
|
+
*
|
|
5
|
+
* Endpoints:
|
|
6
|
+
* GET /api/providers → ListProvidersResponseSchema
|
|
7
|
+
* GET /api/providers/current → CurrentModelResponseSchema
|
|
8
|
+
* PATCH /api/providers/current → PatchCurrentModelBodySchema (request) / CurrentModelResponseSchema (response)
|
|
9
|
+
*/
|
|
10
|
+
export const ProviderModelRefSchema = z.object({
|
|
11
|
+
registryKey: z.string(),
|
|
12
|
+
provider: z.string(),
|
|
13
|
+
id: z.string(),
|
|
14
|
+
});
|
|
15
|
+
export const ProviderModelEntrySchema = z.object({
|
|
16
|
+
id: z.string(),
|
|
17
|
+
registryKey: z.string(),
|
|
18
|
+
provider: z.string(),
|
|
19
|
+
label: z.string().optional(),
|
|
20
|
+
contextWindow: z.number().optional(),
|
|
21
|
+
});
|
|
22
|
+
export const ConfiguredViaSchema = z.enum(['env', 'secrets', 'subscription', 'anonymous']);
|
|
23
|
+
export const ProviderAuthRouteDescriptorSchema = z.object({
|
|
24
|
+
route: z.enum(['api-key', 'secret-ref', 'service-oauth', 'subscription-oauth', 'anonymous', 'none']),
|
|
25
|
+
label: z.string(),
|
|
26
|
+
configured: z.boolean(),
|
|
27
|
+
usable: z.boolean().optional(),
|
|
28
|
+
freshness: z.enum(['healthy', 'expiring', 'expired', 'pending', 'unconfigured']).optional(),
|
|
29
|
+
detail: z.string().optional(),
|
|
30
|
+
envVars: z.array(z.string()).optional(),
|
|
31
|
+
secretKeys: z.array(z.string()).optional(),
|
|
32
|
+
serviceNames: z.array(z.string()).optional(),
|
|
33
|
+
providerId: z.string().optional(),
|
|
34
|
+
repairHints: z.array(z.string()).optional(),
|
|
35
|
+
});
|
|
36
|
+
export const ProviderEntrySchema = z.object({
|
|
37
|
+
id: z.string(),
|
|
38
|
+
label: z.string(),
|
|
39
|
+
configured: z.boolean(),
|
|
40
|
+
configuredVia: ConfiguredViaSchema.optional(),
|
|
41
|
+
envVars: z.array(z.string()),
|
|
42
|
+
routes: z.array(ProviderAuthRouteDescriptorSchema).optional(),
|
|
43
|
+
models: z.array(ProviderModelEntrySchema),
|
|
44
|
+
});
|
|
45
|
+
export const ListProvidersResponseSchema = z.object({
|
|
46
|
+
providers: z.array(ProviderEntrySchema),
|
|
47
|
+
currentModel: ProviderModelRefSchema.nullable(),
|
|
48
|
+
secretsResolutionSkipped: z.boolean().optional(),
|
|
49
|
+
});
|
|
50
|
+
export const CurrentModelResponseSchema = z.object({
|
|
51
|
+
model: ProviderModelRefSchema.nullable(),
|
|
52
|
+
configured: z.boolean(),
|
|
53
|
+
configuredVia: ConfiguredViaSchema.optional(),
|
|
54
|
+
routes: z.array(ProviderAuthRouteDescriptorSchema).optional(),
|
|
55
|
+
});
|
|
56
|
+
export const PatchCurrentModelBodySchema = z.object({
|
|
57
|
+
registryKey: z.string().min(1),
|
|
58
|
+
});
|
|
59
|
+
export const PatchCurrentModelErrorSchema = z.object({
|
|
60
|
+
error: z.string(),
|
|
61
|
+
code: z.enum(['INVALID_REQUEST', 'MODEL_NOT_FOUND', 'PROVIDER_NOT_CONFIGURED', 'SET_MODEL_FAILED']),
|
|
62
|
+
missingEnvVars: z.array(z.string()).optional(),
|
|
63
|
+
});
|
|
64
|
+
export const PatchCurrentModelResponseSchema = CurrentModelResponseSchema.extend({
|
|
65
|
+
persisted: z.boolean(),
|
|
66
|
+
});
|
|
67
|
+
/**
|
|
68
|
+
* SSE event shape emitted on `model.changed` events.
|
|
69
|
+
*
|
|
70
|
+
* Forwarded to companion SSE streams when the current model changes.
|
|
71
|
+
*/
|
|
72
|
+
export const ModelChangedEventSchema = z.object({
|
|
73
|
+
type: z.literal('MODEL_CHANGED'),
|
|
74
|
+
registryKey: z.string(),
|
|
75
|
+
provider: z.string(),
|
|
76
|
+
previous: z.object({
|
|
77
|
+
registryKey: z.string(),
|
|
78
|
+
provider: z.string(),
|
|
79
|
+
}).optional(),
|
|
80
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
/**
|
|
3
|
+
* Minimal schema for `control.status` response.
|
|
4
|
+
*
|
|
5
|
+
* Matches `OperatorMethodOutputMap["control.status"]`.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ControlStatusResponseSchema: z.ZodObject<{
|
|
8
|
+
status: z.ZodString;
|
|
9
|
+
version: z.ZodString;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export type ControlStatusResponse = z.infer<typeof ControlStatusResponseSchema>;
|
|
12
|
+
/**
|
|
13
|
+
* Minimal schema for `local_auth.status` response.
|
|
14
|
+
*
|
|
15
|
+
* Matches `OperatorMethodOutputMap["local_auth.status"]`.
|
|
16
|
+
*/
|
|
17
|
+
export declare const LocalAuthStatusResponseSchema: z.ZodObject<{
|
|
18
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
19
|
+
bootstrapped: z.ZodOptional<z.ZodBoolean>;
|
|
20
|
+
}, z.core.$catchall<z.ZodUnknown>>;
|
|
21
|
+
export type LocalAuthStatusResponse = z.infer<typeof LocalAuthStatusResponseSchema>;
|
|
22
|
+
//# sourceMappingURL=session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/zod-schemas/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B;;;;GAIG;AACH,eAAO,MAAM,2BAA2B;;;iBAGtC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF;;;;GAIG;AACH,eAAO,MAAM,6BAA6B;;;kCAGlB,CAAC;AAEzB,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
/**
|
|
3
|
+
* Minimal schema for `control.status` response.
|
|
4
|
+
*
|
|
5
|
+
* Matches `OperatorMethodOutputMap["control.status"]`.
|
|
6
|
+
*/
|
|
7
|
+
export const ControlStatusResponseSchema = z.object({
|
|
8
|
+
status: z.string(),
|
|
9
|
+
version: z.string(),
|
|
10
|
+
});
|
|
11
|
+
/**
|
|
12
|
+
* Minimal schema for `local_auth.status` response.
|
|
13
|
+
*
|
|
14
|
+
* Matches `OperatorMethodOutputMap["local_auth.status"]`.
|
|
15
|
+
*/
|
|
16
|
+
export const LocalAuthStatusResponseSchema = z.object({
|
|
17
|
+
enabled: z.boolean().optional(),
|
|
18
|
+
bootstrapped: z.boolean().optional(),
|
|
19
|
+
}).catchall(z.unknown());
|
package/package.json
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pellux/goodvibes-contracts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.30.1",
|
|
4
|
+
"engines": {
|
|
5
|
+
"node": ">=20.0.0"
|
|
6
|
+
},
|
|
4
7
|
"description": "Runtime-neutral GoodVibes operator and peer contract artifacts, generated ids, and lookup helpers.",
|
|
5
8
|
"type": "module",
|
|
6
9
|
"main": "./dist/index.js",
|
|
@@ -10,10 +13,62 @@
|
|
|
10
13
|
"types": "./dist/index.d.ts",
|
|
11
14
|
"import": "./dist/index.js"
|
|
12
15
|
},
|
|
16
|
+
"./generated/foundation-client-types": {
|
|
17
|
+
"types": "./dist/generated/foundation-client-types.d.ts",
|
|
18
|
+
"import": "./dist/generated/foundation-client-types.js"
|
|
19
|
+
},
|
|
20
|
+
"./generated/foundation-metadata": {
|
|
21
|
+
"types": "./dist/generated/foundation-metadata.d.ts",
|
|
22
|
+
"import": "./dist/generated/foundation-metadata.js"
|
|
23
|
+
},
|
|
24
|
+
"./generated/operator-contract": {
|
|
25
|
+
"types": "./dist/generated/operator-contract.d.ts",
|
|
26
|
+
"import": "./dist/generated/operator-contract.js"
|
|
27
|
+
},
|
|
28
|
+
"./generated/operator-method-ids": {
|
|
29
|
+
"types": "./dist/generated/operator-method-ids.d.ts",
|
|
30
|
+
"import": "./dist/generated/operator-method-ids.js"
|
|
31
|
+
},
|
|
32
|
+
"./generated/peer-contract": {
|
|
33
|
+
"types": "./dist/generated/peer-contract.d.ts",
|
|
34
|
+
"import": "./dist/generated/peer-contract.js"
|
|
35
|
+
},
|
|
36
|
+
"./generated/peer-endpoint-ids": {
|
|
37
|
+
"types": "./dist/generated/peer-endpoint-ids.d.ts",
|
|
38
|
+
"import": "./dist/generated/peer-endpoint-ids.js"
|
|
39
|
+
},
|
|
40
|
+
"./generated/runtime-event-domains": {
|
|
41
|
+
"types": "./dist/generated/runtime-event-domains.d.ts",
|
|
42
|
+
"import": "./dist/generated/runtime-event-domains.js"
|
|
43
|
+
},
|
|
13
44
|
"./node": {
|
|
14
45
|
"types": "./dist/node.d.ts",
|
|
15
46
|
"import": "./dist/node.js"
|
|
16
47
|
},
|
|
48
|
+
"./zod-schemas/accounts": {
|
|
49
|
+
"types": "./dist/zod-schemas/accounts.d.ts",
|
|
50
|
+
"import": "./dist/zod-schemas/accounts.js"
|
|
51
|
+
},
|
|
52
|
+
"./zod-schemas/auth": {
|
|
53
|
+
"types": "./dist/zod-schemas/auth.d.ts",
|
|
54
|
+
"import": "./dist/zod-schemas/auth.js"
|
|
55
|
+
},
|
|
56
|
+
"./zod-schemas/events": {
|
|
57
|
+
"types": "./dist/zod-schemas/events.d.ts",
|
|
58
|
+
"import": "./dist/zod-schemas/events.js"
|
|
59
|
+
},
|
|
60
|
+
"./zod-schemas/index": {
|
|
61
|
+
"types": "./dist/zod-schemas/index.d.ts",
|
|
62
|
+
"import": "./dist/zod-schemas/index.js"
|
|
63
|
+
},
|
|
64
|
+
"./zod-schemas/providers": {
|
|
65
|
+
"types": "./dist/zod-schemas/providers.d.ts",
|
|
66
|
+
"import": "./dist/zod-schemas/providers.js"
|
|
67
|
+
},
|
|
68
|
+
"./zod-schemas/session": {
|
|
69
|
+
"types": "./dist/zod-schemas/session.d.ts",
|
|
70
|
+
"import": "./dist/zod-schemas/session.js"
|
|
71
|
+
},
|
|
17
72
|
"./operator-contract.json": "./artifacts/operator-contract.json",
|
|
18
73
|
"./peer-contract.json": "./artifacts/peer-contract.json",
|
|
19
74
|
"./package.json": "./package.json"
|
|
@@ -39,6 +94,9 @@
|
|
|
39
94
|
"operator",
|
|
40
95
|
"peer"
|
|
41
96
|
],
|
|
97
|
+
"dependencies": {
|
|
98
|
+
"zod": "^4.3.6"
|
|
99
|
+
},
|
|
42
100
|
"publishConfig": {
|
|
43
101
|
"access": "public"
|
|
44
102
|
}
|