@dxos/plugin-script 0.7.1 → 0.7.2-main.f1adc9f

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 (75) hide show
  1. package/dist/lib/browser/{AutomationPanel-RYJJQ5QX.mjs → AutomationPanel-ELXXAKW4.mjs} +15 -10
  2. package/dist/lib/browser/AutomationPanel-ELXXAKW4.mjs.map +7 -0
  3. package/dist/lib/browser/{ScriptContainer-RLBVHRCW.mjs → ScriptContainer-IC67ILI2.mjs} +9 -12
  4. package/dist/lib/browser/ScriptContainer-IC67ILI2.mjs.map +7 -0
  5. package/dist/lib/browser/{chunk-VEW5BERN.mjs → chunk-DTVOXLPP.mjs} +9 -9
  6. package/dist/lib/browser/chunk-DTVOXLPP.mjs.map +7 -0
  7. package/dist/lib/browser/{chunk-NCZUJKJE.mjs → chunk-K7KY6YMG.mjs} +14 -10
  8. package/dist/lib/browser/chunk-K7KY6YMG.mjs.map +7 -0
  9. package/dist/lib/browser/{chunk-5GGRYRS4.mjs → chunk-KSIPC365.mjs} +17 -6
  10. package/dist/lib/browser/{chunk-5GGRYRS4.mjs.map → chunk-KSIPC365.mjs.map} +3 -3
  11. package/dist/lib/browser/edge/index.mjs +1 -1
  12. package/dist/lib/browser/index.mjs +4 -4
  13. package/dist/lib/browser/meta.json +1 -1
  14. package/dist/lib/browser/types/index.mjs +1 -1
  15. package/dist/lib/node/{AutomationPanel-3B5AGQQV.cjs → AutomationPanel-RCEBTDK7.cjs} +19 -16
  16. package/dist/lib/node/AutomationPanel-RCEBTDK7.cjs.map +7 -0
  17. package/dist/lib/node/{ScriptContainer-7VX44TH6.cjs → ScriptContainer-MRZXOY42.cjs} +22 -25
  18. package/dist/lib/node/ScriptContainer-MRZXOY42.cjs.map +7 -0
  19. package/dist/lib/node/{chunk-XS6GEYYH.cjs → chunk-2WF3LLHC.cjs} +20 -9
  20. package/dist/lib/node/{chunk-XS6GEYYH.cjs.map → chunk-2WF3LLHC.cjs.map} +3 -3
  21. package/dist/lib/node/{chunk-BJ4WIWCP.cjs → chunk-4INUJLXL.cjs} +16 -12
  22. package/dist/lib/node/chunk-4INUJLXL.cjs.map +7 -0
  23. package/dist/lib/node/{chunk-XJOH225K.cjs → chunk-T4PYTKIW.cjs} +12 -12
  24. package/dist/lib/node/chunk-T4PYTKIW.cjs.map +7 -0
  25. package/dist/lib/node/edge/index.cjs +10 -10
  26. package/dist/lib/node/edge/index.cjs.map +1 -1
  27. package/dist/lib/node/index.cjs +21 -21
  28. package/dist/lib/node/meta.json +1 -1
  29. package/dist/lib/node/types/index.cjs +4 -4
  30. package/dist/lib/node/types/index.cjs.map +1 -1
  31. package/dist/lib/node-esm/{AutomationPanel-EEGLOILM.mjs → AutomationPanel-QFKOZXLO.mjs} +15 -10
  32. package/dist/lib/node-esm/AutomationPanel-QFKOZXLO.mjs.map +7 -0
  33. package/dist/lib/node-esm/{ScriptContainer-NGYXDSLQ.mjs → ScriptContainer-A4A663FM.mjs} +9 -12
  34. package/dist/lib/node-esm/ScriptContainer-A4A663FM.mjs.map +7 -0
  35. package/dist/lib/node-esm/{chunk-P7ULFJ4T.mjs → chunk-2HYWFUEN.mjs} +9 -9
  36. package/dist/lib/node-esm/chunk-2HYWFUEN.mjs.map +7 -0
  37. package/dist/lib/node-esm/{chunk-V74XKPLC.mjs → chunk-4QWC64VN.mjs} +17 -6
  38. package/dist/lib/node-esm/{chunk-V74XKPLC.mjs.map → chunk-4QWC64VN.mjs.map} +3 -3
  39. package/dist/lib/node-esm/{chunk-DXWSRDEN.mjs → chunk-OFYGBUNI.mjs} +14 -10
  40. package/dist/lib/node-esm/chunk-OFYGBUNI.mjs.map +7 -0
  41. package/dist/lib/node-esm/edge/index.mjs +1 -1
  42. package/dist/lib/node-esm/index.mjs +4 -4
  43. package/dist/lib/node-esm/meta.json +1 -1
  44. package/dist/lib/node-esm/types/index.mjs +1 -1
  45. package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts +3 -3
  46. package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts.map +1 -1
  47. package/dist/types/src/components/DebugPanel/DebugPanel.d.ts.map +1 -1
  48. package/dist/types/src/components/ScriptBlock/ScriptBlock.d.ts +1 -5
  49. package/dist/types/src/components/ScriptBlock/ScriptBlock.d.ts.map +1 -1
  50. package/dist/types/src/components/ScriptBlock/ScriptBlock.stories.d.ts.map +1 -1
  51. package/dist/types/src/components/ScriptEditor.d.ts.map +1 -1
  52. package/dist/types/src/edge/functions.d.ts.map +1 -1
  53. package/dist/types/src/types/schema.d.ts +8 -8
  54. package/dist/types/src/types/schema.d.ts.map +1 -1
  55. package/package.json +35 -36
  56. package/src/components/AutomationPanel/AutomationPanel.tsx +10 -7
  57. package/src/components/DebugPanel/DebugPanel.tsx +41 -30
  58. package/src/components/ScriptBlock/ScriptBlock.stories.tsx +5 -25
  59. package/src/components/ScriptBlock/ScriptBlock.tsx +3 -8
  60. package/src/components/ScriptEditor.tsx +4 -3
  61. package/src/components/TypescriptEditor/TypescriptEditor.tsx +1 -1
  62. package/src/edge/functions.ts +12 -1
  63. package/src/types/schema.ts +10 -6
  64. package/dist/lib/browser/AutomationPanel-RYJJQ5QX.mjs.map +0 -7
  65. package/dist/lib/browser/ScriptContainer-RLBVHRCW.mjs.map +0 -7
  66. package/dist/lib/browser/chunk-NCZUJKJE.mjs.map +0 -7
  67. package/dist/lib/browser/chunk-VEW5BERN.mjs.map +0 -7
  68. package/dist/lib/node/AutomationPanel-3B5AGQQV.cjs.map +0 -7
  69. package/dist/lib/node/ScriptContainer-7VX44TH6.cjs.map +0 -7
  70. package/dist/lib/node/chunk-BJ4WIWCP.cjs.map +0 -7
  71. package/dist/lib/node/chunk-XJOH225K.cjs.map +0 -7
  72. package/dist/lib/node-esm/AutomationPanel-EEGLOILM.mjs.map +0 -7
  73. package/dist/lib/node-esm/ScriptContainer-NGYXDSLQ.mjs.map +0 -7
  74. package/dist/lib/node-esm/chunk-DXWSRDEN.mjs.map +0 -7
  75. package/dist/lib/node-esm/chunk-P7ULFJ4T.mjs.map +0 -7
