@cat-factory/integrations 0.152.8 → 0.153.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 (53) hide show
  1. package/dist/index.d.ts +5 -2
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +5 -2
  4. package/dist/index.js.map +1 -1
  5. package/dist/modules/tasks/GitHubIssuesProvider.d.ts +9 -1
  6. package/dist/modules/tasks/GitHubIssuesProvider.d.ts.map +1 -1
  7. package/dist/modules/tasks/GitHubIssuesProvider.js +18 -0
  8. package/dist/modules/tasks/GitHubIssuesProvider.js.map +1 -1
  9. package/dist/modules/tasks/GitLabIssuesProvider.d.ts +20 -1
  10. package/dist/modules/tasks/GitLabIssuesProvider.d.ts.map +1 -1
  11. package/dist/modules/tasks/GitLabIssuesProvider.js +30 -0
  12. package/dist/modules/tasks/GitLabIssuesProvider.js.map +1 -1
  13. package/dist/modules/tasks/JiraProvider.d.ts +6 -0
  14. package/dist/modules/tasks/JiraProvider.d.ts.map +1 -1
  15. package/dist/modules/tasks/JiraProvider.js +7 -0
  16. package/dist/modules/tasks/JiraProvider.js.map +1 -1
  17. package/dist/modules/tasks/LinearTaskProvider.d.ts +6 -0
  18. package/dist/modules/tasks/LinearTaskProvider.d.ts.map +1 -1
  19. package/dist/modules/tasks/LinearTaskProvider.js +7 -0
  20. package/dist/modules/tasks/LinearTaskProvider.js.map +1 -1
  21. package/dist/modules/tasks/gitlab-issues.logic.d.ts +10 -0
  22. package/dist/modules/tasks/gitlab-issues.logic.d.ts.map +1 -1
  23. package/dist/modules/tasks/gitlab-issues.logic.js +12 -0
  24. package/dist/modules/tasks/gitlab-issues.logic.js.map +1 -1
  25. package/dist/modules/tasks/intakeMatch.logic.d.ts +6 -5
  26. package/dist/modules/tasks/intakeMatch.logic.d.ts.map +1 -1
  27. package/dist/modules/tasks/intakeMatch.logic.js +33 -14
  28. package/dist/modules/tasks/intakeMatch.logic.js.map +1 -1
  29. package/dist/modules/tasks/webhook/adapters.d.ts +16 -0
  30. package/dist/modules/tasks/webhook/adapters.d.ts.map +1 -1
  31. package/dist/modules/tasks/webhook/adapters.js +117 -1
  32. package/dist/modules/tasks/webhook/adapters.js.map +1 -1
  33. package/dist/modules/tasks/webhook/hmac.d.ts +11 -0
  34. package/dist/modules/tasks/webhook/hmac.d.ts.map +1 -1
  35. package/dist/modules/tasks/webhook/hmac.js +30 -6
  36. package/dist/modules/tasks/webhook/hmac.js.map +1 -1
  37. package/dist/modules/tasks/writeback/jira.writeback.d.ts +4 -0
  38. package/dist/modules/tasks/writeback/jira.writeback.d.ts.map +1 -0
  39. package/dist/modules/tasks/writeback/jira.writeback.js +89 -0
  40. package/dist/modules/tasks/writeback/jira.writeback.js.map +1 -0
  41. package/dist/modules/tasks/writeback/linear.writeback.d.ts +4 -0
  42. package/dist/modules/tasks/writeback/linear.writeback.d.ts.map +1 -0
  43. package/dist/modules/tasks/writeback/linear.writeback.js +66 -0
  44. package/dist/modules/tasks/writeback/linear.writeback.js.map +1 -0
  45. package/dist/modules/tasks/writeback/repo-issue.writeback.d.ts +32 -0
  46. package/dist/modules/tasks/writeback/repo-issue.writeback.d.ts.map +1 -0
  47. package/dist/modules/tasks/writeback/repo-issue.writeback.js +70 -0
  48. package/dist/modules/tasks/writeback/repo-issue.writeback.js.map +1 -0
  49. package/dist/modules/writeback/IssueWritebackService.d.ts +69 -111
  50. package/dist/modules/writeback/IssueWritebackService.d.ts.map +1 -1
  51. package/dist/modules/writeback/IssueWritebackService.js +155 -222
  52. package/dist/modules/writeback/IssueWritebackService.js.map +1 -1
  53. package/package.json +3 -3
