@remits/remits-cli 0.1.69 → 0.1.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/index.js +19 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -63,7 +63,7 @@ remits-cli install --skills --overwrite true
|
|
|
63
63
|
- Guide sync requires authentication. If no valid session exists and the terminal is interactive, the CLI auto-authenticates first; in non-interactive contexts (CI, agent sandboxes) it skips silently so guides are only ever delivered to users who can authenticate to the platform.
|
|
64
64
|
- During account-repo discovery, `remits-cli` also overwrites the installed remits-cli `SKILL.md` for `claude`, `codex`, and `gemini` so local agents stay on the latest packaged instructions.
|
|
65
65
|
- The platform repo's `docs/guides/` tree remains the single source of truth; the platform serves it from the classpath, so published CLI versions never carry guide content.
|
|
66
|
-
- Authenticated users also get the **core Remits platform repo** locally. After guide sync (and on `auth` / discovery), `remits-cli`
|
|
66
|
+
- Authenticated users also get the **core Remits platform repo** locally. After guide sync (and on `auth` / discovery), `remits-cli` first reuses any existing local copy it already knows about, can detect directly (`REMITS_PLATFORM_DIR`, the running CLI source in dev, `~/remits`), or can discover under the configured scan roots; only if none is found does it clone `git@github.com:tmillhouse/remits.git` (default `~/remits`, override with `REMITS_PLATFORM_DIR`; cloning only runs in an interactive terminal). On each authenticated run it also fast-forwards the repo (`git pull --ff-only`, once per process) so back-stage analysis runs against current code — skipped automatically if the working tree is dirty, so local work is never clobbered. The repo is tracked in `~/.remits-cli/account-repos.json` under the reserved `platform` entry so agents can analyze back-stage seams and open a fix PR when a front-stage failure turns out to be platform brittleness.
|
|
67
67
|
- Branch defaults to the current local git branch.
|
|
68
68
|
- Data mode defaults to `test`. Use `remits-cli data-mode set prod` only for production investigation.
|
|
69
69
|
- Test activity is streamed from websocket `TestSuite` events while final status is also polled from `/cli/test`.
|
package/index.js
CHANGED
|
@@ -707,6 +707,16 @@ function looksLikePlatformRepo(dir) {
|
|
|
707
707
|
}
|
|
708
708
|
}
|
|
709
709
|
|
|
710
|
+
function findPlatformRepoInScanRoots() {
|
|
711
|
+
const platformMatches = [];
|
|
712
|
+
const visited = new Set();
|
|
713
|
+
const roots = defaultAccountScanRoots();
|
|
714
|
+
for (const root of roots) {
|
|
715
|
+
walkForAccountInfo(root, 0, [], visited, platformMatches);
|
|
716
|
+
}
|
|
717
|
+
return platformMatches.find(looksLikePlatformRepo) || null;
|
|
718
|
+
}
|
|
719
|
+
|
|
710
720
|
function getPlatformRepoEntry(index) {
|
|
711
721
|
const idx = index || readAccountRepoIndex();
|
|
712
722
|
const entry = idx[PLATFORM_REPO_INVENTORY_KEY];
|
|
@@ -778,6 +788,15 @@ function ensurePlatformRepoLocal(options = {}) {
|
|
|
778
788
|
}
|
|
779
789
|
}
|
|
780
790
|
|
|
791
|
+
// 2b. Bounded local scan so a manually cloned repo (for example `~/Code/remits`)
|
|
792
|
+
// is discovered and reused before we fall back to cloning `~/remits`.
|
|
793
|
+
const scanned = findPlatformRepoInScanRoots();
|
|
794
|
+
if (scanned) {
|
|
795
|
+
setPlatformRepoEntry(scanned, 'scan');
|
|
796
|
+
maybePullPlatformRepo(scanned, options);
|
|
797
|
+
return scanned;
|
|
798
|
+
}
|
|
799
|
+
|
|
781
800
|
// 3. Clone it (one-time, interactive only).
|
|
782
801
|
if (!options.allowClone || PLATFORM_REPO_CLONE_ATTEMPTED) {
|
|
783
802
|
return null;
|