id: preflight_status
namespace: studio.nas_kb_memory_governance

description: |
  Manual preflight for the NAS KB memory-governance Kestra takeover. No profile collection, no Feishu approval, no NAS write.

tasks:
  - id: preflight
    type: io.kestra.plugin.core.http.Request
    uri: http://host.docker.internal:19092/v1/nas-kb/run
    method: POST
    timeout: PT60S
    headers:
      Authorization: "Bearer {{ secret('KESTRA_AGENT_BRIDGE_TOKEN') }}"
      Content-Type: application/json
    body: |
      {
        "request_id": "{{ execution.id }}-preflight",
        "task_key": "preflight"
      }
