@vectorize-io/hindsight-coding-agents 0.5.1 → 0.5.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.
Files changed (50) hide show
  1. package/README.md +84 -9
  2. package/dist/antigravity-hook.js +424 -81
  3. package/dist/antigravity-statusline.js +56 -11
  4. package/dist/antigravity-stop-hook.js +515 -134
  5. package/dist/claude-hook.js +424 -81
  6. package/dist/claude-sessionstart-hook.js +392 -98
  7. package/dist/claude-stop-hook.js +515 -134
  8. package/dist/cline.js +218 -73
  9. package/dist/codex-hook.js +424 -81
  10. package/dist/codex-sessionstart-hook.js +392 -98
  11. package/dist/codex-stop-hook.js +515 -134
  12. package/dist/copilot-hook.js +424 -81
  13. package/dist/copilot-sessionstart-hook.js +392 -98
  14. package/dist/copilot-stop-hook.js +515 -134
  15. package/dist/cursor-hook.js +424 -81
  16. package/dist/cursor-sessionstart-hook.js +392 -98
  17. package/dist/cursor-stop-hook.js +515 -134
  18. package/dist/daemon-start.js +50 -9
  19. package/dist/dcode-hook.js +424 -81
  20. package/dist/dcode-sessionstart-hook.js +392 -98
  21. package/dist/dcode-stop-hook.js +515 -134
  22. package/dist/deepen.js +164 -27
  23. package/dist/devin-hook.js +424 -81
  24. package/dist/devin-sessionstart-hook.js +392 -98
  25. package/dist/devin-stop-hook.js +515 -134
  26. package/dist/droid-hook.js +2920 -0
  27. package/dist/droid-sessionstart-hook.js +3487 -0
  28. package/dist/droid-stop-hook.js +3188 -0
  29. package/dist/dsh.js +260 -109
  30. package/dist/grok-hook.js +424 -81
  31. package/dist/grok-sessionstart-hook.js +392 -98
  32. package/dist/grok-stop-hook.js +515 -134
  33. package/dist/hindsight-seed.js +56 -11
  34. package/dist/index.js +257 -110
  35. package/dist/installer.js +530 -223
  36. package/dist/kilo.js +257 -110
  37. package/dist/mcp-server.js +537 -146
  38. package/dist/opencode2.js +257 -110
  39. package/dist/pi.js +256 -109
  40. package/dist/prime-agent.js +256 -109
  41. package/dist/qwen-hook.js +424 -81
  42. package/dist/qwen-sessionstart-hook.js +392 -98
  43. package/dist/qwen-stop-hook.js +515 -134
  44. package/dist/status.js +128 -20
  45. package/dist/zcode-hook.js +2920 -0
  46. package/dist/zcode-sessionstart-hook.js +3487 -0
  47. package/dist/zcode-stop-hook.js +3188 -0
  48. package/package.json +11 -5
  49. package/plugin.json +1 -1
  50. package/skill/SKILL.md +42 -8
package/dist/deepen.js CHANGED
@@ -293,9 +293,13 @@ function isOptedIn(config, directory) {
293
293
  const pathMap = config.mapPathToBank;
294
294
  return Boolean(pathMap && directories.some((candidate) => mapLookup(pathMap, candidate)));
295
295
  }
