@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
19 lines • 720 B
JavaScript
import { catalogDigest } from "./compact-catalog-codec.js";
import { CompactReadError } from "./compact-read-lease.js";
/** The bounded manifest itself is discoverable under its token on the one S11 page route. */
export async function manifestPage(manifest, offset) {
if (offset !== 0)
throw new CompactReadError("range");
const bytes = Buffer.from(JSON.stringify(await manifest), "utf16le");
if (bytes.length > 65_536)
throw new CompactReadError("size_limit");
return {
offset: 0,
length: bytes.length,
bytes,
digest: catalogDigest("fragment", bytes),
next: null,
complete: true,
};
}
//# sourceMappingURL=compact-manifest-page.js.map