@sixb/server 0.2.1 → 0.2.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 (153) hide show
  1. package/README.md +3 -3
  2. package/dist/artifacts/frame.d.ts.map +1 -1
  3. package/dist/auth/scope.d.ts +3 -0
  4. package/dist/auth/scope.d.ts.map +1 -1
  5. package/dist/auth/shared-access.d.ts +23 -0
  6. package/dist/auth/shared-access.d.ts.map +1 -1
  7. package/dist/connectors/http.d.ts +6 -1
  8. package/dist/connectors/http.d.ts.map +1 -1
  9. package/dist/index.js +2876 -667
  10. package/dist/index.js.map +43 -36
  11. package/dist/live/awareness.d.ts +48 -0
  12. package/dist/live/awareness.d.ts.map +1 -0
  13. package/dist/live/room.d.ts +198 -0
  14. package/dist/live/room.d.ts.map +1 -0
  15. package/dist/live/rooms.d.ts +67 -0
  16. package/dist/live/rooms.d.ts.map +1 -0
  17. package/dist/registerRoutes.d.ts.map +1 -1
  18. package/dist/routes/actions.d.ts +3 -3
  19. package/dist/routes/agent-approvals.d.ts +21 -11
  20. package/dist/routes/agent-approvals.d.ts.map +1 -1
  21. package/dist/routes/agent-children.d.ts +4 -4
  22. package/dist/routes/agent-computers.d.ts +146 -1
  23. package/dist/routes/agent-computers.d.ts.map +1 -1
  24. package/dist/routes/agent-runners.d.ts.map +1 -1
  25. package/dist/routes/agents.d.ts +152 -60
  26. package/dist/routes/agents.d.ts.map +1 -1
  27. package/dist/routes/artifact-frames.d.ts +2 -1
  28. package/dist/routes/artifact-frames.d.ts.map +1 -1
  29. package/dist/routes/artifacts.d.ts +1713 -178
  30. package/dist/routes/artifacts.d.ts.map +1 -1
  31. package/dist/routes/auth.d.ts +21 -21
  32. package/dist/routes/connector-connection-runs.d.ts +124 -5
  33. package/dist/routes/connector-connection-runs.d.ts.map +1 -1
  34. package/dist/routes/connector-connections.d.ts +9 -1
  35. package/dist/routes/connector-connections.d.ts.map +1 -1
  36. package/dist/routes/datasets.d.ts +5 -5
  37. package/dist/routes/events.d.ts +4 -4
  38. package/dist/routes/lake.d.ts +91 -0
  39. package/dist/routes/lake.d.ts.map +1 -0
  40. package/dist/routes/links.d.ts +6 -6
  41. package/dist/routes/logs.d.ts +2 -2
  42. package/dist/routes/model-generations.d.ts +2 -2
  43. package/dist/routes/objects.d.ts +6 -6
  44. package/dist/routes/objects.d.ts.map +1 -1
  45. package/dist/routes/observed-agent-threads.d.ts +21 -11
  46. package/dist/routes/observed-agent-threads.d.ts.map +1 -1
  47. package/dist/routes/ontology.d.ts +6 -6
  48. package/dist/routes/pipelines.d.ts +13 -9
  49. package/dist/routes/pipelines.d.ts.map +1 -1
  50. package/dist/routes/projections.d.ts +27 -27
  51. package/dist/routes/share-grants.d.ts +9 -9
  52. package/dist/routes/shared-access.d.ts +57 -2
  53. package/dist/routes/shared-access.d.ts.map +1 -1
  54. package/dist/routes/status.d.ts +11 -15
  55. package/dist/routes/status.d.ts.map +1 -1
  56. package/dist/routes/syncs.d.ts +9 -6
  57. package/dist/routes/syncs.d.ts.map +1 -1
  58. package/dist/routes/telemetry.d.ts +7 -7
  59. package/dist/routes/webhooks.d.ts.map +1 -1
  60. package/dist/routes/workflows.d.ts +14 -14
  61. package/dist/routes/ws/artifacts.d.ts +57 -0
  62. package/dist/routes/ws/artifacts.d.ts.map +1 -0
  63. package/dist/routes/ws/events.d.ts +8 -7
  64. package/dist/routes/ws/events.d.ts.map +1 -1
  65. package/dist/routes/ws/index.d.ts +2 -1
  66. package/dist/routes/ws/index.d.ts.map +1 -1
  67. package/dist/routes/ws/logs.d.ts +10 -10
  68. package/dist/routes/ws/shared-sockets.d.ts +52 -0
  69. package/dist/routes/ws/shared-sockets.d.ts.map +1 -0
  70. package/dist/schemas/actions.d.ts +7 -7
  71. package/dist/schemas/activity.d.ts +16 -16
  72. package/dist/schemas/agent-approvals.d.ts +27 -27
  73. package/dist/schemas/agents.d.ts +642 -196
  74. package/dist/schemas/agents.d.ts.map +1 -1
  75. package/dist/schemas/ai-accounting.d.ts +41 -41
  76. package/dist/schemas/ai-accounting.d.ts.map +1 -1
  77. package/dist/schemas/artifacts.d.ts +2106 -127
  78. package/dist/schemas/artifacts.d.ts.map +1 -1
  79. package/dist/schemas/auth.d.ts +63 -63
  80. package/dist/schemas/connectors.d.ts +180 -20
  81. package/dist/schemas/connectors.d.ts.map +1 -1
  82. package/dist/schemas/datasets.d.ts +44 -44
  83. package/dist/schemas/event-payloads.d.ts +2 -2
  84. package/dist/schemas/events.d.ts +26 -26
  85. package/dist/schemas/events.d.ts.map +1 -1
  86. package/dist/schemas/files.d.ts +12 -0
  87. package/dist/schemas/files.d.ts.map +1 -1
  88. package/dist/schemas/lake.d.ts +251 -0
  89. package/dist/schemas/lake.d.ts.map +1 -0
  90. package/dist/schemas/lineage.d.ts +56 -56
  91. package/dist/schemas/logs.d.ts +18 -18
  92. package/dist/schemas/models.d.ts +4 -4
  93. package/dist/schemas/objects.d.ts.map +1 -1
  94. package/dist/schemas/ontology.d.ts +14 -14
  95. package/dist/schemas/pipelines.d.ts +86 -64
  96. package/dist/schemas/pipelines.d.ts.map +1 -1
  97. package/dist/schemas/projections.d.ts +160 -160
  98. package/dist/schemas/projections.d.ts.map +1 -1
  99. package/dist/schemas/share-grants.d.ts +30 -30
  100. package/dist/schemas/shared-access.d.ts +17 -4
  101. package/dist/schemas/shared-access.d.ts.map +1 -1
  102. package/dist/schemas/status.d.ts +59 -79
  103. package/dist/schemas/status.d.ts.map +1 -1
  104. package/dist/schemas/syncs.d.ts +38 -22
  105. package/dist/schemas/syncs.d.ts.map +1 -1
  106. package/dist/schemas/telemetry.d.ts +26 -26
  107. package/dist/schemas/workflows.d.ts +71 -71
  108. package/dist/server.d.ts +13 -0
  109. package/dist/server.d.ts.map +1 -1
  110. package/dist/utils/ws.d.ts +3 -0
  111. package/dist/utils/ws.d.ts.map +1 -1
  112. package/package.json +11 -7
  113. package/src/artifacts/frame.ts +4 -13
  114. package/src/auth/scope.ts +10 -1
  115. package/src/auth/shared-access.ts +108 -12
  116. package/src/connectors/http.ts +35 -1
  117. package/src/live/README.md +136 -0
  118. package/src/live/awareness.ts +141 -0
  119. package/src/live/room.ts +933 -0
  120. package/src/live/rooms.ts +288 -0
  121. package/src/registerRoutes.ts +2 -0
  122. package/src/routes/agent-computers.ts +208 -14
  123. package/src/routes/agent-runners.ts +1 -0
  124. package/src/routes/agents.ts +52 -7
  125. package/src/routes/artifact-frames.ts +40 -12
  126. package/src/routes/artifacts.ts +713 -28
  127. package/src/routes/connector-connection-runs.ts +7 -12
  128. package/src/routes/connector-connections.ts +10 -7
  129. package/src/routes/lake.ts +73 -0
  130. package/src/routes/objects.ts +3 -9
  131. package/src/routes/pipelines.ts +1 -0
  132. package/src/routes/shared-access.ts +53 -1
  133. package/src/routes/status.ts +9 -4
  134. package/src/routes/syncs.ts +1 -0
  135. package/src/routes/webhooks.ts +44 -3
  136. package/src/routes/ws/artifacts.ts +138 -0
  137. package/src/routes/ws/events.ts +7 -2
  138. package/src/routes/ws/index.ts +13 -2
  139. package/src/routes/ws/shared-sockets.ts +152 -0
  140. package/src/schemas/agents.ts +71 -1
  141. package/src/schemas/ai-accounting.ts +1 -0
  142. package/src/schemas/artifacts.ts +255 -18
  143. package/src/schemas/connectors.ts +17 -2
  144. package/src/schemas/files.ts +12 -0
  145. package/src/schemas/lake.ts +53 -0
  146. package/src/schemas/objects.ts +1 -0
  147. package/src/schemas/pipelines.ts +2 -0
  148. package/src/schemas/projections.ts +2 -2
  149. package/src/schemas/shared-access.ts +16 -0
  150. package/src/schemas/status.ts +16 -22
  151. package/src/schemas/syncs.ts +2 -0
  152. package/src/server.ts +35 -4
  153. package/src/utils/ws.ts +7 -0
