@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.
- package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +51 -14
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/package.json +4 -4
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/scripts/operator-id-kinds.mjs +17 -4
- package/plugins/lisa/.codex-plugin/scripts/ready-queue-order.mjs +62 -5
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/validate-config.mjs +75 -38
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/SKILL.md +23 -7
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/references/runbook-template.md +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-cycle.mjs +4 -3
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-human.mjs +12 -7
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-orphans.mjs +3 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-usage.mjs +4 -3
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/config.mjs +26 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/human-needed.mjs +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-setup-session-manager/SKILL.md +7 -3
- package/plugins/lisa/rules/reference/config-resolution.md +3 -2
- package/plugins/lisa/scripts/operator-id-kinds.mjs +17 -4
- package/plugins/lisa/scripts/ready-queue-order.mjs +62 -5
- package/plugins/lisa/skills/lisa-secrets-access/scripts/validate-config.mjs +75 -38
- package/plugins/lisa/skills/lisa-session-manager/SKILL.md +23 -7
- package/plugins/lisa/skills/lisa-session-manager/references/runbook-template.md +1 -1
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-cycle.mjs +4 -3
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-human.mjs +12 -7
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-orphans.mjs +3 -1
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-usage.mjs +4 -3
- package/plugins/lisa/skills/lisa-session-manager/scripts/config.mjs +26 -0
- package/plugins/lisa/skills/lisa-session-manager/scripts/human-needed.mjs +1 -1
- package/plugins/lisa/skills/lisa-setup-session-manager/SKILL.md +7 -3
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/scripts/operator-id-kinds.mjs +17 -4
- package/plugins/lisa-agy/scripts/ready-queue-order.mjs +62 -5
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/validate-config.mjs +75 -38
- package/plugins/lisa-agy/skills/lisa-session-manager/SKILL.md +23 -7
- package/plugins/lisa-agy/skills/lisa-session-manager/references/runbook-template.md +1 -1
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-cycle.mjs +4 -3
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-human.mjs +12 -7
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-orphans.mjs +3 -1
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-usage.mjs +4 -3
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/config.mjs +26 -0
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/human-needed.mjs +1 -1
- package/plugins/lisa-agy/skills/lisa-setup-session-manager/SKILL.md +7 -3
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/rules/reference/config-resolution.md +3 -2
- package/plugins/lisa-copilot/scripts/operator-id-kinds.mjs +17 -4
- package/plugins/lisa-copilot/scripts/ready-queue-order.mjs +62 -5
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/validate-config.mjs +75 -38
- package/plugins/lisa-copilot/skills/lisa-session-manager/SKILL.md +23 -7
- package/plugins/lisa-copilot/skills/lisa-session-manager/references/runbook-template.md +1 -1
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-cycle.mjs +4 -3
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-human.mjs +12 -7
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-orphans.mjs +3 -1
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-usage.mjs +4 -3
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/config.mjs +26 -0
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/human-needed.mjs +1 -1
- package/plugins/lisa-copilot/skills/lisa-setup-session-manager/SKILL.md +7 -3
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/rules/config-resolution-reference.mdc +3 -2
- package/plugins/lisa-cursor/scripts/operator-id-kinds.mjs +17 -4
- package/plugins/lisa-cursor/scripts/ready-queue-order.mjs +62 -5
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/validate-config.mjs +75 -38
- package/plugins/lisa-cursor/skills/lisa-session-manager/SKILL.md +23 -7
- package/plugins/lisa-cursor/skills/lisa-session-manager/references/runbook-template.md +1 -1
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-cycle.mjs +4 -3
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-human.mjs +12 -7
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-orphans.mjs +3 -1
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-usage.mjs +4 -3
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/config.mjs +26 -0
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/human-needed.mjs +1 -1
- package/plugins/lisa-cursor/skills/lisa-setup-session-manager/SKILL.md +7 -3
- package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/rules/reference/config-resolution.md +3 -2
- package/plugins/lisa-devin/scripts/operator-id-kinds.mjs +17 -4
- package/plugins/lisa-devin/scripts/ready-queue-order.mjs +62 -5
- package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/validate-config.mjs +75 -38
- package/plugins/lisa-devin/skills/lisa-session-manager/SKILL.md +23 -7
- package/plugins/lisa-devin/skills/lisa-session-manager/references/runbook-template.md +1 -1
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-cycle.mjs +4 -3
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-human.mjs +12 -7
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-orphans.mjs +3 -1
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-usage.mjs +4 -3
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/config.mjs +26 -0
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/human-needed.mjs +1 -1
- package/plugins/lisa-devin/skills/lisa-setup-session-manager/SKILL.md +7 -3
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/src/base/rules/reference/config-resolution.md +3 -2
- package/plugins/src/base/scripts/operator-id-kinds.mjs +17 -4
- package/plugins/src/base/scripts/ready-queue-order.mjs +62 -5
- package/plugins/src/base/skills/lisa-secrets-access/scripts/validate-config.mjs +75 -38
- package/plugins/src/base/skills/lisa-session-manager/SKILL.md +23 -7
- package/plugins/src/base/skills/lisa-session-manager/references/runbook-template.md +1 -1
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-cycle.mjs +4 -3
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-human.mjs +12 -7
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-orphans.mjs +3 -1
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-runtime.mjs +1 -0
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-usage.mjs +4 -3
- package/plugins/src/base/skills/lisa-session-manager/scripts/config.mjs +26 -0
- package/plugins/src/base/skills/lisa-session-manager/scripts/human-needed.mjs +1 -1
- package/plugins/src/base/skills/lisa-setup-session-manager/SKILL.md +7 -3
package/package.json
CHANGED
|
@@ -188,7 +188,7 @@
|
|
|
188
188
|
"qs": "^6.16.0"
|
|
189
189
|
},
|
|
190
190
|
"name": "@codyswann/lisa",
|
|
191
|
-
"version": "5.
|
|
191
|
+
"version": "5.7.0",
|
|
192
192
|
"description": "Governance-as-code for AI coding agents: turns a repository into agent-operated software factories with guardrails, guidance and automated enforcement for Claude Code, Codex, Cursor, OpenCode, Antigravity, Copilot and Devin",
|
|
193
193
|
"main": "dist/index.js",
|
|
194
194
|
"exports": {
|
|
@@ -351,7 +351,7 @@
|
|
|
351
351
|
"test": "tests"
|
|
352
352
|
},
|
|
353
353
|
"types": "./dist/index.d.ts",
|
|
354
|
-
"lisaReleaseCommit": "
|
|
355
|
-
"gitHead": "
|
|
356
|
-
"lisaReleaseTag": "v5.
|
|
354
|
+
"lisaReleaseCommit": "c30c76ba8e66be8fff3460ef28d2ddf426132bf6",
|
|
355
|
+
"gitHead": "c30c76ba8e66be8fff3460ef28d2ddf426132bf6",
|
|
356
|
+
"lisaReleaseTag": "v5.7.0"
|
|
357
357
|
}
|
|
@@ -16,6 +16,17 @@
|
|
|
16
16
|
* - `login:<v>` is a GitHub login and matches only a `login` field.
|
|
17
17
|
* - `id:<v>` is an account id (a GitHub numeric id, a Jira accountId, a
|
|
18
18
|
* Linear user id) and matches only an id field.
|
|
19
|
+
* - `integration:<service>` names an integration that files items with no
|
|
20
|
+
* person behind them (CodySwannGT/lisa#4895), and is meaningful only in
|
|
21
|
+
* `trustedAuthorIds`. Linear's Sentry integration creates issues whose
|
|
22
|
+
* `creator` is null, so there is no person id to trust; the entry matches
|
|
23
|
+
* such an item by the integration Linear records on it instead (`botActor`:
|
|
24
|
+
* its service, else its bot id, never its self-chosen display name).
|
|
25
|
+
* It never matches an item a person authored, never an item a non-Linear
|
|
26
|
+
* user filed through an integration (`externalUserCreator`), and never a
|
|
27
|
+
* person, so it cannot answer a question or release a human hold: those
|
|
28
|
+
* readers drop it (`idComparableValues`, the answer matcher), and the
|
|
29
|
+
* validator refuses it in `operatorIds` and `trustedReleaseIds`.
|
|
19
30
|
* - A plain entry (no prefix) keeps exactly the meaning each reader gave it
|
|
20
31
|
* before kind-keyed entries existed. Changing that is a later, breaking
|
|
21
32
|
* change.
|
|
@@ -38,7 +49,7 @@
|
|
|
38
49
|
*/
|
|
39
50
|
|
|
40
51
|
/** The kinds a prefixed entry may name. */
|
|
41
|
-
export const ID_ENTRY_KINDS = Object.freeze(["login", "id"]);
|
|
52
|
+
export const ID_ENTRY_KINDS = Object.freeze(["login", "id", "integration"]);
|
|
42
53
|
|
|
43
54
|
/** A letters-only prefix at the start of an entry. */
|
|
44
55
|
const PREFIX = /^([A-Za-z]+):/;
|
|
@@ -50,7 +61,7 @@ const PREFIX = /^([A-Za-z]+):/;
|
|
|
50
61
|
const PLAIN_ID_STARTS = new Set(["qm"]);
|
|
51
62
|
|
|
52
63
|
/**
|
|
53
|
-
* @typedef {{ kind: "login" | "id" | "plain", value: string }
|
|
64
|
+
* @typedef {{ kind: "login" | "id" | "integration" | "plain", value: string }
|
|
54
65
|
* | { kind: "invalid", problem: "unknown-prefix" | "empty-value", prefix: string }} IdEntry
|
|
55
66
|
*/
|
|
56
67
|
|
|
@@ -93,9 +104,11 @@ export function parseIdEntries(entries) {
|
|
|
93
104
|
* Whether one parsed entry names the identity whose fields are given. Each
|
|
94
105
|
* field is the reader's value for that kind: `plain` is what a plain entry
|
|
95
106
|
* has always been compared with there, `login` the GitHub login (null when
|
|
96
|
-
* the tracker has none), `id` the account id
|
|
107
|
+
* the tracker has none), `id` the account id, `integration` the integration
|
|
108
|
+
* that filed an item with no person author (null otherwise, and absent for
|
|
109
|
+
* every reader that matches people). A missing field never matches.
|
|
97
110
|
* @param {IdEntry} entry - Parsed entry
|
|
98
|
-
* @param {{ plain?: string | null, login?: string | null, id?: string | null }} fields
|
|
111
|
+
* @param {{ plain?: string | null, login?: string | null, id?: string | null, integration?: string | null }} fields
|
|
99
112
|
* @returns {boolean} Whether it matches
|
|
100
113
|
*/
|
|
101
114
|
export function entryMatches(entry, fields) {
|
|
@@ -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
|
-
*
|
|
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 => ({
|
|
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([
|
|
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
|
-
*
|
|
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 `
|
|
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>,
|
|
900
|
-
`
|
|
901
|
-
`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
|
-
...(
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
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"),
|
|
@@ -120,11 +120,23 @@ the manager.
|
|
|
120
120
|
**which items are dispatched** to those whose author (the item's creator) is trusted; `queue`
|
|
121
121
|
enforces it. It does not vet the comments, later body edits or attachments on a dispatched item:
|
|
122
122
|
a worker under `managedBy=` treats text from anyone other than the item's author or a trusted
|
|
123
|
-
author as untrusted data (`lisa-implement`).
|
|
124
|
-
|
|
125
|
-
entry is the author's stable id (GitHub numeric user id, Jira accountId, Linear user id);
|
|
123
|
+
author as untrusted data (`lisa-implement`). Without it, any author's Ready item is dispatched. A
|
|
124
|
+
plain entry is the author's stable id (GitHub numeric user id, Jira accountId, Linear user id);
|
|
126
125
|
`id:<v>` says so outright, and `login:<v>` names a GitHub login, which the queue and
|
|
127
|
-
`item-answer` match but `blocked-plan` (ids only) never does.
|
|
126
|
+
`item-answer` match but `blocked-plan` (ids only) never does. `integration:<service>` trusts the
|
|
127
|
+
items an integration files with no person behind them (Linear leaves `creator` null for those
|
|
128
|
+
and records the filer on `botActor`; the value is its `subType`, such as `sentry`, else its
|
|
129
|
+
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
|
|
130
|
+
beside each such `untrusted-author` exclusion (`authorIntegration`). GitHub Apps and Jira
|
|
131
|
+
automation file as an account, so trust them by `id:` instead. Trusting an integration trusts
|
|
132
|
+
who filed the item, not what it says: an alarm or error ticket can quote text an outsider
|
|
133
|
+
controls (an error message, a request path), and that text reaches the worker too.
|
|
134
|
+
- **Who may release a hold is a separate list.** `sessionManager.trustedReleaseIds` names who may
|
|
135
|
+
release a human hold in `blocked-plan` and the orphan sweep, and who may answer on the item; unset,
|
|
136
|
+
it falls back to `trustedAuthorIds`. It takes the same `id:` / `login:` / plain entries, never
|
|
137
|
+
`integration:`, because an integration is not a person. With neither set, no hold is released.
|
|
138
|
+
Removing `trustedAuthorIds` to dispatch integration-filed items would also remove every hold
|
|
139
|
+
releaser; add `integration:<service>` instead.
|
|
128
140
|
|
|
129
141
|
## Questions and notifications
|
|
130
142
|
|
|
@@ -137,7 +149,7 @@ the manager.
|
|
|
137
149
|
(text on STDIN), mark the item as "Mark and move on" says, and carry on with the rest of the
|
|
138
150
|
cycle. The operator sees pending questions with `status` (`pendingQuestions`), answers with the
|
|
139
151
|
`answerCommand` that `status` lists for the item (or on the item, when
|
|
140
|
-
`sessionManager.operatorIds` or `trustedAuthorIds` is set), and the next cycle picks the answer
|
|
152
|
+
`sessionManager.operatorIds`, `trustedReleaseIds` or `trustedAuthorIds` is set), and the next cycle picks the answer
|
|
141
153
|
up. The cycle ends with whatever
|
|
142
154
|
outcome its work earns: having no channel never makes a cycle `recovery-required`.
|
|
143
155
|
- **Telegram configured** (`notify` is `telegram`):
|
|
@@ -443,7 +455,8 @@ shows them.
|
|
|
443
455
|
null; its text changed since it was marked, say): no reply is read, because the last recorded
|
|
444
456
|
question comment is still the old question's and a reply to it is not this question's answer.
|
|
445
457
|
Finish "Mark and move on" from step 1 for it, as for `marked: false` above.
|
|
446
|
-
`reason: "no-answerers-configured"` means
|
|
458
|
+
`reason: "no-answerers-configured"` means none of `operatorIds`, `trustedReleaseIds` and
|
|
459
|
+
`trustedAuthorIds` is set,
|
|
447
460
|
so nothing on the item is read (the tracker identity is the one workers post as); the operator
|
|
448
461
|
answers with the `answerCommand` from `status`. A reply that looks like it holds a credential is
|
|
449
462
|
never queued: it is skipped and listed in `refused`, so a later reply is still read.
|
|
@@ -607,7 +620,10 @@ Skip while `capacity` reports `paused`. Otherwise:
|
|
|
607
620
|
`complete` to `true` only when you really reached the last page; the CLI refuses anything else.
|
|
608
621
|
Raw Jira issues carry `key` and `fields` (summary, priority, assignee, created, labels,
|
|
609
622
|
description, reporter, issuetype, subtasks); raw Linear nodes carry identifier, title, priority,
|
|
610
|
-
createdAt, assignee, labels, description, creator
|
|
623
|
+
createdAt, assignee, labels, description, creator, `botActor { type subType id name }`,
|
|
624
|
+
`externalUserCreator { id }` and children with their state type. Ask for both author fields:
|
|
625
|
+
without `externalUserCreator` an integration-filed item is never trusted by an
|
|
626
|
+
`integration:` entry, because an outside user may have filed it.
|
|
611
627
|
- `ordered` is the dispatch order: assigned to an operator, then to "me", then unassigned; each
|
|
612
628
|
group by priority, then age. `excluded` needs no action. `setupGaps` lists each repo the
|
|
613
629
|
manager will not dispatch to until the operator fixes it (`kind`, `detail`, and `clear`, the
|
package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/references/runbook-template.md
CHANGED
|
@@ -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.
|
|
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
|
|
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 {
|
|
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
|
|
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
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
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
|
|
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
|
-
|
|
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 }),
|
|
@@ -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.
|
|
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
|
|
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
|