Keep the scratch flag out of the Core-generated contracts #124

Merged
weichen merged 1 commits from fix/scratch-conversation-view-type into main 2026-10-22 06:07:28 +00:00
Owner

Why: src/contracts.ts is generated from Agent-System-Core by the Dev composite (make contracts). Frontend#123 added Conversation.scratch there directly; regeneration drops it and tsc (Dev make build) fails in 10 places.

What: restore contracts.ts to the Core-generated content; add ConversationView = Conversation & { scratch?: boolean } in api.ts (mirrors Backend's server-local conversationView) and use it for listTasks/listConversations/conversationDetail/createScratchSession and the store task list. No behavior change.

Evidence: contracts.ts byte-equal to Core output; npx tsc -b --noEmit, npx vitest run (685), check-knip pass locally (SELF); CI on this HEAD is authoritative.
Refs: Agent-System-Frontend#123, Agent-System-Dev#691

Why: src/contracts.ts is generated from Agent-System-Core by the Dev composite (make contracts). Frontend#123 added Conversation.scratch there directly; regeneration drops it and tsc (Dev make build) fails in 10 places. What: restore contracts.ts to the Core-generated content; add ConversationView = Conversation & { scratch?: boolean } in api.ts (mirrors Backend's server-local conversationView) and use it for listTasks/listConversations/conversationDetail/createScratchSession and the store task list. No behavior change. Evidence: contracts.ts byte-equal to Core output; npx tsc -b --noEmit, npx vitest run (685), check-knip pass locally (SELF); CI on this HEAD is authoritative. Refs: Agent-System-Frontend#123, Agent-System-Dev#691
weichen added 1 commit 2026-10-22 06:06:01 +00:00
Keep the scratch flag out of the Core-generated contracts
governance / governance (pull_request) Successful in 19s
ci / test-and-build (pull_request) Successful in 49s
6e611c5de0
Why: src/contracts.ts is regenerated from Agent-System-Core by the Dev
composite; the scratch field added there is dropped on regeneration and
tsc then fails in make build.

Evidence: contracts.ts equals the Core-generated output; npx tsc -b
--noEmit, npx vitest run (685 tests) and check-knip pass locally (SELF).

Impact: ConversationView (Conversation & { scratch?: boolean }) in
api.ts carries the server-local flag, mirroring the Backend
conversationView; no behavior change.

Refs: Agent-System-Frontend#123, Agent-System-Dev#691;
agent-exec receipt u3f-run (cursor, success)

Co-authored-by: Cursor <cursoragent@cursor.com>
weichen merged commit 279b2d02a2 into main 2026-10-22 06:07:28 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: weichen/Agent-System-Frontend#124