@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/server/serve.js
ADDED
|
@@ -0,0 +1,413 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Starts the studio's local server for one project.
|
|
3
|
+
*
|
|
4
|
+
* deno run -A studio/server/serve.ts <setup-module> [--port 4983] [--page http://localhost:5174]
|
|
5
|
+
* [--deno-config <deno.json>] [--editor <command>]
|
|
6
|
+
*
|
|
7
|
+
* The setup module is the project's: its default export registers the project's
|
|
8
|
+
* tools, profiles, and providers; an optional `host` export gives tool handlers
|
|
9
|
+
* their application context (the test user), and an optional `provider` export
|
|
10
|
+
* says where the providers find their keys. Only this machine can reach the server.
|
|
11
|
+
*
|
|
12
|
+
* The project loads in a process of its own (`project.ts`), and this passes the
|
|
13
|
+
* page's requests on to it, and starts it again when the page asks for a project
|
|
14
|
+
* whose files the builder's editor changed. Save is here: it writes the builder's
|
|
15
|
+
* edits into the project's files, checks them, and starts the project again from
|
|
16
|
+
* disk. It writes only files the project's setup imports, inside the folder the
|
|
17
|
+
* command ran in, and it never runs git. Open starts the builder's editor on a line of one of
|
|
18
|
+
* those files: the editor `--editor` names, else `$VISUAL` or `$EDITOR` when it
|
|
19
|
+
* opens in a window, else VS Code.
|
|
20
|
+
*
|
|
21
|
+
* @module
|
|
22
|
+
*/
|
|
23
|
+
import { dirname, relative, resolve } from 'node:path';
|
|
24
|
+
import { stripVTControlCharacters } from 'node:util';
|
|
25
|
+
import { newConversationKey } from "../conversation-key.js";
|
|
26
|
+
import { RUNNING_PATH } from '../ports.mjs';
|
|
27
|
+
import { READ_STEPS } from "../read-steps.js";
|
|
28
|
+
import { createEditedSession } from "./edited-session.js";
|
|
29
|
+
import { corsHeaders, isForeign, json, STUDIO_BASE } from "./handler.js";
|
|
30
|
+
import { answerOpen, chosenEditor, defaultEditor } from "./open-editor.js";
|
|
31
|
+
import { PROJECT_READY } from "./project.js";
|
|
32
|
+
import { isInside } from "./project-source.js";
|
|
33
|
+
import { answerSave, createSaveSession, isSaveRequest } from "./save-session.js";
|
|
34
|
+
import { createWatchFeed, watchFiles } from "./watch.js";
|
|
35
|
+
function flag(name, fallback) {
|
|
36
|
+
const at = Deno.args.indexOf(`--${name}`);
|
|
37
|
+
return at >= 0 ? (Deno.args[at + 1] ?? fallback) : fallback;
|
|
38
|
+
}
|
|
39
|
+
const setupPath = Deno.args.find((arg, i) => !arg.startsWith('--') && !Deno.args[i - 1]?.startsWith('--'));
|
|
40
|
+
if (!setupPath) {
|
|
41
|
+
console.error('usage: studio/server/serve.ts <setup-module> [--port 4983] [--page http://localhost:5174] [--deno-config deno.json] [--editor code] [--no-watch]');
|
|
42
|
+
Deno.exit(2);
|
|
43
|
+
}
|
|
44
|
+
const port = Number(flag('port', '4983'));
|
|
45
|
+
/** The site's dev server, under either name a browser gives this machine. */
|
|
46
|
+
const pageOrigins = flag('page', 'http://localhost:5174,http://127.0.0.1:5174').split(',');
|
|
47
|
+
const gate = { listenHost: `127.0.0.1:${port}`, pageOrigins };
|
|
48
|
+
/** The folder Save may write in: where the command ran. */
|
|
49
|
+
const root = Deno.realPathSync(Deno.cwd());
|
|
50
|
+
const setupFile = Deno.realPathSync(resolve(setupPath));
|
|
51
|
+
/** The project's Deno config, when the command names one: the project loads and type-checks under it. */
|
|
52
|
+
const denoConfig = flag('deno-config', '');
|
|
53
|
+
const configArgs = denoConfig ? ['--config', denoConfig] : [];
|
|
54
|
+
/** A port nothing listens on. */
|
|
55
|
+
function freePort() {
|
|
56
|
+
const listener = Deno.listen({ hostname: '127.0.0.1', port: 0 });
|
|
57
|
+
const { port: free } = listener.addr;
|
|
58
|
+
listener.close();
|
|
59
|
+
return free;
|
|
60
|
+
}
|
|
61
|
+
/** Reads a stream to its end, a decoded chunk at a time. */
|
|
62
|
+
async function drain(stream, each) {
|
|
63
|
+
const decoder = new TextDecoder();
|
|
64
|
+
for await (const chunk of stream)
|
|
65
|
+
each(decoder.decode(chunk, { stream: true }));
|
|
66
|
+
}
|
|
67
|
+
/** Seals this run's chats. Every load gets it, so a chat outlives a Save; quitting ends it. */
|
|
68
|
+
const conversationKey = newConversationKey();
|
|
69
|
+
/**
|
|
70
|
+
* Loads the project from disk in a new process, with the builder's unsaved `edits` laid over it
|
|
71
|
+
* when there are some. Throws what it printed when it does not start.
|
|
72
|
+
*/
|
|
73
|
+
async function loadProject(edits) {
|
|
74
|
+
const childPort = freePort();
|
|
75
|
+
const process = new Deno.Command(Deno.execPath(), {
|
|
76
|
+
args: [
|
|
77
|
+
'run',
|
|
78
|
+
...configArgs,
|
|
79
|
+
'-A',
|
|
80
|
+
// why: The installed package runs this file built to JavaScript, beside a built `project.js`.
|
|
81
|
+
import.meta.resolve(import.meta.url.endsWith('.js') ? './project.js' : './project.ts'),
|
|
82
|
+
setupFile,
|
|
83
|
+
'--port',
|
|
84
|
+
String(childPort),
|
|
85
|
+
'--page',
|
|
86
|
+
pageOrigins.join(','),
|
|
87
|
+
],
|
|
88
|
+
cwd: root,
|
|
89
|
+
stdin: 'piped',
|
|
90
|
+
stdout: 'piped',
|
|
91
|
+
stderr: 'piped',
|
|
92
|
+
}).spawn();
|
|
93
|
+
const load = { conversationKey, ...(edits ? { edits } : {}) };
|
|
94
|
+
const input = process.stdin.getWriter();
|
|
95
|
+
await input.write(new TextEncoder().encode(JSON.stringify(load)));
|
|
96
|
+
await input.close();
|
|
97
|
+
let printed = '';
|
|
98
|
+
const errors = drain(process.stderr, (text) => {
|
|
99
|
+
printed = (printed + text).slice(-4000);
|
|
100
|
+
Deno.stderr.writeSync(new TextEncoder().encode(text));
|
|
101
|
+
});
|
|
102
|
+
let ready = () => { };
|
|
103
|
+
const listening = new Promise((settle) => {
|
|
104
|
+
let out = '';
|
|
105
|
+
ready = () => settle(true);
|
|
106
|
+
drain(process.stdout, (text) => {
|
|
107
|
+
out = (out + text).slice(-200);
|
|
108
|
+
if (out.includes(PROJECT_READY))
|
|
109
|
+
ready();
|
|
110
|
+
}).then(() => settle(false));
|
|
111
|
+
});
|
|
112
|
+
if (!(await listening)) {
|
|
113
|
+
await Promise.all([process.status, errors]);
|
|
114
|
+
// The page shows this, so the terminal's colours come out.
|
|
115
|
+
throw new Error(stripVTControlCharacters(printed).trim() || 'The project did not start.');
|
|
116
|
+
}
|
|
117
|
+
const origin = `http://127.0.0.1:${childPort}`;
|
|
118
|
+
const description = await (await fetch(origin + STUDIO_BASE)).json();
|
|
119
|
+
return { process, origin, description };
|
|
120
|
+
}
|
|
121
|
+
async function stop(loaded) {
|
|
122
|
+
try {
|
|
123
|
+
loaded.process.kill();
|
|
124
|
+
}
|
|
125
|
+
catch {
|
|
126
|
+
// It had already ended.
|
|
127
|
+
}
|
|
128
|
+
await loaded.process.status;
|
|
129
|
+
}
|
|
130
|
+
/** Whether the project type-checks as it is on disk, and what the checker printed. */
|
|
131
|
+
async function typeChecks() {
|
|
132
|
+
const { success, stderr, stdout } = await new Deno.Command(Deno.execPath(), {
|
|
133
|
+
args: ['check', ...configArgs, setupFile],
|
|
134
|
+
cwd: root,
|
|
135
|
+
env: { NO_COLOR: '1' },
|
|
136
|
+
stdin: 'null',
|
|
137
|
+
}).output();
|
|
138
|
+
const decoder = new TextDecoder();
|
|
139
|
+
return {
|
|
140
|
+
ok: success,
|
|
141
|
+
output: (decoder.decode(stderr) + decoder.decode(stdout)).trim().slice(-4000),
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
/** A project file's text, or undefined when it is missing or leads outside the project. */
|
|
145
|
+
function readInside(path) {
|
|
146
|
+
try {
|
|
147
|
+
return isInside(root, Deno.realPathSync(path)) ? Deno.readTextFileSync(path) : undefined;
|
|
148
|
+
}
|
|
149
|
+
catch {
|
|
150
|
+
return undefined;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Whether a write to a path lands inside the project. A link where the file would go, or in a
|
|
155
|
+
* folder on the way to it, can lead anywhere on the machine; a project from someone else can hold one.
|
|
156
|
+
*/
|
|
157
|
+
function landsInside(path) {
|
|
158
|
+
try {
|
|
159
|
+
if (Deno.lstatSync(path).isSymlink)
|
|
160
|
+
return false;
|
|
161
|
+
}
|
|
162
|
+
catch {
|
|
163
|
+
// No file there yet.
|
|
164
|
+
}
|
|
165
|
+
for (let folder = dirname(path);; folder = dirname(folder)) {
|
|
166
|
+
try {
|
|
167
|
+
return isInside(root, Deno.realPathSync(folder));
|
|
168
|
+
}
|
|
169
|
+
catch {
|
|
170
|
+
// That folder is not made yet: the one above it decides.
|
|
171
|
+
if (folder === dirname(folder))
|
|
172
|
+
return false;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
let first;
|
|
177
|
+
try {
|
|
178
|
+
first = await loadProject();
|
|
179
|
+
}
|
|
180
|
+
catch (error) {
|
|
181
|
+
console.error(error instanceof Error ? error.message : error);
|
|
182
|
+
Deno.exit(1);
|
|
183
|
+
}
|
|
184
|
+
/** The load that runs the builder's unsaved edits, while the page compares it with the files. */
|
|
185
|
+
const edited = createEditedSession({
|
|
186
|
+
load: loadProject,
|
|
187
|
+
stop,
|
|
188
|
+
opened: (loaded) => loaded.description.workspace,
|
|
189
|
+
});
|
|
190
|
+
const session = createSaveSession({
|
|
191
|
+
root,
|
|
192
|
+
setupFile,
|
|
193
|
+
read: readInside,
|
|
194
|
+
landsInside,
|
|
195
|
+
write: (path, text) => {
|
|
196
|
+
Deno.mkdirSync(dirname(path), { recursive: true });
|
|
197
|
+
Deno.writeTextFileSync(path, text);
|
|
198
|
+
},
|
|
199
|
+
remove: (path) => Deno.removeSync(path),
|
|
200
|
+
typeChecks,
|
|
201
|
+
// The files changed: the edited load lies over files that are gone.
|
|
202
|
+
load: async () => {
|
|
203
|
+
await edited.close();
|
|
204
|
+
return loadProject();
|
|
205
|
+
},
|
|
206
|
+
stop,
|
|
207
|
+
opened: (loaded) => loaded.description.workspace,
|
|
208
|
+
}, first);
|
|
209
|
+
/** Passes a request on to a load of the project, and its answer back as it streams. */
|
|
210
|
+
async function forward(request, loaded = session.project(), path) {
|
|
211
|
+
const url = new URL(request.url);
|
|
212
|
+
if (request.headers.get('upgrade')?.toLowerCase() === 'websocket') {
|
|
213
|
+
return forwardSocket(request, `${loaded.origin}${path ?? url.pathname}${url.search}`);
|
|
214
|
+
}
|
|
215
|
+
const headers = new Headers(request.headers);
|
|
216
|
+
headers.delete('host');
|
|
217
|
+
const body = request.method === 'GET' || request.method === 'HEAD' ? undefined : await request.arrayBuffer();
|
|
218
|
+
try {
|
|
219
|
+
return await fetch(`${loaded.origin}${path ?? url.pathname}${url.search}`, {
|
|
220
|
+
method: request.method,
|
|
221
|
+
headers,
|
|
222
|
+
body,
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
catch {
|
|
226
|
+
return json(502, {}, corsHeaders(request, pageOrigins));
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Joins the page's socket to the same path of the project: a voice call. What the page sends
|
|
231
|
+
* before the project's side opens is held, because a call opens with the page's first message.
|
|
232
|
+
*/
|
|
233
|
+
function forwardSocket(request, to) {
|
|
234
|
+
const { socket: page, response } = Deno.upgradeWebSocket(request);
|
|
235
|
+
const project = new WebSocket(to.replace(/^http/, 'ws'));
|
|
236
|
+
page.binaryType = 'arraybuffer';
|
|
237
|
+
project.binaryType = 'arraybuffer';
|
|
238
|
+
const held = [];
|
|
239
|
+
const shut = (other) => () => {
|
|
240
|
+
if (other.readyState === WebSocket.OPEN || other.readyState === WebSocket.CONNECTING)
|
|
241
|
+
other.close();
|
|
242
|
+
};
|
|
243
|
+
page.addEventListener('message', (event) => {
|
|
244
|
+
if (project.readyState === WebSocket.OPEN)
|
|
245
|
+
project.send(event.data);
|
|
246
|
+
else
|
|
247
|
+
held.push(event.data);
|
|
248
|
+
});
|
|
249
|
+
project.addEventListener('open', () => {
|
|
250
|
+
for (const data of held.splice(0))
|
|
251
|
+
project.send(data);
|
|
252
|
+
});
|
|
253
|
+
project.addEventListener('message', (event) => {
|
|
254
|
+
if (page.readyState === WebSocket.OPEN)
|
|
255
|
+
page.send(event.data);
|
|
256
|
+
});
|
|
257
|
+
page.addEventListener('close', shut(project));
|
|
258
|
+
project.addEventListener('close', shut(page));
|
|
259
|
+
project.addEventListener('error', shut(page));
|
|
260
|
+
return response;
|
|
261
|
+
}
|
|
262
|
+
const SAVE = `${STUDIO_BASE}/save`;
|
|
263
|
+
const WATCH = `${STUDIO_BASE}/watch`;
|
|
264
|
+
const OPEN = `${STUDIO_BASE}/open`;
|
|
265
|
+
const EDITED = `${STUDIO_BASE}/edited`;
|
|
266
|
+
/**
|
|
267
|
+
* The edited load: a POST of the workspace at `EDITED` starts it, and every path under it is the
|
|
268
|
+
* same path of the project, answered by that load. Undefined when the request is not for it.
|
|
269
|
+
*/
|
|
270
|
+
async function answerEdited(request) {
|
|
271
|
+
const { pathname } = new URL(request.url);
|
|
272
|
+
const cors = corsHeaders(request, pageOrigins);
|
|
273
|
+
if (pathname === EDITED && request.method === 'POST') {
|
|
274
|
+
const body = await request.json().catch(() => null);
|
|
275
|
+
if (!isSaveRequest(body))
|
|
276
|
+
return json(400, {}, cors);
|
|
277
|
+
return json(200, await edited.open(body.workspace, session.project()), cors);
|
|
278
|
+
}
|
|
279
|
+
if (!pathname.startsWith(`${EDITED}/`))
|
|
280
|
+
return undefined;
|
|
281
|
+
const loaded = edited.running();
|
|
282
|
+
// No load holds the edits: the page asks for one again. A preflight is still answered, so the
|
|
283
|
+
// page reads that and not a blocked request.
|
|
284
|
+
if (!loaded)
|
|
285
|
+
return request.method === 'OPTIONS'
|
|
286
|
+
? new Response(null, { status: 204, headers: cors })
|
|
287
|
+
: json(409, {}, cors);
|
|
288
|
+
return forward(request, loaded, STUDIO_BASE + pathname.slice(EDITED.length));
|
|
289
|
+
}
|
|
290
|
+
/** Starts a command on its own, without a shell. False when the machine has no such command. */
|
|
291
|
+
function start(command, args) {
|
|
292
|
+
try {
|
|
293
|
+
new Deno.Command(command, { args, cwd: root, stdin: 'null', stdout: 'null', stderr: 'null' })
|
|
294
|
+
.spawn()
|
|
295
|
+
.unref();
|
|
296
|
+
return true;
|
|
297
|
+
}
|
|
298
|
+
catch {
|
|
299
|
+
return false;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
const editor = {
|
|
303
|
+
editor: chosenEditor(flag('editor', ''), [Deno.env.get('VISUAL'), Deno.env.get('EDITOR')]),
|
|
304
|
+
place: (file) => session.place(file),
|
|
305
|
+
start,
|
|
306
|
+
os: Deno.build.os,
|
|
307
|
+
home: Deno.env.get('HOME'),
|
|
308
|
+
};
|
|
309
|
+
/**
|
|
310
|
+
* The project as the page opens it: what it registered, the settings its files say its profiles
|
|
311
|
+
* share, and the ones they set in code. Files the builder's editor changed are loaded first.
|
|
312
|
+
*/
|
|
313
|
+
async function described(said) {
|
|
314
|
+
const files = await session.read(said);
|
|
315
|
+
return {
|
|
316
|
+
...session.project().description,
|
|
317
|
+
...files,
|
|
318
|
+
editor: defaultEditor(editor),
|
|
319
|
+
setup: relative(root, setupFile),
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
/** Whether the request asks for the project as the page opens it, and whether for the steps of reading it first. */
|
|
323
|
+
function opens(request) {
|
|
324
|
+
const url = new URL(request.url);
|
|
325
|
+
if (request.method !== 'GET' || url.pathname !== STUDIO_BASE)
|
|
326
|
+
return undefined;
|
|
327
|
+
return { steps: url.searchParams.has(READ_STEPS) };
|
|
328
|
+
}
|
|
329
|
+
async function opened(request) {
|
|
330
|
+
return opens(request)?.steps === false ? await described() : undefined;
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* The project as the page opens it, after each step of reading it: a line of JSON for each
|
|
334
|
+
* step as it happens, then one holding the project.
|
|
335
|
+
*/
|
|
336
|
+
function openedSaying(request) {
|
|
337
|
+
if (!opens(request)?.steps)
|
|
338
|
+
return undefined;
|
|
339
|
+
const encoder = new TextEncoder();
|
|
340
|
+
const body = new ReadableStream({
|
|
341
|
+
start(controller) {
|
|
342
|
+
const line = (said) => controller.enqueue(encoder.encode(`${JSON.stringify(said)}\n`));
|
|
343
|
+
described(line).then((project) => {
|
|
344
|
+
line({ opened: project });
|
|
345
|
+
controller.close();
|
|
346
|
+
}, (error) => controller.error(error));
|
|
347
|
+
},
|
|
348
|
+
});
|
|
349
|
+
return new Response(body, {
|
|
350
|
+
headers: {
|
|
351
|
+
'content-type': 'application/x-ndjson',
|
|
352
|
+
'cache-control': 'no-store',
|
|
353
|
+
...corsHeaders(request, pageOrigins),
|
|
354
|
+
},
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
/** Tells the page when the builder's editor writes a file the setup reads, unless `--no-watch` says not to. */
|
|
358
|
+
const feed = Deno.args.includes('--no-watch') ? undefined : createWatchFeed();
|
|
359
|
+
if (feed) {
|
|
360
|
+
watchFiles({
|
|
361
|
+
files: () => session.watched(),
|
|
362
|
+
changed: () => session.changed(),
|
|
363
|
+
tell: feed.tell,
|
|
364
|
+
watch: (folders) => Deno.watchFs(folders, { recursive: false }),
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
/** The page's subscription to file changes. No content when the studio was started without watching. */
|
|
368
|
+
function watching(request) {
|
|
369
|
+
if (request.method !== 'GET' || new URL(request.url).pathname !== WATCH)
|
|
370
|
+
return undefined;
|
|
371
|
+
const cors = corsHeaders(request, pageOrigins);
|
|
372
|
+
return feed ? feed.subscribe(cors) : new Response(null, { status: 204, headers: cors });
|
|
373
|
+
}
|
|
374
|
+
/** The setup this studio is open on, for a second studio command to find it already running. */
|
|
375
|
+
function running(request) {
|
|
376
|
+
if (request.method !== 'GET' || new URL(request.url).pathname !== RUNNING_PATH)
|
|
377
|
+
return undefined;
|
|
378
|
+
return json(200, { setup: setupFile }, corsHeaders(request, pageOrigins));
|
|
379
|
+
}
|
|
380
|
+
/** What the studio answers itself: the project as it opens, a save, or the builder's editor on a line. */
|
|
381
|
+
async function answered(request) {
|
|
382
|
+
const answer = (await opened(request)) ??
|
|
383
|
+
(await answerSave(session, SAVE, request)) ??
|
|
384
|
+
(await answerOpen(editor, OPEN, request));
|
|
385
|
+
if (!answer)
|
|
386
|
+
return undefined;
|
|
387
|
+
const cors = corsHeaders(request, pageOrigins);
|
|
388
|
+
return 'workspace' in answer ? json(200, answer, cors) : json(answer.status, answer.body, cors);
|
|
389
|
+
}
|
|
390
|
+
Deno.serve({ hostname: '127.0.0.1', port }, async (request) => {
|
|
391
|
+
if (isForeign(request, gate))
|
|
392
|
+
return json(403, {}, {});
|
|
393
|
+
return (running(request) ??
|
|
394
|
+
watching(request) ??
|
|
395
|
+
openedSaying(request) ??
|
|
396
|
+
(await answered(request)) ??
|
|
397
|
+
(await answerEdited(request)) ??
|
|
398
|
+
forward(request));
|
|
399
|
+
});
|
|
400
|
+
for (const signal of ['SIGINT', 'SIGTERM']) {
|
|
401
|
+
Deno.addSignalListener(signal, () => {
|
|
402
|
+
for (const loaded of [session.project(), edited.running()]) {
|
|
403
|
+
try {
|
|
404
|
+
loaded?.process.kill();
|
|
405
|
+
}
|
|
406
|
+
catch {
|
|
407
|
+
// It had already ended.
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
Deno.exit(0);
|
|
411
|
+
});
|
|
412
|
+
}
|
|
413
|
+
console.log(`Theorem Studio: open ${pageOrigins[0]}/studio (server on http://127.0.0.1:${port})`);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Asks a draft HTTP or MCP tool's endpoint one request, through the kernel's network guard, so the
|
|
3
|
+
* builder sees whether it answers before a model calls it.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
import { type ResolveHost } from '@theoremjs/agents';
|
|
8
|
+
/**
|
|
9
|
+
* `POST <base>/test-connection`: one request to a draft HTTP or MCP tool's endpoint. It reaches
|
|
10
|
+
* public hosts only, unless `draftNetwork` is set: then it keeps to the network guardrail the
|
|
11
|
+
* draft sends (`network`), as the draft's runs do. A name is checked against private addresses
|
|
12
|
+
* only through `resolveHost`; without it, only the address as written is.
|
|
13
|
+
*/
|
|
14
|
+
export declare function testConnection(request: Request, options?: {
|
|
15
|
+
resolveHost?: ResolveHost;
|
|
16
|
+
draftNetwork?: boolean;
|
|
17
|
+
}): Promise<Response>;
|