@zuke-build/cli 0.0.0-stage → 2.6.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 (68) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +343 -2
  3. package/mod.d.ts +99 -0
  4. package/mod.js +893 -0
  5. package/package.json +35 -4
  6. package/src/binary_launcher.d.ts +49 -0
  7. package/src/binary_launcher.js +327 -0
  8. package/src/binary_pin.d.ts +47 -0
  9. package/src/binary_pin.js +117 -0
  10. package/src/build_file.d.ts +25 -0
  11. package/src/build_file.js +65 -0
  12. package/src/cache.d.ts +23 -0
  13. package/src/cache.js +26 -0
  14. package/src/deno_isolated.d.ts +14 -0
  15. package/src/deno_isolated.js +70 -0
  16. package/src/deno_path.d.ts +115 -0
  17. package/src/deno_path.js +205 -0
  18. package/src/deno_pin.d.ts +37 -0
  19. package/src/deno_pin.js +32 -0
  20. package/src/dependencies.d.ts +48 -0
  21. package/src/dependencies.js +80 -0
  22. package/src/dispatch.d.ts +220 -0
  23. package/src/dispatch.js +538 -0
  24. package/src/embedded_engine.d.ts +28 -0
  25. package/src/embedded_engine.js +21 -0
  26. package/src/engine_pin.d.ts +56 -0
  27. package/src/engine_pin.js +196 -0
  28. package/src/fs.d.ts +14 -0
  29. package/src/fs.js +25 -0
  30. package/src/import.d.ts +132 -0
  31. package/src/import.js +289 -0
  32. package/src/install_source.d.ts +79 -0
  33. package/src/install_source.js +104 -0
  34. package/src/launcher.d.ts +37 -0
  35. package/src/launcher.js +464 -0
  36. package/src/mcp_config.d.ts +63 -0
  37. package/src/mcp_config.js +86 -0
  38. package/src/output.d.ts +38 -0
  39. package/src/output.js +43 -0
  40. package/src/paint.d.ts +42 -0
  41. package/src/paint.js +38 -0
  42. package/src/project.d.ts +69 -0
  43. package/src/project.js +132 -0
  44. package/src/pyproject.d.ts +30 -0
  45. package/src/pyproject.js +156 -0
  46. package/src/python_build.d.ts +27 -0
  47. package/src/python_build.js +197 -0
  48. package/src/records.d.ts +9 -0
  49. package/src/records.js +13 -0
  50. package/src/relock.d.ts +11 -0
  51. package/src/relock.js +182 -0
  52. package/src/setup.d.ts +251 -0
  53. package/src/setup.js +601 -0
  54. package/src/star.d.ts +44 -0
  55. package/src/star.js +100 -0
  56. package/src/starter.d.ts +55 -0
  57. package/src/starter.js +126 -0
  58. package/src/toml.d.ts +32 -0
  59. package/src/toml.js +354 -0
  60. package/src/translate.d.ts +69 -0
  61. package/src/translate.js +198 -0
  62. package/src/upgrade.d.ts +113 -0
  63. package/src/upgrade.js +344 -0
  64. package/src/version.d.ts +11 -0
  65. package/src/version.js +13 -0
  66. package/src/version_report.d.ts +55 -0
  67. package/src/version_report.js +187 -0
  68. package/zuke.js +8 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Zuke contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,344 @@
