@north-light/cli 0.3.696 → 0.3.698

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.
@@ -284,6 +284,7 @@ export class ChatView {
284
284
  /** Inline page blocks placed in this transcript, by page id — one block per
285
285
  * page, so a `--replace` revision refreshes the block already on screen. */
286
286
  pageBlocks = new Map();
287
+ pageRefresh = false;
287
288
  /** The person's inbox answers in the live region, each with its leading
288
289
  * spacer. Summary mode hides them with the settled pages they answer. */
289
290
  inboxAnswers = new Set();
@@ -847,9 +848,8 @@ export class ChatView {
847
848
  this.historyContainer.markDirty();
848
849
  this.tui.requestRender();
849
850
  }
850
- /** Replies only and Messages + summaries hide the back-and-forth with the
851
- * person: every settled inline page and every answer they gave from their
852
- * inbox. A page still awaiting an answer stays on screen. */
851
+ /** Replies only and Messages + summaries hide every answer the person gave
852
+ * from their inbox. A settled inline page hides in every mode. */
853
853
  hidesInboxExchange() {
854
854
  return this.showsGroupSummaries();
855
855
  }
@@ -858,7 +858,7 @@ export class ChatView {
858
858
  for (const component of this.inboxAnswers)
859
859
  this.historyContainer.setHidden(component, hide);
860
860
  for (const block of this.pageBlocks.values())
861
- this.historyContainer.setHidden(block, hide && block.settled);
861
+ this.historyContainer.setHidden(block, block.settled);
862
862
  }
863
863
  /** A broker rewrite landed for one turn. Stored first: it may precede the
864
864
  * turn's events, and snapshot rebuilds defer it through the writer gate. */
@@ -1789,7 +1789,7 @@ export class ChatView {
1789
1789
  async loadPageBlock(block) {
1790
1790
  if (!(await block.refresh()))
1791
1791
  return;
1792
- this.historyContainer.setHidden(block, this.hidesInboxExchange() && block.settled);
1792
+ this.historyContainer.setHidden(block, block.settled);
1793
1793
  this.historyContainer.markDirty(block);
1794
1794
  this.tui.requestRender();
1795
1795
  }
@@ -1805,19 +1805,22 @@ export class ChatView {
1805
1805
  this.historyContainer.markDirty(component);
1806
1806
  this.tui.requestRender();
1807
1807
  }
1808
- /** Re-read every placed page through the daemon. Driven by the viewer's
1809
- * ticket-activity watcher, so an answer, a cancellation, or a `--replace`
1810
- * revision lands on the block already anchored in the transcript. */
1808
+ /** Re-read every unsettled page through the daemon. Driven by the viewer's
1809
+ * chrome poll, so an answer, a cancellation, or a `--replace` revision lands
1810
+ * on the block already anchored in the transcript, from any machine. */
1811
1811
  async refreshPageBlocks() {
1812
- const blocks = [...this.pageBlocks.values()];
1812
+ if (this.pageRefresh)
1813
+ return;
1814
+ const blocks = [...this.pageBlocks.values()].filter((block) => !block.settled);
1815
+ this.pageRefresh = true;
1813
1816
  const changed = await Promise.all(blocks.map(async (block) => {
1814
1817
  const moved = await block.refresh();
1815
1818
  if (moved) {
1816
- this.historyContainer.setHidden(block, this.hidesInboxExchange() && block.settled);
1819
+ this.historyContainer.setHidden(block, block.settled);
1817
1820
  this.historyContainer.markDirty(block);
1818
1821
  }
1819
1822
  return moved;
1820
- }));
1823
+ })).finally(() => { this.pageRefresh = false; });
1821
1824
  if (changed.some(Boolean))
1822
1825
  this.tui.requestRender();
1823
1826
  }
@@ -54,7 +54,6 @@ import { openReviewSurfaceById, takeStartupReviewId } from '../inbox/review/laun
54
54
  import { ViewerSurfaceHost } from './session/surface-host.js';
55
55
  import { createInboxSurface } from '../inbox/surface.js';
56
56
  import { loadProfileManifest } from '../../core/profiles/manifest.js';
57
- import { watchInboxActivity } from '../../core/human/root.js';
58
57
  import { byNewestFirst, inboxRowFromDTO } from '../inbox/dto-adapt.js';
