@capybara-hq/kernel 0.1.0-rc.104 → 0.1.0-rc.106
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/agents/agents.schemas.d.ts +9 -9
- package/dist/{schedules/schedules.controller.d.ts → automations/automations.controller.d.ts} +37 -32
- package/dist/{schedules/schedules.controller.js → automations/automations.controller.js} +68 -57
- package/dist/automations/automations.module.d.ts +16 -0
- package/dist/{schedules/schedules.module.js → automations/automations.module.js} +18 -15
- package/dist/{schedules/schedules.schemas.d.ts → automations/automations.schemas.d.ts} +151 -50
- package/dist/automations/automations.schemas.js +253 -0
- package/dist/{schedules/scheduled-tasks.service.d.ts → automations/automations.service.d.ts} +99 -52
- package/dist/{schedules/scheduled-tasks.service.js → automations/automations.service.js} +303 -134
- package/dist/{schedules → automations}/calendar.d.ts +8 -8
- package/dist/{schedules → automations}/calendar.js +2 -2
- package/dist/automations/effective-settings.d.ts +28 -0
- package/dist/automations/effective-settings.js +25 -0
- package/dist/automations/errors.d.ts +19 -0
- package/dist/automations/errors.js +19 -0
- package/dist/automations/events/coalesce.d.ts +28 -0
- package/dist/automations/events/coalesce.js +131 -0
- package/dist/automations/events/deadline.d.ts +10 -0
- package/dist/automations/events/deadline.js +24 -0
- package/dist/automations/events/dispatcher.d.ts +74 -0
- package/dist/automations/events/dispatcher.js +353 -0
- package/dist/automations/events/events.module.d.ts +7 -0
- package/dist/automations/events/events.module.js +26 -0
- package/dist/automations/events/guards.d.ts +32 -0
- package/dist/automations/events/guards.js +87 -0
- package/dist/automations/events/sweep.job.d.ts +49 -0
- package/dist/automations/events/sweep.job.js +202 -0
- package/dist/automations/events/token.d.ts +5 -0
- package/dist/automations/events/token.js +5 -0
- package/dist/automations/events/trigger-events.service.d.ts +47 -0
- package/dist/automations/events/trigger-events.service.js +254 -0
- package/dist/{schedules → automations}/fire.d.ts +57 -17
- package/dist/{schedules → automations}/fire.js +311 -79
- package/dist/{schedules → automations}/grant-rules.d.ts +1 -1
- package/dist/{schedules → automations}/grant-rules.js +5 -5
- package/dist/automations/job-ids.d.ts +113 -0
- package/dist/automations/job-ids.js +117 -0
- package/dist/{schedules → automations}/pause.d.ts +3 -3
- package/dist/{schedules → automations}/pause.js +3 -3
- package/dist/{schedules → automations}/run-tracker.d.ts +21 -10
- package/dist/{schedules → automations}/run-tracker.js +68 -56
- package/dist/{schedules → automations}/scan.job.d.ts +12 -8
- package/dist/{schedules → automations}/scan.job.js +39 -23
- package/dist/{schedules → automations}/schedule-math.d.ts +19 -12
- package/dist/{schedules → automations}/schedule-math.js +17 -7
- package/dist/{schedules → automations}/store.d.ts +57 -27
- package/dist/{schedules → automations}/store.js +102 -52
- package/dist/automations/store.module.d.ts +6 -0
- package/dist/{schedules → automations}/store.module.js +9 -9
- package/dist/automations/types.d.ts +178 -0
- package/dist/{schedules → automations}/unattended.d.ts +22 -11
- package/dist/{schedules → automations}/unattended.js +53 -30
- package/dist/catalog/marketplaces.service.d.ts +1 -1
- package/dist/channels/channels.module.js +3 -3
- package/dist/channels/outbound.d.ts +5 -5
- package/dist/channels/outbound.js +17 -17
- package/dist/channels/threads.d.ts +1 -1
- package/dist/channels/threads.js +1 -1
- package/dist/config/schema.d.ts +5 -1
- package/dist/config/schema.js +44 -6
- package/dist/conversations/approval-profile.d.ts +2 -2
- package/dist/conversations/approval-profile.js +3 -3
- package/dist/conversations/conversations.controller.d.ts +7 -1
- package/dist/conversations/conversations.controller.js +26 -10
- package/dist/conversations/conversations.service.d.ts +103 -25
- package/dist/conversations/conversations.service.js +138 -33
- package/dist/conversations/events.d.ts +48 -1
- package/dist/conversations/events.js +61 -9
- package/dist/conversations/message-context.d.ts +2 -2
- package/dist/conversations/message-context.js +1 -1
- package/dist/conversations/permission-profile-store.d.ts +2 -1
- package/dist/conversations/permission-profiles.controller.d.ts +3 -0
- package/dist/conversations/permission-profiles.service.js +1 -1
- package/dist/conversations/prompt-suggestion-request.d.ts +1 -1
- package/dist/conversations/prompt-suggestion-request.js +2 -1
- package/dist/conversations/queue.d.ts +7 -4
- package/dist/conversations/queue.js +6 -2
- package/dist/conversations/queue.service.d.ts +5 -5
- package/dist/conversations/queue.service.js +20 -14
- package/dist/ctx/create-ctx.d.ts +20 -1
- package/dist/ctx/create-ctx.js +59 -2
- package/dist/db/kernel-schema.d.ts +104 -25
- package/dist/devices/device-project-files.service.d.ts +88 -0
- package/dist/devices/device-project-files.service.js +249 -0
- package/dist/devices/device-projects.service.d.ts +40 -0
- package/dist/devices/device-projects.service.js +16 -13
- package/dist/devices/devices.controller.d.ts +9 -3
- package/dist/devices/devices.controller.js +27 -5
- package/dist/devices/devices.module.js +9 -1
- package/dist/devices/devices.schemas.js +6 -1
- package/dist/devices/dto.d.ts +15 -0
- package/dist/devices/dto.js +11 -0
- package/dist/devices/project-paths.d.ts +29 -0
- package/dist/devices/project-paths.js +66 -0
- package/dist/devices/project-rules.d.ts +5 -1
- package/dist/devices/project-rules.js +5 -1
- package/dist/errors.d.ts +47 -13
- package/dist/errors.js +47 -13
- package/dist/evals/reconstruct.d.ts +10 -1
- package/dist/evals/reconstruct.js +7 -0
- package/dist/extensions/host.d.ts +6 -1
- package/dist/extensions/host.js +10 -0
- package/dist/extensions/permission-set.d.ts +17 -1
- package/dist/extensions/permission-set.js +13 -1
- package/dist/extensions/permission-view.d.ts +1 -1
- package/dist/extensions/permission-view.js +4 -1
- package/dist/git/gateway.js +2 -2
- package/dist/handoff/app-schemes.d.ts +28 -0
- package/dist/handoff/app-schemes.js +41 -0
- package/dist/handoff/handoff-paths.d.ts +26 -0
- package/dist/handoff/handoff-paths.js +25 -0
- package/dist/handoff/handoff-tickets.d.ts +28 -0
- package/dist/handoff/handoff-tickets.js +111 -0
- package/dist/handoff/handoff.controller.d.ts +24 -0
- package/dist/handoff/handoff.controller.js +74 -0
- package/dist/handoff/handoff.module.d.ts +7 -0
- package/dist/handoff/handoff.module.js +26 -0
- package/dist/handoff/handoff.schemas.d.ts +13 -0
- package/dist/handoff/handoff.schemas.js +3 -0
- package/dist/handoff/handoff.service.d.ts +49 -0
- package/dist/handoff/handoff.service.js +96 -0
- package/dist/http/api.module.js +13 -5
- package/dist/http/meta.controller.d.ts +1 -0
- package/dist/http/meta.controller.js +7 -0
- package/dist/http/request-signal.d.ts +8 -0
- package/dist/http/request-signal.js +14 -0
- package/dist/identity/sso.controller.d.ts +30 -6
- package/dist/identity/sso.controller.js +51 -17
- package/dist/identity/sso.d.ts +10 -2
- package/dist/identity/sso.js +15 -3
- package/dist/inbox/inbox.module.js +2 -2
- package/dist/inbox/inbox.service.d.ts +8 -8
- package/dist/inbox/inbox.service.js +7 -7
- package/dist/infra/config/kernel-config.service.js +10 -5
- package/dist/infra/outbox/registry.d.ts +29 -2
- package/dist/infra/outbox/registry.js +30 -7
- package/dist/kernel.module.js +3 -0
- package/dist/orgs/roles.d.ts +1 -1
- package/dist/orgs/roles.js +3 -3
- package/dist/orgs/settings.controller.d.ts +1 -1
- package/dist/orgs/settings.service.d.ts +27 -11
- package/dist/orgs/settings.service.js +42 -24
- package/dist/overrides.d.ts +4 -4
- package/dist/overrides.js +1 -1
- package/dist/platform/exclusions.js +5 -0
- package/dist/platform/operation.js +2 -2
- package/dist/platform/ops/{schedules.ops.d.ts → automations.ops.d.ts} +4 -4
- package/dist/platform/ops/automations.ops.js +560 -0
- package/dist/platform/ops/connectors.ops.js +4 -2
- package/dist/platform/ops/devices.ops.d.ts +3 -1
- package/dist/platform/ops/devices.ops.js +77 -3
- package/dist/platform/ops/inbox.ops.js +4 -4
- package/dist/platform/ops/orgs.ops.js +1 -1
- package/dist/platform/ops/platform.ops.js +4 -4
- package/dist/platform/platform-ops.module.d.ts +2 -2
- package/dist/platform/platform-ops.module.js +5 -5
- package/dist/platform/route-schemas.js +3 -3
- package/dist/push/jobs.d.ts +3 -3
- package/dist/push/jobs.js +2 -2
- package/dist/push/preferences.service.js +1 -1
- package/dist/push/push-owed.d.ts +3 -3
- package/dist/push/push-owed.js +6 -6
- package/dist/push/push.schemas.d.ts +4 -4
- package/dist/push/push.schemas.js +3 -3
- package/dist/push/recipients.d.ts +4 -4
- package/dist/push/recipients.js +23 -23
- package/dist/push/texts.d.ts +3 -3
- package/dist/push/texts.js +2 -2
- package/dist/push/triggers.d.ts +1 -1
- package/dist/roles/worker.module.js +3 -3
- package/dist/runtime/compaction.service.d.ts +3 -1
- package/dist/runtime/compaction.service.js +3 -1
- package/dist/runtime/context/build.d.ts +6 -0
- package/dist/runtime/context/build.js +14 -3
- package/dist/runtime/context/compaction.d.ts +27 -1
- package/dist/runtime/context/compaction.js +102 -37
- package/dist/runtime/context/run-context.d.ts +38 -0
- package/dist/runtime/context/run-context.js +54 -0
- package/dist/runtime/maintenance.d.ts +8 -4
- package/dist/runtime/maintenance.js +37 -16
- package/dist/runtime/model-call.d.ts +6 -4
- package/dist/runtime/model-call.js +17 -7
- package/dist/runtime/project/knowledge.service.d.ts +16 -7
- package/dist/runtime/project/knowledge.service.js +31 -13
- package/dist/runtime/run-finish.d.ts +4 -4
- package/dist/runtime/run-finish.js +3 -3
- package/dist/runtime/run-queue.js +12 -7
- package/dist/runtime/run-worker.js +7 -1
- package/dist/runtime/runtime.module.js +3 -3
- package/dist/runtime/subagents/dispatch.js +11 -3
- package/dist/sandbox/browse-roots.d.ts +8 -0
- package/dist/sandbox/browse-roots.js +22 -0
- package/dist/sandbox/network-grants.d.ts +4 -4
- package/dist/sandbox/network-grants.js +7 -7
- package/dist/sandbox/operation-authority.d.ts +10 -3
- package/dist/sandbox/operation-authority.js +20 -10
- package/dist/sandbox/operation-intents.d.ts +3 -1
- package/dist/sandbox/operation-intents.js +11 -4
- package/dist/sandbox/permission-call-grants.js +2 -2
- package/dist/sandbox/permission-facts.js +1 -1
- package/dist/sandbox/review/classifier.d.ts +2 -2
- package/dist/sandbox/review/classifier.js +22 -11
- package/dist/sandbox/review/permission-candidate.d.ts +1 -1
- package/dist/sandbox/review/permission-candidate.js +1 -1
- package/dist/sandbox/sandbox.service.d.ts +15 -5
- package/dist/sandbox/sandbox.service.js +14 -8
- package/dist/storage/purge.d.ts +1 -1
- package/dist/storage/purge.js +2 -2
- package/dist/tools/approvals.service.d.ts +6 -6
- package/dist/tools/approvals.service.js +19 -19
- package/dist/tools/builtin-names.d.ts +12 -12
- package/dist/tools/builtin-names.js +29 -29
- package/dist/tools/builtins/{schedules.d.ts → automations.d.ts} +35 -33
- package/dist/tools/builtins/{schedules.js → automations.js} +236 -105
- package/dist/tools/builtins/builtin-tools.d.ts +8 -8
- package/dist/tools/builtins/builtin-tools.js +16 -16
- package/dist/tools/call-scope.d.ts +1 -1
- package/dist/tools/connectors.service.d.ts +4 -13
- package/dist/tools/connectors.service.js +12 -21
- package/dist/tools/git-asks.js +1 -1
- package/dist/tools/git-push-policy.d.ts +3 -3
- package/dist/tools/git-push-policy.js +6 -6
- package/dist/tools/network-asks.d.ts +3 -3
- package/dist/tools/network-asks.js +3 -3
- package/dist/tools/oauth/flow.d.ts +16 -2
- package/dist/tools/oauth/flow.js +23 -4
- package/dist/tools/oauth/oauth.controller.d.ts +19 -7
- package/dist/tools/oauth/oauth.controller.js +42 -12
- package/dist/tools/oauth/oauth.schemas.d.ts +14 -1
- package/dist/tools/oauth/oauth.schemas.js +4 -1
- package/dist/tools/pipeline.d.ts +4 -4
- package/dist/tools/pipeline.js +2 -2
- package/dist/tools/policy.d.ts +3 -3
- package/dist/tools/policy.js +3 -3
- package/dist/tools/tools.module.js +9 -9
- package/package.json +3 -3
- package/src/migrations/0188_automations_rename.sql +309 -0
- package/src/migrations/0189_event_automations.sql +136 -0
- package/dist/platform/ops/schedules.ops.js +0 -509
- package/dist/schedules/effective-settings.d.ts +0 -22
- package/dist/schedules/effective-settings.js +0 -18
- package/dist/schedules/errors.d.ts +0 -8
- package/dist/schedules/errors.js +0 -8
- package/dist/schedules/job-ids.d.ts +0 -81
- package/dist/schedules/job-ids.js +0 -95
- package/dist/schedules/schedules.module.d.ts +0 -16
- package/dist/schedules/schedules.schemas.js +0 -213
- package/dist/schedules/store.module.d.ts +0 -6
- package/dist/schedules/types.d.ts +0 -110
- /package/dist/{schedules → automations}/types.js +0 -0
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import type { KernelSchemaDb } from "../db/kernel-schema.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { Automation, AutomationGrant, TaskRun, TaskRunStatus, TimedTaskRun } from "./types.js";
|
|
3
3
|
/** What a caller supplies to create a task; the counters, pause fields and timestamps default. */
|
|
4
|
-
export type
|
|
4
|
+
export type AutomationInsert = Omit<Automation, "pauseReason" | "pausedBy" | "consecutiveFailures" | "createdAt" | "updatedAt" | "unattendedAsk"> & {
|
|
5
|
+
unattendedAsk?: Automation["unattendedAsk"];
|
|
6
|
+
};
|
|
5
7
|
/** The fields a task update may change (`updated_at` is always refreshed). */
|
|
6
|
-
export type
|
|
7
|
-
/**
|
|
8
|
-
|
|
8
|
+
export type AutomationPatch = Partial<Omit<Automation, "id" | "orgId" | "accountId" | "createdAt" | "updatedAt">>;
|
|
9
|
+
/** The fields of a task run insert either kind of run has; it starts `pending`. */
|
|
10
|
+
interface TaskRunInsertBase {
|
|
9
11
|
id: string;
|
|
10
12
|
taskId: string;
|
|
11
13
|
orgId: string;
|
|
12
|
-
scheduledFor: Date;
|
|
13
14
|
trial: boolean;
|
|
14
15
|
/** A person's "run now" (default false: a tick of the schedule). */
|
|
15
16
|
manual?: boolean;
|
|
@@ -18,29 +19,47 @@ export interface TaskRunInsert {
|
|
|
18
19
|
firedAt?: Date | null;
|
|
19
20
|
conversationId?: string | null;
|
|
20
21
|
}
|
|
21
|
-
|
|
22
|
+
/** A time run: a tick of the schedule (or a person's "run now" at a moment). */
|
|
23
|
+
export interface TimedTaskRunInsert extends TaskRunInsertBase {
|
|
24
|
+
scheduledFor: Date;
|
|
25
|
+
/** Default: the tick as `Date.toISOString()`. */
|
|
26
|
+
triggerKey?: string;
|
|
27
|
+
}
|
|
28
|
+
/** An event run (collaboration spec §4.7): no tick; keyed by the first event it serves. */
|
|
29
|
+
export interface EventTaskRunInsert extends TaskRunInsertBase {
|
|
30
|
+
scheduledFor: null;
|
|
31
|
+
triggerKey: string;
|
|
32
|
+
}
|
|
33
|
+
/** What a caller supplies to create a task run; it starts `pending`. */
|
|
34
|
+
export type TaskRunInsert = TimedTaskRunInsert | EventTaskRunInsert;
|
|
35
|
+
/**
|
|
36
|
+
* The moment a run is ordered by in the run lists: its tick, else its claim, else when it was
|
|
37
|
+
* recorded (an event run has no tick and no claim before its fire job takes it).
|
|
38
|
+
*/
|
|
39
|
+
export declare const runOrderMoment: import("kysely").RawBuilder<Date>;
|
|
40
|
+
export type TaskRunPatch = Partial<Omit<TaskRun, "id" | "taskId" | "orgId" | "trial" | "manual" | "triggerKey">>;
|
|
22
41
|
/**
|
|
23
|
-
*
|
|
42
|
+
* Automations, their runs and grants (spec §4): reads and writes rows only. Every method takes
|
|
24
43
|
* the database handle first so the caller decides the transaction (the scanner's `lockDue` and
|
|
25
44
|
* `insertRun` run in one, under the rows' locks).
|
|
26
45
|
*/
|
|
27
|
-
export declare class
|
|
28
|
-
insertTask(t: KernelSchemaDb, task:
|
|
46
|
+
export declare class AutomationStore {
|
|
47
|
+
insertTask(t: KernelSchemaDb, task: AutomationInsert): Promise<Automation>;
|
|
29
48
|
/** A live (not deleted) task of the org; null when missing, deleted or in another org. */
|
|
30
|
-
getTask(t: KernelSchemaDb, orgId: string, id: string): Promise<
|
|
49
|
+
getTask(t: KernelSchemaDb, orgId: string, id: string): Promise<Automation | null>;
|
|
31
50
|
/**
|
|
32
51
|
* {@link getTask} under `FOR UPDATE` (call it inside a transaction): a person's write holds the
|
|
33
52
|
* row, so the scanner's `lockDue` skips it until the write commits.
|
|
34
53
|
*/
|
|
35
|
-
lockTask(t: KernelSchemaDb, orgId: string, id: string): Promise<
|
|
54
|
+
lockTask(t: KernelSchemaDb, orgId: string, id: string): Promise<Automation | null>;
|
|
36
55
|
/** Patches a live task; null when it is missing or deleted. */
|
|
37
|
-
updateTask(t: KernelSchemaDb, id: string, patch:
|
|
56
|
+
updateTask(t: KernelSchemaDb, id: string, patch: AutomationPatch): Promise<Automation | null>;
|
|
38
57
|
/** Deletes a task softly: hidden from every read and never due again. */
|
|
39
58
|
softDelete(t: KernelSchemaDb, id: string): Promise<boolean>;
|
|
40
59
|
/** A creator's live tasks, newest first. */
|
|
41
|
-
listForAccount(t: KernelSchemaDb, orgId: string, accountId: string): Promise<
|
|
60
|
+
listForAccount(t: KernelSchemaDb, orgId: string, accountId: string): Promise<Automation[]>;
|
|
42
61
|
/** Every live task of the org, newest first. */
|
|
43
|
-
listForOrg(t: KernelSchemaDb, orgId: string): Promise<
|
|
62
|
+
listForOrg(t: KernelSchemaDb, orgId: string): Promise<Automation[]>;
|
|
44
63
|
/** Live tasks that count against the caps (`active` and `paused`), of the org or one creator. */
|
|
45
64
|
countActive(t: KernelSchemaDb, orgId: string, accountId?: string): Promise<number>;
|
|
46
65
|
/**
|
|
@@ -48,12 +67,20 @@ export declare class ScheduledTaskStore {
|
|
|
48
67
|
* rows another transaction holds (`FOR UPDATE SKIP LOCKED`). Call it inside a transaction: the
|
|
49
68
|
* locks last until it ends.
|
|
50
69
|
*/
|
|
51
|
-
lockDue(t: KernelSchemaDb, now: Date, limit: number): Promise<
|
|
70
|
+
lockDue(t: KernelSchemaDb, now: Date, limit: number): Promise<Automation[]>;
|
|
71
|
+
/**
|
|
72
|
+
* Locks up to `limit` active live event automations past their `expires_at` (an event
|
|
73
|
+
* automation has no `next_run_at`, so {@link lockDue} never selects it), skipping rows another
|
|
74
|
+
* transaction holds. Call it inside a transaction: the scan ends each as it ends an expired time
|
|
75
|
+
* task.
|
|
76
|
+
*/
|
|
77
|
+
lockExpiredEvent(t: KernelSchemaDb, now: Date, limit: number): Promise<Automation[]>;
|
|
52
78
|
/**
|
|
53
|
-
* Inserts a task run; null when a non-trial run for the same
|
|
54
|
-
* exactly-once guard, `UNIQUE (
|
|
79
|
+
* Inserts a task run; null when a non-trial run for the same trigger key (a time run's tick)
|
|
80
|
+
* already exists (the exactly-once guard, `UNIQUE (automation_id, trigger_key) WHERE NOT trial`).
|
|
55
81
|
*/
|
|
56
|
-
insertRun(t: KernelSchemaDb, run:
|
|
82
|
+
insertRun(t: KernelSchemaDb, run: TimedTaskRunInsert): Promise<TimedTaskRun | null>;
|
|
83
|
+
insertRun(t: KernelSchemaDb, run: EventTaskRunInsert): Promise<TaskRun | null>;
|
|
57
84
|
/** Patches a task run; null when it does not exist. */
|
|
58
85
|
updateRun(t: KernelSchemaDb, id: string, patch: TaskRunPatch): Promise<TaskRun | null>;
|
|
59
86
|
/**
|
|
@@ -62,20 +89,22 @@ export declare class ScheduledTaskStore {
|
|
|
62
89
|
*/
|
|
63
90
|
latestNonTerminalRun(t: KernelSchemaDb, taskId: string, exceptId?: string): Promise<TaskRun | null>;
|
|
64
91
|
/**
|
|
65
|
-
* Runs of the org fired at or after `since` (the
|
|
66
|
-
*
|
|
92
|
+
* Runs of the org's automations owned by `accountId` fired at or after `since` (the
|
|
93
|
+
* `maxRunsPerHour` count, per person: collaboration spec §4.7; trial runs included, skipped runs
|
|
94
|
+
* not: a run whose queued message a person removed was never run). Deleted automations count:
|
|
95
|
+
* their runs were made.
|
|
67
96
|
*/
|
|
68
|
-
countFiredSince(t: KernelSchemaDb, orgId: string, since: Date): Promise<number>;
|
|
69
|
-
/** A task's runs, latest tick
|
|
97
|
+
countFiredSince(t: KernelSchemaDb, orgId: string, accountId: string, since: Date): Promise<number>;
|
|
98
|
+
/** A task's runs, latest first (by tick, else claim, else record: {@link runOrderMoment}). */
|
|
70
99
|
listRuns(t: KernelSchemaDb, taskId: string, limit: number): Promise<TaskRun[]>;
|
|
71
100
|
/**
|
|
72
101
|
* The runs of these tasks of the org with `scheduled_for` in `[from, to)`, trial included, by tick, at most
|
|
73
|
-
* `limit` (the calendar; `
|
|
102
|
+
* `limit` (the calendar; `automation_runs_automation_idx` per task).
|
|
74
103
|
*/
|
|
75
|
-
listRunsBetween(t: KernelSchemaDb, orgId: string, taskIds: readonly string[], from: Date, to: Date, limit: number): Promise<
|
|
76
|
-
listGrants(t: KernelSchemaDb, taskId: string): Promise<
|
|
104
|
+
listRunsBetween(t: KernelSchemaDb, orgId: string, taskIds: readonly string[], from: Date, to: Date, limit: number): Promise<TimedTaskRun[]>;
|
|
105
|
+
listGrants(t: KernelSchemaDb, taskId: string): Promise<AutomationGrant[]>;
|
|
77
106
|
/** Adds a grant, replacing the task's grant of the same tool key. */
|
|
78
|
-
addGrant(t: KernelSchemaDb, taskId: string, grant:
|
|
107
|
+
addGrant(t: KernelSchemaDb, taskId: string, grant: AutomationGrant): Promise<void>;
|
|
79
108
|
removeGrant(t: KernelSchemaDb, taskId: string, toolKey: string): Promise<boolean>;
|
|
80
109
|
}
|
|
81
110
|
/**
|
|
@@ -84,3 +113,4 @@ export declare class ScheduledTaskStore {
|
|
|
84
113
|
* A plain function too, for the tool policy (`createDecidePolicy`), which is not a provider.
|
|
85
114
|
*/
|
|
86
115
|
export declare function findTaskGrant(t: KernelSchemaDb, taskId: string, toolKey: string, specHash: string, connectorId: string | null): Promise<boolean>;
|
|
116
|
+
export {};
|
|
@@ -7,6 +7,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { Injectable } from "@nestjs/common";
|
|
8
8
|
import { sql } from "kysely";
|
|
9
9
|
import { asPlatform } from "../infra/database/org-scope.js";
|
|
10
|
+
/**
|
|
11
|
+
* The moment a run is ordered by in the run lists: its tick, else its claim, else when it was
|
|
12
|
+
* recorded (an event run has no tick and no claim before its fire job takes it).
|
|
13
|
+
*/
|
|
14
|
+
export const runOrderMoment = sql `coalesce(scheduled_for, fired_at, created_at)`;
|
|
10
15
|
const NON_TERMINAL = ["pending", "running"];
|
|
11
16
|
const date = (v) => (v instanceof Date ? v : new Date(v));
|
|
12
17
|
const dateOrNull = (v) => (v === null ? null : date(v));
|
|
@@ -24,6 +29,7 @@ const toTask = (r) => ({
|
|
|
24
29
|
model: r.model,
|
|
25
30
|
effort: r.effort,
|
|
26
31
|
deviceId: r.device_id,
|
|
32
|
+
unattendedAsk: r.unattended_ask,
|
|
27
33
|
status: r.status,
|
|
28
34
|
pauseReason: r.pause_reason,
|
|
29
35
|
pausedBy: r.paused_by,
|
|
@@ -36,9 +42,10 @@ const toTask = (r) => ({
|
|
|
36
42
|
});
|
|
37
43
|
const toRun = (r) => ({
|
|
38
44
|
id: r.id,
|
|
39
|
-
taskId: r.
|
|
45
|
+
taskId: r.automation_id,
|
|
40
46
|
orgId: r.org_id,
|
|
41
|
-
scheduledFor:
|
|
47
|
+
scheduledFor: dateOrNull(r.scheduled_for),
|
|
48
|
+
triggerKey: r.trigger_key,
|
|
42
49
|
firedAt: dateOrNull(r.fired_at),
|
|
43
50
|
trial: r.trial,
|
|
44
51
|
manual: r.manual,
|
|
@@ -49,6 +56,13 @@ const toRun = (r) => ({
|
|
|
49
56
|
error: r.error,
|
|
50
57
|
missingGrants: r.missing_grants,
|
|
51
58
|
});
|
|
59
|
+
/** A run read back from a row written with a tick (a time run). */
|
|
60
|
+
const toTimedRun = (r) => {
|
|
61
|
+
const run = toRun(r);
|
|
62
|
+
if (run.scheduledFor === null)
|
|
63
|
+
throw new Error(`automation run ${r.id} has no tick`);
|
|
64
|
+
return { ...run, scheduledFor: run.scheduledFor };
|
|
65
|
+
};
|
|
52
66
|
const json = (v) => (v === null ? null : JSON.stringify(v));
|
|
53
67
|
/** Maps a task patch to its columns; fields left undefined are not written. */
|
|
54
68
|
function taskColumns(p) {
|
|
@@ -73,6 +87,8 @@ function taskColumns(p) {
|
|
|
73
87
|
c.effort = p.effort;
|
|
74
88
|
if (p.deviceId !== undefined)
|
|
75
89
|
c.device_id = p.deviceId;
|
|
90
|
+
if (p.unattendedAsk !== undefined)
|
|
91
|
+
c.unattended_ask = p.unattendedAsk;
|
|
76
92
|
if (p.status !== undefined)
|
|
77
93
|
c.status = p.status;
|
|
78
94
|
if (p.pauseReason !== undefined)
|
|
@@ -90,14 +106,14 @@ function taskColumns(p) {
|
|
|
90
106
|
return c;
|
|
91
107
|
}
|
|
92
108
|
/**
|
|
93
|
-
*
|
|
109
|
+
* Automations, their runs and grants (spec §4): reads and writes rows only. Every method takes
|
|
94
110
|
* the database handle first so the caller decides the transaction (the scanner's `lockDue` and
|
|
95
111
|
* `insertRun` run in one, under the rows' locks).
|
|
96
112
|
*/
|
|
97
|
-
let
|
|
113
|
+
let AutomationStore = class AutomationStore {
|
|
98
114
|
async insertTask(t, task) {
|
|
99
115
|
const row = await t
|
|
100
|
-
.insertInto("
|
|
116
|
+
.insertInto("automations")
|
|
101
117
|
.values({
|
|
102
118
|
id: task.id,
|
|
103
119
|
org_id: task.orgId,
|
|
@@ -112,6 +128,7 @@ let ScheduledTaskStore = class ScheduledTaskStore {
|
|
|
112
128
|
model: json(task.model),
|
|
113
129
|
effort: task.effort,
|
|
114
130
|
device_id: task.deviceId,
|
|
131
|
+
unattended_ask: task.unattendedAsk ?? null,
|
|
115
132
|
status: task.status,
|
|
116
133
|
next_run_at: task.nextRunAt,
|
|
117
134
|
jitter_seconds: task.jitterSeconds,
|
|
@@ -124,7 +141,7 @@ let ScheduledTaskStore = class ScheduledTaskStore {
|
|
|
124
141
|
/** A live (not deleted) task of the org; null when missing, deleted or in another org. */
|
|
125
142
|
async getTask(t, orgId, id) {
|
|
126
143
|
const row = await t
|
|
127
|
-
.selectFrom("
|
|
144
|
+
.selectFrom("automations")
|
|
128
145
|
.selectAll()
|
|
129
146
|
.where("org_id", "=", orgId)
|
|
130
147
|
.where("id", "=", id)
|
|
@@ -138,7 +155,7 @@ let ScheduledTaskStore = class ScheduledTaskStore {
|
|
|
138
155
|
*/
|
|
139
156
|
async lockTask(t, orgId, id) {
|
|
140
157
|
const row = await t
|
|
141
|
-
.selectFrom("
|
|
158
|
+
.selectFrom("automations")
|
|
142
159
|
.selectAll()
|
|
143
160
|
.where("org_id", "=", orgId)
|
|
144
161
|
.where("id", "=", id)
|
|
@@ -152,7 +169,7 @@ let ScheduledTaskStore = class ScheduledTaskStore {
|
|
|
152
169
|
// or locked in the scan's due sweep (which runs in the platform scope)
|
|
153
170
|
async updateTask(t, id, patch) {
|
|
154
171
|
const row = await t
|
|
155
|
-
.updateTable("
|
|
172
|
+
.updateTable("automations")
|
|
156
173
|
.set({ ...taskColumns(patch), updated_at: sql `now()` })
|
|
157
174
|
.where("id", "=", id)
|
|
158
175
|
.where("deleted_at", "is", null)
|
|
@@ -164,7 +181,7 @@ let ScheduledTaskStore = class ScheduledTaskStore {
|
|
|
164
181
|
// org-filter: by the id of a task its caller locked under an org filter (lockManaged)
|
|
165
182
|
async softDelete(t, id) {
|
|
166
183
|
const r = await t
|
|
167
|
-
.updateTable("
|
|
184
|
+
.updateTable("automations")
|
|
168
185
|
.set({ deleted_at: sql `now()`, updated_at: sql `now()`, next_run_at: null })
|
|
169
186
|
.where("id", "=", id)
|
|
170
187
|
.where("deleted_at", "is", null)
|
|
@@ -174,7 +191,7 @@ let ScheduledTaskStore = class ScheduledTaskStore {
|
|
|
174
191
|
/** A creator's live tasks, newest first. */
|
|
175
192
|
async listForAccount(t, orgId, accountId) {
|
|
176
193
|
const rows = await t
|
|
177
|
-
.selectFrom("
|
|
194
|
+
.selectFrom("automations")
|
|
178
195
|
.selectAll()
|
|
179
196
|
.where("org_id", "=", orgId)
|
|
180
197
|
.where("account_id", "=", accountId)
|
|
@@ -187,7 +204,7 @@ let ScheduledTaskStore = class ScheduledTaskStore {
|
|
|
187
204
|
/** Every live task of the org, newest first. */
|
|
188
205
|
async listForOrg(t, orgId) {
|
|
189
206
|
const rows = await t
|
|
190
|
-
.selectFrom("
|
|
207
|
+
.selectFrom("automations")
|
|
191
208
|
.selectAll()
|
|
192
209
|
.where("org_id", "=", orgId)
|
|
193
210
|
.where("deleted_at", "is", null)
|
|
@@ -199,7 +216,7 @@ let ScheduledTaskStore = class ScheduledTaskStore {
|
|
|
199
216
|
/** Live tasks that count against the caps (`active` and `paused`), of the org or one creator. */
|
|
200
217
|
async countActive(t, orgId, accountId) {
|
|
201
218
|
let q = t
|
|
202
|
-
.selectFrom("
|
|
219
|
+
.selectFrom("automations")
|
|
203
220
|
.select((eb) => eb.fn.countAll().as("n"))
|
|
204
221
|
.where("org_id", "=", orgId)
|
|
205
222
|
.where("deleted_at", "is", null)
|
|
@@ -218,7 +235,7 @@ let ScheduledTaskStore = class ScheduledTaskStore {
|
|
|
218
235
|
async lockDue(t, now, limit) {
|
|
219
236
|
return asPlatform("deployment-wide due-task sweep", async () => {
|
|
220
237
|
const rows = await t
|
|
221
|
-
.selectFrom("
|
|
238
|
+
.selectFrom("automations")
|
|
222
239
|
.selectAll()
|
|
223
240
|
.where("status", "=", "active")
|
|
224
241
|
.where("deleted_at", "is", null)
|
|
@@ -233,17 +250,42 @@ let ScheduledTaskStore = class ScheduledTaskStore {
|
|
|
233
250
|
});
|
|
234
251
|
}
|
|
235
252
|
/**
|
|
236
|
-
*
|
|
237
|
-
*
|
|
253
|
+
* Locks up to `limit` active live event automations past their `expires_at` (an event
|
|
254
|
+
* automation has no `next_run_at`, so {@link lockDue} never selects it), skipping rows another
|
|
255
|
+
* transaction holds. Call it inside a transaction: the scan ends each as it ends an expired time
|
|
256
|
+
* task.
|
|
238
257
|
*/
|
|
258
|
+
// org-filter: the scan's deployment-wide expired event automation sweep (LockedCron), each task
|
|
259
|
+
// ended by its own id
|
|
260
|
+
async lockExpiredEvent(t, now, limit) {
|
|
261
|
+
return asPlatform("deployment-wide expired event automation sweep", async () => {
|
|
262
|
+
const rows = await t
|
|
263
|
+
.selectFrom("automations")
|
|
264
|
+
.selectAll()
|
|
265
|
+
.where("status", "=", "active")
|
|
266
|
+
.where("deleted_at", "is", null)
|
|
267
|
+
.where(sql `trigger->>'kind' = 'event'`)
|
|
268
|
+
.where("expires_at", "<=", now)
|
|
269
|
+
.orderBy("expires_at")
|
|
270
|
+
.orderBy("id")
|
|
271
|
+
.limit(limit)
|
|
272
|
+
.forUpdate()
|
|
273
|
+
.skipLocked()
|
|
274
|
+
.execute();
|
|
275
|
+
return rows.map(toTask);
|
|
276
|
+
});
|
|
277
|
+
}
|
|
239
278
|
async insertRun(t, run) {
|
|
240
279
|
const row = await t
|
|
241
|
-
.insertInto("
|
|
280
|
+
.insertInto("automation_runs")
|
|
242
281
|
.values({
|
|
243
282
|
id: run.id,
|
|
244
|
-
|
|
283
|
+
automation_id: run.taskId,
|
|
245
284
|
org_id: run.orgId,
|
|
246
285
|
scheduled_for: run.scheduledFor,
|
|
286
|
+
trigger_key: run.scheduledFor === null
|
|
287
|
+
? run.triggerKey
|
|
288
|
+
: (run.triggerKey ?? run.scheduledFor.toISOString()),
|
|
247
289
|
trial: run.trial,
|
|
248
290
|
manual: run.manual ?? false,
|
|
249
291
|
status: run.status ?? "pending",
|
|
@@ -251,10 +293,12 @@ let ScheduledTaskStore = class ScheduledTaskStore {
|
|
|
251
293
|
fired_at: run.firedAt ?? null,
|
|
252
294
|
conversation_id: run.conversationId ?? null,
|
|
253
295
|
})
|
|
254
|
-
.onConflict((oc) => oc.columns(["
|
|
296
|
+
.onConflict((oc) => oc.columns(["automation_id", "trigger_key"]).where("trial", "=", false).doNothing())
|
|
255
297
|
.returningAll()
|
|
256
298
|
.executeTakeFirst();
|
|
257
|
-
|
|
299
|
+
if (!row)
|
|
300
|
+
return null;
|
|
301
|
+
return run.scheduledFor === null ? toRun(row) : toTimedRun(row);
|
|
258
302
|
}
|
|
259
303
|
/** Patches a task run; null when it does not exist. */
|
|
260
304
|
// org-filter: by task run id for the fire / settle jobs only; the id is the kernel-written job
|
|
@@ -279,14 +323,14 @@ let ScheduledTaskStore = class ScheduledTaskStore {
|
|
|
279
323
|
c.missing_grants = JSON.stringify(patch.missingGrants);
|
|
280
324
|
if (Object.keys(c).length === 0) {
|
|
281
325
|
const row = await t
|
|
282
|
-
.selectFrom("
|
|
326
|
+
.selectFrom("automation_runs")
|
|
283
327
|
.selectAll()
|
|
284
328
|
.where("id", "=", id)
|
|
285
329
|
.executeTakeFirst();
|
|
286
330
|
return row ? toRun(row) : null;
|
|
287
331
|
}
|
|
288
332
|
const row = await t
|
|
289
|
-
.updateTable("
|
|
333
|
+
.updateTable("automation_runs")
|
|
290
334
|
.set(c)
|
|
291
335
|
.where("id", "=", id)
|
|
292
336
|
.returningAll()
|
|
@@ -300,41 +344,46 @@ let ScheduledTaskStore = class ScheduledTaskStore {
|
|
|
300
344
|
// org-filter: the fire job's overlap check, by the task id of the run it claimed
|
|
301
345
|
async latestNonTerminalRun(t, taskId, exceptId) {
|
|
302
346
|
let q = t
|
|
303
|
-
.selectFrom("
|
|
347
|
+
.selectFrom("automation_runs")
|
|
304
348
|
.selectAll()
|
|
305
|
-
.where("
|
|
349
|
+
.where("automation_id", "=", taskId)
|
|
306
350
|
.where("status", "in", NON_TERMINAL);
|
|
307
351
|
if (exceptId !== undefined)
|
|
308
352
|
q = q.where("id", "!=", exceptId);
|
|
309
353
|
const row = await q
|
|
310
|
-
.orderBy(
|
|
354
|
+
.orderBy(runOrderMoment, "desc")
|
|
311
355
|
.orderBy("id", "desc")
|
|
312
356
|
.limit(1)
|
|
313
357
|
.executeTakeFirst();
|
|
314
358
|
return row ? toRun(row) : null;
|
|
315
359
|
}
|
|
316
360
|
/**
|
|
317
|
-
* Runs of the org fired at or after `since` (the
|
|
318
|
-
*
|
|
361
|
+
* Runs of the org's automations owned by `accountId` fired at or after `since` (the
|
|
362
|
+
* `maxRunsPerHour` count, per person: collaboration spec §4.7; trial runs included, skipped runs
|
|
363
|
+
* not: a run whose queued message a person removed was never run). Deleted automations count:
|
|
364
|
+
* their runs were made.
|
|
319
365
|
*/
|
|
320
|
-
async countFiredSince(t, orgId, since) {
|
|
366
|
+
async countFiredSince(t, orgId, accountId, since) {
|
|
321
367
|
const row = await t
|
|
322
|
-
.selectFrom("
|
|
368
|
+
.selectFrom("automation_runs as r")
|
|
369
|
+
.innerJoin("automations as a", "a.id", "r.automation_id")
|
|
323
370
|
.select((eb) => eb.fn.countAll().as("n"))
|
|
324
|
-
.where("org_id", "=", orgId)
|
|
325
|
-
.where("
|
|
326
|
-
.where("
|
|
371
|
+
.where("r.org_id", "=", orgId)
|
|
372
|
+
.where("a.org_id", "=", orgId)
|
|
373
|
+
.where("a.account_id", "=", accountId)
|
|
374
|
+
.where("r.fired_at", ">=", since)
|
|
375
|
+
.where("r.status", "!=", "skipped")
|
|
327
376
|
.executeTakeFirstOrThrow();
|
|
328
377
|
return Number(row.n);
|
|
329
378
|
}
|
|
330
|
-
/** A task's runs, latest tick
|
|
331
|
-
// org-filter: by the id of a task its caller read under an org filter (
|
|
379
|
+
/** A task's runs, latest first (by tick, else claim, else record: {@link runOrderMoment}). */
|
|
380
|
+
// org-filter: by the id of a task its caller read under an org filter (AutomationsService.get)
|
|
332
381
|
async listRuns(t, taskId, limit) {
|
|
333
382
|
const rows = await t
|
|
334
|
-
.selectFrom("
|
|
383
|
+
.selectFrom("automation_runs")
|
|
335
384
|
.selectAll()
|
|
336
|
-
.where("
|
|
337
|
-
.orderBy(
|
|
385
|
+
.where("automation_id", "=", taskId)
|
|
386
|
+
.orderBy(runOrderMoment, "desc")
|
|
338
387
|
.orderBy("id", "desc")
|
|
339
388
|
.limit(limit)
|
|
340
389
|
.execute();
|
|
@@ -342,29 +391,30 @@ let ScheduledTaskStore = class ScheduledTaskStore {
|
|
|
342
391
|
}
|
|
343
392
|
/**
|
|
344
393
|
* The runs of these tasks of the org with `scheduled_for` in `[from, to)`, trial included, by tick, at most
|
|
345
|
-
* `limit` (the calendar; `
|
|
394
|
+
* `limit` (the calendar; `automation_runs_automation_idx` per task).
|
|
346
395
|
*/
|
|
347
396
|
async listRunsBetween(t, orgId, taskIds, from, to, limit) {
|
|
348
397
|
if (taskIds.length === 0)
|
|
349
398
|
return [];
|
|
350
399
|
const rows = await t
|
|
351
|
-
.selectFrom("
|
|
400
|
+
.selectFrom("automation_runs")
|
|
352
401
|
.selectAll()
|
|
353
402
|
.where("org_id", "=", orgId)
|
|
354
|
-
.where("
|
|
403
|
+
.where("automation_id", "in", [...taskIds])
|
|
355
404
|
.where("scheduled_for", ">=", from)
|
|
356
405
|
.where("scheduled_for", "<", to)
|
|
357
406
|
.orderBy("scheduled_for")
|
|
358
407
|
.orderBy("id")
|
|
359
408
|
.limit(limit)
|
|
360
409
|
.execute();
|
|
361
|
-
|
|
410
|
+
// the range admits only runs with a tick
|
|
411
|
+
return rows.map(toRun).filter((r) => r.scheduledFor !== null);
|
|
362
412
|
}
|
|
363
413
|
async listGrants(t, taskId) {
|
|
364
414
|
const rows = await t
|
|
365
|
-
.selectFrom("
|
|
415
|
+
.selectFrom("automation_grants")
|
|
366
416
|
.select(["tool_key", "spec_hash", "connector_id"])
|
|
367
|
-
.where("
|
|
417
|
+
.where("automation_id", "=", taskId)
|
|
368
418
|
.orderBy("tool_key")
|
|
369
419
|
.execute();
|
|
370
420
|
return rows.map((r) => ({
|
|
@@ -376,14 +426,14 @@ let ScheduledTaskStore = class ScheduledTaskStore {
|
|
|
376
426
|
/** Adds a grant, replacing the task's grant of the same tool key. */
|
|
377
427
|
async addGrant(t, taskId, grant) {
|
|
378
428
|
await t
|
|
379
|
-
.insertInto("
|
|
429
|
+
.insertInto("automation_grants")
|
|
380
430
|
.values({
|
|
381
|
-
|
|
431
|
+
automation_id: taskId,
|
|
382
432
|
tool_key: grant.toolKey,
|
|
383
433
|
spec_hash: grant.specHash,
|
|
384
434
|
connector_id: grant.connectorId,
|
|
385
435
|
})
|
|
386
|
-
.onConflict((oc) => oc.columns(["
|
|
436
|
+
.onConflict((oc) => oc.columns(["automation_id", "tool_key"]).doUpdateSet({
|
|
387
437
|
spec_hash: grant.specHash,
|
|
388
438
|
connector_id: grant.connectorId,
|
|
389
439
|
created_at: sql `now()`,
|
|
@@ -392,17 +442,17 @@ let ScheduledTaskStore = class ScheduledTaskStore {
|
|
|
392
442
|
}
|
|
393
443
|
async removeGrant(t, taskId, toolKey) {
|
|
394
444
|
const r = await t
|
|
395
|
-
.deleteFrom("
|
|
396
|
-
.where("
|
|
445
|
+
.deleteFrom("automation_grants")
|
|
446
|
+
.where("automation_id", "=", taskId)
|
|
397
447
|
.where("tool_key", "=", toolKey)
|
|
398
448
|
.executeTakeFirst();
|
|
399
449
|
return Number(r.numDeletedRows) > 0;
|
|
400
450
|
}
|
|
401
451
|
};
|
|
402
|
-
|
|
452
|
+
AutomationStore = __decorate([
|
|
403
453
|
Injectable()
|
|
404
|
-
],
|
|
405
|
-
export {
|
|
454
|
+
], AutomationStore);
|
|
455
|
+
export { AutomationStore };
|
|
406
456
|
/**
|
|
407
457
|
* Whether the task holds a grant for this tool as defined now: same key, same spec hash, same
|
|
408
458
|
* connector (null for plugin and builtin tools). A grant of an older definition does not count.
|
|
@@ -410,9 +460,9 @@ export { ScheduledTaskStore };
|
|
|
410
460
|
*/
|
|
411
461
|
export async function findTaskGrant(t, taskId, toolKey, specHash, connectorId) {
|
|
412
462
|
const row = await t
|
|
413
|
-
.selectFrom("
|
|
463
|
+
.selectFrom("automation_grants")
|
|
414
464
|
.select("tool_key")
|
|
415
|
-
.where("
|
|
465
|
+
.where("automation_id", "=", taskId)
|
|
416
466
|
.where("tool_key", "=", toolKey)
|
|
417
467
|
.where("spec_hash", "=", specHash)
|
|
418
468
|
.where(sql `connector_id IS NOT DISTINCT FROM ${connectorId}`)
|
|
@@ -5,17 +5,17 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
import { Module } from "@nestjs/common";
|
|
8
|
-
import {
|
|
8
|
+
import { AutomationStore } from "./store.js";
|
|
9
9
|
/**
|
|
10
|
-
* The
|
|
11
|
-
*
|
|
10
|
+
* The automation store alone, so the scanner (worker), the fire job, the HTTP API and the
|
|
11
|
+
* automation tools can each import it without importing one another.
|
|
12
12
|
*/
|
|
13
|
-
let
|
|
13
|
+
let AutomationStoreModule = class AutomationStoreModule {
|
|
14
14
|
};
|
|
15
|
-
|
|
15
|
+
AutomationStoreModule = __decorate([
|
|
16
16
|
Module({
|
|
17
|
-
providers: [
|
|
18
|
-
exports: [
|
|
17
|
+
providers: [AutomationStore],
|
|
18
|
+
exports: [AutomationStore],
|
|
19
19
|
})
|
|
20
|
-
],
|
|
21
|
-
export {
|
|
20
|
+
], AutomationStoreModule);
|
|
21
|
+
export { AutomationStoreModule };
|