@aigile/core 0.2.3 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) hide show
  1. package/dist/agent-config.d.ts +850 -0
  2. package/dist/agent-config.d.ts.map +1 -0
  3. package/dist/agent-config.js +111 -0
  4. package/dist/agent-config.js.map +1 -0
  5. package/dist/collections.d.ts +33 -1
  6. package/dist/collections.d.ts.map +1 -1
  7. package/dist/collections.js +33 -1
  8. package/dist/collections.js.map +1 -1
  9. package/dist/config-sections.d.ts +78 -0
  10. package/dist/config-sections.d.ts.map +1 -0
  11. package/dist/config-sections.js +42 -0
  12. package/dist/config-sections.js.map +1 -0
  13. package/dist/config.d.ts +6795 -445
  14. package/dist/config.d.ts.map +1 -1
  15. package/dist/config.js +724 -87
  16. package/dist/config.js.map +1 -1
  17. package/dist/domain/action-item.d.ts +409 -0
  18. package/dist/domain/action-item.d.ts.map +1 -0
  19. package/dist/domain/action-item.js +155 -0
  20. package/dist/domain/action-item.js.map +1 -0
  21. package/dist/domain/ai-call.d.ts +15 -11
  22. package/dist/domain/ai-call.d.ts.map +1 -1
  23. package/dist/domain/ai-call.js +2 -0
  24. package/dist/domain/ai-call.js.map +1 -1
  25. package/dist/domain/build.d.ts +47 -5
  26. package/dist/domain/build.d.ts.map +1 -1
  27. package/dist/domain/build.js +6 -0
  28. package/dist/domain/build.js.map +1 -1
  29. package/dist/domain/change-set.d.ts +216 -0
  30. package/dist/domain/change-set.d.ts.map +1 -0
  31. package/dist/domain/change-set.js +48 -0
  32. package/dist/domain/change-set.js.map +1 -0
  33. package/dist/domain/common.d.ts +6 -3
  34. package/dist/domain/common.d.ts.map +1 -1
  35. package/dist/domain/common.js +4 -1
  36. package/dist/domain/common.js.map +1 -1
  37. package/dist/domain/conflict.d.ts +8 -8
  38. package/dist/domain/conversation.d.ts +78 -8
  39. package/dist/domain/conversation.d.ts.map +1 -1
  40. package/dist/domain/conversation.js +2 -0
  41. package/dist/domain/conversation.js.map +1 -1
  42. package/dist/domain/deliverable.d.ts +235 -0
  43. package/dist/domain/deliverable.d.ts.map +1 -0
  44. package/dist/domain/deliverable.js +76 -0
  45. package/dist/domain/deliverable.js.map +1 -0
  46. package/dist/domain/index.d.ts +4 -1
  47. package/dist/domain/index.d.ts.map +1 -1
  48. package/dist/domain/index.js +4 -1
  49. package/dist/domain/index.js.map +1 -1
  50. package/dist/domain/message.d.ts +7 -7
  51. package/dist/domain/milestone.d.ts +11 -11
  52. package/dist/domain/organization.d.ts +2 -2
  53. package/dist/domain/project.d.ts +524 -3
  54. package/dist/domain/project.d.ts.map +1 -1
  55. package/dist/domain/project.js +38 -1
  56. package/dist/domain/project.js.map +1 -1
  57. package/dist/domain/question.d.ts +238 -26
  58. package/dist/domain/question.d.ts.map +1 -1
  59. package/dist/domain/question.js +49 -4
  60. package/dist/domain/question.js.map +1 -1
  61. package/dist/domain/reassignment.d.ts +23 -18
  62. package/dist/domain/reassignment.d.ts.map +1 -1
  63. package/dist/domain/reassignment.js +14 -6
  64. package/dist/domain/reassignment.js.map +1 -1
  65. package/dist/domain/reference.d.ts +595 -0
  66. package/dist/domain/reference.d.ts.map +1 -0
  67. package/dist/domain/reference.js +180 -0
  68. package/dist/domain/reference.js.map +1 -0
  69. package/dist/domain/release.d.ts +246 -10
  70. package/dist/domain/release.d.ts.map +1 -1
  71. package/dist/domain/release.js +6 -0
  72. package/dist/domain/release.js.map +1 -1
  73. package/dist/domain/review.d.ts +11 -11
  74. package/dist/domain/role-assignment.d.ts +5 -5
  75. package/dist/domain/role-assignment.js +1 -1
  76. package/dist/domain/role.d.ts +41 -6
  77. package/dist/domain/role.d.ts.map +1 -1
  78. package/dist/domain/role.js +12 -0
  79. package/dist/domain/role.js.map +1 -1
  80. package/dist/domain/spec.d.ts +197 -6
  81. package/dist/domain/spec.d.ts.map +1 -1
  82. package/dist/domain/spec.js +73 -1
  83. package/dist/domain/spec.js.map +1 -1
  84. package/dist/domain/sweep.d.ts +11 -11
  85. package/dist/domain/sweep.d.ts.map +1 -1
  86. package/dist/domain/sweep.js +1 -1
  87. package/dist/domain/sweep.js.map +1 -1
  88. package/dist/domain/track.d.ts +16 -16
  89. package/dist/domain/user.d.ts +50 -2
  90. package/dist/domain/user.d.ts.map +1 -1
  91. package/dist/domain/user.js +13 -0
  92. package/dist/domain/user.js.map +1 -1
  93. package/dist/domain/verification.d.ts +4 -4
  94. package/dist/id.d.ts +114 -0
  95. package/dist/id.d.ts.map +1 -0
  96. package/dist/id.js +204 -0
  97. package/dist/id.js.map +1 -0
  98. package/dist/ids.d.ts +0 -2
  99. package/dist/ids.d.ts.map +1 -1
  100. package/dist/ids.js +0 -5
  101. package/dist/ids.js.map +1 -1
  102. package/dist/index.d.ts +7 -0
  103. package/dist/index.d.ts.map +1 -1
  104. package/dist/index.js +7 -0
  105. package/dist/index.js.map +1 -1
  106. package/dist/jira.d.ts +26 -0
  107. package/dist/jira.d.ts.map +1 -0
  108. package/dist/jira.js +37 -0
  109. package/dist/jira.js.map +1 -0
  110. package/dist/outline.d.ts +64 -0
  111. package/dist/outline.d.ts.map +1 -0
  112. package/dist/outline.js +127 -0
  113. package/dist/outline.js.map +1 -0
  114. package/dist/plugins/action-source.d.ts +44 -0
  115. package/dist/plugins/action-source.d.ts.map +1 -0
  116. package/dist/plugins/action-source.js +2 -0
  117. package/dist/plugins/action-source.js.map +1 -0
  118. package/dist/plugins/ai.d.ts +5 -0
  119. package/dist/plugins/ai.d.ts.map +1 -1
  120. package/dist/plugins/blob-store.d.ts +36 -0
  121. package/dist/plugins/blob-store.d.ts.map +1 -0
  122. package/dist/plugins/blob-store.js +11 -0
  123. package/dist/plugins/blob-store.js.map +1 -0
  124. package/dist/plugins/datastore.d.ts +6 -0
  125. package/dist/plugins/datastore.d.ts.map +1 -1
  126. package/dist/plugins/design.d.ts +62 -0
  127. package/dist/plugins/design.d.ts.map +1 -0
  128. package/dist/plugins/design.js +2 -0
  129. package/dist/plugins/design.js.map +1 -0
  130. package/dist/plugins/git-host.d.ts +35 -0
  131. package/dist/plugins/git-host.d.ts.map +1 -0
  132. package/dist/plugins/git-host.js +2 -0
  133. package/dist/plugins/git-host.js.map +1 -0
  134. package/dist/plugins/index.d.ts +9 -0
  135. package/dist/plugins/index.d.ts.map +1 -1
  136. package/dist/plugins/index.js +9 -0
  137. package/dist/plugins/index.js.map +1 -1
  138. package/dist/plugins/registry.d.ts +360 -0
  139. package/dist/plugins/registry.d.ts.map +1 -0
  140. package/dist/plugins/registry.js +218 -0
  141. package/dist/plugins/registry.js.map +1 -0
  142. package/dist/plugins/release-gate.d.ts +53 -0
  143. package/dist/plugins/release-gate.d.ts.map +1 -0
  144. package/dist/plugins/release-gate.js +2 -0
  145. package/dist/plugins/release-gate.js.map +1 -0
  146. package/dist/plugins/spec-cache.d.ts +23 -0
  147. package/dist/plugins/spec-cache.d.ts.map +1 -0
  148. package/dist/plugins/spec-cache.js +2 -0
  149. package/dist/plugins/spec-cache.js.map +1 -0
  150. package/dist/plugins/spec-source.d.ts +177 -0
  151. package/dist/plugins/spec-source.d.ts.map +1 -0
  152. package/dist/plugins/spec-source.js +31 -0
  153. package/dist/plugins/spec-source.js.map +1 -0
  154. package/dist/plugins/test-runner.d.ts +68 -0
  155. package/dist/plugins/test-runner.d.ts.map +1 -0
  156. package/dist/plugins/test-runner.js +14 -0
  157. package/dist/plugins/test-runner.js.map +1 -0
  158. package/dist/preamble.d.ts +11 -0
  159. package/dist/preamble.d.ts.map +1 -0
  160. package/dist/preamble.js +12 -0
  161. package/dist/preamble.js.map +1 -0
  162. package/dist/prompts.d.ts +8 -0
  163. package/dist/prompts.d.ts.map +1 -0
  164. package/dist/prompts.js +13 -0
  165. package/dist/prompts.js.map +1 -0
  166. package/dist/settings.d.ts +90 -0
  167. package/dist/settings.d.ts.map +1 -0
  168. package/dist/settings.js +120 -0
  169. package/dist/settings.js.map +1 -0
  170. package/dist/template.d.ts +89 -0
  171. package/dist/template.d.ts.map +1 -0
  172. package/dist/template.js +9 -0
  173. package/dist/template.js.map +1 -0
  174. package/package.json +9 -3
  175. package/prompts/mission.md +3 -0
  176. package/prompts/preamble.md +37 -0
