carrick 0.3.83 → 0.3.85

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 (68) hide show
  1. package/README.md +31 -11
  2. package/bin/carrick.mjs +89 -0
  3. package/dist/auth/credentials.d.ts +9 -0
  4. package/dist/auth/credentials.js +13 -2
  5. package/dist/auth/credentials.js.map +1 -1
  6. package/dist/auth/read.d.ts +4 -4
  7. package/dist/global-install.d.ts +183 -0
  8. package/dist/global-install.js +393 -0
  9. package/dist/global-install.js.map +1 -0
  10. package/dist/hook/post-edit.js +10 -0
  11. package/dist/hook/post-edit.js.map +1 -1
  12. package/dist/hook/session-start.js +34 -0
  13. package/dist/hook/session-start.js.map +1 -1
  14. package/dist/hook/stop.js +18 -4
  15. package/dist/hook/stop.js.map +1 -1
  16. package/dist/hook/user-prompt.js +16 -4
  17. package/dist/hook/user-prompt.js.map +1 -1
  18. package/dist/init/doctor.d.ts +61 -0
  19. package/dist/init/doctor.js +160 -1
  20. package/dist/init/doctor.js.map +1 -1
  21. package/dist/init/hosted.d.ts +30 -5
  22. package/dist/init/hosted.js +75 -9
  23. package/dist/init/hosted.js.map +1 -1
  24. package/dist/init/mcp.d.ts +45 -30
  25. package/dist/init/mcp.js +47 -88
  26. package/dist/init/mcp.js.map +1 -1
  27. package/dist/init/outdated.d.ts +47 -0
  28. package/dist/init/outdated.js +104 -0
  29. package/dist/init/outdated.js.map +1 -1
  30. package/dist/init/output.d.ts +43 -6
  31. package/dist/init/output.js +90 -18
  32. package/dist/init/output.js.map +1 -1
  33. package/dist/init/projects.d.ts +2 -2
  34. package/dist/init/run.d.ts +89 -25
  35. package/dist/init/run.js +292 -58
  36. package/dist/init/run.js.map +1 -1
  37. package/dist/render.d.ts +16 -0
  38. package/dist/render.js +57 -6
  39. package/dist/render.js.map +1 -1
  40. package/dist/scan.d.ts +26 -0
  41. package/dist/scan.js +92 -0
  42. package/dist/scan.js.map +1 -1
  43. package/dist/update-check.d.ts +1 -0
  44. package/dist/update-check.js +25 -0
  45. package/dist/update-check.js.map +1 -0
  46. package/dist/update.d.ts +128 -0
  47. package/dist/update.js +398 -0
  48. package/dist/update.js.map +1 -0
  49. package/package.json +8 -7
  50. package/sidecar/dist/src/capture/anchors.js +69 -8
  51. package/sidecar/dist/src/capture/api.d.ts +27 -2
  52. package/sidecar/dist/src/capture/check-classify.js +31 -2
  53. package/sidecar/dist/src/capture/check-fields.d.ts +29 -0
  54. package/sidecar/dist/src/capture/check-fields.js +58 -6
  55. package/sidecar/dist/src/capture/check.js +5 -0
  56. package/sidecar/dist/src/capture/deep-walk.js +4 -1
  57. package/sidecar/dist/src/capture/index.js +6 -1
  58. package/sidecar/dist/src/capture/node-builder.d.ts +28 -1
  59. package/sidecar/dist/src/capture/node-builder.js +89 -3
  60. package/sidecar/dist/src/capture/self-check.d.ts +6 -1
  61. package/sidecar/dist/src/capture/self-check.js +65 -11
  62. package/sidecar/dist/src/capture/unresolved.d.ts +7 -0
  63. package/sidecar/dist/src/capture/unresolved.js +1 -1
  64. package/sidecar/dist/src/type-inferrer.d.ts +118 -4
  65. package/sidecar/dist/src/type-inferrer.js +433 -15
  66. package/sidecar/dist/src/validators.d.ts +40 -40
  67. package/sidecar/dist/src/validators.js +6 -1
  68. package/templates/skills/carrick-census.md +3 -1
