@devpad/api 2.3.3 → 2.3.5

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.
@@ -1,6 +1,6 @@
1
1
  import { InferSelectModel } from 'drizzle-orm';
2
2
  import { z } from 'zod';
3
- import { g as api_keys, t as project, D as todo_updates, f as action, A as ActionType, m as milestone, j as goal, x as task, i as codebase_tasks, y as task_link, v as tag, r as pipeline_run, s as pipeline_stage_event, n as pipeline_grant, q as pipeline_package, p as pipeline_analysis_template, o as pipeline_oidc_trust, h as apply_log, k as ignore_path, l as pipeline_approval, u as session, w as tag_config, z as task_rollup, B as task_tag, E as tracker_result, H as user } from './schema.d-D3xGKqB8.js';
3
+ import { j as api_keys, z as project, N as todo_updates, i as action, A as ActionType, r as milestone, n as goal, o as hook, p as hook_delivery, I as task, l as codebase_tasks, K as task_link, D as tag, x as pipeline_run, y as pipeline_stage_event, u as pipeline_grant, w as pipeline_package, s as pipeline_analysis_template, v as pipeline_oidc_trust, k as apply_log, m as github_webhook_event, q as ignore_path, t as pipeline_approval, B as session, E as tag_config, J as task_event, L as task_rollup, M as task_tag, O as tracker_result, Q as user } from './schema.d-CFQELmTM.js';
4
4
 
