@botbotgo/agent-harness 0.0.44 → 0.0.45

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 CHANGED
@@ -207,6 +207,8 @@ Core workspace files:
207
207
  - `config/workspace.yaml`
208
208
  - `config/agent-context.md`
209
209
  - `config/models.yaml`
210
+ - `config/embedding-models.yaml`
211
+ - `config/vector-stores.yaml`
210
212
  - `config/stores.yaml`
211
213
  - `config/tools.yaml`
212
214
  - `config/mcp.yaml`
@@ -216,6 +218,13 @@ Core workspace files:
216
218
  - `resources/tools/`
217
219
  - `resources/skills/`
218
220
 
221
+ Use Kubernetes-style YAML:
222
+
223
+ - collection files use `apiVersion`, plural `kind`, and `spec: []`
224
+ - single-object files use `apiVersion`, singular `kind`, `metadata`, and `spec`
225
+
226
+ Use distinct names for named objects such as models, stores, checkpointers, tools, and MCP servers.
227
+
219
228
  ### `config/workspace.yaml`
220
229
 
221
230
  Use this file for runtime-level policy:
@@ -239,6 +248,43 @@ Use this file for shared startup context loaded into agents at construction time
239
248
 
240
249
  Put stable project context here. Do not use it as mutable long-term memory.
241
250
 
251
+ ### `config/models.yaml`
252
+
253
+ Use one file for multiple named models:
254
+
255
+ ```yaml
256
+ apiVersion: agent-harness/v1alpha1
257
+ kind: Models
258
+ spec:
259
+ - name: default
260
+ provider: openai
261
+ model: gpt-4.1
262
+ - name: planner
263
+ provider: openai
264
+ model: gpt-4.1-mini
265
+ ```
266
+
267
+ These load as `model/default` and `model/planner`.
268
+
269
+ ### `config/stores.yaml`
270
+
271
+ Use one file for named persistence presets:
272
+
273
+ ```yaml
274
+ apiVersion: agent-harness/v1alpha1
275
+ kind: Stores
276
+ spec:
277
+ - kind: Store
278
+ name: default
279
+ storeKind: FileStore
280
+ path: store.json
281
+ - kind: Checkpointer
282
+ name: default
283
+ checkpointerKind: MemorySaver
284
+ ```
285
+
286
+ These load as `store/default` and `checkpointer/default`.
287
+
242
288
  ### `config/agents/*.yaml`
243
289
 
244
290
  Prefer the generic agent form and declare the current execution backend explicitly:
@@ -0,0 +1,28 @@
1
+ # agent-harness feature: schema version for this declarative config object.
2
+ apiVersion: agent-harness/v1alpha1
3
+ # agent-harness feature: object type for named embedding-model presets.
4
+ kind: EmbeddingModels
5
+ spec:
6
+ # agent-harness feature: named embedding model entry used by refs such as `embedding-model/default`.
7
+ - name: default
8
+ # ====================
9
+ # LangChain v1 Features
10
+ # ====================
11
+ # LangChain aligned feature: provider family or integration namespace for an embeddings implementation.
12
+ provider: ollama
13
+ # LangChain aligned feature: concrete embedding model identifier passed to the provider integration.
14
+ model: nomic-embed-text
15
+ # LangChain aligned feature: provider-specific initialization options for embeddings.
16
+ baseUrl: https://ollama-rtx-4070.easynet.world/
17
+
18
+ # ===================
19
+ # DeepAgents Features
20
+ # ===================
21
+ # DeepAgents does not define a separate embeddings abstraction. Embedding models are consumed indirectly
22
+ # by retrieval tools that a DeepAgent may call.
23
+
24
+ # ======================
25
+ # agent-harness Features
26
+ # ======================
27
+ # This object is packaged and referenced through retrieval-oriented workspace tools such as the RAG index builder
28
+ # and query tool, not through `agent.modelRef`.
@@ -1,20 +1,5 @@
1
1
  # agent-harness feature: schema version for reusable MCP server objects.
2
2
  apiVersion: agent-harness/v1alpha1