@@ -23,6 +23,30 @@ export type Choice = {
23
23
  label: string;
24
24
  hint?: string;
25
25
  };
26
+ /**
27
+ * How a `choose` opens, and whether it may be answered with nothing.
28
+ *
29
+ * `initial` is the set that starts selected, and it is a parameter rather than
30
+ * "all of them" because a default is a claim: the repos this install covers
31
+ * are preselected where something already says so, and an editor's
32
+ * configuration file outside the workspace is not preselected on the strength
33
+ * of a directory (carrick#1365).
34
+ */
35
+ export type ChoiceSet = {
36
+ initial: string[];
37
+ required: boolean;
38
+ };
39
+ /**
40
+ * The line that says what the keys do and where the answer stands.
41
+ *
42
+ * Said in words because the glyphs cannot say it: clack 1.8.1 draws the row
43
+ * under the cursor and an unselected row with the SAME character
44
+ * (`S_CHECKBOX_ACTIVE` and `S_CHECKBOX_INACTIVE` are both `◻`), so "the
45
+ * highlighted one" and "the ones that are in" are told apart by fill and
46
+ * colour alone. The picker below marks every row `[x]` or `[ ]` instead, and
47
+ * this line carries the count (carrick#1365).
48
+ */
49
+ export declare function chooseSentence(noun: string, selected: number, total: number): string;
26
50
  /**
27
51
  * What a step's work turned out to be: the line, and the marker it carries.
28
52
  *
@@ -78,19 +102,32 @@ export type InitOutput = {
78
102
  /** A typed answer, for the questions whose answer is not yes or no. */
79
103
  ask(question: string): Promise<string>;
80
104
  /**
81
- * Which of these, with every one of them chosen to begin with.
105
+ * Which of these, opening on the set `config.initial` names.
82
106
  *
83
- * At least one must stay chosen: "none of them" is a run with nothing to do,
84
- * and the way to say it is to end the question (carrick#1338).
107
+ * `config.required` decides whether an empty answer is one: the repos this
108
+ * install covers must include one repo, and "no editors" is an ordinary
109
+ * answer (carrick#1338, carrick#1365). `noun` is what a row is, for the
110
+ * sentence that says what the keys do.
85
111
  */
86
- choose(question: string, options: Choice[]): Promise<string[]>;
112
+ choose(question: string, noun: string, options: Choice[], config: ChoiceSet): Promise<string[]>;
87
113
  /** Dim a fragment, where this rendering has colour to dim it with. */
88
114
  accent(text: string): string;
89
115
  /** Whether the work under `step` may write to the terminal itself. */
90
116
  readonly quiet: boolean;
91
117
  };
92
- /** The numbers an answer names, or null when it names none of them. */
93
- export declare function chosenNumbers(answer: string, count: number): number[] | null;
118
+ /**
119
+ * The numbers an answer names, or null when it names none of them.
120
+ *
121
+ * Empty is the marked set, not "all of them": the marks are what the rows
122
+ * above the question already state, and a reader pressing Enter is accepting
123
+ * what they can see (carrick#1365). `all` and `none` are the two words that
124
+ * say the whole and the empty set; `none` is refused where an empty answer is
125
+ * not one, which is the same refusal an out-of-range number gets.
126
+ */
127
+ export declare function chosenNumbers(answer: string, count: number, config: {
128
+ initial: number[];
129
+ required: boolean;
130
+ }): number[] | null;
94
131
  /** Plain text: the same lines, no spinner, no colour, no gutter. */
