Files
rea/src/domain/javascript/javascriptSourceSelection.ts
T
郭立 Guo Li 7590b50801 perf(schema): reduce retained integer validator allocations (#4360)
Construct integer formats directly while preserving bounds, refinements, metadata and current shared schema owners. Keep Incur-dependent CLI numeric coercion declarations unchanged.

Verify canonical advertisements, 126 numeric boundary cases, 974 actual CLI parser cases, broad source tests and real public-artifact SDK workflows. Record 72 normal tasks and 12 separate owned-inspector heap diagnostics with whole-family resource bounds; distinguish SDK spans and asymmetric audit overhead. Generate numerical report sections from receipts and reject stale tables through documentation conformance checks.

Closes #6236. Current-head CI and Greptile pass; actionable review findings are addressed. Codex review was unavailable due repository usage limits.
2026-10-22 05:11:08 +00:00

21 lines
832 B
TypeScript

import { z } from "zod";
/** Exact inventoried paths selected for text acquisition and static analysis. */
export const javaScriptSourcePathsSchema = z
.array(z.string().min(1))
.min(1)
.describe(
"Exact relevant file paths from the artifact inventory, relative to the application root, analyzed in first-request order before unselected scopes; no globs or implicit dependencies. Omit to analyze all sources.",
);
/** Caller scope retained independently of analysis success or completeness. */
export const javaScriptSourceSelectionSchema = z.strictObject({
requested_paths: javaScriptSourcePathsSchema,
unselected_files: z.int().min(0),
});
/** Explicit selected-source boundary for an otherwise complete inventory. */
export type JavaScriptSourceSelection = z.infer<
typeof javaScriptSourceSelectionSchema
>;