@fencyai/js 0.1.123 → 0.1.124
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/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/types/StreamEventTypes.d.ts +3 -3
- package/lib/types/StreamEventTypes.d.ts.map +1 -1
- package/lib/utils/streamEventTypes.d.ts +4 -13
- package/lib/utils/streamEventTypes.d.ts.map +1 -1
- package/lib/utils/streamEventTypes.js +3 -44
- package/lib/utils/version.js +1 -1
- package/package.json +2 -2
package/lib/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export { loadFency } from './loadFency';
|
|
|
5
5
|
export type { FencyInstance } from './types/FencyInstance';
|
|
6
6
|
export type { FencyOptions } from './types/FencyOptions';
|
|
7
7
|
export * from './types/index';
|
|
8
|
-
export {
|
|
8
|
+
export { isStreamTimeoutEvent, isStreamNotFoundEvent, isAgentTaskProgressItemUpdatedEvent, } from './utils/streamEventTypes';
|
|
9
9
|
export { createAgentTask } from './api/createAgentTask';
|
|
10
10
|
export { createStream } from './api/createStream';
|
|
11
11
|
export { isValidAgentTaskModel, agentTaskModels } from './AgentTaskModel';
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvC,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAC1D,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,cAAc,eAAe,CAAA;AAE7B,OAAO,EACH,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvC,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAC1D,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,cAAc,eAAe,CAAA;AAE7B,OAAO,EACH,oBAAoB,EACpB,qBAAqB,EACrB,mCAAmC,GACtC,MAAM,0BAA0B,CAAA;AAGjC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACzE,YAAY,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACtD,YAAY,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA"}
|
package/lib/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export { loadFency } from './loadFency';
|
|
5
5
|
export * from './types/index';
|
|
6
|
-
export {
|
|
6
|
+
export { isStreamTimeoutEvent, isStreamNotFoundEvent, isAgentTaskProgressItemUpdatedEvent, } from './utils/streamEventTypes';
|
|
7
7
|
// api
|
|
8
8
|
export { createAgentTask } from './api/createAgentTask';
|
|
9
9
|
export { createStream } from './api/createStream';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @public */
|
|
2
2
|
export type StreamEventType = 'StreamTimeout' | 'StreamNotFound' | 'StreamUnauthorized' | 'AgentTaskProgressItemUpdated';
|
|
3
3
|
/** @public */
|
|
4
|
-
export type
|
|
4
|
+
export type AgentTaskProgressItemUpdatedEvent = {
|
|
5
5
|
type: StreamEventType;
|
|
6
6
|
streamId: string;
|
|
7
7
|
timestamp: string;
|
|
@@ -11,13 +11,13 @@ export type AgentTaskProgressItemUpdatedEventDto = {
|
|
|
11
11
|
data: string;
|
|
12
12
|
};
|
|
13
13
|
/** @public */
|
|
14
|
-
export type
|
|
14
|
+
export type StreamNotFoundEvent = {
|
|
15
15
|
type: StreamEventType;
|
|
16
16
|
streamId: string;
|
|
17
17
|
timestamp: string;
|
|
18
18
|
};
|
|
19
19
|
/** @public */
|
|
20
|
-
export type
|
|
20
|
+
export type StreamTimeoutEvent = {
|
|
21
21
|
type: StreamEventType;
|
|
22
22
|
streamId: string;
|
|
23
23
|
timestamp: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StreamEventTypes.d.ts","sourceRoot":"","sources":["../../src/types/StreamEventTypes.ts"],"names":[],"mappings":"AAAA,cAAc;AACd,MAAM,MAAM,eAAe,GACrB,eAAe,GACf,gBAAgB,GAChB,oBAAoB,GACpB,8BAA8B,CAAA;AAEpC,cAAc;AACd,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"StreamEventTypes.d.ts","sourceRoot":"","sources":["../../src/types/StreamEventTypes.ts"],"names":[],"mappings":"AAAA,cAAc;AACd,MAAM,MAAM,eAAe,GACrB,eAAe,GACf,gBAAgB,GAChB,oBAAoB,GACpB,8BAA8B,CAAA;AAEpC,cAAc;AACd,MAAM,MAAM,iCAAiC,GAAG;IAC5C,IAAI,EAAE,eAAe,CAAA;IACrB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,cAAc,EAAE,MAAM,CAAA;IACtB,IAAI,EAAE,MAAM,CAAA;CACf,CAAA;AAED,cAAc;AACd,MAAM,MAAM,mBAAmB,GAAG;IAC9B,IAAI,EAAE,eAAe,CAAA;IACrB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,cAAc;AACd,MAAM,MAAM,kBAAkB,GAAG;IAC7B,IAAI,EAAE,eAAe,CAAA;IACrB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;CACpB,CAAA"}
|
|
@@ -1,17 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { AgentTaskProgressItemUpdatedEventDto as GeneratedAgentTaskDto } from '../openapi/ct/models/AgentTaskProgressItemUpdatedEventDto';
|
|
3
|
-
import type { StreamNotFoundEventDto as GeneratedStreamNotFoundDto } from '../openapi/ct/models/StreamNotFoundEventDto';
|
|
4
|
-
import type { StreamTimeoutEventDto as GeneratedStreamTimeoutDto } from '../openapi/ct/models/StreamTimeoutEventDto';
|
|
1
|
+
import type { AgentTaskProgressItemUpdatedEvent, StreamNotFoundEvent, StreamTimeoutEvent } from '../types/StreamEventTypes';
|
|
5
2
|
/** @public */
|
|
6
|
-
export declare function
|
|
3
|
+
export declare function isStreamTimeoutEvent(value: unknown): value is StreamTimeoutEvent;
|
|
7
4
|
/** @public */
|
|
8
|
-
export declare function
|
|
5
|
+
export declare function isStreamNotFoundEvent(value: unknown): value is StreamNotFoundEvent;
|
|
9
6
|
/** @public */
|
|
10
|
-
export declare function
|
|
11
|
-
/** @public */
|
|
12
|
-
export declare function toStreamTimeoutEventDto(value: GeneratedStreamTimeoutDto): StreamTimeoutEventDto;
|
|
13
|
-
/** @public */
|
|
14
|
-
export declare function toStreamNotFoundEventDto(value: GeneratedStreamNotFoundDto): StreamNotFoundEventDto;
|
|
15
|
-
/** @public */
|
|
16
|
-
export declare function toAgentTaskProgressItemUpdatedEventDto(value: GeneratedAgentTaskDto): AgentTaskProgressItemUpdatedEventDto;
|
|
7
|
+
export declare function isAgentTaskProgressItemUpdatedEvent(value: unknown): value is AgentTaskProgressItemUpdatedEvent;
|
|
17
8
|
//# sourceMappingURL=streamEventTypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"streamEventTypes.d.ts","sourceRoot":"","sources":["../../src/utils/streamEventTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,
|
|
1
|
+
{"version":3,"file":"streamEventTypes.d.ts","sourceRoot":"","sources":["../../src/utils/streamEventTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,iCAAiC,EACjC,mBAAmB,EACnB,kBAAkB,EACrB,MAAM,2BAA2B,CAAA;AAUlC,cAAc;AACd,wBAAgB,oBAAoB,CAChC,KAAK,EAAE,OAAO,GACf,KAAK,IAAI,kBAAkB,CAO7B;AAED,cAAc;AACd,wBAAgB,qBAAqB,CACjC,KAAK,EAAE,OAAO,GACf,KAAK,IAAI,mBAAmB,CAO9B;AAED,cAAc;AACd,wBAAgB,mCAAmC,CAC/C,KAAK,EAAE,OAAO,GACf,KAAK,IAAI,iCAAiC,CAW5C"}
|
|
@@ -5,7 +5,7 @@ function hasString(obj, key) {
|
|
|
5
5
|
return key in obj && typeof obj[key] === 'string';
|
|
6
6
|
}
|
|
7
7
|
/** @public */
|
|
8
|
-
export function
|
|
8
|
+
export function isStreamTimeoutEvent(value) {
|
|
9
9
|
if (!isObject(value))
|
|
10
10
|
return false;
|
|
11
11
|
return (value.type === 'StreamTimeout' &&
|
|
@@ -13,7 +13,7 @@ export function isStreamTimeoutEventDto(value) {
|
|
|
13
13
|
hasString(value, 'timestamp'));
|
|
14
14
|
}
|
|
15
15
|
/** @public */
|
|
16
|
-
export function
|
|
16
|
+
export function isStreamNotFoundEvent(value) {
|
|
17
17
|
if (!isObject(value))
|
|
18
18
|
return false;
|
|
19
19
|
return (value.type === 'StreamNotFound' &&
|
|
@@ -21,7 +21,7 @@ export function isStreamNotFoundEventDto(value) {
|
|
|
21
21
|
hasString(value, 'timestamp'));
|
|
22
22
|
}
|
|
23
23
|
/** @public */
|
|
24
|
-
export function
|
|
24
|
+
export function isAgentTaskProgressItemUpdatedEvent(value) {
|
|
25
25
|
if (!isObject(value))
|
|
26
26
|
return false;
|
|
27
27
|
return (value.type === 'AgentTaskProgressItemUpdated' &&
|
|
@@ -32,44 +32,3 @@ export function isAgentTaskProgressItemUpdatedEventDto(value) {
|
|
|
32
32
|
hasString(value, 'progressItemId') &&
|
|
33
33
|
hasString(value, 'data'));
|
|
34
34
|
}
|
|
35
|
-
function parseStreamEventType(value) {
|
|
36
|
-
if (typeof value !== 'string')
|
|
37
|
-
return 'StreamTimeout';
|
|
38
|
-
if (value === 'StreamTimeout')
|
|
39
|
-
return 'StreamTimeout';
|
|
40
|
-
if (value === 'StreamNotFound')
|
|
41
|
-
return 'StreamNotFound';
|
|
42
|
-
if (value === 'StreamUnauthorized')
|
|
43
|
-
return 'StreamUnauthorized';
|
|
44
|
-
if (value === 'AgentTaskProgressItemUpdated')
|
|
45
|
-
return 'AgentTaskProgressItemUpdated';
|
|
46
|
-
return 'StreamTimeout';
|
|
47
|
-
}
|
|
48
|
-
/** @public */
|
|
49
|
-
export function toStreamTimeoutEventDto(value) {
|
|
50
|
-
return {
|
|
51
|
-
type: parseStreamEventType(value.type),
|
|
52
|
-
streamId: value.streamId,
|
|
53
|
-
timestamp: value.timestamp,
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
/** @public */
|
|
57
|
-
export function toStreamNotFoundEventDto(value) {
|
|
58
|
-
return {
|
|
59
|
-
type: parseStreamEventType(value.type),
|
|
60
|
-
streamId: value.streamId,
|
|
61
|
-
timestamp: value.timestamp,
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
/** @public */
|
|
65
|
-
export function toAgentTaskProgressItemUpdatedEventDto(value) {
|
|
66
|
-
return {
|
|
67
|
-
type: parseStreamEventType(value.type),
|
|
68
|
-
streamId: value.streamId,
|
|
69
|
-
timestamp: value.timestamp,
|
|
70
|
-
createdAt: value.createdAt,
|
|
71
|
-
agentTaskId: value.agentTaskId,
|
|
72
|
-
progressItemId: value.progressItemId,
|
|
73
|
-
data: value.data,
|
|
74
|
-
};
|
|
75
|
-
}
|
package/lib/utils/version.js
CHANGED
|
@@ -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.
|
|
4
|
+
const SDK_VERSION = '0.1.122';
|
|
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.
|
|
3
|
+
"version": "0.1.124",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "staklau <steinaageklaussen@gmail.com>",
|
|
6
6
|
"homepage": "",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"ts-jest": "^29.1.1",
|
|
45
45
|
"typescript": "^5.3.3"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "277a6a14145ee48036b64dd9b40c90dbb0d9d945"
|
|
48
48
|
}
|