@sixb/server 0.1.1 → 0.1.3

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.
Files changed (178) hide show
  1. package/README.md +3 -3
  2. package/dist/auth/application-access.d.ts +2 -2
  3. package/dist/auth/application-access.d.ts.map +1 -1
  4. package/dist/auth/connector-callback-cookie.d.ts +12 -0
  5. package/dist/auth/connector-callback-cookie.d.ts.map +1 -0
  6. package/dist/auth/experience.d.ts +33 -0
  7. package/dist/auth/experience.d.ts.map +1 -0
  8. package/dist/auth/guard.d.ts +3 -3
  9. package/dist/auth/guard.d.ts.map +1 -1
  10. package/dist/auth/public-routes.d.ts.map +1 -1
  11. package/dist/auth/scope.d.ts +13 -27
  12. package/dist/auth/scope.d.ts.map +1 -1
  13. package/dist/auth/session-cookies.d.ts +2 -2
  14. package/dist/auth/session-cookies.d.ts.map +1 -1
  15. package/dist/connectors/http.d.ts +16 -0
  16. package/dist/connectors/http.d.ts.map +1 -0
  17. package/dist/index.d.ts +1 -0
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +3903 -2760
  20. package/dist/index.js.map +58 -50
  21. package/dist/openapi/tags.d.ts +15 -3
  22. package/dist/openapi/tags.d.ts.map +1 -1
  23. package/dist/registerRoutes.d.ts +6 -2
  24. package/dist/registerRoutes.d.ts.map +1 -1
  25. package/dist/routes/action-runs.d.ts +21 -31
  26. package/dist/routes/action-runs.d.ts.map +1 -1
  27. package/dist/routes/actions.d.ts +12 -11
  28. package/dist/routes/actions.d.ts.map +1 -1
  29. package/dist/routes/agent-api-gateway.d.ts +2 -2
  30. package/dist/routes/agent-api-gateway.d.ts.map +1 -1
  31. package/dist/routes/agents.d.ts +230 -159
  32. package/dist/routes/agents.d.ts.map +1 -1
  33. package/dist/routes/ai-accounting.d.ts +31 -0
  34. package/dist/routes/ai-accounting.d.ts.map +1 -0
  35. package/dist/routes/auth.d.ts +149 -92
  36. package/dist/routes/auth.d.ts.map +1 -1
  37. package/dist/routes/connector-connection-runs.d.ts +794 -0
  38. package/dist/routes/connector-connection-runs.d.ts.map +1 -0
  39. package/dist/routes/connector-connections.d.ts +219 -0
  40. package/dist/routes/connector-connections.d.ts.map +1 -0
  41. package/dist/routes/connectors.d.ts +10 -4
  42. package/dist/routes/connectors.d.ts.map +1 -1
  43. package/dist/routes/datasets.d.ts +16 -12
  44. package/dist/routes/datasets.d.ts.map +1 -1
  45. package/dist/routes/events.d.ts +9 -9
  46. package/dist/routes/events.d.ts.map +1 -1
  47. package/dist/routes/files.d.ts +19 -18
  48. package/dist/routes/files.d.ts.map +1 -1
  49. package/dist/routes/links.d.ts +11 -11
  50. package/dist/routes/links.d.ts.map +1 -1
  51. package/dist/routes/logs.d.ts +5 -5
  52. package/dist/routes/logs.d.ts.map +1 -1
  53. package/dist/routes/objects.d.ts +37 -37
  54. package/dist/routes/objects.d.ts.map +1 -1
  55. package/dist/routes/ontology.d.ts +50 -50
  56. package/dist/routes/ontology.d.ts.map +1 -1
  57. package/dist/routes/pipelines.d.ts +28 -38
  58. package/dist/routes/pipelines.d.ts.map +1 -1
  59. package/dist/routes/project.d.ts +2 -2
  60. package/dist/routes/project.d.ts.map +1 -1
  61. package/dist/routes/projections.d.ts +145 -85
  62. package/dist/routes/projections.d.ts.map +1 -1
  63. package/dist/routes/rules.d.ts +6 -6
  64. package/dist/routes/rules.d.ts.map +1 -1
  65. package/dist/routes/status.d.ts +2 -2
  66. package/dist/routes/status.d.ts.map +1 -1
  67. package/dist/routes/syncs.d.ts +23 -28
  68. package/dist/routes/syncs.d.ts.map +1 -1
  69. package/dist/routes/telemetry.d.ts +9 -9
  70. package/dist/routes/telemetry.d.ts.map +1 -1
  71. package/dist/routes/webhook-runs.d.ts +9 -9
  72. package/dist/routes/webhook-runs.d.ts.map +1 -1
  73. package/dist/routes/webhooks.d.ts +2 -2
  74. package/dist/routes/webhooks.d.ts.map +1 -1
  75. package/dist/routes/workflows.d.ts +177 -66
  76. package/dist/routes/workflows.d.ts.map +1 -1
  77. package/dist/routes/ws/agents.d.ts +11 -5
  78. package/dist/routes/ws/agents.d.ts.map +1 -1
  79. package/dist/routes/ws/events.d.ts +8 -8
  80. package/dist/routes/ws/events.d.ts.map +1 -1
  81. package/dist/routes/ws/log-subscription-hub.d.ts +6 -3
  82. package/dist/routes/ws/log-subscription-hub.d.ts.map +1 -1
  83. package/dist/routes/ws/logs.d.ts +10 -10
  84. package/dist/routes/ws/logs.d.ts.map +1 -1
  85. package/dist/schemas/actions.d.ts +89 -194
  86. package/dist/schemas/actions.d.ts.map +1 -1
  87. package/dist/schemas/agents.d.ts +791 -471
  88. package/dist/schemas/agents.d.ts.map +1 -1
  89. package/dist/schemas/ai-accounting.d.ts +2393 -0
  90. package/dist/schemas/ai-accounting.d.ts.map +1 -0
  91. package/dist/schemas/ai-usage.d.ts +34 -0
  92. package/dist/schemas/ai-usage.d.ts.map +1 -0
  93. package/dist/schemas/auth.d.ts +102 -102
  94. package/dist/schemas/common.d.ts +37 -0
  95. package/dist/schemas/common.d.ts.map +1 -1
  96. package/dist/schemas/connectors.d.ts +713 -2
  97. package/dist/schemas/connectors.d.ts.map +1 -1
  98. package/dist/schemas/datasets.d.ts +2 -2
  99. package/dist/schemas/event-payloads.d.ts +12 -12
  100. package/dist/schemas/events.d.ts +40 -40
  101. package/dist/schemas/links.d.ts +2 -2
  102. package/dist/schemas/logs.d.ts +22 -22
  103. package/dist/schemas/objects.d.ts +10 -10
  104. package/dist/schemas/ontology.d.ts +118 -118
  105. package/dist/schemas/pipelines.d.ts +89 -184
  106. package/dist/schemas/pipelines.d.ts.map +1 -1
  107. package/dist/schemas/projections.d.ts +1030 -563
  108. package/dist/schemas/projections.d.ts.map +1 -1
  109. package/dist/schemas/rules.d.ts +6 -6
  110. package/dist/schemas/syncs.d.ts +65 -108
  111. package/dist/schemas/syncs.d.ts.map +1 -1
  112. package/dist/schemas/webhook-runs.d.ts +41 -41
  113. package/dist/schemas/webhook-runs.d.ts.map +1 -1
  114. package/dist/schemas/workflows.d.ts +1189 -185
  115. package/dist/schemas/workflows.d.ts.map +1 -1
  116. package/dist/server.d.ts +11 -6
  117. package/dist/server.d.ts.map +1 -1
  118. package/dist/utils/http.d.ts +2 -0
  119. package/dist/utils/http.d.ts.map +1 -1
  120. package/dist/utils/ws.d.ts +4 -3
  121. package/dist/utils/ws.d.ts.map +1 -1
  122. package/package.json +5 -5
  123. package/src/auth/access-token-boundary.ts +4 -4
  124. package/src/auth/application-access.ts +8 -9
  125. package/src/auth/connector-callback-cookie.ts +95 -0
  126. package/src/auth/experience.ts +190 -0
  127. package/src/auth/guard.ts +11 -11
  128. package/src/auth/public-routes.ts +20 -0
  129. package/src/auth/scope.ts +26 -36
  130. package/src/auth/session-cookies.ts +3 -3
  131. package/src/connectors/http.ts +110 -0
  132. package/src/index.ts +1 -0
  133. package/src/openapi/tags.ts +13 -1
  134. package/src/registerRoutes.ts +36 -23
  135. package/src/routes/action-runs.ts +39 -39
  136. package/src/routes/actions.ts +7 -13
  137. package/src/routes/agent-api-gateway.ts +41 -38
  138. package/src/routes/agents.ts +90 -200
  139. package/src/routes/ai-accounting.ts +166 -0
  140. package/src/routes/auth.ts +274 -122
  141. package/src/routes/connector-connection-runs.ts +346 -0
  142. package/src/routes/connector-connections.ts +135 -0
  143. package/src/routes/connectors.ts +24 -12
  144. package/src/routes/datasets.ts +55 -54
  145. package/src/routes/events.ts +5 -5
  146. package/src/routes/files.ts +22 -30
  147. package/src/routes/links.ts +31 -35
  148. package/src/routes/logs.ts +6 -11
  149. package/src/routes/objects.ts +51 -114
  150. package/src/routes/ontology.ts +27 -38
  151. package/src/routes/pipelines.ts +28 -62
  152. package/src/routes/project.ts +3 -3
  153. package/src/routes/projections.ts +44 -42
  154. package/src/routes/rules.ts +11 -25
  155. package/src/routes/status.ts +5 -5
  156. package/src/routes/syncs.ts +19 -45
  157. package/src/routes/telemetry.ts +18 -29
  158. package/src/routes/webhook-runs.ts +5 -5
  159. package/src/routes/webhooks.ts +259 -341
  160. package/src/routes/workflows.ts +242 -248
  161. package/src/routes/ws/agents.ts +196 -66
  162. package/src/routes/ws/events.ts +11 -10
  163. package/src/routes/ws/log-subscription-hub.ts +6 -12
  164. package/src/routes/ws/logs.ts +13 -5
  165. package/src/schemas/actions.ts +58 -25
  166. package/src/schemas/agents.ts +23 -23
  167. package/src/schemas/ai-accounting.ts +182 -0
  168. package/src/schemas/ai-usage.ts +16 -0
  169. package/src/schemas/common.ts +24 -0
  170. package/src/schemas/connectors.ts +164 -0
  171. package/src/schemas/pipelines.ts +23 -15
  172. package/src/schemas/projections.ts +23 -3
  173. package/src/schemas/syncs.ts +13 -8
  174. package/src/schemas/webhook-runs.ts +10 -5
  175. package/src/schemas/workflows.ts +23 -8
  176. package/src/server.ts +75 -26
  177. package/src/utils/http.ts +34 -6
  178. package/src/utils/ws.ts +10 -5
