@illuminis/comprism 0.1.8 → 2.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.
Files changed (225) hide show
  1. package/out/{graph → build/machine/codemap}/read-python.js +2 -2
  2. package/out/{executor → build/machine/executor}/diagnostics.js +1 -1
  3. package/out/{executor → build/machine/executor}/hooks.js +1 -1
  4. package/out/{executor → build/machine/executor}/sandbox.js +1 -1
  5. package/out/build/machine/line/index.js +339 -0
  6. package/out/{commands/privacy.js → build/machine/runtime/home.js} +10 -19
  7. package/out/build/machine/runtime/needs.js +89 -0
  8. package/out/{lib → build/machine/runtime}/self.js +25 -3
  9. package/out/build/machine/terminal/jobs.js +67 -0
  10. package/out/build/machine/terminal/sign-in.js +212 -0
  11. package/out/build/machine/terminal/steps.js +460 -0
  12. package/out/build/machine/terminal/voice.js +136 -0
  13. package/out/build/machine/voice/record.js +286 -0
  14. package/out/cli-start.js +128 -0
  15. package/out/machine/line/index.js +339 -0
  16. package/out/machine/runtime/self.js +22 -0
  17. package/out/machine/terminal/clipboard.js +182 -0
  18. package/out/machine/terminal/jobs.js +67 -0
  19. package/out/machine/terminal/sign-in.js +212 -0
  20. package/out/machine/terminal/steps.js +460 -0
  21. package/out/machine/terminal/voice.js +136 -0
  22. package/out/machine/voice/record.js +79 -1
  23. package/out/native/dictate +0 -0
  24. package/out/server.generated.js +6 -0
  25. package/package.json +8 -40
  26. package/README.md +0 -343
  27. package/out/agent/command.d.ts +0 -157
  28. package/out/agent/command.js +0 -454
  29. package/out/agent/render.d.ts +0 -169
  30. package/out/agent/render.js +0 -689
  31. package/out/agent/session.d.ts +0 -334
  32. package/out/agent/session.js +0 -1232
  33. package/out/commands/agents.d.ts +0 -2
  34. package/out/commands/agents.js +0 -79
  35. package/out/commands/ask.d.ts +0 -1
  36. package/out/commands/ask.js +0 -222
  37. package/out/commands/codemap.d.ts +0 -2
  38. package/out/commands/codemap.js +0 -151
  39. package/out/commands/commands-thin.d.ts +0 -39
  40. package/out/commands/commands-thin.js +0 -244
  41. package/out/commands/config.d.ts +0 -1
  42. package/out/commands/config.js +0 -138
  43. package/out/commands/cost.d.ts +0 -1
  44. package/out/commands/cost.js +0 -167
  45. package/out/commands/decisionEngine.d.ts +0 -1
  46. package/out/commands/decisionEngine.js +0 -66
  47. package/out/commands/hooks.d.ts +0 -1
  48. package/out/commands/hooks.js +0 -83
  49. package/out/commands/install.d.ts +0 -206
  50. package/out/commands/install.js +0 -738
  51. package/out/commands/instructions.d.ts +0 -1
  52. package/out/commands/instructions.js +0 -113
  53. package/out/commands/integrations.d.ts +0 -3
  54. package/out/commands/integrations.js +0 -215
  55. package/out/commands/jobs.d.ts +0 -5
  56. package/out/commands/jobs.js +0 -157
  57. package/out/commands/keys.d.ts +0 -55
  58. package/out/commands/keys.js +0 -344
  59. package/out/commands/login.d.ts +0 -9
  60. package/out/commands/login.js +0 -606
  61. package/out/commands/memory.d.ts +0 -3
  62. package/out/commands/memory.js +0 -113
  63. package/out/commands/permissions.d.ts +0 -1
  64. package/out/commands/permissions.js +0 -94
  65. package/out/commands/plugins.d.ts +0 -4
  66. package/out/commands/plugins.js +0 -192
  67. package/out/commands/privacy.d.ts +0 -1
  68. package/out/commands/providerKey.d.ts +0 -32
  69. package/out/commands/providerKey.js +0 -108
  70. package/out/commands/repl.d.ts +0 -12
  71. package/out/commands/repl.js +0 -2303
  72. package/out/commands/report.d.ts +0 -39
  73. package/out/commands/report.js +0 -115
  74. package/out/commands/review.d.ts +0 -5
  75. package/out/commands/review.js +0 -223
  76. package/out/commands/sessions.d.ts +0 -23
  77. package/out/commands/sessions.js +0 -115
  78. package/out/commands/settings.d.ts +0 -23
  79. package/out/commands/settings.js +0 -153
  80. package/out/commands/skills.d.ts +0 -21
  81. package/out/commands/skills.js +0 -207
  82. package/out/commands/unattended.d.ts +0 -7
  83. package/out/commands/unattended.js +0 -351
  84. package/out/commands/update.d.ts +0 -1
  85. package/out/commands/update.js +0 -123
  86. package/out/commands/welcome.d.ts +0 -25
  87. package/out/commands/welcome.js +0 -223
  88. package/out/commands/worktrees.d.ts +0 -5
  89. package/out/commands/worktrees.js +0 -186
  90. package/out/executor/browser.d.ts +0 -14
  91. package/out/executor/diagnostics.d.ts +0 -2
  92. package/out/executor/documents.d.ts +0 -40
  93. package/out/executor/files.d.ts +0 -2
  94. package/out/executor/git.d.ts +0 -48
  95. package/out/executor/hooks.d.ts +0 -51
  96. package/out/executor/index.d.ts +0 -45
  97. package/out/executor/notebook.d.ts +0 -2
  98. package/out/executor/paths.d.ts +0 -20
  99. package/out/executor/sandbox.d.ts +0 -40
  100. package/out/executor/shell.d.ts +0 -86
  101. package/out/executor/toolservers.d.ts +0 -20
  102. package/out/executor/worktree.d.ts +0 -9
  103. package/out/graph/build.d.ts +0 -45
  104. package/out/graph/facts.d.ts +0 -47
  105. package/out/graph/files.d.ts +0 -45
  106. package/out/graph/read-locales.d.ts +0 -29
  107. package/out/graph/read-python.d.ts +0 -11
  108. package/out/graph/read-typescript.d.ts +0 -16
  109. package/out/graph/sync.d.ts +0 -66
  110. package/out/graph/sync.js +0 -242
  111. package/out/lib/attach.d.ts +0 -106
  112. package/out/lib/attach.js +0 -396
  113. package/out/lib/clipboard.d.ts +0 -23
  114. package/out/lib/commandlist.d.ts +0 -20
  115. package/out/lib/commandlist.js +0 -58
  116. package/out/lib/config.d.ts +0 -94
  117. package/out/lib/config.js +0 -197
  118. package/out/lib/connection.d.ts +0 -73
  119. package/out/lib/connection.js +0 -188
  120. package/out/lib/decision.d.ts +0 -22
  121. package/out/lib/decision.js +0 -50
  122. package/out/lib/fingerprint.d.ts +0 -25
  123. package/out/lib/fingerprint.js +0 -58
  124. package/out/lib/gateway.d.ts +0 -427
  125. package/out/lib/gateway.js +0 -226
  126. package/out/lib/history.d.ts +0 -24
  127. package/out/lib/history.js +0 -137
  128. package/out/lib/ide.d.ts +0 -19
  129. package/out/lib/ide.js +0 -131
  130. package/out/lib/keyboard.d.ts +0 -98
  131. package/out/lib/keyboard.js +0 -390
  132. package/out/lib/lastlogin.d.ts +0 -14
  133. package/out/lib/lastlogin.js +0 -105
  134. package/out/lib/machine.d.ts +0 -21
  135. package/out/lib/machine.js +0 -91
  136. package/out/lib/notify.d.ts +0 -4
  137. package/out/lib/notify.js +0 -52
  138. package/out/lib/output.d.ts +0 -48
  139. package/out/lib/output.js +0 -108
  140. package/out/lib/picker.d.ts +0 -1
  141. package/out/lib/picker.js +0 -158
  142. package/out/lib/project-ops.d.ts +0 -19
  143. package/out/lib/project-ops.js +0 -146
  144. package/out/lib/project.d.ts +0 -28
  145. package/out/lib/prompt.d.ts +0 -37
  146. package/out/lib/prompt.js +0 -142
  147. package/out/lib/queue.d.ts +0 -13
  148. package/out/lib/queue.js +0 -116
  149. package/out/lib/readiness.d.ts +0 -22
  150. package/out/lib/readiness.js +0 -207
  151. package/out/lib/self.d.ts +0 -23
  152. package/out/lib/servicecommand.d.ts +0 -14
  153. package/out/lib/servicecommand.js +0 -74
  154. package/out/lib/sessions.d.ts +0 -19
  155. package/out/lib/sessions.js +0 -221
  156. package/out/lib/startcache.d.ts +0 -13
  157. package/out/lib/startcache.js +0 -78
  158. package/out/lib/stdin.d.ts +0 -32
  159. package/out/lib/stdin.js +0 -117
  160. package/out/lib/store.d.ts +0 -40
  161. package/out/lib/store.js +0 -138
  162. package/out/lib/sync.d.ts +0 -18
  163. package/out/lib/sync.js +0 -81
  164. package/out/lib/types.d.ts +0 -417
  165. package/out/lib/types.js +0 -21
  166. package/out/lib/ui.d.ts +0 -123
  167. package/out/lib/ui.js +0 -299
  168. package/out/lib/version.d.ts +0 -23
  169. package/out/lib/version.js +0 -46
  170. package/out/lib/voice.d.ts +0 -49
  171. package/out/lib/voice.js +0 -236
  172. package/out/lib/words.d.ts +0 -20
  173. package/out/lib/words.js +0 -27
  174. package/out/machine/codemap/build.d.ts +0 -45
  175. package/out/machine/codemap/facts.d.ts +0 -47
  176. package/out/machine/codemap/files.d.ts +0 -45
  177. package/out/machine/codemap/read-locales.d.ts +0 -29
  178. package/out/machine/codemap/read-python.d.ts +0 -11
  179. package/out/machine/codemap/read-typescript.d.ts +0 -16
  180. package/out/machine/executor/browser.d.ts +0 -14
  181. package/out/machine/executor/diagnostics.d.ts +0 -2
  182. package/out/machine/executor/documents.d.ts +0 -40
  183. package/out/machine/executor/files.d.ts +0 -2
  184. package/out/machine/executor/git.d.ts +0 -48
  185. package/out/machine/executor/hooks.d.ts +0 -51
  186. package/out/machine/executor/index.d.ts +0 -45
  187. package/out/machine/executor/notebook.d.ts +0 -2
  188. package/out/machine/executor/paths.d.ts +0 -20
  189. package/out/machine/executor/sandbox.d.ts +0 -40
  190. package/out/machine/executor/shell.d.ts +0 -86
  191. package/out/machine/executor/toolservers.d.ts +0 -20
  192. package/out/machine/executor/worktree.d.ts +0 -9
  193. package/out/machine/folder/project.d.ts +0 -28
  194. package/out/machine/runtime/home.d.ts +0 -2
  195. package/out/machine/runtime/needs.d.ts +0 -30
  196. package/out/machine/runtime/self.d.ts +0 -23
  197. package/out/machine/voice/record.d.ts +0 -38
  198. package/out/postinstall.d.ts +0 -2
  199. package/out/postinstall.js +0 -120
  200. package/out/providers/anthropic.d.ts +0 -22
  201. package/out/providers/anthropic.js +0 -80
  202. package/out/providers/index.d.ts +0 -8
  203. package/out/providers/index.js +0 -84
  204. package/out/providers/openai.d.ts +0 -11
  205. package/out/providers/openai.js +0 -57
  206. package/out/thin.d.ts +0 -2
  207. package/out/thin.js +0 -855
  208. package/scripts/read_python.py +0 -270
  209. /package/out/{graph → build/machine/codemap}/build.js +0 -0
  210. /package/out/{graph → build/machine/codemap}/facts.js +0 -0
  211. /package/out/{graph → build/machine/codemap}/files.js +0 -0
  212. /package/out/{graph → build/machine/codemap}/read-locales.js +0 -0
  213. /package/out/{graph → build/machine/codemap}/read-typescript.js +0 -0
  214. /package/out/{executor → build/machine/executor}/browser.js +0 -0
  215. /package/out/{executor → build/machine/executor}/documents.js +0 -0
  216. /package/out/{executor → build/machine/executor}/files.js +0 -0
  217. /package/out/{executor → build/machine/executor}/git.js +0 -0
  218. /package/out/{executor → build/machine/executor}/index.js +0 -0
  219. /package/out/{executor → build/machine/executor}/notebook.js +0 -0
  220. /package/out/{executor → build/machine/executor}/paths.js +0 -0
  221. /package/out/{executor → build/machine/executor}/shell.js +0 -0
  222. /package/out/{executor → build/machine/executor}/toolservers.js +0 -0
  223. /package/out/{executor → build/machine/executor}/worktree.js +0 -0
  224. /package/out/{lib → build/machine/folder}/project.js +0 -0
  225. /package/out/{lib → build/machine/terminal}/clipboard.js +0 -0
