copilot-operator 0.1.94 → 0.1.96

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 (60) hide show
  1. package/dist/src/api/operator.controller.js +5 -1
  2. package/dist/src/api/operator.service.js +272 -50
  3. package/dist/src/config/live.js +12 -12
  4. package/dist/src/orchestrator/kerriganRunner.js +11 -4
  5. package/dist/src/orchestrator/leadRunner.js +76 -23
  6. package/dist/src/orchestrator/review.js +6 -2
  7. package/dist/src/orchestrator/subtaskRetry.js +2 -1
  8. package/dist/src/orchestrator/taskRunner.js +75 -16
  9. package/dist/src/plan/kerrigan.js +4 -4
  10. package/dist/src/plan/systemGuide.js +12 -12
  11. package/dist/src/queue/queue.js +12 -0
  12. package/dist/src/queue/queueBranch.js +34 -9
  13. package/dist/src/session/store.js +9 -0
  14. package/dist/src/session/workspace.js +3 -2
  15. package/dist/src/transport/copilotTransport.js +83 -68
  16. package/dist/src/transport/keptWindow.js +17 -14
  17. package/dist/src/vcs/newBranch.js +23 -0
  18. package/dist/src/vcs/referenceGuard.js +16 -2
  19. package/dist/web/404.html +2 -2
  20. package/dist/web/_next/static/chunks/1024-214ded25b9048526.js +1 -0
  21. package/dist/web/_next/static/chunks/1077.161de82f740d47f0.js +1 -0
  22. package/dist/web/_next/static/chunks/1548.f2688468bf946e13.js +1 -0
  23. package/dist/web/_next/static/chunks/2163.b8ada3b7bde69f03.js +1 -0
  24. package/dist/web/_next/static/chunks/714.d1489788e598833b.js +1 -0
  25. package/dist/web/_next/static/chunks/7220.b85c8d105f394389.js +1 -0
  26. package/dist/web/_next/static/chunks/7921-00ebbcc6f65fbe35.js +1 -0
  27. package/dist/web/_next/static/chunks/8584.a678bfced1cea938.js +1 -0
  28. package/dist/web/_next/static/chunks/9067.6da03ae052877b19.js +1 -0
  29. package/dist/web/_next/static/chunks/9747.ba29e64e97e8a15b.js +1 -0
  30. package/dist/web/_next/static/chunks/app/{layout-1b7d13f7b2efd008.js → layout-2364903896c2c175.js} +1 -1
  31. package/dist/web/_next/static/chunks/app/page-d031bf326e401246.js +1 -0
  32. package/dist/web/_next/static/chunks/app/queue/page-9cfc8f78d536cfb6.js +1 -0
  33. package/dist/web/_next/static/chunks/app/settings/page-9c2b961beb8b3dce.js +1 -0
  34. package/dist/web/_next/static/chunks/{webpack-91b2de9c3da6f8b9.js → webpack-3f144d13be3516c2.js} +1 -1
  35. package/dist/web/defaults.html +2 -2
  36. package/dist/web/defaults.txt +7 -7
  37. package/dist/web/index.html +3 -3
  38. package/dist/web/index.txt +8 -8
  39. package/dist/web/queue.html +2 -2
  40. package/dist/web/queue.txt +8 -8
  41. package/dist/web/settings.html +2 -2
  42. package/dist/web/settings.txt +8 -8
  43. package/dist/web/system.html +2 -2
  44. package/dist/web/system.txt +8 -8
  45. package/package.json +1 -1
  46. package/dist/web/_next/static/chunks/1024-dee283a1ddf295bf.js +0 -1
  47. package/dist/web/_next/static/chunks/1077.b7df9cb8ca810075.js +0 -1
  48. package/dist/web/_next/static/chunks/1548.417c17b63c371f00.js +0 -1
  49. package/dist/web/_next/static/chunks/2163.469367b8fbcc862d.js +0 -1
  50. package/dist/web/_next/static/chunks/714.72112704f3cb8127.js +0 -1
  51. package/dist/web/_next/static/chunks/7220.8bd897c7ddfee701.js +0 -1
  52. package/dist/web/_next/static/chunks/7921-25d1755799107ea7.js +0 -1
  53. package/dist/web/_next/static/chunks/8584.f87df7324303ab75.js +0 -1
  54. package/dist/web/_next/static/chunks/9067.67a7c7cf3b019b5c.js +0 -1
  55. package/dist/web/_next/static/chunks/9747.a87dbd4acd45e39d.js +0 -1
  56. package/dist/web/_next/static/chunks/app/page-7eae1e8848525e1d.js +0 -1
  57. package/dist/web/_next/static/chunks/app/queue/page-7909ba7c9e3d4c2d.js +0 -1
  58. package/dist/web/_next/static/chunks/app/settings/page-c92548f9c6318962.js +0 -1
  59. /package/dist/web/_next/static/{UNygvDtRnBVZrGJt53IE4 → kNfJ9jSwlboc-1sFBBfuI}/_buildManifest.js +0 -0
  60. /package/dist/web/_next/static/{UNygvDtRnBVZrGJt53IE4 → kNfJ9jSwlboc-1sFBBfuI}/_ssgManifest.js +0 -0
@@ -28,7 +28,7 @@ import { chosenHome, defaultHome, installLayout } from '../config/layout.js';
28
28
  import { chooseHome, homeRefusal, movedFrom } from '../config/home.js';
29
29
  import { SessionStore, DEFAULT_VCS, DEFAULT_REVIEW, writeFileAtomically } from '../session/store.js';
30
30
  import { checkItems, emptyQueue, itemTitle, mergeItems, nextStep, parkAfterMs, parkedAnswerFrom, skippedBecause, statusOfTask, waitsByHand, MAX_PARK_AFTER_SEC, PARKED_WORDS } from '../queue/queue.js';
31
- import { branchStart, makeQueueBranch, refreshQueueBranch } from '../queue/queueBranch.js';
31
+ import { branchStart, madeFromRemote, makeQueueBranch, refreshQueueBranch } from '../queue/queueBranch.js';
32
32
  import { EventBus } from '../session/events.js';
33
33
  import { isContinuable, MAX_INSTRUCTION_CHARS, newId, withProblemAt } from '../session/model.js';
34
34
  import { handoffOutcomeOf, handoffResultMessage } from '../orchestrator/handoff.js';
