carrick 0.3.65 → 0.3.66

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.
@@ -1,26 +1,22 @@
1
1
  import { type ResolvedRepos } from "../auth/read.ts";
2
+ import { type WorkspaceProposal } from "./repos.ts";
3
+ import { type McpOutcome } from "./mcp.ts";
2
4
  /**
3
- * The prompt that makes an agent write this repo's config and setup files.
5
+ * The one sentence the run ends on.
4
6
  *
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.
7
+ * The scaffold tool carries the instructions — which files to create, how to
8
+ * seed `carrick.json` from the proposal, whether to run the scan at all
9
+ * (carrick-cloud#832) — so the terminal names the tool and stops. The copy
10
+ * that used to stand here was a second statement of the same instructions, and
11
+ * two copies of a sequence drift.
15
12
  *
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
+ * The argument is named because the tool's branch turns on it and turns soft
14
+ * without it: `repo` is what resolves the hosted rows, and with no `repo` the
15
+ * response keeps its default ending and tells the agent to run the scan — on a
16
+ * repo CI already indexes, which is the row the whole workspace reads
17
+ * (carrick-cloud `src/tools/scaffold.ts`, cloud#805 item 1).
22
18
  */
23
- export declare function agentScaffoldPrompt(hosted: boolean): string;
19
+ export declare const SCAFFOLD_SENTENCE = "Run the carrick scaffold tool for this repo, passing its owner/repo as `repo`, and follow what it returns.";
24
20
  export type InitOptions = {
25
21
  workspace: string;
26
22
  /** Require every proposed GitHub repo to belong to this project. */
@@ -35,27 +31,45 @@ export declare function parseArgs(argv: string[], cwd?: string): InitOptions | s
35
31
  * The repos a project holds that this folder does not, one line per project.
36
32
  *
37
33
  * 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
34
+ * one gets half the answers, and the connection line above names only what is
39
35
  * here. `project_repos` is the workspace read's answer to that: the whole
40
36
  * membership of every project the requested repos are in (carrick#993 row 18).
41
37
  * Capped and counted like the identity lines, because a project can hold two
42
38
  * hundred.
43
39
  */
44
40
  export declare function absentRepos(identity: ResolvedRepos, names: string[], project: string | null): string[];
41
+ /** The repos this run connected, as one line however many there are. */
42
+ export declare function connectedLine(names: string[]): string;
45
43
  /**
46
- * The editor lines, one line per editor that is on the machine.
44
+ * What the derive found, in the words the workspace stated it in.
47
45
  *
48
- * `--install-extension <id>` resolves the id against that editor's own gallery,
49
- * and the three editors below read three different ones: VS Code the VS Code
50
- * Marketplace, Cursor and Windsurf each their own. The extension is published
51
- * to all three, so the id is a command every one of them can run
52
- * (carrick#915). Any other editor gets the server's command and no claim about
53
- * the editor: the per-editor results table in `plugin/TEST-PLAN.md` section 6
54
- * is still empty.
46
+ * The manifest kind is the scanner's own `reason` for each repo — "npm
47
+ * workspaces", "pnpm workspaces", "Deno manifests", "carrick.json", "single
48
+ * repository", or a `+` join of them (`src/service_derivation.rs`) — and it is
49
+ * named only where every repo here agrees on one, because a mixed workspace
50
+ * has no one word for what was found.
51
+ */
52
+ export declare function packagesFound(plan: WorkspaceProposal): string;
53
+ /** The line that states it, and names where the proposal landed. */
54
+ export declare function packagesLine(plan: WorkspaceProposal): string;
55
+ /**
56
+ * The one line for the hooks and the MCP connection.
57
+ *
58
+ * A client is named only where this run changed something for it: an "already
59
+ * connected" line is a line about nothing, and a first run prints four of them
60
+ * (carrick#1026). The hooks are always this repo's, so they are always the
61
+ * subject.
62
+ */
63
+ export declare function configuredLine(mcp: McpOutcome[]): string;
64
+ /**
65
+ * One line per other client this run wrote a file for, naming that file.
55
66
  *
56
- * `onPath` is injected so a test can state each machine.
67
+ * The path is printed because this command guessed it: a client detected by its
68
+ * own data directory gets an entry written into its own config file, and a
69
+ * wrong guess has to be one visible line and one entry to delete (`mcp.ts`).
70
+ * A client left exactly as it was gets no line at all (carrick#1026).
57
71
  */
58
- export declare function editorLines(onPath: (command: string) => boolean): string[];
72
+ export declare function mcpClientLines(mcp: McpOutcome[]): string[];
59
73
  export declare function init(argv: string[]): Promise<number>;
60
- /** `carrick templates <name>`, so the workflow above is one command. */
74
+ /** `carrick templates <name>`, so a workflow is one command. */
61
75
  export declare function templates(argv: string[]): number;