Skip to content

chore(release): version packages#14

Merged
bahadirarda merged 1 commit intomainfrom
changeset-release/main
Apr 22, 2026
Merged

chore(release): version packages#14
bahadirarda merged 1 commit intomainfrom
changeset-release/main

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented Apr 22, 2026

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@namzu/cli@0.0.1

Patch Changes

  • 8f076e5: ses_007 Phase 5 — doctor runtime moved from @namzu/sdk to @namzu/cli. Architectural pivot: kernel = SDK (pure runtime primitives), operator surface = CLI (presentation + tooling).

    Breaking changes — @namzu/sdk

    The following 12 runtime exports have been removed from @namzu/sdk. They now live in @namzu/cli:

    • doctor (singleton), DoctorRegistry, createDoctorRegistry
    • registerDoctorCheck, runDoctor
    • builtInDoctorChecks
    • sandboxPlatformCheck, cwdWritableCheck, tmpdirWritableCheck
    • vaultRegisteredCheck, providersRegisteredCheck, telemetryInstalledCheck

    The RunDoctorOptions type has also been removed from @namzu/sdk exports.

    What stays in @namzu/sdk:

    • The protocol types — DoctorCheck, DoctorCheckResult, DoctorCheckContext, DoctorCheckRecord, DoctorReport, DoctorStatus, DoctorCategory — remain in types/doctor/ so kernel components can implement custom checks against them.
    • LLMProvider.doctorCheck?(): Promise<DoctorCheckResult> — the kernel hook that lets a provider expose its own healthcheck stays on the interface.

    Migration

    If you were calling the doctor in your own process:

    - import { runDoctor, registerDoctorCheck } from '@namzu/sdk'
    + import { runDoctor, registerDoctorCheck } from '@namzu/cli'

    If you were running it from the command line:

    # Before — required a custom CLI bin or `pnpm dlx tsx packages/sdk/src/doctor/...`
    # After:
    pnpm dlx @namzu/cli doctor
    # or, after install: namzu doctor

    Custom check authors continue to import the protocol types from @namzu/sdk:

    import type { DoctorCheck, DoctorCheckResult } from "@namzu/sdk";
    import { registerDoctorCheck } from "@namzu/cli";
    
    const myCheck: DoctorCheck = {
      id: "app.db.reachable",
      category: "custom",
      run: async (): Promise<DoctorCheckResult> => {
        // your probe
      },
    };
    registerDoctorCheck(myCheck);

    New — @namzu/cli (initial public release)

    @namzu/cli v0.1.0 ships as a public package for the first time. Dual-purpose:

    • Standalone binnpx @namzu/cli doctor, or after install: namzu doctor. Supports --json, --verbose, --category <a,b,c>, --per-check-timeout <ms>, --wall-clock-timeout <ms>. Sysexits-aligned exit codes (0 ok, 1 fail, 2 no config, 70 internal error).
    • Libraryimport { runDoctor, registerDoctorCheck, builtInDoctorChecks } from '@namzu/cli' for embedded usage where consumer code wants to invoke the doctor in its own process so app-registered checks are visible.

    What ships built-in:

    • sandbox.platform (darwin sandbox-exec presence + win32 warn + linux/other inconclusive)
    • runtime.cwd-writable + runtime.tmpdir-writable (real fs.access(W_OK) probes)
    • telemetry.installed (dynamic-import probe for @namzu/telemetry)
    • vault.registered + providers.registered (intentionally inconclusive — consumers register their own walking their setup)

    Why patch-bump-equivalent: @namzu/sdk: minor carries the breaking removal (pre-1.0 cadence); @namzu/cli: minor carries the new package's first feature release. Together they make the next release a coordinated cut.

  • 82220e3: Doctor — runDoctor() accepts streaming callbacks + cooperative cancellation (ses_013 Phase 1).

    Three new optional fields on RunDoctorOptions:

    • onCheckStart(check) — fires immediately before each check's run() is invoked.
    • onCheckComplete(record) — fires exactly once per check after its record is built (whether pass, fail, inconclusive, or warn). Defended against double-fire by the same completed map that pins the record.
    • signal?: AbortSignal — cooperative cancellation. When the signal aborts, in-flight checks stop being awaited; their records become inconclusive with an "aborted by signal" message. Completed records are preserved verbatim.

    Throwing callbacks are caught + logged + never affect the doctor run or the final DoctorReport.

    Substrate for the upcoming TUI mode (later patch in this same series), useful standalone for analytics or custom progress UIs.

    Internal: packages/cli/tsconfig.json adds "jsx": "react-jsx" + "jsxImportSource": "react" in preparation for the TUI's .tsx files. No .tsx files yet; typecheck still passes. Purely additive — no consumer behavior change.

  • 0ba357d: Doctor registry — preserve completed records on wall-timeout + double-fire defense (ses_013 Phase 0).

    Two pre-existing bugs in DoctorRegistry.run() surfaced by the ses_013 codex adversarial review:

    • Wall-timeout aggregation no longer erases completed records. Before: when the wall-clock timer won the race, every check was mapped to inconclusive, even ones that already finished. Fast pass + slow timeout produced 0 pass + N inconclusive. After: only checks that haven't finished by the wall-clock deadline are marked inconclusive; completed records are preserved verbatim. Fast pass + slow timeout now correctly produces 1 pass + (N-1) inconclusive.
    • Completion can no longer double-fire. A check whose per-check timeout fired microseconds before/after the check itself resolved could produce duplicate records. Defended by an if (completed.has(check.id)) return guard inside the per-check callback. First record wins.

    No public API change — bug fix only. 4 new tests pin the corrected contract; suite total 22 → 26.

  • Updated dependencies [aead3a8]

  • Updated dependencies [8f076e5]

    • @namzu/sdk@0.4.5

