@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
@@ -0,0 +1,155 @@
1
+ import { z } from 'zod';
2
+ import { baseEntitySchema, idSchema, isoDateTimeSchema } from './common.js';
3
+ /**
4
+ * Every action item is one of two things (documentation/action-items.md "Types"):
5
+ * a **question** (someone must answer or decide; a decision is a question with
6
+ * set choices) or a **task** (someone must do something).
7
+ */
8
+ export const ACTION_BASES = ['question', 'task'];
9
+ export const actionBaseSchema = z.enum(ACTION_BASES);
10
+ /**
11
+ * The built-in kinds (types). A kind is the id of an action type: the built-in
12
+ * ones below, or one a template or an action source defines (`ActionTypeDefinition`,
13
+ * `@aigile/core` template.ts). `task`, `question`, `review`, `conflict` and
14
+ * `approval` are generic; software adds gate and incident; content, edit,
15
+ * publish and signal.
16
+ */
17
+ export const ACTION_KINDS = ['task', 'question', 'conflict', 'review', 'edit', 'approval', 'gate', 'publish', 'incident', 'signal'];
18
+ export const actionKindSchema = z.string().min(1);
19
+ /**
20
+ * Whether resolving an item of a type needs a review (documentation/action-items.md
21
+ * "Reviews"): `never`; `optional` (off unless the requester or the assignee asks);
22
+ * `default` (on unless the requester waives it); `always` (nobody can waive it).
23
+ */
24
+ export const REVIEW_LEVELS = ['never', 'optional', 'default', 'always'];
25
+ /** The built-in types. */
26
+ export const BUILT_IN_ACTION_TYPES = [
27
+ { id: 'task', base: 'task', label: 'Task', plural: 'Tasks', description: 'Something to do; it may hold up someone else.', review: 'default' },
28
+ { id: 'question', base: 'question', label: 'Question', plural: 'Questions', description: 'Something to answer.', review: 'optional' },
29
+ { id: 'conflict', base: 'question', label: 'Conflict', plural: 'Conflicts', description: 'Two specs disagree: decide which wins, or reconcile them.', review: 'never' },
30
+ { id: 'review', base: 'question', label: 'Review', plural: 'Reviews', description: 'A read of work, or of a resolution, to accept or send back.', review: 'never' },
31
+ { id: 'edit', base: 'question', label: 'Edit', plural: 'Edits', description: 'A draft to accept or send back.', review: 'never' },
32
+ { id: 'approval', base: 'question', label: 'Approval', plural: 'Approvals', description: 'A plan or a change to approve or reject.', review: 'never' },
33
+ { id: 'gate', base: 'question', label: 'Gate', plural: 'Gates', description: 'A go for an environment: go, roll back or skip.', review: 'never' },
34
+ { id: 'publish', base: 'question', label: 'Publish', plural: 'Publish gates', description: 'A go to publish.', review: 'never' },
35
+ { id: 'incident', base: 'task', label: 'Incident', plural: 'Incidents', description: 'Something the Monitor found to look into.', review: 'optional' },
36
+ { id: 'signal', base: 'task', label: 'Signal', plural: 'Signals', description: 'Something the content Monitor found to look into.', review: 'optional' },
37
+ ];
38
+ /** A type's review level (`optional` when the type does not say, or is unknown). */
39
+ export function reviewLevelOf(kind, types = BUILT_IN_ACTION_TYPES) {
40
+ return types.find((t) => t.id === kind)?.review ?? BUILT_IN_ACTION_TYPES.find((t) => t.id === kind)?.review ?? 'optional';
41
+ }
42
+ /** The base of a kind among the given types; an unknown kind is a task (it asks someone to do something). */
43
+ export function baseOfKind(kind, types = BUILT_IN_ACTION_TYPES) {
44
+ return types.find((t) => t.id === kind)?.base ?? BUILT_IN_ACTION_TYPES.find((t) => t.id === kind)?.base ?? 'task';
45
+ }
46
+ export const actionItemStatusSchema = z.enum(['open', 'resolving', 'done']);
47
+ /** Where an agent's task stands in the agents' queue. */
48
+ export const TASK_RUN_STATES = ['held', 'queued', 'running', 'waiting', 'done', 'failed', 'blocked', 'cancelled'];
49
+ export const taskRunSchema = z.object({
50
+ /** `held`: an agent's task that waits for a person to queue it (brought in from Jira); `waiting`: on the items it is blocked by (a question the agent asked), queued again when they are done. */
51
+ state: z.enum(TASK_RUN_STATES),
52
+ queuedAt: isoDateTimeSchema.nullable().default(null),
53
+ startedAt: isoDateTimeSchema.nullable().default(null),
54
+ finishedAt: isoDateTimeSchema.nullable().default(null),
55
+ /** What the agent did or why it could not, in a line or a few. */
56
+ detail: z.string().nullable().default(null),
57
+ costUsd: z.number().nonnegative().nullable().default(null),
58
+ /** The agent key it runs as ("engineer"), for the queue's lanes. */
59
+ agentKey: z.string().nullable().default(null),
60
+ attempts: z.number().int().nonnegative().default(0),
61
+ });
62
+ export const actionItemNoteSchema = z.object({
63
+ at: isoDateTimeSchema,
64
+ byUserId: idSchema.nullable().default(null),
65
+ byRoleId: idSchema.nullable().default(null),
66
+ text: z.string(),
67
+ });
68
+ /**
69
+ * Something waiting for a person or an agent: one record per assignee per thing. The item
70
+ * says what kind of action it asks for, whom it waits for, what it refers to
71
+ * (a question, a conflict, a build, a release) and who is waiting on the
72
+ * answer. Done items stay as the record of what was asked. The workspace
73
+ * shows them as the person's queues, one per kind.
74
+ */
75
+ export const actionItemSchema = baseEntitySchema.extend({
76
+ kind: actionKindSchema,
77
+ status: actionItemStatusSchema.default('open'),
78
+ /** The person it waits on; null when it waits on an agent role (`assigneeRoleId`). */
79
+ assigneeUserId: idSchema.nullable().default(null),
80
+ /** The agent role it waits on (a task for the Engineer); null when it waits on a person. */
81
+ assigneeRoleId: idSchema.nullable().default(null),
82
+ /** The person who opened it, who accepts its resolution; null when an agent or aigile opened it. */
83
+ openedByUserId: idSchema.nullable().default(null),
84
+ /** The agent role that opened it, if one did. */
85
+ openedByRoleId: idSchema.nullable().default(null),
86
+ title: z.string().min(1),
87
+ summary: z.string().default(''),
88
+ /** The record the item is about: `{ kind: 'conflict', id }`. */
89
+ ref: z.object({ kind: z.string(), id: idSchema }),
90
+ /** The agent role waiting on the answer, if any. */
91
+ waitingOnRoleId: idSchema.nullable().default(null),
92
+ projectIds: z.array(idSchema).default([]),
93
+ /** `owner`: it waits on this person; `new`: a CC, not yet followed or dismissed; `following`: a CC who keeps it until it is resolved. */
94
+ watch: z.enum(['owner', 'new', 'following']).default('owner'),
95
+ /** The items this one waits on: it cannot be resolved until they are done. */
96
+ blockedBy: z.array(idSchema).default([]),
97
+ /** The features (deliverables) it belongs to: worked out by aigile, or set by a person. */
98
+ deliverableIds: z.array(idSchema).default([]),
99
+ /** `auto`: aigile works them out again as records change; `person`: someone set them; null: not worked out yet. */
100
+ deliverablesSetBy: z.enum(['auto', 'person']).nullable().default(null),
101
+ /**
102
+ * Whether its resolution is reviewed, and who decided (documentation/action-items.md
103
+ * "Reviews"): the type's level, then the requester within it, then the assignee,
104
+ * who can add a review but not remove one. Null on older items: worked out from
105
+ * the type and the requester when needed.
106
+ */
107
+ review: z
108
+ .preprocess((raw) => {
109
+ if (!raw || typeof raw !== 'object')
110
+ return raw;
111
+ const r = raw;
112
+ if (Array.isArray(r.reviewers) || typeof r.reviewerUserId !== 'string')
113
+ return raw;
114
+ const { reviewerUserId, ...rest } = r;
115
+ return { ...rest, reviewers: [{ userId: reviewerUserId, optional: false }] };
116
+ }, z
117
+ .object({
118
+ required: z.boolean(),
119
+ decidedBy: z.enum(['type', 'requester', 'assignee']),
120
+ byUserId: idSchema.nullable().default(null),
121
+ /** Who reviews, each required or optional; the requester when empty. A required review needs at least one required reviewer. */
122
+ reviewers: z.array(z.object({ userId: idSchema, optional: z.boolean().default(false) })).default([]),
123
+ /** The reviewers who accepted the resolution waiting now (cleared when it is sent back). */
124
+ acceptedBy: z.array(idSchema).default([]),
125
+ })
126
+ .nullable())
127
+ .default(null),
128
+ /** What the assignee says resolves it, while it is reviewed (and after). */
129
+ resolution: z
130
+ .object({ note: z.string().default(''), byUserId: idSchema.nullable().default(null), byRoleId: idSchema.nullable().default(null), at: isoDateTimeSchema })
131
+ .nullable()
132
+ .default(null),
133
+ /** When it was done (older records have only `updatedAt`). */
134
+ doneAt: isoDateTimeSchema.nullable().default(null),
135
+ /** An agent's task: its place in the agents' queue. Null for a person's item. */
136
+ run: taskRunSchema.nullable().default(null),
137
+ /** An item an action source brought in (a Jira issue): where it lives and how it stands there. */
138
+ external: z
139
+ .object({
140
+ sourceId: z.string().min(1),
141
+ /** The issue key ("WF-123"). */
142
+ key: z.string().min(1),
143
+ url: z.string().nullable().default(null),
144
+ /** Its status there ("In Progress"). */
145
+ status: z.string().default(''),
146
+ syncedAt: isoDateTimeSchema,
147
+ /** Resolved in aigile and written back to the source (only when the source's write-back is on). */
148
+ writtenBackAt: isoDateTimeSchema.nullable().default(null),
149
+ })
150
+ .nullable()
151
+ .default(null),
152
+ /** Hand-overs, rejected resolutions and the like, oldest first. */
153
+ notes: z.array(actionItemNoteSchema).default([]),
154
+ });
155
+ //# sourceMappingURL=action-item.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action-item.js","sourceRoot":"","sources":["../../src/domain/action-item.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAE5E;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,UAAU,EAAE,MAAM,CAAU,CAAC;AAC1D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;AAGrD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,CAAU,CAAC;AAC7I,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAGlD;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,CAAU,CAAC;AAiBjF,0BAA0B;AAC1B,MAAM,CAAC,MAAM,qBAAqB,GAAoC;IACpE,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,+CAA+C,EAAE,MAAM,EAAE,SAAS,EAAE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 export declare const aiCallSchema: z.ZodObject<{
16
16
  roleId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
