Add Kiro CLI to ACP provider catalog
Adds Kiro CLI as an opt-in ACP provider catalog entry, plus a generic ACP extension-notification sink so unknown notifications no longer fail JSON-RPC dispatch.
This commit is contained in:
@@ -1438,6 +1438,26 @@ describe("ACPAgentSession slash commands", () => {
|
||||
});
|
||||
|
||||
describe("ACPAgentSession", () => {
|
||||
test("accepts ACP extension notifications without failing the JSON-RPC connection", async () => {
|
||||
const logger = createTestLogger();
|
||||
const trace = vi.spyOn(logger, "trace");
|
||||
const session = createSessionWithConfig({ provider: "kiro" }, logger);
|
||||
|
||||
await expect(
|
||||
session.extNotification("_kiro.dev/session/initialized", {
|
||||
sessionId: "session-1",
|
||||
}),
|
||||
).resolves.toBeUndefined();
|
||||
expect(trace).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
provider: "kiro",
|
||||
method: "_kiro.dev/session/initialized",
|
||||
sessionId: "session-1",
|
||||
}),
|
||||
"provider.acp.extension_notification",
|
||||
);
|
||||
});
|
||||
|
||||
test("emits assistant and reasoning chunks as deltas while user chunks stay accumulated", async () => {
|
||||
const session = createSession();
|
||||
const events: Array<{ type: string; item?: { type: string; text?: string } }> = [];
|
||||
|
||||
@@ -1667,6 +1667,19 @@ export class ACPAgentSession implements AgentSession, ACPClient {
|
||||
}
|
||||
}
|
||||
|
||||
async extNotification(method: string, params: Record<string, unknown>): Promise<void> {
|
||||
this.logger.trace(
|
||||
{
|
||||
agentId: this.agentId,
|
||||
provider: this.provider,
|
||||
sessionId: typeof params.sessionId === "string" ? params.sessionId : undefined,
|
||||
method,
|
||||
rawEvent: params,
|
||||
},
|
||||
"provider.acp.extension_notification",
|
||||
);
|
||||
}
|
||||
|
||||
async readTextFile(params: ReadTextFileRequest): Promise<{ content: string }> {
|
||||
const raw = await fs.readFile(params.path, "utf8");
|
||||
if (!params.line && !params.limit) {
|
||||
|
||||
Reference in New Issue
Block a user