@fungi.computer/workflows-wire 0.2.4 → 0.4.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.
@@ -211,13 +211,38 @@ export declare const triggerDisarmReplySchema: z.ZodLazy<z.ZodUnion<readonly [z.
211
211
  }, z.core.$strict>, z.ZodObject<{
212
212
  error: z.ZodString;
213
213
  }, z.core.$strict>]>>;
214
- /** Visible schedule-trigger rows with their next due time and lifecycle state. */
214
+ /** Future admission paused, or no controllable active registration found. */
215
+ export declare const schedulePauseReplySchema: z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
216
+ kind: z.ZodEnum<{
217
+ not_found: "not_found";
218
+ paused: "paused";
219
+ }>;
220
+ }, z.core.$strict>, z.ZodObject<{
221
+ error: z.ZodString;
222
+ }, z.core.$strict>]>>;
223
+ /** Future admission resumed, no controllable paused registration, or invalid cadence. */
224
+ export declare const scheduleResumeReplySchema: z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
225
+ kind: z.ZodEnum<{
226
+ not_found: "not_found";
227
+ resumed: "resumed";
228
+ }>;
229
+ }, z.core.$strict>, z.ZodObject<{
230
+ kind: z.ZodLiteral<"refused">;
231
+ reason: z.ZodString;
232
+ }, z.core.$strict>, z.ZodObject<{
233
+ error: z.ZodString;
234
+ }, z.core.$strict>]>>;
235
+ /** One bounded installation page; continue strictly after nextCursor. */
215
236
  export declare const schedulesReplySchema: z.ZodLazy<z.ZodUnion<readonly [z.ZodObject<{
216
237
  schedules: z.ZodArray<z.ZodObject<{
217
238
  scheduleId: z.ZodString;
218
239
  installationId: z.ZodString;
219
240
  workflowId: z.ZodString;
220
241
  triggerId: z.ZodString;
242
+ cron: z.ZodObject<{
243
+ expression: z.ZodString;
244
+ timeZone: z.ZodString;
245
+ }, z.core.$strict>;
221
246
  nextDueAt: z.ZodNumber;
222
247
  state: z.ZodEnum<{
223
248
  cancelled: "cancelled";
@@ -227,6 +252,7 @@ export declare const schedulesReplySchema: z.ZodLazy<z.ZodUnion<readonly [z.ZodO
227
252
  }>;
228
253
  lastError: z.ZodNullable<z.ZodString>;
229
254
  }, z.core.$strict>>;
255
+ nextCursor: z.ZodNullable<z.ZodString>;
230
256
  }, z.core.$strict>, z.ZodObject<{
231
257
  error: z.ZodString;
232
258
  }, z.core.$strict>]>>;
package/dist/outcomes.js CHANGED
@@ -197,11 +197,20 @@ export const triggerDisarmReplySchema = z.lazy(() => z.union([
197
197
  }),
198
198
  denied,
199
199
  ]));
