@tangle-network/agent-app 0.43.67 → 0.43.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/README.md +1 -1
  2. package/dist/assistant/index.d.ts +4 -2
  3. package/dist/assistant/index.js +6 -3
  4. package/dist/assistant/index.js.map +1 -1
  5. package/dist/{attachment-validation-B2FFna9E.d.ts → attachment-validation-Dv1A_Puy.d.ts} +1 -1
  6. package/dist/chat-routes/index.d.ts +4 -3
  7. package/dist/chat-routes/index.js +6 -4
  8. package/dist/chat-routes/index.js.map +1 -1
  9. package/dist/chat-store/index.d.ts +3 -2
  10. package/dist/chat-store/index.js +4 -1
  11. package/dist/chat-store/index.js.map +1 -1
  12. package/dist/{chunk-JWBZ74TW.js → chunk-7ESQUSAC.js} +5 -3
  13. package/dist/{chunk-JWBZ74TW.js.map → chunk-7ESQUSAC.js.map} +1 -1
  14. package/dist/{chunk-X3N2H6JE.js → chunk-AFNTRJQ7.js} +10 -1
  15. package/dist/chunk-AFNTRJQ7.js.map +1 -0
  16. package/dist/chunk-F2CBC4DY.js +193 -0
  17. package/dist/chunk-F2CBC4DY.js.map +1 -0
  18. package/dist/chunk-HRH7ASAG.js +759 -0
  19. package/dist/chunk-HRH7ASAG.js.map +1 -0
  20. package/dist/{chunk-YTSEDJWA.js → chunk-RXOTWZ4G.js} +22 -6
  21. package/dist/chunk-RXOTWZ4G.js.map +1 -0
  22. package/dist/chunk-UDSY2F6N.js +331 -0
  23. package/dist/chunk-UDSY2F6N.js.map +1 -0
  24. package/dist/chunk-UOAYS72M.js +80 -0
  25. package/dist/chunk-UOAYS72M.js.map +1 -0
  26. package/dist/chunk-UP33Z633.js +141 -0
  27. package/dist/chunk-UP33Z633.js.map +1 -0
  28. package/dist/{chunk-FMDMI25K.js → chunk-V55WJSR4.js} +2 -2
  29. package/dist/{chunk-YKBDH2UY.js → chunk-WL7XHLDK.js} +2 -2
  30. package/dist/{chunk-7CTIUCQ4.js → chunk-YEFFHORB.js} +2 -73
  31. package/dist/chunk-YEFFHORB.js.map +1 -0
  32. package/dist/eval-campaign/index.d.ts +2 -81
  33. package/dist/index.d.ts +5 -1
  34. package/dist/index.js +62 -8
  35. package/dist/{parts-Bg8qcDvB.d.ts → parts-2ymE5cs-.d.ts} +15 -2
  36. package/dist/queue-C24V13h9.d.ts +68 -0
  37. package/dist/runtime/index.js +3 -2
  38. package/dist/sandbox/index.js +3 -2
  39. package/dist/teams/index.js +5 -5
  40. package/dist/teams/invitations-api.js +4 -4
  41. package/dist/teams-react/index.js +3 -3
  42. package/dist/tools/index.js +8 -6
  43. package/dist/trust-gate-Dcm5xSva.d.ts +83 -0
  44. package/dist/turn-stream/index.d.ts +185 -24
  45. package/dist/turn-stream/index.js.map +1 -1
  46. package/dist/types-CEchbvgz.d.ts +268 -0
  47. package/dist/web-react/index.d.ts +97 -5
  48. package/dist/web-react/index.js +31 -4
  49. package/dist/work-product/index.d.ts +331 -0
  50. package/dist/work-product/index.js +54 -0
  51. package/dist/work-product/index.js.map +1 -0
  52. package/dist/work-product-react/index.d.ts +36 -0
  53. package/dist/work-product-react/index.js +180 -0
  54. package/dist/work-product-react/index.js.map +1 -0
  55. package/package.json +15 -1
  56. package/dist/chunk-7CTIUCQ4.js.map +0 -1
  57. package/dist/chunk-X3N2H6JE.js.map +0 -1
  58. package/dist/chunk-YTSEDJWA.js.map +0 -1
  59. /package/dist/{chunk-FMDMI25K.js.map → chunk-V55WJSR4.js.map} +0 -0
  60. /package/dist/{chunk-YKBDH2UY.js.map → chunk-WL7XHLDK.js.map} +0 -0
