Repository navigation
feat(cli): automate Moksha setup, offer skills and recover connections - #106
Merged
Merged
Conversation
Separate owner inspection from collection destinations. Distinguish Account and server-only sessions, cache display profiles, and preserve recovery context in POSIX and PowerShell guidance. Validated with pnpm validate and pnpm preflight:cli.
BUI-946: add correlated observations, failure controls and live acceptance guidance.
This was referenced Oct 29, 2026
callumflack
added a commit
that referenced
this pull request
Oct 29, 2026
Interactive installation now opens the approved welcome and continues through the searchable source picker, missing-source name, connector decision and guide handoff. Source search shows 12 rows with a persistent Ctrl+O shortcut; choosing Build exits successfully with the guide visible. Automated installs remain prompt-free and agent skill installation stays optional. Built directly on v0.46.0. Preserves the shipped public Factory 0.0.2 instructions, adapter and BUI-938 behavior. Extracts only onboarding from #106; no BUI-945 funding or collection-readiness changes are included. Validation: full validate (976 tests), CLI preflight, npm package and standalone integrity checks, clean structured closeout review. A fresh piped standalone install in a disposable PTY/home completed all five approved screens using the populated public catalog and Readwise, then exited 0 without sign-in, agent installation, provider access or funding. The same PTY regression now runs in the existing Unix installer CI smoke lane.
Resolve conflicts with the Factory connector build (#108/#110/#111), mainnet app registration (BUI-938) and the approved onboarding (#112). - Welcome, source picker and missing-source flow follow main's approved screens; `vana skills setup` keeps this PR's three-skill offer. - Create Connector keeps main's Factory workflow and adds this PR's CLI bootstrap, discovery and collect-through-Vana readiness guidance; the deleted legacy references are no longer mentioned (version 1.4.0). - Builder keeps this PR's description (version 1.2.1). - README and LOG keep both sides' sections. - Ingest-failure tests keep main's gated cases with this PR's readiness setup.
The installer offered the skills bundle before opening the welcome screen merged from main. The welcome screen already presents skill installation as optional (vana skills setup), and the piped-install onboarding smoke test stalled on the extra y/N prompt. Keep the installers identical to main; the npm postinstall offer and explicit vana skills setup remain.
github-actions Bot
pushed a commit
that referenced
this pull request
Oct 31, 2026
## [0.48.0](v0.47.1...v0.48.0) (2026-10-31) ### Features * **cli:** automate Moksha setup, offer skills and recover connections ([#106](#106)) ([d9b5d75](d9b5d75))
Contributor
|
🎉 This PR is included in version 0.48.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Summary
Moksha builders can obtain free test credit automatically and resume setup after an interruption. Interrupted data-connection work can lose the context needed to continue safely: which owner and server are selected, whether a payment was already sent, or which consent request was created. Preserve that context and provide recovery commands that reuse the original operation.
Owner inspection now distinguishes Account sign-in from a Personal Server session, shows other accounts' servers separately, and retains network/environment/home context in server-start guidance. Paid reads persist the exact signed payment header before transmission and stop if recovery state cannot be saved. Consent creation saves a frozen intent and idempotency key before the request, exposes unfinished intents for inspection, and supports
--resumeacross test-credit setup and consent with current grant checks.The Research Shelf example also gains opt-in, metadata-only observations and a maintained browser/Motel verifier for durable save, render, acknowledgement, same-grant iteration and recovery. Missing observations remain unknown and fail verification.
Public Builder instructions now include a provider-independent delivery/evidence procedure in the installation manifest. Ordinary collection and app integration require no private Unity checkout, reference app or Motel. The optional Research Shelf contributor verifier uses those public rules; its doctor now selects the same
SHELF_MOTEL_BINARYas launch. The doctor regression failed before the fix and passes afterward. The connector skill work from CLI #105 is included here; #105 is closed as superseded so this is the single CLI review and merge target. Private local history notes are excluded.Agents can read the bundled workflows directly with
vana skills show connect-data --json(orcreate-connector/builder). The response retains skill metadata and installed status and adds the full instructions plus required reference content. Reading does not install skills or write the skill cache or agent configuration. Public docs and CLI help expose this entry point, so the running agent can continue from an ordinary data request without choosing a harness or restarting a session.Bare interactive
vanaoffers four goals: Collect or manage my data, Use or share data, Build or test a connector, and Manage my Personal Server. The source picker shows 12 rows with an always-visible Ctrl+O shortcut; Enter on no results retains the source name for the connector-guide handoff. Discovery requires no sign-in. Before source credentials or provider access, collection establishes a valid Vana owner and a ready, approved server. Automated modes return structured reasons and recovery commands preserving source/path/streams and account/server context. Token cancellation now reports cancellation. Skill selection reads instructions without installation; persistent installation stays optional and confirmed. Connect Data and Create Connector are version 1.3.0; Builder remains 1.2.0. Connector creation/Factory integration remains a separate handoff.Onboarding verification for
a4e337b:pnpm validatepasses 1,027 tests across 71 files; build and package checks pass. Actual terminal source selection and masked Readwise-token cancellation pass. Local HTTP fixtures verify Account recovery and independent readback of saved synthetic records. Structured Codex review reports no actionable P0 findings (0.95 confidence). Live Readwise collection and production storage remain unverified.Moksha setup calls Account's app-key-signed test-credit API using existing SDK 4.3.1 signing support. It saves its funding key before submission, retains the returned operation, and uses GET-only recovery once that operation is known. Claim links, caps, disabled funding and pending operations have explicit outcomes; consent starts after credit is usable. New apps still initialize their key with
vana app register. Existing saved consent intents and mainnet requests keep their existing flow.Review fixed two regressions: Account's
balance_sufficientresponse can include unfinalized deposits, so the CLI now reconciles existing escrow before treating credit as ready; and dead-writer cleanup now removes only the observed owner's file in an atomically published, nonempty lock directory, preserving any successor's lock.Deployment gate: deploy and enable the service before merging/releasing this CLI change. Maciej must confirm the funded Account deployment, apply migration 029, configure/fund the Moksha funder and reconciliation cron, and deploy gateway #170 and Account #1963. Moksha setup stops resumably while that API is unavailable. A real empty-escrow setup and interrupted-operation check are still needed. The CLI does not depend on the unreleased SDK #221 helper. BUI-936 tracks the remaining acceptance; BUI-945 owns the service rollout.
Evidence
pnpm validate: 1,008 tests across 69 files, TypeScript, ESLint and formatting pass on the combined tree. The two credit/lock regressions failed before their fixes. The existing idle-wait test now advances a controlled clock after the real interaction starts; removing the idle guard still fails it.pnpm pack:checkpasses on the combined tree with 458 files and all required CLI/runtime/skill entries.eba0582completed with no P0 findings (0.97 confidence). This was a read-only source review at the repository’s P0 threshold; the runtime and packaging proofs are recorded separately above/below. The subsequent CLI-first bootstrap / welcome commit57a3665also received structured Codex review with no P0 findings; this was source inspection, with runtime proofs recorded separately.eba0582) was exercised in real terminals with network fetch blocked: first-use yes, install-hook yes/no, and JSON/non-interactive skips passed; installed skills and the reference match source. Build, package-content checks, native Darwin ARM64 SEA smoke/archive checks and Unix installer smoke passed. Windows execution is left to CI. Standard published installs receive this revision after merge and release.Related Unity work: breadboard #1957, ownership #1938, approval #1940, closed duplicate backport #1961, and verification #1933. The ownership, approval and verification PRs are already merged; #1961 was closed without a production release. #1957 is the related open Unity PR, currently waiting for GitHub Actions billing/spending eligibility to be restored before checks can run. Automatic funding is implemented on the CLI side in this PR and awaits Maciej's service rollout and live acceptance. Private native connector delivery remains in BUI-939/BUI-940, and the complete fresh-builder trial remains BUI-937.
Merge Danger
Door: two-way for application code; retain the request journal when rolling back because older CLI versions cannot resume funding setup.
Blast Radius: builder setup, local recovery state and opt-in skill installation.
Receipt and consent stores now reject corrupt state and write atomically with protected permissions. Existing retained requests remain supported; new consent intents add recovery state without storing credentials. Server write destinations and explicit consent requirements remain intact. Observation output is disabled unless explicitly configured and excludes payloads, credentials and payment headers.
Created with Codex.