@aigne/core 0.4.205 → 0.4.206
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/cjs/agent.js +27 -1
- package/lib/cjs/definitions/data-type-schema.js +2 -2
- package/lib/cjs/function-agent.js +34 -29
- package/lib/cjs/function-runner.js +6 -4
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/llm-agent.js +22 -54
- package/lib/cjs/llm-decision-agent.js +8 -12
- package/lib/cjs/llm-model.js +2 -2
- package/lib/cjs/local-function-agent.js +7 -21
- package/lib/cjs/pipeline-agent.js +9 -19
- package/lib/cjs/runnable.js +1 -0
- package/lib/cjs/tsconfig.tsbuildinfo +1 -1
- package/lib/cjs/utils/index.js +5 -2
- package/lib/cjs/utils/stream-utils.js +35 -13
- package/lib/esm/agent.js +29 -3
- package/lib/esm/definitions/data-type-schema.js +2 -2
- package/lib/esm/function-agent.js +33 -28
- package/lib/esm/function-runner.js +6 -4
- package/lib/esm/index.js +1 -1
- package/lib/esm/llm-agent.js +22 -53
- package/lib/esm/llm-decision-agent.js +8 -11
- package/lib/esm/llm-model.js +2 -2
- package/lib/esm/local-function-agent.js +7 -20
- package/lib/esm/pipeline-agent.js +9 -18
- package/lib/esm/runnable.js +1 -0
- package/lib/esm/tsconfig.tsbuildinfo +1 -1
- package/lib/esm/utils/index.js +5 -2
- package/lib/esm/utils/stream-utils.js +33 -13
- package/lib/types/agent.d.ts +8 -9
- package/lib/types/context.d.ts +2 -0
- package/lib/types/definitions/data-type-schema.d.ts +7 -5
- package/lib/types/{data-type.d.ts → definitions/data-type.d.ts} +2 -2
- package/lib/types/function-agent.d.ts +33 -20
- package/lib/types/function-runner.d.ts +20 -7
- package/lib/types/index.d.ts +1 -1
- package/lib/types/llm-agent.d.ts +27 -30
- package/lib/types/llm-decision-agent.d.ts +15 -22
- package/lib/types/llm-model.d.ts +2 -2
- package/lib/types/local-function-agent.d.ts +31 -34
- package/lib/types/pipeline-agent.d.ts +21 -55
- package/lib/types/runnable.d.ts +1 -1
- package/lib/types/tsconfig.tsbuildinfo +1 -1
- package/lib/types/utils/index.d.ts +5 -2
- package/lib/types/utils/stream-utils.d.ts +5 -3
- package/lib/types/utils/union.d.ts +1 -2
- package/package.json +3 -2
- /package/lib/cjs/{data-type.js → definitions/data-type.js} +0 -0
- /package/lib/esm/{data-type.js → definitions/data-type.js} +0 -0
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
export * from './ordered-map';
|
|
2
1
|
export * from './is-non-nullable';
|
|
3
|
-
export * from './stream-utils';
|
|
4
2
|
export * from './mustache-utils';
|
|
3
|
+
export * from './nullable';
|
|
4
|
+
export * from './omit';
|
|
5
|
+
export * from './ordered-map';
|
|
6
|
+
export * from './stream-utils';
|
|
7
|
+
export * from './union';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { RunnableResponse, RunnableResponseStream } from '../runnable';
|
|
1
|
+
import { RunnableResponse, RunnableResponseChunk, RunnableResponseStream } from '../runnable';
|
|
2
2
|
export declare function objectToRunnableResponseStream<T extends {
|
|
3
3
|
[key: string]: any;
|
|
4
4
|
}>(obj: T): RunnableResponseStream<T>;
|
|
5
5
|
export declare function runnableResponseStreamToObject<T extends {
|
|
6
6
|
[key: string]: any;
|
|
7
|
-
}>(stream: RunnableResponseStream<T>): Promise<T>;
|
|
7
|
+
}>(stream: RunnableResponseStream<T> | AsyncGenerator<RunnableResponseChunk<T>>): Promise<T>;
|
|
8
8
|
/**
|
|
9
9
|
* Extracts the outputs from a runnable output stream and run the
|
|
10
10
|
* resolve function on the result before the stream closes. It can be
|
|
@@ -15,4 +15,6 @@ export declare function runnableResponseStreamToObject<T extends {
|
|
|
15
15
|
*/
|
|
16
16
|
export declare function extractOutputsFromRunnableOutput<T extends {
|
|
17
17
|
[key: string]: any;
|
|
18
|
-
}>(output: RunnableResponse<T
|
|
18
|
+
}>(output: RunnableResponse<T> | AsyncGenerator<RunnableResponseChunk<T>>, resolve: (result: T) => Promise<void> | void): Promise<RunnableResponse<T>>;
|
|
19
|
+
export declare function asyncGeneratorToReadableStream<T>(generator: AsyncGenerator<T>): ReadableStream<T>;
|
|
20
|
+
export declare function isAsyncGenerator<T extends AsyncGenerator>(value: any): value is T;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export type UnionToIntersection<U> = (U extends any ? (arg: U) => void : never) extends (arg: infer I) => void ? I : never;
|
|
2
|
-
export type ObjectUnionToIntersection<T, O = object> = UnionToIntersection<T> extends O ? UnionToIntersection<T> : never;
|
|
1
|
+
export type UnionToIntersection<U, O = any> = (U extends any ? (arg: U) => void : never) extends (arg: infer I) => void ? I extends O ? I : never : never;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aigne/core",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.206",
|
|
4
4
|
"description": "AIGNE core library",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@tsconfig/recommended": "^1.0.8",
|
|
52
|
+
"@types/bun": "^1.1.16",
|
|
52
53
|
"npm-run-all": "^4.1.5",
|
|
53
54
|
"rimraf": "^6.0.1",
|
|
54
55
|
"ts-jest": "^29.2.5",
|
|
@@ -62,6 +63,6 @@
|
|
|
62
63
|
"build:esm": "tsc -p tsconfig.json --module es2022 --outDir lib/esm",
|
|
63
64
|
"build:types": "tsc -p tsconfig.json --declaration --emitDeclarationOnly --outDir lib/types",
|
|
64
65
|
"clean": "rimraf lib",
|
|
65
|
-
"test": "
|
|
66
|
+
"test": "bun test"
|
|
66
67
|
}
|
|
67
68
|
}
|
|
File without changes
|
|
File without changes
|