diff --git a/.github/workflows/auto-typescript-tests.yml b/.github/workflows/auto-typescript-tests.yml new file mode 100644 index 000000000..ed29b9b42 --- /dev/null +++ b/.github/workflows/auto-typescript-tests.yml @@ -0,0 +1,46 @@ +name: Zero-code agent (@traceai/auto) tests + +# The registry test reads every typescript/packages/traceai_* manifest, and the +# integration tests load the built instrumentors, so the whole workspace is built. +on: + pull_request: + branches: [dev, main] + paths: + - 'typescript/packages/traceai_auto/**' + - 'typescript/packages/fi-core/**' + - 'typescript/packages/fi-semantic-conventions/**' + - 'typescript/packages/traceai_*/package.json' + - 'spec/auto-instrumentation/**' + - 'typescript/pnpm-lock.yaml' + - 'typescript/package.json' + - 'typescript/tsconfig*' + - '.github/workflows/auto-typescript-tests.yml' + push: + branches: [dev] + workflow_dispatch: + +permissions: + contents: read + +jobs: + auto: + name: '@traceai/auto suite' + runs-on: ubuntu-24.04 + timeout-minutes: 45 + defaults: + run: + working-directory: typescript + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + persist-credentials: false + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 + with: + node-version: '22' + - run: corepack enable + - name: Install the workspace + run: pnpm install --frozen-lockfile --ignore-scripts + - name: Build every package in dependency order + run: pnpm run build:ordered + - name: Run the @traceai/auto suite + run: pnpm --filter @traceai/auto test diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 8599c304f..365b297e3 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -70,7 +70,7 @@ "python/frameworks/weaviate": "0.1.2", "python/frameworks/xai": "0.1.1", "python/traceai": "0.1.0", - "typescript/packages/fi-core": "1.2.0", + "typescript/packages/fi-core": "1.2.1", "typescript/packages/fi-semantic-conventions": "1.1.0", "typescript/packages/traceai_anthropic": "0.1.5", "typescript/packages/traceai_auto": "0.1.0", diff --git a/typescript/packages/fi-core/CHANGELOG.md b/typescript/packages/fi-core/CHANGELOG.md index 03c449609..8ab205788 100644 --- a/typescript/packages/fi-core/CHANGELOG.md +++ b/typescript/packages/fi-core/CHANGELOG.md @@ -1,3 +1,8 @@ +## [1.2.1] - pending release +### Fix +- **Spans no longer carry the process command line or the OS user.** 1.2.0 added OpenTelemetry's full process detector to every provider resource, so `process.command_args`, `process.command`, `process.owner`, `process.executable.path` and `process.pid` were exported with every span. Command-line flags can hold secrets. By default fi-core now detects only `process.runtime.name`, `process.runtime.version` and `process.runtime.description`, as it detected nothing before 1.2.0. +- To opt in, set the OpenTelemetry Node variable `OTEL_NODE_RESOURCE_DETECTORS` to a comma-separated list of `host`, `os` and `process`, or `all` / `none`. `OTEL_SERVICE_NAME` and `OTEL_RESOURCE_ATTRIBUTES` are always applied. + ## [1.2.0] - pending release ### Changed - 1.2.0 exports the typed session.id set with setSession; other session-named attributes remain masked. diff --git a/typescript/packages/fi-core/README.md b/typescript/packages/fi-core/README.md index 4d54771d3..c9abcebdd 100644 --- a/typescript/packages/fi-core/README.md +++ b/typescript/packages/fi-core/README.md @@ -487,6 +487,13 @@ Other provider structures have no new exception without catalog/source evidence. resource identity, `OTEL_SERVICE_NAME`, `OTEL_RESOURCE_ATTRIBUTES` and an optional application `resource` are preserved. +Resource detection is minimal by default: the provider adds the Node.js runtime +name and version (`process.runtime.*`) and nothing that identifies the machine, +the OS user or the command line (which can hold secrets passed as flags). To add +OpenTelemetry's host, OS or full process attributes, set +`OTEL_NODE_RESOURCE_DETECTORS` to a comma-separated list of `host`, `os` and +`process`, or to `all`; `none` turns detection off. + `FITracer` applies the shared privacy policy before SDK attribute-value truncation. Its library spans use the same deterministic count-limit projection as wire spans (spec A7), including late output/usage updates. Protected attributes are reserved diff --git a/typescript/packages/fi-core/package.json b/typescript/packages/fi-core/package.json index 0dba30c41..a18f3482f 100644 --- a/typescript/packages/fi-core/package.json +++ b/typescript/packages/fi-core/package.json @@ -1,6 +1,6 @@ { "name": "@traceai/fi-core", - "version": "1.2.0", + "version": "1.2.1", "description": "OpenTelemetry tracing for AI applications: tracer setup, span helpers, and exporters for Future AGI.", "main": "./dist/src/index.js", "module": "./dist/esm/index.js", diff --git a/typescript/packages/fi-core/scripts/postbuild.cjs b/typescript/packages/fi-core/scripts/postbuild.cjs index 945a9dc61..146c4e624 100644 --- a/typescript/packages/fi-core/scripts/postbuild.cjs +++ b/typescript/packages/fi-core/scripts/postbuild.cjs @@ -1,4 +1,6 @@ const fs = require('node:fs'); +// tsc does not emit privacy.json (it is not in any tsconfig include), so these byte-exact copies are +// the only ones: a consumer's `tsc --build` reference to fi-core cannot reserialize them. for (const dir of ['dist/src', 'dist/esm', 'dist/esnext']) { fs.copyFileSync('src/privacy.json', `${dir}/privacy.json`); } diff --git a/typescript/packages/fi-core/src/__tests__/resourceDetection.test.ts b/typescript/packages/fi-core/src/__tests__/resourceDetection.test.ts new file mode 100644 index 000000000..06c271985 --- /dev/null +++ b/typescript/packages/fi-core/src/__tests__/resourceDetection.test.ts @@ -0,0 +1,86 @@ +import { describe, it, expect, jest, beforeEach, afterEach } from '@jest/globals'; +import { userInfo } from 'node:os'; +import { FITracerProvider } from '../otel'; + +jest.mock('@opentelemetry/exporter-trace-otlp-http', () => ({ + OTLPTraceExporter: jest.fn().mockImplementation(() => ({ + export: jest.fn((_spans: any, callback: any) => callback({ code: 0 })), + shutdown: jest.fn(() => Promise.resolve()), + forceFlush: jest.fn(() => Promise.resolve()), + })), +})); + +// A secret passed on the command line, as `node app.js --api-key=...` would. +const SECRET_FLAG = '--api-key=sk-test-0000000000000000'; + +// The resource every exported span carries. +function exportedResourceAttributes(): Record { + const provider = new FITracerProvider(); + const span = provider.getTracer('resource-detection-test').startSpan('probe') as any; + span.end(); + return { ...span.resource.attributes }; +} + +describe('FITracerProvider resource detection', () => { + const originalEnv = process.env; + const originalArgv = process.argv; + + beforeEach(() => { + process.env = { ...originalEnv }; + delete process.env.OTEL_NODE_RESOURCE_DETECTORS; + process.argv = [...originalArgv, SECRET_FLAG]; + }); + + afterEach(() => { + process.env = originalEnv; + process.argv = originalArgv; + }); + + it('exports no command line, OS user, executable path or host by default', () => { + const attributes = exportedResourceAttributes(); + for (const key of ['process.command', 'process.command_args', 'process.owner', 'process.executable.path', 'process.executable.name', 'process.pid', 'host.name', 'host.id', 'os.type']) { + expect(attributes).not.toHaveProperty([key]); + } + // service.name keeps OpenTelemetry's own default, unknown_service:, so the + // executable path is checked by key above rather than by value. + const serialized = JSON.stringify(attributes); + expect(serialized).not.toContain('sk-test-0000000000000000'); + expect(serialized).not.toContain(JSON.stringify(userInfo().username)); + }); + + it('keeps the runtime name and version by default', () => { + const attributes = exportedResourceAttributes(); + expect(attributes['process.runtime.name']).toBe('nodejs'); + expect(attributes['process.runtime.version']).toBe(process.versions.node); + }); + + it('keeps OTEL_SERVICE_NAME and OTEL_RESOURCE_ATTRIBUTES', () => { + process.env.OTEL_SERVICE_NAME = 'checkout'; + process.env.OTEL_RESOURCE_ATTRIBUTES = 'deployment.environment.name=staging'; + const attributes = exportedResourceAttributes(); + expect(attributes['service.name']).toBe('checkout'); + expect(attributes['deployment.environment.name']).toBe('staging'); + }); + + it('adds full process detection only when OTEL_NODE_RESOURCE_DETECTORS asks for it', () => { + process.env.OTEL_NODE_RESOURCE_DETECTORS = 'env,process'; + const attributes = exportedResourceAttributes(); + expect(attributes['process.command_args']).toEqual(expect.arrayContaining([SECRET_FLAG])); + expect(attributes['process.pid']).toBe(process.pid); + expect(attributes).not.toHaveProperty(['host.name']); + }); + + it('treats all as host, os and process, and none as no detection', () => { + process.env.OTEL_NODE_RESOURCE_DETECTORS = 'all'; + const all = exportedResourceAttributes(); + expect(all).toHaveProperty(['host.name']); + expect(all).toHaveProperty(['os.type']); + expect(all).toHaveProperty(['process.pid']); + + process.env.OTEL_NODE_RESOURCE_DETECTORS = 'none'; + process.env.OTEL_SERVICE_NAME = 'checkout'; + const none = exportedResourceAttributes(); + expect(Object.keys(none).filter((key) => /^(process|host|os)\./.test(key))).toEqual([]); + expect(none['service.name']).toBe('checkout'); + }); +}); diff --git a/typescript/packages/fi-core/src/otel.ts b/typescript/packages/fi-core/src/otel.ts index 4c010e38b..4ced29544 100644 --- a/typescript/packages/fi-core/src/otel.ts +++ b/typescript/packages/fi-core/src/otel.ts @@ -25,7 +25,7 @@ import { SimpleSpanProcessor as OTelSimpleSpanProcessor, IdGenerator, } from "@opentelemetry/sdk-trace-node"; -import { Resource, resourceFromAttributes, detectResources, defaultResource, envDetector, processDetector } from "@opentelemetry/resources"; +import { Resource, ResourceDetector, resourceFromAttributes, detectResources, defaultResource, envDetector, hostDetector, osDetector, processDetector } from "@opentelemetry/resources"; import { privacyFilter, PrivacyOptions } from "./export-privacy"; import { credentialSecrets } from "./privacy-runtime"; import { seedSecrets } from "./secrets"; @@ -67,9 +67,26 @@ export function withExportPrivacy(exporter: SpanExporter, options: ExportPrivacy privacyDestinations.add(guarded); return guarded; } +// The full process detector exports the command line (which can hold secrets passed as +// flags), the OS user name and the executable path. By default only the runtime is kept. +const runtimeDetector: ResourceDetector = { + detect(config) { + const attributes = processDetector.detect(config).attributes ?? {}; + return { attributes: Object.fromEntries(Object.entries(attributes).filter(([key]) => key.startsWith("process.runtime."))) }; + }, +}; +const OPT_IN_DETECTORS: Record = { host: hostDetector, os: osDetector, process: processDetector }; +// OTEL_NODE_RESOURCE_DETECTORS (the OpenTelemetry Node variable) opts in to host, os and +// process detection. OTEL_SERVICE_NAME and OTEL_RESOURCE_ATTRIBUTES are always applied. +function resourceDetectors(): ResourceDetector[] { + const names = (process.env.OTEL_NODE_RESOURCE_DETECTORS ?? "").split(",").map((name) => name.trim().toLowerCase()).filter(Boolean); + if (!names.length) return [envDetector, runtimeDetector]; + const chosen = names.includes("none") ? [] : names.includes("all") ? Object.keys(OPT_IN_DETECTORS) : names; + return [envDetector, ...chosen.flatMap((name) => OPT_IN_DETECTORS[name] ?? [])]; +} function applicationResource(resource?: Resource): Resource { const application = resource && typeof (resource as any).getRawAttributes === "function" ? resource : resourceFromAttributes(resource?.attributes ?? {}); - return defaultResource().merge(detectResources({ detectors: [envDetector, processDetector] })).merge(application); + return defaultResource().merge(detectResources({ detectors: resourceDetectors() })).merge(application); } import { v4 as uuidv4 } from "uuid"; // For UUID generation diff --git a/typescript/packages/fi-core/tsconfig.esm.json b/typescript/packages/fi-core/tsconfig.esm.json index 215220afa..1a5d8d352 100644 --- a/typescript/packages/fi-core/tsconfig.esm.json +++ b/typescript/packages/fi-core/tsconfig.esm.json @@ -8,8 +8,7 @@ "resolveJsonModule": true }, "include": [ - "src/**/*.ts", - "src/**/*.json" + "src/**/*.ts" ], "references": [], "exclude": [ diff --git a/typescript/packages/fi-core/tsconfig.esnext.json b/typescript/packages/fi-core/tsconfig.esnext.json index d8370f7a7..34e3a4d04 100644 --- a/typescript/packages/fi-core/tsconfig.esnext.json +++ b/typescript/packages/fi-core/tsconfig.esnext.json @@ -8,8 +8,7 @@ "resolveJsonModule": true }, "include": [ - "src/**/*.ts", - "src/**/*.json" + "src/**/*.ts" ], "references": [], "exclude": [ diff --git a/typescript/packages/fi-core/tsconfig.json b/typescript/packages/fi-core/tsconfig.json index cbc7b5c99..2fa2eed00 100644 --- a/typescript/packages/fi-core/tsconfig.json +++ b/typescript/packages/fi-core/tsconfig.json @@ -8,7 +8,7 @@ "baseUrl": "./src", "resolveJsonModule": true }, - "include": ["src/**/*.ts", "src/**/*.json", "test/**/*.ts"], + "include": ["src/**/*.ts", "test/**/*.ts"], "exclude": ["src/**/*.test.ts", "src/**/__tests__/**", "test/**/*.ts"], "references": [] } \ No newline at end of file diff --git a/typescript/packages/traceai_antigravity_plugin/package.json b/typescript/packages/traceai_antigravity_plugin/package.json index 3686dfd41..4170035b6 100644 --- a/typescript/packages/traceai_antigravity_plugin/package.json +++ b/typescript/packages/traceai_antigravity_plugin/package.json @@ -6,7 +6,7 @@ "types": "./dist/index.d.ts", "exports": { ".": { "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, "files": ["dist", "plugin", "LICENSE"], - "scripts": {"build": "tsc -p tsconfig.json && node build.cjs", "test": "node --test test/*.test.cjs"}, + "scripts": {"prepare": "pnpm run build", "build": "tsc -p tsconfig.json && node build.cjs", "test": "node --test test/*.test.cjs"}, "dependencies": {"@traceai/agent-core": "workspace:^", "proper-lockfile": "4.1.2"}, "devDependencies": {"@types/node": "^22.15.29", "typescript": "^5.8.3", "esbuild": "0.25.5"}, "engines": {"node": ">=22.16.0"}, diff --git a/typescript/packages/traceai_auto/test/config.test.ts b/typescript/packages/traceai_auto/test/config.test.ts index 016def1c4..22ebea08d 100644 --- a/typescript/packages/traceai_auto/test/config.test.ts +++ b/typescript/packages/traceai_auto/test/config.test.ts @@ -93,7 +93,13 @@ test.each(["api_key", "secret_key"])("S7 ignored %s from every config/profile so }); test("registry covers every instrumentation package and records exported class and targets", () => { const packages = resolve(__dirname, "../.."); - const paths = readdirSync(packages).filter(p => p.startsWith("traceai_") && p !== "traceai_auto"); + // Coding-agent tracers (@traceai/agent-core and the hook plugins built on it) are set up + // with `npx @traceai/agents`, not loaded by the zero-code agent, so they are not listed here. + const codingAgent = (path: string) => { + const manifest = JSON.parse(readFileSync(join(packages, path, "package.json"), "utf8")); + return manifest.name === "@traceai/agent-core" || "@traceai/agent-core" in (manifest.dependencies ?? {}); + }; + const paths = readdirSync(packages).filter(p => p.startsWith("traceai_") && p !== "traceai_auto" && !codingAgent(p)); expect(integrations).toHaveLength(paths.length); for (const path of paths) { const manifest = JSON.parse(readFileSync(join(packages, path, "package.json"), "utf8")); diff --git a/typescript/packages/traceai_auto/test/safety.test.ts b/typescript/packages/traceai_auto/test/safety.test.ts index 4204e3890..c93595646 100644 --- a/typescript/packages/traceai_auto/test/safety.test.ts +++ b/typescript/packages/traceai_auto/test/safety.test.ts @@ -63,7 +63,7 @@ test("consumer cancellation is OK with partial output and incomplete marker", as expect(spans[0].attributes["error.type"]).toBeUndefined(); }); test.each([["gzip", gzipSync], ["deflate", deflateSync]] as const)("encoded %s responses decode before parsing but retain application bytes", async (encoding, compress) => { - const bytes = compress(partial); globalThis.fetch = jest.fn(async () => new Response(bytes, { headers: { "content-type": "text/event-stream", "content-encoding": encoding } })); const h = hook(); + const bytes = compress(partial); globalThis.fetch = jest.fn(async () => new Response(new Uint8Array(bytes), { headers: { "content-type": "text/event-stream", "content-encoding": encoding } })); const h = hook(); expect(Buffer.from(await (await fetch(url, init)).arrayBuffer())).toEqual(bytes); await Promise.all([...h.pending]); expect(spans[0].attributes["output.value"]).toBe("partial"); expect(spans[0].attributes["traceai.wire.undecoded_encoding"]).toBeUndefined(); }); @@ -93,7 +93,7 @@ test("native fetch response metadata prevents re-decoding plain-text transcripti }); test("decompressed output is bounded independently of compressed size", async () => { const bytes = gzipSync('data: {"choices":[{"delta":{"content":"' + "x".repeat(10000) + '"}}]}\n\n'); - globalThis.fetch = jest.fn(async () => new Response(bytes, { headers: { "content-type": "text/event-stream", "content-encoding": "gzip" } })); const h = hook(512); + globalThis.fetch = jest.fn(async () => new Response(new Uint8Array(bytes), { headers: { "content-type": "text/event-stream", "content-encoding": "gzip" } })); const h = hook(512); await (await fetch(url, init)).arrayBuffer(); await Promise.all([...h.pending]); expect(spans[0].attributes["traceai.wire.truncated"]).toBe(true); expect(spans[0].attributes["output.value"]).toBeUndefined(); }); @@ -164,7 +164,7 @@ test("cloning a mutable custom Response preserves metadata and independent heade }); test.each([["gzip", gzipSync], ["deflate", deflateSync], ["br", brotliCompressSync]] as const)("%s ElevenLabs JSON audio decodes before base64 counting", async (encoding, compress) => { const text = JSON.stringify({ audio_base64: Buffer.alloc(128).toString("base64") }), bytes = compress(text); - globalThis.fetch = jest.fn(async () => new Response(bytes, { headers: { "content-type": "application/json", "content-encoding": encoding } })); const h = hook(); + globalThis.fetch = jest.fn(async () => new Response(new Uint8Array(bytes), { headers: { "content-type": "application/json", "content-encoding": encoding } })); const h = hook(); const target = "https://api.elevenlabs.io/v1/text-to-speech/voice/with-timestamps"; expect(Buffer.from(await (await fetch(target, { ...init, body: '{"text":"hello","model_id":"tts"}' })).arrayBuffer())).toEqual(bytes); await Promise.all([...h.pending]); expect(spans).toHaveLength(1); diff --git a/typescript/packages/traceai_claude_code/package.json b/typescript/packages/traceai_claude_code/package.json index be867b6e4..cc1d21d94 100644 --- a/typescript/packages/traceai_claude_code/package.json +++ b/typescript/packages/traceai_claude_code/package.json @@ -16,6 +16,7 @@ "README.md" ], "scripts": { + "prepare": "pnpm run build", "build": "tsc -p tsconfig.json && esbuild src/hook.ts --bundle --platform=node --format=cjs --main-fields=module,main --outfile=dist/hook.cjs", "test": "node --test test/*.test.cjs", "test:binary": "node test/binary.cjs" diff --git a/typescript/packages/traceai_codex_plugin/package.json b/typescript/packages/traceai_codex_plugin/package.json index a72f20f64..5bd6099e1 100644 --- a/typescript/packages/traceai_codex_plugin/package.json +++ b/typescript/packages/traceai_codex_plugin/package.json @@ -16,6 +16,7 @@ "LICENSE" ], "scripts": { + "prepare": "pnpm run build", "build": "tsc -p tsconfig.json && node build.cjs", "test": "node --test test/*.test.cjs" }, diff --git a/typescript/packages/traceai_cursor_plugin/package.json b/typescript/packages/traceai_cursor_plugin/package.json index 264e5f905..9d1a65f40 100644 --- a/typescript/packages/traceai_cursor_plugin/package.json +++ b/typescript/packages/traceai_cursor_plugin/package.json @@ -25,6 +25,7 @@ } }, "scripts": { + "prepare": "pnpm run build", "build": "tsc -p tsconfig.json && node build.cjs", "test": "node --test test/*.test.cjs" }, diff --git a/typescript/packages/traceai_goose/package.json b/typescript/packages/traceai_goose/package.json index ed68d754d..37970c56d 100644 --- a/typescript/packages/traceai_goose/package.json +++ b/typescript/packages/traceai_goose/package.json @@ -16,6 +16,7 @@ "README.md" ], "scripts": { + "prepare": "pnpm run build", "build": "tsc -p tsconfig.json && esbuild src/hook.ts --bundle --platform=node --format=cjs --target=node22 --outfile=dist/hook.cjs", "test": "node --test test/*.test.cjs" }, diff --git a/typescript/packages/traceai_grok_plugin/package.json b/typescript/packages/traceai_grok_plugin/package.json index 8073e5acd..300c30e97 100644 --- a/typescript/packages/traceai_grok_plugin/package.json +++ b/typescript/packages/traceai_grok_plugin/package.json @@ -19,6 +19,7 @@ "LICENSE" ], "scripts": { + "prepare": "pnpm run build", "build": "tsc -p tsconfig.json", "test": "node --test test/*.test.cjs" }, diff --git a/typescript/packages/traceai_openclaw/package.json b/typescript/packages/traceai_openclaw/package.json index 2444867f7..5f16d69b1 100644 --- a/typescript/packages/traceai_openclaw/package.json +++ b/typescript/packages/traceai_openclaw/package.json @@ -6,7 +6,7 @@ "types": "./dist/index.d.ts", "exports": { ".": { "types": "./dist/index.d.ts", "default": "./dist/index.js" } }, "files": ["dist", "native", "README.md", "LICENSE"], - "scripts": { "build": "tsc -p tsconfig.json", "test": "node --test test/*.test.cjs" }, + "scripts": { "prepare": "pnpm run build", "build": "tsc -p tsconfig.json", "test": "node --test test/*.test.cjs" }, "engines": { "node": ">=24.16.0 <25" }, "dependencies": { "@traceai/agent-core": "workspace:^", diff --git a/typescript/packages/traceai_opencode_plugin/package.json b/typescript/packages/traceai_opencode_plugin/package.json index df21c2da2..c29d8ff48 100644 --- a/typescript/packages/traceai_opencode_plugin/package.json +++ b/typescript/packages/traceai_opencode_plugin/package.json @@ -7,7 +7,7 @@ "types": "./dist/index.d.ts", "exports": { ".": { "types": "./dist/index.d.ts", "import": "./dist/index.js" } }, "files": ["dist", "README.md", "LICENSE"], - "scripts": { "build": "tsc -p tsconfig.json", "test": "node --test test/*.test.mjs" }, + "scripts": { "prepare": "pnpm run build", "build": "tsc -p tsconfig.json", "test": "node --test test/*.test.mjs" }, "engines": { "node": ">=22.16.0" }, "dependencies": { "@opencode/plugin": "2.2.5", "@opencode/client": "2.2.5", "@traceai/agent-core": "workspace:^" }, "devDependencies": { "typescript": "^5.8.3", "@types/node": "^22.15.29" }, diff --git a/typescript/packages/traceai_vscode_extension/package.json b/typescript/packages/traceai_vscode_extension/package.json index 9bf2543c2..791895d83 100644 --- a/typescript/packages/traceai_vscode_extension/package.json +++ b/typescript/packages/traceai_vscode_extension/package.json @@ -7,6 +7,7 @@ "files": ["dist", "extension.vsix", "LICENSE"], "scripts": { "build": "tsc -p tsconfig.json && node scripts/package.cjs", + "prepare": "pnpm run build", "test": "node --test test/*.test.cjs" }, "engines": {"node": ">=22.16.0"},