@aigile/engine 0.2.1 → 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 (198) hide show
  1. package/dist/action-item-features.d.ts +33 -0
  2. package/dist/action-item-features.d.ts.map +1 -0
  3. package/dist/action-item-features.js +113 -0
  4. package/dist/action-item-features.js.map +1 -0
  5. package/dist/action-items.d.ts +234 -0
  6. package/dist/action-items.d.ts.map +1 -0
  7. package/dist/action-items.js +722 -0
  8. package/dist/action-items.js.map +1 -0
  9. package/dist/action-sources.d.ts +44 -0
  10. package/dist/action-sources.d.ts.map +1 -0
  11. package/dist/action-sources.js +141 -0
  12. package/dist/action-sources.js.map +1 -0
  13. package/dist/agent-roles.d.ts +9 -0
  14. package/dist/agent-roles.d.ts.map +1 -0
  15. package/dist/agent-roles.js +18 -0
  16. package/dist/agent-roles.js.map +1 -0
  17. package/dist/agent-tasks.d.ts +36 -0
  18. package/dist/agent-tasks.d.ts.map +1 -0
  19. package/dist/agent-tasks.js +151 -0
  20. package/dist/agent-tasks.js.map +1 -0
  21. package/dist/agents/orchestrator.d.ts +26 -6
  22. package/dist/agents/orchestrator.d.ts.map +1 -1
  23. package/dist/agents/orchestrator.js +95 -45
  24. package/dist/agents/orchestrator.js.map +1 -1
  25. package/dist/agents/spec-analyst.d.ts +81 -13
  26. package/dist/agents/spec-analyst.d.ts.map +1 -1
  27. package/dist/agents/spec-analyst.js +350 -89
  28. package/dist/agents/spec-analyst.js.map +1 -1
  29. package/dist/ai-service.d.ts +40 -0
  30. package/dist/ai-service.d.ts.map +1 -1
  31. package/dist/ai-service.js +94 -9
  32. package/dist/ai-service.js.map +1 -1
  33. package/dist/api-tokens.d.ts +67 -0
  34. package/dist/api-tokens.d.ts.map +1 -0
  35. package/dist/api-tokens.js +89 -0
  36. package/dist/api-tokens.js.map +1 -0
  37. package/dist/attachments/extract.d.ts +26 -0
  38. package/dist/attachments/extract.d.ts.map +1 -0
  39. package/dist/attachments/extract.js +160 -0
  40. package/dist/attachments/extract.js.map +1 -0
  41. package/dist/attachments/fixtures.d.ts +9 -0
  42. package/dist/attachments/fixtures.d.ts.map +1 -0
  43. package/dist/attachments/fixtures.js +58 -0
  44. package/dist/attachments/fixtures.js.map +1 -0
  45. package/dist/attachments/service.d.ts +71 -0
  46. package/dist/attachments/service.d.ts.map +1 -0
  47. package/dist/attachments/service.js +220 -0
  48. package/dist/attachments/service.js.map +1 -0
  49. package/dist/build-service.d.ts +1 -1
  50. package/dist/build-service.d.ts.map +1 -1
  51. package/dist/build-service.js +9 -4
  52. package/dist/build-service.js.map +1 -1
  53. package/dist/change-events.d.ts +110 -0
  54. package/dist/change-events.d.ts.map +1 -0
  55. package/dist/change-events.js +238 -0
  56. package/dist/change-events.js.map +1 -0
  57. package/dist/change-sets.d.ts +110 -0
  58. package/dist/change-sets.d.ts.map +1 -0
  59. package/dist/change-sets.js +188 -0
  60. package/dist/change-sets.js.map +1 -0
  61. package/dist/command-runner.d.ts.map +1 -1
  62. package/dist/command-runner.js +2 -1
  63. package/dist/command-runner.js.map +1 -1
  64. package/dist/conversations.d.ts +2 -1
  65. package/dist/conversations.d.ts.map +1 -1
  66. package/dist/conversations.js +1 -1
  67. package/dist/conversations.js.map +1 -1
  68. package/dist/data-access.d.ts +9 -2
  69. package/dist/data-access.d.ts.map +1 -1
  70. package/dist/data-access.js +38 -6
  71. package/dist/data-access.js.map +1 -1
  72. package/dist/decisions.d.ts +56 -0
  73. package/dist/decisions.d.ts.map +1 -0
  74. package/dist/decisions.js +76 -0
  75. package/dist/decisions.js.map +1 -0
  76. package/dist/deliverables.d.ts +96 -0
  77. package/dist/deliverables.d.ts.map +1 -0
  78. package/dist/deliverables.js +344 -0
  79. package/dist/deliverables.js.map +1 -0
  80. package/dist/designs.d.ts +30 -0
  81. package/dist/designs.d.ts.map +1 -0
  82. package/dist/designs.js +154 -0
  83. package/dist/designs.js.map +1 -0
  84. package/dist/git-host.d.ts +10 -0
  85. package/dist/git-host.d.ts.map +1 -1
  86. package/dist/git-host.js +30 -2
  87. package/dist/git-host.js.map +1 -1
  88. package/dist/grounding.d.ts +9 -0
  89. package/dist/grounding.d.ts.map +1 -0
  90. package/dist/grounding.js +12 -0
  91. package/dist/grounding.js.map +1 -0
  92. package/dist/index.d.ts +35 -12
  93. package/dist/index.d.ts.map +1 -1
  94. package/dist/index.js +33 -10
  95. package/dist/index.js.map +1 -1
  96. package/dist/jira-features.d.ts +142 -0
  97. package/dist/jira-features.d.ts.map +1 -0
  98. package/dist/jira-features.js +366 -0
  99. package/dist/jira-features.js.map +1 -0
  100. package/dist/milestones.js +1 -1
  101. package/dist/milestones.js.map +1 -1
  102. package/dist/pull-request-sync.d.ts.map +1 -1
  103. package/dist/pull-request-sync.js +10 -6
  104. package/dist/pull-request-sync.js.map +1 -1
  105. package/dist/questions.d.ts +100 -10
  106. package/dist/questions.d.ts.map +1 -1
  107. package/dist/questions.js +211 -22
  108. package/dist/questions.js.map +1 -1
  109. package/dist/related.d.ts +26 -0
  110. package/dist/related.d.ts.map +1 -0
  111. package/dist/related.js +64 -0
  112. package/dist/related.js.map +1 -0
  113. package/dist/release-gates.d.ts +16 -0
  114. package/dist/release-gates.d.ts.map +1 -0
  115. package/dist/release-gates.js +47 -0
  116. package/dist/release-gates.js.map +1 -0
  117. package/dist/reviews.d.ts.map +1 -1
  118. package/dist/reviews.js +4 -3
  119. package/dist/reviews.js.map +1 -1
  120. package/dist/router.d.ts +2 -2
  121. package/dist/router.d.ts.map +1 -1
  122. package/dist/router.js.map +1 -1
  123. package/dist/scheduler.d.ts +41 -5
  124. package/dist/scheduler.d.ts.map +1 -1
  125. package/dist/scheduler.js +109 -7
  126. package/dist/scheduler.js.map +1 -1
  127. package/dist/services.d.ts +760 -15
  128. package/dist/services.d.ts.map +1 -1
  129. package/dist/services.js +402 -20
  130. package/dist/services.js.map +1 -1
  131. package/dist/source-sync.d.ts +136 -0
  132. package/dist/source-sync.d.ts.map +1 -0
  133. package/dist/source-sync.js +370 -0
  134. package/dist/source-sync.js.map +1 -0
  135. package/dist/sources/front-matter.d.ts +20 -0
  136. package/dist/sources/front-matter.d.ts.map +1 -0
  137. package/dist/sources/front-matter.js +57 -0
  138. package/dist/sources/front-matter.js.map +1 -0
  139. package/dist/sources/git.d.ts +80 -0
  140. package/dist/sources/git.d.ts.map +1 -0
  141. package/dist/sources/git.js +338 -0
  142. package/dist/sources/git.js.map +1 -0
  143. package/dist/sources/http.d.ts +54 -0
  144. package/dist/sources/http.d.ts.map +1 -0
  145. package/dist/sources/http.js +79 -0
  146. package/dist/sources/http.js.map +1 -0
  147. package/dist/spec-cache.d.ts +54 -0
  148. package/dist/spec-cache.d.ts.map +1 -0
  149. package/dist/spec-cache.js +133 -0
  150. package/dist/spec-cache.js.map +1 -0
  151. package/dist/spec-links.d.ts +68 -0
  152. package/dist/spec-links.d.ts.map +1 -0
  153. package/dist/spec-links.js +144 -0
  154. package/dist/spec-links.js.map +1 -0
  155. package/dist/spec-reader.d.ts +44 -0
  156. package/dist/spec-reader.d.ts.map +1 -0
  157. package/dist/spec-reader.js +81 -0
  158. package/dist/spec-reader.js.map +1 -0
  159. package/dist/spec-resolver.d.ts +13 -1
  160. package/dist/spec-resolver.d.ts.map +1 -1
  161. package/dist/spec-resolver.js +45 -8
  162. package/dist/spec-resolver.js.map +1 -1
  163. package/dist/spec-tools.d.ts +10 -0
  164. package/dist/spec-tools.d.ts.map +1 -0
  165. package/dist/spec-tools.js +103 -0
  166. package/dist/spec-tools.js.map +1 -0
  167. package/dist/task-scope.d.ts +11 -0
  168. package/dist/task-scope.d.ts.map +1 -0
  169. package/dist/task-scope.js +11 -0
  170. package/dist/task-scope.js.map +1 -0
  171. package/dist/telemetry.d.ts +34 -0
  172. package/dist/telemetry.d.ts.map +1 -0
  173. package/dist/telemetry.js +72 -0
  174. package/dist/telemetry.js.map +1 -0
  175. package/dist/template.d.ts +341 -0
  176. package/dist/template.d.ts.map +1 -0
  177. package/dist/template.js +142 -0
  178. package/dist/template.js.map +1 -0
  179. package/dist/tool-sandbox.d.ts.map +1 -1
  180. package/dist/tool-sandbox.js +2 -2
  181. package/dist/tool-sandbox.js.map +1 -1
  182. package/dist/tracks.d.ts +3 -3
  183. package/dist/tracks.js +1 -1
  184. package/dist/tracks.js.map +1 -1
  185. package/dist/verifier.d.ts.map +1 -1
  186. package/dist/verifier.js +8 -7
  187. package/dist/verifier.js.map +1 -1
  188. package/dist/vscode-connect.d.ts +48 -0
  189. package/dist/vscode-connect.d.ts.map +1 -0
  190. package/dist/vscode-connect.js +105 -0
  191. package/dist/vscode-connect.js.map +1 -0
  192. package/package.json +14 -3
  193. package/prompts/agent-task.contract.md +9 -0
  194. package/prompts/orchestrator.brief.md +17 -0
  195. package/prompts/orchestrator.contract.md +7 -0
  196. package/prompts/spec-analyst.brief.md +19 -0
  197. package/prompts/spec-analyst.contract.md +5 -0
  198. package/prompts/spec-analyst.sweep.md +2 -0
