UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

2 lines • 1.9 kB
//!src/agents/bootstrap-prompt.ts function buildFullBootstrapPromptLines(e){return[e.readLine,`Can finish BOOTSTRAP.md here: do it.`,`Cannot: brief blocker, possible steps, simplest next step.`,`Never claim completion early. No generic greeting/normal reply before BOOTSTRAP.md handling.`,e.firstReplyLine,`Only for the Gateway's trusted hidden Template setup input (internal_system, sourceTool=template_add_setup): follow its ordered setup steps first, including its greeting, then handle BOOTSTRAP.md last in that same turn. Do not postpone it to the user's next turn. Other internal_system inputs have no such exception.`]}function buildLimitedBootstrapPromptLines(e){return[e.introLine,`Never claim complete; no generic first greeting.`,`Brief limitation; possible steps; simplest next step.`,e.nextStepLine]}function buildBootstrapSystemPromptSection(e){if(e.bootstrapMode===`limited`)return[`## Bootstrap Pending`,...buildLimitedBootstrapPromptLines({introLine:`Bootstrap pending; this run cannot safely finish full BOOTSTRAP.md.`,nextStepLine:`Next: primary interactive run with normal workspace access, or user deletes workspace BOOTSTRAP.md after completion.`}),``];if(e.bootstrapMode===`full`)return[`## Bootstrap Pending`,...buildFullBootstrapPromptLines({readLine:e.bootstrapContextInjected?`BOOTSTRAP.md below; follow before normal reply.`:`Read workspace BOOTSTRAP.md; follow before normal reply.`,firstReplyLine:`First visible reply must follow BOOTSTRAP.md; no generic greeting.`}),``];if(e.bootstrapCompleted)return[`## Bootstrap Complete`,`OpenClaw recorded workspace setup as complete; earlier BOOTSTRAP.md instructions are no longer shown.`,`Missing BOOTSTRAP.md is expected. It and blank optional profile files do not mean setup was skipped.`,``];return[]}export{buildFullBootstrapPromptLines as n,buildLimitedBootstrapPromptLines as r,buildBootstrapSystemPromptSection as t};