296
- function deriveBankId(config, directory, harness = "coding", sessionRoot) {
296
+ function mappedBank(config, directory, sessionRoot) {
297
297
  const pathMap = config.mapPathToBank;
298
- const mapped = directory && pathMap ? lookupDirectories(config, directory, sessionRoot).map((candidate) => mapLookup(pathMap, candidate)).find((bank) => bank !== void 0) : void 0;
298
+ if (!directory || !pathMap) return void 0;
299
+ return lookupDirectories(config, directory, sessionRoot).map((candidate) => mapLookup(pathMap, candidate)).find((bank) => bank !== void 0);
300
+ }
301
+ function deriveBankId(config, directory, harness = "coding", sessionRoot) {
302
+ const mapped = mappedBank(config, directory, sessionRoot);
299
303
  if (mapped) return mapped;
300
304
  const dynamic = config.dynamicBankId ?? !config.bankId;
301
305
  if (!dynamic) return config.bankId || DEFAULT_BANK_NAME;
@@ -308,6 +312,19 @@ function deriveBankId(config, directory, harness = "coding", sessionRoot) {
308
312
  };
309
313
  return applyTemplate(config.bankIdTemplate || DEFAULT_TEMPLATE, resolvers, "bankIdTemplate");
310
314
  }
315
+ function bankProjectName(config, directory, sessionRoot) {
316
+ if (mappedBank(config, directory, sessionRoot)) return void 0;
317
+ const dynamic = config.dynamicBankId ?? !config.bankId;
318
+ if (!dynamic) return void 0;
319
+ const template = config.bankIdTemplate || DEFAULT_TEMPLATE;
320
+ if (!template.includes("{gitProject}")) return void 0;
321
+ try {
322
+ return gitProjectName(directory, config.resolveWorktrees ?? true, sessionRoot);
323
+ } catch (error) {
324
+ if (error instanceof BankResolutionError) return void 0;
325
+ throw error;
326
+ }
327
+ }
311
328
  function deriveBankIdOrSkip(config, directory, harness = "coding", sessionRoot) {
312
329
  try {
313
330
  return deriveBankId(config, directory, harness, sessionRoot);
@@ -323,6 +340,7 @@ function deriveBankIdOrSkip(config, directory, harness = "coding", sessionRoot)
323
340
  }
324
341
 
325
342
  // src/core/missions.ts
343
+ import { createHash } from "crypto";
326
344
  var GIT_MISSION = "You are ingesting a single git commit: its message and its full diff. Extract the concrete technical DECISION and the CAUSE/INVARIANT it encodes, bound to the specific code entities (functions, methods, files) and behaviors it changes. Preserve exact identifiers, paths, and literal values verbatim. Preserve the 'REF-ID: <token>' marker verbatim in every fact. Capture both WHAT changed and WHY. Issue/PR references (#123, GH-123, PROJ-123) are load-bearing: keep them VERBATIM in the fact text and emit each as an ENTITY, so a later question about that issue or PR retrieves this decision.";
327
345
  var GITLOG_MISSION = "You are ingesting an aggregated block of git commit MESSAGES ONLY (no diffs) \u2014 the project's recent commit-message history, newest first. Extract the project's INITIATIVES, FEATURES, ENHANCEMENTS, and notable changes or THEMES over time \u2014 what the project has been working on and how it has evolved. Do NOT extract per-line code detail (there is no diff to draw it from). Group related commits into a coherent initiative/theme where the messages make that clear; preserve exact identifiers and literal values verbatim when quoting a subject line. Keep issue/PR references (#123, GH-123) VERBATIM and emit each as an ENTITY \u2014 they are how future sessions will ask about this work.";
328
346
  var CONVERSATION_MISSION = `You are ingesting a developer conversation as a JSONL transcript (one {role, content} turn per line): the user's requests, the assistant's narration, and compact 'action' turns naming each tool use and its target (e.g. "Edit boltons/strutils.py") with no arguments or outputs. It may be a SHORT decision chat or a LONG working session \u2014 scale the facts to the substance, never to the message count. Extract the FEWEST facts that capture the OUTCOME: the settled DECISIONS and their exact rules/values (quote literals VERBATIM); concrete CHANGES to specific code entities; problems and how they were resolved; conventions or invariants established; at most one fact for a notable REJECTED alternative ('initially proposed X, changed to Y because Z'). A short decision chat usually yields 1-2 facts; a substantial working session several. CRITICAL: a conversation REVISES itself \u2014 record ONLY the FINAL state as what is in effect; a superseded proposal appears ONLY inside the rejected fact, NEVER as its own 'decided' fact; if the same setting changes several times keep only the LAST, and make unmistakably clear which choice WON. Do NOT emit one fact per message, per intermediate proposal, or per action turn. Keep issue/PR references (#123, GH-123) VERBATIM and emit each as an ENTITY. Preserve the 'REF-ID: <token>' marker verbatim in every fact. Do not invent; capture only what was actually settled.`;
@@ -434,17 +452,77 @@ function pagesFor(project) {
434
452
  var PAGE_MAX_TOKENS = 4096;
435
453
  var PAGE_TAGS_MATCH = "all";
436
454
  var PAGE_FACT_TYPES = ["world", "experience", "observation"];
455
+ var DEFAULT_PAGE_TRIGGER_CRON = "H * * * *";
456
+ var CRON_FIELD_RANGES = [
457
+ [0, 59],
458
+ // minute
459
+ [0, 23],
460
+ // hour
461
+ [1, 31],
462
+ // day of month
463
+ [1, 12],
464
+ // month
465
+ [0, 6]
466
+ // day of week
467
+ ];
468
+ var HASHED_FIELD = /^H(?:\((\d+)-(\d+)\))?$/;
469
+ function isHashedCron(cron) {
470
+ return /(^|\s)H/.test(cron);
471
+ }
472
+ function parseHashedCron(cron) {
473
+ const fields = cron.trim().split(/\s+/);
474
+ if (fields.length !== CRON_FIELD_RANGES.length) return void 0;
475
+ for (const [i, field] of fields.entries()) {
476
+ if (!field.startsWith("H")) continue;
477
+ const m = HASHED_FIELD.exec(field);
478
+ if (!m) return void 0;
479
+ if (m[1] === void 0) continue;
480
+ const [lo, hi] = [Number(m[1]), Number(m[2])];
481
+ const [min, max] = CRON_FIELD_RANGES[i];
482
+ if (lo > hi || lo < min || hi > max) return void 0;
483
+ }
484
+ return fields;
485
+ }
486
+ function hashedValue(seed, field, lo, hi) {
487
+ const digest = createHash("sha256").update(`${seed}\0${field}`).digest();
488
+ return lo + digest.readUInt32BE(0) % (hi - lo + 1);
489
+ }
490
+ function expandCronHash(cron, seed) {
491
+ if (!isHashedCron(cron)) return cron;
492
+ const fields = parseHashedCron(cron);
493
+ if (!fields) return cron;
494
+ return fields.map((field, i) => {
495
+ const m = HASHED_FIELD.exec(field);
496
+ if (!m) return field;
497
+ const [lo, hi] = m[1] === void 0 ? CRON_FIELD_RANGES[i] : [Number(m[1]), Number(m[2])];
498
+ return String(hashedValue(seed, i, lo, hi));
499
+ }).join(" ");
500
+ }
501
+ function pageTriggerFor(trigger, bank, page) {
502
+ const cron = trigger.refresh_cron;
503
+ if (!cron || !isHashedCron(cron)) return trigger;
504
+ return { ...trigger, refresh_cron: expandCronHash(cron, `${bank}\0${page}`) };
505
+ }
437
506
  function buildPageTrigger(cfg2 = {}) {
438
507
  const base = { fact_types: PAGE_FACT_TYPES, tags_match: PAGE_TAGS_MATCH };
439
508
  switch (cfg2.pageTriggerType) {
440
- case "cron":
441
- return { ...base, refresh_cron: cfg2.pageTriggerCron };
509
+ case "auto-refresh":
510
+ return { ...base, refresh_after_consolidation: true };
442
511
  case "manual":
443
512
  return { ...base, refresh_after_consolidation: false };
513
+ // "cron" and an unset type alike: the default schedule stands in for a missing expression, so
514
+ // a trigger built from a partial config is never a cron trigger with nothing to fire on.
444
515
  default:
445
- return { ...base, refresh_after_consolidation: true };
516
+ return { ...base, refresh_cron: cfg2.pageTriggerCron || DEFAULT_PAGE_TRIGGER_CRON };
446
517
  }
447
518
  }
519
+ function pageTriggerDrifted(current2, desired) {
520
+ return current2.tags_match !== desired.tags_match || (current2.refresh_cron ?? null) !== (desired.refresh_cron ?? null) || Boolean(current2.refresh_after_consolidation) !== Boolean(desired.refresh_after_consolidation);
521
+ }
522
+ function pageTriggerPatch(desired) {
523
+ if (desired.refresh_after_consolidation === false) return { ...desired, refresh_cron: null };
524
+ return desired;
525
+ }
448
526
  var CODING_BANK_TEMPLATE = {
449
527
  version: "1",
450
528
  bank: {
@@ -968,7 +1046,9 @@ var HindsightClient = class {
968
1046
  source_query: page.source_query,
969
1047
  tags: page.tags,
970
1048
  max_tokens: PAGE_MAX_TOKENS,
971
- trigger: pageTrigger
1049
+ // Resolved HERE, not in `buildPageTrigger`: a hashed cron (`H`) needs the page's identity,
1050
+ // and one trigger is built per session for all of them.
1051
+ trigger: pageTriggerFor(pageTrigger, this.bank, page.name)
972
1052
  };
973
1053
  if (!hit) {
974
1054
  const r = await this.req("POST", this.bankUrl("/knowledge-base/pages"), body, [409]);
@@ -982,14 +1062,14 @@ var HindsightClient = class {
982
1062
  if (r.status !== 409) created++;
983
1063
  } else {
984
1064
  const sourceDrift = hit.description !== page.source_query;
985
- const triggerDrift = hit.trigger != null && hit.trigger.tags_match !== pageTrigger.tags_match;
1065
+ const triggerDrift = hit.trigger != null && pageTriggerDrifted(hit.trigger, body.trigger);
986
1066
  if (!sourceDrift && !triggerDrift) continue;
987
1067
  const patch = {};
988
1068
  if (sourceDrift) {
989
1069
  patch.source_query = page.source_query;
990
1070
  patch.tags = page.tags;
991
1071
  }
992
- if (triggerDrift) patch.trigger = pageTrigger;
1072
+ if (triggerDrift) patch.trigger = pageTriggerPatch(body.trigger);
993
1073
  const r = await this.req(
994
1074
  "PATCH",
995
1075
  this.bankUrl(`/knowledge-base/nodes/${encodeURIComponent(hit.id)}`),
@@ -1005,10 +1085,42 @@ var HindsightClient = class {
1005
1085
  updated++;
1006
1086
  }
1007
1087
  }
1088
+ const initiatives = await this.resyncInitiativeTriggers(roots, pageTrigger);
1008
1089
  this.log(
1009
- `[bank] knowledge pages seeded on ${this.bank}: ${created} created, ${updated} re-synced, ${pages.length - created - updated} unchanged`
1090
+ `[bank] knowledge pages seeded on ${this.bank} (scoped to ${this.project ?? this.bank}): ${created} created, ${updated} re-synced, ${pages.length - created - updated} unchanged` + (initiatives ? `, ${initiatives} initiative pages re-synced` : "")
1010
1091
  );
1011
1092
  }
1093
+ /**
1094
+ * Bring the captured initiative pages onto the same refresh policy as the seeded taxonomy.
1095
+ *
1096
+ * `captureInitiative` stamps this very trigger when it creates a page, so on a bank seeded under
1097
+ * an older default they are the same drift as the taxonomy — and on a real repo they are most of
1098
+ * it: five taxonomy pages against one page per initiative, each an LLM synthesis per
1099
+ * consolidation under the auto-refresh that used to be the default (#3506).
1100
+ *
1101
+ * Only the trigger is touched. Their `name` and `source_query` are written once, from the
1102
+ * initiative's own title, and re-stating either would rebuild a page whose question never
1103
+ * changed. The tree read above is reused rather than re-fetched.
1104
+ */
1105
+ async resyncInitiativeTriggers(roots, pageTrigger) {
1106
+ const folder = roots.find(
1107
+ (n) => n.kind === "folder" && (n.name || "").toLowerCase() === "initiatives"
1108
+ );
1109
+ let updated = 0;
1110
+ for (const page of folder?.children ?? []) {
1111
+ if (page.kind !== "page" || page.trigger == null) continue;
1112
+ const desired = pageTriggerFor(pageTrigger, this.bank, page.name);
1113
+ if (!pageTriggerDrifted(page.trigger, desired)) continue;
1114
+ const r = await this.req(
1115
+ "PATCH",
1116
+ this.bankUrl(`/knowledge-base/nodes/${encodeURIComponent(page.id)}`),
1117
+ { trigger: pageTriggerPatch(desired) }
1118
+ );
1119
+ if ([404, 405, 501].includes(r.status)) break;
1120
+ updated++;
1121
+ }
1122
+ return updated;
1123
+ }
1012
1124
  /** URL/id-safe slug: lowercase, non-alphanumerics → "-", trim dashes, cap length; fallback "initiative". */
1013
1125
  slugify(s) {
1014
1126
  return s.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 60) || "initiative";
@@ -1030,12 +1142,14 @@ var HindsightClient = class {
1030
1142
  let pageId = args.relatesToPageId;
1031
1143
  if (!pageId) {
1032
1144
  const folderId = await this.ensureFolder("Initiatives");
1145
+ const subject = this.project ?? this.bank;
1033
1146
  const r = await this.req("POST", this.bankUrl("/knowledge-base/pages"), {
1034
1147
  name: args.title,
1035
- source_query: `Summarize the "${args.title}" initiative: what is being built or changed and why, and its current state \u2014 drawn from the project's memory.`,
1148
+ source_query: `Summarize the "${args.title}" initiative: what is being built or changed and why, and its current state \u2014 drawn from the project's memory.` + pageScopeRule(subject),
1036
1149
  parent_id: folderId,
1037
1150
  tags: ["knowledge:feature-work"],
1038
- trigger: args.pageTrigger ?? buildPageTrigger()
1151
+ max_tokens: PAGE_MAX_TOKENS,
1152
+ trigger: pageTriggerFor(args.pageTrigger ?? buildPageTrigger(), this.bank, args.title)
1039
1153
  });
1040
1154
  try {
1041
1155
  const j = await r.json();
@@ -1074,10 +1188,12 @@ var HindsightClient = class {
1074
1188
  };
1075
1189
 
1076
1190
  // src/core/retain-cursor.ts
1077
- import { createHash } from "crypto";
1191
+ import { createHash as createHash2 } from "crypto";
1192
+ var PENDING_MAX_AGE_MS = 12 * 60 * 60 * 1e3;
1193
+ var PENDING_MAX_BYTES = 256 * 1024;
1078
1194
 
1079
1195
  // src/core/uuid.ts
1080
- import { createHash as createHash2 } from "crypto";
1196
+ import { createHash as createHash3 } from "crypto";
1081
1197
 
1082
1198
  // src/core/chat.ts
1083
1199
  function withRefId(refId, turns, baseTs) {
@@ -1151,16 +1267,22 @@ var DEFAULT_SEED_LIMIT = 300;
1151
1267
  var CONFIG_PATH = process.env.HINDSIGHT_CONFIG || join6(homedir2(), ".hindsight", "coding-agent.json");
1152
1268
  var DEFAULT_DAEMON_PORT = 9077;
1153
1269
  var DEFAULT_DAEMON_PROFILE = "coding-agent";
1154
- function resolvePageTriggerType(raw) {
1155
- if (raw.pageTriggerType === "manual") return "manual";
1156
- if (raw.pageTriggerType === "cron") {
1157
- if (raw.pageTriggerCron?.trim()) return "cron";
1270
+ function resolvePageTrigger(raw) {
1271
+ if (raw.pageTriggerType === "manual") return { type: "manual" };
1272
+ if (raw.pageTriggerType === "auto-refresh") return { type: "auto-refresh" };
1273
+ if (raw.pageTriggerType !== void 0 && raw.pageTriggerType !== "cron")
1158
1274
  log.warn(
1159
1275
  "config",
1160
- 'pageTriggerType "cron" needs pageTriggerCron (UTC 5-field, e.g. "0 3 * * *") \u2014 falling back to "auto-refresh"'
1276
+ `ignoring pageTriggerType=${JSON.stringify(raw.pageTriggerType)} \u2014 expected cron|auto-refresh|manual`
1161
1277
  );
1162
- }
1163
- return "auto-refresh";
1278
+ const cron = raw.pageTriggerCron?.trim();
1279
+ if (!cron) return { type: "cron", cron: DEFAULT_PAGE_TRIGGER_CRON };
1280
+ if (!isHashedCron(cron) || parseHashedCron(cron)) return { type: "cron", cron };
1281
+ log.warn(
1282
+ "config",
1283
+ `pageTriggerCron ${JSON.stringify(cron)} has a malformed hashed field \u2014 write \`H\` or \`H(<lo>-<hi>)\` within the field's own range, e.g. "H H(0-5) * * *" \u2014 falling back to ${JSON.stringify(DEFAULT_PAGE_TRIGGER_CRON)}`
1284
+ );
1285
+ return { type: "cron", cron: DEFAULT_PAGE_TRIGGER_CRON };
1164
1286
  }
1165
1287
  var DEFAULT_REFLECT_TOOL_TIMEOUT_MS = 33e4;
1166
1288
  var REFLECT_BUDGETS = ["low", "mid", "high"];
@@ -1192,6 +1314,7 @@ function resolveObservationScopes(raw) {
1192
1314
  function resolveConfig(raw = {}) {
1193
1315
  const serverMode = ["cloud", "self-hosted", "daemon"].includes(raw.serverMode) ? raw.serverMode : "cloud";
1194
1316
  const apiPort = raw.apiPort || DEFAULT_DAEMON_PORT;
1317
+ const pageTrigger = resolvePageTrigger(raw);
1195
1318
  return {
1196
1319
  serverMode,
1197
1320
  // Daemon mode resolves the URL HERE rather than at each call site: every entry point already
@@ -1226,8 +1349,8 @@ function resolveConfig(raw = {}) {
1226
1349
  reflectBudget: resolveReflectBudget(raw),
1227
1350
  autoReflect: raw.autoReflect ?? true,
1228
1351
  pageRefreshEveryTurns: raw.pageRefreshEveryTurns || 10,
1229
- pageTriggerType: resolvePageTriggerType(raw),
1230
- pageTriggerCron: raw.pageTriggerCron?.trim() || void 0,
1352
+ pageTriggerType: pageTrigger.type,
1353
+ pageTriggerCron: pageTrigger.cron,
1231
1354
  autoSeed: raw.autoSeed ?? true,
1232
1355
  seedLimit: raw.seedLimit || DEFAULT_SEED_LIMIT,
1233
1356
  codebaseSurvey: raw.codebaseSurvey ?? true,
@@ -1615,7 +1738,13 @@ var HARNESS_NAMES = [
1615
1738
  "devin-cli",
1616
1739
  "copilot-cli",
1617
1740
  "grok-build",
1618
- "qwen-code"
1741
+ "qwen-code",
1742
+ // Factory Droid is a per-prompt HOOK host: the installer wires ~/.factory/hooks.json and the
1743
+ // stdio MCP registration in ~/.factory/mcp.json (see src/installer.ts).
1744
+ "factory-droid",
1745
+ // ZCode is a per-prompt HOOK host too, registered in its own CLI config
1746
+ // (~/.zcode/cli/config.json) under `hooks.events` — never the user's real Claude Code settings.
1747
+ "zcode"
1619
1748
  ];
1620
1749
  var HOOK_BINS = {
1621
1750
  "claude-code": "hindsight-claude-hook",
@@ -1626,7 +1755,9 @@ var HOOK_BINS = {
1626
1755
  "devin-cli": "hindsight-devin-hook",
1627
1756
  "copilot-cli": "hindsight-copilot-hook",
1628
1757
  "grok-build": "hindsight-grok-hook",
1629
- "qwen-code": "hindsight-qwen-hook"
1758
+ "qwen-code": "hindsight-qwen-hook",
1759
+ "factory-droid": "hindsight-droid-hook",
1760
+ zcode: "hindsight-zcode-hook"
1630
1761
  // more hook harnesses: add a HookSpec entry point (see src/cursor-hook.ts) + a registration here.
1631
1762
  };
1632
1763
  var PLUGIN_ENTRYPOINTS = {
@@ -1722,6 +1853,7 @@ if (cfg.disabled) {
1722
1853
  process.exit(0);
1723
1854
  }
1724
1855
  var HARNESS = arg("harness") ?? cfg0.harness;
1856
+ var PAGE_PROJECT = REPO && resolved0.bankId === BANK ? bankProjectName(cfg, REPO) : void 0;
1725
1857
  var API_URL = arg("api-url") ?? cfg.apiUrl;
1726
1858
  var API_TOKEN = arg("api-token") ?? cfg.apiToken;
1727
1859
  var CONV = arg("conversations");
@@ -1779,9 +1911,14 @@ async function main() {
1779
1911
  apiToken: API_TOKEN,
1780
1912
  bank: FINAL_BANK,
1781
1913
  // Names the repository in every seeded page's query, so page synthesis can tell this
1782
- // project's decisions from those of a dependency it merely discusses (#3476). Same
1783
- // worktree-aware name the gitlog document id uses, so all worktrees agree on it.
1784
- project: repoNameOf(REPO),
1914
+ // project's decisions from those of a dependency it merely discusses (#3476).
1915
+ //
1916
+ // A property of the BANK, not of this run's cwd: the query is PATCHed onto pages that
1917
+ // outlive the session, so a bank several repos share must not be told it is whichever one
1918
+ // ran last (#4146). `bankProjectName` answers only when the bank IS this repo's; the
1919
+ // `banks.<id>.bank` rename below it can point many repos at one destination, so a renamed
1920
+ // bank is not this repo's either. Undefined leaves the client to fall back to the bank id.
1921
+ project: PAGE_PROJECT,
1785
1922
  maxParallelRetains: cfg.maxParallelRetains,
1786
1923
  observationScopes: cfg.observationScopes,
1787
1924
  log: log2