@ligeti/step-beads 0.0.0-stage → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +190 -2
  3. package/dist/add-dependency.d.ts +25 -0
  4. package/dist/add-dependency.d.ts.map +1 -0
  5. package/dist/add-dependency.js +52 -0
  6. package/dist/add-dependency.js.map +1 -0
  7. package/dist/bd.d.ts +4 -0
  8. package/dist/bd.d.ts.map +1 -0
  9. package/dist/bd.js +146 -0
  10. package/dist/bd.js.map +1 -0
  11. package/dist/close.d.ts +44 -0
  12. package/dist/close.d.ts.map +1 -0
  13. package/dist/close.js +39 -0
  14. package/dist/close.js.map +1 -0
  15. package/dist/comment.d.ts +33 -0
  16. package/dist/comment.d.ts.map +1 -0
  17. package/dist/comment.js +33 -0
  18. package/dist/comment.js.map +1 -0
  19. package/dist/create.d.ts +88 -0
  20. package/dist/create.d.ts.map +1 -0
  21. package/dist/create.js +93 -0
  22. package/dist/create.js.map +1 -0
  23. package/dist/environment.d.ts +17 -0
  24. package/dist/environment.d.ts.map +1 -0
  25. package/dist/environment.js +28 -0
  26. package/dist/environment.js.map +1 -0
  27. package/dist/index.d.ts +12 -0
  28. package/dist/index.d.ts.map +1 -0
  29. package/dist/index.js +14 -0
  30. package/dist/index.js.map +1 -0
  31. package/dist/list-human.d.ts +40 -0
  32. package/dist/list-human.d.ts.map +1 -0
  33. package/dist/list-human.js +35 -0
  34. package/dist/list-human.js.map +1 -0
  35. package/dist/list.d.ts +55 -0
  36. package/dist/list.d.ts.map +1 -0
  37. package/dist/list.js +77 -0
  38. package/dist/list.js.map +1 -0
  39. package/dist/remove-label.d.ts +42 -0
  40. package/dist/remove-label.d.ts.map +1 -0
  41. package/dist/remove-label.js +32 -0
  42. package/dist/remove-label.js.map +1 -0
  43. package/dist/settings.d.ts +13 -0
  44. package/dist/settings.d.ts.map +1 -0
  45. package/dist/settings.js +21 -0
  46. package/dist/settings.js.map +1 -0
  47. package/dist/show.d.ts +69 -0
  48. package/dist/show.d.ts.map +1 -0
  49. package/dist/show.js +35 -0
  50. package/dist/show.js.map +1 -0
  51. package/dist/types.d.ts +80 -0
  52. package/dist/types.d.ts.map +1 -0
  53. package/dist/types.js +116 -0
  54. package/dist/types.js.map +1 -0
  55. package/dist/update.d.ts +89 -0
  56. package/dist/update.d.ts.map +1 -0
  57. package/dist/update.js +56 -0
  58. package/dist/update.js.map +1 -0
  59. package/package.json +26 -3
