@inkeep/agents-core 0.61.0 → 0.62.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/auth/auth-validation-schemas.d.ts +154 -154
- package/dist/auth/auth.d.ts +6 -6
- package/dist/auth/init.js +3 -1
- package/dist/auth/permissions.d.ts +13 -13
- package/dist/data-access/manage/agents.d.ts +32 -32
- package/dist/data-access/manage/artifactComponents.d.ts +8 -8
- package/dist/data-access/manage/contextConfigs.d.ts +8 -8
- package/dist/data-access/manage/dataComponents.d.ts +4 -4
- package/dist/data-access/manage/functionTools.d.ts +12 -12
- package/dist/data-access/manage/skills.d.ts +14 -14
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +18 -18
- package/dist/data-access/manage/subAgentRelations.d.ts +20 -20
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +18 -18
- package/dist/data-access/manage/subAgents.d.ts +12 -12
- package/dist/data-access/manage/tools.d.ts +21 -21
- package/dist/data-access/manage/triggers.d.ts +2 -2
- package/dist/data-access/runtime/apiKeys.d.ts +16 -16
- package/dist/data-access/runtime/apps.d.ts +6 -6
- package/dist/data-access/runtime/conversations.d.ts +20 -20
- package/dist/data-access/runtime/messages.d.ts +12 -12
- package/dist/data-access/runtime/scheduledTriggerInvocations.d.ts +3 -3
- package/dist/data-access/runtime/tasks.d.ts +4 -4
- package/dist/db/manage/manage-schema.d.ts +454 -454
- package/dist/db/runtime/runtime-schema.d.ts +344 -344
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/utils/error.d.ts +51 -51
- package/dist/utils/index.d.ts +2 -2
- package/dist/utils/index.js +2 -2
- package/dist/utils/jwt-helpers.d.ts +7 -1
- package/dist/utils/jwt-helpers.js +11 -1
- package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
- package/dist/validation/schemas.d.ts +1952 -1952
- package/dist/validation/schemas.js +1 -1
- package/drizzle/runtime/0027_seed-playground-app.sql +13 -0
- package/drizzle/runtime/meta/0027_snapshot.json +4389 -0
- package/drizzle/runtime/meta/_journal.json +7 -0
- package/package.json +1 -1
package/dist/utils/error.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ import { HTTPException } from "hono/http-exception";
|
|
|
3
3
|
|
|
4
4
|
//#region src/utils/error.d.ts
|
|
5
5
|
declare const ErrorCode: z.ZodEnum<{
|
|
6
|
-
bad_request: "bad_request";
|
|
7
6
|
unauthorized: "unauthorized";
|
|
7
|
+
bad_request: "bad_request";
|
|
8
8
|
forbidden: "forbidden";
|
|
9
9
|
not_found: "not_found";
|
|
10
10
|
conflict: "conflict";
|
|
@@ -20,8 +20,8 @@ declare const problemDetailsSchema: z.ZodObject<{
|
|
|
20
20
|
instance: z.ZodOptional<z.ZodString>;
|
|
21
21
|
requestId: z.ZodOptional<z.ZodString>;
|
|
22
22
|
code: z.ZodEnum<{
|
|
23
|
-
bad_request: "bad_request";
|
|
24
23
|
unauthorized: "unauthorized";
|
|
24
|
+
bad_request: "bad_request";
|
|
25
25
|
forbidden: "forbidden";
|
|
26
26
|
not_found: "not_found";
|
|
27
27
|
conflict: "conflict";
|
|
@@ -35,8 +35,8 @@ type ErrorCodes = z.infer<typeof ErrorCode>;
|
|
|
35
35
|
declare const errorResponseSchema: z.ZodObject<{
|
|
36
36
|
error: z.ZodObject<{
|
|
37
37
|
code: z.ZodEnum<{
|
|
38
|
-
bad_request: "bad_request";
|
|
39
38
|
unauthorized: "unauthorized";
|
|
39
|
+
bad_request: "bad_request";
|
|
40
40
|
forbidden: "forbidden";
|
|
41
41
|
not_found: "not_found";
|
|
42
42
|
conflict: "conflict";
|
|
@@ -74,12 +74,12 @@ declare const errorSchemaFactory: (code: ErrorCodes, description: string) => {
|
|
|
74
74
|
schema: z.ZodObject<{
|
|
75
75
|
instance: z.ZodOptional<z.ZodString>;
|
|
76
76
|
requestId: z.ZodOptional<z.ZodString>;
|
|
77
|
-
code: z.ZodLiteral<"
|
|
77
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
78
78
|
detail: z.ZodString;
|
|
79
79
|
title: z.ZodString;
|
|
80
80
|
status: z.ZodNumber;
|
|
81
81
|
error: z.ZodObject<{
|
|
82
|
-
code: z.ZodLiteral<"
|
|
82
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
83
83
|
message: z.ZodString;
|
|
84
84
|
}, z.core.$strip>;
|
|
85
85
|
}, z.core.$strip>;
|
|
@@ -96,12 +96,12 @@ declare const commonCreateErrorResponses: {
|
|
|
96
96
|
schema: z.ZodObject<{
|
|
97
97
|
instance: z.ZodOptional<z.ZodString>;
|
|
98
98
|
requestId: z.ZodOptional<z.ZodString>;
|
|
99
|
-
code: z.ZodLiteral<"
|
|
99
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
100
100
|
detail: z.ZodString;
|
|
101
101
|
title: z.ZodString;
|
|
102
102
|
status: z.ZodNumber;
|
|
103
103
|
error: z.ZodObject<{
|
|
104
|
-
code: z.ZodLiteral<"
|
|
104
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
105
105
|
message: z.ZodString;
|
|
106
106
|
}, z.core.$strip>;
|
|
107
107
|
}, z.core.$strip>;
|
|
@@ -115,12 +115,12 @@ declare const commonCreateErrorResponses: {
|
|
|
115
115
|
schema: z.ZodObject<{
|
|
116
116
|
instance: z.ZodOptional<z.ZodString>;
|
|
117
117
|
requestId: z.ZodOptional<z.ZodString>;
|
|
118
|
-
code: z.ZodLiteral<"
|
|
118
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
119
119
|
detail: z.ZodString;
|
|
120
120
|
title: z.ZodString;
|
|
121
121
|
status: z.ZodNumber;
|
|
122
122
|
error: z.ZodObject<{
|
|
123
|
-
code: z.ZodLiteral<"
|
|
123
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
124
124
|
message: z.ZodString;
|
|
125
125
|
}, z.core.$strip>;
|
|
126
126
|
}, z.core.$strip>;
|
|
@@ -134,12 +134,12 @@ declare const commonCreateErrorResponses: {
|
|
|
134
134
|
schema: z.ZodObject<{
|
|
135
135
|
instance: z.ZodOptional<z.ZodString>;
|
|
136
136
|
requestId: z.ZodOptional<z.ZodString>;
|
|
137
|
-
code: z.ZodLiteral<"
|
|
137
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
138
138
|
detail: z.ZodString;
|
|
139
139
|
title: z.ZodString;
|
|
140
140
|
status: z.ZodNumber;
|
|
141
141
|
error: z.ZodObject<{
|
|
142
|
-
code: z.ZodLiteral<"
|
|
142
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
143
143
|
message: z.ZodString;
|
|
144
144
|
}, z.core.$strip>;
|
|
145
145
|
}, z.core.$strip>;
|
|
@@ -153,12 +153,12 @@ declare const commonCreateErrorResponses: {
|
|
|
153
153
|
schema: z.ZodObject<{
|
|
154
154
|
instance: z.ZodOptional<z.ZodString>;
|
|
155
155
|
requestId: z.ZodOptional<z.ZodString>;
|
|
156
|
-
code: z.ZodLiteral<"
|
|
156
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
157
157
|
detail: z.ZodString;
|
|
158
158
|
title: z.ZodString;
|
|
159
159
|
status: z.ZodNumber;
|
|
160
160
|
error: z.ZodObject<{
|
|
161
|
-
code: z.ZodLiteral<"
|
|
161
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
162
162
|
message: z.ZodString;
|
|
163
163
|
}, z.core.$strip>;
|
|
164
164
|
}, z.core.$strip>;
|
|
@@ -172,12 +172,12 @@ declare const commonCreateErrorResponses: {
|
|
|
172
172
|
schema: z.ZodObject<{
|
|
173
173
|
instance: z.ZodOptional<z.ZodString>;
|
|
174
174
|
requestId: z.ZodOptional<z.ZodString>;
|
|
175
|
-
code: z.ZodLiteral<"
|
|
175
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
176
176
|
detail: z.ZodString;
|
|
177
177
|
title: z.ZodString;
|
|
178
178
|
status: z.ZodNumber;
|
|
179
179
|
error: z.ZodObject<{
|
|
180
|
-
code: z.ZodLiteral<"
|
|
180
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
181
181
|
message: z.ZodString;
|
|
182
182
|
}, z.core.$strip>;
|
|
183
183
|
}, z.core.$strip>;
|
|
@@ -193,12 +193,12 @@ declare const commonUpdateErrorResponses: {
|
|
|
193
193
|
schema: z.ZodObject<{
|
|
194
194
|
instance: z.ZodOptional<z.ZodString>;
|
|
195
195
|
requestId: z.ZodOptional<z.ZodString>;
|
|
196
|
-
code: z.ZodLiteral<"
|
|
196
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
197
197
|
detail: z.ZodString;
|
|
198
198
|
title: z.ZodString;
|
|
199
199
|
status: z.ZodNumber;
|
|
200
200
|
error: z.ZodObject<{
|
|
201
|
-
code: z.ZodLiteral<"
|
|
201
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
202
202
|
message: z.ZodString;
|
|
203
203
|
}, z.core.$strip>;
|
|
204
204
|
}, z.core.$strip>;
|
|
@@ -212,12 +212,12 @@ declare const commonUpdateErrorResponses: {
|
|
|
212
212
|
schema: z.ZodObject<{
|
|
213
213
|
instance: z.ZodOptional<z.ZodString>;
|
|
214
214
|
requestId: z.ZodOptional<z.ZodString>;
|
|
215
|
-
code: z.ZodLiteral<"
|
|
215
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
216
216
|
detail: z.ZodString;
|
|
217
217
|
title: z.ZodString;
|
|
218
218
|
status: z.ZodNumber;
|
|
219
219
|
error: z.ZodObject<{
|
|
220
|
-
code: z.ZodLiteral<"
|
|
220
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
221
221
|
message: z.ZodString;
|
|
222
222
|
}, z.core.$strip>;
|
|
223
223
|
}, z.core.$strip>;
|
|
@@ -231,12 +231,12 @@ declare const commonUpdateErrorResponses: {
|
|
|
231
231
|
schema: z.ZodObject<{
|
|
232
232
|
instance: z.ZodOptional<z.ZodString>;
|
|
233
233
|
requestId: z.ZodOptional<z.ZodString>;
|
|
234
|
-
code: z.ZodLiteral<"
|
|
234
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
235
235
|
detail: z.ZodString;
|
|
236
236
|
title: z.ZodString;
|
|
237
237
|
status: z.ZodNumber;
|
|
238
238
|
error: z.ZodObject<{
|
|
239
|
-
code: z.ZodLiteral<"
|
|
239
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
240
240
|
message: z.ZodString;
|
|
241
241
|
}, z.core.$strip>;
|
|
242
242
|
}, z.core.$strip>;
|
|
@@ -250,12 +250,12 @@ declare const commonUpdateErrorResponses: {
|
|
|
250
250
|
schema: z.ZodObject<{
|
|
251
251
|
instance: z.ZodOptional<z.ZodString>;
|
|
252
252
|
requestId: z.ZodOptional<z.ZodString>;
|
|
253
|
-
code: z.ZodLiteral<"
|
|
253
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
254
254
|
detail: z.ZodString;
|
|
255
255
|
title: z.ZodString;
|
|
256
256
|
status: z.ZodNumber;
|
|
257
257
|
error: z.ZodObject<{
|
|
258
|
-
code: z.ZodLiteral<"
|
|
258
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
259
259
|
message: z.ZodString;
|
|
260
260
|
}, z.core.$strip>;
|
|
261
261
|
}, z.core.$strip>;
|
|
@@ -269,12 +269,12 @@ declare const commonUpdateErrorResponses: {
|
|
|
269
269
|
schema: z.ZodObject<{
|
|
270
270
|
instance: z.ZodOptional<z.ZodString>;
|
|
271
271
|
requestId: z.ZodOptional<z.ZodString>;
|
|
272
|
-
code: z.ZodLiteral<"
|
|
272
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
273
273
|
detail: z.ZodString;
|
|
274
274
|
title: z.ZodString;
|
|
275
275
|
status: z.ZodNumber;
|
|
276
276
|
error: z.ZodObject<{
|
|
277
|
-
code: z.ZodLiteral<"
|
|
277
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
278
278
|
message: z.ZodString;
|
|
279
279
|
}, z.core.$strip>;
|
|
280
280
|
}, z.core.$strip>;
|
|
@@ -288,12 +288,12 @@ declare const commonUpdateErrorResponses: {
|
|
|
288
288
|
schema: z.ZodObject<{
|
|
289
289
|
instance: z.ZodOptional<z.ZodString>;
|
|
290
290
|
requestId: z.ZodOptional<z.ZodString>;
|
|
291
|
-
code: z.ZodLiteral<"
|
|
291
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
292
292
|
detail: z.ZodString;
|
|
293
293
|
title: z.ZodString;
|
|
294
294
|
status: z.ZodNumber;
|
|
295
295
|
error: z.ZodObject<{
|
|
296
|
-
code: z.ZodLiteral<"
|
|
296
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
297
297
|
message: z.ZodString;
|
|
298
298
|
}, z.core.$strip>;
|
|
299
299
|
}, z.core.$strip>;
|
|
@@ -309,12 +309,12 @@ declare const commonGetErrorResponses: {
|
|
|
309
309
|
schema: z.ZodObject<{
|
|
310
310
|
instance: z.ZodOptional<z.ZodString>;
|
|
311
311
|
requestId: z.ZodOptional<z.ZodString>;
|
|
312
|
-
code: z.ZodLiteral<"
|
|
312
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
313
313
|
detail: z.ZodString;
|
|
314
314
|
title: z.ZodString;
|
|
315
315
|
status: z.ZodNumber;
|
|
316
316
|
error: z.ZodObject<{
|
|
317
|
-
code: z.ZodLiteral<"
|
|
317
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
318
318
|
message: z.ZodString;
|
|
319
319
|
}, z.core.$strip>;
|
|
320
320
|
}, z.core.$strip>;
|
|
@@ -328,12 +328,12 @@ declare const commonGetErrorResponses: {
|
|
|
328
328
|
schema: z.ZodObject<{
|
|
329
329
|
instance: z.ZodOptional<z.ZodString>;
|
|
330
330
|
requestId: z.ZodOptional<z.ZodString>;
|
|
331
|
-
code: z.ZodLiteral<"
|
|
331
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
332
332
|
detail: z.ZodString;
|
|
333
333
|
title: z.ZodString;
|
|
334
334
|
status: z.ZodNumber;
|
|
335
335
|
error: z.ZodObject<{
|
|
336
|
-
code: z.ZodLiteral<"
|
|
336
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
337
337
|
message: z.ZodString;
|
|
338
338
|
}, z.core.$strip>;
|
|
339
339
|
}, z.core.$strip>;
|
|
@@ -347,12 +347,12 @@ declare const commonGetErrorResponses: {
|
|
|
347
347
|
schema: z.ZodObject<{
|
|
348
348
|
instance: z.ZodOptional<z.ZodString>;
|
|
349
349
|
requestId: z.ZodOptional<z.ZodString>;
|
|
350
|
-
code: z.ZodLiteral<"
|
|
350
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
351
351
|
detail: z.ZodString;
|
|
352
352
|
title: z.ZodString;
|
|
353
353
|
status: z.ZodNumber;
|
|
354
354
|
error: z.ZodObject<{
|
|
355
|
-
code: z.ZodLiteral<"
|
|
355
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
356
356
|
message: z.ZodString;
|
|
357
357
|
}, z.core.$strip>;
|
|
358
358
|
}, z.core.$strip>;
|
|
@@ -366,12 +366,12 @@ declare const commonGetErrorResponses: {
|
|
|
366
366
|
schema: z.ZodObject<{
|
|
367
367
|
instance: z.ZodOptional<z.ZodString>;
|
|
368
368
|
requestId: z.ZodOptional<z.ZodString>;
|
|
369
|
-
code: z.ZodLiteral<"
|
|
369
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
370
370
|
detail: z.ZodString;
|
|
371
371
|
title: z.ZodString;
|
|
372
372
|
status: z.ZodNumber;
|
|
373
373
|
error: z.ZodObject<{
|
|
374
|
-
code: z.ZodLiteral<"
|
|
374
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
375
375
|
message: z.ZodString;
|
|
376
376
|
}, z.core.$strip>;
|
|
377
377
|
}, z.core.$strip>;
|
|
@@ -385,12 +385,12 @@ declare const commonGetErrorResponses: {
|
|
|
385
385
|
schema: z.ZodObject<{
|
|
386
386
|
instance: z.ZodOptional<z.ZodString>;
|
|
387
387
|
requestId: z.ZodOptional<z.ZodString>;
|
|
388
|
-
code: z.ZodLiteral<"
|
|
388
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
389
389
|
detail: z.ZodString;
|
|
390
390
|
title: z.ZodString;
|
|
391
391
|
status: z.ZodNumber;
|
|
392
392
|
error: z.ZodObject<{
|
|
393
|
-
code: z.ZodLiteral<"
|
|
393
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
394
394
|
message: z.ZodString;
|
|
395
395
|
}, z.core.$strip>;
|
|
396
396
|
}, z.core.$strip>;
|
|
@@ -404,12 +404,12 @@ declare const commonGetErrorResponses: {
|
|
|
404
404
|
schema: z.ZodObject<{
|
|
405
405
|
instance: z.ZodOptional<z.ZodString>;
|
|
406
406
|
requestId: z.ZodOptional<z.ZodString>;
|
|
407
|
-
code: z.ZodLiteral<"
|
|
407
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
408
408
|
detail: z.ZodString;
|
|
409
409
|
title: z.ZodString;
|
|
410
410
|
status: z.ZodNumber;
|
|
411
411
|
error: z.ZodObject<{
|
|
412
|
-
code: z.ZodLiteral<"
|
|
412
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
413
413
|
message: z.ZodString;
|
|
414
414
|
}, z.core.$strip>;
|
|
415
415
|
}, z.core.$strip>;
|
|
@@ -425,12 +425,12 @@ declare const commonDeleteErrorResponses: {
|
|
|
425
425
|
schema: z.ZodObject<{
|
|
426
426
|
instance: z.ZodOptional<z.ZodString>;
|
|
427
427
|
requestId: z.ZodOptional<z.ZodString>;
|
|
428
|
-
code: z.ZodLiteral<"
|
|
428
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
429
429
|
detail: z.ZodString;
|
|
430
430
|
title: z.ZodString;
|
|
431
431
|
status: z.ZodNumber;
|
|
432
432
|
error: z.ZodObject<{
|
|
433
|
-
code: z.ZodLiteral<"
|
|
433
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
434
434
|
message: z.ZodString;
|
|
435
435
|
}, z.core.$strip>;
|
|
436
436
|
}, z.core.$strip>;
|
|
@@ -444,12 +444,12 @@ declare const commonDeleteErrorResponses: {
|
|
|
444
444
|
schema: z.ZodObject<{
|
|
445
445
|
instance: z.ZodOptional<z.ZodString>;
|
|
446
446
|
requestId: z.ZodOptional<z.ZodString>;
|
|
447
|
-
code: z.ZodLiteral<"
|
|
447
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
448
448
|
detail: z.ZodString;
|
|
449
449
|
title: z.ZodString;
|
|
450
450
|
status: z.ZodNumber;
|
|
451
451
|
error: z.ZodObject<{
|
|
452
|
-
code: z.ZodLiteral<"
|
|
452
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
453
453
|
message: z.ZodString;
|
|
454
454
|
}, z.core.$strip>;
|
|
455
455
|
}, z.core.$strip>;
|
|
@@ -463,12 +463,12 @@ declare const commonDeleteErrorResponses: {
|
|
|
463
463
|
schema: z.ZodObject<{
|
|
464
464
|
instance: z.ZodOptional<z.ZodString>;
|
|
465
465
|
requestId: z.ZodOptional<z.ZodString>;
|
|
466
|
-
code: z.ZodLiteral<"
|
|
466
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
467
467
|
detail: z.ZodString;
|
|
468
468
|
title: z.ZodString;
|
|
469
469
|
status: z.ZodNumber;
|
|
470
470
|
error: z.ZodObject<{
|
|
471
|
-
code: z.ZodLiteral<"
|
|
471
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
472
472
|
message: z.ZodString;
|
|
473
473
|
}, z.core.$strip>;
|
|
474
474
|
}, z.core.$strip>;
|
|
@@ -482,12 +482,12 @@ declare const commonDeleteErrorResponses: {
|
|
|
482
482
|
schema: z.ZodObject<{
|
|
483
483
|
instance: z.ZodOptional<z.ZodString>;
|
|
484
484
|
requestId: z.ZodOptional<z.ZodString>;
|
|
485
|
-
code: z.ZodLiteral<"
|
|
485
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
486
486
|
detail: z.ZodString;
|
|
487
487
|
title: z.ZodString;
|
|
488
488
|
status: z.ZodNumber;
|
|
489
489
|
error: z.ZodObject<{
|
|
490
|
-
code: z.ZodLiteral<"
|
|
490
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
491
491
|
message: z.ZodString;
|
|
492
492
|
}, z.core.$strip>;
|
|
493
493
|
}, z.core.$strip>;
|
|
@@ -501,12 +501,12 @@ declare const commonDeleteErrorResponses: {
|
|
|
501
501
|
schema: z.ZodObject<{
|
|
502
502
|
instance: z.ZodOptional<z.ZodString>;
|
|
503
503
|
requestId: z.ZodOptional<z.ZodString>;
|
|
504
|
-
code: z.ZodLiteral<"
|
|
504
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
505
505
|
detail: z.ZodString;
|
|
506
506
|
title: z.ZodString;
|
|
507
507
|
status: z.ZodNumber;
|
|
508
508
|
error: z.ZodObject<{
|
|
509
|
-
code: z.ZodLiteral<"
|
|
509
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
510
510
|
message: z.ZodString;
|
|
511
511
|
}, z.core.$strip>;
|
|
512
512
|
}, z.core.$strip>;
|
|
@@ -520,12 +520,12 @@ declare const commonDeleteErrorResponses: {
|
|
|
520
520
|
schema: z.ZodObject<{
|
|
521
521
|
instance: z.ZodOptional<z.ZodString>;
|
|
522
522
|
requestId: z.ZodOptional<z.ZodString>;
|
|
523
|
-
code: z.ZodLiteral<"
|
|
523
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
524
524
|
detail: z.ZodString;
|
|
525
525
|
title: z.ZodString;
|
|
526
526
|
status: z.ZodNumber;
|
|
527
527
|
error: z.ZodObject<{
|
|
528
|
-
code: z.ZodLiteral<"
|
|
528
|
+
code: z.ZodLiteral<"unauthorized" | "bad_request" | "forbidden" | "not_found" | "conflict" | "too_many_requests" | "internal_server_error" | "unprocessable_entity">;
|
|
529
529
|
message: z.ZodString;
|
|
530
530
|
}, z.core.$strip>;
|
|
531
531
|
}, z.core.$strip>;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { JwtVerifyResult, SignJwtOptions, VerifyJwtOptions, decodeJwtPayload, extractBearerToken, getJwtSecret, hasIssuer, signJwt, verifyJwt } from "./jwt-helpers.js";
|
|
1
|
+
import { JwtVerifyResult, SignJwtOptions, VerifyJwtOptions, decodeJwtPayload, derivePlaygroundKid, extractBearerToken, getJwtSecret, hasIssuer, signJwt, verifyJwt } from "./jwt-helpers.js";
|
|
2
2
|
import { GenerateInternalServiceTokenParams, InternalServiceId, InternalServiceTokenPayload, InternalServices, VerifyInternalServiceTokenResult, generateInternalServiceToken, isInternalServiceToken, validateInternalServiceProjectAccess, validateInternalServiceTenantAccess, verifyInternalServiceAuthHeader, verifyInternalServiceToken } from "./internal-service-auth.js";
|
|
3
3
|
import { LoggerFactoryConfig, PinoLogger, PinoLoggerConfig, getLogger, loggerFactory } from "./logger.js";
|
|
4
4
|
import { McpClient, McpClientOptions, McpSSEConfig, McpServerConfig, McpStreamableHttpConfig, activeMcpClients } from "./mcp-client.js";
|
|
@@ -37,4 +37,4 @@ import "./usage-tracker.js";
|
|
|
37
37
|
import { ValidatePublicKeyResult, validatePublicKey } from "./validate-public-key.js";
|
|
38
38
|
import { _resetWaitUntilCache, getWaitUntil } from "./wait-until.js";
|
|
39
39
|
import { TRUSTED_WORK_APP_MCP_PATHS, isTrustedWorkAppMcpUrl } from "./work-app-mcp.js";
|
|
40
|
-
export { ApiKeyGenerationResult, AppCredentialResult, AssembleResult, CommonCreateErrorResponses, CommonDeleteErrorResponses, CommonGetErrorResponses, CommonUpdateErrorResponses, ComposioAuthResult, CredentialScope, ERROR_DOCS_BASE_URL, ErrorCode, ErrorCodes, ErrorResponse, GenerateInternalServiceTokenParams, GenerateServiceTokenParams, GenerationType, HashedHeaderValue, InternalServiceId, InternalServiceTokenPayload, InternalServices, JsonTransformer, JwtVerifyResult, LLMMessage, LoggerFactoryConfig, McpClient, McpClientOptions, McpOAuthFlowResult, McpSSEConfig, McpServerConfig, McpStreamableHttpConfig, McpTokenExchangeResult, MockLanguageModel, ModelFactory, OAuthConfig, ParsedSSEResponse, PinoLogger, PinoLoggerConfig, PoWError, PoWResult, ProblemDetails, ServiceTokenPayload, SignJwtOptions, SignSlackLinkTokenParams, SignSlackUserTokenParams, SignatureVerificationErrorCode, SignatureVerificationResult, SignedTempToken, SlackAccessTokenPayload, SlackAccessTokenPayloadSchema, SlackLinkIntent, SlackLinkIntentSchema, SlackLinkTokenPayload, SlackLinkTokenPayloadSchema, TRUSTED_WORK_APP_MCP_PATHS, TempTokenPayload, TriggerAuthResult, ValidatePublicKeyResult, VerifyInternalServiceTokenResult, VerifyJwtOptions, VerifyServiceTokenResult, VerifySlackLinkTokenResult, VerifySlackUserTokenResult, _resetWaitUntilCache, activeMcpClients, buildConversationMetadata, commonCreateErrorResponses, commonDeleteErrorResponses, commonGetErrorResponses, commonUpdateErrorResponses, configureComposioMCPServer, convertZodToJsonSchema, convertZodToJsonSchemaWithPreview, createApiError, createMockModel, decodeJwtPayload, deleteComposioConnectedAccount, deriveRelationId, detectAuthenticationRequired, errorResponseSchema, errorSchemaFactory, estimateTokens, exchangeMcpAuthorizationCode, extractBearerToken, extractComposioServerId, extractPreviewFields, extractPublicId, extractUsageTokens, fetchComposioServers, fetchSingleComposioServer, flushTraces, formatMessagesForLLM, formatMessagesForLLMContext, gatewayCostMiddleware, generateApiKey, generateAppCredential, generateId, generateInternalServiceToken, generateServiceToken, getComposioInstance, getComposioOAuthRedirectUrl, getComposioUserId, getConversationId, getCredentialStoreLookupKeyFromRetrievalParams, getInProcessFetch, getJwtSecret, getLogger, getMetadataFromApiKey, getPoWErrorMessage, getTracer, getWaitUntil, handleApiError, hasIssuer, hashApiKey, hashAuthenticationHeaders, hashTriggerHeaderValue, initiateMcpOAuthFlow, interpolateTemplate, isApiKeyExpired, isComposioMCPServerAuthenticated, isDevelopment, isInternalServiceToken, isPoWEnabled, isProduction, isSlackUserToken, isTest, isThirdPartyMCPServerAuthenticated, isTrustedWorkAppMcpUrl, isUniqueConstraintError, isZodSchema, loggerFactory, makeAllPropertiesRequired, maskApiKey, normalizeDataComponentSchema, normalizeDateString, parseEmbeddedJson, parseSSEResponse, preview, problemDetailsSchema, registerAppFetch, retryWithBackoff, sanitizeAppConfig, setSpanWithError, signJwt, signSlackLinkToken, signSlackUserToken, signTempToken, stripUnsupportedConstraints, throwIfUniqueConstraintError, toISODateString, unwrapError, validateApiKey, validateInternalServiceProjectAccess, validateInternalServiceTenantAccess, validateOrigin, validatePublicKey, validateTargetAgent, validateTenantId, validateTriggerHeaderValue, verifyAuthorizationHeader, verifyInternalServiceAuthHeader, verifyInternalServiceToken, verifyJwt, verifyPoW, verifyServiceToken, verifySignatureWithConfig, verifySlackLinkToken, verifySlackUserToken, verifyTempToken, verifyTriggerAuth };
|
|
40
|
+
export { ApiKeyGenerationResult, AppCredentialResult, AssembleResult, CommonCreateErrorResponses, CommonDeleteErrorResponses, CommonGetErrorResponses, CommonUpdateErrorResponses, ComposioAuthResult, CredentialScope, ERROR_DOCS_BASE_URL, ErrorCode, ErrorCodes, ErrorResponse, GenerateInternalServiceTokenParams, GenerateServiceTokenParams, GenerationType, HashedHeaderValue, InternalServiceId, InternalServiceTokenPayload, InternalServices, JsonTransformer, JwtVerifyResult, LLMMessage, LoggerFactoryConfig, McpClient, McpClientOptions, McpOAuthFlowResult, McpSSEConfig, McpServerConfig, McpStreamableHttpConfig, McpTokenExchangeResult, MockLanguageModel, ModelFactory, OAuthConfig, ParsedSSEResponse, PinoLogger, PinoLoggerConfig, PoWError, PoWResult, ProblemDetails, ServiceTokenPayload, SignJwtOptions, SignSlackLinkTokenParams, SignSlackUserTokenParams, SignatureVerificationErrorCode, SignatureVerificationResult, SignedTempToken, SlackAccessTokenPayload, SlackAccessTokenPayloadSchema, SlackLinkIntent, SlackLinkIntentSchema, SlackLinkTokenPayload, SlackLinkTokenPayloadSchema, TRUSTED_WORK_APP_MCP_PATHS, TempTokenPayload, TriggerAuthResult, ValidatePublicKeyResult, VerifyInternalServiceTokenResult, VerifyJwtOptions, VerifyServiceTokenResult, VerifySlackLinkTokenResult, VerifySlackUserTokenResult, _resetWaitUntilCache, activeMcpClients, buildConversationMetadata, commonCreateErrorResponses, commonDeleteErrorResponses, commonGetErrorResponses, commonUpdateErrorResponses, configureComposioMCPServer, convertZodToJsonSchema, convertZodToJsonSchemaWithPreview, createApiError, createMockModel, decodeJwtPayload, deleteComposioConnectedAccount, derivePlaygroundKid, deriveRelationId, detectAuthenticationRequired, errorResponseSchema, errorSchemaFactory, estimateTokens, exchangeMcpAuthorizationCode, extractBearerToken, extractComposioServerId, extractPreviewFields, extractPublicId, extractUsageTokens, fetchComposioServers, fetchSingleComposioServer, flushTraces, formatMessagesForLLM, formatMessagesForLLMContext, gatewayCostMiddleware, generateApiKey, generateAppCredential, generateId, generateInternalServiceToken, generateServiceToken, getComposioInstance, getComposioOAuthRedirectUrl, getComposioUserId, getConversationId, getCredentialStoreLookupKeyFromRetrievalParams, getInProcessFetch, getJwtSecret, getLogger, getMetadataFromApiKey, getPoWErrorMessage, getTracer, getWaitUntil, handleApiError, hasIssuer, hashApiKey, hashAuthenticationHeaders, hashTriggerHeaderValue, initiateMcpOAuthFlow, interpolateTemplate, isApiKeyExpired, isComposioMCPServerAuthenticated, isDevelopment, isInternalServiceToken, isPoWEnabled, isProduction, isSlackUserToken, isTest, isThirdPartyMCPServerAuthenticated, isTrustedWorkAppMcpUrl, isUniqueConstraintError, isZodSchema, loggerFactory, makeAllPropertiesRequired, maskApiKey, normalizeDataComponentSchema, normalizeDateString, parseEmbeddedJson, parseSSEResponse, preview, problemDetailsSchema, registerAppFetch, retryWithBackoff, sanitizeAppConfig, setSpanWithError, signJwt, signSlackLinkToken, signSlackUserToken, signTempToken, stripUnsupportedConstraints, throwIfUniqueConstraintError, toISODateString, unwrapError, validateApiKey, validateInternalServiceProjectAccess, validateInternalServiceTenantAccess, validateOrigin, validatePublicKey, validateTargetAgent, validateTenantId, validateTriggerHeaderValue, verifyAuthorizationHeader, verifyInternalServiceAuthHeader, verifyInternalServiceToken, verifyJwt, verifyPoW, verifyServiceToken, verifySignatureWithConfig, verifySlackLinkToken, verifySlackUserToken, verifyTempToken, verifyTriggerAuth };
|
package/dist/utils/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { detectAuthenticationRequired, exchangeMcpAuthorizationCode, initiateMcpOAuthFlow } from "./auth-detection.js";
|
|
2
2
|
import { PinoLogger, getLogger, loggerFactory } from "./logger.js";
|
|
3
|
-
import { decodeJwtPayload, extractBearerToken, getJwtSecret, hasIssuer, signJwt, verifyJwt } from "./jwt-helpers.js";
|
|
3
|
+
import { decodeJwtPayload, derivePlaygroundKid, extractBearerToken, getJwtSecret, hasIssuer, signJwt, verifyJwt } from "./jwt-helpers.js";
|
|
4
4
|
import { InternalServices, generateInternalServiceToken, isInternalServiceToken, validateInternalServiceProjectAccess, validateInternalServiceTenantAccess, verifyInternalServiceAuthHeader, verifyInternalServiceToken } from "./internal-service-auth.js";
|
|
5
5
|
import { convertZodToJsonSchema, convertZodToJsonSchemaWithPreview, extractPreviewFields, isZodSchema, makeAllPropertiesRequired, normalizeDataComponentSchema, preview, stripUnsupportedConstraints } from "./schema-conversion.js";
|
|
6
6
|
import { configureComposioMCPServer, deleteComposioConnectedAccount, extractComposioServerId, fetchComposioServers, fetchSingleComposioServer, getComposioInstance, getComposioOAuthRedirectUrl, getComposioUserId, isComposioMCPServerAuthenticated } from "./third-party-mcp-servers/composio-client.js";
|
|
@@ -36,4 +36,4 @@ import { validatePublicKey } from "./validate-public-key.js";
|
|
|
36
36
|
import { _resetWaitUntilCache, getWaitUntil } from "./wait-until.js";
|
|
37
37
|
import { TRUSTED_WORK_APP_MCP_PATHS, isTrustedWorkAppMcpUrl } from "./work-app-mcp.js";
|
|
38
38
|
|
|
39
|
-
export { ERROR_DOCS_BASE_URL, ErrorCode, InternalServices, JsonTransformer, McpClient, MockLanguageModel, ModelFactory, PinoLogger, SlackAccessTokenPayloadSchema, SlackLinkIntentSchema, SlackLinkTokenPayloadSchema, TRUSTED_WORK_APP_MCP_PATHS, _resetWaitUntilCache, activeMcpClients, buildConversationMetadata, commonCreateErrorResponses, commonDeleteErrorResponses, commonGetErrorResponses, commonUpdateErrorResponses, configureComposioMCPServer, convertZodToJsonSchema, convertZodToJsonSchemaWithPreview, createApiError, createMockModel, decodeJwtPayload, deleteComposioConnectedAccount, deriveRelationId, detectAuthenticationRequired, errorResponseSchema, errorSchemaFactory, estimateTokens, exchangeMcpAuthorizationCode, extractBearerToken, extractComposioServerId, extractPreviewFields, extractPublicId, extractUsageTokens, fetchComposioServers, fetchSingleComposioServer, flushTraces, formatMessagesForLLM, formatMessagesForLLMContext, gatewayCostMiddleware, generateApiKey, generateAppCredential, generateId, generateInternalServiceToken, generateServiceToken, getComposioInstance, getComposioOAuthRedirectUrl, getComposioUserId, getConversationId, getCredentialStoreLookupKeyFromRetrievalParams, getInProcessFetch, getJwtSecret, getLogger, getMetadataFromApiKey, getPoWErrorMessage, getTracer, getWaitUntil, handleApiError, hasIssuer, hashApiKey, hashAuthenticationHeaders, hashTriggerHeaderValue, initiateMcpOAuthFlow, interpolateTemplate, isApiKeyExpired, isComposioMCPServerAuthenticated, isDevelopment, isInternalServiceToken, isPoWEnabled, isProduction, isSlackUserToken, isTest, isThirdPartyMCPServerAuthenticated, isTrustedWorkAppMcpUrl, isUniqueConstraintError, isZodSchema, loggerFactory, makeAllPropertiesRequired, maskApiKey, normalizeDataComponentSchema, normalizeDateString, parseEmbeddedJson, parseSSEResponse, preview, problemDetailsSchema, registerAppFetch, retryWithBackoff, sanitizeAppConfig, setSpanWithError, signJwt, signSlackLinkToken, signSlackUserToken, signTempToken, stripUnsupportedConstraints, throwIfUniqueConstraintError, toISODateString, unwrapError, validateApiKey, validateInternalServiceProjectAccess, validateInternalServiceTenantAccess, validateOrigin, validatePublicKey, validateTargetAgent, validateTenantId, validateTriggerHeaderValue, verifyAuthorizationHeader, verifyInternalServiceAuthHeader, verifyInternalServiceToken, verifyJwt, verifyPoW, verifyServiceToken, verifySignatureWithConfig, verifySlackLinkToken, verifySlackUserToken, verifyTempToken, verifyTriggerAuth };
|
|
39
|
+
export { ERROR_DOCS_BASE_URL, ErrorCode, InternalServices, JsonTransformer, McpClient, MockLanguageModel, ModelFactory, PinoLogger, SlackAccessTokenPayloadSchema, SlackLinkIntentSchema, SlackLinkTokenPayloadSchema, TRUSTED_WORK_APP_MCP_PATHS, _resetWaitUntilCache, activeMcpClients, buildConversationMetadata, commonCreateErrorResponses, commonDeleteErrorResponses, commonGetErrorResponses, commonUpdateErrorResponses, configureComposioMCPServer, convertZodToJsonSchema, convertZodToJsonSchemaWithPreview, createApiError, createMockModel, decodeJwtPayload, deleteComposioConnectedAccount, derivePlaygroundKid, deriveRelationId, detectAuthenticationRequired, errorResponseSchema, errorSchemaFactory, estimateTokens, exchangeMcpAuthorizationCode, extractBearerToken, extractComposioServerId, extractPreviewFields, extractPublicId, extractUsageTokens, fetchComposioServers, fetchSingleComposioServer, flushTraces, formatMessagesForLLM, formatMessagesForLLMContext, gatewayCostMiddleware, generateApiKey, generateAppCredential, generateId, generateInternalServiceToken, generateServiceToken, getComposioInstance, getComposioOAuthRedirectUrl, getComposioUserId, getConversationId, getCredentialStoreLookupKeyFromRetrievalParams, getInProcessFetch, getJwtSecret, getLogger, getMetadataFromApiKey, getPoWErrorMessage, getTracer, getWaitUntil, handleApiError, hasIssuer, hashApiKey, hashAuthenticationHeaders, hashTriggerHeaderValue, initiateMcpOAuthFlow, interpolateTemplate, isApiKeyExpired, isComposioMCPServerAuthenticated, isDevelopment, isInternalServiceToken, isPoWEnabled, isProduction, isSlackUserToken, isTest, isThirdPartyMCPServerAuthenticated, isTrustedWorkAppMcpUrl, isUniqueConstraintError, isZodSchema, loggerFactory, makeAllPropertiesRequired, maskApiKey, normalizeDataComponentSchema, normalizeDateString, parseEmbeddedJson, parseSSEResponse, preview, problemDetailsSchema, registerAppFetch, retryWithBackoff, sanitizeAppConfig, setSpanWithError, signJwt, signSlackLinkToken, signSlackUserToken, signTempToken, stripUnsupportedConstraints, throwIfUniqueConstraintError, toISODateString, unwrapError, validateApiKey, validateInternalServiceProjectAccess, validateInternalServiceTenantAccess, validateOrigin, validatePublicKey, validateTargetAgent, validateTenantId, validateTriggerHeaderValue, verifyAuthorizationHeader, verifyInternalServiceAuthHeader, verifyInternalServiceToken, verifyJwt, verifyPoW, verifyServiceToken, verifySignatureWithConfig, verifySlackLinkToken, verifySlackUserToken, verifyTempToken, verifyTriggerAuth };
|
|
@@ -52,5 +52,11 @@ declare function decodeJwtPayload(token: string): Record<string, unknown> | null
|
|
|
52
52
|
* Check if a token has a specific issuer (without full verification)
|
|
53
53
|
*/
|
|
54
54
|
declare function hasIssuer(token: string, issuer: string): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Derive a deterministic kid from a PEM-encoded public key.
|
|
57
|
+
* Used for playground app key registration and token signing.
|
|
58
|
+
* The kid is a truncated SHA-256 hash prefixed with 'pg-'.
|
|
59
|
+
*/
|
|
60
|
+
declare function derivePlaygroundKid(publicKeyPem: string): Promise<string>;
|
|
55
61
|
//#endregion
|
|
56
|
-
export { JwtVerifyResult, SignJwtOptions, VerifyJwtOptions, decodeJwtPayload, extractBearerToken, getJwtSecret, hasIssuer, signJwt, verifyJwt };
|
|
62
|
+
export { JwtVerifyResult, SignJwtOptions, VerifyJwtOptions, decodeJwtPayload, derivePlaygroundKid, extractBearerToken, getJwtSecret, hasIssuer, signJwt, verifyJwt };
|
|
@@ -85,6 +85,16 @@ function decodeJwtPayload(token) {
|
|
|
85
85
|
function hasIssuer(token, issuer) {
|
|
86
86
|
return decodeJwtPayload(token)?.iss === issuer;
|
|
87
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* Derive a deterministic kid from a PEM-encoded public key.
|
|
90
|
+
* Used for playground app key registration and token signing.
|
|
91
|
+
* The kid is a truncated SHA-256 hash prefixed with 'pg-'.
|
|
92
|
+
*/
|
|
93
|
+
async function derivePlaygroundKid(publicKeyPem) {
|
|
94
|
+
const data = new TextEncoder().encode(publicKeyPem);
|
|
95
|
+
const hashBuffer = await crypto.subtle.digest("SHA-256", data);
|
|
96
|
+
return `pg-${Array.from(new Uint8Array(hashBuffer)).map((b) => b.toString(16).padStart(2, "0")).join("").substring(0, 12)}`;
|
|
97
|
+
}
|
|
88
98
|
|
|
89
99
|
//#endregion
|
|
90
|
-
export { decodeJwtPayload, extractBearerToken, getJwtSecret, hasIssuer, signJwt, verifyJwt };
|
|
100
|
+
export { decodeJwtPayload, derivePlaygroundKid, extractBearerToken, getJwtSecret, hasIssuer, signJwt, verifyJwt };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { z } from "@hono/zod-openapi";
|
|
2
|
-
import * as
|
|
2
|
+
import * as drizzle_zod15 from "drizzle-zod";
|
|
3
3
|
import { AnySQLiteTable } from "drizzle-orm/sqlite-core";
|
|
4
4
|
|
|
5
5
|
//#region src/validation/drizzle-schema-helpers.d.ts
|
|
6
|
-
declare function createSelectSchemaWithModifiers<T extends AnySQLiteTable>(table: T, overrides?: Partial<Record<keyof T['_']['columns'], (schema: z.ZodTypeAny) => z.ZodTypeAny>>):
|
|
7
|
-
declare function createInsertSchemaWithModifiers<T extends AnySQLiteTable>(table: T, overrides?: Partial<Record<keyof T['_']['columns'], (schema: z.ZodTypeAny) => z.ZodTypeAny>>):
|
|
6
|
+
declare function createSelectSchemaWithModifiers<T extends AnySQLiteTable>(table: T, overrides?: Partial<Record<keyof T['_']['columns'], (schema: z.ZodTypeAny) => z.ZodTypeAny>>): drizzle_zod15.BuildSchema<"select", T["_"]["columns"], drizzle_zod15.BuildRefine<T["_"]["columns"], undefined>, undefined>;
|
|
7
|
+
declare function createInsertSchemaWithModifiers<T extends AnySQLiteTable>(table: T, overrides?: Partial<Record<keyof T['_']['columns'], (schema: z.ZodTypeAny) => z.ZodTypeAny>>): drizzle_zod15.BuildSchema<"insert", T["_"]["columns"], drizzle_zod15.BuildRefine<Pick<T["_"]["columns"], keyof T["$inferInsert"]>, undefined>, undefined>;
|
|
8
8
|
declare const createSelectSchema: typeof createSelectSchemaWithModifiers;
|
|
9
9
|
declare const createInsertSchema: typeof createInsertSchemaWithModifiers;
|
|
10
10
|
/**
|