@dxos/plugin-script 0.8.4-main.72ec0f3 → 0.8.4-main.7996785055
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -13
- package/dist/lib/browser/DeploymentDialog-LGEGIX64.mjs +124 -0
- package/dist/lib/browser/DeploymentDialog-LGEGIX64.mjs.map +7 -0
- package/dist/lib/browser/{NotebookContainer-RTESC4OV.mjs → NotebookContainer-CC3G32Q5.mjs} +281 -248
- package/dist/lib/browser/NotebookContainer-CC3G32Q5.mjs.map +7 -0
- package/dist/lib/browser/ScriptContainer-Z3MCPN2D.mjs +95 -0
- package/dist/lib/browser/ScriptContainer-Z3MCPN2D.mjs.map +7 -0
- package/dist/lib/browser/ScriptObjectSettings-LST7DUAN.mjs +297 -0
- package/dist/lib/browser/ScriptObjectSettings-LST7DUAN.mjs.map +7 -0
- package/dist/lib/browser/ScriptPluginSettings-IKWRISC3.mjs +55 -0
- package/dist/lib/browser/ScriptPluginSettings-IKWRISC3.mjs.map +7 -0
- package/dist/lib/browser/ScriptProperties-ZCRTZTAK.mjs +28 -0
- package/dist/lib/browser/ScriptProperties-ZCRTZTAK.mjs.map +7 -0
- package/dist/lib/browser/TestContainer-ACNQMKVU.mjs +61 -0
- package/dist/lib/browser/TestContainer-ACNQMKVU.mjs.map +7 -0
- package/dist/lib/browser/access-token-created-ZHVVOEL7.mjs +36 -0
- package/dist/lib/browser/access-token-created-ZHVVOEL7.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-QPXX4YK5.mjs +63 -0
- package/dist/lib/browser/app-graph-builder-QPXX4YK5.mjs.map +7 -0
- package/dist/lib/browser/blueprint-definition-MC264VR5.mjs +17 -0
- package/dist/lib/browser/blueprint-definition-MC264VR5.mjs.map +7 -0
- package/dist/lib/browser/blueprints/index.mjs +8 -0
- package/dist/lib/browser/{chunk-EB6AXFXO.mjs → chunk-37XPSUAH.mjs} +3 -3
- package/dist/lib/browser/chunk-37XPSUAH.mjs.map +7 -0
- package/dist/lib/browser/chunk-4XJSGCAS.mjs +742 -0
- package/dist/lib/browser/chunk-4XJSGCAS.mjs.map +7 -0
- package/dist/lib/browser/chunk-7JI376EM.mjs +20 -0
- package/dist/lib/browser/chunk-7JI376EM.mjs.map +7 -0
- package/dist/lib/browser/{compiler-4KHRSX7J.mjs → chunk-ATTZUDT7.mjs} +14 -33
- package/dist/lib/browser/chunk-ATTZUDT7.mjs.map +7 -0
- package/dist/lib/browser/chunk-BHRCZLLU.mjs +105 -0
- package/dist/lib/browser/chunk-BHRCZLLU.mjs.map +7 -0
- package/dist/lib/browser/chunk-CMHREENI.mjs +8 -0
- package/dist/lib/browser/chunk-CMHREENI.mjs.map +7 -0
- package/dist/lib/browser/chunk-DBEYGFVF.mjs +400 -0
- package/dist/lib/browser/chunk-DBEYGFVF.mjs.map +7 -0
- package/dist/lib/browser/chunk-E6BQ4P6L.mjs +179 -0
- package/dist/lib/browser/chunk-E6BQ4P6L.mjs.map +7 -0
- package/dist/lib/browser/chunk-GB2HL4ZE.mjs +26 -0
- package/dist/lib/browser/chunk-GB2HL4ZE.mjs.map +7 -0
- package/dist/lib/browser/chunk-NQJRENSK.mjs +75 -0
- package/dist/lib/browser/chunk-NQJRENSK.mjs.map +7 -0
- package/dist/lib/browser/chunk-QLFFA4Y4.mjs +52 -0
- package/dist/lib/browser/chunk-QLFFA4Y4.mjs.map +7 -0
- package/dist/lib/browser/chunk-X44CJ7F5.mjs +11 -0
- package/dist/lib/browser/chunk-X44CJ7F5.mjs.map +7 -0
- package/dist/lib/browser/compiler-MZKFKYCG.mjs +98 -0
- package/dist/lib/browser/compiler-MZKFKYCG.mjs.map +7 -0
- package/dist/lib/browser/create-script-Z7J4HDV2.mjs +47 -0
- package/dist/lib/browser/create-script-Z7J4HDV2.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +124 -129
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-handler-76AHUB5G.mjs +18 -0
- package/dist/lib/browser/operation-handler-76AHUB5G.mjs.map +7 -0
- package/dist/lib/browser/operations/index.mjs +14 -0
- package/dist/lib/browser/react-surface-2VVUIV66.mjs +145 -0
- package/dist/lib/browser/react-surface-2VVUIV66.mjs.map +7 -0
- package/dist/lib/browser/settings-BV3KXROF.mjs +35 -0
- package/dist/lib/browser/settings-BV3KXROF.mjs.map +7 -0
- package/dist/lib/browser/templates/index.mjs +1 -1
- package/dist/lib/browser/types/index.mjs +6 -5
- package/dist/lib/node-esm/DeploymentDialog-XSP2EDU2.mjs +125 -0
- package/dist/lib/node-esm/DeploymentDialog-XSP2EDU2.mjs.map +7 -0
- package/dist/lib/node-esm/{NotebookContainer-SVD3A3D6.mjs → NotebookContainer-LNWMJD2D.mjs} +281 -248
- package/dist/lib/node-esm/NotebookContainer-LNWMJD2D.mjs.map +7 -0
- package/dist/lib/node-esm/ScriptContainer-TSU4DBGA.mjs +96 -0
- package/dist/lib/node-esm/ScriptContainer-TSU4DBGA.mjs.map +7 -0
- package/dist/lib/node-esm/ScriptObjectSettings-OGY7X3UE.mjs +298 -0
- package/dist/lib/node-esm/ScriptObjectSettings-OGY7X3UE.mjs.map +7 -0
- package/dist/lib/node-esm/ScriptPluginSettings-HIUSAHCP.mjs +56 -0
- package/dist/lib/node-esm/ScriptPluginSettings-HIUSAHCP.mjs.map +7 -0
- package/dist/lib/node-esm/ScriptProperties-I6SC4P3R.mjs +29 -0
- package/dist/lib/node-esm/ScriptProperties-I6SC4P3R.mjs.map +7 -0
- package/dist/lib/node-esm/TestContainer-WKISNRNU.mjs +62 -0
- package/dist/lib/node-esm/TestContainer-WKISNRNU.mjs.map +7 -0
- package/dist/lib/node-esm/access-token-created-7CGU7FXD.mjs +37 -0
- package/dist/lib/node-esm/access-token-created-7CGU7FXD.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-GNGOYXIU.mjs +64 -0
- package/dist/lib/node-esm/app-graph-builder-GNGOYXIU.mjs.map +7 -0
- package/dist/lib/node-esm/blueprint-definition-DTRGTRZA.mjs +18 -0
- package/dist/lib/node-esm/blueprint-definition-DTRGTRZA.mjs.map +7 -0
- package/dist/lib/node-esm/blueprints/index.mjs +9 -0
- package/dist/lib/node-esm/blueprints/index.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-2NGQCFVE.mjs +28 -0
- package/dist/lib/node-esm/chunk-2NGQCFVE.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-4YAEFFW2.mjs +12 -0
- package/dist/lib/node-esm/chunk-4YAEFFW2.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-C3GH2SDF.mjs +76 -0
- package/dist/lib/node-esm/chunk-C3GH2SDF.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-CKYUNEE5.mjs +10 -0
- package/dist/lib/node-esm/chunk-CKYUNEE5.mjs.map +7 -0
- package/dist/lib/node-esm/{compiler-DU5NQISX.mjs → chunk-JGN7TDJH.mjs} +14 -32
- package/dist/lib/node-esm/chunk-JGN7TDJH.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-IBV2DR36.mjs → chunk-L3JLWXB5.mjs} +3 -3
- package/dist/lib/node-esm/chunk-L3JLWXB5.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-L55OBVT5.mjs +53 -0
- package/dist/lib/node-esm/chunk-L55OBVT5.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-P4Q2BPBB.mjs +22 -0
- package/dist/lib/node-esm/chunk-P4Q2BPBB.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-RN2SMYCL.mjs +401 -0
- package/dist/lib/node-esm/chunk-RN2SMYCL.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-RTM3D4T5.mjs +181 -0
- package/dist/lib/node-esm/chunk-RTM3D4T5.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-SV742UH7.mjs +743 -0
- package/dist/lib/node-esm/chunk-SV742UH7.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-Y5VWHRVU.mjs +107 -0
- package/dist/lib/node-esm/chunk-Y5VWHRVU.mjs.map +7 -0
- package/dist/lib/node-esm/compiler-QBWP7ERK.mjs +99 -0
- package/dist/lib/node-esm/compiler-QBWP7ERK.mjs.map +7 -0
- package/dist/lib/node-esm/create-script-TAJHVROB.mjs +48 -0
- package/dist/lib/node-esm/create-script-TAJHVROB.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +124 -129
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/operation-handler-OUROH3T7.mjs +19 -0
- package/dist/lib/node-esm/operation-handler-OUROH3T7.mjs.map +7 -0
- package/dist/lib/node-esm/operations/index.mjs +15 -0
- package/dist/lib/node-esm/operations/index.mjs.map +7 -0
- package/dist/lib/node-esm/react-surface-OJ55GFCP.mjs +146 -0
- package/dist/lib/node-esm/react-surface-OJ55GFCP.mjs.map +7 -0
- package/dist/lib/node-esm/settings-2TK3XPLD.mjs +36 -0
- package/dist/lib/node-esm/settings-2TK3XPLD.mjs.map +7 -0
- package/dist/lib/node-esm/templates/index.mjs +1 -1
- package/dist/lib/node-esm/types/index.mjs +6 -5
- package/dist/types/src/ScriptPlugin.d.ts +2 -1
- package/dist/types/src/ScriptPlugin.d.ts.map +1 -1
- package/dist/types/src/blueprints/index.d.ts +2 -0
- package/dist/types/src/blueprints/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/script-blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/script-blueprint.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/artifact-definition/artifact-definition.d.ts +12 -0
- package/dist/types/src/capabilities/artifact-definition/artifact-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/artifact-definition/index.d.ts +3 -0
- package/dist/types/src/capabilities/artifact-definition/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +6 -0
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts +3 -0
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/compiler/compiler.d.ts +6 -0
- package/dist/types/src/capabilities/compiler/compiler.d.ts.map +1 -0
- package/dist/types/src/capabilities/compiler/index.d.ts +3 -0
- package/dist/types/src/capabilities/compiler/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +6 -7
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler/index.d.ts +4 -0
- package/dist/types/src/capabilities/operation-handler/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/index.d.ts +7 -0
- package/dist/types/src/capabilities/settings/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/settings.d.ts +10 -0
- package/dist/types/src/capabilities/settings/settings.d.ts.map +1 -0
- package/dist/types/src/compiler/compiler.d.ts +1 -1
- package/dist/types/src/compiler/compiler.d.ts.map +1 -1
- package/dist/types/src/components/{FrameContainer/FrameContainer.d.ts → FramePanel/FramePanel.d.ts} +3 -3
- package/dist/types/src/components/FramePanel/FramePanel.d.ts.map +1 -0
- package/dist/types/src/components/FramePanel/index.d.ts +2 -0
- package/dist/types/src/components/FramePanel/index.d.ts.map +1 -0
- package/dist/types/src/components/NotebookStack/NotebookCell.d.ts +3 -3
- package/dist/types/src/components/NotebookStack/NotebookCell.d.ts.map +1 -1
- package/dist/types/src/components/NotebookStack/NotebookStack.d.ts +8 -2
- package/dist/types/src/components/NotebookStack/NotebookStack.d.ts.map +1 -1
- package/dist/types/src/components/NotebookStack/NotebookStack.stories.d.ts +8 -1
- package/dist/types/src/components/NotebookStack/NotebookStack.stories.d.ts.map +1 -1
- package/dist/types/src/components/QueryEditor/QueryEditor.d.ts +5 -0
- package/dist/types/src/components/QueryEditor/QueryEditor.d.ts.map +1 -0
- package/dist/types/src/components/QueryEditor/QueryEditor.stories.d.ts +13 -0
- package/dist/types/src/components/QueryEditor/QueryEditor.stories.d.ts.map +1 -0
- package/dist/types/src/components/QueryEditor/index.d.ts +2 -0
- package/dist/types/src/components/QueryEditor/index.d.ts.map +1 -0
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.d.ts +11 -5
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.d.ts.map +1 -1
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.stories.d.ts +8 -1
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.stories.d.ts.map +1 -1
- package/dist/types/src/components/TestPanel/TestPanel.d.ts +8 -2
- package/dist/types/src/components/TestPanel/TestPanel.d.ts.map +1 -1
- package/dist/types/src/components/TestPanel/index.d.ts +0 -1
- package/dist/types/src/components/TestPanel/index.d.ts.map +1 -1
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.d.ts +9 -2
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.d.ts.map +1 -1
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.stories.d.ts +7 -1
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +4 -5
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/constants.d.ts +2 -0
- package/dist/types/src/constants.d.ts.map +1 -0
- package/dist/types/src/{components → containers}/DeploymentDialog/DeploymentDialog.d.ts +0 -2
- package/dist/types/src/containers/DeploymentDialog/DeploymentDialog.d.ts.map +1 -0
- package/dist/types/src/{components → containers}/DeploymentDialog/DeploymentDialog.stories.d.ts +7 -3
- package/dist/types/src/containers/DeploymentDialog/DeploymentDialog.stories.d.ts.map +1 -0
- package/dist/types/src/containers/DeploymentDialog/index.d.ts +3 -0
- package/dist/types/src/containers/DeploymentDialog/index.d.ts.map +1 -0
- package/dist/types/src/containers/NotebookContainer/NotebookContainer.d.ts +7 -0
- package/dist/types/src/containers/NotebookContainer/NotebookContainer.d.ts.map +1 -0
- package/dist/types/src/containers/NotebookContainer/NotebookContainer.stories.d.ts +7 -0
- package/dist/types/src/containers/NotebookContainer/NotebookContainer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/NotebookContainer/index.d.ts +3 -0
- package/dist/types/src/containers/NotebookContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/ScriptContainer/ScriptContainer.d.ts +10 -0
- package/dist/types/src/containers/ScriptContainer/ScriptContainer.d.ts.map +1 -0
- package/dist/types/src/containers/ScriptContainer/index.d.ts +3 -0
- package/dist/types/src/containers/ScriptContainer/index.d.ts.map +1 -0
- package/dist/types/src/{components/Settings → containers/ScriptObjectSettings}/ScriptObjectSettings.d.ts +0 -1
- package/dist/types/src/containers/ScriptObjectSettings/ScriptObjectSettings.d.ts.map +1 -0
- package/dist/types/src/containers/ScriptObjectSettings/index.d.ts +3 -0
- package/dist/types/src/containers/ScriptObjectSettings/index.d.ts.map +1 -0
- package/dist/types/src/containers/ScriptPluginSettings/ScriptPluginSettings.d.ts +8 -0
- package/dist/types/src/containers/ScriptPluginSettings/ScriptPluginSettings.d.ts.map +1 -0
- package/dist/types/src/containers/ScriptPluginSettings/index.d.ts +3 -0
- package/dist/types/src/containers/ScriptPluginSettings/index.d.ts.map +1 -0
- package/dist/types/src/containers/ScriptProperties/ScriptProperties.d.ts +7 -0
- package/dist/types/src/containers/ScriptProperties/ScriptProperties.d.ts.map +1 -0
- package/dist/types/src/containers/ScriptProperties/index.d.ts +3 -0
- package/dist/types/src/containers/ScriptProperties/index.d.ts.map +1 -0
- package/dist/types/src/{components/TestPanel → containers/TestContainer}/TestContainer.d.ts +1 -1
- package/dist/types/src/containers/TestContainer/TestContainer.d.ts.map +1 -0
- package/dist/types/src/containers/TestContainer/index.d.ts +3 -0
- package/dist/types/src/containers/TestContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +9 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/e2e/ai.test.d.ts +2 -0
- package/dist/types/src/e2e/ai.test.d.ts.map +1 -0
- package/dist/types/src/e2e/deploy.test.d.ts +2 -0
- package/dist/types/src/e2e/deploy.test.d.ts.map +1 -0
- package/dist/types/src/hooks/deploy.d.ts +15 -30
- package/dist/types/src/hooks/deploy.d.ts.map +1 -1
- package/dist/types/src/hooks/format.d.ts +3 -2
- package/dist/types/src/hooks/format.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +1 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/template.d.ts +3 -2
- package/dist/types/src/hooks/template.d.ts.map +1 -1
- package/dist/types/src/hooks/useCompiler.d.ts +7 -0
- package/dist/types/src/hooks/useCompiler.d.ts.map +1 -0
- package/dist/types/src/hooks/useCreateAndDeployScriptTemplates.d.ts.map +1 -1
- package/dist/types/src/hooks/useToolbarState.d.ts +8 -1
- package/dist/types/src/hooks/useToolbarState.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/notebook/compute-graph.d.ts +24 -11
- package/dist/types/src/notebook/compute-graph.d.ts.map +1 -1
- package/dist/types/src/operations/access-token-created.d.ts +5 -0
- package/dist/types/src/operations/access-token-created.d.ts.map +1 -0
- package/dist/types/src/operations/create-script.d.ts +5 -0
- package/dist/types/src/operations/create-script.d.ts.map +1 -0
- package/dist/types/src/operations/definitions.d.ts +28 -0
- package/dist/types/src/operations/definitions.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +4 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/templates/anthropic.d.ts +7 -0
- package/dist/types/src/templates/anthropic.d.ts.map +1 -0
- package/dist/types/src/templates/chess-bot.d.ts +18 -0
- package/dist/types/src/templates/chess-bot.d.ts.map +1 -0
- package/dist/types/src/templates/commentary.d.ts +19 -0
- package/dist/types/src/templates/commentary.d.ts.map +1 -0
- package/dist/types/src/templates/forex-effect.d.ts +5 -1
- package/dist/types/src/templates/forex-effect.d.ts.map +1 -1
- package/dist/types/src/templates/forex.d.ts +5 -1
- package/dist/types/src/templates/forex.d.ts.map +1 -1
- package/dist/types/src/templates/index.d.ts +25 -16
- package/dist/types/src/templates/index.d.ts.map +1 -1
- package/dist/types/src/templates/ping.d.ts +2 -4
- package/dist/types/src/templates/ping.d.ts.map +1 -1
- package/dist/types/src/testing/simulator.test.d.ts +2 -0
- package/dist/types/src/testing/simulator.test.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +4 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Notebook.d.ts +102 -23
- package/dist/types/src/types/Notebook.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +12 -0
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/events.d.ts +5 -0
- package/dist/types/src/types/events.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +2 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/util/deploy.d.ts +3 -2
- package/dist/types/src/util/deploy.d.ts.map +1 -1
- package/dist/types/src/util/functions.d.ts +3 -2
- package/dist/types/src/util/functions.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +125 -87
- package/src/ScriptPlugin.tsx +60 -83
- package/src/blueprints/index.ts +5 -0
- package/src/blueprints/script-blueprint.ts +28 -0
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +56 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/{artifact-definition.ts → artifact-definition/artifact-definition.ts} +97 -94
- package/src/capabilities/artifact-definition/index.ts +7 -0
- package/src/capabilities/blueprint-definition/blueprint-definition.ts +17 -0
- package/src/capabilities/blueprint-definition/index.ts +7 -0
- package/src/capabilities/compiler/compiler.ts +103 -0
- package/src/capabilities/compiler/index.ts +7 -0
- package/src/capabilities/index.ts +6 -10
- package/src/capabilities/operation-handler/index.ts +11 -0
- package/src/capabilities/operation-handler/operation-handler.ts +16 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +138 -0
- package/src/capabilities/settings/index.ts +7 -0
- package/src/capabilities/settings/settings.ts +33 -0
- package/src/compiler/compiler.ts +10 -3
- package/src/components/{FrameContainer/FrameContainer.tsx → FramePanel/FramePanel.tsx} +7 -6
- package/src/components/{FrameContainer → FramePanel}/index.ts +1 -1
- package/src/components/NotebookStack/NotebookCell.tsx +25 -24
- package/src/components/NotebookStack/NotebookStack.stories.tsx +20 -21
- package/src/components/NotebookStack/NotebookStack.tsx +27 -16
- package/src/components/QueryEditor/QueryEditor.stories.tsx +96 -0
- package/src/components/QueryEditor/QueryEditor.tsx +47 -0
- package/src/components/QueryEditor/index.ts +5 -0
- package/src/components/ScriptToolbar/ScriptToolbar.stories.tsx +39 -17
- package/src/components/ScriptToolbar/ScriptToolbar.tsx +35 -40
- package/src/components/TestPanel/TestPanel.tsx +106 -186
- package/src/components/TestPanel/index.ts +0 -1
- package/src/components/TypescriptEditor/TypescriptEditor.stories.tsx +24 -17
- package/src/components/TypescriptEditor/TypescriptEditor.tsx +73 -65
- package/src/components/index.ts +4 -9
- package/src/constants.ts +7 -0
- package/src/{components → containers}/DeploymentDialog/DeploymentDialog.stories.tsx +29 -24
- package/src/containers/DeploymentDialog/DeploymentDialog.tsx +98 -0
- package/src/containers/DeploymentDialog/index.ts +7 -0
- package/src/{components → containers/NotebookContainer}/NotebookContainer.stories.tsx +30 -29
- package/src/{components → containers/NotebookContainer}/NotebookContainer.tsx +88 -83
- package/src/containers/NotebookContainer/index.ts +7 -0
- package/src/containers/ScriptContainer/ScriptContainer.tsx +85 -0
- package/src/containers/ScriptContainer/index.ts +7 -0
- package/src/{components/Settings → containers/ScriptObjectSettings}/ScriptObjectSettings.tsx +65 -67
- package/src/containers/ScriptObjectSettings/index.ts +7 -0
- package/src/{components/Settings → containers/ScriptPluginSettings}/ScriptPluginSettings.tsx +19 -14
- package/src/containers/ScriptPluginSettings/index.ts +7 -0
- package/src/containers/ScriptProperties/ScriptProperties.tsx +33 -0
- package/src/containers/ScriptProperties/index.ts +7 -0
- package/src/containers/TestContainer/TestContainer.tsx +45 -0
- package/src/containers/TestContainer/index.ts +7 -0
- package/src/containers/index.ts +13 -0
- package/src/e2e/ai.test.ts +93 -0
- package/src/e2e/deploy.test.ts +65 -0
- package/src/hooks/deploy.ts +42 -33
- package/src/hooks/format.ts +6 -1
- package/src/hooks/index.ts +1 -0
- package/src/hooks/template.ts +17 -11
- package/src/hooks/useCompiler.ts +24 -0
- package/src/hooks/useCreateAndDeployScriptTemplates.ts +13 -19
- package/src/hooks/useToolbarState.ts +29 -4
- package/src/index.ts +2 -1
- package/src/meta.ts +4 -4
- package/src/notebook/compute-graph.test.ts +20 -8
- package/src/notebook/compute-graph.ts +45 -21
- package/src/operations/access-token-created.ts +36 -0
- package/src/operations/create-script.ts +47 -0
- package/src/operations/definitions.ts +40 -0
- package/src/operations/index.ts +12 -0
- package/src/templates/anthropic.ts +49 -0
- package/src/templates/chat.ts +1 -1
- package/src/templates/chess-bot.ts +61 -0
- package/src/templates/commentary.ts +243 -0
- package/src/templates/data-generator.ts +2 -2
- package/src/templates/discord.ts +3 -3
- package/src/templates/forex-effect.ts +35 -29
- package/src/templates/forex.ts +27 -17
- package/src/templates/gmail.ts +4 -4
- package/src/templates/index.ts +31 -18
- package/src/templates/ping.ts +22 -5
- package/src/testing/simulator.test.ts +40 -0
- package/src/translations.ts +4 -0
- package/src/types/Notebook.ts +19 -15
- package/src/types/capabilities.ts +17 -0
- package/src/types/events.ts +11 -0
- package/src/types/index.ts +2 -1
- package/src/types/types.ts +1 -1
- package/src/util/deploy.ts +28 -32
- package/src/util/functions.ts +30 -26
- package/src/vite-env.d.ts +2 -0
- package/dist/lib/browser/DeploymentDialog-MZX4T77L.mjs +0 -14
- package/dist/lib/browser/NotebookContainer-RTESC4OV.mjs.map +0 -7
- package/dist/lib/browser/ScriptContainer-T2BAZDJ4.mjs +0 -147
- package/dist/lib/browser/ScriptContainer-T2BAZDJ4.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-2WR2ATTJ.mjs +0 -66
- package/dist/lib/browser/app-graph-builder-2WR2ATTJ.mjs.map +0 -7
- package/dist/lib/browser/blueprint-definition-6PZWZM2Y.mjs +0 -30
- package/dist/lib/browser/blueprint-definition-6PZWZM2Y.mjs.map +0 -7
- package/dist/lib/browser/chunk-2G2NA6DQ.mjs +0 -88
- package/dist/lib/browser/chunk-2G2NA6DQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-3IJASGG5.mjs +0 -155
- package/dist/lib/browser/chunk-3IJASGG5.mjs.map +0 -7
- package/dist/lib/browser/chunk-4M7U2WVT.mjs +0 -304
- package/dist/lib/browser/chunk-4M7U2WVT.mjs.map +0 -7
- package/dist/lib/browser/chunk-5JSNQYZZ.mjs +0 -517
- package/dist/lib/browser/chunk-5JSNQYZZ.mjs.map +0 -7
- package/dist/lib/browser/chunk-EB6AXFXO.mjs.map +0 -7
- package/dist/lib/browser/chunk-GAFCKEII.mjs +0 -646
- package/dist/lib/browser/chunk-GAFCKEII.mjs.map +0 -7
- package/dist/lib/browser/chunk-LNNCD2H4.mjs +0 -102
- package/dist/lib/browser/chunk-LNNCD2H4.mjs.map +0 -7
- package/dist/lib/browser/chunk-M6KJPUJK.mjs +0 -111
- package/dist/lib/browser/chunk-M6KJPUJK.mjs.map +0 -7
- package/dist/lib/browser/chunk-UOQ6NCH3.mjs +0 -15
- package/dist/lib/browser/chunk-UOQ6NCH3.mjs.map +0 -7
- package/dist/lib/browser/compiler-4KHRSX7J.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-AFJ575VK.mjs +0 -104
- package/dist/lib/browser/intent-resolver-AFJ575VK.mjs.map +0 -7
- package/dist/lib/browser/react-surface-QEQ3QUQA.mjs +0 -128
- package/dist/lib/browser/react-surface-QEQ3QUQA.mjs.map +0 -7
- package/dist/lib/browser/settings-LNLSTZM4.mjs +0 -26
- package/dist/lib/browser/settings-LNLSTZM4.mjs.map +0 -7
- package/dist/lib/node-esm/DeploymentDialog-GL5AUWMR.mjs +0 -15
- package/dist/lib/node-esm/NotebookContainer-SVD3A3D6.mjs.map +0 -7
- package/dist/lib/node-esm/ScriptContainer-2CE3H3JJ.mjs +0 -148
- package/dist/lib/node-esm/ScriptContainer-2CE3H3JJ.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-NCVLUL5R.mjs +0 -67
- package/dist/lib/node-esm/app-graph-builder-NCVLUL5R.mjs.map +0 -7
- package/dist/lib/node-esm/blueprint-definition-5R6YCSZZ.mjs +0 -31
- package/dist/lib/node-esm/blueprint-definition-5R6YCSZZ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-55JZVM6K.mjs +0 -16
- package/dist/lib/node-esm/chunk-55JZVM6K.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-57JA6XL5.mjs +0 -90
- package/dist/lib/node-esm/chunk-57JA6XL5.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HDKR5WCD.mjs +0 -113
- package/dist/lib/node-esm/chunk-HDKR5WCD.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-IBV2DR36.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-IQTBVH4L.mjs +0 -518
- package/dist/lib/node-esm/chunk-IQTBVH4L.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-KJKZ4KNO.mjs +0 -647
- package/dist/lib/node-esm/chunk-KJKZ4KNO.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-NNHWLRHT.mjs +0 -103
- package/dist/lib/node-esm/chunk-NNHWLRHT.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-RIE676OW.mjs +0 -156
- package/dist/lib/node-esm/chunk-RIE676OW.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-YRTA4EHU.mjs +0 -305
- package/dist/lib/node-esm/chunk-YRTA4EHU.mjs.map +0 -7
- package/dist/lib/node-esm/compiler-DU5NQISX.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-A5VVK746.mjs +0 -105
- package/dist/lib/node-esm/intent-resolver-A5VVK746.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-U77YT7VF.mjs +0 -129
- package/dist/lib/node-esm/react-surface-U77YT7VF.mjs.map +0 -7
- package/dist/lib/node-esm/settings-IUFMOCXY.mjs +0 -27
- package/dist/lib/node-esm/settings-IUFMOCXY.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/artifact-definition.d.ts +0 -11
- package/dist/types/src/capabilities/artifact-definition.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts +0 -5
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +0 -1
- package/dist/types/src/capabilities/capabilities.d.ts +0 -5
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/compiler.d.ts +0 -4
- package/dist/types/src/capabilities/compiler.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface.d.ts +0 -4
- package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings.d.ts +0 -4
- package/dist/types/src/capabilities/settings.d.ts.map +0 -1
- package/dist/types/src/components/DeploymentDialog/DeploymentDialog.d.ts.map +0 -1
- package/dist/types/src/components/DeploymentDialog/DeploymentDialog.stories.d.ts.map +0 -1
- package/dist/types/src/components/DeploymentDialog/index.d.ts +0 -4
- package/dist/types/src/components/DeploymentDialog/index.d.ts.map +0 -1
- package/dist/types/src/components/FrameContainer/FrameContainer.d.ts.map +0 -1
- package/dist/types/src/components/FrameContainer/frame.d.ts +0 -2
- package/dist/types/src/components/FrameContainer/frame.d.ts.map +0 -1
- package/dist/types/src/components/FrameContainer/index.d.ts +0 -2
- package/dist/types/src/components/FrameContainer/index.d.ts.map +0 -1
- package/dist/types/src/components/NotebookContainer.d.ts +0 -10
- package/dist/types/src/components/NotebookContainer.d.ts.map +0 -1
- package/dist/types/src/components/NotebookContainer.stories.d.ts +0 -251
- package/dist/types/src/components/NotebookContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/ScriptContainer.d.ts +0 -12
- package/dist/types/src/components/ScriptContainer.d.ts.map +0 -1
- package/dist/types/src/components/Settings/ScriptObjectSettings.d.ts.map +0 -1
- package/dist/types/src/components/Settings/ScriptPluginSettings.d.ts +0 -6
- package/dist/types/src/components/Settings/ScriptPluginSettings.d.ts.map +0 -1
- package/dist/types/src/components/Settings/index.d.ts +0 -3
- package/dist/types/src/components/Settings/index.d.ts.map +0 -1
- package/dist/types/src/components/TestPanel/TestContainer.d.ts.map +0 -1
- package/dist/types/src/events.d.ts +0 -4
- package/dist/types/src/events.d.ts.map +0 -1
- package/dist/types/src/templates/chess.d.ts +0 -3
- package/dist/types/src/templates/chess.d.ts.map +0 -1
- package/dist/types/src/types/actions.d.ts +0 -54
- package/dist/types/src/types/actions.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder.ts +0 -65
- package/src/capabilities/blueprint-definition.ts +0 -30
- package/src/capabilities/capabilities.ts +0 -12
- package/src/capabilities/compiler.ts +0 -34
- package/src/capabilities/intent-resolver.ts +0 -86
- package/src/capabilities/react-surface.tsx +0 -103
- package/src/capabilities/settings.ts +0 -21
- package/src/components/DeploymentDialog/DeploymentDialog.tsx +0 -123
- package/src/components/DeploymentDialog/index.ts +0 -9
- package/src/components/FrameContainer/frame.html +0 -25
- package/src/components/FrameContainer/frame.tsx +0 -51
- package/src/components/ScriptContainer.tsx +0 -69
- package/src/components/Settings/index.ts +0 -6
- package/src/components/TestPanel/TestContainer.tsx +0 -27
- package/src/events.ts +0 -11
- package/src/templates/chess.ts +0 -49
- package/src/types/actions.ts +0 -53
- /package/dist/lib/browser/{DeploymentDialog-MZX4T77L.mjs.map → blueprints/index.mjs.map} +0 -0
- /package/dist/lib/{node-esm/DeploymentDialog-GL5AUWMR.mjs.map → browser/operations/index.mjs.map} +0 -0
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as A from '@automerge/automerge';
|
|
6
|
+
import { Chess as ChessJS } from 'chess.js';
|
|
7
|
+
import * as Array from 'effect/Array';
|
|
8
|
+
import * as Effect from 'effect/Effect';
|
|
9
|
+
import * as Function from 'effect/Function';
|
|
10
|
+
import * as Layer from 'effect/Layer';
|
|
11
|
+
import * as Option from 'effect/Option';
|
|
12
|
+
import * as Schema from 'effect/Schema';
|
|
13
|
+
|
|
14
|
+
import { AiService, ConsolePrinter, ToolExecutionService, ToolResolverService } from '@dxos/ai';
|
|
15
|
+
import { AiSession, GenerationObserver } from '@dxos/assistant';
|
|
16
|
+
import { ArtifactId } from '@dxos/assistant';
|
|
17
|
+
import { Database, Filter, Obj, Ref, Relation } from '@dxos/echo';
|
|
18
|
+
import { Collection } from '@dxos/echo';
|
|
19
|
+
import { createDocAccessor } from '@dxos/echo-db';
|
|
20
|
+
import { FunctionInvocationService, TracingService } from '@dxos/functions';
|
|
21
|
+
import { log } from '@dxos/log';
|
|
22
|
+
import { Operation } from '@dxos/operation';
|
|
23
|
+
import { Chess } from '@dxos/plugin-chess/types';
|
|
24
|
+
import { Markdown } from '@dxos/plugin-markdown/types';
|
|
25
|
+
import { Text } from '@dxos/schema';
|
|
26
|
+
import { HasSubject } from '@dxos/types';
|
|
27
|
+
import { trim } from '@dxos/util';
|
|
28
|
+
|
|
29
|
+
const Commentary = Operation.make({
|
|
30
|
+
meta: {
|
|
31
|
+
key: 'org.dxos.function.chess.commentary',
|
|
32
|
+
name: 'Commentary',
|
|
33
|
+
description: 'Adds commentary about the most recent move to a markdown document associated with the chess game.',
|
|
34
|
+
},
|
|
35
|
+
input: Schema.Struct({
|
|
36
|
+
game: Ref.Ref(Chess.Game).annotations({
|
|
37
|
+
description: 'The chess game to comment on.',
|
|
38
|
+
}),
|
|
39
|
+
}),
|
|
40
|
+
output: Schema.Union(
|
|
41
|
+
Schema.Struct({
|
|
42
|
+
documentId: ArtifactId.annotations({
|
|
43
|
+
description: 'The ID of the markdown document that was updated or created.',
|
|
44
|
+
}),
|
|
45
|
+
commentary: Schema.String.annotations({
|
|
46
|
+
description: 'The commentary that was added.',
|
|
47
|
+
}),
|
|
48
|
+
}),
|
|
49
|
+
Schema.Void.annotations({
|
|
50
|
+
description: 'Function did not find anything to comment on.',
|
|
51
|
+
}),
|
|
52
|
+
),
|
|
53
|
+
types: [Chess.Game, Markdown.Document, Text.Text, HasSubject.HasSubject, Collection.Collection],
|
|
54
|
+
services: [AiService.AiService, Database.Service],
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
export default Commentary.pipe(
|
|
58
|
+
Operation.withHandler(
|
|
59
|
+
Effect.fnUntraced(
|
|
60
|
+
function* ({ game: gameRef }) {
|
|
61
|
+
// Load the chess game
|
|
62
|
+
log.info('load game', { gameRef });
|
|
63
|
+
const chessGame = yield* Database.load(gameRef);
|
|
64
|
+
|
|
65
|
+
// Load the chess position from PGN or FEN
|
|
66
|
+
const chess = new ChessJS();
|
|
67
|
+
if (chessGame.pgn) {
|
|
68
|
+
chess.loadPgn(chessGame.pgn);
|
|
69
|
+
} else if (chessGame.fen) {
|
|
70
|
+
chess.load(chessGame.fen);
|
|
71
|
+
} else {
|
|
72
|
+
log.info('Early return: no pgn or fen');
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Get the most recent move
|
|
77
|
+
const history = chess.history({ verbose: true });
|
|
78
|
+
if (history.length === 0) {
|
|
79
|
+
throw new Error('No moves have been played yet');
|
|
80
|
+
}
|
|
81
|
+
const lastMove = history[history.length - 1];
|
|
82
|
+
const moveNumber = Math.ceil(history.length / 2);
|
|
83
|
+
const isWhiteMove = history.length % 2 === 1;
|
|
84
|
+
const player = isWhiteMove ? 'White' : 'Black';
|
|
85
|
+
const moveNotation = lastMove.san;
|
|
86
|
+
|
|
87
|
+
// Generate AI commentary about the move
|
|
88
|
+
const result = yield* new AiSession({
|
|
89
|
+
observer: GenerationObserver.fromPrinter(new ConsolePrinter({ tag: 'chess-commentary' })),
|
|
90
|
+
}).run({
|
|
91
|
+
prompt:
|
|
92
|
+
`Comment on this chess move as if you're commentating a live match for an audience:\n\n` +
|
|
93
|
+
`Move ${moveNumber}: ${player} plays ${moveNotation} (${lastMove.from} to ${lastMove.to})${lastMove.captured ? `, capturing ${lastMove.captured}` : ''}\n` +
|
|
94
|
+
`Current position: ${chess.fen()}\n` +
|
|
95
|
+
`${chess.isCheck() ? 'The king is in check! ' : ''}` +
|
|
96
|
+
`${chess.isCheckmate() ? 'CHECKMATE! ' : ''}` +
|
|
97
|
+
`${chess.isStalemate() ? 'STALEMATE! ' : ''}` +
|
|
98
|
+
`\nGame so far:\n${chess.pgn()}`,
|
|
99
|
+
system: COMMENTARY_SYSTEM_PROMPT,
|
|
100
|
+
history: [],
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
const commentaryText = Function.pipe(
|
|
104
|
+
result,
|
|
105
|
+
Array.findLast((msg) => msg.sender.role === 'assistant' && msg.blocks.some((block) => block._tag === 'text')),
|
|
106
|
+
Option.flatMap((msg) =>
|
|
107
|
+
Function.pipe(
|
|
108
|
+
msg.blocks,
|
|
109
|
+
Array.findLast((block) => block._tag === 'text'),
|
|
110
|
+
Option.map((block) => block.text),
|
|
111
|
+
),
|
|
112
|
+
),
|
|
113
|
+
Option.getOrThrowWith(() => new Error('No commentary generated')),
|
|
114
|
+
);
|
|
115
|
+
|
|
116
|
+
const commentary = `## Move ${moveNumber}: ${player} plays ${moveNotation}\n\n${commentaryText}\n\n`;
|
|
117
|
+
log.info('commentary', { commentary });
|
|
118
|
+
|
|
119
|
+
// TODO(wittjosiah): Functions currently don't support traversals.
|
|
120
|
+
// const docs = yield* Database.runQuery(
|
|
121
|
+
// Query.select(Filter.id(chessGame.id)).targetOf(HasSubject.HasSubject).source(),
|
|
122
|
+
// ).pipe(Effect.map((objects) => objects.filter((object) => Obj.instanceOf(Markdown.Document, object))));
|
|
123
|
+
const docs = yield* Database.runQuery(Filter.type(HasSubject.HasSubject)).pipe(
|
|
124
|
+
Effect.map((relations) =>
|
|
125
|
+
relations.filter((relation) => {
|
|
126
|
+
// TODO(wittjosiah): This is a workaround for getTarget not handling deleted objects.
|
|
127
|
+
try {
|
|
128
|
+
log.info('relation', {
|
|
129
|
+
source: Obj.getDXN(Relation.getTarget(relation)).toString(),
|
|
130
|
+
game: Obj.getDXN(chessGame).toString(),
|
|
131
|
+
});
|
|
132
|
+
return Obj.getDXN(Relation.getTarget(relation)).toString() === Obj.getDXN(chessGame).toString();
|
|
133
|
+
} catch {
|
|
134
|
+
return false;
|
|
135
|
+
}
|
|
136
|
+
}),
|
|
137
|
+
),
|
|
138
|
+
Effect.map((relations) =>
|
|
139
|
+
relations
|
|
140
|
+
.map((relation) => {
|
|
141
|
+
// TODO(wittjosiah): This is a workaround for getSource not handling deleted objects.
|
|
142
|
+
try {
|
|
143
|
+
return Relation.getSource(relation);
|
|
144
|
+
} catch {
|
|
145
|
+
return undefined;
|
|
146
|
+
}
|
|
147
|
+
})
|
|
148
|
+
.filter((source) => source !== undefined),
|
|
149
|
+
),
|
|
150
|
+
Effect.map((sources) => {
|
|
151
|
+
const docs = sources.filter((source) => Obj.instanceOf(Markdown.Document, source));
|
|
152
|
+
log.info('docs', { sources, docs });
|
|
153
|
+
return docs;
|
|
154
|
+
}),
|
|
155
|
+
);
|
|
156
|
+
log.info('docs', { count: docs.length });
|
|
157
|
+
|
|
158
|
+
let document: Markdown.Document;
|
|
159
|
+
if (docs.length === 0) {
|
|
160
|
+
// TODO(wittjosiah): Deploy fails if `SpaceProperties` schema is imported because its from `client-protocol`.
|
|
161
|
+
const [properties] = yield* Database.runQuery(Filter.typename('org.dxos.type.space-properties'));
|
|
162
|
+
const rootCollection = yield* Database.load<Collection.Collection>(
|
|
163
|
+
properties[Collection.Collection.typename],
|
|
164
|
+
);
|
|
165
|
+
|
|
166
|
+
log.info('rootCollection', { rootCollection });
|
|
167
|
+
|
|
168
|
+
// Create a new markdown document
|
|
169
|
+
const gameName = chessGame.name || 'Chess Game';
|
|
170
|
+
document = yield* Database.add(
|
|
171
|
+
Markdown.make({
|
|
172
|
+
name: `${gameName} Commentary`,
|
|
173
|
+
content: `# ${gameName} Commentary\n\n${commentary}`,
|
|
174
|
+
}),
|
|
175
|
+
);
|
|
176
|
+
|
|
177
|
+
const documentRef = Ref.make(document);
|
|
178
|
+
Obj.change(rootCollection, (obj) => {
|
|
179
|
+
obj.objects.push(documentRef);
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
// Create the HasSubject relation
|
|
183
|
+
yield* Database.add(
|
|
184
|
+
Relation.make(HasSubject.HasSubject, {
|
|
185
|
+
[Relation.Source]: document,
|
|
186
|
+
[Relation.Target]: chessGame,
|
|
187
|
+
completedAt: new Date().toISOString(),
|
|
188
|
+
}),
|
|
189
|
+
);
|
|
190
|
+
} else {
|
|
191
|
+
document = docs[0];
|
|
192
|
+
|
|
193
|
+
// Load the text content and append the commentary
|
|
194
|
+
const text = yield* Database.load(document.content);
|
|
195
|
+
const accessor = createDocAccessor(text, ['content']);
|
|
196
|
+
accessor.handle.change((doc: A.Doc<Text.Text>) => {
|
|
197
|
+
A.splice(doc, accessor.path.slice(), text.content.length, 0, commentary);
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
log.info('result', { documentId: Obj.getDXN(document).toString(), commentary });
|
|
202
|
+
|
|
203
|
+
yield* Database.flush();
|
|
204
|
+
|
|
205
|
+
return {
|
|
206
|
+
documentId: Obj.getDXN(document).toString(),
|
|
207
|
+
commentary,
|
|
208
|
+
};
|
|
209
|
+
},
|
|
210
|
+
Effect.provide(
|
|
211
|
+
Layer.mergeAll(
|
|
212
|
+
AiService.model('@anthropic/claude-haiku-4-5'),
|
|
213
|
+
ToolResolverService.layerEmpty,
|
|
214
|
+
ToolExecutionService.layerEmpty,
|
|
215
|
+
TracingService.layerNoop,
|
|
216
|
+
FunctionInvocationService.layerNotAvailable,
|
|
217
|
+
),
|
|
218
|
+
),
|
|
219
|
+
),
|
|
220
|
+
),
|
|
221
|
+
);
|
|
222
|
+
|
|
223
|
+
const COMMENTARY_SYSTEM_PROMPT = trim`
|
|
224
|
+
You are a professional chess commentator providing live commentary for a chess match.
|
|
225
|
+
|
|
226
|
+
# Style
|
|
227
|
+
- Write in an engaging, enthusiastic style as if commentating for a live audience
|
|
228
|
+
- Be concise but informative (2-4 sentences)
|
|
229
|
+
- Explain the strategic implications of the move
|
|
230
|
+
- Note any tactical elements (captures, threats, checks)
|
|
231
|
+
- Comment on the position and what it means for the game
|
|
232
|
+
|
|
233
|
+
# Format
|
|
234
|
+
- Write in plain text (no markdown formatting in the commentary itself)
|
|
235
|
+
- Be natural and conversational
|
|
236
|
+
- Use chess terminology appropriately but keep it accessible
|
|
237
|
+
|
|
238
|
+
# Special Situations
|
|
239
|
+
- If it's checkmate, express excitement about the conclusion
|
|
240
|
+
- If it's check, note the pressure on the king
|
|
241
|
+
- If a piece is captured, mention the material exchange
|
|
242
|
+
- Comment on the development of pieces and control of key squares when relevant
|
|
243
|
+
`;
|
|
@@ -8,7 +8,7 @@ import { Expando, S, create, defineFunction } from 'dxos:functions';
|
|
|
8
8
|
import { randText } from 'https://esm.sh/@ngneat/falso@7.1.1?bundle=false';
|
|
9
9
|
|
|
10
10
|
export default defineFunction({
|
|
11
|
-
key: 'dxos.
|
|
11
|
+
key: 'org.dxos.script.data-generator',
|
|
12
12
|
name: 'Data Generator',
|
|
13
13
|
inputSchema: S.Struct({
|
|
14
14
|
documentAmount: S.optional(S.Number),
|
|
@@ -23,7 +23,7 @@ export default defineFunction({
|
|
|
23
23
|
data: { documentAmount = 1, textSize = 10, mutationAmount = 0, waitAfterCreation = 10_000 },
|
|
24
24
|
context: { space },
|
|
25
25
|
}: any) => {
|
|
26
|
-
await space.db.graph.schemaRegistry.
|
|
26
|
+
await space.db.graph.schemaRegistry.register([Expando]);
|
|
27
27
|
const result: Record<string, any> = {};
|
|
28
28
|
const objects: Expando[] = [];
|
|
29
29
|
|
package/src/templates/discord.ts
CHANGED
|
@@ -29,7 +29,7 @@ const MessageSchema = S.Struct({
|
|
|
29
29
|
content: S.String,
|
|
30
30
|
}).pipe(
|
|
31
31
|
EchoObject({
|
|
32
|
-
typename: 'example.
|
|
32
|
+
typename: 'com.example.type.message',
|
|
33
33
|
version: '0.1.0',
|
|
34
34
|
}),
|
|
35
35
|
);
|
|
@@ -42,7 +42,7 @@ const generateSnowflake = (unixTimestamp: number): bigint => {
|
|
|
42
42
|
};
|
|
43
43
|
|
|
44
44
|
export default defineFunction({
|
|
45
|
-
key: 'dxos.
|
|
45
|
+
key: 'org.dxos.script.discord',
|
|
46
46
|
name: 'Discord',
|
|
47
47
|
inputSchema: S.Struct({
|
|
48
48
|
// TODO(wittjosiah): Remove. This is used to provide a terminal for a cron trigger.
|
|
@@ -60,7 +60,7 @@ export default defineFunction({
|
|
|
60
60
|
handler: ({ data: { channelId, queueId, after = DEFAULT_AFTER, pageSize = 5 }, context: { space } }: any) =>
|
|
61
61
|
Effect.gen(function* () {
|
|
62
62
|
const { token } = yield* Effect.tryPromise({
|
|
63
|
-
try: () => space.db.query(Filter.typename('dxos.
|
|
63
|
+
try: () => space.db.query(Filter.typename('org.dxos.type.access-token', { source: 'discord.com' })).first(),
|
|
64
64
|
catch: (e: any) => e,
|
|
65
65
|
});
|
|
66
66
|
const { objects } = yield* Effect.tryPromise({
|
|
@@ -2,41 +2,47 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
// @ts-ignore
|
|
12
|
-
} from 'https://esm.sh/@effect/platform@0.89.0?deps=effect@3.17.0&bundle=false';
|
|
13
|
-
// @ts-ignore
|
|
14
|
-
import * as Effect from 'https://esm.sh/effect@3.17.0/Effect?bundle=false';
|
|
15
|
-
// @ts-ignore
|
|
16
|
-
import * as Schedule from 'https://esm.sh/effect@3.17.0/Schedule?bundle=false';
|
|
5
|
+
import * as FetchHttpClient from '@effect/platform/FetchHttpClient';
|
|
6
|
+
import * as HttpClient from '@effect/platform/HttpClient';
|
|
7
|
+
import * as HttpClientRequest from '@effect/platform/HttpClientRequest';
|
|
8
|
+
import * as Effect from 'effect/Effect';
|
|
9
|
+
import * as Schedule from 'effect/Schedule';
|
|
10
|
+
import * as Schema from 'effect/Schema';
|
|
17
11
|
|
|
18
|
-
|
|
19
|
-
key: 'dxos.org/script/forex-effect',
|
|
20
|
-
name: 'Forex Effect',
|
|
21
|
-
description: 'Returns the exchange rate between two currencies.',
|
|
12
|
+
import { Operation } from '@dxos/operation';
|
|
22
13
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
14
|
+
const ForexEffect = Operation.make({
|
|
15
|
+
meta: {
|
|
16
|
+
key: 'org.dxos.script.forex-effect',
|
|
17
|
+
name: 'Forex Effect',
|
|
18
|
+
description: 'Returns the exchange rate between two currencies.',
|
|
19
|
+
},
|
|
20
|
+
input: Schema.Struct({
|
|
21
|
+
from: Schema.String.annotations({ description: 'The source currency' }),
|
|
22
|
+
to: Schema.String.annotations({ description: 'The target currency' }),
|
|
26
23
|
}),
|
|
24
|
+
output: Schema.Any,
|
|
25
|
+
});
|
|
27
26
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const
|
|
27
|
+
export default ForexEffect.pipe(
|
|
28
|
+
Operation.withHandler(
|
|
29
|
+
Effect.fnUntraced(function* ({ from: rawFrom, to: rawTo }) {
|
|
30
|
+
const from = rawFrom.toUpperCase();
|
|
31
|
+
const to = rawTo.toUpperCase();
|
|
32
|
+
const json: any = yield* HttpClientRequest.get(`https://free.ratesdb.com/v1/rates?from=${from}&to=${to}`).pipe(
|
|
33
33
|
HttpClient.execute,
|
|
34
|
-
Effect.flatMap((
|
|
35
|
-
Effect.timeout('
|
|
34
|
+
Effect.flatMap((response) => response.json),
|
|
35
|
+
Effect.timeout('5 seconds'),
|
|
36
36
|
Effect.retry(Schedule.exponential(1_000).pipe(Schedule.compose(Schedule.recurs(3)))),
|
|
37
37
|
Effect.scoped,
|
|
38
38
|
);
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
});
|
|
40
|
+
const rate = json?.data?.rates?.[to];
|
|
41
|
+
if (rate == null) {
|
|
42
|
+
return yield* Effect.fail(new Error(`No rate found for ${from} -> ${to}`));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return rate.toString();
|
|
46
|
+
}, Effect.provide(FetchHttpClient.layer)),
|
|
47
|
+
),
|
|
48
|
+
);
|
package/src/templates/forex.ts
CHANGED
|
@@ -2,25 +2,35 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
import
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import * as Schema from 'effect/Schema';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
key: 'dxos.org/script/forex',
|
|
10
|
-
name: 'Forex',
|
|
11
|
-
description: 'Returns the exchange rate between two currencies.',
|
|
8
|
+
import { Operation } from '@dxos/operation';
|
|
12
9
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
const Forex = Operation.make({
|
|
11
|
+
meta: {
|
|
12
|
+
key: 'org.dxos.script.forex',
|
|
13
|
+
name: 'Forex',
|
|
14
|
+
description: 'Returns the exchange rate between two currencies.',
|
|
15
|
+
},
|
|
16
|
+
input: Schema.Struct({
|
|
17
|
+
from: Schema.String.annotations({ description: 'The source currency' }),
|
|
18
|
+
to: Schema.String.annotations({ description: 'The target currency' }),
|
|
16
19
|
}),
|
|
20
|
+
output: Schema.Any,
|
|
21
|
+
});
|
|
17
22
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
export default Forex.pipe(
|
|
24
|
+
Operation.withHandler(
|
|
25
|
+
Effect.fn(function* ({ from: rawFrom, to: rawTo }) {
|
|
26
|
+
const from = rawFrom.toUpperCase();
|
|
27
|
+
const to = rawTo.toUpperCase();
|
|
28
|
+
const res = yield* Effect.promise(() => fetch(`https://free.ratesdb.com/v1/rates?from=${from}&to=${to}`));
|
|
29
|
+
const {
|
|
30
|
+
data: { rates },
|
|
31
|
+
} = yield* Effect.promise(() => res.json());
|
|
23
32
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
33
|
+
return rates[to].toString();
|
|
34
|
+
}),
|
|
35
|
+
),
|
|
36
|
+
);
|
package/src/templates/gmail.ts
CHANGED
|
@@ -27,7 +27,7 @@ import * as Schedule from 'https://esm.sh/effect@3.17.0/Schedule?bundle=false';
|
|
|
27
27
|
import * as Stream from 'https://esm.sh/effect@3.17.0/Stream?bundle=false';
|
|
28
28
|
|
|
29
29
|
export default defineFunction({
|
|
30
|
-
key: 'dxos.
|
|
30
|
+
key: 'org.dxos.script.gmail',
|
|
31
31
|
name: 'Gmail',
|
|
32
32
|
inputSchema: S.Struct({
|
|
33
33
|
mailboxId: S.String,
|
|
@@ -47,7 +47,7 @@ export default defineFunction({
|
|
|
47
47
|
handler: ({ context: { space }, data: { mailboxId, userId, after, pageSize } }: any) =>
|
|
48
48
|
Effect.gen(function* () {
|
|
49
49
|
const { token } = yield* Effect.tryPromise({
|
|
50
|
-
try: () => space.db.query(Filter.typename('dxos.
|
|
50
|
+
try: () => space.db.query(Filter.typename('org.dxos.type.access-token', { source: 'gmail.com' })).first(),
|
|
51
51
|
catch: (e: any) => e,
|
|
52
52
|
});
|
|
53
53
|
|
|
@@ -216,8 +216,8 @@ const MessageType = S.Struct({
|
|
|
216
216
|
),
|
|
217
217
|
}).pipe(
|
|
218
218
|
EchoObject({
|
|
219
|
-
typename: 'dxos.
|
|
220
|
-
version: '0.
|
|
219
|
+
typename: 'org.dxos.type.message',
|
|
220
|
+
version: '0.1.0',
|
|
221
221
|
}),
|
|
222
222
|
);
|
|
223
223
|
type MessageType = S.Schema.Type<typeof MessageType>;
|
package/src/templates/index.ts
CHANGED
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import anthropic from './anthropic.ts?raw';
|
|
5
6
|
import chat from './chat.ts?raw';
|
|
6
|
-
import
|
|
7
|
+
import chessBot from './chess-bot.ts?raw';
|
|
8
|
+
import commentary from './commentary.ts?raw';
|
|
7
9
|
import dataGenerator from './data-generator.ts?raw';
|
|
8
10
|
import discord from './discord.ts?raw';
|
|
9
11
|
import email from './email.ts?raw';
|
|
@@ -25,54 +27,65 @@ export type Template = {
|
|
|
25
27
|
|
|
26
28
|
export const templates = [
|
|
27
29
|
{
|
|
28
|
-
id: 'dxos.
|
|
30
|
+
id: 'org.dxos.script.ping',
|
|
29
31
|
name: 'Ping',
|
|
30
32
|
source: removeHeader(ping),
|
|
31
33
|
},
|
|
32
34
|
{
|
|
33
|
-
id: 'dxos.
|
|
35
|
+
id: 'org.dxos.script.forex',
|
|
34
36
|
name: 'Forex',
|
|
35
37
|
source: removeHeader(forex),
|
|
36
38
|
},
|
|
37
39
|
{
|
|
38
|
-
id: 'dxos.
|
|
40
|
+
id: 'org.dxos.script.forex-effect',
|
|
39
41
|
name: 'Forex (Effect)',
|
|
40
42
|
source: removeHeader(forexEffect),
|
|
41
43
|
},
|
|
42
44
|
{
|
|
43
|
-
id: 'dxos.
|
|
45
|
+
id: 'org.dxos.script.gpt',
|
|
44
46
|
name: 'Gpt',
|
|
45
47
|
source: removeHeader(chat),
|
|
46
|
-
presetId: 'dxos.
|
|
48
|
+
presetId: 'org.dxos.function.gpt',
|
|
47
49
|
},
|
|
48
50
|
{
|
|
49
|
-
id: 'dxos.
|
|
50
|
-
name: 'Chess',
|
|
51
|
-
source: removeHeader(
|
|
52
|
-
presetId: 'dxos.
|
|
51
|
+
id: 'org.dxos.script.chess-bot',
|
|
52
|
+
name: 'Chess Bot',
|
|
53
|
+
source: removeHeader(chessBot),
|
|
54
|
+
presetId: 'org.dxos.function.chess-bot',
|
|
53
55
|
},
|
|
54
56
|
{
|
|
55
|
-
id: 'dxos.
|
|
57
|
+
id: 'org.dxos.script.email',
|
|
56
58
|
name: 'Email',
|
|
57
59
|
source: removeHeader(email),
|
|
58
|
-
presetId: 'dxos.
|
|
60
|
+
presetId: 'org.dxos.function.email',
|
|
59
61
|
},
|
|
60
62
|
{
|
|
61
|
-
id: 'dxos.
|
|
63
|
+
id: 'org.dxos.script.discord',
|
|
62
64
|
name: 'Discord',
|
|
63
65
|
source: removeHeader(discord),
|
|
64
|
-
presetId: 'dxos.
|
|
66
|
+
presetId: 'org.dxos.function.discord',
|
|
65
67
|
},
|
|
66
68
|
{
|
|
67
|
-
id: 'dxos.
|
|
69
|
+
id: 'org.dxos.script.gmail',
|
|
68
70
|
name: 'Gmail',
|
|
69
71
|
source: removeHeader(gmail),
|
|
70
|
-
presetId: 'dxos.
|
|
72
|
+
presetId: 'org.dxos.function.gmail',
|
|
71
73
|
},
|
|
72
74
|
{
|
|
73
|
-
id: 'dxos.
|
|
75
|
+
id: 'org.dxos.script.data-generator',
|
|
74
76
|
name: 'Data Generator',
|
|
75
77
|
source: removeHeader(dataGenerator),
|
|
76
|
-
presetId: 'dxos.
|
|
78
|
+
presetId: 'org.dxos.function.data-generator',
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
id: 'org.dxos.script.anthropic',
|
|
82
|
+
name: 'Anthropic',
|
|
83
|
+
source: removeHeader(anthropic),
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
id: 'org.dxos.script.commentary',
|
|
87
|
+
name: 'Commentary',
|
|
88
|
+
source: removeHeader(commentary),
|
|
89
|
+
presetId: 'org.dxos.function.chess.commentary',
|
|
77
90
|
},
|
|
78
91
|
] as const;
|
package/src/templates/ping.ts
CHANGED
|
@@ -1,8 +1,25 @@
|
|
|
1
1
|
//
|
|
2
|
-
// Copyright
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
*
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import * as Schema from 'effect/Schema';
|
|
7
|
+
|
|
8
|
+
import { Operation } from '@dxos/operation';
|
|
9
|
+
|
|
10
|
+
const Ping = Operation.make({
|
|
11
|
+
meta: {
|
|
12
|
+
key: 'org.dxos.script.ping',
|
|
13
|
+
name: 'Ping',
|
|
14
|
+
},
|
|
15
|
+
input: Schema.Any,
|
|
16
|
+
output: Schema.Any,
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export default Ping.pipe(
|
|
20
|
+
Operation.withHandler(
|
|
21
|
+
Effect.fn(function* (data) {
|
|
22
|
+
return data;
|
|
23
|
+
}),
|
|
24
|
+
),
|
|
25
|
+
);
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { readFile } from 'node:fs/promises';
|
|
6
|
+
|
|
7
|
+
import * as Record from 'effect/Record';
|
|
8
|
+
import { describe, expect, test } from 'vitest';
|
|
9
|
+
|
|
10
|
+
import { bundleFunction } from '@dxos/functions-runtime/bundler';
|
|
11
|
+
import { FunctionWorker } from '@dxos/functions-simulator-cloudflare';
|
|
12
|
+
import { ErrorCodec } from '@dxos/protocols';
|
|
13
|
+
|
|
14
|
+
// Requires downloading assets from R2
|
|
15
|
+
describe.runIf(process.env.DX_TEST_TAGS?.includes('functions-e2e'))('Run script in sumulator', () => {
|
|
16
|
+
test('forex-effect', { timeout: 120_000 }, async () => {
|
|
17
|
+
const source = await readFile(new URL('../templates/forex-effect.ts', import.meta.url), 'utf-8');
|
|
18
|
+
|
|
19
|
+
// Bundle and upload.
|
|
20
|
+
const buildResult = await bundleFunction({ source });
|
|
21
|
+
if ('error' in buildResult) {
|
|
22
|
+
throw buildResult.error ?? new Error('Bundle creation failed');
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const worker = new FunctionWorker({
|
|
26
|
+
mainModule: buildResult.entryPoint,
|
|
27
|
+
modules: Record.map(buildResult.assets, (contents, filename) => ({
|
|
28
|
+
contents: contents as Uint8Array<ArrayBuffer>,
|
|
29
|
+
contentType: filename.endsWith('.wasm') ? 'application/wasm' : 'application/javascript',
|
|
30
|
+
})),
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
const result = await worker.invoke({ from: 'USD', to: 'EUR' });
|
|
34
|
+
console.log(result);
|
|
35
|
+
if (result._kind === 'error') {
|
|
36
|
+
throw ErrorCodec.decode(result.error);
|
|
37
|
+
}
|
|
38
|
+
expect(Number(result.result)).toBeGreaterThan(0);
|
|
39
|
+
});
|
|
40
|
+
});
|
package/src/translations.ts
CHANGED
|
@@ -17,8 +17,10 @@ export const translations = [
|
|
|
17
17
|
'typename label_one': 'Script',
|
|
18
18
|
'typename label_other': 'Scripts',
|
|
19
19
|
'object name placeholder': 'New script',
|
|
20
|
+
'add object label': 'Add script',
|
|
20
21
|
'rename object label': 'Rename script',
|
|
21
22
|
'delete object label': 'Delete script',
|
|
23
|
+
'object deleted label': 'Script deleted',
|
|
22
24
|
},
|
|
23
25
|
[Notebook.Notebook.typename]: {
|
|
24
26
|
'typename label': 'Notebook',
|
|
@@ -26,8 +28,10 @@ export const translations = [
|
|
|
26
28
|
'typename label_one': 'Notebook',
|
|
27
29
|
'typename label_other': 'Notebooks',
|
|
28
30
|
'object name placeholder': 'New notebook',
|
|
31
|
+
'add object label': 'Add notebook',
|
|
29
32
|
'rename object label': 'Rename notebook',
|
|
30
33
|
'delete object label': 'Delete notebook',
|
|
34
|
+
'object deleted label': 'Notebook deleted',
|
|
31
35
|
},
|
|
32
36
|
[meta.id]: {
|
|
33
37
|
'plugin name': 'Scripts',
|