@north-light/crouter 0.3.196 → 0.3.198
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/client.d.ts +2 -2
- package/dist/api/dto/inbox.d.ts +46 -0
- package/dist/builtin-memory/00-runtime-base.md +3 -3
- package/dist/builtin-memory/internal/nodes-and-canvas.md +1 -1
- package/dist/builtin-memory/internal/storage-tiers.md +1 -1
- package/dist/builtin-memory/wedged-child-on-runaway-bash.md +1 -1
- package/dist/clients/attach/render/chat-view.d.ts +3 -8
- package/dist/clients/attach/render/chat-view.js +3 -24
- package/dist/clients/attach/render/markdown-source.js +0 -6
- package/dist/clients/attach/render/tool-calls.js +16 -2
- package/dist/clients/attach/viewer.js +613 -602
- package/dist/clients/inbox/__tests__/serial/inbox-controller.test.js +2 -2
- package/dist/clients/inbox/__tests__/serial/mount-panel.test.js +11 -4
- package/dist/clients/inbox/controller.js +4 -4
- package/dist/clients/inbox/page-adapter.d.ts +2 -1
- package/dist/clients/inbox/tui/render.js +46 -25
- package/dist/clients/inbox/tui/slots.d.ts +1 -3
- package/dist/clients/inbox/tui/slots.js +8 -37
- package/dist/clients/inbox/tui/types.d.ts +4 -3
- package/dist/commands/__tests__/human.test.js +160 -23
- package/dist/commands/canvas-browse.js +1 -1
- package/dist/commands/human/doc.js +21 -74
- package/dist/commands/human/html.d.ts +2 -0
- package/dist/commands/human/html.js +81 -0
- package/dist/commands/human/prompts.d.ts +5 -4
- package/dist/commands/human/prompts.js +90 -168
- package/dist/commands/human/shared.d.ts +5 -6
- package/dist/commands/human/shared.js +13 -61
- package/dist/commands/human.js +7 -2
- package/dist/core/__tests__/daemon-boot.test.js +7 -4
- package/dist/core/__tests__/dead-node-policy-table.test.js +20 -36
- package/dist/core/__tests__/human-deliver.test.js +28 -37
- package/dist/core/__tests__/seam/broker-crash-teardown.test.js +13 -11
- package/dist/core/__tests__/seam/dormancy-release.test.js +63 -4
- package/dist/core/__tests__/serial/human-deliver-e2e.test.js +3 -13
- package/dist/core/canvas/__tests__/attention.test.js +2 -2
- package/dist/core/canvas/__tests__/render-remote.test.js +2 -2
- package/dist/core/canvas/browse/app.d.ts +1 -1
- package/dist/core/canvas/browse/app.js +21 -3
- package/dist/core/canvas/browse/render.d.ts +4 -0
- package/dist/core/canvas/browse/render.js +5 -1
- package/dist/core/canvas/canvas.d.ts +26 -0
- package/dist/core/canvas/canvas.js +55 -0
- package/dist/core/command.js +6 -11
- package/dist/core/config.js +3 -2
- package/dist/core/help.d.ts +3 -0
- package/dist/core/human/__tests__/html-markdown.test.d.ts +1 -0
- package/dist/core/human/__tests__/html-markdown.test.js +52 -0
- package/dist/core/human/__tests__/page-catalog.test.d.ts +1 -0
- package/dist/core/human/__tests__/page-catalog.test.js +16 -0
- package/dist/core/human/__tests__/page-render.test.js +40 -23
- package/dist/core/human/__tests__/page-tickets.test.js +48 -27
- package/dist/core/human/__tests__/page.test.js +48 -65
- package/dist/core/human/__tests__/serial/inbox-core.test.js +5 -15
- package/dist/core/human/answer-text.d.ts +3 -0
- package/dist/core/human/answer-text.js +98 -0
- package/dist/core/human/answer.d.ts +51 -0
- package/dist/core/human/answer.js +125 -0
- package/dist/core/human/component-docs.d.ts +14 -0
- package/dist/core/human/component-docs.js +161 -0
- package/dist/core/human/html-markdown.d.ts +3 -0
- package/dist/core/human/html-markdown.js +288 -0
- package/dist/core/human/page-catalog.d.ts +19 -3
- package/dist/core/human/page-catalog.js +73 -16
- package/dist/core/human/page-render.d.ts +3 -2
- package/dist/core/human/page-render.js +19 -45
- package/dist/core/human/page-schema.d.ts +108 -8
- package/dist/core/human/page-schema.js +88 -31
- package/dist/core/human/page-synth.d.ts +2 -4
- package/dist/core/human/page-synth.js +23 -7
- package/dist/core/human/page.d.ts +14 -7
- package/dist/core/human/page.js +178 -90
- package/dist/core/human/review-schema.d.ts +1 -0
- package/dist/core/human/review-schema.js +1 -1
- package/dist/core/human/scan.d.ts +3 -2
- package/dist/core/human/scan.js +7 -8
- package/dist/core/human/summary.d.ts +4 -7
- package/dist/core/human/summary.js +4 -60
- package/dist/core/human/tickets.d.ts +10 -9
- package/dist/core/human/tickets.js +5 -3
- package/dist/core/human/types.d.ts +4 -0
- package/dist/core/keybindings/catalog.d.ts +2 -2
- package/dist/core/keybindings/catalog.js +1 -0
- package/dist/core/review/realize.js +9 -1
- package/dist/core/runtime/boot-root.js +6 -1
- package/dist/core/runtime/broker.js +8 -6
- package/dist/core/runtime/busy.d.ts +4 -3
- package/dist/core/runtime/busy.js +4 -3
- package/dist/core/runtime/spawn.js +4 -4
- package/dist/core/termrender/display.d.ts +7 -3
- package/dist/core/termrender/display.js +45 -9
- package/dist/core/termrender/termrender.d.ts +3 -12
- package/dist/core/termrender/termrender.js +6 -37
- package/dist/core/user-settings.d.ts +17 -2
- package/dist/core/user-settings.js +32 -11
- package/dist/daemon/api/handlers/human.js +1 -1
- package/dist/daemon/api/handlers/inbox.js +22 -7
- package/dist/daemon/cron-run.js +16 -2
- package/dist/daemon/crtrd.js +1 -1
- package/dist/daemon/fleet.d.ts +22 -10
- package/dist/daemon/fleet.js +43 -24
- package/dist/daemon/human/finish.d.ts +2 -1
- package/dist/daemon/human/finish.js +45 -28
- package/dist/daemon/human/sweep.js +4 -2
- package/dist/daemon/reconcilers/broker-supervision.js +11 -8
- package/dist/daemon/reconcilers/dormant-inbox.js +11 -6
- package/dist/daemon/reconcilers/live-obligation.d.ts +21 -1
- package/dist/daemon/reconcilers/live-obligation.js +30 -2
- package/dist/daemon/reconcilers/storage-maintenance.d.ts +5 -0
- package/dist/daemon/reconcilers/storage-maintenance.js +28 -1
- package/dist/daemon/review/sweep.js +12 -1
- package/dist/pages/bundle.css +1 -1
- package/dist/pages/bundle.js +1008 -577
- package/dist/pages/comments.d.ts +29 -0
- package/dist/pages/comments.js +51 -0
- package/dist/pages/controls.d.ts +98 -0
- package/dist/pages/controls.js +261 -0
- package/dist/pages/elements/cards.d.ts +15 -4
- package/dist/pages/elements/cards.js +299 -186
- package/dist/pages/elements/chart.d.ts +22 -0
- package/dist/pages/elements/chart.js +107 -91
- package/dist/pages/elements/options.d.ts +9 -0
- package/dist/pages/elements/options.js +268 -155
- package/dist/pages/elements/pages.d.ts +6 -0
- package/dist/pages/elements/pages.js +60 -38
- package/dist/pages/elements/slot.d.ts +5 -0
- package/dist/pages/elements/slot.js +17 -10
- package/dist/pages/elements/table.d.ts +17 -0
- package/dist/pages/elements/table.js +336 -228
- package/dist/pages/elements/text.d.ts +9 -3
- package/dist/pages/elements/text.js +350 -143
- package/dist/pages/host.d.ts +0 -24
- package/dist/pages/host.js +0 -17
- package/dist/pages/readonly.d.ts +24 -0
- package/dist/pages/readonly.js +31 -0
- package/dist/pages/responses.d.ts +37 -0
- package/dist/pages/responses.js +56 -0
- package/dist/pi-extensions/canvas-bash-valve.d.ts +9 -1
- package/dist/pi-extensions/canvas-bash-valve.js +12 -8
- package/dist/types.d.ts +19 -5
- package/dist/types.js +2 -1
- package/package.json +1 -1
- package/runtime.lock.json +2 -2
- package/scripts/install-runtime.mjs +19 -24
- package/dist/clients/attach/render/html-markdown.d.ts +0 -13
- package/dist/clients/attach/render/html-markdown.js +0 -206
- package/dist/core/human/markdown-html.d.ts +0 -8
- package/dist/core/human/markdown-html.js +0 -581
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { statSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
|
-
import { closeFocusRow, listFocuses, listNodes, pruneToLimit, } from '../../core/canvas/index.js';
|
|
3
|
+
import { closeFocusRow, listFocuses, listNodes, pruneToLimit, reapGhostRows, } from '../../core/canvas/index.js';
|
|
4
4
|
import { isSafeNodeId, jobDir, nodeDir } from '../../core/canvas/paths.js';
|
|
5
5
|
import { emitEvent } from '../../core/events/emit.js';
|
|
6
6
|
import { operationIdContext } from '../../core/events/operation-id.js';
|
|
@@ -12,20 +12,47 @@ export const DEAD_REAP_GRACE_MS = 10 * 60_000;
|
|
|
12
12
|
const AUTO_PRUNE_MAX = 2000;
|
|
13
13
|
const PRUNE_INTERVAL_MS = 60 * 60 * 1000;
|
|
14
14
|
const SPARE_SWEEP_INTERVAL_MS = 60 * 1000;
|
|
15
|
+
const GHOST_SWEEP_INTERVAL_MS = 60 * 1000;
|
|
15
16
|
/** Recurring storage cleanup. The in-memory throttle clocks intentionally reset
|
|
16
17
|
* on daemon boot, so the first tick runs both full sweeps. */
|
|
17
18
|
export class StorageMaintenanceReconciler {
|
|
18
19
|
lastPruneAt = Number.NEGATIVE_INFINITY;
|
|
19
20
|
lastSpareSweepAt = Number.NEGATIVE_INFINITY;
|
|
21
|
+
lastGhostSweepAt = Number.NEGATIVE_INFINITY;
|
|
20
22
|
run(now) {
|
|
21
23
|
// Placement reap MUST precede focus GC, so GC catches a focus row the reap
|
|
22
24
|
// strands. Both run after dormant-inbox reconciliation, so a same-tick
|
|
23
25
|
// revive has already had the chance to re-anchor its focus.
|
|
24
26
|
this.reapDeadResidue(now);
|
|
25
27
|
this.gcStaleFocuses();
|
|
28
|
+
this.reapGhostRows(now);
|
|
26
29
|
this.autoPrune(now);
|
|
27
30
|
this.gcWarmPool(now);
|
|
28
31
|
}
|
|
32
|
+
/** Drop rows whose on-disk node dir is gone. Such a row can never be revived,
|
|
33
|
+
* focused, or closed — every one of those resolves the node through meta.json —
|
|
34
|
+
* so it sits in the roster jamming the surfaces that try. One readdir per sweep. */
|
|
35
|
+
reapGhostRows(now) {
|
|
36
|
+
if (now - this.lastGhostSweepAt < GHOST_SWEEP_INTERVAL_MS)
|
|
37
|
+
return;
|
|
38
|
+
this.lastGhostSweepAt = now;
|
|
39
|
+
operationIdContext.fresh(() => {
|
|
40
|
+
try {
|
|
41
|
+
const reaped = reapGhostRows();
|
|
42
|
+
if (reaped.length > 0) {
|
|
43
|
+
emitEvent({
|
|
44
|
+
level: 'info',
|
|
45
|
+
event: 'canvas.ghost_rows.reaped',
|
|
46
|
+
outcome: 'succeeded',
|
|
47
|
+
fields: { reaped_count: reaped.length, reaped_ids: reaped },
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
catch (err) {
|
|
52
|
+
emitEvent({ level: 'error', event: 'canvas.ghost_rows.reap_failed', error: err });
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
29
56
|
/** Milliseconds since meta/telemetry was last written. Inbox activity is
|
|
30
57
|
* deliberately excluded: children can keep writing a dead manager's inbox. */
|
|
31
58
|
msSinceDiskActivity(nodeId, now) {
|
|
@@ -4,6 +4,8 @@ import { reviewPath } from '../../core/human/convention.js';
|
|
|
4
4
|
import { ticketDir } from '../../core/human/root.js';
|
|
5
5
|
import { submitReview } from '../../core/human/tickets.js';
|
|
6
6
|
import { reviewsRoot } from '../../core/canvas/paths.js';
|
|
7
|
+
import { getNode } from '../../core/canvas/index.js';
|
|
8
|
+
import { loadProfileManifest } from '../../core/profiles/manifest.js';
|
|
7
9
|
import { projectReviewResult } from '../../core/review/project.js';
|
|
8
10
|
import { realizeReview } from '../../core/review/realize.js';
|
|
9
11
|
import { listBindingReviews, listReviews, markProjected, markProjectionError, } from '../../core/review/store.js';
|
|
@@ -23,6 +25,12 @@ function republishTicketReview(review) {
|
|
|
23
25
|
const dir = ticketDir(review.bridge_node_id);
|
|
24
26
|
if (existsSync(reviewPath(dir)))
|
|
25
27
|
return;
|
|
28
|
+
const origin = getNode(review.origin_node_id);
|
|
29
|
+
if (origin === null)
|
|
30
|
+
throw new Error(`ticket review origin is missing: ${review.origin_node_id}`);
|
|
31
|
+
const profileName = origin.profile_id == null
|
|
32
|
+
? undefined
|
|
33
|
+
: loadProfileManifest(origin.profile_id).manifest.name;
|
|
26
34
|
submitReview({
|
|
27
35
|
dir,
|
|
28
36
|
review: {
|
|
@@ -30,7 +38,10 @@ function republishTicketReview(review) {
|
|
|
30
38
|
...(review.output_path === null ? {} : { output: review.output_path }),
|
|
31
39
|
title: basename(review.file),
|
|
32
40
|
subtitle: review.subtitle,
|
|
33
|
-
source: {
|
|
41
|
+
source: {
|
|
42
|
+
nodeId: review.origin_node_id,
|
|
43
|
+
...(profileName === undefined ? {} : { profileName }),
|
|
44
|
+
},
|
|
34
45
|
blockedSince: review.created,
|
|
35
46
|
},
|
|
36
47
|
});
|
package/dist/pages/bundle.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:where(:root,:host){color-scheme:light dark;--crtr-color-background: #ffffff;--crtr-color-surface: #f7f7f8;--crtr-color-surface-hover: #eeeeef;--crtr-color-text: #1c1c1f;--crtr-color-text-muted: #68686f;--crtr-color-border: #d9d9de;--crtr-color-accent: #5753c9;--crtr-color-accent-contrast: #ffffff;--crtr-color-danger: #c73535;--crtr-color-focus: #706bea;--crtr-chart-1: #5753c9;--crtr-chart-2: #2c8c75;--crtr-chart-3: #cf7c2a;--crtr-chart-4: #b84c84;--crtr-chart-5: #477eb8;--crtr-font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;--crtr-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;--crtr-font-size: .875rem;--crtr-line-height: 1.5;--crtr-radius-small: .375rem;--crtr-radius-medium: .625rem;--crtr-space-1: .25rem;--crtr-space-2: .5rem;--crtr-space-3: .75rem;--crtr-space-4: 1rem;--crtr-shadow: 0 1px 2px rgb(0 0 0 / .08)}:where(crtr-options,crtr-text,crtr-table,crtr-cards,crtr-chart,crtr-pages,crtr-page,crtr-slot){color:var(--crtr-color-text);font-family:var(--crtr-font-family);font-size:var(--crtr-font-size);line-height:var(--crtr-line-height)}@media(prefers-color-scheme:dark){:where(:root,:host){--crtr-color-background: #161618;--crtr-color-surface: #222225;--crtr-color-surface-hover: #2d2d31;--crtr-color-text: #f2f2f3;--crtr-color-text-muted: #aaaab1;--crtr-color-border: #414147;--crtr-color-accent: #9692ff;--crtr-color-accent-contrast: #18181b;--crtr-color-danger: #f06a6a;--crtr-color-focus: #aaa7ff}}
|
|
1
|
+
:where(:root,:host){color-scheme:var(--crtr-color-scheme, light dark);--crtr-color-background: #ffffff;--crtr-color-surface: #f7f7f8;--crtr-color-surface-hover: #eeeeef;--crtr-color-text: #1c1c1f;--crtr-color-text-muted: #68686f;--crtr-color-border: #d9d9de;--crtr-color-accent: #5753c9;--crtr-color-accent-contrast: #ffffff;--crtr-color-danger: #c73535;--crtr-color-focus: #706bea;--crtr-chart-1: #5753c9;--crtr-chart-2: #2c8c75;--crtr-chart-3: #cf7c2a;--crtr-chart-4: #b84c84;--crtr-chart-5: #477eb8;--crtr-font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;--crtr-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;--crtr-font-size: .875rem;--crtr-line-height: 1.5;--crtr-radius-small: .375rem;--crtr-radius-medium: .625rem;--crtr-space-1: .25rem;--crtr-space-2: .5rem;--crtr-space-3: .75rem;--crtr-space-4: 1rem;--crtr-shadow: 0 1px 2px rgb(0 0 0 / .08)}:where(crtr-options){color:var(--crtr-options-color, var(--crtr-color-text));font-family:var(--crtr-options-font-family, var(--crtr-font-family));font-size:var(--crtr-options-font-size, var(--crtr-font-size));line-height:var(--crtr-options-line-height, var(--crtr-line-height))}:where(crtr-text){color:var(--crtr-text-color, var(--crtr-color-text));font-family:var(--crtr-text-font-family, var(--crtr-font-family));font-size:var(--crtr-text-font-size, var(--crtr-font-size));line-height:var(--crtr-text-line-height, var(--crtr-line-height))}:where(crtr-table){color:var(--crtr-table-color, var(--crtr-color-text));font-family:var(--crtr-table-font-family, var(--crtr-font-family));font-size:var(--crtr-table-font-size, var(--crtr-font-size));line-height:var(--crtr-table-line-height, var(--crtr-line-height))}:where(crtr-cards){color:var(--crtr-cards-color, var(--crtr-color-text));font-family:var(--crtr-cards-font-family, var(--crtr-font-family));font-size:var(--crtr-cards-font-size, var(--crtr-font-size));line-height:var(--crtr-cards-line-height, var(--crtr-line-height))}:where(crtr-chart){color:var(--crtr-chart-color, var(--crtr-color-text));font-family:var(--crtr-chart-font-family, var(--crtr-font-family));font-size:var(--crtr-chart-font-size, var(--crtr-font-size));line-height:var(--crtr-chart-line-height, var(--crtr-line-height))}:where(crtr-pages,crtr-page){color:var(--crtr-page-color, var(--crtr-color-text));font-family:var(--crtr-page-font-family, var(--crtr-font-family));font-size:var(--crtr-page-font-size, var(--crtr-font-size));line-height:var(--crtr-page-line-height, var(--crtr-line-height))}:where(crtr-slot){color:var(--crtr-slot-color, var(--crtr-color-text));font-family:var(--crtr-slot-font-family, var(--crtr-font-family));font-size:var(--crtr-slot-font-size, var(--crtr-font-size));line-height:var(--crtr-slot-line-height, var(--crtr-line-height))}@media(prefers-color-scheme:dark){:where(:root,:host){--crtr-color-background: #161618;--crtr-color-surface: #222225;--crtr-color-surface-hover: #2d2d31;--crtr-color-text: #f2f2f3;--crtr-color-text-muted: #aaaab1;--crtr-color-border: #414147;--crtr-color-accent: #9692ff;--crtr-color-accent-contrast: #18181b;--crtr-color-danger: #f06a6a;--crtr-color-focus: #aaa7ff;--crtr-shadow: 0 1px 2px rgb(0 0 0 / .45);--crtr-chart-1: #9692ff;--crtr-chart-2: #4fc3a4;--crtr-chart-3: #eba05a;--crtr-chart-4: #e281b4;--crtr-chart-5: #71b0e6}}
|