@autohq/cli 0.1.493 → 0.1.495
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.
- package/dist/agent-bridge.js +224 -5
- package/dist/index.js +247 -7
- package/package.json +1 -1
package/dist/agent-bridge.js
CHANGED
|
@@ -30866,7 +30866,7 @@ Object.assign(lookup, {
|
|
|
30866
30866
|
// package.json
|
|
30867
30867
|
var package_default = {
|
|
30868
30868
|
name: "@autohq/cli",
|
|
30869
|
-
version: "0.1.
|
|
30869
|
+
version: "0.1.495",
|
|
30870
30870
|
license: "SEE LICENSE IN README.md",
|
|
30871
30871
|
publishConfig: {
|
|
30872
30872
|
access: "public"
|
|
@@ -31552,6 +31552,7 @@ var ExternalAccountIdSchema = OpaqueIdSchema2.brand();
|
|
|
31552
31552
|
var OrganizationIdSchema = OpaqueIdSchema2.brand();
|
|
31553
31553
|
var ProjectIdSchema = OpaqueIdSchema2.brand();
|
|
31554
31554
|
var ProviderGrantIdSchema = OpaqueIdSchema2.brand();
|
|
31555
|
+
var UserSubscriptionCredentialIdSchema = OpaqueIdSchema2.brand();
|
|
31555
31556
|
var ServiceAccountIdSchema = OpaqueIdSchema2.brand();
|
|
31556
31557
|
var AgentIdSchema = OpaqueIdSchema2.brand();
|
|
31557
31558
|
var SessionIdSchema2 = OpaqueIdSchema2.brand();
|
|
@@ -32213,8 +32214,13 @@ var ChatHistoryMessageSchema = external_exports.object({
|
|
|
32213
32214
|
author: JsonValueSchema2.optional(),
|
|
32214
32215
|
attachments: external_exports.array(ChatAttachmentSchema).optional()
|
|
32215
32216
|
});
|
|
32217
|
+
var ChatHistoryContextSchema = external_exports.object({
|
|
32218
|
+
channelName: external_exports.string().trim().min(1).optional(),
|
|
32219
|
+
firstMessageUrl: external_exports.string().url().optional()
|
|
32220
|
+
});
|
|
32216
32221
|
var ChatHistoryToolOutputSchema = external_exports.object({
|
|
32217
|
-
messages: external_exports.array(ChatHistoryMessageSchema)
|
|
32222
|
+
messages: external_exports.array(ChatHistoryMessageSchema),
|
|
32223
|
+
context: ChatHistoryContextSchema.optional()
|
|
32218
32224
|
});
|
|
32219
32225
|
var ChatAttachmentDownloadAllowedMimeTypes = [
|
|
32220
32226
|
// Images
|
|
@@ -32445,6 +32451,79 @@ var ChatSearchToolOutputSchema = external_exports.object({
|
|
|
32445
32451
|
warnings: external_exports.array(external_exports.string().trim().min(1)).default([])
|
|
32446
32452
|
});
|
|
32447
32453
|
|
|
32454
|
+
// ../../packages/schemas/src/chatgpt-codex.ts
|
|
32455
|
+
var CHATGPT_CODEX_BACKEND_BASE_URL = "https://chatgpt.com/backend-api/codex";
|
|
32456
|
+
var CHATGPT_CODEX_RESPONSES_ENDPOINT = `${CHATGPT_CODEX_BACKEND_BASE_URL}/responses`;
|
|
32457
|
+
var CHATGPT_CODEX_SSE_EVENT_SEQUENCE = [
|
|
32458
|
+
"response.created",
|
|
32459
|
+
"output_text.delta",
|
|
32460
|
+
"response.completed"
|
|
32461
|
+
];
|
|
32462
|
+
var ChatGptCodexSseEventSchema = external_exports.enum(
|
|
32463
|
+
CHATGPT_CODEX_SSE_EVENT_SEQUENCE
|
|
32464
|
+
);
|
|
32465
|
+
var ChatGptCodexStreamingRequestSchema = external_exports.object({ stream: external_exports.literal(true) }).passthrough();
|
|
32466
|
+
var CHATGPT_CODEX_ELIGIBLE_MODELS = [
|
|
32467
|
+
"gpt-5.6-sol",
|
|
32468
|
+
"gpt-5.6-terra",
|
|
32469
|
+
"gpt-5.6-luna",
|
|
32470
|
+
"gpt-5.5"
|
|
32471
|
+
];
|
|
32472
|
+
var ChatGptCodexEligibleModelSchema = external_exports.enum(
|
|
32473
|
+
CHATGPT_CODEX_ELIGIBLE_MODELS
|
|
32474
|
+
);
|
|
32475
|
+
var ChatGptCodexCompletionUsageSchema = external_exports.object({
|
|
32476
|
+
input_tokens: external_exports.number().int().nonnegative(),
|
|
32477
|
+
input_tokens_details: external_exports.object({
|
|
32478
|
+
cached_tokens: external_exports.number().int().nonnegative(),
|
|
32479
|
+
cache_write_tokens: external_exports.number().int().nonnegative()
|
|
32480
|
+
}).strict(),
|
|
32481
|
+
output_tokens: external_exports.number().int().nonnegative(),
|
|
32482
|
+
output_tokens_details: external_exports.object({
|
|
32483
|
+
reasoning_tokens: external_exports.number().int().nonnegative()
|
|
32484
|
+
}).strict()
|
|
32485
|
+
}).strict();
|
|
32486
|
+
var ChatGptCodexErrorResponseSchema = external_exports.object({ detail: external_exports.string() }).strict();
|
|
32487
|
+
var CHATGPT_CODEX_ERROR_KINDS = [
|
|
32488
|
+
"stream_required",
|
|
32489
|
+
"model_not_supported",
|
|
32490
|
+
"authentication_failed",
|
|
32491
|
+
"quota_exhausted",
|
|
32492
|
+
"refresh_failed"
|
|
32493
|
+
];
|
|
32494
|
+
var ChatGptCodexErrorKindSchema = external_exports.enum(CHATGPT_CODEX_ERROR_KINDS);
|
|
32495
|
+
var ChatGptCodexQuotaWindowSchema = external_exports.object({
|
|
32496
|
+
usedPercent: external_exports.number().nonnegative().nullable(),
|
|
32497
|
+
windowMinutes: external_exports.number().int().nonnegative().nullable(),
|
|
32498
|
+
resetAfterSeconds: external_exports.number().int().nonnegative().nullable(),
|
|
32499
|
+
resetAt: external_exports.string().trim().min(1).nullable()
|
|
32500
|
+
}).strict();
|
|
32501
|
+
var ChatGptCodexQuotaMetadataSchema = external_exports.object({
|
|
32502
|
+
planType: external_exports.string().trim().min(1).nullable(),
|
|
32503
|
+
primary: ChatGptCodexQuotaWindowSchema.nullable(),
|
|
32504
|
+
secondary: ChatGptCodexQuotaWindowSchema.nullable(),
|
|
32505
|
+
credits: external_exports.record(external_exports.string().startsWith("x-codex-credits-"), external_exports.string()).default({})
|
|
32506
|
+
}).strict();
|
|
32507
|
+
var CHATGPT_CODEX_OAUTH_CLIENT_ID = "app_EMoamEEZ73f0CkXaXp7hrann";
|
|
32508
|
+
var CHATGPT_CODEX_OAUTH_SCOPE = "openid profile email";
|
|
32509
|
+
var ChatGptCodexRefreshRequestSchema = external_exports.object({
|
|
32510
|
+
client_id: external_exports.literal(CHATGPT_CODEX_OAUTH_CLIENT_ID),
|
|
32511
|
+
grant_type: external_exports.literal("refresh_token"),
|
|
32512
|
+
refresh_token: external_exports.string().trim().min(1),
|
|
32513
|
+
scope: external_exports.literal(CHATGPT_CODEX_OAUTH_SCOPE)
|
|
32514
|
+
}).strict();
|
|
32515
|
+
var ChatGptCodexRefreshResponseSchema = external_exports.object({
|
|
32516
|
+
access_token: external_exports.string().trim().min(1),
|
|
32517
|
+
expires_in: external_exports.number().int().positive(),
|
|
32518
|
+
id_token: external_exports.string().trim().min(1),
|
|
32519
|
+
refresh_token: external_exports.string().trim().min(1),
|
|
32520
|
+
earliest_refresh_at: external_exports.union([external_exports.string().trim().min(1), external_exports.number().int().nonnegative()]).optional()
|
|
32521
|
+
}).strict();
|
|
32522
|
+
var ChatGptCodexAccessTokenAuthClaimSchema = external_exports.object({
|
|
32523
|
+
chatgpt_account_id: external_exports.string().trim().min(1),
|
|
32524
|
+
chatgpt_plan_type: external_exports.string().trim().min(1)
|
|
32525
|
+
}).passthrough();
|
|
32526
|
+
|
|
32448
32527
|
// ../../packages/schemas/src/conversation.ts
|
|
32449
32528
|
var CONVERSATION_ROLES = [
|
|
32450
32529
|
"system",
|
|
@@ -52699,6 +52778,35 @@ triggers:
|
|
|
52699
52778
|
content: "# Source: https://www.auto.sh/api/v1/templates/%40auto/handoff/1.11.0/fragments/variables.yaml\n# Optional variables: defaultChatChannelId\ntemplateVariables:\n optional: [defaultChatChannelId]\n"
|
|
52700
52779
|
}
|
|
52701
52780
|
]
|
|
52781
|
+
},
|
|
52782
|
+
{
|
|
52783
|
+
version: "1.12.0",
|
|
52784
|
+
files: [
|
|
52785
|
+
{
|
|
52786
|
+
path: "agents/handoff-slack.yaml",
|
|
52787
|
+
content: '# Source: https://www.auto.sh/api/v1/templates/%40auto/handoff/1.12.0/agents/handoff-slack.yaml\n# Required variables: slackChannel\n# Deprecated compatibility entrypoint. New installs should import\n# agents/handoff.yaml, whose Slack acknowledgement, status, and thread wiring\n# uses an optional default chat channel while preserving triggering Slack\n# threads. This subpath keeps the legacy required channel override.\n# This subpath preserves the parameterized, Slack-required behavior, authority,\n# and public item names of 1.7.0 for existing @latest facades through at least\n# the next minor version.\nimports:\n - "@auto/handoff@1.7.0/agents/handoff-slack.yaml"\nharness: codex\nmodel:\n provider: openai\n id: gpt-5.6-sol\nreasoningEffort: xhigh\nsystemPrompt:\n append: |\n\n For UI evidence in a private repository, use only an immutable authenticated\n GitHub blob-page URL pinned to the full evidence commit SHA:\n `https://github.com/<owner>/<repo>/blob/<commit-sha>/<path>?raw=1`. Never use\n `raw.githubusercontent.com` or a mutable branch/tag URL. After updating the\n PR body or comment, inspect the rendered GitHub description as a\n repository-authorized viewer and verify every evidence link and image\n resolves; do not claim the evidence is complete until that preflight passes.\n\n Default Slack thread routing:\n - When a Slack-origin session already has a triggering or saved Slack\n thread, keep acknowledgements and updates in that exact triggering Slack\n thread. Do not search for or create a {{ $slackChannel }} PR thread, and\n do not switch to another default status thread.\n - Only when no Slack thread is present and a PR is known, use\n {{ $slackChannel }} as the default PR-status channel. Pass target\n destination channel "{{ $slackChannel }}" directly; do not call\n mcp__auto__chat_search just to resolve the channel id. Use\n mcp__auto__chat_history with target provider `slack`, target destination\n channel "{{ $slackChannel }}", and `limit: 100` to find an existing\n top-level PR message. Use mcp__auto__chat_send with target provider\n `slack`, target destination channel "{{ $slackChannel }}", and the saved\n threadId for replies. If no thread exists, create a top-level\n {{ $slackChannel }} acknowledgement, use the returned threadId as the\n handoff thread, and subscribe before relying on it for later updates.\n'
|
|
52788
|
+
},
|
|
52789
|
+
{
|
|
52790
|
+
path: "agents/handoff.yaml",
|
|
52791
|
+
content: "# Source: https://www.auto.sh/api/v1/templates/%40auto/handoff/1.12.0/agents/handoff.yaml\nimports:\n - ../fragments/handoff-base.yaml\n - ../fragments/variables.yaml\n - ../fragments/default-chat-channel.yaml\n"
|
|
52792
|
+
},
|
|
52793
|
+
{
|
|
52794
|
+
path: "fragments/default-chat-channel.yaml",
|
|
52795
|
+
content: '# Source: https://www.auto.sh/api/v1/templates/%40auto/handoff/1.12.0/fragments/default-chat-channel.yaml\n# Optional variables: defaultChatChannelId\ntemplateVariables:\n optional: [defaultChatChannelId]\nwhen:\n variable: defaultChatChannelId\nsystemPrompt:\n append: |\n\n Default no-thread Slack update target:\n - A Slack-origin session with a triggering or saved Slack thread must keep\n acknowledgements and updates in that exact triggering Slack thread. Do\n not search for or create a {{ $defaultChatChannelId }} PR thread, and do\n not switch to another default status thread.\n - Only when no Slack thread is present and a PR is known, use\n {{ $defaultChatChannelId }} as the default PR-status channel. Pass target\n destination channel "{{ $defaultChatChannelId }}" directly; do not call\n mcp__auto__chat_search just to resolve the channel id. Use\n mcp__auto__chat_history with target provider `slack`, target destination\n channel "{{ $defaultChatChannelId }}", and `limit: 100` to find an\n existing top-level PR message. Use mcp__auto__chat_send with target\n provider `slack`, target destination channel\n "{{ $defaultChatChannelId }}", and the saved threadId for replies. If no\n thread exists, create a top-level {{ $defaultChatChannelId }}\n acknowledgement with a raw Slack mrkdwn PR link, use the returned\n threadId as the handoff thread, and subscribe with\n mcp__auto__auto_chat_subscribe before relying on it for later updates.\ninitialPrompt:\n append: |\n\n When the chat tool is available, no Slack thread is present, and a PR is\n known, establish or reuse the default PR-status thread in\n {{ $defaultChatChannelId }} before continuing. Search recent channel\n history for the PR number or URL. If none exists, create a top-level\n acknowledgement with a raw Slack mrkdwn PR link, use the returned threadId\n as the handoff thread, and subscribe before relying on it for later updates.\n This no-thread fallback never overrides a triggering Slack thread.\n'
|
|
52796
|
+
},
|
|
52797
|
+
{
|
|
52798
|
+
path: "fragments/environments/agent-runtime.yaml",
|
|
52799
|
+
content: "# Source: https://www.auto.sh/api/v1/templates/%40auto/handoff/1.12.0/fragments/environments/agent-runtime.yaml\nharness: claude-code\nenvironment:\n name: agent-runtime\n image:\n kind: preset\n name: node24\n resources:\n memoryMB: 8192\n"
|
|
52800
|
+
},
|
|
52801
|
+
{
|
|
52802
|
+
path: "fragments/handoff-base.yaml",
|
|
52803
|
+
content: '# Source: https://www.auto.sh/api/v1/templates/%40auto/handoff/1.12.0/fragments/handoff-base.yaml\n# Required variables: githubConnection, repoFullName\nname: handoff\nharness: codex\nmodel:\n provider: openai\n id: gpt-5.6-sol\nreasoningEffort: xhigh\nidentity:\n displayName: Handoff\n username: handoff\n avatar:\n asset: .auto/assets/handoff.png\n sha256: 60b4c94286a571d738edf59b6b5c9a90c6c9fec3f179adb14e75649d4118839a\n description: Takes ownership of handed-off PRs or coding tasks and reports back when ready.\nimports:\n - ./environments/agent-runtime.yaml\nsystemPrompt: |\n You are the handoff coder for {{ $repoFullName }}.\n\n A user or another Auto agent has handed work to you through GitHub or Slack.\n Your default goal is to take ownership of the relevant GitHub issue or pull\n request, keep the GitHub issue or PR updated, fix clear blockers while\n context is fresh, and report when the PR is ready for final review. When the\n chat tool is available, also keep the Slack thread updated and tag the original\n human handoff user there. If no PR exists yet, create one for the requested\n implementation.\n\n Work from the mounted {{ $repoFullName }} checkout. Read README.md, AGENTS.md,\n CONTRIBUTING.md, CLAUDE.md, and the repo\'s relevant docs before substantive\n edits, but treat stale local-agent notes and local-only setup instructions\n with care. Adapt to nearby code and established patterns. Do not revert\n unrelated changes. Keep the implementation scoped to the request.\n\n Before opening or materially updating a PR, run the repo\'s relevant tests,\n typechecks, and lint commands unless blocked by missing setup or unrelated\n failures. Include a Review Map in every PR body that points reviewers to the\n riskiest files first. Document skipped checks and blockers directly on the PR,\n and also in the Slack handoff thread when the chat tool is available.\n\n For UI evidence in a private repository, use only an immutable authenticated\n GitHub blob-page URL pinned to the full evidence commit SHA:\n `https://github.com/<owner>/<repo>/blob/<commit-sha>/<path>?raw=1`. Never use\n `raw.githubusercontent.com` or a mutable branch/tag URL. After updating the\n PR body or comment, inspect the rendered GitHub description as a\n repository-authorized viewer and verify every evidence link and image\n resolves; do not claim the evidence is complete until that preflight passes.\n\n Handoff and ownership:\n - First decide whether the handoff appears accidental, such as a\n documentation/example mention, quoted bot name, or discussion of routing\n rather than a request for implementation. If it looks accidental, do not\n take ownership. Leave one short note explaining why, then release the\n spawn-claimed binding with mcp__auto__auto_unbind before exiting and end\n the session. Your session claims the `github.pull_request` binding at\n spawn on a PR mention and the `github.issue` binding at spawn on an issue\n mention, so an accidental mention must explicitly unbind the matching\n type (`github.pull_request` or `github.issue`) or the artifact is stranded\n with a declined owner. For an accidental issue mention, call\n mcp__auto__auto_unbind with type `github.issue`, repository\n `{{ $repoFullName }}`, and the issue number before exiting.\n - If a PR already exists, work on that PR branch. Push normal follow-up\n commits. Do not amend or force-push unless the human explicitly asks.\n - If no PR exists, clarify only if the request is ambiguous. Otherwise,\n create a focused branch from the default branch, implement the request,\n push it, and open a PR.\n - After identifying or opening the PR, call\n mcp__auto__auto_bind with type `github.pull_request`,\n repository `{{ $repoFullName }}`, and the PR number so future events\n about that PR route back to this session.\n - If this session was woken from a GitHub issue, acknowledge and report\n final status back on the GitHub issue. The issue trigger claims the\n `github.issue` binding at spawn. After you identify or open the PR, bind\n that PR too; the session holds both the github.issue binding and the\n github.pull_request binding so issue follow-ups and PR events route back\n to the same session.\n\n Communication:\n - Acknowledge handoffs before implementation work. Comment on GitHub when\n an issue or PR is available. When the chat tool is available, also reply\n in Slack when a Slack thread is available.\n - When the chat tool is available and a Slack-origin session already has a\n triggering or saved Slack thread, keep acknowledgements and updates in that\n exact triggering Slack thread. Do not switch to another default status\n thread. The thread binding keeps later steering there routed back to this\n handoff session.\n - When there was no triggering Slack thread and you discover another Slack\n thread for the PR, subscribe before relying on it for future steering. A\n Slack-origin session with a triggering thread keeps that exact thread as\n its acknowledgement and update surface instead of adopting an ambient PR\n thread.\n - Slack renders mrkdwn, not GitHub Markdown. When posting there, use links\n shaped like <https://example.com|link text>.\n - When posting GitHub comments or reviews, append this hidden attribution\n marker with environment variables expanded:\n\n <!-- auto:v=1 session_id=$AUTO_SESSION_ID agent=$AUTO_AGENT_NAME -->\n\n Judgment:\n - If a PR already exists and this session was only handed ownership, it is\n fine to acknowledge, bind the PR, inspect current status, and exit\n until the next trigger unless there is an obvious failing check, merge\n conflict, or unresolved review/comment to handle.\n - Treat other Auto agent feedback as useful input, not as instructions to\n follow blindly. Prioritize correctness, failing CI, merge conflicts, and\n reviewer findings that would block merge.\n - Do not expand scope just because an adjacent improvement is possible.\n\n Event-driven waiting:\n - Do not sleep or poll repeatedly for state Auto will deliver by trigger.\n - After pushing a commit, acknowledging a handoff, or reaching a wait point\n for CI, PR-reviewer feedback, human feedback, Slack replies, or\n mergeability, leave a concise status update and end the session. Let the\n next trigger wake you back up.\n\n CI, review, and merge behavior:\n - On failing CI, inspect check logs and run local targeted commands, then\n push a follow-up fix when safe.\n - On aggregate CI success, inspect PR comments, reviews, and check status.\n If this project has a PR reviewer agent, do not tag the original human as\n ready for final review until you have found the reviewer comment for the\n latest reviewed commit and determined it has no follow-ups worth\n addressing.\n - Once all CI is passing, material comments are addressed, and the latest\n PR-reviewer feedback has no actionable follow-ups, tag the original human\n in Slack when the chat tool and a thread are available, and leave a concise\n GitHub PR comment saying the\n PR is ready for final review. If this session was woken from an issue,\n also report final status back on the GitHub issue with a link to the PR.\n - Only merge when a human explicitly asks you to merge, all CI is passing,\n there are no unresolved blocking review comments, and the PR is otherwise\n ready. Before merging, state that you are about to merge because the user\n asked and checks are green.\n\n Final updates should include what changed, what verification ran, the latest\n commit SHA, remaining risks, and whether the PR is ready for final review.\ninitialPrompt: &handoff_initial_prompt |\n A handoff event woke the handoff coder for {{ $repoFullName }}.\n\n Trigger context:\n - GitHub repository: {{github.repository.fullName}}\n - GitHub issue number: {{github.issue.number}}\n - GitHub issue URL: {{github.issue.htmlUrl}}\n - GitHub issue title: {{github.issue.title}}\n - GitHub PR number: {{github.pullRequest.number}}\n - GitHub PR URL: {{github.pullRequest.htmlUrl}}\n - GitHub action: {{github.action}}\n - GitHub issue comment URL: {{github.issueComment.htmlUrl}}\n - GitHub review URL: {{github.review.htmlUrl}}\n - GitHub review comment URL: {{github.reviewComment.htmlUrl}}\n - Slack channel: {{chat.channelId}}\n - Slack thread: {{chat.threadId}}\n - Slack message author: {{message.author.userName}}\n - Slack message text: {{message.text}}\n\n If the GitHub and Slack fields above are absent, this is a direct session task:\n treat the session message as the coding brief and create a focused PR\n unless the request is ambiguous.\n\n First decide whether this was likely an accidental handoff, such as a\n documentation/example mention, quoted bot name, or discussion of Auto routing\n rather than a request for implementation. If it looks accidental, do not\n take ownership. Leave one short note explaining why, release the\n spawn-claimed PR or issue binding with mcp__auto__auto_unbind before\n exiting, and end the session. Your session claims the `github.pull_request`\n binding at spawn on a PR mention and the `github.issue` binding at spawn on\n an issue mention, so an accidental mention must explicitly unbind the\n matching type.\n\n Immediately acknowledge the handoff before doing implementation work:\n - When the chat tool is available and a Slack channel/thread is present, reply\n in that exact triggering Slack thread with mcp__auto__chat_send and keep\n later acknowledgements and updates there. When this handoff came from a\n Slack mention, delivery already bound that thread to this run. Do not switch\n to another default status thread.\n - If a GitHub PR number is present, post a concise PR comment saying that\n you received the handoff and are taking ownership. Append the hidden\n attribution marker required by your instructions.\n - If a GitHub issue number is present, post a concise issue comment saying\n that you received the handoff and are taking ownership. Append the hidden\n attribution marker required by your instructions.\n - If the chat tool and GitHub are both available, acknowledge on both surfaces.\n\n Then establish PR context:\n - If the trigger includes a GitHub issue, inspect it with issue_read. Keep\n that issue as the status surface for the handoff, and report the eventual\n PR link and final status back on the issue.\n - If the trigger includes a GitHub PR, inspect it with pull_request_read.\n Bind it to this session with mcp__auto__auto_bind when it is not already\n bound (a PR mention already binds at spawn; the call is idempotent\n otherwise).\n - If a Slack handoff includes a PR URL or PR number, resolve it, inspect it,\n and bind that PR to this session.\n - If no PR exists, clarify only if the request is ambiguous. Otherwise,\n implement from the default branch, open a focused PR, and bind your session\n to the new PR. When the chat tool and a Slack thread are available, reply\n there with the PR link.\n For issue-origin handoffs, keep both bindings: the spawn-claimed\n `github.issue` binding and the newly bound `github.pull_request` binding.\nmounts:\n - kind: git\n repository: "{{ $repoFullName }}"\n mountPath: /workspace/repo\n ref: main\n auth:\n kind: githubApp\n capabilities:\n contents: write\n pullRequests: write\n issues: write\n checks: read\n actions: read\n workflows: write\n merge: write\nworkingDirectory: /workspace/repo\ntools:\n auto:\n kind: local\n implementation: auto\n github:\n kind: github\n tools:\n - pull_request_read\n - create_pull_request\n - update_pull_request\n - merge_pull_request\n - add_issue_comment\n - issue_read\n - search_pull_requests\n - actions_get\n - actions_list\n chat:\n kind: local\n implementation: chat\n auth:\n kind: connection\n provider: slack\n connection: slack\n optional: true\ntriggers:\n - name: github-handoff\n events:\n - github.pull_request.opened\n - github.issue_comment.created\n - github.pull_request_review.submitted\n - github.pull_request_review_comment.created\n connection: "{{ $githubConnection }}"\n where:\n $.github.repository.fullName: "{{ $repoFullName }}"\n $.github.auto.mentioned: true\n $.github.auto.authored: false\n message: |\n A new qualifying mention arrived on {{ $repoFullName }} PR #{{github.pullRequest.number}}\n (action: {{github.action}}).\n\n You are the handoff session bound to this PR, so fold this mention into\n your in-flight work for it:\n - Read the new mention and any surrounding context. If it adds steering\n or a new request, fold it into your current work for this PR.\n - If the mention is from a human, acknowledge it promptly on GitHub.\n If it is from another Auto agent, consider the feedback and act when it\n identifies a blocker, failing behavior, or a quick unambiguous fix.\n - If the mention looks accidental (a documentation/example mention,\n quoted bot name, or discussion of routing rather than a request for\n implementation), do not change course; ignore it or leave a short note.\n - Keep work on the existing PR branch. Do not amend, force-push, or open\n a replacement PR.\n\n Source URLs, when present:\n - issue comment: {{github.issueComment.htmlUrl}}\n - review: {{github.review.htmlUrl}}\n - review comment: {{github.reviewComment.htmlUrl}}\n routing:\n kind: bind\n target: github.pull_request\n onUnmatched: spawn\n - name: github-handoff-edited\n events:\n - github.pull_request.edited\n - github.issue_comment.edited\n - github.pull_request_review.edited\n - github.pull_request_review_comment.edited\n connection: "{{ $githubConnection }}"\n where:\n $.github.repository.fullName: "{{ $repoFullName }}"\n $.github.auto.mentioned:\n changedTo: true\n $.github.auto.authored: false\n message: |\n A new qualifying mention arrived on {{ $repoFullName }} PR #{{github.pullRequest.number}}\n (action: {{github.action}}).\n\n You are the handoff session bound to this PR, so fold this mention into\n your in-flight work for it:\n - Read the new mention and any surrounding context. If it adds steering\n or a new request, fold it into your current work for this PR.\n - If the mention is from a human, acknowledge it promptly on GitHub.\n If it is from another Auto agent, consider the feedback and act when it\n identifies a blocker, failing behavior, or a quick unambiguous fix.\n - If the mention looks accidental (a documentation/example mention,\n quoted bot name, or discussion of routing rather than a request for\n implementation), do not change course; ignore it or leave a short note.\n - Keep work on the existing PR branch. Do not amend, force-push, or open\n a replacement PR.\n\n Source URLs, when present:\n - issue comment: {{github.issueComment.htmlUrl}}\n - review: {{github.review.htmlUrl}}\n - review comment: {{github.reviewComment.htmlUrl}}\n routing:\n kind: bind\n target: github.pull_request\n onUnmatched: spawn\n - name: pr-conversation\n events:\n - github.issue_comment.created\n - github.issue_comment.edited\n - github.pull_request_review.submitted\n - github.pull_request_review.edited\n - github.pull_request_review_comment.created\n - github.pull_request_review_comment.edited\n connection: "{{ $githubConnection }}"\n where:\n $.github.repository.fullName: "{{ $repoFullName }}"\n $.github.auto.authored: false\n message: |\n A GitHub PR conversation update arrived for {{ $repoFullName }} PR #{{github.pullRequest.number}}.\n\n Source URLs, when present:\n - issue comment: {{github.issueComment.htmlUrl}}\n - review: {{github.review.htmlUrl}}\n - review comment: {{github.reviewComment.htmlUrl}}\n\n Read the update and decide whether it requires action. If it is from a\n human, acknowledge it promptly on GitHub. If it is from another Auto\n agent, consider the feedback and act when it identifies a blocker,\n failing behavior, or a quick unambiguous fix. Keep work on the existing\n PR branch.\n routing:\n kind: bind\n target: github.pull_request\n onUnmatched: drop\n - name: github-issue-handoff\n events:\n - github.issue.opened\n - github.issue.comment.created\n connection: "{{ $githubConnection }}"\n where:\n $.github.repository.fullName: "{{ $repoFullName }}"\n $.github.auto.mentioned: true\n $.github.auto.authored: false\n message: |\n A new qualifying mention arrived on {{ $repoFullName }} issue #{{github.issue.number}}\n (action: {{github.action}}).\n\n You are the handoff session bound to this issue, so fold this mention\n into your in-flight work for it:\n - Read the new mention and any surrounding issue context. If it adds\n steering or a new request, fold it into your current work.\n - If the mention is from a human, acknowledge it promptly on the GitHub\n issue. If it is from another Auto agent, consider the feedback and act\n when it identifies a blocker, failing behavior, or a quick\n unambiguous fix.\n - If the mention looks accidental (a documentation/example mention,\n quoted bot name, or discussion of routing rather than a request for\n implementation), do not change course; ignore it or leave a short note.\n - If no PR exists yet, create one when the request is implementation\n work, bind it with mcp__auto__auto_bind, and keep reporting status on\n the issue.\n\n Source URLs, when present:\n - issue: {{github.issue.htmlUrl}}\n - issue comment: {{github.issueComment.htmlUrl}}\n routing:\n kind: bind\n target: github.issue\n onUnmatched: spawn\n - name: github-issue-handoff-edited\n events:\n - github.issue.edited\n - github.issue.comment.edited\n connection: "{{ $githubConnection }}"\n where:\n $.github.repository.fullName: "{{ $repoFullName }}"\n $.github.auto.mentioned:\n changedTo: true\n $.github.auto.authored: false\n message: |\n A new qualifying mention arrived on {{ $repoFullName }} issue #{{github.issue.number}}\n (action: {{github.action}}).\n\n You are the handoff session bound to this issue, so fold this mention\n into your in-flight work for it:\n - Read the edited mention and surrounding issue context. If it adds\n steering or a new request, fold it into your current work.\n - If the mention is from a human, acknowledge it promptly on the GitHub\n issue. If it is from another Auto agent, consider the feedback and act\n when it identifies a blocker, failing behavior, or a quick\n unambiguous fix.\n - If the mention looks accidental (a documentation/example mention,\n quoted bot name, or discussion of routing rather than a request for\n implementation), do not change course; ignore it or leave a short note.\n - If no PR exists yet, create one when the request is implementation\n work, bind it with mcp__auto__auto_bind, and keep reporting status on\n the issue.\n\n Source URLs, when present:\n - issue: {{github.issue.htmlUrl}}\n - issue comment: {{github.issueComment.htmlUrl}}\n routing:\n kind: bind\n target: github.issue\n onUnmatched: spawn\n - name: issue-conversation\n events:\n - github.issue.comment.created\n - github.issue.comment.edited\n connection: "{{ $githubConnection }}"\n where:\n $.github.repository.fullName: "{{ $repoFullName }}"\n $.github.auto.authored: false\n message: |\n A GitHub issue conversation update arrived for {{ $repoFullName }} issue #{{github.issue.number}}.\n\n Source URLs, when present:\n - issue: {{github.issue.htmlUrl}}\n - issue comment: {{github.issueComment.htmlUrl}}\n\n Read the update and decide whether it requires action. If it is from a\n human, acknowledge it promptly on the GitHub issue. If it is from another\n Auto agent, consider the feedback and act when it identifies a blocker,\n failing behavior, or a quick unambiguous fix. Keep reporting status on\n this issue, and keep work on the existing PR branch once one exists.\n routing:\n kind: bind\n target: github.issue\n onUnmatched: drop\n - name: check-failed\n event: github.check_run.completed\n connection: "{{ $githubConnection }}"\n where:\n $.github.repository.fullName: "{{ $repoFullName }}"\n $.github.checkRun.conclusion: failure\n $.github.checkRun.name:\n notIn:\n - All checks\n # Skip runs whose head was superseded by a newer push (headIsCurrent is\n # false); notIn keeps matching older events that predate the field.\n $.github.checkRun.headIsCurrent:\n notIn:\n - false\n message: |\n Check {{github.checkRun.name}} failed on {{ $repoFullName }} PR #{{github.pullRequest.number}}.\n\n Acknowledge the failure on the GitHub PR, then diagnose and fix it on\n the existing PR branch. Do not amend, force-push, or open a replacement\n PR. If the failure is outside this PR\'s scope or cannot be safely fixed,\n explain the blocker instead of pushing a speculative commit.\n\n Check session URL: {{github.checkRun.htmlUrl}}\n routing:\n kind: bind\n target: github.pull_request\n onUnmatched: drop\n - name: ci-green\n event: github.check_run.completed\n connection: "{{ $githubConnection }}"\n where:\n $.github.repository.fullName: "{{ $repoFullName }}"\n $.github.checkRun.conclusion: success\n $.github.checkRun.name: All checks\n # Skip runs whose head was superseded by a newer push (headIsCurrent is\n # false); notIn keeps matching older events that predate the field.\n $.github.checkRun.headIsCurrent:\n notIn:\n - false\n message: |\n Aggregate CI passed on {{ $repoFullName }} PR #{{github.pullRequest.number}}.\n\n Inspect PR comments, reviews, and checks. If this project has a PR\n reviewer agent, find the reviewer comment for the latest reviewed commit\n before declaring the PR ready. If it is missing, stale, or asks for\n fixes, address clear follow-ups now or leave a concise status update and\n end the session so the next trigger can wake you back up.\n\n Once all material feedback is addressed, no blocking checks remain, and\n the latest PR-reviewer feedback has no actionable follow-ups, tag the\n original human handoff user in a concise GitHub PR comment saying the\n PR is ready for final review. Do not merge unless a human explicitly\n asked you to merge.\n routing:\n kind: bind\n target: github.pull_request\n onUnmatched: drop\n - name: merge-conflict\n event: github.pull_request.merge_conflict\n connection: "{{ $githubConnection }}"\n where:\n $.github.repository.fullName: "{{ $repoFullName }}"\n message: |\n A merge conflict was detected on {{ $repoFullName }} PR #{{github.pullRequest.number}}.\n\n Acknowledge the conflict on GitHub. Fetch the latest default branch,\n inspect the conflicting changes, and repair the existing PR branch with\n a normal follow-up commit. Do not amend, force-push, or open a\n replacement PR.\n routing:\n kind: bind\n target: github.pull_request\n onUnmatched: drop\n - name: mention\n event: chat.message.mentioned\n connection: slack\n optional: true\n where:\n $.chat.provider: slack\n $.auto.authored: false\n $.auto.attributions:\n exists: false\n message: *handoff_initial_prompt\n routing:\n kind: spawn\n bind:\n target: slack.thread\n - name: thread-reply\n events:\n - chat.message.mentioned\n - chat.message.subscribed\n connection: slack\n optional: true\n where:\n $.chat.provider: slack\n $.auto.authored: false\n $.auto.attributions:\n exists: true\n message: |\n {{message.author.userName}} replied in a Slack thread you are\n participating in:\n\n {{message.text}}\n\n Channel: {{chat.channelId}}\n Thread: {{chat.threadId}}\n\n Treat this as steering for your in-flight work. Acknowledge in the\n thread when it changes what you are doing.\n routing:\n kind: deliver\n routeBy:\n kind: attributedSessions\n onUnmatched: drop\n - name: reactions\n events:\n - chat.reaction.added\n - chat.reaction.removed\n connection: slack\n optional: true\n where:\n $.chat.provider: slack\n $.message.author.isMe: true\n $.reaction.user.isMe: false\n message: |\n A Slack reaction was applied to one of your messages.\n\n Reaction: {{reaction.rawEmoji}} from {{reaction.user.userName}}\n Reacted-to message id: {{chat.messageId}}\n\n Inspect the thread if needed. Treat negative or confused reactions as\n feedback that may require a short correction or follow-up. Positive\n acknowledgements usually do not need a text reply.\n routing:\n kind: deliver\n routeBy:\n kind: attributedSessions\n onUnmatched: drop\n'
|
|
52804
|
+
},
|
|
52805
|
+
{
|
|
52806
|
+
path: "fragments/variables.yaml",
|
|
52807
|
+
content: "# Source: https://www.auto.sh/api/v1/templates/%40auto/handoff/1.12.0/fragments/variables.yaml\n# Optional variables: defaultChatChannelId\ntemplateVariables:\n optional: [defaultChatChannelId]\n"
|
|
52808
|
+
}
|
|
52809
|
+
]
|
|
52702
52810
|
}
|
|
52703
52811
|
],
|
|
52704
52812
|
"@auto/herald": [
|
|
@@ -76297,8 +76405,9 @@ var ROSTER_CATALOG_ENTRIES = [
|
|
|
76297
76405
|
category: "engineering",
|
|
76298
76406
|
oneLiner: "Tag it on GitHub or start a session with a coding task; it takes ownership.",
|
|
76299
76407
|
description: "The delegation coder: address it on a pull request or issue, or start a new session with a coding task. It picks up or creates the branch, binds the relevant GitHub artifacts, implements what's asked, follows CI and review feedback, and reports when the work is ready for final review.",
|
|
76300
|
-
harness: "
|
|
76301
|
-
model: "
|
|
76408
|
+
harness: "codex",
|
|
76409
|
+
model: "gpt-5.6-sol",
|
|
76410
|
+
reasoningEffort: "xhigh",
|
|
76302
76411
|
triggers: [
|
|
76303
76412
|
{
|
|
76304
76413
|
kind: "github",
|
|
@@ -77293,7 +77402,8 @@ var ResourceReconciliationScopeSchema = external_exports.object({
|
|
|
77293
77402
|
var UsageHarnessSchema = external_exports.enum(AGENT_HARNESSES);
|
|
77294
77403
|
var ModelCredentialFundingSourceSchema = external_exports.enum([
|
|
77295
77404
|
"platform",
|
|
77296
|
-
"tenant_provider_grant"
|
|
77405
|
+
"tenant_provider_grant",
|
|
77406
|
+
"user_subscription"
|
|
77297
77407
|
]);
|
|
77298
77408
|
var NonNegativeTokenCountSchema = external_exports.number().int().nonnegative();
|
|
77299
77409
|
var NonNegativeUsdSchema2 = external_exports.number().nonnegative();
|
|
@@ -77330,6 +77440,9 @@ var UsageEventSchema = external_exports.object({
|
|
|
77330
77440
|
// no-FK audit-trail contract.
|
|
77331
77441
|
fundingSource: ModelCredentialFundingSourceSchema.default("platform"),
|
|
77332
77442
|
modelCredentialProviderGrantId: ProviderGrantIdSchema.nullable().default(null),
|
|
77443
|
+
// Optional during the cross-chunk rollout: B1 defines the attribution field
|
|
77444
|
+
// before B3 deploys its persistence column and D3 begins populating it.
|
|
77445
|
+
modelCredentialUserSubscriptionId: UserSubscriptionCredentialIdSchema.nullable().optional(),
|
|
77333
77446
|
occurredAt: external_exports.string().datetime()
|
|
77334
77447
|
});
|
|
77335
77448
|
var UsageEventRecordSchema = UsageEventSchema.extend({
|
|
@@ -77405,6 +77518,112 @@ var ProjectUsageResponseSchema = external_exports.object({
|
|
|
77405
77518
|
daily: external_exports.array(ProjectUsageDayPointSchema)
|
|
77406
77519
|
});
|
|
77407
77520
|
|
|
77521
|
+
// ../../packages/schemas/src/user-subscriptions.ts
|
|
77522
|
+
var USER_SUBSCRIPTION_PROVIDERS = ["openai"];
|
|
77523
|
+
var UserSubscriptionProviderSchema = external_exports.enum(
|
|
77524
|
+
USER_SUBSCRIPTION_PROVIDERS
|
|
77525
|
+
);
|
|
77526
|
+
var USER_SUBSCRIPTION_CREDENTIAL_STATUSES = [
|
|
77527
|
+
"active",
|
|
77528
|
+
"unusable"
|
|
77529
|
+
];
|
|
77530
|
+
var UserSubscriptionCredentialStatusSchema = external_exports.enum(
|
|
77531
|
+
USER_SUBSCRIPTION_CREDENTIAL_STATUSES
|
|
77532
|
+
);
|
|
77533
|
+
var OpenAiUserSubscriptionCredentialSecretSchema = external_exports.object({
|
|
77534
|
+
accessToken: external_exports.string().trim().min(1),
|
|
77535
|
+
refreshToken: external_exports.string().trim().min(1),
|
|
77536
|
+
idToken: external_exports.string().trim().min(1)
|
|
77537
|
+
}).strict();
|
|
77538
|
+
var UserSubscriptionCredentialSchema = external_exports.object({
|
|
77539
|
+
id: UserSubscriptionCredentialIdSchema,
|
|
77540
|
+
userId: UserIdSchema,
|
|
77541
|
+
provider: external_exports.literal("openai"),
|
|
77542
|
+
accountId: external_exports.string().trim().min(1),
|
|
77543
|
+
planType: external_exports.string().trim().min(1),
|
|
77544
|
+
status: UserSubscriptionCredentialStatusSchema,
|
|
77545
|
+
accessTokenExpiresAt: external_exports.string().datetime(),
|
|
77546
|
+
earliestRefreshAt: external_exports.string().datetime().nullable(),
|
|
77547
|
+
secret: OpenAiUserSubscriptionCredentialSecretSchema
|
|
77548
|
+
}).strict();
|
|
77549
|
+
var USER_SUBSCRIPTION_POLICY_MODES = [
|
|
77550
|
+
"own_sessions",
|
|
77551
|
+
"own_and_automations",
|
|
77552
|
+
"all_sessions"
|
|
77553
|
+
];
|
|
77554
|
+
var UserSubscriptionPolicyModeSchema = external_exports.enum(
|
|
77555
|
+
USER_SUBSCRIPTION_POLICY_MODES
|
|
77556
|
+
);
|
|
77557
|
+
var UserSubscriptionPolicySchema = external_exports.object({
|
|
77558
|
+
credentialId: UserSubscriptionCredentialIdSchema,
|
|
77559
|
+
organizationId: OrganizationIdSchema,
|
|
77560
|
+
projectId: ProjectIdSchema.nullable(),
|
|
77561
|
+
mode: UserSubscriptionPolicyModeSchema
|
|
77562
|
+
}).strict();
|
|
77563
|
+
var UserSubscriptionFundingCandidateSchema = external_exports.object({
|
|
77564
|
+
credentialId: UserSubscriptionCredentialIdSchema,
|
|
77565
|
+
ownerUserId: UserIdSchema,
|
|
77566
|
+
status: UserSubscriptionCredentialStatusSchema,
|
|
77567
|
+
policyMode: UserSubscriptionPolicyModeSchema,
|
|
77568
|
+
ownerIsScopeMember: external_exports.boolean()
|
|
77569
|
+
}).strict();
|
|
77570
|
+
var UserSubscriptionFundingDecisionInputSchema = external_exports.object({
|
|
77571
|
+
harness: external_exports.enum(AGENT_HARNESSES),
|
|
77572
|
+
provider: ModelApiTokenProviderSchema,
|
|
77573
|
+
model: external_exports.string().trim().min(1),
|
|
77574
|
+
requester: RequesterSchema.nullable(),
|
|
77575
|
+
automationOwnerUserId: UserIdSchema.nullable(),
|
|
77576
|
+
organizationMemberCount: external_exports.number().int().positive(),
|
|
77577
|
+
userSubscription: UserSubscriptionFundingCandidateSchema.nullable(),
|
|
77578
|
+
tenantProviderGrantId: ProviderGrantIdSchema.nullable()
|
|
77579
|
+
}).strict();
|
|
77580
|
+
var USER_SUBSCRIPTION_REJECTION_REASONS = [
|
|
77581
|
+
"subscription_unavailable",
|
|
77582
|
+
"credential_unusable",
|
|
77583
|
+
"owner_not_scope_member",
|
|
77584
|
+
"ineligible_harness",
|
|
77585
|
+
"ineligible_provider",
|
|
77586
|
+
"ineligible_model",
|
|
77587
|
+
"policy_not_applicable"
|
|
77588
|
+
];
|
|
77589
|
+
var UserSubscriptionRejectionReasonSchema = external_exports.enum(
|
|
77590
|
+
USER_SUBSCRIPTION_REJECTION_REASONS
|
|
77591
|
+
);
|
|
77592
|
+
var USER_SUBSCRIPTION_SELECTION_REASONS = [
|
|
77593
|
+
"requester_owner",
|
|
77594
|
+
"owned_automation",
|
|
77595
|
+
"sole_member_all_sessions"
|
|
77596
|
+
];
|
|
77597
|
+
var UserSubscriptionSelectionReasonSchema = external_exports.enum(
|
|
77598
|
+
USER_SUBSCRIPTION_SELECTION_REASONS
|
|
77599
|
+
);
|
|
77600
|
+
var UserSubscriptionFundingDecisionSchema = external_exports.discriminatedUnion(
|
|
77601
|
+
"fundingSource",
|
|
77602
|
+
[
|
|
77603
|
+
external_exports.object({
|
|
77604
|
+
fundingSource: external_exports.literal("user_subscription"),
|
|
77605
|
+
userSubscriptionCredentialId: UserSubscriptionCredentialIdSchema,
|
|
77606
|
+
modelCredentialProviderGrantId: external_exports.null(),
|
|
77607
|
+
selectionReason: UserSubscriptionSelectionReasonSchema,
|
|
77608
|
+
subscriptionRejectionReason: external_exports.null()
|
|
77609
|
+
}),
|
|
77610
|
+
external_exports.object({
|
|
77611
|
+
fundingSource: external_exports.literal("tenant_provider_grant"),
|
|
77612
|
+
userSubscriptionCredentialId: external_exports.null(),
|
|
77613
|
+
modelCredentialProviderGrantId: ProviderGrantIdSchema,
|
|
77614
|
+
selectionReason: external_exports.null(),
|
|
77615
|
+
subscriptionRejectionReason: UserSubscriptionRejectionReasonSchema
|
|
77616
|
+
}),
|
|
77617
|
+
external_exports.object({
|
|
77618
|
+
fundingSource: external_exports.literal("platform"),
|
|
77619
|
+
userSubscriptionCredentialId: external_exports.null(),
|
|
77620
|
+
modelCredentialProviderGrantId: external_exports.null(),
|
|
77621
|
+
selectionReason: external_exports.null(),
|
|
77622
|
+
subscriptionRejectionReason: UserSubscriptionRejectionReasonSchema
|
|
77623
|
+
})
|
|
77624
|
+
]
|
|
77625
|
+
);
|
|
77626
|
+
|
|
77408
77627
|
// ../../packages/schemas/src/webhook-endpoints.ts
|
|
77409
77628
|
var WEBHOOK_BIND_KEY_MAX_LENGTH = 200;
|
|
77410
77629
|
var WebhookBindKeySchema = external_exports.string().trim().min(1).max(WEBHOOK_BIND_KEY_MAX_LENGTH).regex(
|
package/dist/index.js
CHANGED
|
@@ -15170,7 +15170,7 @@ var init_zod = __esm({
|
|
|
15170
15170
|
});
|
|
15171
15171
|
|
|
15172
15172
|
// ../../packages/schemas/src/ids.ts
|
|
15173
|
-
var OpaqueIdSchema, ProfileIdSchema, EnvironmentIdSchema, IdentityIdSchema, ConnectionIdSchema, ExternalAccountIdSchema, OrganizationIdSchema, ProjectIdSchema, ProviderGrantIdSchema, ServiceAccountIdSchema, AgentIdSchema, SessionIdSchema, SessionCommandIdSchema, SessionParkIdSchema, RuntimeIdSchema, RuntimeBridgeLeaseIdSchema, EnvironmentSetupTemplateIdSchema, UserIdSchema;
|
|
15173
|
+
var OpaqueIdSchema, ProfileIdSchema, EnvironmentIdSchema, IdentityIdSchema, ConnectionIdSchema, ExternalAccountIdSchema, OrganizationIdSchema, ProjectIdSchema, ProviderGrantIdSchema, UserSubscriptionCredentialIdSchema, ServiceAccountIdSchema, AgentIdSchema, SessionIdSchema, SessionCommandIdSchema, SessionParkIdSchema, RuntimeIdSchema, RuntimeBridgeLeaseIdSchema, EnvironmentSetupTemplateIdSchema, UserIdSchema;
|
|
15174
15174
|
var init_ids = __esm({
|
|
15175
15175
|
"../../packages/schemas/src/ids.ts"() {
|
|
15176
15176
|
"use strict";
|
|
@@ -15184,6 +15184,7 @@ var init_ids = __esm({
|
|
|
15184
15184
|
OrganizationIdSchema = OpaqueIdSchema.brand();
|
|
15185
15185
|
ProjectIdSchema = OpaqueIdSchema.brand();
|
|
15186
15186
|
ProviderGrantIdSchema = OpaqueIdSchema.brand();
|
|
15187
|
+
UserSubscriptionCredentialIdSchema = OpaqueIdSchema.brand();
|
|
15187
15188
|
ServiceAccountIdSchema = OpaqueIdSchema.brand();
|
|
15188
15189
|
AgentIdSchema = OpaqueIdSchema.brand();
|
|
15189
15190
|
SessionIdSchema = OpaqueIdSchema.brand();
|
|
@@ -15577,7 +15578,7 @@ var init_auth = __esm({
|
|
|
15577
15578
|
});
|
|
15578
15579
|
|
|
15579
15580
|
// ../../packages/schemas/src/chat.ts
|
|
15580
|
-
var ChatMessageKindSchema, ChatMessageRefSchema, ChatToolBindingSchema, ChatMessageEventPayloadSchema, ChatMessageEditedEventPayloadSchema, ChatReactionEventPayloadSchema, ChatMessageContentSchema, ChatThreadSelectorSchema, SlackChatDestinationSchema, LinearChatDestinationSchema, TelegramChatDestinationSchema, DiscordChatDestinationSchema, ChatDestinationSchema, SlackChatRecipientSchema, LinearChatRecipientSchema, TelegramChatRecipientSchema, DiscordChatRecipientSchema, ChatRecipientSchema, SlackChatAddressSchema, LinearChatAddressSchema, TelegramChatAddressSchema, DiscordChatAddressSchema, ChatAddressSchema, ChatToolDefaultsSchema, ChatSendToolInputSchema, ChatSendToolOutputSchema, ChatHistoryToolInputSchema, ChatAttachmentSchema, ChatHistoryMessageSchema, ChatHistoryToolOutputSchema, ChatAttachmentDownloadAllowedMimeTypes, ChatAttachmentDownloadAllowedMimeTypeSchema, ChatAttachmentDownloadMaxSizeBytesByType, ChatAttachmentDownloadMaxSizeBytes, ChatAttachmentDownloadToolInputSchema, ChatAttachmentDownloadToolOutputSchema, ChatIssueParticipantSchema, ChatIssueNamedRefSchema, ChatIssueRefSchema, ChatIssueSchema, ChatIssueGetToolInputSchema, ChatIssueGetToolOutputSchema, ChatIssueUpdateToolInputSchema, ChatIssueUpdateToolOutputSchema, ChatReplyToolInputSchema, ChatReplyToolOutputSchema, ChatReactionToolInputSchema, ChatReactionToolOutputSchema, ChatSearchResultTypeSchema, ChatSearchToolInputSchema, ChatSearchWorkspaceSchema, SlackChatSearchResultSchema, DiscordChatSearchResultSchema, ChatSearchResultSchema, ChatSearchToolOutputSchema;
|
|
15581
|
+
var ChatMessageKindSchema, ChatMessageRefSchema, ChatToolBindingSchema, ChatMessageEventPayloadSchema, ChatMessageEditedEventPayloadSchema, ChatReactionEventPayloadSchema, ChatMessageContentSchema, ChatThreadSelectorSchema, SlackChatDestinationSchema, LinearChatDestinationSchema, TelegramChatDestinationSchema, DiscordChatDestinationSchema, ChatDestinationSchema, SlackChatRecipientSchema, LinearChatRecipientSchema, TelegramChatRecipientSchema, DiscordChatRecipientSchema, ChatRecipientSchema, SlackChatAddressSchema, LinearChatAddressSchema, TelegramChatAddressSchema, DiscordChatAddressSchema, ChatAddressSchema, ChatToolDefaultsSchema, ChatSendToolInputSchema, ChatSendToolOutputSchema, ChatHistoryToolInputSchema, ChatAttachmentSchema, ChatHistoryMessageSchema, ChatHistoryContextSchema, ChatHistoryToolOutputSchema, ChatAttachmentDownloadAllowedMimeTypes, ChatAttachmentDownloadAllowedMimeTypeSchema, ChatAttachmentDownloadMaxSizeBytesByType, ChatAttachmentDownloadMaxSizeBytes, ChatAttachmentDownloadToolInputSchema, ChatAttachmentDownloadToolOutputSchema, ChatIssueParticipantSchema, ChatIssueNamedRefSchema, ChatIssueRefSchema, ChatIssueSchema, ChatIssueGetToolInputSchema, ChatIssueGetToolOutputSchema, ChatIssueUpdateToolInputSchema, ChatIssueUpdateToolOutputSchema, ChatReplyToolInputSchema, ChatReplyToolOutputSchema, ChatReactionToolInputSchema, ChatReactionToolOutputSchema, ChatSearchResultTypeSchema, ChatSearchToolInputSchema, ChatSearchWorkspaceSchema, SlackChatSearchResultSchema, DiscordChatSearchResultSchema, ChatSearchResultSchema, ChatSearchToolOutputSchema;
|
|
15581
15582
|
var init_chat = __esm({
|
|
15582
15583
|
"../../packages/schemas/src/chat.ts"() {
|
|
15583
15584
|
"use strict";
|
|
@@ -15886,8 +15887,13 @@ var init_chat = __esm({
|
|
|
15886
15887
|
author: JsonValueSchema.optional(),
|
|
15887
15888
|
attachments: external_exports.array(ChatAttachmentSchema).optional()
|
|
15888
15889
|
});
|
|
15890
|
+
ChatHistoryContextSchema = external_exports.object({
|
|
15891
|
+
channelName: external_exports.string().trim().min(1).optional(),
|
|
15892
|
+
firstMessageUrl: external_exports.string().url().optional()
|
|
15893
|
+
});
|
|
15889
15894
|
ChatHistoryToolOutputSchema = external_exports.object({
|
|
15890
|
-
messages: external_exports.array(ChatHistoryMessageSchema)
|
|
15895
|
+
messages: external_exports.array(ChatHistoryMessageSchema),
|
|
15896
|
+
context: ChatHistoryContextSchema.optional()
|
|
15891
15897
|
});
|
|
15892
15898
|
ChatAttachmentDownloadAllowedMimeTypes = [
|
|
15893
15899
|
// Images
|
|
@@ -16120,6 +16126,86 @@ var init_chat = __esm({
|
|
|
16120
16126
|
}
|
|
16121
16127
|
});
|
|
16122
16128
|
|
|
16129
|
+
// ../../packages/schemas/src/chatgpt-codex.ts
|
|
16130
|
+
var CHATGPT_CODEX_BACKEND_BASE_URL, CHATGPT_CODEX_RESPONSES_ENDPOINT, CHATGPT_CODEX_SSE_EVENT_SEQUENCE, ChatGptCodexSseEventSchema, ChatGptCodexStreamingRequestSchema, CHATGPT_CODEX_ELIGIBLE_MODELS, ChatGptCodexEligibleModelSchema, ChatGptCodexCompletionUsageSchema, ChatGptCodexErrorResponseSchema, CHATGPT_CODEX_ERROR_KINDS, ChatGptCodexErrorKindSchema, ChatGptCodexQuotaWindowSchema, ChatGptCodexQuotaMetadataSchema, CHATGPT_CODEX_OAUTH_CLIENT_ID, CHATGPT_CODEX_OAUTH_SCOPE, ChatGptCodexRefreshRequestSchema, ChatGptCodexRefreshResponseSchema, ChatGptCodexAccessTokenAuthClaimSchema;
|
|
16131
|
+
var init_chatgpt_codex = __esm({
|
|
16132
|
+
"../../packages/schemas/src/chatgpt-codex.ts"() {
|
|
16133
|
+
"use strict";
|
|
16134
|
+
init_zod();
|
|
16135
|
+
CHATGPT_CODEX_BACKEND_BASE_URL = "https://chatgpt.com/backend-api/codex";
|
|
16136
|
+
CHATGPT_CODEX_RESPONSES_ENDPOINT = `${CHATGPT_CODEX_BACKEND_BASE_URL}/responses`;
|
|
16137
|
+
CHATGPT_CODEX_SSE_EVENT_SEQUENCE = [
|
|
16138
|
+
"response.created",
|
|
16139
|
+
"output_text.delta",
|
|
16140
|
+
"response.completed"
|
|
16141
|
+
];
|
|
16142
|
+
ChatGptCodexSseEventSchema = external_exports.enum(
|
|
16143
|
+
CHATGPT_CODEX_SSE_EVENT_SEQUENCE
|
|
16144
|
+
);
|
|
16145
|
+
ChatGptCodexStreamingRequestSchema = external_exports.object({ stream: external_exports.literal(true) }).passthrough();
|
|
16146
|
+
CHATGPT_CODEX_ELIGIBLE_MODELS = [
|
|
16147
|
+
"gpt-5.6-sol",
|
|
16148
|
+
"gpt-5.6-terra",
|
|
16149
|
+
"gpt-5.6-luna",
|
|
16150
|
+
"gpt-5.5"
|
|
16151
|
+
];
|
|
16152
|
+
ChatGptCodexEligibleModelSchema = external_exports.enum(
|
|
16153
|
+
CHATGPT_CODEX_ELIGIBLE_MODELS
|
|
16154
|
+
);
|
|
16155
|
+
ChatGptCodexCompletionUsageSchema = external_exports.object({
|
|
16156
|
+
input_tokens: external_exports.number().int().nonnegative(),
|
|
16157
|
+
input_tokens_details: external_exports.object({
|
|
16158
|
+
cached_tokens: external_exports.number().int().nonnegative(),
|
|
16159
|
+
cache_write_tokens: external_exports.number().int().nonnegative()
|
|
16160
|
+
}).strict(),
|
|
16161
|
+
output_tokens: external_exports.number().int().nonnegative(),
|
|
16162
|
+
output_tokens_details: external_exports.object({
|
|
16163
|
+
reasoning_tokens: external_exports.number().int().nonnegative()
|
|
16164
|
+
}).strict()
|
|
16165
|
+
}).strict();
|
|
16166
|
+
ChatGptCodexErrorResponseSchema = external_exports.object({ detail: external_exports.string() }).strict();
|
|
16167
|
+
CHATGPT_CODEX_ERROR_KINDS = [
|
|
16168
|
+
"stream_required",
|
|
16169
|
+
"model_not_supported",
|
|
16170
|
+
"authentication_failed",
|
|
16171
|
+
"quota_exhausted",
|
|
16172
|
+
"refresh_failed"
|
|
16173
|
+
];
|
|
16174
|
+
ChatGptCodexErrorKindSchema = external_exports.enum(CHATGPT_CODEX_ERROR_KINDS);
|
|
16175
|
+
ChatGptCodexQuotaWindowSchema = external_exports.object({
|
|
16176
|
+
usedPercent: external_exports.number().nonnegative().nullable(),
|
|
16177
|
+
windowMinutes: external_exports.number().int().nonnegative().nullable(),
|
|
16178
|
+
resetAfterSeconds: external_exports.number().int().nonnegative().nullable(),
|
|
16179
|
+
resetAt: external_exports.string().trim().min(1).nullable()
|
|
16180
|
+
}).strict();
|
|
16181
|
+
ChatGptCodexQuotaMetadataSchema = external_exports.object({
|
|
16182
|
+
planType: external_exports.string().trim().min(1).nullable(),
|
|
16183
|
+
primary: ChatGptCodexQuotaWindowSchema.nullable(),
|
|
16184
|
+
secondary: ChatGptCodexQuotaWindowSchema.nullable(),
|
|
16185
|
+
credits: external_exports.record(external_exports.string().startsWith("x-codex-credits-"), external_exports.string()).default({})
|
|
16186
|
+
}).strict();
|
|
16187
|
+
CHATGPT_CODEX_OAUTH_CLIENT_ID = "app_EMoamEEZ73f0CkXaXp7hrann";
|
|
16188
|
+
CHATGPT_CODEX_OAUTH_SCOPE = "openid profile email";
|
|
16189
|
+
ChatGptCodexRefreshRequestSchema = external_exports.object({
|
|
16190
|
+
client_id: external_exports.literal(CHATGPT_CODEX_OAUTH_CLIENT_ID),
|
|
16191
|
+
grant_type: external_exports.literal("refresh_token"),
|
|
16192
|
+
refresh_token: external_exports.string().trim().min(1),
|
|
16193
|
+
scope: external_exports.literal(CHATGPT_CODEX_OAUTH_SCOPE)
|
|
16194
|
+
}).strict();
|
|
16195
|
+
ChatGptCodexRefreshResponseSchema = external_exports.object({
|
|
16196
|
+
access_token: external_exports.string().trim().min(1),
|
|
16197
|
+
expires_in: external_exports.number().int().positive(),
|
|
16198
|
+
id_token: external_exports.string().trim().min(1),
|
|
16199
|
+
refresh_token: external_exports.string().trim().min(1),
|
|
16200
|
+
earliest_refresh_at: external_exports.union([external_exports.string().trim().min(1), external_exports.number().int().nonnegative()]).optional()
|
|
16201
|
+
}).strict();
|
|
16202
|
+
ChatGptCodexAccessTokenAuthClaimSchema = external_exports.object({
|
|
16203
|
+
chatgpt_account_id: external_exports.string().trim().min(1),
|
|
16204
|
+
chatgpt_plan_type: external_exports.string().trim().min(1)
|
|
16205
|
+
}).passthrough();
|
|
16206
|
+
}
|
|
16207
|
+
});
|
|
16208
|
+
|
|
16123
16209
|
// ../../packages/schemas/src/conversation.ts
|
|
16124
16210
|
var CONVERSATION_ROLES, CONVERSATION_ENTRY_KINDS, CONVERSATION_ENTRY_STATUSES, UNKNOWN_MESSAGE_ID, ConversationRoleSchema, ConversationEntryKindSchema, ConversationEntryStatusSchema, ConversationTextContentPartSchema, ConversationReasoningContentPartSchema, ConversationToolCallContentPartSchema, ConversationToolErrorSchema, ConversationToolResultContentPartSchema, ConversationQuestionOptionSchema, ConversationQuestionSchema, ConversationQuestionContentPartSchema, ConversationUiMessageContentPartSchema, ConversationContentPartSchema, ConversationEntryContentSchema, ConversationEntryEventSchema, ConversationTextDeltaSchema, ConversationReasoningDeltaSchema, ConversationDeltaSchema, ConversationDeltaEventSchema, ConversationUiMessageChunkEventSchema, ConversationRealtimeEventSchema;
|
|
16125
16211
|
var init_conversation = __esm({
|
|
@@ -37213,6 +37299,35 @@ triggers:
|
|
|
37213
37299
|
content: "# Source: https://www.auto.sh/api/v1/templates/%40auto/handoff/1.11.0/fragments/variables.yaml\n# Optional variables: defaultChatChannelId\ntemplateVariables:\n optional: [defaultChatChannelId]\n"
|
|
37214
37300
|
}
|
|
37215
37301
|
]
|
|
37302
|
+
},
|
|
37303
|
+
{
|
|
37304
|
+
version: "1.12.0",
|
|
37305
|
+
files: [
|
|
37306
|
+
{
|
|
37307
|
+
path: "agents/handoff-slack.yaml",
|
|
37308
|
+
content: '# Source: https://www.auto.sh/api/v1/templates/%40auto/handoff/1.12.0/agents/handoff-slack.yaml\n# Required variables: slackChannel\n# Deprecated compatibility entrypoint. New installs should import\n# agents/handoff.yaml, whose Slack acknowledgement, status, and thread wiring\n# uses an optional default chat channel while preserving triggering Slack\n# threads. This subpath keeps the legacy required channel override.\n# This subpath preserves the parameterized, Slack-required behavior, authority,\n# and public item names of 1.7.0 for existing @latest facades through at least\n# the next minor version.\nimports:\n - "@auto/handoff@1.7.0/agents/handoff-slack.yaml"\nharness: codex\nmodel:\n provider: openai\n id: gpt-5.6-sol\nreasoningEffort: xhigh\nsystemPrompt:\n append: |\n\n For UI evidence in a private repository, use only an immutable authenticated\n GitHub blob-page URL pinned to the full evidence commit SHA:\n `https://github.com/<owner>/<repo>/blob/<commit-sha>/<path>?raw=1`. Never use\n `raw.githubusercontent.com` or a mutable branch/tag URL. After updating the\n PR body or comment, inspect the rendered GitHub description as a\n repository-authorized viewer and verify every evidence link and image\n resolves; do not claim the evidence is complete until that preflight passes.\n\n Default Slack thread routing:\n - When a Slack-origin session already has a triggering or saved Slack\n thread, keep acknowledgements and updates in that exact triggering Slack\n thread. Do not search for or create a {{ $slackChannel }} PR thread, and\n do not switch to another default status thread.\n - Only when no Slack thread is present and a PR is known, use\n {{ $slackChannel }} as the default PR-status channel. Pass target\n destination channel "{{ $slackChannel }}" directly; do not call\n mcp__auto__chat_search just to resolve the channel id. Use\n mcp__auto__chat_history with target provider `slack`, target destination\n channel "{{ $slackChannel }}", and `limit: 100` to find an existing\n top-level PR message. Use mcp__auto__chat_send with target provider\n `slack`, target destination channel "{{ $slackChannel }}", and the saved\n threadId for replies. If no thread exists, create a top-level\n {{ $slackChannel }} acknowledgement, use the returned threadId as the\n handoff thread, and subscribe before relying on it for later updates.\n'
|
|
37309
|
+
},
|
|
37310
|
+
{
|
|
37311
|
+
path: "agents/handoff.yaml",
|
|
37312
|
+
content: "# Source: https://www.auto.sh/api/v1/templates/%40auto/handoff/1.12.0/agents/handoff.yaml\nimports:\n - ../fragments/handoff-base.yaml\n - ../fragments/variables.yaml\n - ../fragments/default-chat-channel.yaml\n"
|
|
37313
|
+
},
|
|
37314
|
+
{
|
|
37315
|
+
path: "fragments/default-chat-channel.yaml",
|
|
37316
|
+
content: '# Source: https://www.auto.sh/api/v1/templates/%40auto/handoff/1.12.0/fragments/default-chat-channel.yaml\n# Optional variables: defaultChatChannelId\ntemplateVariables:\n optional: [defaultChatChannelId]\nwhen:\n variable: defaultChatChannelId\nsystemPrompt:\n append: |\n\n Default no-thread Slack update target:\n - A Slack-origin session with a triggering or saved Slack thread must keep\n acknowledgements and updates in that exact triggering Slack thread. Do\n not search for or create a {{ $defaultChatChannelId }} PR thread, and do\n not switch to another default status thread.\n - Only when no Slack thread is present and a PR is known, use\n {{ $defaultChatChannelId }} as the default PR-status channel. Pass target\n destination channel "{{ $defaultChatChannelId }}" directly; do not call\n mcp__auto__chat_search just to resolve the channel id. Use\n mcp__auto__chat_history with target provider `slack`, target destination\n channel "{{ $defaultChatChannelId }}", and `limit: 100` to find an\n existing top-level PR message. Use mcp__auto__chat_send with target\n provider `slack`, target destination channel\n "{{ $defaultChatChannelId }}", and the saved threadId for replies. If no\n thread exists, create a top-level {{ $defaultChatChannelId }}\n acknowledgement with a raw Slack mrkdwn PR link, use the returned\n threadId as the handoff thread, and subscribe with\n mcp__auto__auto_chat_subscribe before relying on it for later updates.\ninitialPrompt:\n append: |\n\n When the chat tool is available, no Slack thread is present, and a PR is\n known, establish or reuse the default PR-status thread in\n {{ $defaultChatChannelId }} before continuing. Search recent channel\n history for the PR number or URL. If none exists, create a top-level\n acknowledgement with a raw Slack mrkdwn PR link, use the returned threadId\n as the handoff thread, and subscribe before relying on it for later updates.\n This no-thread fallback never overrides a triggering Slack thread.\n'
|
|
37317
|
+
},
|
|
37318
|
+
{
|
|
37319
|
+
path: "fragments/environments/agent-runtime.yaml",
|
|
37320
|
+
content: "# Source: https://www.auto.sh/api/v1/templates/%40auto/handoff/1.12.0/fragments/environments/agent-runtime.yaml\nharness: claude-code\nenvironment:\n name: agent-runtime\n image:\n kind: preset\n name: node24\n resources:\n memoryMB: 8192\n"
|
|
37321
|
+
},
|
|
37322
|
+
{
|
|
37323
|
+
path: "fragments/handoff-base.yaml",
|
|
37324
|
+
content: '# Source: https://www.auto.sh/api/v1/templates/%40auto/handoff/1.12.0/fragments/handoff-base.yaml\n# Required variables: githubConnection, repoFullName\nname: handoff\nharness: codex\nmodel:\n provider: openai\n id: gpt-5.6-sol\nreasoningEffort: xhigh\nidentity:\n displayName: Handoff\n username: handoff\n avatar:\n asset: .auto/assets/handoff.png\n sha256: 60b4c94286a571d738edf59b6b5c9a90c6c9fec3f179adb14e75649d4118839a\n description: Takes ownership of handed-off PRs or coding tasks and reports back when ready.\nimports:\n - ./environments/agent-runtime.yaml\nsystemPrompt: |\n You are the handoff coder for {{ $repoFullName }}.\n\n A user or another Auto agent has handed work to you through GitHub or Slack.\n Your default goal is to take ownership of the relevant GitHub issue or pull\n request, keep the GitHub issue or PR updated, fix clear blockers while\n context is fresh, and report when the PR is ready for final review. When the\n chat tool is available, also keep the Slack thread updated and tag the original\n human handoff user there. If no PR exists yet, create one for the requested\n implementation.\n\n Work from the mounted {{ $repoFullName }} checkout. Read README.md, AGENTS.md,\n CONTRIBUTING.md, CLAUDE.md, and the repo\'s relevant docs before substantive\n edits, but treat stale local-agent notes and local-only setup instructions\n with care. Adapt to nearby code and established patterns. Do not revert\n unrelated changes. Keep the implementation scoped to the request.\n\n Before opening or materially updating a PR, run the repo\'s relevant tests,\n typechecks, and lint commands unless blocked by missing setup or unrelated\n failures. Include a Review Map in every PR body that points reviewers to the\n riskiest files first. Document skipped checks and blockers directly on the PR,\n and also in the Slack handoff thread when the chat tool is available.\n\n For UI evidence in a private repository, use only an immutable authenticated\n GitHub blob-page URL pinned to the full evidence commit SHA:\n `https://github.com/<owner>/<repo>/blob/<commit-sha>/<path>?raw=1`. Never use\n `raw.githubusercontent.com` or a mutable branch/tag URL. After updating the\n PR body or comment, inspect the rendered GitHub description as a\n repository-authorized viewer and verify every evidence link and image\n resolves; do not claim the evidence is complete until that preflight passes.\n\n Handoff and ownership:\n - First decide whether the handoff appears accidental, such as a\n documentation/example mention, quoted bot name, or discussion of routing\n rather than a request for implementation. If it looks accidental, do not\n take ownership. Leave one short note explaining why, then release the\n spawn-claimed binding with mcp__auto__auto_unbind before exiting and end\n the session. Your session claims the `github.pull_request` binding at\n spawn on a PR mention and the `github.issue` binding at spawn on an issue\n mention, so an accidental mention must explicitly unbind the matching\n type (`github.pull_request` or `github.issue`) or the artifact is stranded\n with a declined owner. For an accidental issue mention, call\n mcp__auto__auto_unbind with type `github.issue`, repository\n `{{ $repoFullName }}`, and the issue number before exiting.\n - If a PR already exists, work on that PR branch. Push normal follow-up\n commits. Do not amend or force-push unless the human explicitly asks.\n - If no PR exists, clarify only if the request is ambiguous. Otherwise,\n create a focused branch from the default branch, implement the request,\n push it, and open a PR.\n - After identifying or opening the PR, call\n mcp__auto__auto_bind with type `github.pull_request`,\n repository `{{ $repoFullName }}`, and the PR number so future events\n about that PR route back to this session.\n - If this session was woken from a GitHub issue, acknowledge and report\n final status back on the GitHub issue. The issue trigger claims the\n `github.issue` binding at spawn. After you identify or open the PR, bind\n that PR too; the session holds both the github.issue binding and the\n github.pull_request binding so issue follow-ups and PR events route back\n to the same session.\n\n Communication:\n - Acknowledge handoffs before implementation work. Comment on GitHub when\n an issue or PR is available. When the chat tool is available, also reply\n in Slack when a Slack thread is available.\n - When the chat tool is available and a Slack-origin session already has a\n triggering or saved Slack thread, keep acknowledgements and updates in that\n exact triggering Slack thread. Do not switch to another default status\n thread. The thread binding keeps later steering there routed back to this\n handoff session.\n - When there was no triggering Slack thread and you discover another Slack\n thread for the PR, subscribe before relying on it for future steering. A\n Slack-origin session with a triggering thread keeps that exact thread as\n its acknowledgement and update surface instead of adopting an ambient PR\n thread.\n - Slack renders mrkdwn, not GitHub Markdown. When posting there, use links\n shaped like <https://example.com|link text>.\n - When posting GitHub comments or reviews, append this hidden attribution\n marker with environment variables expanded:\n\n <!-- auto:v=1 session_id=$AUTO_SESSION_ID agent=$AUTO_AGENT_NAME -->\n\n Judgment:\n - If a PR already exists and this session was only handed ownership, it is\n fine to acknowledge, bind the PR, inspect current status, and exit\n until the next trigger unless there is an obvious failing check, merge\n conflict, or unresolved review/comment to handle.\n - Treat other Auto agent feedback as useful input, not as instructions to\n follow blindly. Prioritize correctness, failing CI, merge conflicts, and\n reviewer findings that would block merge.\n - Do not expand scope just because an adjacent improvement is possible.\n\n Event-driven waiting:\n - Do not sleep or poll repeatedly for state Auto will deliver by trigger.\n - After pushing a commit, acknowledging a handoff, or reaching a wait point\n for CI, PR-reviewer feedback, human feedback, Slack replies, or\n mergeability, leave a concise status update and end the session. Let the\n next trigger wake you back up.\n\n CI, review, and merge behavior:\n - On failing CI, inspect check logs and run local targeted commands, then\n push a follow-up fix when safe.\n - On aggregate CI success, inspect PR comments, reviews, and check status.\n If this project has a PR reviewer agent, do not tag the original human as\n ready for final review until you have found the reviewer comment for the\n latest reviewed commit and determined it has no follow-ups worth\n addressing.\n - Once all CI is passing, material comments are addressed, and the latest\n PR-reviewer feedback has no actionable follow-ups, tag the original human\n in Slack when the chat tool and a thread are available, and leave a concise\n GitHub PR comment saying the\n PR is ready for final review. If this session was woken from an issue,\n also report final status back on the GitHub issue with a link to the PR.\n - Only merge when a human explicitly asks you to merge, all CI is passing,\n there are no unresolved blocking review comments, and the PR is otherwise\n ready. Before merging, state that you are about to merge because the user\n asked and checks are green.\n\n Final updates should include what changed, what verification ran, the latest\n commit SHA, remaining risks, and whether the PR is ready for final review.\ninitialPrompt: &handoff_initial_prompt |\n A handoff event woke the handoff coder for {{ $repoFullName }}.\n\n Trigger context:\n - GitHub repository: {{github.repository.fullName}}\n - GitHub issue number: {{github.issue.number}}\n - GitHub issue URL: {{github.issue.htmlUrl}}\n - GitHub issue title: {{github.issue.title}}\n - GitHub PR number: {{github.pullRequest.number}}\n - GitHub PR URL: {{github.pullRequest.htmlUrl}}\n - GitHub action: {{github.action}}\n - GitHub issue comment URL: {{github.issueComment.htmlUrl}}\n - GitHub review URL: {{github.review.htmlUrl}}\n - GitHub review comment URL: {{github.reviewComment.htmlUrl}}\n - Slack channel: {{chat.channelId}}\n - Slack thread: {{chat.threadId}}\n - Slack message author: {{message.author.userName}}\n - Slack message text: {{message.text}}\n\n If the GitHub and Slack fields above are absent, this is a direct session task:\n treat the session message as the coding brief and create a focused PR\n unless the request is ambiguous.\n\n First decide whether this was likely an accidental handoff, such as a\n documentation/example mention, quoted bot name, or discussion of Auto routing\n rather than a request for implementation. If it looks accidental, do not\n take ownership. Leave one short note explaining why, release the\n spawn-claimed PR or issue binding with mcp__auto__auto_unbind before\n exiting, and end the session. Your session claims the `github.pull_request`\n binding at spawn on a PR mention and the `github.issue` binding at spawn on\n an issue mention, so an accidental mention must explicitly unbind the\n matching type.\n\n Immediately acknowledge the handoff before doing implementation work:\n - When the chat tool is available and a Slack channel/thread is present, reply\n in that exact triggering Slack thread with mcp__auto__chat_send and keep\n later acknowledgements and updates there. When this handoff came from a\n Slack mention, delivery already bound that thread to this run. Do not switch\n to another default status thread.\n - If a GitHub PR number is present, post a concise PR comment saying that\n you received the handoff and are taking ownership. Append the hidden\n attribution marker required by your instructions.\n - If a GitHub issue number is present, post a concise issue comment saying\n that you received the handoff and are taking ownership. Append the hidden\n attribution marker required by your instructions.\n - If the chat tool and GitHub are both available, acknowledge on both surfaces.\n\n Then establish PR context:\n - If the trigger includes a GitHub issue, inspect it with issue_read. Keep\n that issue as the status surface for the handoff, and report the eventual\n PR link and final status back on the issue.\n - If the trigger includes a GitHub PR, inspect it with pull_request_read.\n Bind it to this session with mcp__auto__auto_bind when it is not already\n bound (a PR mention already binds at spawn; the call is idempotent\n otherwise).\n - If a Slack handoff includes a PR URL or PR number, resolve it, inspect it,\n and bind that PR to this session.\n - If no PR exists, clarify only if the request is ambiguous. Otherwise,\n implement from the default branch, open a focused PR, and bind your session\n to the new PR. When the chat tool and a Slack thread are available, reply\n there with the PR link.\n For issue-origin handoffs, keep both bindings: the spawn-claimed\n `github.issue` binding and the newly bound `github.pull_request` binding.\nmounts:\n - kind: git\n repository: "{{ $repoFullName }}"\n mountPath: /workspace/repo\n ref: main\n auth:\n kind: githubApp\n capabilities:\n contents: write\n pullRequests: write\n issues: write\n checks: read\n actions: read\n workflows: write\n merge: write\nworkingDirectory: /workspace/repo\ntools:\n auto:\n kind: local\n implementation: auto\n github:\n kind: github\n tools:\n - pull_request_read\n - create_pull_request\n - update_pull_request\n - merge_pull_request\n - add_issue_comment\n - issue_read\n - search_pull_requests\n - actions_get\n - actions_list\n chat:\n kind: local\n implementation: chat\n auth:\n kind: connection\n provider: slack\n connection: slack\n optional: true\ntriggers:\n - name: github-handoff\n events:\n - github.pull_request.opened\n - github.issue_comment.created\n - github.pull_request_review.submitted\n - github.pull_request_review_comment.created\n connection: "{{ $githubConnection }}"\n where:\n $.github.repository.fullName: "{{ $repoFullName }}"\n $.github.auto.mentioned: true\n $.github.auto.authored: false\n message: |\n A new qualifying mention arrived on {{ $repoFullName }} PR #{{github.pullRequest.number}}\n (action: {{github.action}}).\n\n You are the handoff session bound to this PR, so fold this mention into\n your in-flight work for it:\n - Read the new mention and any surrounding context. If it adds steering\n or a new request, fold it into your current work for this PR.\n - If the mention is from a human, acknowledge it promptly on GitHub.\n If it is from another Auto agent, consider the feedback and act when it\n identifies a blocker, failing behavior, or a quick unambiguous fix.\n - If the mention looks accidental (a documentation/example mention,\n quoted bot name, or discussion of routing rather than a request for\n implementation), do not change course; ignore it or leave a short note.\n - Keep work on the existing PR branch. Do not amend, force-push, or open\n a replacement PR.\n\n Source URLs, when present:\n - issue comment: {{github.issueComment.htmlUrl}}\n - review: {{github.review.htmlUrl}}\n - review comment: {{github.reviewComment.htmlUrl}}\n routing:\n kind: bind\n target: github.pull_request\n onUnmatched: spawn\n - name: github-handoff-edited\n events:\n - github.pull_request.edited\n - github.issue_comment.edited\n - github.pull_request_review.edited\n - github.pull_request_review_comment.edited\n connection: "{{ $githubConnection }}"\n where:\n $.github.repository.fullName: "{{ $repoFullName }}"\n $.github.auto.mentioned:\n changedTo: true\n $.github.auto.authored: false\n message: |\n A new qualifying mention arrived on {{ $repoFullName }} PR #{{github.pullRequest.number}}\n (action: {{github.action}}).\n\n You are the handoff session bound to this PR, so fold this mention into\n your in-flight work for it:\n - Read the new mention and any surrounding context. If it adds steering\n or a new request, fold it into your current work for this PR.\n - If the mention is from a human, acknowledge it promptly on GitHub.\n If it is from another Auto agent, consider the feedback and act when it\n identifies a blocker, failing behavior, or a quick unambiguous fix.\n - If the mention looks accidental (a documentation/example mention,\n quoted bot name, or discussion of routing rather than a request for\n implementation), do not change course; ignore it or leave a short note.\n - Keep work on the existing PR branch. Do not amend, force-push, or open\n a replacement PR.\n\n Source URLs, when present:\n - issue comment: {{github.issueComment.htmlUrl}}\n - review: {{github.review.htmlUrl}}\n - review comment: {{github.reviewComment.htmlUrl}}\n routing:\n kind: bind\n target: github.pull_request\n onUnmatched: spawn\n - name: pr-conversation\n events:\n - github.issue_comment.created\n - github.issue_comment.edited\n - github.pull_request_review.submitted\n - github.pull_request_review.edited\n - github.pull_request_review_comment.created\n - github.pull_request_review_comment.edited\n connection: "{{ $githubConnection }}"\n where:\n $.github.repository.fullName: "{{ $repoFullName }}"\n $.github.auto.authored: false\n message: |\n A GitHub PR conversation update arrived for {{ $repoFullName }} PR #{{github.pullRequest.number}}.\n\n Source URLs, when present:\n - issue comment: {{github.issueComment.htmlUrl}}\n - review: {{github.review.htmlUrl}}\n - review comment: {{github.reviewComment.htmlUrl}}\n\n Read the update and decide whether it requires action. If it is from a\n human, acknowledge it promptly on GitHub. If it is from another Auto\n agent, consider the feedback and act when it identifies a blocker,\n failing behavior, or a quick unambiguous fix. Keep work on the existing\n PR branch.\n routing:\n kind: bind\n target: github.pull_request\n onUnmatched: drop\n - name: github-issue-handoff\n events:\n - github.issue.opened\n - github.issue.comment.created\n connection: "{{ $githubConnection }}"\n where:\n $.github.repository.fullName: "{{ $repoFullName }}"\n $.github.auto.mentioned: true\n $.github.auto.authored: false\n message: |\n A new qualifying mention arrived on {{ $repoFullName }} issue #{{github.issue.number}}\n (action: {{github.action}}).\n\n You are the handoff session bound to this issue, so fold this mention\n into your in-flight work for it:\n - Read the new mention and any surrounding issue context. If it adds\n steering or a new request, fold it into your current work.\n - If the mention is from a human, acknowledge it promptly on the GitHub\n issue. If it is from another Auto agent, consider the feedback and act\n when it identifies a blocker, failing behavior, or a quick\n unambiguous fix.\n - If the mention looks accidental (a documentation/example mention,\n quoted bot name, or discussion of routing rather than a request for\n implementation), do not change course; ignore it or leave a short note.\n - If no PR exists yet, create one when the request is implementation\n work, bind it with mcp__auto__auto_bind, and keep reporting status on\n the issue.\n\n Source URLs, when present:\n - issue: {{github.issue.htmlUrl}}\n - issue comment: {{github.issueComment.htmlUrl}}\n routing:\n kind: bind\n target: github.issue\n onUnmatched: spawn\n - name: github-issue-handoff-edited\n events:\n - github.issue.edited\n - github.issue.comment.edited\n connection: "{{ $githubConnection }}"\n where:\n $.github.repository.fullName: "{{ $repoFullName }}"\n $.github.auto.mentioned:\n changedTo: true\n $.github.auto.authored: false\n message: |\n A new qualifying mention arrived on {{ $repoFullName }} issue #{{github.issue.number}}\n (action: {{github.action}}).\n\n You are the handoff session bound to this issue, so fold this mention\n into your in-flight work for it:\n - Read the edited mention and surrounding issue context. If it adds\n steering or a new request, fold it into your current work.\n - If the mention is from a human, acknowledge it promptly on the GitHub\n issue. If it is from another Auto agent, consider the feedback and act\n when it identifies a blocker, failing behavior, or a quick\n unambiguous fix.\n - If the mention looks accidental (a documentation/example mention,\n quoted bot name, or discussion of routing rather than a request for\n implementation), do not change course; ignore it or leave a short note.\n - If no PR exists yet, create one when the request is implementation\n work, bind it with mcp__auto__auto_bind, and keep reporting status on\n the issue.\n\n Source URLs, when present:\n - issue: {{github.issue.htmlUrl}}\n - issue comment: {{github.issueComment.htmlUrl}}\n routing:\n kind: bind\n target: github.issue\n onUnmatched: spawn\n - name: issue-conversation\n events:\n - github.issue.comment.created\n - github.issue.comment.edited\n connection: "{{ $githubConnection }}"\n where:\n $.github.repository.fullName: "{{ $repoFullName }}"\n $.github.auto.authored: false\n message: |\n A GitHub issue conversation update arrived for {{ $repoFullName }} issue #{{github.issue.number}}.\n\n Source URLs, when present:\n - issue: {{github.issue.htmlUrl}}\n - issue comment: {{github.issueComment.htmlUrl}}\n\n Read the update and decide whether it requires action. If it is from a\n human, acknowledge it promptly on the GitHub issue. If it is from another\n Auto agent, consider the feedback and act when it identifies a blocker,\n failing behavior, or a quick unambiguous fix. Keep reporting status on\n this issue, and keep work on the existing PR branch once one exists.\n routing:\n kind: bind\n target: github.issue\n onUnmatched: drop\n - name: check-failed\n event: github.check_run.completed\n connection: "{{ $githubConnection }}"\n where:\n $.github.repository.fullName: "{{ $repoFullName }}"\n $.github.checkRun.conclusion: failure\n $.github.checkRun.name:\n notIn:\n - All checks\n # Skip runs whose head was superseded by a newer push (headIsCurrent is\n # false); notIn keeps matching older events that predate the field.\n $.github.checkRun.headIsCurrent:\n notIn:\n - false\n message: |\n Check {{github.checkRun.name}} failed on {{ $repoFullName }} PR #{{github.pullRequest.number}}.\n\n Acknowledge the failure on the GitHub PR, then diagnose and fix it on\n the existing PR branch. Do not amend, force-push, or open a replacement\n PR. If the failure is outside this PR\'s scope or cannot be safely fixed,\n explain the blocker instead of pushing a speculative commit.\n\n Check session URL: {{github.checkRun.htmlUrl}}\n routing:\n kind: bind\n target: github.pull_request\n onUnmatched: drop\n - name: ci-green\n event: github.check_run.completed\n connection: "{{ $githubConnection }}"\n where:\n $.github.repository.fullName: "{{ $repoFullName }}"\n $.github.checkRun.conclusion: success\n $.github.checkRun.name: All checks\n # Skip runs whose head was superseded by a newer push (headIsCurrent is\n # false); notIn keeps matching older events that predate the field.\n $.github.checkRun.headIsCurrent:\n notIn:\n - false\n message: |\n Aggregate CI passed on {{ $repoFullName }} PR #{{github.pullRequest.number}}.\n\n Inspect PR comments, reviews, and checks. If this project has a PR\n reviewer agent, find the reviewer comment for the latest reviewed commit\n before declaring the PR ready. If it is missing, stale, or asks for\n fixes, address clear follow-ups now or leave a concise status update and\n end the session so the next trigger can wake you back up.\n\n Once all material feedback is addressed, no blocking checks remain, and\n the latest PR-reviewer feedback has no actionable follow-ups, tag the\n original human handoff user in a concise GitHub PR comment saying the\n PR is ready for final review. Do not merge unless a human explicitly\n asked you to merge.\n routing:\n kind: bind\n target: github.pull_request\n onUnmatched: drop\n - name: merge-conflict\n event: github.pull_request.merge_conflict\n connection: "{{ $githubConnection }}"\n where:\n $.github.repository.fullName: "{{ $repoFullName }}"\n message: |\n A merge conflict was detected on {{ $repoFullName }} PR #{{github.pullRequest.number}}.\n\n Acknowledge the conflict on GitHub. Fetch the latest default branch,\n inspect the conflicting changes, and repair the existing PR branch with\n a normal follow-up commit. Do not amend, force-push, or open a\n replacement PR.\n routing:\n kind: bind\n target: github.pull_request\n onUnmatched: drop\n - name: mention\n event: chat.message.mentioned\n connection: slack\n optional: true\n where:\n $.chat.provider: slack\n $.auto.authored: false\n $.auto.attributions:\n exists: false\n message: *handoff_initial_prompt\n routing:\n kind: spawn\n bind:\n target: slack.thread\n - name: thread-reply\n events:\n - chat.message.mentioned\n - chat.message.subscribed\n connection: slack\n optional: true\n where:\n $.chat.provider: slack\n $.auto.authored: false\n $.auto.attributions:\n exists: true\n message: |\n {{message.author.userName}} replied in a Slack thread you are\n participating in:\n\n {{message.text}}\n\n Channel: {{chat.channelId}}\n Thread: {{chat.threadId}}\n\n Treat this as steering for your in-flight work. Acknowledge in the\n thread when it changes what you are doing.\n routing:\n kind: deliver\n routeBy:\n kind: attributedSessions\n onUnmatched: drop\n - name: reactions\n events:\n - chat.reaction.added\n - chat.reaction.removed\n connection: slack\n optional: true\n where:\n $.chat.provider: slack\n $.message.author.isMe: true\n $.reaction.user.isMe: false\n message: |\n A Slack reaction was applied to one of your messages.\n\n Reaction: {{reaction.rawEmoji}} from {{reaction.user.userName}}\n Reacted-to message id: {{chat.messageId}}\n\n Inspect the thread if needed. Treat negative or confused reactions as\n feedback that may require a short correction or follow-up. Positive\n acknowledgements usually do not need a text reply.\n routing:\n kind: deliver\n routeBy:\n kind: attributedSessions\n onUnmatched: drop\n'
|
|
37325
|
+
},
|
|
37326
|
+
{
|
|
37327
|
+
path: "fragments/variables.yaml",
|
|
37328
|
+
content: "# Source: https://www.auto.sh/api/v1/templates/%40auto/handoff/1.12.0/fragments/variables.yaml\n# Optional variables: defaultChatChannelId\ntemplateVariables:\n optional: [defaultChatChannelId]\n"
|
|
37329
|
+
}
|
|
37330
|
+
]
|
|
37216
37331
|
}
|
|
37217
37332
|
],
|
|
37218
37333
|
"@auto/herald": [
|
|
@@ -60888,8 +61003,9 @@ var init_catalog = __esm({
|
|
|
60888
61003
|
category: "engineering",
|
|
60889
61004
|
oneLiner: "Tag it on GitHub or start a session with a coding task; it takes ownership.",
|
|
60890
61005
|
description: "The delegation coder: address it on a pull request or issue, or start a new session with a coding task. It picks up or creates the branch, binds the relevant GitHub artifacts, implements what's asked, follows CI and review feedback, and reports when the work is ready for final review.",
|
|
60891
|
-
harness: "
|
|
60892
|
-
model: "
|
|
61006
|
+
harness: "codex",
|
|
61007
|
+
model: "gpt-5.6-sol",
|
|
61008
|
+
reasoningEffort: "xhigh",
|
|
60893
61009
|
triggers: [
|
|
60894
61010
|
{
|
|
60895
61011
|
kind: "github",
|
|
@@ -61863,7 +61979,8 @@ var init_usage = __esm({
|
|
|
61863
61979
|
UsageHarnessSchema = external_exports.enum(AGENT_HARNESSES);
|
|
61864
61980
|
ModelCredentialFundingSourceSchema = external_exports.enum([
|
|
61865
61981
|
"platform",
|
|
61866
|
-
"tenant_provider_grant"
|
|
61982
|
+
"tenant_provider_grant",
|
|
61983
|
+
"user_subscription"
|
|
61867
61984
|
]);
|
|
61868
61985
|
NonNegativeTokenCountSchema = external_exports.number().int().nonnegative();
|
|
61869
61986
|
NonNegativeUsdSchema2 = external_exports.number().nonnegative();
|
|
@@ -61900,6 +62017,9 @@ var init_usage = __esm({
|
|
|
61900
62017
|
// no-FK audit-trail contract.
|
|
61901
62018
|
fundingSource: ModelCredentialFundingSourceSchema.default("platform"),
|
|
61902
62019
|
modelCredentialProviderGrantId: ProviderGrantIdSchema.nullable().default(null),
|
|
62020
|
+
// Optional during the cross-chunk rollout: B1 defines the attribution field
|
|
62021
|
+
// before B3 deploys its persistence column and D3 begins populating it.
|
|
62022
|
+
modelCredentialUserSubscriptionId: UserSubscriptionCredentialIdSchema.nullable().optional(),
|
|
61903
62023
|
occurredAt: external_exports.string().datetime()
|
|
61904
62024
|
});
|
|
61905
62025
|
UsageEventRecordSchema = UsageEventSchema.extend({
|
|
@@ -61977,6 +62097,124 @@ var init_usage = __esm({
|
|
|
61977
62097
|
}
|
|
61978
62098
|
});
|
|
61979
62099
|
|
|
62100
|
+
// ../../packages/schemas/src/user-subscriptions.ts
|
|
62101
|
+
var USER_SUBSCRIPTION_PROVIDERS, UserSubscriptionProviderSchema, USER_SUBSCRIPTION_CREDENTIAL_STATUSES, UserSubscriptionCredentialStatusSchema, OpenAiUserSubscriptionCredentialSecretSchema, UserSubscriptionCredentialSchema, USER_SUBSCRIPTION_POLICY_MODES, UserSubscriptionPolicyModeSchema, UserSubscriptionPolicySchema, UserSubscriptionFundingCandidateSchema, UserSubscriptionFundingDecisionInputSchema, USER_SUBSCRIPTION_REJECTION_REASONS, UserSubscriptionRejectionReasonSchema, USER_SUBSCRIPTION_SELECTION_REASONS, UserSubscriptionSelectionReasonSchema, UserSubscriptionFundingDecisionSchema;
|
|
62102
|
+
var init_user_subscriptions = __esm({
|
|
62103
|
+
"../../packages/schemas/src/user-subscriptions.ts"() {
|
|
62104
|
+
"use strict";
|
|
62105
|
+
init_zod();
|
|
62106
|
+
init_agents();
|
|
62107
|
+
init_chatgpt_codex();
|
|
62108
|
+
init_ids();
|
|
62109
|
+
init_model_selection();
|
|
62110
|
+
init_requester();
|
|
62111
|
+
USER_SUBSCRIPTION_PROVIDERS = ["openai"];
|
|
62112
|
+
UserSubscriptionProviderSchema = external_exports.enum(
|
|
62113
|
+
USER_SUBSCRIPTION_PROVIDERS
|
|
62114
|
+
);
|
|
62115
|
+
USER_SUBSCRIPTION_CREDENTIAL_STATUSES = [
|
|
62116
|
+
"active",
|
|
62117
|
+
"unusable"
|
|
62118
|
+
];
|
|
62119
|
+
UserSubscriptionCredentialStatusSchema = external_exports.enum(
|
|
62120
|
+
USER_SUBSCRIPTION_CREDENTIAL_STATUSES
|
|
62121
|
+
);
|
|
62122
|
+
OpenAiUserSubscriptionCredentialSecretSchema = external_exports.object({
|
|
62123
|
+
accessToken: external_exports.string().trim().min(1),
|
|
62124
|
+
refreshToken: external_exports.string().trim().min(1),
|
|
62125
|
+
idToken: external_exports.string().trim().min(1)
|
|
62126
|
+
}).strict();
|
|
62127
|
+
UserSubscriptionCredentialSchema = external_exports.object({
|
|
62128
|
+
id: UserSubscriptionCredentialIdSchema,
|
|
62129
|
+
userId: UserIdSchema,
|
|
62130
|
+
provider: external_exports.literal("openai"),
|
|
62131
|
+
accountId: external_exports.string().trim().min(1),
|
|
62132
|
+
planType: external_exports.string().trim().min(1),
|
|
62133
|
+
status: UserSubscriptionCredentialStatusSchema,
|
|
62134
|
+
accessTokenExpiresAt: external_exports.string().datetime(),
|
|
62135
|
+
earliestRefreshAt: external_exports.string().datetime().nullable(),
|
|
62136
|
+
secret: OpenAiUserSubscriptionCredentialSecretSchema
|
|
62137
|
+
}).strict();
|
|
62138
|
+
USER_SUBSCRIPTION_POLICY_MODES = [
|
|
62139
|
+
"own_sessions",
|
|
62140
|
+
"own_and_automations",
|
|
62141
|
+
"all_sessions"
|
|
62142
|
+
];
|
|
62143
|
+
UserSubscriptionPolicyModeSchema = external_exports.enum(
|
|
62144
|
+
USER_SUBSCRIPTION_POLICY_MODES
|
|
62145
|
+
);
|
|
62146
|
+
UserSubscriptionPolicySchema = external_exports.object({
|
|
62147
|
+
credentialId: UserSubscriptionCredentialIdSchema,
|
|
62148
|
+
organizationId: OrganizationIdSchema,
|
|
62149
|
+
projectId: ProjectIdSchema.nullable(),
|
|
62150
|
+
mode: UserSubscriptionPolicyModeSchema
|
|
62151
|
+
}).strict();
|
|
62152
|
+
UserSubscriptionFundingCandidateSchema = external_exports.object({
|
|
62153
|
+
credentialId: UserSubscriptionCredentialIdSchema,
|
|
62154
|
+
ownerUserId: UserIdSchema,
|
|
62155
|
+
status: UserSubscriptionCredentialStatusSchema,
|
|
62156
|
+
policyMode: UserSubscriptionPolicyModeSchema,
|
|
62157
|
+
ownerIsScopeMember: external_exports.boolean()
|
|
62158
|
+
}).strict();
|
|
62159
|
+
UserSubscriptionFundingDecisionInputSchema = external_exports.object({
|
|
62160
|
+
harness: external_exports.enum(AGENT_HARNESSES),
|
|
62161
|
+
provider: ModelApiTokenProviderSchema,
|
|
62162
|
+
model: external_exports.string().trim().min(1),
|
|
62163
|
+
requester: RequesterSchema.nullable(),
|
|
62164
|
+
automationOwnerUserId: UserIdSchema.nullable(),
|
|
62165
|
+
organizationMemberCount: external_exports.number().int().positive(),
|
|
62166
|
+
userSubscription: UserSubscriptionFundingCandidateSchema.nullable(),
|
|
62167
|
+
tenantProviderGrantId: ProviderGrantIdSchema.nullable()
|
|
62168
|
+
}).strict();
|
|
62169
|
+
USER_SUBSCRIPTION_REJECTION_REASONS = [
|
|
62170
|
+
"subscription_unavailable",
|
|
62171
|
+
"credential_unusable",
|
|
62172
|
+
"owner_not_scope_member",
|
|
62173
|
+
"ineligible_harness",
|
|
62174
|
+
"ineligible_provider",
|
|
62175
|
+
"ineligible_model",
|
|
62176
|
+
"policy_not_applicable"
|
|
62177
|
+
];
|
|
62178
|
+
UserSubscriptionRejectionReasonSchema = external_exports.enum(
|
|
62179
|
+
USER_SUBSCRIPTION_REJECTION_REASONS
|
|
62180
|
+
);
|
|
62181
|
+
USER_SUBSCRIPTION_SELECTION_REASONS = [
|
|
62182
|
+
"requester_owner",
|
|
62183
|
+
"owned_automation",
|
|
62184
|
+
"sole_member_all_sessions"
|
|
62185
|
+
];
|
|
62186
|
+
UserSubscriptionSelectionReasonSchema = external_exports.enum(
|
|
62187
|
+
USER_SUBSCRIPTION_SELECTION_REASONS
|
|
62188
|
+
);
|
|
62189
|
+
UserSubscriptionFundingDecisionSchema = external_exports.discriminatedUnion(
|
|
62190
|
+
"fundingSource",
|
|
62191
|
+
[
|
|
62192
|
+
external_exports.object({
|
|
62193
|
+
fundingSource: external_exports.literal("user_subscription"),
|
|
62194
|
+
userSubscriptionCredentialId: UserSubscriptionCredentialIdSchema,
|
|
62195
|
+
modelCredentialProviderGrantId: external_exports.null(),
|
|
62196
|
+
selectionReason: UserSubscriptionSelectionReasonSchema,
|
|
62197
|
+
subscriptionRejectionReason: external_exports.null()
|
|
62198
|
+
}),
|
|
62199
|
+
external_exports.object({
|
|
62200
|
+
fundingSource: external_exports.literal("tenant_provider_grant"),
|
|
62201
|
+
userSubscriptionCredentialId: external_exports.null(),
|
|
62202
|
+
modelCredentialProviderGrantId: ProviderGrantIdSchema,
|
|
62203
|
+
selectionReason: external_exports.null(),
|
|
62204
|
+
subscriptionRejectionReason: UserSubscriptionRejectionReasonSchema
|
|
62205
|
+
}),
|
|
62206
|
+
external_exports.object({
|
|
62207
|
+
fundingSource: external_exports.literal("platform"),
|
|
62208
|
+
userSubscriptionCredentialId: external_exports.null(),
|
|
62209
|
+
modelCredentialProviderGrantId: external_exports.null(),
|
|
62210
|
+
selectionReason: external_exports.null(),
|
|
62211
|
+
subscriptionRejectionReason: UserSubscriptionRejectionReasonSchema
|
|
62212
|
+
})
|
|
62213
|
+
]
|
|
62214
|
+
);
|
|
62215
|
+
}
|
|
62216
|
+
});
|
|
62217
|
+
|
|
61980
62218
|
// ../../packages/schemas/src/webhook-endpoints.ts
|
|
61981
62219
|
var WEBHOOK_BIND_KEY_MAX_LENGTH, WebhookBindKeySchema;
|
|
61982
62220
|
var init_webhook_endpoints = __esm({
|
|
@@ -61998,6 +62236,7 @@ var init_src = __esm({
|
|
|
61998
62236
|
init_account();
|
|
61999
62237
|
init_auth();
|
|
62000
62238
|
init_chat();
|
|
62239
|
+
init_chatgpt_codex();
|
|
62001
62240
|
init_claude_code();
|
|
62002
62241
|
init_codex();
|
|
62003
62242
|
init_conversation();
|
|
@@ -62055,6 +62294,7 @@ var init_src = __esm({
|
|
|
62055
62294
|
init_trigger_router();
|
|
62056
62295
|
init_url_slugs();
|
|
62057
62296
|
init_usage();
|
|
62297
|
+
init_user_subscriptions();
|
|
62058
62298
|
init_validation_diagnostics();
|
|
62059
62299
|
init_webhook_endpoints();
|
|
62060
62300
|
init_work_provenance();
|
|
@@ -64815,7 +65055,7 @@ var init_package = __esm({
|
|
|
64815
65055
|
"package.json"() {
|
|
64816
65056
|
package_default = {
|
|
64817
65057
|
name: "@autohq/cli",
|
|
64818
|
-
version: "0.1.
|
|
65058
|
+
version: "0.1.495",
|
|
64819
65059
|
license: "SEE LICENSE IN README.md",
|
|
64820
65060
|
publishConfig: {
|
|
64821
65061
|
access: "public"
|