@ottocode/sdk 0.1.299 → 0.1.301

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ottocode/sdk",
3
- "version": "0.1.299",
3
+ "version": "0.1.301",
4
4
  "description": "AI agent SDK for building intelligent assistants - tree-shakable and comprehensive",
5
5
  "author": "nitishxyz",
6
6
  "license": "MIT",
@@ -56,6 +56,7 @@ export {
56
56
  buildLazyToolsRecord,
57
57
  buildLoadFirstPartyToolsTool,
58
58
  buildSimulatorTool,
59
+ getLazyToolDefinitions,
59
60
  } from './tools/lazy/index';
60
61
 
61
62
  // =======================
@@ -42,10 +42,16 @@ export function buildLazyToolsRecord(
42
42
  return record;
43
43
  }
44
44
 
45
- export function buildLoadFirstPartyToolsTool(): { name: string; tool: Tool } {
46
- const briefs = getLazyToolDefinitions().map(({ name, description }) => ({
47
- name,
48
- description,
49
- }));
45
+ export function buildLoadFirstPartyToolsTool(allowedNames?: Iterable<string>): {
46
+ name: string;
47
+ tool: Tool;
48
+ } {
49
+ const allowed = allowedNames ? new Set(allowedNames) : null;
50
+ const briefs = getLazyToolDefinitions()
51
+ .filter(({ name }) => !allowed || allowed.has(name))
52
+ .map(({ name, description }) => ({
53
+ name,
54
+ description,
55
+ }));
50
56
  return buildLoadToolsTool(briefs);
51
57
  }
package/src/index.ts CHANGED
@@ -311,6 +311,7 @@ export {
311
311
  buildLazyToolsRecord,
312
312
  buildLoadFirstPartyToolsTool,
313
313
  buildSimulatorTool,
314
+ getLazyToolDefinitions,
314
315
  } from './core/src/index.ts';
315
316
  export {
316
317
  appendCoAuthorTrailer,