Discriminate status-dependent record and option types (RunRecord, SessionIndexEntry, InputState, durable-only options)
Maintainer thường phản hồi trong vòng 1 ngày
@jherr đang làm issue này rồi.
Từ ngày 16/10/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
TanStack AI version
feat/harness-core branch (PR #1755), unreleased @tanstack/ai-harness, @tanstack/ai-persistence, @tanstack/ai.
Framework/Library version
Not framework specific.
Describe the change
Several record types are optional bags whose fields depend on a status or kind field. The code checks the combination at runtime, or papers over it with a fallback. Each one is a candidate for a discriminated union, so the type says what the runtime already enforces.
PR #1755 did this for Receipt, InputSettlement, MediaRecord, and AgentRun in @tanstack/ai-harness. These are deferred because each needs a wider change than one package's types:
Records keyed by status
RunRecord(packages/ai/src/activities/chat/middleware/run-store.ts):parentRunId,subagentRunId, andnameare all-or-none for a child run.finishedAtanderrordepend onstatus.SessionIndexEntry(packages/ai-persistence/src/types.ts):parentThreadIdandparentToolCallIdgo together.InputState(packages/ai-harness/src/log.ts):appliedneedsoperationId,joinedneedsinto,rejectedneedsreason,settledneedssettlement. Two sites fill the hole with?? '', and one of them can pass an empty operation id when it fails a stopped agent (session/harness-session.ts,failStoppedAgent).QueuedTurn(packages/ai-harness/src/session/types.ts): a kind bag of prompt, resolve, reset, continue, and wake.
Options that only mean something on a durable host
HarnessHostOptions.project,reduce, andcoalesceMsare read only whenstores.logis set. Keying the options on the persistence shape needs the twoHarnessPersistencearms exported under names.AgentStartOptions.resume,TurnAdditions.records, andOpenSessionOptions.logIdneedstores.log. The first two throw a clear error without it.logIdis ignored in silence. A type fix means aTDurableparameter fromcreateHarnessHostthrough to the session type.
Not worth a union
HarnessConfig.adapter: a plugin or stored model name can supply the model at runtime, so theNO_MODELruntime check stays.HarnessConfig.routingwith no root agents: a one-time warning fits better than a type.
Suggested order
InputState, because it hides a real bug.RunRecordandSessionIndexEntry, because every store implementation sees them.HarnessHostOptions, once the persistence arms have names.- The durable-only options, if the
TDurableplumbing turns out to be small.
- Ngôn ngữ chính
- TypeScript
- Star
- 3.2k
- Fork
- 361
- Merge trung bình
- 1 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 266
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của TanStack/ai
-
ai-harness: an input with no principal runs with the owner session's principalCó thể đã có người làm @tombeckenham đã nhận 1 ngày trước. Đang mởwaiting-on: maintainer
TanStack/ai#1797 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ai-harness: a forwarded command completes with no result, also when the owner rejects itCó thể đã có người làm @tombeckenham đã nhận 1 ngày trước. Đang mởwaiting-on: maintainer
TanStack/ai#1796 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ai-harness: recovery runs a turn without the user message when the turn never startedCó thể đã có người làm @tombeckenham đã nhận 1 ngày trước. Đang mởwaiting-on: maintainer
TanStack/ai#1795 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ai-mcp: modern tool calls omit x-mcp-header parameter headers in 0.9.0Có thể đã có người làm @tombeckenham đã nhận 1 ngày trước. Đang mởwaiting-on: maintainer
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 32/100
TanStack/ai#1794 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Responses replay puts assistant text between function_call and function_call_outputCó thể đã có người làm @tombeckenham đã nhận 1 ngày trước. Đang mởwaiting-on: maintainer
TanStack/ai#1792 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
melgarafael/DeskcommCRM#3000 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
callstackincubator/simlock#639 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
aws/agentcore-cli#2606 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
🐛 [BUG] - FeatureComparisonTable text-only cells are top-aligned while icon cells are centeredĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 7 ngày
-
ai-driven-qa bug Cosmetic
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày