carrick 0.3.90 → 0.3.92

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 (45) hide show
  1. package/README.md +5 -2
  2. package/bin/carrick.mjs +2 -2
  3. package/dist/auth/credentials.d.ts +1 -1
  4. package/dist/auth/credentials.js +1 -1
  5. package/dist/auth/credentials.js.map +1 -1
  6. package/dist/auth/oauth.d.ts +8 -0
  7. package/dist/auth/oauth.js +65 -11
  8. package/dist/auth/oauth.js.map +1 -1
  9. package/dist/auth/run.d.ts +19 -1
  10. package/dist/auth/run.js +52 -9
  11. package/dist/auth/run.js.map +1 -1
  12. package/dist/init/connect.d.ts +42 -3
  13. package/dist/init/connect.js +172 -113
  14. package/dist/init/connect.js.map +1 -1
  15. package/dist/init/mcp.d.ts +11 -0
  16. package/dist/init/mcp.js +14 -8
  17. package/dist/init/mcp.js.map +1 -1
  18. package/dist/init/output.d.ts +2 -0
  19. package/dist/init/output.js +33 -2
  20. package/dist/init/output.js.map +1 -1
  21. package/dist/init/projects.d.ts +56 -5
  22. package/dist/init/projects.js +124 -17
  23. package/dist/init/projects.js.map +1 -1
  24. package/dist/init/repos.d.ts +33 -0
  25. package/dist/init/repos.js +8 -1
  26. package/dist/init/repos.js.map +1 -1
  27. package/dist/init/run.d.ts +64 -36
  28. package/dist/init/run.js +263 -163
  29. package/dist/init/run.js.map +1 -1
  30. package/package.json +6 -6
  31. package/sidecar/dist/src/capture/api.d.ts +13 -1
  32. package/sidecar/dist/src/capture/check-classify.js +12 -7
  33. package/sidecar/dist/src/capture/check-probe.d.ts +10 -0
  34. package/sidecar/dist/src/capture/check-probe.js +21 -3
  35. package/sidecar/dist/src/capture/check.js +1 -0
  36. package/sidecar/dist/src/capture/index.d.ts +1 -0
  37. package/sidecar/dist/src/capture/index.js +1 -0
  38. package/sidecar/dist/src/index.js +37 -9
  39. package/sidecar/dist/src/retype.d.ts +67 -0
  40. package/sidecar/dist/src/retype.js +813 -0
  41. package/sidecar/dist/src/type-inferrer.d.ts +85 -1
  42. package/sidecar/dist/src/type-inferrer.js +384 -1
  43. package/sidecar/dist/src/types.d.ts +58 -2
  44. package/sidecar/dist/src/validators.d.ts +153 -20
  45. package/sidecar/dist/src/validators.js +17 -0
@@ -1,6 +1,6 @@
1
1
  import { type ResolvedRepos } from "../auth/read.ts";
2
2
  import { type RepoIdentity, type WorkspaceProposal } from "./repos.ts";
3
- import { type McpOutcome, type OfferedClient } from "./mcp.ts";
3
+ import { type OfferedClient } from "./mcp.ts";
4
4
  import { type Choice, type InitOutput } from "./output.ts";
5
5
  /**
6
6
  * The repos this run covers that the scaffold tool still has work in.
@@ -73,38 +73,78 @@ export declare function parseArgs(argv: string[], cwd?: string): InitOptions | s
73
73
  * hundred.
74
74
  */
75
75
  export declare function absentRepos(identity: ResolvedRepos, names: string[], project: string | null, label?: (slug: string) => string): string[];
76
- /** The repos this run connected, as one line however many there are. */
77
- export declare function connectedLine(names: string[]): string;
76
+ /** What the setup line says was set up, and where. */
77
+ export type SetupState = {
78
+ /** The repos covered, as the reader knows them. */
79
+ repos: string[];
80
+ workspace: string;
81
+ /** The project, as printed, or null when none was settled. */
82
+ project: string | null;
83
+ /** The agent hosts whose hook file this run holds. */
84
+ hooks: string[];
85
+ skills: boolean;
86
+ /** The clients that now have the Carrick MCP server. */
87
+ mcp: string[];
88
+ };
78
89
  /**
79
- * What the derive found, in the words the workspace stated it in.
90
+ * The one line that says what is set up (carrick#1489).
80
91
  *
81
- * The manifest kind is the scanner's own `reason` for each repo — "npm
82
- * workspaces", "pnpm workspaces", "Deno manifests", "carrick.json", "single
83
- * repository", or a `+` join of them (`src/service_derivation.rs`) — and it is
84
- * named only where every repo here agrees on one, because a mixed workspace
85
- * has no one word for what was found.
92
+ * It used to be nine blocks: the login, the connection, the packages and the
93
+ * proposal path, each hook file, the skills, the MCP clients, the index. The
94
+ * files were named in the question that asked to write them, so what is left
95
+ * to say is the state.
86
96
  */
