@dxos/plugin-script 0.6.8-main.046e6cf

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.
Files changed (136) hide show
  1. package/LICENSE +8 -0
  2. package/README.md +4 -0
  3. package/dist/lib/browser/ScriptEditor-6Q7HFLJ6.mjs +220 -0
  4. package/dist/lib/browser/ScriptEditor-6Q7HFLJ6.mjs.map +7 -0
  5. package/dist/lib/browser/TypescriptEditor-HP35MTEQ.mjs +9 -0
  6. package/dist/lib/browser/TypescriptEditor-HP35MTEQ.mjs.map +7 -0
  7. package/dist/lib/browser/chunk-2EM5Y66A.mjs +60 -0
  8. package/dist/lib/browser/chunk-2EM5Y66A.mjs.map +7 -0
  9. package/dist/lib/browser/chunk-EZ7PWOLU.mjs +235 -0
  10. package/dist/lib/browser/chunk-EZ7PWOLU.mjs.map +7 -0
  11. package/dist/lib/browser/chunk-JBACGDOJ.mjs +21 -0
  12. package/dist/lib/browser/chunk-JBACGDOJ.mjs.map +7 -0
  13. package/dist/lib/browser/chunk-Z72YKDJ2.mjs +31 -0
  14. package/dist/lib/browser/chunk-Z72YKDJ2.mjs.map +7 -0
  15. package/dist/lib/browser/edge/index.mjs +19 -0
  16. package/dist/lib/browser/edge/index.mjs.map +7 -0
  17. package/dist/lib/browser/index.mjs +395 -0
  18. package/dist/lib/browser/index.mjs.map +7 -0
  19. package/dist/lib/browser/meta.json +1 -0
  20. package/dist/lib/browser/meta.mjs +9 -0
  21. package/dist/lib/browser/meta.mjs.map +7 -0
  22. package/dist/lib/browser/types/index.mjs +10 -0
  23. package/dist/lib/browser/types/index.mjs.map +7 -0
  24. package/dist/lib/node/ScriptEditor-AIVKL2NX.cjs +239 -0
  25. package/dist/lib/node/ScriptEditor-AIVKL2NX.cjs.map +7 -0
  26. package/dist/lib/node/TypescriptEditor-PWOAN5RQ.cjs +30 -0
  27. package/dist/lib/node/TypescriptEditor-PWOAN5RQ.cjs.map +7 -0
  28. package/dist/lib/node/chunk-4VMNBXWU.cjs +54 -0
  29. package/dist/lib/node/chunk-4VMNBXWU.cjs.map +7 -0
  30. package/dist/lib/node/chunk-6Y2S6SGK.cjs +49 -0
  31. package/dist/lib/node/chunk-6Y2S6SGK.cjs.map +7 -0
  32. package/dist/lib/node/chunk-LWUBFTPA.cjs +253 -0
  33. package/dist/lib/node/chunk-LWUBFTPA.cjs.map +7 -0
  34. package/dist/lib/node/chunk-SLV3SDZE.cjs +93 -0
  35. package/dist/lib/node/chunk-SLV3SDZE.cjs.map +7 -0
  36. package/dist/lib/node/edge/index.cjs +41 -0
  37. package/dist/lib/node/edge/index.cjs.map +7 -0
  38. package/dist/lib/node/index.cjs +417 -0
  39. package/dist/lib/node/index.cjs.map +7 -0
  40. package/dist/lib/node/meta.cjs +30 -0
  41. package/dist/lib/node/meta.cjs.map +7 -0
  42. package/dist/lib/node/meta.json +1 -0
  43. package/dist/lib/node/types/index.cjs +32 -0
  44. package/dist/lib/node/types/index.cjs.map +7 -0
  45. package/dist/types/src/ScriptPlugin.d.ts +7 -0
  46. package/dist/types/src/ScriptPlugin.d.ts.map +1 -0
  47. package/dist/types/src/compiler/compiler.d.ts +38 -0
  48. package/dist/types/src/compiler/compiler.d.ts.map +1 -0
  49. package/dist/types/src/compiler/compiler.test.d.ts +2 -0
  50. package/dist/types/src/compiler/compiler.test.d.ts.map +1 -0
  51. package/dist/types/src/compiler/index.d.ts +2 -0
  52. package/dist/types/src/compiler/index.d.ts.map +1 -0
  53. package/dist/types/src/components/ScriptBlock/FrameContainer/FrameContainer.d.ts +12 -0
  54. package/dist/types/src/components/ScriptBlock/FrameContainer/FrameContainer.d.ts.map +1 -0
  55. package/dist/types/src/components/ScriptBlock/FrameContainer/frame.d.ts +2 -0
  56. package/dist/types/src/components/ScriptBlock/FrameContainer/frame.d.ts.map +1 -0
  57. package/dist/types/src/components/ScriptBlock/FrameContainer/index.d.ts +2 -0
  58. package/dist/types/src/components/ScriptBlock/FrameContainer/index.d.ts.map +1 -0
  59. package/dist/types/src/components/ScriptBlock/ScriptBlock.d.ts +18 -0
  60. package/dist/types/src/components/ScriptBlock/ScriptBlock.d.ts.map +1 -0
  61. package/dist/types/src/components/ScriptBlock/ScriptBlock.stories.d.ts +14 -0
  62. package/dist/types/src/components/ScriptBlock/ScriptBlock.stories.d.ts.map +1 -0
  63. package/dist/types/src/components/ScriptBlock/Splitter/Splitter.d.ts +15 -0
  64. package/dist/types/src/components/ScriptBlock/Splitter/Splitter.d.ts.map +1 -0
  65. package/dist/types/src/components/ScriptBlock/Splitter/Splitter.stories.d.ts +13 -0
  66. package/dist/types/src/components/ScriptBlock/Splitter/Splitter.stories.d.ts.map +1 -0
  67. package/dist/types/src/components/ScriptBlock/Splitter/index.d.ts +2 -0
  68. package/dist/types/src/components/ScriptBlock/Splitter/index.d.ts.map +1 -0
  69. package/dist/types/src/components/ScriptBlock/index.d.ts +2 -0
  70. package/dist/types/src/components/ScriptBlock/index.d.ts.map +1 -0
  71. package/dist/types/src/components/ScriptEditor.d.ts +9 -0
  72. package/dist/types/src/components/ScriptEditor.d.ts.map +1 -0
  73. package/dist/types/src/components/Toolbar.d.ts +11 -0
  74. package/dist/types/src/components/Toolbar.d.ts.map +1 -0
  75. package/dist/types/src/components/Toolbar.stories.d.ts +16 -0
  76. package/dist/types/src/components/Toolbar.stories.d.ts.map +1 -0
  77. package/dist/types/src/components/TypescriptEditor.d.ts +10 -0
  78. package/dist/types/src/components/TypescriptEditor.d.ts.map +1 -0
  79. package/dist/types/src/components/TypescriptEditor.stories.d.ts +13 -0
  80. package/dist/types/src/components/TypescriptEditor.stories.d.ts.map +1 -0
  81. package/dist/types/src/components/index.d.ts +4 -0
  82. package/dist/types/src/components/index.d.ts.map +1 -0
  83. package/dist/types/src/edge/codec.d.ts +4 -0
  84. package/dist/types/src/edge/codec.d.ts.map +1 -0
  85. package/dist/types/src/edge/functions.d.ts +23 -0
  86. package/dist/types/src/edge/functions.d.ts.map +1 -0
  87. package/dist/types/src/edge/header-codec.d.ts +24 -0
  88. package/dist/types/src/edge/header-codec.d.ts.map +1 -0
  89. package/dist/types/src/edge/hub-protocol.d.ts +6 -0
  90. package/dist/types/src/edge/hub-protocol.d.ts.map +1 -0
  91. package/dist/types/src/edge/index.d.ts +5 -0
  92. package/dist/types/src/edge/index.d.ts.map +1 -0
  93. package/dist/types/src/index.d.ts +7 -0
  94. package/dist/types/src/index.d.ts.map +1 -0
  95. package/dist/types/src/meta.d.ts +15 -0
  96. package/dist/types/src/meta.d.ts.map +1 -0
  97. package/dist/types/src/translations.d.ts +19 -0
  98. package/dist/types/src/translations.d.ts.map +1 -0
  99. package/dist/types/src/types/index.d.ts +3 -0
  100. package/dist/types/src/types/index.d.ts.map +1 -0
  101. package/dist/types/src/types/script.d.ts +26 -0
  102. package/dist/types/src/types/script.d.ts.map +1 -0
  103. package/dist/types/src/types/types.d.ts +8 -0
  104. package/dist/types/src/types/types.d.ts.map +1 -0
  105. package/package.json +120 -0
  106. package/src/ScriptPlugin.tsx +137 -0
  107. package/src/compiler/compiler.test.ts +17 -0
  108. package/src/compiler/compiler.ts +210 -0
  109. package/src/compiler/index.ts +5 -0
  110. package/src/components/ScriptBlock/FrameContainer/FrameContainer.tsx +82 -0
  111. package/src/components/ScriptBlock/FrameContainer/frame.html +25 -0
  112. package/src/components/ScriptBlock/FrameContainer/frame.tsx +51 -0
  113. package/src/components/ScriptBlock/FrameContainer/index.ts +5 -0
  114. package/src/components/ScriptBlock/ScriptBlock.stories.tsx +64 -0
  115. package/src/components/ScriptBlock/ScriptBlock.tsx +132 -0
  116. package/src/components/ScriptBlock/Splitter/Splitter.stories.tsx +37 -0
  117. package/src/components/ScriptBlock/Splitter/Splitter.tsx +52 -0
  118. package/src/components/ScriptBlock/Splitter/index.ts +5 -0
  119. package/src/components/ScriptBlock/index.ts +5 -0
  120. package/src/components/ScriptEditor.tsx +113 -0
  121. package/src/components/Toolbar.stories.tsx +19 -0
  122. package/src/components/Toolbar.tsx +163 -0
  123. package/src/components/TypescriptEditor.stories.tsx +63 -0
  124. package/src/components/TypescriptEditor.tsx +66 -0
  125. package/src/components/index.ts +8 -0
  126. package/src/edge/codec.ts +13 -0
  127. package/src/edge/functions.ts +128 -0
  128. package/src/edge/header-codec.ts +97 -0
  129. package/src/edge/hub-protocol.ts +27 -0
  130. package/src/edge/index.ts +10 -0
  131. package/src/index.ts +13 -0
  132. package/src/meta.tsx +19 -0
  133. package/src/translations.ts +25 -0
  134. package/src/types/index.ts +6 -0
  135. package/src/types/script.ts +16 -0
  136. package/src/types/types.tsx +27 -0
