feat: update wakeup text to include reading BOOTSTRAP.md before AGENTS.md
This commit is contained in:
@@ -1004,7 +1004,8 @@ def _should_include_bootstrap(
|
|||||||
def _wakeup_text(agent: Agent, *, verb: str) -> str:
|
def _wakeup_text(agent: Agent, *, verb: str) -> str:
|
||||||
return (
|
return (
|
||||||
f"Hello {agent.name}. Your workspace has been {verb}.\n\n"
|
f"Hello {agent.name}. Your workspace has been {verb}.\n\n"
|
||||||
"Start the agent, read AGENTS.md, and begin heartbeats after startup."
|
"Start the agent. If BOOTSTRAP.md exists, read it first, then read AGENTS.md. "
|
||||||
|
"Begin heartbeats after startup."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -56,6 +56,14 @@ def test_workspace_path_preserves_tilde_in_workspace_root():
|
|||||||
assert agent_provisioning._workspace_path(agent, "~/.openclaw") == "~/.openclaw/workspace-alice"
|
assert agent_provisioning._workspace_path(agent, "~/.openclaw") == "~/.openclaw/workspace-alice"
|
||||||
|
|
||||||
|
|
||||||
|
def test_wakeup_text_includes_bootstrap_before_agents():
|
||||||
|
agent = _AgentStub(name="Alice")
|
||||||
|
|
||||||
|
text = agent_provisioning._wakeup_text(agent, verb="created")
|
||||||
|
|
||||||
|
assert "If BOOTSTRAP.md exists, read it first, then read AGENTS.md." in text
|
||||||
|
|
||||||
|
|
||||||
def test_agent_lifecycle_workspace_path_preserves_tilde_in_workspace_root():
|
def test_agent_lifecycle_workspace_path_preserves_tilde_in_workspace_root():
|
||||||
assert (
|
assert (
|
||||||
AgentLifecycleService.workspace_path("Alice", "~/.openclaw")
|
AgentLifecycleService.workspace_path("Alice", "~/.openclaw")
|
||||||
|
|||||||
Reference in New Issue
Block a user