Skip to content

chore: move the workspace from mnci (Nx) to MonoSmith - #316

Merged
russoedu merged 4 commits into
mainfrom
chore/convert-to-smith
Oct 17, 2026
Merged

russoedu merged 4 commits into
mainfrom
chore/convert-to-smith

Conversation

@russoedu

Copy link
Copy Markdown
Collaborator

Phase M of #313 (docs/research/driver-and-language-packages.md): OpenCraw moves from mnci (Nx) to MonoSmith. It's smith convert plus the hand edits it left, with every gap found along the way filed and fixed in MonoSmith.

What changes

  • Nx is gone.
    • Projects, tasks and dependencies come from the manifests and smith.toml. The cross-project dependsOn survive: the extension's package still builds cli, mcp, ocr-tesseract, agent, studio and studio-ui first.
    • Each package continues its @opencraw/<name>@<version> tags. smith release --dry-run says "Nothing to release" and lists all 11 packages unchanged.
  • Builds. Rollup becomes esbuild plus tsc declarations, written to the same dist/index.esm.js and dist/src/index.d.ts that package.json publishes. declaration-specifiers.mjs gives the declarations their .js specifiers, as mnci's rollup plugin did; without it, every type became any for nodenext consumers (monosmith#280). 0 extensionless specifiers remain.
  • CI.
    • ci.yml and .devcontainer/devcontainer.json are generated by smith ci generate (smith 1.9.2). Its before-setup slot pins npm 12, as the old workflow did.
    • e2e, desktop-package and the three VS Code workflows install smith, since their npm scripts call it.
    • The e2e suites install their own browsers, and studio / studio-desktop run under xvfb-run themselves.
  • smith.toml.
    • The vertical-slices convention. The Python client is excepted until its rewrite, and the exception is written in its README.
    • The playwright convention, node-vitest as the default for new projects, and the devcontainer.
    • Docker stays off until the registry is a setting of the docker plugin (monosmith#285); azure-host keeps its zip package task.
  • Lint. @monosmith/eslint-config ^1.0.0 replaces @mnci/eslint-config. Four files smith generates are ignored until they pass it (monosmith#286). Nothing checks declared dependencies any more since @nx/dependency-checks went (monosmith#284).
  • Small fixes.

Verified locally (Windows, smith 1.9.2)

  • smith run lint typecheck test build: 74/74 tasks succeeded.
  • npm run lint:workspace (the root files): passes.
  • smith ci generate --check: pipelines up to date.
  • smith doctor: 29 passed. The 10 failures are "npm workspaces include examples/*". OpenCraw's examples are standalone on purpose, and smith is adding [workspace] exclude for that (monosmith#278).

Not verified

  • The e2e suites under smith in CI, which this PR's e2e run will show.
  • The VS Code and desktop packaging workflows, which run on main or by hand.

MonoSmith issues from this conversion

#278, #279, #280 (fixed in 1.9.2, applied here by hand), #283 (playwright detection and overrides), #284, #285, #286.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TjR6eM2tUwU3NGnKXsmEap

russoedu and others added 3 commits October 17, 2026 17:16
`smith convert` (1.8.1) replaced Nx: projects, tasks and release tags
continue in smith.toml and the manifests, rollup builds became esbuild plus
tsc declarations, and ci.yml and the devcontainer are generated by smith.
By hand, with the fixes smith 1.9.2 now makes itself:
- declaration-specifiers.mjs gives the library declarations their .js
  specifiers, as mnci's rollup plugin did (monosmith #280)
- studio-ui's tsconfigs use vite/client instead of @nx/react typings (#279)
- studio-desktop gets a package:dir task for desktop-package.yml
- core keeps its prepublishOnly guard
Configuration: the vertical-slices and playwright conventions (the Python
client excepted until its rewrite), Vitest for new Node projects, the
devcontainer, and @monosmith/eslint-config instead of @mnci/eslint-config.
The Playwright suites install their browsers first and studio's open
windows under xvfb-run; the workflows install smith, and ci.yml pins npm
12. Docker stays off until its registry is configurable (monosmith #285).

Refs #313

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TjR6eM2tUwU3NGnKXsmEap
AGENTS.md's commands are smith's, the slice rules are enforced by
@monosmith/eslint-config and smith's vertical-slices convention, and the
Python client records why it is exempt from that convention until its
rewrite over the driver.

Refs #313

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TjR6eM2tUwU3NGnKXsmEap
…indows

CI found what the local tree hid, its old rollup and Nx outputs still in
place:
- office-reader builds all seven entries (index, xlsx, pptx, docx, ods,
  odt, odp) in one esbuild run with shared chunks, as its rollup input map
  did; convert built index only (monosmith #291)
- the VS Code extension bundles to dist/extension.cjs again, the
  outExtension convert dropped (#291)
- the workflows add install.sh's folder to PATH in its Windows form, so
  cmd and PowerShell steps find smith (#290)
- the examples are excluded from smith's workspace ([workspace] exclude,
  smith 1.10.0): standalone folders, as they were before the move; the
  manifests convert marked are restored
The workflows and ci.yml move to smith 1.10.0. From a clean tree, every
task passes, and the extension packages.

Refs #313

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TjR6eM2tUwU3NGnKXsmEap
@github-actions

Copy link
Copy Markdown

Release preview

Package Version Why Status
office-reader 0.0.29 → 0.0.30 1 releasing commit(s) planned
core 0.1.48 → 0.1.49 dependency office-reader releases planned
probe 0.0.31 → 0.0.32 dependency core releases planned
studio 0.0.43 → 0.0.44 dependency core releases planned
cli 0.1.54 → 0.1.55 dependency core releases planned
mcp 0.1.54 → 0.1.55 dependency cli releases planned
azure-durable 0.0.48 → 0.0.49 dependency cli releases planned
captcha-tesseract 0.0.45 → 0.0.46 dependency core releases planned
ocr-tesseract 0.0.3 → 0.0.4 dependency core releases planned

Unchanged: agent, opencraw

…with

The test bundles the built package for Chromium with rollup and
@rollup/plugin-node-resolve; both came through @nx/rollup, which the move
removed. They are root devDependencies now, at the versions main had.

Refs #313

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TjR6eM2tUwU3NGnKXsmEap
@russoedu
russoedu merged commit 49dc87d into main Oct 17, 2026
9 checks passed
@russoedu
russoedu deleted the chore/convert-to-smith branch October 17, 2026 16:45
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