@@ -58,7 +58,7 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
58
58
  output: Record<string, import("../schemas/common").JsonValue>;
59
59
  })[];
60
60
  latestRun: {
61
- status: "succeeded" | "failed" | "cancelled" | "waiting" | "queued" | "running";
61
+ status: "succeeded" | "failed" | "cancelled" | "running" | "waiting" | "queued";
62
62
  projectId: string;
63
63
  id: string;
64
64
  requestedBy: {
@@ -131,7 +131,7 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
131
131
  output: Record<string, import("../schemas/common").JsonValue>;
132
132
  })[];
133
133
  latestRun: {
134
- status: "succeeded" | "failed" | "cancelled" | "waiting" | "queued" | "running";
134
+ status: "succeeded" | "failed" | "cancelled" | "running" | "waiting" | "queued";
135
135
  projectId: string;
136
136
  id: string;
137
137
  requestedBy: {
@@ -475,7 +475,7 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
475
475
  body: unknown;
476
476
  params: {};
477
477
  query: {
478
- status?: "succeeded" | "failed" | "cancelled" | "waiting" | "queued" | "running" | undefined;
478
+ status?: "succeeded" | "failed" | "cancelled" | "running" | "waiting" | "queued" | undefined;
479
479
  startedAfter?: string | undefined;
480
480
  startedBefore?: string | undefined;
481
481
  limit?: string | undefined;
@@ -487,7 +487,7 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
487
487
  response: {
488
488
  200: {
489
489
  runs: {
490
- status: "succeeded" | "failed" | "cancelled" | "waiting" | "queued" | "running";
490
+ status: "succeeded" | "failed" | "cancelled" | "running" | "waiting" | "queued";
491
491
  projectId: string;
492
492
  id: string;
493
493
  requestedBy: {
@@ -536,7 +536,7 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
536
536
  response: {
537
537
  200: {
538
538
  run: {
539
- status: "succeeded" | "failed" | "cancelled" | "waiting" | "queued" | "running";
539
+ status: "succeeded" | "failed" | "cancelled" | "running" | "waiting" | "queued";
540
540
  projectId: string;
541
541
  id: string;
542
542
  requestedBy: {
@@ -552,7 +552,7 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
552
552
  output?: Record<string, import("../schemas/common").JsonValue> | undefined;
553
553
  };
554
554
  nodes: {
555
- status: "succeeded" | "failed" | "cancelled" | "waiting" | "running";
555
+ status: "succeeded" | "failed" | "cancelled" | "running" | "waiting";
556
556
  projectId: string;
557
557
  id: string;
558
558
  startedAt: string;
@@ -562,10 +562,10 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
562
562
  nodeId: string;
563
563
  nodeKey: string;
564
564
  nodeIndex: number;
565
- nodeType: "agent" | "action" | "step" | "intervention";
565
+ nodeType: "action" | "agent" | "step" | "intervention";
566
566
  error?: import("@sixb/core").SixbFailure<"ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed"> | undefined;
567
567
  agentExecution?: {
568
- status: "succeeded" | "failed" | "cancelled" | "queued" | "running";
568
+ status: "succeeded" | "failed" | "cancelled" | "running" | "queued";
569
569
  attempt: number;
570
570
  modelId?: string | undefined;
571
571
  startedAt?: string | undefined;
@@ -641,7 +641,7 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
641
641
  headers: unknown;
642
642
  response: {
643
643
  200: {
644
- status: "succeeded" | "failed" | "cancelled" | "queued" | "running";
644
+ status: "succeeded" | "failed" | "cancelled" | "running" | "queued";
645
645
  createdAt: string;
646
646
  prompt: string;
647
647
  attempt: number;
@@ -787,7 +787,7 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
787
787
  } | {
788
788
  error: {
789
789
  at: string;
790
- code: "action.phase_failed" | "action.read_conflict" | "action.rejected" | "action.run_in_progress" | "action.timeout" | "agent.approval_authority_lost" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.configuration_invalid" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable" | "connector.replacement_required" | "connector.revocation_pending" | "dataset.not_found" | "dataset.version_incompatible" | "dataset.version_not_found" | "dataset.version_read_inconsistent" | "event.delivery_failed" | "internal.unexpected" | "queue.enqueue_failed" | "object.not_found" | "object.unique_violation" | "pipeline.step_failed" | "projection.definition_invalid" | "projection.execution_failed" | "projection.not_found" | "projection.run_already_terminal" | "projection.run_identity_mismatch" | "runtime.cancelled" | "runtime.stopping" | "vector.model_unavailable" | "vector.response_invalid" | "vector.outcome_unknown" | "storage.unavailable" | "sync.execution_failed" | "webhook.delivery_failed" | "webhook.delivery_rejected" | "workflow.node_failed";
790
+ code: "action.phase_failed" | "action.read_conflict" | "action.rejected" | "action.run_in_progress" | "action.timeout" | "agent.approval_authority_lost" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.configuration_invalid" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable" | "connector.replacement_required" | "connector.revocation_pending" | "dataset.change_refused" | "dataset.not_found" | "dataset.version_incompatible" | "dataset.version_not_found" | "dataset.version_read_inconsistent" | "event.delivery_failed" | "internal.unexpected" | "queue.enqueue_failed" | "object.not_found" | "object.unique_violation" | "pipeline.step_failed" | "projection.definition_invalid" | "projection.execution_failed" | "projection.not_found" | "projection.run_already_terminal" | "projection.run_identity_mismatch" | "runtime.cancelled" | "runtime.stopping" | "vector.model_unavailable" | "vector.response_invalid" | "vector.outcome_unknown" | "storage.unavailable" | "sync.execution_failed" | "webhook.delivery_failed" | "webhook.delivery_rejected" | "workflow.node_failed";
791
791
  message: string;
792
792
  retryable: boolean;
793
793
  details?: import("../schemas/common").JsonValue | undefined;
@@ -849,7 +849,7 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
849
849
  response: {
850
850
  200: {
851
851
  run: {
852
- status: "succeeded" | "failed" | "cancelled" | "waiting" | "queued" | "running";
852
+ status: "succeeded" | "failed" | "cancelled" | "running" | "waiting" | "queued";
853
853
  projectId: string;
854
854
  id: string;
855
855
  requestedBy: {
@@ -865,7 +865,7 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
865
865
  output?: Record<string, import("../schemas/common").JsonValue> | undefined;
866
866
  };
867
867
  nodes: {
868
- status: "succeeded" | "failed" | "cancelled" | "waiting" | "running";
868
+ status: "succeeded" | "failed" | "cancelled" | "running" | "waiting";
869
869
  projectId: string;
870
870
  id: string;
871
871
  startedAt: string;
@@ -875,10 +875,10 @@ export declare function registerWorkflowRoutes(app: Elysia, host: SixbHostView):
875
875
  nodeId: string;
876
876
  nodeKey: string;
877
877
  nodeIndex: number;
878
- nodeType: "agent" | "action" | "step" | "intervention";
878
+ nodeType: "action" | "agent" | "step" | "intervention";
879
879
  error?: import("@sixb/core").SixbFailure<"ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled" | "workflow.node_failed"> | undefined;
880
880
  agentExecution?: {
881
- status: "succeeded" | "failed" | "cancelled" | "queued" | "running";
881
+ status: "succeeded" | "failed" | "cancelled" | "running" | "queued";
882
882
  attempt: number;
883
883
  modelId?: string | undefined;
884
884
  startedAt?: string | undefined;
@@ -0,0 +1,57 @@
1
+ import { type ArtifactLiveClientMessage } from "@sixb/core/artifacts/live";
2
+ import type { Elysia } from "elysia";
3
+ import type { SixbServer } from "../../server";
4
+ import type { SharedSockets } from "./shared-sockets";
5
+ export declare function parseArtifactLiveMessage(payload: unknown): {
6
+ ok: true;
7
+ data: ArtifactLiveClientMessage;
8
+ } | {
9
+ ok: false;
10
+ error: string;
11
+ };
12
+ /**
13
+ * `/ws/artifacts`: artifacts edited live, through Yjs's sync and awareness protocols. Whoever may
14
+ * change an artifact edits it; whoever may only read it watches, a shared link's guest included,
15
+ * under the name they gave. See `../../live/README.md`.
16
+ */
17
+ export declare function registerArtifactLiveRoutes(app: Elysia, server: SixbServer, shared: SharedSockets): Elysia<"", {
18
+ decorator: {};
19
+ store: {};
20
+ derive: {};
21
+ resolve: {};
22
+ }, {
23
+ typebox: {};
24
+ error: {};
25
+ }, {
26
+ schema: {};
27
+ standaloneSchema: {};
28
+ macro: {};
29
+ macroFn: {};
30
+ parser: {};
31
+ response: {};
32
+ }, {
33
+ ws: {
34
+ artifacts: {
35
+ subscribe: {
36
+ body: {};
37
+ params: {};
38
+ query: {};
39
+ headers: {};
40
+ response: {};
41
+ };
42
+ };
43
+ };
44
+ }, {
45
+ derive: {};
46
+ resolve: {};
47
+ schema: {};
48
+ standaloneSchema: {};
49
+ response: {};
50
+ }, {
51
+ derive: {};
52
+ resolve: {};
53
+ schema: {};
54
+ standaloneSchema: {};
55
+ response: {};
56
+ }>;
57
+ //# sourceMappingURL=artifacts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"artifacts.d.ts","sourceRoot":"","sources":["../../../src/routes/ws/artifacts.ts"],"names":[],"mappings":"AACA,OAAO,EAAuB,KAAK,yBAAyB,EAAE,MAAM,2BAA2B,CAAA;AAC/F,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAKpC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAQ9C,OAAO,KAAK,EAAkB,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAyBrE,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,OAAO,GACf;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,yBAAyB,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAM9E;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkFhG"}
@@ -1,10 +1,11 @@
1
1
  import type { Elysia } from "elysia";
2
2
  import { z } from "zod";
3
3
  import type { SixbServer } from "../../server";
4
+ import type { SharedSockets } from "./shared-sockets";
4
5
  declare const SubscriptionMessageSchema: z.ZodUnion<[z.ZodObject<{
5
6
  type: z.ZodLiteral<"subscribe">;
6
- topic: z.ZodOptional<z.ZodEnum<["objects" | "datasets" | "workflows" | "syncs" | "pipelines" | "rules" | "schedules" | "users" | "telemetry" | "links", ...("objects" | "datasets" | "workflows" | "syncs" | "pipelines" | "rules" | "schedules" | "users" | "telemetry" | "links")[]]>>;
7
- types: z.ZodOptional<z.ZodArray<z.ZodEnum<["object.created" | "object.updated" | "object.deleted" | "link.created" | "link.updated" | "link.deleted" | "telemetry.appended" | "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" | "user.joined" | "user.suspended" | "user.reactivated" | "user.invited" | "user.profile.updated", ...("object.created" | "object.updated" | "object.deleted" | "link.created" | "link.updated" | "link.deleted" | "telemetry.appended" | "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" | "user.joined" | "user.suspended" | "user.reactivated" | "user.invited" | "user.profile.updated")[]]>, "many">>;
7
+ topic: z.ZodOptional<z.ZodEnum<["objects" | "datasets" | "workflows" | "syncs" | "pipelines" | "rules" | "artifacts" | "schedules" | "users" | "telemetry" | "links", ...("objects" | "datasets" | "workflows" | "syncs" | "pipelines" | "rules" | "artifacts" | "schedules" | "users" | "telemetry" | "links")[]]>>;
8
+ types: z.ZodOptional<z.ZodArray<z.ZodEnum<["object.created" | "object.updated" | "object.deleted" | "link.created" | "link.updated" | "link.deleted" | "telemetry.appended" | "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" | "user.joined" | "user.suspended" | "user.reactivated" | "user.invited" | "user.profile.updated" | "artifact.updated" | "artifact.commented", ...("object.created" | "object.updated" | "object.deleted" | "link.created" | "link.updated" | "link.deleted" | "telemetry.appended" | "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" | "user.joined" | "user.suspended" | "user.reactivated" | "user.invited" | "user.profile.updated" | "artifact.updated" | "artifact.commented")[]]>, "many">>;
8
9
  objectTypeId: z.ZodOptional<z.ZodString>;
9
10
  primaryId: z.ZodOptional<z.ZodString>;
10
11
  runId: z.ZodOptional<z.ZodString>;
@@ -16,8 +17,8 @@ declare const SubscriptionMessageSchema: z.ZodUnion<[z.ZodObject<{
16
17
  runId?: string | undefined;
17
18
  primaryId?: string | undefined;
18
19
  limit?: number | undefined;
19
- types?: ("object.created" | "object.updated" | "object.deleted" | "link.created" | "link.updated" | "link.deleted" | "telemetry.appended" | "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" | "user.joined" | "user.suspended" | "user.reactivated" | "user.invited" | "user.profile.updated")[] | undefined;
20
- topic?: "objects" | "datasets" | "workflows" | "syncs" | "pipelines" | "rules" | "schedules" | "users" | "telemetry" | "links" | undefined;
20
+ types?: ("object.created" | "object.updated" | "object.deleted" | "link.created" | "link.updated" | "link.deleted" | "telemetry.appended" | "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" | "user.joined" | "user.suspended" | "user.reactivated" | "user.invited" | "user.profile.updated" | "artifact.updated" | "artifact.commented")[] | undefined;
21
+ topic?: "objects" | "datasets" | "workflows" | "syncs" | "pipelines" | "rules" | "artifacts" | "schedules" | "users" | "telemetry" | "links" | undefined;
21
22
  afterCursor?: string | undefined;
22
23
  }, {
23
24
  type: "subscribe";
@@ -25,8 +26,8 @@ declare const SubscriptionMessageSchema: z.ZodUnion<[z.ZodObject<{
25
26
  runId?: string | undefined;
26
27
  primaryId?: string | undefined;
27
28
  limit?: number | undefined;
28
- types?: ("object.created" | "object.updated" | "object.deleted" | "link.created" | "link.updated" | "link.deleted" | "telemetry.appended" | "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" | "user.joined" | "user.suspended" | "user.reactivated" | "user.invited" | "user.profile.updated")[] | undefined;
29
- topic?: "objects" | "datasets" | "workflows" | "syncs" | "pipelines" | "rules" | "schedules" | "users" | "telemetry" | "links" | undefined;
29
+ types?: ("object.created" | "object.updated" | "object.deleted" | "link.created" | "link.updated" | "link.deleted" | "telemetry.appended" | "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" | "user.joined" | "user.suspended" | "user.reactivated" | "user.invited" | "user.profile.updated" | "artifact.updated" | "artifact.commented")[] | undefined;
30
+ topic?: "objects" | "datasets" | "workflows" | "syncs" | "pipelines" | "rules" | "artifacts" | "schedules" | "users" | "telemetry" | "links" | undefined;
30
31
  afterCursor?: string | undefined;
31
32
  }>, z.ZodObject<{
32
33
  type: z.ZodLiteral<"unsubscribe">;
@@ -42,7 +43,7 @@ export declare function parseSubscriptionMessage(payload: unknown): {
42
43
  ok: false;
43
44
  error: string;
44
45
  };
45
- export declare function registerEventStreamRoutes(app: Elysia, server: SixbServer): Elysia<"", {
46
+ export declare function registerEventStreamRoutes(app: Elysia, server: SixbServer, shared: SharedSockets): Elysia<"", {
46
47
  decorator: {};
47
48
  store: {};
48
49
  derive: {};
@@ -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;AA4B9C,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;AAED,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8IxE"}
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;AAE9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AA2BrD,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;AAED,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkJ/F"}
@@ -1,6 +1,7 @@
1
1
  import type { Elysia } from "elysia";
2
+ import type { SharedAccessBoundary } from "../../auth/shared-access";
2
3
  import type { SixbServer } from "../../server";
3
- export declare function registerWebSocketRoutes(app: Elysia, server: SixbServer): Elysia<"", {
4
+ export declare function registerWebSocketRoutes(app: Elysia, server: SixbServer, sharedAccess: SharedAccessBoundary): Elysia<"", {
4
5
  decorator: {};
5
6
  store: {};
6
7
  derive: {};
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/routes/ws/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAK9C,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;GAKtE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/routes/ws/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAO9C,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,UAAU,EAClB,YAAY,EAAE,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;GAUnC"}
@@ -19,46 +19,46 @@ declare const SubscriptionMessageSchema: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
19
19
  id: z.ZodString;
20
20
  }, "strip", z.ZodTypeAny, {
21
21
  id: string;
22
- kind: "workflow" | "agent" | "action" | "sync" | "pipeline" | "projection" | "webhook";
22
+ kind: "action" | "workflow" | "agent" | "sync" | "pipeline" | "projection" | "webhook";
23
23
  }, {
24
24
  id: string;
25
- kind: "workflow" | "agent" | "action" | "sync" | "pipeline" | "projection" | "webhook";
25
+ kind: "action" | "workflow" | "agent" | "sync" | "pipeline" | "projection" | "webhook";
26
26
  }>>;
27
27
  afterCursor: z.ZodOptional<z.ZodString>;
28
28
  }, "strip", z.ZodTypeAny, {
29
29
  type: "subscribe";
30
30
  run?: {
31
31
  id: string;
32
- kind: "workflow" | "agent" | "action" | "sync" | "pipeline" | "projection" | "webhook";
32
+ kind: "action" | "workflow" | "agent" | "sync" | "pipeline" | "projection" | "webhook";
33
33
  } | undefined;
34
- kinds?: ("workflow" | "agent" | "action" | "sync" | "pipeline" | "projection" | "webhook")[] | undefined;
34
+ kinds?: ("action" | "workflow" | "agent" | "sync" | "pipeline" | "projection" | "webhook")[] | undefined;
35
35
  afterCursor?: string | undefined;
36
36
  levels?: ("error" | "info" | "debug" | "warn")[] | undefined;
37
37
  }, {
38
38
  type: "subscribe";
39
39
  run?: {
40
40
  id: string;
41
- kind: "workflow" | "agent" | "action" | "sync" | "pipeline" | "projection" | "webhook";
41
+ kind: "action" | "workflow" | "agent" | "sync" | "pipeline" | "projection" | "webhook";
42
42
  } | undefined;
43
- kinds?: ("workflow" | "agent" | "action" | "sync" | "pipeline" | "projection" | "webhook")[] | undefined;
43
+ kinds?: ("action" | "workflow" | "agent" | "sync" | "pipeline" | "projection" | "webhook")[] | undefined;
44
44
  afterCursor?: string | undefined;
45
45
  levels?: ("error" | "info" | "debug" | "warn")[] | undefined;
46
46
  }>, {
47
47
  type: "subscribe";
48
48
  run?: {
49
49
  id: string;
50
- kind: "workflow" | "agent" | "action" | "sync" | "pipeline" | "projection" | "webhook";
50
+ kind: "action" | "workflow" | "agent" | "sync" | "pipeline" | "projection" | "webhook";
51
51
  } | undefined;
52
- kinds?: ("workflow" | "agent" | "action" | "sync" | "pipeline" | "projection" | "webhook")[] | undefined;
52
+ kinds?: ("action" | "workflow" | "agent" | "sync" | "pipeline" | "projection" | "webhook")[] | undefined;
53
53
  afterCursor?: string | undefined;
54
54
  levels?: ("error" | "info" | "debug" | "warn")[] | undefined;
55
55
  }, {
56
56
  type: "subscribe";
57
57
  run?: {
58
58
  id: string;
59
- kind: "workflow" | "agent" | "action" | "sync" | "pipeline" | "projection" | "webhook";
59
+ kind: "action" | "workflow" | "agent" | "sync" | "pipeline" | "projection" | "webhook";
60
60
  } | undefined;
61
- kinds?: ("workflow" | "agent" | "action" | "sync" | "pipeline" | "projection" | "webhook")[] | undefined;
61
+ kinds?: ("action" | "workflow" | "agent" | "sync" | "pipeline" | "projection" | "webhook")[] | undefined;
62
62
  afterCursor?: string | undefined;
63
63
  levels?: ("error" | "info" | "debug" | "warn")[] | undefined;
64
64
  }>, z.ZodObject<{
@@ -0,0 +1,52 @@
1
+ import type { SharedSessionContext } from "@sixb/core/internal/shares";
2
+ import type { SharedAccessBoundary } from "../../auth/shared-access";
3
+ /**
4
+ * How long a shared link's socket trusts its session before reading it again: on a timer, so a
5
+ * socket that only listens closes too, and on its next message past that.
6
+ */
7
+ export declare const SHARED_SOCKET_RECHECK_MS = 10000;
8
+ /**
9
+ * The close code of a socket whose shared link ended: revoked, expired, or left idle. The client
10
+ * stops reconnecting on it (`SHARED_ACCESS_ENDED_CLOSE_CODE` in `@sixb/client`).
11
+ */
12
+ export declare const SHARED_ACCESS_ENDED_CLOSE_CODE = 4401;
13
+ /** A socket, as far as watching it goes: closing it. */
14
+ export interface ClosableSocket {
15
+ close(code?: number, reason?: string): void;
16
+ }
17
+ /**
18
+ * The sockets shared links' sessions opened, each kept open only while its session holds.
19
+ *
20
+ * The upgrade proved the session once, as any request does, and the socket's SDK keeps that
21
+ * authority. A link revoked or a session expired since would go unnoticed, so each socket reads its
22
+ * session again, by its id, at most every {@link SHARED_SOCKET_RECHECK_MS}, and is closed with
23
+ * {@link SHARED_ACCESS_ENDED_CLOSE_CODE} once it ended. Reading it renews nothing: only a visitor's
24
+ * own requests keep their session from idling out.
25
+ */
26
+ export declare class SharedSockets {
27
+ private readonly boundary;
28
+ private readonly watches;
29
+ /**
30
+ * The open sockets of each session, read again at once when its visitor gives a name. Keyed by
31
+ * `wsStateKey`: Elysia hands each handler a wrapper of its own around the one raw socket.
32
+ */
33
+ private readonly sockets;
34
+ constructor(boundary: SharedAccessBoundary);
35
+ /**
36
+ * Starts watching a socket that a shared link's session opened; any other is left alone.
37
+ * `onRenamed` hears when its visitor gives a name, or another, read from their session.
38
+ */
39
+ open(ws: ClosableSocket, onRenamed?: () => void): void;
40
+ /**
41
+ * Whether the socket may go on: false once the session that opened it ended, and the socket is
42
+ * closing. Always true for a socket no shared link opened.
43
+ */
44
+ holds(ws: ClosableSocket): Promise<boolean>;
45
+ /** The session that opened the socket, as it is now: its visitor's name, once they gave one. */
46
+ session(ws: ClosableSocket): Promise<SharedSessionContext | null>;
47
+ /** Stops watching a socket that closed. */
48
+ close(ws: ClosableSocket): void;
49
+ private read;
50
+ private end;
51
+ }
52
+ //# sourceMappingURL=shared-sockets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared-sockets.d.ts","sourceRoot":"","sources":["../../../src/routes/ws/shared-sockets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AACtE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAGpE;;;GAGG;AACH,eAAO,MAAM,wBAAwB,QAAS,CAAA;AAE9C;;;GAGG;AACH,eAAO,MAAM,8BAA8B,OAAO,CAAA;AAKlD,wDAAwD;AACxD,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC5C;AAYD;;;;;;;;GAQG;AACH,qBAAa,aAAa;IAQZ,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAPrC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA+B;IACvD;;;OAGG;IACH,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAiD;gBAE5C,QAAQ,EAAE,oBAAoB;IAY3D;;;OAGG;IACH,IAAI,CAAC,EAAE,EAAE,cAAc,EAAE,SAAS,CAAC,EAAE,MAAM,IAAI,GAAG,IAAI;IAiBtD;;;OAGG;IACG,KAAK,CAAC,EAAE,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC;IASjD,gGAAgG;IAC1F,OAAO,CAAC,EAAE,EAAE,cAAc,GAAG,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IASvE,2CAA2C;IAC3C,KAAK,CAAC,EAAE,EAAE,cAAc,GAAG,IAAI;IAY/B,OAAO,CAAC,IAAI;IAuBZ,OAAO,CAAC,GAAG;CAQZ"}
@@ -95,13 +95,13 @@ export declare const ActionRunInProgressResponseSchema: z.ZodObject<{
95
95
  export declare const ActionRequestFailedResponseSchema: z.ZodObject<{
96
96
  error: z.ZodString;
97
97
  } & {
98
- code: z.ZodEnum<["action.phase_failed" | "action.read_conflict" | "action.rejected" | "action.run_in_progress" | "action.timeout" | "agent.approval_authority_lost" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.configuration_invalid" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable" | "connector.replacement_required" | "connector.revocation_pending" | "dataset.not_found" | "dataset.version_incompatible" | "dataset.version_not_found" | "dataset.version_read_inconsistent" | "event.delivery_failed" | "internal.unexpected" | "queue.enqueue_failed" | "object.not_found" | "object.unique_violation" | "pipeline.step_failed" | "projection.definition_invalid" | "projection.execution_failed" | "projection.not_found" | "projection.run_already_terminal" | "projection.run_identity_mismatch" | "runtime.cancelled" | "runtime.stopping" | "vector.model_unavailable" | "vector.response_invalid" | "vector.outcome_unknown" | "storage.unavailable" | "sync.execution_failed" | "webhook.delivery_failed" | "webhook.delivery_rejected" | "workflow.node_failed", ...("action.phase_failed" | "action.read_conflict" | "action.rejected" | "action.run_in_progress" | "action.timeout" | "agent.approval_authority_lost" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.configuration_invalid" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable" | "connector.replacement_required" | "connector.revocation_pending" | "dataset.not_found" | "dataset.version_incompatible" | "dataset.version_not_found" | "dataset.version_read_inconsistent" | "event.delivery_failed" | "internal.unexpected" | "queue.enqueue_failed" | "object.not_found" | "object.unique_violation" | "pipeline.step_failed" | "projection.definition_invalid" | "projection.execution_failed" | "projection.not_found" | "projection.run_already_terminal" | "projection.run_identity_mismatch" | "runtime.cancelled" | "runtime.stopping" | "vector.model_unavailable" | "vector.response_invalid" | "vector.outcome_unknown" | "storage.unavailable" | "sync.execution_failed" | "webhook.delivery_failed" | "webhook.delivery_rejected" | "workflow.node_failed")[]]>;
98
+ code: z.ZodEnum<["action.phase_failed" | "action.read_conflict" | "action.rejected" | "action.run_in_progress" | "action.timeout" | "agent.approval_authority_lost" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.configuration_invalid" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable" | "connector.replacement_required" | "connector.revocation_pending" | "dataset.change_refused" | "dataset.not_found" | "dataset.version_incompatible" | "dataset.version_not_found" | "dataset.version_read_inconsistent" | "event.delivery_failed" | "internal.unexpected" | "queue.enqueue_failed" | "object.not_found" | "object.unique_violation" | "pipeline.step_failed" | "projection.definition_invalid" | "projection.execution_failed" | "projection.not_found" | "projection.run_already_terminal" | "projection.run_identity_mismatch" | "runtime.cancelled" | "runtime.stopping" | "vector.model_unavailable" | "vector.response_invalid" | "vector.outcome_unknown" | "storage.unavailable" | "sync.execution_failed" | "webhook.delivery_failed" | "webhook.delivery_rejected" | "workflow.node_failed", ...("action.phase_failed" | "action.read_conflict" | "action.rejected" | "action.run_in_progress" | "action.timeout" | "agent.approval_authority_lost" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.configuration_invalid" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable" | "connector.replacement_required" | "connector.revocation_pending" | "dataset.change_refused" | "dataset.not_found" | "dataset.version_incompatible" | "dataset.version_not_found" | "dataset.version_read_inconsistent" | "event.delivery_failed" | "internal.unexpected" | "queue.enqueue_failed" | "object.not_found" | "object.unique_violation" | "pipeline.step_failed" | "projection.definition_invalid" | "projection.execution_failed" | "projection.not_found" | "projection.run_already_terminal" | "projection.run_identity_mismatch" | "runtime.cancelled" | "runtime.stopping" | "vector.model_unavailable" | "vector.response_invalid" | "vector.outcome_unknown" | "storage.unavailable" | "sync.execution_failed" | "webhook.delivery_failed" | "webhook.delivery_rejected" | "workflow.node_failed")[]]>;
99
99
  }, "strip", z.ZodTypeAny, {
100
100
  error: string;
101
- code: "action.phase_failed" | "action.read_conflict" | "action.rejected" | "action.run_in_progress" | "action.timeout" | "agent.approval_authority_lost" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.configuration_invalid" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable" | "connector.replacement_required" | "connector.revocation_pending" | "dataset.not_found" | "dataset.version_incompatible" | "dataset.version_not_found" | "dataset.version_read_inconsistent" | "event.delivery_failed" | "internal.unexpected" | "queue.enqueue_failed" | "object.not_found" | "object.unique_violation" | "pipeline.step_failed" | "projection.definition_invalid" | "projection.execution_failed" | "projection.not_found" | "projection.run_already_terminal" | "projection.run_identity_mismatch" | "runtime.cancelled" | "runtime.stopping" | "vector.model_unavailable" | "vector.response_invalid" | "vector.outcome_unknown" | "storage.unavailable" | "sync.execution_failed" | "webhook.delivery_failed" | "webhook.delivery_rejected" | "workflow.node_failed";
101
+ code: "action.phase_failed" | "action.read_conflict" | "action.rejected" | "action.run_in_progress" | "action.timeout" | "agent.approval_authority_lost" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.configuration_invalid" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable" | "connector.replacement_required" | "connector.revocation_pending" | "dataset.change_refused" | "dataset.not_found" | "dataset.version_incompatible" | "dataset.version_not_found" | "dataset.version_read_inconsistent" | "event.delivery_failed" | "internal.unexpected" | "queue.enqueue_failed" | "object.not_found" | "object.unique_violation" | "pipeline.step_failed" | "projection.definition_invalid" | "projection.execution_failed" | "projection.not_found" | "projection.run_already_terminal" | "projection.run_identity_mismatch" | "runtime.cancelled" | "runtime.stopping" | "vector.model_unavailable" | "vector.response_invalid" | "vector.outcome_unknown" | "storage.unavailable" | "sync.execution_failed" | "webhook.delivery_failed" | "webhook.delivery_rejected" | "workflow.node_failed";
102
102
  }, {
103
103
  error: string;
104
- code: "action.phase_failed" | "action.read_conflict" | "action.rejected" | "action.run_in_progress" | "action.timeout" | "agent.approval_authority_lost" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.configuration_invalid" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable" | "connector.replacement_required" | "connector.revocation_pending" | "dataset.not_found" | "dataset.version_incompatible" | "dataset.version_not_found" | "dataset.version_read_inconsistent" | "event.delivery_failed" | "internal.unexpected" | "queue.enqueue_failed" | "object.not_found" | "object.unique_violation" | "pipeline.step_failed" | "projection.definition_invalid" | "projection.execution_failed" | "projection.not_found" | "projection.run_already_terminal" | "projection.run_identity_mismatch" | "runtime.cancelled" | "runtime.stopping" | "vector.model_unavailable" | "vector.response_invalid" | "vector.outcome_unknown" | "storage.unavailable" | "sync.execution_failed" | "webhook.delivery_failed" | "webhook.delivery_rejected" | "workflow.node_failed";
104
+ code: "action.phase_failed" | "action.read_conflict" | "action.rejected" | "action.run_in_progress" | "action.timeout" | "agent.approval_authority_lost" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.configuration_invalid" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable" | "connector.replacement_required" | "connector.revocation_pending" | "dataset.change_refused" | "dataset.not_found" | "dataset.version_incompatible" | "dataset.version_not_found" | "dataset.version_read_inconsistent" | "event.delivery_failed" | "internal.unexpected" | "queue.enqueue_failed" | "object.not_found" | "object.unique_violation" | "pipeline.step_failed" | "projection.definition_invalid" | "projection.execution_failed" | "projection.not_found" | "projection.run_already_terminal" | "projection.run_identity_mismatch" | "runtime.cancelled" | "runtime.stopping" | "vector.model_unavailable" | "vector.response_invalid" | "vector.outcome_unknown" | "storage.unavailable" | "sync.execution_failed" | "webhook.delivery_failed" | "webhook.delivery_rejected" | "workflow.node_failed";
105
105
  }>;
106
106
  /** The server is stopping and refused the request before starting anything. */
107
107
  export declare const RuntimeStoppingResponseSchema: z.ZodObject<{
@@ -163,6 +163,7 @@ export declare const ActionCatalogItemSchema: z.ZodObject<{
163
163
  }>;
164
164
  }, "strip", z.ZodTypeAny, {
165
165
  id: string;
166
+ name: string;
166
167
  params: {
167
168
  id: string;
168
169
  name: string;
@@ -172,7 +173,6 @@ export declare const ActionCatalogItemSchema: z.ZodObject<{
172
173
  semanticType?: string | undefined;
173
174
  schema?: unknown;
174
175
  }[];
175
- name: string;
176
176
  phases: {
177
177
  validate: boolean;
178
178
  writeback: boolean;
@@ -183,6 +183,7 @@ export declare const ActionCatalogItemSchema: z.ZodObject<{
183
183
  objectTypeId?: string | undefined;
184
184
  }, {
185
185
  id: string;
186
+ name: string;
186
187
  params: {
187
188
  id: string;
188
189
  name: string;
@@ -192,7 +193,6 @@ export declare const ActionCatalogItemSchema: z.ZodObject<{
192
193
  semanticType?: string | undefined;
193
194
  schema?: unknown;
194
195
  }[];
195
- name: string;
196
196
  phases: {
197
197
  validate: boolean;
198
198
  writeback: boolean;
@@ -253,6 +253,7 @@ export declare const ActionDetailSchema: z.ZodObject<{
253
253
  inputSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
254
254
  }, "strip", z.ZodTypeAny, {
255
255
  id: string;
256
+ name: string;
256
257
  params: {
257
258
  id: string;
258
259
  name: string;
@@ -262,7 +263,6 @@ export declare const ActionDetailSchema: z.ZodObject<{
262
263
  semanticType?: string | undefined;
263
264
  schema?: unknown;
264
265
  }[];
265
- name: string;
266
266
  phases: {
267
267
  validate: boolean;
268
268
  writeback: boolean;
@@ -274,6 +274,7 @@ export declare const ActionDetailSchema: z.ZodObject<{
274
274
  objectTypeId?: string | undefined;
275
275
  }, {
276
276
  id: string;
277
+ name: string;
277
278
  params: {
278
279
  id: string;
279
280
  name: string;
@@ -283,7 +284,6 @@ export declare const ActionDetailSchema: z.ZodObject<{
283
284
  semanticType?: string | undefined;
284
285
  schema?: unknown;
285
286
  }[];
286
- name: string;
287
287
  phases: {
288
288
  validate: boolean;
289
289
  writeback: boolean;