11 Commits
Author SHA1 Message Date
weichen 8a3ff92518 Add last-request and cache fields to Usage (N3 WP6)
Why: the loop now emits Last* and cache token usage; the product run
record needs the same fields for display and accounting (additive JSON,
old records deserialize as zero values).
Evidence: GOWORK=off go build + go test green.
Impact: additive only.
Refs: Agent-Native#35, N3 plan WP6
2026-10-07 16:34:27 +00:00
weichen bd632236c2 Extend messages and context observation for variants and estimates
Why: Labeled secrets, excluded turns, and candidate replies need fields on the shared message contract, and context snapshots need a section breakdown plus a stable prefix hash.
Evidence: go test ./... in agent-system-core. New fields use omitempty, so existing golden JSON stays the same.
Impact: Clients that ignore unknown fields keep working. Assemblers can now mark a message excluded or as one candidate in a group.
Refs: docs/records/2026-10-04-sillytavern-review.md
2026-10-04 18:18:57 +00:00
weichenandCursor 5dc190ee63 Record the model that served a run's usage
Why: a fallback chain can answer with a different model than the one that was requested, and usage has to name the model that actually served.
Evidence: go test .
Impact: the field is omitted when empty, so existing usage JSON stays the same.
Refs: feature/durable-rewind
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-03 17:28:40 +00:00
weichenandCursor cf7df54874 Add session permission mode and confirmation detail
Why: The product needs a session mode and a place to show tool arguments on a confirmation card without inventing a second card type.
Evidence: GOWORK=off go test . passed. New fields use omitempty, so existing golden JSON stays the same.
Impact: Empty permission mode still means the profile policy. Clients that ignore unknown fields keep working.
Refs: feature/permission-hooks
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-03 17:02:28 +00:00
weichenandCursor 7c66075ee9 Add a finalizing phase and a check part
Why: The final reply is composed after the work loop, and the automatic end check needs its own part and event so the timeline can show it without mixing it into the user-facing text.
Evidence: go test ./...
Impact: New RunPhase finalizing, PartType check, and run.check. Existing payloads are unchanged.
Refs: feature/final-reply-compose
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-02 13:32:32 +00:00
weichenandCursor d4375300cd Add thinking duration to message parts
Why: The chat timeline needs a persisted thinking duration, and tool duration already lives on the tool call, so the thinking part had nowhere to put it.
Evidence: go test ./... passes; the message golden now includes durationMs on the thinking part.
Impact: Additive JSON field with omitempty. Existing clients ignore unknown fields.
Refs: feature/chat-timeline-preview
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-01 06:03:19 +00:00
weichen a64fb5a168 Add CardID to CardPart for inbox-reference card parts
Why: 卡流机制(CF1)需要消息部件正式引用收件箱 ActivityCard——submit_card 产卡时卡片为产物权威载体,消息只存引用+锚点渲染(原仅能从 data 字符串里正则抠 card:<id>)。
Evidence: go test ./... 通过;golden message.json 增 card 引用部件锁定 cardId 线格式(-update 重生成后逐字节一致)。
Impact: CardPart 增可选 cardId(omitempty,旧数据零影响);ts/types.ts 同步,镜像经 make contracts 再生成。
Refs: Dev 任务卡 feature/cardflow-r1;提案 cardflow-and-process-split(编制中)。
2026-09-30 16:10:20 +00:00
weichen 284e8f365f Add cross-session flags to the Conversation contract
Why: cross-session transcript reading needs per-conversation outbound
(allowCrossRead, default true) and inbound (crossPrivate, default false)
flags alongside the project-level gate; see the approved proposal.

Evidence: go test ./... passes with golden conversation.json regenerated
to exercise both wire fields.

Impact: additive contract fields (omitempty), wire-compatible for
existing clients that ignore unknown fields.

Refs: Agent-System-Documents proposals/2026-09-30-cross-session-reading.md
(Dev task feature/cross-session-reading).
2026-09-30 15:00:22 +00:00
weichen b6d428ba35 Add pinned and archived flags to Conversation
Why: the approved task-centric sidebar (proposal 2026-09-30, option A) needs
server-authoritative pin and archive state on conversations; client-side
storage would be fake state against the event-sourced model.

Evidence: go test ./... passes; omitempty keeps wire format and golden
samples byte-identical for zero values (backward compatible).

Impact: additive optional fields; consumers ignoring unknown fields are
unaffected (forward-compat principle). Backend consumes via submodule bump.

Refs: Agent-System-Documents docs/proposals/2026-09-30-ui-redesign-and-auth.md (P6/P8, R1)
2026-09-30 10:39:16 +00:00
weichen 061eef5214 Add the owner field to tenant-scoped domain contracts
Details (original message):
Add the owner field to tenant-scoped domain contracts (project, conversation, run, artifact, knowledge)
2026-09-30 02:39:50 +00:00
weichen 9929d8f8ad Define the core contracts: domain model
Details (original message):
Define the core contracts: domain model, stream events, HITL, profiles, tools, plugins, UI vocabulary, ingest IR, retrieval and memory; golden-sample conformance tests; TS mirror.
2026-09-29 17:34:58 +00:00