@north-light/crouter 0.3.251 → 0.3.253
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/dto/config.d.ts +2 -0
- package/dist/builtin-memory/02-turn-lifecycle/00-ending-a-turn.md +1 -5
- package/dist/builtin-memory/04-base-worker-exploring.md +13 -0
- package/dist/builtin-memory/04-base-worker.md +1 -4
- package/dist/builtin-memory/05-kinds/explore/00-base.md +2 -2
- package/dist/builtin-memory/05-kinds/explore/01-orchestrator.md +4 -2
- package/dist/builtin-memory/05-kinds/review/security-findings.md +1 -1
- package/dist/builtin-memory/explore/exploration-doc.md +27 -0
- package/dist/clients/attach/__tests__/completion-frecency.test.d.ts +1 -0
- package/dist/clients/attach/__tests__/completion-frecency.test.js +35 -0
- package/dist/clients/attach/__tests__/ref-autocomplete.test.js +3 -1
- package/dist/clients/attach/__tests__/titled-editor-preview.test.js +2 -1
- package/dist/clients/attach/input/completion-frecency.d.ts +45 -0
- package/dist/clients/attach/input/completion-frecency.js +141 -0
- package/dist/clients/attach/input/controller.d.ts +17 -0
- package/dist/clients/attach/input/controller.js +40 -0
- package/dist/clients/attach/input/ref-autocomplete.d.ts +3 -1
- package/dist/clients/attach/input/ref-autocomplete.js +49 -8
- package/dist/clients/attach/input/titled-editor.d.ts +3 -0
- package/dist/clients/attach/input/titled-editor.js +5 -0
- package/dist/clients/attach/session/editor-inventory.d.ts +3 -0
- package/dist/clients/attach/session/editor-inventory.js +1 -1
- package/dist/clients/attach/session/input-wiring.d.ts +3 -0
- package/dist/clients/attach/session/input-wiring.js +2 -0
- package/dist/clients/attach/viewer.js +578 -578
- package/dist/commands/node/lifecycle.js +21 -6
- package/dist/core/__tests__/canvas-inbox-watcher-hold.test.js +4 -2
- package/dist/core/__tests__/canvas-inbox-watcher-naming.test.js +4 -1
- package/dist/core/__tests__/canvas-inbox-watcher.test.js +4 -1
- package/dist/core/__tests__/fixtures/fake-engine.d.ts +3 -1
- package/dist/core/__tests__/fixtures/fake-engine.js +7 -1
- package/dist/core/__tests__/integration/deferred-no-wake.test.js +4 -1
- package/dist/core/__tests__/migration.test.js +57 -11
- package/dist/core/__tests__/seam/broker-provider-retry.test.js +17 -2
- package/dist/core/__tests__/seam/dormancy-release.test.js +1 -0
- package/dist/core/__tests__/watchdog-abort-arms-retry.test.js +9 -2
- package/dist/core/canvas/migrations.js +63 -24
- package/dist/core/runtime/broker/engine-drive.js +7 -1
- package/dist/core/runtime/broker/fault-retry.js +31 -13
- package/dist/core/runtime/broker/held-deferred-inbox.d.ts +4 -0
- package/dist/core/runtime/broker/held-deferred-inbox.js +7 -2
- package/dist/core/runtime/broker.js +19 -0
- package/dist/core/runtime/close.js +2 -2
- package/dist/core/runtime/fault.js +8 -5
- package/dist/core/runtime/recycle.js +63 -41
- package/dist/core/runtime/reset.d.ts +1 -1
- package/dist/core/runtime/reset.js +25 -2
- package/dist/core/runtime/revive.js +6 -1
- package/dist/daemon/__tests__/helpers/source-daemon.js +1 -0
- package/dist/daemon/api/handlers/messages.js +1 -1
- package/dist/daemon/api/handlers/nodes.js +124 -4
- package/dist/daemon/api/handlers/reports.js +1 -1
- package/dist/daemon/api/map.d.ts +1 -1
- package/dist/daemon/api/map.js +3 -2
- package/dist/daemon/cron/sinks.js +1 -1
- package/dist/daemon/messaging/node-message.js +1 -1
- package/dist/pi-extensions/canvas-inbox-watcher.js +5 -2
- package/package.json +1 -1
- package/runtime.lock.json +2 -2
|
@@ -740,6 +740,11 @@ export class TitledEditor extends CustomEditor {
|
|
|
740
740
|
setResolvedRefNames(names) {
|
|
741
741
|
this.resolvedRefNames = new Set(names);
|
|
742
742
|
}
|
|
743
|
+
/** The canonical names of memory refs currently resolvable in this session —
|
|
744
|
+
* used to record ref usage on submit without counting non-ref slash tokens. */
|
|
745
|
+
getResolvedRefNames() {
|
|
746
|
+
return this.resolvedRefNames;
|
|
747
|
+
}
|
|
743
748
|
setLocalCommandNames(names) {
|
|
744
749
|
this.localCommandNames = new Set(names);
|
|
745
750
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CombinedAutocompleteProvider } from '@earendil-works/pi-tui';
|
|
2
2
|
import type { BrokerDataFrame, RefMeta } from '../../../core/runtime/broker-protocol.js';
|
|
3
|
+
import type { FrecencyStore } from '../input/completion-frecency.js';
|
|
3
4
|
import type { ViewerCapabilities } from '../input/capabilities.js';
|
|
4
5
|
import { type PreviewableCommand } from '../slash/prompt-preview.js';
|
|
5
6
|
import type { AttachBindings } from './bindings.js';
|
|
@@ -51,6 +52,8 @@ export interface EditorInventoryHooks {
|
|
|
51
52
|
bindings: () => AttachBindings;
|
|
52
53
|
/** Resolved once in `runAttach`; never changes for the session. */
|
|
53
54
|
fdPath: string | null;
|
|
55
|
+
/** Per-user frecency store — biases command/ref completion order by usage. */
|
|
56
|
+
frecency: FrecencyStore;
|
|
54
57
|
}
|
|
55
58
|
/** Owns everything the editor can complete against — the merged slash-command
|
|
56
59
|
* list, the loaded-command preview, the broker's raw command metadata, and the
|
|
@@ -91,7 +91,7 @@ export function createEditorInventory(ctx, capabilities, hooks) {
|
|
|
91
91
|
// reads only `commands`, never `memoryRefs`).
|
|
92
92
|
const syncEditorInventories = () => {
|
|
93
93
|
const commandProvider = buildAttachAutocompleteProvider(meta.cwd, hooks.fdPath, brokerCommands, capabilities);
|
|
94
|
-
editor.setAutocompleteProvider(new RefAwareAutocompleteProvider(memoryRefs, commandProvider));
|
|
94
|
+
editor.setAutocompleteProvider(new RefAwareAutocompleteProvider(memoryRefs, commandProvider, hooks.frecency));
|
|
95
95
|
editor.setResolvedRefNames(memoryRefs.map((ref) => ref.name));
|
|
96
96
|
// Two independent suppression inventories: the viewer-local
|
|
97
97
|
// set (everything `dispatchSlashCommand` handles entirely locally, trimmed
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { InputController } from '../input/controller.js';
|
|
2
|
+
import type { FrecencyStore } from '../input/completion-frecency.js';
|
|
2
3
|
import { type ViewerCapabilities } from '../input/capabilities.js';
|
|
3
4
|
import type { ToolDisplayToggle } from '../render/chat-view.js';
|
|
4
5
|
import type { KeybindingsManager } from '@earendil-works/pi-tui';
|
|
@@ -40,6 +41,8 @@ export interface InputWiringHooks {
|
|
|
40
41
|
setChipColor: (color: string | null) => void;
|
|
41
42
|
/** A prompt or steer was accepted from the editor. */
|
|
42
43
|
onPromptSent: () => void;
|
|
44
|
+
/** Per-user completion frecency store, shared with the editor inventory. */
|
|
45
|
+
frecency: FrecencyStore;
|
|
43
46
|
}
|
|
44
47
|
/** Construct the viewer's one capability authority. */
|
|
45
48
|
export declare function createViewerCapabilitiesForInput(ctx: Pick<AttachSession, 'nodeId' | 'remote' | 'role' | 'meta'>): ViewerCapabilities;
|
|
@@ -74,6 +74,8 @@ export function createInputController(ctx, km, capabilities, hooks) {
|
|
|
74
74
|
},
|
|
75
75
|
onColor: hooks.setChipColor,
|
|
76
76
|
onPromptSent: hooks.onPromptSent,
|
|
77
|
+
frecency: hooks.frecency,
|
|
78
|
+
knownRefNames: () => editor.getResolvedRefNames(),
|
|
77
79
|
// Global display toggles (Ctrl+O tools / Ctrl+T thinking) — pure render
|
|
78
80
|
// state owned by ChatView, surfaced as a footer notice mirroring pi's
|
|
79
81
|
// status line.
|