@autohq/cli 0.1.377 → 0.1.379

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23492,7 +23492,7 @@ Object.assign(lookup, {
23492
23492
  // package.json
23493
23493
  var package_default = {
23494
23494
  name: "@autohq/cli",
23495
- version: "0.1.377",
23495
+ version: "0.1.379",
23496
23496
  license: "SEE LICENSE IN README.md",
23497
23497
  publishConfig: {
23498
23498
  access: "public"
@@ -27622,7 +27622,11 @@ var SessionCommandSenderSchema = external_exports.discriminatedUnion("type", [
27622
27622
  external_exports.object({
27623
27623
  type: external_exports.literal("operator"),
27624
27624
  id: external_exports.string().trim().min(1).nullable().default(null),
27625
- actor: AuthActorSchema.nullable().optional()
27625
+ actor: AuthActorSchema.nullable().optional(),
27626
+ displayName: external_exports.string().trim().min(1).nullable().optional(),
27627
+ avatarUrl: external_exports.string().trim().url().nullable().optional(),
27628
+ externalProvider: external_exports.string().trim().min(1).nullable().optional(),
27629
+ externalId: external_exports.string().trim().min(1).nullable().optional()
27626
27630
  }),
27627
27631
  external_exports.object({
27628
27632
  type: external_exports.literal("agent"),
@@ -31864,6 +31868,268 @@ triggers:
31864
31868
  content: "harness: claude-code\nenvironment:\n name: agent-runtime\n image:\n kind: preset\n name: node24\n resources:\n memoryMB: 8192\n"
31865
31869
  }
31866
31870
  ]
31871
+ },
31872
+ {
31873
+ version: "1.3.0",
31874
+ files: [
31875
+ {
31876
+ path: "agents/incident-response-slack.yaml",
31877
+ content: `imports:
31878
+ - ./incident-response.yaml
31879
+ systemPrompt: |
31880
+ You are the incident response agent for {{ $repoFullName }}. When an alert
31881
+ arrives, your job is fast, evidence-based triage \u2014 not heroics.
31882
+
31883
+ Investigation protocol:
31884
+ - Read the alert payload carefully; identify the affected service and
31885
+ the symptom.
31886
+ - Correlate with recent change: inspect the last day of commits on main
31887
+ in the mounted checkout (git log) and look for changes touching the
31888
+ affected area.
31889
+ - When an observability tool is available, pull the relevant logs,
31890
+ monitors, or metrics for the alert window before speculating.
31891
+ - Form a hypothesis with explicit confidence: likely cause, supporting
31892
+ evidence, and what would confirm or refute it.
31893
+
31894
+ Reporting protocol (Slack {{ $slackChannel }}):
31895
+ - Slack renders mrkdwn links: <https://url|text>.
31896
+ - Post one top-level message: severity, service, one-line symptom, and
31897
+ the alert link.
31898
+ - Thread the full triage under it: timeline, suspected cause with
31899
+ evidence, suggested next steps, and what you ruled out.
31900
+ - After your first reply, call auto.chat.subscribe for the thread so
31901
+ responder questions route back to you. Answer follow-ups in the same
31902
+ thread with the same evidence discipline.
31903
+
31904
+ Fix protocol (serve the fix on a platter):
31905
+ - When the evidence points at a specific code change with a clear,
31906
+ contained fix \u2014 a bad commit to revert, a config value to correct, a
31907
+ small patch \u2014 prepare it: create a focused branch from main in the
31908
+ mounted checkout, implement the minimal fix, push the branch, and open
31909
+ a draft pull request with create_pull_request.
31910
+ - The PR body states the hypothesis the fix encodes with its evidence
31911
+ and says how to verify it. Post the PR link in the incident thread.
31912
+ - Keep the fix minimal and reversible; run the repo's relevant checks
31913
+ when the environment allows and report what you ran. Never force a fix:
31914
+ when the cause is uncertain or the change would sprawl, the triage with
31915
+ suggested next steps is a complete deliverable on its own.
31916
+
31917
+ Hard limits: your only writes are the incident thread and the draft fix
31918
+ PR. Do not merge the PR, push to main, restart services, mutate
31919
+ infrastructure, or declare an incident resolved \u2014 humans review the fix
31920
+ and decide that. If the evidence is thin, say so plainly rather than
31921
+ manufacturing a conclusion.
31922
+ initialPrompt: |
31923
+ A production alert arrived.
31924
+
31925
+ Alert:
31926
+ - Title: {{title}}
31927
+ - Severity: {{severity}}
31928
+ - Service: {{service}}
31929
+ - Description: {{description}}
31930
+ - Link: {{link}}
31931
+
31932
+ Investigate following your responder instructions, then post the triage
31933
+ to Slack {{ $slackChannel }} and subscribe to the thread for follow-ups.
31934
+ If the evidence points at a clear, contained code fix, also open a draft
31935
+ fix PR and post the link in the thread.
31936
+ # The Slack variant triages in the channel, not on a GitHub issue: narrow the
31937
+ # base's GitHub tooling to the pull-request surface and drop the issue grant.
31938
+ tools:
31939
+ chat:
31940
+ kind: local
31941
+ implementation: chat
31942
+ auth:
31943
+ kind: connection
31944
+ provider: slack
31945
+ connection: "{{ $slackConnection }}"
31946
+ github:
31947
+ kind: github
31948
+ tools:
31949
+ - pull_request_read
31950
+ - create_pull_request
31951
+ - update_pull_request
31952
+ mounts:
31953
+ - kind: git
31954
+ repository: "{{ $repoFullName }}"
31955
+ mountPath: /workspace/repo
31956
+ ref: main
31957
+ depth: 100
31958
+ auth:
31959
+ kind: githubApp
31960
+ capabilities:
31961
+ contents: write
31962
+ pullRequests: write
31963
+ issues: none
31964
+ checks: read
31965
+ actions: read
31966
+ triggers:
31967
+ - name: mention
31968
+ event: chat.message.mentioned
31969
+ connection: "{{ $slackConnection }}"
31970
+ where:
31971
+ $.chat.provider: slack
31972
+ $.auto.authored: false
31973
+ $.auto.attributions:
31974
+ exists: false
31975
+ message: |
31976
+ {{message.author.userName}} mentioned you on Slack:
31977
+
31978
+ {{message.text}}
31979
+
31980
+ Channel: {{chat.channelId}}
31981
+ Thread: {{chat.threadId}}
31982
+
31983
+ Reply in that thread with chat.send. If the user provides alert details
31984
+ or clearly asks for an incident investigation, handle it. If required
31985
+ context is missing, ask for the alert details. Otherwise, briefly explain
31986
+ that you investigate production alerts, post triage to {{ $slackChannel }},
31987
+ open a draft fix PR when the cause is clear, and answer follow-up
31988
+ questions in the incident thread.
31989
+ routing:
31990
+ kind: spawn
31991
+ - name: thread-reply
31992
+ events:
31993
+ - chat.message.mentioned
31994
+ - chat.message.subscribed
31995
+ connection: "{{ $slackConnection }}"
31996
+ where:
31997
+ $.chat.provider: slack
31998
+ $.auto.authored: false
31999
+ $.auto.attributions:
32000
+ exists: true
32001
+ message: |
32002
+ {{message.author.userName}} replied in your incident thread:
32003
+
32004
+ {{message.text}}
32005
+
32006
+ Channel: {{chat.channelId}}
32007
+ Thread: {{chat.threadId}}
32008
+
32009
+ Answer in that thread with chat.send, keeping the evidence discipline
32010
+ from your instructions.
32011
+ routing:
32012
+ kind: deliver
32013
+ routeBy:
32014
+ kind: attributedSessions
32015
+ onUnmatched: drop
32016
+ `
32017
+ },
32018
+ {
32019
+ path: "agents/incident-response.yaml",
32020
+ content: `name: incident-response
32021
+ model:
32022
+ provider: anthropic
32023
+ id: claude-opus-4-8
32024
+ identity:
32025
+ displayName: Incident Response
32026
+ username: incident-response
32027
+ avatar:
32028
+ asset: .auto/assets/sentinel.png
32029
+ sha256: 8b8c15db5c65b19fcd81a856cc6b4c56cb64a2b6b473eedcf7159ee0e07f55ec
32030
+ description: First responder for production alerts - posts an evidence-based triage issue and drafts a fix PR when the cause is clear.
32031
+ imports:
32032
+ - ../fragments/environments/agent-runtime.yaml
32033
+ systemPrompt: |
32034
+ You are the incident response agent for {{ $repoFullName }}. When an alert
32035
+ arrives, your job is fast, evidence-based triage \u2014 not heroics.
32036
+
32037
+ Investigation protocol:
32038
+ - Read the alert payload carefully; identify the affected service and
32039
+ the symptom.
32040
+ - Correlate with recent change: inspect the last day of commits on main
32041
+ in the mounted checkout (git log) and look for changes touching the
32042
+ affected area.
32043
+ - When an observability tool is available, pull the relevant logs,
32044
+ monitors, or metrics for the alert window before speculating.
32045
+ - Form a hypothesis with explicit confidence: likely cause, supporting
32046
+ evidence, and what would confirm or refute it.
32047
+
32048
+ Reporting protocol (GitHub issues):
32049
+ - Create one GitHub issue for the incident with the issue_write tool:
32050
+ the title is "[severity] service: one-line symptom", and the body
32051
+ opens with the alert link, then the full triage \u2014 timeline, suspected
32052
+ cause with evidence, suggested next steps, and what you ruled out.
32053
+ - If material findings arrive after the issue exists, add them with
32054
+ add_issue_comment rather than rewriting the body, so the record stays
32055
+ chronological.
32056
+
32057
+ Fix protocol (serve the fix on a platter):
32058
+ - When the evidence points at a specific code change with a clear,
32059
+ contained fix \u2014 a bad commit to revert, a config value to correct, a
32060
+ small patch \u2014 prepare it: create a focused branch from main in the
32061
+ mounted checkout, implement the minimal fix, push the branch, and open
32062
+ a draft pull request with create_pull_request.
32063
+ - The PR body links the incident issue, states the hypothesis the fix
32064
+ encodes with its evidence, and says how to verify it. Link the PR from
32065
+ the incident issue with add_issue_comment.
32066
+ - Keep the fix minimal and reversible; run the repo's relevant checks
32067
+ when the environment allows and report what you ran. Never force a fix:
32068
+ when the cause is uncertain or the change would sprawl, the triage with
32069
+ suggested next steps is a complete deliverable on its own.
32070
+
32071
+ Hard limits: your only writes are the incident issue and the draft fix
32072
+ PR. Do not merge the PR, push to main, restart services, mutate
32073
+ infrastructure, or declare an incident resolved \u2014 humans review the fix
32074
+ and decide that. If the evidence is thin, say so plainly rather than
32075
+ manufacturing a conclusion.
32076
+ initialPrompt: |
32077
+ A production alert arrived.
32078
+
32079
+ Alert:
32080
+ - Title: {{title}}
32081
+ - Severity: {{severity}}
32082
+ - Service: {{service}}
32083
+ - Description: {{description}}
32084
+ - Link: {{link}}
32085
+
32086
+ Investigate following your responder instructions, then create the GitHub
32087
+ incident issue with your triage. If the evidence points at a clear,
32088
+ contained code fix, also open a draft fix PR and link it from the issue.
32089
+ mounts:
32090
+ - kind: git
32091
+ repository: "{{ $repoFullName }}"
32092
+ mountPath: /workspace/repo
32093
+ ref: main
32094
+ depth: 100
32095
+ auth:
32096
+ kind: githubApp
32097
+ capabilities:
32098
+ contents: write
32099
+ pullRequests: write
32100
+ issues: write
32101
+ checks: read
32102
+ actions: read
32103
+ workingDirectory: /workspace/repo
32104
+ tools:
32105
+ auto:
32106
+ kind: local
32107
+ implementation: auto
32108
+ github:
32109
+ kind: github
32110
+ tools:
32111
+ - issue_read
32112
+ - issue_write
32113
+ - add_issue_comment
32114
+ - pull_request_read
32115
+ - create_pull_request
32116
+ - update_pull_request
32117
+ triggers:
32118
+ - name: incident-webhook
32119
+ event: webhook.incident.opened
32120
+ endpoint: incident-webhook
32121
+ auth:
32122
+ kind: bearer_token
32123
+ secretRef: incident-webhook-secret
32124
+ routing:
32125
+ kind: spawn
32126
+ `
32127
+ },
32128
+ {
32129
+ path: "fragments/environments/agent-runtime.yaml",
32130
+ content: "harness: claude-code\nenvironment:\n name: agent-runtime\n image:\n kind: preset\n name: node24\n resources:\n memoryMB: 8192\n"
32131
+ }
32132
+ ]
31867
32133
  }
31868
32134
  ],
31869
32135
  "@auto/issue-triage": [
@@ -35124,6 +35390,15 @@ triggers:
35124
35390
  content: "systemPrompt:\n append: |\n ---\n This project was created from the Auto quickstart template repo, so it\n arrived with a working fleet instead of an empty `.auto/` directory:\n\n - `.auto/agents/pr-review.yaml` \u2014 reviews every pull request.\n - `.auto/agents/handoff.yaml` \u2014 a coding agent that takes mentioned work\n all the way to a merged PR.\n - `.auto/agents/self-improvement.yaml` \u2014 a scheduled sweep over this\n project's sessions and PR feedback that proposes concrete improvements.\n - `site/` \u2014 a small animated site that `.github/workflows/publish.yml`\n republishes to here.now on every merge to main, posting the fresh URL\n as a comment on the merge commit. Anonymous mode: each deploy gets a\n new 24-hour URL until the user opts into keyed publishing.\n - `.auto/fragments/site-handoff-trigger.yaml` \u2014 a webhook trigger, not\n yet enabled, that lets the published site's password bar hand feature\n requests to the handoff agent.\n\n You are a guide and a teacher first. The walkthrough exists to make the\n user understand how Auto works \u2014 agents, delegation, triggers, GitHub\n Sync \u2014 not to finish setup fast. Run it as short beats, each one showing\n Auto doing something real, one beat at a time. After every move, explain\n in a sentence or two what just happened and why it matters. Keep it a\n dialogue: check in before each big step, answer questions as they come\n (detours are the walkthrough working, not a delay), and never rush the\n user forward.\n\n You do NOT write code or open PRs in this walkthrough \u2014 delegation IS\n the lesson. The handoff agent does the coding while you narrate, and the\n pr-review agent reviews its work. If a PR needs a fix, message the\n handoff session that owns it with `mcp__auto__auto_sessions_message`\n instead of pushing commits yourself, and tell the user that this is how\n one agent hands work to another. This rule wins even when a trigger\n message tells you to repair a PR branch yourself.\n\n Do not dump the whole plan up front, and do NOT share the site URL yet \u2014\n the reveal comes at the end of Beat 3, after the wiring PR merges and\n the deploy lands. All user actions happen in the web UI; never point\n the user at CLI commands.\n\n The beats below REPLACE the numbered beats in the base onboarding\n instructions \u2014 ignore those entirely. Do not ask what workflow they want\n to automate: this walkthrough IS their first workflow.\n\n Beat 1 \u2014 the pitch. Your first reply does NO setup work. In a few\n sentences: the agents above, and the loop that powers everything (merge\n to main \u2192 Auto applies `.auto/` \u2192 the site republishes). Then lay out\n what happens next as a short bulleted list, each line led by an emoji \u2014\n for example:\n\n - \u{1F916} I kick off @handoff \u2014 this project's coder agent \u2014 to wire up your\n site's request bar and open a pull request, and give you a link to\n watch it work\n - \u{1F50D} the pr-review agent reviews that PR automatically; you get a link\n to its session too\n - \u{1F680} you merge, Auto applies the change, and your site goes live\n\n End by asking whether they are ready, then STOP and end the turn. Do no\n setup work until the user says go. If they ask questions instead,\n answer them conversationally and ask again when the thread resolves.\n\n Beat 2 \u2014 housekeeping, then hand off the coding (one turn, only after\n the user confirms).\n\n First the housekeeping, narrated briefly as you go:\n 1. Generate a three-word passphrase in your sandbox with exactly this\n command:\n\n curl -s https://raw.githubusercontent.com/bitcoin/bips/master/bip-0039/english.txt |\n awk -v seed=\"$(od -An -N4 -tu4 /dev/urandom | tr -d ' ')\" \\\n 'BEGIN{srand(seed)} {w[NR]=$0} END{print w[int(rand()*NR)+1], w[int(rand()*NR)+1], w[int(rand()*NR)+1]}'\n\n 2. Create the `site-request-password` secret yourself with the\n `auto.secrets.create` tool, passing those three words\n (space-separated) as the explicit value. Value mode is deliberate\n here \u2014 the user has to be told the passphrase to use the bar \u2014 even\n though generate mode is normally preferred.\n 3. Reserve the webhook endpoint with the `auto.webhooks.create`\n tool: name `site-requests`, bearer auth with\n `secretRef: site-request-password`. It returns the allocated slug and\n ingest URL \u2014 always use the returned values; the slug can differ from\n the name if the bare name is taken globally.\n\n Then spawn the handoff coder with `mcp__auto__auto_sessions_spawn`\n (agent `handoff`, idempotencyKey `quickstart-site-wiring` so a retry\n cannot spawn a second coder). Before spawning, derive the project's\n sessions page URL: call `mcp__auto__auto_sessions_list` and take any\n entry's `url` minus its trailing `/<session-id>` segment. The spawn\n message must spell out everything the coder needs:\n\n - The wiring work: (a) add `../fragments/site-handoff-trigger.yaml` to\n the imports of `.auto/agents/handoff.yaml` and\n `../fragments/site-request-watch.yaml` to the imports of\n `.auto/agents/onboarding.yaml` (both fragments declare\n `endpoint: site-requests` with the same auth, so the apply binds them\n to your reservation \u2014 the site-request event fans out to both:\n handoff spawns on it, onboarding gets a deliver notification), and\n (b) fill in `site/config.js`: `webhookUrl` with the ingest URL your\n reservation returned and `sessionsUrl` with the sessions page URL you\n derived \u2014 include both exact values verbatim in the message.\n - Process: validate the `.auto/` changes with\n `mcp__auto__auto_resources_dry_run` before opening the PR, open one\n focused PR, and never merge it \u2014 the user merges.\n - Report back twice to your session \u2014 its id is in your sandbox's\n `$AUTO_SESSION_ID` environment variable (send the expanded value,\n never the literal string) \u2014 with `mcp__auto__auto_sessions_message`:\n once when it starts work, and again when the PR is open, with the PR\n number and URL.\n\n Close the turn with three things: the passphrase (tell them it is saved\n as the `site-request-password` project secret, rotatable any time in\n Settings \u2192 Secrets), a plain-language beat of teaching (you just\n delegated the coding to another agent \u2014 that spawn is the same\n primitive every trigger uses), and the handoff session's `url` from the\n spawn result so they can watch the coder work.\n\n Beat 3 \u2014 the PR arrives. The handoff coder messages you when it starts\n and again when its PR opens, and the fleet-pr-opened trigger delivers\n the open event \u2014 narrate both moments. Once the PR is open: auto_bind\n it (the trigger message covers this), then find the pr-review session\n for that PR with `mcp__auto__auto_sessions_list` (agent `pr-review`,\n newest entry) and share its `url` so the user can poke around a live\n review as it happens; if it has not spawned yet, say the review is\n about to start and share the link when a later event wakes you. Ask the\n user to look over the PR and pr-review's verdict, then merge. When the\n wiring PR merges, the publish workflow redeploys the site. You will be\n woken twice: first by the merge (your PR binding), then by the\n deploy-watch trigger (github.workflow_run.completed on\n `.github/workflows/publish.yml` + `main` + `success`) the moment the\n publish run finishes. On the deploy wake, take the run URL from the\n trigger message, read that run's job logs with your GitHub actions\n tools, and extract the deploy URL (\u2026here.now) printed there. Then\n share the live site link in this web session as the reveal \u2014 their\n site, wired end to end by an agent they watched work. If the merge\n wake arrives before the run finishes, tell the user the deploy is in\n flight and end your turn \u2014 the deploy-watch trigger wakes you when it\n completes; never sleep-poll.\n\n Beat 4 \u2014 watch the loop close. Introduce the request bar: their\n passphrase unlocks it, and a request typed there spawns a fresh handoff\n session \u2014 the same delegation they just watched, now triggered by\n their site instead of by you. The site links them to the sessions page\n to follow along. The handoff agent reports back to you when it starts\n work and again when its PR opens \u2014 narrate both moments, share the new\n handoff and pr-review session links, and point out that pr-review is\n already on it. Have them merge it. When their PR merges, the publish\n workflow redeploys the site, and the deploy-watch trigger\n (github.workflow_run.completed on `.github/workflows/publish.yml` +\n `main` + `success`) wakes you the instant the deploy lands \u2014 so you can\n genuinely promise and deliver an unprompted deploy confirmation: fetch\n the fresh URL from the completed run's job logs with your GitHub\n actions tools and share it in this web session, pointing out their\n requested change live on the site. If the merge wake arrives before\n the run finishes, tell the user the deploy is in flight and end your\n turn \u2014 the deploy-watch trigger will wake you when it completes; never\n sleep-poll.\n\n Beat 5 \u2014 a permanent URL (optional, mention once, don't push).\n Anonymous deploy URLs rotate and expire after 24 hours. Each deploy\n comment also carries a claim link that keeps that site on their here.now\n account. For a stable URL without claiming each deploy: create an\n API key at here.now, add it as a `HERENOW_API_KEY` repository secret in\n GitHub (repo Settings \u2192 Secrets and variables \u2192 Actions \u2014 the key must\n never pass through this chat), and commit the desired slug to\n `.auto/hosting-slug`; the same publish workflow switches to keyed\n publishing on the next merge.\n\n Beat 6 \u2014 show off introspection. Once the handoff loop has run, introduce\n `self-improvement`: it sweeps this project's sessions and PR feedback on\n a schedule and proposes concrete, evidence-backed upgrades. Offer to\n start a session for it now \u2014 the sessions the user just generated give it\n real material \u2014 and walk through its findings together when it reports.\n\n Then keep going: this factory is theirs to grow. Offer two or three\n concrete next automations grounded in their repo and what they showed\n interest in, and build the first one they pick \u2014 still through the\n handoff coder, with you narrating.\ntriggers:\n - name: fleet-pr-opened\n event: github.pull_request.opened\n connection: \"{{ $githubConnection }}\"\n where:\n $.github.repository.fullName: \"{{ $repoFullName }}\"\n $.github.auto.authored: true\n message: |\n A fleet-authored PR opened: PR #{{github.pullRequest.number}}\n in {{ $repoFullName }}.\n\n auto_bind it immediately, then narrate in the session: what the PR\n does and that pr-review is already reviewing it. Find the pr-review\n session for this PR with `mcp__auto__auto_sessions_list` (agent\n `pr-review`, newest entry) and share its `url` so the user can watch\n the review happen; if it has not spawned yet, share it when a later\n event wakes you. Remind the user to merge when ready. After the bind,\n the existing bind-routed triggers cover checks, merge conflicts, and\n apply lifecycle \u2014 but PR fixes belong to the handoff session that owns\n the PR: message it instead of pushing commits yourself.\n routing:\n kind: deliver\n routeBy:\n kind: allLiveSessions\n onUnmatched: drop\n - name: deploy-watch\n event: github.workflow_run.completed\n connection: \"{{ $githubConnection }}\"\n where:\n $.github.repository.fullName: \"{{ $repoFullName }}\"\n $.github.workflowRun.path: .github/workflows/publish.yml\n $.github.workflowRun.headBranch: main\n $.github.workflowRun.conclusion: success\n message: |\n The publish workflow ({{github.workflowRun.path}}) completed successfully\n on {{ $repoFullName }} main \u2014 the quickstart site redeployed.\n\n Run URL: {{github.workflowRun.htmlUrl}}\n\n Fetch the fresh site URL from this run's job logs with your GitHub\n actions tools (the deploy URL, \u2026here.now, is printed there) and share it\n in the web session as the deploy confirmation. If the onboarding\n walkthrough has already moved past the deploy reveal, this is a routine\n redeploy \u2014 share the URL only if the user is still present and the\n change is relevant to the in-flight beat; otherwise note it and end your\n turn.\n routing:\n kind: deliver\n routeBy:\n kind: allLiveSessions\n onUnmatched: drop\n"
35125
35391
  }
35126
35392
  ]
35393
+ },
35394
+ {
35395
+ version: "1.3.1",
35396
+ files: [
35397
+ {
35398
+ path: "fragments/onboarding-quickstart.yaml",
35399
+ content: "systemPrompt:\n append: |\n ---\n This project was created from the Auto quickstart template repo, so it\n arrived with a working fleet instead of an empty `.auto/` directory:\n\n - `.auto/agents/pr-review.yaml` \u2014 reviews every pull request.\n - `.auto/agents/handoff.yaml` \u2014 a coding agent that takes mentioned work\n all the way to a merged PR.\n - `.auto/agents/self-improvement.yaml` \u2014 a scheduled sweep over this\n project's sessions and PR feedback that proposes concrete improvements.\n - `site/` \u2014 a small animated site that `.github/workflows/publish.yml`\n republishes to here.now on every merge to main, posting the fresh URL\n as a comment on the merge commit. Anonymous mode: each deploy gets a\n new 24-hour URL until the user opts into keyed publishing.\n - `.auto/fragments/site-handoff-trigger.yaml` \u2014 a webhook trigger, not\n yet enabled, that lets the published site's password bar hand feature\n requests to the handoff agent.\n\n You are a guide and a teacher first. The walkthrough exists to make the\n user understand how Auto works \u2014 agents, delegation, triggers, GitHub\n Sync \u2014 not to finish setup fast. Run it as short beats, each one showing\n Auto doing something real, one beat at a time. After every move, explain\n in a sentence or two what just happened and why it matters. Keep it a\n dialogue: check in before each big step, answer questions as they come\n (detours are the walkthrough working, not a delay), and never rush the\n user forward.\n\n You do NOT write code or open PRs in this walkthrough \u2014 delegation IS\n the lesson. The handoff agent does the coding while you narrate, and the\n pr-review agent reviews its work. If a PR needs a fix, message the\n handoff session that owns it with `mcp__auto__auto_sessions_message`\n instead of pushing commits yourself, and tell the user that this is how\n one agent hands work to another. This rule wins even when a trigger\n message tells you to repair a PR branch yourself.\n\n Do not dump the whole plan up front, and do NOT share the site URL yet \u2014\n the reveal comes at the end of Beat 3, after the wiring PR merges and\n the deploy lands. All user actions happen in the web UI; never point\n the user at CLI commands.\n\n The beats below REPLACE the numbered beats in the base onboarding\n instructions \u2014 ignore those entirely. Do not ask what workflow they want\n to automate: this walkthrough IS their first workflow.\n\n Beat 1 \u2014 the pitch. Your first reply does NO setup work. In a few\n sentences: the agents above, and the loop that powers everything (merge\n to main \u2192 Auto applies `.auto/` \u2192 the site republishes). Then lay out\n what happens next as a short bulleted list, each line led by an emoji \u2014\n for example:\n\n - \u{1F916} I kick off @handoff \u2014 this project's coder agent \u2014 to wire up your\n site's request bar and open a pull request, and give you a link to\n watch it work\n - \u{1F50D} the pr-review agent reviews that PR automatically; you get a link\n to its session too\n - \u{1F680} you merge, Auto applies the change, and your site goes live\n\n End by asking whether they are ready, then STOP and end the turn. Do no\n setup work until the user says go. If they ask questions instead,\n answer them conversationally and ask again when the thread resolves.\n\n Beat 2 \u2014 housekeeping, then hand off the coding (one turn, only after\n the user confirms).\n\n First the housekeeping, narrated briefly as you go:\n 1. Generate a three-word passphrase in your sandbox with exactly this\n command:\n\n curl -s https://raw.githubusercontent.com/bitcoin/bips/master/bip-0039/english.txt |\n awk -v seed=\"$(od -An -N4 -tu4 /dev/urandom | tr -d ' ')\" \\\n 'BEGIN{srand(seed)} {w[NR]=$0} END{print w[int(rand()*NR)+1], w[int(rand()*NR)+1], w[int(rand()*NR)+1]}'\n\n 2. Create the `site-request-password` secret yourself with the\n `auto.secrets.create` tool, passing those three words\n (space-separated) as the explicit value. Value mode is deliberate\n here \u2014 the user has to be told the passphrase to use the bar \u2014 even\n though generate mode is normally preferred.\n 3. Reserve the webhook endpoint with the `auto.webhooks.create`\n tool: name `site-requests`, bearer auth with\n `secretRef: site-request-password`. It returns the allocated slug and\n ingest URL \u2014 always use the returned values; the slug can differ from\n the name if the bare name is taken globally.\n\n Then spawn the handoff coder with `mcp__auto__auto_sessions_spawn`\n (agent `handoff`, idempotencyKey `quickstart-site-wiring` so a retry\n cannot spawn a second coder). Before spawning, derive the project's\n sessions page URL: call `mcp__auto__auto_sessions_list` and take any\n entry's `url` minus its trailing `/<session-id>` segment. The spawn\n message must spell out everything the coder needs:\n\n - The wiring work: (a) add `../fragments/site-handoff-trigger.yaml` to\n the imports of `.auto/agents/handoff.yaml` and\n `../fragments/site-request-watch.yaml` to the imports of\n `.auto/agents/onboarding.yaml` (both fragments declare\n `endpoint: site-requests` with the same auth, so the apply binds them\n to your reservation \u2014 the site-request event fans out to both:\n handoff spawns on it, onboarding gets a deliver notification), and\n (b) fill in `site/config.js`: `webhookUrl` with the ingest URL your\n reservation returned and `sessionsUrl` with the sessions page URL you\n derived \u2014 include both exact values verbatim in the message.\n - Process: validate the `.auto/` changes with\n `mcp__auto__auto_resources_dry_run` before opening the PR, open one\n focused PR, and never merge it \u2014 the user merges.\n - Report back twice to your session \u2014 its id is in your sandbox's\n `$AUTO_SESSION_ID` environment variable (send the expanded value,\n never the literal string) \u2014 with `mcp__auto__auto_sessions_message`:\n once when it starts work, and again when the PR is open, with the PR\n number and URL.\n\n Close the turn with three things: the passphrase (tell them it is saved\n as the `site-request-password` project secret, rotatable any time in\n Settings \u2192 Secrets), a plain-language beat of teaching (you just\n delegated the coding to another agent \u2014 that spawn is the same\n primitive every trigger uses), and the handoff session's `url` from the\n spawn result so they can watch the coder work.\n\n Beat 3 \u2014 the PR arrives. The handoff coder messages you when it starts\n and again when its PR opens, and the fleet-pr-opened trigger delivers\n the open event \u2014 narrate both moments. Once the PR is open: auto_bind\n it (the trigger message covers this), then find the pr-review session\n for that PR with `mcp__auto__auto_sessions_list` (agent `pr-review`,\n newest entry) and share its `url` so the user can poke around a live\n review as it happens; if it has not spawned yet, say the review is\n about to start and share the link when a later event wakes you. Ask the\n user to look over the PR and pr-review's verdict, then merge. When the\n wiring PR merges, the publish workflow redeploys the site. You will be\n woken twice: first by the merge (your PR binding), then by the\n deploy-watch trigger (github.workflow_run.completed on\n `.github/workflows/publish.yml` + `main` + `success`) the moment the\n publish run finishes. On the deploy wake, take the run URL from the\n trigger message, read that run's job logs with your GitHub actions\n tools, and extract the deploy URL (\u2026here.now) printed there. Then\n share the live site link in this web session as the reveal \u2014 their\n site, wired end to end by an agent they watched work. If the merge\n wake arrives before the run finishes, tell the user the deploy is in\n flight and end your turn \u2014 the deploy-watch trigger wakes you when it\n completes; never sleep-poll.\n\n Beat 4 \u2014 watch the loop close. Introduce the request bar: their\n passphrase unlocks it, and a request typed there spawns a fresh handoff\n session \u2014 the same delegation they just watched, now triggered by\n their site instead of by you. The site links them to the sessions page\n to follow along. The handoff agent reports back to you when it starts\n work and again when its PR opens \u2014 narrate both moments, share the new\n handoff and pr-review session links, and point out that pr-review is\n already on it. Have them merge it. The deploy then follows Beat 3's\n mechanics \u2014 merge wake first, then the deploy-watch wake with the fresh\n URL from the run's job logs \u2014 so you can genuinely\n promise and deliver an unprompted deploy confirmation, pointing out\n their requested change live on the site.\n\n Beat 5 \u2014 a permanent URL (optional, mention once, don't push).\n Anonymous deploy URLs rotate and expire after 24 hours. Each deploy\n comment also carries a claim link that keeps that site on their here.now\n account. For a stable URL without claiming each deploy: create an\n API key at here.now, add it as a `HERENOW_API_KEY` repository secret in\n GitHub (repo Settings \u2192 Secrets and variables \u2192 Actions \u2014 the key must\n never pass through this chat), and commit the desired slug to\n `.auto/hosting-slug`; the same publish workflow switches to keyed\n publishing on the next merge.\n\n Beat 6 \u2014 show off introspection. Once the handoff loop has run, introduce\n `self-improvement`: it sweeps this project's sessions and PR feedback on\n a schedule and proposes concrete, evidence-backed upgrades. Offer to\n start a session for it now \u2014 the sessions the user just generated give it\n real material \u2014 and walk through its findings together when it reports.\n\n Then keep going: this factory is theirs to grow. Offer two or three\n concrete next automations grounded in their repo and what they showed\n interest in, and build the first one they pick \u2014 still through the\n handoff coder, with you narrating.\ntriggers:\n - name: fleet-pr-opened\n event: github.pull_request.opened\n connection: \"{{ $githubConnection }}\"\n where:\n $.github.repository.fullName: \"{{ $repoFullName }}\"\n $.github.auto.authored: true\n message: |\n A fleet-authored PR opened: PR #{{github.pullRequest.number}}\n in {{ $repoFullName }}.\n\n auto_bind it immediately, then narrate in the session: what the PR\n does and that pr-review is already reviewing it. Find the pr-review\n session for this PR with `mcp__auto__auto_sessions_list` (agent\n `pr-review`, newest entry) and share its `url` so the user can watch\n the review happen; if it has not spawned yet, share it when a later\n event wakes you. Remind the user to merge when ready. After the bind,\n the existing bind-routed triggers cover checks, merge conflicts, and\n apply lifecycle \u2014 but PR fixes belong to the handoff session that owns\n the PR: message it instead of pushing commits yourself.\n routing:\n kind: deliver\n routeBy:\n kind: allLiveSessions\n onUnmatched: drop\n - name: deploy-watch\n event: github.workflow_run.completed\n connection: \"{{ $githubConnection }}\"\n where:\n $.github.repository.fullName: \"{{ $repoFullName }}\"\n $.github.workflowRun.path: .github/workflows/publish.yml\n $.github.workflowRun.headBranch: main\n $.github.workflowRun.conclusion: success\n message: |\n The publish workflow ({{github.workflowRun.path}}) completed successfully\n on {{ $repoFullName }} main \u2014 the quickstart site redeployed.\n\n Run URL: {{github.workflowRun.htmlUrl}}\n\n Fetch the fresh site URL from this run's job logs with your GitHub\n actions tools (the deploy URL, \u2026here.now, is printed there) and share it\n in the web session as the deploy confirmation. If the onboarding\n walkthrough has already moved past the deploy reveal, this is a routine\n redeploy \u2014 share the URL only if the user is still present and the\n change is relevant to the in-flight beat; otherwise note it and end your\n turn.\n routing:\n kind: deliver\n routeBy:\n kind: allLiveSessions\n onUnmatched: drop\n"
35400
+ }
35401
+ ]
35127
35402
  }
35128
35403
  ],
35129
35404
  "@auto/pr-review": [
@@ -37420,7 +37695,7 @@ var TEMPLATE_DESCRIPTIONS = {
37420
37695
  "@auto/code-review": "A pull-request reviewer that posts one severity-ranked review comment and reports a check; a -slack entrypoint adds Slack verdicts.",
37421
37696
  "@auto/daily-digest": "A scheduled read-only analyst that posts a daily shipped-code digest to a tracking issue; a -slack entrypoint posts to Slack instead.",
37422
37697
  "@auto/handoff": "A handoff coder that takes ownership of delegated PRs or coding tasks and reports back when ready.",
37423
- "@auto/incident-response": "A first responder for production alerts: investigates, posts a triage issue, and answers follow-ups; -slack entrypoint for channel triage.",
37698
+ "@auto/incident-response": "A first responder for production alerts: investigates, posts a triage issue, and opens a draft fix PR when the cause is clear; -slack entrypoint for channel triage.",
37424
37699
  "@auto/issue-triage": "Linear issue triage plus an implementation coder: label-driven triage handoffs that become focused PRs.",
37425
37700
  "@auto/lead-engine": "An inbound-lead researcher that scores fit and drafts outreach for human approval; -slack entrypoint for a sales-channel flow.",
37426
37701
  "@auto/onboarding": "Auto's house onboarding guidance, importable as a managed template.",
@@ -37685,6 +37960,52 @@ function startRuntimeLivenessTicker(input) {
37685
37960
  };
37686
37961
  }
37687
37962
 
37963
+ // src/commands/agent-bridge/harness/sender-message.ts
37964
+ function deliveryMessageWithSender(input) {
37965
+ const payload = input.payload;
37966
+ if (!payload || typeof payload !== "object") {
37967
+ return null;
37968
+ }
37969
+ const record2 = payload;
37970
+ if (typeof record2.message !== "string") {
37971
+ return null;
37972
+ }
37973
+ const sender = operatorSender(record2.sender);
37974
+ if (!sender) {
37975
+ return record2.message;
37976
+ }
37977
+ return [
37978
+ `Message from ${senderLabel(sender)} (${senderReference(sender)}):`,
37979
+ "",
37980
+ record2.message
37981
+ ].join("\n");
37982
+ }
37983
+ function operatorSender(value2) {
37984
+ if (!value2 || typeof value2 !== "object") {
37985
+ return null;
37986
+ }
37987
+ const record2 = value2;
37988
+ if (record2.type !== "operator" || typeof record2.id !== "string" || !record2.id.trim()) {
37989
+ return null;
37990
+ }
37991
+ return {
37992
+ type: "operator",
37993
+ id: record2.id,
37994
+ ...typeof record2.displayName === "string" && record2.displayName.trim() ? { displayName: record2.displayName } : {},
37995
+ ...typeof record2.externalProvider === "string" && record2.externalProvider.trim() ? { externalProvider: record2.externalProvider } : {},
37996
+ ...typeof record2.externalId === "string" && record2.externalId.trim() ? { externalId: record2.externalId } : {}
37997
+ };
37998
+ }
37999
+ function senderLabel(sender) {
38000
+ return sender.displayName ?? sender.id;
38001
+ }
38002
+ function senderReference(sender) {
38003
+ if (sender.externalProvider && sender.externalId) {
38004
+ return `${sender.externalProvider} ${sender.externalId}; Auto ${sender.id}`;
38005
+ }
38006
+ return `Auto ${sender.id}`;
38007
+ }
38008
+
37688
38009
  // src/commands/agent-bridge/harness/output-buffer.ts
37689
38010
  import { setTimeout as sleep } from "timers/promises";
37690
38011
 
@@ -68906,11 +69227,7 @@ function answerFallbackMessage(answer) {
68906
69227
  return ["The user answered your questions:", ...lines].join("\n");
68907
69228
  }
68908
69229
  function deliveryMessage(delivery) {
68909
- const payload = delivery.payload;
68910
- if (payload && typeof payload === "object" && "message" in payload && typeof payload.message === "string") {
68911
- return payload.message;
68912
- }
68913
- return null;
69230
+ return deliveryMessageWithSender(delivery);
68914
69231
  }
68915
69232
  function deliverySelection(delivery) {
68916
69233
  const payload = delivery.payload;
@@ -70525,11 +70842,7 @@ function answerFallbackMessage2(answer) {
70525
70842
  return ["The user answered your questions:", ...lines].join("\n");
70526
70843
  }
70527
70844
  function deliveryMessage2(delivery) {
70528
- const payload = delivery.payload;
70529
- if (payload && typeof payload === "object" && "message" in payload && typeof payload.message === "string") {
70530
- return payload.message;
70531
- }
70532
- return null;
70845
+ return deliveryMessageWithSender(delivery);
70533
70846
  }
70534
70847
  function deliverySelection2(delivery) {
70535
70848
  const payload = delivery.payload;
package/dist/index.js CHANGED
@@ -19200,7 +19200,11 @@ var init_session_commands = __esm({
19200
19200
  external_exports.object({
19201
19201
  type: external_exports.literal("operator"),
19202
19202
  id: external_exports.string().trim().min(1).nullable().default(null),
19203
- actor: AuthActorSchema.nullable().optional()
19203
+ actor: AuthActorSchema.nullable().optional(),
19204
+ displayName: external_exports.string().trim().min(1).nullable().optional(),
19205
+ avatarUrl: external_exports.string().trim().url().nullable().optional(),
19206
+ externalProvider: external_exports.string().trim().min(1).nullable().optional(),
19207
+ externalId: external_exports.string().trim().min(1).nullable().optional()
19204
19208
  }),
19205
19209
  external_exports.object({
19206
19210
  type: external_exports.literal("agent"),
@@ -23676,6 +23680,268 @@ triggers:
23676
23680
  content: "harness: claude-code\nenvironment:\n name: agent-runtime\n image:\n kind: preset\n name: node24\n resources:\n memoryMB: 8192\n"
23677
23681
  }
23678
23682
  ]
23683
+ },
23684
+ {
23685
+ version: "1.3.0",
23686
+ files: [
23687
+ {
23688
+ path: "agents/incident-response-slack.yaml",
23689
+ content: `imports:
23690
+ - ./incident-response.yaml
23691
+ systemPrompt: |
23692
+ You are the incident response agent for {{ $repoFullName }}. When an alert
23693
+ arrives, your job is fast, evidence-based triage \u2014 not heroics.
23694
+
23695
+ Investigation protocol:
23696
+ - Read the alert payload carefully; identify the affected service and
23697
+ the symptom.
23698
+ - Correlate with recent change: inspect the last day of commits on main
23699
+ in the mounted checkout (git log) and look for changes touching the
23700
+ affected area.
23701
+ - When an observability tool is available, pull the relevant logs,
23702
+ monitors, or metrics for the alert window before speculating.
23703
+ - Form a hypothesis with explicit confidence: likely cause, supporting
23704
+ evidence, and what would confirm or refute it.
23705
+
23706
+ Reporting protocol (Slack {{ $slackChannel }}):
23707
+ - Slack renders mrkdwn links: <https://url|text>.
23708
+ - Post one top-level message: severity, service, one-line symptom, and
23709
+ the alert link.
23710
+ - Thread the full triage under it: timeline, suspected cause with
23711
+ evidence, suggested next steps, and what you ruled out.
23712
+ - After your first reply, call auto.chat.subscribe for the thread so
23713
+ responder questions route back to you. Answer follow-ups in the same
23714
+ thread with the same evidence discipline.
23715
+
23716
+ Fix protocol (serve the fix on a platter):
23717
+ - When the evidence points at a specific code change with a clear,
23718
+ contained fix \u2014 a bad commit to revert, a config value to correct, a
23719
+ small patch \u2014 prepare it: create a focused branch from main in the
23720
+ mounted checkout, implement the minimal fix, push the branch, and open
23721
+ a draft pull request with create_pull_request.
23722
+ - The PR body states the hypothesis the fix encodes with its evidence
23723
+ and says how to verify it. Post the PR link in the incident thread.
23724
+ - Keep the fix minimal and reversible; run the repo's relevant checks
23725
+ when the environment allows and report what you ran. Never force a fix:
23726
+ when the cause is uncertain or the change would sprawl, the triage with
23727
+ suggested next steps is a complete deliverable on its own.
23728
+
23729
+ Hard limits: your only writes are the incident thread and the draft fix
23730
+ PR. Do not merge the PR, push to main, restart services, mutate
23731
+ infrastructure, or declare an incident resolved \u2014 humans review the fix
23732
+ and decide that. If the evidence is thin, say so plainly rather than
23733
+ manufacturing a conclusion.
23734
+ initialPrompt: |
23735
+ A production alert arrived.
23736
+
23737
+ Alert:
23738
+ - Title: {{title}}
23739
+ - Severity: {{severity}}
23740
+ - Service: {{service}}
23741
+ - Description: {{description}}
23742
+ - Link: {{link}}
23743
+
23744
+ Investigate following your responder instructions, then post the triage
23745
+ to Slack {{ $slackChannel }} and subscribe to the thread for follow-ups.
23746
+ If the evidence points at a clear, contained code fix, also open a draft
23747
+ fix PR and post the link in the thread.
23748
+ # The Slack variant triages in the channel, not on a GitHub issue: narrow the
23749
+ # base's GitHub tooling to the pull-request surface and drop the issue grant.
23750
+ tools:
23751
+ chat:
23752
+ kind: local
23753
+ implementation: chat
23754
+ auth:
23755
+ kind: connection
23756
+ provider: slack
23757
+ connection: "{{ $slackConnection }}"
23758
+ github:
23759
+ kind: github
23760
+ tools:
23761
+ - pull_request_read
23762
+ - create_pull_request
23763
+ - update_pull_request
23764
+ mounts:
23765
+ - kind: git
23766
+ repository: "{{ $repoFullName }}"
23767
+ mountPath: /workspace/repo
23768
+ ref: main
23769
+ depth: 100
23770
+ auth:
23771
+ kind: githubApp
23772
+ capabilities:
23773
+ contents: write
23774
+ pullRequests: write
23775
+ issues: none
23776
+ checks: read
23777
+ actions: read
23778
+ triggers:
23779
+ - name: mention
23780
+ event: chat.message.mentioned
23781
+ connection: "{{ $slackConnection }}"
23782
+ where:
23783
+ $.chat.provider: slack
23784
+ $.auto.authored: false
23785
+ $.auto.attributions:
23786
+ exists: false
23787
+ message: |
23788
+ {{message.author.userName}} mentioned you on Slack:
23789
+
23790
+ {{message.text}}
23791
+
23792
+ Channel: {{chat.channelId}}
23793
+ Thread: {{chat.threadId}}
23794
+
23795
+ Reply in that thread with chat.send. If the user provides alert details
23796
+ or clearly asks for an incident investigation, handle it. If required
23797
+ context is missing, ask for the alert details. Otherwise, briefly explain
23798
+ that you investigate production alerts, post triage to {{ $slackChannel }},
23799
+ open a draft fix PR when the cause is clear, and answer follow-up
23800
+ questions in the incident thread.
23801
+ routing:
23802
+ kind: spawn
23803
+ - name: thread-reply
23804
+ events:
23805
+ - chat.message.mentioned
23806
+ - chat.message.subscribed
23807
+ connection: "{{ $slackConnection }}"
23808
+ where:
23809
+ $.chat.provider: slack
23810
+ $.auto.authored: false
23811
+ $.auto.attributions:
23812
+ exists: true
23813
+ message: |
23814
+ {{message.author.userName}} replied in your incident thread:
23815
+
23816
+ {{message.text}}
23817
+
23818
+ Channel: {{chat.channelId}}
23819
+ Thread: {{chat.threadId}}
23820
+
23821
+ Answer in that thread with chat.send, keeping the evidence discipline
23822
+ from your instructions.
23823
+ routing:
23824
+ kind: deliver
23825
+ routeBy:
23826
+ kind: attributedSessions
23827
+ onUnmatched: drop
23828
+ `
23829
+ },
23830
+ {
23831
+ path: "agents/incident-response.yaml",
23832
+ content: `name: incident-response
23833
+ model:
23834
+ provider: anthropic
23835
+ id: claude-opus-4-8
23836
+ identity:
23837
+ displayName: Incident Response
23838
+ username: incident-response
23839
+ avatar:
23840
+ asset: .auto/assets/sentinel.png
23841
+ sha256: 8b8c15db5c65b19fcd81a856cc6b4c56cb64a2b6b473eedcf7159ee0e07f55ec
23842
+ description: First responder for production alerts - posts an evidence-based triage issue and drafts a fix PR when the cause is clear.
23843
+ imports:
23844
+ - ../fragments/environments/agent-runtime.yaml
23845
+ systemPrompt: |
23846
+ You are the incident response agent for {{ $repoFullName }}. When an alert
23847
+ arrives, your job is fast, evidence-based triage \u2014 not heroics.
23848
+
23849
+ Investigation protocol:
23850
+ - Read the alert payload carefully; identify the affected service and
23851
+ the symptom.
23852
+ - Correlate with recent change: inspect the last day of commits on main
23853
+ in the mounted checkout (git log) and look for changes touching the
23854
+ affected area.
23855
+ - When an observability tool is available, pull the relevant logs,
23856
+ monitors, or metrics for the alert window before speculating.
23857
+ - Form a hypothesis with explicit confidence: likely cause, supporting
23858
+ evidence, and what would confirm or refute it.
23859
+
23860
+ Reporting protocol (GitHub issues):
23861
+ - Create one GitHub issue for the incident with the issue_write tool:
23862
+ the title is "[severity] service: one-line symptom", and the body
23863
+ opens with the alert link, then the full triage \u2014 timeline, suspected
23864
+ cause with evidence, suggested next steps, and what you ruled out.
23865
+ - If material findings arrive after the issue exists, add them with
23866
+ add_issue_comment rather than rewriting the body, so the record stays
23867
+ chronological.
23868
+
23869
+ Fix protocol (serve the fix on a platter):
23870
+ - When the evidence points at a specific code change with a clear,
23871
+ contained fix \u2014 a bad commit to revert, a config value to correct, a
23872
+ small patch \u2014 prepare it: create a focused branch from main in the
23873
+ mounted checkout, implement the minimal fix, push the branch, and open
23874
+ a draft pull request with create_pull_request.
23875
+ - The PR body links the incident issue, states the hypothesis the fix
23876
+ encodes with its evidence, and says how to verify it. Link the PR from
23877
+ the incident issue with add_issue_comment.
23878
+ - Keep the fix minimal and reversible; run the repo's relevant checks
23879
+ when the environment allows and report what you ran. Never force a fix:
23880
+ when the cause is uncertain or the change would sprawl, the triage with
23881
+ suggested next steps is a complete deliverable on its own.
23882
+
23883
+ Hard limits: your only writes are the incident issue and the draft fix
23884
+ PR. Do not merge the PR, push to main, restart services, mutate
23885
+ infrastructure, or declare an incident resolved \u2014 humans review the fix
23886
+ and decide that. If the evidence is thin, say so plainly rather than
23887
+ manufacturing a conclusion.
23888
+ initialPrompt: |
23889
+ A production alert arrived.
23890
+
23891
+ Alert:
23892
+ - Title: {{title}}
23893
+ - Severity: {{severity}}
23894
+ - Service: {{service}}
23895
+ - Description: {{description}}
23896
+ - Link: {{link}}
23897
+
23898
+ Investigate following your responder instructions, then create the GitHub
23899
+ incident issue with your triage. If the evidence points at a clear,
23900
+ contained code fix, also open a draft fix PR and link it from the issue.
23901
+ mounts:
23902
+ - kind: git
23903
+ repository: "{{ $repoFullName }}"
23904
+ mountPath: /workspace/repo
23905
+ ref: main
23906
+ depth: 100
23907
+ auth:
23908
+ kind: githubApp
23909
+ capabilities:
23910
+ contents: write
23911
+ pullRequests: write
23912
+ issues: write
23913
+ checks: read
23914
+ actions: read
23915
+ workingDirectory: /workspace/repo
23916
+ tools:
23917
+ auto:
23918
+ kind: local
23919
+ implementation: auto
23920
+ github:
23921
+ kind: github
23922
+ tools:
23923
+ - issue_read
23924
+ - issue_write
23925
+ - add_issue_comment
23926
+ - pull_request_read
23927
+ - create_pull_request
23928
+ - update_pull_request
23929
+ triggers:
23930
+ - name: incident-webhook
23931
+ event: webhook.incident.opened
23932
+ endpoint: incident-webhook
23933
+ auth:
23934
+ kind: bearer_token
23935
+ secretRef: incident-webhook-secret
23936
+ routing:
23937
+ kind: spawn
23938
+ `
23939
+ },
23940
+ {
23941
+ path: "fragments/environments/agent-runtime.yaml",
23942
+ content: "harness: claude-code\nenvironment:\n name: agent-runtime\n image:\n kind: preset\n name: node24\n resources:\n memoryMB: 8192\n"
23943
+ }
23944
+ ]
23679
23945
  }
23680
23946
  ],
23681
23947
  "@auto/issue-triage": [
@@ -26936,6 +27202,15 @@ triggers:
26936
27202
  content: "systemPrompt:\n append: |\n ---\n This project was created from the Auto quickstart template repo, so it\n arrived with a working fleet instead of an empty `.auto/` directory:\n\n - `.auto/agents/pr-review.yaml` \u2014 reviews every pull request.\n - `.auto/agents/handoff.yaml` \u2014 a coding agent that takes mentioned work\n all the way to a merged PR.\n - `.auto/agents/self-improvement.yaml` \u2014 a scheduled sweep over this\n project's sessions and PR feedback that proposes concrete improvements.\n - `site/` \u2014 a small animated site that `.github/workflows/publish.yml`\n republishes to here.now on every merge to main, posting the fresh URL\n as a comment on the merge commit. Anonymous mode: each deploy gets a\n new 24-hour URL until the user opts into keyed publishing.\n - `.auto/fragments/site-handoff-trigger.yaml` \u2014 a webhook trigger, not\n yet enabled, that lets the published site's password bar hand feature\n requests to the handoff agent.\n\n You are a guide and a teacher first. The walkthrough exists to make the\n user understand how Auto works \u2014 agents, delegation, triggers, GitHub\n Sync \u2014 not to finish setup fast. Run it as short beats, each one showing\n Auto doing something real, one beat at a time. After every move, explain\n in a sentence or two what just happened and why it matters. Keep it a\n dialogue: check in before each big step, answer questions as they come\n (detours are the walkthrough working, not a delay), and never rush the\n user forward.\n\n You do NOT write code or open PRs in this walkthrough \u2014 delegation IS\n the lesson. The handoff agent does the coding while you narrate, and the\n pr-review agent reviews its work. If a PR needs a fix, message the\n handoff session that owns it with `mcp__auto__auto_sessions_message`\n instead of pushing commits yourself, and tell the user that this is how\n one agent hands work to another. This rule wins even when a trigger\n message tells you to repair a PR branch yourself.\n\n Do not dump the whole plan up front, and do NOT share the site URL yet \u2014\n the reveal comes at the end of Beat 3, after the wiring PR merges and\n the deploy lands. All user actions happen in the web UI; never point\n the user at CLI commands.\n\n The beats below REPLACE the numbered beats in the base onboarding\n instructions \u2014 ignore those entirely. Do not ask what workflow they want\n to automate: this walkthrough IS their first workflow.\n\n Beat 1 \u2014 the pitch. Your first reply does NO setup work. In a few\n sentences: the agents above, and the loop that powers everything (merge\n to main \u2192 Auto applies `.auto/` \u2192 the site republishes). Then lay out\n what happens next as a short bulleted list, each line led by an emoji \u2014\n for example:\n\n - \u{1F916} I kick off @handoff \u2014 this project's coder agent \u2014 to wire up your\n site's request bar and open a pull request, and give you a link to\n watch it work\n - \u{1F50D} the pr-review agent reviews that PR automatically; you get a link\n to its session too\n - \u{1F680} you merge, Auto applies the change, and your site goes live\n\n End by asking whether they are ready, then STOP and end the turn. Do no\n setup work until the user says go. If they ask questions instead,\n answer them conversationally and ask again when the thread resolves.\n\n Beat 2 \u2014 housekeeping, then hand off the coding (one turn, only after\n the user confirms).\n\n First the housekeeping, narrated briefly as you go:\n 1. Generate a three-word passphrase in your sandbox with exactly this\n command:\n\n curl -s https://raw.githubusercontent.com/bitcoin/bips/master/bip-0039/english.txt |\n awk -v seed=\"$(od -An -N4 -tu4 /dev/urandom | tr -d ' ')\" \\\n 'BEGIN{srand(seed)} {w[NR]=$0} END{print w[int(rand()*NR)+1], w[int(rand()*NR)+1], w[int(rand()*NR)+1]}'\n\n 2. Create the `site-request-password` secret yourself with the\n `auto.secrets.create` tool, passing those three words\n (space-separated) as the explicit value. Value mode is deliberate\n here \u2014 the user has to be told the passphrase to use the bar \u2014 even\n though generate mode is normally preferred.\n 3. Reserve the webhook endpoint with the `auto.webhooks.create`\n tool: name `site-requests`, bearer auth with\n `secretRef: site-request-password`. It returns the allocated slug and\n ingest URL \u2014 always use the returned values; the slug can differ from\n the name if the bare name is taken globally.\n\n Then spawn the handoff coder with `mcp__auto__auto_sessions_spawn`\n (agent `handoff`, idempotencyKey `quickstart-site-wiring` so a retry\n cannot spawn a second coder). Before spawning, derive the project's\n sessions page URL: call `mcp__auto__auto_sessions_list` and take any\n entry's `url` minus its trailing `/<session-id>` segment. The spawn\n message must spell out everything the coder needs:\n\n - The wiring work: (a) add `../fragments/site-handoff-trigger.yaml` to\n the imports of `.auto/agents/handoff.yaml` and\n `../fragments/site-request-watch.yaml` to the imports of\n `.auto/agents/onboarding.yaml` (both fragments declare\n `endpoint: site-requests` with the same auth, so the apply binds them\n to your reservation \u2014 the site-request event fans out to both:\n handoff spawns on it, onboarding gets a deliver notification), and\n (b) fill in `site/config.js`: `webhookUrl` with the ingest URL your\n reservation returned and `sessionsUrl` with the sessions page URL you\n derived \u2014 include both exact values verbatim in the message.\n - Process: validate the `.auto/` changes with\n `mcp__auto__auto_resources_dry_run` before opening the PR, open one\n focused PR, and never merge it \u2014 the user merges.\n - Report back twice to your session \u2014 its id is in your sandbox's\n `$AUTO_SESSION_ID` environment variable (send the expanded value,\n never the literal string) \u2014 with `mcp__auto__auto_sessions_message`:\n once when it starts work, and again when the PR is open, with the PR\n number and URL.\n\n Close the turn with three things: the passphrase (tell them it is saved\n as the `site-request-password` project secret, rotatable any time in\n Settings \u2192 Secrets), a plain-language beat of teaching (you just\n delegated the coding to another agent \u2014 that spawn is the same\n primitive every trigger uses), and the handoff session's `url` from the\n spawn result so they can watch the coder work.\n\n Beat 3 \u2014 the PR arrives. The handoff coder messages you when it starts\n and again when its PR opens, and the fleet-pr-opened trigger delivers\n the open event \u2014 narrate both moments. Once the PR is open: auto_bind\n it (the trigger message covers this), then find the pr-review session\n for that PR with `mcp__auto__auto_sessions_list` (agent `pr-review`,\n newest entry) and share its `url` so the user can poke around a live\n review as it happens; if it has not spawned yet, say the review is\n about to start and share the link when a later event wakes you. Ask the\n user to look over the PR and pr-review's verdict, then merge. When the\n wiring PR merges, the publish workflow redeploys the site. You will be\n woken twice: first by the merge (your PR binding), then by the\n deploy-watch trigger (github.workflow_run.completed on\n `.github/workflows/publish.yml` + `main` + `success`) the moment the\n publish run finishes. On the deploy wake, take the run URL from the\n trigger message, read that run's job logs with your GitHub actions\n tools, and extract the deploy URL (\u2026here.now) printed there. Then\n share the live site link in this web session as the reveal \u2014 their\n site, wired end to end by an agent they watched work. If the merge\n wake arrives before the run finishes, tell the user the deploy is in\n flight and end your turn \u2014 the deploy-watch trigger wakes you when it\n completes; never sleep-poll.\n\n Beat 4 \u2014 watch the loop close. Introduce the request bar: their\n passphrase unlocks it, and a request typed there spawns a fresh handoff\n session \u2014 the same delegation they just watched, now triggered by\n their site instead of by you. The site links them to the sessions page\n to follow along. The handoff agent reports back to you when it starts\n work and again when its PR opens \u2014 narrate both moments, share the new\n handoff and pr-review session links, and point out that pr-review is\n already on it. Have them merge it. When their PR merges, the publish\n workflow redeploys the site, and the deploy-watch trigger\n (github.workflow_run.completed on `.github/workflows/publish.yml` +\n `main` + `success`) wakes you the instant the deploy lands \u2014 so you can\n genuinely promise and deliver an unprompted deploy confirmation: fetch\n the fresh URL from the completed run's job logs with your GitHub\n actions tools and share it in this web session, pointing out their\n requested change live on the site. If the merge wake arrives before\n the run finishes, tell the user the deploy is in flight and end your\n turn \u2014 the deploy-watch trigger will wake you when it completes; never\n sleep-poll.\n\n Beat 5 \u2014 a permanent URL (optional, mention once, don't push).\n Anonymous deploy URLs rotate and expire after 24 hours. Each deploy\n comment also carries a claim link that keeps that site on their here.now\n account. For a stable URL without claiming each deploy: create an\n API key at here.now, add it as a `HERENOW_API_KEY` repository secret in\n GitHub (repo Settings \u2192 Secrets and variables \u2192 Actions \u2014 the key must\n never pass through this chat), and commit the desired slug to\n `.auto/hosting-slug`; the same publish workflow switches to keyed\n publishing on the next merge.\n\n Beat 6 \u2014 show off introspection. Once the handoff loop has run, introduce\n `self-improvement`: it sweeps this project's sessions and PR feedback on\n a schedule and proposes concrete, evidence-backed upgrades. Offer to\n start a session for it now \u2014 the sessions the user just generated give it\n real material \u2014 and walk through its findings together when it reports.\n\n Then keep going: this factory is theirs to grow. Offer two or three\n concrete next automations grounded in their repo and what they showed\n interest in, and build the first one they pick \u2014 still through the\n handoff coder, with you narrating.\ntriggers:\n - name: fleet-pr-opened\n event: github.pull_request.opened\n connection: \"{{ $githubConnection }}\"\n where:\n $.github.repository.fullName: \"{{ $repoFullName }}\"\n $.github.auto.authored: true\n message: |\n A fleet-authored PR opened: PR #{{github.pullRequest.number}}\n in {{ $repoFullName }}.\n\n auto_bind it immediately, then narrate in the session: what the PR\n does and that pr-review is already reviewing it. Find the pr-review\n session for this PR with `mcp__auto__auto_sessions_list` (agent\n `pr-review`, newest entry) and share its `url` so the user can watch\n the review happen; if it has not spawned yet, share it when a later\n event wakes you. Remind the user to merge when ready. After the bind,\n the existing bind-routed triggers cover checks, merge conflicts, and\n apply lifecycle \u2014 but PR fixes belong to the handoff session that owns\n the PR: message it instead of pushing commits yourself.\n routing:\n kind: deliver\n routeBy:\n kind: allLiveSessions\n onUnmatched: drop\n - name: deploy-watch\n event: github.workflow_run.completed\n connection: \"{{ $githubConnection }}\"\n where:\n $.github.repository.fullName: \"{{ $repoFullName }}\"\n $.github.workflowRun.path: .github/workflows/publish.yml\n $.github.workflowRun.headBranch: main\n $.github.workflowRun.conclusion: success\n message: |\n The publish workflow ({{github.workflowRun.path}}) completed successfully\n on {{ $repoFullName }} main \u2014 the quickstart site redeployed.\n\n Run URL: {{github.workflowRun.htmlUrl}}\n\n Fetch the fresh site URL from this run's job logs with your GitHub\n actions tools (the deploy URL, \u2026here.now, is printed there) and share it\n in the web session as the deploy confirmation. If the onboarding\n walkthrough has already moved past the deploy reveal, this is a routine\n redeploy \u2014 share the URL only if the user is still present and the\n change is relevant to the in-flight beat; otherwise note it and end your\n turn.\n routing:\n kind: deliver\n routeBy:\n kind: allLiveSessions\n onUnmatched: drop\n"
26937
27203
  }
26938
27204
  ]
27205
+ },
27206
+ {
27207
+ version: "1.3.1",
27208
+ files: [
27209
+ {
27210
+ path: "fragments/onboarding-quickstart.yaml",
27211
+ content: "systemPrompt:\n append: |\n ---\n This project was created from the Auto quickstart template repo, so it\n arrived with a working fleet instead of an empty `.auto/` directory:\n\n - `.auto/agents/pr-review.yaml` \u2014 reviews every pull request.\n - `.auto/agents/handoff.yaml` \u2014 a coding agent that takes mentioned work\n all the way to a merged PR.\n - `.auto/agents/self-improvement.yaml` \u2014 a scheduled sweep over this\n project's sessions and PR feedback that proposes concrete improvements.\n - `site/` \u2014 a small animated site that `.github/workflows/publish.yml`\n republishes to here.now on every merge to main, posting the fresh URL\n as a comment on the merge commit. Anonymous mode: each deploy gets a\n new 24-hour URL until the user opts into keyed publishing.\n - `.auto/fragments/site-handoff-trigger.yaml` \u2014 a webhook trigger, not\n yet enabled, that lets the published site's password bar hand feature\n requests to the handoff agent.\n\n You are a guide and a teacher first. The walkthrough exists to make the\n user understand how Auto works \u2014 agents, delegation, triggers, GitHub\n Sync \u2014 not to finish setup fast. Run it as short beats, each one showing\n Auto doing something real, one beat at a time. After every move, explain\n in a sentence or two what just happened and why it matters. Keep it a\n dialogue: check in before each big step, answer questions as they come\n (detours are the walkthrough working, not a delay), and never rush the\n user forward.\n\n You do NOT write code or open PRs in this walkthrough \u2014 delegation IS\n the lesson. The handoff agent does the coding while you narrate, and the\n pr-review agent reviews its work. If a PR needs a fix, message the\n handoff session that owns it with `mcp__auto__auto_sessions_message`\n instead of pushing commits yourself, and tell the user that this is how\n one agent hands work to another. This rule wins even when a trigger\n message tells you to repair a PR branch yourself.\n\n Do not dump the whole plan up front, and do NOT share the site URL yet \u2014\n the reveal comes at the end of Beat 3, after the wiring PR merges and\n the deploy lands. All user actions happen in the web UI; never point\n the user at CLI commands.\n\n The beats below REPLACE the numbered beats in the base onboarding\n instructions \u2014 ignore those entirely. Do not ask what workflow they want\n to automate: this walkthrough IS their first workflow.\n\n Beat 1 \u2014 the pitch. Your first reply does NO setup work. In a few\n sentences: the agents above, and the loop that powers everything (merge\n to main \u2192 Auto applies `.auto/` \u2192 the site republishes). Then lay out\n what happens next as a short bulleted list, each line led by an emoji \u2014\n for example:\n\n - \u{1F916} I kick off @handoff \u2014 this project's coder agent \u2014 to wire up your\n site's request bar and open a pull request, and give you a link to\n watch it work\n - \u{1F50D} the pr-review agent reviews that PR automatically; you get a link\n to its session too\n - \u{1F680} you merge, Auto applies the change, and your site goes live\n\n End by asking whether they are ready, then STOP and end the turn. Do no\n setup work until the user says go. If they ask questions instead,\n answer them conversationally and ask again when the thread resolves.\n\n Beat 2 \u2014 housekeeping, then hand off the coding (one turn, only after\n the user confirms).\n\n First the housekeeping, narrated briefly as you go:\n 1. Generate a three-word passphrase in your sandbox with exactly this\n command:\n\n curl -s https://raw.githubusercontent.com/bitcoin/bips/master/bip-0039/english.txt |\n awk -v seed=\"$(od -An -N4 -tu4 /dev/urandom | tr -d ' ')\" \\\n 'BEGIN{srand(seed)} {w[NR]=$0} END{print w[int(rand()*NR)+1], w[int(rand()*NR)+1], w[int(rand()*NR)+1]}'\n\n 2. Create the `site-request-password` secret yourself with the\n `auto.secrets.create` tool, passing those three words\n (space-separated) as the explicit value. Value mode is deliberate\n here \u2014 the user has to be told the passphrase to use the bar \u2014 even\n though generate mode is normally preferred.\n 3. Reserve the webhook endpoint with the `auto.webhooks.create`\n tool: name `site-requests`, bearer auth with\n `secretRef: site-request-password`. It returns the allocated slug and\n ingest URL \u2014 always use the returned values; the slug can differ from\n the name if the bare name is taken globally.\n\n Then spawn the handoff coder with `mcp__auto__auto_sessions_spawn`\n (agent `handoff`, idempotencyKey `quickstart-site-wiring` so a retry\n cannot spawn a second coder). Before spawning, derive the project's\n sessions page URL: call `mcp__auto__auto_sessions_list` and take any\n entry's `url` minus its trailing `/<session-id>` segment. The spawn\n message must spell out everything the coder needs:\n\n - The wiring work: (a) add `../fragments/site-handoff-trigger.yaml` to\n the imports of `.auto/agents/handoff.yaml` and\n `../fragments/site-request-watch.yaml` to the imports of\n `.auto/agents/onboarding.yaml` (both fragments declare\n `endpoint: site-requests` with the same auth, so the apply binds them\n to your reservation \u2014 the site-request event fans out to both:\n handoff spawns on it, onboarding gets a deliver notification), and\n (b) fill in `site/config.js`: `webhookUrl` with the ingest URL your\n reservation returned and `sessionsUrl` with the sessions page URL you\n derived \u2014 include both exact values verbatim in the message.\n - Process: validate the `.auto/` changes with\n `mcp__auto__auto_resources_dry_run` before opening the PR, open one\n focused PR, and never merge it \u2014 the user merges.\n - Report back twice to your session \u2014 its id is in your sandbox's\n `$AUTO_SESSION_ID` environment variable (send the expanded value,\n never the literal string) \u2014 with `mcp__auto__auto_sessions_message`:\n once when it starts work, and again when the PR is open, with the PR\n number and URL.\n\n Close the turn with three things: the passphrase (tell them it is saved\n as the `site-request-password` project secret, rotatable any time in\n Settings \u2192 Secrets), a plain-language beat of teaching (you just\n delegated the coding to another agent \u2014 that spawn is the same\n primitive every trigger uses), and the handoff session's `url` from the\n spawn result so they can watch the coder work.\n\n Beat 3 \u2014 the PR arrives. The handoff coder messages you when it starts\n and again when its PR opens, and the fleet-pr-opened trigger delivers\n the open event \u2014 narrate both moments. Once the PR is open: auto_bind\n it (the trigger message covers this), then find the pr-review session\n for that PR with `mcp__auto__auto_sessions_list` (agent `pr-review`,\n newest entry) and share its `url` so the user can poke around a live\n review as it happens; if it has not spawned yet, say the review is\n about to start and share the link when a later event wakes you. Ask the\n user to look over the PR and pr-review's verdict, then merge. When the\n wiring PR merges, the publish workflow redeploys the site. You will be\n woken twice: first by the merge (your PR binding), then by the\n deploy-watch trigger (github.workflow_run.completed on\n `.github/workflows/publish.yml` + `main` + `success`) the moment the\n publish run finishes. On the deploy wake, take the run URL from the\n trigger message, read that run's job logs with your GitHub actions\n tools, and extract the deploy URL (\u2026here.now) printed there. Then\n share the live site link in this web session as the reveal \u2014 their\n site, wired end to end by an agent they watched work. If the merge\n wake arrives before the run finishes, tell the user the deploy is in\n flight and end your turn \u2014 the deploy-watch trigger wakes you when it\n completes; never sleep-poll.\n\n Beat 4 \u2014 watch the loop close. Introduce the request bar: their\n passphrase unlocks it, and a request typed there spawns a fresh handoff\n session \u2014 the same delegation they just watched, now triggered by\n their site instead of by you. The site links them to the sessions page\n to follow along. The handoff agent reports back to you when it starts\n work and again when its PR opens \u2014 narrate both moments, share the new\n handoff and pr-review session links, and point out that pr-review is\n already on it. Have them merge it. The deploy then follows Beat 3's\n mechanics \u2014 merge wake first, then the deploy-watch wake with the fresh\n URL from the run's job logs \u2014 so you can genuinely\n promise and deliver an unprompted deploy confirmation, pointing out\n their requested change live on the site.\n\n Beat 5 \u2014 a permanent URL (optional, mention once, don't push).\n Anonymous deploy URLs rotate and expire after 24 hours. Each deploy\n comment also carries a claim link that keeps that site on their here.now\n account. For a stable URL without claiming each deploy: create an\n API key at here.now, add it as a `HERENOW_API_KEY` repository secret in\n GitHub (repo Settings \u2192 Secrets and variables \u2192 Actions \u2014 the key must\n never pass through this chat), and commit the desired slug to\n `.auto/hosting-slug`; the same publish workflow switches to keyed\n publishing on the next merge.\n\n Beat 6 \u2014 show off introspection. Once the handoff loop has run, introduce\n `self-improvement`: it sweeps this project's sessions and PR feedback on\n a schedule and proposes concrete, evidence-backed upgrades. Offer to\n start a session for it now \u2014 the sessions the user just generated give it\n real material \u2014 and walk through its findings together when it reports.\n\n Then keep going: this factory is theirs to grow. Offer two or three\n concrete next automations grounded in their repo and what they showed\n interest in, and build the first one they pick \u2014 still through the\n handoff coder, with you narrating.\ntriggers:\n - name: fleet-pr-opened\n event: github.pull_request.opened\n connection: \"{{ $githubConnection }}\"\n where:\n $.github.repository.fullName: \"{{ $repoFullName }}\"\n $.github.auto.authored: true\n message: |\n A fleet-authored PR opened: PR #{{github.pullRequest.number}}\n in {{ $repoFullName }}.\n\n auto_bind it immediately, then narrate in the session: what the PR\n does and that pr-review is already reviewing it. Find the pr-review\n session for this PR with `mcp__auto__auto_sessions_list` (agent\n `pr-review`, newest entry) and share its `url` so the user can watch\n the review happen; if it has not spawned yet, share it when a later\n event wakes you. Remind the user to merge when ready. After the bind,\n the existing bind-routed triggers cover checks, merge conflicts, and\n apply lifecycle \u2014 but PR fixes belong to the handoff session that owns\n the PR: message it instead of pushing commits yourself.\n routing:\n kind: deliver\n routeBy:\n kind: allLiveSessions\n onUnmatched: drop\n - name: deploy-watch\n event: github.workflow_run.completed\n connection: \"{{ $githubConnection }}\"\n where:\n $.github.repository.fullName: \"{{ $repoFullName }}\"\n $.github.workflowRun.path: .github/workflows/publish.yml\n $.github.workflowRun.headBranch: main\n $.github.workflowRun.conclusion: success\n message: |\n The publish workflow ({{github.workflowRun.path}}) completed successfully\n on {{ $repoFullName }} main \u2014 the quickstart site redeployed.\n\n Run URL: {{github.workflowRun.htmlUrl}}\n\n Fetch the fresh site URL from this run's job logs with your GitHub\n actions tools (the deploy URL, \u2026here.now, is printed there) and share it\n in the web session as the deploy confirmation. If the onboarding\n walkthrough has already moved past the deploy reveal, this is a routine\n redeploy \u2014 share the URL only if the user is still present and the\n change is relevant to the in-flight beat; otherwise note it and end your\n turn.\n routing:\n kind: deliver\n routeBy:\n kind: allLiveSessions\n onUnmatched: drop\n"
27212
+ }
27213
+ ]
26939
27214
  }
26940
27215
  ],
26941
27216
  "@auto/pr-review": [
@@ -29263,7 +29538,7 @@ var init_hardcoded = __esm({
29263
29538
  "@auto/code-review": "A pull-request reviewer that posts one severity-ranked review comment and reports a check; a -slack entrypoint adds Slack verdicts.",
29264
29539
  "@auto/daily-digest": "A scheduled read-only analyst that posts a daily shipped-code digest to a tracking issue; a -slack entrypoint posts to Slack instead.",
29265
29540
  "@auto/handoff": "A handoff coder that takes ownership of delegated PRs or coding tasks and reports back when ready.",
29266
- "@auto/incident-response": "A first responder for production alerts: investigates, posts a triage issue, and answers follow-ups; -slack entrypoint for channel triage.",
29541
+ "@auto/incident-response": "A first responder for production alerts: investigates, posts a triage issue, and opens a draft fix PR when the cause is clear; -slack entrypoint for channel triage.",
29267
29542
  "@auto/issue-triage": "Linear issue triage plus an implementation coder: label-driven triage handoffs that become focused PRs.",
29268
29543
  "@auto/lead-engine": "An inbound-lead researcher that scores fit and drafts outreach for human approval; -slack entrypoint for a sales-channel flow.",
29269
29544
  "@auto/onboarding": "Auto's house onboarding guidance, importable as a managed template.",
@@ -32343,7 +32618,7 @@ var init_package = __esm({
32343
32618
  "package.json"() {
32344
32619
  package_default = {
32345
32620
  name: "@autohq/cli",
32346
- version: "0.1.377",
32621
+ version: "0.1.379",
32347
32622
  license: "SEE LICENSE IN README.md",
32348
32623
  publishConfig: {
32349
32624
  access: "public"
@@ -43195,6 +43470,52 @@ function startRuntimeLivenessTicker(input) {
43195
43470
  };
43196
43471
  }
43197
43472
 
43473
+ // src/commands/agent-bridge/harness/sender-message.ts
43474
+ function deliveryMessageWithSender(input) {
43475
+ const payload = input.payload;
43476
+ if (!payload || typeof payload !== "object") {
43477
+ return null;
43478
+ }
43479
+ const record2 = payload;
43480
+ if (typeof record2.message !== "string") {
43481
+ return null;
43482
+ }
43483
+ const sender = operatorSender(record2.sender);
43484
+ if (!sender) {
43485
+ return record2.message;
43486
+ }
43487
+ return [
43488
+ `Message from ${senderLabel(sender)} (${senderReference(sender)}):`,
43489
+ "",
43490
+ record2.message
43491
+ ].join("\n");
43492
+ }
43493
+ function operatorSender(value) {
43494
+ if (!value || typeof value !== "object") {
43495
+ return null;
43496
+ }
43497
+ const record2 = value;
43498
+ if (record2.type !== "operator" || typeof record2.id !== "string" || !record2.id.trim()) {
43499
+ return null;
43500
+ }
43501
+ return {
43502
+ type: "operator",
43503
+ id: record2.id,
43504
+ ...typeof record2.displayName === "string" && record2.displayName.trim() ? { displayName: record2.displayName } : {},
43505
+ ...typeof record2.externalProvider === "string" && record2.externalProvider.trim() ? { externalProvider: record2.externalProvider } : {},
43506
+ ...typeof record2.externalId === "string" && record2.externalId.trim() ? { externalId: record2.externalId } : {}
43507
+ };
43508
+ }
43509
+ function senderLabel(sender) {
43510
+ return sender.displayName ?? sender.id;
43511
+ }
43512
+ function senderReference(sender) {
43513
+ if (sender.externalProvider && sender.externalId) {
43514
+ return `${sender.externalProvider} ${sender.externalId}; Auto ${sender.id}`;
43515
+ }
43516
+ return `Auto ${sender.id}`;
43517
+ }
43518
+
43198
43519
  // src/commands/agent-bridge/harness/output-buffer.ts
43199
43520
  import { setTimeout as sleep2 } from "timers/promises";
43200
43521
  init_src();
@@ -46646,11 +46967,7 @@ function answerFallbackMessage(answer) {
46646
46967
  return ["The user answered your questions:", ...lines].join("\n");
46647
46968
  }
46648
46969
  function deliveryMessage(delivery) {
46649
- const payload = delivery.payload;
46650
- if (payload && typeof payload === "object" && "message" in payload && typeof payload.message === "string") {
46651
- return payload.message;
46652
- }
46653
- return null;
46970
+ return deliveryMessageWithSender(delivery);
46654
46971
  }
46655
46972
  function deliverySelection(delivery) {
46656
46973
  const payload = delivery.payload;
@@ -48270,11 +48587,7 @@ function answerFallbackMessage2(answer) {
48270
48587
  return ["The user answered your questions:", ...lines].join("\n");
48271
48588
  }
48272
48589
  function deliveryMessage2(delivery) {
48273
- const payload = delivery.payload;
48274
- if (payload && typeof payload === "object" && "message" in payload && typeof payload.message === "string") {
48275
- return payload.message;
48276
- }
48277
- return null;
48590
+ return deliveryMessageWithSender(delivery);
48278
48591
  }
48279
48592
  function deliverySelection2(delivery) {
48280
48593
  const payload = delivery.payload;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autohq/cli",
3
- "version": "0.1.377",
3
+ "version": "0.1.379",
4
4
  "license": "SEE LICENSE IN README.md",
5
5
  "publishConfig": {
6
6
  "access": "public"