@tickernelz/paperclip-pro-shared 2026.1105.0 → 2026.1108.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.paperclip-build-complete +1 -1
- package/dist/agent-appearance.d.ts +1 -1
- package/dist/agent-appearance.js +1 -1
- package/dist/ai-connections.d.ts +53 -1
- package/dist/ai-connections.d.ts.map +1 -1
- package/dist/ai-connections.js +8 -2
- package/dist/ai-connections.js.map +1 -1
- package/dist/ai-provider-routing.d.ts.map +1 -1
- package/dist/ai-provider-routing.js +1 -2
- package/dist/ai-provider-routing.js.map +1 -1
- package/dist/app-definitions.test.js +0 -9
- package/dist/app-definitions.test.js.map +1 -1
- package/dist/config-schema.js +10 -10
- package/dist/config-schema.js.map +1 -1
- package/dist/config-schema.test.js +5 -5
- package/dist/config-schema.test.js.map +1 -1
- package/dist/constants.d.ts +6 -4
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +3 -25
- package/dist/constants.js.map +1 -1
- package/dist/env-aliases-bootstrap.d.ts +2 -0
- package/dist/env-aliases-bootstrap.d.ts.map +1 -0
- package/dist/env-aliases-bootstrap.js +3 -0
- package/dist/env-aliases-bootstrap.js.map +1 -0
- package/dist/env-aliases.d.ts +12 -0
- package/dist/env-aliases.d.ts.map +1 -0
- package/dist/env-aliases.js +61 -0
- package/dist/env-aliases.js.map +1 -0
- package/dist/env-aliases.test.d.ts +2 -0
- package/dist/env-aliases.test.d.ts.map +1 -0
- package/dist/env-aliases.test.js +92 -0
- package/dist/env-aliases.test.js.map +1 -0
- package/dist/environment-support.d.ts.map +1 -1
- package/dist/environment-support.js +2 -12
- package/dist/environment-support.js.map +1 -1
- package/dist/environment-support.test.js +0 -19
- package/dist/environment-support.test.js.map +1 -1
- package/dist/feature-catalog.d.ts +55 -0
- package/dist/feature-catalog.d.ts.map +1 -1
- package/dist/feature-catalog.js +459 -0
- package/dist/feature-catalog.js.map +1 -1
- package/dist/feature-catalog.test.js +115 -1
- package/dist/feature-catalog.test.js.map +1 -1
- package/dist/frontmatter.test.js +0 -1
- package/dist/frontmatter.test.js.map +1 -1
- package/dist/home-paths.d.ts +3 -0
- package/dist/home-paths.d.ts.map +1 -1
- package/dist/home-paths.js +26 -2
- package/dist/home-paths.js.map +1 -1
- package/dist/home-paths.test.js +56 -1
- package/dist/home-paths.test.js.map +1 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/dist/local-browser-contract.d.ts +2 -2
- package/dist/local-browser-contract.d.ts.map +1 -1
- package/dist/local-browser-contract.js +7 -1
- package/dist/local-browser-contract.js.map +1 -1
- package/dist/local-browser.d.ts +0 -30
- package/dist/local-browser.d.ts.map +1 -1
- package/dist/local-browser.js +1 -18
- package/dist/local-browser.js.map +1 -1
- package/dist/mcp-setup.js +2 -2
- package/dist/mcp-setup.js.map +1 -1
- package/dist/omp-agent-settings.d.ts +187 -0
- package/dist/omp-agent-settings.d.ts.map +1 -0
- package/dist/omp-agent-settings.js +518 -0
- package/dist/omp-agent-settings.js.map +1 -0
- package/dist/omp-agent-settings.test.d.ts +2 -0
- package/dist/omp-agent-settings.test.d.ts.map +1 -0
- package/dist/omp-agent-settings.test.js +181 -0
- package/dist/omp-agent-settings.test.js.map +1 -0
- package/dist/retired-adapters.d.ts +4 -0
- package/dist/retired-adapters.d.ts.map +1 -0
- package/dist/retired-adapters.js +23 -0
- package/dist/retired-adapters.js.map +1 -0
- package/dist/types/agent.d.ts +1 -1
- package/dist/types/agent.d.ts.map +1 -1
- package/dist/types/app-definition.d.ts +0 -3
- package/dist/types/app-definition.d.ts.map +1 -1
- package/dist/types/plugin.d.ts +0 -5
- package/dist/types/plugin.d.ts.map +1 -1
- package/dist/validators/access.d.ts +0 -9
- package/dist/validators/access.d.ts.map +1 -1
- package/dist/validators/access.js +1 -10
- package/dist/validators/access.js.map +1 -1
- package/dist/validators/adapter-auth-session.d.ts +0 -8
- package/dist/validators/adapter-auth-session.d.ts.map +1 -1
- package/dist/validators/adapter-auth-session.js +2 -2
- package/dist/validators/agent.d.ts +0 -2
- package/dist/validators/agent.d.ts.map +1 -1
- package/dist/validators/agent.js +1 -3
- package/dist/validators/agent.js.map +1 -1
- package/dist/validators/app-definition.d.ts +0 -6
- package/dist/validators/app-definition.d.ts.map +1 -1
- package/dist/validators/app-definition.js +2 -8
- package/dist/validators/app-definition.js.map +1 -1
- package/dist/validators/claude-setup-token-session.d.ts +0 -8
- package/dist/validators/claude-setup-token-session.d.ts.map +1 -1
- package/dist/validators/claude-setup-token-session.js +2 -2
- package/dist/validators/finance.d.ts +2 -14
- package/dist/validators/finance.d.ts.map +1 -1
- package/dist/validators/index.d.ts +1 -1
- package/dist/validators/index.d.ts.map +1 -1
- package/dist/validators/index.js +1 -1
- package/dist/validators/index.js.map +1 -1
- package/dist/validators/onboarding-omp.d.ts +77 -0
- package/dist/validators/onboarding-omp.d.ts.map +1 -0
- package/dist/validators/onboarding-omp.js +24 -0
- package/dist/validators/onboarding-omp.js.map +1 -0
- package/dist/validators/plugin.d.ts +2 -43
- package/dist/validators/plugin.d.ts.map +1 -1
- package/dist/validators/plugin.js +3 -5
- package/dist/validators/plugin.js.map +1 -1
- package/dist/validators/plugin.test.js +5 -3
- package/dist/validators/plugin.test.js.map +1 -1
- package/package.json +1 -1
- package/dist/ai-connection-router.d.ts +0 -361
- package/dist/ai-connection-router.d.ts.map +0 -1
- package/dist/ai-connection-router.js +0 -55
- package/dist/ai-connection-router.js.map +0 -1
|
@@ -1,361 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { type AiConnectionBinding } from "./ai-connections.js";
|
|
3
|
-
import type { AiConnectionUsage } from "./ai-connection-usage.js";
|
|
4
|
-
export declare const aiConnectionRouterBindingSchema: z.ZodObject<{
|
|
5
|
-
mode: z.ZodLiteral<"router">;
|
|
6
|
-
connectionId: z.ZodString;
|
|
7
|
-
}, z.core.$strict>;
|
|
8
|
-
export declare const aiRuntimeConnectionBindingSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
9
|
-
provider: z.ZodEnum<{
|
|
10
|
-
anthropic: "anthropic";
|
|
11
|
-
google: "google";
|
|
12
|
-
openai: "openai";
|
|
13
|
-
openrouter: "openrouter";
|
|
14
|
-
xai: "xai";
|
|
15
|
-
}>;
|
|
16
|
-
method: z.ZodEnum<{
|
|
17
|
-
api_key: "api_key";
|
|
18
|
-
subscription: "subscription";
|
|
19
|
-
}>;
|
|
20
|
-
mode: z.ZodLiteral<"responsible_user">;
|
|
21
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
22
|
-
provider: z.ZodEnum<{
|
|
23
|
-
anthropic: "anthropic";
|
|
24
|
-
google: "google";
|
|
25
|
-
openai: "openai";
|
|
26
|
-
openrouter: "openrouter";
|
|
27
|
-
xai: "xai";
|
|
28
|
-
}>;
|
|
29
|
-
method: z.ZodEnum<{
|
|
30
|
-
api_key: "api_key";
|
|
31
|
-
subscription: "subscription";
|
|
32
|
-
}>;
|
|
33
|
-
mode: z.ZodLiteral<"shared">;
|
|
34
|
-
connectionId: z.ZodString;
|
|
35
|
-
grantId: z.ZodString;
|
|
36
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
37
|
-
provider: z.ZodEnum<{
|
|
38
|
-
anthropic: "anthropic";
|
|
39
|
-
google: "google";
|
|
40
|
-
openai: "openai";
|
|
41
|
-
openrouter: "openrouter";
|
|
42
|
-
xai: "xai";
|
|
43
|
-
}>;
|
|
44
|
-
method: z.ZodEnum<{
|
|
45
|
-
api_key: "api_key";
|
|
46
|
-
subscription: "subscription";
|
|
47
|
-
}>;
|
|
48
|
-
mode: z.ZodLiteral<"delegated">;
|
|
49
|
-
connectionId: z.ZodString;
|
|
50
|
-
grantId: z.ZodString;
|
|
51
|
-
}, z.core.$strict>], "mode">, z.ZodObject<{
|
|
52
|
-
mode: z.ZodLiteral<"router">;
|
|
53
|
-
connectionId: z.ZodString;
|
|
54
|
-
}, z.core.$strict>]>;
|
|
55
|
-
export type AiRuntimeConnectionBinding = z.infer<typeof aiRuntimeConnectionBindingSchema>;
|
|
56
|
-
export declare const aiConnectionPoolMemberSchema: z.ZodObject<{
|
|
57
|
-
id: z.ZodString;
|
|
58
|
-
binding: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
59
|
-
provider: z.ZodEnum<{
|
|
60
|
-
anthropic: "anthropic";
|
|
61
|
-
google: "google";
|
|
62
|
-
openai: "openai";
|
|
63
|
-
openrouter: "openrouter";
|
|
64
|
-
xai: "xai";
|
|
65
|
-
}>;
|
|
66
|
-
method: z.ZodEnum<{
|
|
67
|
-
api_key: "api_key";
|
|
68
|
-
subscription: "subscription";
|
|
69
|
-
}>;
|
|
70
|
-
mode: z.ZodLiteral<"responsible_user">;
|
|
71
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
72
|
-
provider: z.ZodEnum<{
|
|
73
|
-
anthropic: "anthropic";
|
|
74
|
-
google: "google";
|
|
75
|
-
openai: "openai";
|
|
76
|
-
openrouter: "openrouter";
|
|
77
|
-
xai: "xai";
|
|
78
|
-
}>;
|
|
79
|
-
method: z.ZodEnum<{
|
|
80
|
-
api_key: "api_key";
|
|
81
|
-
subscription: "subscription";
|
|
82
|
-
}>;
|
|
83
|
-
mode: z.ZodLiteral<"shared">;
|
|
84
|
-
connectionId: z.ZodString;
|
|
85
|
-
grantId: z.ZodString;
|
|
86
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
87
|
-
provider: z.ZodEnum<{
|
|
88
|
-
anthropic: "anthropic";
|
|
89
|
-
google: "google";
|
|
90
|
-
openai: "openai";
|
|
91
|
-
openrouter: "openrouter";
|
|
92
|
-
xai: "xai";
|
|
93
|
-
}>;
|
|
94
|
-
method: z.ZodEnum<{
|
|
95
|
-
api_key: "api_key";
|
|
96
|
-
subscription: "subscription";
|
|
97
|
-
}>;
|
|
98
|
-
mode: z.ZodLiteral<"delegated">;
|
|
99
|
-
connectionId: z.ZodString;
|
|
100
|
-
grantId: z.ZodString;
|
|
101
|
-
}, z.core.$strict>], "mode"> & z.ZodType<{
|
|
102
|
-
provider: "anthropic" | "google" | "openai" | "openrouter" | "xai";
|
|
103
|
-
method: "api_key" | "subscription";
|
|
104
|
-
mode: "shared";
|
|
105
|
-
connectionId: string;
|
|
106
|
-
grantId: string;
|
|
107
|
-
} | {
|
|
108
|
-
provider: "anthropic" | "google" | "openai" | "openrouter" | "xai";
|
|
109
|
-
method: "api_key" | "subscription";
|
|
110
|
-
mode: "delegated";
|
|
111
|
-
connectionId: string;
|
|
112
|
-
grantId: string;
|
|
113
|
-
}, {
|
|
114
|
-
provider: "anthropic" | "google" | "openai" | "openrouter" | "xai";
|
|
115
|
-
method: "api_key" | "subscription";
|
|
116
|
-
mode: "responsible_user";
|
|
117
|
-
} | {
|
|
118
|
-
provider: "anthropic" | "google" | "openai" | "openrouter" | "xai";
|
|
119
|
-
method: "api_key" | "subscription";
|
|
120
|
-
mode: "shared";
|
|
121
|
-
connectionId: string;
|
|
122
|
-
grantId: string;
|
|
123
|
-
} | {
|
|
124
|
-
provider: "anthropic" | "google" | "openai" | "openrouter" | "xai";
|
|
125
|
-
method: "api_key" | "subscription";
|
|
126
|
-
mode: "delegated";
|
|
127
|
-
connectionId: string;
|
|
128
|
-
grantId: string;
|
|
129
|
-
}, z.core.$ZodTypeInternals<{
|
|
130
|
-
provider: "anthropic" | "google" | "openai" | "openrouter" | "xai";
|
|
131
|
-
method: "api_key" | "subscription";
|
|
132
|
-
mode: "shared";
|
|
133
|
-
connectionId: string;
|
|
134
|
-
grantId: string;
|
|
135
|
-
} | {
|
|
136
|
-
provider: "anthropic" | "google" | "openai" | "openrouter" | "xai";
|
|
137
|
-
method: "api_key" | "subscription";
|
|
138
|
-
mode: "delegated";
|
|
139
|
-
connectionId: string;
|
|
140
|
-
grantId: string;
|
|
141
|
-
}, {
|
|
142
|
-
provider: "anthropic" | "google" | "openai" | "openrouter" | "xai";
|
|
143
|
-
method: "api_key" | "subscription";
|
|
144
|
-
mode: "responsible_user";
|
|
145
|
-
} | {
|
|
146
|
-
provider: "anthropic" | "google" | "openai" | "openrouter" | "xai";
|
|
147
|
-
method: "api_key" | "subscription";
|
|
148
|
-
mode: "shared";
|
|
149
|
-
connectionId: string;
|
|
150
|
-
grantId: string;
|
|
151
|
-
} | {
|
|
152
|
-
provider: "anthropic" | "google" | "openai" | "openrouter" | "xai";
|
|
153
|
-
method: "api_key" | "subscription";
|
|
154
|
-
mode: "delegated";
|
|
155
|
-
connectionId: string;
|
|
156
|
-
grantId: string;
|
|
157
|
-
}>>;
|
|
158
|
-
profile: z.ZodObject<{
|
|
159
|
-
provider: z.ZodEnum<{
|
|
160
|
-
acpx: "acpx";
|
|
161
|
-
codex: "codex";
|
|
162
|
-
opencode: "opencode";
|
|
163
|
-
}>;
|
|
164
|
-
acpxAgent: z.ZodOptional<z.ZodEnum<{
|
|
165
|
-
claude: "claude";
|
|
166
|
-
grok: "grok";
|
|
167
|
-
}>>;
|
|
168
|
-
model: z.ZodString;
|
|
169
|
-
effort: z.ZodOptional<z.ZodString>;
|
|
170
|
-
}, z.core.$strict>;
|
|
171
|
-
}, z.core.$strict>;
|
|
172
|
-
export declare const aiConnectionPoolConfigSchema: z.ZodObject<{
|
|
173
|
-
name: z.ZodString;
|
|
174
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
175
|
-
mode: z.ZodDefault<z.ZodEnum<{
|
|
176
|
-
round_robin: "round_robin";
|
|
177
|
-
usage_aware: "usage_aware";
|
|
178
|
-
}>>;
|
|
179
|
-
thresholdPercent: z.ZodDefault<z.ZodNumber>;
|
|
180
|
-
members: z.ZodArray<z.ZodObject<{
|
|
181
|
-
id: z.ZodString;
|
|
182
|
-
binding: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
183
|
-
provider: z.ZodEnum<{
|
|
184
|
-
anthropic: "anthropic";
|
|
185
|
-
google: "google";
|
|
186
|
-
openai: "openai";
|
|
187
|
-
openrouter: "openrouter";
|
|
188
|
-
xai: "xai";
|
|
189
|
-
}>;
|
|
190
|
-
method: z.ZodEnum<{
|
|
191
|
-
api_key: "api_key";
|
|
192
|
-
subscription: "subscription";
|
|
193
|
-
}>;
|
|
194
|
-
mode: z.ZodLiteral<"responsible_user">;
|
|
195
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
196
|
-
provider: z.ZodEnum<{
|
|
197
|
-
anthropic: "anthropic";
|
|
198
|
-
google: "google";
|
|
199
|
-
openai: "openai";
|
|
200
|
-
openrouter: "openrouter";
|
|
201
|
-
xai: "xai";
|
|
202
|
-
}>;
|
|
203
|
-
method: z.ZodEnum<{
|
|
204
|
-
api_key: "api_key";
|
|
205
|
-
subscription: "subscription";
|
|
206
|
-
}>;
|
|
207
|
-
mode: z.ZodLiteral<"shared">;
|
|
208
|
-
connectionId: z.ZodString;
|
|
209
|
-
grantId: z.ZodString;
|
|
210
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
211
|
-
provider: z.ZodEnum<{
|
|
212
|
-
anthropic: "anthropic";
|
|
213
|
-
google: "google";
|
|
214
|
-
openai: "openai";
|
|
215
|
-
openrouter: "openrouter";
|
|
216
|
-
xai: "xai";
|
|
217
|
-
}>;
|
|
218
|
-
method: z.ZodEnum<{
|
|
219
|
-
api_key: "api_key";
|
|
220
|
-
subscription: "subscription";
|
|
221
|
-
}>;
|
|
222
|
-
mode: z.ZodLiteral<"delegated">;
|
|
223
|
-
connectionId: z.ZodString;
|
|
224
|
-
grantId: z.ZodString;
|
|
225
|
-
}, z.core.$strict>], "mode"> & z.ZodType<{
|
|
226
|
-
provider: "anthropic" | "google" | "openai" | "openrouter" | "xai";
|
|
227
|
-
method: "api_key" | "subscription";
|
|
228
|
-
mode: "shared";
|
|
229
|
-
connectionId: string;
|
|
230
|
-
grantId: string;
|
|
231
|
-
} | {
|
|
232
|
-
provider: "anthropic" | "google" | "openai" | "openrouter" | "xai";
|
|
233
|
-
method: "api_key" | "subscription";
|
|
234
|
-
mode: "delegated";
|
|
235
|
-
connectionId: string;
|
|
236
|
-
grantId: string;
|
|
237
|
-
}, {
|
|
238
|
-
provider: "anthropic" | "google" | "openai" | "openrouter" | "xai";
|
|
239
|
-
method: "api_key" | "subscription";
|
|
240
|
-
mode: "responsible_user";
|
|
241
|
-
} | {
|
|
242
|
-
provider: "anthropic" | "google" | "openai" | "openrouter" | "xai";
|
|
243
|
-
method: "api_key" | "subscription";
|
|
244
|
-
mode: "shared";
|
|
245
|
-
connectionId: string;
|
|
246
|
-
grantId: string;
|
|
247
|
-
} | {
|
|
248
|
-
provider: "anthropic" | "google" | "openai" | "openrouter" | "xai";
|
|
249
|
-
method: "api_key" | "subscription";
|
|
250
|
-
mode: "delegated";
|
|
251
|
-
connectionId: string;
|
|
252
|
-
grantId: string;
|
|
253
|
-
}, z.core.$ZodTypeInternals<{
|
|
254
|
-
provider: "anthropic" | "google" | "openai" | "openrouter" | "xai";
|
|
255
|
-
method: "api_key" | "subscription";
|
|
256
|
-
mode: "shared";
|
|
257
|
-
connectionId: string;
|
|
258
|
-
grantId: string;
|
|
259
|
-
} | {
|
|
260
|
-
provider: "anthropic" | "google" | "openai" | "openrouter" | "xai";
|
|
261
|
-
method: "api_key" | "subscription";
|
|
262
|
-
mode: "delegated";
|
|
263
|
-
connectionId: string;
|
|
264
|
-
grantId: string;
|
|
265
|
-
}, {
|
|
266
|
-
provider: "anthropic" | "google" | "openai" | "openrouter" | "xai";
|
|
267
|
-
method: "api_key" | "subscription";
|
|
268
|
-
mode: "responsible_user";
|
|
269
|
-
} | {
|
|
270
|
-
provider: "anthropic" | "google" | "openai" | "openrouter" | "xai";
|
|
271
|
-
method: "api_key" | "subscription";
|
|
272
|
-
mode: "shared";
|
|
273
|
-
connectionId: string;
|
|
274
|
-
grantId: string;
|
|
275
|
-
} | {
|
|
276
|
-
provider: "anthropic" | "google" | "openai" | "openrouter" | "xai";
|
|
277
|
-
method: "api_key" | "subscription";
|
|
278
|
-
mode: "delegated";
|
|
279
|
-
connectionId: string;
|
|
280
|
-
grantId: string;
|
|
281
|
-
}>>;
|
|
282
|
-
profile: z.ZodObject<{
|
|
283
|
-
provider: z.ZodEnum<{
|
|
284
|
-
acpx: "acpx";
|
|
285
|
-
codex: "codex";
|
|
286
|
-
opencode: "opencode";
|
|
287
|
-
}>;
|
|
288
|
-
acpxAgent: z.ZodOptional<z.ZodEnum<{
|
|
289
|
-
claude: "claude";
|
|
290
|
-
grok: "grok";
|
|
291
|
-
}>>;
|
|
292
|
-
model: z.ZodString;
|
|
293
|
-
effort: z.ZodOptional<z.ZodString>;
|
|
294
|
-
}, z.core.$strict>;
|
|
295
|
-
}, z.core.$strict>>;
|
|
296
|
-
}, z.core.$strict>;
|
|
297
|
-
export type AiConnectionPoolMember = z.infer<typeof aiConnectionPoolMemberSchema>;
|
|
298
|
-
export type AiConnectionPoolConfig = z.infer<typeof aiConnectionPoolConfigSchema>;
|
|
299
|
-
export interface AiConnectionPool extends AiConnectionPoolConfig {
|
|
300
|
-
id: string;
|
|
301
|
-
companyId: string;
|
|
302
|
-
pluginKey: string;
|
|
303
|
-
revision: number;
|
|
304
|
-
}
|
|
305
|
-
/** Host-authorized metadata only. No credentials or raw provider responses. */
|
|
306
|
-
export interface AiConnectionRouterRequest {
|
|
307
|
-
companyId: string;
|
|
308
|
-
pool: AiConnectionPool;
|
|
309
|
-
agentId: string;
|
|
310
|
-
taskKey: string;
|
|
311
|
-
lastMemberId: string | null;
|
|
312
|
-
cursorVersion: number;
|
|
313
|
-
/** Opaque IDs preserve order without exposing unauthorized account metadata. */
|
|
314
|
-
memberOrder: string[];
|
|
315
|
-
pinnedMemberId?: string;
|
|
316
|
-
candidates: Array<{
|
|
317
|
-
member: AiConnectionPoolMember;
|
|
318
|
-
runtimeConfig: Record<string, unknown>;
|
|
319
|
-
notes: string[];
|
|
320
|
-
usage?: AiConnectionUsage;
|
|
321
|
-
}>;
|
|
322
|
-
now: string;
|
|
323
|
-
}
|
|
324
|
-
export type AiConnectionRouterResult = {
|
|
325
|
-
kind: "selected";
|
|
326
|
-
memberId: string;
|
|
327
|
-
skipped?: Record<string, string>;
|
|
328
|
-
} | {
|
|
329
|
-
kind: "exhausted";
|
|
330
|
-
retryAt: string;
|
|
331
|
-
skipped: Record<string, string>;
|
|
332
|
-
} | {
|
|
333
|
-
kind: "unavailable";
|
|
334
|
-
skipped: Record<string, string>;
|
|
335
|
-
};
|
|
336
|
-
export interface AiConnectionPoolSaveInput {
|
|
337
|
-
companyId: string;
|
|
338
|
-
id?: string;
|
|
339
|
-
expectedRevision?: number;
|
|
340
|
-
config: AiConnectionPoolConfig;
|
|
341
|
-
}
|
|
342
|
-
export interface AiConnectionRouterSelection {
|
|
343
|
-
poolId: string;
|
|
344
|
-
memberId: string;
|
|
345
|
-
binding: AiConnectionBinding;
|
|
346
|
-
runtimeConfig: Record<string, unknown>;
|
|
347
|
-
notes: string[];
|
|
348
|
-
}
|
|
349
|
-
/** Stable, collision-free catalog identity across plugin reinstallations. */
|
|
350
|
-
export declare function aiConnectionRouterSlug(pluginKey: string): string;
|
|
351
|
-
export declare function aiConnectionRouterAppDefinition(pluginKey: string, descriptor: {
|
|
352
|
-
name: string;
|
|
353
|
-
description: string;
|
|
354
|
-
}, availability?: {
|
|
355
|
-
available: boolean;
|
|
356
|
-
reason?: string;
|
|
357
|
-
}): import("./types/app-definition.js").AppDefinition;
|
|
358
|
-
export declare function aiConnectionRouterPluginKey(connection: {
|
|
359
|
-
config?: Record<string, unknown> | null;
|
|
360
|
-
}): string | null;
|
|
361
|
-
//# sourceMappingURL=ai-connection-router.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ai-connection-router.d.ts","sourceRoot":"","sources":["../src/ai-connection-router.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAA6B,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,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A+B,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,EAAE,YAAY,GAA0B;IAAE,SAAS,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,2BAA2B,EAAE,aAAa,CAOtP;AAED,wBAAgB,2BAA2B,CAAC,UAAU,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;CAAE,GAAG,MAAM,GAAG,IAAI,CAGlH"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { aiConnectionBindingSchema } from "./ai-connections.js";
|
|
3
|
-
export const aiConnectionRouterBindingSchema = z.object({
|
|
4
|
-
mode: z.literal("router"),
|
|
5
|
-
connectionId: z.string().uuid(),
|
|
6
|
-
}).strict();
|
|
7
|
-
export const aiRuntimeConnectionBindingSchema = z.union([aiConnectionBindingSchema, aiConnectionRouterBindingSchema]);
|
|
8
|
-
export const aiConnectionPoolMemberSchema = z.object({
|
|
9
|
-
id: z.string().uuid(),
|
|
10
|
-
binding: aiConnectionBindingSchema.refine((v) => v.mode !== "responsible_user", "Select an explicit account grant"),
|
|
11
|
-
profile: z.object({
|
|
12
|
-
provider: z.enum(["codex", "acpx", "opencode"]),
|
|
13
|
-
acpxAgent: z.enum(["claude", "grok"]).optional(),
|
|
14
|
-
model: z.string().trim().min(1).max(256),
|
|
15
|
-
effort: z.string().trim().min(1).max(32).optional(),
|
|
16
|
-
}).strict(),
|
|
17
|
-
}).strict();
|
|
18
|
-
export const aiConnectionPoolConfigSchema = z.object({
|
|
19
|
-
name: z.string().trim().min(1).max(160),
|
|
20
|
-
enabled: z.boolean().default(false),
|
|
21
|
-
mode: z.enum(["round_robin", "usage_aware"]).default("round_robin"),
|
|
22
|
-
thresholdPercent: z.number().int().min(1).max(100).default(90),
|
|
23
|
-
members: z.array(aiConnectionPoolMemberSchema).min(1).max(100),
|
|
24
|
-
}).strict().superRefine((v, ctx) => {
|
|
25
|
-
const ids = new Set();
|
|
26
|
-
const grants = new Set();
|
|
27
|
-
const connections = new Set();
|
|
28
|
-
for (const [index, member] of v.members.entries()) {
|
|
29
|
-
const grant = `${member.binding.connectionId}:${member.binding.grantId}`;
|
|
30
|
-
if (ids.has(member.id) || grants.has(grant) || connections.has(member.binding.connectionId))
|
|
31
|
-
ctx.addIssue({ code: "custom", path: ["members", index], message: "Duplicate pool member" });
|
|
32
|
-
ids.add(member.id);
|
|
33
|
-
grants.add(grant);
|
|
34
|
-
connections.add(member.binding.connectionId);
|
|
35
|
-
if (member.profile.provider === "acpx" && !member.profile.acpxAgent)
|
|
36
|
-
ctx.addIssue({ code: "custom", path: ["members", index, "profile"], message: "Choose an ACP harness" });
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
/** Stable, collision-free catalog identity across plugin reinstallations. */
|
|
40
|
-
export function aiConnectionRouterSlug(pluginKey) {
|
|
41
|
-
return `ai-router-${Array.from(pluginKey, character => character.charCodeAt(0).toString(16).padStart(2, "0")).join("")}`;
|
|
42
|
-
}
|
|
43
|
-
export function aiConnectionRouterAppDefinition(pluginKey, descriptor, availability = { available: true }) {
|
|
44
|
-
return {
|
|
45
|
-
schemaVersion: 1, slug: aiConnectionRouterSlug(pluginKey), ...descriptor,
|
|
46
|
-
categories: ["ai"], branding: { logoUrl: "/brands/apps/connection-pool.svg" }, urlPatterns: [],
|
|
47
|
-
aiConnectionRouter: { pluginKey }, availability,
|
|
48
|
-
methods: [],
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
export function aiConnectionRouterPluginKey(connection) {
|
|
52
|
-
const router = connection.config?.aiRouter;
|
|
53
|
-
return router && typeof router === "object" && "pluginKey" in router && typeof router.pluginKey === "string" ? router.pluginKey : null;
|
|
54
|
-
}
|
|
55
|
-
//# sourceMappingURL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