@crouton-kit/crouter 0.3.83 → 0.3.85
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/clients/attach/__tests__/attach-keybindings.test.js +14 -1
- package/dist/clients/attach/__tests__/crtr-output-render.test.js +5 -4
- package/dist/clients/attach/attach-cmd.d.ts +1 -1
- package/dist/clients/attach/attach-cmd.js +491 -491
- package/dist/commands/human/prompts.js +12 -6
- package/dist/commands/human.js +4 -2
- package/dist/commands/node.js +2 -1
- package/dist/commands/sys/__tests__/setup-front-door.test.js +8 -21
- package/dist/commands/sys/setup-core.d.ts +5 -17
- package/dist/commands/sys/setup-core.js +12 -36
- package/dist/commands/sys/setup.js +6 -4
- package/dist/core/__tests__/boot.test.js +141 -6
- package/dist/core/__tests__/pid-identity-match.test.js +63 -1
- package/dist/core/__tests__/tmux-surface.test.js +180 -2
- package/dist/core/canvas/boot.d.ts +44 -0
- package/dist/core/canvas/boot.js +35 -2
- package/dist/core/canvas/canvas.d.ts +40 -0
- package/dist/core/canvas/canvas.js +65 -1
- package/dist/core/canvas/pid.d.ts +43 -0
- package/dist/core/canvas/pid.js +57 -11
- package/dist/core/keybindings/__tests__/inbox-affordance.test.d.ts +1 -0
- package/dist/core/keybindings/__tests__/inbox-affordance.test.js +38 -0
- package/dist/core/keybindings/__tests__/resolve.test.js +1 -0
- package/dist/core/keybindings/catalog.d.ts +2 -2
- package/dist/core/keybindings/catalog.js +1 -0
- package/dist/core/keybindings/inbox.d.ts +21 -0
- package/dist/core/keybindings/inbox.js +35 -0
- package/dist/core/keybindings/index.d.ts +1 -0
- package/dist/core/keybindings/index.js +1 -0
- package/dist/core/preview-registry.js +7 -6
- package/dist/core/runtime/spawn.js +2 -10
- package/dist/core/runtime/tmux-chrome.d.ts +1 -1
- package/dist/core/runtime/tmux-chrome.js +1 -1
- package/dist/core/runtime/tmux.d.ts +1 -0
- package/dist/core/runtime/tmux.js +55 -1
- package/dist/daemon/crtrd.js +29 -5
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import test from 'node:test';
|
|
2
2
|
import assert from 'node:assert/strict';
|
|
3
3
|
import { resolveKeybindings } from '../../../core/keybindings/index.js';
|
|
4
|
-
import { detachHint, dispatchAttachBinding, matchesAttachBinding, refreshAttachBindingSnapshot, } from '../attach-cmd.js';
|
|
4
|
+
import { detachHint, inboxOpenHint, dispatchAttachBinding, matchesAttachBinding, refreshAttachBindingSnapshot, } from '../attach-cmd.js';
|
|
5
5
|
import { GraphOverlay } from '../graph-overlay.js';
|
|
6
6
|
const PALETTE = {
|
|
7
7
|
accent: (s) => s,
|
|
@@ -55,6 +55,19 @@ test('attach input dispatches only the current configured action', () => {
|
|
|
55
55
|
const noDetach = resolveKeybindings({ 'crtr.attach.detach': [], 'crtr.attach.clear-or-detach': [] });
|
|
56
56
|
assert.equal(detachHint(noDetach), undefined, 'a disabled pair must not render "Disabled to detach"');
|
|
57
57
|
});
|
|
58
|
+
test('closed-inbox footer hint resolves the configured inbox shortcut(s)', () => {
|
|
59
|
+
// Default: alt+i renders as the configured shortcut plus 'inbox'.
|
|
60
|
+
assert.equal(inboxOpenHint(resolveKeybindings()), 'Alt+I inbox');
|
|
61
|
+
// Custom single key.
|
|
62
|
+
assert.equal(inboxOpenHint(resolveKeybindings({ 'crtr.tmux.inbox.toggle': ['alt+j'] })), 'Alt+J inbox');
|
|
63
|
+
// Multiple gestures join with ' / ' (crouter's formatBinding convention).
|
|
64
|
+
assert.equal(inboxOpenHint(resolveKeybindings({ 'crtr.tmux.inbox.toggle': ['alt+i', 'alt+j'] })), 'Alt+I / Alt+J inbox');
|
|
65
|
+
// Disabled: omit the shortcut clause and fall back to the CLI affordance,
|
|
66
|
+
// never render the word "Disabled".
|
|
67
|
+
const disabled = inboxOpenHint(resolveKeybindings({ 'crtr.tmux.inbox.toggle': [] }));
|
|
68
|
+
assert.equal(disabled, 'hl inbox open');
|
|
69
|
+
assert.doesNotMatch(disabled, /Disabled/);
|
|
70
|
+
});
|
|
58
71
|
test('attach startup and reload replace the dispatch/GRAPH snapshots and install each tmux snapshot', () => {
|
|
59
72
|
const first = resolveKeybindings({ 'crtr.attach.detach': ['ctrl+x'], 'crtr.graph.focus': ['f'] });
|
|
60
73
|
const second = resolveKeybindings({ 'crtr.attach.detach': ['ctrl+z'], 'crtr.graph.focus': ['r'] });
|
|
@@ -1318,10 +1318,11 @@ test('crtr push urgent/final cards collapse to a one-line outcome + report basen
|
|
|
1318
1318
|
// ---------------------------------------------------------------------------
|
|
1319
1319
|
// Batch C — human/memory/pkg summarizers (preview-registry.ts "Batch C")
|
|
1320
1320
|
// ---------------------------------------------------------------------------
|
|
1321
|
-
// Ask and review
|
|
1322
|
-
//
|
|
1323
|
-
//
|
|
1324
|
-
|
|
1321
|
+
// Ask and review share the queuedFollowUp road-sign (prompts.ts): arrival is
|
|
1322
|
+
// always just durable queue state, so the card collapses to one posted line.
|
|
1323
|
+
// The summarizer keys on the stable `Queued for the human` prefix; the inbox-
|
|
1324
|
+
// affordance tail resolves per call, so this fixture pins one resolved form.
|
|
1325
|
+
const QUEUED_FOLLOW_UP = 'Queued for the human. Their answer is pushed to your inbox and wakes you when they respond — never poll, verify it opened, or block. To see the queue, press ⌥I (or run `hl inbox open` at a terminal).';
|
|
1325
1326
|
const HUMAN_ASK_QUEUED_OUTPUT = [
|
|
1326
1327
|
'- job_id: mrASK0001',
|
|
1327
1328
|
'',
|
|
@@ -8,6 +8,7 @@ type AttachBindings = BindingResolution<BindingId>;
|
|
|
8
8
|
export declare function matchesAttachBinding(bindings: AttachBindings, id: AttachBindingId, data: string): boolean;
|
|
9
9
|
export declare function dispatchAttachBinding(bindings: AttachBindings, data: string, actions: Record<AttachBindingId, () => void>): boolean;
|
|
10
10
|
export declare function detachHint(bindings: AttachBindings): string | undefined;
|
|
11
|
+
export { inboxOpenHint } from '../../core/keybindings/index.js';
|
|
11
12
|
export declare function refreshAttachBindingSnapshot(resolve: () => AttachBindings, setGraphBindings: (bindings: AttachBindings) => void, inTmuxNow: () => boolean, install: (bindings: AttachBindings) => void): AttachBindings;
|
|
12
13
|
/** Resolve the mode badge's initial state. Remote never reads the local
|
|
13
14
|
* mode-switch `current` file for `nodeId` — always starts 'normal'. */
|
|
@@ -52,4 +53,3 @@ export declare function buildAttachAutocompleteProvider(cwd: string, fdPath: str
|
|
|
52
53
|
description?: string;
|
|
53
54
|
}>, cwd: string, fdPath: string | null) => CombinedAutocompleteProvider): CombinedAutocompleteProvider;
|
|
54
55
|
export declare function runAttach(nodeId: string, observer: boolean, canvasName?: string): Promise<void>;
|
|
55
|
-
export {};
|