@@ -73,6 +73,17 @@ function sameFolder(a, b) {
73
73
  const norm = (p) => p.trim().replace(/[\\/]+$/, '').replace(/\//g, '\\').toLowerCase();
74
74
  return a.trim() !== '' && norm(a) === norm(b);
75
75
  }
76
+ /** Why a queue's task waits to carry on, in its own chat, at the queue's next run (2026-11-18). */
77
+ const CARRIES_ON_AFTER = (what) => `${what}; it carries on from where it stopped, in its own chat, when the queue is run again`;
78
+ /** A card answered after it went: by Kerrigan, another tab, or its work having ended (2026-11-18). */
79
+ export const CARD_GONE = 'That card is not waiting any more: it was answered, or its work ended.';
80
+ /** "Run this and the rest" where the run may not go on unasked: said, and the card kept (2026-11-18). */
81
+ export const RUN_ALL_REFUSED = (why) => `"Run this and the rest" cannot be given here — ${why} Nothing was run: "Run" runs this step.`;
82
+ /** Whether a folder is another, or inside it: Windows paths, as `sameFolder` reads them. */
83
+ function folderInside(inner, outer) {
84
+ const norm = (p) => p.trim().replace(/[\\/]+$/, '').replace(/\//g, '\\').toLowerCase();
85
+ return inner.trim() !== '' && outer.trim() !== '' && (norm(inner) === norm(outer) || norm(inner).startsWith(`${norm(outer)}\\`));
86
+ }
76
87
  import { saveWorkspaceFile, workspaceFile, workspaceFiles, workspaceInfo, workspaceRaw } from '../session/workspace.js';
77
88
  import { searchWorkspace } from '../session/workspaceSearch.js';
78
89
  import { restoreCheckpoint } from '../session/checkpoint.js';
@@ -98,10 +109,11 @@ import { sessionRoots } from '../exec/confinement.js';
98
109
  import { dirtyPolicy } from '../vcs/snapshot.js';
99
110
  import { runVcsPreflight } from '../vcs/runPreflight.js';
100
111
  import { inputSettings, normalisePatterns } from '../vcs/inputs.js';
101
- import { createNewBranch, planNewBranch, setAsideUncommitted } from '../vcs/newBranch.js';
112
+ import { createNewBranch, planNewBranch, putBackAside, setAsideUncommitted } from '../vcs/newBranch.js';
102
113
  import { commitAsOperator, identityOf, pushAsOperator, setIdentity, stageFiles, TrustedHooks } from '../vcs/operatorGit.js';
103
114
  import { askpassProgram, closePasswordWindows } from '../vcs/remoteAuth.js';
104
115
  import { planApprovedMessage, planReviseMessage } from '../orchestrator/planMode.js';
116
+ import { leadPlanApproved, leadPlanRevise } from '../orchestrator/leadRunner.js';
105
117
  import { coveredByArtifacts } from '../vcs/artifacts.js';
106
118
  import { botVersion } from '../config/version.js';
107
119
  import { exportEntries, exportFileName as homeExportName, exportSizes } from '../config/exportHome.js';
@@ -220,6 +232,12 @@ let OperatorService = class OperatorService {
220
232
  * operator in another window): a worker's subtask is not the message.
221
233
  */
222
234
  lastOutcome = null;
235
+ /**
236
+ * The runs the operator stopped: their Stop, "Stop the queue", Stop or "Abort task" on a card (bug hunt 2026-11-18).
237
+ * Only such a stop is theirs and says nothing at the end ("Done" is not shown); a window closed past the times it is
238
+ * opened again, a conversation lost, the program closed, are said.
239
+ */
240
+ stoppedByOperator = new Set();
223
241
  /** Where Git asks the operator for a password now, in its own window (2026-10-26): the step waits for it. */
224
242
  passwordAsked = new Map();
225
243
  followsActing = this.bus.subscribe('*', (e) => {
@@ -260,8 +278,10 @@ let OperatorService = class OperatorService {
260
278
  for (const key of [`pw:${e.sessionId}`, `browser:sign-in-required:${e.sessionId}`, `browser:verification-required:${e.sessionId}`])
261
279
  this.holdOf(e.sessionId)?.waited(key);
262
280
  const status = e.data?.status;
263
- if (typeof status === 'string' && !this.workerLeads.has(e.sessionId))
264
- this.lastOutcome = { status, at: e.at, sessionId: e.sessionId };
281
+ if (typeof status === 'string' && !this.workerLeads.has(e.sessionId)) {
282
+ const byOperator = status === 'aborted' && this.stoppedByOperator.has(this.runKey(e.sessionId));
283
+ this.lastOutcome = { status, at: e.at, sessionId: e.sessionId, ...(byOperator ? { byOperator: true } : {}) };
284
+ }
265
285
  }
266
286
  });
267
287
  /**
@@ -414,7 +434,7 @@ let OperatorService = class OperatorService {
414
434
  await this.init();
415
435
  const all = await this.store.listSessions();
416
436
  // The pauses of the run going on, for the page to take them off the minutes it shows (2026-10-21).
417
- return all.map((s) => ({ ...s, running: this.running.has(s.id), paused: this.running.get(s.id)?.hold.held ?? false, ...this.pausesOf(s.id) }));
437
+ return all.map((s) => ({ ...s, running: this.running.has(s.id), paused: this.running.get(this.runKey(s.id))?.hold.held ?? false, ...this.pausesOf(s.id) }));
418
438
  }
419
439
  async getSession(id) {
420
440
  await this.init();
@@ -422,11 +442,15 @@ let OperatorService = class OperatorService {
422
442
  if (!s)
423
443
  return null;
424
444
  const pending = [...this.waiting.values()].filter((w) => w.approval.sessionId === id).map((w) => w.approval);
425
- return { ...s, running: this.running.has(id), paused: this.running.get(id)?.hold.held ?? false, ...this.pausesOf(id), pending, runMode: this.running.get(id)?.mode };
445
+ /*
446
+ * Held or not, as its run is: a chat Kerrigan directs is held with hers (bug hunt 2026-11-18: "Pause" there held her
447
+ * run, `pause` goes up the chain, but the chat read its own id, so the button never said "Continue").
448
+ */
449
+ return { ...s, running: this.running.has(id), paused: this.running.get(this.runKey(id))?.hold.held ?? false, ...this.pausesOf(id), pending, runMode: this.running.get(id)?.mode };
426
450
  }
427
451
  /** The pauses of the run going on in a session, from "Pause" to "Continue"; none when nothing runs or it was never paused. */
428
452
  pausesOf(id) {
429
- const pauses = this.running.get(id)?.hold.pauses ?? [];
453
+ const pauses = this.running.get(this.runKey(id))?.hold.pauses ?? [];
430
454
  return pauses.length > 0 ? { pauses } : {};
431
455
  }
432
456
  async updateSession(id, patch) {
@@ -1061,6 +1085,14 @@ let OperatorService = class OperatorService {
1061
1085
  const cfg = session.kind === 'chat' ? { ...loaded, execution: { ...loaded.execution, denyPatterns: chatDenyPatterns(loaded.execution.denyPatterns) } } : loaded;
1062
1086
  // The run's own settings; a save while it goes on changes them in place (`saveSettings`), and these rules with them.
1063
1087
  const runCfg = { ...cfg, execution: { ...cfg.execution, mode } };
1088
+ /*
1089
+ * A task of the queue (bug hunt 2026-11-18): nobody is there to choose a model by hand, so the model it names, or
1090
+ * Settings name, is chosen by the bot, whatever Settings say — "by hand" is on by default, and every task of the
1091
+ * queue waited on its model's card and was set aside. One with no model named is refused at "Run the queue"
1092
+ * (`queueWithoutModel`). The models are taken when a message starts, so a save under the run does not undo it.
1093
+ */
1094
+ if (session.queueItem)
1095
+ runCfg.copilot = { ...runCfg.copilot, manualModel: false, leadManualModel: false, reviewManualModel: false, kerriganManualModel: false };
1064
1096
  const live = new LiveSettings(runCfg, session.kind === 'chat', loaded);
1065
1097
  const policy = { mode, ...stepRules(runCfg) };
1066
1098
  /*
@@ -1090,6 +1122,7 @@ let OperatorService = class OperatorService {
1090
1122
  const startedAt = new Date().toISOString();
1091
1123
  const hold = new Hold();
1092
1124
  this.running.set(sessionId, { controller, startedAt, mode, policy, hold, live });
1125
+ this.stoppedByOperator.delete(sessionId);
1093
1126
  // Who was at work in a run of it that ended without saying so is not who is at work in this one.
1094
1127
  this.acting.delete(sessionId);
1095
1128
  {
@@ -1214,14 +1247,25 @@ let OperatorService = class OperatorService {
1214
1247
  }
1215
1248
  return tally;
1216
1249
  })
1217
- .finally(() => {
1250
+ .finally(async () => {
1218
1251
  for (const [id, w] of this.waiting) {
1219
1252
  if (this.runKey(w.approval.sessionId) === sessionId) {
1220
1253
  w.resolve({ action: 'abort', reason: 'the run ended' });
1221
1254
  this.waiting.delete(id);
1222
1255
  }
1223
1256
  }
1257
+ /*
1258
+ * A Stop that landed as the run ended (bug hunt 2026-11-18): the run had written "idle", and was only adding up
1259
+ * how it went, when `stop` wrote "stopping" over it, which nothing undid: the conversation read as working for
1260
+ * good — "Stopping…", Go back refused, New chat off — until the next message. Before the run is let go of, so no
1261
+ * other run of the session can have begun.
1262
+ */
1263
+ await this.store.updateSession(sessionId, (s) => {
1264
+ if (s.status === 'stopping')
1265
+ s.status = 'idle';
1266
+ }).catch(() => undefined);
1224
1267
  this.running.delete(sessionId);
1268
+ this.stoppedByOperator.delete(sessionId);
1225
1269
  });
1226
1270
  return { started: true, done };
1227
1271
  }
