@lolkda/dsh-prompt-manager 3.0.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/LICENSE +21 -0
- package/README.md +606 -0
- package/client/client.js +2320 -0
- package/cordis.patch.yml +20 -0
- package/environment.md +24 -0
- package/lib/entries.js +303 -0
- package/lib/entries.js.map +1 -0
- package/lib/guard.js +134 -0
- package/lib/guard.js.map +1 -0
- package/lib/index.js +959 -0
- package/lib/index.js.map +1 -0
- package/lib/net.js +179 -0
- package/lib/net.js.map +1 -0
- package/lib/pack.js +327 -0
- package/lib/pack.js.map +1 -0
- package/lib/probe.js +251 -0
- package/lib/probe.js.map +1 -0
- package/lib/routes.js +718 -0
- package/lib/routes.js.map +1 -0
- package/lib/scripts.js +803 -0
- package/lib/scripts.js.map +1 -0
- package/lib/source.js +308 -0
- package/lib/source.js.map +1 -0
- package/lib/store.js +223 -0
- package/lib/store.js.map +1 -0
- package/lib/subscriptions.js +269 -0
- package/lib/subscriptions.js.map +1 -0
- package/lib/sync.js +646 -0
- package/lib/sync.js.map +1 -0
- package/lib/types/entries.d.ts +194 -0
- package/lib/types/entries.d.ts.map +1 -0
- package/lib/types/guard.d.ts +63 -0
- package/lib/types/guard.d.ts.map +1 -0
- package/lib/types/index.d.ts +176 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/net.d.ts +81 -0
- package/lib/types/net.d.ts.map +1 -0
- package/lib/types/pack.d.ts +298 -0
- package/lib/types/pack.d.ts.map +1 -0
- package/lib/types/probe.d.ts +150 -0
- package/lib/types/probe.d.ts.map +1 -0
- package/lib/types/routes.d.ts +85 -0
- package/lib/types/routes.d.ts.map +1 -0
- package/lib/types/scripts.d.ts +455 -0
- package/lib/types/scripts.d.ts.map +1 -0
- package/lib/types/source.d.ts +194 -0
- package/lib/types/source.d.ts.map +1 -0
- package/lib/types/store.d.ts +140 -0
- package/lib/types/store.d.ts.map +1 -0
- package/lib/types/subscriptions.d.ts +204 -0
- package/lib/types/subscriptions.d.ts.map +1 -0
- package/lib/types/sync.d.ts +248 -0
- package/lib/types/sync.d.ts.map +1 -0
- package/package.json +100 -0
package/lib/probe.js
ADDED
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mount-time detection of the tools a machine actually has.
|
|
3
|
+
*
|
|
4
|
+
* A prompt variable's provider is evaluated synchronously on every assembly, so
|
|
5
|
+
* a value that costs a subprocess cannot be computed there: this plugin probes
|
|
6
|
+
* once, when it mounts, and then serves the measured strings from memory.
|
|
7
|
+
*
|
|
8
|
+
* Every probe yields a string. A tool that is absent, one that prints nothing,
|
|
9
|
+
* and one that hangs are all ordinary outcomes, because a variable that resolves
|
|
10
|
+
* to `undefined` makes every section referencing it fail to render — one missing
|
|
11
|
+
* tool would cost the whole system prompt.
|
|
12
|
+
*
|
|
13
|
+
* @module @lolkda/dsh-prompt-manager/probe
|
|
14
|
+
*/
|
|
15
|
+
import { spawnSync } from 'node:child_process';
|
|
16
|
+
/** Largest number of probes one configuration may declare. */
|
|
17
|
+
export const MAX_PROBES = 64;
|
|
18
|
+
/** Per-probe timeout, used when a probe sets no `timeoutMs` of its own. */
|
|
19
|
+
export const DEFAULT_PROBE_TIMEOUT_MS = 1500;
|
|
20
|
+
/**
|
|
21
|
+
* Ceiling on the whole probing pass. Reaching it does not fail the mount: the
|
|
22
|
+
* remaining probes report {@link ProbeTexts.skipped} instead, so a command that
|
|
23
|
+
* hangs cannot stall a session's startup.
|
|
24
|
+
*/
|
|
25
|
+
export const DEFAULT_PROBE_BUDGET_MS = 8000;
|
|
26
|
+
/** Longest value a probe may contribute to the prompt. */
|
|
27
|
+
export const MAX_PROBE_VALUE = 120;
|
|
28
|
+
/** Largest amount of output read back from one probe. */
|
|
29
|
+
const MAX_PROBE_OUTPUT = 64 * 1024;
|
|
30
|
+
/** Exit codes shells use for "no such command": POSIX 127, cmd.exe 9009. */
|
|
31
|
+
const NOT_FOUND_STATUS = [127, 9009];
|
|
32
|
+
/** Valid prompt-variable names, mirroring the registry's own rule. */
|
|
33
|
+
const VARIABLE_NAME = /^[a-z][a-z0-9_]*$/;
|
|
34
|
+
/** Default placeholder texts, in English and machine-independent. */
|
|
35
|
+
export const DEFAULT_PROBE_TEXTS = {
|
|
36
|
+
missing: '(not installed)',
|
|
37
|
+
empty: '(no output)',
|
|
38
|
+
timeout: '(timeout)',
|
|
39
|
+
skipped: '(skipped)',
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Probes the built-in machine-environment prompt needs, so a deployment that
|
|
43
|
+
* configures nothing still resolves every `{{...}}` that body references.
|
|
44
|
+
*
|
|
45
|
+
* They are ordinary probes: `config.probes` overrides any of them by name, and
|
|
46
|
+
* `probeDefaults: false` drops them all. Dropping them while the built-in body
|
|
47
|
+
* is still in force leaves its variables unregistered, which fails assembly, so
|
|
48
|
+
* the two settings belong together.
|
|
49
|
+
*/
|
|
50
|
+
export const DEFAULT_PROBES = {
|
|
51
|
+
pwsh: { command: 'pwsh', args: ['-NoProfile', '-Command', '$PSVersionTable.PSVersion.ToString()'] },
|
|
52
|
+
bash: { command: 'bash', args: ['--version'], pattern: 'version ([0-9.]+)' },
|
|
53
|
+
git: { command: 'git', args: ['--version'], pattern: '([0-9]+\.[0-9]+\.[0-9]+)' },
|
|
54
|
+
node: { command: 'node', args: ['--version'], pattern: 'v?([0-9.]+)' },
|
|
55
|
+
python: { command: 'python', args: ['--version'], pattern: '([0-9.]+)' },
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Run a command and collect both streams.
|
|
59
|
+
*
|
|
60
|
+
* `spawnSync` rather than `execFileSync`, because the latter discards standard
|
|
61
|
+
* error on success — and some tools, `java -version` among them, print their
|
|
62
|
+
* version there while exiting zero.
|
|
63
|
+
*
|
|
64
|
+
* @param command - executable name or absolute path.
|
|
65
|
+
* @param args - fixed arguments.
|
|
66
|
+
* @param options - whether to use a shell, and the timeout.
|
|
67
|
+
* @returns the normalized run.
|
|
68
|
+
*/
|
|
69
|
+
export const defaultProbeRunner = (command, args, options) => {
|
|
70
|
+
const result = spawnSync(command, args, {
|
|
71
|
+
shell: options.shell,
|
|
72
|
+
timeout: options.timeoutMs,
|
|
73
|
+
windowsHide: true,
|
|
74
|
+
encoding: 'utf8',
|
|
75
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
76
|
+
maxBuffer: MAX_PROBE_OUTPUT,
|
|
77
|
+
});
|
|
78
|
+
const code = result.error === undefined ? undefined : result.error.code;
|
|
79
|
+
return {
|
|
80
|
+
spawnError: code === undefined || code === 'ETIMEDOUT' ? undefined : code,
|
|
81
|
+
status: typeof result.status === 'number' ? result.status : undefined,
|
|
82
|
+
stdout: typeof result.stdout === 'string' ? result.stdout : '',
|
|
83
|
+
stderr: typeof result.stderr === 'string' ? result.stderr : '',
|
|
84
|
+
timedOut: code === 'ETIMEDOUT',
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* Message text of an unknown thrown value.
|
|
89
|
+
* @param error - the caught value.
|
|
90
|
+
* @returns a human-facing message.
|
|
91
|
+
*/
|
|
92
|
+
function messageOf(error) {
|
|
93
|
+
return error instanceof Error ? error.message : String(error);
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* First line carrying anything.
|
|
97
|
+
* @param text - raw output, possibly multi-line or blank.
|
|
98
|
+
* @returns the trimmed line, or `undefined` when nothing was printed.
|
|
99
|
+
*/
|
|
100
|
+
function firstLine(text) {
|
|
101
|
+
for (const line of text.split(/\r?\n/)) {
|
|
102
|
+
const trimmed = line.trim();
|
|
103
|
+
if (trimmed.length > 0)
|
|
104
|
+
return trimmed;
|
|
105
|
+
}
|
|
106
|
+
return undefined;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Apply an optional pattern to a line.
|
|
110
|
+
* @param line - the first non-empty output line.
|
|
111
|
+
* @param pattern - optional regular expression; its first capture group wins.
|
|
112
|
+
* @returns the value to register, never longer than {@link MAX_PROBE_VALUE}.
|
|
113
|
+
*/
|
|
114
|
+
function narrow(line, pattern) {
|
|
115
|
+
const fallback = line.slice(0, MAX_PROBE_VALUE);
|
|
116
|
+
if (pattern === undefined || pattern.length === 0)
|
|
117
|
+
return fallback;
|
|
118
|
+
try {
|
|
119
|
+
const match = new RegExp(pattern).exec(line);
|
|
120
|
+
if (match === null)
|
|
121
|
+
return fallback;
|
|
122
|
+
return (match[1] ?? match[0]).slice(0, MAX_PROBE_VALUE);
|
|
123
|
+
}
|
|
124
|
+
catch {
|
|
125
|
+
return fallback;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* The value one probe contributes.
|
|
130
|
+
* @param spec - the probe to run.
|
|
131
|
+
* @param run - process runner; the real one by default.
|
|
132
|
+
* @param texts - placeholders for the outcomes that carry no version.
|
|
133
|
+
* @returns a non-empty string, whatever happened.
|
|
134
|
+
*/
|
|
135
|
+
export function probeValue(spec, run = defaultProbeRunner, texts = DEFAULT_PROBE_TEXTS) {
|
|
136
|
+
const result = run(spec.command, spec.args ?? [], {
|
|
137
|
+
shell: spec.shell ?? false,
|
|
138
|
+
timeoutMs: spec.timeoutMs ?? DEFAULT_PROBE_TIMEOUT_MS,
|
|
139
|
+
});
|
|
140
|
+
if (result.timedOut)
|
|
141
|
+
return texts.timeout;
|
|
142
|
+
if (result.spawnError !== undefined)
|
|
143
|
+
return texts.missing;
|
|
144
|
+
if (result.status !== undefined && NOT_FOUND_STATUS.includes(result.status) && result.stdout.trim().length === 0) {
|
|
145
|
+
return texts.missing;
|
|
146
|
+
}
|
|
147
|
+
const line = firstLine(result.stdout) ?? firstLine(result.stderr);
|
|
148
|
+
if (line === undefined)
|
|
149
|
+
return texts.empty;
|
|
150
|
+
return narrow(line, spec.pattern);
|
|
151
|
+
}
|
|
152
|
+
/** Is this a JSON object rather than an array or a scalar? */
|
|
153
|
+
function isRecord(value) {
|
|
154
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Accept the `probes` config value in whatever shape a composition delivers and
|
|
158
|
+
* keep only the specs that can be run.
|
|
159
|
+
*
|
|
160
|
+
* Reports rather than throws: the caller decides whether a malformed probe is a
|
|
161
|
+
* composition error worth failing the mount over.
|
|
162
|
+
*
|
|
163
|
+
* @param raw - the config value.
|
|
164
|
+
* @returns the usable specs, plus one problem message per dropped entry.
|
|
165
|
+
*/
|
|
166
|
+
export function normalizeProbes(raw) {
|
|
167
|
+
const specs = {};
|
|
168
|
+
const problems = [];
|
|
169
|
+
if (raw === undefined || raw === null)
|
|
170
|
+
return { specs, problems };
|
|
171
|
+
if (!isRecord(raw)) {
|
|
172
|
+
return { specs, problems: ['probes must be a mapping of variable name to a spec'] };
|
|
173
|
+
}
|
|
174
|
+
for (const [name, value] of Object.entries(raw)) {
|
|
175
|
+
if (!VARIABLE_NAME.test(name)) {
|
|
176
|
+
problems.push(`probe name ${JSON.stringify(name)} is not a usable variable name (must match ${String(VARIABLE_NAME)})`);
|
|
177
|
+
continue;
|
|
178
|
+
}
|
|
179
|
+
if (!isRecord(value)) {
|
|
180
|
+
problems.push(`probe ${name} must be a mapping with a command`);
|
|
181
|
+
continue;
|
|
182
|
+
}
|
|
183
|
+
const command = typeof value['command'] === 'string' ? value['command'].trim() : '';
|
|
184
|
+
if (command.length === 0) {
|
|
185
|
+
problems.push(`probe ${name} needs a non-empty command`);
|
|
186
|
+
continue;
|
|
187
|
+
}
|
|
188
|
+
let args = [];
|
|
189
|
+
const rawArgs = value['args'];
|
|
190
|
+
if (rawArgs !== undefined) {
|
|
191
|
+
if (!Array.isArray(rawArgs) || rawArgs.some((entry) => typeof entry !== 'string')) {
|
|
192
|
+
problems.push(`probe ${name} has args that are not a list of strings`);
|
|
193
|
+
continue;
|
|
194
|
+
}
|
|
195
|
+
args = rawArgs;
|
|
196
|
+
}
|
|
197
|
+
const spec = { command, args };
|
|
198
|
+
if (typeof value['shell'] === 'boolean')
|
|
199
|
+
spec.shell = value['shell'];
|
|
200
|
+
const pattern = value['pattern'];
|
|
201
|
+
if (pattern !== undefined) {
|
|
202
|
+
if (typeof pattern !== 'string' || pattern.length === 0) {
|
|
203
|
+
problems.push(`probe ${name} has a pattern that is not a non-empty string`);
|
|
204
|
+
continue;
|
|
205
|
+
}
|
|
206
|
+
try {
|
|
207
|
+
new RegExp(pattern);
|
|
208
|
+
}
|
|
209
|
+
catch (error) {
|
|
210
|
+
problems.push(`probe ${name} has a pattern that is not a regular expression: ${messageOf(error)}`);
|
|
211
|
+
continue;
|
|
212
|
+
}
|
|
213
|
+
spec.pattern = pattern;
|
|
214
|
+
}
|
|
215
|
+
const timeoutMs = value['timeoutMs'];
|
|
216
|
+
if (timeoutMs !== undefined) {
|
|
217
|
+
if (typeof timeoutMs !== 'number' || !Number.isFinite(timeoutMs) || timeoutMs <= 0) {
|
|
218
|
+
problems.push(`probe ${name} has a timeoutMs that is not a positive number`);
|
|
219
|
+
continue;
|
|
220
|
+
}
|
|
221
|
+
spec.timeoutMs = Math.trunc(timeoutMs);
|
|
222
|
+
}
|
|
223
|
+
specs[name] = spec;
|
|
224
|
+
}
|
|
225
|
+
return { specs, problems };
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Probe every declared command once, in declaration order.
|
|
229
|
+
* @param specs - usable specs, as {@link normalizeProbes} returns them.
|
|
230
|
+
* @param options - runner, placeholder texts, total budget, and clock.
|
|
231
|
+
* @returns one outcome per probe, none of which can be empty.
|
|
232
|
+
*/
|
|
233
|
+
export function runProbes(specs, options = {}) {
|
|
234
|
+
const run = options.run ?? defaultProbeRunner;
|
|
235
|
+
const texts = options.texts ?? DEFAULT_PROBE_TEXTS;
|
|
236
|
+
const budgetMs = options.budgetMs ?? DEFAULT_PROBE_BUDGET_MS;
|
|
237
|
+
const now = options.now ?? (() => Date.now());
|
|
238
|
+
const started = now();
|
|
239
|
+
const outcomes = [];
|
|
240
|
+
for (const [name, spec] of Object.entries(specs)) {
|
|
241
|
+
if (now() - started >= budgetMs) {
|
|
242
|
+
outcomes.push({ name, value: texts.skipped, ms: 0 });
|
|
243
|
+
continue;
|
|
244
|
+
}
|
|
245
|
+
const probeStarted = now();
|
|
246
|
+
const value = probeValue(spec, run, texts);
|
|
247
|
+
outcomes.push({ name, value, ms: now() - probeStarted });
|
|
248
|
+
}
|
|
249
|
+
return { outcomes };
|
|
250
|
+
}
|
|
251
|
+
//# sourceMappingURL=probe.js.map
|
package/lib/probe.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"probe.js","sourceRoot":"","sources":["../src/probe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAE9C,8DAA8D;AAC9D,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,CAAA;AAE5B,2EAA2E;AAC3E,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,CAAA;AAE5C;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,CAAA;AAE3C,0DAA0D;AAC1D,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAA;AAElC,yDAAyD;AACzD,MAAM,gBAAgB,GAAG,EAAE,GAAG,IAAI,CAAA;AAElC,4EAA4E;AAC5E,MAAM,gBAAgB,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;AAEpC,sEAAsE;AACtE,MAAM,aAAa,GAAG,mBAAmB,CAAA;AAczC,qEAAqE;AACrE,MAAM,CAAC,MAAM,mBAAmB,GAAe;IAC7C,OAAO,EAAE,iBAAiB;IAC1B,KAAK,EAAE,aAAa;IACpB,OAAO,EAAE,WAAW;IACpB,OAAO,EAAE,WAAW;CACrB,CAAA;AAwBD;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAwC;IACjE,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,I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