@aigne/core 0.4.194 → 0.4.196
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/constants.js +11 -0
- package/lib/cjs/function-agent.js +81 -0
- package/lib/cjs/function-runner.js +29 -0
- package/lib/cjs/index.js +13 -1
- package/lib/cjs/llm-agent.js +166 -0
- package/lib/cjs/llm-decision-agent.js +169 -0
- package/lib/cjs/llm-model.js +27 -0
- package/lib/cjs/local-function-agent.js +80 -0
- package/lib/cjs/memory.js +32 -0
- package/lib/cjs/pipeline-agent.js +199 -0
- package/lib/cjs/runnable.js +29 -0
- package/lib/cjs/tsconfig.tsbuildinfo +1 -0
- package/lib/cjs/{types → utils}/index.js +4 -2
- package/lib/cjs/utils/is-non-nullable.js +20 -0
- package/lib/cjs/utils/mustache-utils.js +14 -0
- package/lib/cjs/utils/omit.js +2 -0
- package/lib/cjs/utils/ordered-map.js +71 -0
- package/lib/cjs/utils/stream-utils.js +25 -0
- package/lib/esm/constants.js +8 -0
- package/lib/esm/function-agent.js +77 -0
- package/lib/esm/function-runner.js +25 -0
- package/lib/esm/index.js +13 -1
- package/lib/esm/llm-agent.js +162 -0
- package/lib/esm/llm-decision-agent.js +165 -0
- package/lib/esm/llm-model.js +23 -0
- package/lib/esm/local-function-agent.js +76 -0
- package/lib/esm/memory.js +27 -0
- package/lib/esm/pipeline-agent.js +192 -0
- package/lib/esm/runnable.js +23 -0
- package/lib/esm/tsconfig.tsbuildinfo +1 -0
- package/lib/esm/utils/index.js +4 -0
- package/lib/esm/utils/is-non-nullable.js +13 -0
- package/lib/esm/utils/mustache-utils.js +8 -0
- package/lib/esm/utils/omit.js +1 -0
- package/lib/esm/utils/ordered-map.js +68 -0
- package/lib/esm/utils/stream-utils.js +21 -0
- package/lib/types/constants.d.ts +8 -0
- package/lib/types/context.d.ts +5 -0
- package/lib/types/data-type.d.ts +32 -0
- package/lib/types/function-agent.d.ts +36 -0
- package/lib/types/function-runner.d.ts +11 -0
- package/lib/types/index.d.ts +13 -1
- package/lib/types/llm-agent.d.ts +37 -0
- package/lib/types/llm-decision-agent.d.ts +66 -0
- package/lib/types/llm-model.d.ts +79 -0
- package/lib/types/local-function-agent.d.ts +38 -0
- package/lib/types/memory.d.ts +186 -0
- package/lib/types/pipeline-agent.d.ts +69 -0
- package/lib/types/runnable.d.ts +49 -0
- package/lib/types/tsconfig.tsbuildinfo +1 -0
- package/lib/types/utils/index.d.ts +4 -0
- package/lib/types/utils/is-non-nullable.d.ts +2 -0
- package/lib/types/utils/mustache-utils.d.ts +3 -0
- package/lib/types/utils/omit.d.ts +1 -0
- package/lib/types/utils/ordered-map.d.ts +28 -0
- package/lib/types/utils/stream-utils.d.ts +7 -0
- package/package.json +6 -4
- package/tsconfig.json +3 -7
- package/lib/esm/types/index.js +0 -2
- package/lib/types/types/agent.d.ts +0 -5
- package/lib/types/types/index.d.ts +0 -2
- package/lib/types/types/runnable.d.ts +0 -20
- /package/lib/cjs/{types/agent.js → context.js} +0 -0
- /package/lib/cjs/{types/runnable.js → data-type.js} +0 -0
- /package/lib/esm/{types/agent.js → context.js} +0 -0
- /package/lib/esm/{types/runnable.js → data-type.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type OmitPropsFromUnion<T, K extends string | number | symbol> = T extends any ? Omit<T, K> : never;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type OrderedRecord<T extends {
|
|
2
|
+
id: string;
|
|
3
|
+
}> = Record<string, T> & {
|
|
4
|
+
$indexes: string[];
|
|
5
|
+
};
|
|
6
|
+
export declare namespace OrderedRecord {
|
|
7
|
+
function iterator<T extends {
|
|
8
|
+
id: string;
|
|
9
|
+
}>(record?: OrderedRecord<T>): IterableIterator<T>;
|
|
10
|
+
function map<O, T extends {
|
|
11
|
+
id: string;
|
|
12
|
+
}>(record: OrderedRecord<T> | undefined, fn: (value: T, index: number) => O): O[];
|
|
13
|
+
function toArray<T extends {
|
|
14
|
+
id: string;
|
|
15
|
+
}>(record: OrderedRecord<T> | undefined): T[];
|
|
16
|
+
function fromArray<T extends {
|
|
17
|
+
id: string;
|
|
18
|
+
}>(array?: T[]): OrderedRecord<T>;
|
|
19
|
+
function find<T extends {
|
|
20
|
+
id: string;
|
|
21
|
+
}>(record: OrderedRecord<T> | undefined, predicate: (value: T, index: number) => boolean): T | undefined;
|
|
22
|
+
function push<T extends {
|
|
23
|
+
id: string;
|
|
24
|
+
}>(record: OrderedRecord<T>, ...items: T[]): OrderedRecord<T>;
|
|
25
|
+
function pushOrUpdate<T extends {
|
|
26
|
+
id: string;
|
|
27
|
+
}>(record: OrderedRecord<T>, ...items: T[]): OrderedRecord<T>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { RunnableResponseStream } from '../runnable';
|
|
2
|
+
export declare function objectToRunnableResponseStream<T extends {
|
|
3
|
+
[key: string]: any;
|
|
4
|
+
}>(obj: T): RunnableResponseStream<T>;
|
|
5
|
+
export declare function runnableResponseStreamToObject<T extends {
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}>(stream: RunnableResponseStream<T>): Promise<T>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aigne/core",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.196",
|
|
4
4
|
"description": "AIGNE core library",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@abtnode/client": "^1.16.36",
|
|
27
|
-
"@blocklet/ai-kit": "^0.1.66",
|
|
28
27
|
"@blocklet/sdk": "^1.16.36",
|
|
28
|
+
"@types/mustache": "^4.2.5",
|
|
29
29
|
"axios": "^1.7.5",
|
|
30
30
|
"cron": "^3.1.7",
|
|
31
31
|
"fast-deep-equal": "^3.1.3",
|
|
@@ -38,12 +38,14 @@
|
|
|
38
38
|
"json-logic-js": "^2.0.5",
|
|
39
39
|
"json-stable-stringify": "^1.1.1",
|
|
40
40
|
"lodash": "^4.17.21",
|
|
41
|
+
"mustache": "^4.2.0",
|
|
42
|
+
"nanoid": "^3.3.7",
|
|
41
43
|
"openapi3-ts": "^4.3.3",
|
|
42
44
|
"react-querybuilder": "^7.7.1",
|
|
43
45
|
"snowflake-uuid": "^1.0.0",
|
|
46
|
+
"tsyringe": "^4.8.0",
|
|
44
47
|
"ufo": "^1.5.4",
|
|
45
|
-
"yaml": "^2.5.0"
|
|
46
|
-
"@blocklet/quickjs": "^0.4.194"
|
|
48
|
+
"yaml": "^2.5.0"
|
|
47
49
|
},
|
|
48
50
|
"devDependencies": {
|
|
49
51
|
"@tsconfig/recommended": "^1.0.8",
|
package/tsconfig.json
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
+
"extends": "../../tsconfig.json",
|
|
2
3
|
"compilerOptions": {
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"moduleResolution": "node",
|
|
6
|
-
"esModuleInterop": true,
|
|
7
|
-
"forceConsistentCasingInFileNames": true,
|
|
8
|
-
"strict": true,
|
|
9
|
-
"skipLibCheck": true
|
|
4
|
+
"noEmit": false,
|
|
5
|
+
"noEmitOnError": true
|
|
10
6
|
},
|
|
11
7
|
"include": ["src/**/*"]
|
|
12
8
|
}
|
package/lib/esm/types/index.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export interface RunOptions {
|
|
2
|
-
stream?: boolean;
|
|
3
|
-
}
|
|
4
|
-
export interface RunnableResponseDelta<T> {
|
|
5
|
-
$text?: string;
|
|
6
|
-
delta?: Partial<T>;
|
|
7
|
-
}
|
|
8
|
-
export type RunnableResponseStream<T> = ReadableStream<RunnableResponseDelta<T>>;
|
|
9
|
-
export type RunnableResponse<T> = T | RunnableResponseStream<T>;
|
|
10
|
-
export interface Runnable<I extends {
|
|
11
|
-
[key: string]: any;
|
|
12
|
-
} = object, O = object> {
|
|
13
|
-
run(input: I, options: RunOptions & {
|
|
14
|
-
stream: true;
|
|
15
|
-
}): Promise<RunnableResponseStream<O>>;
|
|
16
|
-
run(input: I, options?: RunOptions & {
|
|
17
|
-
stream?: false;
|
|
18
|
-
}): Promise<O>;
|
|
19
|
-
run(input: I, options?: RunOptions): Promise<RunnableResponse<O>>;
|
|
20
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|