@codyswann/lisa 5.6.0 → 5.7.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 (164) hide show
  1. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  2. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  3. package/dist/core/upstream-evidence-manifest.js +51 -14
  4. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  5. package/package.json +4 -4
  6. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  7. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  8. package/plugins/lisa/.codex-plugin/scripts/operator-id-kinds.mjs +17 -4
  9. package/plugins/lisa/.codex-plugin/scripts/ready-queue-order.mjs +62 -5
  10. package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/validate-config.mjs +75 -38
  11. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/SKILL.md +23 -7
  12. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/references/runbook-template.md +1 -1
  13. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-cycle.mjs +4 -3
  14. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-human.mjs +12 -7
  15. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-orphans.mjs +3 -1
  16. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
  17. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-usage.mjs +4 -3
  18. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/config.mjs +26 -0
  19. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/human-needed.mjs +1 -1
  20. package/plugins/lisa/.codex-plugin/skills/lisa-setup-session-manager/SKILL.md +7 -3
  21. package/plugins/lisa/rules/reference/config-resolution.md +3 -2
  22. package/plugins/lisa/scripts/operator-id-kinds.mjs +17 -4
  23. package/plugins/lisa/scripts/ready-queue-order.mjs +62 -5
  24. package/plugins/lisa/skills/lisa-secrets-access/scripts/validate-config.mjs +75 -38
  25. package/plugins/lisa/skills/lisa-session-manager/SKILL.md +23 -7
  26. package/plugins/lisa/skills/lisa-session-manager/references/runbook-template.md +1 -1
  27. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-cycle.mjs +4 -3
  28. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-human.mjs +12 -7
  29. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-orphans.mjs +3 -1
  30. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
  31. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-usage.mjs +4 -3
  32. package/plugins/lisa/skills/lisa-session-manager/scripts/config.mjs +26 -0
  33. package/plugins/lisa/skills/lisa-session-manager/scripts/human-needed.mjs +1 -1
  34. package/plugins/lisa/skills/lisa-setup-session-manager/SKILL.md +7 -3
  35. package/plugins/lisa-agy/plugin.json +1 -1
  36. package/plugins/lisa-agy/scripts/operator-id-kinds.mjs +17 -4
  37. package/plugins/lisa-agy/scripts/ready-queue-order.mjs +62 -5
  38. package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/validate-config.mjs +75 -38
  39. package/plugins/lisa-agy/skills/lisa-session-manager/SKILL.md +23 -7
  40. package/plugins/lisa-agy/skills/lisa-session-manager/references/runbook-template.md +1 -1
  41. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-cycle.mjs +4 -3
  42. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-human.mjs +12 -7
  43. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-orphans.mjs +3 -1
  44. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
  45. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-usage.mjs +4 -3
  46. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/config.mjs +26 -0
  47. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/human-needed.mjs +1 -1
  48. package/plugins/lisa-agy/skills/lisa-setup-session-manager/SKILL.md +7 -3
  49. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  50. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  51. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  52. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  53. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  54. package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
  55. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  56. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  57. package/plugins/lisa-copilot/rules/reference/config-resolution.md +3 -2
  58. package/plugins/lisa-copilot/scripts/operator-id-kinds.mjs +17 -4
  59. package/plugins/lisa-copilot/scripts/ready-queue-order.mjs +62 -5
  60. package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/validate-config.mjs +75 -38
  61. package/plugins/lisa-copilot/skills/lisa-session-manager/SKILL.md +23 -7
  62. package/plugins/lisa-copilot/skills/lisa-session-manager/references/runbook-template.md +1 -1
  63. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-cycle.mjs +4 -3
  64. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-human.mjs +12 -7
  65. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-orphans.mjs +3 -1
  66. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
  67. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-usage.mjs +4 -3
  68. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/config.mjs +26 -0
  69. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/human-needed.mjs +1 -1
  70. package/plugins/lisa-copilot/skills/lisa-setup-session-manager/SKILL.md +7 -3
  71. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  72. package/plugins/lisa-cursor/rules/config-resolution-reference.mdc +3 -2
  73. package/plugins/lisa-cursor/scripts/operator-id-kinds.mjs +17 -4
  74. package/plugins/lisa-cursor/scripts/ready-queue-order.mjs +62 -5
  75. package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/validate-config.mjs +75 -38
  76. package/plugins/lisa-cursor/skills/lisa-session-manager/SKILL.md +23 -7
  77. package/plugins/lisa-cursor/skills/lisa-session-manager/references/runbook-template.md +1 -1
  78. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-cycle.mjs +4 -3
  79. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-human.mjs +12 -7
  80. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-orphans.mjs +3 -1
  81. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
  82. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-usage.mjs +4 -3
  83. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/config.mjs +26 -0
  84. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/human-needed.mjs +1 -1
  85. package/plugins/lisa-cursor/skills/lisa-setup-session-manager/SKILL.md +7 -3
  86. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  87. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  88. package/plugins/lisa-devin/rules/reference/config-resolution.md +3 -2
  89. package/plugins/lisa-devin/scripts/operator-id-kinds.mjs +17 -4
  90. package/plugins/lisa-devin/scripts/ready-queue-order.mjs +62 -5
  91. package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/validate-config.mjs +75 -38
  92. package/plugins/lisa-devin/skills/lisa-session-manager/SKILL.md +23 -7
  93. package/plugins/lisa-devin/skills/lisa-session-manager/references/runbook-template.md +1 -1
  94. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-cycle.mjs +4 -3
  95. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-human.mjs +12 -7
  96. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-orphans.mjs +3 -1
  97. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
  98. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-usage.mjs +4 -3
  99. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/config.mjs +26 -0
  100. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/human-needed.mjs +1 -1
  101. package/plugins/lisa-devin/skills/lisa-setup-session-manager/SKILL.md +7 -3
  102. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  103. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  104. package/plugins/lisa-expo-agy/plugin.json +1 -1
  105. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  106. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  107. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  108. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  109. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  110. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  111. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  112. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  113. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  114. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  115. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  116. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  117. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  118. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  119. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  120. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  121. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  122. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  123. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  124. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  125. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  126. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  127. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  128. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  129. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  130. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  131. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  132. package/plugins/lisa-rails-agy/plugin.json +1 -1
  133. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  134. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  135. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  136. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  137. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  138. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  139. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  140. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  141. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  142. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  143. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  144. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  145. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  146. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  147. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  148. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  149. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  150. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  151. package/plugins/src/base/rules/reference/config-resolution.md +3 -2
  152. package/plugins/src/base/scripts/operator-id-kinds.mjs +17 -4
  153. package/plugins/src/base/scripts/ready-queue-order.mjs +62 -5
  154. package/plugins/src/base/skills/lisa-secrets-access/scripts/validate-config.mjs +75 -38
  155. package/plugins/src/base/skills/lisa-session-manager/SKILL.md +23 -7
  156. package/plugins/src/base/skills/lisa-session-manager/references/runbook-template.md +1 -1
  157. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-cycle.mjs +4 -3
  158. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-human.mjs +12 -7
  159. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-orphans.mjs +3 -1
  160. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
  161. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-usage.mjs +4 -3
  162. package/plugins/src/base/skills/lisa-session-manager/scripts/config.mjs +26 -0
  163. package/plugins/src/base/skills/lisa-session-manager/scripts/human-needed.mjs +1 -1
  164. package/plugins/src/base/skills/lisa-setup-session-manager/SKILL.md +7 -3