@@ -41,42 +41,42 @@ export declare const trackSchema: z.ZodObject<{
41
41
  buildId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
42
42
  }, "strip", z.ZodTypeAny, {
43
43
  number: number;
44
- status: "proposed" | "blocked" | "open" | "closable" | "closed";
44
+ status: "proposed" | "blocked" | "open" | "closed" | "closable";
45
45
  id: string;
46
- createdAt: string;
47
- updatedAt: string;
48
- description: string;
49
46
  projectIds: string[];
50
47
  title: string;
51
- ownerRoleId: string | null;
52
- ownerUserId: string | null;
53
- claims: string[];
48
+ updatedAt: string;
49
+ createdAt: string;
50
+ description: string;
54
51
  blockedBy: string[];
55
- findings: string;
56
52
  history: {
57
53
  at: string;
58
54
  note: string;
59
55
  }[];
60
56
  buildId: string | null;
57
+ findings: string;
58
+ ownerRoleId: string | null;
59
+ ownerUserId: string | null;
60
+ claims: string[];
61
61
  }, {
62
62
  number: number;
63
63
  id: string;
64
- createdAt: string;
65
- updatedAt: string;
66
64
  title: string;
67
- status?: "proposed" | "blocked" | "open" | "closable" | "closed" | undefined;
68
- description?: string | undefined;
65
+ updatedAt: string;
66
+ createdAt: string;
67
+ status?: "proposed" | "blocked" | "open" | "closed" | "closable" | undefined;
69
68
  projectIds?: string[] | undefined;
70
- ownerRoleId?: string | null | undefined;
71
- ownerUserId?: string | null | undefined;
72
- claims?: string[] | undefined;
69
+ description?: string | undefined;
73
70
  blockedBy?: string[] | undefined;
74
- findings?: string | undefined;
75
71
  history?: {
76
72
  at: string;
77
73
  note: string;
78
74
  }[] | undefined;
79
75
  buildId?: string | null | undefined;
76
+ findings?: string | undefined;
77
+ ownerRoleId?: string | null | undefined;
78
+ ownerUserId?: string | null | undefined;
79
+ claims?: string[] | undefined;
80
80
  }>;
