@fencyai/js 0.1.111 → 0.1.112

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.
@@ -11,17 +11,14 @@ export async function createAgentTask(params) {
11
11
  'X-Fency-Stream-Token': params.streamToken,
12
12
  };
13
13
  const response = await PubService.createAgentTask({
14
- queryText: params.request.queryText,
15
- jsonSchema: params.request.jsonSchema,
16
- todos: params.request.todos ?? [],
14
+ genericTask: params.request.genericTask,
15
+ streamingChatCompletionTask: params.request.streamingChatCompletionTask,
17
16
  });
18
17
  return {
19
18
  type: 'success',
20
19
  agentTask: {
21
20
  id: response.id,
22
21
  createdAt: response.createdAt,
23
- status: response.status,
24
- response: response.response ?? undefined,
25
22
  },
26
23
  };
27
24
  }
package/lib/index.d.ts CHANGED
@@ -2,7 +2,6 @@ export { loadFency } from './loadFency';
2
2
  export type { FencyInstance } from './types/FencyInstance';
3
3
  export type { FencyOptions } from './types/FencyOptions';
4
4
  export * from './types/index';
5
- export { AgentTaskProgressItemType } from './openapi/ct/models/AgentTaskProgressItemType';
6
5
  export type { AgentTaskProgressItemUpdatedEventDto } from './openapi/ct/models/AgentTaskProgressItemUpdatedEventDto';
7
6
  export type { StreamNotFoundEventDto } from './openapi/ct/models/StreamNotFoundEventDto';
8
7
  export type { StreamTimeoutEventDto } from './openapi/ct/models/StreamTimeoutEventDto';
package/lib/index.js CHANGED
@@ -1,7 +1,5 @@
1
1
  export { loadFency } from './loadFency';
2
2
  export * from './types/index';
3
- // stream event types
4
- export { AgentTaskProgressItemType } from './openapi/ct/models/AgentTaskProgressItemType';
5
3
  // api
6
4
  export { createAgentTask } from './api/createAgentTask';
7
5
  export { createStream } from './api/createStream';
@@ -2,7 +2,6 @@ export { ApiError } from './core/ApiError';
2
2
  export { CancelablePromise, CancelError } from './core/CancelablePromise';
3
3
  export { OpenAPI } from './core/OpenAPI';
4
4
  export type { OpenAPIConfig } from './core/OpenAPI';
5
- export { AgentTaskProgressItemType } from './models/AgentTaskProgressItemType';
6
5
  export type { AgentTaskProgressItemUpdatedEventDto } from './models/AgentTaskProgressItemUpdatedEventDto';
7
6
  export { ApiDtoType } from './models/ApiDtoType';
8
7
  export type { StreamDto } from './models/StreamDto';
@@ -5,7 +5,6 @@
5
5
  export { ApiError } from './core/ApiError';
6
6
  export { CancelablePromise, CancelError } from './core/CancelablePromise';
7
7
  export { OpenAPI } from './core/OpenAPI';
8
- export { AgentTaskProgressItemType } from './models/AgentTaskProgressItemType';
9
8
  export { ApiDtoType } from './models/ApiDtoType';
10
9
  export { StreamEventType } from './models/StreamEventType';
11
10
  export { PubService } from './services/PubService';
@@ -1,4 +1,3 @@
1
- import type { AgentTaskProgressItemType } from './AgentTaskProgressItemType';
2
1
  import type { StreamEventType } from './StreamEventType';
