@vibes.diy/api-types 8.1.1 → 8.1.2
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/app.d.ts +100 -4
- package/chat.d.ts +1038 -297
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/invite.d.ts +14 -14
- package/package.json +4 -4
- package/prompt.d.ts +164 -8
- package/prompt.js +4 -1
- package/prompt.js.map +1 -1
- package/research.d.ts +110 -0
- package/research.js +262 -0
- package/research.js.map +1 -0
package/index.d.ts
CHANGED
package/index.js
CHANGED
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../jsr/index.ts"],"names":[],"mappings":"AAEA,cAAc,YAAY,CAAC;AAC3B,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AAEjC,cAAc,qBAAqB,CAAC;AAEpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAE5B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAE1B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAA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,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAQlC,MAAM,UAAU,eAAe,CAAC,MAAmB;IACjD,OAAO,MAAM,CAAC,IAAI,KAAK,UAAU,CAAC;AACpC,CAAC;AACD,MAAM,UAAU,gBAAgB,CAAC,MAAmB;IAClD,OAAO,MAAM,CAAC,IAAI,KAAK,WAAW,CAAC;AACrC,CAAC;AAUD,MAAM,UAAU,qBAAqB,CAAC,MAAmB;IACvD,OAAO,MAAM,CAAC,IAAI,KAAK,gBAAgB,CAAC;AAC1C,CAAC"}
|
package/invite.d.ts
CHANGED
|
@@ -825,20 +825,6 @@ export declare const ActiveSeedControl: import("arktype/internal/variants/object
|
|
|
825
825
|
export type ActiveSeedControl = typeof ActiveSeedControl.infer;
|
|
826
826
|
export declare function isActiveSeedControl(obj: unknown): obj is ActiveSeedControl;
|
|
827
827
|
export declare const ActiveEntry: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
828
|
-
type: "active.cached-suggestion";
|
|
829
|
-
key: string;
|
|
830
|
-
fsId: string;
|
|
831
|
-
sourceFsId: string;
|
|
832
|
-
} | {
|
|
833
|
-
type: "active.cached-suggestion-bless";
|
|
834
|
-
key: string;
|
|
835
|
-
fsId?: string | undefined;
|
|
836
|
-
sourceFsId?: string | undefined;
|
|
837
|
-
targetOwnerHandle?: string | undefined;
|
|
838
|
-
targetAppSlug?: string | undefined;
|
|
839
|
-
approvedBy: string;
|
|
840
|
-
approvedAt: string;
|
|
841
|
-
} | {
|
|
842
828
|
type: "app.public.access";
|
|
843
829
|
enable: boolean;
|
|
844
830
|
tick?: {
|
|
@@ -1107,6 +1093,20 @@ export declare const ActiveEntry: import("arktype/internal/variants/object.ts").
|
|
|
1107
1093
|
read?: ("editors" | "members" | "readers" | "submitters")[] | undefined;
|
|
1108
1094
|
write?: ("editors" | "members" | "readers" | "submitters")[] | undefined;
|
|
1109
1095
|
};
|
|
1096
|
+
} | {
|
|
1097
|
+
type: "active.cached-suggestion";
|
|
1098
|
+
key: string;
|
|
1099
|
+
fsId: string;
|
|
1100
|
+
sourceFsId: string;
|
|
1101
|
+
} | {
|
|
1102
|
+
type: "active.cached-suggestion-bless";
|
|
1103
|
+
key: string;
|
|
1104
|
+
fsId?: string | undefined;
|
|
1105
|
+
sourceFsId?: string | undefined;
|
|
1106
|
+
targetOwnerHandle?: string | undefined;
|
|
1107
|
+
targetAppSlug?: string | undefined;
|
|
1108
|
+
approvedBy: string;
|
|
1109
|
+
approvedAt: string;
|
|
1110
1110
|
} | {
|
|
1111
1111
|
type: "active.recommended-curated";
|
|
1112
1112
|
items: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibes.diy/api-types",
|
|
3
|
-
"version": "8.1.
|
|
3
|
+
"version": "8.1.2",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@adviser/cement": "~0.5.34",
|
|
12
12
|
"@cloudflare/workers-types": "~5.20260715.1",
|
|
13
|
-
"@vibes.diy/call-ai-v2": "8.1.
|
|
14
|
-
"@vibes.diy/identity": "8.1.
|
|
15
|
-
"@vibes.diy/vibe-types": "8.1.
|
|
13
|
+
"@vibes.diy/call-ai-v2": "8.1.2",
|
|
14
|
+
"@vibes.diy/identity": "8.1.2",
|
|
15
|
+
"@vibes.diy/vibe-types": "8.1.2",
|
|
16
16
|
"arktype": "~2.2.3"
|
|
17
17
|
},
|
|
18
18
|
"repository": {
|
package/prompt.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isPromptResearch } from "./research.js";
|
|
1
2
|
export declare const PromptBase: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
2
3
|
streamId: string;
|
|
3
4
|
chatId: string;
|
|
@@ -12,7 +13,7 @@ export declare const PromptReq: import("arktype/internal/variants/object.ts").Ob
|
|
|
12
13
|
type: "prompt.req";
|
|
13
14
|
request: {
|
|
14
15
|
model?: string | undefined;
|
|
15
|
-
messages: {
|
|
16
|
+
messages: ({
|
|
16
17
|
role: "assistant" | "system" | "user";
|
|
17
18
|
content: ({
|
|
18
19
|
type: "text";
|
|
@@ -31,7 +32,22 @@ export declare const PromptReq: import("arktype/internal/variants/object.ts").Ob
|
|
|
31
32
|
originalUploadId?: string | undefined;
|
|
32
33
|
size?: number | undefined;
|
|
33
34
|
})[];
|
|
34
|
-
}
|
|
35
|
+
} | {
|
|
36
|
+
role: "assistant";
|
|
37
|
+
content: string | null;
|
|
38
|
+
tool_calls: {
|
|
39
|
+
id: string;
|
|
40
|
+
type: "function";
|
|
41
|
+
function: {
|
|
42
|
+
name: string;
|
|
43
|
+
arguments: string;
|
|
44
|
+
};
|
|
45
|
+
}[];
|
|
46
|
+
} | {
|
|
47
|
+
role: "tool";
|
|
48
|
+
content: string;
|
|
49
|
+
tool_call_id: string;
|
|
50
|
+
})[];
|
|
35
51
|
stream?: boolean | undefined;
|
|
36
52
|
temperature?: number | undefined;
|
|
37
53
|
max_tokens?: number | undefined;
|
|
@@ -43,6 +59,20 @@ export declare const PromptReq: import("arktype/internal/variants/object.ts").Ob
|
|
|
43
59
|
stop?: string | string[] | undefined;
|
|
44
60
|
verbosity?: "high" | "low" | "max" | "medium" | undefined;
|
|
45
61
|
modalities?: string[] | undefined;
|
|
62
|
+
tools?: {
|
|
63
|
+
type: "function";
|
|
64
|
+
function: {
|
|
65
|
+
name: string;
|
|
66
|
+
description?: string | undefined;
|
|
67
|
+
parameters: unknown;
|
|
68
|
+
};
|
|
69
|
+
}[] | undefined;
|
|
70
|
+
tool_choice?: "auto" | "none" | "required" | {
|
|
71
|
+
type: "function";
|
|
72
|
+
function: {
|
|
73
|
+
name: string;
|
|
74
|
+
};
|
|
75
|
+
} | undefined;
|
|
46
76
|
};
|
|
47
77
|
}, {}>;
|
|
48
78
|
export type PromptReq = typeof PromptReq.infer;
|
|
@@ -169,7 +199,7 @@ export declare const PromptDryRunPayload: import("arktype/internal/variants/obje
|
|
|
169
199
|
type: "prompt.dry-run-payload";
|
|
170
200
|
request: {
|
|
171
201
|
model?: string | undefined;
|
|
172
|
-
messages: {
|
|
202
|
+
messages: ({
|
|
173
203
|
role: "assistant" | "system" | "user";
|
|
174
204
|
content: ({
|
|
175
205
|
type: "text";
|
|
@@ -188,7 +218,22 @@ export declare const PromptDryRunPayload: import("arktype/internal/variants/obje
|
|
|
188
218
|
originalUploadId?: string | undefined;
|
|
189
219
|
size?: number | undefined;
|
|
190
220
|
})[];
|
|
191
|
-
}
|
|
221
|
+
} | {
|
|
222
|
+
role: "assistant";
|
|
223
|
+
content: string | null;
|
|
224
|
+
tool_calls: {
|
|
225
|
+
id: string;
|
|
226
|
+
type: "function";
|
|
227
|
+
function: {
|
|
228
|
+
name: string;
|
|
229
|
+
arguments: string;
|
|
230
|
+
};
|
|
231
|
+
}[];
|
|
232
|
+
} | {
|
|
233
|
+
role: "tool";
|
|
234
|
+
content: string;
|
|
235
|
+
tool_call_id: string;
|
|
236
|
+
})[];
|
|
192
237
|
stream?: boolean | undefined;
|
|
193
238
|
temperature?: number | undefined;
|
|
194
239
|
max_tokens?: number | undefined;
|
|
@@ -200,6 +245,20 @@ export declare const PromptDryRunPayload: import("arktype/internal/variants/obje
|
|
|
200
245
|
stop?: string | string[] | undefined;
|
|
201
246
|
verbosity?: "high" | "low" | "max" | "medium" | undefined;
|
|
202
247
|
modalities?: string[] | undefined;
|
|
248
|
+
tools?: {
|
|
249
|
+
type: "function";
|
|
250
|
+
function: {
|
|
251
|
+
name: string;
|
|
252
|
+
description?: string | undefined;
|
|
253
|
+
parameters: unknown;
|
|
254
|
+
};
|
|
255
|
+
}[] | undefined;
|
|
256
|
+
tool_choice?: "auto" | "none" | "required" | {
|
|
257
|
+
type: "function";
|
|
258
|
+
function: {
|
|
259
|
+
name: string;
|
|
260
|
+
};
|
|
261
|
+
} | undefined;
|
|
203
262
|
};
|
|
204
263
|
}, {}>;
|
|
205
264
|
export type PromptDryRunPayload = typeof PromptDryRunPayload.infer;
|
|
@@ -212,7 +271,7 @@ export declare const PromptMsgs: import("arktype/internal/variants/object.ts").O
|
|
|
212
271
|
type: "prompt.req";
|
|
213
272
|
request: {
|
|
214
273
|
model?: string | undefined;
|
|
215
|
-
messages: {
|
|
274
|
+
messages: ({
|
|
216
275
|
role: "assistant" | "system" | "user";
|
|
217
276
|
content: ({
|
|
218
277
|
type: "text";
|
|
@@ -231,7 +290,22 @@ export declare const PromptMsgs: import("arktype/internal/variants/object.ts").O
|
|
|
231
290
|
originalUploadId?: string | undefined;
|
|
232
291
|
size?: number | undefined;
|
|
233
292
|
})[];
|
|
234
|
-
}
|
|
293
|
+
} | {
|
|
294
|
+
role: "assistant";
|
|
295
|
+
content: string | null;
|
|
296
|
+
tool_calls: {
|
|
297
|
+
id: string;
|
|
298
|
+
type: "function";
|
|
299
|
+
function: {
|
|
300
|
+
name: string;
|
|
301
|
+
arguments: string;
|
|
302
|
+
};
|
|
303
|
+
}[];
|
|
304
|
+
} | {
|
|
305
|
+
role: "tool";
|
|
306
|
+
content: string;
|
|
307
|
+
tool_call_id: string;
|
|
308
|
+
})[];
|
|
235
309
|
stream?: boolean | undefined;
|
|
236
310
|
temperature?: number | undefined;
|
|
237
311
|
max_tokens?: number | undefined;
|
|
@@ -243,6 +317,20 @@ export declare const PromptMsgs: import("arktype/internal/variants/object.ts").O
|
|
|
243
317
|
stop?: string | string[] | undefined;
|
|
244
318
|
verbosity?: "high" | "low" | "max" | "medium" | undefined;
|
|
245
319
|
modalities?: string[] | undefined;
|
|
320
|
+
tools?: {
|
|
321
|
+
type: "function";
|
|
322
|
+
function: {
|
|
323
|
+
name: string;
|
|
324
|
+
description?: string | undefined;
|
|
325
|
+
parameters: unknown;
|
|
326
|
+
};
|
|
327
|
+
}[] | undefined;
|
|
328
|
+
tool_choice?: "auto" | "none" | "required" | {
|
|
329
|
+
type: "function";
|
|
330
|
+
function: {
|
|
331
|
+
name: string;
|
|
332
|
+
};
|
|
333
|
+
} | undefined;
|
|
246
334
|
};
|
|
247
335
|
} | {
|
|
248
336
|
streamId: string;
|
|
@@ -347,7 +435,7 @@ export declare const PromptMsgs: import("arktype/internal/variants/object.ts").O
|
|
|
347
435
|
type: "prompt.dry-run-payload";
|
|
348
436
|
request: {
|
|
349
437
|
model?: string | undefined;
|
|
350
|
-
messages: {
|
|
438
|
+
messages: ({
|
|
351
439
|
role: "assistant" | "system" | "user";
|
|
352
440
|
content: ({
|
|
353
441
|
type: "text";
|
|
@@ -366,7 +454,22 @@ export declare const PromptMsgs: import("arktype/internal/variants/object.ts").O
|
|
|
366
454
|
originalUploadId?: string | undefined;
|
|
367
455
|
size?: number | undefined;
|
|
368
456
|
})[];
|
|
369
|
-
}
|
|
457
|
+
} | {
|
|
458
|
+
role: "assistant";
|
|
459
|
+
content: string | null;
|
|
460
|
+
tool_calls: {
|
|
461
|
+
id: string;
|
|
462
|
+
type: "function";
|
|
463
|
+
function: {
|
|
464
|
+
name: string;
|
|
465
|
+
arguments: string;
|
|
466
|
+
};
|
|
467
|
+
}[];
|
|
468
|
+
} | {
|
|
469
|
+
role: "tool";
|
|
470
|
+
content: string;
|
|
471
|
+
tool_call_id: string;
|
|
472
|
+
})[];
|
|
370
473
|
stream?: boolean | undefined;
|
|
371
474
|
temperature?: number | undefined;
|
|
372
475
|
max_tokens?: number | undefined;
|
|
@@ -378,9 +481,62 @@ export declare const PromptMsgs: import("arktype/internal/variants/object.ts").O
|
|
|
378
481
|
stop?: string | string[] | undefined;
|
|
379
482
|
verbosity?: "high" | "low" | "max" | "medium" | undefined;
|
|
380
483
|
modalities?: string[] | undefined;
|
|
484
|
+
tools?: {
|
|
485
|
+
type: "function";
|
|
486
|
+
function: {
|
|
487
|
+
name: string;
|
|
488
|
+
description?: string | undefined;
|
|
489
|
+
parameters: unknown;
|
|
490
|
+
};
|
|
491
|
+
}[] | undefined;
|
|
492
|
+
tool_choice?: "auto" | "none" | "required" | {
|
|
493
|
+
type: "function";
|
|
494
|
+
function: {
|
|
495
|
+
name: string;
|
|
496
|
+
};
|
|
497
|
+
} | undefined;
|
|
381
498
|
};
|
|
499
|
+
} | {
|
|
500
|
+
type: "prompt.research";
|
|
501
|
+
version: 1;
|
|
502
|
+
streamId: string;
|
|
503
|
+
chatId: string;
|
|
504
|
+
seq: number;
|
|
505
|
+
timestamp: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
|
|
506
|
+
researchId: string;
|
|
507
|
+
status: "complete" | "failed" | "partial";
|
|
508
|
+
brief: string;
|
|
509
|
+
sources: {
|
|
510
|
+
url: string;
|
|
511
|
+
finalUrl: string | null;
|
|
512
|
+
contentType: string | null;
|
|
513
|
+
httpStatus: number | null;
|
|
514
|
+
backendFetchable: boolean;
|
|
515
|
+
fetched: boolean;
|
|
516
|
+
errorCode?: string | undefined;
|
|
517
|
+
}[];
|
|
518
|
+
api: {
|
|
519
|
+
method: string;
|
|
520
|
+
path: string;
|
|
521
|
+
description: string;
|
|
522
|
+
fields: string[];
|
|
523
|
+
}[];
|
|
524
|
+
excerpts: {
|
|
525
|
+
sourceUrl: string;
|
|
526
|
+
text: string;
|
|
527
|
+
locator?: string | undefined;
|
|
528
|
+
}[];
|
|
529
|
+
seedRows: {
|
|
530
|
+
sourceUrl: string;
|
|
531
|
+
dbName: string;
|
|
532
|
+
key: string;
|
|
533
|
+
item: unknown;
|
|
534
|
+
}[];
|
|
535
|
+
completedAt: string;
|
|
536
|
+
errorCode?: string | undefined;
|
|
382
537
|
}, {}>;
|
|
383
538
|
export type PromptMsgs = typeof PromptMsgs.infer;
|
|
384
539
|
export declare const isPromptMsg: (msg: unknown) => msg is PromptMsgs;
|
|
385
540
|
export declare function isPromptBlockBegin(msg: unknown): msg is PromptBlockBegin;
|
|
541
|
+
export { isPromptResearch };
|
|
386
542
|
export declare function isPromptBlockEnd(msg: unknown, streamId?: string): msg is PromptBlockEnd;
|
package/prompt.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CoercedDate, FileSystemRef, LLMRequest } from "@vibes.diy/call-ai-v2";
|
|
2
2
|
import { type } from "arktype";
|
|
3
3
|
import { vibeFile } from "./common.js";
|
|
4
|
+
import { PromptResearch, isPromptResearch } from "./research.js";
|
|
4
5
|
export const PromptBase = type({
|
|
5
6
|
streamId: "string",
|
|
6
7
|
chatId: "string",
|
|
@@ -69,11 +70,13 @@ export const PromptMsgs = PromptBlockBegin.or(PromptBlockEnd)
|
|
|
69
70
|
.or(PromptDryRunPayload)
|
|
70
71
|
.or(PromptModelResolved)
|
|
71
72
|
.or(PromptRaw)
|
|
72
|
-
.or(PromptFsPersisted)
|
|
73
|
+
.or(PromptFsPersisted)
|
|
74
|
+
.or(PromptResearch);
|
|
73
75
|
export const isPromptMsg = (msg) => !(PromptMsgs(msg) instanceof type.errors);
|
|
74
76
|
export function isPromptBlockBegin(msg) {
|
|
75
77
|
return !(PromptBlockBegin(msg) instanceof type.errors);
|
|
76
78
|
}
|
|
79
|
+
export { isPromptResearch };
|
|
77
80
|
export function isPromptBlockEnd(msg, streamId) {
|
|
78
81
|
if (PromptBlockEnd(msg) instanceof type.errors)
|
|
79
82
|
return false;
|
package/prompt.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt.js","sourceRoot":"","sources":["../jsr/prompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC/E,OAAO,EA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research.d.ts
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
export declare const RESEARCH_BLOCK_SEQ = -1;
|
|
2
|
+
export declare const RESEARCH_MAX_SOURCES = 3;
|
|
3
|
+
export declare const RESEARCH_MAX_EXCERPTS = 8;
|
|
4
|
+
export declare const RESEARCH_MAX_API_ENDPOINTS = 8;
|
|
5
|
+
export declare const RESEARCH_MAX_SEED_ROWS = 24;
|
|
6
|
+
export declare const RESEARCH_MAX_BRIEF_CHARS = 4000;
|
|
7
|
+
export declare const RESEARCH_MAX_SOURCE_URL_CHARS = 2048;
|
|
8
|
+
export declare const RESEARCH_MAX_CONTENT_TYPE_CHARS = 256;
|
|
9
|
+
export declare const RESEARCH_MAX_EXCERPT_CHARS = 400;
|
|
10
|
+
export declare const RESEARCH_MAX_LOCATOR_CHARS = 200;
|
|
11
|
+
export declare const RESEARCH_MAX_METHOD_CHARS = 32;
|
|
12
|
+
export declare const RESEARCH_MAX_PATH_CHARS = 512;
|
|
13
|
+
export declare const RESEARCH_MAX_DESCRIPTION_CHARS = 400;
|
|
14
|
+
export declare const RESEARCH_MAX_FIELD_CHARS = 128;
|
|
15
|
+
export declare const RESEARCH_MAX_FIELDS = 16;
|
|
16
|
+
export declare const RESEARCH_MAX_SEED_NAME_CHARS = 128;
|
|
17
|
+
export declare const RESEARCH_MAX_ITEM_BYTES: number;
|
|
18
|
+
export declare const RESEARCH_MAX_SEED_BYTES: number;
|
|
19
|
+
export declare const RESEARCH_MAX_EVENT_BYTES: number;
|
|
20
|
+
export declare const RESEARCH_JOB_MAX_TEXT_CHARS = 12000;
|
|
21
|
+
export declare const RESEARCH_JOB_MAX_ID_CHARS = 256;
|
|
22
|
+
export declare const RESEARCH_JOB_MAX_MODEL_CHARS = 256;
|
|
23
|
+
export declare const RESEARCH_JOB_MAX_HANDLE_CHARS = 256;
|
|
24
|
+
export declare function isValidIsoTimestamp(value: unknown): value is string;
|
|
25
|
+
declare const ResearchSource: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
26
|
+
url: string;
|
|
27
|
+
finalUrl: string | null;
|
|
28
|
+
contentType: string | null;
|
|
29
|
+
httpStatus: number | null;
|
|
30
|
+
backendFetchable: boolean;
|
|
31
|
+
fetched: boolean;
|
|
32
|
+
errorCode?: string | undefined;
|
|
33
|
+
}, {}>;
|
|
34
|
+
declare const ResearchApiEndpoint: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
35
|
+
method: string;
|
|
36
|
+
path: string;
|
|
37
|
+
description: string;
|
|
38
|
+
fields: string[];
|
|
39
|
+
}, {}>;
|
|
40
|
+
declare const ResearchExcerpt: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
41
|
+
sourceUrl: string;
|
|
42
|
+
text: string;
|
|
43
|
+
locator?: string | undefined;
|
|
44
|
+
}, {}>;
|
|
45
|
+
declare const ResearchSeedRow: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
46
|
+
sourceUrl: string;
|
|
47
|
+
dbName: string;
|
|
48
|
+
key: string;
|
|
49
|
+
item: unknown;
|
|
50
|
+
}, {}>;
|
|
51
|
+
export declare const PromptResearch: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
52
|
+
type: "prompt.research";
|
|
53
|
+
version: 1;
|
|
54
|
+
streamId: string;
|
|
55
|
+
chatId: string;
|
|
56
|
+
seq: number;
|
|
57
|
+
timestamp: Date | ((In: string) => import("arktype/internal/attributes.ts").To<Date>);
|
|
58
|
+
researchId: string;
|
|
59
|
+
status: "complete" | "failed" | "partial";
|
|
60
|
+
brief: string;
|
|
61
|
+
sources: {
|
|
62
|
+
url: string;
|
|
63
|
+
finalUrl: string | null;
|
|
64
|
+
contentType: string | null;
|
|
65
|
+
httpStatus: number | null;
|
|
66
|
+
backendFetchable: boolean;
|
|
67
|
+
fetched: boolean;
|
|
68
|
+
errorCode?: string | undefined;
|
|
69
|
+
}[];
|
|
70
|
+
api: {
|
|
71
|
+
method: string;
|
|
72
|
+
path: string;
|
|
73
|
+
description: string;
|
|
74
|
+
fields: string[];
|
|
75
|
+
}[];
|
|
76
|
+
excerpts: {
|
|
77
|
+
sourceUrl: string;
|
|
78
|
+
text: string;
|
|
79
|
+
locator?: string | undefined;
|
|
80
|
+
}[];
|
|
81
|
+
seedRows: {
|
|
82
|
+
sourceUrl: string;
|
|
83
|
+
dbName: string;
|
|
84
|
+
key: string;
|
|
85
|
+
item: unknown;
|
|
86
|
+
}[];
|
|
87
|
+
completedAt: string;
|
|
88
|
+
errorCode?: string | undefined;
|
|
89
|
+
}, {}>;
|
|
90
|
+
export type PromptResearch = typeof PromptResearch.infer;
|
|
91
|
+
export type PromptResearchSource = typeof ResearchSource.infer;
|
|
92
|
+
export type PromptResearchApiEndpoint = typeof ResearchApiEndpoint.infer;
|
|
93
|
+
export type PromptResearchExcerpt = typeof ResearchExcerpt.infer;
|
|
94
|
+
export type PromptResearchSeedRow = typeof ResearchSeedRow.infer;
|
|
95
|
+
export declare function isPromptResearch(value: unknown): value is PromptResearch;
|
|
96
|
+
export declare const evtUrlResearch: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
97
|
+
type: "vibes.diy.evt-url-research";
|
|
98
|
+
userId: string;
|
|
99
|
+
chatId: string;
|
|
100
|
+
promptId: string;
|
|
101
|
+
ownerHandle: string;
|
|
102
|
+
appSlug: string;
|
|
103
|
+
currentUserText: string;
|
|
104
|
+
activatedUrls: string[];
|
|
105
|
+
model: string;
|
|
106
|
+
}, {}>;
|
|
107
|
+
export type EvtUrlResearch = typeof evtUrlResearch.infer;
|
|
108
|
+
export type UrlResearchJob = Omit<EvtUrlResearch, "type">;
|
|
109
|
+
export declare function isEvtUrlResearch(value: unknown): value is EvtUrlResearch;
|
|
110
|
+
export {};
|