59
58
  import { cliClient } from '../../commands/api-client.js';
60
59
  import { installPersonSettingsDto, loadPersonSettingsViaApi } from '../../commands/person-settings.js';
@@ -276,12 +275,6 @@ onConnected) {
276
275
  return [...merged.values()].sort(byNewestFirst);
277
276
  } }),
278
277
  });
279
- // Page mutations (publish, --replace, answer, cancel) touch the activity file
280
- // whether or not the page went to the inbox, so transcript blocks refresh live.
281
- const stopPageWatch = remote ? () => { } : watchInboxActivity(() => {
282
- void chatView.refreshPageBlocks();
283
- void strip.refresh();
284
- });
285
278
  // The inline ticket page under the editor — what Enter on a strip row opens.
286
279
  // Review tickets and unreadable pages fall back to the full-pane inbox.
287
280
  const ticketPanel = createTicketPanel(ctx, {
@@ -452,7 +445,7 @@ onConnected) {
452
445
  refreshIdentity: () => identity.refresh(),
453
446
  renderFooter,
454
447
  renderExtensionWidgets,
455
- refreshInFlightTools: () => chatView.refreshInFlightTools(),
448
+ refreshInFlightTools: () => { chatView.refreshInFlightTools(); void chatView.refreshPageBlocks(); },
456
449
  pollGit: editorChrome.pollGit,
457
450
  });
458
451
  // Input layer — session/input-wiring.ts answers every hook InputController
