@autohq/cli 0.1.377 → 0.1.378

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.378",
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"),
@@ -35124,6 +35128,15 @@ triggers:
35124
35128
  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
35129
  }
35126
35130
  ]
35131
+ },
35132
+ {
35133
+ version: "1.3.1",
35134
+ files: [
35135
+ {
35136
+ path: "fragments/onboarding-quickstart.yaml",
35137
+ 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"
35138
+ }
35139
+ ]
35127
35140
  }
35128
35141
  ],
35129
35142
  "@auto/pr-review": [
@@ -37685,6 +37698,52 @@ function startRuntimeLivenessTicker(input) {
37685
37698
  };
37686
37699
  }
37687
37700
 
37701
+ // src/commands/agent-bridge/harness/sender-message.ts
37702
+ function deliveryMessageWithSender(input) {
37703
+ const payload = input.payload;
37704
+ if (!payload || typeof payload !== "object") {
37705
+ return null;
37706
+ }
37707
+ const record2 = payload;
37708
+ if (typeof record2.message !== "string") {
37709
+ return null;
37710
+ }
37711
+ const sender = operatorSender(record2.sender);
37712
+ if (!sender) {
37713
+ return record2.message;
37714
+ }
37715
+ return [
37716
+ `Message from ${senderLabel(sender)} (${senderReference(sender)}):`,
37717
+ "",
37718
+ record2.message
37719
+ ].join("\n");
37720
+ }
37721
+ function operatorSender(value2) {
37722
+ if (!value2 || typeof value2 !== "object") {
37723
+ return null;
37724
+ }
37725
+ const record2 = value2;
37726
+ if (record2.type !== "operator" || typeof record2.id !== "string" || !record2.id.trim()) {
37727
+ return null;
37728
+ }
37729
+ return {
37730
+ type: "operator",
37731
+ id: record2.id,
37732
+ ...typeof record2.displayName === "string" && record2.displayName.trim() ? { displayName: record2.displayName } : {},
37733
+ ...typeof record2.externalProvider === "string" && record2.externalProvider.trim() ? { externalProvider: record2.externalProvider } : {},
37734
+ ...typeof record2.externalId === "string" && record2.externalId.trim() ? { externalId: record2.externalId } : {}
37735
+ };
37736
+ }
37737
+ function senderLabel(sender) {
37738
+ return sender.displayName ?? sender.id;
37739
+ }
37740
+ function senderReference(sender) {
37741
+ if (sender.externalProvider && sender.externalId) {
37742
+ return `${sender.externalProvider} ${sender.externalId}; Auto ${sender.id}`;
37743
+ }
37744
+ return `Auto ${sender.id}`;
37745
+ }
37746
+
37688
37747
  // src/commands/agent-bridge/harness/output-buffer.ts
37689
37748
  import { setTimeout as sleep } from "timers/promises";
37690
37749
 
@@ -68906,11 +68965,7 @@ function answerFallbackMessage(answer) {
68906
68965
  return ["The user answered your questions:", ...lines].join("\n");
68907
68966
  }
68908
68967
  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;
68968
+ return deliveryMessageWithSender(delivery);
68914
68969
  }
68915
68970
  function deliverySelection(delivery) {
68916
68971
  const payload = delivery.payload;
@@ -70525,11 +70580,7 @@ function answerFallbackMessage2(answer) {
70525
70580
  return ["The user answered your questions:", ...lines].join("\n");
70526
70581
  }
70527
70582
  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;
70583
+ return deliveryMessageWithSender(delivery);
70533
70584
  }
70534
70585
  function deliverySelection2(delivery) {
70535
70586
  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"),
@@ -26936,6 +26940,15 @@ triggers:
26936
26940
  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
26941
  }
26938
26942
  ]
26943
+ },
26944
+ {
26945
+ version: "1.3.1",
26946
+ files: [
26947
+ {
26948
+ path: "fragments/onboarding-quickstart.yaml",
26949
+ 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"
26950
+ }
26951
+ ]
26939
26952
  }
26940
26953
  ],
26941
26954
  "@auto/pr-review": [
@@ -32343,7 +32356,7 @@ var init_package = __esm({
32343
32356
  "package.json"() {
32344
32357
  package_default = {
32345
32358
  name: "@autohq/cli",
32346
- version: "0.1.377",
32359
+ version: "0.1.378",
32347
32360
  license: "SEE LICENSE IN README.md",
32348
32361
  publishConfig: {
32349
32362
  access: "public"
@@ -43195,6 +43208,52 @@ function startRuntimeLivenessTicker(input) {
43195
43208
  };
43196
43209
  }
43197
43210
 
43211
+ // src/commands/agent-bridge/harness/sender-message.ts
43212
+ function deliveryMessageWithSender(input) {
43213
+ const payload = input.payload;
43214
+ if (!payload || typeof payload !== "object") {
43215
+ return null;
43216
+ }
43217
+ const record2 = payload;
43218
+ if (typeof record2.message !== "string") {
43219
+ return null;
43220
+ }
43221
+ const sender = operatorSender(record2.sender);
43222
+ if (!sender) {
43223
+ return record2.message;
43224
+ }
43225
+ return [
43226
+ `Message from ${senderLabel(sender)} (${senderReference(sender)}):`,
43227
+ "",
43228
+ record2.message
43229
+ ].join("\n");
43230
+ }
43231
+ function operatorSender(value) {
43232
+ if (!value || typeof value !== "object") {
43233
+ return null;
43234
+ }
43235
+ const record2 = value;
43236
+ if (record2.type !== "operator" || typeof record2.id !== "string" || !record2.id.trim()) {
43237
+ return null;
43238
+ }
43239
+ return {
43240
+ type: "operator",
43241
+ id: record2.id,
43242
+ ...typeof record2.displayName === "string" && record2.displayName.trim() ? { displayName: record2.displayName } : {},
43243
+ ...typeof record2.externalProvider === "string" && record2.externalProvider.trim() ? { externalProvider: record2.externalProvider } : {},
43244
+ ...typeof record2.externalId === "string" && record2.externalId.trim() ? { externalId: record2.externalId } : {}
43245
+ };
43246
+ }
43247
+ function senderLabel(sender) {
43248
+ return sender.displayName ?? sender.id;
43249
+ }
43250
+ function senderReference(sender) {
43251
+ if (sender.externalProvider && sender.externalId) {
43252
+ return `${sender.externalProvider} ${sender.externalId}; Auto ${sender.id}`;
43253
+ }
43254
+ return `Auto ${sender.id}`;
43255
+ }
43256
+
43198
43257
  // src/commands/agent-bridge/harness/output-buffer.ts
43199
43258
  import { setTimeout as sleep2 } from "timers/promises";
43200
43259
  init_src();
@@ -46646,11 +46705,7 @@ function answerFallbackMessage(answer) {
46646
46705
  return ["The user answered your questions:", ...lines].join("\n");
46647
46706
  }
46648
46707
  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;
46708
+ return deliveryMessageWithSender(delivery);
46654
46709
  }
46655
46710
  function deliverySelection(delivery) {
46656
46711
  const payload = delivery.payload;
@@ -48270,11 +48325,7 @@ function answerFallbackMessage2(answer) {
48270
48325
  return ["The user answered your questions:", ...lines].join("\n");
48271
48326
  }
48272
48327
  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;
48328
+ return deliveryMessageWithSender(delivery);
48278
48329
  }
48279
48330
  function deliverySelection2(delivery) {
48280
48331
  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.378",
4
4
  "license": "SEE LICENSE IN README.md",
5
5
  "publishConfig": {
6
6
  "access": "public"