toolpack-sdk 3.0.0 → 3.1.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/README.md CHANGED
@@ -19,7 +19,7 @@ The TypeScript SDK for building production AI agents — 100+ built-in tools, 8
19
19
  - **Rules** — Always-on behavioral constraints loaded from Markdown files, auto-discovered per mode and globally via `rulesDir`
20
20
  - **HITL Confirmation** — Human-in-the-loop approval for high-risk operations with configurable bypass rules
21
21
  - **Extensible at Every Layer** — Every built-in component is a plug-in point: custom tools (`ToolDefinition`), custom channels (`BaseChannel`), custom provider adapters (`ProviderAdapter`), custom agents (`BaseAgent`), custom modes (`createMode()`), and custom interceptors — all using the same interfaces as the built-ins
22
- - **100+ Built-in Tools** across 12 categories:
22
+ - **100+ Built-in Tools** across 15 categories:
23
23
  - **MCP Client & Server** — consume external MCP servers via `createMcpToolProject()`, or expose Toolpack as an MCP server via `sdk.startMcpServer()` with static/JWT/custom auth, search mode, and agent exposure.
24
24
 
25
25
  | Category | Tools | Description |
@@ -505,7 +505,7 @@ client.on('tool:failed', (event) => { /* ... */ });
505
505
 
506
506
  ## Custom Tools
507
507
 
508
- In addition to the 100+ built-in tools, you can create and register your own custom tool projects using `createToolProject()`:
508
+ In addition to the 100+ built-in tools, you can create and register your own custom tool projects using `createToolProject()`. Built-in tool categories used for mode filtering include `filesystem`, `coding`, `version-control`, `http`, `web`, `github`, `slack`, `execution`, `system`, and others — there is no combined `network` category.
509
509
 
510
510
  ```typescript
511
511
  import { Toolpack, createToolProject } from 'toolpack-sdk';
@@ -540,6 +540,7 @@ const myToolProject = createToolProject({
540
540
  });
541
541
 
542
542
  // Attach custom tools to a mode — scoped to that agent, not global.
543
+ // To replace built-ins by name at init time, pass toolOverrides: [myToolProject].
543
544
  const sdk = await Toolpack.init({
544
545
  provider: 'openai',
545
546
  tools: true,
@@ -554,6 +555,9 @@ const result = await sdk.generate({
554
555
  model: 'gpt-4.1',
555
556
  mode: { ...sdk.getMode()!, customTools: [...myToolProject.tools] },
556
557
  });
558
+
559
+ // Option C: load projects at runtime (rebuilds the tool search index once)
560
+ await sdk.loadToolProjects([myToolProject]);
557
561
  ```
558
562
 
559
563
  ### Tool Project Structure
@@ -606,11 +610,12 @@ const response = await toolpack.chat('How do I configure authentication?');
606
610
 
607
611
  - **Multiple Providers**: In-memory (`MemoryProvider`) or persistent SQLite (`PersistentKnowledgeProvider`)
608
612
  - **Multiple Embedders**: OpenAI, Ollama (local), or custom embedders
609
- - **Multiple Sources**: Markdown, JSON, SQLite ingestion
613
+ - **Multiple Sources**: Markdown, text, web, API, JSON, SQLite, and more
610
614
  - **Progress Events**: Track embedding progress with `onEmbeddingProgress`
611
615
  - **Metadata Filtering**: Query with filters like `{ hasCode: true, category: 'api' }`
616
+ - **Incremental updates**: `ingest()`, `delete()`, and `deleteWhere()` for per-item lifecycle
612
617
 
613
- See the [Knowledge package README](./packages/toolpack-knowledge/README.md) for full documentation.
618
+ See the [Knowledge package README](../toolpack-knowledge/README.md) for full documentation.
614
619
 
615
620
  ## Skills
616
621
 
@@ -1225,12 +1230,12 @@ const sdk = await Toolpack.init({
1225
1230
  ```typescript
1226
1231
  import { Toolpack } from 'toolpack-sdk';
1227
1232
 
1228
- // ToolpackInitConfig — fields removed in v2.8:
1233
+ // ToolpackInitConfig — fields removed in v3.0.0:
1229
1234
  // customTools → use ModeConfig.customTools per agent instead
1230
1235
  // modeOverrides → configure modes directly via registerMode()
1231
1236
  // configPath → configuration is now passed inline to Toolpack.init()
1232
1237
  //
1233
- // Fields added in v2.8: logging, hitl, toolsConfig
1238
+ // Fields: logging, hitl, toolsConfig, toolOverrides (v3.1.0)
1234
1239
  const sdk = await Toolpack.init(config: ToolpackInitConfig): Promise<Toolpack>
1235
1240
 
1236
1241
  // Completions (routes through workflow engine if mode has workflow enabled)
@@ -1250,6 +1255,12 @@ sdk.getModes(): ModeConfig[]
1250
1255
  sdk.cycleMode(): ModeConfig
1251
1256
  sdk.registerMode(mode: ModeConfig): void
1252
1257
 
1258
+ // Tool projects
1259
+ await sdk.loadToolProject(project: ToolProject): Promise<void>
1260
+ await sdk.loadToolProjects(projects: ToolProject[]): Promise<void>
1261
+ sdk.searchTools(query: string, category?: string)
1262
+ sdk.getRegisteredToolNames(): string[]
1263
+
1253
1264
  // Internal access
1254
1265
  sdk.getClient(): AIClient
1255
1266
  sdk.getWorkflowExecutor(): WorkflowExecutor