mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-22 03:29:18 +01:00
feat: return completed handoffs to Agent Chat (#14408)
Return completed Agent Chat handoffs through a durable outbox and scope each generated update to its supplied tasks. Add recovery, browser delivery, result access, and calibrated quality coverage. Validated with two consecutive ten-case Claude/Codex campaigns, all CI checks, and a 5/5 review. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
3b4b270650
commit
83076d7e7c
59 files changed
+2696
-83
No files matched your search
@@ -56,6 +56,24 @@ export class RunnerApi {
|
||||
return response.json() as Promise<T>;
|
||||
}
|
||||
|
||||
/** Use the public revision fence when configuring a fixture's instruction entry. */
|
||||
async saveAgentInstructions(agentId: string, content: string): Promise<void> {
|
||||
const path = `/api/agents/${agentId}/instructions-bundle/file`;
|
||||
const current = await this.request.get(`${path}?path=AGENTS.md`);
|
||||
let baseHash: string | null = null;
|
||||
if (current.ok()) {
|
||||
const detail = await current.json();
|
||||
if (typeof detail.contentHash !== "string" || !detail.contentHash) {
|
||||
throw new Error("Existing fixture instructions have no revision hash");
|
||||
}
|
||||
baseHash = detail.contentHash;
|
||||
} else if (current.status() !== 404) {
|
||||
throw new Error(await failureMessage(current, "GET"));
|
||||
}
|
||||
const saved = await this.request.put(path, { data: { path: "AGENTS.md", content, baseHash } });
|
||||
if (!saved.ok()) throw new Error(await failureMessage(saved, "PUT"));
|
||||
}
|
||||
|
||||
async delete(
|
||||
path: string,
|
||||
options?: { allowNotFound?: boolean },
|
||||
|
||||
Reference in new issue
Block a user