@@ -1279,12 +1323,14 @@ let OperatorService = class OperatorService {
1279
1323
  this.bus.publish({ sessionId, type: 'resume-asked', level: 'info', message: 'continued by the operator' });
1280
1324
  return { paused: false };
1281
1325
  }
1282
- async stop(asked) {
1326
+ async stop(asked, by = 'operator') {
1283
1327
  // A chat Kerrigan directs is stopped with her run (2026-11-12): it is one run.
1284
1328
  const sessionId = this.runKey(asked);
1285
1329
  const r = this.running.get(sessionId);
1286
1330
  if (!r)
1287
1331
  return { stopping: false };
1332
+ if (by === 'operator')
1333
+ this.stoppedByOperator.add(sessionId);
1288
1334
  r.controller.abort();
1289
1335
  for (const [id, w] of this.waiting) {
1290
1336
  if (this.runKey(w.approval.sessionId) === sessionId) {
@@ -1329,7 +1375,7 @@ let OperatorService = class OperatorService {
1329
1375
  // The queue still has its turn going, between one of its tasks and the next (2026-11-03): the work is not over.
1330
1376
  ...(this.queueLoop ? { queue: true } : {}),
1331
1377
  // How the last message ended, while nothing runs: what the tab says until the operator has looked.
1332
- ...(this.running.size === 0 && this.lastOutcome ? { last: { status: this.lastOutcome.status, at: this.lastOutcome.at } } : {}),
1378
+ ...(this.running.size === 0 && this.lastOutcome ? { last: { status: this.lastOutcome.status, at: this.lastOutcome.at, ...(this.lastOutcome.byOperator ? { byOperator: true } : {}) } } : {}),
1333
1379
  };
1334
1380
  }
1335
1381
  /**
@@ -1804,6 +1850,30 @@ let OperatorService = class OperatorService {
1804
1850
  this.queueTurn = done.catch(() => undefined);
1805
1851
  return done;
1806
1852
  }
1853
+ /**
1854
+ * Changes put aside before a task (2026-11-18): when they are the work of one task on "the folder as it is" that waits
1855
+ * to carry on — set aside at a card, stopped with the queue — on the branch they were left on, that task gets them back
1856
+ * when it carries on (`putBackAside`). Two such tasks there: whose is whose cannot be told, and they stay where they
1857
+ * were put, as said.
1858
+ */
1859
+ async leftoversOf(onBranch, except, saved) {
1860
+ if (!onBranch)
1861
+ return;
1862
+ const q = await this.readQueue();
1863
+ const owners = [];
1864
+ for (const x of q.items) {
1865
+ if (x.id === except || x.branch !== 'folder' || !x.sessionId || !(x.status === 'parked' || (x.status === 'waiting' && x.resume)))
1866
+ continue;
1867
+ const s = await this.store.getSession(x.sessionId);
1868
+ const t = s?.tasks.find((k) => k.parked && !k.parked.answer) ?? s?.tasks.at(-1);
1869
+ if (s && !s.vcs?.enabled && t?.checkpoint?.branch === onBranch)
1870
+ owners.push(x.id);
1871
+ }
1872
+ if (owners.length !== 1)
1873
+ return;
1874
+ const owner = owners[0];
1875
+ await this.changeQueue((x) => this.setQueueItem(x, owner, { setAside: [...(x.items.find((i) => i.id === owner)?.setAside ?? []), saved] }));
1876
+ }
1807
1877
  setQueueItem(q, id, patch) {
1808
1878
  const item = q.items.find((x) => x.id === id);
1809
1879
  if (!item)
@@ -1827,8 +1897,15 @@ let OperatorService = class OperatorService {
1827
1897
  await this.changeQueue((x) => {
1828
1898
  x.running = false;
1829
1899
  for (const item of x.items) {
1830
- if (item.status === 'running')
1831
- Object.assign(item, { status: 'stopped', why: 'the bot was closed while it ran', endedAt: new Date().toISOString() });
1900
+ /*
1901
+ * It carries on, in its own chat, when the queue is run again (bug hunt 2026-11-18): marked stopped, every task
1902
+ * that depends on it was skipped at the next run, and only "Run again", which starts it over, was left.
1903
+ */
1904
+ if (item.status === 'running') {
1905
+ Object.assign(item, item.sessionId
1906
+ ? { status: 'waiting', resume: true, why: CARRIES_ON_AFTER('the bot was closed while it ran'), endedAt: new Date().toISOString() }
1907
+ : { status: 'waiting', why: undefined });
1908
+ }
1832
1909
  }
1833
1910
  });
1834
1911
  }
@@ -1861,7 +1938,17 @@ let OperatorService = class OperatorService {
1861
1938
  throw new Error(checked.problem);
1862
1939
  // A skill is one of Settings' (2026-10-25); whether it is for the folder is said when the task runs, in its chat.
1863
1940
  const { skills } = await this.skills();
1864
- const unknown = checked.items.findIndex((x) => x.skill && !skills.some((k) => k.name === x.skill));
1941
+ /*
1942
+ * Only a task that will run with it (bug hunt 2026-11-18): one done, failed or skipped with a skill taken out of
1943
+ * Settings since blocked every edit of the queue, and cannot itself be edited. A new one, one whose skill changes,
1944
+ * and one that waits or is put back to wait are held to Settings' skills.
1945
+ */
1946
+ const before = new Map((await this.readQueue()).items.map((x) => [x.id, x]));
1947
+ const runs = (x) => {
1948
+ const was = before.get(x.id);
1949
+ return !was || was.skill !== x.skill || (x.status ?? was.status) === 'waiting';
1950
+ };
1951
+ const unknown = checked.items.findIndex((x) => x.skill && runs(x) && !skills.some((k) => k.name === x.skill));
1865
1952
  if (unknown >= 0) {
1866
1953
  const name = checked.items[unknown].skill;
1867
1954
  throw new Error(`Task ${unknown + 1} is sent with the skill "${name}", which is not in Settings → Skills${skills.length > 0 ? `; there are ${skills.map((k) => k.name).join(', ')}` : ''}.`);
@@ -2037,7 +2124,8 @@ let OperatorService = class OperatorService {
2037
2124
  if (ask)
2038
2125
  await closePasswordWindows(ask, new Date(Date.parse(approval.createdAt) - 5_000)).catch(() => 0);
2039
2126
  }
2040
- await this.stop(key).catch(() => undefined);
2127
+ // Set aside by the queue, not stopped by the operator: its ending is said.
2128
+ await this.stop(key, 'bot').catch(() => undefined);
2041
2129
  }
2042
2130
  /**
2043
2131
  * The operator's answer to a parked task, given when they are back (2026-10-26): kept on the task's record, and the
@@ -2052,11 +2140,26 @@ let OperatorService = class OperatorService {
2052
2140
  throw new Error('That task is not in the queue any more.');
2053
2141
  if (item.status !== 'parked' || !item.sessionId)
2054
2142
  throw new Error('That task is not waiting for an answer.');
2143
+ /*
2144
+ * The card of another run of it (bug hunt 2026-11-18): a card left in the chat of an earlier run — stopped, run
2145
+ * again, or a task removed whose id a new one took — answered the card the queue's task waits on now, unseen.
2146
+ */
2147
+ if (typeof input?.sessionId === 'string' && input.sessionId !== item.sessionId) {
2148
+ throw new Error('That card is of another run of this task: what the task waits for now is on the queue\'s page.');
2149
+ }
2055
2150
  const s = await this.store.getSession(item.sessionId);
2056
2151
  const task = s?.tasks.find((t) => t.parked && !t.parked.answer);
2057
2152
  // Stopped whatever its record says (2026-11-18): a Stop that failed with the record gone left the task, and the ones
2058
2153
  // that depend on it, waiting for good.
2059
2154
  if (input?.stop === true) {
2155
+ // Said on the record too, so its chat does not offer the card again (bug hunt 2026-11-18).
2156
+ if (s && task) {
2157
+ await this.store.updateSession(s.id, (x) => {
2158
+ const t = x.tasks.find((y) => y.id === task.id);
2159
+ if (t?.parked && !t.parked.answer)
2160
+ t.parked.answer = { kind: 'stopped', at: new Date().toISOString() };
2161
+ }).catch(() => undefined);
2162
+ }
2060
2163
  return await this.withBusy(await this.changeQueue((x) => this.setQueueItem(x, itemId, { status: 'stopped', why: 'stopped by the operator at its card', waitsFor: undefined })));
2061
2164
  }
2062
2165
  if (!s || !task?.parked)
@@ -2106,6 +2209,9 @@ let OperatorService = class OperatorService {
2106
2209
  // Stopped — from the queue, or the chat's Stop: the rest wait for the operator. Parked: the queue goes on.
2107
2210
  if (ended.status === 'stopped')
2108
2211
  return;
2212
+ // Stopped with the queue, to carry on at the next run: the loop sees the queue stopped and ends (2026-11-18).
2213
+ if (ended.status === 'waiting' && !(await this.readQueue()).running)
2214
+ return;
2109
2215
  }
2110
2216
  }
2111
2217
  /** One task of the queue, in a new chat — or, answered after it was parked, in its own — to its end. */
@@ -2115,9 +2221,10 @@ let OperatorService = class OperatorService {
2115
2221
  // Read afresh each time: the browser is let go of by other work while this waits.
2116
2222
  const holder = () => this.browser;
2117
2223
  // The browser may be the chat's, or a reading of the models': the task waits its turn.
2224
+ // Stopped before it began: it waits as it did (2026-11-18), not "stopped", which skipped what depends on it.
2118
2225
  while (holder()) {
2119
2226
  if (this.queueClosing || !(await stillRunning()))
2120
- return { status: 'stopped', why: 'the queue was stopped before it began' };
2227
+ return { status: 'waiting', why: undefined };
2121
2228
  await pause(1_000);
2122
2229
  }
2123
2230
  const ws = await this.workspace();
@@ -2126,12 +2233,64 @@ let OperatorService = class OperatorService {
2126
2233
  const cfg = await this.settings.load();
2127
2234
  let sessionId;
2128
2235
  let taskId;
2236
+ /** Carried on with "Continue" in its own chat: stopped with the queue, or the bot closed under it (2026-11-18). */
2237
+ let carryOn = false;
2129
2238
  if (item.resume && item.sessionId) {
2130
- const carried = await this.resumeParked(item.sessionId, ws.dir);
2131
- if ('problem' in carried)
2132
- return { status: 'failed', why: carried.problem, sessionId: item.sessionId };
2239
+ const s0 = await this.store.getSession(item.sessionId);
2240
+ const answered = s0?.tasks.find((t) => t.parked?.answer && t.parked.answer.kind !== 'stopped');
2241
+ const last = s0?.tasks.at(-1);
2242
+ if (!s0 || !last)
2243
+ return { status: 'failed', why: 'its chat is not there any more; run it again' };
2244
+ /*
2245
+ * Back on the branch it began on, a task on "the folder as it is" (bug hunt 2026-11-18): it carried on on whatever
2246
+ * branch the task after it left the folder on — one made for another task. What that left uncommitted is put
2247
+ * aside first, kept whole and not pushed, as before a task on a branch of its own.
2248
+ */
2249
+ const began = (answered ?? last).checkpoint?.branch;
2250
+ if (ws.isRepo && !s0.vcs?.enabled && began) {
2251
+ const onNow = (await git(ws.dir, ['symbolic-ref', '--quiet', '--short', 'HEAD']).catch(() => null))?.stdout || null;
2252
+ if (onNow !== began) {
2253
+ const aside = await setAsideUncommitted(ws.dir, `the queue's task "${itemTitle(item)}" carries on on ${began}, where it began, and the folder held changes left on ${onNow ?? 'a detached HEAD'}`);
2254
+ if (aside && 'problem' in aside)
2255
+ return { status: 'failed', why: `what was not committed in the folder could not be put aside before it: ${aside.problem}`, sessionId: s0.id };
2256
+ const back = await git(ws.dir, ['switch', began]);
2257
+ if (!back.ok)
2258
+ return { status: 'failed', why: `it could not be put back on ${began}, where it began: ${(back.stderr || back.stdout).trim().slice(0, 300)}`, sessionId: s0.id };
2259
+ this.bus.publish({ sessionId: s0.id, type: 'queue-back-on-branch', level: 'info',
2260
+ message: `back on ${began}, where it began, before it carries on (the folder was on ${onNow ?? 'a detached HEAD'})${aside ? `; what was not committed there is kept on ${aside.saved}, not pushed` : ''}`,
2261
+ data: { branch: began, was: onNow, ...(aside ? { saved: aside.saved } : {}) } });
2262
+ if (aside && 'saved' in aside)
2263
+ await this.leftoversOf(onNow, item.id, aside.saved);
2264
+ }
2265
+ }
2266
+ // Its own work, put aside by a task after it on a branch of its own (2026-11-18): put back before it carries on.
2267
+ for (const saved of item.setAside ?? []) {
2268
+ const back = ws.isRepo && !s0.vcs?.enabled ? await putBackAside(ws.dir, saved) : { problem: 'it no longer works on the folder as it is' };
2269
+ await this.changeQueue((x) => this.setQueueItem(x, item.id, { setAside: (x.items.find((i) => i.id === item.id)?.setAside ?? []).filter((n) => n !== saved) }));
2270
+ this.bus.publish({ sessionId: s0.id, type: 'queue-put-back', level: 'problem' in back ? 'warn' : 'info',
2271
+ message: 'problem' in back
2272
+ ? `what it had not committed, put aside on ${saved} by a task after it, could not be put back: ${back.problem}`
2273
+ : `what it had not committed (${back.files} file(s)), put aside on ${saved} by a task after it, is back in the folder, not committed`,
2274
+ data: { saved, ...('problem' in back ? { problem: back.problem } : { files: back.files }) } });
2275
+ if ('problem' in back)
2276
+ await this.store.addTaskNote(s0.id, (answered ?? last).id, `What you had changed and not committed was put aside on the branch ${saved} while you waited, and could not be put back: ${back.problem}. Take back what you need from there (git restore --source ${saved} -- <path>).`).catch(() => undefined);
2277
+ }
2278
+ if (answered) {
2279
+ const carried = await this.resumeParked(item.sessionId, ws.dir);
2280
+ if ('problem' in carried)
2281
+ return { status: 'failed', why: carried.problem, sessionId: item.sessionId };
2282
+ taskId = carried.taskId;
2283
+ }
2284
+ else {
2285
+ // Finished in its chat meanwhile, or ended there in a way "Continue" does not carry on: as it ended.
2286
+ if (last.status !== 'queued' && !isContinuable(last)) {
2287
+ const status = statusOfTask(last.status);
2288
+ return { status, ...(status !== 'done' ? { why: last.reason ?? `it ended ${last.status}` } : {}), sessionId: s0.id };
2289
+ }
2290
+ taskId = last.id;
2291
+ carryOn = true;
2292
+ }
2133
2293
  sessionId = item.sessionId;
2134
- taskId = carried.taskId;
2135
2294
  }
2136
2295
  else {
2137
2296
  // Settings may have changed since the queue was started.
@@ -2144,13 +2303,14 @@ let OperatorService = class OperatorService {
2144
2303
  if (!(await branchExists(ws.dir, branchName)))
2145
2304
  branchName = undefined;
2146
2305
  else {
2147
- const fresh = await refreshQueueBranch(ws.dir, branchName, item.branchBase);
2306
+ const fresh = await refreshQueueBranch(ws.dir, branchName, item.branchBase, item.branchFrom);
2148
2307
  if (fresh.moved)
2149
- await this.changeQueue((x) => this.setQueueItem(x, item.id, { branchBase: fresh.base, branchFrom: 'origin/main' }));
2308
+ await this.changeQueue((x) => this.setQueueItem(x, item.id, { branchBase: fresh.base, ...(fresh.from ? { branchFrom: fresh.from } : {}) }));
2150
2309
  }
2151
2310
  }
2152
2311
  // Not made when it was added — no repository then, or no main to make it from: made now, asking nobody anything.
2153
- let branchFrom = item.branchFrom;
2312
+ // As it is now: brought up to the remote's main just above, it was made from that.
2313
+ let branchFrom = (await this.readQueue()).items.find((x) => x.id === item.id)?.branchFrom ?? item.branchFrom;
2154
2314
  if (item.branch === 'main' && ws.isRepo && !branchName) {
2155
2315
  const start = await branchStart(ws.dir, null);
2156
2316
  if ('problem' in start)
@@ -2185,7 +2345,7 @@ let OperatorService = class OperatorService {
2185
2345
  });
2186
2346
  // Where its branch came from, told with its opening message: the local main when the server's could not be read.
2187
2347
  if (branchName) {
2188
- await this.store.addTaskNote(sessionId, taskId, branchFrom && branchFrom !== 'origin/main'
2348
+ await this.store.addTaskNote(sessionId, taskId, branchFrom && !(await madeFromRemote(ws.dir, branchFrom))
2189
2349
  ? `This task works on its own branch ${branchName}, made from the local \`${branchFrom}\`: the server's main could not be fetched without asking for a password, and a run never types one. Do not try to fetch or pull it.`
2190
2350
  : `This task works on its own branch ${branchName}, made from the server's main (${branchFrom ?? 'origin/main'}). Do not switch to another branch.`).catch(() => undefined);
2191
2351
  }
@@ -2207,6 +2367,7 @@ let OperatorService = class OperatorService {
2207
2367
  if (aside) {
2208
2368
  this.bus.publish({ sessionId, type: 'queue-set-aside', level: 'warn',
2209
2369
  message: `what was not committed in the folder (${aside.files} file(s), on ${onNow ?? 'a detached HEAD'}) was put aside on ${aside.saved}, not pushed, before this task started on its own branch` });
2370
+ await this.leftoversOf(onNow, item.id, aside.saved);
2210
2371
  }
2211
2372
  }
2212
2373
  }
@@ -2216,19 +2377,22 @@ let OperatorService = class OperatorService {
2216
2377
  */
2217
2378
  while (holder()) {
2218
2379
  if (this.queueClosing || !(await stillRunning()))
2219
- return { status: 'stopped', why: 'the queue was stopped before it began', sessionId };
2380
+ return { status: 'waiting', resume: true, why: CARRIES_ON_AFTER('the queue was stopped before it began'), sessionId };
2220
2381
  await pause(1_000);
2221
2382
  }
2222
2383
  this.queueAtWork.add(sessionId);
2384
+ /** Stopped with the queue: it carries on at the next run rather than counting as stopped (2026-11-18). */
2385
+ let asked = false;
2223
2386
  try {
2224
- const reply = await this.start(sessionId, cfg.execution.mode);
2387
+ const reply = carryOn
2388
+ ? await this.chatContinue(sessionId, taskId).catch((e) => ({ started: false, reason: e.message }))
2389
+ : await this.start(sessionId, cfg.execution.mode);
2225
2390
  if (!reply.started)
2226
2391
  return { status: 'failed', why: reply.reason ?? 'it did not start', sessionId };
2227
2392
  // Until its run has ended and its window let the browser go, so the next one can have it.
2228
- let asked = false;
2229
2393
  while (this.running.has(sessionId) || (holder()?.kind === 'run' && holder().sessionId === sessionId)) {
2230
2394
  if (this.queueClosing)
2231
- return { status: 'stopped', why: 'the bot was closed while it ran', sessionId };
2395
+ return { status: 'waiting', resume: true, why: CARRIES_ON_AFTER('the bot was closed while it ran'), sessionId };
2232
2396
  if (!asked && !(await stillRunning())) {
2233
2397
  asked = true;
2234
2398
  await this.stop(sessionId).catch(() => undefined);
@@ -2251,6 +2415,10 @@ let OperatorService = class OperatorService {
2251
2415
  });
2252
2416
  return { status: 'parked', why, sessionId };
2253
2417
  }
2418
+ // Stopped with the queue ("Stop the queue … the rest wait"): it carries on, in its own chat, at the next run.
2419
+ if ((asked || !(await stillRunning())) && task && (task.status === 'queued' || isContinuable(task))) {
2420
+ return { status: 'waiting', resume: true, why: CARRIES_ON_AFTER('the queue was stopped while it ran'), sessionId };
2421
+ }
2254
2422
  const status = statusOfTask(task?.status);
2255
2423
  return { status, ...(status !== 'done' ? { why: task?.reason ?? `it ended ${task?.status ?? 'without a record'}` } : {}), sessionId };
2256
2424
  }
@@ -2262,23 +2430,31 @@ let OperatorService = class OperatorService {
2262
2430
  */
2263
2431
  async resumeParked(sessionId, dir) {
2264
2432
  const s = await this.store.getSession(sessionId);
2265
- const task = s?.tasks.find((t) => t.parked?.answer);
2433
+ // Not one stopped at its card (2026-11-18): that is an answer that does not carry it on.
2434
+ const task = s?.tasks.find((t) => t.parked?.answer && t.parked.answer.kind !== 'stopped');
2266
2435
  const p = task?.parked;
2267
2436
  const a = p?.answer;
2268
- if (!s || !task || !p || !a)
2437
+ if (!s || !task || !p || !a || a.kind === 'stopped')
2269
2438
  return { problem: 'its answer is not on its record any more; run it again' };
2270
2439
  const continuing = { fromAttempt: task.attempt ?? 1, stoppedBecause: task.reason, how: 'parked', parkedFor: p.kind };
2271
2440
  let note = '';
2272
2441
  let approvedPlan;
2273
2442
  const command = p.approval.description.replace(/^\[[\w-]+\]\s*/, '');
2443
+ /*
2444
+ * The lead's plan, with two chats (bug hunt 2026-11-18): told in the lead's words. The single chat's said to reply
2445
+ * with status "continue", which is not the lead's, and it was asked again for its format.
2446
+ */
2447
+ const ofLead = !!task.lead;
2274
2448
  if (a.kind === 'plan') {
2449
+ const revised = a.note?.trim() || 'Make the plan more concrete: name the files and the stages.';
2275
2450
  if (a.decision === 'approve' && p.approval.plan) {
2276
2451
  approvedPlan = { ...p.approval.plan.plan, approved: { by: 'operator', at: a.at, ...(a.note?.trim() ? { note: a.note.trim() } : {}) } };
2277
- note = planApprovedMessage(approvedPlan.approved);
2452
+ // Carried on, the lead may give as many subtasks again as Settings allow (see `runLeadTask`).
2453
+ note = ofLead ? leadPlanApproved(approvedPlan.approved, Math.max(1, (await this.settings.load()).limits.maxSubtasks ?? 20)) : planApprovedMessage(approvedPlan.approved);
2278
2454
  }
2279
2455
  else {
2280
2456
  continuing.replan = true;
2281
- note = planReviseMessage(a.note?.trim() || 'Make the plan more concrete: name the files and the stages.', p.approval.plan?.plan.version ?? 1);
2457
+ note = ofLead ? leadPlanRevise(revised, p.approval.plan?.plan.version ?? 1) : planReviseMessage(revised, p.approval.plan?.plan.version ?? 1);
2282
2458
  }
2283
2459
  }
2284
2460
  else if (a.kind === 'question') {
@@ -2295,17 +2471,30 @@ let OperatorService = class OperatorService {
2295
2471
  }
2296
2472
  else if (a.kind === 'retry' && p.approval.retry) {
2297
2473
  const r = p.approval.retry;
2298
- if (a.choice === 'accept')
2299
- note = `Subtask ${r.n} (${r.title}) is taken as failed, at the operator's word: decide what to do next without it.`;
2474
+ const worker = await this.store.getSession(p.approval.sessionId);
2475
+ if (a.choice === 'accept') {
2476
+ /*
2477
+ * With what its last attempt ended on (bug hunt 2026-11-18): the lead was given only that it failed, where the
2478
+ * run itself gives it the subtask's report.
2479
+ */
2480
+ const last = worker?.tasks.find((t) => t.id === p.approval.taskId);
2481
+ const ended = last ? [`Its last attempt ended ${last.status}${last.reason ? `: ${last.reason}` : ''}.`, ...(last.summary?.trim() ? ['', 'The worker\'s summary:', '', last.summary.trim()] : [])] : [];
2482
+ note = [`Subtask ${r.n} (${r.title}) is taken as failed, at the operator's word: decide what to do next without it.`, ...(ended.length > 0 ? ['', ...ended] : [])].join('\n');
2483
+ }
2300
2484
  else {
2301
2485
  if (a.choice === 'restore') {
2302
- const worker = await this.store.getSession(p.approval.sessionId);
2303
- const cp = worker?.tasks.find((t) => t.id === p.approval.taskId)?.checkpoint;
2486
+ /*
2487
+ * To the subtask's start, its first attempt's photograph, as the run puts it back (bug hunt 2026-11-18): the
2488
+ * card's own task is the last attempt's, whose photograph holds what the attempts before it changed.
2489
+ */
2490
+ const first = [...(task.lead?.rounds ?? [])].reverse().find((x) => x.subtask?.n === r.n)?.subtask?.attempts?.[0]?.taskId ?? p.approval.taskId;
2491
+ const cp = worker?.tasks.find((t) => t.id === first)?.checkpoint;
2304
2492
  const back = cp ? await restoreCheckpoint(dir, cp) : { ok: false, problem: 'the subtask\'s start was not photographed' };
2305
2493
  if (!back.ok)
2306
2494
  return { problem: `the folder could not be put back to the subtask's start (${back.problem}); answer it again with another choice` };
2307
2495
  }
2308
- continuing.retrySubtask = { n: r.n, ...(a.choice === 'fresh' ? { fresh: true } : {}) };
2496
+ // Put back: the next attempt is told it starts over, not to carry on from what the last one left.
2497
+ continuing.retrySubtask = { n: r.n, ...(a.choice === 'fresh' ? { fresh: true } : {}), ...(a.choice === 'restore' ? { restored: true } : {}) };
2309
2498
  }
2310
2499
  }
2311
2500
  else if (a.kind === 'command') {
@@ -2627,13 +2816,18 @@ let OperatorService = class OperatorService {
2627
2816
  const session = await this.store.getSession(threadId);
2628
2817
  if (!session || session.kind !== 'chat')
2629
2818
  throw new Error('That conversation is not there any more.');
2630
- if (session.directedBy)
2631
- throw new Error('Kerrigan directs this chat: carry her conversation on instead.');
2632
2819
  if (this.running.has(this.runKey(threadId)))
2633
2820
  throw new Error('The conversation is working: stop it first, or let it finish.');
2634
2821
  const task = session.tasks.find((t) => t.id === taskId);
2635
2822
  if (!task)
2636
2823
  throw new Error('That message is not in this conversation.');
2824
+ /*
2825
+ * A chat Kerrigan directs: her messages are carried on in her conversation. One the operator wrote there while she
2826
+ * was not at work is theirs, and Continue carries it on as in any chat (bug hunt 2026-11-18: it ran, and when it
2827
+ * stopped nothing could carry it on).
2828
+ */
2829
+ if (session.directedBy && task.fromKerrigan)
2830
+ throw new Error('Kerrigan sent this message: carry her conversation on instead.');
2637
2831
  if (session.tasks.at(-1)?.id !== taskId)
2638
2832
  throw new Error('Only the last message of a conversation is carried on: the conversation has gone on past this one.');
2639
2833
  /*
@@ -2753,9 +2947,14 @@ let OperatorService = class OperatorService {
2753
2947
  if (text.length > MAX_INSTRUCTION_CHARS)
2754
2948
  return { ok: false, problem: `The note is ${text.length} characters; it can be at most ${MAX_INSTRUCTION_CHARS}.` };
2755
2949
  this.waiting.delete(approvalId);
2950
+ if (action === 'stop' && !as)
2951
+ this.stoppedByOperator.add(this.runKey(w.approval.sessionId));
2756
2952
  w.resolvePlan({ decision: action, ...(text ? { note: text } : {}), ...(as ? { by: as.by } : {}) });
2757
2953
  this.bus.publish({ sessionId: w.approval.sessionId, taskId: w.approval.taskId, type: 'approval-decided', level: 'info',
2758
2954
  message: `plan: ${action}${text ? ' (with a note)' : ''}${as ? `, by Kerrigan${as.why ? ` — ${as.why}` : ''}` : ''}`, data: { approvalId, action, plan: true, ...(as ? { by: as.by } : {}) } });
2955
+ // The operator's Stop on the plan of a chat inside another's run stops the run (see `decide`); Kerrigan's is her own.
2956
+ if (action === 'stop' && !as && this.runKey(w.approval.sessionId) !== w.approval.sessionId)
2957
+ void this.stop(w.approval.sessionId).catch(() => undefined);
2759
2958
  return { ok: true };
2760
2959
  }
2761
2960
  /** What waits for the operator; of one session, its worker's included (two chats: they are asked in its conversation). */
@@ -2773,9 +2972,23 @@ let OperatorService = class OperatorService {
2773
2972
  */
2774
2973
  decide(approvalId, action) {
2775
2974
  const w = this.waiting.get(approvalId);
2975
+ // Said (bug hunt 2026-11-18): answered "ok: false" with 200, the press looked taken, and the card went on waiting.
2776
2976
  if (!w)
2777
- return { ok: false };
2977
+ return { ok: false, problem: CARD_GONE };
2978
+ /*
2979
+ * "Run this and the rest" where the run may not go on unasked (policy.lock.json, an empty allowlist, the isolation):
2980
+ * it ran the step as "Run", the next was asked again, and nothing said why (bug hunt 2026-11-18). Refused before the
2981
+ * card is answered, with the reason; "Run" is there for this step.
2982
+ */
2983
+ if (action === 'run-all') {
2984
+ const run = this.running.get(this.runKey(w.approval.sessionId));
2985
+ const blocked = run && run.mode !== 'unattended' ? unattendedPrecondition({ ...run.policy, mode: 'unattended' }) : null;
2986
+ if (blocked)
2987
+ return { ok: false, problem: RUN_ALL_REFUSED(blocked) };
2988
+ }
2778
2989
  this.waiting.delete(approvalId);
2990
+ if (action === 'abort')
2991
+ this.stoppedByOperator.add(this.runKey(w.approval.sessionId));
2779
2992
  if (action === 'run-all')
2780
2993
  this.setRunMode(this.runKey(w.approval.sessionId), 'unattended');
2781
2994
  const decision = action === 'run' || action === 'run-all'
@@ -2794,6 +3007,13 @@ let OperatorService = class OperatorService {
2794
3007
  */
2795
3008
  if (w.approval.model?.manual && action === 'abort')
2796
3009
  void this.stop(w.approval.sessionId).catch(() => undefined);
3010
+ /*
3011
+ * "Stop the task" or "Abort task" on a card of a conversation inside another's run — the worker of two chats, a chat
3012
+ * Kerrigan directs (bug hunt 2026-11-18): it ended only that conversation's task, and the lead, or Kerrigan, was told
3013
+ * it stopped and went on. The operator stopped the work: the run stops, as the chat's Stop stops it.
3014
+ */
3015
+ else if (action === 'abort' && this.runKey(w.approval.sessionId) !== w.approval.sessionId)
3016
+ void this.stop(w.approval.sessionId).catch(() => undefined);
2797
3017
  return { ok: true };
2798
3018
  }
2799
3019
  /**
@@ -3272,6 +3492,17 @@ let OperatorService = class OperatorService {
3272
3492
  throw new Error(`Two projects are named "${o.name}". Names are how the folders are told apart, so each needs its own.`);
3273
3493
  seen.add(key);
3274
3494
  }
3495
+ /*
3496
+ * A project that may be changed inside one for reference only (bug hunt 2026-11-18): every change made in it would
3497
+ * be put back after each step, so no task there could finish. Refused, with what to do.
3498
+ */
3499
+ const all = [{ name: name || rootDir, rootDir, readOnly }, ...others].filter((p) => p.rootDir);
3500
+ for (const w of all.filter((p) => !p.readOnly)) {
3501
+ const r = all.find((p) => p.readOnly && p !== w && folderInside(w.rootDir, p.rootDir));
3502
+ if (r) {
3503
+ throw new Error(`${w.name} (${w.rootDir}) is inside ${r.name} (${r.rootDir}), which is for reference only: every change made in it would be put back after each step. Untick "for reference only" on ${r.name}, or list for reference only the folders of it beside ${w.name}.`);
3504
+ }
3505
+ }
3275
3506
  // What the removed Desktop copies left in the stored project is dropped with the next save.
3276
3507
  const { mirror: _m, desktop: _d, mirrorToDesktop: _t, ...rest } = current;
3277
3508
  return { ...raw, project: { ...rest, rootDir, name, level2, readOnly, others } };
@@ -3463,9 +3694,6 @@ let OperatorService = class OperatorService {
3463
3694
  chatUrl: cfg.copilot.url,
3464
3695
  channel: cfg.copilot.channel,
3465
3696
  headless: cfg.copilot.headless,
3466
- replyTimeoutMs: cfg.copilot.replyTimeoutSec * 1000,
3467
- signInTimeoutMs: cfg.copilot.signInTimeoutSec * 1000,
3468
- humanWaitMs: cfg.copilot.humanWaitSec * 1000,
3469
3697
  keepFailurePage: cfg.copilot.keepFailurePage,
3470
3698
  // The rows' locator reads the names (Settings' own, 2026-10-24).
3471
3699
  ...pickerOptions(cfg),
@@ -3525,9 +3753,6 @@ let OperatorService = class OperatorService {
3525
3753
  chatUrl: cfg.copilot.url,
3526
3754
  channel: cfg.copilot.channel,
3527
3755
  headless: cfg.copilot.headless,
3528
- replyTimeoutMs: cfg.copilot.replyTimeoutSec * 1000,
3529
- signInTimeoutMs: cfg.copilot.signInTimeoutSec * 1000,
3530
- humanWaitMs: cfg.copilot.humanWaitSec * 1000,
3531
3756
  keepFailurePage: cfg.copilot.keepFailurePage,
3532
3757
  ...pickerOptions(cfg),
3533
3758
  onEvent: (event, detail) => {
@@ -3539,11 +3764,8 @@ let OperatorService = class OperatorService {
3539
3764
  await transport.open();
3540
3765
  let results;
3541
3766
  try {
3542
- // A step of the operator's own that is not there stops the opening, as at work; it is said, and the check goes on.
3543
- await transport.ensureSignedIn().catch((e) => {
3544
- if (!(e instanceof LocatorMissing) || !isStepKey(e.key))
3545
- throw e;
3546
- });
3767
+ // A step of the operator's own that is not there does not stop a check, which only reads: each is looked for below.
3768
+ await transport.ensureSignedIn(undefined, { stepsLookOnly: true });
3547
3769
  results = await transport.checkLocators();
3548
3770
  }
3549
3771
  catch (e) {