@openchamber/web 1.21.0 → 1.22.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/bin/cli.test.js +35 -0
- package/bin/lib/DOCUMENTATION.md +12 -0
- package/bin/lib/cli-settings-accessors.js +111 -0
- package/bin/lib/cli-settings-accessors.test.js +189 -0
- package/bin/lib/cli-startup.js +29 -9
- package/bin/lib/commands-connect-url.js +12 -14
- package/dist/assets/{CodeMirrorCommentWidgets-C2BopIs3.js → CodeMirrorCommentWidgets-CPvfxh0N.js} +1 -1
- package/dist/assets/CommitSection-CC5mFzO2.js +1 -0
- package/dist/assets/DiffView-6xGdyI0n.js +4 -0
- package/dist/assets/FilesView-Bm3vT63N.js +17 -0
- package/dist/assets/GitView-B6y1Y69c.js +6 -0
- package/dist/assets/{JsonTreeView-osju7J70.js → JsonTreeView-rwHz84MX.js} +1 -1
- package/dist/assets/LinearIssuesView-B0UM_Rkx.js +1 -0
- package/dist/assets/MarkdownImageGallery-sGilV9Hs.js +1 -0
- package/dist/assets/MarkdownRendererImpl--4sRsKBn.js +12 -0
- package/dist/assets/OnboardingScreen-CECL_Cms.js +1 -0
- package/dist/assets/{PatchDiff-Dan3mADn.js → PatchDiff-BGPl1s-U.js} +1 -1
- package/dist/assets/{PierreDiffViewer-CGoI2v0q.js → PierreDiffViewer-Cvz9Z-io.js} +2 -2
- package/dist/assets/PlanView-BFMsnHk3.js +5 -0
- package/dist/assets/SettingsView-_Gtn5SdT.js +28 -0
- package/dist/assets/{SettingsWindow-DXF-MTHG.js → SettingsWindow-C1Qa09YO.js} +1 -1
- package/dist/assets/{ToolOutputDialog-DrCa1JRk.js → ToolOutputDialog-DzQlzMF4.js} +6 -6
- package/dist/assets/{ToolPartDiffPreview-B_tfvlNF.js → ToolPartDiffPreview-DfVOfwHy.js} +2 -2
- package/dist/assets/{VirtualizedFileDiff-CN_BctrR.js → VirtualizedFileDiff-DT5MDv-u.js} +1 -1
- package/dist/assets/WalkthroughView-D8sLH_M8.js +4 -0
- package/dist/assets/{computeVirtualFileMetrics-Gi1d5eU1.js → computeVirtualFileMetrics-DmpLWhll.js} +1 -1
- package/dist/assets/{contextPanelEmbeddedChat-CpzVNWAv.js → contextPanelEmbeddedChat-BK78t3M_.js} +1 -1
- package/dist/assets/de-C3luvSd_.js +9 -0
- package/dist/assets/es-CmU4HLv9.js +15 -0
- package/dist/assets/fr-Bgyni40l.js +13 -0
- package/dist/assets/index-C57jT0Sa.css +1 -0
- package/dist/assets/{index-Brm3X9rs.js → index-CWYs7sMK.js} +1 -1
- package/dist/assets/index-b0zDkWyg.js +7 -0
- package/dist/assets/{isDiffPlainText-pH9kAJQH.js → isDiffPlainText-BO_q5ezD.js} +1 -1
- package/dist/assets/{isFilePlainText-CVKy_dgB.js → isFilePlainText-D8qPqUAf.js} +1 -1
- package/dist/assets/ja-C1ImKinT.js +15 -0
- package/dist/assets/ko-CP7OdxYH.js +15 -0
- package/dist/assets/main-D4rd8Hy5.js +928 -0
- package/dist/assets/{main-vUCh0VB0.js → main-D7fwjW2z.js} +2 -2
- package/dist/assets/{markdown-shiki.worker-CKGJ1J33.js → markdown-shiki.worker-D5fBU-lw.js} +5 -5
- package/dist/assets/markdownCore-BcmkWZPO.js +3 -0
- package/dist/assets/{miniChat-BlzGEYgE.js → miniChat-D5rraz-g.js} +2 -2
- package/dist/assets/{mobile-CkX6H-IT.js → mobile-Cg_DE3KL.js} +2 -2
- package/dist/assets/{patchFileDiff-BCTsE43U.js → patchFileDiff-Bpql0QGw.js} +3 -3
- package/dist/assets/pl-DQYSiGYX.js +15 -0
- package/dist/assets/pt-BR-DytpsW4M.js +15 -0
- package/dist/assets/{renderElectronMiniChatApp-CJYe_KOL.js → renderElectronMiniChatApp-B_Bn7BbN.js} +2 -2
- package/dist/assets/renderMobileApp-DLfxMzGJ.js +25 -0
- package/dist/assets/runtimeEndpointReset-HlRmXFGW.js +16 -0
- package/dist/assets/scheduledTasksApi-BPvxrynl.js +1 -0
- package/dist/assets/{shikiHighlight-BgTPSITe.js → shikiHighlight-CFAVs_lu.js} +1 -1
- package/dist/assets/tr-aizaUvft.js +6 -0
- package/dist/assets/uk-DwnRxJZd.js +15 -0
- package/dist/assets/useAppFontEffects-DWXGRUPZ.js +7310 -0
- package/dist/assets/{useInlineCommentController-DFFv0hae.js → useInlineCommentController-Cc0OCXr0.js} +2 -2
- package/dist/assets/useRootScrollLock-BFZtfciC.js +1 -0
- package/dist/assets/{vendor-base-ui-_6j2xOWl.js → vendor-base-ui-BeMD8X_w.js} +1 -1
- package/dist/assets/{vendor-codemirror-language-data-DkQX2EBa.js → vendor-codemirror-language-data-BGFszm8n.js} +2 -2
- package/dist/assets/{vendor-floating-ui-core-CXmKXOXc.js → vendor-floating-ui-core-PuGzNPnN.js} +1 -1
- package/dist/assets/{vendor-floating-ui-dom-WyXykhNi.js → vendor-floating-ui-dom-BTvzWks8.js} +1 -1
- package/dist/assets/{vendor-floating-ui-react-dom-DKpLs02S.js → vendor-floating-ui-react-dom-DxYCWdHj.js} +1 -1
- package/dist/assets/{vendor-floating-ui-utils-BzXdqYpP.js → vendor-floating-ui-utils-D6FqdtJt.js} +1 -1
- package/dist/assets/vendor-linkify-it-DZCzzDkK.js +1 -0
- package/dist/assets/vendor-marked-linkify-it-CXI_LHIE.js +1 -0
- package/dist/assets/vendor-uc.micro-BAd0H0z4.js +1 -0
- package/dist/assets/{web-components-DLnGY4fs.js → web-components-CD-GFayc.js} +4 -4
- package/dist/assets/zh-CN-UDNMxm7r.js +15 -0
- package/dist/assets/zh-TW-BsswdYL-.js +15 -0
- package/dist/index.html +5 -5
- package/dist/mini-chat.html +3 -3
- package/dist/mobile.html +3 -3
- package/dist/site.webmanifest +1 -1
- package/dist/sw.js +1 -1
- package/package.json +2 -2
- package/public/site.webmanifest +1 -1
- package/server/index.js +6 -2
- package/server/lib/cloudflare-tunnel.js +1 -1
- package/server/lib/dictation/DOCUMENTATION.md +19 -6
- package/server/lib/dictation/local/model-catalog.js +220 -0
- package/server/lib/dictation/local/model-catalog.test.js +42 -0
- package/server/lib/dictation/local/sherpa-tts.js +41 -20
- package/server/lib/dictation/local/worker-process.js +2 -0
- package/server/lib/dictation/runtime.js +4 -0
- package/server/lib/dictation/service.js +27 -4
- package/server/lib/fs/DOCUMENTATION.md +5 -0
- package/server/lib/fs/routes.js +150 -0
- package/server/lib/fs/routes.test.js +308 -3
- package/server/lib/git/DOCUMENTATION.md +4 -3
- package/server/lib/git/service.js +128 -6
- package/server/lib/git/service.test.js +191 -1
- package/server/lib/linear/DOCUMENTATION.md +97 -0
- package/server/lib/linear/OAUTH-BROKER-HANDOFF.md +91 -0
- package/server/lib/linear/auth.js +436 -0
- package/server/lib/linear/auth.test.js +242 -0
- package/server/lib/linear/client.js +191 -0
- package/server/lib/linear/index.js +61 -0
- package/server/lib/linear/issues.js +499 -0
- package/server/lib/linear/issues.test.js +512 -0
- package/server/lib/linear/mapping.js +188 -0
- package/server/lib/linear/mapping.test.js +147 -0
- package/server/lib/linear/oauth.js +345 -0
- package/server/lib/linear/oauth.test.js +166 -0
- package/server/lib/linear/parse.js +23 -0
- package/server/lib/linear/routes.js +432 -0
- package/server/lib/linear/routes.test.js +661 -0
- package/server/lib/linear/status-runtime.js +64 -0
- package/server/lib/linear/status-runtime.test.js +167 -0
- package/server/lib/linear/status.js +280 -0
- package/server/lib/linear/status.test.js +271 -0
- package/server/lib/linear/teams.js +72 -0
- package/server/lib/linear/teams.test.js +94 -0
- package/server/lib/markdown-image-grants/DOCUMENTATION.md +4 -0
- package/server/lib/markdown-image-grants/routes.js +3 -1
- package/server/lib/markdown-image-grants/routes.test.js +14 -0
- package/server/lib/openchamber-sessions/routes.js +4 -1
- package/server/lib/openchamber-sessions/routes.test.js +23 -0
- package/server/lib/opencode/env-runtime.js +17 -1
- package/server/lib/opencode/env-runtime.test.js +56 -0
- package/server/lib/opencode/feature-routes-runtime.js +2 -0
- package/server/lib/opencode/lifecycle.js +48 -9
- package/server/lib/opencode/lifecycle.test.js +125 -1
- package/server/lib/opencode/managed-process-registry.d.ts +13 -0
- package/server/lib/opencode/managed-process-registry.js +213 -163
- package/server/lib/opencode/managed-process-registry.test.mjs +285 -0
- package/server/lib/opencode/project-directory-runtime.js +16 -11
- package/server/lib/opencode/project-directory-runtime.test.js +32 -12
- package/server/lib/opencode/pwa-manifest-routes.js +1 -1
- package/server/lib/opencode/routes-upgrade.test.js +96 -12
- package/server/lib/opencode/routes.js +53 -5
- package/server/lib/opencode/settings-helpers.js +3 -0
- package/server/lib/opencode/settings-helpers.test.js +10 -0
- package/server/lib/opencode/static-routes-runtime.js +3 -3
- package/server/lib/opencode/theme-runtime.js +1 -1
- package/server/lib/opencode/theme-runtime.test.js +129 -0
- package/server/lib/projects/project-config.js +33 -5
- package/server/lib/projects/project-config.test.js +85 -0
- package/server/lib/quota/DOCUMENTATION.md +19 -0
- package/server/lib/quota/providers/copilot.js +26 -10
- package/server/lib/quota/providers/copilot.test.js +78 -0
- package/server/lib/scheduled-tasks/DOCUMENTATION.md +7 -0
- package/server/lib/small-model/DOCUMENTATION.md +11 -5
- package/server/lib/small-model/call.js +64 -20
- package/server/lib/small-model/call.test.js +184 -2
- package/server/lib/tts/DOCUMENTATION.md +1 -0
- package/server/lib/tts/language-detect.js +210 -0
- package/server/lib/tts/language-detect.test.js +76 -0
- package/server/lib/tts/routes.js +23 -1
- package/server/lib/tts/routes.test.js +26 -0
- package/server/lib/tunnels/install-help.js +2 -2
- package/server/lib/tunnels/install-help.test.js +9 -0
- package/server/lib/walkthrough/languages.js +1 -0
- package/dist/assets/CommitSection-HJeMUAWb.js +0 -1
- package/dist/assets/DiffView-D5cvbEPb.js +0 -4
- package/dist/assets/FilesView-DPU8aNPL.js +0 -17
- package/dist/assets/GitView-Ct6xWrVH.js +0 -6
- package/dist/assets/MarkdownImageGallery-EujHSZ2M.js +0 -1
- package/dist/assets/MarkdownRendererImpl-CPzu4kIr.js +0 -12
- package/dist/assets/OnboardingScreen-w2VG4fWY.js +0 -1
- package/dist/assets/PlanView-Dgg-WTEc.js +0 -4
- package/dist/assets/SessionSwitcherDropdown-CJTrc8K7.js +0 -1
- package/dist/assets/SettingsView-D9yRuFZw.js +0 -28
- package/dist/assets/WalkthroughView-D9Q4lr5x.js +0 -4
- package/dist/assets/de-B_LdJwEM.js +0 -9
- package/dist/assets/es-CubfsAYV.js +0 -15
- package/dist/assets/fr-5qJM0nFS.js +0 -13
- package/dist/assets/index-BW82eK5v.css +0 -1
- package/dist/assets/index-rlLjZUM5.js +0 -7
- package/dist/assets/ja-DJYIBUlH.js +0 -15
- package/dist/assets/ko-DcUBkB7y.js +0 -15
- package/dist/assets/main-DLBxKIoX.js +0 -926
- package/dist/assets/markdownCore-DG6GHLF4.js +0 -3
- package/dist/assets/pl-rB6BLcio.js +0 -15
- package/dist/assets/pt-BR-DcwtlO-o.js +0 -15
- package/dist/assets/renderMobileApp-hQJTnr8B.js +0 -25
- package/dist/assets/runtimeEndpointReset-BDh7r8BL.js +0 -15
- package/dist/assets/scheduledTasksApi-CAGPh_gZ.js +0 -1
- package/dist/assets/uk-INZlFD9A.js +0 -15
- package/dist/assets/useAppFontEffects-Cll4gnsh.js +0 -7268
- package/dist/assets/zh-CN-Dzda8xa1.js +0 -15
- package/dist/assets/zh-TW-Cwn3rNYZ.js +0 -15
|
@@ -23,8 +23,13 @@ Own filesystem API behavior for the web server runtime, including workspace-boun
|
|
|
23
23
|
- `POST /api/fs/exec`
|
|
24
24
|
- `GET /api/fs/exec/:jobId`
|
|
25
25
|
- `GET /api/fs/list`
|
|
26
|
+
- `GET /api/fs/git-dirs` — shallow nested git repository discovery for the
|
|
27
|
+
Git tab (depth- and visit-capped readdir walk; `.git` directory, file, or
|
|
28
|
+
symlink marks a repository boundary; junk directories and symlinks are
|
|
29
|
+
never descended into)
|
|
26
30
|
- Owns exec job queue state (`execJobs`) and lifecycle/TTL pruning.
|
|
27
31
|
- Enforces workspace boundary checks with active project + worktree fallback support.
|
|
32
|
+
- The active project directory is validated with `fs.realpath`, so when the project root is itself a symlink the workspace base no longer matches the paths the client sends. Workspace resolution therefore retries against the raw directory the client requested (`requestedDirectory` from `resolveProjectDirectory`) before falling back to worktree roots. Symlinks are still resolved afterwards, and write/exec routes keep their canonical containment check against the resolved base.
|
|
28
33
|
- `createFsSearchRuntime({ fsPromises, path, spawn, resolveGitBinaryForSpawn })` from `search.js`
|
|
29
34
|
- Returns `{ searchFilesystemFiles(rootPath, options) }`.
|
|
30
35
|
- Supports fuzzy matching, hidden-file handling, and optional `git check-ignore` filtering.
|
package/server/lib/fs/routes.js
CHANGED
|
@@ -267,6 +267,27 @@ const resolveWorkspacePathFromContext = async ({ req, targetPath, resolveProject
|
|
|
267
267
|
return resolved;
|
|
268
268
|
}
|
|
269
269
|
|
|
270
|
+
// The active project directory is validated with fs.realpath, so the base is
|
|
271
|
+
// canonical while the client (and the file tree) addresses files under the
|
|
272
|
+
// user-visible root, which may itself be a symlink. Retry against the raw
|
|
273
|
+
// directory the client asked for so those paths stay addressable. Symlink
|
|
274
|
+
// resolution still happens afterwards, and the routes that need canonical
|
|
275
|
+
// containment re-check it against this base.
|
|
276
|
+
const requestedBase = resolvedProject.requestedDirectory;
|
|
277
|
+
if (typeof requestedBase === 'string' && requestedBase && requestedBase !== resolvedProject.directory) {
|
|
278
|
+
const lexical = resolveWorkspacePath({
|
|
279
|
+
targetPath,
|
|
280
|
+
baseDirectory: requestedBase,
|
|
281
|
+
path,
|
|
282
|
+
os,
|
|
283
|
+
normalizeDirectoryPath,
|
|
284
|
+
openchamberUserConfigRoot,
|
|
285
|
+
});
|
|
286
|
+
if (lexical.ok) {
|
|
287
|
+
return lexical;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
270
291
|
return resolveWorkspacePathFromWorktrees({
|
|
271
292
|
targetPath,
|
|
272
293
|
baseDirectory: resolvedProject.directory,
|
|
@@ -276,6 +297,79 @@ const resolveWorkspacePathFromContext = async ({ req, targetPath, resolveProject
|
|
|
276
297
|
});
|
|
277
298
|
};
|
|
278
299
|
|
|
300
|
+
// Nested repository discovery bounds: only shallow walks are useful for the
|
|
301
|
+
// Git tab's "pick a repository" picker, and deep/monorepo trees can explode
|
|
302
|
+
// otherwise. Directories deeper than maxDepth or beyond the visit cap are
|
|
303
|
+
// silently not searched.
|
|
304
|
+
const GIT_DIRS_MAX_DEPTH = 3;
|
|
305
|
+
const GIT_DIRS_MAX_DIRS = 100;
|
|
306
|
+
const GIT_DIRS_SKIP_LIST = new Set(['node_modules', 'dist', 'build', '.venv', 'target', '.next']);
|
|
307
|
+
|
|
308
|
+
// Walks rootPath and returns every nested git repository path (a directory
|
|
309
|
+
// containing a `.git` entry — a directory, a worktree pointer file, or a
|
|
310
|
+
// symlink). A repository boundary stops descent: nested repos inside repos
|
|
311
|
+
// are not reported. The root itself, when it is a repo, yields no results.
|
|
312
|
+
const findGitDirectories = async ({ rootPath, fsPromises, path: pathModule, maxDepth, maxDirs }) => {
|
|
313
|
+
const results = [];
|
|
314
|
+
let visited = 0;
|
|
315
|
+
|
|
316
|
+
const walk = async (dir, depth) => {
|
|
317
|
+
if (visited >= maxDirs) {
|
|
318
|
+
return;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
let dirents;
|
|
322
|
+
try {
|
|
323
|
+
dirents = await fsPromises.readdir(dir, { withFileTypes: true });
|
|
324
|
+
} catch (error) {
|
|
325
|
+
// Unreadable subtree — skip it unless it is the root itself, which the
|
|
326
|
+
// route maps to 403/404/500 through the shared error handling.
|
|
327
|
+
if (dir === rootPath) {
|
|
328
|
+
throw error;
|
|
329
|
+
}
|
|
330
|
+
return;
|
|
331
|
+
}
|
|
332
|
+
visited += 1;
|
|
333
|
+
|
|
334
|
+
let isRepoBoundary = false;
|
|
335
|
+
const subdirectories = [];
|
|
336
|
+
for (const dirent of dirents) {
|
|
337
|
+
if (dirent.name === '.git') {
|
|
338
|
+
isRepoBoundary = true;
|
|
339
|
+
continue;
|
|
340
|
+
}
|
|
341
|
+
if (!dirent.isDirectory() || dirent.isSymbolicLink()) {
|
|
342
|
+
continue;
|
|
343
|
+
}
|
|
344
|
+
if (GIT_DIRS_SKIP_LIST.has(dirent.name)) {
|
|
345
|
+
continue;
|
|
346
|
+
}
|
|
347
|
+
if (depth >= maxDepth) {
|
|
348
|
+
continue;
|
|
349
|
+
}
|
|
350
|
+
subdirectories.push(dirent.name);
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
if (isRepoBoundary) {
|
|
354
|
+
if (dir !== rootPath) {
|
|
355
|
+
results.push(dir);
|
|
356
|
+
}
|
|
357
|
+
return;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
subdirectories.sort();
|
|
361
|
+
for (const name of subdirectories) {
|
|
362
|
+
if (visited >= maxDirs) {
|
|
363
|
+
break;
|
|
364
|
+
}
|
|
365
|
+
await walk(pathModule.join(dir, name), depth + 1);
|
|
366
|
+
}
|
|
367
|
+
};
|
|
368
|
+
|
|
369
|
+
await walk(rootPath, 0);
|
|
370
|
+
return results;
|
|
371
|
+
};
|
|
372
|
+
|
|
279
373
|
const deriveCloneDirectoryName = (remoteUrl) => {
|
|
280
374
|
const remote = typeof remoteUrl === 'string' ? remoteUrl.trim() : '';
|
|
281
375
|
if (!remote) return '';
|
|
@@ -1578,4 +1672,60 @@ export const registerFsRoutes = (app, dependencies) => {
|
|
|
1578
1672
|
return res.status(500).json({ error: (error && error.message) || 'Failed to list directory' });
|
|
1579
1673
|
}
|
|
1580
1674
|
});
|
|
1675
|
+
|
|
1676
|
+
app.get('/api/fs/git-dirs', async (req, res) => {
|
|
1677
|
+
const rawPath = typeof req.query.path === 'string' && req.query.path.trim().length > 0
|
|
1678
|
+
? req.query.path.trim()
|
|
1679
|
+
: '';
|
|
1680
|
+
if (!rawPath) {
|
|
1681
|
+
return res.status(400).json({ error: 'Path is required' });
|
|
1682
|
+
}
|
|
1683
|
+
|
|
1684
|
+
try {
|
|
1685
|
+
const resolved = await resolveWorkspacePathFromContext({
|
|
1686
|
+
req,
|
|
1687
|
+
targetPath: rawPath,
|
|
1688
|
+
resolveProjectDirectory,
|
|
1689
|
+
path,
|
|
1690
|
+
os,
|
|
1691
|
+
normalizeDirectoryPath,
|
|
1692
|
+
openchamberUserConfigRoot,
|
|
1693
|
+
});
|
|
1694
|
+
if (!resolved.ok) {
|
|
1695
|
+
return res.status(400).json({ error: resolved.error });
|
|
1696
|
+
}
|
|
1697
|
+
|
|
1698
|
+
const stats = await fsPromises.stat(resolved.resolved);
|
|
1699
|
+
if (!stats.isDirectory()) {
|
|
1700
|
+
return res.status(400).json({ error: 'Specified path is not a directory', reason: 'not-directory' });
|
|
1701
|
+
}
|
|
1702
|
+
|
|
1703
|
+
const repositories = await findGitDirectories({
|
|
1704
|
+
rootPath: resolved.resolved,
|
|
1705
|
+
fsPromises,
|
|
1706
|
+
path,
|
|
1707
|
+
maxDepth: GIT_DIRS_MAX_DEPTH,
|
|
1708
|
+
maxDirs: GIT_DIRS_MAX_DIRS,
|
|
1709
|
+
});
|
|
1710
|
+
|
|
1711
|
+
return res.json({
|
|
1712
|
+
path: resolved.resolved,
|
|
1713
|
+
repositories: repositories.map((repoPath) => ({
|
|
1714
|
+
path: repoPath,
|
|
1715
|
+
name: path.basename(repoPath),
|
|
1716
|
+
})),
|
|
1717
|
+
});
|
|
1718
|
+
} catch (error) {
|
|
1719
|
+
const err = error;
|
|
1720
|
+
const code = err && typeof err === 'object' && 'code' in err ? err.code : undefined;
|
|
1721
|
+
if (code === 'ENOENT') {
|
|
1722
|
+
return res.status(404).json({ error: 'Directory not found', reason: 'not-found' });
|
|
1723
|
+
}
|
|
1724
|
+
if (isOsPermissionError(err)) {
|
|
1725
|
+
return sendOsPermissionDenied(res, 'Access to directory denied');
|
|
1726
|
+
}
|
|
1727
|
+
console.error('Failed to find git directories:', error);
|
|
1728
|
+
return res.status(500).json({ error: (error && error.message) || 'Failed to find git directories' });
|
|
1729
|
+
}
|
|
1730
|
+
});
|
|
1581
1731
|
};
|
|
@@ -165,7 +165,7 @@ const registerUpload = (fsPromises) => {
|
|
|
165
165
|
return getRoute('POST', '/api/fs/upload');
|
|
166
166
|
};
|
|
167
167
|
|
|
168
|
-
const registerRead = (fsPromises) => {
|
|
168
|
+
const registerRead = (fsPromises, resolveProjectDirectory = async () => ({ directory: '/repo' })) => {
|
|
169
169
|
const { app, getRoute } = createRouteRegistry();
|
|
170
170
|
registerFsRoutes(app, {
|
|
171
171
|
os: { homedir: () => '/home/user' },
|
|
@@ -177,7 +177,7 @@ const registerRead = (fsPromises) => {
|
|
|
177
177
|
spawn: vi.fn(),
|
|
178
178
|
crypto: { randomUUID: () => 'job-0' },
|
|
179
179
|
normalizeDirectoryPath: (p) => p,
|
|
180
|
-
resolveProjectDirectory
|
|
180
|
+
resolveProjectDirectory,
|
|
181
181
|
buildAugmentedPath: () => '/usr/bin',
|
|
182
182
|
resolveGitBinaryForSpawn: () => 'git',
|
|
183
183
|
openchamberUserConfigRoot: '/home/user/.config',
|
|
@@ -682,8 +682,94 @@ describe('fs read', () => {
|
|
|
682
682
|
expect(warn).toHaveBeenCalledWith(expect.stringContaining('Read retry exhausted for /repo/file.txt'));
|
|
683
683
|
warn.mockRestore();
|
|
684
684
|
});
|
|
685
|
-
});
|
|
686
685
|
|
|
686
|
+
it('reads files inside the workspace whose canonical path escapes through a symlinked directory', async () => {
|
|
687
|
+
// ~/test_folder -> /outside/shared: the requested path is lexically inside
|
|
688
|
+
// the workspace, the realpath is not. The read must follow the symlink
|
|
689
|
+
// instead of rejecting it as an outside path.
|
|
690
|
+
const fsPromises = {
|
|
691
|
+
realpath: vi.fn(async (targetPath) => {
|
|
692
|
+
if (targetPath === '/repo/link/file.txt') return '/outside/shared/file.txt';
|
|
693
|
+
return targetPath;
|
|
694
|
+
}),
|
|
695
|
+
stat: vi.fn(async () => ({ isFile: () => true, size: 5 })),
|
|
696
|
+
readFile: vi.fn(async () => 'hello'),
|
|
697
|
+
};
|
|
698
|
+
const handler = registerRead(fsPromises);
|
|
699
|
+
|
|
700
|
+
const res = await callRead(handler, { path: '/repo/link/file.txt' });
|
|
701
|
+
|
|
702
|
+
expect(res.statusCode).toBe(200);
|
|
703
|
+
expect(res.body).toBe('hello');
|
|
704
|
+
expect(fsPromises.readFile).toHaveBeenCalledWith('/outside/shared/file.txt', 'utf8');
|
|
705
|
+
});
|
|
706
|
+
|
|
707
|
+
it('rejects reads of canonical paths outside the workspace that no workspace symlink reaches', async () => {
|
|
708
|
+
const warn = vi.spyOn(console, 'warn').mockImplementation(() => {});
|
|
709
|
+
const fsPromises = {
|
|
710
|
+
stat: vi.fn(async () => ({ isFile: () => true, size: 6 })),
|
|
711
|
+
readFile: vi.fn(async () => 'secret'),
|
|
712
|
+
};
|
|
713
|
+
const handler = registerRead(fsPromises);
|
|
714
|
+
|
|
715
|
+
const res = await callRead(handler, { path: '/outside/shared/file.txt' });
|
|
716
|
+
|
|
717
|
+
expect(res.statusCode).toBe(400);
|
|
718
|
+
expect(res.body).toEqual({ error: 'Path is outside of active workspace' });
|
|
719
|
+
expect(fsPromises.readFile).not.toHaveBeenCalled();
|
|
720
|
+
warn.mockRestore();
|
|
721
|
+
});
|
|
722
|
+
|
|
723
|
+
it('reads files under a symlinked project root addressed via the client-sent lexical directory', async () => {
|
|
724
|
+
// /home/user/proj -> /real/proj: the validated base is canonical but the
|
|
725
|
+
// client (and the file tree) address files under the lexical root.
|
|
726
|
+
const warn = vi.spyOn(console, 'warn').mockImplementation(() => {});
|
|
727
|
+
const fsPromises = {
|
|
728
|
+
realpath: vi.fn(async (targetPath) => {
|
|
729
|
+
if (targetPath === '/home/user/proj') return '/real/proj';
|
|
730
|
+
if (targetPath === '/home/user/proj/file.txt') return '/real/proj/file.txt';
|
|
731
|
+
return targetPath;
|
|
732
|
+
}),
|
|
733
|
+
stat: vi.fn(async () => ({ isFile: () => true, size: 4 })),
|
|
734
|
+
readFile: vi.fn(async () => 'data'),
|
|
735
|
+
};
|
|
736
|
+
const handler = registerRead(fsPromises, async () => ({
|
|
737
|
+
directory: '/real/proj',
|
|
738
|
+
requestedDirectory: '/home/user/proj',
|
|
739
|
+
}));
|
|
740
|
+
const res = createMockResponse();
|
|
741
|
+
|
|
742
|
+
await handler({
|
|
743
|
+
query: { path: '/home/user/proj/file.txt' },
|
|
744
|
+
get: (name) => (name === 'x-opencode-directory' ? '/home/user/proj' : undefined),
|
|
745
|
+
}, res);
|
|
746
|
+
|
|
747
|
+
expect(res.statusCode).toBe(200);
|
|
748
|
+
expect(res.body).toBe('data');
|
|
749
|
+
expect(fsPromises.readFile).toHaveBeenCalledWith('/real/proj/file.txt', 'utf8');
|
|
750
|
+
warn.mockRestore();
|
|
751
|
+
});
|
|
752
|
+
|
|
753
|
+
it('rejects path traversal that escapes the workspace even when it passes through a symlinked directory', async () => {
|
|
754
|
+
const warn = vi.spyOn(console, 'warn').mockImplementation(() => {});
|
|
755
|
+
const fsPromises = {
|
|
756
|
+
realpath: vi.fn(async (targetPath) => {
|
|
757
|
+
if (targetPath === '/repo/link') return '/outside/shared';
|
|
758
|
+
return targetPath;
|
|
759
|
+
}),
|
|
760
|
+
stat: vi.fn(async () => ({ isFile: () => true, size: 6 })),
|
|
761
|
+
readFile: vi.fn(async () => 'secret'),
|
|
762
|
+
};
|
|
763
|
+
const handler = registerRead(fsPromises);
|
|
764
|
+
|
|
765
|
+
const res = await callRead(handler, { path: '/repo/sub/../../etc/passwd' });
|
|
766
|
+
|
|
767
|
+
expect(res.statusCode).toBe(400);
|
|
768
|
+
expect(res.body).toEqual({ error: 'Path is outside of active workspace' });
|
|
769
|
+
expect(fsPromises.readFile).not.toHaveBeenCalled();
|
|
770
|
+
warn.mockRestore();
|
|
771
|
+
});
|
|
772
|
+
});
|
|
687
773
|
describe('fs reveal', () => {
|
|
688
774
|
it.each([
|
|
689
775
|
['linux', 'xdg-open', ['/repo']],
|
|
@@ -1050,6 +1136,225 @@ describe('fs list symlink path space (issue 2627)', () => {
|
|
|
1050
1136
|
}
|
|
1051
1137
|
});
|
|
1052
1138
|
|
|
1139
|
+
describe('fs git-dirs', () => {
|
|
1140
|
+
const createDirent = (name, type) => ({
|
|
1141
|
+
name,
|
|
1142
|
+
isDirectory: () => type === 'dir',
|
|
1143
|
+
isFile: () => type === 'file',
|
|
1144
|
+
isSymbolicLink: () => type === 'symlink',
|
|
1145
|
+
});
|
|
1146
|
+
|
|
1147
|
+
// tree maps directory path -> [[name, type], ...]
|
|
1148
|
+
const registerGitDirs = (tree, { stat, readdir: readdirOverride } = {}) => {
|
|
1149
|
+
const { app, getRoute } = createRouteRegistry();
|
|
1150
|
+
const readdir = readdirOverride ?? vi.fn(async (dirPath) => (tree[dirPath] ?? []).map(([name, type]) => createDirent(name, type)));
|
|
1151
|
+
registerFsRoutes(app, {
|
|
1152
|
+
os: { homedir: () => '/home/user' },
|
|
1153
|
+
path: path.posix,
|
|
1154
|
+
fsPromises: {
|
|
1155
|
+
realpath: async (targetPath) => targetPath,
|
|
1156
|
+
stat: stat ?? vi.fn(async (targetPath) => ({ isDirectory: () => Boolean(tree[targetPath]) })),
|
|
1157
|
+
readdir,
|
|
1158
|
+
},
|
|
1159
|
+
spawn: vi.fn(),
|
|
1160
|
+
crypto: { randomUUID: () => 'job-0' },
|
|
1161
|
+
normalizeDirectoryPath: (p) => p,
|
|
1162
|
+
resolveProjectDirectory: async () => ({ directory: '/workspace' }),
|
|
1163
|
+
buildAugmentedPath: () => '/usr/bin',
|
|
1164
|
+
resolveGitBinaryForSpawn: () => 'git',
|
|
1165
|
+
openchamberUserConfigRoot: '/home/user/.config',
|
|
1166
|
+
});
|
|
1167
|
+
return { handler: getRoute('GET', '/api/fs/git-dirs'), readdir };
|
|
1168
|
+
};
|
|
1169
|
+
|
|
1170
|
+
const callGitDirs = async (handler, query) => {
|
|
1171
|
+
const res = createMockResponse();
|
|
1172
|
+
await handler({ query: query ?? {} }, res);
|
|
1173
|
+
return res;
|
|
1174
|
+
};
|
|
1175
|
+
|
|
1176
|
+
it('returns an empty list when the root itself is a repository', async () => {
|
|
1177
|
+
const { handler, readdir } = registerGitDirs({
|
|
1178
|
+
'/workspace': [['.git', 'dir'], ['proj-a', 'dir']],
|
|
1179
|
+
'/workspace/proj-a': [['.git', 'dir']],
|
|
1180
|
+
});
|
|
1181
|
+
|
|
1182
|
+
const res = await callGitDirs(handler, { path: '/workspace' });
|
|
1183
|
+
|
|
1184
|
+
expect(res.statusCode).toBe(200);
|
|
1185
|
+
expect(res.body).toEqual({ path: '/workspace', repositories: [] });
|
|
1186
|
+
expect(readdir).toHaveBeenCalledTimes(1);
|
|
1187
|
+
});
|
|
1188
|
+
|
|
1189
|
+
it('finds nested repositories with a .git directory', async () => {
|
|
1190
|
+
const { handler } = registerGitDirs({
|
|
1191
|
+
'/workspace': [['proj-a', 'dir'], ['proj-b', 'dir']],
|
|
1192
|
+
'/workspace/proj-a': [['.git', 'dir'], ['src', 'dir']],
|
|
1193
|
+
'/workspace/proj-a/src': [['index.ts', 'file']],
|
|
1194
|
+
'/workspace/proj-b': [['.git', 'dir']],
|
|
1195
|
+
});
|
|
1196
|
+
|
|
1197
|
+
const res = await callGitDirs(handler, { path: '/workspace' });
|
|
1198
|
+
|
|
1199
|
+
expect(res.statusCode).toBe(200);
|
|
1200
|
+
expect(res.body.repositories).toEqual([
|
|
1201
|
+
{ path: '/workspace/proj-a', name: 'proj-a' },
|
|
1202
|
+
{ path: '/workspace/proj-b', name: 'proj-b' },
|
|
1203
|
+
]);
|
|
1204
|
+
});
|
|
1205
|
+
|
|
1206
|
+
it('treats a .git file (linked worktree) as a repository boundary', async () => {
|
|
1207
|
+
const { handler } = registerGitDirs({
|
|
1208
|
+
'/workspace': [['worktree', 'dir']],
|
|
1209
|
+
'/workspace/worktree': [['.git', 'file']],
|
|
1210
|
+
});
|
|
1211
|
+
|
|
1212
|
+
const res = await callGitDirs(handler, { path: '/workspace' });
|
|
1213
|
+
|
|
1214
|
+
expect(res.statusCode).toBe(200);
|
|
1215
|
+
expect(res.body.repositories).toEqual([{ path: '/workspace/worktree', name: 'worktree' }]);
|
|
1216
|
+
});
|
|
1217
|
+
|
|
1218
|
+
it('stops descending at repository boundaries', async () => {
|
|
1219
|
+
const { handler, readdir } = registerGitDirs({
|
|
1220
|
+
'/workspace': [['outer', 'dir']],
|
|
1221
|
+
'/workspace/outer': [['.git', 'dir'], ['inner', 'dir']],
|
|
1222
|
+
'/workspace/outer/inner': [['.git', 'dir']],
|
|
1223
|
+
});
|
|
1224
|
+
|
|
1225
|
+
const res = await callGitDirs(handler, { path: '/workspace' });
|
|
1226
|
+
|
|
1227
|
+
expect(res.statusCode).toBe(200);
|
|
1228
|
+
expect(res.body.repositories).toEqual([{ path: '/workspace/outer', name: 'outer' }]);
|
|
1229
|
+
expect(readdir).not.toHaveBeenCalledWith('/workspace/outer/inner', { withFileTypes: true });
|
|
1230
|
+
});
|
|
1231
|
+
|
|
1232
|
+
it('does not descend past the depth cap', async () => {
|
|
1233
|
+
const { handler } = registerGitDirs({
|
|
1234
|
+
'/workspace': [['a', 'dir']],
|
|
1235
|
+
'/workspace/a': [['b', 'dir']],
|
|
1236
|
+
'/workspace/a/b': [['c', 'dir']],
|
|
1237
|
+
'/workspace/a/b/c': [['.git', 'dir'], ['d', 'dir']],
|
|
1238
|
+
'/workspace/a/b/c/d': [['.git', 'dir']],
|
|
1239
|
+
});
|
|
1240
|
+
|
|
1241
|
+
const res = await callGitDirs(handler, { path: '/workspace' });
|
|
1242
|
+
|
|
1243
|
+
expect(res.statusCode).toBe(200);
|
|
1244
|
+
expect(res.body.repositories).toEqual([{ path: '/workspace/a/b/c', name: 'c' }]);
|
|
1245
|
+
});
|
|
1246
|
+
|
|
1247
|
+
it('skips junk directories', async () => {
|
|
1248
|
+
const { handler, readdir } = registerGitDirs({
|
|
1249
|
+
'/workspace': [['node_modules', 'dir'], ['dist', 'dir'], ['real', 'dir']],
|
|
1250
|
+
'/workspace/node_modules': [['dep', 'dir']],
|
|
1251
|
+
'/workspace/node_modules/dep': [['.git', 'dir']],
|
|
1252
|
+
'/workspace/dist': [['.git', 'dir']],
|
|
1253
|
+
'/workspace/real': [['.git', 'dir']],
|
|
1254
|
+
});
|
|
1255
|
+
|
|
1256
|
+
const res = await callGitDirs(handler, { path: '/workspace' });
|
|
1257
|
+
|
|
1258
|
+
expect(res.statusCode).toBe(200);
|
|
1259
|
+
expect(res.body.repositories).toEqual([{ path: '/workspace/real', name: 'real' }]);
|
|
1260
|
+
expect(readdir).not.toHaveBeenCalledWith('/workspace/node_modules', { withFileTypes: true });
|
|
1261
|
+
});
|
|
1262
|
+
|
|
1263
|
+
it('never descends into symbolic links', async () => {
|
|
1264
|
+
const { handler } = registerGitDirs({
|
|
1265
|
+
'/workspace': [['link', 'symlink'], ['real', 'dir']],
|
|
1266
|
+
'/workspace/real': [['.git', 'dir']],
|
|
1267
|
+
});
|
|
1268
|
+
|
|
1269
|
+
const res = await callGitDirs(handler, { path: '/workspace' });
|
|
1270
|
+
|
|
1271
|
+
expect(res.statusCode).toBe(200);
|
|
1272
|
+
expect(res.body.repositories).toEqual([{ path: '/workspace/real', name: 'real' }]);
|
|
1273
|
+
});
|
|
1274
|
+
|
|
1275
|
+
it('returns repositories in deterministic order', async () => {
|
|
1276
|
+
const { handler } = registerGitDirs({
|
|
1277
|
+
'/workspace': [['zebra', 'dir'], ['alpha', 'dir']],
|
|
1278
|
+
'/workspace/zebra': [['.git', 'dir']],
|
|
1279
|
+
'/workspace/alpha': [['.git', 'dir']],
|
|
1280
|
+
});
|
|
1281
|
+
|
|
1282
|
+
const res = await callGitDirs(handler, { path: '/workspace' });
|
|
1283
|
+
|
|
1284
|
+
expect(res.body.repositories.map((repo) => repo.name)).toEqual(['alpha', 'zebra']);
|
|
1285
|
+
});
|
|
1286
|
+
|
|
1287
|
+
it('returns 400 when path is missing', async () => {
|
|
1288
|
+
const { handler } = registerGitDirs({});
|
|
1289
|
+
|
|
1290
|
+
const res = await callGitDirs(handler, {});
|
|
1291
|
+
|
|
1292
|
+
expect(res.statusCode).toBe(400);
|
|
1293
|
+
expect(res.body.error).toBe('Path is required');
|
|
1294
|
+
});
|
|
1295
|
+
|
|
1296
|
+
it('returns 400 when the path is not a directory', async () => {
|
|
1297
|
+
const { handler } = registerGitDirs({
|
|
1298
|
+
'/workspace': [['file.txt', 'file']],
|
|
1299
|
+
}, {
|
|
1300
|
+
stat: vi.fn(async (targetPath) => ({ isDirectory: () => targetPath !== '/workspace/file.txt' })),
|
|
1301
|
+
});
|
|
1302
|
+
|
|
1303
|
+
const res = await callGitDirs(handler, { path: '/workspace/file.txt' });
|
|
1304
|
+
|
|
1305
|
+
expect(res.statusCode).toBe(400);
|
|
1306
|
+
expect(res.body).toEqual({ error: 'Specified path is not a directory', reason: 'not-directory' });
|
|
1307
|
+
});
|
|
1308
|
+
|
|
1309
|
+
it('returns 404 when the directory does not exist', async () => {
|
|
1310
|
+
const error = Object.assign(new Error('missing'), { code: 'ENOENT' });
|
|
1311
|
+
const { handler } = registerGitDirs({}, {
|
|
1312
|
+
stat: vi.fn(async () => { throw error; }),
|
|
1313
|
+
});
|
|
1314
|
+
|
|
1315
|
+
const res = await callGitDirs(handler, { path: '/workspace/missing' });
|
|
1316
|
+
|
|
1317
|
+
expect(res.statusCode).toBe(404);
|
|
1318
|
+
expect(res.body).toEqual({ error: 'Directory not found', reason: 'not-found' });
|
|
1319
|
+
});
|
|
1320
|
+
|
|
1321
|
+
for (const code of ['EACCES', 'EPERM']) {
|
|
1322
|
+
it(`maps root ${code} to the os-permission contract`, async () => {
|
|
1323
|
+
const error = Object.assign(new Error('denied'), { code });
|
|
1324
|
+
const { handler } = registerGitDirs({}, {
|
|
1325
|
+
stat: vi.fn(async () => ({ isDirectory: () => true })),
|
|
1326
|
+
readdir: vi.fn(async () => { throw error; }),
|
|
1327
|
+
});
|
|
1328
|
+
|
|
1329
|
+
const res = await callGitDirs(handler, { path: '/workspace' });
|
|
1330
|
+
|
|
1331
|
+
expect(res.statusCode).toBe(403);
|
|
1332
|
+
expect(res.body).toEqual({ error: 'Access to directory denied', reason: 'os-permission' });
|
|
1333
|
+
});
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1336
|
+
it('skips unreadable subtrees without failing the scan', async () => {
|
|
1337
|
+
const tree = {
|
|
1338
|
+
'/workspace': [['blocked', 'dir'], ['open', 'dir']],
|
|
1339
|
+
'/workspace/open': [['.git', 'dir']],
|
|
1340
|
+
};
|
|
1341
|
+
const blockedError = Object.assign(new Error('denied'), { code: 'EACCES' });
|
|
1342
|
+
const { handler } = registerGitDirs(tree, {
|
|
1343
|
+
readdir: vi.fn(async (dirPath) => {
|
|
1344
|
+
if (dirPath === '/workspace/blocked') {
|
|
1345
|
+
throw blockedError;
|
|
1346
|
+
}
|
|
1347
|
+
return (tree[dirPath] ?? []).map(([name, type]) => createDirent(name, type));
|
|
1348
|
+
}),
|
|
1349
|
+
});
|
|
1350
|
+
|
|
1351
|
+
const res = await callGitDirs(handler, { path: '/workspace' });
|
|
1352
|
+
|
|
1353
|
+
expect(res.statusCode).toBe(200);
|
|
1354
|
+
expect(res.body.repositories).toEqual([{ path: '/workspace/open', name: 'open' }]);
|
|
1355
|
+
});
|
|
1356
|
+
});
|
|
1357
|
+
|
|
1053
1358
|
describe('fs stat directory scope (issue 3019)', () => {
|
|
1054
1359
|
// Wires the real project-directory runtime so the stat route resolves the
|
|
1055
1360
|
// workspace exactly as the server does: explicit x-opencode-directory header
|
|
@@ -40,7 +40,7 @@ The following functions are exported and used by the web server:
|
|
|
40
40
|
### Branch Operations
|
|
41
41
|
- `getBranches(directory)`: Get list of local and remote branches (filtered to active remote branches).
|
|
42
42
|
- `createBranch(directory, branchName, options)`: Create and checkout a new branch.
|
|
43
|
-
- `checkoutBranch(directory, branchName)`: Checkout an existing branch.
|
|
43
|
+
- `checkoutBranch(directory, branchName)`: Checkout an existing branch. A remote-tracking name (`origin/main`, or the `remotes/`-prefixed form) resolves to the local branch of that name, created with `--track` when it does not exist yet, because the branch selector offers remote branches as places to work rather than commits to inspect — a literal checkout of the remote ref would detach HEAD. A local branch whose own name looks like a remote ref wins over that resolution, and anything unresolvable is checked out as requested. The returned `branch` is the branch that was actually checked out, which callers should report instead of the requested name.
|
|
44
44
|
- `deleteBranch(directory, branch, options)`: Delete a branch (supports force flag).
|
|
45
45
|
- `renameBranch(directory, oldName, newName)`: Rename a branch and preserve upstream tracking.
|
|
46
46
|
- `getRemotes(directory)`: Get list of configured remotes.
|
|
@@ -121,9 +121,10 @@ The following functions are internal helpers used by exported functions:
|
|
|
121
121
|
- `rebaseInProgress`: Object with `{ headName, onto }` if rebase in progress.
|
|
122
122
|
|
|
123
123
|
### Branches Response
|
|
124
|
-
- `all`: Local branches plus remote-tracking branches that
|
|
124
|
+
- `all`: Local branches plus every branch each reachable remote reports via `ls-remote --heads`, formatted as `remotes/<remote>/<branch>`. This is a union: local remote-tracking refs deleted on the remote are pruned, and branches that exist on the remote without a local tracking ref (never fetched) are still included, so a freshly pushed branch appears without requiring a fetch. A remote that fails to answer keeps its locally known branches in the list: "we could not ask" must not be reported as "these branches are gone", because callers use this list to decide whether a base branch exists at all.
|
|
125
125
|
- `current`: Current branch name.
|
|
126
|
-
- `branches`: Per-branch detail keyed by branch name, as reported by `git branch`.
|
|
126
|
+
- `branches`: Per-branch detail keyed by branch name, as reported by `git branch`. Remote-only entries in `all` — branches `ls-remote` reported that were never fetched — have **no** entry here, because `git branch` never saw them. Consumers must treat a missing detail entry as normal and read the name from `all`.
|
|
127
|
+
- Never-fetched remote-only branches also have no local ref, so any operation that resolves one locally has to account for that: `checkoutBranch` fetches the single branch (`git fetch <remote> <branch>`) before creating the tracking branch, and the range helpers (`getRangeDiff`, `getRangeFiles`) reject an unresolvable ref with `Ref "<ref>" is not available locally. Fetch it before comparing.` instead of surfacing git's "ambiguous argument".
|
|
127
128
|
- `defaultBranches`: Each remote's default branch, keyed by remote name. Read from the local `remotes/<name>/HEAD` symbolic ref; for a remote that has none — clone writes it, a hand-added remote may not — the remote itself is asked once with `ls-remote --symref`. A remote that answers neither is absent rather than guessed, and consumers fall back to conventional branch names. Omitted entirely by runtimes that do not provide this Git metadata.
|
|
128
129
|
|
|
129
130
|
### Runtime availability of range diffs
|