carrick 0.3.97 → 0.3.98

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 (48) hide show
  1. package/bin/carrick.mjs +19 -14
  2. package/dist/auth/run.d.ts +1 -1
  3. package/dist/auth/run.js +1 -1
  4. package/dist/contract.d.ts +15 -0
  5. package/dist/contract.js.map +1 -1
  6. package/dist/global-install.js +6 -5
  7. package/dist/global-install.js.map +1 -1
  8. package/dist/hook/reuse.d.ts +8 -3
  9. package/dist/hook/reuse.js +15 -3
  10. package/dist/hook/reuse.js.map +1 -1
  11. package/dist/init/connect.js +1 -1
  12. package/dist/init/connect.js.map +1 -1
  13. package/dist/init/doctor.js +5 -2
  14. package/dist/init/doctor.js.map +1 -1
  15. package/dist/init/hosted.d.ts +18 -1
  16. package/dist/init/hosted.js +84 -16
  17. package/dist/init/hosted.js.map +1 -1
  18. package/dist/init/install-id.d.ts +2 -2
  19. package/dist/init/install-id.js +3 -3
  20. package/dist/init/install-id.js.map +1 -1
  21. package/dist/init/mcp.d.ts +2 -2
  22. package/dist/init/mcp.js +2 -2
  23. package/dist/init/mcp.js.map +1 -1
  24. package/dist/init/outdated.d.ts +1 -1
  25. package/dist/init/outdated.js +1 -1
  26. package/dist/init/outdated.js.map +1 -1
  27. package/dist/init/output.d.ts +18 -1
  28. package/dist/init/output.js +40 -1
  29. package/dist/init/output.js.map +1 -1
  30. package/dist/init/remove.d.ts +71 -2
  31. package/dist/init/remove.js +474 -145
  32. package/dist/init/remove.js.map +1 -1
  33. package/dist/init/repo-copies.d.ts +16 -4
  34. package/dist/init/repo-copies.js +20 -6
  35. package/dist/init/repo-copies.js.map +1 -1
  36. package/dist/init/run.d.ts +12 -16
  37. package/dist/init/run.js +25 -42
  38. package/dist/init/run.js.map +1 -1
  39. package/dist/update.js +1 -0
  40. package/dist/update.js.map +1 -1
  41. package/package.json +6 -6
  42. package/plugin/.claude-plugin/plugin.json +1 -1
  43. package/sidecar/dist/src/client-semantics.d.ts +36 -0
  44. package/sidecar/dist/src/client-semantics.js +1008 -0
  45. package/sidecar/dist/src/index.js +35 -0
  46. package/sidecar/dist/src/types.d.ts +83 -2
  47. package/sidecar/dist/src/validators.d.ts +463 -0
  48. package/sidecar/dist/src/validators.js +50 -0
@@ -2,10 +2,19 @@ import { type McpRemoval } from "./mcp.ts";
2
2
  import { type InitOutput } from "./output.ts";
3
3
  export type RemoveOptions = {
4
4
  workspace: string;
5
+ /** The answer to the question, given up front: this folder's name. */
6
+ confirm: string | null;
7
+ };
8
+ export type UninstallOptions = {
5
9
  /** Leave the saved credential in place: this machine stays signed in. */
6
10
  keepLogin: boolean;
11
+ /** The answer to the question, given up front: the word `uninstall`. */
12
+ confirm: string | null;
7
13
  };
8
- export declare function parseArgs(argv: string[], cwd?: string): RemoveOptions | string;
14
+ /** The word `carrick uninstall` asks to have typed. */
15
+ export declare const UNINSTALL_ANSWER = "uninstall";
16
+ export declare function parseRemoveArgs(argv: string[], cwd?: string): RemoveOptions | string;
17
+ export declare function parseUninstallArgs(argv: string[]): UninstallOptions | string;
9
18
  /**
10
19
  * The files the scaffold pull request adds to a repository.
11
20
  *
@@ -37,4 +46,64 @@ export declare function mcpRemovalLines(removals: McpRemoval[]): {
37
46
  done: string[];
38
47
  warn: string[];
39
48
  };
40
- export declare function remove(argv: string[], out?: InitOutput): Promise<number>;
49
+ /** The answer `carrick remove` asks for: the folder's own name. */
50
+ export declare function folderName(workspace: string): string;
51
+ /**
52
+ * What `carrick remove` found in a folder, before it deletes any of it.
53
+ *
54
+ * Each field is one kind of thing the removal takes, read by the read half of
55
+ * its writer's pair, and the removal acts on these fields and nothing else: a
56
+ * file listed here is a file it removes from, and a file it could not read is
57
+ * one of `leaves`, said above the question and not tried again.
58
+ */
59
+ export type FolderPlan = {
60
+ workspace: string;
61
+ /** The repos here holding a copy init recorded in their exclude file. */
62
+ copies: string[];
63
+ /** The settings files holding entries of ours, relative to the folder. */
64
+ settings: string[];
65
+ /** Our entries in `.codex/hooks.json`; `file` where they are all it holds. */
66
+ codex: "entries" | "file" | null;
67
+ /** The task skills still as init wrote them, relative to the folder. */
68
+ skills: string[];
69
+ /** The names init added to the exclude list; `file` where they are all it holds. */
70
+ selection: {
71
+ names: string[];
72
+ file: boolean;
73
+ } | null;
74
+ carrick: boolean;
75
+ /** What stays, and why. */
76
+ leaves: string[];
77
+ };
78
+ export declare function folderPlan(workspace: string): FolderPlan;
79
+ /** The list `carrick remove` prints before it asks: one line per thing it deletes. */
80
+ export declare function folderLines(plan: FolderPlan): string[];
81
+ /**
82
+ * What `carrick uninstall` found on this machine, before it deletes any of it.
83
+ * The same contract as `FolderPlan`: the removal acts on these and nothing else.
84
+ */
85
+ export type MachinePlan = {
86
+ /** The agent clients holding an MCP server entry of ours. */
87
+ mcp: string[];
88
+ sessions: number;
89
+ notice: boolean;
90
+ installId: boolean;
91
+ /** The credential file, where this run deletes it. */
92
+ credential: string | null;
93
+ /** What stays, and why. */
94
+ leaves: string[];
95
+ };
96
+ export declare function machinePlan(keepLogin: boolean): MachinePlan;
97
+ /** The list `carrick uninstall` prints before it asks. */
98
+ export declare function machineLines(plan: MachinePlan): string[];
99
+ /** The line a run that was stopped at its question ends on. */
100
+ export declare const NOTHING_REMOVED = "Nothing was removed.";
101
+ export declare function remove(argv: string[]): Promise<number>;
102
+ /**
103
+ * `remove` with the terminal stated rather than sniffed, as `initWith` does,
104
+ * so a test can be the terminal that answers the question.
105
+ */
106
+ export declare function removeWith(argv: string[], out: InitOutput, interactive: boolean): Promise<number>;
107
+ export declare function uninstall(argv: string[]): Promise<number>;
108
+ /** `uninstall` with the terminal stated, as `removeWith`. */
109
+ export declare function uninstallWith(argv: string[], out: InitOutput, interactive: boolean): Promise<number>;