@fungi.computer/trellis 0.4.0 → 0.5.0
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/backend/methods.ts
CHANGED
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
import {
|
|
19
19
|
chatsReplySchema,
|
|
20
20
|
type WorkflowTriggerArmTarget,
|
|
21
|
+
type ScheduleListInput,
|
|
21
22
|
answerReviewReply,
|
|
22
23
|
cancelReplySchema,
|
|
23
24
|
catalogInputSchema,
|
|
@@ -55,7 +56,10 @@ export type WorkflowMethodContext = Readonly<{
|
|
|
55
56
|
disarmSchedule(input: {
|
|
56
57
|
scheduleId: string;
|
|
57
58
|
}): Promise<typeof Schema.Json.Type>;
|
|
58
|
-
|
|
59
|
+
pauseSchedule(input: {
|
|
60
|
+
scheduleId: string;
|
|
61
|
+
}): Promise<typeof Schema.Json.Type>;
|
|
62
|
+
schedules(input: ScheduleListInput): Promise<typeof Schema.Json.Type>;
|
|
59
63
|
catalog(input: {
|
|
60
64
|
installationId?: string | undefined;
|
|
61
65
|
}): Promise<typeof Schema.Json.Type>;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
triggerTargetSchema,
|
|
3
3
|
scheduleArmReplySchema,
|
|
4
|
+
schedulePauseInputSchema,
|
|
5
|
+
schedulePauseReplySchema,
|
|
4
6
|
triggerDisarmReplySchema,
|
|
5
7
|
schedulesReplySchema,
|
|
6
8
|
scheduleDisarmInputSchema,
|
|
9
|
+
scheduleListInputSchema,
|
|
7
10
|
eventDisarmInputSchema,
|
|
8
11
|
triggerListInputSchema,
|
|
9
12
|
eventArmReplySchema,
|
|
@@ -59,6 +62,17 @@ export const scheduleMethods = {
|
|
|
59
62
|
);
|
|
60
63
|
},
|
|
61
64
|
}),
|
|
65
|
+
pause: defineAppMethod({
|
|
66
|
+
description: "Pause future occurrences of an armed Workflow schedule.",
|
|
67
|
+
effect: "write",
|
|
68
|
+
requires: ["workflow.run", "workflow.arm"],
|
|
69
|
+
input: schedulePauseInputSchema,
|
|
70
|
+
output: schedulePauseReplySchema,
|
|
71
|
+
handler: async (input, context: WorkflowMethodContext) =>
|
|
72
|
+
schedulePauseReplySchema.parse(
|
|
73
|
+
await granted(context).pauseSchedule(input),
|
|
74
|
+
),
|
|
75
|
+
}),
|
|
62
76
|
disarm: defineAppMethod({
|
|
63
77
|
description: "Cancel an armed Workflow schedule.",
|
|
64
78
|
effect: "write",
|
|
@@ -72,13 +86,13 @@ export const scheduleMethods = {
|
|
|
72
86
|
}),
|
|
73
87
|
listTriggers: defineAppMethod({
|
|
74
88
|
description:
|
|
75
|
-
"
|
|
89
|
+
"Read one bounded page of this installation's schedules, next run times and paused reasons.",
|
|
76
90
|
effect: "read",
|
|
77
91
|
requires: ["workflow.run"],
|
|
78
|
-
input:
|
|
92
|
+
input: scheduleListInputSchema,
|
|
79
93
|
output: schedulesReplySchema,
|
|
80
|
-
handler: async (
|
|
81
|
-
schedulesReplySchema.parse(await granted(context).schedules(
|
|
94
|
+
handler: async (input, context: WorkflowMethodContext) =>
|
|
95
|
+
schedulesReplySchema.parse(await granted(context).schedules(input)),
|
|
82
96
|
}),
|
|
83
97
|
armEventTrigger: defineAppMethod({
|
|
84
98
|
description:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { triggerTargetSchema, scheduleArmReplySchema, triggerDisarmReplySchema, schedulesReplySchema, scheduleDisarmInputSchema, eventDisarmInputSchema, triggerListInputSchema, eventArmReplySchema, eventTriggersReplySchema, } from "@fungi.computer/workflows-wire";
|
|
1
|
+
import { triggerTargetSchema, scheduleArmReplySchema, schedulePauseInputSchema, schedulePauseReplySchema, triggerDisarmReplySchema, schedulesReplySchema, scheduleDisarmInputSchema, scheduleListInputSchema, eventDisarmInputSchema, triggerListInputSchema, eventArmReplySchema, eventTriggersReplySchema, } from "@fungi.computer/workflows-wire";
|
|
2
2
|
import { defineAppMethod } from "@fungi.computer/agar/backend-definition";
|
|
3
3
|
import { createWorkflowLibrary } from "./library.js";
|
|
4
4
|
import { readWorkflowCatalog } from "./catalog.js";
|
|
@@ -41,6 +41,14 @@ export const scheduleMethods = {
|
|
|
41
41
|
return scheduleArmReplySchema.parse(await workflows.armSchedule({ ...input, digest: stored.digest }));
|
|
42
42
|
},
|
|
43
43
|
}),
|
|
44
|
+
pause: defineAppMethod({
|
|
45
|
+
description: "Pause future occurrences of an armed Workflow schedule.",
|
|
46
|
+
effect: "write",
|
|
47
|
+
requires: ["workflow.run", "workflow.arm"],
|
|
48
|
+
input: schedulePauseInputSchema,
|
|
49
|
+
output: schedulePauseReplySchema,
|
|
50
|
+
handler: async (input, context) => schedulePauseReplySchema.parse(await granted(context).pauseSchedule(input)),
|
|
51
|
+
}),
|
|
44
52
|
disarm: defineAppMethod({
|
|
45
53
|
description: "Cancel an armed Workflow schedule.",
|
|
46
54
|
effect: "write",
|
|
@@ -50,12 +58,12 @@ export const scheduleMethods = {
|
|
|
50
58
|
handler: async (input, context) => triggerDisarmReplySchema.parse(await granted(context).disarmSchedule(input)),
|
|
51
59
|
}),
|
|
52
60
|
listTriggers: defineAppMethod({
|
|
53
|
-
description: "
|
|
61
|
+
description: "Read one bounded page of this installation's schedules, next run times and paused reasons.",
|
|
54
62
|
effect: "read",
|
|
55
63
|
requires: ["workflow.run"],
|
|
56
|
-
input:
|
|
64
|
+
input: scheduleListInputSchema,
|
|
57
65
|
output: schedulesReplySchema,
|
|
58
|
-
handler: async (
|
|
66
|
+
handler: async (input, context) => schedulesReplySchema.parse(await granted(context).schedules(input)),
|
|
59
67
|
}),
|
|
60
68
|
armEventTrigger: defineAppMethod({
|
|
61
69
|
description: "Arm a published Workflow App-event trigger as you on the pinned Computer. An optional delivery chat receives every run's ending.",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fungi.computer/trellis",
|
|
3
3
|
"description": "Trellis: build and run workflows of App methods, an App for Oyster",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.5.0",
|
|
5
5
|
"author": "Levi <levi@technomancy.dev>",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -14,20 +14,20 @@
|
|
|
14
14
|
"./run-timeline": "./src/runs/public.ts"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@fungi.computer/puffball": "0.
|
|
17
|
+
"@fungi.computer/puffball": "0.3.0",
|
|
18
18
|
"@cfworker/json-schema": "4.1.1",
|
|
19
|
-
"@fungi.computer/agar": "0.
|
|
20
|
-
"@fungi.computer/caps": "0.
|
|
19
|
+
"@fungi.computer/agar": "0.6.0",
|
|
20
|
+
"@fungi.computer/caps": "0.5.0",
|
|
21
21
|
"@fungi.computer/stipe": "0.1.0",
|
|
22
22
|
"@xyflow/react": "12.12.0",
|
|
23
23
|
"react": "18.3.1",
|
|
24
24
|
"react-dom": "18.3.1",
|
|
25
|
-
"@fungi.computer/braid": "0.
|
|
25
|
+
"@fungi.computer/braid": "0.3.0",
|
|
26
26
|
"effect": "4.0.2",
|
|
27
27
|
"@fungi.computer/sigils": "0.2.0",
|
|
28
28
|
"lucide-react": "0.460.0",
|
|
29
29
|
"zod": "4.4.3",
|
|
30
|
-
"@fungi.computer/workflows-wire": "0.
|
|
30
|
+
"@fungi.computer/workflows-wire": "0.3.0",
|
|
31
31
|
"@fungi.computer/cairn": "0.1.0",
|
|
32
32
|
"@fungi.computer/watchdog": "0.1.0",
|
|
33
33
|
"@fungi.computer/maosaico": "0.1.0"
|
|
@@ -118,6 +118,7 @@
|
|
|
118
118
|
"cancel",
|
|
119
119
|
"answerReview",
|
|
120
120
|
"armSchedule",
|
|
121
|
+
"pauseSchedule",
|
|
121
122
|
"disarmSchedule",
|
|
122
123
|
"schedules",
|
|
123
124
|
"armEventTrigger",
|