Skip to content

feat!: adopt cli-core 1.0 and cli-base 1.0 - #897

Merged
leemour merged 4 commits into
mainfrom
release/1.0
Nov 25, 2026
Merged

leemour merged 4 commits into
mainfrom
release/1.0

Conversation

@leemour

@leemour leemour commented Nov 25, 2026

Copy link
Copy Markdown
Member

The adoption of cli-core 1.0 and cli-base 1.0 (stable core and experimental parts, store version 73). cli-core parity builds this branch against cli-core 1.0 (cli-core#3288 and its successor), so this draft stays open until cli-core 1.0.0 is on npm. Then the branch moves to the published version and merges, and this CLI releases with the rest in one batch.

Do not merge before cli-core 1.0.0: the store migrates to version 73, which 0.x tools refuse.

🤖 Generated with Claude Code

leemour added a commit to WireCatLabs/cli-core that referenced this pull request Nov 25, 2026
…1.0 fixes (#3338)

## Task

Land cli-core 1.0 on `main` as `1.0.0-rc.0`: the stable API, store
version 73, the 1.0 fixes and the release rules, in one pull request on
top of 0.740.0.

## Why

cli-core moves to real semver. A stable core is listed in `package.json`
(`wirecat.stable`, ten entry points), and the rest is experimental. This
needs cli-base 1.0, and it changes the store, so every CLI adopts it on
a `release/1.0` branch of its own. The work landed on `release/1.0` from
several sessions. This branch is that work rebased onto `main`, plus the
gaps the consumer branches found.

**Not released yet.** `main` names `1.0.0-rc.0` with an empty changelog
section. `bin/release --major --app-ref release/1.0` collects `changes/`
into it and publishes on npm's `next` tag. Without the bump, the next
release from `main` would publish these breaks as 0.741.0 on `latest`.

## What

From `release/1.0` (rebased, one conflict resolved:
`src/cli/documents/manifest/source.ts` keeps main's `isCliError` and
takes `codegen/runtime`):
- the stable set (`wirecat.stable`, `@experimental` inside stable
entries, `MessageStoreCore`/`MessageStoreAreas`), `./store` without the
SQLite implementation, `./store/areas`;
- store version 73, including the fixes after the check on a real store:
references already broken stay, a refused run removes its rollback copy,
and a copy that changes a table's row count stops the migration;
- the 1.0 correctness and security fixes (one real-path check for every
local path an MCP call names, `--rescan` keeps the mass-deletion guard,
and others);
- the release rules: seven changelog headings, levelled versions,
`--major`, the `next` tag; every error reason in `docs/reasons.md`,
checked as a contract;
- parity builds all 19 CLIs on a release.

Added here:
- **API report:** `api/`, written by cli-base 1.0.0-rc.0's `cli-dev
api-report`. CI checks it from now on.
- **Workflows:** every cli-base reusable workflow pinned to v1.0.0-rc.0.
The changelog guard runs on label changes too, and
`scripts/changelog-shape.ts` takes cli-base's `CHANGELOG_HEADINGS`.
- **`./internal/*`:** every module's types can be named here, types
only.
- A CLI that inferred a type cli-core returns failed its declaration
emit with TS2883, since TypeScript names a type only through an entry
point already in the program.
- A probe calls every exported function of each of the 51 entry points,
each compiled on its own: 127 errors before, 0 after.
  - Node refuses a runtime import of the path.
- **`notLocalPaths`:** exported from `./cli` (experimental), so a CLI
can mark its own remote path inputs.
- **`catalog tree [folder]`:** the folder is the provider's id, not a
local path.
- **`./store/areas`:** exports `crmSettingKey` and `crmIdentityId`,
which amo-cli and bitrix24-cli import at run time.
- **Reasons:** the four reasons store version 73 raises, and main's new
OCR and deletions-feed reasons, are in `docs/reasons.md`.
- **Stable set:** `plainSetupText` (new on main, no importer) is tagged
experimental.
- **`known-broken.json`:** max-cli and mail-cli leave it; both adopted
the change on their `release/1.0` branches.

## Testing

- Local: typecheck, lint, `docs:check` (reasons included),
`schema:check`, `check:dist`, `check:agent-process`, `help:examples`,
`api-report --check`.
- Tests of the touched files, each run alone: path options, setup text,
the changelog and version scripts, store version 73, reasons, the
manifest source.
- The full suite was not run locally. The machine was overloaded (load
average above 40), so CI judges it.
- **Parity: the dispatched run is the real result:**
https://github.com/WireCatLabs/cli-core/actions/runs/45320991902
(`app_ref=release/1.0`, `tests=true`, all 19 CLIs).
- **This PR's own parity check is expected to fail.** It builds the 7 PR
consumers from their `main`, which is still on cli-base 0.x and the old
store imports; their adoption is on `release/1.0`.
- If branch protection requires that check, the PR merges with `--admin`
once the dispatched parity run and the rest of CI are green, with a
comment saying why.

## Known follow-up (after rc.0)

About 270 types that stable functions in `./cli` take or return are
exported from no entry point. With `./internal/*` they can be named, but
they are not under semver, and a change to them does not show in the API
report. A later pass decides which of them become stable exports.

## Downstream

Each CLI moves to cli-base 1.0.0-rc.0 and changes its imports from
`./store` to `./store/areas` where it uses them (the list is in
`changes/1.0-surface.md`). cli-memo imports `assertSharedContracts` from
`@wirecat/cli-base/commands`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Replaces #3288 (same commits, from `release/1.0`): the PR's parity
builds each CLI from its branch of the same name with an open pull
request, and the 20 CLIs adopt 1.0 on `release/1.0` (draft PRs, e.g.
WireCatLabs/cli-memo#897). The ruleset on main has no bypass, so #3288's
parity against the CLIs' main could not be merged past.


Labelled `major`: 1.0.0 is the first major of cli-core.

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
leemour added a commit to WireCatLabs/cli-core that referenced this pull request Nov 25, 2026
…tch (#3341)

After #3338 (cli-core 1.0) merged, the release PR of 1.0.0-rc.0 (#3340)
failed parity: parity builds each CLI's main, which stays on 0.x until
cli-core 1.0.0 ships together with all CLIs. The CLIs adopt 1.0 on
`release/1.0` in draft PRs (e.g. WireCatLabs/cli-memo#897), and parity
against those branches passed on #3338.

This lists the 20 CLIs in `scripts/parity/known-broken.json` until
2026-12-02, so main can publish 1.0.0-rc.x on `next`. Remove the entries
when the 1.0.0 batch merges.

Checked: `pnpm docs:check`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
leemour and others added 4 commits November 25, 2026 11:04
- Import the 68 store area names (Note, Project, Memory, Task types and the
  rest) from @wirecat/cli-core/store/areas; the store entry no longer
  re-exports them.
- Name the types the store entry no longer reaches through an export:
  CitedSource for an evidence batch's sources, ReturnType annotations on
  countTasks, moveTask and commentTask, and LINE_PARENTS stays inside its
  module.
- assertSharedContracts comes from @wirecat/cli-base/commands, since
  cli-core's ./cli dropped the re-export.
- Mark the inputs that name no local file with notLocalPaths, so serve
  passes them as written and the MCP path guard skips them: commands
  <path>, folders remove <folder>, sync --folder and --ignore, tags
  add|remove --folder and --subfolder.
- Changelog fragment changes/release-1.0.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
….0.0-rc.1

release/1.0 built against a packed cli-core 1.0 tarball, while package.json
still named cli-core 0.736.0 and cli-base 1.0.0-rc.0, so the branch's own CI
was red. Both release candidates are now on npm under the next tag, so the
pins point at them and the lockfile follows.

The changelog fragment changes/release-1.0.md now names the versions memo
builds on. memo does not pass coreImport to the code generator, so cli-base
rc.1's new default does not touch it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
contracts/upgrade.json: after the move to store version 73, cli-core 1.0
hands out ids past a gap so an id is never reused, and the second note is
note:1002, not note:2. The case now checks the new note by its text, so it
proves the write without pinning cli-core's id gap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Moves the pins from the release candidates (cli-core 1.0.0-rc.0,
cli-base 1.0.0-rc.1) to the final 1.0.0 of both, after rebasing
release/1.0 onto main. The lockfile follows.

pnpm generate rewrote the command reference and contracts/wirecat.json:
cli-core 1.0.0 adds the sector field to organizations list's entity.

The changelog fragment names 1.0.0 and the version it replaces
(0.749.0, main's pin).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@leemour
leemour marked this pull request as ready for review November 25, 2026 11:34
@leemour
leemour merged commit 5da3c05 into main Nov 25, 2026
10 checks passed
@leemour
leemour deleted the release/1.0 branch November 25, 2026 11:34
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