@fencyai/react 0.1.191 → 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.
Files changed (61) hide show
  1. package/dist/agent-task/AgentTaskProgress.d.ts.map +1 -1
  2. package/dist/agent-task/AgentTaskProgressVerbose.d.ts +1 -0
  3. package/dist/agent-task/AgentTaskProgressVerbose.d.ts.map +1 -1
  4. package/dist/agent-task/ProgressViewItem.d.ts +1 -1
  5. package/dist/agent-task/ProgressViewItem.d.ts.map +1 -1
  6. package/dist/agent-task/data-types/MemoryChatGenerateReportAssembling.d.ts +14 -0
  7. package/dist/agent-task/data-types/MemoryChatGenerateReportAssembling.d.ts.map +1 -0
  8. package/dist/agent-task/data-types/MemoryChatGenerateReportCompleted.d.ts +12 -0
  9. package/dist/agent-task/data-types/MemoryChatGenerateReportCompleted.d.ts.map +1 -0
  10. package/dist/agent-task/data-types/MemoryChatGenerateReportExporting.d.ts +14 -0
  11. package/dist/agent-task/data-types/MemoryChatGenerateReportExporting.d.ts.map +1 -0
  12. package/dist/agent-task/data-types/MemoryChatGenerateReportRunCode.d.ts +14 -0
  13. package/dist/agent-task/data-types/MemoryChatGenerateReportRunCode.d.ts.map +1 -0
  14. package/dist/agent-task/data-types/MemoryChatGenerateReportRunCommand.d.ts +14 -0
  15. package/dist/agent-task/data-types/MemoryChatGenerateReportRunCommand.d.ts.map +1 -0
  16. package/dist/agent-task/data-types/MemoryChatGenerateReportSetup.d.ts +14 -0
  17. package/dist/agent-task/data-types/MemoryChatGenerateReportSetup.d.ts.map +1 -0
  18. package/dist/agent-task/data-types/StreamingChatCompletionText.d.ts +6 -0
  19. package/dist/agent-task/data-types/StreamingChatCompletionText.d.ts.map +1 -1
  20. package/dist/agent-task/data-types/StructuredChatCompletionJson.d.ts.map +1 -1
  21. package/dist/agent-task/translations.d.ts +7 -0
  22. package/dist/agent-task/translations.d.ts.map +1 -1
  23. package/dist/assets/index.css +1 -1
  24. package/dist/hooks/useAgentTasks/index.d.ts.map +1 -1
  25. package/dist/hooks/useStream/index.d.ts.map +1 -1
  26. package/dist/index.d.ts +1 -2
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +1639 -2077
  29. package/dist/provider/FencyProvider.d.ts +1 -1
  30. package/dist/provider/FencyProvider.d.ts.map +1 -1
  31. package/dist/types/AgentTask.d.ts +6 -16
  32. package/dist/types/AgentTask.d.ts.map +1 -1
  33. package/dist/types/CreateStreamResponse.d.ts +1 -8
  34. package/dist/types/CreateStreamResponse.d.ts.map +1 -1
  35. package/dist/types/FencyContext.d.ts +2 -6
  36. package/dist/types/FencyContext.d.ts.map +1 -1
  37. package/dist/types/UseAgentTasks.d.ts +10 -3
  38. package/dist/types/UseAgentTasks.d.ts.map +1 -1
  39. package/dist/types/UseAgentTasksProps.d.ts +18 -1
  40. package/dist/types/UseAgentTasksProps.d.ts.map +1 -1
  41. package/dist/types/UseStreamProps.d.ts +1 -1
  42. package/dist/types/UseStreamProps.d.ts.map +1 -1
  43. package/dist/types/index.d.ts +3 -4
  44. package/dist/types/index.d.ts.map +1 -1
  45. package/package.json +6 -15
  46. package/dist/agent-task/AgentTaskEventDataSchemas.d.ts +0 -290
  47. package/dist/agent-task/AgentTaskEventDataSchemas.d.ts.map +0 -1
  48. package/dist/hooks/useStream/toStreamData.d.ts +0 -3
  49. package/dist/hooks/useStream/toStreamData.d.ts.map +0 -1
  50. package/dist/provider/StreamEventManager.d.ts +0 -50
  51. package/dist/provider/StreamEventManager.d.ts.map +0 -1
  52. package/dist/provider/createStreamWorkerCode.d.ts +0 -7
  53. package/dist/provider/createStreamWorkerCode.d.ts.map +0 -1
  54. package/dist/types/CreateAgentTaskParams.d.ts +0 -45
  55. package/dist/types/CreateAgentTaskParams.d.ts.map +0 -1
  56. package/dist/types/CreateAgentTaskResponse.d.ts +0 -23
  57. package/dist/types/CreateAgentTaskResponse.d.ts.map +0 -1
  58. package/dist/types/StreamData.d.ts +0 -22
  59. package/dist/types/StreamData.d.ts.map +0 -1
  60. package/dist/utils/base64Decode.d.ts +0 -5
  61. 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":"AAOA,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAgBhE,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,4BAA4B,EAAE,QAAQ,EAAE,EAAE,kBAAkB,kDA+IlG"}
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,18 +1,8 @@
1
- import { ApiError } from '@fencyai/js';
2
- import { CreateAgentTaskParams } from './CreateAgentTaskParams';
3
- import { AgentTaskProgressItemUpdated } from './StreamData';
4
- export interface AgentTask {
5
- taskKey: string;
6
- streamId: string;
7
- triggeredAt: string;
8
- error: ApiError | null;
9
- params: CreateAgentTaskParams;
10
- progressItems: AgentTaskProgressItemUpdated[];
11
- loading: boolean;
12
- loadingText?: string;
13
- confirmedData: {
14
- taskId: string;
15
- createdAt: string;
16
- } | null;
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 {
6
+ downloadFile?: (agentTaskFileId: string) => Promise<void>;
17
7
  }
18
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,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,EAAE,4BAA4B,EAAE,MAAM,cAAc,CAAA;AAE3D,MAAM,WAAW,SAAS;IACtB,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAA;IACtB,MAAM,EAAE,qBAAqB,CAAA;IAC7B,aAAa,EAAE,4BAA4B,EAAE,CAAA;IAC7C,OAAO,EAAE,OAAO,CAAA;IAChB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE;QACX,MAAM,EAAE,MAAM,CAAA;QACd,SAAS,EAAE,MAAM,CAAA;KACpB,GAAG,IAAI,CAAA;CACX"}
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
- import { ApiError, Stream } from '@fencyai/js';
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,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAE9C,MAAM,MAAM,oBAAoB,GAC1B;IACI,IAAI,EAAE,SAAS,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;CACjB,GACD;IACI,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,QAAQ,CAAA;CAClB,CAAA"}
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
- import { StreamEventManager } from '../provider/StreamEventManager';
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,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAA;AAEnE,MAAM,WAAW,WAAW;IACxB,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;CACpB;AAED,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
+ {"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,7 +1,6 @@
1
+ import { CreateAgentTaskParams, CreateAgentTaskResponse } from '@fencyai/js';
1
2
  import { AgentTask } from './AgentTask';
2
- import { CreateAgentTaskParams } from './CreateAgentTaskParams';
3
- import { CreateAgentTaskResponse } from './CreateAgentTaskResponse';
4
- import { FetchCreateAgentTaskClientToken } from './UseAgentTasksProps';
3
+ import { FetchAgentTaskFileDownloadClientToken, FetchCreateAgentTaskClientToken } from './UseAgentTasksProps';
5
4
  export interface UseAgentTasks {
6
5
  agentTasks: AgentTask[];
7
6
  createAgentTask: (params: CreateAgentTaskParams, options?: {
@@ -16,6 +15,14 @@ export interface UseAgentTasks {
16
15
  * If the hook prop is also omitted, this option must be set or `createAgentTask` throws.
17
16
  */
18
17
  fetchCreateAgentTaskClientToken?: FetchCreateAgentTaskClientToken;
18
+ /**
19
+ * Token fetcher for file-download sessions for this invocation only.
20
+ *
21
+ * @remarks
22
+ * When set, overrides `fetchAgentTaskFileDownloadClientToken` from
23
+ * {@link UseAgentTasksProps} for this call.
24
+ */
25
+ fetchAgentTaskFileDownloadClientToken?: FetchAgentTaskFileDownloadClientToken;
19
26
  }) => Promise<CreateAgentTaskResponse>;
20
27
  latest?: AgentTask;
21
28
  }
@@ -1 +1 @@
1
- {"version":3,"file":"UseAgentTasks.d.ts","sourceRoot":"","sources":["../../src/types/UseAgentTasks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AACnE,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,sBAAsB,CAAA;AAE3E,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;KACpE,KACA,OAAO,CAAC,uBAAuB,CAAC,CAAA;IACrC,MAAM,CAAC,EAAE,SAAS,CAAA;CACrB"}
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 './StreamData';
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.
@@ -9,6 +9,18 @@ import { StreamError } from './StreamError';
9
9
  export type FetchCreateAgentTaskClientToken = () => Promise<{
10
10
  clientToken: string;
11
11
  }>;
12
+ /**
13
+ * Returns a short-lived client token for a **CreateAgentTaskFileDownload** session
14
+ * (scoped to a single `agentTaskFileId`). Used to fetch presigned URLs for report files
15
+ * from MemoryChat responses.
16
+ *
17
+ * @remarks
18
+ * Your backend should call `POST /v1/sessions` with
19
+ * `{ createAgentTaskFileDownload: { agentTaskFileId } }` and return `{ clientToken }`.
20
+ */
21
+ export type FetchAgentTaskFileDownloadClientToken = (agentTaskFileId: string) => Promise<{
22
+ clientToken: string;
23
+ }>;
12
24
  export interface UseAgentTasksProps {
13
25
  /**
14
26
  * Default token fetcher for {@link UseAgentTasks.createAgentTask}.
@@ -18,6 +30,11 @@ export interface UseAgentTasksProps {
18
30
  * For each task, at least one of this prop or per-call `createAgentTask(..., { fetchCreateAgentTaskClientToken })` must be set; when both are set on a call, the per-call fetcher is used.
19
31
  */
20
32
  fetchCreateAgentTaskClientToken?: FetchCreateAgentTaskClientToken;
33
+ /**
34
+ * Default token fetcher used for MemoryChat report/file downloads attached to tasks
35
+ * created by this hook.
36
+ */
37
+ fetchAgentTaskFileDownloadClientToken?: FetchAgentTaskFileDownloadClientToken;
21
38
  onAgentTaskProgressItemUpdated?: (streamData: AgentTaskProgressItemUpdated) => void;
22
39
  onAgentTaskCompleted?: (streamId: string) => void;
23
40
  onStreamError?: (event: StreamError) => void;
@@ -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,cAAc,CAAA;AACrB,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,MAAM,WAAW,kBAAkB;IAC/B;;;;;;OAMG;IACH,+BAA+B,CAAC,EAAE,+BAA+B,CAAA;IACjE,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
+ {"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 './StreamData';
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,cAAc,CAAA;AACrB,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"}
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"}
@@ -1,10 +1,9 @@
1
- export * from './AgentTask';
2
- export * from './CreateAgentTaskParams';
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 * from './StreamData';
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,cAAc,aAAa,CAAA;AAC3B,cAAc,yBAAyB,CAAA;AACvC,cAAc,2BAA2B,CAAA;AACzC,cAAc,wBAAwB,CAAA;AACtC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,sBAAsB,CAAA;AACpC,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,sBAAsB,CAAA;AACpC,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA"}
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.191",
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.191",
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": "^18.2.45",
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.191",
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": "c450b061cf1fec2120915733100999ff762e091a"
62
+ "gitHead": "99486d28785bfd4afe70fc2cc02a287d61bb2812"
72
63
  }
@@ -1,290 +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<"Completed">;
183
- response: z.ZodObject<{
184
- textResponse: z.ZodString;
185
- sources: z.ZodArray<z.ZodObject<{
186
- memoryId: z.ZodString;
187
- memoryTitle: z.ZodString;
188
- memoryTypeId: z.ZodString;
189
- memoryTypeName: z.ZodString;
190
- pageNumbers: z.ZodArray<z.ZodNumber>;
191
- }, z.core.$loose>>;
192
- }, z.core.$loose>;
193
- }, z.core.$loose>, z.ZodObject<{
194
- taskType: z.ZodLiteral<"MemoryChat">;
195
- eventType: z.ZodLiteral<"Error">;
196
- message: z.ZodString;
197
- }, z.core.$loose>, z.ZodObject<{
198
- taskType: z.ZodLiteral<"MemorySearch">;
199
- eventType: z.ZodLiteral<"GeneratingQueries">;
200
- memoryTypes: z.ZodArray<z.ZodObject<{
201
- memoryTypeId: z.ZodString;
202
- memoryTypeName: z.ZodString;
203
- reasoning: z.ZodOptional<z.ZodString>;
204
- reasoningCompleted: z.ZodOptional<z.ZodBoolean>;
205
- queries: z.ZodOptional<z.ZodArray<z.ZodObject<{
206
- query: z.ZodString;
207
- }, z.core.$loose>>>;
208
- }, z.core.$loose>>;
209
- }, z.core.$loose>, z.ZodObject<{
210
- taskType: z.ZodLiteral<"MemorySearch">;
211
- eventType: z.ZodLiteral<"ExploreQueries">;
212
- queries: z.ZodArray<z.ZodObject<{
213
- query: z.ZodString;
214
- memoryTypeId: z.ZodString;
215
- memoryTypeName: z.ZodString;
216
- result: z.ZodOptional<z.ZodObject<{
217
- numberOfChunks: z.ZodNumber;
218
- highestChunkScore: z.ZodNumber;
219
- items: z.ZodArray<z.ZodObject<{
220
- memoryId: z.ZodString;
221
- memoryTitle: z.ZodString;
222
- memoryTypeId: z.ZodString;
223
- memoryTypeName: z.ZodString;
224
- matchingChunkScore: z.ZodNumber;
225
- matchingChunk: z.ZodObject<{
226
- chunkNumber: z.ZodNumber;
227
- pageNumbers: z.ZodArray<z.ZodNumber>;
228
- content: z.ZodString;
229
- }, z.core.$loose>;
230
- chunks: z.ZodArray<z.ZodObject<{
231
- chunkNumber: z.ZodNumber;
232
- pageNumbers: z.ZodArray<z.ZodNumber>;
233
- content: z.ZodString;
234
- relation: z.ZodEnum<{
235
- MATCH: "MATCH";
236
- CONTEXT_BEFORE: "CONTEXT_BEFORE";
237
- CONTEXT_AFTER: "CONTEXT_AFTER";
238
- }>;
239
- }, z.core.$loose>>;
240
- }, z.core.$loose>>;
241
- }, z.core.$loose>>;
242
- error: z.ZodOptional<z.ZodString>;
243
- }, z.core.$loose>>;
244
- }, z.core.$loose>, z.ZodObject<{
245
- taskType: z.ZodLiteral<"MemorySearch">;
246
- eventType: z.ZodLiteral<"SearchMemoryTypes">;
247
- memoryTypes: z.ZodArray<z.ZodObject<{
248
- memoryTypeId: z.ZodString;
249
- memoryTypeName: z.ZodString;
250
- result: z.ZodOptional<z.ZodObject<{
251
- numberOfChunks: z.ZodNumber;
252
- highestChunkScore: z.ZodNumber;
253
- }, z.core.$loose>>;
254
- error: z.ZodOptional<z.ZodString>;
255
- }, z.core.$loose>>;
256
- }, z.core.$loose>, z.ZodObject<{
257
- taskType: z.ZodLiteral<"MemorySearch">;
258
- eventType: z.ZodLiteral<"Completed">;
259
- response: z.ZodObject<{
260
- query: z.ZodString;
261
- items: z.ZodArray<z.ZodObject<{
262
- memoryId: z.ZodString;
263
- memoryTitle: z.ZodString;
264
- memoryTypeId: z.ZodString;
265
- memoryTypeName: z.ZodString;
266
- matchingChunkScore: z.ZodNumber;
267
- matchingChunk: z.ZodObject<{
268
- chunkNumber: z.ZodNumber;
269
- pageNumbers: z.ZodArray<z.ZodNumber>;
270
- content: z.ZodString;
271
- }, z.core.$loose>;
272
- chunks: z.ZodArray<z.ZodObject<{
273
- chunkNumber: z.ZodNumber;
274
- pageNumbers: z.ZodArray<z.ZodNumber>;
275
- content: z.ZodString;
276
- relation: z.ZodEnum<{
277
- MATCH: "MATCH";
278
- CONTEXT_BEFORE: "CONTEXT_BEFORE";
279
- CONTEXT_AFTER: "CONTEXT_AFTER";
280
- }>;
281
- }, z.core.$loose>>;
282
- }, z.core.$loose>>;
283
- }, z.core.$loose>;
284
- }, z.core.$loose>, z.ZodObject<{
285
- taskType: z.ZodLiteral<"MemorySearch">;
286
- eventType: z.ZodLiteral<"Error">;
287
- message: z.ZodString;
288
- }, z.core.$loose>]>;
289
- export declare function parseAgentTaskEventData(raw: unknown): AgentTaskEventData | null;
290
- //# 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;AA0XvB,wHAAwH;AACxH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAyBnC,CAAA;AAEF,wBAAgB,uBAAuB,CACnC,GAAG,EAAE,OAAO,GACb,kBAAkB,GAAG,IAAI,CAW3B"}
@@ -1,3 +0,0 @@
1
- import { StreamData } from '../../types/StreamData';
2
- export declare const toStreamData: (data: string) => StreamData | null;
3
- //# sourceMappingURL=toStreamData.d.ts.map
@@ -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"}