poly-weaver 0.13.1 → 0.13.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 (85) hide show
  1. package/dist/agents/implementors/adapter.d.ts +1 -1
  2. package/dist/agents/implementors/adapter.d.ts.map +1 -1
  3. package/dist/agents/implementors/adapter.js +4 -4
  4. package/dist/agents/implementors/adapter.js.map +1 -1
  5. package/dist/agents/implementors/handler.js +3 -3
  6. package/dist/agents/implementors/handler.js.map +1 -1
  7. package/dist/agents/implementors/prompts.d.ts +4 -4
  8. package/dist/agents/implementors/prompts.d.ts.map +1 -1
  9. package/dist/agents/implementors/prompts.js +12 -9
  10. package/dist/agents/implementors/prompts.js.map +1 -1
  11. package/dist/agents/implementors/types.d.ts +5 -5
  12. package/dist/agents/implementors/types.d.ts.map +1 -1
  13. package/dist/agents/prompt-utils.d.ts +2 -0
  14. package/dist/agents/prompt-utils.d.ts.map +1 -0
  15. package/dist/agents/prompt-utils.js +7 -0
  16. package/dist/agents/prompt-utils.js.map +1 -0
  17. package/dist/agents/reviewers/adapter.d.ts.map +1 -1
  18. package/dist/agents/reviewers/adapter.js +1 -0
  19. package/dist/agents/reviewers/adapter.js.map +1 -1
  20. package/dist/agents/reviewers/handler.d.ts.map +1 -1
  21. package/dist/agents/reviewers/handler.js +3 -0
  22. package/dist/agents/reviewers/handler.js.map +1 -1
  23. package/dist/agents/reviewers/prompts.d.ts +1 -1
  24. package/dist/agents/reviewers/prompts.d.ts.map +1 -1
  25. package/dist/agents/reviewers/prompts.js +3 -4
  26. package/dist/agents/reviewers/prompts.js.map +1 -1
  27. package/dist/agents/reviewers/types.d.ts +4 -1
  28. package/dist/agents/reviewers/types.d.ts.map +1 -1
  29. package/dist/agents/reviewers/types.js.map +1 -1
  30. package/dist/app-header.d.ts +1 -1
  31. package/dist/app-header.d.ts.map +1 -1
  32. package/dist/app-header.js +11 -12
  33. package/dist/app-header.js.map +1 -1
  34. package/dist/auto-update/check-agent-updates.d.ts.map +1 -1
  35. package/dist/auto-update/check-agent-updates.js +3 -2
  36. package/dist/auto-update/check-agent-updates.js.map +1 -1
  37. package/dist/auto-update/install-agents.js +4 -9
  38. package/dist/auto-update/install-agents.js.map +1 -1
  39. package/dist/auto-update/npm-commands.d.ts +11 -0
  40. package/dist/auto-update/npm-commands.d.ts.map +1 -0
  41. package/dist/auto-update/npm-commands.js +28 -0
  42. package/dist/auto-update/npm-commands.js.map +1 -0
  43. package/dist/dsl.d.ts +1 -0
  44. package/dist/dsl.d.ts.map +1 -1
  45. package/dist/dsl.js +2 -2
  46. package/dist/dsl.js.map +1 -1
  47. package/dist/flow/built-in/default-factory.d.ts.map +1 -1
  48. package/dist/flow/built-in/default-factory.js +11 -3
  49. package/dist/flow/built-in/default-factory.js.map +1 -1
  50. package/dist/flow/built-in/simplify-factory.d.ts.map +1 -1
  51. package/dist/flow/built-in/simplify-factory.js +11 -3
  52. package/dist/flow/built-in/simplify-factory.js.map +1 -1
  53. package/dist/flow/index.d.ts +1 -1
  54. package/dist/flow/index.d.ts.map +1 -1
  55. package/dist/flow/index.js +1 -1
  56. package/dist/flow/index.js.map +1 -1
  57. package/dist/flow/types.d.ts +6 -0
  58. package/dist/flow/types.d.ts.map +1 -1
  59. package/dist/flow/types.js +2 -0
  60. package/dist/flow/types.js.map +1 -1
  61. package/dist/git-info.d.ts +4 -3
  62. package/dist/git-info.d.ts.map +1 -1
  63. package/dist/git-info.js +99 -22
  64. package/dist/git-info.js.map +1 -1
  65. package/dist/orchestrator.d.ts +18 -0
  66. package/dist/orchestrator.d.ts.map +1 -1
  67. package/dist/orchestrator.js +169 -10
  68. package/dist/orchestrator.js.map +1 -1
  69. package/dist/session/manifest.d.ts +5 -0
  70. package/dist/session/manifest.d.ts.map +1 -1
  71. package/dist/session/restore.d.ts.map +1 -1
  72. package/dist/session/restore.js +6 -0
  73. package/dist/session/restore.js.map +1 -1
  74. package/dist/session/session-store.d.ts +6 -0
  75. package/dist/session/session-store.d.ts.map +1 -1
  76. package/dist/session/session-store.js +41 -17
  77. package/dist/session/session-store.js.map +1 -1
  78. package/dist/update-check.d.ts.map +1 -1
  79. package/dist/update-check.js +2 -1
  80. package/dist/update-check.js.map +1 -1
  81. package/dist/user/host-curate-prompt.d.ts +3 -1
  82. package/dist/user/host-curate-prompt.d.ts.map +1 -1
  83. package/dist/user/host-curate-prompt.js +196 -52
  84. package/dist/user/host-curate-prompt.js.map +1 -1
  85. package/package.json +1 -1
