litmus-cli 1.4.7-eng1502.4 → 1.4.8

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.
Files changed (67) hide show
  1. package/README.md +0 -29
  2. package/dist/commands/connect.d.ts.map +1 -1
  3. package/dist/commands/connect.js +20 -2
  4. package/dist/commands/connect.js.map +1 -1
  5. package/dist/commands/doctor.d.ts +1 -41
  6. package/dist/commands/doctor.d.ts.map +1 -1
  7. package/dist/commands/doctor.js +26 -188
  8. package/dist/commands/doctor.js.map +1 -1
  9. package/dist/commands/init.d.ts +1 -3
  10. package/dist/commands/init.d.ts.map +1 -1
  11. package/dist/commands/init.js +36 -77
  12. package/dist/commands/init.js.map +1 -1
  13. package/dist/commands/status.d.ts.map +1 -1
  14. package/dist/commands/status.js +25 -1
  15. package/dist/commands/status.js.map +1 -1
  16. package/dist/commands/submit.d.ts.map +1 -1
  17. package/dist/commands/submit.js +4 -83
  18. package/dist/commands/submit.js.map +1 -1
  19. package/dist/index.js +2 -3
  20. package/dist/index.js.map +1 -1
  21. package/dist/lib/ai-tracking.d.ts +10 -0
  22. package/dist/lib/ai-tracking.d.ts.map +1 -1
  23. package/dist/lib/ai-tracking.js +25 -0
  24. package/dist/lib/ai-tracking.js.map +1 -1
  25. package/dist/lib/backlog-flush.d.ts +118 -0
  26. package/dist/lib/backlog-flush.d.ts.map +1 -0
  27. package/dist/lib/backlog-flush.js +268 -0
  28. package/dist/lib/backlog-flush.js.map +1 -0
  29. package/dist/lib/config.d.ts +0 -20
  30. package/dist/lib/config.d.ts.map +1 -1
  31. package/dist/lib/config.js +0 -27
  32. package/dist/lib/config.js.map +1 -1
  33. package/dist/lib/detect-project.d.ts +46 -1
  34. package/dist/lib/detect-project.d.ts.map +1 -1
  35. package/dist/lib/detect-project.js +40 -19
  36. package/dist/lib/detect-project.js.map +1 -1
  37. package/dist/lib/hook-logger.cjs +136 -2
  38. package/dist/lib/keepalive.d.ts +33 -0
  39. package/dist/lib/keepalive.d.ts.map +1 -0
  40. package/dist/lib/keepalive.js +39 -0
  41. package/dist/lib/keepalive.js.map +1 -0
  42. package/dist/lib/shadow.d.ts +14 -0
  43. package/dist/lib/shadow.d.ts.map +1 -1
  44. package/dist/lib/shadow.js +33 -0
  45. package/dist/lib/shadow.js.map +1 -1
  46. package/dist/lib/tracker.d.ts.map +1 -1
  47. package/dist/lib/tracker.js +9 -1
  48. package/dist/lib/tracker.js.map +1 -1
  49. package/dist/lib/watcher.js +31 -7
  50. package/dist/lib/watcher.js.map +1 -1
  51. package/package.json +1 -1
  52. package/dist/lib/editor.d.ts +0 -73
  53. package/dist/lib/editor.d.ts.map +0 -1
  54. package/dist/lib/editor.js +0 -222
  55. package/dist/lib/editor.js.map +0 -1
  56. package/dist/lib/open-url.d.ts +0 -9
  57. package/dist/lib/open-url.d.ts.map +0 -1
  58. package/dist/lib/open-url.js +0 -45
  59. package/dist/lib/open-url.js.map +0 -1
  60. package/dist/lib/select.d.ts +0 -64
  61. package/dist/lib/select.d.ts.map +0 -1
  62. package/dist/lib/select.js +0 -170
  63. package/dist/lib/select.js.map +0 -1
  64. package/dist/lib/session.d.ts +0 -104
  65. package/dist/lib/session.d.ts.map +0 -1
  66. package/dist/lib/session.js +0 -327
  67. package/dist/lib/session.js.map +0 -1