3
2
  export type AgentTaskProgressItemUpdatedEventDto = {
4
3
  type: StreamEventType;
@@ -7,7 +6,5 @@ export type AgentTaskProgressItemUpdatedEventDto = {
7
6
  createdAt: string;
8
7
  agentTaskId: string;
9
8
  progressItemId: string;
10
- title: string;
11
- progressItemType: AgentTaskProgressItemType;
12
- response: string;
9
+ data: string;
13
10
  };
@@ -2,8 +2,9 @@ export { ApiError } from './core/ApiError';
2
2
  export { CancelablePromise, CancelError } from './core/CancelablePromise';
3
3
  export { OpenAPI } from './core/OpenAPI';
4
4
  export type { OpenAPIConfig } from './core/OpenAPI';
5
- export { AgentTaskStatusDto } from './models/AgentTaskStatusDto';
6
5
  export type { PubAgentTaskDto } from './models/PubAgentTaskDto';
7
6
  export type { PubCreateAgentTaskRequest } from './models/PubCreateAgentTaskRequest';
7
+ export type { PubCreateAgentTaskRequestGenericTask } from './models/PubCreateAgentTaskRequestGenericTask';
8
+ export type { PubCreateAgentTaskRequestStreamingChatCompletionTask } from './models/PubCreateAgentTaskRequestStreamingChatCompletionTask';
8
9
  export type { PubCreateFileDownloadLinkResponse } from './models/PubCreateFileDownloadLinkResponse';
9
10
  export { PubService } from './services/PubService';
@@ -5,5 +5,4 @@
5
5
  export { ApiError } from './core/ApiError';
6
6
  export { CancelablePromise, CancelError } from './core/CancelablePromise';
7
7
  export { OpenAPI } from './core/OpenAPI';
8
- export { AgentTaskStatusDto } from './models/AgentTaskStatusDto';
9
8
  export { PubService } from './services/PubService';
@@ -1,7 +1,4 @@
1
- import type { AgentTaskStatusDto } from './AgentTaskStatusDto';
2
1
  export type PubAgentTaskDto = {
3
2
  id: string;
4
3
  createdAt: string;
5
- status: AgentTaskStatusDto;
6
- response?: string | null;
7
4
  };
@@ -1,5 +1,6 @@
1
+ import type { PubCreateAgentTaskRequestGenericTask } from './PubCreateAgentTaskRequestGenericTask';
2
+ import type { PubCreateAgentTaskRequestStreamingChatCompletionTask } from './PubCreateAgentTaskRequestStreamingChatCompletionTask';
1
3
  export type PubCreateAgentTaskRequest = {
2
- queryText: string;
3
- jsonSchema?: string | null;
4
- todos: Array<string>;
4
+ genericTask?: PubCreateAgentTaskRequestGenericTask;
5
+ streamingChatCompletionTask?: PubCreateAgentTaskRequestStreamingChatCompletionTask;
5
6
  };
@@ -0,0 +1,4 @@
1
+ export type PubCreateAgentTaskRequestGenericTask = {
2
+ queryText: string;
3
+ jsonSchema?: string | null;
4
+ };
@@ -0,0 +1,3 @@
1
+ export type PubCreateAgentTaskRequestStreamingChatCompletionTask = {
2
+ prompt: string;
3
+ };
@@ -1,7 +1,5 @@
1
- import { AgentTaskStatusDto } from "../openapi/ct-st";
2
1
  export type AgentTask = {
3
2
  id: string;
4
- status: AgentTaskStatusDto;
5
3
  response?: string;
6
4
  createdAt: string;
7
5
  };
@@ -1,6 +1,9 @@
1
1
  export interface CreateAgentTaskRequest {
2
- queryText: string;
3
- streamId: string;
4
- jsonSchema?: string;
5
- todos?: string[];
2
+ genericTask?: {
3
+ queryText: string;
4
+ jsonSchema?: string;
5
+ };
6
+ streamingChatCompletionTask?: {
7
+ prompt: string;
8
+ };
6
9
  }
@@ -1,7 +1,7 @@
1
1
  // Browser-compatible version utility
2
2
  // The version is set at build time and can be overridden if needed
3
3
  // Build-time version constant - this should be updated during the build process
4
- const SDK_VERSION = '0.1.110';
4
+ const SDK_VERSION = '0.1.111';
5
5
  // Allow runtime override if needed
6
6
  let versionOverride = null;
7
7
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fencyai/js",
3
- "version": "0.1.111",
3
+ "version": "0.1.112",
4
4
  "description": "> TODO: description",
5
5
  "author": "staklau <steinaageklaussen@gmail.com>",
6
6
  "homepage": "",
@@ -42,5 +42,5 @@
42
42
  "ts-jest": "^29.1.1",
43
43
  "typescript": "^5.3.3"
44
44
  },
45
- "gitHead": "b8f676f55b56f5a6d048cfa33335eb30f67f22bd"
45
+ "gitHead": "ec810f984fd9010de0c81701cfb60547ab7584b8"
46
46
  }
@@ -1,5 +0,0 @@
1
- export declare enum AgentTaskProgressItemType {
2
- REASONING = "REASONING",
3
- EXECUTION = "EXECUTION",
4
- FINAL_RESPONSE = "FINAL_RESPONSE"
5
- }
@@ -1,10 +0,0 @@
1
- /* generated using openapi-typescript-codegen -- do not edit */
2
- /* istanbul ignore file */
3
- /* tslint:disable */
4
- /* eslint-disable */
5
- export var AgentTaskProgressItemType;
6
- (function (AgentTaskProgressItemType) {
7
- AgentTaskProgressItemType["REASONING"] = "REASONING";
8
- AgentTaskProgressItemType["EXECUTION"] = "EXECUTION";
9
- AgentTaskProgressItemType["FINAL_RESPONSE"] = "FINAL_RESPONSE";
10
- })(AgentTaskProgressItemType || (AgentTaskProgressItemType = {}));
@@ -1,5 +0,0 @@
1
- export declare enum AgentTaskStatusDto {
2
- IN_PROGRESS = "InProgress",
3
- FAILED = "Failed",
4
- COMPLETED = "Completed"
5
- }
@@ -1,10 +0,0 @@
1
- /* generated using openapi-typescript-codegen -- do not edit */
2
- /* istanbul ignore file */
3
- /* tslint:disable */
4
- /* eslint-disable */
5
- export var AgentTaskStatusDto;
6
- (function (AgentTaskStatusDto) {
7
- AgentTaskStatusDto["IN_PROGRESS"] = "InProgress";
8
- AgentTaskStatusDto["FAILED"] = "Failed";
9
- AgentTaskStatusDto["COMPLETED"] = "Completed";
10
- })(AgentTaskStatusDto || (AgentTaskStatusDto = {}));