@animalabs/connectome-host 0.3.8 → 0.3.9
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/bun.lock
CHANGED
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
"": {
|
|
6
6
|
"name": "connectome-host",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@animalabs/agent-framework": "^0.6.
|
|
8
|
+
"@animalabs/agent-framework": "^0.6.8",
|
|
9
9
|
"@animalabs/chronicle": "^0.2.0",
|
|
10
|
-
"@animalabs/context-manager": "^0.5.
|
|
11
|
-
"@animalabs/membrane": "^0.5.
|
|
10
|
+
"@animalabs/context-manager": "^0.5.13",
|
|
11
|
+
"@animalabs/membrane": "^0.5.73",
|
|
12
12
|
"@opentui/core": "^0.1.82",
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
},
|
|
20
20
|
},
|
|
21
21
|
"packages": {
|
|
22
|
-
"@animalabs/agent-framework": ["@animalabs/agent-framework@0.6.
|
|
22
|
+
"@animalabs/agent-framework": ["@animalabs/agent-framework@0.6.8", "", { "dependencies": { "@animalabs/chronicle": "^0.2.2", "@animalabs/context-manager": "^0.5.13", "@animalabs/membrane": "^0.5.73", "chokidar": "^4.0.3", "discord.js": "^14.25.1", "ws": "^8.18.0" }, "bin": { "agent-framework-mcp": "dist/src/api/mcp-server.js", "agent-framework-recover": "dist/src/recovery/recover-cli.js" } }, "sha512-hLu+DI0Xj40zSRm+KmjEZO/uzizd2Gbaiih4IGNXJJZf0mcIxYDbOynEMpaLHtXGYMS8eYFmQK02ytdL9thtoA=="],
|
|
23
23
|
|
|
24
24
|
"@animalabs/chronicle": ["@animalabs/chronicle@0.2.1", "", { "optionalDependencies": { "@animalabs/chronicle-darwin-arm64": "0.2.1", "@animalabs/chronicle-darwin-x64": "0.2.1", "@animalabs/chronicle-linux-arm64-gnu": "0.2.1", "@animalabs/chronicle-linux-x64-gnu": "0.2.1", "@animalabs/chronicle-win32-x64-msvc": "0.2.1" } }, "sha512-rDFc069yfi7BQUusgsXBwBdqljUWLByXSYaTF40AP+tonBh0No3eF9VzKTSy1I8DYg/jAUHIKtVdKDGsVMVubw=="],
|
|
25
25
|
|
|
26
|
-
"@animalabs/context-manager": ["@animalabs/context-manager@0.5.
|
|
26
|
+
"@animalabs/context-manager": ["@animalabs/context-manager@0.5.13", "", { "dependencies": { "@animalabs/chronicle": "^0.2.6", "@animalabs/membrane": "^0.5.69" } }, "sha512-1NOsyCeiJoAa4MrBSGw1zbbs2XfvhRbkMfkFNCNFH9gSFTq/4tMwMu6lmZ082oNeB9FvptGrjCuZdVP8B9/UdA=="],
|
|
27
27
|
|
|
28
|
-
"@animalabs/membrane": ["@animalabs/membrane@0.5.
|
|
28
|
+
"@animalabs/membrane": ["@animalabs/membrane@0.5.73", "", { "dependencies": { "@anthropic-ai/sdk": "^0.52.0" } }, "sha512-w1rt/JVOD6dWwEO54tfR0yrLzwwD45cpYJ9hWJhHxs8k9FvW1PgIIV1KmNFNbpY8MR9HC5g7Lqgvhzs3pDst+g=="],
|
|
29
29
|
|
|
30
30
|
"@anthropic-ai/sdk": ["@anthropic-ai/sdk@0.52.0", "", { "bin": { "anthropic-ai-sdk": "bin/cli" } }, "sha512-d4c+fg+xy9e46c8+YnrrgIQR45CZlAi7PwdzIfDXDM6ACxEZli1/fxhURsq30ZpMZy6LvSkr41jGq5aF5TD7rQ=="],
|
|
31
31
|
|
|
@@ -277,12 +277,8 @@
|
|
|
277
277
|
|
|
278
278
|
"@animalabs/agent-framework/@animalabs/chronicle": ["@animalabs/chronicle@0.2.6", "", { "optionalDependencies": { "@animalabs/chronicle-darwin-arm64": "0.2.6", "@animalabs/chronicle-darwin-x64": "0.2.6", "@animalabs/chronicle-linux-arm64-gnu": "0.2.6", "@animalabs/chronicle-linux-x64-gnu": "0.2.6", "@animalabs/chronicle-win32-x64-msvc": "0.2.6" } }, "sha512-+gbt2GR4SP8MnKxeqkJZf6oZn339fLiBtk6GHyBD/gHQ4e4eFqBpTaTd5eKycKBws0xWGcOqyiJFH4IdBkweUA=="],
|
|
279
279
|
|
|
280
|
-
"@animalabs/agent-framework/@animalabs/membrane": ["@animalabs/membrane@0.5.73", "", { "dependencies": { "@anthropic-ai/sdk": "^0.52.0" } }, "sha512-w1rt/JVOD6dWwEO54tfR0yrLzwwD45cpYJ9hWJhHxs8k9FvW1PgIIV1KmNFNbpY8MR9HC5g7Lqgvhzs3pDst+g=="],
|
|
281
|
-
|
|
282
280
|
"@animalabs/context-manager/@animalabs/chronicle": ["@animalabs/chronicle@0.2.6", "", { "optionalDependencies": { "@animalabs/chronicle-darwin-arm64": "0.2.6", "@animalabs/chronicle-darwin-x64": "0.2.6", "@animalabs/chronicle-linux-arm64-gnu": "0.2.6", "@animalabs/chronicle-linux-x64-gnu": "0.2.6", "@animalabs/chronicle-win32-x64-msvc": "0.2.6" } }, "sha512-+gbt2GR4SP8MnKxeqkJZf6oZn339fLiBtk6GHyBD/gHQ4e4eFqBpTaTd5eKycKBws0xWGcOqyiJFH4IdBkweUA=="],
|
|
283
281
|
|
|
284
|
-
"@animalabs/context-manager/@animalabs/membrane": ["@animalabs/membrane@0.5.73", "", { "dependencies": { "@anthropic-ai/sdk": "^0.52.0" } }, "sha512-w1rt/JVOD6dWwEO54tfR0yrLzwwD45cpYJ9hWJhHxs8k9FvW1PgIIV1KmNFNbpY8MR9HC5g7Lqgvhzs3pDst+g=="],
|
|
285
|
-
|
|
286
282
|
"@discordjs/rest/@discordjs/collection": ["@discordjs/collection@2.1.1", "", {}, "sha512-LiSusze9Tc7qF03sLCujF5iZp7K+vRNEDBZ86FT9aQAv3vxMLihUvKvpsCWiQ2DJq1tVckopKm1rxomgNUc9hg=="],
|
|
287
283
|
|
|
288
284
|
"@discordjs/rest/@sapphire/snowflake": ["@sapphire/snowflake@3.5.5", "", {}, "sha512-xzvBr1Q1c4lCe7i6sRnrofxeO1QTP/LKQ6A6qy0iB4x5yfiSfARMEQEghojzTNALDTcv8En04qYNIco9/K9eZQ=="],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@animalabs/connectome-host",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.9",
|
|
4
4
|
"description": "General-purpose agent TUI host with recipe-based configuration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
"postinstall": "test -d web && npm --prefix web install && npm --prefix web run build || true"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@animalabs/agent-framework": "^0.6.
|
|
16
|
+
"@animalabs/agent-framework": "^0.6.8",
|
|
17
17
|
"@animalabs/chronicle": "^0.2.0",
|
|
18
|
-
"@animalabs/context-manager": "^0.5.
|
|
19
|
-
"@animalabs/membrane": "^0.5.
|
|
18
|
+
"@animalabs/context-manager": "^0.5.13",
|
|
19
|
+
"@animalabs/membrane": "^0.5.73",
|
|
20
20
|
"@opentui/core": "^0.1.82"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
package/src/recipe.ts
CHANGED
|
@@ -132,11 +132,6 @@ export interface RecipeAgent {
|
|
|
132
132
|
autoRewind?: boolean;
|
|
133
133
|
maxRewinds?: number;
|
|
134
134
|
announceHumanTurns?: boolean;
|
|
135
|
-
primarySummaryFallback?: {
|
|
136
|
-
enabled?: boolean;
|
|
137
|
-
maxNewSummaries?: number;
|
|
138
|
-
requestBudgetTokens?: number;
|
|
139
|
-
};
|
|
140
135
|
};
|
|
141
136
|
}
|
|
142
137
|
|
|
@@ -823,35 +818,8 @@ export function validateRecipe(raw: unknown): Recipe {
|
|
|
823
818
|
}
|
|
824
819
|
|
|
825
820
|
const refusalHandling = agent.refusalHandling as Record<string, unknown> | undefined;
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
if (!primarySummaryFallback || typeof primarySummaryFallback !== 'object' || Array.isArray(primarySummaryFallback)) {
|
|
829
|
-
throw new Error('Recipe agent.refusalHandling.primarySummaryFallback must be an object.');
|
|
830
|
-
}
|
|
831
|
-
const fallback = primarySummaryFallback as Record<string, unknown>;
|
|
832
|
-
if (fallback.enabled !== undefined && typeof fallback.enabled !== 'boolean') {
|
|
833
|
-
throw new Error('Recipe agent.refusalHandling.primarySummaryFallback.enabled must be a boolean.');
|
|
834
|
-
}
|
|
835
|
-
if (
|
|
836
|
-
fallback.maxNewSummaries !== undefined &&
|
|
837
|
-
(
|
|
838
|
-
typeof fallback.maxNewSummaries !== 'number' ||
|
|
839
|
-
!Number.isSafeInteger(fallback.maxNewSummaries) ||
|
|
840
|
-
fallback.maxNewSummaries < 0
|
|
841
|
-
)
|
|
842
|
-
) {
|
|
843
|
-
throw new Error('Recipe agent.refusalHandling.primarySummaryFallback.maxNewSummaries must be a non-negative safe integer.');
|
|
844
|
-
}
|
|
845
|
-
if (
|
|
846
|
-
fallback.requestBudgetTokens !== undefined &&
|
|
847
|
-
(
|
|
848
|
-
typeof fallback.requestBudgetTokens !== 'number' ||
|
|
849
|
-
!Number.isSafeInteger(fallback.requestBudgetTokens) ||
|
|
850
|
-
fallback.requestBudgetTokens <= 0
|
|
851
|
-
)
|
|
852
|
-
) {
|
|
853
|
-
throw new Error('Recipe agent.refusalHandling.primarySummaryFallback.requestBudgetTokens must be a positive safe integer.');
|
|
854
|
-
}
|
|
821
|
+
if (refusalHandling && Object.hasOwn(refusalHandling, 'primarySummaryFallback')) {
|
|
822
|
+
throw new Error('Recipe agent.refusalHandling.primarySummaryFallback was removed and is unsupported.');
|
|
855
823
|
}
|
|
856
824
|
|
|
857
825
|
// Validate mcpServers entries if present
|
|
@@ -98,11 +98,6 @@ describe('framework FKM composition', () => {
|
|
|
98
98
|
sameRoundThinkTextPolicy: 'private',
|
|
99
99
|
refusalHandling: {
|
|
100
100
|
autoRewind: true,
|
|
101
|
-
primarySummaryFallback: {
|
|
102
|
-
enabled: true,
|
|
103
|
-
maxNewSummaries: 4,
|
|
104
|
-
requestBudgetTokens: 216_000,
|
|
105
|
-
},
|
|
106
101
|
},
|
|
107
102
|
strategy: {
|
|
108
103
|
type: 'autobiographical',
|
|
@@ -118,10 +113,8 @@ describe('framework FKM composition', () => {
|
|
|
118
113
|
expect(reloaded).not.toBeNull();
|
|
119
114
|
|
|
120
115
|
expect(reloaded!.agent.sameRoundThinkTextPolicy).toBe('private');
|
|
121
|
-
expect(reloaded!.agent.refusalHandling
|
|
122
|
-
|
|
123
|
-
maxNewSummaries: 4,
|
|
124
|
-
requestBudgetTokens: 216_000,
|
|
116
|
+
expect(reloaded!.agent.refusalHandling).toEqual({
|
|
117
|
+
autoRewind: true,
|
|
125
118
|
});
|
|
126
119
|
expect(reloaded!.agent.strategy?.compressionRefusalCurveFallbacks).toBe(2);
|
|
127
120
|
expect(reloaded!.agent.strategy?.compressionContextBudgetTokens).toBe(19_000);
|
|
@@ -133,10 +126,8 @@ describe('framework FKM composition', () => {
|
|
|
133
126
|
|
|
134
127
|
const agentConfig = buildFrameworkAgentConfig(reloaded!, 'agent', 'model', runtimeStrategy);
|
|
135
128
|
expect(agentConfig.sameRoundThinkTextPolicy).toBe('private');
|
|
136
|
-
expect(agentConfig.refusalHandling
|
|
137
|
-
|
|
138
|
-
maxNewSummaries: 4,
|
|
139
|
-
requestBudgetTokens: 216_000,
|
|
129
|
+
expect(agentConfig.refusalHandling).toEqual({
|
|
130
|
+
autoRewind: true,
|
|
140
131
|
});
|
|
141
132
|
expect((agentConfig.providerParams as Record<string, unknown>).service_tier).toBe('priority');
|
|
142
133
|
expect(Object.keys(agentConfig.providerParams as Record<string, unknown>)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { describe, expect, test } from 'bun:test';
|
|
2
|
+
import { validateRecipe } from '../src/recipe.js';
|
|
3
|
+
|
|
4
|
+
function recipe(refusalHandling?: Record<string, unknown>) {
|
|
5
|
+
return {
|
|
6
|
+
name: 'primary-summary-fallback-rejection-test',
|
|
7
|
+
agent: {
|
|
8
|
+
systemPrompt: 'sys',
|
|
9
|
+
refusalHandling,
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
describe('recipe primarySummaryFallback removal', () => {
|
|
15
|
+
test('rejects the removed primarySummaryFallback setting', () => {
|
|
16
|
+
expect(() => validateRecipe(recipe({
|
|
17
|
+
primarySummaryFallback: {
|
|
18
|
+
enabled: true,
|
|
19
|
+
maxNewSummaries: 4,
|
|
20
|
+
requestBudgetTokens: 216_000,
|
|
21
|
+
},
|
|
22
|
+
}))).toThrow(/primarySummaryFallback was removed and is unsupported/);
|
|
23
|
+
});
|
|
24
|
+
});
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { describe, expect, test } from 'bun:test';
|
|
2
|
-
import { validateRecipe } from '../src/recipe.js';
|
|
3
|
-
|
|
4
|
-
function recipe(primarySummaryFallback?: Record<string, unknown>) {
|
|
5
|
-
return {
|
|
6
|
-
name: 'primary-summary-fallback-test',
|
|
7
|
-
agent: {
|
|
8
|
-
systemPrompt: 'sys',
|
|
9
|
-
refusalHandling: primarySummaryFallback
|
|
10
|
-
? { primarySummaryFallback }
|
|
11
|
-
: undefined,
|
|
12
|
-
},
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
describe('recipe primary summary fallback validation', () => {
|
|
17
|
-
test('leaves the fallback disabled by default when omitted', () => {
|
|
18
|
-
const parsed = validateRecipe(recipe());
|
|
19
|
-
expect(parsed.agent.refusalHandling?.primarySummaryFallback).toBeUndefined();
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
test('preserves valid fallback settings', () => {
|
|
23
|
-
const parsed = validateRecipe(recipe({
|
|
24
|
-
enabled: true,
|
|
25
|
-
maxNewSummaries: 4,
|
|
26
|
-
requestBudgetTokens: 216_000,
|
|
27
|
-
}));
|
|
28
|
-
expect(parsed.agent.refusalHandling?.primarySummaryFallback).toEqual({
|
|
29
|
-
enabled: true,
|
|
30
|
-
maxNewSummaries: 4,
|
|
31
|
-
requestBudgetTokens: 216_000,
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
test('rejects malformed fallback settings', () => {
|
|
36
|
-
expect(() => validateRecipe(recipe({ enabled: 'yes' }))).toThrow(/primarySummaryFallback\.enabled/);
|
|
37
|
-
expect(() => validateRecipe(recipe({ maxNewSummaries: -1 }))).toThrow(/maxNewSummaries/);
|
|
38
|
-
expect(() => validateRecipe(recipe({ requestBudgetTokens: 0 }))).toThrow(/requestBudgetTokens/);
|
|
39
|
-
});
|
|
40
|
-
});
|