@namzu/sdk@0.4.5

Patch Changes

  • aead3a8: Doctor registry runtime + 5 built-in checks — ses_007 Phase 4.

    runDoctor(opts?) aggregates registered checks into a DoctorReport with per-check status + summary + sysexits exit code. registerDoctorCheck(check) is the programmatic registration entry point.

    New runtime exports (12 names):

    • doctor (singleton DoctorRegistry), DoctorRegistry, createDoctorRegistry
    • registerDoctorCheck(check) — programmatic registration
    • runDoctor(opts?)Promise<DoctorReport>
    • builtInDoctorChecks — readonly list of the six shipped checks
    • Six individual built-in checks: sandboxPlatformCheck, cwdWritableCheck, tmpdirWritableCheck, vaultRegisteredCheck, providersRegisteredCheck, telemetryInstalledCheck

    LLMProvider interface gains optional doctorCheck?(): Promise<DoctorCheckResult>. Non-breaking — existing providers don't need to implement it. Consumers wanting provider health probes register a custom check that walks ProviderRegistry.getAll() and calls provider.doctorCheck?.() per provider.

    Built-in checks ship intentionally conservative for v1. sandbox.platform passes on darwin if /usr/bin/sandbox-exec is executable; inconclusive on linux (proc namespace probe deferred); warn on win32; inconclusive elsewhere. runtime.cwd-writable + runtime.tmpdir-writable are real fs.access(W_OK) probes. telemetry.installed dynamic-imports @namzu/telemetry (specifier-variable to evade TS resolution since SDK doesn't depend on telemetry); pass if installed, inconclusive if not. vault.registered + providers.registered are intentionally inconclusive with explicit "register your own check" guidance — vault and provider registries are module-private and aren't auto-discoverable from a standalone process.

    Failure isolation: a thrown check is recorded as fail with the throw message; other checks still run. A check exceeding perCheckTimeoutMs (default 5000ms) becomes inconclusive. Wall-clock timeout (default 10000ms) marks not-yet-completed checks as inconclusive. Status set: pass | fail | inconclusive | warn. Only fail affects the exit code (1); inconclusive and warn are informational. Empty registry → exit 2 (no config).

    Embedded usage today, CLI command in the next patch. Consumers can import { runDoctor, registerDoctorCheck } from '@namzu/sdk' and integrate the doctor in their own process where their checks have already executed. The standalone namzu doctor CLI command lands in the next patch (Phase 5).

  • 8f076e5: ses_007 Phase 5 — doctor runtime moved from @namzu/sdk to @namzu/cli. Architectural pivot: kernel = SDK (pure runtime primitives), operator surface = CLI (presentation + tooling).

    Breaking changes — @namzu/sdk

    The following 12 runtime exports have been removed from @namzu/sdk. They now live in @namzu/cli:

    • doctor (singleton), DoctorRegistry, createDoctorRegistry
    • registerDoctorCheck, runDoctor
    • builtInDoctorChecks
    • sandboxPlatformCheck, cwdWritableCheck, tmpdirWritableCheck
    • vaultRegisteredCheck, providersRegisteredCheck, telemetryInstalledCheck

    The RunDoctorOptions type has also been removed from @namzu/sdk exports.

    What stays in @namzu/sdk:

    • The protocol types — DoctorCheck, DoctorCheckResult, DoctorCheckContext, DoctorCheckRecord, DoctorReport, DoctorStatus, DoctorCategory — remain in types/doctor/ so kernel components can implement custom checks against them.
    • LLMProvider.doctorCheck?(): Promise<DoctorCheckResult> — the kernel hook that lets a provider expose its own healthcheck stays on the interface.

    Migration

    If you were calling the doctor in your own process:

    - import { runDoctor, registerDoctorCheck } from '@namzu/sdk'
    + import { runDoctor, registerDoctorCheck } from '@namzu/cli'

    If you were running it from the command line:

    # Before — required a custom CLI bin or `pnpm dlx tsx packages/sdk/src/doctor/...`
    # After:
    pnpm dlx @namzu/cli doctor
    # or, after install: namzu doctor

    Custom check authors continue to import the protocol types from @namzu/sdk:

    import type { DoctorCheck, DoctorCheckResult } from "@namzu/sdk";
    import { registerDoctorCheck } from "@namzu/cli";
    
    const myCheck: DoctorCheck = {
      id: "app.db.reachable",
      category: "custom",
      run: async (): Promise<DoctorCheckResult> => {
        // your probe
      },
    };
    registerDoctorCheck(myCheck);

    New — @namzu/cli (initial public release)

    @namzu/cli v0.1.0 ships as a public package for the first time. Dual-purpose:

    • Standalone binnpx @namzu/cli doctor, or after install: namzu doctor. Supports --json, --verbose, --category <a,b,c>, --per-check-timeout <ms>, --wall-clock-timeout <ms>. Sysexits-aligned exit codes (0 ok, 1 fail, 2 no config, 70 internal error).
    • Libraryimport { runDoctor, registerDoctorCheck, builtInDoctorChecks } from '@namzu/cli' for embedded usage where consumer code wants to invoke the doctor in its own process so app-registered checks are visible.

    What ships built-in:

    • sandbox.platform (darwin sandbox-exec presence + win32 warn + linux/other inconclusive)
    • runtime.cwd-writable + runtime.tmpdir-writable (real fs.access(W_OK) probes)
    • telemetry.installed (dynamic-import probe for @namzu/telemetry)
    • vault.registered + providers.registered (intentionally inconclusive — consumers register their own walking their setup)

    Why patch-bump-equivalent: @namzu/sdk: minor carries the breaking removal (pre-1.0 cadence); @namzu/cli: minor carries the new package's first feature release. Together they make the next release a coordinated cut.

@github-actions github-actions Bot force-pushed the changeset-release/main branch 2 times, most recently from 648aa80 to 097fde1 Compare April 22, 2026 19:57
bahadirarda added a commit that referenced this pull request Apr 22, 2026
…tch (0.4.5 cadence)

Per user direction "0.4.4'ten 0.4.5'e geçeceğiz." Pre-1.0 0.4.x
cadence ships frequent patches even for breaking changes —
established precedent (11dec5d "downgrade queued bumps minor → patch
(0.4.2 cadence)").

Aggregate effect on release PR #14:
- @namzu/sdk 0.4.4 → 0.4.5 (was 0.5.0)
- @namzu/cli 0.0.0 → 0.0.1 (was 0.1.0)

Doctor SDK→CLI migration + Phase 0 registry hygiene fix all
bundled into the 0.4.5/0.0.1 patch.
@github-actions github-actions Bot force-pushed the changeset-release/main branch from 097fde1 to 450938e Compare April 22, 2026 20:06
@github-actions github-actions Bot force-pushed the changeset-release/main branch from 450938e to 4d3a2ad Compare April 22, 2026 20:13
@bahadirarda bahadirarda merged commit 32d2cc1 into main Apr 22, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant