@fencyai/react 0.1.192 → 0.1.193
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/agent-task/ProgressViewItem.d.ts +1 -1
- package/dist/agent-task/ProgressViewItem.d.ts.map +1 -1
- package/dist/hooks/useAgentTasks/index.d.ts.map +1 -1
- package/dist/hooks/useStream/index.d.ts.map +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1317 -2185
- package/dist/provider/FencyProvider.d.ts +1 -1
- package/dist/provider/FencyProvider.d.ts.map +1 -1
- package/dist/types/AgentTask.d.ts +5 -16
- package/dist/types/AgentTask.d.ts.map +1 -1
- package/dist/types/CreateStreamResponse.d.ts +1 -8
- package/dist/types/CreateStreamResponse.d.ts.map +1 -1
- package/dist/types/FencyContext.d.ts +2 -6
- package/dist/types/FencyContext.d.ts.map +1 -1
- package/dist/types/UseAgentTasks.d.ts +1 -2
- package/dist/types/UseAgentTasks.d.ts.map +1 -1
- package/dist/types/UseAgentTasksProps.d.ts +1 -1
- package/dist/types/UseAgentTasksProps.d.ts.map +1 -1
- package/dist/types/UseStreamProps.d.ts +1 -1
- package/dist/types/UseStreamProps.d.ts.map +1 -1
- package/dist/types/index.d.ts +3 -4
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +6 -15
- package/dist/agent-task/AgentTaskEventDataSchemas.d.ts +0 -314
- package/dist/agent-task/AgentTaskEventDataSchemas.d.ts.map +0 -1
- package/dist/hooks/useStream/toStreamData.d.ts +0 -3
- package/dist/hooks/useStream/toStreamData.d.ts.map +0 -1
- package/dist/provider/StreamEventManager.d.ts +0 -50
- package/dist/provider/StreamEventManager.d.ts.map +0 -1
- package/dist/provider/createStreamWorkerCode.d.ts +0 -7
- package/dist/provider/createStreamWorkerCode.d.ts.map +0 -1
- package/dist/types/CreateAgentTaskParams.d.ts +0 -45
- package/dist/types/CreateAgentTaskParams.d.ts.map +0 -1
- package/dist/types/CreateAgentTaskResponse.d.ts +0 -23
- package/dist/types/CreateAgentTaskResponse.d.ts.map +0 -1
- package/dist/types/StreamData.d.ts +0 -22
- package/dist/types/StreamData.d.ts.map +0 -1
- package/dist/utils/base64Decode.d.ts +0 -5
- package/dist/utils/base64Decode.d.ts.map +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { FencyProviderProps } from '../types/FencyProviderProps';
|
|
2
|
-
export declare function FencyProvider({ fency, fetchCreateStreamClientToken, children }: FencyProviderProps): import("react/jsx-runtime").JSX.Element | null;
|
|
2
|
+
export declare function FencyProvider({ fency, fetchCreateStreamClientToken, children, }: FencyProviderProps): import("react/jsx-runtime").JSX.Element | null;
|
|
3
3
|
//# sourceMappingURL=FencyProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FencyProvider.d.ts","sourceRoot":"","sources":["../../src/provider/FencyProvider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FencyProvider.d.ts","sourceRoot":"","sources":["../../src/provider/FencyProvider.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAGhE,wBAAgB,aAAa,CAAC,EAC1B,KAAK,EACL,4BAA4B,EAC5B,QAAQ,GACX,EAAE,kBAAkB,kDAwFpB"}
|
|
@@ -1,19 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
streamId: string;
|
|
7
|
-
triggeredAt: string;
|
|
8
|
-
error: ApiError | null;
|
|
9
|
-
params: CreateAgentTaskParams;
|
|
10
|
-
progressItems: AgentTaskProgressItemUpdated[];
|
|
11
|
-
loading: boolean;
|
|
12
|
-
loadingText?: string;
|
|
1
|
+
import { AgentTask as BaseAgentTask } from '@fencyai/js';
|
|
2
|
+
export type { CreateAgentTaskParams, CreateAgentTaskResponse } from '@fencyai/js';
|
|
3
|
+
export type { StreamTimeout, StreamNotFound, AgentTaskProgressItemUpdated, StreamData, } from '@fencyai/js';
|
|
4
|
+
/** React-side agent task state with optional file download handler. */
|
|
5
|
+
export interface AgentTask extends BaseAgentTask {
|
|
13
6
|
downloadFile?: (agentTaskFileId: string) => Promise<void>;
|
|
14
|
-
confirmedData: {
|
|
15
|
-
taskId: string;
|
|
16
|
-
createdAt: string;
|
|
17
|
-
} | null;
|
|
18
7
|
}
|
|
19
8
|
//# sourceMappingURL=AgentTask.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentTask.d.ts","sourceRoot":"","sources":["../../src/types/AgentTask.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"AgentTask.d.ts","sourceRoot":"","sources":["../../src/types/AgentTask.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,aAAa,CAAA;AAE7D,YAAY,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAA;AACjF,YAAY,EACR,aAAa,EACb,cAAc,EACd,4BAA4B,EAC5B,UAAU,GACb,MAAM,aAAa,CAAA;AAEpB,uEAAuE;AACvE,MAAM,WAAW,SAAU,SAAQ,aAAa;IAC5C,YAAY,CAAC,EAAE,CAAC,eAAe,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CAC5D"}
|
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export type CreateStreamResponse = {
|
|
3
|
-
type: 'success';
|
|
4
|
-
stream: Stream;
|
|
5
|
-
} | {
|
|
6
|
-
type: 'error';
|
|
7
|
-
error: ApiError;
|
|
8
|
-
};
|
|
1
|
+
export type { CreateStreamResponse } from '@fencyai/js';
|
|
9
2
|
//# sourceMappingURL=CreateStreamResponse.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateStreamResponse.d.ts","sourceRoot":"","sources":["../../src/types/CreateStreamResponse.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"CreateStreamResponse.d.ts","sourceRoot":"","sources":["../../src/types/CreateStreamResponse.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA"}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import { FencyInstance, Stream } from '@fencyai/js';
|
|
2
|
-
|
|
3
|
-
export interface StreamCache {
|
|
4
|
-
stream: Stream;
|
|
5
|
-
createdAt: number;
|
|
6
|
-
}
|
|
1
|
+
import { FencyInstance, Stream, StreamCache, StreamEventManager } from '@fencyai/js';
|
|
2
|
+
export type { StreamCache } from '@fencyai/js';
|
|
7
3
|
export interface FencyContext {
|
|
8
4
|
fency: FencyInstance;
|
|
9
5
|
loading: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FencyContext.d.ts","sourceRoot":"","sources":["../../src/types/FencyContext.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"FencyContext.d.ts","sourceRoot":"","sources":["../../src/types/FencyContext.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,aAAa,EACb,MAAM,EACN,WAAW,EACX,kBAAkB,EACrB,MAAM,aAAa,CAAA;AAEpB,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAE9C,MAAM,WAAW,YAAY;IACzB,KAAK,EAAE,aAAa,CAAA;IACpB,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAA;IACnB,aAAa,EAAE,WAAW,EAAE,CAAA;IAC5B,YAAY,EAAE,WAAW,GAAG,IAAI,CAAA;IAChC,YAAY,EAAE,kBAAkB,GAAG,IAAI,CAAA;IACvC,iBAAiB,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;CAC1D"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
+
import { CreateAgentTaskParams, CreateAgentTaskResponse } from '@fencyai/js';
|
|
1
2
|
import { AgentTask } from './AgentTask';
|
|
2
|
-
import { CreateAgentTaskParams } from './CreateAgentTaskParams';
|
|
3
|
-
import { CreateAgentTaskResponse } from './CreateAgentTaskResponse';
|
|
4
3
|
import { FetchAgentTaskFileDownloadClientToken, FetchCreateAgentTaskClientToken } from './UseAgentTasksProps';
|
|
5
4
|
export interface UseAgentTasks {
|
|
6
5
|
agentTasks: AgentTask[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UseAgentTasks.d.ts","sourceRoot":"","sources":["../../src/types/UseAgentTasks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"UseAgentTasks.d.ts","sourceRoot":"","sources":["../../src/types/UseAgentTasks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAA;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,KAAK,EACR,qCAAqC,EACrC,+BAA+B,EAClC,MAAM,sBAAsB,CAAA;AAE7B,MAAM,WAAW,aAAa;IAC1B,UAAU,EAAE,SAAS,EAAE,CAAA;IACvB,eAAe,EAAE,CACb,MAAM,EAAE,qBAAqB,EAC7B,OAAO,CAAC,EAAE;QACN,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,4GAA4G;QAC5G,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAA;QAC5C;;;;;;WAMG;QACH,+BAA+B,CAAC,EAAE,+BAA+B,CAAA;QACjE;;;;;;WAMG;QACH,qCAAqC,CAAC,EAAE,qCAAqC,CAAA;KAChF,KACA,OAAO,CAAC,uBAAuB,CAAC,CAAA;IACrC,MAAM,CAAC,EAAE,SAAS,CAAA;CACrB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AgentTaskProgressItemUpdated, StreamNotFound, StreamTimeout } from '
|
|
1
|
+
import { AgentTaskProgressItemUpdated, StreamNotFound, StreamTimeout } from '@fencyai/js';
|
|
2
2
|
import { StreamError } from './StreamError';
|
|
3
3
|
/**
|
|
4
4
|
* Returns a short-lived client token used to authorize the create-agent-task request to the Fency API.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UseAgentTasksProps.d.ts","sourceRoot":"","sources":["../../src/types/UseAgentTasksProps.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,4BAA4B,EAC5B,cAAc,EACd,aAAa,EAChB,MAAM,
|
|
1
|
+
{"version":3,"file":"UseAgentTasksProps.d.ts","sourceRoot":"","sources":["../../src/types/UseAgentTasksProps.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,4BAA4B,EAC5B,cAAc,EACd,aAAa,EAChB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3C;;;;;GAKG;AACH,MAAM,MAAM,+BAA+B,GAAG,MAAM,OAAO,CAAC;IACxD,WAAW,EAAE,MAAM,CAAA;CACtB,CAAC,CAAA;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,qCAAqC,GAAG,CAChD,eAAe,EAAE,MAAM,KACtB,OAAO,CAAC;IACT,WAAW,EAAE,MAAM,CAAA;CACtB,CAAC,CAAA;AAEF,MAAM,WAAW,kBAAkB;IAC/B;;;;;;OAMG;IACH,+BAA+B,CAAC,EAAE,+BAA+B,CAAA;IACjE;;;OAGG;IACH,qCAAqC,CAAC,EAAE,qCAAqC,CAAA;IAC7E,8BAA8B,CAAC,EAAE,CAC7B,UAAU,EAAE,4BAA4B,KACvC,IAAI,CAAA;IACT,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;IACjD,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAA;IAC5C,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAA;IAClD,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAA;CACnD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AgentTaskProgressItemUpdated, StreamNotFound, StreamTimeout } from '
|
|
1
|
+
import { AgentTaskProgressItemUpdated, StreamNotFound, StreamTimeout } from '@fencyai/js';
|
|
2
2
|
import { StreamError } from './StreamError';
|
|
3
3
|
export interface UseStreamProps {
|
|
4
4
|
onStreamTimeout?: (event: StreamTimeout) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UseStreamProps.d.ts","sourceRoot":"","sources":["../../src/types/UseStreamProps.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,4BAA4B,EAC5B,cAAc,EACd,aAAa,EAChB,MAAM,
|
|
1
|
+
{"version":3,"file":"UseStreamProps.d.ts","sourceRoot":"","sources":["../../src/types/UseStreamProps.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,4BAA4B,EAC5B,cAAc,EACd,aAAa,EAChB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3C,MAAM,WAAW,cAAc;IAC3B,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAA;IAChD,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAA;IAClD,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAA;IAC5C,8BAA8B,CAAC,EAAE,CAC7B,KAAK,EAAE,4BAA4B,KAClC,IAAI,CAAA;CACZ"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export * from './CreateAgentTaskResponse';
|
|
1
|
+
export type { AgentTask } from './AgentTask';
|
|
2
|
+
export type { CreateAgentTaskParams, CreateAgentTaskResponse } from '@fencyai/js';
|
|
4
3
|
export * from './CreateStreamResponse';
|
|
5
4
|
export * from './FencyContext';
|
|
6
5
|
export * from './FencyProviderProps';
|
|
7
|
-
export
|
|
6
|
+
export type { StreamTimeout, StreamNotFound, AgentTaskProgressItemUpdated, StreamData, } from '@fencyai/js';
|
|
8
7
|
export * from './StreamError';
|
|
9
8
|
export * from './UseAgentTasks';
|
|
10
9
|
export * from './UseAgentTasksProps';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC5C,YAAY,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAA;AACjF,cAAc,wBAAwB,CAAA;AACtC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,sBAAsB,CAAA;AACpC,YAAY,EACR,aAAa,EACb,cAAc,EACd,4BAA4B,EAC5B,UAAU,GACb,MAAM,aAAa,CAAA;AACpB,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,sBAAsB,CAAA;AACpC,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fencyai/react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.193",
|
|
4
4
|
"description": "React components and hooks for the Fency AI platform",
|
|
5
5
|
"author": "staklau <steinaageklaussen@gmail.com>",
|
|
6
6
|
"homepage": "",
|
|
@@ -34,16 +34,13 @@
|
|
|
34
34
|
"extract-api:local": "api-extractor run --local && api-documenter markdown --input-folder etc --output-folder etc/docs",
|
|
35
35
|
"docs": "npx -y serve etc/docs"
|
|
36
36
|
},
|
|
37
|
-
"dependencies": {
|
|
38
|
-
"@microsoft/fetch-event-source": "^2.0.1"
|
|
39
|
-
},
|
|
40
37
|
"devDependencies": {
|
|
41
|
-
"@fencyai/js": "^0.1.
|
|
38
|
+
"@fencyai/js": "^0.1.193",
|
|
42
39
|
"@microsoft/api-documenter": "^7.30.0",
|
|
43
40
|
"@testing-library/react": "^16.3.2",
|
|
44
41
|
"@types/jest": "^30.0.0",
|
|
45
42
|
"@types/node": "^20.10.5",
|
|
46
|
-
"@types/react": "^
|
|
43
|
+
"@types/react": "^19.2.15",
|
|
47
44
|
"@types/react-syntax-highlighter": "^15.5.13",
|
|
48
45
|
"@vitejs/plugin-react": "^4.3.4",
|
|
49
46
|
"jest": "^30.0.0",
|
|
@@ -55,18 +52,12 @@
|
|
|
55
52
|
"vite-plugin-lib-inject-css": "^2.1.1"
|
|
56
53
|
},
|
|
57
54
|
"peerDependencies": {
|
|
58
|
-
"@fencyai/js": "^0.1.
|
|
55
|
+
"@fencyai/js": "^0.1.193",
|
|
59
56
|
"motion": "^11.15.0 || ^12.0.0",
|
|
60
57
|
"react": ">=16.8.0",
|
|
61
58
|
"react-markdown": "^10.1.0",
|
|
62
59
|
"react-syntax-highlighter": "^16.1.0",
|
|
63
|
-
"remark-gfm": "^4.0.1"
|
|
64
|
-
"zod": "^4.0.5"
|
|
65
|
-
},
|
|
66
|
-
"peerDependenciesMeta": {
|
|
67
|
-
"zod": {
|
|
68
|
-
"optional": false
|
|
69
|
-
}
|
|
60
|
+
"remark-gfm": "^4.0.1"
|
|
70
61
|
},
|
|
71
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "99486d28785bfd4afe70fc2cc02a287d61bb2812"
|
|
72
63
|
}
|
|
@@ -1,314 +0,0 @@
|
|
|
1
|
-
import { AgentTaskEventData } from '@fencyai/js';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
/** Zod schema matching {@link AgentTaskEventData}; objects use `.passthrough()` for forward-compatible extra fields. */
|
|
4
|
-
export declare const AgentTaskEventDataSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
5
|
-
taskType: z.ZodLiteral<"StreamingChatCompletion">;
|
|
6
|
-
eventType: z.ZodLiteral<"Text">;
|
|
7
|
-
text: z.ZodString;
|
|
8
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
9
|
-
taskType: z.ZodLiteral<"StreamingChatCompletion">;
|
|
10
|
-
eventType: z.ZodLiteral<"Completed">;
|
|
11
|
-
response: z.ZodObject<{
|
|
12
|
-
textResponse: z.ZodString;
|
|
13
|
-
messages: z.ZodArray<z.ZodObject<{
|
|
14
|
-
role: z.ZodEnum<{
|
|
15
|
-
USER: "USER";
|
|
16
|
-
ASSISTANT: "ASSISTANT";
|
|
17
|
-
SYSTEM: "SYSTEM";
|
|
18
|
-
}>;
|
|
19
|
-
content: z.ZodString;
|
|
20
|
-
}, z.core.$loose>>;
|
|
21
|
-
}, z.core.$loose>;
|
|
22
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
23
|
-
taskType: z.ZodLiteral<"StreamingChatCompletion">;
|
|
24
|
-
eventType: z.ZodLiteral<"Error">;
|
|
25
|
-
message: z.ZodString;
|
|
26
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
27
|
-
taskType: z.ZodLiteral<"StructuredChatCompletion">;
|
|
28
|
-
eventType: z.ZodLiteral<"Completed">;
|
|
29
|
-
response: z.ZodObject<{
|
|
30
|
-
jsonResponse: z.ZodString;
|
|
31
|
-
messages: z.ZodArray<z.ZodObject<{
|
|
32
|
-
role: z.ZodEnum<{
|
|
33
|
-
USER: "USER";
|
|
34
|
-
ASSISTANT: "ASSISTANT";
|
|
35
|
-
SYSTEM: "SYSTEM";
|
|
36
|
-
}>;
|
|
37
|
-
content: z.ZodString;
|
|
38
|
-
}, z.core.$loose>>;
|
|
39
|
-
}, z.core.$loose>;
|
|
40
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
41
|
-
taskType: z.ZodLiteral<"StructuredChatCompletion">;
|
|
42
|
-
eventType: z.ZodLiteral<"Error">;
|
|
43
|
-
message: z.ZodString;
|
|
44
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
45
|
-
taskType: z.ZodLiteral<"MemoryChat">;
|
|
46
|
-
eventType: z.ZodLiteral<"Text">;
|
|
47
|
-
text: z.ZodString;
|
|
48
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
49
|
-
taskType: z.ZodLiteral<"MemoryChat">;
|
|
50
|
-
eventType: z.ZodLiteral<"Thinking">;
|
|
51
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
52
|
-
taskType: z.ZodLiteral<"MemoryChat">;
|
|
53
|
-
eventType: z.ZodLiteral<"Search">;
|
|
54
|
-
queryDescription: z.ZodString;
|
|
55
|
-
memories: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
56
|
-
memoryId: z.ZodString;
|
|
57
|
-
memoryTitle: z.ZodString;
|
|
58
|
-
}, z.core.$loose>>>;
|
|
59
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
60
|
-
taskType: z.ZodLiteral<"MemoryChat">;
|
|
61
|
-
eventType: z.ZodLiteral<"FindMemories">;
|
|
62
|
-
titles: z.ZodArray<z.ZodString>;
|
|
63
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
64
|
-
taskType: z.ZodLiteral<"MemoryChat">;
|
|
65
|
-
eventType: z.ZodLiteral<"FindMemoriesResult">;
|
|
66
|
-
memories: z.ZodArray<z.ZodObject<{
|
|
67
|
-
memoryId: z.ZodString;
|
|
68
|
-
memoryTitle: z.ZodString;
|
|
69
|
-
}, z.core.$loose>>;
|
|
70
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
71
|
-
taskType: z.ZodLiteral<"MemoryChat">;
|
|
72
|
-
eventType: z.ZodLiteral<"ScrapeWebsites">;
|
|
73
|
-
input: z.ZodObject<{
|
|
74
|
-
query: z.ZodString;
|
|
75
|
-
urls: z.ZodArray<z.ZodString>;
|
|
76
|
-
}, z.core.$loose>;
|
|
77
|
-
results: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
78
|
-
url: z.ZodString;
|
|
79
|
-
status: z.ZodOptional<z.ZodEnum<{
|
|
80
|
-
downloading: "downloading";
|
|
81
|
-
downloaded: "downloaded";
|
|
82
|
-
analyzing: "analyzing";
|
|
83
|
-
summarizing: "summarizing";
|
|
84
|
-
}>>;
|
|
85
|
-
summary: z.ZodOptional<z.ZodString>;
|
|
86
|
-
error: z.ZodOptional<z.ZodString>;
|
|
87
|
-
}, z.core.$loose>>>;
|
|
88
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
89
|
-
taskType: z.ZodLiteral<"MemoryChat">;
|
|
90
|
-
eventType: z.ZodLiteral<"GoogleSearch">;
|
|
91
|
-
input: z.ZodObject<{
|
|
92
|
-
query: z.ZodString;
|
|
93
|
-
countryCode: z.ZodOptional<z.ZodString>;
|
|
94
|
-
}, z.core.$loose>;
|
|
95
|
-
results: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
96
|
-
rank: z.ZodNumber;
|
|
97
|
-
title: z.ZodString;
|
|
98
|
-
link: z.ZodString;
|
|
99
|
-
description: z.ZodString;
|
|
100
|
-
}, z.core.$loose>>>;
|
|
101
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
102
|
-
taskType: z.ZodLiteral<"MemoryChat">;
|
|
103
|
-
eventType: z.ZodLiteral<"SearchMemoryChunks">;
|
|
104
|
-
input: z.ZodObject<{
|
|
105
|
-
queryDescription: z.ZodString;
|
|
106
|
-
memories: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
107
|
-
memoryId: z.ZodString;
|
|
108
|
-
memoryTitle: z.ZodString;
|
|
109
|
-
}, z.core.$loose>>>;
|
|
110
|
-
}, z.core.$loose>;
|
|
111
|
-
items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
112
|
-
memoryId: z.ZodString;
|
|
113
|
-
memoryTitle: z.ZodString;
|
|
114
|
-
memoryTypeId: z.ZodString;
|
|
115
|
-
memoryTypeName: z.ZodString;
|
|
116
|
-
matchingChunkScore: z.ZodNumber;
|
|
117
|
-
matchingChunk: z.ZodObject<{
|
|
118
|
-
chunkNumber: z.ZodNumber;
|
|
119
|
-
pageNumbers: z.ZodArray<z.ZodNumber>;
|
|
120
|
-
content: z.ZodString;
|
|
121
|
-
}, z.core.$loose>;
|
|
122
|
-
chunks: z.ZodArray<z.ZodObject<{
|
|
123
|
-
chunkNumber: z.ZodNumber;
|
|
124
|
-
pageNumbers: z.ZodArray<z.ZodNumber>;
|
|
125
|
-
content: z.ZodString;
|
|
126
|
-
relation: z.ZodEnum<{
|
|
127
|
-
MATCH: "MATCH";
|
|
128
|
-
CONTEXT_BEFORE: "CONTEXT_BEFORE";
|
|
129
|
-
CONTEXT_AFTER: "CONTEXT_AFTER";
|
|
130
|
-
}>;
|
|
131
|
-
}, z.core.$loose>>;
|
|
132
|
-
}, z.core.$loose>>>;
|
|
133
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
134
|
-
taskType: z.ZodLiteral<"MemoryChat">;
|
|
135
|
-
eventType: z.ZodLiteral<"FindSources">;
|
|
136
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
137
|
-
taskType: z.ZodLiteral<"MemoryChat">;
|
|
138
|
-
eventType: z.ZodLiteral<"ExploreMemories">;
|
|
139
|
-
memories: z.ZodArray<z.ZodObject<{
|
|
140
|
-
memoryId: z.ZodString;
|
|
141
|
-
memoryTitle: z.ZodString;
|
|
142
|
-
result: z.ZodOptional<z.ZodString>;
|
|
143
|
-
error: z.ZodOptional<z.ZodString>;
|
|
144
|
-
}, z.core.$loose>>;
|
|
145
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
146
|
-
taskType: z.ZodLiteral<"MemoryChat">;
|
|
147
|
-
eventType: z.ZodLiteral<"ChunkResults">;
|
|
148
|
-
items: z.ZodArray<z.ZodObject<{
|
|
149
|
-
memoryId: z.ZodString;
|
|
150
|
-
memoryTitle: z.ZodString;
|
|
151
|
-
memoryTypeId: z.ZodString;
|
|
152
|
-
memoryTypeName: z.ZodString;
|
|
153
|
-
matchingChunkScore: z.ZodNumber;
|
|
154
|
-
matchingChunk: z.ZodObject<{
|
|
155
|
-
chunkNumber: z.ZodNumber;
|
|
156
|
-
pageNumbers: z.ZodArray<z.ZodNumber>;
|
|
157
|
-
content: z.ZodString;
|
|
158
|
-
}, z.core.$loose>;
|
|
159
|
-
chunks: z.ZodArray<z.ZodObject<{
|
|
160
|
-
chunkNumber: z.ZodNumber;
|
|
161
|
-
pageNumbers: z.ZodArray<z.ZodNumber>;
|
|
162
|
-
content: z.ZodString;
|
|
163
|
-
relation: z.ZodEnum<{
|
|
164
|
-
MATCH: "MATCH";
|
|
165
|
-
CONTEXT_BEFORE: "CONTEXT_BEFORE";
|
|
166
|
-
CONTEXT_AFTER: "CONTEXT_AFTER";
|
|
167
|
-
}>;
|
|
168
|
-
}, z.core.$loose>>;
|
|
169
|
-
}, z.core.$loose>>;
|
|
170
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
171
|
-
taskType: z.ZodLiteral<"MemoryChat">;
|
|
172
|
-
eventType: z.ZodLiteral<"SourcesResult">;
|
|
173
|
-
sources: z.ZodArray<z.ZodObject<{
|
|
174
|
-
memoryId: z.ZodString;
|
|
175
|
-
memoryTitle: z.ZodString;
|
|
176
|
-
memoryTypeId: z.ZodString;
|
|
177
|
-
memoryTypeName: z.ZodString;
|
|
178
|
-
pageNumbers: z.ZodArray<z.ZodNumber>;
|
|
179
|
-
}, z.core.$loose>>;
|
|
180
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
181
|
-
taskType: z.ZodLiteral<"MemoryChat">;
|
|
182
|
-
eventType: z.ZodLiteral<"GenerateReportSetup">;
|
|
183
|
-
userRequest: z.ZodString;
|
|
184
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
185
|
-
taskType: z.ZodLiteral<"MemoryChat">;
|
|
186
|
-
eventType: z.ZodLiteral<"GenerateReportExporting">;
|
|
187
|
-
fileCount: z.ZodNumber;
|
|
188
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
189
|
-
taskType: z.ZodLiteral<"MemoryChat">;
|
|
190
|
-
eventType: z.ZodLiteral<"GenerateReportRunCode">;
|
|
191
|
-
title: z.ZodString;
|
|
192
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
193
|
-
taskType: z.ZodLiteral<"MemoryChat">;
|
|
194
|
-
eventType: z.ZodLiteral<"GenerateReportRunCommand">;
|
|
195
|
-
title: z.ZodString;
|
|
196
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
197
|
-
taskType: z.ZodLiteral<"MemoryChat">;
|
|
198
|
-
eventType: z.ZodLiteral<"GenerateReportAssembling">;
|
|
199
|
-
reportTitle: z.ZodString;
|
|
200
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
201
|
-
taskType: z.ZodLiteral<"MemoryChat">;
|
|
202
|
-
eventType: z.ZodLiteral<"GenerateReportCompleted">;
|
|
203
|
-
reportTitle: z.ZodString;
|
|
204
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
205
|
-
taskType: z.ZodLiteral<"MemoryChat">;
|
|
206
|
-
eventType: z.ZodLiteral<"Completed">;
|
|
207
|
-
response: z.ZodObject<{
|
|
208
|
-
textResponse: z.ZodString;
|
|
209
|
-
sources: z.ZodArray<z.ZodObject<{
|
|
210
|
-
memoryId: z.ZodString;
|
|
211
|
-
memoryTitle: z.ZodString;
|
|
212
|
-
memoryTypeId: z.ZodString;
|
|
213
|
-
memoryTypeName: z.ZodString;
|
|
214
|
-
pageNumbers: z.ZodArray<z.ZodNumber>;
|
|
215
|
-
}, z.core.$loose>>;
|
|
216
|
-
}, z.core.$loose>;
|
|
217
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
218
|
-
taskType: z.ZodLiteral<"MemoryChat">;
|
|
219
|
-
eventType: z.ZodLiteral<"Error">;
|
|
220
|
-
message: z.ZodString;
|
|
221
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
222
|
-
taskType: z.ZodLiteral<"MemorySearch">;
|
|
223
|
-
eventType: z.ZodLiteral<"GeneratingQueries">;
|
|
224
|
-
memoryTypes: z.ZodArray<z.ZodObject<{
|
|
225
|
-
memoryTypeId: z.ZodString;
|
|
226
|
-
memoryTypeName: z.ZodString;
|
|
227
|
-
reasoning: z.ZodOptional<z.ZodString>;
|
|
228
|
-
reasoningCompleted: z.ZodOptional<z.ZodBoolean>;
|
|
229
|
-
queries: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
230
|
-
query: z.ZodString;
|
|
231
|
-
}, z.core.$loose>>>;
|
|
232
|
-
}, z.core.$loose>>;
|
|
233
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
234
|
-
taskType: z.ZodLiteral<"MemorySearch">;
|
|
235
|
-
eventType: z.ZodLiteral<"ExploreQueries">;
|
|
236
|
-
queries: z.ZodArray<z.ZodObject<{
|
|
237
|
-
query: z.ZodString;
|
|
238
|
-
memoryTypeId: z.ZodString;
|
|
239
|
-
memoryTypeName: z.ZodString;
|
|
240
|
-
result: z.ZodOptional<z.ZodObject<{
|
|
241
|
-
numberOfChunks: z.ZodNumber;
|
|
242
|
-
highestChunkScore: z.ZodNumber;
|
|
243
|
-
items: z.ZodArray<z.ZodObject<{
|
|
244
|
-
memoryId: z.ZodString;
|
|
245
|
-
memoryTitle: z.ZodString;
|
|
246
|
-
memoryTypeId: z.ZodString;
|
|
247
|
-
memoryTypeName: z.ZodString;
|
|
248
|
-
matchingChunkScore: z.ZodNumber;
|
|
249
|
-
matchingChunk: z.ZodObject<{
|
|
250
|
-
chunkNumber: z.ZodNumber;
|
|
251
|
-
pageNumbers: z.ZodArray<z.ZodNumber>;
|
|
252
|
-
content: z.ZodString;
|
|
253
|
-
}, z.core.$loose>;
|
|
254
|
-
chunks: z.ZodArray<z.ZodObject<{
|
|
255
|
-
chunkNumber: z.ZodNumber;
|
|
256
|
-
pageNumbers: z.ZodArray<z.ZodNumber>;
|
|
257
|
-
content: z.ZodString;
|
|
258
|
-
relation: z.ZodEnum<{
|
|
259
|
-
MATCH: "MATCH";
|
|
260
|
-
CONTEXT_BEFORE: "CONTEXT_BEFORE";
|
|
261
|
-
CONTEXT_AFTER: "CONTEXT_AFTER";
|
|
262
|
-
}>;
|
|
263
|
-
}, z.core.$loose>>;
|
|
264
|
-
}, z.core.$loose>>;
|
|
265
|
-
}, z.core.$loose>>;
|
|
266
|
-
error: z.ZodOptional<z.ZodString>;
|
|
267
|
-
}, z.core.$loose>>;
|
|
268
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
269
|
-
taskType: z.ZodLiteral<"MemorySearch">;
|
|
270
|
-
eventType: z.ZodLiteral<"SearchMemoryTypes">;
|
|
271
|
-
memoryTypes: z.ZodArray<z.ZodObject<{
|
|
272
|
-
memoryTypeId: z.ZodString;
|
|
273
|
-
memoryTypeName: z.ZodString;
|
|
274
|
-
result: z.ZodOptional<z.ZodObject<{
|
|
275
|
-
numberOfChunks: z.ZodNumber;
|
|
276
|
-
highestChunkScore: z.ZodNumber;
|
|
277
|
-
}, z.core.$loose>>;
|
|
278
|
-
error: z.ZodOptional<z.ZodString>;
|
|
279
|
-
}, z.core.$loose>>;
|
|
280
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
281
|
-
taskType: z.ZodLiteral<"MemorySearch">;
|
|
282
|
-
eventType: z.ZodLiteral<"Completed">;
|
|
283
|
-
response: z.ZodObject<{
|
|
284
|
-
query: z.ZodString;
|
|
285
|
-
items: z.ZodArray<z.ZodObject<{
|
|
286
|
-
memoryId: z.ZodString;
|
|
287
|
-
memoryTitle: z.ZodString;
|
|
288
|
-
memoryTypeId: z.ZodString;
|
|
289
|
-
memoryTypeName: z.ZodString;
|
|
290
|
-
matchingChunkScore: z.ZodNumber;
|
|
291
|
-
matchingChunk: z.ZodObject<{
|
|
292
|
-
chunkNumber: z.ZodNumber;
|
|
293
|
-
pageNumbers: z.ZodArray<z.ZodNumber>;
|
|
294
|
-
content: z.ZodString;
|
|
295
|
-
}, z.core.$loose>;
|
|
296
|
-
chunks: z.ZodArray<z.ZodObject<{
|
|
297
|
-
chunkNumber: z.ZodNumber;
|
|
298
|
-
pageNumbers: z.ZodArray<z.ZodNumber>;
|
|
299
|
-
content: z.ZodString;
|
|
300
|
-
relation: z.ZodEnum<{
|
|
301
|
-
MATCH: "MATCH";
|
|
302
|
-
CONTEXT_BEFORE: "CONTEXT_BEFORE";
|
|
303
|
-
CONTEXT_AFTER: "CONTEXT_AFTER";
|
|
304
|
-
}>;
|
|
305
|
-
}, z.core.$loose>>;
|
|
306
|
-
}, z.core.$loose>>;
|
|
307
|
-
}, z.core.$loose>;
|
|
308
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
309
|
-
taskType: z.ZodLiteral<"MemorySearch">;
|
|
310
|
-
eventType: z.ZodLiteral<"Error">;
|
|
311
|
-
message: z.ZodString;
|
|
312
|
-
}, z.core.$loose>]>;
|
|
313
|
-
export declare function parseAgentTaskEventData(raw: unknown): AgentTaskEventData | null;
|
|
314
|
-
//# sourceMappingURL=AgentTaskEventDataSchemas.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AgentTaskEventDataSchemas.d.ts","sourceRoot":"","sources":["../../src/agent-task/AgentTaskEventDataSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AACrD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AA0avB,wHAAwH;AACxH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBA+BnC,CAAA;AAEF,wBAAgB,uBAAuB,CACnC,GAAG,EAAE,OAAO,GACb,kBAAkB,GAAG,IAAI,CAW3B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toStreamData.d.ts","sourceRoot":"","sources":["../../../src/hooks/useStream/toStreamData.ts"],"names":[],"mappings":"AASA,OAAO,EAEH,UAAU,EAGb,MAAM,wBAAwB,CAAA;AAE/B,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,KAAG,UAAU,GAAG,IAQxD,CAAA"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { FencyInstance } from '@fencyai/js';
|
|
2
|
-
import { StreamCache } from '../types/FencyContext';
|
|
3
|
-
type EventCallback = (data: string, streamId: string) => void;
|
|
4
|
-
type ErrorCallback = (streamId: string, errorMessage?: string) => void;
|
|
5
|
-
export interface Subscription {
|
|
6
|
-
onMessage: EventCallback;
|
|
7
|
-
onError: ErrorCallback;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Centralized manager for EventSource connections to streams.
|
|
11
|
-
* Ensures only one connection per stream regardless of how many hooks subscribe.
|
|
12
|
-
*
|
|
13
|
-
* When a Web Worker is available, the main thread performs fetch (correct CORS origin)
|
|
14
|
-
* and transfers the response body to the worker for parsing, so the read loop is not
|
|
15
|
-
* stalled by background tab throttling. Otherwise falls back to fetchEventSource on
|
|
16
|
-
* the main thread with openWhenHidden so the connection is not aborted on tab switch.
|
|
17
|
-
*/
|
|
18
|
-
export declare class StreamEventManager {
|
|
19
|
-
private activeConnections;
|
|
20
|
-
private subscribers;
|
|
21
|
-
private fency;
|
|
22
|
-
private worker;
|
|
23
|
-
private workerBlobUrl;
|
|
24
|
-
private workerSupported;
|
|
25
|
-
constructor(fency: FencyInstance);
|
|
26
|
-
private tryInitWorker;
|
|
27
|
-
private handleWorkerMessage;
|
|
28
|
-
/**
|
|
29
|
-
* Called by FencyProvider when activeStreams changes.
|
|
30
|
-
* Creates new connections and removes old ones.
|
|
31
|
-
*/
|
|
32
|
-
updateStreams(streams: StreamCache[]): void;
|
|
33
|
-
private connectStream;
|
|
34
|
-
private connectStreamInWorker;
|
|
35
|
-
private startWorkerStream;
|
|
36
|
-
private connectStreamOnMainThread;
|
|
37
|
-
/**
|
|
38
|
-
* Subscribe to events from all active streams.
|
|
39
|
-
* Returns an unsubscribe function.
|
|
40
|
-
*/
|
|
41
|
-
subscribe(subscriberId: string, callbacks: Subscription): () => void;
|
|
42
|
-
private broadcast;
|
|
43
|
-
private broadcastError;
|
|
44
|
-
/**
|
|
45
|
-
* Cleanup all connections and subscriptions
|
|
46
|
-
*/
|
|
47
|
-
cleanup(): void;
|
|
48
|
-
}
|
|
49
|
-
export {};
|
|
50
|
-
//# sourceMappingURL=StreamEventManager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StreamEventManager.d.ts","sourceRoot":"","sources":["../../src/provider/StreamEventManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAO3C,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAQnD,KAAK,aAAa,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;AAC7D,KAAK,aAAa,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;AAEtE,MAAM,WAAW,YAAY;IACzB,SAAS,EAAE,aAAa,CAAA;IACxB,OAAO,EAAE,aAAa,CAAA;CACzB;AAeD;;;;;;;;GAQG;AACH,qBAAa,kBAAkB;IAC3B,OAAO,CAAC,iBAAiB,CAA2C;IACpE,OAAO,CAAC,WAAW,CAAuC;IAC1D,OAAO,CAAC,KAAK,CAAe;IAC5B,OAAO,CAAC,MAAM,CAAsB;IACpC,OAAO,CAAC,aAAa,CAAsB;IAC3C,OAAO,CAAC,eAAe,CAAQ;gBAEnB,KAAK,EAAE,aAAa;IAKhC,OAAO,CAAC,aAAa;IAkCrB,OAAO,CAAC,mBAAmB;IAuB3B;;;OAGG;IACH,aAAa,CAAC,OAAO,EAAE,WAAW,EAAE,GAAG,IAAI;IAiB3C,OAAO,CAAC,aAAa;IAQrB,OAAO,CAAC,qBAAqB;YAqBf,iBAAiB;IAoE/B,OAAO,CAAC,yBAAyB;IAgDjC;;;OAGG;IACH,SAAS,CAAC,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,GAAG,MAAM,IAAI;IAQpE,OAAO,CAAC,SAAS;IAMjB,OAAO,CAAC,cAAc;IAMtB;;OAEG;IACH,OAAO,IAAI,IAAI;CAqBlB"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns the source code for the inline SSE stream Web Worker.
|
|
3
|
-
* Consumes a ReadableStream transferred from the main thread (same-origin fetch + CORS)
|
|
4
|
-
* so the read loop runs off the main thread and is not stalled by tab throttling.
|
|
5
|
-
*/
|
|
6
|
-
export declare function createStreamWorkerCode(): string;
|
|
7
|
-
//# sourceMappingURL=createStreamWorkerCode.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createStreamWorkerCode.d.ts","sourceRoot":"","sources":["../../src/provider/createStreamWorkerCode.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAiJ/C"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { AgentTaskLanguage, AgentTaskModel } from '@fencyai/js';
|
|
2
|
-
export type CreateAgentTaskParams = {
|
|
3
|
-
type: 'StreamingChatCompletion';
|
|
4
|
-
messages: {
|
|
5
|
-
role: 'USER' | 'ASSISTANT' | 'SYSTEM';
|
|
6
|
-
content: string;
|
|
7
|
-
}[];
|
|
8
|
-
model: AgentTaskModel;
|
|
9
|
-
temperature?: number | null;
|
|
10
|
-
topP?: number | null;
|
|
11
|
-
} | {
|
|
12
|
-
type: 'StructuredChatCompletion';
|
|
13
|
-
messages: {
|
|
14
|
-
role: 'USER' | 'ASSISTANT' | 'SYSTEM';
|
|
15
|
-
content: string;
|
|
16
|
-
}[];
|
|
17
|
-
jsonSchema: string;
|
|
18
|
-
model: AgentTaskModel;
|
|
19
|
-
temperature?: number | null;
|
|
20
|
-
topP?: number | null;
|
|
21
|
-
} | {
|
|
22
|
-
type: 'MemoryChat';
|
|
23
|
-
messages: {
|
|
24
|
-
role: 'USER' | 'ASSISTANT' | 'SYSTEM';
|
|
25
|
-
content: string;
|
|
26
|
-
}[];
|
|
27
|
-
model: AgentTaskModel;
|
|
28
|
-
language?: AgentTaskLanguage;
|
|
29
|
-
chunkLimit?: number;
|
|
30
|
-
memoryScanLimit?: number;
|
|
31
|
-
} | {
|
|
32
|
-
type: 'MemorySearch';
|
|
33
|
-
query: string;
|
|
34
|
-
model: AgentTaskModel;
|
|
35
|
-
language?: AgentTaskLanguage;
|
|
36
|
-
chunkLimit?: number;
|
|
37
|
-
contextExpansion?: {
|
|
38
|
-
before?: number;
|
|
39
|
-
after?: number;
|
|
40
|
-
};
|
|
41
|
-
queryExpansion?: {
|
|
42
|
-
queryCount: number;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
//# sourceMappingURL=CreateAgentTaskParams.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CreateAgentTaskParams.d.ts","sourceRoot":"","sources":["../../src/types/CreateAgentTaskParams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE/D,MAAM,MAAM,qBAAqB,GAC3B;IACI,IAAI,EAAE,yBAAyB,CAAA;IAC/B,QAAQ,EAAE;QAAE,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IACtE,KAAK,EAAE,cAAc,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACvB,GACD;IACI,IAAI,EAAE,0BAA0B,CAAA;IAChC,QAAQ,EAAE;QAAE,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IACtE,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,cAAc,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACvB,GACD;IACI,IAAI,EAAE,YAAY,CAAA;IAClB,QAAQ,EAAE;QAAE,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IACtE,KAAK,EAAE,cAAc,CAAA;IACrB,QAAQ,CAAC,EAAE,iBAAiB,CAAA;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,eAAe,CAAC,EAAE,MAAM,CAAA;CAC3B,GACD;IACI,IAAI,EAAE,cAAc,CAAA;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,cAAc,CAAA;IACrB,QAAQ,CAAC,EAAE,iBAAiB,CAAA;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,gBAAgB,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IACtD,cAAc,CAAC,EAAE;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;CAC1C,CAAA"}
|