localAgentHostMetadata.ts ×4

Frontier kind: Joint frontier

unlabeled · c_31a0967ec380

1 test · 4308 LOC · 23 files · introduces 1 test · 19 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
6 ranges19 lines · 2 files
Tests
1 test

Contains — complete concept membership

All code (extent)
603 ranges4308 lines · 23 files · Browse complete extent
All tests (intent)
1 testBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Introduced files, introduced tests, and structurally relevant concept specializationlocalAgentHostMetadata.ts ×6 · 34 introduced LOClocalAgentHostMetadata.t…localAgentHostMetadata.test|title=Local Agent Host Endpoint Metadata writes owner-only socket directory permissions|occurrence=1, localAgentHostMetadata.test|title=Local Agent Host Endpoint Metadata uses a bounded path under the system temporary directory|occurrence=1 · 0 introduced LOClocalAgentHostMetadata.t…localAgentHostMetadata.ts ×14 · 103 introduced LOClocalAgentHostMetadata.t…validation.ts ×2 · 10 introduced LOCvalidation.ts ×2validation.ts ×2 · 2 introduced LOCvalidation.ts ×2validation.ts ×1 · 2 introduced LOCvalidation.ts ×1validation.ts ×5 · 22 introduced LOCvalidation.ts ×5validation.ts ×4 · 8 introduced LOCvalidation.ts ×4validation.ts ×2 · 4 introduced LOCvalidation.ts ×2validation.ts ×43 · 180 introduced LOCvalidation.ts ×43path.ts ×2 · 5 introduced LOCpath.ts ×2path.ts ×5 · 16 introduced LOCpath.ts ×5registry.ts ×4 · 195 introduced LOCregistry.ts ×4actions.ts ×1 · 16 introduced LOCactions.ts ×1actions.ts ×1 · 238 introduced LOCactions.ts ×1uri.test|title=URI URI#file, win-speciale|occurrence=1, charCode.test|title=CharCode has good values|occurrence=1, +2 · 0 introduced LOCuri.test|title=URI URI#f…utils.ts ×3 · 9 introduced LOCutils.ts ×3path.ts ×3 · 5 introduced LOCpath.ts ×3path.ts ×3 · 15 introduced LOCpath.ts ×3path.ts ×1 · 2 introduced LOCpath.ts ×1path.ts ×3 · 10 introduced LOCpath.ts ×3path.ts ×3 · 14 introduced LOCpath.ts ×3lifecycle.ts ×2 · 4 introduced LOClifecycle.ts ×2path.ts ×1 · 1 introduced LOCpath.ts ×1lifecycle.ts ×1 · 2 introduced LOClifecycle.ts ×1path.ts ×6 · 24 introduced LOCpath.ts ×6lifecycle.ts ×4 · 8 introduced LOClifecycle.ts ×4lifecycle.ts ×6 · 16 introduced LOClifecycle.ts ×6lifecycle.ts ×1 · 2 introduced LOClifecycle.ts ×1lifecycle.ts ×1 · 2 introduced LOClifecycle.ts ×1path.ts ×2 · 3 introduced LOCpath.ts ×2lifecycle.ts ×1 · 3 introduced LOClifecycle.ts ×1map.ts ×97 · 3334 introduced LOCmap.ts ×97src/vs/base/common/arrays.ts · 949 LOCcommon/arrays.tssrc/vs/base/common/arraysFind.ts · 226 LOCcommon/arraysFind.tssrc/vs/base/common/assert.ts · 91 LOCcommon/assert.tssrc/vs/base/common/charCode.ts · 450 LOCcommon/charCode.tssrc/vs/base/common/collections.ts · 176 LOCcommon/collections.tssrc/vs/base/common/errors.ts · 357 LOCcommon/errors.tssrc/vs/base/common/functional.ts · 32 LOCcommon/functional.tssrc/vs/base/common/iterator.ts · 194 LOCcommon/iterator.tssrc/vs/base/common/lifecycle.ts · 974 LOCcommon/lifecycle.tssrc/vs/base/common/map.ts · 1016 LOCcommon/map.tssrc/vs/base/common/marshallingIds.ts · 33 LOCcommon/marshallingIds.tssrc/vs/base/common/path.ts · 1589 LOCcommon/path.tssrc/vs/base/common/platform.ts · 281 LOCcommon/platform.tssrc/vs/base/common/process.ts · 76 LOCcommon/process.tssrc/vs/base/common/types.ts · 410 LOCcommon/types.tssrc/vs/base/common/uri.ts · 754 LOCcommon/uri.tssrc/vs/base/common/validation.ts · 396 LOCcommon/validation.tssrc/vs/base/test/common/utils.ts · 107 LOCcommon/utils.tssrc/vs/nls.ts · 244 LOCvs/nls.tssrc/vs/platform/agentHost/common/state/protocol/actions.ts · 16 LOCprotocol/actions.tssrc/vs/platform/agentHost/common/state/protocol/common/actions.ts · 238 LOCcommon/actions.tssrc/vs/platform/agentHost/common/state/protocol/version/registry.ts · 210 LOCversion/registry.tssrc/vs/platform/agentHost/node/localAgentHostMetadata.ts · 199 LOCnode/localAgentHostMetad…charCode.test|title=CharCode has good values|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/charCode.test|title=CharCode has good values|occurrence=1charCode.test|title=Char…path.test|title=Paths (Node Implementation) path|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/path.test|title=Paths (Node Implementation) path|occurrence=1path.test|title=Paths (N…uri.test|title=URI File paths containing apostrophes break URI parsing and cannot be opened #276075|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/uri.test|title=URI File paths containing apostrophes break URI parsing and cannot be opened #276075|occurrence=1uri.test|title=URI File …uri.test|title=URI URI#file, win-speciale|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/uri.test|title=URI URI#file, win-speciale|occurrence=1uri.test|title=URI URI#f…localAgentHostMetadata.test|title=Local Agent Host Endpoint Metadata atomically replaces and owner-checks metadata|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/localAgentHostMetadata.test|title=Local Agent Host Endpoint Metadata atomically replaces and owner-checks metadata|occurrence=1localAgentHostMetadata.t…localAgentHostMetadata.test|title=Local Agent Host Endpoint Metadata creates scoped endpoint metadata|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/localAgentHostMetadata.test|title=Local Agent Host Endpoint Metadata creates scoped endpoint metadata|occurrence=1localAgentHostMetadata.t…localAgentHostMetadata.test|title=Local Agent Host Endpoint Metadata uses a bounded path under the system temporary directory|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/localAgentHostMetadata.test|title=Local Agent Host Endpoint Metadata uses a bounded path under the system temporary directory|occurrence=1localAgentHostMetadata.t…localAgentHostMetadata.test|title=Local Agent Host Endpoint Metadata writes owner-only metadata permissions|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/localAgentHostMetadata.test|title=Local Agent Host Endpoint Metadata writes owner-only metadata permissions|occurrence=1localAgentHostMetadata.t…localAgentHostMetadata.test|title=Local Agent Host Endpoint Metadata writes owner-only socket directory permissions|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/localAgentHostMetadata.test|title=Local Agent Host Endpoint Metadata writes owner-only socket directory permissions|occurrence=1localAgentHostMetadata.t…Focused concept · localAgentHostMetadata.ts ×4 · 19 introduced LOClocalAgentHostMetadata.t…

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