87
- export declare function packagesFound(plan: WorkspaceProposal): string;
88
- /** The line that states it, and names where the proposal landed. */
89
- export declare function packagesLine(plan: WorkspaceProposal): string;
97
+ export declare function setupLine(state: SetupState): string;
90
98
  /**
91
- * The one line for the hooks and the MCP connection.
99
+ * The installs a first scan would be refused over, as commands to run.
92
100
  *
93
- * A client is named only where this run changed something for it: an "already
94
- * connected" line is a line about nothing, and a first run prints four of them
95
- * (carrick#1026). The hooks are always this repo's, so they are always the
96
- * subject.
101
+ * The scanner states them (`not_installed` on each derived repo, from the same
102
+ * preflight rule the scan refuses on), so this only says where each runs, as
103
+ * a path from the workspace the agent is in (carrick#1489).
97
104
  */
98
- export declare function configuredLine(mcp: McpOutcome[]): string;
105
+ export declare function installCommands(plan: WorkspaceProposal): string[];
99
106
  /**
100
- * One line per other client this run wrote a file for, naming that file.
107
+ * The sentence that installs them, when there is anything to install: an
108
+ * instruction to the agent, or a line to the reader when no instruction is
109
+ * printed.
110
+ */
111
+ export declare function installSentence(commands: string[], to: "agent" | "reader"): string | null;
112
+ /**
113
+ * One block per project: the repos in it, each once, with what is about to
114
+ * happen to it (carrick#1489).
101
115
  *
102
- * The path is printed because this command guessed it: a client detected by its
103
- * own data directory gets an entry written into its own config file, and a
104
- * wrong guess has to be one visible line and one entry to delete (`mcp.ts`).
105
- * A client left exactly as it was gets no line at all (carrick#1026).
116
+ * This replaced a listing that named every repo twice and restated the project
117
+ * the reader had just confirmed. The block header is the project, and a repo
118
+ * row says only what differs from the header: a package count above one, or
119
+ * the project it moves out of.
106
120
  */
107
- export declare function mcpClientLines(mcp: McpOutcome[]): string[];
121
+ export declare function summaryBlocks(input: {
122
+ plan: WorkspaceProposal;
123
+ selected: RepoIdentity[];
124
+ /** The project these repos go to, or null when none was settled. */
125
+ project: string | null;
126
+ /** The header for a project this run creates, or null when it exists. */
127
+ created: string | null;
128
+ label: (slug: string) => string;
129
+ /** Where each repo is now, by owner/repo; null for one not connected. */
130
+ assigned: Map<string, string | null>;
131
+ moving: string[];
132
+ }): string[];
133
+ /**
134
+ * The files the write step creates, by path, for the question that asks to
135
+ * write them (carrick#1489).
136
+ *
137
+ * Directories inside the workspace, because each holds several files and the
138
+ * list has to fit one line; every file outside it by its own path, because
139
+ * those belong to somebody's editor. Claude Code's server list is written by
140
+ * its own command, so it is named rather than given a path.
141
+ */
142
+ export declare function writesLine(options: {
143
+ workspaceFile: boolean;
144
+ editorFiles: string[];
145
+ claudeCode: boolean;
146
+ home?: string;
147
+ }): string;
108
148
  /** The line a run that was stopped at a question ends on (carrick#1338). */
109
149
  export declare const CANCELLED = "Cancelled. Nothing was written, here or in Carrick.";
110
150
  /**
@@ -192,18 +232,6 @@ export declare function chooseEditors(offered: OfferedClient[], options: {
192
232
  assumeYes: boolean;
193
233
  interactive: boolean;
194
234
  }, 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;
197
- /** The repos this install covers, one line each, for the proposal. */
198
- export declare function coverageLines(plan: WorkspaceProposal, selected: RepoIdentity[]): string[];
199
- /**
200
- * What the server would be asked to change, said before it is asked.
201
- *
202
- * A move is named with the project it comes OUT of, display name and slug
203
- * both, because that is the project whose agents stop seeing this repo and
204
- * the one a reader has to find again to undo it (carrick#1338).
205
- */
206
- export declare function moveLines(moving: string[], from: (name: string) => string, target: string, label: (slug: string) => string): string[];
207
235
  export declare function init(argv: string[]): Promise<number>;
208
236
  /**
209
237
  * `init` with the terminal stated rather than sniffed, so a test can be the