@@ -76,21 +76,31 @@ export class SessionStore {
76
76
  completedAt: new Date().toISOString(),
77
77
  };
78
78
  await atomicWriteJson(join(this.persistentDir, "steps", stepFilename(seq)), entry);
79
- this.manifest = {
80
- ...this.manifest,
79
+ await this.updateManifest({
81
80
  lastCompletedSeq: seq,
82
81
  lastActivityAt: entry.completedAt,
83
- };
84
- await atomicWriteJson(join(this.persistentDir, "manifest.json"), this.manifest);
82
+ });
85
83
  };
86
84
  /** Mark this session complete so the picker hides it; pruner deletes after 7d. */
87
85
  async markComplete() {
88
- this.manifest = {
89
- ...this.manifest,
86
+ await this.updateManifest({
90
87
  status: "complete",
91
88
  lastActivityAt: new Date().toISOString(),
92
- };
93
- await atomicWriteJson(join(this.persistentDir, "manifest.json"), this.manifest);
89
+ });
90
+ }
91
+ /**
92
+ * Durably complete the delayed working-tree capture without changing
93
+ * checkpoint or resume state.
94
+ */
95
+ async completeUncommittedSnapshot(state) {
96
+ if (this.manifest.uncommittedSnapshot !== "pending") {
97
+ throw new Error(`Cannot complete uncommitted snapshot from state ` +
98
+ `${this.manifest.uncommittedSnapshot ?? "omitted"}`);
99
+ }
100
+ await this.updateManifest({
101
+ uncommittedSnapshot: state,
102
+ lastActivityAt: new Date().toISOString(),
103
+ });
94
104
  }
