Artifact bundle configuration
Choose the files, server, permissions requests and tool declarations that ship with one revision.
Use bricole.json beside an app’s build to describe what the publisher will send. This is the artifact file. The installation guide uses a separate operator file to configure an entire host.
For a static app, build a folder containing index.html and use:
{ "entry": "index.html" } Run the publisher from the app folder. It reads ./bricole.json and scans dist/ by default, including dotfiles. It skips the selected config and tool-list files if they are inside the build. Publish only files intended for the artifact. The publisher rejects unknown top-level keys.
Fields in bricole.json
| Field | What to supply and when |
|---|---|
entry | Bundle path to the asset served at /. Required for a static publish. A server-only app can omit it. |
fallback | Optional asset returned with 200 for an unmatched GET when no app server handles the request. Useful for client-side routing. An explicitly released public website serves exact files and directory indexes. |
preview | Optional raster cover asset. PNG, JPEG or WebP, at most 1 MiB. |
server | Optional Workers ES module declaration. Server source and migration SQL are excluded from served assets. |
server.main | Required when declaring a server. Bundle path to the module exporting the app’s default fetch handler. |
server.modules | Optional array of additional module paths in the build imported by server code. |
server.compatibilityDate | Required with a server. ISO calendar date such as "2026-11-18". |
server.publicPostPaths | Optional exact same-origin POST routes on an explicitly released website, for example ["/waitlist"]. Each path starts with a slash, has nonempty letter/digit/underscore/hyphen segments, and is at most 512 characters. The first segment cannot be mcp or __bricole. The handler receives an actorless request. |
bindings | Optional array of distinct binding names. database binds the artifact’s SQLite store to env.DB for the server. live enables live events and page presence and can also be used by a static page. files is reserved in the protocol and refused by the current host. An omitted array requests no bindings. |
migrations | Optional ordered array of bundle paths ending in .sql. Requires database. A normal filename supplies its stem as the migration name; a file named migration.sql takes its parent folder’s name. Preserve names, digests and order of applied migrations when moving forward. |
mcp | Set to true when the server implements POST /mcp. Omission or false leaves the app tool endpoint undeclared. |
tools | Path to the generated tool-list JSON relative to the config file. For example "dist/tools.json" beside the starter’s config. Requires mcp: true; the publisher embeds the array in the manifest. |
listing | An object requesting access to list artifacts the viewer may open. An empty object requests an unfiltered listing. The viewer or an admin must approve the requested scope. Omitting the field requests no listing. |
listing.property | Optional array of up to 20 filters, at most 2 KiB serialized together. Use "key" for present, "!key" for absent, and "key=value" for a value. Distinct keys combine with AND, multiple values of a key with OR. An SDK request can narrow the approved scope. |
source | Optional JSON object for provenance, at most 4 KiB serialized. The host records and returns it. Choose your own keys and keep credentials out. |
skill | Optional path to a bundled skill asset. The manifest accepts a reference to an existing asset; readers can retrieve the asset. Naming it alone does not establish that a connected client advertises a skill tool. |
base | Reserved for an app supplied by another artifact. The protocol accepts base.artifact plus exactly one of base.revision (positive integer) or base.channel (1–32 lowercase letters, digits or hyphens, starting with a letter; website is reserved). A based manifest may supply its own files, preview and source. The current host refuses publication with manifest.base. The channel operations also report unavailable after checking access. Publish the app’s own files instead; releasing a standalone public website is supported separately. |
A path in the bundle is relative, case-sensitive and at most 512 UTF-8 bytes. Use forward slashes between nonempty segments. Dot and parent segments, backslashes, control characters and the __bricole/ prefix are reserved. All declared entry, cover, fallback, skill, server and migration paths must exist in the build.
Manifest sent to the host
The publisher generates the required files array. Each item has a unique path, digest (sha256: followed by 64 lowercase hex digits), size in bytes, and type (a media type, up to 255 characters). The CLI infers types from extensions and uses application/octet-stream for an unknown extension. Never put this generated array in the local config.
On the wire, migrations contains objects with name and path. Names have 1–128 letters, digits, dots, underscores or hyphens and start with a letter or digit. tools contains the list itself. Other fields above retain their shapes. Creating an empty artifact reserves an ID; provisioning its server, migrations and bindings happens on publish.
| Limit | Maximum |
|---|---|
| Single file | 25 MiB |
| Files per revision | 5,000 |
| Total listed file sizes per revision | 100 MiB |
| Server main and modules together | 64 MiB |
| Stored artifact bytes | 1 GiB |
| Inline create payload, measured by file content | 4 MiB |
| SQL text per migration statement | 100,000 UTF-8 bytes |
App tool list
Start with a read operation, declare its access requirement, and implement it on the app server:
[
{
"name": "read_notes",
"description": "List the field notes visible to the caller.",
"inputSchema": { "type": "object", "properties": {} },
"_meta": { "bricole/action": "data.read", "bricole/pages": true }
}
] Each list has at most 100 uniquely named tools. name is 1–128 letters, digits, underscores, hyphens or periods. description and an object-typed JSON Schema in inputSchema are required. title and an object-typed outputSchema are optional.
Every tool declares an action through _meta["bricole/action"] or the build-time action field. The metadata key takes precedence. Valid action names are artifact.read, artifact.publish, artifact.base, people.list, comments.read, comments.write, comments.resolve, properties.write, data.read, data.write, data.writeAll and grants.manage. Choose the action the caller must have; enforce record-level rules inside the app as well.
Setting _meta["bricole/pages"] to true lets another artifact’s page invoke a data.read or artifact.read tool through the shell as its viewer. Omit it or set it to false to leave page calls disabled. Custom _meta keys outside the reserved bricole/ namespace may together occupy up to 1 KiB. A rejected tool declaration reports tools-invalid at publish.