package/dist/bd.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bd.js","sourceRoot":"","sources":["../src/bd.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,2FAA2F;AAC3F,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAa,SAAS,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AAE1C,MAAM,UAAU,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAEpC,MAAM,eAAe,GAAG,CAAC,YAAY,EAAE,qBAAqB,CAAU,CAAC;AAEvE,MAAM,kBAAkB,GAAG;IACzB,qBAAqB;IACrB,mBAAmB;IACnB,qBAAqB;IACrB,cAAc;IACd,qBAAqB;CACb,CAAC;AAEX,SAAS,QAAQ;IACf,MAAM,GAAG,GAAsB,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAClD,MAAM,KAAK,GAAsB,CAAC,GAAG,eAAe,EAAE,GAAG,kBAAkB,CAAC,CAAC;IAC7E,MAAM,GAAG,GAAsB,EAAE,CAAC;IAClC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC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EAAE,CAAC,CAAC;IAC/E,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,OAAO,CAC3B,QAAgB,EAChB,IAAc,EACd,MAAoB;IAEpB,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,QAAQ,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IACrD,IAAI,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC9C,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,oCAAoC,CAAC,CAAC;IAC3E,CAAC;IACD,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;AAChD,CAAC"}
@@ -0,0 +1,44 @@
1
+ import { z } from "@ligeti/sdk";
2
+ export declare const BeadsCloseInput: z.ZodObject<{
3
+ repoPath: z.ZodString;
4
+ ids: z.ZodArray<z.ZodString>;
5
+ reason: z.ZodOptional<z.ZodString>;
6
+ actor: z.ZodOptional<z.ZodString>;
7
+ force: z.ZodDefault<z.ZodBoolean>;
8
+ }, z.core.$strip>;
9
+ export type BeadsCloseInput = z.infer<typeof BeadsCloseInput>;
10
+ export declare const beadsClose: import("@ligeti/sdk").StepDefinition<z.ZodObject<{
11
+ repoPath: z.ZodString;
12
+ ids: z.ZodArray<z.ZodString>;
13
+ reason: z.ZodOptional<z.ZodString>;
14
+ actor: z.ZodOptional<z.ZodString>;
15
+ force: z.ZodDefault<z.ZodBoolean>;
16
+ }, z.core.$strip>, z.ZodObject<{
17
+ beads: z.ZodArray<z.ZodObject<{
18
+ id: z.ZodString;
19
+ title: z.ZodString;
20
+ status: z.ZodString;
21
+ priority: z.ZodNumber;
22
+ issueType: z.ZodString;
23
+ createdAt: z.ZodString;
24
+ description: z.ZodOptional<z.ZodString>;
25
+ acceptanceCriteria: z.ZodOptional<z.ZodString>;
26
+ owner: z.ZodOptional<z.ZodString>;
27
+ assignee: z.ZodOptional<z.ZodString>;
28
+ createdBy: z.ZodOptional<z.ZodString>;
29
+ updatedAt: z.ZodOptional<z.ZodString>;
30
+ closedAt: z.ZodOptional<z.ZodString>;
31
+ closeReason: z.ZodOptional<z.ZodString>;
32
+ externalRef: z.ZodOptional<z.ZodString>;
33
+ sourceSystem: z.ZodOptional<z.ZodString>;
34
+ labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
35
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
36
+ dependencyCount: z.ZodOptional<z.ZodNumber>;
37
+ dependentCount: z.ZodOptional<z.ZodNumber>;
38
+ commentCount: z.ZodOptional<z.ZodNumber>;
39
+ comments: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
40
+ commentsOmitted: z.ZodOptional<z.ZodBoolean>;
41
+ revision: z.ZodOptional<z.ZodString>;
42
+ }, z.core.$strip>>;
43
+ }, z.core.$strip>>;
44
+ //# sourceMappingURL=close.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"close.d.ts","sourceRoot":"","sources":["../src/close.ts"],"names":[],"mappings":"AAEA,OAAO,EAAc,CAAC,EAAE,MAAM,aAAa,CAAC;AAM5C,eAAO,MAAM,eAAe;;;;;;iBAM1B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAyBrB,CAAC"}
package/dist/close.js ADDED
@@ -0,0 +1,39 @@
1
+ // ABOUTME: beads.close, the step that closes one or more issues in a bd (beads) database via
2
+ // ABOUTME: `bd close --json` -- idempotent, since closing an already-closed issue is a no-op.
3
+ import { defineStep, z } from "@ligeti/sdk";
4
+ import pkg from "../package.json" with { type: "json" };
5
+ import { BEADS_ENV_VARS } from "./settings.js";
6
+ import { bdBeads } from "./bd.js";
7
+ import { BeadId, BeadListOutput } from "./types.js";
8
+ export const BeadsCloseInput = z.object({
9
+ repoPath: z.string().min(1),
10
+ ids: z.array(BeadId).min(1),
11
+ reason: z.string().min(1).optional(),
12
+ actor: z.string().min(1).optional(),
13
+ force: z.boolean().default(false),
14
+ });
15
+ export const beadsClose = defineStep({
16
+ name: "beads.close",
17
+ envVars: BEADS_ENV_VARS,
18
+ description: "Closes one or more issues in a bd (beads) database.",
19
+ package: { name: pkg.name, version: pkg.version },
20
+ input: BeadsCloseInput,
21
+ output: BeadListOutput,
22
+ retry: { maxAttempts: 3, intervalSeconds: 2 },
23
+ async run(sctx, input) {
24
+ const args = ["close"];
25
+ if (input.reason !== undefined) {
26
+ args.push("-r", input.reason);
27
+ }
28
+ if (input.actor !== undefined) {
29
+ args.push("--actor", input.actor);
30
+ }
31
+ if (input.force) {
32
+ args.push("-f");
33
+ }
34
+ args.push("--", ...input.ids);
35
+ const beads = await bdBeads(input.repoPath, args, sctx.signal);
36
+ return { beads };
37
+ },
38
+ });
39
+ //# sourceMappingURL=close.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"close.js","sourceRoot":"","sources":["../src/close.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAC7F,8FAA8F;AAC9F,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,GAAG,MAAM,iBAAiB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEpD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,QAAQ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CAAC;QACD,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;QAE9B,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAC/D,OAAO,EAAE,KAAK,EAAE,CAAC;IACnB,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { z } from "@ligeti/sdk";
2
+ export declare const BeadsCommentInput: z.ZodObject<{
3
+ repoPath: z.ZodString;
4
+ id: z.ZodString;
5
+ text: z.ZodString;
6
+ actor: z.ZodOptional<z.ZodString>;
7
+ }, z.core.$strip>;
8
+ export type BeadsCommentInput = z.infer<typeof BeadsCommentInput>;
9
+ export declare const BeadsCommentOutput: z.ZodObject<{
10
+ comment: z.ZodObject<{
11
+ id: z.ZodString;
12
+ issueId: z.ZodString;
13
+ author: z.ZodString;
14
+ text: z.ZodString;
15
+ createdAt: z.ZodString;
16
+ }, z.core.$strip>;
17
+ }, z.core.$strip>;
18
+ export type BeadsCommentOutput = z.infer<typeof BeadsCommentOutput>;
19
+ export declare const beadsComment: import("@ligeti/sdk").StepDefinition<z.ZodObject<{
20
+ repoPath: z.ZodString;
21
+ id: z.ZodString;
22
+ text: z.ZodString;
23
+ actor: z.ZodOptional<z.ZodString>;
24
+ }, z.core.$strip>, z.ZodObject<{
25
+ comment: z.ZodObject<{
26
+ id: z.ZodString;
27
+ issueId: z.ZodString;
28
+ author: z.ZodString;
29
+ text: z.ZodString;
30
+ createdAt: z.ZodString;
31
+ }, z.core.$strip>;
32
+ }, z.core.$strip>>;
33
+ //# sourceMappingURL=comment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comment.d.ts","sourceRoot":"","sources":["../src/comment.ts"],"names":[],"mappings":"AAEA,OAAO,EAAc,CAAC,EAAE,MAAM,aAAa,CAAC;AAM5C,eAAO,MAAM,iBAAiB;;;;;iBAK5B,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAElE,eAAO,MAAM,kBAAkB;;;;;;;;iBAAiC,CAAC;AACjE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEpE,eAAO,MAAM,YAAY;;;;;;;;;;;;;kBAmBvB,CAAC"}
@@ -0,0 +1,33 @@
1
+ // ABOUTME: beads.comment, the step that adds a comment to one issue in a bd (beads) database via
2
+ // ABOUTME: `bd comments add --json`, retried like the package's other steps.
3
+ import { defineStep, z } from "@ligeti/sdk";
4
+ import pkg from "../package.json" with { type: "json" };
5
+ import { BEADS_ENV_VARS } from "./settings.js";
6
+ import { bdJson } from "./bd.js";
7
+ import { BeadId, Comment, parseComment } from "./types.js";
8
+ export const BeadsCommentInput = z.object({
9
+ repoPath: z.string().min(1),
10
+ id: BeadId,
11
+ text: z.string().min(1),
12
+ actor: z.string().min(1).optional(),
13
+ });
14
+ export const BeadsCommentOutput = z.object({ comment: Comment });
15
+ export const beadsComment = defineStep({
16
+ name: "beads.comment",
17
+ envVars: BEADS_ENV_VARS,
18
+ description: "Adds a comment to one issue in a bd (beads) database.",
19
+ package: { name: pkg.name, version: pkg.version },
20
+ input: BeadsCommentInput,
21
+ output: BeadsCommentOutput,
22
+ retry: { maxAttempts: 3, intervalSeconds: 2 },
23
+ async run(sctx, input) {
24
+ const args = ["comments", "add", input.id];
25
+ if (input.actor !== undefined) {
26
+ args.push("--actor", input.actor);
27
+ }
28
+ args.push("--", input.text);
29
+ const payload = await bdJson(input.repoPath, args, sctx.signal);
30
+ return { comment: parseComment(payload) };
31
+ },
32
+ });
33
+ //# sourceMappingURL=comment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comment.js","sourceRoot":"","sources":["../src/comment.ts"],"names":[],"mappings":"AAAA,iGAAiG;AACjG,6EAA6E;AAC7E,OAAO,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I,KAAK,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;YAC9B,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;QACpC,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;QAE5B,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAChE,OAAO,EAAE,OAAO,EAAE,YAAY,CAAC,OAAO,CAAC,EAAE,CAAC;IAC5C,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,88 @@
1
+ import { z } from "@ligeti/sdk";
2
+ export declare const KEY_LABEL_PREFIX = "ligeti-key:";
3
+ export declare const BeadKey: z.ZodString;
4
+ export type BeadKey = z.infer<typeof BeadKey>;
5
+ export declare const BeadsCreateInput: z.ZodObject<{
6
+ repoPath: z.ZodString;
7
+ key: z.ZodString;
8
+ type: z.ZodString;
9
+ title: z.ZodString;
10
+ description: z.ZodOptional<z.ZodString>;
11
+ parent: z.ZodOptional<z.ZodString>;
12
+ labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
13
+ externalRef: z.ZodOptional<z.ZodString>;
14
+ priority: z.ZodOptional<z.ZodNumber>;
15
+ actor: z.ZodOptional<z.ZodString>;
16
+ }, z.core.$strip>;
17
+ export type BeadsCreateInput = z.infer<typeof BeadsCreateInput>;
18
+ export declare const BeadsCreateOutput: z.ZodObject<{
19
+ bead: z.ZodObject<{
20
+ id: z.ZodString;
21
+ title: z.ZodString;
22
+ status: z.ZodString;
23
+ priority: z.ZodNumber;
24
+ issueType: z.ZodString;
25
+ createdAt: z.ZodString;
26
+ description: z.ZodOptional<z.ZodString>;
27
+ acceptanceCriteria: z.ZodOptional<z.ZodString>;
28
+ owner: z.ZodOptional<z.ZodString>;
29
+ assignee: z.ZodOptional<z.ZodString>;
30
+ createdBy: z.ZodOptional<z.ZodString>;
31
+ updatedAt: z.ZodOptional<z.ZodString>;
32
+ closedAt: z.ZodOptional<z.ZodString>;
33
+ closeReason: z.ZodOptional<z.ZodString>;
34
+ externalRef: z.ZodOptional<z.ZodString>;
35
+ sourceSystem: z.ZodOptional<z.ZodString>;
36
+ labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
37
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
38
+ dependencyCount: z.ZodOptional<z.ZodNumber>;
39
+ dependentCount: z.ZodOptional<z.ZodNumber>;
40
+ commentCount: z.ZodOptional<z.ZodNumber>;
41
+ comments: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
42
+ commentsOmitted: z.ZodOptional<z.ZodBoolean>;
43
+ revision: z.ZodOptional<z.ZodString>;
44
+ }, z.core.$strip>;
45
+ created: z.ZodBoolean;
46
+ }, z.core.$strip>;
47
+ export type BeadsCreateOutput = z.infer<typeof BeadsCreateOutput>;
48
+ export declare const beadsCreate: import("@ligeti/sdk").StepDefinition<z.ZodObject<{
49
+ repoPath: z.ZodString;
50
+ key: z.ZodString;
51
+ type: z.ZodString;
52
+ title: z.ZodString;
53
+ description: z.ZodOptional<z.ZodString>;
54
+ parent: z.ZodOptional<z.ZodString>;
55
+ labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
56
+ externalRef: z.ZodOptional<z.ZodString>;
57
+ priority: z.ZodOptional<z.ZodNumber>;
58
+ actor: z.ZodOptional<z.ZodString>;
59
+ }, z.core.$strip>, z.ZodObject<{
60
+ bead: z.ZodObject<{
61
+ id: z.ZodString;
62
+ title: z.ZodString;
63
+ status: z.ZodString;
64
+ priority: z.ZodNumber;
65
+ issueType: z.ZodString;
66
+ createdAt: z.ZodString;
67
+ description: z.ZodOptional<z.ZodString>;
68
+ acceptanceCriteria: z.ZodOptional<z.ZodString>;
69
+ owner: z.ZodOptional<z.ZodString>;
70
+ assignee: z.ZodOptional<z.ZodString>;
71
+ createdBy: z.ZodOptional<z.ZodString>;
72
+ updatedAt: z.ZodOptional<z.ZodString>;
73
+ closedAt: z.ZodOptional<z.ZodString>;
74
+ closeReason: z.ZodOptional<z.ZodString>;
75
+ externalRef: z.ZodOptional<z.ZodString>;
76
+ sourceSystem: z.ZodOptional<z.ZodString>;
77
+ labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
78
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
79
+ dependencyCount: z.ZodOptional<z.ZodNumber>;
80
+ dependentCount: z.ZodOptional<z.ZodNumber>;
81
+ commentCount: z.ZodOptional<z.ZodNumber>;
82
+ comments: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
83
+ commentsOmitted: z.ZodOptional<z.ZodBoolean>;
84
+ revision: z.ZodOptional<z.ZodString>;
85
+ }, z.core.$strip>;
86
+ created: z.ZodBoolean;
87
+ }, z.core.$strip>>;
88
+ //# sourceMappingURL=create.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../src/create.ts"],"names":[],"mappings":"AAEA,OAAO,EAAc,CAAC,EAAE,MAAM,aAAa,CAAC;AAO5C,eAAO,MAAM,gBAAgB,gBAAgB,CAAC;AAE9C,eAAO,MAAM,OAAO,aAOhB,CAAC;AACL,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC,CAAC;AAE9C,eAAO,MAAM,gBAAgB;;;;;;;;;;;iBAiB3B,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEhE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAiD,CAAC;AAChF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAUlE,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAwDtB,CAAC"}
package/dist/create.js ADDED
@@ -0,0 +1,93 @@
1
+ // ABOUTME: beads.create, the step that finds or creates one bead by a caller-chosen key in a bd (beads)
2
+ // ABOUTME: database -- the key is stored as the label `ligeti-key:<key>`, scoped by parent, so a retry is a no-op.
3
+ import { defineStep, z } from "@ligeti/sdk";
4
+ import pkg from "../package.json" with { type: "json" };
5
+ import { BEADS_ENV_VARS } from "./settings.js";
6
+ import { bdBeads, bdJson } from "./bd.js";
7
+ import { SafeLabel, SafeToken } from "./list.js";
8
+ import { Bead, BeadId, parseBead } from "./types.js";
9
+ export const KEY_LABEL_PREFIX = "ligeti-key:";
10
+ export const BeadKey = z
11
+ .string()
12
+ .min(1)
13
+ .max(200)
14
+ .regex(/^[A-Za-z0-9][A-Za-z0-9._:/-]*$/, {
15
+ message: 'must start with a letter or digit and contain only [A-Za-z0-9._:/-]: no leading "-", no commas, no whitespace',
16
+ });
17
+ export const BeadsCreateInput = z.object({
18
+ repoPath: z.string().min(1),
19
+ key: BeadKey,
20
+ type: SafeToken,
21
+ title: z.string().min(1),
22
+ description: z.string().optional(),
23
+ parent: BeadId.optional(),
24
+ labels: z
25
+ .array(SafeLabel.refine((label) => !label.startsWith(KEY_LABEL_PREFIX), {
26
+ message: `must not start with "${KEY_LABEL_PREFIX}": that prefix is reserved for the key`,
27
+ }))
28
+ .optional(),
29
+ externalRef: SafeToken.optional(),
30
+ priority: z.number().int().min(0).max(4).optional(),
31
+ actor: z.string().min(1).optional(),
32
+ });
33
+ export const BeadsCreateOutput = z.object({ bead: Bead, created: z.boolean() });
34
+ function compareOldestFirst(a, b) {
35
+ const byTime = Date.parse(a.createdAt) - Date.parse(b.createdAt);
36
+ if (byTime !== 0 && !Number.isNaN(byTime)) {
37
+ return byTime;
38
+ }
39
+ return a.id < b.id ? -1 : a.id > b.id ? 1 : 0;
40
+ }
41
+ export const beadsCreate = defineStep({
42
+ name: "beads.create",
43
+ envVars: BEADS_ENV_VARS,
44
+ description: "Finds the bead carrying a caller-chosen key (under the given parent, or at top level) in a bd (beads) database, or creates it.",
45
+ package: { name: pkg.name, version: pkg.version },
46
+ input: BeadsCreateInput,
47
+ output: BeadsCreateOutput,
48
+ retry: { maxAttempts: 3, intervalSeconds: 2 },
49
+ async run(sctx, input) {
50
+ const keyLabel = `${KEY_LABEL_PREFIX}${input.key}`;
51
+ const lookup = ["list", "-l", keyLabel, "--all", "-n", "0"];
52
+ lookup.push(...(input.parent === undefined ? ["--no-parent"] : ["--parent", input.parent]));
53
+ lookup.push("--no-pager", "--readonly");
54
+ const existing = await bdBeads(input.repoPath, lookup, sctx.signal);
55
+ const [found, ...duplicates] = [...existing].sort(compareOldestFirst);
56
+ if (found !== undefined && duplicates.length > 0) {
57
+ sctx.logger.warn("beads.create: several beads carry the key, returning the oldest", {
58
+ key: input.key,
59
+ repoPath: input.repoPath,
60
+ returned: found.id,
61
+ duplicates: [found, ...duplicates].map((bead) => bead.id),
62
+ });
63
+ }
64
+ if (found !== undefined) {
65
+ return { bead: found, created: false };
66
+ }
67
+ const args = [
68
+ "create",
69
+ `--title=${input.title}`,
70
+ `--type=${input.type}`,
71
+ `--labels=${[keyLabel, ...(input.labels ?? [])].join(",")}`,
72
+ "--no-inherit-labels",
73
+ ];
74
+ if (input.description !== undefined) {
75
+ args.push(`--description=${input.description}`);
76
+ }
77
+ if (input.parent !== undefined) {
78
+ args.push(`--parent=${input.parent}`);
79
+ }
80
+ if (input.externalRef !== undefined) {
81
+ args.push(`--external-ref=${input.externalRef}`);
82
+ }
83
+ if (input.priority !== undefined) {
84
+ args.push(`--priority=${String(input.priority)}`);
85
+ }
86
+ if (input.actor !== undefined) {
87
+ args.push("--actor", input.actor);
88
+ }
89
+ const payload = await bdJson(input.repoPath, args, sctx.signal);
90
+ return { bead: parseBead(payload), created: true };
91
+ },
92
+ });
93
+ //# sourceMappingURL=create.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.js","sourceRoot":"","sources":["../src/create.ts"],"names":[],"mappings":"AAAA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AI,EAAE,CAAC;IACrD,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { z } from "@ligeti/sdk";
2
+ export declare const BeadsEnvironmentInput: z.ZodObject<{
3
+ repoPath: z.ZodString;
4
+ }, z.core.$strip>;
5
+ export type BeadsEnvironmentInput = z.infer<typeof BeadsEnvironmentInput>;
6
+ export declare const BeadsEnvironmentOutput: z.ZodObject<{
7
+ bdVersion: z.ZodString;
8
+ customTypes: z.ZodArray<z.ZodString>;
9
+ }, z.core.$strip>;
10
+ export type BeadsEnvironmentOutput = z.infer<typeof BeadsEnvironmentOutput>;
11
+ export declare const beadsEnvironment: import("@ligeti/sdk").StepDefinition<z.ZodObject<{
12
+ repoPath: z.ZodString;
13
+ }, z.core.$strip>, z.ZodObject<{
14
+ bdVersion: z.ZodString;
15
+ customTypes: z.ZodArray<z.ZodString>;
16
+ }, z.core.$strip>>;
17
+ //# sourceMappingURL=environment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../src/environment.ts"],"names":[],"mappings":"AAEA,OAAO,EAAc,CAAC,EAAE,MAAM,aAAa,CAAC;AAK5C,eAAO,MAAM,qBAAqB;;iBAA4C,CAAC;AAC/E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE1E,eAAO,MAAM,sBAAsB;;;iBAGjC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAK5E,eAAO,MAAM,gBAAgB;;;;;kBAe3B,CAAC"}
@@ -0,0 +1,28 @@
1
+ // ABOUTME: beads.environment, the read-only step that reports the installed bd's version and the custom
2
+ // ABOUTME: issue types the database accepts, via `bd version --json` and `bd types --json`.
3
+ import { defineStep, z } from "@ligeti/sdk";
4
+ import pkg from "../package.json" with { type: "json" };
5
+ import { BEADS_ENV_VARS } from "./settings.js";
6
+ import { bdJson } from "./bd.js";
7
+ export const BeadsEnvironmentInput = z.object({ repoPath: z.string().min(1) });
8
+ export const BeadsEnvironmentOutput = z.object({
9
+ bdVersion: z.string(),
10
+ customTypes: z.array(z.string()),
11
+ });
12
+ const VersionPayload = z.object({ version: z.string() });
13
+ const TypesPayload = z.object({ custom_types: z.array(z.string()).nullish() });
14
+ export const beadsEnvironment = defineStep({
15
+ name: "beads.environment",
16
+ envVars: BEADS_ENV_VARS,
17
+ description: "Reports the installed bd's version and the custom issue types a bd (beads) database accepts.",
18
+ package: { name: pkg.name, version: pkg.version },
19
+ input: BeadsEnvironmentInput,
20
+ output: BeadsEnvironmentOutput,
21
+ retry: { maxAttempts: 3, intervalSeconds: 2 },
22
+ async run(sctx, input) {
23
+ const version = VersionPayload.parse(await bdJson(input.repoPath, ["version"], sctx.signal));
24
+ const types = TypesPayload.parse(await bdJson(input.repoPath, ["types"], sctx.signal));
25
+ return { bdVersion: version.version, customTypes: types.custom_types ?? [] };
26
+ },
27
+ });
28
+ //# sourceMappingURL=environment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"environment.js","sourceRoot":"","sources":["../src/environment.ts"],"names":[],"mappings":"AAAA,wGAAwG;AACxG,4FAA4F;AAC5F,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,GAAG,MAAM,iBAAiB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEjC,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AAG/E,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,SA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}
@@ -0,0 +1,12 @@
1
+ export { beadsList, BeadsListInput } from "./list.js";
2
+ export { beadsListHuman, BeadsListHumanInput } from "./list-human.js";
3
+ export { beadsClose, BeadsCloseInput } from "./close.js";
4
+ export { beadsShow, BeadsShowInput, BeadsShowOutput } from "./show.js";
5
+ export { beadsUpdate, BeadsUpdateInput, BeadsUpdateOutput } from "./update.js";
6
+ export { beadsRemoveLabel, BeadsRemoveLabelInput } from "./remove-label.js";
7
+ export { beadsComment, BeadsCommentInput, BeadsCommentOutput } from "./comment.js";
8
+ export { beadsCreate, BeadsCreateInput, BeadsCreateOutput } from "./create.js";
9
+ export { beadsAddDependency, BeadsAddDependencyInput, BeadsAddDependencyOutput, } from "./add-dependency.js";
10
+ export { beadsEnvironment, BeadsEnvironmentInput, BeadsEnvironmentOutput } from "./environment.js";
11
+ export { Bead, BeadStatus, BeadId, BeadListOutput, Comment } from "./types.js";
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC/E,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AACnG,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,14 @@
1
+ // ABOUTME: Public entry point of @ligeti/step-beads: its ten steps (list, list-human, show, close, update,
2
+ // ABOUTME: remove-label, comment, create, add-dependency, environment) and their public types.
3
+ export { beadsList, BeadsListInput } from "./list.js";
4
+ export { beadsListHuman, BeadsListHumanInput } from "./list-human.js";
5
+ export { beadsClose, BeadsCloseInput } from "./close.js";
6
+ export { beadsShow, BeadsShowInput, BeadsShowOutput } from "./show.js";
7
+ export { beadsUpdate, BeadsUpdateInput, BeadsUpdateOutput } from "./update.js";
8
+ export { beadsRemoveLabel, BeadsRemoveLabelInput } from "./remove-label.js";
9
+ export { beadsComment, BeadsCommentInput, BeadsCommentOutput } from "./comment.js";
10
+ export { beadsCreate, BeadsCreateInput, BeadsCreateOutput } from "./create.js";
11
+ export { beadsAddDependency, BeadsAddDependencyInput, BeadsAddDependencyOutput, } from "./add-dependency.js";
12
+ export { beadsEnvironment, BeadsEnvironmentInput, BeadsEnvironmentOutput } from "./environment.js";
13
+ export { Bead, BeadStatus, BeadId, BeadListOutput, Comment } from "./types.js";
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,2GAA2G;AAC3G,+FAA+F;AAC/F,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC/E,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AACnG,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,40 @@
1
+ import { z } from "@ligeti/sdk";
2
+ export declare const BeadsListHumanInput: z.ZodObject<{
3
+ repoPath: z.ZodString;
4
+ status: z.ZodOptional<z.ZodArray<z.ZodString>>;
5
+ externalRef: z.ZodOptional<z.ZodString>;
6
+ }, z.core.$strip>;
7
+ export type BeadsListHumanInput = z.infer<typeof BeadsListHumanInput>;
8
+ export declare const beadsListHuman: import("@ligeti/sdk").StepDefinition<z.ZodObject<{
9
+ repoPath: z.ZodString;
10
+ status: z.ZodOptional<z.ZodArray<z.ZodString>>;
11
+ externalRef: z.ZodOptional<z.ZodString>;
12
+ }, z.core.$strip>, z.ZodObject<{
13
+ beads: z.ZodArray<z.ZodObject<{
14
+ id: z.ZodString;
15
+ title: z.ZodString;
16
+ status: z.ZodString;
17
+ priority: z.ZodNumber;
18
+ issueType: z.ZodString;
19
+ createdAt: z.ZodString;
20
+ description: z.ZodOptional<z.ZodString>;
21
+ acceptanceCriteria: z.ZodOptional<z.ZodString>;
22
+ owner: z.ZodOptional<z.ZodString>;
23
+ assignee: z.ZodOptional<z.ZodString>;
24
+ createdBy: z.ZodOptional<z.ZodString>;
25
+ updatedAt: z.ZodOptional<z.ZodString>;
26
+ closedAt: z.ZodOptional<z.ZodString>;
27
+ closeReason: z.ZodOptional<z.ZodString>;
28
+ externalRef: z.ZodOptional<z.ZodString>;
29
+ sourceSystem: z.ZodOptional<z.ZodString>;
30
+ labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
31
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
32
+ dependencyCount: z.ZodOptional<z.ZodNumber>;
33
+ dependentCount: z.ZodOptional<z.ZodNumber>;
34
+ commentCount: z.ZodOptional<z.ZodNumber>;
35
+ comments: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
36
+ commentsOmitted: z.ZodOptional<z.ZodBoolean>;
37
+ revision: z.ZodOptional<z.ZodString>;
38
+ }, z.core.$strip>>;
39
+ }, z.core.$strip>>;
40
+ //# sourceMappingURL=list-human.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-human.d.ts","sourceRoot":"","sources":["../src/list-human.ts"],"names":[],"mappings":"AAEA,OAAO,EAAc,CAAC,EAAE,MAAM,aAAa,CAAC;AAO5C,eAAO,MAAM,mBAAmB;;;;iBAI9B,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEtE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAyBzB,CAAC"}
@@ -0,0 +1,35 @@
1
+ // ABOUTME: beads.list-human, the step that lists issues labelled `human` in a bd (beads) database
2
+ // ABOUTME: -- the ones needing human intervention -- via `bd human list --json`.
3
+ import { defineStep, z } from "@ligeti/sdk";
4
+ import pkg from "../package.json" with { type: "json" };
5
+ import { BEADS_ENV_VARS } from "./settings.js";
6
+ import { bdBeads } from "./bd.js";
7
+ import { SafeStatus } from "./list.js";
8
+ import { BeadListOutput } from "./types.js";
9
+ export const BeadsListHumanInput = z.object({
10
+ repoPath: z.string().min(1),
11
+ status: z.array(SafeStatus).optional(),
12
+ externalRef: z.string().min(1).optional(),
13
+ });
14
+ export const beadsListHuman = defineStep({
15
+ name: "beads.list-human",
16
+ envVars: BEADS_ENV_VARS,
17
+ description: "Lists the issues labelled `human` in a bd (beads) database -- the ones that need human intervention or input.",
18
+ package: { name: pkg.name, version: pkg.version },
19
+ input: BeadsListHumanInput,
20
+ output: BeadListOutput,
21
+ retry: { maxAttempts: 3, intervalSeconds: 2 },
22
+ async run(sctx, input) {
23
+ const args = ["human", "list"];
24
+ if (input.status && input.status.length > 0) {
25
+ args.push("-s", input.status.join(","));
26
+ }
27
+ args.push("--readonly");
28
+ let beads = await bdBeads(input.repoPath, args, sctx.signal);
29
+ if (input.externalRef !== undefined) {
30
+ beads = beads.filter((bead) => bead.externalRef === input.externalRef);
31
+ }
32
+ return { beads };
33
+ },
34
+ });
35
+ //# sourceMappingURL=list-human.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-human.js","sourceRoot":"","sources":["../src/list-human.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,iFAAiF;AACjF,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,GAAG,MAAM,iBAAiB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,QAAQ,EAAE,CAA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AC;QACzE,CAAC;QAED,OAAO,EAAE,KAAK,EAAE,CAAC;IACnB,CAAC;CACF,CAAC,CAAC"}
package/dist/list.d.ts ADDED
@@ -0,0 +1,55 @@
1
+ import { z } from "@ligeti/sdk";
2
+ export declare const SafeToken: z.ZodString;
3
+ export declare const SafeStatus: z.ZodString;
4
+ export declare const SafeLabel: z.ZodString;
5
+ export declare const BeadsListInput: z.ZodObject<{
6
+ repoPath: z.ZodString;
7
+ status: z.ZodOptional<z.ZodArray<z.ZodString>>;
8
+ labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
9
+ labelsAny: z.ZodOptional<z.ZodArray<z.ZodString>>;
10
+ issueType: z.ZodOptional<z.ZodString>;
11
+ parent: z.ZodOptional<z.ZodString>;
12
+ externalRef: z.ZodOptional<z.ZodString>;
13
+ limit: z.ZodDefault<z.ZodNumber>;
14
+ ready: z.ZodDefault<z.ZodBoolean>;
15
+ }, z.core.$strip>;
16
+ export type BeadsListInput = z.infer<typeof BeadsListInput>;
17
+ export declare const beadsList: import("@ligeti/sdk").StepDefinition<z.ZodObject<{
18
+ repoPath: z.ZodString;
19
+ status: z.ZodOptional<z.ZodArray<z.ZodString>>;
20
+ labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
21
+ labelsAny: z.ZodOptional<z.ZodArray<z.ZodString>>;
22
+ issueType: z.ZodOptional<z.ZodString>;
23
+ parent: z.ZodOptional<z.ZodString>;
24
+ externalRef: z.ZodOptional<z.ZodString>;
25
+ limit: z.ZodDefault<z.ZodNumber>;
26
+ ready: z.ZodDefault<z.ZodBoolean>;
27
+ }, z.core.$strip>, z.ZodObject<{
28
+ beads: z.ZodArray<z.ZodObject<{
29
+ id: z.ZodString;
30
+ title: z.ZodString;
31
+ status: z.ZodString;
32
+ priority: z.ZodNumber;
33
+ issueType: z.ZodString;
34
+ createdAt: z.ZodString;
35
+ description: z.ZodOptional<z.ZodString>;
36
+ acceptanceCriteria: z.ZodOptional<z.ZodString>;
37
+ owner: z.ZodOptional<z.ZodString>;
38
+ assignee: z.ZodOptional<z.ZodString>;
39
+ createdBy: z.ZodOptional<z.ZodString>;
40
+ updatedAt: z.ZodOptional<z.ZodString>;
41
+ closedAt: z.ZodOptional<z.ZodString>;
42
+ closeReason: z.ZodOptional<z.ZodString>;
43
+ externalRef: z.ZodOptional<z.ZodString>;
44
+ sourceSystem: z.ZodOptional<z.ZodString>;
45
+ labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
46
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
47
+ dependencyCount: z.ZodOptional<z.ZodNumber>;
48
+ dependentCount: z.ZodOptional<z.ZodNumber>;
49
+ commentCount: z.ZodOptional<z.ZodNumber>;
50
+ comments: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
51
+ commentsOmitted: z.ZodOptional<z.ZodBoolean>;
52
+ revision: z.ZodOptional<z.ZodString>;
53
+ }, z.core.$strip>>;
54
+ }, z.core.$strip>>;
55
+ //# sourceMappingURL=list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../src/list.ts"],"names":[],"mappings":"AAEA,OAAO,EAAc,CAAC,EAAE,MAAM,aAAa,CAAC;AAM5C,eAAO,MAAM,SAAS,aAKlB,CAAC;AAKL,eAAO,MAAM,UAAU,aAAe,CAAC;AACvC,eAAO,MAAM,SAAS,aAAe,CAAC;AAEtC,eAAO,MAAM,cAAc;;;;;;;;;;iBAgBvB,CAAC;AACL,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA6CpB,CAAC"}