@aigne/core 0.4.207-3 → 0.4.207
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 +3 -0
- package/lib/cjs/index.js +1 -0
- package/lib/cjs/tsconfig.tsbuildinfo +1 -1
- package/lib/esm/agent.js +3 -0
- package/lib/esm/index.js +1 -0
- package/lib/esm/tsconfig.tsbuildinfo +1 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/lib/cjs/data-type-schema.js +0 -46
- package/lib/cjs/data-type.js +0 -2
- package/lib/cjs/memory.js +0 -32
- package/lib/esm/data-type-schema.js +0 -43
- package/lib/esm/data-type.js +0 -1
- package/lib/esm/memory.js +0 -27
- package/lib/types/data-type-schema.d.ts +0 -46
- package/lib/types/data-type.d.ts +0 -32
- package/lib/types/memory.d.ts +0 -184
package/lib/cjs/agent.js
CHANGED
|
@@ -58,6 +58,7 @@ class Agent extends runnable_1.Runnable {
|
|
|
58
58
|
}));
|
|
59
59
|
}
|
|
60
60
|
async run(input, options) {
|
|
61
|
+
logger_1.default.debug(`AIGNE core: run agent ${this.name || this.id} with`, { input });
|
|
61
62
|
const memories = await this.loadMemories(input, this.context);
|
|
62
63
|
const processResult = await this.process(input, { ...options, memories });
|
|
63
64
|
if (options?.stream) {
|
|
@@ -67,6 +68,7 @@ class Agent extends runnable_1.Runnable {
|
|
|
67
68
|
: (0, utils_1.objectToRunnableResponseStream)(processResult);
|
|
68
69
|
return (0, utils_1.extractOutputsFromRunnableOutput)(stream, async (result) => {
|
|
69
70
|
// TODO: validate result against outputs schema
|
|
71
|
+
logger_1.default.debug(`AIGNE core: run agent ${this.name || this.id} success`, { result });
|
|
70
72
|
await this.onResult(result);
|
|
71
73
|
});
|
|
72
74
|
}
|
|
@@ -75,6 +77,7 @@ class Agent extends runnable_1.Runnable {
|
|
|
75
77
|
: Symbol.asyncIterator in processResult
|
|
76
78
|
? await (0, utils_1.runnableResponseStreamToObject)(processResult)
|
|
77
79
|
: processResult;
|
|
80
|
+
logger_1.default.debug(`AIGNE core: run agent ${this.name || this.id} success`, { result });
|
|
78
81
|
// TODO: validate result against outputs schema
|
|
79
82
|
await this.onResult(result);
|
|
80
83
|
return result;
|
package/lib/cjs/index.js
CHANGED
|
@@ -20,6 +20,7 @@ __exportStar(require("./definitions/data-type"), exports);
|
|
|
20
20
|
__exportStar(require("./definitions/data-type-schema"), exports);
|
|
21
21
|
__exportStar(require("./context"), exports);
|
|
22
22
|
__exportStar(require("./runnable"), exports);
|
|
23
|
+
__exportStar(require("./agent"), exports);
|
|
23
24
|
__exportStar(require("./pipeline-agent"), exports);
|
|
24
25
|
__exportStar(require("./llm-agent"), exports);
|
|
25
26
|
__exportStar(require("./llm-model"), exports);
|