@@ -3,8 +3,8 @@ import { z } from "zod";
3
3
  import type { SixbServer } from "../../server";
4
4
  declare const SubscriptionMessageSchema: z.ZodUnion<[z.ZodObject<{
5
5
  type: z.ZodLiteral<"subscribe">;
6
- topic: z.ZodOptional<z.ZodEnum<["objects" | "telemetry" | "links" | "actions" | "schedules" | "rules" | "syncs" | "pipelines" | "workflows" | "datasets", ...("objects" | "telemetry" | "links" | "actions" | "schedules" | "rules" | "syncs" | "pipelines" | "workflows" | "datasets")[]]>>;
7
- types: z.ZodOptional<z.ZodArray<z.ZodEnum<["object.created" | "action.requested" | "object.updated" | "object.deleted" | "telemetry.appended" | "link.created" | "link.updated" | "link.deleted" | "action.completed" | "action.failed" | "schedule.triggered" | "rule.triggered" | "rule.resolved" | "sync.run.started" | "sync.run.finished" | "pipeline.run.started" | "pipeline.run.step.started" | "pipeline.run.step.finished" | "pipeline.run.finished" | "workflow.run.queued" | "workflow.run.started" | "workflow.run.node.started" | "workflow.run.waiting" | "workflow.run.node.waiting" | "workflow.run.node.finished" | "workflow.run.finished" | "workflow.intervention.requested" | "workflow.intervention.submitted" | "workflow.intervention.cancelled" | "workflow.intervention.expired" | "dataset.version.committed", ...("object.created" | "action.requested" | "object.updated" | "object.deleted" | "telemetry.appended" | "link.created" | "link.updated" | "link.deleted" | "action.completed" | "action.failed" | "schedule.triggered" | "rule.triggered" | "rule.resolved" | "sync.run.started" | "sync.run.finished" | "pipeline.run.started" | "pipeline.run.step.started" | "pipeline.run.step.finished" | "pipeline.run.finished" | "workflow.run.queued" | "workflow.run.started" | "workflow.run.node.started" | "workflow.run.waiting" | "workflow.run.node.waiting" | "workflow.run.node.finished" | "workflow.run.finished" | "workflow.intervention.requested" | "workflow.intervention.submitted" | "workflow.intervention.cancelled" | "workflow.intervention.expired" | "dataset.version.committed")[]]>, "many">>;
6
+ topic: z.ZodOptional<z.ZodEnum<["datasets" | "syncs" | "pipelines" | "workflows" | "rules" | "objects" | "actions" | "links" | "telemetry" | "schedules", ...("datasets" | "syncs" | "pipelines" | "workflows" | "rules" | "objects" | "actions" | "links" | "telemetry" | "schedules")[]]>>;
7
+ types: z.ZodOptional<z.ZodArray<z.ZodEnum<["object.created" | "object.updated" | "object.deleted" | "link.created" | "link.updated" | "link.deleted" | "telemetry.appended" | "action.requested" | "action.completed" | "action.failed" | "schedule.triggered" | "rule.triggered" | "rule.resolved" | "sync.run.started" | "sync.run.finished" | "pipeline.run.started" | "pipeline.run.step.started" | "pipeline.run.step.finished" | "pipeline.run.finished" | "workflow.run.queued" | "workflow.run.started" | "workflow.run.node.started" | "workflow.run.waiting" | "workflow.run.node.waiting" | "workflow.run.node.finished" | "workflow.run.finished" | "workflow.intervention.requested" | "workflow.intervention.submitted" | "workflow.intervention.cancelled" | "workflow.intervention.expired" | "dataset.version.committed", ...("object.created" | "object.updated" | "object.deleted" | "link.created" | "link.updated" | "link.deleted" | "telemetry.appended" | "action.requested" | "action.completed" | "action.failed" | "schedule.triggered" | "rule.triggered" | "rule.resolved" | "sync.run.started" | "sync.run.finished" | "pipeline.run.started" | "pipeline.run.step.started" | "pipeline.run.step.finished" | "pipeline.run.finished" | "workflow.run.queued" | "workflow.run.started" | "workflow.run.node.started" | "workflow.run.waiting" | "workflow.run.node.waiting" | "workflow.run.node.finished" | "workflow.run.finished" | "workflow.intervention.requested" | "workflow.intervention.submitted" | "workflow.intervention.cancelled" | "workflow.intervention.expired" | "dataset.version.committed")[]]>, "many">>;
8
8
  objectTypeId: z.ZodOptional<z.ZodString>;
9
9
  primaryId: z.ZodOptional<z.ZodString>;
10
10
  actionId: z.ZodOptional<z.ZodString>;
@@ -13,23 +13,23 @@ declare const SubscriptionMessageSchema: z.ZodUnion<[z.ZodObject<{
13
13
  limit: z.ZodOptional<z.ZodNumber>;
14
14
  }, "strip", z.ZodTypeAny, {
15
15
  type: "subscribe";
16
- limit?: number | undefined;
17
16
  objectTypeId?: string | undefined;
18
17
  actionId?: string | undefined;
19
18
  runId?: string | undefined;
20
19
  primaryId?: string | undefined;
21
- types?: ("object.created" | "action.requested" | "object.updated" | "object.deleted" | "telemetry.appended" | "link.created" | "link.updated" | "link.deleted" | "action.completed" | "action.failed" | "schedule.triggered" | "rule.triggered" | "rule.resolved" | "sync.run.started" | "sync.run.finished" | "pipeline.run.started" | "pipeline.run.step.started" | "pipeline.run.step.finished" | "pipeline.run.finished" | "workflow.run.queued" | "workflow.run.started" | "workflow.run.node.started" | "workflow.run.waiting" | "workflow.run.node.waiting" | "workflow.run.node.finished" | "workflow.run.finished" | "workflow.intervention.requested" | "workflow.intervention.submitted" | "workflow.intervention.cancelled" | "workflow.intervention.expired" | "dataset.version.committed")[] | undefined;
22
- topic?: "objects" | "telemetry" | "links" | "actions" | "schedules" | "rules" | "syncs" | "pipelines" | "workflows" | "datasets" | undefined;
20
+ limit?: number | undefined;
21
+ types?: ("object.created" | "object.updated" | "object.deleted" | "link.created" | "link.updated" | "link.deleted" | "telemetry.appended" | "action.requested" | "action.completed" | "action.failed" | "schedule.triggered" | "rule.triggered" | "rule.resolved" | "sync.run.started" | "sync.run.finished" | "pipeline.run.started" | "pipeline.run.step.started" | "pipeline.run.step.finished" | "pipeline.run.finished" | "workflow.run.queued" | "workflow.run.started" | "workflow.run.node.started" | "workflow.run.waiting" | "workflow.run.node.waiting" | "workflow.run.node.finished" | "workflow.run.finished" | "workflow.intervention.requested" | "workflow.intervention.submitted" | "workflow.intervention.cancelled" | "workflow.intervention.expired" | "dataset.version.committed")[] | undefined;
22
+ topic?: "datasets" | "syncs" | "pipelines" | "workflows" | "rules" | "objects" | "actions" | "links" | "telemetry" | "schedules" | undefined;
23
23
  afterCursor?: string | undefined;
24
24
  }, {
25
25
  type: "subscribe";
26
- limit?: number | undefined;
27
26
  objectTypeId?: string | undefined;
28
27
  actionId?: string | undefined;
29
28
  runId?: string | undefined;
30
29
  primaryId?: string | undefined;
31
- types?: ("object.created" | "action.requested" | "object.updated" | "object.deleted" | "telemetry.appended" | "link.created" | "link.updated" | "link.deleted" | "action.completed" | "action.failed" | "schedule.triggered" | "rule.triggered" | "rule.resolved" | "sync.run.started" | "sync.run.finished" | "pipeline.run.started" | "pipeline.run.step.started" | "pipeline.run.step.finished" | "pipeline.run.finished" | "workflow.run.queued" | "workflow.run.started" | "workflow.run.node.started" | "workflow.run.waiting" | "workflow.run.node.waiting" | "workflow.run.node.finished" | "workflow.run.finished" | "workflow.intervention.requested" | "workflow.intervention.submitted" | "workflow.intervention.cancelled" | "workflow.intervention.expired" | "dataset.version.committed")[] | undefined;
32
- topic?: "objects" | "telemetry" | "links" | "actions" | "schedules" | "rules" | "syncs" | "pipelines" | "workflows" | "datasets" | undefined;
30
+ limit?: number | undefined;
31
+ types?: ("object.created" | "object.updated" | "object.deleted" | "link.created" | "link.updated" | "link.deleted" | "telemetry.appended" | "action.requested" | "action.completed" | "action.failed" | "schedule.triggered" | "rule.triggered" | "rule.resolved" | "sync.run.started" | "sync.run.finished" | "pipeline.run.started" | "pipeline.run.step.started" | "pipeline.run.step.finished" | "pipeline.run.finished" | "workflow.run.queued" | "workflow.run.started" | "workflow.run.node.started" | "workflow.run.waiting" | "workflow.run.node.waiting" | "workflow.run.node.finished" | "workflow.run.finished" | "workflow.intervention.requested" | "workflow.intervention.submitted" | "workflow.intervention.cancelled" | "workflow.intervention.expired" | "dataset.version.committed")[] | undefined;
32
+ topic?: "datasets" | "syncs" | "pipelines" | "workflows" | "rules" | "objects" | "actions" | "links" | "telemetry" | "schedules" | undefined;
33
33
  afterCursor?: string | undefined;
34
34
  }>, z.ZodObject<{
35
35
  type: z.ZodLiteral<"unsubscribe">;
@@ -1 +1 @@
1
- {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/routes/ws/events.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAkC9C,QAAA,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAgD,CAAA;AAE/E,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,GACrD;IACE,EAAE,EAAE,IAAI,CAAA;IACR,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;CAChD,GACD;IACE,EAAE,EAAE,KAAK,CAAA;IACT,KAAK,EAAE,MAAM,CAAA;CACd,CAcJ;AAuBD,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6JxE"}
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/routes/ws/events.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAkC9C,QAAA,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAgD,CAAA;AAE/E,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,GACrD;IACE,EAAE,EAAE,IAAI,CAAA;IACR,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;CAChD,GACD;IACE,EAAE,EAAE,KAAK,CAAA;IACT,KAAK,EAAE,MAAM,CAAA;CACd,CAcJ;AAuBD,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+JxE"}
@@ -1,4 +1,5 @@
1
- import type { LogLevel, LogRunRef, OntologySource, Sixb, SixbRunKind } from "@sixb/core";
1
+ import type { LogLevel, LogRunRef, SixbRunKind } from "@sixb/core";
2
+ import type { LoggingService } from "@sixb/core/internal/logging";
2
3
  interface LogSocket {
3
4
  send(message: string): unknown;
4
5
  close(code?: number, reason?: string): unknown;
@@ -16,13 +17,15 @@ export interface LogSubscriptionFilter {
16
17
  * unbounded portion of the process heap.
17
18
  */
18
19
  export declare class LogSubscriptionHub {
19
- private readonly sixb;
20
+ private readonly host;
20
21
  private readonly clients;
21
22
  private readonly subscriptionGenerations;
22
23
  private startPromise;
23
24
  private unsubscribeBroker;
24
25
  private closed;
25
- constructor(sixb: Sixb<readonly OntologySource[]>);
26
+ constructor(host: {
27
+ readonly logging: LoggingService;
28
+ });
26
29
  subscribe(key: object, ws: LogSocket, filter: LogSubscriptionFilter, onSubscribed: () => void): Promise<void>;
27
30
  unsubscribe(key: object): void;
28
31
  private removeClient;
@@ -1 +1 @@
1
- {"version":3,"file":"log-subscription-hub.d.ts","sourceRoot":"","sources":["../../../src/routes/ws/log-subscription-hub.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACR,SAAS,EACT,cAAc,EACd,IAAI,EACJ,WAAW,EAEZ,MAAM,YAAY,CAAA;AAUnB,UAAU,SAAS;IACjB,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAA;IAC9B,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IAC9C,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAA;CACvB;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,WAAW,EAAE,CAAA;IACvC,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,QAAQ,EAAE,CAAA;IACrC,QAAQ,CAAC,GAAG,CAAC,EAAE,SAAS,CAAA;IACxB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAC9B;AAkBD;;;;GAIG;AACH,qBAAa,kBAAkB;IAOjB,OAAO,CAAC,QAAQ,CAAC,IAAI;IANjC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAiC;IACzD,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAAgC;IACxE,OAAO,CAAC,YAAY,CAA6B;IACjD,OAAO,CAAC,iBAAiB,CAA4B;IACrD,OAAO,CAAC,MAAM,CAAQ;gBAEO,IAAI,EAAE,IAAI,CAAC,SAAS,cAAc,EAAE,CAAC;IAE5D,SAAS,CACb,GAAG,EAAE,MAAM,EACX,EAAE,EAAE,SAAS,EACb,MAAM,EAAE,qBAAqB,EAC7B,YAAY,EAAE,MAAM,IAAI,GACvB,OAAO,CAAC,IAAI,CAAC;IAoChB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAK9B,OAAO,CAAC,YAAY;IASpB,OAAO,CAAC,0BAA0B;IAMlC,OAAO,CAAC,qBAAqB;IAIvB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;YAOd,aAAa;IAiB3B,OAAO,CAAC,WAAW;YAUL,OAAO;IAoErB,OAAO,CAAC,OAAO;YAWD,aAAa;IAsB3B,OAAO,CAAC,cAAc;IAOtB,OAAO,CAAC,kBAAkB;IAY1B,OAAO,CAAC,aAAa;IAQrB,OAAO,CAAC,KAAK;IAiBb,OAAO,CAAC,oBAAoB;IAI5B,OAAO,CAAC,mBAAmB;IAM3B,OAAO,CAAC,IAAI;IASZ,OAAO,CAAC,IAAI;CAsBb"}
1
+ {"version":3,"file":"log-subscription-hub.d.ts","sourceRoot":"","sources":["../../../src/routes/ws/log-subscription-hub.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAiB,MAAM,YAAY,CAAA;AAEjF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AASjE,UAAU,SAAS;IACjB,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAA;IAC9B,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IAC9C,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAA;CACvB;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,WAAW,EAAE,CAAA;IACvC,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,QAAQ,EAAE,CAAA;IACrC,QAAQ,CAAC,GAAG,CAAC,EAAE,SAAS,CAAA;IACxB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAC9B;AAkBD;;;;GAIG;AACH,qBAAa,kBAAkB;IAOjB,OAAO,CAAC,QAAQ,CAAC,IAAI;IANjC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAiC;IACzD,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAAgC;IACxE,OAAO,CAAC,YAAY,CAA6B;IACjD,OAAO,CAAC,iBAAiB,CAA4B;IACrD,OAAO,CAAC,MAAM,CAAQ;gBAEO,IAAI,EAAE;QAAE,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAA;KAAE;IAEjE,SAAS,CACb,GAAG,EAAE,MAAM,EACX,EAAE,EAAE,SAAS,EACb,MAAM,EAAE,qBAAqB,EAC7B,YAAY,EAAE,MAAM,IAAI,GACvB,OAAO,CAAC,IAAI,CAAC;IAoChB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAK9B,OAAO,CAAC,YAAY;IASpB,OAAO,CAAC,0BAA0B;IAMlC,OAAO,CAAC,qBAAqB;IAIvB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;YAOd,aAAa;IAiB3B,OAAO,CAAC,WAAW;YAUL,OAAO;IAoErB,OAAO,CAAC,OAAO;YAWD,aAAa;IAsB3B,OAAO,CAAC,cAAc;IAOtB,OAAO,CAAC,kBAAkB;IAY1B,OAAO,CAAC,aAAa;IAQrB,OAAO,CAAC,KAAK;IAiBb,OAAO,CAAC,oBAAoB;IAI5B,OAAO,CAAC,mBAAmB;IAM3B,OAAO,CAAC,IAAI;IASZ,OAAO,CAAC,IAAI;CAsBb"}
@@ -9,48 +9,48 @@ declare const SubscriptionMessageSchema: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
9
9
  kind: z.ZodEnum<["action", "agent", "pipeline", "projection", "sync", "webhook", "workflow"]>;
10
10
  id: z.ZodString;
11
11
  }, "strip", z.ZodTypeAny, {
12
- kind: "workflow" | "action" | "agent" | "webhook" | "sync" | "pipeline" | "projection";
13
12
  id: string;
13
+ kind: "workflow" | "agent" | "webhook" | "sync" | "pipeline" | "projection" | "action";
14
14
  }, {
15
- kind: "workflow" | "action" | "agent" | "webhook" | "sync" | "pipeline" | "projection";
16
15
  id: string;
16
+ kind: "workflow" | "agent" | "webhook" | "sync" | "pipeline" | "projection" | "action";
17
17
  }>>;
18
18
  afterCursor: z.ZodOptional<z.ZodString>;
19
19
  }, "strip", z.ZodTypeAny, {
20
20
  type: "subscribe";
21
21
  run?: {
22
- kind: "workflow" | "action" | "agent" | "webhook" | "sync" | "pipeline" | "projection";
23
22
  id: string;
23
+ kind: "workflow" | "agent" | "webhook" | "sync" | "pipeline" | "projection" | "action";
24
24
  } | undefined;
25
25
  afterCursor?: string | undefined;
26
- kinds?: ("workflow" | "action" | "agent" | "webhook" | "sync" | "pipeline" | "projection")[] | undefined;
26
+ kinds?: ("workflow" | "agent" | "webhook" | "sync" | "pipeline" | "projection" | "action")[] | undefined;
27
27
  levels?: ("error" | "debug" | "info" | "warn")[] | undefined;
28
28
  }, {
29
29
  type: "subscribe";
30
30
  run?: {
31
- kind: "workflow" | "action" | "agent" | "webhook" | "sync" | "pipeline" | "projection";
32
31
  id: string;
32
+ kind: "workflow" | "agent" | "webhook" | "sync" | "pipeline" | "projection" | "action";
33
33
  } | undefined;
34
34
  afterCursor?: string | undefined;
35
- kinds?: ("workflow" | "action" | "agent" | "webhook" | "sync" | "pipeline" | "projection")[] | undefined;
35
+ kinds?: ("workflow" | "agent" | "webhook" | "sync" | "pipeline" | "projection" | "action")[] | undefined;
36
36
  levels?: ("error" | "debug" | "info" | "warn")[] | undefined;
37
37
  }>, {
38
38
  type: "subscribe";
39
39
  run?: {
40
- kind: "workflow" | "action" | "agent" | "webhook" | "sync" | "pipeline" | "projection";
41
40
  id: string;
41
+ kind: "workflow" | "agent" | "webhook" | "sync" | "pipeline" | "projection" | "action";
42
42
  } | undefined;
43
43
  afterCursor?: string | undefined;
44
- kinds?: ("workflow" | "action" | "agent" | "webhook" | "sync" | "pipeline" | "projection")[] | undefined;
44
+ kinds?: ("workflow" | "agent" | "webhook" | "sync" | "pipeline" | "projection" | "action")[] | undefined;
45
45
  levels?: ("error" | "debug" | "info" | "warn")[] | undefined;
46
46
  }, {
47
47
  type: "subscribe";
48
48
  run?: {
49
- kind: "workflow" | "action" | "agent" | "webhook" | "sync" | "pipeline" | "projection";
50
49
  id: string;
50
+ kind: "workflow" | "agent" | "webhook" | "sync" | "pipeline" | "projection" | "action";
51
51
  } | undefined;
52
52
  afterCursor?: string | undefined;
53
- kinds?: ("workflow" | "action" | "agent" | "webhook" | "sync" | "pipeline" | "projection")[] | undefined;
53
+ kinds?: ("workflow" | "agent" | "webhook" | "sync" | "pipeline" | "projection" | "action")[] | undefined;
54
54
  levels?: ("error" | "debug" | "info" | "warn")[] | undefined;
55
55
  }>, z.ZodObject<{
56
56
  type: z.ZodLiteral<"unsubscribe">;
@@ -1 +1 @@
1
- {"version":3,"file":"logs.d.ts","sourceRoot":"","sources":["../../../src/routes/ws/logs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AA4B9C,QAAA,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAgD,CAAA;AAE/E,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,OAAO,GACf;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAY9F;AAED,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEtE"}
1
+ {"version":3,"file":"logs.d.ts","sourceRoot":"","sources":["../../../src/routes/ws/logs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AA4B9C,QAAA,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAgD,CAAA;AAE/E,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,OAAO,GACf;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAY9F;AAED,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0EtE"}
@@ -1,3 +1,4 @@
1
+ import { type ActionRunFailure } from "@sixb/core/storage";
1
2
  import { z } from "zod";
2
3
  export declare const ActionIdParamsSchema: z.ZodObject<{
3
4
  actionId: z.ZodString;
@@ -105,19 +106,19 @@ export declare const ActionCatalogItemSchema: z.ZodObject<{
105
106
  semanticType: z.ZodOptional<z.ZodString>;
106
107
  schema: z.ZodUnknown;
107
108
  }, "strip", z.ZodTypeAny, {
108
- name: string;
109
109
  id: string;
110
+ name: string;
110
111
  description?: string | undefined;
111
- required?: boolean | undefined;
112
112
  nullable?: boolean | undefined;
113
+ required?: boolean | undefined;
113
114
  semanticType?: string | undefined;
114
115
  schema?: unknown;
115
116
  }, {
116
- name: string;
117
117
  id: string;
118
+ name: string;
118
119
  description?: string | undefined;
119
- required?: boolean | undefined;
120
120
  nullable?: boolean | undefined;
121
+ required?: boolean | undefined;
121
122
  semanticType?: string | undefined;
122
123
  schema?: unknown;
123
124
  }>, "many">;
@@ -138,17 +139,17 @@ export declare const ActionCatalogItemSchema: z.ZodObject<{
138
139
  effects: boolean;
139
140
  }>;
140
141
  }, "strip", z.ZodTypeAny, {
142
+ id: string;
141
143
  name: string;
142
144
  params: {
143
- name: string;
144
145
  id: string;
146
+ name: string;
145
147
  description?: string | undefined;
146
- required?: boolean | undefined;
147
148
  nullable?: boolean | undefined;
149
+ required?: boolean | undefined;
148
150
  semanticType?: string | undefined;
149
151
  schema?: unknown;
150
152
  }[];
151
- id: string;
152
153
  phases: {
153
154
  validate: boolean;
154
155
  writeback: boolean;
@@ -158,17 +159,17 @@ export declare const ActionCatalogItemSchema: z.ZodObject<{
158
159
  description?: string | undefined;
159
160
  objectTypeId?: string | undefined;
160
161
  }, {
162
+ id: string;
161
163
  name: string;
162
164
  params: {
163
- name: string;
164
165
  id: string;
166
+ name: string;
165
167
  description?: string | undefined;
166
- required?: boolean | undefined;
167
168
  nullable?: boolean | undefined;
169
+ required?: boolean | undefined;
168
170
  semanticType?: string | undefined;
169
171
  schema?: unknown;
170
172
  }[];
171
- id: string;
172
173
  phases: {
173
174
  validate: boolean;
174
175
  writeback: boolean;
@@ -192,38 +193,26 @@ export declare const ActionRunsQuerySchema: z.ZodObject<{
192
193
  order: z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
193
194
  }, "strip", z.ZodTypeAny, {
194
195
  status?: "queued" | "running" | "succeeded" | "failed" | "cancelled" | undefined;
195
- limit?: string | undefined;
196
- offset?: string | undefined;
197
- order?: "asc" | "desc" | undefined;
198
196
  objectTypeId?: string | undefined;
199
197
  actionId?: string | undefined;
200
198
  primaryId?: string | undefined;
201
199
  startedAfter?: string | undefined;
202
200
  startedBefore?: string | undefined;
203
- }, {
204
- status?: "queued" | "running" | "succeeded" | "failed" | "cancelled" | undefined;
205
201
  limit?: string | undefined;
206
202
  offset?: string | undefined;
207
203
  order?: "asc" | "desc" | undefined;
204
+ }, {
205
+ status?: "queued" | "running" | "succeeded" | "failed" | "cancelled" | undefined;
208
206
  objectTypeId?: string | undefined;
209
207
  actionId?: string | undefined;
210
208
  primaryId?: string | undefined;
211
209
  startedAfter?: string | undefined;
212
210
  startedBefore?: string | undefined;
211
+ limit?: string | undefined;
212
+ offset?: string | undefined;
213
+ order?: "asc" | "desc" | undefined;
213
214
  }>;
214
- export declare const ActionRunFailureSchema: z.ZodObject<{
215
- name: z.ZodOptional<z.ZodString>;
216
- message: z.ZodString;
217
- phase: z.ZodOptional<z.ZodEnum<["request", "enqueue", "validation", "writeback", "edits", "commit", "effects", "cancelled"]>>;
218
- }, "strip", z.ZodTypeAny, {
219
- message: string;
220
- name?: string | undefined;
221
- phase?: "validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit" | undefined;
222
- }, {
223
- message: string;
224
- name?: string | undefined;
225
- phase?: "validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit" | undefined;
226
- }>;
215
+ export declare const ActionRunFailureSchema: z.ZodType<ActionRunFailure>;
227
216
  export declare const ActionRunSummarySchema: z.ZodObject<{
228
217
  id: z.ZodString;
229
218
  projectId: z.ZodString;
@@ -252,19 +241,7 @@ export declare const ActionRunSummarySchema: z.ZodObject<{
252
241
  queuedAt: z.ZodString;
253
242
  startedAt: z.ZodOptional<z.ZodString>;
254
243
  finishedAt: z.ZodOptional<z.ZodString>;
255
- error: z.ZodOptional<z.ZodObject<{
256
- name: z.ZodOptional<z.ZodString>;
257
- message: z.ZodString;
258
- phase: z.ZodOptional<z.ZodEnum<["request", "enqueue", "validation", "writeback", "edits", "commit", "effects", "cancelled"]>>;
259
- }, "strip", z.ZodTypeAny, {
260
- message: string;
261
- name?: string | undefined;
262
- phase?: "validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit" | undefined;
263
- }, {
264
- message: string;
265
- name?: string | undefined;
266
- phase?: "validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit" | undefined;
267
- }>>;
244
+ error: z.ZodOptional<z.ZodType<ActionRunFailure<"validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit">, z.ZodTypeDef, ActionRunFailure<"validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit">>>;
268
245
  }, "strip", z.ZodTypeAny, {
269
246
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
270
247
  projectId: string;
@@ -278,11 +255,7 @@ export declare const ActionRunSummarySchema: z.ZodObject<{
278
255
  primaryId: string;
279
256
  };
280
257
  queuedAt: string;
281
- error?: {
282
- message: string;
283
- name?: string | undefined;
284
- phase?: "validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit" | undefined;
285
- } | undefined;
258
+ error?: ActionRunFailure<"validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit"> | undefined;
286
259
  phase?: "validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit" | undefined;
287
260
  startedAt?: string | undefined;
288
261
  finishedAt?: string | undefined;
@@ -299,11 +272,7 @@ export declare const ActionRunSummarySchema: z.ZodObject<{
299
272
  primaryId: string;
300
273
  };
301
274
  queuedAt: string;
302
- error?: {
303
- message: string;
304
- name?: string | undefined;
305
- phase?: "validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit" | undefined;
306
- } | undefined;
275
+ error?: ActionRunFailure<"validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit"> | undefined;
307
276
  phase?: "validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit" | undefined;
308
277
  startedAt?: string | undefined;
309
278
  finishedAt?: string | undefined;
@@ -336,95 +305,61 @@ export declare const ActionRunDetailSchema: z.ZodObject<{
336
305
  queuedAt: z.ZodString;
337
306
  startedAt: z.ZodOptional<z.ZodString>;
338
307
  finishedAt: z.ZodOptional<z.ZodString>;
339
- error: z.ZodOptional<z.ZodObject<{
340
- name: z.ZodOptional<z.ZodString>;
341
- message: z.ZodString;
342
- phase: z.ZodOptional<z.ZodEnum<["request", "enqueue", "validation", "writeback", "edits", "commit", "effects", "cancelled"]>>;
343
- }, "strip", z.ZodTypeAny, {
344
- message: string;
345
- name?: string | undefined;
346
- phase?: "validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit" | undefined;
347
- }, {
348
- message: string;
349
- name?: string | undefined;
350
- phase?: "validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit" | undefined;
351
- }>>;
308
+ error: z.ZodOptional<z.ZodType<ActionRunFailure<"validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit">, z.ZodTypeDef, ActionRunFailure<"validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit">>>;
352
309
  } & {
353
310
  params: z.ZodRecord<z.ZodString, z.ZodUnknown>;
354
- writeback: z.ZodOptional<z.ZodObject<{
355
- status: z.ZodEnum<["succeeded", "failed"]>;
311
+ writeback: z.ZodOptional<z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
312
+ status: z.ZodLiteral<"succeeded">;
356
313
  completedAt: z.ZodString;
357
- result: z.ZodOptional<z.ZodUnknown>;
358
- error: z.ZodOptional<z.ZodObject<{
359
- name: z.ZodOptional<z.ZodString>;
360
- message: z.ZodString;
361
- phase: z.ZodOptional<z.ZodEnum<["request", "enqueue", "validation", "writeback", "edits", "commit", "effects", "cancelled"]>>;
362
- }, "strip", z.ZodTypeAny, {
363
- message: string;
364
- name?: string | undefined;
365
- phase?: "validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit" | undefined;
366
- }, {
367
- message: string;
368
- name?: string | undefined;
369
- phase?: "validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit" | undefined;
370
- }>>;
314
+ result: z.ZodType<import("./common").JsonValue, z.ZodTypeDef, import("./common").JsonValue>;
371
315
  }, "strip", z.ZodTypeAny, {
372
- status: "succeeded" | "failed";
316
+ status: "succeeded";
373
317
  completedAt: string;
374
- error?: {
375
- message: string;
376
- name?: string | undefined;
377
- phase?: "validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit" | undefined;
378
- } | undefined;
379
- result?: unknown;
318
+ result: import("./common").JsonValue;
380
319
  }, {
381
- status: "succeeded" | "failed";
320
+ status: "succeeded";
382
321
  completedAt: string;
383
- error?: {
384
- message: string;
385
- name?: string | undefined;
386
- phase?: "validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit" | undefined;
387
- } | undefined;
388
- result?: unknown;
389
- }>>;
390
- effects: z.ZodOptional<z.ZodObject<{
391
- status: z.ZodEnum<["succeeded", "failed"]>;
322
+ result: import("./common").JsonValue;
323
+ }>, z.ZodObject<{
324
+ status: z.ZodLiteral<"failed">;
392
325
  completedAt: z.ZodString;
393
- error: z.ZodOptional<z.ZodObject<{
394
- name: z.ZodOptional<z.ZodString>;
395
- message: z.ZodString;
396
- phase: z.ZodOptional<z.ZodEnum<["request", "enqueue", "validation", "writeback", "edits", "commit", "effects", "cancelled"]>>;
397
- }, "strip", z.ZodTypeAny, {
398
- message: string;
399
- name?: string | undefined;
400
- phase?: "validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit" | undefined;
401
- }, {
402
- message: string;
403
- name?: string | undefined;
404
- phase?: "validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit" | undefined;
405
- }>>;
326
+ error: z.ZodType<ActionRunFailure<"writeback">, z.ZodTypeDef, ActionRunFailure<"writeback">>;
406
327
  }, "strip", z.ZodTypeAny, {
407
- status: "succeeded" | "failed";
328
+ error: ActionRunFailure<"writeback">;
329
+ status: "failed";
408
330
  completedAt: string;
409
- error?: {
410
- message: string;
411
- name?: string | undefined;
412
- phase?: "validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit" | undefined;
413
- } | undefined;
414
331
  }, {
415
- status: "succeeded" | "failed";
332
+ error: ActionRunFailure<"writeback">;
333
+ status: "failed";
334
+ completedAt: string;
335
+ }>]>>;
336
+ effects: z.ZodOptional<z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
337
+ status: z.ZodLiteral<"succeeded">;
338
+ completedAt: z.ZodString;
339
+ }, "strip", z.ZodTypeAny, {
340
+ status: "succeeded";
341
+ completedAt: string;
342
+ }, {
343
+ status: "succeeded";
344
+ completedAt: string;
345
+ }>, z.ZodObject<{
346
+ status: z.ZodLiteral<"failed">;
347
+ completedAt: z.ZodString;
348
+ error: z.ZodType<ActionRunFailure<"effects">, z.ZodTypeDef, ActionRunFailure<"effects">>;
349
+ }, "strip", z.ZodTypeAny, {
350
+ error: ActionRunFailure<"effects">;
351
+ status: "failed";
416
352
  completedAt: string;
417
- error?: {
418
- message: string;
419
- name?: string | undefined;
420
- phase?: "validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit" | undefined;
421
- } | undefined;
422
- }>>;
353
+ }, {
354
+ error: ActionRunFailure<"effects">;
355
+ status: "failed";
356
+ completedAt: string;
357
+ }>]>>;
423
358
  }, "strip", z.ZodTypeAny, {
424
359
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
425
360
  projectId: string;
426
- params: Record<string, unknown>;
427
361
  id: string;
362
+ params: Record<string, unknown>;
428
363
  actionId: string;
429
364
  subject: {
430
365
  kind: "none";
@@ -434,29 +369,23 @@ export declare const ActionRunDetailSchema: z.ZodObject<{
434
369
  primaryId: string;
435
370
  };
436
371
  queuedAt: string;
437
- error?: {
438
- message: string;
439
- name?: string | undefined;
440
- phase?: "validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit" | undefined;
441
- } | undefined;
372
+ error?: ActionRunFailure<"validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit"> | undefined;
442
373
  writeback?: {
443
- status: "succeeded" | "failed";
374
+ status: "succeeded";
375
+ completedAt: string;
376
+ result: import("./common").JsonValue;
377
+ } | {
378
+ error: ActionRunFailure<"writeback">;
379
+ status: "failed";
444
380
  completedAt: string;
445
- error?: {
446
- message: string;
447
- name?: string | undefined;
448
- phase?: "validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit" | undefined;
449
- } | undefined;
450
- result?: unknown;
451
381
  } | undefined;
452
382
  effects?: {
453
- status: "succeeded" | "failed";
383
+ status: "succeeded";
384
+ completedAt: string;
385
+ } | {
386
+ error: ActionRunFailure<"effects">;
387
+ status: "failed";
454
388
  completedAt: string;
455
- error?: {
456
- message: string;
457
- name?: string | undefined;
458
- phase?: "validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit" | undefined;
459
- } | undefined;
460
389
  } | undefined;
461
390
  phase?: "validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit" | undefined;
462
391
  startedAt?: string | undefined;
@@ -464,8 +393,8 @@ export declare const ActionRunDetailSchema: z.ZodObject<{
464
393
  }, {
465
394
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
466
395
  projectId: string;
467
- params: Record<string, unknown>;
468
396
  id: string;
397
+ params: Record<string, unknown>;
469
398
  actionId: string;
470
399
  subject: {
471
400
  kind: "none";
@@ -475,29 +404,23 @@ export declare const ActionRunDetailSchema: z.ZodObject<{
475
404
  primaryId: string;
476
405
  };
477
406
  queuedAt: string;
478
- error?: {
479
- message: string;
480
- name?: string | undefined;
481
- phase?: "validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit" | undefined;
482
- } | undefined;
407
+ error?: ActionRunFailure<"validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit"> | undefined;
483
408
  writeback?: {
484
- status: "succeeded" | "failed";
409
+ status: "succeeded";
410
+ completedAt: string;
411
+ result: import("./common").JsonValue;
412
+ } | {
413
+ error: ActionRunFailure<"writeback">;
414
+ status: "failed";
485
415
  completedAt: string;
486
- error?: {
487
- message: string;
488
- name?: string | undefined;
489
- phase?: "validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit" | undefined;
490
- } | undefined;
491
- result?: unknown;
492
416
  } | undefined;
493
417
  effects?: {
494
- status: "succeeded" | "failed";
418
+ status: "succeeded";
419
+ completedAt: string;
420
+ } | {
421
+ error: ActionRunFailure<"effects">;
422
+ status: "failed";
495
423
  completedAt: string;
496
- error?: {
497
- message: string;
498
- name?: string | undefined;
499
- phase?: "validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit" | undefined;
500
- } | undefined;
501
424
  } | undefined;
502
425
  phase?: "validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit" | undefined;
503
426
  startedAt?: string | undefined;
@@ -532,19 +455,7 @@ export declare const ActionRunListResponseSchema: z.ZodObject<{
532
455
  queuedAt: z.ZodString;
533
456
  startedAt: z.ZodOptional<z.ZodString>;
534
457
  finishedAt: z.ZodOptional<z.ZodString>;
535
- error: z.ZodOptional<z.ZodObject<{
536
- name: z.ZodOptional<z.ZodString>;
537
- message: z.ZodString;
538
- phase: z.ZodOptional<z.ZodEnum<["request", "enqueue", "validation", "writeback", "edits", "commit", "effects", "cancelled"]>>;
539
- }, "strip", z.ZodTypeAny, {
540
- message: string;
541
- name?: string | undefined;
542
- phase?: "validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit" | undefined;
543
- }, {
544
- message: string;
545
- name?: string | undefined;
546
- phase?: "validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit" | undefined;
547
- }>>;
458
+ error: z.ZodOptional<z.ZodType<ActionRunFailure<"validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit">, z.ZodTypeDef, ActionRunFailure<"validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit">>>;
548
459
  }, "strip", z.ZodTypeAny, {
549
460
  status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
550
461
  projectId: string;
@@ -558,11 +469,7 @@ export declare const ActionRunListResponseSchema: z.ZodObject<{
558
469
  primaryId: string;
559
470
  };
560
471
  queuedAt: string;
561
- error?: {
562
- message: string;
563
- name?: string | undefined;
564
- phase?: "validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit" | undefined;
565
- } | undefined;
472
+ error?: ActionRunFailure<"validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit"> | undefined;
566
473
  phase?: "validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit" | undefined;
567
474
  startedAt?: string | undefined;
568
475
  finishedAt?: string | undefined;
@@ -579,11 +486,7 @@ export declare const ActionRunListResponseSchema: z.ZodObject<{
579
486
  primaryId: string;
580
487
  };
581
488
  queuedAt: string;
582
- error?: {
583
- message: string;
584
- name?: string | undefined;
585
- phase?: "validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit" | undefined;
586
- } | undefined;
489
+ error?: ActionRunFailure<"validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit"> | undefined;
587
490
  phase?: "validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit" | undefined;
588
491
  startedAt?: string | undefined;
589
492
  finishedAt?: string | undefined;
@@ -604,11 +507,7 @@ export declare const ActionRunListResponseSchema: z.ZodObject<{
604
507
  primaryId: string;
605
508
  };
606
509
  queuedAt: string;
607
- error?: {
608
- message: string;
609
- name?: string | undefined;
610
- phase?: "validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit" | undefined;
611
- } | undefined;
510
+ error?: ActionRunFailure<"validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit"> | undefined;
612
511
  phase?: "validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit" | undefined;
613
512
  startedAt?: string | undefined;
614
513
  finishedAt?: string | undefined;
@@ -629,11 +528,7 @@ export declare const ActionRunListResponseSchema: z.ZodObject<{
629
528
  primaryId: string;
630
529
  };
631
530
  queuedAt: string;
632
- error?: {
633
- message: string;
634
- name?: string | undefined;
635
- phase?: "validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit" | undefined;
636
- } | undefined;
531
+ error?: ActionRunFailure<"validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit"> | undefined;
637
532
  phase?: "validation" | "writeback" | "edits" | "effects" | "cancelled" | "request" | "enqueue" | "commit" | undefined;
638
533
  startedAt?: string | undefined;
639
534
  finishedAt?: string | undefined;