@@ -115,7 +115,18 @@ var defaultUserFunctionsBaseUrl = "https://edge-main.dxos.workers.dev/functions"
115
115
  var getBaseUrl = (config) => {
116
116
  if (config.values.runtime?.services?.edge?.url) {
117
117
  const url = new URL("/functions", config.values.runtime?.services?.edge?.url);
118
- url.protocol = "https";
118
+ switch (url.protocol) {
119
+ case "http:":
120
+ case "ws:":
121
+ url.protocol = "http";
122
+ break;
123
+ case "https:":
124
+ case "wss:":
125
+ url.protocol = "https";
126
+ break;
127
+ default:
128
+ throw new Error(`Invalid protocol: ${url.protocol}`);
129
+ }
119
130
  return url.toString();
120
131
  } else {
121
132
  return defaultUserFunctionsBaseUrl;
@@ -136,7 +147,7 @@ var uploadWorkerFunction = async ({ clientConfig, halo, name, source, ownerDid,
136
147
  uploadUrl: uploadUrl.toString()
137
148
  }, {
138
149
  F: __dxlog_file,
139
- L: 76,
150
+ L: 87,
140
151
  S: void 0,
141
152
  C: (f, a) => f(...a)
142
153
  });
@@ -160,7 +171,7 @@ var uploadWorkerFunction = async ({ clientConfig, halo, name, source, ownerDid,
160
171
  res
161
172
  }, {
162
173
  F: __dxlog_file,
163
- L: 87,
174
+ L: 98,
164
175
  S: void 0,
165
176
  C: (f, a) => f(...a)
166
177
  });
@@ -209,13 +220,13 @@ var presentationForIdentity = async ({ halo, timeout }) => {
209
220
  credential
210
221
  }, {
211
222
  F: __dxlog_file,
212
- L: 133,
223
+ L: 144,
213
224
  S: void 0,
214
225
  C: (f, a) => f(...a)
215
226
  });
216
227
  invariant(credential.id, "beta credential missing id", {
217
228
  F: __dxlog_file,
218
- L: 135,
229
+ L: 146,
219
230
  S: void 0,
220
231
  A: [
221
232
  "credential.id",
@@ -252,4 +263,4 @@ export {
252
263
  setUserFunctionUrlInMetadata,
253
264
  getInvocationUrl
254
265
  };
255
- //# sourceMappingURL=chunk-V74XKPLC.mjs.map
266
+ //# sourceMappingURL=chunk-4QWC64VN.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/edge/codec.ts", "../../../src/edge/header-codec.ts", "../../../src/edge/functions.ts", "../../../src/edge/hub-protocol.ts"],
4
- "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { PublicKey } from '@dxos/keys';\n\nimport { HeaderCodec, type EncodedKey } from './header-codec';\n\nexport const codec = new HeaderCodec<PublicKey>({\n isKey: (value: any): value is PublicKey => value instanceof PublicKey,\n encode: (key: PublicKey): EncodedKey => ({ __k: key.toHex() }),\n decode: (value: EncodedKey): PublicKey => PublicKey.fromHex(value.__k),\n});\n", "//\n// Copyright 2024 DXOS.org\n//\n\n// TODO(burdon): Factor out from @dxos/hub-protocol\n\nconst ENCODING = 'base64';\n\nexport type EncodedKey = { __k: string };\n\nexport type EncodedBytes = { __b: string };\n\nexport type EncodedTimestamp = { __t: number };\n\nexport interface KeyCodec<KeyType> {\n isKey(value: any): value is KeyType;\n encode(key: KeyType): EncodedKey;\n decode(value: EncodedKey): KeyType;\n}\n\n// TODO(wittjosiah): Use deepMapValues from @dxos/util -- it handles recursion for you.\nexport class HeaderCodec<Key> {\n constructor(private readonly _keyCodec: KeyCodec<Key>) {}\n\n encode(obj: any): string {\n const objectToEncode = this._prepareForEncoding(obj);\n const encoded = Buffer.from(JSON.stringify(objectToEncode));\n return encoded.toString(ENCODING);\n }\n\n decode<Type>(buffer: string): Type {\n const json = JSON.parse(Buffer.from(buffer, ENCODING).toString());\n return this._decodeRecursive(json);\n }\n\n private _decodeRecursive(obj: any): any {\n return this._recurse(obj, (value) => {\n if (isEncodedBytes(value)) {\n return decodeBytes(value.__b);\n }\n if (isEncodedKey(value)) {\n return this._keyCodec.decode(value);\n }\n if (isEncodedDate(value)) {\n return decodeDate(value);\n }\n return null;\n });\n }\n\n private _prepareForEncoding(obj: any): any {\n return this._recurse(obj, (value) => {\n if (value instanceof Uint8Array) {\n return { __b: encodeBytes(value) };\n }\n if (this._keyCodec.isKey(value)) {\n return this._keyCodec.encode(value);\n }\n if (value instanceof Date) {\n return encodeDate(value);\n }\n return null;\n });\n }\n\n private _recurse(obj: any, handler: (obj: object) => any | null): any {\n if (typeof obj !== 'object') {\n return obj;\n }\n const handled = handler(obj);\n if (handled != null) {\n return handled;\n }\n if (Array.isArray(obj)) {\n const result = [];\n for (const elem of obj) {\n result.push(this._recurse(elem, handler));\n }\n return result;\n }\n const result: any = {};\n for (const [key, value] of Object.entries(obj)) {\n result[key] = this._recurse(value, handler);\n }\n return result;\n }\n}\n\nconst isEncodedKey = (obj: object): obj is EncodedKey => '__k' in obj && typeof obj.__k === 'string';\nconst isEncodedBytes = (obj: object): obj is EncodedBytes => '__b' in obj && typeof obj.__b === 'string';\nconst isEncodedDate = (obj: object): obj is EncodedTimestamp => '__t' in obj && typeof obj.__t === 'number';\n\nconst encodeDate = (date: Date) => ({ __t: date.getTime() });\nconst decodeDate = (timestamp: EncodedTimestamp) => new Date(timestamp.__t);\n\nconst encodeBytes = (bytes: Uint8Array) => Buffer.from(bytes).toString(ENCODING);\nconst decodeBytes = (bytes: string) => Buffer.from(bytes, ENCODING);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { type DID } from 'iso-did/types';\n\nimport { Trigger } from '@dxos/async';\nimport { type Config } from '@dxos/client';\nimport { type Halo } from '@dxos/client-protocol';\nimport { type JsonSchemaType, type ObjectMeta } from '@dxos/echo-schema';\nimport { invariant } from '@dxos/invariant';\nimport type { SpaceId } from '@dxos/keys';\nimport { log } from '@dxos/log';\nimport { type Credential } from '@dxos/protocols/proto/dxos/halo/credentials';\n\nimport { codec } from './codec';\nimport { matchServiceCredential } from './hub-protocol';\n\n// TODO: use URL scheme for source?\nconst USERFUNCTIONS_META_KEY = 'dxos.org/service/function';\nexport const USERFUNCTIONS_PRESET_META_KEY = 'dxos.org/service/function-preset';\nconst USERFUNCTIONS_CREDENTIAL_CAPABILITY = 'composer:beta';\n\n// TODO: Synchronize API types with server\nexport type UserFunctionUploadResult = {\n result: 'success' | 'error';\n errorMessage?: string;\n functionId?: string;\n functionVersionNumber?: number;\n meta: {\n inputSchema?: JsonSchemaType;\n };\n};\n\nexport type UploadWorkerProps = {\n clientConfig: Config;\n halo: Halo;\n name?: string;\n source: string;\n functionId?: string;\n ownerDid: DID;\n credentialLoadTimeout?: number; // ms to wait for credentials to load\n};\n\n// TODO(burdon): Config.\nconst defaultUserFunctionsBaseUrl = 'https://edge-main.dxos.workers.dev/functions'; // 'http://localhost:8600';\n\nconst getBaseUrl = (config: Config) => {\n if (config.values.runtime?.services?.edge?.url) {\n const url = new URL('/functions', config.values.runtime?.services?.edge?.url);\n url.protocol = 'https';\n return url.toString();\n } else {\n return defaultUserFunctionsBaseUrl;\n }\n};\n\nexport const uploadWorkerFunction = async ({\n clientConfig,\n halo,\n name,\n source,\n ownerDid,\n functionId,\n credentialLoadTimeout,\n}: UploadWorkerProps) => {\n const identity = halo.identity.get();\n if (!identity) {\n throw new Error('Identity not available');\n }\n const userFunctionsBaseUrl = getBaseUrl(clientConfig);\n\n // TODO: codify naming convention\n const uploadUrl = `${userFunctionsBaseUrl}/${ownerDid}` + (functionId ? `/${functionId}` : '');\n\n log('Upload', { functionId, source, name, identityKey: identity.identityKey, uploadUrl: uploadUrl.toString() });\n const response = await fetch(uploadUrl, {\n method: 'PUT',\n body: JSON.stringify({ script: source, name }),\n headers: await presentationForIdentity({ halo, timeout: credentialLoadTimeout }),\n });\n if (!response.ok) {\n return (await response.json()) as UserFunctionUploadResult;\n }\n\n const res = await response.json();\n log('Upload response', { status: response.status, res });\n\n return res as UserFunctionUploadResult;\n};\n\nexport const getUserFunctionUrlInMetadata = (meta: ObjectMeta) => {\n return meta.keys.find((key) => key.source === USERFUNCTIONS_META_KEY)?.id;\n};\n\nexport const setUserFunctionUrlInMetadata = (meta: ObjectMeta, functionUrl: string) => {\n const key = meta.keys.find((key) => key.source === USERFUNCTIONS_META_KEY);\n if (key) {\n if (key.id !== functionUrl) {\n throw new Error('Metadata mismatch');\n }\n } else {\n meta.keys.push({ source: USERFUNCTIONS_META_KEY, id: functionUrl });\n }\n};\n\n// TODO: handle team owner\n\nconst presentationForIdentity = async ({ halo, timeout }: { halo: Halo; timeout?: number }) => {\n let credential: Credential | undefined;\n\n if (timeout) {\n const credentialsLoaded = new Trigger();\n halo.credentials.subscribe((c) => {\n credential = c.find(matchServiceCredential([USERFUNCTIONS_CREDENTIAL_CAPABILITY]));\n if (credential) {\n credentialsLoaded.wake();\n }\n });\n await credentialsLoaded.wait({\n timeout,\n });\n } else {\n credential = halo\n .queryCredentials()\n .toSorted((a, b) => b.issuanceDate.getTime() - a.issuanceDate.getTime())\n .find(matchServiceCredential([USERFUNCTIONS_CREDENTIAL_CAPABILITY]));\n }\n\n if (!credential) {\n throw new Error('No credential found');\n }\n log('credential found', { credential });\n // TODO(wittjosiah): If id is required to present credentials, then it should always be present for queried credentials.\n invariant(credential.id, 'beta credential missing id');\n const presentation = await halo.presentCredentials({ ids: [credential.id] });\n\n return { Authorization: `Bearer ${codec.encode(presentation)}` };\n};\n\nexport type InvocationOptions = {\n spaceId?: SpaceId;\n subjectId?: string;\n};\n\nexport const getInvocationUrl = (functionUrl: string, edgeUrl: string, options: InvocationOptions = {}) => {\n const baseUrl = new URL('functions/', edgeUrl);\n\n // Leading slashes cause the URL to be treated as an absolute path.\n const relativeUrl = functionUrl.replace(/^\\//, '');\n const url = new URL(`./${relativeUrl}`, baseUrl.toString());\n options.spaceId && url.searchParams.set('spaceId', options.spaceId);\n options.subjectId && url.searchParams.set('subjectId', options.subjectId);\n url.protocol = 'https';\n return url.toString();\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { type DID } from 'iso-did/types';\n\nimport { type Credential } from '@dxos/client/halo';\nimport { type PublicKey } from '@dxos/keys';\n\n// TODO(burdon): Factor out to @dxos/hub-protocol.\n\nexport const matchServiceCredential =\n (capabilities: string[] = []) =>\n (credential: Credential) => {\n if (credential.subject.assertion['@type'] !== 'dxos.halo.credentials.ServiceAccess') {\n return false;\n }\n\n const { capabilities: credentialCapabilities } = credential.subject.assertion;\n return capabilities.every((capability) => credentialCapabilities.includes(capability));\n };\n\n// TODO: reconcile with @dxos/hub-protocol\n\nexport const publicKeyToDid = (key: PublicKey): DID => {\n return `did:key:${key.toHex()}`;\n};\n"],
5
- "mappings": ";;;AAIA,SAASA,iBAAiB;;;ACE1B,IAAMC,WAAW;AAeV,IAAMC,cAAN,MAAMA;EACXC,YAA6BC,WAA0B;SAA1BA,YAAAA;EAA2B;EAExDC,OAAOC,KAAkB;AACvB,UAAMC,iBAAiB,KAAKC,oBAAoBF,GAAAA;AAChD,UAAMG,UAAUC,OAAOC,KAAKC,KAAKC,UAAUN,cAAAA,CAAAA;AAC3C,WAAOE,QAAQK,SAASb,QAAAA;EAC1B;EAEAc,OAAaC,QAAsB;AACjC,UAAMC,OAAOL,KAAKM,MAAMR,OAAOC,KAAKK,QAAQf,QAAAA,EAAUa,SAAQ,CAAA;AAC9D,WAAO,KAAKK,iBAAiBF,IAAAA;EAC/B;EAEQE,iBAAiBb,KAAe;AACtC,WAAO,KAAKc,SAASd,KAAK,CAACe,UAAAA;AACzB,UAAIC,eAAeD,KAAAA,GAAQ;AACzB,eAAOE,YAAYF,MAAMG,GAAG;MAC9B;AACA,UAAIC,aAAaJ,KAAAA,GAAQ;AACvB,eAAO,KAAKjB,UAAUW,OAAOM,KAAAA;MAC/B;AACA,UAAIK,cAAcL,KAAAA,GAAQ;AACxB,eAAOM,WAAWN,KAAAA;MACpB;AACA,aAAO;IACT,CAAA;EACF;EAEQb,oBAAoBF,KAAe;AACzC,WAAO,KAAKc,SAASd,KAAK,CAACe,UAAAA;AACzB,UAAIA,iBAAiBO,YAAY;AAC/B,eAAO;UAAEJ,KAAKK,YAAYR,KAAAA;QAAO;MACnC;AACA,UAAI,KAAKjB,UAAU0B,MAAMT,KAAAA,GAAQ;AAC/B,eAAO,KAAKjB,UAAUC,OAAOgB,KAAAA;MAC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6C,iBAAgB,EAChBC,SAAS,CAACC,GAAGC,MAAMA,EAAEC,aAAaC,QAAO,IAAKH,EAAEE,aAAaC,QAAO,CAAA,EACpEpB,KAAKY,uBAAuB;MAACxD;KAAoC,CAAA;EACtE;AAEA,MAAI,CAACkD,YAAY;AACf,UAAM,IAAI5B,MAAM,qBAAA;EAClB;AACAG,MAAI,oBAAoB;IAAEyB;EAAW,GAAA;;;;;;AAErCe,YAAUf,WAAWJ,IAAI,8BAAA;;;;;;;;;AACzB,QAAMoB,eAAe,MAAMpD,KAAKqD,mBAAmB;IAAEC,KAAK;MAAClB,WAAWJ;;EAAI,CAAA;AAE1E,SAAO;IAAEuB,eAAe,UAAUC,MAAMC,OAAOL,YAAAA,CAAAA;EAAgB;AACjE;AAOO,IAAMM,mBAAmB,CAACxB,aAAqByB,SAAiBC,UAA6B,CAAC,MAAC;AACpG,QAAMC,UAAU,IAAIlE,IAAI,cAAcgE,OAAAA;AAGtC,QAAMG,cAAc5B,YAAY6B,QAAQ,OAAO,EAAA;AAC/C,QAAMrE,MAAM,IAAIC,IAAI,KAAKmE,WAAAA,IAAeD,QAAQhE,SAAQ,CAAA;AACxD+D,UAAQI,WAAWtE,IAAIuE,aAAaC,IAAI,WAAWN,QAAQI,OAAO;AAClEJ,UAAQO,aAAazE,IAAIuE,aAAaC,IAAI,aAAaN,QAAQO,SAAS;AACxEzE,MAAIE,WAAW;AACf,SAAOF,IAAIG,SAAQ;AACrB;",
6
- "names": ["PublicKey", "ENCODING", "HeaderCodec", "constructor", "_keyCodec", "encode", "obj", "objectToEncode", "_prepareForEncoding", "encoded", "Buffer", "from", "JSON", "stringify", "toString", "decode", "buffer", "json", "parse", "_decodeRecursive", "_recurse", "value", "isEncodedBytes", "decodeBytes", "__b", "isEncodedKey", "isEncodedDate", "decodeDate", "Uint8Array", "encodeBytes", "isKey", "Date", "encodeDate", "handler", "handled", "Array", "isArray", "result", "elem", "push", "key", "Object", "entries", "__k", "__t", "date", "getTime", "timestamp", "bytes", "codec", "HeaderCodec", "isKey", "value", "PublicKey", "encode", "key", "__k", "toHex", "decode", "fromHex", "Trigger", "invariant", "log", "matchServiceCredential", "capabilities", "credential", "subject", "assertion", "credentialCapabilities", "every", "capability", "includes", "publicKeyToDid", "key", "toHex", "USERFUNCTIONS_META_KEY", "USERFUNCTIONS_PRESET_META_KEY", "USERFUNCTIONS_CREDENTIAL_CAPABILITY", "defaultUserFunctionsBaseUrl", "getBaseUrl", "config", "values", "runtime", "services", "edge", "url", "URL", "protocol", "toString", "uploadWorkerFunction", "clientConfig", "halo", "name", "source", "ownerDid", "functionId", "credentialLoadTimeout", "identity", "get", "Error", "userFunctionsBaseUrl", "uploadUrl", "log", "identityKey", "response", "fetch", "method", "body", "JSON", "stringify", "script", "headers", "presentationForIdentity", "timeout", "ok", "json", "res", "status", "getUserFunctionUrlInMetadata", "meta", "keys", "find", "key", "id", "setUserFunctionUrlInMetadata", "functionUrl", "push", "credential", "credentialsLoaded", "Trigger", "credentials", "subscribe", "c", "matchServiceCredential", "wake", "wait", "queryCredentials", "toSorted", "a", "b", "issuanceDate", "getTime", "invariant", "presentation", "presentCredentials", "ids", "Authorization", "codec", "encode", "getInvocationUrl", "edgeUrl", "options", "baseUrl", "relativeUrl", "replace", "spaceId", "searchParams", "set", "subjectId"]
4
+ "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { PublicKey } from '@dxos/keys';\n\nimport { HeaderCodec, type EncodedKey } from './header-codec';\n\nexport const codec = new HeaderCodec<PublicKey>({\n isKey: (value: any): value is PublicKey => value instanceof PublicKey,\n encode: (key: PublicKey): EncodedKey => ({ __k: key.toHex() }),\n decode: (value: EncodedKey): PublicKey => PublicKey.fromHex(value.__k),\n});\n", "//\n// Copyright 2024 DXOS.org\n//\n\n// TODO(burdon): Factor out from @dxos/hub-protocol\n\nconst ENCODING = 'base64';\n\nexport type EncodedKey = { __k: string };\n\nexport type EncodedBytes = { __b: string };\n\nexport type EncodedTimestamp = { __t: number };\n\nexport interface KeyCodec<KeyType> {\n isKey(value: any): value is KeyType;\n encode(key: KeyType): EncodedKey;\n decode(value: EncodedKey): KeyType;\n}\n\n// TODO(wittjosiah): Use deepMapValues from @dxos/util -- it handles recursion for you.\nexport class HeaderCodec<Key> {\n constructor(private readonly _keyCodec: KeyCodec<Key>) {}\n\n encode(obj: any): string {\n const objectToEncode = this._prepareForEncoding(obj);\n const encoded = Buffer.from(JSON.stringify(objectToEncode));\n return encoded.toString(ENCODING);\n }\n\n decode<Type>(buffer: string): Type {\n const json = JSON.parse(Buffer.from(buffer, ENCODING).toString());\n return this._decodeRecursive(json);\n }\n\n private _decodeRecursive(obj: any): any {\n return this._recurse(obj, (value) => {\n if (isEncodedBytes(value)) {\n return decodeBytes(value.__b);\n }\n if (isEncodedKey(value)) {\n return this._keyCodec.decode(value);\n }\n if (isEncodedDate(value)) {\n return decodeDate(value);\n }\n return null;\n });\n }\n\n private _prepareForEncoding(obj: any): any {\n return this._recurse(obj, (value) => {\n if (value instanceof Uint8Array) {\n return { __b: encodeBytes(value) };\n }\n if (this._keyCodec.isKey(value)) {\n return this._keyCodec.encode(value);\n }\n if (value instanceof Date) {\n return encodeDate(value);\n }\n return null;\n });\n }\n\n private _recurse(obj: any, handler: (obj: object) => any | null): any {\n if (typeof obj !== 'object') {\n return obj;\n }\n const handled = handler(obj);\n if (handled != null) {\n return handled;\n }\n if (Array.isArray(obj)) {\n const result = [];\n for (const elem of obj) {\n result.push(this._recurse(elem, handler));\n }\n return result;\n }\n const result: any = {};\n for (const [key, value] of Object.entries(obj)) {\n result[key] = this._recurse(value, handler);\n }\n return result;\n }\n}\n\nconst isEncodedKey = (obj: object): obj is EncodedKey => '__k' in obj && typeof obj.__k === 'string';\nconst isEncodedBytes = (obj: object): obj is EncodedBytes => '__b' in obj && typeof obj.__b === 'string';\nconst isEncodedDate = (obj: object): obj is EncodedTimestamp => '__t' in obj && typeof obj.__t === 'number';\n\nconst encodeDate = (date: Date) => ({ __t: date.getTime() });\nconst decodeDate = (timestamp: EncodedTimestamp) => new Date(timestamp.__t);\n\nconst encodeBytes = (bytes: Uint8Array) => Buffer.from(bytes).toString(ENCODING);\nconst decodeBytes = (bytes: string) => Buffer.from(bytes, ENCODING);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { type DID } from 'iso-did/types';\n\nimport { Trigger } from '@dxos/async';\nimport { type Config } from '@dxos/client';\nimport { type Halo } from '@dxos/client-protocol';\nimport { type JsonSchemaType, type ObjectMeta } from '@dxos/echo-schema';\nimport { invariant } from '@dxos/invariant';\nimport type { SpaceId } from '@dxos/keys';\nimport { log } from '@dxos/log';\nimport { type Credential } from '@dxos/protocols/proto/dxos/halo/credentials';\n\nimport { codec } from './codec';\nimport { matchServiceCredential } from './hub-protocol';\n\n// TODO: use URL scheme for source?\nconst USERFUNCTIONS_META_KEY = 'dxos.org/service/function';\nexport const USERFUNCTIONS_PRESET_META_KEY = 'dxos.org/service/function-preset';\nconst USERFUNCTIONS_CREDENTIAL_CAPABILITY = 'composer:beta';\n\n// TODO: Synchronize API types with server\nexport type UserFunctionUploadResult = {\n result: 'success' | 'error';\n errorMessage?: string;\n functionId?: string;\n functionVersionNumber?: number;\n meta: {\n inputSchema?: JsonSchemaType;\n };\n};\n\nexport type UploadWorkerProps = {\n clientConfig: Config;\n halo: Halo;\n name?: string;\n source: string;\n functionId?: string;\n ownerDid: DID;\n credentialLoadTimeout?: number; // ms to wait for credentials to load\n};\n\n// TODO(burdon): Config.\nconst defaultUserFunctionsBaseUrl = 'https://edge-main.dxos.workers.dev/functions'; // 'http://localhost:8600';\n\nconst getBaseUrl = (config: Config) => {\n if (config.values.runtime?.services?.edge?.url) {\n const url = new URL('/functions', config.values.runtime?.services?.edge?.url);\n switch (url.protocol) {\n case 'http:':\n case 'ws:':\n url.protocol = 'http';\n break;\n case 'https:':\n case 'wss:':\n url.protocol = 'https';\n break;\n default:\n throw new Error(`Invalid protocol: ${url.protocol}`);\n }\n return url.toString();\n } else {\n return defaultUserFunctionsBaseUrl;\n }\n};\n\nexport const uploadWorkerFunction = async ({\n clientConfig,\n halo,\n name,\n source,\n ownerDid,\n functionId,\n credentialLoadTimeout,\n}: UploadWorkerProps) => {\n const identity = halo.identity.get();\n if (!identity) {\n throw new Error('Identity not available');\n }\n const userFunctionsBaseUrl = getBaseUrl(clientConfig);\n\n // TODO: codify naming convention\n const uploadUrl = `${userFunctionsBaseUrl}/${ownerDid}` + (functionId ? `/${functionId}` : '');\n\n log('Upload', { functionId, source, name, identityKey: identity.identityKey, uploadUrl: uploadUrl.toString() });\n const response = await fetch(uploadUrl, {\n method: 'PUT',\n body: JSON.stringify({ script: source, name }),\n headers: await presentationForIdentity({ halo, timeout: credentialLoadTimeout }),\n });\n if (!response.ok) {\n return (await response.json()) as UserFunctionUploadResult;\n }\n\n const res = await response.json();\n log('Upload response', { status: response.status, res });\n\n return res as UserFunctionUploadResult;\n};\n\nexport const getUserFunctionUrlInMetadata = (meta: ObjectMeta) => {\n return meta.keys.find((key) => key.source === USERFUNCTIONS_META_KEY)?.id;\n};\n\nexport const setUserFunctionUrlInMetadata = (meta: ObjectMeta, functionUrl: string) => {\n const key = meta.keys.find((key) => key.source === USERFUNCTIONS_META_KEY);\n if (key) {\n if (key.id !== functionUrl) {\n throw new Error('Metadata mismatch');\n }\n } else {\n meta.keys.push({ source: USERFUNCTIONS_META_KEY, id: functionUrl });\n }\n};\n\n// TODO: handle team owner\n\nconst presentationForIdentity = async ({ halo, timeout }: { halo: Halo; timeout?: number }) => {\n let credential: Credential | undefined;\n\n if (timeout) {\n const credentialsLoaded = new Trigger();\n halo.credentials.subscribe((c) => {\n credential = c.find(matchServiceCredential([USERFUNCTIONS_CREDENTIAL_CAPABILITY]));\n if (credential) {\n credentialsLoaded.wake();\n }\n });\n await credentialsLoaded.wait({\n timeout,\n });\n } else {\n credential = halo\n .queryCredentials()\n .toSorted((a, b) => b.issuanceDate.getTime() - a.issuanceDate.getTime())\n .find(matchServiceCredential([USERFUNCTIONS_CREDENTIAL_CAPABILITY]));\n }\n\n if (!credential) {\n throw new Error('No credential found');\n }\n log('credential found', { credential });\n // TODO(wittjosiah): If id is required to present credentials, then it should always be present for queried credentials.\n invariant(credential.id, 'beta credential missing id');\n const presentation = await halo.presentCredentials({ ids: [credential.id] });\n\n return { Authorization: `Bearer ${codec.encode(presentation)}` };\n};\n\nexport type InvocationOptions = {\n spaceId?: SpaceId;\n subjectId?: string;\n};\n\nexport const getInvocationUrl = (functionUrl: string, edgeUrl: string, options: InvocationOptions = {}) => {\n const baseUrl = new URL('functions/', edgeUrl);\n\n // Leading slashes cause the URL to be treated as an absolute path.\n const relativeUrl = functionUrl.replace(/^\\//, '');\n const url = new URL(`./${relativeUrl}`, baseUrl.toString());\n options.spaceId && url.searchParams.set('spaceId', options.spaceId);\n options.subjectId && url.searchParams.set('subjectId', options.subjectId);\n url.protocol = 'https';\n return url.toString();\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { type DID } from 'iso-did/types';\n\nimport { type Credential } from '@dxos/client/halo';\nimport { type PublicKey } from '@dxos/keys';\n\n// TODO(burdon): Factor out to @dxos/hub-protocol.\n\nexport const matchServiceCredential =\n (capabilities: string[] = []) =>\n (credential: Credential) => {\n if (credential.subject.assertion['@type'] !== 'dxos.halo.credentials.ServiceAccess') {\n return false;\n }\n\n const { capabilities: credentialCapabilities } = credential.subject.assertion;\n return capabilities.every((capability) => credentialCapabilities.includes(capability));\n };\n\n// TODO: reconcile with @dxos/hub-protocol\n\nexport const publicKeyToDid = (key: PublicKey): DID => {\n return `did:key:${key.toHex()}`;\n};\n"],
5
+ "mappings": ";;;AAIA,SAASA,iBAAiB;;;ACE1B,IAAMC,WAAW;AAeV,IAAMC,cAAN,MAAMA;EACXC,YAA6BC,WAA0B;SAA1BA,YAAAA;EAA2B;EAExDC,OAAOC,KAAkB;AACvB,UAAMC,iBAAiB,KAAKC,oBAAoBF,GAAAA;AAChD,UAAMG,UAAUC,OAAOC,KAAKC,KAAK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J,IAAI,8BAAA;;;;;;;;;AACzB,QAAMoB,eAAe,MAAMnD,KAAKoD,mBAAmB;IAAEC,KAAK;MAAClB,WAAWJ;;EAAI,CAAA;AAE1E,SAAO;IAAEuB,eAAe,UAAUC,MAAMC,OAAOL,YAAAA,CAAAA;EAAgB;AACjE;AAOO,IAAMM,mBAAmB,CAACxB,aAAqByB,SAAiBC,UAA6B,CAAC,MAAC;AACpG,QAAMC,UAAU,IAAIlE,IAAI,cAAcgE,OAAAA;AAGtC,QAAMG,cAAc5B,YAAY6B,QAAQ,OAAO,EAAA;AAC/C,QAAMrE,MAAM,IAAIC,IAAI,KAAKmE,WAAAA,IAAeD,QAAQ/D,SAAQ,CAAA;AACxD8D,UAAQI,WAAWtE,IAAIuE,aAAaC,IAAI,WAAWN,QAAQI,OAAO;AAClEJ,UAAQO,aAAazE,IAAIuE,aAAaC,IAAI,aAAaN,QAAQO,SAAS;AACxEzE,MAAIE,WAAW;AACf,SAAOF,IAAII,SAAQ;AACrB;",
6
+ "names": ["PublicKey", "ENCODING", "HeaderCodec", "constructor", "_keyCodec", "encode", "obj", "objectToEncode", "_prepareForEncoding", "encoded", "Buffer", "from", "JSON", "stringify", "toString", "decode", "buffer", "json", "parse", "_decodeRecursive", "_recurse", "value", "isEncodedBytes", "decodeBytes", "__b", "isEncodedKey", "isEncodedDate", "decodeDate", "Uint8Array", "encodeBytes", "isKey", "Date", "encodeDate", "handler", "handled", "Array", "isArray", "result", "elem", "push", "key", "Object", "entries", "__k", "__t", "date", "getTime", "timestamp", "bytes", "codec", "HeaderCodec", "isKey", "value", "PublicKey", "encode", "key", "__k", "toHex", "decode", "fromHex", "Trigger", "invariant", "log", "matchServiceCredential", "capabilities", "credential", "subject", "assertion", "credentialCapabilities", "every", "capability", "includes", "publicKeyToDid", "key", "toHex", "USERFUNCTIONS_META_KEY", "USERFUNCTIONS_PRESET_META_KEY", "USERFUNCTIONS_CREDENTIAL_CAPABILITY", "defaultUserFunctionsBaseUrl", "getBaseUrl", "config", "values", "runtime", "services", "edge", "url", "URL", "protocol", "Error", "toString", "uploadWorkerFunction", "clientConfig", "halo", "name", "source", "ownerDid", "functionId", "credentialLoadTimeout", "identity", "get", "userFunctionsBaseUrl", "uploadUrl", "log", "identityKey", "response", "fetch", "method", "body", "JSON", "stringify", "script", "headers", "presentationForIdentity", "timeout", "ok", "json", "res", "status", "getUserFunctionUrlInMetadata", "meta", "keys", "find", "key", "id", "setUserFunctionUrlInMetadata", "functionUrl", "push", "credential", "credentialsLoaded", "Trigger", "credentials", "subscribe", "c", "matchServiceCredential", "wake", "wait", "queryCredentials", "toSorted", "a", "b", "issuanceDate", "getTime", "invariant", "presentation", "presentCredentials", "ids", "Authorization", "codec", "encode", "getInvocationUrl", "edgeUrl", "options", "baseUrl", "relativeUrl", "replace", "spaceId", "searchParams", "set", "subjectId"]
7
7
  }
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-SLTZMY34.mjs";
5
5
 
6
6
  // packages/plugins/experimental/plugin-script/src/components/DebugPanel/DebugPanel.tsx
7
- import React, { useEffect, useRef, useState } from "react";
7
+ import React, { forwardRef, useEffect, useRef, useState } from "react";
8
8
  import { log } from "@dxos/log";
9
9
  import { Avatar, Icon, Input, Toolbar, useTranslation } from "@dxos/react-ui";
10
10
  import { SyntaxHighlighter } from "@dxos/react-ui-syntax-highlighter";
@@ -151,15 +151,13 @@ var DebugPanel = ({ classNames, functionUrl }) => {
151
151
  };
152
152
  return /* @__PURE__ */ React.createElement("div", {
153
153
  className: mx("flex flex-col h-full overflow-hidden", classNames)
154
- }, /* @__PURE__ */ React.createElement("div", {
155
- ref: scrollerRef,
156
- className: "flex flex-col gap-6 h-full p-2 overflow-x-hidden overflow-y-auto"
157
154
  }, /* @__PURE__ */ React.createElement(MessageThread, {
155
+ ref: scrollerRef,
158
156
  state,
159
157
  result,
160
158
  history
161
- })), /* @__PURE__ */ React.createElement(Toolbar.Root, {
162
- classNames: "p-2"
159
+ }), /* @__PURE__ */ React.createElement(Toolbar.Root, {
160
+ classNames: "p-1"
163
161
  }, /* @__PURE__ */ React.createElement(Input.Root, null, /* @__PURE__ */ React.createElement(Input.TextInput, {
164
162
  ref: inputRef,
165
163
  autoFocus: true,
@@ -179,8 +177,14 @@ var DebugPanel = ({ classNames, functionUrl }) => {
179
177
  size: 4
180
178
  }))));
181
179
  };
182
- var MessageThread = ({ state, result, history }) => {
183
- return /* @__PURE__ */ React.createElement(React.Fragment, null, history.map((message, i) => /* @__PURE__ */ React.createElement("div", {
180
+ var MessageThread = /* @__PURE__ */ forwardRef(({ state, history, result }, forwardedRef) => {
181
+ if (!history.length && !result.length) {
182
+ return null;
183
+ }
184
+ return /* @__PURE__ */ React.createElement("div", {
185
+ ref: forwardedRef,
186
+ className: "flex flex-col gap-6 h-full p-2 overflow-x-hidden overflow-y-auto"
187
+ }, history.map((message, i) => /* @__PURE__ */ React.createElement("div", {
184
188
  key: i,
185
189
  className: "grid grid-cols-[2rem_1fr_2rem]"
186
190
  }, /* @__PURE__ */ React.createElement("div", {
@@ -209,7 +213,7 @@ var MessageThread = ({ state, result, history }) => {
209
213
  text: result
210
214
  }
211
215
  }))));
212
- };
216
+ });
213
217
  var MessageItem = ({ classNames, message }) => {
214
218
  const { type, text, data, error } = message;
215
219
  const wrapper = "p-1 px-2 rounded-lg bg-hoverSurface overflow-auto";
@@ -234,4 +238,4 @@ var RobotAvatar = () => /* @__PURE__ */ React.createElement(Avatar.Root, {
234
238
  export {
235
239
  DebugPanel
236
240
  };
237
- //# sourceMappingURL=chunk-DXWSRDEN.mjs.map
241
+ //# sourceMappingURL=chunk-OFYGBUNI.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/DebugPanel/DebugPanel.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { forwardRef, useEffect, useRef, useState } from 'react';\n\nimport { log } from '@dxos/log';\nimport { Avatar, Icon, Input, type ThemedClassName, Toolbar, useTranslation } from '@dxos/react-ui';\nimport { SyntaxHighlighter } from '@dxos/react-ui-syntax-highlighter';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { SCRIPT_PLUGIN } from '../../meta';\n\ntype State = 'pending' | 'responding';\n\n/**\n * Request or response.\n */\ntype Message = { type: 'request' | 'response'; text?: string; data?: any; error?: Error };\n\nexport type DebugPanelProps = ThemedClassName<{\n functionUrl?: string;\n}>;\n\nexport const DebugPanel = ({ classNames, functionUrl }: DebugPanelProps) => {\n const { t } = useTranslation(SCRIPT_PLUGIN);\n\n const inputRef = useRef<HTMLInputElement>(null);\n const [input, setInput] = useState('');\n const [result, setResult] = useState('');\n const [state, setState] = useState<State | null>(null);\n\n // TODO(burdon): Persistent history -- at least for session (non-space ECHO data?)\n const [history, setHistory] = useState<Message[]>([]);\n\n const scrollerRef = useRef<HTMLDivElement>(null);\n const handleScroll = () => {\n if (scrollerRef.current) {\n scrollerRef.current.scrollTop = scrollerRef.current.scrollHeight;\n }\n };\n\n const controller = useRef<AbortController>();\n useEffect(() => {\n return () => {\n handleStop();\n };\n }, []);\n\n const handleStop = () => {\n controller.current?.abort('stop');\n controller.current = undefined;\n };\n\n const handleClear = () => {\n handleStop();\n setInput('');\n setResult('');\n setHistory([]);\n inputRef.current?.focus();\n };\n\n const handleResponse = ({ text, data, error }: { text?: string; data?: any; error?: Error } = {}) => {\n controller.current = undefined;\n setHistory((history) => [...history, { type: 'response', text, data, error } satisfies Message]);\n setResult('');\n setState(null);\n handleScroll();\n };\n\n const handleRequest = async (input: string) => {\n // Returns a promise that resolves when a value has been received.\n try {\n setState('pending');\n\n let data = null;\n // Detect JSON input.\n if (input.charAt(0) === '{') {\n try {\n const validJsonString = input.replace(/'/g, '\"').replace(/([{,]\\s*)([a-zA-Z0-9_]+)(\\s*:)/g, '$1\"$2\"$3');\n data = JSON.parse(validJsonString);\n input = JSON.stringify(data, null, 2);\n } catch (err) {\n inputRef.current?.focus();\n return;\n }\n }\n\n setInput('');\n setResult('');\n setHistory((history) => [...history, { type: 'request', text: input }]);\n setTimeout(() => {\n handleScroll();\n });\n\n // Throws DOMException when aborted.\n controller.current = new AbortController();\n const response = await fetch(functionUrl!, {\n signal: controller.current.signal,\n method: 'POST',\n body: input,\n headers: {\n 'Content-Type': data ? 'application/json' : 'text/plain',\n },\n });\n\n // Check for error.\n if (!response.ok) {\n const text = await response.text();\n handleResponse({ error: new Error(text || response.statusText || String(response.status)) });\n return;\n }\n\n // Check for JSON.\n const contentType = response.headers.get('content-type');\n if (contentType === 'application/json') {\n const data = await response.json();\n handleResponse({ data });\n return;\n }\n\n // Text (including streaming).\n setState('responding');\n let text = '';\n const reader = response.body!.getReader();\n const pump = async ({ done, value }: ReadableStreamReadResult<Uint8Array>): Promise<void> => {\n text = text + new TextDecoder().decode(value);\n if (!controller.current || done) {\n handleResponse({ text });\n return;\n }\n\n setResult(text);\n setTimeout(() => {\n handleScroll();\n });\n\n return reader.read().then(pump);\n };\n\n void reader\n .read()\n .then(pump)\n .catch((err) => {\n if (err.name !== 'AbortError') {\n log.catch(err);\n }\n });\n } catch (err: any) {\n if (err !== 'stop') {\n const error = err instanceof Error ? err : new Error(err);\n handleResponse({ error });\n log.catch(err);\n } else {\n handleResponse();\n }\n }\n };\n\n return (\n <div className={mx('flex flex-col h-full overflow-hidden', classNames)}>\n {/* TODO(burdon): Replace with Thread. */}\n <MessageThread ref={scrollerRef} state={state} result={result} history={history} />\n\n <Toolbar.Root classNames='p-1'>\n <Input.Root>\n <Input.TextInput\n ref={inputRef}\n autoFocus\n placeholder={t('function request placeholder')}\n value={input}\n onChange={(ev) => setInput(ev.target.value)}\n onKeyDown={(ev) => ev.key === 'Enter' && handleRequest(input)}\n />\n </Input.Root>\n <Toolbar.Button onClick={() => handleRequest(input)}>\n <Icon icon='ph--play--regular' size={4} />\n </Toolbar.Button>\n <Toolbar.Button onClick={() => (state ? handleStop() : handleClear())}>\n <Icon icon={state ? 'ph--stop--regular' : 'ph--trash--regular'} size={4} />\n </Toolbar.Button>\n </Toolbar.Root>\n </div>\n );\n};\n\n// TODO(burdon): Replace with thread?\n// TODO(burdon): Button to delete individual messages.\n// TODO(burdon): Button to edit/re-run question.\ntype MessageThreadProps = {\n state: State | null;\n history: Message[];\n result: string;\n};\n\nconst MessageThread = forwardRef<HTMLDivElement, MessageThreadProps>(\n ({ state, history, result }: MessageThreadProps, forwardedRef) => {\n if (!history.length && !result.length) {\n return null;\n }\n\n return (\n <div ref={forwardedRef} className='flex flex-col gap-6 h-full p-2 overflow-x-hidden overflow-y-auto'>\n {history.map((message, i) => (\n <div key={i} className='grid grid-cols-[2rem_1fr_2rem]'>\n <div className='p-1'>{message.type === 'response' && <RobotAvatar />}</div>\n <div className='overflow-auto'>\n <MessageItem message={message} />\n </div>\n </div>\n ))}\n\n {result?.length > 0 && (\n <div className='grid grid-cols-[2rem_1fr_2rem]'>\n <div className='p-1'>\n {(state === 'pending' && <Icon icon='ph--spinner--regular' size={6} classNames='animate-spin' />) || (\n <Icon icon='ph--robot--regular' size={6} classNames='animate-[pulse_1s_ease-in-out_infinite]' />\n )}\n </div>\n <div className='overflow-auto'>\n <MessageItem message={{ type: 'response', text: result }} />\n </div>\n </div>\n )}\n </div>\n );\n },\n);\n\nconst MessageItem = ({ classNames, message }: ThemedClassName<{ message: Message }>) => {\n const { type, text, data, error } = message;\n const wrapper = 'p-1 px-2 rounded-lg bg-hoverSurface overflow-auto';\n return (\n <div className={mx('flex', type === 'request' ? 'ml-[1rem] justify-end' : 'mr-[1rem]', classNames)}>\n {error && <div className={mx(wrapper, 'whitespace-pre text-error')}>{String(error)}</div>}\n\n {text !== undefined && (\n <div className={mx(wrapper, type === 'request' && 'bg-primary-400 dark:bg-primary-600')}>\n {text || '\\u00D8'}\n </div>\n )}\n\n {data && (\n <SyntaxHighlighter language='json' className={mx(wrapper, 'px-8 py-2 text-xs')}>\n {JSON.stringify(data, null, 2)}\n </SyntaxHighlighter>\n )}\n </div>\n );\n};\n\nconst RobotAvatar = () => (\n <Avatar.Root size={6} variant='circle'>\n <Avatar.Frame>\n <Avatar.Icon icon='ph--robot--regular' />\n </Avatar.Frame>\n </Avatar.Root>\n);\n"],
5
+ "mappings": ";;;;;;AAIA,OAAOA,SAASC,YAAYC,WAAWC,QAAQC,gBAAgB;AAE/D,SAASC,WAAW;AACpB,SAASC,QAAQC,MAAMC,OAA6BC,SAASC,sBAAsB;AACnF,SAASC,yBAAyB;AAClC,SAASC,UAAU;;AAeZ,IAAMC,aAAa,CAAC,EAAEC,YAAYC,YAAW,MAAmB;AACrE,QAAM,EAAEC,EAAC,IAAKC,eAAeC,aAAAA;AAE7B,QAAMC,WAAWC,OAAyB,IAAA;AAC1C,QAAM,CAACC,OAAOC,QAAAA,IAAYC,SAAS,EAAA;AACnC,QAAM,CAACC,QAAQC,SAAAA,IAAaF,SAAS,EAAA;AACrC,QAAM,CAACG,OAAOC,QAAAA,IAAYJ,SAAuB,IAAA;AAGjD,QAAM,CAACK,SAASC,UAAAA,IAAcN,SAAoB,CAAA,CAAE;AAEpD,QAAMO,cAAcV,OAAuB,IAAA;AAC3C,QAAMW,eAAe,MAAA;AACnB,QAAID,YAAYE,SAAS;AACvBF,kBAAYE,QAAQC,YAAYH,YAAYE,QAAQE;IACtD;EACF;AAEA,QAAMC,aAAaf,OAAAA;AACnBgB,YAAU,MAAA;AACR,WAAO,MAAA;AACLC,iBAAAA;IACF;EACF,GAAG,CAAA,CAAE;AAEL,QAAMA,aAAa,MAAA;AACjBF,eAAWH,SAASM,MAAM,MAAA;AAC1BH,eAAWH,UAAUO;EACvB;AAEA,QAAMC,cAAc,MAAA;AAClBH,eAAAA;AACAf,aAAS,EAAA;AACTG,cAAU,EAAA;AACVI,eAAW,CAAA,CAAE;AACbV,aAASa,SAASS,MAAAA;EACpB;AAEA,QAAMC,iBAAiB,CAAC,EAAEC,MAAMC,MAAMC,MAAK,IAAmD,CAAC,MAAC;AAC9FV,eAAWH,UAAUO;AACrBV,eAAW,CAACD,aAA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AAc,CAAC,EAAEjG,YAAY8F,QAAO,MAAyC;AACjF,QAAM,EAAE9D,MAAMH,MAAMC,MAAMC,MAAK,IAAK+D;AACpC,QAAMI,UAAU;AAChB,SACE,sBAAA,cAAC7B,OAAAA;IAAIC,WAAWC,GAAG,QAAQvC,SAAS,YAAY,0BAA0B,aAAahC,UAAAA;KACpF+B,SAAS,sBAAA,cAACsC,OAAAA;IAAIC,WAAWC,GAAG2B,SAAS,2BAAA;KAA+B9C,OAAOrB,KAAAA,CAAAA,GAE3EF,SAASJ,UACR,sBAAA,cAAC4C,OAAAA;IAAIC,WAAWC,GAAG2B,SAASlE,SAAS,aAAa,oCAAA;KAC/CH,QAAQ,MAAA,GAIZC,QACC,sBAAA,cAACqE,mBAAAA;IAAkBC,UAAS;IAAO9B,WAAWC,GAAG2B,SAAS,mBAAA;KACvD7D,KAAKE,UAAUT,MAAM,MAAM,CAAA,CAAA,CAAA;AAKtC;AAEA,IAAMkE,cAAc,MAClB,sBAAA,cAACK,OAAO1B,MAAI;EAACc,MAAM;EAAGa,SAAQ;GAC5B,sBAAA,cAACD,OAAOE,OAAK,MACX,sBAAA,cAACF,OAAOd,MAAI;EAACC,MAAK;;",
6
+ "names": ["React", "forwardRef", "useEffect", "useRef", "useState", "log", "Avatar", "Icon", "Input", "Toolbar", "useTranslation", "SyntaxHighlighter", "mx", "DebugPanel", "classNames", "functionUrl", "t", "useTranslation", "SCRIPT_PLUGIN", "inputRef", "useRef", "input", "setInput", "useState", "result", "setResult", "state", "setState", "history", "setHistory", "scrollerRef", "handleScroll", "current", "scrollTop", "scrollHeight", "controller", "useEffect", "handleStop", "abort", "undefined", "handleClear", "focus", "handleResponse", "text", "data", "error", "type", "handleRequest", "charAt", "validJsonString", "replace", "JSON", "parse", "stringify", "err", "setTimeout", "AbortController", "response", "fetch", "signal", "method", "body", "headers", "ok", "Error", "statusText", "String", "status", "contentType", "get", "json", "reader", "getReader", "pump", "done", "value", "TextDecoder", "decode", "read", "then", "catch", "name", "log", "div", "className", "mx", "MessageThread", "ref", "Toolbar", "Root", "Input", "TextInput", "autoFocus", "placeholder", "onChange", "ev", "target", "onKeyDown", "key", "Button", "onClick", "Icon", "icon", "size", "forwardRef", "forwardedRef", "length", "map", "message", "i", "RobotAvatar", "MessageItem", "wrapper", "SyntaxHighlighter", "language", "Avatar", "variant", "Frame"]
7
+ }
@@ -9,7 +9,7 @@ import {
9
9
  publicKeyToDid,
10
10
  setUserFunctionUrlInMetadata,
11
11
  uploadWorkerFunction
12
- } from "../chunk-V74XKPLC.mjs";
12
+ } from "../chunk-4QWC64VN.mjs";
13
13
  export {
14
14
  HeaderCodec,
15
15
  USERFUNCTIONS_PRESET_META_KEY,
@@ -7,12 +7,12 @@ import {
7
7
  import {
8
8
  getInvocationUrl,
9
9
  getUserFunctionUrlInMetadata
10
- } from "./chunk-V74XKPLC.mjs";
10
+ } from "./chunk-4QWC64VN.mjs";
11
11
  import {
12
12
  FunctionType,
13
13
  ScriptAction,
14
14
  ScriptType
15
- } from "./chunk-P7ULFJ4T.mjs";
15
+ } from "./chunk-2HYWFUEN.mjs";
16
16
  import {
17
17
  SCRIPT_PLUGIN,
18
18
  meta_default
@@ -196,8 +196,8 @@ var ScriptSettingsPanel = ({ script }) => {
196
196
  };
197
197
 
198
198
  // packages/plugins/experimental/plugin-script/src/components/index.ts
199
- var AutomationPanel = lazy(() => import("./AutomationPanel-EEGLOILM.mjs"));
200
- var ScriptContainer = lazy(() => import("./ScriptContainer-NGYXDSLQ.mjs"));
199
+ var AutomationPanel = lazy(() => import("./AutomationPanel-QFKOZXLO.mjs"));
200
+ var ScriptContainer = lazy(() => import("./ScriptContainer-A4A663FM.mjs"));
201
201
 
202
202
  // packages/plugins/experimental/plugin-script/src/translations.ts
203
203
  var translations_default = [
@@ -1 +1 @@
1
- {"inputs":{"packages/plugins/experimental/plugin-script/src/edge/header-codec.ts":{"bytes":10228,"imports":[],"format":"esm"},"packages/plugins/experimental/plugin-script/src/edge/codec.ts":{"bytes":1702,"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/edge/header-codec.ts","kind":"import-statement","original":"./header-codec"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/edge/hub-protocol.ts":{"bytes":2750,"imports":[],"format":"esm"},"packages/plugins/experimental/plugin-script/src/edge/functions.ts":{"bytes":17454,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/edge/codec.ts","kind":"import-statement","original":"./codec"},{"path":"packages/plugins/experimental/plugin-script/src/edge/hub-protocol.ts","kind":"import-statement","original":"./hub-protocol"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/edge/index.ts":{"bytes":907,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/edge/codec.ts","kind":"import-statement","original":"./codec"},{"path":"packages/plugins/experimental/plugin-script/src/edge/functions.ts","kind":"import-statement","original":"./functions"},{"path":"packages/plugins/experimental/plugin-script/src/edge/header-codec.ts","kind":"import-statement","original":"./header-codec"},{"path":"packages/plugins/experimental/plugin-script/src/edge/hub-protocol.ts","kind":"import-statement","original":"./hub-protocol"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/bundler/bundler.ts":{"bytes":29746,"imports":[{"path":"esbuild-wasm","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/bundler/index.ts":{"bytes":522,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/bundler/bundler.ts","kind":"import-statement","original":"./bundler"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/compiler/compiler.ts":{"bytes":5747,"imports":[{"path":"@typescript/vfs","kind":"import-statement","external":true},{"path":"typescript","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/compiler/index.ts":{"bytes":524,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/compiler/compiler.ts","kind":"import-statement","original":"./compiler"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/meta.ts":{"bytes":1564,"imports":[],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/ScriptSettings/ScriptSettings.tsx":{"bytes":5105,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/ScriptSettings/index.ts":{"bytes":559,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/components/ScriptSettings/ScriptSettings.tsx","kind":"import-statement","original":"./ScriptSettings"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/types/schema.ts":{"bytes":4120,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/types/types.ts":{"bytes":1763,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/types/index.ts":{"bytes":600,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/types/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/plugins/experimental/plugin-script/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/ScriptSettingsPanel.tsx":{"bytes":12290,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/edge/index.ts","kind":"import-statement","original":"../edge"},{"path":"packages/plugins/experimental/plugin-script/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/experimental/plugin-script/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/DebugPanel/DebugPanel.tsx":{"bytes":28101,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-syntax-highlighter","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/DebugPanel/index.ts":{"bytes":543,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/components/DebugPanel/DebugPanel.tsx","kind":"import-statement","original":"./DebugPanel"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/AutomationPanel/AutomationPanel.tsx":{"bytes":11439,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/edge/index.ts","kind":"import-statement","original":"../../edge"},{"path":"packages/plugins/experimental/plugin-script/src/types/index.ts","kind":"import-statement","original":"../../types"},{"path":"packages/plugins/experimental/plugin-script/src/components/DebugPanel/index.ts","kind":"import-statement","original":"../DebugPanel"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/AutomationPanel/index.ts":{"bytes":858,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/components/AutomationPanel/AutomationPanel.tsx","kind":"import-statement","original":"./AutomationPanel"},{"path":"packages/plugins/experimental/plugin-script/src/components/AutomationPanel/AutomationPanel.tsx","kind":"import-statement","original":"./AutomationPanel"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/Toolbar/Toolbar.tsx":{"bytes":16415,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/Toolbar/index.ts":{"bytes":533,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/components/Toolbar/Toolbar.tsx","kind":"import-statement","original":"./Toolbar"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor/TypescriptEditor.tsx":{"bytes":8497,"imports":[{"path":"@codemirror/lang-javascript","kind":"import-statement","external":true},{"path":"@valtown/codemirror-ts","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor/index.ts":{"bytes":563,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor/TypescriptEditor.tsx","kind":"import-statement","original":"./TypescriptEditor"}],"format":"esm"},"raw-loader:./templates/chat.ts?raw":{"bytes":2789,"imports":[]},"raw-loader:./templates/chess.ts?raw":{"bytes":887,"imports":[]},"raw-loader:./templates/echo.ts?raw":{"bytes":289,"imports":[]},"raw-loader:./templates/email.ts?raw":{"bytes":793,"imports":[]},"raw-loader:./templates/forex.ts?raw":{"bytes":436,"imports":[]},"packages/plugins/experimental/plugin-script/src/templates.ts":{"bytes":4007,"imports":[{"path":"raw-loader:./templates/chat.ts?raw","kind":"import-statement","original":"./templates/chat.ts?raw"},{"path":"raw-loader:./templates/chess.ts?raw","kind":"import-statement","original":"./templates/chess.ts?raw"},{"path":"raw-loader:./templates/echo.ts?raw","kind":"import-statement","original":"./templates/echo.ts?raw"},{"path":"raw-loader:./templates/email.ts?raw","kind":"import-statement","original":"./templates/email.ts?raw"},{"path":"raw-loader:./templates/forex.ts?raw","kind":"import-statement","original":"./templates/forex.ts?raw"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/ScriptEditor.tsx":{"bytes":24950,"imports":[{"path":"prettier","kind":"import-statement","external":true},{"path":"prettier/plugins/estree","kind":"import-statement","external":true},{"path":"prettier/plugins/typescript","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/components/DebugPanel/index.ts","kind":"import-statement","original":"./DebugPanel"},{"path":"packages/plugins/experimental/plugin-script/src/components/Toolbar/index.ts","kind":"import-statement","original":"./Toolbar"},{"path":"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor/index.ts","kind":"import-statement","original":"./TypescriptEditor"},{"path":"packages/plugins/experimental/plugin-script/src/bundler/index.ts","kind":"import-statement","original":"../bundler"},{"path":"packages/plugins/experimental/plugin-script/src/edge/index.ts","kind":"import-statement","original":"../edge"},{"path":"packages/plugins/experimental/plugin-script/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/experimental/plugin-script/src/templates.ts","kind":"import-statement","original":"../templates"},{"path":"packages/plugins/experimental/plugin-script/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/ScriptContainer.tsx":{"bytes":2763,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/components/ScriptEditor.tsx","kind":"import-statement","original":"./ScriptEditor"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/index.ts":{"bytes":1305,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/components/ScriptSettings/index.ts","kind":"import-statement","original":"./ScriptSettings"},{"path":"packages/plugins/experimental/plugin-script/src/components/ScriptSettingsPanel.tsx","kind":"import-statement","original":"./ScriptSettingsPanel"},{"path":"packages/plugins/experimental/plugin-script/src/components/AutomationPanel/index.ts","kind":"dynamic-import","original":"./AutomationPanel"},{"path":"packages/plugins/experimental/plugin-script/src/components/ScriptContainer.tsx","kind":"dynamic-import","original":"./ScriptContainer"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/translations.ts":{"bytes":3716,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/ScriptPlugin.tsx":{"bytes":22477,"imports":[{"path":"esbuild-wasm/esbuild.wasm?url","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/bundler/index.ts","kind":"import-statement","original":"./bundler"},{"path":"packages/plugins/experimental/plugin-script/src/compiler/index.ts","kind":"import-statement","original":"./compiler"},{"path":"packages/plugins/experimental/plugin-script/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/experimental/plugin-script/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/experimental/plugin-script/src/templates.ts","kind":"import-statement","original":"./templates"},{"path":"packages/plugins/experimental/plugin-script/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/experimental/plugin-script/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/index.ts":{"bytes":1149,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/ScriptPlugin.tsx","kind":"import-statement","original":"./ScriptPlugin"},{"path":"packages/plugins/experimental/plugin-script/src/bundler/index.ts","kind":"import-statement","original":"./bundler"},{"path":"packages/plugins/experimental/plugin-script/src/compiler/index.ts","kind":"import-statement","original":"./compiler"},{"path":"packages/plugins/experimental/plugin-script/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/experimental/plugin-script/src/types/index.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/experimental/plugin-script/src/ScriptPlugin.tsx","kind":"import-statement","original":"./ScriptPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/experimental/plugin-script/dist/lib/node-esm/edge/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/edge/index.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-V74XKPLC.mjs","kind":"import-statement"}],"exports":["HeaderCodec","USERFUNCTIONS_PRESET_META_KEY","codec","getInvocationUrl","getUserFunctionUrlInMetadata","matchServiceCredential","publicKeyToDid","setUserFunctionUrlInMetadata","uploadWorkerFunction"],"entryPoint":"packages/plugins/experimental/plugin-script/src/edge/index.ts","inputs":{},"bytes":596},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":23732},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/index.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-4SRPREUK.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-V74XKPLC.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-P7ULFJ4T.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-SLTZMY34.mjs","kind":"import-statement"},{"path":"esbuild-wasm/esbuild.wasm?url","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@typescript/vfs","kind":"import-statement","external":true},{"path":"typescript","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/AutomationPanel-EEGLOILM.mjs","kind":"dynamic-import"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/ScriptContainer-NGYXDSLQ.mjs","kind":"dynamic-import"}],"exports":["AutomationPanel","Bundler","Compiler","FunctionType","ScriptAction","ScriptContainer","ScriptPlugin","ScriptSettings","ScriptSettingsPanel","ScriptType","default","initializeBundler"],"entryPoint":"packages/plugins/experimental/plugin-script/src/index.ts","inputs":{"packages/plugins/experimental/plugin-script/src/ScriptPlugin.tsx":{"bytesInOutput":5713},"packages/plugins/experimental/plugin-script/src/compiler/compiler.ts":{"bytesInOutput":1440},"packages/plugins/experimental/plugin-script/src/compiler/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-script/src/components/index.ts":{"bytesInOutput":182},"packages/plugins/experimental/plugin-script/src/components/ScriptSettings/ScriptSettings.tsx":{"bytesInOutput":1179},"packages/plugins/experimental/plugin-script/src/components/ScriptSettings/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-script/src/components/ScriptSettingsPanel.tsx":{"bytesInOutput":3235},"packages/plugins/experimental/plugin-script/src/translations.ts":{"bytesInOutput":1050},"packages/plugins/experimental/plugin-script/src/index.ts":{"bytesInOutput":32}},"bytes":14180},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/meta.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-SLTZMY34.mjs","kind":"import-statement"}],"exports":["SCRIPT_PLUGIN","default"],"entryPoint":"packages/plugins/experimental/plugin-script/src/meta.ts","inputs":{},"bytes":253},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/types/index.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-P7ULFJ4T.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-SLTZMY34.mjs","kind":"import-statement"}],"exports":["FunctionType","ScriptAction","ScriptType"],"entryPoint":"packages/plugins/experimental/plugin-script/src/types/index.ts","inputs":{},"bytes":302},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/AutomationPanel-EEGLOILM.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6345},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/AutomationPanel-EEGLOILM.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-DXWSRDEN.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-V74XKPLC.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-P7ULFJ4T.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-SLTZMY34.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"exports":["AutomationPanel","default"],"entryPoint":"packages/plugins/experimental/plugin-script/src/components/AutomationPanel/index.ts","inputs":{"packages/plugins/experimental/plugin-script/src/components/AutomationPanel/AutomationPanel.tsx":{"bytesInOutput":2690},"packages/plugins/experimental/plugin-script/src/components/AutomationPanel/index.ts":{"bytesInOutput":47}},"bytes":3382},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/ScriptContainer-NGYXDSLQ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":26448},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/ScriptContainer-NGYXDSLQ.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-4SRPREUK.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-DXWSRDEN.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-V74XKPLC.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-P7ULFJ4T.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-SLTZMY34.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"prettier","kind":"import-statement","external":true},{"path":"prettier/plugins/estree","kind":"import-statement","external":true},{"path":"prettier/plugins/typescript","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@codemirror/lang-javascript","kind":"import-statement","external":true},{"path":"@valtown/codemirror-ts","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/experimental/plugin-script/src/components/ScriptContainer.tsx","inputs":{"packages/plugins/experimental/plugin-script/src/components/ScriptContainer.tsx":{"bytesInOutput":649},"packages/plugins/experimental/plugin-script/src/components/ScriptEditor.tsx":{"bytesInOutput":6227},"packages/plugins/experimental/plugin-script/src/components/Toolbar/Toolbar.tsx":{"bytesInOutput":4490},"packages/plugins/experimental/plugin-script/src/components/Toolbar/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor/TypescriptEditor.tsx":{"bytesInOutput":1915},"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor/index.ts":{"bytesInOutput":0}},"bytes":14411},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-4SRPREUK.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21380},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-4SRPREUK.mjs":{"imports":[{"path":"esbuild-wasm","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["Bundler","initializeBundler","templates"],"inputs":{"packages/plugins/experimental/plugin-script/src/bundler/bundler.ts":{"bytesInOutput":7034},"packages/plugins/experimental/plugin-script/src/bundler/index.ts":{"bytesInOutput":0},"raw-loader:./templates/chat.ts?raw":{"bytesInOutput":2921},"raw-loader:./templates/chess.ts?raw":{"bytesInOutput":952},"raw-loader:./templates/echo.ts?raw":{"bytesInOutput":327},"raw-loader:./templates/email.ts?raw":{"bytesInOutput":855},"raw-loader:./templates/forex.ts?raw":{"bytesInOutput":481},"packages/plugins/experimental/plugin-script/src/templates.ts":{"bytesInOutput":703}},"bytes":13800},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-DXWSRDEN.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":14069},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-DXWSRDEN.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-SLTZMY34.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-syntax-highlighter","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"exports":["DebugPanel"],"inputs":{"packages/plugins/experimental/plugin-script/src/components/DebugPanel/DebugPanel.tsx":{"bytesInOutput":7689},"packages/plugins/experimental/plugin-script/src/components/DebugPanel/index.ts":{"bytesInOutput":0}},"bytes":7996},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-V74XKPLC.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":16410},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-V74XKPLC.mjs":{"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["HeaderCodec","USERFUNCTIONS_PRESET_META_KEY","codec","getInvocationUrl","getUserFunctionUrlInMetadata","matchServiceCredential","publicKeyToDid","setUserFunctionUrlInMetadata","uploadWorkerFunction"],"inputs":{"packages/plugins/experimental/plugin-script/src/edge/codec.ts":{"bytesInOutput":221},"packages/plugins/experimental/plugin-script/src/edge/header-codec.ts":{"bytesInOutput":2132},"packages/plugins/experimental/plugin-script/src/edge/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-script/src/edge/functions.ts":{"bytesInOutput":3980},"packages/plugins/experimental/plugin-script/src/edge/hub-protocol.ts":{"bytesInOutput":425}},"bytes":7533},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-P7ULFJ4T.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2951},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-P7ULFJ4T.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-SLTZMY34.mjs","kind":"import-statement"},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true}],"exports":["FunctionType","ScriptAction","ScriptType"],"inputs":{"packages/plugins/experimental/plugin-script/src/types/schema.ts":{"bytesInOutput":968},"packages/plugins/experimental/plugin-script/src/types/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-script/src/types/types.ts":{"bytesInOutput":167}},"bytes":1520},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-SLTZMY34.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":739},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-SLTZMY34.mjs":{"imports":[],"exports":["SCRIPT_PLUGIN","meta_default"],"inputs":{"packages/plugins/experimental/plugin-script/src/meta.ts":{"bytesInOutput":311}},"bytes":552}}}
1
+ {"inputs":{"packages/plugins/experimental/plugin-script/src/edge/header-codec.ts":{"bytes":10228,"imports":[],"format":"esm"},"packages/plugins/experimental/plugin-script/src/edge/codec.ts":{"bytes":1702,"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/edge/header-codec.ts","kind":"import-statement","original":"./header-codec"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/edge/hub-protocol.ts":{"bytes":2750,"imports":[],"format":"esm"},"packages/plugins/experimental/plugin-script/src/edge/functions.ts":{"bytes":18372,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/edge/codec.ts","kind":"import-statement","original":"./codec"},{"path":"packages/plugins/experimental/plugin-script/src/edge/hub-protocol.ts","kind":"import-statement","original":"./hub-protocol"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/edge/index.ts":{"bytes":907,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/edge/codec.ts","kind":"import-statement","original":"./codec"},{"path":"packages/plugins/experimental/plugin-script/src/edge/functions.ts","kind":"import-statement","original":"./functions"},{"path":"packages/plugins/experimental/plugin-script/src/edge/header-codec.ts","kind":"import-statement","original":"./header-codec"},{"path":"packages/plugins/experimental/plugin-script/src/edge/hub-protocol.ts","kind":"import-statement","original":"./hub-protocol"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/bundler/bundler.ts":{"bytes":29746,"imports":[{"path":"esbuild-wasm","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/bundler/index.ts":{"bytes":522,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/bundler/bundler.ts","kind":"import-statement","original":"./bundler"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/compiler/compiler.ts":{"bytes":5747,"imports":[{"path":"@typescript/vfs","kind":"import-statement","external":true},{"path":"typescript","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/compiler/index.ts":{"bytes":524,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/compiler/compiler.ts","kind":"import-statement","original":"./compiler"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/meta.ts":{"bytes":1564,"imports":[],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/ScriptSettings/ScriptSettings.tsx":{"bytes":5105,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/ScriptSettings/index.ts":{"bytes":559,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/components/ScriptSettings/ScriptSettings.tsx","kind":"import-statement","original":"./ScriptSettings"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/types/schema.ts":{"bytes":4271,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/types/types.ts":{"bytes":1763,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/types/index.ts":{"bytes":600,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/types/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/plugins/experimental/plugin-script/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/ScriptSettingsPanel.tsx":{"bytes":12290,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/edge/index.ts","kind":"import-statement","original":"../edge"},{"path":"packages/plugins/experimental/plugin-script/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/experimental/plugin-script/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/DebugPanel/DebugPanel.tsx":{"bytes":28533,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-syntax-highlighter","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/DebugPanel/index.ts":{"bytes":543,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/components/DebugPanel/DebugPanel.tsx","kind":"import-statement","original":"./DebugPanel"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/AutomationPanel/AutomationPanel.tsx":{"bytes":11839,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/edge/index.ts","kind":"import-statement","original":"../../edge"},{"path":"packages/plugins/experimental/plugin-script/src/meta.ts","kind":"import-statement","original":"../../meta"},{"path":"packages/plugins/experimental/plugin-script/src/types/index.ts","kind":"import-statement","original":"../../types"},{"path":"packages/plugins/experimental/plugin-script/src/components/DebugPanel/index.ts","kind":"import-statement","original":"../DebugPanel"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/AutomationPanel/index.ts":{"bytes":858,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/components/AutomationPanel/AutomationPanel.tsx","kind":"import-statement","original":"./AutomationPanel"},{"path":"packages/plugins/experimental/plugin-script/src/components/AutomationPanel/AutomationPanel.tsx","kind":"import-statement","original":"./AutomationPanel"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/Toolbar/Toolbar.tsx":{"bytes":16415,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/Toolbar/index.ts":{"bytes":533,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/components/Toolbar/Toolbar.tsx","kind":"import-statement","original":"./Toolbar"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor/TypescriptEditor.tsx":{"bytes":8447,"imports":[{"path":"@codemirror/lang-javascript","kind":"import-statement","external":true},{"path":"@valtown/codemirror-ts","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor/index.ts":{"bytes":563,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor/TypescriptEditor.tsx","kind":"import-statement","original":"./TypescriptEditor"}],"format":"esm"},"raw-loader:./templates/chat.ts?raw":{"bytes":2789,"imports":[]},"raw-loader:./templates/chess.ts?raw":{"bytes":887,"imports":[]},"raw-loader:./templates/echo.ts?raw":{"bytes":289,"imports":[]},"raw-loader:./templates/email.ts?raw":{"bytes":793,"imports":[]},"raw-loader:./templates/forex.ts?raw":{"bytes":436,"imports":[]},"packages/plugins/experimental/plugin-script/src/templates.ts":{"bytes":4007,"imports":[{"path":"raw-loader:./templates/chat.ts?raw","kind":"import-statement","original":"./templates/chat.ts?raw"},{"path":"raw-loader:./templates/chess.ts?raw","kind":"import-statement","original":"./templates/chess.ts?raw"},{"path":"raw-loader:./templates/echo.ts?raw","kind":"import-statement","original":"./templates/echo.ts?raw"},{"path":"raw-loader:./templates/email.ts?raw","kind":"import-statement","original":"./templates/email.ts?raw"},{"path":"raw-loader:./templates/forex.ts?raw","kind":"import-statement","original":"./templates/forex.ts?raw"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/ScriptEditor.tsx":{"bytes":24777,"imports":[{"path":"prettier","kind":"import-statement","external":true},{"path":"prettier/plugins/estree","kind":"import-statement","external":true},{"path":"prettier/plugins/typescript","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/components/DebugPanel/index.ts","kind":"import-statement","original":"./DebugPanel"},{"path":"packages/plugins/experimental/plugin-script/src/components/Toolbar/index.ts","kind":"import-statement","original":"./Toolbar"},{"path":"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor/index.ts","kind":"import-statement","original":"./TypescriptEditor"},{"path":"packages/plugins/experimental/plugin-script/src/bundler/index.ts","kind":"import-statement","original":"../bundler"},{"path":"packages/plugins/experimental/plugin-script/src/edge/index.ts","kind":"import-statement","original":"../edge"},{"path":"packages/plugins/experimental/plugin-script/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/experimental/plugin-script/src/templates.ts","kind":"import-statement","original":"../templates"},{"path":"packages/plugins/experimental/plugin-script/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/ScriptContainer.tsx":{"bytes":2763,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/components/ScriptEditor.tsx","kind":"import-statement","original":"./ScriptEditor"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/components/index.ts":{"bytes":1305,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/components/ScriptSettings/index.ts","kind":"import-statement","original":"./ScriptSettings"},{"path":"packages/plugins/experimental/plugin-script/src/components/ScriptSettingsPanel.tsx","kind":"import-statement","original":"./ScriptSettingsPanel"},{"path":"packages/plugins/experimental/plugin-script/src/components/AutomationPanel/index.ts","kind":"dynamic-import","original":"./AutomationPanel"},{"path":"packages/plugins/experimental/plugin-script/src/components/ScriptContainer.tsx","kind":"dynamic-import","original":"./ScriptContainer"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/translations.ts":{"bytes":3716,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/ScriptPlugin.tsx":{"bytes":22477,"imports":[{"path":"esbuild-wasm/esbuild.wasm?url","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/src/bundler/index.ts","kind":"import-statement","original":"./bundler"},{"path":"packages/plugins/experimental/plugin-script/src/compiler/index.ts","kind":"import-statement","original":"./compiler"},{"path":"packages/plugins/experimental/plugin-script/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/experimental/plugin-script/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/experimental/plugin-script/src/templates.ts","kind":"import-statement","original":"./templates"},{"path":"packages/plugins/experimental/plugin-script/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/experimental/plugin-script/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/experimental/plugin-script/src/index.ts":{"bytes":1149,"imports":[{"path":"packages/plugins/experimental/plugin-script/src/ScriptPlugin.tsx","kind":"import-statement","original":"./ScriptPlugin"},{"path":"packages/plugins/experimental/plugin-script/src/bundler/index.ts","kind":"import-statement","original":"./bundler"},{"path":"packages/plugins/experimental/plugin-script/src/compiler/index.ts","kind":"import-statement","original":"./compiler"},{"path":"packages/plugins/experimental/plugin-script/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/experimental/plugin-script/src/types/index.ts","kind":"import-statement","original":"./types"},{"path":"packages/plugins/experimental/plugin-script/src/ScriptPlugin.tsx","kind":"import-statement","original":"./ScriptPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/experimental/plugin-script/dist/lib/node-esm/edge/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/edge/index.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-4QWC64VN.mjs","kind":"import-statement"}],"exports":["HeaderCodec","USERFUNCTIONS_PRESET_META_KEY","codec","getInvocationUrl","getUserFunctionUrlInMetadata","matchServiceCredential","publicKeyToDid","setUserFunctionUrlInMetadata","uploadWorkerFunction"],"entryPoint":"packages/plugins/experimental/plugin-script/src/edge/index.ts","inputs":{},"bytes":596},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":23732},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/index.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-4SRPREUK.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-4QWC64VN.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-2HYWFUEN.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-SLTZMY34.mjs","kind":"import-statement"},{"path":"esbuild-wasm/esbuild.wasm?url","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@typescript/vfs","kind":"import-statement","external":true},{"path":"typescript","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/AutomationPanel-QFKOZXLO.mjs","kind":"dynamic-import"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/ScriptContainer-A4A663FM.mjs","kind":"dynamic-import"}],"exports":["AutomationPanel","Bundler","Compiler","FunctionType","ScriptAction","ScriptContainer","ScriptPlugin","ScriptSettings","ScriptSettingsPanel","ScriptType","default","initializeBundler"],"entryPoint":"packages/plugins/experimental/plugin-script/src/index.ts","inputs":{"packages/plugins/experimental/plugin-script/src/ScriptPlugin.tsx":{"bytesInOutput":5713},"packages/plugins/experimental/plugin-script/src/compiler/compiler.ts":{"bytesInOutput":1440},"packages/plugins/experimental/plugin-script/src/compiler/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-script/src/components/index.ts":{"bytesInOutput":182},"packages/plugins/experimental/plugin-script/src/components/ScriptSettings/ScriptSettings.tsx":{"bytesInOutput":1179},"packages/plugins/experimental/plugin-script/src/components/ScriptSettings/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-script/src/components/ScriptSettingsPanel.tsx":{"bytesInOutput":3235},"packages/plugins/experimental/plugin-script/src/translations.ts":{"bytesInOutput":1050},"packages/plugins/experimental/plugin-script/src/index.ts":{"bytesInOutput":32}},"bytes":14180},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/meta.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-SLTZMY34.mjs","kind":"import-statement"}],"exports":["SCRIPT_PLUGIN","default"],"entryPoint":"packages/plugins/experimental/plugin-script/src/meta.ts","inputs":{},"bytes":253},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/types/index.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-2HYWFUEN.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-SLTZMY34.mjs","kind":"import-statement"}],"exports":["FunctionType","ScriptAction","ScriptType"],"entryPoint":"packages/plugins/experimental/plugin-script/src/types/index.ts","inputs":{},"bytes":302},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/AutomationPanel-QFKOZXLO.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6558},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/AutomationPanel-QFKOZXLO.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-OFYGBUNI.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-4QWC64VN.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-2HYWFUEN.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-SLTZMY34.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"exports":["AutomationPanel","default"],"entryPoint":"packages/plugins/experimental/plugin-script/src/components/AutomationPanel/index.ts","inputs":{"packages/plugins/experimental/plugin-script/src/components/AutomationPanel/AutomationPanel.tsx":{"bytesInOutput":2738},"packages/plugins/experimental/plugin-script/src/components/AutomationPanel/index.ts":{"bytesInOutput":47}},"bytes":3455},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/ScriptContainer-A4A663FM.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":26346},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/ScriptContainer-A4A663FM.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-4SRPREUK.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-OFYGBUNI.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-4QWC64VN.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-2HYWFUEN.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-SLTZMY34.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"prettier","kind":"import-statement","external":true},{"path":"prettier/plugins/estree","kind":"import-statement","external":true},{"path":"prettier/plugins/typescript","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-client/halo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@codemirror/lang-javascript","kind":"import-statement","external":true},{"path":"@valtown/codemirror-ts","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/experimental/plugin-script/src/components/ScriptContainer.tsx","inputs":{"packages/plugins/experimental/plugin-script/src/components/ScriptContainer.tsx":{"bytesInOutput":649},"packages/plugins/experimental/plugin-script/src/components/ScriptEditor.tsx":{"bytesInOutput":6190},"packages/plugins/experimental/plugin-script/src/components/Toolbar/Toolbar.tsx":{"bytesInOutput":4490},"packages/plugins/experimental/plugin-script/src/components/Toolbar/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor/TypescriptEditor.tsx":{"bytesInOutput":1897},"packages/plugins/experimental/plugin-script/src/components/TypescriptEditor/index.ts":{"bytesInOutput":0}},"bytes":14356},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-4SRPREUK.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":21380},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-4SRPREUK.mjs":{"imports":[{"path":"esbuild-wasm","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["Bundler","initializeBundler","templates"],"inputs":{"packages/plugins/experimental/plugin-script/src/bundler/bundler.ts":{"bytesInOutput":7034},"packages/plugins/experimental/plugin-script/src/bundler/index.ts":{"bytesInOutput":0},"raw-loader:./templates/chat.ts?raw":{"bytesInOutput":2921},"raw-loader:./templates/chess.ts?raw":{"bytesInOutput":952},"raw-loader:./templates/echo.ts?raw":{"bytesInOutput":327},"raw-loader:./templates/email.ts?raw":{"bytesInOutput":855},"raw-loader:./templates/forex.ts?raw":{"bytesInOutput":481},"packages/plugins/experimental/plugin-script/src/templates.ts":{"bytesInOutput":703}},"bytes":13800},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-OFYGBUNI.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":14458},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-OFYGBUNI.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-SLTZMY34.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-syntax-highlighter","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"exports":["DebugPanel"],"inputs":{"packages/plugins/experimental/plugin-script/src/components/DebugPanel/DebugPanel.tsx":{"bytesInOutput":7771},"packages/plugins/experimental/plugin-script/src/components/DebugPanel/index.ts":{"bytesInOutput":0}},"bytes":8078},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-4QWC64VN.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":16820},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-4QWC64VN.mjs":{"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["HeaderCodec","USERFUNCTIONS_PRESET_META_KEY","codec","getInvocationUrl","getUserFunctionUrlInMetadata","matchServiceCredential","publicKeyToDid","setUserFunctionUrlInMetadata","uploadWorkerFunction"],"inputs":{"packages/plugins/experimental/plugin-script/src/edge/codec.ts":{"bytesInOutput":221},"packages/plugins/experimental/plugin-script/src/edge/header-codec.ts":{"bytesInOutput":2132},"packages/plugins/experimental/plugin-script/src/edge/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-script/src/edge/functions.ts":{"bytesInOutput":4234},"packages/plugins/experimental/plugin-script/src/edge/hub-protocol.ts":{"bytesInOutput":425}},"bytes":7787},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-2HYWFUEN.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3009},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-2HYWFUEN.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-SLTZMY34.mjs","kind":"import-statement"},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown/types","kind":"import-statement","external":true}],"exports":["FunctionType","ScriptAction","ScriptType"],"inputs":{"packages/plugins/experimental/plugin-script/src/types/schema.ts":{"bytesInOutput":978},"packages/plugins/experimental/plugin-script/src/types/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-script/src/types/types.ts":{"bytesInOutput":167}},"bytes":1530},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-SLTZMY34.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":739},"packages/plugins/experimental/plugin-script/dist/lib/node-esm/chunk-SLTZMY34.mjs":{"imports":[],"exports":["SCRIPT_PLUGIN","meta_default"],"inputs":{"packages/plugins/experimental/plugin-script/src/meta.ts":{"bytesInOutput":311}},"bytes":552}}}
@@ -3,7 +3,7 @@ import {
3
3
  FunctionType,
4
4
  ScriptAction,
5
5
  ScriptType
6
- } from "../chunk-P7ULFJ4T.mjs";
6
+ } from "../chunk-2HYWFUEN.mjs";
7
7
  import "../chunk-SLTZMY34.mjs";
8
8
  export {
9
9
  FunctionType,
@@ -1,13 +1,13 @@
1
1
  import React from 'react';
2
- import { type EchoReactiveObject } from '@dxos/client/echo';
2
+ import { type ReactiveEchoObject } from '@dxos/client/echo';
3
3
  import { FunctionType } from '../../types';
4
4
  export interface AutomationPanelProps {
5
- subject: EchoReactiveObject<any>;
5
+ subject: ReactiveEchoObject<any>;
6
6
  }
7
7
  export declare const AutomationPanel: ({ subject }: AutomationPanelProps) => React.JSX.Element;
8
8
  export interface ChatPanelProps {
9
9
  fn: FunctionType;
10
- subject: EchoReactiveObject<any>;
10
+ subject: ReactiveEchoObject<any>;
11
11
  }
12
12
  export interface BindingSelectProps {
13
13
  selectedFunction: FunctionType | null;
@@ -1 +1 @@
1
- {"version":3,"file":"AutomationPanel.d.ts","sourceRoot":"","sources":["../../../../../src/components/AutomationPanel/AutomationPanel.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAO5D,OAAO,EAAE,YAAY,EAAc,MAAM,aAAa,CAAC;AAGvD,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,kBAAkB,CAAC,GAAG,CAAC,CAAC;CAClC;AAED,eAAO,MAAM,eAAe,gBAAiB,oBAAoB,sBA0BhE,CAAC;AAEF,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,YAAY,CAAC;IACjB,OAAO,EAAE,kBAAkB,CAAC,GAAG,CAAC,CAAC;CAClC;AAoBD,MAAM,WAAW,kBAAkB;IACjC,gBAAgB,EAAE,YAAY,GAAG,IAAI,CAAC;IACtC,mBAAmB,EAAE,CAAC,EAAE,EAAE,YAAY,KAAK,IAAI,CAAC;IAChD,SAAS,EAAE,YAAY,EAAE,CAAC;CAC3B"}
1
+ {"version":3,"file":"AutomationPanel.d.ts","sourceRoot":"","sources":["../../../../../src/components/AutomationPanel/AutomationPanel.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAQ5D,OAAO,EAAE,YAAY,EAAc,MAAM,aAAa,CAAC;AAGvD,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,kBAAkB,CAAC,GAAG,CAAC,CAAC;CAClC;AAED,eAAO,MAAM,eAAe,gBAAiB,oBAAoB,sBA4BhE,CAAC;AAEF,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,YAAY,CAAC;IACjB,OAAO,EAAE,kBAAkB,CAAC,GAAG,CAAC,CAAC;CAClC;AAoBD,MAAM,WAAW,kBAAkB;IACjC,gBAAgB,EAAE,YAAY,GAAG,IAAI,CAAC;IACtC,mBAAmB,EAAE,CAAC,EAAE,EAAE,YAAY,KAAK,IAAI,CAAC;IAChD,SAAS,EAAE,YAAY,EAAE,CAAC;CAC3B"}
@@ -1 +1 @@
1
- {"version":3,"file":"DebugPanel.d.ts","sourceRoot":"","sources":["../../../../../src/components/DebugPanel/DebugPanel.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAG3D,OAAO,EAAuB,KAAK,eAAe,EAA2B,MAAM,gBAAgB,CAAC;AAapG,MAAM,MAAM,eAAe,GAAG,eAAe,CAAC;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC,CAAC;AAEH,eAAO,MAAM,UAAU,gCAAiC,eAAe,sBAkKtE,CAAC"}
1
+ {"version":3,"file":"DebugPanel.d.ts","sourceRoot":"","sources":["../../../../../src/components/DebugPanel/DebugPanel.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAGvE,OAAO,EAAuB,KAAK,eAAe,EAA2B,MAAM,gBAAgB,CAAC;AAapG,MAAM,MAAM,eAAe,GAAG,eAAe,CAAC;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC,CAAC;AAEH,eAAO,MAAM,UAAU,gCAAiC,eAAe,sBAgKtE,CAAC"}
@@ -3,14 +3,10 @@ import { type ScriptType } from '../../types';
3
3
  export type ScriptBlockProps = {
4
4
  script: ScriptType;
5
5
  hideSelector?: boolean;
6
- classes?: {
7
- root?: string;
8
- toolbar?: string;
9
- };
10
6
  containerUrl: string;
11
7
  };
12
8
  /**
13
9
  * @deprecated
14
10
  */
15
- export declare const ScriptBlock: ({ script, hideSelector, classes, containerUrl }: ScriptBlockProps) => React.JSX.Element;
11
+ export declare const ScriptBlock: ({ script, hideSelector, containerUrl }: ScriptBlockProps) => React.JSX.Element;
16
12
  //# sourceMappingURL=ScriptBlock.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ScriptBlock.d.ts","sourceRoot":"","sources":["../../../../../src/components/ScriptBlock/ScriptBlock.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAOzE,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAc9C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,UAAU,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE;QACR,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IAGF,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;GAEG;AAEH,eAAO,MAAM,WAAW,oDAAqD,gBAAgB,sBA+D5F,CAAC"}
1
+ {"version":3,"file":"ScriptBlock.d.ts","sourceRoot":"","sources":["../../../../../src/components/ScriptBlock/ScriptBlock.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAMzE,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAc9C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,UAAU,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IAGvB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;GAEG;AAEH,eAAO,MAAM,WAAW,2CAA4C,gBAAgB,sBA+DnF,CAAC"}