@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/save.d.ts
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the builder changed in the studio, as Save needs it: each profile and
|
|
3
|
+
* tool as it compiled when the project opened and as it compiles now. Both
|
|
4
|
+
* sides go through the studio's own compiler, so a default the project never
|
|
5
|
+
* wrote is the same on both and is not a change. A provider is not compiled:
|
|
6
|
+
* it is what it opened as and what it holds now.
|
|
7
|
+
*
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
import type { StudioProvider } from '../providers.ts';
|
|
11
|
+
import type { StudioWorkspace } from '../workspace.ts';
|
|
12
|
+
import type { NewSubjects } from './save-new.ts';
|
|
13
|
+
import type { SaveSubject } from './save-plan.ts';
|
|
14
|
+
import type { Removed } from './save-remove.ts';
|
|
15
|
+
import type { SaveChange } from './save-wire.ts';
|
|
16
|
+
/** What the project registers: the ids of its profiles and providers, and the names of its tools. */
|
|
17
|
+
export interface ProjectNames {
|
|
18
|
+
profiles: readonly string[];
|
|
19
|
+
tools: readonly string[];
|
|
20
|
+
providers: readonly string[];
|
|
21
|
+
}
|
|
22
|
+
export type SaveSubjects = {
|
|
23
|
+
ok: true;
|
|
24
|
+
subjects: SaveSubject[];
|
|
25
|
+
added: NewSubjects;
|
|
26
|
+
removed: Removed;
|
|
27
|
+
changes: SaveChange[];
|
|
28
|
+
} | {
|
|
29
|
+
ok: false;
|
|
30
|
+
issues: string[];
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* What Save writes of a provider: its definition, what it connects with, and its key slots, as the
|
|
34
|
+
* fields its definition holds them in. Its id is what code and models name it by, so it stays.
|
|
35
|
+
* Every definition holds a connection, so one the page leaves out is written as an empty one.
|
|
36
|
+
*/
|
|
37
|
+
export declare function providerSettings(provider: StudioProvider): Omit<StudioProvider, 'id'>;
|
|
38
|
+
/** The names of the project's profiles and tools, from the workspace it opened as. */
|
|
39
|
+
export declare function projectNames(opened: StudioWorkspace): ProjectNames;
|
|
40
|
+
/**
|
|
41
|
+
* The profiles, tools, and providers that changed, each before and after, the ones the studio added,
|
|
42
|
+
* and the ones it removed. `changes` holds what Save cannot write at all: a tool the studio added that no
|
|
43
|
+
* agent allows, and an edit to a tool no agent allows.
|
|
44
|
+
*/
|
|
45
|
+
export declare function saveSubjects(workspace: StudioWorkspace, names: ProjectNames): SaveSubjects;
|
|
46
|
+
/** A load of the project as the studio shows it once these are removed: what is left of it. */
|
|
47
|
+
export declare function withoutRemoved(loaded: StudioWorkspace, removed: Removed): StudioWorkspace;
|
|
48
|
+
/**
|
|
49
|
+
* What differs between the project as it loads now and the workspace the builder tested: the ids
|
|
50
|
+
* and names that are not the same on both sides. Empty when the file holds what was tested.
|
|
51
|
+
*/
|
|
52
|
+
export declare function projectDiffers(loaded: StudioWorkspace, tested: StudioWorkspace): string[];
|
package/server/save.js
ADDED
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the builder changed in the studio, as Save needs it: each profile and
|
|
3
|
+
* tool as it compiled when the project opened and as it compiles now. Both
|
|
4
|
+
* sides go through the studio's own compiler, so a default the project never
|
|
5
|
+
* wrote is the same on both and is not a change. A provider is not compiled:
|
|
6
|
+
* it is what it opened as and what it holds now.
|
|
7
|
+
*
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
import { jsonSchemaFromZod } from '@theoremjs/agents/kernel';
|
|
11
|
+
import { z } from 'zod';
|
|
12
|
+
import { canonical } from "../canonical.js";
|
|
13
|
+
import { compileWorkspace } from "../compile-workspace.js";
|
|
14
|
+
import { unheldConnection, unheldProblem } from "../held-credentials.js";
|
|
15
|
+
import { ON_OWN_KEYS } from "../lent-keys.js";
|
|
16
|
+
import { withoutStudioFills } from "../policy.js";
|
|
17
|
+
/**
|
|
18
|
+
* What Save writes of a provider: its definition, what it connects with, and its key slots, as the
|
|
19
|
+
* fields its definition holds them in. Its id is what code and models name it by, so it stays.
|
|
20
|
+
* Every definition holds a connection, so one the page leaves out is written as an empty one.
|
|
21
|
+
*/
|
|
22
|
+
export function providerSettings(provider) {
|
|
23
|
+
const { id: _id, connection = {}, ...settings } = provider;
|
|
24
|
+
return { ...settings, connection };
|
|
25
|
+
}
|
|
26
|
+
function compiled(workspace) {
|
|
27
|
+
// As the project's own: which models the studio's keys may call is a rule for a run, not for a file.
|
|
28
|
+
const result = compileWorkspace(workspace, ON_OWN_KEYS);
|
|
29
|
+
if (!result.ok)
|
|
30
|
+
return result.issues.map((issue) => issue.message);
|
|
31
|
+
const tools = new Map();
|
|
32
|
+
for (const agent of result.agents)
|
|
33
|
+
for (const tool of agent.customTools)
|
|
34
|
+
tools.set(tool.name, tool);
|
|
35
|
+
// A file holds the profile without the studio's own fill-ins, so Save never writes them.
|
|
36
|
+
const profiles = new Map(result.agents.map((agent) => [agent.agentId, withoutStudioFills(agent.profile)]));
|
|
37
|
+
const asked = new Map(result.agents.map((agent) => [agent.agentId, agent.questions]));
|
|
38
|
+
const pictured = new Map(result.agents.map((agent) => [agent.agentId, agent.images]));
|
|
39
|
+
const providers = new Map(workspace.providers.map((provider) => [provider.id, providerSettings(provider)]));
|
|
40
|
+
return { agents: result.agents, profiles, asked, pictured, tools, providers };
|
|
41
|
+
}
|
|
42
|
+
/** The names of the project's profiles and tools, from the workspace it opened as. */
|
|
43
|
+
export function projectNames(opened) {
|
|
44
|
+
return {
|
|
45
|
+
profiles: opened.agents.map((agent) => agent.identity.agentId),
|
|
46
|
+
tools: opened.toolSpecs.map((tool) => tool.toolName),
|
|
47
|
+
providers: opened.providers.map((provider) => provider.id),
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
/** The workspace as the project opened it: each agent, tool, and provider the project has, at its start. */
|
|
51
|
+
function atStart(workspace, names) {
|
|
52
|
+
const { starts } = workspace;
|
|
53
|
+
const agents = Object.values(starts.agents).filter((agent) => names.profiles.includes(agent.identity.agentId));
|
|
54
|
+
const toolSpecs = Object.values(starts.tools).filter((tool) => names.tools.includes(tool.toolName));
|
|
55
|
+
const providers = Object.values(starts.providers).filter((provider) => names.providers.includes(provider.id));
|
|
56
|
+
return { ...workspace, agents, toolSpecs, providers };
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The profiles, tools, and providers that changed, each before and after, the ones the studio added,
|
|
60
|
+
* and the ones it removed. `changes` holds what Save cannot write at all: a tool the studio added that no
|
|
61
|
+
* agent allows, and an edit to a tool no agent allows.
|
|
62
|
+
*/
|
|
63
|
+
export function saveSubjects(workspace, names) {
|
|
64
|
+
const before = compiled(atStart(workspace, names));
|
|
65
|
+
if (Array.isArray(before)) {
|
|
66
|
+
return { ok: false, issues: ['The studio cannot read the project as it opened.', ...before] };
|
|
67
|
+
}
|
|
68
|
+
const after = compiled(workspace);
|
|
69
|
+
if (Array.isArray(after))
|
|
70
|
+
return { ok: false, issues: after };
|
|
71
|
+
const subjects = [];
|
|
72
|
+
const changes = [];
|
|
73
|
+
const added = {
|
|
74
|
+
profiles: [],
|
|
75
|
+
tools: [],
|
|
76
|
+
providers: [],
|
|
77
|
+
};
|
|
78
|
+
const seen = { profile: new Set(), tool: new Set() };
|
|
79
|
+
const add = (kind, started, now, known, edited) => {
|
|
80
|
+
if (started === undefined || !known.includes(started)) {
|
|
81
|
+
const tool = kind === 'tool' ? after.tools.get(now) : undefined;
|
|
82
|
+
if (kind === 'profile')
|
|
83
|
+
added.profiles.push(now);
|
|
84
|
+
else if (tool)
|
|
85
|
+
added.tools.push(tool);
|
|
86
|
+
// A tool no agent allows is not compiled, so no run tested it and there is nothing to write.
|
|
87
|
+
else
|
|
88
|
+
changes.push({ kind, of: now, setting: '', status: 'unused' });
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
seen[kind].add(started);
|
|
92
|
+
const [was, is] = kind === 'profile'
|
|
93
|
+
? [before.profiles.get(started), after.profiles.get(now)]
|
|
94
|
+
: [before.tools.get(started), after.tools.get(now)];
|
|
95
|
+
// A tool no profile allows on one side is not compiled there, so an edit to it has nothing to compare.
|
|
96
|
+
if (was === undefined || is === undefined) {
|
|
97
|
+
if (edited)
|
|
98
|
+
changes.push({ kind, of: started, setting: '', status: 'unfound' });
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
subjects.push({ kind, of: started, before: was, after: is });
|
|
102
|
+
};
|
|
103
|
+
for (const agent of workspace.agents) {
|
|
104
|
+
const start = workspace.starts.agents[agent.key];
|
|
105
|
+
add('profile', start?.identity.agentId, agent.identity.agentId.trim(), names.profiles, true);
|
|
106
|
+
}
|
|
107
|
+
for (const tool of workspace.toolSpecs) {
|
|
108
|
+
const start = workspace.starts.tools[tool.key];
|
|
109
|
+
add('tool', start?.toolName, tool.toolName, names.tools, canonical(start) !== canonical(tool));
|
|
110
|
+
}
|
|
111
|
+
for (const provider of workspace.providers) {
|
|
112
|
+
// One the project does not have was added here: Save writes its definition.
|
|
113
|
+
if (!names.providers.includes(provider.id)) {
|
|
114
|
+
added.providers.push(provider);
|
|
115
|
+
continue;
|
|
116
|
+
}
|
|
117
|
+
const start = before.providers.get(provider.id);
|
|
118
|
+
if (!start) {
|
|
119
|
+
changes.push({ kind: 'provider', of: provider.id, setting: '', status: 'unfound' });
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
const after = providerSettings(provider);
|
|
123
|
+
if (canonical(start) === canonical(after))
|
|
124
|
+
continue;
|
|
125
|
+
subjects.push({ kind: 'provider', of: provider.id, before: start, after });
|
|
126
|
+
}
|
|
127
|
+
// A mask the page sends that it was not given has no value to run or to save with.
|
|
128
|
+
const unheld = [
|
|
129
|
+
...workspace.providers.map((provider) => unheldConnection(provider.id, provider.connection)),
|
|
130
|
+
...subjects
|
|
131
|
+
.filter((subject) => subject.kind === 'tool')
|
|
132
|
+
.map((subject) => unheldProblem(subject.of, subject.after, subject.before)),
|
|
133
|
+
...added.tools.map((tool) => unheldProblem(tool.name, tool)),
|
|
134
|
+
].filter((problem) => problem !== undefined);
|
|
135
|
+
if (unheld.length)
|
|
136
|
+
return { ok: false, issues: unheld };
|
|
137
|
+
const removed = {
|
|
138
|
+
profiles: names.profiles.filter((id) => !seen.profile.has(id)),
|
|
139
|
+
tools: names.tools.filter((name) => !seen.tool.has(name)),
|
|
140
|
+
providers: names.providers.filter((id) => !workspace.providers.some((provider) => provider.id === id)),
|
|
141
|
+
};
|
|
142
|
+
return { ok: true, subjects, added: { agents: after.agents, ...added }, removed, changes };
|
|
143
|
+
}
|
|
144
|
+
/** A tool with its schemas as the kernel reads them from the file Save writes: zod's reading of the same JSON. */
|
|
145
|
+
function asKernelReads(tool) {
|
|
146
|
+
if (tool.type === 'agent')
|
|
147
|
+
return tool;
|
|
148
|
+
try {
|
|
149
|
+
return {
|
|
150
|
+
...tool,
|
|
151
|
+
inputSchema: jsonSchemaFromZod(z.fromJSONSchema(tool.inputSchema), 'input'),
|
|
152
|
+
outputSchema: jsonSchemaFromZod(z.fromJSONSchema(tool.outputSchema), 'output'),
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
catch {
|
|
156
|
+
// A schema zod cannot read does not load either: the tool is left to differ.
|
|
157
|
+
return tool;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
/** A load of the project as the studio shows it once these are removed: what is left of it. */
|
|
161
|
+
export function withoutRemoved(loaded, removed) {
|
|
162
|
+
return {
|
|
163
|
+
...loaded,
|
|
164
|
+
agents: loaded.agents.filter((agent) => !removed.profiles.includes(agent.identity.agentId)),
|
|
165
|
+
toolSpecs: loaded.toolSpecs.filter((tool) => !removed.tools.includes(tool.toolName)),
|
|
166
|
+
providers: loaded.providers.filter((provider) => !removed.providers.includes(provider.id)),
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* What differs between the project as it loads now and the workspace the builder tested: the ids
|
|
171
|
+
* and names that are not the same on both sides. Empty when the file holds what was tested.
|
|
172
|
+
*/
|
|
173
|
+
export function projectDiffers(loaded, tested) {
|
|
174
|
+
const now = compiled(loaded);
|
|
175
|
+
const wanted = compiled(tested);
|
|
176
|
+
if (Array.isArray(now))
|
|
177
|
+
return now;
|
|
178
|
+
if (Array.isArray(wanted))
|
|
179
|
+
return wanted;
|
|
180
|
+
const differs = [];
|
|
181
|
+
const same = (a, b) => canonical(a) === canonical(b);
|
|
182
|
+
for (const id of new Set([...now.profiles.keys(), ...wanted.profiles.keys()])) {
|
|
183
|
+
// A decision is its profile, what it is asked, and the pictures it sends: the files must hold all three as tested.
|
|
184
|
+
const held = same(now.profiles.get(id), wanted.profiles.get(id)) &&
|
|
185
|
+
same(now.asked.get(id), wanted.asked.get(id)) &&
|
|
186
|
+
same(now.pictured.get(id), wanted.pictured.get(id));
|
|
187
|
+
if (!held)
|
|
188
|
+
differs.push(id);
|
|
189
|
+
}
|
|
190
|
+
// A file holds a tool's schema as the page does, or as the kernel reads the page's: a tool the
|
|
191
|
+
// studio wrote loads as zod's reading of the JSON the builder tested. A schema Save changed in
|
|
192
|
+
// its Zod holds both, part by part, so the two are the same once zod has read each.
|
|
193
|
+
for (const name of new Set([...now.tools.keys(), ...wanted.tools.keys()])) {
|
|
194
|
+
const [loads, tool] = [now.tools.get(name), wanted.tools.get(name)];
|
|
195
|
+
if (same(loads, tool) || !tool || !loads) {
|
|
196
|
+
if (!same(loads, tool))
|
|
197
|
+
differs.push(name);
|
|
198
|
+
continue;
|
|
199
|
+
}
|
|
200
|
+
const read = asKernelReads(tool);
|
|
201
|
+
if (!same(loads, read) && !same(asKernelReads(loads), read))
|
|
202
|
+
differs.push(name);
|
|
203
|
+
}
|
|
204
|
+
for (const id of new Set([...now.providers.keys(), ...wanted.providers.keys()])) {
|
|
205
|
+
if (!same(now.providers.get(id), wanted.providers.get(id)))
|
|
206
|
+
differs.push(id);
|
|
207
|
+
}
|
|
208
|
+
return differs;
|
|
209
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
export {};
|