mirror of
https://github.com/morluto/rea.git
synced 2026-11-03 13:26:10 +00:00
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.
49 lines
1.6 KiB
TypeScript
49 lines
1.6 KiB
TypeScript
import { z } from "zod";
|
|
import { prefixedDigestSchema } from "../digests.js";
|
|
import {
|
|
applicationGraphEvidenceSchema,
|
|
applicationNodeIdentitySchema,
|
|
} from "../javascript/javascriptApplicationEvidenceSchemas.js";
|
|
|
|
const moduleKindSchema = z.enum([
|
|
"javascript-asset",
|
|
"javascript-module",
|
|
"source-module",
|
|
]);
|
|
|
|
/** Exact filters over retained owner facts; paths are not filesystem lookups. */
|
|
export const javascriptModuleReferencesRequestSchema = z.strictObject({
|
|
kind: z.literal("javascript"),
|
|
collection: z.literal("modules"),
|
|
projection: z.literal("references"),
|
|
where: z
|
|
.strictObject({
|
|
path: z.string().nullable().optional(),
|
|
kind: moduleKindSchema.optional(),
|
|
})
|
|
.default({}),
|
|
offset: z.int().nonnegative().default(0),
|
|
limit: z.int().positive().default(64),
|
|
});
|
|
|
|
/** Unique support states, without promoting mixed observations to one fact. */
|
|
const basisSchema = z.strictObject({
|
|
authority: applicationGraphEvidenceSchema.shape.authority,
|
|
state: applicationGraphEvidenceSchema.shape.state,
|
|
confidence: applicationGraphEvidenceSchema.shape.confidence,
|
|
});
|
|
|
|
/** Reusable facts rather than task-specific dependency interpretations. */
|
|
export const javascriptModuleReferenceSchema = z.strictObject({
|
|
node_id: prefixedDigestSchema("jag_node"),
|
|
kind: moduleKindSchema,
|
|
path: z.string().nullable(),
|
|
identity: applicationNodeIdentitySchema,
|
|
retained_source_range_count: z.int().nonnegative(),
|
|
basis: z.array(basisSchema).min(1),
|
|
});
|
|
|
|
export type JavaScriptModuleReference = z.infer<
|
|
typeof javascriptModuleReferenceSchema
|
|
>;
|