@@ -32,7 +32,10 @@
32
32
  * is compared exactly as before (with the normalized assignee id, or the
33
33
  * normalized author id). Each normalizer therefore also carries the login and
34
34
  * the account id of the assignee and the login of the author, where its
35
- * tracker has them, so the kinds never have to be guessed.
35
+ * tracker has them, so the kinds never have to be guessed. A trusted-author
36
+ * entry may also be `integration:<service>` (#4895): it matches an item no
37
+ * person authored, by the integration the tracker records as its filer
38
+ * (`authorIntegration`, today only Linear's `botActor`).
36
39
  *
37
40
  * Held items are judged by {@link isHumanGated}, the one shared answer to "is
38
41
  * a person holding this?", rather than by a local label check (#3805).
@@ -207,6 +210,9 @@ export function normalizeGithubIssue(issue, options = {}) {
207
210
  // explicitly, knowing a freed login can be re-registered (#4623).
208
211
  authorId: idOrNull(issue.user?.id),
209
212
  authorLogin: idOrNull(issue.user?.login),
213
+ // A GitHub App files as its own bot user, which has an id: trust it with
214
+ // `id:` like any author. No integration-only authorship exists here.
215
+ authorIntegration: null,
210
216
  isContainer: Number(summary?.total ?? 0) > Number(summary?.completed ?? 0),
211
217
  // `blocked_by` in the dependency summary counts only OPEN blockers.
212
218
  openBlockers: count(issue.issue_dependencies_summary?.blocked_by),
@@ -247,6 +253,9 @@ export function normalizeJiraIssue(issue) {
247
253
  body: adfText(fields.description),
248
254
  authorId: idOrNull(fields.reporter?.accountId ?? fields.creator?.accountId),
249
255
  authorLogin: null,
256
+ // Jira automation and integrations file as an account (the reporter), so
257
+ // they are trusted by accountId; no integration-only authorship exists.
258
+ authorIntegration: null,
250
259
  isContainer:
251
260
  Number(type.hierarchyLevel ?? 0) > 0 ||
252
261
  text(type.name).toLowerCase() === "epic" ||
@@ -255,6 +264,37 @@ export function normalizeJiraIssue(issue) {
255
264
  });
256
265
  }
257
266
 
267
+ /**
268
+ * The integration that filed a Linear issue no person authored, or null
269
+ * (CodySwannGT/lisa#4895).
270
+ *
271
+ * Linear leaves `creator` null for an issue an integration or OAuth app
272
+ * created, and records the filer on `botActor`: `subType` names the
273
+ * integration service (`sentry`, `github`), set by Linear itself. With no
274
+ * service, the bot's `id` identifies its source record instead. The bot's
275
+ * `name` is never used: an app's display name is chosen by whoever registers
276
+ * it, so trusting it would let any app installed in the workspace take over an
277
+ * entry by naming itself after a trusted integration (the risk #4715 recorded
278
+ * for `login:`). `creator` is also null for a deleted account, and an
279
+ * integration can file on behalf of a non-Linear user (`externalUserCreator`,
280
+ * set by Slack or Intercom intake). Neither of those is the integration's own
281
+ * authorship, so both yield null. The fetch must have asked for
282
+ * `externalUserCreator`: when the key is missing, whether an outside person
283
+ * filed the item is unknown, and unknown is never trusted.
284
+ * @param {Record<string, any>} issue - Issue node
285
+ * @returns {string | null} The integration's service, else its bot id
286
+ */
287
+ function linearIntegrationAuthor(issue) {
288
+ // Both author fields must be read and explicitly null: a missing key, or a
289
+ // creator object without an id, says nothing about who filed the item.
290
+ if (!issue || !Object.hasOwn(issue, "creator")) return null;
291
+ if (issue.creator !== null) return null;
292
+ if (!Object.hasOwn(issue, "externalUserCreator")) return null;
293
+ if (issue.externalUserCreator !== null) return null;
294
+ const bot = issue.botActor;
295
+ return idOrNull(bot?.subType) ?? idOrNull(bot?.id);
296
+ }
297
+
258
298
  /**
259
299
  * Normalize one Linear GraphQL issue. An issue with any child not completed
260
300
  * or canceled is a container.
@@ -293,6 +333,7 @@ export function normalizeLinearIssue(issue) {
293
333
  body: text(issue?.description),
294
334
  authorId: idOrNull(issue?.creator?.id),
295
335
  authorLogin: null,
336
+ authorIntegration: linearIntegrationAuthor(issue),
296
337
  isContainer: children.some(
297
338
  child => !LINEAR_FINISHED_STATE_TYPES.has(child?.state?.type)
298
339
  ),
@@ -306,8 +347,9 @@ export function normalizeLinearIssue(issue) {
306
347
  * dependencies whose blocker is not finished. The Ready tier ignores both.
307
348
  * `assigneeLogin` / `authorLogin` are GitHub logins (null on trackers with
308
349
  * none) and `assigneeAccountId` the assignee's account id, for kind-keyed
309
- * entries (#4623).
310
- * @param {{ ref: string, title: string, assigneeId: string | null, assigneeLogin: string | null, assigneeAccountId: string | null, priorityRank: number, createdAt: string, updatedAt: string, labels: string[], body: string, authorId: string | null, authorLogin: string | null, isContainer: boolean, openBlockers: number }} input
350
+ * entries (#4623). `authorIntegration` names the integration that filed an
351
+ * item no person authored, for `integration:` entries (#4895).
352
+ * @param {{ ref: string, title: string, assigneeId: string | null, assigneeLogin: string | null, assigneeAccountId: string | null, priorityRank: number, createdAt: string, updatedAt: string, labels: string[], body: string, authorId: string | null, authorLogin: string | null, authorIntegration: string | null, isContainer: boolean, openBlockers: number }} input
311
353
  */
312
354
  function shape(input) {
313
355
  return {
@@ -323,6 +365,7 @@ function shape(input) {
323
365
  body: input.body,
324
366
  authorId: input.authorId,
325
367
  authorLogin: input.authorLogin,
368
+ authorIntegration: input.authorIntegration,
326
369
  isContainer: input.isContainer,
327
370
  openBlockers: input.openBlockers,
328
371
  repoLabels: repoLabelsOf(input.labels),
@@ -349,7 +392,10 @@ function isOperatorItem(item, context) {
349
392
  /**
350
393
  * Whether a trusted-author entry names the item's author: a plain entry by
351
394
  * the normalized author id, as before; `login:` by the author's GitHub login;
352
- * `id:` by the author id (a GitHub numeric id, Jira accountId, Linear id).
395
+ * `id:` by the author id (a GitHub numeric id, Jira accountId, Linear id);
396
+ * `integration:` by the integration that filed an item with no person author
397
+ * (#4895). An item a person authored has no integration to match, so an
398
+ * `integration:` entry can never vouch for a person.
353
399
  * @param {Record<string, any>} item
354
400
  * @param {ReturnType<typeof orderingContext>} context
355
401
  * @returns {boolean}
@@ -360,6 +406,7 @@ function isTrustedAuthor(item, context) {
360
406
  plain: author,
361
407
  login: idOrNull(item.authorLogin),
362
408
  id: author,
409
+ integration: author === null ? idOrNull(item.authorIntegration) : null,
363
410
  };
364
411
  return context.trusted.some(entry => entryMatches(entry, fields));
365
412
  }
@@ -531,7 +578,17 @@ function rank(items, judge, context) {
531
578
  ),
532
579
  excluded: judged
533
580
  .filter(one => one.reason !== null)
534
- .map(one => ({ ref: one.item.ref, reason: one.reason })),
581
+ .map(one => ({
582
+ ref: one.item.ref,
583
+ reason: one.reason,
584
+ // The value an `integration:` entry would need, so the operator can
585
+ // read it off the queue instead of the tracker's API (#4895).
586
+ ...(one.reason === "untrusted-author" &&
587
+ idOrNull(one.item.authorId) === null &&
588
+ idOrNull(one.item.authorIntegration) !== null
589
+ ? { authorIntegration: one.item.authorIntegration }
590
+ : {}),
591
+ })),
535
592
  };
536
593
  }
537
594
 
@@ -520,7 +520,7 @@ const TOKEN_VALUE = /^\d{5,}:[A-Za-z0-9_-]{30,}$/;
520
520
  * A legacy Jira Cloud accountId (`557058:<uuid>`), which `TOKEN_VALUE` also
521
521
  * matches (CodySwannGT/lisa#4719).
522
522
  *
523
- * Exempted only for `operatorIds` / `trustedAuthorIds` entries, where a Jira
523
+ * Exempted only for `operatorIds` / `trustedAuthorIds` / `trustedReleaseIds` entries, where a Jira
524
524
  * project puts exactly this id. A Telegram token's secret half is never in
525
525
  * canonical UUID form, so the exemption lets no token through.
526
526
  */
@@ -528,7 +528,11 @@ const JIRA_LEGACY_ACCOUNT_ID =
528
528
  /^\d+:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
529
529
 
530
530
  /** The block's id lists, whose entries the credential scan reads by kind. */
531
- const ID_LIST_KEYS = new Set(["operatorIds", "trustedAuthorIds"]);
531
+ const ID_LIST_KEYS = new Set([
532
+ "operatorIds",
533
+ "trustedAuthorIds",
534
+ "trustedReleaseIds",
535
+ ]);
532
536
 
533
537
  /** Key names that only ever hold a credential. */
534
538
  const CREDENTIAL_KEY = /token|secret|password|passwd|api[-_]?key|credential/i;
@@ -803,7 +807,14 @@ function findCredentials(value, path, segments = []) {
803
807
  const ID_ENTRY_PREFIX = /^([A-Za-z]+):/;
804
808
 
805
809
  /** The kinds an id entry's prefix may name. */
806
- const ID_ENTRY_KINDS = new Set(["login", "id"]);
810
+ const ID_ENTRY_KINDS = new Set(["login", "id", "integration"]);
811
+
812
+ /**
813
+ * The one list an `integration:` entry belongs in (CodySwannGT/lisa#4895): an
814
+ * integration may author dispatched work, but it is not a person, so it can
815
+ * never be an operator or release a human hold.
816
+ */
817
+ const INTEGRATION_LIST_KEYS = new Set(["trustedAuthorIds"]);
807
818
 
808
819
  /** Letters-and-colon starts of real tracker ids (JSM customers' `qm:`). */
809
820
  const PLAIN_ID_STARTS = new Set(["qm"]);
@@ -817,10 +828,11 @@ const ALL_DIGIT_ENTRY = /^\d+$/;
817
828
  * A local copy of the grammar in `scripts/operator-id-kinds.mjs`, because
818
829
  * plugin payload scripts ship standalone; `operator-id-kinds.test.ts` pins
819
830
  * the two together. `login:<v>` is a GitHub login, `id:<v>` an account id,
820
- * and an entry with no letters-only prefix is plain (a Jira accountId such as
831
+ * `integration:<service>` an integration that files items no person authored
832
+ * (CodySwannGT/lisa#4895), and an entry with no letters-only prefix is plain (a Jira accountId such as
821
833
  * `557058:<uuid>` or `qm:<id>` included).
822
834
  * @param {string} entry One entry.
823
- * @returns {"login" | "id" | "plain" | "unknown-prefix" | "empty-value"} Kind.
835
+ * @returns {"login" | "id" | "integration" | "plain" | "unknown-prefix" | "empty-value"} Kind.
824
836
  */
825
837
  export function classifyIdEntry(entry) {
826
838
  const prefix = ID_ENTRY_PREFIX.exec(entry)?.[1];
@@ -844,7 +856,7 @@ function botTokenProblem(path) {
844
856
  }
845
857
 
846
858
  /**
847
- * Strip every leading `login:` / `id:` prefix from an entry, so a value
859
+ * Strip every leading `login:` / `id:` / `integration:` prefix from an entry, so a value
848
860
  * stacked behind several (`login:id:<v>`) is reached (CodySwannGT/lisa#4754).
849
861
  * @param {string} entry One entry, already trimmed.
850
862
  * @returns {string} The value after the last known prefix, trimmed.
@@ -857,10 +869,10 @@ function stripIdEntryPrefixes(entry) {
857
869
  }
858
870
 
859
871
  /**
860
- * Scan one `operatorIds` / `trustedAuthorIds` entry for a bot token
872
+ * Scan one `operatorIds` / `trustedAuthorIds` / `trustedReleaseIds` entry for a bot token
861
873
  * (CodySwannGT/lisa#4719).
862
874
  *
863
- * The value after one or more `login:` / `id:` prefixes is what gets tested,
875
+ * The value after one or more `login:` / `id:` / `integration:` prefixes is what gets tested,
864
876
  * since a token pasted behind a prefix (or a stack of them, such as
865
877
  * `login:id:<token>`; CodySwannGT/lisa#4754) is as leaked as a bare one. A
866
878
  * legacy Jira accountId (`557058:<uuid>`) is token-shaped but is a real id,
@@ -882,7 +894,7 @@ function idEntryCredentials(entry, path) {
882
894
  * drop a person. The refusal never repeats the entry's value: a token pasted
883
895
  * behind an unknown prefix (`ID:<token>`) would otherwise land in terminals,
884
896
  * CI logs and transcripts (CodySwannGT/lisa#4754).
885
- * @param {string} key `operatorIds` or `trustedAuthorIds`.
897
+ * @param {string} key `operatorIds`, `trustedAuthorIds` or `trustedReleaseIds`.
886
898
  * @param {readonly string[]} ids Entries, already known to be strings.
887
899
  * @returns {string[]} Problems found.
888
900
  */
@@ -896,9 +908,18 @@ function idEntryProblems(key, ids) {
896
908
  return [
897
909
  `${path} has an ` +
898
910
  `unknown prefix ${JSON.stringify(prefix)}. Use login:<GitHub ` +
899
- `login>, id:<numeric or tracker account id>, or a plain id; write ` +
900
- `a tracker id that itself starts with letters and a colon as ` +
901
- `id:<that id>.`,
911
+ `login>, id:<numeric or tracker account id>, ` +
912
+ `integration:<service> (trustedAuthorIds only), or a plain id; ` +
913
+ `write a tracker id that itself starts with letters and a colon ` +
914
+ `as id:<that id>.`,
915
+ ];
916
+ }
917
+ if (kind === "integration" && !INTEGRATION_LIST_KEYS.has(key)) {
918
+ return [
919
+ `${path} is an integration: entry, which belongs only in ` +
920
+ `sessionManager.trustedAuthorIds. An integration can author ` +
921
+ `dispatched work but is not a person, so it can never be an ` +
922
+ `operator, answer a question, or release a human hold.`,
902
923
  ];
903
924
  }
904
925
  return kind === "empty-value"
@@ -980,6 +1001,31 @@ function validateOperatorIds(ids) {
980
1001
  : idEntryProblems("operatorIds", ids);
981
1002
  }
982
1003
 
1004
+ /**
1005
+ * Validate one trust list: `trustedAuthorIds` (whose items may be dispatched)
1006
+ * or `trustedReleaseIds` (who may release a human hold; CodySwannGT/lisa#4895).
1007
+ * Both take stable ids, never logins or display names, and both refuse an
1008
+ * empty list, which reads as set while trusting no one or everyone.
1009
+ * @param {"trustedAuthorIds" | "trustedReleaseIds"} key The list's key.
1010
+ * @param {unknown} ids The value, if present.
1011
+ * @param {string} emptyProblem The refusal for an empty list.
1012
+ * @returns {string[]} Problems found.
1013
+ */
1014
+ function validateTrustList(key, ids, emptyProblem) {
1015
+ if (ids === undefined) return [];
1016
+ if (
1017
+ !Array.isArray(ids) ||
1018
+ !ids.every(id => typeof id === "string" && id !== "")
1019
+ ) {
1020
+ return [
1021
+ `sessionManager.${key} must be an array of stable ` +
1022
+ `tracker user ids (GitHub numeric user id, Jira accountId, ` +
1023
+ `Linear user id), not logins or display names.`,
1024
+ ];
1025
+ }
1026
+ return ids.length === 0 ? [emptyProblem] : idEntryProblems(key, ids);
1027
+ }
1028
+
983
1029
  /**
984
1030
  * Validate the opt-in `sessionManager` block.
985
1031
  *
@@ -998,11 +1044,6 @@ export function validateSessionManager(block) {
998
1044
  typeof block.name === "string" && SESSION_MANAGER_NAME.test(block.name);
999
1045
  const intervalOk =
1000
1046
  block.interval === undefined || parseLoopInterval(block.interval) !== null;
1001
- const trustedOk =
1002
- block.trustedAuthorIds === undefined ||
1003
- (Array.isArray(block.trustedAuthorIds) &&
1004
- block.trustedAuthorIds.every(id => typeof id === "string" && id !== ""));
1005
-
1006
1047
  return [
1007
1048
  ...(nameOk
1008
1049
  ? []
@@ -1021,27 +1062,23 @@ export function validateSessionManager(block) {
1021
1062
  ...validateNumberBlock("capacity", block.capacity, CAPACITY_RULES),
1022
1063
  ...validateNumberBlock("stall", block.stall, STALL_RULES),
1023
1064
  ...validateNotify(block.notify),
1024
- ...(trustedOk
1025
- ? []
1026
- : [
1027
- `sessionManager.trustedAuthorIds must be an array of stable ` +
1028
- `tracker user ids (GitHub numeric user id, Jira accountId, ` +
1029
- `Linear user id), not logins or display names.`,
1030
- ]),
1031
- ...(trustedOk && Array.isArray(block.trustedAuthorIds)
1032
- ? idEntryProblems("trustedAuthorIds", block.trustedAuthorIds)
1033
- : []),
1034
- // An empty list reads as "set" but filters no author at all, so on a
1035
- // public repo it would dispatch anyone's item while looking configured.
1036
- ...(trustedOk &&
1037
- Array.isArray(block.trustedAuthorIds) &&
1038
- block.trustedAuthorIds.length === 0
1039
- ? [
1040
- `sessionManager.trustedAuthorIds must name at least one author id. ` +
1041
- `An empty list filters no author at all; remove the key instead ` +
1042
- `if every author's item may be dispatched.`,
1043
- ]
1044
- : []),
1065
+ ...validateTrustList(
1066
+ "trustedAuthorIds",
1067
+ block.trustedAuthorIds,
1068
+ `sessionManager.trustedAuthorIds must name at least one author id. ` +
1069
+ `An empty list filters no author at all; remove the key instead ` +
1070
+ `if every author's item may be dispatched. Removing it also ` +
1071
+ `removes who may release a human hold, unless ` +
1072
+ `sessionManager.trustedReleaseIds names them; to dispatch items an ` +
1073
+ `integration files, add integration:<service> instead.`
1074
+ ),
1075
+ ...validateTrustList(
1076
+ "trustedReleaseIds",
1077
+ block.trustedReleaseIds,
1078
+ `sessionManager.trustedReleaseIds must name at least one person. ` +
1079
+ `An empty list releases no hold at all; remove the key instead to ` +
1080
+ `fall back to trustedAuthorIds.`
1081
+ ),
1045
1082
  ...validateOperatorIds(block.operatorIds),
1046
1083
  ...validateBacklogPickup(block.backlogPickup, block.operatorIds),
1047
1084
  ...findCredentials(block, "sessionManager"),
@@ -118,11 +118,23 @@ the manager.
118
118
  **which items are dispatched** to those whose author (the item's creator) is trusted; `queue`
119
119
  enforces it. It does not vet the comments, later body edits or attachments on a dispatched item:
120
120
  a worker under `managedBy=` treats text from anyone other than the item's author or a trusted
121
- author as untrusted data (`lisa-implement`). The same list is the only source of who may release
122
- a human hold in `blocked-plan`. Without it, any author's Ready item is dispatched. A plain
123
- entry is the author's stable id (GitHub numeric user id, Jira accountId, Linear user id);
121
+ author as untrusted data (`lisa-implement`). Without it, any author's Ready item is dispatched. A
122
+ plain entry is the author's stable id (GitHub numeric user id, Jira accountId, Linear user id);
124
123
  `id:<v>` says so outright, and `login:<v>` names a GitHub login, which the queue and
125
- `item-answer` match but `blocked-plan` (ids only) never does.
124
+ `item-answer` match but `blocked-plan` (ids only) never does. `integration:<service>` trusts the
125
+ items an integration files with no person behind them (Linear leaves `creator` null for those
126
+ and records the filer on `botActor`; the value is its `subType`, such as `sentry`, else its
127
+ bot `id` — never its display name, which any app can choose). It never matches an item a person or an outside user filed, and `queue` prints the value
128
+ beside each such `untrusted-author` exclusion (`authorIntegration`). GitHub Apps and Jira
129
+ automation file as an account, so trust them by `id:` instead. Trusting an integration trusts
130
+ who filed the item, not what it says: an alarm or error ticket can quote text an outsider
131
+ controls (an error message, a request path), and that text reaches the worker too.
132
+ - **Who may release a hold is a separate list.** `sessionManager.trustedReleaseIds` names who may
133
+ release a human hold in `blocked-plan` and the orphan sweep, and who may answer on the item; unset,
134
+ it falls back to `trustedAuthorIds`. It takes the same `id:` / `login:` / plain entries, never
135
+ `integration:`, because an integration is not a person. With neither set, no hold is released.
136
+ Removing `trustedAuthorIds` to dispatch integration-filed items would also remove every hold
137
+ releaser; add `integration:<service>` instead.
126
138
 
127
139
  ## Questions and notifications
128
140
 
@@ -135,7 +147,7 @@ the manager.
135
147
  (text on STDIN), mark the item as "Mark and move on" says, and carry on with the rest of the
136
148
  cycle. The operator sees pending questions with `status` (`pendingQuestions`), answers with the
137
149
  `answerCommand` that `status` lists for the item (or on the item, when
138
- `sessionManager.operatorIds` or `trustedAuthorIds` is set), and the next cycle picks the answer
150
+ `sessionManager.operatorIds`, `trustedReleaseIds` or `trustedAuthorIds` is set), and the next cycle picks the answer
139
151
  up. The cycle ends with whatever
140
152
  outcome its work earns: having no channel never makes a cycle `recovery-required`.
141
153
  - **Telegram configured** (`notify` is `telegram`):
@@ -441,7 +453,8 @@ shows them.
441
453
  null; its text changed since it was marked, say): no reply is read, because the last recorded
442
454
  question comment is still the old question's and a reply to it is not this question's answer.
443
455
  Finish "Mark and move on" from step 1 for it, as for `marked: false` above.
444
- `reason: "no-answerers-configured"` means neither `operatorIds` nor `trustedAuthorIds` is set,
456
+ `reason: "no-answerers-configured"` means none of `operatorIds`, `trustedReleaseIds` and
457
+ `trustedAuthorIds` is set,
445
458
  so nothing on the item is read (the tracker identity is the one workers post as); the operator
446
459
  answers with the `answerCommand` from `status`. A reply that looks like it holds a credential is
447
460
  never queued: it is skipped and listed in `refused`, so a later reply is still read.
@@ -605,7 +618,10 @@ Skip while `capacity` reports `paused`. Otherwise:
605
618
  `complete` to `true` only when you really reached the last page; the CLI refuses anything else.
606
619
  Raw Jira issues carry `key` and `fields` (summary, priority, assignee, created, labels,
607
620
  description, reporter, issuetype, subtasks); raw Linear nodes carry identifier, title, priority,
608
- createdAt, assignee, labels, description, creator and children with their state type.
621
+ createdAt, assignee, labels, description, creator, `botActor { type subType id name }`,
622
+ `externalUserCreator { id }` and children with their state type. Ask for both author fields:
623
+ without `externalUserCreator` an integration-filed item is never trusted by an
624
+ `integration:` entry, because an outside user may have filed it.
609
625
  - `ordered` is the dispatch order: assigned to an operator, then to "me", then unassigned; each
610
626
  group by priority, then age. `excluded` needs no action. `setupGaps` lists each repo the
611
627
  manager will not dispatch to until the operator fixes it (`kind`, `detail`, and `clear`, the
@@ -68,7 +68,7 @@ Telegram the question goes there too; `/lisa:session-manager status` lists every
68
68
  The operator answers with the CLI `answer` command that `status` lists, on Telegram, or on the
69
69
  item (a reply from an operator or trusted author, matched on stable tracker ids, each
70
70
  `login:` / `id:` entry by its own kind; with neither
71
- `operatorIds` nor `trustedAuthorIds` set, replies on the item are not read); the next cycle
71
+ `operatorIds` nor `trustedReleaseIds` / `trustedAuthorIds` set, replies on the item are not read); the next cycle
72
72
  delivers the answer (or, for a finished worker or an exhausted item, records it on the item for the
73
73
  next attempt and reads it back), removes the marker and clears the question. No question is ever asked in the
74
74
  manager's terminal. When the manager itself cannot proceed it records `recovery-required` with a one-line
@@ -24,6 +24,7 @@ import {
24
24
  stdinText,
25
25
  } from "./cli-runtime.mjs";
26
26
  import { parseJson, readJsonFile } from "./cli-queue.mjs";
27
+ import { trustedReleaseEntries } from "./config.mjs";
27
28
  import {
28
29
  clearPendingQuestion,
29
30
  clearValidationFailure,
@@ -251,8 +252,8 @@ export async function route(ctx) {
251
252
  * its JSON (stdin, or the file). `--ref` fills in the ledger's pending
252
253
  * question when the input does not carry one.
253
254
  *
254
- * Who may release a human hold comes from `sessionManager.trustedAuthorIds`
255
- * only. Any `trustedHumanActorIds` in the input is discarded: the input is
255
+ * Who may release a human hold comes from `sessionManager.trustedReleaseIds`
256
+ * only, falling back to `trustedAuthorIds` when it is unset (#4895). Any `trustedHumanActorIds` in the input is discarded: the input is
256
257
  * assembled from the item's own (untrusted) body and comments, so a list
257
258
  * carried beside them would let the item's text vouch for itself. The
258
259
  * release check compares account ids only, so an `id:` entry reaches it as
@@ -275,7 +276,7 @@ export async function blockedPlan(ctx) {
275
276
  (ref ? (await readLedger(ctx.root)).items[ref]?.pendingQuestion : null);
276
277
  const project = loadProject(ctx.root);
277
278
  const trustedHumanActorIds = idComparableValues(
278
- project.config?.trustedAuthorIds
279
+ trustedReleaseEntries(project.config)
279
280
  );
280
281
  const policy = resolveHumanGatePolicy(project.local, project.global);
281
282
  return {
@@ -26,7 +26,8 @@ import {
26
26
  validOrAbsent,
27
27
  } from "./cli-runtime.mjs";
28
28
  import { parseJson } from "./cli-queue.mjs";
29
- import { notifyProvider } from "./config.mjs";
29
+ import { parseIdEntry } from "../../../scripts/operator-id-kinds.mjs";
30
+ import { notifyProvider, trustedReleaseEntries } from "./config.mjs";
30
31
  import { wronglyEscalatedLabel } from "./cli-overruled.mjs";
31
32
  import {
32
33
  carriesWronglyEscalated,
@@ -145,7 +146,8 @@ export async function answer(ctx) {
145
146
  }
146
147
 
147
148
  /**
148
- * Who may answer on the item: operators and trusted authors only. There is
149
+ * Who may answer on the item: operators and the people trusted to release a
150
+ * human gate (`trustedReleaseIds`, else `trustedAuthorIds`; #4895). There is
149
151
  * no fallback to the tracker identity (`control.me`): workers and the
150
152
  * manager post as that identity, so its comments cannot be told apart from
151
153
  * an answer.
@@ -153,10 +155,11 @@ export async function answer(ctx) {
153
155
  * @returns {string[]} Allowed author ids (empty: nobody may answer there)
154
156
  */
155
157
  function allowedAnswerers(config) {
156
- return [
157
- ...(config?.operatorIds ?? []),
158
- ...(config?.trustedAuthorIds ?? []),
159
- ].map(String);
158
+ // An `integration:` entry names no person, so it can never answer; counting
159
+ // it would tell the operator to reply on the item when no reply is read.
160
+ return [...(config?.operatorIds ?? []), ...trustedReleaseEntries(config)]
161
+ .map(String)
162
+ .filter(entry => parseIdEntry(entry)?.kind !== "integration");
160
163
  }
161
164
 
162
165
  /** Why nothing is read off the item when nobody may answer there. */
@@ -176,7 +179,9 @@ const CREDENTIAL_REPLY =
176
179
  "the secrets provider, and reply again without it.";
177
180
 
178
181
  const NO_ANSWERERS =
179
- "No sessionManager.operatorIds or trustedAuthorIds are configured, so " +
182
+ "No person who may answer is configured (sessionManager.operatorIds, " +
183
+ "trustedReleaseIds, or a trustedAuthorIds entry other than " +
184
+ "integration:<service>), so " +
180
185
  "replies on the item are not read: the tracker identity is the one " +
181
186
  "workers post as. Answer with the answerCommand that status lists, or " +
182
187
  "set sessionManager.operatorIds.";
@@ -26,6 +26,7 @@ import {
26
26
  stdinText,
27
27
  validOrAbsent,
28
28
  } from "./cli-runtime.mjs";
29
+ import { trustedReleaseEntries } from "./config.mjs";
29
30
  import { parseJson, readJsonFile } from "./json-input.mjs";
30
31
  import { readLedger } from "./ledger.mjs";
31
32
  import { planOrphanSweep } from "./orphan-sweep.mjs";
@@ -150,7 +151,8 @@ export async function orphanPlan(ctx) {
150
151
  liveRefs,
151
152
  me: ledger.control.me ?? null,
152
153
  operatorIds: config?.operatorIds ?? [],
153
- trustedAuthorIds: config?.trustedAuthorIds ?? [],
154
+ // The sweep uses this list only to judge hold releases (#4895).
155
+ trustedAuthorIds: trustedReleaseEntries(config),
154
156
  now: new Date(),
155
157
  ...(max === undefined ? {} : { max }),
156
158
  ...(staleHours === undefined ? {} : { staleHours }),
@@ -127,6 +127,7 @@ function validationView(config) {
127
127
  ...config,
128
128
  repos: config.repos ?? undefined,
129
129
  trustedAuthorIds: config.trustedAuthorIds ?? undefined,
130
+ trustedReleaseIds: config.trustedReleaseIds,
130
131
  operatorIds: config.operatorIds,
131
132
  };
132
133
  }
@@ -267,8 +267,8 @@ Per cycle
267
267
  --owner adds message "<owner>'s answer: ...".
268
268
  blocked-plan [--input <file>] [--ref <ref>] STDIN (without --input): JSON
269
269
  {labels,body,comments,humanNeededLabel?,edges,pendingQuestion?}.
270
- Trusted hold releasers are sessionManager.trustedAuthorIds (none when
271
- unset; plain and id: entries, compared as ids; login: entries never
270
+ Trusted hold releasers are sessionManager.trustedReleaseIds, else
271
+ trustedAuthorIds (none when both unset; plain and id: entries, compared as ids; login: entries never
272
272
  release); trustedHumanActorIds in the input is ignored. stdout
273
273
  {action:release|keep|decide|escalate|skip-human-gate,reason,edges,gate}.
274
274
  --ref fills pendingQuestion from the ledger.
@@ -294,7 +294,8 @@ Per cycle
294
294
  configured human-needed label, else the configured blocked role;
295
295
  exhausted also moves to the blocked role. comment starts with
296
296
  [lisa-session-manager-question] and says, in plain words, how to
297
- answer: on the item (only when operatorIds or trustedAuthorIds is set;
297
+ answer: on the item (only when operatorIds, trustedReleaseIds or
298
+ trustedAuthorIds is set;
298
299
  answerWith.item is null otherwise), with the answerCommand that status
299
300
  lists, or on Telegram when it is the channel. Exit 2 for an unknown
300
301
  kind, empty or credential-shaped text, no marker configured, or
@@ -84,6 +84,7 @@ export function notifyProvider(config) {
84
84
  * stall: StallBlock,
85
85
  * notify: NotifyBlock,
86
86
  * trustedAuthorIds: string[] | null,
87
+ * trustedReleaseIds?: string[] | null,
87
88
  * operatorIds?: string[] | null,
88
89
  * backlogPickup?: boolean,
89
90
  * }} SessionManagerConfig
@@ -140,12 +141,37 @@ export function resolveSessionManagerConfig(globalConfig, localConfig) {
140
141
  ...merged,
141
142
  repos,
142
143
  trustedAuthorIds: merged.trustedAuthorIds ?? null,
144
+ // Left as declared, like operatorIds: an explicit null must reach the
145
+ // validator and be refused, never read as "unset" and fall back (#4895).
146
+ trustedReleaseIds: merged.trustedReleaseIds,
143
147
  // Left as declared: absent stays undefined and an explicit null stays null,
144
148
  // so validation can refuse the null instead of reading it as "no operators".
145
149
  operatorIds: merged.operatorIds,
146
150
  };
147
151
  }
148
152
 
153
+ /**
154
+ * Who may discharge a human gate: release a hold, or answer the manager's
155
+ * question on the item (CodySwannGT/lisa#4895).
156
+ *
157
+ * `trustedAuthorIds` answers a different question — whose item text may reach
158
+ * a bypass-permissions worker — and may name integrations, which are never a
159
+ * person. `trustedReleaseIds` separates the two; unset, it falls back to
160
+ * `trustedAuthorIds`, so a project that never declared it behaves exactly as
161
+ * before. Neither set means nobody, and a hold fails closed. A declared
162
+ * value that is not a list (an explicit null) also means nobody: it never
163
+ * falls back, so a malformed release list cannot widen who may release.
164
+ * @param {{ trustedAuthorIds?: string[] | null, trustedReleaseIds?: string[] | null } | null | undefined} config
165
+ * - Resolved block (only its two trust lists are read)
166
+ * @returns {string[]} The configured release entries (unparsed)
167
+ */
168
+ export function trustedReleaseEntries(config) {
169
+ const release = config?.trustedReleaseIds;
170
+ if (release !== undefined) return Array.isArray(release) ? release : [];
171
+ const authors = config?.trustedAuthorIds;
172
+ return Array.isArray(authors) ? authors : [];
173
+ }
174
+
149
175
  /**
150
176
  * Turn a project name into a slug the validator accepts.
151
177
  * @param {string} projectSlug Project name, possibly with dots or capitals.
@@ -296,7 +296,7 @@ function chooseMarker(label, blocked) {
296
296
  * overruled?: boolean}}
297
297
  * input - The item, why, the question, the configured human-needed label
298
298
  * and `blocked` role value, whether a notification channel exists, whether
299
- * anyone (operatorIds / trustedAuthorIds) may answer on the item, and the
299
+ * anyone (operatorIds / trustedReleaseIds / trustedAuthorIds) may answer on the item, and the
300
300
  * cause the planning-miss signal needs (default `planning`), and whether
301
301
  * the item carries the wrongly-escalated label (`overruled`)
302
302
  * @returns {{ref: string, kind: string, marker: {type: string, value: string},
@@ -66,7 +66,11 @@ writes `$SM`, and pass `--project-root "$ROOT"` (the absolute project root) on e
66
66
  `AWS CDK`, ...). Ask the operator to correct them and add the areas that identify the repo
67
67
  (e.g. `api`: `["NestJS","migrations"]`, `web`: `["Expo","screens"]`), and whether to
68
68
  set `sessionManager.trustedAuthorIds`. Without it, any author's Ready item reaches a
69
- bypass-permissions worker; say so plainly. The list holds stable tracker user ids as strings,
69
+ bypass-permissions worker; say so plainly. If an integration files Ready items with no person
70
+ behind them (Linear's Sentry integration does), add `integration:<service>` (the value `queue`
71
+ prints as `authorIntegration`) rather than dropping the key, which would also drop every hold
72
+ releaser. To let different people release holds than author work, set
73
+ `sessionManager.trustedReleaseIds` (people only; it defaults to `trustedAuthorIds`). The list holds stable tracker user ids as strings,
70
74
  never logins: the GitHub numeric user id (`gh api users/<login> --jq .id`), the Jira
71
75
  `accountId`, or the Linear user id. A plain login matches no one in the queue and silently
72
76
  excludes every item; to trust a GitHub login on purpose write it as `login:<login>`, and to say
@@ -92,8 +96,8 @@ writes `$SM`, and pass `--project-root "$ROOT"` (the absolute project root) on e
92
96
  warns about it (in `warnings`, never failing) and names both forms. An unknown prefix
93
97
  (`user:octocat`) or an empty value (`login:`) fails `validate`, naming the entry.
94
98
  **Recommend setting it in every setup**, even a single-user one: it is also who may answer a
95
- human-needed question by replying on the item. With neither `operatorIds` nor
96
- `trustedAuthorIds` set, the manager reads no answer off the item at all, because the tracker
99
+ human-needed question by replying on the item. With none of `operatorIds`,
100
+ `trustedReleaseIds` and `trustedAuthorIds` set, the manager reads no answer off the item at all, because the tracker
97
101
  credential's identity is the one the workers and the manager post as, so its comments cannot be
98
102
  told apart from a human's answer. The operator then answers only at the terminal, with the
99
103
  `answerCommand` that `status` lists. Say so plainly.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "5.6.0",
3
+ "version": "5.7.0",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "5.6.0",
3
+ "version": "5.7.0",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"