@north-light/crouter 0.3.183 → 0.3.185
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/build-root.js +10 -3
- package/dist/builtin-memory/internal/plugins.md +1 -1
- package/dist/clients/attach/input/capabilities.js +3 -0
- package/dist/clients/attach/slash/dispatch.js +12 -0
- package/dist/clients/attach/viewer.js +191 -191
- package/dist/commands/pkg/browse/actions.d.ts +7 -0
- package/dist/commands/pkg/browse/actions.js +199 -0
- package/dist/commands/pkg/browse/catalog.d.ts +9 -0
- package/dist/commands/pkg/browse/catalog.js +466 -0
- package/dist/commands/pkg/browse/command-view.d.ts +3 -0
- package/dist/commands/pkg/browse/command-view.js +191 -0
- package/dist/commands/pkg/browse/detail-panel.d.ts +66 -0
- package/dist/commands/pkg/browse/detail-panel.js +402 -0
- package/dist/commands/pkg/browse/doc-view.d.ts +3 -0
- package/dist/commands/pkg/browse/doc-view.js +81 -0
- package/dist/commands/pkg/browse/list-panel.d.ts +28 -0
- package/dist/commands/pkg/browse/list-panel.js +168 -0
- package/dist/commands/pkg/browse/model.d.ts +230 -0
- package/dist/commands/pkg/browse/model.js +36 -0
- package/dist/commands/pkg/browse/shell.d.ts +93 -0
- package/dist/commands/pkg/browse/shell.js +640 -0
- package/dist/commands/pkg/browse.d.ts +2 -0
- package/dist/commands/pkg/browse.js +27 -0
- package/dist/commands/pkg/market-manage.js +13 -4
- package/dist/commands/pkg/plugin-manage.js +8 -3
- package/dist/commands/pkg.js +2 -1
- package/dist/commands/sys/doctor.js +6 -4
- package/dist/commands/sys/panels/broker-limits-panel.d.ts +1 -1
- package/dist/commands/sys/panels/broker-limits-panel.js +1 -1
- package/dist/commands/sys/panels/dependencies-panel.d.ts +1 -1
- package/dist/commands/sys/panels/dependencies-panel.js +1 -1
- package/dist/commands/sys/panels/keybindings-panel.js +1 -1
- package/dist/commands/sys/panels/models-panel.d.ts +1 -1
- package/dist/commands/sys/panels/models-panel.js +1 -1
- package/dist/commands/sys/panels/plugins-panel.d.ts +1 -1
- package/dist/commands/sys/panels/plugins-panel.js +1 -1
- package/dist/commands/sys/panels/prefs-panel.d.ts +1 -1
- package/dist/commands/sys/panels/prefs-panel.js +1 -1
- package/dist/commands/sys/panels/provider-panel.d.ts +1 -1
- package/dist/commands/sys/panels/provider-panel.js +1 -1
- package/dist/commands/sys/settings-shell.js +1 -1
- package/dist/commands/sys/setup-settings-runner.d.ts +7 -18
- package/dist/commands/sys/setup-settings-runner.js +3 -52
- package/dist/commands/sys/setup-wizard.js +1 -1
- package/dist/core/__tests__/serial/command-plugins.test.js +21 -40
- package/dist/core/canvas/nav-model.d.ts +1 -8
- package/dist/core/canvas/nav-model.js +30 -59
- package/dist/core/canvas/nav-render.d.ts +2 -2
- package/dist/core/canvas/nav-render.js +8 -6
- package/dist/core/command-manifests/registry.d.ts +10 -3
- package/dist/core/command-manifests/registry.js +36 -22
- package/dist/core/command-plugins/compose.js +1 -1
- package/dist/core/command-plugins/discovery.js +15 -7
- package/dist/core/keybindings/catalog.d.ts +1 -1
- package/dist/core/keybindings/catalog.js +1 -0
- package/dist/core/resolver.d.ts +2 -2
- package/dist/core/runtime/tmux-bindings.js +2 -0
- package/dist/core/tui/page-host.d.ts +25 -0
- package/dist/core/tui/page-host.js +65 -0
- package/dist/daemon/__tests__/subtree-filter-freshness.test.d.ts +1 -0
- package/dist/daemon/__tests__/subtree-filter-freshness.test.js +63 -0
- package/dist/pi-extensions/canvas-bash-valve.js +45 -1
- package/dist/types.d.ts +4 -1
- package/package.json +1 -1
- package/runtime.lock.json +2 -2
- /package/dist/{commands/sys/panels → core/tui}/panel.d.ts +0 -0
- /package/dist/{commands/sys/panels → core/tui}/panel.js +0 -0
|
@@ -28,6 +28,7 @@ import { spawn } from 'node:child_process';
|
|
|
28
28
|
import { closeSync, existsSync, mkdirSync, openSync, readFileSync, readSync, rmSync, statSync, writeFileSync, } from 'node:fs';
|
|
29
29
|
import { homedir } from 'node:os';
|
|
30
30
|
import { backgroundBashJob, bashJobPaths, formatBashElapsed, newBashJobId } from '../core/bash-jobs.js';
|
|
31
|
+
import { Type } from 'typebox';
|
|
31
32
|
import { createBashToolDefinition } from '@earendil-works/pi-coding-agent';
|
|
32
33
|
// ---------------------------------------------------------------------------
|
|
33
34
|
// Deadline — 5 minutes by default, overridable via CRTR_BASH_VALVE_MS
|
|
@@ -342,6 +343,49 @@ export function createValveOperations(nodeId, contextDir) {
|
|
|
342
343
|
// ---------------------------------------------------------------------------
|
|
343
344
|
// Extension
|
|
344
345
|
// ---------------------------------------------------------------------------
|
|
346
|
+
// ---------------------------------------------------------------------------
|
|
347
|
+
// `purpose` — the one line a person reads while a command runs
|
|
348
|
+
//
|
|
349
|
+
// A deliberate deviation from taking pi's definition verbatim, and the only one
|
|
350
|
+
// here. Everywhere crtr's output reaches a non-technical audience, the host has
|
|
351
|
+
// to render SOMETHING per step, and without this field its only material is the
|
|
352
|
+
// command — which yields "Running command" for an entire turn. The model is the
|
|
353
|
+
// only party that knows why it is running this, so it says so, in one clause,
|
|
354
|
+
// before the command streams.
|
|
355
|
+
//
|
|
356
|
+
// Declared FIRST so it arrives ahead of `command` in the argument stream: a host
|
|
357
|
+
// parsing partial JSON can show the label while the command is still being
|
|
358
|
+
// written, rather than after the call is complete and about to finish.
|
|
359
|
+
//
|
|
360
|
+
// The execute path ignores it entirely — this is a labelling channel, not an
|
|
361
|
+
// input. Optional, so a model that omits it behaves exactly as before.
|
|
362
|
+
//
|
|
363
|
+
// Upstream ask: pi's own bash tool should carry this (Claude Code's bash tool
|
|
364
|
+
// has shipped an equivalent `description` field for years). Until it does, the
|
|
365
|
+
// field is re-declared here on top of pi's schema rather than forked into it.
|
|
366
|
+
// ---------------------------------------------------------------------------
|
|
367
|
+
const PURPOSE_DESCRIPTION = [
|
|
368
|
+
'One short clause naming what this step is FOR, in the words of the person you',
|
|
369
|
+
'are working for — "Reading the Acme thread", not "Fetching emails" and never',
|
|
370
|
+
'"Running GMAIL_FETCH_EMAILS". A person reads this while the command runs; it',
|
|
371
|
+
'is the only thing they see of this step. Under about eight words. Omit it for',
|
|
372
|
+
'steps that only touch your own scratch work.',
|
|
373
|
+
].join(' ');
|
|
374
|
+
/**
|
|
375
|
+
* Prepend an optional `purpose` to pi's bash schema, carrying pi's own property
|
|
376
|
+
* definitions through verbatim — so a future upstream change to the `command`
|
|
377
|
+
* or `timeout` wording still reaches the model, and this file owns exactly one
|
|
378
|
+
* field.
|
|
379
|
+
*/
|
|
380
|
+
function withPurpose(definition) {
|
|
381
|
+
return {
|
|
382
|
+
...definition,
|
|
383
|
+
parameters: Type.Object({
|
|
384
|
+
purpose: Type.Optional(Type.String({ description: PURPOSE_DESCRIPTION })),
|
|
385
|
+
...definition.parameters.properties,
|
|
386
|
+
}),
|
|
387
|
+
};
|
|
388
|
+
}
|
|
345
389
|
export default function (pi) {
|
|
346
390
|
const nodeId = process.env['CRTR_NODE_ID'];
|
|
347
391
|
if (nodeId === undefined || nodeId.trim() === '')
|
|
@@ -356,6 +400,6 @@ export default function (pi) {
|
|
|
356
400
|
// every session_start is idempotent (last registration wins).
|
|
357
401
|
pi.on('session_start', (_event, ctx) => {
|
|
358
402
|
const operations = createValveOperations(nodeId, contextDir);
|
|
359
|
-
pi.registerTool(createBashToolDefinition(ctx.cwd, { operations }));
|
|
403
|
+
pi.registerTool(withPurpose(createBashToolDefinition(ctx.cwd, { operations })));
|
|
360
404
|
});
|
|
361
405
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -301,7 +301,10 @@ export interface InstalledPlugin {
|
|
|
301
301
|
}
|
|
302
302
|
export interface InstalledMarketplace {
|
|
303
303
|
name: string;
|
|
304
|
-
|
|
304
|
+
/** Never `builtin`: marketplaces are registered by the user into the user or
|
|
305
|
+
* project scope, and `listInstalledMarketplaces` has no builtin directory to
|
|
306
|
+
* read. `builtin` describes plugins that ship with crtr, not their source. */
|
|
307
|
+
scope: Exclude<Scope, 'builtin'>;
|
|
305
308
|
root: string;
|
|
306
309
|
manifest: MarketplaceManifest;
|
|
307
310
|
url: string;
|
package/package.json
CHANGED
package/runtime.lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@north-light/crouter",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.185",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@north-light/crouter",
|
|
9
|
-
"version": "0.3.
|
|
9
|
+
"version": "0.3.185",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"dependencies": {
|
|
File without changes
|
|
File without changes
|