Modules and content packs
Package reusable document types, documents, assets, and references as validated data.
A module groups reusable world vocabulary and content. A content pack is the portable data artifact that Aether can validate and install.
#Define a pack
import { defineContentPack, packAssetRef } from "@aether/sdk";
export const MY_PACK = defineContentPack({
id: "my-content",
title: "My Content",
version: "1.0.0",
types: [locationType],
assets: [{ key: "map", mime: "image/webp", filename: "map.webp", base64 }],
documents: [{
id: "starting-location",
type: "my.location",
name: "Starting Location",
system: { region: "North" },
caps: { pageable: { pages: [{ id: "map", title: "Map", type: "image", src: packAssetRef("map") }] } },
}],
});Pack document ids and asset keys are local to the artifact. Installation assigns world ids and rewrites internal references. Imported ownership and permissions are explicit; omitted access uses the target type's current creation default.
#Runtime types
A module can contribute TypeDef records for GM-extendable document types. A type definition lists
its fields and composed capabilities. Aether derives its Zod schema and default values. The
worldbuilding module uses this path for NPC, location, faction, organization, lore, and handout
types.
#Verify the maintained example
modules/worldbuilding/src/index.ts contains a taxonomy plus a pack with two linked documents and
an embedded portrait. Run:
bun run --filter @aether/module-worldbuilding typechecksystems/dnd5e-srd/src/pack.ts is the larger first-party content-pack example. Content packs can be
listed in Marketplace when the host publishes them, but the source packages remain private
workspace packages today.