gitnexus 1.6.13-rc.35 → 1.6.13-rc.36
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/dist/cli/ai-context.js +11 -3
- package/dist/cli/analyze-options.d.ts +4 -0
- package/dist/cli/analyze.js +2 -0
- package/dist/cli/clean.d.ts +2 -0
- package/dist/cli/clean.js +95 -5
- package/dist/cli/doctor.js +7 -0
- package/dist/cli/embeddings-sync.js +9 -1
- package/dist/cli/help-i18n.js +4 -0
- package/dist/cli/i18n/en.d.ts +19 -0
- package/dist/cli/i18n/en.js +19 -0
- package/dist/cli/i18n/resources.d.ts +38 -0
- package/dist/cli/i18n/zh-CN.d.ts +19 -0
- package/dist/cli/i18n/zh-CN.js +19 -0
- package/dist/cli/index.js +8 -0
- package/dist/cli/remove.js +3 -3
- package/dist/cli/status.js +46 -0
- package/dist/core/augmentation/engine.js +4 -1
- package/dist/core/group/sync.js +2 -2
- package/dist/core/ingestion/class-extractors/configs/ruby.d.ts +13 -1
- package/dist/core/ingestion/class-extractors/configs/ruby.js +50 -2
- package/dist/core/ingestion/languages/ruby.js +17 -2
- package/dist/core/ingestion/tree-sitter-queries.d.ts +1 -1
- package/dist/core/ingestion/tree-sitter-queries.js +74 -0
- package/dist/core/ingestion/utils/ast-helpers.js +16 -0
- package/dist/core/run-analyze.d.ts +7 -0
- package/dist/core/run-analyze.js +127 -13
- package/dist/core/shared-store-analyze.d.ts +89 -0
- package/dist/core/shared-store-analyze.js +570 -0
- package/dist/mcp/local/local-backend.d.ts +8 -0
- package/dist/mcp/local/local-backend.js +23 -3
- package/dist/server/analyze-launch.js +27 -8
- package/dist/server/analyze-worker-ipc.d.ts +1 -1
- package/dist/server/analyze-worker-ipc.js +3 -0
- package/dist/server/api.js +39 -10
- package/dist/storage/git.d.ts +13 -0
- package/dist/storage/git.js +55 -0
- package/dist/storage/index-lock.d.ts +5 -0
- package/dist/storage/index-lock.js +1 -1
- package/dist/storage/repo-manager.d.ts +21 -3
- package/dist/storage/repo-manager.js +27 -5
- package/dist/storage/repo-meta.d.ts +6 -0
- package/dist/storage/shared-store-lifecycle.d.ts +95 -0
- package/dist/storage/shared-store-lifecycle.js +393 -0
- package/dist/storage/shared-store.d.ts +65 -0
- package/dist/storage/shared-store.js +297 -0
- package/dist/storage/storage-resolver.d.ts +2 -2
- package/dist/storage/storage-resolver.js +27 -32
- package/dist/storage/storage-slot.d.ts +17 -0
- package/dist/storage/storage-slot.js +48 -0
- package/hooks/claude/registry-query.cjs +43 -6
- package/package.json +1 -1
package/dist/cli/ai-context.js
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
* AGENTS.md is the standard read by Cursor, Windsurf, OpenCode, Codex, Cline, CodeBuddy, Qoder, etc.
|
|
6
6
|
* CLAUDE.md is for Claude Code which only reads that file.
|
|
7
7
|
*/
|
|
8
|
+
import { GITNEXUS_DIR } from '../storage/storage-constants.js';
|
|
9
|
+
import { storeRootOfCheckoutSlot } from '../storage/shared-store.js';
|
|
8
10
|
import fs from 'fs/promises';
|
|
9
11
|
import path from 'path';
|
|
10
12
|
import { fileURLToPath } from 'url';
|
|
@@ -470,11 +472,17 @@ export async function generateAIContextFiles(repoPath, storagePath, projectName,
|
|
|
470
472
|
// CLI and hooks already share; failure to copy is non-fatal (docs carry a
|
|
471
473
|
// bootstrap fallback). `runnerPath` is project-relative with POSIX separators
|
|
472
474
|
// so the emitted command is identical across platforms.
|
|
473
|
-
|
|
475
|
+
// A shared-store slot (#3352) lives under the GitNexus home, so its path
|
|
476
|
+
// would be machine- and worktree-specific in committed docs; the runner goes
|
|
477
|
+
// next to the checkout's store pointer instead.
|
|
478
|
+
const runnerDir = storeRootOfCheckoutSlot(storagePath)
|
|
479
|
+
? path.join(repoPath, GITNEXUS_DIR)
|
|
480
|
+
: storagePath;
|
|
481
|
+
const runnerPath = path.relative(repoPath, path.join(runnerDir, 'run.cjs')).replace(/\\/g, '/');
|
|
474
482
|
try {
|
|
475
483
|
const runnerSrc = path.join(__dirname, '..', '..', 'hooks', 'claude', 'resolve-analyze-cmd.cjs');
|
|
476
|
-
await fs.mkdir(
|
|
477
|
-
await fs.copyFile(runnerSrc, path.join(
|
|
484
|
+
await fs.mkdir(runnerDir, { recursive: true });
|
|
485
|
+
await fs.copyFile(runnerSrc, path.join(runnerDir, 'run.cjs'));
|
|
478
486
|
}
|
|
479
487
|
catch (err) {
|
|
480
488
|
logger.warn(`Could not write GitNexus runner to ${runnerPath}: ${String(err)}`);
|
|
@@ -103,6 +103,10 @@ export interface AnalyzeOptions {
|
|
|
103
103
|
* `allowDuplicateName` option end-to-end.
|
|
104
104
|
*/
|
|
105
105
|
allowDuplicateName?: boolean;
|
|
106
|
+
/** `--share-with <repo>`: join that checkout's shared store (#3352). */
|
|
107
|
+
shareWith?: string;
|
|
108
|
+
/** `--no-share` sets this to false: leave the shared store (#3352). */
|
|
109
|
+
share?: boolean;
|
|
106
110
|
/**
|
|
107
111
|
* Override the walker's large-file skip threshold (#991). Value in KB;
|
|
108
112
|
* clamped downstream to the tree-sitter 32 MB ceiling. Sets
|
package/dist/cli/analyze.js
CHANGED
|
@@ -1128,6 +1128,8 @@ const analyzeCommandImpl = async (inputPath, cliOptions, runnerIdentityAtBootstr
|
|
|
1128
1128
|
// be able to accept the duplicate name without also paying the
|
|
1129
1129
|
// cost of a full pipeline re-index. See #829 review round 2.
|
|
1130
1130
|
allowDuplicateName: options.allowDuplicateName,
|
|
1131
|
+
shareWith: options.shareWith,
|
|
1132
|
+
noShare: options.share === false,
|
|
1131
1133
|
// Worker pool size threaded from --workers, replacing the previous
|
|
1132
1134
|
// GITNEXUS_WORKER_POOL_SIZE env mutation. `undefined` defers to the
|
|
1133
1135
|
// env / auto-formula fallback inside the pipeline.
|
package/dist/cli/clean.d.ts
CHANGED
package/dist/cli/clean.js
CHANGED
|
@@ -9,11 +9,14 @@ import path from 'path';
|
|
|
9
9
|
import { logger } from '../core/logger.js';
|
|
10
10
|
import { findRegistryEntryByRepoPath, findRepo, unregisterRepo, listRegisteredRepos, getStoragePaths, } from '../storage/repo-manager.js';
|
|
11
11
|
import { requireDeletableStoragePath, StorageDeletionError } from '../storage/storage-resolver.js';
|
|
12
|
-
import { formatStaleSlotLine } from './stale-branch-format.js';
|
|
12
|
+
import { formatSlotSize, formatStaleSlotLine } from './stale-branch-format.js';
|
|
13
13
|
import { listLocalHeads } from '../storage/git.js';
|
|
14
14
|
import { isContainedBranchDir, isDeleteCandidate, listStaleBranchSlots, removeBranchSlot, staleListingBlock, } from '../storage/stale-branch-slots.js';
|
|
15
15
|
import { cleanParkedLbugSidecars, inspectLbugSidecars, listParkedLbugSidecars, } from '../core/lbug/sidecar-recovery.js';
|
|
16
16
|
import { t } from './i18n/index.js';
|
|
17
|
+
import { getGlobalDir } from '../storage/global-dir.js';
|
|
18
|
+
import { STORES_DIR } from '../storage/shared-store.js';
|
|
19
|
+
import { findLegacyLocalIndex, reclaimAfterSlotRemoval, reclaimSharedStore, removeLegacyLocalIndex, removeCheckoutStorage, } from '../storage/shared-store-lifecycle.js';
|
|
17
20
|
const resolveOwnedCwdStorage = async (refusePrefix) => {
|
|
18
21
|
const repo = await findRepo(process.cwd());
|
|
19
22
|
if (!repo) {
|
|
@@ -115,7 +118,91 @@ const cleanStaleBranchSlots = async (force) => {
|
|
|
115
118
|
printStaleSlotLines(t('clean.stale.probeFailed'), probeFailed);
|
|
116
119
|
}
|
|
117
120
|
};
|
|
121
|
+
const reportReclaim = (result) => {
|
|
122
|
+
if (!result)
|
|
123
|
+
return;
|
|
124
|
+
if (result.removed.length > 0) {
|
|
125
|
+
console.log(t('clean.shared.reclaimed', { count: result.removed.length }));
|
|
126
|
+
}
|
|
127
|
+
if (result.kept.length > 0)
|
|
128
|
+
console.log(t('clean.shared.kept', { count: result.kept.length }));
|
|
129
|
+
};
|
|
130
|
+
/** `clean --gc`: collect every shared store under GITNEXUS_HOME (#3352). */
|
|
131
|
+
const collectSharedStores = async (force) => {
|
|
132
|
+
const storesDir = path.join(getGlobalDir(), STORES_DIR);
|
|
133
|
+
// Only a missing stores root means "nothing to collect"; an unreadable one
|
|
134
|
+
// must fail loudly rather than report success.
|
|
135
|
+
const names = await fs.readdir(storesDir).catch((err) => {
|
|
136
|
+
if (err.code === 'ENOENT')
|
|
137
|
+
return [];
|
|
138
|
+
throw err;
|
|
139
|
+
});
|
|
140
|
+
// Stray files (`.DS_Store`) are not stores, and a symlink is not followed:
|
|
141
|
+
// reclaim deletes under the root it is given. A store another collector
|
|
142
|
+
// removed meanwhile is simply gone. The lstat skips a stray link; it is not
|
|
143
|
+
// a race guard, since stores/ belongs to the user running clean and anyone
|
|
144
|
+
// able to swap an entry there can already delete the store itself.
|
|
145
|
+
const roots = [];
|
|
146
|
+
for (const name of names) {
|
|
147
|
+
const root = path.join(storesDir, name);
|
|
148
|
+
const stat = await fs.lstat(root).catch((err) => {
|
|
149
|
+
if (err.code === 'ENOENT')
|
|
150
|
+
return null;
|
|
151
|
+
throw err;
|
|
152
|
+
});
|
|
153
|
+
if (stat?.isDirectory())
|
|
154
|
+
roots.push(root);
|
|
155
|
+
}
|
|
156
|
+
if (roots.length === 0) {
|
|
157
|
+
console.log(t('clean.gc.none'));
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
for (const root of roots) {
|
|
161
|
+
// Without --force this is a preview: same selection, nothing deleted.
|
|
162
|
+
const result = await reclaimSharedStore(root, { gc: true, dryRun: !force });
|
|
163
|
+
console.log(t(force ? 'clean.gc.store' : 'clean.gc.preview', {
|
|
164
|
+
path: root,
|
|
165
|
+
members: result.droppedMembers.length,
|
|
166
|
+
graphs: result.removed.length,
|
|
167
|
+
}));
|
|
168
|
+
if (result.keptMembers.length > 0) {
|
|
169
|
+
console.log(t('clean.gc.keptMembers', { count: result.keptMembers.length }));
|
|
170
|
+
}
|
|
171
|
+
if (result.kept.length > 0)
|
|
172
|
+
console.log(t('clean.shared.kept', { count: result.kept.length }));
|
|
173
|
+
if (result.storeRemoved)
|
|
174
|
+
console.log(t('clean.shared.storeRemoved', { path: root }));
|
|
175
|
+
}
|
|
176
|
+
if (!force)
|
|
177
|
+
console.log(`\n${t('common.runForceConfirm')}`);
|
|
178
|
+
};
|
|
118
179
|
export const cleanCommand = async (options) => {
|
|
180
|
+
if (options?.gc) {
|
|
181
|
+
await collectSharedStores(options.force === true);
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
// --local-index: delete a pre-adoption index left in <checkout>/.gitnexus
|
|
185
|
+
// after the checkout moved into a shared store (#3352). Keeps the pointer.
|
|
186
|
+
if (options?.localIndex) {
|
|
187
|
+
const repo = await findRepo(process.cwd());
|
|
188
|
+
if (!repo) {
|
|
189
|
+
console.log(t('clean.notFoundHere'));
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
const legacy = await findLegacyLocalIndex(repo.repoPath, repo.storagePath);
|
|
193
|
+
if (!legacy) {
|
|
194
|
+
console.log(t('clean.localIndex.none'));
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
if (!options.force) {
|
|
198
|
+
console.log(t('clean.localIndex.preview', { path: legacy.dir, size: formatSlotSize(legacy.bytes) }));
|
|
199
|
+
console.log(`\n${t('common.runForceConfirm')}`);
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
await removeLegacyLocalIndex(repo.repoPath, repo.storagePath);
|
|
203
|
+
console.log(t('clean.localIndex.deleted', { path: legacy.dir, size: formatSlotSize(legacy.bytes) }));
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
119
206
|
// --stale: reclaim leftover per-branch slots whose recorded branch is not
|
|
120
207
|
// a live local head (#3331). Exclusive arm before --branch.
|
|
121
208
|
if (options?.stale) {
|
|
@@ -246,9 +333,12 @@ export const cleanCommand = async (options) => {
|
|
|
246
333
|
for (const entry of entries) {
|
|
247
334
|
try {
|
|
248
335
|
const storagePath = await requireDeletableStoragePath(entry);
|
|
249
|
-
|
|
250
|
-
|
|
336
|
+
// A shared slot is unregistered before it is deleted: its lock file
|
|
337
|
+
// lives inside it, so it must go last. A failed delete throws with the
|
|
338
|
+
// `clean --gc --force` recovery (shared-store-clean.test.ts).
|
|
339
|
+
await removeCheckoutStorage(storagePath, () => unregisterRepo(entry.path), entry.path);
|
|
251
340
|
console.log(t('clean.deletedRepo', { name: entry.name, storagePath }));
|
|
341
|
+
reportReclaim(await reclaimAfterSlotRemoval(storagePath));
|
|
252
342
|
}
|
|
253
343
|
catch (err) {
|
|
254
344
|
if (err instanceof StorageDeletionError) {
|
|
@@ -289,9 +379,9 @@ export const cleanCommand = async (options) => {
|
|
|
289
379
|
return;
|
|
290
380
|
}
|
|
291
381
|
try {
|
|
292
|
-
await
|
|
293
|
-
await unregisterRepo(repo.repoPath);
|
|
382
|
+
await removeCheckoutStorage(storagePath, () => unregisterRepo(repo.repoPath), repo.repoPath);
|
|
294
383
|
console.log(t('common.deleted', { target: storagePath }));
|
|
384
|
+
reportReclaim(await reclaimAfterSlotRemoval(storagePath));
|
|
295
385
|
}
|
|
296
386
|
catch (err) {
|
|
297
387
|
logger.error({ err }, 'Failed to delete:');
|
package/dist/cli/doctor.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { getRuntimeCapabilities, getRuntimeFingerprint } from '../core/platform/capabilities.js';
|
|
2
|
+
import { findLegacyLocalIndex } from '../storage/shared-store-lifecycle.js';
|
|
2
3
|
import { resolveEmbeddingConfig } from '../core/embeddings/config.js';
|
|
3
4
|
import { isHttpMode } from '../core/embeddings/http-client.js';
|
|
4
5
|
import { getLocalEmbeddingRuntimeBlocker, localEmbeddingPrefixUnloadableMessage, localEmbeddingStackMissingMessage, } from '../core/embeddings/runtime-support.js';
|
|
@@ -327,6 +328,12 @@ export const doctorCommand = async () => {
|
|
|
327
328
|
branches: entry?.branches,
|
|
328
329
|
});
|
|
329
330
|
const leftoverLines = leftoverBranchSlotDoctorLines(slots);
|
|
331
|
+
// A pre-adoption index left in <repo>/.gitnexus after this checkout moved
|
|
332
|
+
// into a shared store (#3352).
|
|
333
|
+
const legacy = await findLegacyLocalIndex(cwdRepo.repoPath, cwdRepo.storagePath);
|
|
334
|
+
if (legacy) {
|
|
335
|
+
leftoverLines.push(t('status.legacyLocalIndex', { path: legacy.dir, size: formatSlotSize(legacy.bytes) }));
|
|
336
|
+
}
|
|
330
337
|
if (leftoverLines.length === 0)
|
|
331
338
|
return;
|
|
332
339
|
console.log('');
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { lstat } from 'node:fs/promises';
|
|
2
|
+
import { ensurePrivateSharedGraph } from '../core/shared-store-analyze.js';
|
|
3
|
+
import { LBUG_DIRECTORY } from '../storage/storage-constants.js';
|
|
2
4
|
import path from 'node:path';
|
|
3
5
|
import { cliInfo } from './cli-message.js';
|
|
4
6
|
import { getGitRoot } from '../storage/git.js';
|
|
@@ -17,11 +19,17 @@ export const embeddingsSyncCommand = async (inputPath) => {
|
|
|
17
19
|
const repoPath = inputPath ? path.resolve(inputPath) : getGitRoot(process.cwd());
|
|
18
20
|
if (!repoPath)
|
|
19
21
|
throw new Error('Not inside a git repository. Pass a repository path.');
|
|
20
|
-
const {
|
|
22
|
+
const { metaPath } = getStoragePaths(repoPath);
|
|
21
23
|
const metaDir = path.dirname(metaPath);
|
|
24
|
+
// Writes go to the slot's own graph. A shared-store checkout that reads an
|
|
25
|
+
// immutable commit graph (#3352) takes a private copy first.
|
|
26
|
+
const lbugPath = path.join(metaDir, LBUG_DIRECTORY);
|
|
22
27
|
const lock = await acquireIndexLock(metaDir);
|
|
23
28
|
try {
|
|
24
29
|
requireExclusiveIndexLock(lock, `Cannot acquire the index lock at ${metaDir}; refusing an unlocked embeddings sync.`);
|
|
30
|
+
if (!(await ensurePrivateSharedGraph(metaDir, (m) => console.log(` ${m}`)))) {
|
|
31
|
+
throw new Error('The shared graph this checkout reads is gone. Run gitnexus analyze first.');
|
|
32
|
+
}
|
|
25
33
|
const meta = await loadMeta(metaDir);
|
|
26
34
|
if (!meta)
|
|
27
35
|
throw new Error(`No GitNexus index found for ${repoPath}. Run gitnexus analyze first.`);
|
package/dist/cli/help-i18n.js
CHANGED
|
@@ -63,6 +63,8 @@ const OPTION_DESCRIPTION_KEYS = {
|
|
|
63
63
|
'analyze|--skip-git': 'help.option.skipGit',
|
|
64
64
|
'analyze|--name <alias>': 'help.option.analyze.name',
|
|
65
65
|
'analyze|--allow-duplicate-name': 'help.option.analyze.allowDuplicateName',
|
|
66
|
+
'analyze|--share-with <repo>': 'help.option.analyze.shareWith',
|
|
67
|
+
'analyze|--no-share': 'help.option.analyze.noShare',
|
|
66
68
|
'analyze|-v, --verbose': 'help.option.verbose',
|
|
67
69
|
'analyze|--max-file-size <kb>': 'help.option.analyze.maxFileSize',
|
|
68
70
|
'analyze|--worker-timeout <seconds>': 'help.option.analyze.workerTimeout',
|
|
@@ -93,6 +95,8 @@ const OPTION_DESCRIPTION_KEYS = {
|
|
|
93
95
|
'clean|--branch <name>': 'help.option.clean.branch',
|
|
94
96
|
'clean|--lbug-sidecars': 'help.option.clean.lbugSidecars',
|
|
95
97
|
'clean|--stale': 'help.option.clean.stale',
|
|
98
|
+
'clean|--gc': 'help.option.clean.gc',
|
|
99
|
+
'clean|--local-index': 'help.option.clean.localIndex',
|
|
96
100
|
'remove|-f, --force': 'help.option.force.confirmation',
|
|
97
101
|
'wiki|-f, --force': 'help.option.wiki.force',
|
|
98
102
|
'wiki|--provider <provider>': 'help.option.wiki.provider',
|
package/dist/cli/i18n/en.d.ts
CHANGED
|
@@ -25,6 +25,11 @@ export declare const en: {
|
|
|
25
25
|
readonly 'list.clusters': 'Clusters';
|
|
26
26
|
readonly 'list.processes': 'Processes';
|
|
27
27
|
readonly 'list.unknown': 'unknown';
|
|
28
|
+
readonly 'status.sharedStoreShared': 'Shared index: store {{key}}, shared graph for commit {{commit}}';
|
|
29
|
+
readonly 'status.sharedStorePrivate': 'Shared index: store {{key}}, private graph (local changes or a pinned branch index)';
|
|
30
|
+
readonly 'status.sharedStoreCloneCow': ' Copied copy-on-write: unchanged pages are shared with the commit graph on disk';
|
|
31
|
+
readonly 'status.sharedStoreCloneCopy': ' Full copy: this filesystem cannot clone copy-on-write (APFS, btrfs and XFS can)';
|
|
32
|
+
readonly 'status.legacyLocalIndex': 'Leftover local index: {{path}} ({{size}}); remove it with `gitnexus clean --local-index --force`';
|
|
28
33
|
readonly 'status.notGitRepo': 'Not a git repository.';
|
|
29
34
|
readonly 'status.staleKuzu': 'Repository has a stale KuzuDB index from a previous version.';
|
|
30
35
|
readonly 'status.rebuildLadybug': 'Run: gitnexus analyze (rebuilds the index with LadybugDB)';
|
|
@@ -52,6 +57,16 @@ export declare const en: {
|
|
|
52
57
|
readonly 'clean.deleteAll': 'This will delete GitNexus indexes for {{count}} repo(s):';
|
|
53
58
|
readonly 'clean.deletedRepo': 'Deleted: {{name}} ({{storagePath}})';
|
|
54
59
|
readonly 'clean.notFoundHere': 'No indexed repository found in this directory.';
|
|
60
|
+
readonly 'clean.shared.reclaimed': 'Shared store: removed {{count}} commit graph(s) no checkout references.';
|
|
61
|
+
readonly 'clean.shared.kept': 'Shared store: kept {{count}} unreferenced commit graph(s) that could not be removed (in use or not writable); run `gitnexus clean --gc` later.';
|
|
62
|
+
readonly 'clean.shared.storeRemoved': 'Shared store: removed {{path}} (no checkouts remain).';
|
|
63
|
+
readonly 'clean.gc.none': 'No shared stores to collect.';
|
|
64
|
+
readonly 'clean.gc.keptMembers': 'Shared store: kept {{count}} checkout(s) it could not delete; run `gitnexus clean --gc --force` later.';
|
|
65
|
+
readonly 'clean.gc.store': 'Shared store {{path}}: dropped {{members}} checkout(s), removed {{graphs}} commit graph(s).';
|
|
66
|
+
readonly 'clean.gc.preview': 'Shared store {{path}}: would drop {{members}} checkout(s) and remove {{graphs}} commit graph(s).';
|
|
67
|
+
readonly 'clean.localIndex.none': 'No leftover local index in this checkout.';
|
|
68
|
+
readonly 'clean.localIndex.preview': 'This will delete the leftover local index at {{path}} ({{size}}). The shared index is not affected.';
|
|
69
|
+
readonly 'clean.localIndex.deleted': 'Deleted the leftover local index at {{path}} ({{size}}).';
|
|
55
70
|
readonly 'clean.deleteCurrent': 'This will delete the GitNexus index for: {{repoName}}';
|
|
56
71
|
readonly 'clean.branchNotIndexed': 'No indexed branch named "{{branch}}" for this repository. Use `gitnexus clean --stale` to reclaim leftover branch indexes, or `gitnexus list` to see recorded names.';
|
|
57
72
|
readonly 'clean.stale.none': 'No leftover branch indexes to reclaim.';
|
|
@@ -208,6 +223,8 @@ export declare const en: {
|
|
|
208
223
|
readonly 'help.option.skipGit': 'Treat the provided path/cwd as the index root and skip parent git-root discovery';
|
|
209
224
|
readonly 'help.option.analyze.name': 'Register this repo under a custom name in ~/.gitnexus/registry.json (disambiguates repos whose paths share a basename, e.g. two different .../app folders)';
|
|
210
225
|
readonly 'help.option.analyze.allowDuplicateName': 'Register this repo even if another path already uses the same --name alias. Leaves `-r <name>` ambiguous for the two paths; use -r <path> to disambiguate.';
|
|
226
|
+
readonly 'help.option.analyze.shareWith': 'Join the shared index store of a registered checkout of the same repository (name or path); the remote URL must match. Clones join a sibling clone’s store automatically; this names one explicitly and clears a --no-share opt-out.';
|
|
227
|
+
readonly 'help.option.analyze.noShare': 'Clones only: leave the shared index store, index into <repo>/.gitnexus again, and stop joining sibling clones automatically until --share-with (linked worktrees always share; set GITNEXUS_SHARED_STORE=off instead)';
|
|
211
228
|
readonly 'help.option.verbose': 'Enable verbose output';
|
|
212
229
|
readonly 'help.option.analyze.maxFileSize': 'Skip files larger than this (KB). Default: 512. Hard cap: 32768 (tree-sitter limit).';
|
|
213
230
|
readonly 'help.option.analyze.workerTimeout': 'Worker sub-batch idle timeout before retry/fallback. Default: 30.';
|
|
@@ -236,6 +253,8 @@ export declare const en: {
|
|
|
236
253
|
readonly 'help.option.clean.branch': 'Delete only the named branch index (not the workspace index)';
|
|
237
254
|
readonly 'help.option.clean.lbugSidecars': 'Clean parked LadybugDB recovery sidecars (missing-shadow WAL quarantines and dirty-recovery parks)';
|
|
238
255
|
readonly 'help.option.clean.stale': 'Reclaim leftover branch indexes that are not a live local head';
|
|
256
|
+
readonly 'help.option.clean.gc': 'Drop shared-store checkouts no registry entry uses and delete commit graphs nothing references';
|
|
257
|
+
readonly 'help.option.clean.localIndex': 'Delete the index left in <repo>/.gitnexus after this checkout moved into a shared store';
|
|
239
258
|
readonly 'help.option.wiki.force': 'Force full regeneration even if up to date';
|
|
240
259
|
readonly 'help.option.wiki.provider': 'LLM provider: minimax, openai, openrouter, azure, custom, cursor, claude, codex, opencode, or grok (default: minimax)';
|
|
241
260
|
readonly 'help.option.wiki.model': 'LLM model or deployment name (default: MiniMax-M3)';
|
package/dist/cli/i18n/en.js
CHANGED
|
@@ -25,6 +25,11 @@ export const en = {
|
|
|
25
25
|
'list.clusters': 'Clusters',
|
|
26
26
|
'list.processes': 'Processes',
|
|
27
27
|
'list.unknown': 'unknown',
|
|
28
|
+
'status.sharedStoreShared': 'Shared index: store {{key}}, shared graph for commit {{commit}}',
|
|
29
|
+
'status.sharedStorePrivate': 'Shared index: store {{key}}, private graph (local changes or a pinned branch index)',
|
|
30
|
+
'status.sharedStoreCloneCow': ' Copied copy-on-write: unchanged pages are shared with the commit graph on disk',
|
|
31
|
+
'status.sharedStoreCloneCopy': ' Full copy: this filesystem cannot clone copy-on-write (APFS, btrfs and XFS can)',
|
|
32
|
+
'status.legacyLocalIndex': 'Leftover local index: {{path}} ({{size}}); remove it with `gitnexus clean --local-index --force`',
|
|
28
33
|
'status.notGitRepo': 'Not a git repository.',
|
|
29
34
|
'status.staleKuzu': 'Repository has a stale KuzuDB index from a previous version.',
|
|
30
35
|
'status.rebuildLadybug': 'Run: gitnexus analyze (rebuilds the index with LadybugDB)',
|
|
@@ -52,6 +57,16 @@ export const en = {
|
|
|
52
57
|
'clean.deleteAll': 'This will delete GitNexus indexes for {{count}} repo(s):',
|
|
53
58
|
'clean.deletedRepo': 'Deleted: {{name}} ({{storagePath}})',
|
|
54
59
|
'clean.notFoundHere': 'No indexed repository found in this directory.',
|
|
60
|
+
'clean.shared.reclaimed': 'Shared store: removed {{count}} commit graph(s) no checkout references.',
|
|
61
|
+
'clean.shared.kept': 'Shared store: kept {{count}} unreferenced commit graph(s) that could not be removed (in use or not writable); run `gitnexus clean --gc` later.',
|
|
62
|
+
'clean.shared.storeRemoved': 'Shared store: removed {{path}} (no checkouts remain).',
|
|
63
|
+
'clean.gc.none': 'No shared stores to collect.',
|
|
64
|
+
'clean.gc.keptMembers': 'Shared store: kept {{count}} checkout(s) it could not delete; run `gitnexus clean --gc --force` later.',
|
|
65
|
+
'clean.gc.store': 'Shared store {{path}}: dropped {{members}} checkout(s), removed {{graphs}} commit graph(s).',
|
|
66
|
+
'clean.gc.preview': 'Shared store {{path}}: would drop {{members}} checkout(s) and remove {{graphs}} commit graph(s).',
|
|
67
|
+
'clean.localIndex.none': 'No leftover local index in this checkout.',
|
|
68
|
+
'clean.localIndex.preview': 'This will delete the leftover local index at {{path}} ({{size}}). The shared index is not affected.',
|
|
69
|
+
'clean.localIndex.deleted': 'Deleted the leftover local index at {{path}} ({{size}}).',
|
|
55
70
|
'clean.deleteCurrent': 'This will delete the GitNexus index for: {{repoName}}',
|
|
56
71
|
'clean.branchNotIndexed': 'No indexed branch named "{{branch}}" for this repository. Use `gitnexus clean --stale` to reclaim leftover branch indexes, or `gitnexus list` to see recorded names.',
|
|
57
72
|
'clean.stale.none': 'No leftover branch indexes to reclaim.',
|
|
@@ -210,6 +225,8 @@ export const en = {
|
|
|
210
225
|
'help.option.skipGit': 'Treat the provided path/cwd as the index root and skip parent git-root discovery',
|
|
211
226
|
'help.option.analyze.name': 'Register this repo under a custom name in ~/.gitnexus/registry.json (disambiguates repos whose paths share a basename, e.g. two different .../app folders)',
|
|
212
227
|
'help.option.analyze.allowDuplicateName': 'Register this repo even if another path already uses the same --name alias. Leaves `-r <name>` ambiguous for the two paths; use -r <path> to disambiguate.',
|
|
228
|
+
'help.option.analyze.shareWith': 'Join the shared index store of a registered checkout of the same repository (name or path); the remote URL must match. Clones join a sibling clone’s store automatically; this names one explicitly and clears a --no-share opt-out.',
|
|
229
|
+
'help.option.analyze.noShare': 'Clones only: leave the shared index store, index into <repo>/.gitnexus again, and stop joining sibling clones automatically until --share-with (linked worktrees always share; set GITNEXUS_SHARED_STORE=off instead)',
|
|
213
230
|
'help.option.verbose': 'Enable verbose output',
|
|
214
231
|
'help.option.analyze.maxFileSize': 'Skip files larger than this (KB). Default: 512. Hard cap: 32768 (tree-sitter limit).',
|
|
215
232
|
'help.option.analyze.workerTimeout': 'Worker sub-batch idle timeout before retry/fallback. Default: 30.',
|
|
@@ -238,6 +255,8 @@ export const en = {
|
|
|
238
255
|
'help.option.clean.branch': 'Delete only the named branch index (not the workspace index)',
|
|
239
256
|
'help.option.clean.lbugSidecars': 'Clean parked LadybugDB recovery sidecars (missing-shadow WAL quarantines and dirty-recovery parks)',
|
|
240
257
|
'help.option.clean.stale': 'Reclaim leftover branch indexes that are not a live local head',
|
|
258
|
+
'help.option.clean.gc': 'Drop shared-store checkouts no registry entry uses and delete commit graphs nothing references',
|
|
259
|
+
'help.option.clean.localIndex': 'Delete the index left in <repo>/.gitnexus after this checkout moved into a shared store',
|
|
241
260
|
'help.option.wiki.force': 'Force full regeneration even if up to date',
|
|
242
261
|
'help.option.wiki.provider': 'LLM provider: minimax, openai, openrouter, azure, custom, cursor, claude, codex, opencode, or grok (default: minimax)',
|
|
243
262
|
'help.option.wiki.model': 'LLM model or deployment name (default: MiniMax-M3)',
|
|
@@ -26,6 +26,11 @@ export declare const cliResources: {
|
|
|
26
26
|
readonly 'list.clusters': 'Clusters';
|
|
27
27
|
readonly 'list.processes': 'Processes';
|
|
28
28
|
readonly 'list.unknown': 'unknown';
|
|
29
|
+
readonly 'status.sharedStoreShared': 'Shared index: store {{key}}, shared graph for commit {{commit}}';
|
|
30
|
+
readonly 'status.sharedStorePrivate': 'Shared index: store {{key}}, private graph (local changes or a pinned branch index)';
|
|
31
|
+
readonly 'status.sharedStoreCloneCow': ' Copied copy-on-write: unchanged pages are shared with the commit graph on disk';
|
|
32
|
+
readonly 'status.sharedStoreCloneCopy': ' Full copy: this filesystem cannot clone copy-on-write (APFS, btrfs and XFS can)';
|
|
33
|
+
readonly 'status.legacyLocalIndex': 'Leftover local index: {{path}} ({{size}}); remove it with `gitnexus clean --local-index --force`';
|
|
29
34
|
readonly 'status.notGitRepo': 'Not a git repository.';
|
|
30
35
|
readonly 'status.staleKuzu': 'Repository has a stale KuzuDB index from a previous version.';
|
|
31
36
|
readonly 'status.rebuildLadybug': 'Run: gitnexus analyze (rebuilds the index with LadybugDB)';
|
|
@@ -53,6 +58,16 @@ export declare const cliResources: {
|
|
|
53
58
|
readonly 'clean.deleteAll': 'This will delete GitNexus indexes for {{count}} repo(s):';
|
|
54
59
|
readonly 'clean.deletedRepo': 'Deleted: {{name}} ({{storagePath}})';
|
|
55
60
|
readonly 'clean.notFoundHere': 'No indexed repository found in this directory.';
|
|
61
|
+
readonly 'clean.shared.reclaimed': 'Shared store: removed {{count}} commit graph(s) no checkout references.';
|
|
62
|
+
readonly 'clean.shared.kept': 'Shared store: kept {{count}} unreferenced commit graph(s) that could not be removed (in use or not writable); run `gitnexus clean --gc` later.';
|
|
63
|
+
readonly 'clean.shared.storeRemoved': 'Shared store: removed {{path}} (no checkouts remain).';
|
|
64
|
+
readonly 'clean.gc.none': 'No shared stores to collect.';
|
|
65
|
+
readonly 'clean.gc.keptMembers': 'Shared store: kept {{count}} checkout(s) it could not delete; run `gitnexus clean --gc --force` later.';
|
|
66
|
+
readonly 'clean.gc.store': 'Shared store {{path}}: dropped {{members}} checkout(s), removed {{graphs}} commit graph(s).';
|
|
67
|
+
readonly 'clean.gc.preview': 'Shared store {{path}}: would drop {{members}} checkout(s) and remove {{graphs}} commit graph(s).';
|
|
68
|
+
readonly 'clean.localIndex.none': 'No leftover local index in this checkout.';
|
|
69
|
+
readonly 'clean.localIndex.preview': 'This will delete the leftover local index at {{path}} ({{size}}). The shared index is not affected.';
|
|
70
|
+
readonly 'clean.localIndex.deleted': 'Deleted the leftover local index at {{path}} ({{size}}).';
|
|
56
71
|
readonly 'clean.deleteCurrent': 'This will delete the GitNexus index for: {{repoName}}';
|
|
57
72
|
readonly 'clean.branchNotIndexed': 'No indexed branch named "{{branch}}" for this repository. Use `gitnexus clean --stale` to reclaim leftover branch indexes, or `gitnexus list` to see recorded names.';
|
|
58
73
|
readonly 'clean.stale.none': 'No leftover branch indexes to reclaim.';
|
|
@@ -209,6 +224,8 @@ export declare const cliResources: {
|
|
|
209
224
|
readonly 'help.option.skipGit': 'Treat the provided path/cwd as the index root and skip parent git-root discovery';
|
|
210
225
|
readonly 'help.option.analyze.name': 'Register this repo under a custom name in ~/.gitnexus/registry.json (disambiguates repos whose paths share a basename, e.g. two different .../app folders)';
|
|
211
226
|
readonly 'help.option.analyze.allowDuplicateName': 'Register this repo even if another path already uses the same --name alias. Leaves `-r <name>` ambiguous for the two paths; use -r <path> to disambiguate.';
|
|
227
|
+
readonly 'help.option.analyze.shareWith': 'Join the shared index store of a registered checkout of the same repository (name or path); the remote URL must match. Clones join a sibling clone’s store automatically; this names one explicitly and clears a --no-share opt-out.';
|
|
228
|
+
readonly 'help.option.analyze.noShare': 'Clones only: leave the shared index store, index into <repo>/.gitnexus again, and stop joining sibling clones automatically until --share-with (linked worktrees always share; set GITNEXUS_SHARED_STORE=off instead)';
|
|
212
229
|
readonly 'help.option.verbose': 'Enable verbose output';
|
|
213
230
|
readonly 'help.option.analyze.maxFileSize': 'Skip files larger than this (KB). Default: 512. Hard cap: 32768 (tree-sitter limit).';
|
|
214
231
|
readonly 'help.option.analyze.workerTimeout': 'Worker sub-batch idle timeout before retry/fallback. Default: 30.';
|
|
@@ -237,6 +254,8 @@ export declare const cliResources: {
|
|
|
237
254
|
readonly 'help.option.clean.branch': 'Delete only the named branch index (not the workspace index)';
|
|
238
255
|
readonly 'help.option.clean.lbugSidecars': 'Clean parked LadybugDB recovery sidecars (missing-shadow WAL quarantines and dirty-recovery parks)';
|
|
239
256
|
readonly 'help.option.clean.stale': 'Reclaim leftover branch indexes that are not a live local head';
|
|
257
|
+
readonly 'help.option.clean.gc': 'Drop shared-store checkouts no registry entry uses and delete commit graphs nothing references';
|
|
258
|
+
readonly 'help.option.clean.localIndex': 'Delete the index left in <repo>/.gitnexus after this checkout moved into a shared store';
|
|
240
259
|
readonly 'help.option.wiki.force': 'Force full regeneration even if up to date';
|
|
241
260
|
readonly 'help.option.wiki.provider': 'LLM provider: minimax, openai, openrouter, azure, custom, cursor, claude, codex, opencode, or grok (default: minimax)';
|
|
242
261
|
readonly 'help.option.wiki.model': 'LLM model or deployment name (default: MiniMax-M3)';
|
|
@@ -333,6 +352,11 @@ export declare const cliResources: {
|
|
|
333
352
|
'list.clusters': string;
|
|
334
353
|
'list.processes': string;
|
|
335
354
|
'list.unknown': string;
|
|
355
|
+
'status.sharedStoreShared': string;
|
|
356
|
+
'status.sharedStorePrivate': string;
|
|
357
|
+
'status.sharedStoreCloneCow': string;
|
|
358
|
+
'status.sharedStoreCloneCopy': string;
|
|
359
|
+
'status.legacyLocalIndex': string;
|
|
336
360
|
'status.notGitRepo': string;
|
|
337
361
|
'status.staleKuzu': string;
|
|
338
362
|
'status.rebuildLadybug': string;
|
|
@@ -360,6 +384,16 @@ export declare const cliResources: {
|
|
|
360
384
|
'clean.deleteAll': string;
|
|
361
385
|
'clean.deletedRepo': string;
|
|
362
386
|
'clean.notFoundHere': string;
|
|
387
|
+
'clean.shared.reclaimed': string;
|
|
388
|
+
'clean.shared.kept': string;
|
|
389
|
+
'clean.shared.storeRemoved': string;
|
|
390
|
+
'clean.gc.none': string;
|
|
391
|
+
'clean.gc.keptMembers': string;
|
|
392
|
+
'clean.gc.store': string;
|
|
393
|
+
'clean.gc.preview': string;
|
|
394
|
+
'clean.localIndex.none': string;
|
|
395
|
+
'clean.localIndex.preview': string;
|
|
396
|
+
'clean.localIndex.deleted': string;
|
|
363
397
|
'clean.deleteCurrent': string;
|
|
364
398
|
'clean.branchNotIndexed': string;
|
|
365
399
|
'clean.stale.none': string;
|
|
@@ -516,6 +550,8 @@ export declare const cliResources: {
|
|
|
516
550
|
'help.option.skipGit': string;
|
|
517
551
|
'help.option.analyze.name': string;
|
|
518
552
|
'help.option.analyze.allowDuplicateName': string;
|
|
553
|
+
'help.option.analyze.shareWith': string;
|
|
554
|
+
'help.option.analyze.noShare': string;
|
|
519
555
|
'help.option.verbose': string;
|
|
520
556
|
'help.option.analyze.maxFileSize': string;
|
|
521
557
|
'help.option.analyze.workerTimeout': string;
|
|
@@ -544,6 +580,8 @@ export declare const cliResources: {
|
|
|
544
580
|
'help.option.clean.branch': string;
|
|
545
581
|
'help.option.clean.lbugSidecars': string;
|
|
546
582
|
'help.option.clean.stale': string;
|
|
583
|
+
'help.option.clean.gc': string;
|
|
584
|
+
'help.option.clean.localIndex': string;
|
|
547
585
|
'help.option.wiki.force': string;
|
|
548
586
|
'help.option.wiki.provider': string;
|
|
549
587
|
'help.option.wiki.model': string;
|
package/dist/cli/i18n/zh-CN.d.ts
CHANGED
|
@@ -25,6 +25,11 @@ export declare const zhCN: {
|
|
|
25
25
|
'list.clusters': string;
|
|
26
26
|
'list.processes': string;
|
|
27
27
|
'list.unknown': string;
|
|
28
|
+
'status.sharedStoreShared': string;
|
|
29
|
+
'status.sharedStorePrivate': string;
|
|
30
|
+
'status.sharedStoreCloneCow': string;
|
|
31
|
+
'status.sharedStoreCloneCopy': string;
|
|
32
|
+
'status.legacyLocalIndex': string;
|
|
28
33
|
'status.notGitRepo': string;
|
|
29
34
|
'status.staleKuzu': string;
|
|
30
35
|
'status.rebuildLadybug': string;
|
|
@@ -52,6 +57,16 @@ export declare const zhCN: {
|
|
|
52
57
|
'clean.deleteAll': string;
|
|
53
58
|
'clean.deletedRepo': string;
|
|
54
59
|
'clean.notFoundHere': string;
|
|
60
|
+
'clean.shared.reclaimed': string;
|
|
61
|
+
'clean.shared.kept': string;
|
|
62
|
+
'clean.shared.storeRemoved': string;
|
|
63
|
+
'clean.gc.none': string;
|
|
64
|
+
'clean.gc.keptMembers': string;
|
|
65
|
+
'clean.gc.store': string;
|
|
66
|
+
'clean.gc.preview': string;
|
|
67
|
+
'clean.localIndex.none': string;
|
|
68
|
+
'clean.localIndex.preview': string;
|
|
69
|
+
'clean.localIndex.deleted': string;
|
|
55
70
|
'clean.deleteCurrent': string;
|
|
56
71
|
'clean.branchNotIndexed': string;
|
|
57
72
|
'clean.stale.none': string;
|
|
@@ -208,6 +223,8 @@ export declare const zhCN: {
|
|
|
208
223
|
'help.option.skipGit': string;
|
|
209
224
|
'help.option.analyze.name': string;
|
|
210
225
|
'help.option.analyze.allowDuplicateName': string;
|
|
226
|
+
'help.option.analyze.shareWith': string;
|
|
227
|
+
'help.option.analyze.noShare': string;
|
|
211
228
|
'help.option.verbose': string;
|
|
212
229
|
'help.option.analyze.maxFileSize': string;
|
|
213
230
|
'help.option.analyze.workerTimeout': string;
|
|
@@ -236,6 +253,8 @@ export declare const zhCN: {
|
|
|
236
253
|
'help.option.clean.branch': string;
|
|
237
254
|
'help.option.clean.lbugSidecars': string;
|
|
238
255
|
'help.option.clean.stale': string;
|
|
256
|
+
'help.option.clean.gc': string;
|
|
257
|
+
'help.option.clean.localIndex': string;
|
|
239
258
|
'help.option.wiki.force': string;
|
|
240
259
|
'help.option.wiki.provider': string;
|
|
241
260
|
'help.option.wiki.model': string;
|
package/dist/cli/i18n/zh-CN.js
CHANGED
|
@@ -25,6 +25,11 @@ export const zhCN = {
|
|
|
25
25
|
'list.clusters': '聚类',
|
|
26
26
|
'list.processes': '流程',
|
|
27
27
|
'list.unknown': 'unknown',
|
|
28
|
+
'status.sharedStoreShared': '共享索引:存储 {{key}},提交 {{commit}} 的共享图',
|
|
29
|
+
'status.sharedStorePrivate': '共享索引:存储 {{key}},私有图(有本地更改或固定分支索引)',
|
|
30
|
+
'status.sharedStoreCloneCow': ' 写时复制副本:未更改的页面在磁盘上与提交图共享',
|
|
31
|
+
'status.sharedStoreCloneCopy': ' 完整副本:此文件系统不支持写时复制克隆(APFS、btrfs 和 XFS 支持)',
|
|
32
|
+
'status.legacyLocalIndex': '残留的本地索引:{{path}}({{size}});使用 `gitnexus clean --local-index --force` 删除',
|
|
28
33
|
'status.notGitRepo': '当前目录不是 git 仓库。',
|
|
29
34
|
'status.staleKuzu': '仓库包含旧版本遗留的 KuzuDB 索引。',
|
|
30
35
|
'status.rebuildLadybug': '运行:gitnexus analyze (使用 LadybugDB 重建索引)',
|
|
@@ -52,6 +57,16 @@ export const zhCN = {
|
|
|
52
57
|
'clean.deleteAll': '将删除 {{count}} 个仓库的 GitNexus 索引:',
|
|
53
58
|
'clean.deletedRepo': '已删除:{{name}}({{storagePath}})',
|
|
54
59
|
'clean.notFoundHere': '当前目录未找到已索引仓库。',
|
|
60
|
+
'clean.shared.reclaimed': '共享存储:已删除 {{count}} 个不再被任何检出引用的提交图。',
|
|
61
|
+
'clean.shared.kept': '共享存储:保留了 {{count}} 个无法删除的未引用提交图(正在使用或不可写);请稍后运行 `gitnexus clean --gc`。',
|
|
62
|
+
'clean.shared.storeRemoved': '共享存储:已删除 {{path}}(没有剩余检出)。',
|
|
63
|
+
'clean.gc.none': '没有可回收的共享存储。',
|
|
64
|
+
'clean.gc.keptMembers': '共享存储:保留了 {{count}} 个无法删除的检出;请稍后运行 `gitnexus clean --gc --force`。',
|
|
65
|
+
'clean.gc.store': '共享存储 {{path}}:移除了 {{members}} 个检出,删除了 {{graphs}} 个提交图。',
|
|
66
|
+
'clean.gc.preview': '共享存储 {{path}}:将移除 {{members}} 个检出并删除 {{graphs}} 个提交图。',
|
|
67
|
+
'clean.localIndex.none': '此检出中没有残留的本地索引。',
|
|
68
|
+
'clean.localIndex.preview': '将删除 {{path}} 处残留的本地索引({{size}})。共享索引不受影响。',
|
|
69
|
+
'clean.localIndex.deleted': '已删除 {{path}} 处残留的本地索引({{size}})。',
|
|
55
70
|
'clean.deleteCurrent': '将删除该仓库的 GitNexus 索引:{{repoName}}',
|
|
56
71
|
'clean.branchNotIndexed': '该仓库没有名为 “{{branch}}” 的已索引分支。使用 `gitnexus clean --stale` 回收残留分支索引,或使用 `gitnexus list` 查看已记录名称。',
|
|
57
72
|
'clean.stale.none': '没有可回收的残留分支索引。',
|
|
@@ -208,6 +223,8 @@ export const zhCN = {
|
|
|
208
223
|
'help.option.skipGit': '将提供的路径/cwd 视为索引根目录,并跳过向上查找 git 根目录',
|
|
209
224
|
'help.option.analyze.name': '在 ~/.gitnexus/registry.json 中使用自定义名称注册该仓库(用于区分路径 basename 相同的仓库,例如两个不同的 .../app 目录)',
|
|
210
225
|
'help.option.analyze.allowDuplicateName': '即使已有其他路径使用相同 --name 别名,也注册该仓库。会使两个路径的 `-r <name>` 产生歧义;请用 -r <path> 消除歧义。',
|
|
226
|
+
'help.option.analyze.shareWith': '加入同一仓库已注册检出的共享索引存储(名称或路径);远程 URL 必须一致。克隆会自动加入同源克隆的存储;此选项显式指定存储,并清除 --no-share 的退出设置。',
|
|
227
|
+
'help.option.analyze.noShare': '仅限克隆:离开共享索引存储,重新索引到 <repo>/.gitnexus,并在使用 --share-with 之前不再自动加入同源克隆(链接工作树始终共享;请改用 GITNEXUS_SHARED_STORE=off)',
|
|
211
228
|
'help.option.verbose': '启用详细输出',
|
|
212
229
|
'help.option.analyze.maxFileSize': '跳过大于该值的文件(KB)。默认:512。硬上限:32768(tree-sitter 限制)。',
|
|
213
230
|
'help.option.analyze.workerTimeout': 'Worker 子批次空闲超时,超时后重试/回退。默认:30。',
|
|
@@ -236,6 +253,8 @@ export const zhCN = {
|
|
|
236
253
|
'help.option.clean.branch': '仅删除指定分支的索引(不影响工作区索引)',
|
|
237
254
|
'help.option.clean.lbugSidecars': '清理已暂存的 LadybugDB 恢复 sidecar(missing-shadow WAL 隔离文件与 dirty-recovery 暂存文件)',
|
|
238
255
|
'help.option.clean.stale': '回收已不是本地 head 的残留分支索引',
|
|
256
|
+
'help.option.clean.gc': '移除注册表不再使用的共享存储检出,并删除无人引用的提交图',
|
|
257
|
+
'help.option.clean.localIndex': '删除此检出迁入共享存储后遗留在 <repo>/.gitnexus 中的索引',
|
|
239
258
|
'help.option.wiki.force': '即使已是最新也强制完整重新生成',
|
|
240
259
|
'help.option.wiki.provider': 'LLM 提供商:minimax、openai、openrouter、azure、custom、cursor、claude、codex、opencode 或 grok(默认:minimax)',
|
|
241
260
|
'help.option.wiki.model': 'LLM 模型或 deployment 名称(默认:MiniMax-M3)',
|
package/dist/cli/index.js
CHANGED
|
@@ -79,6 +79,12 @@ program
|
|
|
79
79
|
'(disambiguates repos whose paths share a basename, e.g. two different .../app folders)')
|
|
80
80
|
.option('--allow-duplicate-name', 'Register this repo even if another path already uses the same --name alias. ' +
|
|
81
81
|
'Leaves `-r <name>` ambiguous for the two paths; use -r <path> to disambiguate.')
|
|
82
|
+
.option('--share-with <repo>', 'Join the shared index store of a registered checkout of the same repository ' +
|
|
83
|
+
'(name or path); the remote URL must match. Clones join a sibling clone’s store ' +
|
|
84
|
+
'automatically; this names one explicitly and clears a --no-share opt-out.')
|
|
85
|
+
.option('--no-share', 'Clones only: leave the shared index store, index into <repo>/.gitnexus again, and stop ' +
|
|
86
|
+
'joining sibling clones automatically until --share-with (linked worktrees always share; ' +
|
|
87
|
+
'set GITNEXUS_SHARED_STORE=off instead)')
|
|
82
88
|
.option('-v, --verbose', 'Enable verbose ingestion warnings (default: false)')
|
|
83
89
|
.option('--max-file-size <kb>', 'Skip files larger than this (KB). Default: 512. Hard cap: 32768 (tree-sitter limit).')
|
|
84
90
|
.option('--worker-timeout <seconds>', 'Worker sub-batch idle timeout before retry/fallback. Default: 30.')
|
|
@@ -212,6 +218,8 @@ program
|
|
|
212
218
|
.option('--all', 'Clean all indexed repos')
|
|
213
219
|
.option('--branch <name>', 'Delete only the named branch index (not the workspace index)')
|
|
214
220
|
.option('--stale', 'Reclaim leftover branch indexes that are not a live local head')
|
|
221
|
+
.option('--gc', 'Drop shared-store checkouts no registry entry uses and delete commit graphs nothing references')
|
|
222
|
+
.option('--local-index', 'Delete the index left in <repo>/.gitnexus after this checkout moved into a shared store')
|
|
215
223
|
.option('--lbug-sidecars', 'Clean parked LadybugDB recovery sidecars (missing-shadow WAL quarantines and dirty-recovery parks)')
|
|
216
224
|
.action(createLazyAction(() => import('./clean.js'), 'cleanCommand'));
|
|
217
225
|
program
|
package/dist/cli/remove.js
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
* `clean -f`. (Distinct from `analyze --force`, which re-indexes;
|
|
29
29
|
* here there is no pipeline, so no conflation.)
|
|
30
30
|
*/
|
|
31
|
-
import
|
|
31
|
+
import { reclaimAfterSlotRemoval, removeCheckoutStorage, } from '../storage/shared-store-lifecycle.js';
|
|
32
32
|
import { logger } from '../core/logger.js';
|
|
33
33
|
import { cliError } from './cli-message.js';
|
|
34
34
|
import { t } from './i18n/index.js';
|
|
@@ -88,8 +88,8 @@ export const removeCommand = async (target, options) => {
|
|
|
88
88
|
// orphaned — `listRegisteredRepos({ validate: true })` prunes those on
|
|
89
89
|
// next read, so the failure is self-healing.
|
|
90
90
|
try {
|
|
91
|
-
await
|
|
92
|
-
await
|
|
91
|
+
await removeCheckoutStorage(storagePath, () => unregisterRepo(entry.path), entry.path);
|
|
92
|
+
await reclaimAfterSlotRemoval(storagePath);
|
|
93
93
|
console.log(t('remove.removed', { name: entry.name }));
|
|
94
94
|
console.log(` ${t('common.path')}: ${entry.path}`);
|
|
95
95
|
console.log(` ${t('common.storage')}: ${entry.storagePath}`);
|