@fnndsc/chell 4.3.1 → 4.4.0
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/builtins/debug.d.ts +3 -1
- package/dist/builtins/debug.js +14 -22
- package/dist/builtins/debug.js.map +1 -1
- package/dist/builtins/fs/cat.d.ts +8 -8
- package/dist/builtins/fs/cat.js +37 -20
- package/dist/builtins/fs/cat.js.map +1 -1
- package/dist/builtins/fs/cd.d.ts +3 -2
- package/dist/builtins/fs/cd.js +48 -33
- package/dist/builtins/fs/cd.js.map +1 -1
- package/dist/builtins/fs/cp.d.ts +4 -1
- package/dist/builtins/fs/cp.js +23 -10
- package/dist/builtins/fs/cp.js.map +1 -1
- package/dist/builtins/fs/download.js +5 -1
- package/dist/builtins/fs/download.js.map +1 -1
- package/dist/builtins/fs/edit.d.ts +2 -2
- package/dist/builtins/fs/edit.js +37 -19
- package/dist/builtins/fs/edit.js.map +1 -1
- package/dist/builtins/fs/mkdir.d.ts +4 -1
- package/dist/builtins/fs/mkdir.js +20 -6
- package/dist/builtins/fs/mkdir.js.map +1 -1
- package/dist/builtins/fs/mv.d.ts +4 -1
- package/dist/builtins/fs/mv.js +23 -10
- package/dist/builtins/fs/mv.js.map +1 -1
- package/dist/builtins/fs/pull.d.ts +2 -2
- package/dist/builtins/fs/pull.js +57 -29
- package/dist/builtins/fs/pull.js.map +1 -1
- package/dist/builtins/fs/pwd.d.ts +6 -3
- package/dist/builtins/fs/pwd.js +8 -10
- package/dist/builtins/fs/pwd.js.map +1 -1
- package/dist/builtins/fs/rm.d.ts +7 -1
- package/dist/builtins/fs/rm.js +61 -12
- package/dist/builtins/fs/rm.js.map +1 -1
- package/dist/builtins/fs/touch.d.ts +4 -1
- package/dist/builtins/fs/touch.js +24 -12
- package/dist/builtins/fs/touch.js.map +1 -1
- package/dist/builtins/fs/upload.js +4 -1
- package/dist/builtins/fs/upload.js.map +1 -1
- package/dist/builtins/help.js +3 -3
- package/dist/builtins/index.d.ts +1 -0
- package/dist/builtins/index.js +1 -0
- package/dist/builtins/index.js.map +1 -1
- package/dist/builtins/net/cubepath.d.ts +1 -1
- package/dist/builtins/net/cubepath.js +1 -1
- package/dist/builtins/net/query.d.ts +1 -1
- package/dist/builtins/net/query.js +1 -1
- package/dist/builtins/sys/physicalmode.d.ts +3 -1
- package/dist/builtins/sys/physicalmode.js +13 -20
- package/dist/builtins/sys/physicalmode.js.map +1 -1
- package/dist/builtins/sys/timing.d.ts +3 -1
- package/dist/builtins/sys/timing.js +13 -20
- package/dist/builtins/sys/timing.js.map +1 -1
- package/dist/builtins/sys/version.d.ts +15 -0
- package/dist/builtins/sys/version.js +23 -0
- package/dist/builtins/sys/version.js.map +1 -0
- package/dist/builtins/sys/whoami.d.ts +9 -4
- package/dist/builtins/sys/whoami.js +20 -13
- package/dist/builtins/sys/whoami.js.map +1 -1
- package/dist/calypso.d.ts +13 -0
- package/dist/calypso.js +44 -0
- package/dist/calypso.js.map +1 -0
- package/dist/chell.d.ts +2 -1
- package/dist/chell.js +2 -1
- package/dist/chell.js.map +1 -1
- package/dist/core/boot.d.ts +3 -1
- package/dist/core/boot.js +50 -100
- package/dist/core/boot.js.map +1 -1
- package/dist/core/cli.d.ts +3 -1
- package/dist/core/cli.js +11 -1
- package/dist/core/cli.js.map +1 -1
- package/dist/core/cliSurface.d.ts +26 -0
- package/dist/core/cliSurface.js +152 -0
- package/dist/core/cliSurface.js.map +1 -0
- package/dist/core/dispatch.d.ts +63 -10
- package/dist/core/dispatch.js +326 -234
- package/dist/core/dispatch.js.map +1 -1
- package/dist/core/engine.d.ts +91 -0
- package/dist/core/engine.js +222 -0
- package/dist/core/engine.js.map +1 -0
- package/dist/core/progress.d.ts +25 -0
- package/dist/core/progress.js +10 -0
- package/dist/core/progress.js.map +1 -0
- package/dist/core/progressRenderer.d.ts +42 -0
- package/dist/core/progressRenderer.js +176 -0
- package/dist/core/progressRenderer.js.map +1 -0
- package/dist/core/prompt/session.d.ts +20 -0
- package/dist/core/prompt/session.js +43 -0
- package/dist/core/prompt/session.js.map +1 -0
- package/dist/core/question.d.ts +11 -18
- package/dist/core/question.js +14 -57
- package/dist/core/question.js.map +1 -1
- package/dist/core/repl.d.ts +25 -5
- package/dist/core/repl.js +56 -45
- package/dist/core/repl.js.map +1 -1
- package/dist/core/sink.d.ts +201 -0
- package/dist/core/sink.js +300 -0
- package/dist/core/sink.js.map +1 -0
- package/dist/core/surface.d.ts +172 -0
- package/dist/core/surface.js +105 -0
- package/dist/core/surface.js.map +1 -0
- package/dist/core/version.d.ts +20 -0
- package/dist/core/version.js +82 -0
- package/dist/core/version.js.map +1 -0
- package/dist/core/warnings.d.ts +14 -0
- package/dist/core/warnings.js +25 -0
- package/dist/core/warnings.js.map +1 -0
- package/dist/daemon/launch.d.ts +9 -0
- package/dist/daemon/launch.js +82 -0
- package/dist/daemon/launch.js.map +1 -0
- package/dist/index.js +2 -12
- package/dist/index.js.map +1 -1
- package/dist/lib/spinner.js +5 -4
- package/dist/lib/spinner.js.map +1 -1
- package/dist/lib/vfs/vfs.js +7 -3
- package/dist/lib/vfs/vfs.js.map +1 -1
- package/dist/remote/client.d.ts +6 -0
- package/dist/remote/client.js +71 -0
- package/dist/remote/client.js.map +1 -0
- package/dist/remote/discovery.d.ts +23 -0
- package/dist/remote/discovery.js +55 -0
- package/dist/remote/discovery.js.map +1 -0
- package/dist/remote/remoteEngine.d.ts +125 -0
- package/dist/remote/remoteEngine.js +283 -0
- package/dist/remote/remoteEngine.js.map +1 -0
- package/package.json +8 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progressRenderer.js","sourceRoot":"","sources":["../../src/core/progressRenderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,WAAW,MAAM,cAAc,CAAC;AAsCvC,MAAM,iBAAiB,GAAwB,IAAI,GAAG,CAAiB;IACrE,MAAM;IACN,aAAa;IACb,SAAS;IACT,SAAS;IACT,OAAO;C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GAAgB,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,EAAE,aAAa,CAAC,KAAK,CAAC,EAAE;gBAC7E,KAAK,EAAE,WAAW,CAAC,KAAK,CAAC;gBACzB,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,EAAE;aACvB,CAAC,CAAC;YACH,KAAK,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;YACvB,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;YAC9B,OAAO;QACT,CAAC;QAED,IAAI,KAAK,KAAK,KAAK,CAAC,KAAK,EAAE,CAAC;YAC1B,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;YAC1B,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;QACtB,CAAC;QACD,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,EAAE,WAAW,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC,CAAC;IAChG,CAAC;CACF"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inputs the caller knows that the session state does not.
|
|
3
|
+
*
|
|
4
|
+
* @property lastExitCode - The previous command's exit code (default 0).
|
|
5
|
+
* @property lastCommandDurationMs - The previous command's duration (default 0).
|
|
6
|
+
* @property terminalWidth - The rendering width (default the local stdout
|
|
7
|
+
* columns, or 80).
|
|
8
|
+
*/
|
|
9
|
+
export interface SessionPromptOptions {
|
|
10
|
+
lastExitCode?: number;
|
|
11
|
+
lastCommandDurationMs?: number;
|
|
12
|
+
terminalWidth?: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Renders the themed prompt string for the current session context.
|
|
16
|
+
*
|
|
17
|
+
* @param options - The last-command and width inputs.
|
|
18
|
+
* @returns The rendered prompt string.
|
|
19
|
+
*/
|
|
20
|
+
export declare function sessionPrompt_render(options?: SessionPromptOptions): Promise<string>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Rendering the current session's themed prompt string.
|
|
3
|
+
*
|
|
4
|
+
* The prompt reflects live session context — user, CUBE, working directory,
|
|
5
|
+
* PACS, physical-mode, warm-up progress — which only the process holding that
|
|
6
|
+
* context can render. Both the local REPL and the daemon (which pushes the
|
|
7
|
+
* prompt to remote surfaces) render it here, so the same theme produces the
|
|
8
|
+
* same string on every surface.
|
|
9
|
+
*
|
|
10
|
+
* @module
|
|
11
|
+
*/
|
|
12
|
+
import { session } from '../../session/index.js';
|
|
13
|
+
import { settings } from '../../config/settings.js';
|
|
14
|
+
import { context_getSingle } from '@fnndsc/salsa';
|
|
15
|
+
import { procCache_get } from '@fnndsc/cumin';
|
|
16
|
+
import { prompt_render } from './index.js';
|
|
17
|
+
/**
|
|
18
|
+
* Renders the themed prompt string for the current session context.
|
|
19
|
+
*
|
|
20
|
+
* @param options - The last-command and width inputs.
|
|
21
|
+
* @returns The rendered prompt string.
|
|
22
|
+
*/
|
|
23
|
+
export async function sessionPrompt_render(options = {}) {
|
|
24
|
+
const context = await context_getSingle();
|
|
25
|
+
const cwd = await session.getCWD();
|
|
26
|
+
const isOffline = session.offline;
|
|
27
|
+
const warmupRaw = procCache_get().warmupProgress_get();
|
|
28
|
+
const procWarmup = warmupRaw.active ? { loaded: warmupRaw.loaded } : undefined;
|
|
29
|
+
const ctx = {
|
|
30
|
+
user: isOffline ? 'disconnected' : (context.user ?? 'disconnected'),
|
|
31
|
+
uri: isOffline ? 'no-cube' : (context.URL ?? 'no-cube'),
|
|
32
|
+
cwd: isOffline ? '/' : cwd,
|
|
33
|
+
pacsserver: context.pacsserver ?? null,
|
|
34
|
+
physicalMode: session.physicalMode_get(),
|
|
35
|
+
terminalWidth: options.terminalWidth ?? (process.stdout.columns || 80),
|
|
36
|
+
lastExitCode: options.lastExitCode ?? 0,
|
|
37
|
+
lastCommandDurationMs: options.lastCommandDurationMs ?? 0,
|
|
38
|
+
p10kSegments: settings.config.p10kSegments,
|
|
39
|
+
procWarmup,
|
|
40
|
+
};
|
|
41
|
+
return prompt_render(settings.config.promptTheme, ctx);
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=session.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../../src/core/prompt/session.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAiB,aAAa,EAA2B,MAAM,eAAe,CAAC;AACtF,OAAO,EAAE,aAAa,EAAsB,MAAM,YAAY,CAAC;AAgB/D;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,UAAgC,EAAE;IAC3E,MAAM,OAAO,GAAkB,MAAM,iBAAiB,EAAE,CAAC;IACzD,MAAM,GAAG,GAAW,MAAM,OAAO,CAAC,MAAM,EAAE,CAAC;IAC3C,MAAM,SAAS,GAAY,OAAO,CAAC,OAAO,CAAC;IAE3C,MAAM,SAAS,GAAuB,aAAa,EAAE,CAAC,kBAAkB,EAAE,CAAC;IAC3E,MAAM,UAAU,GACd,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IAE9D,MAAM,GAAG,GAAkB;QACzB,IAAI,EAAmB,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,IAAI,cAAc,CAAC;QACpF,GAAG,EAAoB,SAAS,CAAC,CAAC,CAAC,SAAS,CAAM,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,IAAK,SAAS,CAAC;QAC/E,GAAG,EAAoB,SAAS,CAAC,CAAC,CAAC,GAAG,CAAY,CAAC,CAAC,GAAG;QACvD,UAAU,EAAa,OAAO,CAAC,UAAU,IAAI,IAAI;QACjD,YAAY,EAAW,OAAO,CAAC,gBAAgB,EAAE;QACjD,aAAa,EAAU,OAAO,CAAC,aAAa,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC;QAC9E,YAAY,EAAW,OAAO,CAAC,YAAY,IAAI,CAAC;QAChD,qBAAqB,EAAE,OAAO,CAAC,qBAAqB,IAAI,CAAC;QACzD,YAAY,EAAW,QAAQ,CAAC,MAAM,CAAC,YAAY;QACnD,UAAU;KACX,CAAC;IAEF,OAAO,aAAa,CAAC,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;AACzD,CAAC"}
|
package/dist/core/question.d.ts
CHANGED
|
@@ -1,34 +1,27 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @file Shared question
|
|
2
|
+
* @file Shared question helpers for builtins.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* Thin adapters over the active {@link Surface}'s prompt operation. Builtins
|
|
5
|
+
* (and the salsa admin-prompt flow, which is handed these functions) call
|
|
6
|
+
* `repl_question` / `repl_questionHidden` and remain unaware of how the host
|
|
7
|
+
* actually reads input — a local readline interface, or a request to a remote
|
|
8
|
+
* surface. The host installs the surface (see `./cliSurface.js`); until it
|
|
9
|
+
* does, the default surface fails these calls with a clear message rather
|
|
10
|
+
* than hanging on a standard input that is not there.
|
|
8
11
|
*
|
|
9
12
|
* @module
|
|
10
13
|
*/
|
|
11
14
|
/**
|
|
12
|
-
*
|
|
13
|
-
* Called once by REPL.start() before any commands run.
|
|
14
|
-
*
|
|
15
|
-
* @param fn - Wrapper around rl.question() on the active interface.
|
|
16
|
-
* @param hiddenFn - Raw-stdin reader that suppresses echo.
|
|
17
|
-
*/
|
|
18
|
-
export declare function repl_questionRegister(fn: (prompt: string) => Promise<string>, hiddenFn: (prompt: string) => Promise<string>): void;
|
|
19
|
-
/**
|
|
20
|
-
* Asks a question using the active REPL's readline interface so that
|
|
21
|
-
* the answer is not double-consumed by a second interface on the same stdin.
|
|
15
|
+
* Asks a question through the active surface.
|
|
22
16
|
*
|
|
23
17
|
* @param prompt - The question string to display.
|
|
24
18
|
* @returns The trimmed user answer.
|
|
25
19
|
*/
|
|
26
20
|
export declare function repl_question(prompt: string): Promise<string>;
|
|
27
21
|
/**
|
|
28
|
-
* Asks for a
|
|
29
|
-
* Falls back to a muted readline interface outside the REPL.
|
|
22
|
+
* Asks for a secret (no echo) through the active surface.
|
|
30
23
|
*
|
|
31
24
|
* @param prompt - The prompt string to display.
|
|
32
|
-
* @returns The trimmed
|
|
25
|
+
* @returns The trimmed secret string.
|
|
33
26
|
*/
|
|
34
27
|
export declare function repl_questionHidden(prompt: string): Promise<string>;
|
package/dist/core/question.js
CHANGED
|
@@ -1,76 +1,33 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @file Shared question
|
|
2
|
+
* @file Shared question helpers for builtins.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* Thin adapters over the active {@link Surface}'s prompt operation. Builtins
|
|
5
|
+
* (and the salsa admin-prompt flow, which is handed these functions) call
|
|
6
|
+
* `repl_question` / `repl_questionHidden` and remain unaware of how the host
|
|
7
|
+
* actually reads input — a local readline interface, or a request to a remote
|
|
8
|
+
* surface. The host installs the surface (see `./cliSurface.js`); until it
|
|
9
|
+
* does, the default surface fails these calls with a clear message rather
|
|
10
|
+
* than hanging on a standard input that is not there.
|
|
8
11
|
*
|
|
9
12
|
* @module
|
|
10
13
|
*/
|
|
11
|
-
import
|
|
12
|
-
/** Registered by the REPL on startup. */
|
|
13
|
-
let _questionFn = null;
|
|
14
|
-
let _questionHiddenFn = null;
|
|
14
|
+
import { surface_get } from './surface.js';
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
17
|
-
* Called once by REPL.start() before any commands run.
|
|
18
|
-
*
|
|
19
|
-
* @param fn - Wrapper around rl.question() on the active interface.
|
|
20
|
-
* @param hiddenFn - Raw-stdin reader that suppresses echo.
|
|
21
|
-
*/
|
|
22
|
-
export function repl_questionRegister(fn, hiddenFn) {
|
|
23
|
-
_questionFn = fn;
|
|
24
|
-
_questionHiddenFn = hiddenFn;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Asks a question using the active REPL's readline interface so that
|
|
28
|
-
* the answer is not double-consumed by a second interface on the same stdin.
|
|
16
|
+
* Asks a question through the active surface.
|
|
29
17
|
*
|
|
30
18
|
* @param prompt - The question string to display.
|
|
31
19
|
* @returns The trimmed user answer.
|
|
32
20
|
*/
|
|
33
21
|
export function repl_question(prompt) {
|
|
34
|
-
|
|
35
|
-
return _questionFn(prompt);
|
|
36
|
-
}
|
|
37
|
-
// Fallback: one-shot interface (pre-REPL startup / single-shot mode)
|
|
38
|
-
return new Promise((resolve) => {
|
|
39
|
-
const rl = readline.createInterface({
|
|
40
|
-
input: process.stdin,
|
|
41
|
-
output: process.stdout,
|
|
42
|
-
});
|
|
43
|
-
rl.question(prompt, (answer) => { rl.close(); resolve(answer.trim()); });
|
|
44
|
-
});
|
|
22
|
+
return surface_get().prompt({ message: prompt });
|
|
45
23
|
}
|
|
46
24
|
/**
|
|
47
|
-
* Asks for a
|
|
48
|
-
* Falls back to a muted readline interface outside the REPL.
|
|
25
|
+
* Asks for a secret (no echo) through the active surface.
|
|
49
26
|
*
|
|
50
27
|
* @param prompt - The prompt string to display.
|
|
51
|
-
* @returns The trimmed
|
|
28
|
+
* @returns The trimmed secret string.
|
|
52
29
|
*/
|
|
53
30
|
export function repl_questionHidden(prompt) {
|
|
54
|
-
|
|
55
|
-
return _questionHiddenFn(prompt);
|
|
56
|
-
}
|
|
57
|
-
// Fallback: muted one-shot readline (used outside the REPL, e.g. chili standalone)
|
|
58
|
-
return new Promise((resolve) => {
|
|
59
|
-
const { Writable } = require('stream');
|
|
60
|
-
const muted = new Writable({
|
|
61
|
-
write(_c, _e, cb) { cb(); }
|
|
62
|
-
});
|
|
63
|
-
const rl = readline.createInterface({
|
|
64
|
-
input: process.stdin,
|
|
65
|
-
output: muted,
|
|
66
|
-
terminal: true,
|
|
67
|
-
});
|
|
68
|
-
process.stdout.write(prompt);
|
|
69
|
-
rl.question('', (answer) => {
|
|
70
|
-
process.stdout.write('\n');
|
|
71
|
-
rl.close();
|
|
72
|
-
resolve(answer.trim());
|
|
73
|
-
});
|
|
74
|
-
});
|
|
31
|
+
return surface_get().prompt({ message: prompt, hidden: true });
|
|
75
32
|
}
|
|
76
33
|
//# sourceMappingURL=question.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"question.js","sourceRoot":"","sources":["../../src/core/question.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"question.js","sourceRoot":"","sources":["../../src/core/question.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,MAAc;IAC1C,OAAO,WAAW,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;AACnD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAAc;IAChD,OAAO,WAAW,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;AACjE,CAAC"}
|
package/dist/core/repl.d.ts
CHANGED
|
@@ -1,20 +1,40 @@
|
|
|
1
|
+
import type { ChellEngine } from './engine.js';
|
|
2
|
+
/**
|
|
3
|
+
* Handles the Read-Eval-Print Loop (REPL) interaction.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Options for the REPL host.
|
|
7
|
+
*
|
|
8
|
+
* @property promptText - A prompt to display instead of the locally-rendered
|
|
9
|
+
* themed prompt: a fixed string, or a provider called on each redraw. The
|
|
10
|
+
* remote client passes a provider that returns the latest prompt string the
|
|
11
|
+
* daemon pushed, so a remote surface shows the same themed prompt as a local
|
|
12
|
+
* session.
|
|
13
|
+
*/
|
|
14
|
+
export interface ReplOptions {
|
|
15
|
+
promptText?: string | (() => string);
|
|
16
|
+
}
|
|
1
17
|
/**
|
|
2
18
|
* Handles the Read-Eval-Print Loop (REPL) interaction.
|
|
3
19
|
*/
|
|
4
20
|
export declare class REPL {
|
|
5
21
|
private rl;
|
|
22
|
+
private engine;
|
|
6
23
|
private isOpen;
|
|
7
24
|
private lastCommandDurationMs;
|
|
8
25
|
private lastExitCode;
|
|
26
|
+
private promptText;
|
|
9
27
|
/**
|
|
10
|
-
* Initializes the REPL interface.
|
|
28
|
+
* Initializes the REPL interface around an engine.
|
|
29
|
+
*
|
|
30
|
+
* @param engine - The engine that executes lines and answers completions.
|
|
31
|
+
* @param options - Optional host settings (e.g. a fixed prompt string).
|
|
11
32
|
*/
|
|
12
|
-
constructor();
|
|
33
|
+
constructor(engine: ChellEngine, options?: ReplOptions);
|
|
13
34
|
/**
|
|
14
|
-
* Starts the REPL loop.
|
|
15
|
-
* @param commandHandler - Async function to process each input line.
|
|
35
|
+
* Starts the REPL loop, executing each input line through the engine.
|
|
16
36
|
*/
|
|
17
|
-
start(
|
|
37
|
+
start(): Promise<void>;
|
|
18
38
|
/**
|
|
19
39
|
* Updates and redisplays the prompt based on current session state.
|
|
20
40
|
*/
|
package/dist/core/repl.js
CHANGED
|
@@ -1,66 +1,76 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file REPL Logic.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* The CLI host around the chell engine: a readline loop that reads lines,
|
|
5
|
+
* hands them to the engine, and owns the terminal-facing concerns (prompt,
|
|
6
|
+
* history, output sink, interactive questions).
|
|
5
7
|
*
|
|
6
8
|
* @module
|
|
7
9
|
*/
|
|
8
10
|
import * as readline from 'readline';
|
|
9
11
|
import * as fs from 'fs';
|
|
10
12
|
import chalk from 'chalk';
|
|
11
|
-
import { session } from '../session/index.js';
|
|
12
|
-
import { input_complete } from '../lib/completer/index.js';
|
|
13
13
|
import { settings } from '../config/settings.js';
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
14
|
+
import { sessionPrompt_render } from './prompt/session.js';
|
|
15
|
+
import { surface_set } from './surface.js';
|
|
16
|
+
import { cliSurface_create } from './cliSurface.js';
|
|
17
|
+
import { sink_set, StdoutSink } from './sink.js';
|
|
18
18
|
/**
|
|
19
19
|
* Handles the Read-Eval-Print Loop (REPL) interaction.
|
|
20
20
|
*/
|
|
21
21
|
export class REPL {
|
|
22
22
|
rl;
|
|
23
|
+
engine;
|
|
23
24
|
isOpen = true;
|
|
24
25
|
lastCommandDurationMs = 0;
|
|
25
26
|
lastExitCode = 0;
|
|
27
|
+
promptText;
|
|
26
28
|
/**
|
|
27
|
-
* Initializes the REPL interface.
|
|
29
|
+
* Initializes the REPL interface around an engine.
|
|
30
|
+
*
|
|
31
|
+
* @param engine - The engine that executes lines and answers completions.
|
|
32
|
+
* @param options - Optional host settings (e.g. a fixed prompt string).
|
|
28
33
|
*/
|
|
29
|
-
constructor() {
|
|
34
|
+
constructor(engine, options) {
|
|
35
|
+
this.engine = engine;
|
|
36
|
+
this.promptText = options?.promptText;
|
|
30
37
|
this.rl = readline.createInterface({
|
|
31
38
|
input: process.stdin,
|
|
32
39
|
output: process.stdout,
|
|
33
40
|
prompt: '> ',
|
|
34
|
-
completer:
|
|
41
|
+
completer: (line, callback) => {
|
|
42
|
+
this.engine.line_complete(line)
|
|
43
|
+
.then((result) => callback(null, [result.candidates, result.prefix]))
|
|
44
|
+
.catch(() => callback(null, [[], line]));
|
|
45
|
+
},
|
|
35
46
|
});
|
|
36
47
|
}
|
|
37
48
|
/**
|
|
38
|
-
* Starts the REPL loop.
|
|
39
|
-
* @param commandHandler - Async function to process each input line.
|
|
49
|
+
* Starts the REPL loop, executing each input line through the engine.
|
|
40
50
|
*/
|
|
41
|
-
async start(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
process.stdout.write(prompt);
|
|
49
|
-
return new Promise((resolve) => {
|
|
50
|
-
this.rl.question('', (answer) => {
|
|
51
|
-
rlInternal._writeToOutput = origWrite;
|
|
52
|
-
process.stdout.write('\n');
|
|
53
|
-
resolve(answer.trim());
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
});
|
|
51
|
+
async start() {
|
|
52
|
+
// The REPL is the host that owns the interaction channels: command output
|
|
53
|
+
// reaches the terminal through the sink it installs, and interactive
|
|
54
|
+
// prompts run through the surface it installs — both backed by the REPL's
|
|
55
|
+
// single readline interface, so builtins never assume a terminal exists.
|
|
56
|
+
sink_set(new StdoutSink());
|
|
57
|
+
surface_set(cliSurface_create(this.rl));
|
|
57
58
|
await this.history_load();
|
|
58
59
|
await this.prompt_update();
|
|
59
60
|
this.rl.on('line', async (line) => {
|
|
60
61
|
await this.history_append(line);
|
|
62
|
+
// `exit` quits this shell, never the engine. Closing readline runs the
|
|
63
|
+
// 'close' handler (goodbye, then process exit). Crucially, for a remote
|
|
64
|
+
// surface this detaches the client and leaves the daemon — and its other
|
|
65
|
+
// surfaces — running; forwarding `exit` to the engine would instead reach
|
|
66
|
+
// dispatch's process.exit on the daemon and tear every surface down.
|
|
67
|
+
if (line.trim().split(/\s+/)[0] === 'exit') {
|
|
68
|
+
this.rl.close();
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
61
71
|
const startMs = Date.now();
|
|
62
72
|
process.exitCode = 0;
|
|
63
|
-
await
|
|
73
|
+
await this.engine.line_execute(line);
|
|
64
74
|
this.lastCommandDurationMs = Date.now() - startMs;
|
|
65
75
|
this.lastExitCode = process.exitCode ?? 0;
|
|
66
76
|
if (this.isOpen) {
|
|
@@ -85,24 +95,25 @@ export class REPL {
|
|
|
85
95
|
async prompt_update() {
|
|
86
96
|
if (!this.isOpen)
|
|
87
97
|
return;
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
// An injected prompt (the remote client) skips local context rendering:
|
|
99
|
+
// the session lives in the daemon, not this process. It may be a fixed
|
|
100
|
+
// string or a provider returning the latest daemon-pushed prompt.
|
|
101
|
+
if (this.promptText !== undefined) {
|
|
102
|
+
const text = typeof this.promptText === 'function' ? this.promptText() : this.promptText;
|
|
103
|
+
this.rl.setPrompt(text);
|
|
104
|
+
try {
|
|
105
|
+
this.rl.prompt();
|
|
106
|
+
}
|
|
107
|
+
catch (e) {
|
|
108
|
+
// Interface might be closed
|
|
109
|
+
}
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
const rendered = await sessionPrompt_render({
|
|
100
113
|
lastExitCode: this.lastExitCode,
|
|
101
114
|
lastCommandDurationMs: this.lastCommandDurationMs,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
};
|
|
105
|
-
this.rl.setPrompt(prompt_render(settings.config.promptTheme, ctx));
|
|
115
|
+
});
|
|
116
|
+
this.rl.setPrompt(rendered);
|
|
106
117
|
try {
|
|
107
118
|
this.rl.prompt();
|
|
108
119
|
}
|
package/dist/core/repl.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repl.js","sourceRoot":"","sources":["../../src/core/repl.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"repl.js","sourceRoot":"","sources":["../../src/core/repl.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH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