17
17
  /** What the call did, for people: "review spec revision". */
18
18
  purpose: z.ZodString;
19
+ /** The task the call was made for (documentation/action-items.md "Agent tasks"). */
20
+ taskId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
19
21
  /** The record the call was about, when there is one. */
20
22
  subject: z.ZodDefault<z.ZodNullable<z.ZodObject<{
21
23
  specId: z.ZodString;
@@ -52,18 +54,19 @@ export declare const aiCallSchema: z.ZodObject<{
52
54
  detail: z.ZodDefault<z.ZodNullable<z.ZodString>>;
53
55
  }, "strip", z.ZodTypeAny, {
54
56
  status: "ok" | "refused" | "error" | "blocked";
55
- model: string | null;
56
- effort: string | null;
57
57
  id: string;
58
- createdAt: string;
59
58
  updatedAt: string;
60
- roleId: string | null;
61
- costUsd: number | null;
62
- purpose: string;
63
59
  subject: {
64
60
  specId: string;
65
61
  revision: string;
66
62
  } | null;
63
+ model: string | null;
64
+ effort: string | null;
65
+ createdAt: string;
66
+ roleId: string | null;
67
+ costUsd: number | null;
68
+ purpose: string;
69
+ taskId: string | null;
67
70
  briefRevisions: {
68
71
  specId: string;
69
72
  revision: string;
@@ -77,17 +80,18 @@ export declare const aiCallSchema: z.ZodObject<{
77
80
  }, {
78
81
  status: "ok" | "refused" | "error" | "blocked";
79
82
  id: string;
80
- createdAt: string;
81
83
  updatedAt: string;
84
+ createdAt: string;
82
85
  purpose: string;
83
- model?: string | null | undefined;
84
- effort?: string | null | undefined;
85
- roleId?: string | null | undefined;
86
- costUsd?: number | null | undefined;
87
86
  subject?: {
88
87
  specId: string;
89
88
  revision: string;
90
89
  } | null | undefined;
90
+ model?: string | null | undefined;
91
+ effort?: string | null | undefined;
92
+ roleId?: string | null | undefined;
93
+ costUsd?: number | null | undefined;
94
+ taskId?: string | null | undefined;
91
95
  briefRevisions?: {
92
96
  specId: string;
93
97
  revision: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ai-call.d.ts","sourceRoot":"","sources":["../../src/domain/ai-call.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,kBAAkB,kDAAgD,CAAC;AAChF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D;;;;;GAKG;AACH,eAAO,MAAM,YAAY;;;;;IACvB,wDAAwD;;IAExD,6DAA6D;;IAE7D,wDAAwD;;;;;;;;;;;IAExD,gDAAgD;;;;;;;;;;;;;;;;;;IAShD,iFAAiF;;;IAGjF,0CAA0C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE1C,CAAC;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC"}
1
+ {"version":3,"file":"ai-call.d.ts","sourceRoot":"","sources":["../../src/domain/ai-call.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,kBAAkB,kDAAgD,CAAC;AAChF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D;;;;;GAKG;AACH,eAAO,MAAM,YAAY;;;;;IACvB,wDAAwD;;IAExD,6DAA6D;;IAE7D,oFAAoF;;IAEpF,wDAAwD;;;;;;;;;;;IAExD,gDAAgD;;;;;;;;;;;;;;;;;;IAShD,iFAAiF;;;IAGjF,0CAA0C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE1C,CAAC;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC"}
@@ -12,6 +12,8 @@ export const aiCallSchema = baseEntitySchema.extend({
12
12
  roleId: idSchema.nullable().default(null),
13
13
  /** What the call did, for people: "review spec revision". */
14
14
  purpose: z.string(),
15
+ /** The task the call was made for (documentation/action-items.md "Agent tasks"). */
16
+ taskId: idSchema.nullable().default(null),
15
17
  /** The record the call was about, when there is one. */
16
18
  subject: specRevisionRefSchema.nullable().default(null),
17
19
  /** The brief revisions in the system prompt. */
@@ -1 +1 @@
1
- {"version":3,"file":"ai-call.js","sourceRoot":"","sources":["../../src/domain/ai-call.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEhF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;AAGhF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,gBAAgB,CAAC,MAAM,CAAC;IAClD,wDAAwD;IACxD,MAAM,EAAE,QAAQ,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IACzC,6DAA6D;IAC7D,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,wDAAwD;IACxD,OAAO,EAAE,qBAAqB,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IACvD,gDAAgD;IAChD,cAAc,EAAE,CAAC,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IAC1D,MAAM,EAAE,kBAAkB;IAC1B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IAC1C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IAC3C,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EA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IAC1C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;CAC5C,CAAC,CAAC"}
@@ -84,6 +84,8 @@ export declare const buildSchema: z.ZodObject<{
84
84
  costUsd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
85
85
  /** Who asked for the build, who approved or rejected it, and why. */
86
86
  requestedBy: z.ZodDefault<z.ZodNullable<z.ZodString>>;
87
+ /** The deliverable this build works on (documentation/agents.md "Deliverables"), or null for a build of the whole project. */
88
+ deliverableId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
87
89
  decidedBy: z.ZodDefault<z.ZodNullable<z.ZodString>>;
88
90
  rejectReason: z.ZodDefault<z.ZodNullable<z.ZodString>>;
89
91
  /** The build this one re-does after a rejection. */
@@ -106,13 +108,35 @@ export declare const buildSchema: z.ZodObject<{
106
108
  number?: number | null | undefined;
107
109
  }>>>;
108
110
  pullRequestNote: z.ZodDefault<z.ZodNullable<z.ZodString>>;
111
+ /** Why the build stopped before planning or building, when it did on a rule a person may override: `no-actionable-tickets` (every Jira ticket of its feature is in flight or done). */
112
+ stopReason: z.ZodDefault<z.ZodNullable<z.ZodEnum<["no-actionable-tickets"]>>>;
113
+ /** The host's pipeline or check results for the branch, by name, from change events (documentation/events.md). */
114
+ hostChecks: z.ZodDefault<z.ZodArray<z.ZodObject<{
115
+ name: z.ZodString;
116
+ status: z.ZodEnum<["success", "failure", "pending", "cancelled"]>;
117
+ url: z.ZodDefault<z.ZodNullable<z.ZodString>>;
118
+ sha: z.ZodDefault<z.ZodNullable<z.ZodString>>;
119
+ at: z.ZodString;
120
+ }, "strip", z.ZodTypeAny, {
121
+ at: string;
122
+ status: "success" | "failure" | "pending" | "cancelled";
123
+ name: string;
124
+ url: string | null;
125
+ sha: string | null;
126
+ }, {
127
+ at: string;
128
+ status: "success" | "failure" | "pending" | "cancelled";
129
+ name: string;
130
+ url?: string | null | undefined;
131
+ sha?: string | null | undefined;
132
+ }>, "many">>;
109
133
  }, "strip", z.ZodTypeAny, {
110
- branch: string | null;
111
- status: "planned" | "plan-ready" | "building" | "checking" | "proposed" | "pushed" | "merged" | "declined" | "rejected" | "discarded" | "failed";
134
+ status: "proposed" | "merged" | "planned" | "plan-ready" | "building" | "checking" | "pushed" | "declined" | "rejected" | "discarded" | "failed";
112
135
  projectId: string;
136
+ branch: string | null;
113
137
  id: string;
114
- createdAt: string;
115
138
  updatedAt: string;
139
+ createdAt: string;
116
140
  timestamp: string;
117
141
  specRevisions: {
118
142
  specId: string;
@@ -130,6 +154,7 @@ export declare const buildSchema: z.ZodObject<{
130
154
  }[];
131
155
  costUsd: number | null;
132
156
  requestedBy: string | null;
157
+ deliverableId: string | null;
133
158
  decidedBy: string | null;
134
159
  rejectReason: string | null;
135
160
  retryOf: string | null;
@@ -141,15 +166,23 @@ export declare const buildSchema: z.ZodObject<{
141
166
  url: string;
142
167
  } | null;
143
168
  pullRequestNote: string | null;
169
+ stopReason: "no-actionable-tickets" | null;
170
+ hostChecks: {
171
+ at: string;
172
+ status: "success" | "failure" | "pending" | "cancelled";
173
+ name: string;
174
+ url: string | null;
175
+ sha: string | null;
176
+ }[];
144
177
  }, {
145
178
  projectId: string;
146
179
  id: string;
147
- createdAt: string;
148
180
  updatedAt: string;
181
+ createdAt: string;
149
182
  timestamp: string;
150
183
  gitRef: string;
184
+ status?: "proposed" | "merged" | "planned" | "plan-ready" | "building" | "checking" | "pushed" | "declined" | "rejected" | "discarded" | "failed" | undefined;
151
185
  branch?: string | null | undefined;
152
- status?: "planned" | "plan-ready" | "building" | "checking" | "proposed" | "pushed" | "merged" | "declined" | "rejected" | "discarded" | "failed" | undefined;
153
186
  specRevisions?: {
154
187
  specId: string;
155
188
  revision: string;
@@ -165,6 +198,7 @@ export declare const buildSchema: z.ZodObject<{
165
198
  }[] | undefined;
166
199
  costUsd?: number | null | undefined;
167
200
  requestedBy?: string | null | undefined;
201
+ deliverableId?: string | null | undefined;
168
202
  decidedBy?: string | null | undefined;
169
203
  rejectReason?: string | null | undefined;
170
204
  retryOf?: string | null | undefined;
@@ -176,6 +210,14 @@ export declare const buildSchema: z.ZodObject<{
176
210
  number?: number | null | undefined;
177
211
  } | null | undefined;
178
212
  pullRequestNote?: string | null | undefined;
213
+ stopReason?: "no-actionable-tickets" | null | undefined;
214
+ hostChecks?: {
215
+ at: string;
216
+ status: "success" | "failure" | "pending" | "cancelled";
217
+ name: string;
218
+ url?: string | null | undefined;
219
+ sha?: string | null | undefined;
220
+ }[] | undefined;
179
221
  }>;
180
222
  export type Build = z.infer<typeof buildSchema>;
181
223
  //# sourceMappingURL=build.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/domain/build.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,2IAA4I,CAAC;AACxK,eAAO,MAAM,iBAAiB,6IAAyB,CAAC;AACxD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,iGAAiG;AACjG,eAAO,MAAM,kBAAkB;;IAE7B,mDAAmD;;;IAGnD,oCAAoC;;;;;;;;;;;;EAEpC,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D;;;;;;GAMG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;IAItB,4CAA4C;;;IAG5C,wEAAwE;;;IAGxE,iGAAiG;;IAEjG,8EAA8E;;;;QA3B9E,mDAAmD;;;QAGnD,oCAAoC;;;;;;;;;;;;;;IA4BpC,qEAAqE;;;;IAIrE,oDAAoD;;IAEpD,oEAAoE;;IAEpE,mFAAmF;;IAEnF,wFAAwF;;IAExF,iEAAiE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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extend({
43
43
  costUsd: z.number().nonnegative().nullable().default(null),
44
44
  /** Who asked for the build, who approved or rejected it, and why. */
45
45
  requestedBy: idSchema.nullable().default(null),
46
+ /** The deliverable this build works on (documentation/agents.md "Deliverables"), or null for a build of the whole project. */
47
+ deliverableId: idSchema.nullable().default(null),
46
48
  decidedBy: idSchema.nullable().default(null),
47
49
  rejectReason: z.string().nullable().default(null),
48
50
  /** The build this one re-does after a rejection. */
@@ -56,5 +58,9 @@ export const buildSchema = baseEntitySchema.extend({
56
58
  /** The pull request opened on approval, or why there is none. */
57
59
  pullRequest: z.object({ url: z.string(), number: z.number().int().nullable().default(null) }).nullable().default(null),
58
60
  pullRequestNote: z.string().nullable().default(null),
61
+ /** Why the build stopped before planning or building, when it did on a rule a person may override: `no-actionable-tickets` (every Jira ticket of its feature is in flight or done). */
62
+ stopReason: z.enum(['no-actionable-tickets']).nullable().default(null),
63
+ /** The host's pipeline or check results for the branch, by name, from change events (documentation/events.md). */
64
+ hostChecks: z.array(z.object({ name: z.string(), status: z.enum(['success', 'failure', 'pending', 'cancelled']), url: z.string().nullable().default(null), sha: z.string().nullable().default(null), at: z.string() })).default([]),
59
65
  });
60
66
  //# sourceMappingURL=build.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/domain/build.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEnG;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,CAAU,CAAC;AACxK,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,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AAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IACtH,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IACpD,uLAAuL;IACvL,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IACtE,kHAAkH;IAClH,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;CACpO,CAAC,CAAC"}
@@ -0,0 +1,216 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * A change set (documentation/sources.md "Change sets"): a titled batch of
4
+ * spec edits proposed together, reviewed together in one window, and saved
5
+ * together, one commit per git source. An agent may only propose one; a
6
+ * person approves and saves it, so a spec is always written or approved by
7
+ * a human. When it resolves a question, the set names it, and the commit
8
+ * message says so.
9
+ */
10
+ export declare const changeSetItemSchema: z.ZodObject<{
11
+ /** The spec edited or removed; null for a new spec. */
12
+ specId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
13
+ action: z.ZodEnum<["create", "revise", "remove"]>;
14
+ title: z.ZodString;
15
+ /** The whole content after the change (ignored for a removal). */
16
+ content: z.ZodDefault<z.ZodString>;
17
+ /** Why this change, in the proposer's words; shown beside the diff. */
18
+ rationale: z.ZodDefault<z.ZodString>;
19
+ /** The spec's revision the edit was based on; a save over a newer one is a conflict. */
20
+ baseRevision: z.ZodDefault<z.ZodNullable<z.ZodString>>;
21
+ /** For a new spec: where it applies. */
22
+ organizationIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
23
+ projectIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
24
+ roleIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
25
+ /** Once saved: the spec and the revision the save produced. */
26
+ result: z.ZodDefault<z.ZodNullable<z.ZodObject<{
27
+ specId: z.ZodString;
28
+ revision: z.ZodString;
29
+ }, "strip", z.ZodTypeAny, {
30
+ specId: string;
31
+ revision: string;
32
+ }, {
33
+ specId: string;
34
+ revision: string;
35
+ }>>>;
36
+ }, "strip", z.ZodTypeAny, {
37
+ organizationIds: string[];
38
+ projectIds: string[];
39
+ specId: string | null;
40
+ title: string;
41
+ content: string;
42
+ baseRevision: string | null;
43
+ roleIds: string[];
44
+ action: "create" | "revise" | "remove";
45
+ rationale: string;
46
+ result: {
47
+ specId: string;
48
+ revision: string;
49
+ } | null;
50
+ }, {
51
+ title: string;
52
+ action: "create" | "revise" | "remove";
53
+ organizationIds?: string[] | undefined;
54
+ projectIds?: string[] | undefined;
55
+ specId?: string | null | undefined;
56
+ content?: string | undefined;
57
+ baseRevision?: string | null | undefined;
58
+ roleIds?: string[] | undefined;
59
+ rationale?: string | undefined;
60
+ result?: {
61
+ specId: string;
62
+ revision: string;
63
+ } | null | undefined;
64
+ }>;
65
+ export type ChangeSetItem = z.infer<typeof changeSetItemSchema>;
66
+ export declare const CHANGE_SET_STATUSES: readonly ["proposed", "saved", "discarded"];
67
+ export declare const changeSetSchema: z.ZodObject<{
68
+ id: z.ZodString;
69
+ createdAt: z.ZodString;
70
+ updatedAt: z.ZodString;
71
+ } & {
72
+ title: z.ZodString;
73
+ /** Why, in Markdown: the answer it carries into the specs, the decision behind it. */
74
+ summary: z.ZodDefault<z.ZodString>;
75
+ proposedBy: z.ZodObject<{
76
+ kind: z.ZodEnum<["user", "agent"]>;
77
+ id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
78
+ }, "strip", z.ZodTypeAny, {
79
+ kind: "user" | "agent";
80
+ id: string | null;
81
+ }, {
82
+ kind: "user" | "agent";
83
+ id?: string | null | undefined;
84
+ }>;
85
+ status: z.ZodDefault<z.ZodEnum<["proposed", "saved", "discarded"]>>;
86
+ items: z.ZodArray<z.ZodObject<{
87
+ /** The spec edited or removed; null for a new spec. */
88
+ specId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
89
+ action: z.ZodEnum<["create", "revise", "remove"]>;
90
+ title: z.ZodString;
91
+ /** The whole content after the change (ignored for a removal). */
92
+ content: z.ZodDefault<z.ZodString>;
93
+ /** Why this change, in the proposer's words; shown beside the diff. */
94
+ rationale: z.ZodDefault<z.ZodString>;
95
+ /** The spec's revision the edit was based on; a save over a newer one is a conflict. */
96
+ baseRevision: z.ZodDefault<z.ZodNullable<z.ZodString>>;
97
+ /** For a new spec: where it applies. */
98
+ organizationIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
99
+ projectIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
100
+ roleIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
101
+ /** Once saved: the spec and the revision the save produced. */
102
+ result: z.ZodDefault<z.ZodNullable<z.ZodObject<{
103
+ specId: z.ZodString;
104
+ revision: z.ZodString;
105
+ }, "strip", z.ZodTypeAny, {
106
+ specId: string;
107
+ revision: string;
108
+ }, {
109
+ specId: string;
110
+ revision: string;
111
+ }>>>;
112
+ }, "strip", z.ZodTypeAny, {
113
+ organizationIds: string[];
114
+ projectIds: string[];
115
+ specId: string | null;
116
+ title: string;
117
+ content: string;
118
+ baseRevision: string | null;
119
+ roleIds: string[];
120
+ action: "create" | "revise" | "remove";
121
+ rationale: string;
122
+ result: {
123
+ specId: string;
124
+ revision: string;
125
+ } | null;
126
+ }, {
127
+ title: string;
128
+ action: "create" | "revise" | "remove";
129
+ organizationIds?: string[] | undefined;
130
+ projectIds?: string[] | undefined;
131
+ specId?: string | null | undefined;
132
+ content?: string | undefined;
133
+ baseRevision?: string | null | undefined;
134
+ roleIds?: string[] | undefined;
135
+ rationale?: string | undefined;
136
+ result?: {
137
+ specId: string;
138
+ revision: string;
139
+ } | null | undefined;
140
+ }>, "many">;
141
+ /** The question this set resolves, when it does. */
142
+ questionId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
143
+ /** The person asked to review and save it. */
144
+ reviewerUserId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
145
+ savedByUserId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
146
+ savedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
147
+ discardedByUserId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
148
+ /** Why it was discarded, when it was. */
149
+ discardReason: z.ZodDefault<z.ZodString>;
150
+ }, "strip", z.ZodTypeAny, {
151
+ status: "proposed" | "discarded" | "saved";
152
+ id: string;
153
+ title: string;
154
+ updatedAt: string;
155
+ createdAt: string;
156
+ summary: string;
157
+ reviewerUserId: string | null;
158
+ proposedBy: {
159
+ kind: "user" | "agent";
160
+ id: string | null;
161
+ };
162
+ items: {
163
+ organizationIds: string[];
164
+ projectIds: string[];
165
+ specId: string | null;
166
+ title: string;
167
+ content: string;
168
+ baseRevision: string | null;
169
+ roleIds: string[];
170
+ action: "create" | "revise" | "remove";
171
+ rationale: string;
172
+ result: {
173
+ specId: string;
174
+ revision: string;
175
+ } | null;
176
+ }[];
177
+ questionId: string | null;
178
+ savedByUserId: string | null;
179
+ savedAt: string | null;
180
+ discardedByUserId: string | null;
181
+ discardReason: string;
182
+ }, {
183
+ id: string;
184
+ title: string;
185
+ updatedAt: string;
186
+ createdAt: string;
187
+ proposedBy: {
188
+ kind: "user" | "agent";
189
+ id?: string | null | undefined;
190
+ };
191
+ items: {
192
+ title: string;
193
+ action: "create" | "revise" | "remove";
194
+ organizationIds?: string[] | undefined;
195
+ projectIds?: string[] | undefined;
196
+ specId?: string | null | undefined;
197
+ content?: string | undefined;
198
+ baseRevision?: string | null | undefined;
199
+ roleIds?: string[] | undefined;
200
+ rationale?: string | undefined;
201
+ result?: {
202
+ specId: string;
203
+ revision: string;
204
+ } | null | undefined;
205
+ }[];
206
+ status?: "proposed" | "discarded" | "saved" | undefined;
207
+ summary?: string | undefined;
208
+ reviewerUserId?: string | null | undefined;
209
+ questionId?: string | null | undefined;
210
+ savedByUserId?: string | null | undefined;
211
+ savedAt?: string | null | undefined;
212
+ discardedByUserId?: string | null | undefined;
213
+ discardReason?: string | undefined;
214
+ }>;
215
+ export type ChangeSet = z.infer<typeof changeSetSchema>;
216
+ //# sourceMappingURL=change-set.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"change-set.d.ts","sourceRoot":"","sources":["../../src/domain/change-set.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB;IAC9B,uDAAuD;;;;IAIvD,kEAAkE;;IAElE,uEAAuE;;IAEvE,wFAAwF;;IAExF,wCAAwC;;;;IAIxC,+DAA+D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE/D,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,mBAAmB,6CAA8C,CAAC;AAE/E,eAAO,MAAM,eAAe;;;;;;IAE1B,sFAAsF;;;;;;;;;;;;;;QAvBtF,uDAAuD;;;;QAIvD,kEAAkE;;QAElE,uEAAuE;;QAEvE,wFAAwF;;QAExF,wCAAwC;;;;QAIxC,+DAA+D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAc/D,oDAAoD;;IAEpD,8CAA8C;;;;;IAK9C,yCAAyC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEzC,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}