@@ -0,0 +1,268 @@
1
+ /**
2
+ * The reviewable work-product contract — the one durable object every Tangle
3
+ * agent product converges on: an artifact plus its evidence map (source→field
4
+ * lineage), exceptions, quality checks, version history, and run provenance,
5
+ * produced by an agent and signed off by a professional.
6
+ *
7
+ * Import-free and client-safe by construction: the queue projection and the
8
+ * React surfaces re-validate these shapes at JSON boundaries, so every type
9
+ * and codec here must load in a browser bundle. Every domain word — artifact
10
+ * `kind`, evidence `target`, exception `kind`, check `name`, `scopeKey`
11
+ * format — is a STRING PARAMETER validated against product-supplied
12
+ * vocabularies in the tool layer; nothing domain-specific is baked here.
13
+ */
14
+ /** Stable pointer at one version of one work product. */
15
+ interface WorkProductRef {
16
+ id: string;
17
+ version: number;
18
+ }
19
+ type WorkProductStatus = 'draft' | 'blocked' | 'ready' | 'changes_requested' | 'approved' | 'superseded';
20
+ /** Runtime guard for re-validating a status read off a JSON boundary. */
21
+ declare function isWorkProductStatus(value: unknown): value is WorkProductStatus;
22
+ /** Define the reviewable artifact body with its kind, sources, and structured field map */
23
+ interface WorkProductArtifact {
24
+ /** PARAMETER: 'return_package' | 'redline' | 'outreach_campaign' — validated
25
+ * against the product's `artifactKinds` vocabulary at submit. */
26
+ kind: string;
27
+ title: string;
28
+ /** Vault/object-store ref for the rendered document (large bodies). */
29
+ path?: string;
30
+ /** Inline body when small (markdown/JSON). */
31
+ content?: string;
32
+ mediaType?: string;
33
+ /** Diff-first products (legal): the source document the artifact redlines. */
34
+ baseline?: {
35
+ path?: string;
36
+ content?: string;
37
+ };
38
+ /** The structured field map lineage targets anchor to (tax: form-line ids). */
39
+ fields?: Record<string, unknown>;
40
+ }
41
+ /** Point into a source document: page, free-form range, verbatim quote */
42
+ interface EvidenceLocator {
43
+ page?: number;
44
+ /** 'L120-L134' | 'B7' | '¶4' — free-form, non-empty when present. */
45
+ range?: string;
46
+ /** Verbatim supporting quote from the source. */
47
+ quote?: string;
48
+ }
49
+ /** One lineage row: a source document location supporting one artifact claim */
50
+ interface EvidenceEntry {
51
+ /** Agent-supplied stable id — the same id re-emitted is an upsert/replace. */
52
+ id: string;
53
+ /** Vault path / attachment id / object-store key of the SOURCE document. */
54
+ sourceRef: string;
55
+ locator: EvidenceLocator;
56
+ /** Artifact field/claim the evidence supports: '1040.line_9' |
57
+ * 'clause:indemnification' | 'icp.employee_count' — product vocabulary. */
58
+ target: string;
59
+ /** The value/assertion at the target. */
60
+ claim: string;
61
+ /** 0..1; absent = unstated (never defaulted). */
62
+ confidence?: number;
63
+ }
64
+ type ExceptionSeverity = 'blocking' | 'material' | 'advisory';
65
+ /** One flagged problem with the work product, resolvable by agent or reviewer */
66
+ interface ExceptionEntry {
67
+ id: string;
68
+ severity: ExceptionSeverity;
69
+ /** PARAMETER: 'missing_document' | 'inconsistent_source' | … — validated
70
+ * against the product's `exceptionKinds` vocabulary. */
71
+ kind: string;
72
+ message: string;
73
+ /** Affected artifact targets. */
74
+ targets?: string[];
75
+ resolved: boolean;
76
+ resolvedBy?: 'agent' | 'reviewer';
77
+ resolutionNote?: string;
78
+ }
79
+ /** Unresolved blocking exceptions are what park a work product in `blocked`. */
80
+ declare function unresolvedBlockingExceptions(exceptions: readonly ExceptionEntry[]): ExceptionEntry[];
81
+ /** One named quality verdict on the work product, tagged with who computed it */
82
+ interface QualityCheck {
83
+ id: string;
84
+ /** Product vocabulary: 'totals_reconcile', 'evidence_coverage', … */
85
+ name: string;
86
+ passed: boolean;
87
+ detail?: string;
88
+ /** agent self-report | shell-computed | eval-ensemble verdict. */
89
+ source: 'agent' | 'platform' | 'judge';
90
+ }
91
+ /** The audit triple binding a work product to the exact configuration and run
92
+ * that produced it. `profileHash` is agent-eval's `agentProfileHash()` of the
93
+ * EXACT shipped profile — the same hash that keys scorecard cells, so a
94
+ * reviewer can see the measured backtest history of the configuration that
95
+ * produced the document. */
96
+ interface WorkProductProvenance {
97
+ profileHash: string;
98
+ /** Chat turnId or mission-step run id. */
99
+ runId: string;
100
+ /** Back-filled from the usage receipt / serving-model header at turn
101
+ * completion — only the completed turn knows what actually served. */
102
+ servingModels: string[];
103
+ sessionId?: string;
104
+ missionRef?: {
105
+ missionId: string;
106
+ stepId: string;
107
+ };
108
+ costUsd?: number;
109
+ producedAt: number;
110
+ }
111
+ /** The product-resolved backtest summary for one profile hash (from its own
112
+ * eval artifacts via agent-eval's `loadScorecard`) — the shell defines only
113
+ * this TYPE and the `ProvenanceStamp` slot that renders it. */
114
+ interface ProfileBacktestSummary {
115
+ profileHash: string;
116
+ /** Backtest cases behind the composite. */
117
+ cases: number;
118
+ composite: number;
119
+ /** The eval-campaign trust gate's verdict on whether the composite is
120
+ * allowed to be believed; 'fail' renders as "quality: unverified". */
121
+ trust: 'pass' | 'fail';
122
+ trustReasons: string[];
123
+ }
124
+ /** Frozen milestone row for one version of the work product */
125
+ interface WorkProductVersionEntry {
126
+ version: number;
127
+ status: WorkProductStatus;
128
+ provenance: WorkProductProvenance;
129
+ /** Frozen snapshot ref of this version's body (object-store key) — the
130
+ * DiffView input for vN-1 vs vN. */
131
+ artifactPath?: string;
132
+ reviewedBy?: string;
133
+ reviewNote?: string;
134
+ at: number;
135
+ }
136
+ /** Define the durable work product row accumulating artifact, lineage, exceptions, checks, and history */
137
+ interface WorkProductRecord {
138
+ /** Minted server-side; the model NEVER supplies ids — it addresses work by
139
+ * `scopeKey`. */
140
+ id: string;
141
+ workspaceId: string;
142
+ /** The chat thread that drives it (chat stays first). */
143
+ threadId: string | null;
144
+ /** Product engagement key: 'return:acme:2025' | 'contract:acme-msa' |
145
+ * 'campaign:cpa-pilots'. */
146
+ scopeKey: string;
147
+ status: WorkProductStatus;
148
+ version: number;
149
+ /** `null` while the draft accumulates (evidence streams in before the
150
+ * artifact arrives); non-null from the submit transition onward. Typed
151
+ * honestly rather than forcing a placeholder artifact on every draft. */
152
+ artifact: WorkProductArtifact | null;
153
+ evidence: EvidenceEntry[];
154
+ exceptions: ExceptionEntry[];
155
+ checks: QualityCheck[];
156
+ provenance: WorkProductProvenance;
157
+ history: WorkProductVersionEntry[];
158
+ createdAt: number;
159
+ updatedAt: number;
160
+ }
161
+ /** Fields a guarded write compares against the values the caller read. An
162
+ * absent field is unguarded. A SQL implementation compares like-for-like
163
+ * scalar columns; the in-memory store does the same. */
164
+ interface WorkProductUpdateGuard {
165
+ status?: WorkProductStatus;
166
+ version?: number;
167
+ }
168
+ /** Fields a guarded write sets when the guard holds. */
169
+ interface WorkProductPatch {
170
+ status?: WorkProductStatus;
171
+ version?: number;
172
+ artifact?: WorkProductArtifact;
173
+ evidence?: EvidenceEntry[];
174
+ exceptions?: ExceptionEntry[];
175
+ checks?: QualityCheck[];
176
+ provenance?: WorkProductProvenance;
177
+ history?: WorkProductVersionEntry[];
178
+ updatedAt?: number;
179
+ }
180
+ /** One audit-trail row, appended after every committed state change. */
181
+ interface WorkProductAuditEvent {
182
+ workProductId: string;
183
+ workspaceId: string;
184
+ /** Machine-readable transition name ('wp.created' | 'wp.evidence' |
185
+ * 'wp.ready' | 'wp.verdict' | …). */
186
+ step: string;
187
+ message: string;
188
+ metadata: Record<string, unknown>;
189
+ at: number;
190
+ }
191
+ /**
192
+ * Persistence seam — the product implements this over its own tables. The
193
+ * invariant the implementation MUST keep: `update` applies `patch` ONLY when
194
+ * every guard field still equals the stored value, and returns `null` when
195
+ * the guard misses — a typed conflict, never a clobber.
196
+ */
197
+ interface WorkProductStorePort {
198
+ load(id: string): Promise<WorkProductRecord | null>;
199
+ /** The scope's single OPEN accumulator row — status `draft` or `blocked` —
200
+ * or null when the scope has only reviewed/terminal rows (or none). The
201
+ * `changes_requested` row is found via {@link listByWorkspace}; reopening
202
+ * it is the service's job. */
203
+ findDraft(workspaceId: string, scopeKey: string): Promise<WorkProductRecord | null>;
204
+ listByWorkspace(workspaceId: string, opts?: {
205
+ status?: WorkProductStatus[];
206
+ }): Promise<WorkProductRecord[]>;
207
+ /** `extras` are opaque product-column values written in the SAME statement
208
+ * as the record (single-write creation), or ignored when the table has no
209
+ * extra columns. */
210
+ insert(record: WorkProductRecord, extras?: Record<string, unknown>): Promise<WorkProductRecord>;
211
+ /** CAS: apply `patch` ONLY when guard fields equal stored values; null on a
212
+ * miss — typed conflict, never a clobber. */
213
+ update(id: string, guard: WorkProductUpdateGuard, patch: WorkProductPatch): Promise<WorkProductRecord | null>;
214
+ appendEvent(event: WorkProductAuditEvent): Promise<void>;
215
+ }
216
+ /** Validation result whose failure names the exact field, so a tool layer can
217
+ * hand the model a correctable error it can act on. */
218
+ type WorkProductParseResult<T> = {
219
+ ok: true;
220
+ value: T;
221
+ } | {
222
+ ok: false;
223
+ field: string;
224
+ error: string;
225
+ };
226
+ /** Validate one raw evidence entry field-by-field. `path` prefixes the failure
227
+ * field name (e.g. `entries[3]`) so batched calls name the exact offender. */
228
+ declare function parseEvidenceInput(raw: unknown, path?: string): WorkProductParseResult<EvidenceEntry>;
229
+ /** Validate one raw exception entry field-by-field. Kind MEMBERSHIP in the
230
+ * product vocabulary is the tool layer's check (it owns the config). */
231
+ declare function parseExceptionInput(raw: unknown, path?: string): WorkProductParseResult<ExceptionEntry>;
232
+ /** Validate a raw artifact. Kind MEMBERSHIP in `artifactKinds` is the tool
233
+ * layer's check. An artifact must carry a body: at least one of `path`,
234
+ * `content`, or `fields`. */
235
+ declare function parseArtifactInput(raw: unknown, path?: string): WorkProductParseResult<WorkProductArtifact>;
236
+ /** Agent self-reported check input for `submit_work_product` (persisted with
237
+ * `source: 'agent'`; `platform`/`judge` sources are never model-suppliable). */
238
+ interface AgentCheckInput {
239
+ id: string;
240
+ name: string;
241
+ passed: boolean;
242
+ detail?: string;
243
+ }
244
+ /** Validate one agent self-check ensuring identifiers, verdict flag, and optional detail are well formed */
245
+ declare function parseAgentCheckInput(raw: unknown, path?: string): WorkProductParseResult<AgentCheckInput>;
246
+ /**
247
+ * The persisted `type:'work_product'` transcript anchor — the chat card that
248
+ * keeps chat the driver surface for review. The PLATFORM writes it on the
249
+ * ready transition (and updates it on a verdict); no prompt ever teaches an
250
+ * agent to author one. `/chat-store` aliases this as `ChatWorkProductPart` in
251
+ * its stored-part union, exactly like the `interaction`/`plan` members.
252
+ */
253
+ interface WorkProductPersistedPart {
254
+ type: 'work_product';
255
+ ref: WorkProductRef;
256
+ kind: string;
257
+ title: string;
258
+ status: WorkProductStatus;
259
+ }
260
+ /** Project the transcript anchor part from a record. Requires the submitted
261
+ * artifact (the anchor is written on the ready transition, after which
262
+ * `artifact` is always non-null); falls back to the scopeKey label for
263
+ * defensive callers on an accumulating draft. */
264
+ declare function workProductToPersistedPart(record: WorkProductRecord): WorkProductPersistedPart;
265
+ /** Re-validate a stored/wire part into the typed anchor; null for junk. */
266
+ declare function persistedPartToWorkProduct(part: Record<string, unknown>): WorkProductPersistedPart | null;
267
+
268
+ export { type AgentCheckInput as A, type EvidenceEntry as E, type ProfileBacktestSummary as P, type QualityCheck as Q, type WorkProductArtifact as W, type EvidenceLocator as a, type ExceptionEntry as b, type ExceptionSeverity as c, type WorkProductAuditEvent as d, type WorkProductParseResult as e, type WorkProductPatch as f, type WorkProductPersistedPart as g, type WorkProductProvenance as h, type WorkProductRecord as i, type WorkProductRef as j, type WorkProductStatus as k, type WorkProductStorePort as l, type WorkProductUpdateGuard as m, type WorkProductVersionEntry as n, isWorkProductStatus as o, parseAgentCheckInput as p, parseArtifactInput as q, parseEvidenceInput as r, parseExceptionInput as s, persistedPartToWorkProduct as t, unresolvedBlockingExceptions as u, workProductToPersistedPart as w };
@@ -5,14 +5,17 @@ export { C as ChatFreeTextField, e as ComposerAnswerDelivery, I as INTERACTION_C
5
5
  import { ChatPlan } from '../plans/index.js';
6
6
  import { InteractionData } from '@tangle-network/agent-interface';
7
7
  export { InteractionData, InteractionOutcome, InteractionRequest } from '@tangle-network/agent-interface';
8
- import { K as FileMention, f as ChatMentionPart, a as ChatAttachmentPart, C as ChatAttachmentKind, O as ChatAttachmentInput } from '../parts-Bg8qcDvB.js';
9
- export { e as ChatMentionKind, N as ChatTurnFilePartInput, M as ChatTurnPartInput, L as ChatTurnRequestPayload, R as DISPATCH_MAX_MEDIA_PARTS, T as DISPATCH_MAX_PARTS, U as DISPATCH_REQUEST_MAX_BYTES, V as DISPATCH_STRUCTURAL_RESERVE_BYTES, Z as ProducerErrorEvent, _ as ProducerNoticeEvent, $ as ProducerPassthroughEvent, a0 as ProducerPassthroughEventType, a1 as ProducerReasoningEvent, a2 as ProducerTextEvent, a3 as ProducerToolCallEvent, a4 as ProducerToolResultEvent, a5 as ProducerUsageEvent, a6 as ProducerWireEvent, t as attachmentInputToPart, u as attachmentKindForMime, v as attachmentPartsFromMessageParts, a9 as base64WireLen, aa as buildMentionPromptBlock, ab as chatTurnRequestInit, ac as fileMentionsToParts, y as isChatAttachmentPart, ae as mediaTypeForMentionPath, H as mentionInputToPart, af as mentionKindForPath, I as mentionPartsFromMessageParts } from '../parts-Bg8qcDvB.js';
8
+ import { M as FileMention, f as ChatMentionPart, a as ChatAttachmentPart, C as ChatAttachmentKind, Q as ChatAttachmentInput } from '../parts-2ymE5cs-.js';
9
+ export { e as ChatMentionKind, P as ChatTurnFilePartInput, O as ChatTurnPartInput, N as ChatTurnRequestPayload, U as DISPATCH_MAX_MEDIA_PARTS, V as DISPATCH_MAX_PARTS, W as DISPATCH_REQUEST_MAX_BYTES, X as DISPATCH_STRUCTURAL_RESERVE_BYTES, $ as ProducerErrorEvent, a0 as ProducerNoticeEvent, a1 as ProducerPassthroughEvent, a2 as ProducerPassthroughEventType, a3 as ProducerReasoningEvent, a4 as ProducerTextEvent, a5 as ProducerToolCallEvent, a6 as ProducerToolResultEvent, a7 as ProducerUsageEvent, a8 as ProducerWireEvent, u as attachmentInputToPart, v as attachmentKindForMime, w as attachmentPartsFromMessageParts, ab as base64WireLen, ac as buildMentionPromptBlock, ad as chatTurnRequestInit, ae as fileMentionsToParts, z as isChatAttachmentPart, ag as mediaTypeForMentionPath, J as mentionInputToPart, ah as mentionKindForPath, K as mentionPartsFromMessageParts } from '../parts-2ymE5cs-.js';
10
+ import { E as EvidenceEntry, b as ExceptionEntry, h as WorkProductProvenance, P as ProfileBacktestSummary, Q as QualityCheck, g as WorkProductPersistedPart, k as WorkProductStatus } from '../types-CEchbvgz.js';
10
11
  import { S as StepAgentActivity } from '../agent-activity-C8ZG0F0M.js';
11
12
  import { a as FlowTrace } from '../flow-types-CqomVAUN.js';
13
+ import { a as ReviewQueueItem, c as ReviewQueueState } from '../queue-C24V13h9.js';
14
+ export { p as parseReviewQueueItem } from '../queue-C24V13h9.js';
12
15
  export { S as SandboxTerminalConnection, a as SandboxTerminalConnectionResponse, U as UseSandboxTerminalConnectionOptions, b as UseSandboxTerminalConnectionResult, t as tabTerminalConnectionId, u as useSandboxTerminalConnection } from '../sandbox-terminal-ChNEdHF8.js';
13
16
  import { CatalogModel } from '../catalog/index.js';
14
17
  import { Harness } from '../harness/index.js';
15
- export { a as ATTACHMENT_ACCEPT, e as FileIndexReadyResponse, f as FileIndexResponse, g as FileIndexWarmingResponse } from '../attachment-validation-B2FFna9E.js';
18
+ export { a as ATTACHMENT_ACCEPT, e as FileIndexReadyResponse, f as FileIndexResponse, g as FileIndexWarmingResponse } from '../attachment-validation-Dv1A_Puy.js';
16
19
  export { d as attachmentPartKey } from '../stream-normalizer-QYUl4vnl.js';
17
20
 
18
21
  /** Represent durable plan decisions as either approved or rejected */
@@ -1049,6 +1052,88 @@ interface AgentActivityPanelProps {
1049
1052
  */
1050
1053
  declare function AgentActivityPanel({ fetchActivity, renderMissionRef, title, emptyLabel }: AgentActivityPanelProps): react.JSX.Element;
1051
1054
 
1055
+ /** Human label for a queue state. */
1056
+ declare function reviewQueueStateLabel(state: ReviewQueueState): string;
1057
+ /** Human label for a work-product status. */
1058
+ declare function workProductStatusLabel(status: WorkProductStatus): string;
1059
+ /** Every persisted work-product anchor on one message, re-validated. */
1060
+ declare function workProductPartsFromMessageParts(parts: ReadonlyArray<Record<string, unknown>> | null | undefined): WorkProductPersistedPart[];
1061
+ /** Properties for the transcript anchor card rendered in chat */
1062
+ interface WorkProductCardProps {
1063
+ part: WorkProductPersistedPart;
1064
+ /** Open the work product (queue detail / pane) — the card's only action. */
1065
+ onOpen?: (part: WorkProductPersistedPart) => void;
1066
+ className?: string;
1067
+ }
1068
+ /** The chat transcript anchor card for one work-product version — a compact,
1069
+ * system-authored pointer, not a parallel review surface. */
1070
+ declare function WorkProductCard({ part, onOpen, className }: WorkProductCardProps): react.JSX.Element;
1071
+ /** One fetched page of queue items with an optional continuation cursor */
1072
+ interface ReviewQueuePage {
1073
+ items: ReviewQueueItem[];
1074
+ /** Opaque continuation token; absent ⇒ no further pages. */
1075
+ nextCursor?: string;
1076
+ }
1077
+ /** Properties for the review queue panel over a fetch data port */
1078
+ interface ReviewQueuePanelProps {
1079
+ /** Data port — fetch one page of queue items (the projection's output,
1080
+ * re-validated here at the JSON boundary). */
1081
+ fetchQueue: (cursor?: string) => Promise<ReviewQueuePage>;
1082
+ /** Open one queue item (navigate to its thread / detail pane). */
1083
+ onSelect?: (item: ReviewQueueItem) => void;
1084
+ title?: string;
1085
+ emptyLabel?: string;
1086
+ className?: string;
1087
+ }
1088
+ /** Merge a fetched page into held rows: dedupe by scopeKey, incoming wins,
1089
+ * newest updatedAt first. Exported for tests. */
1090
+ declare function mergeReviewQueuePages(existing: ReviewQueueItem[], incoming: ReviewQueueItem[]): ReviewQueueItem[];
1091
+ /** The workspace review queue — cursor-paged, refreshable, selection via
1092
+ * callback. States, counts, and provenance render from the projection; the
1093
+ * panel holds no domain logic. */
1094
+ declare function ReviewQueuePanel({ fetchQueue, onSelect, title, emptyLabel, className, }: ReviewQueuePanelProps): react.JSX.Element;
1095
+ /** Properties for the evidence lineage table with source click-through */
1096
+ interface EvidenceLineageTableProps {
1097
+ evidence: readonly EvidenceEntry[];
1098
+ /** Resolve one entry's source document to an openable URL (signed
1099
+ * object-store/vault download) — the `resolveFileUrl` pattern. Absent →
1100
+ * sources render as plain refs without links. */
1101
+ resolveSourceUrl?: (entry: EvidenceEntry) => string;
1102
+ className?: string;
1103
+ }
1104
+ /** Target → claim → source lineage rows: the "every material value traceable
1105
+ * to source evidence" surface. Each row names the artifact target, the
1106
+ * claim, and the source document location supporting it. */
1107
+ declare function EvidenceLineageTable({ evidence, resolveSourceUrl, className }: EvidenceLineageTableProps): react.JSX.Element;
1108
+ /** Properties for the severity-badged exception list */
1109
+ interface ExceptionListProps {
1110
+ exceptions: readonly ExceptionEntry[];
1111
+ className?: string;
1112
+ }
1113
+ /** Severity-badged exception rows with resolution state. */
1114
+ declare function ExceptionList({ exceptions, className }: ExceptionListProps): react.JSX.Element;
1115
+ /** Properties for the pass/fail quality check list */
1116
+ interface QualityCheckListProps {
1117
+ checks: readonly QualityCheck[];
1118
+ className?: string;
1119
+ }
1120
+ /** Pass/fail quality-check rows tagged with their source (agent self-report,
1121
+ * platform gate, judge ensemble). */
1122
+ declare function QualityCheckList({ checks, className }: QualityCheckListProps): react.JSX.Element;
1123
+ /** Properties for the provenance stamp with the optional backtest slot */
1124
+ interface ProvenanceStampProps {
1125
+ provenance: Pick<WorkProductProvenance, 'profileHash' | 'runId' | 'servingModels'> & Partial<Pick<WorkProductProvenance, 'costUsd' | 'producedAt'>>;
1126
+ /** The product-resolved backtest summary for this profile hash. When its
1127
+ * trust gate failed, the composite renders as "quality: unverified" —
1128
+ * never a naked number. */
1129
+ backtest?: ProfileBacktestSummary;
1130
+ className?: string;
1131
+ }
1132
+ /** The audit line a reviewer approves against: which configuration produced
1133
+ * this document, what served it, and how that configuration measured on its
1134
+ * backtest. */
1135
+ declare function ProvenanceStamp({ provenance, backtest, className }: ProvenanceStampProps): react.JSX.Element;
1136
+
1052
1137
  /**
1053
1138
  * `SeatPaywall` — the shared "unlock this product" screen every agent app
1054
1139
  * shows when a user has no active seat and has spent past the free tier. One
@@ -1331,6 +1416,13 @@ interface ChatMessagesProps {
1331
1416
  * row next to the bubble — thumbnails for images, download chips for files.
1332
1417
  * Absent → today's rendering, byte-identical (no attachment row). */
1333
1418
  resolveAttachmentUrl?: (part: ChatAttachmentPart) => string;
1419
+ /** Render persisted `type:'work_product'` anchor parts as `WorkProductCard`
1420
+ * rows under the message body — the chat card that keeps chat the driver
1421
+ * surface for review. `onOpen` opens the product's queue/detail surface.
1422
+ * Absent → today's rendering, byte-identical (no card row). */
1423
+ workProductCards?: {
1424
+ onOpen?: (part: WorkProductPersistedPart) => void;
1425
+ };
1334
1426
  }
1335
1427
  /** One starting "door" in the chat first-run state — a concrete, labeled action
1336
1428
  * (start from a template, do it by hand, ask the agent), not a placeholder. */
@@ -1375,6 +1467,6 @@ declare function useThinkingSeconds(active: boolean): number;
1375
1467
  * model id, tokens/sec, and cost, plus a collapsible thinking section and
1376
1468
  * tool-call chips.
1377
1469
  */
1378
- declare function ChatMessages({ messages, models, renderMarkdown, renderExtras, durableCards, userLabel, agentLabel, loading, approval, onToolCallClick, toolRenderers, error, onRetry, renderEmpty, emptyState, header, resolveAttachmentUrl, }: ChatMessagesProps): react.JSX.Element;
1470
+ declare function ChatMessages({ messages, models, renderMarkdown, renderExtras, durableCards, userLabel, agentLabel, loading, approval, onToolCallClick, toolRenderers, error, onRetry, renderEmpty, emptyState, header, resolveAttachmentUrl, workProductCards, }: ChatMessagesProps): react.JSX.Element;
1379
1471
 
1380
- export { type ActivityTone, type AgentActivityPage, AgentActivityPanel, type AgentActivityPanelProps, type AgentActivityRecord, AgentSessionControls, type AgentSessionControlsProps, type AttachmentFileResult, CatalogModel, ChatAttachmentInput, ChatAttachmentKind, ChatAttachmentPart, ChatComposer, type ChatComposerProps, type ChatEmptyDoor, ChatEmptyState, type ChatEmptyStateProps, ChatInteraction, ChatInteractionField, type ChatInteractionRestoreMode, ChatInteractionStatus, ChatMentionPart, type ChatMessageMetrics, type ChatMessageSegment, ChatMessages, type ChatMessagesProps, ChatSelectField, type ChatStreamCallbacks, type ChatStreamToolCall, type ChatStreamToolResult, type ChatToolCallInfo, type ChatUiMessage, type ComposerFile, type ComposerFilePart, type ComposerMentionProp, type ConsumeChatStreamResult, DEFAULT_EFFORT_LEVELS, DEFAULT_MENTION_EMPTY_TEXT, DEFAULT_MENTION_LIMIT, type DurableChatCard, DurableChatCards, type DurableChatCardsProps, type DurableInteractionAnswerSubmitterOptions, DurablePlanCard, type DurablePlanCardProps, DurablePlanClientError, type DurablePlanCurrentInput, type DurablePlanDecision, type DurablePlanDecisionClient, type DurablePlanDecisionClientOptions, type DurablePlanDecisionInput, type DurablePlanDecisionResult, type DurablePlanFollowUpReceipt, type EffortLevel, EffortPicker, type EffortPickerProps, type FieldValues, FileMention, FlowWaterfall, type FlowWaterfallProps, INDEX_REFRESH_AFTER_MS, INTERACTION_SUBMIT_TIMEOUT_MESSAGE, INTERACTION_SUBMIT_TIMEOUT_MS, InteractionActionButton, type InteractionAnswerSubmission, type InteractionAnswerSubmitterOptions, InteractionAnswers, type InteractionAttemptStore, InteractionBadge, type InteractionBadgeVariant, InteractionCancelData, InteractionPlanCard, type InteractionPlanCardProps, InteractionQuestionCard, type InteractionQuestionCardProps, InteractionRequestWire, type InteractionSubmitResult, type MentionItem, type MentionTextSegment, MessageAttachments, type MessageAttachmentsProps, MissionActivityLane, type MissionActivityLaneProps, ModelPicker, type ModelPickerProps, type ProposalApprovalHandlers, ProviderLogo, type ProviderLogoProps, QuestionOptionList, type QuestionOptionListProps, type RestoreChatInteractionsOptions, RunDrillIn, type RunDrillInProps, SeatPaywall, type SeatPaywallProps, type SmoothRevealOptions, type StreamChatOptions, type SubmitInteractionAnswer, type ToolDetailRenderers, type ToolRunRecord, type ToolRunStep, type UseChatInteractionsOptions, type UseChatInteractionsResult, type UseComposerAttachmentsOptions, type UseComposerAttachmentsResult, type UseDurablePlanFlowOptions, type UseDurablePlanFlowResult, type UseFileMentionsOptions, type UseFileMentionsResult, type WaterfallRow, __resetAttachmentFileCacheForTests, activityTone, buildAnswerData, cancelChatInteraction, consumeChatStream, createDurableInteractionAnswerSubmitter, createDurablePlanDecisionClient, createInteractionAnswerSubmitter, createMemoryInteractionAttemptStore, createSessionInteractionAttemptStore, dispatchChatStreamLine, durableChatCardsFromParts, fieldAnswer, fieldValuesFromAnswers, formatActivityCost, formatActivityDuration, formatModelCost, formatTokensPerSecond, hasSecretField, hydrateChatInteractions, interactionStatusLabels, interactionSubmissionSignature, interactionTerminalNotes, isLateAnswerableStatus, lateAnswerMessage, loadAttachmentFile, mergeActivityPages, nextRevealCount, pendingApprovalOf, rankFileMentions, resolveChatInteraction, responseErrorMessage, restoreChatInteractions, segmentMentionContent, settleInteractionSubmit, streamChatTurn, terminalizePendingChatInteractions, triggerAttachmentDownload, upsertChatInteraction, useChatInteractions, useComposerAttachments, useDurablePlanFlow, useFileMentions, usePending, usePopover, useSmoothText, useThinkingSeconds, waterfallLayout };
1472
+ export { type ActivityTone, type AgentActivityPage, AgentActivityPanel, type AgentActivityPanelProps, type AgentActivityRecord, AgentSessionControls, type AgentSessionControlsProps, type AttachmentFileResult, CatalogModel, ChatAttachmentInput, ChatAttachmentKind, ChatAttachmentPart, ChatComposer, type ChatComposerProps, type ChatEmptyDoor, ChatEmptyState, type ChatEmptyStateProps, ChatInteraction, ChatInteractionField, type ChatInteractionRestoreMode, ChatInteractionStatus, ChatMentionPart, type ChatMessageMetrics, type ChatMessageSegment, ChatMessages, type ChatMessagesProps, ChatSelectField, type ChatStreamCallbacks, type ChatStreamToolCall, type ChatStreamToolResult, type ChatToolCallInfo, type ChatUiMessage, type ComposerFile, type ComposerFilePart, type ComposerMentionProp, type ConsumeChatStreamResult, DEFAULT_EFFORT_LEVELS, DEFAULT_MENTION_EMPTY_TEXT, DEFAULT_MENTION_LIMIT, type DurableChatCard, DurableChatCards, type DurableChatCardsProps, type DurableInteractionAnswerSubmitterOptions, DurablePlanCard, type DurablePlanCardProps, DurablePlanClientError, type DurablePlanCurrentInput, type DurablePlanDecision, type DurablePlanDecisionClient, type DurablePlanDecisionClientOptions, type DurablePlanDecisionInput, type DurablePlanDecisionResult, type DurablePlanFollowUpReceipt, type EffortLevel, EffortPicker, type EffortPickerProps, EvidenceLineageTable, type EvidenceLineageTableProps, ExceptionList, type ExceptionListProps, type FieldValues, FileMention, FlowWaterfall, type FlowWaterfallProps, INDEX_REFRESH_AFTER_MS, INTERACTION_SUBMIT_TIMEOUT_MESSAGE, INTERACTION_SUBMIT_TIMEOUT_MS, InteractionActionButton, type InteractionAnswerSubmission, type InteractionAnswerSubmitterOptions, InteractionAnswers, type InteractionAttemptStore, InteractionBadge, type InteractionBadgeVariant, InteractionCancelData, InteractionPlanCard, type InteractionPlanCardProps, InteractionQuestionCard, type InteractionQuestionCardProps, InteractionRequestWire, type InteractionSubmitResult, type MentionItem, type MentionTextSegment, MessageAttachments, type MessageAttachmentsProps, MissionActivityLane, type MissionActivityLaneProps, ModelPicker, type ModelPickerProps, type ProposalApprovalHandlers, ProvenanceStamp, type ProvenanceStampProps, ProviderLogo, type ProviderLogoProps, QualityCheckList, type QualityCheckListProps, QuestionOptionList, type QuestionOptionListProps, type RestoreChatInteractionsOptions, ReviewQueueItem, type ReviewQueuePage, ReviewQueuePanel, type ReviewQueuePanelProps, ReviewQueueState, RunDrillIn, type RunDrillInProps, SeatPaywall, type SeatPaywallProps, type SmoothRevealOptions, type StreamChatOptions, type SubmitInteractionAnswer, type ToolDetailRenderers, type ToolRunRecord, type ToolRunStep, type UseChatInteractionsOptions, type UseChatInteractionsResult, type UseComposerAttachmentsOptions, type UseComposerAttachmentsResult, type UseDurablePlanFlowOptions, type UseDurablePlanFlowResult, type UseFileMentionsOptions, type UseFileMentionsResult, type WaterfallRow, WorkProductCard, type WorkProductCardProps, __resetAttachmentFileCacheForTests, activityTone, buildAnswerData, cancelChatInteraction, consumeChatStream, createDurableInteractionAnswerSubmitter, createDurablePlanDecisionClient, createInteractionAnswerSubmitter, createMemoryInteractionAttemptStore, createSessionInteractionAttemptStore, dispatchChatStreamLine, durableChatCardsFromParts, fieldAnswer, fieldValuesFromAnswers, formatActivityCost, formatActivityDuration, formatModelCost, formatTokensPerSecond, hasSecretField, hydrateChatInteractions, interactionStatusLabels, interactionSubmissionSignature, interactionTerminalNotes, isLateAnswerableStatus, lateAnswerMessage, loadAttachmentFile, mergeActivityPages, mergeReviewQueuePages, nextRevealCount, pendingApprovalOf, rankFileMentions, resolveChatInteraction, responseErrorMessage, restoreChatInteractions, reviewQueueStateLabel, segmentMentionContent, settleInteractionSubmit, streamChatTurn, terminalizePendingChatInteractions, triggerAttachmentDownload, upsertChatInteraction, useChatInteractions, useComposerAttachments, useDurablePlanFlow, useFileMentions, usePending, usePopover, useSmoothText, useThinkingSeconds, waterfallLayout, workProductPartsFromMessageParts, workProductStatusLabel };
@@ -74,15 +74,30 @@ import {
74
74
  useSmoothText,
75
75
  useThinkingSeconds,
76
76
  waterfallLayout
77
- } from "../chunk-YTSEDJWA.js";
77
+ } from "../chunk-RXOTWZ4G.js";
78
+ import {
79
+ EvidenceLineageTable,
80
+ ExceptionList,
81
+ ProvenanceStamp,
82
+ QualityCheckList,
83
+ ReviewQueuePanel,
84
+ WorkProductCard,
85
+ mergeReviewQueuePages,
86
+ reviewQueueStateLabel,
87
+ workProductPartsFromMessageParts,
88
+ workProductStatusLabel
89
+ } from "../chunk-UDSY2F6N.js";
78
90
  import {
79
91
  tabTerminalConnectionId,
80
92
  useSandboxTerminalConnection
81
93
  } from "../chunk-HCOROIRT.js";
