mirror of
https://github.com/morluto/rea.git
synced 2026-10-28 02:15:44 +00:00
refactor(artifacts): remove selectors and traversal quotas
This commit is contained in:
1 parent
fe342faa83
commit
8c24272ee7
31 files changed
+268
-666
No files matched your search
@@ -1,17 +1,7 @@
|
||||
import { z } from "zod";
|
||||
|
||||
import type { ArtifactLimits } from "../artifacts/ArtifactReader.js";
|
||||
|
||||
/** Resource safeguards for local artifact traversal and static parsing. */
|
||||
export const JAVASCRIPT_APPLICATION_RESOURCE_LIMITS = {
|
||||
artifact: {
|
||||
maxEntries: 8_000,
|
||||
maxTotalBytes: 512 * 1_024 * 1_024,
|
||||
maxEntryBytes: 128 * 1_024 * 1_024,
|
||||
maxCompressionRatio: 1_000,
|
||||
maxDepth: 64,
|
||||
maxPathBytes: 4_096,
|
||||
} satisfies ArtifactLimits,
|
||||
maxTextFiles: 5_000,
|
||||
maxTotalTextBytes: 128 * 1_024 * 1_024,
|
||||
maxTextFileBytes: 8 * 1_024 * 1_024,
|
||||
@@ -29,7 +19,3 @@ export const javascriptArtifactReconstructionInputSchema = z.strictObject({
|
||||
export type JavaScriptArtifactReconstructionInput = z.infer<
|
||||
typeof javascriptArtifactReconstructionInputSchema
|
||||
>;
|
||||
|
||||
/** Project private resource safeguards into the artifact traversal policy. */
|
||||
export const artifactLimitsForReconstruction = (): ArtifactLimits =>
|
||||
JAVASCRIPT_APPLICATION_RESOURCE_LIMITS.artifact;
|
||||
Reference in new issue
Block a user