Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

feat(pages): page-size-policy.ts, the Wave A large-page ceiling and inline threshold

garrytan3c7565958e34
diff --git a/src/core/page-size-policy.ts b/src/core/page-size-policy.ts
new file mode 100644
index 0000000000..b6f2c51559
--- /dev/null
+++ b/src/core/page-size-policy.ts
@@ -0,0 +1,11 @@
+/**
+ * Large-page policy (Wave A): the one ceiling every raisable ingress bound
+ * derives from, and the inline threshold above which a page is treated as
+ * large (post-commit embedding, title-tier context, bounded history).
+ */
+export const PAGE_MAX_BYTES = 24 * 1024 ** 2;
+export const CODE_FILE_MAX_BYTES = 5_000_000;
+export const PAGE_INLINE_MAX_BYTES = 1024 ** 2;
+export function isLargePageBytes(bytes: number): boolean {
+ return bytes > PAGE_INLINE_MAX_BYTES;
+}