3
- # This first-layer catalog is the default place to register reusable McpServer objects and MCP-backed Tool objects.
4
- # Examples:
5
- # items:
6
- # - kind: McpServer
7
- # metadata:
8
- # name: browser
9
- # spec:
10
- # command: node
11
- # args: ["./mcp-browser-server.mjs"]
12
- #
13
- # - kind: Tool
14
- # metadata:
15
- # name: browser_navigate
16
- # spec:
17
- # mcp:
18
- # serverRef: mcp/browser
19
- # tool: navigate
20
- items: []
3
+ # agent-harness feature: object type for named reusable MCP server and MCP-backed tool presets.
4
+ kind: McpServers
5
+ spec: []
@@ -4,26 +4,26 @@ apiVersion: agent-harness/v1alpha1
4
4
  kind: Models
5
5
  spec:
6
6
  - name: default
7
- # ====================
8
- # LangChain v1 Features
9
- # ====================
10
- # LangChain aligned feature: provider family or integration namespace.
11
- # Common options in this harness today include:
12
- # - `ollama`
13
- # - `openai`
14
- # - `openai-compatible`
15
- # - `anthropic`
16
- # - `google` / `google-genai` / `gemini`
17
- # The runtime adapter uses this to select the concrete LangChain chat model implementation.
7
+ # ====================
8
+ # LangChain v1 Features
9
+ # ====================
10
+ # LangChain aligned feature: provider family or integration namespace.
11
+ # Common options in this harness today include:
12
+ # - `ollama`
13
+ # - `openai`
14
+ # - `openai-compatible`
15
+ # - `anthropic`
16
+ # - `google` / `google-genai` / `gemini`
17
+ # The runtime adapter uses this to select the concrete LangChain chat model implementation.
18
18
  provider: ollama
19
- # LangChain aligned feature: concrete model identifier passed to the selected provider integration.
20
- # Example values depend on `provider`, such as `gpt-oss:latest` for `ollama`.
19
+ # LangChain aligned feature: concrete model identifier passed to the selected provider integration.
20
+ # Example values depend on `provider`, such as `gpt-oss:latest` for `ollama`.
21
21
  model: gpt-oss:latest
22
- # LangChain aligned feature: provider-specific initialization options.
23
- # Write these fields directly on the model object.
24
- # Common examples include `baseUrl`, `temperature`, and auth/client settings.
25
- # `baseUrl` configures the Ollama-compatible endpoint used by the model client.
26
- # For `openai-compatible`, `baseUrl` is normalized into the ChatOpenAI `configuration.baseURL` field.
22
+ # LangChain aligned feature: provider-specific initialization options.
23
+ # Write these fields directly on the model object.
24
+ # Common examples include `baseUrl`, `temperature`, and auth/client settings.
25
+ # `baseUrl` configures the Ollama-compatible endpoint used by the model client.
26
+ # For `openai-compatible`, `baseUrl` is normalized into the ChatOpenAI `configuration.baseURL` field.
27
27
  baseUrl: https://ollama-rtx-4070.easynet.world/
28
- # LangChain aligned feature: provider/model initialization option controlling sampling temperature.
28
+ # LangChain aligned feature: provider/model initialization option controlling sampling temperature.
29
29
  temperature: 0.2
@@ -1,19 +1,17 @@
1
1
  # agent-harness feature: schema version for reusable persistence presets.
2
2
  apiVersion: agent-harness/v1alpha1
3
- items:
3
+ # agent-harness feature: object type for named persistence presets.
4
+ kind: Stores
5
+ spec:
4
6
  # agent-harness feature: reusable store preset for agent backends that need a durable key-value store.
5
7
  - kind: Store
6
- metadata:
7
- name: default
8
- description: Default file-backed store preset for runtime-managed agent state.
9
- spec:
10
- storeKind: FileStore
11
- path: store.json
8
+ name: default
9
+ description: Default file-backed store preset for runtime-managed agent state.
10
+ storeKind: FileStore
11
+ path: store.json
12
12
 
13
13
  # agent-harness feature: reusable checkpointer preset for resumable execution state.
14
14
  - kind: Checkpointer
