Skip to content

Pair clients, stage instructions, share boot environment - #16

Merged
SoryAK merged 2 commits into
mainfrom
feat/stage-instructions
Sep 9, 2026
Merged

Pair clients, stage instructions, share boot environment#16
SoryAK merged 2 commits into
mainfrom
feat/stage-instructions

Conversation

@SoryAK

@SoryAK SoryAK commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • mba connect stages the winning instructions.md into a harness envelope and mints a pairing token. MBA stores only a SHA-256 hash; chat through the proxy requires that Bearer once any session exists.
  • Boot uses the paired client's harness + ide + runtime for environment folders instead of hardcoded Copilot / VS Code. Unpaired models keep the old default.
  • Operators can add a sixth client as a name plus envelope path (mba clients add). MBA does not scan the machine for IDEs. notes.md never leaves the store.

Test plan

  • mba connect <id> --harness cursor --project <dir> stages the Cursor envelope, prints a token, and mba status shows the pairing without the hash
  • After connect, mba s boot <id> preview env matches that harness (not copilot+vscode unless that was the pairing)
  • mba clients add windsurf --envelope .windsurf/mba.md then connect with --harness windsurf writes that file
  • Revoke (mba connect --revoke) opens chat again; leftover plaintext token in sessions.json is hashed on next daemon read
  • npm test --workspace @mba-ai/core (sandbox may skip the ~/.local/bin/llama-server defaultBinaryPath case)

Made with Cursor

Connect copies the winning instructions.md into a harness envelope and mints a token that MBA stores hashed. Boot then uses that client's environment instead of a hardcoded Copilot/VS Code context, and operators can add a client as a name plus envelope path.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread packages/core/src/mba/envelope.ts Fixed
wrapStagedCard ran /\s+$/ on card file text. Use trimEnd() instead so CodeQL stops treating it as polynomial-time on uncontrolled input.

Co-authored-by: Cursor <cursoragent@cursor.com>
@SoryAK
SoryAK merged commit 8985494 into main Sep 9, 2026
3 checks passed
SoryAK added a commit that referenced this pull request Sep 10, 2026
Pair clients, stage instructions, share boot environment
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.

2 participants