@@ -669,7 +662,6 @@ onConnected) {
669
662
  removeFileOpenListener();
670
663
  removeRejectionGuard();
671
664
  documentLinks.dispose();
672
- stopPageWatch();
673
665
  try {
674
666
  chatView.dispose();
675
667
  }
@@ -136,7 +136,7 @@ const nodeBashBackground = defineLeaf({
136
136
  if (node === null) {
137
137
  throw new InputError({ error: 'not_found', message: `no node: ${id}`, next: 'List nodes with `crtr node inspect list`.' });
138
138
  }
139
- const jobs = backgroundRunningBashJobs(node.paths.context_dir);
139
+ const jobs = backgroundRunningBashJobs(contextDir(node.node_id, node.grantee));
140
140
  const now = Date.now();
141
141
  const elapsed = jobs.map((job) => ({ job_id: job.jobId, elapsed_ms: now - (jobStartedAtMs(job.jobId) ?? now) }));
142
142
  // No tmux toast. A tmux status-line message commandeers the whole client's
@@ -73,15 +73,16 @@ export function buildScopedModelsData(id, session) {
73
73
  }
74
74
  export function buildGetTreeData(id, session, boundaryReviewId) {
75
75
  const manager = session.sessionManager;
76
- const tree = boundaryReviewId !== undefined ? boundaryRootedTree(manager.getTree(), boundaryReviewId) : manager.getTree();
76
+ const fullTree = boundaryReviewId !== undefined ? boundaryRootedTree(manager.getTree(), boundaryReviewId) : manager.getTree();
77
77
  const visibleEntryIds = new Set();
78
- const collectEntryIds = (nodes) => {
79
- for (const node of nodes) {
80
- visibleEntryIds.add(node.entry.id);
81
- collectEntryIds(node.children);
82
- }
83
- };
84
- collectEntryIds(tree);
78
+ // A copy without tool output: the picker shows a tool result as its call, and the output is most of a long conversation's bytes.
79
+ const withoutToolOutput = (nodes) => nodes.map((node) => {
80
+ visibleEntryIds.add(node.entry.id);
81
+ const { entry } = node;
82
+ const light = entry.type === 'message' && entry.message.role === 'toolResult' ? { ...entry, message: { ...entry.message, content: [], details: undefined } } : entry;
83
+ return { ...node, entry: light, children: withoutToolOutput(node.children) };
84
+ });
85
+ const tree = withoutToolOutput(fullTree);
85
86
  const forkPoints = session.getUserMessagesForForking()
86
87
  .filter((user) => visibleEntryIds.has(user.entryId))
87
88
  .map((user) => ({ id: user.entryId, text: user.text, timestamp: manager.getEntry(user.entryId)?.timestamp }));
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@north-light/api",
3
- "version": "0.3.696",
3
+ "version": "0.3.698",
4
4
  "description": "Typed crtrd /v1 API contract — DTOs, route builders, the error contract, the CrtrClient, and the command-plugin manifest format. Zero runtime dependencies.",
5
5
  "type": "module",
6
6
  "main": "./dist/api/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@north-light/identity",
3
- "version": "0.3.696",
3
+ "version": "0.3.698",
4
4
  "description": "Northlight access-token verification and scope rules",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@north-light/plugin",
3
- "version": "0.3.696",
3
+ "version": "0.3.698",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -27,8 +27,8 @@
27
27
  "postpack": "node ../../scripts/pack-minify.mjs postpack packages/crouter-plugin"
28
28
  },
29
29
  "dependencies": {
30
- "@north-light/api": "0.3.696",
31
- "@north-light/identity": "0.3.696"
30
+ "@north-light/api": "0.3.698",
31
+ "@north-light/identity": "0.3.698"
32
32
  },
33
33
  "license": "UNLICENSED",
34
34
  "publishConfig": {
package/runtime.lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@north-light/cli",
3
- "version": "0.3.696",
3
+ "version": "0.3.698",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@north-light/cli",
9
- "version": "0.3.696",
9
+ "version": "0.3.698",
10
10
  "hasInstallScript": true,
11
11
  "license": "UNLICENSED",
12
12
  "workspaces": [
@@ -28,8 +28,8 @@
28
28
  "@milkdown/preset-gfm": "^7.22.3",
29
29
  "@milkdown/prose": "^7.22.3",
30
30
  "@milkdown/utils": "^7.22.3",
31
- "@north-light/identity": "0.3.696",
32
- "@north-light/plugin": "0.3.696",
31
+ "@north-light/identity": "0.3.698",
32
+ "@north-light/plugin": "0.3.698",
33
33
  "cron-parser": "^5.6.0",
34
34
  "esbuild": "0.28.2",
35
35
  "jose": "^6.2.12",
@@ -10667,17 +10667,17 @@
10667
10667
  },
10668
10668
  "packages/crouter-api": {
10669
10669
  "name": "@north-light/api",
10670
- "version": "0.3.696",
10670
+ "version": "0.3.698",
10671
10671
  "license": "UNLICENSED"
10672
10672
  },
10673
10673
  "packages/crouter-env-docker": {
10674
10674
  "name": "@north-light/env-docker",
10675
- "version": "0.3.696",
10675
+ "version": "0.3.698",
10676
10676
  "license": "UNLICENSED"
10677
10677
  },
10678
10678
  "packages/crouter-identity": {
10679
10679
  "name": "@north-light/identity",
10680
- "version": "0.3.696",
10680
+ "version": "0.3.698",
10681
10681
  "license": "UNLICENSED",
10682
10682
  "dependencies": {
10683
10683
  "jose": "^6.2.1"
@@ -10685,21 +10685,21 @@
10685
10685
  },
10686
10686
  "packages/crouter-plugin": {
10687
10687
  "name": "@north-light/plugin",
10688
- "version": "0.3.696",
10688
+ "version": "0.3.698",
10689
10689
  "license": "UNLICENSED",
10690
10690
  "dependencies": {
10691
- "@north-light/api": "0.3.696",
10692
- "@north-light/identity": "0.3.696"
10691
+ "@north-light/api": "0.3.698",
10692
+ "@north-light/identity": "0.3.698"
10693
10693
  }
10694
10694
  },
10695
10695
  "packages/crouter-sdk": {
10696
10696
  "name": "@north-light/sdk",
10697
- "version": "0.3.696",
10697
+ "version": "0.3.698",
10698
10698
  "license": "UNLICENSED",
10699
10699
  "dependencies": {
10700
- "@north-light/api": "0.3.696",
10701
- "@north-light/identity": "0.3.696",
10702
- "@north-light/plugin": "0.3.696",
10700
+ "@north-light/api": "0.3.698",
10701
+ "@north-light/identity": "0.3.698",
10702
+ "@north-light/plugin": "0.3.698",
10703
10703
  "jose": "^6.2.1"
10704
10704
  },
10705
10705
  "bin": {