@@ -1,83 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.cmdHooks = cmdHooks;
37
- /**
38
- * `comprism hooks` and `comprism hooks test` (manual 10.10).
39
- *
40
- * This reads the project's settings files and sends them; the service says
41
- * which hooks are in force here, where each came from, and for a test which
42
- * ones run, in order. This then runs exactly those and shows what they did.
43
- */
44
- const ui = __importStar(require("../lib/ui"));
45
- const project_ops_1 = require("../lib/project-ops");
46
- const hooks_1 = require("../machine/executor/hooks");
47
- const out = (s = "") => process.stdout.write(`${s}\n`);
48
- async function cmdHooks(args) {
49
- const facts = await (0, project_ops_1.currentProject)();
50
- const files = (0, hooks_1.hookFiles)(facts.root);
51
- if (args[0] === "test") {
52
- const [, when, action, target] = args;
53
- if (!when) {
54
- out(ui.fail("Say which moment: comprism hooks test <when> [action] [file], "
55
- + "for example comprism hooks test after edit_file calc.py"));
56
- return 2;
57
- }
58
- if ((0, hooks_1.insideHook)()) {
59
- out(ui.fail("Hooks do not run from inside a hook, so nothing was run."));
60
- return 1;
61
- }
62
- const reply = await (0, project_ops_1.call)("hooks", "test", { files, when, action: action ?? "" }, facts);
63
- if (!reply)
64
- return 1;
65
- const chosen = (reply.data?.hooks) ?? [];
66
- const done = await (0, hooks_1.runHooks)(facts.root, chosen, {
67
- when, action, args: target ? { path: target } : {},
68
- });
69
- for (const line of (0, hooks_1.reportLines)(done))
70
- out(` ${line}`);
71
- if (done.refusedBy)
72
- out(` ${done.detail}`);
73
- out();
74
- return done.refusedBy || done.failed.length ? 1 : 0;
75
- }
76
- if (args[0] && args[0] !== "list") {
77
- out(ui.fail(`\`hooks ${args[0]}\` is not a command. Use comprism hooks, or comprism hooks test.`));
78
- return 2;
79
- }
80
- const reply = await (0, project_ops_1.call)("hooks", "list", { files }, facts);
81
- out();
82
- return reply ? 0 : 1;
83
- }
@@ -1,206 +0,0 @@
1
- import { type InstallMethod } from '../machine/runtime/self';
2
- /** The header the tenant reads to decide whether this machine may be served. */
3
- export declare const WORKSPACE_KEY_HEADER = "x-comprism-key";
4
- export declare function envScriptPath(): string;
5
- /** The PowerShell form of the setup script, for Windows (manual 1.2). */
6
- export declare function envScriptPathPs(): string;
7
- /**
8
- * The PowerShell profiles to set up on Windows: Windows PowerShell's and,
9
- * where it exists, PowerShell 7's. Windows PowerShell's is created when there
10
- * is none, because it is the shell every Windows machine has.
11
- */
12
- export declare function powershellProfiles(): string[];
13
- /** The PowerShell script: the same rule as the POSIX one, in PowerShell. */
14
- export declare function envScriptPs(baseUrl: string | null, workspaceKey?: string | null): string;
15
- export declare function pidFilePath(): string;
16
- export declare function proxyLogPath(): string;
17
- /** Every profile we should add the line to, that actually exists. */
18
- export declare function shellProfiles(): string[];
19
- /**
20
- * The tenant's own endpoint, and never anything on this machine.
21
- *
22
- * Three sources, most specific first: what the caller passed, the connection
23
- * `comprism login` stored, and the tenant and domain in config. Null when none
24
- * of them names a tenant, and null is load-bearing - the install then writes a
25
- * script that exports nothing rather than one that guesses a hostname.
26
- */
27
- export declare function tenantBaseUrl(explicit?: string): string | null;
28
- /**
29
- * The script every new shell sources.
30
- *
31
- * Written as POSIX shell so it works in bash and zsh alike, and deliberately
32
- * silent: a shell startup file that prints things is a shell startup file people
33
- * delete.
34
- *
35
- * `OPENAI_BASE_URL` is deliberately NOT set. The hosted interceptor speaks the
36
- * Anthropic shape today, so pointing an OpenAI client at it would send that
37
- * client somewhere with no route for it - breaking a working tool in order to
38
- * measure it, which is the one thing this file exists to prevent. It comes back
39
- * the day there is an OpenAI-shaped endpoint to point at.
40
- */
41
- export declare function envScript(baseUrl: string | null, workspaceKey?: string | null): string;
42
- export interface InstallReport {
43
- envScript: string;
44
- profilesTouched: string[];
45
- profilesAlreadyHad: string[];
46
- /** The tenant endpoint written into the script, or null if none is known. */
47
- baseUrl: string | null;
48
- /** Whether this machine holds a workspace key. Without one, nothing is exported. */
49
- enrolled: boolean;
50
- binary: LaunchCommand;
51
- desktop: DesktopReport;
52
- }
53
- export interface DesktopReport {
54
- /** Where the config lives, whether or not we wrote it. */
55
- configPath: string;
56
- /** Did the desktop client's config directory exist at all? */
57
- present: boolean;
58
- /**
59
- * Always false. Kept so a caller reading this report cannot mistake "we
60
- * touched the config" for "the connector is live" - the hosted connector is
61
- * authorized by a consent screen, never by a file we write.
62
- */
63
- registered: boolean;
64
- /** Did we take an earlier version's stdio entry back out? */
65
- staleRemoved: boolean;
66
- /** Set when we deliberately did nothing. */
67
- note?: string;
68
- }
69
- /**
70
- * Where the desktop client keeps its connector list, per platform.
71
- *
72
- * Only the directory the client itself created counts. Creating it ourselves on
73
- * a machine with no desktop client would leave a config file for an application
74
- * that is not installed, which is litter.
75
- */
76
- export declare function desktopConfigPath(): string;
77
- /**
78
- * Take our STDIO entry back out of Claude Desktop's config, and say what to add
79
- * instead.
80
- *
81
- * This used to REGISTER a stdio server here - `node cli.js mcp` - and that was
82
- * wrong in a way that cost a real afternoon. That server exposes `record_work`,
83
- * `completion_receipt` and `coverage`: it only ever OBSERVES. It does not route,
84
- * it does not answer, so there is no receipt for the client to render, and it
85
- * appends to `~/.comprism/ledger.jsonl` on this laptop rather than to the
86
- * tenant, so nothing it records can ever appear in the portal. The install then
87
- * printed "Claude Desktop connector registered and answering", which was true of
88
- * the handshake and false about the product.
89
- *
90
- * The connector that works is the hosted one, `{tenant}/mcp`, which runs the
91
- * same nine steps as every other surface, returns the answer with the receipt
92
- * attached, and writes the turn to the tenant. It is added by pasting its
93
- * address into Claude Desktop's own Connectors dialog, because a remote
94
- * connector is authorized by an OAuth consent screen that only the person
95
- * sitting there can approve - there is nothing an installer could write into a
96
- * file to stand in for that.
97
- *
98
- * So this now does the honest thing: removes a stale entry of ours if one is
99
- * there, never writes one, and returns the address for the caller to print. Two
100
- * things it still will never do: create the file on a machine where the desktop
101
- * client is not installed, and overwrite a config it could not parse.
102
- */
103
- export declare function installDesktopConnector(_binary: LaunchCommand): DesktopReport;
104
- /**
105
- * Start the connector exactly as the desktop client will, and see if it answers.
106
- *
107
- * Written after a live failure that the installer had already called a success.
108
- * `npm install -g .` from a checkout leaves the global package as a SYMLINK back
109
- * into the source folder; on macOS the desktop client is sandboxed out of
110
- * `~/Documents`, so the connector died on `EPERM` the moment it was launched -
111
- * and the only trace was a log file nobody thinks to open. The installer said
112
- * "registered", which was true and useless.
113
- *
114
- * So registration is no longer the claim. This spawns the real command, speaks
115
- * the real handshake and waits for the real reply. A connector that cannot start
116
- * is reported as broken, with the reason, at install time.
117
- */
118
- export declare function probeDesktopConnector(binary: LaunchCommand): Promise<{
119
- ok: boolean;
120
- detail: string;
121
- }>;
122
- /** Take the connector back out, leaving every other server alone. */
123
- export declare function uninstallDesktopConnector(): boolean;
124
- /**
125
- * Do the setup. Idempotent: running it twice changes nothing the second time.
126
- */
127
- export declare function install(options?: {
128
- baseUrl?: string;
129
- binary?: LaunchCommand;
130
- workspaceKey?: string | null;
131
- }): InstallReport;
132
- /**
133
- * Rewrite the generated script from the connection as it now stands.
134
- *
135
- * Sign in and sign out call this. Before, only the install wrote it, and the
136
- * install runs before anybody has signed in, so the script said "not enrolled"
137
- * forever and signing in never switched measurement on. After sign out it kept
138
- * presenting a revoked key. Touches no shell profile: a machine that never had
139
- * the line added is left exactly as it was.
140
- */
141
- export declare function refreshEnvScript(): void;
142
- /**
143
- * What sign in calls: refresh the setup script, and on a Python install that
144
- * was never set up, do the setup now (manual 1.1, Option 3).
145
- *
146
- * npm runs the setup as it installs and the install script runs it itself, but
147
- * pip has no step of its own, so the first sign in is the first moment this
148
- * tool runs on a machine that asked for it. Returns the profiles it changed,
149
- * for the caller to say so. Every other install is left to `refreshEnvScript`.
150
- */
151
- export declare function finishSetup(): string[];
152
- /** Does this profile carry our fenced line. */
153
- export declare function profileHasSetup(profile: string): boolean;
154
- /**
155
- * Take the line back out. An install you cannot cleanly undo is a liability.
156
- *
157
- * Removes only what the install wrote: the fenced profile block, the generated
158
- * `env.sh` and our own Claude Desktop entry. The sign in and settings stay, and
159
- * the caller says so, because deleting a live credential file is not revoking it.
160
- */
161
- export declare function uninstall(): {
162
- profilesCleaned: string[];
163
- scriptRemoved: boolean;
164
- programRemoved: boolean;
165
- method: InstallMethod;
166
- kept: string;
167
- };
168
- /**
169
- * The command that starts this package's CLI, resolved from the package itself.
170
- *
171
- * It used to read `process.argv[1]` and assume that was the CLI. That holds when
172
- * a person types `comprism install`, and is FALSE in the one case that matters
173
- * most: the npm postinstall hook, where argv[1] is `postinstall.js`. So a global
174
- * install wrote `node .../postinstall.js mcp` into the desktop config, and the
175
- * connector "disconnected" on every launch - postinstall ignores the argument,
176
- * does its work and exits, which looks exactly like a crash from the outside.
177
- * It also silently overwrote a correct entry written moments earlier.
178
- *
179
- * Resolving from `__dirname` instead removes the guess: this file compiles to
180
- * `out/install.js`, so the CLI is always `out/cli.js` beside it, whoever is
181
- * calling and from where.
182
- */
183
- /**
184
- * How to start the CLI: a command and its arguments, kept apart.
185
- *
186
- * Apart, and never joined with a space, because "/Users/me/Code - Illuminis/…"
187
- * is an ordinary macOS path and splitting on spaces turns it into three
188
- * arguments and a connector that cannot launch. A shell string and an argv are
189
- * different types; treating them as one is a bug waiting for the first customer
190
- * whose folder has a space in it, which on a Mac is most of them.
191
- */
192
- export interface LaunchCommand {
193
- command: string;
194
- args: string[];
195
- }
196
- /** The shell form, quoted, for the profile script that must be a shell string. */
197
- export declare function launchShellString(launch: LaunchCommand): string;
198
- export declare function proxyHealthy(port: number): Promise<boolean>;
199
- /**
200
- * Start the proxy detached, so it outlives the shell that started it.
201
- *
202
- * Returns whether it came up. Never throws: a service that fails to start is a
203
- * missing measurement, and the caller's job is to carry on regardless.
204
- */
205
- export declare function startDaemon(port: number): Promise<boolean>;
206
- export declare function stopDaemon(): boolean;