@codyswann/lisa 4.97.2 → 4.97.3
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 +24 -12
- 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/skills/lisa-secrets-access/scripts/validate-config.mjs +115 -6
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/SKILL.md +28 -9
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/references/runbook-template.md +4 -2
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-cycle.mjs +7 -2
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-manager.mjs +9 -2
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-runtime.mjs +9 -4
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-usage.mjs +11 -5
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/config.mjs +2 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/human-answer.mjs +38 -9
- package/plugins/lisa/.codex-plugin/skills/lisa-setup-session-manager/SKILL.md +15 -2
- package/plugins/lisa/rules/reference/config-resolution.md +8 -5
- package/plugins/lisa/scripts/operator-id-kinds.mjs +120 -0
- package/plugins/lisa/scripts/ready-queue-order.mjs +89 -15
- package/plugins/lisa/skills/lisa-secrets-access/scripts/validate-config.mjs +115 -6
- package/plugins/lisa/skills/lisa-session-manager/SKILL.md +28 -9
- package/plugins/lisa/skills/lisa-session-manager/references/runbook-template.md +4 -2
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-cycle.mjs +7 -2
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-manager.mjs +9 -2
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-runtime.mjs +9 -4
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-usage.mjs +11 -5
- package/plugins/lisa/skills/lisa-session-manager/scripts/config.mjs +2 -1
- package/plugins/lisa/skills/lisa-session-manager/scripts/human-answer.mjs +38 -9
- package/plugins/lisa/skills/lisa-setup-session-manager/SKILL.md +15 -2
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/scripts/operator-id-kinds.mjs +120 -0
- package/plugins/lisa-agy/scripts/ready-queue-order.mjs +89 -15
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/validate-config.mjs +115 -6
- package/plugins/lisa-agy/skills/lisa-session-manager/SKILL.md +28 -9
- package/plugins/lisa-agy/skills/lisa-session-manager/references/runbook-template.md +4 -2
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-cycle.mjs +7 -2
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-manager.mjs +9 -2
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-runtime.mjs +9 -4
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-usage.mjs +11 -5
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/config.mjs +2 -1
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/human-answer.mjs +38 -9
- package/plugins/lisa-agy/skills/lisa-setup-session-manager/SKILL.md +15 -2
- 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 +8 -5
- package/plugins/lisa-copilot/scripts/operator-id-kinds.mjs +120 -0
- package/plugins/lisa-copilot/scripts/ready-queue-order.mjs +89 -15
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/validate-config.mjs +115 -6
- package/plugins/lisa-copilot/skills/lisa-session-manager/SKILL.md +28 -9
- package/plugins/lisa-copilot/skills/lisa-session-manager/references/runbook-template.md +4 -2
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-cycle.mjs +7 -2
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-manager.mjs +9 -2
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-runtime.mjs +9 -4
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-usage.mjs +11 -5
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/config.mjs +2 -1
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/human-answer.mjs +38 -9
- package/plugins/lisa-copilot/skills/lisa-setup-session-manager/SKILL.md +15 -2
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/rules/config-resolution-reference.mdc +8 -5
- package/plugins/lisa-cursor/scripts/operator-id-kinds.mjs +120 -0
- package/plugins/lisa-cursor/scripts/ready-queue-order.mjs +89 -15
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/validate-config.mjs +115 -6
- package/plugins/lisa-cursor/skills/lisa-session-manager/SKILL.md +28 -9
- package/plugins/lisa-cursor/skills/lisa-session-manager/references/runbook-template.md +4 -2
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-cycle.mjs +7 -2
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-manager.mjs +9 -2
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-runtime.mjs +9 -4
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-usage.mjs +11 -5
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/config.mjs +2 -1
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/human-answer.mjs +38 -9
- package/plugins/lisa-cursor/skills/lisa-setup-session-manager/SKILL.md +15 -2
- 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 +8 -5
- package/plugins/lisa-devin/scripts/operator-id-kinds.mjs +120 -0
- package/plugins/lisa-devin/scripts/ready-queue-order.mjs +89 -15
- package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/validate-config.mjs +115 -6
- package/plugins/lisa-devin/skills/lisa-session-manager/SKILL.md +28 -9
- package/plugins/lisa-devin/skills/lisa-session-manager/references/runbook-template.md +4 -2
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-cycle.mjs +7 -2
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-manager.mjs +9 -2
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-runtime.mjs +9 -4
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-usage.mjs +11 -5
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/config.mjs +2 -1
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/human-answer.mjs +38 -9
- package/plugins/lisa-devin/skills/lisa-setup-session-manager/SKILL.md +15 -2
- 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-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-agy/plugin.json +1 -1
- package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-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 +8 -5
- package/plugins/src/base/scripts/operator-id-kinds.mjs +120 -0
- package/plugins/src/base/scripts/ready-queue-order.mjs +89 -15
- package/plugins/src/base/skills/lisa-secrets-access/scripts/validate-config.mjs +115 -6
- package/plugins/src/base/skills/lisa-session-manager/SKILL.md +28 -9
- package/plugins/src/base/skills/lisa-session-manager/references/runbook-template.md +4 -2
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-cycle.mjs +7 -2
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-manager.mjs +9 -2
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-runtime.mjs +9 -4
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-usage.mjs +11 -5
- package/plugins/src/base/skills/lisa-session-manager/scripts/config.mjs +2 -1
- package/plugins/src/base/skills/lisa-session-manager/scripts/human-answer.mjs +38 -9
- package/plugins/src/base/skills/lisa-setup-session-manager/SKILL.md +15 -2
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
AUTOMATION_RUN_OUTCOMES,
|
|
12
12
|
recordAutomationRun,
|
|
13
13
|
} from "../../../scripts/automation-run-record.mjs";
|
|
14
|
+
import { idComparableValues } from "../../../scripts/operator-id-kinds.mjs";
|
|
14
15
|
import {
|
|
15
16
|
CliError,
|
|
16
17
|
EXIT,
|
|
@@ -227,7 +228,9 @@ export async function route(ctx) {
|
|
|
227
228
|
* Who may release a human hold comes from `sessionManager.trustedAuthorIds`
|
|
228
229
|
* only. Any `trustedHumanActorIds` in the input is discarded: the input is
|
|
229
230
|
* assembled from the item's own (untrusted) body and comments, so a list
|
|
230
|
-
* carried beside them would let the item's text vouch for itself.
|
|
231
|
+
* carried beside them would let the item's text vouch for itself. The
|
|
232
|
+
* release check compares account ids only, so an `id:` entry reaches it as
|
|
233
|
+
* its bare value and a `login:` entry not at all (#4623).
|
|
231
234
|
* @param {object} ctx - CLI context
|
|
232
235
|
* @returns {Promise<{ json: object }>} `{action,reason,edges,gate}`
|
|
233
236
|
*/
|
|
@@ -240,7 +243,9 @@ export async function blockedPlan(ctx) {
|
|
|
240
243
|
input.pendingQuestion ??
|
|
241
244
|
(ref ? (await readLedger(ctx.root)).items[ref]?.pendingQuestion : null);
|
|
242
245
|
const project = loadProject(ctx.root);
|
|
243
|
-
const trustedHumanActorIds =
|
|
246
|
+
const trustedHumanActorIds = idComparableValues(
|
|
247
|
+
project.config?.trustedAuthorIds
|
|
248
|
+
);
|
|
244
249
|
return {
|
|
245
250
|
json: planBlockedRelease({
|
|
246
251
|
...input,
|
|
@@ -222,16 +222,23 @@ function environmentProblems(ctx, config) {
|
|
|
222
222
|
|
|
223
223
|
/**
|
|
224
224
|
* `validate`: every problem with the block, exit 2 when there is any.
|
|
225
|
+
* Warnings (a config that works but is ambiguous, #4623) are reported in
|
|
226
|
+
* `warnings`, only when there are any, and never fail the command.
|
|
225
227
|
* @param {object} ctx - CLI context
|
|
226
|
-
* @returns {{ json: object, exitCode: number }} `{valid,errors}`
|
|
228
|
+
* @returns {{ json: object, exitCode: number }} `{valid,errors[,warnings]}`
|
|
227
229
|
*/
|
|
228
230
|
export function validate(ctx) {
|
|
229
231
|
const project = loadProject(ctx.root);
|
|
230
232
|
const errors = project.config
|
|
231
233
|
? [...project.errors, ...environmentProblems(ctx, project.config)]
|
|
232
234
|
: [`No sessionManager block in ${GLOBAL_CONFIG_FILE}.`];
|
|
235
|
+
const warnings = project.warnings ?? [];
|
|
233
236
|
return {
|
|
234
|
-
json: {
|
|
237
|
+
json: {
|
|
238
|
+
valid: errors.length === 0,
|
|
239
|
+
errors,
|
|
240
|
+
...(warnings.length > 0 ? { warnings } : {}),
|
|
241
|
+
},
|
|
235
242
|
exitCode: errors.length === 0 ? EXIT.OK : EXIT.SETUP,
|
|
236
243
|
};
|
|
237
244
|
}
|
|
@@ -16,6 +16,7 @@ import path from "node:path";
|
|
|
16
16
|
|
|
17
17
|
import {
|
|
18
18
|
resolveSessionManagerConfig,
|
|
19
|
+
sessionManagerWarnings,
|
|
19
20
|
validateSessionManager,
|
|
20
21
|
} from "./config.mjs";
|
|
21
22
|
import {
|
|
@@ -134,15 +135,19 @@ function validationView(config) {
|
|
|
134
135
|
* Read both config files and resolve the `sessionManager` block.
|
|
135
136
|
* @param {string} root - Absolute project root
|
|
136
137
|
* @returns {{ global: object | undefined, local: object | undefined,
|
|
137
|
-
* config: object | null, errors: string[] }} Raw
|
|
138
|
-
* (null when absent)
|
|
138
|
+
* config: object | null, errors: string[], warnings: string[] }} Raw
|
|
139
|
+
* files, resolved block (null when absent), validation errors, and
|
|
140
|
+
* warnings that never block a command (such as a plain all-digit
|
|
141
|
+
* operator entry, #4623)
|
|
139
142
|
*/
|
|
140
143
|
export function loadProject(root) {
|
|
141
144
|
const global = readConfigFile(path.join(root, GLOBAL_CONFIG_FILE));
|
|
142
145
|
const local = readConfigFile(path.join(root, LOCAL_CONFIG_FILE));
|
|
143
146
|
const config = resolveSessionManagerConfig(global, local);
|
|
144
|
-
const
|
|
145
|
-
|
|
147
|
+
const view = config ? validationView(config) : null;
|
|
148
|
+
const errors = view ? validateSessionManager(view) : [];
|
|
149
|
+
const warnings = view ? sessionManagerWarnings(view) : [];
|
|
150
|
+
return { global, local, config, errors, warnings };
|
|
146
151
|
}
|
|
147
152
|
|
|
148
153
|
/**
|
|
@@ -116,7 +116,9 @@ Config and routing
|
|
|
116
116
|
repo-dir [--repo <key>] [--raw]
|
|
117
117
|
stdout {repo,dir}; --raw prints the bare dir. Exit 2 for an
|
|
118
118
|
unknown key or a dir without .lisa.config.json.
|
|
119
|
-
validate stdout {valid,errors}; exit 2 when invalid or absent.
|
|
119
|
+
validate stdout {valid,errors[,warnings]}; exit 2 when invalid or absent.
|
|
120
|
+
warnings (only when any, never fatal) names an ambiguous entry,
|
|
121
|
+
such as a plain all-digit operatorIds entry.
|
|
120
122
|
init-config [--slug <slug>] [--notify none|telegram] [--write]
|
|
121
123
|
stdout {written,block[,reason:"exists",layer][,path]}. --notify picks
|
|
122
124
|
the notification channel (default none): none writes
|
|
@@ -159,7 +161,9 @@ Per cycle
|
|
|
159
161
|
reason}]}. An item with a pending question in the ledger is excluded
|
|
160
162
|
(pending-question) from both tiers, and every other item still comes
|
|
161
163
|
back, so one item waiting on a human never stops dispatch. ordered: items assigned to sessionManager.operatorIds
|
|
162
|
-
first
|
|
164
|
+
first (a login: entry matches a GitHub assignee login, an id: entry
|
|
165
|
+
an assignee account id, a plain entry as --me does), then to --me,
|
|
166
|
+
then unassigned; each group by priority, then age.
|
|
163
167
|
Items assigned to anyone else are excluded (assigned-to-other).
|
|
164
168
|
--me defaults to the ledger's control.me.
|
|
165
169
|
With sessionManager.backlogPickup true, also prints backlogTotal,
|
|
@@ -204,7 +208,8 @@ Per cycle
|
|
|
204
208
|
blocked-plan [--input <file>] [--ref <ref>] STDIN (without --input): JSON
|
|
205
209
|
{labels,body,comments,humanNeededLabel?,edges,pendingQuestion?}.
|
|
206
210
|
Trusted hold releasers are sessionManager.trustedAuthorIds (none when
|
|
207
|
-
unset
|
|
211
|
+
unset; plain and id: entries, compared as ids; login: entries never
|
|
212
|
+
release); trustedHumanActorIds in the input is ignored. stdout
|
|
208
213
|
{action:release|keep|escalate|skip-human-gate,reason,edges,gate}.
|
|
209
214
|
--ref fills pendingQuestion from the ledger.
|
|
210
215
|
mark-plan <ref> --kind <kind> [--cause <cause>] [--item-label <l>]...
|
|
@@ -254,8 +259,9 @@ Per cycle
|
|
|
254
259
|
Queues the human's answer from the item's comments (source "item"):
|
|
255
260
|
the first comment after the latest [lisa-session-manager-question]
|
|
256
261
|
comment whose author's STABLE id (GitHub login or numeric id, Jira
|
|
257
|
-
accountId, Linear user id; never a name, displayName or email;
|
|
258
|
-
all-digit entry is a numeric id, never matched against a login
|
|
262
|
+
accountId, Linear user id; never a name, displayName or email; a
|
|
263
|
+
plain all-digit entry is a numeric id, never matched against a login;
|
|
264
|
+
login:<v> matches only a login, id:<v> only an id) is in
|
|
259
265
|
sessionManager.operatorIds or trustedAuthorIds, and that is not a
|
|
260
266
|
machine comment, checked first (body starting with a bracketed tag
|
|
261
267
|
such as [lisa-...] or [claude-sync]; [lisa- or <!-- lisa: anywhere;
|
|
@@ -21,10 +21,11 @@ import { isAbsolute, resolve, sep } from "node:path";
|
|
|
21
21
|
import {
|
|
22
22
|
mergeConfigLayers as mergeLayers,
|
|
23
23
|
parseLoopInterval,
|
|
24
|
+
sessionManagerWarnings,
|
|
24
25
|
validateSessionManager,
|
|
25
26
|
} from "../../lisa-secrets-access/scripts/validate-config.mjs";
|
|
26
27
|
|
|
27
|
-
export { parseLoopInterval, validateSessionManager };
|
|
28
|
+
export { parseLoopInterval, sessionManagerWarnings, validateSessionManager };
|
|
28
29
|
export { detectRepoLayout, detectRepos, draftHints } from "./repo-detect.mjs";
|
|
29
30
|
|
|
30
31
|
/**
|
|
@@ -18,8 +18,11 @@
|
|
|
18
18
|
* login or numeric id, a Jira accountId, a Linear user id, never a display
|
|
19
19
|
* name or email, which anyone can set. An all-digit allowed entry is a
|
|
20
20
|
* numeric id and matches only the `id` or `accountId` field, never a login,
|
|
21
|
-
* which its owner chooses and may make all digits (#4571).
|
|
22
|
-
*
|
|
21
|
+
* which its owner chooses and may make all digits (#4571). A kind-keyed
|
|
22
|
+
* entry names one identity for this matcher, the queue and the claim alike
|
|
23
|
+
* (#4623): `login:<v>` matches only a `login`, `id:<v>` only an `id` or
|
|
24
|
+
* `accountId`, and an entry with an unknown prefix or an empty value matches
|
|
25
|
+
* nobody. The text is carried as data.
|
|
23
26
|
*
|
|
24
27
|
* The question the answer must follow is the comment whose id the manager
|
|
25
28
|
* recorded last; with no recorded id, the latest comment that STARTS with
|
|
@@ -28,6 +31,7 @@
|
|
|
28
31
|
* answer by posting the marker after it.
|
|
29
32
|
* @module session-manager/human-answer
|
|
30
33
|
*/
|
|
34
|
+
import { parseIdEntries } from "../../../scripts/operator-id-kinds.mjs";
|
|
31
35
|
import { QUESTION_MARKER } from "./human-needed.mjs";
|
|
32
36
|
|
|
33
37
|
/** Body markers that make a comment a machine's, never a human's answer. */
|
|
@@ -46,6 +50,9 @@ const QUOTE_LINE = /^\s*>/;
|
|
|
46
50
|
/** The comment fields that carry its tracker id. */
|
|
47
51
|
const COMMENT_ID_KEYS = ["id", "node_id"];
|
|
48
52
|
|
|
53
|
+
/** The author field a `login:` entry matches. */
|
|
54
|
+
const LOGIN_KEYS = ["login"];
|
|
55
|
+
|
|
49
56
|
/** The author fields that are stable ids, never settable display text. */
|
|
50
57
|
const STABLE_ID_KEYS = ["login", "id", "accountId"];
|
|
51
58
|
|
|
@@ -60,6 +67,28 @@ const NUMERIC_ID_KEYS = ["id", "accountId"];
|
|
|
60
67
|
/** An allowed entry that is a numeric account id, never a login. */
|
|
61
68
|
const ALL_DIGITS = /^\d+$/;
|
|
62
69
|
|
|
70
|
+
/**
|
|
71
|
+
* The allowed values, split by the author fields each may match. A plain
|
|
72
|
+
* entry keeps its #4571 meaning (all digits: an id only; otherwise a login
|
|
73
|
+
* or an id); a kind-keyed entry matches its own kind only.
|
|
74
|
+
* @param {readonly unknown[]} allowed - Answerer entries
|
|
75
|
+
* @returns {{ ids: Set<string>, logins: Set<string>, named: Set<string> }}
|
|
76
|
+
* Values matched against id fields, login fields, and any stable field
|
|
77
|
+
*/
|
|
78
|
+
function answererSets(allowed) {
|
|
79
|
+
const entries = parseIdEntries(allowed);
|
|
80
|
+
const plain = entries.filter(entry => entry.kind === "plain");
|
|
81
|
+
const valuesOf = list => new Set(list.map(entry => entry.value));
|
|
82
|
+
return {
|
|
83
|
+
ids: valuesOf([
|
|
84
|
+
...plain.filter(entry => ALL_DIGITS.test(entry.value)),
|
|
85
|
+
...entries.filter(entry => entry.kind === "id"),
|
|
86
|
+
]),
|
|
87
|
+
logins: valuesOf(entries.filter(entry => entry.kind === "login")),
|
|
88
|
+
named: valuesOf(plain.filter(entry => !ALL_DIGITS.test(entry.value))),
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
63
92
|
/**
|
|
64
93
|
* The string or number values of `keys` on `value`, as strings.
|
|
65
94
|
* @param {unknown} value - Object to read
|
|
@@ -148,11 +177,12 @@ function questionIndex(rows, managerCommentIds, authorOf) {
|
|
|
148
177
|
* reported in `refused`, never returned: returning it made every later cycle
|
|
149
178
|
* pick the same reply and fail on it again, so a corrected reply posted after
|
|
150
179
|
* it was never read (CodySwannGT/lisa#4571).
|
|
151
|
-
* @param {{comments: unknown, allowed: readonly string[],
|
|
180
|
+
* @param {{comments: unknown, allowed: readonly (string|number)[],
|
|
152
181
|
* managerCommentIds?: readonly (string|number)[],
|
|
153
182
|
* refuses?: (text: string) => string | null | undefined}} input - The
|
|
154
|
-
* item's comments, the answerer
|
|
155
|
-
* reply's text may not be queued (null
|
|
183
|
+
* item's comments, the answerer entries (plain, `login:` or `id:`), the
|
|
184
|
+
* ids the manager posted, and why a reply's text may not be queued (null
|
|
185
|
+
* when it may)
|
|
156
186
|
* @returns {{answer: {text: string, author: string, at: string|null} | null,
|
|
157
187
|
* reason: string, refused?: {id: string|null, author: string, why: string}[]}}
|
|
158
188
|
* The answer, or null with why there is none, and (only when any were)
|
|
@@ -168,13 +198,12 @@ export function pickItemAnswer({
|
|
|
168
198
|
throw new Error('stdin must be JSON {"comments":[...]}');
|
|
169
199
|
}
|
|
170
200
|
const rows = comments.filter(row => row && typeof row === "object");
|
|
171
|
-
const
|
|
172
|
-
const numeric = new Set(allow.filter(id => ALL_DIGITS.test(id)));
|
|
173
|
-
const named = new Set(allow.filter(id => !ALL_DIGITS.test(id)));
|
|
201
|
+
const { ids, logins, named } = answererSets(allowed);
|
|
174
202
|
const authorOf = row => {
|
|
175
203
|
const author = row.author ?? row.user;
|
|
176
204
|
return (
|
|
177
|
-
idsOf(author, NUMERIC_ID_KEYS).find(id =>
|
|
205
|
+
idsOf(author, NUMERIC_ID_KEYS).find(id => ids.has(id)) ??
|
|
206
|
+
idsOf(author, LOGIN_KEYS).find(login => logins.has(login)) ??
|
|
178
207
|
idsOf(author, STABLE_ID_KEYS).find(id => named.has(id))
|
|
179
208
|
);
|
|
180
209
|
};
|
|
@@ -68,7 +68,10 @@ writes `$SM`, and pass `--project-root "$ROOT"` (the absolute project root) on e
|
|
|
68
68
|
set `sessionManager.trustedAuthorIds`. Without it, any author's Ready item reaches a
|
|
69
69
|
bypass-permissions worker; say so plainly. The list holds stable tracker user ids as strings,
|
|
70
70
|
never logins: the GitHub numeric user id (`gh api users/<login> --jq .id`), the Jira
|
|
71
|
-
`accountId`, or the Linear user id. A login matches no one
|
|
71
|
+
`accountId`, or the Linear user id. A plain login matches no one in the queue and silently
|
|
72
|
+
excludes every item; to trust a GitHub login on purpose write it as `login:<login>`, and to say
|
|
73
|
+
outright that an entry is an id write `id:<id>`. A login GitHub frees (after a rename or a
|
|
74
|
+
deleted account) can be re-registered by someone else, so prefer `id:` for trust.
|
|
72
75
|
4. Set `sessionManager.operatorIds` to a non-empty **array** holding the operator's own tracker
|
|
73
76
|
user id, e.g. `"operatorIds": ["<operator-id>"]` (a bare string fails `validate`). Look up the
|
|
74
77
|
OPERATOR, not the credential: `gh api user` / `viewer.id` return whoever the tracker credential
|
|
@@ -81,6 +84,13 @@ writes `$SM`, and pass `--project-root "$ROOT"` (the absolute project root) on e
|
|
|
81
84
|
"me", spelled as the tracker API returns it: the GitHub **login** (`gh api users/<login> --jq
|
|
82
85
|
.login`), the Jira `accountId`, or the Linear user id (the operator's entry in the team's member
|
|
83
86
|
list, or `viewer.id` only when the operator runs the lookup with their own credential).
|
|
87
|
+
**Prefer the kind-keyed form**, which every reader (the queue, the claim and answers on the
|
|
88
|
+
item) matches the same way: `"login:<github-login>"` on GitHub, `"id:<accountId or user id>"` on
|
|
89
|
+
Jira and Linear. A plain entry still works as before, but a plain **all-digit** GitHub login is
|
|
90
|
+
read as a login by the queue and as a numeric id by the answer matcher, so the operator could
|
|
91
|
+
not answer on the item and the unrelated account whose numeric id equals it could; `validate`
|
|
92
|
+
warns about it (in `warnings`, never failing) and names both forms. An unknown prefix
|
|
93
|
+
(`user:octocat`) or an empty value (`login:`) fails `validate`, naming the entry.
|
|
84
94
|
**Recommend setting it in every setup**, even a single-user one: it is also who may answer a
|
|
85
95
|
human-needed question by replying on the item. With neither `operatorIds` nor
|
|
86
96
|
`trustedAuthorIds` set, the manager reads no answer off the item at all, because the tracker
|
|
@@ -91,10 +101,13 @@ writes `$SM`, and pass `--project-root "$ROOT"` (the absolute project root) on e
|
|
|
91
101
|
is exhausted and a worker slot is still free, the manager then looks at backlog items (open
|
|
92
102
|
leaves in no lifecycle role) that nobody else is assigned to, that are not human-held and have
|
|
93
103
|
no unfinished blocker. Each one that passes the full tracker validation, including the
|
|
94
|
-
stateless-pickup check, is assigned to the first `operatorIds` entry
|
|
104
|
+
stateless-pickup check, is assigned to the first `operatorIds` entry (its bare login or id,
|
|
105
|
+
without the `login:` / `id:` prefix), moved to Ready and
|
|
95
106
|
dispatched. Say plainly that this lets the manager start work nobody marked Ready, so it needs
|
|
96
107
|
`operatorIds` and should go with `trustedAuthorIds` on any tracker outsiders can write to.
|
|
97
108
|
6. `node "$SM/session-manager.mjs" validate --project-root "$ROOT"` must print `valid: true`.
|
|
109
|
+
Show the operator every entry of `warnings`, when there is one, in plain words, and offer to
|
|
110
|
+
rewrite a plain all-digit operator entry in the `login:` / `id:` form it names.
|
|
98
111
|
|
|
99
112
|
## Step 3: Store the bot token
|
|
100
113
|
|
|
@@ -746,9 +746,9 @@ operator chooses Telegram (`init-config --notify telegram`).
|
|
|
746
746
|
| `sessionManager.stall.requestionHours` | no | `4` | How long an unanswered worker question waits before the manager asks again (zero or positive). |
|
|
747
747
|
| `sessionManager.notify.provider` | no | `none` | `none` (no notification channel) or `telegram`. Absent, like an absent `notify` block, means `none`. Any other value fails validation. |
|
|
748
748
|
| `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>`. |
|
|
749
|
-
| `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 login silently matches no one and excludes every item. When set, the manager takes only items authored by these people. |
|
|
750
|
-
| `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. |
|
|
751
|
-
| `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, 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`. |
|
|
749
|
+
| `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. |
|
|
750
|
+
| `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. |
|
|
751
|
+
| `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`. |
|
|
752
752
|
|
|
753
753
|
- **Non-secret only.** A credential-named field or a token-shaped value anywhere in this block is a
|
|
754
754
|
validation error. With Telegram, where the bot token lives follows the project's `secrets` block
|
|
@@ -774,7 +774,8 @@ operator chooses Telegram (`init-config --notify telegram`).
|
|
|
774
774
|
both, so neither name is ever hard-coded.
|
|
775
775
|
- **Who may answer on the item.** A reply on a human-needed item is taken as the answer only from
|
|
776
776
|
`sessionManager.operatorIds` or `trustedAuthorIds`, matched on stable ids (GitHub login or
|
|
777
|
-
numeric id, Jira `accountId`, Linear user id; never a display name or email
|
|
777
|
+
numeric id, Jira `accountId`, Linear user id; never a display name or email; a plain all-digit
|
|
778
|
+
entry is a numeric id only, `login:<v>` only a login, `id:<v>` only an id), and never from a
|
|
778
779
|
machine comment, which is excluded first, whoever wrote it: one starting with a Lisa or Claude
|
|
779
780
|
tag such as `[lisa-…]` or `[claude-sync]`, holding `[lisa-` or `<!-- lisa:`, saying "Written by
|
|
780
781
|
Claude", carrying the agent-attribution footer, or whose id the manager recorded as its own
|
|
@@ -787,7 +788,9 @@ operator chooses Telegram (`init-config --notify telegram`).
|
|
|
787
788
|
with the `answerCommand` that `status` lists. Set `operatorIds` even in a single-user setup.
|
|
788
789
|
- **Shape check.** `validateSessionManager` in
|
|
789
790
|
`lisa-secrets-access/scripts/validate-config.mjs` runs as part of `validateConfig`, so
|
|
790
|
-
`/lisa:doctor` reports a malformed block.
|
|
791
|
+
`/lisa:doctor` reports a malformed block. `sessionManagerWarnings` reports what works but is
|
|
792
|
+
ambiguous (a plain all-digit operator entry): doctor prints it as a warning and the
|
|
793
|
+
session manager's `validate` returns it in `warnings`; neither fails on it.
|
|
791
794
|
|
|
792
795
|
### Env-keyed `done`
|
|
793
796
|
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kind-keyed identity entries for `sessionManager.operatorIds` and
|
|
3
|
+
* `sessionManager.trustedAuthorIds` (CodySwannGT/lisa#4623).
|
|
4
|
+
*
|
|
5
|
+
* ## Why this exists
|
|
6
|
+
*
|
|
7
|
+
* One plain config value used to mean two identities. An all-digit entry was
|
|
8
|
+
* a numeric account id to the answer matcher (#4571: anyone can register an
|
|
9
|
+
* all-digit login, nobody picks their own numeric id) but a login to the
|
|
10
|
+
* Ready-queue order and the claim. So an operator whose GitHub login is all
|
|
11
|
+
* digits could not answer on the item, and the stranger whose numeric id
|
|
12
|
+
* equals that login could; switching the entry to the numeric id fixed the
|
|
13
|
+
* answers and broke the queue. A kind-keyed entry names one identity, and
|
|
14
|
+
* every reader matches it the same way:
|
|
15
|
+
*
|
|
16
|
+
* - `login:<v>` is a GitHub login and matches only a `login` field.
|
|
17
|
+
* - `id:<v>` is an account id (a GitHub numeric id, a Jira accountId, a
|
|
18
|
+
* Linear user id) and matches only an id field.
|
|
19
|
+
* - A plain entry (no prefix) keeps exactly the meaning each reader gave it
|
|
20
|
+
* before kind-keyed entries existed. Changing that is a later, breaking
|
|
21
|
+
* change.
|
|
22
|
+
*
|
|
23
|
+
* ## The prefix rule
|
|
24
|
+
*
|
|
25
|
+
* A prefix is one run of ASCII letters followed by `:` at the very start.
|
|
26
|
+
* Jira accountIds can hold a colon (`557058:<uuid>`), but their part before
|
|
27
|
+
* it is digits, so they stay plain. Jira Service Management portal customers
|
|
28
|
+
* have accountIds that start with letters (`qm:<id>`); `qm` is therefore not
|
|
29
|
+
* a prefix and such an id stays plain too. Any other letters-and-colon start
|
|
30
|
+
* is an unknown prefix, and an entry whose prefix is followed by nothing is
|
|
31
|
+
* an empty value. Both are invalid: a reader matches them against nobody and
|
|
32
|
+
* `validate-config.mjs` refuses them, naming the entry.
|
|
33
|
+
*
|
|
34
|
+
* The validator ships as a standalone payload script and keeps its own copy
|
|
35
|
+
* of this grammar; `tests/unit/scripts/operator-id-kinds.test.ts` pins the
|
|
36
|
+
* two together on a table of entries.
|
|
37
|
+
* @module operator-id-kinds
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
/** The kinds a prefixed entry may name. */
|
|
41
|
+
export const ID_ENTRY_KINDS = Object.freeze(["login", "id"]);
|
|
42
|
+
|
|
43
|
+
/** A letters-only prefix at the start of an entry. */
|
|
44
|
+
const PREFIX = /^([A-Za-z]+):/;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Letters-and-colon starts that belong to a real tracker id, never a prefix:
|
|
48
|
+
* Jira Service Management portal customers' accountIds start `qm:`.
|
|
49
|
+
*/
|
|
50
|
+
const PLAIN_ID_STARTS = new Set(["qm"]);
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @typedef {{ kind: "login" | "id" | "plain", value: string }
|
|
54
|
+
* | { kind: "invalid", problem: "unknown-prefix" | "empty-value", prefix: string }} IdEntry
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Parse one entry. A number (a hand-written numeric id) reads as its string,
|
|
59
|
+
* exactly as the readers have always taken it.
|
|
60
|
+
* @param {unknown} entry - One `operatorIds` / `trustedAuthorIds` entry
|
|
61
|
+
* @returns {IdEntry | null} The parsed entry; null for a non-string,
|
|
62
|
+
* non-number value
|
|
63
|
+
*/
|
|
64
|
+
export function parseIdEntry(entry) {
|
|
65
|
+
if (typeof entry === "number") return { kind: "plain", value: String(entry) };
|
|
66
|
+
if (typeof entry !== "string") return null;
|
|
67
|
+
const prefix = PREFIX.exec(entry)?.[1];
|
|
68
|
+
if (prefix === undefined || PLAIN_ID_STARTS.has(prefix)) {
|
|
69
|
+
return { kind: "plain", value: entry };
|
|
70
|
+
}
|
|
71
|
+
if (!ID_ENTRY_KINDS.includes(prefix)) {
|
|
72
|
+
return { kind: "invalid", problem: "unknown-prefix", prefix };
|
|
73
|
+
}
|
|
74
|
+
const value = entry.slice(prefix.length + 1).trim();
|
|
75
|
+
return value === ""
|
|
76
|
+
? { kind: "invalid", problem: "empty-value", prefix }
|
|
77
|
+
: { kind: prefix, value };
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Parse a configured list, dropping values that are not entries at all.
|
|
82
|
+
* @param {unknown} entries - The configured list
|
|
83
|
+
* @returns {IdEntry[]} Parsed entries, invalid ones kept so a reader can
|
|
84
|
+
* count them (an invalid trusted entry still means a filter is set)
|
|
85
|
+
*/
|
|
86
|
+
export function parseIdEntries(entries) {
|
|
87
|
+
return (Array.isArray(entries) ? entries : [])
|
|
88
|
+
.map(parseIdEntry)
|
|
89
|
+
.filter(entry => entry !== null);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Whether one parsed entry names the identity whose fields are given. Each
|
|
94
|
+
* field is the reader's value for that kind: `plain` is what a plain entry
|
|
95
|
+
* has always been compared with there, `login` the GitHub login (null when
|
|
96
|
+
* the tracker has none), `id` the account id. A missing field never matches.
|
|
97
|
+
* @param {IdEntry} entry - Parsed entry
|
|
98
|
+
* @param {{ plain?: string | null, login?: string | null, id?: string | null }} fields
|
|
99
|
+
* @returns {boolean} Whether it matches
|
|
100
|
+
*/
|
|
101
|
+
export function entryMatches(entry, fields) {
|
|
102
|
+
if (entry.kind === "invalid") return false;
|
|
103
|
+
const actual = fields[entry.kind];
|
|
104
|
+
return typeof actual === "string" && actual !== "" && actual === entry.value;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* The values an id-only comparator may hold, for a reader that compares
|
|
109
|
+
* account ids and nothing else (the hold-release check in
|
|
110
|
+
* `intake-blocker-reprobe.mjs`): plain entries as written and `id:` values.
|
|
111
|
+
* A `login:` entry names a login, which such a reader never sees, so it is
|
|
112
|
+
* dropped rather than compared with an id it could collide with.
|
|
113
|
+
* @param {unknown} entries - The configured list
|
|
114
|
+
* @returns {string[]} Values to compare as ids
|
|
115
|
+
*/
|
|
116
|
+
export function idComparableValues(entries) {
|
|
117
|
+
return parseIdEntries(entries)
|
|
118
|
+
.filter(entry => entry.kind === "plain" || entry.kind === "id")
|
|
119
|
+
.map(entry => entry.value);
|
|
120
|
+
}
|