carrick 0.3.62 → 0.3.64

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.
@@ -61,24 +61,105 @@ export function writeProposal(workspace, derived) {
61
61
  fs.writeFileSync(path.join(workspace, PROPOSAL_FILE), document);
62
62
  return PROPOSAL_FILE;
63
63
  }
64
- /** Only GitHub origin identities are sent to the workspace metadata read. */
65
- export function githubRemote(repo) {
64
+ function gitOrigin(repo) {
66
65
  const result = spawnSync("git", ["-C", repo, "remote", "get-url", "origin"], { encoding: "utf8", timeout: 5000 });
67
- if (result.status !== 0)
66
+ return result.status === 0 ? result.stdout.trim() : null;
67
+ }
68
+ /**
69
+ * The host ssh itself would dial, which for a per-account alias
70
+ * (`Host github.com-work` / `HostName github.com`) is not the host in the
71
+ * remote. `ssh -G` prints the whole resolved configuration and connects to
72
+ * nothing, so this reads the user's own `~/.ssh/config` without a list of
73
+ * alias spellings. An alias no config entry matches is not an error: ssh
74
+ * exits 0 and echoes the name back, which is why an unresolvable alias is
75
+ * detected by the hostname it returns rather than by a status.
76
+ */
77
+ function sshHostname(host) {
78
+ // Never spawn on a string that could be read as an option, and never on one
79
+ // ssh would reject anyway.
80
+ if (!/^[A-Za-z0-9._-]+$/.test(host) || host.startsWith("-"))
68
81
  return null;
69
- const remote = result.stdout.trim();
70
- const scp = /^git@github\.com:([A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+?)(?:\.git)?$/.exec(remote);
71
- if (scp)
72
- return scp[1];
73
- try {
74
- const url = new URL(remote);
75
- if (url.hostname.toLowerCase() !== "github.com" || !["https:", "ssh:"].includes(url.protocol))
82
+ const result = spawnSync("ssh", ["-G", host], {
83
+ encoding: "utf8",
84
+ timeout: 5000,
85
+ stdio: ["ignore", "pipe", "ignore"],
86
+ });
87
+ if (result.error || result.status !== 0 || typeof result.stdout !== "string")
88
+ return null;
89
+ const line = /^hostname (\S+)$/im.exec(result.stdout);
90
+ return line ? line[1] : null;
91
+ }
92
+ const DEFAULT_PROBE = { remote: gitOrigin, sshHostname };
93
+ /** The host and `owner/repo` a remote names, in either spelling git accepts. */
94
+ function splitRemote(remote) {
95
+ let host;
96
+ let repoPath;
97
+ let ssh;
98
+ // The two spellings are told apart by the `//`, not by whether `new URL`
99
+ // throws: a host alias with no user (`host-work:owner/repo`) parses as a URL
100
+ // whose scheme is the host, and would otherwise be read as neither form.
101
+ if (/^[a-zA-Z][a-zA-Z0-9+.-]*:\/\//.test(remote)) {
102
+ let url;
103
+ try {
104
+ url = new URL(remote);
105
+ }
106
+ catch {
76
107
  return null;
77
- const name = url.pathname.replace(/^\//, "").replace(/\.git$/, "");
78
- return /^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/.test(name) ? name : null;
108
+ }
109
+ if (!["https:", "http:", "ssh:"].includes(url.protocol))
110
+ return null;
111
+ host = url.hostname;
112
+ repoPath = url.pathname;
113
+ ssh = url.protocol === "ssh:";
79
114
  }
80
- catch {
81
- return null;
115
+ else {
116
+ // The scp spelling `[user@]host:owner/repo`, which is not a URL.
117
+ const scp = /^(?:[^@\s/]+@)?([^:/\s]+):(\S+)$/.exec(remote);
118
+ if (!scp)
119
+ return null;
120
+ host = scp[1];
121
+ repoPath = scp[2];
122
+ ssh = true;
123
+ }
124
+ const name = repoPath.replace(/^\/+/, "").replace(/\.git$/, "");
125
+ return { host, name: /^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/.test(name) ? name : null, ssh };
126
+ }
127
+ /**
128
+ * Only GitHub origin identities are sent to the workspace metadata read.
129
+ *
130
+ * A host that is already github.com is taken without spawning anything; an ssh
131
+ * host that is not is resolved through the user's ssh configuration, because a
132
+ * machine with two GitHub accounts writes its remotes through a per-account
133
+ * alias and that repository is an ordinary GitHub repository (carrick#991,
134
+ * carrick#978).
135
+ */
136
+ export function repoIdentity(repo, probe = DEFAULT_PROBE) {
137
+ const remote = probe.remote(repo);
138
+ if (remote === null)
139
+ return { path: repo, name: null, remote: null, problem: "it has no origin remote" };
140
+ const parts = splitRemote(remote);
141
+ if (!parts)
142
+ return { path: repo, name: null, remote, problem: `its origin ${remote} is not a GitHub URL` };
143
+ const { host, name, ssh } = parts;
144
+ if (name === null) {
145
+ return { path: repo, name: null, remote, problem: `its origin ${remote} names no owner/repo path` };
146
+ }
147
+ if (host.toLowerCase() === "github.com")
148
+ return { path: repo, name, remote, problem: null };
149
+ if (!ssh) {
150
+ return { path: repo, name: null, remote, problem: `its origin ${remote} is on ${host}, not github.com` };
151
+ }
152
+ const resolved = probe.sshHostname(host);
153
+ if (resolved === null) {
154
+ return { path: repo, name: null, remote, problem: `its origin ${remote} names the host "${host}", which ssh could not resolve` };
82
155
  }
156
+ if (resolved.toLowerCase() === "github.com")
157
+ return { path: repo, name, remote, problem: null };
158
+ return {
159
+ path: repo,
160
+ name: null,
161
+ remote,
162
+ problem: `its origin ${remote} names the host "${host}", which ssh resolves to "${resolved}", not github.com`,
163
+ };
83
164
  }
84
165
  //# sourceMappingURL=repos.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"repos.js","sourceRoot":"","sources":["../../src/init/repos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAE9D,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;AAClJ,MAAM,Q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CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IACzC,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;QACtB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,MAAM,oBAAoB,IAAI,gCAAgC,EAAE,CAAC;IACnI,CAAC;IACD,IAAI,QAAQ,CAAC,WAAW,EAAE,KAAK,YAAY;QAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAChG,OAAO;QACL,IAAI,EAAE,IAAI;QACV,IAAI,EAAE,IAAI;QACV,MAAM;QACN,OAAO,EAAE,cAAc,MAAM,oBAAoB,IAAI,6BAA6B,QAAQ,mBAAmB;KAC9G,CAAC;AACJ,CAAC"}
@@ -1,25 +1,47 @@
1
+ import { type ResolvedRepos } from "../auth/read.ts";
1
2
  /**
2
3
  * The prompt that makes an agent write this repo's config and setup files.
3
4
  *
4
- * A copy, and deliberately a verbatim one: the source of truth is the
5
- * `scaffold` MCP tool's own instructions and the dashboard copy beside them
6
- * (carrick-cloud#800), whose test checks every filename against what the tool
7
- * returns. It is printed here so the terminal path ends where the dashboard
8
- * path ends, and it states the sequence the ruling in carrick-cloud#799 fixed:
9
- * the agent writes a complete `carrick.json` from the proposal this command
10
- * derived, `carrick index` proves it for nothing, and only then does the one
11
- * paid scan run. Keep the two copies in step; the tool's instructions, not
12
- * this text, decide what gets written.
5
+ * A copy of the `scaffold` MCP tool's own instructions and the dashboard copy
6
+ * beside them (carrick-cloud#800), whose test checks every filename against
7
+ * what the tool returns. It is printed here so the terminal path ends where
8
+ * the dashboard path ends, and it states the sequence the ruling in
9
+ * carrick-cloud#799 fixed: the agent writes a complete `carrick.json` from the
10
+ * proposal this command derived, READS it back against the repo, and then runs
11
+ * the one scan. There is no rehearsal in front of it — `carrick index` is the
12
+ * only scan in the flow (carrick#1008, cloud#832), and a facts-only pass has
13
+ * no user here, so nothing in this copy names one. Keep the two copies in
14
+ * step; the tool's instructions, not this text, decide what gets written.
15
+ *
16
+ * One clause is this side's alone, because only this side knows it: whether
17
+ * the workspace read found a hosted index for these repos. Where there is one,
18
+ * the scan has already run in CI and a laptop scan from a branch would replace
19
+ * that row for everyone in the workspace, so the agent runs no scan at all and
20
+ * checks the config by reading it (carrick#993, cloud half carrick-cloud#805,
21
+ * cloud#832).
13
22
  */
14
- export declare const AGENT_SCAFFOLD_PROMPT: string;
23
+ export declare function agentScaffoldPrompt(hosted: boolean): string;
15
24
  export type InitOptions = {
16
25
  workspace: string;
17
26
  /** Require every proposed GitHub repo to belong to this project. */
18
27
  project: string | null;
28
+ /** The `owner/repo` to use when the origin remote names none (carrick#991). */
29
+ repo: string | null;
19
30
  /** Answer yes to the repo list rather than asking. */
20
31
  assumeYes: boolean;
21
32
  };
22
33
  export declare function parseArgs(argv: string[], cwd?: string): InitOptions | string;
34
+ /**
35
+ * The repos a project holds that this folder does not, one line per project.
36
+ *
37
+ * Carrick answers across every repo in a project, so a machine holding half of
38
+ * one gets half the answers, and the connection lines above name only what is
39
+ * here. `project_repos` is the workspace read's answer to that: the whole
40
+ * membership of every project the requested repos are in (carrick#993 row 18).
41
+ * Capped and counted like the identity lines, because a project can hold two
42
+ * hundred.
43
+ */
44
+ export declare function absentRepos(identity: ResolvedRepos, names: string[], project: string | null): string[];
23
45
  /**
24
46
  * The editor lines, one line per editor that is on the machine.
25
47
  *
package/dist/init/run.js CHANGED
@@ -6,7 +6,7 @@ import { spawnSync } from "node:child_process";
6
6
  import { readCredential } from "../auth/credentials.js";
7
7
  import { signIn } from "../auth/run.js";
8
8
  import { resolveRepos } from "../auth/read.js";
9
- import { deriveWorkspace, writeProposal, PROPOSAL_FILE, githubRemote } from "./repos.js";
9
+ import { deriveWorkspace, writeProposal, PROPOSAL_FILE, repoIdentity } from "./repos.js";
10
10
  import { connectRepos, reposAreInProject, projectAssignments } from "./connect.js";
11
11
  import { ensureProject, projectStep, SLUG } from "./projects.js";
12
12
  import { connectMcpClients, mcpLines } from "./mcp.js";
@@ -17,29 +17,50 @@ const EXTENSION_ID = "carrick-tools.carrick";
17
17
  /**
18
18
  * The prompt that makes an agent write this repo's config and setup files.
19
19
  *
20
- * A copy, and deliberately a verbatim one: the source of truth is the
21
- * `scaffold` MCP tool's own instructions and the dashboard copy beside them
22
- * (carrick-cloud#800), whose test checks every filename against what the tool
23
- * returns. It is printed here so the terminal path ends where the dashboard
24
- * path ends, and it states the sequence the ruling in carrick-cloud#799 fixed:
25
- * the agent writes a complete `carrick.json` from the proposal this command
26
- * derived, `carrick index` proves it for nothing, and only then does the one
27
- * paid scan run. Keep the two copies in step; the tool's instructions, not
28
- * this text, decide what gets written.
20
+ * A copy of the `scaffold` MCP tool's own instructions and the dashboard copy
21
+ * beside them (carrick-cloud#800), whose test checks every filename against
22
+ * what the tool returns. It is printed here so the terminal path ends where
23
+ * the dashboard path ends, and it states the sequence the ruling in
24
+ * carrick-cloud#799 fixed: the agent writes a complete `carrick.json` from the
25
+ * proposal this command derived, READS it back against the repo, and then runs
26
+ * the one scan. There is no rehearsal in front of it — `carrick index` is the
27
+ * only scan in the flow (carrick#1008, cloud#832), and a facts-only pass has
28
+ * no user here, so nothing in this copy names one. Keep the two copies in
29
+ * step; the tool's instructions, not this text, decide what gets written.
30
+ *
31
+ * One clause is this side's alone, because only this side knows it: whether
32
+ * the workspace read found a hosted index for these repos. Where there is one,
33
+ * the scan has already run in CI and a laptop scan from a branch would replace
34
+ * that row for everyone in the workspace, so the agent runs no scan at all and
35
+ * checks the config by reading it (carrick#993, cloud half carrick-cloud#805,
36
+ * cloud#832).
29
37
  */
30
- export const AGENT_SCAFFOLD_PROMPT = "Run the carrick scaffold tool, passing this repo's owner/repo from " +
31
- "`git remote get-url origin` as `repo`, and follow the instructions it " +
32
- "returns: create each file at its path, and write carrick.json from the " +
33
- "proposal in .carrick/proposal.json, taking applications as services and " +
34
- "library workspace members as shared includes of the services that import " +
35
- "them, with the env vars and domains each service calls. Add the Carrick " +
36
- "section to AGENTS.md if this repo already has one. Then run `carrick " +
37
- "index`, which is free and runs no model, fix whatever it reports as " +
38
- "unclassified or in no service, and run `carrick index --infer` once for " +
39
- "the scan that builds the index. Answer the closing checklist before you " +
40
- "open the PR.";
38
+ export function agentScaffoldPrompt(hosted) {
39
+ return ("Run the carrick scaffold tool, passing this repo's owner/repo from " +
40
+ "`git remote get-url origin` as `repo`, and follow the instructions it " +
41
+ "returns: create each file at its path, write carrick.json by seeding it " +
42
+ "from .carrick/proposal.json and reading this repo's source for the env " +
43
+ "vars and domains its services call (a nested services config for a " +
44
+ "monorepo, with library packages folded into the services that import " +
45
+ "them), and add the Carrick section to AGENTS.md if this repo already " +
46
+ "has one. " +
47
+ (hosted
48
+ ? "Then read carrick.json back against the repo. Do not run `carrick " +
49
+ "index`: it is the scan, this repo already has a hosted index, and a " +
50
+ "laptop scan from a branch replaces the CI row for everyone. "
51
+ : // carrick#960/#1003: an agent's shell caps a command well below the
52
+ // fifteen minutes a first scan takes, so the scan is detached and the
53
+ // agent asks `carrick status` how it went. The three words it polls
54
+ // for are carrick#1007 item 4's. Mirrors the scaffold tool's own
55
+ // wording (carrick-cloud#821, rewritten in carrick-cloud#832).
56
+ "Then read carrick.json back against the repo and run `carrick index " +
57
+ "--detach` once for the first scan, checking `carrick status` about " +
58
+ "once a minute until it says the scan finished, stopped or failed. ") +
59
+ "Answer the closing checklist before you open the PR.");
60
+ }
61
+ const OWNER_REPO = /^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/;
41
62
  export function parseArgs(argv, cwd = process.cwd()) {
42
- const options = { workspace: cwd, project: null, assumeYes: false };
63
+ const options = { workspace: cwd, project: null, repo: null, assumeYes: false };
43
64
  for (let index = 0; index < argv.length; index += 1) {
44
65
  const argument = argv[index];
45
66
  switch (argument) {
@@ -58,6 +79,16 @@ export function parseArgs(argv, cwd = process.cwd()) {
58
79
  index += 1;
59
80
  break;
60
81
  }
82
+ case "--repo": {
83
+ const value = argv[index + 1];
84
+ if (!value)
85
+ return "--repo needs an owner/repo";
86
+ if (!OWNER_REPO.test(value))
87
+ return `invalid repo "${value}": use owner/repo as GitHub spells it`;
88
+ options.repo = value;
89
+ index += 1;
90
+ break;
91
+ }
61
92
  case "--workspace":
62
93
  case "-w": {
63
94
  const value = argv[index + 1];
@@ -80,7 +111,7 @@ export function parseArgs(argv, cwd = process.cwd()) {
80
111
  }
81
112
  function help() {
82
113
  return [
83
- "carrick init [DIRECTORY] [--project SLUG]",
114
+ "carrick init [DIRECTORY] [--project SLUG] [--repo OWNER/REPO]",
84
115
  "",
85
116
  "Sign in (here, or beforehand with carrick login), then set up a repository",
86
117
  "or a folder of repos: the project, the repo connection, the agent hooks,",
@@ -88,11 +119,12 @@ function help() {
88
119
  "carrick.json. It writes nothing into the repository but the ignored",
89
120
  ".carrick directory and the hook settings, and it runs no scan.",
90
121
  "With --project, a project missing from the workspace is offered for",
91
- "creation here; the browser assigns the repos and the CLI waits for Carrick",
92
- "to verify the assignment.",
122
+ "creation here, and the repos are put in it from the terminal once the",
123
+ "GitHub App grant connects them.",
93
124
  "",
94
125
  " -w, --workspace DIR The folder holding the repos (default: this one)",
95
126
  " --project SLUG Require these repos in this Carrick project",
127
+ " --repo OWNER/REPO Name the GitHub repo whose origin remote names none",
96
128
  " -y, --yes Take the repo list as proposed",
97
129
  ].join("\n");
98
130
  }
@@ -134,6 +166,35 @@ function onPath(command) {
134
166
  });
135
167
  return probe.status === 0;
136
168
  }
169
+ /**
170
+ * The repos a project holds that this folder does not, one line per project.
171
+ *
172
+ * Carrick answers across every repo in a project, so a machine holding half of
173
+ * one gets half the answers, and the connection lines above name only what is
174
+ * here. `project_repos` is the workspace read's answer to that: the whole
175
+ * membership of every project the requested repos are in (carrick#993 row 18).
176
+ * Capped and counted like the identity lines, because a project can hold two
177
+ * hundred.
178
+ */
179
+ export function absentRepos(identity, names, project) {
180
+ const onDisk = new Set(names.map((name) => name.toLowerCase()));
181
+ const sole = identity.project_repos.length === 1;
182
+ const lines = [];
183
+ for (const entry of identity.project_repos) {
184
+ // With a project settled, the others are somebody else's business.
185
+ if (project !== null && entry.project_slug !== project)
186
+ continue;
187
+ const absent = entry.repos.filter((repo) => !onDisk.has(repo.toLowerCase()));
188
+ if (absent.length === 0)
189
+ continue;
190
+ const shown = absent.length > 10
191
+ ? `${absent.slice(0, 10).join(", ")} and ${absent.length - 10} more`
192
+ : absent.join(", ");
193
+ const where = sole || entry.project_slug === project ? "this project" : `project "${entry.project_slug}"`;
194
+ lines.push(`Also in ${where}, not on this machine: ${shown}.`);
195
+ }
196
+ return lines;
197
+ }
137
198
  /**
138
199
  * The editor lines, one line per editor that is on the machine.
139
200
  *
@@ -178,6 +239,11 @@ export async function init(argv) {
178
239
  const interactive = process.stdin.isTTY === true;
179
240
  // Authentication and all derivation validation precede local writes.
180
241
  let derived;
242
+ // What the workspace read said about these repos, for the closing lines
243
+ // printed long after it: a repo Carrick already holds an index for must not
244
+ // be told to run the paid scan again (carrick#993).
245
+ let requested = [];
246
+ const hostedIndex = [];
181
247
  try {
182
248
  // A machine that has never signed in signs in here rather than being told
183
249
  // to run another command: `carrick login` is the same browser round trip,
@@ -192,11 +258,45 @@ export async function init(argv) {
192
258
  credential = await signIn(say);
193
259
  }
194
260
  derived = deriveWorkspace(workspace);
195
- const repoIdentities = derived.plan.repos.map((repo) => ({ path: repo.path, name: githubRemote(repo.path) }));
261
+ const derivedIdentities = derived.plan.repos.map((repo) => repoIdentity(repo.path));
262
+ // `--repo` names what a remote could not: an ssh alias ssh itself cannot
263
+ // resolve, a mirror, a clone with no origin. It names one repository, so
264
+ // it is taken only when exactly one repo here is missing an identity.
265
+ const unnamed = derivedIdentities.filter((repo) => repo.name === null);
266
+ let taken = null;
267
+ if (parsed.repo !== null) {
268
+ if (unnamed.length > 1) {
269
+ throw new Error(`--repo names one repository, but ${unnamed.length} repos here have no GitHub identity: ${unnamed.map((repo) => repo.path).join(", ")}. Run carrick init --repo in each of them, or fix their origin remotes.`);
270
+ }
271
+ if (unnamed.length === 0) {
272
+ say(`--repo ${parsed.repo} was not needed: every repo here names its own GitHub repository.`);
273
+ }
274
+ else {
275
+ taken = unnamed[0].path;
276
+ say(`Taking ${parsed.repo} as the GitHub repository for ${taken}.`);
277
+ }
278
+ }
279
+ const repoIdentities = derivedIdentities.map((repo) => repo.path === taken ? { ...repo, name: parsed.repo, problem: null } : repo);
196
280
  const names = [...new Set(repoIdentities.map((repo) => repo.name).filter((name) => name !== null))];
197
281
  if (names.length > 200)
198
282
  throw new Error("This workspace has more than 200 GitHub repos. Initialise smaller workspace groups.");
199
283
  const missingIdentities = repoIdentities.filter((repo) => repo.name === null);
284
+ // Said before anything is requested, and said whether or not --project was
285
+ // given: a repo with no identity is left out of the project step, the
286
+ // connection check and the workspace read, and a run that dropped it in
287
+ // silence read as a complete one (carrick#991).
288
+ // A folder of clones can hold dozens, so the list is capped and the rest
289
+ // is counted rather than dropped.
290
+ for (const repo of missingIdentities.slice(0, 10)) {
291
+ say(`${repo.path} contributes no GitHub identity: ${repo.problem}.`);
292
+ }
293
+ if (missingIdentities.length > 10) {
294
+ say(`${missingIdentities.length - 10} more repos here name no GitHub identity either.`);
295
+ }
296
+ if (missingIdentities.length > 0) {
297
+ const one = missingIdentities.length === 1;
298
+ say(` Carrick has nothing to connect ${one ? "it" : "them"} to. Run carrick init --repo owner/repo${one ? "" : " in each of them"}, or give the alias a HostName github.com line in your ssh config.`);
299
+ }
200
300
  if (parsed.project && missingIdentities.length > 0) {
201
301
  throw new Error(`--project ${parsed.project} cannot verify ${missingIdentities.map((repo) => repo.path).join(", ")} because ${missingIdentities.length === 1 ? "it has" : "they have"} no GitHub origin. No project assignment was verified.`);
202
302
  }
@@ -208,12 +308,20 @@ export async function init(argv) {
208
308
  for (const name of names)
209
309
  say(` ${name}`);
210
310
  }
311
+ else if (names.length === 0) {
312
+ // The sentence that stops the rest of this run from reading as a
313
+ // complete one: no project is chosen, no connection is checked, and a
314
+ // later upload has no repo identity to resolve a project from.
315
+ say("No repo here names a GitHub repository, so this run chooses no project and checks no connection.");
316
+ }
317
+ requested = names;
211
318
  const initial = await resolveRepos(credential.token, names);
212
319
  // The project half of the browser round trip, where this API can do it
213
- // from here. Assignment still belongs to the browser, so this only ever
214
- // removes the "create the project" step from the wait. Without --project
215
- // the step reads the assignment the repos already have and offers the
216
- // list, rather than doing nothing at all (carrick#987).
320
+ // from here: the project is created here, and `connectRepos` puts the
321
+ // repos in it as the grant connects them (carrick#999), so the wait is on
322
+ // the GitHub App grant and nothing else. Without --project the step reads
323
+ // the assignment the repos already have and offers the list, rather than
324
+ // doing nothing at all (carrick#987).
217
325
  const prompts = { say, ask, confirm, interactive, assumeYes: parsed.assumeYes };
218
326
  let project = parsed.project;
219
327
  let projectExists = false;
@@ -232,14 +340,11 @@ export async function init(argv) {
232
340
  say,
233
341
  });
234
342
  if (project !== null && !reposAreInProject(identity, names, project)) {
235
- // A project NAMED on the command line is a requirement, and an
236
- // unverified one fails the run. A project picked during the step is not:
237
- // stopping there would cost someone their hooks and their proposal for
238
- // answering a question they were offered (carrick#987).
239
- if (parsed.project !== null) {
240
- throw new Error(`Project "${project}" was not verified for every requested repo. Complete the browser steps and run carrick init --project ${project} again.`);
241
- }
242
- say(`Setup continues; finish the browser steps to put these repos in "${project}".`);
343
+ // An unverified project does not end the run, whether it was named on
344
+ // the command line or picked here. Stopping cost someone their hooks and
345
+ // their proposal for a browser step they could only take afterwards, and
346
+ // the documented command then needed two runs (carrick#993 row 8).
347
+ say(`Setup continues; finish the browser steps above to put these repos in "${project}", then run carrick init --project ${project} again to verify.`);
243
348
  }
244
349
  say(`Carrick workspace: ${identity.workspace.slug}`);
245
350
  if (identity.allowance_sentence)
@@ -251,7 +356,15 @@ export async function init(argv) {
251
356
  // than a workflow line per repo before anything is set up.
252
357
  else if (repo.services.length === 0)
253
358
  say(`${repo.full_name} is connected and has no hosted index yet.`);
359
+ else
360
+ hostedIndex.push(repo.full_name);
254
361
  }
362
+ // The rest of the project, which this machine does not hold. Carrick
363
+ // answers across every repo in a project, so a folder holding half of one
364
+ // is a partial index and nothing here would otherwise say so
365
+ // (carrick#993 row 18).
366
+ for (const line of absentRepos(identity, names, project))
367
+ say(line);
255
368
  }
256
369
  catch (error) {
257
370
  process.stderr.write(`carrick init: ${error.message}\n`);
@@ -346,19 +459,39 @@ export async function init(argv) {
346
459
  say("Once the index exists, editing a file with a route or a call in it is what");
347
460
  say("Carrick answers on; `carrick status` says what the index holds.");
348
461
  say();
349
- // No scan ran here, and that is the point (carrick-cloud#799): the one paid
350
- // scan runs against a config someone has read, so the last thing this
351
- // command prints is the prompt that produces that config.
352
- say(` There is no index yet. ${PROPOSAL_FILE} holds the services this run derived;`);
353
- say(" an agent turns it into carrick.json, adds the CI check (which needs no secret),");
354
- say(" and builds the index: `carrick index` is free and runs no model, and");
355
- say(" `carrick index --infer` is the single scan that asks Carrick to classify the rest.");
356
- say(" By hand instead: `carrick templates workflow > .github/workflows/carrick.yml`, a");
357
- say(" carrick.json per https://docs.carrick.tools/carrick-json, then those two commands.");
462
+ // No scan ran here, and that is the point (carrick-cloud#799): the one scan
463
+ // runs against a config someone has read, so the last thing this command
464
+ // prints is the prompt that produces that config. Nothing here names a
465
+ // rehearsal pass: `carrick index` is the only scan in the flow, and a
466
+ // facts-only one has no user (carrick#1008, cloud#832).
467
+ //
468
+ // Unless CI has already built one. The hosted index is the whole workspace's
469
+ // row, and `carrick index` from a laptop on a branch replaces it for
470
+ // everyone who queries it, so where the workspace read found services this
471
+ // says so and orders no scan at all (carrick#993 row 2).
472
+ if (hostedIndex.length > 0) {
473
+ const subject = hostedIndex.length === requested.length && requested.length === 1
474
+ ? "This repo"
475
+ : hostedIndex.length > 3
476
+ ? `${hostedIndex.slice(0, 3).join(", ")} and ${hostedIndex.length - 3} more`
477
+ : hostedIndex.join(", ");
478
+ say(` ${subject} already ${hostedIndex.length === 1 ? "has" : "have"} a hosted index. Do not run \`carrick index\`:`);
479
+ say(" from a branch it replaces the CI row for everyone, and CI keeps it current.");
480
+ say(` ${PROPOSAL_FILE} holds the services this run derived, to compare`);
481
+ say(" with the carrick.json already committed.");
482
+ }
483
+ else {
484
+ say(` There is no index yet. ${PROPOSAL_FILE} holds the services this run derived;`);
485
+ say(" an agent turns it into carrick.json, adds the CI check (which needs no secret),");
486
+ say(" reads the config back against the repo, and runs `carrick index --detach` once:");
487
+ say(" the single scan that builds the index and asks Carrick to classify the rest.");
488
+ say(" By hand instead: `carrick templates workflow > .github/workflows/carrick.yml`, a");
489
+ say(" carrick.json per https://docs.carrick.tools/carrick-json, then that command.");
490
+ }
358
491
  say();
359
492
  say(" Paste this to your agent:");
360
493
  say();
361
- say(` ${AGENT_SCAFFOLD_PROMPT}`);
494
+ say(` ${agentScaffoldPrompt(hostedIndex.length > 0)}`);
362
495
  return 0;
363
496
  }
364
497
  /** `carrick templates <name>`, so the workflow above is one command. */
@@ -1 +1 @@
1
- {"version":3,"file":"run.js","sourceRoot":"","sources":["../../src/init/run.ts"],"names":[],"mappings":"AAAA,qEAAqE;AAErE,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAmB,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACzF,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,IAAI,EAAE,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