@botbotgo/agent-harness 0.0.63 → 0.0.65
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/README.md +11 -0
- package/README.zh.md +3 -0
- package/dist/config/agents/direct.yaml +3 -0
- package/dist/config/agents/orchestra.yaml +3 -0
- package/dist/config/runtime-memory.yaml +65 -0
- package/dist/contracts/types.d.ts +1 -0
- package/dist/init-project.js +32 -0
- package/dist/package-version.d.ts +1 -1
- package/dist/package-version.js +1 -1
- package/dist/runtime/harness.d.ts +2 -0
- package/dist/runtime/harness.js +14 -8
- package/dist/workspace/agent-binding-compiler.js +20 -1
- package/dist/workspace/object-loader.js +6 -0
- package/dist/workspace/support/index.d.ts +1 -1
- package/dist/workspace/support/index.js +1 -1
- package/dist/workspace/support/workspace-ref-utils.d.ts +1 -0
- package/dist/workspace/support/workspace-ref-utils.js +11 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -68,6 +68,8 @@ Boundary documents live in:
|
|
|
68
68
|
- `docs/upstream-feature-matrix.md`
|
|
69
69
|
- `docs/product-boundary.md`
|
|
70
70
|
- `docs/feature-checklist.md`
|
|
71
|
+
- `docs/long-term-memory.md`
|
|
72
|
+
- `docs/app-task-pattern.md`
|
|
71
73
|
|
|
72
74
|
## Why This Exists
|
|
73
75
|
|
|
@@ -109,6 +111,7 @@ your-workspace/
|
|
|
109
111
|
embedding-models.yaml
|
|
110
112
|
vector-stores.yaml
|
|
111
113
|
stores.yaml
|
|
114
|
+
runtime-memory.yaml
|
|
112
115
|
backends.yaml
|
|
113
116
|
tools.yaml
|
|
114
117
|
mcp.yaml
|
|
@@ -330,6 +333,7 @@ Core workspace files:
|
|
|
330
333
|
- `config/embedding-models.yaml`
|
|
331
334
|
- `config/vector-stores.yaml`
|
|
332
335
|
- `config/stores.yaml`
|
|
336
|
+
- `config/runtime-memory.yaml`
|
|
333
337
|
- `config/backends.yaml`
|
|
334
338
|
- `config/tools.yaml`
|
|
335
339
|
- `config/mcp.yaml`
|
|
@@ -437,6 +441,12 @@ spec:
|
|
|
437
441
|
path: checkpoints.sqlite
|
|
438
442
|
```
|
|
439
443
|
|
|
444
|
+
### `config/runtime-memory.yaml`
|
|
445
|
+
|
|
446
|
+
Use this singleton file for runtime-owned durable long-term memory defaults.
|
|
447
|
+
|
|
448
|
+
Keep bootstrap context in `config/agent-context.md`. Keep resumable execution state in the checkpointer. Use `RuntimeMemory` for durable memory policy and retrieval defaults.
|
|
449
|
+
|
|
440
450
|
### `config/backends.yaml`
|
|
441
451
|
|
|
442
452
|
Use reusable DeepAgents backend presets so filesystem and `/memories/*` topology stays in YAML:
|
|
@@ -551,6 +561,7 @@ For backend-specific options, prefer the upstream concept directly inside `spec.
|
|
|
551
561
|
- upstream LangChain v1 and DeepAgents concepts should be expressed as directly as possible in YAML
|
|
552
562
|
- when a feature can be expressed in YAML, prefer YAML over expanding the public API
|
|
553
563
|
- recovery, approvals, threads, runs, and events are runtime concepts, not backend escape hatches
|
|
564
|
+
- application task centers should be built on the existing store plus runtime ids instead of expanding the public runtime contract
|
|
554
565
|
- new LangChain v1 or DeepAgents config should land in YAML mapping and tests before adding public runtime APIs
|
|
555
566
|
|
|
556
567
|
In short, the product model stays stable while the execution semantics remain upstream-owned.
|
package/README.zh.md
CHANGED
|
@@ -68,6 +68,8 @@
|
|
|
68
68
|
- `docs/upstream-feature-matrix.md`
|
|
69
69
|
- `docs/product-boundary.md`
|
|
70
70
|
- `docs/feature-checklist.md`
|
|
71
|
+
- `docs/long-term-memory.md`
|
|
72
|
+
- `docs/app-task-pattern.md`
|
|
71
73
|
|
|
72
74
|
## 为何需要它
|
|
73
75
|
|
|
@@ -551,6 +553,7 @@ spec:
|
|
|
551
553
|
- 应尽量在 YAML 中直接表达 LangChain v1 与 DeepAgents 的概念
|
|
552
554
|
- 能用 YAML 表达的能力,优先 YAML 而非扩张公共 API
|
|
553
555
|
- 恢复、审批、线程、运行与事件是运行时概念,不是后端逃生舱
|
|
556
|
+
- 应用里的 task center 应基于现有 store 与 runtime id 建模,而不是把 task 扩成公共运行时契约
|
|
554
557
|
- 新的 LangChain v1 或 DeepAgents 配置应先落在 YAML 映射与测试中,再考虑公共运行时 API
|
|
555
558
|
|
|
556
559
|
简言之:产品模型稳定,执行语义仍归上游。
|
|
@@ -44,6 +44,9 @@ spec:
|
|
|
44
44
|
# The default direct host keeps this enabled so middleware can use the same durable store surface as other hosts.
|
|
45
45
|
store:
|
|
46
46
|
ref: store/default
|
|
47
|
+
# agent-harness feature: workspace-level durable long-term memory defaults for this host profile.
|
|
48
|
+
runtimeMemory:
|
|
49
|
+
ref: runtime-memory/default
|
|
47
50
|
# Upstream execution feature: no declarative HITL tool routing by default.
|
|
48
51
|
interruptOn: {}
|
|
49
52
|
# Upstream execution feature: filesystem middleware settings for LangChain v1 agents.
|
|
@@ -54,6 +54,9 @@ spec:
|
|
|
54
54
|
# Other store kinds should flow through a custom runtime resolver instead of being claimed as built in.
|
|
55
55
|
store:
|
|
56
56
|
ref: store/default
|
|
57
|
+
# agent-harness feature: workspace-level durable long-term memory defaults for this host profile.
|
|
58
|
+
runtimeMemory:
|
|
59
|
+
ref: runtime-memory/default
|
|
57
60
|
# Upstream execution feature: backend config passed into the selected backend adapter.
|
|
58
61
|
# Prefer a reusable backend preset via `ref` so backend topology stays declarative and reusable in YAML.
|
|
59
62
|
# The default preset keeps DeepAgent execution semantics upstream-owned:
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# agent-harness feature: schema version for this declarative config object.
|
|
2
|
+
apiVersion: agent-harness/v1alpha1
|
|
3
|
+
# agent-harness feature: workspace-global durable long-term memory defaults.
|
|
4
|
+
# This object is harness-owned and defines the stable memory policy/config contract for the workspace.
|
|
5
|
+
# It is loaded automatically as a singleton and can also be referenced from agent execution config.
|
|
6
|
+
kind: RuntimeMemory
|
|
7
|
+
metadata:
|
|
8
|
+
# agent-harness feature: stable singleton name for the default runtime memory object.
|
|
9
|
+
name: default
|
|
10
|
+
spec:
|
|
11
|
+
# ======================
|
|
12
|
+
# agent-harness Features
|
|
13
|
+
# ======================
|
|
14
|
+
# agent-harness feature: enable or disable runtime-owned durable long-term memory for the workspace.
|
|
15
|
+
enabled: true
|
|
16
|
+
|
|
17
|
+
# agent-harness feature: primary durable store used for structured long-term memory records.
|
|
18
|
+
store:
|
|
19
|
+
ref: store/default
|
|
20
|
+
|
|
21
|
+
# agent-harness feature: optional semantic retrieval substrate for long-term memory recall.
|
|
22
|
+
vectorStore:
|
|
23
|
+
ref: vector-store/default
|
|
24
|
+
|
|
25
|
+
# agent-harness feature: default embedding model used with the configured vector store.
|
|
26
|
+
embeddingModel:
|
|
27
|
+
ref: embedding-model/default
|
|
28
|
+
|
|
29
|
+
# agent-harness feature: stable namespace roots used by the runtime memory policy layer.
|
|
30
|
+
namespaces:
|
|
31
|
+
users: memories/users
|
|
32
|
+
projects: memories/projects
|
|
33
|
+
threads: memories/threads
|
|
34
|
+
|
|
35
|
+
# agent-harness feature: retrieval defaults for selecting a bounded number of relevant memories per turn.
|
|
36
|
+
retrieval:
|
|
37
|
+
defaultTopK: 5
|
|
38
|
+
maxPromptMemories: 8
|
|
39
|
+
|
|
40
|
+
# agent-harness feature: selective write policy for durable long-term memory.
|
|
41
|
+
writePolicy:
|
|
42
|
+
mode: selective
|
|
43
|
+
allow:
|
|
44
|
+
- user_preferences
|
|
45
|
+
- project_facts
|
|
46
|
+
- confirmed_decisions
|
|
47
|
+
- reusable_summaries
|
|
48
|
+
deny:
|
|
49
|
+
- scratchpad
|
|
50
|
+
- transient_reasoning
|
|
51
|
+
- intermediate_results
|
|
52
|
+
|
|
53
|
+
# agent-harness feature: background consolidation and retention defaults for stored memories.
|
|
54
|
+
consolidation:
|
|
55
|
+
dedupe: true
|
|
56
|
+
mergeStrategy: replace_or_merge
|
|
57
|
+
decay:
|
|
58
|
+
enabled: true
|
|
59
|
+
maxAgeDays: 180
|
|
60
|
+
|
|
61
|
+
# agent-harness feature: lifecycle events that can trigger runtime memory digestion.
|
|
62
|
+
ingestion:
|
|
63
|
+
backgroundConsolidation: true
|
|
64
|
+
writeOnApprovalResolution: true
|
|
65
|
+
writeOnRunCompletion: true
|
|
@@ -204,6 +204,7 @@ export type CompiledAgentBinding = {
|
|
|
204
204
|
capabilities?: RuntimeCapabilities;
|
|
205
205
|
checkpointer?: Record<string, unknown> | boolean;
|
|
206
206
|
store?: Record<string, unknown>;
|
|
207
|
+
runtimeMemory?: Record<string, unknown>;
|
|
207
208
|
};
|
|
208
209
|
};
|
|
209
210
|
export type WorkspaceBundle = {
|
package/dist/init-project.js
CHANGED
|
@@ -131,6 +131,33 @@ spec:
|
|
|
131
131
|
kind: StoreBackend
|
|
132
132
|
`;
|
|
133
133
|
}
|
|
134
|
+
function renderRuntimeMemoryYaml() {
|
|
135
|
+
return `apiVersion: agent-harness/v1alpha1
|
|
136
|
+
kind: RuntimeMemory
|
|
137
|
+
metadata:
|
|
138
|
+
name: default
|
|
139
|
+
spec:
|
|
140
|
+
enabled: true
|
|
141
|
+
namespaces:
|
|
142
|
+
users: memories/users
|
|
143
|
+
projects: memories/projects
|
|
144
|
+
threads: memories/threads
|
|
145
|
+
retrieval:
|
|
146
|
+
defaultTopK: 5
|
|
147
|
+
maxPromptMemories: 8
|
|
148
|
+
writePolicy:
|
|
149
|
+
mode: selective
|
|
150
|
+
allow:
|
|
151
|
+
- user_preferences
|
|
152
|
+
- project_facts
|
|
153
|
+
- confirmed_decisions
|
|
154
|
+
- reusable_summaries
|
|
155
|
+
deny:
|
|
156
|
+
- scratchpad
|
|
157
|
+
- transient_reasoning
|
|
158
|
+
- intermediate_results
|
|
159
|
+
`;
|
|
160
|
+
}
|
|
134
161
|
function renderToolsYaml(options) {
|
|
135
162
|
if (!options.withWebSearch) {
|
|
136
163
|
return `apiVersion: agent-harness/v1alpha1
|
|
@@ -175,6 +202,8 @@ ${toolsBlock} skills:
|
|
|
175
202
|
${subagentsBlock} config:
|
|
176
203
|
backend:
|
|
177
204
|
ref: backend/default
|
|
205
|
+
runtimeMemory:
|
|
206
|
+
ref: runtime-memory/default
|
|
178
207
|
systemPrompt: ${prompt}${delegationLine}
|
|
179
208
|
`;
|
|
180
209
|
}
|
|
@@ -197,6 +226,8 @@ ${toolsBlock} skills:
|
|
|
197
226
|
config:
|
|
198
227
|
backend:
|
|
199
228
|
ref: backend/default
|
|
229
|
+
runtimeMemory:
|
|
230
|
+
ref: runtime-memory/default
|
|
200
231
|
systemPrompt: ${prompt}
|
|
201
232
|
`;
|
|
202
233
|
}
|
|
@@ -270,6 +301,7 @@ export async function initProject(projectRoot, projectName, options = {}) {
|
|
|
270
301
|
["config/workspace.yaml", renderWorkspaceYaml()],
|
|
271
302
|
["config/agent-context.md", renderAgentContext(resolved)],
|
|
272
303
|
["config/models.yaml", renderModelsYaml(resolved)],
|
|
304
|
+
["config/runtime-memory.yaml", renderRuntimeMemoryYaml()],
|
|
273
305
|
["config/backends.yaml", renderBackendsYaml()],
|
|
274
306
|
["config/tools.yaml", renderToolsYaml(resolved)],
|
|
275
307
|
["config/agents/research.yaml", renderResearchAgentYaml(resolved)],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const AGENT_HARNESS_VERSION = "0.0.
|
|
1
|
+
export declare const AGENT_HARNESS_VERSION = "0.0.64";
|
package/dist/package-version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const AGENT_HARNESS_VERSION = "0.0.
|
|
1
|
+
export const AGENT_HARNESS_VERSION = "0.0.64";
|
|
@@ -14,6 +14,7 @@ export declare class AgentHarnessRuntime {
|
|
|
14
14
|
private readonly embeddingModels;
|
|
15
15
|
private readonly vectorStores;
|
|
16
16
|
private readonly defaultStore;
|
|
17
|
+
private readonly runtimeMemoryStore;
|
|
17
18
|
private readonly routingSystemPrompt?;
|
|
18
19
|
private readonly routingRules;
|
|
19
20
|
private readonly routingDefaultAgentId?;
|
|
@@ -35,6 +36,7 @@ export declare class AgentHarnessRuntime {
|
|
|
35
36
|
private buildRoutingInput;
|
|
36
37
|
private resolveSelectedAgentId;
|
|
37
38
|
private resolveStore;
|
|
39
|
+
private resolveStoreFromConfig;
|
|
38
40
|
private resolveEmbeddingModel;
|
|
39
41
|
private resolveVectorStore;
|
|
40
42
|
constructor(workspace: WorkspaceBundle, runtimeAdapterOptions?: RuntimeAdapterOptions);
|
package/dist/runtime/harness.js
CHANGED
|
@@ -29,6 +29,7 @@ export class AgentHarnessRuntime {
|
|
|
29
29
|
embeddingModels = new Map();
|
|
30
30
|
vectorStores = new Map();
|
|
31
31
|
defaultStore;
|
|
32
|
+
runtimeMemoryStore;
|
|
32
33
|
routingSystemPrompt;
|
|
33
34
|
routingRules;
|
|
34
35
|
routingDefaultAgentId;
|
|
@@ -98,18 +99,18 @@ export class AgentHarnessRuntime {
|
|
|
98
99
|
}
|
|
99
100
|
resolveStore(binding) {
|
|
100
101
|
const storeConfig = binding ? getBindingStoreConfig(binding) : undefined;
|
|
102
|
+
return this.resolveStoreFromConfig(storeConfig, binding?.harnessRuntime.runRoot ?? this.defaultRunRoot()) ?? this.defaultStore;
|
|
103
|
+
}
|
|
104
|
+
resolveStoreFromConfig(storeConfig, runRoot) {
|
|
101
105
|
const cacheKey = storeConfig ? JSON.stringify(storeConfig) : undefined;
|
|
102
|
-
if (!storeConfig) {
|
|
103
|
-
return
|
|
104
|
-
}
|
|
105
|
-
if (!cacheKey) {
|
|
106
|
-
return this.defaultStore;
|
|
106
|
+
if (!storeConfig || !cacheKey) {
|
|
107
|
+
return undefined;
|
|
107
108
|
}
|
|
108
109
|
const existing = this.stores.get(cacheKey);
|
|
109
110
|
if (existing) {
|
|
110
111
|
return existing;
|
|
111
112
|
}
|
|
112
|
-
const created = createStoreForConfig(storeConfig,
|
|
113
|
+
const created = createStoreForConfig(storeConfig, runRoot);
|
|
113
114
|
this.stores.set(cacheKey, created);
|
|
114
115
|
return created;
|
|
115
116
|
}
|
|
@@ -142,7 +143,12 @@ export class AgentHarnessRuntime {
|
|
|
142
143
|
const runRoot = this.defaultRunRoot();
|
|
143
144
|
this.persistence = new FilePersistence(runRoot);
|
|
144
145
|
const defaultStoreConfig = this.listHostBindings()[0]?.harnessRuntime.store;
|
|
145
|
-
this.defaultStore =
|
|
146
|
+
this.defaultStore = this.resolveStoreFromConfig(defaultStoreConfig, runRoot) ?? new FileBackedStore(`${runRoot}/store.json`);
|
|
147
|
+
const runtimeMemoryStoreConfig = typeof this.listHostBindings()[0]?.harnessRuntime.runtimeMemory?.store === "object" &&
|
|
148
|
+
this.listHostBindings()[0]?.harnessRuntime.runtimeMemory?.store
|
|
149
|
+
? this.listHostBindings()[0]?.harnessRuntime.runtimeMemory?.store
|
|
150
|
+
: undefined;
|
|
151
|
+
this.runtimeMemoryStore = this.resolveStoreFromConfig(runtimeMemoryStoreConfig, runRoot) ?? this.defaultStore;
|
|
146
152
|
this.resolvedRuntimeAdapterOptions = {
|
|
147
153
|
...runtimeAdapterOptions,
|
|
148
154
|
toolResolver: runtimeAdapterOptions.toolResolver ??
|
|
@@ -177,7 +183,7 @@ export class AgentHarnessRuntime {
|
|
|
177
183
|
this.routingRules = getRoutingRules(workspace.refs);
|
|
178
184
|
this.routingDefaultAgentId = getRoutingDefaultAgentId(workspace.refs);
|
|
179
185
|
this.modelRoutingEnabled = isModelRoutingEnabled(workspace.refs);
|
|
180
|
-
this.threadMemorySync = new ThreadMemorySync(this.persistence, this.
|
|
186
|
+
this.threadMemorySync = new ThreadMemorySync(this.persistence, this.runtimeMemoryStore);
|
|
181
187
|
this.unregisterThreadMemorySync = this.eventBus.registerProjection(this.threadMemorySync);
|
|
182
188
|
const checkpointMaintenanceConfig = readCheckpointMaintenanceConfig(workspace);
|
|
183
189
|
this.checkpointMaintenance = checkpointMaintenanceConfig
|
|
@@ -3,7 +3,7 @@ import { getSkillInheritancePolicy, resolveToolTargets } from "../extensions.js"
|
|
|
3
3
|
import { compileModel, compileTool } from "./resource-compilers.js";
|
|
4
4
|
import { inferAgentCapabilities } from "./support/agent-capabilities.js";
|
|
5
5
|
import { discoverSkillPaths } from "./support/discovery.js";
|
|
6
|
-
import { compileAgentMemories, getRuntimeDefaults, getWorkspaceObject, resolvePromptValue, resolveRefId } from "./support/workspace-ref-utils.js";
|
|
6
|
+
import { compileAgentMemories, getRuntimeDefaults, getRuntimeMemoryDefaults, getWorkspaceObject, resolvePromptValue, resolveRefId } from "./support/workspace-ref-utils.js";
|
|
7
7
|
const WORKSPACE_BOUNDARY_GUIDANCE = "Keep repository and file exploration bounded to the current workspace root unless the user explicitly asks for broader host or filesystem access. " +
|
|
8
8
|
"Do not inspect absolute paths outside the workspace, system directories, or unrelated repos by default. " +
|
|
9
9
|
"Prefer workspace-local tools, relative paths, and the current repository checkout when analyzing code.";
|
|
@@ -215,6 +215,23 @@ function resolveCheckpointerConfig(agent, refs) {
|
|
|
215
215
|
}
|
|
216
216
|
return { config: inlineAgentCheckpointer };
|
|
217
217
|
}
|
|
218
|
+
function resolveRuntimeMemoryConfig(agent, refs) {
|
|
219
|
+
const inlineRuntimeMemory = typeof agent.deepAgentConfig?.runtimeMemory === "object" && agent.deepAgentConfig.runtimeMemory
|
|
220
|
+
? agent.deepAgentConfig.runtimeMemory
|
|
221
|
+
: typeof agent.langchainAgentConfig?.runtimeMemory === "object" && agent.langchainAgentConfig.runtimeMemory
|
|
222
|
+
? agent.langchainAgentConfig.runtimeMemory
|
|
223
|
+
: undefined;
|
|
224
|
+
if (inlineRuntimeMemory) {
|
|
225
|
+
if (isRefConfig(inlineRuntimeMemory)) {
|
|
226
|
+
return {
|
|
227
|
+
config: materializeWorkspaceObjectConfig(refs, inlineRuntimeMemory.ref, ["runtime-memory"], `Agent ${agent.id} runtimeMemory`),
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
return { config: inlineRuntimeMemory };
|
|
231
|
+
}
|
|
232
|
+
const runtimeMemoryDefaults = getRuntimeMemoryDefaults(refs);
|
|
233
|
+
return runtimeMemoryDefaults ? { config: runtimeMemoryDefaults } : undefined;
|
|
234
|
+
}
|
|
218
235
|
export function compileBinding(workspaceRoot, agent, agents, referencedSubagentIds, refs, models, tools) {
|
|
219
236
|
const internalSubagent = referencedSubagentIds.has(agent.id);
|
|
220
237
|
const runtimeDefaults = getRuntimeDefaults(refs);
|
|
@@ -224,6 +241,7 @@ export function compileBinding(workspaceRoot, agent, agents, referencedSubagentI
|
|
|
224
241
|
const backend = resolveBackendConfig(agent, refs);
|
|
225
242
|
const store = resolveStoreConfig(agent, refs);
|
|
226
243
|
const checkpointer = resolveCheckpointerConfig(agent, refs);
|
|
244
|
+
const runtimeMemory = resolveRuntimeMemoryConfig(agent, refs);
|
|
227
245
|
const runRoot = typeof agent.runRoot === "string" && agent.runRoot.trim().length > 0
|
|
228
246
|
? path.resolve(workspaceRoot, agent.runRoot)
|
|
229
247
|
: typeof runtimeDefaults?.runRoot === "string" && runtimeDefaults.runRoot.trim().length > 0
|
|
@@ -248,6 +266,7 @@ export function compileBinding(workspaceRoot, agent, agents, referencedSubagentI
|
|
|
248
266
|
capabilities: inferAgentCapabilities(agent),
|
|
249
267
|
...(checkpointer ? { checkpointer: checkpointer.config } : {}),
|
|
250
268
|
...(store ? { store: store.config } : {}),
|
|
269
|
+
...(runtimeMemory ? { runtimeMemory: runtimeMemory.config } : {}),
|
|
251
270
|
},
|
|
252
271
|
};
|
|
253
272
|
if (agent.executionMode !== "deepagent") {
|
|
@@ -130,6 +130,8 @@ function normalizeKind(kind) {
|
|
|
130
130
|
return "skill";
|
|
131
131
|
case "Runtime":
|
|
132
132
|
return "runtime";
|
|
133
|
+
case "RuntimeMemory":
|
|
134
|
+
return "runtime-memory";
|
|
133
135
|
case "Prompt":
|
|
134
136
|
return "prompt";
|
|
135
137
|
case "McpServer":
|
|
@@ -303,6 +305,7 @@ function readLangchainAgentConfig(item) {
|
|
|
303
305
|
"middleware",
|
|
304
306
|
"backend",
|
|
305
307
|
"store",
|
|
308
|
+
"runtimeMemory",
|
|
306
309
|
"taskDescription",
|
|
307
310
|
"generalPurposeAgent",
|
|
308
311
|
"filesystem",
|
|
@@ -310,6 +313,7 @@ function readLangchainAgentConfig(item) {
|
|
|
310
313
|
return {
|
|
311
314
|
...readSharedAgentConfig(config),
|
|
312
315
|
...(typeof config.store === "object" && config.store ? { store: config.store } : {}),
|
|
316
|
+
...(typeof config.runtimeMemory === "object" && config.runtimeMemory ? { runtimeMemory: config.runtimeMemory } : {}),
|
|
313
317
|
...(typeof config.taskDescription === "string" && config.taskDescription.trim() ? { taskDescription: config.taskDescription } : {}),
|
|
314
318
|
...(typeof config.generalPurposeAgent === "boolean" ? { generalPurposeAgent: config.generalPurposeAgent } : {}),
|
|
315
319
|
...(passthrough ? { passthrough } : {}),
|
|
@@ -329,6 +333,7 @@ function readDeepAgentConfig(item) {
|
|
|
329
333
|
"middleware",
|
|
330
334
|
"backend",
|
|
331
335
|
"store",
|
|
336
|
+
"runtimeMemory",
|
|
332
337
|
"taskDescription",
|
|
333
338
|
"generalPurposeAgent",
|
|
334
339
|
"filesystem",
|
|
@@ -337,6 +342,7 @@ function readDeepAgentConfig(item) {
|
|
|
337
342
|
...readSharedAgentConfig(config),
|
|
338
343
|
...(typeof config.backend === "object" && config.backend ? { backend: config.backend } : {}),
|
|
339
344
|
...(typeof config.store === "object" && config.store ? { store: config.store } : {}),
|
|
345
|
+
...(typeof config.runtimeMemory === "object" && config.runtimeMemory ? { runtimeMemory: config.runtimeMemory } : {}),
|
|
340
346
|
...(typeof config.taskDescription === "string" && config.taskDescription.trim() ? { taskDescription: config.taskDescription } : {}),
|
|
341
347
|
...(typeof config.generalPurposeAgent === "boolean" ? { generalPurposeAgent: config.generalPurposeAgent } : {}),
|
|
342
348
|
...(passthrough ? { passthrough } : {}),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { collectAgentDiscoverySourceRefs, collectToolSourceRefs } from "./source-collectors.js";
|
|
2
|
-
export { compileAgentMemories, getRuntimeDefaults, getWorkspaceObject, resolvePathList, resolvePromptValue, resolveRefId, } from "./workspace-ref-utils.js";
|
|
2
|
+
export { compileAgentMemories, getRuntimeDefaults, getRuntimeMemoryDefaults, getWorkspaceObject, resolvePathList, resolvePromptValue, resolveRefId, } from "./workspace-ref-utils.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { collectAgentDiscoverySourceRefs, collectToolSourceRefs } from "./source-collectors.js";
|
|
2
|
-
export { compileAgentMemories, getRuntimeDefaults, getWorkspaceObject, resolvePathList, resolvePromptValue, resolveRefId, } from "./workspace-ref-utils.js";
|
|
2
|
+
export { compileAgentMemories, getRuntimeDefaults, getRuntimeMemoryDefaults, getWorkspaceObject, resolvePathList, resolvePromptValue, resolveRefId, } from "./workspace-ref-utils.js";
|
|
@@ -22,6 +22,7 @@ export type ConcurrencyConfig = {
|
|
|
22
22
|
};
|
|
23
23
|
export declare function getWorkspaceObject(refs: Map<string, WorkspaceObject | ParsedAgentObject>, ref: string | undefined): WorkspaceObject | undefined;
|
|
24
24
|
export declare function getRuntimeDefaults(refs: Map<string, WorkspaceObject | ParsedAgentObject>): Record<string, unknown> | undefined;
|
|
25
|
+
export declare function getRuntimeMemoryDefaults(refs: Map<string, WorkspaceObject | ParsedAgentObject>): Record<string, unknown> | undefined;
|
|
25
26
|
export declare function getRecoveryConfig(refs: Map<string, WorkspaceObject | ParsedAgentObject>): RecoveryConfig;
|
|
26
27
|
export declare function getConcurrencyConfig(refs: Map<string, WorkspaceObject | ParsedAgentObject>): ConcurrencyConfig;
|
|
27
28
|
export declare function getRoutingSystemPrompt(refs: Map<string, WorkspaceObject | ParsedAgentObject>): string | undefined;
|
|
@@ -25,6 +25,16 @@ export function getRuntimeDefaults(refs) {
|
|
|
25
25
|
}
|
|
26
26
|
return runtimes[0].value;
|
|
27
27
|
}
|
|
28
|
+
export function getRuntimeMemoryDefaults(refs) {
|
|
29
|
+
const runtimeMemories = Array.from(refs.values()).filter((object) => !("executionMode" in object) && object.kind === "runtime-memory");
|
|
30
|
+
if (runtimeMemories.length === 0) {
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
if (runtimeMemories.length > 1) {
|
|
34
|
+
throw new Error(`Expected at most one RuntimeMemory object, found ${runtimeMemories.length}`);
|
|
35
|
+
}
|
|
36
|
+
return runtimeMemories[0].value;
|
|
37
|
+
}
|
|
28
38
|
export function getRecoveryConfig(refs) {
|
|
29
39
|
const runtimeDefaults = getRuntimeDefaults(refs);
|
|
30
40
|
const recovery = typeof runtimeDefaults?.recovery === "object" && runtimeDefaults.recovery
|
|
@@ -169,7 +179,7 @@ export function resolveRefId(ref) {
|
|
|
169
179
|
if (rest.length === 0) {
|
|
170
180
|
return ref;
|
|
171
181
|
}
|
|
172
|
-
if (["agent", "embedding-model", "mcp", "model", "object", "prompt", "runtime", "tool", "vector-store"].includes(namespace)) {
|
|
182
|
+
if (["agent", "embedding-model", "mcp", "model", "object", "prompt", "runtime", "runtime-memory", "tool", "vector-store"].includes(namespace)) {
|
|
173
183
|
return rest.join("/");
|
|
174
184
|
}
|
|
175
185
|
return ref;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@botbotgo/agent-harness",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.65",
|
|
4
4
|
"description": "Workspace runtime for multi-agent applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "npm@10.9.2",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"scripts": {
|
|
54
54
|
"build": "rm -rf dist tsconfig.tsbuildinfo && tsc -p tsconfig.json && cp -R config dist/",
|
|
55
55
|
"check": "tsc -p tsconfig.json --noEmit",
|
|
56
|
-
"test": "vitest run test/hello-file.test.ts test/public-api.test.ts test/resource-optional-provider.test.ts test/resource-isolation.test.ts test/stock-research-app-load-harness.test.ts test/stock-research-app-run.test.ts test/stock-research-app-config.test.ts test/release-workflow.test.ts test/release-version.test.ts test/gitignore.test.ts test/package-lock.test.ts test/readme.test.ts test/product-boundary-docs.test.ts test/docs-site.test.ts test/runtime-adapter-regressions.test.ts test/runtime-capabilities.test.ts test/runtime-recovery.test.ts test/tool-extension-gaps.test.ts test/checkpoint-maintenance.test.ts test/llamaindex-dependency-compat.test.ts test/skill-standard.test.ts test/routing-config.test.ts test/workspace-compat-regressions.test.ts test/upstream-compat-regressions.test.ts test/yaml-format.test.ts test/config-secrets.test.ts test/init-command.test.ts",
|
|
56
|
+
"test": "vitest run test/hello-file.test.ts test/public-api.test.ts test/resource-optional-provider.test.ts test/resource-isolation.test.ts test/stock-research-app-load-harness.test.ts test/stock-research-app-run.test.ts test/stock-research-app-config.test.ts test/release-workflow.test.ts test/release-version.test.ts test/gitignore.test.ts test/package-lock.test.ts test/readme.test.ts test/product-boundary-docs.test.ts test/long-term-memory-docs.test.ts test/docs-site.test.ts test/runtime-adapter-regressions.test.ts test/runtime-capabilities.test.ts test/runtime-recovery.test.ts test/tool-extension-gaps.test.ts test/checkpoint-maintenance.test.ts test/llamaindex-dependency-compat.test.ts test/skill-standard.test.ts test/routing-config.test.ts test/workspace-compat-regressions.test.ts test/upstream-compat-regressions.test.ts test/yaml-format.test.ts test/config-secrets.test.ts test/init-command.test.ts",
|
|
57
57
|
"test:real-providers": "vitest run test/real-provider-harness.test.ts",
|
|
58
58
|
"release:prepare": "npm version patch --no-git-tag-version && node ./scripts/sync-example-version.mjs",
|
|
59
59
|
"release:pack": "npm pack --dry-run",
|