@animalabs/agent-framework 0.6.8 → 0.7.0
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/dist/src/agent.d.ts +6 -0
- package/dist/src/agent.d.ts.map +1 -1
- package/dist/src/agent.js +11 -1
- package/dist/src/agent.js.map +1 -1
- package/dist/src/framework.d.ts +129 -15
- package/dist/src/framework.d.ts.map +1 -1
- package/dist/src/framework.js +967 -113
- package/dist/src/framework.js.map +1 -1
- package/dist/src/mcpl/channel-registry.d.ts +87 -7
- package/dist/src/mcpl/channel-registry.d.ts.map +1 -1
- package/dist/src/mcpl/channel-registry.js +329 -49
- package/dist/src/mcpl/channel-registry.js.map +1 -1
- package/dist/src/modules/workspace/index.d.ts +10 -0
- package/dist/src/modules/workspace/index.d.ts.map +1 -1
- package/dist/src/modules/workspace/index.js +61 -6
- package/dist/src/modules/workspace/index.js.map +1 -1
- package/dist/src/modules/workspace/types.d.ts +2 -0
- package/dist/src/modules/workspace/types.d.ts.map +1 -1
- package/dist/src/modules/workspace/types.js.map +1 -1
- package/dist/src/modules/workspace/watcher.d.ts +17 -0
- package/dist/src/modules/workspace/watcher.d.ts.map +1 -1
- package/dist/src/modules/workspace/watcher.js +143 -7
- package/dist/src/modules/workspace/watcher.js.map +1 -1
- package/dist/src/types/agent.d.ts +32 -0
- package/dist/src/types/agent.d.ts.map +1 -1
- package/dist/src/types/trace.d.ts +32 -0
- package/dist/src/types/trace.d.ts.map +1 -1
- package/dist/test/channel-registry-routing.test.js +186 -10
- package/dist/test/channel-registry-routing.test.js.map +1 -1
- package/dist/test/explicit-prose-routing.test.d.ts +11 -0
- package/dist/test/explicit-prose-routing.test.d.ts.map +1 -0
- package/dist/test/explicit-prose-routing.test.js +247 -0
- package/dist/test/explicit-prose-routing.test.js.map +1 -0
- package/dist/test/present-while-acting.test.js +85 -8
- package/dist/test/present-while-acting.test.js.map +1 -1
- package/dist/test/trunk-channel-routing.test.js +7 -3
- package/dist/test/trunk-channel-routing.test.js.map +1 -1
- package/dist/test/workspace-watcher.test.js +161 -9
- package/dist/test/workspace-watcher.test.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/agent.ts +11 -1
- package/src/framework.ts +1037 -116
- package/src/mcpl/channel-registry.ts +401 -54
- package/src/modules/workspace/index.ts +60 -6
- package/src/modules/workspace/types.ts +2 -0
- package/src/modules/workspace/watcher.ts +160 -7
- package/src/types/agent.ts +35 -0
- package/src/types/trace.ts +47 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@animalabs/agent-framework",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Multi-agent framework with pluggable modules, persistent state, and concurrent tool execution",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"license": "MIT",
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@animalabs/chronicle": "^0.2.2",
|
|
49
|
-
"@animalabs/context-manager": "^0.
|
|
50
|
-
"@animalabs/membrane": "^0.5.
|
|
49
|
+
"@animalabs/context-manager": "^0.6.0",
|
|
50
|
+
"@animalabs/membrane": "^0.5.75",
|
|
51
51
|
"chokidar": "^4.0.3",
|
|
52
52
|
"discord.js": "^14.25.1",
|
|
53
53
|
"ws": "^8.18.0"
|
package/src/agent.ts
CHANGED
|
@@ -62,8 +62,14 @@ export class Agent {
|
|
|
62
62
|
readonly thinking: AgentConfig['thinking'];
|
|
63
63
|
/** Refusal auto-rewind policy (see AgentConfig.refusalHandling). */
|
|
64
64
|
readonly refusalHandling: AgentConfig['refusalHandling'];
|
|
65
|
+
/** Prose delivery mode (see AgentConfig.proseRouting). Default 'locus'. */
|
|
66
|
+
readonly proseRouting: 'locus' | 'explicit';
|
|
65
67
|
/** Prompt-cache TTL forwarded to the provider (see AgentConfig.cacheTtl). */
|
|
66
68
|
readonly cacheTtl: NonNullable<AgentConfig['cacheTtl']>;
|
|
69
|
+
/** Emit prompt-cache markers on requests (see AgentConfig.promptCaching). */
|
|
70
|
+
readonly promptCaching: boolean;
|
|
71
|
+
/** Prefill scaffold user message (see AgentConfig.prefillUserMessage). */
|
|
72
|
+
readonly prefillUserMessage?: string;
|
|
67
73
|
/** Provider-specific request parameters forwarded unchanged by Membrane. */
|
|
68
74
|
readonly providerParams?: Record<string, unknown>;
|
|
69
75
|
readonly sameRoundThinkTextPolicy: AgentConfig['sameRoundThinkTextPolicy'];
|
|
@@ -100,7 +106,10 @@ export class Agent {
|
|
|
100
106
|
this.temperature = config.temperature;
|
|
101
107
|
this.thinking = config.thinking;
|
|
102
108
|
this.refusalHandling = config.refusalHandling;
|
|
109
|
+
this.proseRouting = config.proseRouting ?? 'locus';
|
|
103
110
|
this.cacheTtl = config.cacheTtl ?? '1h';
|
|
111
|
+
this.promptCaching = config.promptCaching ?? true;
|
|
112
|
+
this.prefillUserMessage = config.prefillUserMessage;
|
|
104
113
|
this.providerParams = config.providerParams;
|
|
105
114
|
this.sameRoundThinkTextPolicy = config.sameRoundThinkTextPolicy;
|
|
106
115
|
this.maxStreamTokens = config.maxStreamTokens ?? 150_000;
|
|
@@ -638,8 +647,9 @@ export class Agent {
|
|
|
638
647
|
...(this.thinking !== undefined && { thinking: this.thinking }),
|
|
639
648
|
},
|
|
640
649
|
tools: availableTools.length > 0 ? availableTools : undefined,
|
|
641
|
-
promptCaching:
|
|
650
|
+
promptCaching: this.promptCaching,
|
|
642
651
|
cacheTtl: this.cacheTtl,
|
|
652
|
+
...(this.prefillUserMessage && { prefillUserMessage: this.prefillUserMessage }),
|
|
643
653
|
...(this.providerParams && { providerParams: this.providerParams }),
|
|
644
654
|
assistantParticipant: this.name,
|
|
645
655
|
};
|