@dxos/plugin-automation 0.6.14-main.1366248
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +8 -0
- package/README.md +15 -0
- package/dist/lib/browser/PromptContainer-3GUENQHE.mjs +19 -0
- package/dist/lib/browser/PromptContainer-3GUENQHE.mjs.map +7 -0
- package/dist/lib/browser/chunk-2FOJUVYG.mjs +217 -0
- package/dist/lib/browser/chunk-2FOJUVYG.mjs.map +7 -0
- package/dist/lib/browser/chunk-J4SYTP4Y.mjs +55 -0
- package/dist/lib/browser/chunk-J4SYTP4Y.mjs.map +7 -0
- package/dist/lib/browser/chunk-PQLGYMNY.mjs +18 -0
- package/dist/lib/browser/chunk-PQLGYMNY.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +1150 -0
- package/dist/lib/browser/index.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -0
- package/dist/lib/browser/meta.mjs +9 -0
- package/dist/lib/browser/meta.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +16 -0
- package/dist/lib/browser/types/index.mjs.map +7 -0
- package/dist/lib/node/PromptContainer-74ZRO4HK.cjs +45 -0
- package/dist/lib/node/PromptContainer-74ZRO4HK.cjs.map +7 -0
- package/dist/lib/node/chunk-4TMTUB4X.cjs +240 -0
- package/dist/lib/node/chunk-4TMTUB4X.cjs.map +7 -0
- package/dist/lib/node/chunk-JSZ6PAYL.cjs +41 -0
- package/dist/lib/node/chunk-JSZ6PAYL.cjs.map +7 -0
- package/dist/lib/node/chunk-XS53UP75.cjs +76 -0
- package/dist/lib/node/chunk-XS53UP75.cjs.map +7 -0
- package/dist/lib/node/index.cjs +1152 -0
- package/dist/lib/node/index.cjs.map +7 -0
- package/dist/lib/node/meta.cjs +30 -0
- package/dist/lib/node/meta.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -0
- package/dist/lib/node/types/index.cjs +38 -0
- package/dist/lib/node/types/index.cjs.map +7 -0
- package/dist/lib/node-esm/PromptContainer-5OK4GWIR.mjs +20 -0
- package/dist/lib/node-esm/PromptContainer-5OK4GWIR.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-AAUSG7OA.mjs +56 -0
- package/dist/lib/node-esm/chunk-AAUSG7OA.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-B35UD3D7.mjs +20 -0
- package/dist/lib/node-esm/chunk-B35UD3D7.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-FN6DOJZP.mjs +218 -0
- package/dist/lib/node-esm/chunk-FN6DOJZP.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +1151 -0
- package/dist/lib/node-esm/index.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -0
- package/dist/lib/node-esm/meta.mjs +10 -0
- package/dist/lib/node-esm/meta.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +17 -0
- package/dist/lib/node-esm/types/index.mjs.map +7 -0
- package/dist/types/src/AutomationPlugin.d.ts +4 -0
- package/dist/types/src/AutomationPlugin.d.ts.map +1 -0
- package/dist/types/src/components/AutomationPanel.d.ts +3 -0
- package/dist/types/src/components/AutomationPanel.d.ts.map +1 -0
- package/dist/types/src/components/Chain.d.ts +12 -0
- package/dist/types/src/components/Chain.d.ts.map +1 -0
- package/dist/types/src/components/PromptContainer.d.ts +6 -0
- package/dist/types/src/components/PromptContainer.d.ts.map +1 -0
- package/dist/types/src/components/PromptEditor/PromptEditor.d.ts +10 -0
- package/dist/types/src/components/PromptEditor/PromptEditor.d.ts.map +1 -0
- package/dist/types/src/components/PromptEditor/PromptEditor.stories.d.ts +6 -0
- package/dist/types/src/components/PromptEditor/PromptEditor.stories.d.ts.map +1 -0
- package/dist/types/src/components/PromptEditor/index.d.ts +2 -0
- package/dist/types/src/components/PromptEditor/index.d.ts.map +1 -0
- package/dist/types/src/components/PromptEditor/prompt-extension.d.ts +4 -0
- package/dist/types/src/components/PromptEditor/prompt-extension.d.ts.map +1 -0
- package/dist/types/src/components/PromptEditor/types.d.ts +18 -0
- package/dist/types/src/components/PromptEditor/types.d.ts.map +1 -0
- package/dist/types/src/components/TriggerEditor/Form.d.ts +5 -0
- package/dist/types/src/components/TriggerEditor/Form.d.ts.map +1 -0
- package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts +8 -0
- package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts.map +1 -0
- package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts +5 -0
- package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts.map +1 -0
- package/dist/types/src/components/TriggerEditor/email.d.ts +4 -0
- package/dist/types/src/components/TriggerEditor/email.d.ts.map +1 -0
- package/dist/types/src/components/TriggerEditor/index.d.ts +2 -0
- package/dist/types/src/components/TriggerEditor/index.d.ts.map +1 -0
- package/dist/types/src/components/TriggerEditor/invokation-handler.d.ts +5 -0
- package/dist/types/src/components/TriggerEditor/invokation-handler.d.ts.map +1 -0
- package/dist/types/src/components/TriggerEditor/meta.d.ts +25 -0
- package/dist/types/src/components/TriggerEditor/meta.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +6 -0
- package/dist/types/src/components/index.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +7 -0
- package/dist/types/src/index.d.ts.map +1 -0
- package/dist/types/src/meta.d.ts +11 -0
- package/dist/types/src/meta.d.ts.map +1 -0
- package/dist/types/src/presets.d.ts +9 -0
- package/dist/types/src/presets.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +18 -0
- package/dist/types/src/translations.d.ts.map +1 -0
- package/dist/types/src/types/chain.d.ts +71 -0
- package/dist/types/src/types/chain.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +3 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/src/types/types.d.ts +8 -0
- package/dist/types/src/types/types.d.ts.map +1 -0
- package/package.json +99 -0
- package/src/AutomationPlugin.tsx +158 -0
- package/src/components/AutomationPanel.tsx +21 -0
- package/src/components/Chain.tsx +66 -0
- package/src/components/PromptContainer.tsx +19 -0
- package/src/components/PromptEditor/PromptEditor.stories.tsx +64 -0
- package/src/components/PromptEditor/PromptEditor.tsx +222 -0
- package/src/components/PromptEditor/index.ts +5 -0
- package/src/components/PromptEditor/prompt-extension.ts +43 -0
- package/src/components/PromptEditor/types.tsx +28 -0
- package/src/components/TriggerEditor/Form.tsx +18 -0
- package/src/components/TriggerEditor/TriggerEditor.stories.tsx +82 -0
- package/src/components/TriggerEditor/TriggerEditor.tsx +346 -0
- package/src/components/TriggerEditor/email.ts +49 -0
- package/src/components/TriggerEditor/index.ts +5 -0
- package/src/components/TriggerEditor/invokation-handler.ts +110 -0
- package/src/components/TriggerEditor/meta.tsx +225 -0
- package/src/components/index.ts +12 -0
- package/src/index.ts +12 -0
- package/src/meta.ts +16 -0
- package/src/presets.ts +248 -0
- package/src/translations.ts +31 -0
- package/src/types/chain.ts +38 -0
- package/src/types/index.ts +6 -0
- package/src/types/types.ts +29 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/AutomationPlugin.tsx", "../../../src/components/index.ts", "../../../src/components/AutomationPanel.tsx", "../../../src/components/Chain.tsx", "../../../src/presets.ts", "../../../src/components/TriggerEditor/TriggerEditor.tsx", "../../../src/components/TriggerEditor/Form.tsx", "../../../src/components/TriggerEditor/invokation-handler.ts", "../../../src/components/TriggerEditor/email.ts", "../../../src/components/TriggerEditor/meta.tsx", "../../../src/translations.ts", "../../../src/index.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type PluginDefinition, parseMetadataResolverPlugin, resolvePlugin } from '@dxos/app-framework';\nimport { FunctionDef, FunctionTrigger } from '@dxos/functions/types';\nimport { invariant } from '@dxos/invariant';\nimport { parseClientPlugin } from '@dxos/plugin-client';\nimport { createExtension, toSignal } from '@dxos/plugin-graph';\nimport { getTypename, loadObjectReferences, parseId } from '@dxos/react-client/echo';\n\nimport { AutomationPanel } from './components';\nimport meta, { AUTOMATION_PLUGIN } from './meta';\nimport translations from './translations';\nimport { AutomationAction, type AutomationPluginProvides, ChainPromptType, ChainType } from './types';\n\n// TODO(burdon): Prompt article.\n// TODO(burdon): Trigger panel.\n\nexport const AutomationPlugin = (): PluginDefinition<AutomationPluginProvides> => {\n return {\n meta,\n provides: {\n metadata: {\n records: {\n [ChainType.typename]: {\n placeholder: ['object placeholder', { ns: AUTOMATION_PLUGIN }],\n icon: 'ph--magic-wand--regular',\n // TODO(wittjosiah): Move out of metadata.\n loadReferences: (chain: ChainType) => loadObjectReferences(chain, (chain) => chain.prompts),\n },\n },\n },\n translations,\n echo: {\n schema: [ChainType, ChainPromptType, FunctionDef, FunctionTrigger],\n },\n complementary: {\n panels: [\n {\n id: 'automation',\n label: ['open automation panel label', { ns: AUTOMATION_PLUGIN }],\n icon: 'ph--flow-arrow--regular',\n },\n ],\n },\n graph: {\n builder: (plugins) => {\n const clientPlugin = resolvePlugin(plugins, parseClientPlugin);\n const metadataPlugin = resolvePlugin(plugins, parseMetadataResolverPlugin);\n const resolve = metadataPlugin?.provides.metadata.resolver;\n const client = clientPlugin?.provides.client;\n invariant(resolve);\n invariant(client);\n\n return [\n // Create nodes for object settings.\n createExtension({\n id: `${AUTOMATION_PLUGIN}/automation-for-subject`,\n resolver: ({ id }) => {\n if (!id.endsWith('~automation')) {\n return;\n }\n\n const type = 'orphan-settings-for-subject';\n const icon = 'ph--flow-arrow--regular';\n\n const [subjectId] = id.split('~');\n const { spaceId, objectId } = parseId(subjectId);\n const space = client.spaces.get().find((space) => space.id === spaceId);\n if (!objectId) {\n // TODO(burdon): Ref SPACE_PLUGIN ns.\n const label = space\n ? space.properties.name || ['unnamed space label', { ns: AUTOMATION_PLUGIN }]\n : ['unnamed object settings label', { ns: AUTOMATION_PLUGIN }];\n\n // TODO(wittjosiah): Support comments for arbitrary subjects.\n // This is to ensure that the comments panel is not stuck on an old object.\n return {\n id,\n type,\n data: null,\n properties: {\n icon,\n label,\n showResolvedThreads: false,\n object: null,\n space,\n },\n };\n }\n\n const object = toSignal(\n (onChange) => {\n const timeout = setTimeout(async () => {\n await space?.db.loadObjectById(objectId);\n onChange();\n });\n\n return () => clearTimeout(timeout);\n },\n () => space?.db.getObjectById(objectId),\n subjectId,\n );\n if (!object || !subjectId) {\n return;\n }\n\n const meta = resolve(getTypename(object) ?? '');\n const label = meta.label?.(object) ||\n object.name ||\n meta.placeholder || ['unnamed object settings label', { ns: AUTOMATION_PLUGIN }];\n\n return {\n id,\n type,\n data: null,\n properties: {\n icon,\n label,\n object,\n },\n };\n },\n }),\n ];\n },\n },\n surface: {\n component: ({ data, role }) => {\n switch (role) {\n // case 'article':\n // return data.object instanceof ChainType ? <ChainArticle chain={data.object} /> : null;\n\n case 'complementary--automation':\n return <AutomationPanel />;\n }\n\n return null;\n },\n },\n intent: {\n resolver: (intent) => {\n switch (intent.action) {\n case AutomationAction.CREATE: {\n return {\n // data: create(ChainType, { prompts: [] }),\n // data: create(FunctionTrigger, { function: '', spec: { type: 'timer', cron: '' } }),\n };\n }\n }\n },\n },\n },\n };\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { lazy } from 'react';\n\nexport const PromptContainer = lazy(() => import('./PromptContainer'));\n\nexport * from './AutomationPanel';\nexport * from './Chain';\nexport * from './PromptEditor';\nexport * from './TriggerEditor';\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Button, Icon, Toolbar } from '@dxos/react-ui';\n\nexport const AutomationPanel = () => {\n const handleCreate = () => {};\n\n return (\n <div className='flex flex-col'>\n <Toolbar.Root classNames='p-2'>\n <Button onClick={handleCreate}>\n <Icon icon='ph--plus--regular' />\n </Button>\n </Toolbar.Root>\n </div>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { type FC } from 'react';\n\nimport { getSpace } from '@dxos/react-client/echo';\nimport { Select, useTranslation } from '@dxos/react-ui';\nimport { nonNullable } from '@dxos/util';\n\nimport { PromptEditor } from './PromptEditor';\nimport { AUTOMATION_PLUGIN } from '../meta';\nimport { chainPresets, type Preset } from '../presets';\nimport { type ChainType } from '../types';\n\nexport type ChainProps = {\n chain: ChainType;\n};\n\nexport const Chain = ({ chain }: ChainProps) => {\n const space = getSpace(chain);\n if (!space) {\n return null;\n }\n\n const handleSelectPreset = (preset: Preset) => {\n chain.name = preset.title;\n // TODO(burdon): API issue.\n chain.prompts?.filter(nonNullable).forEach((prompt) => space.db.remove(prompt));\n chain.prompts = [preset.createPrompt()];\n };\n\n return (\n <div className='flex flex-col my-2 gap-4'>\n {chain.prompts?.filter(nonNullable).map((prompt, i) => <PromptEditor key={i} prompt={prompt} />)}\n <div className='p-2'>\n <ChainPresets presets={chainPresets} onSelect={handleSelectPreset} />\n </div>\n </div>\n );\n};\n\nexport const ChainPresets: FC<{ presets: Preset[]; onSelect: (preset: Preset) => void }> = ({ presets, onSelect }) => {\n const { t } = useTranslation(AUTOMATION_PLUGIN);\n\n return (\n <Select.Root\n onValueChange={(value) => {\n onSelect(presets.find(({ id }) => id === value)!);\n }}\n >\n <Select.TriggerButton classNames='w-full' placeholder={t('select preset template placeholder')} />\n <Select.Portal>\n <Select.Content>\n <Select.Viewport>\n {presets.map(({ id, title }) => (\n <Select.Option key={id} value={id}>\n {title}\n </Select.Option>\n ))}\n </Select.Viewport>\n </Select.Content>\n </Select.Portal>\n </Select.Root>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { create } from '@dxos/echo-schema';\n\nimport { ChainInputType, ChainPromptType } from './types';\n\nexport const str = (...text: (string | undefined | boolean)[]): string =>\n text\n .filter((value) => value !== undefined && value !== false)\n .flat()\n .join('\\n');\n\nexport type Preset = {\n id: string;\n title: string;\n createPrompt: () => ChainPromptType;\n};\n\nexport const chainPresets: Preset[] = [\n {\n id: 'dxos.org/prompt/translate',\n title: 'Translate',\n createPrompt: () =>\n create(ChainPromptType, {\n command: 'say',\n template: str(\n // prettier-ignore\n 'Translate the following into {language}:',\n '',\n '---',\n '',\n '{input}',\n ),\n inputs: [\n {\n type: ChainInputType.VALUE,\n name: 'language',\n value: 'japanese',\n },\n {\n type: ChainInputType.PASS_THROUGH,\n name: 'input',\n },\n // TODO(burdon): Message.\n // {\n // type: ChainInputType.CONTEXT,\n // name: 'input',\n // value: 'object.text',\n // },\n ],\n }),\n },\n {\n id: 'dxos.org/prompt/chess',\n title: 'Chess',\n createPrompt: () =>\n create(ChainPromptType, {\n command: 'hint',\n template: str(\n // prettier-ignore\n 'You are a machine that is an expert chess player.',\n '',\n 'The move history of the current game is: {history}',\n '',\n 'Suggest the next move and very briefly explain your strategy in a couple of sentences.',\n ),\n inputs: [\n {\n type: ChainInputType.CONTEXT,\n name: 'history',\n value: 'object.pgn',\n },\n ],\n }),\n },\n {\n id: 'dxos.org/prompt/mermaid',\n title: 'Mermaid',\n createPrompt: () =>\n create(ChainPromptType, {\n command: 'draw',\n template: str(\n // prettier-ignore\n 'Create a simplified mermaid graph representing the text below.',\n 'Do not explain anything.',\n '',\n '---',\n '',\n '{input}',\n ),\n inputs: [\n {\n type: ChainInputType.PASS_THROUGH,\n name: 'input',\n },\n ],\n }),\n },\n {\n id: 'dxos.org/prompt/list',\n title: 'List',\n createPrompt: () =>\n create(ChainPromptType, {\n command: 'list',\n template: str(\n // prettier-ignore\n 'You are a machine that only replies with valid, iterable RFC8259 compliant JSON in your responses.',\n 'Your entire response should be a single array of JSON objects.',\n '',\n 'Your entire response should be a map where the key is the type and the value is a single array of JSON objects conforming to the following types:',\n '',\n '{schema}',\n '',\n '---',\n '',\n '{question}',\n ),\n inputs: [\n {\n type: ChainInputType.SCHEMA,\n name: 'schema',\n value: 'example.com/type/project',\n },\n {\n type: ChainInputType.PASS_THROUGH,\n name: 'question',\n },\n ],\n }),\n },\n {\n id: 'dxos.org/prompt/base',\n title: 'RAG',\n createPrompt: () =>\n create(ChainPromptType, {\n command: 'rag',\n template: str(\n // prettier-ignore\n \"Very briefly answer the question based only on the following context and say if you don't know the answer.\",\n // 'answer the question using the following context as well as your training data:',\n '',\n '{context}',\n '',\n '---',\n '',\n 'question: {question}',\n ),\n inputs: [\n {\n type: ChainInputType.RETRIEVER,\n name: 'context',\n },\n {\n type: ChainInputType.CONTEXT,\n name: 'question',\n value: 'object.text',\n },\n ],\n }),\n },\n {\n id: 'dxos.org/prompt/lookup',\n title: 'Lookup',\n createPrompt: () =>\n create(ChainPromptType, {\n command: 'lookup',\n template: str(\n // prettier-ignore\n 'Lookup and very briefly summarize the following topic in one or two sentences:',\n '',\n '---',\n '',\n '{input}',\n ),\n inputs: [\n {\n type: ChainInputType.CONTEXT,\n name: 'input',\n value: 'text',\n },\n ],\n }),\n },\n {\n id: 'dxos.org/prompt/extract',\n title: 'Extract',\n createPrompt: () =>\n create(ChainPromptType, {\n command: 'extract',\n template: str(\n // prettier-ignore\n 'List all people and companies mentioned in the text below.',\n '',\n 'You are a machine that only replies with valid, iterable RFC8259 compliant JSON in your responses.',\n 'Your entire response should be a map where the key is the type and the value is a single array of JSON objects conforming to the following types:',\n '',\n '{contact}',\n '{company}',\n '',\n '---',\n '',\n '{input}',\n ),\n inputs: [\n {\n type: ChainInputType.SCHEMA,\n name: 'contact',\n value: 'example.com/type/contact',\n },\n {\n type: ChainInputType.SCHEMA,\n name: 'company',\n value: 'example.com/type/organization',\n },\n {\n type: ChainInputType.CONTEXT,\n name: 'input',\n value: 'text',\n },\n ],\n }),\n },\n {\n id: 'dxos.org/prompt/discord',\n title: 'Summarize',\n createPrompt: () =>\n create(ChainPromptType, {\n command: 'summarize',\n template: str(\n // prettier-ignore\n 'Summarize what the team is working on and format it as a markdown table without any explanation.',\n '',\n '---',\n '',\n '{context}',\n ),\n inputs: [\n {\n type: ChainInputType.RESOLVER,\n name: 'context',\n value: 'discord.messages.recent',\n },\n ],\n }),\n },\n];\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { type ChangeEventHandler, type FC, useEffect, useMemo, useState } from 'react';\n\nimport { Mutex } from '@dxos/async';\nimport { Context } from '@dxos/context';\nimport { createSubscriptionTrigger, createWebsocketTrigger, type TriggerFactory } from '@dxos/functions';\nimport {\n FunctionTrigger,\n type FunctionTriggerType,\n type SubscriptionTrigger,\n type TimerTrigger,\n type TriggerSpec,\n type WebhookTrigger,\n type WebsocketTrigger,\n} from '@dxos/functions/types';\nimport { log } from '@dxos/log';\nimport { ScriptType } from '@dxos/plugin-script/types';\nimport { useClient } from '@dxos/react-client';\nimport { Filter, type Space, useQuery } from '@dxos/react-client/echo';\nimport { Input, Select } from '@dxos/react-ui';\nimport { distinctBy } from '@dxos/util';\n\nimport { InputRow } from './Form';\nimport { invokeFunction } from './invokation-handler';\nimport { getFunctionMetaExtension, state } from './meta';\n\nconst triggerTypes: FunctionTriggerType[] = ['subscription', 'timer', 'webhook', 'websocket'];\n\nconst registerTriggersMutex = new Mutex();\n\nexport const TriggerEditor = ({ space, trigger }: { space: Space; trigger: FunctionTrigger }) => {\n const client = useClient();\n const scripts = useQuery(space, Filter.schema(ScriptType));\n const script = useMemo(() => scripts.find((script) => script.id === trigger.function), [trigger.function, scripts]);\n\n // TODO(burdon): Factor out, creating context for plugin (runs outside of component).\n const [registry] = useState(new Map<string, Context>());\n const triggers = useQuery(space, Filter.schema(FunctionTrigger));\n useEffect(() => {\n setTimeout(async () => {\n // Mark-and-sweep removing disabled triggers.\n await registerTriggersMutex.executeSynchronized(async () => {\n const deprecated = new Set(Array.from(registry.keys()));\n log.info('triggers', {\n deprecated,\n all: triggers.map((t) => t.id),\n enabled: triggers.filter((t) => t.enabled).map((t) => t.id),\n });\n\n for (const trigger of triggers) {\n if (trigger.enabled) {\n if (registry.has(trigger.id)) {\n deprecated.delete(trigger.id);\n continue;\n }\n log.info('activating trigger', trigger.id);\n\n const ctx = new Context();\n registry.set(trigger.id, ctx);\n const triggerSpec = trigger.spec;\n\n let triggerFactory: TriggerFactory<any>;\n if (triggerSpec.type === 'subscription') {\n triggerFactory = createSubscriptionTrigger;\n } else if (triggerSpec.type === 'websocket') {\n triggerFactory = createWebsocketTrigger;\n } else {\n log.info('unsupported trigger', { type: triggerSpec.type });\n continue;\n }\n\n await triggerFactory(ctx, space, trigger.spec, (data: any) => {\n return invokeFunction(client, space, trigger, data);\n });\n }\n }\n\n for (const id of deprecated) {\n const ctx = registry.get(id);\n if (ctx) {\n await ctx.dispose();\n registry.delete(id);\n }\n }\n });\n });\n }, [JSON.stringify(triggers)]);\n\n useEffect(() => {\n return () => {\n for (const ctx of registry.values()) {\n void ctx.dispose();\n }\n };\n }, []);\n\n useEffect(() => {\n void space.db.schemaRegistry\n .query()\n .then((schemas) => {\n // TODO(zan): We should solve double adding of stored schemas in the schema registry.\n state.schemas = distinctBy([...state.schemas, ...schemas], (schema) => schema.typename).sort((a, b) =>\n a.typename < b.typename ? -1 : 1,\n );\n })\n .catch(() => {});\n }, [space]);\n\n // Keen an enriched version of the schema in memory so we can share it with prompt editor.\n useEffect(() => {\n const spec = trigger.spec;\n if (spec.type === 'subscription') {\n if (spec.filter && spec.filter.length > 0) {\n const type = spec.filter[0].type;\n const foundSchema = state.schemas.find((schema) => schema.typename === type);\n if (foundSchema) {\n state.selectedSchema[trigger.id] = foundSchema;\n }\n }\n }\n // TODO(burdon): API issue.\n }, [JSON.stringify(trigger.spec), state.schemas]);\n\n useEffect(() => {\n if (!trigger.meta) {\n const extension = getFunctionMetaExtension(trigger, script);\n trigger.meta = extension?.initialValue?.();\n }\n }, [trigger.function, trigger.meta]);\n\n const handleSelectFunction = (value: string) => {\n const match = scripts.find((fn) => fn.id === value);\n if (match) {\n trigger.function = match.id;\n }\n };\n\n const handleSelectTriggerType = (triggerType: string) => {\n switch (triggerType as FunctionTriggerType) {\n case 'subscription': {\n trigger.spec = { type: 'subscription', filter: [] };\n break;\n }\n case 'timer': {\n trigger.spec = { type: 'timer', cron: '0 0 * * *' };\n break;\n }\n case 'webhook': {\n trigger.spec = { type: 'webhook', method: 'GET' };\n break;\n }\n case 'websocket': {\n // TODO(burdon): The `init` property is currently mail worker specific.\n trigger.spec = { type: 'websocket', url: '', init: { type: 'sync' } };\n break;\n }\n }\n };\n\n const TriggerMeta = getFunctionMetaExtension(trigger, script)?.component;\n\n return (\n <div className='flex flex-col py-1'>\n <table className='is-full table-fixed'>\n <tbody>\n <InputRow label='Function'>\n <Select.Root value={script?.id} onValueChange={handleSelectFunction}>\n <Select.TriggerButton placeholder={'Select function'} />\n <Select.Portal>\n <Select.Content>\n <Select.Viewport>\n {scripts.map(({ id, name }) => (\n <Select.Option key={id} value={id}>\n {name ?? 'Unnamed'}\n </Select.Option>\n ))}\n </Select.Viewport>\n </Select.Content>\n </Select.Portal>\n </Select.Root>\n </InputRow>\n {script?.description?.length && (\n <InputRow>\n <div className='px-2'>\n <p className='text-sm text-description'>{script?.description?.length}</p>\n </div>\n </InputRow>\n )}\n <InputRow label='Type'>\n <Select.Root value={trigger.spec?.type} onValueChange={handleSelectTriggerType}>\n <Select.TriggerButton placeholder={'Select trigger'} />\n <Select.Portal>\n <Select.Content>\n <Select.Viewport>\n {triggerTypes.map((trigger) => (\n <Select.Option key={trigger} value={trigger}>\n {trigger}\n </Select.Option>\n ))}\n </Select.Viewport>\n </Select.Content>\n </Select.Portal>\n </Select.Root>\n </InputRow>\n </tbody>\n <tbody>\n {trigger.spec && <TriggerSpec space={space} spec={trigger.spec} />}\n <InputRow label='Enabled'>\n {/* TODO(burdon): Hack to make the switch the same height as other controls. */}\n <div className='flex items-center h-8'>\n <Input.Switch checked={trigger.enabled} onCheckedChange={(checked) => (trigger.enabled = !!checked)} />\n </div>\n </InputRow>\n </tbody>\n {TriggerMeta && (\n <tbody>\n <tr>\n <td />\n <td className='py-2'>\n <div className='border-b border-separator' />\n </td>\n </tr>\n <TriggerMeta meta={trigger.meta} />\n </tbody>\n )}\n </table>\n </div>\n );\n};\n\n//\n// Trigger specs\n//\n\nconst TriggerSpecSubscription = ({ spec }: TriggerSpecProps<SubscriptionTrigger>) => {\n if (!spec.filter) {\n return null;\n }\n\n const handleSelectSchema = (typename: string) => {\n spec.filter = [{ type: typename }];\n };\n\n return (\n <>\n <InputRow label='Filter'>\n <Select.Root\n value={spec.filter.length > 0 ? spec.filter[0].type : undefined}\n onValueChange={handleSelectSchema}\n >\n <Select.TriggerButton classNames='w-full' placeholder={'Select type'} />\n <Select.Portal>\n <Select.Content>\n <Select.Viewport>\n {state.schemas.map(({ typename }: any) => (\n <Select.Option key={typename} value={typename}>\n {typename}\n </Select.Option>\n ))}\n </Select.Viewport>\n </Select.Content>\n </Select.Portal>\n </Select.Root>\n </InputRow>\n </>\n );\n};\n\nconst TriggerSpecTimer = ({ spec }: TriggerSpecProps<TimerTrigger>) => (\n <>\n <InputRow label='Cron'>\n <Input.TextInput value={spec.cron} onChange={(event) => (spec.cron = event.target.value)} />\n </InputRow>\n </>\n);\n\nconst methods = ['GET', 'POST'];\n\nconst TriggerSpecWebhook = ({ spec }: TriggerSpecProps<WebhookTrigger>) => (\n <>\n <InputRow label='Method'>\n <Select.Root value={spec.method} onValueChange={(value) => (spec.method = value)}>\n <Select.TriggerButton placeholder={'type'} />\n <Select.Portal>\n <Select.Content>\n <Select.Viewport>\n {methods.map((method) => (\n <Select.Option key={method} value={method}>\n {method}\n </Select.Option>\n ))}\n </Select.Viewport>\n </Select.Content>\n </Select.Portal>\n </Select.Root>\n </InputRow>\n </>\n);\n\nconst TriggerSpecWebsocket = ({ spec }: TriggerSpecProps<WebsocketTrigger>) => {\n const handleChangeInit: ChangeEventHandler<HTMLInputElement> = (event) => {\n try {\n spec.init = JSON.parse(event.target.value);\n } catch (err) {\n // Ignore.\n }\n };\n\n return (\n <>\n <InputRow label='Endpoint'>\n <Input.TextInput\n value={spec.url}\n onChange={(event) => (spec.url = event.target.value)}\n placeholder='https://'\n />\n </InputRow>\n <InputRow label='Init'>\n <Input.TextInput value={JSON.stringify(spec.init)} onChange={handleChangeInit} placeholder='Initial message.' />\n </InputRow>\n </>\n );\n};\n\n//\n// Trigger spec.\n//\n\ntype TriggerSpecProps<T = TriggerSpec> = { space: Space; spec: T };\n\nconst triggerRenderers: {\n [key in FunctionTriggerType]: FC<TriggerSpecProps<any>>;\n} = {\n subscription: TriggerSpecSubscription,\n timer: TriggerSpecTimer,\n webhook: TriggerSpecWebhook,\n websocket: TriggerSpecWebsocket,\n};\n\nconst TriggerSpec = ({ space, spec }: TriggerSpecProps) => {\n const Component = triggerRenderers[spec.type];\n return Component ? <Component space={space} spec={spec} /> : null;\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { type PropsWithChildren } from 'react';\n\nimport { Input } from '@dxos/react-ui';\n\nexport const InputRow = ({ label, children }: PropsWithChildren<{ label?: string }>) => (\n <Input.Root>\n <tr>\n <td className='w-[80px] px-2 text-right align-top pt-3 overflow-hidden'>\n <Input.Label classNames='truncate text-xs'>{label}</Input.Label>\n </td>\n <td className='p-1 pr-2'>{children}</td>\n </tr>\n </Input.Root>\n);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { sleep } from '@dxos/async';\nimport { getObjectCore } from '@dxos/echo-db';\nimport type { AnyObjectData } from '@dxos/echo-schema';\nimport { type FunctionTrigger } from '@dxos/functions';\nimport { invariant } from '@dxos/invariant';\nimport { DXN, LOCAL_SPACE_TAG } from '@dxos/keys';\nimport { log } from '@dxos/log';\nimport { FunctionType } from '@dxos/plugin-script';\nimport { type Client, type Config } from '@dxos/react-client';\nimport { type Space } from '@dxos/react-client/echo';\n\nimport { handleEmail } from './email';\n\nconst MAX_RETRIES = 3;\nconst RETRY_DELAY = 1_000;\n\nconst callFunction = async (funcUrl: string, trigger: any, data: any) => {\n const body = { event: 'trigger', trigger, data };\n\n let retryCount = 0;\n while (retryCount < MAX_RETRIES) {\n log.info('exec', { funcUrl, body, retryCount });\n const response = await fetch(funcUrl, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(body),\n });\n\n const data = await response.text();\n log.info('response', { status: response.status, body: data });\n if (response.status === 409) {\n retryCount++;\n await sleep(RETRY_DELAY * Math.min(retryCount, 2));\n continue;\n }\n\n return { status: response.status, data };\n }\n return { status: 500 };\n};\n\nexport const invokeFunction = async (client: Client, space: Space, trigger: FunctionTrigger, data: any) => {\n try {\n if (trigger.spec.type === 'websocket') {\n return handleEmail(space, data.data);\n }\n\n const script = await space.crud.query({ id: trigger.function }).first();\n const { objects: functions } = await space.crud.query({ __typename: FunctionType.typename }).run();\n const func = functions.find((fn) => referenceEquals(fn.source, trigger.function)) as AnyObjectData | undefined;\n const funcSlug = func?.__meta.keys.find((key) => key.source === USERFUNCTIONS_META_KEY)?.id;\n if (!funcSlug) {\n log.warn('function not deployed', { scriptId: script.id, name: script.name });\n return 404;\n }\n\n const funcUrl = getFunctionUrl(client.config, funcSlug, space.id);\n const triggerData: AnyObjectData = {\n ...getObjectCore(trigger).toPlainObject(),\n // TODO: Remove when functions can query by DXN.\n promptId: trigger.meta?.prompt?.id,\n };\n // TODO: Remove when functions can add objects and easily modify collections (push, splice).\n return (await callFunction(funcUrl, triggerData, data)).status;\n } catch (err) {\n return 400;\n }\n};\n\nconst USERFUNCTIONS_META_KEY = 'dxos.org/service/function';\n\nconst getFunctionUrl = (config: Config, slug: string, spaceId?: string) => {\n const baseUrl = new URL('functions/', config.values.runtime?.services?.edge?.url);\n\n // Leading slashes cause the URL to be treated as an absolute path.\n const relativeUrl = slug.replace(/^\\//, '');\n const url = new URL(`./${relativeUrl}`, baseUrl.toString());\n spaceId && url.searchParams.set('spaceId', spaceId);\n url.protocol = 'https';\n return url.toString();\n};\n\n// TODO(dmaretskyi): Factor out.\n\ntype ReferenceLike = { '/': string } | string;\n\nconst referenceEquals = (a: ReferenceLike, b: ReferenceLike): boolean => {\n const aDXN = toDXN(a);\n const bDXN = toDXN(b);\n return aDXN.toString() === bDXN.toString();\n};\n\nconst toDXN = (ref: ReferenceLike): DXN => {\n if (typeof ref === 'string') {\n if (ref.startsWith('dxn:')) {\n return DXN.parse(ref);\n } else {\n return new DXN(DXN.kind.ECHO, [LOCAL_SPACE_TAG, ref]);\n }\n }\n\n invariant(typeof ref['/'] === 'string');\n return DXN.parse(ref['/']);\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { findObjectWithForeignKey } from '@dxos/echo-db';\nimport { create, foreignKey } from '@dxos/echo-schema';\nimport { log } from '@dxos/log';\nimport { MailboxType } from '@dxos/plugin-inbox/types';\nimport { MessageType } from '@dxos/plugin-space/types';\nimport { type Space, Filter } from '@dxos/react-client/echo';\n\nexport const SOURCE_ID = 'hub.dxos.network/api/mailbox';\n\nexport const handleEmail = async (space: Space, data: any) => {\n const { messages } = data;\n\n // Create mailbox if doesn't exist.\n const { objects: mailboxes } = await space.db.query(Filter.schema(MailboxType)).run();\n const mailbox = mailboxes[0] ?? space.db.add(create(MailboxType, { messages: [] }));\n\n log.info('messages', { count: messages.length, existingMailbox: mailboxes.length > 0 });\n\n const { objects } = await space.db.query(Filter.schema(MessageType)).run();\n for (const message of messages) {\n let object = findObjectWithForeignKey(objects, { source: SOURCE_ID, id: String(message.id) });\n if (!object) {\n object = space.db.add(\n create(\n MessageType,\n {\n sender: { email: message.from },\n timestamp: new Date(message.created).toISOString(),\n text: message.body,\n properties: {\n subject: message.subject,\n to: [{ email: message.to }],\n },\n },\n {\n keys: [foreignKey(SOURCE_ID, String(message.id))],\n },\n ),\n );\n mailbox.messages?.push(object);\n }\n }\n\n return 200;\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { type FC } from 'react';\n\nimport { create, getMeta as getEchoMeta } from '@dxos/echo-schema';\nimport { type FunctionTrigger } from '@dxos/functions/types';\nimport { GameType } from '@dxos/plugin-chess/types';\nimport { FileType } from '@dxos/plugin-ipfs/types';\nimport { DocumentType } from '@dxos/plugin-markdown';\nimport { type ScriptType } from '@dxos/plugin-script';\nimport { DiagramType } from '@dxos/plugin-sketch/types';\nimport { CollectionType, MessageType } from '@dxos/plugin-space';\nimport { Input } from '@dxos/react-ui';\nimport { safeParseInt } from '@dxos/util';\n\nimport { InputRow } from './Form';\nimport { chainPresets } from '../../presets';\nimport { type ChainPromptType } from '../../types';\nimport { ChainPresets } from '../Chain';\nimport { PromptEditor } from '../PromptEditor';\n\n// TODO(burdon): Factor out deps (remove from package.json). Provide via plugins.\n\ntype TriggerId = string;\n\nconst stateInitialValues = {\n schemas: [\n // TODO(burdon): Get all schema from API.\n DocumentType,\n FileType,\n GameType,\n MessageType,\n DiagramType,\n CollectionType,\n ] as any[],\n selectedSchema: {} as Record<TriggerId, any>,\n};\n\n// TODO(burdon): What is this for?\nexport const state = create<typeof stateInitialValues>(stateInitialValues);\n\n//\n// Trigger meta.\n// TODO(burdon): Custom/generated UX to provide values to functions from types/other metadata.\n//\n\ntype MetaProps<T> = { meta: T } & { triggerId?: string };\n\ntype MetaExtension<T> = {\n initialValue?: () => T;\n component: FC<MetaProps<T>>;\n};\n\nconst USERFUNCTIONS_PRESET_META_KEY = 'dxos.org/service/function-preset';\n\n/**\n * Create meta type from function.\n * @param trigger - function trigger.\n * @param script - function script.\n */\nexport const getFunctionMetaExtension = (\n trigger: FunctionTrigger,\n script?: ScriptType,\n): MetaExtension<any> | undefined => {\n if (script) {\n const meta = getEchoMeta(script).keys.find((key) => key.source === USERFUNCTIONS_PRESET_META_KEY);\n const extension = meta && metaExtensions[meta.id];\n if (extension) {\n return extension;\n }\n }\n // TODO: try to infer by spec type?\n return trigger?.function ? metaExtensions[trigger.function] : metaExtensions['dxos.org/function/gpt'];\n};\n\n//\n// Default (generic).\n// TODO(burdon): Create property editor.\n//\n\ntype DefaultMeta = {};\n\nconst DefaultMetaProps = ({ meta }: MetaProps<DefaultMeta>) => {\n return <></>;\n};\n\n//\n// Chess\n//\n\ntype ChessMeta = { level?: number };\n\nconst ChessMetaProps = ({ meta }: MetaProps<ChessMeta>) => {\n if (!meta) {\n return null;\n }\n\n return (\n <>\n <InputRow label='Level'>\n <Input.TextInput\n type='number'\n value={meta.level ?? 1}\n onChange={(event) => (meta.level = safeParseInt(event.target.value))}\n placeholder='Engine strength.'\n />\n </InputRow>\n </>\n );\n};\n\n//\n// Email\n//\n\ntype EmailWorkerMeta = { account?: string };\n\nconst EmailWorkerMetaProps = ({ meta }: MetaProps<EmailWorkerMeta>) => {\n if (!meta) {\n return null;\n }\n\n return (\n <>\n <InputRow label='Account'>\n <Input.TextInput\n value={meta.account ?? ''}\n onChange={(event) => (meta.account = event.target.value)}\n placeholder='https://'\n />\n </InputRow>\n </>\n );\n};\n\n//\n// Chain\n//\n\ntype ChainPromptMeta = { model?: string; prompt?: ChainPromptType };\n\nconst ChainPromptMetaProps = ({ meta, triggerId }: MetaProps<ChainPromptMeta>) => {\n const schema = triggerId ? state.selectedSchema[triggerId] : undefined;\n if (!meta) {\n return null;\n }\n\n return (\n <>\n <InputRow label='Model'>\n <Input.TextInput\n value={meta.model ?? ''}\n onChange={(event) => (meta.model = event.target.value)}\n placeholder='llama2'\n />\n </InputRow>\n <InputRow label='Presets'>\n <ChainPresets\n presets={chainPresets}\n onSelect={(preset) => {\n meta.prompt = preset.createPrompt();\n }}\n />\n </InputRow>\n {meta.prompt && (\n <InputRow label='Prompt'>\n <PromptEditor prompt={meta.prompt} schema={schema} />\n </InputRow>\n )}\n </>\n );\n};\n\n//\n// Embedding\n//\n\ntype EmbeddingMeta = { model?: string; prompt?: ChainPromptType };\n\nconst EmbeddingMetaProps = ({ meta }: MetaProps<EmbeddingMeta>) => {\n if (!meta) {\n return null;\n }\n\n return (\n <>\n <InputRow label='Model'>\n <Input.TextInput\n value={meta.model ?? ''}\n onChange={(event) => (meta.model = event.target.value)}\n placeholder='llama2'\n />\n </InputRow>\n </>\n );\n};\n\nconst metaExtensions: Record<string, MetaExtension<any>> = {\n __DEFAULT__: {\n initialValue: () => ({}),\n component: DefaultMetaProps,\n } satisfies MetaExtension<DefaultMeta>,\n\n 'dxos.org/function/chess': {\n initialValue: () => ({ level: 2 }),\n component: ChessMetaProps,\n } satisfies MetaExtension<ChessMeta>,\n\n 'dxos.org/function/email-worker': {\n initialValue: () => ({ account: 'hello@dxos.network' }),\n component: EmailWorkerMetaProps,\n } satisfies MetaExtension<EmailWorkerMeta>,\n\n 'dxos.org/function/gpt': {\n initialValue: () => ({ model: 'llama2' }),\n component: ChainPromptMetaProps,\n } satisfies MetaExtension<ChainPromptMeta>,\n\n 'dxos.org/function/embedding': {\n initialValue: () => ({ model: 'llama2' }),\n component: EmbeddingMetaProps,\n } satisfies MetaExtension<EmbeddingMeta>,\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { AUTOMATION_PLUGIN } from './meta';\n\nexport default [\n {\n 'en-US': {\n [AUTOMATION_PLUGIN]: {\n 'plugin name': 'Automation',\n 'object placeholder': 'New prompt',\n 'create object label': 'Create prompt',\n 'create trigger label': 'Create trigger',\n 'create stack section label': 'Create prompt',\n 'command placeholder': 'Enter slash command...',\n 'template placeholder': 'Enter template...',\n 'value placeholder': 'Enter value...',\n 'select preset template placeholder': 'Select preset',\n 'open automation panel label': 'Show Automations',\n\n // 'create object label': 'Create rule',\n // 'create stack section label': 'Create rule',\n // 'command placeholder': 'Enter command...',\n // 'template placeholder': 'Enter template...',\n // 'value placeholder': 'Enter value...',\n // 'select preset template placeholder': 'Select preset',\n },\n },\n },\n];\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { AutomationPlugin } from './AutomationPlugin';\n\nexport default AutomationPlugin;\n\nexport * from './AutomationPlugin';\nexport * from './components';\nexport * from './presets';\nexport * from './types';\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAIA,OAAOA,YAAW;AAElB,SAAgCC,6BAA6BC,qBAAqB;AAClF,SAASC,aAAaC,mBAAAA,wBAAuB;AAC7C,SAASC,aAAAA,kBAAiB;AAC1B,SAASC,yBAAyB;AAClC,SAASC,iBAAiBC,gBAAgB;AAC1C,SAASC,aAAaC,sBAAsBC,eAAe;;;ACP3D,SAASC,YAAY;;;ACArB,OAAOC,WAAW;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AY,MAAM;oBACNF,YAAY;sBACVvC;sBACAc,OAAAA;sBACA4B,qBAAqB;sBACrBC,QAAQ;sBACRR;oBACF;kBACF;gBACF;AAEA,sBAAMQ,SAASC,SACb,CAACC,aAAAA;AACC,wBAAMC,UAAUC,WAAW,YAAA;AACzB,0BAAMZ,OAAOa,GAAGC,eAAehB,QAAAA;AAC/BY,6BAAAA;kBACF,CAAA;AAEA,yBAAO,MAAMK,aAAaJ,OAAAA;gBAC5B,GACA,MAAMX,OAAOa,GAAGG,cAAclB,QAAAA,GAC9BH,SAAAA;AAEF,oBAAI,CAACa,UAAU,CAACb,WAAW;AACzB;gBACF;AAEA,sBAAMvC,OAAOgC,QAAQ6B,YAAYT,MAAAA,KAAW,EAAA;AAC5C,sBAAM7B,QAAQvB,KAAKuB,QAAQ6B,MAAAA,KACzBA,OAAOH,QACPjD,KAAKM,eAAe;kBAAC;kBAAiC;oBAAEC,IAAIC;kBAAkB;;AAEhF,uBAAO;kBACLc;kBACAgB;kBACAY,MAAM;kBACNF,YAAY;oBACVvC;oBACAc;oBACA6B;kBACF;gBACF;cACF;YACF,CAAA;;QAEJ;MACF;MACAU,SAAS;QACPC,WAAW,CAAC,EAAEb,MAAMc,KAAI,MAAE;AACxB,kBAAQA,MAAAA;;;YAIN,KAAK;AACH,qBAAO,gBAAAC,OAAA,cAACC,iBAAAA,IAAAA;UACZ;AAEA,iBAAO;QACT;MACF;MACAC,QAAQ;QACNlC,UAAU,CAACkC,WAAAA;AACT,kBAAQA,OAAOC,QAAM;YACnB,KAAKC,iBAAiBC,QAAQ;AAC5B,qBAAO,CAGP;YACF;UACF;QACF;MACF;IACF;EACF;AACF;;;AWvJA,IAAA,cAAeC;",
|
|
6
|
+
"names": ["React", "parseMetadataResolverPlugin", "resolvePlugin", "FunctionDef", "FunctionTrigger", "invariant", "parseClientPlugin", "createExtension", "toSignal", "getTypename", "loadObjectReferences", "parseId", "lazy", "React", "Button", "Icon", "Toolbar", "AutomationPanel", "handleCreate", "div", "className", "Toolbar", "Root", "classNames", "Button", "onClick", "Icon", "icon", "React", "getSpace", "Select", "useTranslation", "nonNullable", "create", "str", "text", "filter", "value", "undefined", "flat", "join", "chainPresets", "id", "title", "createPrompt", "create", "ChainPromptType", "command", "template", "inputs", "type", "ChainInputType", "VALUE", "name", "PASS_THROUGH", "CONTEXT", "SCHEMA", "RETRIEVER", "RESOLVER", "Chain", "chain", "space", "getSpace", "handleSelectPreset", "preset", "name", "title", "prompts", "filter", "nonNullable", "forEach", "prompt", "db", "remove", "createPrompt", "React", "div", "className", "map", "i", "PromptEditor", "key", "ChainPresets", "presets", "chainPresets", "onSelect", "t", "useTranslation", "AUTOMATION_PLUGIN", "Select", "Root", "onValueChange", "value", "find", "id", "TriggerButton", "classNames", "placeholder", "Portal", "Content", "Viewport", "Option", "React", "useEffect", "useMemo", "useState", "Mutex", "Context", "createSubscriptionTrigger", "createWebsocketTrigger", "FunctionTrigger", "log", "ScriptType", "useClient", "Filter", "useQuery", "Input", "Select", "distinctBy", "React", "Input", "InputRow", "label", "children", "React", "Input", "Root", "tr", "td", "className", "Label", "classNames", "sleep", "getObjectCore", "invariant", "DXN", "LOCAL_SPACE_TAG", "log", "FunctionType", "findObjectWithForeignKey", "create", "foreignKey", "log", "MailboxType", "MessageType", "Filter", "SOURCE_ID", "handleEmail", "space", "data", "messages", "objects", "mailboxes", "db", "query", "schema", "run", "mailbox", "add", "info", "count", "length", "existingMailbox", "message", "object", "source", "id", "String", "sender", "email", "from", "timestamp", "Date", "created", "toISOString", "text", "body", "properties", "subject", "to", "keys", "push", "MAX_RETRIES", "RETRY_DELAY", "callFunction", "funcUrl", "trigger", "data", "body", "event", "retryCount", "log", "info", "response", "fetch", "method", "headers", "JSON", "stringify", "text", "status", "sleep", "Math", "min", "invokeFunction", "client", "space", "spec", "type", "handleEmail", "script", "crud", "query", "id", "function", "first", "objects", "functions", "__typename", "FunctionType", "typename", "run", "func", "find", "fn", "referenceEquals", "source", "funcSlug", "__meta", "keys", "key", "USERFUNCTIONS_META_KEY", "warn", "scriptId", "name", "getFunctionUrl", "config", "triggerData", "getObjectCore", "toPlainObject", "promptId", "meta", "prompt", "err", "slug", "spaceId", "baseUrl", "URL", "values", "runtime", "services", "edge", "url", "relativeUrl", "replace", "toString", "searchParams", "set", "protocol", "a", "b", "aDXN", "toDXN", "bDXN", "ref", "startsWith", "DXN", "parse", "kind", "ECHO", "LOCAL_SPACE_TAG", "invariant", "React", "create", "getMeta", "getEchoMeta", "GameType", "FileType", "DocumentType", "DiagramType", "CollectionType", "MessageType", "Input", "safeParseInt", "stateInitialValues", "schemas", "DocumentType", "FileType", "GameType", "MessageType", "DiagramType", "CollectionType", "selectedSchema", "state", "create", "USERFUNCTIONS_PRESET_META_KEY", "getFunctionMetaExtension", "trigger", "script", "meta", "getEchoMeta", "keys", "find", "key", "source", "extension", "metaExtensions", "id", "function", "DefaultMetaProps", "React", "ChessMetaProps", "InputRow", "label", "Input", "TextInput", "type", "value", "level", "onChange", "event", "safeParseInt", "target", "placeholder", "EmailWorkerMetaProps", "account", "ChainPromptMetaProps", "triggerId", "schema", "undefined", "model", "ChainPresets", "presets", "chainPresets", "onSelect", "preset", "prompt", "createPrompt", "PromptEditor", "EmbeddingMetaProps", "__DEFAULT__", "initialValue", "component", "triggerTypes", "registerTriggersMutex", "Mutex", "TriggerEditor", "space", "trigger", "client", "useClient", "scripts", "useQuery", "Filter", "schema", "ScriptType", "script", "useMemo", "find", "id", "function", "registry", "useState", "Map", "triggers", "FunctionTrigger", "useEffect", "setTimeout", "executeSynchronized", "deprecated", "Set", "Array", "from", "keys", "log", "info", "all", "map", "t", "enabled", "filter", "has", "delete", "ctx", "Context", "set", "triggerSpec", "spec", "triggerFactory", "type", "createSubscriptionTrigger", "createWebsocketTrigger", "data", "invokeFunction", "get", "dispose", "JSON", "stringify", "values", "db", "schemaRegistry", "query", "then", "schemas", "state", "distinctBy", "typename", "sort", "a", "b", "catch", "length", "foundSchema", "selectedSchema", "meta", "extension", "getFunctionMetaExtension", "initialValue", "handleSelectFunction", "value", "match", "fn", "handleSelectTriggerType", "triggerType", "cron", "method", "url", "init", "TriggerMeta", "component", "React", "div", "className", "table", "tbody", "InputRow", "label", "Select", "Root", "onValueChange", "TriggerButton", "placeholder", "Portal", "Content", "Viewport", "name", "Option", "key", "description", "p", "TriggerSpec", "Input", "Switch", "checked", "onCheckedChange", "tr", "td", "TriggerSpecSubscription", "handleSelectSchema", "undefined", "classNames", "TriggerSpecTimer", "TextInput", "onChange", "event", "target", "methods", "TriggerSpecWebhook", "TriggerSpecWebsocket", "handleChangeInit", "parse", "err", "triggerRenderers", "subscription", "timer", "webhook", "websocket", "Component", "PromptContainer", "lazy", "AUTOMATION_PLUGIN", "AutomationPlugin", "meta", "provides", "metadata", "records", "ChainType", "typename", "placeholder", "ns", "AUTOMATION_PLUGIN", "icon", "loadReferences", "chain", "loadObjectReferences", "prompts", "translations", "echo", "schema", "ChainPromptType", "FunctionDef", "FunctionTrigger", "complementary", "panels", "id", "label", "graph", "builder", "plugins", "clientPlugin", "resolvePlugin", "parseClientPlugin", "metadataPlugin", "parseMetadataResolverPlugin", "resolve", "resolver", "client", "invariant", "createExtension", "endsWith", "type", "subjectId", "split", "spaceId", "objectId", "parseId", "space", "spaces", "get", "find", "properties", "name", "data", "showResolvedThreads", "object", "toSignal", "onChange", "timeout", "setTimeout", "db", "loadObjectById", "clearTimeout", "getObjectById", "getTypename", "surface", "component", "role", "React", "AutomationPanel", "intent", "action", "AutomationAction", "CREATE", "AutomationPlugin"]
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"inputs":{"packages/plugins/experimental/plugin-automation/src/components/AutomationPanel.tsx":{"bytes":2016,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/PromptEditor/prompt-extension.ts":{"bytes":4002,"imports":[{"path":"@codemirror/language","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}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/meta.ts":{"bytes":1626,"imports":[],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/types/chain.ts":{"bytes":4247,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/types/types.ts":{"bytes":1920,"imports":[{"path":"packages/plugins/experimental/plugin-automation/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/types/index.ts":{"bytes":599,"imports":[{"path":"packages/plugins/experimental/plugin-automation/src/types/chain.ts","kind":"import-statement","original":"./chain"},{"path":"packages/plugins/experimental/plugin-automation/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/PromptEditor/PromptEditor.tsx":{"bytes":23894,"imports":[{"path":"react","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":"@dxos/react-ui-editor","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/components/PromptEditor/prompt-extension.ts","kind":"import-statement","original":"./prompt-extension"},{"path":"packages/plugins/experimental/plugin-automation/src/meta.ts","kind":"import-statement","original":"../../meta"},{"path":"packages/plugins/experimental/plugin-automation/src/types/index.ts","kind":"import-statement","original":"../../types"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/PromptEditor/index.ts":{"bytes":555,"imports":[{"path":"packages/plugins/experimental/plugin-automation/src/components/PromptEditor/PromptEditor.tsx","kind":"import-statement","original":"./PromptEditor"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/presets.ts":{"bytes":19268,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/Chain.tsx":{"bytes":7176,"imports":[{"path":"react","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":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/components/PromptEditor/index.ts","kind":"import-statement","original":"./PromptEditor"},{"path":"packages/plugins/experimental/plugin-automation/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/experimental/plugin-automation/src/presets.ts","kind":"import-statement","original":"../presets"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/Form.tsx":{"bytes":2078,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/email.ts":{"bytes":6682,"imports":[{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-inbox/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/invokation-handler.ts":{"bytes":14280,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-script","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/email.ts","kind":"import-statement","original":"./email"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/meta.tsx":{"bytes":17556,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-chess/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-ipfs/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown","kind":"import-statement","external":true},{"path":"@dxos/plugin-sketch/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/Form.tsx","kind":"import-statement","original":"./Form"},{"path":"packages/plugins/experimental/plugin-automation/src/presets.ts","kind":"import-statement","original":"../../presets"},{"path":"packages/plugins/experimental/plugin-automation/src/components/Chain.tsx","kind":"import-statement","original":"../Chain"},{"path":"packages/plugins/experimental/plugin-automation/src/components/PromptEditor/index.ts","kind":"import-statement","original":"../PromptEditor"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/TriggerEditor.tsx":{"bytes":40381,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/functions/types","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-script/types","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":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/Form.tsx","kind":"import-statement","original":"./Form"},{"path":"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/invokation-handler.ts","kind":"import-statement","original":"./invokation-handler"},{"path":"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/meta.tsx","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/index.ts":{"bytes":557,"imports":[{"path":"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/TriggerEditor.tsx","kind":"import-statement","original":"./TriggerEditor"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/PromptContainer.tsx":{"bytes":1607,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/components/PromptEditor/index.ts","kind":"import-statement","original":"./PromptEditor"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/index.ts":{"bytes":1219,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/components/AutomationPanel.tsx","kind":"import-statement","original":"./AutomationPanel"},{"path":"packages/plugins/experimental/plugin-automation/src/components/Chain.tsx","kind":"import-statement","original":"./Chain"},{"path":"packages/plugins/experimental/plugin-automation/src/components/PromptEditor/index.ts","kind":"import-statement","original":"./PromptEditor"},{"path":"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/index.ts","kind":"import-statement","original":"./TriggerEditor"},{"path":"packages/plugins/experimental/plugin-automation/src/components/PromptContainer.tsx","kind":"dynamic-import","original":"./PromptContainer"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/translations.ts":{"bytes":2904,"imports":[{"path":"packages/plugins/experimental/plugin-automation/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/AutomationPlugin.tsx":{"bytes":20618,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/functions/types","kind":"import-statement","external":true},{"path":"@dxos/invariant","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/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/experimental/plugin-automation/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/experimental/plugin-automation/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/experimental/plugin-automation/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/index.ts":{"bytes":1109,"imports":[{"path":"packages/plugins/experimental/plugin-automation/src/AutomationPlugin.tsx","kind":"import-statement","original":"./AutomationPlugin"},{"path":"packages/plugins/experimental/plugin-automation/src/AutomationPlugin.tsx","kind":"import-statement","original":"./AutomationPlugin"},{"path":"packages/plugins/experimental/plugin-automation/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/experimental/plugin-automation/src/presets.ts","kind":"import-statement","original":"./presets"},{"path":"packages/plugins/experimental/plugin-automation/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"}},"outputs":{"packages/plugins/experimental/plugin-automation/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":65818},"packages/plugins/experimental/plugin-automation/dist/lib/node-esm/index.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/node-esm/chunk-FN6DOJZP.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/node-esm/chunk-AAUSG7OA.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/node-esm/chunk-B35UD3D7.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/functions/types","kind":"import-statement","external":true},{"path":"@dxos/invariant","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/react-client/echo","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"react","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":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/functions/types","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-script/types","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":"@dxos/util","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-script","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/plugin-inbox/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/plugin-chess/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-ipfs/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-markdown","kind":"import-statement","external":true},{"path":"@dxos/plugin-sketch/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/node-esm/PromptContainer-5OK4GWIR.mjs","kind":"dynamic-import"}],"exports":["AutomationAction","AutomationPanel","AutomationPlugin","Chain","ChainInputSchema","ChainInputType","ChainPresets","ChainPromptType","ChainType","PromptContainer","PromptEditor","TriggerEditor","chainPresets","default","str"],"entryPoint":"packages/plugins/experimental/plugin-automation/src/index.ts","inputs":{"packages/plugins/experimental/plugin-automation/src/AutomationPlugin.tsx":{"bytesInOutput":5445},"packages/plugins/experimental/plugin-automation/src/components/index.ts":{"bytesInOutput":106},"packages/plugins/experimental/plugin-automation/src/components/AutomationPanel.tsx":{"bytesInOutput":481},"packages/plugins/experimental/plugin-automation/src/components/Chain.tsx":{"bytesInOutput":1653},"packages/plugins/experimental/plugin-automation/src/presets.ts":{"bytesInOutput":5489},"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/TriggerEditor.tsx":{"bytesInOutput":11134},"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/Form.tsx":{"bytesInOutput":513},"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/invokation-handler.ts":{"bytesInOutput":3584},"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/email.ts":{"bytesInOutput":1706},"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/meta.tsx":{"bytesInOutput":4119},"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-automation/src/translations.ts":{"bytesInOutput":610},"packages/plugins/experimental/plugin-automation/src/index.ts":{"bytesInOutput":36}},"bytes":36954},"packages/plugins/experimental/plugin-automation/dist/lib/node-esm/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/experimental/plugin-automation/dist/lib/node-esm/meta.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/node-esm/chunk-B35UD3D7.mjs","kind":"import-statement"}],"exports":["AUTOMATION_PLUGIN","default"],"entryPoint":"packages/plugins/experimental/plugin-automation/src/meta.ts","inputs":{},"bytes":261},"packages/plugins/experimental/plugin-automation/dist/lib/node-esm/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/experimental/plugin-automation/dist/lib/node-esm/types/index.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/node-esm/chunk-AAUSG7OA.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/node-esm/chunk-B35UD3D7.mjs","kind":"import-statement"}],"exports":["AutomationAction","ChainInputSchema","ChainInputType","ChainPromptType","ChainType"],"entryPoint":"packages/plugins/experimental/plugin-automation/src/types/index.ts","inputs":{},"bytes":390},"packages/plugins/experimental/plugin-automation/dist/lib/node-esm/PromptContainer-5OK4GWIR.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":793},"packages/plugins/experimental/plugin-automation/dist/lib/node-esm/PromptContainer-5OK4GWIR.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/node-esm/chunk-FN6DOJZP.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/node-esm/chunk-AAUSG7OA.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/node-esm/chunk-B35UD3D7.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/experimental/plugin-automation/src/components/PromptContainer.tsx","inputs":{"packages/plugins/experimental/plugin-automation/src/components/PromptContainer.tsx":{"bytesInOutput":282}},"bytes":681},"packages/plugins/experimental/plugin-automation/dist/lib/node-esm/chunk-FN6DOJZP.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":14360},"packages/plugins/experimental/plugin-automation/dist/lib/node-esm/chunk-FN6DOJZP.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/node-esm/chunk-AAUSG7OA.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/node-esm/chunk-B35UD3D7.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","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":"@dxos/util","kind":"import-statement","external":true},{"path":"@codemirror/language","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}],"exports":["PromptEditor"],"inputs":{"packages/plugins/experimental/plugin-automation/src/components/PromptEditor/PromptEditor.tsx":{"bytesInOutput":5699},"packages/plugins/experimental/plugin-automation/src/components/PromptEditor/prompt-extension.ts":{"bytesInOutput":825},"packages/plugins/experimental/plugin-automation/src/components/PromptEditor/index.ts":{"bytesInOutput":0}},"bytes":7099},"packages/plugins/experimental/plugin-automation/dist/lib/node-esm/chunk-AAUSG7OA.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3021},"packages/plugins/experimental/plugin-automation/dist/lib/node-esm/chunk-AAUSG7OA.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/node-esm/chunk-B35UD3D7.mjs","kind":"import-statement"},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["AutomationAction","ChainInputSchema","ChainInputType","ChainPromptType","ChainType"],"inputs":{"packages/plugins/experimental/plugin-automation/src/types/chain.ts":{"bytesInOutput":1247},"packages/plugins/experimental/plugin-automation/src/types/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-automation/src/types/types.ts":{"bytesInOutput":250}},"bytes":1937},"packages/plugins/experimental/plugin-automation/dist/lib/node-esm/chunk-B35UD3D7.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":765},"packages/plugins/experimental/plugin-automation/dist/lib/node-esm/chunk-B35UD3D7.mjs":{"imports":[],"exports":["AUTOMATION_PLUGIN","meta_default"],"inputs":{"packages/plugins/experimental/plugin-automation/src/meta.ts":{"bytesInOutput":333}},"bytes":582}}}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
AUTOMATION_PLUGIN,
|
|
4
|
+
meta_default
|
|
5
|
+
} from "./chunk-B35UD3D7.mjs";
|
|
6
|
+
export {
|
|
7
|
+
AUTOMATION_PLUGIN,
|
|
8
|
+
meta_default as default
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=meta.mjs.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
AutomationAction,
|
|
4
|
+
ChainInputSchema,
|
|
5
|
+
ChainInputType,
|
|
6
|
+
ChainPromptType,
|
|
7
|
+
ChainType
|
|
8
|
+
} from "../chunk-AAUSG7OA.mjs";
|
|
9
|
+
import "../chunk-B35UD3D7.mjs";
|
|
10
|
+
export {
|
|
11
|
+
AutomationAction,
|
|
12
|
+
ChainInputSchema,
|
|
13
|
+
ChainInputType,
|
|
14
|
+
ChainPromptType,
|
|
15
|
+
ChainType
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutomationPlugin.d.ts","sourceRoot":"","sources":["../../../src/AutomationPlugin.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,gBAAgB,EAA8C,MAAM,qBAAqB,CAAC;AAUxG,OAAO,EAAoB,KAAK,wBAAwB,EAA8B,MAAM,SAAS,CAAC;AAKtG,eAAO,MAAM,gBAAgB,QAAO,gBAAgB,CAAC,wBAAwB,CAwI5E,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutomationPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/AutomationPanel.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,eAAO,MAAM,eAAe,yBAY3B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React, { type FC } from 'react';
|
|
2
|
+
import { type Preset } from '../presets';
|
|
3
|
+
import { type ChainType } from '../types';
|
|
4
|
+
export type ChainProps = {
|
|
5
|
+
chain: ChainType;
|
|
6
|
+
};
|
|
7
|
+
export declare const Chain: ({ chain }: ChainProps) => React.JSX.Element | null;
|
|
8
|
+
export declare const ChainPresets: FC<{
|
|
9
|
+
presets: Preset[];
|
|
10
|
+
onSelect: (preset: Preset) => void;
|
|
11
|
+
}>;
|
|
12
|
+
//# sourceMappingURL=Chain.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Chain.d.ts","sourceRoot":"","sources":["../../../../src/components/Chain.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAQvC,OAAO,EAAgB,KAAK,MAAM,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,SAAS,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,KAAK,cAAe,UAAU,6BAqB1C,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,CAuBtF,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type PromptEditorProps } from './PromptEditor';
|
|
3
|
+
type PromptContainerProps = PromptEditorProps;
|
|
4
|
+
declare const PromptContainer: (props: PromptContainerProps) => React.JSX.Element;
|
|
5
|
+
export default PromptContainer;
|
|
6
|
+
//# sourceMappingURL=PromptContainer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PromptContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/PromptContainer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEtE,KAAK,oBAAoB,GAAG,iBAAiB,CAAC;AAE9C,QAAA,MAAM,eAAe,UAAW,oBAAoB,sBAMnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Schema as S } from '@effect/schema';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { type ChainPromptType } from '../../types';
|
|
4
|
+
export type PromptEditorProps = {
|
|
5
|
+
prompt: ChainPromptType;
|
|
6
|
+
commandEditable?: boolean;
|
|
7
|
+
schema?: S.Schema<any, any, any>;
|
|
8
|
+
};
|
|
9
|
+
export declare const PromptEditor: ({ prompt, commandEditable }: PromptEditorProps) => React.JSX.Element;
|
|
10
|
+
//# sourceMappingURL=PromptEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PromptEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/PromptEditor/PromptEditor.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,MAAM,IAAI,CAAC,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAoB,MAAM,OAAO,CAAC;AAezC,OAAO,EAAmC,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAiFpF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,eAAe,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;CAClC,CAAC;AAEF,eAAO,MAAM,YAAY,gCAAwC,iBAAiB,sBAkHjF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PromptEditor.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/PromptEditor/PromptEditor.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AA0C7C,eAAO,MAAM,OAAO,IAAK,CAAC;AAE1B,QAAA,MAAM,IAAI,EAAE,IAWX,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/PromptEditor/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt-extension.d.ts","sourceRoot":"","sources":["../../../../../src/components/PromptEditor/prompt-extension.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAKnD,eAAO,MAAM,SAAS,QAAgB,CAAC;AAgCvC,eAAO,MAAM,eAAe,EAAE,SAAyD,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type Step = {
|
|
2
|
+
id: string;
|
|
3
|
+
};
|
|
4
|
+
export type Variable = {
|
|
5
|
+
name: string;
|
|
6
|
+
type: 'value' | 'function' | 'query' | 'retriever' | 'pass-through';
|
|
7
|
+
};
|
|
8
|
+
export type Prompt = Step & {
|
|
9
|
+
title?: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
template: string;
|
|
12
|
+
variables: Variable[];
|
|
13
|
+
};
|
|
14
|
+
export type Sequence = Step & {
|
|
15
|
+
runnable: Step[];
|
|
16
|
+
};
|
|
17
|
+
export type Chain = {};
|
|
18
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/PromptEditor/types.tsx"],"names":[],"mappings":"AAOA,MAAM,MAAM,IAAI,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,OAAO,GAAG,UAAU,GAAG,OAAO,GAAG,WAAW,GAAG,cAAc,CAAC;CACrE,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG,IAAI,GAAG;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,QAAQ,EAAE,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,IAAI,GAAG;IAC5B,QAAQ,EAAE,IAAI,EAAE,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../../../src/components/TriggerEditor/Form.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAItD,eAAO,MAAM,QAAQ,wBAAyB,iBAAiB,CAAC;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,sBASlF,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FunctionTrigger } from '@dxos/functions/types';
|
|
3
|
+
import { type Space } from '@dxos/react-client/echo';
|
|
4
|
+
export declare const TriggerEditor: ({ space, trigger }: {
|
|
5
|
+
space: Space;
|
|
6
|
+
trigger: FunctionTrigger;
|
|
7
|
+
}) => React.JSX.Element;
|
|
8
|
+
//# sourceMappingURL=TriggerEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TriggerEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/TriggerEditor/TriggerEditor.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAyE,MAAM,OAAO,CAAC;AAK9F,OAAO,EACL,eAAe,EAOhB,MAAM,uBAAuB,CAAC;AAI/B,OAAO,EAAU,KAAK,KAAK,EAAY,MAAM,yBAAyB,CAAC;AAYvE,eAAO,MAAM,aAAa,uBAAwB;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,eAAe,CAAA;CAAE,sBAsM3F,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TriggerEditor.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/TriggerEditor/TriggerEditor.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAmD7C,eAAO,MAAM,OAAO,IAAK,CAAC;AAE1B,QAAA,MAAM,IAAI,EAAE,IAsBX,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../../../../src/components/TriggerEditor/email.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,KAAK,EAAU,MAAM,yBAAyB,CAAC;AAE7D,eAAO,MAAM,SAAS,iCAAiC,CAAC;AAExD,eAAO,MAAM,WAAW,UAAiB,KAAK,QAAQ,GAAG,oBAmCxD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/TriggerEditor/index.ts"],"names":[],"mappings":"AAIA,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type FunctionTrigger } from '@dxos/functions';
|
|
2
|
+
import { type Client } from '@dxos/react-client';
|
|
3
|
+
import { type Space } from '@dxos/react-client/echo';
|
|
4
|
+
export declare const invokeFunction: (client: Client, space: Space, trigger: FunctionTrigger, data: any) => Promise<number>;
|
|
5
|
+
//# sourceMappingURL=invokation-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invokation-handler.d.ts","sourceRoot":"","sources":["../../../../../src/components/TriggerEditor/invokation-handler.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAKvD,OAAO,EAAE,KAAK,MAAM,EAAe,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAkCrD,eAAO,MAAM,cAAc,WAAkB,MAAM,SAAS,KAAK,WAAW,eAAe,QAAQ,GAAG,oBA0BrG,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
import { type FunctionTrigger } from '@dxos/functions/types';
|
|
3
|
+
import { type ScriptType } from '@dxos/plugin-script';
|
|
4
|
+
type TriggerId = string;
|
|
5
|
+
export declare const state: import("@dxos/echo-schema").ReactiveObject<{
|
|
6
|
+
schemas: any[];
|
|
7
|
+
selectedSchema: Record<TriggerId, any>;
|
|
8
|
+
}>;
|
|
9
|
+
type MetaProps<T> = {
|
|
10
|
+
meta: T;
|
|
11
|
+
} & {
|
|
12
|
+
triggerId?: string;
|
|
13
|
+
};
|
|
14
|
+
type MetaExtension<T> = {
|
|
15
|
+
initialValue?: () => T;
|
|
16
|
+
component: FC<MetaProps<T>>;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Create meta type from function.
|
|
20
|
+
* @param trigger - function trigger.
|
|
21
|
+
* @param script - function script.
|
|
22
|
+
*/
|
|
23
|
+
export declare const getFunctionMetaExtension: (trigger: FunctionTrigger, script?: ScriptType) => MetaExtension<any> | undefined;
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=meta.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../../../src/components/TriggerEditor/meta.tsx"],"names":[],"mappings":"AAIA,OAAc,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAI7D,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AActD,KAAK,SAAS,GAAG,MAAM,CAAC;AAgBxB,eAAO,MAAM,KAAK;aALX,GAAG,EAAE;oBACY,MAAM,CAAC,SAAS,EAAE,GAAG,CAAC;EAI4B,CAAC;AAO3E,KAAK,SAAS,CAAC,CAAC,IAAI;IAAE,IAAI,EAAE,CAAC,CAAA;CAAE,GAAG;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzD,KAAK,aAAa,CAAC,CAAC,IAAI;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC,CAAC;IACvB,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;CAC7B,CAAC;AAIF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,YAC1B,eAAe,WACf,UAAU,KAClB,aAAa,CAAC,GAAG,CAAC,GAAG,SAUvB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const PromptContainer: import("react").LazyExoticComponent<(props: import("./PromptEditor").PromptEditorProps) => import("react").JSX.Element>;
|
|
2
|
+
export * from './AutomationPanel';
|
|
3
|
+
export * from './Chain';
|
|
4
|
+
export * from './PromptEditor';
|
|
5
|
+
export * from './TriggerEditor';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe,yHAA0C,CAAC;AAEvE,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,eAAe,gBAAgB,CAAC;AAEhC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const AUTOMATION_PLUGIN = "dxos.org/plugin/automation";
|
|
2
|
+
declare const _default: {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
icon: string;
|
|
7
|
+
source: string;
|
|
8
|
+
tags: string[];
|
|
9
|
+
};
|
|
10
|
+
export default _default;
|
|
11
|
+
//# sourceMappingURL=meta.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,iBAAiB,+BAA+B,CAAC;;;;;;;;;AAE9D,wBAOuB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ChainPromptType } from './types';
|
|
2
|
+
export declare const str: (...text: (string | undefined | boolean)[]) => string;
|
|
3
|
+
export type Preset = {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
createPrompt: () => ChainPromptType;
|
|
7
|
+
};
|
|
8
|
+
export declare const chainPresets: Preset[];
|
|
9
|
+
//# sourceMappingURL=presets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presets.d.ts","sourceRoot":"","sources":["../../../src/presets.ts"],"names":[],"mappings":"AAMA,OAAO,EAAkB,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1D,eAAO,MAAM,GAAG,YAAa,CAAC,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,EAAE,KAAG,MAIjD,CAAC;AAEhB,MAAM,MAAM,MAAM,GAAG;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,eAAe,CAAC;CACrC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,MAAM,EAmOhC,CAAC"}
|