@devdogsuga/devtools 0.1.0

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 (253) hide show
  1. package/README.md +44 -0
  2. package/bin/devtools-ci-bare.mjs +48 -0
  3. package/bin/devtools-ci.mjs +17 -0
  4. package/bin/devtools.mjs +27 -0
  5. package/dist/args.d.ts +26 -0
  6. package/dist/args.js +78 -0
  7. package/dist/bws/bw.d.ts +9 -0
  8. package/dist/bws/bw.js +49 -0
  9. package/dist/bws/client.d.ts +43 -0
  10. package/dist/bws/client.js +363 -0
  11. package/dist/bws/environments.d.ts +96 -0
  12. package/dist/bws/environments.js +111 -0
  13. package/dist/bws/pace.d.ts +27 -0
  14. package/dist/bws/pace.js +43 -0
  15. package/dist/bws/retry.d.ts +12 -0
  16. package/dist/bws/retry.js +39 -0
  17. package/dist/bws/store.d.ts +1 -0
  18. package/dist/bws/store.js +32 -0
  19. package/dist/bws/token.d.ts +31 -0
  20. package/dist/bws/token.js +88 -0
  21. package/dist/bws/vault.d.ts +29 -0
  22. package/dist/bws/vault.js +200 -0
  23. package/dist/catalog.d.ts +55 -0
  24. package/dist/catalog.js +81 -0
  25. package/dist/cf/commands.d.ts +1 -0
  26. package/dist/cf/commands.js +182 -0
  27. package/dist/cf/local-env.d.ts +44 -0
  28. package/dist/cf/local-env.js +148 -0
  29. package/dist/ci.d.ts +1 -0
  30. package/dist/ci.js +319 -0
  31. package/dist/cli.d.ts +11 -0
  32. package/dist/cli.js +1077 -0
  33. package/dist/commands.d.ts +255 -0
  34. package/dist/commands.js +1279 -0
  35. package/dist/completions.d.ts +4 -0
  36. package/dist/completions.js +110 -0
  37. package/dist/cron/commands.d.ts +47 -0
  38. package/dist/cron/commands.js +372 -0
  39. package/dist/cron/discovery.d.ts +55 -0
  40. package/dist/cron/discovery.js +85 -0
  41. package/dist/cron/schema.d.ts +45 -0
  42. package/dist/cron/schema.js +35 -0
  43. package/dist/db/config-push.d.ts +8 -0
  44. package/dist/db/config-push.js +11 -0
  45. package/dist/db/connection.d.ts +79 -0
  46. package/dist/db/connection.js +114 -0
  47. package/dist/db/exec.d.ts +1 -0
  48. package/dist/db/exec.js +11 -0
  49. package/dist/db/generate-migration.d.ts +1 -0
  50. package/dist/db/generate-migration.js +67 -0
  51. package/dist/db/generate-types.d.ts +1 -0
  52. package/dist/db/generate-types.js +4 -0
  53. package/dist/db/introspect.d.ts +1 -0
  54. package/dist/db/introspect.js +113 -0
  55. package/dist/db/local-env.d.ts +65 -0
  56. package/dist/db/local-env.js +23 -0
  57. package/dist/db/new-migration.d.ts +1 -0
  58. package/dist/db/new-migration.js +8 -0
  59. package/dist/db/run.d.ts +70 -0
  60. package/dist/db/run.js +158 -0
  61. package/dist/db/seed-buckets.d.ts +2 -0
  62. package/dist/db/seed-buckets.js +4 -0
  63. package/dist/db/seed-production.d.ts +8 -0
  64. package/dist/db/seed-production.js +73 -0
  65. package/dist/db/seed-roles.d.ts +7 -0
  66. package/dist/db/seed-roles.js +31 -0
  67. package/dist/db/session-refresh.d.ts +43 -0
  68. package/dist/db/session-refresh.js +40 -0
  69. package/dist/deploy/migrations.d.ts +20 -0
  70. package/dist/deploy/migrations.js +68 -0
  71. package/dist/deploy/orphans.d.ts +20 -0
  72. package/dist/deploy/orphans.js +177 -0
  73. package/dist/deploy/preflight.d.ts +53 -0
  74. package/dist/deploy/preflight.js +189 -0
  75. package/dist/deploy/report.d.ts +26 -0
  76. package/dist/deploy/report.js +70 -0
  77. package/dist/deploy/require-planner.d.ts +2 -0
  78. package/dist/deploy/require-planner.js +60 -0
  79. package/dist/deploy/require-token.d.ts +15 -0
  80. package/dist/deploy/require-token.js +78 -0
  81. package/dist/deploy/secrets-file.d.ts +17 -0
  82. package/dist/deploy/secrets-file.js +167 -0
  83. package/dist/deploy/write-env.d.ts +40 -0
  84. package/dist/deploy/write-env.js +393 -0
  85. package/dist/docs/index-pages.d.ts +36 -0
  86. package/dist/docs/index-pages.js +184 -0
  87. package/dist/doctor.d.ts +62 -0
  88. package/dist/doctor.js +225 -0
  89. package/dist/emails/commands.d.ts +15 -0
  90. package/dist/emails/commands.js +130 -0
  91. package/dist/emails/email-types.d.ts +13 -0
  92. package/dist/emails/email-types.js +1 -0
  93. package/dist/emails/fixtures.d.ts +20 -0
  94. package/dist/emails/fixtures.js +20 -0
  95. package/dist/env/audit.d.ts +206 -0
  96. package/dist/env/audit.js +436 -0
  97. package/dist/env/cloudflare.d.ts +21 -0
  98. package/dist/env/cloudflare.js +61 -0
  99. package/dist/env/commands.d.ts +99 -0
  100. package/dist/env/commands.js +612 -0
  101. package/dist/env/discovery.d.ts +15 -0
  102. package/dist/env/discovery.js +226 -0
  103. package/dist/env/document.d.ts +119 -0
  104. package/dist/env/document.js +323 -0
  105. package/dist/env/example.d.ts +68 -0
  106. package/dist/env/example.js +603 -0
  107. package/dist/env/selection.d.ts +105 -0
  108. package/dist/env/selection.js +226 -0
  109. package/dist/environment.d.ts +92 -0
  110. package/dist/environment.js +206 -0
  111. package/dist/fingerprint.d.ts +10 -0
  112. package/dist/fingerprint.js +18 -0
  113. package/dist/gen/campus-map.d.ts +1 -0
  114. package/dist/gen/campus-map.js +473 -0
  115. package/dist/gen/commands.d.ts +1 -0
  116. package/dist/gen/commands.js +25 -0
  117. package/dist/gen/hypno.d.ts +1 -0
  118. package/dist/gen/hypno.js +134 -0
  119. package/dist/gh/client.d.ts +80 -0
  120. package/dist/gh/client.js +258 -0
  121. package/dist/gh/environments.d.ts +83 -0
  122. package/dist/gh/environments.js +178 -0
  123. package/dist/gh/rulesets/actors.d.ts +14 -0
  124. package/dist/gh/rulesets/actors.js +68 -0
  125. package/dist/gh/rulesets/api.d.ts +15 -0
  126. package/dist/gh/rulesets/api.js +99 -0
  127. package/dist/gh/rulesets/commands.d.ts +3 -0
  128. package/dist/gh/rulesets/commands.js +203 -0
  129. package/dist/gh/rulesets/desired.d.ts +112 -0
  130. package/dist/gh/rulesets/desired.js +247 -0
  131. package/dist/gh/rulesets/diff.d.ts +65 -0
  132. package/dist/gh/rulesets/diff.js +134 -0
  133. package/dist/gh/rulesets/types.d.ts +76 -0
  134. package/dist/gh/rulesets/types.js +13 -0
  135. package/dist/gh/settings/api.d.ts +40 -0
  136. package/dist/gh/settings/api.js +172 -0
  137. package/dist/gh/settings/commands.d.ts +1 -0
  138. package/dist/gh/settings/commands.js +245 -0
  139. package/dist/gh/settings/desired.d.ts +53 -0
  140. package/dist/gh/settings/desired.js +39 -0
  141. package/dist/gh/settings/diff.d.ts +57 -0
  142. package/dist/gh/settings/diff.js +156 -0
  143. package/dist/gh/settings/types.d.ts +92 -0
  144. package/dist/gh/settings/types.js +11 -0
  145. package/dist/gh/settings/workflows.d.ts +41 -0
  146. package/dist/gh/settings/workflows.js +124 -0
  147. package/dist/grantRoot.d.ts +42 -0
  148. package/dist/grantRoot.js +89 -0
  149. package/dist/help.d.ts +18 -0
  150. package/dist/help.js +169 -0
  151. package/dist/images/commands.d.ts +35 -0
  152. package/dist/images/commands.js +233 -0
  153. package/dist/images/events.d.ts +36 -0
  154. package/dist/images/events.js +152 -0
  155. package/dist/images/graphics.d.ts +70 -0
  156. package/dist/images/graphics.js +233 -0
  157. package/dist/images/open-graph-types.d.ts +75 -0
  158. package/dist/images/open-graph-types.js +1 -0
  159. package/dist/images/prompts.d.ts +34 -0
  160. package/dist/images/prompts.js +100 -0
  161. package/dist/images/render.d.ts +21 -0
  162. package/dist/images/render.js +57 -0
  163. package/dist/images/select.d.ts +64 -0
  164. package/dist/images/select.js +96 -0
  165. package/dist/instance.d.ts +67 -0
  166. package/dist/instance.js +129 -0
  167. package/dist/invocation.d.ts +49 -0
  168. package/dist/invocation.js +78 -0
  169. package/dist/launch-ci.d.ts +1 -0
  170. package/dist/launch-ci.js +86 -0
  171. package/dist/launch.d.ts +29 -0
  172. package/dist/launch.js +371 -0
  173. package/dist/menu.d.ts +31 -0
  174. package/dist/menu.js +277 -0
  175. package/dist/newsletter/commands.d.ts +16 -0
  176. package/dist/newsletter/commands.js +311 -0
  177. package/dist/newsletter/imap.d.ts +17 -0
  178. package/dist/newsletter/imap.js +127 -0
  179. package/dist/newsletter/loopback.d.ts +24 -0
  180. package/dist/newsletter/loopback.js +100 -0
  181. package/dist/newsletter/oauth.d.ts +26 -0
  182. package/dist/newsletter/oauth.js +130 -0
  183. package/dist/newsletter/smtp.d.ts +23 -0
  184. package/dist/newsletter/smtp.js +133 -0
  185. package/dist/oauth/browser.d.ts +1 -0
  186. package/dist/oauth/browser.js +13 -0
  187. package/dist/oauth/config.d.ts +24 -0
  188. package/dist/oauth/config.js +24 -0
  189. package/dist/oauth/connect-url.d.ts +17 -0
  190. package/dist/oauth/connect-url.js +23 -0
  191. package/dist/oauth/db.d.ts +37 -0
  192. package/dist/oauth/db.js +108 -0
  193. package/dist/oauth/device.d.ts +93 -0
  194. package/dist/oauth/device.js +190 -0
  195. package/dist/oauth/discovery.d.ts +28 -0
  196. package/dist/oauth/discovery.js +54 -0
  197. package/dist/oauth/env-file.d.ts +6 -0
  198. package/dist/oauth/env-file.js +35 -0
  199. package/dist/oauth/exchange.d.ts +43 -0
  200. package/dist/oauth/exchange.js +87 -0
  201. package/dist/oauth/label.d.ts +1 -0
  202. package/dist/oauth/label.js +25 -0
  203. package/dist/oauth/loopback.d.ts +52 -0
  204. package/dist/oauth/loopback.js +162 -0
  205. package/dist/oauth/pkce.d.ts +6 -0
  206. package/dist/oauth/pkce.js +34 -0
  207. package/dist/oauth/target.d.ts +54 -0
  208. package/dist/oauth/target.js +102 -0
  209. package/dist/oauth/transport.d.ts +41 -0
  210. package/dist/oauth/transport.js +32 -0
  211. package/dist/oauth/wizard.d.ts +33 -0
  212. package/dist/oauth/wizard.js +571 -0
  213. package/dist/pick.d.ts +6 -0
  214. package/dist/pick.js +64 -0
  215. package/dist/planner/checks.d.ts +26 -0
  216. package/dist/planner/checks.js +104 -0
  217. package/dist/planner/commands.d.ts +10 -0
  218. package/dist/planner/commands.js +367 -0
  219. package/dist/planner/db.d.ts +15 -0
  220. package/dist/planner/db.js +33 -0
  221. package/dist/planner/role.d.ts +33 -0
  222. package/dist/planner/role.js +68 -0
  223. package/dist/repo/peers.d.ts +24 -0
  224. package/dist/repo/peers.js +114 -0
  225. package/dist/repo/preflight.d.ts +109 -0
  226. package/dist/repo/preflight.js +266 -0
  227. package/dist/repo/resolve.d.ts +41 -0
  228. package/dist/repo/resolve.js +152 -0
  229. package/dist/repo/root.d.ts +23 -0
  230. package/dist/repo/root.js +91 -0
  231. package/dist/repo/source.d.ts +14 -0
  232. package/dist/repo/source.js +54 -0
  233. package/dist/repo/tsx-loader.d.ts +6 -0
  234. package/dist/repo/tsx-loader.js +41 -0
  235. package/dist/run/pick.d.ts +60 -0
  236. package/dist/run/pick.js +559 -0
  237. package/dist/setup.d.ts +1 -0
  238. package/dist/setup.js +152 -0
  239. package/dist/stack.d.ts +48 -0
  240. package/dist/stack.js +290 -0
  241. package/dist/telemetry.d.ts +34 -0
  242. package/dist/telemetry.js +93 -0
  243. package/dist/tier.d.ts +40 -0
  244. package/dist/tier.js +93 -0
  245. package/dist/tsconfig.typecheck.tsbuildinfo +1 -0
  246. package/dist/ui.d.ts +25 -0
  247. package/dist/ui.js +51 -0
  248. package/dist/workers.d.ts +5 -0
  249. package/dist/workers.js +35 -0
  250. package/dist/workflows/commands.d.ts +44 -0
  251. package/dist/workflows/commands.js +668 -0
  252. package/env.ts +158 -0
  253. package/package.json +80 -0
