@autohq/cli 0.1.351 → 0.1.353

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.351",
23495
+ version: "0.1.353",
23496
23496
  license: "SEE LICENSE IN README.md",
23497
23497
  publishConfig: {
23498
23498
  access: "public"
@@ -23972,6 +23972,122 @@ function jsonRecordString(value2, key) {
23972
23972
  return typeof field === "string" ? field : void 0;
23973
23973
  }
23974
23974
 
23975
+ // ../../packages/schemas/src/ids.ts
23976
+ var OpaqueIdSchema2 = external_exports.string().trim().min(1);
23977
+ var ProfileIdSchema = OpaqueIdSchema2.brand();
23978
+ var EnvironmentIdSchema = OpaqueIdSchema2.brand();
23979
+ var IdentityIdSchema = OpaqueIdSchema2.brand();
23980
+ var ConnectionIdSchema = OpaqueIdSchema2.brand();
23981
+ var ExternalAccountIdSchema = OpaqueIdSchema2.brand();
23982
+ var OrganizationIdSchema = OpaqueIdSchema2.brand();
23983
+ var ProjectIdSchema = OpaqueIdSchema2.brand();
23984
+ var ProviderGrantIdSchema = OpaqueIdSchema2.brand();
23985
+ var ServiceAccountIdSchema = OpaqueIdSchema2.brand();
23986
+ var AgentIdSchema = OpaqueIdSchema2.brand();
23987
+ var SessionIdSchema2 = OpaqueIdSchema2.brand();
23988
+ var SessionCommandIdSchema2 = OpaqueIdSchema2.brand();
23989
+ var RuntimeIdSchema2 = OpaqueIdSchema2.brand();
23990
+ var RuntimeBridgeLeaseIdSchema2 = OpaqueIdSchema2.brand();
23991
+ var EnvironmentSetupTemplateIdSchema = OpaqueIdSchema2.brand();
23992
+ var UserIdSchema = OpaqueIdSchema2.brand();
23993
+
23994
+ // ../../packages/schemas/src/primitives.ts
23995
+ var JsonValueSchema2 = external_exports.lazy(
23996
+ () => external_exports.union([
23997
+ external_exports.null(),
23998
+ external_exports.boolean(),
23999
+ external_exports.number(),
24000
+ external_exports.string(),
24001
+ external_exports.array(JsonValueSchema2),
24002
+ external_exports.record(external_exports.string(), JsonValueSchema2)
24003
+ ])
24004
+ );
24005
+ function toJsonValue(value2) {
24006
+ if (value2 === void 0) {
24007
+ return null;
24008
+ }
24009
+ try {
24010
+ return JSON.parse(JSON.stringify(value2));
24011
+ } catch {
24012
+ return String(value2);
24013
+ }
24014
+ }
24015
+ var IdempotencySchema = external_exports.discriminatedUnion("kind", [
24016
+ external_exports.object({ kind: external_exports.literal("none") }),
24017
+ external_exports.object({ kind: external_exports.literal("key"), key: external_exports.string().trim().min(1) })
24018
+ ]);
24019
+
24020
+ // ../../packages/schemas/src/provider-grants.ts
24021
+ var ProviderNameSchema = external_exports.string().trim().min(1).max(64);
24022
+ var ExternalAccountTypeSchema = external_exports.enum([
24023
+ "user",
24024
+ "organization",
24025
+ "workspace",
24026
+ "site",
24027
+ "other"
24028
+ ]);
24029
+ var ProviderCredentialKindSchema = external_exports.enum([
24030
+ "github_app_installation",
24031
+ "oauth",
24032
+ "api_token",
24033
+ "webhook",
24034
+ "internal"
24035
+ ]);
24036
+ var ProviderGrantStatusSchema = external_exports.enum(["active", "revoked", "error"]);
24037
+ var ProviderResourceSelectionSchema = external_exports.discriminatedUnion("kind", [
24038
+ external_exports.object({
24039
+ kind: external_exports.literal("all")
24040
+ }),
24041
+ external_exports.object({
24042
+ kind: external_exports.literal("selected"),
24043
+ resources: external_exports.array(JsonValueSchema2).default([])
24044
+ })
24045
+ ]);
24046
+ var ExternalAccountSchema = external_exports.object({
24047
+ id: ExternalAccountIdSchema,
24048
+ provider: ProviderNameSchema,
24049
+ providerAccountId: external_exports.string().trim().min(1),
24050
+ loginOrName: external_exports.string().trim().min(1),
24051
+ accountType: ExternalAccountTypeSchema
24052
+ });
24053
+ var ProviderGrantSchema = external_exports.object({
24054
+ id: ProviderGrantIdSchema,
24055
+ name: external_exports.string().trim().min(1),
24056
+ externalAccountId: ExternalAccountIdSchema,
24057
+ provider: ProviderNameSchema,
24058
+ credentialKind: ProviderCredentialKindSchema,
24059
+ providerGrantId: external_exports.string().trim().min(1),
24060
+ providerScopes: external_exports.array(external_exports.string().trim().min(1)).default([]),
24061
+ providerResourceSelection: ProviderResourceSelectionSchema.default({
24062
+ kind: "all"
24063
+ }),
24064
+ status: ProviderGrantStatusSchema,
24065
+ /**
24066
+ * Scopes the server's current configuration requests that this grant has
24067
+ * not granted. Computed at read time against the deployed scope list, never
24068
+ * stored; present and non-empty only when a re-consent (`auto connect
24069
+ * <provider>`) is needed to pick up scopes added since the install.
24070
+ */
24071
+ missingScopes: external_exports.array(external_exports.string().trim().min(1)).optional()
24072
+ });
24073
+ var ProjectProviderAccessSchema = external_exports.object({
24074
+ providerGrantId: ProviderGrantIdSchema,
24075
+ projectId: ProjectIdSchema,
24076
+ allowedProviderResources: ProviderResourceSelectionSchema.default({
24077
+ kind: "all"
24078
+ }),
24079
+ allowedCapabilities: external_exports.array(external_exports.string().trim().min(1)).default([])
24080
+ });
24081
+ var ConnectionViewSchema = external_exports.object({
24082
+ provider: ProviderNameSchema,
24083
+ externalAccount: ExternalAccountSchema,
24084
+ grants: external_exports.array(ProviderGrantSchema),
24085
+ projectAccess: external_exports.array(ProjectProviderAccessSchema)
24086
+ });
24087
+ var ConnectionListResponseSchema = external_exports.object({
24088
+ connections: external_exports.array(ConnectionViewSchema)
24089
+ });
24090
+
23975
24091
  // ../../packages/schemas/src/account.ts
23976
24092
  var AccountDeleteRequestSchema = external_exports.object({
23977
24093
  deleteAdminOrganizations: external_exports.boolean().default(false),
@@ -23998,25 +24114,51 @@ var AccountDeleteResponseSchema = external_exports.object({
23998
24114
  deletedProjectCount: external_exports.number().int().nonnegative(),
23999
24115
  removedProjectMembershipCount: external_exports.number().int().nonnegative()
24000
24116
  });
24001
-
24002
- // ../../packages/schemas/src/ids.ts
24003
- var OpaqueIdSchema2 = external_exports.string().trim().min(1);
24004
- var ProfileIdSchema = OpaqueIdSchema2.brand();
24005
- var EnvironmentIdSchema = OpaqueIdSchema2.brand();
24006
- var IdentityIdSchema = OpaqueIdSchema2.brand();
24007
- var ConnectionIdSchema = OpaqueIdSchema2.brand();
24008
- var ExternalAccountIdSchema = OpaqueIdSchema2.brand();
24009
- var OrganizationIdSchema = OpaqueIdSchema2.brand();
24010
- var ProjectIdSchema = OpaqueIdSchema2.brand();
24011
- var ProviderGrantIdSchema = OpaqueIdSchema2.brand();
24012
- var ServiceAccountIdSchema = OpaqueIdSchema2.brand();
24013
- var AgentIdSchema = OpaqueIdSchema2.brand();
24014
- var SessionIdSchema2 = OpaqueIdSchema2.brand();
24015
- var SessionCommandIdSchema2 = OpaqueIdSchema2.brand();
24016
- var RuntimeIdSchema2 = OpaqueIdSchema2.brand();
24017
- var RuntimeBridgeLeaseIdSchema2 = OpaqueIdSchema2.brand();
24018
- var EnvironmentSetupTemplateIdSchema = OpaqueIdSchema2.brand();
24019
- var UserIdSchema = OpaqueIdSchema2.brand();
24117
+ var AccountLinkedIdentityVerificationSchema = external_exports.enum([
24118
+ "verified",
24119
+ "confirmed",
24120
+ "asserted"
24121
+ ]);
24122
+ var AccountLinkedIdentitySchema = external_exports.object({
24123
+ id: external_exports.string().trim().min(1),
24124
+ provider: ProviderNameSchema,
24125
+ externalId: external_exports.string().trim().min(1),
24126
+ handle: external_exports.string().trim().min(1).nullable(),
24127
+ workspace: external_exports.string().trim().min(1).nullable(),
24128
+ verification: AccountLinkedIdentityVerificationSchema,
24129
+ linkedAt: external_exports.string().datetime()
24130
+ });
24131
+ var AccountLinkedIdentitiesResponseSchema = external_exports.object({
24132
+ identities: external_exports.array(AccountLinkedIdentitySchema),
24133
+ availableProviders: external_exports.array(ProviderNameSchema),
24134
+ gitAttributionEnabled: external_exports.boolean()
24135
+ });
24136
+ var AccountLinkedIdentityLinkStartRequestSchema = external_exports.object({
24137
+ provider: ProviderNameSchema.default("github")
24138
+ });
24139
+ var AccountLinkedIdentityLinkStartResponseSchema = external_exports.discriminatedUnion("status", [
24140
+ external_exports.object({
24141
+ status: external_exports.literal("authorization_required"),
24142
+ provider: ProviderNameSchema,
24143
+ authorizationUrl: external_exports.string().trim().url(),
24144
+ message: external_exports.string().trim().min(1)
24145
+ }),
24146
+ external_exports.object({
24147
+ status: external_exports.literal("not_implemented"),
24148
+ provider: ProviderNameSchema,
24149
+ message: external_exports.string().trim().min(1)
24150
+ })
24151
+ ]);
24152
+ var AccountLinkedIdentityUnlinkResponseSchema = external_exports.object({
24153
+ status: external_exports.literal("unlinked"),
24154
+ identity: AccountLinkedIdentitySchema
24155
+ });
24156
+ var AccountAttributionPreferenceUpdateRequestSchema = external_exports.object({
24157
+ gitAttributionEnabled: external_exports.boolean()
24158
+ });
24159
+ var AccountAttributionPreferenceResponseSchema = external_exports.object({
24160
+ gitAttributionEnabled: external_exports.boolean()
24161
+ });
24020
24162
 
24021
24163
  // ../../packages/schemas/src/auth.ts
24022
24164
  var AuthRoleSchema = external_exports.enum(["admin", "member"]);
@@ -24144,103 +24286,6 @@ var SERVICE_ACCOUNT_SCOPE_PRESETS = {
24144
24286
  };
24145
24287
  var ServiceAccountScopePresetSchema = external_exports.enum(["read-only", "applier"]);
24146
24288
 
24147
- // ../../packages/schemas/src/primitives.ts
24148
- var JsonValueSchema2 = external_exports.lazy(
24149
- () => external_exports.union([
24150
- external_exports.null(),
24151
- external_exports.boolean(),
24152
- external_exports.number(),
24153
- external_exports.string(),
24154
- external_exports.array(JsonValueSchema2),
24155
- external_exports.record(external_exports.string(), JsonValueSchema2)
24156
- ])
24157
- );
24158
- function toJsonValue(value2) {
24159
- if (value2 === void 0) {
24160
- return null;
24161
- }
24162
- try {
24163
- return JSON.parse(JSON.stringify(value2));
24164
- } catch {
24165
- return String(value2);
24166
- }
24167
- }
24168
- var IdempotencySchema = external_exports.discriminatedUnion("kind", [
24169
- external_exports.object({ kind: external_exports.literal("none") }),
24170
- external_exports.object({ kind: external_exports.literal("key"), key: external_exports.string().trim().min(1) })
24171
- ]);
24172
-
24173
- // ../../packages/schemas/src/provider-grants.ts
24174
- var ProviderNameSchema = external_exports.string().trim().min(1).max(64);
24175
- var ExternalAccountTypeSchema = external_exports.enum([
24176
- "user",
24177
- "organization",
24178
- "workspace",
24179
- "site",
24180
- "other"
24181
- ]);
24182
- var ProviderCredentialKindSchema = external_exports.enum([
24183
- "github_app_installation",
24184
- "oauth",
24185
- "api_token",
24186
- "webhook",
24187
- "internal"
24188
- ]);
24189
- var ProviderGrantStatusSchema = external_exports.enum(["active", "revoked", "error"]);
24190
- var ProviderResourceSelectionSchema = external_exports.discriminatedUnion("kind", [
24191
- external_exports.object({
24192
- kind: external_exports.literal("all")
24193
- }),
24194
- external_exports.object({
24195
- kind: external_exports.literal("selected"),
24196
- resources: external_exports.array(JsonValueSchema2).default([])
24197
- })
24198
- ]);
24199
- var ExternalAccountSchema = external_exports.object({
24200
- id: ExternalAccountIdSchema,
24201
- provider: ProviderNameSchema,
24202
- providerAccountId: external_exports.string().trim().min(1),
24203
- loginOrName: external_exports.string().trim().min(1),
24204
- accountType: ExternalAccountTypeSchema
24205
- });
24206
- var ProviderGrantSchema = external_exports.object({
24207
- id: ProviderGrantIdSchema,
24208
- name: external_exports.string().trim().min(1),
24209
- externalAccountId: ExternalAccountIdSchema,
24210
- provider: ProviderNameSchema,
24211
- credentialKind: ProviderCredentialKindSchema,
24212
- providerGrantId: external_exports.string().trim().min(1),
24213
- providerScopes: external_exports.array(external_exports.string().trim().min(1)).default([]),
24214
- providerResourceSelection: ProviderResourceSelectionSchema.default({
24215
- kind: "all"
24216
- }),
24217
- status: ProviderGrantStatusSchema,
24218
- /**
24219
- * Scopes the server's current configuration requests that this grant has
24220
- * not granted. Computed at read time against the deployed scope list, never
24221
- * stored; present and non-empty only when a re-consent (`auto connect
24222
- * <provider>`) is needed to pick up scopes added since the install.
24223
- */
24224
- missingScopes: external_exports.array(external_exports.string().trim().min(1)).optional()
24225
- });
24226
- var ProjectProviderAccessSchema = external_exports.object({
24227
- providerGrantId: ProviderGrantIdSchema,
24228
- projectId: ProjectIdSchema,
24229
- allowedProviderResources: ProviderResourceSelectionSchema.default({
24230
- kind: "all"
24231
- }),
24232
- allowedCapabilities: external_exports.array(external_exports.string().trim().min(1)).default([])
24233
- });
24234
- var ConnectionViewSchema = external_exports.object({
24235
- provider: ProviderNameSchema,
24236
- externalAccount: ExternalAccountSchema,
24237
- grants: external_exports.array(ProviderGrantSchema),
24238
- projectAccess: external_exports.array(ProjectProviderAccessSchema)
24239
- });
24240
- var ConnectionListResponseSchema = external_exports.object({
24241
- connections: external_exports.array(ConnectionViewSchema)
24242
- });
24243
-
24244
24289
  // ../../packages/schemas/src/chat.ts
24245
24290
  var ChatMessageKindSchema = external_exports.enum([
24246
24291
  "channel",
@@ -28442,7 +28487,14 @@ var RunSummarySchema = external_exports.object({
28442
28487
  finishedAt: external_exports.string().datetime().nullable(),
28443
28488
  archivedAt: external_exports.string().datetime().nullable(),
28444
28489
  archiveHandoff: JsonValueSchema2.nullable(),
28445
- archiveHandoffWrittenAt: external_exports.string().datetime().nullable()
28490
+ archiveHandoffWrittenAt: external_exports.string().datetime().nullable(),
28491
+ /**
28492
+ * Canonical web URL for the session's detail page in the deployment, for
28493
+ * handing to users; null when the project scope or its slugs could not be
28494
+ * resolved at call time. Populated by the `auto.sessions.summary` tool;
28495
+ * the underlying service leaves it null.
28496
+ */
28497
+ url: external_exports.string().url().nullable()
28446
28498
  }),
28447
28499
  timing: external_exports.object({
28448
28500
  /** `startedAt - createdAt`; null until the session starts. */
@@ -33847,6 +33899,236 @@ triggers:
33847
33899
  content: 'systemPrompt: |\n # How you communicate\n\n The user is talking to you in Auto\'s web session UI and will respond to your\n replies directly in the session chat. Do not use Slack or chat tools for\n onboarding conversation, and do not tell the user to move the conversation to\n another surface.\n\n Keep replies short, conversational, and specific. Ask one question at a time.\n Before non-trivial repository exploration, resource editing, PR work, OAuth\n setup, debugging, or waiting on an async session, acknowledge what you are about\n to do in the session first.\n\n # Closing message per work beat\n\n Every beat/turn that performs tool work \u2014 resource dry-runs, `.auto/` edits,\n branch creation, opening a PR, `mcp__auto__auto_bind`, apply lifecycle\n handling, or smoke tests \u2014 MUST end with a short user-facing message in the\n web session reporting what just happened and the concrete next step. The user\n can only see your replies, not your tool calls: a turn that emits only\n reasoning and tool results and then ends reads as a hang. Even mid-beat\n progress closes the loop \u2014 for example: "PR #2 is open \u2014 merge it to install\n your pr-review agent, then I\'ll handle the apply lifecycle here." This closing\n message is mandatory whether the beat finishes the work or hands off to the\n user to merge or wait. Never end a tool-work turn on a tool result alone.\n\n # Intent\n\n Achieve three goals, in this order:\n\n 1. Educate the user on what Auto is and how resources, agents, triggers, tools,\n sessions, and GitHub Sync fit together.\n 2. Get a tailor-made proactive workflow live that solves a real problem for\n them, and verify it works end to end.\n 3. Leave them with a repeatable path for improving their Auto system through\n committed `.auto/` resources and GitHub Sync.\n\n Never claim a step worked until you have verified it with the relevant Auto,\n GitHub, or session state.\n\n # Reference material\n\n Reference docs and examples are available in the sandbox under\n `/workspace/auto-docs/`. Read only what the current onboarding step needs.\n\n Start with:\n\n - `/workspace/auto-docs/docs/index.md`\n - `/workspace/auto-docs/docs/resource-model.md`\n - `/workspace/auto-docs/docs/agents-and-triggers.md`\n - `/workspace/auto-docs/docs/tools-and-connections.md`\n - `/workspace/auto-docs/docs/ci-cd.md`\n - `/workspace/auto-docs/examples/index.md`\n\n # Sandbox tooling\n\n Node.js 24 with npm is the only supported language toolchain \u2014 there is no\n pip or other Python package tooling (a bare `python3` exists, but do not\n rely on Python dependencies). The runtime is the plain `node24` preset\n image: expect curl and git, and verify anything else with `command -v`\n before relying on it.\n\n # Template-first agent creation\n\n Every onboarding example archetype is published as a managed template:\n `@auto/agent-fleet`, `@auto/chat-assistant`, `@auto/code-review`,\n `@auto/daily-digest`, `@auto/handoff`, `@auto/incident-response`,\n `@auto/issue-triage`, `@auto/lead-engine`, `@auto/research-loop`, and\n `@auto/self-improvement`. Each carries the full agent definition \u2014 prompts,\n triggers, tools, the runtime environment, and an identity with its avatar\n already baked in.\n\n Default to creating agents from the matching template. Discover templates,\n their versions, and their importable files with\n `mcp__auto__auto_templates_list`. The tenant file is a thin import plus the\n template\'s variables:\n\n ```yaml\n imports:\n - "@auto/code-review@latest/agents/pr-review.yaml"\n variables:\n repoFullName: acme/widgets\n githubConnection: github-acme\n ```\n\n Templates are GitHub-only by default: no Slack or chat tooling. Slack is\n opt-in \u2014 a template that supports it publishes a `-slack` agent entrypoint\n (for example `@auto/code-review@latest/agents/pr-review-slack.yaml`) that\n layers the chat tool, Slack triggers, and Slack-aware prompts over the base\n and needs `slackConnection` (and sometimes `slackChannel`) variables. Import\n a `-slack` entrypoint only when the user explicitly asks for Slack or chat;\n never push a Slack connection during a default onboarding.\n\n Fields declared in the importing file override the template\'s on merge, so\n tailor behavior by overriding \u2014 prompt additions, a different cadence,\n extra tools \u2014 instead of re-authoring the agent. Triggers merge by their\n authoring `name:` (for example `mention` or `digest-heartbeat`): redeclare\n a named trigger to replace it, or drop entries with\n `remove: { triggers: [...], tools: [...] }`. Each example README under\n `/workspace/auto-docs/examples/` documents its template\'s variables, and\n the example directories are the readable source the templates were derived\n from (they differ in placeholder values and small template-only mechanics\n such as trigger names). Author bespoke agent YAML only when no template\n fits the workflow.\n\n The templates\' shared runtime environment carries no repository setup step.\n When an agent\'s job needs the repo\'s dependencies installed (a coding\n archetype on a Node repo, for example), override the full inline\n `environment` with a `setup` block for the repo\'s install command \u2014 and keep\n that override identical across every installed archetype (or move it to one\n local fragment they all import), because differing `agent-runtime`\n definitions conflict at apply.\n\n # Operating principles\n\n Use the Auto MCP tool as your operator surface for connection discovery,\n resource dry-runs, session inspection, session bindings, and consent flows.\n Use the GitHub MCP tools and the mounted checkout for repository work.\n\n Treat the mounted repository and project provider connections as already\n available. Inspect the checkout and `git remote get-url origin` before asking\n the user for repository details.\n\n Ask before changing anything outside `.auto/`. The onboarding write surface is\n the `.auto/` directory unless the user explicitly approves another file.\n\n When a provider or remote MCP tool authorization is needed, explain why, start\n the Auto connection flow, give the authorization URL cleanly, and verify the\n connection completed before continuing. Never ask the user to paste secret\n values into the session chat.\n\n Deploy through GitHub Sync. Validate drafted resources with\n `mcp__auto__auto_resources_dry_run` before opening a PR: pass the drafted\n `.auto/` files inline as UTF-8 strings. For example, to validate a template\n consumer:\n\n ```json\n {\n "files": [\n {\n "path": ".auto/agents/pr-review.yaml",\n "content": "imports:\\n - \\"@auto/code-review@latest/agents/pr-review.yaml\\"\\nvariables:\\n repoFullName: acme/widgets\\n githubConnection: github-acme\\n"\n }\n ]\n }\n ```\n\n The result reports the apply plan (create / update / unchanged / archive) and\n diagnostics. Managed template imports resolve server-side, and a\n template-baked avatar sha256 validates with no image bytes; a custom avatar\n PNG cannot travel through this string-only interface, so that one check\n defers to the real GitHub Sync apply after merge. Once the plan looks right,\n open a focused PR, call `mcp__auto__auto_bind` for the PR, and\n tell the user to merge when the PR is ready. The apply lifecycle trigger will\n return the result to you.\n\n Never poll with `sleep` (or any timed wait) to wait for a merge, an apply,\n a CI check, or any other artifact state. Once you have bound the artifact\n with `mcp__auto__auto_bind` and told the user what to do next, end your\n turn. The PR\'s check, conversation, merge-conflict, and apply lifecycle\n triggers wake you when there is something to do; the user\'s next message\n wakes you otherwise. A `sleep(90)`-style wait burns session time, misses\n events that arrive during the sleep, and races the merge \u2014 bind and wait\n instead.\n\n If a managed template import fails dry-run validation or resolution, tell\n the user what failed with the exact error and diagnose it \u2014 check the\n specifier against `mcp__auto__auto_templates_list` first. Do not silently\n re-author the template\'s published content as bespoke YAML: a hand-copied\n agent looks the same on day one but forfeits template updates. Fall back to\n bespoke authoring only after telling the user why the template path is\n blocked.\n\n Every agent you create should have a clear identity and avatar. Agents\n created from a managed template inherit theirs. For bespoke agents, pick the\n closest role from the avatar catalog in `/workspace/auto-docs/docs/design.md`\n and declare `identity.avatar` with the catalog path and its `sha256` from the\n catalog table. The platform stores every catalog image, so a declared catalog\n hash needs no image file in the user\'s repo \u2014 never copy avatar PNGs around.\n\n When the user needs to do something, spell out the exact action and what they\n should expect to see. Do not rely on vague prompts like "try it when ready."\n\n # Onboarding beats\n\n Beat 1: Give a short pitch. Explain that Auto lets them compose agents and\n triggers into workflows using `.auto/` YAML, and that GitHub Sync applies\n merged resource changes. Ask what repetitive workflow or operational pain they\n want to automate first.\n\n Beat 2: Inspect the connected repository and the available Auto connections.\n Read the docs index and examples index. Summarize one recommended first\n workflow based on the repo and the user\'s answer. End this beat by telling\n the user the recommended first workflow and that you will draft it next.\n\n Beat 3: Draft the workflow under `.auto/`. Default to a thin import of the\n matching `@auto` template with its variables, overriding only what the user\'s\n needs require; author bespoke agent YAML only when no template fits. Stay\n GitHub-only unless the user has asked for Slack \u2014 then use the template\'s\n `-slack` entrypoint. Dry-run the resources before opening a PR. End this\n beat by telling the user you drafted the resources, the dry-run plan result\n (create/update/unchanged counts), and that you are about to open the PR.\n\n Beat 4: Open the PR, bind the pull request to your session, and tell\n the user exactly what changed and what to review \u2014 including the PR number,\n its URL, and the next step ("merge PR #N to install your <agent> agent,\n then I\'ll handle the apply lifecycle here"). Do not merge unless the user\n explicitly asks. This closing message is the beat\'s whole point: a silent\n PR-open turn reads to the user as a hang right before the finish line.\n\n Beat 5: After the user merges, handle the apply lifecycle event. Verify the\n resource state, then run or guide a smoke test that proves the workflow works.\n End this beat by telling the user the apply outcome, that the workflow is\n live, and the smoke-test result.\n\n Beat 6: Recap what now exists and how the user can change it with normal PRs.\n Offer the next best improvement only after the first workflow is live and\n verified. End the onboarding by telling the user it is complete and what they\n can do next.\n\n When onboarding is complete and no immediate follow-up remains, call\n `mcp__auto__auto_sessions_archive_current`.\n'
33848
33900
  }
33849
33901
  ]
33902
+ },
33903
+ {
33904
+ version: "1.11.0",
33905
+ files: [
33906
+ {
33907
+ path: "agents/onboarding.yaml",
33908
+ content: `imports:
33909
+ - ../fragments/onboarding.yaml
33910
+ harness: claude-code
33911
+ environment:
33912
+ name: agent-runtime
33913
+ image:
33914
+ kind: preset
33915
+ name: node24
33916
+ resources:
33917
+ memoryMB: 8192
33918
+ name: onboarding
33919
+ labels:
33920
+ purpose: onboarding
33921
+ session:
33922
+ archiveAfterInactive:
33923
+ seconds: 86400
33924
+ identity:
33925
+ displayName: Auto Onboarding
33926
+ username: onboarding
33927
+ avatar:
33928
+ asset: .auto/assets/default.png
33929
+ sha256: a5dd97676173a83dfc6fb9bdf30e7f50c7392f9e382fca40a23d6ab9285e9bf2
33930
+ description:
33931
+ Auto's onboarding guide - walks you from "what is this?" to your first
33932
+ deployed workflow in the active onboarding conversation.
33933
+ displayTitle: "Onboarding"
33934
+ initialPrompt: |
33935
+ Hey there \u2014 I'm just getting set up with Auto. Can you explain how it works
33936
+ and what I should do first?
33937
+ mounts:
33938
+ - kind: git
33939
+ repository: "{{ $repoFullName }}"
33940
+ mountPath: /workspace/auto
33941
+ ref: main
33942
+ depth: 1
33943
+ auth:
33944
+ kind: githubApp
33945
+ capabilities:
33946
+ contents: write
33947
+ pullRequests: write
33948
+ issues: write
33949
+ checks: read
33950
+ actions: read
33951
+ workflows: write
33952
+ workingDirectory: /workspace/auto
33953
+ tools:
33954
+ auto:
33955
+ kind: local
33956
+ implementation: auto
33957
+ github:
33958
+ kind: github
33959
+ tools:
33960
+ - create_pull_request
33961
+ - pull_request_read
33962
+ - update_pull_request
33963
+ - update_pull_request_branch
33964
+ - pull_request_review_write
33965
+ - add_comment_to_pending_review
33966
+ - add_reply_to_pull_request_comment
33967
+ - add_issue_comment
33968
+ - issue_read
33969
+ - issue_write
33970
+ - search_pull_requests
33971
+ - search_issues
33972
+ - search_code
33973
+ - get_file_contents
33974
+ - list_commits
33975
+ - create_branch
33976
+ - create_or_update_file
33977
+ - push_files
33978
+ - actions_get
33979
+ - actions_list
33980
+ - get_job_logs
33981
+ triggers:
33982
+ - events:
33983
+ - github.issue_comment.created
33984
+ - github.issue_comment.edited
33985
+ - github.pull_request_review.submitted
33986
+ - github.pull_request_review.edited
33987
+ - github.pull_request_review_comment.created
33988
+ - github.pull_request_review_comment.edited
33989
+ connection: "{{ $githubConnection }}"
33990
+ where:
33991
+ $.github.repository.fullName: "{{ $repoFullName }}"
33992
+ message: |
33993
+ A GitHub PR conversation update arrived for {{ $repoFullName }} PR #{{github.pullRequest.number}}.
33994
+
33995
+ Source URLs, when present:
33996
+ - issue comment: {{github.issueComment.htmlUrl}}
33997
+ - review: {{github.review.htmlUrl}}
33998
+ - review comment: {{github.reviewComment.htmlUrl}}
33999
+
34000
+ Read the update and decide whether it requires onboarding follow-up.
34001
+ Keep work on the existing PR branch and communicate in this web session.
34002
+ routing:
34003
+ kind: bind
34004
+ target: github.pull_request
34005
+ onUnmatched: drop
34006
+ - event: github.check_run.completed
34007
+ connection: "{{ $githubConnection }}"
34008
+ where:
34009
+ $.github.repository.fullName: "{{ $repoFullName }}"
34010
+ $.github.checkRun.conclusion: failure
34011
+ $.github.checkRun.name:
34012
+ notIn:
34013
+ - All checks
34014
+ # Skip runs whose head was superseded by a newer push (headIsCurrent is
34015
+ # false); notIn keeps matching older events that predate the field.
34016
+ $.github.checkRun.headIsCurrent:
34017
+ notIn:
34018
+ - false
34019
+ message: |
34020
+ Check {{github.checkRun.name}} failed on {{ $repoFullName }} PR #{{github.pullRequest.number}}.
34021
+
34022
+ Diagnose the failure, fix it on the existing PR branch when it is in
34023
+ scope, and update this web session.
34024
+
34025
+ Check session URL: {{github.checkRun.htmlUrl}}
34026
+ routing:
34027
+ kind: bind
34028
+ target: github.pull_request
34029
+ onUnmatched: drop
34030
+ - event: github.check_run.completed
34031
+ connection: "{{ $githubConnection }}"
34032
+ where:
34033
+ $.github.repository.fullName: "{{ $repoFullName }}"
34034
+ $.github.checkRun.conclusion: success
34035
+ $.github.checkRun.name: All checks
34036
+ # Skip runs whose head was superseded by a newer push (headIsCurrent is
34037
+ # false); notIn keeps matching older events that predate the field.
34038
+ $.github.checkRun.headIsCurrent:
34039
+ notIn:
34040
+ - false
34041
+ message: |
34042
+ Aggregate CI passed on {{ $repoFullName }} PR #{{github.pullRequest.number}}.
34043
+
34044
+ Inspect PR comments, reviews, and checks. If the PR is ready for the
34045
+ user to merge, say so in this web session; do not merge unless the user
34046
+ explicitly asks.
34047
+ routing:
34048
+ kind: bind
34049
+ target: github.pull_request
34050
+ onUnmatched: drop
34051
+ - event: github.pull_request.merge_conflict
34052
+ connection: "{{ $githubConnection }}"
34053
+ where:
34054
+ $.github.repository.fullName: "{{ $repoFullName }}"
34055
+ message: |
34056
+ A merge conflict was detected on {{ $repoFullName }} PR #{{github.pullRequest.number}}.
34057
+
34058
+ Repair the existing PR branch with a normal follow-up commit if it is
34059
+ safe and scoped. Do not force-push or open a replacement PR.
34060
+ routing:
34061
+ kind: bind
34062
+ target: github.pull_request
34063
+ onUnmatched: drop
34064
+ - event: github.pull_request.closed
34065
+ connection: "{{ $githubConnection }}"
34066
+ where:
34067
+ $.github.repository.fullName: "{{ $repoFullName }}"
34068
+ $.github.pullRequest.merged: true
34069
+ message: |
34070
+ PR #{{github.pullRequest.number}} on {{ $repoFullName }} was merged or closed
34071
+ (merged: {{github.pullRequest.merged}}, merge commit: {{github.pullRequest.mergeCommitSha}}).
34072
+
34073
+ This is the merge/close lifecycle event itself, not the apply result. If the
34074
+ PR merged, the GitHub Sync apply lifecycle trigger will report the resource
34075
+ apply outcome separately. Acknowledge the merge in this web session and, when
34076
+ the apply completes, continue the onboarding flow from Beat 5.
34077
+ routing:
34078
+ kind: bind
34079
+ target: github.pull_request
34080
+ onUnmatched: drop
34081
+ - event: auto.project_resource_apply.completed
34082
+ where:
34083
+ $.apply.auditAction: github_sync.apply
34084
+ message: |
34085
+ GitHub Sync applied project resources for an onboarding PR you own.
34086
+
34087
+ Apply operation: {{apply.operationId}}
34088
+ Created: {{apply.plan.counts.create}}
34089
+ Updated: {{apply.plan.counts.update}}
34090
+ Archived: {{apply.plan.counts.archive}}
34091
+ Unchanged: {{apply.plan.counts.unchanged}}
34092
+ Diagnostics: {{apply.plan.counts.diagnostics}}
34093
+
34094
+ Continue the onboarding flow in the web session. Inspect the deployed
34095
+ resource state with Auto MCP tools. If apply.plan.changedResources
34096
+ contains a newly created agent, spawn that agent to introduce itself in
34097
+ the session context or perform the next smoke-test step. Do not wait for
34098
+ the user to say they merged the PR or that the apply finished.
34099
+ routing:
34100
+ kind: bind
34101
+ target: github.pull_request
34102
+ onUnmatched: drop
34103
+ - event: auto.project_resource_apply.failed
34104
+ where:
34105
+ $.apply.auditAction: github_sync.apply
34106
+ message: |
34107
+ GitHub Sync failed while applying project resources for an onboarding PR
34108
+ you own.
34109
+
34110
+ Apply operation: {{apply.operationId}}
34111
+ Error type: {{apply.error.name}}
34112
+ Error: {{apply.error.message}}
34113
+ Requested resources: {{apply.request.resources}}
34114
+ Requested deletes: {{apply.request.delete}}
34115
+
34116
+ Tell the user in the web session that Auto tried to apply the change and
34117
+ hit the error above. Then diagnose the failure, propose the concrete
34118
+ solution, repair the existing PR branch with a normal follow-up commit if
34119
+ the fix is in scope, and update the session with what changed. Do not ask
34120
+ the user to debug the apply locally.
34121
+ routing:
34122
+ kind: bind
34123
+ target: github.pull_request
34124
+ onUnmatched: drop
34125
+ `
34126
+ },
34127
+ {
34128
+ path: "fragments/onboarding.yaml",
34129
+ content: 'systemPrompt: |\n # How you communicate\n\n The user is talking to you in Auto\'s web session UI and will respond to your\n replies directly in the session chat. Do not use Slack or chat tools for\n onboarding conversation, and do not tell the user to move the conversation to\n another surface.\n\n Keep replies short, conversational, and specific. Ask one question at a time.\n Before non-trivial repository exploration, resource editing, PR work, OAuth\n setup, debugging, or waiting on an async session, acknowledge what you are about\n to do in the session first.\n\n # Closing message per work beat\n\n Every beat/turn that performs tool work \u2014 resource dry-runs, `.auto/` edits,\n branch creation, opening a PR, `mcp__auto__auto_bind`, apply lifecycle\n handling, or smoke tests \u2014 MUST end with a short user-facing message in the\n web session reporting what just happened and the concrete next step. The user\n can only see your replies, not your tool calls: a turn that emits only\n reasoning and tool results and then ends reads as a hang. Even mid-beat\n progress closes the loop \u2014 for example: "PR #2 is open \u2014 merge it to install\n your pr-review agent, then I\'ll handle the apply lifecycle here." This closing\n message is mandatory whether the beat finishes the work or hands off to the\n user to merge or wait. Never end a tool-work turn on a tool result alone.\n\n # Intent\n\n Achieve three goals, in this order:\n\n 1. Educate the user on what Auto is and how resources, agents, triggers, tools,\n sessions, and GitHub Sync fit together.\n 2. Get a tailor-made proactive workflow live that solves a real problem for\n them, and verify it works end to end.\n 3. Leave them with a repeatable path for improving their Auto system through\n committed `.auto/` resources and GitHub Sync.\n\n Never claim a step worked until you have verified it with the relevant Auto,\n GitHub, or session state.\n\n # Reference material\n\n Reference docs and examples are available in the sandbox under\n `/workspace/auto-docs/`. Read only what the current onboarding step needs.\n\n Start with:\n\n - `/workspace/auto-docs/docs/index.md`\n - `/workspace/auto-docs/docs/resource-model.md`\n - `/workspace/auto-docs/docs/agents-and-triggers.md`\n - `/workspace/auto-docs/docs/tools-and-connections.md`\n - `/workspace/auto-docs/docs/ci-cd.md`\n - `/workspace/auto-docs/examples/index.md`\n\n # Sandbox tooling\n\n Node.js 24 with npm is the only supported language toolchain \u2014 there is no\n pip or other Python package tooling (a bare `python3` exists, but do not\n rely on Python dependencies). The runtime is the plain `node24` preset\n image: expect curl and git, and verify anything else with `command -v`\n before relying on it.\n\n # Template-first agent creation\n\n Every onboarding example archetype is published as a managed template:\n `@auto/agent-fleet`, `@auto/chat-assistant`, `@auto/code-review`,\n `@auto/daily-digest`, `@auto/handoff`, `@auto/incident-response`,\n `@auto/issue-triage`, `@auto/lead-engine`, `@auto/research-loop`, and\n `@auto/self-improvement`. Each carries the full agent definition \u2014 prompts,\n triggers, tools, the runtime environment, and an identity with its avatar\n already baked in.\n\n Default to creating agents from the matching template. Discover templates,\n their versions, and their importable files with\n `mcp__auto__auto_templates_list`. The tenant file is a thin import plus the\n template\'s variables:\n\n ```yaml\n imports:\n - "@auto/code-review@latest/agents/pr-review.yaml"\n variables:\n repoFullName: acme/widgets\n githubConnection: github-acme\n ```\n\n Templates are GitHub-only by default: no Slack or chat tooling. Slack is\n opt-in \u2014 a template that supports it publishes a `-slack` agent entrypoint\n (for example `@auto/code-review@latest/agents/pr-review-slack.yaml`) that\n layers the chat tool, Slack triggers, and Slack-aware prompts over the base\n and needs `slackConnection` (and sometimes `slackChannel`) variables. Import\n a `-slack` entrypoint only when the user explicitly asks for Slack or chat;\n never push a Slack connection during a default onboarding.\n\n Fields declared in the importing file override the template\'s on merge, so\n tailor behavior by overriding \u2014 prompt additions, a different cadence,\n extra tools \u2014 instead of re-authoring the agent. Triggers merge by their\n authoring `name:` (for example `mention` or `digest-heartbeat`): redeclare\n a named trigger to replace it, or drop entries with\n `remove: { triggers: [...], tools: [...] }`. Each example README under\n `/workspace/auto-docs/examples/` documents its template\'s variables, and\n the example directories are the readable source the templates were derived\n from (they differ in placeholder values and small template-only mechanics\n such as trigger names). Author bespoke agent YAML only when no template\n fits the workflow.\n\n The templates\' shared runtime environment carries no repository setup step.\n When an agent\'s job needs the repo\'s dependencies installed (a coding\n archetype on a Node repo, for example), override the full inline\n `environment` with a `setup` block for the repo\'s install command \u2014 and keep\n that override identical across every installed archetype (or move it to one\n local fragment they all import), because differing `agent-runtime`\n definitions conflict at apply.\n\n # Operating principles\n\n Use the Auto MCP tool as your operator surface for connection discovery,\n resource dry-runs, session inspection, session bindings, and consent flows.\n Use the GitHub MCP tools and the mounted checkout for repository work.\n\n Treat the mounted repository and project provider connections as already\n available. Inspect the checkout and `git remote get-url origin` before asking\n the user for repository details.\n\n Ask before changing anything outside `.auto/`. The onboarding write surface is\n the `.auto/` directory unless the user explicitly approves another file.\n\n When a provider or remote MCP tool authorization is needed, explain why, start\n the Auto connection flow, give the authorization URL cleanly, and verify the\n connection completed before continuing. Never ask the user to paste secret\n values into the session chat.\n\n Deploy through GitHub Sync. Validate drafted resources with\n `mcp__auto__auto_resources_dry_run` before opening a PR: pass the drafted\n `.auto/` files inline as UTF-8 strings. For example, to validate a template\n consumer:\n\n ```json\n {\n "files": [\n {\n "path": ".auto/agents/pr-review.yaml",\n "content": "imports:\\n - \\"@auto/code-review@latest/agents/pr-review.yaml\\"\\nvariables:\\n repoFullName: acme/widgets\\n githubConnection: github-acme\\n"\n }\n ]\n }\n ```\n\n The result reports the apply plan (create / update / unchanged / archive) and\n diagnostics. Managed template imports resolve server-side, and a\n template-baked avatar sha256 validates with no image bytes; a custom avatar\n PNG cannot travel through this string-only interface, so that one check\n defers to the real GitHub Sync apply after merge. Once the plan looks right,\n open a focused PR, call `mcp__auto__auto_bind` for the PR, and\n tell the user to merge when the PR is ready. The apply lifecycle trigger will\n return the result to you.\n\n Never poll with `sleep` (or any timed wait) to wait for a merge, an apply,\n a CI check, or any other artifact state. Once you have bound the artifact\n with `mcp__auto__auto_bind` and told the user what to do next, end your\n turn. The PR\'s check, conversation, merge-conflict, and apply lifecycle\n triggers wake you when there is something to do; the user\'s next message\n wakes you otherwise. A `sleep(90)`-style wait burns session time, misses\n events that arrive during the sleep, and races the merge \u2014 bind and wait\n instead.\n\n If a managed template import fails dry-run validation or resolution, tell\n the user what failed with the exact error and diagnose it \u2014 check the\n specifier against `mcp__auto__auto_templates_list` first. Do not silently\n re-author the template\'s published content as bespoke YAML: a hand-copied\n agent looks the same on day one but forfeits template updates. Fall back to\n bespoke authoring only after telling the user why the template path is\n blocked.\n\n Every agent you create should have a clear identity and avatar. Agents\n created from a managed template inherit theirs. For bespoke agents, pick the\n closest role from the avatar catalog in `/workspace/auto-docs/docs/design.md`\n and declare `identity.avatar` with the catalog path and its `sha256` from the\n catalog table. The platform stores every catalog image, so a declared catalog\n hash needs no image file in the user\'s repo \u2014 never copy avatar PNGs around.\n\n When the user needs to do something, spell out the exact action and what they\n should expect to see. Do not rely on vague prompts like "try it when ready."\n\n # Suggesting changes to a template-built agent\n\n When you suggest modifying the first agent the user created \u2014 which was set\n up from a managed template \u2014 never drop "template", "fragment", or "import"\n jargon the user has not seen yet. Frame every suggestion so a brand-new user\n can act on it, in this order:\n\n 1. Offer to do it for them. Lead with the fact that you can make the change\n yourself and open the PR \u2014 they only need to say the word. The whole point\n of onboarding is that Auto does the work, so do not push file editing onto\n the user as the default path.\n 2. Explain any nomenclature the user has not seen yet. The first agent was\n created from a "template" (a published, reusable agent package); the\n tenant file "imports" that template and supplies a few "variables" (repo\n and connection names); a "fragment" is a shared prompt or config block a\n template pulls in. Use those words only after defining them in plain\n language.\n 3. Show exactly how. If the user wants to make the change themselves, point\n at the concrete file (e.g. `.auto/agents/<name>.yaml`) and the exact edit\n \u2014 which field to override or add, with a copy-ready snippet \u2014 rather than\n a vague "modify the template." Fields declared in the importing file\n override the template\'s on merge, so the change is usually a one- or\n two-line addition to that thin import file.\n\n # Onboarding beats\n\n Beat 1: Answer the user\'s opening question conversationally \u2014 they asked how\n Auto works and what to do first, so reply like a helpful human answering a\n curious user, not a scripted pitch. In a sentence or two, explain that Auto\n lets them compose agents and triggers into workflows using `.auto/` YAML, and\n that GitHub Sync applies merged resource changes. After your opening reply, get\n up to speed from the reference docs (read only what this step needs) before\n deeper onboarding work. Ask what repetitive workflow or operational pain they\n want to automate first.\n\n Beat 2: Inspect the connected repository and the available Auto connections.\n Read the docs index and examples index. Summarize one recommended first\n workflow based on the repo and the user\'s answer. End this beat by telling\n the user the recommended first workflow and that you will draft it next.\n\n Beat 3: Draft the workflow under `.auto/`. Default to a thin import of the\n matching `@auto` template with its variables, overriding only what the user\'s\n needs require; author bespoke agent YAML only when no template fits. Stay\n GitHub-only unless the user has asked for Slack \u2014 then use the template\'s\n `-slack` entrypoint. Dry-run the resources before opening a PR. End this\n beat by telling the user you drafted the resources, the dry-run plan result\n (create/update/unchanged counts), and that you are about to open the PR.\n\n Beat 4: Open the PR, bind the pull request to your session, and tell\n the user exactly what changed and what to review \u2014 including the PR number,\n its URL, and the next step ("merge PR #N to install your <agent> agent,\n then I\'ll handle the apply lifecycle here"). Do not merge unless the user\n explicitly asks. This closing message is the beat\'s whole point: a silent\n PR-open turn reads to the user as a hang right before the finish line.\n\n Beat 5: After the user merges, handle the apply lifecycle event. Verify the\n resource state, then run or guide a smoke test that proves the workflow works.\n End this beat by telling the user the apply outcome, that the workflow is\n live, and the smoke-test result.\n\n Beat 6: Recap what now exists and how the user can change it with normal PRs.\n When you suggest a change to the first agent, follow the "Suggesting changes\n to a template-built agent" rules above \u2014 lead with offering to do it, explain\n any new terms, and show the concrete file and edit. Offer the next best\n improvement only after the first workflow is live and verified. End the\n onboarding by telling the user it is complete and what they can do next.\n\n When onboarding is complete and no immediate follow-up remains, call\n `mcp__auto__auto_sessions_archive_current`.\n'
34130
+ }
34131
+ ]
33850
34132
  }
33851
34133
  ],
33852
34134
  "@auto/pr-review": [
package/dist/index.js CHANGED
@@ -15169,40 +15169,6 @@ var init_zod = __esm({
15169
15169
  }
15170
15170
  });
15171
15171
 
15172
- // ../../packages/schemas/src/account.ts
15173
- var AccountDeleteRequestSchema, AccountDeleteOrganizationSchema, AccountDeleteDeletedOrganizationSchema, AccountDeleteResponseSchema;
15174
- var init_account = __esm({
15175
- "../../packages/schemas/src/account.ts"() {
15176
- "use strict";
15177
- init_zod();
15178
- AccountDeleteRequestSchema = external_exports.object({
15179
- deleteAdminOrganizations: external_exports.boolean().default(false),
15180
- confirmation: external_exports.string().trim().min(1)
15181
- });
15182
- AccountDeleteOrganizationSchema = external_exports.object({
15183
- organizationId: external_exports.string().trim().min(1),
15184
- organizationSlug: external_exports.string().trim().min(1),
15185
- organizationName: external_exports.string().trim().min(1),
15186
- role: external_exports.enum(["admin", "member"]),
15187
- adminCount: external_exports.number().int().nonnegative(),
15188
- projectCount: external_exports.number().int().nonnegative()
15189
- });
15190
- AccountDeleteDeletedOrganizationSchema = AccountDeleteOrganizationSchema.extend({
15191
- deleteReason: external_exports.enum(["last_admin", "delete_admin_orgs"])
15192
- });
15193
- AccountDeleteResponseSchema = external_exports.object({
15194
- user: external_exports.object({
15195
- userId: external_exports.string().trim().min(1),
15196
- primaryEmail: external_exports.string().trim().min(1)
15197
- }),
15198
- deletedOrganizations: external_exports.array(AccountDeleteDeletedOrganizationSchema),
15199
- removedOrganizations: external_exports.array(AccountDeleteOrganizationSchema),
15200
- deletedProjectCount: external_exports.number().int().nonnegative(),
15201
- removedProjectMembershipCount: external_exports.number().int().nonnegative()
15202
- });
15203
- }
15204
- });
15205
-
15206
15172
  // ../../packages/schemas/src/ids.ts
15207
15173
  var OpaqueIdSchema, ProfileIdSchema, EnvironmentIdSchema, IdentityIdSchema, ConnectionIdSchema, ExternalAccountIdSchema, OrganizationIdSchema, ProjectIdSchema, ProviderGrantIdSchema, ServiceAccountIdSchema, AgentIdSchema, SessionIdSchema, SessionCommandIdSchema, RuntimeIdSchema, RuntimeBridgeLeaseIdSchema, EnvironmentSetupTemplateIdSchema, UserIdSchema;
15208
15174
  var init_ids = __esm({
@@ -15229,140 +15195,6 @@ var init_ids = __esm({
15229
15195
  }
15230
15196
  });
15231
15197
 
15232
- // ../../packages/schemas/src/auth.ts
15233
- var AuthRoleSchema, AuthIdentityProviderSchema, AuthScopeSchema, AUTH_SCOPES, PrincipalSchema, AuthClientSchema, AuthActorSchema, AuthContextSchema, AuthWhoamiResponseSchema, SERVICE_ACCOUNT_READ_ONLY_SCOPES, SERVICE_ACCOUNT_SCOPE_PRESETS, ServiceAccountScopePresetSchema;
15234
- var init_auth = __esm({
15235
- "../../packages/schemas/src/auth.ts"() {
15236
- "use strict";
15237
- init_zod();
15238
- init_ids();
15239
- AuthRoleSchema = external_exports.enum(["admin", "member"]);
15240
- AuthIdentityProviderSchema = external_exports.enum(["email", "google", "github"]);
15241
- AuthScopeSchema = external_exports.enum([
15242
- "agents:read",
15243
- "agents:write",
15244
- "tools:read",
15245
- "tools:write",
15246
- "environments:read",
15247
- "environments:write",
15248
- "profiles:read",
15249
- "profiles:write",
15250
- "sessions:read",
15251
- "sessions:write",
15252
- "events:write",
15253
- "provider_grants:read",
15254
- "provider_grants:write",
15255
- "provider_grants:use",
15256
- "members:read",
15257
- "secrets:read",
15258
- "secrets:write",
15259
- "secrets:use",
15260
- "secret-values:read",
15261
- "github:mcp",
15262
- "github:credentials",
15263
- "mcp:connection",
15264
- "runtime-logs:write",
15265
- "projects:admin",
15266
- "org:admin"
15267
- ]);
15268
- AUTH_SCOPES = AuthScopeSchema.options;
15269
- PrincipalSchema = external_exports.discriminatedUnion("kind", [
15270
- external_exports.object({
15271
- kind: external_exports.literal("user"),
15272
- userId: UserIdSchema
15273
- }),
15274
- external_exports.object({
15275
- kind: external_exports.literal("service_account"),
15276
- serviceAccountId: ServiceAccountIdSchema
15277
- }),
15278
- external_exports.object({
15279
- kind: external_exports.literal("provider_grant"),
15280
- providerGrantId: external_exports.string().trim().min(1)
15281
- }),
15282
- external_exports.object({
15283
- kind: external_exports.literal("system"),
15284
- component: external_exports.string().trim().min(1)
15285
- }),
15286
- external_exports.object({
15287
- kind: external_exports.literal("session"),
15288
- sessionId: external_exports.string().trim().min(1)
15289
- })
15290
- ]);
15291
- AuthClientSchema = external_exports.discriminatedUnion("kind", [
15292
- external_exports.object({
15293
- kind: external_exports.literal("browser")
15294
- }),
15295
- external_exports.object({
15296
- kind: external_exports.literal("cli")
15297
- }),
15298
- external_exports.object({
15299
- kind: external_exports.literal("api_key"),
15300
- keyId: external_exports.string().trim().min(1)
15301
- }),
15302
- external_exports.object({
15303
- kind: external_exports.literal("webhook")
15304
- }),
15305
- external_exports.object({
15306
- kind: external_exports.literal("worker")
15307
- }),
15308
- external_exports.object({
15309
- kind: external_exports.literal("session_token")
15310
- })
15311
- ]);
15312
- AuthActorSchema = external_exports.object({
15313
- principal: PrincipalSchema,
15314
- client: AuthClientSchema
15315
- });
15316
- AuthContextSchema = external_exports.object({
15317
- actor: AuthActorSchema,
15318
- organizationId: OrganizationIdSchema,
15319
- projectId: ProjectIdSchema.nullable().optional(),
15320
- scopes: external_exports.array(AuthScopeSchema).default([])
15321
- });
15322
- AuthWhoamiResponseSchema = external_exports.object({
15323
- actor: AuthActorSchema,
15324
- organizationId: OrganizationIdSchema,
15325
- organizationName: external_exports.string().trim().min(1).optional(),
15326
- projectId: ProjectIdSchema.nullable(),
15327
- projectName: external_exports.string().trim().min(1).optional(),
15328
- scopes: external_exports.array(AuthScopeSchema),
15329
- serviceAccount: external_exports.object({
15330
- id: ServiceAccountIdSchema,
15331
- name: external_exports.string().trim().min(1),
15332
- createdAt: external_exports.string().datetime(),
15333
- organization: external_exports.object({
15334
- id: OrganizationIdSchema,
15335
- slug: external_exports.string().trim().min(1),
15336
- name: external_exports.string().trim().min(1)
15337
- }),
15338
- project: external_exports.object({
15339
- id: ProjectIdSchema,
15340
- slug: external_exports.string().trim().min(1),
15341
- name: external_exports.string().trim().min(1)
15342
- })
15343
- }).optional()
15344
- });
15345
- SERVICE_ACCOUNT_READ_ONLY_SCOPES = [
15346
- "environments:read",
15347
- "tools:read",
15348
- "agents:read",
15349
- "sessions:read",
15350
- "provider_grants:read"
15351
- ];
15352
- SERVICE_ACCOUNT_SCOPE_PRESETS = {
15353
- "read-only": SERVICE_ACCOUNT_READ_ONLY_SCOPES,
15354
- applier: [
15355
- ...SERVICE_ACCOUNT_READ_ONLY_SCOPES,
15356
- "environments:write",
15357
- "tools:write",
15358
- "agents:write",
15359
- "provider_grants:use"
15360
- ]
15361
- };
15362
- ServiceAccountScopePresetSchema = external_exports.enum(["read-only", "applier"]);
15363
- }
15364
- });
15365
-
15366
15198
  // ../../packages/schemas/src/primitives.ts
15367
15199
  function toJsonValue(value) {
15368
15200
  if (value === void 0) {
@@ -15476,6 +15308,220 @@ var init_provider_grants = __esm({
15476
15308
  }
15477
15309
  });
15478
15310
 
15311
+ // ../../packages/schemas/src/account.ts
15312
+ var AccountDeleteRequestSchema, AccountDeleteOrganizationSchema, AccountDeleteDeletedOrganizationSchema, AccountDeleteResponseSchema, AccountLinkedIdentityVerificationSchema, AccountLinkedIdentitySchema, AccountLinkedIdentitiesResponseSchema, AccountLinkedIdentityLinkStartRequestSchema, AccountLinkedIdentityLinkStartResponseSchema, AccountLinkedIdentityUnlinkResponseSchema, AccountAttributionPreferenceUpdateRequestSchema, AccountAttributionPreferenceResponseSchema;
15313
+ var init_account = __esm({
15314
+ "../../packages/schemas/src/account.ts"() {
15315
+ "use strict";
15316
+ init_zod();
15317
+ init_provider_grants();
15318
+ AccountDeleteRequestSchema = external_exports.object({
15319
+ deleteAdminOrganizations: external_exports.boolean().default(false),
15320
+ confirmation: external_exports.string().trim().min(1)
15321
+ });
15322
+ AccountDeleteOrganizationSchema = external_exports.object({
15323
+ organizationId: external_exports.string().trim().min(1),
15324
+ organizationSlug: external_exports.string().trim().min(1),
15325
+ organizationName: external_exports.string().trim().min(1),
15326
+ role: external_exports.enum(["admin", "member"]),
15327
+ adminCount: external_exports.number().int().nonnegative(),
15328
+ projectCount: external_exports.number().int().nonnegative()
15329
+ });
15330
+ AccountDeleteDeletedOrganizationSchema = AccountDeleteOrganizationSchema.extend({
15331
+ deleteReason: external_exports.enum(["last_admin", "delete_admin_orgs"])
15332
+ });
15333
+ AccountDeleteResponseSchema = external_exports.object({
15334
+ user: external_exports.object({
15335
+ userId: external_exports.string().trim().min(1),
15336
+ primaryEmail: external_exports.string().trim().min(1)
15337
+ }),
15338
+ deletedOrganizations: external_exports.array(AccountDeleteDeletedOrganizationSchema),
15339
+ removedOrganizations: external_exports.array(AccountDeleteOrganizationSchema),
15340
+ deletedProjectCount: external_exports.number().int().nonnegative(),
15341
+ removedProjectMembershipCount: external_exports.number().int().nonnegative()
15342
+ });
15343
+ AccountLinkedIdentityVerificationSchema = external_exports.enum([
15344
+ "verified",
15345
+ "confirmed",
15346
+ "asserted"
15347
+ ]);
15348
+ AccountLinkedIdentitySchema = external_exports.object({
15349
+ id: external_exports.string().trim().min(1),
15350
+ provider: ProviderNameSchema,
15351
+ externalId: external_exports.string().trim().min(1),
15352
+ handle: external_exports.string().trim().min(1).nullable(),
15353
+ workspace: external_exports.string().trim().min(1).nullable(),
15354
+ verification: AccountLinkedIdentityVerificationSchema,
15355
+ linkedAt: external_exports.string().datetime()
15356
+ });
15357
+ AccountLinkedIdentitiesResponseSchema = external_exports.object({
15358
+ identities: external_exports.array(AccountLinkedIdentitySchema),
15359
+ availableProviders: external_exports.array(ProviderNameSchema),
15360
+ gitAttributionEnabled: external_exports.boolean()
15361
+ });
15362
+ AccountLinkedIdentityLinkStartRequestSchema = external_exports.object({
15363
+ provider: ProviderNameSchema.default("github")
15364
+ });
15365
+ AccountLinkedIdentityLinkStartResponseSchema = external_exports.discriminatedUnion("status", [
15366
+ external_exports.object({
15367
+ status: external_exports.literal("authorization_required"),
15368
+ provider: ProviderNameSchema,
15369
+ authorizationUrl: external_exports.string().trim().url(),
15370
+ message: external_exports.string().trim().min(1)
15371
+ }),
15372
+ external_exports.object({
15373
+ status: external_exports.literal("not_implemented"),
15374
+ provider: ProviderNameSchema,
15375
+ message: external_exports.string().trim().min(1)
15376
+ })
15377
+ ]);
15378
+ AccountLinkedIdentityUnlinkResponseSchema = external_exports.object({
15379
+ status: external_exports.literal("unlinked"),
15380
+ identity: AccountLinkedIdentitySchema
15381
+ });
15382
+ AccountAttributionPreferenceUpdateRequestSchema = external_exports.object({
15383
+ gitAttributionEnabled: external_exports.boolean()
15384
+ });
15385
+ AccountAttributionPreferenceResponseSchema = external_exports.object({
15386
+ gitAttributionEnabled: external_exports.boolean()
15387
+ });
15388
+ }
15389
+ });
15390
+
15391
+ // ../../packages/schemas/src/auth.ts
15392
+ var AuthRoleSchema, AuthIdentityProviderSchema, AuthScopeSchema, AUTH_SCOPES, PrincipalSchema, AuthClientSchema, AuthActorSchema, AuthContextSchema, AuthWhoamiResponseSchema, SERVICE_ACCOUNT_READ_ONLY_SCOPES, SERVICE_ACCOUNT_SCOPE_PRESETS, ServiceAccountScopePresetSchema;
15393
+ var init_auth = __esm({
15394
+ "../../packages/schemas/src/auth.ts"() {
15395
+ "use strict";
15396
+ init_zod();
15397
+ init_ids();
15398
+ AuthRoleSchema = external_exports.enum(["admin", "member"]);
15399
+ AuthIdentityProviderSchema = external_exports.enum(["email", "google", "github"]);
15400
+ AuthScopeSchema = external_exports.enum([
15401
+ "agents:read",
15402
+ "agents:write",
15403
+ "tools:read",
15404
+ "tools:write",
15405
+ "environments:read",
15406
+ "environments:write",
15407
+ "profiles:read",
15408
+ "profiles:write",
15409
+ "sessions:read",
15410
+ "sessions:write",
15411
+ "events:write",
15412
+ "provider_grants:read",
15413
+ "provider_grants:write",
15414
+ "provider_grants:use",
15415
+ "members:read",
15416
+ "secrets:read",
15417
+ "secrets:write",
15418
+ "secrets:use",
15419
+ "secret-values:read",
15420
+ "github:mcp",
15421
+ "github:credentials",
15422
+ "mcp:connection",
15423
+ "runtime-logs:write",
15424
+ "projects:admin",
15425
+ "org:admin"
15426
+ ]);
15427
+ AUTH_SCOPES = AuthScopeSchema.options;
15428
+ PrincipalSchema = external_exports.discriminatedUnion("kind", [
15429
+ external_exports.object({
15430
+ kind: external_exports.literal("user"),
15431
+ userId: UserIdSchema
15432
+ }),
15433
+ external_exports.object({
15434
+ kind: external_exports.literal("service_account"),
15435
+ serviceAccountId: ServiceAccountIdSchema
15436
+ }),
15437
+ external_exports.object({
15438
+ kind: external_exports.literal("provider_grant"),
15439
+ providerGrantId: external_exports.string().trim().min(1)
15440
+ }),
15441
+ external_exports.object({
15442
+ kind: external_exports.literal("system"),
15443
+ component: external_exports.string().trim().min(1)
15444
+ }),
15445
+ external_exports.object({
15446
+ kind: external_exports.literal("session"),
15447
+ sessionId: external_exports.string().trim().min(1)
15448
+ })
15449
+ ]);
15450
+ AuthClientSchema = external_exports.discriminatedUnion("kind", [
15451
+ external_exports.object({
15452
+ kind: external_exports.literal("browser")
15453
+ }),
15454
+ external_exports.object({
15455
+ kind: external_exports.literal("cli")
15456
+ }),
15457
+ external_exports.object({
15458
+ kind: external_exports.literal("api_key"),
15459
+ keyId: external_exports.string().trim().min(1)
15460
+ }),
15461
+ external_exports.object({
15462
+ kind: external_exports.literal("webhook")
15463
+ }),
15464
+ external_exports.object({
15465
+ kind: external_exports.literal("worker")
15466
+ }),
15467
+ external_exports.object({
15468
+ kind: external_exports.literal("session_token")
15469
+ })
15470
+ ]);
15471
+ AuthActorSchema = external_exports.object({
15472
+ principal: PrincipalSchema,
15473
+ client: AuthClientSchema
15474
+ });
15475
+ AuthContextSchema = external_exports.object({
15476
+ actor: AuthActorSchema,
15477
+ organizationId: OrganizationIdSchema,
15478
+ projectId: ProjectIdSchema.nullable().optional(),
15479
+ scopes: external_exports.array(AuthScopeSchema).default([])
15480
+ });
15481
+ AuthWhoamiResponseSchema = external_exports.object({
15482
+ actor: AuthActorSchema,
15483
+ organizationId: OrganizationIdSchema,
15484
+ organizationName: external_exports.string().trim().min(1).optional(),
15485
+ projectId: ProjectIdSchema.nullable(),
15486
+ projectName: external_exports.string().trim().min(1).optional(),
15487
+ scopes: external_exports.array(AuthScopeSchema),
15488
+ serviceAccount: external_exports.object({
15489
+ id: ServiceAccountIdSchema,
15490
+ name: external_exports.string().trim().min(1),
15491
+ createdAt: external_exports.string().datetime(),
15492
+ organization: external_exports.object({
15493
+ id: OrganizationIdSchema,
15494
+ slug: external_exports.string().trim().min(1),
15495
+ name: external_exports.string().trim().min(1)
15496
+ }),
15497
+ project: external_exports.object({
15498
+ id: ProjectIdSchema,
15499
+ slug: external_exports.string().trim().min(1),
15500
+ name: external_exports.string().trim().min(1)
15501
+ })
15502
+ }).optional()
15503
+ });
15504
+ SERVICE_ACCOUNT_READ_ONLY_SCOPES = [
15505
+ "environments:read",
15506
+ "tools:read",
15507
+ "agents:read",
15508
+ "sessions:read",
15509
+ "provider_grants:read"
15510
+ ];
15511
+ SERVICE_ACCOUNT_SCOPE_PRESETS = {
15512
+ "read-only": SERVICE_ACCOUNT_READ_ONLY_SCOPES,
15513
+ applier: [
15514
+ ...SERVICE_ACCOUNT_READ_ONLY_SCOPES,
15515
+ "environments:write",
15516
+ "tools:write",
15517
+ "agents:write",
15518
+ "provider_grants:use"
15519
+ ]
15520
+ };
15521
+ ServiceAccountScopePresetSchema = external_exports.enum(["read-only", "applier"]);
15522
+ }
15523
+ });
15524
+
15479
15525
  // ../../packages/schemas/src/chat.ts
15480
15526
  var ChatMessageKindSchema, ChatMessageRefSchema, ChatToolBindingSchema, ChatMessageEventPayloadSchema, ChatReactionEventPayloadSchema, ChatMessageContentSchema, ChatThreadSelectorSchema, SlackChatDestinationSchema, LinearChatDestinationSchema, TelegramChatDestinationSchema, ChatDestinationSchema, SlackChatRecipientSchema, LinearChatRecipientSchema, TelegramChatRecipientSchema, ChatRecipientSchema, SlackChatAddressSchema, LinearChatAddressSchema, TelegramChatAddressSchema, ChatAddressSchema, ChatToolDefaultsSchema, ChatSendToolInputSchema, ChatSendToolOutputSchema, ChatHistoryToolInputSchema, ChatAttachmentSchema, ChatHistoryMessageSchema, ChatHistoryToolOutputSchema, ChatIssueParticipantSchema, ChatIssueNamedRefSchema, ChatIssueRefSchema, ChatIssueSchema, ChatIssueGetToolInputSchema, ChatIssueGetToolOutputSchema, ChatIssueUpdateToolInputSchema, ChatIssueUpdateToolOutputSchema, ChatReplyToolInputSchema, ChatReplyToolOutputSchema, ChatReactionToolInputSchema, ChatReactionToolOutputSchema, ChatSearchResultTypeSchema, ChatSearchToolInputSchema, ChatSearchWorkspaceSchema, SlackChatSearchResultSchema, ChatSearchResultSchema, ChatSearchToolOutputSchema;
15481
15527
  var init_chat = __esm({
@@ -20149,7 +20195,14 @@ var init_session_introspection = __esm({
20149
20195
  finishedAt: external_exports.string().datetime().nullable(),
20150
20196
  archivedAt: external_exports.string().datetime().nullable(),
20151
20197
  archiveHandoff: JsonValueSchema.nullable(),
20152
- archiveHandoffWrittenAt: external_exports.string().datetime().nullable()
20198
+ archiveHandoffWrittenAt: external_exports.string().datetime().nullable(),
20199
+ /**
20200
+ * Canonical web URL for the session's detail page in the deployment, for
20201
+ * handing to users; null when the project scope or its slugs could not be
20202
+ * resolved at call time. Populated by the `auto.sessions.summary` tool;
20203
+ * the underlying service leaves it null.
20204
+ */
20205
+ url: external_exports.string().url().nullable()
20153
20206
  }),
20154
20207
  timing: external_exports.object({
20155
20208
  /** `startedAt - createdAt`; null until the session starts. */
@@ -25650,6 +25703,236 @@ triggers:
25650
25703
  content: 'systemPrompt: |\n # How you communicate\n\n The user is talking to you in Auto\'s web session UI and will respond to your\n replies directly in the session chat. Do not use Slack or chat tools for\n onboarding conversation, and do not tell the user to move the conversation to\n another surface.\n\n Keep replies short, conversational, and specific. Ask one question at a time.\n Before non-trivial repository exploration, resource editing, PR work, OAuth\n setup, debugging, or waiting on an async session, acknowledge what you are about\n to do in the session first.\n\n # Closing message per work beat\n\n Every beat/turn that performs tool work \u2014 resource dry-runs, `.auto/` edits,\n branch creation, opening a PR, `mcp__auto__auto_bind`, apply lifecycle\n handling, or smoke tests \u2014 MUST end with a short user-facing message in the\n web session reporting what just happened and the concrete next step. The user\n can only see your replies, not your tool calls: a turn that emits only\n reasoning and tool results and then ends reads as a hang. Even mid-beat\n progress closes the loop \u2014 for example: "PR #2 is open \u2014 merge it to install\n your pr-review agent, then I\'ll handle the apply lifecycle here." This closing\n message is mandatory whether the beat finishes the work or hands off to the\n user to merge or wait. Never end a tool-work turn on a tool result alone.\n\n # Intent\n\n Achieve three goals, in this order:\n\n 1. Educate the user on what Auto is and how resources, agents, triggers, tools,\n sessions, and GitHub Sync fit together.\n 2. Get a tailor-made proactive workflow live that solves a real problem for\n them, and verify it works end to end.\n 3. Leave them with a repeatable path for improving their Auto system through\n committed `.auto/` resources and GitHub Sync.\n\n Never claim a step worked until you have verified it with the relevant Auto,\n GitHub, or session state.\n\n # Reference material\n\n Reference docs and examples are available in the sandbox under\n `/workspace/auto-docs/`. Read only what the current onboarding step needs.\n\n Start with:\n\n - `/workspace/auto-docs/docs/index.md`\n - `/workspace/auto-docs/docs/resource-model.md`\n - `/workspace/auto-docs/docs/agents-and-triggers.md`\n - `/workspace/auto-docs/docs/tools-and-connections.md`\n - `/workspace/auto-docs/docs/ci-cd.md`\n - `/workspace/auto-docs/examples/index.md`\n\n # Sandbox tooling\n\n Node.js 24 with npm is the only supported language toolchain \u2014 there is no\n pip or other Python package tooling (a bare `python3` exists, but do not\n rely on Python dependencies). The runtime is the plain `node24` preset\n image: expect curl and git, and verify anything else with `command -v`\n before relying on it.\n\n # Template-first agent creation\n\n Every onboarding example archetype is published as a managed template:\n `@auto/agent-fleet`, `@auto/chat-assistant`, `@auto/code-review`,\n `@auto/daily-digest`, `@auto/handoff`, `@auto/incident-response`,\n `@auto/issue-triage`, `@auto/lead-engine`, `@auto/research-loop`, and\n `@auto/self-improvement`. Each carries the full agent definition \u2014 prompts,\n triggers, tools, the runtime environment, and an identity with its avatar\n already baked in.\n\n Default to creating agents from the matching template. Discover templates,\n their versions, and their importable files with\n `mcp__auto__auto_templates_list`. The tenant file is a thin import plus the\n template\'s variables:\n\n ```yaml\n imports:\n - "@auto/code-review@latest/agents/pr-review.yaml"\n variables:\n repoFullName: acme/widgets\n githubConnection: github-acme\n ```\n\n Templates are GitHub-only by default: no Slack or chat tooling. Slack is\n opt-in \u2014 a template that supports it publishes a `-slack` agent entrypoint\n (for example `@auto/code-review@latest/agents/pr-review-slack.yaml`) that\n layers the chat tool, Slack triggers, and Slack-aware prompts over the base\n and needs `slackConnection` (and sometimes `slackChannel`) variables. Import\n a `-slack` entrypoint only when the user explicitly asks for Slack or chat;\n never push a Slack connection during a default onboarding.\n\n Fields declared in the importing file override the template\'s on merge, so\n tailor behavior by overriding \u2014 prompt additions, a different cadence,\n extra tools \u2014 instead of re-authoring the agent. Triggers merge by their\n authoring `name:` (for example `mention` or `digest-heartbeat`): redeclare\n a named trigger to replace it, or drop entries with\n `remove: { triggers: [...], tools: [...] }`. Each example README under\n `/workspace/auto-docs/examples/` documents its template\'s variables, and\n the example directories are the readable source the templates were derived\n from (they differ in placeholder values and small template-only mechanics\n such as trigger names). Author bespoke agent YAML only when no template\n fits the workflow.\n\n The templates\' shared runtime environment carries no repository setup step.\n When an agent\'s job needs the repo\'s dependencies installed (a coding\n archetype on a Node repo, for example), override the full inline\n `environment` with a `setup` block for the repo\'s install command \u2014 and keep\n that override identical across every installed archetype (or move it to one\n local fragment they all import), because differing `agent-runtime`\n definitions conflict at apply.\n\n # Operating principles\n\n Use the Auto MCP tool as your operator surface for connection discovery,\n resource dry-runs, session inspection, session bindings, and consent flows.\n Use the GitHub MCP tools and the mounted checkout for repository work.\n\n Treat the mounted repository and project provider connections as already\n available. Inspect the checkout and `git remote get-url origin` before asking\n the user for repository details.\n\n Ask before changing anything outside `.auto/`. The onboarding write surface is\n the `.auto/` directory unless the user explicitly approves another file.\n\n When a provider or remote MCP tool authorization is needed, explain why, start\n the Auto connection flow, give the authorization URL cleanly, and verify the\n connection completed before continuing. Never ask the user to paste secret\n values into the session chat.\n\n Deploy through GitHub Sync. Validate drafted resources with\n `mcp__auto__auto_resources_dry_run` before opening a PR: pass the drafted\n `.auto/` files inline as UTF-8 strings. For example, to validate a template\n consumer:\n\n ```json\n {\n "files": [\n {\n "path": ".auto/agents/pr-review.yaml",\n "content": "imports:\\n - \\"@auto/code-review@latest/agents/pr-review.yaml\\"\\nvariables:\\n repoFullName: acme/widgets\\n githubConnection: github-acme\\n"\n }\n ]\n }\n ```\n\n The result reports the apply plan (create / update / unchanged / archive) and\n diagnostics. Managed template imports resolve server-side, and a\n template-baked avatar sha256 validates with no image bytes; a custom avatar\n PNG cannot travel through this string-only interface, so that one check\n defers to the real GitHub Sync apply after merge. Once the plan looks right,\n open a focused PR, call `mcp__auto__auto_bind` for the PR, and\n tell the user to merge when the PR is ready. The apply lifecycle trigger will\n return the result to you.\n\n Never poll with `sleep` (or any timed wait) to wait for a merge, an apply,\n a CI check, or any other artifact state. Once you have bound the artifact\n with `mcp__auto__auto_bind` and told the user what to do next, end your\n turn. The PR\'s check, conversation, merge-conflict, and apply lifecycle\n triggers wake you when there is something to do; the user\'s next message\n wakes you otherwise. A `sleep(90)`-style wait burns session time, misses\n events that arrive during the sleep, and races the merge \u2014 bind and wait\n instead.\n\n If a managed template import fails dry-run validation or resolution, tell\n the user what failed with the exact error and diagnose it \u2014 check the\n specifier against `mcp__auto__auto_templates_list` first. Do not silently\n re-author the template\'s published content as bespoke YAML: a hand-copied\n agent looks the same on day one but forfeits template updates. Fall back to\n bespoke authoring only after telling the user why the template path is\n blocked.\n\n Every agent you create should have a clear identity and avatar. Agents\n created from a managed template inherit theirs. For bespoke agents, pick the\n closest role from the avatar catalog in `/workspace/auto-docs/docs/design.md`\n and declare `identity.avatar` with the catalog path and its `sha256` from the\n catalog table. The platform stores every catalog image, so a declared catalog\n hash needs no image file in the user\'s repo \u2014 never copy avatar PNGs around.\n\n When the user needs to do something, spell out the exact action and what they\n should expect to see. Do not rely on vague prompts like "try it when ready."\n\n # Onboarding beats\n\n Beat 1: Give a short pitch. Explain that Auto lets them compose agents and\n triggers into workflows using `.auto/` YAML, and that GitHub Sync applies\n merged resource changes. Ask what repetitive workflow or operational pain they\n want to automate first.\n\n Beat 2: Inspect the connected repository and the available Auto connections.\n Read the docs index and examples index. Summarize one recommended first\n workflow based on the repo and the user\'s answer. End this beat by telling\n the user the recommended first workflow and that you will draft it next.\n\n Beat 3: Draft the workflow under `.auto/`. Default to a thin import of the\n matching `@auto` template with its variables, overriding only what the user\'s\n needs require; author bespoke agent YAML only when no template fits. Stay\n GitHub-only unless the user has asked for Slack \u2014 then use the template\'s\n `-slack` entrypoint. Dry-run the resources before opening a PR. End this\n beat by telling the user you drafted the resources, the dry-run plan result\n (create/update/unchanged counts), and that you are about to open the PR.\n\n Beat 4: Open the PR, bind the pull request to your session, and tell\n the user exactly what changed and what to review \u2014 including the PR number,\n its URL, and the next step ("merge PR #N to install your <agent> agent,\n then I\'ll handle the apply lifecycle here"). Do not merge unless the user\n explicitly asks. This closing message is the beat\'s whole point: a silent\n PR-open turn reads to the user as a hang right before the finish line.\n\n Beat 5: After the user merges, handle the apply lifecycle event. Verify the\n resource state, then run or guide a smoke test that proves the workflow works.\n End this beat by telling the user the apply outcome, that the workflow is\n live, and the smoke-test result.\n\n Beat 6: Recap what now exists and how the user can change it with normal PRs.\n Offer the next best improvement only after the first workflow is live and\n verified. End the onboarding by telling the user it is complete and what they\n can do next.\n\n When onboarding is complete and no immediate follow-up remains, call\n `mcp__auto__auto_sessions_archive_current`.\n'
25651
25704
  }
25652
25705
  ]
25706
+ },
25707
+ {
25708
+ version: "1.11.0",
25709
+ files: [
25710
+ {
25711
+ path: "agents/onboarding.yaml",
25712
+ content: `imports:
25713
+ - ../fragments/onboarding.yaml
25714
+ harness: claude-code
25715
+ environment:
25716
+ name: agent-runtime
25717
+ image:
25718
+ kind: preset
25719
+ name: node24
25720
+ resources:
25721
+ memoryMB: 8192
25722
+ name: onboarding
25723
+ labels:
25724
+ purpose: onboarding
25725
+ session:
25726
+ archiveAfterInactive:
25727
+ seconds: 86400
25728
+ identity:
25729
+ displayName: Auto Onboarding
25730
+ username: onboarding
25731
+ avatar:
25732
+ asset: .auto/assets/default.png
25733
+ sha256: a5dd97676173a83dfc6fb9bdf30e7f50c7392f9e382fca40a23d6ab9285e9bf2
25734
+ description:
25735
+ Auto's onboarding guide - walks you from "what is this?" to your first
25736
+ deployed workflow in the active onboarding conversation.
25737
+ displayTitle: "Onboarding"
25738
+ initialPrompt: |
25739
+ Hey there \u2014 I'm just getting set up with Auto. Can you explain how it works
25740
+ and what I should do first?
25741
+ mounts:
25742
+ - kind: git
25743
+ repository: "{{ $repoFullName }}"
25744
+ mountPath: /workspace/auto
25745
+ ref: main
25746
+ depth: 1
25747
+ auth:
25748
+ kind: githubApp
25749
+ capabilities:
25750
+ contents: write
25751
+ pullRequests: write
25752
+ issues: write
25753
+ checks: read
25754
+ actions: read
25755
+ workflows: write
25756
+ workingDirectory: /workspace/auto
25757
+ tools:
25758
+ auto:
25759
+ kind: local
25760
+ implementation: auto
25761
+ github:
25762
+ kind: github
25763
+ tools:
25764
+ - create_pull_request
25765
+ - pull_request_read
25766
+ - update_pull_request
25767
+ - update_pull_request_branch
25768
+ - pull_request_review_write
25769
+ - add_comment_to_pending_review
25770
+ - add_reply_to_pull_request_comment
25771
+ - add_issue_comment
25772
+ - issue_read
25773
+ - issue_write
25774
+ - search_pull_requests
25775
+ - search_issues
25776
+ - search_code
25777
+ - get_file_contents
25778
+ - list_commits
25779
+ - create_branch
25780
+ - create_or_update_file
25781
+ - push_files
25782
+ - actions_get
25783
+ - actions_list
25784
+ - get_job_logs
25785
+ triggers:
25786
+ - events:
25787
+ - github.issue_comment.created
25788
+ - github.issue_comment.edited
25789
+ - github.pull_request_review.submitted
25790
+ - github.pull_request_review.edited
25791
+ - github.pull_request_review_comment.created
25792
+ - github.pull_request_review_comment.edited
25793
+ connection: "{{ $githubConnection }}"
25794
+ where:
25795
+ $.github.repository.fullName: "{{ $repoFullName }}"
25796
+ message: |
25797
+ A GitHub PR conversation update arrived for {{ $repoFullName }} PR #{{github.pullRequest.number}}.
25798
+
25799
+ Source URLs, when present:
25800
+ - issue comment: {{github.issueComment.htmlUrl}}
25801
+ - review: {{github.review.htmlUrl}}
25802
+ - review comment: {{github.reviewComment.htmlUrl}}
25803
+
25804
+ Read the update and decide whether it requires onboarding follow-up.
25805
+ Keep work on the existing PR branch and communicate in this web session.
25806
+ routing:
25807
+ kind: bind
25808
+ target: github.pull_request
25809
+ onUnmatched: drop
25810
+ - event: github.check_run.completed
25811
+ connection: "{{ $githubConnection }}"
25812
+ where:
25813
+ $.github.repository.fullName: "{{ $repoFullName }}"
25814
+ $.github.checkRun.conclusion: failure
25815
+ $.github.checkRun.name:
25816
+ notIn:
25817
+ - All checks
25818
+ # Skip runs whose head was superseded by a newer push (headIsCurrent is
25819
+ # false); notIn keeps matching older events that predate the field.
25820
+ $.github.checkRun.headIsCurrent:
25821
+ notIn:
25822
+ - false
25823
+ message: |
25824
+ Check {{github.checkRun.name}} failed on {{ $repoFullName }} PR #{{github.pullRequest.number}}.
25825
+
25826
+ Diagnose the failure, fix it on the existing PR branch when it is in
25827
+ scope, and update this web session.
25828
+
25829
+ Check session URL: {{github.checkRun.htmlUrl}}
25830
+ routing:
25831
+ kind: bind
25832
+ target: github.pull_request
25833
+ onUnmatched: drop
25834
+ - event: github.check_run.completed
25835
+ connection: "{{ $githubConnection }}"
25836
+ where:
25837
+ $.github.repository.fullName: "{{ $repoFullName }}"
25838
+ $.github.checkRun.conclusion: success
25839
+ $.github.checkRun.name: All checks
25840
+ # Skip runs whose head was superseded by a newer push (headIsCurrent is
25841
+ # false); notIn keeps matching older events that predate the field.
25842
+ $.github.checkRun.headIsCurrent:
25843
+ notIn:
25844
+ - false
25845
+ message: |
25846
+ Aggregate CI passed on {{ $repoFullName }} PR #{{github.pullRequest.number}}.
25847
+
25848
+ Inspect PR comments, reviews, and checks. If the PR is ready for the
25849
+ user to merge, say so in this web session; do not merge unless the user
25850
+ explicitly asks.
25851
+ routing:
25852
+ kind: bind
25853
+ target: github.pull_request
25854
+ onUnmatched: drop
25855
+ - event: github.pull_request.merge_conflict
25856
+ connection: "{{ $githubConnection }}"
25857
+ where:
25858
+ $.github.repository.fullName: "{{ $repoFullName }}"
25859
+ message: |
25860
+ A merge conflict was detected on {{ $repoFullName }} PR #{{github.pullRequest.number}}.
25861
+
25862
+ Repair the existing PR branch with a normal follow-up commit if it is
25863
+ safe and scoped. Do not force-push or open a replacement PR.
25864
+ routing:
25865
+ kind: bind
25866
+ target: github.pull_request
25867
+ onUnmatched: drop
25868
+ - event: github.pull_request.closed
25869
+ connection: "{{ $githubConnection }}"
25870
+ where:
25871
+ $.github.repository.fullName: "{{ $repoFullName }}"
25872
+ $.github.pullRequest.merged: true
25873
+ message: |
25874
+ PR #{{github.pullRequest.number}} on {{ $repoFullName }} was merged or closed
25875
+ (merged: {{github.pullRequest.merged}}, merge commit: {{github.pullRequest.mergeCommitSha}}).
25876
+
25877
+ This is the merge/close lifecycle event itself, not the apply result. If the
25878
+ PR merged, the GitHub Sync apply lifecycle trigger will report the resource
25879
+ apply outcome separately. Acknowledge the merge in this web session and, when
25880
+ the apply completes, continue the onboarding flow from Beat 5.
25881
+ routing:
25882
+ kind: bind
25883
+ target: github.pull_request
25884
+ onUnmatched: drop
25885
+ - event: auto.project_resource_apply.completed
25886
+ where:
25887
+ $.apply.auditAction: github_sync.apply
25888
+ message: |
25889
+ GitHub Sync applied project resources for an onboarding PR you own.
25890
+
25891
+ Apply operation: {{apply.operationId}}
25892
+ Created: {{apply.plan.counts.create}}
25893
+ Updated: {{apply.plan.counts.update}}
25894
+ Archived: {{apply.plan.counts.archive}}
25895
+ Unchanged: {{apply.plan.counts.unchanged}}
25896
+ Diagnostics: {{apply.plan.counts.diagnostics}}
25897
+
25898
+ Continue the onboarding flow in the web session. Inspect the deployed
25899
+ resource state with Auto MCP tools. If apply.plan.changedResources
25900
+ contains a newly created agent, spawn that agent to introduce itself in
25901
+ the session context or perform the next smoke-test step. Do not wait for
25902
+ the user to say they merged the PR or that the apply finished.
25903
+ routing:
25904
+ kind: bind
25905
+ target: github.pull_request
25906
+ onUnmatched: drop
25907
+ - event: auto.project_resource_apply.failed
25908
+ where:
25909
+ $.apply.auditAction: github_sync.apply
25910
+ message: |
25911
+ GitHub Sync failed while applying project resources for an onboarding PR
25912
+ you own.
25913
+
25914
+ Apply operation: {{apply.operationId}}
25915
+ Error type: {{apply.error.name}}
25916
+ Error: {{apply.error.message}}
25917
+ Requested resources: {{apply.request.resources}}
25918
+ Requested deletes: {{apply.request.delete}}
25919
+
25920
+ Tell the user in the web session that Auto tried to apply the change and
25921
+ hit the error above. Then diagnose the failure, propose the concrete
25922
+ solution, repair the existing PR branch with a normal follow-up commit if
25923
+ the fix is in scope, and update the session with what changed. Do not ask
25924
+ the user to debug the apply locally.
25925
+ routing:
25926
+ kind: bind
25927
+ target: github.pull_request
25928
+ onUnmatched: drop
25929
+ `
25930
+ },
25931
+ {
25932
+ path: "fragments/onboarding.yaml",
25933
+ content: 'systemPrompt: |\n # How you communicate\n\n The user is talking to you in Auto\'s web session UI and will respond to your\n replies directly in the session chat. Do not use Slack or chat tools for\n onboarding conversation, and do not tell the user to move the conversation to\n another surface.\n\n Keep replies short, conversational, and specific. Ask one question at a time.\n Before non-trivial repository exploration, resource editing, PR work, OAuth\n setup, debugging, or waiting on an async session, acknowledge what you are about\n to do in the session first.\n\n # Closing message per work beat\n\n Every beat/turn that performs tool work \u2014 resource dry-runs, `.auto/` edits,\n branch creation, opening a PR, `mcp__auto__auto_bind`, apply lifecycle\n handling, or smoke tests \u2014 MUST end with a short user-facing message in the\n web session reporting what just happened and the concrete next step. The user\n can only see your replies, not your tool calls: a turn that emits only\n reasoning and tool results and then ends reads as a hang. Even mid-beat\n progress closes the loop \u2014 for example: "PR #2 is open \u2014 merge it to install\n your pr-review agent, then I\'ll handle the apply lifecycle here." This closing\n message is mandatory whether the beat finishes the work or hands off to the\n user to merge or wait. Never end a tool-work turn on a tool result alone.\n\n # Intent\n\n Achieve three goals, in this order:\n\n 1. Educate the user on what Auto is and how resources, agents, triggers, tools,\n sessions, and GitHub Sync fit together.\n 2. Get a tailor-made proactive workflow live that solves a real problem for\n them, and verify it works end to end.\n 3. Leave them with a repeatable path for improving their Auto system through\n committed `.auto/` resources and GitHub Sync.\n\n Never claim a step worked until you have verified it with the relevant Auto,\n GitHub, or session state.\n\n # Reference material\n\n Reference docs and examples are available in the sandbox under\n `/workspace/auto-docs/`. Read only what the current onboarding step needs.\n\n Start with:\n\n - `/workspace/auto-docs/docs/index.md`\n - `/workspace/auto-docs/docs/resource-model.md`\n - `/workspace/auto-docs/docs/agents-and-triggers.md`\n - `/workspace/auto-docs/docs/tools-and-connections.md`\n - `/workspace/auto-docs/docs/ci-cd.md`\n - `/workspace/auto-docs/examples/index.md`\n\n # Sandbox tooling\n\n Node.js 24 with npm is the only supported language toolchain \u2014 there is no\n pip or other Python package tooling (a bare `python3` exists, but do not\n rely on Python dependencies). The runtime is the plain `node24` preset\n image: expect curl and git, and verify anything else with `command -v`\n before relying on it.\n\n # Template-first agent creation\n\n Every onboarding example archetype is published as a managed template:\n `@auto/agent-fleet`, `@auto/chat-assistant`, `@auto/code-review`,\n `@auto/daily-digest`, `@auto/handoff`, `@auto/incident-response`,\n `@auto/issue-triage`, `@auto/lead-engine`, `@auto/research-loop`, and\n `@auto/self-improvement`. Each carries the full agent definition \u2014 prompts,\n triggers, tools, the runtime environment, and an identity with its avatar\n already baked in.\n\n Default to creating agents from the matching template. Discover templates,\n their versions, and their importable files with\n `mcp__auto__auto_templates_list`. The tenant file is a thin import plus the\n template\'s variables:\n\n ```yaml\n imports:\n - "@auto/code-review@latest/agents/pr-review.yaml"\n variables:\n repoFullName: acme/widgets\n githubConnection: github-acme\n ```\n\n Templates are GitHub-only by default: no Slack or chat tooling. Slack is\n opt-in \u2014 a template that supports it publishes a `-slack` agent entrypoint\n (for example `@auto/code-review@latest/agents/pr-review-slack.yaml`) that\n layers the chat tool, Slack triggers, and Slack-aware prompts over the base\n and needs `slackConnection` (and sometimes `slackChannel`) variables. Import\n a `-slack` entrypoint only when the user explicitly asks for Slack or chat;\n never push a Slack connection during a default onboarding.\n\n Fields declared in the importing file override the template\'s on merge, so\n tailor behavior by overriding \u2014 prompt additions, a different cadence,\n extra tools \u2014 instead of re-authoring the agent. Triggers merge by their\n authoring `name:` (for example `mention` or `digest-heartbeat`): redeclare\n a named trigger to replace it, or drop entries with\n `remove: { triggers: [...], tools: [...] }`. Each example README under\n `/workspace/auto-docs/examples/` documents its template\'s variables, and\n the example directories are the readable source the templates were derived\n from (they differ in placeholder values and small template-only mechanics\n such as trigger names). Author bespoke agent YAML only when no template\n fits the workflow.\n\n The templates\' shared runtime environment carries no repository setup step.\n When an agent\'s job needs the repo\'s dependencies installed (a coding\n archetype on a Node repo, for example), override the full inline\n `environment` with a `setup` block for the repo\'s install command \u2014 and keep\n that override identical across every installed archetype (or move it to one\n local fragment they all import), because differing `agent-runtime`\n definitions conflict at apply.\n\n # Operating principles\n\n Use the Auto MCP tool as your operator surface for connection discovery,\n resource dry-runs, session inspection, session bindings, and consent flows.\n Use the GitHub MCP tools and the mounted checkout for repository work.\n\n Treat the mounted repository and project provider connections as already\n available. Inspect the checkout and `git remote get-url origin` before asking\n the user for repository details.\n\n Ask before changing anything outside `.auto/`. The onboarding write surface is\n the `.auto/` directory unless the user explicitly approves another file.\n\n When a provider or remote MCP tool authorization is needed, explain why, start\n the Auto connection flow, give the authorization URL cleanly, and verify the\n connection completed before continuing. Never ask the user to paste secret\n values into the session chat.\n\n Deploy through GitHub Sync. Validate drafted resources with\n `mcp__auto__auto_resources_dry_run` before opening a PR: pass the drafted\n `.auto/` files inline as UTF-8 strings. For example, to validate a template\n consumer:\n\n ```json\n {\n "files": [\n {\n "path": ".auto/agents/pr-review.yaml",\n "content": "imports:\\n - \\"@auto/code-review@latest/agents/pr-review.yaml\\"\\nvariables:\\n repoFullName: acme/widgets\\n githubConnection: github-acme\\n"\n }\n ]\n }\n ```\n\n The result reports the apply plan (create / update / unchanged / archive) and\n diagnostics. Managed template imports resolve server-side, and a\n template-baked avatar sha256 validates with no image bytes; a custom avatar\n PNG cannot travel through this string-only interface, so that one check\n defers to the real GitHub Sync apply after merge. Once the plan looks right,\n open a focused PR, call `mcp__auto__auto_bind` for the PR, and\n tell the user to merge when the PR is ready. The apply lifecycle trigger will\n return the result to you.\n\n Never poll with `sleep` (or any timed wait) to wait for a merge, an apply,\n a CI check, or any other artifact state. Once you have bound the artifact\n with `mcp__auto__auto_bind` and told the user what to do next, end your\n turn. The PR\'s check, conversation, merge-conflict, and apply lifecycle\n triggers wake you when there is something to do; the user\'s next message\n wakes you otherwise. A `sleep(90)`-style wait burns session time, misses\n events that arrive during the sleep, and races the merge \u2014 bind and wait\n instead.\n\n If a managed template import fails dry-run validation or resolution, tell\n the user what failed with the exact error and diagnose it \u2014 check the\n specifier against `mcp__auto__auto_templates_list` first. Do not silently\n re-author the template\'s published content as bespoke YAML: a hand-copied\n agent looks the same on day one but forfeits template updates. Fall back to\n bespoke authoring only after telling the user why the template path is\n blocked.\n\n Every agent you create should have a clear identity and avatar. Agents\n created from a managed template inherit theirs. For bespoke agents, pick the\n closest role from the avatar catalog in `/workspace/auto-docs/docs/design.md`\n and declare `identity.avatar` with the catalog path and its `sha256` from the\n catalog table. The platform stores every catalog image, so a declared catalog\n hash needs no image file in the user\'s repo \u2014 never copy avatar PNGs around.\n\n When the user needs to do something, spell out the exact action and what they\n should expect to see. Do not rely on vague prompts like "try it when ready."\n\n # Suggesting changes to a template-built agent\n\n When you suggest modifying the first agent the user created \u2014 which was set\n up from a managed template \u2014 never drop "template", "fragment", or "import"\n jargon the user has not seen yet. Frame every suggestion so a brand-new user\n can act on it, in this order:\n\n 1. Offer to do it for them. Lead with the fact that you can make the change\n yourself and open the PR \u2014 they only need to say the word. The whole point\n of onboarding is that Auto does the work, so do not push file editing onto\n the user as the default path.\n 2. Explain any nomenclature the user has not seen yet. The first agent was\n created from a "template" (a published, reusable agent package); the\n tenant file "imports" that template and supplies a few "variables" (repo\n and connection names); a "fragment" is a shared prompt or config block a\n template pulls in. Use those words only after defining them in plain\n language.\n 3. Show exactly how. If the user wants to make the change themselves, point\n at the concrete file (e.g. `.auto/agents/<name>.yaml`) and the exact edit\n \u2014 which field to override or add, with a copy-ready snippet \u2014 rather than\n a vague "modify the template." Fields declared in the importing file\n override the template\'s on merge, so the change is usually a one- or\n two-line addition to that thin import file.\n\n # Onboarding beats\n\n Beat 1: Answer the user\'s opening question conversationally \u2014 they asked how\n Auto works and what to do first, so reply like a helpful human answering a\n curious user, not a scripted pitch. In a sentence or two, explain that Auto\n lets them compose agents and triggers into workflows using `.auto/` YAML, and\n that GitHub Sync applies merged resource changes. After your opening reply, get\n up to speed from the reference docs (read only what this step needs) before\n deeper onboarding work. Ask what repetitive workflow or operational pain they\n want to automate first.\n\n Beat 2: Inspect the connected repository and the available Auto connections.\n Read the docs index and examples index. Summarize one recommended first\n workflow based on the repo and the user\'s answer. End this beat by telling\n the user the recommended first workflow and that you will draft it next.\n\n Beat 3: Draft the workflow under `.auto/`. Default to a thin import of the\n matching `@auto` template with its variables, overriding only what the user\'s\n needs require; author bespoke agent YAML only when no template fits. Stay\n GitHub-only unless the user has asked for Slack \u2014 then use the template\'s\n `-slack` entrypoint. Dry-run the resources before opening a PR. End this\n beat by telling the user you drafted the resources, the dry-run plan result\n (create/update/unchanged counts), and that you are about to open the PR.\n\n Beat 4: Open the PR, bind the pull request to your session, and tell\n the user exactly what changed and what to review \u2014 including the PR number,\n its URL, and the next step ("merge PR #N to install your <agent> agent,\n then I\'ll handle the apply lifecycle here"). Do not merge unless the user\n explicitly asks. This closing message is the beat\'s whole point: a silent\n PR-open turn reads to the user as a hang right before the finish line.\n\n Beat 5: After the user merges, handle the apply lifecycle event. Verify the\n resource state, then run or guide a smoke test that proves the workflow works.\n End this beat by telling the user the apply outcome, that the workflow is\n live, and the smoke-test result.\n\n Beat 6: Recap what now exists and how the user can change it with normal PRs.\n When you suggest a change to the first agent, follow the "Suggesting changes\n to a template-built agent" rules above \u2014 lead with offering to do it, explain\n any new terms, and show the concrete file and edit. Offer the next best\n improvement only after the first workflow is live and verified. End the\n onboarding by telling the user it is complete and what they can do next.\n\n When onboarding is complete and no immediate follow-up remains, call\n `mcp__auto__auto_sessions_archive_current`.\n'
25934
+ }
25935
+ ]
25653
25936
  }
25654
25937
  ],
25655
25938
  "@auto/pr-review": [
@@ -30765,7 +31048,7 @@ var init_package = __esm({
30765
31048
  "package.json"() {
30766
31049
  package_default = {
30767
31050
  name: "@autohq/cli",
30768
- version: "0.1.351",
31051
+ version: "0.1.353",
30769
31052
  license: "SEE LICENSE IN README.md",
30770
31053
  publishConfig: {
30771
31054
  access: "public"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autohq/cli",
3
- "version": "0.1.351",
3
+ "version": "0.1.353",
4
4
  "license": "SEE LICENSE IN README.md",
5
5
  "publishConfig": {
6
6
  "access": "public"