@animalabs/agent-framework 0.6.10 → 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.
Files changed (37) hide show
  1. package/dist/src/agent.d.ts +2 -0
  2. package/dist/src/agent.d.ts.map +1 -1
  3. package/dist/src/agent.js +3 -0
  4. package/dist/src/agent.js.map +1 -1
  5. package/dist/src/framework.d.ts +115 -15
  6. package/dist/src/framework.d.ts.map +1 -1
  7. package/dist/src/framework.js +820 -104
  8. package/dist/src/framework.js.map +1 -1
  9. package/dist/src/mcpl/channel-registry.d.ts +87 -7
  10. package/dist/src/mcpl/channel-registry.d.ts.map +1 -1
  11. package/dist/src/mcpl/channel-registry.js +329 -49
  12. package/dist/src/mcpl/channel-registry.js.map +1 -1
  13. package/dist/src/modules/workspace/index.d.ts.map +1 -1
  14. package/dist/src/modules/workspace/index.js +13 -4
  15. package/dist/src/modules/workspace/index.js.map +1 -1
  16. package/dist/src/types/agent.d.ts +17 -0
  17. package/dist/src/types/agent.d.ts.map +1 -1
  18. package/dist/src/types/trace.d.ts +32 -0
  19. package/dist/src/types/trace.d.ts.map +1 -1
  20. package/dist/test/channel-registry-routing.test.js +186 -10
  21. package/dist/test/channel-registry-routing.test.js.map +1 -1
  22. package/dist/test/explicit-prose-routing.test.d.ts +11 -0
  23. package/dist/test/explicit-prose-routing.test.d.ts.map +1 -0
  24. package/dist/test/explicit-prose-routing.test.js +247 -0
  25. package/dist/test/explicit-prose-routing.test.js.map +1 -0
  26. package/dist/test/present-while-acting.test.js +85 -8
  27. package/dist/test/present-while-acting.test.js.map +1 -1
  28. package/dist/test/trunk-channel-routing.test.js +2 -2
  29. package/dist/test/trunk-channel-routing.test.js.map +1 -1
  30. package/dist/tsconfig.tsbuildinfo +1 -1
  31. package/package.json +4 -4
  32. package/src/agent.ts +3 -0
  33. package/src/framework.ts +881 -107
  34. package/src/mcpl/channel-registry.ts +401 -54
  35. package/src/modules/workspace/index.ts +13 -4
  36. package/src/types/agent.ts +18 -0
  37. 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.6.10",
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.5.13",
50
- "@animalabs/membrane": "^0.5.74",
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"
@@ -62,4 +62,4 @@
62
62
  "engines": {
63
63
  "node": ">=20.0.0"
64
64
  }
65
- }
65
+ }
package/src/agent.ts CHANGED
@@ -62,6 +62,8 @@ 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']>;
67
69
  /** Emit prompt-cache markers on requests (see AgentConfig.promptCaching). */
@@ -104,6 +106,7 @@ export class Agent {
104
106
  this.temperature = config.temperature;
105
107
  this.thinking = config.thinking;
106
108
  this.refusalHandling = config.refusalHandling;
109
+ this.proseRouting = config.proseRouting ?? 'locus';
107
110
  this.cacheTtl = config.cacheTtl ?? '1h';
108
111
  this.promptCaching = config.promptCaching ?? true;
109
112
  this.prefillUserMessage = config.prefillUserMessage;