@dxos/plugin-script 0.11.1 → 0.12.0-next-bbabc02363f18d7643ea4160e3a7a7809870fd0d
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/dist/lib/Notebook.mjs +33 -0
- package/dist/lib/Notebook.mjs.map +1 -0
- package/dist/lib/ScriptCapabilities.mjs +14 -0
- package/dist/lib/ScriptCapabilities.mjs.map +1 -0
- package/dist/lib/ScriptEvents.mjs +19 -0
- package/dist/lib/ScriptEvents.mjs.map +1 -0
- package/dist/lib/ScriptOperation.mjs +33 -0
- package/dist/lib/ScriptOperation.mjs.map +1 -0
- package/dist/lib/ScriptPlugin.mjs +5 -12
- package/dist/lib/ScriptPlugin.mjs.map +1 -1
- package/dist/lib/ScriptPlugin.node.mjs +4 -4
- package/dist/lib/ScriptPlugin.node.mjs.map +1 -1
- package/dist/lib/ScriptPlugin.workerd.mjs +4 -4
- package/dist/lib/ScriptPlugin.workerd.mjs.map +1 -1
- package/dist/lib/Settings.mjs +13 -0
- package/dist/lib/Settings.mjs.map +1 -0
- package/dist/lib/capabilities/node.mjs +8 -7
- package/dist/lib/capabilities/node.mjs.map +1 -1
- package/dist/lib/capabilities.mjs +24 -8
- package/dist/lib/capabilities.mjs.map +1 -1
- package/dist/lib/chunk-DeploymentDialog.mjs +1 -1
- package/dist/lib/chunk-DeploymentDialog.mjs.map +1 -1
- package/dist/lib/chunk-NotebookArticle.mjs +13 -11
- package/dist/lib/chunk-NotebookArticle.mjs.map +1 -1
- package/dist/lib/chunk-ScriptArticle.mjs.map +1 -1
- package/dist/lib/chunk-ScriptProperties.mjs +6 -4
- package/dist/lib/chunk-ScriptProperties.mjs.map +1 -1
- package/dist/lib/chunk-ScriptSettings.mjs +2 -2
- package/dist/lib/chunk-ScriptSettings.mjs.map +1 -1
- package/dist/lib/chunk-TestContainer.mjs.map +1 -1
- package/dist/lib/chunk-app-graph-builder.mjs +5 -4
- package/dist/lib/chunk-app-graph-builder.mjs.map +1 -1
- package/dist/lib/chunk-compiler2.mjs +7 -7
- package/dist/lib/chunk-compiler2.mjs.map +1 -1
- package/dist/lib/chunk-create-object.mjs +15 -12
- package/dist/lib/chunk-create-object.mjs.map +1 -1
- package/dist/lib/chunk-create-script.mjs +3 -2
- package/dist/lib/chunk-create-script.mjs.map +1 -1
- package/dist/lib/chunk-create.mjs +3 -2
- package/dist/lib/chunk-create.mjs.map +1 -1
- package/dist/lib/chunk-delete.mjs +1 -1
- package/dist/lib/chunk-delete.mjs.map +1 -1
- package/dist/lib/chunk-deploy.mjs +3 -3
- package/dist/lib/chunk-deploy.mjs.map +1 -1
- package/dist/lib/chunk-functions.mjs +15 -4
- package/dist/lib/chunk-functions.mjs.map +1 -1
- package/dist/lib/chunk-inspect-invocations.mjs +1 -1
- package/dist/lib/chunk-inspect-invocations.mjs.map +1 -1
- package/dist/lib/chunk-install-function.mjs +2 -2
- package/dist/lib/chunk-install-function.mjs.map +1 -1
- package/dist/lib/chunk-invoke.mjs +2 -2
- package/dist/lib/chunk-invoke.mjs.map +1 -1
- package/dist/lib/chunk-meta.mjs +3 -3
- package/dist/lib/chunk-meta.mjs.map +1 -1
- package/dist/lib/chunk-operation-handler.mjs +4 -3
- package/dist/lib/chunk-operation-handler.mjs.map +1 -1
- package/dist/lib/chunk-query-deployed-functions.mjs +2 -2
- package/dist/lib/chunk-query-deployed-functions.mjs.map +1 -1
- package/dist/lib/chunk-react-surface.mjs +9 -7
- package/dist/lib/chunk-react-surface.mjs.map +1 -1
- package/dist/lib/chunk-read.mjs +1 -1
- package/dist/lib/chunk-read.mjs.map +1 -1
- package/dist/lib/chunk-rolldown-runtime.mjs +13 -0
- package/dist/lib/chunk-settings.mjs +7 -6
- package/dist/lib/chunk-settings.mjs.map +1 -1
- package/dist/lib/chunk-skill-definition.mjs +3 -3
- package/dist/lib/chunk-skill-definition.mjs.map +1 -1
- package/dist/lib/chunk-skills.mjs +2 -1
- package/dist/lib/chunk-skills.mjs.map +1 -1
- package/dist/lib/chunk-templates.mjs +6 -6
- package/dist/lib/chunk-update.mjs +1 -1
- package/dist/lib/chunk-update.mjs.map +1 -1
- package/dist/lib/chunk-util.mjs +7 -7
- package/dist/lib/chunk-util.mjs.map +1 -1
- package/dist/lib/components.mjs +3 -2
- package/dist/lib/components.mjs.map +1 -1
- package/dist/lib/hooks.mjs +12 -9
- package/dist/lib/hooks.mjs.map +1 -1
- package/dist/lib/index.mjs +6 -2
- package/dist/lib/operations.mjs +4 -2
- package/dist/lib/operations.mjs.map +1 -1
- package/dist/lib/plugin.mjs +2 -3
- package/dist/lib/plugin.mjs.map +1 -1
- package/dist/lib/testing.mjs +7 -5
- package/dist/lib/testing.mjs.map +1 -1
- package/dist/lib/translations.mjs +3 -3
- package/dist/lib/translations.mjs.map +1 -1
- package/dist/types/src/ScriptPlugin.d.ts +1 -1
- package/dist/types/src/ScriptPlugin.d.ts.map +1 -1
- package/dist/types/src/ScriptPlugin.node.d.ts +1 -1
- package/dist/types/src/ScriptPlugin.node.d.ts.map +1 -1
- package/dist/types/src/ScriptPlugin.workerd.d.ts +1 -1
- package/dist/types/src/ScriptPlugin.workerd.d.ts.map +1 -1
- package/dist/types/src/capabilities/ScriptSurfaces.d.ts +3 -3
- package/dist/types/src/capabilities/ScriptSurfaces.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +2 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/compiler.d.ts +2 -2
- package/dist/types/src/capabilities/compiler.d.ts.map +1 -1
- package/dist/types/src/capabilities/create-object.d.ts +2 -2
- package/dist/types/src/capabilities/create-object.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +8 -9
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/node.d.ts +4 -7
- package/dist/types/src/capabilities/node.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +2 -3
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +2 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +2 -2
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- package/dist/types/src/capabilities/skill-definition.d.ts +2 -2
- package/dist/types/src/capabilities/skill-definition.d.ts.map +1 -1
- package/dist/types/src/components/NotebookStack/NotebookCell.d.ts +1 -1
- package/dist/types/src/components/NotebookStack/NotebookCell.d.ts.map +1 -1
- package/dist/types/src/components/NotebookStack/NotebookMenu.d.ts +1 -1
- package/dist/types/src/components/NotebookStack/NotebookMenu.d.ts.map +1 -1
- package/dist/types/src/components/NotebookStack/NotebookStack.d.ts +1 -1
- package/dist/types/src/components/NotebookStack/NotebookStack.d.ts.map +1 -1
- package/dist/types/src/components/NotebookStack/NotebookStack.stories.d.ts +1 -1
- package/dist/types/src/components/QueryEditor/QueryEditor.stories.d.ts +1 -1
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.d.ts +1 -1
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.d.ts.map +1 -1
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.stories.d.ts +1 -1
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.stories.d.ts +1 -1
- package/dist/types/src/containers/DeploymentDialog/DeploymentDialog.stories.d.ts +1 -1
- package/dist/types/src/containers/NotebookArticle/NotebookArticle.d.ts +1 -1
- package/dist/types/src/containers/NotebookArticle/NotebookArticle.d.ts.map +1 -1
- package/dist/types/src/containers/ScriptArticle/ScriptArticle.d.ts +2 -2
- package/dist/types/src/containers/ScriptArticle/ScriptArticle.d.ts.map +1 -1
- package/dist/types/src/containers/ScriptArticle/ScriptArticle.stories.d.ts +1 -1
- package/dist/types/src/containers/ScriptProperties/FunctionBinding.d.ts +1 -1
- package/dist/types/src/containers/ScriptProperties/FunctionBinding.d.ts.map +1 -1
- package/dist/types/src/containers/ScriptProperties/FunctionPublishing.d.ts +1 -1
- package/dist/types/src/containers/ScriptProperties/FunctionPublishing.d.ts.map +1 -1
- package/dist/types/src/containers/ScriptProperties/ScriptProperties.d.ts +1 -1
- package/dist/types/src/containers/ScriptProperties/ScriptProperties.d.ts.map +1 -1
- package/dist/types/src/containers/ScriptProperties/ScriptProperties.stories.d.ts +1 -1
- package/dist/types/src/containers/ScriptProperties/SkillEditor.d.ts +1 -1
- package/dist/types/src/containers/ScriptProperties/SkillEditor.d.ts.map +1 -1
- package/dist/types/src/containers/ScriptSettings/ScriptSettings.d.ts +1 -1
- package/dist/types/src/containers/ScriptSettings/ScriptSettings.d.ts.map +1 -1
- package/dist/types/src/containers/ScriptSettings/ScriptSettings.stories.d.ts +1 -1
- package/dist/types/src/containers/TestContainer/TestContainer.d.ts +1 -1
- package/dist/types/src/containers/TestContainer/TestContainer.d.ts.map +1 -1
- package/dist/types/src/hooks/deploy.d.ts +2 -1
- package/dist/types/src/hooks/deploy.d.ts.map +1 -1
- package/dist/types/src/hooks/format.d.ts +1 -1
- package/dist/types/src/hooks/format.d.ts.map +1 -1
- package/dist/types/src/hooks/template.d.ts +1 -1
- package/dist/types/src/hooks/template.d.ts.map +1 -1
- package/dist/types/src/hooks/useCompiler.d.ts.map +1 -1
- package/dist/types/src/hooks/useCreateAndDeployScriptTemplates.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +6 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/notebook/compute-graph.d.ts +1 -1
- package/dist/types/src/notebook/compute-graph.d.ts.map +1 -1
- package/dist/types/src/operations/create-script.d.ts +2 -2
- package/dist/types/src/operations/create-script.d.ts.map +1 -1
- package/dist/types/src/operations/index.d.ts +1 -1
- package/dist/types/src/operations/index.d.ts.map +1 -1
- package/dist/types/src/plugin.d.ts +1 -2
- package/dist/types/src/plugin.d.ts.map +1 -1
- package/dist/types/src/skills/functions/create.d.ts +1 -1
- package/dist/types/src/skills/functions/create.d.ts.map +1 -1
- package/dist/types/src/skills/functions/definitions.d.ts +1 -1
- package/dist/types/src/skills/functions/definitions.d.ts.map +1 -1
- package/dist/types/src/skills/functions/delete.d.ts +1 -1
- package/dist/types/src/skills/functions/delete.d.ts.map +1 -1
- package/dist/types/src/skills/functions/deploy.d.ts +1 -1
- package/dist/types/src/skills/functions/deploy.d.ts.map +1 -1
- package/dist/types/src/skills/functions/index.d.ts +1 -1
- package/dist/types/src/skills/functions/index.d.ts.map +1 -1
- package/dist/types/src/skills/functions/inspect-invocations.d.ts +1 -1
- package/dist/types/src/skills/functions/inspect-invocations.d.ts.map +1 -1
- package/dist/types/src/skills/functions/install-function.d.ts +1 -1
- package/dist/types/src/skills/functions/install-function.d.ts.map +1 -1
- package/dist/types/src/skills/functions/invoke.d.ts +1 -1
- package/dist/types/src/skills/functions/invoke.d.ts.map +1 -1
- package/dist/types/src/skills/functions/query-deployed-functions.d.ts +1 -1
- package/dist/types/src/skills/functions/query-deployed-functions.d.ts.map +1 -1
- package/dist/types/src/skills/functions/read.d.ts +1 -1
- package/dist/types/src/skills/functions/read.d.ts.map +1 -1
- package/dist/types/src/skills/functions/update.d.ts +1 -1
- package/dist/types/src/skills/functions/update.d.ts.map +1 -1
- package/dist/types/src/skills/script-skill.d.ts +1 -1
- package/dist/types/src/skills/script-skill.d.ts.map +1 -1
- package/dist/types/src/templates/anthropic.d.ts +1 -1
- package/dist/types/src/templates/anthropic.d.ts.map +1 -1
- package/dist/types/src/templates/chess-bot.d.ts +2 -2
- package/dist/types/src/templates/chess-bot.d.ts.map +1 -1
- package/dist/types/src/templates/commentary.d.ts +2 -2
- package/dist/types/src/templates/commentary.d.ts.map +1 -1
- package/dist/types/src/templates/forex-effect.d.ts +1 -1
- package/dist/types/src/templates/forex-effect.d.ts.map +1 -1
- package/dist/types/src/templates/forex.d.ts +1 -1
- package/dist/types/src/templates/forex.d.ts.map +1 -1
- package/dist/types/src/templates/ping.d.ts +1 -1
- package/dist/types/src/templates/ping.d.ts.map +1 -1
- package/dist/types/src/testing/test-notebook.d.ts +1 -1
- package/dist/types/src/testing/test-notebook.d.ts.map +1 -1
- package/dist/types/src/testing/test-script.d.ts +1 -1
- package/dist/types/src/testing/test-script.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Notebook.d.ts +2 -2
- package/dist/types/src/types/Notebook.d.ts.map +1 -1
- package/dist/types/src/types/ScriptCapabilities.d.ts +3 -3
- package/dist/types/src/types/ScriptCapabilities.d.ts.map +1 -1
- package/dist/types/src/types/ScriptEvents.d.ts +7 -1
- package/dist/types/src/types/ScriptEvents.d.ts.map +1 -1
- package/dist/types/src/types/ScriptOperation.d.ts +2 -1
- package/dist/types/src/types/ScriptOperation.d.ts.map +1 -1
- package/dist/types/src/util/deploy.d.ts +2 -1
- package/dist/types/src/util/deploy.d.ts.map +1 -1
- package/dist/types/src/util/functions.d.ts +2 -1
- package/dist/types/src/util/functions.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dx.config.ts +1 -1
- package/package.json +115 -82
- package/src/ScriptPlugin.node.ts +8 -8
- package/src/ScriptPlugin.test.ts +3 -6
- package/src/ScriptPlugin.tsx +20 -22
- package/src/ScriptPlugin.workerd.ts +5 -5
- package/src/capabilities/ScriptSurfaces.tsx +5 -3
- package/src/capabilities/app-graph-builder.ts +5 -4
- package/src/capabilities/compiler.ts +3 -4
- package/src/capabilities/create-object.ts +34 -31
- package/src/capabilities/index.ts +28 -11
- package/src/capabilities/node.ts +9 -10
- package/src/capabilities/operation-handler.ts +5 -4
- package/src/capabilities/react-surface.ts +5 -4
- package/src/capabilities/settings.ts +7 -5
- package/src/capabilities/skill-definition.ts +3 -3
- package/src/components/NotebookStack/NotebookCell.tsx +1 -1
- package/src/components/NotebookStack/NotebookMenu.tsx +2 -1
- package/src/components/NotebookStack/NotebookStack.tsx +1 -1
- package/src/components/ScriptToolbar/ScriptToolbar.stories.tsx +1 -1
- package/src/components/ScriptToolbar/ScriptToolbar.tsx +4 -2
- package/src/containers/DeploymentDialog/DeploymentDialog.tsx +1 -1
- package/src/containers/NotebookArticle/NotebookArticle.stories.tsx +7 -7
- package/src/containers/NotebookArticle/NotebookArticle.tsx +5 -4
- package/src/containers/ScriptArticle/ScriptArticle.stories.tsx +3 -3
- package/src/containers/ScriptArticle/ScriptArticle.tsx +3 -2
- package/src/containers/ScriptProperties/FunctionBinding.tsx +2 -2
- package/src/containers/ScriptProperties/FunctionPublishing.tsx +5 -3
- package/src/containers/ScriptProperties/ScriptProperties.stories.tsx +3 -3
- package/src/containers/ScriptProperties/ScriptProperties.tsx +1 -1
- package/src/containers/ScriptProperties/SkillEditor.tsx +4 -3
- package/src/containers/ScriptSettings/ScriptSettings.tsx +2 -1
- package/src/containers/TestContainer/TestContainer.tsx +1 -1
- package/src/e2e/ai.test.ts +1 -1
- package/src/hooks/deploy.ts +2 -1
- package/src/hooks/format.ts +1 -1
- package/src/hooks/template.ts +1 -1
- package/src/hooks/useCompiler.ts +2 -3
- package/src/hooks/useCreateAndDeployScriptTemplates.ts +2 -3
- package/src/hooks/useToolbarState.ts +1 -1
- package/src/index.ts +6 -2
- package/src/meta.ts +1 -1
- package/src/notebook/compute-graph.ts +1 -2
- package/src/operations/create-script.ts +3 -2
- package/src/operations/index.ts +7 -2
- package/src/plugin.ts +1 -3
- package/src/skills/functions/create.ts +3 -2
- package/src/skills/functions/definitions.ts +1 -1
- package/src/skills/functions/delete.ts +1 -1
- package/src/skills/functions/deploy.ts +2 -1
- package/src/skills/functions/index.ts +25 -12
- package/src/skills/functions/inspect-invocations.ts +1 -1
- package/src/skills/functions/install-function.ts +1 -1
- package/src/skills/functions/invoke.ts +1 -1
- package/src/skills/functions/query-deployed-functions.ts +1 -1
- package/src/skills/functions/read.ts +2 -1
- package/src/skills/functions/update.ts +2 -1
- package/src/skills/script-skill.ts +2 -1
- package/src/templates/anthropic.ts +1 -1
- package/src/templates/chess-bot.ts +5 -4
- package/src/templates/commentary.ts +8 -6
- package/src/templates/forex-effect.ts +1 -1
- package/src/templates/forex.ts +1 -1
- package/src/templates/ping.ts +1 -1
- package/src/testing/test-notebook.ts +3 -3
- package/src/testing/test-script.ts +2 -1
- package/src/translations.ts +3 -2
- package/src/types/Notebook.ts +2 -2
- package/src/types/ScriptCapabilities.ts +3 -3
- package/src/types/ScriptEvents.ts +8 -1
- package/src/types/ScriptOperation.ts +2 -1
- package/src/util/deploy.ts +2 -1
- package/src/util/functions.ts +2 -1
- package/dist/lib/chunk-types.mjs +0 -90
- package/dist/lib/chunk-types.mjs.map +0 -1
- package/dist/lib/types.mjs +0 -2
- package/dist/types/src/types/index.d.ts +0 -6
- package/dist/types/src/types/index.d.ts.map +0 -1
- package/dist/types/src/types/types.d.ts +0 -2
- package/dist/types/src/types/types.d.ts.map +0 -1
- package/src/types/index.ts +0 -10
- package/src/types/types.ts +0 -5
|
@@ -2,18 +2,31 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import * as Operation from '@dxos/compute/Operation';
|
|
6
|
+
import * as OperationHandlerSet from '@dxos/compute/OperationHandlerSet';
|
|
7
|
+
|
|
8
|
+
import {
|
|
9
|
+
Create,
|
|
10
|
+
Delete,
|
|
11
|
+
Deploy,
|
|
12
|
+
InspectInvocations,
|
|
13
|
+
InstallFunction,
|
|
14
|
+
Invoke,
|
|
15
|
+
QueryDeployedFunctions,
|
|
16
|
+
Read,
|
|
17
|
+
Update,
|
|
18
|
+
} from './definitions';
|
|
6
19
|
|
|
7
20
|
export * from './definitions';
|
|
8
21
|
|
|
9
|
-
export const ScriptHandlers = OperationHandlerSet.lazy(
|
|
10
|
-
() => import('./create'),
|
|
11
|
-
() => import('./read'),
|
|
12
|
-
() => import('./update'),
|
|
13
|
-
() => import('./delete'),
|
|
14
|
-
() => import('./deploy'),
|
|
15
|
-
() => import('./invoke'),
|
|
16
|
-
() => import('./inspect-invocations'),
|
|
17
|
-
() => import('./query-deployed-functions'),
|
|
18
|
-
() => import('./install-function'),
|
|
19
|
-
);
|
|
22
|
+
export const ScriptHandlers = OperationHandlerSet.lazy([
|
|
23
|
+
Create.pipe(Operation.lazyHandler(() => import('./create'))),
|
|
24
|
+
Read.pipe(Operation.lazyHandler(() => import('./read'))),
|
|
25
|
+
Update.pipe(Operation.lazyHandler(() => import('./update'))),
|
|
26
|
+
Delete.pipe(Operation.lazyHandler(() => import('./delete'))),
|
|
27
|
+
Deploy.pipe(Operation.lazyHandler(() => import('./deploy'))),
|
|
28
|
+
Invoke.pipe(Operation.lazyHandler(() => import('./invoke'))),
|
|
29
|
+
InspectInvocations.pipe(Operation.lazyHandler(() => import('./inspect-invocations'))),
|
|
30
|
+
QueryDeployedFunctions.pipe(Operation.lazyHandler(() => import('./query-deployed-functions'))),
|
|
31
|
+
InstallFunction.pipe(Operation.lazyHandler(() => import('./install-function'))),
|
|
32
|
+
]);
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
7
|
import { SpaceProperties } from '@dxos/client-protocol';
|
|
8
|
-
import { Operation } from '@dxos/compute';
|
|
9
8
|
import { getUserFunctionIdInMetadata } from '@dxos/compute-runtime';
|
|
10
9
|
import { InvocationTraceEndEvent, InvocationTraceStartEvent, createInvocationSpans } from '@dxos/compute-runtime';
|
|
10
|
+
import * as Operation from '@dxos/compute/Operation';
|
|
11
11
|
import { Database, Feed, Filter, Obj, Query } from '@dxos/echo';
|
|
12
12
|
|
|
13
13
|
import { InspectInvocations } from './definitions';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
7
|
import { ClientService } from '@dxos/client';
|
|
8
|
-
import
|
|
8
|
+
import * as Operation from '@dxos/compute/Operation';
|
|
9
9
|
import { Context } from '@dxos/context';
|
|
10
10
|
import { Filter, Obj } from '@dxos/echo';
|
|
11
11
|
import { FunctionsServiceClient } from '@dxos/edge-compute';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
7
|
import { ClientService } from '@dxos/client';
|
|
8
|
-
import
|
|
8
|
+
import * as Operation from '@dxos/compute/Operation';
|
|
9
9
|
import { Context } from '@dxos/context';
|
|
10
10
|
import { Database, Obj } from '@dxos/echo';
|
|
11
11
|
import { FunctionsServiceClient } from '@dxos/edge-compute';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
7
|
import { ClientService } from '@dxos/client';
|
|
8
|
-
import
|
|
8
|
+
import * as Operation from '@dxos/compute/Operation';
|
|
9
9
|
import { Context } from '@dxos/context';
|
|
10
10
|
import { Obj } from '@dxos/echo';
|
|
11
11
|
import { FunctionsServiceClient } from '@dxos/edge-compute';
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
|
-
import
|
|
7
|
+
import * as Operation from '@dxos/compute/Operation';
|
|
8
|
+
import type * as Script from '@dxos/compute/Script';
|
|
8
9
|
import { Database } from '@dxos/echo';
|
|
9
10
|
|
|
10
11
|
import { Read } from './definitions';
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
|
-
import
|
|
7
|
+
import * as Operation from '@dxos/compute/Operation';
|
|
8
|
+
import type * as Script from '@dxos/compute/Script';
|
|
8
9
|
import { Database, Obj } from '@dxos/echo';
|
|
9
10
|
import { Doc, applyEdits } from '@dxos/echo-doc';
|
|
10
11
|
|
|
@@ -9,7 +9,7 @@ import * as Schema from 'effect/Schema';
|
|
|
9
9
|
import * as Stream from 'effect/Stream';
|
|
10
10
|
|
|
11
11
|
import { AiService } from '@dxos/ai';
|
|
12
|
-
import
|
|
12
|
+
import * as Operation from '@dxos/compute/Operation';
|
|
13
13
|
import { DXN } from '@dxos/keys';
|
|
14
14
|
|
|
15
15
|
const Anthropic = Operation.make({
|
|
@@ -6,10 +6,11 @@ import { Chess as ChessJS } from 'chess.js';
|
|
|
6
6
|
import * as Effect from 'effect/Effect';
|
|
7
7
|
import * as Schema from 'effect/Schema';
|
|
8
8
|
|
|
9
|
-
import
|
|
9
|
+
import * as Operation from '@dxos/compute/Operation';
|
|
10
10
|
import { Database, DXN, Obj } from '@dxos/echo';
|
|
11
|
-
import
|
|
12
|
-
import
|
|
11
|
+
import * as Chess from '@dxos/plugin-chess/Chess';
|
|
12
|
+
import * as Game from '@dxos/plugin-game/Game';
|
|
13
|
+
import * as GameUtil from '@dxos/plugin-game/GameUtil';
|
|
13
14
|
|
|
14
15
|
const ChessBot = Operation.make({
|
|
15
16
|
meta: {
|
|
@@ -37,7 +38,7 @@ const ChessBot = Operation.make({
|
|
|
37
38
|
export default ChessBot.pipe(
|
|
38
39
|
Operation.withHandler(
|
|
39
40
|
Effect.fnUntraced(function* ({ game, player = 'black' }) {
|
|
40
|
-
const { variant } = yield* loadGame(game, Chess.State);
|
|
41
|
+
const { variant } = yield* GameUtil.loadGame(game, Chess.State);
|
|
41
42
|
const chess = new ChessJS();
|
|
42
43
|
chess.loadPgn(variant.pgn ?? '');
|
|
43
44
|
if (chess.turn() !== (player === 'white' ? 'w' : 'b')) {
|
|
@@ -12,16 +12,18 @@ import * as Option from 'effect/Option';
|
|
|
12
12
|
import * as Schema from 'effect/Schema';
|
|
13
13
|
|
|
14
14
|
import { AiService, ConsolePrinter, ToolExecutionService, ToolResolverService } from '@dxos/ai';
|
|
15
|
-
import
|
|
15
|
+
import * as AppAnnotation from '@dxos/app-toolkit/AppAnnotation';
|
|
16
16
|
import { AiRequest, GenerationObserver } from '@dxos/assistant';
|
|
17
|
-
import
|
|
17
|
+
import * as Operation from '@dxos/compute/Operation';
|
|
18
|
+
import * as Trace from '@dxos/compute/Trace';
|
|
18
19
|
import { Annotation, Collection, Database, DXN, Filter, Obj, Ref, Relation, URI } from '@dxos/echo';
|
|
19
20
|
import { Doc } from '@dxos/echo-doc';
|
|
20
21
|
import { registryLayerNoop } from '@dxos/echo/testing';
|
|
21
22
|
import { log } from '@dxos/log';
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
23
|
+
import * as Chess from '@dxos/plugin-chess/Chess';
|
|
24
|
+
import * as Game from '@dxos/plugin-game/Game';
|
|
25
|
+
import * as GameUtil from '@dxos/plugin-game/GameUtil';
|
|
26
|
+
import * as Markdown from '@dxos/plugin-markdown/Markdown';
|
|
25
27
|
import { Text } from '@dxos/schema';
|
|
26
28
|
import { HasSubject } from '@dxos/types';
|
|
27
29
|
import { trim } from '@dxos/util';
|
|
@@ -60,7 +62,7 @@ export default Commentary.pipe(
|
|
|
60
62
|
function* ({ game: gameRef }) {
|
|
61
63
|
// Load the game and its Chess variant state.
|
|
62
64
|
log.info('load game', { gameRef });
|
|
63
|
-
const { game: chessGame, variant: chessState } = yield* loadGame(gameRef, Chess.State);
|
|
65
|
+
const { game: chessGame, variant: chessState } = yield* GameUtil.loadGame(gameRef, Chess.State);
|
|
64
66
|
|
|
65
67
|
// Load the chess position from PGN or FEN.
|
|
66
68
|
const chess = new ChessJS();
|
|
@@ -9,7 +9,7 @@ import * as Effect from 'effect/Effect';
|
|
|
9
9
|
import * as Schedule from 'effect/Schedule';
|
|
10
10
|
import * as Schema from 'effect/Schema';
|
|
11
11
|
|
|
12
|
-
import
|
|
12
|
+
import * as Operation from '@dxos/compute/Operation';
|
|
13
13
|
import { DXN } from '@dxos/keys';
|
|
14
14
|
|
|
15
15
|
const ForexEffect = Operation.make({
|
package/src/templates/forex.ts
CHANGED
package/src/templates/ping.ts
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import * as Instructions from '@dxos/compute/Instructions';
|
|
6
6
|
import { Ref, Type } from '@dxos/echo';
|
|
7
7
|
import { createObject } from '@dxos/echo-client';
|
|
8
8
|
import { PublicKey } from '@dxos/keys';
|
|
9
|
-
import
|
|
9
|
+
import * as Markdown from '@dxos/plugin-markdown/Markdown';
|
|
10
10
|
import { Text } from '@dxos/schema';
|
|
11
11
|
|
|
12
|
-
import
|
|
12
|
+
import * as Notebook from '../types/Notebook';
|
|
13
13
|
|
|
14
14
|
// TODO(burdon): NOTE: createObject is required for tests.
|
|
15
15
|
export const createNotebook = (): Notebook.Notebook =>
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
// Copyright 2026 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import * as Operation from '@dxos/compute/Operation';
|
|
6
|
+
import * as Script from '@dxos/compute/Script';
|
|
6
7
|
import { Obj, Ref } from '@dxos/echo';
|
|
7
8
|
import { type Space } from '@dxos/react-client/echo';
|
|
8
9
|
|
package/src/translations.ts
CHANGED
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import * as Script from '@dxos/compute/Script';
|
|
6
6
|
import { Type } from '@dxos/echo';
|
|
7
7
|
import { type Resource } from '@dxos/react-ui';
|
|
8
8
|
|
|
9
9
|
import { meta } from '#meta';
|
|
10
|
-
|
|
10
|
+
|
|
11
|
+
import * as Notebook from './types/Notebook';
|
|
11
12
|
|
|
12
13
|
export const translations = [
|
|
13
14
|
{
|
package/src/types/Notebook.ts
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Schema from 'effect/Schema';
|
|
6
6
|
|
|
7
|
-
import
|
|
7
|
+
import * as Instructions from '@dxos/compute/Instructions';
|
|
8
8
|
import { Annotation, DXN, Obj, Ref, Type } from '@dxos/echo';
|
|
9
9
|
import { FormInputAnnotation } from '@dxos/echo/Annotation';
|
|
10
10
|
import { LabelAnnotation } from '@dxos/echo/Annotation';
|
|
11
|
-
import
|
|
11
|
+
import * as Graph from '@dxos/plugin-explorer/Graph';
|
|
12
12
|
import { Text } from '@dxos/schema';
|
|
13
13
|
|
|
14
14
|
export type CellType = 'markdown' | 'script' | 'query' | 'prompt' | 'view';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import { type Atom } from '@effect-atom/atom';
|
|
8
8
|
|
|
9
|
-
import
|
|
9
|
+
import * as Capability from '@dxos/app-framework/Capability';
|
|
10
10
|
|
|
11
11
|
import { meta } from '#meta';
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ import { type Compiler as CompilerType } from '../compiler';
|
|
|
14
14
|
|
|
15
15
|
// Inline import to avoid `Settings` namespace alias colliding with the
|
|
16
16
|
// `Settings` capability export below.
|
|
17
|
-
export const Settings = Capability.
|
|
17
|
+
export const Settings = Capability.makeSingleton<Atom.Writable<import('./Settings').Settings>>()(
|
|
18
18
|
`${meta.profile.key}.capability.settings`,
|
|
19
19
|
);
|
|
20
|
-
export const Compiler = Capability.
|
|
20
|
+
export const Compiler = Capability.makeSingleton<CompilerType>()(`${meta.profile.key}.capability.compiler`);
|
|
@@ -4,8 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
// @import-as-namespace
|
|
6
6
|
|
|
7
|
-
import
|
|
7
|
+
import * as ActivationEvent from '@dxos/app-framework/ActivationEvent';
|
|
8
8
|
|
|
9
9
|
import { meta } from '#meta';
|
|
10
10
|
|
|
11
11
|
export const SetupCompiler = ActivationEvent.make(`${meta.profile.key}.event.setupCompiler`);
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The feature's start event: the plugin's start-gated modules (and cross-plugin
|
|
15
|
+
* contributions consumed by this feature) activate here. Fired on demand and by the
|
|
16
|
+
* host's idle trickle.
|
|
17
|
+
*/
|
|
18
|
+
export const Start = ActivationEvent.pluginStart(meta.profile.key);
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
import * as Schema from 'effect/Schema';
|
|
8
8
|
|
|
9
|
-
import
|
|
9
|
+
import * as Operation from '@dxos/compute/Operation';
|
|
10
|
+
import * as Script from '@dxos/compute/Script';
|
|
10
11
|
import { Database, DXN, Type } from '@dxos/echo';
|
|
11
12
|
|
|
12
13
|
import { meta } from '#meta';
|
package/src/util/deploy.ts
CHANGED
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { type Client } from '@dxos/client';
|
|
6
|
-
import { Operation, Script } from '@dxos/compute';
|
|
7
6
|
import { getUserFunctionIdInMetadata } from '@dxos/compute-runtime';
|
|
7
|
+
import * as Operation from '@dxos/compute/Operation';
|
|
8
|
+
import * as Script from '@dxos/compute/Script';
|
|
8
9
|
import { Context } from '@dxos/context';
|
|
9
10
|
import { Obj, Ref } from '@dxos/echo';
|
|
10
11
|
import { FunctionsServiceClient, incrementSemverPatch } from '@dxos/edge-compute';
|
package/src/util/functions.ts
CHANGED
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { type Operation, Script } from '@dxos/compute';
|
|
6
5
|
import { getUserFunctionIdInMetadata } from '@dxos/compute-runtime';
|
|
7
6
|
import { getInvocationUrl } from '@dxos/compute-runtime';
|
|
7
|
+
import type * as Operation from '@dxos/compute/Operation';
|
|
8
|
+
import * as Script from '@dxos/compute/Script';
|
|
8
9
|
import { Obj } from '@dxos/echo';
|
|
9
10
|
import { type PublicKey } from '@dxos/keys';
|
|
10
11
|
import { log } from '@dxos/log';
|
package/dist/lib/chunk-types.mjs
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { t as templates } from "./chunk-templates.mjs";
|
|
2
|
-
import { Instructions, Operation, Script } from "@dxos/compute";
|
|
3
|
-
import * as Schema from "effect/Schema";
|
|
4
|
-
import { Annotation, DXN, Database, Obj, Ref, Type } from "@dxos/echo";
|
|
5
|
-
import { ActivationEvent, Capability } from "@dxos/app-framework";
|
|
6
|
-
import { EditorInputMode } from "@dxos/ui-editor/types";
|
|
7
|
-
import { FormInputAnnotation, LabelAnnotation } from "@dxos/echo/Annotation";
|
|
8
|
-
import { Graph } from "@dxos/plugin-explorer";
|
|
9
|
-
import { Text } from "@dxos/schema";
|
|
10
|
-
import { meta } from "#meta";
|
|
11
|
-
//#region \0rolldown/runtime.js
|
|
12
|
-
var __defProp = Object.defineProperty;
|
|
13
|
-
var __exportAll = (all, no_symbols) => {
|
|
14
|
-
let target = {};
|
|
15
|
-
for (var name in all) __defProp(target, name, {
|
|
16
|
-
get: all[name],
|
|
17
|
-
enumerable: true
|
|
18
|
-
});
|
|
19
|
-
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
20
|
-
return target;
|
|
21
|
-
};
|
|
22
|
-
//#endregion
|
|
23
|
-
//#region src/types/Settings.ts
|
|
24
|
-
var Settings_exports = /* @__PURE__ */ __exportAll({ Settings: () => Settings$1 });
|
|
25
|
-
var Settings$1 = Schema.mutable(Schema.Struct({ editorInputMode: EditorInputMode.annotations({
|
|
26
|
-
title: "Editor input mode",
|
|
27
|
-
description: "Choose the keybinding style for the script editor."
|
|
28
|
-
}) }));
|
|
29
|
-
//#endregion
|
|
30
|
-
//#region src/types/Notebook.ts
|
|
31
|
-
var Notebook_exports = /* @__PURE__ */ __exportAll({
|
|
32
|
-
Cell: () => Cell,
|
|
33
|
-
Notebook: () => Notebook,
|
|
34
|
-
make: () => make
|
|
35
|
-
});
|
|
36
|
-
var Cell = Schema.Struct({
|
|
37
|
-
id: Schema.String,
|
|
38
|
-
type: Schema.String,
|
|
39
|
-
name: Schema.optional(Schema.String),
|
|
40
|
-
source: Schema.optional(Ref.Ref(Text.Text)),
|
|
41
|
-
prompt: Schema.optional(Ref.Ref(Instructions.Instructions)),
|
|
42
|
-
graph: Schema.optional(Ref.Ref(Graph.Graph))
|
|
43
|
-
});
|
|
44
|
-
var Notebook = class extends Type.makeObject(DXN.make("org.dxos.type.notebook", "0.1.0"))(Schema.Struct({
|
|
45
|
-
name: Schema.String.pipe(Schema.optional),
|
|
46
|
-
cells: Cell.pipe(Schema.Array, FormInputAnnotation.set(false))
|
|
47
|
-
}).pipe(LabelAnnotation.set(["name"]), Annotation.IconAnnotation.set({
|
|
48
|
-
icon: "ph--notebook--regular",
|
|
49
|
-
hue: "sky"
|
|
50
|
-
}))) {};
|
|
51
|
-
var make = (props = { cells: [] }) => Obj.make(Notebook, props);
|
|
52
|
-
//#endregion
|
|
53
|
-
//#region src/types/ScriptCapabilities.ts
|
|
54
|
-
var ScriptCapabilities_exports = /* @__PURE__ */ __exportAll({
|
|
55
|
-
Compiler: () => Compiler,
|
|
56
|
-
Settings: () => Settings
|
|
57
|
-
});
|
|
58
|
-
var Settings = Capability.make(`${meta.profile.key}.capability.settings`);
|
|
59
|
-
var Compiler = Capability.make(`${meta.profile.key}.capability.compiler`);
|
|
60
|
-
//#endregion
|
|
61
|
-
//#region src/types/ScriptEvents.ts
|
|
62
|
-
var ScriptEvents_exports = /* @__PURE__ */ __exportAll({ SetupCompiler: () => SetupCompiler });
|
|
63
|
-
var SetupCompiler = ActivationEvent.make(`${meta.profile.key}.event.setupCompiler`);
|
|
64
|
-
//#endregion
|
|
65
|
-
//#region src/types/ScriptOperation.ts
|
|
66
|
-
var ScriptOperation_exports = /* @__PURE__ */ __exportAll({
|
|
67
|
-
CreateScript: () => CreateScript,
|
|
68
|
-
NotebookProps: () => NotebookProps,
|
|
69
|
-
ScriptProps: () => ScriptProps
|
|
70
|
-
});
|
|
71
|
-
var makeKey = (name) => DXN.make(`${meta.profile.key}.operation.${name}`);
|
|
72
|
-
var ScriptProps = Schema.Struct({
|
|
73
|
-
name: Schema.optional(Schema.String),
|
|
74
|
-
gistUrl: Schema.optional(Schema.String.annotations({ title: "Import from Gist (url)" })),
|
|
75
|
-
initialTemplateId: Schema.Literal(...templates.map(({ id }) => id)).pipe(Schema.annotations({ title: "Template" }), Schema.optional)
|
|
76
|
-
});
|
|
77
|
-
var NotebookProps = Schema.Struct({ name: Schema.optional(Schema.String) });
|
|
78
|
-
var CreateScript = Operation.make({
|
|
79
|
-
meta: {
|
|
80
|
-
key: makeKey("createScript"),
|
|
81
|
-
name: "Create Script",
|
|
82
|
-
icon: "ph--code--regular"
|
|
83
|
-
},
|
|
84
|
-
input: Schema.extend(ScriptProps, Schema.Struct({ db: Database.Database })),
|
|
85
|
-
output: Schema.Struct({ object: Type.getSchema(Script.Script) })
|
|
86
|
-
});
|
|
87
|
-
//#endregion
|
|
88
|
-
export { Notebook_exports as a, ScriptCapabilities_exports as i, ScriptOperation_exports as n, Settings_exports as o, ScriptEvents_exports as r, CreateScript as t };
|
|
89
|
-
|
|
90
|
-
//# sourceMappingURL=chunk-types.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chunk-types.mjs","names":[],"sources":["../../src/types/Settings.ts","../../src/types/Notebook.ts","../../src/types/ScriptCapabilities.ts","../../src/types/ScriptEvents.ts","../../src/types/ScriptOperation.ts"],"sourcesContent":["//\n// Copyright 2023 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Schema from 'effect/Schema';\n\nimport { EditorInputMode } from '@dxos/ui-editor/types';\n\nexport const Settings = Schema.mutable(\n Schema.Struct({\n editorInputMode: EditorInputMode.annotations({\n title: 'Editor input mode',\n description: 'Choose the keybinding style for the script editor.',\n }),\n }),\n);\n\nexport interface Settings extends Schema.Schema.Type<typeof Settings> {}\n","//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Instructions } from '@dxos/compute';\nimport { Annotation, DXN, Obj, Ref, Type } from '@dxos/echo';\nimport { FormInputAnnotation } from '@dxos/echo/Annotation';\nimport { LabelAnnotation } from '@dxos/echo/Annotation';\nimport { Graph } from '@dxos/plugin-explorer';\nimport { Text } from '@dxos/schema';\n\nexport type CellType = 'markdown' | 'script' | 'query' | 'prompt' | 'view';\n\nexport const Cell = Schema.Struct({\n id: Schema.String,\n type: Schema.String,\n name: Schema.optional(Schema.String),\n // TODO(burdon): Union type.\n source: Schema.optional(Ref.Ref(Text.Text)),\n prompt: Schema.optional(Ref.Ref(Instructions.Instructions)),\n graph: Schema.optional(Ref.Ref(Graph.Graph)),\n});\n\nexport type Cell = Schema.Schema.Type<typeof Cell>;\n\nexport class Notebook extends Type.makeObject<Notebook>(DXN.make('org.dxos.type.notebook', '0.1.0'))(\n Schema.Struct({\n name: Schema.String.pipe(Schema.optional),\n cells: Cell.pipe(Schema.Array, FormInputAnnotation.set(false)),\n }).pipe(LabelAnnotation.set(['name']), Annotation.IconAnnotation.set({ icon: 'ph--notebook--regular', hue: 'sky' })),\n) {}\n\nexport const make = (props: Obj.MakeProps<typeof Notebook> = { cells: [] }): Notebook => Obj.make(Notebook, props);\n","//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport { type Atom } from '@effect-atom/atom';\n\nimport { Capability } from '@dxos/app-framework';\n\nimport { meta } from '#meta';\n\nimport { type Compiler as CompilerType } from '../compiler';\n\n// Inline import to avoid `Settings` namespace alias colliding with the\n// `Settings` capability export below.\nexport const Settings = Capability.make<Atom.Writable<import('./Settings').Settings>>(\n `${meta.profile.key}.capability.settings`,\n);\nexport const Compiler = Capability.make<CompilerType>(`${meta.profile.key}.capability.compiler`);\n","//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport { ActivationEvent } from '@dxos/app-framework';\n\nimport { meta } from '#meta';\n\nexport const SetupCompiler = ActivationEvent.make(`${meta.profile.key}.event.setupCompiler`);\n","//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Schema from 'effect/Schema';\n\nimport { Operation, Script } from '@dxos/compute';\nimport { Database, DXN, Type } from '@dxos/echo';\n\nimport { meta } from '#meta';\n\nimport { templates } from '../templates';\n\nconst makeKey = (name: string) => DXN.make(`${meta.profile.key}.operation.${name}`);\n\nexport const ScriptProps = Schema.Struct({\n name: Schema.optional(Schema.String),\n gistUrl: Schema.optional(Schema.String.annotations({ title: 'Import from Gist (url)' })),\n initialTemplateId: Schema.Literal(...templates.map(({ id }) => id)).pipe(\n Schema.annotations({ title: 'Template' }),\n Schema.optional,\n ),\n});\n\nexport const NotebookProps = Schema.Struct({\n name: Schema.optional(Schema.String),\n});\n\nexport const CreateScript = Operation.make({\n meta: { key: makeKey('createScript'), name: 'Create Script', icon: 'ph--code--regular' },\n input: Schema.extend(\n ScriptProps,\n Schema.Struct({\n db: Database.Database,\n }),\n ),\n output: Schema.Struct({\n object: Type.getSchema(Script.Script),\n }),\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAUA,IAAa,aAAW,OAAO,QAC7B,OAAO,OAAO,EACZ,iBAAiB,gBAAgB,YAAY;CAC3C,OAAO;CACP,aAAa;AACf,CAAC,EACH,CAAC,CACH;;;;;;;;ACFA,IAAa,OAAO,OAAO,OAAO;CAChC,IAAI,OAAO;CACX,MAAM,OAAO;CACb,MAAM,OAAO,SAAS,OAAO,MAAM;CAEnC,QAAQ,OAAO,SAAS,IAAI,IAAI,KAAK,IAAI,CAAC;CAC1C,QAAQ,OAAO,SAAS,IAAI,IAAI,aAAa,YAAY,CAAC;CAC1D,OAAO,OAAO,SAAS,IAAI,IAAI,MAAM,KAAK,CAAC;AAC7C,CAAC;AAID,IAAa,WAAb,cAA8B,KAAK,WAAqB,IAAI,KAAK,0BAA0B,OAAO,CAAC,CAAC,CAClG,OAAO,OAAO;CACZ,MAAM,OAAO,OAAO,KAAK,OAAO,QAAQ;CACxC,OAAO,KAAK,KAAK,OAAO,OAAO,oBAAoB,IAAI,KAAK,CAAC;AAC/D,CAAC,CAAC,CAAC,KAAK,gBAAgB,IAAI,CAAC,MAAM,CAAC,GAAG,WAAW,eAAe,IAAI;CAAE,MAAM;CAAyB,KAAK;AAAM,CAAC,CAAC,CACrH,CAAC,CAAC,CAAC;AAEH,IAAa,QAAQ,QAAwC,EAAE,OAAO,CAAC,EAAE,MAAgB,IAAI,KAAK,UAAU,KAAK;;;;;;;AClBjH,IAAa,WAAW,WAAW,KACjC,GAAG,KAAK,QAAQ,IAAI,qBACtB;AACA,IAAa,WAAW,WAAW,KAAmB,GAAG,KAAK,QAAQ,IAAI,qBAAqB;;;;ACT/F,IAAa,gBAAgB,gBAAgB,KAAK,GAAG,KAAK,QAAQ,IAAI,qBAAqB;;;;;;;;ACK3F,IAAM,WAAW,SAAiB,IAAI,KAAK,GAAG,KAAK,QAAQ,IAAI,aAAa,MAAM;AAElF,IAAa,cAAc,OAAO,OAAO;CACvC,MAAM,OAAO,SAAS,OAAO,MAAM;CACnC,SAAS,OAAO,SAAS,OAAO,OAAO,YAAY,EAAE,OAAO,yBAAyB,CAAC,CAAC;CACvF,mBAAmB,OAAO,QAAQ,GAAG,UAAU,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,KAClE,OAAO,YAAY,EAAE,OAAO,WAAW,CAAC,GACxC,OAAO,QACT;AACF,CAAC;AAED,IAAa,gBAAgB,OAAO,OAAO,EACzC,MAAM,OAAO,SAAS,OAAO,MAAM,EACrC,CAAC;AAED,IAAa,eAAe,UAAU,KAAK;CACzC,MAAM;EAAE,KAAK,QAAQ,cAAc;EAAG,MAAM;EAAiB,MAAM;CAAoB;CACvF,OAAO,OAAO,OACZ,aACA,OAAO,OAAO,EACZ,IAAI,SAAS,SACf,CAAC,CACH;CACA,QAAQ,OAAO,OAAO,EACpB,QAAQ,KAAK,UAAU,OAAO,MAAM,EACtC,CAAC;AACH,CAAC"}
|
package/dist/lib/types.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { a as Notebook_exports, i as ScriptCapabilities_exports, n as ScriptOperation_exports, o as Settings_exports, r as ScriptEvents_exports } from "./chunk-types.mjs";
|
|
2
|
-
export { Notebook_exports as Notebook, ScriptCapabilities_exports as ScriptCapabilities, ScriptEvents_exports as ScriptEvents, ScriptOperation_exports as ScriptOperation, Settings_exports as Settings };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export * from './types';
|
|
2
|
-
export * as Notebook from './Notebook';
|
|
3
|
-
export * as ScriptCapabilities from './ScriptCapabilities';
|
|
4
|
-
export * as ScriptEvents from './ScriptEvents';
|
|
5
|
-
export * as ScriptOperation from './ScriptOperation';
|
|
6
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAIA,cAAc,SAAS,CAAC;AAExB,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,kBAAkB,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,eAAe,MAAM,mBAAmB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types/types.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC"}
|
package/src/types/index.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
export * from './types';
|
|
6
|
-
|
|
7
|
-
export * as Notebook from './Notebook';
|
|
8
|
-
export * as ScriptCapabilities from './ScriptCapabilities';
|
|
9
|
-
export * as ScriptEvents from './ScriptEvents';
|
|
10
|
-
export * as ScriptOperation from './ScriptOperation';
|