feat: add @metamask/wallet-cli package scaffold#9065
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
All alerts resolved. Learn more about Socket for GitHub. This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. Ignoring alerts on:
|
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@SocketSecurity ignore npm/jake@10.9.4 All three are transitive dependencies of Research:
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c85b8d2. Configure here.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
c8b4c43 to
f5ed2fa
Compare
Add an oclif-based `mm` CLI package (`@metamask/wallet-cli`) for `@metamask/wallet`, plus its monorepo registration. This is the initial scaffold: a buildable/lintable/testable package with the `bin/run.mjs` launcher and daemon path helpers, but no subcommands yet. - `packages/wallet-cli/`: package manifest, tsconfigs, jest config (100% coverage thresholds), README, CHANGELOG, MIT LICENSE, the `mm` bin launcher, and `src/daemon/paths.ts` (+test) / `types.ts` (`DaemonPaths`). - Register the workspace: add to `TOOLS` in `yarn.config.cjs` (library `exports`/`build:docs`-exempt), ESLint overrides for `src`/`bin`, root `tsconfig.json`/`tsconfig.build.json` project references, `CODEOWNERS`, `teams.json`, and the generated root README dependency graph. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The oclif ESM scaffold ships `bin/run.mjs`, but `bin/run.cmd` invoked `node "%~dp0\run"` (an extensionless path inherited from the older oclif template that shipped a `bin/run` file). Node's CJS entry resolution does not append `.mjs`, so `run.cmd` failed with a missing-module error on Windows while the `mm` bin shim (which targets `run.mjs`) worked. Point the launcher at `run.mjs` so the Windows entrypoint matches the file the package actually ships. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Restore the LICENSE pointer file, LICENSE.MIT, and LICENSE.APACHE2 introduced by the package-initialization PR (#9079) and set the manifest license back to (MIT OR Apache-2.0); the CLI scaffold should not change the package's licensing. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Collapse duplicate ranges introduced by the @oclif/core addition so `yarn dedupe --check` (lint:dependencies CI task) passes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
94090fe to
5ef15ec
Compare

Explanation
This adds
@metamask/wallet-cli— an oclif-basedmmCLI for@metamask/wallet, intended to run the wallet as a background daemon and dispatch messenger actions to it.This first PR is the package scaffold only: a buildable, lintable, and testable package with the
mmbinary launcher (bin/run.mjs) and a couple of pure daemon path helpers, but no subcommands yet. oclif rendersmm --help/mm --versioneven with no commands registered, so the package is exercisable end to end. Functionality is added incrementally in follow-up PRs (SQLite persistence, the Unix-socket daemon transport, theWalletfactory, and thedaemonsubcommands) so each stays small and self-contained.Because the package is a CLI tool rather than a published library, it is registered in the
TOOLSlist inyarn.config.cjs— which exempts it from the libraryexports/main/typesandbuild:docsconstraints — matching how@metamask/messenger-cliis handled. The remaining changes outsidepackages/wallet-cli/are the standard new-package registration: ESLint overrides, roottsconfigproject references,CODEOWNERS,teams.json, and the generated root README dependency graph.References
N/A
Checklist
getDaemonPathshelper is covered to 100%)Note
Low Risk
New CLI package and lint/yarn config only; no wallet runtime, daemon, or messenger integration in this diff.
Overview
Introduces
@metamask/wallet-cli, an oclif-basedmmCLI aimed at running@metamask/walletas a background daemon. This PR is scaffold only:bin/run.mjs/run.cmd, oclif metadata pointing at./dist/commands, and@oclif/coreas a runtime dependency—no subcommands yet (help/version still work via oclif).The package is reshaped as a tool, not a library: library
main/types/ fullexportsand typedoc tooling are removed; publishedfilesincludebin/;yarn.config.cjsadds it toTOOLS(same pattern asmessenger-cli). AddsgetDaemonPathsplusDaemonPathstypes for socket, PID, log, and DB paths under a data dir, with a unit test. Placeholdergreeterindexis deleted.Repo wiring: ESLint overrides for wallet-cli src, tests, and bin;
tsconfigincludes./bin; changelog Unreleased entry.Reviewed by Cursor Bugbot for commit 5ef15ec. Bugbot is set up for automated code reviews on this repo. Configure here.