History

Slim per-integration search tool definitions

Rhys Sullivan committed 2 months ago

Commit b1dbe5f1 parent 1bbd47e4 files · +55 −31Browse files

Showing the changes to e2e (1 of 4 files). Show all

Unified · Split

e2e/scenarios/namespace-search-tools.test.ts+7−2
@@ -104,12 +104,17 @@ scenario( · 103 unmodified lines
104 // The core surface is untouched.104 // The core surface is untouched.
105 expect(names, "execute still works on an opted-in session").toContain("execute");105 expect(names, "execute still works on an opted-in session").toContain("execute");
106 expect(names, "skills still works on an opted-in session").toContain("skills");106 expect(names, "skills still works on an opted-in session").toContain("skills");
107 // The description is minimal and points back at the execute flow.107 // The NAME carries the namespace; the description is one shared line
108 // that points back at the execute flow, kept tiny because a session
109 // pays for it once per connected integration.
108 const described = optedInTools.find((tool) => tool.name === searchTool);110 const described = optedInTools.find((tool) => tool.name === searchTool);
109 expect(described?.description, "the tool description names its namespace").toContain(slug);
110 expect(described?.description, "the tool description points at execute").toContain(111 expect(described?.description, "the tool description points at execute").toContain(
111 "execute",112 "execute",
112 );113 );
114 expect(
115 (described?.description ?? "").length,
116 "the tool description stays lean",
117 ).toBeLessThan(120);
113 118
114 // A keyword call returns the matching tool, exactly as119 // A keyword call returns the matching tool, exactly as
115 // `tools.search({ query, namespace })` inside execute would.120 // `tools.search({ query, namespace })` inside execute would.