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
+4 -3
View File
@@ -1,5 +1,5 @@
export type InputDelivery = "steer" | "queue";
export type ResponseInput = { id: string; text: string; delivery: InputDelivery; status: "pending" | "delivered" };
export type ResponseInput = { id: string; text: string; delivery: InputDelivery; status: "pending" | "delivered" | "cancelled" };
type InboxRuntime = {
enqueueUserInput: (sessionId: string, input: ResponseInput) => Promise<void>;
listPendingUserInputs: (sessionId: string) => Promise<ResponseInput[]>;
@@ -19,7 +19,7 @@ export class ResponseInputTracker {
markReady() { this.releaseReady(); }
close() { this.accepting = false; this.releaseReady(); }
get hasAdditionalInput() { return this.items.size > 0; }
get hasAdditionalInput() { return [...this.items.values()].some((input) => input.status !== "cancelled"); }
async restore() {
for (const input of await this.runtime.listPendingUserInputs(this.sessionId)) this.items.set(input.id, input);
@@ -53,8 +53,9 @@ export class ResponseInputTracker {
observe(type: string, data: { inboxID?: string; delivery?: InputDelivery }) {
const input = data.inboxID ? this.items.get(data.inboxID) : undefined;
if (!input) return;
if (!input || input.status !== "pending") return;
if (type === "session.inbox.delivered") input.status = "delivered";
else if (type === "session.inbox.cancelled") input.status = "cancelled";
else if (type === "session.inbox.delivery.changed" && data.delivery) input.delivery = data.delivery;
else return;
this.changed({ ...input });