@@ -0,0 +1,33 @@
1
+ import type { ActionItem, DataStore } from '@aigile/core';
2
+ /** Register the installed templates' ref kinds (the runtime does, from each template's `featureRefs`): ref kind → collection. */
3
+ export declare function provideFeatureRefs(refs: Readonly<Record<string, string>>): void;
4
+ /**
5
+ * Which features (deliverables) an action item belongs to, worked out from
6
+ * what it is about (documentation/action-items.md "Features"):
7
+ * - a build names its feature, and so does a template's own record (a test
8
+ * case) whose ref kind the template registered (TemplateModule.featureRefs);
9
+ * - a release, through its builds;
10
+ * - a spec, a conflict, a change set or an answered question, through the specs
11
+ * it touches: each feature whose specs include one of them or a spec above it
12
+ * in the outline;
13
+ * - an item that blocks others, through the items it blocks;
14
+ * - anything else (an incident, a person's own task), none until someone sets it.
15
+ * One instance reads the records once; make a new one for fresh data.
16
+ */
17
+ export declare class FeatureResolver {
18
+ private readonly store;
19
+ private readonly data;
20
+ private loaded;
21
+ constructor(store: DataStore);
22
+ private load;
23
+ /** The features whose specs include any of these specs or a spec above one of them. */
24
+ forSpecs(specIds: readonly string[]): Promise<string[]>;
25
+ /** The features a record is about, by its ref. */
26
+ forRef(ref: {
27
+ kind: string;
28
+ id: string;
29
+ }): Promise<string[]>;
30
+ /** An item's features: its record's, and the features of the items it blocks. */
31
+ forItem(item: ActionItem, all: readonly ActionItem[]): Promise<string[]>;
32
+ }
33
+ //# sourceMappingURL=action-item-features.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action-item-features.d.ts","sourceRoot":"","sources":["../src/action-item-features.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAe,MAAM,cAAc,CAAC;AAWvE,iIAAiI;AACjI,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,IAAI,CAE/E;AAED;;;;;;;;;;;;GAYG;AACH,qBAAa,eAAe;IAWd,OAAO,CAAC,QAAQ,CAAC,KAAK;IAVlC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAa;IAClC,OAAO,CAAC,MAAM,CAOG;gBAEY,KAAK,EAAE,SAAS;IAI7C,OAAO,CAAC,IAAI;IAkBZ,uFAAuF;IACjF,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAe7D,kDAAkD;IAC5C,MAAM,CAAC,GAAG,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAkClE,iFAAiF;IAC3E,OAAO,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,SAAS,UAAU,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;CAK/E"}
@@ -0,0 +1,113 @@
1
+ import { COLLECTIONS, deliverableSchema, changeSetSchema } from '@aigile/core';
2
+ import { DataAccess } from './data-access.js';
3
+ /** The templates' own ref kinds and their collections (TemplateModule.featureRefs), process-wide: a bundler may load this module more than once. */
4
+ const FEATURE_REFS = Symbol.for('aigile.engine.featureRefs');
5
+ function featureRefs() {
6
+ const g = globalThis;
7
+ return (g[FEATURE_REFS] ??= new Map());
8
+ }
9
+ /** Register the installed templates' ref kinds (the runtime does, from each template's `featureRefs`): ref kind → collection. */
10
+ export function provideFeatureRefs(refs) {
11
+ for (const [kind, collection] of Object.entries(refs))
12
+ featureRefs().set(kind, collection);
13
+ }
14
+ /**
15
+ * Which features (deliverables) an action item belongs to, worked out from
16
+ * what it is about (documentation/action-items.md "Features"):
17
+ * - a build names its feature, and so does a template's own record (a test
18
+ * case) whose ref kind the template registered (TemplateModule.featureRefs);
19
+ * - a release, through its builds;
20
+ * - a spec, a conflict, a change set or an answered question, through the specs
21
+ * it touches: each feature whose specs include one of them or a spec above it
22
+ * in the outline;
23
+ * - an item that blocks others, through the items it blocks;
24
+ * - anything else (an incident, a person's own task), none until someone sets it.
25
+ * One instance reads the records once; make a new one for fresh data.
26
+ */
27
+ export class FeatureResolver {
28
+ store;
29
+ data;
30
+ loaded = null;
31
+ constructor(store) {
32
+ this.store = store;
33
+ this.data = new DataAccess(store);
34
+ }
35
+ load() {
36
+ this.loaded ??= (async () => {
37
+ const [rawDeliverables, specs, builds, releases, questions, conflicts] = await Promise.all([this.store.list(COLLECTIONS.deliverables), this.data.specs(), this.data.builds(), this.data.releases(), this.data.questions(), this.data.conflicts()]);
38
+ return {
39
+ deliverables: rawDeliverables.flatMap((d) => {
40
+ const parsed = deliverableSchema.safeParse(d);
41
+ return parsed.success ? [parsed.data] : [];
42
+ }),
43
+ parentOf: new Map(specs.map((s) => [s.id, s.parentId])),
44
+ buildFeature: new Map(builds.map((b) => [b.id, b.deliverableId])),
45
+ releaseBuilds: new Map(releases.map((r) => [r.id, r.buildIds])),
46
+ questionSpecs: new Map(questions.map((q) => [q.id, (q.answer?.citations ?? []).map((c) => c.specId)])),
47
+ conflictSpecs: new Map(conflicts.map((c) => [c.id, [c.left.specId, c.right.specId]])),
48
+ };
49
+ })();
50
+ return this.loaded;
51
+ }
52
+ /** The features whose specs include any of these specs or a spec above one of them. */
53
+ async forSpecs(specIds) {
54
+ const { deliverables, parentOf } = await this.load();
55
+ const lineage = new Set();
56
+ for (const id of specIds) {
57
+ let at = id;
58
+ const seen = new Set();
59
+ while (at && !seen.has(at)) {
60
+ seen.add(at);
61
+ lineage.add(at);
62
+ at = parentOf.get(at);
63
+ }
64
+ }
65
+ return deliverables.filter((d) => d.specIds.some((s) => lineage.has(s))).map((d) => d.id);
66
+ }
67
+ /** The features a record is about, by its ref. */
68
+ async forRef(ref) {
69
+ const l = await this.load();
70
+ switch (ref.kind) {
71
+ case 'build': {
72
+ const f = l.buildFeature.get(ref.id);
73
+ return f ? [f] : [];
74
+ }
75
+ case 'release':
76
+ return unique((l.releaseBuilds.get(ref.id) ?? []).flatMap((b) => {
77
+ const f = l.buildFeature.get(b);
78
+ return f ? [f] : [];
79
+ }));
80
+ case 'deliverable':
81
+ return l.deliverables.some((d) => d.id === ref.id) ? [ref.id] : [];
82
+ case 'spec':
83
+ return this.forSpecs([ref.id]);
84
+ case 'question':
85
+ return this.forSpecs(l.questionSpecs.get(ref.id) ?? []);
86
+ case 'conflict':
87
+ return this.forSpecs(l.conflictSpecs.get(ref.id) ?? []);
88
+ case 'change-set': {
89
+ const parsed = changeSetSchema.safeParse(await this.store.get(COLLECTIONS.changeSets, ref.id));
90
+ if (!parsed.success)
91
+ return [];
92
+ return this.forSpecs(parsed.data.items.flatMap((i) => [i.specId, i.result?.specId]).filter((s) => !!s));
93
+ }
94
+ default: {
95
+ const collection = featureRefs().get(ref.kind);
96
+ if (!collection)
97
+ return [];
98
+ const record = await this.store.get(collection, ref.id).catch(() => null);
99
+ return typeof record?.deliverableId === 'string' && record.deliverableId ? [record.deliverableId] : [];
100
+ }
101
+ }
102
+ }
103
+ /** An item's features: its record's, and the features of the items it blocks. */
104
+ async forItem(item, all) {
105
+ const own = await this.forRef(item.ref);
106
+ const blocked = all.filter((i) => i.blockedBy.includes(item.id)).flatMap((i) => i.deliverableIds);
107
+ return unique([...own, ...blocked]);
108
+ }
109
+ }
110
+ function unique(ids) {
111
+ return [...new Set(ids)];
112
+ }
113
+ //# sourceMappingURL=action-item-features.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action-item-features.js","sourceRoot":"","sources":["../src/action-item-features.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,oJAAoJ;AACpJ,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;AAC7D,SAAS,WAAW;IAClB,MAAM,CAAC,GAAG,UAAsD,CAAC;IACjE,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,KAAK,IAAI,GAAG,EAAE,CAAC,CAAC;AACzC,CAAC;AAED,iIAAiI;AACjI,MAAM,UAAU,kBAAkB,CAAC,IAAsC;IACvE,KAAK,MAAM,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC;QAAE,WAAW,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;AAC7F,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,eAAe;IAWG;IAVZ,IAAI,CAAa;IAC1B,MAAM,GAOF,IAAI,CAAC;IAEjB,YAA6B,KAAgB;QAAhB,UAAK,GAAL,KAAK,CAAW;QAC3C,IAAI,CAAC,IAAI,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;IAEO,IAAI;QACV,IAAI,CAAC,MAAM,KAAK,CAAC,KAAK,IAAI,EAAE;YAC1B,MAAM,CAAC,eAAe,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAC,GAAG,MA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K,CAAC,OAAO,CAAC,IAAgB,EAAE,GAA0B;QACxD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxC,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC;QAClG,OAAO,MAAM,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC;IACtC,CAAC;CACF;AAED,SAAS,MAAM,CAAC,GAAsB;IACpC,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;AAC3B,CAAC"}
@@ -0,0 +1,234 @@
1
+ import type { DataStore, ActionItem, ActionKind, ActionTypeDefinition, Notifier, TaskRun } from '@aigile/core';
2
+ import { type Actor } from './services.js';
3
+ /** The ref of a review that asks the opener to accept an item's resolution. */
4
+ export declare const ACCEPTANCE_REF = "action-item";
5
+ export interface ActionItemInput {
6
+ kind: ActionKind;
7
+ /** The person it waits on; leave out (or null) with `assigneeRoleId` for an agent. */
8
+ assigneeUserId?: string | null;
9
+ /** The agent role it waits on: a task in the agents' queue. */
10
+ assigneeRoleId?: string | null;
11
+ title: string;
12
+ summary?: string;
13
+ /** What it is about; a task about nothing else refers to itself (leave out). */
14
+ ref?: {
15
+ kind: string;
16
+ id: string;
17
+ };
18
+ waitingOnRoleId?: string | null;
19
+ projectIds?: string[];
20
+ /** A CC's copy (`new`), not the responsible person's. */
21
+ watch?: 'owner' | 'new';
22
+ /** The person who opened it, who will accept its resolution. */
23
+ openedByUserId?: string | null;
24
+ openedByRoleId?: string | null;
25
+ blockedBy?: string[];
26
+ /** Set by a person; otherwise aigile works them out. */
27
+ deliverableIds?: string[];
28
+ /** Brought in by an action source; such an item may wait on nobody yet. */
29
+ external?: ActionItem['external'];
30
+ /** An agent's task that waits for a person to queue it, instead of starting. */
31
+ held?: boolean;
32
+ /** Go to exactly this person, not where past hand-overs would route it (a named reviewer). */
33
+ exact?: boolean;
34
+ /** The requester's say on a review, within what the type allows (documentation/action-items.md "Reviews"); the type's default when left out. */
35
+ review?: boolean;
36
+ }
37
+ /** What a person (or an agent) asks someone for: a task or a question. */
38
+ export interface AskInput {
39
+ kind: 'task' | 'question';
40
+ title: string;
41
+ summary?: string;
42
+ assigneeUserId?: string | null;
43
+ assigneeRoleId?: string | null;
44
+ projectIds?: string[];
45
+ deliverableIds?: string[];
46
+ /** Whether the asker reviews the resolution, within what the type allows; the type's default when left out. */
47
+ review?: boolean;
48
+ }
49
+ /**
50
+ * Action items: what waits for whom (documentation/action-items.md), shown as
51
+ * a person's queues, the Action items window and a feature's charts. Writes
52
+ * go to the datastore like everything else; reads go through the index, an
53
+ * in-memory view rebuilt from the datastore when it is stale (any write
54
+ * through this service marks it so; a process that only reads refreshes on a
55
+ * timer).
56
+ */
57
+ export declare class ActionItemService {
58
+ private readonly store;
59
+ private readonly maxAgeMs;
60
+ private readonly data;
61
+ private readonly conversations;
62
+ private readonly router;
63
+ private index;
64
+ private builtAt;
65
+ /** Called when an agent's task is queued, so the queue can start it without waiting for a tick. */
66
+ onQueued: (() => void) | null;
67
+ /** The action types in use (the built-in ones, the templates'), for their review levels. */
68
+ types: readonly ActionTypeDefinition[];
69
+ /** Where notices go besides a person's conversation (documentation/plugins.md: Teams); each takes the kinds it wants. */
70
+ notifiers: readonly Notifier[];
71
+ /** The workspace's address, for the link in a notice. */
72
+ publicUrl: string | null;
73
+ /** Called when an item is resolved in aigile (not by its source): an action source writes it back. */
74
+ onResolved: ((item: ActionItem, actor: Actor) => Promise<void>) | null;
75
+ constructor(store: DataStore, maxAgeMs?: number);
76
+ /** Every item, open and done, from the index. */
77
+ all(): Promise<ActionItem[]>;
78
+ invalidate(): void;
79
+ /** A person's open items, newest first (one waiting for someone's acceptance is not theirs to act on). */
80
+ openFor(userId: string): Promise<ActionItem[]>;
81
+ get(id: string): Promise<ActionItem>;
82
+ /** Every write lands in `action-items`; a copy still in the older `queue-items` goes, so an item lives in one place. */
83
+ private save;
84
+ private notify;
85
+ /** The notice for the notifiers: an item waiting on someone, with a link to it. A notifier that fails is logged; nothing else stops. */
86
+ private notice;
87
+ /** The item in aigile, for a link in a notice or a write-back; null without `publicUrl`. */
88
+ itemUrl(id: string): string | null;
89
+ /** The item is done: the notifiers that resolve what they opened (PagerDuty) hear it; the rest post nothing. */
90
+ private resolvedNotice;
91
+ /**
92
+ * Whether a new item's resolution is reviewed (documentation/action-items.md
93
+ * "Reviews"): `never` and `always` types decide; within `optional` and
94
+ * `default`, the requester's say wins over the type's default.
95
+ */
96
+ private reviewFor;
97
+ /** An item's review as it stands (worked out from its type and requester for an older item). */
98
+ reviewOf(item: ActionItem): NonNullable<ActionItem['review']>;
99
+ /** Who reviews an item's resolution, each required or optional: the reviewers named, else the requester. */
100
+ reviewersOf(item: ActionItem): Array<{
101
+ userId: string;
102
+ optional: boolean;
103
+ }>;
104
+ /** The reviewers who must accept before the item is done, leaving out the one resolving it (their resolution is their acceptance). */
105
+ private requiredReviewers;
106
+ /** Whether resolving it now (by this actor) waits for a review: required, and a required reviewer other than them. */
107
+ private needsReview;
108
+ /**
109
+ * Change an item's review (documentation/action-items.md "Reviews"):
110
+ * - the assignee may ask for a review and add reviewers, never drop a review or a reviewer;
111
+ * - the person who asked for it may turn the review on or off within the type's level
112
+ * (not off when the assignee asked for it), and set the reviewers;
113
+ * - a required review keeps at least one required reviewer (the requester when none is named).
114
+ */
115
+ setReview(id: string, input: {
116
+ required: boolean;
117
+ reviewers?: Array<{
118
+ userId: string;
119
+ optional?: boolean;
120
+ }> | null;
121
+ }, actor: Actor): Promise<ActionItem>;
122
+ /** The agent key of an agent role, or null when there is no such agent role. */
123
+ private agentKeyOf;
124
+ private queuedRun;
125
+ /**
126
+ * Open an item. A person's goes to whom the router picks (past
127
+ * reassignments first, the given assignee otherwise), unless they already
128
+ * have an open one about the same record, and they are told in their
129
+ * conversation. An agent's is a task in the agents' queue.
130
+ */
131
+ open(input: ActionItemInput, actor: Actor): Promise<ActionItem>;
132
+ /**
133
+ * Ask a person or an agent role for something: a task or a question. With
134
+ * `blocks`, that item waits on the new one ("needs something first"), and
135
+ * the new one belongs to its features. The asker accepts the resolution.
136
+ */
137
+ ask(input: AskInput, actor: Actor, blocks?: string, options?: {
138
+ openedByRoleId?: string | null;
139
+ }): Promise<ActionItem>;
140
+ /** Blockers must exist, must not be the item itself, and must not wait on it (directly or further down). */
141
+ private checkBlockers;
142
+ /** Replace what an item waits on. */
143
+ setBlockedBy(id: string, blockers: string[], actor: Actor): Promise<ActionItem>;
144
+ /** Set an item's features by hand, or (null) let aigile work them out again. */
145
+ setDeliverables(id: string, deliverableIds: string[] | null, actor: Actor): Promise<ActionItem>;
146
+ /**
147
+ * Work the features out again for the items aigile owns: open items it set
148
+ * and items never worked out (older records). A done item keeps what it
149
+ * had once worked out, so a feature's history does not move.
150
+ */
151
+ refreshFeatures(): Promise<number>;
152
+ /** A CC keeps the item until the record is resolved. */
153
+ follow(id: string, actor: Actor): Promise<ActionItem>;
154
+ /** A CC lets the item go; nothing else changes. */
155
+ dismiss(id: string, actor: Actor): Promise<ActionItem>;
156
+ /**
157
+ * Hand an item to someone else: a person, or (a task) an agent role. A
158
+ * hand-over between people is remembered for the next one of its kind
159
+ * (documentation/agents.md §3.7); a task handed to an agent joins the agents' queue.
160
+ */
161
+ reassign(id: string, to: string | {
162
+ userId?: string | null;
163
+ roleId?: string | null;
164
+ }, actor: Actor): Promise<ActionItem>;
165
+ /**
166
+ * The assignee says what resolves the item. When its resolution is reviewed
167
+ * and the reviewer is someone else, that is a request: the item waits for
168
+ * acceptance and the reviewer gets a review (documentation/action-items.md
169
+ * "Reviews"). Otherwise it is done.
170
+ */
171
+ requestResolution(id: string, note: string, actor: Actor, options?: {
172
+ byRoleId?: string | null;
173
+ force?: boolean;
174
+ }): Promise<ActionItem>;
175
+ /**
176
+ * A reviewer accepts the resolution. When every required reviewer has, the
177
+ * item is done and every review of it closes; until then it waits for the rest.
178
+ */
179
+ acceptResolution(id: string, actor: Actor): Promise<ActionItem>;
180
+ /** Any of its reviewers (optional ones too) sends the resolution back: the item goes back to its assignee (an agent's to its queue) with the reason. */
181
+ rejectResolution(id: string, reason: string, actor: Actor): Promise<ActionItem>;
182
+ /** Close the reviews of an item: every one, or one reviewer's. */
183
+ private closeReviews;
184
+ /** Done: the item is closed, and anything that waited on it hears whether it can go ahead. */
185
+ private markDone;
186
+ /** An item its source says is done (the Jira issue was closed there): done here, nothing written back. */
187
+ closeFromSource(id: string, note: string, actor: Actor): Promise<ActionItem>;
188
+ /** Save an item as its source has it now (title, assignee, status, dependencies, features), keeping what people set here. */
189
+ saveFromSource(item: ActionItem, actor: Actor): Promise<void>;
190
+ private unblockDependents;
191
+ /**
192
+ * Refuse to act on a record while an item about it waits on unfinished
193
+ * items (documentation/action-items.md "Dependencies"): approving a build
194
+ * whose approval still needs an answer, say. Saying no stays possible.
195
+ */
196
+ assertReady(ref: {
197
+ kind: string;
198
+ id: string;
199
+ }): Promise<void>;
200
+ /**
201
+ * Every open item about a record is resolved (the conflict settled, the
202
+ * question answered). A task or question someone else opened becomes a
203
+ * resolution request they accept; the rest are done.
204
+ */
205
+ closeAbout(ref: {
206
+ kind: string;
207
+ id: string;
208
+ }, actor: Actor): Promise<number>;
209
+ /** A job an agent starts on its own (a build, a review of a spec revision): a task already running. */
210
+ beginJob(input: {
211
+ roleId: string | null;
212
+ agentKey: string | null;
213
+ title: string;
214
+ ref?: {
215
+ kind: string;
216
+ id: string;
217
+ } | null;
218
+ projectIds?: string[];
219
+ }, actor: Actor): Promise<ActionItem>;
220
+ /** A job's task ends: done, failed or blocked (the cost cap), with what it said. */
221
+ finishJob(id: string, outcome: {
222
+ state: 'done' | 'failed' | 'blocked';
223
+ detail?: string | null;
224
+ }, actor: Actor): Promise<ActionItem>;
225
+ /** Add an AI call's cost to its task's. */
226
+ addCost(id: string, costUsd: number | null): Promise<void>;
227
+ /** Save a task's run as the queue moves it. */
228
+ updateRun(id: string, run: Partial<TaskRun>, actor: Actor, extra?: Partial<Pick<ActionItem, 'blockedBy' | 'notes'>>): Promise<ActionItem>;
229
+ /** Stop a queued, waiting, failed or blocked task; it stays open for a person to pick up or queue again. */
230
+ cancelRun(id: string, actor: Actor): Promise<ActionItem>;
231
+ /** Queue a failed, blocked or stopped task again. */
232
+ retryRun(id: string, actor: Actor): Promise<ActionItem>;
233
+ }
234
+ //# sourceMappingURL=action-items.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action-items.d.ts","sourceRoot":"","sources":["../src/action-items.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,oBAAoB,EAAE,QAAQ,EAAgB,OAAO,EAAE,MAAM,cAAc,CAAC;AAM7H,OAAO,EAAE,KAAK,KAAK,EAAgB,MAAM,eAAe,CAAC;AAMzD,+EAA+E;AAC/E,eAAO,MAAM,cAAc,gBAAgB,CAAC;AAE5C,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,UAAU,CAAC;IACjB,sFAAsF;IACtF,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,+DAA+D;IAC/D,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gFAAgF;IAChF,GAAG,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IACnC,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,yDAAyD;IACzD,KAAK,CAAC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