@mmerterden/multi-agent-pipeline 23.7.0 → 24.1.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/CHANGELOG.md +60 -1
- package/README.md +59 -24
- package/README.tr.md +43 -8
- package/SECURITY.md +3 -3
- package/docs/architecture.md +41 -4
- package/docs/ecosystem.md +15 -13
- package/docs/facts.json +5 -4
- package/docs/features.md +67 -15
- package/install/_codex-agents.mjs +13 -8
- package/install/_common.mjs +24 -0
- package/install/_dev-only-files.mjs +5 -0
- package/install/_mcp-register.mjs +6 -2
- package/install/_rewrite-tree.mjs +197 -0
- package/install/codex.mjs +96 -180
- package/install/copilot.mjs +24 -54
- package/install/index.mjs +29 -11
- package/install/templates/codex-instructions.md +21 -5
- package/install/templates/copilot-instructions.md +21 -14
- package/manifest.json +2083 -0
- package/package.json +8 -2
- package/pipeline/commands/multi-agent/SKILL.md +5 -4
- package/pipeline/commands/multi-agent/analysis/SKILL.md +5 -1
- package/pipeline/commands/multi-agent/autopilot-on/SKILL.md +31 -3
- package/pipeline/commands/multi-agent/autopilot-status/SKILL.md +5 -1
- package/pipeline/commands/multi-agent/channels/SKILL.md +16 -8
- package/pipeline/commands/multi-agent/log/SKILL.md +2 -0
- package/pipeline/commands/multi-agent/stack/SKILL.md +1 -1
- package/pipeline/contract/CHANGELOG.md +15 -0
- package/pipeline/contract/fixtures/error-invalid-request.json +1 -1
- package/pipeline/contract/fixtures/error-unauthorized.json +1 -1
- package/pipeline/contract/fixtures/runs-awaiting-question.json +6 -1
- package/pipeline/contract/fixtures/runs-empty.json +1 -1
- package/pipeline/contract/fixtures/runs-failed.json +21 -1
- package/pipeline/contract/fixtures/runs-old-schema.json +18 -3
- package/pipeline/contract/fixtures/runs-pr-opened-redacted.json +31 -1
- package/pipeline/contract/fixtures/runs-pr-opened.json +31 -1
- package/pipeline/contract/fixtures/runs-running.json +16 -1
- package/pipeline/contract/manifest.json +14 -14
- package/pipeline/contract/types/index.d.ts +20 -1
- package/pipeline/lib/_jira-auth.sh +50 -78
- package/pipeline/lib/_service-account.sh +191 -0
- package/pipeline/lib/credential-inventory.sh +49 -37
- package/pipeline/lib/credential-store.sh +48 -3
- package/pipeline/lib/fetch-confluence.sh +76 -92
- package/pipeline/lib/fetch-crashlytics.sh +30 -59
- package/pipeline/lib/fetch-figma-annotations.sh +9 -9
- package/pipeline/lib/fetch-fortify.sh +77 -81
- package/pipeline/lib/fetch-graylog.sh +38 -77
- package/pipeline/lib/figma-mcp-refresh.sh +23 -4
- package/pipeline/lib/figma-screenshot.sh +7 -8
- package/pipeline/lib/figma-token.sh +39 -46
- package/pipeline/lib/host.mjs +138 -0
- package/pipeline/lib/host.sh +48 -0
- package/pipeline/lib/issue-fetcher.sh +25 -41
- package/pipeline/lib/jira-publish.sh +23 -21
- package/pipeline/lib/local-model.mjs +93 -0
- package/pipeline/lib/md2confluence-v3.py +37 -30
- package/pipeline/lib/model-dispatch.sh +41 -4
- package/pipeline/lib/model-resolve.mjs +58 -0
- package/pipeline/lib/post-pr-review.sh +38 -53
- package/pipeline/lib/reviewer-families.mjs +70 -0
- package/pipeline/lib/service-account.mjs +2131 -0
- package/pipeline/lib/service-account.sh +35 -0
- package/pipeline/lib/usage-token.mjs +64 -24
- package/pipeline/lib/usage-vocab.mjs +1 -1
- package/pipeline/lib/user-facing.mjs +11 -3
- package/pipeline/lib/vercel-deploy.sh +17 -26
- package/pipeline/multi-agent-refs/_entry-picker.md +62 -0
- package/pipeline/multi-agent-refs/analysis/intake.md +2 -0
- package/pipeline/multi-agent-refs/analysis/render.md +12 -1
- package/pipeline/multi-agent-refs/analysis/reusable-refs.md +1 -0
- package/pipeline/multi-agent-refs/analysis/unattended.md +135 -0
- package/pipeline/multi-agent-refs/autopilot-on/details.md +16 -0
- package/pipeline/multi-agent-refs/channels/generator.md +10 -2
- package/pipeline/multi-agent-refs/channels/menu.md +3 -1
- package/pipeline/multi-agent-refs/channels/preview.md +3 -1
- package/pipeline/multi-agent-refs/channels/reference.md +16 -2
- package/pipeline/multi-agent-refs/channels/report-file.md +188 -0
- package/pipeline/multi-agent-refs/cross-cli-contract.md +35 -27
- package/pipeline/multi-agent-refs/features/doctor.md +37 -11
- package/pipeline/multi-agent-refs/features/free-models.md +3 -3
- package/pipeline/multi-agent-refs/features/local-model.md +87 -0
- package/pipeline/multi-agent-refs/features/model-fallback.md +25 -10
- package/pipeline/multi-agent-refs/features/product-context.md +6 -5
- package/pipeline/multi-agent-refs/features/service-accounts.md +233 -0
- package/pipeline/multi-agent-refs/features/unattended-security.md +10 -1
- package/pipeline/multi-agent-refs/help/en.md +36 -1
- package/pipeline/multi-agent-refs/help/tr.md +34 -1
- package/pipeline/multi-agent-refs/orchestrator/copilot-pipeline.md +2 -1
- package/pipeline/multi-agent-refs/orchestrator/dispatcher.md +2 -1
- package/pipeline/multi-agent-refs/phases/modes.md +20 -1
- package/pipeline/multi-agent-refs/phases/phase-0-init.md +1 -0
- package/pipeline/multi-agent-refs/phases/phase-4-commit.md +1 -0
- package/pipeline/multi-agent-refs/phases/phase-5-report.md +13 -11
- package/pipeline/multi-agent-refs/phases.md +4 -3
- package/pipeline/multi-agent-refs/review/panel.md +30 -18
- package/pipeline/multi-agent-refs/setup/discovery.md +17 -5
- package/pipeline/multi-agent-refs/setup/token-save-flow.md +21 -2
- package/pipeline/multi-agent-refs/sync/overview.md +11 -5
- package/pipeline/multi-agent-refs/tracker-contract.md +64 -20
- package/pipeline/office/index.html +77 -4
- package/pipeline/schemas/activity.schema.json +63 -4
- package/pipeline/schemas/autopilot-config.schema.json +29 -4
- package/pipeline/schemas/hosts.json +512 -0
- package/pipeline/schemas/hosts.schema.json +310 -0
- package/pipeline/schemas/launch.json +22 -2
- package/pipeline/schemas/launch.schema.json +2 -1
- package/pipeline/schemas/now-lines.json +103 -0
- package/pipeline/schemas/now-lines.schema.json +42 -0
- package/pipeline/schemas/phases.json +19 -1
- package/pipeline/schemas/phases.schema.json +8 -0
- package/pipeline/schemas/prefs.schema.json +331 -4
- package/pipeline/schemas/runs-index.schema.json +22 -1
- package/pipeline/scripts/_autopilot-config.mjs +67 -4
- package/pipeline/scripts/_autopilot-item.mjs +67 -0
- package/pipeline/scripts/_autopilot-outcomes.mjs +6 -0
- package/pipeline/scripts/_contract-core.mjs +1 -1
- package/pipeline/scripts/_cost.mjs +75 -3
- package/pipeline/scripts/activity-snapshot.mjs +27 -1
- package/pipeline/scripts/analysis-sources.mjs +22 -5
- package/pipeline/scripts/analysis-unattended.mjs +360 -0
- package/pipeline/scripts/anonymize-findings.mjs +3 -7
- package/pipeline/scripts/autopilot-arming.mjs +19 -10
- package/pipeline/scripts/autopilot-intake.mjs +124 -27
- package/pipeline/scripts/autopilot-menubar.swift +7 -0
- package/pipeline/scripts/autopilot-runner.mjs +77 -48
- package/pipeline/scripts/autopilot-status.sh +32 -9
- package/pipeline/scripts/bulk-read.sh +37 -5
- package/pipeline/scripts/confluence-readback.mjs +15 -7
- package/pipeline/scripts/cost-table.json +65 -25
- package/pipeline/scripts/doctor.mjs +119 -32
- package/pipeline/scripts/entry-mode.mjs +101 -0
- package/pipeline/scripts/estimate.mjs +30 -16
- package/pipeline/scripts/feedback-send.mjs +11 -8
- package/pipeline/scripts/gen-facts.mjs +7 -9
- package/pipeline/scripts/jira-attach.sh +23 -28
- package/pipeline/scripts/jira-search.sh +5 -21
- package/pipeline/scripts/launch-request.mjs +15 -9
- package/pipeline/scripts/migrate-prefs.mjs +56 -0
- package/pipeline/scripts/phase-tracker.sh +226 -50
- package/pipeline/scripts/priority-review.mjs +14 -7
- package/pipeline/scripts/product-context.mjs +26 -7
- package/pipeline/scripts/prune-logs.sh +4 -2
- package/pipeline/scripts/render-work-summary.sh +51 -1
- package/pipeline/scripts/report-file.mjs +285 -0
- package/pipeline/scripts/rework-escalation.mjs +19 -4
- package/pipeline/scripts/runs-index.mjs +2 -1
- package/pipeline/scripts/service-read.mjs +19 -17
- package/pipeline/scripts/skill-siblings.mjs +17 -1
- package/pipeline/scripts/status-overview.mjs +20 -10
- package/pipeline/scripts/uninstall.mjs +145 -57
- package/pipeline/scripts/usage-register.mjs +34 -11
- package/pipeline/scripts/usage-report.mjs +31 -26
- package/pipeline/scripts/validate-triage.mjs +11 -1
- package/pipeline/scripts/work-items.mjs +25 -28
- package/pipeline/scripts/write-store-config.mjs +37 -11
- package/pipeline/skills/.skill-manifest.json +4 -4
- package/pipeline/skills/.skills-index.json +1 -1
- package/pipeline/skills/shared/core/multi-agent/SKILL.md +11 -3
- package/pipeline/skills/shared/core/multi-agent-analysis/SKILL.md +2 -0
- package/pipeline/skills/shared/core/multi-agent-channels/SKILL.md +11 -8
- package/pipeline/lib/credential-resolve.mjs +0 -75
|
@@ -94,10 +94,20 @@ if [ -f "$_MA_RP_HERE/run-paths.sh" ]; then . "$_MA_RP_HERE/run-paths.sh"; else
|
|
|
94
94
|
# shellcheck source=/dev/null
|
|
95
95
|
if [ -f "$_MA_RP_HERE/user-facing.sh" ]; then . "$_MA_RP_HERE/user-facing.sh"; else . "$HOME/.claude/lib/user-facing.sh"; fi
|
|
96
96
|
|
|
97
|
+
# shellcheck source=/dev/null
|
|
98
|
+
if [ -f "$_MA_RP_HERE/_service-account.sh" ]; then
|
|
99
|
+
. "$_MA_RP_HERE/_service-account.sh"
|
|
100
|
+
elif [ -f "$HOME/.claude/lib/_service-account.sh" ]; then
|
|
101
|
+
. "$HOME/.claude/lib/_service-account.sh"
|
|
102
|
+
fi
|
|
97
103
|
|
|
98
|
-
#
|
|
99
|
-
#
|
|
100
|
-
|
|
104
|
+
# A curl config carrying the Bitbucket credential to exactly this URL. Sets
|
|
105
|
+
# BB_CFG rather than printing it: a caller reading it through a command
|
|
106
|
+
# substitution would resolve in a subshell, where a refusal cannot be reported.
|
|
107
|
+
BB_CFG=""
|
|
108
|
+
bb_cfg() {
|
|
109
|
+
BB_CFG="$(sa_cfg bitbucket "$1" basic)"
|
|
110
|
+
}
|
|
101
111
|
|
|
102
112
|
TASK_ID="${1:-}"
|
|
103
113
|
|
|
@@ -257,12 +267,12 @@ compute_next_iteration() {
|
|
|
257
267
|
# them into the same `[{body: <text>}, ...]` shape that
|
|
258
268
|
# comment_exists_with_fingerprint expects so the dedupe gate is provider-agnostic.
|
|
259
269
|
load_existing_comments_bitbucket() {
|
|
260
|
-
local host="$1" project="$2" slug="$3" pr_num="$4"
|
|
270
|
+
local host="$1" project="$2" slug="$3" pr_num="$4"
|
|
261
271
|
if [ -z "$EXISTING_COMMENTS_CACHE" ]; then
|
|
262
272
|
local base="https://$host/rest/api/1.0/projects/$project/repos/$slug/pull-requests/$pr_num"
|
|
263
273
|
local raw
|
|
264
|
-
|
|
265
|
-
|
|
274
|
+
bb_cfg "$base/activities?fromType=COMMENT&limit=100" || { EXISTING_COMMENTS_CACHE="[]"; return 0; }
|
|
275
|
+
raw=$(curl -sS -m 30 --config "$BB_CFG" 2>/dev/null || echo "{}")
|
|
266
276
|
EXISTING_COMMENTS_CACHE=$(jq '
|
|
267
277
|
def collect_texts(c):
|
|
268
278
|
if c == null then []
|
|
@@ -363,55 +373,27 @@ post_github() {
|
|
|
363
373
|
}
|
|
364
374
|
|
|
365
375
|
post_bitbucket_server() {
|
|
366
|
-
local host project slug user_slug
|
|
376
|
+
local host project slug user_slug
|
|
367
377
|
host=$(jq -r '.review.input.bbServerHost' "$AGENT_STATE")
|
|
368
378
|
project=$(jq -r '.review.input.bbProjectKey' "$AGENT_STATE")
|
|
369
379
|
slug=$(jq -r '.review.input.bbRepoSlug' "$AGENT_STATE")
|
|
370
380
|
|
|
371
|
-
|
|
372
|
-
prefs="$HOME/.claude/multi-agent-preferences.json"
|
|
373
|
-
user_key=$(jq -r '.global.keychainMapping.bitbucket_user // empty' "$prefs" 2>/dev/null || true)
|
|
374
|
-
token_key=$(jq -r '.global.keychainMapping.bitbucket_token // empty' "$prefs" 2>/dev/null || true)
|
|
381
|
+
local base="https://$host/rest/api/1.0/projects/$project/repos/$slug/pull-requests/$PR_NUM"
|
|
375
382
|
|
|
376
|
-
|
|
377
|
-
|
|
383
|
+
# The participant URL carries the reviewer's own name, so the username slot
|
|
384
|
+
# is read as a value here; the password never is.
|
|
385
|
+
if ! command -v sa_cfg >/dev/null 2>&1; then
|
|
386
|
+
echo "post-pr-review: the account resolver is not installed" >&2
|
|
378
387
|
return 4
|
|
379
388
|
fi
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
# working when run from either ~/.claude/lib or ~/.copilot/lib.
|
|
383
|
-
# shellcheck disable=SC1090
|
|
384
|
-
# Existence check before sourcing: `. <missing>` aborts the shell under `set -e`,
|
|
385
|
-
# `||` included, so a `.`-chain reaches neither its later candidates nor its error
|
|
386
|
-
# branch. The loop also covers all three hosts - the chain it replaced knew only
|
|
387
|
-
# .claude and .copilot, so a Codex-only install could not resolve at all.
|
|
388
|
-
for _cred_resolver in \
|
|
389
|
-
"$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" && pwd)/credential-store-resolver.sh" \
|
|
390
|
-
"$HOME/.claude/lib/credential-store-resolver.sh" \
|
|
391
|
-
"$HOME/.copilot/lib/credential-store-resolver.sh" \
|
|
392
|
-
"$HOME/.codex/lib/credential-store-resolver.sh"; do
|
|
393
|
-
[ -f "$_cred_resolver" ] || continue
|
|
394
|
-
# shellcheck source=/dev/null
|
|
395
|
-
. "$_cred_resolver" 2>/dev/null || true
|
|
396
|
-
if [ -n "${CRED_STORE:-}" ]; then break; fi
|
|
397
|
-
done
|
|
398
|
-
unset _cred_resolver
|
|
399
|
-
if [ -z "${CRED_STORE:-}" ]; then
|
|
400
|
-
echo "post-pr-review: credential helper not found" >&2
|
|
389
|
+
user_slug=$(sa_token bitbucket "$base" --slot username) || {
|
|
390
|
+
echo "post-pr-review: $(sa_explain)" >&2
|
|
401
391
|
return 4
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
auth_user=$("$CRED_STORE" get "$user_key" 2>/dev/null || true)
|
|
406
|
-
auth_token=$("$CRED_STORE" get "$token_key" 2>/dev/null || true)
|
|
407
|
-
user_slug="$auth_user"
|
|
408
|
-
|
|
409
|
-
if [ -z "$auth_user" ] || [ -z "$auth_token" ]; then
|
|
410
|
-
echo "post-pr-review: bitbucket creds not in credential store ($user_key / $token_key)" >&2
|
|
392
|
+
}
|
|
393
|
+
bb_cfg "$base" || {
|
|
394
|
+
echo "post-pr-review: $(sa_explain)" >&2
|
|
411
395
|
return 4
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
local base="https://$host/rest/api/1.0/projects/$project/repos/$slug/pull-requests/$PR_NUM"
|
|
396
|
+
}
|
|
415
397
|
|
|
416
398
|
# Dedupe gate - read pref, default ON. Bitbucket uses the activities feed.
|
|
417
399
|
local DEDUPE_ENABLED
|
|
@@ -420,7 +402,7 @@ post_bitbucket_server() {
|
|
|
420
402
|
# Load existing comments on any needs_work post: dedupe needs them when
|
|
421
403
|
# enabled, and the iteration counter is always derived from them.
|
|
422
404
|
if [ "$DECISION" = "needs_work" ]; then
|
|
423
|
-
load_existing_comments_bitbucket "$host" "$project" "$slug" "$PR_NUM"
|
|
405
|
+
load_existing_comments_bitbucket "$host" "$project" "$slug" "$PR_NUM"
|
|
424
406
|
ITERATION=$(compute_next_iteration)
|
|
425
407
|
fi
|
|
426
408
|
|
|
@@ -449,8 +431,9 @@ post_bitbucket_server() {
|
|
|
449
431
|
if [ "$line" -gt 0 ] 2>/dev/null; then
|
|
450
432
|
payload=$(jq -n --arg t "$body" --arg p "$path" --argjson l "$line" \
|
|
451
433
|
'{text: $t, anchor: {path: $p, line: $l, lineType: "ADDED", fileType: "TO"}}')
|
|
452
|
-
|
|
453
|
-
|
|
434
|
+
bb_cfg "$base/comments" || { echo "post-pr-review: $(sa_explain)" >&2; return 4; }
|
|
435
|
+
http=$(curl -sS -m 30 --config "$BB_CFG" -X POST \
|
|
436
|
+
-H "Content-Type: application/json" \
|
|
454
437
|
-d "$payload" -o /dev/null -w '%{http_code}' || echo 000)
|
|
455
438
|
if [ "$http" = "200" ] || [ "$http" = "201" ]; then
|
|
456
439
|
inline_ok=1
|
|
@@ -461,8 +444,9 @@ post_bitbucket_server() {
|
|
|
461
444
|
|
|
462
445
|
if [ "$inline_ok" -eq 0 ]; then
|
|
463
446
|
payload=$(jq -n --arg t "$body" '{text: $t}')
|
|
464
|
-
|
|
465
|
-
|
|
447
|
+
bb_cfg "$base/comments" || { echo "post-pr-review: $(sa_explain)" >&2; return 4; }
|
|
448
|
+
curl -sS -m 30 --config "$BB_CFG" -X POST \
|
|
449
|
+
-H "Content-Type: application/json" \
|
|
466
450
|
-d "$payload" >/dev/null \
|
|
467
451
|
|| echo "post-pr-review: bitbucket top-level comment failed for $path:$line" >&2
|
|
468
452
|
fi
|
|
@@ -476,8 +460,9 @@ post_bitbucket_server() {
|
|
|
476
460
|
esac
|
|
477
461
|
|
|
478
462
|
local http
|
|
479
|
-
|
|
480
|
-
|
|
463
|
+
bb_cfg "$base/participants/$user_slug" || { echo "post-pr-review: $(sa_explain)" >&2; return 4; }
|
|
464
|
+
http=$(curl -sS -m 30 --config "$BB_CFG" -X PUT \
|
|
465
|
+
-H "Content-Type: application/json" \
|
|
481
466
|
-d "$status_payload" -o /dev/null -w '%{http_code}' || echo 000)
|
|
482
467
|
case "$http" in
|
|
483
468
|
200|201) ;;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* reviewer-families.mjs - the reviewer families anonymized triage may name.
|
|
3
|
+
*
|
|
4
|
+
* Triage sees `Source A/B/C`, never a model. After it decides, the label map
|
|
5
|
+
* writes a FAMILY back onto each finding for per-reviewer telemetry, and the
|
|
6
|
+
* validator refuses any other value.
|
|
7
|
+
*
|
|
8
|
+
* Both lists are derived from the host registry rather than written out here,
|
|
9
|
+
* so a rung added there is covered without a second edit. A hand-written list
|
|
10
|
+
* fails quietly for a model outside it: nothing rejects the model, it simply
|
|
11
|
+
* gets no family, and a finding with no reviewer passes the validator.
|
|
12
|
+
*
|
|
13
|
+
* Order is load-bearing: rung names come first, so `claude-opus-4.7` is `opus`
|
|
14
|
+
* and not `claude`. The vendor prefix is the fallback for a model whose rung
|
|
15
|
+
* name is not in its id.
|
|
16
|
+
*
|
|
17
|
+
* @module pipeline/lib/reviewer-families
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import { HOST_IDS, REGISTRY } from "./host.mjs";
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Every family a reviewer slot can produce, rung names first.
|
|
24
|
+
*
|
|
25
|
+
* Derived from the review PANEL and triage slots, not from the rung ladder: a
|
|
26
|
+
* rung the ladder carries but no panel seats cannot author a finding, and
|
|
27
|
+
* accepting it would let the validator pass a reviewer that never ran.
|
|
28
|
+
*
|
|
29
|
+
* A slot naming a model whose id carries a rung name is that rung (one host
|
|
30
|
+
* seats its own build of the same tier). A slot naming anything else is its
|
|
31
|
+
* vendor, because on that host the tier distinction is carried by effort rather
|
|
32
|
+
* than by the model id.
|
|
33
|
+
*/
|
|
34
|
+
function buildFamilies(registry = REGISTRY, ids = HOST_IDS) {
|
|
35
|
+
const rungs = [];
|
|
36
|
+
const vendors = [];
|
|
37
|
+
for (const id of ids) {
|
|
38
|
+
const host = registry.hosts[id];
|
|
39
|
+
const ladder = Object.keys(host?.models?.rungs ?? {});
|
|
40
|
+
for (const slot of [...(host?.review?.panel ?? []), host?.review?.triage].filter(Boolean)) {
|
|
41
|
+
if (slot.rung) {
|
|
42
|
+
if (!rungs.includes(slot.rung)) rungs.push(slot.rung);
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
const model = String(slot.model ?? "").toLowerCase();
|
|
46
|
+
const named = ladder.find((rung) => model.includes(rung));
|
|
47
|
+
if (named) {
|
|
48
|
+
if (!rungs.includes(named)) rungs.push(named);
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
const prefix = /^([a-z]+)/.exec(model)?.[1];
|
|
52
|
+
if (prefix && !vendors.includes(prefix)) vendors.push(prefix);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return Object.freeze([...rungs, ...vendors.filter((v) => !rungs.includes(v))]);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** @type {ReadonlyArray<string>} */
|
|
59
|
+
export const FAMILIES = buildFamilies();
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* The reviewer family a model name belongs to, or null when none matches.
|
|
63
|
+
*
|
|
64
|
+
* @param {unknown} model
|
|
65
|
+
* @returns {string|null}
|
|
66
|
+
*/
|
|
67
|
+
export function familyOf(model) {
|
|
68
|
+
const m = String(model ?? "").toLowerCase();
|
|
69
|
+
return FAMILIES.find((f) => m.includes(f)) ?? null;
|
|
70
|
+
}
|