humanish 0.94.0 → 0.95.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/README.md +8 -0
- package/dist/comms-connections.d.ts +50 -0
- package/dist/comms-connections.js +123 -0
- package/dist/comms-connections.js.map +1 -0
- package/dist/doctor-lab.d.ts +7 -0
- package/dist/doctor-lab.js +15 -7
- package/dist/doctor-lab.js.map +1 -1
- package/dist/key-resolution.d.ts +1 -1
- package/dist/key-resolution.js +6 -4
- package/dist/key-resolution.js.map +1 -1
- package/dist/lab-config.js +9 -0
- package/dist/lab-config.js.map +1 -1
- package/dist/lab-summary.d.ts +2 -2
- package/dist/lab-summary.js +11 -7
- package/dist/lab-summary.js.map +1 -1
- package/dist/program.d.ts +2 -0
- package/dist/program.js +136 -75
- package/dist/program.js.map +1 -1
- package/dist/secret-prompt.d.ts +2 -0
- package/dist/secret-prompt.js +36 -0
- package/dist/secret-prompt.js.map +1 -0
- package/dist/tui-app.js +121 -121
- package/dist/tui-contract.d.ts +13 -1
- package/dist/tui-contract.js.map +1 -1
- package/docs/contracts/schemas.md +33 -5
- package/docs/goals/current.md +5 -5
- package/docs/ramp/README.md +9 -3
- package/docs/release/0.95.0-connections-setup.md +38 -0
- package/package.json +3 -2
- package/skills/humanish/SKILL.md +28 -7
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { createInterface } from "node:readline/promises";
|
|
2
|
+
import { Writable } from "node:stream";
|
|
3
|
+
/** Host-owned entry: no secret crosses the TUI view contract or reaches a writable terminal. */
|
|
4
|
+
export async function promptSecret(label, stdin, stdout) {
|
|
5
|
+
if (!stdin.isTTY || !stdout.isTTY)
|
|
6
|
+
return null;
|
|
7
|
+
const wasRaw = stdin.isRaw;
|
|
8
|
+
// readline owns editing, paste and raw-mode lifecycle; all of its echo goes to this sink.
|
|
9
|
+
const sink = new Writable({ write(_chunk, _encoding, done) { done(); } });
|
|
10
|
+
const reader = createInterface({ input: stdin, output: sink, terminal: true, historySize: 0 });
|
|
11
|
+
// Ink unrefs stdin on unmount. A pending promise alone does not keep Node alive.
|
|
12
|
+
stdin.ref?.();
|
|
13
|
+
return await new Promise(resolve => {
|
|
14
|
+
let settled = false;
|
|
15
|
+
const finish = (value) => {
|
|
16
|
+
if (settled)
|
|
17
|
+
return;
|
|
18
|
+
settled = true;
|
|
19
|
+
reader.close();
|
|
20
|
+
stdin.setRawMode?.(wasRaw === true);
|
|
21
|
+
stdin.pause();
|
|
22
|
+
stdin.unref?.();
|
|
23
|
+
stdout.write("\n");
|
|
24
|
+
resolve(value);
|
|
25
|
+
};
|
|
26
|
+
reader.once("line", line => finish(line.trim() || null));
|
|
27
|
+
reader.once("SIGINT", () => finish(null));
|
|
28
|
+
reader.once("close", () => finish(null));
|
|
29
|
+
reader.once("error", () => finish(null));
|
|
30
|
+
// Advertise readiness only after raw mode and handlers are active. Printing this first lets
|
|
31
|
+
// fast paste race terminal echo and exposes the very value this prompt exists to hide.
|
|
32
|
+
stdin.resume();
|
|
33
|
+
stdout.write(`${label} (input hidden; Ctrl+C cancels): `);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=secret-prompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secret-prompt.js","sourceRoot":"","sources":["../src/secret-prompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,gGAAgG;AAChG,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,KAAa,EAAE,KAAwB,EAAE,MAA0B;IACpG,IAAI,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC,MAAM,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IAC/C,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC;IAC3B,0FAA0F;IAC1F,MAAM,IAAI,GAAG,IAAI,QAAQ,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