15
- metadata:
16
- name: default
17
- description: Default in-memory checkpointer preset for lightweight local development.
18
- spec:
19
- checkpointerKind: MemorySaver
15
+ name: default
16
+ description: Default in-memory checkpointer preset for lightweight local development.
17
+ checkpointerKind: MemorySaver
@@ -1,13 +1,5 @@
1
1
  # agent-harness feature: schema version for reusable tool objects.
2
2
  apiVersion: agent-harness/v1alpha1
3
- # This first-layer catalog is the default place to register reusable Tool objects that agents can reference.
4
- # Examples:
5
- # items:
6
- # - kind: Tool
7
- # metadata:
8
- # name: repo_search
9
- # description: Workspace-local repo search tool.
10
- # spec:
11
- # backend:
12
- # operation: repo_search
13
- items: []
3
+ # agent-harness feature: object type for named reusable tool presets.
4
+ kind: Tools
5
+ spec: []
@@ -0,0 +1,25 @@
1
+ # agent-harness feature: schema version for this declarative config object.
2
+ apiVersion: agent-harness/v1alpha1
3
+ # agent-harness feature: object type for named vector-store presets.
4
+ kind: VectorStores
5
+ spec:
6
+ # agent-harness feature: named vector store entry used by refs such as `vector-store/default`.
7
+ - name: default
8
+ # ====================
9
+ # LangChain v1 Features
10
+ # ====================
11
+ # LangChain aligned feature: concrete vector store implementation.
12
+ # The built-in runtime currently supports `LibSQLVectorStore` for SQLite/libSQL-backed vector retrieval.
13
+ storeKind: LibSQLVectorStore
14
+ # LangChain aligned feature: libSQL connection URL.
15
+ # Local SQLite files use the `file:` prefix.
16
+ url: file:.agent/vector-store.db
17
+ # LangChain aligned feature: target table and embedding column.
18
+ table: rag_chunks
19
+ column: embedding
20
+
21
+ # ======================
22
+ # agent-harness Features
23
+ # ======================
24
+ # Retrieval tools use this to resolve their default embeddings when indexing or querying this vector store.
25
+ embeddingModelRef: embedding-model/default
@@ -1 +1 @@
1
- export declare const AGENT_HARNESS_VERSION = "0.0.43";
1
+ export declare const AGENT_HARNESS_VERSION = "0.0.44";
@@ -1 +1 @@
1
- export const AGENT_HARNESS_VERSION = "0.0.43";
1
+ export const AGENT_HARNESS_VERSION = "0.0.44";
@@ -61,7 +61,7 @@ function toArray(value) {
61
61
  function asObject(value) {
62
62
  return typeof value === "object" && value ? value : undefined;
63
63
  }
64
- function normalizeNamedResourceSpec(document, kind) {
64
+ function normalizeCatalogSpec(document, options = {}) {
65
65
  const typed = asObject(document);
66
66
  const spec = typed?.spec;
67
67
  if (!Array.isArray(spec)) {
@@ -75,12 +75,15 @@ function normalizeNamedResourceSpec(document, kind) {
75
75
  : typeof item.name === "string" && item.name.trim()
76
76
  ? item.name
77
77
  : undefined;
78
- if (!id) {
78
+ const itemKind = typeof item.kind === "string" && item.kind.trim()
79
+ ? item.kind
80
+ : options.defaultKind;
81
+ if (!id || !itemKind) {
79
82
  return null;
80
83
  }
81
84
  return {
82
85
  ...item,
83
- kind,
86
+ kind: itemKind,
84
87
  id,
85
88
  };
86
89
  });
@@ -305,6 +308,21 @@ async function objectItemsFromDocument(document, sourcePath) {
305
308
  if (typeof document !== "object" || !document) {
306
309
  return [];
307
310
  }
311
+ const catalogKind = typeof document.kind === "string"
312
+ ? String(document.kind)
313
+ : undefined;
314
+ const catalogItems = catalogKind === "Models"
315
+ ? normalizeCatalogSpec(document, { defaultKind: "Model" })
316
+ : catalogKind === "Stores"
317
+ ? normalizeCatalogSpec(document)
318
+ : catalogKind === "Tools"
319
+ ? normalizeCatalogSpec(document, { defaultKind: "Tool" })
320
+ : catalogKind === "McpServers"
321
+ ? normalizeCatalogSpec(document)
322
+ : [];
323
+ if (catalogItems.length > 0) {
324
+ return catalogItems;
325
+ }
308
326
  const items = document.items;
309
327
  if (Array.isArray(items)) {
310
328
  const records = [];
@@ -497,15 +515,7 @@ async function readNamedModelItems(root) {
497
515
  }
498
516
  const parsedDocuments = parseAllDocuments(await readYamlOrJson(filePath));
499
517
  for (const parsedDocument of parsedDocuments) {
500
- const document = parsedDocument.toJSON();
501
- const catalogItems = normalizeNamedResourceSpec(document, "model");
502
- if (catalogItems.length > 0) {
503
- for (const item of catalogItems) {
504
- records.push({ item: normalizeYamlItem(item), sourcePath: filePath });
505
- }
506
- continue;
507
- }
508
- for (const item of await objectItemsFromDocument(document, filePath)) {
518
+ for (const item of await objectItemsFromDocument(parsedDocument.toJSON(), filePath)) {
509
519
  const normalized = normalizeYamlItem(item);
510
520
  if (normalized.kind === "model" && typeof normalized.id === "string" && normalized.id.trim()) {
511
521
  records.push({ item: normalized, sourcePath: filePath });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botbotgo/agent-harness",
3
- "version": "0.0.44",
3
+ "version": "0.0.45",
4
4
  "description": "Workspace runtime for multi-agent applications",
5
5
  "type": "module",
6
6
  "packageManager": "npm@10.9.2",
@@ -1,29 +0,0 @@
1
- # agent-harness feature: schema version for this declarative config object.
2
- apiVersion: agent-harness/v1alpha1
3
- # agent-harness feature: object type for a named embedding-model preset.
4
- kind: EmbeddingModel
5
- metadata:
6
- # agent-harness feature: stable embedding model object id used by refs such as `embedding-model/default`.
7
- name: default
8
- spec:
9
- # ====================
10
- # LangChain v1 Features
11
- # ====================
12
- # LangChain aligned feature: provider family or integration namespace for an embeddings implementation.
13
- provider: ollama
14
- # LangChain aligned feature: concrete embedding model identifier passed to the provider integration.
15
- model: nomic-embed-text
16
- # LangChain aligned feature: provider-specific initialization options for embeddings.
17
- baseUrl: https://ollama-rtx-4070.easynet.world/
18
-
19
- # ===================
20
- # DeepAgents Features
21
- # ===================
22
- # DeepAgents does not define a separate embeddings abstraction. Embedding models are consumed indirectly
23
- # by retrieval tools that a DeepAgent may call.
24
-
25
- # ======================
26
- # agent-harness Features
27
- # ======================
28
- # This object is packaged and referenced through retrieval-oriented workspace tools such as the RAG index builder
29
- # and query tool, not through `agent.modelRef`.
@@ -1,26 +0,0 @@
1
- # agent-harness feature: schema version for this declarative config object.
2
- apiVersion: agent-harness/v1alpha1
3
- # agent-harness feature: object type for a named vector-store preset.
4
- kind: VectorStore
5
- metadata:
6
- # agent-harness feature: stable vector store object id used by refs such as `vector-store/default`.
7
- name: default
8
- spec:
9
- # ====================
10
- # LangChain v1 Features
11
- # ====================
12
- # LangChain aligned feature: concrete vector store implementation.
13
- # The built-in runtime currently supports `LibSQLVectorStore` for SQLite/libSQL-backed vector retrieval.
14
- storeKind: LibSQLVectorStore
15
- # LangChain aligned feature: libSQL connection URL.
16
- # Local SQLite files use the `file:` prefix.
17
- url: file:.agent/vector-store.db
18
- # LangChain aligned feature: target table and embedding column.
19
- table: rag_chunks
20
- column: embedding
21
-
22
- # ======================
23
- # agent-harness Features
24
- # ======================
25
- # Retrieval tools use this to resolve their default embeddings when indexing or querying this vector store.
26
- embeddingModelRef: embedding-model/default