History

Document connections.list result shape in skills.ts (#1808)

yingchao committed 2 months ago

Commit 65d94ce1 parent 0ae7a252 files · +2 −1Browse files

Unified · Split

2 files
  1. packages/core/execution/src/skills.test.ts +1 −0
  2. packages/core/execution/src/skills.ts +1 −1
packages/core/execution/src/skills.test.ts+1−0
@@ -13,6 +13,7 @@ describe("skills registry", () => { · 12 unmodified lines
13 expect(EXECUTE_SKILL.body).toContain(13 expect(EXECUTE_SKILL.body).toContain(
14 "Do not use `fetch` — all API calls go through `tools.*`.",14 "Do not use `fetch` — all API calls go through `tools.*`.",
15 );15 );
16 expect(EXECUTE_SKILL.body).toContain("read `result.data.connections`");
16 });17 });
17 18
18 it("finds a skill by exact name and misses unknown names", () => {19 it("finds a skill by exact name and misses unknown names", () => {
packages/core/execution/src/skills.ts+1−1
@@ -36,7 +36,7 @@ const EXECUTE_SKILL_BODY = [ · 35 unmodified lines
36 '2. `const path = matches[0]?.path; if (!path) return "No matching tools found.";`',36 '2. `const path = matches[0]?.path; if (!path) return "No matching tools found.";`',
37 "3. `const details = await tools.describe.tool({ path });`",37 "3. `const details = await tools.describe.tool({ path });`",
38 "4. Use `details.inputTypeScript` / `details.outputTypeScript` and `details.typeScriptDefinitions` for compact shapes.",38 "4. Use `details.inputTypeScript` / `details.outputTypeScript` and `details.typeScriptDefinitions` for compact shapes.",
39 "5. Use `tools.executor.coreTools.connections.list({})` when you need live saved-connection inventory.",39 "5. For live saved-connection inventory, call `tools.executor.coreTools.connections.list({})`; after checking `result.ok`, read `result.data.connections`.",
40 "6. Call the tool: `const result = await tools.<path>(input);`",40 "6. Call the tool: `const result = await tools.<path>(input);`",
41 "",41 "",
42 "## Rules",42 "## Rules",