95
132
  export declare function plainOutput(write?: (text: string) => void, io?: {
96
133
  input?: Readable;
@@ -36,6 +36,7 @@
36
36
  // and the spinner stops as whatever the work turned out to be (carrick#1032).
37
37
  import readline from "node:readline/promises";
38
38
  import * as clack from "@clack/prompts";
39
+ import { MultiSelectPrompt } from "@clack/core";
39
40
  import pc from "picocolors";
40
41
  export const DONE = "◇";
41
42
  export const WARN = "▲";
@@ -58,6 +59,19 @@ export class PromptCancelled extends Error {
58
59
  this.name = "PromptCancelled";
59
60
  }
60
61
  }
62
+ /**
63
+ * The line that says what the keys do and where the answer stands.
64
+ *
65
+ * Said in words because the glyphs cannot say it: clack 1.8.1 draws the row
66
+ * under the cursor and an unselected row with the SAME character
67
+ * (`S_CHECKBOX_ACTIVE` and `S_CHECKBOX_INACTIVE` are both `◻`), so "the
68
+ * highlighted one" and "the ones that are in" are told apart by fill and
69
+ * colour alone. The picker below marks every row `[x]` or `[ ]` instead, and
70
+ * this line carries the count (carrick#1365).
71
+ */
72
+ export function chooseSentence(noun, selected, total) {
73
+ return `Space toggles ${noun}, Enter confirms. ${selected} of ${total} selected.`;
74
+ }
61
75
  /**
62
76
  * One question on a terminal with no prompt library: the answer, or a cancel.
63
77
  *
@@ -88,11 +102,24 @@ async function askOnce(input, output, text) {
88
102
  rl.close();
89
103
  }
90
104
  }
91
- /** The numbers an answer names, or null when it names none of them. */
92
- export function chosenNumbers(answer, count) {
105
+ /**
106
+ * The numbers an answer names, or null when it names none of them.
107
+ *
108
+ * Empty is the marked set, not "all of them": the marks are what the rows
109
+ * above the question already state, and a reader pressing Enter is accepting
110
+ * what they can see (carrick#1365). `all` and `none` are the two words that
111
+ * say the whole and the empty set; `none` is refused where an empty answer is
112
+ * not one, which is the same refusal an out-of-range number gets.
113
+ */
114
+ export function chosenNumbers(answer, count, config) {
93
115
  const trimmed = answer.trim();
94
- if (trimmed === "" || /^all$/i.test(trimmed))
116
+ if (trimmed === "") {
117
+ return config.required && config.initial.length === 0 ? null : config.initial;
118
+ }
119
+ if (/^all$/i.test(trimmed))
95
120
  return Array.from({ length: count }, (_, index) => index);
121
+ if (/^none$/i.test(trimmed))
122
+ return config.required ? null : [];
96
123
  const picked = [];
97
124
  for (const part of trimmed.split(/[\s,]+/)) {
98
125
  if (!/^\d+$/.test(part))
@@ -155,15 +182,24 @@ io = {}) {
155
182
  ask: async (question) => (await askOnce(input, echo, `${question}\n> `)).trim(),
156
183
  // The list, then the numbers to keep. Every row is printed with its own
157
184
  // number because this rendering has no cursor to move: the question a
158
- // reader answers has to carry the whole choice.
159
- choose: async (question, options) => {
185
+ // reader answers has to carry the whole choice. The `[x]`/`[ ]` marker is
186
+ // the same one the terminal picker draws, so what an answer of Enter
187
+ // accepts is on the screen in both renderings (carrick#1365).
188
+ choose: async (question, noun, options, config) => {
189
+ const initial = options
190
+ .map((option, index) => (config.initial.includes(option.value) ? index : -1))
191
+ .filter((index) => index >= 0);
160
192
  write(`${question}\n`);
161
193
  options.forEach((option, index) => {
162
- write(` ${index + 1}. ${option.label}${option.hint === undefined ? "" : ` (${option.hint})`}\n`);
194
+ const mark = initial.includes(index) ? "[x]" : "[ ]";
195
+ write(` ${index + 1}. ${mark} ${option.label}${option.hint === undefined ? "" : ` (${option.hint})`}\n`);
163
196
  });
197
+ write(`${chooseSentence(noun, initial.length, options.length)}\n`);
198
+ const accepts = config.required && initial.length === 0 ? "" : ", or Enter for the marked set";
199
+ const empties = config.required ? "" : `, or "none"`;
164
200
  for (let attempt = 0; attempt < 3; attempt += 1) {
165
- const answer = await askOnce(input, echo, `Numbers to include, separated by commas, or Enter for all\n> `);
166
- const picked = chosenNumbers(answer, options.length);
201
+ const answer = await askOnce(input, echo, `Numbers to include, separated by commas${empties}${accepts}\n> `);
202
+ const picked = chosenNumbers(answer, options.length, { initial, required: config.required });
167
203
  if (picked)
168
204
  return picked.map((index) => options[index].value);
169
205
  write(`${REFUSE} Not a number between 1 and ${options.length}: "${answer.trim()}"\n`);
@@ -173,6 +209,49 @@ io = {}) {
173
209
  quiet: false,
174
210
  };
175
211
  }
212
+ /** The gutter clack draws its own prompts in, so this one sits in the block. */
213
+ const BAR = "│";
214
+ /**
215
+ * The multi-select this package asks with, drawn rather than borrowed.
216
+ *
217
+ * `@clack/prompts`' own `multiselect` is the prompt the owner could not read:
218
+ * its cursor glyph and its unselected glyph are the same character, so the row
219
+ * under the cursor and the rows that are in are distinguished by fill and
220
+ * colour. This is the same prompt object underneath — `MultiSelectPrompt` from
221
+ * `@clack/core`, which is what `@clack/prompts` builds on, at the version it
222
+ * pins — with a body that states each row's state as `[x]` or `[ ]`, the
223
+ * cursor as `>`, and the count in the header (carrick#1365).
224
+ *
225
+ * `input` and `output` are threaded for the same reason every other prompt
226
+ * here threads them: a terminal's own bytes are not capturable, and a test
227
+ * that drives this one with a stream is the only thing that sees these markers
228
+ * at all.
229
+ */
230
+ function pickMany(question, noun, options, config, output, input) {
231
+ const prompt = new MultiSelectPrompt({
232
+ options,
233
+ initialValues: options.filter((option) => config.initial.includes(option.value)).map((option) => option.value),
234
+ required: config.required,
235
+ output,
236
+ input,
237
+ render() {
238
+ const chosen = new Set(this.value ?? []);
239
+ const rows = this.options.map((option, index) => {
240
+ const mark = chosen.has(option.value) ? "[x]" : "[ ]";
241
+ const cursor = index === this.cursor ? ">" : " ";
242
+ const label = index === this.cursor ? pc.cyan(option.label) : option.label;
243
+ const hint = option.hint === undefined ? "" : pc.dim(` (${option.hint})`);
244
+ return `${BAR} ${cursor} ${mark} ${label}${hint}`;
245
+ });
246
+ const header = `${BAR} ${pc.dim(chooseSentence(noun, chosen.size, this.options.length))}`;
247
+ if (this.state === "submit" || this.state === "cancel") {
248
+ return `${pc.dim(question)}\n${BAR} ${chosen.size} of ${this.options.length} selected`;
249
+ }
250
+ return [question, header, ...rows].join("\n");
251
+ },
252
+ });
253
+ return prompt.prompt();
254
+ }
176
255
  /**
177
256
  * clack's rendering, for a terminal.
178
257
  *
@@ -234,16 +313,9 @@ export function interactiveOutput(output = process.stdout, keys = process.stdin)
234
313
  throw new PromptCancelled();
235
314
  return answer.trim();
236
315
  },
237
- choose: async (question, options) => {
238
- const answer = await clack.multiselect({
239
- message: question,
240
- options: options.map((option) => ({ value: option.value, label: option.label, hint: option.hint })),
241
- initialValues: options.map((option) => option.value),
242
- required: true,
243
- output,
244
- input: keys,
245
- });
246
- if (clack.isCancel(answer))
316
+ choose: async (question, noun, options, config) => {
317
+ const answer = await pickMany(question, noun, options, config, output, keys);
318
+ if (clack.isCancel(answer) || !Array.isArray(answer))
247
319
  throw new PromptCancelled();
248
320
  return answer;
249
321
  },
@@ -1 +1 @@
1
- {"version":3,"file":"output.js","sourceRoot":"","sources":["../../src/init/output.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,EAAE;AACF,sEAAsE;AACtE,4DAA4D;AAC5D,4EAA4E;AAC5E,8EAA8E;AAC9E,mDAAmD;AACnD,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,mCAAmC;AACnC,0EAA0E;AAC1E,iDAAiD;AACjD,EAAE;AACF,+EAA+E;AAC/E,yEAAyE;AACzE,EAAE;AACF,2DAA2D;AAC3D,EAAE;AACF,+EAA+E;AAC/E,oEAAoE;AACpE,6EAA6E;AAC7E,6EAA6E;AAC7E,wEAAwE;AACxE,EAAE;AACF,6EAA6E;AAC7E,6EAA6E;AAC7E,0EAA0E;AAC1E,EAAE;AACF,6EAA6E;AAC7E,4EAA4E;AAC5E,+EAA+E;AAC/E,4EAA4E;AAC5E,4EAA4E;AAC5E,6EAA6E;AAC7E,8EAA8E;AAE9E,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAE9C,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,CAAC;AACxB,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,G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AC,OAAO,CAAC,MAAM,CAAC,OAAO,IAAI,CAAC,CAAC,GAAG,CAAC;IAEjF,OAAO,GAAG,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;AACnD,CAAC"}
@@ -28,17 +28,17 @@ declare const placement: z.ZodObject<{
28
28
  /** Why this repo was not placed, as a sentence completing its name. */
29
29
  reason: z.ZodNullable<z.ZodString>;
30
30
  }, "strip", z.ZodTypeAny, {
31
+ reason: string | null;
31
32
  full_name: string;
32
33
  project_slug: string | null;
33
34
  assigned: boolean;
34
35
  moved: boolean;
35
- reason: string | null;
36
36
  }, {
37
+ reason: string | null;
37
38
  full_name: string;
38
39
  project_slug: string | null;
39
40
  assigned: boolean;
40
41
  moved: boolean;
41
- reason: string | null;
42
42
  }>;
43
43
  /** One repo's outcome inside a successful `assign-repos` answer. */
44
44
  export type Placement = z.infer<typeof placement>;
@@ -1,23 +1,32 @@
1
1
  import { type ResolvedRepos } from "../auth/read.ts";
2
2
  import { type RepoIdentity, type WorkspaceProposal } from "./repos.ts";
3
- import { type McpOutcome } from "./mcp.ts";
3
+ import { type McpOutcome, type OfferedClient } from "./mcp.ts";
4
4
  import { type Choice, type InitOutput } from "./output.ts";
5
5
  /**
6
- * The one sentence the run ends on.
7
- *
8
- * The scaffold tool carries the instructions — which files to create, how to
9
- * seed `carrick.json` from the proposal, whether to run the scan at all
10
- * (carrick-cloud#832) — so the terminal names the tool and stops. The copy
11
- * that used to stand here was a second statement of the same instructions, and
12
- * two copies of a sequence drift.
13
- *
14
- * The argument is named because the tool's branch turns on it and turns soft
15
- * without it: `repo` is what resolves the hosted rows, and with no `repo` the
16
- * response keeps its default ending and tells the agent to run the scan — on a
17
- * repo CI already indexes, which is the row the whole workspace reads
18
- * (carrick-cloud `src/tools/scaffold.ts`, cloud#805 item 1).
6
+ * The repos this run covers that the scaffold tool still has work in.
7
+ *
8
+ * The two files that tool writes: the `carrick.json` a scan reads, and the
9
+ * workflow that runs the scan. A repo holding both has been scaffolded, and
10
+ * the closing instruction is then an instruction to do nothing — which is what
11
+ * it was on a folder where every repo was already set up (carrick#1365).
12
+ *
13
+ * The repo root only, because that is where the scanner looks for a config
14
+ * (`Config::load_services`): a `carrick.json` deeper in the tree is a fixture
15
+ * or a nested example, not this repo's.
19
16
  */
20
- export declare const SCAFFOLD_SENTENCE = "Run the carrick scaffold tool for this repo, passing its owner/repo as `repo`, and follow what it returns.";
17
+ export declare function reposToScaffold(repos: RepoIdentity[], exists?: (target: string) => boolean): RepoIdentity[];
18
+ /**
19
+ * The instruction to paste, naming the repos it is about.
20
+ *
21
+ * The scaffold tool's branch turns on `repo` and turns soft without it: with
22
+ * no `repo` the response keeps its default ending and tells the agent to run
23
+ * the scan — on a repo CI already indexes, which is the row the whole
24
+ * workspace reads (carrick-cloud `src/tools/scaffold.ts`, cloud#805 item 1).
25
+ * So the names are in the sentence, one call per repo.
26
+ */
27
+ export declare function scaffoldSentence(repos: RepoIdentity[]): string;
28
+ /** What a run with nothing left to set up closes on: what this machine can do now. */
29
+ export declare const READY_SENTENCE = "The index is on this machine: `carrick check <file>` answers for a file, and your agent can ask who calls an operation.";
21
30
  export type InitOptions = {
22
31
  workspace: string;
23
32
  /** Put the selected repos in this project, moving them where `allowMove` says. */
@@ -31,10 +40,26 @@ export type InitOptions = {
31
40
  * repo here that has no identity.
32
41
  */
33
42
  repos: string[];
43
+ /**
44
+ * The editors outside this workspace to add the MCP entry to, by name.
45
+ *
46
+ * Empty means the terminal asks, and a run with no terminal writes no editor
47
+ * file at all: `--yes` is an answer about this workspace (carrick#1365).
48
+ */
49
+ editors: string[];
34
50
  /** Answer yes to the proposal rather than asking. Never grants a move. */
35
51
  assumeYes: boolean;
36
52
  /** Take the selected repos out of whatever project they are in now. */
37
53
  allowMove: boolean;
54
+ /**
55
+ * Install carrick globally where this machine has none (carrick#1372).
56
+ *
57
+ * Its own flag, because `--yes` is an answer about this workspace and a
58
+ * global install is a change to the machine. Without a global, the hooks
59
+ * written below name this install — an npx cache directory, when that is how
60
+ * this ran — and stop working when it is cleared.
61
+ */
62
+ installGlobal: boolean;
38
63
  };
39
64
  export declare function parseArgs(argv: string[], cwd?: string): InitOptions | string;
40
65
  /**
@@ -80,14 +105,6 @@ export declare function configuredLine(mcp: McpOutcome[]): string;
80
105
  * A client left exactly as it was gets no line at all (carrick#1026).
81
106
  */
82
107
  export declare function mcpClientLines(mcp: McpOutcome[]): string[];
83
- /**
84
- * One warning per client connected before the install id existed.
85
- *
86
- * Not a failure — the client works, and this run deliberately changed nothing
87
- * on its entry — so the line is the client, what is missing, and the commands
88
- * that put it there, which are the owner's to run (`mcp.ts`).
89
- */
90
- export declare function mcpUnstampedLines(mcp: McpOutcome[]): string[];
91
108
  /** The line a run that was stopped at a question ends on (carrick#1338). */
92
109
  export declare const CANCELLED = "Cancelled. Nothing was written, here or in Carrick.";
93
110
  /**
@@ -98,8 +115,32 @@ export declare const CANCELLED = "Cancelled. Nothing was written, here or in Car
98
115
  * they were, and both say it.
99
116
  */
100
117
  export declare const NOTHING_WRITTEN = "Nothing written, here or in Carrick.";
101
- /** A repo as the picker lists it: what it is called, and what is in it. */
102
- export declare function repoChoices(plan: WorkspaceProposal, candidates: RepoIdentity[]): Choice[];
118
+ /**
119
+ * The repos that start selected, and why each of the others does not.
120
+ *
121
+ * A default is a claim about somebody's folder, so only the repos something
122
+ * already says belong here carry one: connected to this workspace, and in the
123
+ * project most of this folder's connected repos are in. Everything else — a
124
+ * repo nobody connected, one sitting in a different project, one with no
125
+ * GitHub identity to ask about — starts out, with the reason on its row, and
126
+ * the reader adds it in one keystroke (carrick#1365).
127
+ *
128
+ * Two cases preselect nothing at all, and neither is in the ruling because
129
+ * neither is a majority: a folder where nothing is connected (a first run), and
130
+ * a tie between two projects. A guess there is a guess about which half of
131
+ * somebody's folder this install is for.
132
+ *
133
+ * Unconnected is not the same as unknown: with no read of the workspace — no
134
+ * login yet, or a read that did not answer — `identity` is null and nothing is
135
+ * preselected, because "not connected" would then be this command's assumption
136
+ * rather than the server's answer.
137
+ */
138
+ export declare function preselectedRepos(candidates: RepoIdentity[], identity: ResolvedRepos | null, label?: (slug: string) => string): {
139
+ keep: string[];
140
+ reasons: Map<string, string>;
141
+ };
142
+ /** A repo as the picker lists it: what it is called, what is in it, and why it is out. */
143
+ export declare function repoChoices(plan: WorkspaceProposal, candidates: RepoIdentity[], reasons?: Map<string, string>): Choice[];
103
144
  /**
104
145
  * Which repos in this folder this install covers, settled before anything is
105
146
  * read from Carrick and long before anything is written (carrick#1338).
@@ -113,6 +154,9 @@ export declare function chooseRepos(plan: WorkspaceProposal, candidates: RepoIde
113
154
  repos: string[];
114
155
  assumeYes: boolean;
115
156
  interactive: boolean;
157
+ /** The workspace read that decides the defaults, or null when there is none. */
158
+ identity?: ResolvedRepos | null;
159
+ label?: (slug: string) => string;
116
160
  }, out: InitOutput): Promise<RepoIdentity[]>;
117
161
  /**
118
162
  * The excluded repos a `--repo` flag is asking for, by identity.
@@ -130,6 +174,26 @@ export declare function chooseRepos(plan: WorkspaceProposal, candidates: RepoIde
130
174
  * there is no identity to have asked for.
131
175
  */
132
176
  export declare function namedButExcluded(workspace: string, excluded: string[], requested: string[], identify?: (repo: string) => RepoIdentity): string[];
177
+ /**
178
+ * Which editors outside the workspace get an MCP entry written for them.
179
+ *
180
+ * The answer is a set of names, and the default is the empty one: these are
181
+ * files in somebody's home directory for editors they may not use, so the
182
+ * strongest thing a configuration directory can do is put a row in the
183
+ * question (carrick#1365). An editor whose own command answers on PATH starts
184
+ * ticked; without a terminal, `--mcp` names them and nothing else is written.
185
+ *
186
+ * `--yes` does not cover these. It takes the proposal as printed — a list of
187
+ * packages and a set of files inside this workspace — and an entry in
188
+ * `~/.cursor/mcp.json` is neither.
189
+ */
190
+ export declare function chooseEditors(offered: OfferedClient[], options: {
191
+ editors: string[];
192
+ assumeYes: boolean;
193
+ interactive: boolean;
194
+ }, out: InitOutput): Promise<string[]>;
195
+ /** What the proposal question adds when an editor file is part of the answer. */
196
+ export declare function editorClause(offered: OfferedClient[], chosen: readonly string[]): string;
133
197
  /** The repos this install covers, one line each, for the proposal. */
134
198
  export declare function coverageLines(plan: WorkspaceProposal, selected: RepoIdentity[]): string[];
135
199
  /**