@selesai/code 0.13.20 → 0.13.21
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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@selesai/code` will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.13.21] - 2026-09-11
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- **Capability catalog unique-match results.** `capability_catalog` now returns a uniquely routed natural-language tool or skill match instead of falling back to a literal full-query search and incorrectly reporting no matching capabilities.
|
|
9
|
+
|
|
5
10
|
## [0.13.20] - 2026-09-10
|
|
6
11
|
|
|
7
12
|
### Added
|
|
@@ -158,16 +158,18 @@ export default function capabilityGatewayExtension(pi: ExtensionAPI): void {
|
|
|
158
158
|
const shown =
|
|
159
159
|
params.query && matched.candidates
|
|
160
160
|
? matched.candidates
|
|
161
|
-
: params.query
|
|
162
|
-
?
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
161
|
+
: params.query && matched.entry
|
|
162
|
+
? [matched.entry]
|
|
163
|
+
: params.query
|
|
164
|
+
? filtered.filter((entry) => {
|
|
165
|
+
const q = params.query!.toLowerCase();
|
|
166
|
+
return (
|
|
167
|
+
entry.name.toLowerCase().includes(q) ||
|
|
168
|
+
entry.summary.toLowerCase().includes(q) ||
|
|
169
|
+
entry.aliases.some((alias) => alias.toLowerCase().includes(q))
|
|
170
|
+
);
|
|
171
|
+
})
|
|
172
|
+
: filtered;
|
|
171
173
|
const text = formatCatalog(shown);
|
|
172
174
|
emitTelemetry(pi, "catalog", { query: params.query ?? "", kind: params.kind ?? "", results: shown.length });
|
|
173
175
|
return {
|
|
@@ -157,6 +157,24 @@ describe("capability gateway integration", () => {
|
|
|
157
157
|
expect(block).toContain("capability-gateway");
|
|
158
158
|
});
|
|
159
159
|
|
|
160
|
+
it("returns a uniquely routed natural-language catalog match", async () => {
|
|
161
|
+
const h = await createGatewaySession({ enabled: true, extensions: [GATEWAY_DIR, GREP_APP_DIR] });
|
|
162
|
+
harnesses.push(h);
|
|
163
|
+
const catalog = h.session.getToolDefinition("capability_catalog");
|
|
164
|
+
expect(catalog).toBeDefined();
|
|
165
|
+
|
|
166
|
+
const result = await catalog!.execute(
|
|
167
|
+
"call-1",
|
|
168
|
+
{ query: "search GitHub code with grep_app_search" },
|
|
169
|
+
undefined,
|
|
170
|
+
undefined,
|
|
171
|
+
{} as never,
|
|
172
|
+
);
|
|
173
|
+
expect(result.content[0]!.type).toBe("text");
|
|
174
|
+
expect(String(result.content[0]!.text)).toContain("grep_app_search");
|
|
175
|
+
expect(result.details).toMatchObject({ count: 1 });
|
|
176
|
+
});
|
|
177
|
+
|
|
160
178
|
it("activates a discovered tool for the run and resets after agent_settled", async () => {
|
|
161
179
|
const h = await createGatewaySession({ enabled: true });
|
|
162
180
|
harnesses.push(h);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@selesai/code",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.21",
|
|
4
4
|
"description": "Maintained, extension-first Pi coding agent with built-in workflows, subagents, web research, questions, skills, and an enhanced terminal UI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|