1
- # Temporary Holding Version
1
+ # @zuke/cli
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The `zuke` command-line tool — scaffold
4
+ [Zuke](https://github.com/zuke-build/zuke#readme) into any project.
5
+
6
+ ```sh
7
+ deno install -A -g -n zuke jsr:@zuke/cli
8
+ zuke setup
9
+ zuke setup --sdk python # a build.py, with launchers that run the zuke binary: no Deno
10
+ zuke upgrade # later: move the installed CLI to the latest release
11
+ zuke upgrade --engine # or move a Python project to the latest zuke release
12
+ ```
13
+
14
+ The same CLI also ships as a standalone binary that needs no Deno up front:
15
+ `brew install zuke-build/tap/zuke` on macOS and Linux, and `choco install zuke`
16
+ on Windows (not Authenticode-signed yet). Update those with `brew upgrade zuke`
17
+ or `choco upgrade zuke`. See
18
+ [installing](https://github.com/zuke-build/zuke/blob/master/docs/install.md). A
19
+ Python project runs on that binary alone: its launchers download the pinned
20
+ release, checksum-verified, so neither it nor its CI ever needs Deno.
21
+
22
+ <!-- ZUKE:API:START -->
23
+
24
+ ## API
25
+
26
+ <details>
27
+ <summary>Full typed API — generated from <code>deno doc</code></summary>
28
+
29
+ ````text
30
+ `@zuke/cli` — the `zuke` command. Install it globally with
31
+
32
+ ```sh
33
+ deno install -A -g -n zuke jsr:@zuke/cli
34
+ ```
35
+
36
+ scaffold Zuke into any project with `zuke setup`, then run its build from
37
+ anywhere inside the project with `zuke <target>`: every command that is not
38
+ the CLI's own (`setup`, `import`, `doc`, `upgrade`, and the project
39
+ commands `add`, `remove`, `cache` and `relock`) is forwarded to the
40
+ nearest `zuke.ts`, exactly as the `./zuke` launcher would run it. Update the
41
+ installed CLI itself with `zuke upgrade`, and manage a project's
42
+ dependencies and lock with `zuke add`, `remove`, `cache` and `relock`.
43
+ @module
44
+
45
+ function binaryMain(args: string[], engine: EmbeddedEngine): Promise<number>
46
+ The compiled `zuke` binary's entry point: {@link main} with every default
47
+ and the `engine` the binary carries, so a project with no `zuke.ts` runs on
48
+ it with no Deno installed.
49
+
50
+ async function main(args: string[], host: SetupHost, prompter: Prompter, docRunner: DocRunner, starActions: StarActions, buildRunner: BuildRunner, buildProbe: BuildProbe, upgradeHost: UpgradeHost, projectHost: ProjectHost, engine?: EmbeddedEngine): Promise<number>
51
+ The CLI entry point. Returns a process exit code; `host`, `prompter`,
52
+ `docRunner`, `starActions`, `buildRunner`, `buildProbe`, `upgradeHost` and
53
+ `projectHost` are injectable for testing. `engine` is the engine the
54
+ compiled binary carries, absent under `deno run`: see {@link binaryMain}.
55
+
56
+ function parseImportFlags(args: string[]): ImportFlags
57
+ Parse the argument list following `zuke import`.
58
+
59
+ function parseSetupFlags(args: string[]): SetupFlags
60
+ Parse the argument list following `zuke setup`.
61
+
62
+ const EMBEDDED_ENGINE_ENV: "ZUKE_EMBEDDED_ENGINE"
63
+ Set to `1` in the environment of the process that runs a hosted build on
64
+ the binary's own engine: the compiled entry reads it, before the CLI does,
65
+ and removes it, so nothing the build starts inherits it.
66
+
67
+ const FORWARDED_ENV: "ZUKE_FORWARDED"
68
+ Set to `1` in a launcher's environment, so a launcher that itself calls the
69
+ global `zuke` gets the bare `deno run` instead of itself again, endlessly.
70
+
71
+ const defaultPrompter: Prompter
72
+ The real {@link Prompter}, backed by Deno's `prompt`/`confirm`.
73
+
74
+ interface BinaryPin
75
+ The pinned `zuke` release, the engine inside it, and each archive's digest.
76
+
77
+ readonly version: string
78
+ The release, without the tag's `cli-v` prefix, e.g. `"2.4.0"`.
79
+ readonly engine: string
80
+ The `@zuke/engine` release compiled into it.
81
+ readonly checksums: Readonly<Record<BinaryTarget, string>>
82
+ Lowercase hex SHA-256 of each target's archive.
83
+
84
+ interface BuildLocation
85
+ Where a forwarded command runs, and how.
86
+
87
+ root: string
88
+ The absolute repository root: the directory holding `zuke.json`.
89
+ frozen: boolean
90
+ Whether a `deno.lock` sits at the root, so the run passes `--frozen`.
91
+ launcher: string | null
92
+ The absolute path of the executable `zuke` launcher at the root, run in
93
+ place of `deno run` — or `null` when there is none, or the platform
94
+ reports no file mode to tell (Windows).
95
+ build: string
96
+ The build file's name: the one the root's `zuke.json` names in its
97
+ `build` field, `zuke.ts` when it names none.
98
+ engine: string | null
99
+ The `@zuke/engine` release that runs the build when the root has no
100
+ build file: the `engine` field of its `zuke.json`, which then describes a
101
+ build another SDK hosts. `null` when the root has its own build file.
102
+
103
+ interface BuildProbe
104
+ The filesystem questions discovery asks, injectable so the walk and its
105
+ trust gate are testable without a filesystem or a second user.
106
+
107
+ exists(path: string): Promise<boolean>
108
+ Whether a path exists (the link itself, not its target).
109
+ ownership(path: string): Promise<Ownership | null>
110
+ The owner and mode of what a path resolves to, or `null` when nothing is
111
+ there.
112
+ realPath(path: string): Promise<string>
113
+ The path with every link resolved.
114
+ readLink(path: string): Promise<string | null>
115
+ The target a symlink names, exactly as written in the link (possibly
116
+ relative to the link's directory), or `null` when `path` is not a link.
117
+ uid(): number | null
118
+ The current user's numeric id, or `null` where the platform has none.
119
+ readText(path: string): Promise<string>
120
+ The text of a file.
121
+
122
+ interface EmbeddedEngine
123
+ The engine a compiled `zuke` carries, as its entry point describes it.
124
+
125
+ readonly version: string
126
+ The `@zuke/engine` release compiled in, such as `1.3.0`.
127
+ readonly program: string
128
+ The executable to start in engine mode: the binary itself.
129
+ serves(pin: string): boolean
130
+ Whether the compiled-in release serves the one `zuke.json` pins.
131
+
132
+ interface EnginePinHost
133
+ What moving the pin reaches outside the process, injectable for tests.
134
+
135
+ entry(path: string): Promise<"file" | "missing" | "other">
136
+ What is at `path`, not following a link: a regular `file`, nothing
137
+ (`missing`), or `other` — a directory, or a link, which a write would
138
+ follow out of the project.
139
+ readText(path: string): Promise<string>
140
+ Read a regular text file.
141
+ writeText(path: string, text: string): Promise<void>
142
+ Write a text file, replacing what is there.
143
+ cliMeta(): Promise<unknown>
144
+ Fetch and parse `@zuke/cli`'s JSR `meta.json`, whose latest is the newest zuke.
145
+ binaryPin(version: string): Promise<BinaryPin>
146
+ Resolve the pin of a `zuke` release.
147
+
148
+ interface ImportFlags extends SetupFlags
149
+ Flags accepted by `zuke import` — the setup flags plus `--from`.
150
+
151
+ from?: ImportSource
152
+ Force a source (`package.json`, `makefile` or `pyproject`); auto-detected
153
+ when unset.
154
+
155
+ interface InstallHost
156
+ The process facts {@link installSource} reads, injectable so each install
157
+ kind is testable from a single process.
158
+
159
+ standalone(): boolean
160
+ Whether this process is a `deno compile` binary (`Deno.build.standalone`).
161
+ mainModule(): string
162
+ The running CLI's main module (`Deno.mainModule`). Deno reports a JSR
163
+ program by its specifier, `jsr:@zuke/cli` or `jsr:@zuke/cli@<version>`.
164
+ execPath(): string
165
+ The running executable's path (`Deno.execPath()`).
166
+ realPath(path: string): Promise<string>
167
+ `path` with every symbolic link resolved (`Deno.realPath`).
168
+
169
+ interface Ownership
170
+ What the trust gate needs to know about a filesystem entry.
171
+
172
+ uid: number | null
173
+ The numeric owner, or `null` where the platform reports none (Windows).
174
+ mode: number | null
175
+ The permission bits, or `null` where the platform reports none.
176
+
177
+ interface ProjectHost
178
+ What the project commands reach outside the process, injectable so they
179
+ are testable without a real `deno`.
180
+
181
+ entry(path: string): Promise<"file" | "missing" | "other">
182
+ What is at `path`, not following a link: a regular `file`, nothing
183
+ (`missing`), or `other` — a directory, or a link, which a write would
184
+ follow out of the project.
185
+ readText(path: string): Promise<string>
186
+ Read a text file, rejecting when it cannot be read.
187
+ writeText(path: string, text: string): Promise<void>
188
+ Write a text file, replacing what is there.
189
+ remove(path: string): Promise<void>
190
+ Remove a file.
191
+ deno(denoArgs: string[], cwd: string): Promise<number>
192
+ Run `deno <denoArgs>` in `cwd`, returning its exit code.
193
+ denoVersion(): string
194
+ The version of the Deno that runs the command.
195
+
196
+ interface Prompter
197
+ The interactive surface, injectable so the wizard is testable without a TTY.
198
+
199
+ interactive(): boolean
200
+ Whether prompts should be shown (i.e. stdin is a terminal).
201
+ ask(question: string, fallback: string): string
202
+ Ask a free-text question, returning `fallback` if unanswered.
203
+ confirm(question: string): boolean
204
+ Ask a yes/no question.
205
+
206
+ interface SdkSetupOptions
207
+ What `--sdk python` scaffolds against.
208
+
209
+ pin: BinaryPin
210
+ The `zuke` release the launchers run; `zuke.json` pins the engine it
211
+ carries.
212
+
213
+ interface SetupFlags
214
+ Flags accepted by `zuke setup`.
215
+
216
+ force: boolean
217
+ Overwrite existing files.
218
+ yes: boolean
219
+ Skip prompts and accept defaults.
220
+ name?: string
221
+ Build class name for the starter build file.
222
+ buildFile?: string
223
+ The TypeScript build file's name (`--build-file`). Unset: ask, else `build.ts`.
224
+ dir?: string
225
+ Directory to scaffold into (defaults to the current directory).
226
+ launcherName?: string
227
+ Base name for the launcher scripts, when `zuke` is taken by a directory.
228
+ mcp: boolean
229
+ Also write `.mcp.json`, registering the build's MCP server for agent clients.
230
+ allowRun: boolean
231
+ Register that server with `--allow-run`, so the agent may execute targets. Implies `mcp`.
232
+ bootstrapDeno?: boolean
233
+ Which launchers to scaffold: `true` (`--bootstrap`) for ones that
234
+ download their pinned, checksum-verified runtime when it is missing —
235
+ Deno for a `zuke.ts` build, the `zuke` binary for a hosted one — `false`
236
+ (`--no-bootstrap`) for ones that require it on `PATH` and fail closed.
237
+ Unset: ask when interactive, else take the default (bootstrap).
238
+ sdk?: string
239
+ The SDK whose build to scaffold (`--sdk python`): a `build.py` the engine
240
+ runs, in place of a `zuke.ts`. Unset: a TypeScript build.
241
+ zuke?: string
242
+ The `zuke` release an SDK build's launchers run (`--zuke`), whose engine
243
+ `zuke.json` pins. Unset: this zuke's own release.
244
+
245
+ interface SetupHost
246
+ Injected side effects, so {@link runSetup} is unit-testable.
247
+
248
+ exists(path: string): Promise<boolean>
249
+ Whether a path exists.
250
+ isDirectory(path: string): Promise<boolean>
251
+ Whether a path exists and is a directory (a reserved-name collision).
252
+ isSymlink(path: string): Promise<boolean>
253
+ Whether a path is a symbolic link, without following it. Scaffolding
254
+ refuses to write through one: the writes below follow links, so a link
255
+ planted at a scaffold name by the very repository being set up would
256
+ redirect them outside the target directory.
257
+
258
+ The guard covers the names scaffolding chooses, which is where the hazard
259
+ is — the caller never asked for `.gitignore` to be written, so a repository
260
+ redirecting it is a decision nobody made. It reports what is there when it
261
+ runs, and a link planted after it would escape it; that is why
262
+ {@link SetupHost.writeText} does not write through a link either, so the
263
+ refusal is the friendly answer rather than the only defence.
264
+
265
+ Two things stay out of scope. The directory the caller names with `--dir`
266
+ is the caller's to name, symlink or not. And a hard link is
267
+ indistinguishable from the file it shares, so no probe can see one; git
268
+ cannot check one out either, which is what keeps it out of the threat this
269
+ guards.
270
+ readText(path: string): Promise<string>
271
+ Read a file as UTF-8 text.
272
+ isTerminal?(): boolean
273
+ Whether stdout is an interactive terminal, which decides whether the
274
+ CLI's own output is rich. Optional: an implementation without it is
275
+ asked through Deno, the way every other process decides.
276
+ writeText(path: string, content: string): Promise<void>
277
+ Write UTF-8 text to a file, creating or replacing it.
278
+
279
+ An implementation must not write through a symbolic link standing at
280
+ `path`: the scaffolder's confinement to its target directory rests on this,
281
+ and the pre-write {@link SetupHost.isSymlink} check alone cannot carry it,
282
+ since a link can appear after the check.
283
+ chmod(path: string, mode: number): Promise<void>
284
+ Set a file's permission bits (may be unsupported on some platforms).
285
+ log(message: string): void
286
+ Emit a line of progress output.
287
+
288
+ interface StarActions
289
+ The side effects behind {@link promptStar}, injectable so tests never spawn
290
+ `gh` or a browser.
291
+
292
+ ghAuthenticated(): Promise<boolean>
293
+ Whether the `gh` CLI is installed and holds a login.
294
+ starWithGh(): Promise<void>
295
+ Star the Zuke repository through `gh api`.
296
+ openBrowser(url: string): Promise<boolean>
297
+ Open `url` in the default browser; `false` when it could not launch.
298
+
299
+ interface UpgradeHost extends InstallHost
300
+ What `zuke upgrade` reaches outside the process, injectable so the
301
+ command is testable without the network or a real reinstall.
302
+
303
+ binDir(): string | undefined
304
+ The directory `deno install -g` installs into (`<root>/bin`):
305
+ `DENO_INSTALL_ROOT`, else `~/.deno`, as Deno resolves it. `undefined`
306
+ when the environment names neither as an absolute path.
307
+ exists(path: string): Promise<boolean>
308
+ Whether `path` exists.
309
+ windows(): boolean
310
+ Whether this is Windows, where the running shim is a `.cmd` file.
311
+ meta(): Promise<unknown>
312
+ Fetch and parse `@zuke/cli`'s JSR `meta.json`.
313
+ binaryPin(version: string): Promise<BinaryPin>
314
+ Resolve the pin of `zuke` release `version`, which `zuke setup --sdk`
315
+ scaffolds a hosted build's launchers with and `zuke upgrade --engine`
316
+ moves them to: its archives' digests and the engine it carries.
317
+ install(denoArgs: string[]): Promise<number>
318
+ Run `deno <denoArgs>` to reinstall, returning its exit code.
319
+ denoVersion(): string
320
+ The version of the Deno that runs the reinstall: the one running this
321
+ CLI, since `zuke upgrade` only ever runs from a JSR install under Deno.
322
+ readText(path: string): Promise<string>
323
+ Read a text file, rejecting when it cannot be read.
324
+
325
+ type BinaryTarget = "aarch64-apple-darwin" | "x86_64-apple-darwin" | "aarch64-unknown-linux-gnu" | "x86_64-unknown-linux-gnu" | "x86_64-pc-windows-msvc"
326
+ A platform a `zuke` release ships a binary for, as its archive names it.
327
+
328
+ type BuildRunner = (root: string, args: string[], program?: string, env?: Readonly<Record<string, string>>) => Promise<number>
329
+ Runs `program <args>` from `root` — Deno when `program` is omitted, else the
330
+ project's launcher at that path — and resolves to its exit code: the
331
+ injectable subprocess seam, so the forwarding is testable without a build.
332
+ `env` adds variables to the environment the child inherits.
333
+
334
+ type DocRunner = (denoArgs: string[]) => Promise<number>
335
+ Runs `deno doc <args>` — the injectable subprocess seam for
336
+ {@link commandDoc}, so the command is testable without spawning `deno`.
337
+
338
+ type ImportSource = "package.json" | "Makefile" | "pyproject.toml"
339
+ The kinds of project `zuke import` can read.
340
+ ````
341
+
342
+ </details>
343
+
344
+ <!-- ZUKE:API:END -->
package/mod.d.ts ADDED
@@ -0,0 +1,99 @@
1
+ import { type SetupHost } from "./src/setup.ts";
2
+ import { type ImportSource } from "./src/import.ts";
3
+ import { type StarActions } from "./src/star.ts";
4
+ import { type BuildProbe, type BuildRunner } from "./src/dispatch.ts";
5
+ import type { EmbeddedEngine } from "./src/embedded_engine.ts";
6
+ import { type UpgradeHost } from "./src/upgrade.ts";
7
+ import { type ProjectHost } from "./src/project.ts";
8
+ export type { SetupHost } from "./src/setup.ts";
9
+ export { EMBEDDED_ENGINE_ENV, type EmbeddedEngine, } from "./src/embedded_engine.ts";
10
+ export type { ImportSource } from "./src/import.ts";
11
+ export type { StarActions } from "./src/star.ts";
12
+ export type { InstallHost } from "./src/install_source.ts";
13
+ export type { UpgradeHost } from "./src/upgrade.ts";
14
+ export type { EnginePinHost } from "./src/engine_pin.ts";
15
+ export type { SdkSetupOptions } from "./src/setup.ts";
16
+ export type { BinaryPin, BinaryTarget } from "./src/binary_pin.ts";
17
+ export type { ProjectHost } from "./src/project.ts";
18
+ export type { BuildLocation, BuildProbe, BuildRunner, Ownership, } from "./src/dispatch.ts";
19
+ export { FORWARDED_ENV } from "./src/dispatch.ts";
20
+ /**
21
+ * The interactive surface, injectable so the wizard is testable without a TTY.
22
+ */
23
+ export interface Prompter {
24
+ /** Whether prompts should be shown (i.e. stdin is a terminal). */
25
+ interactive(): boolean;
26
+ /** Ask a free-text question, returning `fallback` if unanswered. */
27
+ ask(question: string, fallback: string): string;
28
+ /** Ask a yes/no question. */
29
+ confirm(question: string): boolean;
30
+ }
31
+ /** The real {@link Prompter}, backed by Deno's `prompt`/`confirm`. */
32
+ export declare const defaultPrompter: Prompter;
33
+ /** Flags accepted by `zuke setup`. */
34
+ export interface SetupFlags {
35
+ /** Overwrite existing files. */
36
+ force: boolean;
37
+ /** Skip prompts and accept defaults. */
38
+ yes: boolean;
39
+ /** Build class name for the starter build file. */
40
+ name?: string;
41
+ /** The TypeScript build file's name (`--build-file`). Unset: ask, else `build.ts`. */
42
+ buildFile?: string;
43
+ /** Directory to scaffold into (defaults to the current directory). */
44
+ dir?: string;
45
+ /** Base name for the launcher scripts, when `zuke` is taken by a directory. */
46
+ launcherName?: string;
47
+ /** Also write `.mcp.json`, registering the build's MCP server for agent clients. */
48
+ mcp: boolean;
49
+ /** Register that server with `--allow-run`, so the agent may execute targets. Implies `mcp`. */
50
+ allowRun: boolean;
51
+ /**
52
+ * Which launchers to scaffold: `true` (`--bootstrap`) for ones that
53
+ * download their pinned, checksum-verified runtime when it is missing —
54
+ * Deno for a `zuke.ts` build, the `zuke` binary for a hosted one — `false`
55
+ * (`--no-bootstrap`) for ones that require it on `PATH` and fail closed.
56
+ * Unset: ask when interactive, else take the default (bootstrap).
57
+ */
58
+ bootstrapDeno?: boolean;
59
+ /**
60
+ * The SDK whose build to scaffold (`--sdk python`): a `build.py` the engine
61
+ * runs, in place of a `zuke.ts`. Unset: a TypeScript build.
62
+ */
63
+ sdk?: string;
64
+ /**
65
+ * The `zuke` release an SDK build's launchers run (`--zuke`), whose engine
66
+ * `zuke.json` pins. Unset: this zuke's own release.
67
+ */
68
+ zuke?: string;
69
+ }
70
+ /** Parse the argument list following `zuke setup`. */
71
+ export declare function parseSetupFlags(args: string[]): SetupFlags;
72
+ /** Flags accepted by `zuke import` — the setup flags plus `--from`. */
73
+ export interface ImportFlags extends SetupFlags {
74
+ /**
75
+ * Force a source (`package.json`, `makefile` or `pyproject`); auto-detected
76
+ * when unset.
77
+ */
78
+ from?: ImportSource;
79
+ }
80
+ /** Parse the argument list following `zuke import`. */
81
+ export declare function parseImportFlags(args: string[]): ImportFlags;
82
+ /**
83
+ * Runs `deno doc <args>` — the injectable subprocess seam for
84
+ * {@link commandDoc}, so the command is testable without spawning `deno`.
85
+ */
86
+ export type DocRunner = (denoArgs: string[]) => Promise<number>;
87
+ /**
88
+ * The CLI entry point. Returns a process exit code; `host`, `prompter`,
89
+ * `docRunner`, `starActions`, `buildRunner`, `buildProbe`, `upgradeHost` and
90
+ * `projectHost` are injectable for testing. `engine` is the engine the
91
+ * compiled binary carries, absent under `deno run`: see {@link binaryMain}.
92
+ */
93
+ export declare function main(args: string[], host?: SetupHost, prompter?: Prompter, docRunner?: DocRunner, starActions?: StarActions, buildRunner?: BuildRunner, buildProbe?: BuildProbe, upgradeHost?: UpgradeHost, projectHost?: ProjectHost, engine?: EmbeddedEngine): Promise<number>;
94
+ /**
95
+ * The compiled `zuke` binary's entry point: {@link main} with every default
96
+ * and the `engine` the binary carries, so a project with no `zuke.ts` runs on
97
+ * it with no Deno installed.
98
+ */
99
+ export declare function binaryMain(args: string[], engine: EmbeddedEngine): Promise<number>;