mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-06 14:02:36 +01:00
fix: make project defaults and instance restart discoverable
This commit is contained in:
1 parent
cdfd701d89
commit
308d273bb0
2 files changed
+22
-2
No files matched your search
@@ -176,6 +176,22 @@ describe("runner API catalog", () => {
|
||||
).toContain("search_tasks");
|
||||
expect(searchRunnerApi({ query: "nothing-zzzzzzzzzz" }).total).toBe(0);
|
||||
});
|
||||
it("finds the actual instance-restart operation and explains its authority boundary", () => {
|
||||
const operation = searchRunnerApi({ query: "restart instance", limit: 1 }).results[0]!;
|
||||
expect(operation.operationId).toBe("POST /api/health/dev-server/restart");
|
||||
expect(operation.authorization.actor).toBe("board");
|
||||
expect(operation.description).toMatch(/authenticated.*board/i);
|
||||
expect(operation.description).toMatch(/agent credential/i);
|
||||
expect(operation.description).toMatch(/supervisor/i);
|
||||
});
|
||||
it("discovers where to save project defaults without rewriting existing tasks", () => {
|
||||
const operation = searchRunnerApi({ query: "save project defaults", limit: 1 }).results[0]!;
|
||||
expect(operation.operationId).toBe("PATCH /api/projects/{id}");
|
||||
expect(operation.description).toContain("goalIds");
|
||||
expect(operation.description).toContain("description");
|
||||
expect(operation.description).toMatch(/existing tasks/i);
|
||||
expect(operation.requestBody?.content["application/json"].schema.properties).toHaveProperty("goalIds");
|
||||
});
|
||||
it("paginates without duplicates and rejects stale or mismatched cursors", () => {
|
||||
const first = searchRunnerApi({ query: "project", limit: 1 });
|
||||
const second = searchRunnerApi({
|
||||
|
||||
Reference in new issue
Block a user