Skip to content

Read the repositories folder as the MainSequence CLI does (0.3.16) - #28

Merged
MainSequenceDev merged 1 commit into
mainfrom
claude/repositories-folder
Nov 5, 2026
Merged

MainSequenceDev merged 1 commit into
mainfrom
claude/repositories-folder

Conversation

@MainSequenceDev

Copy link
Copy Markdown
Contributor

Why

A Claude Desktop plugin with its repositories folder set to mainsequence-dev cloned StoryForgeBackend into ~/whiteboxblackbox/mainsequence-dev/main-sequence-workbench/projects/. The Code session was open in ~/whiteboxblackbox, and setup resolved the bare name against the worker's working directory. The mainsequence CLI reads a bare name as a folder in the home directory (normalize_mainsequence_path). The other devtools entry points disagreed with both: local listings, Projects setup and saved settings rejected the name as not absolute. With that setting the plugin couldn't list local checkouts or set up a Project.

What changes

  • repositoriesFolder(value, home?) (exported) follows the CLI's rule:
    • ~ is the home folder.
    • A bare name is a folder in the home folder.
    • Any other path is an ordinary one.
  • Every entry point now uses it:
    • setup
    • local-repositories and the other project operations
    • organization project setup
    • workspace settings (mainsequence_path is saved absolute, as the CLI saves it)
    • the preferences read
  • Checkouts stay in <base>/<organization>/projects/, the same folder the CLI uses from SDK 9.0.33.

Verification

npm run release:check passes with 187 tests, plus the docs check and the package checks. New tests:

  • the resolver's cases
  • a listing and a setup clone with a bare name land under the home folder, not the working directory
  • settings save a bare name under home

🤖 Generated with Claude Code

A bare folder name such as `mainsequence-dev` is a folder in the home directory for the
`mainsequence` CLI (`normalize_mainsequence_path`). devtools read it three ways:
setup resolved it against the working directory, which for the Claude worker is the Code
session's folder, so a session in ~/whiteboxblackbox cloned into
~/whiteboxblackbox/mainsequence-dev/<org>/projects/; local listings, Projects setup and
saved settings rejected it as not absolute.

`repositoriesFolder(value, home?)` follows the CLI's rule (`~` is home, a bare name is a
folder in it, any other path is an ordinary one) and every entry point uses it: setup,
`local-repositories` and the other project operations, organization project setup,
workspace settings (saved absolute, as the CLI saves `mainsequence_path`) and the
preferences read. Checkouts stay in `<base>/<organization>/projects/`, the folder the
CLI uses from SDK 9.0.33.

Tests: the resolver's cases, a listing and a setup clone with a bare name landing under
home rather than the working directory, and settings saving a bare name under home.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MainSequenceDev
MainSequenceDev merged commit 6e7cbea into main Nov 5, 2026
4 checks passed
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