GeezerVison is showing github.com — fix(acp-registry): commands past the 128th are no longer dropped (#33… · pingdotgg/t3code@7171fdd
File treeExpand file treeCollapse file tree Open diff view settings packages/provider-acp-registry/src/server
Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: apps/server/src/provider/AcpRegistryProbe.test.ts +5-3Lines changed: 5 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -273,7 +273,7 @@ describe("ACP Registry probe", () => { | 273 | 273 | }, | 274 | 274 | ); | 275 | 275 |
| 276 | | - it("bounds and de-duplicates advertised commands", () => { | | 276 | + it("keeps every distinct advertised command and de-duplicates the rest", () => { | 277 | 277 | const commands = normalizeAcpRegistryCommands([ | 278 | 278 | { | 279 | 279 | name: "create_plan", | @@ -285,9 +285,11 @@ describe("ACP Registry probe", () => { | 285 | 285 | name: `command_${index}`, | 286 | 286 | description: "", | 287 | 287 | })), | | 288 | + { name: "$late-skill", description: "Advertised after 128 commands" }, | 288 | 289 | ]); | 289 | 290 |
| 290 | | - expect(commands.slashCommands).toHaveLength(128); | | 291 | + expect(commands.slashCommands).toHaveLength(141); | | 292 | + expect(commands.slashCommands.at(-1)).toEqual({ name: "command_139" }); | 291 | 293 | expect(commands.slashCommands[0]).toEqual({ | 292 | 294 | name: "create_plan", | 293 | 295 | description: "Create a plan", | @@ -296,7 +298,7 @@ describe("ACP Registry probe", () => { | 296 | 298 | expect( | 297 | 299 | commands.slashCommands.filter((command) => command.name.toLowerCase() === "create_plan"), | 298 | 300 | ).toHaveLength(1); | 299 | | - expect(commands.skills).toEqual([]); | | 301 | + expect(commands.skills.map((skill) => skill.name)).toEqual(["late-skill"]); | 300 | 302 | }); | 301 | 303 |
| 302 | 304 | it("routes dollar-prefixed ACP commands to the provider skill menu", () => { | |
Collapse file Copy file name to clipboardExpand all lines: packages/provider-acp-registry/src/server/probe.ts -4Lines changed: 0 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -41,7 +41,6 @@ const MAX_MODELS = 256; | 41 | 41 | const MAX_ID_LENGTH = 128; | 42 | 42 | const MAX_NAME_LENGTH = 160; | 43 | 43 | const MAX_DESCRIPTION_LENGTH = 1_024; | 44 | | -const MAX_COMMANDS = 128; | 45 | 44 | const MAX_COMMAND_LINE_LENGTH = 2_048; | 46 | 45 | const PROBE_TIMEOUT_SECONDS = 60; | 47 | 46 | const PROBE_TIMEOUT = `${PROBE_TIMEOUT_SECONDS} seconds`; | @@ -215,7 +214,6 @@ export function normalizeAcpRegistryCommands( | 215 | 214 | const seen = new Set<string>(); | 216 | 215 | const slashCommands: Array<ServerProviderSlashCommand> = []; | 217 | 216 | const skills: Array<ServerProviderSkill> = []; | 218 | | - let accepted = 0; | 219 | 217 | for (const command of commands) { | 220 | 218 | const name = boundedOpaqueValue(command.name, MAX_ID_LENGTH); | 221 | 219 | if (name === undefined) continue; | @@ -241,8 +239,6 @@ export function normalizeAcpRegistryCommands( | 241 | 239 | ...(hint ? { input: { hint } } : {}), | 242 | 240 | }); | 243 | 241 | } | 244 | | - accepted += 1; | 245 | | - if (accepted === MAX_COMMANDS) break; | 246 | 242 | } | 247 | 243 | return { slashCommands, skills }; | 248 | 244 | } | |
|