@@ -1,327 +0,0 @@
1
- /**
2
- * The assessment shell — how `litmus init` puts the candidate *inside* their
3
- * assessment folder, and how `litmus submit` takes them back out.
4
- *
5
- * A process cannot change its parent shell's working directory, so "cd into the
6
- * folder for them" has exactly one honest implementation: init spawns an
7
- * interactive shell rooted in the assessment directory and waits on it. The
8
- * candidate works in that shell. When submit succeeds it hangs that shell up,
9
- * the shell exits, init's wait returns, and the candidate is back at the prompt
10
- * they started from, in the directory they started in — the `cd ..` they never
11
- * had to type.
12
- *
13
- * Two independent facts have to line up before we signal anything:
14
- * - LITMUS_ASSESSMENT_SHELL=1 in our own environment, which only a shell we
15
- * spawned can have set, and
16
- * - a .litmus/shell.pid written by that same init, for this same folder,
17
- * naming a process that is genuinely one of our ancestors.
18
- * Either alone could be stale; together they can only describe the shell we are
19
- * actually standing in.
20
- */
21
- import path from "path";
22
- import { existsSync, readFileSync, writeFileSync, unlinkSync } from "fs";
23
- import { spawn, execFileSync } from "child_process";
24
- import chalk from "chalk";
25
- /** Set in the spawned shell's environment; read back by `litmus submit`. */
26
- export const SHELL_ENV_MARKER = "LITMUS_ASSESSMENT_SHELL";
27
- const SHELL_PID_FILE = "shell.pid";
28
- function shellPidPath(projectRoot) {
29
- return path.join(projectRoot, ".litmus", SHELL_PID_FILE);
30
- }
31
- /**
32
- * Whether init should hand the candidate a shell at all. Piped stdin (the e2e
33
- * suite, a CI script, `litmus init | tee`) must never get one — it would hang
34
- * forever on a shell nobody can type into.
35
- */
36
- export function shouldEnterShell(optIn) {
37
- if (optIn === false)
38
- return false;
39
- if (process.env.LITMUS_NO_SHELL === "1")
40
- return false;
41
- return Boolean(process.stdin.isTTY && process.stdout.isTTY);
42
- }
43
- /** The candidate's own shell, falling back to something that certainly exists. */
44
- export function resolveShell() {
45
- if (process.platform === "win32") {
46
- return { command: process.env.ComSpec || "cmd.exe", args: [] };
47
- }
48
- // -i because stdio is inherited but the shell is not the session leader; zsh
49
- // and bash both need it to read their interactive rc files and print a prompt.
50
- return { command: process.env.SHELL || "/bin/sh", args: ["-i"] };
51
- }
52
- /**
53
- * Drop the candidate into `projectRoot` in their own shell and block until they
54
- * leave it — by typing exit, or by `litmus submit` hanging it up.
55
- *
56
- * Resolves to "submitted" when the folder is gone by the time the shell exits
57
- * (submit deleted it), "exited" when the candidate just left.
58
- *
59
- * Closing the shell has two triggers, because the two cases know different
60
- * things: an in-shell `litmus submit` signals it directly (instant, and ordered
61
- * against its own output), while a submit that happens elsewhere — the deadline
62
- * auto-submit in the watcher, or a second terminal — is noticed here by the
63
- * assessment folder disappearing.
64
- */
65
- export async function enterAssessmentShell(projectRoot, folderName) {
66
- const { command, args } = resolveShell();
67
- console.log(chalk.dim(` You're in ${folderName}/ — a shell opened here for you.`));
68
- console.log(chalk.dim(` Type ${chalk.reset(chalk.cyan("exit"))}${chalk.dim(" to leave it; your assessment keeps running either way.")}`));
69
- console.log();
70
- const child = spawn(command, args, {
71
- cwd: projectRoot,
72
- stdio: "inherit",
73
- env: {
74
- ...process.env,
75
- [SHELL_ENV_MARKER]: "1",
76
- LITMUS_ASSESSMENT_DIR: projectRoot,
77
- },
78
- });
79
- if (child.pid) {
80
- try {
81
- writeFileSync(shellPidPath(projectRoot), String(child.pid), "utf8");
82
- }
83
- catch {
84
- // Without the pid file submit just skips the hang-up and tells the
85
- // candidate to cd out themselves. Not worth failing init over.
86
- }
87
- }
88
- // Not every submit can hang this shell up itself. The deadline auto-submit
89
- // runs in the detached watcher, and a candidate can run `litmus submit` from
90
- // a second terminal; neither is standing in this shell, so neither is allowed
91
- // to signal it — and both delete the folder, which would leave the candidate
92
- // sitting in a shell whose working directory no longer exists.
93
- //
94
- // This process is the one that can always fix that: it spawned the shell, so
95
- // it knows the pid for certain, with no pid file and no ancestry to infer.
96
- // The folder going away IS the signal, whoever caused it.
97
- //
98
- // Routed through the same signal path submit uses rather than
99
- // child.kill("SIGHUP"): Windows has no SIGHUP, and libuv only terminates for
100
- // the handful of signals it special-cases, so a raw SIGHUP there fails
101
- // instead of closing the shell. The interval is NOT cleared on an attempt —
102
- // only when the child actually exits — so a failed attempt is retried rather
103
- // than silently abandoning the candidate in a deleted directory.
104
- const folderWatch = setInterval(() => {
105
- if (existsSync(projectRoot))
106
- return;
107
- if (child.pid)
108
- signalHangUp(child.pid);
109
- }, 2000);
110
- // The shell is the foreground job; Ctrl-C at its prompt reaches this process
111
- // too. Ignoring it here means the candidate's ^C interrupts what they're
112
- // running, not the init that is holding their session open.
113
- const swallowSigint = () => { };
114
- process.on("SIGINT", swallowSigint);
115
- try {
116
- await new Promise((resolve) => {
117
- let spawned = false;
118
- child.on("spawn", () => {
119
- spawned = true;
120
- });
121
- child.on("exit", () => resolve());
122
- // 'error' after a successful spawn is a failed signal, not an exit.
123
- // Treating it as one would have init announce the candidate is back in
124
- // their old directory while the shell is still very much alive.
125
- child.on("error", () => {
126
- if (!spawned)
127
- resolve();
128
- });
129
- });
130
- }
131
- finally {
132
- clearInterval(folderWatch);
133
- process.off("SIGINT", swallowSigint);
134
- }
135
- if (!existsSync(projectRoot))
136
- return "submitted";
137
- try {
138
- unlinkSync(shellPidPath(projectRoot));
139
- }
140
- catch {
141
- // already gone
142
- }
143
- return "exited";
144
- }
145
- /** The pid init recorded for this folder's shell, if there is one. */
146
- export function readAssessmentShellPid(projectRoot) {
147
- try {
148
- const pid = parseInt(readFileSync(shellPidPath(projectRoot), "utf8").trim(), 10);
149
- return Number.isFinite(pid) && pid > 1 ? pid : null;
150
- }
151
- catch {
152
- return null;
153
- }
154
- }
155
- /**
156
- * Is `target` one of our ancestors? Guards against a recycled pid: the pid file
157
- * outlives the shell that wrote it if init was killed outright.
158
- */
159
- function isAncestorPid(target) {
160
- if (process.platform === "win32") {
161
- // No cheap ancestor walk here; the env marker plus a per-folder pid file is
162
- // the gate on Windows.
163
- return true;
164
- }
165
- let pid = process.ppid;
166
- for (let depth = 0; depth < 8 && pid > 1; depth++) {
167
- if (pid === target)
168
- return true;
169
- try {
170
- const out = execFileSync("ps", ["-o", "ppid=", "-p", String(pid)], {
171
- encoding: "utf8",
172
- timeout: 3000,
173
- });
174
- pid = parseInt(out.trim(), 10);
175
- }
176
- catch {
177
- return false;
178
- }
179
- if (!Number.isFinite(pid))
180
- return false;
181
- }
182
- return false;
183
- }
184
- /**
185
- * Are we running inside the shell init opened for this folder? Both the
186
- * environment marker and an ancestry check have to agree — see the file header.
187
- *
188
- * Callers use this before printing anything about where the candidate will end
189
- * up, since leaving the shell moves them out of the folder for free.
190
- */
191
- export function inAssessmentShell(shellPid) {
192
- if (process.env[SHELL_ENV_MARKER] !== "1")
193
- return false;
194
- if (shellPid === null)
195
- return false;
196
- return isAncestorPid(shellPid);
197
- }
198
- /**
199
- * Send the hang-up. Shared by both shells we may close.
200
- *
201
- * Call this LAST and print nothing after it: a shell hangs up its jobs on the
202
- * way out, and this process is one of them.
203
- */
204
- let ownHangUpIgnored = false;
205
- function signalHangUp(pid) {
206
- // zsh forwards SIGHUP to its jobs, and we are one. Ignore it so this process
207
- // finishes on its own terms instead of dying between two writes. Registered
208
- // once: the folder watch retries, and a listener per attempt would leak.
209
- if (!ownHangUpIgnored) {
210
- ownHangUpIgnored = true;
211
- process.on("SIGHUP", () => { });
212
- }
213
- try {
214
- if (process.platform === "win32") {
215
- // No /T: that would take this process down with the shell.
216
- execFileSync("taskkill", ["/PID", String(pid), "/F"], { stdio: "ignore", timeout: 5000 });
217
- }
218
- else {
219
- process.kill(pid, "SIGHUP");
220
- }
221
- return true;
222
- }
223
- catch {
224
- return false;
225
- }
226
- }
227
- /** End the assessment shell. Returns true when the hang-up went out. */
228
- export function hangUpAssessmentShell(shellPid) {
229
- if (!inAssessmentShell(shellPid))
230
- return false;
231
- return signalHangUp(shellPid);
232
- }
233
- // Shells a human types into. The name is how we tell "a candidate ran submit in
234
- // their terminal" from "the watcher's auto-submit spawned us", where the parent
235
- // is a node process that must be left alone to flush its own shutdown.
236
- const POSIX_SHELLS = new Set(["zsh", "bash", "sh", "fish", "ksh", "dash", "tcsh", "csh"]);
237
- const WINDOWS_SHELLS = new Set(["cmd.exe", "powershell.exe", "pwsh.exe"]);
238
- /**
239
- * The shell that launched this command, if it is one a human is typing into.
240
- *
241
- * This is NOT the assessment shell — it is whatever terminal the candidate
242
- * happened to run `litmus submit` in, most often their editor's integrated
243
- * terminal. Two independent checks, because getting this wrong means signalling
244
- * something we don't own: the streams must be a TTY (the watcher's auto-submit
245
- * runs on pipes), and the parent process must actually be a shell by name.
246
- */
247
- export function readHostShellPid() {
248
- if (!process.stdin.isTTY || !process.stdout.isTTY)
249
- return null;
250
- const ppid = process.ppid;
251
- if (!ppid || ppid <= 1)
252
- return null;
253
- try {
254
- if (process.platform === "win32") {
255
- const out = execFileSync("tasklist", ["/FI", `PID eq ${ppid}`, "/NH", "/FO", "CSV"], {
256
- encoding: "utf8",
257
- timeout: 5000,
258
- });
259
- const image = (out.split(",")[0] || "").replace(/"/g, "").trim().toLowerCase();
260
- return WINDOWS_SHELLS.has(image) ? ppid : null;
261
- }
262
- const comm = execFileSync("ps", ["-o", "comm=", "-p", String(ppid)], {
263
- encoding: "utf8",
264
- timeout: 3000,
265
- }).trim();
266
- // A login shell reports as "-zsh"; a path as "/bin/zsh".
267
- const name = path.basename(comm).replace(/^-/, "");
268
- return POSIX_SHELLS.has(name) ? ppid : null;
269
- }
270
- catch {
271
- return null;
272
- }
273
- }
274
- /**
275
- * Close the terminal the candidate ran submit in, when we have just deleted the
276
- * directory it is standing in.
277
- *
278
- * This is the other half of "cd them back out". The assessment shell only helps
279
- * candidates who stayed in it; the common flow is to run init in one terminal
280
- * and then work in the editor's integrated one, and that terminal is left
281
- * pointing at a directory that no longer exists — `ls` fails, the prompt lies.
282
- * We cannot change its directory (no process can change its parent's), so the
283
- * only way out is to end it.
284
- *
285
- * Deliberately narrow: only when submit's own working directory was inside the
286
- * folder it just deleted, only for a real interactive shell, and only when that
287
- * shell has a virtualenv active.
288
- *
289
- * The virtualenv gate is what keeps this proportional. Closing someone's
290
- * terminal is intrusive, so it should only happen when the deletion actually
291
- * broke the shell rather than merely emptied its directory — and for a Python
292
- * assessment the venv is one init created INSIDE the assessment folder, so it
293
- * has just gone with it: the interpreter on that shell's PATH no longer exists,
294
- * and there is no way to deactivate a venv from outside the shell holding it
295
- * any more than there is to cd one. With no venv, the shell is only pointing at
296
- * a directory that vanished, which the printed `cd` note covers.
297
- */
298
- export function hostShellToHangUp(deletedDir, startCwd) {
299
- // Still there? Then nothing was deleted out from under anyone.
300
- if (existsSync(deletedDir))
301
- return null;
302
- return hostShellCandidate(deletedDir, startCwd);
303
- }
304
- /**
305
- * Everything except "the folder is actually gone" — so a caller can know, while
306
- * the folder is still standing, whether deleting it is going to end this
307
- * terminal. Submit uses that to keep from printing a `cd` instruction into a
308
- * tab it is about to close.
309
- */
310
- export function willCloseHostShell(assessmentDir, startCwd) {
311
- return hostShellCandidate(assessmentDir, startCwd) !== null;
312
- }
313
- function hostShellCandidate(assessmentDir, startCwd) {
314
- const rel = path.relative(assessmentDir, startCwd);
315
- const isInside = rel === "" || (!rel.startsWith("..") && !path.isAbsolute(rel));
316
- if (!isInside)
317
- return null;
318
- // Only a shell whose environment the deletion actually breaks — see above.
319
- if (!process.env.VIRTUAL_ENV)
320
- return null;
321
- return readHostShellPid();
322
- }
323
- /** Send the hang-up to a pid a caller has already qualified. */
324
- export function hangUpPid(pid) {
325
- return signalHangUp(pid);
326
- }
327
- //# sourceMappingURL=session.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/lib/session.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,IAAI,CAAA;AACxE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,4EAA4E;AAC5E,MAAM,CAAC,MAAM,gBAAgB,GAAG,yBAAyB,CAAA;AAEzD,MAAM,cAAc,GAAG,WAAW,CAAA;AAElC,SAAS,YAAY,CAAC,WAAmB;IACvC,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,EAAE,cAAc,CAAC,CAAA;AAC1D,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAA0B;IACzD,IAAI,KAAK,KAAK,KAAK;QAAE,OAAO,KAAK,CAAA;IACjC,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,KAAK,GAAG;QAAE,OAAO,KAAK,CAAA;IACrD,OAAO,OAAO,CAAC,O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