Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
feat(large-pages): add the Wave A page-size policy module
garrytanf1edecb9bf0e
diff --git a/src/core/page-size-policy.ts b/src/core/page-size-policy.tsnew file mode 100644index 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;+}