feat: add scoped history and artifacts
Generic Container CI/CD / test-build-publish (push) Failing after 8m25s
Agent CI/CD / build-test-publish-and-deploy (push) Failing after 8m25s

This commit is contained in:
2026-10-22 18:40:20 +08:00
parent bc4e9834e5
commit 7d47a2df86
48 changed files with 2632 additions and 78 deletions
+19
View File
@@ -397,6 +397,25 @@ export class OpencodeRuntimeAdapter {
}
}
async cancelPendingUserInput(sessionId: string, id: string): Promise<ResponseInput> {
const item = (await this.listPendingUserInputs(sessionId)).find((input) => input.id === id);
if (!item) throw Object.assign(new Error("Message has already been consumed or is unavailable"), { status: 409 });
const client = await this.ensureClient();
try { await client.session.inbox.cancel({ sessionID: sessionId, inboxID: id }); }
catch (error) {
if (!(await this.listPendingUserInputs(sessionId)).some((input) => input.id === id)) {
throw Object.assign(new Error("Message has already been consumed or is unavailable"), { status: 409 });
}
throw error;
}
// Native cancel also succeeds for an already consumed ID. Check the native
// message record so a delivery racing cancellation never restores a sent draft.
if (await this.agentMessageState(sessionId, id) !== "missing") {
throw Object.assign(new Error("Message has already been consumed or is unavailable"), { status: 409 });
}
return { ...item, status: "cancelled" };
}
async prompt(sessionId: string, text: string, model?: RuntimeModelOverride) {
const client = await this.ensureClient();
const startedAt = Date.now();