[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75TSYGQ3XNGZ7MZX5EB64RE":3,"skill-same:01M75TSYGQ3XNGZ7MZX5EB64RE":56},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":20,"frontMatter":21,"refName":22,"commitSha":23,"skillDirectory":24,"forksCount":13,"repositoryHtmlUrl":25,"repositoryHomepageUrl":6,"ownerHtmlUrl":26,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":27,"install":28,"resources":41},"01M75TSYGQ3XNGZ7MZX5EB64RE","lifecycle",null,"damien-robotsix\u002Frobotsix-chat","damien-robotsix","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F130368771?v=4","01M75TS5N09AA5MQAS3V6TPNM5","Damien SIX","01M75TS5NMBPJ3RRHERKBVA7DY",0,"MIT","https:\u002F\u002Fgithub.com\u002Fdamien-robotsix\u002Frobotsix-chat\u002Fblob\u002Fmain\u002Fsrc\u002Frobotsix_chat\u002Flifecycle\u002Fskill.md",[],[],"2026-11-12 13:55:43",false,"# deploy-lifecycle-api skill\n\nThe deploy-lifecycle API provides inspection and mutation of the central-deploy management plane:\nservice inventory, live status and health, environment snapshots, and (when permitted by the deploy\nserver's per-repo access toggle) service restart and env-write. Configuration management is owned by\neach component internally — use the component's own `\u002Fconfig` endpoints for configuration access,\nnot the lifecycle API. All secret values in environment responses are masked as `***` server-side by\n`_mask_secrets`.\n\n## Allowed operations\n\n| Tool                           | HTTP                                 | Description                                                                |\n| ------------------------------ | ------------------------------------ | -------------------------------------------------------------------------- |\n| `list_lifecycle_services`      | `GET \u002Fservices`                      | List all managed services and status.                                      |\n| `get_lifecycle_service_status` | `GET \u002Fservices\u002F{name}`               | Live status + health-check history.                                        |\n| `get_lifecycle_service_env`    | `GET \u002Fservices\u002F{name}\u002Fenv`           | Runtime environment (secrets masked).                                      |\n| `restart_lifecycle_service`    | `POST \u002Fservices\u002F{name}\u002Frestart`      | Restart a service (requires per-repo access toggle).                       |\n| `redeploy_lifecycle_service`   | `POST \u002Fservices\u002F{name}\u002Fredeploy`     | Redeploy a service — pulls latest image (requires per-repo access toggle). |\n| `verify_lifecycle_deployment`  | `GET \u002Fservices\u002F{name}` (poll)        | Poll service until healthy and (optionally) image matches expected ref.    |\n| `self_restart`                 | `POST \u002Fchat\u002Fservices\u002F{name}\u002Frestart` | Restart this service (named via `lifecycle.service_name`).                 |\n| `update_lifecycle_service_env` | `PUT \u002Fservices\u002F{name}\u002Fenv`           | Update service environment (requires per-repo access toggle).              |\n\n## Configuration ownership\n\nConfiguration is owned by each component internally — use the component's own `\u002Fconfig` endpoints\n(e.g. `GET \u002Fconfig`, `PUT \u002Fconfig`, `POST \u002Fconfig\u002Frollback`) for configuration reads and writes, not\nthe lifecycle API. The lifecycle API no longer exposes config-store endpoints\n(`GET \u002Fservices\u002F{name}\u002Fconfig`, `PUT \u002Fservices\u002F{name}\u002Fconfig`).\n\n## Restricted operations (per-repo access toggle)\n\nThe following mutation endpoints are available as tools but succeed only when the deploy server's\nper-repo access toggle is enabled for this component. When the toggle is not enabled the calls\nreturn a 403 error — the agent should treat that as \"not permitted\" and not retry:\n\n- `POST \u002Fservices\u002F{name}\u002Frestart` — restart a service\n- `POST \u002Fservices\u002F{name}\u002Fredeploy` — redeploy a service (pulls the latest image)\n- `PUT  \u002Fservices\u002F{name}\u002Fenv` — update service environment\n\n**Enabling the toggle:** This is a per-repo setting in the central-deploy dashboard (labelled\n`allow_chat_access` or `chat_agent_mutatable`), not a chat-component config key or environment\nvariable. See the\n[deployment guide](..\u002Fuser-guide\u002Fdeployment.md#4-chat-agent-mutation-access-allow_chat_access) for\nstep-by-step instructions.\n\n## Deploy registration — check the toggle up front\n\nRegistering a component in the deploy plane (`POST \u002Fchat\u002Fservices`) and every other chat-agent\nmutation below is gated by the same per-repo `allow_chat_access` \u002F `chat_agent_mutatable` toggle.\nWhen it is off, all of these calls return `403`, so a deploy-registration flow that does not warn\nearly will run several steps and only stall at the first mutation. **Warn the user about this\nrequirement up front, before starting the workflow:**\n\n1. The moment the user asks to register or deploy a component (or perform any chat-agent mutation),\n   state the precondition: \"Registering\u002Fdeploying a component requires the `allow_chat_access` \u002F\n   `chat_agent_mutatable` toggle to be enabled for this repo in the central-deploy dashboard. If it\n   is off, deployment operations will be blocked with 403.\"\n1. If the user has not confirmed the toggle is already on, ask them to enable it in the\n   central-deploy dashboard **before** you proceed, and wait for confirmation.\n1. Only once the toggle is confirmed enabled should you run the registration\u002Fdeployment steps.\n\n**There is no API to read the toggle's current state** — the read-only tools\n(`list_lifecycle_services`, `get_lifecycle_service_status`, `get_lifecycle_service_env`) never\nreport it, and the agent learns it only via a 403 on a mutation call. Because you cannot verify it\nyourself, treat the toggle as possibly-off and get explicit early confirmation rather than assuming\nthe operation will succeed. This avoids the stalled turns and back-and-forth caused by discovering\nthe 403 mid-flow.\n\n## Self-restart\n\n`self_restart` restarts the agent's **own** service via `POST \u002Fchat\u002Fservices\u002F{name}\u002Frestart`, where\n`{name}` is the configured `lifecycle.service_name` (the deploy server has no bare `\u002Fself\u002Frestart`\nroute). It is granted by the same `allow_chat_access` \u002F `chat_agent_mutatable` flag as the other\nchat-agent restart calls. Use this after a deploy that changed the agent's own capabilities (new\ncomponent, tool, skill, or permission) so the new capability is picked up. When\n`lifecycle.service_name` is unset the tool returns a clear \"not configured\" message rather than\nattempting a call.\n\nThis tool cannot restart other managed services — for those, use `restart_lifecycle_service`.\n\n**Drain gate.** A restart kills every agent turn in flight. `self_restart` (and\n`restart_lifecycle_service` on the agent's own service) therefore defers while other agent turns or\nsubsessions are mid-turn: the reply reads `Restart deferred: N other agent turn(s) are still in\nflight…` and the restart is issued automatically once they finish, or after a bounded drain timeout\n(600 s). Do not call it again after a deferral. Never restart just to apply a `periodic.sessions`\nedit — presets hot-reload on `PUT \u002Fconfig`.\n\n### URL protocol handling\n\nIf `central_deploy.url` lacks a URL scheme (e.g. `central-deploy:8100`), the client prepends the\nconfigured `lifecycle.default_protocol` (default `\"http\"`). URLs with recognised schemes (`http`,\n`https`) are left unchanged. An empty `base_url` produces a clear error message from `self_restart`\ninstead of a cryptic protocol error — configure `central_deploy.url` to the deploy-lifecycle API\naddress (e.g. `http:\u002F\u002Fcentral-deploy:8100`) to enable the feature.\n\n### Retry behaviour\n\nOn transient failures (server 5xx errors, network timeouts, connection failures) `self_restart`\nretries with exponential backoff before reporting failure. Non-retryable errors (4xx client errors\nsuch as 403 Forbidden or 404 Not Found) are returned immediately without retrying.\n\nRetry parameters are configurable via the `lifecycle` settings:\n\n| Setting                              | Default | Description                                                                                            |\n| ------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------ |\n| `lifecycle.self_restart_max_retries` | `3`     | Maximum retries for transient failures. The initial attempt + retries = `max_retries + 1` total calls. |\n\nWhen all retries are exhausted the method returns a combined error message describing the number of\nattempts made and the last error received.\n\nThe following endpoints remain forbidden — no tool exists for them and the agent must not attempt to\nreach them through any other path:\n\n- `DELETE \u002Fservices\u002F{name}` — remove a service registration\n\n## Post-merge deployment verification\n\nAfter merging a PR that changes a tracked component (cost-fix, infrastructure change, or any code\nchange that produces a new container image), **do not close the ticket** until the new image is\nconfirmed running in production:\n\n1. **Trigger redeploy** — call `redeploy_lifecycle_service` for the affected service.\n1. **Verify deployment** — call `verify_lifecycle_deployment` with the expected image reference\n   (e.g. the tag or digest the PR was built from). This polls the service status until the running\n   image matches and the service is healthy.\n1. **Re-measure metrics** — after the deployment is confirmed, check the key metrics the ticket was\n   meant to improve (cost, latency, error rate, etc.) to confirm the change had the intended effect.\n1. **Only then close the ticket** — when deployment is verified and metrics are confirmed.\n\nThe `verify_lifecycle_deployment` tool accepts an `expected_image_ref` that is matched by substring\nagainst the running image identifier. You can pass a tag (`:main`), a digest prefix\n(`sha256:abc123`), or a full reference. When `expected_image_ref` is empty, the tool verifies only\nthat the service is running and healthy.\n\n## Safety\n\nThe three read-only tools are pure reads — they make no state changes and can be called freely for\ndiagnostics and investigation. The two mutation tools (restart, env-write) make real state changes\nand are gated by the deploy server's per-repo access toggle. The `self_restart` tool is a mutation\nthat restarts the agent's own service (named via `lifecycle.service_name`) — it should only be\ncalled when the agent needs to pick up a new capability after a deploy. Secret masking is enforced\nserver-side; the agent never sees raw credentials.\n\n## Operating rules (moved from the system prompt, 2026-09-08)\n\n### Deploy tools and the deploy plane\n\n– Deploy API (lifecycle tools): • restart_lifecycle_service — restart any service (needs per-repo\ntoggle) • self_restart — restart the agent's own service (no toggle required) •\nupdate_lifecycle_service_env — update service environment – Deploy system: The robotsix-deploy\n(central-deploy) management plane is a runtime API server, not a git repository — component\nonboarding, lifecycle operations, and configuration changes are all API-driven (POST\n\u002Fonboard\u002Fpreflight, \u002Fonboard\u002Fconfirm, etc.). The deploy\u002Fdocker-compose.yml in each component repo is\nthe contract central-deploy reads at onboard time; no git PR to the central-deploy repo is ever\nneeded. Do not suggest git PRs or repo changes for central-deploy onboarding or lifecycle\noperations. – Deploy pre-check: after a migration or fix ticket is done and the user requests a\ndeploy, first verify the associated PR is merged — query its status via the mill's ticket endpoint\n(GET \u002Ftickets\u002F{id}) or check the PR on GitHub directly, rather than asking the user for\nconfirmation. If the PR is not yet merged, explain the blocker clearly and offer to wait for the\nmerge or escalate. Only proceed with the deploy (restart) after confirming the merge is complete. –\nDeploy preflight: before calling any deploy endpoint (POST \u002Fchat\u002Fdeploy, POST \u002Fonboard\u002F\\*, or any\nlifecycle mutation), you MUST:\n\n1. Retrieve the target component repo's deploy\u002Fdocker-compose.yml and count its services, volumes,\n   healthchecks, and commands.\n1. Check the chat_agent_deployable_components allowlist (via component_request to central-deploy or\n   the roster) — if the component is not listed, refuse to proceed and report the missing allowlist\n   entry; never attempt to deploy a component that is not explicitly authorised for chat-agent\n   deployment.\n1. Compare the contract against the endpoint's known capabilities: single-container endpoints cannot\n   deploy multi-service compose files, named volumes, multiple networks, or healthcheck stanzas. If\n   the endpoint cannot reproduce the full contract, refuse to proceed and explain which contract\n   elements are unsupported. Do NOT offer to deploy through an endpoint whose capabilities you have\n   not verified — guessing causes failed deploys and wastes operator time. If you cannot determine\n   the endpoint's capabilities (e.g. the server is running an older version whose deploy support is\n   unknown), state that limitation and ask the operator to verify before proceeding. –\n   Contract-version troubleshooting: When a user encounters a \"missing or incorrect\n   central-deploy-contract-version header\" error during onboarding, diagnose concretely before\n   suggesting a ticket: (a) check whether the component's deploy\u002Fdocker-compose.yml has \"#\n   central-deploy-contract-version: N\" as its very first line — if the header is missing, the fix is\n   to add it (the version number is in the repo's own deploy\u002Fdocker-compose.yml); walk the user\n   through adding it. (b) If the header is present but central-deploy rejects it, check the\n   component's recent PRs for a version bump — a recent merge may have changed the expected version.\n   (c) If the correct version remains unclear after checking the repo, file a ticket on the\n   component repo to clarify the expected contract version.\n\n### After a merge\n\n– After a successful merge, immediately check whether the change is live in production: use\nget_lifecycle_service_status on the affected component to confirm the new image is deployed and\nhealthy. A merged PR whose image is not yet deployed is not truly done — report the deployment\nstatus alongside the merge result (never as a separate follow-up), clearly state the deployment gap\nif the change is not yet live, and offer to track deployment progress or help trigger a deploy. When\na deployment gap exists (PR merged but service still running older image), your merge-report message\nMUST explicitly name the gap and suggest the concrete next step — e.g. 'The fix is merged. To make\nit live, deploy the update and restart the service.' Do NOT end a conversation or session after a\nmerge without first informing the user of any deployment gap. Never claim a change is complete\nwithout confirming its deployment status.\n\n### Configuration advice and capability probes\n\n– Service configuration standard (robotsix-standards): Every service in the fleet is configured by a\nsingle config.json file with lowercase key names, not env-style UPPERCASE variables. Refer to\nconfiguration values by their lowercase JSON key path (e.g. `radicale.url`, `radicale.username`,\n`radicale.password`), never by uppercase env-var-style names (e.g. RADICALE_URL, RADICALE_USERNAME,\nRADICALE_PASSWORD). The config file is one JSON document mounted into the container via a volume —\nthe operator (or the deploy pipeline) edits that JSON file and the merged result is written before\neach start; a value is set or changed by editing config.json, not by exporting an environment\nvariable. Do not invent or recommend environment variables for service configuration. Use\nenvironment variables only when a component explicitly requires one (e.g. ROBOTSIX_CONFIG_FILE\nmerely locates the config file). – When advising on configuration settings for a component (secrets,\nlabels, environment variables, deploy contracts, feature flags), first retrieve and analyse the\nrelevant source code through available tools to confirm the actual implementation. Do not rely on\nassumptions or outdated recollection — central infrastructure may already handle the setting\nfleet-wide (e.g. central-deploy’s docker_sdk.py may inject secrets and labels automatically), making\nper-repo configuration advice redundant or incorrect. Verify the source of truth before giving\nconfiguration guidance. – Server-side capability probes: when checking whether a new server-side\ncapability (e.g. a new HTTP endpoint like POST \u002Fchat\u002Fdeploy) is available, probe the target server's\nendpoint directly with a GET request rather than relying on static skill descriptions, roster\nentries, or the audit log. A catch-all 303 redirect from an old build does NOT confirm the\ncapability is present — only a meaningful status code (405 Method Not Allowed, 422 Unprocessable\nEntity, etc.) from the endpoint itself indicates the route exists. Before concluding a capability is\nlive, check the server's running image digest (via the health endpoint or deploy status) against the\nexpected digest from the merged PR that introduced the capability. Report the digest comparison to\nthe user so they can independently confirm. – Endpoint path verification: before probing any\nserver-side endpoint with http_probe or component_request, confirm the exact registered path from\nthe source code (e.g. the Route() registrations in the app factory or the routes module). Do not\nguess or infer endpoint paths from naming conventions, module names, or partial memory — a guessed\npath like \u002Fmobile\u002Fauth\u002Flogin when the actual route is \u002Fauth\u002Flogin will return a misleading 400 or\n401 instead of a 404, confusing the operator about whether the endpoint exists. Read the route\ndefinitions first, then probe the confirmed path.\n",{},"main","c1d7c05ced8b81c2750ddc6e5e49a7803fc90940","src\u002Frobotsix_chat\u002Flifecycle","https:\u002F\u002Fgithub.com\u002Fdamien-robotsix\u002Frobotsix-chat","https:\u002F\u002Fgithub.com\u002Fdamien-robotsix","2026-11-14 18:49:02",{"source":7,"skillName":5,"commands":29,"prompt":39,"zipAvailable":40},[30,33,36],{"tool":31,"command":32},"npx","npx skills add damien-robotsix\u002Frobotsix-chat --skill lifecycle",{"tool":34,"command":35},"bunx","bunx skills add damien-robotsix\u002Frobotsix-chat --skill lifecycle",{"tool":37,"command":38},"pnpm","pnpm dlx skills add damien-robotsix\u002Frobotsix-chat --skill lifecycle","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdamien-robotsix\u002Frobotsix-chat\u002Fblob\u002Fmain\u002Fsrc\u002Frobotsix_chat\u002Flifecycle\u002Fskill.md",true,[42,48,52],{"path":43,"resourceType":44,"resourceTypeDesc":45,"sizeBytes":46,"sourceHtmlUrl":47},"__init__.py","SCRIPT","脚本",12211,"https:\u002F\u002Fgithub.com\u002Fdamien-robotsix\u002Frobotsix-chat\u002Fblob\u002Fmain\u002Fsrc\u002Frobotsix_chat\u002Flifecycle\u002F__init__.py",{"path":49,"resourceType":44,"resourceTypeDesc":45,"sizeBytes":50,"sourceHtmlUrl":51},"client.py",23345,"https:\u002F\u002Fgithub.com\u002Fdamien-robotsix\u002Frobotsix-chat\u002Fblob\u002Fmain\u002Fsrc\u002Frobotsix_chat\u002Flifecycle\u002Fclient.py",{"path":53,"resourceType":44,"resourceTypeDesc":45,"sizeBytes":54,"sourceHtmlUrl":55},"drain.py",5720,"https:\u002F\u002Fgithub.com\u002Fdamien-robotsix\u002Frobotsix-chat\u002Fblob\u002Fmain\u002Fsrc\u002Frobotsix_chat\u002Flifecycle\u002Fdrain.py",[57,63,69,75,81,87],{"skillNo":58,"name":59,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":18},"01M75TTQ70FE02S8DNAB423T5H","volume_tools","https:\u002F\u002Fgithub.com\u002Fdamien-robotsix\u002Frobotsix-chat\u002Fblob\u002Fmain\u002Fsrc\u002Frobotsix_chat\u002Fvolume_tools\u002Fskill.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":18},"01M75TTNCPAPZBKHJTM4WFVAP1","ticket_poll","https:\u002F\u002Fgithub.com\u002Fdamien-robotsix\u002Frobotsix-chat\u002Fblob\u002Fmain\u002Fsrc\u002Frobotsix_chat\u002Fticket_poll\u002Fskill.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":18},"01M75TTHW71NXKXW144682SPF1","subsessions","https:\u002F\u002Fgithub.com\u002Fdamien-robotsix\u002Frobotsix-chat\u002Fblob\u002Fmain\u002Fsrc\u002Frobotsix_chat\u002Fsubsessions\u002Fskill.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":18},"01M75TTGBAFPVH6759BNB3G3NR","security","https:\u002F\u002Fgithub.com\u002Fdamien-robotsix\u002Frobotsix-chat\u002Fblob\u002Fmain\u002Fsrc\u002Frobotsix_chat\u002Frepo\u002Fsecurity\u002Fskill.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":18},"01M75TTCZN8GTQQ92GR7Z6E7Y2","direct","https:\u002F\u002Fgithub.com\u002Fdamien-robotsix\u002Frobotsix-chat\u002Fblob\u002Fmain\u002Fsrc\u002Frobotsix_chat\u002Frepo\u002Fdirect\u002Fskill.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":18},"01M75TT98KF65BJQNPQ61GQFKV","actions","https:\u002F\u002Fgithub.com\u002Fdamien-robotsix\u002Frobotsix-chat\u002Fblob\u002Fmain\u002Fsrc\u002Frobotsix_chat\u002Frepo\u002Factions\u002Fskill.md",[],[]]