@@ -0,0 +1,255 @@
1
+ /**
2
+ * One choice in a select prompt.
3
+ *
4
+ * `value` is the value the wizard passes for the option's own flag — e.g.
5
+ * `local`/`remote` for `--target`. The menu always emits `[flag, value]`.
6
+ */
7
+ export interface OptionChoice {
8
+ value: string;
9
+ label?: string;
10
+ hint?: string;
11
+ }
12
+ /**
13
+ * A prompt the wizard raises to fill an option the command line would carry.
14
+ *
15
+ * `confirm` has no polarity switch on purpose: **yes adds the flag**, always.
16
+ * So every message here is phrased so yes is the flag's own meaning ("Skip the
17
+ * duplicate scan?" rather than "Scan for duplicates?"). That leaves the wizard
18
+ * without a second place to get an inversion wrong.
19
+ */
20
+ export type OptionPrompt = {
21
+ kind: "confirm";
22
+ message: string;
23
+ initial: boolean;
24
+ } | {
25
+ kind: "select";
26
+ message: string;
27
+ choices: readonly OptionChoice[];
28
+ } | {
29
+ kind: "text";
30
+ message: string;
31
+ placeholder?: string;
32
+ optional?: boolean;
33
+ };
34
+ export interface CommandOption {
35
+ /** `--target`. */
36
+ flag: string;
37
+ /** `<t>` for a flag that takes a value; absent for a boolean. */
38
+ value?: string;
39
+ /** One line. Printed by `devtools <command> --help`. */
40
+ summary: string;
41
+ /**
42
+ * How the wizard asks for it.
43
+ *
44
+ * Absent means the wizard does not ask HERE, a decision rather than an
45
+ * omission. Three kinds of option are deliberately promptless:
46
+ *
47
+ * * ones the command asks for ITSELF, from something live. `--app` picks
48
+ * from the apps in the database, `--user` from the accounts on it,
49
+ * `--target` from `pick.ts`'s danger-ordered list, `--apps` from the env
50
+ * registry. A wizard text box would be a worse version of a menu that
51
+ * already exists, and `--target`'s would put production one keystroke
52
+ * closer than `pick.ts` deliberately puts it;
53
+ * * ones that exist to SUPPRESS a prompt (`--yes`), meaningless in a
54
+ * wizard, which is the prompt;
55
+ * * ones that carry a credential (`--access-token`). The interactive path
56
+ * resolves it better, and typing it makes it visible to `ps` and shell
57
+ * history.
58
+ *
59
+ * So every option is reachable from the menu; what varies is which screen
60
+ * asks. `commands.test.ts` pins the promptless set so a fourth case has to be
61
+ * argued for rather than accumulate.
62
+ */
63
+ prompt?: OptionPrompt;
64
+ }
65
+ /**
66
+ * Something about the machine that a command cares about.
67
+ *
68
+ * A string rather than a predicate, so this file stays what its header says it
69
+ * is: data. `environment.ts` is the only module that knows what these mean,
70
+ * `menu.ts` acts on them, and the docs build can render "shown when the local
71
+ * stack is running" without being able to run anything.
72
+ */
73
+ export type Condition = "docker" | "instance-running" | "instance-stopped";
74
+ /**
75
+ * Which layer of the database group a command acts on.
76
+ *
77
+ * Groups like Supabase and (future) `db` span multiple layers: the local
78
+ * Docker stack, the Postgres database inside it, and hosted endpoints. Scopes
79
+ * let `--help` head each run and the wizard put the layer on every line,
80
+ * so a contributor chooses deliberately rather than by accident.
81
+ *
82
+ * `machine` — acts on this machine's containers (`link`, `stop`, `restart`)
83
+ * `repo` — reads or writes repository files only (no live connection)
84
+ * `endpoint` — connects to the SESSION's database (picked once at launch,
85
+ * `--tier development:local|development:remote|staging|production`)
86
+ * `infra` — infrastructure-level; touches roles, credentials, or config
87
+ */
88
+ export type Scope = "machine" | "repo" | "endpoint" | "infra";
89
+ /**
90
+ * How each scope reads, in the two places that draw it.
91
+ *
92
+ * `menu` sits inline in a hint, so it is one word. `help` heads a block of
93
+ * commands, so it can be a phrase. Both live here rather than in the renderers
94
+ * because they are labels, the same kind of data as a group title.
95
+ */
96
+ export declare const SCOPES: Record<Scope, {
97
+ menu: string;
98
+ help: string;
99
+ }>;
100
+ export interface CommandNode {
101
+ name: string;
102
+ /** One line. See the header. */
103
+ summary: string;
104
+ /** Sits beside the name in the wizard; shorter than the summary. */
105
+ hint?: string;
106
+ options?: readonly CommandOption[];
107
+ subcommands?: readonly CommandNode[];
108
+ /**
109
+ * Offer this in the wizard only while the condition holds.
110
+ *
111
+ * For commands that are *meaningless* otherwise, not merely inconvenient:
112
+ * stopping a stack that is already stopped is the whole of the category. A
113
+ * command that would run and fail with a good message gets `needs` instead.
114
+ * See the two-line rule on `isOffered` in `environment.ts` for why hiding is
115
+ * the rarer of the two.
116
+ *
117
+ * Wizard-only. `--help`, the dispatcher and the generated reference all
118
+ * ignore this, so nothing here removes a command from the CLI.
119
+ */
120
+ when?: Condition;
121
+ /**
122
+ * Offer this always, but say on the line why it will not work right now.
123
+ *
124
+ * The four moderation commands carry it: each one opens a client against
125
+ * Supabase on this machine and has no remote path at all, so with it down
126
+ * they are a spinner followed by a connection error. The hint turns that
127
+ * into a sentence the reader sees before choosing.
128
+ */
129
+ needs?: Condition;
130
+ /**
131
+ * Which layer this acts on, for a group that spans several. See `Scope`.
132
+ *
133
+ * Groups like Supabase span the stack on this machine and the database
134
+ * inside it.
135
+ * `--help` heads a block with it; the wizard puts it on the line.
136
+ */
137
+ scope?: Scope;
138
+ /**
139
+ * Where this command may be reached.
140
+ *
141
+ * Most commands are interactive and therefore appear in both the menu and
142
+ * `--help`. `cli-only` commands still appear in help and completions, but do
143
+ * not get a GUI entry: their output is meant to be consumed by a shell.
144
+ */
145
+ surface?: "interactive" | "cli-only";
146
+ /**
147
+ * This command reads and writes no DevDogsUGA env file, database, or
148
+ * `DEPLOY_ENV` — `launch.ts` may enter plain `development` for it with no
149
+ * tier prompt and no multi-tier refusal, exactly like the hardcoded
150
+ * `setup`/`completions` bypass it already carries (see that file's
151
+ * `launch()` for why those two cannot go through ordinary tier
152
+ * resolution).
153
+ *
154
+ * Both `github rulesets` and `github settings` are the first commands to
155
+ * use this flag rather than joining that hardcoded name check: everything
156
+ * either one touches is a `gh api` call against GitHub itself, resolved
157
+ * from `--org`/`--repo` flags, not from the session's deploy tier — so
158
+ * `--tier` was never a real requirement, only an artifact of every command
159
+ * going through the same tier-resolution gate before dispatch. Marked on
160
+ * the leaf command (`rulesets`, `settings`), not the `github` group node,
161
+ * because `launch.ts` looks up the exact dispatched path.
162
+ */
163
+ envFree?: boolean;
164
+ }
165
+ /** Top-level sections. Only `--help` and the wizard's first screen use these. */
166
+ export interface CommandGroup {
167
+ title: string;
168
+ commands: readonly CommandNode[];
169
+ }
170
+ /** Standard success. */
171
+ export declare const EXIT_OK = 0;
172
+ /** Command failed. */
173
+ export declare const EXIT_FAIL = 1;
174
+ /** `--check` found drift. Distinct from failure so scripts can tell them apart. */
175
+ export declare const EXIT_DRIFT = 2;
176
+ /**
177
+ * `docs index`'s delete acknowledgment — NOT a database selector.
178
+ *
179
+ * The db namespace's old `--target local|remote` flag is retired outright
180
+ * (the SESSION names the database now — see `db/connection.ts`), but `docs
181
+ * index` keeps this spelling for a different job: its prune deletes rows,
182
+ * and running that against a non-local `DB_URL` requires saying so out
183
+ * loud. The database itself still comes from the session's env.
184
+ */
185
+ export declare const DOCS_TARGET: CommandOption;
186
+ /**
187
+ * The deployment-tier selector, for the commands that resolve a tier of
188
+ * their OWN (cron/workflows run against a chosen tier's env). The session's
189
+ * global `--tier` — `development:local|development:remote|staging|production`,
190
+ * stripped by the launcher before dispatch — is a superset of this
191
+ * vocabulary; this per-command flag still reads plain tiers.
192
+ */
193
+ export declare const TIER: CommandOption;
194
+ /** Print what would change; write nothing; exit 0. On every command that writes. */
195
+ export declare const DRY_RUN: CommandOption;
196
+ /** Verify correctness; write nothing; exit 2 on drift. */
197
+ export declare const CHECK: CommandOption;
198
+ /**
199
+ * Machine-readable output to stdout.
200
+ *
201
+ * Promptless by design: the wizard is already interactive; a flag that switches
202
+ * its output format has no meaning there. `commands.test.ts` pins the promptless
203
+ * set with a "scripting-only" category for exactly this kind of flag.
204
+ */
205
+ export declare const JSON_FLAG: CommandOption;
206
+ /** Skip every interactive confirmation prompt. On every destructive command. */
207
+ export declare const YES: CommandOption;
208
+ export declare const GROUPS: readonly CommandGroup[];
209
+ /**
210
+ * The commands the `devtools-ci` bin exposes.
211
+ *
212
+ * Kept separate from `GROUPS` because CI commands are never reached from the
213
+ * wizard and never rendered in `--help`. They live here so the docs build can
214
+ * render a CI reference page from the same declaration, and so the tests that
215
+ * guard the style guide can cover both trees without duplicating the pins.
216
+ */
217
+ export declare const CI_GROUPS: readonly CommandGroup[];
218
+ /** Every top-level command, in group order. */
219
+ export declare const TOP_LEVEL: readonly CommandNode[];
220
+ /** Every top-level CI command, in group order. */
221
+ export declare const CI_TOP_LEVEL: readonly CommandNode[];
222
+ /**
223
+ * Walks a path in the CI tree, returning `null` at the first miss.
224
+ *
225
+ * Identical to `findCommand` but over `CI_TOP_LEVEL` rather than `TOP_LEVEL`.
226
+ */
227
+ export declare function findCiCommand(path: readonly string[]): CommandNode | null;
228
+ /** The subcommand names under a CI path. */
229
+ export declare function subcommandCiNames(path: readonly string[]): string[];
230
+ /**
231
+ * Walks a path like `["env", "pull"]`, returning `null` at the first miss.
232
+ *
233
+ * Callers use `null` to mean "not a command", which is the same answer the
234
+ * dispatcher gives, so an unknown name reads the same whichever notices first.
235
+ */
236
+ export declare function findCommand(path: readonly string[]): CommandNode | null;
237
+ /** The group a top-level command sits in, for the wizard's first screen. */
238
+ export declare function groupOf(name: string): CommandGroup | undefined;
239
+ /**
240
+ * The subcommand names under a path, in the order they are declared.
241
+ *
242
+ * This is what the dispatchers in `cli.ts` validate against. A subcommand the
243
+ * tree does not declare is refused by the CLI, and an interactive one it does
244
+ * declare is in the menu. There is one list, and this reads it.
245
+ */
246
+ export declare function subcommandNames(path: readonly string[]): string[];
247
+ /** `pull, push, audit, init, example or reset`, for a refusal message. */
248
+ export declare function subcommandList(path: readonly string[]): string;
249
+ /**
250
+ * Every command path in the tree, deepest names included.
251
+ *
252
+ * Used by the coverage test, and by anything that wants to enumerate the CLI
253
+ * (the docs build's reference page is the intended second caller).
254
+ */
255
+ export declare function allPaths(): string[][];