82
94
  import {
83
95
  ATTACHMENT_ACCEPT
84
- } from "../chunk-FMDMI25K.js";
96
+ } from "../chunk-V55WJSR4.js";
85
97
  import "../chunk-FBVLEGEG.js";
98
+ import {
99
+ parseReviewQueueItem
100
+ } from "../chunk-UP33Z633.js";
86
101
  import {
87
102
  DISPATCH_MAX_MEDIA_PARTS,
88
103
  DISPATCH_MAX_PARTS,
@@ -100,7 +115,8 @@ import {
100
115
  mentionInputToPart,
101
116
  mentionKindForPath,
102
117
  mentionPartsFromMessageParts
103
- } from "../chunk-X3N2H6JE.js";
118
+ } from "../chunk-AFNTRJQ7.js";
119
+ import "../chunk-F2CBC4DY.js";
104
120
  import {
105
121
  attachmentPartKey
106
122
  } from "../chunk-5EPIPT4V.js";
@@ -149,6 +165,8 @@ export {
149
165
  DurablePlanCard,
150
166
  DurablePlanClientError,
151
167
  EffortPicker,
168
+ EvidenceLineageTable,
169
+ ExceptionList,
152
170
  FlowWaterfall,
153
171
  INDEX_REFRESH_AFTER_MS,
154
172
  INTERACTION_CANCEL_EVENT,
@@ -163,10 +181,14 @@ export {
163
181
  MessageAttachments,
164
182
  MissionActivityLane,
165
183
  ModelPicker,
184
+ ProvenanceStamp,
166
185
  ProviderLogo,
186
+ QualityCheckList,
167
187
  QuestionOptionList,
188
+ ReviewQueuePanel,
168
189
  RunDrillIn,
169
190
  SeatPaywall,
191
+ WorkProductCard,
170
192
  __resetAttachmentFileCacheForTests,
171
193
  activityTone,
172
194
  attachmentInputToPart,
@@ -219,12 +241,14 @@ export {
219
241
  mentionKindForPath,
220
242
  mentionPartsFromMessageParts,
221
243
  mergeActivityPages,
244
+ mergeReviewQueuePages,
222
245
  nextRevealCount,
223
246
  noticePart,
224
247
  noticePartKey,
225
248
  parseInteractionAnswers,
226
249
  parseInteractionCancel,
227
250
  parseInteractionRequest,
251
+ parseReviewQueueItem,
228
252
  pendingApprovalOf,
229
253
  persistedPartToInteraction,
230
254
  questionInteractionContentSignature,
@@ -232,6 +256,7 @@ export {
232
256
  resolveChatInteraction,
233
257
  responseErrorMessage,
234
258
  restoreChatInteractions,
259
+ reviewQueueStateLabel,
235
260
  segmentMentionContent,
236
261
  settleInteractionSubmit,
237
262
  stampInteractionAnswers,
@@ -249,6 +274,8 @@ export {
249
274
  useSandboxTerminalConnection,
250
275
  useSmoothText,
251
276
  useThinkingSeconds,
252
- waterfallLayout
277
+ waterfallLayout,
278
+ workProductPartsFromMessageParts,
279
+ workProductStatusLabel
253
280
  };
254
281
  //# sourceMappingURL=index.js.map