@dxos/plugin-routine 0.0.0 → 0.9.1-staging.ee54ba693a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/neutral/RoutinePlugin.mjs +1 -1
- package/dist/lib/neutral/RoutinePlugin.node.mjs +1 -1
- package/dist/lib/neutral/capabilities/index.mjs +3 -3
- package/dist/lib/neutral/capabilities/node.mjs +3 -3
- package/dist/lib/neutral/{chunk-ODQDVFMZ.mjs → chunk-P3TDQKOO.mjs} +2 -2
- package/dist/lib/neutral/{chunk-CNYAPXUW.mjs → chunk-YGWSAKLD.mjs} +2 -2
- package/dist/lib/neutral/{chunk-CNYAPXUW.mjs.map → chunk-YGWSAKLD.mjs.map} +1 -1
- package/dist/lib/neutral/components/index.mjs +1 -1
- package/dist/lib/neutral/{create-routine-I67BYJA2.mjs → create-routine-6QBY6TWF.mjs} +2 -2
- package/dist/lib/neutral/{layer-specs-ADQCTTRT.mjs → layer-specs-2TWJU5HI.mjs} +2 -2
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/lib/neutral/operations/index.mjs +1 -1
- package/dist/lib/neutral/plugin.mjs +1 -1
- package/dist/lib/neutral/{registry-sync-PHBU6CH2.mjs → registry-sync-DYPOC7ZG.mjs} +2 -2
- package/dist/lib/neutral/{run-routine-HJWXIWLJ.mjs → run-routine-AEWO6SYD.mjs} +2 -2
- package/dist/lib/neutral/testing.mjs +1 -1
- package/dist/lib/neutral/{trigger-runtime-controller-7FOTH2NP.mjs → trigger-runtime-controller-WIDDFGQT.mjs} +2 -2
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +70 -70
- /package/dist/lib/neutral/{chunk-ODQDVFMZ.mjs.map → chunk-P3TDQKOO.mjs.map} +0 -0
- /package/dist/lib/neutral/{create-routine-I67BYJA2.mjs.map → create-routine-6QBY6TWF.mjs.map} +0 -0
- /package/dist/lib/neutral/{layer-specs-ADQCTTRT.mjs.map → layer-specs-2TWJU5HI.mjs.map} +0 -0
- /package/dist/lib/neutral/{registry-sync-PHBU6CH2.mjs.map → registry-sync-DYPOC7ZG.mjs.map} +0 -0
- /package/dist/lib/neutral/{run-routine-HJWXIWLJ.mjs.map → run-routine-AEWO6SYD.mjs.map} +0 -0
- /package/dist/lib/neutral/{trigger-runtime-controller-7FOTH2NP.mjs.map → trigger-runtime-controller-WIDDFGQT.mjs.map} +0 -0
|
@@ -527,7 +527,7 @@ import { ClientService } from "@dxos/client";
|
|
|
527
527
|
import { Trigger as Trigger5 } from "@dxos/compute";
|
|
528
528
|
import { Context } from "@dxos/context";
|
|
529
529
|
import { Database as Database5, Filter as Filter5, Query as Query3 } from "@dxos/echo";
|
|
530
|
-
var __dxlog_file = "/
|
|
530
|
+
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-routine/src/commands/trigger/list.ts";
|
|
531
531
|
var list = Command5.make("list", {
|
|
532
532
|
spaceId: Common4.spaceId.pipe(Options5.optional)
|
|
533
533
|
}, Effect5.fn(function* ({ spaceId: spaceIdOption }) {
|
|
@@ -5,12 +5,12 @@ import { Capability } from "@dxos/app-framework";
|
|
|
5
5
|
var AppGraphBuilder = Capability.lazy("AppGraphBuilder", () => import("../app-graph-builder-FALWLZTI.mjs"));
|
|
6
6
|
var NavigationResolver = Capability.lazy("NavigationResolver", () => import("../navigation-resolver-KQIWUH6F.mjs"));
|
|
7
7
|
var CreateObject = Capability.lazy("CreateObject", () => import("../create-object-V23KVDMJ.mjs"));
|
|
8
|
-
var LayerSpecs = Capability.lazy("LayerSpecs", () => import("../layer-specs-
|
|
8
|
+
var LayerSpecs = Capability.lazy("LayerSpecs", () => import("../layer-specs-2TWJU5HI.mjs"));
|
|
9
9
|
var OperationHandler = Capability.lazy("OperationHandler", () => import("../operation-handler-QKLJSDCQ.mjs"));
|
|
10
10
|
var ReactSurface = Capability.lazy("ReactSurface", () => import("../react-surface-GMO7I7YE.mjs"));
|
|
11
|
-
var RegistrySync = Capability.lazy("RegistrySync", () => import("../registry-sync-
|
|
11
|
+
var RegistrySync = Capability.lazy("RegistrySync", () => import("../registry-sync-DYPOC7ZG.mjs"));
|
|
12
12
|
var Templates = Capability.lazy("Templates", () => import("../templates-IIUCEBAX.mjs"));
|
|
13
|
-
var TriggerRuntimeController = Capability.lazy("TriggerRuntimeController", () => import("../trigger-runtime-controller-
|
|
13
|
+
var TriggerRuntimeController = Capability.lazy("TriggerRuntimeController", () => import("../trigger-runtime-controller-WIDDFGQT.mjs"));
|
|
14
14
|
export {
|
|
15
15
|
AppGraphBuilder,
|
|
16
16
|
CreateObject,
|
|
@@ -3,11 +3,11 @@ import "../chunk-J5LGTIGS.mjs";
|
|
|
3
3
|
// src/capabilities/node.ts
|
|
4
4
|
import { Capability } from "@dxos/app-framework";
|
|
5
5
|
var AppGraphBuilder = Capability.lazy("AppGraphBuilder", () => import("../app-graph-builder-FALWLZTI.mjs"));
|
|
6
|
-
var LayerSpecs = Capability.lazy("LayerSpecs", () => import("../layer-specs-
|
|
6
|
+
var LayerSpecs = Capability.lazy("LayerSpecs", () => import("../layer-specs-2TWJU5HI.mjs"));
|
|
7
7
|
var OperationHandler = Capability.lazy("OperationHandler", () => import("../operation-handler-QKLJSDCQ.mjs"));
|
|
8
|
-
var RegistrySync = Capability.lazy("RegistrySync", () => import("../registry-sync-
|
|
8
|
+
var RegistrySync = Capability.lazy("RegistrySync", () => import("../registry-sync-DYPOC7ZG.mjs"));
|
|
9
9
|
var Templates = Capability.lazy("Templates", () => import("../templates-IIUCEBAX.mjs"));
|
|
10
|
-
var TriggerRuntimeController = Capability.lazy("TriggerRuntimeController", () => import("../trigger-runtime-controller-
|
|
10
|
+
var TriggerRuntimeController = Capability.lazy("TriggerRuntimeController", () => import("../trigger-runtime-controller-WIDDFGQT.mjs"));
|
|
11
11
|
export {
|
|
12
12
|
AppGraphBuilder,
|
|
13
13
|
LayerSpecs,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// src/operations/index.ts
|
|
2
2
|
import { OperationHandlerSet } from "@dxos/compute";
|
|
3
|
-
var RoutineOperationHandlerSet = OperationHandlerSet.lazy(() => import("./create-trigger-from-template-U3KNS77V.mjs"), () => import("./create-routine-
|
|
3
|
+
var RoutineOperationHandlerSet = OperationHandlerSet.lazy(() => import("./create-trigger-from-template-U3KNS77V.mjs"), () => import("./create-routine-6QBY6TWF.mjs"), () => import("./run-routine-AEWO6SYD.mjs"));
|
|
4
4
|
|
|
5
5
|
export {
|
|
6
6
|
RoutineOperationHandlerSet
|
|
7
7
|
};
|
|
8
|
-
//# sourceMappingURL=chunk-
|
|
8
|
+
//# sourceMappingURL=chunk-P3TDQKOO.mjs.map
|
|
@@ -8,7 +8,7 @@ import { meta } from "#meta";
|
|
|
8
8
|
import { translations } from "#translations";
|
|
9
9
|
import { Routine } from "#types";
|
|
10
10
|
|
|
11
|
-
// raw-loader:/
|
|
11
|
+
// raw-loader:/__w/dxos/dxos/packages/plugins/plugin-routine/PLUGIN.mdl
|
|
12
12
|
var PLUGIN_default = '---\nid: org.dxos.plugin.automation\nname: AutomationPlugin\nversion: 0.1.0\n---\n\nA workflow automation engine plugin for DXOS Composer that enables event-driven\npipelines connecting ECHO objects to persistent compute functions.\n\nTriggers listen for ECHO mutations, timer schedules, incoming feeds (email, webhook),\nor data subscriptions and invoke `PersistentOperation` handlers when their conditions\nfire. Each trigger carries optional structured input and is dispatched by a\nper-space `TriggerDispatcher` that runs locally in the browser or is delegated to\nthe DXOS edge when the space `computeEnvironment` is `edge`.\n\nThe plugin integrates with the `@dxos/compute` operation registry and the\n`@dxos/functions-runtime` execution layer. Skill, operation-handler, and\ntoolkit contributions from other plugins are gathered at application scope and\nmerged before being offered to space-level operation registries, so any plugin\nthat contributes a `Capabilities.OperationHandler` automatically becomes\ninvocable from an automation trigger.\n\nUsers interact with automations through the `AutomationPanel` settings surface,\nwhich lists active triggers for a space (or for a specific ECHO object) and\nopens the `TriggerEditor` form to create, configure, and enable/disable\nindividual triggers.\n\n## Extensions\n\nThe following extension dialects are used in this document.\nEach extension is defined in the Appendix or resolved via its URI.\n\n| Term | URI |\n|-------------|-------------------------------|\n| `type` | `org.dxos.mdl.type@1.0` |\n| `feat` | `org.dxos.mdl.feat@1.0` |\n| `test` | `org.dxos.mdl.test@1.0` |\n| `component` | `org.dxos.mdl.component@1.0` |\n| `op` | `org.dxos.mdl.op@1.0` |\n\n## Types\n\nExisting types used by this plugin (defined in `@dxos/compute` and `@dxos/functions-runtime`):\n\n| Type | Source | Role in AutomationPlugin |\n|----------------------|---------------------------|--------------------------------------------------------------------|\n| `Trigger` | `@dxos/compute` | Persistent trigger configuration (spec, function ref, input, enabled) |\n| `PersistentOperation`| `@dxos/compute` | Registered compute function callable from a trigger |\n| `Trace.Message` | `@dxos/compute` | Execution trace record appended after each trigger run |\n| `Script` | `@dxos/compute` | Source script that produces one or more `PersistentOperation`s |\n| `Feed` | `@dxos/echo` | Feed object that a `feed`-spec trigger listens to |\n| `ComputeGraph` | `@dxos/conductor` | Visual workflow graph selectable as a trigger function |\n\nNew types defined by this plugin:\n\n```mdl\ntype TriggerTemplate\n desc: |\n Lightweight description of a trigger\'s spec used when creating a trigger\n from a pre-defined template (e.g. from a Skill action).\n literals: timer | feed\n fields:\n type: timer | feed\n cron?: string # required when type === timer; cron expression\n feed?: Feed # required when type === feed; the feed to subscribe to\n```\n\n## Components\n\n```mdl\ncomponent AutomationPanel\n desc: |\n Settings surface that lists all triggers for a space (or filtered to a\n specific ECHO object) and provides inline create / edit / delete via the\n TriggerEditor form. Displayed inside Settings.Panel at the path\n `<spacePath>/settings/org.dxos.plugin.automation.automations`.\n props:\n space: Space\n object?: Obj.Unknown # when set, only triggers matching this object are shown\n initialTrigger?: Trigger # pre-populate TriggerEditor for a new trigger\n onDone?: () => void\n state:\n trigger?: Trigger # trigger currently open in TriggerEditor (undefined = list view)\n selected?: Trigger # the existing trigger being edited (undefined = new)\n slots:\n (none)\n actions:\n handleAdd() # open TriggerEditor with a blank Trigger\n handleSelect(t: Trigger) # open TriggerEditor for an existing trigger\n handleDelete(t: Trigger) # remove trigger from space.db\n handleSave(t: Trigger) # persist new or update selected trigger\n handleCancel()\n handleForceRunTrigger(t: Trigger) # invoke timer trigger immediately\n handleResetCursor(t: Trigger) # clear feed cursor on a feed trigger\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 [list view \u2014 triggers exist] \u2502\n \u2502 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u2502\n \u2502 \u2502 \u25CB fn-name [\u25B6] [\u2715] \u2502 \u2502\n \u2502 \u2502 \u25CF fn-name [\u21BA] [\u2715] \u2502 \u2502\n \u2502 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2502\n \u2502 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2502\n \u2502 [+ New Trigger] \u2502\n \u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n \u2502 [editor view \u2014 trigger selected] \u2502\n \u2502 Settings.Item \u2502\n \u2502 \u2514\u2500\u2500 TriggerEditor \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n```mdl\ncomponent TriggerEditor\n desc: |\n Form-driven editor for a single Trigger. Renders a Form.Root backed by the\n Trigger schema with custom field overrides for function/workflow selection,\n spec kind selector, feed selector, subscription query builder, and\n structured input editor.\n props:\n db: Database\n trigger: Trigger\n types: TypeOption[] # available ECHO types for query builder\n tags: Tag[] # available tags for query builder\n readonlySpec?: boolean # lock spec.kind and spec.query (e.g. editing from an object context)\n onSave: (t: Partial<Trigger>) => void\n onCancel: () => void\n state:\n (managed by Form.Root)\n slots:\n (none)\n```\n\n```mdl\ncomponent FunctionsPanel\n desc: |\n Settings surface listing all PersistentOperation objects in a space.\n Each row shows the function name, optional source script name, a\n "go to script" icon button, and a delete button.\n props:\n space: Space\n state:\n functions: PersistentOperation[]\n scripts: Script[]\n slots:\n (none)\n actions:\n handleGoToScript(fn: PersistentOperation) # navigate to source Script\n handleDelete(fn: PersistentOperation) # remove function via SpaceOperation\n```\n\n```mdl\ncomponent TemplateEditor\n desc: |\n Markdown + Handlebars source editor backed by a Ref<Text>. Decorates\n Handlebars tags, DXN/URL tokens, and XML nodes. Reused by Routine and\n Skill article surfaces and by downstream plugins (plugin-script,\n plugin-magazine) via the `@dxos/plugin-routine/components` export.\n props:\n id: string\n source?: Ref<Text>\n lineNumbers?: boolean\n```\n\n```mdl\ncomponent RoutineProperties\n desc: Object-properties form for a Routine, rendered via ObjectProperties.\n props:\n routine: Routine\n```\n\n## Surfaces\n\n```mdl\nsurface skill -> SkillArticle # article for Skill objects\nsurface prompt -> RoutineArticle # article for Routine objects (template editor + run)\nsurface prompts -> RoutineList # space-home prompt list; dispatches RunPromptInNewChat\n```\n\n## Operations\n\n```mdl\nop CreateTriggerFromTemplate\n desc: |\n Creates a new Trigger from a lightweight template, optionally wiring it to\n a named Script\'s PersistentOperation, and navigates to the automations\n settings panel for the target space.\n input:\n db: Database\n template: TriggerTemplate\n enabled?: boolean # default false\n scriptName?: string # if provided, looks up Script by name and wires function ref\n input?: Record<string, any> # optional structured input forwarded to the trigger\n output: void\n effects: [echo:write, layout:navigate]\n requires: [SpaceOperation.AddObject, LayoutOperation.Open]\n note: |\n Resolves the named Script, finds its linked PersistentOperation, and sets\n trigger.function = Ref.make(fn). Template type determines spec:\n timer \u2192 Trigger.specTimer(cron)\n feed \u2192 Trigger.specFeed(feed)\n Trigger is added as a hidden object so it does not appear in the main graph.\n```\n\n```mdl\nop RunPromptInNewChat\n desc: Creates a new chat, binds context objects and skills, then runs a prompt.\n input:\n db: Database\n objects?: Obj[]\n skills?: string[]\n prompt: string | RoutineRef\n background?: boolean\n output: Chat\n effects: [echo:write, ai:infer]\n note: |\n Defined here so Routine UI (RoutineList, RoutineArticle) and downstream\n plugins can dispatch it without depending on plugin-assistant. The handler\n is contributed by plugin-assistant (chat creation + AiContext binding).\n When background is true, the prompt runs via the compute runtime without\n opening the chat UI. The returned Chat can be used to track progress.\n```\n\n## Features\n\n```mdl\nfeat F-1: Trigger Management\n\n req F-1.1: User can create a Trigger in any space via AutomationPanel.\n req F-1.2: User can edit an existing Trigger\'s function, spec, and input.\n req F-1.3: User can delete a Trigger; it is removed from space.db.\n req F-1.4: User can enable or disable a Trigger via an inline toggle.\n req F-1.5:\n when: object context provided to AutomationPanel\n then: only triggers matching that object\'s type or query are shown\n```\n\n```mdl\nfeat F-2: Trigger Dispatch\n\n req F-2.1:\n when: space.properties.computeEnvironment === "local"\n then: TriggerDispatcher starts for that space\n\n req F-2.2:\n when: space.properties.computeEnvironment === "edge" or "disabled"\n then: TriggerDispatcher stops for that space\n\n req F-2.3:\n when: computeEnvironment changes\n then: any in-flight dispatcher transition is cancelled before the new one starts\n\n req F-2.4:\n when: trigger spec.kind === "timer" and enabled === true\n then: TriggerDispatcher fires trigger according to cron expression\n\n req F-2.5:\n when: trigger spec.kind === "feed"\n then: TriggerDispatcher processes new messages from the linked Feed\n\n req F-2.6:\n when: trigger spec.kind === "subscription"\n then: TriggerDispatcher invokes trigger on matching ECHO object mutations\n```\n\n```mdl\nfeat F-3: Force Run and Cursor Reset\n\n req F-3.1:\n when: timer trigger is enabled and computeEnvironment !== "disabled"\n then: user can force-run the trigger immediately from AutomationPanel\n\n req F-3.2:\n when: computeEnvironment === "local"\n then: force-run invokes TriggerDispatcher.invokeTrigger directly in-process\n\n req F-3.3:\n when: computeEnvironment === "edge"\n then: force-run calls FunctionsServiceClient.forceRunCronTrigger via HTTP\n\n req F-3.4:\n when: trigger spec.kind === "feed" and a cursor is stored\n then: user can reset the cursor to reprocess the feed from the beginning\n```\n\n```mdl\nfeat F-4: Operation Registry\n\n req F-4.1:\n when: plugin activates\n then: all Capabilities.OperationHandler contributions are merged into a single OperationHandlerProvider\n\n req F-4.2: OperationRegistry per space resolves operations from the merged OperationHandlerProvider.\n req F-4.3: Skill registry is populated from AppCapabilities.SkillDefinition contributions.\n req F-4.4: OpaqueToolkit aggregates AppCapabilities.Toolkit contributions for agent invocation.\n```\n\n```mdl\nfeat F-5: Trace Sink\n\n req F-5.1:\n when: a trigger executes\n then: execution trace messages are written to the space Feed via FeedTraceSink\n\n req F-5.2: FeedTraceSink is contributed to Capabilities.TraceSink and routed via makeRoutingSink.\n```\n\n```mdl\nfeat F-6: Create Trigger From Template\n\n req F-6.1:\n when: op:CreateTriggerFromTemplate is invoked\n then: a Trigger is created and added as a hidden ECHO object in the target space\n\n req F-6.2:\n when: scriptName is provided\n then: the Trigger.function is wired to the PersistentOperation linked to that Script\n\n req F-6.3:\n when: template.type === "timer"\n then: Trigger.spec is set via Trigger.specTimer(template.cron)\n\n req F-6.4:\n when: template.type === "feed"\n then: Trigger.spec is set via Trigger.specFeed(template.feed)\n\n req F-6.5:\n when: trigger is created\n then: layout navigates to the automations settings panel for the space\n```\n\n## Acceptance\n\n```mdl\ntest T-1: Create trigger via AutomationPanel\n given: AutomationPanel rendered for a space with no triggers\n when: user clicks "New Trigger"\n then:\n - TriggerEditor shown with a blank Trigger\n - selected state is undefined (new trigger mode)\n```\n\n```mdl\ntest T-2: Save new trigger\n given: TriggerEditor open with blank Trigger\n when: user fills in a function and spec, then saves\n then:\n - space.db.add called with a new Trigger\n - list view restored\n - onDone called\n```\n\n```mdl\ntest T-3: Edit existing trigger\n given: AutomationPanel listing one trigger\n when: user clicks the trigger row\n then:\n - TriggerEditor opens pre-populated with that trigger\'s values\n - selected state holds the original trigger\n - saving calls Obj.update on the original trigger\n```\n\n```mdl\ntest T-4: Enable/disable toggle\n given: AutomationPanel showing trigger with enabled = false\n when: user flips the toggle\n then:\n - Obj.update sets trigger.enabled = true\n - toggle reflects new state immediately\n```\n\n```mdl\ntest T-5: Force run timer trigger (local)\n given: timer trigger enabled, computeEnvironment = "local"\n when: user clicks the force-run button\n then:\n - TriggerDispatcher.invokeTrigger called with a TimerEvent\n - no error surfaced to user\n```\n\n```mdl\ntest T-6: Dispatcher lifecycle on environment change\n given: space computeEnvironment = "local", dispatcher running\n when: space.properties.computeEnvironment changes to "edge"\n then:\n - in-flight transition fiber interrupted\n - TriggerDispatcher.stop() called for that space\n```\n\n```mdl\ntest T-7: CreateTriggerFromTemplate with timer\n given: db contains Script "daily-summary", computeEnvironment = "local"\n when: op:CreateTriggerFromTemplate invoked with template={type:"timer",cron:"0 8 * * *"}, scriptName="daily-summary"\n then:\n - Trigger created with spec.kind === "timer", spec.cron === "0 8 * * *"\n - Trigger.function wired to PersistentOperation linked to "daily-summary" script\n - Trigger added as hidden ECHO object\n - layout navigates to automations settings panel\n```\n\n```mdl\ntest T-8: CreateTriggerFromTemplate with feed\n given: db contains a Feed object "email-feed"\n when: op:CreateTriggerFromTemplate invoked with template={type:"feed",feed:<email-feed>}\n then:\n - Trigger created with spec.kind === "feed", spec.feed === Ref to email-feed\n - Trigger added as hidden ECHO object\n```\n\n---\n\n## Appendix: Extension Definitions\n\nExtension block types used in this document are defined below using\nthe core `ext` primitive \u2014 the only construct the base language provides.\n\n```mdl\next type\n uri: org.dxos.mdl.type@1.0\n desc: A named data structure with typed fields and optional literals.\n fields:\n desc?: Prose\n fields?: FieldMap # name[?]: TypeExpr (# inline comment)\n literals?: UnionList # a | b | c\n extends?: TypeRef[]\n```\n\n```mdl\next feat\n uri: org.dxos.mdl.feat@1.0\n desc: A named feature grouping one or more requirements.\n fields:\n desc?: Prose\n req: RequirementList\n nesting: self # feat blocks may contain feat blocks\n```\n\n```mdl\next test\n uri: org.dxos.mdl.test@1.0\n desc: An acceptance scenario expressed as given / when / then steps.\n fields:\n given?: Step | Step[]\n when?: Step | Step[]\n then: Step | Step[]\n tags?: TagList\n```\n\n```mdl\next component\n uri: org.dxos.mdl.component@1.0\n desc: A UI component with props, internal state, slots, actions, and events.\n fields:\n desc?: Prose\n props?: FieldMap # external inputs (immutable inside component)\n state?: FieldMap # internal reactive state\n slots?: FieldMap # named ReactNode injection points\n actions?: ActionMap # methods the component exposes or handles\n emits?: EventMap # events the component raises to its parent\n layout?: CodeBlock # ASCII sketch of visual structure (non-normative)\n```\n\n```mdl\next op\n uri: org.dxos.mdl.op@1.0\n desc: |\n A named operation with typed inputs, outputs, and declared errors.\n Pure ops have no effects or requires. Effectful ops declare both.\n fields:\n desc?: Prose\n input?: FieldMap # named input parameters\n output?: TypeExpr # return type\n errors?: ErrorMap # name: Prose (when this error occurs)\n effects?: EffectList # echo:read | echo:write | http | fs | ...\n requires?: ServiceList # injected service dependencies\n note?: Prose # implementation guidance (non-normative)\n```\n';
|
|
13
13
|
|
|
14
14
|
// src/RoutinePlugin.tsx
|
|
@@ -62,4 +62,4 @@ export {
|
|
|
62
62
|
RoutinePlugin,
|
|
63
63
|
RoutinePlugin_default
|
|
64
64
|
};
|
|
65
|
-
//# sourceMappingURL=chunk-
|
|
65
|
+
//# sourceMappingURL=chunk-YGWSAKLD.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/RoutinePlugin.tsx", "raw-loader:/
|
|
3
|
+
"sources": ["../../../src/RoutinePlugin.tsx", "raw-loader:/__w/dxos/dxos/packages/plugins/plugin-routine/PLUGIN.mdl"],
|
|
4
4
|
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { ActivationEvent, ActivationEvents, Plugin } from '@dxos/app-framework';\nimport { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';\nimport { Instructions, Operation, Trace, Trigger } from '@dxos/compute';\nimport { ClientEvents } from '@dxos/plugin-client';\n\nimport {\n AppGraphBuilder,\n CreateObject,\n LayerSpecs,\n NavigationResolver,\n OperationHandler,\n ReactSurface,\n RegistrySync,\n Templates,\n TriggerRuntimeController,\n} from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\nimport { Routine } from '#types';\n\n// eslint-disable-next-line import/no-relative-packages\nimport pluginSpec from '../PLUGIN.mdl?raw';\n\nexport const RoutinePlugin = Plugin.define(meta).pipe(\n AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),\n AppPlugin.addCreateObjectModule({ activate: CreateObject }),\n AppPlugin.addNavigationResolverModule({ activatesOn: ClientEvents.ClientReady, activate: NavigationResolver }),\n AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),\n AppPlugin.addPluginAssetModule({\n asset: { pluginId: meta.profile.key, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },\n }),\n AppPlugin.addSchemaModule({\n schema: [Routine.Routine, Operation.PersistentOperation, Instructions.Instructions, Trigger.Trigger, Trace.Message],\n }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.addModule({\n activatesOn: ClientEvents.ClientReady,\n firesBeforeActivation: [ActivationEvents.SetupProcessManager],\n activate: LayerSpecs,\n }),\n Plugin.addModule({\n activatesOn: ClientEvents.ClientReady,\n activate: RegistrySync,\n }),\n Plugin.addModule({ activatesOn: AppActivationEvents.SetupSchema, activate: Templates }),\n Plugin.addModule({\n activatesOn: ActivationEvent.allOf(ActivationEvents.ProcessManagerReady, ClientEvents.SpacesReady),\n activate: TriggerRuntimeController,\n }),\n Plugin.make,\n);\n\nexport default RoutinePlugin;\n", "---\nid: org.dxos.plugin.automation\nname: AutomationPlugin\nversion: 0.1.0\n---\n\nA workflow automation engine plugin for DXOS Composer that enables event-driven\npipelines connecting ECHO objects to persistent compute functions.\n\nTriggers listen for ECHO mutations, timer schedules, incoming feeds (email, webhook),\nor data subscriptions and invoke `PersistentOperation` handlers when their conditions\nfire. Each trigger carries optional structured input and is dispatched by a\nper-space `TriggerDispatcher` that runs locally in the browser or is delegated to\nthe DXOS edge when the space `computeEnvironment` is `edge`.\n\nThe plugin integrates with the `@dxos/compute` operation registry and the\n`@dxos/functions-runtime` execution layer. Skill, operation-handler, and\ntoolkit contributions from other plugins are gathered at application scope and\nmerged before being offered to space-level operation registries, so any plugin\nthat contributes a `Capabilities.OperationHandler` automatically becomes\ninvocable from an automation trigger.\n\nUsers interact with automations through the `AutomationPanel` settings surface,\nwhich lists active triggers for a space (or for a specific ECHO object) and\nopens the `TriggerEditor` form to create, configure, and enable/disable\nindividual triggers.\n\n## Extensions\n\nThe following extension dialects are used in this document.\nEach extension is defined in the Appendix or resolved via its URI.\n\n| Term | URI |\n|-------------|-------------------------------|\n| `type` | `org.dxos.mdl.type@1.0` |\n| `feat` | `org.dxos.mdl.feat@1.0` |\n| `test` | `org.dxos.mdl.test@1.0` |\n| `component` | `org.dxos.mdl.component@1.0` |\n| `op` | `org.dxos.mdl.op@1.0` |\n\n## Types\n\nExisting types used by this plugin (defined in `@dxos/compute` and `@dxos/functions-runtime`):\n\n| Type | Source | Role in AutomationPlugin |\n|----------------------|---------------------------|--------------------------------------------------------------------|\n| `Trigger` | `@dxos/compute` | Persistent trigger configuration (spec, function ref, input, enabled) |\n| `PersistentOperation`| `@dxos/compute` | Registered compute function callable from a trigger |\n| `Trace.Message` | `@dxos/compute` | Execution trace record appended after each trigger run |\n| `Script` | `@dxos/compute` | Source script that produces one or more `PersistentOperation`s |\n| `Feed` | `@dxos/echo` | Feed object that a `feed`-spec trigger listens to |\n| `ComputeGraph` | `@dxos/conductor` | Visual workflow graph selectable as a trigger function |\n\nNew types defined by this plugin:\n\n```mdl\ntype TriggerTemplate\n desc: |\n Lightweight description of a trigger's spec used when creating a trigger\n from a pre-defined template (e.g. from a Skill action).\n literals: timer | feed\n fields:\n type: timer | feed\n cron?: string # required when type === timer; cron expression\n feed?: Feed # required when type === feed; the feed to subscribe to\n```\n\n## Components\n\n```mdl\ncomponent AutomationPanel\n desc: |\n Settings surface that lists all triggers for a space (or filtered to a\n specific ECHO object) and provides inline create / edit / delete via the\n TriggerEditor form. Displayed inside Settings.Panel at the path\n `<spacePath>/settings/org.dxos.plugin.automation.automations`.\n props:\n space: Space\n object?: Obj.Unknown # when set, only triggers matching this object are shown\n initialTrigger?: Trigger # pre-populate TriggerEditor for a new trigger\n onDone?: () => void\n state:\n trigger?: Trigger # trigger currently open in TriggerEditor (undefined = list view)\n selected?: Trigger # the existing trigger being edited (undefined = new)\n slots:\n (none)\n actions:\n handleAdd() # open TriggerEditor with a blank Trigger\n handleSelect(t: Trigger) # open TriggerEditor for an existing trigger\n handleDelete(t: Trigger) # remove trigger from space.db\n handleSave(t: Trigger) # persist new or update selected trigger\n handleCancel()\n handleForceRunTrigger(t: Trigger) # invoke timer trigger immediately\n handleResetCursor(t: Trigger) # clear feed cursor on a feed trigger\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 [list view \u2014 triggers exist] \u2502\n \u2502 \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u2502\n \u2502 \u2502 \u25CB fn-name [\u25B6] [\u2715] \u2502 \u2502\n \u2502 \u2502 \u25CF fn-name [\u21BA] [\u2715] \u2502 \u2502\n \u2502 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2502\n \u2502 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2502\n \u2502 [+ New Trigger] \u2502\n \u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n \u2502 [editor view \u2014 trigger selected] \u2502\n \u2502 Settings.Item \u2502\n \u2502 \u2514\u2500\u2500 TriggerEditor \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n```mdl\ncomponent TriggerEditor\n desc: |\n Form-driven editor for a single Trigger. Renders a Form.Root backed by the\n Trigger schema with custom field overrides for function/workflow selection,\n spec kind selector, feed selector, subscription query builder, and\n structured input editor.\n props:\n db: Database\n trigger: Trigger\n types: TypeOption[] # available ECHO types for query builder\n tags: Tag[] # available tags for query builder\n readonlySpec?: boolean # lock spec.kind and spec.query (e.g. editing from an object context)\n onSave: (t: Partial<Trigger>) => void\n onCancel: () => void\n state:\n (managed by Form.Root)\n slots:\n (none)\n```\n\n```mdl\ncomponent FunctionsPanel\n desc: |\n Settings surface listing all PersistentOperation objects in a space.\n Each row shows the function name, optional source script name, a\n \"go to script\" icon button, and a delete button.\n props:\n space: Space\n state:\n functions: PersistentOperation[]\n scripts: Script[]\n slots:\n (none)\n actions:\n handleGoToScript(fn: PersistentOperation) # navigate to source Script\n handleDelete(fn: PersistentOperation) # remove function via SpaceOperation\n```\n\n```mdl\ncomponent TemplateEditor\n desc: |\n Markdown + Handlebars source editor backed by a Ref<Text>. Decorates\n Handlebars tags, DXN/URL tokens, and XML nodes. Reused by Routine and\n Skill article surfaces and by downstream plugins (plugin-script,\n plugin-magazine) via the `@dxos/plugin-routine/components` export.\n props:\n id: string\n source?: Ref<Text>\n lineNumbers?: boolean\n```\n\n```mdl\ncomponent RoutineProperties\n desc: Object-properties form for a Routine, rendered via ObjectProperties.\n props:\n routine: Routine\n```\n\n## Surfaces\n\n```mdl\nsurface skill -> SkillArticle # article for Skill objects\nsurface prompt -> RoutineArticle # article for Routine objects (template editor + run)\nsurface prompts -> RoutineList # space-home prompt list; dispatches RunPromptInNewChat\n```\n\n## Operations\n\n```mdl\nop CreateTriggerFromTemplate\n desc: |\n Creates a new Trigger from a lightweight template, optionally wiring it to\n a named Script's PersistentOperation, and navigates to the automations\n settings panel for the target space.\n input:\n db: Database\n template: TriggerTemplate\n enabled?: boolean # default false\n scriptName?: string # if provided, looks up Script by name and wires function ref\n input?: Record<string, any> # optional structured input forwarded to the trigger\n output: void\n effects: [echo:write, layout:navigate]\n requires: [SpaceOperation.AddObject, LayoutOperation.Open]\n note: |\n Resolves the named Script, finds its linked PersistentOperation, and sets\n trigger.function = Ref.make(fn). Template type determines spec:\n timer \u2192 Trigger.specTimer(cron)\n feed \u2192 Trigger.specFeed(feed)\n Trigger is added as a hidden object so it does not appear in the main graph.\n```\n\n```mdl\nop RunPromptInNewChat\n desc: Creates a new chat, binds context objects and skills, then runs a prompt.\n input:\n db: Database\n objects?: Obj[]\n skills?: string[]\n prompt: string | RoutineRef\n background?: boolean\n output: Chat\n effects: [echo:write, ai:infer]\n note: |\n Defined here so Routine UI (RoutineList, RoutineArticle) and downstream\n plugins can dispatch it without depending on plugin-assistant. The handler\n is contributed by plugin-assistant (chat creation + AiContext binding).\n When background is true, the prompt runs via the compute runtime without\n opening the chat UI. The returned Chat can be used to track progress.\n```\n\n## Features\n\n```mdl\nfeat F-1: Trigger Management\n\n req F-1.1: User can create a Trigger in any space via AutomationPanel.\n req F-1.2: User can edit an existing Trigger's function, spec, and input.\n req F-1.3: User can delete a Trigger; it is removed from space.db.\n req F-1.4: User can enable or disable a Trigger via an inline toggle.\n req F-1.5:\n when: object context provided to AutomationPanel\n then: only triggers matching that object's type or query are shown\n```\n\n```mdl\nfeat F-2: Trigger Dispatch\n\n req F-2.1:\n when: space.properties.computeEnvironment === \"local\"\n then: TriggerDispatcher starts for that space\n\n req F-2.2:\n when: space.properties.computeEnvironment === \"edge\" or \"disabled\"\n then: TriggerDispatcher stops for that space\n\n req F-2.3:\n when: computeEnvironment changes\n then: any in-flight dispatcher transition is cancelled before the new one starts\n\n req F-2.4:\n when: trigger spec.kind === \"timer\" and enabled === true\n then: TriggerDispatcher fires trigger according to cron expression\n\n req F-2.5:\n when: trigger spec.kind === \"feed\"\n then: TriggerDispatcher processes new messages from the linked Feed\n\n req F-2.6:\n when: trigger spec.kind === \"subscription\"\n then: TriggerDispatcher invokes trigger on matching ECHO object mutations\n```\n\n```mdl\nfeat F-3: Force Run and Cursor Reset\n\n req F-3.1:\n when: timer trigger is enabled and computeEnvironment !== \"disabled\"\n then: user can force-run the trigger immediately from AutomationPanel\n\n req F-3.2:\n when: computeEnvironment === \"local\"\n then: force-run invokes TriggerDispatcher.invokeTrigger directly in-process\n\n req F-3.3:\n when: computeEnvironment === \"edge\"\n then: force-run calls FunctionsServiceClient.forceRunCronTrigger via HTTP\n\n req F-3.4:\n when: trigger spec.kind === \"feed\" and a cursor is stored\n then: user can reset the cursor to reprocess the feed from the beginning\n```\n\n```mdl\nfeat F-4: Operation Registry\n\n req F-4.1:\n when: plugin activates\n then: all Capabilities.OperationHandler contributions are merged into a single OperationHandlerProvider\n\n req F-4.2: OperationRegistry per space resolves operations from the merged OperationHandlerProvider.\n req F-4.3: Skill registry is populated from AppCapabilities.SkillDefinition contributions.\n req F-4.4: OpaqueToolkit aggregates AppCapabilities.Toolkit contributions for agent invocation.\n```\n\n```mdl\nfeat F-5: Trace Sink\n\n req F-5.1:\n when: a trigger executes\n then: execution trace messages are written to the space Feed via FeedTraceSink\n\n req F-5.2: FeedTraceSink is contributed to Capabilities.TraceSink and routed via makeRoutingSink.\n```\n\n```mdl\nfeat F-6: Create Trigger From Template\n\n req F-6.1:\n when: op:CreateTriggerFromTemplate is invoked\n then: a Trigger is created and added as a hidden ECHO object in the target space\n\n req F-6.2:\n when: scriptName is provided\n then: the Trigger.function is wired to the PersistentOperation linked to that Script\n\n req F-6.3:\n when: template.type === \"timer\"\n then: Trigger.spec is set via Trigger.specTimer(template.cron)\n\n req F-6.4:\n when: template.type === \"feed\"\n then: Trigger.spec is set via Trigger.specFeed(template.feed)\n\n req F-6.5:\n when: trigger is created\n then: layout navigates to the automations settings panel for the space\n```\n\n## Acceptance\n\n```mdl\ntest T-1: Create trigger via AutomationPanel\n given: AutomationPanel rendered for a space with no triggers\n when: user clicks \"New Trigger\"\n then:\n - TriggerEditor shown with a blank Trigger\n - selected state is undefined (new trigger mode)\n```\n\n```mdl\ntest T-2: Save new trigger\n given: TriggerEditor open with blank Trigger\n when: user fills in a function and spec, then saves\n then:\n - space.db.add called with a new Trigger\n - list view restored\n - onDone called\n```\n\n```mdl\ntest T-3: Edit existing trigger\n given: AutomationPanel listing one trigger\n when: user clicks the trigger row\n then:\n - TriggerEditor opens pre-populated with that trigger's values\n - selected state holds the original trigger\n - saving calls Obj.update on the original trigger\n```\n\n```mdl\ntest T-4: Enable/disable toggle\n given: AutomationPanel showing trigger with enabled = false\n when: user flips the toggle\n then:\n - Obj.update sets trigger.enabled = true\n - toggle reflects new state immediately\n```\n\n```mdl\ntest T-5: Force run timer trigger (local)\n given: timer trigger enabled, computeEnvironment = \"local\"\n when: user clicks the force-run button\n then:\n - TriggerDispatcher.invokeTrigger called with a TimerEvent\n - no error surfaced to user\n```\n\n```mdl\ntest T-6: Dispatcher lifecycle on environment change\n given: space computeEnvironment = \"local\", dispatcher running\n when: space.properties.computeEnvironment changes to \"edge\"\n then:\n - in-flight transition fiber interrupted\n - TriggerDispatcher.stop() called for that space\n```\n\n```mdl\ntest T-7: CreateTriggerFromTemplate with timer\n given: db contains Script \"daily-summary\", computeEnvironment = \"local\"\n when: op:CreateTriggerFromTemplate invoked with template={type:\"timer\",cron:\"0 8 * * *\"}, scriptName=\"daily-summary\"\n then:\n - Trigger created with spec.kind === \"timer\", spec.cron === \"0 8 * * *\"\n - Trigger.function wired to PersistentOperation linked to \"daily-summary\" script\n - Trigger added as hidden ECHO object\n - layout navigates to automations settings panel\n```\n\n```mdl\ntest T-8: CreateTriggerFromTemplate with feed\n given: db contains a Feed object \"email-feed\"\n when: op:CreateTriggerFromTemplate invoked with template={type:\"feed\",feed:<email-feed>}\n then:\n - Trigger created with spec.kind === \"feed\", spec.feed === Ref to email-feed\n - Trigger added as hidden ECHO object\n```\n\n---\n\n## Appendix: Extension Definitions\n\nExtension block types used in this document are defined below using\nthe core `ext` primitive \u2014 the only construct the base language provides.\n\n```mdl\next type\n uri: org.dxos.mdl.type@1.0\n desc: A named data structure with typed fields and optional literals.\n fields:\n desc?: Prose\n fields?: FieldMap # name[?]: TypeExpr (# inline comment)\n literals?: UnionList # a | b | c\n extends?: TypeRef[]\n```\n\n```mdl\next feat\n uri: org.dxos.mdl.feat@1.0\n desc: A named feature grouping one or more requirements.\n fields:\n desc?: Prose\n req: RequirementList\n nesting: self # feat blocks may contain feat blocks\n```\n\n```mdl\next test\n uri: org.dxos.mdl.test@1.0\n desc: An acceptance scenario expressed as given / when / then steps.\n fields:\n given?: Step | Step[]\n when?: Step | Step[]\n then: Step | Step[]\n tags?: TagList\n```\n\n```mdl\next component\n uri: org.dxos.mdl.component@1.0\n desc: A UI component with props, internal state, slots, actions, and events.\n fields:\n desc?: Prose\n props?: FieldMap # external inputs (immutable inside component)\n state?: FieldMap # internal reactive state\n slots?: FieldMap # named ReactNode injection points\n actions?: ActionMap # methods the component exposes or handles\n emits?: EventMap # events the component raises to its parent\n layout?: CodeBlock # ASCII sketch of visual structure (non-normative)\n```\n\n```mdl\next op\n uri: org.dxos.mdl.op@1.0\n desc: |\n A named operation with typed inputs, outputs, and declared errors.\n Pure ops have no effects or requires. Effectful ops declare both.\n fields:\n desc?: Prose\n input?: FieldMap # named input parameters\n output?: TypeExpr # return type\n errors?: ErrorMap # name: Prose (when this error occurs)\n effects?: EffectList # echo:read | echo:write | http | fs | ...\n requires?: ServiceList # injected service dependencies\n note?: Prose # implementation guidance (non-normative)\n```\n"],
|
|
5
5
|
"mappings": ";AAIA,SAASA,iBAAiBC,kBAAkBC,cAAc;AAC1D,SAASC,qBAAqBC,iBAAiB;AAC/C,SAASC,cAAcC,WAAWC,OAAOC,eAAe;AACxD,SAASC,oBAAoB;AAE7B,SACEC,iBACAC,cACAC,YACAC,oBACAC,kBACAC,cACAC,cACAC,WACAC,gCACK;AACP,SAASC,YAAY;AACrB,SAASC,oBAAoB;AAC7B,SAASC,eAAe;;;ACtBxB;;;AD2BO,IAAMC,gBAAgBC,OAAOC,OAAOC,IAAAA,EAAMC,KAC/CC,UAAUC,kBAAkB;EAAEC,UAAUC;AAAgB,CAAA,GACxDH,UAAUI,sBAAsB;EAAEF,UAAUG;AAAa,CAAA,GACzDL,UAAUM,4BAA4B;EAAEC,aAAaC,aAAaC;EAAaP,UAAUQ;AAAmB,CAAA,GAC5GV,UAAUW,0BAA0B;EAAET,UAAUU;AAAiB,CAAA,GACjEZ,UAAUa,qBAAqB;EAC7BC,OAAO;IAAEC,UAAUjB,KAAKkB,QAAQC;IAAKC,MAAM;IAAcC,SAASC;IAAYC,UAAU;EAAoB;AAC9G,CAAA,GACArB,UAAUsB,gBAAgB;EACxBC,QAAQ;IAACC,QAAQA;IAASC,UAAUC;IAAqBC,aAAaA;IAAcC,QAAQA;IAASC,MAAMC;;AAC7G,CAAA,GACA9B,UAAU+B,iBAAiB;EAAE7B,UAAU8B;AAAa,CAAA,GACpDhC,UAAUiC,sBAAsB;EAAEC;AAAa,CAAA,GAC/CtC,OAAOuC,UAAU;EACf5B,aAAaC,aAAaC;EAC1B2B,uBAAuB;IAACC,iBAAiBC;;EACzCpC,UAAUqC;AACZ,CAAA,GACA3C,OAAOuC,UAAU;EACf5B,aAAaC,aAAaC;EAC1BP,UAAUsC;AACZ,CAAA,GACA5C,OAAOuC,UAAU;EAAE5B,aAAakC,oBAAoBC;EAAaxC,UAAUyC;AAAU,CAAA,GACrF/C,OAAOuC,UAAU;EACf5B,aAAaqC,gBAAgBC,MAAMR,iBAAiBS,qBAAqBtC,aAAauC,WAAW;EACjG7C,UAAU8C;AACZ,CAAA,GACApD,OAAOqD,IAAI;AAGb,IAAA,wBAAetD;",
|
|
6
6
|
"names": ["ActivationEvent", "ActivationEvents", "Plugin", "AppActivationEvents", "AppPlugin", "Instructions", "Operation", "Trace", "Trigger", "ClientEvents", "AppGraphBuilder", "CreateObject", "LayerSpecs", "NavigationResolver", "OperationHandler", "ReactSurface", "RegistrySync", "Templates", "TriggerRuntimeController", "meta", "translations", "Routine", "RoutinePlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addAppGraphModule", "activate", "AppGraphBuilder", "addCreateObjectModule", "CreateObject", "addNavigationResolverModule", "activatesOn", "ClientEvents", "ClientReady", "NavigationResolver", "addOperationHandlerModule", "OperationHandler", "addPluginAssetModule", "asset", "pluginId", "profile", "key", "path", "content", "pluginSpec", "mimeType", "addSchemaModule", "schema", "Routine", "Operation", "PersistentOperation", "Instructions", "Trigger", "Trace", "Message", "addSurfaceModule", "ReactSurface", "addTranslationsModule", "translations", "addModule", "firesBeforeActivation", "ActivationEvents", "SetupProcessManager", "LayerSpecs", "RegistrySync", "AppActivationEvents", "SetupSchema", "Templates", "ActivationEvent", "allOf", "ProcessManagerReady", "SpacesReady", "TriggerRuntimeController", "make"]
|
|
@@ -552,7 +552,7 @@ import { invariant } from "@dxos/invariant";
|
|
|
552
552
|
import { Input, ToggleGroup, ToggleGroupItem, composable, composableProps, useTranslation } from "@dxos/react-ui";
|
|
553
553
|
import { mx } from "@dxos/ui-theme";
|
|
554
554
|
import { meta } from "#meta";
|
|
555
|
-
var __dxlog_file = "/
|
|
555
|
+
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-routine/src/components/Schedule/Schedule.tsx";
|
|
556
556
|
var ScheduleKinds = [
|
|
557
557
|
// TODO(burdon): Once cannot be converted to a cron expression.
|
|
558
558
|
// 'once',
|
|
@@ -15,7 +15,7 @@ import { Operation } from "@dxos/compute";
|
|
|
15
15
|
import { Database } from "@dxos/echo";
|
|
16
16
|
import { invariant } from "@dxos/invariant";
|
|
17
17
|
import { SpaceOperation } from "@dxos/plugin-space";
|
|
18
|
-
var __dxlog_file = "/
|
|
18
|
+
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-routine/src/operations/create-routine.ts";
|
|
19
19
|
var handler = RoutineOperation_exports.CreateRoutine.pipe(Operation.withHandler(Effect.fnUntraced(function* ({ db, templateId, name, subject }) {
|
|
20
20
|
const templates = yield* Capability.getAll(RoutineCapabilities_exports.Template);
|
|
21
21
|
const template = templates.find((entry) => entry.id === templateId);
|
|
@@ -35,4 +35,4 @@ var create_routine_default = handler;
|
|
|
35
35
|
export {
|
|
36
36
|
create_routine_default as default
|
|
37
37
|
};
|
|
38
|
-
//# sourceMappingURL=create-routine-
|
|
38
|
+
//# sourceMappingURL=create-routine-6QBY6TWF.mjs.map
|
|
@@ -13,7 +13,7 @@ import { ProcessManager } from "@dxos/compute-runtime";
|
|
|
13
13
|
import { Database, Registry } from "@dxos/echo";
|
|
14
14
|
import { FeedTraceSink, RemoteFunctionExecutionService, TriggerDispatcher, TriggerStateStore } from "@dxos/functions-runtime";
|
|
15
15
|
import { invariant } from "@dxos/invariant";
|
|
16
|
-
var __dxlog_file = "/
|
|
16
|
+
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-routine/src/capabilities/layer-specs.ts";
|
|
17
17
|
var OperationHandlerProviderSpec = LayerSpec.make({
|
|
18
18
|
affinity: "application",
|
|
19
19
|
requires: [
|
|
@@ -132,4 +132,4 @@ var layer_specs_default = Capability.makeModule(() => Effect.succeed([
|
|
|
132
132
|
export {
|
|
133
133
|
layer_specs_default as default
|
|
134
134
|
};
|
|
135
|
-
//# sourceMappingURL=layer-specs-
|
|
135
|
+
//# sourceMappingURL=layer-specs-2TWJU5HI.mjs.map
|