@ran-sh/dsh-crew 1.9.1 → 1.10.0
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ran-sh/dsh-crew",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/hub/entry.mjs",
|
|
6
6
|
"bin": {
|
|
@@ -29,7 +29,8 @@
|
|
|
29
29
|
"build:client": "tsdown src/client/entry.tsx --format cjs --platform browser --target es2022 --tsconfig tsconfig.client.json --deps.never-bundle react --deps.never-bundle react/jsx-runtime --deps.never-bundle react-dom --deps.never-bundle react-dom/client --out-dir .client-build --clean --logLevel warn && tsdown src/client/quick-entry.tsx --format cjs --platform browser --target es2022 --tsconfig tsconfig.client.json --deps.never-bundle react --deps.never-bundle react/jsx-runtime --deps.never-bundle react-dom --deps.never-bundle react-dom/client --out-dir .client-build --no-clean --logLevel warn && node scripts/build-client.mjs",
|
|
30
30
|
"verify:npm-install": "node scripts/verify-npm-install.mjs",
|
|
31
31
|
"verify:npm-install:official": "node scripts/verify-npm-install.mjs --with-official-dsh",
|
|
32
|
-
"verify:official-bridge": "node scripts/verify-official-bridge-e2e.mjs --diagnostic-only"
|
|
32
|
+
"verify:official-bridge": "node scripts/verify-official-bridge-e2e.mjs --diagnostic-only",
|
|
33
|
+
"test": "node --test \"test/*.test.mjs\""
|
|
33
34
|
},
|
|
34
35
|
"dependencies": {
|
|
35
36
|
"@modelcontextprotocol/sdk": "^1.25.4",
|
package/src/runtime-identity.mjs
CHANGED
|
@@ -36,7 +36,7 @@ export {
|
|
|
36
36
|
// included in the identity contract.
|
|
37
37
|
const RUNTIME_ID = randomUUID();
|
|
38
38
|
|
|
39
|
-
export const RUNTIME_VERSION = '1.
|
|
39
|
+
export const RUNTIME_VERSION = '1.10.0';
|
|
40
40
|
export const HUB_PROTOCOL_VERSION = 1;
|
|
41
41
|
|
|
42
42
|
export const HUB_CAPABILITIES = Object.freeze([
|
|
@@ -418,10 +418,18 @@ export async function staleWorktrees({ git, allowed = [] } = {}) {
|
|
|
418
418
|
if (root.ok) {
|
|
419
419
|
const res = await runGit(run, ['worktree', 'list', '--porcelain'], { cwd: root.repoRoot });
|
|
420
420
|
if (res.ok) {
|
|
421
|
-
|
|
422
|
-
|
|
421
|
+
// `git worktree list` puts the main working tree first. Inspecting from
|
|
422
|
+
// inside a linked worktree reports that worktree as the top level, so the
|
|
423
|
+
// repo root cannot be matched by path — the position in the list is what
|
|
424
|
+
// identifies the main tree.
|
|
425
|
+
const blocks = String(res.stdout).split('\n\n');
|
|
426
|
+
for (let index = 1; index < blocks.length; index += 1) {
|
|
427
|
+
const path = blocks[index].split('\n').find((l) => l.startsWith('worktree '))?.slice('worktree '.length)?.trim();
|
|
423
428
|
if (!path) continue;
|
|
424
429
|
const abs = resolve(path);
|
|
430
|
+
// A repo whose directory happens to start with a Crew prefix (say, a
|
|
431
|
+
// checkout named dsh-crew-something) is not a disposable worktree, and
|
|
432
|
+
// treating it as stale would have the cleanup path fighting over it.
|
|
425
433
|
if (isCrewWorktreeName(basename(abs)) && !set.has(abs)) stale.push(abs);
|
|
426
434
|
}
|
|
427
435
|
}
|