@north-light/crouter 0.3.162 → 0.3.164
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/builtin-memory/00-runtime-base.md +1 -0
- package/dist/builtin-memory/04-orchestration-kernel.md +1 -0
- package/dist/builtin-memory/init.md +38 -0
- package/dist/builtin-memory/internal/INDEX.md +1 -0
- package/dist/builtin-memory/internal/memory-loading.md +45 -0
- package/dist/builtin-memory/wedged-child-on-runaway-bash.md +2 -2
- package/dist/builtin-pi-packages/pi-crtr-extensions/README.md +0 -1
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/__tests__/provider-rotation.test.ts +34 -2
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/provider-rotation.ts +14 -3
- package/dist/clients/attach/__tests__/crtr-output-coverage.test.js +1 -1
- package/dist/clients/attach/__tests__/crtr-output.test.js +14 -9
- package/dist/clients/attach/__tests__/edit-diff.test.d.ts +1 -0
- package/dist/clients/attach/__tests__/edit-diff.test.js +35 -0
- package/dist/clients/attach/__tests__/editor-frame-title.test.d.ts +1 -0
- package/dist/clients/attach/__tests__/editor-frame-title.test.js +19 -0
- package/dist/clients/attach/render/chat-view.js +54 -38
- package/dist/clients/attach/render/crtr-output.d.ts +2 -1
- package/dist/clients/attach/render/crtr-output.js +33 -4
- package/dist/clients/attach/render/edit-diff.d.ts +21 -6
- package/dist/clients/attach/render/edit-diff.js +104 -81
- package/dist/clients/attach/render/tool-calls.d.ts +21 -20
- package/dist/clients/attach/render/tool-calls.js +89 -43
- package/dist/clients/attach/session/connection.d.ts +1 -1
- package/dist/clients/attach/session/editor-frame.d.ts +5 -1
- package/dist/clients/attach/session/editor-frame.js +21 -15
- package/dist/clients/attach/session/identity.d.ts +1 -1
- package/dist/clients/attach/viewer.js +628 -624
- package/dist/commands/__tests__/api-canvas-source.test.d.ts +1 -0
- package/dist/commands/__tests__/api-canvas-source.test.js +37 -0
- package/dist/commands/__tests__/human.test.js +2 -0
- package/dist/commands/__tests__/search-contents.test.d.ts +1 -0
- package/dist/commands/__tests__/search-contents.test.js +52 -0
- package/dist/commands/api-client.js +1 -0
- package/dist/commands/human/prompts.js +2 -2
- package/dist/commands/human/shared.d.ts +1 -0
- package/dist/commands/human/shared.js +7 -4
- package/dist/commands/memory/lint.d.ts +6 -0
- package/dist/commands/memory/lint.js +177 -35
- package/dist/commands/memory/read.js +22 -1
- package/dist/commands/memory/write.js +18 -4
- package/dist/commands/memory.js +1 -1
- package/dist/commands/search/contents.js +2 -2
- package/dist/commands/sys/__tests__/sync-deps.test.js +12 -21
- package/dist/commands/sys/__tests__/sync-import.test.js +30 -29
- package/dist/commands/sys/setup-wizard.d.ts +8 -1
- package/dist/commands/sys/setup-wizard.js +209 -58
- package/dist/commands/sys/sync-deps.js +14 -18
- package/dist/commands/sys/sync-project-guidance.js +16 -19
- package/dist/core/__tests__/migration.test.js +8 -3
- package/dist/core/__tests__/on-read-crouter-home-fence.test.js +7 -10
- package/dist/core/__tests__/on-read-dedup-resume.test.js +13 -25
- package/dist/core/__tests__/on-read-identity.test.js +8 -15
- package/dist/core/__tests__/revive.test.js +2 -2
- package/dist/core/__tests__/tmux-surface.test.js +10 -4
- package/dist/core/__tests__/worktree.test.js +3 -3
- package/dist/core/canvas/extensions.d.ts +1 -1
- package/dist/core/canvas/extensions.js +18 -11
- package/dist/core/canvas/labels.d.ts +4 -5
- package/dist/core/canvas/labels.js +9 -9
- package/dist/core/command-manifests/schema.js +18 -5
- package/dist/core/command.js +17 -7
- package/dist/core/configured-clis/invoker.js +2 -0
- package/dist/core/help.d.ts +3 -1
- package/dist/core/help.js +5 -2
- package/dist/core/keybindings/__tests__/resolve.test.js +5 -2
- package/dist/core/keybindings/catalog.d.ts +3 -2
- package/dist/core/keybindings/catalog.js +34 -25
- package/dist/core/keybindings/index.d.ts +1 -1
- package/dist/core/keybindings/resolve.js +8 -0
- package/dist/core/keybindings/types.d.ts +6 -1
- package/dist/core/memory/doc-link-grammar.d.ts +20 -0
- package/dist/core/memory/doc-link-grammar.js +110 -0
- package/dist/core/memory-resolver.d.ts +5 -0
- package/dist/core/memory-resolver.js +12 -1
- package/dist/core/runtime/bearings.d.ts +8 -8
- package/dist/core/runtime/bearings.js +20 -16
- package/dist/core/runtime/broker.js +3 -13
- package/dist/core/runtime/canvas-extensions.d.ts +1 -0
- package/dist/core/runtime/canvas-extensions.js +2 -0
- package/dist/core/runtime/launch.d.ts +1 -1
- package/dist/core/runtime/launch.js +1 -1
- package/dist/core/runtime/tmux.js +136 -100
- package/dist/core/scope.js +4 -5
- package/dist/core/substrate/ceiling.d.ts +3 -6
- package/dist/core/substrate/ceiling.js +13 -15
- package/dist/core/substrate/index.d.ts +2 -3
- package/dist/core/substrate/index.js +2 -2
- package/dist/core/substrate/on-read.d.ts +4 -13
- package/dist/core/substrate/on-read.js +142 -262
- package/dist/core/substrate/render.js +4 -4
- package/dist/core/substrate/schema.d.ts +3 -2
- package/dist/core/substrate/schema.js +5 -5
- package/dist/pi-extensions/__tests__/canvas-tool-guide.test.d.ts +1 -0
- package/dist/pi-extensions/__tests__/canvas-tool-guide.test.js +96 -0
- package/dist/pi-extensions/canvas-doc-substrate.js +7 -8
- package/dist/pi-extensions/canvas-tool-guide.d.ts +14 -0
- package/dist/pi-extensions/canvas-tool-guide.js +77 -0
- package/package.json +2 -2
- package/runtime.lock.json +6 -6
- package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/crouter-help.ts +0 -95
|
@@ -37,6 +37,26 @@ export function resolveEditorFrameStyles(bashMode, thinkingLevel, pal) {
|
|
|
37
37
|
titleStyle: thinkingTitleStyle(thinkingLevel, defaultTitleStyle),
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
|
+
/** Render the generated task icon on every non-empty editor title. Session
|
|
41
|
+
* names are persisted independently by pi, so this derives the icon from the
|
|
42
|
+
* canvas identity again whenever a viewer attaches or reloads. */
|
|
43
|
+
export function displayEditorTitle(sessionName, identity) {
|
|
44
|
+
const raw = sessionName ?? '';
|
|
45
|
+
if (raw === '' || identity === undefined)
|
|
46
|
+
return raw;
|
|
47
|
+
const modePrefix = `${modeIcon(identity.mode)} `;
|
|
48
|
+
const withoutMode = raw.startsWith(modePrefix) ? raw.slice(modePrefix.length) : raw;
|
|
49
|
+
const icon = (identity.icon ?? '').trim();
|
|
50
|
+
const iconPrefix = icon === '' ? '' : `${icon} `;
|
|
51
|
+
const withoutTaskIcon = iconPrefix !== '' && withoutMode.startsWith(iconPrefix)
|
|
52
|
+
? withoutMode.slice(iconPrefix.length)
|
|
53
|
+
: withoutMode;
|
|
54
|
+
const withoutKind = withoutTaskIcon.endsWith(` ${identity.kind}`)
|
|
55
|
+
? withoutTaskIcon.slice(0, -identity.kind.length - 1)
|
|
56
|
+
: withoutTaskIcon;
|
|
57
|
+
const name = withoutKind === identity.kind ? '' : withoutKind;
|
|
58
|
+
return name === '' || icon === '' ? name : `${icon} ${name}`;
|
|
59
|
+
}
|
|
40
60
|
/** The editor-chrome collaborator: owns the shell/bash level (`deriveBashMode`
|
|
41
61
|
* over `editor.onChange` is its ONE writer) and the `/color` chip override,
|
|
42
62
|
* and paints every frame-attached adornment — border hue, title chip, context
|
|
@@ -58,20 +78,6 @@ export function createEditorChrome(ctx, hooks) {
|
|
|
58
78
|
const persona = identity ? ` · ${personaLabel(identity)}` : '';
|
|
59
79
|
editor.contextBadge = `${lifecycle}${dir}${persona}`;
|
|
60
80
|
};
|
|
61
|
-
// Normalize an icon-and-kind session label so persona remains exclusively in
|
|
62
|
-
// the bottom-right badge while the viewer is attached.
|
|
63
|
-
const displaySessionTitle = (sessionName) => {
|
|
64
|
-
const identity = hooks.nodeIdentity();
|
|
65
|
-
const raw = sessionName ?? '';
|
|
66
|
-
if (raw === '' || identity === undefined)
|
|
67
|
-
return raw;
|
|
68
|
-
const legacyPrefix = `${modeIcon(identity.mode)} `;
|
|
69
|
-
const withoutIcon = raw.startsWith(legacyPrefix) ? raw.slice(legacyPrefix.length) : raw;
|
|
70
|
-
const withoutKind = withoutIcon.endsWith(` ${identity.kind}`)
|
|
71
|
-
? withoutIcon.slice(0, -identity.kind.length - 1)
|
|
72
|
-
: withoutIcon;
|
|
73
|
-
return withoutKind === identity.kind ? '' : withoutKind;
|
|
74
|
-
};
|
|
75
81
|
// Paint the editor border + title chip. Shell/bash mode (leading `!`) wins and
|
|
76
82
|
// forces the whole frame green (#7); otherwise the hue tracks the thinking
|
|
77
83
|
// level. One place so the onChange bash toggle and live-state updates agree.
|
|
@@ -128,7 +134,7 @@ export function createEditorChrome(ctx, hooks) {
|
|
|
128
134
|
},
|
|
129
135
|
paintFrame,
|
|
130
136
|
setTitle: (sessionName) => {
|
|
131
|
-
editor.title =
|
|
137
|
+
editor.title = displayEditorTitle(sessionName, hooks.nodeIdentity());
|
|
132
138
|
},
|
|
133
139
|
syncContextBadge: () => syncContextBadge(),
|
|
134
140
|
pollGit: () => fetchGitInfo(meta.cwd, renderGitInfo),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { NodeMeta } from '../../../core/canvas/types.js';
|
|
2
2
|
import type { AttachSession } from './context.js';
|
|
3
|
-
export type NodeIdentity = Pick<NodeMeta, 'kind' | 'mode' | 'lifecycle'> | undefined;
|
|
3
|
+
export type NodeIdentity = Pick<NodeMeta, 'kind' | 'mode' | 'lifecycle' | 'icon'> | undefined;
|
|
4
4
|
export interface IdentityHooks {
|
|
5
5
|
/** Drop a late refresh that lands after the viewer is gone. */
|
|
6
6
|
isTornDown: () => boolean;
|