@@ -0,0 +1,128 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+
5
+ import { type DID } from 'iso-did/types';
6
+
7
+ import { Trigger } from '@dxos/async';
8
+ import { type Config } from '@dxos/client';
9
+ import { type Halo } from '@dxos/client-protocol';
10
+ import { type ObjectMeta } from '@dxos/echo-schema';
11
+ import { invariant } from '@dxos/invariant';
12
+ import { log } from '@dxos/log';
13
+ import { type Credential } from '@dxos/protocols/proto/dxos/halo/credentials';
14
+
15
+ import { codec } from './codec';
16
+ import { matchServiceCredential } from './hub-protocol';
17
+
18
+ // TODO: use URL scheme for source?
19
+ const USERFUNCTIONS_META_KEY = 'dxos.org/service/function';
20
+ const USERFUNCTIONS_CREDENTIAL_CAPABILITY = 'composer:beta';
21
+
22
+ // TODO: Synchronize API types with server
23
+ export type UserFunctionUploadResult = {
24
+ result: 'success' | 'error';
25
+ errorMessage?: string;
26
+ functionId?: string;
27
+ functionVersionNumber?: number;
28
+ };
29
+
30
+ export type UploadWorkerProps = {
31
+ clientConfig: Config;
32
+ halo: Halo;
33
+ name?: string;
34
+ source: string;
35
+ functionId?: string;
36
+ ownerDid: DID;
37
+ credentialLoadTimeout?: number; // ms to wait for credentials to load
38
+ };
39
+
40
+ const defaultUserFunctionsBaseUrl = 'http://localhost:8600';
41
+ // const userFunctionsBaseUrl = 'https://functions-nftest.dxos.workers.dev';
42
+
43
+ const getBaseUrl = (config: Config) => {
44
+ return config.get('runtime.app.env.DX_USERFUNCTIONS_BASE_URL') || defaultUserFunctionsBaseUrl;
45
+ };
46
+
47
+ export const uploadWorkerFunction = async ({
48
+ clientConfig,
49
+ halo,
50
+ name,
51
+ source,
52
+ ownerDid,
53
+ functionId,
54
+ credentialLoadTimeout,
55
+ }: UploadWorkerProps) => {
56
+ const identity = halo.identity.get();
57
+ if (!identity) {
58
+ throw new Error('Identity not available');
59
+ }
60
+ const userFunctionsBaseUrl = getBaseUrl(clientConfig);
61
+
62
+ // TODO: codify naming convention
63
+ const uploadUrl = `${userFunctionsBaseUrl}/${ownerDid}` + (functionId ? `/${functionId}` : '');
64
+
65
+ log('Upload', { functionId, source, name, identityKey: identity.identityKey, uploadUrl: uploadUrl.toString() });
66
+ const response = await fetch(uploadUrl, {
67
+ method: 'PUT',
68
+ body: JSON.stringify({ script: source, name }),
69
+ headers: await presentationForIdentity({ halo, timeout: credentialLoadTimeout }),
70
+ });
71
+ if (!response.ok) {
72
+ return (await response.json()) as UserFunctionUploadResult;
73
+ }
74
+
75
+ const res = await response.json();
76
+ log('Upload response', { status: response.status, res });
77
+
78
+ return res as UserFunctionUploadResult;
79
+ };
80
+
81
+ export const getUserFunctionUrlInMetadata = (meta: ObjectMeta) => {
82
+ return meta.keys.find((key) => key.source === USERFUNCTIONS_META_KEY)?.id;
83
+ };
84
+
85
+ export const setUserFunctionUrlInMetadata = (meta: ObjectMeta, functionUrl: string) => {
86
+ const key = meta.keys.find((key) => key.source === USERFUNCTIONS_META_KEY);
87
+ if (key) {
88
+ if (key.id !== functionUrl) {
89
+ throw new Error('Metadata mismatch');
90
+ }
91
+ } else {
92
+ meta.keys.push({ source: USERFUNCTIONS_META_KEY, id: functionUrl });
93
+ }
94
+ };
95
+
96
+ // TODO: handle team owner
97
+
98
+ const presentationForIdentity = async ({ halo, timeout }: { halo: Halo; timeout?: number }) => {
99
+ let credential: Credential | undefined;
100
+
101
+ if (timeout) {
102
+ const credentialsLoaded = new Trigger();
103
+ halo.credentials.subscribe((c) => {
104
+ credential = c.find(matchServiceCredential([USERFUNCTIONS_CREDENTIAL_CAPABILITY]));
105
+ if (credential) {
106
+ credentialsLoaded.wake();
107
+ }
108
+ });
109
+ await credentialsLoaded.wait({
110
+ timeout,
111
+ });
112
+ } else {
113
+ credential = halo
114
+ .queryCredentials()
115
+ .toSorted((a, b) => b.issuanceDate.getTime() - a.issuanceDate.getTime())
116
+ .find(matchServiceCredential([USERFUNCTIONS_CREDENTIAL_CAPABILITY]));
117
+ }
118
+
119
+ if (!credential) {
120
+ throw new Error('No credential found');
121
+ }
122
+ log('credential found', { credential });
123
+ // TODO(wittjosiah): If id is required to present credentials, then it should always be present for queried credentials.
124
+ invariant(credential.id, 'beta credential missing id');
125
+ const presentation = await halo.presentCredentials({ ids: [credential.id] });
126
+
127
+ return { Authorization: `Bearer ${codec.encode(presentation)}` };
128
+ };
@@ -0,0 +1,97 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+
5
+ // TODO(burdon): Factor out from @dxos/hub-protocol
6
+
7
+ const ENCODING = 'base64';
8
+
9
+ export type EncodedKey = { __k: string };
10
+
11
+ export type EncodedBytes = { __b: string };
12
+
13
+ export type EncodedTimestamp = { __t: number };
14
+
15
+ export interface KeyCodec<KeyType> {
16
+ isKey(value: any): value is KeyType;
17
+ encode(key: KeyType): EncodedKey;
18
+ decode(value: EncodedKey): KeyType;
19
+ }
20
+
21
+ // TODO(wittjosiah): Use deepMapValues from @dxos/util -- it handles recursion for you.
22
+ export class HeaderCodec<Key> {
23
+ constructor(private readonly _keyCodec: KeyCodec<Key>) {}
24
+
25
+ encode(obj: any): string {
26
+ const objectToEncode = this._prepareForEncoding(obj);
27
+ const encoded = Buffer.from(JSON.stringify(objectToEncode));
28
+ return encoded.toString(ENCODING);
29
+ }
30
+
31
+ decode<Type>(buffer: string): Type {
32
+ const json = JSON.parse(Buffer.from(buffer, ENCODING).toString());
33
+ return this._decodeRecursive(json);
34
+ }
35
+
36
+ private _decodeRecursive(obj: any): any {
37
+ return this._recurse(obj, (value) => {
38
+ if (isEncodedBytes(value)) {
39
+ return decodeBytes(value.__b);
40
+ }
41
+ if (isEncodedKey(value)) {
42
+ return this._keyCodec.decode(value);
43
+ }
44
+ if (isEncodedDate(value)) {
45
+ return decodeDate(value);
46
+ }
47
+ return null;
48
+ });
49
+ }
50
+
51
+ private _prepareForEncoding(obj: any): any {
52
+ return this._recurse(obj, (value) => {
53
+ if (value instanceof Uint8Array) {
54
+ return { __b: encodeBytes(value) };
55
+ }
56
+ if (this._keyCodec.isKey(value)) {
57
+ return this._keyCodec.encode(value);
58
+ }
59
+ if (value instanceof Date) {
60
+ return encodeDate(value);
61
+ }
62
+ return null;
63
+ });
64
+ }
65
+
66
+ private _recurse(obj: any, handler: (obj: object) => any | null): any {
67
+ if (typeof obj !== 'object') {
68
+ return obj;
69
+ }
70
+ const handled = handler(obj);
71
+ if (handled != null) {
72
+ return handled;
73
+ }
74
+ if (Array.isArray(obj)) {
75
+ const result = [];
76
+ for (const elem of obj) {
77
+ result.push(this._recurse(elem, handler));
78
+ }
79
+ return result;
80
+ }
81
+ const result: any = {};
82
+ for (const [key, value] of Object.entries(obj)) {
83
+ result[key] = this._recurse(value, handler);
84
+ }
85
+ return result;
86
+ }
87
+ }
88
+
89
+ const isEncodedKey = (obj: object): obj is EncodedKey => '__k' in obj && typeof obj.__k === 'string';
90
+ const isEncodedBytes = (obj: object): obj is EncodedBytes => '__b' in obj && typeof obj.__b === 'string';
91
+ const isEncodedDate = (obj: object): obj is EncodedTimestamp => '__t' in obj && typeof obj.__t === 'number';
92
+
93
+ const encodeDate = (date: Date) => ({ __t: date.getTime() });
94
+ const decodeDate = (timestamp: EncodedTimestamp) => new Date(timestamp.__t);
95
+
96
+ const encodeBytes = (bytes: Uint8Array) => Buffer.from(bytes).toString(ENCODING);
97
+ const decodeBytes = (bytes: string) => Buffer.from(bytes, ENCODING);
@@ -0,0 +1,27 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+
5
+ import { type DID } from 'iso-did/types';
6
+
7
+ import { type Credential } from '@dxos/client/halo';
8
+ import { type PublicKey } from '@dxos/keys';
9
+
10
+ // TODO(burdon): Factor out to @dxos/hub-protocol.
11
+
12
+ export const matchServiceCredential =
13
+ (capabilities: string[] = []) =>
14
+ (credential: Credential) => {
15
+ if (credential.subject.assertion['@type'] !== 'dxos.halo.credentials.ServiceAccess') {
16
+ return false;
17
+ }
18
+
19
+ const { capabilities: credentialCapabilities } = credential.subject.assertion;
20
+ return capabilities.every((capability) => credentialCapabilities.includes(capability));
21
+ };
22
+
23
+ // TODO: reconcile with @dxos/hub-protocol
24
+
25
+ export const publicKeyToDid = (key: PublicKey): DID => {
26
+ return `did:key:${key.toHex()}`;
27
+ };
@@ -0,0 +1,10 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+
5
+ // TODO(wittjosiah): Factor out.
6
+
7
+ export * from './codec';
8
+ export * from './functions';
9
+ export * from './header-codec';
10
+ export * from './hub-protocol';
package/src/index.ts ADDED
@@ -0,0 +1,13 @@
1
+ //
2
+ // Copyright 2023 DXOS.org
3
+ //
4
+
5
+ import { ScriptPlugin } from './ScriptPlugin';
6
+
7
+ export default ScriptPlugin;
8
+
9
+ export * from './compiler';
10
+ export * from './components';
11
+ export * from './types';
12
+
13
+ export * from './ScriptPlugin';
package/src/meta.tsx ADDED
@@ -0,0 +1,19 @@
1
+ //
2
+ // Copyright 2023 DXOS.org
3
+ //
4
+
5
+ import { Code, type IconProps } from '@phosphor-icons/react';
6
+ import React from 'react';
7
+
8
+ import { pluginMeta } from '@dxos/app-framework';
9
+
10
+ export const SCRIPT_PLUGIN = 'dxos.org/plugin/script';
11
+
12
+ export default pluginMeta({
13
+ id: SCRIPT_PLUGIN,
14
+ name: 'Scripts',
15
+ description: 'Live code notebooks.',
16
+ tags: ['experimental'],
17
+ iconComponent: (props: IconProps) => <Code {...props} />,
18
+ iconSymbol: 'ph--code--regular',
19
+ });
@@ -0,0 +1,25 @@
1
+ //
2
+ // Copyright 2023 DXOS.org
3
+ //
4
+
5
+ import { SCRIPT_PLUGIN } from './meta';
6
+
7
+ export default [
8
+ {
9
+ 'en-US': {
10
+ [SCRIPT_PLUGIN]: {
11
+ 'plugin name': 'Scripts',
12
+ 'object title placeholder': 'New script',
13
+ 'create object label': 'Create script',
14
+ 'create stack section label': 'Create script',
15
+ 'binding label': 'Binding',
16
+ 'binding placeholder': 'Enter binding',
17
+ 'edit binding label': 'Edit binding',
18
+ 'deploy label': 'Deploy',
19
+ 'deployed label': 'Current version of the script is deployed',
20
+ 'upload failed label': 'Upload failed',
21
+ 'copy link label': 'Copy function link',
22
+ },
23
+ },
24
+ },
25
+ ];
@@ -0,0 +1,6 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+
5
+ export * from './script';
6
+ export * from './types';
@@ -0,0 +1,16 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+
5
+ import { ref, S, TypedObject } from '@dxos/echo-schema';
6
+ import { TextType } from '@dxos/plugin-markdown/types';
7
+
8
+ export class ScriptType extends TypedObject({ typename: 'dxos.org/type/Script', version: '0.1.0' })({
9
+ name: S.optional(S.String),
10
+ source: ref(TextType),
11
+
12
+ // Local binding to a function name.
13
+ binding: S.optional(S.String),
14
+ // Whether source has changed since last deploy.
15
+ changed: S.optional(S.Boolean),
16
+ }) {}
@@ -0,0 +1,27 @@
1
+ //
2
+ // Copyright 2023 DXOS.org
3
+ //
4
+
5
+ import type {
6
+ GraphBuilderProvides,
7
+ IntentResolverProvides,
8
+ MetadataRecordsProvides,
9
+ SurfaceProvides,
10
+ TranslationsProvides,
11
+ } from '@dxos/app-framework';
12
+ import { type SchemaProvides } from '@dxos/plugin-client';
13
+ import type { StackProvides } from '@dxos/plugin-stack';
14
+
15
+ import { SCRIPT_PLUGIN } from '../meta';
16
+
17
+ export enum ScriptAction {
18
+ CREATE = `${SCRIPT_PLUGIN}/create`,
19
+ }
20
+
21
+ export type ScriptPluginProvides = SurfaceProvides &
22
+ IntentResolverProvides &
23
+ GraphBuilderProvides &
24
+ MetadataRecordsProvides &
25
+ TranslationsProvides &
26
+ SchemaProvides &
27
+ StackProvides;