Compile a boot prompt¶
A compile turns a source node into a compiled boot prompt: the source's text with every include expanded, written as a new revision of a second node. Three mutations do it, one per kind of target. They are GraphQL only; there is no MCP tool or CLI command for them.
Status: merged on hadron-server main, not yet served by production. This
page is written from that code and the GraphQL schema, not from a run. The
mutations will be refused as unknown fields until the server is deployed. See
also Boot-prompt pointers, which names the compiled
node intended for startup. Nothing is served from a pointer yet.
The mutations¶
compileAgentBootPrompt(agentRef: String!, setPointer: Boolean = true): CompiledBootPrompt!
compileAppAgentBootPrompt(appRef: String!, agentRef: String!): CompiledBootPrompt!
compileWorkerBootPrompt(workerRef: ID!, setPointer: Boolean = true): CompiledBootPrompt!
| Mutation | Reads | Writes | Pointer |
|---|---|---|---|
compileAgentBootPrompt |
boot:source in the Agent's system memory |
boot:compiled in the same memory |
Agent.bootPromptRef, unless setPointer: false |
compileAppAgentBootPrompt |
the App's own boot:source in its install memory if it has a live one, otherwise the Agent's, with the App's replacing nodes |
boot:compiled in the install memory |
AppAgent.bootPromptRef, always |
compileWorkerBootPrompt |
boot:workers:<workerId>:source in the install memory |
boot:workers:<workerId>:compiled in the install memory |
the worker's, unless setPointer: false |
What comes back¶
CompiledBootPrompt:
| Field | Meaning |
|---|---|
node |
The compiled node. |
revNo |
The new revision's number. |
contentHash |
Hash of the compiled text. |
pointerSet |
Whether the pointer was set. |
approvalIssued |
Always false. |
Every compile writes a new revision, even when the text did not change.
A compile never approves or signs: approvalIssued: false says this operation
issued no approval. It does not say the new revision is unapproved, because an
earlier approval of identical content can still qualify it. Read the revision's
actual approval status from the node, not from this flag. Approval stays a
separate act by the Agent's or App's manager; see
Include syntax and settings for how the includes in the source
are read.
The source node must carry the boot-prompt role, or the compile refuses it as
BOOT_PROMPT_SOURCE_INVALID.
Who may compile¶
A manager of the target, acting as themselves: the Agent's manager for an Agent,
the App's manager for an installed Agent or a worker. A request bound to a worker
session, a non-manager, an App key, an impersonation, a run and a target that does
not exist are all refused with the same code, BOOT_PROMPT_COMPILE_NOT_PERMITTED,
so the refusal does not reveal which.
Refusals¶
A refusal changes nothing. The include refusals carry the tag's position
(line and column in the source).
| Code | Meaning |
|---|---|
BOOT_PROMPT_COMPILE_NOT_PERMITTED |
See above. |
BOOT_PROMPT_TARGET_RETIRED |
The target is retired. |
BOOT_PROMPT_NO_SOURCE |
There is no source node to compile. |
BOOT_PROMPT_SOURCE_INVALID |
The node at the source loc cannot be used, for example because it lacks the boot-prompt role. |
BOOT_PROMPT_INCLUDE_UNAVAILABLE |
An include points at something that does not exist or that you cannot see, including a pinned revision number that does not exist. |
BOOT_PROMPT_INCLUDE_RETIRED |
An include points at a deleted node. |
BOOT_PROMPT_INCLUDE_REVISION_UNAVAILABLE |
The include asks for an approved revision and none qualifies. |
BOOT_PROMPT_INCLUDE_CYCLE |
Includes loop back on themselves. |
BOOT_PROMPT_INCLUDE_TOO_DEEP |
Includes nest more than 10 levels. |
BOOT_PROMPT_INCLUDE_SOURCE_DISALLOWED |
The include reads from a memory a compile may not use. Only Agent system memories and the target's own install memory are allowed. |
BOOT_PROMPT_INCLUDE_MALFORMED |
An include tag does not parse. |
BOOT_PROMPT_GRANT_REQUIRED |
An included Agent has no grant for the recipient. |
BOOT_PROMPT_COMPILE_LIMIT_EXCEEDED |
More than 10,000 include occurrences or 1 MiB of compiled text. |
CONFLICT |
The compile did not settle inside its 30 second budget. Retry. |
Encrypted memories never enter a compile.
Where a bare include is looked up¶
A tag with only a loc looks in the nearest place first: for an App or worker compile, the App's install memory, then the Agent's system memory, then each base Agent up the chain. A node in the install memory with the same loc as an Agent node replaces it, and the compile records it as a replacement. A deleted node counts as absent and the lookup moves on.