200
- /** Visible schedule-trigger rows with their next due time and lifecycle state. */
200
+ /** Future admission paused, or no controllable active registration found. */
201
+ export const schedulePauseReplySchema = z.lazy(() => z.union([z.strictObject({ kind: z.enum(["paused", "not_found"]) }), denied]));
202
+ /** Future admission resumed, no controllable paused registration, or invalid cadence. */
203
+ export const scheduleResumeReplySchema = z.lazy(() => z.union([
204
+ z.strictObject({ kind: z.enum(["resumed", "not_found"]) }),
205
+ z.strictObject({ kind: z.literal("refused"), reason: z.string() }),
206
+ denied,
207
+ ]));
208
+ /** One bounded installation page; continue strictly after nextCursor. */
201
209
  export const schedulesReplySchema = z.lazy(() => z.union([
202
210
  z.strictObject({
203
211
  /** Schedule-trigger registrations visible to this invocation. */
204
- schedules: z.array(z.strictObject({
212
+ schedules: z
213
+ .array(z.strictObject({
205
214
  /** Identity of the schedule registration. */
206
215
  scheduleId: id,
207
216
  /** Installation owning the Workflow schedule and its control door. */
@@ -210,13 +219,21 @@ export const schedulesReplySchema = z.lazy(() => z.union([
210
219
  workflowId: workflowIdSchema,
211
220
  /** Trigger identity within the published definition. */
212
221
  triggerId: id,
222
+ /** Cadence in the schedule's own time zone. */
223
+ cron: z.strictObject({
224
+ expression: z.string().max(256),
225
+ timeZone: z.string().max(128),
226
+ }),
213
227
  /** Next occurrence time in epoch milliseconds. */
214
228
  nextDueAt: z.number().int(),
215
229
  /** Current schedule lifecycle state. */
216
230
  state: z.enum(["active", "paused", "cancelled", "finished"]),
217
231
  /** Latest scheduling failure, or null when absent. */
218
232
  lastError: z.string().nullable(),
219
- })),
233
+ }))
234
+ .max(100),
235
+ /** Last visible schedule id when another page exists; otherwise null. */
236
+ nextCursor: id.nullable(),
220
237
  }),
221
238
  denied,
222
239
  ]));
@@ -1,4 +1,5 @@
1
1
  import * as z from "zod";
2
+ export { workflowScheduleListInputSchema as scheduleListInputSchema, type WorkflowScheduleListInput as ScheduleListInput, } from "@fungi.computer/braid/runtime";
2
3
  /** The Agent Session (chat) that receives the ending of every run it covers. */
3
4
  export declare const runDeliverySchema: z.ZodObject<{
4
5
  agentId: z.ZodString;
@@ -33,6 +34,14 @@ export declare const triggerTargetSchema: z.ZodLazy<z.ZodObject<{
33
34
  export declare const scheduleDisarmInputSchema: z.ZodObject<{
34
35
  scheduleId: z.ZodString;
35
36
  }, z.core.$strict>;
37
+ /** Pause future occurrences without cancelling accepted runs. */
38
+ export declare const schedulePauseInputSchema: z.ZodObject<{
39
+ scheduleId: z.ZodString;
40
+ }, z.core.$strict>;
41
+ /** Resume future occurrences of a paused registration. */
42
+ export declare const scheduleResumeInputSchema: z.ZodObject<{
43
+ scheduleId: z.ZodString;
44
+ }, z.core.$strict>;
36
45
  /** Identify the event-trigger registration to disarm. */
37
46
  export declare const eventDisarmInputSchema: z.ZodObject<{
38
47
  eventTriggerId: z.ZodString;
@@ -2,6 +2,7 @@ import * as z from "zod";
2
2
  import { bindingsSelectionSchema } from "@fungi.computer/braid/git-access";
3
3
  import { gitSha1Schema } from "@fungi.computer/puffball/git-representation";
4
4
  import { workflowIdSchema } from "@fungi.computer/braid";
5
+ export { workflowScheduleListInputSchema as scheduleListInputSchema, } from "@fungi.computer/braid/runtime";
5
6
  const id = z.string().min(1).max(256);
6
7
  /** The Agent Session (chat) that receives the ending of every run it covers. */
7
8
  export const runDeliverySchema = z.strictObject({ agentId: id, sessionId: id });
@@ -24,6 +25,10 @@ export const triggerTargetSchema = z.lazy(() => z.strictObject({
24
25
  }));
25
26
  /** Identify the schedule-trigger registration to disarm. */
26
27
  export const scheduleDisarmInputSchema = z.strictObject({ scheduleId: id });
28
+ /** Pause future occurrences without cancelling accepted runs. */
29
+ export const schedulePauseInputSchema = z.strictObject({ scheduleId: id });
30
+ /** Resume future occurrences of a paused registration. */
31
+ export const scheduleResumeInputSchema = z.strictObject({ scheduleId: id });
27
32
  /** Identify the event-trigger registration to disarm. */
28
33
  export const eventDisarmInputSchema = z.strictObject({ eventTriggerId: id });
29
34
  /** Trigger listing takes no caller-supplied filters. */
@@ -8,6 +8,14 @@
8
8
 
9
9
  ## Type Aliases
10
10
 
11
+ ### ScheduleListInput
12
+
13
+ ```ts
14
+ type ScheduleListInput = z.input<typeof scheduleListInputSchema>;
15
+ ```
16
+
17
+ ---
18
+
11
19
  ### WorkflowPublishedDefinitionContext
12
20
 
13
21
  ```ts
@@ -130,6 +138,22 @@ Read-only Git operations needed to traverse and decode library files.
130
138
 
131
139
  ## Variables
132
140
 
141
+ ### scheduleListInputSchema
142
+
143
+ ```ts
144
+ const scheduleListInputSchema: z.ZodObject<
145
+ {
146
+ limit: z.ZodDefault<z.ZodNumber>;
147
+ after: z.ZodOptional<z.ZodString>;
148
+ },
149
+ z.core.$strict
150
+ >;
151
+ ```
152
+
153
+ Installation-scoped keyset read; the default and ceiling bound one reply.
154
+
155
+ ---
156
+
133
157
  ### provenanceSchema
134
158
 
135
159
  ```ts
@@ -1355,6 +1379,74 @@ Trigger disarm result, including an absent trigger or denied invocation.
1355
1379
 
1356
1380
  ---
1357
1381
 
1382
+ ### schedulePauseReplySchema
1383
+
1384
+ ```ts
1385
+ const schedulePauseReplySchema: ZodLazy<
1386
+ ZodUnion<
1387
+ readonly [
1388
+ ZodObject<
1389
+ {
1390
+ kind: ZodEnum<{
1391
+ not_found: "not_found";
1392
+ paused: "paused";
1393
+ }>;
1394
+ },
1395
+ $strict
1396
+ >,
1397
+ ZodObject<
1398
+ {
1399
+ error: ZodString;
1400
+ },
1401
+ $strict
1402
+ >,
1403
+ ]
1404
+ >
1405
+ >;
1406
+ ```
1407
+
1408
+ Future admission paused, or no controllable active registration found.
1409
+
1410
+ ---
1411
+
1412
+ ### scheduleResumeReplySchema
1413
+
1414
+ ```ts
1415
+ const scheduleResumeReplySchema: ZodLazy<
1416
+ ZodUnion<
1417
+ readonly [
1418
+ ZodObject<
1419
+ {
1420
+ kind: ZodEnum<{
1421
+ not_found: "not_found";
1422
+ resumed: "resumed";
1423
+ }>;
1424
+ },
1425
+ $strict
1426
+ >,
1427
+ ZodObject<
1428
+ {
1429
+ kind: ZodLiteral<"refused">;
1430
+ reason: ZodString;
1431
+ },
1432
+ $strict
1433
+ >,
1434
+ ZodObject<
1435
+ {
1436
+ error: ZodString;
1437
+ },
1438
+ $strict
1439
+ >,
1440
+ ]
1441
+ >
1442
+ >;
1443
+ ```
1444
+
1445
+ Future admission resumed, no controllable paused registration, or invalid
1446
+ cadence.
1447
+
1448
+ ---
1449
+
1358
1450
  ### schedulesReplySchema
1359
1451
 
1360
1452
  ```ts
@@ -1370,6 +1462,13 @@ const schedulesReplySchema: ZodLazy<
1370
1462
  installationId: ZodString;
1371
1463
  workflowId: ZodString;
1372
1464
  triggerId: ZodString;
1465
+ cron: ZodObject<
1466
+ {
1467
+ expression: ZodString;
1468
+ timeZone: ZodString;
1469
+ },
1470
+ $strict
1471
+ >;
1373
1472
  nextDueAt: ZodNumber;
1374
1473
  state: ZodEnum<{
1375
1474
  cancelled: "cancelled";
@@ -1382,6 +1481,7 @@ const schedulesReplySchema: ZodLazy<
1382
1481
  $strict
1383
1482
  >
1384
1483
  >;
1484
+ nextCursor: ZodNullable<ZodString>;
1385
1485
  },
1386
1486
  $strict
1387
1487
  >,
@@ -1396,7 +1496,7 @@ const schedulesReplySchema: ZodLazy<
1396
1496
  >;
1397
1497
  ```
1398
1498
 
1399
- Visible schedule-trigger rows with their next due time and lifecycle state.
1499
+ One bounded installation page; continue strictly after nextCursor.
1400
1500
 
1401
1501
  ---
1402
1502
 
@@ -1811,6 +1911,36 @@ Identify the schedule-trigger registration to disarm.
1811
1911
 
1812
1912
  ---
1813
1913
 
1914
+ ### schedulePauseInputSchema
1915
+
1916
+ ```ts
1917
+ const schedulePauseInputSchema: ZodObject<
1918
+ {
1919
+ scheduleId: ZodString;
1920
+ },
1921
+ $strict
1922
+ >;
1923
+ ```
1924
+
1925
+ Pause future occurrences without cancelling accepted runs.
1926
+
1927
+ ---
1928
+
1929
+ ### scheduleResumeInputSchema
1930
+
1931
+ ```ts
1932
+ const scheduleResumeInputSchema: ZodObject<
1933
+ {
1934
+ scheduleId: ZodString;
1935
+ },
1936
+ $strict
1937
+ >;
1938
+ ```
1939
+
1940
+ Resume future occurrences of a paused registration.
1941
+
1942
+ ---
1943
+
1814
1944
  ### eventDisarmInputSchema
1815
1945
 
1816
1946
  ```ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fungi.computer/workflows-wire",
3
- "version": "0.2.4",
3
+ "version": "0.4.0",
4
4
  "author": "Levi <levi@technomancy.dev>",
5
5
  "private": false,
6
6
  "description": "Workflow run ids and generic graph wire contract shared by Hub and the Trellis App",
@@ -12,12 +12,12 @@
12
12
  }
13
13
  },
14
14
  "dependencies": {
15
- "@fungi.computer/braid": "0.2.4",
15
+ "@fungi.computer/braid": "0.4.0",
16
16
  "@fungi.computer/cairn": "0.1.0",
17
- "@fungi.computer/puffball": "0.2.0",
17
+ "@fungi.computer/puffball": "0.4.0",
18
18
  "effect": "4.0.2",
19
19
  "zod": "4.4.3",
20
- "@fungi.computer/agar": "0.5.0"
20
+ "@fungi.computer/agar": "0.6.1"
21
21
  },
22
22
  "license": "MIT",
23
23
  "repository": {