5
5
  declare const upsert_project: z.ZodObject<{
6
6
  id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
@@ -21,8 +21,8 @@ declare const upsert_project: z.ZodObject<{
21
21
  force: z.ZodOptional<z.ZodBoolean>;
22
22
  }, "strip", z.ZodTypeAny, {
23
23
  name: string;
24
- deleted: boolean;
25
24
  project_id: string;
25
+ deleted: boolean;
26
26
  description: string | null;
27
27
  specification: string | null;
28
28
  repo_url: string | null;
@@ -771,71 +771,71 @@ declare const dashboard_response: z.ZodObject<{
771
771
  fail: z.ZodNumber;
772
772
  pending: z.ZodNumber;
773
773
  }, "strip", z.ZodTypeAny, {
774
+ pending: number;
774
775
  pass: number;
775
776
  fail: number;
776
- pending: number;
777
777
  }, {
778
+ pending: number;
778
779
  pass: number;
779
780
  fail: number;
780
- pending: number;
781
781
  }>;
782
782
  auto: z.ZodObject<{
783
783
  pass: z.ZodNumber;
784
784
  fail: z.ZodNumber;
785
785
  pending: z.ZodNumber;
786
786
  }, "strip", z.ZodTypeAny, {
787
+ pending: number;
787
788
  pass: number;
788
789
  fail: number;
789
- pending: number;
790
790
  }, {
791
+ pending: number;
791
792
  pass: number;
792
793
  fail: number;
793
- pending: number;
794
794
  }>;
795
795
  analysis: z.ZodObject<{
796
796
  pass: z.ZodNumber;
797
797
  fail: z.ZodNumber;
798
798
  pending: z.ZodNumber;
799
799
  }, "strip", z.ZodTypeAny, {
800
+ pending: number;
800
801
  pass: number;
801
802
  fail: number;
802
- pending: number;
803
803
  }, {
804
+ pending: number;
804
805
  pass: number;
805
806
  fail: number;
806
- pending: number;
807
807
  }>;
808
808
  }, "strip", z.ZodTypeAny, {
809
809
  manual: {
810
+ pending: number;
810
811
  pass: number;
811
812
  fail: number;
812
- pending: number;
813
813
  };
814
814
  auto: {
815
+ pending: number;
815
816
  pass: number;
816
817
  fail: number;
817
- pending: number;
818
818
  };
819
819
  analysis: {
820
+ pending: number;
820
821
  pass: number;
821
822
  fail: number;
822
- pending: number;
823
823
  };
824
824
  }, {
825
825
  manual: {
826
+ pending: number;
826
827
  pass: number;
827
828
  fail: number;
828
- pending: number;
829
829
  };
830
830
  auto: {
831
+ pending: number;
831
832
  pass: number;
832
833
  fail: number;
833
- pending: number;
834
834
  };
835
835
  analysis: {
836
+ pending: number;
836
837
  pass: number;
837
838
  fail: number;
838
- pending: number;
839
839
  };
840
840
  }>;
841
841
  latency_p50_ms: z.ZodNullable<z.ZodNumber>;
@@ -853,19 +853,19 @@ declare const dashboard_response: z.ZodObject<{
853
853
  };
854
854
  verdict_counts: {
855
855
  manual: {
856
+ pending: number;
856
857
  pass: number;
857
858
  fail: number;
858
- pending: number;
859
859
  };
860
860
  auto: {
861
+ pending: number;
861
862
  pass: number;
862
863
  fail: number;
863
- pending: number;
864
864
  };
865
865
  analysis: {
866
+ pending: number;
866
867
  pass: number;
867
868
  fail: number;
868
- pending: number;
869
869
  };
870
870
  };
871
871
  latency_p50_ms: number | null;
@@ -883,19 +883,19 @@ declare const dashboard_response: z.ZodObject<{
883
883
  };
884
884
  verdict_counts: {
885
885
  manual: {
886
+ pending: number;
886
887
  pass: number;
887
888
  fail: number;
888
- pending: number;
889
889
  };
890
890
  auto: {
891
+ pending: number;
891
892
  pass: number;
892
893
  fail: number;
893
- pending: number;
894
894
  };
895
895
  analysis: {
896
+ pending: number;
896
897
  pass: number;
897
898
  fail: number;
898
- pending: number;
899
899
  };
900
900
  };
901
901
  latency_p50_ms: number | null;
@@ -1199,8 +1199,8 @@ declare const apply_op: z.ZodDiscriminatedUnion<"op", [z.ZodObject<{
1199
1199
  }, "strip", z.ZodTypeAny, {
1200
1200
  id?: string | null | undefined;
1201
1201
  kind?: "task" | "phase" | "approval" | undefined;
1202
- owner_id?: string | undefined;
1203
1202
  project_id?: string | null | undefined;
1203
+ owner_id?: string | undefined;
1204
1204
  description?: string | null | undefined;
1205
1205
  visibility?: "PUBLIC" | "PRIVATE" | "HIDDEN" | "ARCHIVED" | "DRAFT" | "DELETED" | undefined;
1206
1206
  title?: string | undefined;
@@ -1217,8 +1217,8 @@ declare const apply_op: z.ZodDiscriminatedUnion<"op", [z.ZodObject<{
1217
1217
  }, {
1218
1218
  id?: string | null | undefined;
1219
1219
  kind?: "task" | "phase" | "approval" | undefined;
1220
- owner_id?: string | undefined;
1221
1220
  project_id?: string | null | undefined;
1221
+ owner_id?: string | undefined;
1222
1222
  description?: string | null | undefined;
1223
1223
  visibility?: "PUBLIC" | "PRIVATE" | "HIDDEN" | "ARCHIVED" | "DRAFT" | "DELETED" | undefined;
1224
1224
  title?: string | undefined;
@@ -1238,8 +1238,8 @@ declare const apply_op: z.ZodDiscriminatedUnion<"op", [z.ZodObject<{
1238
1238
  data: {
1239
1239
  id?: string | null | undefined;
1240
1240
  kind?: "task" | "phase" | "approval" | undefined;
1241
- owner_id?: string | undefined;
1242
1241
  project_id?: string | null | undefined;
1242
+ owner_id?: string | undefined;
1243
1243
  description?: string | null | undefined;
1244
1244
  visibility?: "PUBLIC" | "PRIVATE" | "HIDDEN" | "ARCHIVED" | "DRAFT" | "DELETED" | undefined;
1245
1245
  title?: string | undefined;
@@ -1261,8 +1261,8 @@ declare const apply_op: z.ZodDiscriminatedUnion<"op", [z.ZodObject<{
1261
1261
  data: {
1262
1262
  id?: string | null | undefined;
1263
1263
  kind?: "task" | "phase" | "approval" | undefined;
1264
- owner_id?: string | undefined;
1265
1264
  project_id?: string | null | undefined;
1265
+ owner_id?: string | undefined;
1266
1266
  description?: string | null | undefined;
1267
1267
  visibility?: "PUBLIC" | "PRIVATE" | "HIDDEN" | "ARCHIVED" | "DRAFT" | "DELETED" | undefined;
1268
1268
  title?: string | undefined;
@@ -1480,14 +1480,14 @@ declare const apply_op: z.ZodDiscriminatedUnion<"op", [z.ZodObject<{
1480
1480
  base_rev: z.ZodNumber;
1481
1481
  }, "strip", z.ZodTypeAny, {
1482
1482
  id: string;
1483
+ actor: string;
1483
1484
  op: "claim";
1484
1485
  base_rev: number;
1485
- actor: string;
1486
1486
  }, {
1487
1487
  id: string;
1488
+ actor: string;
1488
1489
  op: "claim";
1489
1490
  base_rev: number;
1490
- actor: string;
1491
1491
  }>, z.ZodObject<{
1492
1492
  op: z.ZodLiteral<"complete">;
1493
1493
  id: z.ZodString;
@@ -1632,8 +1632,8 @@ declare const apply_request: z.ZodObject<{
1632
1632
  }, "strip", z.ZodTypeAny, {
1633
1633
  id?: string | null | undefined;
1634
1634
  kind?: "task" | "phase" | "approval" | undefined;
1635
- owner_id?: string | undefined;
1636
1635
  project_id?: string | null | undefined;
1636
+ owner_id?: string | undefined;
1637
1637
  description?: string | null | undefined;
1638
1638
  visibility?: "PUBLIC" | "PRIVATE" | "HIDDEN" | "ARCHIVED" | "DRAFT" | "DELETED" | undefined;
1639
1639
  title?: string | undefined;
@@ -1650,8 +1650,8 @@ declare const apply_request: z.ZodObject<{
1650
1650
  }, {
1651
1651
  id?: string | null | undefined;
1652
1652
  kind?: "task" | "phase" | "approval" | undefined;
1653
- owner_id?: string | undefined;
1654
1653
  project_id?: string | null | undefined;
1654
+ owner_id?: string | undefined;
1655
1655
  description?: string | null | undefined;
1656
1656
  visibility?: "PUBLIC" | "PRIVATE" | "HIDDEN" | "ARCHIVED" | "DRAFT" | "DELETED" | undefined;
1657
1657
  title?: string | undefined;
@@ -1671,8 +1671,8 @@ declare const apply_request: z.ZodObject<{
1671
1671
  data: {
1672
1672
  id?: string | null | undefined;
1673
1673
  kind?: "task" | "phase" | "approval" | undefined;
1674
- owner_id?: string | undefined;
1675
1674
  project_id?: string | null | undefined;
1675
+ owner_id?: string | undefined;
1676
1676
  description?: string | null | undefined;
1677
1677
  visibility?: "PUBLIC" | "PRIVATE" | "HIDDEN" | "ARCHIVED" | "DRAFT" | "DELETED" | undefined;
1678
1678
  title?: string | undefined;
@@ -1694,8 +1694,8 @@ declare const apply_request: z.ZodObject<{
1694
1694
  data: {
1695
1695
  id?: string | null | undefined;
1696
1696
  kind?: "task" | "phase" | "approval" | undefined;
1697
- owner_id?: string | undefined;
1698
1697
  project_id?: string | null | undefined;
1698
+ owner_id?: string | undefined;
1699
1699
  description?: string | null | undefined;
1700
1700
  visibility?: "PUBLIC" | "PRIVATE" | "HIDDEN" | "ARCHIVED" | "DRAFT" | "DELETED" | undefined;
1701
1701
  title?: string | undefined;
@@ -1913,14 +1913,14 @@ declare const apply_request: z.ZodObject<{
1913
1913
  base_rev: z.ZodNumber;
1914
1914
  }, "strip", z.ZodTypeAny, {
1915
1915
  id: string;
1916
+ actor: string;
1916
1917
  op: "claim";
1917
1918
  base_rev: number;
1918
- actor: string;
1919
1919
  }, {
1920
1920
  id: string;
1921
+ actor: string;
1921
1922
  op: "claim";
1922
1923
  base_rev: number;
1923
- actor: string;
1924
1924
  }>, z.ZodObject<{
1925
1925
  op: z.ZodLiteral<"complete">;
1926
1926
  id: z.ZodString;
@@ -1963,8 +1963,8 @@ declare const apply_request: z.ZodObject<{
1963
1963
  data: {
1964
1964
  id?: string | null | undefined;
1965
1965
  kind?: "task" | "phase" | "approval" | undefined;
1966
- owner_id?: string | undefined;
1967
1966
  project_id?: string | null | undefined;
1967
+ owner_id?: string | undefined;
1968
1968
  description?: string | null | undefined;
1969
1969
  visibility?: "PUBLIC" | "PRIVATE" | "HIDDEN" | "ARCHIVED" | "DRAFT" | "DELETED" | undefined;
1970
1970
  title?: string | undefined;
@@ -2019,9 +2019,9 @@ declare const apply_request: z.ZodObject<{
2019
2019
  op: "unlink";
2020
2020
  } | {
2021
2021
  id: string;
2022
+ actor: string;
2022
2023
  op: "claim";
2023
2024
  base_rev: number;
2024
- actor: string;
2025
2025
  } | {
2026
2026
  id: string;
2027
2027
  op: "complete";
@@ -2057,8 +2057,8 @@ declare const apply_request: z.ZodObject<{
2057
2057
  data: {
2058
2058
  id?: string | null | undefined;
2059
2059
  kind?: "task" | "phase" | "approval" | undefined;
2060
- owner_id?: string | undefined;
2061
2060
  project_id?: string | null | undefined;
2061
+ owner_id?: string | undefined;
2062
2062
  description?: string | null | undefined;
2063
2063
  visibility?: "PUBLIC" | "PRIVATE" | "HIDDEN" | "ARCHIVED" | "DRAFT" | "DELETED" | undefined;
2064
2064
  title?: string | undefined;
@@ -2113,9 +2113,9 @@ declare const apply_request: z.ZodObject<{
2113
2113
  op: "unlink";
2114
2114
  } | {
2115
2115
  id: string;
2116
+ actor: string;
2116
2117
  op: "claim";
2117
2118
  base_rev: number;
2118
- actor: string;
2119
2119
  } | {
2120
2120
  id: string;
2121
2121
  op: "complete";
@@ -2128,13 +2128,402 @@ declare const claim_request: z.ZodObject<{
2128
2128
  actor: z.ZodString;
2129
2129
  base_rev: z.ZodNumber;
2130
2130
  }, "strip", z.ZodTypeAny, {
2131
+ actor: string;
2131
2132
  base_rev: number;
2133
+ }, {
2132
2134
  actor: string;
2135
+ base_rev: number;
2136
+ }>;
2137
+ type ClaimRequest = z.infer<typeof claim_request>;
2138
+ declare const done_request: z.ZodObject<{
2139
+ base_rev: z.ZodNumber;
2140
+ }, "strip", z.ZodTypeAny, {
2141
+ base_rev: number;
2133
2142
  }, {
2134
2143
  base_rev: number;
2144
+ }>;
2145
+ type DoneRequest = z.infer<typeof done_request>;
2146
+ declare const task_event_actor: z.ZodEnum<["user", "api", "policy", "github"]>;
2147
+ declare const task_event_payload: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
2148
+ kind: z.ZodLiteral<"task.created">;
2149
+ title: z.ZodString;
2150
+ }, "strip", z.ZodTypeAny, {
2151
+ kind: "task.created";
2152
+ title: string;
2153
+ }, {
2154
+ kind: "task.created";
2155
+ title: string;
2156
+ }>, z.ZodObject<{
2157
+ kind: z.ZodLiteral<"task.updated">;
2158
+ fields: z.ZodArray<z.ZodString, "many">;
2159
+ }, "strip", z.ZodTypeAny, {
2160
+ kind: "task.updated";
2161
+ fields: string[];
2162
+ }, {
2163
+ kind: "task.updated";
2164
+ fields: string[];
2165
+ }>, z.ZodObject<{
2166
+ kind: z.ZodLiteral<"task.completed">;
2167
+ via: z.ZodEnum<["user", "api", "policy"]>;
2168
+ }, "strip", z.ZodTypeAny, {
2169
+ kind: "task.completed";
2170
+ via: "user" | "api" | "policy";
2171
+ }, {
2172
+ kind: "task.completed";
2173
+ via: "user" | "api" | "policy";
2174
+ }>, z.ZodObject<{
2175
+ kind: z.ZodLiteral<"task.reopened">;
2176
+ via: z.ZodEnum<["user", "api", "policy"]>;
2177
+ }, "strip", z.ZodTypeAny, {
2178
+ kind: "task.reopened";
2179
+ via: "user" | "api" | "policy";
2180
+ }, {
2181
+ kind: "task.reopened";
2182
+ via: "user" | "api" | "policy";
2183
+ }>, z.ZodObject<{
2184
+ kind: z.ZodLiteral<"task.claimed">;
2185
+ actor: z.ZodString;
2186
+ }, "strip", z.ZodTypeAny, {
2187
+ kind: "task.claimed";
2188
+ actor: string;
2189
+ }, {
2190
+ kind: "task.claimed";
2135
2191
  actor: string;
2192
+ }>, z.ZodObject<{
2193
+ kind: z.ZodLiteral<"edge.created">;
2194
+ link_kind: z.ZodEnum<["blocks", "relates_to", "references", "discovered_from", "tracks_metric"]>;
2195
+ dst_id: z.ZodNullable<z.ZodString>;
2196
+ }, "strip", z.ZodTypeAny, {
2197
+ kind: "edge.created";
2198
+ dst_id: string | null;
2199
+ link_kind: "blocks" | "relates_to" | "references" | "discovered_from" | "tracks_metric";
2200
+ }, {
2201
+ kind: "edge.created";
2202
+ dst_id: string | null;
2203
+ link_kind: "blocks" | "relates_to" | "references" | "discovered_from" | "tracks_metric";
2204
+ }>, z.ZodObject<{
2205
+ kind: z.ZodLiteral<"edge.removed">;
2206
+ link_kind: z.ZodEnum<["blocks", "relates_to", "references", "discovered_from", "tracks_metric"]>;
2207
+ dst_id: z.ZodNullable<z.ZodString>;
2208
+ }, "strip", z.ZodTypeAny, {
2209
+ kind: "edge.removed";
2210
+ dst_id: string | null;
2211
+ link_kind: "blocks" | "relates_to" | "references" | "discovered_from" | "tracks_metric";
2212
+ }, {
2213
+ kind: "edge.removed";
2214
+ dst_id: string | null;
2215
+ link_kind: "blocks" | "relates_to" | "references" | "discovered_from" | "tracks_metric";
2216
+ }>, z.ZodObject<{
2217
+ kind: z.ZodLiteral<"node.children_all_done">;
2218
+ }, "strip", z.ZodTypeAny, {
2219
+ kind: "node.children_all_done";
2220
+ }, {
2221
+ kind: "node.children_all_done";
2222
+ }>, z.ZodObject<{
2223
+ kind: z.ZodLiteral<"policy.fired">;
2224
+ policy: z.ZodEnum<["manual", "auto_children"]>;
2225
+ }, "strip", z.ZodTypeAny, {
2226
+ kind: "policy.fired";
2227
+ policy: "manual" | "auto_children";
2228
+ }, {
2229
+ kind: "policy.fired";
2230
+ policy: "manual" | "auto_children";
2231
+ }>, z.ZodObject<{
2232
+ kind: z.ZodLiteral<"node.completion_stale">;
2233
+ child_id: z.ZodString;
2234
+ }, "strip", z.ZodTypeAny, {
2235
+ kind: "node.completion_stale";
2236
+ child_id: string;
2237
+ }, {
2238
+ kind: "node.completion_stale";
2239
+ child_id: string;
2240
+ }>]>;
2241
+ type TaskEventPayload = z.infer<typeof task_event_payload>;
2242
+ declare const hook_selector: z.ZodObject<{
2243
+ subject_kind: z.ZodOptional<z.ZodEnum<["task", "phase", "approval"]>>;
2244
+ tag: z.ZodOptional<z.ZodString>;
2245
+ ancestor_id: z.ZodOptional<z.ZodString>;
2246
+ }, "strip", z.ZodTypeAny, {
2247
+ tag?: string | undefined;
2248
+ subject_kind?: "task" | "phase" | "approval" | undefined;
2249
+ ancestor_id?: string | undefined;
2250
+ }, {
2251
+ tag?: string | undefined;
2252
+ subject_kind?: "task" | "phase" | "approval" | undefined;
2253
+ ancestor_id?: string | undefined;
2136
2254
  }>;
2137
- type ClaimRequest = z.infer<typeof claim_request>;
2255
+ type HookSelector = z.infer<typeof hook_selector>;
2256
+ declare const hook_trigger: z.ZodObject<{
2257
+ kinds: z.ZodArray<z.ZodEnum<["task.created", "task.updated", "task.completed", "task.reopened", "task.claimed", "edge.created", "edge.removed", "node.children_all_done", "policy.fired", "node.completion_stale"]>, "many">;
2258
+ selector: z.ZodDefault<z.ZodObject<{
2259
+ subject_kind: z.ZodOptional<z.ZodEnum<["task", "phase", "approval"]>>;
2260
+ tag: z.ZodOptional<z.ZodString>;
2261
+ ancestor_id: z.ZodOptional<z.ZodString>;
2262
+ }, "strip", z.ZodTypeAny, {
2263
+ tag?: string | undefined;
2264
+ subject_kind?: "task" | "phase" | "approval" | undefined;
2265
+ ancestor_id?: string | undefined;
2266
+ }, {
2267
+ tag?: string | undefined;
2268
+ subject_kind?: "task" | "phase" | "approval" | undefined;
2269
+ ancestor_id?: string | undefined;
2270
+ }>>;
2271
+ }, "strip", z.ZodTypeAny, {
2272
+ kinds: ("task.created" | "task.updated" | "task.completed" | "task.reopened" | "task.claimed" | "edge.created" | "edge.removed" | "node.children_all_done" | "policy.fired" | "node.completion_stale")[];
2273
+ selector: {
2274
+ tag?: string | undefined;
2275
+ subject_kind?: "task" | "phase" | "approval" | undefined;
2276
+ ancestor_id?: string | undefined;
2277
+ };
2278
+ }, {
2279
+ kinds: ("task.created" | "task.updated" | "task.completed" | "task.reopened" | "task.claimed" | "edge.created" | "edge.removed" | "node.children_all_done" | "policy.fired" | "node.completion_stale")[];
2280
+ selector?: {
2281
+ tag?: string | undefined;
2282
+ subject_kind?: "task" | "phase" | "approval" | undefined;
2283
+ ancestor_id?: string | undefined;
2284
+ } | undefined;
2285
+ }>;
2286
+ type HookTrigger = z.infer<typeof hook_trigger>;
2287
+ /** Write-side action union — callers submit a plaintext `secret`, never `secret_encrypted`. */
2288
+ declare const hook_action_input: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
2289
+ kind: z.ZodLiteral<"webhook">;
2290
+ url: z.ZodString;
2291
+ secret: z.ZodOptional<z.ZodString>;
2292
+ }, "strip", z.ZodTypeAny, {
2293
+ kind: "webhook";
2294
+ url: string;
2295
+ secret?: string | undefined;
2296
+ }, {
2297
+ kind: "webhook";
2298
+ url: string;
2299
+ secret?: string | undefined;
2300
+ }>, z.ZodObject<{
2301
+ kind: z.ZodLiteral<"vault">;
2302
+ scope: z.ZodString;
2303
+ op: z.ZodString;
2304
+ args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2305
+ }, "strip", z.ZodTypeAny, {
2306
+ kind: "vault";
2307
+ scope: string;
2308
+ op: string;
2309
+ args?: Record<string, unknown> | undefined;
2310
+ }, {
2311
+ kind: "vault";
2312
+ scope: string;
2313
+ op: string;
2314
+ args?: Record<string, unknown> | undefined;
2315
+ }>, z.ZodObject<{
2316
+ kind: z.ZodLiteral<"pipeline">;
2317
+ package_id: z.ZodString;
2318
+ }, "strip", z.ZodTypeAny, {
2319
+ kind: "pipeline";
2320
+ package_id: string;
2321
+ }, {
2322
+ kind: "pipeline";
2323
+ package_id: string;
2324
+ }>]>;
2325
+ type HookActionInput = z.infer<typeof hook_action_input>;
2326
+ /** Storage/dispatch-side action union — what's actually persisted in `hook.action`. */
2327
+ declare const hook_action_stored: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
2328
+ kind: z.ZodLiteral<"webhook">;
2329
+ url: z.ZodString;
2330
+ secret_encrypted: z.ZodOptional<z.ZodString>;
2331
+ }, "strip", z.ZodTypeAny, {
2332
+ kind: "webhook";
2333
+ url: string;
2334
+ secret_encrypted?: string | undefined;
2335
+ }, {
2336
+ kind: "webhook";
2337
+ url: string;
2338
+ secret_encrypted?: string | undefined;
2339
+ }>, z.ZodObject<{
2340
+ kind: z.ZodLiteral<"vault">;
2341
+ scope: z.ZodString;
2342
+ op: z.ZodString;
2343
+ args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2344
+ }, "strip", z.ZodTypeAny, {
2345
+ kind: "vault";
2346
+ scope: string;
2347
+ op: string;
2348
+ args?: Record<string, unknown> | undefined;
2349
+ }, {
2350
+ kind: "vault";
2351
+ scope: string;
2352
+ op: string;
2353
+ args?: Record<string, unknown> | undefined;
2354
+ }>, z.ZodObject<{
2355
+ kind: z.ZodLiteral<"pipeline">;
2356
+ package_id: z.ZodString;
2357
+ }, "strip", z.ZodTypeAny, {
2358
+ kind: "pipeline";
2359
+ package_id: string;
2360
+ }, {
2361
+ kind: "pipeline";
2362
+ package_id: string;
2363
+ }>]>;
2364
+ type HookActionStored = z.infer<typeof hook_action_stored>;
2365
+ /** Read-side action union — what routes return. `secret_encrypted` never leaves the registry. */
2366
+ declare const hook_action_public: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
2367
+ kind: z.ZodLiteral<"webhook">;
2368
+ url: z.ZodString;
2369
+ has_secret: z.ZodBoolean;
2370
+ }, "strip", z.ZodTypeAny, {
2371
+ kind: "webhook";
2372
+ url: string;
2373
+ has_secret: boolean;
2374
+ }, {
2375
+ kind: "webhook";
2376
+ url: string;
2377
+ has_secret: boolean;
2378
+ }>, z.ZodObject<{
2379
+ kind: z.ZodLiteral<"vault">;
2380
+ scope: z.ZodString;
2381
+ op: z.ZodString;
2382
+ args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2383
+ }, "strip", z.ZodTypeAny, {
2384
+ kind: "vault";
2385
+ scope: string;
2386
+ op: string;
2387
+ args?: Record<string, unknown> | undefined;
2388
+ }, {
2389
+ kind: "vault";
2390
+ scope: string;
2391
+ op: string;
2392
+ args?: Record<string, unknown> | undefined;
2393
+ }>, z.ZodObject<{
2394
+ kind: z.ZodLiteral<"pipeline">;
2395
+ package_id: z.ZodString;
2396
+ }, "strip", z.ZodTypeAny, {
2397
+ kind: "pipeline";
2398
+ package_id: string;
2399
+ }, {
2400
+ kind: "pipeline";
2401
+ package_id: string;
2402
+ }>]>;
2403
+ type HookActionPublic = z.infer<typeof hook_action_public>;
2404
+ declare const upsert_hook: z.ZodObject<{
2405
+ id: z.ZodOptional<z.ZodString>;
2406
+ project_id: z.ZodString;
2407
+ enabled: z.ZodDefault<z.ZodBoolean>;
2408
+ trigger: z.ZodObject<{
2409
+ kinds: z.ZodArray<z.ZodEnum<["task.created", "task.updated", "task.completed", "task.reopened", "task.claimed", "edge.created", "edge.removed", "node.children_all_done", "policy.fired", "node.completion_stale"]>, "many">;
2410
+ selector: z.ZodDefault<z.ZodObject<{
2411
+ subject_kind: z.ZodOptional<z.ZodEnum<["task", "phase", "approval"]>>;
2412
+ tag: z.ZodOptional<z.ZodString>;
2413
+ ancestor_id: z.ZodOptional<z.ZodString>;
2414
+ }, "strip", z.ZodTypeAny, {
2415
+ tag?: string | undefined;
2416
+ subject_kind?: "task" | "phase" | "approval" | undefined;
2417
+ ancestor_id?: string | undefined;
2418
+ }, {
2419
+ tag?: string | undefined;
2420
+ subject_kind?: "task" | "phase" | "approval" | undefined;
2421
+ ancestor_id?: string | undefined;
2422
+ }>>;
2423
+ }, "strip", z.ZodTypeAny, {
2424
+ kinds: ("task.created" | "task.updated" | "task.completed" | "task.reopened" | "task.claimed" | "edge.created" | "edge.removed" | "node.children_all_done" | "policy.fired" | "node.completion_stale")[];
2425
+ selector: {
2426
+ tag?: string | undefined;
2427
+ subject_kind?: "task" | "phase" | "approval" | undefined;
2428
+ ancestor_id?: string | undefined;
2429
+ };
2430
+ }, {
2431
+ kinds: ("task.created" | "task.updated" | "task.completed" | "task.reopened" | "task.claimed" | "edge.created" | "edge.removed" | "node.children_all_done" | "policy.fired" | "node.completion_stale")[];
2432
+ selector?: {
2433
+ tag?: string | undefined;
2434
+ subject_kind?: "task" | "phase" | "approval" | undefined;
2435
+ ancestor_id?: string | undefined;
2436
+ } | undefined;
2437
+ }>;
2438
+ action: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
2439
+ kind: z.ZodLiteral<"webhook">;
2440
+ url: z.ZodString;
2441
+ secret: z.ZodOptional<z.ZodString>;
2442
+ }, "strip", z.ZodTypeAny, {
2443
+ kind: "webhook";
2444
+ url: string;
2445
+ secret?: string | undefined;
2446
+ }, {
2447
+ kind: "webhook";
2448
+ url: string;
2449
+ secret?: string | undefined;
2450
+ }>, z.ZodObject<{
2451
+ kind: z.ZodLiteral<"vault">;
2452
+ scope: z.ZodString;
2453
+ op: z.ZodString;
2454
+ args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2455
+ }, "strip", z.ZodTypeAny, {
2456
+ kind: "vault";
2457
+ scope: string;
2458
+ op: string;
2459
+ args?: Record<string, unknown> | undefined;
2460
+ }, {
2461
+ kind: "vault";
2462
+ scope: string;
2463
+ op: string;
2464
+ args?: Record<string, unknown> | undefined;
2465
+ }>, z.ZodObject<{
2466
+ kind: z.ZodLiteral<"pipeline">;
2467
+ package_id: z.ZodString;
2468
+ }, "strip", z.ZodTypeAny, {
2469
+ kind: "pipeline";
2470
+ package_id: string;
2471
+ }, {
2472
+ kind: "pipeline";
2473
+ package_id: string;
2474
+ }>]>;
2475
+ }, "strip", z.ZodTypeAny, {
2476
+ project_id: string;
2477
+ enabled: boolean;
2478
+ action: {
2479
+ kind: "webhook";
2480
+ url: string;
2481
+ secret?: string | undefined;
2482
+ } | {
2483
+ kind: "vault";
2484
+ scope: string;
2485
+ op: string;
2486
+ args?: Record<string, unknown> | undefined;
2487
+ } | {
2488
+ kind: "pipeline";
2489
+ package_id: string;
2490
+ };
2491
+ trigger: {
2492
+ kinds: ("task.created" | "task.updated" | "task.completed" | "task.reopened" | "task.claimed" | "edge.created" | "edge.removed" | "node.children_all_done" | "policy.fired" | "node.completion_stale")[];
2493
+ selector: {
2494
+ tag?: string | undefined;
2495
+ subject_kind?: "task" | "phase" | "approval" | undefined;
2496
+ ancestor_id?: string | undefined;
2497
+ };
2498
+ };
2499
+ id?: string | undefined;
2500
+ }, {
2501
+ project_id: string;
2502
+ action: {
2503
+ kind: "webhook";
2504
+ url: string;
2505
+ secret?: string | undefined;
2506
+ } | {
2507
+ kind: "vault";
2508
+ scope: string;
2509
+ op: string;
2510
+ args?: Record<string, unknown> | undefined;
2511
+ } | {
2512
+ kind: "pipeline";
2513
+ package_id: string;
2514
+ };
2515
+ trigger: {
2516
+ kinds: ("task.created" | "task.updated" | "task.completed" | "task.reopened" | "task.claimed" | "edge.created" | "edge.removed" | "node.children_all_done" | "policy.fired" | "node.completion_stale")[];
2517
+ selector?: {
2518
+ tag?: string | undefined;
2519
+ subject_kind?: "task" | "phase" | "approval" | undefined;
2520
+ ancestor_id?: string | undefined;
2521
+ } | undefined;
2522
+ };
2523
+ id?: string | undefined;
2524
+ enabled?: boolean | undefined;
2525
+ }>;
2526
+ type UpsertHook = z.infer<typeof upsert_hook>;
2138
2527
 
2139
2528
  type User = InferSelectModel<typeof user>;
2140
2529
  type Session = InferSelectModel<typeof session>;
@@ -2154,6 +2543,10 @@ type IgnorePath = InferSelectModel<typeof ignore_path>;
2154
2543
  type TaskLink = InferSelectModel<typeof task_link>;
2155
2544
  type TaskRollup = InferSelectModel<typeof task_rollup>;
2156
2545
  type ApplyLog = InferSelectModel<typeof apply_log>;
2546
+ type TaskEvent = InferSelectModel<typeof task_event>;
2547
+ type Hook = InferSelectModel<typeof hook>;
2548
+ type HookDelivery = InferSelectModel<typeof hook_delivery>;
2549
+ type GithubWebhookEvent = InferSelectModel<typeof github_webhook_event>;
2157
2550
  type PipelinePackage = InferSelectModel<typeof pipeline_package>;
2158
2551
  type PipelineRun = InferSelectModel<typeof pipeline_run>;
2159
2552
  type PipelineStageEvent = InferSelectModel<typeof pipeline_stage_event>;
@@ -2290,4 +2683,4 @@ type UpdateData = {
2290
2683
  type UpdateUser = z.infer<typeof update_user>;
2291
2684
  type ConfigSchemaType = z.infer<typeof config_schema>;
2292
2685
 
2293
- export { type UpsertPipelineApproval as $, type Action as A, type Task as B, type ClaimRequest as C, type DashboardResponse as D, type ExternalRef as E, type TaskLink as F, type GetConfigResult as G, type HistoryAction as H, type IgnorePath as I, type TaskRollup as J, type TaskTag as K, type TaskView as L, type Milestone as M, type Nullable as N, type TaskWithDetails as O, type PipelineAnalysisTemplate as P, type TodoUpdate as Q, type RolloutShapeZ as R, type SaveConfigRequest as S, TAG_COLOURS as T, type TrackerResult as U, type UpdateAction as V, type UpdateData as W, type UpdateUser as X, type UpsertGoal as Y, type UpsertMilestone as Z, type UpsertPipelineAnalysisTemplate as _, type ApiKey as a, type UpsertPipelineGrant as a0, type UpsertPipelineOidcTrust as a1, type UpsertPipelinePackage as a2, type UpsertPipelineRun as a3, type UpsertProject as a4, type UpsertTag as a5, type UpsertTaskLink as a6, type UpsertTodo as a7, type User as a8, type WebhookEventBody as a9, upsert_goal as aA, upsert_milestone as aB, upsert_pipeline_analysis_template as aC, upsert_pipeline_approval as aD, upsert_pipeline_grant as aE, upsert_pipeline_oidc_trust as aF, upsert_pipeline_package as aG, upsert_pipeline_run as aH, upsert_project as aI, upsert_tag as aJ, upsert_task_link as aK, upsert_todo as aL, webhook_event_body as aM, apply_op as aa, apply_request as ab, approval_decision as ac, claim_request as ad, config_schema as ae, dashboard_response as af, dashboard_window_query as ag, external_ref as ah, forced_atomic_reason as ai, gate_descriptor as aj, grant_scope as ak, insert_pipeline_stage_event as al, pipeline_oidc_provider as am, project_config as an, resolved_gates as ao, resolved_rollout as ap, rollout_shape as aq, rollout_stage as ar, run_kind as as, run_status as at, save_config_request as au, save_tags_request as av, stage_event_kind as aw, task_link_kind as ax, update_action as ay, update_user as az, type ApplyLog as b, type ApplyOp as c, type ApplyRequest as d, type CodebaseTask as e, type ConfigSchemaType as f, type DashboardWindowQuery as g, type Goal as h, type InsertPipelineStageEvent as i, type PipelineApproval as j, type PipelineGrant as k, type PipelineOidcTrust as l, type PipelinePackage as m, type PipelineRun as n, type PipelineStageEvent as o, type Project as p, type ProjectConfig as q, type ProjectWithTasks as r, type RunKindZ as s, type ScanStatus as t, type Session as u, type Tag as v, type TagColor as w, type TagConfig as x, type TagWithColor as y, type TagWithTypedColor as z };
2686
+ export { type TaskTag as $, type Action as A, type ProjectWithTasks as B, type ClaimRequest as C, type DashboardResponse as D, type ExternalRef as E, type RunKindZ as F, type GetConfigResult as G, type HistoryAction as H, type IgnorePath as I, type ScanStatus as J, type Session as K, type Tag as L, type Milestone as M, type Nullable as N, type TagColor as O, type PipelineAnalysisTemplate as P, type TagConfig as Q, type RolloutShapeZ as R, type SaveConfigRequest as S, TAG_COLOURS as T, type TagWithColor as U, type TagWithTypedColor as V, type Task as W, type TaskEvent as X, type TaskEventPayload as Y, type TaskLink as Z, type TaskRollup as _, type ApiKey as a, upsert_pipeline_package as a$, type TaskView as a0, type TaskWithDetails as a1, type TodoUpdate as a2, type TrackerResult as a3, type UpdateAction as a4, type UpdateData as a5, type UpdateUser as a6, type UpsertGoal as a7, type UpsertHook as a8, type UpsertMilestone as a9, hook_action_stored as aA, hook_selector as aB, hook_trigger as aC, insert_pipeline_stage_event as aD, pipeline_oidc_provider as aE, project_config as aF, resolved_gates as aG, resolved_rollout as aH, rollout_shape as aI, rollout_stage as aJ, run_kind as aK, run_status as aL, save_config_request as aM, save_tags_request as aN, stage_event_kind as aO, task_event_actor as aP, task_event_payload as aQ, task_link_kind as aR, update_action as aS, update_user as aT, upsert_goal as aU, upsert_hook as aV, upsert_milestone as aW, upsert_pipeline_analysis_template as aX, upsert_pipeline_approval as aY, upsert_pipeline_grant as aZ, upsert_pipeline_oidc_trust as a_, type UpsertPipelineAnalysisTemplate as aa, type UpsertPipelineApproval as ab, type UpsertPipelineGrant as ac, type UpsertPipelineOidcTrust as ad, type UpsertPipelinePackage as ae, type UpsertPipelineRun as af, type UpsertProject as ag, type UpsertTag as ah, type UpsertTaskLink as ai, type UpsertTodo as aj, type User as ak, type WebhookEventBody as al, apply_op as am, apply_request as an, approval_decision as ao, claim_request as ap, config_schema as aq, dashboard_response as ar, dashboard_window_query as as, done_request as at, external_ref as au, forced_atomic_reason as av, gate_descriptor as aw, grant_scope as ax, hook_action_input as ay, hook_action_public as az, type ApplyLog as b, upsert_pipeline_run as b0, upsert_project as b1, upsert_tag as b2, upsert_task_link as b3, upsert_todo as b4, webhook_event_body as b5, type ApplyOp as c, type ApplyRequest as d, type CodebaseTask as e, type ConfigSchemaType as f, type DashboardWindowQuery as g, type DoneRequest as h, type GithubWebhookEvent as i, type Goal as j, type Hook as k, type HookActionInput as l, type HookActionPublic as m, type HookActionStored as n, type HookDelivery as o, type HookSelector as p, type HookTrigger as q, type InsertPipelineStageEvent as r, type PipelineApproval as s, type PipelineGrant as t, type PipelineOidcTrust as u, type PipelinePackage as v, type PipelineRun as w, type PipelineStageEvent as x, type Project as y, type ProjectConfig as z };