81
81
  export type Track = z.infer<typeof trackSchema>;
82
82
  /** The one counter the numbers come from; kept beside the tracks as an internal record. */
@@ -6,6 +6,25 @@ import { z } from 'zod';
6
6
  * `local-credentials` collection keyed by userId, so OIDC users can exist
7
7
  * without a password (an OIDC subject will get a field of its own).
8
8
  */
9
+ /** Why a person defers to another in an area: the hierarchy (their chain), a dotted line (an obligation outside it), or respect (their own choice). */
10
+ export declare const DEFERENCE_BASES: readonly ["hierarchy", "dotted-line", "respect"];
11
+ export declare const deferenceBasisSchema: z.ZodEnum<["hierarchy", "dotted-line", "respect"]>;
12
+ export type DeferenceBasis = z.infer<typeof deferenceBasisSchema>;
13
+ export declare const deferenceSchema: z.ZodObject<{
14
+ userId: z.ZodString;
15
+ /** The area, in the person's words ("security", "the editor", "pricing"). */
16
+ area: z.ZodString;
17
+ basis: z.ZodEnum<["hierarchy", "dotted-line", "respect"]>;
18
+ }, "strip", z.ZodTypeAny, {
19
+ userId: string;
20
+ area: string;
21
+ basis: "hierarchy" | "dotted-line" | "respect";
22
+ }, {
23
+ userId: string;
24
+ area: string;
25
+ basis: "hierarchy" | "dotted-line" | "respect";
26
+ }>;
27
+ export type Deference = z.infer<typeof deferenceSchema>;
9
28
  export declare const userSchema: z.ZodObject<{
10
29
  id: z.ZodString;
11
30
  createdAt: z.ZodString;
@@ -21,21 +40,44 @@ export declare const userSchema: z.ZodObject<{
21
40
  /** What the person does, in their words; independent of the roles aigile ranks them by. */
22
41
  jobTitle: z.ZodDefault<z.ZodString>;
23
42
  disabled: z.ZodDefault<z.ZodBoolean>;
43
+ /** The people who set this person's priorities (beside the manager): whom the Orchestrator asks what they should work on. */
44
+ prioritySetterIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
45
+ /** The people this person defers to, by area, and on what basis: whom a question in that area goes to before them. */
46
+ defersTo: z.ZodDefault<z.ZodArray<z.ZodObject<{
47
+ userId: z.ZodString;
48
+ /** The area, in the person's words ("security", "the editor", "pricing"). */
49
+ area: z.ZodString;
50
+ basis: z.ZodEnum<["hierarchy", "dotted-line", "respect"]>;
51
+ }, "strip", z.ZodTypeAny, {
52
+ userId: string;
53
+ area: string;
54
+ basis: "hierarchy" | "dotted-line" | "respect";
55
+ }, {
56
+ userId: string;
57
+ area: string;
58
+ basis: "hierarchy" | "dotted-line" | "respect";
59
+ }>, "many">>;
24
60
  }, "strip", z.ZodTypeAny, {
25
61
  email: string | null;
26
62
  id: string;
27
- createdAt: string;
28
63
  updatedAt: string;
64
+ createdAt: string;
29
65
  organizationId: string | null;
30
66
  firstName: string;
31
67
  lastName: string;
32
68
  managerId: string | null;
33
69
  jobTitle: string;
34
70
  disabled: boolean;
71
+ prioritySetterIds: string[];
72
+ defersTo: {
73
+ userId: string;
74
+ area: string;
75
+ basis: "hierarchy" | "dotted-line" | "respect";
76
+ }[];
35
77
  }, {
36
78
  id: string;
37
- createdAt: string;
38
79
  updatedAt: string;
80
+ createdAt: string;
39
81
  email?: string | null | undefined;
40
82
  organizationId?: string | null | undefined;
41
83
  firstName?: string | undefined;
@@ -43,6 +85,12 @@ export declare const userSchema: z.ZodObject<{
43
85
  managerId?: string | null | undefined;
44
86
  jobTitle?: string | undefined;
45
87
  disabled?: boolean | undefined;
88
+ prioritySetterIds?: string[] | undefined;
89
+ defersTo?: {
90
+ userId: string;
91
+ area: string;
92
+ basis: "hierarchy" | "dotted-line" | "respect";
93
+ }[] | undefined;
46
94
  }>;
47
95
  export type User = z.infer<typeof userSchema>;
48
96
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/domain/user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;GAMG;AACH,eAAO,MAAM,UAAU;;;;;;;;IAIrB,6FAA6F;;IAE7F,mFAAmF;;IAEnF,2FAA2F;;;;;;;;;;;;;;;;;;;;;;;;;EAG3F,CAAC;AACH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAE9C;;;GAGG;AACH,wBAA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{ baseEntitySchema, idSchema } from './common.js';
7
7
  * `local-credentials` collection keyed by userId, so OIDC users can exist
8
8
  * without a password (an OIDC subject will get a field of its own).
9
9
  */
10
+ /** Why a person defers to another in an area: the hierarchy (their chain), a dotted line (an obligation outside it), or respect (their own choice). */
11
+ export const DEFERENCE_BASES = ['hierarchy', 'dotted-line', 'respect'];
12
+ export const deferenceBasisSchema = z.enum(DEFERENCE_BASES);
13
+ export const deferenceSchema = z.object({
14
+ userId: idSchema,
15
+ /** The area, in the person's words ("security", "the editor", "pricing"). */
16
+ area: z.string().min(1),
17
+ basis: deferenceBasisSchema,
18
+ });
10
19
  export const userSchema = baseEntitySchema.extend({
11
20
  email: z.string().email().nullable().default(null),
12
21
  firstName: z.string().default(''),
@@ -18,6 +27,10 @@ export const userSchema = baseEntitySchema.extend({
18
27
  /** What the person does, in their words; independent of the roles aigile ranks them by. */
19
28
  jobTitle: z.string().default(''),
20
29
  disabled: z.boolean().default(false),
30
+ /** The people who set this person's priorities (beside the manager): whom the Orchestrator asks what they should work on. */
31
+ prioritySetterIds: z.array(idSchema).default([]),
32
+ /** The people this person defers to, by area, and on what basis: whom a question in that area goes to before them. */
33
+ defersTo: z.array(deferenceSchema).default([]),
21
34
  });
22
35
  /**
23
36
  * Parse a stored user. One written before first and last names existed has a
@@ -1 +1 @@
1
- {"version":3,"file":"user.js","sourceRoot":"","sources":["../../src/domain/user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEzD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,gBAAgB,CAAC,MAAM,CAAC;IAChD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IAClD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC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AE,GAAG,IAAI,CAAC,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAChE,IAAI,CAAC,SAAS,GAAG,KAAK,IAAI,EAAE,CAAC;QAC7B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACjC,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,6FAA6F;AAC7F,MAAM,UAAU,YAAY,CAAC,GAAY;IACvC,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAC1D,MAAM,MAAM,GAAG,GAA0F,CAAC;IAC1G,OAAO,MAAM,CAAC,SAAS,KAAK,SAAS,IAAI,MAAM,CAAC,KAAK,KAAK,IAAI,IAAI,MAAM,CAAC,KAAK,KAAK,SAAS,IAAI,MAAM,CAAC,QAAQ,KAAK,SAAS,CAAC;AAChI,CAAC;AAED,0FAA0F;AAC1F,MAAM,UAAU,cAAc,CAAC,GAAY;IACzC,MAAM,MAAM,GAAG,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,CAAC,CAAC,CAAE,GAA8B,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;IAC9G,OAAO,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;AAC9D,CAAC"}
@@ -57,7 +57,7 @@ export declare const verificationSchema: z.ZodObject<{
57
57
  /** Why it was skipped or blocked. */
58
58
  note: z.ZodDefault<z.ZodNullable<z.ZodString>>;
59
59
  }, "strip", z.ZodTypeAny, {
60
- status: "failed" | "blocked" | "passed" | "skipped";
60
+ status: "failed" | "blocked" | "skipped" | "passed";
61
61
  checks: {
62
62
  command: string;
63
63
  durationMs: number;
@@ -66,18 +66,18 @@ export declare const verificationSchema: z.ZodObject<{
66
66
  }[];
67
67
  projectId: string;
68
68
  id: string;
69
- createdAt: string;
70
69
  updatedAt: string;
70
+ createdAt: string;
71
71
  commit: string | null;
72
72
  durationMs: number;
73
73
  note: string | null;
74
74
  buildId: string;
75
75
  }, {
76
- status: "failed" | "blocked" | "passed" | "skipped";
76
+ status: "failed" | "blocked" | "skipped" | "passed";
77
77
  projectId: string;
78
78
  id: string;
79
- createdAt: string;
80
79
  updatedAt: string;
80
+ createdAt: string;
81
81
  buildId: string;
82
82
  checks?: {
83
83
  command: string;
package/dist/id.d.ts ADDED
@@ -0,0 +1,114 @@
1
+ /**
2
+ * Record ids: RFC 9562 UUIDv7 with the random bits put to work (documentation/ids.md).
3
+ *
4
+ * 128 bits, most significant first:
5
+ * 0–47 unix_ts_ms milliseconds since 1970-01-01 (standard v7)
6
+ * 48–51 version 0111
7
+ * 52–63 rand_a (12) top 12 bits of the sub-millisecond nanoseconds (RFC 9562 §6.2 Method 3)
8
+ * 64–65 variant 10
9
+ * 66–73 (8) low 8 bits of the sub-millisecond nanoseconds (12 + 8 = 20 bits: 0–999,999)
10
+ * 74–83 (10) record type (ID_TYPES)
11
+ * 84–99 (16) process and thread
12
+ * 100–115 (16) host
13
+ * 116–127 (12) counter
14
+ *
15
+ * Ids sort lexicographically by time, to the nanosecond within a process. The
16
+ * module has no top-level Node imports, so a browser bundle can import it (from
17
+ * `@aigile/core/id`); there the process and host fields are random per page load.
18
+ */
19
+ /**
20
+ * The record types and their fixed numbers (10 bits, 0x000–0x3FF). Never
21
+ * renumber or reuse a number; add new types at the end. The table is in
22
+ * documentation/ids.md.
23
+ */
24
+ export declare const ID_TYPES: {
25
+ readonly spec: 0;
26
+ readonly user: 1;
27
+ readonly organization: 2;
28
+ readonly project: 3;
29
+ readonly role: 4;
30
+ readonly 'role-assignment': 5;
31
+ readonly deliverable: 6;
32
+ readonly build: 7;
33
+ readonly review: 8;
34
+ readonly verification: 9;
35
+ readonly release: 10;
36
+ readonly 'action-item': 11;
37
+ readonly question: 12;
38
+ readonly conflict: 13;
39
+ readonly 'change-set': 14;
40
+ readonly track: 15;
41
+ readonly milestone: 16;
42
+ readonly conversation: 17;
43
+ readonly message: 18;
44
+ readonly 'api-token': 19;
45
+ readonly sweep: 20;
46
+ readonly audit: 21;
47
+ readonly 'test-case': 22;
48
+ readonly 'ai-call': 23;
49
+ readonly reassignment: 24;
50
+ readonly 'spec-review': 25;
51
+ readonly 'spec-sweep': 26;
52
+ readonly 'source-cursor': 27;
53
+ readonly 'spec-draft': 28;
54
+ readonly cache: 29;
55
+ readonly 'conversation-message': 30;
56
+ readonly resolution: 31;
57
+ readonly 'test-run': 32;
58
+ readonly 'spec-reference': 33;
59
+ readonly attachment: 34;
60
+ readonly 'attachment-original': 35;
61
+ readonly 'account-token': 36;
62
+ };
63
+ export type IdType = keyof typeof ID_TYPES;
64
+ /** The largest record type number the 10-bit field holds. */
65
+ export declare const ID_TYPE_MAX = 1023;
66
+ /** What an id of this format says about itself. */
67
+ export interface ParsedId {
68
+ /** Milliseconds since 1970-01-01 (the v7 `unix_ts_ms`). */
69
+ timestampMs: number;
70
+ /** Nanoseconds within that millisecond (0–999,999). */
71
+ subMsNanos: number;
72
+ /** The record type number. */
73
+ type: number;
74
+ /** The record type's name, or null for a number not in ID_TYPES. */
75
+ typeName: IdType | null;
76
+ /** The process and thread field (16 bits). */
77
+ process: number;
78
+ /** The host field (16 bits). */
79
+ host: number;
80
+ /** The per-process counter (12 bits). */
81
+ counter: number;
82
+ }
83
+ /** A UUIDv7 in canonical form: version nibble 7, variant 10. */
84
+ export declare const UUID_V7_PATTERN: RegExp;
85
+ /** Options for an id generator; everything defaults to this process's real values. */
86
+ export interface IdGeneratorOptions {
87
+ /** Nanoseconds since 1970-01-01. Default: Date.now() at load plus elapsed process.hrtime. */
88
+ clock?: () => bigint;
89
+ /** The 16-bit process and thread field. */
90
+ process?: number;
91
+ /** The 16-bit host field. */
92
+ host?: number;
93
+ /** A random integer in [0, n). */
94
+ random?: (n: number) => number;
95
+ }
96
+ /** Make an id generator (the module's `newId` is one with the defaults; tests inject a clock). */
97
+ export declare function createIdGenerator(options?: IdGeneratorOptions): (type: IdType) => string;
98
+ /**
99
+ * Read an id of this format, or null for one that is not: an older id, a
100
+ * random v4, or a v7 from elsewhere whose sub-millisecond field is out of range.
101
+ */
102
+ export declare function parseId(id: string): ParsedId | null;
103
+ /**
104
+ * Eight hex digits that tell records apart in a message, a log line or a
105
+ * branch name. The first eight digits of an id of this format are the top of
106
+ * its timestamp, the same for every id made within about a minute, so for
107
+ * these it is the low 24 bits of the milliseconds and the top 8 bits of the
108
+ * sub-millisecond nanoseconds (unique to about 4 µs within 4.6 hours). Any
109
+ * other id gives its first eight characters, as before.
110
+ */
111
+ export declare function shortId(id: string): string;
112
+ /** A new record id for a record of this type (see ID_TYPES). */
113
+ export declare const newId: (type: IdType) => string;
114
+ //# sourceMappingURL=id.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"id.d.ts","sourceRoot":"","sources":["../src/id.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;;GAIG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCX,CAAC;AAEX,MAAM,MAAM,MAAM,GAAG,MAAM,OAAO,QAAQ,CAAC;AAE3C,6DAA6D;AAC7D,eAAO,MAAM,WAAW,OAAQ,CAAC;AAIjC,mDAAmD;AACnD,MAAM,WAAW,QAAQ;IACvB,2DAA2D;IAC3D,WAAW,EAAE,MAAM,CAAC;IACpB,uDAAuD;IACvD,UAAU,EAAE,MAAM,CAAC;IACnB,8BAA8B;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,oEAAoE;IACpE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,8CAA8C;IAC9C,OAAO,EAAE,MAAM,CAAC;IAChB,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,gEAAgE;AAChE,eAAO,MAAM,eAAe,QAA0E,CAAC;AAKvG,sFAAsF;AACtF,MAAM,WAAW,kBAAkB;IACjC,6FAA6F;IAC7F,KAAK,CAAC,EAAE,MAAM,MAAM,CAAC;IACrB,2CAA2C;IAC3C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6BAA6B;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;CAChC;AAED,kGAAkG;AAClG,wBAAgB,iBAAiB,CAAC,OAAO,GAAE,kBAAuB,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAyB5F;AAWD;;;GAGG;AACH,wBAAgB,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAiBnD;AAED;;;;;;;GAOG;AACH,wBAAgB,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAI1C;AAgED,gEAAgE;AAChE,eAAO,MAAM,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAA4B,CAAC"}
package/dist/id.js ADDED
@@ -0,0 +1,204 @@
1
+ /**
2
+ * Record ids: RFC 9562 UUIDv7 with the random bits put to work (documentation/ids.md).
3
+ *
4
+ * 128 bits, most significant first:
5
+ * 0–47 unix_ts_ms milliseconds since 1970-01-01 (standard v7)
6
+ * 48–51 version 0111
7
+ * 52–63 rand_a (12) top 12 bits of the sub-millisecond nanoseconds (RFC 9562 §6.2 Method 3)
8
+ * 64–65 variant 10
9
+ * 66–73 (8) low 8 bits of the sub-millisecond nanoseconds (12 + 8 = 20 bits: 0–999,999)
10
+ * 74–83 (10) record type (ID_TYPES)
11
+ * 84–99 (16) process and thread
12
+ * 100–115 (16) host
13
+ * 116–127 (12) counter
14
+ *
15
+ * Ids sort lexicographically by time, to the nanosecond within a process. The
16
+ * module has no top-level Node imports, so a browser bundle can import it (from
17
+ * `@aigile/core/id`); there the process and host fields are random per page load.
18
+ */
19
+ /**
20
+ * The record types and their fixed numbers (10 bits, 0x000–0x3FF). Never
21
+ * renumber or reuse a number; add new types at the end. The table is in
22
+ * documentation/ids.md.
23
+ */
24
+ export const ID_TYPES = {
25
+ spec: 0x000,
26
+ user: 0x001,
27
+ organization: 0x002,
28
+ project: 0x003,
29
+ role: 0x004,
30
+ 'role-assignment': 0x005,
31
+ deliverable: 0x006,
32
+ build: 0x007,
33
+ review: 0x008,
34
+ verification: 0x009,
35
+ release: 0x00a,
36
+ 'action-item': 0x00b,
37
+ question: 0x00c,
38
+ conflict: 0x00d,
39
+ 'change-set': 0x00e,
40
+ track: 0x00f,
41
+ milestone: 0x010,
42
+ conversation: 0x011,
43
+ message: 0x012,
44
+ 'api-token': 0x013,
45
+ sweep: 0x014,
46
+ audit: 0x015,
47
+ 'test-case': 0x016,
48
+ 'ai-call': 0x017,
49
+ reassignment: 0x018,
50
+ 'spec-review': 0x019,
51
+ 'spec-sweep': 0x01a,
52
+ 'source-cursor': 0x01b,
53
+ 'spec-draft': 0x01c,
54
+ cache: 0x01d,
55
+ 'conversation-message': 0x01e,
56
+ resolution: 0x01f,
57
+ 'test-run': 0x020,
58
+ 'spec-reference': 0x021,
59
+ attachment: 0x022,
60
+ 'attachment-original': 0x023,
61
+ 'account-token': 0x024,
62
+ };
63
+ /** The largest record type number the 10-bit field holds. */
64
+ export const ID_TYPE_MAX = 0x3ff;
65
+ const TYPE_NAMES = new Map(Object.entries(ID_TYPES).map(([name, n]) => [n, name]));
66
+ /** A UUIDv7 in canonical form: version nibble 7, variant 10. */
67
+ export const UUID_V7_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/;
68
+ const NS_PER_MS = 1000000n;
69
+ const COUNTER_MAX = 0xfff;
70
+ /** Make an id generator (the module's `newId` is one with the defaults; tests inject a clock). */
71
+ export function createIdGenerator(options = {}) {
72
+ const clock = options.clock ?? defaultClock();
73
+ const random = options.random ?? randomInt;
74
+ const proc = BigInt((options.process ?? processField()) & 0xffff);
75
+ const host = BigInt((options.host ?? hostField()) & 0xffff);
76
+ let lastNs = -1n;
77
+ let counter = 0;
78
+ return (type) => {
79
+ const typeNumber = ID_TYPES[type];
80
+ if (typeNumber === undefined)
81
+ throw new Error(`unknown id type: ${String(type)}`);
82
+ const now = clock();
83
+ if (now > lastNs) {
84
+ lastNs = now;
85
+ // A random start, with the top bit clear so a burst in one tick has room to count.
86
+ counter = random(0x800);
87
+ }
88
+ else if (counter < COUNTER_MAX) {
89
+ // Same tick, or the clock went backwards: keep the last time and count on.
90
+ counter += 1;
91
+ }
92
+ else {
93
+ // The counter is spent for this tick: borrow the next nanosecond.
94
+ lastNs += 1n;
95
+ counter = 0;
96
+ }
97
+ return encode(lastNs, typeNumber, proc, host, counter);
98
+ };
99
+ }
100
+ function encode(ns, type, proc, host, counter) {
101
+ const ms = ns / NS_PER_MS;
102
+ const sub = ns % NS_PER_MS;
103
+ const hi = ((ms & 0xffffffffffffn) << 16n) | (0x7n << 12n) | (sub >> 8n);
104
+ const lo = (0x2n << 62n) | ((sub & 0xffn) << 54n) | (BigInt(type) << 44n) | (proc << 28n) | (host << 12n) | BigInt(counter);
105
+ const hex = hi.toString(16).padStart(16, '0') + lo.toString(16).padStart(16, '0');
106
+ return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;
107
+ }
108
+ /**
109
+ * Read an id of this format, or null for one that is not: an older id, a
110
+ * random v4, or a v7 from elsewhere whose sub-millisecond field is out of range.
111
+ */
112
+ export function parseId(id) {
113
+ if (typeof id !== 'string' || !UUID_V7_PATTERN.test(id))
114
+ return null;
115
+ const hex = id.replace(/-/g, '');
116
+ const hi = BigInt(`0x${hex.slice(0, 16)}`);
117
+ const lo = BigInt(`0x${hex.slice(16)}`);
118
+ const subMsNanos = Number(((hi & 0xfffn) << 8n) | ((lo >> 54n) & 0xffn));
119
+ if (subMsNanos >= 1_000_000)
120
+ return null;
121
+ const type = Number((lo >> 44n) & 0x3ffn);
122
+ return {
123
+ timestampMs: Number(hi >> 16n),
124
+ subMsNanos,
125
+ type,
126
+ typeName: TYPE_NAMES.get(type) ?? null,
127
+ process: Number((lo >> 28n) & 0xffffn),
128
+ host: Number((lo >> 12n) & 0xffffn),
129
+ counter: Number(lo & 0xfffn),
130
+ };
131
+ }
132
+ /**
133
+ * Eight hex digits that tell records apart in a message, a log line or a
134
+ * branch name. The first eight digits of an id of this format are the top of
135
+ * its timestamp, the same for every id made within about a minute, so for
136
+ * these it is the low 24 bits of the milliseconds and the top 8 bits of the
137
+ * sub-millisecond nanoseconds (unique to about 4 µs within 4.6 hours). Any
138
+ * other id gives its first eight characters, as before.
139
+ */
140
+ export function shortId(id) {
141
+ if (!parseId(id))
142
+ return id.slice(0, 8);
143
+ const hex = id.replace(/-/g, '');
144
+ return hex.slice(6, 12) + hex.slice(13, 15);
145
+ }
146
+ const nodeProcess = globalThis.process;
147
+ function builtin(id) {
148
+ try {
149
+ return nodeProcess?.getBuiltinModule?.(id);
150
+ }
151
+ catch {
152
+ return undefined;
153
+ }
154
+ }
155
+ function randomInt(n) {
156
+ const buf = new Uint32Array(1);
157
+ globalThis.crypto.getRandomValues(buf);
158
+ return buf[0] % n;
159
+ }
160
+ /** Wall-clock ms at load plus the monotonic time elapsed since, in nanoseconds. */
161
+ function defaultClock() {
162
+ const hrtime = nodeProcess?.hrtime?.bigint;
163
+ if (typeof hrtime === 'function') {
164
+ const anchorNs = BigInt(Date.now()) * NS_PER_MS;
165
+ const anchorHr = hrtime();
166
+ return () => anchorNs + (hrtime() - anchorHr);
167
+ }
168
+ const perf = globalThis.performance;
169
+ if (perf)
170
+ return () => BigInt(Math.round((perf.timeOrigin + perf.now()) * 1e6));
171
+ return () => BigInt(Date.now()) * NS_PER_MS;
172
+ }
173
+ /** pid xor (threadId << 8), folded to 16 bits; random where there is no process. */
174
+ function processField() {
175
+ const pid = nodeProcess?.pid;
176
+ if (typeof pid !== 'number')
177
+ return randomInt(0x10000);
178
+ const threadId = builtin('node:worker_threads')?.threadId ?? 0;
179
+ const v = (pid ^ (threadId << 8)) >>> 0;
180
+ return (v ^ (v >>> 16)) & 0xffff;
181
+ }
182
+ /** The first 16 bits of SHA-256 over the sorted non-internal MAC addresses (else the hostname); random where there is no OS. */
183
+ function hostField() {
184
+ const os = builtin('node:os');
185
+ const crypto = builtin('node:crypto');
186
+ if (!os || !crypto)
187
+ return randomInt(0x10000);
188
+ const macs = new Set();
189
+ try {
190
+ for (const list of Object.values(os.networkInterfaces()))
191
+ for (const i of list ?? [])
192
+ if (!i.internal && i.mac && i.mac !== '00:00:00:00:00:00')
193
+ macs.add(i.mac.toLowerCase());
194
+ }
195
+ catch {
196
+ // No interfaces to read: the hostname stands in.
197
+ }
198
+ const basis = [...macs].sort().join(',') || os.hostname();
199
+ const digest = crypto.createHash('sha256').update(basis).digest();
200
+ return ((digest[0] << 8) | digest[1]) & 0xffff;
201
+ }
202
+ /** A new record id for a record of this type (see ID_TYPES). */
203
+ export const newId = createIdGenerator();
204
+ //# sourceMappingURL=id.js.map
package/dist/id.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"id.js","sourceRoot":"","sources":["../src/id.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,KAAK;IACX,YAAY,EAAE,KAAK;IACnB,OAAO,EAAE,KAAK;IACd,IAAI,EAAE,KAAK;IACX,iBAAiB,EAAE,KAAK;IACxB,WAAW,EAAE,KAAK;IAClB,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE,KAAK;IACb,YAAY,EAAE,KAAK;IACnB,OAAO,EAAE,KAAK;IACd,aAAa,EAAE,KAAK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E,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAE,CAAC,GAAG,MAAM,CAAC;AACnD,CAAC;AAED,gEAAgE;AAChE,MAAM,CAAC,MAAM,KAAK,GAA6B,iBAAiB,EAAE,CAAC"}
package/dist/ids.d.ts CHANGED
@@ -1,5 +1,3 @@
1
- /** Generate a new opaque entity id. */
2
- export declare function newId(): string;
3
1
  /** Current timestamp as an ISO-8601 string (the canonical time format across the datastore). */
4
2
  export declare function nowIso(): string;
5
3
  //# sourceMappingURL=ids.d.ts.map
package/dist/ids.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"ids.d.ts","sourceRoot":"","sources":["../src/ids.ts"],"names":[],"mappings":"AAEA,uCAAuC;AACvC,wBAAgB,KAAK,IAAI,MAAM,CAE9B;AAED,gGAAgG;AAChG,wBAAgB,MAAM,IAAI,MAAM,CAE/B"}
1
+ {"version":3,"file":"ids.d.ts","sourceRoot":"","sources":["../src/ids.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,wBAAgB,MAAM,IAAI,MAAM,CAE/B"}
package/dist/ids.js CHANGED
@@ -1,8 +1,3 @@
1
- import { randomUUID } from 'node:crypto';
2
- /** Generate a new opaque entity id. */
3
- export function newId() {
4
- return randomUUID();
5
- }
6
1
  /** Current timestamp as an ISO-8601 string (the canonical time format across the datastore). */
7
2
  export function nowIso() {
8
3
  return new Date().toISOString();
package/dist/ids.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"ids.js","sourceRoot":"","sources":["../src/ids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,uCAAuC;AACvC,MAAM,UAAU,KAAK;IACnB,OAAO,UAAU,EAAE,CAAC;AACtB,CAAC;AAED,gGAAgG;AAChG,MAAM,UAAU,MAAM;IACpB,OAAO,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;AAClC,CAAC"}
1
+ {"version":3,"file":"ids.js","sourceRoot":"","sources":["../src/ids.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,MAAM,UAAU,MAAM;IACpB,OAAO,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;AAClC,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,7 +1,14 @@
1
+ export * from './id.js';
1
2
  export * from './ids.js';
2
3
  export * from './collections.js';
4
+ export * from './outline.js';
3
5
  export * from './mode.js';
4
6
  export * from './config.js';
5
7
  export * from './domain/index.js';
6
8
  export * from './plugins/index.js';
9
+ export * from './template.js';
10
+ export * from './settings.js';
11
+ export * from './jira.js';
12
+ export { PREAMBLE, MISSION } from './preamble.js';
13
+ export { readPrompt } from './prompts.js';
7
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
package/dist/index.js CHANGED
@@ -1,7 +1,14 @@
1
+ export * from './id.js';
1
2
  export * from './ids.js';
2
3
  export * from './collections.js';
4
+ export * from './outline.js';
3
5
  export * from './mode.js';
4
6
  export * from './config.js';
5
7
  export * from './domain/index.js';
6
8
  export * from './plugins/index.js';
9
+ export * from './template.js';
10
+ export * from './settings.js';
11
+ export * from './jira.js';
12
+ export { PREAMBLE, MISSION } from './preamble.js';
13
+ export { readPrompt } from './prompts.js';
7
14
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
package/dist/jira.d.ts ADDED
@@ -0,0 +1,26 @@
1
+ import type { AppConfig } from './config.js';
2
+ import type { JiraConnection } from './template.js';
3
+ /** What a ticket's Jira status means for aigile's agents (documentation/action-items.md "Ticket states"); `unknown`: not read. */
4
+ export type TicketGroup = 'actionable' | 'inFlight' | 'done' | 'unknown';
5
+ export declare const TICKET_GROUPS: readonly TicketGroup[];
6
+ /** How each group reads to a person. */
7
+ export declare const TICKET_GROUP_LABELS: Record<TicketGroup, string>;
8
+ type TicketStates = AppConfig['jira']['ticketStates'];
9
+ /**
10
+ * A status's group: by its name first (case-insensitive), then by its category
11
+ * (a category name such as `In Progress`, or a key such as `indeterminate`).
12
+ * A status the config names in no list and whose category it names in none either is `unknown`.
13
+ */
14
+ export declare function ticketGroup(status: {
15
+ name: string;
16
+ category?: string | null;
17
+ } | null | undefined, states: TicketStates): TicketGroup;
18
+ /** The installation's Jira connection: the Jira spec source or action source with this id, else the first Jira one; null when it has none. */
19
+ export declare function jiraConnectionOf(config: AppConfig, id?: string | null): (JiraConnection & {
20
+ id: string;
21
+ jql: string;
22
+ }) | null;
23
+ /** The Jira project a JQL names (`project = WF`, `project in (WF)`, `project = "WF"`), or null. */
24
+ export declare function jiraProjectOf(jql: string): string | null;
25
+ export {};
26
+ //# sourceMappingURL=jira.d.ts.map