@ottocode/sdk 0.1.286 → 0.1.288
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 +1 -1
- package/src/core/src/index.ts +5 -0
- package/src/core/src/tools/builtin/fs/index.ts +0 -4
- package/src/core/src/tools/builtin/patch.txt +11 -0
- package/src/core/src/tools/lazy/index.ts +12 -0
- package/src/core/src/tools/lazy/load-tools.ts +56 -0
- package/src/core/src/tools/lazy/registry.ts +51 -0
- package/src/core/src/tools/lazy/simulator.ts +1039 -0
- package/src/core/src/tools/loader.ts +10 -0
- package/src/index.ts +5 -0
- package/src/providers/src/catalog.ts +7322 -3898
- package/src/providers/src/oauth-models.ts +1 -0
|
@@ -24,6 +24,10 @@ import {
|
|
|
24
24
|
getMCPToolsRecord,
|
|
25
25
|
type MCPToolBrief,
|
|
26
26
|
} from '../mcp/lazy-tools.ts';
|
|
27
|
+
import {
|
|
28
|
+
buildLazyToolsRecord,
|
|
29
|
+
buildLoadFirstPartyToolsTool,
|
|
30
|
+
} from './lazy/index.ts';
|
|
27
31
|
import { dirname, isAbsolute, join } from 'node:path';
|
|
28
32
|
import { pathToFileURL } from 'node:url';
|
|
29
33
|
import { promises as fs } from 'node:fs';
|
|
@@ -34,6 +38,7 @@ export type DiscoveredTool = { name: string; tool: Tool };
|
|
|
34
38
|
|
|
35
39
|
export type DiscoverResult = {
|
|
36
40
|
tools: DiscoveredTool[];
|
|
41
|
+
lazyToolsRecord: Record<string, Tool>;
|
|
37
42
|
mcpToolsRecord: Record<string, Tool>;
|
|
38
43
|
};
|
|
39
44
|
|
|
@@ -211,6 +216,10 @@ export async function discoverProjectTools(
|
|
|
211
216
|
tools.set(term.name, term.tool);
|
|
212
217
|
}
|
|
213
218
|
|
|
219
|
+
const lazyToolsRecord = buildLazyToolsRecord(projectRoot);
|
|
220
|
+
const loadFirstPartyTools = buildLoadFirstPartyToolsTool();
|
|
221
|
+
tools.set(loadFirstPartyTools.name, loadFirstPartyTools.tool);
|
|
222
|
+
|
|
214
223
|
const mcpManager = getMCPManager();
|
|
215
224
|
let mcpToolsRecord: Record<string, Tool> = {};
|
|
216
225
|
let mcpBriefs: MCPToolBrief[] = [];
|
|
@@ -225,6 +234,7 @@ export async function discoverProjectTools(
|
|
|
225
234
|
|
|
226
235
|
return {
|
|
227
236
|
tools: Array.from(tools.entries()).map(([name, tool]) => ({ name, tool })),
|
|
237
|
+
lazyToolsRecord,
|
|
228
238
|
mcpToolsRecord,
|
|
229
239
|
};
|
|
230
240
|
}
|
package/src/index.ts
CHANGED
|
@@ -295,6 +295,11 @@ export type { ShellExecutor } from './core/src/index.ts';
|
|
|
295
295
|
export { createToolError } from './core/src/index.ts';
|
|
296
296
|
export { buildFsTools } from './core/src/index.ts';
|
|
297
297
|
export { buildGitTools } from './core/src/index.ts';
|
|
298
|
+
export {
|
|
299
|
+
buildLazyToolsRecord,
|
|
300
|
+
buildLoadFirstPartyToolsTool,
|
|
301
|
+
buildSimulatorTool,
|
|
302
|
+
} from './core/src/index.ts';
|
|
298
303
|
export {
|
|
299
304
|
appendCoAuthorTrailer,
|
|
300
305
|
injectCoAuthorIntoGitCommit,
|