@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
|
@@ -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
|
|
@@ -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.
|
|
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
|
|
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.
|
|
@@ -721,7 +721,8 @@ operator chooses Telegram (`init-config --notify telegram`).
|
|
|
721
721
|
| `sessionManager.stall.requestionHours` | no | `4` | How long an unanswered worker question waits before the manager asks again (zero or positive). |
|
|
722
722
|
| `sessionManager.notify.provider` | no | `none` | `none` (no notification channel) or `telegram`. Absent, like an absent `notify` block, means `none`. Any other value fails validation. |
|
|
723
723
|
| `sessionManager.notify.stateDir` | **yes** with `telegram`; must be absent otherwise | — | This project's own Telegram state dir. A `stateDir` without the `telegram` provider fails validation, because no bot would use it. Never the shared default `~/.claude/channels/telegram`, because one bot per state dir is how projects stay isolated. Setup writes `~/.claude/channels/telegram-<project>`. |
|
|
724
|
-
| `sessionManager.trustedAuthorIds` | no | — | Optional list of **stable tracker user ids**, as strings: the GitHub numeric user id (`gh api users/<login> --jq .id`), the Jira `accountId`, or the Linear user id. Not logins or display names: matching compares ids, so a plain login silently matches no one and excludes every item. An entry may name its kind: `id:<v>` is an id, `login:<v>` a GitHub login (matched by the queue and on-item answers; the hold-release check compares ids only and ignores it). A login GitHub frees (after a rename or a deleted account) can be re-registered by someone else, so prefer `id:` for trust. An unknown prefix or an empty value fails validation. When set, the manager takes only items authored by these people. |
|
|
724
|
+
| `sessionManager.trustedAuthorIds` | no | — | Optional list of **stable tracker user ids**, as strings: the GitHub numeric user id (`gh api users/<login> --jq .id`), the Jira `accountId`, or the Linear user id. Not logins or display names: matching compares ids, so a plain login silently matches no one and excludes every item. An entry may name its kind: `id:<v>` is an id, `login:<v>` a GitHub login (matched by the queue and on-item answers; the hold-release check compares ids only and ignores it). A login GitHub frees (after a rename or a deleted account) can be re-registered by someone else, so prefer `id:` for trust. `integration:<service>` trusts items an integration files with no person behind them (Linear's `botActor`, by `subType` such as `sentry`, else its bot `id`, never its self-chosen display name; never an item a person or an outside user filed; it trusts who filed the item, not text an outsider can get into it, such as a quoted error message); GitHub Apps and Jira automation file as an account, so trust them by `id:`. An unknown prefix or an empty value fails validation. When set, the manager takes only items authored by these people or integrations. It is also who may release a human hold, unless `trustedReleaseIds` is set — so removing it removes every hold releaser too. |
|
|
725
|
+
| `sessionManager.trustedReleaseIds` | no | `trustedAuthorIds` | Optional, non-empty list of the **people** who may release a human hold (`blocked-plan`, the orphan sweep) and answer a question on the item. Same entry grammar as `trustedAuthorIds` minus `integration:`, which is refused: an integration is not a person. Unset, it falls back to `trustedAuthorIds`, so existing projects are unaffected; with neither set, no hold is released. |
|
|
725
726
|
| `sessionManager.operatorIds` | no | — | Optional, non-empty list of the people the manager works for, as tracker user ids matched against the **assignee** the same way "me" is: the GitHub **login**, the Jira `accountId`, or the Linear user id, spelled exactly as the tracker API returns it (matching is case-sensitive, so look the OPERATOR up rather than typing from memory: `gh api users/<operator-login> --jq .login` returns the canonical GitHub spelling. Do not use `gh api user`, which returns whoever the credential belongs to — the agent account, when that is the case this key exists for). Dispatch order is assigned to an operator, then to "me" (the tracker credential's identity), then unassigned; items assigned to anyone else are skipped. Set it whenever the tracker credential is not the operator's own (an agent account), or the operator's Ready items are never dispatched. Prefer the kind-keyed form, which the queue, the claim and on-item answers all match the same way: `login:<GitHub login>` matches only a GitHub login, `id:<v>` only an account id (GitHub numeric id, Jira `accountId`, Linear user id). A plain entry keeps its meaning, but a plain all-digit entry is a login to the queue and the claim and a numeric id to on-item answers, so validation warns about it (without failing) and names both forms. An unknown prefix or an empty value fails validation. A Jira accountId holding a colon (`557058:…`, `qm:…`) is still plain. |
|
|
726
727
|
| `sessionManager.backlogPickup` | no | `false` | Opt-in lowest dispatch tier. When the Ready queue is exhausted and capacity remains, the manager considers backlog items (open leaves in no lifecycle role) with the Ready exclusions plus any unfinished blocker; each one that passes the tracker validator (all gates, including the stateless-pickup dry-run) is assigned to the first `operatorIds` entry (without its `login:` / `id:` prefix), moved to Ready in one write, read back and dispatched. A failed validation is cached against the item's `updatedAt`, so it is re-judged only after the item changes. Requires `operatorIds`. |
|
|
727
728
|
|
|
@@ -748,7 +749,7 @@ operator chooses Telegram (`init-config --notify telegram`).
|
|
|
748
749
|
no label resolves, and moves an `exhausted` item to the `blocked` role; `mark-plan` resolves
|
|
749
750
|
both, so neither name is ever hard-coded.
|
|
750
751
|
- **Who may answer on the item.** A reply on a human-needed item is taken as the answer only from
|
|
751
|
-
`sessionManager.operatorIds` or `trustedAuthorIds
|
|
752
|
+
`sessionManager.operatorIds` or `trustedReleaseIds` (else `trustedAuthorIds`), matched on stable ids (GitHub login or
|
|
752
753
|
numeric id, Jira `accountId`, Linear user id; never a display name or email; a plain all-digit
|
|
753
754
|
entry is a numeric id only, `login:<v>` only a login, `id:<v>` only an id), and never from a
|
|
754
755
|
machine comment, which is excluded first, whoever wrote it: one starting with a Lisa or Claude
|
|
@@ -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
|
|