@tangle-network/agent-app 0.45.53 → 0.45.55
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/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/types.d.ts +11 -0
- package/dist/chat-routes/attachment-store.d.ts +84 -0
- package/dist/chat-routes/attachment-upload.d.ts +84 -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/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/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/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 +5 -4
- 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/values-C7RidJuI.d.ts +0 -156
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ChatComposer — the shared message input every agent app used to hand-roll:
|
|
3
|
+
* an auto-resizing textarea (Enter sends, Shift+Enter inserts a newline), an
|
|
4
|
+
* opt-in attach + drag-and-drop surface with pending-file chips, a streaming
|
|
5
|
+
* Stop/Send toggle, a slot for inline controls (model picker, reasoning
|
|
6
|
+
* effort), and a Cmd/Ctrl+L focus shortcut.
|
|
7
|
+
*
|
|
8
|
+
* A REJECTED send never destroys the draft. The input clears optimistically —
|
|
9
|
+
* the composer stays editable while a turn streams precisely so the next
|
|
10
|
+
* message can be typed against a live answer, and holding the sent text in the
|
|
11
|
+
* box until the server confirms would put the clear on a collision course with
|
|
12
|
+
* that typing. So the clear happens immediately and the draft is held until the
|
|
13
|
+
* send is known to have landed: a handler that throws, rejects, or returns
|
|
14
|
+
* `{ ok: false }` puts the exact bytes back with the caret where it was, names
|
|
15
|
+
* the reason, and reports `onSendFailed` so the host can restore the
|
|
16
|
+
* attachments it consumed. If the user has already typed a replacement, the
|
|
17
|
+
* unsent text is shown in the notice with its own Retry instead of overwriting
|
|
18
|
+
* what they typed — neither draft is ever destroyed.
|
|
19
|
+
*
|
|
20
|
+
* Styling contract matches the rest of `web-react`: Tailwind over the shared
|
|
21
|
+
* design tokens (`bg-card`, `border-border`, `text-foreground`, `bg-primary`, …)
|
|
22
|
+
* and inline-SVG glyphs. It defines NO `--chat-*` / `--brand-*` custom
|
|
23
|
+
* properties, so it themes correctly in any shell that provides the standard
|
|
24
|
+
* tokens — the input renders on-palette instead of collapsing to unstyled
|
|
25
|
+
* fallbacks when a host hasn't defined a private chat-token set.
|
|
26
|
+
*/
|
|
27
|
+
import { type ReactNode } from 'react';
|
|
28
|
+
/** Prompt-part descriptor an uploaded file carries (the upload route's
|
|
29
|
+
* `UploadedChatFile.part`), echoed back in the turn body on send. Mirrors
|
|
30
|
+
* `/chat-routes`' wire shape structurally — no server import here. */
|
|
31
|
+
export interface ComposerFilePart {
|
|
32
|
+
type: 'image' | 'file';
|
|
33
|
+
filename?: string;
|
|
34
|
+
mediaType?: string;
|
|
35
|
+
url?: string;
|
|
36
|
+
path?: string;
|
|
37
|
+
content?: string;
|
|
38
|
+
}
|
|
39
|
+
export interface ComposerFile {
|
|
40
|
+
id: string;
|
|
41
|
+
name: string;
|
|
42
|
+
size?: number;
|
|
43
|
+
kind: 'file' | 'folder';
|
|
44
|
+
/** Number of files inside, for a folder chip. */
|
|
45
|
+
fileCount?: number;
|
|
46
|
+
status: 'pending' | 'uploading' | 'ready' | 'error';
|
|
47
|
+
/** Uploaded part descriptor; set once the upload route returns. Only
|
|
48
|
+
* `status: 'ready'` files with a part travel on a parts-aware send. */
|
|
49
|
+
part?: ComposerFilePart;
|
|
50
|
+
}
|
|
51
|
+
/** A send the host refused. `error` is shown verbatim in the composer's notice;
|
|
52
|
+
* omit it for the generic copy. */
|
|
53
|
+
export interface ComposerSendRejected {
|
|
54
|
+
ok: false;
|
|
55
|
+
error?: string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* What a send handler reports back. `void` — what every handler returned before
|
|
59
|
+
* this existed — reads as accepted, so wiring stays unchanged; a thrown error, a
|
|
60
|
+
* rejected promise, or `{ ok: false }` is the rejection that restores the draft.
|
|
61
|
+
* A handler that resolves only when the whole turn finishes still reports
|
|
62
|
+
* correctly: the input already cleared on dispatch, so the answer only decides
|
|
63
|
+
* whether the draft comes back.
|
|
64
|
+
*/
|
|
65
|
+
export type ComposerSendOutcome = void | {
|
|
66
|
+
ok: true;
|
|
67
|
+
} | ComposerSendRejected;
|
|
68
|
+
export type ComposerSendResult = ComposerSendOutcome | Promise<ComposerSendOutcome>;
|
|
69
|
+
/**
|
|
70
|
+
* A send handler, typed as a UNION with the legacy `=> void` signature rather
|
|
71
|
+
* than as `(…) => ComposerSendResult` alone.
|
|
72
|
+
*
|
|
73
|
+
* TypeScript's return-type-`void` rule accepts a function returning ANYTHING
|
|
74
|
+
* where a `=> void` is expected, and that rule fires only when the target's
|
|
75
|
+
* return type is exactly `void` — not when it is a union that contains `void`.
|
|
76
|
+
* So narrowing this prop to `ComposerSendResult` would reject handler shapes
|
|
77
|
+
* that compiled against the shipped `onSend?: (message: string) => void`:
|
|
78
|
+
* `onSend={(m) => rows.push(m)}` (returns `number`) and
|
|
79
|
+
* `onSend={(m) => append({ role: 'user', content: m })}` (an ai-sdk append
|
|
80
|
+
* returns `Promise<string | null | undefined>`) both stop compiling, on a
|
|
81
|
+
* package whose pinned consumers must never need a source edit to take a minor.
|
|
82
|
+
*
|
|
83
|
+
* The union keeps both: a legacy handler lands on the first member, and a
|
|
84
|
+
* handler that reports an outcome lands on the second. A call through it
|
|
85
|
+
* resolves to `void | ComposerSendResult`, which IS `ComposerSendResult`, so
|
|
86
|
+
* the composer reads the outcome exactly as before.
|
|
87
|
+
*/
|
|
88
|
+
export type ComposerSendHandler = ((message: string) => void) | ((message: string) => ComposerSendResult);
|
|
89
|
+
/** @see ComposerSendHandler — the parts-aware arity, same union for the same reason. */
|
|
90
|
+
export type ComposerSendPartsHandler = ((message: string, parts: ComposerFilePart[]) => void) | ((message: string, parts: ComposerFilePart[]) => ComposerSendResult);
|
|
91
|
+
/** The rejected send, handed to `onSendFailed` so the host can undo whatever it
|
|
92
|
+
* cleared optimistically — most importantly the staged attachments, which the
|
|
93
|
+
* composer does not own (`pendingFiles` is a prop). */
|
|
94
|
+
export interface ComposerSendFailure {
|
|
95
|
+
/** The reason as the composer renders it. */
|
|
96
|
+
message: string;
|
|
97
|
+
/** The user's exact draft, untrimmed. */
|
|
98
|
+
text: string;
|
|
99
|
+
/** The parts the rejected send carried. */
|
|
100
|
+
parts: ComposerFilePart[];
|
|
101
|
+
/** Whatever the handler threw / rejected with, or the `{ ok: false }` value. */
|
|
102
|
+
error: unknown;
|
|
103
|
+
/** True when the draft was put back in the textarea (the box was empty).
|
|
104
|
+
* False means the user had typed a replacement, so the unsent text is held in
|
|
105
|
+
* the notice instead. */
|
|
106
|
+
restored: boolean;
|
|
107
|
+
}
|
|
108
|
+
export interface ChatComposerProps {
|
|
109
|
+
/** Send the trimmed, non-empty message. Attached files travel separately via
|
|
110
|
+
* `onAttach` + `pendingFiles` (the host consumes and clears them on send).
|
|
111
|
+
* Optional when `onSendParts` is wired.
|
|
112
|
+
*
|
|
113
|
+
* Report a refused send by throwing, rejecting, or returning `{ ok: false }`
|
|
114
|
+
* — the composer restores the draft rather than losing it. */
|
|
115
|
+
onSend?: ComposerSendHandler;
|
|
116
|
+
/** Parts-aware send: receives the trimmed message plus the `part`
|
|
117
|
+
* descriptors of every `ready` pending file. Takes precedence over
|
|
118
|
+
* `onSend`; enables file-only sends (empty text, ≥1 ready part).
|
|
119
|
+
*
|
|
120
|
+
* Same rejection contract as `onSend`. */
|
|
121
|
+
onSendParts?: ComposerSendPartsHandler;
|
|
122
|
+
/** Notified when a send is rejected, after the composer has restored what it
|
|
123
|
+
* owns. The host uses it to put back the `pendingFiles` it consumed. */
|
|
124
|
+
onSendFailed?: (failure: ComposerSendFailure) => void;
|
|
125
|
+
/** Notice copy when the handler names no reason of its own. */
|
|
126
|
+
sendFailureMessage?: string;
|
|
127
|
+
/** Stop the in-flight turn; shown in place of Send while `isStreaming`. */
|
|
128
|
+
onCancel?: () => void;
|
|
129
|
+
isStreaming?: boolean;
|
|
130
|
+
/** Block input + send (e.g. while restoring). Distinct from `isStreaming`,
|
|
131
|
+
* which keeps the textarea editable so the next turn can be composed. */
|
|
132
|
+
disabled?: boolean;
|
|
133
|
+
placeholder?: string;
|
|
134
|
+
/** Controlled value. Omit for self-managed internal state (cleared on send). */
|
|
135
|
+
value?: string;
|
|
136
|
+
onValueChange?: (value: string) => void;
|
|
137
|
+
/** Initial text in uncontrolled mode; ignored when `value` is provided. */
|
|
138
|
+
initialValue?: string;
|
|
139
|
+
/** One-shot external prefill: when this becomes a non-null string the
|
|
140
|
+
* composer adopts it as the draft (replacing any current draft), focuses the
|
|
141
|
+
* input with the caret at the end, and reports consumption via
|
|
142
|
+
* `onSeedApplied` so the host can clear its seed state. */
|
|
143
|
+
seed?: string | null;
|
|
144
|
+
onSeedApplied?: () => void;
|
|
145
|
+
/** Inline controls (e.g. `<ModelPicker/>` + `<EffortPicker/>` or
|
|
146
|
+
* `<AgentSessionControls/>`). */
|
|
147
|
+
controls?: ReactNode;
|
|
148
|
+
/**
|
|
149
|
+
* Where {@link controls} sit. `inline` (default) puts them on the card's own
|
|
150
|
+
* action row, beside attach and Send — the model a turn will use reads as
|
|
151
|
+
* part of the input rather than as a separate widget floating above it.
|
|
152
|
+
* `above` keeps them outside the card, for a host that wants the input to be
|
|
153
|
+
* nothing but the input.
|
|
154
|
+
*/
|
|
155
|
+
controlsPlacement?: 'above' | 'inline';
|
|
156
|
+
/** Attachments are opt-in: pass `onAttach` to show the attach button, accept
|
|
157
|
+
* drag-and-drop onto the input, and render `pendingFiles` chips. */
|
|
158
|
+
onAttach?: (files: FileList) => void;
|
|
159
|
+
onAttachFolder?: (files: FileList) => void;
|
|
160
|
+
pendingFiles?: ComposerFile[];
|
|
161
|
+
onRemoveFile?: (id: string) => void;
|
|
162
|
+
accept?: string;
|
|
163
|
+
dropTitle?: string;
|
|
164
|
+
dropDescription?: string;
|
|
165
|
+
/** Cmd/Ctrl+L focuses the input and shows the hint. Default true. */
|
|
166
|
+
focusShortcut?: boolean;
|
|
167
|
+
/** Float the card on a soft two-layer foreground-tinted shadow (opt-in).
|
|
168
|
+
* Elevation only — radius, ring, and control layout are unchanged. */
|
|
169
|
+
floating?: boolean;
|
|
170
|
+
/** Send button label. Default "Send". */
|
|
171
|
+
sendLabel?: string;
|
|
172
|
+
className?: string;
|
|
173
|
+
}
|
|
174
|
+
export declare function ChatComposer({ onSend, onSendParts, onSendFailed, sendFailureMessage, onCancel, isStreaming, disabled, placeholder, value, onValueChange, initialValue, seed, onSeedApplied, controls, controlsPlacement, onAttach, onAttachFolder, pendingFiles, onRemoveFile, accept, dropTitle, dropDescription, focusShortcut, floating, sendLabel, className, }: ChatComposerProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../interactions/contract';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transcript-side counterpart to the composer's `@`-mention primitive
|
|
3
|
+
* (sandbox-ui#184). The composer serializes a picked file into the message
|
|
4
|
+
* text as `@<path>`; this module is the exact inverse — it finds those tokens
|
|
5
|
+
* again in a PERSISTED message and splits the text so a renderer can draw a
|
|
6
|
+
* pill where the user typed one and leave the rest as prose.
|
|
7
|
+
*
|
|
8
|
+
* Pure and product-agnostic: no React, no fetch, no DOM. The only input beyond
|
|
9
|
+
* the text is the message's OWN mention parts, so one message can never render
|
|
10
|
+
* a pill for a path another message mentioned.
|
|
11
|
+
*
|
|
12
|
+
* `ChatMentionPart` and the runtime helpers `mentionInputToPart` /
|
|
13
|
+
* `mentionPartsFromMessageParts` are re-exported here from `../chat-store/parts`
|
|
14
|
+
* directly (not the `/chat-store` barrel), so a browser bundle gets the mention
|
|
15
|
+
* vocabulary and its converters without importing `/chat-store`, whose barrel
|
|
16
|
+
* pulls the drizzle peer.
|
|
17
|
+
*/
|
|
18
|
+
import { mentionInputToPart, mentionPartsFromMessageParts, type ChatMentionKind, type ChatMentionPart } from '../chat-store/parts';
|
|
19
|
+
export type { ChatMentionKind, ChatMentionPart };
|
|
20
|
+
export { mentionInputToPart, mentionPartsFromMessageParts };
|
|
21
|
+
/** One run of a segmented message: literal prose, or a matched mention with
|
|
22
|
+
* the part that produced it. `text` for a mention segment is the token as it
|
|
23
|
+
* appears in the message (`@<path>`), so a renderer that ignores `part` still
|
|
24
|
+
* reproduces the original string exactly. */
|
|
25
|
+
export interface MentionTextSegment {
|
|
26
|
+
type: 'text' | 'mention';
|
|
27
|
+
text: string;
|
|
28
|
+
part?: ChatMentionPart;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Split a message's text into plain-text and mention segments by matching
|
|
32
|
+
* `@<path>` runs against that message's own mention parts.
|
|
33
|
+
*
|
|
34
|
+
* Only a part whose exact `@<path>` token appears in `content`, at a token
|
|
35
|
+
* boundary on both sides, counts as a match; everything else — including
|
|
36
|
+
* unrelated `@` text — passes through as plain text untouched. When two parts'
|
|
37
|
+
* tokens both match at the same position (one path a prefix of another), the
|
|
38
|
+
* LONGEST token wins, so nested-looking paths split at the right boundary.
|
|
39
|
+
*
|
|
40
|
+
* Returns the matched parts alongside the segments: a caller that also renders
|
|
41
|
+
* a fallback chip row can drop the chip for anything now shown inline and keep
|
|
42
|
+
* it only for mentions the text does not actually contain (a restored draft, a
|
|
43
|
+
* queued message whose text was edited).
|
|
44
|
+
*/
|
|
45
|
+
export declare function segmentMentionContent(content: string, parts: ReadonlyArray<ChatMentionPart>): {
|
|
46
|
+
segments: MentionTextSegment[];
|
|
47
|
+
matched: Set<ChatMentionPart>;
|
|
48
|
+
};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Client-side chat-stream consumption — the NDJSON parse loop every agent
|
|
3
|
+
* app's chat UI hand-rolls (and breaks). Normalizes the three line shapes the
|
|
4
|
+
* agent-app chat routes emit:
|
|
5
|
+
*
|
|
6
|
+
* {kind:'event', event:{type:'text'|'reasoning'|'tool_call'|'usage'|'notice'|'error', ...}}
|
|
7
|
+
* {kind:'tool_result', toolCallId, toolName, label, outcome}
|
|
8
|
+
* {type:'turn'|'metadata'|'error'|'turn_status', ...} (route-level)
|
|
9
|
+
* {type:'interaction', data:{request}} (sidecar ask)
|
|
10
|
+
*
|
|
11
|
+
* Replayed lines carry an extra `seq` — transparently ignored. Works for
|
|
12
|
+
* router-backed and sandbox-backed chats alike: anything producing these
|
|
13
|
+
* lines (live pump, queued follow, resume replay) feeds the same callbacks.
|
|
14
|
+
*/
|
|
15
|
+
import { type ChatInteraction, type InteractionCancelData } from './chat-interactions';
|
|
16
|
+
import { type ChatPlan } from '../plans/index';
|
|
17
|
+
export { chatTurnRequestInit, type ChatTurnFilePartInput, type ChatTurnPartInput, type ChatTurnRequestPayload, type ProducerTextEvent, type ProducerReasoningEvent, type ProducerToolCallEvent, type ProducerToolResultEvent, type ProducerUsageEvent, type ProducerNoticeEvent, type ProducerErrorEvent, type ProducerPassthroughEventType, type ProducerPassthroughEvent, type ProducerWireEvent, type FileMention, fileMentionsToParts, buildMentionPromptBlock, mediaTypeForMentionPath, mentionKindForPath, type ChatAttachmentKind, type ChatAttachmentInput, DISPATCH_REQUEST_MAX_BYTES, DISPATCH_STRUCTURAL_RESERVE_BYTES, DISPATCH_MAX_PARTS, DISPATCH_MAX_MEDIA_PARTS, base64WireLen, } from '../chat-routes/wire';
|
|
18
|
+
export { type FileIndexResponse, type FileIndexReadyResponse, type FileIndexWarmingResponse, } from '../chat-routes/file-index';
|
|
19
|
+
/** Define the structure for a chat tool call including optional ID, name, and arguments object */
|
|
20
|
+
export interface ChatStreamToolCall {
|
|
21
|
+
toolCallId?: string;
|
|
22
|
+
toolName: string;
|
|
23
|
+
args: Record<string, unknown>;
|
|
24
|
+
}
|
|
25
|
+
/** Describe the result of a chat stream tool including its outcome and optional metadata fields */
|
|
26
|
+
export interface ChatStreamToolResult {
|
|
27
|
+
toolCallId?: string;
|
|
28
|
+
toolName?: string;
|
|
29
|
+
label?: string;
|
|
30
|
+
outcome: {
|
|
31
|
+
ok: boolean;
|
|
32
|
+
result?: unknown;
|
|
33
|
+
code?: string;
|
|
34
|
+
message?: string;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
/** Define callbacks to handle events and data during a chat streaming session */
|
|
38
|
+
export interface ChatStreamCallbacks {
|
|
39
|
+
onTurnId?: (turnId: string) => void;
|
|
40
|
+
onText?: (delta: string) => void;
|
|
41
|
+
onReasoning?: (delta: string) => void;
|
|
42
|
+
onToolCall?: (call: ChatStreamToolCall) => void;
|
|
43
|
+
onToolResult?: (result: ChatStreamToolResult) => void;
|
|
44
|
+
onUsage?: (usage: {
|
|
45
|
+
promptTokens: number;
|
|
46
|
+
completionTokens: number;
|
|
47
|
+
}) => void;
|
|
48
|
+
onNotice?: (notice: {
|
|
49
|
+
id: string;
|
|
50
|
+
noticeKind: 'warning' | 'auto-declined';
|
|
51
|
+
text: string;
|
|
52
|
+
}) => void;
|
|
53
|
+
onMetadata?: (data: Record<string, unknown>) => void;
|
|
54
|
+
/** Structured detail from a loop-level error event. Fired alongside the
|
|
55
|
+
* legacy string-only `onErrorEvent` callback. */
|
|
56
|
+
onErrorEventDetail?: (detail: {
|
|
57
|
+
message: string;
|
|
58
|
+
code?: string;
|
|
59
|
+
details?: Record<string, unknown>;
|
|
60
|
+
}) => void;
|
|
61
|
+
/** A loop-level error event (the turn failed server-side). Optional, but the
|
|
62
|
+
* error never vanishes: when omitted, the message is synthesized into the
|
|
63
|
+
* transcript via `onText` (rendered by ChatMessages as a text segment) and
|
|
64
|
+
* logged with `console.error`. */
|
|
65
|
+
onErrorEvent?: (message: string) => void;
|
|
66
|
+
/** A sidecar interaction ask (kind: "question"/"plan"/…). The run is BLOCKED
|
|
67
|
+
* in the broker until the user answers; a pending ask is "waiting on the
|
|
68
|
+
* user", not "model working". Optional — a consumer that doesn't wire it
|
|
69
|
+
* parses the same stream unchanged. */
|
|
70
|
+
onInteraction?: (interaction: ChatInteraction) => void;
|
|
71
|
+
/** A terminal withdrawal/timeout for a previously emitted interaction. */
|
|
72
|
+
onInteractionCancel?: (cancel: InteractionCancelData) => void;
|
|
73
|
+
/** A durable-plan snapshot from any plan lifecycle event. */
|
|
74
|
+
onPlan?: (plan: ChatPlan) => void;
|
|
75
|
+
}
|
|
76
|
+
/** Represent the result of consuming a chat stream including turn ID and content reception status */
|
|
77
|
+
export interface ConsumeChatStreamResult {
|
|
78
|
+
turnId: string | null;
|
|
79
|
+
/** True when any text/reasoning/tool activity was received. */
|
|
80
|
+
receivedContent: boolean;
|
|
81
|
+
}
|
|
82
|
+
/** Parse one NDJSON line into the callbacks. Exposed for tests. */
|
|
83
|
+
export declare function dispatchChatStreamLine(line: string, cb: ChatStreamCallbacks): {
|
|
84
|
+
turnId?: string;
|
|
85
|
+
receivedContent: boolean;
|
|
86
|
+
};
|
|
87
|
+
/** Drain one NDJSON body into the callbacks. Throws on transport failure
|
|
88
|
+
* (caller decides whether to resume). */
|
|
89
|
+
export declare function consumeChatStream(body: ReadableStream<Uint8Array>, cb: ChatStreamCallbacks): Promise<ConsumeChatStreamResult>;
|
|
90
|
+
/** Define options for managing and resuming streaming chat interactions with callbacks */
|
|
91
|
+
export interface StreamChatOptions {
|
|
92
|
+
/** Start the turn (POST the chat request); must return a streaming Response. */
|
|
93
|
+
start: () => Promise<Response>;
|
|
94
|
+
/** Re-attach to a turn after a transport drop (GET the resume route). */
|
|
95
|
+
resume?: (turnId: string, fromSeq: number) => Promise<Response>;
|
|
96
|
+
callbacks: ChatStreamCallbacks;
|
|
97
|
+
/** Called before a resume replays from 0 so the UI can reset accumulated
|
|
98
|
+
* turn state (text, reasoning, tool chips). */
|
|
99
|
+
onResetForResume?: () => void;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Run one chat turn with automatic single-shot resume: if the transport drops
|
|
103
|
+
* mid-turn and the server announced a turnId, reset and replay the buffered
|
|
104
|
+
* turn. Server-side the turn keeps running either way (queued runner).
|
|
105
|
+
*/
|
|
106
|
+
export declare function streamChatTurn(opts: StreamChatOptions): Promise<ConsumeChatStreamResult>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One class-attribute join for this subpath.
|
|
3
|
+
*
|
|
4
|
+
* The pattern it replaces is `` `base ${className ?? ''}` ``, which emits
|
|
5
|
+
* `class="base "` for every caller that passes nothing: a trailing separator in
|
|
6
|
+
* the DOM, in every snapshot, and in every assertion that compares the attribute
|
|
7
|
+
* instead of searching it. Interpolating an absent value is the defect — the
|
|
8
|
+
* fix is to never build the attribute by interpolation.
|
|
9
|
+
*/
|
|
10
|
+
export declare function joinClasses(...parts: ReadonlyArray<string | false | null | undefined>): string;
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared chat-shell control primitives — the LEAF that both the web-react barrel
|
|
3
|
+
* (`./index`) and the composer children (`./agent-session-controls`,
|
|
4
|
+
* `./seat-paywall`) import directly, so neither child has to reach back through
|
|
5
|
+
* the barrel (which would re-create an import cycle). The barrel re-exports the
|
|
6
|
+
* public names (`usePopover`, `usePending`, `ModelPicker`, `EffortPicker`, …)
|
|
7
|
+
* unchanged, so the published export surface is identical.
|
|
8
|
+
*
|
|
9
|
+
* Styling contract matches the rest of `web-react`: Tailwind classes against the
|
|
10
|
+
* shared design tokens; the glyphs are inline SVGs, no icon-library dependency.
|
|
11
|
+
*/
|
|
12
|
+
import { type ReactNode, type RefObject } from 'react';
|
|
13
|
+
import type { CatalogModel } from '../runtime/model-catalog';
|
|
14
|
+
export declare function ChevronDown({ className }: {
|
|
15
|
+
className?: string;
|
|
16
|
+
}): import("react").JSX.Element;
|
|
17
|
+
/** lucide `check` — the selected-row mark in the picker menus. */
|
|
18
|
+
export declare function CheckGlyph({ className }: {
|
|
19
|
+
className?: string;
|
|
20
|
+
}): import("react").JSX.Element;
|
|
21
|
+
/**
|
|
22
|
+
* Keyboard + pointer model for a trigger-and-popover pair, dependency-free.
|
|
23
|
+
* Outside-mousedown and Escape both close; Escape also returns focus to the
|
|
24
|
+
* trigger so keyboard users aren't dropped at the top of the document. The
|
|
25
|
+
* returned `triggerProps` carry the ARIA contract (`aria-haspopup`/
|
|
26
|
+
* `aria-expanded`); spread them onto the trigger button.
|
|
27
|
+
*
|
|
28
|
+
* `panelRef` belongs to the popover panel and MUST be wired when the panel is
|
|
29
|
+
* rendered through {@link PopoverSurface}: a portaled panel is not inside
|
|
30
|
+
* `containerRef`, so a container-only outside test reads every click on the
|
|
31
|
+
* menu's own rows as an outside click and closes before the row's handler runs.
|
|
32
|
+
*/
|
|
33
|
+
export declare function usePopover(open: boolean, setOpen: (open: boolean) => void): {
|
|
34
|
+
containerRef: RefObject<HTMLDivElement | null>;
|
|
35
|
+
triggerRef: RefObject<HTMLButtonElement | null>;
|
|
36
|
+
panelRef: RefObject<HTMLDivElement | null>;
|
|
37
|
+
triggerProps: {
|
|
38
|
+
ref: RefObject<HTMLButtonElement | null>;
|
|
39
|
+
'aria-haspopup': true;
|
|
40
|
+
'aria-expanded': boolean;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Marks the portaled panel in the DOM. Products and audits (see
|
|
45
|
+
* `playground/scripts/popover-hit-test.mjs`) select on this rather than on a
|
|
46
|
+
* Tailwind class, which is presentation and free to change.
|
|
47
|
+
*
|
|
48
|
+
* Its VALUE is the surface's ancestor path (`outer/inner`), which is what
|
|
49
|
+
* restores "is this click inside my popover" after the portal flattens two
|
|
50
|
+
* nested panels into two siblings of `<body>`.
|
|
51
|
+
*/
|
|
52
|
+
export declare const POPOVER_SURFACE_ATTR = "data-agent-app-popover";
|
|
53
|
+
export interface PopoverSurfaceProps {
|
|
54
|
+
open: boolean;
|
|
55
|
+
/** The trigger the panel anchors to — `usePopover`'s `triggerRef`. */
|
|
56
|
+
triggerRef: RefObject<HTMLElement | null>;
|
|
57
|
+
/** `usePopover`'s `panelRef`; also what the outside-click test consults. */
|
|
58
|
+
panelRef: RefObject<HTMLDivElement | null>;
|
|
59
|
+
/** Presentation classes. Placement and elevation are owned here — a caller
|
|
60
|
+
* must not pass `absolute`/`fixed`/`top-*`/`bottom-*`/`z-*`. */
|
|
61
|
+
className?: string;
|
|
62
|
+
role?: string;
|
|
63
|
+
id?: string;
|
|
64
|
+
/** Make the panel at least as wide as its trigger. A portaled panel has no
|
|
65
|
+
* `w-full` to inherit — the trigger is no longer its offset parent — so a
|
|
66
|
+
* menu that used to stretch to a full-width trigger declares it here. */
|
|
67
|
+
matchTriggerWidth?: boolean;
|
|
68
|
+
children: ReactNode;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* The floating panel every canonical picker opens.
|
|
72
|
+
*
|
|
73
|
+
* It renders through a PORTAL to `document.body` and anchors itself to the
|
|
74
|
+
* trigger in viewport coordinates, because an in-place `absolute` panel's
|
|
75
|
+
* visibility is decided by markup this package does not own. Measured in
|
|
76
|
+
* production: the shipped chat composer docks these controls inside a
|
|
77
|
+
* horizontally scrolling rail (`overflow-x-auto`), and a scroll container
|
|
78
|
+
* clips every positioned descendant whose containing block sits inside it —
|
|
79
|
+
* so a correct 420x457 menu with correct coordinates painted zero pixels and
|
|
80
|
+
* could not be clicked. An ancestor `transform`/`filter`/`contain` would trap
|
|
81
|
+
* it the same way through the stacking context instead of the clip. Leaving
|
|
82
|
+
* the DOM subtree is the only placement a host cannot re-break.
|
|
83
|
+
*
|
|
84
|
+
* Placement prefers ABOVE the trigger (these controls dock at the bottom of a
|
|
85
|
+
* composer), flips below when there is more room there, clamps horizontally
|
|
86
|
+
* into the viewport, and caps its own height to the space on the chosen side.
|
|
87
|
+
* The panel is `visibility: hidden` for the measure pass so it never paints at
|
|
88
|
+
* the pre-placement origin.
|
|
89
|
+
*/
|
|
90
|
+
export declare function PopoverSurface({ open, triggerRef, panelRef, className, role, id, matchTriggerWidth, children, }: PopoverSurfaceProps): import("react").ReactPortal | null;
|
|
91
|
+
/**
|
|
92
|
+
* Focus treatment for a row inside a popover panel.
|
|
93
|
+
*
|
|
94
|
+
* The ring itself now comes from the `:focus-visible` floor in tokens.css, so
|
|
95
|
+
* this no longer restates a width or a colour. What it still has to say is
|
|
96
|
+
* WHERE the ring is drawn: a popover option is a full-width row inside a panel
|
|
97
|
+
* that clips its own corners (`overflow-hidden rounded-xl`), and an outward
|
|
98
|
+
* ring on the first or last row is clipped away by that panel. Pulling the
|
|
99
|
+
* offset negative draws the same ring just inside the row instead.
|
|
100
|
+
*/
|
|
101
|
+
export declare const POPOVER_OPTION_FOCUS = "focus-visible:[outline-offset:-2px]";
|
|
102
|
+
/**
|
|
103
|
+
* The one overlay elevation for floating surfaces — picker menus, popovers,
|
|
104
|
+
* drawers, modals. Reads the theme's `--shadow-overlay` token, so every overlay
|
|
105
|
+
* lifts with the same shadow and re-themes from one source. The floating
|
|
106
|
+
* composer uses the quieter `shadow-raised` rung instead.
|
|
107
|
+
*
|
|
108
|
+
* Written as an arbitrary value rather than the preset's `shadow-overlay`
|
|
109
|
+
* utility, because that utility only exists where the preset is part of the
|
|
110
|
+
* Tailwind build. A host that gets its tokens through a precompiled bundle —
|
|
111
|
+
* `@tangle-network/sandbox-ui` ships brand's tokens inlined, with no `@theme`
|
|
112
|
+
* block surviving the compile — receives `--shadow-overlay` as a plain custom
|
|
113
|
+
* property, from which no `shadow-overlay` utility can be generated, and these
|
|
114
|
+
* surfaces render flat. The arbitrary form emits from the class alone and works
|
|
115
|
+
* either way.
|
|
116
|
+
*/
|
|
117
|
+
export declare const OVERLAY_SHADOW = "shadow-[var(--shadow-overlay)]";
|
|
118
|
+
/**
|
|
119
|
+
* Root geometry for a picker — the box that holds the trigger — in one place
|
|
120
|
+
* because every picker in this family has to agree on it.
|
|
121
|
+
*
|
|
122
|
+
* Shrink-wrapping (`inline-flex`) is the default: these controls dock on a
|
|
123
|
+
* composer row where an expanding pill shoves its neighbours around. A STACKED
|
|
124
|
+
* panel wants the opposite — the compact `AgentSessionControls` gear popover
|
|
125
|
+
* lays its controls out in a column, and a shrink-wrapped root there makes a
|
|
126
|
+
* trigger's own `w-full` a no-op, since it fills a box the trigger itself
|
|
127
|
+
* sized. That is what left Agent backend short of the panel edge and Thinking
|
|
128
|
+
* narrower still.
|
|
129
|
+
*
|
|
130
|
+
* The panel is portaled ({@link PopoverSurface}), so widening the root widens
|
|
131
|
+
* the TRIGGER only. A menu that should follow it declares `matchTriggerWidth`.
|
|
132
|
+
*/
|
|
133
|
+
export declare function pickerRootClass(fullWidth: boolean): string;
|
|
134
|
+
/**
|
|
135
|
+
* Guard an async action against double-submit. `run` ignores re-entrant calls
|
|
136
|
+
* while a promise is in flight and flips `pending` so the caller can disable
|
|
137
|
+
* the control — the fix for double-charge / double-approve on a slow network.
|
|
138
|
+
* Settles (success or throw) before clearing, and no-ops state updates after
|
|
139
|
+
* unmount.
|
|
140
|
+
*/
|
|
141
|
+
export declare function usePending(): {
|
|
142
|
+
pending: boolean;
|
|
143
|
+
run: (action: () => void | Promise<void>) => void;
|
|
144
|
+
};
|
|
145
|
+
export interface ModelPickerProps {
|
|
146
|
+
value: string;
|
|
147
|
+
onChange: (id: string) => void;
|
|
148
|
+
/** Catalogue models — from `GET`ing the app's catalogue route (see
|
|
149
|
+
* `runtime/model-catalog`), plus any product-specific entries appended. */
|
|
150
|
+
models: CatalogModel[];
|
|
151
|
+
loading?: boolean;
|
|
152
|
+
/** Render a provider logo/badge; default is a generic sparkle. */
|
|
153
|
+
renderProviderBadge?: (provider: string) => ReactNode;
|
|
154
|
+
/** Section label for `featured` models. */
|
|
155
|
+
recommendedLabel?: string;
|
|
156
|
+
/** Pin a labeled section to the TOP of the list (above Recommended) for the
|
|
157
|
+
* models a product wants surfaced first — e.g. a tuner app's own fine-tuned
|
|
158
|
+
* models (`{ label: 'Your Fine-Tuned Models', match: (m) => m.provider === 'tuner' }`).
|
|
159
|
+
* Matching models are shown only in this section, not duplicated below. */
|
|
160
|
+
priorityGroup?: {
|
|
161
|
+
label: string;
|
|
162
|
+
match: (model: CatalogModel) => boolean;
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Searchable model picker pill + popover: a featured/recommended section
|
|
167
|
+
* first, then per-provider groups in catalogue order (the server already
|
|
168
|
+
* sorts providers by tier).
|
|
169
|
+
*
|
|
170
|
+
* This is the CANONICAL ecosystem model picker (see "UI chrome ownership
|
|
171
|
+
* (picker canon)" in AGENTS.md). sandbox-ui's `dashboard/ModelPicker` is
|
|
172
|
+
* legacy — deprecated, frozen, removed at sandbox-ui's next major; new code
|
|
173
|
+
* belongs here.
|
|
174
|
+
*/
|
|
175
|
+
export declare function ModelPicker({ value, onChange, models, loading, renderProviderBadge, recommendedLabel, priorityGroup }: ModelPickerProps): import("react").JSX.Element;
|
|
176
|
+
/** One reasoning-budget level: the engine `id` is unchanged (the value the
|
|
177
|
+
* product sends to the loop); only the user-facing `label` is renamed to the
|
|
178
|
+
* plainer "how hard should it think" vocabulary from docs/product-surfaces.md.
|
|
179
|
+
* `low`→Quick, `medium`→Standard, `high`→Extended. The mapping is overridable
|
|
180
|
+
* via `EffortPickerProps.levels`, so a product can relabel without losing the
|
|
181
|
+
* ids the runtime expects. */
|
|
182
|
+
export interface EffortLevel {
|
|
183
|
+
id: string;
|
|
184
|
+
label: string;
|
|
185
|
+
}
|
|
186
|
+
export declare const DEFAULT_EFFORT_LEVELS: readonly EffortLevel[];
|
|
187
|
+
/**
|
|
188
|
+
* The user-facing label for an engine level id: the canonical vocabulary when
|
|
189
|
+
* the id is one this package names, otherwise the id itself made readable
|
|
190
|
+
* (`auto` -> "Auto", `ultra-code` -> "Ultra code"). Never invents a depth word,
|
|
191
|
+
* so an id nobody declared a label for still reads as ITSELF and never as some
|
|
192
|
+
* other level.
|
|
193
|
+
*/
|
|
194
|
+
export declare function effortLevelLabel(id: string): string;
|
|
195
|
+
/**
|
|
196
|
+
* Build a levels list from the engine ids a backend applies — the shape the
|
|
197
|
+
* removed `ComposerAgentControls` took as `reasoning.available`, so a product
|
|
198
|
+
* migrating that list has one call to make instead of a hand-written label map
|
|
199
|
+
* per product (which is how "Quick" and "Low" drift apart across surfaces).
|
|
200
|
+
*/
|
|
201
|
+
export declare function effortLevelsFromIds(ids: readonly string[]): readonly EffortLevel[];
|
|
202
|
+
/**
|
|
203
|
+
* The list {@link EffortPicker} RENDERS for `value` — the declared levels, plus
|
|
204
|
+
* `value` itself when the declaration omits it.
|
|
205
|
+
*
|
|
206
|
+
* A picker cannot honestly resolve a selected value it was not given, and the
|
|
207
|
+
* failure it used to take instead — fall back to the middle entry — renders the
|
|
208
|
+
* session's real depth as a DIFFERENT level's name. That is exactly the defect
|
|
209
|
+
* `levels` was added to prevent: the legacy adapter's `available` list excluded
|
|
210
|
+
* the `auto` sentinel because the old picker injected it, so a product mapping
|
|
211
|
+
* that list straight across ships a session running on `auto` labelled
|
|
212
|
+
* "Extended". Admitting the value is not offering a new choice — it is
|
|
213
|
+
* reporting the state the session is already in, and it disappears from the
|
|
214
|
+
* list as soon as the user picks a declared level.
|
|
215
|
+
*
|
|
216
|
+
* A blank value is not admitted (there is no honest label for it); the picker
|
|
217
|
+
* renders no selection instead.
|
|
218
|
+
*/
|
|
219
|
+
export declare function reconcileEffortLevels(value: string, levels?: readonly EffortLevel[]): readonly EffortLevel[];
|
|
220
|
+
/** Segments the meter draws — fixed geometry so the ladder stays tabular
|
|
221
|
+
* across levels (and across the trigger and its menu rows). */
|
|
222
|
+
export declare const EFFORT_METER_SEGMENTS = 4;
|
|
223
|
+
/**
|
|
224
|
+
* Filled-segment count for a level: 0 for off/none (or an id the levels list
|
|
225
|
+
* does not carry); otherwise the level's position among the non-off choices
|
|
226
|
+
* scaled onto the meter, so the ladder reads low < medium < high and the top
|
|
227
|
+
* level fills the whole scale. The canonical four levels land 0 / 1 / 2 / 4.
|
|
228
|
+
*/
|
|
229
|
+
export declare function effortMeterFill(levelId: string, levels?: readonly EffortLevel[]): number;
|
|
230
|
+
/**
|
|
231
|
+
* The thinking-strength meter: four 12px bars, filled count = level, filled
|
|
232
|
+
* opacity ramping 25→100% left to right (unfilled at a faint ghost). Purely
|
|
233
|
+
* decorative — the level name is always rendered as text beside it, so the
|
|
234
|
+
* meter is `aria-hidden` and adds no second accessible name.
|
|
235
|
+
*/
|
|
236
|
+
export declare function EffortMeter({ fill, className }: {
|
|
237
|
+
fill: number;
|
|
238
|
+
className?: string;
|
|
239
|
+
}): import("react").JSX.Element;
|
|
240
|
+
export interface EffortPickerProps {
|
|
241
|
+
value: string;
|
|
242
|
+
onChange: (id: string) => void;
|
|
243
|
+
/** Selectable levels (engine id + user-facing label). Defaults to the plain
|
|
244
|
+
* "Thinking" vocabulary; override to relabel without changing the ids the
|
|
245
|
+
* runtime receives.
|
|
246
|
+
*
|
|
247
|
+
* A list that omits the current `value` is not a rendering error the picker
|
|
248
|
+
* papers over: `value` is reconciled INTO the rendered list under its own
|
|
249
|
+
* name (see {@link reconcileEffortLevels}), because a control must report
|
|
250
|
+
* the depth the session is running at and never some other list entry. */
|
|
251
|
+
levels?: readonly EffortLevel[];
|
|
252
|
+
/** Prefix shown before the active level on the pill — the "what is this"
|
|
253
|
+
* context the bare value lacked. Default "Thinking". Pass '' to hide it. */
|
|
254
|
+
label?: string;
|
|
255
|
+
/** Fill the container instead of shrink-wrapping — opt-in, default `false`;
|
|
256
|
+
* see {@link pickerRootClass} for when and why. */
|
|
257
|
+
fullWidth?: boolean;
|
|
258
|
+
}
|
|
259
|
+
/** Thinking-budget selector pill, styled to match {@link ModelPicker}. Show
|
|
260
|
+
* it only when the selected model `supportsReasoning`. "Thinking" is the
|
|
261
|
+
* plain-English name for what was internally called "effort".
|
|
262
|
+
*
|
|
263
|
+
* The CANONICAL ecosystem effort picker — sandbox-ui's reasoning menu (inside
|
|
264
|
+
* its `chat/AgentSessionControls`) is legacy and frozen. */
|
|
265
|
+
export declare function EffortPicker({ value, onChange, levels, label, fullWidth }: EffortPickerProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { type ChatInteraction, type InteractionAnswers } from './chat-interactions';
|
|
3
|
+
import { type ChatPlan } from '../plans/index';
|
|
4
|
+
import type { DurablePlanDecision, DurablePlanDecisionResult } from './durable-plan-flow';
|
|
5
|
+
import type { SubmitInteractionAnswer } from './interaction-card-support';
|
|
6
|
+
export type DurableChatCard = {
|
|
7
|
+
kind: 'plan';
|
|
8
|
+
key: string;
|
|
9
|
+
plan: ChatPlan;
|
|
10
|
+
} | {
|
|
11
|
+
kind: 'interaction';
|
|
12
|
+
key: string;
|
|
13
|
+
interaction: ChatInteraction;
|
|
14
|
+
};
|
|
15
|
+
/** Converts persisted/live parts to canonical cards. Legacy interaction-plan
|
|
16
|
+
* cards are suppressed only when their raw part carries an explicit planId and
|
|
17
|
+
* revision matching a durable plan. Identical markdown alone is never proof. */
|
|
18
|
+
export declare function durableChatCardsFromParts(parts: Array<Record<string, unknown>>): DurableChatCard[];
|
|
19
|
+
export interface DurableChatCardsProps {
|
|
20
|
+
parts: Array<Record<string, unknown>>;
|
|
21
|
+
canWrite: boolean;
|
|
22
|
+
submitInteraction: SubmitInteractionAnswer;
|
|
23
|
+
decidePlan: (plan: ChatPlan, decision: DurablePlanDecision, feedback?: string) => Promise<DurablePlanDecisionResult | null>;
|
|
24
|
+
decidingPlan?: (plan: ChatPlan) => DurablePlanDecision | null;
|
|
25
|
+
planError?: (plan: ChatPlan) => string | null;
|
|
26
|
+
onInteractionResolved?: (id: string, status: Exclude<ChatInteraction['status'], 'pending'>, answers?: InteractionAnswers) => void;
|
|
27
|
+
onLateAnswer?: (message: string) => boolean | void | Promise<boolean | void>;
|
|
28
|
+
/** Fired when the user asks the agent to re-submit an expired/withdrawn
|
|
29
|
+
* plan card as a new chat turn; receives that card's interaction. Omit to
|
|
30
|
+
* hide the affordance entirely. */
|
|
31
|
+
onReRequest?: (interaction: ChatInteraction) => boolean | void | Promise<boolean | void>;
|
|
32
|
+
/** Overrides the default re-request button label. */
|
|
33
|
+
reRequestLabel?: string;
|
|
34
|
+
renderMarkdown?: (markdown: string) => ReactNode;
|
|
35
|
+
className?: string;
|
|
36
|
+
}
|
|
37
|
+
/** Ready-to-embed canonical question/plan card lane for persisted assistant
|
|
38
|
+
* parts. Apps inject transport and styling callbacks instead of rebuilding the
|
|
39
|
+
* lifecycle/render switch. */
|
|
40
|
+
export declare function DurableChatCards({ parts, canWrite, submitInteraction, decidePlan, decidingPlan, planError, onInteractionResolved, onLateAnswer, onReRequest, reRequestLabel, renderMarkdown, className, }: DurableChatCardsProps): import("react").JSX.Element | null;
|