1 test introduced at this concept.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

2 files ranked by introduced lines: 19 introduced LOC across 6 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/agentHost/node/localAgentHostMetadata.ts 15 introduced LOC · 4 ranges

Open complete file

104
105 export function cleanupLocalAgentHostEndpointMetadataSync(userDataPath: string, owner: ILocalAgentHostEndpointMetadata): void {
106 > const metadataPath = getMetadataPath(userDataPath); localAgentHostMetadata.ts
107 > const entries = readMetadata(metadataPath);
108 > const remaining = entries.filter(entry => entry.pid !== owner.pid || entry.instanceId !== owner.instanceId || entry.type !== owner.type);
109 > if (remaining.length === entries.length) {
110 > return;
111 > }
112 > if (remaining.length === 0) {
113 > fs.rmSync(metadataPath, { force: true });
114 > } else {
115 fs.writeFileSync(metadataPath, JSON.stringify(remaining), { encoding: 'utf8', mode: 0o600 });
116 }
118
119 export function cleanupLocalAgentHostEndpointSocketSync(endpointPath: string): void {
151 return [];
152 }
153 > const result = metadataValidator.validate(JSON.parse(fs.readFileSync(path, 'utf8'))); localAgentHostMetadata.ts
154 > if (result.error) {
155 return [];
156 }
157 > return result.content localAgentHostMetadata.ts
158 > .filter(entry => entry.schemaVersion === metadataSchemaVersion)
159 > .map(entry => ({ ...entry, schemaVersion: metadataSchemaVersion }));
160 } catch (error) {
161 if (isNotFound(error) || error instanceof SyntaxError) {
src/vs/base/common/validation.ts 4 introduced LOC · 2 ranges

Open complete file

339
340 validate(content: unknown): { content: T; error: undefined } | { content: undefined; error: ValidationError } {
341 > if (content !== this.value) { validation.ts
342 return { content: undefined, error: { message: `Expected: ${this.value}` } };
343 }
345 > return { content: content as T, error: undefined };
346 > }
347
348 getJSONSchema(): IJSONSchema {