diff --git a/AGENTS.md b/AGENTS.md index c0ae955c..6d163820 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -190,20 +190,37 @@ can't see Deno's module graph. not later. Prefer reusing core primitives (`FileTasks`, `glob`/`globToRegExp`, the `$`/`Command` shell, the HTTP helpers) over re-implementing them in a package. -9. **Configuration is a fluent settings lambda, not an options object.** When an - API takes more than a trivial amount of configuration, expose it as a - chainable settings class configured through a lambda — the - `Configure = (s: S) => S` shape the tool wrappers use — not a positional - options bag. Prefer - `.lock((s) => s.lockKey("deploy", repo).withTtl("4h").onConflict(...))` over - `.lock(key, { ttl, onConflict })`. Each setter returns `this`, the fields use - the trailing-underscore internal convention (and are still JSDoc'd), and the - lambda defers evaluation until call time — so a value derived from - `this..value` sees the resolved value. This keeps the whole authoring - surface consistent with `DenoTasks.test((s) => …)`, `service()`, and the CI - builder, and lets options grow without churning call sites. A single required - scalar (a path, a name) can still be a direct argument; reach for the lambda - once there are options to set. +9. **Every source file starts with the copyright and license header.** ALL new + files — every `.ts` file (tests, fixtures, and generated-file _templates_ + included), and any launcher or script — open with these two lines (after the + shebang, where one exists), before everything else: + + ```ts + // Copyright (c) 2026 the Zuke contributors + // SPDX-License-Identifier: MIT + ``` + + Shell/PowerShell files use `#` comments for the same two lines. This is the + per-file copyright and license identification the OpenSSF Best Practices + criteria require, and it is enforced: `tests/license_headers_test.ts` fails + the suite on any source file missing the header. A generated file gets its + header from its template (see `internal/hcl_tool.ts.tmpl`) — put the header + in the template, never hand-edit generated output. + +10. **Configuration is a fluent settings lambda, not an options object.** When + an API takes more than a trivial amount of configuration, expose it as a + chainable settings class configured through a lambda — the + `Configure = (s: S) => S` shape the tool wrappers use — not a positional + options bag. Prefer + `.lock((s) => s.lockKey("deploy", repo).withTtl("4h").onConflict(...))` over + `.lock(key, { ttl, onConflict })`. Each setter returns `this`, the fields + use the trailing-underscore internal convention (and are still JSDoc'd), and + the lambda defers evaluation until call time — so a value derived from + `this..value` sees the resolved value. This keeps the whole authoring + surface consistent with `DenoTasks.test((s) => …)`, `service()`, and the CI + builder, and lets options grow without churning call sites. A single + required scalar (a path, a name) can still be a direct argument; reach for + the lambda once there are options to set. ## Testing diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5e51e178..f534b23c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -96,6 +96,38 @@ the squash commit that [release-please](./RELEASING.md) parses. 5. Update `README.md`, JSDoc, and the relevant docs in `docs/` whenever behaviour changes. +## Code review + +Every change reaches `master` through a pull request — there is no direct +push path — and review has documented requirements: + +**How review is conducted.** Each PR is reviewed by (1) the required CI gate +(`deno task ci`, the same gate you run locally), (2) the AI reviewers, which +post a security assessment and a code-quality assessment as PR comments, and +(3) a human maintainer, who reads the diff and every reviewer finding. AI +findings are advisory: a maintainer addresses each one or answers it on the +thread, quoting the finding's id — they never merge unexamined. + +**What must be checked.** Reviewers verify that the change: + +- is correct, and covered by tests per the testing policy above (unit + + integration in the same PR; e2e for cross-process or cross-OS behaviour); +- introduces no security regression (injection, privilege escalation, secret + exposure — see the + [assurance case](./docs/assurance-case.md) for the boundaries to respect); +- meets the coding standards above (strict types, no `any`/`as`/`!`, JSDoc on + all public symbols) and keeps coverage at 95%+; +- updates the affected docs in the same PR, and regenerates the API docs on + any public-API change; +- carries a Conventional Commit PR title, since the squash subject is what + release-please parses. + +**What is required to be acceptable.** A PR merges only when the required +status checks are green, every AI-reviewer finding has been fixed or answered, +and a maintainer approves. Larger features additionally get an adversarial +review pass before the PR is finalized (see +[`AGENTS.md`](./AGENTS.md#adversarial-review-every-feature)). + ## Reporting bugs and requesting features - Search [existing issues](https://github.com/zuke-build/zuke/issues) first. diff --git a/build/action_pins.ts b/build/action_pins.ts index 60041ca0..5e8031f0 100644 --- a/build/action_pins.ts +++ b/build/action_pins.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Where the pinned GitHub Action SHAs come from once the workflows are * generated: the root `action.yml` manifest, which the generator never writes. diff --git a/build/action_release.ts b/build/action_release.ts index c7d68db9..d86335fb 100644 --- a/build/action_release.ts +++ b/build/action_release.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Versioning for the repository's own composite action — the `zuke-build/zuke` * listing on the GitHub Marketplace. diff --git a/build/api_reference.ts b/build/api_reference.ts index 2229e3a6..1499a111 100644 --- a/build/api_reference.ts +++ b/build/api_reference.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + // --------------------------------------------------------------------------- // api.json — structured API reference for the website (`./zuke apiReference`). // diff --git a/build/core_floor.ts b/build/core_floor.ts index 308f902f..ac2077a8 100644 --- a/build/core_floor.ts +++ b/build/core_floor.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The `@zuke/core` version-floor check. * diff --git a/build/docs.ts b/build/docs.ts index b35d2e6c..3f4c5f6d 100644 --- a/build/docs.ts +++ b/build/docs.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Agent-doc generation: the project framing and options for `@zuke/docs`, the * per-package doc/doc-lint collectors, and the CLI-block injection that keeps diff --git a/build/gitleaks_report.ts b/build/gitleaks_report.ts index dc47c771..5bef6b7a 100644 --- a/build/gitleaks_report.ts +++ b/build/gitleaks_report.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Renders gitleaks' redacted JSON report as a job-summary table. * @@ -106,10 +109,13 @@ function visible(ch: string): string { /** * Escape what would break out of a Markdown table cell: the pipe that separates * cells, and any control character that would end the row outright. + * Backslashes are escaped first, so a value's own backslash can neither pose + * as one of the escapes added here nor swallow the one added before a pipe. */ function cell(value: string): string { if (value === "") return "—"; return value + .replace(/\\/g, "\\\\") // deno-lint-ignore no-control-regex -- catching these is the point. .replace(/[\u0000-\u001f\u007f]/g, visible) .replace(/\|/g, "\\|"); diff --git a/build/hcl_gen.ts b/build/hcl_gen.ts index dbcabb9b..c64bd6f0 100644 --- a/build/hcl_gen.ts +++ b/build/hcl_gen.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Single-source generator for the Terraform and OpenTofu wrappers. `@zuke/tofu` * is a near-verbatim twin of `@zuke/terraform` — OpenTofu mirrors Terraform's diff --git a/build/lock_check.ts b/build/lock_check.ts index 839a1368..9fe688d4 100644 --- a/build/lock_check.ts +++ b/build/lock_check.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The gate's lock-integrity check. * diff --git a/build/packages.ts b/build/packages.ts index 39752ca4..af67e872 100644 --- a/build/packages.ts +++ b/build/packages.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Workspace package metadata: the ordered package list and the helpers that * read each package's entrypoints and declared version from its `deno.json`. diff --git a/build/plugin_sync.ts b/build/plugin_sync.ts index 21d4c174..d87bb646 100644 --- a/build/plugin_sync.ts +++ b/build/plugin_sync.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Syncs `skills/` into `plugins/zuke/skills/` as real, committed file copies * rather than a symlink: a symlink survives a POSIX clone, but a Windows diff --git a/build/plugin_version_check.ts b/build/plugin_version_check.ts index c2b9a41b..2bda6334 100644 --- a/build/plugin_version_check.ts +++ b/build/plugin_version_check.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The gate's plugin-version check. * diff --git a/build/pr_body_lint.ts b/build/pr_body_lint.ts index e2d65e6b..1a96fcaa 100644 --- a/build/pr_body_lint.ts +++ b/build/pr_body_lint.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Lints a pull request body for the code fragments that break * release-please's conventional-commits parser (see `RELEASING.md`'s "Keep diff --git a/build/publish.ts b/build/publish.ts index e0a581bd..3d84ddec 100644 --- a/build/publish.ts +++ b/build/publish.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Release/publish helpers: where build-time CLIs are installed, the on-demand * CLI installer, and the timeout-guarded JSR publish for one package. diff --git a/build/scanners.ts b/build/scanners.ts index f0ef7d10..eefb56aa 100644 --- a/build/scanners.ts +++ b/build/scanners.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The supply-chain scanners behind the `security` target, declared as pinned * toolchain entries so the build provisions them itself. diff --git a/build/snippets.ts b/build/snippets.ts index 892c8cd4..90d7c45e 100644 --- a/build/snippets.ts +++ b/build/snippets.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Type-check the ```ts snippets in the docs and skills that are explicitly * marked for checking, so an example an agent pastes can't silently drift from diff --git a/build/website_sync.ts b/build/website_sync.ts index e92bb789..01ab397d 100644 --- a/build/website_sync.ts +++ b/build/website_sync.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The release → website sync: regenerate the docs the website consumes * (llms.txt / llms-full.txt + api.json), then open (or refresh) a PR against diff --git a/build/website_tools.ts b/build/website_tools.ts index 7a74c1e3..6864bf6a 100644 --- a/build/website_tools.ts +++ b/build/website_tools.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The landing page's package catalogue, and the generator that renders it into * the website's `src/data/tools.ts`. diff --git a/build/workflows.ts b/build/workflows.ts index 2881827d..56c30db4 100644 --- a/build/workflows.ts +++ b/build/workflows.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Zuke's own GitHub workflows, declared as targets to run. * diff --git a/docs/README.md b/docs/README.md index a22ca4f6..9260b0b5 100644 --- a/docs/README.md +++ b/docs/README.md @@ -55,6 +55,8 @@ - [Security assurance case](./assurance-case.md) — the threat model, trust boundaries, and why the security requirements in [`SECURITY.md`](../SECURITY.md) are met. +- [Security review](./security-review.md) — the performed security reviews: + scope, method, findings, and outcomes. - [How Zuke compares](./comparison.md) — a capability matrix against `deno task`, npm scripts, Make, Nx, Turborepo, and Dagger, on the capabilities Zuke provides. diff --git a/docs/security-review.md b/docs/security-review.md new file mode 100644 index 00000000..6fb1207a --- /dev/null +++ b/docs/security-review.md @@ -0,0 +1,65 @@ +# Security review + +The security reviews this project has performed: their scope, method, +findings, and outcomes. Each review considers the security requirements and +the trust boundaries defined in the +[assurance case](./assurance-case.md) — the requirements say what must hold; +a review checks that the implementation actually holds it. + +## 2026 review — MCP authorization and audit surface + +**When:** 2026 (pre-release adversarial pass). **Who:** the project lead, with +independent AI adversarial reviewers attacking each dimension; every candidate +finding was verified against the real code path before being accepted. + +**Scope:** the MCP server's authorization and audit surface — the boundary +where an external AI agent is allowed to inspect and (optionally) execute +build targets — reviewed against the requirements that authorization is +enforced on every path and that secrets never reach output. + +**Method:** adversarial review as described in +[`AGENTS.md`](../AGENTS.md#adversarial-review-every-feature): independent +reviewers attempted bypasses, leaks, race conditions, unhandled throws, and +untested security branches; findings were reproduced against the code +(defaulting to refuted when a reproduction failed). + +**Confirmed findings, all fixed before the change shipped, each with a +regression test:** + +1. An **authorization bypass** — a path that reached target execution without + passing the authorization check. +2. A **secret-redaction gap** — a route by which a secret value could reach + output without being redacted. +3. A **transport-crashing throw** — an unhandled error that could take down + the MCP transport, a denial-of-service defect. + +All three had passed lint, strict type-checking, and the 95% coverage gate — +which is why the project treats adversarial review as a standing requirement +for every feature, not a one-time event. + +## 2026 review — supply-chain posture and workflow surface + +**When:** August 2026. **Who:** the project lead with AI-assisted review. + +**Scope:** the CI/CD and release surface against the supply-chain security +requirements: workflow token scopes, egress policy, action pinning, publish +credentials, and the bootstrap path. + +**Outcome:** the posture documented in [`SECURITY.md`](../SECURITY.md) and +justified in the [assurance case](./assurance-case.md) — least-privilege +per-job tokens, blocked egress on write-scoped jobs, SHA-pinned actions, +OIDC-only publishing with Sigstore provenance — plus the CodeQL workflow +(security queries over the sources and the `actions` pack over the workflow +YAML) added as a standing static-analysis lane, and the OpenSSF Scorecard +run publishing its findings to code scanning. Documentation that had drifted +from the implemented posture (the CodeQL setup guidance) was corrected as a +finding of this review. + +## Standing review, between the point-in-time ones + +Every pull request receives an AI security assessment posted to the thread, +CodeQL analysis, and the scanner gate (zizmor, actionlint, gitleaks); every +feature receives the adversarial pass. The next dedicated review is due when +a trust boundary moves — a new transport, a new credential, a new privilege — +as the assurance case requires that document and this one move in the same +pull request. diff --git a/internal/hcl_tool.ts.tmpl b/internal/hcl_tool.ts.tmpl index c93aade7..c144108e 100644 --- a/internal/hcl_tool.ts.tmpl +++ b/internal/hcl_tool.ts.tmpl @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + __MODULE_DOC__ import { type Configure, runSettings, ToolSettings } from "@zuke/core/tooling"; diff --git a/packages/ai/mod.ts b/packages/ai/mod.ts index 37d43fdc..92eb58f9 100644 --- a/packages/ai/mod.ts +++ b/packages/ai/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/ai` — AI-powered code review for Zuke builds. * diff --git a/packages/ai/src/agent_fixer.ts b/packages/ai/src/agent_fixer.ts index c5aa39f9..c589992a 100644 --- a/packages/ai/src/agent_fixer.ts +++ b/packages/ai/src/agent_fixer.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The fluent {@link AgentFixer} and the {@link agentFixer} factory — a * {@link "jsr:@zuke/core".Remediation} that delegates the actual fixing to a diff --git a/packages/ai/src/apply.ts b/packages/ai/src/apply.ts index 119fd3df..24f16e0d 100644 --- a/packages/ai/src/apply.ts +++ b/packages/ai/src/apply.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Applying a {@link "./fix.ts".Fix}'s edits to the working tree, behind safety * guards: a path allowlist, a set of always-excluded paths, and a cap on the diff --git a/packages/ai/src/assessment.ts b/packages/ai/src/assessment.ts index 47a2e0b1..2671df02 100644 --- a/packages/ai/src/assessment.ts +++ b/packages/ai/src/assessment.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Turning a model's raw text response into a validated {@link Assessment}. * diff --git a/packages/ai/src/budget.ts b/packages/ai/src/budget.ts index 5fb68d2b..cde38378 100644 --- a/packages/ai/src/budget.ts +++ b/packages/ai/src/budget.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * A token and cost budget for AI provider calls. * diff --git a/packages/ai/src/cache.ts b/packages/ai/src/cache.ts index 51e275eb..3effa1e7 100644 --- a/packages/ai/src/cache.ts +++ b/packages/ai/src/cache.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * A filesystem-backed cache for AI provider responses. * diff --git a/packages/ai/src/comment.ts b/packages/ai/src/comment.ts index 1e6e89fc..b8ad4d91 100644 --- a/packages/ai/src/comment.ts +++ b/packages/ai/src/comment.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Posting a single overview comment to the pull/merge request via the active CI * host — shared by the AI fixer and the agent fixer. Keyed by the fixer's name diff --git a/packages/ai/src/commit.ts b/packages/ai/src/commit.ts index 2555bc68..4299a5bd 100644 --- a/packages/ai/src/commit.ts +++ b/packages/ai/src/commit.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Committing applied fix edits and pushing them to the current branch. Used by * the {@link "./fixer.ts".AiFixer} when `.commitFixes()` is set so a healed PR diff --git a/packages/ai/src/context.ts b/packages/ai/src/context.ts index 45d782c6..bee08e0a 100644 --- a/packages/ai/src/context.ts +++ b/packages/ai/src/context.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Shared failure-context helpers used by both the structured {@link * "./fixer.ts".AiFixer} and the delegating {@link "./agent_fixer.ts".AgentFixer}: diff --git a/packages/ai/src/dedup.ts b/packages/ai/src/dedup.ts index 8109534e..776c1a83 100644 --- a/packages/ai/src/dedup.ts +++ b/packages/ai/src/dedup.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Identity resolution for reworded findings. * diff --git a/packages/ai/src/diff.ts b/packages/ai/src/diff.ts index 8d08e9a6..bf4526be 100644 --- a/packages/ai/src/diff.ts +++ b/packages/ai/src/diff.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Sourcing and filtering the unified diff a reviewer assesses. * diff --git a/packages/ai/src/diff_suggest.ts b/packages/ai/src/diff_suggest.ts index 9a1ac5e1..bbbb4996 100644 --- a/packages/ai/src/diff_suggest.ts +++ b/packages/ai/src/diff_suggest.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Turn a unified `git diff` into GitHub inline {@link Suggestion}s — used by the * {@link "./agent_fixer.ts".AgentFixer} to render the changes an agent made as diff --git a/packages/ai/src/discussion.ts b/packages/ai/src/discussion.ts index 06db41c7..7bac7fb0 100644 --- a/packages/ai/src/discussion.ts +++ b/packages/ai/src/discussion.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The review discussion: which PR comments the reviewer listens to, and how * they are bounded before reaching the model. diff --git a/packages/ai/src/errors.ts b/packages/ai/src/errors.ts index cbeb5281..1ced7727 100644 --- a/packages/ai/src/errors.ts +++ b/packages/ai/src/errors.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The error type raised across `@zuke/ai`. * diff --git a/packages/ai/src/file_context.ts b/packages/ai/src/file_context.ts index ca7926a8..60551781 100644 --- a/packages/ai/src/file_context.ts +++ b/packages/ai/src/file_context.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Full-file context for a review: the post-image contents of the files a diff * touches, so the model can verify a finding against the surrounding code (a diff --git a/packages/ai/src/fix.ts b/packages/ai/src/fix.ts index e70094fd..c64709f3 100644 --- a/packages/ai/src/fix.ts +++ b/packages/ai/src/fix.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The structured {@link Fix} a {@link "./fixer.ts".AiFixer} produces, and the * parser that turns a model's raw response into one. A fix is a diagnosis plus diff --git a/packages/ai/src/fix_report.ts b/packages/ai/src/fix_report.ts index f9e4a50b..6d309a4c 100644 --- a/packages/ai/src/fix_report.ts +++ b/packages/ai/src/fix_report.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Rendering a {@link "./fix.ts".Fix} for the three surfaces a fixer reports to: * the console, the GitHub Actions job summary, and a pull-request comment. The diff --git a/packages/ai/src/fix_schema.ts b/packages/ai/src/fix_schema.ts index 741e6c8f..389fff90 100644 --- a/packages/ai/src/fix_schema.ts +++ b/packages/ai/src/fix_schema.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The JSON schema for a {@link "./fix.ts".Fix}, in the dialects each provider's * structured-output mode expects — mirroring `./schema.ts` for assessments. diff --git a/packages/ai/src/fixer.ts b/packages/ai/src/fixer.ts index 878909dc..5d1b0d56 100644 --- a/packages/ai/src/fixer.ts +++ b/packages/ai/src/fixer.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The fluent {@link AiFixer} and the {@link aiFixer} factory — a * {@link "jsr:@zuke/core".Remediation} that diagnoses a failed target with an diff --git a/packages/ai/src/gate.ts b/packages/ai/src/gate.ts index 4fda7b4d..27368327 100644 --- a/packages/ai/src/gate.ts +++ b/packages/ai/src/gate.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The gate that decides whether an {@link Assessment} breaks the build. * diff --git a/packages/ai/src/hash.ts b/packages/ai/src/hash.ts index 96a8bfbf..2f5949a9 100644 --- a/packages/ai/src/hash.ts +++ b/packages/ai/src/hash.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * A tiny, dependency-free string hash used to derive stable identifiers — cache * keys ({@link "./cache.ts".AiCache}) and finding fingerprints diff --git a/packages/ai/src/hosts.ts b/packages/ai/src/hosts.ts index b0a1869e..e3363e50 100644 --- a/packages/ai/src/hosts.ts +++ b/packages/ai/src/hosts.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Per-CI-host PR-comment dispatch. {@link detectReviewHost} reads the ambient * environment, picks the right {@link ReviewHost} for the active provider diff --git a/packages/ai/src/hosts/azure.ts b/packages/ai/src/hosts/azure.ts index 2c2526b6..e5461386 100644 --- a/packages/ai/src/hosts/azure.ts +++ b/packages/ai/src/hosts/azure.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Post the review as an Azure Pipelines pull-request comment thread. Runs * against Azure DevOps REST `7.1`; upserts a single per-reviewer **thread** diff --git a/packages/ai/src/hosts/bitbucket.ts b/packages/ai/src/hosts/bitbucket.ts index b32cf76a..5e344b69 100644 --- a/packages/ai/src/hosts/bitbucket.ts +++ b/packages/ai/src/hosts/bitbucket.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Post the review as a Bitbucket Cloud pull-request comment. Runs against * `/2.0` and upserts a single per-reviewer comment matched by a hidden marker. diff --git a/packages/ai/src/hosts/github.ts b/packages/ai/src/hosts/github.ts index 31bd21ea..fb9a01c1 100644 --- a/packages/ai/src/hosts/github.ts +++ b/packages/ai/src/hosts/github.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Post the review as a GitHub pull-request comment. Runs against the REST API * with `pull-requests: write` and upserts a single per-reviewer comment diff --git a/packages/ai/src/hosts/github_review.ts b/packages/ai/src/hosts/github_review.ts index 062c088a..f319ab14 100644 --- a/packages/ai/src/hosts/github_review.ts +++ b/packages/ai/src/hosts/github_review.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Post a fix as GitHub pull-request *review* comments with committable * `suggestion` blocks — the Copilot-style inline suggestion anchored to the diff --git a/packages/ai/src/hosts/github_threads.ts b/packages/ai/src/hosts/github_threads.ts index 401f5017..7af69f5b 100644 --- a/packages/ai/src/hosts/github_threads.ts +++ b/packages/ai/src/hosts/github_threads.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * GitHub's review-thread operations: the file/line-anchored comment threads a * finding is posted into, replied to, and resolved on. diff --git a/packages/ai/src/hosts/gitlab.ts b/packages/ai/src/hosts/gitlab.ts index 927b6bed..eeb54727 100644 --- a/packages/ai/src/hosts/gitlab.ts +++ b/packages/ai/src/hosts/gitlab.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Post the review as a GitLab merge-request note. Runs against the v4 REST API * (`CI_API_V4_URL`) and upserts a single per-reviewer note matched by a hidden diff --git a/packages/ai/src/hosts/types.ts b/packages/ai/src/hosts/types.ts index f9e0063f..16f8a560 100644 --- a/packages/ai/src/hosts/types.ts +++ b/packages/ai/src/hosts/types.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The {@link ReviewHost} contract — what each per-host integration provides so * the {@link "../reviewer.ts".Reviewer} can post its assessment to a pull diff --git a/packages/ai/src/json.ts b/packages/ai/src/json.ts index ee99c8e5..06520514 100644 --- a/packages/ai/src/json.ts +++ b/packages/ai/src/json.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Small helpers for reading provider responses — untyped JSON navigated without * casting. diff --git a/packages/ai/src/markdown.ts b/packages/ai/src/markdown.ts index 987206b1..b3dbe9a9 100644 --- a/packages/ai/src/markdown.ts +++ b/packages/ai/src/markdown.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Neutralizing model- and agent-controlled text before it is embedded in the * Markdown of a PR comment or CI job summary — the Markdown analogue of the diff --git a/packages/ai/src/prompt.ts b/packages/ai/src/prompt.ts index 94b69744..3c938e87 100644 --- a/packages/ai/src/prompt.ts +++ b/packages/ai/src/prompt.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Assemble the system + user prompt for an assessment. The editable prompt text * lives in `./prompts/` (subjects and templates); this file only wires them diff --git a/packages/ai/src/prompts/agent.ts b/packages/ai/src/prompts/agent.ts index dbb4750b..adc1b0ab 100644 --- a/packages/ai/src/prompts/agent.ts +++ b/packages/ai/src/prompts/agent.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The prompt handed to a coding agent (Claude/Codex/Gemini) by the {@link * "../agent_fixer.ts".AgentFixer}. The agent reads files and edits them itself, diff --git a/packages/ai/src/prompts/fence.ts b/packages/ai/src/prompts/fence.ts index a31e5960..4f0bac71 100644 --- a/packages/ai/src/prompts/fence.ts +++ b/packages/ai/src/prompts/fence.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Fence untrusted content (an attacker-controlled diff, a failing command's * output) between markers the system prompt treats as data-only. diff --git a/packages/ai/src/prompts/fix.ts b/packages/ai/src/prompts/fix.ts index 38ffb639..18c73f05 100644 --- a/packages/ai/src/prompts/fix.ts +++ b/packages/ai/src/prompts/fix.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The wording of the fixer's system and user prompts. Edit the prose here to * change how the AI fixer is instructed; the assembly logic lives in diff --git a/packages/ai/src/prompts/subjects.ts b/packages/ai/src/prompts/subjects.ts index 6b133fd8..f3c9637c 100644 --- a/packages/ai/src/prompts/subjects.ts +++ b/packages/ai/src/prompts/subjects.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * What each built-in assessment asks the model to look for. Edit these strings * to tune a reviewer's focus — no logic lives here. diff --git a/packages/ai/src/prompts/templates.ts b/packages/ai/src/prompts/templates.ts index 8b2e33a0..9af77fbd 100644 --- a/packages/ai/src/prompts/templates.ts +++ b/packages/ai/src/prompts/templates.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The wording of the system and user prompts. Edit the prose here to change how * reviewers are instructed — the assembly logic lives in `../prompt.ts`. diff --git a/packages/ai/src/provider.ts b/packages/ai/src/provider.ts index fe1c30a8..dafa1a14 100644 --- a/packages/ai/src/provider.ts +++ b/packages/ai/src/provider.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The transport layer: POST a prompt to a provider and return its raw text. * Each provider has its own endpoint, auth scheme, and response shape; the rest diff --git a/packages/ai/src/report.ts b/packages/ai/src/report.ts index 3a889162..efaf3552 100644 --- a/packages/ai/src/report.ts +++ b/packages/ai/src/report.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Rendering a review {@link "./types.ts".Assessment} — to the console and to * the GitHub Actions job summary. diff --git a/packages/ai/src/retry.ts b/packages/ai/src/retry.ts index 61bd1d6d..14518874 100644 --- a/packages/ai/src/retry.ts +++ b/packages/ai/src/retry.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Retry-with-backoff (and a per-attempt timeout) for transient provider * failures. diff --git a/packages/ai/src/reviewer.ts b/packages/ai/src/reviewer.ts index 36c088be..7c32bb98 100644 --- a/packages/ai/src/reviewer.ts +++ b/packages/ai/src/reviewer.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The fluent {@link Reviewer} and its per-assessment factory functions — the * orchestration that ties the diff source, provider, parser, and gate together diff --git a/packages/ai/src/schema.ts b/packages/ai/src/schema.ts index 7c245617..cf000fd5 100644 --- a/packages/ai/src/schema.ts +++ b/packages/ai/src/schema.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The JSON schema for an {@link "./types.ts".Assessment}, in the dialects each * provider's structured-output mode expects. Sending it on the request makes diff --git a/packages/ai/src/severity.ts b/packages/ai/src/severity.ts index 4367bfca..8f146744 100644 --- a/packages/ai/src/severity.ts +++ b/packages/ai/src/severity.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Severity ordering and normalisation. * diff --git a/packages/ai/src/state.ts b/packages/ai/src/state.ts index f4d22646..7579af71 100644 --- a/packages/ai/src/state.ts +++ b/packages/ai/src/state.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Durable finding state, carried across review runs inside the reviewer's own * PR comment — the memory that turns per-run findings into a discussion. diff --git a/packages/ai/src/suppress.ts b/packages/ai/src/suppress.ts index 13e869cc..943974db 100644 --- a/packages/ai/src/suppress.ts +++ b/packages/ai/src/suppress.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Learned false-positive suppression: a file-backed set of finding fingerprints * that the reviewer uses to drop findings a human has already dismissed. diff --git a/packages/ai/src/threads.ts b/packages/ai/src/threads.ts index 9d6ff8ba..7813558d 100644 --- a/packages/ai/src/threads.ts +++ b/packages/ai/src/threads.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Findings as pull-request review threads: which finding gets a thread, which * thread is ours, which reply is a rebuttal, and what the reviewer owes each diff --git a/packages/ai/src/types.ts b/packages/ai/src/types.ts index 5a190e5f..cd09f136 100644 --- a/packages/ai/src/types.ts +++ b/packages/ai/src/types.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Shared types for `@zuke/ai`: providers, assessment kinds, and the structured * {@link Assessment} a review produces. diff --git a/packages/ai/src/verdicts.ts b/packages/ai/src/verdicts.ts index 57d93f2a..1001004c 100644 --- a/packages/ai/src/verdicts.ts +++ b/packages/ai/src/verdicts.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Parsing the verdict responses of the verify and adjudication passes. * diff --git a/packages/ai/src/workflow.ts b/packages/ai/src/workflow.ts index cd428c37..e3d1dff0 100644 --- a/packages/ai/src/workflow.ts +++ b/packages/ai/src/workflow.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Generate the AI-review CI workflow from declared {@link Reviewer}s. Returns a * [`CiFile`](jsr:@zuke/core) — so the standard `cicd` plumbing diff --git a/packages/ai/tests/agent_fixer_test.ts b/packages/ai/tests/agent_fixer_test.ts index c1b4c55d..b722f41c 100644 --- a/packages/ai/tests/agent_fixer_test.ts +++ b/packages/ai/tests/agent_fixer_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "../../core/tests/_assert.ts"; import { CommandError, CommandOutput } from "@zuke/core/shell"; import { type AgentContext, type AgentFixer, agentFixer } from "../mod.ts"; @@ -350,7 +353,10 @@ Deno.test("noComment writes no PR comment", async () => { ) .env((n) => prEnv[n]).fetch(impl).quiet(); await fixer.remediate(CTX); - assertEquals(calls.some((u) => u.includes("api.github.com")), false); + assertEquals( + calls.some((u) => u.startsWith("https://api.github.com/")), + false, + ); }); Deno.test("a non-quiet run prints what the agent did", async () => { diff --git a/packages/ai/tests/ai_test.ts b/packages/ai/tests/ai_test.ts index 95907dc1..c4b4eac6 100644 --- a/packages/ai/tests/ai_test.ts +++ b/packages/ai/tests/ai_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects } from "../../core/tests/_assert.ts"; import { AiReviewError, @@ -87,7 +90,7 @@ function routedFetch(opts: { init, body: typeof init?.body === "string" ? init.body : "", }); - if (url.includes("api.github.com")) { + if (url.startsWith("https://api.github.com/")) { const status = opts.githubStatus ?? 200; const payload = (init?.method ?? "GET") === "GET" ? JSON.stringify(opts.comments ?? []) @@ -699,7 +702,10 @@ Deno.test("the default diff source runs git via the shell (no network)", async ( r.provider("claude").apiKey("k").quiet().diff((d) => d.staged()) .fetch(fetch) ).validate({ target: "t" }); - assertEquals(calls.every((c) => c.url.includes("api.anthropic.com")), true); + assertEquals( + calls.every((c) => c.url.startsWith("https://api.anthropic.com/")), + true, + ); }); Deno.test("the findings table is printed when not quiet", async () => { @@ -1075,7 +1081,7 @@ Deno.test("comment() posts the assessment to the pull request", async () => { ).validate({ target: "deploy" }) ); const posts = calls.filter((c) => - c.url.includes("api.github.com") && c.init?.method === "POST" + c.url.startsWith("https://api.github.com/") && c.init?.method === "POST" ); assertEquals(posts.length, 1); assertEquals( @@ -1141,7 +1147,10 @@ Deno.test("comment() warns and skips on GitHub without a PR ref", async () => { .diff((d) => d.text(DIFF)).fetch(fetch) ).validate({ target: "deploy" }) ); - assertEquals(calls.some((c) => c.url.includes("api.github.com")), false); + assertEquals( + calls.some((c) => c.url.startsWith("https://api.github.com/")), + false, + ); assertEquals( lines.some((l) => l.includes("no GitHub PR context")), true, diff --git a/packages/ai/tests/budget_test.ts b/packages/ai/tests/budget_test.ts index 754b3e6a..c28cfcc8 100644 --- a/packages/ai/tests/budget_test.ts +++ b/packages/ai/tests/budget_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertStringIncludes, diff --git a/packages/ai/tests/cache_test.ts b/packages/ai/tests/cache_test.ts index 7b406965..17b8e97e 100644 --- a/packages/ai/tests/cache_test.ts +++ b/packages/ai/tests/cache_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "../../core/tests/_assert.ts"; import { AiCache, aiCache } from "../src/cache.ts"; import type { CacheEntry, CacheStore } from "../src/cache.ts"; diff --git a/packages/ai/tests/cost_controls_test.ts b/packages/ai/tests/cost_controls_test.ts index 3db289ba..fe484d29 100644 --- a/packages/ai/tests/cost_controls_test.ts +++ b/packages/ai/tests/cost_controls_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "../../core/tests/_assert.ts"; import { aiCache, diff --git a/packages/ai/tests/dedup_test.ts b/packages/ai/tests/dedup_test.ts index 9a7bc3a1..31ba4755 100644 --- a/packages/ai/tests/dedup_test.ts +++ b/packages/ai/tests/dedup_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "../../core/tests/_assert.ts"; import { adoptCanonicalIds, diff --git a/packages/ai/tests/deep_review_test.ts b/packages/ai/tests/deep_review_test.ts index 20edda63..c4334c48 100644 --- a/packages/ai/tests/deep_review_test.ts +++ b/packages/ai/tests/deep_review_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects } from "../../core/tests/_assert.ts"; import { AiReviewError, genericReviewer, securityReviewer } from "../mod.ts"; import { changedPaths } from "../src/diff.ts"; diff --git a/packages/ai/tests/diff_suggest_test.ts b/packages/ai/tests/diff_suggest_test.ts index fce0818f..4eca2f99 100644 --- a/packages/ai/tests/diff_suggest_test.ts +++ b/packages/ai/tests/diff_suggest_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "../../core/tests/_assert.ts"; import { diffToSuggestions } from "../src/diff_suggest.ts"; diff --git a/packages/ai/tests/diff_test.ts b/packages/ai/tests/diff_test.ts index 97462fd0..4d9b021b 100644 --- a/packages/ai/tests/diff_test.ts +++ b/packages/ai/tests/diff_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "../../core/tests/_assert.ts"; import { filterDiff } from "../src/diff.ts"; diff --git a/packages/ai/tests/discussion_flow_test.ts b/packages/ai/tests/discussion_flow_test.ts index 34cae128..95eea933 100644 --- a/packages/ai/tests/discussion_flow_test.ts +++ b/packages/ai/tests/discussion_flow_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects } from "../../core/tests/_assert.ts"; import { AiReviewError, securityReviewer } from "../mod.ts"; import { findingFingerprint } from "../src/suppress.ts"; @@ -871,7 +874,7 @@ Deno.test("Azure DevOps: only an explicitly trusted author can dismiss", async ( method, body: typeof init?.body === "string" ? init.body : "", }); - if (url.startsWith("https://dev.azure.com")) { + if (url.startsWith("https://dev.azure.com/")) { if (method !== "GET") return Promise.resolve(new Response("{}")); if (url.includes("connectionData")) { return Promise.resolve( @@ -900,7 +903,7 @@ Deno.test("Azure DevOps: only an explicitly trusted author can dismiss", async ( assertEquals(lines.some((l) => l.includes("discussion disabled")), false); const providerCalls = calls.filter((c) => - !c.url.startsWith("https://dev.azure.com") + !c.url.startsWith("https://dev.azure.com/") ); assertEquals(providerCalls.length, 2); const prompt = JSON.parse(providerCalls[1].body).messages[0].content; @@ -911,7 +914,7 @@ Deno.test("Azure DevOps: only an explicitly trusted author can dismiss", async ( assertEquals(call.body.includes("IGNORE ALL PREVIOUS"), false); } const write = calls.find((c) => - c.url.startsWith("https://dev.azure.com") && c.method !== "GET" + c.url.startsWith("https://dev.azure.com/") && c.method !== "GET" ); const posted = JSON.parse(write?.body ?? "{}"); const content = posted.content ?? posted.comments?.[0]?.content ?? ""; @@ -960,7 +963,7 @@ Deno.test("Bitbucket: workspace permission decides who can dismiss a finding", a method, body: typeof init?.body === "string" ? init.body : "", }); - if (url.startsWith("https://api.bitbucket.org")) { + if (url.startsWith("https://api.bitbucket.org/")) { if (method !== "GET") return Promise.resolve(new Response("{}")); if (url.endsWith("/2.0/user")) { return Promise.resolve( @@ -990,7 +993,7 @@ Deno.test("Bitbucket: workspace permission decides who can dismiss a finding", a assertEquals(lines.some((l) => l.includes("discussion disabled")), false); const providerCalls = calls.filter((c) => - !c.url.startsWith("https://api.bitbucket.org") + !c.url.startsWith("https://api.bitbucket.org/") ); assertEquals(providerCalls.length, 2); const prompt = JSON.parse(providerCalls[1].body).messages[0].content; @@ -1000,7 +1003,7 @@ Deno.test("Bitbucket: workspace permission decides who can dismiss a finding", a assertEquals(call.body.includes("passerby"), false); } const write = calls.find((c) => - c.url.startsWith("https://api.bitbucket.org") && c.method !== "GET" + c.url.startsWith("https://api.bitbucket.org/") && c.method !== "GET" ); const state = decodeState(JSON.parse(write?.body ?? "{}").content?.raw ?? ""); assertEquals(state?.findings[0].status, "dismissed"); diff --git a/packages/ai/tests/discussion_test.ts b/packages/ai/tests/discussion_test.ts index 70cd3334..60cd0f31 100644 --- a/packages/ai/tests/discussion_test.ts +++ b/packages/ai/tests/discussion_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "../../core/tests/_assert.ts"; import { budgetComments, diff --git a/packages/ai/tests/fixer_test.ts b/packages/ai/tests/fixer_test.ts index cb88dd77..035fbe50 100644 --- a/packages/ai/tests/fixer_test.ts +++ b/packages/ai/tests/fixer_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "../../core/tests/_assert.ts"; import { CommandError } from "@zuke/core/shell"; import { AiFixer, aiFixer, type Fix } from "../mod.ts"; @@ -91,7 +94,7 @@ Deno.test("default diagnoses without writing or asking to retry", async () => { assertEquals(s.writes.length, 0); assertEquals(s.git.length, 0); // The fix schema and the error output reach the provider. - assertEquals(calls[0].url.includes("anthropic.com"), true); + assertEquals(calls[0].url.startsWith("https://api.anthropic.com/"), true); assertEquals(calls[0].body.includes("boom: a test failed"), true); }); @@ -450,7 +453,7 @@ function routedFetch(body: string): { fetch: typeof fetch; calls: Call[] } { const impl = ((input: string | URL | Request, init?: RequestInit) => { const url = String(input); calls.push({ url, body: typeof init?.body === "string" ? init.body : "" }); - if (url.includes("api.github.com")) { + if (url.startsWith("https://api.github.com/")) { const payload = (init?.method ?? "GET") === "GET" ? "[]" : "{}"; return Promise.resolve(new Response(payload, { status: 200 })); } @@ -475,7 +478,7 @@ Deno.test("non-quiet diagnose prints findings and posts a PR comment", async () const result = await fixer.remediate(CTX); assertEquals(result.retry, false); // A GitHub comment was created (POST after the GET list). - const posted = calls.some((c) => c.url.includes("api.github.com")); + const posted = calls.some((c) => c.url.startsWith("https://api.github.com/")); assertEquals(posted, true); }); @@ -675,7 +678,10 @@ Deno.test("noComment writes the summary but posts no PR comment", async () => { .conventions("").diff((d) => d.text("")).env((n) => prEnv[n]).fetch(fetch) .quiet(); await fixer.remediate(CTX); - assertEquals(calls.some((c) => c.url.includes("api.github.com")), false); + assertEquals( + calls.some((c) => c.url.startsWith("https://api.github.com/")), + false, + ); }); Deno.test("a failed PR comment is swallowed", async () => { @@ -689,7 +695,7 @@ Deno.test("a failed PR comment is swallowed", async () => { const impl = ((input: string | URL | Request) => { const url = String(input); calls.push(url); - if (url.includes("api.github.com")) { + if (url.startsWith("https://api.github.com/")) { return Promise.resolve(new Response("nope", { status: 500 })); } return Promise.resolve(new Response(claudeFix(ONE_EDIT), { status: 200 })); @@ -749,7 +755,7 @@ function suggestFetch(fixBody: string): { fetch: typeof fetch; calls: Call[] } { const url = String(input); const method = init?.method ?? "GET"; calls.push({ url, body: typeof init?.body === "string" ? init.body : "" }); - if (url.includes("api.github.com")) { + if (url.startsWith("https://api.github.com/")) { if (url.includes("/comments")) { return Promise.resolve( new Response(method === "GET" ? "[]" : "{}", { @@ -921,7 +927,7 @@ Deno.test("a thrown suggestion post is caught and falls back to the overview", a const impl = ((input: string | URL | Request, init?: RequestInit) => { const url = String(input); calls.push(url); - if (url.includes("api.github.com")) { + if (url.startsWith("https://api.github.com/")) { // The PR-detail fetch (for the head sha) throws; the issue-comment GET/POST succeeds. if (!url.includes("/comments")) { return Promise.reject(new Error("network")); diff --git a/packages/ai/tests/github_review_test.ts b/packages/ai/tests/github_review_test.ts index 366067bd..8d825fa8 100644 --- a/packages/ai/tests/github_review_test.ts +++ b/packages/ai/tests/github_review_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "../../core/tests/_assert.ts"; import { postSuggestions, diff --git a/packages/ai/tests/github_threads_test.ts b/packages/ai/tests/github_threads_test.ts index cc2464d9..b704cd6c 100644 --- a/packages/ai/tests/github_threads_test.ts +++ b/packages/ai/tests/github_threads_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "../../core/tests/_assert.ts"; import type { GithubContext } from "../src/hosts/github.ts"; import { githubHost } from "../src/hosts/github.ts"; diff --git a/packages/ai/tests/hash_test.ts b/packages/ai/tests/hash_test.ts index 0f305796..5cb443e3 100644 --- a/packages/ai/tests/hash_test.ts +++ b/packages/ai/tests/hash_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "../../core/tests/_assert.ts"; import { stableHash } from "../src/hash.ts"; diff --git a/packages/ai/tests/hosts_test.ts b/packages/ai/tests/hosts_test.ts index 0225f1db..d77764b6 100644 --- a/packages/ai/tests/hosts_test.ts +++ b/packages/ai/tests/hosts_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects } from "../../core/tests/_assert.ts"; import { AiReviewError } from "../mod.ts"; import { detectReviewHost, hostFor } from "../src/hosts.ts"; diff --git a/packages/ai/tests/markdown_test.ts b/packages/ai/tests/markdown_test.ts index 47d466c1..632937eb 100644 --- a/packages/ai/tests/markdown_test.ts +++ b/packages/ai/tests/markdown_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertStringIncludes, diff --git a/packages/ai/tests/prompt_markers_test.ts b/packages/ai/tests/prompt_markers_test.ts index ce3b3cfe..0ff0bcc5 100644 --- a/packages/ai/tests/prompt_markers_test.ts +++ b/packages/ai/tests/prompt_markers_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "../../core/tests/_assert.ts"; import { buildAdjudicatePrompt, diff --git a/packages/ai/tests/retry_test.ts b/packages/ai/tests/retry_test.ts index 7e3e5460..63622b36 100644 --- a/packages/ai/tests/retry_test.ts +++ b/packages/ai/tests/retry_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects } from "../../core/tests/_assert.ts"; import { AiReviewError } from "../mod.ts"; import { retryingFetch } from "../src/retry.ts"; diff --git a/packages/ai/tests/state_test.ts b/packages/ai/tests/state_test.ts index fc7a9bb8..ecc2f17e 100644 --- a/packages/ai/tests/state_test.ts +++ b/packages/ai/tests/state_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "../../core/tests/_assert.ts"; import { aliasIndex, diff --git a/packages/ai/tests/suppress_test.ts b/packages/ai/tests/suppress_test.ts index 249dc2f0..ec830d58 100644 --- a/packages/ai/tests/suppress_test.ts +++ b/packages/ai/tests/suppress_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "../../core/tests/_assert.ts"; import type { AssessmentFinding } from "../src/types.ts"; import { diff --git a/packages/ai/tests/threads_test.ts b/packages/ai/tests/threads_test.ts index d109d0a2..b2f1bd29 100644 --- a/packages/ai/tests/threads_test.ts +++ b/packages/ai/tests/threads_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "../../core/tests/_assert.ts"; import { allReplies, diff --git a/packages/ai/tests/verdicts_test.ts b/packages/ai/tests/verdicts_test.ts index cf668e84..f20ea12a 100644 --- a/packages/ai/tests/verdicts_test.ts +++ b/packages/ai/tests/verdicts_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects } from "../../core/tests/_assert.ts"; import { AiReviewError } from "../mod.ts"; import { parseVerdicts } from "../src/verdicts.ts"; diff --git a/packages/ai/tests/workflow_test.ts b/packages/ai/tests/workflow_test.ts index fc88b5c9..0b8ff5cc 100644 --- a/packages/ai/tests/workflow_test.ts +++ b/packages/ai/tests/workflow_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertStringIncludes, diff --git a/packages/biome/mod.ts b/packages/biome/mod.ts index c1ea7262..35537e60 100644 --- a/packages/biome/mod.ts +++ b/packages/biome/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/biome` — typed `BiomeTasks` wrappers for the [Biome](https://biomejs.dev) * CLI (lint + format + import organizing in one tool), for use in Zuke builds. diff --git a/packages/biome/src/biome.ts b/packages/biome/src/biome.ts index 1d003af8..c3c3bc14 100644 --- a/packages/biome/src/biome.ts +++ b/packages/biome/src/biome.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `BiomeTasks` — typed task functions for the [Biome](https://biomejs.dev) CLI, * in the settings-lambda style: configure a fluent settings object in a lambda, diff --git a/packages/biome/tests/biome_test.ts b/packages/biome/tests/biome_test.ts index de3f7439..c163fa29 100644 --- a/packages/biome/tests/biome_test.ts +++ b/packages/biome/tests/biome_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects } from "../../core/tests/_assert.ts"; import { ToolNotFoundError } from "@zuke/core/tooling"; import { diff --git a/packages/bun/mod.ts b/packages/bun/mod.ts index 12aca8c6..f054776d 100644 --- a/packages/bun/mod.ts +++ b/packages/bun/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/bun` — typed `BunTasks` wrappers for the `bun` CLI, for use in Zuke * build targets (package management, scripts, and the built-in test runner). diff --git a/packages/bun/src/bun.ts b/packages/bun/src/bun.ts index e2b0d7e3..609264c2 100644 --- a/packages/bun/src/bun.ts +++ b/packages/bun/src/bun.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `BunTasks` — typed task functions for the `bun` CLI, in the settings-lambda * style: configure a fluent settings object in a lambda, and the task function diff --git a/packages/bun/tests/bun_test.ts b/packages/bun/tests/bun_test.ts index 6c933438..2091bf21 100644 --- a/packages/bun/tests/bun_test.ts +++ b/packages/bun/tests/bun_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects, diff --git a/packages/claude/mod.ts b/packages/claude/mod.ts index d89aff39..83549a2d 100644 --- a/packages/claude/mod.ts +++ b/packages/claude/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/claude` — a typed [Claude Code](https://docs.claude.com/en/docs/claude-code) * CLI (`claude`) task wrapper for Zuke builds. diff --git a/packages/claude/src/claude.ts b/packages/claude/src/claude.ts index e2dacc4b..a16ed712 100644 --- a/packages/claude/src/claude.ts +++ b/packages/claude/src/claude.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `ClaudeTasks` — a typed wrapper for the * [Claude Code](https://docs.claude.com/en/docs/claude-code) CLI (`claude`), diff --git a/packages/claude/tests/claude_test.ts b/packages/claude/tests/claude_test.ts index dec6f880..58bf1c47 100644 --- a/packages/claude/tests/claude_test.ts +++ b/packages/claude/tests/claude_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects, diff --git a/packages/cli/mod.ts b/packages/cli/mod.ts index 6f2d6072..1a8287c6 100644 --- a/packages/cli/mod.ts +++ b/packages/cli/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/cli` — the `zuke` command. Install it globally with * diff --git a/packages/cli/src/import.ts b/packages/cli/src/import.ts index d2c70d2b..d9e226af 100644 --- a/packages/cli/src/import.ts +++ b/packages/cli/src/import.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The engine behind `zuke import`: read an existing project's task definitions — * `package.json` scripts or a `Makefile` — and scaffold an equivalent typed @@ -257,9 +260,18 @@ function tokenize(segment: string): string[] | undefined { } } -/** A double-quoted TypeScript string literal for `value`. */ +/** + * A double-quoted TypeScript string literal for `value`. + * + * `JSON.stringify` escapes quotes, backslashes, and control characters, but + * leaves U+2028/U+2029 raw — legal inside JSON strings, line terminators to a + * JavaScript parser — so those are escaped on top, keeping the generated + * literal on one line whatever the imported command contains. + */ function str(value: string): string { - return JSON.stringify(value); + return JSON.stringify(value) + .replace(/\u2028/g, "\\u2028") + .replace(/\u2029/g, "\\u2029"); } // --- identifiers ---------------------------------------------------------- diff --git a/packages/cli/src/setup.ts b/packages/cli/src/setup.ts index 97cc3c02..dc020e53 100644 --- a/packages/cli/src/setup.ts +++ b/packages/cli/src/setup.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The scaffolding engine behind `zuke setup`. It writes a starter `zuke.ts`, * the `./zuke` bootstrap launchers, and a `deno.json` task into a target diff --git a/packages/cli/src/version.ts b/packages/cli/src/version.ts index 0ba1c3e7..a6045573 100644 --- a/packages/cli/src/version.ts +++ b/packages/cli/src/version.ts @@ -1,2 +1,5 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** The `@zuke/cli` version. Kept in sync with deno.json by release-please. */ export const VERSION = "1.0.0"; // x-release-please-version diff --git a/packages/cli/tests/_fakes.ts b/packages/cli/tests/_fakes.ts index 4734bb3d..3688b085 100644 --- a/packages/cli/tests/_fakes.ts +++ b/packages/cli/tests/_fakes.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** Test doubles for the CLI's injectable seams. */ import type { SetupHost } from "../src/setup.ts"; diff --git a/packages/cli/tests/cli_test.ts b/packages/cli/tests/cli_test.ts index 3171a4fd..92615c48 100644 --- a/packages/cli/tests/cli_test.ts +++ b/packages/cli/tests/cli_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "../../core/tests/_assert.ts"; import { defaultPrompter, diff --git a/packages/cli/tests/import_test.ts b/packages/cli/tests/import_test.ts index e01aca57..82c62855 100644 --- a/packages/cli/tests/import_test.ts +++ b/packages/cli/tests/import_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertStringIncludes, @@ -88,6 +91,17 @@ Deno.test("translateCommand maps clean commands and chains", () => { assertEquals(chain.every((i) => i.runnable), true); }); +Deno.test("translateCommand escapes line separators in generated literals", () => { + // U+2028 is legal inside a JSON string but is a line terminator to a + // JavaScript parser — embedded raw by JSON.stringify, it would split the + // generated string literal across lines. The quotes keep the tokenizer from + // treating it as argument-separating whitespace, so it reaches the literal. + const [item] = translateCommand('echo "a
b"'); + assertEquals(item.runnable, true); + assertEquals(item.code.includes("
"), false); + assertEquals(item.code, 'CmdTasks.exec("echo", (s) => s.args("a\\u2028b"))'); +}); + Deno.test("translateCommand flags shell-specific commands as TODO", () => { for ( const shellCmd of [ diff --git a/packages/cli/tests/setup_test.ts b/packages/cli/tests/setup_test.ts index 4916e720..10861580 100644 --- a/packages/cli/tests/setup_test.ts +++ b/packages/cli/tests/setup_test.ts @@ -1,4 +1,11 @@ -import { assertEquals, assertRejects } from "../../core/tests/_assert.ts"; +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + +import { + assertEquals, + assertRejects, + assertStringIncludes, +} from "../../core/tests/_assert.ts"; import { defaultHost, isRecord, @@ -52,11 +59,9 @@ Deno.test("scaffolded launchers never pipe an unverified install script", () => assertEquals(script.includes("| sh"), false); assertEquals(script.includes("Invoke-Expression"), false); assertEquals(script.includes("Deno not found on PATH"), true); - assertEquals( - script.includes( - "https://docs.deno.com/runtime/getting_started/installation/", - ), - true, + assertStringIncludes( + script, + "https://docs.deno.com/runtime/getting_started/installation/", ); } }); diff --git a/packages/cmd/mod.ts b/packages/cmd/mod.ts index 844f5847..09507ef9 100644 --- a/packages/cmd/mod.ts +++ b/packages/cmd/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/cmd` — generic command execution for Zuke builds: the fallback for * tools that have no dedicated wrapper package. diff --git a/packages/cmd/src/cmd.ts b/packages/cmd/src/cmd.ts index 3720ab54..77894462 100644 --- a/packages/cmd/src/cmd.ts +++ b/packages/cmd/src/cmd.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `CmdTasks` — the generic command fallback for tools without a dedicated * wrapper package. Same fluent settings base and execution machinery as the diff --git a/packages/cmd/tests/cmd_test.ts b/packages/cmd/tests/cmd_test.ts index cf7a9e9c..b60f3700 100644 --- a/packages/cmd/tests/cmd_test.ts +++ b/packages/cmd/tests/cmd_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects, diff --git a/packages/codecov/mod.ts b/packages/codecov/mod.ts index b33b1d60..cdcabdc6 100644 --- a/packages/codecov/mod.ts +++ b/packages/codecov/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/codecov` — a typed Codecov CLI (`codecovcli`) task wrapper for Zuke * builds. diff --git a/packages/codecov/src/codecov.ts b/packages/codecov/src/codecov.ts index ac639084..b7bd0e4c 100644 --- a/packages/codecov/src/codecov.ts +++ b/packages/codecov/src/codecov.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `CodecovTasks` — a typed wrapper for the Codecov CLI (`codecovcli`), in the * same settings-lambda style as the other Zuke tool wrappers. diff --git a/packages/codecov/tests/codecov_test.ts b/packages/codecov/tests/codecov_test.ts index 9eab23e1..1f621a7a 100644 --- a/packages/codecov/tests/codecov_test.ts +++ b/packages/codecov/tests/codecov_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects } from "../../core/tests/_assert.ts"; import { ToolNotFoundError } from "@zuke/core/tooling"; import { missingTool } from "@zuke/core/tooling/conformance"; diff --git a/packages/codex/mod.ts b/packages/codex/mod.ts index b09c48c4..a029c675 100644 --- a/packages/codex/mod.ts +++ b/packages/codex/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/codex` — a typed [OpenAI Codex](https://developers.openai.com/codex/cli) * CLI (`codex`) task wrapper for Zuke builds. diff --git a/packages/codex/src/codex.ts b/packages/codex/src/codex.ts index 856efefb..d058bbe2 100644 --- a/packages/codex/src/codex.ts +++ b/packages/codex/src/codex.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `CodexTasks` — a typed wrapper for the * [OpenAI Codex](https://developers.openai.com/codex/cli) CLI (`codex`), in the diff --git a/packages/codex/tests/codex_test.ts b/packages/codex/tests/codex_test.ts index eea31ca1..0132ce31 100644 --- a/packages/codex/tests/codex_test.ts +++ b/packages/codex/tests/codex_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects } from "../../core/tests/_assert.ts"; import { ToolNotFoundError } from "@zuke/core/tooling"; import { missingTool } from "@zuke/core/tooling/conformance"; diff --git a/packages/console/mod.ts b/packages/console/mod.ts index c5717566..d71096df 100644 --- a/packages/console/mod.ts +++ b/packages/console/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/console` — task-shaped console output for Zuke builds, so a build never * reaches for `console.log`. A levelled logger (NUKE-style), Spectre.Console-style diff --git a/packages/console/src/console.ts b/packages/console/src/console.ts index 5a3770da..a8c901cc 100644 --- a/packages/console/src/console.ts +++ b/packages/console/src/console.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `ConsoleTasks` — task-shaped console output for Zuke builds, so a build never * reaches for `console.log`. It combines an NUKE-style levelled logger diff --git a/packages/console/src/level.ts b/packages/console/src/level.ts index b646d63d..e637edf5 100644 --- a/packages/console/src/level.ts +++ b/packages/console/src/level.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Log levels for {@link ConsoleTasks} — an NUKE-style severity ladder that * gates which messages print. `trace` is the most verbose and `silent` diff --git a/packages/console/src/markup.ts b/packages/console/src/markup.ts index ed1eb4da..37244954 100644 --- a/packages/console/src/markup.ts +++ b/packages/console/src/markup.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * A small Spectre.Console-style markup language: `[red bold]text[/]`. Styling * lives inside the string as data — so the public API stays task-shaped and diff --git a/packages/console/src/renderer.ts b/packages/console/src/renderer.ts index 9b13c18b..0e8fd042 100644 --- a/packages/console/src/renderer.ts +++ b/packages/console/src/renderer.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * A {@link Renderer} implementation a build injects via * `run(Build, { renderer: consoleRenderer })`, so the executor's per-target diff --git a/packages/console/src/theme.ts b/packages/console/src/theme.ts index 1ff77041..5956b5d1 100644 --- a/packages/console/src/theme.ts +++ b/packages/console/src/theme.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The semantic palette for {@link ConsoleTasks}: named tokens (`success`, * `warn`, `muted`, …) that map to concrete ANSI styles, so builds colour by diff --git a/packages/console/tests/console_test.ts b/packages/console/tests/console_test.ts index 07ae366b..1433ae97 100644 --- a/packages/console/tests/console_test.ts +++ b/packages/console/tests/console_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { ConsoleTasks, type Sink } from "../src/console.ts"; import { defaultTheme } from "../src/theme.ts"; import { SGR, stripAnsi, visibleWidth } from "@zuke/core/render"; diff --git a/packages/console/tests/level_test.ts b/packages/console/tests/level_test.ts index 9175e54c..66bafc6d 100644 --- a/packages/console/tests/level_test.ts +++ b/packages/console/tests/level_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { isLogLevel, LEVEL_ORDER, resolveLevel } from "../src/level.ts"; import { assertEquals } from "../../core/tests/_assert.ts"; diff --git a/packages/console/tests/markup_test.ts b/packages/console/tests/markup_test.ts index 19d20b56..4336cfab 100644 --- a/packages/console/tests/markup_test.ts +++ b/packages/console/tests/markup_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { escapeMarkup, renderMarkup } from "../src/markup.ts"; import { SGR } from "@zuke/core/render"; import { diff --git a/packages/console/tests/renderer_test.ts b/packages/console/tests/renderer_test.ts index 20636020..2fcbff7f 100644 --- a/packages/console/tests/renderer_test.ts +++ b/packages/console/tests/renderer_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { consoleRenderer, createConsoleRenderer } from "../src/renderer.ts"; import { defaultTheme, type Theme } from "../src/theme.ts"; import { defaultRenderer, type TargetReport } from "@zuke/core"; diff --git a/packages/console/tests/theme_test.ts b/packages/console/tests/theme_test.ts index a7a49665..540b0f10 100644 --- a/packages/console/tests/theme_test.ts +++ b/packages/console/tests/theme_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { defaultTheme, LEVEL_MARKS, diff --git a/packages/core/mod.ts b/packages/core/mod.ts index c965daf4..4ccb831b 100644 --- a/packages/core/mod.ts +++ b/packages/core/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Zuke — a code-first, strongly-typed build automation system for Deno. * diff --git a/packages/core/src/affected.ts b/packages/core/src/affected.ts index 414cff8e..429e0d15 100644 --- a/packages/core/src/affected.ts +++ b/packages/core/src/affected.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Git-aware execution: restrict a run to the targets *affected* by the files * that changed since a base git revision. Pairs with the incremental diff --git a/packages/core/src/ambient_echo.ts b/packages/core/src/ambient_echo.ts index 7c33e69f..b38a7359 100644 --- a/packages/core/src/ambient_echo.ts +++ b/packages/core/src/ambient_echo.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The ambient **echo sink** for `$` commands under a deep dry run. * diff --git a/packages/core/src/ambient_redactor.ts b/packages/core/src/ambient_redactor.ts index 9416f8a1..fb871540 100644 --- a/packages/core/src/ambient_redactor.ts +++ b/packages/core/src/ambient_redactor.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The ambient {@link Redactor} for command lines. * diff --git a/packages/core/src/ambient_signal.ts b/packages/core/src/ambient_signal.ts index 46963239..e2fa21f9 100644 --- a/packages/core/src/ambient_signal.ts +++ b/packages/core/src/ambient_signal.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The ambient {@link AbortSignal} for `$` commands. * diff --git a/packages/core/src/announce.ts b/packages/core/src/announce.ts index 8425a15d..954676fd 100644 --- a/packages/core/src/announce.ts +++ b/packages/core/src/announce.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `AnnounceTasks` — post build announcements to chat platforms (Slack, Microsoft * Teams, Discord) from a pipeline, via each platform's *incoming webhook*. The diff --git a/packages/core/src/assert.ts b/packages/core/src/assert.ts index 08b9e84e..2b2ef50e 100644 --- a/packages/core/src/assert.ts +++ b/packages/core/src/assert.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Assertions and control-flow helpers for build scripts — fail fast with a * clear message when an expectation does not hold. diff --git a/packages/core/src/build.ts b/packages/core/src/build.ts index 74b79070..17e2b8b7 100644 --- a/packages/core/src/build.ts +++ b/packages/core/src/build.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The {@link Build} base class and target discovery. * diff --git a/packages/core/src/cache.ts b/packages/core/src/cache.ts index b50d09ff..ab15208b 100644 --- a/packages/core/src/cache.ts +++ b/packages/core/src/cache.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Incremental-build cache: fingerprints a target's declared {@link * TargetBuilder.inputs} and lets the executor skip it when nothing has changed diff --git a/packages/core/src/cancel.ts b/packages/core/src/cancel.ts index 4f91845b..6c8abf4a 100644 --- a/packages/core/src/cancel.ts +++ b/packages/core/src/cancel.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Cancel a run and run its compensations — the cancellation half of the * durable-run lifecycle (see `./resume.ts` for the resume half, and diff --git a/packages/core/src/capture.ts b/packages/core/src/capture.ts index 979ed1ce..750153d7 100644 --- a/packages/core/src/capture.ts +++ b/packages/core/src/capture.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Bounded capture of a child process's output. * diff --git a/packages/core/src/ci.ts b/packages/core/src/ci.ts index 7d3d3bc2..d5d21d1f 100644 --- a/packages/core/src/ci.ts +++ b/packages/core/src/ci.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Generate CI pipeline configuration from a single typed, provider-agnostic * model. Describe the pipeline once as a {@link CiPipeline} — triggers, jobs, diff --git a/packages/core/src/ci_schedule.ts b/packages/core/src/ci_schedule.ts index 7ace2a9f..c7b21599 100644 --- a/packages/core/src/ci_schedule.ts +++ b/packages/core/src/ci_schedule.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Timezone-aware cron schedules for {@link "./ci.ts".cicd}. * diff --git a/packages/core/src/cli.ts b/packages/core/src/cli.ts index 24ccc8af..db433704 100644 --- a/packages/core/src/cli.ts +++ b/packages/core/src/cli.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The CLI surface: argument parsing, `--list`/`--help`/`graph`, and the public * {@link run} entry point that drives a build from `zuke.ts`. diff --git a/packages/core/src/cli_spec.ts b/packages/core/src/cli_spec.ts index b8ae2878..cbf3e973 100644 --- a/packages/core/src/cli_spec.ts +++ b/packages/core/src/cli_spec.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The static CLI surface — the reserved positional commands and the built-in * option flags — as a single source of truth shared by the argument parser diff --git a/packages/core/src/completions.ts b/packages/core/src/completions.ts index 941c2d26..ebf2556a 100644 --- a/packages/core/src/completions.ts +++ b/packages/core/src/completions.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Shell-completion script generation for the `completions` command. * diff --git a/packages/core/src/completions_install.ts b/packages/core/src/completions_install.ts index c02eaaf7..6f668aaa 100644 --- a/packages/core/src/completions_install.ts +++ b/packages/core/src/completions_install.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Installing shell completions: `zuke completions install ` writes the * generated script to a file under the user's config directory and wires it diff --git a/packages/core/src/compression.ts b/packages/core/src/compression.ts index 94a21be9..867fd2a6 100644 --- a/packages/core/src/compression.ts +++ b/packages/core/src/compression.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Compression helpers for build scripts: gzip/gunzip byte streams, read or write * `tar` / `.tar.gz` archives, and read `.zip` archives. Dependency-free — gzip diff --git a/packages/core/src/config.ts b/packages/core/src/config.ts index 55cfd30a..b3fcd2b4 100644 --- a/packages/core/src/config.ts +++ b/packages/core/src/config.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The Zuke project config file and repository-root resolution. * diff --git a/packages/core/src/conformance.ts b/packages/core/src/conformance.ts index 743a5457..3cd34d3f 100644 --- a/packages/core/src/conformance.ts +++ b/packages/core/src/conformance.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * A backend conformance kit for the state-api (`docs/state-api.md`). * diff --git a/packages/core/src/describe.ts b/packages/core/src/describe.ts index 767301fa..4791bc42 100644 --- a/packages/core/src/describe.ts +++ b/packages/core/src/describe.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * A machine-readable description of a build's CLI surface — its reserved * commands, option flags, targets, and parameters — for tooling and agents. diff --git a/packages/core/src/duration.ts b/packages/core/src/duration.ts index e06fab88..2bf21865 100644 --- a/packages/core/src/duration.ts +++ b/packages/core/src/duration.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Parse a human duration string like `"4h"` or `"500ms"` into milliseconds. * diff --git a/packages/core/src/entry.ts b/packages/core/src/entry.ts index a4424713..626f9fa3 100644 --- a/packages/core/src/entry.ts +++ b/packages/core/src/entry.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Detecting the program's entry point. * diff --git a/packages/core/src/env.ts b/packages/core/src/env.ts index 7fc75508..c7b58ac9 100644 --- a/packages/core/src/env.ts +++ b/packages/core/src/env.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Process-environment helpers for a build. Right now that is {@link prependPath} * — put a provisioned tool's directory on `PATH` so every subprocess the build diff --git a/packages/core/src/execute_cancel.ts b/packages/core/src/execute_cancel.ts index f244d3ed..acbf0647 100644 --- a/packages/core/src/execute_cancel.ts +++ b/packages/core/src/execute_cancel.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Settling a cancelled run's durable state: the cancel-lock handshake that * decides whether *this* process owns the compensation walk, the walk itself, diff --git a/packages/core/src/execute_output.ts b/packages/core/src/execute_output.ts index 8d283f21..f69bb4f2 100644 --- a/packages/core/src/execute_output.ts +++ b/packages/core/src/execute_output.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The reporting surface of one run: the sink a run writes through, the redactor * that masks resolved secrets in everything it prints, the resolved diff --git a/packages/core/src/execute_plan.ts b/packages/core/src/execute_plan.ts index 5d3f164f..71786041 100644 --- a/packages/core/src/execute_plan.ts +++ b/packages/core/src/execute_plan.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Planning a run before any body executes: resolving the build's declared * parameters, evaluating the up-front conditions that prune targets, narrowing diff --git a/packages/core/src/execute_state.ts b/packages/core/src/execute_state.ts index b7723f62..6626b8af 100644 --- a/packages/core/src/execute_state.ts +++ b/packages/core/src/execute_state.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Durable-state plumbing for one run: resolving the {@link StateStore}, opening * (or adopting) the {@link RunStateWriter} that records the run and its diff --git a/packages/core/src/executor.ts b/packages/core/src/executor.ts index fafe0960..a69b4d53 100644 --- a/packages/core/src/executor.ts +++ b/packages/core/src/executor.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The executor: resolves a plan, runs each target body in order, reports * pass/fail with timing, and aborts on the first failure. diff --git a/packages/core/src/file.ts b/packages/core/src/file.ts index 094060be..e955d1ef 100644 --- a/packages/core/src/file.ts +++ b/packages/core/src/file.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `FileTasks` — filesystem operations for build scripts, grouped as a namespaced * task object in the same shape as Zuke's tool wrappers (`DenoTasks`, etc.). The diff --git a/packages/core/src/glob.ts b/packages/core/src/glob.ts index d4048ea5..b457773b 100644 --- a/packages/core/src/glob.ts +++ b/packages/core/src/glob.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Glob helpers for build scripts: expand patterns like `src/**\/*.ts` to the * matching paths, dependency-free (built on `Deno.readDir`). diff --git a/packages/core/src/graph.ts b/packages/core/src/graph.ts index 4dfa196e..402f5786 100644 --- a/packages/core/src/graph.ts +++ b/packages/core/src/graph.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Dependency-graph construction: validation, cycle detection, transitive * closure, and topological sort. diff --git a/packages/core/src/graph_html.ts b/packages/core/src/graph_html.ts index bdef3fad..fd4d15ca 100644 --- a/packages/core/src/graph_html.ts +++ b/packages/core/src/graph_html.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Render a build's dependency graph as an interactive * [Cytoscape](https://js.cytoscape.org/) diagram embedded in a self-contained diff --git a/packages/core/src/graph_view.ts b/packages/core/src/graph_view.ts index 52687ff5..a6a36bc3 100644 --- a/packages/core/src/graph_view.ts +++ b/packages/core/src/graph_view.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The effectful side of `zuke graph`: write the rendered HTML under the * repository's `.zuke/` directory and open it in the default browser. diff --git a/packages/core/src/host.ts b/packages/core/src/host.ts index 58613a1c..0542916b 100644 --- a/packages/core/src/host.ts +++ b/packages/core/src/host.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Host / CI detection helpers for build scripts. A build can branch on where it * runs — e.g. only deploy from CI, pick coloured output locally, or post a PR diff --git a/packages/core/src/http.ts b/packages/core/src/http.ts index 0dfc42b4..7a5a5419 100644 --- a/packages/core/src/http.ts +++ b/packages/core/src/http.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * HTTP helpers for build scripts: download a URL to a file, or fetch its body * as text or JSON. Built on the platform `fetch`, with an injectable `fetch` diff --git a/packages/core/src/install.ts b/packages/core/src/install.ts index d7f93040..6fcbbfb7 100644 --- a/packages/core/src/install.ts +++ b/packages/core/src/install.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Install a CLI from a release download so a build can prepare its own * environment — fetch the binary one of Zuke's tool wrappers drives, then point diff --git a/packages/core/src/internal.ts b/packages/core/src/internal.ts index 5a27d843..790a5485 100644 --- a/packages/core/src/internal.ts +++ b/packages/core/src/internal.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Small utilities shared across core modules. This module is **internal**: it is * not re-exported from `mod.ts` (or any entrypoint), so nothing here is public diff --git a/packages/core/src/job_summary.ts b/packages/core/src/job_summary.ts index 6cb350e8..10a7e57d 100644 --- a/packages/core/src/job_summary.ts +++ b/packages/core/src/job_summary.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Appending to the GitHub Actions job summary — the panel Actions renders above * a job's logs, from whatever Markdown a step writes to `GITHUB_STEP_SUMMARY`. diff --git a/packages/core/src/lifecycle.ts b/packages/core/src/lifecycle.ts index a44632cf..74a22be2 100644 --- a/packages/core/src/lifecycle.ts +++ b/packages/core/src/lifecycle.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The run {@link Lifecycle}: the build's own hooks merged with any registered * plugins, so the scheduler can notify start/target/finish transitions without diff --git a/packages/core/src/lock.ts b/packages/core/src/lock.ts index 2a8886a8..a5711348 100644 --- a/packages/core/src/lock.ts +++ b/packages/core/src/lock.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * A target's cross-run lock: acquire it (if declared) before the body runs, * heartbeat it at half its TTL while the body runs, and release it on every exit diff --git a/packages/core/src/mcp/audit.ts b/packages/core/src/mcp/audit.ts index f8cb2b98..2d5df1ff 100644 --- a/packages/core/src/mcp/audit.ts +++ b/packages/core/src/mcp/audit.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The MCP audit log: a store-level, append-only trail of tool calls kept in a * single fixed-id run record, so it needs no new {@link diff --git a/packages/core/src/mcp/authz.ts b/packages/core/src/mcp/authz.ts index b96140b1..9b66ffdb 100644 --- a/packages/core/src/mcp/authz.ts +++ b/packages/core/src/mcp/authz.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Authorization helpers for the MCP server: a glob-based target allow-list * matcher and a constant-time token comparison. Shared by the HTTP transport diff --git a/packages/core/src/mcp/command.ts b/packages/core/src/mcp/command.ts index 32f4a574..7d4db7e4 100644 --- a/packages/core/src/mcp/command.ts +++ b/packages/core/src/mcp/command.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The `zuke mcp` reserved command: run an MCP server over the build, on stdio * (the default) or over HTTP (`--http `). diff --git a/packages/core/src/mcp/http.ts b/packages/core/src/mcp/http.ts index 519de9af..ff2727a8 100644 --- a/packages/core/src/mcp/http.ts +++ b/packages/core/src/mcp/http.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * A dependency-free HTTP transport for the MCP server, implementing the * client→server half of MCP's streamable-HTTP transport: a JSON-RPC message is diff --git a/packages/core/src/mcp/jsonrpc.ts b/packages/core/src/mcp/jsonrpc.ts index 7bb410cc..34997123 100644 --- a/packages/core/src/mcp/jsonrpc.ts +++ b/packages/core/src/mcp/jsonrpc.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * A minimal, dependency-free JSON-RPC 2.0 layer for the MCP server. * diff --git a/packages/core/src/mcp/registry_server.ts b/packages/core/src/mcp/registry_server.ts index af425fc3..8ac258a8 100644 --- a/packages/core/src/mcp/registry_server.ts +++ b/packages/core/src/mcp/registry_server.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * A registry-backed MCP server — dynamic pipeline discovery. * diff --git a/packages/core/src/mcp/runtools.ts b/packages/core/src/mcp/runtools.ts index 6db6573e..7d1efbf9 100644 --- a/packages/core/src/mcp/runtools.ts +++ b/packages/core/src/mcp/runtools.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The store-backed MCP tools: `list_runs`/`show_run` (read-only, exposed * whenever a state store resolves) and `signal_run`/`resume_check` (mutating, diff --git a/packages/core/src/mcp/server.ts b/packages/core/src/mcp/server.ts index e4e6d9d3..3fe293cf 100644 --- a/packages/core/src/mcp/server.ts +++ b/packages/core/src/mcp/server.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * An MCP (Model Context Protocol) server over a Zuke build. * diff --git a/packages/core/src/npm_tool.ts b/packages/core/src/npm_tool.ts index 71264c55..500cb17c 100644 --- a/packages/core/src/npm_tool.ts +++ b/packages/core/src/npm_tool.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Provision an npm-registry package as a runnable, version-pinned tool — the * npm-ecosystem counterpart to {@link "./install.ts".installRelease}. diff --git a/packages/core/src/ownership.ts b/packages/core/src/ownership.ts index f3f5d9a4..b8a5fad5 100644 --- a/packages/core/src/ownership.ts +++ b/packages/core/src/ownership.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Which build a run belongs to. * diff --git a/packages/core/src/params.ts b/packages/core/src/params.ts index 4ac0dc33..6aac8626 100644 --- a/packages/core/src/params.ts +++ b/packages/core/src/params.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Build parameters: typed, injectable inputs resolved from CLI flags and * environment variables before targets run. diff --git a/packages/core/src/path.ts b/packages/core/src/path.ts index 2da66535..88d6ec15 100644 --- a/packages/core/src/path.ts +++ b/packages/core/src/path.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Ergonomic, immutable file paths for build scripts. * diff --git a/packages/core/src/plugin.ts b/packages/core/src/plugin.ts index f41749a0..ee3b417d 100644 --- a/packages/core/src/plugin.ts +++ b/packages/core/src/plugin.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The plugin contract: observe a build's lifecycle without subclassing * {@link Build} or forking Zuke. diff --git a/packages/core/src/reap.ts b/packages/core/src/reap.ts index 8ea12132..2e629262 100644 --- a/packages/core/src/reap.ts +++ b/packages/core/src/reap.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Reaping: finding runs whose process is gone, and giving them somewhere to go. * diff --git a/packages/core/src/redact.ts b/packages/core/src/redact.ts index c0147c04..965de87a 100644 --- a/packages/core/src/redact.ts +++ b/packages/core/src/redact.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Secret redaction for reporter output. * diff --git a/packages/core/src/registry/descriptor.ts b/packages/core/src/registry/descriptor.ts index 07ca9628..ef3e3364 100644 --- a/packages/core/src/registry/descriptor.ts +++ b/packages/core/src/registry/descriptor.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The build-registry vocabulary: a {@link BuildDescriptor} — a small, versioned * record describing one pipeline (build) that has registered itself — and its diff --git a/packages/core/src/registry/fs_registry.ts b/packages/core/src/registry/fs_registry.ts index f1147b4f..0bb6aa5c 100644 --- a/packages/core/src/registry/fs_registry.ts +++ b/packages/core/src/registry/fs_registry.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * {@link FileSystemBuildRegistry} — a {@link BuildRegistry} backed by one JSON * file per build under a directory (default `/.zuke/builds`). diff --git a/packages/core/src/registry/http_registry.ts b/packages/core/src/registry/http_registry.ts index 8d0a1e8b..1d498531 100644 --- a/packages/core/src/registry/http_registry.ts +++ b/packages/core/src/registry/http_registry.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * {@link HttpBuildRegistry} — a {@link BuildRegistry} backed by a hosted HTTP * service, the production path for the build catalog. It rides the same REST diff --git a/packages/core/src/registry/launch_policy.ts b/packages/core/src/registry/launch_policy.ts index 342d83f9..67345555 100644 --- a/packages/core/src/registry/launch_policy.ts +++ b/packages/core/src/registry/launch_policy.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The policy that decides whether a {@link BuildLocation} read out of a build * registry may be spawned. diff --git a/packages/core/src/registry/register.ts b/packages/core/src/registry/register.ts index 52728880..8803d715 100644 --- a/packages/core/src/registry/register.ts +++ b/packages/core/src/registry/register.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The `zuke register` command: write (or refresh) this build's * {@link BuildDescriptor} into a {@link BuildRegistry}, so an MCP host driven by diff --git a/packages/core/src/registry/registry.ts b/packages/core/src/registry/registry.ts index 25647597..dabc369b 100644 --- a/packages/core/src/registry/registry.ts +++ b/packages/core/src/registry/registry.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The pluggable {@link BuildRegistry} — a catalog of the builds (pipelines) that * exist and where they live — kept **separate** from the run diff --git a/packages/core/src/registry/resolve.ts b/packages/core/src/registry/resolve.ts index 7b080e93..29350fd8 100644 --- a/packages/core/src/registry/resolve.ts +++ b/packages/core/src/registry/resolve.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Selection of the {@link BuildRegistry} for a command, by precedence — the * registry analogue of {@link "../state/resolve.ts".resolveStateStore}. Kept a diff --git a/packages/core/src/remote_cache.ts b/packages/core/src/remote_cache.ts index b5011c64..8c680354 100644 --- a/packages/core/src/remote_cache.ts +++ b/packages/core/src/remote_cache.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Remote build cache: share a target's built {@link TargetBuilder.outputs} * across machines. The incremental {@link "./cache.ts" | cache} skips a target diff --git a/packages/core/src/render.ts b/packages/core/src/render.ts index d5d5fd7d..89a052e0 100644 --- a/packages/core/src/render.ts +++ b/packages/core/src/render.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Primitive terminal rendering, shared by the executor's build reporting * (`./report.ts`) and the `@zuke/console` package: ANSI styling, terminal-width diff --git a/packages/core/src/renderer.ts b/packages/core/src/renderer.ts index fe87b219..16209472 100644 --- a/packages/core/src/renderer.ts +++ b/packages/core/src/renderer.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The {@link Renderer} seam: the executor draws every banner through this * interface, so a build can swap the look of its output without touching the diff --git a/packages/core/src/report.ts b/packages/core/src/report.ts index 7f5edec1..fa72765a 100644 --- a/packages/core/src/report.ts +++ b/packages/core/src/report.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Console and job-summary rendering for the executor. * diff --git a/packages/core/src/reporter.ts b/packages/core/src/reporter.ts index bad1022c..9f51ef60 100644 --- a/packages/core/src/reporter.ts +++ b/packages/core/src/reporter.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The executor's output sink — the {@link Reporter} interface plus the small set * of reporter wrappers the engine composes: the console/silent defaults, a diff --git a/packages/core/src/resume.ts b/packages/core/src/resume.ts index 41618401..b916a445 100644 --- a/packages/core/src/resume.ts +++ b/packages/core/src/resume.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Resume a suspended run — the second half of external-event waits (see * `./wait.ts`). diff --git a/packages/core/src/run_support.ts b/packages/core/src/run_support.ts index a0d1db6d..ecf98815 100644 --- a/packages/core/src/run_support.ts +++ b/packages/core/src/run_support.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Shared value types for the execution engine — the per-run environment and the * per-target/-run outcome shapes threaded between the scheduler, lock, and wait diff --git a/packages/core/src/runs.ts b/packages/core/src/runs.ts index d707aab5..23c349f4 100644 --- a/packages/core/src/runs.ts +++ b/packages/core/src/runs.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The `zuke runs` command: list persisted run records and show one run's full * detail from a {@link "./state/store.ts".StateStore}, reconstructing a run's diff --git a/packages/core/src/scheduler.ts b/packages/core/src/scheduler.ts index 97628357..9898af33 100644 --- a/packages/core/src/scheduler.ts +++ b/packages/core/src/scheduler.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The execution engine: running one target (conditions, cache, service, wait * gate, lock, body with timeout/retry/remediation) and the two schedulers that diff --git a/packages/core/src/secret.ts b/packages/core/src/secret.ts index 08935b81..9fcc38c1 100644 --- a/packages/core/src/secret.ts +++ b/packages/core/src/secret.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Secret sources: resolve a `secret` parameter's value at run time from an * external provider instead of requiring it pre-set in the environment. diff --git a/packages/core/src/service.ts b/packages/core/src/service.ts index 539edcba..4b117db1 100644 --- a/packages/core/src/service.ts +++ b/packages/core/src/service.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Service targets: long-lived processes that run **while** other targets * execute, rather than running to completion. diff --git a/packages/core/src/shell.ts b/packages/core/src/shell.ts index 6a56fa6d..7967258d 100644 --- a/packages/core/src/shell.ts +++ b/packages/core/src/shell.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Ergonomic process execution built on `Deno.Command`, exposed as the `$` * tagged template. diff --git a/packages/core/src/split_args.ts b/packages/core/src/split_args.ts index 2bcb250c..14ff9769 100644 --- a/packages/core/src/split_args.ts +++ b/packages/core/src/split_args.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Split a command **string** into an argv array using POSIX quoting rules. * diff --git a/packages/core/src/state/cancel_lock.ts b/packages/core/src/state/cancel_lock.ts index b3afda89..c431eca5 100644 --- a/packages/core/src/state/cancel_lock.ts +++ b/packages/core/src/state/cancel_lock.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The per-run cancellation lock. Exactly one process may drive a run's * compensation walk at a time — an in-process executor handling Ctrl-C/SIGTERM, diff --git a/packages/core/src/state/fs_store.ts b/packages/core/src/state/fs_store.ts index 2746e8e3..2bf270ac 100644 --- a/packages/core/src/state/fs_store.ts +++ b/packages/core/src/state/fs_store.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * {@link FileSystemStateStore} — a {@link StateStore} backed by one JSON file * per run under a directory (default `/.zuke/runs`). diff --git a/packages/core/src/state/http_store.ts b/packages/core/src/state/http_store.ts index 96b67700..f9a0d879 100644 --- a/packages/core/src/state/http_store.ts +++ b/packages/core/src/state/http_store.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * {@link HttpStateStore} — a {@link StateStore} backed by a hosted HTTP service, * the production path for durable run state. See `docs/state-api.md` for the diff --git a/packages/core/src/state/lock.ts b/packages/core/src/state/lock.ts index e722c894..d170d402 100644 --- a/packages/core/src/state/lock.ts +++ b/packages/core/src/state/lock.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Cross-run locks: the {@link LockHolder} identity, the typed * {@link LockConflictError}, the {@link lockKey} joiner, and the stored lock diff --git a/packages/core/src/state/mutex.ts b/packages/core/src/state/mutex.ts index e4f8e0c9..024e5d36 100644 --- a/packages/core/src/state/mutex.ts +++ b/packages/core/src/state/mutex.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * {@link withFileMutex} — the filesystem mutex the single-host backends hold * while they publish a file: {@link "./fs_store.ts".FileSystemStateStore} for run diff --git a/packages/core/src/state/protocol.ts b/packages/core/src/state/protocol.ts index c7e3e2b3..39053dad 100644 --- a/packages/core/src/state/protocol.ts +++ b/packages/core/src/state/protocol.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The state-api wire-protocol version — the single contract shared by the HTTP * {@link "./http_store.ts".HttpStateStore} run/lock endpoints and the diff --git a/packages/core/src/state/record.ts b/packages/core/src/state/record.ts index 57887f6c..da63ef12 100644 --- a/packages/core/src/state/record.ts +++ b/packages/core/src/state/record.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Building a {@link RunRecord} from a planned build, and the small mappings the * executor needs to keep the record current. diff --git a/packages/core/src/state/resolve.ts b/packages/core/src/state/resolve.ts index 006e7df4..09ee35e3 100644 --- a/packages/core/src/state/resolve.ts +++ b/packages/core/src/state/resolve.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Selection of the {@link StateStore} for a run, by precedence — the state * analogue of {@link "../remote_cache.ts".resolveRemoteStore}. diff --git a/packages/core/src/state/run_lease.ts b/packages/core/src/state/run_lease.ts index d6d28468..bf7688ab 100644 --- a/packages/core/src/state/run_lease.ts +++ b/packages/core/src/state/run_lease.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Leases over a run: a TTL'd claim, renewed by a heartbeat, that says a live * process is working on it. diff --git a/packages/core/src/state/store.ts b/packages/core/src/state/store.ts index bf3f929d..f04460ae 100644 --- a/packages/core/src/state/store.ts +++ b/packages/core/src/state/store.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The pluggable {@link StateStore} — persistence for {@link RunRecord}s — and * its injected filesystem host. diff --git a/packages/core/src/state/types.ts b/packages/core/src/state/types.ts index d6d35a9e..dd90a2f4 100644 --- a/packages/core/src/state/types.ts +++ b/packages/core/src/state/types.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The durable run-state vocabulary: {@link RunRecord} and its parts. * diff --git a/packages/core/src/state/writer.ts b/packages/core/src/state/writer.ts index bee8800d..17b8a80c 100644 --- a/packages/core/src/state/writer.ts +++ b/packages/core/src/state/writer.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * {@link RunStateWriter} — the executor's live view of a run's {@link RunRecord}, * persisting each transition to a {@link StateStore}. diff --git a/packages/core/src/target.ts b/packages/core/src/target.ts index 4f4dded9..a3513c63 100644 --- a/packages/core/src/target.ts +++ b/packages/core/src/target.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Target authoring API: the `target()` fluent builder, the `group()` parallel * batch, and the `Target` type. diff --git a/packages/core/src/terminate.ts b/packages/core/src/terminate.ts index 32c3f7d2..86462800 100644 --- a/packages/core/src/terminate.ts +++ b/packages/core/src/terminate.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The one way Zuke ends a child process: signal politely, wait out a grace * window, then `SIGKILL`. diff --git a/packages/core/src/tool.ts b/packages/core/src/tool.ts index fc52e4d9..b135cc7e 100644 --- a/packages/core/src/tool.ts +++ b/packages/core/src/tool.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `ToolTasks` and `toolchain()` — provision the external CLIs a build drives, * in Zuke's fluent settings-lambda style. A build fetches the tools it needs diff --git a/packages/core/src/tooling.ts b/packages/core/src/tooling.ts index 4fd4b64d..85efeae5 100644 --- a/packages/core/src/tooling.ts +++ b/packages/core/src/tooling.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Foundations for typed tool wrappers (settings-lambda task functions). * diff --git a/packages/core/src/tooling_conformance.ts b/packages/core/src/tooling_conformance.ts index cf60e4d8..4db223e8 100644 --- a/packages/core/src/tooling_conformance.ts +++ b/packages/core/src/tooling_conformance.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * A conformance kit for tool-wrapper tests. * diff --git a/packages/core/src/wait.ts b/packages/core/src/wait.ts index 81646203..9f5e9c2d 100644 --- a/packages/core/src/wait.ts +++ b/packages/core/src/wait.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * External-event wait triggers for {@link "./target.ts".TargetBuilder.waitsFor}. * diff --git a/packages/core/src/wait_resolution.ts b/packages/core/src/wait_resolution.ts index c3ff784c..bd033b0c 100644 --- a/packages/core/src/wait_resolution.ts +++ b/packages/core/src/wait_resolution.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Resolving a target's `.waitsFor(...)` gate: run its settings lambda, evaluate * the trigger against the run's signals, and build the {@link WaitState} to diff --git a/packages/core/src/yaml.ts b/packages/core/src/yaml.ts index b7758b6b..e7fba488 100644 --- a/packages/core/src/yaml.ts +++ b/packages/core/src/yaml.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * A tiny, dependency-free YAML emitter for the structured subset Zuke needs to * generate CI configuration: mappings, sequences, and scalars (strings, diff --git a/packages/core/tests/_assert.ts b/packages/core/tests/_assert.ts index 009ba908..d9b1ec52 100644 --- a/packages/core/tests/_assert.ts +++ b/packages/core/tests/_assert.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Minimal assertion helpers, kept local so the test suite has zero network * dependencies (the sandbox blocks the JSR registry). diff --git a/packages/core/tests/_fakes.ts b/packages/core/tests/_fakes.ts index 0781d26b..051327a4 100644 --- a/packages/core/tests/_fakes.ts +++ b/packages/core/tests/_fakes.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** Test doubles for the core CLI's injectable seams. */ import type { GraphHost } from "../src/graph_view.ts"; diff --git a/packages/core/tests/_tar.ts b/packages/core/tests/_tar.ts index 000a3554..d601f5a9 100644 --- a/packages/core/tests/_tar.ts +++ b/packages/core/tests/_tar.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Hand-built `ustar`/GNU tar archives for tests. The production `tar()` writer * refuses names over 100 bytes, so archives exercising the long-path forms — diff --git a/packages/core/tests/_zip.ts b/packages/core/tests/_zip.ts index 26f649f0..ba9e5ad6 100644 --- a/packages/core/tests/_zip.ts +++ b/packages/core/tests/_zip.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Build a `.zip` archive in memory for the compression/install tests — no * network, no ambient tools. Supports the two methods a release asset uses diff --git a/packages/core/tests/affected_test.ts b/packages/core/tests/affected_test.ts index b813b4e3..8bc9f36e 100644 --- a/packages/core/tests/affected_test.ts +++ b/packages/core/tests/affected_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects, diff --git a/packages/core/tests/announce_test.ts b/packages/core/tests/announce_test.ts index 82982fb6..f0e3ae34 100644 --- a/packages/core/tests/announce_test.ts +++ b/packages/core/tests/announce_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects } from "./_assert.ts"; import { AnnounceError, diff --git a/packages/core/tests/assert_helper_test.ts b/packages/core/tests/assert_helper_test.ts index fbe705b3..84211086 100644 --- a/packages/core/tests/assert_helper_test.ts +++ b/packages/core/tests/assert_helper_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Self-tests for the local assertion helper. `deepEqual` once compared only * `Object.keys`, so any two `Set`s / `Map`s / `Date`s (which expose no diff --git a/packages/core/tests/assert_test.ts b/packages/core/tests/assert_test.ts index 3d3cd096..7d27135a 100644 --- a/packages/core/tests/assert_test.ts +++ b/packages/core/tests/assert_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects, assertThrows } from "./_assert.ts"; import { assert, diff --git a/packages/core/tests/backend_url_test.ts b/packages/core/tests/backend_url_test.ts index 11e72aec..3b4c2628 100644 --- a/packages/core/tests/backend_url_test.ts +++ b/packages/core/tests/backend_url_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Unit: the transport guard on the backends Zuke authenticates to and trusts * answers from — the state service, the build registry, and the remote cache. diff --git a/packages/core/tests/cache_test.ts b/packages/core/tests/cache_test.ts index 6d882b24..efdc8204 100644 --- a/packages/core/tests/cache_test.ts +++ b/packages/core/tests/cache_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertStringIncludes } from "./_assert.ts"; import { target } from "../src/target.ts"; import { diff --git a/packages/core/tests/cancel_contract_test.ts b/packages/core/tests/cancel_contract_test.ts index 280cb5fe..33e9023a 100644 --- a/packages/core/tests/cancel_contract_test.ts +++ b/packages/core/tests/cancel_contract_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The observable contract of `zuke cancel`, pinned exactly. * diff --git a/packages/core/tests/cancel_test.ts b/packages/core/tests/cancel_test.ts index 41ba97ff..d64c6c61 100644 --- a/packages/core/tests/cancel_test.ts +++ b/packages/core/tests/cancel_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects, diff --git a/packages/core/tests/capture_test.ts b/packages/core/tests/capture_test.ts index 3dfe773b..8e209b07 100644 --- a/packages/core/tests/capture_test.ts +++ b/packages/core/tests/capture_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "./_assert.ts"; import { captureStream, diff --git a/packages/core/tests/ci_schedule_test.ts b/packages/core/tests/ci_schedule_test.ts index 86bea07f..d20960d2 100644 --- a/packages/core/tests/ci_schedule_test.ts +++ b/packages/core/tests/ci_schedule_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Unit tests for the timezone-aware cron compiler: UTC-passthrough, fixed-offset * and DST shifting, the friendly-error boundaries, and the generated guard shell. diff --git a/packages/core/tests/ci_test.ts b/packages/core/tests/ci_test.ts index 01be0932..db41de88 100644 --- a/packages/core/tests/ci_test.ts +++ b/packages/core/tests/ci_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertStringIncludes } from "./_assert.ts"; import { cicd, diff --git a/packages/core/tests/cli_test.ts b/packages/core/tests/cli_test.ts index c06e2946..5ac52852 100644 --- a/packages/core/tests/cli_test.ts +++ b/packages/core/tests/cli_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertStringIncludes, assertThrows } from "./_assert.ts"; import { Build, cicd, group, type Plugin, target } from "../mod.ts"; import { diff --git a/packages/core/tests/completions_install_test.ts b/packages/core/tests/completions_install_test.ts index 4eb08ab4..676a6258 100644 --- a/packages/core/tests/completions_install_test.ts +++ b/packages/core/tests/completions_install_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertStringIncludes } from "./_assert.ts"; import { Build, target } from "../mod.ts"; import { discoverTargets } from "../src/build.ts"; diff --git a/packages/core/tests/completions_test.ts b/packages/core/tests/completions_test.ts index 0100103e..a62fc0fb 100644 --- a/packages/core/tests/completions_test.ts +++ b/packages/core/tests/completions_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertStringIncludes } from "./_assert.ts"; import { Build, parameter, target } from "../mod.ts"; import { discoverTargets } from "../src/build.ts"; diff --git a/packages/core/tests/compression_test.ts b/packages/core/tests/compression_test.ts index f7850b6d..30533dde 100644 --- a/packages/core/tests/compression_test.ts +++ b/packages/core/tests/compression_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects, assertThrows } from "./_assert.ts"; import { assertSafeEntryName, diff --git a/packages/core/tests/config_test.ts b/packages/core/tests/config_test.ts index 00aa1e38..30a20025 100644 --- a/packages/core/tests/config_test.ts +++ b/packages/core/tests/config_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertThrows } from "./_assert.ts"; import { absolutePath } from "../src/path.ts"; import { diff --git a/packages/core/tests/conformance_test.ts b/packages/core/tests/conformance_test.ts index 5603a910..ab66b451 100644 --- a/packages/core/tests/conformance_test.ts +++ b/packages/core/tests/conformance_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The state-api conformance kit, run against Zuke's own filesystem backend (it * must pass), a deliberately CAS-violating fake (it must fail loudly), and the diff --git a/packages/core/tests/describe_test.ts b/packages/core/tests/describe_test.ts index 36bd07e9..43040e78 100644 --- a/packages/core/tests/describe_test.ts +++ b/packages/core/tests/describe_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "./_assert.ts"; import { Build, describeCli, parameter, target } from "../mod.ts"; import { BUILTIN_FLAGS, RESERVED_COMMANDS } from "../src/cli_spec.ts"; diff --git a/packages/core/tests/entry_test.ts b/packages/core/tests/entry_test.ts index 68984cc5..b71bfa64 100644 --- a/packages/core/tests/entry_test.ts +++ b/packages/core/tests/entry_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "./_assert.ts"; import { callerModule, isEntryModule } from "../src/entry.ts"; diff --git a/packages/core/tests/env_test.ts b/packages/core/tests/env_test.ts index 878a5de3..f55a273f 100644 --- a/packages/core/tests/env_test.ts +++ b/packages/core/tests/env_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "./_assert.ts"; import { prependPath } from "../src/env.ts"; diff --git a/packages/core/tests/executor_test.ts b/packages/core/tests/executor_test.ts index d01839dd..8e6feeb7 100644 --- a/packages/core/tests/executor_test.ts +++ b/packages/core/tests/executor_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects, diff --git a/packages/core/tests/file_test.ts b/packages/core/tests/file_test.ts index 60cd41b9..9537a9de 100644 --- a/packages/core/tests/file_test.ts +++ b/packages/core/tests/file_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects, assertThrows } from "./_assert.ts"; import { FileTasks } from "../src/file.ts"; diff --git a/packages/core/tests/foreach_test.ts b/packages/core/tests/foreach_test.ts index ba2b2f3b..00452005 100644 --- a/packages/core/tests/foreach_test.ts +++ b/packages/core/tests/foreach_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertStringIncludes, assertThrows } from "./_assert.ts"; import { Build, discoverTargets } from "../src/build.ts"; import { target } from "../src/target.ts"; diff --git a/packages/core/tests/glob_test.ts b/packages/core/tests/glob_test.ts index 719a339b..d9c7176c 100644 --- a/packages/core/tests/glob_test.ts +++ b/packages/core/tests/glob_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "./_assert.ts"; import { glob, globToRegExp } from "../src/glob.ts"; diff --git a/packages/core/tests/graph_html_test.ts b/packages/core/tests/graph_html_test.ts index 752017d0..26bc9d62 100644 --- a/packages/core/tests/graph_html_test.ts +++ b/packages/core/tests/graph_html_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "./_assert.ts"; import { Build, group, target } from "../mod.ts"; import { discoverGroups, discoverTargets } from "../src/build.ts"; diff --git a/packages/core/tests/graph_test.ts b/packages/core/tests/graph_test.ts index 69378f1b..a42a5bf2 100644 --- a/packages/core/tests/graph_test.ts +++ b/packages/core/tests/graph_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertThrows } from "./_assert.ts"; import { Build, discoverTargets, resolveOrderingEdges } from "../src/build.ts"; import { target, type TargetBuilder } from "../src/target.ts"; diff --git a/packages/core/tests/graph_view_test.ts b/packages/core/tests/graph_view_test.ts index 879addca..0735ba00 100644 --- a/packages/core/tests/graph_view_test.ts +++ b/packages/core/tests/graph_view_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "./_assert.ts"; import { Build, target } from "../mod.ts"; import { discoverTargets } from "../src/build.ts"; diff --git a/packages/core/tests/host_test.ts b/packages/core/tests/host_test.ts index ec81b629..7fafb648 100644 --- a/packages/core/tests/host_test.ts +++ b/packages/core/tests/host_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "./_assert.ts"; import { type CiHost, diff --git a/packages/core/tests/http_test.ts b/packages/core/tests/http_test.ts index 1aa035ac..f977ec6e 100644 --- a/packages/core/tests/http_test.ts +++ b/packages/core/tests/http_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects } from "./_assert.ts"; import { httpDownload, diff --git a/packages/core/tests/install_test.ts b/packages/core/tests/install_test.ts index 2c519f42..84c29fd8 100644 --- a/packages/core/tests/install_test.ts +++ b/packages/core/tests/install_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects } from "./_assert.ts"; import { type DownloadFn, diff --git a/packages/core/tests/install_tree_test.ts b/packages/core/tests/install_tree_test.ts index 0294e90e..27c7fb76 100644 --- a/packages/core/tests/install_tree_test.ts +++ b/packages/core/tests/install_tree_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects } from "./_assert.ts"; import { type DownloadFn, installTree } from "../src/install.ts"; import { gzip, tar, type TarEntry } from "../src/compression.ts"; diff --git a/packages/core/tests/internal_test.ts b/packages/core/tests/internal_test.ts index c26b9b6b..139c92f0 100644 --- a/packages/core/tests/internal_test.ts +++ b/packages/core/tests/internal_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects } from "./_assert.ts"; import { defaultReadEnv, diff --git a/packages/core/tests/job_summary_test.ts b/packages/core/tests/job_summary_test.ts index 1bb25407..f4ac0153 100644 --- a/packages/core/tests/job_summary_test.ts +++ b/packages/core/tests/job_summary_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "./_assert.ts"; import { appendJobSummary } from "../src/job_summary.ts"; diff --git a/packages/core/tests/launch_policy_test.ts b/packages/core/tests/launch_policy_test.ts index 4fc8533f..2e3df701 100644 --- a/packages/core/tests/launch_policy_test.ts +++ b/packages/core/tests/launch_policy_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Unit: {@link launchDenial} — the policy deciding whether a registry * descriptor's launch location may be spawned. The registry server runs what diff --git a/packages/core/tests/mcp_authz_closure_test.ts b/packages/core/tests/mcp_authz_closure_test.ts index 8fb9d337..7911da05 100644 --- a/packages/core/tests/mcp_authz_closure_test.ts +++ b/packages/core/tests/mcp_authz_closure_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Authorization over a run's **whole plan**, not just its root target. * diff --git a/packages/core/tests/mcp_authz_test.ts b/packages/core/tests/mcp_authz_test.ts index 0067524b..aab7da5d 100644 --- a/packages/core/tests/mcp_authz_test.ts +++ b/packages/core/tests/mcp_authz_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "./_assert.ts"; import { targetMatcher, timingSafeEqual } from "../src/mcp/authz.ts"; diff --git a/packages/core/tests/mcp_hardening_test.ts b/packages/core/tests/mcp_hardening_test.ts index ff403dca..f81b2591 100644 --- a/packages/core/tests/mcp_hardening_test.ts +++ b/packages/core/tests/mcp_hardening_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertStringIncludes } from "./_assert.ts"; import { Build, parameter, target } from "../mod.ts"; import { McpServer, type McpServerOptions } from "../src/mcp/server.ts"; diff --git a/packages/core/tests/mcp_http_test.ts b/packages/core/tests/mcp_http_test.ts index 2b0d70cc..d9097f93 100644 --- a/packages/core/tests/mcp_http_test.ts +++ b/packages/core/tests/mcp_http_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertStringIncludes } from "./_assert.ts"; import { Build, type McpRequestContext, target } from "../mod.ts"; import type { JsonRpcResponse } from "../src/mcp/jsonrpc.ts"; diff --git a/packages/core/tests/mcp_test.ts b/packages/core/tests/mcp_test.ts index c9e01be5..4f48f20f 100644 --- a/packages/core/tests/mcp_test.ts +++ b/packages/core/tests/mcp_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertStringIncludes } from "./_assert.ts"; import { Build, parameter, target } from "../mod.ts"; import { diff --git a/packages/core/tests/npm_tool_test.ts b/packages/core/tests/npm_tool_test.ts index 7abea9b6..64c267c5 100644 --- a/packages/core/tests/npm_tool_test.ts +++ b/packages/core/tests/npm_tool_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects, diff --git a/packages/core/tests/outcome_view_test.ts b/packages/core/tests/outcome_view_test.ts index 89ff8a7e..f77ca767 100644 --- a/packages/core/tests/outcome_view_test.ts +++ b/packages/core/tests/outcome_view_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Unit tests for the outcome views behind `ctx.outcomeOf(...)` — how a status * and a run-record row become the shape a target body reads. diff --git a/packages/core/tests/ownership_test.ts b/packages/core/tests/ownership_test.ts index 604c346d..8e35cc67 100644 --- a/packages/core/tests/ownership_test.ts +++ b/packages/core/tests/ownership_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Unit tests for run ownership — which build a run belongs to. * diff --git a/packages/core/tests/params_test.ts b/packages/core/tests/params_test.ts index 77a8d29a..ecf1a79f 100644 --- a/packages/core/tests/params_test.ts +++ b/packages/core/tests/params_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertStringIncludes, assertThrows } from "./_assert.ts"; import { Build, target } from "../mod.ts"; import { discoverTargets } from "../src/build.ts"; diff --git a/packages/core/tests/path_test.ts b/packages/core/tests/path_test.ts index c9d14f61..27956ed9 100644 --- a/packages/core/tests/path_test.ts +++ b/packages/core/tests/path_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertThrows } from "./_assert.ts"; import { absolutePath } from "../src/path.ts"; import { tokenize } from "../src/shell.ts"; diff --git a/packages/core/tests/reap_test.ts b/packages/core/tests/reap_test.ts index d465e3b2..7ec3edef 100644 --- a/packages/core/tests/reap_test.ts +++ b/packages/core/tests/reap_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Unit tests for reaping — deciding, for a run that claims to be running, * whether anyone is still there. diff --git a/packages/core/tests/redact_test.ts b/packages/core/tests/redact_test.ts index a592b00d..54f6ecc4 100644 --- a/packages/core/tests/redact_test.ts +++ b/packages/core/tests/redact_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertStringIncludes } from "./_assert.ts"; import { REDACTED, Redactor } from "../src/redact.ts"; import { emitActionsMasks } from "../src/execute_output.ts"; diff --git a/packages/core/tests/register_test.ts b/packages/core/tests/register_test.ts index caf8159e..533c1bcd 100644 --- a/packages/core/tests/register_test.ts +++ b/packages/core/tests/register_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Unit tests for the `zuke register` command ({@link registerCommand}): the * descriptor it builds, its secret-free surface, idempotent compare-and-swap diff --git a/packages/core/tests/registry_http_test.ts b/packages/core/tests/registry_http_test.ts index b6b8f852..4f81a2dd 100644 --- a/packages/core/tests/registry_http_test.ts +++ b/packages/core/tests/registry_http_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Unit tests for {@link HttpBuildRegistry}: the REST verbs, ETag/If-Match * compare-and-swap, and untrusted-response validation, all driven through the diff --git a/packages/core/tests/registry_server_test.ts b/packages/core/tests/registry_server_test.ts index 2c9e4c38..b680e5cb 100644 --- a/packages/core/tests/registry_server_test.ts +++ b/packages/core/tests/registry_server_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Unit tests for {@link RegistryMcpServer}: live discovery from the registry, * spawn-based execution through an injected runner (no real subprocess), the M5 diff --git a/packages/core/tests/registry_test.ts b/packages/core/tests/registry_test.ts index 097f17ee..638cb58e 100644 --- a/packages/core/tests/registry_test.ts +++ b/packages/core/tests/registry_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Unit tests for the build-registry vocabulary and the filesystem backend: * descriptor parse/round-trip, {@link FileSystemBuildRegistry} compare-and-swap, diff --git a/packages/core/tests/remote_cache_test.ts b/packages/core/tests/remote_cache_test.ts index 9cfb65f4..941c35ac 100644 --- a/packages/core/tests/remote_cache_test.ts +++ b/packages/core/tests/remote_cache_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects, diff --git a/packages/core/tests/render_test.ts b/packages/core/tests/render_test.ts index af6a142a..5cb94a3a 100644 --- a/packages/core/tests/render_test.ts +++ b/packages/core/tests/render_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { box, isStyleName, diff --git a/packages/core/tests/report_test.ts b/packages/core/tests/report_test.ts index 1df256ae..c23c726a 100644 --- a/packages/core/tests/report_test.ts +++ b/packages/core/tests/report_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertStringIncludes } from "./_assert.ts"; import { closingLine, diff --git a/packages/core/tests/resume_test.ts b/packages/core/tests/resume_test.ts index f30bbb19..50262100 100644 --- a/packages/core/tests/resume_test.ts +++ b/packages/core/tests/resume_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects, messageOf } from "./_assert.ts"; import { Build, discoverTargets } from "../src/build.ts"; import { target } from "../src/target.ts"; diff --git a/packages/core/tests/run_lease_test.ts b/packages/core/tests/run_lease_test.ts index ceee4e97..c7ff884c 100644 --- a/packages/core/tests/run_lease_test.ts +++ b/packages/core/tests/run_lease_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Unit tests for the run lease — the claim that makes "slow" and "dead" * different things, and the rule about what counts as losing it. diff --git a/packages/core/tests/runs_test.ts b/packages/core/tests/runs_test.ts index 0fad7855..e62219d6 100644 --- a/packages/core/tests/runs_test.ts +++ b/packages/core/tests/runs_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertStringIncludes } from "./_assert.ts"; import { Build } from "../src/build.ts"; import { diff --git a/packages/core/tests/secret_test.ts b/packages/core/tests/secret_test.ts index f0c725c4..5c843a14 100644 --- a/packages/core/tests/secret_test.ts +++ b/packages/core/tests/secret_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects, diff --git a/packages/core/tests/service_test.ts b/packages/core/tests/service_test.ts index 58d7ef43..16adf9cc 100644 --- a/packages/core/tests/service_test.ts +++ b/packages/core/tests/service_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects, diff --git a/packages/core/tests/shell_test.ts b/packages/core/tests/shell_test.ts index d879dc5b..11787b66 100644 --- a/packages/core/tests/shell_test.ts +++ b/packages/core/tests/shell_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects, diff --git a/packages/core/tests/split_args_test.ts b/packages/core/tests/split_args_test.ts index 6ad25310..c95b34bc 100644 --- a/packages/core/tests/split_args_test.ts +++ b/packages/core/tests/split_args_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertStringIncludes, assertThrows } from "./_assert.ts"; import { ShellArgsError, splitShellArgs } from "../src/split_args.ts"; diff --git a/packages/core/tests/state_test.ts b/packages/core/tests/state_test.ts index c5154f82..d7d07a6c 100644 --- a/packages/core/tests/state_test.ts +++ b/packages/core/tests/state_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects, diff --git a/packages/core/tests/target_test.ts b/packages/core/tests/target_test.ts index b656a7e6..c78073db 100644 --- a/packages/core/tests/target_test.ts +++ b/packages/core/tests/target_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertThrows } from "./_assert.ts"; import { Build, discoverGroups, discoverTargets } from "../src/build.ts"; import { Group, group, target, TargetBuilder } from "../src/target.ts"; diff --git a/packages/core/tests/terminate_test.ts b/packages/core/tests/terminate_test.ts index fe6e367c..00635578 100644 --- a/packages/core/tests/terminate_test.ts +++ b/packages/core/tests/terminate_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "./_assert.ts"; import { terminateProcess } from "../src/terminate.ts"; diff --git a/packages/core/tests/tool_test.ts b/packages/core/tests/tool_test.ts index 83c861e1..e283ea95 100644 --- a/packages/core/tests/tool_test.ts +++ b/packages/core/tests/tool_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertThrows } from "./_assert.ts"; import type { DownloadFn, InstallPlatform, Platform } from "../src/install.ts"; import type { NpmRunner } from "../src/npm_tool.ts"; diff --git a/packages/core/tests/tooling_conformance_test.ts b/packages/core/tests/tooling_conformance_test.ts index 00a6ad70..5aece4f1 100644 --- a/packages/core/tests/tooling_conformance_test.ts +++ b/packages/core/tests/tooling_conformance_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects } from "./_assert.ts"; import { CommandOutput } from "../src/shell.ts"; import { diff --git a/packages/core/tests/tooling_test.ts b/packages/core/tests/tooling_test.ts index 8b6211e6..9545eb96 100644 --- a/packages/core/tests/tooling_test.ts +++ b/packages/core/tests/tooling_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects, diff --git a/packages/core/tests/writer_effects_test.ts b/packages/core/tests/writer_effects_test.ts index 834fc64d..f3c1e7e1 100644 --- a/packages/core/tests/writer_effects_test.ts +++ b/packages/core/tests/writer_effects_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Unit tests for the writer's effect methods — the durable intent that has to * land *before* an effect's body runs, and the guard that stops a stale process diff --git a/packages/core/tests/yaml_test.ts b/packages/core/tests/yaml_test.ts index d761c695..7b0b262c 100644 --- a/packages/core/tests/yaml_test.ts +++ b/packages/core/tests/yaml_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "./_assert.ts"; import { annotated, toYaml } from "../src/yaml.ts"; diff --git a/packages/cspell/mod.ts b/packages/cspell/mod.ts index 74cf20da..9cdd73cc 100644 --- a/packages/cspell/mod.ts +++ b/packages/cspell/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/cspell` — typed `cspell` task wrappers for Zuke builds. * diff --git a/packages/cspell/src/cspell.ts b/packages/cspell/src/cspell.ts index fa9862d9..e45ef003 100644 --- a/packages/cspell/src/cspell.ts +++ b/packages/cspell/src/cspell.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `CspellTasks` — typed task functions for the `cspell` spell-checker, in the * same settings-lambda style as the other Zuke tool wrappers: configure a diff --git a/packages/cspell/tests/cspell_test.ts b/packages/cspell/tests/cspell_test.ts index 87039ad1..6a7772f3 100644 --- a/packages/cspell/tests/cspell_test.ts +++ b/packages/cspell/tests/cspell_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects } from "../../core/tests/_assert.ts"; import { ToolNotFoundError } from "@zuke/core/tooling"; import { diff --git a/packages/cypress/mod.ts b/packages/cypress/mod.ts index 8fd20757..480895f3 100644 --- a/packages/cypress/mod.ts +++ b/packages/cypress/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/cypress` — typed `CypressTasks` wrappers for the * [Cypress](https://cypress.io) CLI (end-to-end and component testing), for use diff --git a/packages/cypress/src/cypress.ts b/packages/cypress/src/cypress.ts index 16758f14..667b9f4d 100644 --- a/packages/cypress/src/cypress.ts +++ b/packages/cypress/src/cypress.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `CypressTasks` — typed task functions for the [Cypress](https://cypress.io) * CLI, in the settings-lambda style: configure a fluent settings object in a diff --git a/packages/cypress/tests/cypress_test.ts b/packages/cypress/tests/cypress_test.ts index 9274791c..dcd74a5f 100644 --- a/packages/cypress/tests/cypress_test.ts +++ b/packages/cypress/tests/cypress_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects } from "../../core/tests/_assert.ts"; import { ToolNotFoundError } from "@zuke/core/tooling"; import { diff --git a/packages/deno/mod.ts b/packages/deno/mod.ts index 24eb89ef..58e451eb 100644 --- a/packages/deno/mod.ts +++ b/packages/deno/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/deno` — typed `DenoTasks` wrappers for the `deno` CLI, for use in * Zuke build targets. diff --git a/packages/deno/src/coverage.ts b/packages/deno/src/coverage.ts index f2aaacf9..04e7ba61 100644 --- a/packages/deno/src/coverage.ts +++ b/packages/deno/src/coverage.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Coverage-gate internals for {@link DenoTasks.coverage}. `deno coverage` has no * built-in fail-under flag, so the wrapper parses the LCOV report it emits and diff --git a/packages/deno/src/deno.ts b/packages/deno/src/deno.ts index bb5d65a6..d427f31c 100644 --- a/packages/deno/src/deno.ts +++ b/packages/deno/src/deno.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `DenoTasks` — typed task functions for the `deno` CLI, in the * settings-lambda style: configure a fluent settings object in a lambda, and diff --git a/packages/deno/tests/coverage_test.ts b/packages/deno/tests/coverage_test.ts index f3e7401a..a9872cb8 100644 --- a/packages/deno/tests/coverage_test.ts +++ b/packages/deno/tests/coverage_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects, diff --git a/packages/deno/tests/deno_test.ts b/packages/deno/tests/deno_test.ts index 1a0ab906..0fb4a174 100644 --- a/packages/deno/tests/deno_test.ts +++ b/packages/deno/tests/deno_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects, diff --git a/packages/docker-compose/mod.ts b/packages/docker-compose/mod.ts index 760a5a71..207c2d76 100644 --- a/packages/docker-compose/mod.ts +++ b/packages/docker-compose/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/docker-compose` — typed Docker Compose task wrappers for Zuke builds. * diff --git a/packages/docker-compose/src/docker_compose.ts b/packages/docker-compose/src/docker_compose.ts index 6beaf8e7..d306dd11 100644 --- a/packages/docker-compose/src/docker_compose.ts +++ b/packages/docker-compose/src/docker_compose.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `DockerComposeTasks` — typed task functions for Docker Compose, in the same * settings-lambda style as the other Zuke tool wrappers: configure a fluent diff --git a/packages/docker-compose/tests/docker_compose_test.ts b/packages/docker-compose/tests/docker_compose_test.ts index f13f6059..d6697752 100644 --- a/packages/docker-compose/tests/docker_compose_test.ts +++ b/packages/docker-compose/tests/docker_compose_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects, diff --git a/packages/docker/mod.ts b/packages/docker/mod.ts index 417081f5..0165965e 100644 --- a/packages/docker/mod.ts +++ b/packages/docker/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/docker` — typed `docker` CLI task wrappers for Zuke builds. * diff --git a/packages/docker/src/docker.ts b/packages/docker/src/docker.ts index 0de985b3..3cc05241 100644 --- a/packages/docker/src/docker.ts +++ b/packages/docker/src/docker.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `DockerTasks` — typed task functions for the `docker` CLI, in the same * settings-lambda style as the other Zuke tool wrappers: configure a fluent diff --git a/packages/docker/tests/docker_test.ts b/packages/docker/tests/docker_test.ts index 40748df3..c4ae7cd1 100644 --- a/packages/docker/tests/docker_test.ts +++ b/packages/docker/tests/docker_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects, diff --git a/packages/docs/mod.ts b/packages/docs/mod.ts index df1fc6f9..1aeac17e 100644 --- a/packages/docs/mod.ts +++ b/packages/docs/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/docs` — typed tasks that turn already-generated API documentation into * agent-friendly artifacts, so neither humans nor agents have to guess an API. diff --git a/packages/docs/src/doc_lint.ts b/packages/docs/src/doc_lint.ts index fdc6024f..8a7e3454 100644 --- a/packages/docs/src/doc_lint.ts +++ b/packages/docs/src/doc_lint.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Parsing and classification for `deno doc --lint` output — the pure core of * the documentation-quality gate. diff --git a/packages/docs/src/generate.ts b/packages/docs/src/generate.ts index be1b4bba..f8dd344a 100644 --- a/packages/docs/src/generate.ts +++ b/packages/docs/src/generate.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Assemble the artifact files (keyed by path) the tasks then write or compare, * from the per-package docs supplied by the caller. Reads existing READMEs via diff --git a/packages/docs/src/options.ts b/packages/docs/src/options.ts index dba8ab2a..dd1f9b8d 100644 --- a/packages/docs/src/options.ts +++ b/packages/docs/src/options.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Resolve the user-facing {@link ApiDocsOptions} into a fully-populated form the * renderers can consume without re-checking defaults. diff --git a/packages/docs/src/render.ts b/packages/docs/src/render.ts index 707a5334..d92a0a34 100644 --- a/packages/docs/src/render.ts +++ b/packages/docs/src/render.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Pure rendering for the documentation artifacts: cleaning the supplied doc * text, the per-README API block, and the `llms.txt` / `llms-full.txt` bodies. diff --git a/packages/docs/src/tasks.ts b/packages/docs/src/tasks.ts index eb21a3b1..f61ac866 100644 --- a/packages/docs/src/tasks.ts +++ b/packages/docs/src/tasks.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * {@link DocsTasks} — the public, task-shaped surface of `@zuke/docs`. * diff --git a/packages/docs/src/types.ts b/packages/docs/src/types.ts index e249c85e..c76d3b43 100644 --- a/packages/docs/src/types.ts +++ b/packages/docs/src/types.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Public types for {@link DocsTasks}: the per-package documentation input, the * project framing shown in the index, the options, and the task interface. diff --git a/packages/docs/tests/doc_lint_test.ts b/packages/docs/tests/doc_lint_test.ts index eb9a3ae4..c0f18b9e 100644 --- a/packages/docs/tests/doc_lint_test.ts +++ b/packages/docs/tests/doc_lint_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "../../core/tests/_assert.ts"; import { docLintDefects, parseDocLint } from "../src/doc_lint.ts"; import { DocsTasks } from "../src/tasks.ts"; diff --git a/packages/docs/tests/options_test.ts b/packages/docs/tests/options_test.ts index 1ca578aa..9a9800ad 100644 --- a/packages/docs/tests/options_test.ts +++ b/packages/docs/tests/options_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "../../core/tests/_assert.ts"; import { resolveOptions } from "../src/options.ts"; diff --git a/packages/docs/tests/render_test.ts b/packages/docs/tests/render_test.ts index 1b5d5c3d..3ce4a808 100644 --- a/packages/docs/tests/render_test.ts +++ b/packages/docs/tests/render_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertStringIncludes, diff --git a/packages/docs/tests/tasks_test.ts b/packages/docs/tests/tasks_test.ts index 107b117f..5c579636 100644 --- a/packages/docs/tests/tasks_test.ts +++ b/packages/docs/tests/tasks_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertStringIncludes, diff --git a/packages/dpdm/mod.ts b/packages/dpdm/mod.ts index f05d4897..fbdd117a 100644 --- a/packages/dpdm/mod.ts +++ b/packages/dpdm/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/dpdm` — a typed `DpdmTasks` wrapper for the * [dpdm](https://github.com/acrazing/dpdm) CLI (module dependency graph and diff --git a/packages/dpdm/src/dpdm.ts b/packages/dpdm/src/dpdm.ts index 6a4e7491..d9c881c1 100644 --- a/packages/dpdm/src/dpdm.ts +++ b/packages/dpdm/src/dpdm.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `DpdmTasks` — a typed task function for the [dpdm](https://github.com/acrazing/dpdm) * CLI, which analyzes a project's module dependency graph and reports circular diff --git a/packages/dpdm/tests/dpdm_test.ts b/packages/dpdm/tests/dpdm_test.ts index 4850c14c..d28050f5 100644 --- a/packages/dpdm/tests/dpdm_test.ts +++ b/packages/dpdm/tests/dpdm_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects } from "../../core/tests/_assert.ts"; import { ToolNotFoundError } from "@zuke/core/tooling"; import { diff --git a/packages/dprint/mod.ts b/packages/dprint/mod.ts index 4391bc30..e9eaea48 100644 --- a/packages/dprint/mod.ts +++ b/packages/dprint/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/dprint` — typed `dprint` task wrappers for Zuke builds. * diff --git a/packages/dprint/src/dprint.ts b/packages/dprint/src/dprint.ts index 807d8303..84bfd0b1 100644 --- a/packages/dprint/src/dprint.ts +++ b/packages/dprint/src/dprint.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `DprintTasks` — typed task functions for the `dprint` code formatter, in the * same settings-lambda style as the other Zuke tool wrappers: configure a diff --git a/packages/dprint/tests/dprint_test.ts b/packages/dprint/tests/dprint_test.ts index 28a2ef0e..cf0a969f 100644 --- a/packages/dprint/tests/dprint_test.ts +++ b/packages/dprint/tests/dprint_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects } from "../../core/tests/_assert.ts"; import { ToolNotFoundError } from "@zuke/core/tooling"; import { diff --git a/packages/eslint/mod.ts b/packages/eslint/mod.ts index 9bd31036..6ae6a6fa 100644 --- a/packages/eslint/mod.ts +++ b/packages/eslint/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/eslint` — typed `eslint` task wrappers for Zuke builds. * diff --git a/packages/eslint/src/eslint.ts b/packages/eslint/src/eslint.ts index 5a3a059d..6b0e35a6 100644 --- a/packages/eslint/src/eslint.ts +++ b/packages/eslint/src/eslint.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `EslintTasks` — typed task functions for the `eslint` linter, in the same * settings-lambda style as the other Zuke tool wrappers: configure a fluent diff --git a/packages/eslint/tests/eslint_test.ts b/packages/eslint/tests/eslint_test.ts index 926a5be9..323d7f37 100644 --- a/packages/eslint/tests/eslint_test.ts +++ b/packages/eslint/tests/eslint_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects } from "../../core/tests/_assert.ts"; import { ToolNotFoundError } from "@zuke/core/tooling"; import { diff --git a/packages/gcloud/mod.ts b/packages/gcloud/mod.ts index b2523eb7..db8ff6b0 100644 --- a/packages/gcloud/mod.ts +++ b/packages/gcloud/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/gcloud` — typed Google Cloud tooling for Zuke builds: the `gcloud` * (Google Cloud SDK) CLI wrapper, plus **GCS** and **Secret Manager** REST task diff --git a/packages/gcloud/src/auth.ts b/packages/gcloud/src/auth.ts index 068d6266..b33fe9d7 100644 --- a/packages/gcloud/src/auth.ts +++ b/packages/gcloud/src/auth.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Google Cloud access-token resolution for the REST task groups * ({@link "./gcs.ts".GcsTasks} and {@link "./secret_manager.ts".SecretManagerTasks}). diff --git a/packages/gcloud/src/gcloud.ts b/packages/gcloud/src/gcloud.ts index dc38327a..e4d13af1 100644 --- a/packages/gcloud/src/gcloud.ts +++ b/packages/gcloud/src/gcloud.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `GcloudTasks` — a typed wrapper for the `gcloud` CLI (Google Cloud SDK), in * the same settings-lambda style as the other Zuke tool wrappers. diff --git a/packages/gcloud/src/gcs.ts b/packages/gcloud/src/gcs.ts index 914938ef..9b1c9934 100644 --- a/packages/gcloud/src/gcs.ts +++ b/packages/gcloud/src/gcs.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `GcsTasks` — read, write, and list JSON objects in Google Cloud Storage over * its JSON REST API, without a Google SDK. Auth is a bearer token from an diff --git a/packages/gcloud/src/rest.ts b/packages/gcloud/src/rest.ts index f8d46418..639f34f6 100644 --- a/packages/gcloud/src/rest.ts +++ b/packages/gcloud/src/rest.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The small authenticated-JSON transport the Google REST task groups share * ({@link "./gcs.ts".GcsTasks}, {@link "./secret_manager.ts".SecretManagerTasks}): diff --git a/packages/gcloud/src/secret_manager.ts b/packages/gcloud/src/secret_manager.ts index 74bfde8a..8520858d 100644 --- a/packages/gcloud/src/secret_manager.ts +++ b/packages/gcloud/src/secret_manager.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `SecretManagerTasks` — read and write Google Secret Manager secrets over its * REST API, without a Google SDK. Auth is a bearer token from an injected diff --git a/packages/gcloud/tests/auth_test.ts b/packages/gcloud/tests/auth_test.ts index b1cf1897..88c4fdb1 100644 --- a/packages/gcloud/tests/auth_test.ts +++ b/packages/gcloud/tests/auth_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "../../core/tests/_assert.ts"; import { CommandOutput } from "@zuke/core/shell"; import type { Configure } from "@zuke/core/tooling"; diff --git a/packages/gcloud/tests/gcloud_test.ts b/packages/gcloud/tests/gcloud_test.ts index 6338fd62..4742a479 100644 --- a/packages/gcloud/tests/gcloud_test.ts +++ b/packages/gcloud/tests/gcloud_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects } from "../../core/tests/_assert.ts"; import { ToolNotFoundError } from "@zuke/core/tooling"; import { missingTool } from "@zuke/core/tooling/conformance"; diff --git a/packages/gcloud/tests/gcs_test.ts b/packages/gcloud/tests/gcs_test.ts index 555d0cd5..7449b122 100644 --- a/packages/gcloud/tests/gcs_test.ts +++ b/packages/gcloud/tests/gcs_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects, diff --git a/packages/gcloud/tests/secret_manager_test.ts b/packages/gcloud/tests/secret_manager_test.ts index 4d55b504..b17418fa 100644 --- a/packages/gcloud/tests/secret_manager_test.ts +++ b/packages/gcloud/tests/secret_manager_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects, diff --git a/packages/gemini/mod.ts b/packages/gemini/mod.ts index 03e649ec..f631efa2 100644 --- a/packages/gemini/mod.ts +++ b/packages/gemini/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/gemini` — a typed [Gemini CLI](https://github.com/google-gemini/gemini-cli) * (`gemini`) task wrapper for Zuke builds. diff --git a/packages/gemini/src/gemini.ts b/packages/gemini/src/gemini.ts index 0b1b40a9..dcab48f5 100644 --- a/packages/gemini/src/gemini.ts +++ b/packages/gemini/src/gemini.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `GeminiTasks` — a typed wrapper for the * [Gemini CLI](https://github.com/google-gemini/gemini-cli) (`gemini`), in the diff --git a/packages/gemini/tests/gemini_test.ts b/packages/gemini/tests/gemini_test.ts index 1d0ba109..f57e7919 100644 --- a/packages/gemini/tests/gemini_test.ts +++ b/packages/gemini/tests/gemini_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects, diff --git a/packages/gh/mod.ts b/packages/gh/mod.ts index 36b378f1..570e9062 100644 --- a/packages/gh/mod.ts +++ b/packages/gh/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/gh` — typed GitHub tooling for Zuke builds: the `gh` (GitHub CLI) task * wrapper plus {@link githubWorkflow}, a wait trigger that dispatches and awaits diff --git a/packages/gh/src/api.ts b/packages/gh/src/api.ts index 480314b1..7d138231 100644 --- a/packages/gh/src/api.ts +++ b/packages/gh/src/api.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The REST transport the API-backed operations in this package share — the * bound caller, its typed error, and the guards that keep a caller-supplied diff --git a/packages/gh/src/app_token.ts b/packages/gh/src/app_token.ts index 0993d207..6c24a223 100644 --- a/packages/gh/src/app_token.ts +++ b/packages/gh/src/app_token.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Mint a short-lived GitHub App installation token from a build, replacing the * `actions/create-github-app-token` step. diff --git a/packages/gh/src/check_run.ts b/packages/gh/src/check_run.ts index 128bd62c..978a4d30 100644 --- a/packages/gh/src/check_run.ts +++ b/packages/gh/src/check_run.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Post a completed check run, creating it or updating the one already there. * diff --git a/packages/gh/src/commit.ts b/packages/gh/src/commit.ts index ea289086..e9fa9b4a 100644 --- a/packages/gh/src/commit.ts +++ b/packages/gh/src/commit.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Committing to GitHub through its REST API, so nothing needs a git credential * on disk. diff --git a/packages/gh/src/gh.ts b/packages/gh/src/gh.ts index 44da673d..9f2e4730 100644 --- a/packages/gh/src/gh.ts +++ b/packages/gh/src/gh.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `GhTasks` — a typed wrapper for the `gh` GitHub CLI, in the same * settings-lambda style as the other Zuke tool wrappers. diff --git a/packages/gh/src/pull_request.ts b/packages/gh/src/pull_request.ts index 5e46effa..dd37a3f2 100644 --- a/packages/gh/src/pull_request.ts +++ b/packages/gh/src/pull_request.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Open a pull request through the API, without a git credential on disk. * diff --git a/packages/gh/src/sarif.ts b/packages/gh/src/sarif.ts index 9a059618..d068e235 100644 --- a/packages/gh/src/sarif.ts +++ b/packages/gh/src/sarif.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Upload a SARIF report to GitHub code scanning from a build, replacing the * `github/codeql-action/upload-sarif` step. diff --git a/packages/gh/src/workflow.ts b/packages/gh/src/workflow.ts index 212955b5..340a662d 100644 --- a/packages/gh/src/workflow.ts +++ b/packages/gh/src/workflow.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * {@link githubWorkflow} — a Zuke {@link "@zuke/core".WaitTrigger} that * dispatches a GitHub Actions workflow (often in **another repo**), suspends the diff --git a/packages/gh/tests/app_token_test.ts b/packages/gh/tests/app_token_test.ts index 0183b77d..c4fb741f 100644 --- a/packages/gh/tests/app_token_test.ts +++ b/packages/gh/tests/app_token_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Unit tests for the GitHub App token task. A real RSA key is generated in the * test (WebCrypto, no fixture secret in the repo), exported as both PKCS#8 and diff --git a/packages/gh/tests/check_run_test.ts b/packages/gh/tests/check_run_test.ts index 7a3e19a7..d1261a37 100644 --- a/packages/gh/tests/check_run_test.ts +++ b/packages/gh/tests/check_run_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Unit tests for `src/check_run.ts` — posting a completed check run without * leaving a second one behind on a retry. diff --git a/packages/gh/tests/commit_test.ts b/packages/gh/tests/commit_test.ts index 0b9ccc0e..b8b1c67b 100644 --- a/packages/gh/tests/commit_test.ts +++ b/packages/gh/tests/commit_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Unit tests for `src/commit.ts` — committing through GitHub's API so no git * credential is ever written to disk. diff --git a/packages/gh/tests/gh_test.ts b/packages/gh/tests/gh_test.ts index 9c5ae633..9ac64048 100644 --- a/packages/gh/tests/gh_test.ts +++ b/packages/gh/tests/gh_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects } from "../../core/tests/_assert.ts"; import { ToolNotFoundError } from "@zuke/core/tooling"; import { missingTool } from "@zuke/core/tooling/conformance"; diff --git a/packages/gh/tests/pull_request_test.ts b/packages/gh/tests/pull_request_test.ts index 156a88b8..5424492b 100644 --- a/packages/gh/tests/pull_request_test.ts +++ b/packages/gh/tests/pull_request_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Unit tests for `src/pull_request.ts` — proposing a branch through the API so * no git credential is ever written to disk. diff --git a/packages/gh/tests/sarif_test.ts b/packages/gh/tests/sarif_test.ts index 9b5938d4..cf691132 100644 --- a/packages/gh/tests/sarif_test.ts +++ b/packages/gh/tests/sarif_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Unit tests for the code-scanning SARIF upload. The request goes through a * `fetch` seam and the body is decoded back (base64 → gunzip → JSON) so the diff --git a/packages/gh/tests/workflow_test.ts b/packages/gh/tests/workflow_test.ts index c38ebfd7..f19f9649 100644 --- a/packages/gh/tests/workflow_test.ts +++ b/packages/gh/tests/workflow_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects, diff --git a/packages/git/mod.ts b/packages/git/mod.ts index 9c14e206..6523f626 100644 --- a/packages/git/mod.ts +++ b/packages/git/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/git` — typed `git` task wrappers for Zuke builds. * diff --git a/packages/git/src/git.ts b/packages/git/src/git.ts index 3aa0e208..ba3d4b1a 100644 --- a/packages/git/src/git.ts +++ b/packages/git/src/git.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `GitTasks` — typed task functions for the common `git` commands, in the same * settings-lambda style as the other Zuke tool wrappers: configure a fluent diff --git a/packages/git/src/git_info.ts b/packages/git/src/git_info.ts index 5506d204..f4421c46 100644 --- a/packages/git/src/git_info.ts +++ b/packages/git/src/git_info.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `gitInfo()` — resolve the current repository's branch, commit, nearest tag, * dirty state, and origin URL. Useful for versioning and conditional build diff --git a/packages/git/tests/git_info_test.ts b/packages/git/tests/git_info_test.ts index a034f890..c6b2e7f5 100644 --- a/packages/git/tests/git_info_test.ts +++ b/packages/git/tests/git_info_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects } from "../../core/tests/_assert.ts"; import { gitInfo, type GitRunner } from "../src/git_info.ts"; diff --git a/packages/git/tests/git_test.ts b/packages/git/tests/git_test.ts index 58832c07..56ef8f1c 100644 --- a/packages/git/tests/git_test.ts +++ b/packages/git/tests/git_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects, diff --git a/packages/helm/mod.ts b/packages/helm/mod.ts index 0b32fb1b..85a60b5c 100644 --- a/packages/helm/mod.ts +++ b/packages/helm/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/helm` — typed `HelmTasks` wrappers for the [Helm](https://helm.sh) CLI, * for packaging and deploying to Kubernetes from a Zuke build. diff --git a/packages/helm/src/helm.ts b/packages/helm/src/helm.ts index 4bc2f8bd..3a471adb 100644 --- a/packages/helm/src/helm.ts +++ b/packages/helm/src/helm.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `HelmTasks` — typed task functions for the [Helm](https://helm.sh) CLI, in * the settings-lambda style: configure a fluent settings object in a lambda, diff --git a/packages/helm/tests/helm_test.ts b/packages/helm/tests/helm_test.ts index 2eecd1a0..b04512f8 100644 --- a/packages/helm/tests/helm_test.ts +++ b/packages/helm/tests/helm_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects, diff --git a/packages/husky/mod.ts b/packages/husky/mod.ts index dab5e480..d9cf8090 100644 --- a/packages/husky/mod.ts +++ b/packages/husky/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/husky` — typed `husky` task wrappers for Zuke builds. * diff --git a/packages/husky/src/husky.ts b/packages/husky/src/husky.ts index 6355c28f..5c6d9838 100644 --- a/packages/husky/src/husky.ts +++ b/packages/husky/src/husky.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `HuskyTasks` — typed task functions for the [`husky`](https://typicode.github.io/husky) * Git-hooks tool, in the same settings-lambda style as the other Zuke tool diff --git a/packages/husky/tests/husky_test.ts b/packages/husky/tests/husky_test.ts index 46bac598..c8f5709a 100644 --- a/packages/husky/tests/husky_test.ts +++ b/packages/husky/tests/husky_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects } from "../../core/tests/_assert.ts"; import { ToolNotFoundError } from "@zuke/core/tooling"; import { diff --git a/packages/jest/mod.ts b/packages/jest/mod.ts index 336055c6..5d905ef0 100644 --- a/packages/jest/mod.ts +++ b/packages/jest/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/jest` — typed `jest` task wrappers for Zuke builds. * diff --git a/packages/jest/src/jest.ts b/packages/jest/src/jest.ts index d9e6a116..d18222f4 100644 --- a/packages/jest/src/jest.ts +++ b/packages/jest/src/jest.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `JestTasks` — typed task functions for the `jest` test runner, in the same * settings-lambda style as the other Zuke tool wrappers: configure a fluent diff --git a/packages/jest/tests/jest_test.ts b/packages/jest/tests/jest_test.ts index 11a7f4d5..98779bea 100644 --- a/packages/jest/tests/jest_test.ts +++ b/packages/jest/tests/jest_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects } from "../../core/tests/_assert.ts"; import { ToolNotFoundError } from "@zuke/core/tooling"; import { diff --git a/packages/jsr/mod.ts b/packages/jsr/mod.ts index d2518e26..7a1d8971 100644 --- a/packages/jsr/mod.ts +++ b/packages/jsr/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/jsr` — tools for the [JSR](https://jsr.io) registry in Zuke builds: * typed `JsrTasks` wrappers for the `jsr` CLI (publish, add, remove), plus diff --git a/packages/jsr/src/jsr.ts b/packages/jsr/src/jsr.ts index 3d81c237..b0240548 100644 --- a/packages/jsr/src/jsr.ts +++ b/packages/jsr/src/jsr.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `JsrTasks` — typed task functions for the [JSR](https://jsr.io) CLI, in the * settings-lambda style: configure a fluent settings object in a lambda, and diff --git a/packages/jsr/src/registry.ts b/packages/jsr/src/registry.ts index 79fd85c3..969f8e0f 100644 --- a/packages/jsr/src/registry.ts +++ b/packages/jsr/src/registry.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Query the [JSR](https://jsr.io) registry's package metadata — the read-side * companion to the {@link JsrTasks} CLI wrapper. A publish pipeline uses these diff --git a/packages/jsr/tests/jsr_test.ts b/packages/jsr/tests/jsr_test.ts index 63f4c073..b088de79 100644 --- a/packages/jsr/tests/jsr_test.ts +++ b/packages/jsr/tests/jsr_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects, diff --git a/packages/jsr/tests/registry_test.ts b/packages/jsr/tests/registry_test.ts index 04f71710..bb97793e 100644 --- a/packages/jsr/tests/registry_test.ts +++ b/packages/jsr/tests/registry_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "../../core/tests/_assert.ts"; import { isPublished, diff --git a/packages/knip/mod.ts b/packages/knip/mod.ts index ee91640a..45d615ba 100644 --- a/packages/knip/mod.ts +++ b/packages/knip/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/knip` — a typed `KnipTasks` wrapper for the [Knip](https://knip.dev) * CLI (unused files, dependencies, and exports), for use in Zuke builds. diff --git a/packages/knip/src/knip.ts b/packages/knip/src/knip.ts index 2fe402f2..f802575c 100644 --- a/packages/knip/src/knip.ts +++ b/packages/knip/src/knip.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `KnipTasks` — a typed task function for the [Knip](https://knip.dev) CLI, * which finds unused files, dependencies, and exports. Settings-lambda style: diff --git a/packages/knip/tests/knip_test.ts b/packages/knip/tests/knip_test.ts index 766e2a08..b23bf68e 100644 --- a/packages/knip/tests/knip_test.ts +++ b/packages/knip/tests/knip_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects } from "../../core/tests/_assert.ts"; import { ToolNotFoundError } from "@zuke/core/tooling"; import { diff --git a/packages/kubectl/mod.ts b/packages/kubectl/mod.ts index f9c063e5..7258b75d 100644 --- a/packages/kubectl/mod.ts +++ b/packages/kubectl/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/kubectl` — typed `kubectl` CLI task wrappers for Zuke builds, for * deploying to and managing Kubernetes from a pipeline. diff --git a/packages/kubectl/src/kubectl.ts b/packages/kubectl/src/kubectl.ts index 5d1024a7..95b7cebe 100644 --- a/packages/kubectl/src/kubectl.ts +++ b/packages/kubectl/src/kubectl.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `KubectlTasks` — typed task functions for the `kubectl` CLI, in the same * settings-lambda style as the other Zuke tool wrappers: configure a fluent diff --git a/packages/kubectl/tests/kubectl_test.ts b/packages/kubectl/tests/kubectl_test.ts index 0a680af2..7847f4d7 100644 --- a/packages/kubectl/tests/kubectl_test.ts +++ b/packages/kubectl/tests/kubectl_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects, diff --git a/packages/kustomize/mod.ts b/packages/kustomize/mod.ts index 00ee73bd..d9c401aa 100644 --- a/packages/kustomize/mod.ts +++ b/packages/kustomize/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/kustomize` — typed `KustomizeTasks` wrappers for the * [Kustomize](https://kustomize.io) CLI, for use in Zuke builds. diff --git a/packages/kustomize/src/kustomize.ts b/packages/kustomize/src/kustomize.ts index 51bb2599..cd8cf95c 100644 --- a/packages/kustomize/src/kustomize.ts +++ b/packages/kustomize/src/kustomize.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `KustomizeTasks` — typed task functions for the * [Kustomize](https://kustomize.io) CLI, in the settings-lambda style: diff --git a/packages/kustomize/tests/kustomize_test.ts b/packages/kustomize/tests/kustomize_test.ts index 1be3ec5f..ab4f9484 100644 --- a/packages/kustomize/tests/kustomize_test.ts +++ b/packages/kustomize/tests/kustomize_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects, diff --git a/packages/nest/mod.ts b/packages/nest/mod.ts index e76619a6..3ee30186 100644 --- a/packages/nest/mod.ts +++ b/packages/nest/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/nest` — typed NestJS CLI (`nest`) task wrappers for Zuke builds. * diff --git a/packages/nest/src/nest.ts b/packages/nest/src/nest.ts index addf896c..6c3cb8ea 100644 --- a/packages/nest/src/nest.ts +++ b/packages/nest/src/nest.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `NestTasks` — typed task functions for the NestJS CLI (`nest`), in the same * settings-lambda style as the other Zuke tool wrappers: configure a fluent diff --git a/packages/nest/tests/nest_test.ts b/packages/nest/tests/nest_test.ts index d7c9e951..0c9408be 100644 --- a/packages/nest/tests/nest_test.ts +++ b/packages/nest/tests/nest_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects, diff --git a/packages/node/mod.ts b/packages/node/mod.ts index 6e888d5d..c6cd6f4a 100644 --- a/packages/node/mod.ts +++ b/packages/node/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/node` — typed Node.js task wrappers for Zuke builds. * diff --git a/packages/node/src/node.ts b/packages/node/src/node.ts index f4d7d090..9a956a1b 100644 --- a/packages/node/src/node.ts +++ b/packages/node/src/node.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `NodeTasks` — typed task functions for the Node.js runtime `node`, in the * same settings-lambda style as the other Zuke tool wrappers: configure a diff --git a/packages/node/tests/node_test.ts b/packages/node/tests/node_test.ts index c0b6aa46..7b53a4b2 100644 --- a/packages/node/tests/node_test.ts +++ b/packages/node/tests/node_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects, diff --git a/packages/npm/mod.ts b/packages/npm/mod.ts index d5f50d7d..da34bdb6 100644 --- a/packages/npm/mod.ts +++ b/packages/npm/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/npm` — typed `NpmTasks` wrappers for the `npm` CLI, for use in Zuke * build targets (including builds that drive Node projects). diff --git a/packages/npm/src/npm.ts b/packages/npm/src/npm.ts index 259462b6..1597bad1 100644 --- a/packages/npm/src/npm.ts +++ b/packages/npm/src/npm.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `NpmTasks` — typed task functions for the `npm` CLI, in the * settings-lambda style: configure a fluent settings object in a lambda, and diff --git a/packages/npm/tests/npm_test.ts b/packages/npm/tests/npm_test.ts index 735ed0ca..b5bdaff1 100644 --- a/packages/npm/tests/npm_test.ts +++ b/packages/npm/tests/npm_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects, diff --git a/packages/npx/mod.ts b/packages/npx/mod.ts index 1093308e..79867be6 100644 --- a/packages/npx/mod.ts +++ b/packages/npx/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/npx` — typed `NpxTasks` wrappers for the `npx` package runner, for use * in Zuke build targets (including builds that drive Node projects). diff --git a/packages/npx/src/npx.ts b/packages/npx/src/npx.ts index 034ee5e1..139f4bd5 100644 --- a/packages/npx/src/npx.ts +++ b/packages/npx/src/npx.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `NpxTasks` — typed task functions for the `npx` package runner, in the * settings-lambda style: configure a fluent settings object in a lambda, and diff --git a/packages/npx/tests/npx_test.ts b/packages/npx/tests/npx_test.ts index 53d41110..fd285dc0 100644 --- a/packages/npx/tests/npx_test.ts +++ b/packages/npx/tests/npx_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects, diff --git a/packages/nx/mod.ts b/packages/nx/mod.ts index 90db2e8f..82fcb559 100644 --- a/packages/nx/mod.ts +++ b/packages/nx/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/nx` — typed `NxTasks` wrappers for the [Nx](https://nx.dev) CLI, for * use in Zuke builds. diff --git a/packages/nx/src/nx.ts b/packages/nx/src/nx.ts index 5ff7796d..11040d20 100644 --- a/packages/nx/src/nx.ts +++ b/packages/nx/src/nx.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `NxTasks` — typed task functions for the [Nx](https://nx.dev) CLI, in the * settings-lambda style: configure a fluent settings object in a lambda, and diff --git a/packages/nx/tests/nx_test.ts b/packages/nx/tests/nx_test.ts index e6d43f00..caeaf3af 100644 --- a/packages/nx/tests/nx_test.ts +++ b/packages/nx/tests/nx_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects, diff --git a/packages/openapi-ts/mod.ts b/packages/openapi-ts/mod.ts index ae9585c9..ecf093dc 100644 --- a/packages/openapi-ts/mod.ts +++ b/packages/openapi-ts/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/openapi-ts` — typed `openapi-ts` task wrappers for Zuke builds. * diff --git a/packages/openapi-ts/src/openapi_ts.ts b/packages/openapi-ts/src/openapi_ts.ts index b3934108..e92fb6cd 100644 --- a/packages/openapi-ts/src/openapi_ts.ts +++ b/packages/openapi-ts/src/openapi_ts.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `OpenapiTsTasks` — typed task functions for `openapi-ts`, the * [Hey API](https://heyapi.dev) code generator (`@hey-api/openapi-ts`), in the diff --git a/packages/openapi-ts/tests/openapi_ts_test.ts b/packages/openapi-ts/tests/openapi_ts_test.ts index 035a2dfb..e22ccbd1 100644 --- a/packages/openapi-ts/tests/openapi_ts_test.ts +++ b/packages/openapi-ts/tests/openapi_ts_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects } from "../../core/tests/_assert.ts"; import { ToolNotFoundError } from "@zuke/core/tooling"; import { diff --git a/packages/orval/mod.ts b/packages/orval/mod.ts index 9cd67163..db28638f 100644 --- a/packages/orval/mod.ts +++ b/packages/orval/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/orval` — typed `orval` task wrappers for Zuke builds. * diff --git a/packages/orval/src/orval.ts b/packages/orval/src/orval.ts index 8d209ab8..2060709c 100644 --- a/packages/orval/src/orval.ts +++ b/packages/orval/src/orval.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `OrvalTasks` — typed task functions for [`orval`](https://orval.dev), the * OpenAPI client and mock generator, in the same settings-lambda style as the diff --git a/packages/orval/tests/orval_test.ts b/packages/orval/tests/orval_test.ts index fe30d8dd..6dba4a7d 100644 --- a/packages/orval/tests/orval_test.ts +++ b/packages/orval/tests/orval_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects } from "../../core/tests/_assert.ts"; import { ToolNotFoundError } from "@zuke/core/tooling"; import { diff --git a/packages/otel/mod.ts b/packages/otel/mod.ts index 0877dfe5..6bc0cad6 100644 --- a/packages/otel/mod.ts +++ b/packages/otel/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/otel` — an OpenTelemetry (OTLP/HTTP **JSON**) export plugin for Zuke * builds. Register {@link otel} on a run and every run/target transition is diff --git a/packages/otel/src/exporter.ts b/packages/otel/src/exporter.ts index 0bf43414..9d2ea917 100644 --- a/packages/otel/src/exporter.ts +++ b/packages/otel/src/exporter.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The OTLP/HTTP JSON transport: POSTs a trace or metrics payload to a * collector. Kept behind the {@link OtlpTransport} interface so the plugin can diff --git a/packages/otel/src/ids.ts b/packages/otel/src/ids.ts index 4b89b741..5dce6493 100644 --- a/packages/otel/src/ids.ts +++ b/packages/otel/src/ids.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Deterministic OpenTelemetry trace and span ids, derived from a run id by * hashing. Determinism is the whole point: a run that suspends in one process diff --git a/packages/otel/src/otlp.ts b/packages/otel/src/otlp.ts index 8398ce9d..72f77500 100644 --- a/packages/otel/src/otlp.ts +++ b/packages/otel/src/otlp.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Pure builders that turn a Zuke {@link RunRecord} into OTLP/HTTP **JSON** * payloads — one for the trace signal (`resourceSpans`) and one for metrics diff --git a/packages/otel/src/plugin.ts b/packages/otel/src/plugin.ts index 34fb8a79..5f785c86 100644 --- a/packages/otel/src/plugin.ts +++ b/packages/otel/src/plugin.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The {@link otel} plugin factory and its emission logic. The plugin observes a * build through one hook — `onRunStateChange`, delivered the run's durable diff --git a/packages/otel/src/settings.ts b/packages/otel/src/settings.ts index 0bbe31ff..52f7c867 100644 --- a/packages/otel/src/settings.ts +++ b/packages/otel/src/settings.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * The fluent {@link OtelSettings} the {@link "./plugin.ts".otel} factory is * configured with, and {@link resolveOtel}, which folds those settings together diff --git a/packages/otel/tests/_fixtures.ts b/packages/otel/tests/_fixtures.ts index ffd4105e..385a6c13 100644 --- a/packages/otel/tests/_fixtures.ts +++ b/packages/otel/tests/_fixtures.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Shared test fixtures: a {@link RunRecord} builder, a {@link TargetRunState} * builder, a fixed {@link OtlpResource}, and a capturing {@link OtlpTransport} diff --git a/packages/otel/tests/exporter_test.ts b/packages/otel/tests/exporter_test.ts index 72eec729..e1d5fe80 100644 --- a/packages/otel/tests/exporter_test.ts +++ b/packages/otel/tests/exporter_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "../../core/tests/_assert.ts"; import { OtlpHttpExporter } from "../src/exporter.ts"; import { buildMetrics, buildTraces, type RunSpanIds } from "../src/otlp.ts"; diff --git a/packages/otel/tests/ids_test.ts b/packages/otel/tests/ids_test.ts index d29a903a..62f33372 100644 --- a/packages/otel/tests/ids_test.ts +++ b/packages/otel/tests/ids_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "../../core/tests/_assert.ts"; import { spanIdFor, traceIdFor } from "../src/ids.ts"; diff --git a/packages/otel/tests/otlp_test.ts b/packages/otel/tests/otlp_test.ts index 8ca40efe..b531d111 100644 --- a/packages/otel/tests/otlp_test.ts +++ b/packages/otel/tests/otlp_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "../../core/tests/_assert.ts"; import { buildMetrics, diff --git a/packages/otel/tests/plugin_test.ts b/packages/otel/tests/plugin_test.ts index 4a611071..13871733 100644 --- a/packages/otel/tests/plugin_test.ts +++ b/packages/otel/tests/plugin_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "../../core/tests/_assert.ts"; import type { Plugin, RunRecord } from "@zuke/core"; import { createOtelPlugin, DEDUP_CAP, otel, otelWith } from "../src/plugin.ts"; diff --git a/packages/otel/tests/settings_test.ts b/packages/otel/tests/settings_test.ts index 3b19dd29..39e8ce0a 100644 --- a/packages/otel/tests/settings_test.ts +++ b/packages/otel/tests/settings_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "../../core/tests/_assert.ts"; import { OtelSettings, parseHeaderList, resolveOtel } from "../src/settings.ts"; diff --git a/packages/oxlint/mod.ts b/packages/oxlint/mod.ts index 5e144112..7e03eb6d 100644 --- a/packages/oxlint/mod.ts +++ b/packages/oxlint/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/oxlint` — typed `oxlint` task wrappers for Zuke builds. * diff --git a/packages/oxlint/src/oxlint.ts b/packages/oxlint/src/oxlint.ts index 698823db..2a56d9e1 100644 --- a/packages/oxlint/src/oxlint.ts +++ b/packages/oxlint/src/oxlint.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `OxlintTasks` — typed task functions for the `oxlint` linter, in the same * settings-lambda style as the other Zuke tool wrappers: configure a fluent diff --git a/packages/oxlint/tests/oxlint_test.ts b/packages/oxlint/tests/oxlint_test.ts index a2ea99c1..811bce1b 100644 --- a/packages/oxlint/tests/oxlint_test.ts +++ b/packages/oxlint/tests/oxlint_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects } from "../../core/tests/_assert.ts"; import { ToolNotFoundError } from "@zuke/core/tooling"; import { diff --git a/packages/playwright/mod.ts b/packages/playwright/mod.ts index c2e0d394..22b125af 100644 --- a/packages/playwright/mod.ts +++ b/packages/playwright/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/playwright` — typed `PlaywrightTasks` wrappers for the Playwright CLI, * for use in Zuke build targets (end-to-end browser testing). diff --git a/packages/playwright/src/playwright.ts b/packages/playwright/src/playwright.ts index b3935c8a..b14e5d43 100644 --- a/packages/playwright/src/playwright.ts +++ b/packages/playwright/src/playwright.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `PlaywrightTasks` — typed task functions for the Playwright CLI, in the * settings-lambda style: configure a fluent settings object in a lambda, and diff --git a/packages/playwright/tests/playwright_test.ts b/packages/playwright/tests/playwright_test.ts index 24837259..37ed4b64 100644 --- a/packages/playwright/tests/playwright_test.ts +++ b/packages/playwright/tests/playwright_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects } from "../../core/tests/_assert.ts"; import { ToolNotFoundError } from "@zuke/core/tooling"; import { diff --git a/packages/pnpm/mod.ts b/packages/pnpm/mod.ts index 9840b25d..8495547d 100644 --- a/packages/pnpm/mod.ts +++ b/packages/pnpm/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/pnpm` — typed `PnpmTasks` wrappers for the `pnpm` CLI, for use in Zuke * build targets (including builds that drive Node/workspace projects). diff --git a/packages/pnpm/src/pnpm.ts b/packages/pnpm/src/pnpm.ts index 221f3818..de788f9a 100644 --- a/packages/pnpm/src/pnpm.ts +++ b/packages/pnpm/src/pnpm.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `PnpmTasks` — typed task functions for the `pnpm` CLI, in the settings-lambda * style: configure a fluent settings object in a lambda, and the task function diff --git a/packages/pnpm/tests/pnpm_test.ts b/packages/pnpm/tests/pnpm_test.ts index fec49e43..b6fb4b1c 100644 --- a/packages/pnpm/tests/pnpm_test.ts +++ b/packages/pnpm/tests/pnpm_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects, diff --git a/packages/release-please/mod.ts b/packages/release-please/mod.ts index f67d79ce..78426937 100644 --- a/packages/release-please/mod.ts +++ b/packages/release-please/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/release-please` — typed `ReleasePleaseTasks` wrappers for the * [release-please](https://github.com/googleapis/release-please) CLI, for use in diff --git a/packages/release-please/src/release_please.ts b/packages/release-please/src/release_please.ts index 06080efe..a3525758 100644 --- a/packages/release-please/src/release_please.ts +++ b/packages/release-please/src/release_please.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `ReleasePleaseTasks` — typed task functions for * [release-please](https://github.com/googleapis/release-please), in the same diff --git a/packages/release-please/tests/release_please_test.ts b/packages/release-please/tests/release_please_test.ts index 92781527..d4d01ac0 100644 --- a/packages/release-please/tests/release_please_test.ts +++ b/packages/release-please/tests/release_please_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects } from "../../core/tests/_assert.ts"; import { ToolNotFoundError } from "@zuke/core/tooling"; import { missingTool } from "@zuke/core/tooling/conformance"; diff --git a/packages/security/mod.ts b/packages/security/mod.ts index e719f19d..facaa0a6 100644 --- a/packages/security/mod.ts +++ b/packages/security/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/security` — typed task wrappers for free, open-source security scanners * (zizmor, actionlint, gitleaks, osv-scanner, semgrep, trivy) for Zuke builds. diff --git a/packages/security/src/security.ts b/packages/security/src/security.ts index ffa68b35..d08fc6ed 100644 --- a/packages/security/src/security.ts +++ b/packages/security/src/security.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `SecurityTasks` — typed task wrappers for free, open-source security scanners, * in the same settings-lambda style as the other Zuke tool wrappers: configure a diff --git a/packages/security/tests/security_test.ts b/packages/security/tests/security_test.ts index 7d4a6332..cdf7c0f9 100644 --- a/packages/security/tests/security_test.ts +++ b/packages/security/tests/security_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects } from "../../core/tests/_assert.ts"; import { ToolNotFoundError } from "@zuke/core/tooling"; import { missingTool } from "@zuke/core/tooling/conformance"; diff --git a/packages/terraform/mod.ts b/packages/terraform/mod.ts index 6a0163f7..241c6c70 100644 --- a/packages/terraform/mod.ts +++ b/packages/terraform/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/terraform` — typed `TerraformTasks` wrappers for the `terraform` CLI, * for use in Zuke build targets (infrastructure-as-code workflows). diff --git a/packages/terraform/src/terraform.ts b/packages/terraform/src/terraform.ts index 87745e20..c6dba547 100644 --- a/packages/terraform/src/terraform.ts +++ b/packages/terraform/src/terraform.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `TerraformTasks` — typed task functions for the `terraform` CLI, in the * settings-lambda style: configure a fluent settings object in a lambda, and diff --git a/packages/terraform/tests/terraform_test.ts b/packages/terraform/tests/terraform_test.ts index 057f54d5..67876731 100644 --- a/packages/terraform/tests/terraform_test.ts +++ b/packages/terraform/tests/terraform_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects } from "../../core/tests/_assert.ts"; import { ToolNotFoundError } from "@zuke/core/tooling"; import { missingTool } from "@zuke/core/tooling/conformance"; diff --git a/packages/tofu/mod.ts b/packages/tofu/mod.ts index f0a1cfa3..641c2359 100644 --- a/packages/tofu/mod.ts +++ b/packages/tofu/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/tofu` — typed `TofuTasks` wrappers for the OpenTofu CLI (`tofu`), for * use in Zuke build targets (infrastructure-as-code workflows). diff --git a/packages/tofu/src/tofu.ts b/packages/tofu/src/tofu.ts index 4ae989b6..9a37af36 100644 --- a/packages/tofu/src/tofu.ts +++ b/packages/tofu/src/tofu.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `TofuTasks` — typed task functions for the OpenTofu CLI (`tofu`), in the * settings-lambda style: configure a fluent settings object in a lambda, and diff --git a/packages/tofu/tests/tofu_test.ts b/packages/tofu/tests/tofu_test.ts index dd67df49..2947d44b 100644 --- a/packages/tofu/tests/tofu_test.ts +++ b/packages/tofu/tests/tofu_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects } from "../../core/tests/_assert.ts"; import { ToolNotFoundError } from "@zuke/core/tooling"; import { missingTool } from "@zuke/core/tooling/conformance"; diff --git a/packages/tsc-alias/mod.ts b/packages/tsc-alias/mod.ts index 11be9733..52d5843d 100644 --- a/packages/tsc-alias/mod.ts +++ b/packages/tsc-alias/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/tsc-alias` — typed `tsc-alias` task wrappers for Zuke builds. * diff --git a/packages/tsc-alias/src/tsc_alias.ts b/packages/tsc-alias/src/tsc_alias.ts index 7524f006..e2897456 100644 --- a/packages/tsc-alias/src/tsc_alias.ts +++ b/packages/tsc-alias/src/tsc_alias.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `TscAliasTasks` — typed task functions for `tsc-alias`, the tool that * rewrites TypeScript path aliases in compiled output, in the same diff --git a/packages/tsc-alias/tests/tsc_alias_test.ts b/packages/tsc-alias/tests/tsc_alias_test.ts index d9aa22a1..fa150223 100644 --- a/packages/tsc-alias/tests/tsc_alias_test.ts +++ b/packages/tsc-alias/tests/tsc_alias_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects } from "../../core/tests/_assert.ts"; import { ToolNotFoundError } from "@zuke/core/tooling"; import { diff --git a/packages/tsc/mod.ts b/packages/tsc/mod.ts index 8fcb2195..c45edbe1 100644 --- a/packages/tsc/mod.ts +++ b/packages/tsc/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/tsc` — typed `tsc` task wrappers for Zuke builds. * diff --git a/packages/tsc/src/tsc.ts b/packages/tsc/src/tsc.ts index 208a2f52..08a8d6ac 100644 --- a/packages/tsc/src/tsc.ts +++ b/packages/tsc/src/tsc.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `TscTasks` — typed task functions for `tsc`, the TypeScript compiler, in the * same settings-lambda style as the other Zuke tool wrappers: configure a diff --git a/packages/tsc/tests/tsc_test.ts b/packages/tsc/tests/tsc_test.ts index 67ac6fe9..b06f4c89 100644 --- a/packages/tsc/tests/tsc_test.ts +++ b/packages/tsc/tests/tsc_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects } from "../../core/tests/_assert.ts"; import { ToolNotFoundError } from "@zuke/core/tooling"; import { diff --git a/packages/tsdown/mod.ts b/packages/tsdown/mod.ts index 456303dc..5b49abe8 100644 --- a/packages/tsdown/mod.ts +++ b/packages/tsdown/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/tsdown` — a typed `TsdownTasks` wrapper for the * [tsdown](https://tsdown.dev) bundler, for use in Zuke builds. diff --git a/packages/tsdown/src/tsdown.ts b/packages/tsdown/src/tsdown.ts index 4fe8984b..4d40818f 100644 --- a/packages/tsdown/src/tsdown.ts +++ b/packages/tsdown/src/tsdown.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `TsdownTasks` — typed task functions for the [tsdown](https://tsdown.dev) * bundler, in the settings-lambda style: configure a fluent settings object in diff --git a/packages/tsdown/tests/tsdown_test.ts b/packages/tsdown/tests/tsdown_test.ts index a8f06c9b..1b3bf67f 100644 --- a/packages/tsdown/tests/tsdown_test.ts +++ b/packages/tsdown/tests/tsdown_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects } from "../../core/tests/_assert.ts"; import { ToolNotFoundError } from "@zuke/core/tooling"; import { diff --git a/packages/tsup/mod.ts b/packages/tsup/mod.ts index b6a4c300..664c54fa 100644 --- a/packages/tsup/mod.ts +++ b/packages/tsup/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/tsup` — a typed `TsupTasks` wrapper for the * [tsup](https://tsup.egoist.dev) bundler, for use in Zuke builds. diff --git a/packages/tsup/src/tsup.ts b/packages/tsup/src/tsup.ts index 11b5daf9..02b67f6d 100644 --- a/packages/tsup/src/tsup.ts +++ b/packages/tsup/src/tsup.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `TsupTasks` — a typed task function for the [tsup](https://tsup.egoist.dev) * bundler, in the settings-lambda style: configure a fluent settings object in diff --git a/packages/tsup/tests/tsup_test.ts b/packages/tsup/tests/tsup_test.ts index 08bc3d83..3e67bff8 100644 --- a/packages/tsup/tests/tsup_test.ts +++ b/packages/tsup/tests/tsup_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects } from "../../core/tests/_assert.ts"; import { ToolNotFoundError } from "@zuke/core/tooling"; import { diff --git a/packages/tsx/mod.ts b/packages/tsx/mod.ts index 96d47408..d6d182a5 100644 --- a/packages/tsx/mod.ts +++ b/packages/tsx/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/tsx` — typed `tsx` task wrappers for Zuke builds. * diff --git a/packages/tsx/src/tsx.ts b/packages/tsx/src/tsx.ts index 78d2660e..b6f25880 100644 --- a/packages/tsx/src/tsx.ts +++ b/packages/tsx/src/tsx.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `TsxTasks` — typed task functions for the `tsx` TypeScript runner, in the * same settings-lambda style as the other Zuke tool wrappers: configure a diff --git a/packages/tsx/tests/tsx_test.ts b/packages/tsx/tests/tsx_test.ts index b01495a4..e95e64f2 100644 --- a/packages/tsx/tests/tsx_test.ts +++ b/packages/tsx/tests/tsx_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects, diff --git a/packages/turbo/mod.ts b/packages/turbo/mod.ts index 8dc8594b..63230599 100644 --- a/packages/turbo/mod.ts +++ b/packages/turbo/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/turbo` — typed `TurboTasks` wrappers for the * [Turborepo](https://turbo.build) CLI, for use in Zuke builds. diff --git a/packages/turbo/src/turbo.ts b/packages/turbo/src/turbo.ts index 45eee7e5..cba0d0a0 100644 --- a/packages/turbo/src/turbo.ts +++ b/packages/turbo/src/turbo.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `TurboTasks` — typed task functions for the [Turborepo](https://turbo.build) * CLI, in the settings-lambda style: configure a fluent settings object in a diff --git a/packages/turbo/tests/turbo_test.ts b/packages/turbo/tests/turbo_test.ts index befca325..98b67b34 100644 --- a/packages/turbo/tests/turbo_test.ts +++ b/packages/turbo/tests/turbo_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects, diff --git a/packages/vite/mod.ts b/packages/vite/mod.ts index 2744805e..47fcebc5 100644 --- a/packages/vite/mod.ts +++ b/packages/vite/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/vite` — typed `ViteTasks` wrappers for the [Vite](https://vitejs.dev) * CLI, for use in Zuke builds. diff --git a/packages/vite/src/vite.ts b/packages/vite/src/vite.ts index 040ffdd8..56db660e 100644 --- a/packages/vite/src/vite.ts +++ b/packages/vite/src/vite.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `ViteTasks` — typed task functions for the [Vite](https://vitejs.dev) CLI, in * the settings-lambda style: configure a fluent settings object in a lambda, diff --git a/packages/vite/tests/vite_test.ts b/packages/vite/tests/vite_test.ts index 4642fdf8..a5f1a1e3 100644 --- a/packages/vite/tests/vite_test.ts +++ b/packages/vite/tests/vite_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects } from "../../core/tests/_assert.ts"; import { ToolNotFoundError } from "@zuke/core/tooling"; import { diff --git a/packages/vitest/mod.ts b/packages/vitest/mod.ts index 09950005..79d71027 100644 --- a/packages/vitest/mod.ts +++ b/packages/vitest/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/vitest` — typed `vitest` task wrappers for Zuke builds. * diff --git a/packages/vitest/src/vitest.ts b/packages/vitest/src/vitest.ts index dbdd0448..837fc84b 100644 --- a/packages/vitest/src/vitest.ts +++ b/packages/vitest/src/vitest.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `VitestTasks` — typed task functions for the `vitest` test runner, in the * same settings-lambda style as the other Zuke tool wrappers: configure a diff --git a/packages/vitest/tests/vitest_test.ts b/packages/vitest/tests/vitest_test.ts index 1dd2a925..aae6510e 100644 --- a/packages/vitest/tests/vitest_test.ts +++ b/packages/vitest/tests/vitest_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects } from "../../core/tests/_assert.ts"; import { ToolNotFoundError } from "@zuke/core/tooling"; import { diff --git a/packages/yarn/mod.ts b/packages/yarn/mod.ts index 0c8e811c..6f3b81b6 100644 --- a/packages/yarn/mod.ts +++ b/packages/yarn/mod.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `@zuke/yarn` — typed `YarnTasks` wrappers for the `yarn` CLI, for use in Zuke * build targets (Yarn Classic v1 and Berry v2+; version-specific options are diff --git a/packages/yarn/src/yarn.ts b/packages/yarn/src/yarn.ts index 2fa753be..0c0ae05f 100644 --- a/packages/yarn/src/yarn.ts +++ b/packages/yarn/src/yarn.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * `YarnTasks` — typed task functions for the `yarn` CLI, in the settings-lambda * style: configure a fluent settings object in a lambda, and the task function diff --git a/packages/yarn/tests/yarn_test.ts b/packages/yarn/tests/yarn_test.ts index f6dcd3c3..b3fbc92b 100644 --- a/packages/yarn/tests/yarn_test.ts +++ b/packages/yarn/tests/yarn_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertRejects, diff --git a/tests/action_manifest_test.ts b/tests/action_manifest_test.ts index e1469351..6390fe7e 100644 --- a/tests/action_manifest_test.ts +++ b/tests/action_manifest_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Unit tests for the metadata half of the root `action.yml` — the fields that * exist because the composite action is published to the GitHub Marketplace, diff --git a/tests/action_pins_test.ts b/tests/action_pins_test.ts index 9337fc62..87dc9b8e 100644 --- a/tests/action_pins_test.ts +++ b/tests/action_pins_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Unit tests for `build/action_pins.ts` — the module that reads pinned action * SHAs back out of the committed workflows so Dependabot stays the thing that diff --git a/tests/action_release_job_test.ts b/tests/action_release_job_test.ts index b8f8b953..d4fb9d75 100644 --- a/tests/action_release_job_test.ts +++ b/tests/action_release_job_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Tests for the generated `actionRelease` job in `.github/workflows/release.yml`. * @@ -97,6 +100,6 @@ Deno.test("the action release job can reach what it actually calls", () => { throw new Error("the job declares no allowed endpoints"); } const allowed = String(checkout.with["allowed-endpoints"]).split(/\s+/); - assertEquals(allowed.includes("api.github.com:443"), true); - assertEquals(allowed.includes("github.com:443"), true); + assertEquals(allowed.some((e) => e === "api.github.com:443"), true); + assertEquals(allowed.some((e) => e === "github.com:443"), true); }); diff --git a/tests/action_release_test.ts b/tests/action_release_test.ts index f1d330e0..dee63d4f 100644 --- a/tests/action_release_test.ts +++ b/tests/action_release_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Unit tests for `build/action_release.ts` — the versioning behind the * repository's own Marketplace action. diff --git a/tests/build_tools_test.ts b/tests/build_tools_test.ts index adaba185..de80d6c5 100644 --- a/tests/build_tools_test.ts +++ b/tests/build_tools_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Smoke tests for the release-tooling modules under `build/` — code that runs * only in CI's release jobs and, before this file, wasn't imported by any diff --git a/tests/codeql_workflow_test.ts b/tests/codeql_workflow_test.ts index 0170b755..32017abb 100644 --- a/tests/codeql_workflow_test.ts +++ b/tests/codeql_workflow_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Regression tests for the committed `codeql.yml` — the SAST lane. * diff --git a/tests/core_floor_test.ts b/tests/core_floor_test.ts index aa5b2900..13991fc8 100644 --- a/tests/core_floor_test.ts +++ b/tests/core_floor_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "../packages/core/tests/_assert.ts"; import { CORE_PACKAGE, diff --git a/tests/e2e/cancel_e2e.ts b/tests/e2e/cancel_e2e.ts index 86cade68..f2439f6f 100644 --- a/tests/e2e/cancel_e2e.ts +++ b/tests/e2e/cancel_e2e.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * End-to-end: cross-process cancellation. Process A runs the * {@link file://./fixtures/cancel_build.ts} pipeline to its approval gate and diff --git a/tests/e2e/effect_redrive_e2e.ts b/tests/e2e/effect_redrive_e2e.ts index 2fd6f1b3..e0d3871e 100644 --- a/tests/e2e/effect_redrive_e2e.ts +++ b/tests/e2e/effect_redrive_e2e.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * End-to-end: the one thing the in-process suite cannot prove — that an effect's * intent survives a real `SIGKILL`, and that a **different** OS process finds it diff --git a/tests/e2e/fixtures/cancel_build.ts b/tests/e2e/fixtures/cancel_build.ts index 02f601ca..900c047f 100644 --- a/tests/e2e/fixtures/cancel_build.ts +++ b/tests/e2e/fixtures/cancel_build.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * A real, runnable Zuke build used by the e2e cancellation suite. Run as a * subprocess (`deno run -A cancel_build.ts `), it deploys (recording a diff --git a/tests/e2e/fixtures/discoverable_build.ts b/tests/e2e/fixtures/discoverable_build.ts index ac0015c2..0ebbef17 100644 --- a/tests/e2e/fixtures/discoverable_build.ts +++ b/tests/e2e/fixtures/discoverable_build.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * A tiny runnable build used by the registry-MCP e2e. It registers itself * (`register`) into `ZUKE_REGISTRY_DIR`, and its one target prints a marker so a diff --git a/tests/e2e/fixtures/effect_build.ts b/tests/e2e/fixtures/effect_build.ts index 5ea70452..0132d309 100644 --- a/tests/e2e/fixtures/effect_build.ts +++ b/tests/e2e/fixtures/effect_build.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * A real, runnable Zuke build used by the effect re-drive e2e suite. Run as a * subprocess (`deno run -A effect_build.ts announce`), its one target declares a diff --git a/tests/e2e/fixtures/gate_build.ts b/tests/e2e/fixtures/gate_build.ts index 8e810b2f..5118ecb8 100644 --- a/tests/e2e/fixtures/gate_build.ts +++ b/tests/e2e/fixtures/gate_build.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * A real, runnable Zuke build used by the e2e race suite. Run as a subprocess * (`deno run -A gate_build.ts `), it suspends at an approval gate and is diff --git a/tests/e2e/fixtures/gh_workflow_build.ts b/tests/e2e/fixtures/gh_workflow_build.ts index ad29ef8b..ec1333c4 100644 --- a/tests/e2e/fixtures/gh_workflow_build.ts +++ b/tests/e2e/fixtures/gh_workflow_build.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * A runnable Zuke build for the githubWorkflow e2e suite. Run as a subprocess * (`deno run -A gh_workflow_build.ts `), it waits on a diff --git a/tests/e2e/fixtures/kill_after_build.ts b/tests/e2e/fixtures/kill_after_build.ts index 8baa5908..430e1377 100644 --- a/tests/e2e/fixtures/kill_after_build.ts +++ b/tests/e2e/fixtures/kill_after_build.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * A real, runnable Zuke build used by the e2e `killAfter` suite. Run as a * subprocess (`deno run -A kill_after_build.ts timeout`), its one target starts a diff --git a/tests/e2e/fixtures/otel_build.ts b/tests/e2e/fixtures/otel_build.ts index 15a05aab..c54f1af8 100644 --- a/tests/e2e/fixtures/otel_build.ts +++ b/tests/e2e/fixtures/otel_build.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * A real, runnable Zuke build for the OTel e2e suite. Run as a subprocess * (`deno run -A otel_build.ts `), it deploys, suspends at an approval diff --git a/tests/e2e/fixtures/register_build.ts b/tests/e2e/fixtures/register_build.ts index 7f32ad7e..f0b7dde5 100644 --- a/tests/e2e/fixtures/register_build.ts +++ b/tests/e2e/fixtures/register_build.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * A real, runnable Zuke build used by the registry e2e race. Run as a subprocess * (`deno run -A register_build.ts register`), it records itself in the build diff --git a/tests/e2e/gh_workflow_e2e.ts b/tests/e2e/gh_workflow_e2e.ts index afd17c1e..634b018d 100644 --- a/tests/e2e/gh_workflow_e2e.ts +++ b/tests/e2e/gh_workflow_e2e.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * End-to-end: a `githubWorkflow(...)` wait across two real processes. Process A * reaches the gate, dispatches (recording the marker to a file), and suspends; diff --git a/tests/e2e/kill_after_e2e.ts b/tests/e2e/kill_after_e2e.ts index 8004e04b..943361fe 100644 --- a/tests/e2e/kill_after_e2e.ts +++ b/tests/e2e/kill_after_e2e.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * End-to-end: a `killAfter` timeout must reap a child that ignores `SIGTERM`. * The {@link file://./fixtures/kill_after_build.ts} fixture runs, in a real diff --git a/tests/e2e/mcp_e2e.ts b/tests/e2e/mcp_e2e.ts index 3191aabb..d1e28785 100644 --- a/tests/e2e/mcp_e2e.ts +++ b/tests/e2e/mcp_e2e.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * End-to-end: the M5 two-session acceptance across real processes. Session A * (a CLI run) deploys and suspends at an approval gate; a separate `zuke mcp` diff --git a/tests/e2e/otel_e2e.ts b/tests/e2e/otel_e2e.ts index b1515ccc..e863409a 100644 --- a/tests/e2e/otel_e2e.ts +++ b/tests/e2e/otel_e2e.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * End-to-end: cross-process trace continuity. Process A runs the * {@link file://./fixtures/otel_build.ts} pipeline to its approval gate and diff --git a/tests/e2e/race_e2e.ts b/tests/e2e/race_e2e.ts index fef63ace..7c9434ac 100644 --- a/tests/e2e/race_e2e.ts +++ b/tests/e2e/race_e2e.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * End-to-end: the one thing the in-process suite cannot prove — that two real, * separate OS processes racing to resume the same suspended run resolve to diff --git a/tests/e2e/reap_takeover_e2e.ts b/tests/e2e/reap_takeover_e2e.ts index 10485bfb..a9043ef9 100644 --- a/tests/e2e/reap_takeover_e2e.ts +++ b/tests/e2e/reap_takeover_e2e.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * End-to-end: two real sweeper processes racing to reap the same abandoned run. * diff --git a/tests/e2e/registry_e2e.ts b/tests/e2e/registry_e2e.ts index f2034b7f..06837a30 100644 --- a/tests/e2e/registry_e2e.ts +++ b/tests/e2e/registry_e2e.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * End-to-end: two real, separate OS processes racing `zuke register` against one * shared build registry converge on a single, uncorrupted descriptor — the diff --git a/tests/e2e/registry_mcp_e2e.ts b/tests/e2e/registry_mcp_e2e.ts index 08cee88e..7f8a055d 100644 --- a/tests/e2e/registry_mcp_e2e.ts +++ b/tests/e2e/registry_mcp_e2e.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * End-to-end: the M11 acceptance across real processes. A `zuke mcp --registry` * server starts over an empty build registry; a separate process registers a new diff --git a/tests/e2e_registration_test.ts b/tests/e2e_registration_test.ts index 548cae3c..67bab74c 100644 --- a/tests/e2e_registration_test.ts +++ b/tests/e2e_registration_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Guards the subprocess e2e suite's registration in `zuke.ts`: the * `integration` target must discover `tests/e2e/*_e2e.ts` by glob rather than a diff --git a/tests/gitleaks_report_test.ts b/tests/gitleaks_report_test.ts index 8797aab8..64dfc15c 100644 --- a/tests/gitleaks_report_test.ts +++ b/tests/gitleaks_report_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Unit tests for the gitleaks report formatter — the job-summary section that * replaced the workflow's artifact upload. @@ -114,6 +117,24 @@ Deno.test("a pipe in a value cannot break out of the table cell", () => { assertStringIncludes(summary, "a\\|b.ts"); }); +Deno.test("a backslash in a value cannot pose as an escape", () => { + // A Windows path contains backslashes. Unescaped, the value's own backslash + // would merge with the escapes this table adds — `a\` before a pipe reads as + // an escaped pipe, fabricating cell content in the one report that says + // where a secret is. + const summary = gitleaksSummary([ + { + rule: "r", + file: "dir\\a|b.ts", + line: 1, + commit: "c", + fingerprint: "f", + }, + ]); + if (summary === null) throw new Error("expected a summary"); + assertStringIncludes(summary, "dir\\\\a\\|b.ts"); +}); + Deno.test("a backtick in a path cannot end its code span early", () => { // A path may contain a backtick, and this table is the only place a failing // scan reports where a secret is — a row garbled by its own filename would diff --git a/tests/hcl_gen_test.ts b/tests/hcl_gen_test.ts index f0878c1f..55e195d6 100644 --- a/tests/hcl_gen_test.ts +++ b/tests/hcl_gen_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Tests for the Terraform/OpenTofu single-source generator (`build/hcl_gen.ts`): * `renderHcl` is pure and checked directly; the committed wrappers must diff --git a/tests/integration/_harness.ts b/tests/integration/_harness.ts index 15164a44..56990bb4 100644 --- a/tests/integration/_harness.ts +++ b/tests/integration/_harness.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Shared harness for the in-process integration suite. Drives a real build * through the CLI `main()` entry point — the same path the `zuke` command uses diff --git a/tests/integration/ai_review_test.ts b/tests/integration/ai_review_test.ts index 2b390b1d..851cc7ec 100644 --- a/tests/integration/ai_review_test.ts +++ b/tests/integration/ai_review_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Integration: an AI reviewer gating a real build through the CLI `main()`, * with the provider, the PR-comment API, and git all faked at their seams — @@ -66,7 +69,7 @@ function fakeFetch( method, body: typeof init?.body === "string" ? init.body : "", }); - if (url.includes("api.github.com")) { + if (url.startsWith("https://api.github.com/")) { if (url.endsWith("/user")) { return Promise.resolve(new Response("{}", { status: 403 })); } @@ -166,7 +169,7 @@ Deno.test("a reviewer with verify + discussion gates a real build via the CLI", // The comment was updated in place (the bot-authored one), carrying state. const write = calls.find((c) => - c.url.includes("api.github.com") && c.method !== "GET" + c.url.startsWith("https://api.github.com/") && c.method !== "GET" ); assertEquals(write?.method, "PATCH"); assertEquals(write?.url.endsWith("/issues/comments/11"), true); @@ -229,7 +232,7 @@ Deno.test("a fixed finding is reported as progress and the build passes", async }, ); const write = calls.find((c) => - c.url.includes("api.github.com") && c.method === "POST" + c.url.startsWith("https://api.github.com/") && c.method === "POST" ); const posted = JSON.parse(write?.body ?? "{}").body; assertEquals(posted.includes("✅ Fixed since first review"), true); @@ -359,7 +362,7 @@ Deno.test("the discussion drives a real build on GitLab, not just GitHub", async // The reviewer's own note was updated in place and still carries the state. const write = calls.find((c) => - c.url.startsWith("https://gitlab.example") && c.method !== "GET" + c.url.startsWith("https://gitlab.example/") && c.method !== "GET" ); assertEquals(write?.method, "PUT"); assertEquals(write?.url.endsWith("/notes/11"), true); @@ -447,7 +450,7 @@ Deno.test("a reworded finding inherits its dismissal through the CLI", async () // The comment carries one identity with the rewording recorded, so the next // round resolves it without paying for another call. const write = calls.find((c) => - c.url.includes("api.github.com") && c.method !== "GET" + c.url.startsWith("https://api.github.com/") && c.method !== "GET" ); const state = decodeState(JSON.parse(write?.body ?? "{}").body); assertEquals(state?.findings.length, 1); diff --git a/tests/integration/always_settled_test.ts b/tests/integration/always_settled_test.ts index 87187082..4eacbba7 100644 --- a/tests/integration/always_settled_test.ts +++ b/tests/integration/always_settled_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Integration tests for `.always()` readiness — a target that runs *because* * something failed must not be held back by that failure. diff --git a/tests/integration/backend_trust_test.ts b/tests/integration/backend_trust_test.ts index cbf8ac18..ac6eb3f2 100644 --- a/tests/integration/backend_trust_test.ts +++ b/tests/integration/backend_trust_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Integration: the two trust boundaries a build crosses without the author * writing any code for them — the URL of a configured backend, and the contents diff --git a/tests/integration/caching_test.ts b/tests/integration/caching_test.ts index dddd1bba..7cd1a1f9 100644 --- a/tests/integration/caching_test.ts +++ b/tests/integration/caching_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Integration: incremental caching (`.inputs`/`.outputs`/`.cacheKey`), the * remote cache, and the affected-targets computation. The caching scenarios diff --git a/tests/integration/cancel_degraded_test.ts b/tests/integration/cancel_degraded_test.ts index 734e1121..0a8bea1a 100644 --- a/tests/integration/cancel_degraded_test.ts +++ b/tests/integration/cancel_degraded_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Integration: `zuke cancel` on a run whose record is **degraded** — a state * write was permanently lost, so a target that really did deploy is still diff --git a/tests/integration/cancel_snapshot_test.ts b/tests/integration/cancel_snapshot_test.ts index 125cc0b0..ffe19901 100644 --- a/tests/integration/cancel_snapshot_test.ts +++ b/tests/integration/cancel_snapshot_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Integration: `zuke cancel` decides which compensations to run from the record * as it stands **after** its transition to `cancelling`, not from the diff --git a/tests/integration/cancel_test.ts b/tests/integration/cancel_test.ts index 6345e04b..d400753c 100644 --- a/tests/integration/cancel_test.ts +++ b/tests/integration/cancel_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Integration: the cancellation flow driven through the real CLI. A build * suspends at a `waitsFor()` gate; a later `zuke cancel ` command (a diff --git a/tests/integration/cli_flags_test.ts b/tests/integration/cli_flags_test.ts index 7bcb34b8..f39a4471 100644 --- a/tests/integration/cli_flags_test.ts +++ b/tests/integration/cli_flags_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Integration: unknown CLI flags and targets are rejected, driven through the * real CLI `main()` (via {@link runCli}). Covers the did-you-mean suggestion for diff --git a/tests/integration/cli_test.ts b/tests/integration/cli_test.ts index f0361d2e..8f40e60a 100644 --- a/tests/integration/cli_test.ts +++ b/tests/integration/cli_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Integration: the CLI reserved-command surface, driven through the real CLI * `main()` (via {@link runCli}) rather than the unit-level `parseArgs`/`format*` diff --git a/tests/integration/conditional_test.ts b/tests/integration/conditional_test.ts index e3dfbc26..6dede447 100644 --- a/tests/integration/conditional_test.ts +++ b/tests/integration/conditional_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Integration: conditional execution, retries, timeouts, validation, and * recovery, driven through the real CLI. Each test defines a fixture build diff --git a/tests/integration/doc_test.ts b/tests/integration/doc_test.ts index 00e7626a..f43b6068 100644 --- a/tests/integration/doc_test.ts +++ b/tests/integration/doc_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "../../packages/core/tests/_assert.ts"; import { Build, target } from "../../packages/core/mod.ts"; import { runCli } from "./_harness.ts"; diff --git a/tests/integration/dry_run_redaction_test.ts b/tests/integration/dry_run_redaction_test.ts index 908e9b3e..c28f22d9 100644 --- a/tests/integration/dry_run_redaction_test.ts +++ b/tests/integration/dry_run_redaction_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Integration: a secret used as an argv token must not surface in a command * echo. Under `--dry-run` a `.dryRunnable()` target's body runs with `$` in echo diff --git a/tests/integration/effects_test.ts b/tests/integration/effects_test.ts index d6f38ddc..2ca78104 100644 --- a/tests/integration/effects_test.ts +++ b/tests/integration/effects_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Integration tests for `.effect(...)` — a side effect whose intent is durable * before it runs, driven through the real CLI. diff --git a/tests/integration/execution_test.ts b/tests/integration/execution_test.ts index 66011d7d..d5697180 100644 --- a/tests/integration/execution_test.ts +++ b/tests/integration/execution_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Integration: the executor's core flow, driven through the real CLI. Each test * defines a fixture build whose target bodies push their name onto a local diff --git a/tests/integration/foreach_test.ts b/tests/integration/foreach_test.ts index 6b488ea8..83c70d62 100644 --- a/tests/integration/foreach_test.ts +++ b/tests/integration/foreach_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Integration: a `.forEach(...)` fan-out whose factory returns builders it does * not own — the pattern a shared pipeline helper produces — driven twice through diff --git a/tests/integration/gh_workflow_test.ts b/tests/integration/gh_workflow_test.ts index a92aa2f9..fad40a87 100644 --- a/tests/integration/gh_workflow_test.ts +++ b/tests/integration/gh_workflow_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Integration: a `.waitsFor(githubWorkflow(...))` gate driven through the real * CLI. The GitHub API is a fake, but the executor, the durable state writer, the diff --git a/tests/integration/graph_test.ts b/tests/integration/graph_test.ts index b38ac4c5..563808f8 100644 --- a/tests/integration/graph_test.ts +++ b/tests/integration/graph_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Integration: the dependency-graph flow, driven through the real CLI. Each * test defines a fixture build locally — closing over a `log` array for the diff --git a/tests/integration/harness_test.ts b/tests/integration/harness_test.ts index 15e33239..31b8f1d9 100644 --- a/tests/integration/harness_test.ts +++ b/tests/integration/harness_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Regression tests for the integration harness itself: its throwaway temp-dir * cleanup must never mask the failure a test actually cares about. A `finally` diff --git a/tests/integration/install_tree_test.ts b/tests/integration/install_tree_test.ts index fce79550..79e41c93 100644 --- a/tests/integration/install_tree_test.ts +++ b/tests/integration/install_tree_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertStringIncludes, diff --git a/tests/integration/install_zip_test.ts b/tests/integration/install_zip_test.ts index 5517519e..747eada6 100644 --- a/tests/integration/install_zip_test.ts +++ b/tests/integration/install_zip_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertStringIncludes, diff --git a/tests/integration/kill_after_test.ts b/tests/integration/kill_after_test.ts index 78cd7b44..aaf1fbdd 100644 --- a/tests/integration/kill_after_test.ts +++ b/tests/integration/kill_after_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertStringIncludes, diff --git a/tests/integration/locked_tool_test.ts b/tests/integration/locked_tool_test.ts index d503bc0f..90a96289 100644 --- a/tests/integration/locked_tool_test.ts +++ b/tests/integration/locked_tool_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "../../packages/core/tests/_assert.ts"; import { Build, target } from "../../packages/core/mod.ts"; import { DenoTasks } from "../../packages/deno/mod.ts"; diff --git a/tests/integration/m10_test.ts b/tests/integration/m10_test.ts index 863c8bf1..1072dd4d 100644 --- a/tests/integration/m10_test.ts +++ b/tests/integration/m10_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Integration: the two M10 features driven through the real CLI `main()`. * diff --git a/tests/integration/mcp_audit_test.ts b/tests/integration/mcp_audit_test.ts index eec0078f..c2b40b2a 100644 --- a/tests/integration/mcp_audit_test.ts +++ b/tests/integration/mcp_audit_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Integration: the MCP audit trail is rendered by `zuke runs show`, driven * through the real CLI `main()`. A record with an audit event is persisted to diff --git a/tests/integration/mcp_authz_test.ts b/tests/integration/mcp_authz_test.ts index b7f68499..3c2f8b73 100644 --- a/tests/integration/mcp_authz_test.ts +++ b/tests/integration/mcp_authz_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Integration: MCP authorization over a real build, and the operator's * host-side view of the trail it writes. diff --git a/tests/integration/orderwith_test.ts b/tests/integration/orderwith_test.ts index 5b32256e..81a988c4 100644 --- a/tests/integration/orderwith_test.ts +++ b/tests/integration/orderwith_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Integration: `Build.orderWith` — the lazy, per-run soft-ordering provider * (M19 P2 #10) — driven through the real CLI `main()`. Unlike `extraEdges`, the diff --git a/tests/integration/otel_test.ts b/tests/integration/otel_test.ts index c95108c3..e4ca3454 100644 --- a/tests/integration/otel_test.ts +++ b/tests/integration/otel_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Integration: drive a real build through the CLI `main()` with the `@zuke/otel` * plugin registered, against a capturing `fetch` (the only faked seam — the diff --git a/tests/integration/outcomes_test.ts b/tests/integration/outcomes_test.ts index 932faac1..2dcac297 100644 --- a/tests/integration/outcomes_test.ts +++ b/tests/integration/outcomes_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Integration tests for `ctx.outcomeOf(...)` / `ctx.outcomes()` — a target * reading what the rest of the run did. diff --git a/tests/integration/ownership_test.ts b/tests/integration/ownership_test.ts index 64ca849c..80b2e57a 100644 --- a/tests/integration/ownership_test.ts +++ b/tests/integration/ownership_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Integration tests for run ownership, driven through the real CLI. * diff --git a/tests/integration/params_test.ts b/tests/integration/params_test.ts index 1a09df40..c35d53d0 100644 --- a/tests/integration/params_test.ts +++ b/tests/integration/params_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Integration: build parameters (`--`, `.env()`, `.options()`, * `.boolean()`, `.secret()`), driven through the real CLI. Each test defines a diff --git a/tests/integration/plugin_sync_test.ts b/tests/integration/plugin_sync_test.ts index f697a265..ce857aef 100644 --- a/tests/integration/plugin_sync_test.ts +++ b/tests/integration/plugin_sync_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Integration: the `pluginSync`/`pluginSyncCheck`-style target wiring — sync * a source tree into a destination copy and fail the build on drift — driven diff --git a/tests/integration/plugin_test.ts b/tests/integration/plugin_test.ts index 1e3f86c9..c6398b1f 100644 --- a/tests/integration/plugin_test.ts +++ b/tests/integration/plugin_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Integration: the enriched plugin lifecycle (M7) driven through the real CLI. * A plugin passed to `main()` receives the run id and dry-run flag on every diff --git a/tests/integration/pr_body_lint_test.ts b/tests/integration/pr_body_lint_test.ts index 4d2295a9..42e69dd9 100644 --- a/tests/integration/pr_body_lint_test.ts +++ b/tests/integration/pr_body_lint_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Integration: the `prBodyLint`-style target wiring — a `.env("PR_BODY")` * parameter feeding {@link lintPrBody} and failing the build on any finding — diff --git a/tests/integration/prepend_path_test.ts b/tests/integration/prepend_path_test.ts index 85c5d1da..16d65dd3 100644 --- a/tests/integration/prepend_path_test.ts +++ b/tests/integration/prepend_path_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertStringIncludes, diff --git a/tests/integration/reap_test.ts b/tests/integration/reap_test.ts index 0636036a..c7eff4d6 100644 --- a/tests/integration/reap_test.ts +++ b/tests/integration/reap_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Integration tests for reaping, driven through the real CLI. * diff --git a/tests/integration/register_test.ts b/tests/integration/register_test.ts index 3df28fa0..c8ce8d25 100644 --- a/tests/integration/register_test.ts +++ b/tests/integration/register_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Integration: `zuke register` driven through the real CLI `main()`. Proves the * command resolves a registry from `ZUKE_REGISTRY_DIR`, writes a descriptor a diff --git a/tests/integration/registry_params_test.ts b/tests/integration/registry_params_test.ts index 8badc2fd..1bd870bd 100644 --- a/tests/integration/registry_params_test.ts +++ b/tests/integration/registry_params_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Integration: a build's declared parameters flow all the way from * `zuke register` through a real {@link FileSystemBuildRegistry} (descriptor diff --git a/tests/integration/resume_degraded_test.ts b/tests/integration/resume_degraded_test.ts index c24c16fd..31a1c650 100644 --- a/tests/integration/resume_degraded_test.ts +++ b/tests/integration/resume_degraded_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Integration: a run that **permanently lost** a state write is recorded * `degraded`, and `zuke resume` refuses it until `--resume-degraded` overrides diff --git a/tests/integration/run_lease_test.ts b/tests/integration/run_lease_test.ts index 9478c92d..79bc30ae 100644 --- a/tests/integration/run_lease_test.ts +++ b/tests/integration/run_lease_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Integration tests for the run lease — a process's claim that it is the one * working on a run, driven through the real CLI. diff --git a/tests/integration/setup_scaffold_test.ts b/tests/integration/setup_scaffold_test.ts index 659d44ba..ae34a5c3 100644 --- a/tests/integration/setup_scaffold_test.ts +++ b/tests/integration/setup_scaffold_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Integration coverage for `zuke setup`: drive the real `@zuke/cli` `main()` * against a real temporary directory (the production {@link defaultHost}, only diff --git a/tests/integration/shell_output_test.ts b/tests/integration/shell_output_test.ts index ff89f12c..53bd5be8 100644 --- a/tests/integration/shell_output_test.ts +++ b/tests/integration/shell_output_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertStringIncludes, diff --git a/tests/integration/split_args_test.ts b/tests/integration/split_args_test.ts index d5692634..ac2fe95b 100644 --- a/tests/integration/split_args_test.ts +++ b/tests/integration/split_args_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertStringIncludes, diff --git a/tests/integration/state_test.ts b/tests/integration/state_test.ts index 83947098..7b6107a6 100644 --- a/tests/integration/state_test.ts +++ b/tests/integration/state_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Integration: durable build state and locks, driven through the real CLI. With * `ZUKE_STATE_DIR` pointed at a temp dir (via the harness), every run persists a diff --git a/tests/integration/stateof_storeless_test.ts b/tests/integration/stateof_storeless_test.ts index 2fdc9a59..eda1f0bd 100644 --- a/tests/integration/stateof_storeless_test.ts +++ b/tests/integration/stateof_storeless_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Integration: `ctx.stateOf(ctx.target)` is equivalent to `ctx.state` even for a * **store-less** build (no state store configured). Guards the documented diff --git a/tests/integration/tool_resolution_test.ts b/tests/integration/tool_resolution_test.ts index 2f184035..8480fe84 100644 --- a/tests/integration/tool_resolution_test.ts +++ b/tests/integration/tool_resolution_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Integration: npx-style `node_modules/.bin` tool resolution driven through a * real build. A target runs a `defineTool` wrapper with `.fromNodeModules()`; diff --git a/tests/integration/toolchain_npm_test.ts b/tests/integration/toolchain_npm_test.ts index 4c552ead..ae90b030 100644 --- a/tests/integration/toolchain_npm_test.ts +++ b/tests/integration/toolchain_npm_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals, assertStringIncludes, diff --git a/tests/integration/waiting_test.ts b/tests/integration/waiting_test.ts index 0af476aa..64baef3d 100644 --- a/tests/integration/waiting_test.ts +++ b/tests/integration/waiting_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Integration: the wait/resume flow and services, driven through the real CLI. * A `waitsFor()` gate suspends a run to the state store; a later `resume` diff --git a/tests/integration/wrapper_conformance_test.ts b/tests/integration/wrapper_conformance_test.ts index e2bffe73..c36cc915 100644 --- a/tests/integration/wrapper_conformance_test.ts +++ b/tests/integration/wrapper_conformance_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Integration: the wrapper conformance kit run against real, published wrapper * packages from inside a real build, driven through the CLI `main()`. Covers a diff --git a/tests/launcher_bootstrap_test.ts b/tests/launcher_bootstrap_test.ts index 4ea63087..0e88aca3 100644 --- a/tests/launcher_bootstrap_test.ts +++ b/tests/launcher_bootstrap_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "../packages/core/tests/_assert.ts"; import { defaultHost, runSetup } from "../packages/cli/src/setup.ts"; diff --git a/tests/license_headers_test.ts b/tests/license_headers_test.ts new file mode 100644 index 00000000..f896c46d --- /dev/null +++ b/tests/license_headers_test.ts @@ -0,0 +1,54 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + +/** + * Every source file carries the copyright and SPDX license header — the + * per-file identification the OpenSSF Best Practices gold criteria + * (`copyright_per_file`, `license_per_file`) require. Enforced here so a new + * file cannot quietly ship without one. + * + * @module + */ + +import { assertEquals } from "../packages/core/tests/_assert.ts"; + +const COPYRIGHT = "Copyright (c) "; +const SPDX = "SPDX-License-Identifier: MIT"; + +/** Directories whose `.ts` files are all subject to the header requirement. */ +const TS_ROOTS = ["packages", "build", "tests"]; + +/** Every `.ts` file under `dir`, recursively. */ +async function tsFiles(dir: string): Promise { + const found: string[] = []; + for await (const entry of Deno.readDir(dir)) { + const path = `${dir}/${entry.name}`; + if (entry.isDirectory) found.push(...await tsFiles(path)); + else if (entry.isFile && entry.name.endsWith(".ts")) found.push(path); + } + return found; +} + +/** The files that must carry the header, whatever their comment syntax. */ +async function allSources(): Promise { + const files: string[] = []; + for (const root of TS_ROOTS) files.push(...await tsFiles(root)); + files.push("zuke.ts", "zuke", "zuke.ps1", "internal/hcl_tool.ts.tmpl"); + return files.sort(); +} + +Deno.test("every source file carries the copyright and SPDX header", async () => { + const missing: string[] = []; + for (const file of await allSources()) { + // Only the head is inspected: the header belongs at the top (after a + // shebang, for the launchers), not buried somewhere in the file. + const head = (await Deno.readTextFile(file)).slice(0, 300); + if (!head.includes(COPYRIGHT) || !head.includes(SPDX)) missing.push(file); + } + assertEquals( + missing, + [], + `files missing the copyright/SPDX header (add the two header lines at ` + + `the top, after any shebang):\n ${missing.join("\n ")}`, + ); +}); diff --git a/tests/lock_check_test.ts b/tests/lock_check_test.ts index 6f79378f..81be2b91 100644 --- a/tests/lock_check_test.ts +++ b/tests/lock_check_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "../packages/core/tests/_assert.ts"; import { LOCK_FILE, diff --git a/tests/plugin_manifest_test.ts b/tests/plugin_manifest_test.ts index bc76c189..db3dad2f 100644 --- a/tests/plugin_manifest_test.ts +++ b/tests/plugin_manifest_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Unit tests for the Claude Code plugin's two manifests — the plugin's own * `plugins/zuke/.claude-plugin/plugin.json` and the marketplace entry in diff --git a/tests/plugin_sync_test.ts b/tests/plugin_sync_test.ts index fee82770..effff58e 100644 --- a/tests/plugin_sync_test.ts +++ b/tests/plugin_sync_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Tests for the plugin skills sync (`build/plugin_sync.ts`): the committed * `plugins/zuke/skills/` must byte-compare identical to `skills/`, since it diff --git a/tests/plugin_version_check_test.ts b/tests/plugin_version_check_test.ts index ed21db18..3dc112f0 100644 --- a/tests/plugin_version_check_test.ts +++ b/tests/plugin_version_check_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Unit tests for the gate's plugin-version check. * diff --git a/tests/pr_body_lint_test.ts b/tests/pr_body_lint_test.ts index 67d4cfd6..7ab7e781 100644 --- a/tests/pr_body_lint_test.ts +++ b/tests/pr_body_lint_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Unit tests for the PR-body linter (`build/pr_body_lint.ts`): fenced code * blocks and code-shaped paren-bearing lines are flagged; ordinary prose diff --git a/tests/release_config_test.ts b/tests/release_config_test.ts index 07f882c6..5f1b0752 100644 --- a/tests/release_config_test.ts +++ b/tests/release_config_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + import { assertEquals } from "../packages/core/tests/_assert.ts"; const PACKAGES = [ diff --git a/tests/scanners_test.ts b/tests/scanners_test.ts index 740d289b..878b8d7d 100644 --- a/tests/scanners_test.ts +++ b/tests/scanners_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Unit tests for `build/scanners.ts` — the pinned toolchain declarations the * `security` target provisions its scanners from. Everything here is pure URL diff --git a/tests/snippets_test.ts b/tests/snippets_test.ts index d9c7c682..b49f0b84 100644 --- a/tests/snippets_test.ts +++ b/tests/snippets_test.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Unit tests for the doc-snippet type-check gate (`build/snippets.ts`): the * extractor is pure and fully exercised here; the checker's orchestration is diff --git a/zuke b/zuke index d04ef6be..37d08b0a 100755 --- a/zuke +++ b/zuke @@ -1,4 +1,6 @@ #!/usr/bin/env bash +# Copyright (c) 2026 the Zuke contributors +# SPDX-License-Identifier: MIT # # Zuke bootstrap launcher — a `./build.sh`-style entry point for Deno. # diff --git a/zuke.ps1 b/zuke.ps1 index 1ca9f75a..51bc0703 100644 --- a/zuke.ps1 +++ b/zuke.ps1 @@ -1,4 +1,6 @@ #!/usr/bin/env pwsh +# Copyright (c) 2026 the Zuke contributors +# SPDX-License-Identifier: MIT # # Zuke bootstrap launcher (PowerShell) — a `.\build.ps1`-style entry point. # diff --git a/zuke.ts b/zuke.ts index 91c22a63..87b5e3bb 100644 --- a/zuke.ts +++ b/zuke.ts @@ -1,3 +1,6 @@ +// Copyright (c) 2026 the Zuke contributors +// SPDX-License-Identifier: MIT + /** * Zuke's own build, authored with Zuke — the project builds itself. *