95
105
  /**
96
106
  * During resume fast-forward, ctx.sessionIds is intentionally left empty so
@@ -113,25 +123,39 @@ export class SessionStore {
113
123
  async snapshotArtifact(seq, storeKey, artifact) {
114
124
  const ref = { storeKey };
115
125
  if (artifact.file) {
116
- const ext = extname(artifact.file);
117
- const safeKey = storeKey.replace(/[^A-Za-z0-9._-]/g, "_");
118
- const dest = join(this.persistentDir, "artifacts", `step-${String(seq).padStart(4, "0")}-${safeKey}${ext}`);
119
- try {
120
- await copyFile(artifact.file, dest);
121
- ref.persistentPath = dest;
126
+ if (artifact.immutablePersistentFile) {
127
+ ref.persistentPath = artifact.file;
122
128
  }
123
- catch {
124
- // Source may have been cleaned up; fall through with text/data only.
129
+ else {
130
+ const ext = extname(artifact.file);
131
+ const safeKey = storeKey.replace(/[^A-Za-z0-9._-]/g, "_");
132
+ const dest = join(this.persistentDir, "artifacts", `step-${String(seq).padStart(4, "0")}-${safeKey}${ext}`);
133
+ try {
134
+ await copyFile(artifact.file, dest);
135
+ ref.persistentPath = dest;
136
+ }
137
+ catch {
138
+ // Source may have been cleaned up; fall through with text/data only.
139
+ }
125
140
  }
126
141
  }
127
- if (artifact.text !== undefined)
142
+ if (artifact.text !== undefined &&
143
+ !(artifact.file && artifact.immutablePersistentFile)) {
128
144
  ref.text = artifact.text;
145
+ }
129
146
  if (artifact.data !== undefined)
130
147
  ref.dataJson = JSON.stringify(artifact.data);
131
148
  if (artifact.meta !== undefined)
132
149
  ref.meta = artifact.meta;
133
150
  return ref;
134
151
  }
152
+ async updateManifest(patch) {
153
+ this.manifest = {
154
+ ...this.manifest,
155
+ ...patch,
156
+ };
157
+ await atomicWriteJson(join(this.persistentDir, "manifest.json"), this.manifest);
158
+ }
135
159
  /**
136
160
  * Build a per-step input/output ref. Prefer the already-snapshotted artifact
137
161
  * store entry (so persistentPath matches), but fall back to a minimal ref
@@ -1 +1 @@
1
- {"version":3,"file":"session-store.js","sourceRoot":"","sources":["../../src/session/session-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAG1C,OAAO,EAAE,eAAe,EAAE,SAAS,E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AAQ,CAAC,CAAC;QAC5D,MAAM,GAAG,GAAgB,EAAE,QAAQ,EAAE,CAAC;QACtC,IAAI,QAAQ,CAAC,IAAI,KAAK,SAAS;YAAE,GAAG,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;QAC1D,IAAI,QAAQ,CAAC,QAAQ,KAAK,SAAS;YAAE,GAAG,CAAC,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC;QACtE,OAAO,GAAG,CAAC;IACb,CAAC;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"update-check.d.ts","sourceRoot":"","sources":["../src/update-check.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,wBAAwB,+BAA+B,CAAC;AAErE,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAYjE"}
1
+ {"version":3,"file":"update-check.d.ts","sourceRoot":"","sources":["../src/update-check.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,wBAAwB,+BAAwB,CAAC;AAE9D,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAYjE"}
@@ -2,7 +2,8 @@ import https from "node:https";
2
2
  import { APP_VERSION } from "./version.js";
3
3
  import { compareSemver } from "./auto-update/semver.js";
4
4
  import { REGISTRY_HTTPS_TIMEOUT_MS } from "./auto-update/timeouts.js";
5
- export const POLY_WEAVER_NPM_REGISTRY = "https://registry.npmjs.org";
5
+ import { OFFICIAL_NPM_REGISTRY } from "./auto-update/npm-commands.js";
6
+ export const POLY_WEAVER_NPM_REGISTRY = OFFICIAL_NPM_REGISTRY;
6
7
  /**
7
8
  * Check the npm registry for a newer version of poly-weaver.
8
9
  * Returns `{ current, latest }` when an update is available, or `null`
@@ -1 +1 @@
1
- {"version":3,"file":"update-check.js","sourceRoot":"","sources":["../src/update-check.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,MAAM,CAAC,MAAM,wBAAwB,GAAG,4BAA4B,CAAC;AAOrE;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc;IAClC,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,kBAAkB,EAAE,CAAC;QAC1C,MAAM,GAAG,GAAG,aAAa,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QAC/C,IAAI,GAAG,KAAK,IAAI;YAAE,OAAO,IAAI,CAAC;QAC9B,IAAI,GAAG,GAAG,CAAC,EAAE,CAAC;YACZ,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC;QAC1C,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,SAAS,kBAAkB;IACzB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CACnB,GAAG,wBAAwB,cAAc,EACzC;YACE,OAAO,EAAE,yBAAyB;YAClC,OAAO,EAAE;gBACP,MAAM,EAAE,qCAAqC;aAC9C;SACF,EACD,CAAC,GAAG,EAAE,EAAE;YACN,IAAI,GAAG,CAAC,UAAU,KAAK,SAAS,IAAI,GAAG,CAAC,UAAU,GAAG,GAAG,IAAI,GAAG,CAAC,UAAU,IAAI,GAAG,EAAE,CAAC;gBAClF,GA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CAAC,CAAC;gBAC7E,OAAO;YACT,CAAC;YAED,IAAI,IAAI,GAAG,EAAE,CAAC;YACd,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAa,EAAE,EAAE,GAAG,IAAI,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;YACjE,GAAG,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;gBACjB,IAAI,CAAC;oBACH,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAE3B,CAAC;oBACF,IAAI,OAAO,IAAI,CAAC,WAAW,CAAC,EAAE,MAAM,KAAK,QAAQ,EAAE,CAAC;wBAClD,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;oBACpC,CAAC;yBAAM,CAAC;wBACN,MAAM,CAAC,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC,CAAC;oBACtD,CAAC;gBACH,CAAC;gBAAC,OAAO,GAAG,EAAE,CAAC;oBACb,MAAM,CAAC,GAAG,CAAC,CAAC;gBACd,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CACF,CAAC;QACF,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QACxB,GAAG,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE;YACrB,GAAG,CAAC,OAAO,EAAE,CAAC;YACd,MAAM,CAAC,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC,CAAC;QACzC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -25,7 +25,9 @@ export declare const KDR_HINT: string;
25
25
  * - k/d/r toggles the cursor row's decision.
26
26
  * - Tab cycles keep → drop → revise → keep.
27
27
  * - Enter on editable rows opens an inline editor; Esc cancels.
28
- * - PageUp/PageDown/Home/End/wheel scrolls the plan.
28
+ * - PageUp/PageDown/Home/End scrolls the plan. Wheel input scrolls the plan
29
+ * over that pane and moves at most one logical row per input batch over
30
+ * the issues pane, based on the batch's net wheel direction.
29
31
  * - Up/Down moves the cursor among all navigable rows.
30
32
  * - Ctrl+D submits; Ctrl+C quits poly-weaver (exit code 130). Inside the
31
33
  * inline revise editor (`state.editing`), Ctrl+C cancels the edit only.
@@ -1 +1 @@
1
- {"version":3,"file":"host-curate-prompt.d.ts","sourceRoot":"","sources":["../../src/user/host-curate-prompt.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAUL,KAAK,cAAc,EAEnB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,YAAY,EAClB,MAAM,oBAAoB,CAAC;AAU5B,OAAO,EAEL,KAAK,2BAA2B,EAChC,KAAK,gBAAgB,EACtB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAmC,MAAM,qBAAqB,CAAC;AAOzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAQzE,OAAO,EAOL,KAAK,kBAAkB,EACxB,MAAM,uBAAuB,CAAC;AAK/B,eAAO,MAAM,QAAQ,QAAoB,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,qBAAa,sBAAuB,YAAW,mBAAmB;IACpD,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,YAAY;IAEzC,MAAM,CACV,OAAO,EAAE,aAAa,EACtB,QAAQ,CAAC,EAAE,MAAM,EACjB,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAAC,YAAY,CAAC;CAiezB;AAED,UAAU,WAAW;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,cAAc,EAAE,CAAC;IAC5B,QAAQ,EAAE,CAAC,MAAM,GAAG,SAAS,CAA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nC,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,QAAQ,GAAG,WAAW,GAAG,WAAW,CAAC,EAC1E,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,OAAO,EACrB,YAAY,GAAE;IAAE,OAAO,EAAE,gBAAgB,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,EAAO,EAClE,OAAO,CAAC,EAAE,qBAAqB,GAC9B,MAAM,EAAE,CAsBV;AAWD,KAAK,UAAU,GACX;IAAE,IAAI,EAAE,iBAAiB,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC1C,kBAAkB,CAAC;AAopBvB,wBAAgB,UAAU,CAAC,OAAO,EAAE,mBAAmB,EAAE,YAAY,UAAO,GAAG,MAAM,CAWpF;AAMD,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,aAAa,EACtB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,qBAAqB,GAAG,SAAS,EAC1C,SAAS,EAAE,MAAM,MAAM,GACtB,OAAO,CAAC,MAAM,CAAC,SAAS,GAAG,WAAW,EAAE,2BAA2B,CAAC,CAAC,CA4BvE"}
@@ -38,7 +38,9 @@ export const KDR_HINT = decisionHintFor();
38
38
  * - k/d/r toggles the cursor row's decision.
39
39
  * - Tab cycles keep → drop → revise → keep.
40
40
  * - Enter on editable rows opens an inline editor; Esc cancels.
41
- * - PageUp/PageDown/Home/End/wheel scrolls the plan.
41
+ * - PageUp/PageDown/Home/End scrolls the plan. Wheel input scrolls the plan
42
+ * over that pane and moves at most one logical row per input batch over
43
+ * the issues pane, based on the batch's net wheel direction.
42
44
  * - Up/Down moves the cursor among all navigable rows.
43
45
  * - Ctrl+D submits; Ctrl+C quits poly-weaver (exit code 130). Inside the
44
46
  * inline revise editor (`state.editing`), Ctrl+C cancels the edit only.
@@ -220,9 +222,143 @@ export class HostBackedCuratePrompt {
220
222
  this.host.scheduleParentUiRender();
221
223
  });
222
224
  };
225
+ const moveCursor = (direction) => {
226
+ const total = navigableCount(issues.length, state, profile);
227
+ const cursor = direction === "up"
228
+ ? (state.cursor - 1 + total) % total
229
+ : (state.cursor + 1) % total;
230
+ setCursor(cursor);
231
+ };
232
+ const setCursor = (cursor) => {
233
+ state.cursor = cursor;
234
+ if (state.cursor < issues.length)
235
+ state.nextCycle[state.cursor] = 0;
236
+ state.issueScrollPinnedToCursor = true;
237
+ if (profile?.autoScrollOnCursorMove) {
238
+ scrollPlanToFirstCitation(state, issues[state.cursor], plan, this.host);
239
+ }
240
+ };
241
+ const scrollPlanLines = (delta) => {
242
+ const m = planMetrics(plan, this.host);
243
+ const max = Math.max(0, m.planLines - m.planHeight);
244
+ state.planScrollTop = Math.min(max, Math.max(0, state.planScrollTop + delta));
245
+ };
223
246
  const processEvents = (events) => {
224
247
  let dirty = false;
225
248
  let finished = false;
249
+ let geometry;
250
+ const wheelGeometry = () => {
251
+ if (!geometry) {
252
+ const layout = this.host.getLayout();
253
+ const cols = Math.max(20, layout.columns);
254
+ const rows = Math.max(1, layout.childRows);
255
+ geometry = curateSelectionGeometry(cols, rows);
256
+ }
257
+ return geometry;
258
+ };
259
+ const isItemListWheel = (event) => event.type === "scroll-lines" &&
260
+ pointInRegion(event.column, event.row, wheelGeometry().issueList?.region);
261
+ let itemListWheelNet = 0;
262
+ let appliedItemListWheelDirection = 0;
263
+ let wheelEffects = [];
264
+ let explicitPlanEffectsAfterCursorMove = [];
265
+ const applyExplicitPlanEffect = (effect) => {
266
+ if (effect.type === "lines") {
267
+ scrollPlanLines(effect.delta);
268
+ dirty = true;
269
+ return;
270
+ }
271
+ const m = planMetrics(plan, this.host);
272
+ const max = Math.max(0, m.planLines - m.planHeight);
273
+ if (effect.type === "page") {
274
+ const step = Math.max(1, m.planHeight - PLAN_PAGE_OVERLAP);
275
+ state.planScrollTop = effect.direction === "up"
276
+ ? Math.max(0, state.planScrollTop - step)
277
+ : Math.min(max, state.planScrollTop + step);
278
+ }
279
+ else if (effect.type === "home") {
280
+ state.planScrollTop = 0;
281
+ }
282
+ else if (effect.type === "end") {
283
+ state.planScrollTop = max;
284
+ }
285
+ else {
286
+ state.planScrollTop = Math.min(max, Math.max(0, effect.top));
287
+ }
288
+ dirty = true;
289
+ };
290
+ const applyAndRecordExplicitPlanEffect = (effect) => {
291
+ applyExplicitPlanEffect(effect);
292
+ if (profile?.autoScrollOnCursorMove) {
293
+ explicitPlanEffectsAfterCursorMove.push(effect);
294
+ }
295
+ };
296
+ const noteCursorAutoScroll = () => {
297
+ if (profile?.autoScrollOnCursorMove) {
298
+ explicitPlanEffectsAfterCursorMove = [];
299
+ }
300
+ };
301
+ const syncItemListWheel = () => {
302
+ const direction = Math.sign(itemListWheelNet);
303
+ if (direction === appliedItemListWheelDirection)
304
+ return;
305
+ const effectsToReplay = appliedItemListWheelDirection === 0
306
+ ? []
307
+ : explicitPlanEffectsAfterCursorMove;
308
+ const total = navigableCount(issues.length, state, profile);
309
+ const displacement = direction - appliedItemListWheelDirection;
310
+ const cursor = ((state.cursor + displacement) % total + total) % total;
311
+ setCursor(cursor);
312
+ dirty = true;
313
+ noteCursorAutoScroll();
314
+ for (const effect of effectsToReplay)
315
+ applyAndRecordExplicitPlanEffect(effect);
316
+ appliedItemListWheelDirection = direction;
317
+ };
318
+ const flushWheelEffects = () => {
319
+ for (const effect of wheelEffects) {
320
+ if (effect.type === "plan") {
321
+ applyAndRecordExplicitPlanEffect({
322
+ type: "lines",
323
+ delta: effect.delta,
324
+ });
325
+ }
326
+ else {
327
+ syncItemListWheel();
328
+ }
329
+ }
330
+ wheelEffects = [];
331
+ };
332
+ const insertRequiresWheelCommit = (event) => {
333
+ const key = event.text.toLowerCase();
334
+ if (key === "a" && allowUserAdded(profile))
335
+ return true;
336
+ if (key === "n")
337
+ return state.cursor < issues.length;
338
+ if (allowUserAdded(profile) &&
339
+ state.cursor === issues.length + state.userAdded.length)
340
+ return false;
341
+ if (state.cursor >= issues.length) {
342
+ return allowUserAdded(profile) && key === "d";
343
+ }
344
+ const keyBindings = profile?.keyBindings ?? DEFAULT_CURATE_KEY_BINDINGS;
345
+ return keyBindings[key] !== undefined;
346
+ };
347
+ const eventRequiresWheelCommit = (event) => {
348
+ if (state.editing)
349
+ return false;
350
+ if (event.type === "insert")
351
+ return insertRequiresWheelCommit(event);
352
+ return event.type === "ctrl-c" ||
353
+ event.type === "ctrl-d" ||
354
+ (event.type === "arrow" &&
355
+ (event.direction === "up" || event.direction === "down")) ||
356
+ event.type === "scroll-page" ||
357
+ event.type === "scroll-home" ||
358
+ event.type === "scroll-end" ||
359
+ event.type === "enter" ||
360
+ event.type === "tab";
361
+ };
226
362
  for (const rawEvent of events) {
227
363
  if (finished)
228
364
  break;
@@ -230,6 +366,23 @@ export class HostBackedCuratePrompt {
230
366
  const event = state.editing
231
367
  ? rawEvent
232
368
  : aliasSelectionNavEvent(rawEvent);
369
+ if (event.type === "scroll-lines" && isItemListWheel(event)) {
370
+ if (!state.editing) {
371
+ if (!wheelEffects.some((effect) => effect.type === "item-list")) {
372
+ wheelEffects.push({ type: "item-list" });
373
+ }
374
+ itemListWheelNet += Math.sign(event.delta);
375
+ }
376
+ continue;
377
+ }
378
+ if (event.type === "scroll-lines" &&
379
+ !state.editing &&
380
+ pointInRegion(event.column, event.row, wheelGeometry().plan?.region)) {
381
+ wheelEffects.push({ type: "plan", delta: event.delta });
382
+ continue;
383
+ }
384
+ if (eventRequiresWheelCommit(event))
385
+ flushWheelEffects();
233
386
  if (state.editing) {
234
387
  if (settlingEdit) {
235
388
  dirty = true;
@@ -291,6 +444,7 @@ export class HostBackedCuratePrompt {
291
444
  state.issueScrollPinnedToCursor = true;
292
445
  continue;
293
446
  }
447
+ // Wheel-while-editing and other unhandled events are intentionally inert.
294
448
  continue;
295
449
  }
296
450
  if (event.type === "ctrl-c") {
@@ -304,58 +458,29 @@ export class HostBackedCuratePrompt {
304
458
  continue;
305
459
  }
306
460
  if (event.type === "arrow") {
307
- const total = navigableCount(issues.length, state, profile);
308
- if (event.direction === "up") {
309
- state.cursor = (state.cursor - 1 + total) % total;
310
- if (state.cursor < issues.length)
311
- state.nextCycle[state.cursor] = 0;
312
- state.issueScrollPinnedToCursor = true;
313
- if (profile?.autoScrollOnCursorMove) {
314
- dirty = scrollPlanToFirstCitation(state, issues[state.cursor], plan, this.host) || dirty;
315
- }
316
- dirty = true;
317
- }
318
- else if (event.direction === "down") {
319
- state.cursor = (state.cursor + 1) % total;
320
- if (state.cursor < issues.length)
321
- state.nextCycle[state.cursor] = 0;
322
- state.issueScrollPinnedToCursor = true;
323
- if (profile?.autoScrollOnCursorMove) {
324
- dirty = scrollPlanToFirstCitation(state, issues[state.cursor], plan, this.host) || dirty;
325
- }
461
+ if (event.direction === "up" || event.direction === "down") {
462
+ moveCursor(event.direction);
463
+ noteCursorAutoScroll();
326
464
  dirty = true;
327
465
  }
328
466
  continue;
329
467
  }
330
468
  if (event.type === "scroll-page") {
331
- const m = planMetrics(plan, this.host);
332
- const step = Math.max(1, m.planHeight - PLAN_PAGE_OVERLAP);
333
- const max = Math.max(0, m.planLines - m.planHeight);
334
- if (event.direction === "up") {
335
- state.planScrollTop = Math.max(0, state.planScrollTop - step);
336
- }
337
- else {
338
- state.planScrollTop = Math.min(max, state.planScrollTop + step);
339
- }
340
- dirty = true;
469
+ applyAndRecordExplicitPlanEffect({
470
+ type: "page",
471
+ direction: event.direction,
472
+ });
341
473
  continue;
342
474
  }
343
475
  if (event.type === "scroll-home") {
344
- state.planScrollTop = 0;
345
- dirty = true;
476
+ applyAndRecordExplicitPlanEffect({ type: "home" });
346
477
  continue;
347
478
  }
348
479
  if (event.type === "scroll-end") {
349
- const m = planMetrics(plan, this.host);
350
- state.planScrollTop = Math.max(0, m.planLines - m.planHeight);
351
- dirty = true;
480
+ applyAndRecordExplicitPlanEffect({ type: "end" });
352
481
  continue;
353
482
  }
354
483
  if (event.type === "scroll-lines") {
355
- const m = planMetrics(plan, this.host);
356
- const max = Math.max(0, m.planLines - m.planHeight);
357
- state.planScrollTop = Math.min(max, Math.max(0, state.planScrollTop + event.delta));
358
- dirty = true;
359
484
  continue;
360
485
  }
361
486
  if (event.type === "enter") {
@@ -426,8 +551,10 @@ export class HostBackedCuratePrompt {
426
551
  }
427
552
  if (scrollUnchanged && onlyOne)
428
553
  continue;
429
- state.planScrollTop = newScrollTop;
430
- dirty = true;
554
+ applyAndRecordExplicitPlanEffect({
555
+ type: "absolute",
556
+ top: newScrollTop,
557
+ });
431
558
  continue;
432
559
  }
433
560
  if (allowUserAdded(profile) &&
@@ -457,6 +584,7 @@ export class HostBackedCuratePrompt {
457
584
  dirty = true;
458
585
  }
459
586
  }
587
+ flushWheelEffects();
460
588
  if (dirty && !finished)
461
589
  this.host.scheduleParentUiRender();
462
590
  return finished;
@@ -539,6 +667,11 @@ function navigableCount(issueCount, state, profile) {
539
667
  function clampCursor(issueCount, state, profile) {
540
668
  state.cursor = Math.max(0, Math.min(state.cursor, navigableCount(issueCount, state, profile) - 1));
541
669
  }
670
+ function activeCurateRowIndex(issueCount, state) {
671
+ return state.editing?.target.kind === "user-add"
672
+ ? issueCount + state.userAdded.length
673
+ : state.cursor;
674
+ }
542
675
  function buildIssueListRows(verdict, state, width, citationLive, issueInquiry, profile) {
543
676
  const issues = verdict.issues;
544
677
  const lines = [];
@@ -556,11 +689,23 @@ function buildIssueListRows(verdict, state, width, citationLive, issueInquiry, p
556
689
  const rowEnds = [];
557
690
  let editorRow;
558
691
  let editorCol = 0;
692
+ const activeRowIndex = activeCurateRowIndex(issues.length, state);
693
+ const contextualHint = renderShortcutHints(curateHelpTokens(state, issues.length, citationLive, issueInquiry, profile));
694
+ const itemContentIndent = " ".repeat(visibleLength(`${bold}❯${reset} `));
695
+ const appendContextualHints = (rowIndex) => {
696
+ if (rowIndex !== activeRowIndex || contextualHint.length === 0)
697
+ return;
698
+ const hintWidth = Math.max(1, width - visibleLength(itemContentIndent));
699
+ lines.push("");
700
+ for (const hintLine of wrapToWidth(contextualHint, hintWidth)) {
701
+ lines.push(clipToWidth(`${itemContentIndent}${hintLine}`, width));
702
+ }
703
+ };
559
704
  for (let i = 0; i < issues.length; i++) {
560
705
  if (i > 0)
561
706
  lines.push("");
562
707
  const rowIndex = i;
563
- const isCursor = rowIndex === state.cursor;
708
+ const isCursor = rowIndex === activeRowIndex;
564
709
  const arrow = isCursor ? `${bold}❯${reset}` : " ";
565
710
  const tag = tagFor(state.decisions[i], profile);
566
711
  const issue = issues[i];
@@ -613,6 +758,7 @@ function buildIssueListRows(verdict, state, width, citationLive, issueInquiry, p
613
758
  }
614
759
  }
615
760
  }
761
+ appendContextualHints(rowIndex);
616
762
  rowEnds[rowIndex] = lines.length;
617
763
  }
618
764
  if (allowUserAdded(profile)) {
@@ -620,7 +766,7 @@ function buildIssueListRows(verdict, state, width, citationLive, issueInquiry, p
620
766
  const rowIndex = issues.length + i;
621
767
  if (rowIndex > 0)
622
768
  lines.push("");
623
- const isCursor = rowIndex === state.cursor;
769
+ const isCursor = rowIndex === activeRowIndex;
624
770
  const arrow = isCursor ? `${bold}❯${reset}` : " ";
625
771
  const head = `${arrow} ${userAddedTag()} `;
626
772
  const headWidth = visibleLength(head);
@@ -646,6 +792,7 @@ function buildIssueListRows(verdict, state, width, citationLive, issueInquiry, p
646
792
  }
647
793
  }
648
794
  }
795
+ appendContextualHints(rowIndex);
649
796
  rowEnds[rowIndex] = lines.length;
650
797
  }
651
798
  }
@@ -653,7 +800,7 @@ function buildIssueListRows(verdict, state, width, citationLive, issueInquiry, p
653
800
  const rowIndex = issues.length + state.userAdded.length;
654
801
  if (rowIndex > 0)
655
802
  lines.push("");
656
- const isCursor = rowIndex === state.cursor;
803
+ const isCursor = rowIndex === activeRowIndex;
657
804
  const arrow = isCursor ? `${bold}❯${reset}` : " ";
658
805
  rowStarts[rowIndex] = lines.length;
659
806
  if (state.editing?.target.kind === "user-add") {
@@ -667,13 +814,10 @@ function buildIssueListRows(verdict, state, width, citationLive, issueInquiry, p
667
814
  else {
668
815
  lines.push(clipToWidth(`${arrow} ${dim}+ Add feedback${reset}`, width));
669
816
  }
817
+ appendContextualHints(rowIndex);
670
818
  rowEnds[rowIndex] = lines.length;
671
819
  }
672
- lines.push("");
673
- for (const l of wrapToWidth(renderShortcutHints(curateHelpTokens(state, issues.length, citationLive, issueInquiry, profile)), width)) {
674
- lines.push(l);
675
- }
676
- return { lines, rowStarts, rowEnds, editorRow, editorCol };
820
+ return { lines, rowStarts, rowEnds, activeRowIndex, editorRow, editorCol };
677
821
  }
678
822
  function buildLeftPane(verdict, state, width, rows, globalHintText, citationLive, issueInquiry, profile) {
679
823
  const pinnedHint = clipToWidth(globalHintText, width);
@@ -684,9 +828,9 @@ function buildLeftPane(verdict, state, width, rows, globalHintText, citationLive
684
828
  cursor: { row: 0, col: 0 },
685
829
  };
686
830
  }
687
- const { lines, rowStarts, rowEnds, editorRow, editorCol } = buildIssueListRows(verdict, state, width, citationLive, issueInquiry, profile);
688
- const activeStart = rowStarts[state.cursor] ?? 0;
689
- const activeEndExclusive = rowEnds[state.cursor] ?? lines.length;
831
+ const { lines, rowStarts, rowEnds, activeRowIndex, editorRow, editorCol, } = buildIssueListRows(verdict, state, width, citationLive, issueInquiry, profile);
832
+ const activeStart = rowStarts[activeRowIndex] ?? 0;
833
+ const activeEndExclusive = rowEnds[activeRowIndex] ?? lines.length;
690
834
  // Prefer to show the entire active block; if it is taller than `rows`,
691
835
  // fall back to the editor row (when editing) or the header row.
692
836
  const total = lines.length;