@tangle-network/agent-app 0.45.54 → 0.45.56
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.
- package/README.md +1 -1
- package/dist/alerting/index.d.ts +5 -175
- package/dist/alerting/slack.d.ts +176 -0
- package/dist/app-auth/index.d.ts +14 -17
- package/dist/assets/index.d.ts +2 -504
- package/dist/assets/schema.d.ts +264 -0
- package/dist/assets/types.d.ts +237 -0
- package/dist/assistant/AssistantDock.d.ts +56 -0
- package/dist/assistant/AssistantHistory.d.ts +41 -0
- package/dist/assistant/AssistantPanel.d.ts +84 -0
- package/dist/assistant/ProposalCard.d.ts +41 -0
- package/dist/assistant/ResizeHandle.d.ts +19 -0
- package/dist/assistant/client-context.d.ts +20 -0
- package/dist/assistant/client.d.ts +117 -0
- package/dist/assistant/index.d.ts +19 -848
- package/dist/assistant/index.js +3 -3
- package/dist/assistant/launcher.d.ts +23 -0
- package/dist/assistant/persistence.d.ts +26 -0
- package/dist/assistant/presentation.d.ts +99 -0
- package/dist/assistant/provider-label.d.ts +7 -0
- package/dist/assistant/reducer.d.ts +130 -0
- package/dist/assistant/sse.d.ts +24 -0
- package/dist/assistant/time-ago.d.ts +6 -0
- package/dist/assistant/transcript.d.ts +97 -0
- package/dist/assistant/types.d.ts +291 -0
- package/dist/assistant/use-stick-to-bottom.d.ts +28 -0
- package/dist/assistant/useAssistantChat.d.ts +63 -0
- package/dist/assistant/useAssistantModels.d.ts +22 -0
- package/dist/assistant/useAssistantThreads.d.ts +47 -0
- package/dist/assistant/usePanelPrefs.d.ts +55 -0
- package/dist/billing/index.d.ts +19 -21
- package/dist/brand/index.d.ts +16 -10
- package/dist/brand-extraction/extract.d.ts +34 -0
- package/dist/brand-extraction/index.d.ts +12 -214
- package/dist/brand-extraction/map.d.ts +58 -0
- package/dist/brand-extraction/types.d.ts +119 -0
- package/dist/catalog/index.d.ts +11 -101
- package/dist/chat-react/composer-mode-controls.d.ts +14 -0
- package/dist/chat-react/entry-composer.d.ts +92 -0
- package/dist/chat-react/index.d.ts +22 -118
- package/dist/chat-react/index.js +2 -2
- package/dist/chat-react/types.d.ts +11 -0
- package/dist/chat-routes/attachment-store.d.ts +84 -0
- package/dist/chat-routes/attachment-upload.d.ts +89 -0
- package/dist/chat-routes/attachment-validation.d.ts +95 -0
- package/dist/chat-routes/binary-sniff.d.ts +45 -0
- package/dist/chat-routes/completed-sandbox-turn.d.ts +25 -0
- package/dist/chat-routes/detached-turn.d.ts +197 -0
- package/dist/chat-routes/dispatch-parts.d.ts +101 -0
- package/dist/chat-routes/draft-persistence.d.ts +189 -0
- package/dist/chat-routes/durable-projection.d.ts +18 -0
- package/dist/chat-routes/file-index.d.ts +115 -0
- package/dist/chat-routes/index.d.ts +25 -1840
- package/dist/chat-routes/index.js +6 -2
- package/dist/chat-routes/index.js.map +1 -1
- package/dist/chat-routes/model-failover-stream.d.ts +206 -0
- package/dist/chat-routes/promote-file-part.d.ts +84 -0
- package/dist/chat-routes/resolve-attachments.d.ts +72 -0
- package/dist/chat-routes/sandbox-producer.d.ts +146 -0
- package/dist/chat-routes/sandbox-turn-usage.d.ts +4 -0
- package/dist/{stale-turn-lock-DucQzvXu.d.ts → chat-routes/stale-turn-lock.d.ts} +7 -9
- package/dist/chat-routes/turn-routes.d.ts +540 -0
- package/dist/chat-routes/upload.d.ts +84 -0
- package/dist/{wire-DOZ-O6hD.d.ts → chat-routes/wire.d.ts} +41 -44
- package/dist/chat-store/core.d.ts +19 -0
- package/dist/chat-store/index.d.ts +22 -322
- package/dist/{parts-BqIHMdyu.d.ts → chat-store/parts.d.ts} +49 -47
- package/dist/chat-store/schema.d.ts +157 -0
- package/dist/chat-store/store.d.ts +177 -0
- package/dist/{chunk-PVP57G3S.js → chunk-2IFGVBNI.js} +2 -2
- package/dist/{chunk-MQO5ML66.js → chunk-KJ2Q27U7.js} +2 -2
- package/dist/{chunk-CCVG2TL6.js → chunk-YNMPMW3G.js} +64 -2
- package/dist/chunk-YNMPMW3G.js.map +1 -0
- package/dist/config/index.d.ts +13 -18
- package/dist/crypto/index.d.ts +10 -12
- package/dist/crypto/web-token.d.ts +22 -0
- package/dist/design-canvas/apply.d.ts +70 -0
- package/dist/design-canvas/drizzle-store.d.ts +29 -0
- package/dist/design-canvas/drizzle.d.ts +7 -575
- package/dist/{export-presets-mgVulRaV.d.ts → design-canvas/export-presets.d.ts} +18 -22
- package/dist/design-canvas/index.d.ts +22 -268
- package/dist/design-canvas/mcp-entry.d.ts +15 -0
- package/dist/design-canvas/mcp-handler.d.ts +34 -0
- package/dist/design-canvas/mcp-tools.d.ts +30 -0
- package/dist/{model-DnfO_PdJ.d.ts → design-canvas/model.d.ts} +33 -35
- package/dist/{operations-ByJ6yXOW.d.ts → design-canvas/operations.d.ts} +21 -25
- package/dist/design-canvas/schema.d.ts +558 -0
- package/dist/{store-CqfDtnPQ.d.ts → design-canvas/store.d.ts} +8 -12
- package/dist/design-canvas/templates.d.ts +72 -0
- package/dist/design-canvas/validate.d.ts +32 -0
- package/dist/design-canvas-react/components/BleedTrimOverlay.d.ts +22 -0
- package/dist/design-canvas-react/components/BrandKnot.d.ts +11 -0
- package/dist/design-canvas-react/components/CanvasEmptyState.d.ts +32 -0
- package/dist/design-canvas-react/components/CanvasInsertPanel.d.ts +53 -0
- package/dist/{lazy-DrkVyDpe.d.ts → design-canvas-react/components/DesignCanvas.d.ts} +27 -20
- package/dist/design-canvas-react/components/DesignCanvasEditor.d.ts +23 -0
- package/dist/design-canvas-react/components/ElementNode.d.ts +51 -0
- package/dist/design-canvas-react/components/ExportControl.d.ts +21 -0
- package/dist/design-canvas-react/components/GridLayer.d.ts +47 -0
- package/dist/design-canvas-react/components/InlineTextEditor.d.ts +25 -0
- package/dist/design-canvas-react/components/LayersPanel.d.ts +20 -0
- package/dist/design-canvas-react/components/PagesStrip.d.ts +34 -0
- package/dist/design-canvas-react/components/Rulers.d.ts +31 -0
- package/dist/design-canvas-react/components/SelectionLayer.d.ts +51 -0
- package/dist/design-canvas-react/components/SnapGuidesOverlay.d.ts +25 -0
- package/dist/design-canvas-react/components/Toolbar.d.ts +64 -0
- package/dist/design-canvas-react/components/Workspace.d.ts +92 -0
- package/dist/design-canvas-react/components/ZoomControls.d.ts +14 -0
- package/dist/design-canvas-react/components/glyphs.d.ts +46 -0
- package/dist/design-canvas-react/components/icon-button.d.ts +22 -0
- package/dist/design-canvas-react/components/index.d.ts +27 -0
- package/dist/design-canvas-react/components/layer-tree.d.ts +34 -0
- package/dist/design-canvas-react/components/ruler-math.d.ts +78 -0
- package/dist/design-canvas-react/components/transform-math.d.ts +168 -0
- package/dist/{command-stack-TNPWJCzW.d.ts → design-canvas-react/contracts.d.ts} +16 -63
- package/dist/design-canvas-react/engine/command-stack.d.ts +43 -0
- package/dist/design-canvas-react/engine/commands.d.ts +154 -0
- package/dist/design-canvas-react/engine/selection.d.ts +48 -0
- package/dist/design-canvas-react/engine/snap.d.ts +24 -0
- package/dist/design-canvas-react/engine/zoom-pan.d.ts +18 -0
- package/dist/design-canvas-react/engine.d.ts +21 -399
- package/dist/design-canvas-react/export-math.d.ts +104 -0
- package/dist/design-canvas-react/export.d.ts +89 -0
- package/dist/design-canvas-react/index.d.ts +16 -586
- package/dist/design-canvas-react/insert-builders.d.ts +61 -0
- package/dist/design-canvas-react/lazy.d.ts +21 -6
- package/dist/documents/docx.d.ts +50 -0
- package/dist/documents/extract.d.ts +87 -0
- package/dist/documents/index.d.ts +26 -232
- package/dist/documents/media-type.d.ts +33 -0
- package/dist/documents/pdf-inspector.d.ts +5 -9
- package/dist/{types-DrBidf3O.d.ts → documents/types.d.ts} +13 -15
- package/dist/documents/zip.d.ts +56 -0
- package/dist/eval/calibration.d.ts +106 -0
- package/dist/eval/index.d.ts +8 -116
- package/dist/eval-campaign/index.d.ts +11 -12
- package/dist/{trust-gate-Dcm5xSva.d.ts → eval-campaign/trust-gate.d.ts} +5 -9
- package/dist/forms/blank.d.ts +48 -0
- package/dist/forms/fill.d.ts +105 -0
- package/dist/forms/index.d.ts +58 -332
- package/dist/forms/registry.d.ts +115 -0
- package/dist/forms/verify.d.ts +58 -0
- package/dist/harness/index.d.ts +21 -19
- package/dist/intakes/api.d.ts +5 -11
- package/dist/{completion-CvcNUz07.d.ts → intakes/completion.d.ts} +7 -11
- package/dist/intakes/context-sufficiency.d.ts +113 -0
- package/dist/intakes/drizzle/schema.d.ts +338 -0
- package/dist/intakes/drizzle/store.d.ts +75 -0
- package/dist/intakes/drizzle.d.ts +12 -391
- package/dist/intakes/index.d.ts +23 -113
- package/dist/{model-C8U0HZxL.d.ts → intakes/model.d.ts} +15 -17
- package/dist/intakes-react/components/BrandMark.d.ts +10 -0
- package/dist/intakes-react/components/IntakeInterview.d.ts +15 -0
- package/dist/intakes-react/components/index.d.ts +1 -0
- package/dist/intakes-react/contracts.d.ts +42 -0
- package/dist/intakes-react/index.d.ts +12 -47
- package/dist/intakes-react/lazy.d.ts +9 -8
- package/dist/integrations/index.d.ts +10 -12
- package/dist/{contract-OxG_jVMx.d.ts → interactions/contract.d.ts} +40 -42
- package/dist/interactions/index.d.ts +16 -256
- package/dist/interactions/route.d.ts +151 -0
- package/dist/interactions/sidecar.d.ts +100 -0
- package/dist/knowledge/index.d.ts +7 -11
- package/dist/knowledge-loop/index.d.ts +13 -20
- package/dist/legibility/checks/empty-state.d.ts +59 -0
- package/dist/legibility/checks/reachability.d.ts +103 -0
- package/dist/legibility/checks/silent-failure.d.ts +57 -0
- package/dist/legibility/checks/success.d.ts +38 -0
- package/dist/legibility/checks/vocabulary.d.ts +65 -0
- package/dist/legibility/cli-args.d.ts +30 -0
- package/dist/legibility/cli.d.ts +25 -0
- package/dist/legibility/index.d.ts +10 -530
- package/dist/legibility/report.d.ts +22 -0
- package/dist/legibility/scan.d.ts +29 -0
- package/dist/legibility/source.d.ts +132 -0
- package/dist/legibility/suppress.d.ts +36 -0
- package/dist/legibility/types.d.ts +168 -0
- package/dist/legibility/walk-sources.d.ts +21 -0
- package/dist/{agent-activity-C8ZG0F0M.d.ts → missions/agent-activity.d.ts} +3 -5
- package/dist/missions/engine.d.ts +251 -0
- package/dist/missions/events.d.ts +195 -0
- package/dist/missions/index.d.ts +12 -765
- package/dist/missions/plan-parse.d.ts +50 -0
- package/dist/missions/service.d.ts +265 -0
- package/dist/{failover-D-3UXXTb.d.ts → model-resolution/failover.d.ts} +10 -12
- package/dist/model-resolution/index.d.ts +15 -18
- package/dist/object-store/index.d.ts +15 -17
- package/dist/openui/action.d.ts +54 -0
- package/dist/openui/authoring.d.ts +25 -0
- package/dist/openui/index.d.ts +24 -206
- package/dist/openui/route.d.ts +124 -0
- package/dist/openui/segments.d.ts +71 -0
- package/dist/openui/values.d.ts +82 -0
- package/dist/openui-react/index.d.ts +9 -13
- package/dist/peer-floors/check.d.ts +9 -190
- package/dist/peer-floors/cli.d.ts +2 -3
- package/dist/peer-floors/dependency-source.d.ts +178 -0
- package/dist/plans/index.d.ts +13 -14
- package/dist/{billing-BuNlaKlE.d.ts → platform/billing.d.ts} +28 -32
- package/dist/platform/guards.d.ts +79 -0
- package/dist/platform/hub.d.ts +107 -0
- package/dist/platform/index.d.ts +7 -112
- package/dist/{sso-Cm00S61u.d.ts → platform/sso.d.ts} +15 -97
- package/dist/preflight/cli.d.ts +3 -6
- package/dist/preflight/index.d.ts +16 -18
- package/dist/preset-cloudflare/headers.d.ts +12 -0
- package/dist/preset-cloudflare/index.d.ts +22 -74
- package/dist/preset-cloudflare/workflow-instance.d.ts +35 -0
- package/dist/profile/budget.d.ts +72 -0
- package/dist/profile/fingerprint.d.ts +65 -0
- package/dist/profile/index.d.ts +27 -19
- package/dist/prompt/index.d.ts +3 -5
- package/dist/record/drizzle/schema.d.ts +488 -0
- package/dist/record/drizzle/store.d.ts +224 -0
- package/dist/record/drizzle.d.ts +10 -679
- package/dist/record/fold.d.ts +99 -0
- package/dist/record/index.d.ts +13 -13
- package/dist/{fold-DACU7gtf.d.ts → record/model.d.ts} +22 -124
- package/dist/record/ulid.d.ts +12 -0
- package/dist/redact/index.d.ts +14 -16
- package/dist/run/index.d.ts +11 -16
- package/dist/runtime/agent.d.ts +23 -0
- package/dist/runtime/certified-delivery.d.ts +57 -0
- package/dist/runtime/index.d.ts +17 -367
- package/dist/runtime/loop.d.ts +58 -0
- package/dist/runtime/model-catalog.d.ts +103 -0
- package/dist/{model-CdCDfBA9.d.ts → runtime/model.d.ts} +25 -27
- package/dist/runtime/openai-stream.d.ts +126 -0
- package/dist/runtime/surface-profile.d.ts +115 -0
- package/dist/sandbox/binary-read.d.ts +63 -0
- package/dist/sandbox/diagnostics.d.ts +69 -0
- package/dist/sandbox/index.d.ts +103 -1085
- package/dist/sandbox/model.d.ts +179 -0
- package/dist/sandbox/outcome.d.ts +10 -0
- package/dist/sandbox/prewarm-claim-d1.d.ts +80 -0
- package/dist/sandbox/prewarm.d.ts +193 -0
- package/dist/sandbox/recovery.d.ts +216 -0
- package/dist/sandbox/terminal-connection.d.ts +145 -0
- package/dist/sandbox/workspace-sandbox-manager.d.ts +44 -0
- package/dist/sequences/apply.d.ts +54 -0
- package/dist/sequences/captions.d.ts +91 -0
- package/dist/sequences/drizzle-store.d.ts +36 -0
- package/dist/sequences/drizzle.d.ts +7 -1252
- package/dist/sequences/exports.d.ts +138 -0
- package/dist/sequences/index.d.ts +19 -340
- package/dist/sequences/mcp-entry.d.ts +15 -0
- package/dist/sequences/mcp-handler.d.ts +39 -0
- package/dist/sequences/mcp-tools.d.ts +47 -0
- package/dist/{store-B7LLlk9p.d.ts → sequences/model.d.ts} +26 -110
- package/dist/sequences/operations.d.ts +126 -0
- package/dist/sequences/schema.d.ts +1231 -0
- package/dist/sequences/store.d.ts +81 -0
- package/dist/sequences/validate.d.ts +98 -0
- package/dist/sequences-react/components/BrandMark.d.ts +10 -0
- package/dist/sequences-react/components/PreviewCanvas.d.ts +26 -0
- package/dist/sequences-react/components/SnapIndicatorLine.d.ts +11 -0
- package/dist/sequences-react/components/TimelineClipChip.d.ts +80 -0
- package/dist/sequences-react/components/TimelineEditor.d.ts +44 -0
- package/dist/sequences-react/components/TimelineEmptyState.d.ts +21 -0
- package/dist/sequences-react/components/TimelineGhostLanes.d.ts +14 -0
- package/dist/sequences-react/components/TimelinePlayhead.d.ts +11 -0
- package/dist/sequences-react/components/TimelineRuler.d.ts +16 -0
- package/dist/sequences-react/components/TimelineSmallScreenGate.d.ts +12 -0
- package/dist/sequences-react/components/TimelineTrackRow.d.ts +51 -0
- package/dist/sequences-react/components/ZoomControl.d.ts +15 -0
- package/dist/sequences-react/components/composite-command.d.ts +8 -0
- package/dist/sequences-react/components/glyphs.d.ts +26 -0
- package/dist/sequences-react/components/index.d.ts +31 -0
- package/dist/sequences-react/components/interaction-math.d.ts +103 -0
- package/dist/sequences-react/contracts.d.ts +187 -0
- package/dist/sequences-react/engine/command-stack.d.ts +18 -0
- package/dist/sequences-react/engine/commands.d.ts +146 -0
- package/dist/sequences-react/engine/playback.d.ts +18 -0
- package/dist/sequences-react/engine/snap.d.ts +29 -0
- package/dist/sequences-react/engine/zoom.d.ts +29 -0
- package/dist/sequences-react/index.d.ts +20 -880
- package/dist/sequences-react/lazy.d.ts +8 -0
- package/dist/sequences-react/media/frame-provider.d.ts +70 -0
- package/dist/sequences-react/media/transcription.d.ts +33 -0
- package/dist/sequences-react/media/waveform.d.ts +34 -0
- package/dist/session-shell/index.d.ts +31 -204
- package/dist/session-shell/nav-guard.d.ts +170 -0
- package/dist/session-shell/path.d.ts +19 -0
- package/dist/signoff/cli.d.ts +4 -7
- package/dist/signoff/config.d.ts +12 -0
- package/dist/signoff/exec.d.ts +44 -0
- package/dist/signoff/index.d.ts +56 -14
- package/dist/signoff/invoked-as-script.d.ts +25 -0
- package/dist/signoff/node-version.d.ts +50 -0
- package/dist/signoff/proof-attach.d.ts +88 -0
- package/dist/signoff/proof-cli.d.ts +1 -0
- package/dist/signoff/proof-fixture.d.ts +13 -0
- package/dist/signoff/proof-from-report.d.ts +22 -0
- package/dist/signoff/proof-git.d.ts +57 -0
- package/dist/signoff/proof-record.d.ts +202 -0
- package/dist/signoff/proof-verify.d.ts +103 -0
- package/dist/signoff/proof.d.ts +35 -310
- package/dist/signoff/report.d.ts +7 -0
- package/dist/{run-D80hoLKh.d.ts → signoff/run.d.ts} +3 -6
- package/dist/signoff/schedule.d.ts +55 -0
- package/dist/signoff/seeds.d.ts +50 -0
- package/dist/signoff/store.d.ts +22 -0
- package/dist/{types-Bd6uW9vQ.d.ts → signoff/types.d.ts} +15 -17
- package/dist/signoff/workflow-pin.d.ts +56 -0
- package/dist/signoff/workspace.d.ts +40 -0
- package/dist/skills/index.d.ts +28 -32
- package/dist/skills-placement/index.d.ts +7 -11
- package/dist/spend/budget.d.ts +123 -0
- package/dist/spend/ceiling.d.ts +51 -0
- package/dist/spend/cli-args.d.ts +20 -0
- package/dist/spend/cli.d.ts +1 -0
- package/dist/spend/fixtures/incident-parked-time.d.ts +55 -0
- package/dist/spend/index.d.ts +38 -1144
- package/dist/spend/liveness.d.ts +131 -0
- package/dist/spend/ownership.d.ts +87 -0
- package/dist/spend/reconcile.d.ts +109 -0
- package/dist/spend/reference.d.ts +42 -0
- package/dist/spend/report.d.ts +12 -0
- package/dist/spend/store.d.ts +123 -0
- package/dist/spend/types.d.ts +466 -0
- package/dist/store/index.d.ts +10 -12
- package/dist/stories/app-shell/fixtures.d.ts +43 -0
- package/dist/stories/app-shell/shell.d.ts +81 -0
- package/dist/stories/assistant/fixtures.d.ts +73 -0
- package/dist/stories/chat/fixtures.d.ts +70 -0
- package/dist/stories/chat/markdown.d.ts +11 -0
- package/dist/stories/chat/run-drill-in.d.ts +19 -0
- package/dist/stories/chat-controls/fixtures.d.ts +116 -0
- package/dist/stories/design-canvas/fixtures.d.ts +57 -0
- package/dist/stories/fixtures/canvas.d.ts +10 -0
- package/dist/stories/fixtures/catalog.d.ts +7 -0
- package/dist/stories/fixtures/chat.d.ts +39 -0
- package/dist/stories/fixtures/index.d.ts +4 -0
- package/dist/stories/fixtures/sequences.d.ts +17 -0
- package/dist/stories/panels/fixtures.d.ts +63 -0
- package/dist/stories/sequences/fixtures.d.ts +30 -0
- package/dist/stories/studio/fixtures.d.ts +22 -0
- package/dist/stream/index.d.ts +10 -56
- package/dist/{stream-normalizer-DKRxyVlZ.d.ts → stream/stream-normalizer.d.ts} +23 -26
- package/dist/{turn-buffer-COMQUwO2.d.ts → stream/turn-buffer.d.ts} +21 -23
- package/dist/stream/turn-identity.d.ts +49 -0
- package/dist/studio/generation.d.ts +179 -0
- package/dist/studio/index.d.ts +12 -181
- package/dist/studio-react/avatar-composer.d.ts +8 -0
- package/dist/studio-react/composer-hero.d.ts +12 -0
- package/dist/studio-react/composer-shell.d.ts +18 -0
- package/dist/studio-react/generation-card.d.ts +9 -0
- package/dist/studio-react/generation-detail-modal.d.ts +11 -0
- package/dist/studio-react/generation-detail.d.ts +6 -0
- package/dist/studio-react/generation-grid.d.ts +15 -0
- package/dist/studio-react/image-composer.d.ts +8 -0
- package/dist/studio-react/index.d.ts +32 -245
- package/dist/studio-react/library-drawer.d.ts +12 -0
- package/dist/studio-react/library-panel.d.ts +15 -0
- package/dist/studio-react/publish-package-composer.d.ts +18 -0
- package/dist/studio-react/result-canvas.d.ts +6 -0
- package/dist/studio-react/speech-composer.d.ts +4 -0
- package/dist/studio-react/studio-header.d.ts +5 -0
- package/dist/studio-react/studio-sheet.d.ts +12 -0
- package/dist/studio-react/studio-workspace.d.ts +23 -0
- package/dist/studio-react/transcription-composer.d.ts +12 -0
- package/dist/studio-react/type-config.d.ts +11 -0
- package/dist/studio-react/use-studio-generations.d.ts +20 -0
- package/dist/studio-react/video-composer.d.ts +10 -0
- package/dist/tangle/index.d.ts +7 -9
- package/dist/teams/drizzle/access.d.ts +82 -0
- package/dist/{invitations-schema-_fI7HkJP.d.ts → teams/drizzle/invitations-schema.d.ts} +39 -27
- package/dist/teams/drizzle/personal-organization.d.ts +41 -0
- package/dist/{access-490O6aOU.d.ts → teams/drizzle/schema.d.ts} +57 -122
- package/dist/teams/drizzle.d.ts +12 -44
- package/dist/teams/index.d.ts +20 -44
- package/dist/teams/invitations-api.d.ts +17 -21
- package/dist/{invitations-DoYMvXea.d.ts → teams/invitations.d.ts} +14 -18
- package/dist/teams/invite.d.ts +42 -0
- package/dist/teams/members-api.d.ts +12 -16
- package/dist/teams/resend.d.ts +3 -13
- package/dist/{roles-B4nU3jDi.d.ts → teams/roles.d.ts} +18 -20
- package/dist/teams-react/components/BrandMark.d.ts +10 -0
- package/dist/teams-react/components/InvitationsPanel.d.ts +13 -0
- package/dist/teams-react/components/InviteAcceptPage.d.ts +10 -0
- package/dist/teams-react/components/MembersPanel.d.ts +14 -0
- package/dist/teams-react/components/RoleSelect.d.ts +17 -0
- package/dist/teams-react/components/index.d.ts +3 -0
- package/dist/teams-react/contracts.d.ts +134 -0
- package/dist/teams-react/index.d.ts +12 -143
- package/dist/teams-react/lazy.d.ts +11 -11
- package/dist/test-setup.d.ts +1 -0
- package/dist/theme/index.d.ts +6 -104
- package/dist/theme/tailwind-preset.d.ts +1 -2
- package/dist/theme/theme.d.ts +106 -0
- package/dist/theme-contract/cli.d.ts +21 -0
- package/dist/theme-contract/index.d.ts +4 -6
- package/dist/{auth-BYtiazA4.d.ts → tools/auth.d.ts} +8 -11
- package/dist/tools/capability.d.ts +54 -0
- package/dist/tools/dispatch.d.ts +37 -0
- package/dist/tools/errors.d.ts +8 -0
- package/dist/tools/gating.d.ts +62 -0
- package/dist/tools/http.d.ts +27 -0
- package/dist/tools/index.d.ts +12 -217
- package/dist/{mcp-rpc-DYwPlYbZ.d.ts → tools/mcp-rpc.d.ts} +7 -9
- package/dist/{mcp-xxoZZfor.d.ts → tools/mcp.d.ts} +14 -16
- package/dist/tools/openai.d.ts +28 -0
- package/dist/tools/registry.d.ts +39 -0
- package/dist/tools/runtime.d.ts +22 -0
- package/dist/{types-B25Mib1r.d.ts → tools/types.d.ts} +15 -83
- package/dist/{flow-types-CJxEmaRy.d.ts → trace/flow-types.d.ts} +2 -4
- package/dist/trace/index.d.ts +11 -148
- package/dist/trace/mission-flow.d.ts +82 -0
- package/dist/trace/mission-trace.d.ts +52 -0
- package/dist/turn-health/classify.d.ts +207 -0
- package/dist/turn-health/index.d.ts +29 -637
- package/dist/turn-health/lifecycle.d.ts +75 -0
- package/dist/turn-health/sink.d.ts +122 -0
- package/dist/turn-health/sweep.d.ts +245 -0
- package/dist/turn-stream/adapters.d.ts +257 -0
- package/dist/turn-stream/core.d.ts +293 -0
- package/dist/turn-stream/do.d.ts +144 -0
- package/dist/turn-stream/index.d.ts +62 -738
- package/dist/turn-stream/memory.d.ts +41 -0
- package/dist/vault/ConfirmDialog.d.ts +22 -0
- package/dist/vault/VaultPane.d.ts +15 -0
- package/dist/{VaultPane-BDP6SB_K.d.ts → vault/contracts.d.ts} +15 -22
- package/dist/vault/index.d.ts +15 -22
- package/dist/vault/lazy.d.ts +9 -7
- package/dist/vault/server.d.ts +8 -10
- package/dist/web/free-route-limit.d.ts +187 -0
- package/dist/web/index.d.ts +15 -207
- package/dist/{rate-limit-BOVmJRXZ.d.ts → web/rate-limit.d.ts} +3 -5
- package/dist/web-react/agent-session-controls.d.ts +105 -0
- package/dist/web-react/async/async-view.d.ts +69 -0
- package/dist/web-react/async/index.d.ts +13 -305
- package/dist/web-react/async/state.d.ts +107 -0
- package/dist/web-react/async/use-async-resource.d.ts +41 -0
- package/dist/web-react/async/use-confirmed-mutation.d.ts +90 -0
- package/dist/web-react/brand-mark.d.ts +11 -0
- package/dist/web-react/chat-attachments.d.ts +21 -0
- package/dist/web-react/chat-composer.d.ts +174 -0
- package/dist/web-react/chat-interactions.d.ts +1 -0
- package/dist/web-react/chat-mentions.d.ts +48 -0
- package/dist/web-react/chat-stream.d.ts +106 -0
- package/dist/web-react/class-names.d.ts +10 -0
- package/dist/web-react/controls.d.ts +265 -0
- package/dist/web-react/durable-chat-cards.d.ts +40 -0
- package/dist/web-react/durable-interaction-submit.d.ts +22 -0
- package/dist/web-react/durable-plan-card.d.ts +13 -0
- package/dist/web-react/durable-plan-flow.d.ts +77 -0
- package/dist/web-react/harness-glyphs.d.ts +28 -0
- package/dist/web-react/index.d.ts +80 -2347
- package/dist/web-react/index.js +3 -3
- package/dist/web-react/inert.d.ts +39 -0
- package/dist/web-react/insight-card.d.ts +203 -0
- package/dist/web-react/interaction-card-support.d.ts +115 -0
- package/dist/web-react/interaction-plan-card.d.ts +39 -0
- package/dist/web-react/interaction-question-card.d.ts +100 -0
- package/dist/web-react/message-attachments.d.ts +56 -0
- package/dist/web-react/mission-activity.d.ts +96 -0
- package/dist/web-react/motion.d.ts +43 -0
- package/dist/web-react/provenance-model.d.ts +195 -0
- package/dist/web-react/provenance.d.ts +82 -0
- package/dist/web-react/provider-logo.d.ts +14 -0
- package/dist/web-react/record-grid-model.d.ts +257 -0
- package/dist/web-react/record-grid.d.ts +108 -0
- package/dist/web-react/sandbox-terminal.d.ts +90 -0
- package/dist/web-react/seat-paywall.d.ts +47 -0
- package/dist/web-react/session-history.d.ts +196 -0
- package/dist/web-react/smooth-text.d.ts +29 -0
- package/dist/web-react/sparkline.d.ts +150 -0
- package/dist/web-react/terminal.d.ts +1 -92
- package/dist/web-react/use-chat-interactions.d.ts +78 -0
- package/dist/web-react/use-composer-attachments.d.ts +111 -0
- package/dist/web-react/use-file-mentions.d.ts +94 -0
- package/dist/web-react/work-product.d.ts +105 -0
- package/dist/work-product/claim-support.d.ts +288 -0
- package/dist/work-product/index.d.ts +16 -849
- package/dist/work-product/provenance.d.ts +61 -0
- package/dist/{queue-VTBA5ONX.d.ts → work-product/queue.d.ts} +10 -12
- package/dist/work-product/quote.d.ts +139 -0
- package/dist/work-product/route.d.ts +88 -0
- package/dist/work-product/service.d.ts +123 -0
- package/dist/work-product/tools.d.ts +144 -0
- package/dist/{types-CCeYywdS.d.ts → work-product/types.d.ts} +29 -31
- package/dist/work-product-react/index.d.ts +19 -8
- package/dist/workspace-react/index.d.ts +8 -11
- package/package.json +4 -3
- package/dist/agent-session-controls-CmlXwp_H.d.ts +0 -384
- package/dist/apply-6wlMOLf8.d.ts +0 -280
- package/dist/attachment-validation-BfJDBU1g.d.ts +0 -261
- package/dist/budget-BOucfcb_.d.ts +0 -142
- package/dist/chunk-CCVG2TL6.js.map +0 -1
- package/dist/values-C7RidJuI.d.ts +0 -156
- /package/dist/{chunk-PVP57G3S.js.map → chunk-2IFGVBNI.js.map} +0 -0
- /package/dist/{chunk-MQO5ML66.js.map → chunk-KJ2Q27U7.js.map} +0 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Assistant-story fixtures: a fully-stubbed `AssistantClient` (no network — the
|
|
3
|
+
* panel's hooks fetch models/threads on mount, and the dock's real
|
|
4
|
+
* `useAssistantChat` streams through it), a controlled `AssistantChat` handle
|
|
5
|
+
* for the panel stories (the same fake the panel's own tests build), and the
|
|
6
|
+
* transcript/proposal data those stories render.
|
|
7
|
+
*
|
|
8
|
+
* The shared `src/stories/fixtures/` chat fixtures model web-react's
|
|
9
|
+
* `ChatUiMessage`; the assistant transcript consumes the FLAT wire
|
|
10
|
+
* `ChatMessage[]` shape (user/assistant/tool/status rows the reducer emits), so
|
|
11
|
+
* this area keeps its own fixtures rather than bending the shared ones.
|
|
12
|
+
*/
|
|
13
|
+
import { type AssistantClient, type AssistantThreadSummary } from '../../assistant';
|
|
14
|
+
import { type AssistantState } from '../../assistant/reducer';
|
|
15
|
+
import type { AssistantStreamEvent, ChatMessage, PendingProposal, UsageInfo } from '../../assistant/types';
|
|
16
|
+
import type { AssistantChat } from '../../assistant/useAssistantChat';
|
|
17
|
+
import type { ComposerFile } from '../../web-react';
|
|
18
|
+
declare const STORY_USER_ID = "u-story";
|
|
19
|
+
/** Past conversations for the history view, newest activity first. */
|
|
20
|
+
export declare const threadSummaries: AssistantThreadSummary[];
|
|
21
|
+
/** A settled two-turn conversation: tool chips with args + outcomes, a status
|
|
22
|
+
* line, and enough prose to judge bubble spacing. */
|
|
23
|
+
export declare const populatedMessages: ChatMessage[];
|
|
24
|
+
/** A settled confirmed action: the proposal flow ended in the quiet status
|
|
25
|
+
* line ("Created workflow …") rather than an assistant-labeled turn. */
|
|
26
|
+
export declare const confirmedMessages: ChatMessage[];
|
|
27
|
+
/** A turn mid-stream: preamble text, a running tool chip, and an open (still
|
|
28
|
+
* empty) bubble the deltas are accumulating into. */
|
|
29
|
+
export declare const streamingMessages: ChatMessage[];
|
|
30
|
+
export declare const streamingReasoning = "The user wants a scheduled post. A cron trigger plus the Slack send step covers it \u2014 checking the workspace connections before proposing anything mutating.";
|
|
31
|
+
/** The turn-level metrics a settled turn leaves behind. */
|
|
32
|
+
export declare const settledUsage: UsageInfo;
|
|
33
|
+
export declare const workflowYaml = "name: launch-poster-monday\ntrigger:\n type: schedule\n cron: \"0 9 * * MON\"\nsteps:\n - id: render\n uses: canvas/export\n with:\n page: page-1\n format: png\n dpi: 144\n - id: post\n uses: slack/send-message\n with:\n channel: \"#launch\"\n text: \"This week's poster: {{ steps.render.outputs.url }}\"\n";
|
|
34
|
+
/** A workflow-authoring proposal awaiting confirmation, with one unconnected
|
|
35
|
+
* requirement (the connect affordance renders) and one satisfied. */
|
|
36
|
+
export declare const workflowProposal: PendingProposal;
|
|
37
|
+
/** A create-key proposal — the scalar-fields card (no body preview). */
|
|
38
|
+
export declare const apiKeyProposal: PendingProposal;
|
|
39
|
+
/** Twenty messages of ordinary back-and-forth — long enough that the transcript
|
|
40
|
+
* scrolls, so spacing and typography evaluate under real rhythm. */
|
|
41
|
+
export declare const longHistoryMessages: ChatMessage[];
|
|
42
|
+
export interface StubClientOptions {
|
|
43
|
+
/** Replace the scripted turn (e.g. an erroring stream). */
|
|
44
|
+
streamEvents?: (req: {
|
|
45
|
+
message: string;
|
|
46
|
+
}) => AssistantStreamEvent[];
|
|
47
|
+
}
|
|
48
|
+
/** Shared instance for stories that don't customize the transport. The model
|
|
49
|
+
* catalog is cached per client (WeakMap in `useAssistantModels`), so sharing
|
|
50
|
+
* one avoids a refetch on every story mount. */
|
|
51
|
+
export declare const stubClient: AssistantClient;
|
|
52
|
+
/**
|
|
53
|
+
* A minimal `AssistantChat` over a controlled state slice — the same fake the
|
|
54
|
+
* panel's tests build, with `console.log` callbacks instead of spies. The
|
|
55
|
+
* panel reads `state` and binds the handlers; the transport is never involved.
|
|
56
|
+
*/
|
|
57
|
+
export declare function makeFakeChat(over?: Partial<AssistantState>): AssistantChat;
|
|
58
|
+
export { STORY_USER_ID };
|
|
59
|
+
/**
|
|
60
|
+
* A story-level stand-in for the host attachment pipeline (web-react's
|
|
61
|
+
* `useComposerAttachments` + an upload route): each picked/dropped file stages
|
|
62
|
+
* as an 'uploading' chip and flips to 'ready' after a beat, so stories exercise
|
|
63
|
+
* the composer's chip lifecycle with no network. `onSend` clears the staged
|
|
64
|
+
* set — wire it to the panel/dock `onComposerSend`.
|
|
65
|
+
*/
|
|
66
|
+
export declare function useStubAttachments(): {
|
|
67
|
+
attachments: {
|
|
68
|
+
onAttach: (files: FileList) => void;
|
|
69
|
+
pendingFiles: ComposerFile[];
|
|
70
|
+
onRemoveFile: (id: string) => void;
|
|
71
|
+
};
|
|
72
|
+
onSend: () => void;
|
|
73
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chat-story fixtures: a long, realistic `ChatUiMessage` thread for spacing and
|
|
3
|
+
* density evaluation, plus the individual edge-state messages (proposal
|
|
4
|
+
* awaiting approval, errored tool call, streaming in progress) exported on
|
|
5
|
+
* their own so stories can render a single state in isolation.
|
|
6
|
+
*
|
|
7
|
+
* NOTE: this duplicates what the shared `src/stories/fixtures/chat.ts` barrel
|
|
8
|
+
* is meant to provide. The shared fixtures directory did not exist in the
|
|
9
|
+
* working tree when these stories were written, so — per house rules — the
|
|
10
|
+
* chat area carries its own copy. If the shared fixtures return, this file can
|
|
11
|
+
* be swapped for barrel imports without touching the stories.
|
|
12
|
+
*
|
|
13
|
+
* Types come from the package source (`../../web-react`) — the same types the
|
|
14
|
+
* chat components consume — so a drift in `ChatUiMessage` fails typecheck here.
|
|
15
|
+
*/
|
|
16
|
+
import type { CatalogModel, ChatToolCallInfo, ChatUiMessage } from '../../web-react';
|
|
17
|
+
/** The catalogue the thread prices against. Every fixture message runs Opus. */
|
|
18
|
+
export declare const chatCatalogModels: CatalogModel[];
|
|
19
|
+
/** A completed sandbox command, args + result captured for the expanded row. */
|
|
20
|
+
export declare const doneShellToolCall: ChatToolCallInfo;
|
|
21
|
+
/**
|
|
22
|
+
* A proposal the human has not ruled on yet: `pendingApprovalOf` keys on
|
|
23
|
+
* `result.status === 'queued_for_approval'` + a proposalId, so the row becomes
|
|
24
|
+
* the Approve/Reject decision card when the story passes `approval` handlers.
|
|
25
|
+
*/
|
|
26
|
+
export declare const proposalToolCall: ChatToolCallInfo;
|
|
27
|
+
/** A tool call whose run failed — the row renders the error state + message. */
|
|
28
|
+
export declare const erroredToolCall: ChatToolCallInfo;
|
|
29
|
+
/** A tool call still executing — no `result` yet, the row shows the spinner. */
|
|
30
|
+
export declare const runningToolCall: ChatToolCallInfo;
|
|
31
|
+
/**
|
|
32
|
+
* A settled `schedule_followup` — NOT a decision and not a failure, so it
|
|
33
|
+
* renders as the quiet follow-up row (its own visual kind).
|
|
34
|
+
*/
|
|
35
|
+
export declare const scheduledFollowupToolCall: ChatToolCallInfo;
|
|
36
|
+
/** Assistant turn whose proposal is still awaiting human approval. */
|
|
37
|
+
export declare const proposalAwaitingApprovalMessage: ChatUiMessage;
|
|
38
|
+
/** Assistant turn whose only tool call failed. */
|
|
39
|
+
export declare const erroredToolCallMessage: ChatUiMessage;
|
|
40
|
+
/**
|
|
41
|
+
* A turn still streaming: partial answer text, a tool call in flight, and no
|
|
42
|
+
* completion metrics yet (no `completionTokens`/`durationMs` — producers only
|
|
43
|
+
* stamp those when the turn settles).
|
|
44
|
+
*/
|
|
45
|
+
export declare const streamingAssistantMessage: ChatUiMessage;
|
|
46
|
+
/**
|
|
47
|
+
* ~16 messages covering every rendered state: plain exchanges, reasoning,
|
|
48
|
+
* per-message metrics, interleaved `segments`, a proposal awaiting approval,
|
|
49
|
+
* an errored tool call, and a trailing in-flight turn. Long enough that the
|
|
50
|
+
* thread scrolls, so spacing/typography stories evaluate real rhythm.
|
|
51
|
+
*/
|
|
52
|
+
export declare const chatThread: ChatUiMessage[];
|
|
53
|
+
/** Three turns — the smallest thread that still shows bubble/answer rhythm. */
|
|
54
|
+
export declare const shortThread: ChatUiMessage[];
|
|
55
|
+
/**
|
|
56
|
+
* Six representative turns (user bubble, assistant + approval card, errored
|
|
57
|
+
* tool, long user message, segmented assistant) for side-by-side density
|
|
58
|
+
* comparisons — compact enough to judge rhythm within one viewport.
|
|
59
|
+
*/
|
|
60
|
+
export declare const densityThread: ChatUiMessage[];
|
|
61
|
+
/** The segmented `usage_report` turn on its own (custom-renderer demos). */
|
|
62
|
+
export declare const usageReportMessage: ChatUiMessage[];
|
|
63
|
+
/**
|
|
64
|
+
* A workflow-authoring session: both assistant turns carry `reasoning`, the
|
|
65
|
+
* first emits four consecutive settled tool calls (past the collapse threshold,
|
|
66
|
+
* so they fold into one "Worked through 4 steps" disclosure), the second
|
|
67
|
+
* interleaves text and tools via `segments` (under the threshold, so the cards
|
|
68
|
+
* render inline, chronologically).
|
|
69
|
+
*/
|
|
70
|
+
export declare const reasoningToolThread: ChatUiMessage[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A tiny dependency-free `renderMarkdown` for the chat stories — the same
|
|
3
|
+
* injection point a real consumer wires its markdown library into. Handles the
|
|
4
|
+
* subset the fixtures actually use: paragraphs, `>` blockquotes, ordered
|
|
5
|
+
* lists, `**bold**`, and `inline code`. Anything richer is the consumer's job.
|
|
6
|
+
*/
|
|
7
|
+
import type { ReactNode } from 'react';
|
|
8
|
+
/** The `renderMarkdown` prop: blocks split on blank lines; a block that is all
|
|
9
|
+
* `>` lines becomes a blockquote, all `N.` lines an ordered list, anything
|
|
10
|
+
* else a pre-wrapped paragraph. */
|
|
11
|
+
export declare function renderMarkdown(content: string): ReactNode;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Story-only wiring for the tool row's "Open full transcript" action. In
|
|
3
|
+
* production the host serves a persisted `ToolRunRecord` per `toolCallId`
|
|
4
|
+
* (fail-closed: only ids its own loop created) and mounts `RunDrillIn` itself;
|
|
5
|
+
* the stories have no server, so they synthesize the record from the call's
|
|
6
|
+
* own args/result. That keeps the demo functional — the button opens the real
|
|
7
|
+
* panel over the transcript — instead of dead-ending on a console.log.
|
|
8
|
+
*/
|
|
9
|
+
import { type ReactNode } from 'react';
|
|
10
|
+
import { type ChatToolCallInfo } from '../../web-react';
|
|
11
|
+
/**
|
|
12
|
+
* Wrap a ChatMessages story so `onToolCallClick` opens the real `RunDrillIn`
|
|
13
|
+
* panel (and still logs, for parity with the other story hosts). The panel is
|
|
14
|
+
* `fixed` against the canvas's right edge, exactly as `ChatControls/RunDrillIn
|
|
15
|
+
* → Over transcript` mounts it.
|
|
16
|
+
*/
|
|
17
|
+
export declare function WithRunDrillIn({ children, }: {
|
|
18
|
+
children: (onToolCallClick: (call: ChatToolCallInfo) => void) => ReactNode;
|
|
19
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chat-controls story fixtures — area-local because the shared
|
|
3
|
+
* `src/stories/fixtures/` barrel is absent from this checkout (the storybook
|
|
4
|
+
* scaffolding was never committed; see the chat-controls handoff note). The
|
|
5
|
+
* catalog list mirrors the documented shared `catalogModels` fixture
|
|
6
|
+
* 1:1 so a later dedupe pass is a pure import swap.
|
|
7
|
+
*
|
|
8
|
+
* Everything here is typed against package source (`../../web-react` and the
|
|
9
|
+
* leaf modules the components themselves import from), so a drift in any of
|
|
10
|
+
* these shapes fails typecheck in this file.
|
|
11
|
+
*/
|
|
12
|
+
import { type ReactNode } from 'react';
|
|
13
|
+
import type { Decorator } from '@storybook/react';
|
|
14
|
+
import type { AgentActivityPage, CatalogModel, ChatAttachmentPart, ChatEmptyDoor, ChatInteraction, ComposerFile, SubmitInteractionAnswer, ToolRunRecord, WorkProductCardProps } from '../../web-react';
|
|
15
|
+
import type { StepAgentActivity } from '../../missions/agent-activity';
|
|
16
|
+
import type { FlowTrace } from '../../trace';
|
|
17
|
+
import type { ChatPlan } from '../../plans';
|
|
18
|
+
import type { WorkProductPersistedPart } from '../../work-product/types';
|
|
19
|
+
import type { ProductSeatOffer } from '../../platform/billing';
|
|
20
|
+
/** Same five-model catalogue the playground ships (`makeModels`). */
|
|
21
|
+
export declare const catalogModels: CatalogModel[];
|
|
22
|
+
export declare const DEFAULT_MODEL_ID: string;
|
|
23
|
+
/** A model with `supportsReasoning: false` — the effort picker hides for it. */
|
|
24
|
+
export declare const NON_REASONING_MODEL_ID = "deepseek/deepseek-chat";
|
|
25
|
+
/** The exact pending-file pair the playground's ComposerRoute ships. */
|
|
26
|
+
export declare const pendingComposerFiles: ComposerFile[];
|
|
27
|
+
/** Adds an errored chip so the destructive tone is covered too. */
|
|
28
|
+
export declare const pendingComposerFilesWithError: ComposerFile[];
|
|
29
|
+
export declare const fileAttachmentParts: ChatAttachmentPart[];
|
|
30
|
+
export declare const imageAttachmentParts: ChatAttachmentPart[];
|
|
31
|
+
export declare const mixedAttachmentParts: ChatAttachmentPart[];
|
|
32
|
+
/** Serves real bytes for every attachment URL — thumbnails render. */
|
|
33
|
+
export declare const fetchAttachmentOk: (url: string) => Promise<Response>;
|
|
34
|
+
/** 404s every URL — thumbnails flip to the error tile, chips error on click. */
|
|
35
|
+
export declare const fetchAttachmentMissing: () => Promise<Response>;
|
|
36
|
+
/** Never settles — thumbnails hold the loading skeleton. */
|
|
37
|
+
export declare const fetchAttachmentHangs: () => Promise<Response>;
|
|
38
|
+
export declare const resolveAttachmentUrl: (part: ChatAttachmentPart) => string;
|
|
39
|
+
export declare const emptyStateDoors: ChatEmptyDoor[];
|
|
40
|
+
export declare const completedToolRun: ToolRunRecord;
|
|
41
|
+
export declare const erroredToolRun: ToolRunRecord;
|
|
42
|
+
export declare const runningToolRun: ToolRunRecord;
|
|
43
|
+
/** One part per `WorkProductStatus` — every pill tone the card can render. */
|
|
44
|
+
export declare const workProductParts: WorkProductPersistedPart[];
|
|
45
|
+
export declare const openWorkProduct: WorkProductCardProps['onOpen'];
|
|
46
|
+
/** The plan-approval ask, waiting on the human. */
|
|
47
|
+
export declare const pendingPlanInteraction: ChatInteraction;
|
|
48
|
+
/** Long enough (>320px) that the body collapses behind "Show full plan". */
|
|
49
|
+
export declare const longPlanInteraction: ChatInteraction;
|
|
50
|
+
export declare const approvedPlanInteraction: ChatInteraction;
|
|
51
|
+
export declare const declinedPlanInteraction: ChatInteraction;
|
|
52
|
+
export declare const expiredPlanInteraction: ChatInteraction;
|
|
53
|
+
/** Single-select ask with per-option descriptions. */
|
|
54
|
+
export declare const selectQuestionInteraction: ChatInteraction;
|
|
55
|
+
/** Multi-select with a granted write-in row (`allowCustom`). */
|
|
56
|
+
export declare const channelsQuestionInteraction: ChatInteraction;
|
|
57
|
+
/** Free-text ask with a length cap. */
|
|
58
|
+
export declare const freeTextQuestionInteraction: ChatInteraction;
|
|
59
|
+
/** One of each open input kind: boolean, number, secret. */
|
|
60
|
+
export declare const credentialsQuestionInteraction: ChatInteraction;
|
|
61
|
+
export declare const answeredQuestionInteraction: ChatInteraction;
|
|
62
|
+
export declare const expiredQuestionInteraction: ChatInteraction;
|
|
63
|
+
export declare const okSubmitAnswer: SubmitInteractionAnswer;
|
|
64
|
+
export declare const logResolved: (id: string, status: string, answers?: unknown) => void;
|
|
65
|
+
export declare const okLateAnswer: (message: string) => boolean;
|
|
66
|
+
export declare const okReRequest: (interaction: ChatInteraction) => boolean;
|
|
67
|
+
export declare const pendingDurablePlan: ChatPlan;
|
|
68
|
+
export declare const approvedDurablePlan: ChatPlan;
|
|
69
|
+
export declare const rejectedDurablePlan: ChatPlan;
|
|
70
|
+
export declare const withdrawnDurablePlan: ChatPlan;
|
|
71
|
+
/** Seat offer with a discounted first month — the `offer` prop's render path. */
|
|
72
|
+
export declare const seatOffer: ProductSeatOffer;
|
|
73
|
+
export declare const activityLaneRuns: StepAgentActivity[];
|
|
74
|
+
/** Cursor-paged data port: first page carries `nextCursor`, the second ends. */
|
|
75
|
+
export declare const fetchActivityPopulated: (cursor?: string) => Promise<AgentActivityPage>;
|
|
76
|
+
export declare const fetchActivityEmpty: () => Promise<AgentActivityPage>;
|
|
77
|
+
export declare const fetchActivityError: () => Promise<AgentActivityPage>;
|
|
78
|
+
/** Never settles — the refresh spinner holds. */
|
|
79
|
+
export declare const fetchActivityHangs: () => Promise<AgentActivityPage>;
|
|
80
|
+
export declare const posterFlowTrace: FlowTrace;
|
|
81
|
+
export declare const failedFlowTrace: FlowTrace;
|
|
82
|
+
/**
|
|
83
|
+
* Clicks the first button inside its subtree on mount — the trick that renders
|
|
84
|
+
* a popover-driven control (ModelPicker, EffortPicker, the lane's "timeline"
|
|
85
|
+
* toggle) in its OPEN state for a static story. Programmatic `click()` fires
|
|
86
|
+
* no `mousedown`, so `usePopover`'s outside-click closer does not immediately
|
|
87
|
+
* re-close it.
|
|
88
|
+
*/
|
|
89
|
+
export declare function AutoClick({ children, selector }: {
|
|
90
|
+
children: ReactNode;
|
|
91
|
+
selector?: string;
|
|
92
|
+
}): import("react").JSX.Element;
|
|
93
|
+
/**
|
|
94
|
+
* Real positive-Y headroom for upward-opening popovers. ModelPicker,
|
|
95
|
+
* EffortPicker, and AgentSessionControls' menus are inline-absolute
|
|
96
|
+
* `bottom-full` popovers: opened near the canvas top they extend into
|
|
97
|
+
* negative-Y space, which the iframe cannot scroll to — the popover reads as
|
|
98
|
+
* clipped no matter the layout. (The old `pt-[NNNpx]` wrappers only pushed
|
|
99
|
+
* the trigger down a fixed amount; the popover still overflowed whenever the
|
|
100
|
+
* canvas was shorter than the pad plus the popover.)
|
|
101
|
+
*
|
|
102
|
+
* This decorator anchors the story to the BOTTOM of a 520px-tall block
|
|
103
|
+
* (`flex items-end`), so the popover opens into canvas space above the
|
|
104
|
+
* trigger. 520px covers the tallest popover (ModelPicker ~470px; the gear
|
|
105
|
+
* menu ~260px and EffortPicker ~210px fit with room to spare). Works under
|
|
106
|
+
* both `centered` and `padded` layouts.
|
|
107
|
+
*
|
|
108
|
+
* decorators: [withPopoverHeadroom]
|
|
109
|
+
*/
|
|
110
|
+
export declare const withPopoverHeadroom: Decorator;
|
|
111
|
+
/**
|
|
112
|
+
* Minimal line-based markdown renderer for the plan/question cards'
|
|
113
|
+
* `renderMarkdown` slot — just enough structure (headings, lists, quotes) for
|
|
114
|
+
* the card stories to show formatted copy instead of the pre-wrap fallback.
|
|
115
|
+
*/
|
|
116
|
+
export declare function renderStoryMarkdown(markdown: string): ReactNode;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Local fixtures + harness helpers for the design-canvas stories.
|
|
3
|
+
*
|
|
4
|
+
* `makeLaunchPosterScene` mirrors the shared `../fixtures/canvas.ts` fixture
|
|
5
|
+
* (kept local so these stories are self-contained); the multi-page and empty
|
|
6
|
+
* scenes are additions covering the editor's page strip, layers states, and
|
|
7
|
+
* empty-state doors.
|
|
8
|
+
*/
|
|
9
|
+
import type { SceneDocument, ScenePage } from '../../design-canvas';
|
|
10
|
+
import type { SceneOperation } from '../../design-canvas';
|
|
11
|
+
/** Single-page poster scene — populated enough that every editor surface
|
|
12
|
+
* (layers, toolbar, rulers, guides) renders with real content. Text elements
|
|
13
|
+
* reference Inter, loaded in `.storybook/preview-head.html`. */
|
|
14
|
+
export declare function makeLaunchPosterScene(): SceneDocument;
|
|
15
|
+
/** One blank 1080×1080 page — drives the branded empty state (three doors). */
|
|
16
|
+
export declare function makeEmptyScene(): SceneDocument;
|
|
17
|
+
/**
|
|
18
|
+
* Three pages with distinct aspect ratios so the pages strip shows real
|
|
19
|
+
* variety. Page 2 carries the layers-showcase set: a group with children,
|
|
20
|
+
* a hidden element, a locked element, a slot-bound element, and one element
|
|
21
|
+
* of every remaining kind (image/video included — their media never loads in
|
|
22
|
+
* Storybook, which exercises the placeholder/broken treatments). One
|
|
23
|
+
* data-URL art card (`el-hero-art`) gives the page a designed focal point
|
|
24
|
+
* amid the intentional placeholders.
|
|
25
|
+
*/
|
|
26
|
+
export declare function makeMultiPageScene(): SceneDocument;
|
|
27
|
+
/** The layers-showcase page on its own (panel stories). */
|
|
28
|
+
export declare function makeLayersShowcasePage(): ScenePage;
|
|
29
|
+
/**
|
|
30
|
+
* Read the live theme from the document element so the Konva canvas (which
|
|
31
|
+
* cannot resolve CSS vars) paints with the active palette. Tracks the global
|
|
32
|
+
* Storybook theme toolbar, which mutates `data-theme` / `.dark` on
|
|
33
|
+
* `document.documentElement`. Stories never set the theme themselves.
|
|
34
|
+
*/
|
|
35
|
+
export declare function useIsDark(): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Host-side persistence for editor stories, mirroring the playground canvas
|
|
38
|
+
* route: ops are reduced into local document state with the engine's real
|
|
39
|
+
* `applySceneOperations`, so the editor rebases onto a coherent post-apply
|
|
40
|
+
* document on every save (and a rejected op would surface, not echo stale).
|
|
41
|
+
*/
|
|
42
|
+
export declare function useLocalSceneDocument(initial: SceneDocument): {
|
|
43
|
+
document: SceneDocument;
|
|
44
|
+
rev: number;
|
|
45
|
+
onApplyOperations: (operations: SceneOperation[]) => Promise<{
|
|
46
|
+
rev: number;
|
|
47
|
+
document: SceneDocument;
|
|
48
|
+
}>;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Deterministic offline thumbnail for PagesStrip stories: an SVG data URL
|
|
52
|
+
* painting the page background plus simplified element fills. The real
|
|
53
|
+
* Konva-based renderer is exercised through the full editor stories.
|
|
54
|
+
*/
|
|
55
|
+
export declare function renderFakeThumbnail(page: ScenePage): Promise<string | null>;
|
|
56
|
+
/** Never resolves — drives the PagesStrip placeholder (loading) treatment. */
|
|
57
|
+
export declare function renderPendingThumbnail(): Promise<string | null>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canvas fixture: a multi-element `SceneDocument` populated enough that the
|
|
3
|
+
* editor surface — layers panel, toolbar, rulers, guides — renders with real
|
|
4
|
+
* content rather than an empty shell. Text elements reference Inter, loaded in
|
|
5
|
+
* `.storybook/preview-head.html` (Konva measures against real loaded fonts).
|
|
6
|
+
*/
|
|
7
|
+
import type { SceneDocument } from '../../design-canvas';
|
|
8
|
+
export declare function makeLaunchPosterScene(): SceneDocument;
|
|
9
|
+
/** Prebuilt instance for stories that don't need isolation. */
|
|
10
|
+
export declare const launchPosterScene: SceneDocument;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Model-catalog fixtures: the catalogue the chat surfaces price per-message
|
|
3
|
+
* cost against and the composer model picker lists. Same shapes the playground
|
|
4
|
+
* ships, typed against the package's own `CatalogModel`.
|
|
5
|
+
*/
|
|
6
|
+
import type { CatalogModel } from '../../web-react';
|
|
7
|
+
export declare const catalogModels: CatalogModel[];
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chat fixtures: a long, realistic `ChatUiMessage` thread for story spacing
|
|
3
|
+
* evaluation, plus the individual edge-state messages (proposal awaiting
|
|
4
|
+
* approval, errored tool call, streaming in progress) exported on their own
|
|
5
|
+
* so stories can render a single state in isolation.
|
|
6
|
+
*
|
|
7
|
+
* Types come from the package source (`../../web-react`) — the same types the
|
|
8
|
+
* chat components consume — so a drift in `ChatUiMessage` fails typecheck here.
|
|
9
|
+
*/
|
|
10
|
+
import type { ChatToolCallInfo, ChatUiMessage } from '../../web-react';
|
|
11
|
+
/** A completed sandbox command, args + result captured for the expanded card. */
|
|
12
|
+
export declare const doneShellToolCall: ChatToolCallInfo;
|
|
13
|
+
/**
|
|
14
|
+
* A proposal the human has not ruled on yet: `pendingApprovalOf` keys on
|
|
15
|
+
* `result.status === 'queued_for_approval'` + a proposalId, so the chip renders
|
|
16
|
+
* the Approve/Reject affordance when the story passes `approval` handlers.
|
|
17
|
+
*/
|
|
18
|
+
export declare const proposalToolCall: ChatToolCallInfo;
|
|
19
|
+
/** A tool call whose run failed — the chip renders the error state + message. */
|
|
20
|
+
export declare const erroredToolCall: ChatToolCallInfo;
|
|
21
|
+
/** A tool call still executing — no `result` yet, chip shows the spinner. */
|
|
22
|
+
export declare const runningToolCall: ChatToolCallInfo;
|
|
23
|
+
/** Assistant turn whose proposal is still awaiting human approval. */
|
|
24
|
+
export declare const proposalAwaitingApprovalMessage: ChatUiMessage;
|
|
25
|
+
/** Assistant turn whose only tool call failed. */
|
|
26
|
+
export declare const erroredToolCallMessage: ChatUiMessage;
|
|
27
|
+
/**
|
|
28
|
+
* A turn still streaming: partial answer text, a tool call in flight, and no
|
|
29
|
+
* completion metrics yet (no `completionTokens`/`durationMs` — producers only
|
|
30
|
+
* stamp those when the turn settles).
|
|
31
|
+
*/
|
|
32
|
+
export declare const streamingAssistantMessage: ChatUiMessage;
|
|
33
|
+
/**
|
|
34
|
+
* ~16 messages covering every rendered state: plain exchanges, reasoning,
|
|
35
|
+
* per-message metrics, interleaved `segments`, a proposal awaiting approval,
|
|
36
|
+
* an errored tool call, and a trailing in-flight turn. Long enough that the
|
|
37
|
+
* thread scrolls, so spacing/typography stories evaluate real rhythm.
|
|
38
|
+
*/
|
|
39
|
+
export declare const chatThread: ChatUiMessage[];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sequences fixtures: a video + caption `SequenceTimeline` for the timeline
|
|
3
|
+
* editor, and a dependency-free `VideoFrameProvider` that paints deterministic
|
|
4
|
+
* solid frames — no media decode, no network — so the preview monitor renders
|
|
5
|
+
* something real in stories.
|
|
6
|
+
*/
|
|
7
|
+
import type { SequenceTimeline } from '../../sequences';
|
|
8
|
+
import type { VideoFrameProvider } from '../../sequences-react';
|
|
9
|
+
export declare function makePlaygroundReelTimeline(): SequenceTimeline;
|
|
10
|
+
/** Prebuilt instance for stories that don't need isolation. */
|
|
11
|
+
export declare const playgroundReelTimeline: SequenceTimeline;
|
|
12
|
+
/**
|
|
13
|
+
* Simplest valid `VideoFrameProvider`: paints a deterministic solid color into
|
|
14
|
+
* the preview rect. `drawFrame` never touches network or <video>/<img>. The
|
|
15
|
+
* color cycles by second so scrubbing is visibly distinct.
|
|
16
|
+
*/
|
|
17
|
+
export declare function makeSolidFrameProvider(): VideoFrameProvider;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fixtures for the panels area (teams / intakes / work-product). Local to this
|
|
3
|
+
* area: the shared `src/stories/fixtures` barrel covers chat, catalog, canvas,
|
|
4
|
+
* and sequences — none of which these surfaces consume.
|
|
5
|
+
*
|
|
6
|
+
* Shapes mirror the API seams: `MemberView` / `InvitationView` are what
|
|
7
|
+
* `teams/members-api` and `teams/invitations-api` return, `IntakeView` is what
|
|
8
|
+
* `intakes/api` returns, and `WorkProductRecord` is the durable review row.
|
|
9
|
+
*/
|
|
10
|
+
import type { IntakeAnswers } from '../../intakes/model';
|
|
11
|
+
import type { IntakeView } from '../../intakes-react';
|
|
12
|
+
import type { InviteAcceptDetails, InvitationView, MemberView } from '../../teams-react';
|
|
13
|
+
import type { ProfileBacktestSummary, WorkProductRecord } from '../../work-product/types';
|
|
14
|
+
/** A realistic workspace roster: an explicit owner, an inherited org owner
|
|
15
|
+
* (not editable here), one of each assignable role, and a pending invite. */
|
|
16
|
+
export declare const MEMBERS: MemberView[];
|
|
17
|
+
/** Every lifecycle status × every email-delivery status a history list shows. */
|
|
18
|
+
export declare const INVITATIONS: InvitationView[];
|
|
19
|
+
/** The valid, signed-out invite — the landing state of `/invite/:token`. */
|
|
20
|
+
export declare const INVITE_SIGNED_OUT: InviteAcceptDetails;
|
|
21
|
+
/** Signed in as the invited address — the accept action is live. */
|
|
22
|
+
export declare const INVITE_READY: InviteAcceptDetails;
|
|
23
|
+
/** Signed in as someone else — the switch-account branch. */
|
|
24
|
+
export declare const INVITE_EMAIL_MISMATCH: InviteAcceptDetails;
|
|
25
|
+
/** Right address, unverified — the resend-verification branch. */
|
|
26
|
+
export declare const INVITE_NEEDS_VERIFICATION: InviteAcceptDetails;
|
|
27
|
+
/** Derive a view from the graph the same way `intakes/api` does — the server
|
|
28
|
+
* re-derives next question + progress after every persisted answer. */
|
|
29
|
+
export declare function intakeViewFor(answers: IntakeAnswers, completed?: boolean): IntakeView;
|
|
30
|
+
/** Answer snapshots at each step of the flow, for the static step stories. */
|
|
31
|
+
export declare const INTAKE_STEPS: {
|
|
32
|
+
/** Nothing answered — the text question, progress 0/3. */
|
|
33
|
+
start: {};
|
|
34
|
+
/** Name answered — the single-select question, progress 1/3. */
|
|
35
|
+
role: {
|
|
36
|
+
name: string;
|
|
37
|
+
};
|
|
38
|
+
/** Role answered — the boolean question (optional multi-select skipped), 2/3. */
|
|
39
|
+
briefings: {
|
|
40
|
+
name: string;
|
|
41
|
+
role: string;
|
|
42
|
+
};
|
|
43
|
+
/** All required answered — nextQuestion is null, the Finish action shows. */
|
|
44
|
+
ready: {
|
|
45
|
+
name: string;
|
|
46
|
+
role: string;
|
|
47
|
+
stack: string[];
|
|
48
|
+
briefings: true;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
/** Bodies behind `history[].artifactPath`, for the version-compare seam. */
|
|
52
|
+
export declare const VERSION_BODIES: Record<string, string>;
|
|
53
|
+
/** A ready-for-review legal redline: baseline diff, span/model evidence,
|
|
54
|
+
* one exception per severity, mixed-verdict checks, and a 3-version history. */
|
|
55
|
+
export declare const REDLINE_RECORD: WorkProductRecord;
|
|
56
|
+
/** The trust-gate-passing backtest summary for the redline record's profile. */
|
|
57
|
+
export declare const BACKTEST_PASS: ProfileBacktestSummary;
|
|
58
|
+
/** An accumulating draft: artifact null, every list empty — the "nothing to
|
|
59
|
+
* review yet" pane (artifact tab renders its empty copy). */
|
|
60
|
+
export declare const DRAFT_RECORD: WorkProductRecord;
|
|
61
|
+
/** A tax-style fields package: no markdown body — the artifact is a structured
|
|
62
|
+
* field map (rendered as JSON) and lineage anchors to form-line ids. */
|
|
63
|
+
export declare const FIELDS_RECORD: WorkProductRecord;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sequences-area story fixtures. Self-contained on purpose: the shared
|
|
3
|
+
* `src/stories/fixtures/` barrel was absent from the working tree when these
|
|
4
|
+
* stories were written, so this file mirrors its `makePlaygroundReelTimeline`
|
|
5
|
+
* and `makeSolidFrameProvider` byte-for-byte behavior (same shapes, same
|
|
6
|
+
* solid-color provider — no media decode, no network) and adds the
|
|
7
|
+
* multi-track, empty, and lookup variants the sequence stories need. If the
|
|
8
|
+
* shared fixtures return, the reel/provider below can be re-pointed at them.
|
|
9
|
+
*/
|
|
10
|
+
import type { SequenceApplyResult, SequenceClip, SequenceOperation, SequenceTimeline, SequenceTrack } from '../../sequences';
|
|
11
|
+
import type { VideoFrameProvider } from '../../sequences-react';
|
|
12
|
+
export declare function makePlaygroundReelTimeline(): SequenceTimeline;
|
|
13
|
+
export declare function makeStudioCutTimeline(): SequenceTimeline;
|
|
14
|
+
export declare function makeEmptyTimeline(): SequenceTimeline;
|
|
15
|
+
export declare function makeAudioClip(): SequenceClip;
|
|
16
|
+
export declare function trackOf(timeline: SequenceTimeline, trackId: string): SequenceTrack;
|
|
17
|
+
export declare function clipsOf(timeline: SequenceTimeline, trackId: string): SequenceClip[];
|
|
18
|
+
export declare function clipOf(timeline: SequenceTimeline, clipId: string): SequenceClip;
|
|
19
|
+
/**
|
|
20
|
+
* Simplest valid `VideoFrameProvider`: paints a deterministic solid color into
|
|
21
|
+
* the preview rect. `drawFrame` never touches network or <video>/<img>. The
|
|
22
|
+
* color cycles by second so scrubbing is visibly distinct.
|
|
23
|
+
*/
|
|
24
|
+
export declare function makeSolidFrameProvider(): VideoFrameProvider;
|
|
25
|
+
/**
|
|
26
|
+
* Host `onApplyOperations` stand-in: logs the operations and echoes an
|
|
27
|
+
* index-aligned `SequenceApplyResult[]` so the editor's optimistic-id
|
|
28
|
+
* reconciliation has a well-formed reply for any edit (playground pattern).
|
|
29
|
+
*/
|
|
30
|
+
export declare function makeEchoApply(timeline: SequenceTimeline): (operations: SequenceOperation[]) => Promise<SequenceApplyResult[]>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { IntegrationConnection } from '@tangle-network/sandbox-ui/integrations';
|
|
2
|
+
import type { Generation } from '../../studio';
|
|
3
|
+
export declare const teaserA: Generation;
|
|
4
|
+
export declare const storyboardGeneration: Generation;
|
|
5
|
+
export declare const videoGeneration: Generation;
|
|
6
|
+
export declare const avatarGeneration: Generation;
|
|
7
|
+
export declare const speechGeneration: Generation;
|
|
8
|
+
export declare const transcriptionGeneration: Generation;
|
|
9
|
+
export declare const queuedGeneration: Generation;
|
|
10
|
+
export declare const runningGeneration: Generation;
|
|
11
|
+
export declare const failedGeneration: Generation;
|
|
12
|
+
export declare const storageFailedGeneration: Generation;
|
|
13
|
+
export declare const publishPackageGeneration: Generation;
|
|
14
|
+
/** The four-image batch a single "Images: 4" run produces. */
|
|
15
|
+
export declare const teaserBatch: Generation[];
|
|
16
|
+
/** Populated library: the newest batch first, every type and status represented. */
|
|
17
|
+
export declare const libraryGenerations: Generation[];
|
|
18
|
+
export declare const libraryTotalCost = 1.87;
|
|
19
|
+
/** Mirrors StudioWorkspace's default vaultHref (see generation-detail.test.tsx). */
|
|
20
|
+
export declare const demoVaultHref: (filePath?: string | null) => string;
|
|
21
|
+
/** Connected destinations for the publish-package composer (instagram + X). */
|
|
22
|
+
export declare const demoConnections: IntegrationConnection[];
|
package/dist/stream/index.d.ts
CHANGED
|
@@ -1,56 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
content: string;
|
|
12
|
-
parts: Array<Record<string, unknown>> | null;
|
|
13
|
-
}
|
|
14
|
-
/** Represent a chat turn with resolved user message insertion and prior message context */
|
|
15
|
-
interface ResolvedChatTurn {
|
|
16
|
-
turnIndex: number;
|
|
17
|
-
shouldInsertUserMessage: boolean;
|
|
18
|
-
priorMessages: PersistedChatMessageForTurn[];
|
|
19
|
-
userParts: JsonRecord[];
|
|
20
|
-
/** The id of the user row this turn REUSES (retry dedup), when one was
|
|
21
|
-
* found. Absent on the insert path, where no row exists yet.
|
|
22
|
-
*
|
|
23
|
-
* The reused row is deliberately EXCLUDED from `priorMessages` (it is this
|
|
24
|
-
* turn's own user message, not prior context), so this field is the only
|
|
25
|
-
* way a caller can name it. */
|
|
26
|
-
reusedUserMessageId?: string;
|
|
27
|
-
}
|
|
28
|
-
/** Normalize and validate a client turn ID string ensuring it meets format and length requirements */
|
|
29
|
-
declare function normalizeClientTurnId(value: unknown): string | undefined;
|
|
30
|
-
/** Build an array of text parts with optional turn ID for user input */
|
|
31
|
-
declare function buildUserTextParts(text: string, turnId: string | undefined): JsonRecord[];
|
|
32
|
-
/** Resolve whether a message contains any part with the specified turn ID */
|
|
33
|
-
declare function messageHasTurnId(message: PersistedChatMessageForTurn, turnId: string): boolean;
|
|
34
|
-
/** Resolve a chat turn by determining message reuse and constructing user message parts */
|
|
35
|
-
declare function resolveChatTurn(input: {
|
|
36
|
-
existingMessages: PersistedChatMessageForTurn[];
|
|
37
|
-
userContent: string;
|
|
38
|
-
turnId?: string;
|
|
39
|
-
/** True when the thread has a turn still RUNNING in the turn-event buffer
|
|
40
|
-
* (`turnStore.listRunning(threadId)`).
|
|
41
|
-
*
|
|
42
|
-
* Without incremental persistence the trailing row of a thread mid-turn is
|
|
43
|
-
* always the user row, so the content fallback below could assume it. With
|
|
44
|
-
* incremental persistence the assistant row lands seconds into the turn, so
|
|
45
|
-
* a retry of that same turn finds an ASSISTANT row trailing and would
|
|
46
|
-
* insert a duplicate user row.
|
|
47
|
-
*
|
|
48
|
-
* This flag is the discriminator that keeps both cases right, and it needs
|
|
49
|
-
* no new state: an assistant row trailing a turn that is still running is
|
|
50
|
-
* that turn's in-flight draft (walk past it — this is a retry), whereas an
|
|
51
|
-
* assistant row trailing a SETTLED turn is a completed answer (stop — the
|
|
52
|
-
* user genuinely repeated a message and deserves a new turn). */
|
|
53
|
-
hasRunningTurn?: boolean;
|
|
54
|
-
}): ResolvedChatTurn;
|
|
55
|
-
|
|
56
|
-
export { JsonRecord, type PersistedChatMessageForTurn, type ResolvedChatTurn, buildUserTextParts, messageHasTurnId, normalizeClientTurnId, resolveChatTurn };
|
|
1
|
+
/**
|
|
2
|
+
* Chat-stream mechanism — provider-agnostic normalization of an agent SSE/event
|
|
3
|
+
* stream into the `StreamEvent` shape a web client consumes, plus turn-identity
|
|
4
|
+
* resolution (mapping a client-supplied turn id onto persisted messages for
|
|
5
|
+
* idempotent replay). Pure mechanism, zero domain — every agent app's chat
|
|
6
|
+
* route hand-rolls this otherwise.
|
|
7
|
+
*/
|
|
8
|
+
export * from './stream-normalizer';
|
|
9
|
+
export * from './turn-identity';
|
|
10
|
+
export * from './turn-buffer';
|