@@ -1,30 +1,15 @@
1
- import { describeError, noopLogger, redactSecrets, resolveWritebackFlag, runBestEffort, REVIEW_QUESTION_POLICIES, REVIEW_QUESTION_POST_CLAIM_TTL_MS, trackerWebhookSecret, } from '@cat-factory/kernel';
1
+ import { createTaskWritebackContext, describeError, noopLogger, redactSecrets, resolveWritebackFlag, runBestEffort, REVIEW_QUESTION_POLICIES, REVIEW_QUESTION_POST_CLAIM_TTL_MS, trackerWebhookSecret, } from '@cat-factory/kernel';
2
2
  import { issueRefFor, renderReviewQuestionsComment } from './reviewQuestions.logic.js';
3
3
  import { renderReviewReplyAck } from './reviewReplies.logic.js';
4
- import { buildJiraCommentPayload, pickTransitionByCategory, } from '../tracker/jira.writeback.logic.js';
5
- import { LINEAR_COMMENT_CREATE_MUTATION, LINEAR_ISSUE_ID_QUERY, LINEAR_ISSUE_RESOLVE_LOOKUP_QUERY, LINEAR_ISSUE_UPDATE_MUTATION, buildLinearCommentVariables, buildLinearStateUpdateVariables, pickStateIdByType, } from '../tracker/linear.writeback.logic.js';
6
- import { linearAuthFromCredentials, postLinearGraphql } from '../shared/linear.client.js';
7
- import { toBase64 } from '../tracker/base64.js';
8
- // IssueWritebackService: the runtime-neutral `IssueWritebackProvider`. As a task's
9
- // PR progresses the execution engine calls it to write back to the task's linked
10
- // tracker issue(s): comment when the PR opens, and comment + close as resolved when
11
- // the PR merges. It resolves the workspace's writeback settings (with the per-task
12
- // override on the block), finds the linked issues via the task projection, and
13
- // dispatches per source. GitHub auth/installation resolution differs per runtime so
14
- // it is injected as seams (the facade parses `owner/repo#number` and resolves the
15
- // installation); the Jira HTTP + ADF logic stays here (identical across runtimes).
16
- //
17
- // Every action is best-effort: each issue's writeback is wrapped so one failure
18
- // never blocks the others, and the engine already calls these fire-and-forget.
19
- const USER_AGENT = 'cat-factory';
20
- /** The GitHub in-progress label applied on pickup when the schedule doesn't name one. */
21
- export const DEFAULT_IN_PROGRESS_LABEL = 'in-progress';
4
+ import { MapTaskSourceRegistry } from '../tasks/tasks.logic.js';
22
5
  export class IssueWritebackService {
23
6
  deps;
24
7
  log;
8
+ sources;
25
9
  constructor(deps) {
26
10
  this.deps = deps;
27
11
  this.log = (deps.logger ?? noopLogger).child({ service: 'issueWriteback' });
12
+ this.sources = new MapTaskSourceRegistry([...(deps.taskSourceProviders ?? [])]);
28
13
  }
29
14
  async onPullRequestOpened(workspaceId, block, pr) {
30
15
  const settings = await this.deps.trackerSettingsRepository.get(workspaceId);
@@ -34,9 +19,10 @@ export class IssueWritebackService {
34
19
  const issues = await this.deps.taskRepository.listByBlock(workspaceId, block.id);
35
20
  if (issues.length === 0)
36
21
  return;
22
+ const resolved = await this.resolveSources(workspaceId, issues);
37
23
  const body = `🔧 A pull request was opened for this issue: ${pr.url}`;
38
24
  await this.forEachIssue({ label: 'writeback.onPullRequestOpened', workspaceId }, issues, async (issue) => {
39
- await this.comment(workspaceId, issue, body);
25
+ await this.comment(workspaceId, resolved, issue, body);
40
26
  });
41
27
  }
42
28
  async onPullRequestMerged(workspaceId, block, pr) {
@@ -47,10 +33,11 @@ export class IssueWritebackService {
47
33
  const issues = await this.deps.taskRepository.listByBlock(workspaceId, block.id);
48
34
  if (issues.length === 0)
49
35
  return;
36
+ const resolved = await this.resolveSources(workspaceId, issues);
50
37
  const body = `✅ The pull request was merged and this issue is resolved: ${pr.url}`;
51
38
  await this.forEachIssue({ label: 'writeback.onPullRequestMerged', workspaceId }, issues, async (issue) => {
52
- await this.comment(workspaceId, issue, body);
53
- await this.resolve(workspaceId, issue);
39
+ await this.comment(workspaceId, resolved, issue, body);
40
+ await this.applyState(workspaceId, resolved, issue, 'resolve', {});
54
41
  });
55
42
  }
56
43
  async onIssuePickedUp(workspaceId, blockId, info) {
@@ -60,12 +47,13 @@ export class IssueWritebackService {
60
47
  const issues = await this.deps.taskRepository.listByBlock(workspaceId, blockId);
61
48
  if (issues.length === 0)
62
49
  return;
50
+ const resolved = await this.resolveSources(workspaceId, issues);
63
51
  const body = info.runUrl
64
52
  ? `🤖 Taken by cat-factory — this issue is being worked autonomously: ${info.runUrl}`
65
53
  : '🤖 Taken by cat-factory — this issue is being worked autonomously.';
66
54
  await this.forEachIssue({ label: 'writeback.onIssuePickedUp', workspaceId }, issues, async (issue) => {
67
- await this.comment(workspaceId, issue, body);
68
- await this.markInProgress(workspaceId, issue, info.inProgressLabel);
55
+ await this.comment(workspaceId, resolved, issue, body);
56
+ await this.applyState(workspaceId, resolved, issue, 'markInProgress', info.inProgressLabel ? { label: info.inProgressLabel } : {});
69
57
  });
70
58
  }
71
59
  async postReviewQuestions(workspaceId, block, post) {
@@ -87,11 +75,10 @@ export class IssueWritebackService {
87
75
  const issues = await this.deps.taskRepository.listByBlock(workspaceId, block.id);
88
76
  if (issues.length === 0)
89
77
  return empty;
90
- // Which of these issues can be REPLIED to, resolved once per distinct source rather than per
91
- // issue: the answer is a property of the `(workspace, source)` connection, and several issues
92
- // on one block routinely share one. Two bodies at most, so the render is memoised on the same
93
- // boolean instead of being recomputed alongside it.
94
- const repliesBySource = await this.resolveTicketReplyChannels(workspaceId, issues);
78
+ // Which of these issues can be REPLIED to rides the same per-source resolution the comment
79
+ // transport does, so the two cannot disagree about a connection. Two bodies at most, so the
80
+ // render is memoised on the same boolean instead of being recomputed alongside it.
81
+ const resolved = await this.resolveSources(workspaceId, issues);
95
82
  const bodies = new Map();
96
83
  const bodyFor = (ticketReplies) => {
97
84
  const cached = bodies.get(ticketReplies);
@@ -137,7 +124,8 @@ export class IssueWritebackService {
137
124
  outcome.skipped += 1;
138
125
  continue;
139
126
  }
140
- const ticketReplies = repliesBySource.get(issue.source) ?? false;
127
+ const source = resolved.get(issue.source);
128
+ const ticketReplies = source?.status === 'ready' && source.ticketReplies;
141
129
  if (!ticketReplies) {
142
130
  // Said once per claimed post (the marker bounds it), because the remedy is the operator's
143
131
  // and the symptom otherwise reaches nobody: the reporter is being asked a question they
@@ -159,9 +147,9 @@ export class IssueWritebackService {
159
147
  // outcome this whole marker exists to prevent. A hung transport is instead cut off by
160
148
  // the driver's own step limit, and the claim's abandonment window (above) makes that
161
149
  // row re-claimable — self-healing without ever inventing a duplicate.
162
- const delivered = await this.comment(workspaceId, issue, bodyFor(ticketReplies));
150
+ const delivered = await this.comment(workspaceId, resolved, issue, bodyFor(ticketReplies));
163
151
  if (!delivered)
164
- throw new Error(`No ${issue.source} comment transport is wired`);
152
+ throw new Error(`No ${issue.source} writeback is wired`);
165
153
  await markers.settle(key, { status: 'posted' }, now());
166
154
  outcome.posted += 1;
167
155
  }
@@ -186,73 +174,112 @@ export class IssueWritebackService {
186
174
  return outcome;
187
175
  }
188
176
  /**
189
- * Whether a reply typed on a ticket reaches the run, per DISTINCT source across the block's
190
- * linked issues.
177
+ * Acknowledge a ticket reply on the very issue it arrived on.
191
178
  *
192
- * One connection read per distinct source, indexed into a `Map`, rather than one per issue: the
193
- * fact belongs to `(workspace, source)`, and a block linked to three issues on one tracker would
194
- * otherwise pay three decrypting reads for one answer.
179
+ * Deliberately NOT marker-gated, unlike {@link postReviewQuestions}: an ack is the terminal
180
+ * effect of an ingest that is ALREADY claimed exactly once by `tracker_comment_ingests`, so a
181
+ * second marker here would guard nothing and add a second thing to reason about. It is also not
182
+ * gated on the workspace writeback settings — a reply is an explicit request for a response, not
183
+ * an unsolicited courtesy.
195
184
  *
196
- * An unreadable connection resolves to `false` and is REPORTED, never guessed at: the failure
197
- * mode of guessing `true` is a reporter told to reply where nothing listens, which is the exact
198
- * thing this resolution exists to prevent.
185
+ * Best-effort throughout: the reply is applied and settled before this runs, so a tracker outage
186
+ * costs the acknowledgement, never the answer.
187
+ */
188
+ async postReviewReplyAck(workspaceId, issue, ack) {
189
+ const resolved = await this.resolveSources(workspaceId, [issue]);
190
+ await this.comment(workspaceId, resolved, issue, renderReviewReplyAck(ack));
191
+ }
192
+ /**
193
+ * What this deployment can do for each source the given issues sit on: the registered
194
+ * provider's writeback adapter, the batch context carrying the workspace's credential bag for
195
+ * it, and whether a reply typed on one of its tickets reaches the run.
196
+ *
197
+ * ONE connection read for the whole set, indexed by source.
199
198
  *
200
- * Unreadable is scoped to the SOURCE that was unreadable. The block's issues can span trackers,
201
- * and a corrupt Linear envelope is no evidence at all about the workspace's Jira connection —
202
- * so a batch-wide catch would take a working reply channel away from a healthy ticket and tell
203
- * its reporter to use the API path instead.
199
+ * What an unreadable row costs is the ADAPTER's own declaration (`authenticates`), never a guess
200
+ * from the empty bag it leaves behind. A `stored-connection` adapter resolves to `unreadable`
201
+ * and is REPORTED: writing back with a bag that would not open authenticates as nobody, and the
202
+ * vendor's rejection would name the wrong fault. An `out-of-band` adapter (GitHub Issues rides
203
+ * the workspace's App, GitLab Issues its VCS connection) never needed the row to post, so it
204
+ * stays READY and loses only what the row actually carried: the reply channel, which is
205
+ * WITHHELD rather than assumed, because telling a reporter to reply where nothing listens is
206
+ * the exact thing this resolution exists to prevent.
207
+ *
208
+ * Both verdicts are scoped to the SOURCE they were learned about. A block's issues can span
209
+ * trackers, and a corrupt Linear envelope is no evidence at all about the workspace's Jira
210
+ * connection, so a batch-wide failure would take a working channel away from a healthy ticket.
204
211
  */
205
- async resolveTicketReplyChannels(workspaceId, issues) {
206
- const wired = new Map();
212
+ async resolveSources(workspaceId, issues) {
213
+ const sources = [...new Set(issues.map((issue) => issue.source))];
214
+ const out = new Map();
215
+ /** The adapter for a source, or `undefined` when nothing is registered to write back with. */
216
+ const adapterFor = (source) => this.sources.get(source)?.writeback;
217
+ const ready = (adapter, credentials, ticketReplies) => ({
218
+ status: 'ready',
219
+ adapter,
220
+ ctx: createTaskWritebackContext({ workspaceId, credentials }),
221
+ ticketReplies,
222
+ });
223
+ /**
224
+ * A source that HAS no stored connection: no row, or no store wired at all. Every adapter
225
+ * stays ready with an empty bag, because absence is the adapter's own question to answer. A
226
+ * credentialless one is unaffected, and one that needs credentials throws from the call with
227
+ * a message naming the missing connection, which beats this file guessing that fault from
228
+ * outside (see the port doc on `TaskWritebackContext.credentials`).
229
+ *
230
+ * A row that FAILED to open is the opposite case and is handled below: something exists and
231
+ * could not be read, so an adapter that needs it must not be asked to try.
232
+ */
233
+ for (const source of sources) {
234
+ const adapter = adapterFor(source);
235
+ out.set(source, adapter ? ready(adapter, {}, false) : { status: 'unwired' });
236
+ }
207
237
  const connections = this.deps.taskConnectionStore;
208
238
  if (!connections)
209
- return wired;
210
- const sources = [...new Set(issues.map((issue) => issue.source))];
211
- // Default FALSE for every source asked about, then raise the ones that answered: a source with
212
- // no stored connection is simply absent from the result, and it has no reply channel.
213
- for (const source of sources)
214
- wired.set(source, false);
239
+ return out;
215
240
  let opened;
216
241
  try {
217
242
  opened = await connections.listBySources(workspaceId, sources);
218
243
  }
219
244
  catch (error) {
220
245
  // The stored-row READ itself failed, before any source was opened, so nothing was learned
221
- // about any of them and the whole set stays false.
222
- this.log.warn('tracker connections unreadable; offering the API answer path only', {
223
- workspaceId,
224
- sources,
225
- ...describeError(error),
226
- });
227
- return wired;
246
+ // about any of them.
247
+ this.markUnreadable(out, workspaceId, sources, error);
248
+ return out;
228
249
  }
229
250
  for (const result of opened) {
230
251
  if (result.status === 'unreadable') {
231
- this.log.warn('tracker connection unreadable; offering the API answer path only', {
232
- workspaceId,
233
- source: result.source,
234
- ...describeError(result.cause),
235
- });
252
+ this.markUnreadable(out, workspaceId, [result.source], result.cause);
236
253
  continue;
237
254
  }
238
- wired.set(result.source, trackerWebhookSecret(result.connection.credentials) !== '');
255
+ const adapter = adapterFor(result.source);
256
+ if (!adapter)
257
+ continue;
258
+ const credentials = result.connection.credentials;
259
+ out.set(result.source, ready(adapter, credentials, trackerWebhookSecret(credentials) !== ''));
239
260
  }
240
- return wired;
261
+ return out;
241
262
  }
242
263
  /**
243
- * Acknowledge a ticket reply on the very issue it arrived on.
264
+ * Record a connection that would not open, costing each source only what it actually costs.
244
265
  *
245
- * Deliberately NOT marker-gated, unlike {@link postReviewQuestions}: an ack is the terminal
246
- * effect of an ingest that is ALREADY claimed exactly once by `tracker_comment_ingests`, so a
247
- * second marker here would guard nothing and add a second thing to reason about. It is also not
248
- * gated on the workspace writeback settings — a reply is an explicit request for a response, not
249
- * an unsolicited courtesy.
250
- *
251
- * Best-effort throughout: the reply is applied and settled before this runs, so a tracker outage
252
- * costs the acknowledgement, never the answer.
266
+ * An adapter that authenticates WITH the bag is lost until the connection is repaired, so it
267
+ * resolves to `unreadable` and every call for it fails loudly. An `out-of-band` one keeps its
268
+ * whole writeback (it authenticates from `workspaceId` and only ever read this row for the
269
+ * inbound secret) and loses just the reply channel, which the seeded entry already withholds.
270
+ * Reading the failure as one fact for every source is what would let a rotated
271
+ * `TASKS_ENCRYPTION_KEY` silence GitHub's PR notices, and the two log lines say which happened
272
+ * because an operator acts on them differently.
253
273
  */
254
- async postReviewReplyAck(workspaceId, issue, ack) {
255
- await this.comment(workspaceId, issue, renderReviewReplyAck(ack));
274
+ markUnreadable(out, workspaceId, sources, cause) {
275
+ for (const source of sources) {
276
+ const outOfBand = this.sources.get(source)?.writeback?.authenticates === 'out-of-band';
277
+ if (!outOfBand)
278
+ out.set(source, { status: 'unreadable' });
279
+ this.log.warn(outOfBand
280
+ ? 'tracker connection unreadable; the writeback still posts but can offer no ticket reply channel'
281
+ : 'tracker connection unreadable; writeback cannot authenticate', { workspaceId, source, ...describeError(cause) });
282
+ }
256
283
  }
257
284
  /**
258
285
  * Run a writeback per issue, isolating failures so one bad issue can't block the rest. Each
@@ -268,166 +295,72 @@ export class IssueWritebackService {
268
295
  })));
269
296
  }
270
297
  /**
271
- * Post a comment on one linked issue. Returns whether this deployment has a transport for that
272
- * issue's source at all; a wired transport that cannot deliver THROWS (see the seam docs), so
273
- * `true` means the comment landed. The fire-and-forget hooks ignore both signals, but the
274
- * parked-review writeback distinguishes them: an unwired source is a permanent no-op to retry
275
- * once someone wires it, a throw is a failure to retry on the next replay, and neither may be
276
- * recorded as `posted`.
298
+ * Post a comment on one linked issue. Returns whether this deployment has a writeback for that
299
+ * issue's source at all; an adapter that cannot deliver THROWS (see the port), so `true` means
300
+ * the comment landed. The fire-and-forget hooks ignore both signals, but the parked-review
301
+ * writeback distinguishes them: an unwired source is a permanent no-op to retry once someone
302
+ * wires it, a throw is a failure to retry on the next replay, and neither may be recorded as
303
+ * `posted`.
277
304
  */
278
- async comment(workspaceId,
305
+ async comment(workspaceId, resolved,
279
306
  // Narrowed to the natural key rather than the whole record: the ticket-reply ack addresses the
280
307
  // issue the comment ARRIVED on, which it knows as `(source, externalId)` off the delivery and
281
308
  // has no reason to re-read from the projection.
282
309
  issue, body) {
283
- if (issue.source === 'github') {
284
- if (!this.deps.commentOnGitHubIssue)
285
- return false;
286
- await this.deps.commentOnGitHubIssue(workspaceId, issue.externalId, body);
287
- return true;
288
- }
289
- if (issue.source === 'jira') {
290
- if (!this.deps.resolveJiraConnection || !this.deps.fetchImpl)
291
- return false;
292
- await this.jiraRequest(workspaceId, `issue/${encodeURIComponent(issue.externalId)}/comment`, {
293
- method: 'POST',
294
- body: buildJiraCommentPayload(body),
310
+ const source = resolved.get(issue.source);
311
+ if (source?.status !== 'ready') {
312
+ // An unreadable connection is a FAILURE to retry, not an absent capability: the source is
313
+ // wired and the row exists, it just could not be opened this time.
314
+ if (source?.status === 'unreadable') {
315
+ throw new Error(`The ${issue.source} connection for this workspace could not be opened`);
316
+ }
317
+ this.log.warn('no writeback is wired for this source; the comment was not posted', {
318
+ workspaceId,
319
+ source: issue.source,
320
+ externalId: issue.externalId,
321
+ remedy: `register a ${issue.source} task-source provider declaring a writeback adapter`,
295
322
  });
296
- return true;
297
- }
298
- if (issue.source === 'linear') {
299
- if (!this.deps.resolveLinearConnection || !this.deps.fetchImpl)
300
- return false;
301
- await this.commentLinear(workspaceId, issue.externalId, body);
302
- return true;
303
- }
304
- return false;
305
- }
306
- async resolve(workspaceId, issue) {
307
- if (issue.source === 'github') {
308
- await this.deps.closeGitHubIssue?.(workspaceId, issue.externalId);
309
- return;
310
- }
311
- if (issue.source === 'jira') {
312
- await this.transitionJira(workspaceId, issue.externalId, 'done');
313
- return;
314
- }
315
- if (issue.source === 'linear') {
316
- await this.transitionLinear(workspaceId, issue.externalId, 'completed');
323
+ return false;
317
324
  }
325
+ await source.adapter.comment(source.ctx, issue.externalId, body);
326
+ return true;
318
327
  }
319
328
  /**
320
- * Mark a picked-up issue in-progress: the vendor's in-progress workflow
321
- * transition (Jira's `indeterminate` status category / Linear's `started`
322
- * state), or the in-progress label for GitHub, which has no native status.
329
+ * Apply the issue's state change for a hook: `resolve` on merge, `markInProgress` on pickup.
330
+ *
331
+ * Both are OPTIONAL on the adapter, and an omitted one is reported rather than passed over in
332
+ * silence. A tracker whose vendor has no such notion is a real answer an operator may need (the
333
+ * merge comment landed and the issue stayed open, and only this line says why), and it must not
334
+ * read like the write simply succeeded.
323
335
  */
324
- async markInProgress(workspaceId, issue, inProgressLabel) {
325
- if (issue.source === 'github') {
326
- await this.deps.labelGitHubIssue?.(workspaceId, issue.externalId, inProgressLabel ?? DEFAULT_IN_PROGRESS_LABEL);
336
+ async applyState(workspaceId, resolved, issue, action, mark) {
337
+ const source = resolved.get(issue.source);
338
+ // An unwired or unreadable source has already been reported by the comment that preceded
339
+ // every call site, so this stays quiet rather than logging the same fact twice.
340
+ if (source?.status !== 'ready')
327
341
  return;
328
- }
329
- if (issue.source === 'jira') {
330
- await this.transitionJira(workspaceId, issue.externalId, 'indeterminate');
342
+ const ctx = source.ctx;
343
+ if (action === 'resolve') {
344
+ if (!source.adapter.resolve) {
345
+ this.log.warn('this source cannot resolve an issue; it was commented on but left open', {
346
+ workspaceId,
347
+ source: issue.source,
348
+ externalId: issue.externalId,
349
+ });
350
+ return;
351
+ }
352
+ await source.adapter.resolve(ctx, issue.externalId);
331
353
  return;
332
354
  }
333
- if (issue.source === 'linear') {
334
- await this.transitionLinear(workspaceId, issue.externalId, 'started');
335
- }
336
- }
337
- /**
338
- * Comment on a Linear issue: resolve its UUID by identifier, then `commentCreate`.
339
- * On merge this runs before {@link resolveLinear}, so the issue is looked up twice
340
- * (here for the UUID, there for the UUID + the team's workflow states). That second
341
- * lookup is unavoidable — only it carries the states needed to pick the resolved
342
- * state — and the duplicated read is one cheap `issue(id:){id}` call, so the seam is
343
- * kept uniform with the GitHub/Jira comment/resolve split rather than special-cased.
344
- */
345
- async commentLinear(workspaceId, identifier, body) {
346
- const lookup = (await this.linearRequest(workspaceId, LINEAR_ISSUE_ID_QUERY, {
347
- id: identifier,
348
- }));
349
- const issueId = lookup?.issue?.id;
350
- if (!issueId)
351
- return;
352
- await this.linearRequest(workspaceId, LINEAR_COMMENT_CREATE_MUTATION, buildLinearCommentVariables(issueId, body));
353
- }
354
- /**
355
- * Transition a Linear issue: look up its UUID + team states, pick the target
356
- * state (`completed` on resolve, `started` on pickup), then `issueUpdate`.
357
- */
358
- async transitionLinear(workspaceId, identifier, stateType) {
359
- const lookup = (await this.linearRequest(workspaceId, LINEAR_ISSUE_RESOLVE_LOOKUP_QUERY, {
360
- id: identifier,
361
- }));
362
- const issueId = lookup?.issue?.id;
363
- const stateId = pickStateIdByType((lookup?.issue?.team?.states?.nodes ?? []), stateType);
364
- if (!issueId || !stateId)
365
- return;
366
- await this.linearRequest(workspaceId, LINEAR_ISSUE_UPDATE_MUTATION, buildLinearStateUpdateVariables(issueId, stateId));
367
- }
368
- /**
369
- * Issue a Linear GraphQL request for the workspace's connection. Returns the
370
- * validated `data` (or null when Linear isn't configured). Throws on a GraphQL /
371
- * HTTP error so the per-issue isolation in {@link forEachIssue} reports and swallows it.
372
- */
373
- async linearRequest(workspaceId, document, variables) {
374
- const { resolveLinearConnection, fetchImpl } = this.deps;
375
- if (!resolveLinearConnection || !fetchImpl)
376
- return null;
377
- const connection = await resolveLinearConnection(workspaceId);
378
- if (!connection?.token && !connection?.apiKey)
379
- return null;
380
- return postLinearGraphql(fetchImpl, linearAuthFromCredentials(connection), document, variables);
381
- }
382
- /**
383
- * Transition a Jira issue into a standard status category: `done` on resolve,
384
- * `indeterminate` (In Progress) on pickup. Lists the issue's available
385
- * transitions and fires the first one landing in the category.
386
- */
387
- async transitionJira(workspaceId, key, category) {
388
- const path = `issue/${encodeURIComponent(key)}/transitions`;
389
- const list = (await this.jiraRequest(workspaceId, path, { method: 'GET' }));
390
- const transition = pickTransitionByCategory(list?.transitions ?? [], category);
391
- if (!transition?.id)
355
+ if (!source.adapter.markInProgress) {
356
+ this.log.warn('this source cannot mark an issue in progress; the pickup is comment-only', {
357
+ workspaceId,
358
+ source: issue.source,
359
+ externalId: issue.externalId,
360
+ });
392
361
  return;
393
- await this.jiraRequest(workspaceId, path, {
394
- method: 'POST',
395
- body: { transition: { id: transition.id } },
396
- });
397
- }
398
- /**
399
- * Issue a Jira REST v3 request for the workspace's connection. Returns the parsed
400
- * JSON body (or null on an empty/204 response). Throws on a non-OK status so the
401
- * per-issue isolation in {@link forEachIssue} reports and swallows it.
402
- */
403
- async jiraRequest(workspaceId, path, init) {
404
- const { resolveJiraConnection, fetchImpl } = this.deps;
405
- if (!resolveJiraConnection || !fetchImpl)
406
- return null;
407
- const connection = await resolveJiraConnection(workspaceId);
408
- if (!connection?.baseUrl || !connection.accountEmail || !connection.apiToken)
409
- return null;
410
- const base = connection.baseUrl.replace(/\/+$/, '');
411
- const url = `${base}/rest/api/3/${path}`;
412
- const auth = toBase64(`${connection.accountEmail}:${connection.apiToken}`);
413
- const res = await fetchImpl(url, {
414
- method: init.method,
415
- headers: {
416
- authorization: `Basic ${auth}`,
417
- accept: 'application/json',
418
- 'content-type': 'application/json',
419
- 'user-agent': USER_AGENT,
420
- },
421
- // Omit the body entirely for a bodyless (GET) request: the real `fetch` throws
422
- // for ANY non-null body on a GET — including an empty string — which the
423
- // per-issue catch would silently swallow, leaving Jira issues never resolved.
424
- ...(init.body === undefined ? {} : { body: JSON.stringify(init.body) }),
425
- });
426
- if (!res.ok) {
427
- const text = await res.text().catch(() => '');
428
- throw new Error(`Jira ${init.method} ${url} → ${res.status}: ${text.slice(0, 300)}`);
429
362
  }
430
- return res.json().catch(() => null);
363
+ await source.adapter.markInProgress(ctx, issue.externalId, mark);
431
364
  }
432
365
  }
433
366
  //# sourceMappingURL=IssueWritebackService.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IssueWritebackService.js","sourceRoot":"","sources":["../../../src/modules/writeback/IssueWritebackService.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAEb,UAAU,EACV,aAAa,EACb,oBAAoB,EAC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ACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cat-factory/integrations",
3
- "version": "0.152.8",
3
+ "version": "0.153.0",
4
4
  "description": "External-system integration domain logic for the Agent Architecture Board (GitHub, documents, tasks, environments, runners).",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,14 +28,14 @@
28
28
  "p-map": "^7.0.6",
29
29
  "yaml": "^2.9.0",
30
30
  "@cat-factory/contracts": "0.283.0",
31
- "@cat-factory/kernel": "0.278.0"
31
+ "@cat-factory/kernel": "0.279.0"
32
32
  },
33
33
  "devDependencies": {
34
34
  "typescript": "7.0.2",
35
35
  "undici": "^8.10.0",
36
36
  "valibot": "^1.4.2",
37
37
  "vitest": "^4.1.10",
38
- "@cat-factory/caching": "0.18.23"
38
+ "@cat-factory/caching": "0.18.24"
39
39
  },
40
40
  "scripts": {
41
41
  "build": "tsc -b tsconfig.build.json",