Repository navigation
docs(npm): ship real READMEs for core + skill-nanoclaw, fix client quick start - #731
Merged
Merged
Conversation
…ick start @totalreclaw/core: #634 already copies a root README into the composed pkg/, but no core version has been published since, so npm still shows "ERROR: No README data found!". This switches the copied file to a new README.npm.md written for JS readers (who should install the agent integrations instead, the nodejs and ./web entry points, a Node and browser example verified against a locally built tarball, the export groups) and deletes the wasm-pack README copies under nodejs/ and web/ so the root README is the only one in the tarball. @totalreclaw/skill-nanoclaw: the published tarballs (3.0.0, 3.1.1-rc.19) do contain a root README.md, yet the registry has no readme. Its tarball is the only one of ours with a second, nested README (mcp/README.md), which npm's extension+basename sort places before the root README; client, mcp-server and the plugin ship a single root README and render fine. Exclude mcp/README.md from `files`, add repository/homepage/bugs, and rewrite the README: absolute links (relative ones break on npm), pairing via totalreclaw_pair as the recommended setup, the TOTALRECLAW_RECOVERY_PHRASE env var only under an "Advanced: headless" section, and claims checked against the runner (it starts the MCP server; hooks are library exports). @totalreclaw/client: the Quick Start pointed the TotalReclaw class at api.totalreclaw.xyz and passed a phrase-looking string to register(). The class speaks the self-hosted HTTP protocol (/v1/register, /store, /search), and remember()/recall() throw until initLshFromSeed() or initLshFromMnemonic() is called. Rewrote the example (typechecked against client/src), made relative links absolute, dropped the Smart Account bullet (not exported from the package entry) and the stale test count. Also adds the three npm READMEs to check-docs.sh / check-phrase-safety.sh scope. Nothing is published; each fix lands on the next publish. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Bd3G1BkVMFSXkcdAQ7nFax
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two npm packages show no README on npmjs.com, and a third has an inaccurate one. This makes the next publish of each package ship a correct README. Nothing is published here.
Why each README was missing
@totalreclaw/core: npm shows the 28-characterERROR: No README data found!. #634 (Aug 16) already added a step that copies a root README into the composedpkg/. The last core publish (2.6.0) went out about 7 hours before #634 merged, so no published version has a root README yet. This PR:rust/totalreclaw-core/README.npm.md, written for JS readers. The crateREADME.mdstays as it is for crates.io and PyPI.pkg/nodejs/andpkg/web/, so the root file is the only README in the tarball (see the nanoclaw finding below).@totalreclaw/skill-nanoclaw: the registry has no readme, even though the published 3.0.0 and 3.1.1-rc.19 tarballs both contain a rootREADME.md(checked by unpacking them). Of all our packages, only this tarball also has a nestedmcp/README.md. npm sorts tarball entries by extension and then basename, sopackage/mcp/README.mdcomes beforepackage/README.md.client,mcp-serverand the plugin each ship a single root README and render fine. Core's old tarballs, which had only nested READMEs, also rendered nothing. The registry-side extraction rule isn't documented, so this is the best-supported explanation, not a proven one. The fix removes the variable anyway:!mcp/README.mdinfiles, so the tarball has one README. (#634's npm@11 pin stays.) This PR also addsrepository,homepageandbugs.@totalreclaw/client(it renders, but the content was wrong): the Quick Start pointedTotalReclawatapi.totalreclaw.xyzand passed a phrase-looking string toregister(). That class speaks the self-hosted HTTP protocol (/v1/register,/v1/store,/v1/search), andremember()/recall()throw untilinitLshFromSeed()orinitLshFromMnemonic()is called. The example is rewritten and typechecked againstclient/src. Relative links are now absolute, because../docs/...breaks on npmjs.com. The Smart Account bullet is gone (not exported from the package entry), and so is the stale test count.README content
@totalreclaw/core(nodejs, CJS) and@totalreclaw/core/web(ESM,init()) entry points; a Node and a browser example; the export groups. Every function name was checked against both generated.d.tsfiles.totalreclaw_pairis the recommended setup.TOTALRECLAW_RECOVERY_PHRASEappears only under "Advanced: headless deployments", with secret-store guidance. Claims are checked againstmcp/nanoclaw-agent-runner.ts: it starts the MCP server throughnpxorTOTALRECLAW_MCP_PATH, defaults toapi.totalreclaw.xyz, maps the group folder to a namespace, and strips the phrase from the agent's Bash environment. The README does not claim that the runner wires thebeforeAgentStart/agentEndhooks; they are listed as library exports.check-docs.shandcheck-phrase-safety.sh.Verification (local, nothing published)
ComposeandCopy READMEsteps, extracted verbatim from the YAML.npm pack --dry-run(npm 10 and npm@11) shows4.7kB README.mdat the root, 11 files. The packed tarball has exactly one README (package/README.md), byte-identical toREADME.npm.md. Installed the tarball and ran the README's Node example (CJS), an ESM named import, and the./webentry withinit(). All three round-trip.npm run buildthennpm pack(npm 10 and npm@11) shows4.8kB README.md, 47 files.mcp/README.mdis excluded,mcp/SKILL.mdand the rest ofmcp/still ship, and the packedpackage.jsoncarriesrepository.npm pack --dry-runincludesREADME.md. The Quick Start snippet typechecks withtsc --strictagainstclient/src(the only tsc errors are inclient/src/api/*, the onesbuild: tsc || truealready ignores).scripts/check-docs.sh: OK.scripts/check-phrase-safety.sh: 84 artifacts clean (was 81).tests/phrase-safety/run-regression.sh: 5/5 pass. The nanoclaw terminology test patterns (seed phrase/recovery code/recovery key) find no matches. The workflow YAML andpackage.jsonparse.Follow-ups (not in this PR)
promote-rc.yml(a dist-tag retag). A retag may not refresh the registry's top-level readme, so checknpm view @totalreclaw/skill-nanoclaw readmeafter the next actual publish.@totalreclaw/client1.3.0 depends on@totalreclaw/core ^1.1.0, while core is at 2.6.x.totalreclaw_pairwrites~/.totalreclaw/credentials.json, and the runner's first-run hook checks/workspace/.totalreclaw/credentials.json. The runner's first-run copy (mcp/nanoclaw-agent-runner.ts,src/onboarding/first-run.ts) still tells users to hand-write a mnemonic intocredentials.json. That is phrase-safety territory, so it was not touched here.docs/guides/nanoclaw-getting-started.mdsays the runner defaults tohttp://totalreclaw-server:8080, but the code defaults tohttps://api.totalreclaw.xyz. The guide also leads with the env-var setup.🤖 Generated with Claude Code
https://claude.ai/code/session_01Bd3G1BkVMFSXkcdAQ7nFax