@theoremjs/studio 0.0.0-stage → 0.3.2
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/LICENSE +21 -0
- package/README.md +295 -2
- package/agreement.d.ts +14 -0
- package/agreement.js +80 -0
- package/asks.d.ts +47 -0
- package/asks.js +54 -0
- package/browser-connection.d.ts +49 -0
- package/browser-connection.js +215 -0
- package/browser-engine.d.ts +11 -0
- package/browser-engine.js +11 -0
- package/browser-execution.d.ts +6 -0
- package/browser-execution.js +18 -0
- package/browser-live.d.ts +4 -0
- package/browser-live.js +132 -0
- package/browser-transport.d.ts +33 -0
- package/browser-transport.js +229 -0
- package/browser.d.ts +4 -0
- package/browser.js +4 -0
- package/canonical.d.ts +10 -0
- package/canonical.js +25 -0
- package/compile-workspace.d.ts +28 -0
- package/compile-workspace.js +295 -0
- package/compile.d.ts +65 -0
- package/compile.js +1605 -0
- package/concierge-demo.d.ts +17 -0
- package/concierge-demo.js +1230 -0
- package/conversation-key.d.ts +5 -0
- package/conversation-key.js +10 -0
- package/decision-example-images.d.ts +30 -0
- package/decision-example-images.js +30 -0
- package/deno.json +3 -0
- package/draft.d.ts +407 -0
- package/draft.js +505 -0
- package/editors.d.ts +29 -0
- package/editors.js +51 -0
- package/example-embedding-files.d.ts +11 -0
- package/example-embedding-files.js +20 -0
- package/example.d.ts +36 -0
- package/example.js +357 -0
- package/guardrail-probe.d.ts +100 -0
- package/guardrail-probe.js +722 -0
- package/held-credentials.d.ts +28 -0
- package/held-credentials.js +87 -0
- package/installed.mjs +40 -0
- package/lent-keys.d.ts +122 -0
- package/lent-keys.js +47 -0
- package/line-diff.d.ts +15 -0
- package/line-diff.js +41 -0
- package/live-connection.d.ts +22 -0
- package/live-connection.js +27 -0
- package/live-session-bridge.d.ts +15 -0
- package/live-session-bridge.js +202 -0
- package/map-line.d.ts +19 -0
- package/map-line.js +42 -0
- package/map.d.ts +154 -0
- package/map.js +525 -0
- package/media-accept.d.ts +19 -0
- package/media-accept.js +65 -0
- package/mod.d.ts +39 -0
- package/mod.js +33 -0
- package/origins.d.ts +52 -0
- package/origins.js +165 -0
- package/package.json +85 -4
- package/page/assets/Banner-BISz3nXA.js +2 -0
- package/page/assets/BottomSheet-BwfBDtje.js +1 -0
- package/page/assets/Card-Lp-0P5eL.js +1 -0
- package/page/assets/CardWall-CBRLdDZW.js +1 -0
- package/page/assets/Center-nHS1JSux.js +1 -0
- package/page/assets/CheckboxInput-Cj5pk-KI.js +2 -0
- package/page/assets/CodeBlock-C7XJ4ioE.js +51 -0
- package/page/assets/CollapsibleGroup-N7_SOjbm.js +2 -0
- package/page/assets/ContextMenu-CBu9H-9H.js +2 -0
- package/page/assets/DateInput-BGrQ5tPC.js +1 -0
- package/page/assets/Dialog-DELWQo-v.js +1 -0
- package/page/assets/EmptyState-C8W4JKBZ.js +1 -0
- package/page/assets/HoverCard-D1Y1ltWQ.js +1 -0
- package/page/assets/Icon-JrysT8aU.js +3 -0
- package/page/assets/IconAlertTriangle-BqAEqqdU.js +1 -0
- package/page/assets/IconButton-DlOGzJIX.js +1 -0
- package/page/assets/IconEye-BB5aY-wQ.js +1 -0
- package/page/assets/IconFileText-6zOFKKrF.js +1 -0
- package/page/assets/IconSearch-BTx66a40.js +1 -0
- package/page/assets/IconShield-DDOh7Gr5.js +1 -0
- package/page/assets/ItemSwipeLayer-Ckn4X6h9.js +1 -0
- package/page/assets/PaneState-BvA2tLQg.js +1 -0
- package/page/assets/PaneState-eUzUkNE8.css +1 -0
- package/page/assets/ScrollableArea-Ckugdj1N.js +1 -0
- package/page/assets/Section-DJ97F7QE.js +1 -0
- package/page/assets/SegmentedControlItem-h-aaXzyS.js +1 -0
- package/page/assets/SidePanel-BL32abk8.js +1 -0
- package/page/assets/StackItem-CQviqAfM.js +1 -0
- package/page/assets/Text-bum6zWWx.js +2 -0
- package/page/assets/TimestampHoverCard-DQIG0RZF.js +1 -0
- package/page/assets/ToolResultCharts-CgshSv9Q.js +1 -0
- package/page/assets/Tooltip-BH9xiRMl.js +1 -0
- package/page/assets/TraceInspector-_yZiz05W.js +1 -0
- package/page/assets/TraceOverview-BPO-HIYK.js +57 -0
- package/page/assets/VStack-CkVMcNiK.js +1 -0
- package/page/assets/_virtual_studio-type-sources-ByxqQaOG.js +12936 -0
- package/page/assets/arrive-DvbqpeRS.js +1 -0
- package/page/assets/browser-engine-CYq9DQAM.js +9 -0
- package/page/assets/browser-transport-D-2jDYe7.js +47 -0
- package/page/assets/codicon-DF1abBS2.ttf +0 -0
- package/page/assets/compile-egress-BSxOdX4K.js +23 -0
- package/page/assets/container.stylex-BmOi-8DQ.js +1 -0
- package/page/assets/createReactComponent-CZwsv6DD.js +1 -0
- package/page/assets/decision-example-images-CZGr7YIT.js +1 -0
- package/page/assets/devWarning-DxuplmRl.js +1 -0
- package/page/assets/editor-DjpsE8to.css +1 -0
- package/page/assets/editor.api-Cd3ViPQa.js +908 -0
- package/page/assets/editor.worker-6GY8RhDc.js +1 -0
- package/page/assets/editor.worker-BmdWdrHZ.js +33 -0
- package/page/assets/editors-BJX_S59A.js +1 -0
- package/page/assets/egress-automata-B5ZGE1mT.js +1 -0
- package/page/assets/embedding-space-view-CfQBPDxD.js +140 -0
- package/page/assets/encode-files-Bc3HJyAh.js +1 -0
- package/page/assets/export-agent-C3yyzXH8.js +43 -0
- package/page/assets/figtree-latin-400-normal-BD4aNku5.woff +0 -0
- package/page/assets/figtree-latin-400-normal-g7Dtegnw.woff2 +0 -0
- package/page/assets/figtree-latin-500-normal-BWnGEVsr.woff2 +0 -0
- package/page/assets/figtree-latin-500-normal-B_yy1phn.woff +0 -0
- package/page/assets/figtree-latin-600-normal-BM_oTo4n.woff +0 -0
- package/page/assets/figtree-latin-600-normal-Cv_xCTDl.woff2 +0 -0
- package/page/assets/figtree-latin-700-normal-BCCt2T1q.woff +0 -0
- package/page/assets/figtree-latin-700-normal-th6qEP7c.woff2 +0 -0
- package/page/assets/focusOutline.stylex-BT0kfa4t.js +1 -0
- package/page/assets/focusableSelector-DXZeMU85.js +1 -0
- package/page/assets/groupStyles-C7Ter7zC.js +1 -0
- package/page/assets/guardrail-tester-Gut5xK4a.js +9 -0
- package/page/assets/host-patterns-C9RMP16Q.js +1 -0
- package/page/assets/index-CvvmFKgS.js +105 -0
- package/page/assets/index-DOaHlqBo.css +1 -0
- package/page/assets/isRtlElement-BG33-k_H.js +1 -0
- package/page/assets/labels-provider-4TIWDvsE.js +3 -0
- package/page/assets/lent-keys-C32ems-I.js +1 -0
- package/page/assets/live-ingress-lDUGPwth.js +1 -0
- package/page/assets/live-messages-CnkL4GWi.js +1 -0
- package/page/assets/mergeProps-ptS-gIMz.js +1 -0
- package/page/assets/padding.stylex-B76907Zf.js +1 -0
- package/page/assets/preload-helper-DpV6A1kQ.js +1 -0
- package/page/assets/reader-BOCCYaRp.js +7 -0
- package/page/assets/register-CDgivxvX.js +2 -0
- package/page/assets/rolldown-runtime-hePW80VL.js +1 -0
- package/page/assets/schemas-BQ9Jydzb.js +56 -0
- package/page/assets/shaped-data-BcarWqd5.js +16 -0
- package/page/assets/sharedResizeObserver-4U9Xq5Oq.js +1 -0
- package/page/assets/stub-DhdcU_Ew.js +471 -0
- package/page/assets/studio-code-pane-C_SAbcOa.js +8 -0
- package/page/assets/studio-console-DZwlEsvr.js +3 -0
- package/page/assets/studio-decision-B0FnCAXA.js +1 -0
- package/page/assets/studio-embedding-CmA51HVo.js +2 -0
- package/page/assets/studio-host-console-By7hqu2l.js +2 -0
- package/page/assets/studio-live-BrcVQcyV.js +1 -0
- package/page/assets/studio-map-B_xSia-z.js +1 -0
- package/page/assets/studio-map-Bb06Tw1F.css +1 -0
- package/page/assets/studio-monaco-CbKf90i6.css +1 -0
- package/page/assets/studio-monaco-xfyfezQS.js +34 -0
- package/page/assets/studio-ts.worker-B-EXG4Sv.js +67741 -0
- package/page/assets/studio-ts.worker-BXtW3z-O.js +1 -0
- package/page/assets/studio-type-checker-BOvxudki.js +23 -0
- package/page/assets/themeProps-3IqahpCr.js +1 -0
- package/page/assets/tokens.stylex-DkHf0P9C.js +1 -0
- package/page/assets/tool-schema-idaOe2nI.js +18 -0
- package/page/assets/trace-patterns-DnYJa0nI.js +1 -0
- package/page/assets/trace-record-C3zNksA_.js +1 -0
- package/page/assets/trace-schema-9CdEyG6Q.js +1 -0
- package/page/assets/tree-DqyAMsbI.js +3 -0
- package/page/assets/turn-client-Du3Um3Mg.js +2 -0
- package/page/assets/types-BhfXQCLx.js +1 -0
- package/page/assets/typescript-20GgZ8PJ.js +1 -0
- package/page/assets/use-one-call-Hcs8YBp1.js +1 -0
- package/page/assets/useAdaptivePresentation-BzmPCddb.js +1 -0
- package/page/assets/useClipboard-BgGRxRMJ.js +1 -0
- package/page/assets/useContainerReveal-BFy8N_QU.js +1 -0
- package/page/assets/useDevWarning-Z9SoixOP.js +1 -0
- package/page/assets/useLayerDismissal-B_G7IWpC.js +1 -0
- package/page/assets/useMediaQuery-BCT0NUeZ.js +1 -0
- package/page/assets/useScrollLock-Dyf6PHJt.js +1 -0
- package/page/assets/useScrollableArea-0NzdiBCq.js +1 -0
- package/page/assets/useTooltip-CJM_xhLB.js +1 -0
- package/page/assets/workspace-DZALqEDX.js +1 -0
- package/page/assets/zip-DTcEfps6.js +1 -0
- package/page/index.html +90 -0
- package/page.mjs +49 -0
- package/people.d.ts +87 -0
- package/people.js +110 -0
- package/policy.d.ts +43 -0
- package/policy.js +102 -0
- package/ports.d.mts +32 -0
- package/ports.mjs +85 -0
- package/probe-battery.d.ts +13 -0
- package/probe-battery.js +404 -0
- package/providers.d.ts +149 -0
- package/providers.js +306 -0
- package/read-source.d.ts +48 -0
- package/read-source.js +1301 -0
- package/read-steps.d.ts +23 -0
- package/read-steps.js +2 -0
- package/reader.d.ts +11 -0
- package/reader.js +11 -0
- package/registrations.d.ts +83 -0
- package/registrations.js +1 -0
- package/requirements.d.ts +22 -0
- package/requirements.js +38 -0
- package/run-payload-core.d.ts +28 -0
- package/run-payload-core.js +123 -0
- package/run-payload.d.ts +32 -0
- package/run-payload.js +26 -0
- package/runtime-scope.d.ts +84 -0
- package/runtime-scope.js +308 -0
- package/runtime.d.ts +84 -0
- package/runtime.js +387 -0
- package/section-notes.d.ts +33 -0
- package/section-notes.js +38 -0
- package/serve-page.mjs +96 -0
- package/server/draft-decide.d.ts +72 -0
- package/server/draft-decide.js +111 -0
- package/server/draft-embedding.d.ts +3 -0
- package/server/draft-embedding.js +35 -0
- package/server/draft-handler.d.ts +82 -0
- package/server/draft-handler.js +213 -0
- package/server/draft-probe.d.ts +14 -0
- package/server/draft-probe.js +61 -0
- package/server/draft-replies.d.ts +22 -0
- package/server/draft-replies.js +46 -0
- package/server/edited-session.d.ts +28 -0
- package/server/edited-session.js +83 -0
- package/server/edits.d.ts +38 -0
- package/server/edits.js +195 -0
- package/server/handler.d.ts +133 -0
- package/server/handler.js +598 -0
- package/server/lent-draft.d.ts +19 -0
- package/server/lent-draft.js +23 -0
- package/server/live.d.ts +15 -0
- package/server/live.js +96 -0
- package/server/open-editor.d.ts +63 -0
- package/server/open-editor.js +115 -0
- package/server/origins.d.ts +18 -0
- package/server/origins.js +330 -0
- package/server/project-source.d.ts +208 -0
- package/server/project-source.js +1042 -0
- package/server/project.d.ts +22 -0
- package/server/project.js +56 -0
- package/server/run-traces.d.ts +20 -0
- package/server/run-traces.js +96 -0
- package/server/save-new.d.ts +29 -0
- package/server/save-new.js +514 -0
- package/server/save-plan.d.ts +46 -0
- package/server/save-plan.js +1134 -0
- package/server/save-remove.d.ts +21 -0
- package/server/save-remove.js +528 -0
- package/server/save-session.d.ts +96 -0
- package/server/save-session.js +418 -0
- package/server/save-wire.d.ts +235 -0
- package/server/save-wire.js +8 -0
- package/server/save.d.ts +52 -0
- package/server/save.js +209 -0
- package/server/serve.d.ts +23 -0
- package/server/serve.js +413 -0
- package/server/test-connection.d.ts +17 -0
- package/server/test-connection.js +362 -0
- package/server/test-key.d.ts +2 -0
- package/server/test-key.js +83 -0
- package/server/watch.d.ts +28 -0
- package/server/watch.js +93 -0
- package/server/zod-edit.d.ts +74 -0
- package/server/zod-edit.js +558 -0
- package/server.d.ts +8 -0
- package/server.js +8 -0
- package/setups.mjs +170 -0
- package/shared-carry.d.ts +114 -0
- package/shared-carry.js +523 -0
- package/shared-settings.d.ts +34 -0
- package/shared-settings.js +70 -0
- package/source.d.ts +75 -0
- package/source.js +414 -0
- package/start.mjs +169 -0
- package/stream-lines.d.ts +9 -0
- package/stream-lines.js +27 -0
- package/stub.d.ts +6 -0
- package/stub.js +33 -0
- package/surface.d.ts +53 -0
- package/surface.js +631 -0
- package/system-markup.d.ts +20 -0
- package/system-markup.js +51 -0
- package/tool-schema.d.ts +23 -0
- package/tool-schema.js +69 -0
- package/tools.d.ts +16 -0
- package/tools.js +91 -0
- package/traces.d.ts +24 -0
- package/traces.js +29 -0
- package/transport.d.ts +57 -0
- package/transport.js +187 -0
- package/tree.d.ts +32 -0
- package/tree.js +83 -0
- package/types.d.ts +62 -0
- package/types.js +6 -0
- package/ui/acting-as-button.d.ts +2 -0
- package/ui/acting-as-button.js +16 -0
- package/ui/add-provider.d.ts +13 -0
- package/ui/add-provider.js +20 -0
- package/ui/boot-mark.css +53 -0
- package/ui/boot-mark.d.ts +19 -0
- package/ui/boot-mark.js +128 -0
- package/ui/boot-paint.d.ts +8 -0
- package/ui/boot-paint.js +8 -0
- package/ui/brand-icons.d.ts +57 -0
- package/ui/brand-icons.js +148 -0
- package/ui/built/theme.css +830 -0
- package/ui/built/theme.css.d.ts +9 -0
- package/ui/built/theorem-studio.d.ts +13 -0
- package/ui/built/theorem-studio.js +705 -0
- package/ui/built/theorem-studio.variants.d.ts +28 -0
- package/ui/code/monaco-contributions.d.ts +45 -0
- package/ui/code/studio-code.d.ts +7 -0
- package/ui/code/studio-code.js +253 -0
- package/ui/code/studio-monaco.d.ts +44 -0
- package/ui/code/studio-monaco.js +48 -0
- package/ui/code/studio-ts.worker.d.ts +1 -0
- package/ui/code/studio-ts.worker.js +16 -0
- package/ui/code/studio-type-checker.d.ts +12 -0
- package/ui/code/studio-type-checker.js +308 -0
- package/ui/code/studio-type-sources.d.ts +26 -0
- package/ui/confirm-write.d.ts +12 -0
- package/ui/confirm-write.js +45 -0
- package/ui/diff-block.d.ts +21 -0
- package/ui/diff-block.js +17 -0
- package/ui/figtree.css +59 -0
- package/ui/file-place.d.ts +4 -0
- package/ui/file-place.js +26 -0
- package/ui/guardrail-tester.d.ts +18 -0
- package/ui/guardrail-tester.js +248 -0
- package/ui/inspector-context.d.ts +119 -0
- package/ui/inspector-context.js +84 -0
- package/ui/inspector.d.ts +247 -0
- package/ui/inspector.js +284 -0
- package/ui/lib/acting-as.d.ts +25 -0
- package/ui/lib/acting-as.js +90 -0
- package/ui/lib/boot-sequence.d.ts +32 -0
- package/ui/lib/boot-sequence.js +57 -0
- package/ui/lib/export-agent.d.ts +11 -0
- package/ui/lib/export-agent.js +335 -0
- package/ui/lib/facet-icons.d.ts +20 -0
- package/ui/lib/facet-icons.js +21 -0
- package/ui/lib/panel-motion.d.ts +8 -0
- package/ui/lib/panel-motion.js +74 -0
- package/ui/lib/project-address.d.ts +14 -0
- package/ui/lib/project-address.js +24 -0
- package/ui/lib/project-starting.d.ts +13 -0
- package/ui/lib/project-starting.js +30 -0
- package/ui/lib/project-traces.d.ts +17 -0
- package/ui/lib/project-traces.js +54 -0
- package/ui/lib/read-map.d.ts +30 -0
- package/ui/lib/read-map.js +173 -0
- package/ui/lib/read-progress.d.ts +14 -0
- package/ui/lib/read-progress.js +12 -0
- package/ui/lib/refusal-lines.d.ts +3 -0
- package/ui/lib/refusal-lines.js +8 -0
- package/ui/lib/studio-activity.d.ts +5 -0
- package/ui/lib/studio-activity.js +17 -0
- package/ui/lib/studio-console.d.ts +27 -0
- package/ui/lib/studio-console.js +9 -0
- package/ui/lib/studio-conversation.d.ts +20 -0
- package/ui/lib/studio-conversation.js +130 -0
- package/ui/lib/studio-examples.d.ts +31 -0
- package/ui/lib/studio-examples.js +25 -0
- package/ui/lib/studio-labels.d.ts +6 -0
- package/ui/lib/studio-labels.js +13 -0
- package/ui/lib/studio-map-kept.d.ts +17 -0
- package/ui/lib/studio-map-kept.js +48 -0
- package/ui/lib/studio-open.d.ts +22 -0
- package/ui/lib/studio-open.js +54 -0
- package/ui/lib/studio-page.d.ts +33 -0
- package/ui/lib/studio-page.js +121 -0
- package/ui/lib/studio-prefs.d.ts +26 -0
- package/ui/lib/studio-prefs.js +87 -0
- package/ui/lib/studio-project.d.ts +106 -0
- package/ui/lib/studio-project.js +177 -0
- package/ui/lib/studio-restore.d.ts +49 -0
- package/ui/lib/studio-restore.js +251 -0
- package/ui/lib/studio-run-open.d.ts +15 -0
- package/ui/lib/studio-run-open.js +16 -0
- package/ui/lib/studio-session.d.ts +34 -0
- package/ui/lib/studio-session.js +17 -0
- package/ui/lib/studio-settings.d.ts +15 -0
- package/ui/lib/studio-settings.js +48 -0
- package/ui/lib/studio-store.d.ts +64 -0
- package/ui/lib/studio-store.js +391 -0
- package/ui/lib/studio-watch.d.ts +12 -0
- package/ui/lib/studio-watch.js +27 -0
- package/ui/lib/tab-fills.d.ts +6 -0
- package/ui/lib/tab-fills.js +14 -0
- package/ui/lib/tool-credentials.d.ts +3 -0
- package/ui/lib/tool-credentials.js +23 -0
- package/ui/lib/tool-probe.d.ts +19 -0
- package/ui/lib/tool-probe.js +104 -0
- package/ui/lib/type-icons.d.ts +35 -0
- package/ui/lib/type-icons.js +38 -0
- package/ui/lib/when-idle.d.ts +5 -0
- package/ui/lib/when-idle.js +14 -0
- package/ui/lib/zip.d.ts +5 -0
- package/ui/lib/zip.js +8 -0
- package/ui/map-token.css +11 -0
- package/ui/map-token.d.ts +17 -0
- package/ui/map-token.js +29 -0
- package/ui/mcp-icon.d.ts +6 -0
- package/ui/mcp-icon.js +8 -0
- package/ui/motion.css +113 -0
- package/ui/pan.d.ts +32 -0
- package/ui/pan.js +90 -0
- package/ui/profile-editor.d.ts +33 -0
- package/ui/profile-editor.js +2638 -0
- package/ui/provider-editor.d.ts +15 -0
- package/ui/provider-editor.js +92 -0
- package/ui/read-map.css +48 -0
- package/ui/read-map.d.ts +7 -0
- package/ui/read-map.js +163 -0
- package/ui/refusal-detail.d.ts +4 -0
- package/ui/refusal-detail.js +21 -0
- package/ui/shared-change.d.ts +9 -0
- package/ui/shared-change.js +28 -0
- package/ui/shell-motion.css +121 -0
- package/ui/shell-motion.d.ts +73 -0
- package/ui/shell-motion.js +194 -0
- package/ui/studio-code-pane.d.ts +19 -0
- package/ui/studio-code-pane.js +44 -0
- package/ui/studio-compare.d.ts +80 -0
- package/ui/studio-compare.js +326 -0
- package/ui/studio-conflicts.d.ts +17 -0
- package/ui/studio-conflicts.js +87 -0
- package/ui/studio-connection.d.ts +64 -0
- package/ui/studio-connection.js +286 -0
- package/ui/studio-decision.d.ts +6 -0
- package/ui/studio-decision.js +49 -0
- package/ui/studio-embedding.d.ts +6 -0
- package/ui/studio-embedding.js +30 -0
- package/ui/studio-host-console.d.ts +6 -0
- package/ui/studio-host-console.js +17 -0
- package/ui/studio-host.d.ts +73 -0
- package/ui/studio-host.js +12 -0
- package/ui/studio-live.d.ts +17 -0
- package/ui/studio-live.js +26 -0
- package/ui/studio-map.css +273 -0
- package/ui/studio-map.d.ts +17 -0
- package/ui/studio-map.js +397 -0
- package/ui/studio-nav.d.ts +24 -0
- package/ui/studio-nav.js +17 -0
- package/ui/studio-no-project.d.ts +5 -0
- package/ui/studio-no-project.js +9 -0
- package/ui/studio-run.css +76 -0
- package/ui/studio-run.d.ts +14 -0
- package/ui/studio-run.js +119 -0
- package/ui/studio-runner.d.ts +45 -0
- package/ui/studio-runner.js +187 -0
- package/ui/studio-save.d.ts +49 -0
- package/ui/studio-save.js +307 -0
- package/ui/studio-screen.d.ts +61 -0
- package/ui/studio-screen.js +2078 -0
- package/ui/studio-settings.d.ts +31 -0
- package/ui/studio-settings.js +288 -0
- package/ui/studio-shell.css +27 -0
- package/ui/studio-shell.d.ts +43 -0
- package/ui/studio-shell.js +87 -0
- package/ui/studio-theme.d.ts +7 -0
- package/ui/studio-theme.js +94 -0
- package/ui/studio.css +427 -0
- package/ui/theorem-mark.css +84 -0
- package/ui/theorem-mark.d.ts +22 -0
- package/ui/theorem-mark.js +21 -0
- package/vite.d.mts +30 -0
- package/vite.mjs +277 -0
- package/workspace.d.ts +230 -0
- package/workspace.js +1054 -0
package/runtime-scope.js
ADDED
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Studio drafts, each run on a kernel scope of its own. Two visitors can
|
|
3
|
+
* name the same profile, tool, or schema without either one seeing the other's.
|
|
4
|
+
*/
|
|
5
|
+
import { createKernelScope, defineProfile, defineProtocol, defineProvider, TheoremError, } from '@theoremjs/agents';
|
|
6
|
+
import { listsPatterns, TAINT_GATES, } from '@theoremjs/agents/guardrails';
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
import { STUDIO_KEY_SLOT_CAP, studioKeySlots } from "./browser-connection.js";
|
|
9
|
+
import { lentCompression, runtimeNetwork } from "./lent-keys.js";
|
|
10
|
+
import { modelBindingViolation } from "./policy.js";
|
|
11
|
+
import { localProviderAddress, registerStudioProvider, STUDIO_PROVIDERS } from "./providers.js";
|
|
12
|
+
import { registerDefined } from "./tools.js";
|
|
13
|
+
/** The protocol event a scripted model's event stands for. */
|
|
14
|
+
function protocolEvent(event) {
|
|
15
|
+
if (event.type === 'tool')
|
|
16
|
+
return { type: 'tool_call', call: event.tool };
|
|
17
|
+
if (event.type === 'done') {
|
|
18
|
+
return {
|
|
19
|
+
type: 'done',
|
|
20
|
+
stop: event.stop,
|
|
21
|
+
...(event.interrupted ? { interrupted: true } : {}),
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
return event;
|
|
25
|
+
}
|
|
26
|
+
/** A provider whose one protocol answers every call with `model`, sending nothing. */
|
|
27
|
+
function scriptedProvider(id, protocolId, model) {
|
|
28
|
+
const protocol = defineProtocol({
|
|
29
|
+
id: protocolId,
|
|
30
|
+
name: 'Scripted',
|
|
31
|
+
description: 'Answers with the events a scripted model gives.',
|
|
32
|
+
endpoints: { text: '/', image: '/', speech: '/' },
|
|
33
|
+
options: z.record(z.string(), z.json()),
|
|
34
|
+
create: (context) => ({
|
|
35
|
+
async *complete(request) {
|
|
36
|
+
let done = false;
|
|
37
|
+
// why: a scripted model writes whatever built-ins the binding names.
|
|
38
|
+
for await (const event of model.complete({
|
|
39
|
+
...request,
|
|
40
|
+
builtInTools: context.builtInTools,
|
|
41
|
+
})) {
|
|
42
|
+
if (event.type === 'done')
|
|
43
|
+
done = true;
|
|
44
|
+
yield protocolEvent(event);
|
|
45
|
+
}
|
|
46
|
+
if (!done)
|
|
47
|
+
yield { type: 'done', stop: { kind: 'completed' } };
|
|
48
|
+
},
|
|
49
|
+
}),
|
|
50
|
+
});
|
|
51
|
+
return defineProvider({
|
|
52
|
+
id,
|
|
53
|
+
name: 'Scripted',
|
|
54
|
+
description: 'Answers with a scripted model.',
|
|
55
|
+
serves: () => [{ protocol, baseUrl: 'https://scripted.invalid' }],
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The host options a profile's turn runs with. A runtime with a scripted model registers it as a
|
|
60
|
+
* provider of its own and binds the profile's model to it.
|
|
61
|
+
*/
|
|
62
|
+
export function runtimeProvider(runtime, scope, profile, model) {
|
|
63
|
+
const scripted = runtime.provider?.(profile, model);
|
|
64
|
+
if (scripted && profile.type !== 'host') {
|
|
65
|
+
const selected = model ?? ('defaultModel' in profile ? profile.defaultModel : Object.keys(profile.models)[0]);
|
|
66
|
+
const binding = profile.models[selected];
|
|
67
|
+
const id = `scripted-${profile.id.toLowerCase().replace(/[^a-z0-9-]/g, '-')}`;
|
|
68
|
+
// why: a protocol id is letters and digits only; a provider id may hold hyphens.
|
|
69
|
+
const protocol = id.replaceAll('-', '');
|
|
70
|
+
scope.providers.replace(scriptedProvider(id, protocol, scripted));
|
|
71
|
+
scope.profiles.register({
|
|
72
|
+
...profile,
|
|
73
|
+
models: {
|
|
74
|
+
...profile.models,
|
|
75
|
+
[selected]: {
|
|
76
|
+
...binding,
|
|
77
|
+
protocol,
|
|
78
|
+
provider: id,
|
|
79
|
+
options: {},
|
|
80
|
+
keySlot: undefined,
|
|
81
|
+
fallbackKeySlot: undefined,
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
const options = runtime.providers ?? {};
|
|
87
|
+
const host = runtime.hostOptions?.(profile, model) ?? {};
|
|
88
|
+
return {
|
|
89
|
+
...host,
|
|
90
|
+
vault: host.vault ?? options.vault,
|
|
91
|
+
fetch: host.fetch ?? options.fetch ?? options.local?.fetch,
|
|
92
|
+
wait: host.wait ?? options.wait,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
/** The studio's providers, the local one at the runtime's address, then the project's own. */
|
|
96
|
+
function registerRuntimeProviders(scope, runtime) {
|
|
97
|
+
const local = runtime?.providers?.local?.baseUrl;
|
|
98
|
+
for (const provider of STUDIO_PROVIDERS) {
|
|
99
|
+
registerStudioProvider(scope.providers, provider.definition === 'local' && local
|
|
100
|
+
? { ...provider, connection: { baseUrl: localProviderAddress(local) } }
|
|
101
|
+
: provider);
|
|
102
|
+
}
|
|
103
|
+
for (const definition of runtime?.providerDefinitions ?? [])
|
|
104
|
+
scope.providers.register(definition);
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Each called agent runs on a provider of its own, so it reads its own key
|
|
108
|
+
* slots and may use another provider than its caller. The runtime may refuse
|
|
109
|
+
* the call first.
|
|
110
|
+
*/
|
|
111
|
+
export function agentCallHook(scope, runtime) {
|
|
112
|
+
return async (call) => {
|
|
113
|
+
const refused = await runtime.onAgentCall?.(call);
|
|
114
|
+
if (refused)
|
|
115
|
+
return refused;
|
|
116
|
+
return { provider: runtimeProvider(runtime, scope, scope.profiles.get(call.profile)) };
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
/** The stricter of two gates. */
|
|
120
|
+
function stricterGate(a, b) {
|
|
121
|
+
return TAINT_GATES.indexOf(a ?? 'off') > TAINT_GATES.indexOf(b) ? a : b;
|
|
122
|
+
}
|
|
123
|
+
/** `guardrails` held to what lent keys refuse after a remote read. */
|
|
124
|
+
function withHeldTaint(guardrails, runtime) {
|
|
125
|
+
if (runtime.mode !== 'demo' || runtime.keys.holds.afterRemoteRead === 'off')
|
|
126
|
+
return guardrails;
|
|
127
|
+
const afterRemoteRead = stricterGate(guardrails.taint?.afterRemoteRead, runtime.keys.holds.afterRemoteRead);
|
|
128
|
+
if (afterRemoteRead === guardrails.taint?.afterRemoteRead)
|
|
129
|
+
return guardrails;
|
|
130
|
+
return { ...guardrails, taint: { ...guardrails.taint, afterRemoteRead } };
|
|
131
|
+
}
|
|
132
|
+
function runtimeGuardrails(guardrails, runtime) {
|
|
133
|
+
switch (runtimeNetwork(runtime)) {
|
|
134
|
+
case 'public':
|
|
135
|
+
return { ...guardrails, network: undefined };
|
|
136
|
+
case 'none':
|
|
137
|
+
return { ...guardrails, network: { allowedSchemes: [] } };
|
|
138
|
+
case 'asWritten':
|
|
139
|
+
return guardrails;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
function runtimeProfileDefinition(def, runtime) {
|
|
143
|
+
// A speech, decision, or embedding profile calls no tools: no network or taint hold governs it.
|
|
144
|
+
if (def.type === 'speech' || def.type === 'decision' || def.type === 'embedding')
|
|
145
|
+
return def;
|
|
146
|
+
// A host runs one tool per call, so a turn never reads before it acts; the kernel refuses taint there.
|
|
147
|
+
if (def.type === 'host') {
|
|
148
|
+
return {
|
|
149
|
+
...def,
|
|
150
|
+
guardrails: runtimeGuardrails(def.guardrails ?? {}, runtime),
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
return {
|
|
154
|
+
...withLentCompression(def, runtime),
|
|
155
|
+
guardrails: withHeldTaint(runtimeGuardrails(def.guardrails ?? {}, runtime), runtime),
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
/** A Live profile on lent keys runs with the compression sizes the editor shows for them. */
|
|
159
|
+
function withLentCompression(def, runtime) {
|
|
160
|
+
if (def.type !== 'live' || runtime.mode !== 'demo')
|
|
161
|
+
return def;
|
|
162
|
+
const compression = def.live?.contextCompression;
|
|
163
|
+
if (!compression)
|
|
164
|
+
return def;
|
|
165
|
+
const sizes = lentCompression(runtime.keys, {
|
|
166
|
+
triggerTokens: compression.triggerTokens,
|
|
167
|
+
targetTokens: compression.slidingWindow.targetTokens,
|
|
168
|
+
});
|
|
169
|
+
return {
|
|
170
|
+
...def,
|
|
171
|
+
live: {
|
|
172
|
+
...def.live,
|
|
173
|
+
contextCompression: {
|
|
174
|
+
...compression,
|
|
175
|
+
triggerTokens: sizes.triggerTokens,
|
|
176
|
+
slidingWindow: { ...compression.slidingWindow, targetTokens: sizes.targetTokens },
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* `def` with the table compiled for each detector's patterns, here where the draft runs: a table
|
|
183
|
+
* a browser sent is never trusted, since compiling is what refuses a pattern that could hang on
|
|
184
|
+
* hostile text. The compiler loads only for a draft that has patterns.
|
|
185
|
+
*/
|
|
186
|
+
export async function withCompiledPatterns(def) {
|
|
187
|
+
if (!hasPatterns(def))
|
|
188
|
+
return def;
|
|
189
|
+
const { compileDetect } = await import('@theoremjs/agents/guardrails/compile');
|
|
190
|
+
return withPatterns(def, compileDetect);
|
|
191
|
+
}
|
|
192
|
+
/** Whether `def` has a detector that lists patterns to compile. */
|
|
193
|
+
function hasPatterns(def) {
|
|
194
|
+
const detect = def.guardrails && 'detect' in def.guardrails ? def.guardrails.detect : undefined;
|
|
195
|
+
return typeof detect === 'object' && listsPatterns(detect);
|
|
196
|
+
}
|
|
197
|
+
/** `def` with its patterns compiled by `compile`, for a caller that already holds the compiler. */
|
|
198
|
+
export function withPatterns(def, compile) {
|
|
199
|
+
if (!hasPatterns(def))
|
|
200
|
+
return def;
|
|
201
|
+
const guardrails = def.guardrails;
|
|
202
|
+
return { ...def, guardrails: { ...guardrails, detect: compile(guardrails.detect) } };
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Refuses a tool schema a browser sent whose `pattern` could hang on text a model writes: zod
|
|
206
|
+
* runs it on every call, here on the run's server. It is the check the kernel makes of a
|
|
207
|
+
* detector's patterns, and loads only for a draft whose schemas have patterns.
|
|
208
|
+
*/
|
|
209
|
+
async function refuseSlowSchemaPatterns(tools) {
|
|
210
|
+
const found = tools.flatMap((tool) => ['input', 'output'].flatMap((side) => schemaPatterns(tool[`${side}Schema`]).map((source) => ({ tool: tool.name, side, source }))));
|
|
211
|
+
if (!found.length)
|
|
212
|
+
return;
|
|
213
|
+
const { slowPatternProblem } = await import('@theoremjs/agents/guardrails/compile');
|
|
214
|
+
for (const { tool, side, source } of found) {
|
|
215
|
+
const slow = slowPatternProblem(source);
|
|
216
|
+
if (slow) {
|
|
217
|
+
// labels-exempt: builder diagnostic
|
|
218
|
+
throw new TheoremError('request', `${tool}: the pattern /${source}/ in its ${side} schema ${slow}`);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
/** Every regular expression a JSON Schema holds: each `pattern`, and each `patternProperties` key. */
|
|
223
|
+
function schemaPatterns(value) {
|
|
224
|
+
if (Array.isArray(value))
|
|
225
|
+
return value.flatMap(schemaPatterns);
|
|
226
|
+
if (!value || typeof value !== 'object')
|
|
227
|
+
return [];
|
|
228
|
+
return Object.entries(value).flatMap(([key, inner]) => [
|
|
229
|
+
...(key === 'pattern' && typeof inner === 'string' ? [inner] : []),
|
|
230
|
+
...(key === 'patternProperties' && inner && typeof inner === 'object'
|
|
231
|
+
? Object.keys(inner)
|
|
232
|
+
: []),
|
|
233
|
+
...schemaPatterns(inner),
|
|
234
|
+
]);
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* `work` on a draft a request carries: the sender wrote the draft, so a draft the kernel refuses is
|
|
238
|
+
* a bad request (`request`), not the host's configuration (`config`).
|
|
239
|
+
*/
|
|
240
|
+
function asDraft(work) {
|
|
241
|
+
try {
|
|
242
|
+
return work();
|
|
243
|
+
}
|
|
244
|
+
catch (err) {
|
|
245
|
+
if (err instanceof TheoremError && err.kind === 'config') {
|
|
246
|
+
throw new TheoremError('request', err.message, { cause: err });
|
|
247
|
+
}
|
|
248
|
+
throw err;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
/** `defineProfile` for a draft a request carries. */
|
|
252
|
+
export const defineDraft = ((definition) => asDraft(() => defineProfile(definition)));
|
|
253
|
+
/** Registers the draft's tools, schema, and profile into `scope`, as the runtime runs it. */
|
|
254
|
+
async function registerDraft(scope, profile, customTools, structured, runtime) {
|
|
255
|
+
if (studioKeySlots(profile).length > STUDIO_KEY_SLOT_CAP) {
|
|
256
|
+
throw new TheoremError('request', 'The studio supports up to 32 key slots.'); // labels-exempt: builder diagnostic
|
|
257
|
+
}
|
|
258
|
+
await refuseSlowSchemaPatterns(customTools);
|
|
259
|
+
const defined = defineDraft(runtimeProfileDefinition(await withCompiledPatterns(profile), runtime));
|
|
260
|
+
if (defined.type !== 'host') {
|
|
261
|
+
for (const binding of Object.values(defined.models)) {
|
|
262
|
+
const violation = modelBindingViolation({
|
|
263
|
+
profileType: defined.type,
|
|
264
|
+
protocol: binding.protocol,
|
|
265
|
+
provider: binding.provider,
|
|
266
|
+
definition: scope.providers.require(binding.provider, binding.apiId).definition.id,
|
|
267
|
+
apiId: binding.apiId,
|
|
268
|
+
decision: defined.type === 'decision',
|
|
269
|
+
builtInTools: 'builtInTools' in binding ? (binding.builtInTools ?? []) : [],
|
|
270
|
+
}, runtime);
|
|
271
|
+
if (violation)
|
|
272
|
+
throw new TheoremError('request', violation.message); // labels-exempt: builder connection diagnostic
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
// why: Registering checks each binding's options and the tools and schemas it names, all the sender's.
|
|
276
|
+
return asDraft(() => registerDefined(scope, defined, customTools, structured, runtime.toolHandlers));
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* A new scope holding one request's draft, and the profile to run on it. Never cache or share it:
|
|
280
|
+
* the scope also holds MCP sessions, and a shared one would hand a keyless server's session to
|
|
281
|
+
* every visitor and keep it past the request. `dependencies` are registered first, in order.
|
|
282
|
+
*/
|
|
283
|
+
export async function studioScope(profile, customTools, structured, runtime, dependencies = []) {
|
|
284
|
+
const scope = createKernelScope();
|
|
285
|
+
registerRuntimeProviders(scope, runtime);
|
|
286
|
+
for (const dependency of dependencies) {
|
|
287
|
+
await registerDraft(scope, dependency.profile, dependency.customTools, dependency.structured, runtime);
|
|
288
|
+
}
|
|
289
|
+
return {
|
|
290
|
+
scope,
|
|
291
|
+
profile: await registerDraft(scope, profile, customTools, structured, runtime),
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* A new scope holding drafts as written, the last one returned: no runtime
|
|
296
|
+
* rewrites their guardrails or checks their model bindings. For a run that
|
|
297
|
+
* calls no model and reaches no host. Never cache or share it.
|
|
298
|
+
*/
|
|
299
|
+
export async function writtenScope(drafts) {
|
|
300
|
+
const scope = createKernelScope();
|
|
301
|
+
registerRuntimeProviders(scope);
|
|
302
|
+
let profile;
|
|
303
|
+
for (const draft of drafts) {
|
|
304
|
+
await refuseSlowSchemaPatterns(draft.customTools);
|
|
305
|
+
profile = registerDefined(scope, defineDraft(await withCompiledPatterns(draft.profile)), draft.customTools, draft.structured);
|
|
306
|
+
}
|
|
307
|
+
return { scope, profile };
|
|
308
|
+
}
|
package/runtime.d.ts
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { type DecisionAsset, type ProfileDefinition, type TraceRecord, type TurnEvent } from '@theoremjs/agents';
|
|
2
|
+
import { type TranscriptBlock } from '@theoremjs/agents/interface';
|
|
3
|
+
import { type EmbeddingRequest, type EmbeddingResult, type RunDecisionOptions } from '@theoremjs/agents/kernel';
|
|
4
|
+
import { type ConversationView, type DecisionTransport, type TheoremConversationRequest, type TheoremHostCallRequest, type TheoremInvokeRequest, type TheoremRewindRequest, type TheoremRewound, type TheoremTurnRequest } from '@theoremjs/react/client';
|
|
5
|
+
import { type ReplyLine, type SteerInbox, type TheoremConversationStore } from '@theoremjs/react/server';
|
|
6
|
+
import type { StructuredRegistration, ToolRegistration } from './registrations.ts';
|
|
7
|
+
import type { StudioRunPayload } from './run-payload.ts';
|
|
8
|
+
import { type StudioDependency, type StudioRuntime } from './runtime-scope.ts';
|
|
9
|
+
import { type StudioTraceLine } from './traces.ts';
|
|
10
|
+
import type { StudioSteerLine } from './transport.ts';
|
|
11
|
+
export declare const studioTraces: import("./traces.ts").StudioTraceRouter;
|
|
12
|
+
/** A compiled draft as a run takes it. */
|
|
13
|
+
export type StudioDraftRun = {
|
|
14
|
+
profile: ProfileDefinition;
|
|
15
|
+
customTools: ToolRegistration[];
|
|
16
|
+
structured?: StructuredRegistration;
|
|
17
|
+
runtime: StudioRuntime;
|
|
18
|
+
/** The agents this one names, registered before it. */
|
|
19
|
+
dependencies?: StudioDependency[];
|
|
20
|
+
};
|
|
21
|
+
export { newConversationKey } from './conversation-key.ts';
|
|
22
|
+
/** Where a chat's conversation is kept: the store, and the session its refs open in. */
|
|
23
|
+
export type StudioConversations = {
|
|
24
|
+
sessionId: string;
|
|
25
|
+
store: TheoremConversationStore;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* One message, run against the conversation the host keeps: the paused calls it
|
|
29
|
+
* walks away from settle first, then the reply runs.
|
|
30
|
+
*/
|
|
31
|
+
export declare function streamStudioTurn(args: StudioDraftRun & {
|
|
32
|
+
request: TheoremTurnRequest;
|
|
33
|
+
conversations: StudioConversations;
|
|
34
|
+
signal: AbortSignal;
|
|
35
|
+
/** Where the turn's mid-turn steers queue. */
|
|
36
|
+
steer: SteerInbox;
|
|
37
|
+
}): AsyncGenerator<ReplyLine | StudioTraceLine | StudioSteerLine>;
|
|
38
|
+
/**
|
|
39
|
+
* The user's answer to a paused call. In a kept conversation the reply goes on
|
|
40
|
+
* in the same stream once no call waits; otherwise the stream is the call's.
|
|
41
|
+
*/
|
|
42
|
+
export declare function streamStudioInvoke(args: StudioDraftRun & {
|
|
43
|
+
answer: TheoremInvokeRequest;
|
|
44
|
+
conversations: StudioConversations;
|
|
45
|
+
signal: AbortSignal;
|
|
46
|
+
}): AsyncGenerator<ReplyLine | StudioTraceLine>;
|
|
47
|
+
/** A conversation that opens on blocks the page wrote, read first by the draft's guardrails: its ref and view. */
|
|
48
|
+
export declare function startStudioConversation(draft: StudioDraftRun, conversations: StudioConversations, blocks: readonly TranscriptBlock[]): Promise<{
|
|
49
|
+
conversation: string;
|
|
50
|
+
view: ConversationView;
|
|
51
|
+
}>;
|
|
52
|
+
/** The conversation under a ref, as the page draws it. */
|
|
53
|
+
export declare function studioConversation(draft: StudioDraftRun, conversations: StudioConversations, request: TheoremConversationRequest): Promise<ConversationView>;
|
|
54
|
+
/** The conversation cut after one block; a reply that waits on gates is walked away from first. */
|
|
55
|
+
export declare function rewindStudio(draft: StudioDraftRun, conversations: StudioConversations, request: TheoremRewindRequest, signal: AbortSignal): Promise<TheoremRewound>;
|
|
56
|
+
/** The user's answer to a host draft's paused call: the studio keeps no session, so the browser replays it. */
|
|
57
|
+
export declare function streamStudioHostInvoke(args: StudioDraftRun & {
|
|
58
|
+
answer: TheoremInvokeRequest;
|
|
59
|
+
signal: AbortSignal;
|
|
60
|
+
}): AsyncGenerator<TurnEvent | StudioTraceLine>;
|
|
61
|
+
/** One call of a host draft's tool, streamed. */
|
|
62
|
+
export declare function streamStudioCall(args: {
|
|
63
|
+
profile: ProfileDefinition;
|
|
64
|
+
customTools: ToolRegistration[];
|
|
65
|
+
call: TheoremHostCallRequest;
|
|
66
|
+
/** Tools the user allowed for the page; the studio keeps no session. */
|
|
67
|
+
sessionPermissions?: string[];
|
|
68
|
+
signal?: AbortSignal;
|
|
69
|
+
runtime: StudioRuntime;
|
|
70
|
+
dependencies?: StudioDependency[];
|
|
71
|
+
}): AsyncGenerator<TurnEvent | StudioTraceLine>;
|
|
72
|
+
export { type StudioDependency, type StudioRuntime, studioScope } from './runtime-scope.ts';
|
|
73
|
+
/** Both hosts run decisions through the kernel; the browser supplies its provider vault. */
|
|
74
|
+
export declare function runStudioDecision(payload: StudioRunPayload, state: Parameters<DecisionTransport['decide']>[0], options: RunDecisionOptions, signal?: AbortSignal, assets?: Record<string, DecisionAsset>): Promise<{
|
|
75
|
+
result: import("@theoremjs/agents").DecisionResult;
|
|
76
|
+
traces: TraceRecord[];
|
|
77
|
+
}>;
|
|
78
|
+
/** Runs one embedding preview and returns its normalized result with the records it wrote. */
|
|
79
|
+
export declare function runStudioEmbedding(payload: StudioRunPayload, request: Omit<EmbeddingRequest, 'profile'>, runtime: StudioRuntime): Promise<{
|
|
80
|
+
result: EmbeddingResult;
|
|
81
|
+
traces: TraceRecord[];
|
|
82
|
+
}>;
|
|
83
|
+
export { failedDecisionTraces, withFailedTraces } from '@theoremjs/react/client';
|
|
84
|
+
export { studioKeySlots } from './browser-connection.ts';
|