diff --git a/.github/workflows/sdk-consistency-review.lock.yml b/.github/workflows/sdk-consistency-review.lock.yml
deleted file mode 100644
index 867cca9145..0000000000
--- a/.github/workflows/sdk-consistency-review.lock.yml
+++ /dev/null
@@ -1,1850 +0,0 @@
-# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"460e0bbc747eb7d0e062a8982fde1107719822da18b787fb1ffa16d1aac12798","body_hash":"e3a2e1a79536caf26d05fbeca8ef0c9dcf43a1279504e508823b071f5750962c","compiler_version":"v0.88.2","strict":true,"agent_id":"copilot","agent_model":"${{ vars.GH_AW_MODEL_AGENT_COPILOT || vars.GH_AW_DEFAULT_MODEL_COPILOT || 'claude-sonnet-5' }}","detection_agent_id":"copilot","detection_agent_model":"${{ vars.GH_AW_MODEL_DETECTION_COPILOT || vars.GH_AW_DEFAULT_MODEL_COPILOT || 'claude-sonnet-5' }}","engine_versions":{"copilot":"1.0.80"}}
-# gh-aw-manifest: {"version":1,"secrets":["GH_AW_DEFAULT_OTLP_HEADERS","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/cache/restore","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/cache/save","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/checkout","sha":"3d3c42e5aac5ba805825da76410c181273ba90b1","version":"v7.0.1"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"373c709c69115d41ff229c7e5df9f8788daa9553","version":"v9"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"9271a1804551c0dc4fb0085a97979950aa2f8489","version":"v0.88.2"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.28.12","digest":"sha256:390051be4ed1847f774fd8980b61d3a3523574c0175d00c3fc7cdf2002a88202","pinned_image":"ghcr.io/github/gh-aw-firewall/agent:0.28.12@sha256:390051be4ed1847f774fd8980b61d3a3523574c0175d00c3fc7cdf2002a88202"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.28.12","digest":"sha256:d7d533d87c80d87ff91ac0e21e9299055c3beedff1536262b97ed700fb065a32","pinned_image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.28.12@sha256:d7d533d87c80d87ff91ac0e21e9299055c3beedff1536262b97ed700fb065a32"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.28.12","digest":"sha256:52c34aca98d2a6833c329f1505912a6949c4fda16618c010c979bd59ea99254f","pinned_image":"ghcr.io/github/gh-aw-firewall/squid:0.28.12@sha256:52c34aca98d2a6833c329f1505912a6949c4fda16618c010c979bd59ea99254f"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.4.15","digest":"sha256:60cd97533e93d8e7be36b979c0f08a70846189bda6190f28bbd6d427bc0d9b6e","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.4.15@sha256:60cd97533e93d8e7be36b979c0f08a70846189bda6190f28bbd6d427bc0d9b6e"},{"image":"ghcr.io/github/gh-aw-node","digest":"sha256:bac2192f6374d6262116399b34fc5e143d576f82719e90a18261cae7480f4d4e","pinned_image":"ghcr.io/github/gh-aw-node@sha256:bac2192f6374d6262116399b34fc5e143d576f82719e90a18261cae7480f4d4e"},{"image":"ghcr.io/github/github-mcp-server:v1.11.0","digest":"sha256:fbec75de11c255213fa08d80fb166abe73d851fff631c51c0079872967720699","pinned_image":"ghcr.io/github/github-mcp-server:v1.11.0@sha256:fbec75de11c255213fa08d80fb166abe73d851fff631c51c0079872967720699"}],"has_pull_request":true,"mcp_servers":[{"name":"github","tools":["get_commit","get_file_contents","get_latest_release","get_me","get_pull_request","get_pull_request_comments","get_pull_request_diff","get_pull_request_files","get_pull_request_review_comments","get_pull_request_reviews","get_pull_request_status","get_release_by_tag","get_tag","issue_read","list_branches","list_commits","list_issue_types","list_issues","list_pull_requests","list_releases","list_starred_repositories","list_tags","pull_request_read","search_code","search_issues","search_pull_requests","search_repositories"]},{"name":"safeoutputs","tools":["add_comment","create_pull_request_review_comment","missing_data","missing_tool","noop"]}]}
-# This file was automatically generated by gh-aw (v0.88.2). DO NOT EDIT. To debug this workflow, load the skill at https://github.com/github/gh-aw/blob/main/debug.md
-#
-# ___ _ _
-# / _ \ | | (_)
-# | |_| | __ _ ___ _ __ | |_ _ ___
-# | _ |/ _` |/ _ \ '_ \| __| |/ __|
-# | | | | (_| | __/ | | | |_| | (__
-# \_| |_/\__, |\___|_| |_|\__|_|\___|
-# __/ |
-# _ _ |___/
-# | | | | / _| |
-# | | | | ___ _ __ _ __| |_| | _____ ____
-# | |/\| |/ _ \ '__| |/ /| _| |/ _ \ \ /\ / / ___|
-# \ /\ / (_) | | | | ( | | | | (_) \ V V /\__ \
-# \/ \/ \___/|_| |_|\_\|_| |_|\___/ \_/\_/ |___/
-#
-#
-# To update this file, edit the corresponding .md file and run:
-# gh aw compile
-# Not all edits will cause changes to this file.
-#
-# For more information: https://github.github.com/gh-aw/introduction/overview/
-#
-# Reviews PRs to ensure features are implemented consistently across all SDK language implementations
-#
-# Secrets used:
-# - GH_AW_DEFAULT_OTLP_HEADERS
-# - GH_AW_GITHUB_MCP_SERVER_TOKEN
-# - GH_AW_GITHUB_TOKEN
-# - GITHUB_TOKEN
-#
-# Custom actions used:
-# - actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
-# - actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
-# - actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
-# - actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
-# - actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9
-# - actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
-# - actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
-# - github/gh-aw-actions/setup@9271a1804551c0dc4fb0085a97979950aa2f8489 # v0.88.2
-#
-# Container images used:
-# - ghcr.io/github/gh-aw-firewall/agent:0.28.12@sha256:390051be4ed1847f774fd8980b61d3a3523574c0175d00c3fc7cdf2002a88202
-# - ghcr.io/github/gh-aw-firewall/api-proxy:0.28.12@sha256:d7d533d87c80d87ff91ac0e21e9299055c3beedff1536262b97ed700fb065a32
-# - ghcr.io/github/gh-aw-firewall/squid:0.28.12@sha256:52c34aca98d2a6833c329f1505912a6949c4fda16618c010c979bd59ea99254f
-# - ghcr.io/github/gh-aw-mcpg:v0.4.15@sha256:60cd97533e93d8e7be36b979c0f08a70846189bda6190f28bbd6d427bc0d9b6e
-# - ghcr.io/github/gh-aw-node@sha256:bac2192f6374d6262116399b34fc5e143d576f82719e90a18261cae7480f4d4e
-# - ghcr.io/github/github-mcp-server:v1.11.0@sha256:fbec75de11c255213fa08d80fb166abe73d851fff631c51c0079872967720699
-
-name: "SDK Consistency Review Agent"
-on:
- pull_request:
- paths:
- - nodejs/**
- - python/**
- - go/**
- - dotnet/**
- - java/**
- - rust/**
- - "!java/docs/**"
- - "!java/*.txt"
- - "!java/*.md"
- types:
- - opened
- - synchronize
- - reopened
- - ready_for_review
- # roles: all # Roles processed as role check in pre-activation job
- workflow_dispatch:
- inputs:
- aw_context:
- default: ""
- description: "Agent caller context (used internally by Agentic Workflows)."
- required: false
- type: string
- pr_number:
- description: PR number to review
- required: true
- type: string
-
-permissions: {}
-
-concurrency:
- group: "gh-aw-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref || github.run_id }}"
- cancel-in-progress: true
-
-run-name: "SDK Consistency Review Agent"
-
-env:
- OTEL_EXPORTER_OTLP_ENDPOINT: ${{ vars.GH_AW_DEFAULT_OTLP_ENDPOINT }}
- OTEL_SERVICE_NAME: gh-aw.sdk-consistency-review
- OTEL_RESOURCE_ATTRIBUTES: 'gh-aw.workflow.name=SDK%20Consistency%20Review%20Agent,gh-aw.repository=${{ github.repository }},gh-aw.run.id=${{ github.run_id }},github.run_id=${{ github.run_id }},gh-aw.engine.id=copilot'
- OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_DEFAULT_OTLP_HEADERS }}
- GH_AW_OTLP_ENDPOINTS: '[{"url":"${{ vars.GH_AW_DEFAULT_OTLP_ENDPOINT }}","headers":"${{ secrets.GH_AW_DEFAULT_OTLP_HEADERS }}"}]'
- GH_AW_OTLP_IF_MISSING: ignore
-
-jobs:
- activation:
- if: >
- (github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id) &&
- ((github.event_name != 'pull_request' && github.event_name != 'pull_request_review') || github.event.pull_request.stack == null ||
- github.event.pull_request.stack.position == github.event.pull_request.stack.size)
- runs-on: ubuntu-slim
- permissions:
- actions: read
- contents: read
- env:
- GH_AW_MAX_DAILY_AI_CREDITS: ${{ vars.GH_AW_DEFAULT_MAX_DAILY_AI_CREDITS || '5000' }}
- GH_AW_RUNTIME_FEATURES: ${{ vars.GH_AW_RUNTIME_FEATURES }}
- outputs:
- body: ${{ steps.sanitized.outputs.body }}
- comment_id: ""
- comment_repo: ""
- daily_ai_credits_exceeded: ${{ steps.daily-effective-workflow-guardrail.outputs.daily_ai_credits_exceeded == 'true' }}
- daily_ai_credits_guardrail_status: ${{ steps.daily-effective-workflow-guardrail.outputs.daily_ai_credits_guardrail_status || '' }}
- daily_ai_credits_threshold: ${{ steps.daily-effective-workflow-guardrail.outputs.daily_ai_credits_threshold || '' }}
- daily_ai_credits_total_effective_tokens: ${{ steps.daily-effective-workflow-guardrail.outputs.daily_ai_credits_total_effective_tokens || '' }}
- engine_id: ${{ steps.generate_aw_info.outputs.engine_id }}
- lockdown_check_failed: ${{ steps.generate_aw_info.outputs.lockdown_check_failed == 'true' }}
- model: ${{ steps.generate_aw_info.outputs.model }}
- oauth_token_check_failed: ${{ steps.check-oauth-tokens.outputs.oauth_token_check_failed == 'true' }}
- setup-parent-span-id: ${{ steps.setup.outputs.parent-span-id || steps.setup.outputs.span-id }}
- setup-span-id: ${{ steps.setup.outputs.span-id }}
- setup-trace-id: ${{ steps.setup.outputs.trace-id }}
- stale_lock_file_failed: ${{ steps.check-lock-file.outputs.stale_lock_file_failed == 'true' }}
- text: ${{ steps.sanitized.outputs.text }}
- title: ${{ steps.sanitized.outputs.title }}
- steps:
- - name: Setup Scripts
- id: setup
- uses: github/gh-aw-actions/setup@9271a1804551c0dc4fb0085a97979950aa2f8489 # v0.88.2
- with:
- destination: ${{ runner.temp }}/gh-aw/actions
- job-name: ${{ github.job }}
- safe-output-artifact-client: ${{ env.GH_AW_MAX_DAILY_AI_CREDITS != '' }}
- env:
- GH_AW_SETUP_WORKFLOW_NAME: "SDK Consistency Review Agent"
- GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/sdk-consistency-review.lock.yml@${{ github.ref }}
- GH_AW_INFO_VERSION: "1.0.80"
- GH_AW_INFO_AWF_VERSION: "v0.28.12"
- GH_AW_INFO_ENGINE_ID: "copilot"
- - name: Mask OTLP telemetry headers
- run: bash "${RUNNER_TEMP}/gh-aw/actions/mask_otlp_headers.sh"
- - name: Generate agentic run info
- id: generate_aw_info
- env:
- GH_AW_INFO_ENGINE_ID: "copilot"
- GH_AW_INFO_ENGINE_NAME: "GitHub Copilot CLI"
- GH_AW_INFO_MODEL: "${{ vars.GH_AW_MODEL_AGENT_COPILOT || vars.GH_AW_DEFAULT_MODEL_COPILOT || 'claude-sonnet-5' }}"
- GH_AW_INFO_VERSION: "1.0.80"
- GH_AW_INFO_AGENT_VERSION: "1.0.80"
- GH_AW_INFO_CLI_VERSION: "v0.88.2"
- GH_AW_INFO_WORKFLOW_NAME: "SDK Consistency Review Agent"
- GH_AW_INFO_EXPERIMENTAL: "false"
- GH_AW_INFO_SUPPORTS_TOOLS_ALLOWLIST: "true"
- GH_AW_INFO_STAGED: "false"
- GH_AW_INFO_ALLOWED_DOMAINS: '["defaults"]'
- GH_AW_INFO_FIREWALL_ENABLED: "true"
- GH_AW_INFO_AWF_VERSION: "v0.28.12"
- GH_AW_INFO_AWMG_VERSION: ""
- GH_AW_INFO_FIREWALL_TYPE: "squid"
- GH_AW_INFO_AGENT_RUNTIME: ""
- GH_AW_COMPILED_STRICT: "true"
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
- with:
- script: |
- const path = require('path');
- const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
- const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
- setupGlobals(core, github, context, exec, io, getOctokit);
- const { main } = require(path.join(actionsDir, 'generate_aw_info.cjs'));
- await main(core, context);
- - name: Restore daily AIC usage cache
- id: restore-daily-aic-cache
- if: ${{ env.GH_AW_MAX_DAILY_AI_CREDITS != '' }}
- continue-on-error: true
- uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
- with:
- key: agentic-workflow-usage-sdkconsistencyreview-${{ github.run_id }}
- restore-keys: agentic-workflow-usage-sdkconsistencyreview-
- path: /tmp/gh-aw/agentic-workflow-usage-cache.jsonl
- - name: Restore daily AIC usage cache (artifact fallback)
- id: restore-daily-aic-cache-fallback
- if: ${{ env.GH_AW_MAX_DAILY_AI_CREDITS != '' }}
- continue-on-error: true
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
- env:
- GH_AW_RESTORE_DAILY_AIC_CACHE_HIT: ${{ steps.restore-daily-aic-cache.outputs.cache-hit }}
- GH_AW_RESTORE_DAILY_AIC_CACHE_MATCHED_KEY: ${{ steps.restore-daily-aic-cache.outputs.cache-matched-key }}
- with:
- github-token: ${{ secrets.GITHUB_TOKEN }}
- script: |
- const path = require('path');
- const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
- const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
- setupGlobals(core, github, context, exec, io, getOctokit);
- const { main } = require(path.join(actionsDir, 'restore_aic_usage_cache_fallback.cjs'));
- await main();
- - name: Check daily workflow token guardrail
- id: daily-effective-workflow-guardrail
- if: ${{ env.GH_AW_MAX_DAILY_AI_CREDITS != '' }}
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
- env:
- GH_AW_WORKFLOW_NAME: "SDK Consistency Review Agent"
- GH_AW_WORKFLOW_ID: "sdk-consistency-review"
- GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
- GH_AW_WORKFLOW_DISPATCH_AW_CONTEXT: ${{ github.event.inputs.aw_context || '' }}
- GH_AW_HAS_SLASH_COMMAND: "false"
- GH_AW_HAS_LABEL_COMMAND: "false"
- GH_AW_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- GH_AW_MAX_DAILY_AI_CREDITS: ${{ vars.GH_AW_DEFAULT_MAX_DAILY_AI_CREDITS || '5000' }}
- with:
- github-token: ${{ secrets.GITHUB_TOKEN }}
- script: |
- const path = require('path');
- const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
- const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
- setupGlobals(core, github, context, exec, io, getOctokit);
- const { main } = require(path.join(actionsDir, 'check_daily_aic_workflow_guardrail.cjs'));
- await main();
- - name: Check for OAuth tokens
- id: check-oauth-tokens
- run: bash "${RUNNER_TEMP}/gh-aw/actions/check_oauth_tokens.sh"
- env:
- GH_AW_GITHUB_TOKEN: ${{ secrets.GH_AW_GITHUB_TOKEN }}
- GH_AW_GITHUB_MCP_SERVER_TOKEN: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN }}
- - name: Checkout .github and .agents folders
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- with:
- persist-credentials: false
- sparse-checkout: |
- .github
- .agents
- .claude
- .codex
- .gemini
- .pi
- sparse-checkout-cone-mode: true
- fetch-depth: 1
- - name: Save agent config folders for base branch restoration
- env:
- GH_AW_AGENT_FOLDERS: ".agents .github"
- GH_AW_AGENT_FILES: "AGENTS.md"
- run: |
- bash "${RUNNER_TEMP}/gh-aw/actions/save_base_github_folders.sh"
- - name: Check workflow lock file
- id: check-lock-file
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
- env:
- GH_AW_WORKFLOW_FILE: "sdk-consistency-review.lock.yml"
- GH_AW_CONTEXT_WORKFLOW_REF: "${{ github.workflow_ref }}"
- with:
- script: |
- const path = require('path');
- const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
- const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
- setupGlobals(core, github, context, exec, io, getOctokit);
- const { main } = require(path.join(actionsDir, 'check_workflow_timestamp_api.cjs'));
- await main();
- - name: Check compile-agentic version
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
- env:
- GH_AW_COMPILED_VERSION: "v0.88.2"
- with:
- script: |
- const path = require('path');
- const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
- const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
- setupGlobals(core, github, context, exec, io, getOctokit);
- const { main } = require(path.join(actionsDir, 'check_version_updates.cjs'));
- await main();
- - name: Compute current body text
- id: sanitized
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
- env:
- GH_AW_ALLOWED_DOMAINS: "api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,s.symcb.com,s.symcd.com,security.ubuntu.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com"
- with:
- script: |
- const path = require('path');
- const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
- const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
- setupGlobals(core, github, context, exec, io, getOctokit);
- const { main } = require(path.join(actionsDir, 'compute_text.cjs'));
- await main();
- - name: Log runtime features
- if: ${{ contains(toJSON(vars), '"GH_AW_RUNTIME_FEATURES":') }}
- run: bash "${RUNNER_TEMP}/gh-aw/actions/log_runtime_features_summary.sh"
- - name: Create prompt with built-in context
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
- env:
- GH_AW_ACTIONS_DIR: ${{ runner.temp }}/gh-aw/actions
- GH_AW_PROMPT: ${{ runner.temp }}/gh-aw/aw-prompts/prompt.txt
- GH_AW_SAFE_OUTPUTS: ${{ runner.temp }}/gh-aw/safeoutputs/outputs.jsonl
- GH_AW_PROMPT_CONFIG: "{\"items\":[{\"content_env\":\"GH_AW_PROMPT_CONTENT_0000\"},{\"file\":\"xpia.md\"},{\"file\":\"temp_folder_prompt.md\"},{\"file\":\"markdown.md\"},{\"file\":\"safe_outputs_prompt.md\"},{\"content_env\":\"GH_AW_PROMPT_CONTENT_0001\"},{\"content_env\":\"GH_AW_PROMPT_CONTENT_0002\"},{\"file\":\"mcp_cli_tools_with_safeoutputs_prompt.md\"},{\"content_env\":\"GH_AW_PROMPT_CONTENT_0003\"},{\"file\":\"github_mcp_tools_with_safeoutputs_prompt.md\"},{\"content_env\":\"GH_AW_PROMPT_CONTENT_0004\"},{\"content_env\":\"GH_AW_PROMPT_CONTENT_0005\"}]}"
- GH_AW_EXPR_1A3A194A: ${{ github.event.discussion.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'discussion' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }}
- GH_AW_EXPR_463A214A: ${{ github.event.pull_request.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'pull_request' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }}
- GH_AW_EXPR_802A9F6A: ${{ github.event.issue.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'issue' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }}
- GH_AW_EXPR_A0E5D436: ${{ github.event.pull_request.number || inputs.pr_number }}
- GH_AW_EXPR_FF1D34CE: ${{ github.event.comment.id || fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').comment_id }}
- GH_AW_GITHUB_ACTOR: ${{ github.actor }}
- GH_AW_GITHUB_REPOSITORY: ${{ github.repository }}
- GH_AW_GITHUB_RUN_ID: ${{ github.run_id }}
- GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
- GH_AW_INPUTS_PR_NUMBER: ${{ inputs.pr_number }}
- GH_AW_PROMPT_CONTENT_0000: "\n"
- GH_AW_PROMPT_CONTENT_0001: "\nTools: add_comment, create_pull_request_review_comment(max:10), missing_tool, missing_data, noop\n"
- GH_AW_PROMPT_CONTENT_0002: "\n"
- GH_AW_PROMPT_CONTENT_0003: "\nThe following GitHub context information is available for this workflow:\n{{#if github.actor}}\n- **actor**: __GH_AW_GITHUB_ACTOR__\n{{/if}}\n{{#if github.repository}}\n- **repository**: __GH_AW_GITHUB_REPOSITORY__\n{{/if}}\n{{#if github.workspace}}\n- **workspace**: __GH_AW_GITHUB_WORKSPACE__\n{{/if}}\n{{#if github.event.issue.number || (github.aw.context.item_type == 'issue' && github.aw.context.item_number)}}\n- **issue-number**: #__GH_AW_EXPR_802A9F6A__\n{{/if}}\n{{#if github.event.discussion.number || (github.aw.context.item_type == 'discussion' && github.aw.context.item_number)}}\n- **discussion-number**: #__GH_AW_EXPR_1A3A194A__\n{{/if}}\n{{#if github.event.pull_request.number || (github.aw.context.item_type == 'pull_request' && github.aw.context.item_number)}}\n- **pull-request-number**: #__GH_AW_EXPR_463A214A__\n{{/if}}\n{{#if github.event.comment.id || github.aw.context.comment_id}}\n- **comment-id**: __GH_AW_EXPR_FF1D34CE__\n{{/if}}\n{{#if github.run_id}}\n- **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__\n{{/if}}\n\n\n"
- GH_AW_PROMPT_CONTENT_0004: "\n"
- GH_AW_PROMPT_CONTENT_0005: "{{#runtime-import .github/workflows/sdk-consistency-review.md}}\n"
- with:
- script: |
- const { setupGlobals } = require(process.env.GH_AW_ACTIONS_DIR + '/setup_globals.cjs');
- setupGlobals(core, github, context, exec, io, getOctokit);
- const { main } = require(process.env.GH_AW_ACTIONS_DIR + '/create_prompt.cjs');
- await main(core);
- - name: Interpolate variables and render templates
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
- env:
- GH_AW_PROMPT: ${{ runner.temp }}/gh-aw/aw-prompts/prompt.txt
- GH_AW_ENGINE_ID: "copilot"
- GH_AW_EXPR_A0E5D436: ${{ github.event.pull_request.number || inputs.pr_number }}
- GH_AW_GITHUB_REPOSITORY: ${{ github.repository }}
- GH_AW_INPUTS_PR_NUMBER: ${{ inputs.pr_number }}
- with:
- script: |
- const path = require('path');
- const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
- const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
- setupGlobals(core, github, context, exec, io, getOctokit);
- const { main } = require(path.join(actionsDir, 'interpolate_prompt.cjs'));
- await main();
- - name: Substitute placeholders
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
- env:
- GH_AW_PROMPT: ${{ runner.temp }}/gh-aw/aw-prompts/prompt.txt
- GH_AW_EXPR_1A3A194A: ${{ github.event.discussion.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'discussion' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }}
- GH_AW_EXPR_463A214A: ${{ github.event.pull_request.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'pull_request' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }}
- GH_AW_EXPR_802A9F6A: ${{ github.event.issue.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'issue' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }}
- GH_AW_EXPR_A0E5D436: ${{ github.event.pull_request.number || inputs.pr_number }}
- GH_AW_EXPR_FF1D34CE: ${{ github.event.comment.id || fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').comment_id }}
- GH_AW_GITHUB_ACTOR: ${{ github.actor }}
- GH_AW_GITHUB_REPOSITORY: ${{ github.repository }}
- GH_AW_GITHUB_RUN_ID: ${{ github.run_id }}
- GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }}
- GH_AW_INPUTS_PR_NUMBER: ${{ inputs.pr_number }}
- GH_AW_MCP_CLI_SERVERS_LIST: "- `github` — run `github --help` to see available tools\n- `safeoutputs` — run `safeoutputs --help` to see available tools"
- with:
- script: |
- const path = require('path');
- const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
- const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
- setupGlobals(core, github, context, exec, io, getOctokit);
-
- const substitutePlaceholders = require(path.join(actionsDir, 'substitute_placeholders.cjs'));
-
- // Call the substitution function
- return await substitutePlaceholders({
- file: process.env.GH_AW_PROMPT,
- substitutions: {
- GH_AW_EXPR_1A3A194A: process.env.GH_AW_EXPR_1A3A194A,
- GH_AW_EXPR_463A214A: process.env.GH_AW_EXPR_463A214A,
- GH_AW_EXPR_802A9F6A: process.env.GH_AW_EXPR_802A9F6A,
- GH_AW_EXPR_A0E5D436: process.env.GH_AW_EXPR_A0E5D436,
- GH_AW_EXPR_FF1D34CE: process.env.GH_AW_EXPR_FF1D34CE,
- GH_AW_GITHUB_ACTOR: process.env.GH_AW_GITHUB_ACTOR,
- GH_AW_GITHUB_REPOSITORY: process.env.GH_AW_GITHUB_REPOSITORY,
- GH_AW_GITHUB_RUN_ID: process.env.GH_AW_GITHUB_RUN_ID,
- GH_AW_GITHUB_WORKSPACE: process.env.GH_AW_GITHUB_WORKSPACE,
- GH_AW_INPUTS_PR_NUMBER: process.env.GH_AW_INPUTS_PR_NUMBER,
- GH_AW_MCP_CLI_SERVERS_LIST: process.env.GH_AW_MCP_CLI_SERVERS_LIST
- }
- });
- - name: Validate prompt placeholders
- env:
- GH_AW_PROMPT: ${{ runner.temp }}/gh-aw/aw-prompts/prompt.txt
- run: |
- bash "${RUNNER_TEMP}/gh-aw/actions/validate_prompt_placeholders.sh"
- - name: Print prompt
- env:
- GH_AW_PROMPT: ${{ runner.temp }}/gh-aw/aw-prompts/prompt.txt
- run: |
- bash "${RUNNER_TEMP}/gh-aw/actions/print_prompt_summary.sh"
- - name: Stage prompt files for artifact upload
- run: |
- mkdir -p /tmp/gh-aw/aw-prompts
- cp -a "${RUNNER_TEMP}/gh-aw/aw-prompts/." /tmp/gh-aw/aw-prompts/
- - name: Upload activation artifact
- if: success() || failure()
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
- with:
- name: activation
- include-hidden-files: true
- path: |
- /tmp/gh-aw/aw_info.json
- /tmp/gh-aw/models.json
- /tmp/gh-aw/aw-prompts/prompt.txt
- /tmp/gh-aw/aw-prompts/prompt-template.txt
- /tmp/gh-aw/aw-prompts/prompt-import-tree.json
- /tmp/gh-aw/github_rate_limits.jsonl
- /tmp/gh-aw/base
- /tmp/gh-aw/.github/agents
- /tmp/gh-aw/.github/skills
- if-no-files-found: ignore
- retention-days: 1
-
- agent:
- needs: activation
- if: needs.activation.outputs.daily_ai_credits_exceeded != 'true'
- runs-on: ubuntu-latest
- permissions:
- contents: read
- copilot-requests: write
- issues: read
- pull-requests: read
- timeout-minutes: 60
- env:
- DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
- GH_AW_ASSETS_ALLOWED_EXTS: ""
- GH_AW_ASSETS_BRANCH: ""
- GH_AW_ASSETS_MAX_SIZE_KB: 0
- GH_AW_MCP_LOG_DIR: /tmp/gh-aw/mcp-logs/safeoutputs
- GH_AW_PR_HEAD_BASE_BRANCH: ""
- GH_AW_PR_HEAD_BASE_PR_NUMBER: ""
- GH_AW_PR_HEAD_BASE_REF: ""
- GH_AW_PR_HEAD_BASE_REPO: ""
- GH_AW_PR_HEAD_BASE_SHA: ""
- GH_AW_PR_HEAD_REPO: ""
- GH_AW_RUNTIME_FEATURES: ${{ vars.GH_AW_RUNTIME_FEATURES }}
- GH_AW_WORKFLOW_ID_SANITIZED: sdkconsistencyreview
- outputs:
- agentic_engine_timeout: ${{ steps.detect-agent-errors.outputs.agentic_engine_timeout || 'false' }}
- ai_credits_rate_limit_error: ${{ steps.parse-mcp-gateway.outputs.ai_credits_rate_limit_error || 'false' }}
- aic: ${{ steps.parse-mcp-gateway.outputs.aic }}
- ambient_context: ${{ steps.parse-mcp-gateway.outputs.ambient_context }}
- checkout_pr_success: ${{ steps.checkout-pr.outputs.checkout_pr_success || 'true' }}
- effective_tokens: ${{ steps.parse-mcp-gateway.outputs.effective_tokens }}
- has_patch: ${{ steps.collect_output.outputs.has_patch }}
- http_400_response_error: ${{ steps.detect-agent-errors.outputs.http_400_response_error || 'false' }}
- inference_access_error: ${{ steps.detect-agent-errors.outputs.inference_access_error || 'false' }}
- invocation_cap_exceeded: ${{ steps.detect-agent-errors.outputs.invocation_cap_exceeded || 'false' }}
- max_cache_misses_exceeded: ${{ steps.detect-agent-errors.outputs.max_cache_misses_exceeded || 'false' }}
- mcp_policy_error: ${{ steps.detect-agent-errors.outputs.mcp_policy_error || 'false' }}
- missing_model_pricing_error: ${{ steps.detect-agent-errors.outputs.missing_model_pricing_error || 'false' }}
- missing_model_pricing_model_name: ${{ steps.detect-agent-errors.outputs.missing_model_pricing_model_name || '' }}
- model: ${{ needs.activation.outputs.model }}
- model_not_supported_error: ${{ steps.detect-agent-errors.outputs.model_not_supported_error || 'false' }}
- output: ${{ steps.collect_output.outputs.output }}
- output_types: ${{ steps.collect_output.outputs.output_types }}
- setup-parent-span-id: ${{ steps.setup.outputs.parent-span-id || steps.setup.outputs.span-id }}
- setup-span-id: ${{ steps.setup.outputs.span-id }}
- setup-trace-id: ${{ steps.setup.outputs.trace-id }}
- shell_expansion_guard_rejected: ${{ steps.detect-agent-errors.outputs.shell_expansion_guard_rejected || 'false' }}
- unknown_model_ai_credits: ${{ steps.parse-mcp-gateway.outputs.unknown_model_ai_credits || 'false' }}
- steps:
- - name: Setup Scripts
- id: setup
- uses: github/gh-aw-actions/setup@9271a1804551c0dc4fb0085a97979950aa2f8489 # v0.88.2
- with:
- destination: ${{ runner.temp }}/gh-aw/actions
- job-name: ${{ github.job }}
- trace-id: ${{ needs.activation.outputs.setup-trace-id }}
- parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }}
- env:
- GH_AW_SETUP_WORKFLOW_NAME: "SDK Consistency Review Agent"
- GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/sdk-consistency-review.lock.yml@${{ github.ref }}
- GH_AW_INFO_VERSION: "1.0.80"
- GH_AW_INFO_AWF_VERSION: "v0.28.12"
- GH_AW_INFO_ENGINE_ID: "copilot"
- - name: Set runtime paths
- id: set-runtime-paths
- env:
- GH_AW_RUNNER_TOOL_CACHE: ${{ runner.tool_cache }}
- run: |
- if [ -z "${RUNNER_TOOL_CACHE:-}" ]; then
- echo "RUNNER_TOOL_CACHE=${GH_AW_RUNNER_TOOL_CACHE}" >> "$GITHUB_ENV"
- fi
- {
- echo "GH_AW_SAFE_OUTPUTS=${RUNNER_TEMP}/gh-aw/safeoutputs/outputs.jsonl"
- echo "GH_AW_SAFE_OUTPUTS_CONFIG_PATH=${RUNNER_TEMP}/gh-aw/safeoutputs/config.json"
- echo "GH_AW_SAFE_OUTPUTS_TOOLS_PATH=${RUNNER_TEMP}/gh-aw/safeoutputs/tools.json"
- } >> "$GITHUB_OUTPUT"
- - name: Mask OTLP telemetry headers
- run: bash "${RUNNER_TEMP}/gh-aw/actions/mask_otlp_headers.sh"
- - name: Check OTLP telemetry configuration
- run: bash "${RUNNER_TEMP}/gh-aw/actions/check_otlp_default_credentials.sh"
- - name: Checkout repository
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- with:
- persist-credentials: false
- - name: Create gh-aw temp directory
- run: bash "${RUNNER_TEMP}/gh-aw/actions/create_gh_aw_tmp_dir.sh"
- - name: Configure gh CLI for GitHub Enterprise
- run: bash "${RUNNER_TEMP}/gh-aw/actions/configure_gh_for_ghe.sh"
- env:
- GH_TOKEN: ${{ github.token }}
- - name: Download activation artifact
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
- with:
- name: activation
- path: /tmp/gh-aw
- - name: Configure Git credentials
- env:
- GITHUB_REPOSITORY: ${{ github.repository }}
- GITHUB_SERVER_URL: ${{ github.server_url }}
- GITHUB_TOKEN: ${{ github.token }}
- run: bash "${RUNNER_TEMP}/gh-aw/actions/configure_git_credentials.sh"
- - name: Checkout PR branch
- id: checkout-pr
- if: |
- github.event.pull_request || github.event.issue.pull_request || github.event_name == 'workflow_dispatch' && fromJSON(github.event.inputs.aw_context || '{}').item_type == 'pull_request'
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
- env:
- GH_TOKEN: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN || secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
- with:
- github-token: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN || secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
- script: |
- const path = require('path');
- const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
- const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
- setupGlobals(core, github, context, exec, io, getOctokit);
- const { main } = require(path.join(actionsDir, 'checkout_pr_branch.cjs'));
- await main();
- - name: Install GitHub Copilot CLI
- run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh"
- env:
- GH_HOST: github.com
- GH_AW_COMPILED_VERSION: v0.88.2
- - name: Install AWF binary
- run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.28.12 --rootless
- - name: Determine automatic lockdown mode for GitHub MCP Server
- id: determine-automatic-lockdown
- uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9
- env:
- GH_AW_GITHUB_TOKEN: ${{ secrets.GH_AW_GITHUB_TOKEN }}
- GH_AW_GITHUB_MCP_SERVER_TOKEN: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN }}
- with:
- script: |
- const path = require('path');
- const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
- const determineAutomaticLockdown = require(path.join(actionsDir, 'determine_automatic_lockdown.cjs'));
- await determineAutomaticLockdown(github, context, core);
- - name: Restore agent config folders from base branch
- if: steps.checkout-pr.outcome == 'success'
- env:
- GH_AW_AGENT_FOLDERS: ".agents .github"
- GH_AW_AGENT_FILES: "AGENTS.md"
- run: bash "${RUNNER_TEMP}/gh-aw/actions/restore_base_github_folders.sh"
- - name: Restore inline sub-agents from activation artifact
- env:
- GH_AW_SUB_AGENT_DIR: ".github/agents"
- GH_AW_SUB_AGENT_EXT: ".agent.md"
- run: bash "${RUNNER_TEMP}/gh-aw/actions/restore_inline_sub_agents.sh"
- - name: Restore inline skills from activation artifact
- env:
- GH_AW_SKILL_DIR: ".github/skills"
- run: bash "${RUNNER_TEMP}/gh-aw/actions/restore_inline_skills.sh"
- - name: Download container images
- run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.28.12@sha256:390051be4ed1847f774fd8980b61d3a3523574c0175d00c3fc7cdf2002a88202 ghcr.io/github/gh-aw-firewall/api-proxy:0.28.12@sha256:d7d533d87c80d87ff91ac0e21e9299055c3beedff1536262b97ed700fb065a32 ghcr.io/github/gh-aw-firewall/squid:0.28.12@sha256:52c34aca98d2a6833c329f1505912a6949c4fda16618c010c979bd59ea99254f ghcr.io/github/gh-aw-mcpg:v0.4.15@sha256:60cd97533e93d8e7be36b979c0f08a70846189bda6190f28bbd6d427bc0d9b6e ghcr.io/github/gh-aw-node@sha256:bac2192f6374d6262116399b34fc5e143d576f82719e90a18261cae7480f4d4e ghcr.io/github/github-mcp-server:v1.11.0@sha256:fbec75de11c255213fa08d80fb166abe73d851fff631c51c0079872967720699
- - name: Prepare Safe Outputs Directories
- run: |
- mkdir -p "${RUNNER_TEMP}/gh-aw/safeoutputs"
- mkdir -p /tmp/gh-aw/safeoutputs
- mkdir -p /tmp/gh-aw/mcp-logs/safeoutputs
- - name: Generate Safe Outputs Config
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
- env:
- GH_AW_FILE_ROOT: "${{ runner.temp }}/gh-aw"
- GH_AW_FILE_CONFIG: "{\"files\":[{\"path\":\"safeoutputs/config.json\",\"content_env\":\"GH_AW_SAFE_OUTPUTS_CONFIG\"}]}"
- GH_AW_SAFE_OUTPUTS_CONFIG: "{\"add_comment\":{\"hide_older_comments\":true,\"max\":1},\"create_pull_request_review_comment\":{\"max\":10,\"side\":\"RIGHT\"},\"create_report_incomplete_issue\":{},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"false\"},\"report_incomplete\":{}}"
- with:
- script: |
- const path = require('path');
- const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
- const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
- setupGlobals(core, github, context, exec, io, getOctokit);
- const { main } = require(path.join(actionsDir, 'create_files.cjs'));
- await main();
- - name: Generate Safe Outputs Tools
- env:
- GH_AW_TOOLS_META_JSON: |
- {
- "description_suffixes": {
- "add_comment": " CONSTRAINTS: Maximum 1 comment(s) can be added. Supports reply_to_id for discussion threading.",
- "create_pull_request_review_comment": " CONSTRAINTS: Maximum 10 review comment(s) can be created. Comments will be on the RIGHT side of the diff."
- },
- "repo_params": {},
- "dynamic_tools": []
- }
- GH_AW_VALIDATION_JSON: |
- {
- "add_comment": {
- "defaultMax": 1,
- "fields": {
- "body": {
- "required": true,
- "type": "string",
- "sanitize": true,
- "maxLength": 65000
- },
- "comment_id": {
- "optionalPositiveInteger": true
- },
- "item_number": {
- "issueOrPRNumber": true
- },
- "pr": {
- "issueOrPRNumber": true
- },
- "pr_number": {
- "issueOrPRNumber": true
- },
- "reply_to_id": {
- "type": "string",
- "maxLength": 256
- },
- "repo": {
- "type": "string",
- "maxLength": 256
- },
- "target": {
- "type": "string",
- "enum": [
- "status"
- ]
- },
- "temporary_id": {
- "type": "string",
- "pattern": "^#?aw_[A-Za-z0-9_]{3,12}$"
- }
- }
- },
- "create_pull_request_review_comment": {
- "defaultMax": 1,
- "fields": {
- "body": {
- "required": true,
- "type": "string",
- "sanitize": true,
- "maxLength": 65000
- },
- "line": {
- "required": true,
- "positiveInteger": true
- },
- "path": {
- "required": true,
- "type": "string"
- },
- "pull_request_number": {
- "optionalPositiveInteger": true
- },
- "repo": {
- "type": "string",
- "maxLength": 256
- },
- "side": {
- "type": "string",
- "enum": [
- "LEFT",
- "RIGHT"
- ]
- },
- "start_line": {
- "optionalPositiveInteger": true
- }
- },
- "customValidation": "startLineLessOrEqualLine"
- },
- "missing_data": {
- "defaultMax": 20,
- "fields": {
- "alternatives": {
- "type": "string",
- "sanitize": true,
- "maxLength": 256
- },
- "context": {
- "type": "string",
- "sanitize": true,
- "maxLength": 256
- },
- "data_type": {
- "type": "string",
- "sanitize": true,
- "maxLength": 128
- },
- "reason": {
- "type": "string",
- "sanitize": true,
- "maxLength": 256
- }
- }
- },
- "missing_tool": {
- "defaultMax": 20,
- "fields": {
- "alternatives": {
- "type": "string",
- "sanitize": true,
- "maxLength": 512
- },
- "reason": {
- "required": true,
- "type": "string",
- "sanitize": true,
- "maxLength": 256
- },
- "tool": {
- "type": "string",
- "sanitize": true,
- "maxLength": 128
- }
- }
- },
- "noop": {
- "defaultMax": 1,
- "fields": {
- "message": {
- "required": true,
- "type": "string",
- "sanitize": true,
- "maxLength": 65000
- }
- }
- },
- "report_incomplete": {
- "defaultMax": 5,
- "fields": {
- "details": {
- "type": "string",
- "sanitize": true,
- "maxLength": 65000
- },
- "reason": {
- "required": true,
- "type": "string",
- "sanitize": true,
- "maxLength": 1024
- }
- }
- }
- }
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
- with:
- script: |
- const path = require('path');
- const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
- const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
- setupGlobals(core, github, context, exec, io, getOctokit);
- const { main } = require(path.join(actionsDir, 'generate_safe_outputs_tools.cjs'));
- await main();
- - name: Start MCP Gateway
- id: start-mcp-gateway
- env:
- GH_AW_POLICY_ALLOW_CREATE_PULL_REQUEST: ${{ vars.GH_AW_POLICY_ALLOW_CREATE_PULL_REQUEST || 'true' }}
- GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }}
- GH_AW_SAFE_OUTPUTS_CONFIG_PATH: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS_CONFIG_PATH }}
- GH_AW_SAFE_OUTPUTS_TOOLS_PATH: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS_TOOLS_PATH }}
- GH_AW_SINK_VISIBILITY: ${{ steps.determine-automatic-lockdown.outputs.visibility }}
- GITHUB_MCP_GUARD_MIN_INTEGRITY: ${{ steps.determine-automatic-lockdown.outputs.min_integrity }}
- GITHUB_MCP_GUARD_REPOS: ${{ steps.determine-automatic-lockdown.outputs.repos }}
- GITHUB_MCP_SERVER_TOKEN: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN || secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: |
- set -eo pipefail
- mkdir -p "${RUNNER_TEMP}/gh-aw/mcp-config"
- if [ -n "${GITHUB_EVENT_PATH:-}" ] && [ -r "${GITHUB_EVENT_PATH}" ]; then
- GH_AW_SAFEOUTPUTS_EVENT_PATH="${RUNNER_TEMP}/gh-aw/safeoutputs/github_event.json"
- cp "${GITHUB_EVENT_PATH}" "${GH_AW_SAFEOUTPUTS_EVENT_PATH}"
- export GITHUB_EVENT_PATH="${GH_AW_SAFEOUTPUTS_EVENT_PATH}"
- fi
-
- # Export gateway environment variables for MCP config and gateway script
- export MCP_GATEWAY_PORT="8080"
- export MCP_GATEWAY_DOMAIN="awmg-mcpg"
- export MCP_GATEWAY_HOST_DOMAIN="localhost"
- MCP_GATEWAY_AGENT_ID=$(openssl rand -base64 45 | tr -d '/+=')
- echo "::add-mask::${MCP_GATEWAY_AGENT_ID}"
- export MCP_GATEWAY_AGENT_ID
- export MCP_GATEWAY_PAYLOAD_DIR="/tmp/gh-aw/mcp-payloads"
- mkdir -p "${MCP_GATEWAY_PAYLOAD_DIR}"
- export MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD="524288"
- export MCP_GATEWAY_ALLOWED_MOUNT_ROOTS="${GITHUB_WORKSPACE}:rw,${RUNNER_TEMP}/gh-aw:ro,${RUNNER_TEMP}/gh-aw/safeoutputs:rw,/opt:ro,/tmp:rw,/usr/bin/gh:ro"
- export GH_AW_PR_HEAD_BASE_BRANCH="${GH_AW_PR_HEAD_BASE_BRANCH:-}"
- export GH_AW_PR_HEAD_BASE_SHA="${GH_AW_PR_HEAD_BASE_SHA:-}"
- export GH_AW_PR_HEAD_BASE_REPO="${GH_AW_PR_HEAD_BASE_REPO:-}"
- export GH_AW_PR_HEAD_BASE_PR_NUMBER="${GH_AW_PR_HEAD_BASE_PR_NUMBER:-}"
- export GH_AW_PR_HEAD_BASE_REF="${GH_AW_PR_HEAD_BASE_REF:-}"
- export GH_AW_PR_HEAD_REPO="${GH_AW_PR_HEAD_REPO:-}"
- export DEBUG="*"
-
- export GH_AW_ENGINE="copilot"
- MCP_GATEWAY_UID=$(id -u 2>/dev/null || echo '0')
- MCP_GATEWAY_GID=$(id -g 2>/dev/null || echo '0')
- source "${RUNNER_TEMP}/gh-aw/actions/resolve_docker_socket_gid.sh"
- export MCP_GATEWAY_DOCKER_COMMAND='docker run -i --rm --network bridge -p 127.0.0.1:'"${MCP_GATEWAY_PORT}"':'"${MCP_GATEWAY_PORT}"' --name awmg-mcpg --add-host host.docker.internal:host-gateway --user '"${MCP_GATEWAY_UID}"':'"${MCP_GATEWAY_GID}"' --group-add '"${DOCKER_SOCK_GID}"' -v '"${DOCKER_SOCK_PATH}"':/var/run/docker.sock -e MCP_GATEWAY_PORT -e MCP_GATEWAY_DOMAIN -e MCP_GATEWAY_AGENT_ID -e MCP_GATEWAY_PAYLOAD_DIR -e MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD -e DOCKER_HOST=unix:///var/run/docker.sock -e DEBUG -e MCP_GATEWAY_LOG_DIR -e GH_AW_MCP_LOG_DIR -e GH_AW_SAFE_OUTPUTS -e GH_AW_SAFE_OUTPUTS_CONFIG_PATH -e GH_AW_SAFE_OUTPUTS_TOOLS_PATH -e GH_AW_PR_HEAD_BASE_BRANCH -e GH_AW_PR_HEAD_BASE_SHA -e GH_AW_PR_HEAD_BASE_REPO -e GH_AW_PR_HEAD_BASE_PR_NUMBER -e GH_AW_PR_HEAD_BASE_REF -e GH_AW_PR_HEAD_REPO -e GH_AW_POLICY_ALLOW_CREATE_PULL_REQUEST -e GH_AW_ASSETS_BRANCH -e GH_AW_ASSETS_MAX_SIZE_KB -e GH_AW_ASSETS_ALLOWED_EXTS -e DEFAULT_BRANCH -e GITHUB_MCP_SERVER_TOKEN -e GITHUB_MCP_GUARD_MIN_INTEGRITY -e GITHUB_MCP_GUARD_REPOS -e GH_AW_SINK_VISIBILITY -e GITHUB_REPOSITORY -e GITHUB_SERVER_URL -e GITHUB_SHA -e GITHUB_WORKSPACE -e GITHUB_TOKEN -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RUN_ATTEMPT -e GITHUB_JOB -e GITHUB_ACTION -e GITHUB_EVENT_NAME -e GITHUB_EVENT_PATH -e GITHUB_ACTOR -e GITHUB_ACTOR_ID -e GITHUB_TRIGGERING_ACTOR -e GITHUB_WORKFLOW -e GITHUB_WORKFLOW_REF -e GITHUB_WORKFLOW_SHA -e GITHUB_REF -e GITHUB_REF_NAME -e GITHUB_REF_TYPE -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e RUNNER_TEMP -e RUNNER_TOOL_CACHE -e MCP_GATEWAY_ALLOWED_MOUNT_ROOTS -e GITHUB_AW_OTEL_TRACE_ID -e GITHUB_AW_OTEL_PARENT_SPAN_ID -e OTEL_EXPORTER_OTLP_HEADERS -v /tmp/gh-aw/mcp-payloads:/tmp/gh-aw/mcp-payloads:rw -v /opt:/opt:ro -v /tmp:/tmp:rw -v '"${GITHUB_WORKSPACE}"':'"${GITHUB_WORKSPACE}"':rw -v '"${RUNNER_TEMP}"'/gh-aw/safeoutputs:'"${RUNNER_TEMP}"'/gh-aw/safeoutputs:rw ghcr.io/github/gh-aw-mcpg:v0.4.15'
-
- mkdir -p "$HOME/.copilot"
- GH_AW_NODE=$(which node 2>/dev/null || command -v node 2>/dev/null || echo node)
- cat << GH_AW_MCP_CONFIG_46604863f3d8e286_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs"
- {
- "mcpServers": {
- "github": {
- "type": "stdio",
- "container": "ghcr.io/github/github-mcp-server:v1.11.0",
- "env": {
- "GITHUB_FEATURES": "fields_param",
- "GITHUB_HOST": "${GITHUB_SERVER_URL}",
- "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_MCP_SERVER_TOKEN}",
- "GITHUB_READ_ONLY": "1",
- "GITHUB_TOOLSETS": "context,repos,issues,pull_requests"
- },
- "guard-policies": {
- "allow-only": {
- "min-integrity": "$GITHUB_MCP_GUARD_MIN_INTEGRITY",
- "repos": "$GITHUB_MCP_GUARD_REPOS"
- }
- }
- },
- "safeoutputs": {
- "type": "stdio",
- "container": "ghcr.io/github/gh-aw-node",
- "mounts": ["\${GITHUB_WORKSPACE}:\${GITHUB_WORKSPACE}:rw", "${RUNNER_TEMP}/gh-aw/safeoutputs:${RUNNER_TEMP}/gh-aw/safeoutputs:rw", "/tmp/gh-aw:/tmp/gh-aw:rw"],
- "args": ["-w", "\${GITHUB_WORKSPACE}"],
- "entrypoint": "sh",
- "entrypointArgs": ["-c", "sh ${RUNNER_TEMP}/gh-aw/safeoutputs/start_safe_outputs_mcp.sh"],
- "env": {
- "DEBUG": "*",
- "DEFAULT_BRANCH": "\${DEFAULT_BRANCH}",
- "GH_AW_ASSETS_ALLOWED_EXTS": "\${GH_AW_ASSETS_ALLOWED_EXTS}",
- "GH_AW_ASSETS_BRANCH": "\${GH_AW_ASSETS_BRANCH}",
- "GH_AW_ASSETS_MAX_SIZE_KB": "\${GH_AW_ASSETS_MAX_SIZE_KB}",
- "GH_AW_MCP_LOG_DIR": "\${GH_AW_MCP_LOG_DIR}",
- "GH_AW_SAFE_OUTPUTS": "\${GH_AW_SAFE_OUTPUTS}",
- "GH_AW_SAFE_OUTPUTS_CONFIG_PATH": "\${GH_AW_SAFE_OUTPUTS_CONFIG_PATH}",
- "GH_AW_SAFE_OUTPUTS_TOOLS_PATH": "\${GH_AW_SAFE_OUTPUTS_TOOLS_PATH}",
- "GH_AW_POLICY_ALLOW_CREATE_PULL_REQUEST": "\${GH_AW_POLICY_ALLOW_CREATE_PULL_REQUEST}",
- "GH_AW_PR_HEAD_BASE_BRANCH": "\${GH_AW_PR_HEAD_BASE_BRANCH}",
- "GH_AW_PR_HEAD_BASE_SHA": "\${GH_AW_PR_HEAD_BASE_SHA}",
- "GH_AW_PR_HEAD_BASE_REPO": "\${GH_AW_PR_HEAD_BASE_REPO}",
- "GH_AW_PR_HEAD_BASE_PR_NUMBER": "\${GH_AW_PR_HEAD_BASE_PR_NUMBER}",
- "GH_AW_PR_HEAD_BASE_REF": "\${GH_AW_PR_HEAD_BASE_REF}",
- "GH_AW_PR_HEAD_REPO": "\${GH_AW_PR_HEAD_REPO}",
- "GITHUB_EVENT_NAME": "\${GITHUB_EVENT_NAME}",
- "GITHUB_EVENT_PATH": "\${GITHUB_EVENT_PATH}",
- "GITHUB_REPOSITORY": "\${GITHUB_REPOSITORY}",
- "GITHUB_SHA": "\${GITHUB_SHA}",
- "GITHUB_TOKEN": "\${GITHUB_TOKEN}",
- "GITHUB_WORKSPACE": "\${GITHUB_WORKSPACE}",
- "RUNNER_TEMP": "\${RUNNER_TEMP}"
- },
- "guard-policies": {
- "write-sink": {
- "accept": [
- "*"
- ],
- "sink-visibility": "${GH_AW_SINK_VISIBILITY}"
- }
- }
- }
- },
- "gateway": {
- "port": $MCP_GATEWAY_PORT,
- "domain": "${MCP_GATEWAY_DOMAIN}",
- "agentId": "${MCP_GATEWAY_AGENT_ID}",
- "payloadDir": "${MCP_GATEWAY_PAYLOAD_DIR}",
- "startupTimeout": 120,
- "opentelemetry": {
- "endpoint": "${OTEL_EXPORTER_OTLP_ENDPOINT}",
- "traceId": "${GITHUB_AW_OTEL_TRACE_ID}",
- "spanId": "${GITHUB_AW_OTEL_PARENT_SPAN_ID}"
- }
- }
- }
- GH_AW_MCP_CONFIG_46604863f3d8e286_EOF
- - name: Mount MCP servers as CLIs
- id: mount-mcp-clis
- continue-on-error: true
- env:
- MCP_GATEWAY_AGENT_ID: ${{ steps.start-mcp-gateway.outputs.gateway-agent-id }}
- MCP_GATEWAY_DOMAIN: ${{ steps.start-mcp-gateway.outputs.gateway-domain }}
- MCP_GATEWAY_PORT: ${{ steps.start-mcp-gateway.outputs.gateway-port }}
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
- with:
- script: |
- const path = require('path');
- const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
- const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
- setupGlobals(core, github, context, exec, io);
- const { main } = require(path.join(actionsDir, 'mount_mcp_as_cli.cjs'));
- await main();
- - name: Clean credentials
- continue-on-error: true
- run: bash "${RUNNER_TEMP}/gh-aw/actions/clean_git_credentials.sh"
- - name: Audit pre-agent workspace
- id: pre_agent_audit
- continue-on-error: true
- run: bash "${RUNNER_TEMP}/gh-aw/actions/audit_pre_agent_workspace.sh"
- - name: Execute GitHub Copilot CLI
- id: agentic_execution
- # Copilot CLI tool arguments (sorted):
- timeout-minutes: 15
- run: |
- set -o pipefail
- printf '%s' "$(date +%s%3N)" > /tmp/gh-aw/agent_cli_start_ms.txt
- trap 'gh_aw_exit_code=$?; mkdir -p /tmp/gh-aw >/dev/null 2>&1 || true; printf "%s" "$gh_aw_exit_code" > /tmp/gh-aw/agent_execution_exit_code.txt || true; rm -f "$HOME/.copilot/settings.json"; if [ "$gh_aw_exit_code" -ne 0 ]; then echo "::error::Agent execution exited with code $gh_aw_exit_code"; fi' EXIT
- mkdir -p "$HOME/.copilot"
- printf '%s' '{"builtInAgents":{"rubberDuck":false}}' > "$HOME/.copilot/settings.json"
- export XDG_CONFIG_HOME="$HOME"
- export GH_AW_MCP_CONFIG="$HOME/.copilot/mcp-config.json"
- GH_AW_COPILOT_SRC="$(command -v copilot 2>/dev/null || true)"
- if [ -z "$GH_AW_COPILOT_SRC" ] || [ ! -x "$GH_AW_COPILOT_SRC" ]; then
- echo "GitHub Copilot CLI executable not found on PATH after installation" >&2
- exit 127
- fi
- GH_AW_COPILOT_BIN="${RUNNER_TEMP}/gh-aw/bin/copilot"
- mkdir -p "${RUNNER_TEMP}/gh-aw/bin"
- if [ "$GH_AW_COPILOT_SRC" != "$GH_AW_COPILOT_BIN" ]; then
- cp "$GH_AW_COPILOT_SRC" "$GH_AW_COPILOT_BIN"
- fi
- chmod 755 "$GH_AW_COPILOT_BIN"
-
- touch /tmp/gh-aw/agent-step-summary.md
- GH_AW_NODE_BIN=$(command -v node 2>/dev/null || true)
- export GH_AW_NODE_BIN
- export COPILOT_API_KEY="$COPILOT_DUMMY_BYOK"
- (umask 177 && touch /tmp/gh-aw/agent-stdio.log)
- GH_AW_MAX_AI_CREDITS="${GH_AW_MAX_AI_CREDITS:-1000}"
- if [[ ! "$GH_AW_MAX_AI_CREDITS" =~ ^[0-9]+$ ]]; then
- GH_AW_MAX_AI_CREDITS="1000"
- fi
- printf '%s\n' "{\"\$schema\":\"https://github.com/github/gh-aw-firewall/releases/download/v0.28.12/awf-config.schema.json\",\"network\":{\"allowDomains\":[\"api.snapcraft.io\",\"archive.ubuntu.com\",\"azure.archive.ubuntu.com\",\"crl.geotrust.com\",\"crl.globalsign.com\",\"crl.identrust.com\",\"crl.sectigo.com\",\"crl.thawte.com\",\"crl.usertrust.com\",\"crl.verisign.com\",\"crl3.digicert.com\",\"crl4.digicert.com\",\"crls.ssl.com\",\"json-schema.org\",\"json.schemastore.org\",\"keyserver.ubuntu.com\",\"ocsp.digicert.com\",\"ocsp.geotrust.com\",\"ocsp.globalsign.com\",\"ocsp.identrust.com\",\"ocsp.sectigo.com\",\"ocsp.ssl.com\",\"ocsp.thawte.com\",\"ocsp.usertrust.com\",\"ocsp.verisign.com\",\"packagecloud.io\",\"packages.cloud.google.com\",\"packages.microsoft.com\",\"ppa.launchpad.net\",\"s.symcb.com\",\"s.symcd.com\",\"security.ubuntu.com\",\"ts-crl.ws.symantec.com\",\"ts-ocsp.ws.symantec.com\",\"www.googleapis.com\"],\"isolation\":true,\"topologyAttach\":[\"awmg-mcpg\"]},\"apiProxy\":{\"enabled\":true,\"enableTokenSteering\":true,\"maxRuns\":500,\"maxAiCredits\":${GH_AW_MAX_AI_CREDITS},\"maxCacheMisses\":5,\"models\":{\"agent\":[\"sonnet-6x\",\"gpt-5.4\",\"gpt-5.5\",\"gpt-5.6\",\"gpt-5.3\",\"gemini-pro\",\"any\"],\"antigravity\":[\"copilot/antigravity*\",\"google/antigravity*\",\"gemini/antigravity*\"],\"any\":[\"copilot/*\",\"anthropic/*\",\"openai/*\",\"google/*\",\"gemini/*\"],\"auto\":[\"copilot/auto\",\"large\"],\"claude\":[\"agent\"],\"codex\":[\"agent\"],\"coding\":[\"copilot/gpt-5*codex*\",\"openai/gpt-5*codex*\",\"gpt-5-codex\",\"kimi\"],\"computer-use\":[\"copilot/*computer-use*\",\"google/*computer-use*\",\"gemini/*computer-use*\",\"openai/*computer-use*\"],\"copilot\":[\"agent\"],\"deep-research\":[\"copilot/deep-research*\",\"copilot/o3-deep-research*\",\"copilot/o4-mini-deep-research*\",\"google/deep-research*\",\"gemini/deep-research*\",\"openai/o3-deep-research*\",\"openai/o4-mini-deep-research*\"],\"detection\":[\"small\"],\"evals\":[\"small\"],\"fable\":[\"copilot/*fable*\",\"anthropic/*fable*\"],\"gemini\":[\"agent\"],\"gemini-3-flash\":[\"copilot/gemini-3*flash*\",\"google/gemini-3*flash*\",\"gemini/gemini-3*flash*\"],\"gemini-3-pro\":[\"copilot/gemini-3*pro*\",\"google/gemini-3*pro*\",\"google/nano-banana*\",\"gemini/gemini-3*pro*\"],\"gemini-3.1-flash\":[\"copilot/gemini-3.1*flash*\",\"google/gemini-3.1*flash*\",\"gemini/gemini-3.1*flash*\"],\"gemini-3.1-pro\":[\"copilot/gemini-3.1*pro*\",\"google/gemini-3.1*pro*\",\"gemini/gemini-3.1*pro*\"],\"gemini-3.5-flash\":[\"copilot/gemini-3.5*flash*\",\"google/gemini-3.5*flash*\",\"gemini/gemini-3.5*flash*\"],\"gemini-3.6-flash\":[\"copilot/gemini-3.6*flash*\",\"google/gemini-3.6*flash*\",\"gemini/gemini-3.6*flash*\"],\"gemini-3.7-flash\":[\"copilot/gemini-3.7*flash*\",\"google/gemini-3.7*flash*\",\"gemini/gemini-3.7*flash*\"],\"gemini-flash\":[\"copilot/gemini-*flash*\",\"google/gemini-*flash*\",\"gemini/gemini-*flash*\"],\"gemini-flash-lite\":[\"copilot/gemini-*flash*lite*\",\"google/gemini-*flash*lite*\",\"gemini/gemini-*flash*lite*\"],\"gemini-omni\":[\"copilot/gemini-omni*\",\"google/gemini-omni*\",\"gemini/gemini-omni*\"],\"gemini-pro\":[\"copilot/gemini-*pro*\",\"google/gemini-*pro*\",\"gemini/gemini-*pro*\"],\"gemma\":[\"copilot/gemma*\",\"google/gemma*\",\"gemini/gemma*\"],\"gpt-5\":[\"copilot/gpt-5*\",\"openai/gpt-5*\"],\"gpt-5-codex\":[\"copilot/gpt-5*codex*\",\"openai/gpt-5*codex*\"],\"gpt-5-mini\":[\"copilot/gpt-5*mini*\",\"openai/gpt-5*mini*\"],\"gpt-5-nano\":[\"copilot/gpt-5*nano*\",\"openai/gpt-5*nano*\"],\"gpt-5-pro\":[\"copilot/gpt-5*pro*\",\"openai/gpt-5*pro*\"],\"gpt-5.1\":[\"copilot/gpt-5.1*\",\"openai/gpt-5.1*\"],\"gpt-5.2\":[\"copilot/gpt-5.2*\",\"openai/gpt-5.2*\"],\"gpt-5.3\":[\"copilot/gpt-5.3*\",\"openai/gpt-5.3*\"],\"gpt-5.4\":[\"copilot/gpt-5.4*\",\"openai/gpt-5.4*\"],\"gpt-5.5\":[\"copilot/gpt-5.5*\",\"openai/gpt-5.5*\"],\"gpt-5.6\":[\"copilot/gpt-5.6*\",\"openai/gpt-5.6*\"],\"grok\":[\"copilot/*grok*\",\"openai/*grok*\"],\"haiku\":[\"copilot/*haiku*\",\"anthropic/*haiku*\"],\"image-generation\":[\"copilot/gpt-image*\",\"openai/gpt-image*\",\"openai/chatgpt-image*\",\"copilot/gemini-*image*\",\"google/gemini-*image*\",\"gemini/gemini-*image*\",\"google/imagen*\"],\"kimi\":[\"copilot/kimi*\",\"openai/kimi*\"],\"kiwi\":[\"copilot/kiwi*\",\"openai/kiwi*\"],\"large\":[\"sonnet\",\"gpt-5-pro\",\"gpt-5\",\"gemini-pro\"],\"lyria\":[\"google/lyria*\",\"gemini/lyria*\",\"copilot/lyria*\"],\"mai-code\":[\"copilot/MAI-Code*\",\"copilot/mai-code*\",\"openai/MAI-Code*\"],\"mai-code-1-flash-picker\":[\"copilot/MAI-Code-1-Flash-picker*\",\"copilot/mai-code-1-flash-picker*\",\"openai/MAI-Code-1-Flash-picker*\"],\"mini\":[\"haiku\",\"gpt-5-mini\",\"gpt-5-nano\",\"gemini-flash-lite\"],\"nano-banana\":[\"copilot/nano-banana*\",\"google/nano-banana*\",\"gemini/nano-banana*\"],\"opus\":[\"copilot/*opus*\",\"anthropic/*opus*\"],\"opusplan\":[\"opus?effort=high\"],\"raptor-mini\":[\"copilot/raptor*\",\"openai/raptor*\"],\"reasoning\":[\"copilot/o1*\",\"copilot/o3*\",\"copilot/o4*\",\"openai/o1*\",\"openai/o3*\",\"openai/o4*\"],\"robotics\":[\"copilot/*robotics*\",\"google/*robotics*\",\"gemini/*robotics*\"],\"small\":[\"mini\"],\"small-agent\":[\"haiku\",\"gpt-5-mini\",\"gemini-flash\"],\"sonnet\":[\"copilot/*sonnet*\",\"anthropic/*sonnet*\"],\"sonnet-6x\":[\"copilot/*sonnet-4.5*\",\"copilot/*sonnet-4.6*\",\"copilot/*sonnet-5*\",\"copilot/*sonnet-4-5-*\",\"anthropic/*sonnet-4-5-*\",\"copilot/*sonnet-4-6*\",\"anthropic/*sonnet-4-6*\",\"anthropic/*sonnet-5*\"],\"summarization\":[\"haiku\",\"gpt-5-mini\",\"gemini-flash-lite\",\"mini\"],\"veo\":[\"google/veo*\",\"gemini/veo*\"],\"vision\":[\"copilot/gemini-*image*\",\"google/gemini-*image*\",\"gemini/gemini-*image*\",\"copilot/gemini-*flash*\",\"google/gemini-*flash*\",\"gemini/gemini-*flash*\"]}},\"container\":{\"imageTag\":\"0.28.12,squid=sha256:52c34aca98d2a6833c329f1505912a6949c4fda16618c010c979bd59ea99254f,agent=sha256:390051be4ed1847f774fd8980b61d3a3523574c0175d00c3fc7cdf2002a88202,api-proxy=sha256:d7d533d87c80d87ff91ac0e21e9299055c3beedff1536262b97ed700fb065a32,cli-proxy=sha256:5250629d48eaedfedf2e948785228e8da29eec2a83cbab58ea0751c14a7b021d\"},\"logging\":{\"proxyLogsDir\":\"/tmp/gh-aw/sandbox/firewall/logs\",\"auditDir\":\"/tmp/gh-aw/sandbox/firewall/audit\"}}" > "${RUNNER_TEMP}/gh-aw/awf-config.json"
- cp "${RUNNER_TEMP}/gh-aw/awf-config.json" /tmp/gh-aw/awf-config.json
- export GH_AW_MODELS_JSON_PATH="/tmp/gh-aw/models.json"
- GH_AW_DOCKER_HOST=""
- if [[ "${DOCKER_HOST:-}" =~ ^tcp:// ]]; then
- GH_AW_DOCKER_HOST="${DOCKER_HOST}"
- fi
- if [[ "${DOCKER_HOST:-}" =~ ^tcp:// ]]; then
- GH_AW_CHROOT_BINARIES_SOURCE_PATH="${RUNNER_TEMP}/gh-aw" GH_AW_CHROOT_IDENTITY_HOME="${RUNNER_TEMP}/gh-aw/home" node "${RUNNER_TEMP}/gh-aw/actions/patch_awf_chroot_config.cjs"
- fi
- GH_AW_TOOL_CACHE_MOUNT=""
- GH_AW_TOOL_CACHE="${RUNNER_TOOL_CACHE:?RUNNER_TOOL_CACHE must be set}"
- if [ -d "$GH_AW_TOOL_CACHE" ]; then
- if [[ "$GH_AW_TOOL_CACHE" != /opt/* ]]; then
- GH_AW_TOOL_CACHE_MOUNT="$GH_AW_TOOL_CACHE:$GH_AW_TOOL_CACHE:ro"
- fi
- fi
- # shellcheck disable=SC1003,SC2016,SC2086
- GH_AW_AWF_ENGINE_NAME=copilot \
- GH_AW_AWF_HARNESS_MARKER='[copilot-harness]' \
- GH_AW_AWF_LOG_FILE=/tmp/gh-aw/agent-stdio.log \
- GH_AW_AWF_ATTEMPT_LOG_NAME=copilot \
- bash "${RUNNER_TEMP}/gh-aw/actions/run_awf_with_startup_retries.sh" -- \
- awf --config "${RUNNER_TEMP}/gh-aw/awf-config.json" --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" ${GH_AW_TOOL_CACHE_MOUNT:+--mount "$GH_AW_TOOL_CACHE_MOUNT"} ${GH_AW_DOCKER_HOST:+--docker-host "$GH_AW_DOCKER_HOST"} --env-all --exclude-env ACTIONS_ID_TOKEN_REQUEST_TOKEN --exclude-env ACTIONS_ID_TOKEN_REQUEST_URL --exclude-env COPILOT_GITHUB_TOKEN --exclude-env GITHUB_MCP_SERVER_TOKEN --exclude-env MCP_GATEWAY_AGENT_ID --mount /tmp/gh-aw:/tmp/gh-aw:rw --log-level info --skip-pull \
- -- /bin/bash -c 'set +o histexpand; export PATH="${RUNNER_TEMP}/gh-aw/mcp-cli/bin:$PATH" && : "${RUNNER_TOOL_CACHE:?RUNNER_TOOL_CACHE must be set}"; GH_AW_TOOL_CACHE="$RUNNER_TOOL_CACHE"; export PATH="$(find "$GH_AW_TOOL_CACHE" -maxdepth 5 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true; [ -n "$ERLANG_HOME" ] && export PATH="$ERLANG_HOME/bin:$PATH" || true && GH_AW_NODE_EXEC="${GH_AW_NODE_BIN:-}"; if [ -z "$GH_AW_NODE_EXEC" ] || [ ! -x "$GH_AW_NODE_EXEC" ]; then GH_AW_NODE_EXEC="$(command -v node 2>/dev/null || true)"; fi; if [ -z "$GH_AW_NODE_EXEC" ]; then echo "node runtime missing on this runner — check runtimes.node in workflow YAML" >&2; exit 127; fi; GH_AW_NPM_GLOBAL_ROOT="$(npm root -g 2>/dev/null || true)"; if [ -n "$GH_AW_NPM_GLOBAL_ROOT" ]; then export NODE_PATH="${GH_AW_NPM_GLOBAL_ROOT}${NODE_PATH:+:${NODE_PATH}}"; fi; "$GH_AW_NODE_EXEC" "${RUNNER_TEMP}/gh-aw/actions/copilot_harness.cjs" "${RUNNER_TEMP}/gh-aw/bin/copilot" --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --disable-builtin-mcps --no-ask-user --allow-all-tools --allow-all-paths --add-dir "${GITHUB_WORKSPACE}" --prompt-file /tmp/gh-aw/aw-prompts/prompt.txt'
- env:
- AWF_REFLECT_ENABLED: 1
- COPILOT_AGENT_RUNNER_TYPE: STANDALONE
- COPILOT_DUMMY_BYOK: dummy-byok-key-for-offline-mode
- COPILOT_GITHUB_TOKEN: ${{ github.token }}
- COPILOT_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || vars.GH_AW_DEFAULT_MODEL_COPILOT || 'claude-sonnet-5' }}
- GH_AW_LLM_PROVIDER: github
- GH_AW_MAX_AI_CREDITS: ${{ vars.GH_AW_DEFAULT_MAX_AI_CREDITS || '1000' }}
- GH_AW_MAX_TURNS: ${{ vars.GH_AW_DEFAULT_MAX_TURNS || '' }}
- GH_AW_MODEL_FALLBACK: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || vars.GH_AW_DEFAULT_MODEL_COPILOT || 'auto' }}
- GH_AW_PHASE: agent
- GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt
- GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }}
- GH_AW_TIMEOUT_MINUTES: 15
- GH_AW_VERSION: v0.88.2
- GITHUB_API_URL: ${{ github.api_url }}
- GITHUB_AW: true
- GITHUB_COPILOT_INTEGRATION_ID: agentic-workflows
- GITHUB_HEAD_REF: ${{ github.head_ref }}
- GITHUB_MCP_SERVER_TOKEN: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN || secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
- GITHUB_REF_NAME: ${{ github.ref_name }}
- GITHUB_SERVER_URL: ${{ github.server_url }}
- GITHUB_STEP_SUMMARY: /tmp/gh-aw/agent-step-summary.md
- GITHUB_WORKSPACE: ${{ github.workspace }}
- GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com
- GIT_AUTHOR_NAME: github-actions[bot]
- GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com
- GIT_COMMITTER_NAME: github-actions[bot]
- RUNNER_TEMP: ${{ runner.temp }}
- S2STOKENS: true
- TRACEPARENT: ${{ env.GITHUB_AW_OTEL_TRACE_ID != '' && env.GITHUB_AW_OTEL_PARENT_SPAN_ID != '' && format('00-{0}-{1}-01', env.GITHUB_AW_OTEL_TRACE_ID, env.GITHUB_AW_OTEL_PARENT_SPAN_ID) || '' }}
- - name: Detect agent errors
- if: always()
- id: detect-agent-errors
- continue-on-error: true
- env:
- GH_AW_AGENTIC_EXECUTION_OUTCOME: ${{ steps.agentic_execution.outcome }}
- GH_AW_ENGINE_STEP_TIMEOUT_MINUTES: 15
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
- with:
- script: |
- const path = require('path');
- const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
- const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
- setupGlobals(core, github, context, exec, io, getOctokit);
- const { main } = require(path.join(actionsDir, 'detect_agent_errors.cjs'));
- await main();
- - name: Configure Git credentials
- env:
- GITHUB_REPOSITORY: ${{ github.repository }}
- GITHUB_SERVER_URL: ${{ github.server_url }}
- GITHUB_TOKEN: ${{ github.token }}
- run: bash "${RUNNER_TEMP}/gh-aw/actions/configure_git_credentials.sh"
- - name: Copy Copilot session state files to logs
- if: always()
- continue-on-error: true
- run: bash "${RUNNER_TEMP}/gh-aw/actions/copy_copilot_session_state.sh"
- - name: Stop MCP Gateway
- if: always()
- continue-on-error: true
- env:
- MCP_GATEWAY_PORT: ${{ steps.start-mcp-gateway.outputs.gateway-port }}
- MCP_GATEWAY_AGENT_ID: ${{ steps.start-mcp-gateway.outputs.gateway-agent-id }}
- GATEWAY_PID: ${{ steps.start-mcp-gateway.outputs.gateway-pid }}
- run: |
- bash "${RUNNER_TEMP}/gh-aw/actions/stop_mcp_gateway.sh" "$GATEWAY_PID"
- - name: Redact secrets in logs
- if: always()
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
- with:
- script: |
- const path = require('path');
- const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
- const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
- setupGlobals(core, github, context, exec, io, getOctokit);
- const { main } = require(path.join(actionsDir, 'redact_secrets.cjs'));
- await main();
- env:
- GH_AW_SECRET_NAMES: 'GH_AW_GITHUB_MCP_SERVER_TOKEN,GH_AW_GITHUB_TOKEN,GITHUB_TOKEN'
- SECRET_GH_AW_GITHUB_MCP_SERVER_TOKEN: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN }}
- SECRET_GH_AW_GITHUB_TOKEN: ${{ secrets.GH_AW_GITHUB_TOKEN }}
- SECRET_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- - name: Append agent step summary
- if: always()
- run: bash "${RUNNER_TEMP}/gh-aw/actions/append_agent_step_summary.sh"
- - name: Copy Safe Outputs
- if: always()
- env:
- GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }}
- run: |
- mkdir -p /tmp/gh-aw
- cp "$GH_AW_SAFE_OUTPUTS" /tmp/gh-aw/safeoutputs.jsonl 2>/dev/null || true
- - name: Ingest agent output
- id: collect_output
- if: always()
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
- env:
- GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }}
- GH_AW_ALLOWED_DOMAINS: "api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,s.symcb.com,s.symcd.com,security.ubuntu.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com"
- GITHUB_SERVER_URL: ${{ github.server_url }}
- GITHUB_API_URL: ${{ github.api_url }}
- with:
- script: |
- const path = require('path');
- const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
- const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
- setupGlobals(core, github, context, exec, io, getOctokit);
- const { main } = require(path.join(actionsDir, 'collect_ndjson_output.cjs'));
- await main();
- - name: Parse agent logs for step summary
- if: always()
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
- env:
- GH_AW_AGENT_OUTPUT: /tmp/gh-aw/sandbox/agent/logs/
- GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }}
- with:
- script: |
- const path = require('path');
- const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
- const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
- setupGlobals(core, github, context, exec, io, getOctokit);
- const { main } = require(path.join(actionsDir, 'parse_copilot_log.cjs'));
- await main();
- - name: Parse MCP Gateway logs for step summary
- if: always()
- id: parse-mcp-gateway
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
- with:
- script: |
- const path = require('path');
- const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
- const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
- setupGlobals(core, github, context, exec, io, getOctokit);
- const { main } = require(path.join(actionsDir, 'parse_mcp_gateway_log.cjs'));
- await main();
- - name: Print firewall logs
- if: always()
- continue-on-error: true
- env:
- AWF_LOGS_DIR: /tmp/gh-aw/sandbox/firewall/logs
- run: bash "${RUNNER_TEMP}/gh-aw/actions/print_firewall_logs.sh" --rootless
- - name: Parse token usage for step summary
- if: always()
- continue-on-error: true
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
- with:
- script: |
- const path = require('path');
- const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
- const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
- setupGlobals(core, github, context, exec, io, getOctokit);
- const { main } = require(path.join(actionsDir, 'parse_token_usage.cjs'));
- await main();
- - name: Print AWF reflect summary
- if: always()
- continue-on-error: true
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
- with:
- script: |
- const path = require('path');
- const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
- const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
- setupGlobals(core, github, context, exec, io, getOctokit);
- const { main } = require(path.join(actionsDir, 'awf_reflect_summary.cjs'));
- await main();
- - name: Generate observability summary
- if: always()
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
- with:
- script: |
- const path = require('path');
- const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
- const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
- setupGlobals(core, github, context, exec, io, getOctokit);
- const { main } = require(path.join(actionsDir, 'generate_observability_summary.cjs'));
- await main(core);
- - name: Write agent output placeholder if missing
- if: always()
- run: |
- if [ ! -f /tmp/gh-aw/agent_output.json ]; then
- echo '{"items":[]}' > /tmp/gh-aw/agent_output.json
- fi
- # Small dedicated copy of the agent output so safe-output processing
- # survives a failed or timed-out upload of the larger agent artifact
- - name: Upload agent output fallback artifact
- if: always()
- continue-on-error: true
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
- with:
- name: agent-output-fallback
- path: |
- /tmp/gh-aw/agent_output.json
- /tmp/gh-aw/safeoutputs.jsonl
- if-no-files-found: ignore
- - name: Upload agent artifacts
- if: always()
- continue-on-error: true
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
- with:
- name: agent
- path: |
- /tmp/gh-aw/aw-prompts/prompt.txt
- /tmp/gh-aw/sandbox/agent/logs/
- /tmp/gh-aw/redacted-urls.log
- /tmp/gh-aw/mcp-logs/
- /tmp/gh-aw/agent_usage.json
- /tmp/gh-aw/agent-stdio.log
- /tmp/gh-aw/pre-agent-audit.txt
- /tmp/gh-aw/agent/
- /tmp/gh-aw/github_rate_limits.jsonl
- /tmp/gh-aw/otel.jsonl
- /tmp/gh-aw/otlp-export-errors.jsonl
- /tmp/gh-aw/safeoutputs.jsonl
- /tmp/gh-aw/agent_output.json
- /tmp/gh-aw/aw-*.patch
- /tmp/gh-aw/aw-*.bundle
- /tmp/gh-aw/awf-config.json
- /tmp/gh-aw/sandbox/firewall/logs/
- /tmp/gh-aw/sandbox/firewall/audit/
- /tmp/gh-aw/sandbox/firewall/awf-reflect.json
- if-no-files-found: ignore
-
- conclusion:
- needs:
- - activation
- - agent
- - detection
- - safe_outputs
- if: >
- always() && (needs.agent.result != 'skipped' || needs.activation.outputs.lockdown_check_failed == 'true' ||
- needs.activation.outputs.oauth_token_check_failed == 'true' || needs.activation.outputs.stale_lock_file_failed == 'true' ||
- needs.activation.outputs.daily_ai_credits_exceeded == 'true')
- runs-on: ubuntu-slim
- permissions:
- actions: read
- issues: write
- pull-requests: write
- concurrency:
- group: "gh-aw-conclusion-sdk-consistency-review"
- cancel-in-progress: false
- queue: max
- env:
- GH_AW_RUNTIME_FEATURES: ${{ vars.GH_AW_RUNTIME_FEATURES }}
- outputs:
- incomplete_count: ${{ steps.report_incomplete.outputs.incomplete_count }}
- noop_message: ${{ steps.noop.outputs.noop_message }}
- tools_reported: ${{ steps.missing_tool.outputs.tools_reported }}
- total_count: ${{ steps.missing_tool.outputs.total_count }}
- steps:
- - name: Setup Scripts
- id: setup
- uses: github/gh-aw-actions/setup@9271a1804551c0dc4fb0085a97979950aa2f8489 # v0.88.2
- with:
- destination: ${{ runner.temp }}/gh-aw/actions
- job-name: ${{ github.job }}
- trace-id: ${{ needs.activation.outputs.setup-trace-id }}
- parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }}
- env:
- GH_AW_SETUP_WORKFLOW_NAME: "SDK Consistency Review Agent"
- GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/sdk-consistency-review.lock.yml@${{ github.ref }}
- GH_AW_INFO_VERSION: "1.0.80"
- GH_AW_INFO_AWF_VERSION: "v0.28.12"
- GH_AW_INFO_ENGINE_ID: "copilot"
- - name: Download agent output artifact
- id: download-agent-output
- continue-on-error: true
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
- with:
- pattern: "{agent,agent-output-fallback}"
- merge-multiple: true
- path: /tmp/gh-aw/
- - name: Setup agent output environment variable
- id: setup-agent-output-env
- if: steps.download-agent-output.outcome == 'success'
- run: |
- mkdir -p /tmp/gh-aw/
- find "/tmp/gh-aw/" -type f -print
- if [ -f "/tmp/gh-aw/agent_output.json" ]; then
- echo "GH_AW_AGENT_OUTPUT=/tmp/gh-aw/agent_output.json" >> "$GITHUB_OUTPUT"
- fi
- - name: Download detection artifact
- id: download-detection-artifact
- continue-on-error: true
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
- with:
- name: detection
- path: /tmp/gh-aw/threat-detection/
- - name: Download Safe Outputs Items Manifest
- id: download-safe-outputs-manifest
- if: always()
- continue-on-error: true
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
- with:
- pattern: safe-outputs-items
- merge-multiple: true
- path: /tmp/gh-aw/
- - name: Collect usage artifact files
- if: always()
- continue-on-error: true
- run: bash "${RUNNER_TEMP}/gh-aw/actions/collect_usage_artifact_files.sh"
- - name: Upload usage artifact
- if: always()
- continue-on-error: true
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
- with:
- name: usage
- path: |
- /tmp/gh-aw/usage/aw_info.json
- /tmp/gh-aw/usage/aw-info.jsonl
- /tmp/gh-aw/usage/agent_usage.json
- /tmp/gh-aw/usage/agent_usage.jsonl
- /tmp/gh-aw/usage/detection_usage.jsonl
- /tmp/gh-aw/usage/evals.jsonl
- /tmp/gh-aw/usage/graders/grader_manifest.json
- /tmp/gh-aw/usage/graders/grader_results.json
- /tmp/gh-aw/usage/github_rate_limits.jsonl
- /tmp/gh-aw/usage/agent/token_usage.jsonl
- /tmp/gh-aw/usage/detection/token_usage.jsonl
- /tmp/gh-aw/usage/activity/summary.json
- if-no-files-found: ignore
- - name: Restore daily AIC usage cache
- id: restore-daily-aic-cache-conclusion
- if: always()
- continue-on-error: true
- uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
- with:
- key: agentic-workflow-usage-sdkconsistencyreview-${{ github.run_id }}
- restore-keys: agentic-workflow-usage-sdkconsistencyreview-
- path: /tmp/gh-aw/agentic-workflow-usage-cache.jsonl
- - name: Write daily AIC usage cache entry
- id: write-daily-aic-cache
- if: always()
- continue-on-error: true
- uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9
- with:
- github-token: ${{ github.token }}
- script: |
- const path = require('path');
- const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
- const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
- setupGlobals(core, github, context);
- const { main } = require(path.join(actionsDir, 'write_daily_aic_usage_cache.cjs'));
- await main();
- - name: Save daily AIC usage cache
- id: save-daily-aic-cache
- if: always()
- continue-on-error: true
- uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
- with:
- key: agentic-workflow-usage-sdkconsistencyreview-${{ github.run_id }}
- path: /tmp/gh-aw/agentic-workflow-usage-cache.jsonl
- - name: Upload daily AIC usage cache artifact
- id: upload-daily-aic-cache
- if: always()
- continue-on-error: true
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
- with:
- name: aic-usage-cache
- path: /tmp/gh-aw/agentic-workflow-usage-cache.jsonl
- if-no-files-found: ignore
- retention-days: 7
- - name: Process no-op messages
- id: noop
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
- env:
- GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }}
- GH_AW_NOOP_MAX: "1"
- GH_AW_WORKFLOW_NAME: "SDK Consistency Review Agent"
- GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/sdk-consistency-review.md"
- GH_AW_TRACKER_ID: "sdk-consistency-review"
- GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
- GH_AW_AGENT_CONCLUSION: ${{ needs.agent.result }}
- GH_AW_NOOP_REPORT_AS_ISSUE: "false"
- GH_AW_AIC: ${{ needs.agent.outputs.aic }}
- GH_AW_THREAT_DETECTION_AIC: ${{ needs.detection.outputs.aic }}
- GH_AW_AMBIENT_CONTEXT: ${{ needs.agent.outputs.ambient_context }}
- GH_AW_WORKFLOW_ID: "sdk-consistency-review"
- with:
- github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
- script: |
- const path = require('path');
- const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
- const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
- setupGlobals(core, github, context, exec, io, getOctokit);
- const { main } = require(path.join(actionsDir, 'handle_noop_message.cjs'));
- await main();
- - name: Log detection run
- id: detection_runs
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
- env:
- GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }}
- GH_AW_WORKFLOW_NAME: "SDK Consistency Review Agent"
- GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/sdk-consistency-review.md"
- GH_AW_TRACKER_ID: "sdk-consistency-review"
- GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
- GH_AW_DETECTION_CONCLUSION: ${{ needs.detection.outputs.detection_conclusion }}
- GH_AW_DETECTION_REASON: ${{ needs.detection.outputs.detection_reason }}
- with:
- github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
- script: |
- const path = require('path');
- const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
- const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
- setupGlobals(core, github, context, exec, io, getOctokit);
- const { main } = require(path.join(actionsDir, 'handle_detection_runs.cjs'));
- await main();
- - name: Record missing tool
- id: missing_tool
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
- env:
- GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }}
- GH_AW_MISSING_TOOL_CREATE_ISSUE: "true"
- GH_AW_WORKFLOW_NAME: "SDK Consistency Review Agent"
- GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/sdk-consistency-review.md"
- GH_AW_TRACKER_ID: "sdk-consistency-review"
- with:
- github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
- script: |
- const path = require('path');
- const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
- const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
- setupGlobals(core, github, context, exec, io, getOctokit);
- const { main } = require(path.join(actionsDir, 'missing_tool.cjs'));
- await main();
- - name: Record incomplete
- id: report_incomplete
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
- env:
- GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }}
- GH_AW_REPORT_INCOMPLETE_CREATE_ISSUE: "true"
- GH_AW_WORKFLOW_NAME: "SDK Consistency Review Agent"
- GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/sdk-consistency-review.md"
- GH_AW_TRACKER_ID: "sdk-consistency-review"
- with:
- github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
- script: |
- const path = require('path');
- const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
- const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
- setupGlobals(core, github, context, exec, io, getOctokit);
- const { main } = require(path.join(actionsDir, 'report_incomplete_handler.cjs'));
- await main();
- - name: Handle agent failure
- id: handle_agent_failure
- if: always()
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
- env:
- GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }}
- GH_AW_WORKFLOW_NAME: "SDK Consistency Review Agent"
- GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/sdk-consistency-review.md"
- GH_AW_TRACKER_ID: "sdk-consistency-review"
- GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
- GH_AW_AGENT_CONCLUSION: ${{ needs.agent.result }}
- GH_AW_WORKFLOW_ID: "sdk-consistency-review"
- GH_AW_ACTION_FAILURE_ISSUE_EXPIRES_HOURS: "0"
- GH_AW_ENGINE_ID: "copilot"
- GH_AW_CHECKOUT_PR_SUCCESS: ${{ needs.agent.outputs.checkout_pr_success }}
- GH_AW_EFFECTIVE_TOKENS: ${{ needs.agent.outputs.effective_tokens || '' }}
- GH_AW_AI_CREDITS_RATE_LIMIT_ERROR: ${{ needs.agent.outputs.ai_credits_rate_limit_error || 'false' }}
- GH_AW_UNKNOWN_MODEL_AI_CREDITS: ${{ needs.agent.outputs.unknown_model_ai_credits || 'false' }}
- GH_AW_AIC: ${{ needs.agent.outputs.aic }}
- GH_AW_THREAT_DETECTION_AIC: ${{ needs.detection.outputs.aic }}
- GH_AW_MAX_AI_CREDITS: ${{ vars.GH_AW_DEFAULT_MAX_AI_CREDITS || '1000' }}
- GH_AW_INFERENCE_ACCESS_ERROR: ${{ needs.agent.outputs.inference_access_error }}
- GH_AW_MCP_POLICY_ERROR: ${{ needs.agent.outputs.mcp_policy_error }}
- GH_AW_AGENTIC_ENGINE_TIMEOUT: ${{ needs.agent.outputs.agentic_engine_timeout }}
- GH_AW_MODEL_NOT_SUPPORTED_ERROR: ${{ needs.agent.outputs.model_not_supported_error }}
- GH_AW_HTTP_400_RESPONSE_ERROR: ${{ needs.agent.outputs.http_400_response_error }}
- GH_AW_MAX_CACHE_MISSES_EXCEEDED: ${{ needs.agent.outputs.max_cache_misses_exceeded }}
- GH_AW_MISSING_MODEL_PRICING_ERROR: ${{ needs.agent.outputs.missing_model_pricing_error }}
- GH_AW_MISSING_MODEL_PRICING_MODEL_NAME: ${{ needs.agent.outputs.missing_model_pricing_model_name }}
- GH_AW_SHELL_EXPANSION_GUARD_REJECTED: ${{ needs.agent.outputs.shell_expansion_guard_rejected }}
- GH_AW_ENGINE_API_HOSTS: "api.enterprise.githubcopilot.com,api.githubcopilot.com,api.business.githubcopilot.com,api.individual.githubcopilot.com"
- GH_AW_LOCKDOWN_CHECK_FAILED: ${{ needs.activation.outputs.lockdown_check_failed }}
- GH_AW_OAUTH_TOKEN_CHECK_FAILED: ${{ needs.activation.outputs.oauth_token_check_failed }}
- GH_AW_STALE_LOCK_FILE_FAILED: ${{ needs.activation.outputs.stale_lock_file_failed }}
- GH_AW_DAILY_AI_CREDITS_EXCEEDED: ${{ needs.activation.outputs.daily_ai_credits_exceeded }}
- GH_AW_DAILY_AI_CREDITS_TOTAL_EFFECTIVE_TOKENS: ${{ needs.activation.outputs.daily_ai_credits_total_effective_tokens }}
- GH_AW_DAILY_AI_CREDITS_THRESHOLD: ${{ needs.activation.outputs.daily_ai_credits_threshold }}
- GH_AW_GROUP_REPORTS: "false"
- GH_AW_FAILURE_REPORT_AS_ISSUE: "true"
- GH_AW_MISSING_TOOL_REPORT_AS_FAILURE: "true"
- GH_AW_MISSING_DATA_REPORT_AS_FAILURE: "true"
- GH_AW_TIMEOUT_MINUTES: "15"
- with:
- github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
- script: |
- const path = require('path');
- const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
- const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
- setupGlobals(core, github, context, exec, io, getOctokit);
- const { main } = require(path.join(actionsDir, 'handle_agent_failure.cjs'));
- await main();
- - name: Report failed jobs
- id: report_failed_jobs
- if: always()
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
- env:
- GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }}
- GH_AW_WORKFLOW_NAME: "SDK Consistency Review Agent"
- GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/sdk-consistency-review.md"
- GH_AW_TRACKER_ID: "sdk-consistency-review"
- GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
- GH_AW_REPORT_FAILED_JOBS: "true"
- with:
- github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
- script: |
- const path = require('path');
- const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
- const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
- setupGlobals(core, github, context, exec, io, getOctokit);
- const { main } = require(path.join(actionsDir, 'report_failed_jobs.cjs'));
- await main();
-
- detection:
- needs:
- - activation
- - agent
- if: always() && needs.agent.result != 'skipped'
- runs-on: ubuntu-latest
- permissions:
- contents: read
- copilot-requests: write
- timeout-minutes: 10
- env:
- GH_AW_RUNTIME_FEATURES: ${{ vars.GH_AW_RUNTIME_FEATURES }}
- outputs:
- aic: ${{ steps.parse_detection_token_usage.outputs.aic }}
- detection_conclusion: ${{ steps.detection_conclusion.outputs.conclusion }}
- detection_reason: ${{ steps.detection_conclusion.outputs.reason }}
- detection_success: ${{ steps.detection_conclusion.outputs.success }}
- steps:
- - name: Setup Scripts
- id: setup
- uses: github/gh-aw-actions/setup@9271a1804551c0dc4fb0085a97979950aa2f8489 # v0.88.2
- with:
- destination: ${{ runner.temp }}/gh-aw/actions
- job-name: ${{ github.job }}
- trace-id: ${{ needs.activation.outputs.setup-trace-id }}
- parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }}
- env:
- GH_AW_SETUP_WORKFLOW_NAME: "SDK Consistency Review Agent"
- GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/sdk-consistency-review.lock.yml@${{ github.ref }}
- GH_AW_INFO_VERSION: "1.0.80"
- GH_AW_INFO_AWF_VERSION: "v0.28.12"
- GH_AW_INFO_ENGINE_ID: "copilot"
- - name: Download activation artifact
- continue-on-error: true
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
- with:
- name: activation
- path: /tmp/gh-aw
- - name: Download agent output artifact
- id: download-agent-output
- continue-on-error: true
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
- with:
- pattern: "{agent,agent-output-fallback}"
- merge-multiple: true
- path: /tmp/gh-aw/
- - name: Setup agent output environment variable
- id: setup-agent-output-env
- if: steps.download-agent-output.outcome == 'success'
- run: |
- mkdir -p /tmp/gh-aw/
- find "/tmp/gh-aw/" -type f -print
- if [ -f "/tmp/gh-aw/agent_output.json" ]; then
- echo "GH_AW_AGENT_OUTPUT=/tmp/gh-aw/agent_output.json" >> "$GITHUB_OUTPUT"
- fi
- - name: Checkout repository for patch context
- if: needs.agent.outputs.has_patch == 'true'
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- with:
- persist-credentials: false
- # --- Threat Detection ---
- - name: Clean stale firewall files from agent artifact
- run: |
- rm -rf /tmp/gh-aw/sandbox/firewall/logs
- rm -rf /tmp/gh-aw/sandbox/firewall/audit
- - name: Download container images
- run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.28.12@sha256:390051be4ed1847f774fd8980b61d3a3523574c0175d00c3fc7cdf2002a88202 ghcr.io/github/gh-aw-firewall/api-proxy:0.28.12@sha256:d7d533d87c80d87ff91ac0e21e9299055c3beedff1536262b97ed700fb065a32 ghcr.io/github/gh-aw-firewall/squid:0.28.12@sha256:52c34aca98d2a6833c329f1505912a6949c4fda16618c010c979bd59ea99254f
- - name: Check if detection needed
- id: detection_guard
- if: always()
- env:
- OUTPUT_TYPES: ${{ needs.agent.outputs.output_types }}
- HAS_PATCH: ${{ needs.agent.outputs.has_patch }}
- run: |
- if [[ -n "$OUTPUT_TYPES" || "$HAS_PATCH" == "true" ]]; then
- echo "run_detection=true" >> "$GITHUB_OUTPUT"
- echo "Detection will run: output_types=$OUTPUT_TYPES, has_patch=$HAS_PATCH"
- else
- echo "run_detection=false" >> "$GITHUB_OUTPUT"
- echo "Detection skipped: no agent outputs or patches to analyze"
- fi
- - name: Clear MCP Config for detection
- if: always() && steps.detection_guard.outputs.run_detection == 'true'
- run: |
- rm -f "${RUNNER_TEMP}/gh-aw/mcp-config/mcp-servers.json"
- rm -f "$HOME/.copilot/mcp-config.json"
- rm -f "$GITHUB_WORKSPACE/.gemini/settings.json"
- - name: Prepare threat detection files
- if: always() && steps.detection_guard.outputs.run_detection == 'true'
- run: |
- bash "${RUNNER_TEMP}/gh-aw/actions/prepare_threat_detection_files.sh"
- - name: Setup threat detection
- if: always() && steps.detection_guard.outputs.run_detection == 'true'
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
- env:
- WORKFLOW_NAME: "SDK Consistency Review Agent"
- WORKFLOW_DESCRIPTION: "Reviews PRs to ensure features are implemented consistently across all SDK language implementations"
- HAS_PATCH: ${{ needs.agent.outputs.has_patch }}
- GH_AW_DETECTION_CONTINUE_ON_ERROR: "true"
- GH_AW_DETECTION_SKIP_PROMPT_SUMMARY: "true"
- with:
- script: |
- const path = require('path');
- const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
- const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
- setupGlobals(core, github, context, exec, io, getOctokit);
- const { main } = require(path.join(actionsDir, 'setup_threat_detection.cjs'));
- await main();
- - name: Ensure threat-detection directory and log
- if: always() && steps.detection_guard.outputs.run_detection == 'true'
- run: |
- mkdir -p /tmp/gh-aw/threat-detection
- touch /tmp/gh-aw/threat-detection/detection.log
- - name: Install AWF binary
- run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.28.12 --rootless
- - name: Install GitHub Copilot CLI
- run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh"
- env:
- GH_HOST: github.com
- GH_AW_COMPILED_VERSION: v0.88.2
- - name: Install threat-detect binary
- if: always() && steps.detection_guard.outputs.run_detection == 'true'
- continue-on-error: true
- run: |
- bash "${RUNNER_TEMP}/gh-aw/actions/install_threat_detect_binary.sh" v0.5.1
- - name: Execute threat detection with AWF
- id: detection_agentic_execution
- if: always() && steps.detection_guard.outputs.run_detection == 'true'
- continue-on-error: true
- timeout-minutes: 10
- env:
- AWF_REFLECT_ENABLED: 1
- COPILOT_AGENT_RUNNER_TYPE: STANDALONE
- COPILOT_DUMMY_BYOK: dummy-byok-key-for-offline-mode
- COPILOT_GITHUB_TOKEN: ${{ github.token }}
- COPILOT_MODEL: ${{ vars.GH_AW_MODEL_DETECTION_COPILOT || vars.GH_AW_DEFAULT_MODEL_COPILOT || 'claude-sonnet-5' }}
- GH_AW_HARNESS_MAX_RETRIES: 0
- GH_AW_LLM_PROVIDER: github
- GH_AW_MAX_AI_CREDITS: ${{ vars.GH_AW_DEFAULT_DETECTION_MAX_AI_CREDITS || '400' }}
- GH_AW_MAX_TURNS: ${{ vars.GH_AW_DEFAULT_MAX_TURNS || '' }}
- GH_AW_MODEL_FALLBACK: ${{ vars.GH_AW_MODEL_DETECTION_COPILOT || vars.GH_AW_DEFAULT_MODEL_COPILOT || 'auto' }}
- GH_AW_PHASE: detection
- GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt
- GH_AW_TIMEOUT_MINUTES: 10
- GH_AW_VERSION: v0.88.2
- GITHUB_API_URL: ${{ github.api_url }}
- GITHUB_AW: true
- GITHUB_COPILOT_INTEGRATION_ID: agentic-workflows
- GITHUB_HEAD_REF: ${{ github.head_ref }}
- GITHUB_REF_NAME: ${{ github.ref_name }}
- GITHUB_SERVER_URL: ${{ github.server_url }}
- GITHUB_STEP_SUMMARY: /tmp/gh-aw/agent-step-summary.md
- GITHUB_WORKSPACE: ${{ github.workspace }}
- GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com
- GIT_AUTHOR_NAME: github-actions[bot]
- GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com
- GIT_COMMITTER_NAME: github-actions[bot]
- RUNNER_TEMP: ${{ runner.temp }}
- S2STOKENS: true
- TRACEPARENT: ${{ env.GITHUB_AW_OTEL_TRACE_ID != '' && env.GITHUB_AW_OTEL_PARENT_SPAN_ID != '' && format('00-{0}-{1}-01', env.GITHUB_AW_OTEL_TRACE_ID, env.GITHUB_AW_OTEL_PARENT_SPAN_ID) || '' }}
- WORKFLOW_NAME: "SDK Consistency Review Agent"
- WORKFLOW_DESCRIPTION: "Reviews PRs to ensure features are implemented consistently across all SDK language implementations"
- HAS_PATCH: ${{ needs.agent.outputs.has_patch }}
- GH_AW_DETECTION_CONTINUE_ON_ERROR: "true"
- run: |
- set -o pipefail
- printf '%s' "$(date +%s%3N)" > /tmp/gh-aw/agent_cli_start_ms.txt
- GH_AW_COPILOT_SRC="$(command -v copilot 2>/dev/null || true)"
- if [ -z "$GH_AW_COPILOT_SRC" ] || [ ! -x "$GH_AW_COPILOT_SRC" ]; then
- echo "GitHub Copilot CLI executable not found on PATH after installation" >&2
- exit 127
- fi
- GH_AW_COPILOT_BIN="${RUNNER_TEMP}/gh-aw/bin/copilot"
- mkdir -p "${RUNNER_TEMP}/gh-aw/bin"
- if [ "$GH_AW_COPILOT_SRC" != "$GH_AW_COPILOT_BIN" ]; then
- cp "$GH_AW_COPILOT_SRC" "$GH_AW_COPILOT_BIN"
- fi
- chmod 755 "$GH_AW_COPILOT_BIN"
-
- (umask 177 && touch /tmp/gh-aw/threat-detection/detection.log)
- GH_AW_MAX_AI_CREDITS="${GH_AW_MAX_AI_CREDITS:-400}"
- if [[ ! "$GH_AW_MAX_AI_CREDITS" =~ ^[0-9]+$ ]]; then
- GH_AW_MAX_AI_CREDITS="400"
- fi
- printf '%s\n' "{\"\$schema\":\"https://github.com/github/gh-aw-firewall/releases/download/v0.28.12/awf-config.schema.json\",\"apiProxy\":{\"enabled\":true,\"enableTokenSteering\":true,\"maxRuns\":500,\"maxAiCredits\":${GH_AW_MAX_AI_CREDITS},\"maxCacheMisses\":5,\"models\":{\"agent\":[\"sonnet-6x\",\"gpt-5.4\",\"gpt-5.5\",\"gpt-5.6\",\"gpt-5.3\",\"gemini-pro\",\"any\"],\"antigravity\":[\"copilot/antigravity*\",\"google/antigravity*\",\"gemini/antigravity*\"],\"any\":[\"copilot/*\",\"anthropic/*\",\"openai/*\",\"google/*\",\"gemini/*\"],\"auto\":[\"copilot/auto\",\"large\"],\"claude\":[\"agent\"],\"codex\":[\"agent\"],\"coding\":[\"copilot/gpt-5*codex*\",\"openai/gpt-5*codex*\",\"gpt-5-codex\",\"kimi\"],\"computer-use\":[\"copilot/*computer-use*\",\"google/*computer-use*\",\"gemini/*computer-use*\",\"openai/*computer-use*\"],\"copilot\":[\"agent\"],\"deep-research\":[\"copilot/deep-research*\",\"copilot/o3-deep-research*\",\"copilot/o4-mini-deep-research*\",\"google/deep-research*\",\"gemini/deep-research*\",\"openai/o3-deep-research*\",\"openai/o4-mini-deep-research*\"],\"detection\":[\"small\"],\"evals\":[\"small\"],\"fable\":[\"copilot/*fable*\",\"anthropic/*fable*\"],\"gemini\":[\"agent\"],\"gemini-3-flash\":[\"copilot/gemini-3*flash*\",\"google/gemini-3*flash*\",\"gemini/gemini-3*flash*\"],\"gemini-3-pro\":[\"copilot/gemini-3*pro*\",\"google/gemini-3*pro*\",\"google/nano-banana*\",\"gemini/gemini-3*pro*\"],\"gemini-3.1-flash\":[\"copilot/gemini-3.1*flash*\",\"google/gemini-3.1*flash*\",\"gemini/gemini-3.1*flash*\"],\"gemini-3.1-pro\":[\"copilot/gemini-3.1*pro*\",\"google/gemini-3.1*pro*\",\"gemini/gemini-3.1*pro*\"],\"gemini-3.5-flash\":[\"copilot/gemini-3.5*flash*\",\"google/gemini-3.5*flash*\",\"gemini/gemini-3.5*flash*\"],\"gemini-3.6-flash\":[\"copilot/gemini-3.6*flash*\",\"google/gemini-3.6*flash*\",\"gemini/gemini-3.6*flash*\"],\"gemini-3.7-flash\":[\"copilot/gemini-3.7*flash*\",\"google/gemini-3.7*flash*\",\"gemini/gemini-3.7*flash*\"],\"gemini-flash\":[\"copilot/gemini-*flash*\",\"google/gemini-*flash*\",\"gemini/gemini-*flash*\"],\"gemini-flash-lite\":[\"copilot/gemini-*flash*lite*\",\"google/gemini-*flash*lite*\",\"gemini/gemini-*flash*lite*\"],\"gemini-omni\":[\"copilot/gemini-omni*\",\"google/gemini-omni*\",\"gemini/gemini-omni*\"],\"gemini-pro\":[\"copilot/gemini-*pro*\",\"google/gemini-*pro*\",\"gemini/gemini-*pro*\"],\"gemma\":[\"copilot/gemma*\",\"google/gemma*\",\"gemini/gemma*\"],\"gpt-5\":[\"copilot/gpt-5*\",\"openai/gpt-5*\"],\"gpt-5-codex\":[\"copilot/gpt-5*codex*\",\"openai/gpt-5*codex*\"],\"gpt-5-mini\":[\"copilot/gpt-5*mini*\",\"openai/gpt-5*mini*\"],\"gpt-5-nano\":[\"copilot/gpt-5*nano*\",\"openai/gpt-5*nano*\"],\"gpt-5-pro\":[\"copilot/gpt-5*pro*\",\"openai/gpt-5*pro*\"],\"gpt-5.1\":[\"copilot/gpt-5.1*\",\"openai/gpt-5.1*\"],\"gpt-5.2\":[\"copilot/gpt-5.2*\",\"openai/gpt-5.2*\"],\"gpt-5.3\":[\"copilot/gpt-5.3*\",\"openai/gpt-5.3*\"],\"gpt-5.4\":[\"copilot/gpt-5.4*\",\"openai/gpt-5.4*\"],\"gpt-5.5\":[\"copilot/gpt-5.5*\",\"openai/gpt-5.5*\"],\"gpt-5.6\":[\"copilot/gpt-5.6*\",\"openai/gpt-5.6*\"],\"grok\":[\"copilot/*grok*\",\"openai/*grok*\"],\"haiku\":[\"copilot/*haiku*\",\"anthropic/*haiku*\"],\"image-generation\":[\"copilot/gpt-image*\",\"openai/gpt-image*\",\"openai/chatgpt-image*\",\"copilot/gemini-*image*\",\"google/gemini-*image*\",\"gemini/gemini-*image*\",\"google/imagen*\"],\"kimi\":[\"copilot/kimi*\",\"openai/kimi*\"],\"kiwi\":[\"copilot/kiwi*\",\"openai/kiwi*\"],\"large\":[\"sonnet\",\"gpt-5-pro\",\"gpt-5\",\"gemini-pro\"],\"lyria\":[\"google/lyria*\",\"gemini/lyria*\",\"copilot/lyria*\"],\"mai-code\":[\"copilot/MAI-Code*\",\"copilot/mai-code*\",\"openai/MAI-Code*\"],\"mai-code-1-flash-picker\":[\"copilot/MAI-Code-1-Flash-picker*\",\"copilot/mai-code-1-flash-picker*\",\"openai/MAI-Code-1-Flash-picker*\"],\"mini\":[\"haiku\",\"gpt-5-mini\",\"gpt-5-nano\",\"gemini-flash-lite\"],\"nano-banana\":[\"copilot/nano-banana*\",\"google/nano-banana*\",\"gemini/nano-banana*\"],\"opus\":[\"copilot/*opus*\",\"anthropic/*opus*\"],\"opusplan\":[\"opus?effort=high\"],\"raptor-mini\":[\"copilot/raptor*\",\"openai/raptor*\"],\"reasoning\":[\"copilot/o1*\",\"copilot/o3*\",\"copilot/o4*\",\"openai/o1*\",\"openai/o3*\",\"openai/o4*\"],\"robotics\":[\"copilot/*robotics*\",\"google/*robotics*\",\"gemini/*robotics*\"],\"small\":[\"mini\"],\"small-agent\":[\"haiku\",\"gpt-5-mini\",\"gemini-flash\"],\"sonnet\":[\"copilot/*sonnet*\",\"anthropic/*sonnet*\"],\"sonnet-6x\":[\"copilot/*sonnet-4.5*\",\"copilot/*sonnet-4.6*\",\"copilot/*sonnet-5*\",\"copilot/*sonnet-4-5-*\",\"anthropic/*sonnet-4-5-*\",\"copilot/*sonnet-4-6*\",\"anthropic/*sonnet-4-6*\",\"anthropic/*sonnet-5*\"],\"summarization\":[\"haiku\",\"gpt-5-mini\",\"gemini-flash-lite\",\"mini\"],\"veo\":[\"google/veo*\",\"gemini/veo*\"],\"vision\":[\"copilot/gemini-*image*\",\"google/gemini-*image*\",\"gemini/gemini-*image*\",\"copilot/gemini-*flash*\",\"google/gemini-*flash*\",\"gemini/gemini-*flash*\"]}},\"container\":{\"imageTag\":\"0.28.12,squid=sha256:52c34aca98d2a6833c329f1505912a6949c4fda16618c010c979bd59ea99254f,agent=sha256:390051be4ed1847f774fd8980b61d3a3523574c0175d00c3fc7cdf2002a88202,api-proxy=sha256:d7d533d87c80d87ff91ac0e21e9299055c3beedff1536262b97ed700fb065a32,cli-proxy=sha256:5250629d48eaedfedf2e948785228e8da29eec2a83cbab58ea0751c14a7b021d\"},\"logging\":{\"proxyLogsDir\":\"/tmp/gh-aw/sandbox/firewall/logs\",\"auditDir\":\"/tmp/gh-aw/sandbox/firewall/audit\"}}" > "${RUNNER_TEMP}/gh-aw/awf-config.json"
- cp "${RUNNER_TEMP}/gh-aw/awf-config.json" /tmp/gh-aw/awf-config.json
- export GH_AW_MODELS_JSON_PATH="/tmp/gh-aw/models.json"
- GH_AW_DOCKER_HOST=""
- if [[ "${DOCKER_HOST:-}" =~ ^tcp:// ]]; then
- GH_AW_DOCKER_HOST="${DOCKER_HOST}"
- fi
- if [[ "${DOCKER_HOST:-}" =~ ^tcp:// ]]; then
- _GH_AW_CHROOT_JSON=$(jq -c --arg src "${RUNNER_TEMP}/gh-aw" --arg user "$(id -un)" --argjson uid "$(id -u)" --argjson gid "$(id -g)" --arg home "${RUNNER_TEMP}/gh-aw/home" '.chroot={"binariesSourcePath":$src,"identity":{"user":$user,"uid":$uid,"gid":$gid,"home":$home}}' "${RUNNER_TEMP}/gh-aw/awf-config.json") || { echo "chroot config patch failed" >&2; exit 1; }
- printf '%s\n' "$_GH_AW_CHROOT_JSON" > "${RUNNER_TEMP}/gh-aw/awf-config.json"
- fi
- GH_AW_TOOL_CACHE_MOUNT=""
- GH_AW_TOOL_CACHE="${RUNNER_TOOL_CACHE:?RUNNER_TOOL_CACHE must be set}"
- if [ -d "$GH_AW_TOOL_CACHE" ]; then
- if [[ "$GH_AW_TOOL_CACHE" != /opt/* ]]; then
- GH_AW_TOOL_CACHE_MOUNT="$GH_AW_TOOL_CACHE:$GH_AW_TOOL_CACHE:ro"
- fi
- fi
- # shellcheck disable=SC1003,SC2016,SC2086
- awf --config "${RUNNER_TEMP}/gh-aw/awf-config.json" --container-workdir "${GITHUB_WORKSPACE}" --mount "${RUNNER_TEMP}/gh-aw:${RUNNER_TEMP}/gh-aw:ro" --mount "${RUNNER_TEMP}/gh-aw:/host${RUNNER_TEMP}/gh-aw:ro" ${GH_AW_TOOL_CACHE_MOUNT:+--mount "$GH_AW_TOOL_CACHE_MOUNT"} ${GH_AW_DOCKER_HOST:+--docker-host "$GH_AW_DOCKER_HOST"} --env-all --exclude-env ACTIONS_ID_TOKEN_REQUEST_TOKEN --exclude-env ACTIONS_ID_TOKEN_REQUEST_URL --exclude-env COPILOT_GITHUB_TOKEN --mount /tmp/gh-aw:/tmp/gh-aw:rw --mount /tmp/gh-aw/threat-detection:/tmp/gh-aw/threat-detection:rw --log-level info --skip-pull \
- -- /bin/bash -c 'set +o histexpand; export PATH="${RUNNER_TEMP}/gh-aw/bin:$PATH" && : "${RUNNER_TOOL_CACHE:?RUNNER_TOOL_CACHE must be set}"; GH_AW_TOOL_CACHE="$RUNNER_TOOL_CACHE"; export PATH="$(find "$GH_AW_TOOL_CACHE" -maxdepth 5 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true; [ -n "$ERLANG_HOME" ] && export PATH="$ERLANG_HOME/bin:$PATH" || true && threat-detect --engine copilot --output /tmp/gh-aw/threat-detection/detection_result.json /tmp/gh-aw/threat-detection' 2>&1 | tee -a /tmp/gh-aw/threat-detection/detection.log
- - name: Render detection log
- if: always() && steps.detection_guard.outputs.run_detection == 'true'
- continue-on-error: true
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
- with:
- script: |
- const path = require('path');
- const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
- const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
- setupGlobals(core, github, context, exec, io, getOctokit);
- const { main } = require(path.join(actionsDir, 'render_detection_log.cjs'));
- await main();
- - name: Copy detection firewall logs
- if: always() && steps.detection_guard.outputs.run_detection == 'true'
- continue-on-error: true
- run: |
- mkdir -p /tmp/gh-aw/threat-detection/sandbox/firewall
- if [ -d /tmp/gh-aw/sandbox/firewall/logs ]; then mkdir -p /tmp/gh-aw/threat-detection/sandbox/firewall/logs && cp -r /tmp/gh-aw/sandbox/firewall/logs/. /tmp/gh-aw/threat-detection/sandbox/firewall/logs/; fi
- if [ -d /tmp/gh-aw/sandbox/firewall/audit ]; then mkdir -p /tmp/gh-aw/threat-detection/sandbox/firewall/audit && cp -r /tmp/gh-aw/sandbox/firewall/audit/. /tmp/gh-aw/threat-detection/sandbox/firewall/audit/; fi
- - name: Upload threat detection artifact
- if: always() && steps.detection_guard.outputs.run_detection == 'true'
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
- with:
- name: detection
- path: |
- /tmp/gh-aw/threat-detection/detection_result.json
- /tmp/gh-aw/threat-detection/sandbox/firewall/logs/
- /tmp/gh-aw/threat-detection/sandbox/firewall/audit/
- if-no-files-found: ignore
- - name: Parse threat detection token usage for step summary
- id: parse_detection_token_usage
- if: always()
- continue-on-error: true
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
- env:
- GH_AW_TOKEN_USAGE_SUMMARY_TITLE: Threat Detection Token Usage
- with:
- script: |
- const path = require('path');
- const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
- const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
- setupGlobals(core, github, context, exec, io, getOctokit);
- const { main } = require(path.join(actionsDir, 'parse_token_usage.cjs'));
- await main();
- - name: Conclude threat detection
- id: detection_conclusion
- if: always()
- continue-on-error: true
- env:
- RUN_DETECTION: ${{ steps.detection_guard.outputs.run_detection }}
- DETECTION_AGENTIC_EXECUTION_OUTCOME: ${{ steps.detection_agentic_execution.outcome }}
- GH_AW_DETECTION_CONTINUE_ON_ERROR: "true"
- run: |
- bash "${RUNNER_TEMP}/gh-aw/actions/conclude_threat_detection.sh" /tmp/gh-aw/threat-detection/detection_result.json
-
- safe_outputs:
- needs:
- - activation
- - agent
- - detection
- if: (!cancelled()) && needs.agent.result != 'skipped' && needs.detection.result == 'success'
- runs-on: ubuntu-slim
- permissions:
- issues: write
- pull-requests: write
- timeout-minutes: 45
- env:
- GH_AW_AGENT_AIC: ${{ needs.agent.outputs.aic }}
- GH_AW_AIC: ${{ needs.agent.outputs.aic }}
- GH_AW_AMBIENT_CONTEXT: ${{ needs.agent.outputs.ambient_context }}
- GH_AW_CALLER_WORKFLOW_ID: "${{ github.repository }}/sdk-consistency-review"
- GH_AW_DETECTION_CONCLUSION: ${{ needs.detection.outputs.detection_conclusion }}
- GH_AW_DETECTION_REASON: ${{ needs.detection.outputs.detection_reason }}
- GH_AW_EFFECTIVE_TOKENS: ${{ needs.agent.outputs.effective_tokens }}
- GH_AW_ENGINE_ID: "copilot"
- GH_AW_ENGINE_MODEL: "${{ vars.GH_AW_MODEL_AGENT_COPILOT || vars.GH_AW_DEFAULT_MODEL_COPILOT || 'claude-sonnet-5' }}"
- GH_AW_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
- GH_AW_RUNTIME_FEATURES: ${{ vars.GH_AW_RUNTIME_FEATURES }}
- GH_AW_THREAT_DETECTION_AIC: ${{ needs.detection.outputs.aic }}
- GH_AW_TRACKER_ID: "sdk-consistency-review"
- GH_AW_WORKFLOW_ID: "sdk-consistency-review"
- GH_AW_WORKFLOW_NAME: "SDK Consistency Review Agent"
- GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/sdk-consistency-review.md"
- outputs:
- code_push_failure_count: ${{ steps.process_safe_outputs.outputs.code_push_failure_count }}
- code_push_failure_errors: ${{ steps.process_safe_outputs.outputs.code_push_failure_errors }}
- comment_id: ${{ steps.process_safe_outputs.outputs.comment_id }}
- comment_url: ${{ steps.process_safe_outputs.outputs.comment_url }}
- create_discussion_error_count: ${{ steps.process_safe_outputs.outputs.create_discussion_error_count }}
- create_discussion_errors: ${{ steps.process_safe_outputs.outputs.create_discussion_errors }}
- process_safe_outputs_items_applied: ${{ steps.process_safe_outputs.outputs.items_applied }}
- process_safe_outputs_items_cancelled: ${{ steps.process_safe_outputs.outputs.items_cancelled }}
- process_safe_outputs_items_deferred: ${{ steps.process_safe_outputs.outputs.items_deferred }}
- process_safe_outputs_items_failed: ${{ steps.process_safe_outputs.outputs.items_failed }}
- process_safe_outputs_items_skipped: ${{ steps.process_safe_outputs.outputs.items_skipped }}
- process_safe_outputs_items_succeeded: ${{ steps.process_safe_outputs.outputs.items_succeeded }}
- process_safe_outputs_items_warnings: ${{ steps.process_safe_outputs.outputs.items_warnings }}
- process_safe_outputs_processed_count: ${{ steps.process_safe_outputs.outputs.processed_count }}
- process_safe_outputs_status: ${{ steps.process_safe_outputs.outputs.status }}
- process_safe_outputs_temporary_id_map: ${{ steps.process_safe_outputs.outputs.temporary_id_map }}
- steps:
- - name: Setup Scripts
- id: setup
- uses: github/gh-aw-actions/setup@9271a1804551c0dc4fb0085a97979950aa2f8489 # v0.88.2
- with:
- destination: ${{ runner.temp }}/gh-aw/actions
- job-name: ${{ github.job }}
- trace-id: ${{ needs.activation.outputs.setup-trace-id }}
- parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }}
- env:
- GH_AW_SETUP_WORKFLOW_NAME: "SDK Consistency Review Agent"
- GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/sdk-consistency-review.lock.yml@${{ github.ref }}
- GH_AW_INFO_VERSION: "1.0.80"
- GH_AW_INFO_AWF_VERSION: "v0.28.12"
- GH_AW_INFO_ENGINE_ID: "copilot"
- - name: Mask OTLP telemetry headers
- run: bash "${RUNNER_TEMP}/gh-aw/actions/mask_otlp_headers.sh"
- - name: Download agent output artifact
- id: download-agent-output
- continue-on-error: true
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
- with:
- pattern: "{agent,agent-output-fallback}"
- merge-multiple: true
- path: /tmp/gh-aw/
- - name: Setup agent output environment variable
- id: setup-agent-output-env
- if: steps.download-agent-output.outcome == 'success'
- run: |
- mkdir -p /tmp/gh-aw/
- find "/tmp/gh-aw/" -type f -print
- if [ -f "/tmp/gh-aw/agent_output.json" ]; then
- echo "GH_AW_AGENT_OUTPUT=/tmp/gh-aw/agent_output.json" >> "$GITHUB_OUTPUT"
- fi
- - name: Configure GH_HOST for enterprise compatibility
- id: ghes-host-config
- shell: bash
- run: | # zizmor: ignore[github-env] - GITHUB_SERVER_URL is set by GitHub Actions, not user input.
- # Derive GH_HOST from GITHUB_SERVER_URL so the gh CLI targets the correct
- # GitHub instance (GHES/GHEC). On github.com this is a harmless no-op.
- GH_HOST="${GITHUB_SERVER_URL#https://}"
- GH_HOST="${GH_HOST#http://}"
- echo "GH_HOST=${GH_HOST}" >> "$GITHUB_ENV"
- - name: Process Safe Outputs
- id: process_safe_outputs
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
- env:
- GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }}
- GH_AW_COMMENT_ID: ${{ needs.activation.outputs.comment_id }}
- GH_AW_ALLOWED_DOMAINS: "api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,s.symcb.com,s.symcd.com,security.ubuntu.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com"
- GITHUB_SERVER_URL: ${{ github.server_url }}
- GITHUB_API_URL: ${{ github.api_url }}
- GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"add_comment\":{\"hide_older_comments\":true,\"max\":1},\"create_pull_request_review_comment\":{\"max\":10,\"side\":\"RIGHT\"},\"create_report_incomplete_issue\":{},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"false\"},\"report_incomplete\":{}}"
- with:
- github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
- script: |
- const path = require('path');
- const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions');
- const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs'));
- setupGlobals(core, github, context, exec, io, getOctokit);
- const { main } = require(path.join(actionsDir, 'process_safe_outputs.cjs'));
- await main();
- - name: Upload Safe Outputs Items
- if: always()
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
- with:
- name: safe-outputs-items
- path: |
- /tmp/gh-aw/safe-output-items.jsonl
- /tmp/gh-aw/temporary-id-map.json
- /tmp/gh-aw/safe-output-errors.json
- if-no-files-found: ignore
diff --git a/.github/workflows/sdk-consistency-review.md b/.github/workflows/sdk-consistency-review.md
deleted file mode 100644
index 8346bcdd63..0000000000
--- a/.github/workflows/sdk-consistency-review.md
+++ /dev/null
@@ -1,147 +0,0 @@
----
-description: Reviews PRs to ensure features are implemented consistently across all SDK language implementations
-tracker-id: sdk-consistency-review
-model: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || vars.GH_AW_DEFAULT_MODEL_COPILOT || 'claude-sonnet-5' }}
-on:
- roles: all
- pull_request:
- types: [opened, synchronize, reopened, ready_for_review]
- paths:
- - "nodejs/**"
- - "python/**"
- - "go/**"
- - "dotnet/**"
- - "java/**"
- - "rust/**"
- - "!java/docs/**"
- - "!java/*.txt"
- - "!java/*.md"
- workflow_dispatch:
- inputs:
- pr_number:
- description: "PR number to review"
- required: true
- type: string
-permissions:
- contents: read
- pull-requests: read
- issues: read
- copilot-requests: write
-tools:
- github:
- toolsets: [default]
-safe-outputs:
- create-pull-request-review-comment:
- max: 10
- add-comment:
- max: 1
- hide-older-comments: true
- allowed-reasons: [outdated]
- threat-detection:
- engine:
- id: copilot
- model: ${{ vars.GH_AW_MODEL_DETECTION_COPILOT || vars.GH_AW_DEFAULT_MODEL_COPILOT || 'claude-sonnet-5' }}
-timeout-minutes: 15
----
-
-
-
-# SDK Consistency Review Agent
-
-You are an AI code reviewer specialized in ensuring consistency across multi-language SDK implementations. This repository contains six SDK implementations (Node.js/TypeScript, Python, Go, .NET, Java, and Rust) that should maintain feature parity and consistent API design.
-
-## Your Task
-
-When a pull request modifies any SDK client code, review it to ensure:
-
-1. **Cross-language consistency**: If a feature is added/modified in one SDK, check whether:
- - The same feature exists in other SDK implementations
- - The feature is implemented consistently across all languages
- - API naming and structure are parallel (accounting for language conventions)
-
-2. **Feature parity**: Identify if this PR creates inconsistencies by:
- - Adding a feature to only one language
- - Changing behavior in one SDK that differs from others
- - Introducing language-specific functionality that should be available everywhere
-
-3. **API design consistency**: Check that:
- - Method/function names follow the same semantic pattern (e.g., `createSession` vs `create_session` vs `CreateSession`)
- - Parameter names and types are equivalent
- - Return types are analogous
- - Error handling patterns are similar
-
-## Context
-
-- Repository: ${{ github.repository }}
-- PR number: ${{ github.event.pull_request.number || inputs.pr_number }}
-- Modified files: Use GitHub tools to fetch the list of changed files
-
-## SDK Locations
-
-Determine the SDK root from the repository tree: use `src/sdk` when the language implementations are nested there (the runtime repository), otherwise use the repository root (the standalone SDK repository). All paths below are relative to that SDK root. Use repository-relative paths, including `src/sdk/` when applicable, when reading files or posting review comments.
-
-- **Node.js/TypeScript**: `nodejs/src/`
-- **Python**: `python/copilot/`
-- **Go**: `go/`
-- **.NET**: `dotnet/src/`
-- **Java**: `java/sdk/src/main/java/`
-- **Rust**: `rust/src/`
-
-In the runtime repository, review SDK changes under `src/sdk/`; use other runtime code only as context, not as a separate SDK implementation.
-
-## Review Process
-
-1. **Get the authoritative PR delta**:
- - Call `pull_request_read` with `method: get_files` for the PR, paginating until all changed files are retrieved
- - Call `pull_request_read` with `method: get_diff` for the PR
- - Treat these GitHub API responses as the only authoritative source of which changes belong to the PR, including when the PR head is a merge commit
- - Base every claim about what the PR adds or modifies on the API diff; use the local checkout only for surrounding context and cross-SDK comparison
- - Never infer the PR base from `HEAD^`, merge-parent ordering, recent commits, or local branch refs
- - If the API file list or diff cannot be retrieved, call `missing_data` and stop; do not substitute an inferred local `git diff` range
-2. **Identify the changed SDK(s)**: Determine which language implementation(s) are modified in the authoritative PR delta
-3. **Analyze the changes**: Understand what feature/fix is being implemented from the authoritative PR delta
-4. **Cross-reference other SDKs**: Check if the equivalent functionality exists in other language implementations:
- - Read the corresponding files in other SDK directories
- - Compare method signatures, behavior, and documentation
-5. **Report findings**: If inconsistencies are found:
- - Use `create-pull-request-review-comment` to add inline comments on specific lines where changes should be made
- - Use `add-comment` to provide a summary of cross-SDK consistency findings
- - Be specific about which SDKs need updates and what changes would bring them into alignment
-
-## Guidelines
-
-1. **Be respectful**: This is a technical review focusing on consistency, not code quality judgments
-2. **Account for language idioms**:
- - TypeScript uses camelCase (e.g., `createSession`)
- - Python uses snake_case (e.g., `create_session`)
- - Go uses PascalCase for exported/public functions (e.g., `CreateSession`) and camelCase for unexported/private functions
- - .NET uses PascalCase (e.g., `CreateSession`)
- - Java uses camelCase for methods (e.g., `createSession`) and PascalCase for classes
- - Rust uses snake_case for functions and methods (e.g., `create_session`) and PascalCase for types
- - Focus on public API methods when comparing across languages
-3. **Focus on API surface**: Prioritize public APIs over internal implementation details
-4. **Distinguish between bugs and features**:
- - Bug fixes in one SDK might reveal bugs in others
- - New features should be considered for all SDKs
-5. **Suggest, don't demand**: Frame feedback as suggestions for maintaining consistency
-6. **Skip trivial changes**: Don't flag minor differences like comment styles or variable naming
-7. **Only comment if there are actual consistency issues**: If the PR maintains consistency or only touches one SDK's internal implementation, acknowledge it positively in a summary comment
-
-## Example Scenarios
-
-### Good: Consistent feature addition
-
-If a PR adds a new `setTimeout` option to the Node.js SDK and the equivalent feature already exists or is added to Python, Go, .NET, Java, and Rust in the same PR.
-
-### Bad: Inconsistent feature
-
-If a PR adds a `withRetry` method to only the Python SDK, but this functionality doesn't exist in other SDKs and would be useful everywhere.
-
-### Good: Language-specific optimization
-
-If a PR optimizes JSON parsing in Go using native libraries specific to Go's ecosystem—this doesn't need to be mirrored exactly in other languages.
-
-## Output Format
-
-- **If consistency issues found**: Add specific review comments pointing to the gaps and suggest which other SDKs need similar changes
-- **If no issues found**: Add a brief summary comment confirming the changes maintain cross-SDK consistency
diff --git a/.github/workflows/sdk-runtime-artifact.yml b/.github/workflows/sdk-runtime-artifact.yml
index b67646bf19..d49e3be680 100644
--- a/.github/workflows/sdk-runtime-artifact.yml
+++ b/.github/workflows/sdk-runtime-artifact.yml
@@ -82,6 +82,7 @@ jobs:
dist-pkg-tarballs/
src/core/sharedApi/runtime-generated/index.d.ts
src/native/runtime/runtime.*.node
+ src/native/runtime/runtime.*.node.metadata
src/native/runtime/copilot-runtime.*
src/native/runtime/index.d.ts
src/native/cli/cli-native.*.node
@@ -151,6 +152,7 @@ jobs:
dist-pkg-tarballs/
src/core/sharedApi/runtime-generated/index.d.ts
src/native/runtime/runtime.*.node
+ src/native/runtime/runtime.*.node.metadata
src/native/runtime/copilot-runtime.*
src/native/runtime/index.d.ts
src/native/cli/cli-native.*.node
diff --git a/.github/workflows/sdk.yml b/.github/workflows/sdk.yml
index bb96fb22fd..94e5ae17bb 100644
--- a/.github/workflows/sdk.yml
+++ b/.github/workflows/sdk.yml
@@ -77,6 +77,7 @@ jobs:
path: |
windows-x64-addons-receipt.txt
src/native/runtime/runtime.win32-x64-msvc.node
+ src/native/runtime/runtime.win32-x64-msvc.node.metadata
src/native/runtime/copilot-runtime.win32-x64-msvc.exe
src/native/runtime/index.d.ts
src/native/cli/cli-native.win32-x64-msvc.node
@@ -124,6 +125,7 @@ jobs:
- name: Verify Windows x64 addons
if: steps.cache.outputs.cache-hit != 'true'
run: |
+ test -s src/native/runtime/runtime.win32-x64-msvc.node.metadata
for artifact in \
src/native/runtime/runtime.win32-x64-msvc.node \
src/native/runtime/copilot-runtime.win32-x64-msvc.exe \
@@ -143,6 +145,7 @@ jobs:
path: |
windows-x64-addons-receipt.txt
src/native/runtime/runtime.win32-x64-msvc.node
+ src/native/runtime/runtime.win32-x64-msvc.node.metadata
src/native/runtime/copilot-runtime.win32-x64-msvc.exe
src/native/runtime/index.d.ts
src/native/cli/cli-native.win32-x64-msvc.node
@@ -154,6 +157,7 @@ jobs:
name: sdk-bazel-cross-addons-win32-x64-release
path: |
src/native/runtime/runtime.win32-x64-msvc.node
+ src/native/runtime/runtime.win32-x64-msvc.node.metadata
src/native/runtime/copilot-runtime.win32-x64-msvc.exe
src/native/runtime/index.d.ts
src/native/cli/cli-native.win32-x64-msvc.node
diff --git a/docs/developer-docs/secrets.md b/docs/developer-docs/secrets.md
index 416a7b6bfb..ff7bd7d79c 100644
--- a/docs/developer-docs/secrets.md
+++ b/docs/developer-docs/secrets.md
@@ -17,13 +17,13 @@ These secrets are used by the authoritative SDK build/test workflow and the publ
These secrets power the GitHub Agentic Workflows (gh-aw) used for issue triage, code generation, and release automation.
* **`COPILOT_GITHUB_TOKEN`**: GitHub OAuth token consumed by the Copilot CLI for AI authentication. Required by all agentic workflows when invoking `copilot` for AI inference.
- * Workflows: `issue-triage.lock.yml`, `issue-classification.lock.yml`, `handle-bug.lock.yml`, `handle-enhancement.lock.yml`, `handle-question.lock.yml`, `handle-documentation.lock.yml`, `java-codegen-check.yml`, `java-codegen-fix.lock.yml`, `java-smoke-test.yml`, `java-adapt-handwritten-code-to-accept-upgrade-changes.lock.yml`, `release-changelog.lock.yml`, `sdk-consistency-review.lock.yml`, `cross-repo-issue-analysis.lock.yml`
+ * Workflows: `issue-triage.lock.yml`, `issue-classification.lock.yml`, `handle-bug.lock.yml`, `handle-enhancement.lock.yml`, `handle-question.lock.yml`, `handle-documentation.lock.yml`, `java-codegen-check.yml`, `java-codegen-fix.lock.yml`, `java-smoke-test.yml`, `java-adapt-handwritten-code-to-accept-upgrade-changes.lock.yml`, `release-changelog.lock.yml`, `cross-repo-issue-analysis.lock.yml`
* **`GH_AW_GITHUB_TOKEN`**: Optional GitHub token override for repository operations (reading code, creating pull requests, and making GitHub API calls). If unset, workflows use the automatic `GITHUB_TOKEN`.
- * Workflows: `issue-triage.lock.yml`, `issue-classification.lock.yml`, `handle-bug.lock.yml`, `handle-enhancement.lock.yml`, `handle-question.lock.yml`, `handle-documentation.lock.yml`, `java-codegen-fix.lock.yml`, `java-adapt-handwritten-code-to-accept-upgrade-changes.lock.yml`, `release-changelog.lock.yml`, `sdk-consistency-review.lock.yml`, `cross-repo-issue-analysis.lock.yml`
+ * Workflows: `issue-triage.lock.yml`, `issue-classification.lock.yml`, `handle-bug.lock.yml`, `handle-enhancement.lock.yml`, `handle-question.lock.yml`, `handle-documentation.lock.yml`, `java-codegen-fix.lock.yml`, `java-adapt-handwritten-code-to-accept-upgrade-changes.lock.yml`, `release-changelog.lock.yml`, `cross-repo-issue-analysis.lock.yml`
* **`GH_AW_GITHUB_MCP_SERVER_TOKEN`**: Optional token override for the GitHub MCP server container. If unset, workflows fall back to `GH_AW_GITHUB_TOKEN` and then the automatic `GITHUB_TOKEN`.
- * Workflows: `issue-triage.lock.yml`, `issue-classification.lock.yml`, `handle-bug.lock.yml`, `handle-enhancement.lock.yml`, `handle-question.lock.yml`, `handle-documentation.lock.yml`, `java-codegen-fix.lock.yml`, `java-adapt-handwritten-code-to-accept-upgrade-changes.lock.yml`, `release-changelog.lock.yml`, `sdk-consistency-review.lock.yml`, `cross-repo-issue-analysis.lock.yml`
+ * Workflows: `issue-triage.lock.yml`, `issue-classification.lock.yml`, `handle-bug.lock.yml`, `handle-enhancement.lock.yml`, `handle-question.lock.yml`, `handle-documentation.lock.yml`, `java-codegen-fix.lock.yml`, `java-adapt-handwritten-code-to-accept-upgrade-changes.lock.yml`, `release-changelog.lock.yml`, `cross-repo-issue-analysis.lock.yml`
* **`GH_AW_CI_TRIGGER_TOKEN`**: Token used to trigger CI workflows from within agentic workflow runs.
* Workflows: `java-codegen-fix.lock.yml`, `java-adapt-handwritten-code-to-accept-upgrade-changes.lock.yml`, `release-changelog.lock.yml`
diff --git a/dotnet/src/Generated/Rpc.cs b/dotnet/src/Generated/Rpc.cs
index f4b993c288..751de8706a 100644
--- a/dotnet/src/Generated/Rpc.cs
+++ b/dotnet/src/Generated/Rpc.cs
@@ -6999,95 +6999,15 @@ internal sealed class SessionGitHubAuthLastAuthErrorsRequest
public string SessionId { get; set; } = string.Empty;
}
-/// A file included in the session debug bundle.
-[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed class DebugCollectLogsCollectedEntry
-{
- /// Relative path of the file in the staged bundle/archive.
- [JsonPropertyName("bundlePath")]
- public string BundlePath { get; set; } = string.Empty;
-
- /// Redacted output size in bytes.
- [JsonPropertyName("sizeBytes")]
- public long SizeBytes { get; set; }
-
- /// Source category for this entry.
- [JsonPropertyName("source")]
- public DebugCollectLogsSource Source { get; set; }
-}
-
-/// An optional debug bundle entry that could not be included.
-[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed class DebugCollectLogsSkippedEntry
-{
- /// Relative path requested for this bundle entry.
- [JsonPropertyName("bundlePath")]
- public string BundlePath { get; set; } = string.Empty;
-
- /// Server-local source path that could not be read.
- [JsonPropertyName("path")]
- public string? Path { get; set; }
-
- /// Reason the entry was skipped.
- [JsonPropertyName("reason")]
- public string Reason { get; set; } = string.Empty;
-}
-
-/// Result of collecting a session debug bundle.
-[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed class DebugCollectLogsResult
-{
- /// Files included in the bundle.
- [JsonPropertyName("entries")]
- public IList Entries { get => field ??= []; set; }
-
- /// Destination kind that was written.
- [JsonPropertyName("kind")]
- public DebugCollectLogsResultKind Kind { get; set; }
-
- /// Actual archive path or staging directory path written. This may differ from the requested path when no-overwrite suffixing or fallback-to-temp-directory was needed.
- [JsonPropertyName("path")]
- public string Path { get; set; } = string.Empty;
-
- /// Optional files or directories that could not be included.
- [JsonPropertyName("skippedEntries")]
- public IList? SkippedEntries { get; set; }
-}
-
-/// A caller-provided server-local file or directory to include in the debug bundle.
-[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed class DebugCollectLogsEntry
-{
- /// Relative path to use inside the staged bundle/archive.
- [JsonPropertyName("bundlePath")]
- public string BundlePath { get; set; } = string.Empty;
-
- /// Kind of source path to include.
- [JsonPropertyName("kind")]
- public DebugCollectLogsEntryKind Kind { get; set; }
-
- /// Server-local source path to read.
- [JsonPropertyName("path")]
- public string Path { get; set; } = string.Empty;
-
- /// How text content from this entry should be redacted. Defaults to plain-text. With none, no redaction is applied; the caller must ensure any necessary redaction is performed before this call.
- [JsonPropertyName("redaction")]
- public DebugCollectLogsRedaction? Redaction { get; set; }
-
- /// When true, collection fails if this entry cannot be read. Defaults to false, which records the entry in `skippedEntries`.
- [JsonPropertyName("required")]
- public bool? Required { get; set; }
-}
-
-/// Destination for the session debug bundle.
+/// The enumerated collection, keyed by the same selector as the query.
/// Polymorphic base type discriminated by kind.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
[JsonPolymorphic(
TypeDiscriminatorPropertyName = "kind",
UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FallBackToBaseType)]
-[JsonDerivedType(typeof(DebugCollectLogsDestinationArchive), "archive")]
-[JsonDerivedType(typeof(DebugCollectLogsDestinationDirectory), "directory")]
-public partial class DebugCollectLogsDestination
+[JsonDerivedType(typeof(AuthEnumerateValueAccounts), "accounts")]
+[JsonDerivedType(typeof(AuthEnumerateValueProviders), "providers")]
+public partial class AuthEnumerateValue
{
/// The type discriminator.
[JsonPropertyName("kind")]
@@ -7095,1418 +7015,941 @@ public partial class DebugCollectLogsDestination
}
-/// The archive variant of .
-[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public partial class DebugCollectLogsDestinationArchive : DebugCollectLogsDestination
-{
- ///
- [JsonIgnore]
- public override string Kind => "archive";
-
- /// When true, create the archive atomically without overwriting an existing file by appending ` (N)` before the extension as needed. Defaults to false.
- [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
- [JsonPropertyName("noOverwrite")]
- public bool? NoOverwrite { get; set; }
-
- /// Absolute or server-relative path for the .tgz archive to create.
- [JsonPropertyName("outputPath")]
- public required string OutputPath { get; set; }
-}
-
-/// The directory variant of .
+/// One signed-in account in the roster forest.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public partial class DebugCollectLogsDestinationDirectory : DebugCollectLogsDestination
+public sealed class AccountStatus
{
- ///
- [JsonIgnore]
- public override string Kind => "directory";
+ /// Whether this is the active account.
+ [JsonPropertyName("active")]
+ public bool Active { get; set; }
- /// Directory where files should be staged. The directory is created if needed.
- [JsonPropertyName("outputDirectory")]
- public required string OutputDirectory { get; set; }
-}
+ /// Opaque id of the account this one was derived from (e.g. an EMU account's base Entra identity); absent for a root account. Matches the base identity account's selectionId, forming the derivation edge.
+ [JsonPropertyName("derivedFrom")]
+ public string? DerivedFrom { get; set; }
-/// Built-in session diagnostics to include in the bundle. Omitted fields default to true.
-[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed class DebugCollectLogsInclude
-{
- /// Server-local path to the current process log. When set, it is included as `process.log` and its directory is searched for prior logs from the same session.
- [JsonPropertyName("currentProcessLogPath")]
- public string? CurrentProcessLogPath { get; set; }
-
- /// Include the session event log (`events.jsonl`). Defaults to true.
- [JsonPropertyName("events")]
- public bool? Events { get; set; }
-
- /// Server-local path to the session's events.jsonl file. Internal callers normally omit this and let the runtime derive it from the session.
- [JsonPropertyName("eventsPath")]
- public string? EventsPath { get; set; }
-
- /// Maximum number of previous process logs to include. Defaults to 5.
- [JsonPropertyName("previousProcessLogLimit")]
- public long? PreviousProcessLogLimit { get; set; }
-
- /// Server-local process log directory to search when `currentProcessLogPath` is unavailable, useful for collecting logs for inactive sessions.
- [JsonPropertyName("processLogDirectory")]
- public string? ProcessLogDirectory { get; set; }
-
- /// Include process logs for the session. Defaults to true.
- [JsonPropertyName("processLogs")]
- public bool? ProcessLogs { get; set; }
-
- /// Include interactive shell logs written under the session's `shell-logs` directory. Defaults to true.
- [JsonPropertyName("shellLogs")]
- public bool? ShellLogs { get; set; }
-}
-
-/// Options for collecting a session debug bundle with configurable redaction.
-[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-internal sealed class DebugCollectLogsRequest
-{
- /// Caller-provided server-local files or directories to include in addition to the runtime's built-in session diagnostics. This lets host applications add their own diagnostics without changing the API shape.
- [JsonPropertyName("additionalEntries")]
- public IList? AdditionalEntries { get; set; }
-
- /// Where the bundle should be written. Use `archive` to produce a .tgz, or `directory` to stage files for caller-managed upload/post-processing.
- [JsonPropertyName("destination")]
- public DebugCollectLogsDestination Destination { get => field ??= new(); set; }
-
- /// Which built-in session diagnostics to include. Omitted fields default to true.
- [JsonPropertyName("include")]
- public DebugCollectLogsInclude? Include { get; set; }
-
- /// Target session identifier.
- [JsonPropertyName("sessionId")]
- public string SessionId { get; set; } = string.Empty;
-}
-
-/// Canvas action that the agent or host can invoke. To discover the input schema for a particular action, call the list_canvas_capabilities tool.
-[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed class CanvasAction
-{
- /// Description of the action.
- [JsonPropertyName("description")]
- public string? Description { get; set; }
-
- /// JSON Schema for the action input.
- [JsonPropertyName("inputSchema")]
- public JsonElement? InputSchema { get; set; }
-
- /// Action name exposed by the canvas provider.
- [JsonPropertyName("name")]
- public string Name { get; set; } = string.Empty;
-}
-
-/// Canvas available in the current session.
-[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed class DiscoveredCanvas
-{
- /// Actions the agent or host may invoke on an open instance.
- [JsonPropertyName("actions")]
- public IList? Actions { get; set; }
-
- /// Provider-local canvas identifier.
- [JsonPropertyName("canvasId")]
- public string CanvasId { get; set; } = string.Empty;
-
- /// Short, single-sentence description shown to the agent in canvas catalogs.
- [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Safe for generated string properties: JSON Schema minLength/maxLength map to string length validation, not reflection over trimmed Count members")]
- [MinLength(1)]
- [JsonPropertyName("description")]
- public string Description { get; set; } = string.Empty;
-
- /// Human-readable canvas name.
- [JsonPropertyName("displayName")]
- public string DisplayName { get; set; } = string.Empty;
-
- /// Owning provider identifier.
- [JsonPropertyName("extensionId")]
- public string ExtensionId { get; set; } = string.Empty;
+ /// Authentication host URL.
+ [Url]
+ [StringSyntax(StringSyntaxAttribute.Uri)]
+ [JsonPropertyName("host")]
+ public string Host { get; set; } = string.Empty;
- /// Owning extension display name, when available.
- [JsonPropertyName("extensionName")]
- public string? ExtensionName { get; set; }
+ /// The provider kind of this account.
+ [JsonPropertyName("kind")]
+ public AccountKind Kind { get; set; }
- /// Host-local PNG path for the canvas icon, when supplied.
- [JsonPropertyName("icon")]
- public string? Icon { get; set; }
+ /// Authenticated login/username.
+ [JsonPropertyName("login")]
+ public string Login { get; set; } = string.Empty;
- /// JSON Schema for canvas open input.
- [JsonPropertyName("inputSchema")]
- public JsonElement? InputSchema { get; set; }
+ /// Opaque selection id used to switch to, or log out, this account.
+ [JsonPropertyName("selectionId")]
+ public string SelectionId { get; set; } = string.Empty;
}
-/// Declared canvases available in this session.
+/// The accounts variant of .
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed class CanvasList
+public partial class AuthEnumerateValueAccounts : AuthEnumerateValue
{
- /// Declared canvases available in this session.
- [JsonPropertyName("canvases")]
- public IList Canvases { get => field ??= []; set; }
-}
+ ///
+ [JsonIgnore]
+ public override string Kind => "accounts";
-/// Identifies the target session.
-[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-internal sealed class SessionCanvasListRequest
-{
- /// Target session identifier.
- [JsonPropertyName("sessionId")]
- public string SessionId { get; set; } = string.Empty;
+ /// The signed-in account forest; empty when not logged in.
+ [JsonPropertyName("items")]
+ public required IList Items { get; set; }
}
-/// Open canvas instance snapshot.
+/// A provider offered for interactive login.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed class OpenCanvasInstance
+public sealed class ProviderDescriptor
{
- /// Provider-local canvas identifier.
- [JsonPropertyName("canvasId")]
- public string CanvasId { get; set; } = string.Empty;
-
- /// Owning provider identifier.
- [JsonPropertyName("extensionId")]
- public string ExtensionId { get; set; } = string.Empty;
-
- /// Owning extension display name, when available.
- [JsonPropertyName("extensionName")]
- public string? ExtensionName { get; set; }
-
- /// Host-local PNG path for the canvas icon, when supplied.
- [JsonPropertyName("icon")]
- public string? Icon { get; set; }
-
- /// Input supplied when the instance was opened.
- [JsonPropertyName("input")]
- public JsonElement? Input { get; set; }
-
- /// Stable caller-supplied canvas instance identifier.
- [JsonPropertyName("instanceId")]
- public string InstanceId { get; set; } = string.Empty;
-
- /// Provider-supplied status text.
- [JsonPropertyName("status")]
- public string? Status { get; set; }
-
- /// Rendered title.
- [JsonPropertyName("title")]
- public string? Title { get; set; }
-
- /// URL for web-rendered canvases.
- [JsonPropertyName("url")]
- public string? Url { get; set; }
-}
+ /// Whether this provider is currently available to sign in with.
+ [JsonPropertyName("available")]
+ public bool Available { get; set; }
-/// Live open-canvas snapshot.
-[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed class CanvasListOpenResult
-{
- /// Currently open canvas instances.
- [JsonPropertyName("openCanvases")]
- public IList OpenCanvases { get => field ??= []; set; }
-}
+ /// The neutral provider kind.
+ [JsonPropertyName("kind")]
+ public LoginProviderKind Kind { get; set; }
-/// Identifies the target session.
-[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-internal sealed class SessionCanvasListOpenRequest
-{
- /// Target session identifier.
- [JsonPropertyName("sessionId")]
- public string SessionId { get; set; } = string.Empty;
+ /// Human-readable menu label, owned by the runtime so every consumer renders identical text.
+ [JsonPropertyName("label")]
+ public string Label { get; set; } = string.Empty;
}
-/// Canvas open parameters.
+/// The providers variant of .
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-internal sealed class CanvasOpenRequest
+public partial class AuthEnumerateValueProviders : AuthEnumerateValue
{
- /// Provider-local canvas identifier.
- [JsonPropertyName("canvasId")]
- public string CanvasId { get; set; } = string.Empty;
-
- /// Owning provider identifier. Optional when the canvasId is unique across providers; required to disambiguate when multiple providers register the same canvasId.
- [JsonPropertyName("extensionId")]
- public string? ExtensionId { get; set; }
-
- /// Canvas open input.
- [JsonPropertyName("input")]
- public JsonElement? Input { get; set; }
-
- /// Caller-supplied stable instance identifier.
- [JsonPropertyName("instanceId")]
- public string InstanceId { get; set; } = string.Empty;
+ ///
+ [JsonIgnore]
+ public override string Kind => "providers";
- /// Target session identifier.
- [JsonPropertyName("sessionId")]
- public string SessionId { get; set; } = string.Empty;
+ /// The providers offered for interactive login.
+ [JsonPropertyName("items")]
+ public required IList Items { get; set; }
}
-/// Canvas close parameters.
+/// Selects which accounts collection to enumerate. A no-arg selector is the empty-payload variant.
+/// Polymorphic base type discriminated by kind.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-internal sealed class CanvasCloseRequest
+[JsonPolymorphic(
+ TypeDiscriminatorPropertyName = "kind",
+ UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FallBackToBaseType)]
+[JsonDerivedType(typeof(AuthEnumerateQueryAccounts), "accounts")]
+[JsonDerivedType(typeof(AuthEnumerateQueryProviders), "providers")]
+public partial class AuthEnumerateQuery
{
- /// Open canvas instance identifier.
- [JsonPropertyName("instanceId")]
- public string InstanceId { get; set; } = string.Empty;
-
- /// Target session identifier.
- [JsonPropertyName("sessionId")]
- public string SessionId { get; set; } = string.Empty;
+ /// The type discriminator.
+ [JsonPropertyName("kind")]
+ public virtual string Kind { get; set; } = string.Empty;
}
-/// Canvas action invocation result.
-[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed class CanvasActionInvokeResult
-{
- /// Provider-supplied action result.
- [JsonPropertyName("result")]
- public JsonElement? Result { get; set; }
-}
-/// Canvas action invocation parameters.
+/// The accounts variant of .
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-internal sealed class CanvasActionInvokeRequest
+public partial class AuthEnumerateQueryAccounts : AuthEnumerateQuery
{
- /// Action name to invoke.
- [JsonPropertyName("actionName")]
- public string ActionName { get; set; } = string.Empty;
-
- /// Action input.
- [JsonPropertyName("input")]
- public JsonElement? Input { get; set; }
-
- /// Open canvas instance identifier.
- [JsonPropertyName("instanceId")]
- public string InstanceId { get; set; } = string.Empty;
-
- /// Target session identifier.
- [JsonPropertyName("sessionId")]
- public string SessionId { get; set; } = string.Empty;
+ ///
+ [JsonIgnore]
+ public override string Kind => "accounts";
}
-/// Internal canvas provider registration parameters.
+/// The providers variant of .
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-internal sealed class CanvasProviderRegisterRequest
+public partial class AuthEnumerateQueryProviders : AuthEnumerateQuery
{
- /// Canvas contributions supplied by the provider.
- [JsonPropertyName("canvases")]
- public IList Canvases { get => field ??= []; set; }
-
- /// Connection identifier for callback routing.
- [JsonPropertyName("connectionId")]
- public string ConnectionId { get; set; } = string.Empty;
-
- /// Provider metadata supplied by the host.
- [JsonPropertyName("info")]
- public JsonElement Info { get; set; }
+ ///
+ [JsonIgnore]
+ public override string Kind => "providers";
- /// Target session identifier.
- [JsonPropertyName("sessionId")]
- public string SessionId { get; set; } = string.Empty;
+ /// Whether an interactive Entra broker is available on the host; gates Entra availability in the returned list.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("brokerAvailable")]
+ public bool? BrokerAvailable { get; set; }
}
-/// Internal canvas provider unregistration parameters.
+/// Enumerate request carrying the typed collection query.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-internal sealed class CanvasProviderUnregisterRequest
+internal sealed class AccountsEnumerateRequest
{
- /// Connection identifier to unregister.
- [JsonPropertyName("connectionId")]
- public string ConnectionId { get; set; } = string.Empty;
+ /// Which typed accounts collection to enumerate.
+ [JsonPropertyName("query")]
+ public AuthEnumerateQuery Query { get => field ??= new(); set; }
/// Target session identifier.
[JsonPropertyName("sessionId")]
public string SessionId { get; set; } = string.Empty;
}
-/// Machine-readable factory run failure.
-/// Polymorphic base type discriminated by type.
+/// The read result, keyed by the same selector as the query.
+/// Polymorphic base type discriminated by kind.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
[JsonPolymorphic(
- TypeDiscriminatorPropertyName = "type",
+ TypeDiscriminatorPropertyName = "kind",
UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FallBackToBaseType)]
-[JsonDerivedType(typeof(FactoryRunFailureFactoryLimitReached), "factory_limit_reached")]
-[JsonDerivedType(typeof(FactoryRunFailureFactoryResumeDeclined), "factory_resume_declined")]
-[JsonDerivedType(typeof(FactoryRunFailureFactoryDurableFailure), "factory_durable_failure")]
-[JsonDerivedType(typeof(FactoryRunFailureFactoryAccountingIncomplete), "factory_accounting_incomplete")]
-[JsonDerivedType(typeof(FactoryRunFailureFactoryProviderDisconnected), "factory_provider_disconnected")]
-public partial class FactoryRunFailure
+[JsonDerivedType(typeof(AuthReadValueActiveAccount), "activeAccount")]
+[JsonDerivedType(typeof(AuthReadValueStatus), "status")]
+[JsonDerivedType(typeof(AuthReadValueLastErrors), "lastErrors")]
+public partial class AuthReadValue
{
/// The type discriminator.
- [JsonPropertyName("type")]
- public virtual string Type { get; set; } = string.Empty;
+ [JsonPropertyName("kind")]
+ public virtual string Kind { get; set; } = string.Empty;
}
-/// The factory_limit_reached variant of .
+/// The activeAccount variant of .
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public partial class FactoryRunFailureFactoryLimitReached : FactoryRunFailure
+public partial class AuthReadValueActiveAccount : AuthReadValue
{
///
[JsonIgnore]
- public override string Type => "factory_limit_reached";
-
- /// Resource ceiling that stopped the run.
- [JsonPropertyName("kind")]
- public required FactoryRunFailureKind Kind { get; set; }
-
- /// Factory run identifier.
- [JsonPropertyName("runId")]
- public required string RunId { get; set; }
+ public override string Kind => "activeAccount";
- /// Suggested larger ceiling when the runtime can derive one safely.
+ /// The active account, or absent when not logged in.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
- [JsonPropertyName("suggestedValue")]
- public double? SuggestedValue { get; set; }
-
- /// Approved effective ceiling that was reached.
- [JsonPropertyName("value")]
- public required double Value { get; set; }
+ [JsonPropertyName("account")]
+ public AccountStatus? Account { get; set; }
}
-/// The factory_resume_declined variant of .
+/// Neutral authentication status summary.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public partial class FactoryRunFailureFactoryResumeDeclined : FactoryRunFailure
+public sealed class AuthStatusDto
{
- ///
- [JsonIgnore]
- public override string Type => "factory_resume_declined";
+ /// Number of signed-in accounts in the roster.
+ [JsonPropertyName("accountCount")]
+ public long AccountCount { get; set; }
- /// Human-readable reason the resume did not proceed.
- [JsonPropertyName("reason")]
- public required string Reason { get; set; }
-
- /// Factory run identifier whose changed limits were declined.
- [JsonPropertyName("runId")]
- public required string RunId { get; set; }
-}
-
-/// The factory_durable_failure variant of .
-[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public partial class FactoryRunFailureFactoryDurableFailure : FactoryRunFailure
-{
- ///
- [JsonIgnore]
- public override string Type => "factory_durable_failure";
+ /// Active account host, if authenticated.
+ [Url]
+ [StringSyntax(StringSyntaxAttribute.Uri)]
+ [JsonPropertyName("activeHost")]
+ public string? ActiveHost { get; set; }
- /// Stable failure code.
- [JsonPropertyName("code")]
- public required string Code { get; set; }
+ /// Active account login, if authenticated.
+ [JsonPropertyName("activeLogin")]
+ public string? ActiveLogin { get; set; }
- /// Execution-critical durable operation that failed.
- [JsonPropertyName("operation")]
- public required FactoryDurableOperation Operation { get; set; }
+ /// Copilot plan tier of the active account, if known.
+ [JsonPropertyName("copilotPlan")]
+ public string? CopilotPlan { get; set; }
- /// Factory run identifier.
- [JsonPropertyName("runId")]
- public required string RunId { get; set; }
+ /// Whether the session has resolved authentication.
+ [JsonPropertyName("isAuthenticated")]
+ public bool IsAuthenticated { get; set; }
}
-/// The run stopped because its usage accounting could not be completed.
-/// The factory_accounting_incomplete variant of .
+/// The status variant of .
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public partial class FactoryRunFailureFactoryAccountingIncomplete : FactoryRunFailure
+public partial class AuthReadValueStatus : AuthReadValue
{
///
[JsonIgnore]
- public override string Type => "factory_accounting_incomplete";
-
- /// Confirmed usage in nano-AIU, representing the floor of what the run spent.
- [JsonPropertyName("drainedNanoAiu")]
- public required long DrainedNanoAiu { get; set; }
+ public override string Kind => "status";
- /// Factory run identifier.
- [JsonPropertyName("runId")]
- public required string RunId { get; set; }
+ /// The neutral authentication status summary.
+ [JsonPropertyName("status")]
+ public required AuthStatusDto Status { get; set; }
}
-/// The extension that owns the factory disconnected while the run was executing, so the host halted it. The run's journaled subagent results are preserved so a resume can reuse them.
-/// The factory_provider_disconnected variant of .
+/// The lastErrors variant of .
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public partial class FactoryRunFailureFactoryProviderDisconnected : FactoryRunFailure
+public partial class AuthReadValueLastErrors : AuthReadValue
{
///
[JsonIgnore]
- public override string Type => "factory_provider_disconnected";
+ public override string Kind => "lastErrors";
- /// Factory run identifier.
- [JsonPropertyName("runId")]
- public required string RunId { get; set; }
+ /// Validation errors from the most recent authentication attempt.
+ [JsonPropertyName("errors")]
+ public required IList Errors { get; set; }
}
-/// Durable metadata describing who initiated a factory pause.
-/// Polymorphic base type discriminated by type.
+/// Selects which typed accounts datum to read.
+/// Polymorphic base type discriminated by kind.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
[JsonPolymorphic(
- TypeDiscriminatorPropertyName = "type",
+ TypeDiscriminatorPropertyName = "kind",
UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FallBackToBaseType)]
-[JsonDerivedType(typeof(FactoryPauseInfoUser), "user")]
-[JsonDerivedType(typeof(FactoryPauseInfoCheckpoint), "checkpoint")]
-public partial class FactoryPauseInfo
+[JsonDerivedType(typeof(AuthReadQueryActiveAccount), "activeAccount")]
+[JsonDerivedType(typeof(AuthReadQueryStatus), "status")]
+[JsonDerivedType(typeof(AuthReadQueryLastErrors), "lastErrors")]
+public partial class AuthReadQuery
{
/// The type discriminator.
- [JsonPropertyName("type")]
- public virtual string Type { get; set; } = string.Empty;
+ [JsonPropertyName("kind")]
+ public virtual string Kind { get; set; } = string.Empty;
}
-/// The user variant of .
+/// The activeAccount variant of .
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public partial class FactoryPauseInfoUser : FactoryPauseInfo
+public partial class AuthReadQueryActiveAccount : AuthReadQuery
{
///
[JsonIgnore]
- public override string Type => "user";
+ public override string Kind => "activeAccount";
}
-/// The checkpoint variant of .
+/// The status variant of .
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public partial class FactoryPauseInfoCheckpoint : FactoryPauseInfo
+public partial class AuthReadQueryStatus : AuthReadQuery
{
///
[JsonIgnore]
- public override string Type => "checkpoint";
-
- /// Stable author-defined checkpoint key that initiated the pause.
- [JsonPropertyName("key")]
- public required string Key { get; set; }
-}
-
-/// Complete current or terminal factory run envelope.
-[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed class FactoryRunResult
-{
- /// One-based execution attempt represented by this envelope. Absent before the first attempt starts or when returned by an older runtime.
- [JsonPropertyName("attempt")]
- public long? Attempt { get; set; }
-
- /// Error message for an errored run.
- [JsonPropertyName("error")]
- public string? Error { get; set; }
-
- /// Machine-readable failure details for a halted or errored run.
- [JsonPropertyName("failure")]
- public FactoryRunFailure? Failure { get; set; }
-
- /// Structured pause initiator metadata for a paused attempt.
- [JsonPropertyName("pauseInfo")]
- public FactoryPauseInfo? PauseInfo { get; set; }
-
- /// Reason for a halted or cancelled run.
- [JsonPropertyName("reason")]
- public string? Reason { get; set; }
-
- /// Completed factory result.
- [JsonPropertyName("result")]
- public JsonElement? Result { get; set; }
-
- /// Factory run identifier.
- [JsonPropertyName("runId")]
- public string RunId { get; set; } = string.Empty;
-
- /// Partial journal and progress snapshot for a halted, cancelled, or errored run.
- [JsonPropertyName("snapshot")]
- public JsonElement? Snapshot { get; set; }
-
- /// Current or terminal factory run status.
- [JsonPropertyName("status")]
- public FactoryRunStatus Status { get; set; }
-}
-
-/// Wire-only per-invocation factory resource ceiling overrides.
-[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed class FactoryRunLimits
-{
- /// Maximum AI credits consumed by factory subagents and their descendants. The post-paid ceiling is soft: parallel turns can settle beyond it before the run stops.
- [JsonPropertyName("maxAiCredits")]
- public double? MaxAiCredits { get; set; }
-
- /// Maximum number of factory subagents that may run concurrently.
- [JsonPropertyName("maxConcurrentSubagents")]
- public long? MaxConcurrentSubagents { get; set; }
-
- /// Maximum total number of factory subagents that may be admitted.
- [JsonPropertyName("maxTotalSubagents")]
- public long? MaxTotalSubagents { get; set; }
-
- /// Maximum accumulated active-execution time in seconds. Active execution includes the entire extension body, subprocess waits, queued-agent waits, and sleeps; time between resumed attempts is not counted.
- [JsonPropertyName("timeoutSeconds")]
- public double? TimeoutSeconds { get; set; }
+ public override string Kind => "status";
}
-/// Options controlling factory invocation.
+/// The lastErrors variant of .
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed class RunOptions
+public partial class AuthReadQueryLastErrors : AuthReadQuery
{
- /// Per-invocation resource ceiling overrides.
- [JsonPropertyName("limits")]
- public FactoryRunLimits? Limits { get; set; }
-
- /// Whether to emit factory phase names to the session transcript.
- [JsonPropertyName("logPhaseNames")]
- public bool? LogPhaseNames { get; set; }
-
- /// Whether to notify the originating session when the factory completes.
- [JsonPropertyName("notifyOnComplete")]
- public bool? NotifyOnComplete { get; set; }
-
- /// Run identifier whose journal and progress should seed this resumed run.
- [JsonPropertyName("resumeFromRunId")]
- public string? ResumeFromRunId { get; set; }
+ ///
+ [JsonIgnore]
+ public override string Kind => "lastErrors";
}
-/// Parameters for invoking a registered factory.
+/// Read request carrying the typed datum query.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-internal sealed class FactoryRunRequest
+internal sealed class AccountsGetRequest
{
- /// Factory input value.
- [JsonPropertyName("args")]
- public JsonElement Args { get; set; }
-
- /// Registered factory name.
- [JsonPropertyName("name")]
- public string Name { get; set; } = string.Empty;
-
- /// Factory invocation options.
- [JsonPropertyName("options")]
- public RunOptions? Options { get; set; }
+ /// Which typed accounts datum to read.
+ [JsonPropertyName("query")]
+ public AuthReadQuery Query { get => field ??= new(); set; }
/// Target session identifier.
[JsonPropertyName("sessionId")]
public string SessionId { get; set; } = string.Empty;
}
-/// Resolved persisted factory identity and resumed run envelope.
+/// Result of a non-interactive accounts mutation.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed class FactoryResumeResult
+public sealed class AuthWriteResult
{
- /// Persisted factory name resolved for the resumed run.
- [JsonPropertyName("factoryName")]
- public string FactoryName { get; set; } = string.Empty;
+ /// For a logout, whether other signed-in accounts remain.
+ [JsonPropertyName("moreUsers")]
+ public bool? MoreUsers { get; set; }
- /// Terminal resumed run envelope.
- [JsonPropertyName("run")]
- public FactoryRunResult Run { get => field ??= new(); set; }
+ /// Whether the mutation was applied.
+ [JsonPropertyName("ok")]
+ public bool Ok { get; set; }
}
-/// Parameters for resuming a factory run from its persisted identity.
+/// One non-interactive accounts mutation command (the selector is fused with its typed args).
+/// Polymorphic base type discriminated by kind.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-internal sealed class FactoryResumeRequest
+[JsonPolymorphic(
+ TypeDiscriminatorPropertyName = "kind",
+ UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FallBackToBaseType)]
+[JsonDerivedType(typeof(AuthWriteSwitchActive), "switchActive")]
+[JsonDerivedType(typeof(AuthWriteLogout), "logout")]
+[JsonDerivedType(typeof(AuthWriteSetCredentials), "setCredentials")]
+public partial class AuthWrite
{
- /// Optional per-invocation resource ceiling overrides.
- [JsonPropertyName("limits")]
- public FactoryRunLimits? Limits { get; set; }
-
- /// Whether to emit factory phase names to the session transcript.
- [JsonPropertyName("logPhaseNames")]
- public bool? LogPhaseNames { get; set; }
-
- /// Whether to notify the originating session when the factory completes.
- [JsonPropertyName("notifyOnComplete")]
- public bool? NotifyOnComplete { get; set; }
-
- /// Factory run identifier.
- [JsonPropertyName("runId")]
- public string RunId { get; set; } = string.Empty;
-
- /// Target session identifier.
- [JsonPropertyName("sessionId")]
- public string SessionId { get; set; } = string.Empty;
+ /// The type discriminator.
+ [JsonPropertyName("kind")]
+ public virtual string Kind { get; set; } = string.Empty;
}
-/// Options for an internal tool-originated factory invocation.
+
+/// The switchActive variant of .
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-internal sealed class FactoryToolRunOptions
+public partial class AuthWriteSwitchActive : AuthWrite
{
- /// Per-invocation resource ceiling overrides.
- [JsonPropertyName("limits")]
- public FactoryRunLimits? Limits { get; set; }
+ ///
+ [JsonIgnore]
+ public override string Kind => "switchActive";
- /// Run identifier whose journal and progress should seed this resumed run.
- [JsonPropertyName("resumeFromRunId")]
- public string? ResumeFromRunId { get; set; }
+ /// Opaque selection id of the account to make active.
+ [JsonPropertyName("selectionId")]
+ public required string SelectionId { get; set; }
}
-/// Internal parameters for invoking a registered factory from a tool.
+/// The logout variant of .
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-internal sealed class FactoryToolRunRequest
+public partial class AuthWriteLogout : AuthWrite
{
- /// Factory input value.
- [JsonPropertyName("args")]
- public JsonElement Args { get; set; }
-
- /// Registered factory name.
- [JsonPropertyName("name")]
- public string Name { get; set; } = string.Empty;
-
- /// Tool-originated factory invocation options.
- [JsonPropertyName("options")]
- public FactoryToolRunOptions? Options { get; set; }
-
- /// Target session identifier.
- [JsonPropertyName("sessionId")]
- public string SessionId { get; set; } = string.Empty;
+ ///
+ [JsonIgnore]
+ public override string Kind => "logout";
- /// Opaque identifier of the originating tool call.
- [JsonPropertyName("toolCallId")]
- public string? ToolCallId { get; set; }
+ /// Opaque selection id of the account to log out; absent logs out the active account.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("selectionId")]
+ public string? SelectionId { get; set; }
}
-/// Internal parameters for resuming a factory run from a tool.
+/// The setCredentials variant of .
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-internal sealed class FactoryToolResumeRequest
+public partial class AuthWriteSetCredentials : AuthWrite
{
- /// Optional per-invocation resource ceiling overrides.
- [JsonPropertyName("limits")]
- public FactoryRunLimits? Limits { get; set; }
+ ///
+ [JsonIgnore]
+ public override string Kind => "setCredentials";
- /// Factory run identifier.
- [JsonPropertyName("runId")]
- public string RunId { get; set; } = string.Empty;
+ /// Authentication host URL.
+ [Url]
+ [StringSyntax(StringSyntaxAttribute.Uri)]
+ [JsonPropertyName("host")]
+ public required string Host { get; set; }
- /// Target session identifier.
- [JsonPropertyName("sessionId")]
- public string SessionId { get; set; } = string.Empty;
+ /// Login/username for the credential.
+ [JsonPropertyName("login")]
+ public required string Login { get; set; }
- /// Opaque identifier of the originating tool call.
- [JsonPropertyName("toolCallId")]
- public string? ToolCallId { get; set; }
+ /// GitHub authentication token to install.
+ [JsonPropertyName("token")]
+ public required string Token { get; set; }
}
-/// Parameters for retrieving a factory run.
+/// Mutation request carrying the typed write command.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-internal sealed class FactoryGetRunRequest
+internal sealed class AccountsSetRequest
{
- /// Factory run identifier.
- [JsonPropertyName("runId")]
- public string RunId { get; set; } = string.Empty;
+ /// The non-interactive mutation command to apply.
+ [JsonPropertyName("command")]
+ public AuthWrite Command { get => field ??= new(); set; }
/// Target session identifier.
[JsonPropertyName("sessionId")]
public string SessionId { get; set; } = string.Empty;
}
-/// Declared or approved factory resource ceilings.
+/// One step in an interactive login flow. The consumer acts on the step and calls advance to proceed. Browser-open is encoded as two distinct steps by design: `open-url` is CONSUMER-driven (the provider surfaces the authorize URL and the consumer opens it — github.com/GHEC web), while `needs-interaction` is PROVIDER-driven (the provider opens the browser or broker UI itself and does not surface a URL — Entra).
+/// Polymorphic base type discriminated by kind.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed class FactoryDeclaredLimits
+[JsonPolymorphic(
+ TypeDiscriminatorPropertyName = "kind",
+ UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FallBackToBaseType)]
+[JsonDerivedType(typeof(AuthLoginStepOpenUrl), "open-url")]
+[JsonDerivedType(typeof(AuthLoginStepInputRequired), "input-required")]
+[JsonDerivedType(typeof(AuthLoginStepAwaiting), "awaiting")]
+[JsonDerivedType(typeof(AuthLoginStepNeedsInteraction), "needs-interaction")]
+[JsonDerivedType(typeof(AuthLoginStepCompleted), "completed")]
+[JsonDerivedType(typeof(AuthLoginStepError), "error")]
+public partial class AuthLoginStep
{
- /// Maximum AI credits consumed by subagents and descendants.
- [JsonPropertyName("maxAiCredits")]
- public double? MaxAiCredits { get; set; }
+ /// The type discriminator.
+ [JsonPropertyName("kind")]
+ public virtual string Kind { get; set; } = string.Empty;
+}
- /// Maximum concurrently active subagents.
- [JsonPropertyName("maxConcurrentSubagents")]
- public long? MaxConcurrentSubagents { get; set; }
- /// Maximum total subagents spawned by the run.
- [JsonPropertyName("maxTotalSubagents")]
- public long? MaxTotalSubagents { get; set; }
+/// The open-url variant of .
+[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
+public partial class AuthLoginStepOpenUrl : AuthLoginStep
+{
+ ///
+ [JsonIgnore]
+ public override string Kind => "open-url";
- /// Maximum accumulated active execution time in seconds.
- [JsonPropertyName("timeoutSeconds")]
- public double? TimeoutSeconds { get; set; }
+ /// Authorize URL the consumer should open in a browser (consumer-driven browser-open).
+ [JsonPropertyName("url")]
+ public required string Url { get; set; }
}
-/// Durable factory resource consumption.
+/// The input-required variant of .
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed class FactoryRunConsumed
+public partial class AuthLoginStepInputRequired : AuthLoginStep
{
- /// Accumulated active execution time in milliseconds.
- [JsonPropertyName("activeMs")]
- public long ActiveMs { get; set; }
-
- /// AI usage consumed by the run in nano-AIU.
- [JsonPropertyName("nanoAiu")]
- public long NanoAiu { get; set; }
+ ///
+ [JsonIgnore]
+ public override string Kind => "input-required";
- /// Total subagents spawned by the run.
- [JsonPropertyName("subagents")]
- public long Subagents { get; set; }
+ /// Prompt for the value the provider needs; the consumer supplies it as advance input (e.g. a GitHub Enterprise Cloud host, *.ghe.com).
+ [JsonPropertyName("prompt")]
+ public required string Prompt { get; set; }
}
-/// Current factory phase identity.
+/// The awaiting variant of .
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed class FactoryCurrentPhase
+public partial class AuthLoginStepAwaiting : AuthLoginStep
{
- /// Current phase identifier.
- [JsonPropertyName("id")]
- public string Id { get; set; } = string.Empty;
-
- /// Zero-based declared phase ordinal, or null for an undeclared phase.
- [JsonPropertyName("ordinal")]
- public long? Ordinal { get; set; }
+ ///
+ [JsonIgnore]
+ public override string Kind => "awaiting";
}
-/// Prompt-safe terminal factory outcome.
+/// The needs-interaction variant of .
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed class FactoryRunTerminal
+public partial class AuthLoginStepNeedsInteraction : AuthLoginStep
{
- /// Human-readable terminal error.
- [JsonPropertyName("error")]
- public string? Error { get; set; }
-
- /// Machine-readable terminal failure.
- [JsonPropertyName("failure")]
- public FactoryRunFailure? Failure { get; set; }
-
- /// Pause initiator metadata, or null when the run did not pause.
- [JsonPropertyName("pauseInfo")]
- public FactoryPauseInfo? PauseInfo { get; set; }
-
- /// Human-readable terminal reason.
- [JsonPropertyName("reason")]
- public string? Reason { get; set; }
-
- /// Prompt-safe preview of the completed result.
- [JsonPropertyName("resultPreview")]
- public string? ResultPreview { get; set; }
+ ///
+ [JsonIgnore]
+ public override string Kind => "needs-interaction";
}
-/// Durable factory run summary with read-time live overlays.
+/// Terminal result of an interactive login flow.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed class FactoryRunSummary
+public sealed class AuthLoginResultDto
{
- /// Epoch milliseconds when the current active segment started, or null while inactive.
- [JsonPropertyName("activeSegmentStartedAt")]
- public long? ActiveSegmentStartedAt { get; set; }
-
- /// Approved effective resource ceilings, or null until approved.
- [JsonPropertyName("approved")]
- public FactoryDeclaredLimits? Approved { get; set; }
-
- /// Whether the durable run state currently passes runtime resume eligibility checks.
- [JsonPropertyName("canResume")]
- public bool CanResume { get; set; }
-
- /// Epoch milliseconds when the run completed, or null while nonterminal.
- [JsonPropertyName("completedAt")]
- public long? CompletedAt { get; set; }
-
- /// Durable resource consumption.
- [JsonPropertyName("consumed")]
- public FactoryRunConsumed Consumed { get => field ??= new(); set; }
-
- /// Epoch milliseconds when the run was created.
- [JsonPropertyName("createdAt")]
- public long CreatedAt { get; set; }
-
- /// Current phase identity, or null before any phase is entered.
- [JsonPropertyName("currentPhase")]
- public FactoryCurrentPhase? CurrentPhase { get; set; }
-
- /// Resource ceilings declared by the factory.
- [JsonPropertyName("declaredLimits")]
- public FactoryDeclaredLimits DeclaredLimits { get => field ??= new(); set; }
-
- /// Number of phases declared by the factory.
- [JsonPropertyName("declaredPhaseCount")]
- public long DeclaredPhaseCount { get; set; }
-
- /// Human-readable factory description.
- [JsonPropertyName("description")]
- public string Description { get; set; } = string.Empty;
-
- /// Registered factory name.
- [JsonPropertyName("factoryName")]
- public string FactoryName { get; set; } = string.Empty;
-
- /// Number of direct factory agents currently live.
- [JsonPropertyName("liveAgentCount")]
- public long LiveAgentCount { get; set; }
-
- /// Epoch milliseconds when this live-overlay snapshot was observed.
- [JsonPropertyName("observedAt")]
- public long ObservedAt { get; set; }
-
- /// Monotonic durable run revision.
- [JsonPropertyName("revision")]
- public long Revision { get; set; }
-
- /// Factory run identifier.
- [JsonPropertyName("runId")]
- public string RunId { get; set; } = string.Empty;
+ /// Host that was signed in, when completed.
+ [Url]
+ [StringSyntax(StringSyntaxAttribute.Uri)]
+ [JsonPropertyName("host")]
+ public string? Host { get; set; }
- /// Epoch milliseconds when execution first started, or null before start.
- [JsonPropertyName("startedAt")]
- public long? StartedAt { get; set; }
+ /// Login that was signed in, when completed.
+ [JsonPropertyName("login")]
+ public string? Login { get; set; }
- /// Current factory run status.
+ /// Terminal disposition of the login.
[JsonPropertyName("status")]
- public FactoryRunStatus Status { get; set; }
-
- /// Terminal run outcome, or null while nonterminal.
- [JsonPropertyName("terminal")]
- public FactoryRunTerminal? Terminal { get; set; }
-
- /// Total direct factory agents spawned across all attempts.
- [JsonPropertyName("totalSpawnedAgentCount")]
- public long TotalSpawnedAgentCount { get; set; }
-
- /// Epoch milliseconds when the durable run was last updated.
- [JsonPropertyName("updatedAt")]
- public long UpdatedAt { get; set; }
+ public AuthLoginResultStatus Status { get; set; }
}
-/// A page of factory runs in durable creation order.
+/// The completed variant of .
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed class FactoryListRunsResult
+public partial class AuthLoginStepCompleted : AuthLoginStep
{
- /// Whether terminal runs newer than this page exist.
- [JsonPropertyName("hasMoreNewer")]
- public bool? HasMoreNewer { get; set; }
-
- /// Newest terminal-run cursor in this page, or null when the terminal window is empty.
- [JsonPropertyName("newestSeq")]
- public long? NewestSeq { get; set; }
-
- /// Oldest terminal-run cursor in this page, or null when the terminal window is empty.
- [JsonPropertyName("oldestSeq")]
- public long? OldestSeq { get; set; }
-
- /// Number of terminal runs older than this page.
- [JsonPropertyName("omittedOlder")]
- public long? OmittedOlder { get; set; }
+ ///
+ [JsonIgnore]
+ public override string Kind => "completed";
- /// Factory run summaries in durable creation order.
- [JsonPropertyName("runs")]
- public IList Runs { get => field ??= []; set; }
+ /// The terminal login result.
+ [JsonPropertyName("result")]
+ public required AuthLoginResultDto Result { get; set; }
}
-/// Parameters for paging factory runs.
+/// The error variant of .
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-internal sealed class FactoryListRunsRequest
+public partial class AuthLoginStepError : AuthLoginStep
{
- /// Exclusive forward cursor.
- [JsonPropertyName("afterSeq")]
- public long? AfterSeq { get; set; }
-
- /// Exclusive backward cursor.
- [JsonPropertyName("beforeSeq")]
- public long? BeforeSeq { get; set; }
-
- /// Maximum terminal runs to return. Defaults to 200 and is capped at 500.
- [JsonPropertyName("limit")]
- public int? Limit { get; set; }
+ ///
+ [JsonIgnore]
+ public override string Kind => "error";
- /// Target session identifier.
- [JsonPropertyName("sessionId")]
- public string SessionId { get; set; } = string.Empty;
+ /// Human-readable failure message.
+ [JsonPropertyName("message")]
+ public required string Message { get; set; }
}
-/// Prompt-safe durable identity and live status for a direct factory agent.
+/// A started login flow: its opaque id and first step.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed class FactoryAgentSummary
+public sealed class AuthLoginBegun
{
- /// Accumulated active agent time in milliseconds.
- [JsonPropertyName("activeMs")]
- public long ActiveMs { get; set; }
-
- /// Prompt-safe live activity text.
- [JsonPropertyName("activity")]
- public string? Activity { get; set; }
-
- /// Stable direct-agent identifier.
- [JsonPropertyName("agentId")]
- public string AgentId { get; set; } = string.Empty;
-
- /// Registered agent type.
- [JsonPropertyName("agentType")]
- public string AgentType { get; set; } = string.Empty;
-
- /// Epoch milliseconds when the agent completed.
- [JsonPropertyName("completedAt")]
- public long? CompletedAt { get; set; }
-
- /// Friendly, non-unique name intended for display.
- [JsonPropertyName("displayName")]
- public string? DisplayName { get; set; }
-
- /// Friendly, non-unique name intended for display.
- [JsonPropertyName("label")]
- public string Label { get; set; } = string.Empty;
-
- /// Phase identifier active when the agent was launched, or null.
- [JsonPropertyName("phaseId")]
- public string? PhaseId { get; set; }
-
- /// Model requested when the agent was launched.
- [JsonPropertyName("requestedModel")]
- public string? RequestedModel { get; set; }
+ /// Opaque flow id used to advance or cancel this login.
+ [JsonPropertyName("flowId")]
+ public string FlowId { get; set; } = string.Empty;
- /// Concrete model resolved for the agent.
- [JsonPropertyName("resolvedModel")]
- public string? ResolvedModel { get; set; }
-
- /// Owning factory run identifier.
- [JsonPropertyName("runId")]
- public string RunId { get; set; } = string.Empty;
-
- /// Epoch milliseconds when the agent started.
- [JsonPropertyName("startedAt")]
- public long? StartedAt { get; set; }
-
- /// Current durable or live agent status.
- [JsonPropertyName("status")]
- public string Status { get; set; } = string.Empty;
-
- /// Tool-call identifier that launched the agent.
- [JsonPropertyName("toolCallId")]
- public string ToolCallId { get; set; } = string.Empty;
+ /// The first step of the flow.
+ [JsonPropertyName("step")]
+ public AuthLoginStep Step { get => field ??= new(); set; }
}
-/// Durable lifecycle and timing for one factory phase.
+/// Begin an interactive login flow for a provider kind. Dispatch is kind-only.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed class FactoryPhaseObservation
+internal sealed class AuthLoginBeginRequest
{
- /// Completed active time accumulated by this phase in milliseconds.
- [JsonPropertyName("accumulatedActiveMs")]
- public long AccumulatedActiveMs { get; set; }
-
- /// Epoch milliseconds when this phase completed; for a skipped phase, the synthetic skip timestamp (equal to `startedAt`).
- [JsonPropertyName("completedAt")]
- public long? CompletedAt { get; set; }
-
- /// Current live active time for this phase in milliseconds.
- [JsonPropertyName("currentActiveMs")]
- public long CurrentActiveMs { get; set; }
-
- /// Optional human-readable phase detail.
- [JsonPropertyName("detail")]
- public string? Detail { get; set; }
-
- /// Number of times execution entered this phase.
- [JsonPropertyName("entryCount")]
- public long EntryCount { get; set; }
-
- /// Phase identifier.
- [JsonPropertyName("id")]
- public string Id { get; set; } = string.Empty;
-
- /// Most recent run attempt that entered this phase, or `0` if the phase has never been entered.
- [JsonPropertyName("lastEnteredRunAttempt")]
- public long LastEnteredRunAttempt { get; set; }
-
- /// Direct agents in this phase that are currently live.
- [JsonPropertyName("liveAgentCount")]
- public long LiveAgentCount { get; set; }
-
- /// Zero-based declared phase ordinal, or null for an undeclared phase.
- [JsonPropertyName("ordinal")]
- public long? Ordinal { get; set; }
-
- /// Epoch milliseconds when this phase first started; for a skipped phase, the synthetic skip timestamp (equal to `completedAt`).
- [JsonPropertyName("startedAt")]
- public long? StartedAt { get; set; }
-
- /// Derived lifecycle state of the phase.
- [JsonPropertyName("status")]
- public FactoryPhaseStatus Status { get; set; }
-
- /// Human-readable phase title.
- [JsonPropertyName("title")]
- public string Title { get; set; } = string.Empty;
+ /// The provider kind to sign in with.
+ [JsonPropertyName("kind")]
+ public LoginProviderKind Kind { get; set; }
- /// Total direct agents associated with this phase.
- [JsonPropertyName("totalAgentCount")]
- public long TotalAgentCount { get; set; }
+ /// Target session identifier.
+ [JsonPropertyName("sessionId")]
+ public string SessionId { get; set; } = string.Empty;
}
-/// One durable factory progress record.
+/// Advance an in-flight login flow, optionally fulfilling an input-required step.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed class FactoryProgressLine
+internal sealed class AuthLoginAdvanceRequest
{
- /// Resume attempt that emitted this record.
- [JsonPropertyName("attempt")]
- public long Attempt { get; set; }
-
- /// Progress record kind.
- [JsonPropertyName("kind")]
- public FactoryLogLineKind Kind { get; set; }
+ /// Opaque flow id from begin.
+ [JsonPropertyName("flowId")]
+ public string FlowId { get; set; } = string.Empty;
- /// Phase active when the record was emitted, or null before any phase.
- [JsonPropertyName("phaseId")]
- public string? PhaseId { get; set; }
+ /// Neutral input fulfilling a preceding input-required step (e.g. a GHEC host); ignored otherwise.
+ [JsonPropertyName("input")]
+ public string? Input { get; set; }
- /// Epoch milliseconds when the record was persisted.
- [JsonPropertyName("recordedAt")]
- public long RecordedAt { get; set; }
+ /// Target session identifier.
+ [JsonPropertyName("sessionId")]
+ public string SessionId { get; set; } = string.Empty;
+}
- /// Global monotonic sequence number within the run.
- [JsonPropertyName("seq")]
- public long Seq { get; set; }
+/// Cancel an in-flight login flow.
+[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
+internal sealed class AuthLoginCancelRequest
+{
+ /// Opaque flow id from begin.
+ [JsonPropertyName("flowId")]
+ public string FlowId { get; set; } = string.Empty;
- /// Prompt-safe progress text.
- [JsonPropertyName("text")]
- public string Text { get; set; } = string.Empty;
+ /// Target session identifier.
+ [JsonPropertyName("sessionId")]
+ public string SessionId { get; set; } = string.Empty;
}
-/// A bidirectional page of factory progress.
+/// A file included in the session debug bundle.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed class FactoryProgressPage
+public sealed class DebugCollectLogsCollectedEntry
{
- /// Whether progress records newer than this page exist.
- [JsonPropertyName("hasMoreNewer")]
- public bool HasMoreNewer { get; set; }
+ /// Relative path of the file in the staged bundle/archive.
+ [JsonPropertyName("bundlePath")]
+ public string BundlePath { get; set; } = string.Empty;
- /// Whether progress records older than this page exist.
- [JsonPropertyName("hasMoreOlder")]
- public bool HasMoreOlder { get; set; }
+ /// Redacted output size in bytes.
+ [JsonPropertyName("sizeBytes")]
+ public long SizeBytes { get; set; }
- /// Newest sequence number in this page, or null when empty.
- [JsonPropertyName("newestSeq")]
- public long? NewestSeq { get; set; }
+ /// Source category for this entry.
+ [JsonPropertyName("source")]
+ public DebugCollectLogsSource Source { get; set; }
+}
- /// Oldest sequence number in this page, or null when empty.
- [JsonPropertyName("oldestSeq")]
- public long? OldestSeq { get; set; }
+/// An optional debug bundle entry that could not be included.
+[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
+public sealed class DebugCollectLogsSkippedEntry
+{
+ /// Relative path requested for this bundle entry.
+ [JsonPropertyName("bundlePath")]
+ public string BundlePath { get; set; } = string.Empty;
- /// Progress records in sequence order.
- [JsonPropertyName("records")]
- public IList Records { get => field ??= []; set; }
+ /// Server-local source path that could not be read.
+ [JsonPropertyName("path")]
+ public string? Path { get; set; }
- /// Run revision reflected by this page.
- [JsonPropertyName("revision")]
- public long Revision { get; set; }
+ /// Reason the entry was skipped.
+ [JsonPropertyName("reason")]
+ public string Reason { get; set; } = string.Empty;
}
-/// Full factory run observability detail.
+/// Result of collecting a session debug bundle.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed class FactoryRunDetail
+public sealed class DebugCollectLogsResult
{
- /// Epoch milliseconds when the current active segment started, or null while inactive.
- [JsonPropertyName("activeSegmentStartedAt")]
- public long? ActiveSegmentStartedAt { get; set; }
+ /// Files included in the bundle.
+ [JsonPropertyName("entries")]
+ public IList Entries { get => field ??= []; set; }
- /// Durable identities and live statuses for direct factory agents.
- [JsonPropertyName("agents")]
- public IList Agents { get => field ??= []; set; }
+ /// Destination kind that was written.
+ [JsonPropertyName("kind")]
+ public DebugCollectLogsResultKind Kind { get; set; }
- /// Approved effective resource ceilings, or null until approved.
- [JsonPropertyName("approved")]
- public FactoryDeclaredLimits? Approved { get; set; }
+ /// Actual archive path or staging directory path written. This may differ from the requested path when no-overwrite suffixing or fallback-to-temp-directory was needed.
+ [JsonPropertyName("path")]
+ public string Path { get; set; } = string.Empty;
- /// Whether the durable run state currently passes runtime resume eligibility checks.
- [JsonPropertyName("canResume")]
- public bool CanResume { get; set; }
+ /// Optional files or directories that could not be included.
+ [JsonPropertyName("skippedEntries")]
+ public IList? SkippedEntries { get; set; }
+}
- /// Epoch milliseconds when the run completed, or null while nonterminal.
- [JsonPropertyName("completedAt")]
- public long? CompletedAt { get; set; }
+/// A caller-provided server-local file or directory to include in the debug bundle.
+[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
+public sealed class DebugCollectLogsEntry
+{
+ /// Relative path to use inside the staged bundle/archive.
+ [JsonPropertyName("bundlePath")]
+ public string BundlePath { get; set; } = string.Empty;
- /// Durable resource consumption.
- [JsonPropertyName("consumed")]
- public FactoryRunConsumed Consumed { get => field ??= new(); set; }
+ /// Kind of source path to include.
+ [JsonPropertyName("kind")]
+ public DebugCollectLogsEntryKind Kind { get; set; }
- /// Epoch milliseconds when the run was created.
- [JsonPropertyName("createdAt")]
- public long CreatedAt { get; set; }
+ /// Server-local source path to read.
+ [JsonPropertyName("path")]
+ public string Path { get; set; } = string.Empty;
- /// Current phase identity, or null before any phase is entered.
- [JsonPropertyName("currentPhase")]
- public FactoryCurrentPhase? CurrentPhase { get; set; }
+ /// How text content from this entry should be redacted. Defaults to plain-text. With none, no redaction is applied; the caller must ensure any necessary redaction is performed before this call.
+ [JsonPropertyName("redaction")]
+ public DebugCollectLogsRedaction? Redaction { get; set; }
- /// Resource ceilings declared by the factory.
- [JsonPropertyName("declaredLimits")]
- public FactoryDeclaredLimits DeclaredLimits { get => field ??= new(); set; }
+ /// When true, collection fails if this entry cannot be read. Defaults to false, which records the entry in `skippedEntries`.
+ [JsonPropertyName("required")]
+ public bool? Required { get; set; }
+}
- /// Number of phases declared by the factory.
- [JsonPropertyName("declaredPhaseCount")]
- public long DeclaredPhaseCount { get; set; }
+/// Destination for the session debug bundle.
+/// Polymorphic base type discriminated by kind.
+[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
+[JsonPolymorphic(
+ TypeDiscriminatorPropertyName = "kind",
+ UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FallBackToBaseType)]
+[JsonDerivedType(typeof(DebugCollectLogsDestinationArchive), "archive")]
+[JsonDerivedType(typeof(DebugCollectLogsDestinationDirectory), "directory")]
+public partial class DebugCollectLogsDestination
+{
+ /// The type discriminator.
+ [JsonPropertyName("kind")]
+ public virtual string Kind { get; set; } = string.Empty;
+}
- /// Human-readable factory description.
- [JsonPropertyName("description")]
- public string Description { get; set; } = string.Empty;
- /// Registered factory name.
- [JsonPropertyName("factoryName")]
- public string FactoryName { get; set; } = string.Empty;
+/// The archive variant of .
+[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
+public partial class DebugCollectLogsDestinationArchive : DebugCollectLogsDestination
+{
+ ///
+ [JsonIgnore]
+ public override string Kind => "archive";
- /// Number of direct factory agents currently live.
- [JsonPropertyName("liveAgentCount")]
- public long LiveAgentCount { get; set; }
+ /// When true, create the archive atomically without overwriting an existing file by appending ` (N)` before the extension as needed. Defaults to false.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("noOverwrite")]
+ public bool? NoOverwrite { get; set; }
- /// Epoch milliseconds when this live-overlay snapshot was observed.
- [JsonPropertyName("observedAt")]
- public long ObservedAt { get; set; }
+ /// Absolute or server-relative path for the .tgz archive to create.
+ [JsonPropertyName("outputPath")]
+ public required string OutputPath { get; set; }
+}
- /// Lifecycle and timing observations for each factory phase.
- [JsonPropertyName("phases")]
- public IList Phases { get => field ??= []; set; }
+/// The directory variant of .
+[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
+public partial class DebugCollectLogsDestinationDirectory : DebugCollectLogsDestination
+{
+ ///
+ [JsonIgnore]
+ public override string Kind => "directory";
- /// Bidirectional page of durable factory progress.
- [JsonPropertyName("progress")]
- public FactoryProgressPage Progress { get => field ??= new(); set; }
+ /// Directory where files should be staged. The directory is created if needed.
+ [JsonPropertyName("outputDirectory")]
+ public required string OutputDirectory { get; set; }
+}
- /// Monotonic durable run revision.
- [JsonPropertyName("revision")]
- public long Revision { get; set; }
+/// Built-in session diagnostics to include in the bundle. Omitted fields default to true.
+[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
+public sealed class DebugCollectLogsInclude
+{
+ /// Server-local path to the current process log. When set, it is included as `process.log` and its directory is searched for prior logs from the same session.
+ [JsonPropertyName("currentProcessLogPath")]
+ public string? CurrentProcessLogPath { get; set; }
- /// Factory run identifier.
- [JsonPropertyName("runId")]
- public string RunId { get; set; } = string.Empty;
+ /// Include the session event log (`events.jsonl`). Defaults to true.
+ [JsonPropertyName("events")]
+ public bool? Events { get; set; }
- /// Epoch milliseconds when execution first started, or null before start.
- [JsonPropertyName("startedAt")]
- public long? StartedAt { get; set; }
+ /// Server-local path to the session's events.jsonl file. Internal callers normally omit this and let the runtime derive it from the session.
+ [JsonPropertyName("eventsPath")]
+ public string? EventsPath { get; set; }
- /// Current factory run status.
- [JsonPropertyName("status")]
- public FactoryRunStatus Status { get; set; }
+ /// Maximum number of previous process logs to include. Defaults to 5.
+ [JsonPropertyName("previousProcessLogLimit")]
+ public long? PreviousProcessLogLimit { get; set; }
- /// Terminal run outcome, or null while nonterminal.
- [JsonPropertyName("terminal")]
- public FactoryRunTerminal? Terminal { get; set; }
+ /// Server-local process log directory to search when `currentProcessLogPath` is unavailable, useful for collecting logs for inactive sessions.
+ [JsonPropertyName("processLogDirectory")]
+ public string? ProcessLogDirectory { get; set; }
- /// Total direct factory agents spawned across all attempts.
- [JsonPropertyName("totalSpawnedAgentCount")]
- public long TotalSpawnedAgentCount { get; set; }
+ /// Include process logs for the session. Defaults to true.
+ [JsonPropertyName("processLogs")]
+ public bool? ProcessLogs { get; set; }
- /// Epoch milliseconds when the durable run was last updated.
- [JsonPropertyName("updatedAt")]
- public long UpdatedAt { get; set; }
+ /// Include interactive shell logs written under the session's `shell-logs` directory. Defaults to true.
+ [JsonPropertyName("shellLogs")]
+ public bool? ShellLogs { get; set; }
}
-/// Parameters for paging factory progress.
+/// Options for collecting a session debug bundle with configurable redaction.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-internal sealed class FactoryGetRunProgressRequest
+internal sealed class DebugCollectLogsRequest
{
- /// Exclusive forward cursor.
- [JsonPropertyName("afterSeq")]
- public long? AfterSeq { get; set; }
-
- /// Exclusive backward cursor.
- [JsonPropertyName("beforeSeq")]
- public long? BeforeSeq { get; set; }
-
- /// Maximum records to return. Defaults to 200 and is capped at 500.
- [JsonPropertyName("limit")]
- public int? Limit { get; set; }
+ /// Caller-provided server-local files or directories to include in addition to the runtime's built-in session diagnostics. This lets host applications add their own diagnostics without changing the API shape.
+ [JsonPropertyName("additionalEntries")]
+ public IList? AdditionalEntries { get; set; }
- /// Optional phase identifier used to scope records and cursors.
- [JsonPropertyName("phaseId")]
- public string? PhaseId { get; set; }
+ /// Where the bundle should be written. Use `archive` to produce a .tgz, or `directory` to stage files for caller-managed upload/post-processing.
+ [JsonPropertyName("destination")]
+ public DebugCollectLogsDestination Destination { get => field ??= new(); set; }
- /// Factory run identifier.
- [JsonPropertyName("runId")]
- public string RunId { get; set; } = string.Empty;
+ /// Which built-in session diagnostics to include. Omitted fields default to true.
+ [JsonPropertyName("include")]
+ public DebugCollectLogsInclude? Include { get; set; }
/// Target session identifier.
[JsonPropertyName("sessionId")]
public string SessionId { get; set; } = string.Empty;
}
-/// Parameters for cancelling a factory run.
+/// Canvas action that the agent or host can invoke. To discover the input schema for a particular action, call the list_canvas_capabilities tool.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-internal sealed class FactoryCancelRequest
+public sealed class CanvasAction
{
- /// Factory run identifier.
- [JsonPropertyName("runId")]
- public string RunId { get; set; } = string.Empty;
+ /// Description of the action.
+ [JsonPropertyName("description")]
+ public string? Description { get; set; }
- /// Target session identifier.
- [JsonPropertyName("sessionId")]
- public string SessionId { get; set; } = string.Empty;
+ /// JSON Schema for the action input.
+ [JsonPropertyName("inputSchema")]
+ public JsonElement? InputSchema { get; set; }
+
+ /// Action name exposed by the canvas provider.
+ [JsonPropertyName("name")]
+ public string Name { get; set; } = string.Empty;
}
-/// Parameters for pausing a running factory.
+/// Canvas available in the current session.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-internal sealed class FactoryPauseRequest
+public sealed class DiscoveredCanvas
{
- /// Factory run identifier.
- [JsonPropertyName("runId")]
- public string RunId { get; set; } = string.Empty;
+ /// Actions the agent or host may invoke on an open instance.
+ [JsonPropertyName("actions")]
+ public IList? Actions { get; set; }
- /// Target session identifier.
- [JsonPropertyName("sessionId")]
- public string SessionId { get; set; } = string.Empty;
+ /// Provider-local canvas identifier.
+ [JsonPropertyName("canvasId")]
+ public string CanvasId { get; set; } = string.Empty;
+
+ /// Short, single-sentence description shown to the agent in canvas catalogs.
+ [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Safe for generated string properties: JSON Schema minLength/maxLength map to string length validation, not reflection over trimmed Count members")]
+ [MinLength(1)]
+ [JsonPropertyName("description")]
+ public string Description { get; set; } = string.Empty;
+
+ /// Human-readable canvas name.
+ [JsonPropertyName("displayName")]
+ public string DisplayName { get; set; } = string.Empty;
+
+ /// Owning provider identifier.
+ [JsonPropertyName("extensionId")]
+ public string ExtensionId { get; set; } = string.Empty;
+
+ /// Owning extension display name, when available.
+ [JsonPropertyName("extensionName")]
+ public string? ExtensionName { get; set; }
+
+ /// Host-local PNG path for the canvas icon, when supplied.
+ [JsonPropertyName("icon")]
+ public string? Icon { get; set; }
+
+ /// JSON Schema for canvas open input.
+ [JsonPropertyName("inputSchema")]
+ public JsonElement? InputSchema { get; set; }
}
-/// RPC data type for SessionFactoryPauseAtCheckpoint operations.
+/// Declared canvases available in this session.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-internal sealed class SessionFactoryPauseAtCheckpointResult
+public sealed class CanvasList
{
- /// Whether this execution attempt must pause or may continue.
- [JsonPropertyName("action")]
- public FactoryPauseCheckpointAction Action { get; set; }
+ /// Declared canvases available in this session.
+ [JsonPropertyName("canvases")]
+ public IList Canvases { get => field ??= []; set; }
}
-/// Parameters for an owned durable pause checkpoint.
+/// Identifies the target session.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-internal sealed class FactoryPauseCheckpointRequest
+internal sealed class SessionCanvasListRequest
{
- /// Opaque token identifying the execution attempt that reached the checkpoint.
- [JsonPropertyName("executionToken")]
- public string ExecutionToken { get; set; } = string.Empty;
-
- /// Stable author-defined checkpoint key.
- [JsonPropertyName("key")]
- public string Key { get; set; } = string.Empty;
-
- /// Factory run identifier.
- [JsonPropertyName("runId")]
- public string RunId { get; set; } = string.Empty;
-
/// Target session identifier.
[JsonPropertyName("sessionId")]
public string SessionId { get; set; } = string.Empty;
}
-/// Acknowledgement that a factory request was accepted.
+/// Open canvas instance snapshot.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed class FactoryAckResult
+public sealed class OpenCanvasInstance
{
-}
+ /// Provider-local canvas identifier.
+ [JsonPropertyName("canvasId")]
+ public string CanvasId { get; set; } = string.Empty;
-/// One ordered factory progress line.
-[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed class FactoryLogLine
-{
- /// Progress line kind.
- [JsonPropertyName("kind")]
- public FactoryLogLineKind Kind { get; set; }
+ /// Owning provider identifier.
+ [JsonPropertyName("extensionId")]
+ public string ExtensionId { get; set; } = string.Empty;
- /// Monotonic sequence number within the factory run.
- [JsonPropertyName("seq")]
- public long Seq { get; set; }
+ /// Owning extension display name, when available.
+ [JsonPropertyName("extensionName")]
+ public string? ExtensionName { get; set; }
- /// Progress text.
- [JsonPropertyName("text")]
- public string Text { get; set; } = string.Empty;
-}
+ /// Host-local PNG path for the canvas icon, when supplied.
+ [JsonPropertyName("icon")]
+ public string? Icon { get; set; }
-/// Parameters for recording factory progress.
-[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-internal sealed class FactoryLogRequest
-{
- /// Opaque token identifying the current factory execution attempt.
- [JsonPropertyName("executionToken")]
- public string ExecutionToken { get; set; } = string.Empty;
+ /// Input supplied when the instance was opened.
+ [JsonPropertyName("input")]
+ public JsonElement? Input { get; set; }
- /// Ordered progress lines to append.
- [JsonPropertyName("lines")]
- public IList Lines { get => field ??= []; set; }
+ /// Stable caller-supplied canvas instance identifier.
+ [JsonPropertyName("instanceId")]
+ public string InstanceId { get; set; } = string.Empty;
- /// Factory run identifier.
- [JsonPropertyName("runId")]
- public string RunId { get; set; } = string.Empty;
+ /// Provider-supplied status text.
+ [JsonPropertyName("status")]
+ public string? Status { get; set; }
- /// Target session identifier.
- [JsonPropertyName("sessionId")]
- public string SessionId { get; set; } = string.Empty;
+ /// Rendered title.
+ [JsonPropertyName("title")]
+ public string? Title { get; set; }
+
+ /// URL for web-rendered canvases.
+ [JsonPropertyName("url")]
+ public string? Url { get; set; }
}
-/// Result of one factory-scoped subagent call.
+/// Live open-canvas snapshot.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed class FactoryAgentResult
+public sealed class CanvasListOpenResult
{
- /// Agent result, omitted when the agent produced no result.
- [JsonPropertyName("result")]
- public JsonElement? Result { get; set; }
+ /// Currently open canvas instances.
+ [JsonPropertyName("openCanvases")]
+ public IList OpenCanvases { get => field ??= []; set; }
}
-/// Options for one factory-scoped subagent call.
+/// Identifies the target session.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed class FactoryAgentOptions
+internal sealed class SessionCanvasListOpenRequest
{
- /// Optional built-in or custom agent name whose definition configures the subagent.
- [JsonPropertyName("agent")]
- public string? Agent { get; set; }
+ /// Target session identifier.
+ [JsonPropertyName("sessionId")]
+ public string SessionId { get; set; } = string.Empty;
+}
- /// Optional context tier override for the subagent.
- [JsonPropertyName("contextTier")]
- public ContextTier? ContextTier { get; set; }
+/// Canvas open parameters.
+[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
+internal sealed class CanvasOpenRequest
+{
+ /// Provider-local canvas identifier.
+ [JsonPropertyName("canvasId")]
+ public string CanvasId { get; set; } = string.Empty;
- /// Optional label distinguishing otherwise identical memoized agent calls.
- [JsonPropertyName("label")]
- public string? Label { get; set; }
+ /// Owning provider identifier. Optional when the canvasId is unique across providers; required to disambiguate when multiple providers register the same canvasId.
+ [JsonPropertyName("extensionId")]
+ public string? ExtensionId { get; set; }
- /// Optional model identifier for the subagent.
- [JsonPropertyName("model")]
- public string? Model { get; set; }
+ /// Canvas open input.
+ [JsonPropertyName("input")]
+ public JsonElement? Input { get; set; }
- /// Optional reasoning effort override for the subagent.
- [JsonPropertyName("reasoningEffort")]
- public string? ReasoningEffort { get; set; }
+ /// Caller-supplied stable instance identifier.
+ [JsonPropertyName("instanceId")]
+ public string InstanceId { get; set; } = string.Empty;
- /// Optional JSON Schema for structured agent output.
- [JsonPropertyName("schema")]
- public JsonElement? Schema { get; set; }
+ /// Target session identifier.
+ [JsonPropertyName("sessionId")]
+ public string SessionId { get; set; } = string.Empty;
}
-/// Parameters for one factory-scoped subagent call.
+/// Canvas close parameters.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-internal sealed class FactoryAgentRequest
+internal sealed class CanvasCloseRequest
{
- /// Opaque token identifying the current factory execution attempt.
- [JsonPropertyName("executionToken")]
- public string ExecutionToken { get; set; } = string.Empty;
-
- /// Factory run identifier that owns the subagent.
- [JsonPropertyName("factoryRunId")]
- public string FactoryRunId { get; set; } = string.Empty;
-
- /// Subagent execution options.
- [JsonPropertyName("opts")]
- public FactoryAgentOptions Opts { get => field ??= new(); set; }
-
- /// Prompt to send to the subagent.
- [JsonPropertyName("prompt")]
- public string Prompt { get; set; } = string.Empty;
+ /// Open canvas instance identifier.
+ [JsonPropertyName("instanceId")]
+ public string InstanceId { get; set; } = string.Empty;
/// Target session identifier.
[JsonPropertyName("sessionId")]
public string SessionId { get; set; } = string.Empty;
}
-/// Result of reading a factory journal entry.
+/// Canvas action invocation result.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed class FactoryJournalGetResult
+public sealed class CanvasActionInvokeResult
{
- /// Whether the journal contained the requested key.
- [JsonPropertyName("hit")]
- public bool Hit { get; set; }
-
- /// Cached JSON result. The hit field distinguishes a cached JSON null from a miss.
- [JsonPropertyName("resultJson")]
- public JsonElement? ResultJson { get; set; }
+ /// Provider-supplied action result.
+ [JsonPropertyName("result")]
+ public JsonElement? Result { get; set; }
}
-/// Parameters for reading a factory journal entry.
+/// Canvas action invocation parameters.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-internal sealed class FactoryJournalGetRequest
+internal sealed class CanvasActionInvokeRequest
{
- /// Opaque token identifying the current factory execution attempt.
- [JsonPropertyName("executionToken")]
- public string ExecutionToken { get; set; } = string.Empty;
+ /// Action name to invoke.
+ [JsonPropertyName("actionName")]
+ public string ActionName { get; set; } = string.Empty;
- /// Namespaced journal key.
- [JsonPropertyName("key")]
- public string Key { get; set; } = string.Empty;
+ /// Action input.
+ [JsonPropertyName("input")]
+ public JsonElement? Input { get; set; }
- /// Factory run identifier.
- [JsonPropertyName("runId")]
- public string RunId { get; set; } = string.Empty;
+ /// Open canvas instance identifier.
+ [JsonPropertyName("instanceId")]
+ public string InstanceId { get; set; } = string.Empty;
/// Target session identifier.
[JsonPropertyName("sessionId")]
public string SessionId { get; set; } = string.Empty;
}
-/// Parameters for storing a factory journal entry.
+/// Internal canvas provider registration parameters.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-internal sealed class FactoryJournalPutRequest
+internal sealed class CanvasProviderRegisterRequest
{
- /// Opaque token identifying the current factory execution attempt.
- [JsonPropertyName("executionToken")]
- public string ExecutionToken { get; set; } = string.Empty;
+ /// Canvas contributions supplied by the provider.
+ [JsonPropertyName("canvases")]
+ public IList Canvases { get => field ??= []; set; }
- /// Namespaced journal key.
- [JsonPropertyName("key")]
- public string Key { get; set; } = string.Empty;
+ /// Connection identifier for callback routing.
+ [JsonPropertyName("connectionId")]
+ public string ConnectionId { get; set; } = string.Empty;
- /// JSON result to memoize.
- [JsonPropertyName("resultJson")]
- public JsonElement ResultJson { get; set; }
+ /// Provider metadata supplied by the host.
+ [JsonPropertyName("info")]
+ public JsonElement Info { get; set; }
- /// Factory run identifier.
- [JsonPropertyName("runId")]
- public string RunId { get; set; } = string.Empty;
+ /// Target session identifier.
+ [JsonPropertyName("sessionId")]
+ public string SessionId { get; set; } = string.Empty;
+}
+
+/// Internal canvas provider unregistration parameters.
+[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
+internal sealed class CanvasProviderUnregisterRequest
+{
+ /// Connection identifier to unregister.
+ [JsonPropertyName("connectionId")]
+ public string ConnectionId { get; set; } = string.Empty;
/// Target session identifier.
[JsonPropertyName("sessionId")]
@@ -9954,6 +9397,14 @@ internal sealed class ModelApplyStartupOverlayRequest
[JsonPropertyName("deviceManagedModel")]
public string? DeviceManagedModel { get; set; }
+ /// Context tier paired with the effective organization-managed model. Applies only when that concrete managed model is selected; it is ignored for Auto and for CLI, resume, or user overrides.
+ [JsonPropertyName("managedContextTier")]
+ public string? ManagedContextTier { get; set; }
+
+ /// Reasoning effort paired with the effective organization-managed model. Applies only when that concrete managed model is selected; it is ignored for Auto and for CLI, resume, or user overrides.
+ [JsonPropertyName("managedReasoningEffort")]
+ public string? ManagedReasoningEffort { get; set; }
+
/// Startup default model from the enterprise policy helper, when configured. Weakest of the managed sources: it applies only when neither device nor server policy names a model, and an explicit user selection still wins.
[JsonPropertyName("policyHelperModel")]
public string? PolicyHelperModel { get; set; }
@@ -17576,6 +17027,11 @@ public partial class SlashCommandInvocationResultSetModel : SlashCommandInvocati
[JsonIgnore]
public override string Kind => "set-model";
+ /// Auto routing profile selected by the command, when the model is Auto.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("autoTier")]
+ public AutoTier? AutoTier { get; set; }
+
/// Model selected by the command.
[JsonPropertyName("model")]
public required string Model { get; set; }
@@ -18378,7 +17834,7 @@ public partial class PermissionDecisionApproveOnce : PermissionDecision
[JsonDerivedType(typeof(PermissionDecisionApproveForSessionApprovalMemory), "memory")]
[JsonDerivedType(typeof(PermissionDecisionApproveForSessionApprovalCustomTool), "custom-tool")]
[JsonDerivedType(typeof(PermissionDecisionApproveForSessionApprovalExtensionManagement), "extension-management")]
-[JsonDerivedType(typeof(PermissionDecisionApproveForSessionApprovalFactory), "factory")]
+[JsonDerivedType(typeof(PermissionDecisionApproveForSessionApprovalWorkflow), "workflow")]
[JsonDerivedType(typeof(PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess), "extension-permission-access")]
[JsonDerivedType(typeof(PermissionDecisionApproveForSessionApprovalExtensionEnvAccess), "extension-env-access")]
public partial class PermissionDecisionApproveForSessionApproval
@@ -18494,16 +17950,16 @@ public partial class PermissionDecisionApproveForSessionApprovalExtensionManagem
public string? Operation { get; set; }
}
-/// Session-scoped factory approval, optionally narrowed by approval key.
-/// The factory variant of .
+/// Session-scoped workflow approval, optionally narrowed by approval key.
+/// The workflow variant of .
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public partial class PermissionDecisionApproveForSessionApprovalFactory : PermissionDecisionApproveForSessionApproval
+public partial class PermissionDecisionApproveForSessionApprovalWorkflow : PermissionDecisionApproveForSessionApproval
{
///
[JsonIgnore]
- public override string Kind => "factory";
+ public override string Kind => "workflow";
- /// Optional factory operation name or canonical approval key; when omitted, the approval covers all factory operations.
+ /// Optional workflow operation name or canonical approval key; when omitted, the approval covers all workflow operations.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("approvalKey")]
public string? ApprovalKey { get; set; }
@@ -18575,7 +18031,7 @@ public partial class PermissionDecisionApproveForSession : PermissionDecision
[JsonDerivedType(typeof(PermissionDecisionApproveForLocationApprovalMemory), "memory")]
[JsonDerivedType(typeof(PermissionDecisionApproveForLocationApprovalCustomTool), "custom-tool")]
[JsonDerivedType(typeof(PermissionDecisionApproveForLocationApprovalExtensionManagement), "extension-management")]
-[JsonDerivedType(typeof(PermissionDecisionApproveForLocationApprovalFactory), "factory")]
+[JsonDerivedType(typeof(PermissionDecisionApproveForLocationApprovalWorkflow), "workflow")]
[JsonDerivedType(typeof(PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess), "extension-permission-access")]
[JsonDerivedType(typeof(PermissionDecisionApproveForLocationApprovalExtensionEnvAccess), "extension-env-access")]
public partial class PermissionDecisionApproveForLocationApproval
@@ -18691,16 +18147,16 @@ public partial class PermissionDecisionApproveForLocationApprovalExtensionManage
public string? Operation { get; set; }
}
-/// Location-scoped factory approval, optionally narrowed by approval key.
-/// The factory variant of .
+/// Location-scoped workflow approval, optionally narrowed by approval key.
+/// The workflow variant of .
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public partial class PermissionDecisionApproveForLocationApprovalFactory : PermissionDecisionApproveForLocationApproval
+public partial class PermissionDecisionApproveForLocationApprovalWorkflow : PermissionDecisionApproveForLocationApproval
{
///
[JsonIgnore]
- public override string Kind => "factory";
+ public override string Kind => "workflow";
- /// Optional factory operation name or canonical approval key; when omitted, the approval covers all factory operations.
+ /// Optional workflow operation name or canonical approval key; when omitted, the approval covers all workflow operations.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("approvalKey")]
public string? ApprovalKey { get; set; }
@@ -19373,7 +18829,7 @@ public sealed class PermissionsLocationsAddToolApprovalResult
[JsonDerivedType(typeof(PermissionsLocationsAddToolApprovalDetailsMemory), "memory")]
[JsonDerivedType(typeof(PermissionsLocationsAddToolApprovalDetailsCustomTool), "custom-tool")]
[JsonDerivedType(typeof(PermissionsLocationsAddToolApprovalDetailsExtensionManagement), "extension-management")]
-[JsonDerivedType(typeof(PermissionsLocationsAddToolApprovalDetailsFactory), "factory")]
+[JsonDerivedType(typeof(PermissionsLocationsAddToolApprovalDetailsWorkflow), "workflow")]
[JsonDerivedType(typeof(PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess), "extension-permission-access")]
[JsonDerivedType(typeof(PermissionsLocationsAddToolApprovalDetailsExtensionEnvAccess), "extension-env-access")]
public partial class PermissionsLocationsAddToolApprovalDetails
@@ -19489,16 +18945,16 @@ public partial class PermissionsLocationsAddToolApprovalDetailsExtensionManageme
public string? Operation { get; set; }
}
-/// Location-persisted factory approval, optionally narrowed by approval key.
-/// The factory variant of .
+/// Location-persisted workflow approval, optionally narrowed by approval key.
+/// The workflow variant of .
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public partial class PermissionsLocationsAddToolApprovalDetailsFactory : PermissionsLocationsAddToolApprovalDetails
+public partial class PermissionsLocationsAddToolApprovalDetailsWorkflow : PermissionsLocationsAddToolApprovalDetails
{
///
[JsonIgnore]
- public override string Kind => "factory";
+ public override string Kind => "workflow";
- /// Optional factory operation name or canonical approval key; when omitted, the approval covers all factory operations.
+ /// Optional workflow operation name or canonical approval key; when omitted, the approval covers all workflow operations.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("approvalKey")]
public string? ApprovalKey { get; set; }
@@ -22314,57 +21770,6 @@ public sealed class ProviderTokenAcquireRequest
public string SessionId { get; set; } = string.Empty;
}
-/// Result returned by an extension factory closure.
-[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed class FactoryExecuteResult
-{
- /// Factory result value.
- [JsonPropertyName("result")]
- public JsonElement? Result { get; set; }
-}
-
-/// Parameters sent to the owning extension to execute a factory closure.
-[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed class FactoryExecuteRequest
-{
- /// Factory input value.
- [JsonPropertyName("args")]
- public JsonElement Args { get; set; }
-
- /// Opaque token identifying this factory execution attempt.
- [JsonPropertyName("executionToken")]
- public string ExecutionToken { get; set; } = string.Empty;
-
- /// Registered factory name.
- [JsonPropertyName("name")]
- public string Name { get; set; } = string.Empty;
-
- /// Factory run identifier.
- [JsonPropertyName("runId")]
- public string RunId { get; set; } = string.Empty;
-
- /// Target session identifier.
- [JsonPropertyName("sessionId")]
- public string SessionId { get; set; } = string.Empty;
-}
-
-/// Parameters for cooperatively aborting a factory body.
-[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed class FactoryAbortRequest
-{
- /// Opaque token identifying the execution attempt to abort.
- [JsonPropertyName("executionToken")]
- public string ExecutionToken { get; set; } = string.Empty;
-
- /// Factory run identifier.
- [JsonPropertyName("runId")]
- public string RunId { get; set; } = string.Empty;
-
- /// Target session identifier.
- [JsonPropertyName("sessionId")]
- public string SessionId { get; set; } = string.Empty;
-}
-
/// Result returned by an extension workflow closure.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
public sealed class WorkflowExecuteResult
@@ -28928,112 +28333,52 @@ public override void Write(Utf8JsonWriter writer, AuthInfoType value, JsonSerial
}
-/// Source category for a collected debug bundle entry.
+/// The provider kind stamped on a signed-in account.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
[JsonConverter(typeof(Converter))]
[DebuggerDisplay("{Value,nq}")]
-public readonly struct DebugCollectLogsSource : IEquatable
+public readonly struct AccountKind : IEquatable
{
private readonly string? _value;
- /// Initializes a new instance of the struct.
- /// The value to associate with this .
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
[JsonConstructor]
- public DebugCollectLogsSource(string value)
+ public AccountKind(string value)
{
ArgumentException.ThrowIfNullOrWhiteSpace(value);
_value = value;
}
- /// Gets the value associated with this .
+ /// Gets the value associated with this .
public string Value => _value ?? string.Empty;
- /// Session event log.
- public static DebugCollectLogsSource Events { get; } = new("events");
+ /// An OAuth github.com account.
+ public static AccountKind GitHubDotCom { get; } = new("githubDotCom");
- /// Process log for the session.
- public static DebugCollectLogsSource ProcessLog { get; } = new("process-log");
+ /// A GitHub Enterprise Cloud account — a GitHub account on a non-github.com host, e.g. *.ghe.com.
+ public static AccountKind Proxima { get; } = new("proxima");
- /// Interactive shell log for the session.
- public static DebugCollectLogsSource ShellLog { get; } = new("shell-log");
+ /// A GitHub (EMU) account derived from a base Entra identity.
+ public static AccountKind EntraEmu { get; } = new("entraEmu");
- /// Caller-provided diagnostic entry.
- public static DebugCollectLogsSource Additional { get; } = new("additional");
+ /// A base Microsoft Entra identity.
+ public static AccountKind Entra { get; } = new("entra");
- /// Returns a value indicating whether two instances are equivalent.
- public static bool operator ==(DebugCollectLogsSource left, DebugCollectLogsSource right) => left.Equals(right);
+ /// A Microsoft 365 Copilot (Loki) inference account derived from the same base Entra identity as an EMU account; its bearer is a Loki-scoped inference token consumed through the model-provider path, not the GitHub switcher.
+ public static AccountKind Loki { get; } = new("loki");
- /// Returns a value indicating whether two instances are not equivalent.
- public static bool operator !=(DebugCollectLogsSource left, DebugCollectLogsSource right) => !(left == right);
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(AccountKind left, AccountKind right) => left.Equals(right);
- ///
- public override bool Equals(object? obj) => obj is DebugCollectLogsSource other && Equals(other);
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(AccountKind left, AccountKind right) => !(left == right);
///
- public bool Equals(DebugCollectLogsSource other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+ public override bool Equals(object? obj) => obj is AccountKind other && Equals(other);
///
- public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
-
- ///
- public override string ToString() => Value;
-
- /// Provides a for serializing instances.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public sealed class Converter : JsonConverter
- {
- ///
- public override DebugCollectLogsSource Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
- {
- return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
- }
-
- ///
- public override void Write(Utf8JsonWriter writer, DebugCollectLogsSource value, JsonSerializerOptions options)
- {
- GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(DebugCollectLogsSource));
- }
- }
-}
-
-
-/// Destination kind that was written.
-[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-[JsonConverter(typeof(Converter))]
-[DebuggerDisplay("{Value,nq}")]
-public readonly struct DebugCollectLogsResultKind : IEquatable
-{
- private readonly string? _value;
-
- /// Initializes a new instance of the struct.
- /// The value to associate with this .
- [JsonConstructor]
- public DebugCollectLogsResultKind(string value)
- {
- ArgumentException.ThrowIfNullOrWhiteSpace(value);
- _value = value;
- }
-
- /// Gets the value associated with this .
- public string Value => _value ?? string.Empty;
-
- /// A .tgz archive was written.
- public static DebugCollectLogsResultKind Archive { get; } = new("archive");
-
- /// A directory containing the collected files was written.
- public static DebugCollectLogsResultKind Directory { get; } = new("directory");
-
- /// Returns a value indicating whether two instances are equivalent.
- public static bool operator ==(DebugCollectLogsResultKind left, DebugCollectLogsResultKind right) => left.Equals(right);
-
- /// Returns a value indicating whether two instances are not equivalent.
- public static bool operator !=(DebugCollectLogsResultKind left, DebugCollectLogsResultKind right) => !(left == right);
-
- ///
- public override bool Equals(object? obj) => obj is DebugCollectLogsResultKind other && Equals(other);
-
- ///
- public bool Equals(DebugCollectLogsResultKind other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+ public bool Equals(AccountKind other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
///
public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
@@ -29041,194 +28386,65 @@ public DebugCollectLogsResultKind(string value)
///
public override string ToString() => Value;
- /// Provides a for serializing instances.
+ /// Provides a for serializing instances.
[EditorBrowsable(EditorBrowsableState.Never)]
- public sealed class Converter : JsonConverter
+ public sealed class Converter : JsonConverter
{
///
- public override DebugCollectLogsResultKind Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ public override AccountKind Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
}
///
- public override void Write(Utf8JsonWriter writer, DebugCollectLogsResultKind value, JsonSerializerOptions options)
+ public override void Write(Utf8JsonWriter writer, AccountKind value, JsonSerializerOptions options)
{
- GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(DebugCollectLogsResultKind));
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(AccountKind));
}
}
}
-/// Kind of caller-provided debug log entry.
+/// A provider a consumer may interactively sign in with.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
[JsonConverter(typeof(Converter))]
[DebuggerDisplay("{Value,nq}")]
-public readonly struct DebugCollectLogsEntryKind : IEquatable
+public readonly struct LoginProviderKind : IEquatable
{
private readonly string? _value;
- /// Initializes a new instance of the struct.
- /// The value to associate with this .
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
[JsonConstructor]
- public DebugCollectLogsEntryKind(string value)
+ public LoginProviderKind(string value)
{
ArgumentException.ThrowIfNullOrWhiteSpace(value);
_value = value;
}
- /// Gets the value associated with this .
+ /// Gets the value associated with this .
public string Value => _value ?? string.Empty;
- /// Include a single server-local file.
- public static DebugCollectLogsEntryKind File { get; } = new("file");
+ /// OAuth github.com sign-in via the browser (web loopback + PKCE).
+ public static LoginProviderKind GitHubDotCom { get; } = new("githubDotCom");
- /// Include files from a server-local directory recursively.
- public static DebugCollectLogsEntryKind Directory { get; } = new("directory");
+ /// A GitHub Enterprise Cloud account — a GitHub account on a non-github.com host, e.g. *.ghe.com; the host is supplied interactively through the neutral input-required step.
+ public static LoginProviderKind Proxima { get; } = new("proxima");
- /// Returns a value indicating whether two instances are equivalent.
- public static bool operator ==(DebugCollectLogsEntryKind left, DebugCollectLogsEntryKind right) => left.Equals(right);
+ /// Microsoft Entra sign-in that derives a GitHub (EMU) credential.
+ public static LoginProviderKind Entra { get; } = new("entra");
- /// Returns a value indicating whether two instances are not equivalent.
- public static bool operator !=(DebugCollectLogsEntryKind left, DebugCollectLogsEntryKind right) => !(left == right);
-
- ///
- public override bool Equals(object? obj) => obj is DebugCollectLogsEntryKind other && Equals(other);
-
- ///
- public bool Equals(DebugCollectLogsEntryKind other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
-
- ///
- public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
-
- ///
- public override string ToString() => Value;
-
- /// Provides a for serializing instances.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public sealed class Converter : JsonConverter
- {
- ///
- public override DebugCollectLogsEntryKind Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
- {
- return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
- }
-
- ///
- public override void Write(Utf8JsonWriter writer, DebugCollectLogsEntryKind value, JsonSerializerOptions options)
- {
- GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(DebugCollectLogsEntryKind));
- }
- }
-}
-
-
-/// How a collected debug entry should be redacted before being staged.
-[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-[JsonConverter(typeof(Converter))]
-[DebuggerDisplay("{Value,nq}")]
-public readonly struct DebugCollectLogsRedaction : IEquatable
-{
- private readonly string? _value;
-
- /// Initializes a new instance of the struct.
- /// The value to associate with this .
- [JsonConstructor]
- public DebugCollectLogsRedaction(string value)
- {
- ArgumentException.ThrowIfNullOrWhiteSpace(value);
- _value = value;
- }
-
- /// Gets the value associated with this .
- public string Value => _value ?? string.Empty;
-
- /// Redact the file as plain UTF-8 log text.
- public static DebugCollectLogsRedaction PlainText { get; } = new("plain-text");
-
- /// Redact each non-empty line as a session event JSON object, falling back to plain-text redaction for malformed lines.
- public static DebugCollectLogsRedaction EventsJsonl { get; } = new("events-jsonl");
-
- /// No redaction is applied. The caller must ensure any necessary redaction is performed before this call.
- public static DebugCollectLogsRedaction None { get; } = new("none");
-
- /// Returns a value indicating whether two instances are equivalent.
- public static bool operator ==(DebugCollectLogsRedaction left, DebugCollectLogsRedaction right) => left.Equals(right);
-
- /// Returns a value indicating whether two instances are not equivalent.
- public static bool operator !=(DebugCollectLogsRedaction left, DebugCollectLogsRedaction right) => !(left == right);
-
- ///
- public override bool Equals(object? obj) => obj is DebugCollectLogsRedaction other && Equals(other);
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(LoginProviderKind left, LoginProviderKind right) => left.Equals(right);
- ///
- public bool Equals(DebugCollectLogsRedaction other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(LoginProviderKind left, LoginProviderKind right) => !(left == right);
///
- public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
+ public override bool Equals(object? obj) => obj is LoginProviderKind other && Equals(other);
///
- public override string ToString() => Value;
-
- /// Provides a for serializing instances.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public sealed class Converter : JsonConverter
- {
- ///
- public override DebugCollectLogsRedaction Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
- {
- return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
- }
-
- ///
- public override void Write(Utf8JsonWriter writer, DebugCollectLogsRedaction value, JsonSerializerOptions options)
- {
- GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(DebugCollectLogsRedaction));
- }
- }
-}
-
-
-/// Cumulative resource ceiling that stopped a factory run.
-[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-[JsonConverter(typeof(Converter))]
-[DebuggerDisplay("{Value,nq}")]
-public readonly struct FactoryRunFailureKind : IEquatable
-{
- private readonly string? _value;
-
- /// Initializes a new instance of the struct.
- /// The value to associate with this .
- [JsonConstructor]
- public FactoryRunFailureKind(string value)
- {
- ArgumentException.ThrowIfNullOrWhiteSpace(value);
- _value = value;
- }
-
- /// Gets the value associated with this .
- public string Value => _value ?? string.Empty;
-
- /// The run admitted the approved maximum total number of subagents.
- public static FactoryRunFailureKind MaxTotalSubagents { get; } = new("maxTotalSubagents");
-
- /// The run reached the approved accumulated active-execution time in seconds.
- public static FactoryRunFailureKind TimeoutSeconds { get; } = new("timeoutSeconds");
-
- /// The run's settled subagent model usage exceeded the approved AI-credit ceiling, or no headroom remained for another subagent.
- public static FactoryRunFailureKind MaxAiCredits { get; } = new("maxAiCredits");
-
- /// Returns a value indicating whether two instances are equivalent.
- public static bool operator ==(FactoryRunFailureKind left, FactoryRunFailureKind right) => left.Equals(right);
-
- /// Returns a value indicating whether two instances are not equivalent.
- public static bool operator !=(FactoryRunFailureKind left, FactoryRunFailureKind right) => !(left == right);
-
- ///
- public override bool Equals(object? obj) => obj is FactoryRunFailureKind other && Equals(other);
-
- ///
- public bool Equals(FactoryRunFailureKind other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+ public bool Equals(LoginProviderKind other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
///
public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
@@ -29236,89 +28452,65 @@ public FactoryRunFailureKind(string value)
///
public override string ToString() => Value;
- /// Provides a for serializing instances.
+ /// Provides a for serializing instances.
[EditorBrowsable(EditorBrowsableState.Never)]
- public sealed class Converter : JsonConverter
+ public sealed class Converter : JsonConverter
{
///
- public override FactoryRunFailureKind Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ public override LoginProviderKind Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
}
///
- public override void Write(Utf8JsonWriter writer, FactoryRunFailureKind value, JsonSerializerOptions options)
+ public override void Write(Utf8JsonWriter writer, LoginProviderKind value, JsonSerializerOptions options)
{
- GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(FactoryRunFailureKind));
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(LoginProviderKind));
}
}
}
-/// Execution-critical factory storage operation.
+/// Terminal disposition of a login persistence attempt.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
[JsonConverter(typeof(Converter))]
[DebuggerDisplay("{Value,nq}")]
-public readonly struct FactoryDurableOperation : IEquatable
+public readonly struct AuthLoginResultStatus : IEquatable
{
private readonly string? _value;
- /// Initializes a new instance of the struct.
- /// The value to associate with this .
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
[JsonConstructor]
- public FactoryDurableOperation(string value)
+ public AuthLoginResultStatus(string value)
{
ArgumentException.ThrowIfNullOrWhiteSpace(value);
_value = value;
}
- /// Gets the value associated with this .
+ /// Gets the value associated with this .
public string Value => _value ?? string.Empty;
- /// Creating the durable run and declared phases.
- public static FactoryDurableOperation CreateRun { get; } = new("createRun");
-
- /// Persisting the transition to running.
- public static FactoryDurableOperation MarkRunStarted { get; } = new("markRunStarted");
+ /// The credential was persisted and the account is signed in.
+ public static AuthLoginResultStatus Completed { get; } = new("completed");
- /// Persisting the terminal run envelope.
- public static FactoryDurableOperation FinishRun { get; } = new("finishRun");
+ /// Persistence needs explicit consent to store the token in plaintext.
+ public static AuthLoginResultStatus NeedsPlaintextConsent { get; } = new("needs-plaintext-consent");
- /// Persisting subagent admission accounting.
- public static FactoryDurableOperation ReserveAgent { get; } = new("reserveAgent");
-
- /// Rolling back an uncommitted subagent admission.
- public static FactoryDurableOperation ReleaseAgent { get; } = new("releaseAgent");
-
- /// Persisting an idempotent model-usage charge.
- public static FactoryDurableOperation ChargeCredit { get; } = new("chargeCredit");
-
- /// Persisting active execution time.
- public static FactoryDurableOperation AddElapsed { get; } = new("addElapsed");
-
- /// Reading the authoritative AI-credit total.
- public static FactoryDurableOperation ReconcileCreditTotal { get; } = new("reconcileCreditTotal");
-
- /// Reading a journal entry without treating storage failure as a cache miss.
- public static FactoryDurableOperation JournalGet { get; } = new("journalGet");
-
- /// Persisting a journal entry before reporting success.
- public static FactoryDurableOperation JournalPut { get; } = new("journalPut");
-
- /// Renewing the durable owner lease that proves this process still owns the run.
- public static FactoryDurableOperation RefreshLease { get; } = new("refreshLease");
+ /// The user declined plaintext persistence.
+ public static AuthLoginResultStatus Declined { get; } = new("declined");
- /// Returns a value indicating whether two instances are equivalent.
- public static bool operator ==(FactoryDurableOperation left, FactoryDurableOperation right) => left.Equals(right);
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(AuthLoginResultStatus left, AuthLoginResultStatus right) => left.Equals(right);
- /// Returns a value indicating whether two instances are not equivalent.
- public static bool operator !=(FactoryDurableOperation left, FactoryDurableOperation right) => !(left == right);
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(AuthLoginResultStatus left, AuthLoginResultStatus right) => !(left == right);
///
- public override bool Equals(object? obj) => obj is FactoryDurableOperation other && Equals(other);
+ public override bool Equals(object? obj) => obj is AuthLoginResultStatus other && Equals(other);
///
- public bool Equals(FactoryDurableOperation other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+ public bool Equals(AuthLoginResultStatus other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
///
public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
@@ -29326,77 +28518,68 @@ public FactoryDurableOperation(string value)
///
public override string ToString() => Value;
- /// Provides a for serializing instances.
+ /// Provides a for serializing instances.
[EditorBrowsable(EditorBrowsableState.Never)]
- public sealed class Converter : JsonConverter
+ public sealed class Converter : JsonConverter
{
///
- public override FactoryDurableOperation Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ public override AuthLoginResultStatus Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
}
///
- public override void Write(Utf8JsonWriter writer, FactoryDurableOperation value, JsonSerializerOptions options)
+ public override void Write(Utf8JsonWriter writer, AuthLoginResultStatus value, JsonSerializerOptions options)
{
- GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(FactoryDurableOperation));
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(AuthLoginResultStatus));
}
}
}
-/// Current or terminal state of a factory run.
+/// Source category for a collected debug bundle entry.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
[JsonConverter(typeof(Converter))]
[DebuggerDisplay("{Value,nq}")]
-public readonly struct FactoryRunStatus : IEquatable
+public readonly struct DebugCollectLogsSource : IEquatable
{
private readonly string? _value;
- /// Initializes a new instance of the struct.
- /// The value to associate with this .
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
[JsonConstructor]
- public FactoryRunStatus(string value)
+ public DebugCollectLogsSource(string value)
{
ArgumentException.ThrowIfNullOrWhiteSpace(value);
_value = value;
}
- /// Gets the value associated with this .
+ /// Gets the value associated with this .
public string Value => _value ?? string.Empty;
- /// The run was minted and is awaiting approval.
- public static FactoryRunStatus Pending { get; } = new("pending");
-
- /// The run is executing.
- public static FactoryRunStatus Running { get; } = new("running");
-
- /// The run completed successfully.
- public static FactoryRunStatus Completed { get; } = new("completed");
-
- /// The run was interrupted while resource budget remained.
- public static FactoryRunStatus Halted { get; } = new("halted");
+ /// Session event log.
+ public static DebugCollectLogsSource Events { get; } = new("events");
- /// The current attempt stopped intentionally and the run may be resumed.
- public static FactoryRunStatus Paused { get; } = new("paused");
+ /// Process log for the session.
+ public static DebugCollectLogsSource ProcessLog { get; } = new("process-log");
- /// The run was cancelled before completion.
- public static FactoryRunStatus Cancelled { get; } = new("cancelled");
+ /// Interactive shell log for the session.
+ public static DebugCollectLogsSource ShellLog { get; } = new("shell-log");
- /// The factory body failed or reached a cumulative resource ceiling.
- public static FactoryRunStatus Error { get; } = new("error");
+ /// Caller-provided diagnostic entry.
+ public static DebugCollectLogsSource Additional { get; } = new("additional");
- /// Returns a value indicating whether two instances are equivalent.
- public static bool operator ==(FactoryRunStatus left, FactoryRunStatus right) => left.Equals(right);
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(DebugCollectLogsSource left, DebugCollectLogsSource right) => left.Equals(right);
- /// Returns a value indicating whether two instances are not equivalent.
- public static bool operator !=(FactoryRunStatus left, FactoryRunStatus right) => !(left == right);
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(DebugCollectLogsSource left, DebugCollectLogsSource right) => !(left == right);
///
- public override bool Equals(object? obj) => obj is FactoryRunStatus other && Equals(other);
+ public override bool Equals(object? obj) => obj is DebugCollectLogsSource other && Equals(other);
///
- public bool Equals(FactoryRunStatus other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+ public bool Equals(DebugCollectLogsSource other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
///
public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
@@ -29404,68 +28587,62 @@ public FactoryRunStatus(string value)
///
public override string ToString() => Value;
- /// Provides a for serializing instances.
+ /// Provides a for serializing instances.
[EditorBrowsable(EditorBrowsableState.Never)]
- public sealed class Converter : JsonConverter
+ public sealed class Converter : JsonConverter
{
///
- public override FactoryRunStatus Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ public override DebugCollectLogsSource Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
}
///
- public override void Write(Utf8JsonWriter writer, FactoryRunStatus value, JsonSerializerOptions options)
+ public override void Write(Utf8JsonWriter writer, DebugCollectLogsSource value, JsonSerializerOptions options)
{
- GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(FactoryRunStatus));
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(DebugCollectLogsSource));
}
}
}
-/// Derived lifecycle state of a factory phase.
+/// Destination kind that was written.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
[JsonConverter(typeof(Converter))]
[DebuggerDisplay("{Value,nq}")]
-public readonly struct FactoryPhaseStatus : IEquatable
+public readonly struct DebugCollectLogsResultKind : IEquatable
{
private readonly string? _value;
- /// Initializes a new instance of the struct.
- /// The value to associate with this .
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
[JsonConstructor]
- public FactoryPhaseStatus(string value)
+ public DebugCollectLogsResultKind(string value)
{
ArgumentException.ThrowIfNullOrWhiteSpace(value);
_value = value;
}
- /// Gets the value associated with this .
+ /// Gets the value associated with this .
public string Value => _value ?? string.Empty;
- /// The phase has not been entered yet.
- public static FactoryPhaseStatus Pending { get; } = new("pending");
-
- /// The phase is currently entered and accumulating active time.
- public static FactoryPhaseStatus Active { get; } = new("active");
-
- /// The phase was entered and has since been closed.
- public static FactoryPhaseStatus Completed { get; } = new("completed");
+ /// A .tgz archive was written.
+ public static DebugCollectLogsResultKind Archive { get; } = new("archive");
- /// The phase was never entered because a later phase was entered or the run reached a terminal state.
- public static FactoryPhaseStatus Skipped { get; } = new("skipped");
+ /// A directory containing the collected files was written.
+ public static DebugCollectLogsResultKind Directory { get; } = new("directory");
- /// Returns a value indicating whether two instances are equivalent.
- public static bool operator ==(FactoryPhaseStatus left, FactoryPhaseStatus right) => left.Equals(right);
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(DebugCollectLogsResultKind left, DebugCollectLogsResultKind right) => left.Equals(right);
- /// Returns a value indicating whether two instances are not equivalent.
- public static bool operator !=(FactoryPhaseStatus left, FactoryPhaseStatus right) => !(left == right);
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(DebugCollectLogsResultKind left, DebugCollectLogsResultKind right) => !(left == right);
///
- public override bool Equals(object? obj) => obj is FactoryPhaseStatus other && Equals(other);
+ public override bool Equals(object? obj) => obj is DebugCollectLogsResultKind other && Equals(other);
///
- public bool Equals(FactoryPhaseStatus other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+ public bool Equals(DebugCollectLogsResultKind other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
///
public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
@@ -29473,62 +28650,62 @@ public FactoryPhaseStatus(string value)
///
public override string ToString() => Value;
- /// Provides a for serializing instances.
+ /// Provides a for serializing instances.
[EditorBrowsable(EditorBrowsableState.Never)]
- public sealed class Converter : JsonConverter
+ public sealed class Converter : JsonConverter
{
///
- public override FactoryPhaseStatus Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ public override DebugCollectLogsResultKind Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
}
///
- public override void Write(Utf8JsonWriter writer, FactoryPhaseStatus value, JsonSerializerOptions options)
+ public override void Write(Utf8JsonWriter writer, DebugCollectLogsResultKind value, JsonSerializerOptions options)
{
- GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(FactoryPhaseStatus));
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(DebugCollectLogsResultKind));
}
}
}
-/// Kind of factory progress line.
+/// Kind of caller-provided debug log entry.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
[JsonConverter(typeof(Converter))]
[DebuggerDisplay("{Value,nq}")]
-public readonly struct FactoryLogLineKind : IEquatable
+public readonly struct DebugCollectLogsEntryKind : IEquatable
{
private readonly string? _value;
- /// Initializes a new instance of the struct.
- /// The value to associate with this .
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
[JsonConstructor]
- public FactoryLogLineKind(string value)
+ public DebugCollectLogsEntryKind(string value)
{
ArgumentException.ThrowIfNullOrWhiteSpace(value);
_value = value;
}
- /// Gets the value associated with this .
+ /// Gets the value associated with this .
public string Value => _value ?? string.Empty;
- /// A narrator log line.
- public static FactoryLogLineKind Log { get; } = new("log");
+ /// Include a single server-local file.
+ public static DebugCollectLogsEntryKind File { get; } = new("file");
- /// A named factory phase marker.
- public static FactoryLogLineKind Phase { get; } = new("phase");
+ /// Include files from a server-local directory recursively.
+ public static DebugCollectLogsEntryKind Directory { get; } = new("directory");
- /// Returns a value indicating whether two instances are equivalent.
- public static bool operator ==(FactoryLogLineKind left, FactoryLogLineKind right) => left.Equals(right);
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(DebugCollectLogsEntryKind left, DebugCollectLogsEntryKind right) => left.Equals(right);
- /// Returns a value indicating whether two instances are not equivalent.
- public static bool operator !=(FactoryLogLineKind left, FactoryLogLineKind right) => !(left == right);
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(DebugCollectLogsEntryKind left, DebugCollectLogsEntryKind right) => !(left == right);
///
- public override bool Equals(object? obj) => obj is FactoryLogLineKind other && Equals(other);
+ public override bool Equals(object? obj) => obj is DebugCollectLogsEntryKind other && Equals(other);
///
- public bool Equals(FactoryLogLineKind other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+ public bool Equals(DebugCollectLogsEntryKind other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
///
public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
@@ -29536,62 +28713,65 @@ public FactoryLogLineKind(string value)
///
public override string ToString() => Value;
- /// Provides a for serializing instances.
+ /// Provides a for serializing instances.
[EditorBrowsable(EditorBrowsableState.Never)]
- public sealed class Converter : JsonConverter
+ public sealed class Converter : JsonConverter
{
///
- public override FactoryLogLineKind Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ public override DebugCollectLogsEntryKind Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
}
///
- public override void Write(Utf8JsonWriter writer, FactoryLogLineKind value, JsonSerializerOptions options)
+ public override void Write(Utf8JsonWriter writer, DebugCollectLogsEntryKind value, JsonSerializerOptions options)
{
- GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(FactoryLogLineKind));
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(DebugCollectLogsEntryKind));
}
}
}
-/// Action the runtime selected for a durable factory pause checkpoint.
+/// How a collected debug entry should be redacted before being staged.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
[JsonConverter(typeof(Converter))]
[DebuggerDisplay("{Value,nq}")]
-public readonly struct FactoryPauseCheckpointAction : IEquatable
+public readonly struct DebugCollectLogsRedaction : IEquatable
{
private readonly string? _value;
- /// Initializes a new instance of the struct.
- /// The value to associate with this .
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
[JsonConstructor]
- public FactoryPauseCheckpointAction(string value)
+ public DebugCollectLogsRedaction(string value)
{
ArgumentException.ThrowIfNullOrWhiteSpace(value);
_value = value;
}
- /// Gets the value associated with this .
+ /// Gets the value associated with this .
public string Value => _value ?? string.Empty;
- /// The checkpoint was committed by a prior paused attempt, so execution may continue.
- public static FactoryPauseCheckpointAction Continue { get; } = new("continue");
+ /// Redact the file as plain UTF-8 log text.
+ public static DebugCollectLogsRedaction PlainText { get; } = new("plain-text");
- /// This attempt claimed the checkpoint and must cooperatively stop.
- public static FactoryPauseCheckpointAction Pause { get; } = new("pause");
+ /// Redact each non-empty line as a session event JSON object, falling back to plain-text redaction for malformed lines.
+ public static DebugCollectLogsRedaction EventsJsonl { get; } = new("events-jsonl");
- /// Returns a value indicating whether two instances are equivalent.
- public static bool operator ==(FactoryPauseCheckpointAction left, FactoryPauseCheckpointAction right) => left.Equals(right);
+ /// No redaction is applied. The caller must ensure any necessary redaction is performed before this call.
+ public static DebugCollectLogsRedaction None { get; } = new("none");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(DebugCollectLogsRedaction left, DebugCollectLogsRedaction right) => left.Equals(right);
- /// Returns a value indicating whether two instances are not equivalent.
- public static bool operator !=(FactoryPauseCheckpointAction left, FactoryPauseCheckpointAction right) => !(left == right);
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(DebugCollectLogsRedaction left, DebugCollectLogsRedaction right) => !(left == right);
///
- public override bool Equals(object? obj) => obj is FactoryPauseCheckpointAction other && Equals(other);
+ public override bool Equals(object? obj) => obj is DebugCollectLogsRedaction other && Equals(other);
///
- public bool Equals(FactoryPauseCheckpointAction other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+ public bool Equals(DebugCollectLogsRedaction other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
///
public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
@@ -29599,20 +28779,20 @@ public FactoryPauseCheckpointAction(string value)
///
public override string ToString() => Value;
- /// Provides a for serializing instances.
+ /// Provides a for serializing instances.
[EditorBrowsable(EditorBrowsableState.Never)]
- public sealed class Converter : JsonConverter
+ public sealed class Converter : JsonConverter
{
///
- public override FactoryPauseCheckpointAction Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ public override DebugCollectLogsRedaction Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
}
///
- public override void Write(Utf8JsonWriter writer, FactoryPauseCheckpointAction value, JsonSerializerOptions options)
+ public override void Write(Utf8JsonWriter writer, DebugCollectLogsRedaction value, JsonSerializerOptions options)
{
- GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(FactoryPauseCheckpointAction));
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(DebugCollectLogsRedaction));
}
}
}
@@ -35122,7 +34302,7 @@ public PermissionModeSource(string value)
/// The mode was set at startup by the `defaultPermissionMode` user setting.
public static PermissionModeSource UserSetting { get; } = new("user_setting");
- /// The mode was set at startup by authenticated organization targeting.
+ /// Historical compatibility value for runtimes that selected Assisted mode through organization targeting. Current runtimes do not produce this source.
public static PermissionModeSource OrganizationTargeting { get; } = new("organization_targeting");
/// The mode was set through an RPC caller.
@@ -38585,20 +37765,20 @@ internal SessionRpc(CopilotSession session)
Interlocked.CompareExchange(ref field, new(_session), null) ??
field;
- /// Debug APIs.
- public DebugApi Debug =>
+ /// Accounts APIs.
+ public AccountsApi Accounts =>
field ??
Interlocked.CompareExchange(ref field, new(_session), null) ??
field;
- /// Canvas APIs.
- public CanvasApi Canvas =>
+ /// Debug APIs.
+ public DebugApi Debug =>
field ??
Interlocked.CompareExchange(ref field, new(_session), null) ??
field;
- /// Factory APIs.
- public FactoryApi Factory =>
+ /// Canvas APIs.
+ public CanvasApi Canvas =>
field ??
Interlocked.CompareExchange(ref field, new(_session), null) ??
field;
@@ -39161,6 +38341,113 @@ internal async Task> LastAuthErrorsAsync(Cancellation
}
}
+/// Provides session-scoped Accounts APIs.
+[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
+public sealed class AccountsApi
+{
+ private readonly CopilotSession _session;
+
+ internal AccountsApi(CopilotSession session)
+ {
+ _session = session;
+ }
+
+ /// Enumerate a typed accounts collection: the signed-in accounts, or the providers offered for interactive login.
+ /// Which typed accounts collection to enumerate.
+ /// The to monitor for cancellation requests. The default is .
+ /// The enumerated collection, keyed by the same selector as the query.
+ public async Task EnumerateAsync(AuthEnumerateQuery query, CancellationToken cancellationToken = default)
+ {
+ ArgumentNullException.ThrowIfNull(query);
+ _session.ThrowIfDisposed();
+
+ var request = new AccountsEnumerateRequest { SessionId = _session.SessionId, Query = query };
+ return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.accounts.enumerate", [request], cancellationToken);
+ }
+
+ /// Read one typed accounts datum: the active account, a neutral status summary, or the last authentication errors.
+ /// Which typed accounts datum to read.
+ /// The to monitor for cancellation requests. The default is .
+ /// The read result, keyed by the same selector as the query.
+ public async Task GetAsync(AuthReadQuery query, CancellationToken cancellationToken = default)
+ {
+ ArgumentNullException.ThrowIfNull(query);
+ _session.ThrowIfDisposed();
+
+ var request = new AccountsGetRequest { SessionId = _session.SessionId, Query = query };
+ return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.accounts.get", [request], cancellationToken);
+ }
+
+ /// Apply one non-interactive accounts mutation: switch the active account, log an account out, or set credentials from a token.
+ /// The non-interactive mutation command to apply.
+ /// The to monitor for cancellation requests. The default is .
+ /// Result of a non-interactive accounts mutation.
+ public async Task SetAsync(AuthWrite command, CancellationToken cancellationToken = default)
+ {
+ ArgumentNullException.ThrowIfNull(command);
+ _session.ThrowIfDisposed();
+
+ var request = new AccountsSetRequest { SessionId = _session.SessionId, Command = command };
+ return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.accounts.set", [request], cancellationToken);
+ }
+
+ /// Login APIs.
+ public AccountsLoginApi Login =>
+ field ??
+ Interlocked.CompareExchange(ref field, new(_session), null) ??
+ field;
+}
+
+/// Provides session-scoped AccountsLogin APIs.
+[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
+public sealed class AccountsLoginApi
+{
+ private readonly CopilotSession _session;
+
+ internal AccountsLoginApi(CopilotSession session)
+ {
+ _session = session;
+ }
+
+ /// Begin an interactive login flow for a provider kind (dispatch is kind-only) and return its opaque flow id and first step.
+ /// The provider kind to sign in with.
+ /// The to monitor for cancellation requests. The default is .
+ /// A started login flow: its opaque id and first step.
+ public async Task BeginAsync(LoginProviderKind kind, CancellationToken cancellationToken = default)
+ {
+ _session.ThrowIfDisposed();
+
+ var request = new AuthLoginBeginRequest { SessionId = _session.SessionId, Kind = kind };
+ return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.accounts.login.begin", [request], cancellationToken);
+ }
+
+ /// Advance an in-flight login flow, optionally fulfilling an input-required step, and return the next step.
+ /// Opaque flow id from begin.
+ /// Neutral input fulfilling a preceding input-required step (e.g. a GHEC host); ignored otherwise.
+ /// The to monitor for cancellation requests. The default is .
+ /// One step in an interactive login flow. The consumer acts on the step and calls advance to proceed. Browser-open is encoded as two distinct steps by design: `open-url` is CONSUMER-driven (the provider surfaces the authorize URL and the consumer opens it — github.com/GHEC web), while `needs-interaction` is PROVIDER-driven (the provider opens the browser or broker UI itself and does not surface a URL — Entra).
+ public async Task AdvanceAsync(string flowId, string? input = null, CancellationToken cancellationToken = default)
+ {
+ ArgumentNullException.ThrowIfNull(flowId);
+ _session.ThrowIfDisposed();
+
+ var request = new AuthLoginAdvanceRequest { SessionId = _session.SessionId, FlowId = flowId, Input = input };
+ return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.accounts.login.advance", [request], cancellationToken);
+ }
+
+ /// Cancel an in-flight login flow and release its resources.
+ /// Opaque flow id from begin.
+ /// The to monitor for cancellation requests. The default is .
+ public async Task CancelAsync(string flowId, CancellationToken cancellationToken = default)
+ {
+ ArgumentNullException.ThrowIfNull(flowId);
+ _session.ThrowIfDisposed();
+
+ var request = new AuthLoginCancelRequest { SessionId = _session.SessionId, FlowId = flowId };
+ await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.accounts.login.cancel", [request], cancellationToken);
+ }
+}
+
/// Provides session-scoped Debug APIs.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
public sealed class DebugApi
@@ -39331,271 +38618,6 @@ internal async Task UnregisterAsync(string connectionId, CancellationToken cance
}
}
-/// Provides session-scoped Factory APIs.
-[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed class FactoryApi
-{
- private readonly CopilotSession _session;
-
- internal FactoryApi(CopilotSession session)
- {
- _session = session;
- }
-
- /// Runs a registered factory by name at the top level.
- /// Registered factory name.
- /// Factory input value.
- /// Factory invocation options.
- /// The to monitor for cancellation requests. The default is .
- /// Complete current or terminal factory run envelope.
- public async Task RunAsync(string name, object args, RunOptions? options = null, CancellationToken cancellationToken = default)
- {
- ArgumentNullException.ThrowIfNull(name);
- ArgumentNullException.ThrowIfNull(args);
- _session.ThrowIfDisposed();
-
- var request = new FactoryRunRequest { SessionId = _session.SessionId, Name = name, Args = CopilotClient.ToJsonElementForWire(args)!.Value, Options = options };
- return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.factory.run", [request], cancellationToken);
- }
-
- /// Resumes a factory run using its persisted name, arguments, journal, and accounting.
- /// Factory run identifier.
- /// Optional per-invocation resource ceiling overrides.
- /// Whether to notify the originating session when the factory completes.
- /// Whether to emit factory phase names to the session transcript.
- /// The to monitor for cancellation requests. The default is .
- /// Resolved persisted factory identity and resumed run envelope.
- public async Task ResumeAsync(string runId, FactoryRunLimits? limits = null, bool? notifyOnComplete = null, bool? logPhaseNames = null, CancellationToken cancellationToken = default)
- {
- ArgumentNullException.ThrowIfNull(runId);
- _session.ThrowIfDisposed();
-
- var request = new FactoryResumeRequest { SessionId = _session.SessionId, RunId = runId, Limits = limits, NotifyOnComplete = notifyOnComplete, LogPhaseNames = logPhaseNames };
- return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.factory.resume", [request], cancellationToken);
- }
-
- /// Internal tool-originated factory invocation.
- /// Registered factory name.
- /// Factory input value.
- /// Tool-originated factory invocation options.
- /// Opaque identifier of the originating tool call.
- /// The to monitor for cancellation requests. The default is .
- /// Complete current or terminal factory run envelope.
- internal async Task RunFromToolAsync(string name, object args, FactoryToolRunOptions? options = null, string? toolCallId = null, CancellationToken cancellationToken = default)
- {
- ArgumentNullException.ThrowIfNull(name);
- ArgumentNullException.ThrowIfNull(args);
- _session.ThrowIfDisposed();
-
- var request = new FactoryToolRunRequest { SessionId = _session.SessionId, Name = name, Args = CopilotClient.ToJsonElementForWire(args)!.Value, Options = options, ToolCallId = toolCallId };
- return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.factory.runFromTool", [request], cancellationToken);
- }
-
- /// Internal tool-originated factory resume.
- /// Factory run identifier.
- /// Optional per-invocation resource ceiling overrides.
- /// Opaque identifier of the originating tool call.
- /// The to monitor for cancellation requests. The default is .
- /// Resolved persisted factory identity and resumed run envelope.
- internal async Task ResumeFromToolAsync(string runId, FactoryRunLimits? limits = null, string? toolCallId = null, CancellationToken cancellationToken = default)
- {
- ArgumentNullException.ThrowIfNull(runId);
- _session.ThrowIfDisposed();
-
- var request = new FactoryToolResumeRequest { SessionId = _session.SessionId, RunId = runId, Limits = limits, ToolCallId = toolCallId };
- return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.factory.resumeFromTool", [request], cancellationToken);
- }
-
- /// Gets the current or settled envelope for a factory run.
- /// Factory run identifier.
- /// The to monitor for cancellation requests. The default is .
- /// Complete current or terminal factory run envelope.
- public async Task GetRunAsync(string runId, CancellationToken cancellationToken = default)
- {
- ArgumentNullException.ThrowIfNull(runId);
- _session.ThrowIfDisposed();
-
- var request = new FactoryGetRunRequest { SessionId = _session.SessionId, RunId = runId };
- return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.factory.getRun", [request], cancellationToken);
- }
-
- /// Lists durable factory runs for this session in creation order.
- /// Exclusive forward cursor.
- /// Exclusive backward cursor.
- /// Maximum terminal runs to return. Defaults to 200 and is capped at 500.
- /// The to monitor for cancellation requests. The default is .
- /// A page of factory runs in durable creation order.
- public async Task ListRunsAsync(long? afterSeq = null, long? beforeSeq = null, int? limit = null, CancellationToken cancellationToken = default)
- {
- _session.ThrowIfDisposed();
-
- var request = new FactoryListRunsRequest { SessionId = _session.SessionId, AfterSeq = afterSeq, BeforeSeq = beforeSeq, Limit = limit };
- return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.factory.listRuns", [request], cancellationToken);
- }
-
- /// Gets durable and live observability detail for one factory run.
- /// Factory run identifier.
- /// The to monitor for cancellation requests. The default is .
- /// Full factory run observability detail.
- public async Task GetRunDetailAsync(string runId, CancellationToken cancellationToken = default)
- {
- ArgumentNullException.ThrowIfNull(runId);
- _session.ThrowIfDisposed();
-
- var request = new FactoryGetRunRequest { SessionId = _session.SessionId, RunId = runId };
- return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.factory.getRunDetail", [request], cancellationToken);
- }
-
- /// Pages durable progress for one factory run.
- /// Factory run identifier.
- /// Optional phase identifier used to scope records and cursors.
- /// Exclusive forward cursor.
- /// Exclusive backward cursor.
- /// Maximum records to return. Defaults to 200 and is capped at 500.
- /// The to monitor for cancellation requests. The default is .
- /// A bidirectional page of factory progress.
- public async Task GetRunProgressAsync(string runId, string? phaseId = null, long? afterSeq = null, long? beforeSeq = null, int? limit = null, CancellationToken cancellationToken = default)
- {
- ArgumentNullException.ThrowIfNull(runId);
- _session.ThrowIfDisposed();
-
- var request = new FactoryGetRunProgressRequest { SessionId = _session.SessionId, RunId = runId, PhaseId = phaseId, AfterSeq = afterSeq, BeforeSeq = beforeSeq, Limit = limit };
- return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.factory.getRunProgress", [request], cancellationToken);
- }
-
- /// Requests cancellation of a factory run and returns its run envelope.
- /// Factory run identifier.
- /// The to monitor for cancellation requests. The default is .
- /// Complete current or terminal factory run envelope.
- public async Task CancelAsync(string runId, CancellationToken cancellationToken = default)
- {
- ArgumentNullException.ThrowIfNull(runId);
- _session.ThrowIfDisposed();
-
- var request = new FactoryCancelRequest { SessionId = _session.SessionId, RunId = runId };
- return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.factory.cancel", [request], cancellationToken);
- }
-
- /// Pauses a running factory and returns its settled run envelope.
- /// Factory run identifier.
- /// The to monitor for cancellation requests. The default is .
- /// Complete current or terminal factory run envelope.
- public async Task PauseAsync(string runId, CancellationToken cancellationToken = default)
- {
- ArgumentNullException.ThrowIfNull(runId);
- _session.ThrowIfDisposed();
-
- var request = new FactoryPauseRequest { SessionId = _session.SessionId, RunId = runId };
- return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.factory.pause", [request], cancellationToken);
- }
-
- /// Atomically pauses an owned factory attempt at a durable checkpoint.
- /// Factory run identifier.
- /// Opaque token identifying the execution attempt that reached the checkpoint.
- /// Stable author-defined checkpoint key.
- /// The to monitor for cancellation requests. The default is .
- internal async Task PauseAtCheckpointAsync(string runId, string executionToken, string key, CancellationToken cancellationToken = default)
- {
- ArgumentNullException.ThrowIfNull(runId);
- ArgumentNullException.ThrowIfNull(executionToken);
- ArgumentNullException.ThrowIfNull(key);
- _session.ThrowIfDisposed();
-
- var request = new FactoryPauseCheckpointRequest { SessionId = _session.SessionId, RunId = runId, ExecutionToken = executionToken, Key = key };
- return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.factory.pauseAtCheckpoint", [request], cancellationToken);
- }
-
- /// Records a batch of ordered factory progress lines.
- /// Factory run identifier.
- /// Opaque token identifying the current factory execution attempt.
- /// Ordered progress lines to append.
- /// The to monitor for cancellation requests. The default is .
- /// Acknowledgement that a factory request was accepted.
- public async Task LogAsync(string runId, string executionToken, IList lines, CancellationToken cancellationToken = default)
- {
- ArgumentNullException.ThrowIfNull(runId);
- ArgumentNullException.ThrowIfNull(executionToken);
- ArgumentNullException.ThrowIfNull(lines);
- _session.ThrowIfDisposed();
-
- var request = new FactoryLogRequest { SessionId = _session.SessionId, RunId = runId, ExecutionToken = executionToken, Lines = lines };
- return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.factory.log", [request], cancellationToken);
- }
-
- /// Runs one factory-scoped subagent and returns its result.
- /// Factory run identifier that owns the subagent.
- /// Opaque token identifying the current factory execution attempt.
- /// Prompt to send to the subagent.
- /// Subagent execution options.
- /// The to monitor for cancellation requests. The default is .
- /// Result of one factory-scoped subagent call.
- public async Task AgentAsync(string factoryRunId, string executionToken, string prompt, FactoryAgentOptions opts, CancellationToken cancellationToken = default)
- {
- ArgumentNullException.ThrowIfNull(factoryRunId);
- ArgumentNullException.ThrowIfNull(executionToken);
- ArgumentNullException.ThrowIfNull(prompt);
- ArgumentNullException.ThrowIfNull(opts);
- _session.ThrowIfDisposed();
-
- var request = new FactoryAgentRequest { SessionId = _session.SessionId, FactoryRunId = factoryRunId, ExecutionToken = executionToken, Prompt = prompt, Opts = opts };
- return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.factory.agent", [request], cancellationToken);
- }
-
- /// Journal APIs.
- public FactoryJournalApi Journal =>
- field ??
- Interlocked.CompareExchange(ref field, new(_session), null) ??
- field;
-}
-
-/// Provides session-scoped FactoryJournal APIs.
-[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed class FactoryJournalApi
-{
- private readonly CopilotSession _session;
-
- internal FactoryJournalApi(CopilotSession session)
- {
- _session = session;
- }
-
- /// Reads a memoized factory journal entry.
- /// Factory run identifier.
- /// Opaque token identifying the current factory execution attempt.
- /// Namespaced journal key.
- /// The to monitor for cancellation requests. The default is .
- /// Result of reading a factory journal entry.
- public async Task GetAsync(string runId, string executionToken, string key, CancellationToken cancellationToken = default)
- {
- ArgumentNullException.ThrowIfNull(runId);
- ArgumentNullException.ThrowIfNull(executionToken);
- ArgumentNullException.ThrowIfNull(key);
- _session.ThrowIfDisposed();
-
- var request = new FactoryJournalGetRequest { SessionId = _session.SessionId, RunId = runId, ExecutionToken = executionToken, Key = key };
- return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.factory.journal.get", [request], cancellationToken);
- }
-
- /// Stores a memoized factory journal entry.
- /// Factory run identifier.
- /// Opaque token identifying the current factory execution attempt.
- /// Namespaced journal key.
- /// JSON result to memoize.
- /// The to monitor for cancellation requests. The default is .
- /// Acknowledgement that a factory request was accepted.
- public async Task PutAsync(string runId, string executionToken, string key, object resultJson, CancellationToken cancellationToken = default)
- {
- ArgumentNullException.ThrowIfNull(runId);
- ArgumentNullException.ThrowIfNull(executionToken);
- ArgumentNullException.ThrowIfNull(key);
- ArgumentNullException.ThrowIfNull(resultJson);
- _session.ThrowIfDisposed();
-
- var request = new FactoryJournalPutRequest { SessionId = _session.SessionId, RunId = runId, ExecutionToken = executionToken, Key = key, ResultJson = CopilotClient.ToJsonElementForWire(resultJson)!.Value };
- return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.factory.journal.put", [request], cancellationToken);
- }
-}
-
/// Provides session-scoped Workflow APIs.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
public sealed class WorkflowApi
@@ -39934,13 +38956,15 @@ public async Task SwitchAutoTierAsync(AutoTier? autoT
/// Auto routing preference selected by repository settings, when configured. Applied only when the overlay selects the Auto model; beside a concrete model it stays dormant.
/// Model explicitly selected by the CLI, when provided.
/// Whether the overlay is being applied while resuming a deferred session.
+ /// Reasoning effort paired with the effective organization-managed model. Applies only when that concrete managed model is selected; it is ignored for Auto and for CLI, resume, or user overrides.
+ /// Context tier paired with the effective organization-managed model. Applies only when that concrete managed model is selected; it is ignored for Auto and for CLI, resume, or user overrides.
/// The to monitor for cancellation requests. The default is .
/// The model identifier active on the session after the switch.
- internal async Task ApplyStartupOverlayAsync(string? deviceManagedModel = null, string? serverManagedModel = null, string? policyHelperModel = null, AutoTier? autoTier = null, string? repoModel = null, string? repoReasoningEffort = null, string? repoContextTier = null, string? repoAutoTier = null, string? cliModel = null, bool? deferredResume = null, CancellationToken cancellationToken = default)
+ internal async Task ApplyStartupOverlayAsync(string? deviceManagedModel = null, string? serverManagedModel = null, string? policyHelperModel = null, AutoTier? autoTier = null, string? repoModel = null, string? repoReasoningEffort = null, string? repoContextTier = null, string? repoAutoTier = null, string? cliModel = null, bool? deferredResume = null, string? managedReasoningEffort = null, string? managedContextTier = null, CancellationToken cancellationToken = default)
{
_session.ThrowIfDisposed();
- var request = new ModelApplyStartupOverlayRequest { SessionId = _session.SessionId, DeviceManagedModel = deviceManagedModel, ServerManagedModel = serverManagedModel, PolicyHelperModel = policyHelperModel, AutoTier = autoTier, RepoModel = repoModel, RepoReasoningEffort = repoReasoningEffort, RepoContextTier = repoContextTier, RepoAutoTier = repoAutoTier, CliModel = cliModel, DeferredResume = deferredResume };
+ var request = new ModelApplyStartupOverlayRequest { SessionId = _session.SessionId, DeviceManagedModel = deviceManagedModel, ServerManagedModel = serverManagedModel, PolicyHelperModel = policyHelperModel, AutoTier = autoTier, RepoModel = repoModel, RepoReasoningEffort = repoReasoningEffort, RepoContextTier = repoContextTier, RepoAutoTier = repoAutoTier, CliModel = cliModel, DeferredResume = deferredResume, ManagedReasoningEffort = managedReasoningEffort, ManagedContextTier = managedContextTier };
return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.model.applyStartupOverlay", [request], cancellationToken);
}
@@ -43838,22 +42862,6 @@ public interface IProviderTokenHandler
Task GetTokenAsync(ProviderTokenAcquireRequest request, CancellationToken cancellationToken = default);
}
-/// Handles `factory` client session API methods.
-[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public interface IFactoryHandler
-{
- /// Asks the owning extension connection to execute a registered factory closure.
- /// Parameters sent to the owning extension to execute a factory closure.
- /// The to monitor for cancellation requests. The default is .
- /// Result returned by an extension factory closure.
- Task ExecuteAsync(FactoryExecuteRequest request, CancellationToken cancellationToken = default);
- /// Asks the owning extension connection to abort a running factory cooperatively.
- /// Parameters for cooperatively aborting a factory body.
- /// The to monitor for cancellation requests. The default is .
- /// Acknowledgement that a factory request was accepted.
- Task AbortAsync(FactoryAbortRequest request, CancellationToken cancellationToken = default);
-}
-
/// Handles `workflow` client session API methods.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
public interface IWorkflowHandler
@@ -43978,9 +42986,6 @@ public sealed class ClientSessionApiHandlers
/// Optional handler for ProviderToken client session API methods.
public IProviderTokenHandler? ProviderToken { get; set; }
- /// Optional handler for Factory client session API methods.
- public IFactoryHandler? Factory { get; set; }
-
/// Optional handler for Workflow client session API methods.
public IWorkflowHandler? Workflow { get; set; }
@@ -44010,18 +43015,6 @@ public static void RegisterClientSessionApiHandlers(JsonRpc rpc, Func>)(async (request, cancellationToken) =>
- {
- var handler = getHandlers(request.SessionId).Factory;
- if (handler is null) throw new InvalidOperationException($"No factory handler registered for session: {request.SessionId}");
- return await handler.ExecuteAsync(request, cancellationToken);
- }), singleObjectParam: true);
- rpc.SetLocalRpcMethod("factory.abort", (Func>)(async (request, cancellationToken) =>
- {
- var handler = getHandlers(request.SessionId).Factory;
- if (handler is null) throw new InvalidOperationException($"No factory handler registered for session: {request.SessionId}");
- return await handler.AbortAsync(request, cancellationToken);
- }), singleObjectParam: true);
rpc.SetLocalRpcMethod("workflow.execute", (Func>)(async (request, cancellationToken) =>
{
var handler = getHandlers(request.SessionId).Workflow;
@@ -44393,15 +43386,6 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH
[JsonSerializable(typeof(GitHub.Copilot.ExternalToolCompletedEvent), TypeInfoPropertyName = "SessionEventsExternalToolCompletedEvent")]
[JsonSerializable(typeof(GitHub.Copilot.ExternalToolRequestedData), TypeInfoPropertyName = "SessionEventsExternalToolRequestedData")]
[JsonSerializable(typeof(GitHub.Copilot.ExternalToolRequestedEvent), TypeInfoPropertyName = "SessionEventsExternalToolRequestedEvent")]
-[JsonSerializable(typeof(GitHub.Copilot.FactoryPermissionOperation), TypeInfoPropertyName = "SessionEventsFactoryPermissionOperation")]
-[JsonSerializable(typeof(GitHub.Copilot.FactoryPermissionPhase), TypeInfoPropertyName = "SessionEventsFactoryPermissionPhase")]
-[JsonSerializable(typeof(GitHub.Copilot.FactoryRunSettledData), TypeInfoPropertyName = "SessionEventsFactoryRunSettledData")]
-[JsonSerializable(typeof(GitHub.Copilot.FactoryRunSettledEvent), TypeInfoPropertyName = "SessionEventsFactoryRunSettledEvent")]
-[JsonSerializable(typeof(GitHub.Copilot.FactoryRunSettledStatus), TypeInfoPropertyName = "SessionEventsFactoryRunSettledStatus")]
-[JsonSerializable(typeof(GitHub.Copilot.FactoryRunStartedData), TypeInfoPropertyName = "SessionEventsFactoryRunStartedData")]
-[JsonSerializable(typeof(GitHub.Copilot.FactoryRunStartedEvent), TypeInfoPropertyName = "SessionEventsFactoryRunStartedEvent")]
-[JsonSerializable(typeof(GitHub.Copilot.FactoryRunUpdatedData), TypeInfoPropertyName = "SessionEventsFactoryRunUpdatedData")]
-[JsonSerializable(typeof(GitHub.Copilot.FactoryRunUpdatedEvent), TypeInfoPropertyName = "SessionEventsFactoryRunUpdatedEvent")]
[JsonSerializable(typeof(GitHub.Copilot.FusionAttribution), TypeInfoPropertyName = "SessionEventsFusionAttribution")]
[JsonSerializable(typeof(GitHub.Copilot.FusionConversationScope), TypeInfoPropertyName = "SessionEventsFusionConversationScope")]
[JsonSerializable(typeof(GitHub.Copilot.FusionFollowUpAction), TypeInfoPropertyName = "SessionEventsFusionFollowUpAction")]
@@ -44507,7 +43491,6 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH
[JsonSerializable(typeof(GitHub.Copilot.PermissionPromptRequestExtensionEnvAccess), TypeInfoPropertyName = "SessionEventsPermissionPromptRequestExtensionEnvAccess")]
[JsonSerializable(typeof(GitHub.Copilot.PermissionPromptRequestExtensionManagement), TypeInfoPropertyName = "SessionEventsPermissionPromptRequestExtensionManagement")]
[JsonSerializable(typeof(GitHub.Copilot.PermissionPromptRequestExtensionPermissionAccess), TypeInfoPropertyName = "SessionEventsPermissionPromptRequestExtensionPermissionAccess")]
-[JsonSerializable(typeof(GitHub.Copilot.PermissionPromptRequestFactory), TypeInfoPropertyName = "SessionEventsPermissionPromptRequestFactory")]
[JsonSerializable(typeof(GitHub.Copilot.PermissionPromptRequestHook), TypeInfoPropertyName = "SessionEventsPermissionPromptRequestHook")]
[JsonSerializable(typeof(GitHub.Copilot.PermissionPromptRequestMcp), TypeInfoPropertyName = "SessionEventsPermissionPromptRequestMcp")]
[JsonSerializable(typeof(GitHub.Copilot.PermissionPromptRequestMemory), TypeInfoPropertyName = "SessionEventsPermissionPromptRequestMemory")]
@@ -44515,6 +43498,7 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH
[JsonSerializable(typeof(GitHub.Copilot.PermissionPromptRequestPathAccessKind), TypeInfoPropertyName = "SessionEventsPermissionPromptRequestPathAccessKind")]
[JsonSerializable(typeof(GitHub.Copilot.PermissionPromptRequestRead), TypeInfoPropertyName = "SessionEventsPermissionPromptRequestRead")]
[JsonSerializable(typeof(GitHub.Copilot.PermissionPromptRequestUrl), TypeInfoPropertyName = "SessionEventsPermissionPromptRequestUrl")]
+[JsonSerializable(typeof(GitHub.Copilot.PermissionPromptRequestWorkflow), TypeInfoPropertyName = "SessionEventsPermissionPromptRequestWorkflow")]
[JsonSerializable(typeof(GitHub.Copilot.PermissionPromptRequestWrite), TypeInfoPropertyName = "SessionEventsPermissionPromptRequestWrite")]
[JsonSerializable(typeof(GitHub.Copilot.PermissionRecommendation), TypeInfoPropertyName = "SessionEventsPermissionRecommendation")]
[JsonSerializable(typeof(GitHub.Copilot.PermissionRecoveryAttempt), TypeInfoPropertyName = "SessionEventsPermissionRecoveryAttempt")]
@@ -44530,7 +43514,6 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH
[JsonSerializable(typeof(GitHub.Copilot.PermissionRequestExtensionEnvAccess), TypeInfoPropertyName = "SessionEventsPermissionRequestExtensionEnvAccess")]
[JsonSerializable(typeof(GitHub.Copilot.PermissionRequestExtensionManagement), TypeInfoPropertyName = "SessionEventsPermissionRequestExtensionManagement")]
[JsonSerializable(typeof(GitHub.Copilot.PermissionRequestExtensionPermissionAccess), TypeInfoPropertyName = "SessionEventsPermissionRequestExtensionPermissionAccess")]
-[JsonSerializable(typeof(GitHub.Copilot.PermissionRequestFactory), TypeInfoPropertyName = "SessionEventsPermissionRequestFactory")]
[JsonSerializable(typeof(GitHub.Copilot.PermissionRequestHook), TypeInfoPropertyName = "SessionEventsPermissionRequestHook")]
[JsonSerializable(typeof(GitHub.Copilot.PermissionRequestMcp), TypeInfoPropertyName = "SessionEventsPermissionRequestMcp")]
[JsonSerializable(typeof(GitHub.Copilot.PermissionRequestMemory), TypeInfoPropertyName = "SessionEventsPermissionRequestMemory")]
@@ -44543,6 +43526,7 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH
[JsonSerializable(typeof(GitHub.Copilot.PermissionRequestShellCommandSegment), TypeInfoPropertyName = "SessionEventsPermissionRequestShellCommandSegment")]
[JsonSerializable(typeof(GitHub.Copilot.PermissionRequestShellPossibleUrl), TypeInfoPropertyName = "SessionEventsPermissionRequestShellPossibleUrl")]
[JsonSerializable(typeof(GitHub.Copilot.PermissionRequestUrl), TypeInfoPropertyName = "SessionEventsPermissionRequestUrl")]
+[JsonSerializable(typeof(GitHub.Copilot.PermissionRequestWorkflow), TypeInfoPropertyName = "SessionEventsPermissionRequestWorkflow")]
[JsonSerializable(typeof(GitHub.Copilot.PermissionRequestWrite), TypeInfoPropertyName = "SessionEventsPermissionRequestWrite")]
[JsonSerializable(typeof(GitHub.Copilot.PermissionRequestedData), TypeInfoPropertyName = "SessionEventsPermissionRequestedData")]
[JsonSerializable(typeof(GitHub.Copilot.PermissionRequestedEvent), TypeInfoPropertyName = "SessionEventsPermissionRequestedEvent")]
@@ -44631,14 +43615,14 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH
[JsonSerializable(typeof(GitHub.Copilot.SystemNotificationAgentIdle), TypeInfoPropertyName = "SessionEventsSystemNotificationAgentIdle")]
[JsonSerializable(typeof(GitHub.Copilot.SystemNotificationData), TypeInfoPropertyName = "SessionEventsSystemNotificationData")]
[JsonSerializable(typeof(GitHub.Copilot.SystemNotificationEvent), TypeInfoPropertyName = "SessionEventsSystemNotificationEvent")]
-[JsonSerializable(typeof(GitHub.Copilot.SystemNotificationFactoryCompleted), TypeInfoPropertyName = "SessionEventsSystemNotificationFactoryCompleted")]
-[JsonSerializable(typeof(GitHub.Copilot.SystemNotificationFactoryCompletedStatus), TypeInfoPropertyName = "SessionEventsSystemNotificationFactoryCompletedStatus")]
-[JsonSerializable(typeof(GitHub.Copilot.SystemNotificationFactoryPauseInfo), TypeInfoPropertyName = "SessionEventsSystemNotificationFactoryPauseInfo")]
[JsonSerializable(typeof(GitHub.Copilot.SystemNotificationInstructionDiscovered), TypeInfoPropertyName = "SessionEventsSystemNotificationInstructionDiscovered")]
[JsonSerializable(typeof(GitHub.Copilot.SystemNotificationNewInboxMessage), TypeInfoPropertyName = "SessionEventsSystemNotificationNewInboxMessage")]
[JsonSerializable(typeof(GitHub.Copilot.SystemNotificationShellCompleted), TypeInfoPropertyName = "SessionEventsSystemNotificationShellCompleted")]
[JsonSerializable(typeof(GitHub.Copilot.SystemNotificationShellDetachedCompleted), TypeInfoPropertyName = "SessionEventsSystemNotificationShellDetachedCompleted")]
[JsonSerializable(typeof(GitHub.Copilot.SystemNotificationUnclassified), TypeInfoPropertyName = "SessionEventsSystemNotificationUnclassified")]
+[JsonSerializable(typeof(GitHub.Copilot.SystemNotificationWorkflowCompleted), TypeInfoPropertyName = "SessionEventsSystemNotificationWorkflowCompleted")]
+[JsonSerializable(typeof(GitHub.Copilot.SystemNotificationWorkflowCompletedStatus), TypeInfoPropertyName = "SessionEventsSystemNotificationWorkflowCompletedStatus")]
+[JsonSerializable(typeof(GitHub.Copilot.SystemNotificationWorkflowPauseInfo), TypeInfoPropertyName = "SessionEventsSystemNotificationWorkflowPauseInfo")]
[JsonSerializable(typeof(GitHub.Copilot.TaskBlocker), TypeInfoPropertyName = "SessionEventsTaskBlocker")]
[JsonSerializable(typeof(GitHub.Copilot.TaskBlockerKind), TypeInfoPropertyName = "SessionEventsTaskBlockerKind")]
[JsonSerializable(typeof(GitHub.Copilot.TaskCompletionOutcome), TypeInfoPropertyName = "SessionEventsTaskCompletionOutcome")]
@@ -44700,12 +43684,21 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH
[JsonSerializable(typeof(GitHub.Copilot.UserToolSessionApprovalExtensionEnvAccess), TypeInfoPropertyName = "SessionEventsUserToolSessionApprovalExtensionEnvAccess")]
[JsonSerializable(typeof(GitHub.Copilot.UserToolSessionApprovalExtensionManagement), TypeInfoPropertyName = "SessionEventsUserToolSessionApprovalExtensionManagement")]
[JsonSerializable(typeof(GitHub.Copilot.UserToolSessionApprovalExtensionPermissionAccess), TypeInfoPropertyName = "SessionEventsUserToolSessionApprovalExtensionPermissionAccess")]
-[JsonSerializable(typeof(GitHub.Copilot.UserToolSessionApprovalFactory), TypeInfoPropertyName = "SessionEventsUserToolSessionApprovalFactory")]
[JsonSerializable(typeof(GitHub.Copilot.UserToolSessionApprovalMcp), TypeInfoPropertyName = "SessionEventsUserToolSessionApprovalMcp")]
[JsonSerializable(typeof(GitHub.Copilot.UserToolSessionApprovalMemory), TypeInfoPropertyName = "SessionEventsUserToolSessionApprovalMemory")]
[JsonSerializable(typeof(GitHub.Copilot.UserToolSessionApprovalRead), TypeInfoPropertyName = "SessionEventsUserToolSessionApprovalRead")]
+[JsonSerializable(typeof(GitHub.Copilot.UserToolSessionApprovalWorkflow), TypeInfoPropertyName = "SessionEventsUserToolSessionApprovalWorkflow")]
[JsonSerializable(typeof(GitHub.Copilot.UserToolSessionApprovalWrite), TypeInfoPropertyName = "SessionEventsUserToolSessionApprovalWrite")]
[JsonSerializable(typeof(GitHub.Copilot.Verbosity), TypeInfoPropertyName = "SessionEventsVerbosity")]
+[JsonSerializable(typeof(GitHub.Copilot.WorkflowPermissionOperation), TypeInfoPropertyName = "SessionEventsWorkflowPermissionOperation")]
+[JsonSerializable(typeof(GitHub.Copilot.WorkflowPermissionPhase), TypeInfoPropertyName = "SessionEventsWorkflowPermissionPhase")]
+[JsonSerializable(typeof(GitHub.Copilot.WorkflowRunSettledData), TypeInfoPropertyName = "SessionEventsWorkflowRunSettledData")]
+[JsonSerializable(typeof(GitHub.Copilot.WorkflowRunSettledEvent), TypeInfoPropertyName = "SessionEventsWorkflowRunSettledEvent")]
+[JsonSerializable(typeof(GitHub.Copilot.WorkflowRunSettledStatus), TypeInfoPropertyName = "SessionEventsWorkflowRunSettledStatus")]
+[JsonSerializable(typeof(GitHub.Copilot.WorkflowRunStartedData), TypeInfoPropertyName = "SessionEventsWorkflowRunStartedData")]
+[JsonSerializable(typeof(GitHub.Copilot.WorkflowRunStartedEvent), TypeInfoPropertyName = "SessionEventsWorkflowRunStartedEvent")]
+[JsonSerializable(typeof(GitHub.Copilot.WorkflowRunUpdatedData), TypeInfoPropertyName = "SessionEventsWorkflowRunUpdatedData")]
+[JsonSerializable(typeof(GitHub.Copilot.WorkflowRunUpdatedEvent), TypeInfoPropertyName = "SessionEventsWorkflowRunUpdatedEvent")]
[JsonSerializable(typeof(GitHub.Copilot.WorkingDirectoryContext), TypeInfoPropertyName = "SessionEventsWorkingDirectoryContext")]
[JsonSerializable(typeof(GitHub.Copilot.WorkingDirectoryContextHostType), TypeInfoPropertyName = "SessionEventsWorkingDirectoryContextHostType")]
[JsonSerializable(typeof(GitHub.Copilot.WorkspaceFileChangedOperation), TypeInfoPropertyName = "SessionEventsWorkspaceFileChangedOperation")]
@@ -44720,6 +43713,10 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH
[JsonSerializable(typeof(AccountLogoutRequest))]
[JsonSerializable(typeof(AccountLogoutResult))]
[JsonSerializable(typeof(AccountQuotaSnapshot))]
+[JsonSerializable(typeof(AccountStatus))]
+[JsonSerializable(typeof(AccountsEnumerateRequest))]
+[JsonSerializable(typeof(AccountsGetRequest))]
+[JsonSerializable(typeof(AccountsSetRequest))]
[JsonSerializable(typeof(AgentDiscoveryPath))]
[JsonSerializable(typeof(AgentDiscoveryPathList))]
[JsonSerializable(typeof(AgentGetCurrentResult))]
@@ -44735,9 +43732,22 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH
[JsonSerializable(typeof(AgentSetPromptRequest))]
[JsonSerializable(typeof(AgentsDiscoverRequest))]
[JsonSerializable(typeof(AgentsGetDiscoveryPathsRequest))]
+[JsonSerializable(typeof(AuthEnumerateQuery))]
+[JsonSerializable(typeof(AuthEnumerateValue))]
[JsonSerializable(typeof(AuthIdentity))]
[JsonSerializable(typeof(AuthInfo))]
+[JsonSerializable(typeof(AuthLoginAdvanceRequest))]
+[JsonSerializable(typeof(AuthLoginBeginRequest))]
+[JsonSerializable(typeof(AuthLoginBegun))]
+[JsonSerializable(typeof(AuthLoginCancelRequest))]
+[JsonSerializable(typeof(AuthLoginResultDto))]
+[JsonSerializable(typeof(AuthLoginStep))]
+[JsonSerializable(typeof(AuthReadQuery))]
+[JsonSerializable(typeof(AuthReadValue))]
+[JsonSerializable(typeof(AuthStatusDto))]
[JsonSerializable(typeof(AuthValidationError))]
+[JsonSerializable(typeof(AuthWrite))]
+[JsonSerializable(typeof(AuthWriteResult))]
[JsonSerializable(typeof(AutopilotObjectiveCreditLimit))]
[JsonSerializable(typeof(AutopilotObjectiveGetStateResult))]
[JsonSerializable(typeof(AutopilotObjectiveState))]
@@ -44867,45 +43877,6 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH
[JsonSerializable(typeof(ExternalToolTextResultForLlmBinaryResultsForLlm))]
[JsonSerializable(typeof(ExternalToolTextResultForLlmContent))]
[JsonSerializable(typeof(ExternalToolTextResultForLlmContentResourceLinkIcon))]
-[JsonSerializable(typeof(FactoryAbortRequest))]
-[JsonSerializable(typeof(FactoryAckResult))]
-[JsonSerializable(typeof(FactoryAgentOptions))]
-[JsonSerializable(typeof(FactoryAgentRequest))]
-[JsonSerializable(typeof(FactoryAgentResult))]
-[JsonSerializable(typeof(FactoryAgentSummary))]
-[JsonSerializable(typeof(FactoryCancelRequest))]
-[JsonSerializable(typeof(FactoryCurrentPhase))]
-[JsonSerializable(typeof(FactoryDeclaredLimits))]
-[JsonSerializable(typeof(FactoryExecuteRequest))]
-[JsonSerializable(typeof(FactoryExecuteResult))]
-[JsonSerializable(typeof(FactoryGetRunProgressRequest))]
-[JsonSerializable(typeof(FactoryGetRunRequest))]
-[JsonSerializable(typeof(FactoryJournalGetRequest))]
-[JsonSerializable(typeof(FactoryJournalGetResult))]
-[JsonSerializable(typeof(FactoryJournalPutRequest))]
-[JsonSerializable(typeof(FactoryListRunsRequest))]
-[JsonSerializable(typeof(FactoryListRunsResult))]
-[JsonSerializable(typeof(FactoryLogLine))]
-[JsonSerializable(typeof(FactoryLogRequest))]
-[JsonSerializable(typeof(FactoryPauseCheckpointRequest))]
-[JsonSerializable(typeof(FactoryPauseInfo))]
-[JsonSerializable(typeof(FactoryPauseRequest))]
-[JsonSerializable(typeof(FactoryPhaseObservation))]
-[JsonSerializable(typeof(FactoryProgressLine))]
-[JsonSerializable(typeof(FactoryProgressPage))]
-[JsonSerializable(typeof(FactoryResumeRequest))]
-[JsonSerializable(typeof(FactoryResumeResult))]
-[JsonSerializable(typeof(FactoryRunConsumed))]
-[JsonSerializable(typeof(FactoryRunDetail))]
-[JsonSerializable(typeof(FactoryRunFailure))]
-[JsonSerializable(typeof(FactoryRunLimits))]
-[JsonSerializable(typeof(FactoryRunRequest))]
-[JsonSerializable(typeof(FactoryRunResult))]
-[JsonSerializable(typeof(FactoryRunSummary))]
-[JsonSerializable(typeof(FactoryRunTerminal))]
-[JsonSerializable(typeof(FactoryToolResumeRequest))]
-[JsonSerializable(typeof(FactoryToolRunOptions))]
-[JsonSerializable(typeof(FactoryToolRunRequest))]
[JsonSerializable(typeof(FleetStartRequest))]
[JsonSerializable(typeof(FleetStartResult))]
[JsonSerializable(typeof(FolderTrustAddParams))]
@@ -45233,6 +44204,7 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH
[JsonSerializable(typeof(ProviderAddResult))]
[JsonSerializable(typeof(ProviderConfig))]
[JsonSerializable(typeof(ProviderConfigAzure))]
+[JsonSerializable(typeof(ProviderDescriptor))]
[JsonSerializable(typeof(ProviderEndpoint))]
[JsonSerializable(typeof(ProviderModelConfig))]
[JsonSerializable(typeof(ProviderSessionToken))]
@@ -45295,7 +44267,6 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH
[JsonSerializable(typeof(RemoteSessionMetadataRepository))]
[JsonSerializable(typeof(RemoteSessionMetadataValue))]
[JsonSerializable(typeof(ResponseFormat))]
-[JsonSerializable(typeof(RunOptions))]
[JsonSerializable(typeof(SandboxConfig))]
[JsonSerializable(typeof(SandboxConfigAuth))]
[JsonSerializable(typeof(SandboxConfigUserPolicy))]
@@ -45362,7 +44333,6 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH
[JsonSerializable(typeof(SessionEventLogTailRequest))]
[JsonSerializable(typeof(SessionExtensionsListRequest))]
[JsonSerializable(typeof(SessionExtensionsReloadRequest))]
-[JsonSerializable(typeof(SessionFactoryPauseAtCheckpointResult))]
[JsonSerializable(typeof(SessionFsAppendFileRequest))]
[JsonSerializable(typeof(SessionFsError))]
[JsonSerializable(typeof(SessionFsExistsRequest))]
diff --git a/dotnet/src/Generated/SessionEvents.cs b/dotnet/src/Generated/SessionEvents.cs
index 5c3618c35d..c7646d208d 100644
--- a/dotnet/src/Generated/SessionEvents.cs
+++ b/dotnet/src/Generated/SessionEvents.cs
@@ -57,9 +57,6 @@ namespace GitHub.Copilot;
[JsonDerivedType(typeof(ExitPlanModeRequestedEvent), "exit_plan_mode.requested")]
[JsonDerivedType(typeof(ExternalToolCompletedEvent), "external_tool.completed")]
[JsonDerivedType(typeof(ExternalToolRequestedEvent), "external_tool.requested")]
-[JsonDerivedType(typeof(FactoryRunSettledEvent), "factory.run_settled")]
-[JsonDerivedType(typeof(FactoryRunStartedEvent), "factory.run_started")]
-[JsonDerivedType(typeof(FactoryRunUpdatedEvent), "factory.run_updated")]
[JsonDerivedType(typeof(HookEndEvent), "hook.end")]
[JsonDerivedType(typeof(HookProgressEvent), "hook.progress")]
[JsonDerivedType(typeof(HookStartEvent), "hook.start")]
@@ -173,6 +170,9 @@ namespace GitHub.Copilot;
[JsonDerivedType(typeof(UserInputCompletedEvent), "user_input.completed")]
[JsonDerivedType(typeof(UserInputRequestedEvent), "user_input.requested")]
[JsonDerivedType(typeof(UserMessageEvent), "user.message")]
+[JsonDerivedType(typeof(WorkflowRunSettledEvent), "workflow.run_settled")]
+[JsonDerivedType(typeof(WorkflowRunStartedEvent), "workflow.run_started")]
+[JsonDerivedType(typeof(WorkflowRunUpdatedEvent), "workflow.run_updated")]
public partial class SessionEvent
{
/// Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
@@ -1426,7 +1426,7 @@ public sealed partial class PermissionCompletedEvent : SessionEvent
public required PermissionCompletedData Data { get; set; }
}
-/// Records that a live authorization record from an earlier human decision in this session contained a permission proposal, so it ran without another prompt. This mints no authority: it accounts for one more effect against the prior grant, which is what lets a replayed session agree with the live one about how much of that grant is left.
+/// Historical decode-only receipt from the retired Assisted Permissions authorization extractor. Current runtimes ignore it for permission decisions.
/// Represents the permission.carriedForward event.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
public sealed partial class PermissionCarriedForwardEvent : SessionEvent
@@ -1440,7 +1440,7 @@ public sealed partial class PermissionCarriedForwardEvent : SessionEvent
public required PermissionCarriedForwardData Data { get; set; }
}
-/// Freezes one blinded, verbatim-verified authorization claim the runtime minted from a human user message, so a resumed session re-establishes the same grant deterministically instead of re-running the extraction model. This mints no authority on its own: it records what a blinded proposer pointed at and the trusted discriminator the runtime established, and deterministic establishment runs on replay. Persisted so recorded authority survives compaction and process resume.
+/// Historical decode-only claim from the retired Assisted Permissions authorization extractor. Current runtimes preserve the payload but do not establish authority from it.
/// Represents the permission.messageAuthorization event.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
public sealed partial class PermissionMessageAuthorizationEvent : SessionEvent
@@ -1454,7 +1454,7 @@ public sealed partial class PermissionMessageAuthorizationEvent : SessionEvent
public required PermissionMessageAuthorizationData Data { get; set; }
}
-/// Records that one human turn has been read by the blinded authorization proposer, whether or not it minted anything, so a resumed session does not re-run the extraction model on a turn the live session already read. Also records whether that pass activates ongoing extraction; contextual-assent-only passes do not, so unrelated future messages remain outside extraction.
+/// Historical decode-only extractor progress marker. Current runtimes do not run or resume extraction from it.
/// Represents the permission.messageAuthorizationRead event.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
public sealed partial class PermissionMessageAuthorizationReadEvent : SessionEvent
@@ -1468,7 +1468,7 @@ public sealed partial class PermissionMessageAuthorizationReadEvent : SessionEve
public required PermissionMessageAuthorizationReadData Data { get; set; }
}
-/// Records that message-backed authorization could not safely represent one human turn before compaction. The runtime may compact the original message after this marker is durable, but message-derived carry-forward and assisted auto-approval remain disabled for the rest of the session so subsequent commands continue through the ordinary permission prompt.
+/// Historical decode-only degradation marker from the retired extractor. Current runtimes ignore it for permission decisions.
/// Represents the permission.messageAuthorizationDegraded event.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
public sealed partial class PermissionMessageAuthorizationDegradedEvent : SessionEvent
@@ -1482,7 +1482,7 @@ public sealed partial class PermissionMessageAuthorizationDegradedEvent : Sessio
public required PermissionMessageAuthorizationDegradedData Data { get; set; }
}
-/// Records that deterministic text recognition found likely assent in the human turn immediately following a root Autopilot permission request that was blocked because no interactive response was available. This event grants no authority; its model-facing projection only suggests retrying the unchanged operation.
+/// Historical decode-only contextual-assent marker. Current runtimes do not project it into the conversation or permission flow.
/// Represents the permission.assentDetected event.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
public sealed partial class PermissionAssentDetectedEvent : SessionEvent
@@ -1496,7 +1496,7 @@ public sealed partial class PermissionAssentDetectedEvent : SessionEvent
public required PermissionAssentDetectedData Data { get; set; }
}
-/// Freezes a blinded contextual authorization proposal whose verbatim human span was deterministically bound to the immediately preceding blocked permission request. The event carries no action fields; replay re-derives the exact action from the earlier permission request and mints a one-shot message grant only when the binding and span still verify.
+/// Historical decode-only contextual authorization claim. Current runtimes preserve the payload but do not establish authority from it.
/// Represents the permission.contextualAuthorization event.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
public sealed partial class PermissionContextualAuthorizationEvent : SessionEvent
@@ -1904,46 +1904,46 @@ public sealed partial class SessionBackgroundTasksChangedEvent : SessionEvent
public required SessionBackgroundTasksChangedData Data { get; set; }
}
-/// Ephemeral invalidation signal for a changed factory run.
-/// Represents the factory.run_updated event.
+/// Ephemeral invalidation signal for a changed workflow run.
+/// Represents the workflow.run_updated event.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed partial class FactoryRunUpdatedEvent : SessionEvent
+public sealed partial class WorkflowRunUpdatedEvent : SessionEvent
{
///
[JsonIgnore]
- public override string Type => "factory.run_updated";
+ public override string Type => "workflow.run_updated";
- /// The factory.run_updated event payload.
+ /// The workflow.run_updated event payload.
[JsonPropertyName("data")]
- public required FactoryRunUpdatedData Data { get; set; }
+ public required WorkflowRunUpdatedData Data { get; set; }
}
-/// Ephemeral signal that a factory run attempt began executing.
-/// Represents the factory.run_started event.
+/// Ephemeral signal that a workflow run attempt began executing.
+/// Represents the workflow.run_started event.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed partial class FactoryRunStartedEvent : SessionEvent
+public sealed partial class WorkflowRunStartedEvent : SessionEvent
{
///
[JsonIgnore]
- public override string Type => "factory.run_started";
+ public override string Type => "workflow.run_started";
- /// The factory.run_started event payload.
+ /// The workflow.run_started event payload.
[JsonPropertyName("data")]
- public required FactoryRunStartedData Data { get; set; }
+ public required WorkflowRunStartedData Data { get; set; }
}
-/// Ephemeral signal that a factory run reached a terminal status.
-/// Represents the factory.run_settled event.
+/// Ephemeral signal that a workflow run reached a terminal status.
+/// Represents the workflow.run_settled event.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed partial class FactoryRunSettledEvent : SessionEvent
+public sealed partial class WorkflowRunSettledEvent : SessionEvent
{
///
[JsonIgnore]
- public override string Type => "factory.run_settled";
+ public override string Type => "workflow.run_settled";
- /// The factory.run_settled event payload.
+ /// The workflow.run_settled event payload.
[JsonPropertyName("data")]
- public required FactoryRunSettledData Data { get; set; }
+ public required WorkflowRunSettledData Data { get; set; }
}
/// Payload of `session.skills_loaded` listing resolved skill metadata.
@@ -3105,12 +3105,18 @@ public sealed partial class SessionCompactionStartData
/// Conversation compaction results including success status, metrics, and optional error details.
public sealed partial class SessionCompactionCompleteData
{
- /// Authoritative active-factory reminder appended to the compacted context.
+ /// Legacy active-workflow reminder retained for replay compatibility.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonInclude]
[JsonPropertyName("activeFactorySummary")]
internal string? ActiveFactorySummary { get; set; }
+ /// Authoritative active-workflow reminder appended to the compacted context.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonInclude]
+ [JsonPropertyName("activeWorkflowSummary")]
+ internal string? ActiveWorkflowSummary { get; set; }
+
/// Canonical model identifier used for model-specific behavior when replaying compaction.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("behaviorModelId")]
@@ -5228,7 +5234,7 @@ public sealed partial class SubagentStartedData
[JsonPropertyName("executionMode")]
public string? ExecutionMode { get; set; }
- /// Root id of the factory run that spawned this sub-agent, when it was spawned by one.
+ /// Legacy root id of the workflow run that spawned this sub-agent. New consumers should use workflowRunId.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("factoryRunId")]
public string? FactoryRunId { get; set; }
@@ -5253,7 +5259,7 @@ public sealed partial class SubagentStartedData
[JsonPropertyName("resumable")]
public bool? Resumable { get; set; }
- /// Where the model input for this sub-agent came from. Present when the task planner resolved the launch (the task tool and factory agents); absent for sub-agents created through other runtime paths.
+ /// Where the model input for this sub-agent came from. Present when the task planner resolved the launch (the task tool and workflow agents); absent for sub-agents created through other runtime paths.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("taskModelSource")]
public SubagentTaskModelSource? TaskModelSource { get; set; }
@@ -5261,6 +5267,11 @@ public sealed partial class SubagentStartedData
/// Tool call ID of the parent tool invocation that spawned this sub-agent.
[JsonPropertyName("toolCallId")]
public required string ToolCallId { get; set; }
+
+ /// Root id of the workflow run that spawned this sub-agent, when it was spawned by one.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("workflowRunId")]
+ public string? WorkflowRunId { get; set; }
}
/// Resolved runtime configuration for a configured sub-agent.
@@ -5684,7 +5695,7 @@ public sealed partial class PermissionCompletedData
public string? ToolCallId { get; set; }
}
-/// Records that a live authorization record from an earlier human decision in this session contained a permission proposal, so it ran without another prompt. This mints no authority: it accounts for one more effect against the prior grant, which is what lets a replayed session agree with the live one about how much of that grant is left.
+/// Historical decode-only receipt from the retired Assisted Permissions authorization extractor. Current runtimes ignore it for permission decisions.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
public sealed partial class PermissionCarriedForwardData
{
@@ -5709,7 +5720,7 @@ public sealed partial class PermissionCarriedForwardData
public required string ToolCallId { get; set; }
}
-/// Freezes one blinded, verbatim-verified authorization claim the runtime minted from a human user message, so a resumed session re-establishes the same grant deterministically instead of re-running the extraction model. This mints no authority on its own: it records what a blinded proposer pointed at and the trusted discriminator the runtime established, and deterministic establishment runs on replay. Persisted so recorded authority survives compaction and process resume.
+/// Historical decode-only claim from the retired Assisted Permissions authorization extractor. Current runtimes preserve the payload but do not establish authority from it.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
public sealed partial class PermissionMessageAuthorizationData
{
@@ -5762,7 +5773,7 @@ public sealed partial class PermissionMessageAuthorizationData
public JsonElement? World { get; set; }
}
-/// Records that one human turn has been read by the blinded authorization proposer, whether or not it minted anything, so a resumed session does not re-run the extraction model on a turn the live session already read. Also records whether that pass activates ongoing extraction; contextual-assent-only passes do not, so unrelated future messages remain outside extraction.
+/// Historical decode-only extractor progress marker. Current runtimes do not run or resume extraction from it.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
public sealed partial class PermissionMessageAuthorizationReadData
{
@@ -5778,7 +5789,7 @@ public sealed partial class PermissionMessageAuthorizationReadData
public required long TurnIndex { get; set; }
}
-/// Records that message-backed authorization could not safely represent one human turn before compaction. The runtime may compact the original message after this marker is durable, but message-derived carry-forward and assisted auto-approval remain disabled for the rest of the session so subsequent commands continue through the ordinary permission prompt.
+/// Historical decode-only degradation marker from the retired extractor. Current runtimes ignore it for permission decisions.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
public sealed partial class PermissionMessageAuthorizationDegradedData
{
@@ -5788,7 +5799,7 @@ public sealed partial class PermissionMessageAuthorizationDegradedData
public required long TurnIndex { get; set; }
}
-/// Records that deterministic text recognition found likely assent in the human turn immediately following a root Autopilot permission request that was blocked because no interactive response was available. This event grants no authority; its model-facing projection only suggests retrying the unchanged operation.
+/// Historical decode-only contextual-assent marker. Current runtimes do not project it into the conversation or permission flow.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
public sealed partial class PermissionAssentDetectedData
{
@@ -5803,7 +5814,7 @@ public sealed partial class PermissionAssentDetectedData
public required long TurnIndex { get; set; }
}
-/// Freezes a blinded contextual authorization proposal whose verbatim human span was deterministically bound to the immediately preceding blocked permission request. The event carries no action fields; replay re-derives the exact action from the earlier permission request and mints a one-shot message grant only when the binding and span still verify.
+/// Historical decode-only contextual authorization claim. Current runtimes preserve the payload but do not establish authority from it.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
public sealed partial class PermissionContextualAuthorizationData
{
@@ -6501,39 +6512,39 @@ public sealed partial class SessionBackgroundTasksChangedData
{
}
-/// Ephemeral invalidation signal for a changed factory run.
+/// Ephemeral invalidation signal for a changed workflow run.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed partial class FactoryRunUpdatedData
+public sealed partial class WorkflowRunUpdatedData
{
/// Monotonic revision now available for the run.
[JsonPropertyName("revision")]
public required long Revision { get; set; }
- /// Factory run identifier.
+ /// Workflow run identifier.
[JsonPropertyName("runId")]
public required string RunId { get; set; }
}
-/// Ephemeral signal that a factory run attempt began executing.
+/// Ephemeral signal that a workflow run attempt began executing.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed partial class FactoryRunStartedData
+public sealed partial class WorkflowRunStartedData
{
/// Attempt number this start committed; a resumed run increments it.
[JsonPropertyName("attempt")]
public required long Attempt { get; set; }
- /// Name of the factory this run executes. Low cardinality by construction.
- [JsonPropertyName("factoryName")]
- public required string FactoryName { get; set; }
-
- /// Identifier of the factory run that started.
+ /// Identifier of the workflow run that started.
[JsonPropertyName("runId")]
public required string RunId { get; set; }
+
+ /// Name of the workflow this run executes. Low cardinality by construction.
+ [JsonPropertyName("workflowName")]
+ public required string WorkflowName { get; set; }
}
-/// Ephemeral signal that a factory run reached a terminal status.
+/// Ephemeral signal that a workflow run reached a terminal status.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
-public sealed partial class FactoryRunSettledData
+public sealed partial class WorkflowRunSettledData
{
/// AI credits this run consumed, in nano-AIU.
[JsonPropertyName("consumedNanoAiu")]
@@ -6547,18 +6558,18 @@ public sealed partial class FactoryRunSettledData
[JsonPropertyName("elapsedMs")]
public required long ElapsedMs { get; set; }
- /// Typed failure class recorded on the run, when it failed with one (e.g. `factory_limit_reached`).
+ /// Typed failure class recorded on the run, when it failed with one (e.g. `workflow_limit_reached`).
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("failureType")]
public string? FailureType { get; set; }
- /// Identifier of the factory run that settled.
+ /// Identifier of the workflow run that settled.
[JsonPropertyName("runId")]
public required string RunId { get; set; }
/// Terminal status the run committed.
[JsonPropertyName("status")]
- public required FactoryRunSettledStatus Status { get; set; }
+ public required WorkflowRunSettledStatus Status { get; set; }
}
/// Payload of `session.skills_loaded` listing resolved skill metadata.
@@ -10063,16 +10074,16 @@ public sealed partial class SystemNotificationInstructionDiscovered : SystemNoti
public required string TriggerTool { get; set; }
}
-/// The user variant of .
-public sealed partial class SystemNotificationFactoryPauseInfoUser : SystemNotificationFactoryPauseInfo
+/// The user variant of .
+public sealed partial class SystemNotificationWorkflowPauseInfoUser : SystemNotificationWorkflowPauseInfo
{
///
[JsonIgnore]
public override string Type => "user";
}
-/// The checkpoint variant of .
-public sealed partial class SystemNotificationFactoryPauseInfoCheckpoint : SystemNotificationFactoryPauseInfo
+/// The checkpoint variant of .
+public sealed partial class SystemNotificationWorkflowPauseInfoCheckpoint : SystemNotificationWorkflowPauseInfo
{
///
[JsonIgnore]
@@ -10083,14 +10094,14 @@ public sealed partial class SystemNotificationFactoryPauseInfoCheckpoint : Syste
public required string Key { get; set; }
}
-/// Durable metadata describing who initiated a factory pause.
+/// Durable metadata describing who initiated a workflow pause.
/// Polymorphic base type discriminated by type.
[JsonPolymorphic(
TypeDiscriminatorPropertyName = "type",
UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FallBackToBaseType)]
-[JsonDerivedType(typeof(SystemNotificationFactoryPauseInfoUser), "user")]
-[JsonDerivedType(typeof(SystemNotificationFactoryPauseInfoCheckpoint), "checkpoint")]
-public partial class SystemNotificationFactoryPauseInfo
+[JsonDerivedType(typeof(SystemNotificationWorkflowPauseInfoUser), "user")]
+[JsonDerivedType(typeof(SystemNotificationWorkflowPauseInfoCheckpoint), "checkpoint")]
+public partial class SystemNotificationWorkflowPauseInfo
{
/// The type discriminator.
[JsonPropertyName("type")]
@@ -10098,13 +10109,13 @@ public partial class SystemNotificationFactoryPauseInfo
}
-/// System notification metadata for a factory execution attempt that reached a terminal state.
-/// The factory_completed variant of .
-public sealed partial class SystemNotificationFactoryCompleted : SystemNotification
+/// System notification metadata for a workflow execution attempt that reached a terminal state.
+/// The workflow_completed variant of .
+public sealed partial class SystemNotificationWorkflowCompleted : SystemNotification
{
///
[JsonIgnore]
- public override string Type => "factory_completed";
+ public override string Type => "workflow_completed";
/// Execution attempt that reached this terminal state.
[JsonPropertyName("attempt")]
@@ -10122,10 +10133,6 @@ public sealed partial class SystemNotificationFactoryCompleted : SystemNotificat
[JsonPropertyName("elapsedMs")]
public required long ElapsedMs { get; set; }
- /// Persisted factory name.
- [JsonPropertyName("factoryName")]
- public required string FactoryName { get; set; }
-
/// Machine-readable terminal failure details, when present.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("failure")]
@@ -10134,7 +10141,7 @@ public sealed partial class SystemNotificationFactoryCompleted : SystemNotificat
/// Pause initiator metadata when this attempt settled as paused.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("pauseInfo")]
- public SystemNotificationFactoryPauseInfo? PauseInfo { get; set; }
+ public SystemNotificationWorkflowPauseInfo? PauseInfo { get; set; }
/// Bounded prompt-safe preview of the completed result.
[UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Safe for generated string properties: JSON Schema minLength/maxLength map to string length validation, not reflection over trimmed Count members")]
@@ -10143,18 +10150,22 @@ public sealed partial class SystemNotificationFactoryCompleted : SystemNotificat
[JsonPropertyName("resultPreview")]
public string? ResultPreview { get; set; }
- /// Actionable run_factory resume guidance for a resource-limit failure.
+ /// Actionable run_dynamic_workflow resume guidance for a resource-limit failure.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("retryGuidance")]
public string? RetryGuidance { get; set; }
- /// Factory run identifier.
+ /// Workflow run identifier.
[JsonPropertyName("runId")]
public required string RunId { get; set; }
/// Terminal status reached by this execution attempt.
[JsonPropertyName("status")]
- public required SystemNotificationFactoryCompletedStatus Status { get; set; }
+ public required SystemNotificationWorkflowCompletedStatus Status { get; set; }
+
+ /// Persisted workflow name.
+ [JsonPropertyName("workflowName")]
+ public required string WorkflowName { get; set; }
}
/// System notification metadata from an external host that does not match a runtime-owned notification kind.
@@ -10182,7 +10193,7 @@ public sealed partial class SystemNotificationUnclassified : SystemNotification
[JsonDerivedType(typeof(SystemNotificationShellCompleted), "shell_completed")]
[JsonDerivedType(typeof(SystemNotificationShellDetachedCompleted), "shell_detached_completed")]
[JsonDerivedType(typeof(SystemNotificationInstructionDiscovered), "instruction_discovered")]
-[JsonDerivedType(typeof(SystemNotificationFactoryCompleted), "factory_completed")]
+[JsonDerivedType(typeof(SystemNotificationWorkflowCompleted), "workflow_completed")]
[JsonDerivedType(typeof(SystemNotificationUnclassified), "unclassified")]
public partial class SystemNotification
{
@@ -10703,9 +10714,9 @@ public sealed partial class PermissionRequestExtensionManagement : PermissionReq
public string? ToolCallId { get; set; }
}
-/// A declared phase shown in a factory permission prompt.
-/// Nested data type for FactoryPermissionPhase.
-public sealed partial class FactoryPermissionPhase
+/// A declared phase shown in a workflow permission prompt.
+/// Nested data type for WorkflowPermissionPhase.
+public sealed partial class WorkflowPermissionPhase
{
/// Optional phase detail.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
@@ -10717,46 +10728,55 @@ public sealed partial class FactoryPermissionPhase
public required string Title { get; set; }
}
-/// Factory run or authoring permission request.
-/// The factory variant of .
-public sealed partial class PermissionRequestFactory : PermissionRequest
+/// Workflow run or authoring permission request.
+/// The workflow variant of .
+public sealed partial class PermissionRequestWorkflow : PermissionRequest
{
///
[JsonIgnore]
- public override string Kind => "factory";
+ public override string Kind => "workflow";
- /// Canonical key used for scoped factory approvals.
+ /// Canonical key used for scoped workflow approvals.
[JsonPropertyName("approvalKey")]
public required string ApprovalKey { get; set; }
- /// Whether this factory is eligible for persistent approval.
+ /// Whether this workflow is eligible for persistent approval.
[JsonPropertyName("canPersistApproval")]
public required bool CanPersistApproval { get; set; }
- /// Factory-declared AI-credit limit before any run/resume caller override is applied.
+ /// Workflow-declared AI-credit limit before any run/resume caller override is applied.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("declaredMaxAiCredits")]
public double? DeclaredMaxAiCredits { get; set; }
- /// Factory-declared concurrent-subagent limit before any run/resume caller override is applied.
+ /// Workflow-declared concurrent-subagent limit before any run/resume caller override is applied.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("declaredMaxConcurrentSubagents")]
public long? DeclaredMaxConcurrentSubagents { get; set; }
- /// Factory-declared total-subagent limit before any run/resume caller override is applied.
+ /// Workflow-declared total-subagent limit before any run/resume caller override is applied.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("declaredMaxTotalSubagents")]
public long? DeclaredMaxTotalSubagents { get; set; }
- /// Factory-declared active-time limit in seconds before any run/resume caller override is applied.
+ /// Workflow-declared active-time limit in seconds before any run/resume caller override is applied.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("declaredTimeoutSeconds")]
public double? DeclaredTimeoutSeconds { get; set; }
- /// Factory description.
+ /// Workflow description.
[JsonPropertyName("description")]
public required string Description { get; set; }
+ ///
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("managedApprovalRequired")]
+ public override bool? ManagedApprovalRequired
+ {
+ get => base.ManagedApprovalRequired;
+ set => base.ManagedApprovalRequired = value;
+ }
+
/// Effective AI-credit limit; omitted means unlimited.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("maxAiCredits")]
@@ -10772,17 +10792,17 @@ public sealed partial class PermissionRequestFactory : PermissionRequest
[JsonPropertyName("maxTotalSubagents")]
public long? MaxTotalSubagents { get; set; }
- /// Factory name.
+ /// Workflow name.
[JsonPropertyName("name")]
public required string Name { get; set; }
- /// Factory operation, either run or author.
+ /// Workflow operation, either run or author.
[JsonPropertyName("operation")]
- public required FactoryPermissionOperation Operation { get; set; }
+ public required WorkflowPermissionOperation Operation { get; set; }
- /// Declared factory phases.
+ /// Declared workflow phases.
[JsonPropertyName("phases")]
- public required FactoryPermissionPhase[] Phases { get; set; }
+ public required WorkflowPermissionPhase[] Phases { get; set; }
/// Effective active-time limit in seconds; omitted means unlimited.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
@@ -10853,7 +10873,7 @@ public sealed partial class PermissionRequestExtensionEnvAccess : PermissionRequ
[JsonDerivedType(typeof(PermissionRequestCustomTool), "custom-tool")]
[JsonDerivedType(typeof(PermissionRequestHook), "hook")]
[JsonDerivedType(typeof(PermissionRequestExtensionManagement), "extension-management")]
-[JsonDerivedType(typeof(PermissionRequestFactory), "factory")]
+[JsonDerivedType(typeof(PermissionRequestWorkflow), "workflow")]
[JsonDerivedType(typeof(PermissionRequestExtensionPermissionAccess), "extension-permission-access")]
[JsonDerivedType(typeof(PermissionRequestExtensionEnvAccess), "extension-env-access")]
public partial class PermissionRequest
@@ -11290,15 +11310,15 @@ public sealed partial class PermissionPromptRequestExtensionManagement : Permiss
public string? ToolCallId { get; set; }
}
-/// Factory run or authoring permission prompt.
-/// The factory variant of .
-public sealed partial class PermissionPromptRequestFactory : PermissionPromptRequest
+/// Workflow run or authoring permission prompt.
+/// The workflow variant of .
+public sealed partial class PermissionPromptRequestWorkflow : PermissionPromptRequest
{
///
[JsonIgnore]
- public override string Kind => "factory";
+ public override string Kind => "workflow";
- /// Canonical key used for scoped factory approvals.
+ /// Canonical key used for scoped workflow approvals.
[JsonPropertyName("approvalKey")]
public required string ApprovalKey { get; set; }
@@ -11308,31 +11328,31 @@ public sealed partial class PermissionPromptRequestFactory : PermissionPromptReq
[JsonPropertyName("assistedApproval")]
public PermissionAssistedApproval? AssistedApproval { get; set; }
- /// Whether this factory is eligible for persistent approval.
+ /// Whether this workflow is eligible for persistent approval.
[JsonPropertyName("canPersistApproval")]
public required bool CanPersistApproval { get; set; }
- /// Factory-declared AI-credit limit before any run/resume caller override is applied.
+ /// Workflow-declared AI-credit limit before any run/resume caller override is applied.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("declaredMaxAiCredits")]
public double? DeclaredMaxAiCredits { get; set; }
- /// Factory-declared concurrent-subagent limit before any run/resume caller override is applied.
+ /// Workflow-declared concurrent-subagent limit before any run/resume caller override is applied.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("declaredMaxConcurrentSubagents")]
public long? DeclaredMaxConcurrentSubagents { get; set; }
- /// Factory-declared total-subagent limit before any run/resume caller override is applied.
+ /// Workflow-declared total-subagent limit before any run/resume caller override is applied.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("declaredMaxTotalSubagents")]
public long? DeclaredMaxTotalSubagents { get; set; }
- /// Factory-declared active-time limit in seconds before any run/resume caller override is applied.
+ /// Workflow-declared active-time limit in seconds before any run/resume caller override is applied.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("declaredTimeoutSeconds")]
public double? DeclaredTimeoutSeconds { get; set; }
- /// Factory description.
+ /// Workflow description.
[JsonPropertyName("description")]
public required string Description { get; set; }
@@ -11356,17 +11376,17 @@ public sealed partial class PermissionPromptRequestFactory : PermissionPromptReq
[JsonPropertyName("maxTotalSubagents")]
public long? MaxTotalSubagents { get; set; }
- /// Factory name.
+ /// Workflow name.
[JsonPropertyName("name")]
public required string Name { get; set; }
- /// Factory operation, either run or author.
+ /// Workflow operation, either run or author.
[JsonPropertyName("operation")]
- public required FactoryPermissionOperation Operation { get; set; }
+ public required WorkflowPermissionOperation Operation { get; set; }
- /// Declared factory phases.
+ /// Declared workflow phases.
[JsonPropertyName("phases")]
- public required FactoryPermissionPhase[] Phases { get; set; }
+ public required WorkflowPermissionPhase[] Phases { get; set; }
/// Effective active-time limit in seconds; omitted means unlimited.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
@@ -11450,7 +11470,7 @@ public sealed partial class PermissionPromptRequestExtensionEnvAccess : Permissi
[JsonDerivedType(typeof(PermissionPromptRequestPath), "path")]
[JsonDerivedType(typeof(PermissionPromptRequestHook), "hook")]
[JsonDerivedType(typeof(PermissionPromptRequestExtensionManagement), "extension-management")]
-[JsonDerivedType(typeof(PermissionPromptRequestFactory), "factory")]
+[JsonDerivedType(typeof(PermissionPromptRequestWorkflow), "workflow")]
[JsonDerivedType(typeof(PermissionPromptRequestExtensionPermissionAccess), "extension-permission-access")]
[JsonDerivedType(typeof(PermissionPromptRequestExtensionEnvAccess), "extension-env-access")]
public partial class PermissionPromptRequest
@@ -11559,15 +11579,15 @@ public sealed partial class UserToolSessionApprovalExtensionManagement : UserToo
public string? Operation { get; set; }
}
-/// Session-scoped factory approval, optionally narrowed by approval key.
-/// The factory variant of .
-public sealed partial class UserToolSessionApprovalFactory : UserToolSessionApproval
+/// Session-scoped workflow approval, optionally narrowed by approval key.
+/// The workflow variant of .
+public sealed partial class UserToolSessionApprovalWorkflow : UserToolSessionApproval
{
///
[JsonIgnore]
- public override string Kind => "factory";
+ public override string Kind => "workflow";
- /// Optional factory operation name or canonical approval key.
+ /// Optional workflow operation name or canonical approval key.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("approvalKey")]
public string? ApprovalKey { get; set; }
@@ -11615,7 +11635,7 @@ public sealed partial class UserToolSessionApprovalExtensionEnvAccess : UserTool
[JsonDerivedType(typeof(UserToolSessionApprovalMemory), "memory")]
[JsonDerivedType(typeof(UserToolSessionApprovalCustomTool), "custom-tool")]
[JsonDerivedType(typeof(UserToolSessionApprovalExtensionManagement), "extension-management")]
-[JsonDerivedType(typeof(UserToolSessionApprovalFactory), "factory")]
+[JsonDerivedType(typeof(UserToolSessionApprovalWorkflow), "workflow")]
[JsonDerivedType(typeof(UserToolSessionApprovalExtensionPermissionAccess), "extension-permission-access")]
[JsonDerivedType(typeof(UserToolSessionApprovalExtensionEnvAccess), "extension-env-access")]
public partial class UserToolSessionApproval
@@ -13260,6 +13280,9 @@ public ModelChangeSource(string value)
/// An SDK or RPC caller selected the model.
public static ModelChangeSource Sdk { get; } = new("sdk");
+ /// The user accepted a CAPI-issued Auto tier recommendation.
+ public static ModelChangeSource AutoTierRecommendation { get; } = new("auto_tier_recommendation");
+
/// Returns a value indicating whether two instances are equivalent.
public static bool operator ==(ModelChangeSource left, ModelChangeSource right) => left.Equals(right);
@@ -17873,51 +17896,51 @@ public override void Write(Utf8JsonWriter writer, SystemNotificationAgentComplet
}
}
-/// Terminal status reached by a factory execution attempt.
+/// Terminal status reached by a workflow execution attempt.
[JsonConverter(typeof(Converter))]
[DebuggerDisplay("{Value,nq}")]
-public readonly struct SystemNotificationFactoryCompletedStatus : IEquatable
+public readonly struct SystemNotificationWorkflowCompletedStatus : IEquatable
{
private readonly string? _value;
- /// Initializes a new instance of the struct.
- /// The value to associate with this .
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
[JsonConstructor]
- public SystemNotificationFactoryCompletedStatus(string value)
+ public SystemNotificationWorkflowCompletedStatus(string value)
{
ArgumentException.ThrowIfNullOrWhiteSpace(value);
_value = value;
}
- /// Gets the value associated with this .
+ /// Gets the value associated with this .
public string Value => _value ?? string.Empty;
- /// The factory completed successfully.
- public static SystemNotificationFactoryCompletedStatus Completed { get; } = new("completed");
+ /// The workflow completed successfully.
+ public static SystemNotificationWorkflowCompletedStatus Completed { get; } = new("completed");
- /// The factory was halted.
- public static SystemNotificationFactoryCompletedStatus Halted { get; } = new("halted");
+ /// The workflow was halted.
+ public static SystemNotificationWorkflowCompletedStatus Halted { get; } = new("halted");
- /// The factory attempt paused intentionally.
- public static SystemNotificationFactoryCompletedStatus Paused { get; } = new("paused");
+ /// The workflow attempt paused intentionally.
+ public static SystemNotificationWorkflowCompletedStatus Paused { get; } = new("paused");
- /// The factory was cancelled.
- public static SystemNotificationFactoryCompletedStatus Cancelled { get; } = new("cancelled");
+ /// The workflow was cancelled.
+ public static SystemNotificationWorkflowCompletedStatus Cancelled { get; } = new("cancelled");
- /// The factory failed.
- public static SystemNotificationFactoryCompletedStatus Error { get; } = new("error");
+ /// The workflow failed.
+ public static SystemNotificationWorkflowCompletedStatus Error { get; } = new("error");
- /// Returns a value indicating whether two instances are equivalent.
- public static bool operator ==(SystemNotificationFactoryCompletedStatus left, SystemNotificationFactoryCompletedStatus right) => left.Equals(right);
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(SystemNotificationWorkflowCompletedStatus left, SystemNotificationWorkflowCompletedStatus right) => left.Equals(right);
- /// Returns a value indicating whether two instances are not equivalent.
- public static bool operator !=(SystemNotificationFactoryCompletedStatus left, SystemNotificationFactoryCompletedStatus right) => !(left == right);
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(SystemNotificationWorkflowCompletedStatus left, SystemNotificationWorkflowCompletedStatus right) => !(left == right);
///
- public override bool Equals(object? obj) => obj is SystemNotificationFactoryCompletedStatus other && Equals(other);
+ public override bool Equals(object? obj) => obj is SystemNotificationWorkflowCompletedStatus other && Equals(other);
///
- public bool Equals(SystemNotificationFactoryCompletedStatus other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+ public bool Equals(SystemNotificationWorkflowCompletedStatus other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
///
public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
@@ -17925,20 +17948,20 @@ public SystemNotificationFactoryCompletedStatus(string value)
///
public override string ToString() => Value;
- /// Provides a for serializing instances.
+ /// Provides a for serializing instances.
[EditorBrowsable(EditorBrowsableState.Never)]
- public sealed class Converter : JsonConverter
+ public sealed class Converter : JsonConverter
{
///
- public override SystemNotificationFactoryCompletedStatus Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ public override SystemNotificationWorkflowCompletedStatus Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
}
///
- public override void Write(Utf8JsonWriter writer, SystemNotificationFactoryCompletedStatus value, JsonSerializerOptions options)
+ public override void Write(Utf8JsonWriter writer, SystemNotificationWorkflowCompletedStatus value, JsonSerializerOptions options)
{
- GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(SystemNotificationFactoryCompletedStatus));
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(SystemNotificationWorkflowCompletedStatus));
}
}
}
@@ -18600,42 +18623,42 @@ public override void Write(Utf8JsonWriter writer, PermissionRequestMemoryScope v
}
}
-/// Operation gated by a factory permission request.
+/// Operation gated by a workflow permission request.
[JsonConverter(typeof(Converter))]
[DebuggerDisplay("{Value,nq}")]
-public readonly struct FactoryPermissionOperation : IEquatable
+public readonly struct WorkflowPermissionOperation : IEquatable
{
private readonly string? _value;
- /// Initializes a new instance of the struct.
- /// The value to associate with this .
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
[JsonConstructor]
- public FactoryPermissionOperation(string value)
+ public WorkflowPermissionOperation(string value)
{
ArgumentException.ThrowIfNullOrWhiteSpace(value);
_value = value;
}
- /// Gets the value associated with this .
+ /// Gets the value associated with this .
public string Value => _value ?? string.Empty;
- /// Running a registered factory, which spends subagents, active time, and AI credits under the approved limits.
- public static FactoryPermissionOperation Run { get; } = new("run");
+ /// Running a registered workflow, which spends subagents, active time, and AI credits under the approved limits.
+ public static WorkflowPermissionOperation Run { get; } = new("run");
- /// Authoring a factory, which writes JavaScript into a session-scoped extension and loads it.
- public static FactoryPermissionOperation Author { get; } = new("author");
+ /// Authoring a workflow, which writes JavaScript into a session-scoped extension and loads it.
+ public static WorkflowPermissionOperation Author { get; } = new("author");
- /// Returns a value indicating whether two instances are equivalent.
- public static bool operator ==(FactoryPermissionOperation left, FactoryPermissionOperation right) => left.Equals(right);
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(WorkflowPermissionOperation left, WorkflowPermissionOperation right) => left.Equals(right);
- /// Returns a value indicating whether two instances are not equivalent.
- public static bool operator !=(FactoryPermissionOperation left, FactoryPermissionOperation right) => !(left == right);
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(WorkflowPermissionOperation left, WorkflowPermissionOperation right) => !(left == right);
///
- public override bool Equals(object? obj) => obj is FactoryPermissionOperation other && Equals(other);
+ public override bool Equals(object? obj) => obj is WorkflowPermissionOperation other && Equals(other);
///
- public bool Equals(FactoryPermissionOperation other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+ public bool Equals(WorkflowPermissionOperation other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
///
public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
@@ -18643,20 +18666,20 @@ public FactoryPermissionOperation(string value)
///
public override string ToString() => Value;
- /// Provides a for serializing instances.
+ /// Provides a for serializing instances.
[EditorBrowsable(EditorBrowsableState.Never)]
- public sealed class Converter : JsonConverter
+ public sealed class Converter : JsonConverter
{
///
- public override FactoryPermissionOperation Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ public override WorkflowPermissionOperation Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
}
///
- public override void Write(Utf8JsonWriter writer, FactoryPermissionOperation value, JsonSerializerOptions options)
+ public override void Write(Utf8JsonWriter writer, WorkflowPermissionOperation value, JsonSerializerOptions options)
{
- GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(FactoryPermissionOperation));
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(WorkflowPermissionOperation));
}
}
}
@@ -18756,7 +18779,7 @@ public PermissionDecisionSource(string value)
/// The host denied the request because no interactive user response was available.
public static PermissionDecisionSource UnattendedFallback { get; } = new("unattended_fallback");
- /// A live authorization record from an earlier human decision in this session contained the proposal, so it ran without another prompt. This is not a new human decision and never mints authority of its own.
+ /// Historical compatibility value for sessions created while authorization carry-forward was executable. Current runtimes do not produce this source.
public static PermissionDecisionSource AuthorizationCarryForward { get; } = new("authorization_carry_forward");
/// Returns a value indicating whether two instances are equivalent.
@@ -18795,7 +18818,7 @@ public override void Write(Utf8JsonWriter writer, PermissionDecisionSource value
}
}
-/// Which direction a message-backed authorization claim moves authority in.
+/// Direction stored in a historical extractor claim. Current runtimes do not apply it.
[Experimental(global::GitHub.Copilot.Diagnostics.Experimental)]
[JsonConverter(typeof(Converter))]
[DebuggerDisplay("{Value,nq}")]
@@ -18815,10 +18838,10 @@ public PermissionMessageAuthorizationPolarity(string value)
/// Gets the value associated with this .
public string Value => _value ?? string.Empty;
- /// The human's words authorized an effect.
+ /// Historical claim recorded as a grant.
public static PermissionMessageAuthorizationPolarity Grant { get; } = new("grant");
- /// The human's words refused an effect.
+ /// Historical claim recorded as a denial.
public static PermissionMessageAuthorizationPolarity Denial { get; } = new("denial");
/// Returns a value indicating whether two instances are equivalent.
@@ -19778,51 +19801,51 @@ public override void Write(Utf8JsonWriter writer, ExitPlanModeAction value, Json
}
}
-/// Terminal status a factory run committed. A settled run is never `pending` or `running`, so those two members of the run-status domain are deliberately absent.
+/// Terminal status a workflow run committed. A settled run is never `pending` or `running`, so those two members of the run-status domain are deliberately absent.
[JsonConverter(typeof(Converter))]
[DebuggerDisplay("{Value,nq}")]
-public readonly struct FactoryRunSettledStatus : IEquatable
+public readonly struct WorkflowRunSettledStatus : IEquatable
{
private readonly string? _value;
- /// Initializes a new instance of the struct.
- /// The value to associate with this .
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
[JsonConstructor]
- public FactoryRunSettledStatus(string value)
+ public WorkflowRunSettledStatus(string value)
{
ArgumentException.ThrowIfNullOrWhiteSpace(value);
_value = value;
}
- /// Gets the value associated with this .
+ /// Gets the value associated with this .
public string Value => _value ?? string.Empty;
- /// The factory body resolved and its result was committed.
- public static FactoryRunSettledStatus Completed { get; } = new("completed");
+ /// The workflow body resolved and its result was committed.
+ public static WorkflowRunSettledStatus Completed { get; } = new("completed");
/// The run was stopped by a limit, an approval refusal or another policy decision.
- public static FactoryRunSettledStatus Halted { get; } = new("halted");
+ public static WorkflowRunSettledStatus Halted { get; } = new("halted");
/// The attempt paused intentionally while preserving resumable run state.
- public static FactoryRunSettledStatus Paused { get; } = new("paused");
+ public static WorkflowRunSettledStatus Paused { get; } = new("paused");
/// The run was cancelled by its caller or by session disposal.
- public static FactoryRunSettledStatus Cancelled { get; } = new("cancelled");
+ public static WorkflowRunSettledStatus Cancelled { get; } = new("cancelled");
/// The run failed, with `failureType` carrying the class when it has one.
- public static FactoryRunSettledStatus Error { get; } = new("error");
+ public static WorkflowRunSettledStatus Error { get; } = new("error");
- /// Returns a value indicating whether two instances are equivalent.
- public static bool operator ==(FactoryRunSettledStatus left, FactoryRunSettledStatus right) => left.Equals(right);
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(WorkflowRunSettledStatus left, WorkflowRunSettledStatus right) => left.Equals(right);
- /// Returns a value indicating whether two instances are not equivalent.
- public static bool operator !=(FactoryRunSettledStatus left, FactoryRunSettledStatus right) => !(left == right);
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(WorkflowRunSettledStatus left, WorkflowRunSettledStatus right) => !(left == right);
///
- public override bool Equals(object? obj) => obj is FactoryRunSettledStatus other && Equals(other);
+ public override bool Equals(object? obj) => obj is WorkflowRunSettledStatus other && Equals(other);
///
- public bool Equals(FactoryRunSettledStatus other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+ public bool Equals(WorkflowRunSettledStatus other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
///
public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
@@ -19830,20 +19853,20 @@ public FactoryRunSettledStatus(string value)
///
public override string ToString() => Value;
- /// Provides a for serializing instances.
+ /// Provides a for serializing instances.
[EditorBrowsable(EditorBrowsableState.Never)]
- public sealed class Converter : JsonConverter
+ public sealed class Converter : JsonConverter
{
///
- public override FactoryRunSettledStatus Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ public override WorkflowRunSettledStatus Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
}
///
- public override void Write(Utf8JsonWriter writer, FactoryRunSettledStatus value, JsonSerializerOptions options)
+ public override void Write(Utf8JsonWriter writer, WorkflowRunSettledStatus value, JsonSerializerOptions options)
{
- GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(FactoryRunSettledStatus));
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(WorkflowRunSettledStatus));
}
}
}
@@ -20322,13 +20345,6 @@ public override void Write(Utf8JsonWriter writer, ExtensionsLoadedExtensionStatu
[JsonSerializable(typeof(ExternalToolCompletedEvent))]
[JsonSerializable(typeof(ExternalToolRequestedData))]
[JsonSerializable(typeof(ExternalToolRequestedEvent))]
-[JsonSerializable(typeof(FactoryPermissionPhase))]
-[JsonSerializable(typeof(FactoryRunSettledData))]
-[JsonSerializable(typeof(FactoryRunSettledEvent))]
-[JsonSerializable(typeof(FactoryRunStartedData))]
-[JsonSerializable(typeof(FactoryRunStartedEvent))]
-[JsonSerializable(typeof(FactoryRunUpdatedData))]
-[JsonSerializable(typeof(FactoryRunUpdatedEvent))]
[JsonSerializable(typeof(FusionAttribution))]
[JsonSerializable(typeof(FusionFollowUpRecommendation))]
[JsonSerializable(typeof(FusionPhasePlanStep))]
@@ -20402,13 +20418,13 @@ public override void Write(Utf8JsonWriter writer, ExtensionsLoadedExtensionStatu
[JsonSerializable(typeof(PermissionPromptRequestExtensionEnvAccess))]
[JsonSerializable(typeof(PermissionPromptRequestExtensionManagement))]
[JsonSerializable(typeof(PermissionPromptRequestExtensionPermissionAccess))]
-[JsonSerializable(typeof(PermissionPromptRequestFactory))]
[JsonSerializable(typeof(PermissionPromptRequestHook))]
[JsonSerializable(typeof(PermissionPromptRequestMcp))]
[JsonSerializable(typeof(PermissionPromptRequestMemory))]
[JsonSerializable(typeof(PermissionPromptRequestPath))]
[JsonSerializable(typeof(PermissionPromptRequestRead))]
[JsonSerializable(typeof(PermissionPromptRequestUrl))]
+[JsonSerializable(typeof(PermissionPromptRequestWorkflow))]
[JsonSerializable(typeof(PermissionPromptRequestWrite))]
[JsonSerializable(typeof(PermissionRecoveryAttempt))]
[JsonSerializable(typeof(PermissionRecoveryData))]
@@ -20417,7 +20433,6 @@ public override void Write(Utf8JsonWriter writer, ExtensionsLoadedExtensionStatu
[JsonSerializable(typeof(PermissionRequestExtensionEnvAccess))]
[JsonSerializable(typeof(PermissionRequestExtensionManagement))]
[JsonSerializable(typeof(PermissionRequestExtensionPermissionAccess))]
-[JsonSerializable(typeof(PermissionRequestFactory))]
[JsonSerializable(typeof(PermissionRequestHook))]
[JsonSerializable(typeof(PermissionRequestMcp))]
[JsonSerializable(typeof(PermissionRequestMemory))]
@@ -20427,6 +20442,7 @@ public override void Write(Utf8JsonWriter writer, ExtensionsLoadedExtensionStatu
[JsonSerializable(typeof(PermissionRequestShellCommandSegment))]
[JsonSerializable(typeof(PermissionRequestShellPossibleUrl))]
[JsonSerializable(typeof(PermissionRequestUrl))]
+[JsonSerializable(typeof(PermissionRequestWorkflow))]
[JsonSerializable(typeof(PermissionRequestWrite))]
[JsonSerializable(typeof(PermissionRequestedData))]
[JsonSerializable(typeof(PermissionRequestedEvent))]
@@ -20632,15 +20648,15 @@ public override void Write(Utf8JsonWriter writer, ExtensionsLoadedExtensionStatu
[JsonSerializable(typeof(SystemNotificationAgentIdle))]
[JsonSerializable(typeof(SystemNotificationData))]
[JsonSerializable(typeof(SystemNotificationEvent))]
-[JsonSerializable(typeof(SystemNotificationFactoryCompleted))]
-[JsonSerializable(typeof(SystemNotificationFactoryPauseInfo))]
-[JsonSerializable(typeof(SystemNotificationFactoryPauseInfoCheckpoint))]
-[JsonSerializable(typeof(SystemNotificationFactoryPauseInfoUser))]
[JsonSerializable(typeof(SystemNotificationInstructionDiscovered))]
[JsonSerializable(typeof(SystemNotificationNewInboxMessage))]
[JsonSerializable(typeof(SystemNotificationShellCompleted))]
[JsonSerializable(typeof(SystemNotificationShellDetachedCompleted))]
[JsonSerializable(typeof(SystemNotificationUnclassified))]
+[JsonSerializable(typeof(SystemNotificationWorkflowCompleted))]
+[JsonSerializable(typeof(SystemNotificationWorkflowPauseInfo))]
+[JsonSerializable(typeof(SystemNotificationWorkflowPauseInfoCheckpoint))]
+[JsonSerializable(typeof(SystemNotificationWorkflowPauseInfoUser))]
[JsonSerializable(typeof(TaskBlocker))]
[JsonSerializable(typeof(ToolExecutionCompleteContent))]
[JsonSerializable(typeof(ToolExecutionCompleteContentAudio))]
@@ -20698,11 +20714,18 @@ public override void Write(Utf8JsonWriter writer, ExtensionsLoadedExtensionStatu
[JsonSerializable(typeof(UserToolSessionApprovalExtensionEnvAccess))]
[JsonSerializable(typeof(UserToolSessionApprovalExtensionManagement))]
[JsonSerializable(typeof(UserToolSessionApprovalExtensionPermissionAccess))]
-[JsonSerializable(typeof(UserToolSessionApprovalFactory))]
[JsonSerializable(typeof(UserToolSessionApprovalMcp))]
[JsonSerializable(typeof(UserToolSessionApprovalMemory))]
[JsonSerializable(typeof(UserToolSessionApprovalRead))]
+[JsonSerializable(typeof(UserToolSessionApprovalWorkflow))]
[JsonSerializable(typeof(UserToolSessionApprovalWrite))]
+[JsonSerializable(typeof(WorkflowPermissionPhase))]
+[JsonSerializable(typeof(WorkflowRunSettledData))]
+[JsonSerializable(typeof(WorkflowRunSettledEvent))]
+[JsonSerializable(typeof(WorkflowRunStartedData))]
+[JsonSerializable(typeof(WorkflowRunStartedEvent))]
+[JsonSerializable(typeof(WorkflowRunUpdatedData))]
+[JsonSerializable(typeof(WorkflowRunUpdatedEvent))]
[JsonSerializable(typeof(WorkingDirectoryContext))]
[JsonSerializable(typeof(JsonElement))]
internal sealed partial class SessionEventsJsonContext : JsonSerializerContext;
\ No newline at end of file
diff --git a/dotnet/test/E2E/RpcExtensionsLoadedE2ETests.cs b/dotnet/test/E2E/RpcExtensionsLoadedE2ETests.cs
index 3d017d8165..d1e7a3cb49 100644
--- a/dotnet/test/E2E/RpcExtensionsLoadedE2ETests.cs
+++ b/dotnet/test/E2E/RpcExtensionsLoadedE2ETests.cs
@@ -153,22 +153,24 @@ private static async Task InitializeGitRepositoryAsync(string projectDir)
/// after session create returns, and list calls can report an empty list
/// until setup finishes.
///
- private static async Task WaitForExtensionAsync(
+ private async Task WaitForExtensionAsync(
CopilotSession session,
string extensionId,
ExtensionStatus expectedStatus,
TimeSpan? timeout = null)
{
RpcExtension? lastSeen = null;
+ string lastExtensions = "";
await TestHelper.WaitForConditionAsync(
async () =>
{
var list = await session.Rpc.Extensions.ListAsync();
+ lastExtensions = string.Join(", ", list.Extensions.Select(extension => $"{extension.Id}: {extension.Status}"));
lastSeen = list.Extensions.FirstOrDefault(e => string.Equals(e.Id, extensionId, StringComparison.Ordinal));
return lastSeen != null && lastSeen.Status == expectedStatus;
},
timeout: timeout ?? ExtensionStartupTimeout,
- timeoutMessage: $"Extension '{extensionId}' did not reach status '{expectedStatus}' (last seen: {lastSeen?.Status.ToString() ?? ""}).",
+ timeoutMessageFactory: () => $"Extension '{extensionId}' did not reach status '{expectedStatus}' (last seen: {lastSeen?.Status.ToString() ?? ""}; listed: [{lastExtensions}]; launch markers: {TestHelper.ExtensionLaunchMarkers(Ctx.HomeDir, extensionId)}).",
transientExceptionFilter: ex => ex.ToString().Contains("Extensions not available", StringComparison.OrdinalIgnoreCase),
pollInterval: TimeSpan.FromMilliseconds(100));
diff --git a/dotnet/test/E2E/RpcSurfaceCoverageE2ETests.cs b/dotnet/test/E2E/RpcSurfaceCoverageE2ETests.cs
index b969e970aa..a82c01d201 100644
--- a/dotnet/test/E2E/RpcSurfaceCoverageE2ETests.cs
+++ b/dotnet/test/E2E/RpcSurfaceCoverageE2ETests.cs
@@ -245,18 +245,18 @@ public async Task Session_Control_And_State_Rpcs_Project_All_Result_Properties()
}
[Fact]
- public async Task Factory_Rpcs_Project_Run_Journal_And_Agent_State()
+ public async Task Workflow_Rpcs_Project_Run_Journal_And_Agent_State()
{
var (client, capturePath) = await CreateClientAsync();
await using (client)
await using (var session = await Ctx.CreateSessionAsync(client, new SessionConfig()))
{
- var run = await session.Rpc.Factory.RunAsync(
- "rpc-factory",
+ var run = await session.Rpc.Workflow.RunAsync(
+ "rpc-workflow",
ParseJson("""{ "input": 42 }"""),
- new RunOptions
+ new WorkflowRunOptions
{
- Limits = new FactoryRunLimits
+ Limits = new WorkflowRunLimits
{
MaxAiCredits = 2.5,
MaxConcurrentSubagents = 2,
@@ -266,47 +266,47 @@ public async Task Factory_Rpcs_Project_Run_Journal_And_Agent_State()
LogPhaseNames = true,
NotifyOnComplete = false,
});
- Assert.Equal("factory-run-1", run.RunId);
- Assert.Equal(FactoryRunStatus.Running, run.Status);
+ Assert.Equal("workflow-run-1", run.RunId);
+ Assert.Equal(WorkflowRunStatus.Running, run.Status);
Assert.Equal(1, run.Attempt);
Assert.Equal("running", run.Result!.Value.GetProperty("value").GetString());
Assert.Equal(1, run.Snapshot!.Value.GetProperty("step").GetInt32());
- var resumed = await session.Rpc.Factory.ResumeAsync(
- "factory-run-1",
- new FactoryRunLimits { MaxTotalSubagents = 8 },
+ var resumed = await session.Rpc.Workflow.ResumeAsync(
+ "workflow-run-1",
+ new WorkflowRunLimits { MaxTotalSubagents = 8 },
notifyOnComplete: true,
logPhaseNames: false);
- Assert.Equal("rpc-factory", resumed.FactoryName);
- Assert.Equal(FactoryRunStatus.Running, resumed.Run.Status);
+ Assert.Equal("rpc-workflow", resumed.WorkflowName);
+ Assert.Equal(WorkflowRunStatus.Running, resumed.Run.Status);
Assert.Equal(2, resumed.Run.Attempt);
- var current = await session.Rpc.Factory.GetRunAsync("factory-run-1");
- Assert.Equal("factory-run-1", current.RunId);
- Assert.Equal(FactoryRunStatus.Running, current.Status);
+ var current = await session.Rpc.Workflow.GetRunAsync("workflow-run-1");
+ Assert.Equal("workflow-run-1", current.RunId);
+ Assert.Equal(WorkflowRunStatus.Running, current.Status);
- var paused = await session.Rpc.Factory.PauseAsync("factory-run-1");
- Assert.Equal(FactoryRunStatus.Paused, paused.Status);
+ var paused = await session.Rpc.Workflow.PauseAsync("workflow-run-1");
+ Assert.Equal(WorkflowRunStatus.Paused, paused.Status);
Assert.Equal("caller requested pause", paused.Reason);
Assert.Equal(2, paused.Snapshot!.Value.GetProperty("step").GetInt32());
- await session.Rpc.Factory.LogAsync(
- "factory-run-1",
+ await session.Rpc.Workflow.LogAsync(
+ "workflow-run-1",
"execution-token-1",
[
- new FactoryLogLine
+ new WorkflowLogLine
{
- Kind = FactoryLogLineKind.Log,
+ Kind = WorkflowLogLineKind.Log,
Seq = 7,
- Text = "Factory progress",
+ Text = "Workflow progress",
},
]);
- var agent = await session.Rpc.Factory.AgentAsync(
- "factory-run-1",
+ var agent = await session.Rpc.Workflow.AgentAsync(
+ "workflow-run-1",
"execution-token-1",
"Complete the RPC task.",
- new FactoryAgentOptions
+ new WorkflowAgentOptions
{
Agent = "explore",
Label = "rpc-agent",
@@ -315,15 +315,15 @@ await session.Rpc.Factory.LogAsync(
});
Assert.Equal("agent-result", agent.Result!.Value.GetProperty("answer").GetString());
- var journal = await session.Rpc.Factory.Journal.GetAsync(
- "factory-run-1",
+ var journal = await session.Rpc.Workflow.Journal.GetAsync(
+ "workflow-run-1",
"execution-token-1",
"checkpoint");
Assert.True(journal.Hit);
Assert.Equal(7, journal.ResultJson!.Value.GetProperty("checkpoint").GetInt32());
- await session.Rpc.Factory.Journal.PutAsync(
- "factory-run-1",
+ await session.Rpc.Workflow.Journal.PutAsync(
+ "workflow-run-1",
"execution-token-1",
"checkpoint",
ParseJson("""{ "checkpoint": 8 }"""));
@@ -332,28 +332,28 @@ await session.Rpc.Factory.Journal.PutAsync(
var requests = await RpcSurfaceTestCli.ReadRequestsAsync(capturePath);
AssertCalledExactlyOnce(
requests,
- "session.factory.run",
- "session.factory.resume",
- "session.factory.getRun",
- "session.factory.pause",
- "session.factory.log",
- "session.factory.agent",
- "session.factory.journal.get",
- "session.factory.journal.put");
-
- var runRequest = GetParams(FindRequest(requests, "session.factory.run"));
+ "session.workflow.run",
+ "session.workflow.resume",
+ "session.workflow.getRun",
+ "session.workflow.pause",
+ "session.workflow.log",
+ "session.workflow.agent",
+ "session.workflow.journal.get",
+ "session.workflow.journal.put");
+
+ var runRequest = GetParams(FindRequest(requests, "session.workflow.run"));
Assert.Equal(42, runRequest.GetProperty("args").GetProperty("input").GetInt32());
Assert.Equal(2.5, runRequest.GetProperty("options").GetProperty("limits").GetProperty("maxAiCredits").GetDouble());
Assert.True(runRequest.GetProperty("options").GetProperty("logPhaseNames").GetBoolean());
- var factoryLog = GetParams(FindRequest(requests, "session.factory.log"));
+ var factoryLog = GetParams(FindRequest(requests, "session.workflow.log"));
Assert.Equal("execution-token-1", factoryLog.GetProperty("executionToken").GetString());
var line = Assert.Single(factoryLog.GetProperty("lines").EnumerateArray());
Assert.Equal("log", line.GetProperty("kind").GetString());
Assert.Equal(7, line.GetProperty("seq").GetInt64());
- Assert.Equal("Factory progress", line.GetProperty("text").GetString());
+ Assert.Equal("Workflow progress", line.GetProperty("text").GetString());
- var journalPut = GetParams(FindRequest(requests, "session.factory.journal.put"));
+ var journalPut = GetParams(FindRequest(requests, "session.workflow.journal.put"));
Assert.Equal("checkpoint", journalPut.GetProperty("key").GetString());
Assert.Equal(8, journalPut.GetProperty("resultJson").GetProperty("checkpoint").GetInt32());
}
diff --git a/dotnet/test/E2E/RpcSurfaceTestCli.cs b/dotnet/test/E2E/RpcSurfaceTestCli.cs
index 9fba398804..db822cf574 100644
--- a/dotnet/test/E2E/RpcSurfaceTestCli.cs
+++ b/dotnet/test/E2E/RpcSurfaceTestCli.cs
@@ -182,45 +182,45 @@ function handle(message) {
}]
});
return;
- case "session.factory.run":
- case "session.factory.getRun":
+ case "session.workflow.run":
+ case "session.workflow.getRun":
writeResponse(message.id, {
- runId: "factory-run-1",
+ runId: "workflow-run-1",
status: "running",
attempt: 1,
result: { value: "running" },
snapshot: { step: 1 }
});
return;
- case "session.factory.pause":
+ case "session.workflow.pause":
writeResponse(message.id, {
- runId: "factory-run-1",
+ runId: "workflow-run-1",
status: "paused",
attempt: 1,
reason: "caller requested pause",
snapshot: { step: 2 }
});
return;
- case "session.factory.resume":
+ case "session.workflow.resume":
writeResponse(message.id, {
- factoryName: "rpc-factory",
+ workflowName: "rpc-workflow",
run: {
- runId: "factory-run-1",
+ runId: "workflow-run-1",
status: "running",
attempt: 2,
snapshot: { step: 3 }
}
});
return;
- case "session.factory.log":
- case "session.factory.journal.put":
+ case "session.workflow.log":
+ case "session.workflow.journal.put":
case "session.tools.set":
writeResponse(message.id, {});
return;
- case "session.factory.agent":
+ case "session.workflow.agent":
writeResponse(message.id, { result: { answer: "agent-result" } });
return;
- case "session.factory.journal.get":
+ case "session.workflow.journal.get":
writeResponse(message.id, { hit: true, resultJson: { checkpoint: 7 } });
return;
case "session.history.clearContext":
diff --git a/dotnet/test/E2E/ScenarioTestingJsExtensionBridgeE2ETests.cs b/dotnet/test/E2E/ScenarioTestingJsExtensionBridgeE2ETests.cs
index b714f32444..76d0cb784b 100644
--- a/dotnet/test/E2E/ScenarioTestingJsExtensionBridgeE2ETests.cs
+++ b/dotnet/test/E2E/ScenarioTestingJsExtensionBridgeE2ETests.cs
@@ -304,24 +304,26 @@ private async Task CreateExtensionFixtureAsync(
$"{source.Value}:{extensionName}");
}
- private static async Task WaitForExtensionAsync(
+ private async Task WaitForExtensionAsync(
CopilotSession session,
string extensionId,
ExtensionStatus expectedStatus = default)
{
expectedStatus = expectedStatus == default ? ExtensionStatus.Running : expectedStatus;
RpcExtension? extension = null;
+ string lastExtensions = "";
await TestHelper.WaitForConditionAsync(
async () =>
{
var list = await session.Rpc.Extensions.ListAsync();
+ lastExtensions = string.Join(", ", list.Extensions.Select(item => $"{item.Id}: {item.Status}"));
extension = list.Extensions.FirstOrDefault(
item => string.Equals(item.Id, extensionId, StringComparison.Ordinal));
return extension?.Status == expectedStatus;
},
timeout: ExtensionTimeout,
pollInterval: TimeSpan.FromMilliseconds(100),
- timeoutMessage: $"Timed out waiting for extension '{extensionId}'.",
+ timeoutMessageFactory: () => $"Timed out waiting for extension '{extensionId}' (listed: [{lastExtensions}]; launch markers: {TestHelper.ExtensionLaunchMarkers(Ctx.HomeDir, extensionId)}).",
transientExceptionFilter: ex =>
ex.ToString().Contains("Extensions not available", StringComparison.OrdinalIgnoreCase));
return extension!;
diff --git a/dotnet/test/E2E/ScenarioTestingServerControlE2ETests.cs b/dotnet/test/E2E/ScenarioTestingServerControlE2ETests.cs
index bf3e2cb7e8..1fe2d6a8e9 100644
--- a/dotnet/test/E2E/ScenarioTestingServerControlE2ETests.cs
+++ b/dotnet/test/E2E/ScenarioTestingServerControlE2ETests.cs
@@ -76,22 +76,22 @@ public async Task Should_Observe_Page_And_Cancel_Factory_Run()
await using var client = Ctx.CreateClient(options: CreateFakeCliOptions(cliPath, capturePath));
await using var session = await Ctx.CreateSessionAsync(client, new SessionConfig());
- var runs = await session.Rpc.Factory.ListRunsAsync(afterSeq: 3, beforeSeq: 20, limit: 10);
+ var runs = await session.Rpc.Workflow.ListRunsAsync(afterSeq: 3, beforeSeq: 20, limit: 10);
var summary = Assert.Single(runs.Runs);
- Assert.Equal("factory-run-1", summary.RunId);
- Assert.Equal("scenario-factory", summary.FactoryName);
- Assert.Equal(FactoryRunStatus.Running, summary.Status);
+ Assert.Equal("workflow-run-1", summary.RunId);
+ Assert.Equal("scenario-workflow", summary.WorkflowName);
+ Assert.Equal(WorkflowRunStatus.Running, summary.Status);
Assert.Equal(7, runs.OldestSeq);
Assert.Equal(7, runs.NewestSeq);
Assert.False(runs.HasMoreNewer);
- var detail = await session.Rpc.Factory.GetRunDetailAsync(summary.RunId);
+ var detail = await session.Rpc.Workflow.GetRunDetailAsync(summary.RunId);
Assert.Equal(summary.RunId, detail.RunId);
- Assert.Equal(summary.FactoryName, detail.FactoryName);
- Assert.Equal(FactoryRunStatus.Running, detail.Status);
+ Assert.Equal(summary.WorkflowName, detail.WorkflowName);
+ Assert.Equal(WorkflowRunStatus.Running, detail.Status);
Assert.Equal(4, detail.Revision);
- var progress = await session.Rpc.Factory.GetRunProgressAsync(
+ var progress = await session.Rpc.Workflow.GetRunProgressAsync(
summary.RunId,
phaseId: "verify",
afterSeq: 5,
@@ -100,16 +100,16 @@ public async Task Should_Observe_Page_And_Cancel_Factory_Run()
var line = Assert.Single(progress.Records);
Assert.Equal(12, line.Seq);
Assert.Equal("verify", line.PhaseId);
- Assert.Equal(FactoryLogLineKind.Log, line.Kind);
+ Assert.Equal(WorkflowLogLineKind.Log, line.Kind);
Assert.Equal("Validation complete", line.Text);
- var cancelled = await session.Rpc.Factory.CancelAsync(summary.RunId);
+ var cancelled = await session.Rpc.Workflow.CancelAsync(summary.RunId);
Assert.Equal(summary.RunId, cancelled.RunId);
- Assert.Equal(FactoryRunStatus.Cancelled, cancelled.Status);
+ Assert.Equal(WorkflowRunStatus.Cancelled, cancelled.Status);
Assert.Equal("cancelled by user", cancelled.Reason);
var requests = await ScenarioTestingTestCli.ReadRequestsAsync(capturePath);
- var list = Assert.Single(requests, request => GetMethod(request) == "session.factory.listRuns")
+ var list = Assert.Single(requests, request => GetMethod(request) == "session.workflow.listRuns")
.GetProperty("params");
Assert.Equal(3, list.GetProperty("afterSeq").GetInt64());
Assert.Equal(20, list.GetProperty("beforeSeq").GetInt64());
@@ -117,8 +117,8 @@ public async Task Should_Observe_Page_And_Cancel_Factory_Run()
var progressRequest = Assert.Single(
requests,
- request => GetMethod(request) == "session.factory.getRunProgress").GetProperty("params");
- Assert.Equal("factory-run-1", progressRequest.GetProperty("runId").GetString());
+ request => GetMethod(request) == "session.workflow.getRunProgress").GetProperty("params");
+ Assert.Equal("workflow-run-1", progressRequest.GetProperty("runId").GetString());
Assert.Equal("verify", progressRequest.GetProperty("phaseId").GetString());
Assert.Equal(5, progressRequest.GetProperty("afterSeq").GetInt64());
Assert.Equal(20, progressRequest.GetProperty("beforeSeq").GetInt64());
diff --git a/dotnet/test/E2E/ScenarioTestingTestCli.cs b/dotnet/test/E2E/ScenarioTestingTestCli.cs
index 12c6bd8e7a..4e12090dc7 100644
--- a/dotnet/test/E2E/ScenarioTestingTestCli.cs
+++ b/dotnet/test/E2E/ScenarioTestingTestCli.cs
@@ -201,12 +201,12 @@ function handleMessage(message) {
return;
}
- if (message.method === "session.factory.listRuns") {
+ if (message.method === "session.workflow.listRuns") {
writeResponse(message.id, {
runs: [{
- runId: "factory-run-1",
- factoryName: "scenario-factory",
- description: "Scenario factory",
+ runId: "workflow-run-1",
+ workflowName: "scenario-workflow",
+ description: "Scenario workflow",
status: "running",
revision: 4,
createdAt: 1000,
@@ -224,11 +224,11 @@ function handleMessage(message) {
return;
}
- if (message.method === "session.factory.getRunDetail") {
+ if (message.method === "session.workflow.getRunDetail") {
writeResponse(message.id, {
- runId: "factory-run-1",
- factoryName: "scenario-factory",
- description: "Scenario factory",
+ runId: "workflow-run-1",
+ workflowName: "scenario-workflow",
+ description: "Scenario workflow",
status: "running",
revision: 4,
createdAt: 1000,
@@ -247,7 +247,7 @@ function handleMessage(message) {
return;
}
- if (message.method === "session.factory.getRunProgress") {
+ if (message.method === "session.workflow.getRunProgress") {
writeResponse(message.id, {
records: [{
seq: 12,
@@ -266,9 +266,9 @@ function handleMessage(message) {
return;
}
- if (message.method === "session.factory.cancel") {
+ if (message.method === "session.workflow.cancel") {
writeResponse(message.id, {
- runId: "factory-run-1",
+ runId: "workflow-run-1",
status: "cancelled",
reason: "cancelled by user",
attempt: 1
diff --git a/dotnet/test/Harness/TestHelper.cs b/dotnet/test/Harness/TestHelper.cs
index 76045bfbb0..fa40656b73 100644
--- a/dotnet/test/Harness/TestHelper.cs
+++ b/dotnet/test/Harness/TestHelper.cs
@@ -72,7 +72,8 @@ public static async Task WaitForConditionAsync(
TimeSpan? timeout = null,
string? timeoutMessage = null,
Func? transientExceptionFilter = null,
- TimeSpan? pollInterval = null)
+ TimeSpan? pollInterval = null,
+ Func? timeoutMessageFactory = null)
{
using var cts = new CancellationTokenSource(timeout ?? DefaultEventTimeout);
Exception? lastTransientException = null;
@@ -115,11 +116,47 @@ public static async Task WaitForConditionAsync(
lastTransientException = ex;
}
+ var message = timeoutMessageFactory?.Invoke() ?? timeoutMessage ?? "Timed out waiting for condition.";
throw lastTransientException is null
- ? new TimeoutException(timeoutMessage ?? "Timed out waiting for condition.")
- : new TimeoutException(timeoutMessage ?? "Timed out waiting for condition.", lastTransientException);
+ ? new TimeoutException(message)
+ : new TimeoutException(message, lastTransientException);
}
public static bool IsTransientFileSystemException(Exception exception)
=> exception is IOException or UnauthorizedAccessException;
+
+ public static string ExtensionLaunchMarkers(string homeDir, string extensionId)
+ {
+ try
+ {
+ var logsDir = Path.Join(homeDir, "logs");
+ if (!Directory.Exists(logsDir))
+ {
+ return "";
+ }
+
+ var extensionName = extensionId[(extensionId.LastIndexOf(':') + 1)..];
+ var launches = new List();
+ foreach (var path in Directory.EnumerateFiles(logsDir, "process-*.log"))
+ {
+ using var reader = new StreamReader(path);
+ if (reader.ReadLine()?.Contains(extensionName, StringComparison.Ordinal) != true)
+ {
+ continue;
+ }
+
+ var markers = File.ReadLines(path)
+ .Where(line => line.StartsWith("=== ", StringComparison.Ordinal)
+ && !line.Contains("module=", StringComparison.Ordinal));
+ var summary = string.Join("; ", markers);
+ launches.Add(summary.Length == 0 ? "" : summary);
+ }
+
+ return launches.Count == 0 ? "" : string.Join(" | ", launches);
+ }
+ catch (Exception error) when (error is IOException or UnauthorizedAccessException)
+ {
+ return $"";
+ }
+ }
}
diff --git a/go/internal/e2e/rpc_generated_surface_gaps_e2e_test.go b/go/internal/e2e/rpc_generated_surface_gaps_e2e_test.go
index 99d9c0a4b1..63993058a4 100644
--- a/go/internal/e2e/rpc_generated_surface_gaps_e2e_test.go
+++ b/go/internal/e2e/rpc_generated_surface_gaps_e2e_test.go
@@ -56,18 +56,18 @@ func TestGeneratedRPCSurfaceGapsE2E(t *testing.T) {
{"session completion triggers", "session.completions.getTriggerCharacters", (*rpc.CompletionsAPI).GetTriggerCharacters, session(func(r *rpc.SessionRPC) any { return r.Completions }), false},
{"session content exclusion paths", "session.contentExclusion.checkPaths", (*rpc.ContentExclusionAPI).CheckPaths, session(func(r *rpc.SessionRPC) any { return r.ContentExclusion }), false},
{"session debug logs", "session.debug.collectLogs", (*rpc.DebugAPI).CollectLogs, session(func(r *rpc.SessionRPC) any { return r.Debug }), false},
- {"session factory agent", "session.factory.agent", (*rpc.FactoryAPI).Agent, session(func(r *rpc.SessionRPC) any { return r.Factory }), false},
- {"session factory cancel", "session.factory.cancel", (*rpc.FactoryAPI).Cancel, session(func(r *rpc.SessionRPC) any { return r.Factory }), false},
- {"session factory get run", "session.factory.getRun", (*rpc.FactoryAPI).GetRun, session(func(r *rpc.SessionRPC) any { return r.Factory }), false},
- {"session factory detail", "session.factory.getRunDetail", (*rpc.FactoryAPI).GetRunDetail, session(func(r *rpc.SessionRPC) any { return r.Factory }), false},
- {"session factory progress", "session.factory.getRunProgress", (*rpc.FactoryAPI).GetRunProgress, session(func(r *rpc.SessionRPC) any { return r.Factory }), false},
- {"session factory list runs", "session.factory.listRuns", (*rpc.FactoryAPI).ListRuns, session(func(r *rpc.SessionRPC) any { return r.Factory }), false},
- {"session factory log", "session.factory.log", (*rpc.FactoryAPI).Log, session(func(r *rpc.SessionRPC) any { return r.Factory }), false},
- {"session factory pause", "session.factory.pause", (*rpc.FactoryAPI).Pause, session(func(r *rpc.SessionRPC) any { return r.Factory }), false},
- {"session factory resume", "session.factory.resume", (*rpc.FactoryAPI).Resume, session(func(r *rpc.SessionRPC) any { return r.Factory }), false},
- {"session factory run", "session.factory.run", (*rpc.FactoryAPI).Run, session(func(r *rpc.SessionRPC) any { return r.Factory }), false},
- {"session factory journal get", "session.factory.journal.get", (*rpc.FactoryJournalAPI).Get, session(func(r *rpc.SessionRPC) any { return r.Factory.Journal() }), false},
- {"session factory journal put", "session.factory.journal.put", (*rpc.FactoryJournalAPI).Put, session(func(r *rpc.SessionRPC) any { return r.Factory.Journal() }), false},
+ {"session workflow agent", "session.workflow.agent", (*rpc.WorkflowAPI).Agent, session(func(r *rpc.SessionRPC) any { return r.Workflow }), false},
+ {"session workflow cancel", "session.workflow.cancel", (*rpc.WorkflowAPI).Cancel, session(func(r *rpc.SessionRPC) any { return r.Workflow }), false},
+ {"session workflow get run", "session.workflow.getRun", (*rpc.WorkflowAPI).GetRun, session(func(r *rpc.SessionRPC) any { return r.Workflow }), false},
+ {"session workflow detail", "session.workflow.getRunDetail", (*rpc.WorkflowAPI).GetRunDetail, session(func(r *rpc.SessionRPC) any { return r.Workflow }), false},
+ {"session workflow progress", "session.workflow.getRunProgress", (*rpc.WorkflowAPI).GetRunProgress, session(func(r *rpc.SessionRPC) any { return r.Workflow }), false},
+ {"session workflow list runs", "session.workflow.listRuns", (*rpc.WorkflowAPI).ListRuns, session(func(r *rpc.SessionRPC) any { return r.Workflow }), false},
+ {"session workflow log", "session.workflow.log", (*rpc.WorkflowAPI).Log, session(func(r *rpc.SessionRPC) any { return r.Workflow }), false},
+ {"session workflow pause", "session.workflow.pause", (*rpc.WorkflowAPI).Pause, session(func(r *rpc.SessionRPC) any { return r.Workflow }), false},
+ {"session workflow resume", "session.workflow.resume", (*rpc.WorkflowAPI).Resume, session(func(r *rpc.SessionRPC) any { return r.Workflow }), false},
+ {"session workflow run", "session.workflow.run", (*rpc.WorkflowAPI).Run, session(func(r *rpc.SessionRPC) any { return r.Workflow }), false},
+ {"session workflow journal get", "session.workflow.journal.get", (*rpc.WorkflowJournalAPI).Get, session(func(r *rpc.SessionRPC) any { return r.Workflow.Journal() }), false},
+ {"session workflow journal put", "session.workflow.journal.put", (*rpc.WorkflowJournalAPI).Put, session(func(r *rpc.SessionRPC) any { return r.Workflow.Journal() }), false},
{"session history clear context", "session.history.clearContext", (*rpc.HistoryAPI).ClearContext, session(func(r *rpc.SessionRPC) any { return r.History }), false},
{"session limit prediction", "session.limitPrediction.predict", (*rpc.LimitPredictionAPI).Predict, session(func(r *rpc.SessionRPC) any { return r.LimitPrediction }), false},
{"session mcp loading background", "session.mcp.moveLoadingToBackground", (*rpc.MCPAPI).MoveLoadingToBackground, session(func(r *rpc.SessionRPC) any { return r.MCP }), false},
@@ -213,20 +213,20 @@ func generatedRPCRequest(wire string) string {
return `{"paths":["/tmp/rpc-workspace/file.txt"]}`
case "session.debug.collectLogs":
return `{"destination":{"kind":"directory","outputDirectory":"/tmp/rpc-debug"},"include":{"events":true,"processLogs":false,"shellLogs":true},"additionalEntries":[{"bundlePath":"host/diagnostic.txt","kind":"file","path":"/tmp/diagnostic.txt","required":true}]}`
- case "session.factory.run":
- return `{"name":"rpc-factory","args":{"input":42},"options":{"limits":{"maxAiCredits":2.5,"maxConcurrentSubagents":2,"maxTotalSubagents":4,"timeoutSeconds":30},"logPhaseNames":true,"notifyOnComplete":false}}`
- case "session.factory.resume":
- return `{"runId":"factory-run-1","limits":{"maxTotalSubagents":8},"notifyOnComplete":true,"logPhaseNames":false}`
- case "session.factory.getRun", "session.factory.pause":
- return `{"runId":"factory-run-1"}`
- case "session.factory.log":
- return `{"runId":"factory-run-1","executionToken":"execution-token-1","lines":[{"kind":"log","seq":7,"text":"Factory progress"}]}`
- case "session.factory.agent":
- return `{"factoryRunId":"factory-run-1","executionToken":"execution-token-1","prompt":"Complete the RPC task.","opts":{"agent":"explore","label":"rpc-agent","model":"model-a","reasoningEffort":"high"}}`
- case "session.factory.journal.get":
- return `{"runId":"factory-run-1","executionToken":"execution-token-1","key":"checkpoint"}`
- case "session.factory.journal.put":
- return `{"runId":"factory-run-1","executionToken":"execution-token-1","key":"checkpoint","resultJson":{"checkpoint":8}}`
+ case "session.workflow.run":
+ return `{"name":"rpc-workflow","args":{"input":42},"options":{"limits":{"maxAiCredits":2.5,"maxConcurrentSubagents":2,"maxTotalSubagents":4,"timeoutSeconds":30},"logPhaseNames":true,"notifyOnComplete":false}}`
+ case "session.workflow.resume":
+ return `{"runId":"workflow-run-1","limits":{"maxTotalSubagents":8},"notifyOnComplete":true,"logPhaseNames":false}`
+ case "session.workflow.getRun", "session.workflow.pause":
+ return `{"runId":"workflow-run-1"}`
+ case "session.workflow.log":
+ return `{"runId":"workflow-run-1","executionToken":"execution-token-1","lines":[{"kind":"log","seq":7,"text":"Workflow progress"}]}`
+ case "session.workflow.agent":
+ return `{"workflowRunId":"workflow-run-1","executionToken":"execution-token-1","prompt":"Complete the RPC task.","opts":{"agent":"explore","label":"rpc-agent","model":"model-a","reasoningEffort":"high"}}`
+ case "session.workflow.journal.get":
+ return `{"runId":"workflow-run-1","executionToken":"execution-token-1","key":"checkpoint"}`
+ case "session.workflow.journal.put":
+ return `{"runId":"workflow-run-1","executionToken":"execution-token-1","key":"checkpoint","resultJson":{"checkpoint":8}}`
case "session.history.clearContext":
return `{"prompt":"Reset context."}`
case "session.limitPrediction.predict":
@@ -306,15 +306,15 @@ func generatedRPCResponse(wire string) string {
return `{"available":true,"checks":[{"path":"/tmp/rpc-workspace/file.txt","excluded":false}]}`
case "session.debug.collectLogs":
return `{"kind":"directory","path":"/tmp/rpc-debug","entries":[{"bundlePath":"host/diagnostic.txt","sizeBytes":123,"source":"additional"}],"skippedEntries":[{"bundlePath":"host/missing.txt","path":"/tmp/missing.txt","reason":"not found"}]}`
- case "session.factory.run", "session.factory.getRun":
- return `{"runId":"factory-run-1","status":"running","attempt":1,"result":{"value":"running"},"snapshot":{"step":1}}`
- case "session.factory.pause":
- return `{"runId":"factory-run-1","status":"paused","attempt":1,"reason":"caller requested pause","snapshot":{"step":2}}`
- case "session.factory.resume":
- return `{"factoryName":"rpc-factory","run":{"runId":"factory-run-1","status":"running","attempt":2,"snapshot":{"step":3}}}`
- case "session.factory.agent":
+ case "session.workflow.run", "session.workflow.getRun":
+ return `{"runId":"workflow-run-1","status":"running","attempt":1,"result":{"value":"running"},"snapshot":{"step":1}}`
+ case "session.workflow.pause":
+ return `{"runId":"workflow-run-1","status":"paused","attempt":1,"reason":"caller requested pause","snapshot":{"step":2}}`
+ case "session.workflow.resume":
+ return `{"workflowName":"rpc-workflow","run":{"runId":"workflow-run-1","status":"running","attempt":2,"snapshot":{"step":3}}}`
+ case "session.workflow.agent":
return `{"result":{"answer":"agent-result"}}`
- case "session.factory.journal.get":
+ case "session.workflow.journal.get":
return `{"hit":true,"resultJson":{"checkpoint":7}}`
case "session.history.clearContext":
return `{"messagesCleared":4}`
diff --git a/go/internal/e2e/scenario_testing_server_control_e2e_test.go b/go/internal/e2e/scenario_testing_server_control_e2e_test.go
index 656bcf82f2..4d6ca62075 100644
--- a/go/internal/e2e/scenario_testing_server_control_e2e_test.go
+++ b/go/internal/e2e/scenario_testing_server_control_e2e_test.go
@@ -93,11 +93,11 @@ func TestScenarioTestingServerControlE2E(t *testing.T) {
}
})
- t.Run("observes pages and cancels factory run", func(t *testing.T) {
+ t.Run("observes pages and cancels workflow run", func(t *testing.T) {
fixture := newGeneratedRPCFixture(t, t.Context())
var mu sync.Mutex
captured := map[string]map[string]any{}
- setFactoryHandler := func(method string, result any) {
+ setWorkflowHandler := func(method string, result any) {
fixture.server.SetRequestHandler(method, func(request json.RawMessage) (json.RawMessage, *jsonrpc2.Error) {
var params map[string]any
if err := json.Unmarshal(request, ¶ms); err != nil {
@@ -109,23 +109,23 @@ func TestScenarioTestingServerControlE2E(t *testing.T) {
return mustJSON(t, result), nil
})
}
- setFactoryHandler("session.factory.listRuns", map[string]any{
+ setWorkflowHandler("session.workflow.listRuns", map[string]any{
"runs": []any{map[string]any{
- "runId": "factory-run-1",
- "factoryName": "scenario-factory",
- "status": "running",
+ "runId": "workflow-run-1",
+ "workflowName": "scenario-workflow",
+ "status": "running",
}},
"oldestSeq": 7,
"newestSeq": 7,
"hasMoreNewer": false,
})
- setFactoryHandler("session.factory.getRunDetail", map[string]any{
- "runId": "factory-run-1",
- "factoryName": "scenario-factory",
- "status": "running",
- "revision": 4,
+ setWorkflowHandler("session.workflow.getRunDetail", map[string]any{
+ "runId": "workflow-run-1",
+ "workflowName": "scenario-workflow",
+ "status": "running",
+ "revision": 4,
})
- setFactoryHandler("session.factory.getRunProgress", map[string]any{
+ setWorkflowHandler("session.workflow.getRunProgress", map[string]any{
"records": []any{map[string]any{
"attempt": 1,
"kind": "log",
@@ -136,79 +136,79 @@ func TestScenarioTestingServerControlE2E(t *testing.T) {
}},
"revision": 4,
})
- setFactoryHandler("session.factory.cancel", map[string]any{
- "runId": "factory-run-1",
+ setWorkflowHandler("session.workflow.cancel", map[string]any{
+ "runId": "workflow-run-1",
"status": "cancelled",
"reason": "cancelled by user",
})
after, before, limit := int64(3), int64(20), int32(10)
- runs, err := fixture.session.RPC.Factory.ListRuns(t.Context(), &rpc.FactoryListRunsRequest{
+ runs, err := fixture.session.RPC.Workflow.ListRuns(t.Context(), &rpc.WorkflowListRunsRequest{
AfterSeq: &after,
BeforeSeq: &before,
Limit: &limit,
})
if err != nil {
- t.Fatalf("Factory.ListRuns failed: %v", err)
+ t.Fatalf("Workflow.ListRuns failed: %v", err)
}
- if len(runs.Runs) != 1 || runs.Runs[0].RunID != "factory-run-1" ||
- runs.Runs[0].FactoryName != "scenario-factory" || runs.Runs[0].Status != rpc.FactoryRunStatusRunning ||
+ if len(runs.Runs) != 1 || runs.Runs[0].RunID != "workflow-run-1" ||
+ runs.Runs[0].WorkflowName != "scenario-workflow" || runs.Runs[0].Status != rpc.WorkflowRunStatusRunning ||
runs.OldestSeq == nil || *runs.OldestSeq != 7 || runs.NewestSeq == nil || *runs.NewestSeq != 7 ||
runs.HasMoreNewer == nil || *runs.HasMoreNewer {
- t.Fatalf("Unexpected factory run page: %#v", runs)
+ t.Fatalf("Unexpected workflow run page: %#v", runs)
}
- detail, err := fixture.session.RPC.Factory.GetRunDetail(t.Context(), &rpc.FactoryGetRunRequest{RunID: "factory-run-1"})
+ detail, err := fixture.session.RPC.Workflow.GetRunDetail(t.Context(), &rpc.WorkflowGetRunRequest{RunID: "workflow-run-1"})
if err != nil {
- t.Fatalf("Factory.GetRunDetail failed: %v", err)
+ t.Fatalf("Workflow.GetRunDetail failed: %v", err)
}
- if detail.RunID != "factory-run-1" || detail.FactoryName != "scenario-factory" ||
- detail.Status != rpc.FactoryRunStatusRunning || detail.Revision != 4 {
- t.Fatalf("Unexpected factory detail: %#v", detail)
+ if detail.RunID != "workflow-run-1" || detail.WorkflowName != "scenario-workflow" ||
+ detail.Status != rpc.WorkflowRunStatusRunning || detail.Revision != 4 {
+ t.Fatalf("Unexpected workflow detail: %#v", detail)
}
progressAfter, progressBefore, progressLimit := int64(5), int64(20), int32(25)
phaseID := "verify"
- progress, err := fixture.session.RPC.Factory.GetRunProgress(t.Context(), &rpc.FactoryGetRunProgressRequest{
- RunID: "factory-run-1",
+ progress, err := fixture.session.RPC.Workflow.GetRunProgress(t.Context(), &rpc.WorkflowGetRunProgressRequest{
+ RunID: "workflow-run-1",
PhaseID: &phaseID,
AfterSeq: &progressAfter,
BeforeSeq: &progressBefore,
Limit: &progressLimit,
})
if err != nil {
- t.Fatalf("Factory.GetRunProgress failed: %v", err)
+ t.Fatalf("Workflow.GetRunProgress failed: %v", err)
}
if len(progress.Records) != 1 || progress.Records[0].Seq != 12 ||
progress.Records[0].PhaseID == nil || *progress.Records[0].PhaseID != "verify" ||
- progress.Records[0].Kind != rpc.FactoryLogLineKindLog ||
+ progress.Records[0].Kind != rpc.WorkflowLogLineKindLog ||
progress.Records[0].Text != "Validation complete" {
- t.Fatalf("Unexpected factory progress: %#v", progress)
+ t.Fatalf("Unexpected workflow progress: %#v", progress)
}
- cancelled, err := fixture.session.RPC.Factory.Cancel(t.Context(), &rpc.FactoryCancelRequest{RunID: "factory-run-1"})
+ cancelled, err := fixture.session.RPC.Workflow.Cancel(t.Context(), &rpc.WorkflowCancelRequest{RunID: "workflow-run-1"})
if err != nil {
- t.Fatalf("Factory.Cancel failed: %v", err)
+ t.Fatalf("Workflow.Cancel failed: %v", err)
}
- if cancelled.RunID != "factory-run-1" || cancelled.Status != rpc.FactoryRunStatusCancelled ||
+ if cancelled.RunID != "workflow-run-1" || cancelled.Status != rpc.WorkflowRunStatusCancelled ||
cancelled.Reason == nil || *cancelled.Reason != "cancelled by user" {
- t.Fatalf("Unexpected cancelled factory run: %#v", cancelled)
+ t.Fatalf("Unexpected cancelled workflow run: %#v", cancelled)
}
mu.Lock()
defer mu.Unlock()
- assertJSONSubset(t, "session.factory.listRuns", map[string]any{
+ assertJSONSubset(t, "session.workflow.listRuns", map[string]any{
"afterSeq": float64(3),
"beforeSeq": float64(20),
"limit": float64(10),
- }, captured["session.factory.listRuns"])
- assertJSONSubset(t, "session.factory.getRunProgress", map[string]any{
- "runId": "factory-run-1",
+ }, captured["session.workflow.listRuns"])
+ assertJSONSubset(t, "session.workflow.getRunProgress", map[string]any{
+ "runId": "workflow-run-1",
"phaseId": "verify",
"afterSeq": float64(5),
"beforeSeq": float64(20),
"limit": float64(25),
- }, captured["session.factory.getRunProgress"])
+ }, captured["session.workflow.getRunProgress"])
})
t.Run("reads autopilot state and enables remote mode", func(t *testing.T) {
diff --git a/go/rpc/permission_request_managed_approval.go b/go/rpc/permission_request_managed_approval.go
index d1bfa37356..6724e2f430 100644
--- a/go/rpc/permission_request_managed_approval.go
+++ b/go/rpc/permission_request_managed_approval.go
@@ -34,7 +34,7 @@ func (r PermissionRequestExtensionPermissionAccess) RequiresManagedApproval() bo
// RequiresManagedApproval reports whether managed policy requires an explicit
// human decision for this request.
-func (r PermissionRequestFactory) RequiresManagedApproval() bool {
+func (r PermissionRequestWorkflow) RequiresManagedApproval() bool {
return managedApprovalRequired(r.ManagedApprovalRequired)
}
diff --git a/go/rpc/zrpc.go b/go/rpc/zrpc.go
index 42550be80e..ce4bdc8164 100644
--- a/go/rpc/zrpc.go
+++ b/go/rpc/zrpc.go
@@ -138,6 +138,49 @@ type AccountQuotaSnapshot struct {
UsedRequests int64 `json:"usedRequests"`
}
+// Enumerate request carrying the typed collection query.
+// Experimental: AccountsEnumerateRequest is part of an experimental API and may change or
+// be removed.
+type AccountsEnumerateRequest struct {
+ // Which typed accounts collection to enumerate.
+ Query AuthEnumerateQuery `json:"query"`
+}
+
+// Read request carrying the typed datum query.
+// Experimental: AccountsGetRequest is part of an experimental API and may change or be
+// removed.
+type AccountsGetRequest struct {
+ // Which typed accounts datum to read.
+ Query AuthReadQuery `json:"query"`
+}
+
+// Mutation request carrying the typed write command.
+// Experimental: AccountsSetRequest is part of an experimental API and may change or be
+// removed.
+type AccountsSetRequest struct {
+ // The non-interactive mutation command to apply.
+ Command AuthWrite `json:"command"`
+}
+
+// One signed-in account in the roster forest.
+// Experimental: AccountStatus is part of an experimental API and may change or be removed.
+type AccountStatus struct {
+ // Whether this is the active account.
+ Active bool `json:"active"`
+ // Opaque id of the account this one was derived from (e.g. an EMU account's base Entra
+ // identity); absent for a root account. Matches the base identity account's selectionId,
+ // forming the derivation edge.
+ DerivedFrom *string `json:"derivedFrom,omitempty"`
+ // Authentication host URL.
+ Host string `json:"host"`
+ // The provider kind of this account.
+ Kind AccountKind `json:"kind"`
+ // Authenticated login/username.
+ Login string `json:"login"`
+ // Opaque selection id used to switch to, or log out, this account.
+ SelectionID string `json:"selectionId"`
+}
+
// Canonical directory where custom agents can be discovered or created, with scope,
// preference, and optional project path.
// Experimental: AgentDiscoveryPath is part of an experimental API and may change or be
@@ -867,6 +910,82 @@ type AttachmentSelectionDetailsStart struct {
Line int64 `json:"line"`
}
+// Selects which accounts collection to enumerate. A no-arg selector is the empty-payload
+// variant.
+// Experimental: AuthEnumerateQuery is part of an experimental API and may change or be
+// removed.
+type AuthEnumerateQuery interface {
+ authEnumerateQuery()
+ Kind() AuthEnumerateQueryKind
+}
+
+type RawAuthEnumerateQueryData struct {
+ Discriminator AuthEnumerateQueryKind
+ Raw json.RawMessage
+}
+
+func (RawAuthEnumerateQueryData) authEnumerateQuery() {}
+func (r RawAuthEnumerateQueryData) Kind() AuthEnumerateQueryKind {
+ return r.Discriminator
+}
+
+type AuthEnumerateQueryAccounts struct {
+}
+
+func (AuthEnumerateQueryAccounts) authEnumerateQuery() {}
+func (AuthEnumerateQueryAccounts) Kind() AuthEnumerateQueryKind {
+ return AuthEnumerateQueryKindAccounts
+}
+
+type AuthEnumerateQueryProviders struct {
+ // Whether an interactive Entra broker is available on the host; gates Entra availability in
+ // the returned list.
+ BrokerAvailable *bool `json:"brokerAvailable,omitempty"`
+}
+
+func (AuthEnumerateQueryProviders) authEnumerateQuery() {}
+func (AuthEnumerateQueryProviders) Kind() AuthEnumerateQueryKind {
+ return AuthEnumerateQueryKindProviders
+}
+
+// The enumerated collection, keyed by the same selector as the query.
+// Experimental: AuthEnumerateValue is part of an experimental API and may change or be
+// removed.
+type AuthEnumerateValue interface {
+ authEnumerateValue()
+ Kind() AuthEnumerateValueKind
+}
+
+type RawAuthEnumerateValueData struct {
+ Discriminator AuthEnumerateValueKind
+ Raw json.RawMessage
+}
+
+func (RawAuthEnumerateValueData) authEnumerateValue() {}
+func (r RawAuthEnumerateValueData) Kind() AuthEnumerateValueKind {
+ return r.Discriminator
+}
+
+type AuthEnumerateValueAccounts struct {
+ // The signed-in account forest; empty when not logged in.
+ Items []AccountStatus `json:"items"`
+}
+
+func (AuthEnumerateValueAccounts) authEnumerateValue() {}
+func (AuthEnumerateValueAccounts) Kind() AuthEnumerateValueKind {
+ return AuthEnumerateValueKindAccounts
+}
+
+type AuthEnumerateValueProviders struct {
+ // The providers offered for interactive login.
+ Items []ProviderDescriptor `json:"items"`
+}
+
+func (AuthEnumerateValueProviders) authEnumerateValue() {}
+func (AuthEnumerateValueProviders) Kind() AuthEnumerateValueKind {
+ return AuthEnumerateValueKindProviders
+}
+
// Credential-free authentication identity safe to expose to hosts and user interfaces.
// Experimental: AuthIdentity is part of an experimental API and may change or be removed.
type AuthIdentity struct {
@@ -1062,6 +1181,235 @@ func (UserAuthInfo) Type() AuthInfoType {
return AuthInfoTypeUser
}
+// Advance an in-flight login flow, optionally fulfilling an input-required step.
+// Experimental: AuthLoginAdvanceRequest is part of an experimental API and may change or be
+// removed.
+type AuthLoginAdvanceRequest struct {
+ // Opaque flow id from begin.
+ FlowID string `json:"flowId"`
+ // Neutral input fulfilling a preceding input-required step (e.g. a GHEC host); ignored
+ // otherwise.
+ Input *string `json:"input,omitempty"`
+}
+
+// Begin an interactive login flow for a provider kind. Dispatch is kind-only.
+// Experimental: AuthLoginBeginRequest is part of an experimental API and may change or be
+// removed.
+type AuthLoginBeginRequest struct {
+ // The provider kind to sign in with.
+ Kind LoginProviderKind `json:"kind"`
+}
+
+// A started login flow: its opaque id and first step.
+// Experimental: AuthLoginBegun is part of an experimental API and may change or be removed.
+type AuthLoginBegun struct {
+ // Opaque flow id used to advance or cancel this login.
+ FlowID string `json:"flowId"`
+ // The first step of the flow.
+ Step AuthLoginStep `json:"step"`
+}
+
+// Cancel an in-flight login flow.
+// Experimental: AuthLoginCancelRequest is part of an experimental API and may change or be
+// removed.
+type AuthLoginCancelRequest struct {
+ // Opaque flow id from begin.
+ FlowID string `json:"flowId"`
+}
+
+// Terminal result of an interactive login flow.
+// Experimental: AuthLoginResultDto is part of an experimental API and may change or be
+// removed.
+type AuthLoginResultDto struct {
+ // Host that was signed in, when completed.
+ Host *string `json:"host,omitempty"`
+ // Login that was signed in, when completed.
+ Login *string `json:"login,omitempty"`
+ // Terminal disposition of the login.
+ Status AuthLoginResultStatus `json:"status"`
+}
+
+// One step in an interactive login flow. The consumer acts on the step and calls advance to
+// proceed. Browser-open is encoded as two distinct steps by design: `open-url` is
+// CONSUMER-driven (the provider surfaces the authorize URL and the consumer opens it —
+// github.com/GHEC web), while `needs-interaction` is PROVIDER-driven (the provider opens
+// the browser or broker UI itself and does not surface a URL — Entra).
+// Experimental: AuthLoginStep is part of an experimental API and may change or be removed.
+type AuthLoginStep interface {
+ authLoginStep()
+ Kind() AuthLoginStepKind
+}
+
+type RawAuthLoginStepData struct {
+ Discriminator AuthLoginStepKind
+ Raw json.RawMessage
+}
+
+func (RawAuthLoginStepData) authLoginStep() {}
+func (r RawAuthLoginStepData) Kind() AuthLoginStepKind {
+ return r.Discriminator
+}
+
+type AuthLoginStepAwaiting struct {
+}
+
+func (AuthLoginStepAwaiting) authLoginStep() {}
+func (AuthLoginStepAwaiting) Kind() AuthLoginStepKind {
+ return AuthLoginStepKindAwaiting
+}
+
+type AuthLoginStepCompleted struct {
+ // The terminal login result.
+ Result AuthLoginResultDto `json:"result"`
+}
+
+func (AuthLoginStepCompleted) authLoginStep() {}
+func (AuthLoginStepCompleted) Kind() AuthLoginStepKind {
+ return AuthLoginStepKindCompleted
+}
+
+type AuthLoginStepError struct {
+ // Human-readable failure message.
+ Message string `json:"message"`
+}
+
+func (AuthLoginStepError) authLoginStep() {}
+func (AuthLoginStepError) Kind() AuthLoginStepKind {
+ return AuthLoginStepKindError
+}
+
+type AuthLoginStepInputRequired struct {
+ // Prompt for the value the provider needs; the consumer supplies it as advance input (e.g.
+ // a GitHub Enterprise Cloud host, *.ghe.com).
+ Prompt string `json:"prompt"`
+}
+
+func (AuthLoginStepInputRequired) authLoginStep() {}
+func (AuthLoginStepInputRequired) Kind() AuthLoginStepKind {
+ return AuthLoginStepKindInputRequired
+}
+
+type AuthLoginStepNeedsInteraction struct {
+}
+
+func (AuthLoginStepNeedsInteraction) authLoginStep() {}
+func (AuthLoginStepNeedsInteraction) Kind() AuthLoginStepKind {
+ return AuthLoginStepKindNeedsInteraction
+}
+
+type AuthLoginStepOpenURL struct {
+ // Authorize URL the consumer should open in a browser (consumer-driven browser-open).
+ URL string `json:"url"`
+}
+
+func (AuthLoginStepOpenURL) authLoginStep() {}
+func (AuthLoginStepOpenURL) Kind() AuthLoginStepKind {
+ return AuthLoginStepKindOpenURL
+}
+
+// Selects which typed accounts datum to read.
+// Experimental: AuthReadQuery is part of an experimental API and may change or be removed.
+type AuthReadQuery interface {
+ authReadQuery()
+ Kind() AuthReadQueryKind
+}
+
+type RawAuthReadQueryData struct {
+ Discriminator AuthReadQueryKind
+ Raw json.RawMessage
+}
+
+func (RawAuthReadQueryData) authReadQuery() {}
+func (r RawAuthReadQueryData) Kind() AuthReadQueryKind {
+ return r.Discriminator
+}
+
+type AuthReadQueryActiveAccount struct {
+}
+
+func (AuthReadQueryActiveAccount) authReadQuery() {}
+func (AuthReadQueryActiveAccount) Kind() AuthReadQueryKind {
+ return AuthReadQueryKindActiveAccount
+}
+
+type AuthReadQueryLastErrors struct {
+}
+
+func (AuthReadQueryLastErrors) authReadQuery() {}
+func (AuthReadQueryLastErrors) Kind() AuthReadQueryKind {
+ return AuthReadQueryKindLastErrors
+}
+
+type AuthReadQueryStatus struct {
+}
+
+func (AuthReadQueryStatus) authReadQuery() {}
+func (AuthReadQueryStatus) Kind() AuthReadQueryKind {
+ return AuthReadQueryKindStatus
+}
+
+// The read result, keyed by the same selector as the query.
+// Experimental: AuthReadValue is part of an experimental API and may change or be removed.
+type AuthReadValue interface {
+ authReadValue()
+ Kind() AuthReadValueKind
+}
+
+type RawAuthReadValueData struct {
+ Discriminator AuthReadValueKind
+ Raw json.RawMessage
+}
+
+func (RawAuthReadValueData) authReadValue() {}
+func (r RawAuthReadValueData) Kind() AuthReadValueKind {
+ return r.Discriminator
+}
+
+type AuthReadValueActiveAccount struct {
+ // The active account, or absent when not logged in.
+ Account *AccountStatus `json:"account,omitempty"`
+}
+
+func (AuthReadValueActiveAccount) authReadValue() {}
+func (AuthReadValueActiveAccount) Kind() AuthReadValueKind {
+ return AuthReadValueKindActiveAccount
+}
+
+type AuthReadValueLastErrors struct {
+ // Validation errors from the most recent authentication attempt.
+ Errors []AuthValidationError `json:"errors"`
+}
+
+func (AuthReadValueLastErrors) authReadValue() {}
+func (AuthReadValueLastErrors) Kind() AuthReadValueKind {
+ return AuthReadValueKindLastErrors
+}
+
+type AuthReadValueStatus struct {
+ // The neutral authentication status summary.
+ Status AuthStatusDto `json:"status"`
+}
+
+func (AuthReadValueStatus) authReadValue() {}
+func (AuthReadValueStatus) Kind() AuthReadValueKind {
+ return AuthReadValueKindStatus
+}
+
+// Neutral authentication status summary.
+// Experimental: AuthStatusDto is part of an experimental API and may change or be removed.
+type AuthStatusDto struct {
+ // Number of signed-in accounts in the roster.
+ AccountCount int64 `json:"accountCount"`
+ // Active account host, if authenticated.
+ ActiveHost *string `json:"activeHost,omitempty"`
+ // Active account login, if authenticated.
+ ActiveLogin *string `json:"activeLogin,omitempty"`
+ // Copilot plan tier of the active account, if known.
+ CopilotPlan *string `json:"copilotPlan,omitempty"`
+ // Whether the session has resolved authentication.
+ IsAuthenticated bool `json:"isAuthenticated"`
+}
+
// Validation error from an authentication attempt.
// Experimental: AuthValidationError is part of an experimental API and may change or be
// removed.
@@ -1077,6 +1425,66 @@ type AuthValidationError struct {
// removed.
type AuthValidationErrors []AuthValidationError
+// One non-interactive accounts mutation command (the selector is fused with its typed args).
+// Experimental: AuthWrite is part of an experimental API and may change or be removed.
+type AuthWrite interface {
+ authWrite()
+ Kind() AuthWriteKind
+}
+
+type RawAuthWriteData struct {
+ Discriminator AuthWriteKind
+ Raw json.RawMessage
+}
+
+func (RawAuthWriteData) authWrite() {}
+func (r RawAuthWriteData) Kind() AuthWriteKind {
+ return r.Discriminator
+}
+
+type AuthWriteLogout struct {
+ // Opaque selection id of the account to log out; absent logs out the active account.
+ SelectionID *string `json:"selectionId,omitempty"`
+}
+
+func (AuthWriteLogout) authWrite() {}
+func (AuthWriteLogout) Kind() AuthWriteKind {
+ return AuthWriteKindLogout
+}
+
+type AuthWriteSetCredentials struct {
+ // Authentication host URL.
+ Host string `json:"host"`
+ // Login/username for the credential.
+ Login string `json:"login"`
+ // GitHub authentication token to install.
+ Token string `json:"token"`
+}
+
+func (AuthWriteSetCredentials) authWrite() {}
+func (AuthWriteSetCredentials) Kind() AuthWriteKind {
+ return AuthWriteKindSetCredentials
+}
+
+type AuthWriteSwitchActive struct {
+ // Opaque selection id of the account to make active.
+ SelectionID string `json:"selectionId"`
+}
+
+func (AuthWriteSwitchActive) authWrite() {}
+func (AuthWriteSwitchActive) Kind() AuthWriteKind {
+ return AuthWriteKindSwitchActive
+}
+
+// Result of a non-interactive accounts mutation.
+// Experimental: AuthWriteResult is part of an experimental API and may change or be removed.
+type AuthWriteResult struct {
+ // For a logout, whether other signed-in accounts remain.
+ MoreUsers *bool `json:"moreUsers,omitempty"`
+ // Whether the mutation was applied.
+ Ok bool `json:"ok"`
+}
+
// Current per-window credit limit and consumption for an autopilot objective.
// Experimental: AutopilotObjectiveCreditLimit is part of an experimental API and may change
// or be removed.
@@ -4058,730 +4466,6 @@ type ExternalToolTextResultForLlmContentResourceLinkIcon struct {
Theme *ExternalToolTextResultForLlmContentResourceLinkIconTheme `json:"theme,omitempty"`
}
-// Parameters for cooperatively aborting a factory body.
-// Experimental: FactoryAbortRequest is part of an experimental API and may change or be
-// removed.
-type FactoryAbortRequest struct {
- // Opaque token identifying the execution attempt to abort.
- ExecutionToken string `json:"executionToken"`
- // Factory run identifier.
- RunID string `json:"runId"`
- // Target session identifier
- SessionID string `json:"sessionId"`
-}
-
-// Acknowledgement that a factory request was accepted.
-// Experimental: FactoryAckResult is part of an experimental API and may change or be
-// removed.
-type FactoryAckResult struct {
-}
-
-// Options for one factory-scoped subagent call.
-// Experimental: FactoryAgentOptions is part of an experimental API and may change or be
-// removed.
-type FactoryAgentOptions struct {
- // Optional built-in or custom agent name whose definition configures the subagent.
- Agent *string `json:"agent,omitempty"`
- // Optional context tier override for the subagent.
- ContextTier *ContextTier `json:"contextTier,omitempty"`
- // Optional label distinguishing otherwise identical memoized agent calls.
- Label *string `json:"label,omitempty"`
- // Optional model identifier for the subagent.
- Model *string `json:"model,omitempty"`
- // Optional reasoning effort override for the subagent.
- ReasoningEffort *string `json:"reasoningEffort,omitempty"`
- // Optional JSON Schema for structured agent output.
- Schema any `json:"schema,omitempty"`
-}
-
-// Parameters for one factory-scoped subagent call.
-// Experimental: FactoryAgentRequest is part of an experimental API and may change or be
-// removed.
-type FactoryAgentRequest struct {
- // Opaque token identifying the current factory execution attempt.
- ExecutionToken string `json:"executionToken"`
- // Factory run identifier that owns the subagent.
- FactoryRunID string `json:"factoryRunId"`
- // Subagent execution options.
- Opts FactoryAgentOptions `json:"opts"`
- // Prompt to send to the subagent.
- Prompt string `json:"prompt"`
-}
-
-// Result of one factory-scoped subagent call.
-// Experimental: FactoryAgentResult is part of an experimental API and may change or be
-// removed.
-type FactoryAgentResult struct {
- // Agent result, omitted when the agent produced no result.
- Result any `json:"result,omitempty"`
-}
-
-// Prompt-safe durable identity and live status for a direct factory agent.
-// Experimental: FactoryAgentSummary is part of an experimental API and may change or be
-// removed.
-type FactoryAgentSummary struct {
- // Accumulated active agent time in milliseconds.
- ActiveMs int64 `json:"activeMs"`
- // Prompt-safe live activity text.
- Activity *string `json:"activity,omitempty"`
- // Stable direct-agent identifier.
- AgentID string `json:"agentId"`
- // Registered agent type.
- AgentType string `json:"agentType"`
- // Epoch milliseconds when the agent completed.
- CompletedAt *int64 `json:"completedAt,omitempty"`
- // Friendly, non-unique name intended for display
- DisplayName *string `json:"displayName,omitempty"`
- // Friendly, non-unique name intended for display
- Label string `json:"label"`
- // Phase identifier active when the agent was launched, or null.
- PhaseID *string `json:"phaseId"`
- // Model requested when the agent was launched.
- RequestedModel *string `json:"requestedModel,omitempty"`
- // Concrete model resolved for the agent.
- ResolvedModel *string `json:"resolvedModel,omitempty"`
- // Owning factory run identifier.
- RunID string `json:"runId"`
- // Epoch milliseconds when the agent started.
- StartedAt *int64 `json:"startedAt,omitempty"`
- // Current durable or live agent status.
- Status string `json:"status"`
- // Tool-call identifier that launched the agent.
- ToolCallID string `json:"toolCallId"`
-}
-
-// Parameters for cancelling a factory run.
-// Experimental: FactoryCancelRequest is part of an experimental API and may change or be
-// removed.
-type FactoryCancelRequest struct {
- // Factory run identifier.
- RunID string `json:"runId"`
-}
-
-// Current factory phase identity.
-// Experimental: FactoryCurrentPhase is part of an experimental API and may change or be
-// removed.
-type FactoryCurrentPhase struct {
- // Current phase identifier.
- ID string `json:"id"`
- // Zero-based declared phase ordinal, or null for an undeclared phase.
- Ordinal *int64 `json:"ordinal"`
-}
-
-// Declared or approved factory resource ceilings.
-// Experimental: FactoryDeclaredLimits is part of an experimental API and may change or be
-// removed.
-type FactoryDeclaredLimits struct {
- // Maximum AI credits consumed by subagents and descendants.
- MaxAiCredits *float64 `json:"maxAiCredits,omitempty"`
- // Maximum concurrently active subagents.
- MaxConcurrentSubagents *int64 `json:"maxConcurrentSubagents,omitempty"`
- // Maximum total subagents spawned by the run.
- MaxTotalSubagents *int64 `json:"maxTotalSubagents,omitempty"`
- // Maximum accumulated active execution time in seconds.
- TimeoutSeconds *float64 `json:"timeoutSeconds,omitempty"`
-}
-
-// Parameters sent to the owning extension to execute a factory closure.
-// Experimental: FactoryExecuteRequest is part of an experimental API and may change or be
-// removed.
-type FactoryExecuteRequest struct {
- // Factory input value.
- Args any `json:"args"`
- // Opaque token identifying this factory execution attempt.
- ExecutionToken string `json:"executionToken"`
- // Registered factory name.
- Name string `json:"name"`
- // Factory run identifier.
- RunID string `json:"runId"`
- // Target session identifier
- SessionID string `json:"sessionId"`
-}
-
-// Result returned by an extension factory closure.
-// Experimental: FactoryExecuteResult is part of an experimental API and may change or be
-// removed.
-type FactoryExecuteResult struct {
- // Factory result value.
- Result any `json:"result,omitempty"`
-}
-
-// Parameters for paging factory progress.
-// Experimental: FactoryGetRunProgressRequest is part of an experimental API and may change
-// or be removed.
-type FactoryGetRunProgressRequest struct {
- // Exclusive forward cursor.
- AfterSeq *int64 `json:"afterSeq,omitempty"`
- // Exclusive backward cursor.
- BeforeSeq *int64 `json:"beforeSeq,omitempty"`
- // Maximum records to return. Defaults to 200 and is capped at 500.
- Limit *int32 `json:"limit,omitempty"`
- // Optional phase identifier used to scope records and cursors.
- PhaseID *string `json:"phaseId,omitempty"`
- // Factory run identifier.
- RunID string `json:"runId"`
-}
-
-// Parameters for retrieving a factory run.
-// Experimental: FactoryGetRunRequest is part of an experimental API and may change or be
-// removed.
-type FactoryGetRunRequest struct {
- // Factory run identifier.
- RunID string `json:"runId"`
-}
-
-// Parameters for reading a factory journal entry.
-// Experimental: FactoryJournalGetRequest is part of an experimental API and may change or
-// be removed.
-type FactoryJournalGetRequest struct {
- // Opaque token identifying the current factory execution attempt.
- ExecutionToken string `json:"executionToken"`
- // Namespaced journal key.
- Key string `json:"key"`
- // Factory run identifier.
- RunID string `json:"runId"`
-}
-
-// Result of reading a factory journal entry.
-// Experimental: FactoryJournalGetResult is part of an experimental API and may change or be
-// removed.
-type FactoryJournalGetResult struct {
- // Whether the journal contained the requested key.
- Hit bool `json:"hit"`
- // Cached JSON result. The hit field distinguishes a cached JSON null from a miss.
- ResultJSON any `json:"resultJson,omitempty"`
-}
-
-// Parameters for storing a factory journal entry.
-// Experimental: FactoryJournalPutRequest is part of an experimental API and may change or
-// be removed.
-type FactoryJournalPutRequest struct {
- // Opaque token identifying the current factory execution attempt.
- ExecutionToken string `json:"executionToken"`
- // Namespaced journal key.
- Key string `json:"key"`
- // JSON result to memoize.
- ResultJSON any `json:"resultJson"`
- // Factory run identifier.
- RunID string `json:"runId"`
-}
-
-// Parameters for paging factory runs.
-// Experimental: FactoryListRunsRequest is part of an experimental API and may change or be
-// removed.
-type FactoryListRunsRequest struct {
- // Exclusive forward cursor.
- AfterSeq *int64 `json:"afterSeq,omitempty"`
- // Exclusive backward cursor.
- BeforeSeq *int64 `json:"beforeSeq,omitempty"`
- // Maximum terminal runs to return. Defaults to 200 and is capped at 500.
- Limit *int32 `json:"limit,omitempty"`
-}
-
-// A page of factory runs in durable creation order.
-// Experimental: FactoryListRunsResult is part of an experimental API and may change or be
-// removed.
-type FactoryListRunsResult struct {
- // Whether terminal runs newer than this page exist.
- HasMoreNewer *bool `json:"hasMoreNewer,omitempty"`
- // Newest terminal-run cursor in this page, or null when the terminal window is empty.
- NewestSeq *int64 `json:"newestSeq,omitempty"`
- // Oldest terminal-run cursor in this page, or null when the terminal window is empty.
- OldestSeq *int64 `json:"oldestSeq,omitempty"`
- // Number of terminal runs older than this page.
- OmittedOlder *int64 `json:"omittedOlder,omitempty"`
- // Factory run summaries in durable creation order.
- Runs []FactoryRunSummary `json:"runs"`
-}
-
-// One ordered factory progress line.
-// Experimental: FactoryLogLine is part of an experimental API and may change or be removed.
-type FactoryLogLine struct {
- // Progress line kind.
- Kind FactoryLogLineKind `json:"kind"`
- // Monotonic sequence number within the factory run.
- Seq int64 `json:"seq"`
- // Progress text.
- Text string `json:"text"`
-}
-
-// Parameters for recording factory progress.
-// Experimental: FactoryLogRequest is part of an experimental API and may change or be
-// removed.
-type FactoryLogRequest struct {
- // Opaque token identifying the current factory execution attempt.
- ExecutionToken string `json:"executionToken"`
- // Ordered progress lines to append.
- Lines []FactoryLogLine `json:"lines"`
- // Factory run identifier.
- RunID string `json:"runId"`
-}
-
-// Parameters for an owned durable pause checkpoint.
-// Experimental: FactoryPauseCheckpointRequest is part of an experimental API and may change
-// or be removed.
-type FactoryPauseCheckpointRequest struct {
- // Opaque token identifying the execution attempt that reached the checkpoint.
- ExecutionToken string `json:"executionToken"`
- // Stable author-defined checkpoint key.
- Key string `json:"key"`
- // Factory run identifier.
- RunID string `json:"runId"`
-}
-
-// Experimental: FactoryPauseCheckpointResult is part of an experimental API and may change
-// or be removed.
-type FactoryPauseCheckpointResult struct {
- // Whether this execution attempt must pause or may continue.
- Action FactoryPauseCheckpointAction `json:"action"`
-}
-
-// Durable metadata describing who initiated a factory pause.
-// Experimental: FactoryPauseInfo is part of an experimental API and may change or be
-// removed.
-type FactoryPauseInfo interface {
- factoryPauseInfo()
- Type() FactoryPauseInfoType
-}
-
-type RawFactoryPauseInfoData struct {
- Discriminator FactoryPauseInfoType
- Raw json.RawMessage
-}
-
-func (RawFactoryPauseInfoData) factoryPauseInfo() {}
-func (r RawFactoryPauseInfoData) Type() FactoryPauseInfoType {
- return r.Discriminator
-}
-
-type FactoryPauseInfoCheckpoint struct {
- // Stable author-defined checkpoint key that initiated the pause.
- Key string `json:"key"`
-}
-
-func (FactoryPauseInfoCheckpoint) factoryPauseInfo() {}
-func (FactoryPauseInfoCheckpoint) Type() FactoryPauseInfoType {
- return FactoryPauseInfoTypeCheckpoint
-}
-
-type FactoryPauseInfoUser struct {
-}
-
-func (FactoryPauseInfoUser) factoryPauseInfo() {}
-func (FactoryPauseInfoUser) Type() FactoryPauseInfoType {
- return FactoryPauseInfoTypeUser
-}
-
-// Parameters for pausing a running factory.
-// Experimental: FactoryPauseRequest is part of an experimental API and may change or be
-// removed.
-type FactoryPauseRequest struct {
- // Factory run identifier.
- RunID string `json:"runId"`
-}
-
-// Durable lifecycle and timing for one factory phase.
-// Experimental: FactoryPhaseObservation is part of an experimental API and may change or be
-// removed.
-type FactoryPhaseObservation struct {
- // Completed active time accumulated by this phase in milliseconds.
- AccumulatedActiveMs int64 `json:"accumulatedActiveMs"`
- // Epoch milliseconds when this phase completed; for a skipped phase, the synthetic skip
- // timestamp (equal to `startedAt`).
- CompletedAt *int64 `json:"completedAt,omitempty"`
- // Current live active time for this phase in milliseconds.
- CurrentActiveMs int64 `json:"currentActiveMs"`
- // Optional human-readable phase detail.
- Detail *string `json:"detail,omitempty"`
- // Number of times execution entered this phase.
- EntryCount int64 `json:"entryCount"`
- // Phase identifier.
- ID string `json:"id"`
- // Most recent run attempt that entered this phase, or `0` if the phase has never been
- // entered.
- LastEnteredRunAttempt int64 `json:"lastEnteredRunAttempt"`
- // Direct agents in this phase that are currently live.
- LiveAgentCount int64 `json:"liveAgentCount"`
- // Zero-based declared phase ordinal, or null for an undeclared phase.
- Ordinal *int64 `json:"ordinal"`
- // Epoch milliseconds when this phase first started; for a skipped phase, the synthetic skip
- // timestamp (equal to `completedAt`).
- StartedAt *int64 `json:"startedAt,omitempty"`
- // Derived lifecycle state of the phase.
- Status FactoryPhaseStatus `json:"status"`
- // Human-readable phase title.
- Title string `json:"title"`
- // Total direct agents associated with this phase.
- TotalAgentCount int64 `json:"totalAgentCount"`
-}
-
-// One durable factory progress record.
-// Experimental: FactoryProgressLine is part of an experimental API and may change or be
-// removed.
-type FactoryProgressLine struct {
- // Resume attempt that emitted this record.
- Attempt int64 `json:"attempt"`
- // Progress record kind.
- Kind FactoryLogLineKind `json:"kind"`
- // Phase active when the record was emitted, or null before any phase.
- PhaseID *string `json:"phaseId"`
- // Epoch milliseconds when the record was persisted.
- RecordedAt int64 `json:"recordedAt"`
- // Global monotonic sequence number within the run.
- Seq int64 `json:"seq"`
- // Prompt-safe progress text.
- Text string `json:"text"`
-}
-
-// A bidirectional page of factory progress.
-// Experimental: FactoryProgressPage is part of an experimental API and may change or be
-// removed.
-type FactoryProgressPage struct {
- // Whether progress records newer than this page exist.
- HasMoreNewer bool `json:"hasMoreNewer"`
- // Whether progress records older than this page exist.
- HasMoreOlder bool `json:"hasMoreOlder"`
- // Newest sequence number in this page, or null when empty.
- NewestSeq *int64 `json:"newestSeq"`
- // Oldest sequence number in this page, or null when empty.
- OldestSeq *int64 `json:"oldestSeq"`
- // Progress records in sequence order.
- Records []FactoryProgressLine `json:"records"`
- // Run revision reflected by this page.
- Revision int64 `json:"revision"`
-}
-
-// Parameters for resuming a factory run from its persisted identity.
-// Experimental: FactoryResumeRequest is part of an experimental API and may change or be
-// removed.
-type FactoryResumeRequest struct {
- // Optional per-invocation resource ceiling overrides.
- Limits *FactoryRunLimits `json:"limits,omitempty"`
- // Whether to emit factory phase names to the session transcript.
- LogPhaseNames *bool `json:"logPhaseNames,omitempty"`
- // Whether to notify the originating session when the factory completes.
- NotifyOnComplete *bool `json:"notifyOnComplete,omitempty"`
- // Factory run identifier.
- RunID string `json:"runId"`
-}
-
-// Resolved persisted factory identity and resumed run envelope.
-// Experimental: FactoryResumeResult is part of an experimental API and may change or be
-// removed.
-type FactoryResumeResult struct {
- // Persisted factory name resolved for the resumed run.
- FactoryName string `json:"factoryName"`
- // Terminal resumed run envelope.
- Run FactoryRunResult `json:"run"`
-}
-
-// Durable factory resource consumption.
-// Experimental: FactoryRunConsumed is part of an experimental API and may change or be
-// removed.
-type FactoryRunConsumed struct {
- // Accumulated active execution time in milliseconds.
- ActiveMs int64 `json:"activeMs"`
- // AI usage consumed by the run in nano-AIU.
- NanoAiu int64 `json:"nanoAiu"`
- // Total subagents spawned by the run.
- Subagents int64 `json:"subagents"`
-}
-
-// Full factory run observability detail.
-// Experimental: FactoryRunDetail is part of an experimental API and may change or be
-// removed.
-type FactoryRunDetail struct {
- // Epoch milliseconds when the current active segment started, or null while inactive.
- ActiveSegmentStartedAt *int64 `json:"activeSegmentStartedAt"`
- // Durable identities and live statuses for direct factory agents.
- Agents []FactoryAgentSummary `json:"agents"`
- // Approved effective resource ceilings, or null until approved.
- Approved *FactoryDeclaredLimits `json:"approved"`
- // Whether the durable run state currently passes runtime resume eligibility checks.
- CanResume bool `json:"canResume"`
- // Epoch milliseconds when the run completed, or null while nonterminal.
- CompletedAt *int64 `json:"completedAt"`
- // Durable resource consumption.
- Consumed FactoryRunConsumed `json:"consumed"`
- // Epoch milliseconds when the run was created.
- CreatedAt int64 `json:"createdAt"`
- // Current phase identity, or null before any phase is entered.
- CurrentPhase *FactoryCurrentPhase `json:"currentPhase"`
- // Resource ceilings declared by the factory.
- DeclaredLimits FactoryDeclaredLimits `json:"declaredLimits"`
- // Number of phases declared by the factory.
- DeclaredPhaseCount int64 `json:"declaredPhaseCount"`
- // Human-readable factory description.
- Description string `json:"description"`
- // Registered factory name.
- FactoryName string `json:"factoryName"`
- // Number of direct factory agents currently live.
- LiveAgentCount int64 `json:"liveAgentCount"`
- // Epoch milliseconds when this live-overlay snapshot was observed.
- ObservedAt int64 `json:"observedAt"`
- // Lifecycle and timing observations for each factory phase.
- Phases []FactoryPhaseObservation `json:"phases"`
- // Bidirectional page of durable factory progress.
- Progress FactoryProgressPage `json:"progress"`
- // Monotonic durable run revision.
- Revision int64 `json:"revision"`
- // Factory run identifier.
- RunID string `json:"runId"`
- // Epoch milliseconds when execution first started, or null before start.
- StartedAt *int64 `json:"startedAt"`
- // Current factory run status.
- Status FactoryRunStatus `json:"status"`
- // Terminal run outcome, or null while nonterminal.
- Terminal *FactoryRunTerminal `json:"terminal"`
- // Total direct factory agents spawned across all attempts.
- TotalSpawnedAgentCount int64 `json:"totalSpawnedAgentCount"`
- // Epoch milliseconds when the durable run was last updated.
- UpdatedAt int64 `json:"updatedAt"`
-}
-
-// Machine-readable factory run failure.
-// Experimental: FactoryRunFailure is part of an experimental API and may change or be
-// removed.
-type FactoryRunFailure interface {
- factoryRunFailure()
- Type() FactoryRunFailureType
-}
-
-type RawFactoryRunFailureData struct {
- Discriminator FactoryRunFailureType
- Raw json.RawMessage
-}
-
-func (RawFactoryRunFailureData) factoryRunFailure() {}
-func (r RawFactoryRunFailureData) Type() FactoryRunFailureType {
- return r.Discriminator
-}
-
-// The run stopped because its usage accounting could not be completed.
-type FactoryRunFailureFactoryAccountingIncomplete struct {
- // Confirmed usage in nano-AIU, representing the floor of what the run spent.
- DrainedNanoAiu int64 `json:"drainedNanoAiu"`
- // Factory run identifier.
- RunID string `json:"runId"`
-}
-
-func (FactoryRunFailureFactoryAccountingIncomplete) factoryRunFailure() {}
-func (FactoryRunFailureFactoryAccountingIncomplete) Type() FactoryRunFailureType {
- return FactoryRunFailureTypeFactoryAccountingIncomplete
-}
-
-type FactoryRunFailureFactoryDurableFailure struct {
- // Stable failure code.
- Code string `json:"code"`
- // Execution-critical durable operation that failed.
- Operation FactoryDurableOperation `json:"operation"`
- // Factory run identifier.
- RunID string `json:"runId"`
-}
-
-func (FactoryRunFailureFactoryDurableFailure) factoryRunFailure() {}
-func (FactoryRunFailureFactoryDurableFailure) Type() FactoryRunFailureType {
- return FactoryRunFailureTypeFactoryDurableFailure
-}
-
-type FactoryRunFailureFactoryLimitReached struct {
- // Resource ceiling that stopped the run.
- Kind FactoryRunFailureKind `json:"kind"`
- // Factory run identifier.
- RunID string `json:"runId"`
- // Suggested larger ceiling when the runtime can derive one safely.
- SuggestedValue *float64 `json:"suggestedValue,omitempty"`
- // Approved effective ceiling that was reached.
- Value float64 `json:"value"`
-}
-
-func (FactoryRunFailureFactoryLimitReached) factoryRunFailure() {}
-func (FactoryRunFailureFactoryLimitReached) Type() FactoryRunFailureType {
- return FactoryRunFailureTypeFactoryLimitReached
-}
-
-// The extension that owns the factory disconnected while the run was executing, so the host
-// halted it. The run's journaled subagent results are preserved so a resume can reuse them.
-type FactoryRunFailureFactoryProviderDisconnected struct {
- // Factory run identifier.
- RunID string `json:"runId"`
-}
-
-func (FactoryRunFailureFactoryProviderDisconnected) factoryRunFailure() {}
-func (FactoryRunFailureFactoryProviderDisconnected) Type() FactoryRunFailureType {
- return FactoryRunFailureTypeFactoryProviderDisconnected
-}
-
-type FactoryRunFailureFactoryResumeDeclined struct {
- // Human-readable reason the resume did not proceed.
- Reason string `json:"reason"`
- // Factory run identifier whose changed limits were declined.
- RunID string `json:"runId"`
-}
-
-func (FactoryRunFailureFactoryResumeDeclined) factoryRunFailure() {}
-func (FactoryRunFailureFactoryResumeDeclined) Type() FactoryRunFailureType {
- return FactoryRunFailureTypeFactoryResumeDeclined
-}
-
-// Wire-only per-invocation factory resource ceiling overrides.
-// Experimental: FactoryRunLimits is part of an experimental API and may change or be
-// removed.
-type FactoryRunLimits struct {
- // Maximum AI credits consumed by factory subagents and their descendants. The post-paid
- // ceiling is soft: parallel turns can settle beyond it before the run stops.
- MaxAiCredits *float64 `json:"maxAiCredits,omitempty"`
- // Maximum number of factory subagents that may run concurrently.
- MaxConcurrentSubagents *int64 `json:"maxConcurrentSubagents,omitempty"`
- // Maximum total number of factory subagents that may be admitted.
- MaxTotalSubagents *int64 `json:"maxTotalSubagents,omitempty"`
- // Maximum accumulated active-execution time in seconds. Active execution includes the
- // entire extension body, subprocess waits, queued-agent waits, and sleeps; time between
- // resumed attempts is not counted.
- TimeoutSeconds *float64 `json:"timeoutSeconds,omitempty"`
-}
-
-// Parameters for invoking a registered factory.
-// Experimental: FactoryRunRequest is part of an experimental API and may change or be
-// removed.
-type FactoryRunRequest struct {
- // Factory input value.
- Args any `json:"args"`
- // Registered factory name.
- Name string `json:"name"`
- // Factory invocation options.
- Options *RunOptions `json:"options,omitempty"`
-}
-
-// Complete current or terminal factory run envelope.
-// Experimental: FactoryRunResult is part of an experimental API and may change or be
-// removed.
-type FactoryRunResult struct {
- // One-based execution attempt represented by this envelope. Absent before the first attempt
- // starts or when returned by an older runtime.
- Attempt *int64 `json:"attempt,omitempty"`
- // Error message for an errored run.
- Error *string `json:"error,omitempty"`
- // Machine-readable failure details for a halted or errored run.
- Failure FactoryRunFailure `json:"failure,omitempty"`
- // Structured pause initiator metadata for a paused attempt.
- PauseInfo FactoryPauseInfo `json:"pauseInfo,omitempty"`
- // Reason for a halted or cancelled run.
- Reason *string `json:"reason,omitempty"`
- // Completed factory result.
- Result any `json:"result,omitempty"`
- // Factory run identifier.
- RunID string `json:"runId"`
- // Partial journal and progress snapshot for a halted, cancelled, or errored run.
- Snapshot any `json:"snapshot,omitempty"`
- // Current or terminal factory run status.
- Status FactoryRunStatus `json:"status"`
-}
-
-// Durable factory run summary with read-time live overlays.
-// Experimental: FactoryRunSummary is part of an experimental API and may change or be
-// removed.
-type FactoryRunSummary struct {
- // Epoch milliseconds when the current active segment started, or null while inactive.
- ActiveSegmentStartedAt *int64 `json:"activeSegmentStartedAt"`
- // Approved effective resource ceilings, or null until approved.
- Approved *FactoryDeclaredLimits `json:"approved"`
- // Whether the durable run state currently passes runtime resume eligibility checks.
- CanResume bool `json:"canResume"`
- // Epoch milliseconds when the run completed, or null while nonterminal.
- CompletedAt *int64 `json:"completedAt"`
- // Durable resource consumption.
- Consumed FactoryRunConsumed `json:"consumed"`
- // Epoch milliseconds when the run was created.
- CreatedAt int64 `json:"createdAt"`
- // Current phase identity, or null before any phase is entered.
- CurrentPhase *FactoryCurrentPhase `json:"currentPhase"`
- // Resource ceilings declared by the factory.
- DeclaredLimits FactoryDeclaredLimits `json:"declaredLimits"`
- // Number of phases declared by the factory.
- DeclaredPhaseCount int64 `json:"declaredPhaseCount"`
- // Human-readable factory description.
- Description string `json:"description"`
- // Registered factory name.
- FactoryName string `json:"factoryName"`
- // Number of direct factory agents currently live.
- LiveAgentCount int64 `json:"liveAgentCount"`
- // Epoch milliseconds when this live-overlay snapshot was observed.
- ObservedAt int64 `json:"observedAt"`
- // Monotonic durable run revision.
- Revision int64 `json:"revision"`
- // Factory run identifier.
- RunID string `json:"runId"`
- // Epoch milliseconds when execution first started, or null before start.
- StartedAt *int64 `json:"startedAt"`
- // Current factory run status.
- Status FactoryRunStatus `json:"status"`
- // Terminal run outcome, or null while nonterminal.
- Terminal *FactoryRunTerminal `json:"terminal"`
- // Total direct factory agents spawned across all attempts.
- TotalSpawnedAgentCount int64 `json:"totalSpawnedAgentCount"`
- // Epoch milliseconds when the durable run was last updated.
- UpdatedAt int64 `json:"updatedAt"`
-}
-
-// Prompt-safe terminal factory outcome.
-// Experimental: FactoryRunTerminal is part of an experimental API and may change or be
-// removed.
-type FactoryRunTerminal struct {
- // Human-readable terminal error.
- Error *string `json:"error,omitempty"`
- // Machine-readable terminal failure.
- Failure FactoryRunFailure `json:"failure,omitempty"`
- // Pause initiator metadata, or null when the run did not pause.
- PauseInfo FactoryPauseInfo `json:"pauseInfo"`
- // Human-readable terminal reason.
- Reason *string `json:"reason,omitempty"`
- // Prompt-safe preview of the completed result.
- ResultPreview *string `json:"resultPreview,omitempty"`
-}
-
-// Internal parameters for resuming a factory run from a tool.
-// Experimental: FactoryToolResumeRequest is part of an experimental API and may change or
-// be removed.
-// Internal: FactoryToolResumeRequest is an internal SDK API and is not part of the public
-// surface.
-type FactoryToolResumeRequest struct {
- // Optional per-invocation resource ceiling overrides.
- Limits *FactoryRunLimits `json:"limits,omitempty"`
- // Factory run identifier.
- RunID string `json:"runId"`
- // Opaque identifier of the originating tool call.
- ToolCallID *string `json:"toolCallId,omitempty"`
-}
-
-// Options for an internal tool-originated factory invocation.
-// Experimental: FactoryToolRunOptions is part of an experimental API and may change or be
-// removed.
-// Internal: FactoryToolRunOptions is an internal SDK API and is not part of the public
-// surface.
-type FactoryToolRunOptions struct {
- // Per-invocation resource ceiling overrides.
- Limits *FactoryRunLimits `json:"limits,omitempty"`
- // Run identifier whose journal and progress should seed this resumed run.
- ResumeFromRunID *string `json:"resumeFromRunId,omitempty"`
-}
-
-// Internal parameters for invoking a registered factory from a tool.
-// Experimental: FactoryToolRunRequest is part of an experimental API and may change or be
-// removed.
-// Internal: FactoryToolRunRequest is an internal SDK API and is not part of the public
-// surface.
-type FactoryToolRunRequest struct {
- // Factory input value.
- Args any `json:"args"`
- // Registered factory name.
- Name string `json:"name"`
- // Tool-originated factory invocation options.
- Options *FactoryToolRunOptions `json:"options,omitempty"`
- // Opaque identifier of the originating tool call.
- ToolCallID *string `json:"toolCallId,omitempty"`
-}
-
// Content filtering mode to apply to all tools, or a map of tool name to content filtering
// mode.
// Experimental: FilterMapping is part of an experimental API and may change or be removed.
@@ -8232,6 +7916,14 @@ type ModelApplyStartupOverlayRequest struct {
DeferredResume *bool `json:"deferredResume,omitempty"`
// Model required by device-managed policy, when configured.
DeviceManagedModel *string `json:"deviceManagedModel,omitempty"`
+ // Context tier paired with the effective organization-managed model. Applies only when that
+ // concrete managed model is selected; it is ignored for Auto and for CLI, resume, or user
+ // overrides.
+ ManagedContextTier *string `json:"managedContextTier,omitempty"`
+ // Reasoning effort paired with the effective organization-managed model. Applies only when
+ // that concrete managed model is selected; it is ignored for Auto and for CLI, resume, or
+ // user overrides.
+ ManagedReasoningEffort *string `json:"managedReasoningEffort,omitempty"`
// Startup default model from the enterprise policy helper, when configured. Weakest of the
// managed sources: it applies only when neither device nor server policy names a model, and
// an explicit user selection still wins.
@@ -9243,21 +8935,6 @@ func (PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess) Kin
return PermissionDecisionApproveForLocationApprovalKindExtensionPermissionAccess
}
-// Location-scoped factory approval, optionally narrowed by approval key.
-// Experimental: PermissionDecisionApproveForLocationApprovalFactory is part of an
-// experimental API and may change or be removed.
-type PermissionDecisionApproveForLocationApprovalFactory struct {
- // Optional factory operation name or canonical approval key; when omitted, the approval
- // covers all factory operations.
- ApprovalKey *string `json:"approvalKey,omitempty"`
-}
-
-func (PermissionDecisionApproveForLocationApprovalFactory) permissionDecisionApproveForLocationApproval() {
-}
-func (PermissionDecisionApproveForLocationApprovalFactory) Kind() PermissionDecisionApproveForLocationApprovalKind {
- return PermissionDecisionApproveForLocationApprovalKindFactory
-}
-
// Location-scoped approval details for an MCP server tool, or all tools on the server when
// `toolName` is null.
// Experimental: PermissionDecisionApproveForLocationApprovalMCP is part of an experimental
@@ -9313,6 +8990,21 @@ func (PermissionDecisionApproveForLocationApprovalRead) Kind() PermissionDecisio
return PermissionDecisionApproveForLocationApprovalKindRead
}
+// Location-scoped workflow approval, optionally narrowed by approval key.
+// Experimental: PermissionDecisionApproveForLocationApprovalWorkflow is part of an
+// experimental API and may change or be removed.
+type PermissionDecisionApproveForLocationApprovalWorkflow struct {
+ // Optional workflow operation name or canonical approval key; when omitted, the approval
+ // covers all workflow operations.
+ ApprovalKey *string `json:"approvalKey,omitempty"`
+}
+
+func (PermissionDecisionApproveForLocationApprovalWorkflow) permissionDecisionApproveForLocationApproval() {
+}
+func (PermissionDecisionApproveForLocationApprovalWorkflow) Kind() PermissionDecisionApproveForLocationApprovalKind {
+ return PermissionDecisionApproveForLocationApprovalKindWorkflow
+}
+
// Location-scoped approval details for filesystem write operations.
// Experimental: PermissionDecisionApproveForLocationApprovalWrite is part of an
// experimental API and may change or be removed.
@@ -9421,21 +9113,6 @@ func (PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess) Kind
return PermissionDecisionApproveForSessionApprovalKindExtensionPermissionAccess
}
-// Session-scoped factory approval, optionally narrowed by approval key.
-// Experimental: PermissionDecisionApproveForSessionApprovalFactory is part of an
-// experimental API and may change or be removed.
-type PermissionDecisionApproveForSessionApprovalFactory struct {
- // Optional factory operation name or canonical approval key; when omitted, the approval
- // covers all factory operations.
- ApprovalKey *string `json:"approvalKey,omitempty"`
-}
-
-func (PermissionDecisionApproveForSessionApprovalFactory) permissionDecisionApproveForSessionApproval() {
-}
-func (PermissionDecisionApproveForSessionApprovalFactory) Kind() PermissionDecisionApproveForSessionApprovalKind {
- return PermissionDecisionApproveForSessionApprovalKindFactory
-}
-
// Session-scoped approval details for an MCP server tool, or all tools on the server when
// `toolName` is null.
// Experimental: PermissionDecisionApproveForSessionApprovalMCP is part of an experimental
@@ -9490,6 +9167,21 @@ func (PermissionDecisionApproveForSessionApprovalRead) Kind() PermissionDecision
return PermissionDecisionApproveForSessionApprovalKindRead
}
+// Session-scoped workflow approval, optionally narrowed by approval key.
+// Experimental: PermissionDecisionApproveForSessionApprovalWorkflow is part of an
+// experimental API and may change or be removed.
+type PermissionDecisionApproveForSessionApprovalWorkflow struct {
+ // Optional workflow operation name or canonical approval key; when omitted, the approval
+ // covers all workflow operations.
+ ApprovalKey *string `json:"approvalKey,omitempty"`
+}
+
+func (PermissionDecisionApproveForSessionApprovalWorkflow) permissionDecisionApproveForSessionApproval() {
+}
+func (PermissionDecisionApproveForSessionApprovalWorkflow) Kind() PermissionDecisionApproveForSessionApprovalKind {
+ return PermissionDecisionApproveForSessionApprovalKindWorkflow
+}
+
// Session-scoped approval details for filesystem write operations.
// Experimental: PermissionDecisionApproveForSessionApprovalWrite is part of an experimental
// API and may change or be removed.
@@ -9949,21 +9641,6 @@ func (PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess) Kind(
return PermissionsLocationsAddToolApprovalDetailsKindExtensionPermissionAccess
}
-// Location-persisted factory approval, optionally narrowed by approval key.
-// Experimental: PermissionsLocationsAddToolApprovalDetailsFactory is part of an
-// experimental API and may change or be removed.
-type PermissionsLocationsAddToolApprovalDetailsFactory struct {
- // Optional factory operation name or canonical approval key; when omitted, the approval
- // covers all factory operations.
- ApprovalKey *string `json:"approvalKey,omitempty"`
-}
-
-func (PermissionsLocationsAddToolApprovalDetailsFactory) permissionsLocationsAddToolApprovalDetails() {
-}
-func (PermissionsLocationsAddToolApprovalDetailsFactory) Kind() PermissionsLocationsAddToolApprovalDetailsKind {
- return PermissionsLocationsAddToolApprovalDetailsKindFactory
-}
-
// Location-persisted tool approval details for an MCP server tool, or all tools when
// `toolName` is null.
// Experimental: PermissionsLocationsAddToolApprovalDetailsMCP is part of an experimental
@@ -10017,6 +9694,21 @@ func (PermissionsLocationsAddToolApprovalDetailsRead) Kind() PermissionsLocation
return PermissionsLocationsAddToolApprovalDetailsKindRead
}
+// Location-persisted workflow approval, optionally narrowed by approval key.
+// Experimental: PermissionsLocationsAddToolApprovalDetailsWorkflow is part of an
+// experimental API and may change or be removed.
+type PermissionsLocationsAddToolApprovalDetailsWorkflow struct {
+ // Optional workflow operation name or canonical approval key; when omitted, the approval
+ // covers all workflow operations.
+ ApprovalKey *string `json:"approvalKey,omitempty"`
+}
+
+func (PermissionsLocationsAddToolApprovalDetailsWorkflow) permissionsLocationsAddToolApprovalDetails() {
+}
+func (PermissionsLocationsAddToolApprovalDetailsWorkflow) Kind() PermissionsLocationsAddToolApprovalDetailsKind {
+ return PermissionsLocationsAddToolApprovalDetailsKindWorkflow
+}
+
// Location-persisted tool approval details for filesystem write operations.
// Experimental: PermissionsLocationsAddToolApprovalDetailsWrite is part of an experimental
// API and may change or be removed.
@@ -10752,6 +10444,18 @@ type ProviderConfigAzure struct {
APIVersion *string `json:"apiVersion,omitempty"`
}
+// A provider offered for interactive login.
+// Experimental: ProviderDescriptor is part of an experimental API and may change or be
+// removed.
+type ProviderDescriptor struct {
+ // Whether this provider is currently available to sign in with.
+ Available bool `json:"available"`
+ // The neutral provider kind.
+ Kind LoginProviderKind `json:"kind"`
+ // Human-readable menu label, owned by the runtime so every consumer renders identical text.
+ Label string `json:"label"`
+}
+
// A snapshot of the provider endpoint the session is currently configured to talk to.
// Experimental: ProviderEndpoint is part of an experimental API and may change or be
// removed.
@@ -11894,19 +11598,6 @@ type ResponseFormat struct {
Type ResponseFormatType `json:"type"`
}
-// Options controlling factory invocation.
-// Experimental: RunOptions is part of an experimental API and may change or be removed.
-type RunOptions struct {
- // Per-invocation resource ceiling overrides.
- Limits *FactoryRunLimits `json:"limits,omitempty"`
- // Whether to emit factory phase names to the session transcript.
- LogPhaseNames *bool `json:"logPhaseNames,omitempty"`
- // Whether to notify the originating session when the factory completes.
- NotifyOnComplete *bool `json:"notifyOnComplete,omitempty"`
- // Run identifier whose journal and progress should seed this resumed run.
- ResumeFromRunID *string `json:"resumeFromRunId,omitempty"`
-}
-
// Experimental: RuntimeShutdownResult is part of an experimental API and may change or be
// removed.
type RuntimeShutdownResult struct {
@@ -12548,6 +12239,11 @@ type ServerSkillList struct {
Skills []ServerSkill `json:"skills"`
}
+// Experimental: SessionAccountsLoginCancelResult is part of an experimental API and may
+// change or be removed.
+type SessionAccountsLoginCancelResult struct {
+}
+
// Current activity flags for the session.
// Experimental: SessionActivity is part of an experimental API and may change or be removed.
type SessionActivity struct {
@@ -12877,13 +12573,6 @@ type SessionExtensionsReloadResult struct {
type SessionExtensionsSendAttachmentsToMessageResult struct {
}
-// Experimental: SessionFactoryPauseAtCheckpointResult is part of an experimental API and
-// may change or be removed.
-type SessionFactoryPauseAtCheckpointResult struct {
- // Whether this execution attempt must pause or may continue.
- Action FactoryPauseCheckpointAction `json:"action"`
-}
-
// File path, content to append, and optional mode for the client-provided session
// filesystem. Implementations create parent directories as needed.
// Experimental: SessionFSAppendFileRequest is part of an experimental API and may change or
@@ -15879,6 +15568,8 @@ func (SlashCommandSelectSubcommandResult) Kind() SlashCommandInvocationResultKin
// Experimental: SlashCommandSetModelResult is part of an experimental API and may change or
// be removed.
type SlashCommandSetModelResult struct {
+ // Auto routing profile selected by the command, when the model is Auto.
+ AutoTier *AutoTier `json:"autoTier,omitempty"`
// Model selected by the command.
Model string `json:"model"`
// Reasoning effort selected for the model.
@@ -17622,19 +17313,6 @@ func (UserToolSessionApprovalExtensionPermissionAccess) Kind() UserToolSessionAp
return UserToolSessionApprovalKindExtensionPermissionAccess
}
-// Session-scoped factory approval, optionally narrowed by approval key.
-// Experimental: UserToolSessionApprovalFactory is part of an experimental API and may
-// change or be removed.
-type UserToolSessionApprovalFactory struct {
- // Optional factory operation name or canonical approval key
- ApprovalKey *string `json:"approvalKey,omitempty"`
-}
-
-func (UserToolSessionApprovalFactory) userToolSessionApproval() {}
-func (UserToolSessionApprovalFactory) Kind() UserToolSessionApprovalKind {
- return UserToolSessionApprovalKindFactory
-}
-
// Session-scoped tool-approval rule for an MCP server tool, or all tools on the server when
// `toolName` is null.
// Experimental: UserToolSessionApprovalMCP is part of an experimental API and may change or
@@ -17673,6 +17351,19 @@ func (UserToolSessionApprovalRead) Kind() UserToolSessionApprovalKind {
return UserToolSessionApprovalKindRead
}
+// Session-scoped workflow approval, optionally narrowed by approval key.
+// Experimental: UserToolSessionApprovalWorkflow is part of an experimental API and may
+// change or be removed.
+type UserToolSessionApprovalWorkflow struct {
+ // Optional workflow operation name or canonical approval key
+ ApprovalKey *string `json:"approvalKey,omitempty"`
+}
+
+func (UserToolSessionApprovalWorkflow) userToolSessionApproval() {}
+func (UserToolSessionApprovalWorkflow) Kind() UserToolSessionApprovalKind {
+ return UserToolSessionApprovalKindWorkflow
+}
+
// Session-scoped tool-approval rule for filesystem write operations.
// Experimental: UserToolSessionApprovalWrite is part of an experimental API and may change
// or be removed.
@@ -18846,6 +18537,26 @@ const (
AbortReasonUserInitiated AbortReason = "user_initiated"
)
+// The provider kind stamped on a signed-in account.
+// Experimental: AccountKind is part of an experimental API and may change or be removed.
+type AccountKind string
+
+const (
+ // A base Microsoft Entra identity.
+ AccountKindEntra AccountKind = "entra"
+ // A GitHub (EMU) account derived from a base Entra identity.
+ AccountKindEntraEmu AccountKind = "entraEmu"
+ // An OAuth github.com account.
+ AccountKindGitHubDotCom AccountKind = "githubDotCom"
+ // A Microsoft 365 Copilot (Loki) inference account derived from the same base Entra
+ // identity as an EMU account; its bearer is a Loki-scoped inference token consumed through
+ // the model-provider path, not the GitHub switcher.
+ AccountKindLoki AccountKind = "loki"
+ // A GitHub Enterprise Cloud account — a GitHub account on a non-github.com host, e.g.
+ // *.ghe.com.
+ AccountKindProxima AccountKind = "proxima"
+)
+
// Resolved Anthropic adaptive-thinking capability for a model.
// Experimental: AdaptiveThinkingSupport is part of an experimental API and may change or be
// removed.
@@ -19079,6 +18790,26 @@ const (
AttachmentTypeSelection AttachmentType = "selection"
)
+// Kind discriminator for AuthEnumerateQuery.
+// Experimental: AuthEnumerateQueryKind is part of an experimental API and may change or be
+// removed.
+type AuthEnumerateQueryKind string
+
+const (
+ AuthEnumerateQueryKindAccounts AuthEnumerateQueryKind = "accounts"
+ AuthEnumerateQueryKindProviders AuthEnumerateQueryKind = "providers"
+)
+
+// Kind discriminator for AuthEnumerateValue.
+// Experimental: AuthEnumerateValueKind is part of an experimental API and may change or be
+// removed.
+type AuthEnumerateValueKind string
+
+const (
+ AuthEnumerateValueKindAccounts AuthEnumerateValueKind = "accounts"
+ AuthEnumerateValueKindProviders AuthEnumerateValueKind = "providers"
+)
+
// Type discriminator for AuthInfo.
// Experimental: AuthInfoType is part of an experimental API and may change or be removed.
type AuthInfoType string
@@ -19094,6 +18825,66 @@ const (
AuthInfoTypeUser AuthInfoType = "user"
)
+// Terminal disposition of a login persistence attempt.
+// Experimental: AuthLoginResultStatus is part of an experimental API and may change or be
+// removed.
+type AuthLoginResultStatus string
+
+const (
+ // The credential was persisted and the account is signed in.
+ AuthLoginResultStatusCompleted AuthLoginResultStatus = "completed"
+ // The user declined plaintext persistence.
+ AuthLoginResultStatusDeclined AuthLoginResultStatus = "declined"
+ // Persistence needs explicit consent to store the token in plaintext.
+ AuthLoginResultStatusNeedsPlaintextConsent AuthLoginResultStatus = "needs-plaintext-consent"
+)
+
+// Kind discriminator for AuthLoginStep.
+// Experimental: AuthLoginStepKind is part of an experimental API and may change or be
+// removed.
+type AuthLoginStepKind string
+
+const (
+ AuthLoginStepKindAwaiting AuthLoginStepKind = "awaiting"
+ AuthLoginStepKindCompleted AuthLoginStepKind = "completed"
+ AuthLoginStepKindError AuthLoginStepKind = "error"
+ AuthLoginStepKindInputRequired AuthLoginStepKind = "input-required"
+ AuthLoginStepKindNeedsInteraction AuthLoginStepKind = "needs-interaction"
+ AuthLoginStepKindOpenURL AuthLoginStepKind = "open-url"
+)
+
+// Kind discriminator for AuthReadQuery.
+// Experimental: AuthReadQueryKind is part of an experimental API and may change or be
+// removed.
+type AuthReadQueryKind string
+
+const (
+ AuthReadQueryKindActiveAccount AuthReadQueryKind = "activeAccount"
+ AuthReadQueryKindLastErrors AuthReadQueryKind = "lastErrors"
+ AuthReadQueryKindStatus AuthReadQueryKind = "status"
+)
+
+// Kind discriminator for AuthReadValue.
+// Experimental: AuthReadValueKind is part of an experimental API and may change or be
+// removed.
+type AuthReadValueKind string
+
+const (
+ AuthReadValueKindActiveAccount AuthReadValueKind = "activeAccount"
+ AuthReadValueKindLastErrors AuthReadValueKind = "lastErrors"
+ AuthReadValueKindStatus AuthReadValueKind = "status"
+)
+
+// Kind discriminator for AuthWrite.
+// Experimental: AuthWriteKind is part of an experimental API and may change or be removed.
+type AuthWriteKind string
+
+const (
+ AuthWriteKindLogout AuthWriteKind = "logout"
+ AuthWriteKindSetCredentials AuthWriteKind = "setCredentials"
+ AuthWriteKindSwitchActive AuthWriteKind = "switchActive"
+)
+
// Current normalized autopilot objective lifecycle status.
// Experimental: AutopilotObjectiveStatus is part of an experimental API and may change or
// be removed.
@@ -20177,133 +19968,6 @@ const (
ExternalToolTextResultForLlmContentTypeText ExternalToolTextResultForLlmContentType = "text"
)
-// Execution-critical factory storage operation.
-// Experimental: FactoryDurableOperation is part of an experimental API and may change or be
-// removed.
-type FactoryDurableOperation string
-
-const (
- // Persisting active execution time.
- FactoryDurableOperationAddElapsed FactoryDurableOperation = "addElapsed"
- // Persisting an idempotent model-usage charge.
- FactoryDurableOperationChargeCredit FactoryDurableOperation = "chargeCredit"
- // Creating the durable run and declared phases.
- FactoryDurableOperationCreateRun FactoryDurableOperation = "createRun"
- // Persisting the terminal run envelope.
- FactoryDurableOperationFinishRun FactoryDurableOperation = "finishRun"
- // Reading a journal entry without treating storage failure as a cache miss.
- FactoryDurableOperationJournalGet FactoryDurableOperation = "journalGet"
- // Persisting a journal entry before reporting success.
- FactoryDurableOperationJournalPut FactoryDurableOperation = "journalPut"
- // Persisting the transition to running.
- FactoryDurableOperationMarkRunStarted FactoryDurableOperation = "markRunStarted"
- // Reading the authoritative AI-credit total.
- FactoryDurableOperationReconcileCreditTotal FactoryDurableOperation = "reconcileCreditTotal"
- // Renewing the durable owner lease that proves this process still owns the run.
- FactoryDurableOperationRefreshLease FactoryDurableOperation = "refreshLease"
- // Rolling back an uncommitted subagent admission.
- FactoryDurableOperationReleaseAgent FactoryDurableOperation = "releaseAgent"
- // Persisting subagent admission accounting.
- FactoryDurableOperationReserveAgent FactoryDurableOperation = "reserveAgent"
-)
-
-// Kind of factory progress line.
-// Experimental: FactoryLogLineKind is part of an experimental API and may change or be
-// removed.
-type FactoryLogLineKind string
-
-const (
- // A narrator log line.
- FactoryLogLineKindLog FactoryLogLineKind = "log"
- // A named factory phase marker.
- FactoryLogLineKindPhase FactoryLogLineKind = "phase"
-)
-
-// Action the runtime selected for a durable factory pause checkpoint.
-// Experimental: FactoryPauseCheckpointAction is part of an experimental API and may change
-// or be removed.
-type FactoryPauseCheckpointAction string
-
-const (
- // The checkpoint was committed by a prior paused attempt, so execution may continue.
- FactoryPauseCheckpointActionContinue FactoryPauseCheckpointAction = "continue"
- // This attempt claimed the checkpoint and must cooperatively stop.
- FactoryPauseCheckpointActionPause FactoryPauseCheckpointAction = "pause"
-)
-
-// Type discriminator for FactoryPauseInfo.
-type FactoryPauseInfoType string
-
-const (
- FactoryPauseInfoTypeCheckpoint FactoryPauseInfoType = "checkpoint"
- FactoryPauseInfoTypeUser FactoryPauseInfoType = "user"
-)
-
-// Derived lifecycle state of a factory phase.
-// Experimental: FactoryPhaseStatus is part of an experimental API and may change or be
-// removed.
-type FactoryPhaseStatus string
-
-const (
- // The phase is currently entered and accumulating active time.
- FactoryPhaseStatusActive FactoryPhaseStatus = "active"
- // The phase was entered and has since been closed.
- FactoryPhaseStatusCompleted FactoryPhaseStatus = "completed"
- // The phase has not been entered yet.
- FactoryPhaseStatusPending FactoryPhaseStatus = "pending"
- // The phase was never entered because a later phase was entered or the run reached a
- // terminal state.
- FactoryPhaseStatusSkipped FactoryPhaseStatus = "skipped"
-)
-
-// Cumulative resource ceiling that stopped a factory run.
-// Experimental: FactoryRunFailureKind is part of an experimental API and may change or be
-// removed.
-type FactoryRunFailureKind string
-
-const (
- // The run's settled subagent model usage exceeded the approved AI-credit ceiling, or no
- // headroom remained for another subagent.
- FactoryRunFailureKindMaxAiCredits FactoryRunFailureKind = "maxAiCredits"
- // The run admitted the approved maximum total number of subagents.
- FactoryRunFailureKindMaxTotalSubagents FactoryRunFailureKind = "maxTotalSubagents"
- // The run reached the approved accumulated active-execution time in seconds.
- FactoryRunFailureKindTimeoutSeconds FactoryRunFailureKind = "timeoutSeconds"
-)
-
-// Type discriminator for FactoryRunFailure.
-type FactoryRunFailureType string
-
-const (
- FactoryRunFailureTypeFactoryAccountingIncomplete FactoryRunFailureType = "factory_accounting_incomplete"
- FactoryRunFailureTypeFactoryDurableFailure FactoryRunFailureType = "factory_durable_failure"
- FactoryRunFailureTypeFactoryLimitReached FactoryRunFailureType = "factory_limit_reached"
- FactoryRunFailureTypeFactoryProviderDisconnected FactoryRunFailureType = "factory_provider_disconnected"
- FactoryRunFailureTypeFactoryResumeDeclined FactoryRunFailureType = "factory_resume_declined"
-)
-
-// Current or terminal state of a factory run.
-// Experimental: FactoryRunStatus is part of an experimental API and may change or be
-// removed.
-type FactoryRunStatus string
-
-const (
- // The run was cancelled before completion.
- FactoryRunStatusCancelled FactoryRunStatus = "cancelled"
- // The run completed successfully.
- FactoryRunStatusCompleted FactoryRunStatus = "completed"
- // The factory body failed or reached a cumulative resource ceiling.
- FactoryRunStatusError FactoryRunStatus = "error"
- // The run was interrupted while resource budget remained.
- FactoryRunStatusHalted FactoryRunStatus = "halted"
- // The current attempt stopped intentionally and the run may be resumed.
- FactoryRunStatusPaused FactoryRunStatus = "paused"
- // The run was minted and is awaiting approval.
- FactoryRunStatusPending FactoryRunStatus = "pending"
- // The run is executing.
- FactoryRunStatusRunning FactoryRunStatus = "running"
-)
-
// Why the runtime is requesting a GitHub credential.
// Experimental: GitHubTokenAcquireReason is part of an experimental API and may change or
// be removed.
@@ -20619,6 +20283,21 @@ const (
LlmInferenceHTTPRequestStartTransportWebsocket LlmInferenceHTTPRequestStartTransport = "websocket"
)
+// A provider a consumer may interactively sign in with.
+// Experimental: LoginProviderKind is part of an experimental API and may change or be
+// removed.
+type LoginProviderKind string
+
+const (
+ // Microsoft Entra sign-in that derives a GitHub (EMU) credential.
+ LoginProviderKindEntra LoginProviderKind = "entra"
+ // OAuth github.com sign-in via the browser (web loopback + PKCE).
+ LoginProviderKindGitHubDotCom LoginProviderKind = "githubDotCom"
+ // A GitHub Enterprise Cloud account — a GitHub account on a non-github.com host, e.g.
+ // *.ghe.com; the host is supplied interactively through the neutral input-required step.
+ LoginProviderKindProxima LoginProviderKind = "proxima"
+)
+
// Summary of which managed-settings channels contributed to the effective session policy.
// Use the per-channel booleans for exact provenance.
// Experimental: ManagedSettingsResolvedSource is part of an experimental API and may change
@@ -21289,6 +20968,8 @@ const (
// The runtime selected the model automatically, such as rate-limit recovery or refusal
// fallback.
ModelChangeSourceAutomatic ModelChangeSource = "automatic"
+ // The user accepted a CAPI-issued Auto tier recommendation.
+ ModelChangeSourceAutoTierRecommendation ModelChangeSource = "auto_tier_recommendation"
// The user selected the promoted model from the changeboarding card or its keyboard
// shortcut.
ModelChangeSourceChangeboardingShortcut ModelChangeSource = "changeboarding_shortcut"
@@ -21465,11 +21146,11 @@ const (
PermissionDecisionApproveForLocationApprovalKindExtensionEnvAccess PermissionDecisionApproveForLocationApprovalKind = "extension-env-access"
PermissionDecisionApproveForLocationApprovalKindExtensionManagement PermissionDecisionApproveForLocationApprovalKind = "extension-management"
PermissionDecisionApproveForLocationApprovalKindExtensionPermissionAccess PermissionDecisionApproveForLocationApprovalKind = "extension-permission-access"
- PermissionDecisionApproveForLocationApprovalKindFactory PermissionDecisionApproveForLocationApprovalKind = "factory"
PermissionDecisionApproveForLocationApprovalKindMCP PermissionDecisionApproveForLocationApprovalKind = "mcp"
PermissionDecisionApproveForLocationApprovalKindMCPSampling PermissionDecisionApproveForLocationApprovalKind = "mcp-sampling"
PermissionDecisionApproveForLocationApprovalKindMemory PermissionDecisionApproveForLocationApprovalKind = "memory"
PermissionDecisionApproveForLocationApprovalKindRead PermissionDecisionApproveForLocationApprovalKind = "read"
+ PermissionDecisionApproveForLocationApprovalKindWorkflow PermissionDecisionApproveForLocationApprovalKind = "workflow"
PermissionDecisionApproveForLocationApprovalKindWrite PermissionDecisionApproveForLocationApprovalKind = "write"
)
@@ -21482,11 +21163,11 @@ const (
PermissionDecisionApproveForSessionApprovalKindExtensionEnvAccess PermissionDecisionApproveForSessionApprovalKind = "extension-env-access"
PermissionDecisionApproveForSessionApprovalKindExtensionManagement PermissionDecisionApproveForSessionApprovalKind = "extension-management"
PermissionDecisionApproveForSessionApprovalKindExtensionPermissionAccess PermissionDecisionApproveForSessionApprovalKind = "extension-permission-access"
- PermissionDecisionApproveForSessionApprovalKindFactory PermissionDecisionApproveForSessionApprovalKind = "factory"
PermissionDecisionApproveForSessionApprovalKindMCP PermissionDecisionApproveForSessionApprovalKind = "mcp"
PermissionDecisionApproveForSessionApprovalKindMCPSampling PermissionDecisionApproveForSessionApprovalKind = "mcp-sampling"
PermissionDecisionApproveForSessionApprovalKindMemory PermissionDecisionApproveForSessionApprovalKind = "memory"
PermissionDecisionApproveForSessionApprovalKindRead PermissionDecisionApproveForSessionApprovalKind = "read"
+ PermissionDecisionApproveForSessionApprovalKindWorkflow PermissionDecisionApproveForSessionApprovalKind = "workflow"
PermissionDecisionApproveForSessionApprovalKindWrite PermissionDecisionApproveForSessionApprovalKind = "write"
)
@@ -21533,9 +21214,8 @@ type PermissionDecisionSource string
const (
// The response followed the assisted-approval judge recommendation.
PermissionDecisionSourceAssistedApproval PermissionDecisionSource = "assisted_approval"
- // A live authorization record from an earlier human decision in this session contained the
- // proposal, so it ran without another prompt. This is not a new human decision and never
- // mints authority of its own.
+ // Historical compatibility value for sessions created while authorization carry-forward was
+ // executable. Current runtimes do not produce this source.
PermissionDecisionSourceAuthorizationCarryForward PermissionDecisionSource = "authorization_carry_forward"
// The host applied a standing policy or override rather than a judge recommendation or
// human decision.
@@ -21601,7 +21281,8 @@ const (
PermissionModeSourceAutopilotConfirmation PermissionModeSource = "autopilot_confirmation"
// The mode was set from a CLI command-line flag.
PermissionModeSourceCLIFlag PermissionModeSource = "cli_flag"
- // The mode was set at startup by authenticated organization targeting.
+ // Historical compatibility value for runtimes that selected Assisted mode through
+ // organization targeting. Current runtimes do not produce this source.
PermissionModeSourceOrganizationTargeting PermissionModeSource = "organization_targeting"
// The mode was set through an RPC caller.
PermissionModeSourceRPC PermissionModeSource = "rpc"
@@ -21753,11 +21434,11 @@ const (
PermissionsLocationsAddToolApprovalDetailsKindExtensionEnvAccess PermissionsLocationsAddToolApprovalDetailsKind = "extension-env-access"
PermissionsLocationsAddToolApprovalDetailsKindExtensionManagement PermissionsLocationsAddToolApprovalDetailsKind = "extension-management"
PermissionsLocationsAddToolApprovalDetailsKindExtensionPermissionAccess PermissionsLocationsAddToolApprovalDetailsKind = "extension-permission-access"
- PermissionsLocationsAddToolApprovalDetailsKindFactory PermissionsLocationsAddToolApprovalDetailsKind = "factory"
PermissionsLocationsAddToolApprovalDetailsKindMCP PermissionsLocationsAddToolApprovalDetailsKind = "mcp"
PermissionsLocationsAddToolApprovalDetailsKindMCPSampling PermissionsLocationsAddToolApprovalDetailsKind = "mcp-sampling"
PermissionsLocationsAddToolApprovalDetailsKindMemory PermissionsLocationsAddToolApprovalDetailsKind = "memory"
PermissionsLocationsAddToolApprovalDetailsKindRead PermissionsLocationsAddToolApprovalDetailsKind = "read"
+ PermissionsLocationsAddToolApprovalDetailsKindWorkflow PermissionsLocationsAddToolApprovalDetailsKind = "workflow"
PermissionsLocationsAddToolApprovalDetailsKindWrite PermissionsLocationsAddToolApprovalDetailsKind = "write"
)
@@ -23087,10 +22768,10 @@ const (
UserToolSessionApprovalKindExtensionEnvAccess UserToolSessionApprovalKind = "extension-env-access"
UserToolSessionApprovalKindExtensionManagement UserToolSessionApprovalKind = "extension-management"
UserToolSessionApprovalKindExtensionPermissionAccess UserToolSessionApprovalKind = "extension-permission-access"
- UserToolSessionApprovalKindFactory UserToolSessionApprovalKind = "factory"
UserToolSessionApprovalKindMCP UserToolSessionApprovalKind = "mcp"
UserToolSessionApprovalKindMemory UserToolSessionApprovalKind = "memory"
UserToolSessionApprovalKindRead UserToolSessionApprovalKind = "read"
+ UserToolSessionApprovalKindWorkflow UserToolSessionApprovalKind = "workflow"
UserToolSessionApprovalKindWrite UserToolSessionApprovalKind = "write"
)
@@ -25413,6 +25094,165 @@ type sessionAPI struct {
sessionID string
}
+// Experimental: AccountsAPI contains experimental APIs that may change or be removed.
+type AccountsAPI sessionAPI
+
+// Enumerate a typed accounts collection: the signed-in accounts, or the providers offered
+// for interactive login.
+//
+// RPC method: session.accounts.enumerate.
+//
+// Parameters: Enumerate request carrying the typed collection query.
+//
+// Returns: The enumerated collection, keyed by the same selector as the query.
+func (a *AccountsAPI) Enumerate(ctx context.Context, params *AccountsEnumerateRequest) (AuthEnumerateValue, error) {
+ req := map[string]any{"sessionId": a.sessionID}
+ if params != nil {
+ req["query"] = params.Query
+ }
+ raw, err := a.client.Request(ctx, "session.accounts.enumerate", req)
+ if err != nil {
+ return nil, err
+ }
+ result, err := unmarshalAuthEnumerateValue(raw)
+ if err != nil {
+ return nil, err
+ }
+ return result, nil
+}
+
+// Get read one typed accounts datum: the active account, a neutral status summary, or the
+// last authentication errors.
+//
+// RPC method: session.accounts.get.
+//
+// Parameters: Read request carrying the typed datum query.
+//
+// Returns: The read result, keyed by the same selector as the query.
+func (a *AccountsAPI) Get(ctx context.Context, params *AccountsGetRequest) (AuthReadValue, error) {
+ req := map[string]any{"sessionId": a.sessionID}
+ if params != nil {
+ req["query"] = params.Query
+ }
+ raw, err := a.client.Request(ctx, "session.accounts.get", req)
+ if err != nil {
+ return nil, err
+ }
+ result, err := unmarshalAuthReadValue(raw)
+ if err != nil {
+ return nil, err
+ }
+ return result, nil
+}
+
+// Set apply one non-interactive accounts mutation: switch the active account, log an
+// account out, or set credentials from a token.
+//
+// RPC method: session.accounts.set.
+//
+// Parameters: Mutation request carrying the typed write command.
+//
+// Returns: Result of a non-interactive accounts mutation.
+func (a *AccountsAPI) Set(ctx context.Context, params *AccountsSetRequest) (*AuthWriteResult, error) {
+ req := map[string]any{"sessionId": a.sessionID}
+ if params != nil {
+ req["command"] = params.Command
+ }
+ raw, err := a.client.Request(ctx, "session.accounts.set", req)
+ if err != nil {
+ return nil, err
+ }
+ var result AuthWriteResult
+ if err := json.Unmarshal(raw, &result); err != nil {
+ return nil, err
+ }
+ return &result, nil
+}
+
+// Experimental: AccountsLoginAPI contains experimental APIs that may change or be removed.
+type AccountsLoginAPI sessionAPI
+
+// Advance an in-flight login flow, optionally fulfilling an input-required step, and return
+// the next step.
+//
+// RPC method: session.accounts.login.advance.
+//
+// Parameters: Advance an in-flight login flow, optionally fulfilling an input-required step.
+//
+// Returns: One step in an interactive login flow. The consumer acts on the step and calls
+// advance to proceed. Browser-open is encoded as two distinct steps by design: `open-url`
+// is CONSUMER-driven (the provider surfaces the authorize URL and the consumer opens it —
+// github.com/GHEC web), while `needs-interaction` is PROVIDER-driven (the provider opens
+// the browser or broker UI itself and does not surface a URL — Entra).
+func (a *AccountsLoginAPI) Advance(ctx context.Context, params *AuthLoginAdvanceRequest) (AuthLoginStep, error) {
+ req := map[string]any{"sessionId": a.sessionID}
+ if params != nil {
+ req["flowId"] = params.FlowID
+ if params.Input != nil {
+ req["input"] = *params.Input
+ }
+ }
+ raw, err := a.client.Request(ctx, "session.accounts.login.advance", req)
+ if err != nil {
+ return nil, err
+ }
+ result, err := unmarshalAuthLoginStep(raw)
+ if err != nil {
+ return nil, err
+ }
+ return result, nil
+}
+
+// Begin an interactive login flow for a provider kind (dispatch is kind-only) and return
+// its opaque flow id and first step.
+//
+// RPC method: session.accounts.login.begin.
+//
+// Parameters: Begin an interactive login flow for a provider kind. Dispatch is kind-only.
+//
+// Returns: A started login flow: its opaque id and first step.
+func (a *AccountsLoginAPI) Begin(ctx context.Context, params *AuthLoginBeginRequest) (*AuthLoginBegun, error) {
+ req := map[string]any{"sessionId": a.sessionID}
+ if params != nil {
+ req["kind"] = params.Kind
+ }
+ raw, err := a.client.Request(ctx, "session.accounts.login.begin", req)
+ if err != nil {
+ return nil, err
+ }
+ var result AuthLoginBegun
+ if err := json.Unmarshal(raw, &result); err != nil {
+ return nil, err
+ }
+ return &result, nil
+}
+
+// Cancel an in-flight login flow and release its resources.
+//
+// RPC method: session.accounts.login.cancel.
+//
+// Parameters: Cancel an in-flight login flow.
+func (a *AccountsLoginAPI) Cancel(ctx context.Context, params *AuthLoginCancelRequest) (*SessionAccountsLoginCancelResult, error) {
+ req := map[string]any{"sessionId": a.sessionID}
+ if params != nil {
+ req["flowId"] = params.FlowID
+ }
+ raw, err := a.client.Request(ctx, "session.accounts.login.cancel", req)
+ if err != nil {
+ return nil, err
+ }
+ var result SessionAccountsLoginCancelResult
+ if err := json.Unmarshal(raw, &result); err != nil {
+ return nil, err
+ }
+ return &result, nil
+}
+
+// Experimental: Login returns experimental APIs that may change or be removed.
+func (s *AccountsAPI) Login() *AccountsLoginAPI {
+ return (*AccountsLoginAPI)(s)
+}
+
// Experimental: AgentAPI contains experimental APIs that may change or be removed.
type AgentAPI sessionAPI
@@ -26525,336 +26365,6 @@ func (a *ExtensionsAPI) SendAttachmentsToMessage(ctx context.Context, params *Se
return &result, nil
}
-// Experimental: FactoryAPI contains experimental APIs that may change or be removed.
-type FactoryAPI sessionAPI
-
-// Agent runs one factory-scoped subagent and returns its result.
-//
-// RPC method: session.factory.agent.
-//
-// Parameters: Parameters for one factory-scoped subagent call.
-//
-// Returns: Result of one factory-scoped subagent call.
-func (a *FactoryAPI) Agent(ctx context.Context, params *FactoryAgentRequest) (*FactoryAgentResult, error) {
- req := map[string]any{"sessionId": a.sessionID}
- if params != nil {
- req["executionToken"] = params.ExecutionToken
- req["factoryRunId"] = params.FactoryRunID
- req["opts"] = params.Opts
- req["prompt"] = params.Prompt
- }
- raw, err := a.client.Request(ctx, "session.factory.agent", req)
- if err != nil {
- return nil, err
- }
- var result FactoryAgentResult
- if err := json.Unmarshal(raw, &result); err != nil {
- return nil, err
- }
- return &result, nil
-}
-
-// Cancel requests cancellation of a factory run and returns its run envelope.
-//
-// RPC method: session.factory.cancel.
-//
-// Parameters: Parameters for cancelling a factory run.
-//
-// Returns: Complete current or terminal factory run envelope.
-func (a *FactoryAPI) Cancel(ctx context.Context, params *FactoryCancelRequest) (*FactoryRunResult, error) {
- req := map[string]any{"sessionId": a.sessionID}
- if params != nil {
- req["runId"] = params.RunID
- }
- raw, err := a.client.Request(ctx, "session.factory.cancel", req)
- if err != nil {
- return nil, err
- }
- var result FactoryRunResult
- if err := json.Unmarshal(raw, &result); err != nil {
- return nil, err
- }
- return &result, nil
-}
-
-// GetRun gets the current or settled envelope for a factory run.
-//
-// RPC method: session.factory.getRun.
-//
-// Parameters: Parameters for retrieving a factory run.
-//
-// Returns: Complete current or terminal factory run envelope.
-func (a *FactoryAPI) GetRun(ctx context.Context, params *FactoryGetRunRequest) (*FactoryRunResult, error) {
- req := map[string]any{"sessionId": a.sessionID}
- if params != nil {
- req["runId"] = params.RunID
- }
- raw, err := a.client.Request(ctx, "session.factory.getRun", req)
- if err != nil {
- return nil, err
- }
- var result FactoryRunResult
- if err := json.Unmarshal(raw, &result); err != nil {
- return nil, err
- }
- return &result, nil
-}
-
-// GetRunDetail gets durable and live observability detail for one factory run.
-//
-// RPC method: session.factory.getRunDetail.
-//
-// Parameters: Parameters for retrieving a factory run.
-//
-// Returns: Full factory run observability detail.
-func (a *FactoryAPI) GetRunDetail(ctx context.Context, params *FactoryGetRunRequest) (*FactoryRunDetail, error) {
- req := map[string]any{"sessionId": a.sessionID}
- if params != nil {
- req["runId"] = params.RunID
- }
- raw, err := a.client.Request(ctx, "session.factory.getRunDetail", req)
- if err != nil {
- return nil, err
- }
- var result FactoryRunDetail
- if err := json.Unmarshal(raw, &result); err != nil {
- return nil, err
- }
- return &result, nil
-}
-
-// GetRunProgress pages durable progress for one factory run.
-//
-// RPC method: session.factory.getRunProgress.
-//
-// Parameters: Parameters for paging factory progress.
-//
-// Returns: A bidirectional page of factory progress.
-func (a *FactoryAPI) GetRunProgress(ctx context.Context, params *FactoryGetRunProgressRequest) (*FactoryProgressPage, error) {
- req := map[string]any{"sessionId": a.sessionID}
- if params != nil {
- if params.AfterSeq != nil {
- req["afterSeq"] = *params.AfterSeq
- }
- if params.BeforeSeq != nil {
- req["beforeSeq"] = *params.BeforeSeq
- }
- if params.Limit != nil {
- req["limit"] = *params.Limit
- }
- if params.PhaseID != nil {
- req["phaseId"] = *params.PhaseID
- }
- req["runId"] = params.RunID
- }
- raw, err := a.client.Request(ctx, "session.factory.getRunProgress", req)
- if err != nil {
- return nil, err
- }
- var result FactoryProgressPage
- if err := json.Unmarshal(raw, &result); err != nil {
- return nil, err
- }
- return &result, nil
-}
-
-// ListRuns lists durable factory runs for this session in creation order.
-//
-// RPC method: session.factory.listRuns.
-//
-// Parameters: Parameters for paging factory runs.
-//
-// Returns: A page of factory runs in durable creation order.
-func (a *FactoryAPI) ListRuns(ctx context.Context, params *FactoryListRunsRequest) (*FactoryListRunsResult, error) {
- req := map[string]any{"sessionId": a.sessionID}
- if params != nil {
- if params.AfterSeq != nil {
- req["afterSeq"] = *params.AfterSeq
- }
- if params.BeforeSeq != nil {
- req["beforeSeq"] = *params.BeforeSeq
- }
- if params.Limit != nil {
- req["limit"] = *params.Limit
- }
- }
- raw, err := a.client.Request(ctx, "session.factory.listRuns", req)
- if err != nil {
- return nil, err
- }
- var result FactoryListRunsResult
- if err := json.Unmarshal(raw, &result); err != nil {
- return nil, err
- }
- return &result, nil
-}
-
-// Log records a batch of ordered factory progress lines.
-//
-// RPC method: session.factory.log.
-//
-// Parameters: Parameters for recording factory progress.
-//
-// Returns: Acknowledgement that a factory request was accepted.
-func (a *FactoryAPI) Log(ctx context.Context, params *FactoryLogRequest) (*FactoryAckResult, error) {
- req := map[string]any{"sessionId": a.sessionID}
- if params != nil {
- req["executionToken"] = params.ExecutionToken
- req["lines"] = params.Lines
- req["runId"] = params.RunID
- }
- raw, err := a.client.Request(ctx, "session.factory.log", req)
- if err != nil {
- return nil, err
- }
- var result FactoryAckResult
- if err := json.Unmarshal(raw, &result); err != nil {
- return nil, err
- }
- return &result, nil
-}
-
-// Pauses a running factory and returns its settled run envelope.
-//
-// RPC method: session.factory.pause.
-//
-// Parameters: Parameters for pausing a running factory.
-//
-// Returns: Complete current or terminal factory run envelope.
-func (a *FactoryAPI) Pause(ctx context.Context, params *FactoryPauseRequest) (*FactoryRunResult, error) {
- req := map[string]any{"sessionId": a.sessionID}
- if params != nil {
- req["runId"] = params.RunID
- }
- raw, err := a.client.Request(ctx, "session.factory.pause", req)
- if err != nil {
- return nil, err
- }
- var result FactoryRunResult
- if err := json.Unmarshal(raw, &result); err != nil {
- return nil, err
- }
- return &result, nil
-}
-
-// Resumes a factory run using its persisted name, arguments, journal, and accounting.
-//
-// RPC method: session.factory.resume.
-//
-// Parameters: Parameters for resuming a factory run from its persisted identity.
-//
-// Returns: Resolved persisted factory identity and resumed run envelope.
-func (a *FactoryAPI) Resume(ctx context.Context, params *FactoryResumeRequest) (*FactoryResumeResult, error) {
- req := map[string]any{"sessionId": a.sessionID}
- if params != nil {
- if params.Limits != nil {
- req["limits"] = *params.Limits
- }
- if params.LogPhaseNames != nil {
- req["logPhaseNames"] = *params.LogPhaseNames
- }
- if params.NotifyOnComplete != nil {
- req["notifyOnComplete"] = *params.NotifyOnComplete
- }
- req["runId"] = params.RunID
- }
- raw, err := a.client.Request(ctx, "session.factory.resume", req)
- if err != nil {
- return nil, err
- }
- var result FactoryResumeResult
- if err := json.Unmarshal(raw, &result); err != nil {
- return nil, err
- }
- return &result, nil
-}
-
-// Runs a registered factory by name at the top level.
-//
-// RPC method: session.factory.run.
-//
-// Parameters: Parameters for invoking a registered factory.
-//
-// Returns: Complete current or terminal factory run envelope.
-func (a *FactoryAPI) Run(ctx context.Context, params *FactoryRunRequest) (*FactoryRunResult, error) {
- req := map[string]any{"sessionId": a.sessionID}
- if params != nil {
- req["args"] = params.Args
- req["name"] = params.Name
- if params.Options != nil {
- req["options"] = *params.Options
- }
- }
- raw, err := a.client.Request(ctx, "session.factory.run", req)
- if err != nil {
- return nil, err
- }
- var result FactoryRunResult
- if err := json.Unmarshal(raw, &result); err != nil {
- return nil, err
- }
- return &result, nil
-}
-
-// Experimental: FactoryJournalAPI contains experimental APIs that may change or be removed.
-type FactoryJournalAPI sessionAPI
-
-// Get reads a memoized factory journal entry.
-//
-// RPC method: session.factory.journal.get.
-//
-// Parameters: Parameters for reading a factory journal entry.
-//
-// Returns: Result of reading a factory journal entry.
-func (a *FactoryJournalAPI) Get(ctx context.Context, params *FactoryJournalGetRequest) (*FactoryJournalGetResult, error) {
- req := map[string]any{"sessionId": a.sessionID}
- if params != nil {
- req["executionToken"] = params.ExecutionToken
- req["key"] = params.Key
- req["runId"] = params.RunID
- }
- raw, err := a.client.Request(ctx, "session.factory.journal.get", req)
- if err != nil {
- return nil, err
- }
- var result FactoryJournalGetResult
- if err := json.Unmarshal(raw, &result); err != nil {
- return nil, err
- }
- return &result, nil
-}
-
-// Put stores a memoized factory journal entry.
-//
-// RPC method: session.factory.journal.put.
-//
-// Parameters: Parameters for storing a factory journal entry.
-//
-// Returns: Acknowledgement that a factory request was accepted.
-func (a *FactoryJournalAPI) Put(ctx context.Context, params *FactoryJournalPutRequest) (*FactoryAckResult, error) {
- req := map[string]any{"sessionId": a.sessionID}
- if params != nil {
- req["executionToken"] = params.ExecutionToken
- req["key"] = params.Key
- req["resultJson"] = params.ResultJSON
- req["runId"] = params.RunID
- }
- raw, err := a.client.Request(ctx, "session.factory.journal.put", req)
- if err != nil {
- return nil, err
- }
- var result FactoryAckResult
- if err := json.Unmarshal(raw, &result); err != nil {
- return nil, err
- }
- return &result, nil
-}
-
-// Experimental: Journal returns experimental APIs that may change or be removed.
-func (s *FactoryAPI) Journal() *FactoryJournalAPI {
- return (*FactoryJournalAPI)(s)
-}
-
// Experimental: FleetAPI contains experimental APIs that may change or be removed.
type FleetAPI sessionAPI
@@ -32450,6 +31960,7 @@ type SessionRPC struct {
// Reuse a single struct instead of allocating one for each service on the heap.
common sessionAPI
+ Accounts *AccountsAPI
Agent *AgentAPI
AutopilotObjective *AutopilotObjectiveAPI
Canvas *CanvasAPI
@@ -32462,7 +31973,6 @@ type SessionRPC struct {
Diagnostics *DiagnosticsAPI
EventLog *EventLogAPI
Extensions *ExtensionsAPI
- Factory *FactoryAPI
Fleet *FleetAPI
GitHubAuth *GitHubAuthAPI
History *HistoryAPI
@@ -32787,6 +32297,7 @@ func (a *SessionRPC) Suspend(ctx context.Context) (*SessionSuspendResult, error)
func NewSessionRPC(client *jsonrpc2.Client, sessionID string) *SessionRPC {
r := &SessionRPC{}
r.common = sessionAPI{client: client, sessionID: sessionID}
+ r.Accounts = (*AccountsAPI)(&r.common)
r.Agent = (*AgentAPI)(&r.common)
r.AutopilotObjective = (*AutopilotObjectiveAPI)(&r.common)
r.Canvas = (*CanvasAPI)(&r.common)
@@ -32799,7 +32310,6 @@ func NewSessionRPC(client *jsonrpc2.Client, sessionID string) *SessionRPC {
r.Diagnostics = (*DiagnosticsAPI)(&r.common)
r.EventLog = (*EventLogAPI)(&r.common)
r.Extensions = (*ExtensionsAPI)(&r.common)
- r.Factory = (*FactoryAPI)(&r.common)
r.Fleet = (*FleetAPI)(&r.common)
r.GitHubAuth = (*GitHubAuthAPI)(&r.common)
r.History = (*HistoryAPI)(&r.common)
@@ -32986,97 +32496,6 @@ func (a *InternalConnectorsAPI) WithdrawProjection(ctx context.Context) (*Connec
return &result, nil
}
-// Experimental: InternalFactoryAPI contains experimental APIs that may change or be removed.
-type InternalFactoryAPI internalSessionAPI
-
-// PauseAtCheckpoint atomically pauses an owned factory attempt at a durable checkpoint.
-//
-// RPC method: session.factory.pauseAtCheckpoint.
-//
-// Parameters: Parameters for an owned durable pause checkpoint.
-// Internal: PauseAtCheckpoint is part of the SDK's internal handshake/plumbing; external
-// callers should not use it.
-func (a *InternalFactoryAPI) PauseAtCheckpoint(ctx context.Context, params *FactoryPauseCheckpointRequest) (*SessionFactoryPauseAtCheckpointResult, error) {
- req := map[string]any{"sessionId": a.sessionID}
- if params != nil {
- req["executionToken"] = params.ExecutionToken
- req["key"] = params.Key
- req["runId"] = params.RunID
- }
- raw, err := a.client.Request(ctx, "session.factory.pauseAtCheckpoint", req)
- if err != nil {
- return nil, err
- }
- var result SessionFactoryPauseAtCheckpointResult
- if err := json.Unmarshal(raw, &result); err != nil {
- return nil, err
- }
- return &result, nil
-}
-
-// ResumeFromTool internal tool-originated factory resume.
-//
-// RPC method: session.factory.resumeFromTool.
-//
-// Parameters: Internal parameters for resuming a factory run from a tool.
-//
-// Returns: Resolved persisted factory identity and resumed run envelope.
-// Internal: ResumeFromTool is part of the SDK's internal handshake/plumbing; external
-// callers should not use it.
-func (a *InternalFactoryAPI) ResumeFromTool(ctx context.Context, params *FactoryToolResumeRequest) (*FactoryResumeResult, error) {
- req := map[string]any{"sessionId": a.sessionID}
- if params != nil {
- if params.Limits != nil {
- req["limits"] = *params.Limits
- }
- req["runId"] = params.RunID
- if params.ToolCallID != nil {
- req["toolCallId"] = *params.ToolCallID
- }
- }
- raw, err := a.client.Request(ctx, "session.factory.resumeFromTool", req)
- if err != nil {
- return nil, err
- }
- var result FactoryResumeResult
- if err := json.Unmarshal(raw, &result); err != nil {
- return nil, err
- }
- return &result, nil
-}
-
-// RunFromTool internal tool-originated factory invocation.
-//
-// RPC method: session.factory.runFromTool.
-//
-// Parameters: Internal parameters for invoking a registered factory from a tool.
-//
-// Returns: Complete current or terminal factory run envelope.
-// Internal: RunFromTool is part of the SDK's internal handshake/plumbing; external callers
-// should not use it.
-func (a *InternalFactoryAPI) RunFromTool(ctx context.Context, params *FactoryToolRunRequest) (*FactoryRunResult, error) {
- req := map[string]any{"sessionId": a.sessionID}
- if params != nil {
- req["args"] = params.Args
- req["name"] = params.Name
- if params.Options != nil {
- req["options"] = *params.Options
- }
- if params.ToolCallID != nil {
- req["toolCallId"] = *params.ToolCallID
- }
- }
- raw, err := a.client.Request(ctx, "session.factory.runFromTool", req)
- if err != nil {
- return nil, err
- }
- var result FactoryRunResult
- if err := json.Unmarshal(raw, &result); err != nil {
- return nil, err
- }
- return &result, nil
-}
-
// Experimental: InternalGitHubAuthAPI contains experimental APIs that may change or be
// removed.
type InternalGitHubAuthAPI internalSessionAPI
@@ -33407,6 +32826,12 @@ func (a *InternalModelAPI) ApplyStartupOverlay(ctx context.Context, params *Mode
if params.DeviceManagedModel != nil {
req["deviceManagedModel"] = *params.DeviceManagedModel
}
+ if params.ManagedContextTier != nil {
+ req["managedContextTier"] = *params.ManagedContextTier
+ }
+ if params.ManagedReasoningEffort != nil {
+ req["managedReasoningEffort"] = *params.ManagedReasoningEffort
+ }
if params.PolicyHelperModel != nil {
req["policyHelperModel"] = *params.PolicyHelperModel
}
@@ -33978,7 +33403,6 @@ type InternalSessionRPC struct {
Canvas *InternalCanvasAPI
Commands *InternalCommandsAPI
Connectors *InternalConnectorsAPI
- Factory *InternalFactoryAPI
GitHubAuth *InternalGitHubAuthAPI
MCP *InternalMCPAPI
Model *InternalModelAPI
@@ -34026,7 +33450,6 @@ func NewInternalSessionRPC(client *jsonrpc2.Client, sessionID string) *InternalS
r.Canvas = (*InternalCanvasAPI)(&r.common)
r.Commands = (*InternalCommandsAPI)(&r.common)
r.Connectors = (*InternalConnectorsAPI)(&r.common)
- r.Factory = (*InternalFactoryAPI)(&r.common)
r.GitHubAuth = (*InternalGitHubAuthAPI)(&r.common)
r.MCP = (*InternalMCPAPI)(&r.common)
r.Model = (*InternalModelAPI)(&r.common)
@@ -34063,26 +33486,6 @@ type CanvasHandler interface {
Open(request *CanvasProviderOpenRequest) (*CanvasProviderOpenResult, error)
}
-// Experimental: FactoryHandler contains experimental APIs that may change or be removed.
-type FactoryHandler interface {
- // Abort asks the owning extension connection to abort a running factory cooperatively.
- //
- // RPC method: factory.abort.
- //
- // Parameters: Parameters for cooperatively aborting a factory body.
- //
- // Returns: Acknowledgement that a factory request was accepted.
- Abort(request *FactoryAbortRequest) (*FactoryAckResult, error)
- // Execute asks the owning extension connection to execute a registered factory closure.
- //
- // RPC method: factory.execute.
- //
- // Parameters: Parameters sent to the owning extension to execute a factory closure.
- //
- // Returns: Result returned by an extension factory closure.
- Execute(request *FactoryExecuteRequest) (*FactoryExecuteResult, error)
-}
-
// Experimental: ProviderTokenHandler contains experimental APIs that may change or be
// removed.
type ProviderTokenHandler interface {
@@ -34272,7 +33675,6 @@ type WorkflowHandler interface {
// ClientSessionAPIHandlers provides all client session API handler groups for a session.
type ClientSessionAPIHandlers struct {
Canvas CanvasHandler
- Factory FactoryHandler
ProviderToken ProviderTokenHandler
SessionFS SessionFSHandler
Tasks TasksHandler
@@ -34350,44 +33752,6 @@ func RegisterClientSessionAPIHandlers(client *jsonrpc2.Client, getHandlers func(
}
return raw, nil
})
- client.SetRequestHandler("factory.abort", func(params json.RawMessage) (json.RawMessage, *jsonrpc2.Error) {
- var request FactoryAbortRequest
- if err := json.Unmarshal(params, &request); err != nil {
- return nil, &jsonrpc2.Error{Code: -32602, Message: fmt.Sprintf("Invalid params: %v", err)}
- }
- handlers := getHandlers(request.SessionID)
- if handlers == nil || handlers.Factory == nil {
- return nil, &jsonrpc2.Error{Code: -32603, Message: fmt.Sprintf("No factory handler registered for session: %s", request.SessionID)}
- }
- result, err := handlers.Factory.Abort(&request)
- if err != nil {
- return nil, clientSessionHandlerError(err)
- }
- raw, err := json.Marshal(result)
- if err != nil {
- return nil, &jsonrpc2.Error{Code: -32603, Message: fmt.Sprintf("Failed to marshal response: %v", err)}
- }
- return raw, nil
- })
- client.SetRequestHandler("factory.execute", func(params json.RawMessage) (json.RawMessage, *jsonrpc2.Error) {
- var request FactoryExecuteRequest
- if err := json.Unmarshal(params, &request); err != nil {
- return nil, &jsonrpc2.Error{Code: -32602, Message: fmt.Sprintf("Invalid params: %v", err)}
- }
- handlers := getHandlers(request.SessionID)
- if handlers == nil || handlers.Factory == nil {
- return nil, &jsonrpc2.Error{Code: -32603, Message: fmt.Sprintf("No factory handler registered for session: %s", request.SessionID)}
- }
- result, err := handlers.Factory.Execute(&request)
- if err != nil {
- return nil, clientSessionHandlerError(err)
- }
- raw, err := json.Marshal(result)
- if err != nil {
- return nil, &jsonrpc2.Error{Code: -32603, Message: fmt.Sprintf("Failed to marshal response: %v", err)}
- }
- return raw, nil
- })
client.SetRequestHandler("providerToken.getToken", func(params json.RawMessage) (json.RawMessage, *jsonrpc2.Error) {
var request ProviderTokenAcquireRequest
if err := json.Unmarshal(params, &request); err != nil {
diff --git a/go/rpc/zrpc_encoding.go b/go/rpc/zrpc_encoding.go
index 97d51702da..84da52c224 100644
--- a/go/rpc/zrpc_encoding.go
+++ b/go/rpc/zrpc_encoding.go
@@ -235,6 +235,283 @@ func (r *AccountLogoutRequest) UnmarshalJSON(data []byte) error {
return nil
}
+func unmarshalAuthEnumerateQuery(data []byte) (AuthEnumerateQuery, error) {
+ if string(data) == "null" {
+ return nil, nil
+ }
+ type rawUnion struct {
+ Kind AuthEnumerateQueryKind `json:"kind"`
+ }
+ var raw rawUnion
+ if err := json.Unmarshal(data, &raw); err != nil {
+ return nil, err
+ }
+
+ switch raw.Kind {
+ case AuthEnumerateQueryKindAccounts:
+ var d AuthEnumerateQueryAccounts
+ if err := json.Unmarshal(data, &d); err != nil {
+ return nil, err
+ }
+ return &d, nil
+ case AuthEnumerateQueryKindProviders:
+ var d AuthEnumerateQueryProviders
+ if err := json.Unmarshal(data, &d); err != nil {
+ return nil, err
+ }
+ return &d, nil
+ default:
+ return &RawAuthEnumerateQueryData{Discriminator: raw.Kind, Raw: data}, nil
+ }
+}
+
+func (r RawAuthEnumerateQueryData) MarshalJSON() ([]byte, error) {
+ if r.Raw != nil {
+ return r.Raw, nil
+ }
+ return json.Marshal(struct {
+ Kind AuthEnumerateQueryKind `json:"kind"`
+ }{
+ Kind: r.Discriminator,
+ })
+}
+
+func (r AuthEnumerateQueryAccounts) MarshalJSON() ([]byte, error) {
+ type alias AuthEnumerateQueryAccounts
+ return json.Marshal(struct {
+ Kind AuthEnumerateQueryKind `json:"kind"`
+ alias
+ }{
+ Kind: r.Kind(),
+ alias: alias(r),
+ })
+}
+
+func (r AuthEnumerateQueryProviders) MarshalJSON() ([]byte, error) {
+ type alias AuthEnumerateQueryProviders
+ return json.Marshal(struct {
+ Kind AuthEnumerateQueryKind `json:"kind"`
+ alias
+ }{
+ Kind: r.Kind(),
+ alias: alias(r),
+ })
+}
+
+func (r *AccountsEnumerateRequest) UnmarshalJSON(data []byte) error {
+ type rawAccountsEnumerateRequest struct {
+ Query json.RawMessage `json:"query"`
+ }
+ var raw rawAccountsEnumerateRequest
+ if err := json.Unmarshal(data, &raw); err != nil {
+ return err
+ }
+ if raw.Query != nil {
+ value, err := unmarshalAuthEnumerateQuery(raw.Query)
+ if err != nil {
+ return err
+ }
+ r.Query = value
+ }
+ return nil
+}
+
+func unmarshalAuthReadQuery(data []byte) (AuthReadQuery, error) {
+ if string(data) == "null" {
+ return nil, nil
+ }
+ type rawUnion struct {
+ Kind AuthReadQueryKind `json:"kind"`
+ }
+ var raw rawUnion
+ if err := json.Unmarshal(data, &raw); err != nil {
+ return nil, err
+ }
+
+ switch raw.Kind {
+ case AuthReadQueryKindActiveAccount:
+ var d AuthReadQueryActiveAccount
+ if err := json.Unmarshal(data, &d); err != nil {
+ return nil, err
+ }
+ return &d, nil
+ case AuthReadQueryKindLastErrors:
+ var d AuthReadQueryLastErrors
+ if err := json.Unmarshal(data, &d); err != nil {
+ return nil, err
+ }
+ return &d, nil
+ case AuthReadQueryKindStatus:
+ var d AuthReadQueryStatus
+ if err := json.Unmarshal(data, &d); err != nil {
+ return nil, err
+ }
+ return &d, nil
+ default:
+ return &RawAuthReadQueryData{Discriminator: raw.Kind, Raw: data}, nil
+ }
+}
+
+func (r RawAuthReadQueryData) MarshalJSON() ([]byte, error) {
+ if r.Raw != nil {
+ return r.Raw, nil
+ }
+ return json.Marshal(struct {
+ Kind AuthReadQueryKind `json:"kind"`
+ }{
+ Kind: r.Discriminator,
+ })
+}
+
+func (r AuthReadQueryActiveAccount) MarshalJSON() ([]byte, error) {
+ type alias AuthReadQueryActiveAccount
+ return json.Marshal(struct {
+ Kind AuthReadQueryKind `json:"kind"`
+ alias
+ }{
+ Kind: r.Kind(),
+ alias: alias(r),
+ })
+}
+
+func (r AuthReadQueryLastErrors) MarshalJSON() ([]byte, error) {
+ type alias AuthReadQueryLastErrors
+ return json.Marshal(struct {
+ Kind AuthReadQueryKind `json:"kind"`
+ alias
+ }{
+ Kind: r.Kind(),
+ alias: alias(r),
+ })
+}
+
+func (r AuthReadQueryStatus) MarshalJSON() ([]byte, error) {
+ type alias AuthReadQueryStatus
+ return json.Marshal(struct {
+ Kind AuthReadQueryKind `json:"kind"`
+ alias
+ }{
+ Kind: r.Kind(),
+ alias: alias(r),
+ })
+}
+
+func (r *AccountsGetRequest) UnmarshalJSON(data []byte) error {
+ type rawAccountsGetRequest struct {
+ Query json.RawMessage `json:"query"`
+ }
+ var raw rawAccountsGetRequest
+ if err := json.Unmarshal(data, &raw); err != nil {
+ return err
+ }
+ if raw.Query != nil {
+ value, err := unmarshalAuthReadQuery(raw.Query)
+ if err != nil {
+ return err
+ }
+ r.Query = value
+ }
+ return nil
+}
+
+func unmarshalAuthWrite(data []byte) (AuthWrite, error) {
+ if string(data) == "null" {
+ return nil, nil
+ }
+ type rawUnion struct {
+ Kind AuthWriteKind `json:"kind"`
+ }
+ var raw rawUnion
+ if err := json.Unmarshal(data, &raw); err != nil {
+ return nil, err
+ }
+
+ switch raw.Kind {
+ case AuthWriteKindLogout:
+ var d AuthWriteLogout
+ if err := json.Unmarshal(data, &d); err != nil {
+ return nil, err
+ }
+ return &d, nil
+ case AuthWriteKindSetCredentials:
+ var d AuthWriteSetCredentials
+ if err := json.Unmarshal(data, &d); err != nil {
+ return nil, err
+ }
+ return &d, nil
+ case AuthWriteKindSwitchActive:
+ var d AuthWriteSwitchActive
+ if err := json.Unmarshal(data, &d); err != nil {
+ return nil, err
+ }
+ return &d, nil
+ default:
+ return &RawAuthWriteData{Discriminator: raw.Kind, Raw: data}, nil
+ }
+}
+
+func (r RawAuthWriteData) MarshalJSON() ([]byte, error) {
+ if r.Raw != nil {
+ return r.Raw, nil
+ }
+ return json.Marshal(struct {
+ Kind AuthWriteKind `json:"kind"`
+ }{
+ Kind: r.Discriminator,
+ })
+}
+
+func (r AuthWriteLogout) MarshalJSON() ([]byte, error) {
+ type alias AuthWriteLogout
+ return json.Marshal(struct {
+ Kind AuthWriteKind `json:"kind"`
+ alias
+ }{
+ Kind: r.Kind(),
+ alias: alias(r),
+ })
+}
+
+func (r AuthWriteSetCredentials) MarshalJSON() ([]byte, error) {
+ type alias AuthWriteSetCredentials
+ return json.Marshal(struct {
+ Kind AuthWriteKind `json:"kind"`
+ alias
+ }{
+ Kind: r.Kind(),
+ alias: alias(r),
+ })
+}
+
+func (r AuthWriteSwitchActive) MarshalJSON() ([]byte, error) {
+ type alias AuthWriteSwitchActive
+ return json.Marshal(struct {
+ Kind AuthWriteKind `json:"kind"`
+ alias
+ }{
+ Kind: r.Kind(),
+ alias: alias(r),
+ })
+}
+
+func (r *AccountsSetRequest) UnmarshalJSON(data []byte) error {
+ type rawAccountsSetRequest struct {
+ Command json.RawMessage `json:"command"`
+ }
+ var raw rawAccountsSetRequest
+ if err := json.Unmarshal(data, &raw); err != nil {
+ return err
+ }
+ if raw.Command != nil {
+ value, err := unmarshalAuthWrite(raw.Command)
+ if err != nil {
+ return err
+ }
+ r.Command = value
+ }
+ return nil
+}
+
func unmarshalAgentRegistrySpawnResult(data []byte) (AgentRegistrySpawnResult, error) {
if string(data) == "null" {
return nil, nil
@@ -528,90 +805,384 @@ func (r AttachmentGitHubFile) MarshalJSON() ([]byte, error) {
})
}
-func (r AttachmentGitHubFileDiff) MarshalJSON() ([]byte, error) {
- type alias AttachmentGitHubFileDiff
+func (r AttachmentGitHubFileDiff) MarshalJSON() ([]byte, error) {
+ type alias AttachmentGitHubFileDiff
+ return json.Marshal(struct {
+ Type AttachmentType `json:"type"`
+ alias
+ }{
+ Type: r.Type(),
+ alias: alias(r),
+ })
+}
+
+func (r AttachmentGitHubReference) MarshalJSON() ([]byte, error) {
+ type alias AttachmentGitHubReference
+ return json.Marshal(struct {
+ Type AttachmentType `json:"type"`
+ alias
+ }{
+ Type: r.Type(),
+ alias: alias(r),
+ })
+}
+
+func (r AttachmentGitHubRelease) MarshalJSON() ([]byte, error) {
+ type alias AttachmentGitHubRelease
+ return json.Marshal(struct {
+ Type AttachmentType `json:"type"`
+ alias
+ }{
+ Type: r.Type(),
+ alias: alias(r),
+ })
+}
+
+func (r AttachmentGitHubRepository) MarshalJSON() ([]byte, error) {
+ type alias AttachmentGitHubRepository
+ return json.Marshal(struct {
+ Type AttachmentType `json:"type"`
+ alias
+ }{
+ Type: r.Type(),
+ alias: alias(r),
+ })
+}
+
+func (r AttachmentGitHubSnippet) MarshalJSON() ([]byte, error) {
+ type alias AttachmentGitHubSnippet
+ return json.Marshal(struct {
+ Type AttachmentType `json:"type"`
+ alias
+ }{
+ Type: r.Type(),
+ alias: alias(r),
+ })
+}
+
+func (r AttachmentGitHubTreeComparison) MarshalJSON() ([]byte, error) {
+ type alias AttachmentGitHubTreeComparison
+ return json.Marshal(struct {
+ Type AttachmentType `json:"type"`
+ alias
+ }{
+ Type: r.Type(),
+ alias: alias(r),
+ })
+}
+
+func (r AttachmentGitHubURL) MarshalJSON() ([]byte, error) {
+ type alias AttachmentGitHubURL
+ return json.Marshal(struct {
+ Type AttachmentType `json:"type"`
+ alias
+ }{
+ Type: r.Type(),
+ alias: alias(r),
+ })
+}
+
+func (r AttachmentSelection) MarshalJSON() ([]byte, error) {
+ type alias AttachmentSelection
+ return json.Marshal(struct {
+ Type AttachmentType `json:"type"`
+ alias
+ }{
+ Type: r.Type(),
+ alias: alias(r),
+ })
+}
+
+func unmarshalAuthEnumerateValue(data []byte) (AuthEnumerateValue, error) {
+ if string(data) == "null" {
+ return nil, nil
+ }
+ type rawUnion struct {
+ Kind AuthEnumerateValueKind `json:"kind"`
+ }
+ var raw rawUnion
+ if err := json.Unmarshal(data, &raw); err != nil {
+ return nil, err
+ }
+
+ switch raw.Kind {
+ case AuthEnumerateValueKindAccounts:
+ var d AuthEnumerateValueAccounts
+ if err := json.Unmarshal(data, &d); err != nil {
+ return nil, err
+ }
+ return &d, nil
+ case AuthEnumerateValueKindProviders:
+ var d AuthEnumerateValueProviders
+ if err := json.Unmarshal(data, &d); err != nil {
+ return nil, err
+ }
+ return &d, nil
+ default:
+ return &RawAuthEnumerateValueData{Discriminator: raw.Kind, Raw: data}, nil
+ }
+}
+
+func (r RawAuthEnumerateValueData) MarshalJSON() ([]byte, error) {
+ if r.Raw != nil {
+ return r.Raw, nil
+ }
+ return json.Marshal(struct {
+ Kind AuthEnumerateValueKind `json:"kind"`
+ }{
+ Kind: r.Discriminator,
+ })
+}
+
+func (r AuthEnumerateValueAccounts) MarshalJSON() ([]byte, error) {
+ type alias AuthEnumerateValueAccounts
+ return json.Marshal(struct {
+ Kind AuthEnumerateValueKind `json:"kind"`
+ alias
+ }{
+ Kind: r.Kind(),
+ alias: alias(r),
+ })
+}
+
+func (r AuthEnumerateValueProviders) MarshalJSON() ([]byte, error) {
+ type alias AuthEnumerateValueProviders
+ return json.Marshal(struct {
+ Kind AuthEnumerateValueKind `json:"kind"`
+ alias
+ }{
+ Kind: r.Kind(),
+ alias: alias(r),
+ })
+}
+
+func unmarshalAuthLoginStep(data []byte) (AuthLoginStep, error) {
+ if string(data) == "null" {
+ return nil, nil
+ }
+ type rawUnion struct {
+ Kind AuthLoginStepKind `json:"kind"`
+ }
+ var raw rawUnion
+ if err := json.Unmarshal(data, &raw); err != nil {
+ return nil, err
+ }
+
+ switch raw.Kind {
+ case AuthLoginStepKindAwaiting:
+ var d AuthLoginStepAwaiting
+ if err := json.Unmarshal(data, &d); err != nil {
+ return nil, err
+ }
+ return &d, nil
+ case AuthLoginStepKindCompleted:
+ var d AuthLoginStepCompleted
+ if err := json.Unmarshal(data, &d); err != nil {
+ return nil, err
+ }
+ return &d, nil
+ case AuthLoginStepKindError:
+ var d AuthLoginStepError
+ if err := json.Unmarshal(data, &d); err != nil {
+ return nil, err
+ }
+ return &d, nil
+ case AuthLoginStepKindInputRequired:
+ var d AuthLoginStepInputRequired
+ if err := json.Unmarshal(data, &d); err != nil {
+ return nil, err
+ }
+ return &d, nil
+ case AuthLoginStepKindNeedsInteraction:
+ var d AuthLoginStepNeedsInteraction
+ if err := json.Unmarshal(data, &d); err != nil {
+ return nil, err
+ }
+ return &d, nil
+ case AuthLoginStepKindOpenURL:
+ var d AuthLoginStepOpenURL
+ if err := json.Unmarshal(data, &d); err != nil {
+ return nil, err
+ }
+ return &d, nil
+ default:
+ return &RawAuthLoginStepData{Discriminator: raw.Kind, Raw: data}, nil
+ }
+}
+
+func (r RawAuthLoginStepData) MarshalJSON() ([]byte, error) {
+ if r.Raw != nil {
+ return r.Raw, nil
+ }
+ return json.Marshal(struct {
+ Kind AuthLoginStepKind `json:"kind"`
+ }{
+ Kind: r.Discriminator,
+ })
+}
+
+func (r AuthLoginStepAwaiting) MarshalJSON() ([]byte, error) {
+ type alias AuthLoginStepAwaiting
+ return json.Marshal(struct {
+ Kind AuthLoginStepKind `json:"kind"`
+ alias
+ }{
+ Kind: r.Kind(),
+ alias: alias(r),
+ })
+}
+
+func (r AuthLoginStepCompleted) MarshalJSON() ([]byte, error) {
+ type alias AuthLoginStepCompleted
+ return json.Marshal(struct {
+ Kind AuthLoginStepKind `json:"kind"`
+ alias
+ }{
+ Kind: r.Kind(),
+ alias: alias(r),
+ })
+}
+
+func (r AuthLoginStepError) MarshalJSON() ([]byte, error) {
+ type alias AuthLoginStepError
return json.Marshal(struct {
- Type AttachmentType `json:"type"`
+ Kind AuthLoginStepKind `json:"kind"`
alias
}{
- Type: r.Type(),
+ Kind: r.Kind(),
alias: alias(r),
})
}
-func (r AttachmentGitHubReference) MarshalJSON() ([]byte, error) {
- type alias AttachmentGitHubReference
+func (r AuthLoginStepInputRequired) MarshalJSON() ([]byte, error) {
+ type alias AuthLoginStepInputRequired
return json.Marshal(struct {
- Type AttachmentType `json:"type"`
+ Kind AuthLoginStepKind `json:"kind"`
alias
}{
- Type: r.Type(),
+ Kind: r.Kind(),
alias: alias(r),
})
}
-func (r AttachmentGitHubRelease) MarshalJSON() ([]byte, error) {
- type alias AttachmentGitHubRelease
+func (r AuthLoginStepNeedsInteraction) MarshalJSON() ([]byte, error) {
+ type alias AuthLoginStepNeedsInteraction
return json.Marshal(struct {
- Type AttachmentType `json:"type"`
+ Kind AuthLoginStepKind `json:"kind"`
alias
}{
- Type: r.Type(),
+ Kind: r.Kind(),
alias: alias(r),
})
}
-func (r AttachmentGitHubRepository) MarshalJSON() ([]byte, error) {
- type alias AttachmentGitHubRepository
+func (r AuthLoginStepOpenURL) MarshalJSON() ([]byte, error) {
+ type alias AuthLoginStepOpenURL
return json.Marshal(struct {
- Type AttachmentType `json:"type"`
+ Kind AuthLoginStepKind `json:"kind"`
alias
}{
- Type: r.Type(),
+ Kind: r.Kind(),
alias: alias(r),
})
}
-func (r AttachmentGitHubSnippet) MarshalJSON() ([]byte, error) {
- type alias AttachmentGitHubSnippet
+func (r *AuthLoginBegun) UnmarshalJSON(data []byte) error {
+ type rawAuthLoginBegun struct {
+ FlowID string `json:"flowId"`
+ Step json.RawMessage `json:"step"`
+ }
+ var raw rawAuthLoginBegun
+ if err := json.Unmarshal(data, &raw); err != nil {
+ return err
+ }
+ r.FlowID = raw.FlowID
+ if raw.Step != nil {
+ value, err := unmarshalAuthLoginStep(raw.Step)
+ if err != nil {
+ return err
+ }
+ r.Step = value
+ }
+ return nil
+}
+
+func unmarshalAuthReadValue(data []byte) (AuthReadValue, error) {
+ if string(data) == "null" {
+ return nil, nil
+ }
+ type rawUnion struct {
+ Kind AuthReadValueKind `json:"kind"`
+ }
+ var raw rawUnion
+ if err := json.Unmarshal(data, &raw); err != nil {
+ return nil, err
+ }
+
+ switch raw.Kind {
+ case AuthReadValueKindActiveAccount:
+ var d AuthReadValueActiveAccount
+ if err := json.Unmarshal(data, &d); err != nil {
+ return nil, err
+ }
+ return &d, nil
+ case AuthReadValueKindLastErrors:
+ var d AuthReadValueLastErrors
+ if err := json.Unmarshal(data, &d); err != nil {
+ return nil, err
+ }
+ return &d, nil
+ case AuthReadValueKindStatus:
+ var d AuthReadValueStatus
+ if err := json.Unmarshal(data, &d); err != nil {
+ return nil, err
+ }
+ return &d, nil
+ default:
+ return &RawAuthReadValueData{Discriminator: raw.Kind, Raw: data}, nil
+ }
+}
+
+func (r RawAuthReadValueData) MarshalJSON() ([]byte, error) {
+ if r.Raw != nil {
+ return r.Raw, nil
+ }
return json.Marshal(struct {
- Type AttachmentType `json:"type"`
- alias
+ Kind AuthReadValueKind `json:"kind"`
}{
- Type: r.Type(),
- alias: alias(r),
+ Kind: r.Discriminator,
})
}
-func (r AttachmentGitHubTreeComparison) MarshalJSON() ([]byte, error) {
- type alias AttachmentGitHubTreeComparison
+func (r AuthReadValueActiveAccount) MarshalJSON() ([]byte, error) {
+ type alias AuthReadValueActiveAccount
return json.Marshal(struct {
- Type AttachmentType `json:"type"`
+ Kind AuthReadValueKind `json:"kind"`
alias
}{
- Type: r.Type(),
+ Kind: r.Kind(),
alias: alias(r),
})
}
-func (r AttachmentGitHubURL) MarshalJSON() ([]byte, error) {
- type alias AttachmentGitHubURL
+func (r AuthReadValueLastErrors) MarshalJSON() ([]byte, error) {
+ type alias AuthReadValueLastErrors
return json.Marshal(struct {
- Type AttachmentType `json:"type"`
+ Kind AuthReadValueKind `json:"kind"`
alias
}{
- Type: r.Type(),
+ Kind: r.Kind(),
alias: alias(r),
})
}
-func (r AttachmentSelection) MarshalJSON() ([]byte, error) {
- type alias AttachmentSelection
+func (r AuthReadValueStatus) MarshalJSON() ([]byte, error) {
+ type alias AuthReadValueStatus
return json.Marshal(struct {
- Type AttachmentType `json:"type"`
+ Kind AuthReadValueKind `json:"kind"`
alias
}{
- Type: r.Type(),
+ Kind: r.Kind(),
alias: alias(r),
})
}
@@ -2160,241 +2731,51 @@ func unmarshalExternalToolTextResultForLlmContentResourceDetails(data []byte) (E
return nil, nil
}
if matchesExternalToolTextResultForLlmContentResourceDetailsEmbeddedBlobResourceContents(data) {
- var d EmbeddedBlobResourceContents
- if err := json.Unmarshal(data, &d); err != nil {
- return nil, err
- }
- return &d, nil
- }
- if matchesExternalToolTextResultForLlmContentResourceDetailsEmbeddedTextResourceContents(data) {
- var d EmbeddedTextResourceContents
- if err := json.Unmarshal(data, &d); err != nil {
- return nil, err
- }
- return &d, nil
- }
- return &RawExternalToolTextResultForLlmContentResourceDetailsData{Raw: data}, nil
-}
-
-func (r RawExternalToolTextResultForLlmContentResourceDetailsData) MarshalJSON() ([]byte, error) {
- if r.Raw != nil {
- return r.Raw, nil
- }
- return []byte("null"), nil
-}
-
-func (r *ExternalToolTextResultForLlmContentResource) UnmarshalJSON(data []byte) error {
- type rawExternalToolTextResultForLlmContentResource struct {
- Resource json.RawMessage `json:"resource"`
- }
- var raw rawExternalToolTextResultForLlmContentResource
- if err := json.Unmarshal(data, &raw); err != nil {
- return err
- }
- if raw.Resource != nil {
- value, err := unmarshalExternalToolTextResultForLlmContentResourceDetails(raw.Resource)
- if err != nil {
- return err
- }
- r.Resource = value
- }
- return nil
-}
-
-func (r ExternalToolTextResultForLlmContentResource) MarshalJSON() ([]byte, error) {
- type alias ExternalToolTextResultForLlmContentResource
- return json.Marshal(struct {
- Type ExternalToolTextResultForLlmContentType `json:"type"`
- alias
- }{
- Type: r.Type(),
- alias: alias(r),
- })
-}
-
-func (r ExternalToolTextResultForLlmContentResourceLink) MarshalJSON() ([]byte, error) {
- type alias ExternalToolTextResultForLlmContentResourceLink
- return json.Marshal(struct {
- Type ExternalToolTextResultForLlmContentType `json:"type"`
- alias
- }{
- Type: r.Type(),
- alias: alias(r),
- })
-}
-
-func (r ExternalToolTextResultForLlmContentShellExit) MarshalJSON() ([]byte, error) {
- type alias ExternalToolTextResultForLlmContentShellExit
- return json.Marshal(struct {
- Type ExternalToolTextResultForLlmContentType `json:"type"`
- alias
- }{
- Type: r.Type(),
- alias: alias(r),
- })
-}
-
-func (r ExternalToolTextResultForLlmContentTerminal) MarshalJSON() ([]byte, error) {
- type alias ExternalToolTextResultForLlmContentTerminal
- return json.Marshal(struct {
- Type ExternalToolTextResultForLlmContentType `json:"type"`
- alias
- }{
- Type: r.Type(),
- alias: alias(r),
- })
-}
-
-func (r ExternalToolTextResultForLlmContentText) MarshalJSON() ([]byte, error) {
- type alias ExternalToolTextResultForLlmContentText
- return json.Marshal(struct {
- Type ExternalToolTextResultForLlmContentType `json:"type"`
- alias
- }{
- Type: r.Type(),
- alias: alias(r),
- })
-}
-
-func (r *ExternalToolTextResultForLlm) UnmarshalJSON(data []byte) error {
- type rawExternalToolTextResultForLlm struct {
- BinaryResultsForLlm []ExternalToolTextResultForLlmBinaryResultsForLlm `json:"binaryResultsForLlm,omitzero"`
- Contents []json.RawMessage `json:"contents,omitzero"`
- Error *string `json:"error,omitempty"`
- ResultType *string `json:"resultType,omitempty"`
- SessionLog *string `json:"sessionLog,omitempty"`
- TextResultForLlm string `json:"textResultForLlm"`
- ToolReferences []string `json:"toolReferences,omitzero"`
- ToolTelemetry map[string]any `json:"toolTelemetry,omitzero"`
- }
- var raw rawExternalToolTextResultForLlm
- if err := json.Unmarshal(data, &raw); err != nil {
- return err
- }
- r.BinaryResultsForLlm = raw.BinaryResultsForLlm
- if raw.Contents != nil {
- r.Contents = make([]ExternalToolTextResultForLlmContent, 0, len(raw.Contents))
- for _, rawItem := range raw.Contents {
- value, err := unmarshalExternalToolTextResultForLlmContent(rawItem)
- if err != nil {
- return err
- }
- r.Contents = append(r.Contents, value)
- }
- }
- r.Error = raw.Error
- r.ResultType = raw.ResultType
- r.SessionLog = raw.SessionLog
- r.TextResultForLlm = raw.TextResultForLlm
- r.ToolReferences = raw.ToolReferences
- r.ToolTelemetry = raw.ToolTelemetry
- return nil
-}
-
-func unmarshalExternalToolResult(data []byte) (ExternalToolResult, error) {
- if string(data) == "null" {
- return nil, nil
- }
- {
- var value string
- if err := json.Unmarshal(data, &value); err == nil {
- return ExternalToolStringResult(value), nil
- }
- }
- {
- var value ExternalToolTextResultForLlm
- if err := json.Unmarshal(data, &value); err == nil {
- return &value, nil
- }
- }
- return nil, errors.New("data did not match any union variant for ExternalToolResult")
-}
-
-func unmarshalFactoryRunFailure(data []byte) (FactoryRunFailure, error) {
- if string(data) == "null" {
- return nil, nil
- }
- type rawUnion struct {
- Type FactoryRunFailureType `json:"type"`
- }
- var raw rawUnion
- if err := json.Unmarshal(data, &raw); err != nil {
- return nil, err
- }
-
- switch raw.Type {
- case FactoryRunFailureTypeFactoryAccountingIncomplete:
- var d FactoryRunFailureFactoryAccountingIncomplete
- if err := json.Unmarshal(data, &d); err != nil {
- return nil, err
- }
- return &d, nil
- case FactoryRunFailureTypeFactoryDurableFailure:
- var d FactoryRunFailureFactoryDurableFailure
- if err := json.Unmarshal(data, &d); err != nil {
- return nil, err
- }
- return &d, nil
- case FactoryRunFailureTypeFactoryLimitReached:
- var d FactoryRunFailureFactoryLimitReached
- if err := json.Unmarshal(data, &d); err != nil {
- return nil, err
- }
- return &d, nil
- case FactoryRunFailureTypeFactoryProviderDisconnected:
- var d FactoryRunFailureFactoryProviderDisconnected
+ var d EmbeddedBlobResourceContents
if err := json.Unmarshal(data, &d); err != nil {
return nil, err
}
return &d, nil
- case FactoryRunFailureTypeFactoryResumeDeclined:
- var d FactoryRunFailureFactoryResumeDeclined
+ }
+ if matchesExternalToolTextResultForLlmContentResourceDetailsEmbeddedTextResourceContents(data) {
+ var d EmbeddedTextResourceContents
if err := json.Unmarshal(data, &d); err != nil {
return nil, err
}
return &d, nil
- default:
- return &RawFactoryRunFailureData{Discriminator: raw.Type, Raw: data}, nil
}
+ return &RawExternalToolTextResultForLlmContentResourceDetailsData{Raw: data}, nil
}
-func (r RawFactoryRunFailureData) MarshalJSON() ([]byte, error) {
+func (r RawExternalToolTextResultForLlmContentResourceDetailsData) MarshalJSON() ([]byte, error) {
if r.Raw != nil {
return r.Raw, nil
}
- return json.Marshal(struct {
- Type FactoryRunFailureType `json:"type"`
- }{
- Type: r.Discriminator,
- })
-}
-
-func (r FactoryRunFailureFactoryAccountingIncomplete) MarshalJSON() ([]byte, error) {
- type alias FactoryRunFailureFactoryAccountingIncomplete
- return json.Marshal(struct {
- Type FactoryRunFailureType `json:"type"`
- alias
- }{
- Type: r.Type(),
- alias: alias(r),
- })
+ return []byte("null"), nil
}
-func (r FactoryRunFailureFactoryDurableFailure) MarshalJSON() ([]byte, error) {
- type alias FactoryRunFailureFactoryDurableFailure
- return json.Marshal(struct {
- Type FactoryRunFailureType `json:"type"`
- alias
- }{
- Type: r.Type(),
- alias: alias(r),
- })
+func (r *ExternalToolTextResultForLlmContentResource) UnmarshalJSON(data []byte) error {
+ type rawExternalToolTextResultForLlmContentResource struct {
+ Resource json.RawMessage `json:"resource"`
+ }
+ var raw rawExternalToolTextResultForLlmContentResource
+ if err := json.Unmarshal(data, &raw); err != nil {
+ return err
+ }
+ if raw.Resource != nil {
+ value, err := unmarshalExternalToolTextResultForLlmContentResourceDetails(raw.Resource)
+ if err != nil {
+ return err
+ }
+ r.Resource = value
+ }
+ return nil
}
-func (r FactoryRunFailureFactoryLimitReached) MarshalJSON() ([]byte, error) {
- type alias FactoryRunFailureFactoryLimitReached
+func (r ExternalToolTextResultForLlmContentResource) MarshalJSON() ([]byte, error) {
+ type alias ExternalToolTextResultForLlmContentResource
return json.Marshal(struct {
- Type FactoryRunFailureType `json:"type"`
+ Type ExternalToolTextResultForLlmContentType `json:"type"`
alias
}{
Type: r.Type(),
@@ -2402,10 +2783,10 @@ func (r FactoryRunFailureFactoryLimitReached) MarshalJSON() ([]byte, error) {
})
}
-func (r FactoryRunFailureFactoryProviderDisconnected) MarshalJSON() ([]byte, error) {
- type alias FactoryRunFailureFactoryProviderDisconnected
+func (r ExternalToolTextResultForLlmContentResourceLink) MarshalJSON() ([]byte, error) {
+ type alias ExternalToolTextResultForLlmContentResourceLink
return json.Marshal(struct {
- Type FactoryRunFailureType `json:"type"`
+ Type ExternalToolTextResultForLlmContentType `json:"type"`
alias
}{
Type: r.Type(),
@@ -2413,10 +2794,10 @@ func (r FactoryRunFailureFactoryProviderDisconnected) MarshalJSON() ([]byte, err
})
}
-func (r FactoryRunFailureFactoryResumeDeclined) MarshalJSON() ([]byte, error) {
- type alias FactoryRunFailureFactoryResumeDeclined
+func (r ExternalToolTextResultForLlmContentShellExit) MarshalJSON() ([]byte, error) {
+ type alias ExternalToolTextResultForLlmContentShellExit
return json.Marshal(struct {
- Type FactoryRunFailureType `json:"type"`
+ Type ExternalToolTextResultForLlmContentType `json:"type"`
alias
}{
Type: r.Type(),
@@ -2424,51 +2805,10 @@ func (r FactoryRunFailureFactoryResumeDeclined) MarshalJSON() ([]byte, error) {
})
}
-func unmarshalFactoryPauseInfo(data []byte) (FactoryPauseInfo, error) {
- if string(data) == "null" {
- return nil, nil
- }
- type rawUnion struct {
- Type FactoryPauseInfoType `json:"type"`
- }
- var raw rawUnion
- if err := json.Unmarshal(data, &raw); err != nil {
- return nil, err
- }
-
- switch raw.Type {
- case FactoryPauseInfoTypeCheckpoint:
- var d FactoryPauseInfoCheckpoint
- if err := json.Unmarshal(data, &d); err != nil {
- return nil, err
- }
- return &d, nil
- case FactoryPauseInfoTypeUser:
- var d FactoryPauseInfoUser
- if err := json.Unmarshal(data, &d); err != nil {
- return nil, err
- }
- return &d, nil
- default:
- return &RawFactoryPauseInfoData{Discriminator: raw.Type, Raw: data}, nil
- }
-}
-
-func (r RawFactoryPauseInfoData) MarshalJSON() ([]byte, error) {
- if r.Raw != nil {
- return r.Raw, nil
- }
- return json.Marshal(struct {
- Type FactoryPauseInfoType `json:"type"`
- }{
- Type: r.Discriminator,
- })
-}
-
-func (r FactoryPauseInfoCheckpoint) MarshalJSON() ([]byte, error) {
- type alias FactoryPauseInfoCheckpoint
+func (r ExternalToolTextResultForLlmContentTerminal) MarshalJSON() ([]byte, error) {
+ type alias ExternalToolTextResultForLlmContentTerminal
return json.Marshal(struct {
- Type FactoryPauseInfoType `json:"type"`
+ Type ExternalToolTextResultForLlmContentType `json:"type"`
alias
}{
Type: r.Type(),
@@ -2476,10 +2816,10 @@ func (r FactoryPauseInfoCheckpoint) MarshalJSON() ([]byte, error) {
})
}
-func (r FactoryPauseInfoUser) MarshalJSON() ([]byte, error) {
- type alias FactoryPauseInfoUser
+func (r ExternalToolTextResultForLlmContentText) MarshalJSON() ([]byte, error) {
+ type alias ExternalToolTextResultForLlmContentText
return json.Marshal(struct {
- Type FactoryPauseInfoType `json:"type"`
+ Type ExternalToolTextResultForLlmContentType `json:"type"`
alias
}{
Type: r.Type(),
@@ -2487,76 +2827,58 @@ func (r FactoryPauseInfoUser) MarshalJSON() ([]byte, error) {
})
}
-func (r *FactoryRunTerminal) UnmarshalJSON(data []byte) error {
- type rawFactoryRunTerminal struct {
- Error *string `json:"error,omitempty"`
- Failure json.RawMessage `json:"failure,omitempty"`
- PauseInfo json.RawMessage `json:"pauseInfo"`
- Reason *string `json:"reason,omitempty"`
- ResultPreview *string `json:"resultPreview,omitempty"`
+func (r *ExternalToolTextResultForLlm) UnmarshalJSON(data []byte) error {
+ type rawExternalToolTextResultForLlm struct {
+ BinaryResultsForLlm []ExternalToolTextResultForLlmBinaryResultsForLlm `json:"binaryResultsForLlm,omitzero"`
+ Contents []json.RawMessage `json:"contents,omitzero"`
+ Error *string `json:"error,omitempty"`
+ ResultType *string `json:"resultType,omitempty"`
+ SessionLog *string `json:"sessionLog,omitempty"`
+ TextResultForLlm string `json:"textResultForLlm"`
+ ToolReferences []string `json:"toolReferences,omitzero"`
+ ToolTelemetry map[string]any `json:"toolTelemetry,omitzero"`
}
- var raw rawFactoryRunTerminal
+ var raw rawExternalToolTextResultForLlm
if err := json.Unmarshal(data, &raw); err != nil {
return err
}
- r.Error = raw.Error
- if raw.Failure != nil {
- value, err := unmarshalFactoryRunFailure(raw.Failure)
- if err != nil {
- return err
- }
- r.Failure = value
- }
- if raw.PauseInfo != nil {
- value, err := unmarshalFactoryPauseInfo(raw.PauseInfo)
- if err != nil {
- return err
+ r.BinaryResultsForLlm = raw.BinaryResultsForLlm
+ if raw.Contents != nil {
+ r.Contents = make([]ExternalToolTextResultForLlmContent, 0, len(raw.Contents))
+ for _, rawItem := range raw.Contents {
+ value, err := unmarshalExternalToolTextResultForLlmContent(rawItem)
+ if err != nil {
+ return err
+ }
+ r.Contents = append(r.Contents, value)
}
- r.PauseInfo = value
}
- r.Reason = raw.Reason
- r.ResultPreview = raw.ResultPreview
+ r.Error = raw.Error
+ r.ResultType = raw.ResultType
+ r.SessionLog = raw.SessionLog
+ r.TextResultForLlm = raw.TextResultForLlm
+ r.ToolReferences = raw.ToolReferences
+ r.ToolTelemetry = raw.ToolTelemetry
return nil
}
-func (r *FactoryRunResult) UnmarshalJSON(data []byte) error {
- type rawFactoryRunResult struct {
- Attempt *int64 `json:"attempt,omitempty"`
- Error *string `json:"error,omitempty"`
- Failure json.RawMessage `json:"failure,omitempty"`
- PauseInfo json.RawMessage `json:"pauseInfo,omitempty"`
- Reason *string `json:"reason,omitempty"`
- Result any `json:"result,omitempty"`
- RunID string `json:"runId"`
- Snapshot any `json:"snapshot,omitempty"`
- Status FactoryRunStatus `json:"status"`
- }
- var raw rawFactoryRunResult
- if err := json.Unmarshal(data, &raw); err != nil {
- return err
+func unmarshalExternalToolResult(data []byte) (ExternalToolResult, error) {
+ if string(data) == "null" {
+ return nil, nil
}
- r.Attempt = raw.Attempt
- r.Error = raw.Error
- if raw.Failure != nil {
- value, err := unmarshalFactoryRunFailure(raw.Failure)
- if err != nil {
- return err
+ {
+ var value string
+ if err := json.Unmarshal(data, &value); err == nil {
+ return ExternalToolStringResult(value), nil
}
- r.Failure = value
}
- if raw.PauseInfo != nil {
- value, err := unmarshalFactoryPauseInfo(raw.PauseInfo)
- if err != nil {
- return err
+ {
+ var value ExternalToolTextResultForLlm
+ if err := json.Unmarshal(data, &value); err == nil {
+ return &value, nil
}
- r.PauseInfo = value
}
- r.Reason = raw.Reason
- r.Result = raw.Result
- r.RunID = raw.RunID
- r.Snapshot = raw.Snapshot
- r.Status = raw.Status
- return nil
+ return nil, errors.New("data did not match any union variant for ExternalToolResult")
}
func unmarshalFilterMapping(data []byte) (FilterMapping, error) {
@@ -4353,12 +4675,6 @@ func unmarshalUserToolSessionApproval(data []byte) (UserToolSessionApproval, err
return nil, err
}
return &d, nil
- case UserToolSessionApprovalKindFactory:
- var d UserToolSessionApprovalFactory
- if err := json.Unmarshal(data, &d); err != nil {
- return nil, err
- }
- return &d, nil
case UserToolSessionApprovalKindMCP:
var d UserToolSessionApprovalMCP
if err := json.Unmarshal(data, &d); err != nil {
@@ -4377,6 +4693,12 @@ func unmarshalUserToolSessionApproval(data []byte) (UserToolSessionApproval, err
return nil, err
}
return &d, nil
+ case UserToolSessionApprovalKindWorkflow:
+ var d UserToolSessionApprovalWorkflow
+ if err := json.Unmarshal(data, &d); err != nil {
+ return nil, err
+ }
+ return &d, nil
case UserToolSessionApprovalKindWrite:
var d UserToolSessionApprovalWrite
if err := json.Unmarshal(data, &d); err != nil {
@@ -4454,8 +4776,8 @@ func (r UserToolSessionApprovalExtensionPermissionAccess) MarshalJSON() ([]byte,
})
}
-func (r UserToolSessionApprovalFactory) MarshalJSON() ([]byte, error) {
- type alias UserToolSessionApprovalFactory
+func (r UserToolSessionApprovalMCP) MarshalJSON() ([]byte, error) {
+ type alias UserToolSessionApprovalMCP
return json.Marshal(struct {
Kind UserToolSessionApprovalKind `json:"kind"`
alias
@@ -4465,8 +4787,8 @@ func (r UserToolSessionApprovalFactory) MarshalJSON() ([]byte, error) {
})
}
-func (r UserToolSessionApprovalMCP) MarshalJSON() ([]byte, error) {
- type alias UserToolSessionApprovalMCP
+func (r UserToolSessionApprovalMemory) MarshalJSON() ([]byte, error) {
+ type alias UserToolSessionApprovalMemory
return json.Marshal(struct {
Kind UserToolSessionApprovalKind `json:"kind"`
alias
@@ -4476,8 +4798,8 @@ func (r UserToolSessionApprovalMCP) MarshalJSON() ([]byte, error) {
})
}
-func (r UserToolSessionApprovalMemory) MarshalJSON() ([]byte, error) {
- type alias UserToolSessionApprovalMemory
+func (r UserToolSessionApprovalRead) MarshalJSON() ([]byte, error) {
+ type alias UserToolSessionApprovalRead
return json.Marshal(struct {
Kind UserToolSessionApprovalKind `json:"kind"`
alias
@@ -4487,8 +4809,8 @@ func (r UserToolSessionApprovalMemory) MarshalJSON() ([]byte, error) {
})
}
-func (r UserToolSessionApprovalRead) MarshalJSON() ([]byte, error) {
- type alias UserToolSessionApprovalRead
+func (r UserToolSessionApprovalWorkflow) MarshalJSON() ([]byte, error) {
+ type alias UserToolSessionApprovalWorkflow
return json.Marshal(struct {
Kind UserToolSessionApprovalKind `json:"kind"`
alias
@@ -4612,12 +4934,6 @@ func unmarshalPermissionDecisionApproveForLocationApproval(data []byte) (Permiss
return nil, err
}
return &d, nil
- case PermissionDecisionApproveForLocationApprovalKindFactory:
- var d PermissionDecisionApproveForLocationApprovalFactory
- if err := json.Unmarshal(data, &d); err != nil {
- return nil, err
- }
- return &d, nil
case PermissionDecisionApproveForLocationApprovalKindMCP:
var d PermissionDecisionApproveForLocationApprovalMCP
if err := json.Unmarshal(data, &d); err != nil {
@@ -4642,6 +4958,12 @@ func unmarshalPermissionDecisionApproveForLocationApproval(data []byte) (Permiss
return nil, err
}
return &d, nil
+ case PermissionDecisionApproveForLocationApprovalKindWorkflow:
+ var d PermissionDecisionApproveForLocationApprovalWorkflow
+ if err := json.Unmarshal(data, &d); err != nil {
+ return nil, err
+ }
+ return &d, nil
case PermissionDecisionApproveForLocationApprovalKindWrite:
var d PermissionDecisionApproveForLocationApprovalWrite
if err := json.Unmarshal(data, &d); err != nil {
@@ -4719,8 +5041,8 @@ func (r PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess) M
})
}
-func (r PermissionDecisionApproveForLocationApprovalFactory) MarshalJSON() ([]byte, error) {
- type alias PermissionDecisionApproveForLocationApprovalFactory
+func (r PermissionDecisionApproveForLocationApprovalMCP) MarshalJSON() ([]byte, error) {
+ type alias PermissionDecisionApproveForLocationApprovalMCP
return json.Marshal(struct {
Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"`
alias
@@ -4730,8 +5052,8 @@ func (r PermissionDecisionApproveForLocationApprovalFactory) MarshalJSON() ([]by
})
}
-func (r PermissionDecisionApproveForLocationApprovalMCP) MarshalJSON() ([]byte, error) {
- type alias PermissionDecisionApproveForLocationApprovalMCP
+func (r PermissionDecisionApproveForLocationApprovalMCPSampling) MarshalJSON() ([]byte, error) {
+ type alias PermissionDecisionApproveForLocationApprovalMCPSampling
return json.Marshal(struct {
Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"`
alias
@@ -4741,8 +5063,8 @@ func (r PermissionDecisionApproveForLocationApprovalMCP) MarshalJSON() ([]byte,
})
}
-func (r PermissionDecisionApproveForLocationApprovalMCPSampling) MarshalJSON() ([]byte, error) {
- type alias PermissionDecisionApproveForLocationApprovalMCPSampling
+func (r PermissionDecisionApproveForLocationApprovalMemory) MarshalJSON() ([]byte, error) {
+ type alias PermissionDecisionApproveForLocationApprovalMemory
return json.Marshal(struct {
Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"`
alias
@@ -4752,8 +5074,8 @@ func (r PermissionDecisionApproveForLocationApprovalMCPSampling) MarshalJSON() (
})
}
-func (r PermissionDecisionApproveForLocationApprovalMemory) MarshalJSON() ([]byte, error) {
- type alias PermissionDecisionApproveForLocationApprovalMemory
+func (r PermissionDecisionApproveForLocationApprovalRead) MarshalJSON() ([]byte, error) {
+ type alias PermissionDecisionApproveForLocationApprovalRead
return json.Marshal(struct {
Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"`
alias
@@ -4763,8 +5085,8 @@ func (r PermissionDecisionApproveForLocationApprovalMemory) MarshalJSON() ([]byt
})
}
-func (r PermissionDecisionApproveForLocationApprovalRead) MarshalJSON() ([]byte, error) {
- type alias PermissionDecisionApproveForLocationApprovalRead
+func (r PermissionDecisionApproveForLocationApprovalWorkflow) MarshalJSON() ([]byte, error) {
+ type alias PermissionDecisionApproveForLocationApprovalWorkflow
return json.Marshal(struct {
Kind PermissionDecisionApproveForLocationApprovalKind `json:"kind"`
alias
@@ -4859,12 +5181,6 @@ func unmarshalPermissionDecisionApproveForSessionApproval(data []byte) (Permissi
return nil, err
}
return &d, nil
- case PermissionDecisionApproveForSessionApprovalKindFactory:
- var d PermissionDecisionApproveForSessionApprovalFactory
- if err := json.Unmarshal(data, &d); err != nil {
- return nil, err
- }
- return &d, nil
case PermissionDecisionApproveForSessionApprovalKindMCP:
var d PermissionDecisionApproveForSessionApprovalMCP
if err := json.Unmarshal(data, &d); err != nil {
@@ -4889,6 +5205,12 @@ func unmarshalPermissionDecisionApproveForSessionApproval(data []byte) (Permissi
return nil, err
}
return &d, nil
+ case PermissionDecisionApproveForSessionApprovalKindWorkflow:
+ var d PermissionDecisionApproveForSessionApprovalWorkflow
+ if err := json.Unmarshal(data, &d); err != nil {
+ return nil, err
+ }
+ return &d, nil
case PermissionDecisionApproveForSessionApprovalKindWrite:
var d PermissionDecisionApproveForSessionApprovalWrite
if err := json.Unmarshal(data, &d); err != nil {
@@ -4966,8 +5288,8 @@ func (r PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess) Ma
})
}
-func (r PermissionDecisionApproveForSessionApprovalFactory) MarshalJSON() ([]byte, error) {
- type alias PermissionDecisionApproveForSessionApprovalFactory
+func (r PermissionDecisionApproveForSessionApprovalMCP) MarshalJSON() ([]byte, error) {
+ type alias PermissionDecisionApproveForSessionApprovalMCP
return json.Marshal(struct {
Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"`
alias
@@ -4977,8 +5299,8 @@ func (r PermissionDecisionApproveForSessionApprovalFactory) MarshalJSON() ([]byt
})
}
-func (r PermissionDecisionApproveForSessionApprovalMCP) MarshalJSON() ([]byte, error) {
- type alias PermissionDecisionApproveForSessionApprovalMCP
+func (r PermissionDecisionApproveForSessionApprovalMCPSampling) MarshalJSON() ([]byte, error) {
+ type alias PermissionDecisionApproveForSessionApprovalMCPSampling
return json.Marshal(struct {
Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"`
alias
@@ -4988,8 +5310,8 @@ func (r PermissionDecisionApproveForSessionApprovalMCP) MarshalJSON() ([]byte, e
})
}
-func (r PermissionDecisionApproveForSessionApprovalMCPSampling) MarshalJSON() ([]byte, error) {
- type alias PermissionDecisionApproveForSessionApprovalMCPSampling
+func (r PermissionDecisionApproveForSessionApprovalMemory) MarshalJSON() ([]byte, error) {
+ type alias PermissionDecisionApproveForSessionApprovalMemory
return json.Marshal(struct {
Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"`
alias
@@ -4999,8 +5321,8 @@ func (r PermissionDecisionApproveForSessionApprovalMCPSampling) MarshalJSON() ([
})
}
-func (r PermissionDecisionApproveForSessionApprovalMemory) MarshalJSON() ([]byte, error) {
- type alias PermissionDecisionApproveForSessionApprovalMemory
+func (r PermissionDecisionApproveForSessionApprovalRead) MarshalJSON() ([]byte, error) {
+ type alias PermissionDecisionApproveForSessionApprovalRead
return json.Marshal(struct {
Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"`
alias
@@ -5010,8 +5332,8 @@ func (r PermissionDecisionApproveForSessionApprovalMemory) MarshalJSON() ([]byte
})
}
-func (r PermissionDecisionApproveForSessionApprovalRead) MarshalJSON() ([]byte, error) {
- type alias PermissionDecisionApproveForSessionApprovalRead
+func (r PermissionDecisionApproveForSessionApprovalWorkflow) MarshalJSON() ([]byte, error) {
+ type alias PermissionDecisionApproveForSessionApprovalWorkflow
return json.Marshal(struct {
Kind PermissionDecisionApproveForSessionApprovalKind `json:"kind"`
alias
@@ -5238,12 +5560,6 @@ func unmarshalPermissionsLocationsAddToolApprovalDetails(data []byte) (Permissio
return nil, err
}
return &d, nil
- case PermissionsLocationsAddToolApprovalDetailsKindFactory:
- var d PermissionsLocationsAddToolApprovalDetailsFactory
- if err := json.Unmarshal(data, &d); err != nil {
- return nil, err
- }
- return &d, nil
case PermissionsLocationsAddToolApprovalDetailsKindMCP:
var d PermissionsLocationsAddToolApprovalDetailsMCP
if err := json.Unmarshal(data, &d); err != nil {
@@ -5268,6 +5584,12 @@ func unmarshalPermissionsLocationsAddToolApprovalDetails(data []byte) (Permissio
return nil, err
}
return &d, nil
+ case PermissionsLocationsAddToolApprovalDetailsKindWorkflow:
+ var d PermissionsLocationsAddToolApprovalDetailsWorkflow
+ if err := json.Unmarshal(data, &d); err != nil {
+ return nil, err
+ }
+ return &d, nil
case PermissionsLocationsAddToolApprovalDetailsKindWrite:
var d PermissionsLocationsAddToolApprovalDetailsWrite
if err := json.Unmarshal(data, &d); err != nil {
@@ -5345,8 +5667,8 @@ func (r PermissionsLocationsAddToolApprovalDetailsExtensionPermissionAccess) Mar
})
}
-func (r PermissionsLocationsAddToolApprovalDetailsFactory) MarshalJSON() ([]byte, error) {
- type alias PermissionsLocationsAddToolApprovalDetailsFactory
+func (r PermissionsLocationsAddToolApprovalDetailsMCP) MarshalJSON() ([]byte, error) {
+ type alias PermissionsLocationsAddToolApprovalDetailsMCP
return json.Marshal(struct {
Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"`
alias
@@ -5356,8 +5678,8 @@ func (r PermissionsLocationsAddToolApprovalDetailsFactory) MarshalJSON() ([]byte
})
}
-func (r PermissionsLocationsAddToolApprovalDetailsMCP) MarshalJSON() ([]byte, error) {
- type alias PermissionsLocationsAddToolApprovalDetailsMCP
+func (r PermissionsLocationsAddToolApprovalDetailsMCPSampling) MarshalJSON() ([]byte, error) {
+ type alias PermissionsLocationsAddToolApprovalDetailsMCPSampling
return json.Marshal(struct {
Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"`
alias
@@ -5367,8 +5689,8 @@ func (r PermissionsLocationsAddToolApprovalDetailsMCP) MarshalJSON() ([]byte, er
})
}
-func (r PermissionsLocationsAddToolApprovalDetailsMCPSampling) MarshalJSON() ([]byte, error) {
- type alias PermissionsLocationsAddToolApprovalDetailsMCPSampling
+func (r PermissionsLocationsAddToolApprovalDetailsMemory) MarshalJSON() ([]byte, error) {
+ type alias PermissionsLocationsAddToolApprovalDetailsMemory
return json.Marshal(struct {
Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"`
alias
@@ -5378,8 +5700,8 @@ func (r PermissionsLocationsAddToolApprovalDetailsMCPSampling) MarshalJSON() ([]
})
}
-func (r PermissionsLocationsAddToolApprovalDetailsMemory) MarshalJSON() ([]byte, error) {
- type alias PermissionsLocationsAddToolApprovalDetailsMemory
+func (r PermissionsLocationsAddToolApprovalDetailsRead) MarshalJSON() ([]byte, error) {
+ type alias PermissionsLocationsAddToolApprovalDetailsRead
return json.Marshal(struct {
Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"`
alias
@@ -5389,8 +5711,8 @@ func (r PermissionsLocationsAddToolApprovalDetailsMemory) MarshalJSON() ([]byte,
})
}
-func (r PermissionsLocationsAddToolApprovalDetailsRead) MarshalJSON() ([]byte, error) {
- type alias PermissionsLocationsAddToolApprovalDetailsRead
+func (r PermissionsLocationsAddToolApprovalDetailsWorkflow) MarshalJSON() ([]byte, error) {
+ type alias PermissionsLocationsAddToolApprovalDetailsWorkflow
return json.Marshal(struct {
Kind PermissionsLocationsAddToolApprovalDetailsKind `json:"kind"`
alias
diff --git a/go/rpc/zsession_encoding.go b/go/rpc/zsession_encoding.go
index a840934e39..c4e9734912 100644
--- a/go/rpc/zsession_encoding.go
+++ b/go/rpc/zsession_encoding.go
@@ -233,24 +233,6 @@ func (e *SessionEvent) UnmarshalJSON(data []byte) error {
return err
}
e.Data = &d
- case SessionEventTypeFactoryRunSettled:
- var d FactoryRunSettledData
- if err := json.Unmarshal(raw.Data, &d); err != nil {
- return err
- }
- e.Data = &d
- case SessionEventTypeFactoryRunStarted:
- var d FactoryRunStartedData
- if err := json.Unmarshal(raw.Data, &d); err != nil {
- return err
- }
- e.Data = &d
- case SessionEventTypeFactoryRunUpdated:
- var d FactoryRunUpdatedData
- if err := json.Unmarshal(raw.Data, &d); err != nil {
- return err
- }
- e.Data = &d
case SessionEventTypeHookEnd:
var d HookEndData
if err := json.Unmarshal(raw.Data, &d); err != nil {
@@ -929,6 +911,24 @@ func (e *SessionEvent) UnmarshalJSON(data []byte) error {
return err
}
e.Data = &d
+ case SessionEventTypeWorkflowRunSettled:
+ var d WorkflowRunSettledData
+ if err := json.Unmarshal(raw.Data, &d); err != nil {
+ return err
+ }
+ e.Data = &d
+ case SessionEventTypeWorkflowRunStarted:
+ var d WorkflowRunStartedData
+ if err := json.Unmarshal(raw.Data, &d); err != nil {
+ return err
+ }
+ e.Data = &d
+ case SessionEventTypeWorkflowRunUpdated:
+ var d WorkflowRunUpdatedData
+ if err := json.Unmarshal(raw.Data, &d); err != nil {
+ return err
+ }
+ e.Data = &d
default:
e.Data = &RawSessionEventData{EventType: raw.Type, Raw: raw.Data}
}
@@ -1584,12 +1584,6 @@ func unmarshalSystemNotification(data []byte) (SystemNotification, error) {
return nil, err
}
return &d, nil
- case SystemNotificationTypeFactoryCompleted:
- var d SystemNotificationFactoryCompleted
- if err := json.Unmarshal(data, &d); err != nil {
- return nil, err
- }
- return &d, nil
case SystemNotificationTypeInstructionDiscovered:
var d SystemNotificationInstructionDiscovered
if err := json.Unmarshal(data, &d); err != nil {
@@ -1620,6 +1614,12 @@ func unmarshalSystemNotification(data []byte) (SystemNotification, error) {
return nil, err
}
return &d, nil
+ case SystemNotificationTypeWorkflowCompleted:
+ var d SystemNotificationWorkflowCompleted
+ if err := json.Unmarshal(data, &d); err != nil {
+ return nil, err
+ }
+ return &d, nil
default:
return &RawSystemNotification{Discriminator: raw.Type, Raw: data}, nil
}
@@ -1658,12 +1658,67 @@ func (r SystemNotificationAgentIdle) MarshalJSON() ([]byte, error) {
})
}
-func unmarshalSystemNotificationFactoryPauseInfo(data []byte) (SystemNotificationFactoryPauseInfo, error) {
+func (r SystemNotificationInstructionDiscovered) MarshalJSON() ([]byte, error) {
+ type alias SystemNotificationInstructionDiscovered
+ return json.Marshal(struct {
+ Type SystemNotificationType `json:"type"`
+ alias
+ }{
+ Type: r.Type(),
+ alias: alias(r),
+ })
+}
+
+func (r SystemNotificationNewInboxMessage) MarshalJSON() ([]byte, error) {
+ type alias SystemNotificationNewInboxMessage
+ return json.Marshal(struct {
+ Type SystemNotificationType `json:"type"`
+ alias
+ }{
+ Type: r.Type(),
+ alias: alias(r),
+ })
+}
+
+func (r SystemNotificationShellCompleted) MarshalJSON() ([]byte, error) {
+ type alias SystemNotificationShellCompleted
+ return json.Marshal(struct {
+ Type SystemNotificationType `json:"type"`
+ alias
+ }{
+ Type: r.Type(),
+ alias: alias(r),
+ })
+}
+
+func (r SystemNotificationShellDetachedCompleted) MarshalJSON() ([]byte, error) {
+ type alias SystemNotificationShellDetachedCompleted
+ return json.Marshal(struct {
+ Type SystemNotificationType `json:"type"`
+ alias
+ }{
+ Type: r.Type(),
+ alias: alias(r),
+ })
+}
+
+func (r SystemNotificationUnclassified) MarshalJSON() ([]byte, error) {
+ type alias SystemNotificationUnclassified
+ return json.Marshal(struct {
+ Type SystemNotificationType `json:"type"`
+ alias
+ }{
+ Type: r.Type(),
+ alias: alias(r),
+ })
+}
+
+func unmarshalSystemNotificationWorkflowPauseInfo(data []byte) (SystemNotificationWorkflowPauseInfo, error) {
if string(data) == "null" {
return nil, nil
}
type rawUnion struct {
- Type SystemNotificationFactoryPauseInfoType `json:"type"`
+ Type SystemNotificationWorkflowPauseInfoType `json:"type"`
}
var raw rawUnion
if err := json.Unmarshal(data, &raw); err != nil {
@@ -1671,38 +1726,38 @@ func unmarshalSystemNotificationFactoryPauseInfo(data []byte) (SystemNotificatio
}
switch raw.Type {
- case SystemNotificationFactoryPauseInfoTypeCheckpoint:
- var d SystemNotificationFactoryPauseInfoCheckpoint
+ case SystemNotificationWorkflowPauseInfoTypeCheckpoint:
+ var d SystemNotificationWorkflowPauseInfoCheckpoint
if err := json.Unmarshal(data, &d); err != nil {
return nil, err
}
return &d, nil
- case SystemNotificationFactoryPauseInfoTypeUser:
- var d SystemNotificationFactoryPauseInfoUser
+ case SystemNotificationWorkflowPauseInfoTypeUser:
+ var d SystemNotificationWorkflowPauseInfoUser
if err := json.Unmarshal(data, &d); err != nil {
return nil, err
}
return &d, nil
default:
- return &RawSystemNotificationFactoryPauseInfo{Discriminator: raw.Type, Raw: data}, nil
+ return &RawSystemNotificationWorkflowPauseInfo{Discriminator: raw.Type, Raw: data}, nil
}
}
-func (r RawSystemNotificationFactoryPauseInfo) MarshalJSON() ([]byte, error) {
+func (r RawSystemNotificationWorkflowPauseInfo) MarshalJSON() ([]byte, error) {
if r.Raw != nil {
return r.Raw, nil
}
return json.Marshal(struct {
- Type SystemNotificationFactoryPauseInfoType `json:"type"`
+ Type SystemNotificationWorkflowPauseInfoType `json:"type"`
}{
Type: r.Discriminator,
})
}
-func (r SystemNotificationFactoryPauseInfoCheckpoint) MarshalJSON() ([]byte, error) {
- type alias SystemNotificationFactoryPauseInfoCheckpoint
+func (r SystemNotificationWorkflowPauseInfoCheckpoint) MarshalJSON() ([]byte, error) {
+ type alias SystemNotificationWorkflowPauseInfoCheckpoint
return json.Marshal(struct {
- Type SystemNotificationFactoryPauseInfoType `json:"type"`
+ Type SystemNotificationWorkflowPauseInfoType `json:"type"`
alias
}{
Type: r.Type(),
@@ -1710,10 +1765,10 @@ func (r SystemNotificationFactoryPauseInfoCheckpoint) MarshalJSON() ([]byte, err
})
}
-func (r SystemNotificationFactoryPauseInfoUser) MarshalJSON() ([]byte, error) {
- type alias SystemNotificationFactoryPauseInfoUser
+func (r SystemNotificationWorkflowPauseInfoUser) MarshalJSON() ([]byte, error) {
+ type alias SystemNotificationWorkflowPauseInfoUser
return json.Marshal(struct {
- Type SystemNotificationFactoryPauseInfoType `json:"type"`
+ Type SystemNotificationWorkflowPauseInfoType `json:"type"`
alias
}{
Type: r.Type(),
@@ -1721,21 +1776,21 @@ func (r SystemNotificationFactoryPauseInfoUser) MarshalJSON() ([]byte, error) {
})
}
-func (r *SystemNotificationFactoryCompleted) UnmarshalJSON(data []byte) error {
- type rawSystemNotificationFactoryCompleted struct {
- Attempt int64 `json:"attempt"`
- ConsumedNanoAiu int64 `json:"consumedNanoAiu"`
- ConsumedSubagents int64 `json:"consumedSubagents"`
- ElapsedMs int64 `json:"elapsedMs"`
- FactoryName string `json:"factoryName"`
- Failure any `json:"failure,omitempty"`
- PauseInfo json.RawMessage `json:"pauseInfo,omitempty"`
- ResultPreview *string `json:"resultPreview,omitempty"`
- RetryGuidance *string `json:"retryGuidance,omitempty"`
- RunID string `json:"runId"`
- Status SystemNotificationFactoryCompletedStatus `json:"status"`
+func (r *SystemNotificationWorkflowCompleted) UnmarshalJSON(data []byte) error {
+ type rawSystemNotificationWorkflowCompleted struct {
+ Attempt int64 `json:"attempt"`
+ ConsumedNanoAiu int64 `json:"consumedNanoAiu"`
+ ConsumedSubagents int64 `json:"consumedSubagents"`
+ ElapsedMs int64 `json:"elapsedMs"`
+ Failure any `json:"failure,omitempty"`
+ PauseInfo json.RawMessage `json:"pauseInfo,omitempty"`
+ ResultPreview *string `json:"resultPreview,omitempty"`
+ RetryGuidance *string `json:"retryGuidance,omitempty"`
+ RunID string `json:"runId"`
+ Status SystemNotificationWorkflowCompletedStatus `json:"status"`
+ WorkflowName string `json:"workflowName"`
}
- var raw rawSystemNotificationFactoryCompleted
+ var raw rawSystemNotificationWorkflowCompleted
if err := json.Unmarshal(data, &raw); err != nil {
return err
}
@@ -1743,10 +1798,9 @@ func (r *SystemNotificationFactoryCompleted) UnmarshalJSON(data []byte) error {
r.ConsumedNanoAiu = raw.ConsumedNanoAiu
r.ConsumedSubagents = raw.ConsumedSubagents
r.ElapsedMs = raw.ElapsedMs
- r.FactoryName = raw.FactoryName
r.Failure = raw.Failure
if raw.PauseInfo != nil {
- value, err := unmarshalSystemNotificationFactoryPauseInfo(raw.PauseInfo)
+ value, err := unmarshalSystemNotificationWorkflowPauseInfo(raw.PauseInfo)
if err != nil {
return err
}
@@ -1756,66 +1810,12 @@ func (r *SystemNotificationFactoryCompleted) UnmarshalJSON(data []byte) error {
r.RetryGuidance = raw.RetryGuidance
r.RunID = raw.RunID
r.Status = raw.Status
+ r.WorkflowName = raw.WorkflowName
return nil
}
-func (r SystemNotificationFactoryCompleted) MarshalJSON() ([]byte, error) {
- type alias SystemNotificationFactoryCompleted
- return json.Marshal(struct {
- Type SystemNotificationType `json:"type"`
- alias
- }{
- Type: r.Type(),
- alias: alias(r),
- })
-}
-
-func (r SystemNotificationInstructionDiscovered) MarshalJSON() ([]byte, error) {
- type alias SystemNotificationInstructionDiscovered
- return json.Marshal(struct {
- Type SystemNotificationType `json:"type"`
- alias
- }{
- Type: r.Type(),
- alias: alias(r),
- })
-}
-
-func (r SystemNotificationNewInboxMessage) MarshalJSON() ([]byte, error) {
- type alias SystemNotificationNewInboxMessage
- return json.Marshal(struct {
- Type SystemNotificationType `json:"type"`
- alias
- }{
- Type: r.Type(),
- alias: alias(r),
- })
-}
-
-func (r SystemNotificationShellCompleted) MarshalJSON() ([]byte, error) {
- type alias SystemNotificationShellCompleted
- return json.Marshal(struct {
- Type SystemNotificationType `json:"type"`
- alias
- }{
- Type: r.Type(),
- alias: alias(r),
- })
-}
-
-func (r SystemNotificationShellDetachedCompleted) MarshalJSON() ([]byte, error) {
- type alias SystemNotificationShellDetachedCompleted
- return json.Marshal(struct {
- Type SystemNotificationType `json:"type"`
- alias
- }{
- Type: r.Type(),
- alias: alias(r),
- })
-}
-
-func (r SystemNotificationUnclassified) MarshalJSON() ([]byte, error) {
- type alias SystemNotificationUnclassified
+func (r SystemNotificationWorkflowCompleted) MarshalJSON() ([]byte, error) {
+ type alias SystemNotificationWorkflowCompleted
return json.Marshal(struct {
Type SystemNotificationType `json:"type"`
alias
@@ -1884,12 +1884,6 @@ func unmarshalPermissionRequest(data []byte) (PermissionRequest, error) {
return nil, err
}
return &d, nil
- case PermissionRequestKindFactory:
- var d PermissionRequestFactory
- if err := json.Unmarshal(data, &d); err != nil {
- return nil, err
- }
- return &d, nil
case PermissionRequestKindHook:
var d PermissionRequestHook
if err := json.Unmarshal(data, &d); err != nil {
@@ -1926,6 +1920,12 @@ func unmarshalPermissionRequest(data []byte) (PermissionRequest, error) {
return nil, err
}
return &d, nil
+ case PermissionRequestKindWorkflow:
+ var d PermissionRequestWorkflow
+ if err := json.Unmarshal(data, &d); err != nil {
+ return nil, err
+ }
+ return &d, nil
case PermissionRequestKindWrite:
var d PermissionRequestWrite
if err := json.Unmarshal(data, &d); err != nil {
@@ -1992,17 +1992,6 @@ func (r PermissionRequestExtensionPermissionAccess) MarshalJSON() ([]byte, error
})
}
-func (r PermissionRequestFactory) MarshalJSON() ([]byte, error) {
- type alias PermissionRequestFactory
- return json.Marshal(struct {
- Kind PermissionRequestKind `json:"kind"`
- alias
- }{
- Kind: r.Kind(),
- alias: alias(r),
- })
-}
-
func (r PermissionRequestHook) MarshalJSON() ([]byte, error) {
type alias PermissionRequestHook
return json.Marshal(struct {
@@ -2069,6 +2058,17 @@ func (r PermissionRequestURL) MarshalJSON() ([]byte, error) {
})
}
+func (r PermissionRequestWorkflow) MarshalJSON() ([]byte, error) {
+ type alias PermissionRequestWorkflow
+ return json.Marshal(struct {
+ Kind PermissionRequestKind `json:"kind"`
+ alias
+ }{
+ Kind: r.Kind(),
+ alias: alias(r),
+ })
+}
+
func (r PermissionRequestWrite) MarshalJSON() ([]byte, error) {
type alias PermissionRequestWrite
return json.Marshal(struct {
@@ -2123,12 +2123,6 @@ func unmarshalPermissionPromptRequest(data []byte) (PermissionPromptRequest, err
return nil, err
}
return &d, nil
- case PermissionPromptRequestKindFactory:
- var d PermissionPromptRequestFactory
- if err := json.Unmarshal(data, &d); err != nil {
- return nil, err
- }
- return &d, nil
case PermissionPromptRequestKindHook:
var d PermissionPromptRequestHook
if err := json.Unmarshal(data, &d); err != nil {
@@ -2165,6 +2159,12 @@ func unmarshalPermissionPromptRequest(data []byte) (PermissionPromptRequest, err
return nil, err
}
return &d, nil
+ case PermissionPromptRequestKindWorkflow:
+ var d PermissionPromptRequestWorkflow
+ if err := json.Unmarshal(data, &d); err != nil {
+ return nil, err
+ }
+ return &d, nil
case PermissionPromptRequestKindWrite:
var d PermissionPromptRequestWrite
if err := json.Unmarshal(data, &d); err != nil {
@@ -2242,17 +2242,6 @@ func (r PermissionPromptRequestExtensionPermissionAccess) MarshalJSON() ([]byte,
})
}
-func (r PermissionPromptRequestFactory) MarshalJSON() ([]byte, error) {
- type alias PermissionPromptRequestFactory
- return json.Marshal(struct {
- Kind PermissionPromptRequestKind `json:"kind"`
- alias
- }{
- Kind: r.Kind(),
- alias: alias(r),
- })
-}
-
func (r PermissionPromptRequestHook) MarshalJSON() ([]byte, error) {
type alias PermissionPromptRequestHook
return json.Marshal(struct {
@@ -2319,6 +2308,17 @@ func (r PermissionPromptRequestURL) MarshalJSON() ([]byte, error) {
})
}
+func (r PermissionPromptRequestWorkflow) MarshalJSON() ([]byte, error) {
+ type alias PermissionPromptRequestWorkflow
+ return json.Marshal(struct {
+ Kind PermissionPromptRequestKind `json:"kind"`
+ alias
+ }{
+ Kind: r.Kind(),
+ alias: alias(r),
+ })
+}
+
func (r PermissionPromptRequestWrite) MarshalJSON() ([]byte, error) {
type alias PermissionPromptRequestWrite
return json.Marshal(struct {
diff --git a/go/rpc/zsession_events.go b/go/rpc/zsession_events.go
index 3d341cb51e..6572555aca 100644
--- a/go/rpc/zsession_events.go
+++ b/go/rpc/zsession_events.go
@@ -94,30 +94,21 @@ const (
SessionEventTypeExitPlanModeRequested SessionEventType = "exit_plan_mode.requested"
SessionEventTypeExternalToolCompleted SessionEventType = "external_tool.completed"
SessionEventTypeExternalToolRequested SessionEventType = "external_tool.requested"
- // Experimental: SessionEventTypeFactoryRunSettled identifies an experimental event that may
- // change or be removed.
- SessionEventTypeFactoryRunSettled SessionEventType = "factory.run_settled"
- // Experimental: SessionEventTypeFactoryRunStarted identifies an experimental event that may
- // change or be removed.
- SessionEventTypeFactoryRunStarted SessionEventType = "factory.run_started"
- // Experimental: SessionEventTypeFactoryRunUpdated identifies an experimental event that may
- // change or be removed.
- SessionEventTypeFactoryRunUpdated SessionEventType = "factory.run_updated"
- SessionEventTypeHookEnd SessionEventType = "hook.end"
- SessionEventTypeHookProgress SessionEventType = "hook.progress"
- SessionEventTypeHookStart SessionEventType = "hook.start"
- SessionEventTypeMCPAppToolCallComplete SessionEventType = "mcp_app.tool_call_complete"
- SessionEventTypeMCPHeadersRefreshCompleted SessionEventType = "mcp.headers_refresh_completed"
- SessionEventTypeMCPHeadersRefreshRequired SessionEventType = "mcp.headers_refresh_required"
- SessionEventTypeMCPOauthCompleted SessionEventType = "mcp.oauth_completed"
- SessionEventTypeMCPOauthRequired SessionEventType = "mcp.oauth_required"
- SessionEventTypeMCPPromptsListChanged SessionEventType = "mcp.prompts.list_changed"
- SessionEventTypeMCPResourcesListChanged SessionEventType = "mcp.resources.list_changed"
- SessionEventTypeMCPToolsListChanged SessionEventType = "mcp.tools.list_changed"
- SessionEventTypeModelCallFailure SessionEventType = "model.call_failure"
- SessionEventTypeModelCallFinished SessionEventType = "model.call_finished"
- SessionEventTypeModelCallStart SessionEventType = "model.call_start"
- SessionEventTypePendingMessagesModified SessionEventType = "pending_messages.modified"
+ SessionEventTypeHookEnd SessionEventType = "hook.end"
+ SessionEventTypeHookProgress SessionEventType = "hook.progress"
+ SessionEventTypeHookStart SessionEventType = "hook.start"
+ SessionEventTypeMCPAppToolCallComplete SessionEventType = "mcp_app.tool_call_complete"
+ SessionEventTypeMCPHeadersRefreshCompleted SessionEventType = "mcp.headers_refresh_completed"
+ SessionEventTypeMCPHeadersRefreshRequired SessionEventType = "mcp.headers_refresh_required"
+ SessionEventTypeMCPOauthCompleted SessionEventType = "mcp.oauth_completed"
+ SessionEventTypeMCPOauthRequired SessionEventType = "mcp.oauth_required"
+ SessionEventTypeMCPPromptsListChanged SessionEventType = "mcp.prompts.list_changed"
+ SessionEventTypeMCPResourcesListChanged SessionEventType = "mcp.resources.list_changed"
+ SessionEventTypeMCPToolsListChanged SessionEventType = "mcp.tools.list_changed"
+ SessionEventTypeModelCallFailure SessionEventType = "model.call_failure"
+ SessionEventTypeModelCallFinished SessionEventType = "model.call_finished"
+ SessionEventTypeModelCallStart SessionEventType = "model.call_start"
+ SessionEventTypePendingMessagesModified SessionEventType = "pending_messages.modified"
// Experimental: SessionEventTypePermissionAssentDetected identifies an experimental event
// that may change or be removed.
SessionEventTypePermissionAssentDetected SessionEventType = "permission.assentDetected"
@@ -270,6 +261,15 @@ const (
SessionEventTypeUserInputCompleted SessionEventType = "user_input.completed"
SessionEventTypeUserInputRequested SessionEventType = "user_input.requested"
SessionEventTypeUserMessage SessionEventType = "user.message"
+ // Experimental: SessionEventTypeWorkflowRunSettled identifies an experimental event that
+ // may change or be removed.
+ SessionEventTypeWorkflowRunSettled SessionEventType = "workflow.run_settled"
+ // Experimental: SessionEventTypeWorkflowRunStarted identifies an experimental event that
+ // may change or be removed.
+ SessionEventTypeWorkflowRunStarted SessionEventType = "workflow.run_started"
+ // Experimental: SessionEventTypeWorkflowRunUpdated identifies an experimental event that
+ // may change or be removed.
+ SessionEventTypeWorkflowRunUpdated SessionEventType = "workflow.run_updated"
)
// A detected loss of a previously cached prompt prefix
@@ -639,9 +639,12 @@ func (*SessionContextClearedData) Type() SessionEventType {
// Conversation compaction results including success status, metrics, and optional error details
type SessionCompactionCompleteData struct {
- // Authoritative active-factory reminder appended to the compacted context
+ // Legacy active-workflow reminder retained for replay compatibility
// Internal: ActiveFactorySummary is part of the SDK's internal API surface and is not intended for external use.
ActiveFactorySummary *string `json:"activeFactorySummary,omitempty"`
+ // Authoritative active-workflow reminder appended to the compacted context
+ // Internal: ActiveWorkflowSummary is part of the SDK's internal API surface and is not intended for external use.
+ ActiveWorkflowSummary *string `json:"activeWorkflowSummary,omitempty"`
// Canonical model identifier used for model-specific behavior when replaying compaction
BehaviorModelID *string `json:"behaviorModelId,omitempty"`
// Checkpoint snapshot number created for recovery
@@ -912,17 +915,17 @@ func (*SessionManagedSettingsResolvedData) Type() SessionEventType {
return SessionEventTypeSessionManagedSettingsResolved
}
-// Ephemeral invalidation signal for a changed factory run.
-// Experimental: FactoryRunUpdatedData is part of an experimental API and may change or be removed.
-type FactoryRunUpdatedData struct {
+// Ephemeral invalidation signal for a changed workflow run.
+// Experimental: WorkflowRunUpdatedData is part of an experimental API and may change or be removed.
+type WorkflowRunUpdatedData struct {
// Monotonic revision now available for the run.
Revision int64 `json:"revision"`
- // Factory run identifier.
+ // Workflow run identifier.
RunID string `json:"runId"`
}
-func (*FactoryRunUpdatedData) sessionEventData() {}
-func (*FactoryRunUpdatedData) Type() SessionEventType { return SessionEventTypeFactoryRunUpdated }
+func (*WorkflowRunUpdatedData) sessionEventData() {}
+func (*WorkflowRunUpdatedData) Type() SessionEventType { return SessionEventTypeWorkflowRunUpdated }
// Ephemeral progress update from a running hook process
type HookProgressData struct {
@@ -935,39 +938,39 @@ type HookProgressData struct {
func (*HookProgressData) sessionEventData() {}
func (*HookProgressData) Type() SessionEventType { return SessionEventTypeHookProgress }
-// Ephemeral signal that a factory run attempt began executing.
-// Experimental: FactoryRunStartedData is part of an experimental API and may change or be removed.
-type FactoryRunStartedData struct {
+// Ephemeral signal that a workflow run attempt began executing.
+// Experimental: WorkflowRunStartedData is part of an experimental API and may change or be removed.
+type WorkflowRunStartedData struct {
// Attempt number this start committed; a resumed run increments it.
Attempt int64 `json:"attempt"`
- // Name of the factory this run executes. Low cardinality by construction.
- FactoryName string `json:"factoryName"`
- // Identifier of the factory run that started.
+ // Identifier of the workflow run that started.
RunID string `json:"runId"`
+ // Name of the workflow this run executes. Low cardinality by construction.
+ WorkflowName string `json:"workflowName"`
}
-func (*FactoryRunStartedData) sessionEventData() {}
-func (*FactoryRunStartedData) Type() SessionEventType { return SessionEventTypeFactoryRunStarted }
+func (*WorkflowRunStartedData) sessionEventData() {}
+func (*WorkflowRunStartedData) Type() SessionEventType { return SessionEventTypeWorkflowRunStarted }
-// Ephemeral signal that a factory run reached a terminal status.
-// Experimental: FactoryRunSettledData is part of an experimental API and may change or be removed.
-type FactoryRunSettledData struct {
+// Ephemeral signal that a workflow run reached a terminal status.
+// Experimental: WorkflowRunSettledData is part of an experimental API and may change or be removed.
+type WorkflowRunSettledData struct {
// AI credits this run consumed, in nano-AIU.
ConsumedNanoAiu int64 `json:"consumedNanoAiu"`
// Subagents this run consumed against its limits.
ConsumedSubagents int64 `json:"consumedSubagents"`
// Active milliseconds accumulated across every attempt of this run.
ElapsedMs int64 `json:"elapsedMs"`
- // Typed failure class recorded on the run, when it failed with one (e.g. `factory_limit_reached`).
+ // Typed failure class recorded on the run, when it failed with one (e.g. `workflow_limit_reached`).
FailureType *string `json:"failureType,omitempty"`
- // Identifier of the factory run that settled.
+ // Identifier of the workflow run that settled.
RunID string `json:"runId"`
// Terminal status the run committed.
- Status FactoryRunSettledStatus `json:"status"`
+ Status WorkflowRunSettledStatus `json:"status"`
}
-func (*FactoryRunSettledData) sessionEventData() {}
-func (*FactoryRunSettledData) Type() SessionEventType { return SessionEventTypeFactoryRunSettled }
+func (*WorkflowRunSettledData) sessionEventData() {}
+func (*WorkflowRunSettledData) Type() SessionEventType { return SessionEventTypeWorkflowRunSettled }
// Error details for timeline display including message and optional diagnostic information
type SessionErrorData struct {
@@ -1398,35 +1401,7 @@ type ModelCallFinishedData struct {
func (*ModelCallFinishedData) sessionEventData() {}
func (*ModelCallFinishedData) Type() SessionEventType { return SessionEventTypeModelCallFinished }
-// Freezes a blinded contextual authorization proposal whose verbatim human span was deterministically bound to the immediately preceding blocked permission request. The event carries no action fields; replay re-derives the exact action from the earlier permission request and mints a one-shot message grant only when the binding and span still verify.
-// Experimental: PermissionContextualAuthorizationData is part of an experimental API and may change or be removed.
-type PermissionContextualAuthorizationData struct {
- // Whether the contextual human span granted or denied authority.
- // Experimental: Polarity is part of an experimental API and may change or be removed.
- Polarity PermissionMessageAuthorizationPolarity `json:"polarity"`
- // Deterministic identity of the contextual message grant.
- // Experimental: RecordID is part of an experimental API and may change or be removed.
- RecordID string `json:"recordId"`
- // Original blocked permission request selected by deterministic event ordering, never by the extraction model.
- // Experimental: RequestID is part of an experimental API and may change or be removed.
- RequestID string `json:"requestId"`
- // End byte offset of the contextual decision span within the turn.
- // Experimental: SpanEnd is part of an experimental API and may change or be removed.
- SpanEnd int64 `json:"spanEnd"`
- // Start byte offset of the contextual decision span within the turn.
- // Experimental: SpanStart is part of an experimental API and may change or be removed.
- SpanStart int64 `json:"spanStart"`
- // Human turn containing the contextual decision.
- // Experimental: TurnIndex is part of an experimental API and may change or be removed.
- TurnIndex int64 `json:"turnIndex"`
-}
-
-func (*PermissionContextualAuthorizationData) sessionEventData() {}
-func (*PermissionContextualAuthorizationData) Type() SessionEventType {
- return SessionEventTypePermissionContextualAuthorization
-}
-
-// Freezes one blinded, verbatim-verified authorization claim the runtime minted from a human user message, so a resumed session re-establishes the same grant deterministically instead of re-running the extraction model. This mints no authority on its own: it records what a blinded proposer pointed at and the trusted discriminator the runtime established, and deterministic establishment runs on replay. Persisted so recorded authority survives compaction and process resume.
+// Historical decode-only claim from the retired Assisted Permissions authorization extractor. Current runtimes preserve the payload but do not establish authority from it.
// Experimental: PermissionMessageAuthorizationData is part of an experimental API and may change or be removed.
type PermissionMessageAuthorizationData struct {
// The kind of effect authorized, as an action-class identifier.
@@ -1463,6 +1438,101 @@ func (*PermissionMessageAuthorizationData) Type() SessionEventType {
return SessionEventTypePermissionMessageAuthorization
}
+// Historical decode-only contextual authorization claim. Current runtimes preserve the payload but do not establish authority from it.
+// Experimental: PermissionContextualAuthorizationData is part of an experimental API and may change or be removed.
+type PermissionContextualAuthorizationData struct {
+ // Whether the contextual human span granted or denied authority.
+ // Experimental: Polarity is part of an experimental API and may change or be removed.
+ Polarity PermissionMessageAuthorizationPolarity `json:"polarity"`
+ // Deterministic identity of the contextual message grant.
+ // Experimental: RecordID is part of an experimental API and may change or be removed.
+ RecordID string `json:"recordId"`
+ // Original blocked permission request selected by deterministic event ordering, never by the extraction model.
+ // Experimental: RequestID is part of an experimental API and may change or be removed.
+ RequestID string `json:"requestId"`
+ // End byte offset of the contextual decision span within the turn.
+ // Experimental: SpanEnd is part of an experimental API and may change or be removed.
+ SpanEnd int64 `json:"spanEnd"`
+ // Start byte offset of the contextual decision span within the turn.
+ // Experimental: SpanStart is part of an experimental API and may change or be removed.
+ SpanStart int64 `json:"spanStart"`
+ // Human turn containing the contextual decision.
+ // Experimental: TurnIndex is part of an experimental API and may change or be removed.
+ TurnIndex int64 `json:"turnIndex"`
+}
+
+func (*PermissionContextualAuthorizationData) sessionEventData() {}
+func (*PermissionContextualAuthorizationData) Type() SessionEventType {
+ return SessionEventTypePermissionContextualAuthorization
+}
+
+// Historical decode-only contextual-assent marker. Current runtimes do not project it into the conversation or permission flow.
+// Experimental: PermissionAssentDetectedData is part of an experimental API and may change or be removed.
+type PermissionAssentDetectedData struct {
+ // Permission request the likely assent may refer to. The runtime derives this from the preceding durable blocker; the human message and extraction model do not choose it.
+ // Experimental: RequestID is part of an experimental API and may change or be removed.
+ RequestID string `json:"requestId"`
+ // Human turn whose text triggered the deterministic assent recognizer.
+ // Experimental: TurnIndex is part of an experimental API and may change or be removed.
+ TurnIndex int64 `json:"turnIndex"`
+}
+
+func (*PermissionAssentDetectedData) sessionEventData() {}
+func (*PermissionAssentDetectedData) Type() SessionEventType {
+ return SessionEventTypePermissionAssentDetected
+}
+
+// Historical decode-only degradation marker from the retired extractor. Current runtimes ignore it for permission decisions.
+// Experimental: PermissionMessageAuthorizationDegradedData is part of an experimental API and may change or be removed.
+type PermissionMessageAuthorizationDegradedData struct {
+ // The human turn that could not be represented safely.
+ // Experimental: TurnIndex is part of an experimental API and may change or be removed.
+ TurnIndex int64 `json:"turnIndex"`
+}
+
+func (*PermissionMessageAuthorizationDegradedData) sessionEventData() {}
+func (*PermissionMessageAuthorizationDegradedData) Type() SessionEventType {
+ return SessionEventTypePermissionMessageAuthorizationDegraded
+}
+
+// Historical decode-only extractor progress marker. Current runtimes do not run or resume extraction from it.
+// Experimental: PermissionMessageAuthorizationReadData is part of an experimental API and may change or be removed.
+type PermissionMessageAuthorizationReadData struct {
+ // Whether this read activates ongoing message-backed extraction. False for a contextual-assent-only pass while auto-approval is off, so unrelated future messages remain outside extraction.
+ // Experimental: ActivatesExtraction is part of an experimental API and may change or be removed.
+ ActivatesExtraction *bool `json:"activatesExtraction,omitempty"`
+ // The human turn that was read by the proposer.
+ // Experimental: TurnIndex is part of an experimental API and may change or be removed.
+ TurnIndex int64 `json:"turnIndex"`
+}
+
+func (*PermissionMessageAuthorizationReadData) sessionEventData() {}
+func (*PermissionMessageAuthorizationReadData) Type() SessionEventType {
+ return SessionEventTypePermissionMessageAuthorizationRead
+}
+
+// Historical decode-only receipt from the retired Assisted Permissions authorization extractor. Current runtimes ignore it for permission decisions.
+// Experimental: PermissionCarriedForwardData is part of an experimental API and may change or be removed.
+type PermissionCarriedForwardData struct {
+ // Always `authorization_carry_forward`. Stated explicitly so a consumer reading this event cannot mistake it for a human, host-policy, or assisted-approval decision.
+ // Experimental: DecisionSource is part of an experimental API and may change or be removed.
+ DecisionSource PermissionDecisionSource `json:"decisionSource"`
+ // Identity of the prior authorization record that contained the proposal.
+ // Experimental: RecordID is part of an experimental API and may change or be removed.
+ RecordID string `json:"recordId"`
+ // Authorization edge minted for this admission. Not a prompt id: no prompt was raised, so no client should expect a request with this id.
+ // Experimental: RequestID is part of an experimental API and may change or be removed.
+ RequestID string `json:"requestId"`
+ // Tool call this admission authorizes. Its execution receipts the prior grant, which is how a single-effect approval is spent rather than carried forward again.
+ // Experimental: ToolCallID is part of an experimental API and may change or be removed.
+ ToolCallID string `json:"toolCallId"`
+}
+
+func (*PermissionCarriedForwardData) sessionEventData() {}
+func (*PermissionCarriedForwardData) Type() SessionEventType {
+ return SessionEventTypePermissionCarriedForward
+}
+
// Hook invocation completion details including output, success status, and error information
type HookEndData struct {
// Error details when the hook failed
@@ -2305,28 +2375,6 @@ type CommandQueuedData struct {
func (*CommandQueuedData) sessionEventData() {}
func (*CommandQueuedData) Type() SessionEventType { return SessionEventTypeCommandQueued }
-// Records that a live authorization record from an earlier human decision in this session contained a permission proposal, so it ran without another prompt. This mints no authority: it accounts for one more effect against the prior grant, which is what lets a replayed session agree with the live one about how much of that grant is left.
-// Experimental: PermissionCarriedForwardData is part of an experimental API and may change or be removed.
-type PermissionCarriedForwardData struct {
- // Always `authorization_carry_forward`. Stated explicitly so a consumer reading this event cannot mistake it for a human, host-policy, or assisted-approval decision.
- // Experimental: DecisionSource is part of an experimental API and may change or be removed.
- DecisionSource PermissionDecisionSource `json:"decisionSource"`
- // Identity of the prior authorization record that contained the proposal.
- // Experimental: RecordID is part of an experimental API and may change or be removed.
- RecordID string `json:"recordId"`
- // Authorization edge minted for this admission. Not a prompt id: no prompt was raised, so no client should expect a request with this id.
- // Experimental: RequestID is part of an experimental API and may change or be removed.
- RequestID string `json:"requestId"`
- // Tool call this admission authorizes. Its execution receipts the prior grant, which is how a single-effect approval is spent rather than carried forward again.
- // Experimental: ToolCallID is part of an experimental API and may change or be removed.
- ToolCallID string `json:"toolCallId"`
-}
-
-func (*PermissionCarriedForwardData) sessionEventData() {}
-func (*PermissionCarriedForwardData) Type() SessionEventType {
- return SessionEventTypePermissionCarriedForward
-}
-
// Records that a mode transition notice reached the model so cache-stable mode tools can remain offered across resume.
type SessionModeNoticeDeliveredData struct {
// Model-visible transition notice persisted for a mid-turn delivery
@@ -2340,51 +2388,6 @@ func (*SessionModeNoticeDeliveredData) Type() SessionEventType {
return SessionEventTypeSessionModeNoticeDelivered
}
-// Records that deterministic text recognition found likely assent in the human turn immediately following a root Autopilot permission request that was blocked because no interactive response was available. This event grants no authority; its model-facing projection only suggests retrying the unchanged operation.
-// Experimental: PermissionAssentDetectedData is part of an experimental API and may change or be removed.
-type PermissionAssentDetectedData struct {
- // Permission request the likely assent may refer to. The runtime derives this from the preceding durable blocker; the human message and extraction model do not choose it.
- // Experimental: RequestID is part of an experimental API and may change or be removed.
- RequestID string `json:"requestId"`
- // Human turn whose text triggered the deterministic assent recognizer.
- // Experimental: TurnIndex is part of an experimental API and may change or be removed.
- TurnIndex int64 `json:"turnIndex"`
-}
-
-func (*PermissionAssentDetectedData) sessionEventData() {}
-func (*PermissionAssentDetectedData) Type() SessionEventType {
- return SessionEventTypePermissionAssentDetected
-}
-
-// Records that message-backed authorization could not safely represent one human turn before compaction. The runtime may compact the original message after this marker is durable, but message-derived carry-forward and assisted auto-approval remain disabled for the rest of the session so subsequent commands continue through the ordinary permission prompt.
-// Experimental: PermissionMessageAuthorizationDegradedData is part of an experimental API and may change or be removed.
-type PermissionMessageAuthorizationDegradedData struct {
- // The human turn that could not be represented safely.
- // Experimental: TurnIndex is part of an experimental API and may change or be removed.
- TurnIndex int64 `json:"turnIndex"`
-}
-
-func (*PermissionMessageAuthorizationDegradedData) sessionEventData() {}
-func (*PermissionMessageAuthorizationDegradedData) Type() SessionEventType {
- return SessionEventTypePermissionMessageAuthorizationDegraded
-}
-
-// Records that one human turn has been read by the blinded authorization proposer, whether or not it minted anything, so a resumed session does not re-run the extraction model on a turn the live session already read. Also records whether that pass activates ongoing extraction; contextual-assent-only passes do not, so unrelated future messages remain outside extraction.
-// Experimental: PermissionMessageAuthorizationReadData is part of an experimental API and may change or be removed.
-type PermissionMessageAuthorizationReadData struct {
- // Whether this read activates ongoing message-backed extraction. False for a contextual-assent-only pass while auto-approval is off, so unrelated future messages remain outside extraction.
- // Experimental: ActivatesExtraction is part of an experimental API and may change or be removed.
- ActivatesExtraction *bool `json:"activatesExtraction,omitempty"`
- // The human turn that was read by the proposer.
- // Experimental: TurnIndex is part of an experimental API and may change or be removed.
- TurnIndex int64 `json:"turnIndex"`
-}
-
-func (*PermissionMessageAuthorizationReadData) sessionEventData() {}
-func (*PermissionMessageAuthorizationReadData) Type() SessionEventType {
- return SessionEventTypePermissionMessageAuthorizationRead
-}
-
// Registered command dispatch request routed to the owning client
type CommandExecuteData struct {
// Raw argument string after the command name
@@ -2938,7 +2941,7 @@ type SubagentStartedData struct {
AgentType *string `json:"agentType,omitempty"`
// Whether the sub-agent runs synchronously or in the background.
ExecutionMode *string `json:"executionMode,omitempty"`
- // Root id of the factory run that spawned this sub-agent, when it was spawned by one.
+ // Legacy root id of the workflow run that spawned this sub-agent. New consumers should use workflowRunId.
FactoryRunID *string `json:"factoryRunId,omitempty"`
// Model the sub-agent will run with, when known at start.
Model *string `json:"model,omitempty"`
@@ -2948,10 +2951,12 @@ type SubagentStartedData struct {
ParentID *string `json:"parentId,omitempty"`
// Whether this sub-agent can be resumed. Currently always false.
Resumable *bool `json:"resumable,omitempty"`
- // Where the model input for this sub-agent came from. Present when the task planner resolved the launch (the task tool and factory agents); absent for sub-agents created through other runtime paths.
+ // Where the model input for this sub-agent came from. Present when the task planner resolved the launch (the task tool and workflow agents); absent for sub-agents created through other runtime paths.
TaskModelSource *SubagentTaskModelSource `json:"taskModelSource,omitempty"`
// Tool call ID of the parent tool invocation that spawned this sub-agent
ToolCallID string `json:"toolCallId"`
+ // Root id of the workflow run that spawned this sub-agent, when it was spawned by one.
+ WorkflowRunID *string `json:"workflowRunId,omitempty"`
}
func (*SubagentStartedData) sessionEventData() {}
@@ -3678,14 +3683,6 @@ type ExtensionsLoadedExtension struct {
Status ExtensionsLoadedExtensionStatus `json:"status"`
}
-// A declared phase shown in a factory permission prompt.
-type FactoryPermissionPhase struct {
- // Optional phase detail
- Detail *string `json:"detail,omitempty"`
- // Phase title
- Title string `json:"title"`
-}
-
// Experimental attribution linking an ordinary event to the HydraFusion turn, phase, and concrete source that produced it.
// Experimental: FusionAttribution is part of an experimental API and may change or be removed.
type FusionAttribution struct {
@@ -4061,50 +4058,6 @@ func (PermissionPromptRequestExtensionPermissionAccess) Kind() PermissionPromptR
return PermissionPromptRequestKindExtensionPermissionAccess
}
-// Factory run or authoring permission prompt
-type PermissionPromptRequestFactory struct {
- // Canonical key used for scoped factory approvals
- ApprovalKey string `json:"approvalKey"`
- // Assisted-approval judge information for this request; present only in assisted mode.
- // Experimental: AssistedApproval is part of an experimental API and may change or be removed.
- AssistedApproval *PermissionAssistedApproval `json:"assistedApproval,omitempty"`
- // Whether this factory is eligible for persistent approval
- CanPersistApproval bool `json:"canPersistApproval"`
- // Factory-declared AI-credit limit before any run/resume caller override is applied.
- DeclaredMaxAiCredits *float64 `json:"declaredMaxAiCredits,omitempty"`
- // Factory-declared concurrent-subagent limit before any run/resume caller override is applied.
- DeclaredMaxConcurrentSubagents *int64 `json:"declaredMaxConcurrentSubagents,omitempty"`
- // Factory-declared total-subagent limit before any run/resume caller override is applied.
- DeclaredMaxTotalSubagents *int64 `json:"declaredMaxTotalSubagents,omitempty"`
- // Factory-declared active-time limit in seconds before any run/resume caller override is applied.
- DeclaredTimeoutSeconds *float64 `json:"declaredTimeoutSeconds,omitempty"`
- // Factory description
- Description string `json:"description"`
- // Whether managed policy requires a human response and forbids host auto-approval
- ManagedApprovalRequired *bool `json:"managedApprovalRequired,omitempty"`
- // Effective AI-credit limit; omitted means unlimited
- MaxAiCredits *float64 `json:"maxAiCredits,omitempty"`
- // Effective concurrent-subagent limit; omitted means unlimited
- MaxConcurrentSubagents *int64 `json:"maxConcurrentSubagents,omitempty"`
- // Effective total-subagent limit; omitted means unlimited
- MaxTotalSubagents *int64 `json:"maxTotalSubagents,omitempty"`
- // Factory name
- Name string `json:"name"`
- // Factory operation, either run or author
- Operation FactoryPermissionOperation `json:"operation"`
- // Declared factory phases
- Phases []FactoryPermissionPhase `json:"phases"`
- // Effective active-time limit in seconds; omitted means unlimited
- TimeoutSeconds *float64 `json:"timeoutSeconds,omitempty"`
- // Tool call ID that triggered this permission request
- ToolCallID *string `json:"toolCallId,omitempty"`
-}
-
-func (PermissionPromptRequestFactory) permissionPromptRequest() {}
-func (PermissionPromptRequestFactory) Kind() PermissionPromptRequestKind {
- return PermissionPromptRequestKindFactory
-}
-
// Hook confirmation permission prompt
type PermissionPromptRequestHook struct {
// Assisted-approval judge information for this request; present only in assisted mode.
@@ -4245,6 +4198,50 @@ func (PermissionPromptRequestURL) Kind() PermissionPromptRequestKind {
return PermissionPromptRequestKindURL
}
+// Workflow run or authoring permission prompt
+type PermissionPromptRequestWorkflow struct {
+ // Canonical key used for scoped workflow approvals
+ ApprovalKey string `json:"approvalKey"`
+ // Assisted-approval judge information for this request; present only in assisted mode.
+ // Experimental: AssistedApproval is part of an experimental API and may change or be removed.
+ AssistedApproval *PermissionAssistedApproval `json:"assistedApproval,omitempty"`
+ // Whether this workflow is eligible for persistent approval
+ CanPersistApproval bool `json:"canPersistApproval"`
+ // Workflow-declared AI-credit limit before any run/resume caller override is applied.
+ DeclaredMaxAiCredits *float64 `json:"declaredMaxAiCredits,omitempty"`
+ // Workflow-declared concurrent-subagent limit before any run/resume caller override is applied.
+ DeclaredMaxConcurrentSubagents *int64 `json:"declaredMaxConcurrentSubagents,omitempty"`
+ // Workflow-declared total-subagent limit before any run/resume caller override is applied.
+ DeclaredMaxTotalSubagents *int64 `json:"declaredMaxTotalSubagents,omitempty"`
+ // Workflow-declared active-time limit in seconds before any run/resume caller override is applied.
+ DeclaredTimeoutSeconds *float64 `json:"declaredTimeoutSeconds,omitempty"`
+ // Workflow description
+ Description string `json:"description"`
+ // Whether managed policy requires a human response and forbids host auto-approval
+ ManagedApprovalRequired *bool `json:"managedApprovalRequired,omitempty"`
+ // Effective AI-credit limit; omitted means unlimited
+ MaxAiCredits *float64 `json:"maxAiCredits,omitempty"`
+ // Effective concurrent-subagent limit; omitted means unlimited
+ MaxConcurrentSubagents *int64 `json:"maxConcurrentSubagents,omitempty"`
+ // Effective total-subagent limit; omitted means unlimited
+ MaxTotalSubagents *int64 `json:"maxTotalSubagents,omitempty"`
+ // Workflow name
+ Name string `json:"name"`
+ // Workflow operation, either run or author
+ Operation WorkflowPermissionOperation `json:"operation"`
+ // Declared workflow phases
+ Phases []WorkflowPermissionPhase `json:"phases"`
+ // Effective active-time limit in seconds; omitted means unlimited
+ TimeoutSeconds *float64 `json:"timeoutSeconds,omitempty"`
+ // Tool call ID that triggered this permission request
+ ToolCallID *string `json:"toolCallId,omitempty"`
+}
+
+func (PermissionPromptRequestWorkflow) permissionPromptRequest() {}
+func (PermissionPromptRequestWorkflow) Kind() PermissionPromptRequestKind {
+ return PermissionPromptRequestKindWorkflow
+}
+
// File write permission prompt
type PermissionPromptRequestWrite struct {
// Assisted-approval judge information for this request; present only in assisted mode.
@@ -4363,47 +4360,6 @@ func (PermissionRequestExtensionPermissionAccess) Kind() PermissionRequestKind {
return PermissionRequestKindExtensionPermissionAccess
}
-// Factory run or authoring permission request
-type PermissionRequestFactory struct {
- // Canonical key used for scoped factory approvals
- ApprovalKey string `json:"approvalKey"`
- // Whether this factory is eligible for persistent approval
- CanPersistApproval bool `json:"canPersistApproval"`
- // Factory-declared AI-credit limit before any run/resume caller override is applied.
- DeclaredMaxAiCredits *float64 `json:"declaredMaxAiCredits,omitempty"`
- // Factory-declared concurrent-subagent limit before any run/resume caller override is applied.
- DeclaredMaxConcurrentSubagents *int64 `json:"declaredMaxConcurrentSubagents,omitempty"`
- // Factory-declared total-subagent limit before any run/resume caller override is applied.
- DeclaredMaxTotalSubagents *int64 `json:"declaredMaxTotalSubagents,omitempty"`
- // Factory-declared active-time limit in seconds before any run/resume caller override is applied.
- DeclaredTimeoutSeconds *float64 `json:"declaredTimeoutSeconds,omitempty"`
- // Factory description
- Description string `json:"description"`
- // When true, managed policy requires an explicit user decision and automatic approval must be bypassed.
- ManagedApprovalRequired *bool `json:"managedApprovalRequired,omitempty"`
- // Effective AI-credit limit; omitted means unlimited
- MaxAiCredits *float64 `json:"maxAiCredits,omitempty"`
- // Effective concurrent-subagent limit; omitted means unlimited
- MaxConcurrentSubagents *int64 `json:"maxConcurrentSubagents,omitempty"`
- // Effective total-subagent limit; omitted means unlimited
- MaxTotalSubagents *int64 `json:"maxTotalSubagents,omitempty"`
- // Factory name
- Name string `json:"name"`
- // Factory operation, either run or author
- Operation FactoryPermissionOperation `json:"operation"`
- // Declared factory phases
- Phases []FactoryPermissionPhase `json:"phases"`
- // Effective active-time limit in seconds; omitted means unlimited
- TimeoutSeconds *float64 `json:"timeoutSeconds,omitempty"`
- // Tool call ID that triggered this permission request
- ToolCallID *string `json:"toolCallId,omitempty"`
-}
-
-func (PermissionRequestFactory) permissionRequest() {}
-func (PermissionRequestFactory) Kind() PermissionRequestKind {
- return PermissionRequestKindFactory
-}
-
// Hook confirmation permission request
type PermissionRequestHook struct {
// Optional message from the hook explaining why confirmation is needed
@@ -4571,6 +4527,47 @@ func (PermissionRequestURL) Kind() PermissionRequestKind {
return PermissionRequestKindURL
}
+// Workflow run or authoring permission request
+type PermissionRequestWorkflow struct {
+ // Canonical key used for scoped workflow approvals
+ ApprovalKey string `json:"approvalKey"`
+ // Whether this workflow is eligible for persistent approval
+ CanPersistApproval bool `json:"canPersistApproval"`
+ // Workflow-declared AI-credit limit before any run/resume caller override is applied.
+ DeclaredMaxAiCredits *float64 `json:"declaredMaxAiCredits,omitempty"`
+ // Workflow-declared concurrent-subagent limit before any run/resume caller override is applied.
+ DeclaredMaxConcurrentSubagents *int64 `json:"declaredMaxConcurrentSubagents,omitempty"`
+ // Workflow-declared total-subagent limit before any run/resume caller override is applied.
+ DeclaredMaxTotalSubagents *int64 `json:"declaredMaxTotalSubagents,omitempty"`
+ // Workflow-declared active-time limit in seconds before any run/resume caller override is applied.
+ DeclaredTimeoutSeconds *float64 `json:"declaredTimeoutSeconds,omitempty"`
+ // Workflow description
+ Description string `json:"description"`
+ // Whether managed policy requires a human response and forbids host auto-approval
+ ManagedApprovalRequired *bool `json:"managedApprovalRequired,omitempty"`
+ // Effective AI-credit limit; omitted means unlimited
+ MaxAiCredits *float64 `json:"maxAiCredits,omitempty"`
+ // Effective concurrent-subagent limit; omitted means unlimited
+ MaxConcurrentSubagents *int64 `json:"maxConcurrentSubagents,omitempty"`
+ // Effective total-subagent limit; omitted means unlimited
+ MaxTotalSubagents *int64 `json:"maxTotalSubagents,omitempty"`
+ // Workflow name
+ Name string `json:"name"`
+ // Workflow operation, either run or author
+ Operation WorkflowPermissionOperation `json:"operation"`
+ // Declared workflow phases
+ Phases []WorkflowPermissionPhase `json:"phases"`
+ // Effective active-time limit in seconds; omitted means unlimited
+ TimeoutSeconds *float64 `json:"timeoutSeconds,omitempty"`
+ // Tool call ID that triggered this permission request
+ ToolCallID *string `json:"toolCallId,omitempty"`
+}
+
+func (PermissionRequestWorkflow) permissionRequest() {}
+func (PermissionRequestWorkflow) Kind() PermissionRequestKind {
+ return PermissionRequestKindWorkflow
+}
+
// File write permission request
type PermissionRequestWrite struct {
// Whether the UI can offer session-wide approval for file write operations
@@ -5017,37 +5014,6 @@ func (SystemNotificationAgentIdle) Type() SystemNotificationType {
return SystemNotificationTypeAgentIdle
}
-// System notification metadata for a factory execution attempt that reached a terminal state.
-type SystemNotificationFactoryCompleted struct {
- // Execution attempt that reached this terminal state.
- Attempt int64 `json:"attempt"`
- // Consumed AI usage in nano-AIU.
- ConsumedNanoAiu int64 `json:"consumedNanoAiu"`
- // Subagents consumed by the run across all attempts.
- ConsumedSubagents int64 `json:"consumedSubagents"`
- // Accumulated active execution time in milliseconds.
- ElapsedMs int64 `json:"elapsedMs"`
- // Persisted factory name.
- FactoryName string `json:"factoryName"`
- // Machine-readable terminal failure details, when present.
- Failure any `json:"failure,omitempty"`
- // Pause initiator metadata when this attempt settled as paused.
- PauseInfo SystemNotificationFactoryPauseInfo `json:"pauseInfo,omitempty"`
- // Bounded prompt-safe preview of the completed result.
- ResultPreview *string `json:"resultPreview,omitempty"`
- // Actionable run_factory resume guidance for a resource-limit failure.
- RetryGuidance *string `json:"retryGuidance,omitempty"`
- // Factory run identifier.
- RunID string `json:"runId"`
- // Terminal status reached by this execution attempt.
- Status SystemNotificationFactoryCompletedStatus `json:"status"`
-}
-
-func (SystemNotificationFactoryCompleted) systemNotification() {}
-func (SystemNotificationFactoryCompleted) Type() SystemNotificationType {
- return SystemNotificationTypeFactoryCompleted
-}
-
// System notification metadata for an instruction file discovered during tool access, including source, trigger file, and tool.
type SystemNotificationInstructionDiscovered struct {
// Human-readable label for the timeline (e.g., 'AGENTS.md from packages/billing/')
@@ -5121,38 +5087,69 @@ func (SystemNotificationUnclassified) Type() SystemNotificationType {
return SystemNotificationTypeUnclassified
}
-// Durable metadata describing who initiated a factory pause.
-type SystemNotificationFactoryPauseInfo interface {
- systemNotificationFactoryPauseInfo()
- Type() SystemNotificationFactoryPauseInfoType
+// System notification metadata for a workflow execution attempt that reached a terminal state.
+type SystemNotificationWorkflowCompleted struct {
+ // Execution attempt that reached this terminal state.
+ Attempt int64 `json:"attempt"`
+ // Consumed AI usage in nano-AIU.
+ ConsumedNanoAiu int64 `json:"consumedNanoAiu"`
+ // Subagents consumed by the run across all attempts.
+ ConsumedSubagents int64 `json:"consumedSubagents"`
+ // Accumulated active execution time in milliseconds.
+ ElapsedMs int64 `json:"elapsedMs"`
+ // Machine-readable terminal failure details, when present.
+ Failure any `json:"failure,omitempty"`
+ // Pause initiator metadata when this attempt settled as paused.
+ PauseInfo SystemNotificationWorkflowPauseInfo `json:"pauseInfo,omitempty"`
+ // Bounded prompt-safe preview of the completed result.
+ ResultPreview *string `json:"resultPreview,omitempty"`
+ // Actionable run_dynamic_workflow resume guidance for a resource-limit failure.
+ RetryGuidance *string `json:"retryGuidance,omitempty"`
+ // Workflow run identifier.
+ RunID string `json:"runId"`
+ // Terminal status reached by this execution attempt.
+ Status SystemNotificationWorkflowCompletedStatus `json:"status"`
+ // Persisted workflow name.
+ WorkflowName string `json:"workflowName"`
+}
+
+func (SystemNotificationWorkflowCompleted) systemNotification() {}
+func (SystemNotificationWorkflowCompleted) Type() SystemNotificationType {
+ return SystemNotificationTypeWorkflowCompleted
}
-type RawSystemNotificationFactoryPauseInfo struct {
- Discriminator SystemNotificationFactoryPauseInfoType
+// Durable metadata describing who initiated a workflow pause.
+type SystemNotificationWorkflowPauseInfo interface {
+ systemNotificationWorkflowPauseInfo()
+ Type() SystemNotificationWorkflowPauseInfoType
+}
+
+type RawSystemNotificationWorkflowPauseInfo struct {
+ Discriminator SystemNotificationWorkflowPauseInfoType
Raw json.RawMessage
}
-func (RawSystemNotificationFactoryPauseInfo) systemNotificationFactoryPauseInfo() {}
-func (r RawSystemNotificationFactoryPauseInfo) Type() SystemNotificationFactoryPauseInfoType {
+func (RawSystemNotificationWorkflowPauseInfo) systemNotificationWorkflowPauseInfo() {}
+func (r RawSystemNotificationWorkflowPauseInfo) Type() SystemNotificationWorkflowPauseInfoType {
return r.Discriminator
}
-type SystemNotificationFactoryPauseInfoCheckpoint struct {
+type SystemNotificationWorkflowPauseInfoCheckpoint struct {
// Stable author-defined checkpoint key that initiated the pause.
Key string `json:"key"`
}
-func (SystemNotificationFactoryPauseInfoCheckpoint) systemNotificationFactoryPauseInfo() {}
-func (SystemNotificationFactoryPauseInfoCheckpoint) Type() SystemNotificationFactoryPauseInfoType {
- return SystemNotificationFactoryPauseInfoTypeCheckpoint
+func (SystemNotificationWorkflowPauseInfoCheckpoint) systemNotificationWorkflowPauseInfo() {}
+func (SystemNotificationWorkflowPauseInfoCheckpoint) Type() SystemNotificationWorkflowPauseInfoType {
+ return SystemNotificationWorkflowPauseInfoTypeCheckpoint
}
-type SystemNotificationFactoryPauseInfoUser struct {
+type SystemNotificationWorkflowPauseInfoUser struct {
}
-func (SystemNotificationFactoryPauseInfoUser) systemNotificationFactoryPauseInfo() {}
-func (SystemNotificationFactoryPauseInfoUser) Type() SystemNotificationFactoryPauseInfoType {
- return SystemNotificationFactoryPauseInfoTypeUser
+func (SystemNotificationWorkflowPauseInfoUser) systemNotificationWorkflowPauseInfo() {}
+func (SystemNotificationWorkflowPauseInfoUser) Type() SystemNotificationWorkflowPauseInfoType {
+ return SystemNotificationWorkflowPauseInfoTypeUser
}
// A content block within a tool result, which may be text, terminal output, image, audio, or a resource
@@ -5479,6 +5476,14 @@ type UsageCheckpointModelCacheState struct {
ModelID string `json:"modelId"`
}
+// A declared phase shown in a workflow permission prompt.
+type WorkflowPermissionPhase struct {
+ // Optional phase detail
+ Detail *string `json:"detail,omitempty"`
+ // Phase title
+ Title string `json:"title"`
+}
+
// Working directory and git context at session start
type WorkingDirectoryContext struct {
// Base commit of current git branch at session start time
@@ -5820,32 +5825,6 @@ const (
ExtensionsLoadedExtensionStatusStarting ExtensionsLoadedExtensionStatus = "starting"
)
-// Operation gated by a factory permission request.
-type FactoryPermissionOperation string
-
-const (
- // Authoring a factory, which writes JavaScript into a session-scoped extension and loads it.
- FactoryPermissionOperationAuthor FactoryPermissionOperation = "author"
- // Running a registered factory, which spends subagents, active time, and AI credits under the approved limits.
- FactoryPermissionOperationRun FactoryPermissionOperation = "run"
-)
-
-// Terminal status a factory run committed. A settled run is never `pending` or `running`, so those two members of the run-status domain are deliberately absent.
-type FactoryRunSettledStatus string
-
-const (
- // The run was cancelled by its caller or by session disposal.
- FactoryRunSettledStatusCancelled FactoryRunSettledStatus = "cancelled"
- // The factory body resolved and its result was committed.
- FactoryRunSettledStatusCompleted FactoryRunSettledStatus = "completed"
- // The run failed, with `failureType` carrying the class when it has one.
- FactoryRunSettledStatusError FactoryRunSettledStatus = "error"
- // The run was stopped by a limit, an approval refusal or another policy decision.
- FactoryRunSettledStatusHalted FactoryRunSettledStatus = "halted"
- // The attempt paused intentionally while preserving resumable run state.
- FactoryRunSettledStatusPaused FactoryRunSettledStatus = "paused"
-)
-
// Conversation scope in which a HydraFusion phase executes.
// Experimental: FusionConversationScope is part of an experimental API and may change or be removed.
type FusionConversationScope string
@@ -6225,14 +6204,14 @@ const (
PermissionApprovalEvaluationReasonCodeUnreviewableScriptInvocation PermissionApprovalEvaluationReasonCode = "unreviewable-script-invocation"
)
-// Which direction a message-backed authorization claim moves authority in.
+// Direction stored in a historical extractor claim. Current runtimes do not apply it.
// Experimental: PermissionMessageAuthorizationPolarity is part of an experimental API and may change or be removed.
type PermissionMessageAuthorizationPolarity string
const (
- // The human's words refused an effect.
+ // Historical claim recorded as a denial.
PermissionMessageAuthorizationPolarityDenial PermissionMessageAuthorizationPolarity = "denial"
- // The human's words authorized an effect.
+ // Historical claim recorded as a grant.
PermissionMessageAuthorizationPolarityGrant PermissionMessageAuthorizationPolarity = "grant"
)
@@ -6245,13 +6224,13 @@ const (
PermissionPromptRequestKindExtensionEnvAccess PermissionPromptRequestKind = "extension-env-access"
PermissionPromptRequestKindExtensionManagement PermissionPromptRequestKind = "extension-management"
PermissionPromptRequestKindExtensionPermissionAccess PermissionPromptRequestKind = "extension-permission-access"
- PermissionPromptRequestKindFactory PermissionPromptRequestKind = "factory"
PermissionPromptRequestKindHook PermissionPromptRequestKind = "hook"
PermissionPromptRequestKindMCP PermissionPromptRequestKind = "mcp"
PermissionPromptRequestKindMemory PermissionPromptRequestKind = "memory"
PermissionPromptRequestKindPath PermissionPromptRequestKind = "path"
PermissionPromptRequestKindRead PermissionPromptRequestKind = "read"
PermissionPromptRequestKindURL PermissionPromptRequestKind = "url"
+ PermissionPromptRequestKindWorkflow PermissionPromptRequestKind = "workflow"
PermissionPromptRequestKindWrite PermissionPromptRequestKind = "write"
)
@@ -6284,13 +6263,13 @@ const (
PermissionRequestKindExtensionEnvAccess PermissionRequestKind = "extension-env-access"
PermissionRequestKindExtensionManagement PermissionRequestKind = "extension-management"
PermissionRequestKindExtensionPermissionAccess PermissionRequestKind = "extension-permission-access"
- PermissionRequestKindFactory PermissionRequestKind = "factory"
PermissionRequestKindHook PermissionRequestKind = "hook"
PermissionRequestKindMCP PermissionRequestKind = "mcp"
PermissionRequestKindMemory PermissionRequestKind = "memory"
PermissionRequestKindRead PermissionRequestKind = "read"
PermissionRequestKindShell PermissionRequestKind = "shell"
PermissionRequestKindURL PermissionRequestKind = "url"
+ PermissionRequestKindWorkflow PermissionRequestKind = "workflow"
PermissionRequestKindWrite PermissionRequestKind = "write"
)
@@ -6472,42 +6451,42 @@ const (
SystemNotificationAgentCompletedStatusFailed SystemNotificationAgentCompletedStatus = "failed"
)
-// Terminal status reached by a factory execution attempt.
-type SystemNotificationFactoryCompletedStatus string
-
-const (
- // The factory was cancelled.
- SystemNotificationFactoryCompletedStatusCancelled SystemNotificationFactoryCompletedStatus = "cancelled"
- // The factory completed successfully.
- SystemNotificationFactoryCompletedStatusCompleted SystemNotificationFactoryCompletedStatus = "completed"
- // The factory failed.
- SystemNotificationFactoryCompletedStatusError SystemNotificationFactoryCompletedStatus = "error"
- // The factory was halted.
- SystemNotificationFactoryCompletedStatusHalted SystemNotificationFactoryCompletedStatus = "halted"
- // The factory attempt paused intentionally.
- SystemNotificationFactoryCompletedStatusPaused SystemNotificationFactoryCompletedStatus = "paused"
-)
-
-// Type discriminator for SystemNotificationFactoryPauseInfo.
-type SystemNotificationFactoryPauseInfoType string
-
-const (
- SystemNotificationFactoryPauseInfoTypeCheckpoint SystemNotificationFactoryPauseInfoType = "checkpoint"
- SystemNotificationFactoryPauseInfoTypeUser SystemNotificationFactoryPauseInfoType = "user"
-)
-
// Type discriminator for SystemNotification.
type SystemNotificationType string
const (
SystemNotificationTypeAgentCompleted SystemNotificationType = "agent_completed"
SystemNotificationTypeAgentIdle SystemNotificationType = "agent_idle"
- SystemNotificationTypeFactoryCompleted SystemNotificationType = "factory_completed"
SystemNotificationTypeInstructionDiscovered SystemNotificationType = "instruction_discovered"
SystemNotificationTypeNewInboxMessage SystemNotificationType = "new_inbox_message"
SystemNotificationTypeShellCompleted SystemNotificationType = "shell_completed"
SystemNotificationTypeShellDetachedCompleted SystemNotificationType = "shell_detached_completed"
SystemNotificationTypeUnclassified SystemNotificationType = "unclassified"
+ SystemNotificationTypeWorkflowCompleted SystemNotificationType = "workflow_completed"
+)
+
+// Terminal status reached by a workflow execution attempt.
+type SystemNotificationWorkflowCompletedStatus string
+
+const (
+ // The workflow was cancelled.
+ SystemNotificationWorkflowCompletedStatusCancelled SystemNotificationWorkflowCompletedStatus = "cancelled"
+ // The workflow completed successfully.
+ SystemNotificationWorkflowCompletedStatusCompleted SystemNotificationWorkflowCompletedStatus = "completed"
+ // The workflow failed.
+ SystemNotificationWorkflowCompletedStatusError SystemNotificationWorkflowCompletedStatus = "error"
+ // The workflow was halted.
+ SystemNotificationWorkflowCompletedStatusHalted SystemNotificationWorkflowCompletedStatus = "halted"
+ // The workflow attempt paused intentionally.
+ SystemNotificationWorkflowCompletedStatusPaused SystemNotificationWorkflowCompletedStatus = "paused"
+)
+
+// Type discriminator for SystemNotificationWorkflowPauseInfo.
+type SystemNotificationWorkflowPauseInfoType string
+
+const (
+ SystemNotificationWorkflowPauseInfoTypeCheckpoint SystemNotificationWorkflowPauseInfoType = "checkpoint"
+ SystemNotificationWorkflowPauseInfoTypeUser SystemNotificationWorkflowPauseInfoType = "user"
)
// Theme variant this icon is intended for
@@ -6596,6 +6575,32 @@ const (
UserMessageDeliverySteering UserMessageDelivery = "steering"
)
+// Operation gated by a workflow permission request.
+type WorkflowPermissionOperation string
+
+const (
+ // Authoring a workflow, which writes JavaScript into a session-scoped extension and loads it.
+ WorkflowPermissionOperationAuthor WorkflowPermissionOperation = "author"
+ // Running a registered workflow, which spends subagents, active time, and AI credits under the approved limits.
+ WorkflowPermissionOperationRun WorkflowPermissionOperation = "run"
+)
+
+// Terminal status a workflow run committed. A settled run is never `pending` or `running`, so those two members of the run-status domain are deliberately absent.
+type WorkflowRunSettledStatus string
+
+const (
+ // The run was cancelled by its caller or by session disposal.
+ WorkflowRunSettledStatusCancelled WorkflowRunSettledStatus = "cancelled"
+ // The workflow body resolved and its result was committed.
+ WorkflowRunSettledStatusCompleted WorkflowRunSettledStatus = "completed"
+ // The run failed, with `failureType` carrying the class when it has one.
+ WorkflowRunSettledStatusError WorkflowRunSettledStatus = "error"
+ // The run was stopped by a limit, an approval refusal or another policy decision.
+ WorkflowRunSettledStatusHalted WorkflowRunSettledStatus = "halted"
+ // The attempt paused intentionally while preserving resumable run state.
+ WorkflowRunSettledStatusPaused WorkflowRunSettledStatus = "paused"
+)
+
// Hosting platform type of the repository (github or ado)
type WorkingDirectoryContextHostType string
diff --git a/go/zsession_events.go b/go/zsession_events.go
index a1aab5837f..9926470e3c 100644
--- a/go/zsession_events.go
+++ b/go/zsession_events.go
@@ -122,12 +122,6 @@ type (
ExtensionsLoadedExtensionStatus = rpc.ExtensionsLoadedExtensionStatus
ExternalToolCompletedData = rpc.ExternalToolCompletedData
ExternalToolRequestedData = rpc.ExternalToolRequestedData
- FactoryPermissionOperation = rpc.FactoryPermissionOperation
- FactoryPermissionPhase = rpc.FactoryPermissionPhase
- FactoryRunSettledData = rpc.FactoryRunSettledData
- FactoryRunSettledStatus = rpc.FactoryRunSettledStatus
- FactoryRunStartedData = rpc.FactoryRunStartedData
- FactoryRunUpdatedData = rpc.FactoryRunUpdatedData
FusionAttribution = rpc.FusionAttribution
FusionConversationScope = rpc.FusionConversationScope
FusionFollowUpAction = rpc.FusionFollowUpAction
@@ -221,7 +215,6 @@ type (
PermissionPromptRequestExtensionEnvAccess = rpc.PermissionPromptRequestExtensionEnvAccess
PermissionPromptRequestExtensionManagement = rpc.PermissionPromptRequestExtensionManagement
PermissionPromptRequestExtensionPermissionAccess = rpc.PermissionPromptRequestExtensionPermissionAccess
- PermissionPromptRequestFactory = rpc.PermissionPromptRequestFactory
PermissionPromptRequestHook = rpc.PermissionPromptRequestHook
PermissionPromptRequestKind = rpc.PermissionPromptRequestKind
PermissionPromptRequestMCP = rpc.PermissionPromptRequestMCP
@@ -230,6 +223,7 @@ type (
PermissionPromptRequestPathAccessKind = rpc.PermissionPromptRequestPathAccessKind
PermissionPromptRequestRead = rpc.PermissionPromptRequestRead
PermissionPromptRequestURL = rpc.PermissionPromptRequestURL
+ PermissionPromptRequestWorkflow = rpc.PermissionPromptRequestWorkflow
PermissionPromptRequestWrite = rpc.PermissionPromptRequestWrite
PermissionRecommendation = rpc.PermissionRecommendation
PermissionRecoveryAttempt = rpc.PermissionRecoveryAttempt
@@ -247,7 +241,6 @@ type (
PermissionRequestExtensionEnvAccess = rpc.PermissionRequestExtensionEnvAccess
PermissionRequestExtensionManagement = rpc.PermissionRequestExtensionManagement
PermissionRequestExtensionPermissionAccess = rpc.PermissionRequestExtensionPermissionAccess
- PermissionRequestFactory = rpc.PermissionRequestFactory
PermissionRequestHook = rpc.PermissionRequestHook
PermissionRequestKind = rpc.PermissionRequestKind
PermissionRequestMCP = rpc.PermissionRequestMCP
@@ -261,6 +254,7 @@ type (
PermissionRequestShellCommandSegment = rpc.PermissionRequestShellCommandSegment
PermissionRequestShellPossibleURL = rpc.PermissionRequestShellPossibleURL
PermissionRequestURL = rpc.PermissionRequestURL
+ PermissionRequestWorkflow = rpc.PermissionRequestWorkflow
PermissionRequestWrite = rpc.PermissionRequestWrite
PermissionResult = rpc.PermissionResult
PermissionResultKind = rpc.PermissionResultKind
@@ -279,7 +273,7 @@ type (
RawPersistedBinaryResult = rpc.RawPersistedBinaryResult
RawSessionEventData = rpc.RawSessionEventData
RawSystemNotification = rpc.RawSystemNotification
- RawSystemNotificationFactoryPauseInfo = rpc.RawSystemNotificationFactoryPauseInfo
+ RawSystemNotificationWorkflowPauseInfo = rpc.RawSystemNotificationWorkflowPauseInfo
RawToolExecutionCompleteContent = rpc.RawToolExecutionCompleteContent
ReasoningSummary = rpc.ReasoningSummary
RecommendedAutoTier = rpc.RecommendedAutoTier
@@ -392,18 +386,18 @@ type (
SystemNotificationAgentCompletedStatus = rpc.SystemNotificationAgentCompletedStatus
SystemNotificationAgentIdle = rpc.SystemNotificationAgentIdle
SystemNotificationData = rpc.SystemNotificationData
- SystemNotificationFactoryCompleted = rpc.SystemNotificationFactoryCompleted
- SystemNotificationFactoryCompletedStatus = rpc.SystemNotificationFactoryCompletedStatus
- SystemNotificationFactoryPauseInfo = rpc.SystemNotificationFactoryPauseInfo
- SystemNotificationFactoryPauseInfoCheckpoint = rpc.SystemNotificationFactoryPauseInfoCheckpoint
- SystemNotificationFactoryPauseInfoType = rpc.SystemNotificationFactoryPauseInfoType
- SystemNotificationFactoryPauseInfoUser = rpc.SystemNotificationFactoryPauseInfoUser
SystemNotificationInstructionDiscovered = rpc.SystemNotificationInstructionDiscovered
SystemNotificationNewInboxMessage = rpc.SystemNotificationNewInboxMessage
SystemNotificationShellCompleted = rpc.SystemNotificationShellCompleted
SystemNotificationShellDetachedCompleted = rpc.SystemNotificationShellDetachedCompleted
SystemNotificationType = rpc.SystemNotificationType
SystemNotificationUnclassified = rpc.SystemNotificationUnclassified
+ SystemNotificationWorkflowCompleted = rpc.SystemNotificationWorkflowCompleted
+ SystemNotificationWorkflowCompletedStatus = rpc.SystemNotificationWorkflowCompletedStatus
+ SystemNotificationWorkflowPauseInfo = rpc.SystemNotificationWorkflowPauseInfo
+ SystemNotificationWorkflowPauseInfoCheckpoint = rpc.SystemNotificationWorkflowPauseInfoCheckpoint
+ SystemNotificationWorkflowPauseInfoType = rpc.SystemNotificationWorkflowPauseInfoType
+ SystemNotificationWorkflowPauseInfoUser = rpc.SystemNotificationWorkflowPauseInfoUser
TaskBlocker = rpc.TaskBlocker
TaskBlockerKind = rpc.TaskBlockerKind
TaskCompleteData = rpc.TaskCompleteData
@@ -460,13 +454,19 @@ type (
UserToolSessionApprovalExtensionEnvAccess = rpc.UserToolSessionApprovalExtensionEnvAccess
UserToolSessionApprovalExtensionManagement = rpc.UserToolSessionApprovalExtensionManagement
UserToolSessionApprovalExtensionPermissionAccess = rpc.UserToolSessionApprovalExtensionPermissionAccess
- UserToolSessionApprovalFactory = rpc.UserToolSessionApprovalFactory
UserToolSessionApprovalKind = rpc.UserToolSessionApprovalKind
UserToolSessionApprovalMCP = rpc.UserToolSessionApprovalMCP
UserToolSessionApprovalMemory = rpc.UserToolSessionApprovalMemory
UserToolSessionApprovalRead = rpc.UserToolSessionApprovalRead
+ UserToolSessionApprovalWorkflow = rpc.UserToolSessionApprovalWorkflow
UserToolSessionApprovalWrite = rpc.UserToolSessionApprovalWrite
Verbosity = rpc.Verbosity
+ WorkflowPermissionOperation = rpc.WorkflowPermissionOperation
+ WorkflowPermissionPhase = rpc.WorkflowPermissionPhase
+ WorkflowRunSettledData = rpc.WorkflowRunSettledData
+ WorkflowRunSettledStatus = rpc.WorkflowRunSettledStatus
+ WorkflowRunStartedData = rpc.WorkflowRunStartedData
+ WorkflowRunUpdatedData = rpc.WorkflowRunUpdatedData
WorkingDirectoryContext = rpc.WorkingDirectoryContext
WorkingDirectoryContextHostType = rpc.WorkingDirectoryContextHostType
WorkspaceFileChangedOperation = rpc.WorkspaceFileChangedOperation
@@ -583,13 +583,6 @@ const (
ExtensionsLoadedExtensionStatusFailed = rpc.ExtensionsLoadedExtensionStatusFailed
ExtensionsLoadedExtensionStatusRunning = rpc.ExtensionsLoadedExtensionStatusRunning
ExtensionsLoadedExtensionStatusStarting = rpc.ExtensionsLoadedExtensionStatusStarting
- FactoryPermissionOperationAuthor = rpc.FactoryPermissionOperationAuthor
- FactoryPermissionOperationRun = rpc.FactoryPermissionOperationRun
- FactoryRunSettledStatusCancelled = rpc.FactoryRunSettledStatusCancelled
- FactoryRunSettledStatusCompleted = rpc.FactoryRunSettledStatusCompleted
- FactoryRunSettledStatusError = rpc.FactoryRunSettledStatusError
- FactoryRunSettledStatusHalted = rpc.FactoryRunSettledStatusHalted
- FactoryRunSettledStatusPaused = rpc.FactoryRunSettledStatusPaused
FusionConversationScopeReview = rpc.FusionConversationScopeReview
FusionConversationScopeRoot = rpc.FusionConversationScopeRoot
FusionFollowUpActionReroute = rpc.FusionFollowUpActionReroute
@@ -680,6 +673,7 @@ const (
ModelCallFinishedOutcomeSuccess = rpc.ModelCallFinishedOutcomeSuccess
ModelChangeSourceAgent = rpc.ModelChangeSourceAgent
ModelChangeSourceAutomatic = rpc.ModelChangeSourceAutomatic
+ ModelChangeSourceAutoTierRecommendation = rpc.ModelChangeSourceAutoTierRecommendation
ModelChangeSourceChangeboardingShortcut = rpc.ModelChangeSourceChangeboardingShortcut
ModelChangeSourceConfigCommand = rpc.ModelChangeSourceConfigCommand
ModelChangeSourceManagedSettings = rpc.ModelChangeSourceManagedSettings
@@ -743,13 +737,13 @@ const (
PermissionPromptRequestKindExtensionEnvAccess = rpc.PermissionPromptRequestKindExtensionEnvAccess
PermissionPromptRequestKindExtensionManagement = rpc.PermissionPromptRequestKindExtensionManagement
PermissionPromptRequestKindExtensionPermissionAccess = rpc.PermissionPromptRequestKindExtensionPermissionAccess
- PermissionPromptRequestKindFactory = rpc.PermissionPromptRequestKindFactory
PermissionPromptRequestKindHook = rpc.PermissionPromptRequestKindHook
PermissionPromptRequestKindMCP = rpc.PermissionPromptRequestKindMCP
PermissionPromptRequestKindMemory = rpc.PermissionPromptRequestKindMemory
PermissionPromptRequestKindPath = rpc.PermissionPromptRequestKindPath
PermissionPromptRequestKindRead = rpc.PermissionPromptRequestKindRead
PermissionPromptRequestKindURL = rpc.PermissionPromptRequestKindURL
+ PermissionPromptRequestKindWorkflow = rpc.PermissionPromptRequestKindWorkflow
PermissionPromptRequestKindWrite = rpc.PermissionPromptRequestKindWrite
PermissionPromptRequestPathAccessKindRead = rpc.PermissionPromptRequestPathAccessKindRead
PermissionPromptRequestPathAccessKindShell = rpc.PermissionPromptRequestPathAccessKindShell
@@ -788,13 +782,13 @@ const (
PermissionRequestKindExtensionEnvAccess = rpc.PermissionRequestKindExtensionEnvAccess
PermissionRequestKindExtensionManagement = rpc.PermissionRequestKindExtensionManagement
PermissionRequestKindExtensionPermissionAccess = rpc.PermissionRequestKindExtensionPermissionAccess
- PermissionRequestKindFactory = rpc.PermissionRequestKindFactory
PermissionRequestKindHook = rpc.PermissionRequestKindHook
PermissionRequestKindMCP = rpc.PermissionRequestKindMCP
PermissionRequestKindMemory = rpc.PermissionRequestKindMemory
PermissionRequestKindRead = rpc.PermissionRequestKindRead
PermissionRequestKindShell = rpc.PermissionRequestKindShell
PermissionRequestKindURL = rpc.PermissionRequestKindURL
+ PermissionRequestKindWorkflow = rpc.PermissionRequestKindWorkflow
PermissionRequestKindWrite = rpc.PermissionRequestKindWrite
PermissionRequestMemoryActionStore = rpc.PermissionRequestMemoryActionStore
PermissionRequestMemoryActionVote = rpc.PermissionRequestMemoryActionVote
@@ -864,9 +858,6 @@ const (
SessionEventTypeExitPlanModeRequested = rpc.SessionEventTypeExitPlanModeRequested
SessionEventTypeExternalToolCompleted = rpc.SessionEventTypeExternalToolCompleted
SessionEventTypeExternalToolRequested = rpc.SessionEventTypeExternalToolRequested
- SessionEventTypeFactoryRunSettled = rpc.SessionEventTypeFactoryRunSettled
- SessionEventTypeFactoryRunStarted = rpc.SessionEventTypeFactoryRunStarted
- SessionEventTypeFactoryRunUpdated = rpc.SessionEventTypeFactoryRunUpdated
SessionEventTypeHookEnd = rpc.SessionEventTypeHookEnd
SessionEventTypeHookProgress = rpc.SessionEventTypeHookProgress
SessionEventTypeHookStart = rpc.SessionEventTypeHookStart
@@ -980,6 +971,9 @@ const (
SessionEventTypeUserInputCompleted = rpc.SessionEventTypeUserInputCompleted
SessionEventTypeUserInputRequested = rpc.SessionEventTypeUserInputRequested
SessionEventTypeUserMessage = rpc.SessionEventTypeUserMessage
+ SessionEventTypeWorkflowRunSettled = rpc.SessionEventTypeWorkflowRunSettled
+ SessionEventTypeWorkflowRunStarted = rpc.SessionEventTypeWorkflowRunStarted
+ SessionEventTypeWorkflowRunUpdated = rpc.SessionEventTypeWorkflowRunUpdated
SessionLimitsExhaustedResponseActionAdd = rpc.SessionLimitsExhaustedResponseActionAdd
SessionLimitsExhaustedResponseActionCancel = rpc.SessionLimitsExhaustedResponseActionCancel
SessionLimitsExhaustedResponseActionSet = rpc.SessionLimitsExhaustedResponseActionSet
@@ -1015,21 +1009,21 @@ const (
SystemMessageRoleSystem = rpc.SystemMessageRoleSystem
SystemNotificationAgentCompletedStatusCompleted = rpc.SystemNotificationAgentCompletedStatusCompleted
SystemNotificationAgentCompletedStatusFailed = rpc.SystemNotificationAgentCompletedStatusFailed
- SystemNotificationFactoryCompletedStatusCancelled = rpc.SystemNotificationFactoryCompletedStatusCancelled
- SystemNotificationFactoryCompletedStatusCompleted = rpc.SystemNotificationFactoryCompletedStatusCompleted
- SystemNotificationFactoryCompletedStatusError = rpc.SystemNotificationFactoryCompletedStatusError
- SystemNotificationFactoryCompletedStatusHalted = rpc.SystemNotificationFactoryCompletedStatusHalted
- SystemNotificationFactoryCompletedStatusPaused = rpc.SystemNotificationFactoryCompletedStatusPaused
- SystemNotificationFactoryPauseInfoTypeCheckpoint = rpc.SystemNotificationFactoryPauseInfoTypeCheckpoint
- SystemNotificationFactoryPauseInfoTypeUser = rpc.SystemNotificationFactoryPauseInfoTypeUser
SystemNotificationTypeAgentCompleted = rpc.SystemNotificationTypeAgentCompleted
SystemNotificationTypeAgentIdle = rpc.SystemNotificationTypeAgentIdle
- SystemNotificationTypeFactoryCompleted = rpc.SystemNotificationTypeFactoryCompleted
SystemNotificationTypeInstructionDiscovered = rpc.SystemNotificationTypeInstructionDiscovered
SystemNotificationTypeNewInboxMessage = rpc.SystemNotificationTypeNewInboxMessage
SystemNotificationTypeShellCompleted = rpc.SystemNotificationTypeShellCompleted
SystemNotificationTypeShellDetachedCompleted = rpc.SystemNotificationTypeShellDetachedCompleted
SystemNotificationTypeUnclassified = rpc.SystemNotificationTypeUnclassified
+ SystemNotificationTypeWorkflowCompleted = rpc.SystemNotificationTypeWorkflowCompleted
+ SystemNotificationWorkflowCompletedStatusCancelled = rpc.SystemNotificationWorkflowCompletedStatusCancelled
+ SystemNotificationWorkflowCompletedStatusCompleted = rpc.SystemNotificationWorkflowCompletedStatusCompleted
+ SystemNotificationWorkflowCompletedStatusError = rpc.SystemNotificationWorkflowCompletedStatusError
+ SystemNotificationWorkflowCompletedStatusHalted = rpc.SystemNotificationWorkflowCompletedStatusHalted
+ SystemNotificationWorkflowCompletedStatusPaused = rpc.SystemNotificationWorkflowCompletedStatusPaused
+ SystemNotificationWorkflowPauseInfoTypeCheckpoint = rpc.SystemNotificationWorkflowPauseInfoTypeCheckpoint
+ SystemNotificationWorkflowPauseInfoTypeUser = rpc.SystemNotificationWorkflowPauseInfoTypeUser
TaskBlockerKindPermissionRecovery = rpc.TaskBlockerKindPermissionRecovery
TaskCompletionOutcomeBlocked = rpc.TaskCompletionOutcomeBlocked
TaskCompletionOutcomeCompleted = rpc.TaskCompletionOutcomeCompleted
@@ -1064,14 +1058,21 @@ const (
UserToolSessionApprovalKindExtensionEnvAccess = rpc.UserToolSessionApprovalKindExtensionEnvAccess
UserToolSessionApprovalKindExtensionManagement = rpc.UserToolSessionApprovalKindExtensionManagement
UserToolSessionApprovalKindExtensionPermissionAccess = rpc.UserToolSessionApprovalKindExtensionPermissionAccess
- UserToolSessionApprovalKindFactory = rpc.UserToolSessionApprovalKindFactory
UserToolSessionApprovalKindMCP = rpc.UserToolSessionApprovalKindMCP
UserToolSessionApprovalKindMemory = rpc.UserToolSessionApprovalKindMemory
UserToolSessionApprovalKindRead = rpc.UserToolSessionApprovalKindRead
+ UserToolSessionApprovalKindWorkflow = rpc.UserToolSessionApprovalKindWorkflow
UserToolSessionApprovalKindWrite = rpc.UserToolSessionApprovalKindWrite
VerbosityHigh = rpc.VerbosityHigh
VerbosityLow = rpc.VerbosityLow
VerbosityMedium = rpc.VerbosityMedium
+ WorkflowPermissionOperationAuthor = rpc.WorkflowPermissionOperationAuthor
+ WorkflowPermissionOperationRun = rpc.WorkflowPermissionOperationRun
+ WorkflowRunSettledStatusCancelled = rpc.WorkflowRunSettledStatusCancelled
+ WorkflowRunSettledStatusCompleted = rpc.WorkflowRunSettledStatusCompleted
+ WorkflowRunSettledStatusError = rpc.WorkflowRunSettledStatusError
+ WorkflowRunSettledStatusHalted = rpc.WorkflowRunSettledStatusHalted
+ WorkflowRunSettledStatusPaused = rpc.WorkflowRunSettledStatusPaused
WorkingDirectoryContextHostTypeADO = rpc.WorkingDirectoryContextHostTypeADO
WorkingDirectoryContextHostTypeGitHub = rpc.WorkingDirectoryContextHostTypeGitHub
WorkspaceFileChangedOperationCreate = rpc.WorkspaceFileChangedOperationCreate
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/ModelChangeSource.java b/java/sdk/src/generated/java/com/github/copilot/generated/ModelChangeSource.java
index 6279057df9..7ee778b7fe 100644
--- a/java/sdk/src/generated/java/com/github/copilot/generated/ModelChangeSource.java
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/ModelChangeSource.java
@@ -39,7 +39,9 @@ public enum ModelChangeSource {
/** The {@code changeboarding_shortcut} variant. */
CHANGEBOARDING_SHORTCUT("changeboarding_shortcut"),
/** The {@code sdk} variant. */
- SDK("sdk");
+ SDK("sdk"),
+ /** The {@code auto_tier_recommendation} variant. */
+ AUTO_TIER_RECOMMENDATION("auto_tier_recommendation");
private final String value;
ModelChangeSource(String value) { this.value = value; }
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/PermissionAssentDetectedEvent.java b/java/sdk/src/generated/java/com/github/copilot/generated/PermissionAssentDetectedEvent.java
index 6e8d6aecb6..0f3453c45a 100644
--- a/java/sdk/src/generated/java/com/github/copilot/generated/PermissionAssentDetectedEvent.java
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/PermissionAssentDetectedEvent.java
@@ -13,7 +13,7 @@
import javax.annotation.processing.Generated;
/**
- * Session event "permission.assentDetected". Records that deterministic text recognition found likely assent in the human turn immediately following a root Autopilot permission request that was blocked because no interactive response was available. This event grants no authority; its model-facing projection only suggests retrying the unchanged operation.
+ * Session event "permission.assentDetected". Historical decode-only contextual-assent marker. Current runtimes do not project it into the conversation or permission flow.
* @since 1.0.0
*/
@JsonIgnoreProperties(ignoreUnknown = true)
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/PermissionCarriedForwardEvent.java b/java/sdk/src/generated/java/com/github/copilot/generated/PermissionCarriedForwardEvent.java
index 27a5d0df91..a89b59660d 100644
--- a/java/sdk/src/generated/java/com/github/copilot/generated/PermissionCarriedForwardEvent.java
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/PermissionCarriedForwardEvent.java
@@ -13,7 +13,7 @@
import javax.annotation.processing.Generated;
/**
- * Session event "permission.carriedForward". Records that a live authorization record from an earlier human decision in this session contained a permission proposal, so it ran without another prompt. This mints no authority: it accounts for one more effect against the prior grant, which is what lets a replayed session agree with the live one about how much of that grant is left.
+ * Session event "permission.carriedForward". Historical decode-only receipt from the retired Assisted Permissions authorization extractor. Current runtimes ignore it for permission decisions.
* @since 1.0.0
*/
@JsonIgnoreProperties(ignoreUnknown = true)
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/PermissionContextualAuthorizationEvent.java b/java/sdk/src/generated/java/com/github/copilot/generated/PermissionContextualAuthorizationEvent.java
index 2bee51662f..0712d39db8 100644
--- a/java/sdk/src/generated/java/com/github/copilot/generated/PermissionContextualAuthorizationEvent.java
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/PermissionContextualAuthorizationEvent.java
@@ -13,7 +13,7 @@
import javax.annotation.processing.Generated;
/**
- * Session event "permission.contextualAuthorization". Freezes a blinded contextual authorization proposal whose verbatim human span was deterministically bound to the immediately preceding blocked permission request. The event carries no action fields; replay re-derives the exact action from the earlier permission request and mints a one-shot message grant only when the binding and span still verify.
+ * Session event "permission.contextualAuthorization". Historical decode-only contextual authorization claim. Current runtimes preserve the payload but do not establish authority from it.
* @since 1.0.0
*/
@JsonIgnoreProperties(ignoreUnknown = true)
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/PermissionMessageAuthorizationDegradedEvent.java b/java/sdk/src/generated/java/com/github/copilot/generated/PermissionMessageAuthorizationDegradedEvent.java
index dc37375dcf..8efdf509a6 100644
--- a/java/sdk/src/generated/java/com/github/copilot/generated/PermissionMessageAuthorizationDegradedEvent.java
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/PermissionMessageAuthorizationDegradedEvent.java
@@ -13,7 +13,7 @@
import javax.annotation.processing.Generated;
/**
- * Session event "permission.messageAuthorizationDegraded". Records that message-backed authorization could not safely represent one human turn before compaction. The runtime may compact the original message after this marker is durable, but message-derived carry-forward and assisted auto-approval remain disabled for the rest of the session so subsequent commands continue through the ordinary permission prompt.
+ * Session event "permission.messageAuthorizationDegraded". Historical decode-only degradation marker from the retired extractor. Current runtimes ignore it for permission decisions.
* @since 1.0.0
*/
@JsonIgnoreProperties(ignoreUnknown = true)
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/PermissionMessageAuthorizationEvent.java b/java/sdk/src/generated/java/com/github/copilot/generated/PermissionMessageAuthorizationEvent.java
index c87dce05cb..3a6c5aa6f0 100644
--- a/java/sdk/src/generated/java/com/github/copilot/generated/PermissionMessageAuthorizationEvent.java
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/PermissionMessageAuthorizationEvent.java
@@ -14,7 +14,7 @@
import javax.annotation.processing.Generated;
/**
- * Session event "permission.messageAuthorization". Freezes one blinded, verbatim-verified authorization claim the runtime minted from a human user message, so a resumed session re-establishes the same grant deterministically instead of re-running the extraction model. This mints no authority on its own: it records what a blinded proposer pointed at and the trusted discriminator the runtime established, and deterministic establishment runs on replay. Persisted so recorded authority survives compaction and process resume.
+ * Session event "permission.messageAuthorization". Historical decode-only claim from the retired Assisted Permissions authorization extractor. Current runtimes preserve the payload but do not establish authority from it.
* @since 1.0.0
*/
@JsonIgnoreProperties(ignoreUnknown = true)
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/PermissionMessageAuthorizationPolarity.java b/java/sdk/src/generated/java/com/github/copilot/generated/PermissionMessageAuthorizationPolarity.java
index e142238e7b..59183322fa 100644
--- a/java/sdk/src/generated/java/com/github/copilot/generated/PermissionMessageAuthorizationPolarity.java
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/PermissionMessageAuthorizationPolarity.java
@@ -11,7 +11,7 @@
import javax.annotation.processing.Generated;
/**
- * Which direction a message-backed authorization claim moves authority in.
+ * Direction stored in a historical extractor claim. Current runtimes do not apply it.
*
* @apiNote This type is experimental and may change in a future version.
*
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/PermissionMessageAuthorizationReadEvent.java b/java/sdk/src/generated/java/com/github/copilot/generated/PermissionMessageAuthorizationReadEvent.java
index afa6ea4735..7a372823c6 100644
--- a/java/sdk/src/generated/java/com/github/copilot/generated/PermissionMessageAuthorizationReadEvent.java
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/PermissionMessageAuthorizationReadEvent.java
@@ -13,7 +13,7 @@
import javax.annotation.processing.Generated;
/**
- * Session event "permission.messageAuthorizationRead". Records that one human turn has been read by the blinded authorization proposer, whether or not it minted anything, so a resumed session does not re-run the extraction model on a turn the live session already read. Also records whether that pass activates ongoing extraction; contextual-assent-only passes do not, so unrelated future messages remain outside extraction.
+ * Session event "permission.messageAuthorizationRead". Historical decode-only extractor progress marker. Current runtimes do not run or resume extraction from it.
* @since 1.0.0
*/
@JsonIgnoreProperties(ignoreUnknown = true)
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/SessionCompactionCompleteEvent.java b/java/sdk/src/generated/java/com/github/copilot/generated/SessionCompactionCompleteEvent.java
index 6b21976b0c..046317ee26 100644
--- a/java/sdk/src/generated/java/com/github/copilot/generated/SessionCompactionCompleteEvent.java
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/SessionCompactionCompleteEvent.java
@@ -54,7 +54,9 @@ public record SessionCompactionCompleteEventData(
@JsonProperty("summaryContent") String summaryContent,
/** Reasoning baseline on the replacement summary, preserved when replay skips the compacted history */
@JsonProperty("responsesReasoning") ResponsesReasoning responsesReasoning,
- /** Authoritative active-factory reminder appended to the compacted context */
+ /** Authoritative active-workflow reminder appended to the compacted context */
+ @JsonProperty("activeWorkflowSummary") String activeWorkflowSummary,
+ /** Legacy active-workflow reminder retained for replay compatibility */
@JsonProperty("activeFactorySummary") String activeFactorySummary,
/** Canonical model identifier used for model-specific behavior when replaying compaction */
@JsonProperty("behaviorModelId") String behaviorModelId,
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/SessionEvent.java b/java/sdk/src/generated/java/com/github/copilot/generated/SessionEvent.java
index b8419f2ab0..864072a110 100644
--- a/java/sdk/src/generated/java/com/github/copilot/generated/SessionEvent.java
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/SessionEvent.java
@@ -153,9 +153,9 @@
@JsonSubTypes.Type(value = ExitPlanModeCompletedEvent.class, name = "exit_plan_mode.completed"),
@JsonSubTypes.Type(value = SessionToolsUpdatedEvent.class, name = "session.tools_updated"),
@JsonSubTypes.Type(value = SessionBackgroundTasksChangedEvent.class, name = "session.background_tasks_changed"),
- @JsonSubTypes.Type(value = FactoryRunUpdatedEvent.class, name = "factory.run_updated"),
- @JsonSubTypes.Type(value = FactoryRunStartedEvent.class, name = "factory.run_started"),
- @JsonSubTypes.Type(value = FactoryRunSettledEvent.class, name = "factory.run_settled"),
+ @JsonSubTypes.Type(value = WorkflowRunUpdatedEvent.class, name = "workflow.run_updated"),
+ @JsonSubTypes.Type(value = WorkflowRunStartedEvent.class, name = "workflow.run_started"),
+ @JsonSubTypes.Type(value = WorkflowRunSettledEvent.class, name = "workflow.run_settled"),
@JsonSubTypes.Type(value = SessionSkillsLoadedEvent.class, name = "session.skills_loaded"),
@JsonSubTypes.Type(value = SessionCustomAgentsUpdatedEvent.class, name = "session.custom_agents_updated"),
@JsonSubTypes.Type(value = SessionMcpServersLoadedEvent.class, name = "session.mcp_servers_loaded"),
@@ -305,9 +305,9 @@ public abstract sealed class SessionEvent permits
ExitPlanModeCompletedEvent,
SessionToolsUpdatedEvent,
SessionBackgroundTasksChangedEvent,
- FactoryRunUpdatedEvent,
- FactoryRunStartedEvent,
- FactoryRunSettledEvent,
+ WorkflowRunUpdatedEvent,
+ WorkflowRunStartedEvent,
+ WorkflowRunSettledEvent,
SessionSkillsLoadedEvent,
SessionCustomAgentsUpdatedEvent,
SessionMcpServersLoadedEvent,
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/SubagentStartedEvent.java b/java/sdk/src/generated/java/com/github/copilot/generated/SubagentStartedEvent.java
index 7d8f5afe9e..8c8cde1c90 100644
--- a/java/sdk/src/generated/java/com/github/copilot/generated/SubagentStartedEvent.java
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/SubagentStartedEvent.java
@@ -44,12 +44,14 @@ public record SubagentStartedEventData(
@JsonProperty("agentDescription") String agentDescription,
/** Model the sub-agent will run with, when known at start. */
@JsonProperty("model") String model,
- /** Where the model input for this sub-agent came from. Present when the task planner resolved the launch (the task tool and factory agents); absent for sub-agents created through other runtime paths. */
+ /** Where the model input for this sub-agent came from. Present when the task planner resolved the launch (the task tool and workflow agents); absent for sub-agents created through other runtime paths. */
@JsonProperty("taskModelSource") SubagentTaskModelSource taskModelSource,
/** Authority or runtime mechanism responsible for sub-agent model selection, when known at start. */
@JsonProperty("modelSelectionSource") SubagentModelSelectionSource modelSelectionSource,
- /** Root id of the factory run that spawned this sub-agent, when it was spawned by one. */
+ /** Legacy root id of the workflow run that spawned this sub-agent. New consumers should use workflowRunId. */
@JsonProperty("factoryRunId") String factoryRunId,
+ /** Root id of the workflow run that spawned this sub-agent, when it was spawned by one. */
+ @JsonProperty("workflowRunId") String workflowRunId,
/** Task-registry ID of the spawning sub-agent. Absent when the root session spawned this child. */
@JsonProperty("parentId") String parentId,
/** Whether this sub-agent can be resumed. Currently always false. */
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/FactoryRunSettledEvent.java b/java/sdk/src/generated/java/com/github/copilot/generated/WorkflowRunSettledEvent.java
similarity index 68%
rename from java/sdk/src/generated/java/com/github/copilot/generated/FactoryRunSettledEvent.java
rename to java/sdk/src/generated/java/com/github/copilot/generated/WorkflowRunSettledEvent.java
index 58ffa9cb3c..7cfef0df02 100644
--- a/java/sdk/src/generated/java/com/github/copilot/generated/FactoryRunSettledEvent.java
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/WorkflowRunSettledEvent.java
@@ -13,38 +13,38 @@
import javax.annotation.processing.Generated;
/**
- * Session event "factory.run_settled". Ephemeral signal that a factory run reached a terminal status.
+ * Session event "workflow.run_settled". Ephemeral signal that a workflow run reached a terminal status.
* @since 1.0.0
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
@javax.annotation.processing.Generated("copilot-sdk-codegen")
-public final class FactoryRunSettledEvent extends SessionEvent {
+public final class WorkflowRunSettledEvent extends SessionEvent {
@Override
- public String getType() { return "factory.run_settled"; }
+ public String getType() { return "workflow.run_settled"; }
@JsonProperty("data")
- private FactoryRunSettledEventData data;
+ private WorkflowRunSettledEventData data;
- public FactoryRunSettledEventData getData() { return data; }
- public void setData(FactoryRunSettledEventData data) { this.data = data; }
+ public WorkflowRunSettledEventData getData() { return data; }
+ public void setData(WorkflowRunSettledEventData data) { this.data = data; }
- /** Data payload for {@link FactoryRunSettledEvent}. */
+ /** Data payload for {@link WorkflowRunSettledEvent}. */
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
- public record FactoryRunSettledEventData(
- /** Identifier of the factory run that settled. */
+ public record WorkflowRunSettledEventData(
+ /** Identifier of the workflow run that settled. */
@JsonProperty("runId") String runId,
/** Terminal status the run committed. */
- @JsonProperty("status") FactoryRunSettledStatus status,
+ @JsonProperty("status") WorkflowRunSettledStatus status,
/** Subagents this run consumed against its limits. */
@JsonProperty("consumedSubagents") Long consumedSubagents,
/** AI credits this run consumed, in nano-AIU. */
@JsonProperty("consumedNanoAiu") Long consumedNanoAiu,
/** Active milliseconds accumulated across every attempt of this run. */
@JsonProperty("elapsedMs") Long elapsedMs,
- /** Typed failure class recorded on the run, when it failed with one (e.g. `factory_limit_reached`). */
+ /** Typed failure class recorded on the run, when it failed with one (e.g. `workflow_limit_reached`). */
@JsonProperty("failureType") String failureType
) {
}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/FactoryRunSettledStatus.java b/java/sdk/src/generated/java/com/github/copilot/generated/WorkflowRunSettledStatus.java
similarity index 68%
rename from java/sdk/src/generated/java/com/github/copilot/generated/FactoryRunSettledStatus.java
rename to java/sdk/src/generated/java/com/github/copilot/generated/WorkflowRunSettledStatus.java
index 828ddc9ee3..05dee5d53a 100644
--- a/java/sdk/src/generated/java/com/github/copilot/generated/FactoryRunSettledStatus.java
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/WorkflowRunSettledStatus.java
@@ -10,12 +10,12 @@
import javax.annotation.processing.Generated;
/**
- * Terminal status a factory run committed. A settled run is never `pending` or `running`, so those two members of the run-status domain are deliberately absent.
+ * Terminal status a workflow run committed. A settled run is never `pending` or `running`, so those two members of the run-status domain are deliberately absent.
*
* @since 1.0.0
*/
@javax.annotation.processing.Generated("copilot-sdk-codegen")
-public enum FactoryRunSettledStatus {
+public enum WorkflowRunSettledStatus {
/** The {@code completed} variant. */
COMPLETED("completed"),
/** The {@code halted} variant. */
@@ -28,14 +28,14 @@ public enum FactoryRunSettledStatus {
ERROR("error");
private final String value;
- FactoryRunSettledStatus(String value) { this.value = value; }
+ WorkflowRunSettledStatus(String value) { this.value = value; }
@com.fasterxml.jackson.annotation.JsonValue
public String getValue() { return value; }
@com.fasterxml.jackson.annotation.JsonCreator
- public static FactoryRunSettledStatus fromValue(String value) {
- for (FactoryRunSettledStatus v : values()) {
+ public static WorkflowRunSettledStatus fromValue(String value) {
+ for (WorkflowRunSettledStatus v : values()) {
if (v.value.equals(value)) return v;
}
- throw new IllegalArgumentException("Unknown FactoryRunSettledStatus value: " + value);
+ throw new IllegalArgumentException("Unknown WorkflowRunSettledStatus value: " + value);
}
}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/FactoryRunStartedEvent.java b/java/sdk/src/generated/java/com/github/copilot/generated/WorkflowRunStartedEvent.java
similarity index 59%
rename from java/sdk/src/generated/java/com/github/copilot/generated/FactoryRunStartedEvent.java
rename to java/sdk/src/generated/java/com/github/copilot/generated/WorkflowRunStartedEvent.java
index 691c7185d4..656b51f596 100644
--- a/java/sdk/src/generated/java/com/github/copilot/generated/FactoryRunStartedEvent.java
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/WorkflowRunStartedEvent.java
@@ -13,31 +13,31 @@
import javax.annotation.processing.Generated;
/**
- * Session event "factory.run_started". Ephemeral signal that a factory run attempt began executing.
+ * Session event "workflow.run_started". Ephemeral signal that a workflow run attempt began executing.
* @since 1.0.0
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
@javax.annotation.processing.Generated("copilot-sdk-codegen")
-public final class FactoryRunStartedEvent extends SessionEvent {
+public final class WorkflowRunStartedEvent extends SessionEvent {
@Override
- public String getType() { return "factory.run_started"; }
+ public String getType() { return "workflow.run_started"; }
@JsonProperty("data")
- private FactoryRunStartedEventData data;
+ private WorkflowRunStartedEventData data;
- public FactoryRunStartedEventData getData() { return data; }
- public void setData(FactoryRunStartedEventData data) { this.data = data; }
+ public WorkflowRunStartedEventData getData() { return data; }
+ public void setData(WorkflowRunStartedEventData data) { this.data = data; }
- /** Data payload for {@link FactoryRunStartedEvent}. */
+ /** Data payload for {@link WorkflowRunStartedEvent}. */
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
- public record FactoryRunStartedEventData(
- /** Identifier of the factory run that started. */
+ public record WorkflowRunStartedEventData(
+ /** Identifier of the workflow run that started. */
@JsonProperty("runId") String runId,
- /** Name of the factory this run executes. Low cardinality by construction. */
- @JsonProperty("factoryName") String factoryName,
+ /** Name of the workflow this run executes. Low cardinality by construction. */
+ @JsonProperty("workflowName") String workflowName,
/** Attempt number this start committed; a resumed run increments it. */
@JsonProperty("attempt") Long attempt
) {
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/FactoryRunUpdatedEvent.java b/java/sdk/src/generated/java/com/github/copilot/generated/WorkflowRunUpdatedEvent.java
similarity index 65%
rename from java/sdk/src/generated/java/com/github/copilot/generated/FactoryRunUpdatedEvent.java
rename to java/sdk/src/generated/java/com/github/copilot/generated/WorkflowRunUpdatedEvent.java
index 33b542058b..6a51db49f6 100644
--- a/java/sdk/src/generated/java/com/github/copilot/generated/FactoryRunUpdatedEvent.java
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/WorkflowRunUpdatedEvent.java
@@ -13,28 +13,28 @@
import javax.annotation.processing.Generated;
/**
- * Session event "factory.run_updated". Ephemeral invalidation signal for a changed factory run.
+ * Session event "workflow.run_updated". Ephemeral invalidation signal for a changed workflow run.
* @since 1.0.0
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
@javax.annotation.processing.Generated("copilot-sdk-codegen")
-public final class FactoryRunUpdatedEvent extends SessionEvent {
+public final class WorkflowRunUpdatedEvent extends SessionEvent {
@Override
- public String getType() { return "factory.run_updated"; }
+ public String getType() { return "workflow.run_updated"; }
@JsonProperty("data")
- private FactoryRunUpdatedEventData data;
+ private WorkflowRunUpdatedEventData data;
- public FactoryRunUpdatedEventData getData() { return data; }
- public void setData(FactoryRunUpdatedEventData data) { this.data = data; }
+ public WorkflowRunUpdatedEventData getData() { return data; }
+ public void setData(WorkflowRunUpdatedEventData data) { this.data = data; }
- /** Data payload for {@link FactoryRunUpdatedEvent}. */
+ /** Data payload for {@link WorkflowRunUpdatedEvent}. */
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
- public record FactoryRunUpdatedEventData(
- /** Factory run identifier. */
+ public record WorkflowRunUpdatedEventData(
+ /** Workflow run identifier. */
@JsonProperty("runId") String runId,
/** Monotonic revision now available for the run. */
@JsonProperty("revision") Long revision
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AccountKind.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AccountKind.java
new file mode 100644
index 0000000000..e635762661
--- /dev/null
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AccountKind.java
@@ -0,0 +1,45 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.generated.rpc;
+
+import com.github.copilot.CopilotExperimental;
+import javax.annotation.processing.Generated;
+
+/**
+ * The provider kind stamped on a signed-in account.
+ *
+ * @apiNote This type is experimental and may change in a future version.
+ *
+ * @since 1.0.0
+ */
+@CopilotExperimental
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public enum AccountKind {
+ /** The {@code githubDotCom} variant. */
+ GITHUBDOTCOM("githubDotCom"),
+ /** The {@code proxima} variant. */
+ PROXIMA("proxima"),
+ /** The {@code entraEmu} variant. */
+ ENTRAEMU("entraEmu"),
+ /** The {@code entra} variant. */
+ ENTRA("entra"),
+ /** The {@code loki} variant. */
+ LOKI("loki");
+
+ private final String value;
+ AccountKind(String value) { this.value = value; }
+ @com.fasterxml.jackson.annotation.JsonValue
+ public String getValue() { return value; }
+ @com.fasterxml.jackson.annotation.JsonCreator
+ public static AccountKind fromValue(String value) {
+ for (AccountKind v : values()) {
+ if (v.value.equals(value)) return v;
+ }
+ throw new IllegalArgumentException("Unknown AccountKind value: " + value);
+ }
+}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryAgentOptions.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AccountStatus.java
similarity index 53%
rename from java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryAgentOptions.java
rename to java/sdk/src/generated/java/com/github/copilot/generated/rpc/AccountStatus.java
index 35470e7199..cb0868ce74 100644
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryAgentOptions.java
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AccountStatus.java
@@ -14,7 +14,7 @@
import javax.annotation.processing.Generated;
/**
- * Options for one factory-scoped subagent call.
+ * One signed-in account in the roster forest.
*
* @apiNote This type is experimental and may change in a future version.
*
@@ -24,18 +24,18 @@
@javax.annotation.processing.Generated("copilot-sdk-codegen")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public record FactoryAgentOptions(
- /** Optional label distinguishing otherwise identical memoized agent calls. */
- @JsonProperty("label") String label,
- /** Optional JSON Schema for structured agent output. */
- @JsonProperty("schema") Object schema,
- /** Optional model identifier for the subagent. */
- @JsonProperty("model") String model,
- /** Optional reasoning effort override for the subagent. */
- @JsonProperty("reasoningEffort") String reasoningEffort,
- /** Optional context tier override for the subagent. */
- @JsonProperty("contextTier") ContextTier contextTier,
- /** Optional built-in or custom agent name whose definition configures the subagent. */
- @JsonProperty("agent") String agent
+public record AccountStatus(
+ /** Authentication host URL. */
+ @JsonProperty("host") String host,
+ /** Authenticated login/username. */
+ @JsonProperty("login") String login,
+ /** The provider kind of this account. */
+ @JsonProperty("kind") AccountKind kind,
+ /** Opaque id of the account this one was derived from (e.g. an EMU account's base Entra identity); absent for a root account. Matches the base identity account's selectionId, forming the derivation edge. */
+ @JsonProperty("derivedFrom") String derivedFrom,
+ /** Whether this is the active account. */
+ @JsonProperty("active") Boolean active,
+ /** Opaque selection id used to switch to, or log out, this account. */
+ @JsonProperty("selectionId") String selectionId
) {
}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthEnumerateValue.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthEnumerateValue.java
new file mode 100644
index 0000000000..f84ccee737
--- /dev/null
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthEnumerateValue.java
@@ -0,0 +1,39 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.github.copilot.CopilotExperimental;
+import javax.annotation.processing.Generated;
+
+/**
+ * The enumerated collection, keyed by the same selector as the query.
+ *
+ * @apiNote This type is experimental and may change in a future version.
+ *
+ * @since 1.0.0
+ */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "kind", visible = true)
+@JsonSubTypes({
+ @JsonSubTypes.Type(value = AuthEnumerateValueAccounts.class, name = "accounts"),
+ @JsonSubTypes.Type(value = AuthEnumerateValueProviders.class, name = "providers")
+})
+@CopilotExperimental
+@JsonIgnoreProperties(ignoreUnknown = true)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public abstract class AuthEnumerateValue {
+
+ /**
+ * Returns the discriminator value for this variant.
+ *
+ * @return the kind discriminator
+ */
+ public abstract String getKind();
+}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryResumeFromToolResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthEnumerateValueAccounts.java
similarity index 57%
rename from java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryResumeFromToolResult.java
rename to java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthEnumerateValueAccounts.java
index d4566384c5..11afc36f14 100644
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryResumeFromToolResult.java
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthEnumerateValueAccounts.java
@@ -10,23 +10,29 @@
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
-import com.github.copilot.CopilotExperimental;
+import java.util.List;
import javax.annotation.processing.Generated;
/**
- * Resolved persisted factory identity and resumed run envelope.
+ * Variant {@code accounts} of {@link AuthEnumerateValue}.
*
- * @apiNote This method is experimental and may change in a future version.
* @since 1.0.0
*/
-@CopilotExperimental
-@javax.annotation.processing.Generated("copilot-sdk-codegen")
-@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public record SessionFactoryResumeFromToolResult(
- /** Persisted factory name resolved for the resumed run. */
- @JsonProperty("factoryName") String factoryName,
- /** Terminal resumed run envelope. */
- @JsonProperty("run") FactoryRunResult run
-) {
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class AuthEnumerateValueAccounts extends AuthEnumerateValue {
+
+ @JsonProperty("kind")
+ private final String kind = "accounts";
+
+ @Override
+ public String getKind() { return kind; }
+
+ /** The signed-in account forest; empty when not logged in. */
+ @JsonProperty("items")
+ private List items;
+
+ public List getItems() { return items; }
+ public void setItems(List items) { this.items = items; }
}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryResumeResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthEnumerateValueProviders.java
similarity index 57%
rename from java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryResumeResult.java
rename to java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthEnumerateValueProviders.java
index b4cfcae116..965684e8ed 100644
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryResumeResult.java
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthEnumerateValueProviders.java
@@ -10,23 +10,29 @@
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
-import com.github.copilot.CopilotExperimental;
+import java.util.List;
import javax.annotation.processing.Generated;
/**
- * Resolved persisted factory identity and resumed run envelope.
+ * Variant {@code providers} of {@link AuthEnumerateValue}.
*
- * @apiNote This method is experimental and may change in a future version.
* @since 1.0.0
*/
-@CopilotExperimental
-@javax.annotation.processing.Generated("copilot-sdk-codegen")
-@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public record SessionFactoryResumeResult(
- /** Persisted factory name resolved for the resumed run. */
- @JsonProperty("factoryName") String factoryName,
- /** Terminal resumed run envelope. */
- @JsonProperty("run") FactoryRunResult run
-) {
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class AuthEnumerateValueProviders extends AuthEnumerateValue {
+
+ @JsonProperty("kind")
+ private final String kind = "providers";
+
+ @Override
+ public String getKind() { return kind; }
+
+ /** The providers offered for interactive login. */
+ @JsonProperty("items")
+ private List items;
+
+ public List getItems() { return items; }
+ public void setItems(List items) { this.items = items; }
}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryToolRunOptions.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthLoginResultDto.java
similarity index 71%
rename from java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryToolRunOptions.java
rename to java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthLoginResultDto.java
index e2444c7053..cbcffb6e54 100644
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryToolRunOptions.java
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthLoginResultDto.java
@@ -14,7 +14,7 @@
import javax.annotation.processing.Generated;
/**
- * Options for an internal tool-originated factory invocation.
+ * Terminal result of an interactive login flow.
*
* @apiNote This type is experimental and may change in a future version.
*
@@ -24,10 +24,12 @@
@javax.annotation.processing.Generated("copilot-sdk-codegen")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public record FactoryToolRunOptions(
- /** Per-invocation resource ceiling overrides. */
- @JsonProperty("limits") FactoryRunLimits limits,
- /** Run identifier whose journal and progress should seed this resumed run. */
- @JsonProperty("resumeFromRunId") String resumeFromRunId
+public record AuthLoginResultDto(
+ /** Terminal disposition of the login. */
+ @JsonProperty("status") AuthLoginResultStatus status,
+ /** Host that was signed in, when completed. */
+ @JsonProperty("host") String host,
+ /** Login that was signed in, when completed. */
+ @JsonProperty("login") String login
) {
}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryPhaseStatus.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthLoginResultStatus.java
similarity index 63%
rename from java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryPhaseStatus.java
rename to java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthLoginResultStatus.java
index 8432507176..9e36ad0027 100644
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryPhaseStatus.java
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthLoginResultStatus.java
@@ -11,7 +11,7 @@
import javax.annotation.processing.Generated;
/**
- * Derived lifecycle state of a factory phase.
+ * Terminal disposition of a login persistence attempt.
*
* @apiNote This type is experimental and may change in a future version.
*
@@ -19,25 +19,23 @@
*/
@CopilotExperimental
@javax.annotation.processing.Generated("copilot-sdk-codegen")
-public enum FactoryPhaseStatus {
- /** The {@code pending} variant. */
- PENDING("pending"),
- /** The {@code active} variant. */
- ACTIVE("active"),
+public enum AuthLoginResultStatus {
/** The {@code completed} variant. */
COMPLETED("completed"),
- /** The {@code skipped} variant. */
- SKIPPED("skipped");
+ /** The {@code needs-plaintext-consent} variant. */
+ NEEDS_PLAINTEXT_CONSENT("needs-plaintext-consent"),
+ /** The {@code declined} variant. */
+ DECLINED("declined");
private final String value;
- FactoryPhaseStatus(String value) { this.value = value; }
+ AuthLoginResultStatus(String value) { this.value = value; }
@com.fasterxml.jackson.annotation.JsonValue
public String getValue() { return value; }
@com.fasterxml.jackson.annotation.JsonCreator
- public static FactoryPhaseStatus fromValue(String value) {
- for (FactoryPhaseStatus v : values()) {
+ public static AuthLoginResultStatus fromValue(String value) {
+ for (AuthLoginResultStatus v : values()) {
if (v.value.equals(value)) return v;
}
- throw new IllegalArgumentException("Unknown FactoryPhaseStatus value: " + value);
+ throw new IllegalArgumentException("Unknown AuthLoginResultStatus value: " + value);
}
}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthLoginStep.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthLoginStep.java
new file mode 100644
index 0000000000..f13d72f1b9
--- /dev/null
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthLoginStep.java
@@ -0,0 +1,43 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.github.copilot.CopilotExperimental;
+import javax.annotation.processing.Generated;
+
+/**
+ * One step in an interactive login flow. The consumer acts on the step and calls advance to proceed. Browser-open is encoded as two distinct steps by design: `open-url` is CONSUMER-driven (the provider surfaces the authorize URL and the consumer opens it — github.com/GHEC web), while `needs-interaction` is PROVIDER-driven (the provider opens the browser or broker UI itself and does not surface a URL — Entra).
+ *
+ * @apiNote This type is experimental and may change in a future version.
+ *
+ * @since 1.0.0
+ */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "kind", visible = true)
+@JsonSubTypes({
+ @JsonSubTypes.Type(value = AuthLoginStepOpenUrl.class, name = "open-url"),
+ @JsonSubTypes.Type(value = AuthLoginStepInputRequired.class, name = "input-required"),
+ @JsonSubTypes.Type(value = AuthLoginStepAwaiting.class, name = "awaiting"),
+ @JsonSubTypes.Type(value = AuthLoginStepNeedsInteraction.class, name = "needs-interaction"),
+ @JsonSubTypes.Type(value = AuthLoginStepCompleted.class, name = "completed"),
+ @JsonSubTypes.Type(value = AuthLoginStepError.class, name = "error")
+})
+@CopilotExperimental
+@JsonIgnoreProperties(ignoreUnknown = true)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public abstract class AuthLoginStep {
+
+ /**
+ * Returns the discriminator value for this variant.
+ *
+ * @return the kind discriminator
+ */
+ public abstract String getKind();
+}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryCurrentPhase.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthLoginStepAwaiting.java
similarity index 77%
rename from java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryCurrentPhase.java
rename to java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthLoginStepAwaiting.java
index c15631835d..10d61f66a0 100644
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryCurrentPhase.java
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthLoginStepAwaiting.java
@@ -14,20 +14,21 @@
import javax.annotation.processing.Generated;
/**
- * Current factory phase identity.
+ * Variant {@code awaiting} of {@link AuthLoginStep}.
*
* @apiNote This type is experimental and may change in a future version.
*
* @since 1.0.0
*/
@CopilotExperimental
-@javax.annotation.processing.Generated("copilot-sdk-codegen")
-@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public record FactoryCurrentPhase(
- /** Current phase identifier. */
- @JsonProperty("id") String id,
- /** Zero-based declared phase ordinal, or null for an undeclared phase. */
- @JsonProperty("ordinal") Long ordinal
-) {
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class AuthLoginStepAwaiting extends AuthLoginStep {
+
+ @JsonProperty("kind")
+ private final String kind = "awaiting";
+
+ @Override
+ public String getKind() { return kind; }
}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthLoginStepCompleted.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthLoginStepCompleted.java
new file mode 100644
index 0000000000..b1fb524643
--- /dev/null
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthLoginStepCompleted.java
@@ -0,0 +1,41 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.github.copilot.CopilotExperimental;
+import javax.annotation.processing.Generated;
+
+/**
+ * Variant {@code completed} of {@link AuthLoginStep}.
+ *
+ * @apiNote This type is experimental and may change in a future version.
+ *
+ * @since 1.0.0
+ */
+@CopilotExperimental
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class AuthLoginStepCompleted extends AuthLoginStep {
+
+ @JsonProperty("kind")
+ private final String kind = "completed";
+
+ @Override
+ public String getKind() { return kind; }
+
+ /** The terminal login result. */
+ @JsonProperty("result")
+ private AuthLoginResultDto result;
+
+ public AuthLoginResultDto getResult() { return result; }
+ public void setResult(AuthLoginResultDto result) { this.result = result; }
+}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthLoginStepError.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthLoginStepError.java
new file mode 100644
index 0000000000..1d6d425122
--- /dev/null
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthLoginStepError.java
@@ -0,0 +1,41 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.github.copilot.CopilotExperimental;
+import javax.annotation.processing.Generated;
+
+/**
+ * Variant {@code error} of {@link AuthLoginStep}.
+ *
+ * @apiNote This type is experimental and may change in a future version.
+ *
+ * @since 1.0.0
+ */
+@CopilotExperimental
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class AuthLoginStepError extends AuthLoginStep {
+
+ @JsonProperty("kind")
+ private final String kind = "error";
+
+ @Override
+ public String getKind() { return kind; }
+
+ /** Human-readable failure message. */
+ @JsonProperty("message")
+ private String message;
+
+ public String getMessage() { return message; }
+ public void setMessage(String message) { this.message = message; }
+}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthLoginStepInputRequired.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthLoginStepInputRequired.java
new file mode 100644
index 0000000000..f2fe79429b
--- /dev/null
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthLoginStepInputRequired.java
@@ -0,0 +1,41 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.github.copilot.CopilotExperimental;
+import javax.annotation.processing.Generated;
+
+/**
+ * Variant {@code input-required} of {@link AuthLoginStep}.
+ *
+ * @apiNote This type is experimental and may change in a future version.
+ *
+ * @since 1.0.0
+ */
+@CopilotExperimental
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class AuthLoginStepInputRequired extends AuthLoginStep {
+
+ @JsonProperty("kind")
+ private final String kind = "input-required";
+
+ @Override
+ public String getKind() { return kind; }
+
+ /** Prompt for the value the provider needs; the consumer supplies it as advance input (e.g. a GitHub Enterprise Cloud host, *.ghe.com). */
+ @JsonProperty("prompt")
+ private String prompt;
+
+ public String getPrompt() { return prompt; }
+ public void setPrompt(String prompt) { this.prompt = prompt; }
+}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryLogLine.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthLoginStepNeedsInteraction.java
similarity index 74%
rename from java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryLogLine.java
rename to java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthLoginStepNeedsInteraction.java
index 1f7afdd583..27902574e1 100644
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryLogLine.java
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthLoginStepNeedsInteraction.java
@@ -14,22 +14,21 @@
import javax.annotation.processing.Generated;
/**
- * One ordered factory progress line.
+ * Variant {@code needs-interaction} of {@link AuthLoginStep}.
*
* @apiNote This type is experimental and may change in a future version.
*
* @since 1.0.0
*/
@CopilotExperimental
-@javax.annotation.processing.Generated("copilot-sdk-codegen")
-@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public record FactoryLogLine(
- /** Monotonic sequence number within the factory run. */
- @JsonProperty("seq") Long seq,
- /** Progress line kind. */
- @JsonProperty("kind") FactoryLogLineKind kind,
- /** Progress text. */
- @JsonProperty("text") String text
-) {
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class AuthLoginStepNeedsInteraction extends AuthLoginStep {
+
+ @JsonProperty("kind")
+ private final String kind = "needs-interaction";
+
+ @Override
+ public String getKind() { return kind; }
}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthLoginStepOpenUrl.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthLoginStepOpenUrl.java
new file mode 100644
index 0000000000..977ee8caf0
--- /dev/null
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthLoginStepOpenUrl.java
@@ -0,0 +1,41 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.github.copilot.CopilotExperimental;
+import javax.annotation.processing.Generated;
+
+/**
+ * Variant {@code open-url} of {@link AuthLoginStep}.
+ *
+ * @apiNote This type is experimental and may change in a future version.
+ *
+ * @since 1.0.0
+ */
+@CopilotExperimental
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class AuthLoginStepOpenUrl extends AuthLoginStep {
+
+ @JsonProperty("kind")
+ private final String kind = "open-url";
+
+ @Override
+ public String getKind() { return kind; }
+
+ /** Authorize URL the consumer should open in a browser (consumer-driven browser-open). */
+ @JsonProperty("url")
+ private String url;
+
+ public String getUrl() { return url; }
+ public void setUrl(String url) { this.url = url; }
+}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthReadValue.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthReadValue.java
new file mode 100644
index 0000000000..4e19659e4b
--- /dev/null
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthReadValue.java
@@ -0,0 +1,40 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.github.copilot.CopilotExperimental;
+import javax.annotation.processing.Generated;
+
+/**
+ * The read result, keyed by the same selector as the query.
+ *
+ * @apiNote This type is experimental and may change in a future version.
+ *
+ * @since 1.0.0
+ */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "kind", visible = true)
+@JsonSubTypes({
+ @JsonSubTypes.Type(value = AuthReadValueActiveAccount.class, name = "activeAccount"),
+ @JsonSubTypes.Type(value = AuthReadValueStatus.class, name = "status"),
+ @JsonSubTypes.Type(value = AuthReadValueLastErrors.class, name = "lastErrors")
+})
+@CopilotExperimental
+@JsonIgnoreProperties(ignoreUnknown = true)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public abstract class AuthReadValue {
+
+ /**
+ * Returns the discriminator value for this variant.
+ *
+ * @return the kind discriminator
+ */
+ public abstract String getKind();
+}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthReadValueActiveAccount.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthReadValueActiveAccount.java
new file mode 100644
index 0000000000..8ee2fb9416
--- /dev/null
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthReadValueActiveAccount.java
@@ -0,0 +1,41 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.github.copilot.CopilotExperimental;
+import javax.annotation.processing.Generated;
+
+/**
+ * Variant {@code activeAccount} of {@link AuthReadValue}.
+ *
+ * @apiNote This type is experimental and may change in a future version.
+ *
+ * @since 1.0.0
+ */
+@CopilotExperimental
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class AuthReadValueActiveAccount extends AuthReadValue {
+
+ @JsonProperty("kind")
+ private final String kind = "activeAccount";
+
+ @Override
+ public String getKind() { return kind; }
+
+ /** The active account, or absent when not logged in. */
+ @JsonProperty("account")
+ private AccountStatus account;
+
+ public AccountStatus getAccount() { return account; }
+ public void setAccount(AccountStatus account) { this.account = account; }
+}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryDeclaredLimits.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthReadValueLastErrors.java
similarity index 61%
rename from java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryDeclaredLimits.java
rename to java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthReadValueLastErrors.java
index 7e2e4e6b5b..d7a84eae33 100644
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryDeclaredLimits.java
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthReadValueLastErrors.java
@@ -11,27 +11,32 @@
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.github.copilot.CopilotExperimental;
+import java.util.List;
import javax.annotation.processing.Generated;
/**
- * Declared or approved factory resource ceilings.
+ * Variant {@code lastErrors} of {@link AuthReadValue}.
*
* @apiNote This type is experimental and may change in a future version.
*
* @since 1.0.0
*/
@CopilotExperimental
-@javax.annotation.processing.Generated("copilot-sdk-codegen")
-@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public record FactoryDeclaredLimits(
- /** Maximum concurrently active subagents. */
- @JsonProperty("maxConcurrentSubagents") Long maxConcurrentSubagents,
- /** Maximum total subagents spawned by the run. */
- @JsonProperty("maxTotalSubagents") Long maxTotalSubagents,
- /** Maximum accumulated active execution time in seconds. */
- @JsonProperty("timeoutSeconds") Double timeoutSeconds,
- /** Maximum AI credits consumed by subagents and descendants. */
- @JsonProperty("maxAiCredits") Double maxAiCredits
-) {
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class AuthReadValueLastErrors extends AuthReadValue {
+
+ @JsonProperty("kind")
+ private final String kind = "lastErrors";
+
+ @Override
+ public String getKind() { return kind; }
+
+ /** Validation errors from the most recent authentication attempt. */
+ @JsonProperty("errors")
+ private List errors;
+
+ public List getErrors() { return errors; }
+ public void setErrors(List errors) { this.errors = errors; }
}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthReadValueStatus.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthReadValueStatus.java
new file mode 100644
index 0000000000..01b03f041a
--- /dev/null
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthReadValueStatus.java
@@ -0,0 +1,41 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.github.copilot.CopilotExperimental;
+import javax.annotation.processing.Generated;
+
+/**
+ * Variant {@code status} of {@link AuthReadValue}.
+ *
+ * @apiNote This type is experimental and may change in a future version.
+ *
+ * @since 1.0.0
+ */
+@CopilotExperimental
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class AuthReadValueStatus extends AuthReadValue {
+
+ @JsonProperty("kind")
+ private final String kind = "status";
+
+ @Override
+ public String getKind() { return kind; }
+
+ /** The neutral authentication status summary. */
+ @JsonProperty("status")
+ private AuthStatusDto status;
+
+ public AuthStatusDto getStatus() { return status; }
+ public void setStatus(AuthStatusDto status) { this.status = status; }
+}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthStatusDto.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthStatusDto.java
new file mode 100644
index 0000000000..35a4113c80
--- /dev/null
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/AuthStatusDto.java
@@ -0,0 +1,39 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.github.copilot.CopilotExperimental;
+import javax.annotation.processing.Generated;
+
+/**
+ * Neutral authentication status summary.
+ *
+ * @apiNote This type is experimental and may change in a future version.
+ *
+ * @since 1.0.0
+ */
+@CopilotExperimental
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public record AuthStatusDto(
+ /** Whether the session has resolved authentication. */
+ @JsonProperty("isAuthenticated") Boolean isAuthenticated,
+ /** Active account login, if authenticated. */
+ @JsonProperty("activeLogin") String activeLogin,
+ /** Active account host, if authenticated. */
+ @JsonProperty("activeHost") String activeHost,
+ /** Copilot plan tier of the active account, if known. */
+ @JsonProperty("copilotPlan") String copilotPlan,
+ /** Number of signed-in accounts in the roster. */
+ @JsonProperty("accountCount") Long accountCount
+) {
+}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryAgentSummary.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryAgentSummary.java
deleted file mode 100644
index d063fc9c6b..0000000000
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryAgentSummary.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-// AUTO-GENERATED FILE - DO NOT EDIT
-// Generated from: api.schema.json
-
-package com.github.copilot.generated.rpc;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.github.copilot.CopilotExperimental;
-import javax.annotation.processing.Generated;
-
-/**
- * Prompt-safe durable identity and live status for a direct factory agent.
- *
- * @apiNote This type is experimental and may change in a future version.
- *
- * @since 1.0.0
- */
-@CopilotExperimental
-@javax.annotation.processing.Generated("copilot-sdk-codegen")
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public record FactoryAgentSummary(
- /** Stable direct-agent identifier. */
- @JsonProperty("agentId") String agentId,
- /** Tool-call identifier that launched the agent. */
- @JsonProperty("toolCallId") String toolCallId,
- /** Owning factory run identifier. */
- @JsonProperty("runId") String runId,
- /** Phase identifier active when the agent was launched, or null. */
- @JsonProperty("phaseId") String phaseId,
- /** Friendly, non-unique name intended for display */
- @JsonProperty("label") String label,
- /** Friendly, non-unique name intended for display */
- @JsonProperty("displayName") String displayName,
- /** Registered agent type. */
- @JsonProperty("agentType") String agentType,
- /** Current durable or live agent status. */
- @JsonProperty("status") String status,
- /** Model requested when the agent was launched. */
- @JsonProperty("requestedModel") String requestedModel,
- /** Concrete model resolved for the agent. */
- @JsonProperty("resolvedModel") String resolvedModel,
- /** Epoch milliseconds when the agent started. */
- @JsonProperty("startedAt") Long startedAt,
- /** Epoch milliseconds when the agent completed. */
- @JsonProperty("completedAt") Long completedAt,
- /** Accumulated active agent time in milliseconds. */
- @JsonProperty("activeMs") Long activeMs,
- /** Prompt-safe live activity text. */
- @JsonProperty("activity") String activity
-) {
-}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryExecuteParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryExecuteParams.java
deleted file mode 100644
index 6834dd4b12..0000000000
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryExecuteParams.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-// AUTO-GENERATED FILE - DO NOT EDIT
-// Generated from: api.schema.json
-
-package com.github.copilot.generated.rpc;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.github.copilot.CopilotExperimental;
-import javax.annotation.processing.Generated;
-
-/**
- * Parameters sent to the owning extension to execute a factory closure.
- *
- * @apiNote This method is experimental and may change in a future version.
- * @since 1.0.0
- */
-@CopilotExperimental
-@javax.annotation.processing.Generated("copilot-sdk-codegen")
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public record FactoryExecuteParams(
- /** Target session identifier */
- @JsonProperty("sessionId") String sessionId,
- /** Registered factory name. */
- @JsonProperty("name") String name,
- /** Factory run identifier. */
- @JsonProperty("runId") String runId,
- /** Opaque token identifying this factory execution attempt. */
- @JsonProperty("executionToken") String executionToken,
- /** Factory input value. */
- @JsonProperty("args") Object args
-) {
-}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryLogLineKind.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryLogLineKind.java
deleted file mode 100644
index 1064f1691d..0000000000
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryLogLineKind.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-// AUTO-GENERATED FILE - DO NOT EDIT
-// Generated from: api.schema.json
-
-package com.github.copilot.generated.rpc;
-
-import javax.annotation.processing.Generated;
-
-/**
- * Kind of factory progress line.
- *
- * @since 1.0.0
- */
-@javax.annotation.processing.Generated("copilot-sdk-codegen")
-public enum FactoryLogLineKind {
- /** The {@code log} variant. */
- LOG("log"),
- /** The {@code phase} variant. */
- PHASE("phase");
-
- private final String value;
- FactoryLogLineKind(String value) { this.value = value; }
- @com.fasterxml.jackson.annotation.JsonValue
- public String getValue() { return value; }
- @com.fasterxml.jackson.annotation.JsonCreator
- public static FactoryLogLineKind fromValue(String value) {
- for (FactoryLogLineKind v : values()) {
- if (v.value.equals(value)) return v;
- }
- throw new IllegalArgumentException("Unknown FactoryLogLineKind value: " + value);
- }
-}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryPhaseObservation.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryPhaseObservation.java
deleted file mode 100644
index 167766885c..0000000000
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryPhaseObservation.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-// AUTO-GENERATED FILE - DO NOT EDIT
-// Generated from: api.schema.json
-
-package com.github.copilot.generated.rpc;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.github.copilot.CopilotExperimental;
-import javax.annotation.processing.Generated;
-
-/**
- * Durable lifecycle and timing for one factory phase.
- *
- * @apiNote This type is experimental and may change in a future version.
- *
- * @since 1.0.0
- */
-@CopilotExperimental
-@javax.annotation.processing.Generated("copilot-sdk-codegen")
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public record FactoryPhaseObservation(
- /** Phase identifier. */
- @JsonProperty("id") String id,
- /** Zero-based declared phase ordinal, or null for an undeclared phase. */
- @JsonProperty("ordinal") Long ordinal,
- /** Human-readable phase title. */
- @JsonProperty("title") String title,
- /** Optional human-readable phase detail. */
- @JsonProperty("detail") String detail,
- /** Derived lifecycle state of the phase. */
- @JsonProperty("status") FactoryPhaseStatus status,
- /** Most recent run attempt that entered this phase, or `0` if the phase has never been entered. */
- @JsonProperty("lastEnteredRunAttempt") Long lastEnteredRunAttempt,
- /** Number of times execution entered this phase. */
- @JsonProperty("entryCount") Long entryCount,
- /** Epoch milliseconds when this phase first started; for a skipped phase, the synthetic skip timestamp (equal to `completedAt`). */
- @JsonProperty("startedAt") Long startedAt,
- /** Epoch milliseconds when this phase completed; for a skipped phase, the synthetic skip timestamp (equal to `startedAt`). */
- @JsonProperty("completedAt") Long completedAt,
- /** Completed active time accumulated by this phase in milliseconds. */
- @JsonProperty("accumulatedActiveMs") Long accumulatedActiveMs,
- /** Current live active time for this phase in milliseconds. */
- @JsonProperty("currentActiveMs") Long currentActiveMs,
- /** Total direct agents associated with this phase. */
- @JsonProperty("totalAgentCount") Long totalAgentCount,
- /** Direct agents in this phase that are currently live. */
- @JsonProperty("liveAgentCount") Long liveAgentCount
-) {
-}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryProgressLine.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryProgressLine.java
deleted file mode 100644
index c9ed149610..0000000000
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryProgressLine.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-// AUTO-GENERATED FILE - DO NOT EDIT
-// Generated from: api.schema.json
-
-package com.github.copilot.generated.rpc;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.github.copilot.CopilotExperimental;
-import javax.annotation.processing.Generated;
-
-/**
- * One durable factory progress record.
- *
- * @apiNote This type is experimental and may change in a future version.
- *
- * @since 1.0.0
- */
-@CopilotExperimental
-@javax.annotation.processing.Generated("copilot-sdk-codegen")
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public record FactoryProgressLine(
- /** Global monotonic sequence number within the run. */
- @JsonProperty("seq") Long seq,
- /** Resume attempt that emitted this record. */
- @JsonProperty("attempt") Long attempt,
- /** Phase active when the record was emitted, or null before any phase. */
- @JsonProperty("phaseId") String phaseId,
- /** Epoch milliseconds when the record was persisted. */
- @JsonProperty("recordedAt") Long recordedAt,
- /** Progress record kind. */
- @JsonProperty("kind") FactoryLogLineKind kind,
- /** Prompt-safe progress text. */
- @JsonProperty("text") String text
-) {
-}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryProgressPage.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryProgressPage.java
deleted file mode 100644
index 935140612e..0000000000
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryProgressPage.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-// AUTO-GENERATED FILE - DO NOT EDIT
-// Generated from: api.schema.json
-
-package com.github.copilot.generated.rpc;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.github.copilot.CopilotExperimental;
-import java.util.List;
-import javax.annotation.processing.Generated;
-
-/**
- * A bidirectional page of factory progress.
- *
- * @apiNote This type is experimental and may change in a future version.
- *
- * @since 1.0.0
- */
-@CopilotExperimental
-@javax.annotation.processing.Generated("copilot-sdk-codegen")
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public record FactoryProgressPage(
- /** Progress records in sequence order. */
- @JsonProperty("records") List records,
- /** Oldest sequence number in this page, or null when empty. */
- @JsonProperty("oldestSeq") Long oldestSeq,
- /** Newest sequence number in this page, or null when empty. */
- @JsonProperty("newestSeq") Long newestSeq,
- /** Whether progress records older than this page exist. */
- @JsonProperty("hasMoreOlder") Boolean hasMoreOlder,
- /** Whether progress records newer than this page exist. */
- @JsonProperty("hasMoreNewer") Boolean hasMoreNewer,
- /** Run revision reflected by this page. */
- @JsonProperty("revision") Long revision
-) {
-}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunLimits.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunLimits.java
deleted file mode 100644
index 300e4977b3..0000000000
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunLimits.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-// AUTO-GENERATED FILE - DO NOT EDIT
-// Generated from: api.schema.json
-
-package com.github.copilot.generated.rpc;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.github.copilot.CopilotExperimental;
-import javax.annotation.processing.Generated;
-
-/**
- * Wire-only per-invocation factory resource ceiling overrides.
- *
- * @apiNote This type is experimental and may change in a future version.
- *
- * @since 1.0.0
- */
-@CopilotExperimental
-@javax.annotation.processing.Generated("copilot-sdk-codegen")
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public record FactoryRunLimits(
- /** Maximum number of factory subagents that may run concurrently. */
- @JsonProperty("maxConcurrentSubagents") Long maxConcurrentSubagents,
- /** Maximum total number of factory subagents that may be admitted. */
- @JsonProperty("maxTotalSubagents") Long maxTotalSubagents,
- /** Maximum accumulated active-execution time in seconds. Active execution includes the entire extension body, subprocess waits, queued-agent waits, and sleeps; time between resumed attempts is not counted. */
- @JsonProperty("timeoutSeconds") Double timeoutSeconds,
- /** Maximum AI credits consumed by factory subagents and their descendants. The post-paid ceiling is soft: parallel turns can settle beyond it before the run stops. */
- @JsonProperty("maxAiCredits") Double maxAiCredits
-) {
-}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunResult.java
deleted file mode 100644
index 436f969f61..0000000000
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunResult.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-// AUTO-GENERATED FILE - DO NOT EDIT
-// Generated from: api.schema.json
-
-package com.github.copilot.generated.rpc;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import javax.annotation.processing.Generated;
-
-/**
- * Complete current or terminal factory run envelope.
- *
- * @since 1.0.0
- */
-@javax.annotation.processing.Generated("copilot-sdk-codegen")
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public record FactoryRunResult(
- /** Factory run identifier. */
- @JsonProperty("runId") String runId,
- /** One-based execution attempt represented by this envelope. Absent before the first attempt starts or when returned by an older runtime. */
- @JsonProperty("attempt") Long attempt,
- /** Current or terminal factory run status. */
- @JsonProperty("status") FactoryRunStatus status,
- /** Completed factory result. */
- @JsonProperty("result") Object result,
- /** Error message for an errored run. */
- @JsonProperty("error") String error,
- /** Machine-readable failure details for a halted or errored run. */
- @JsonProperty("failure") Object failure,
- /** Reason for a halted or cancelled run. */
- @JsonProperty("reason") String reason,
- /** Partial journal and progress snapshot for a halted, cancelled, or errored run. */
- @JsonProperty("snapshot") Object snapshot,
- /** Structured pause initiator metadata for a paused attempt. */
- @JsonProperty("pauseInfo") Object pauseInfo
-) {
-}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunStatus.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunStatus.java
deleted file mode 100644
index d5c87e7304..0000000000
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunStatus.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-// AUTO-GENERATED FILE - DO NOT EDIT
-// Generated from: api.schema.json
-
-package com.github.copilot.generated.rpc;
-
-import javax.annotation.processing.Generated;
-
-/**
- * Current or terminal state of a factory run.
- *
- * @since 1.0.0
- */
-@javax.annotation.processing.Generated("copilot-sdk-codegen")
-public enum FactoryRunStatus {
- /** The {@code pending} variant. */
- PENDING("pending"),
- /** The {@code running} variant. */
- RUNNING("running"),
- /** The {@code completed} variant. */
- COMPLETED("completed"),
- /** The {@code halted} variant. */
- HALTED("halted"),
- /** The {@code paused} variant. */
- PAUSED("paused"),
- /** The {@code cancelled} variant. */
- CANCELLED("cancelled"),
- /** The {@code error} variant. */
- ERROR("error");
-
- private final String value;
- FactoryRunStatus(String value) { this.value = value; }
- @com.fasterxml.jackson.annotation.JsonValue
- public String getValue() { return value; }
- @com.fasterxml.jackson.annotation.JsonCreator
- public static FactoryRunStatus fromValue(String value) {
- for (FactoryRunStatus v : values()) {
- if (v.value.equals(value)) return v;
- }
- throw new IllegalArgumentException("Unknown FactoryRunStatus value: " + value);
- }
-}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunSummary.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunSummary.java
deleted file mode 100644
index 56d1f91763..0000000000
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunSummary.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-// AUTO-GENERATED FILE - DO NOT EDIT
-// Generated from: api.schema.json
-
-package com.github.copilot.generated.rpc;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.github.copilot.CopilotExperimental;
-import javax.annotation.processing.Generated;
-
-/**
- * Durable factory run summary with read-time live overlays.
- *
- * @apiNote This type is experimental and may change in a future version.
- *
- * @since 1.0.0
- */
-@CopilotExperimental
-@javax.annotation.processing.Generated("copilot-sdk-codegen")
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public record FactoryRunSummary(
- /** Factory run identifier. */
- @JsonProperty("runId") String runId,
- /** Registered factory name. */
- @JsonProperty("factoryName") String factoryName,
- /** Human-readable factory description. */
- @JsonProperty("description") String description,
- /** Current factory run status. */
- @JsonProperty("status") FactoryRunStatus status,
- /** Monotonic durable run revision. */
- @JsonProperty("revision") Long revision,
- /** Epoch milliseconds when the run was created. */
- @JsonProperty("createdAt") Long createdAt,
- /** Epoch milliseconds when execution first started, or null before start. */
- @JsonProperty("startedAt") Long startedAt,
- /** Epoch milliseconds when the durable run was last updated. */
- @JsonProperty("updatedAt") Long updatedAt,
- /** Epoch milliseconds when the run completed, or null while nonterminal. */
- @JsonProperty("completedAt") Long completedAt,
- /** Current phase identity, or null before any phase is entered. */
- @JsonProperty("currentPhase") FactoryCurrentPhase currentPhase,
- /** Number of phases declared by the factory. */
- @JsonProperty("declaredPhaseCount") Long declaredPhaseCount,
- /** Number of direct factory agents currently live. */
- @JsonProperty("liveAgentCount") Long liveAgentCount,
- /** Total direct factory agents spawned across all attempts. */
- @JsonProperty("totalSpawnedAgentCount") Long totalSpawnedAgentCount,
- /** Durable resource consumption. */
- @JsonProperty("consumed") FactoryRunConsumed consumed,
- /** Resource ceilings declared by the factory. */
- @JsonProperty("declaredLimits") FactoryDeclaredLimits declaredLimits,
- /** Approved effective resource ceilings, or null until approved. */
- @JsonProperty("approved") FactoryDeclaredLimits approved,
- /** Epoch milliseconds when this live-overlay snapshot was observed. */
- @JsonProperty("observedAt") Long observedAt,
- /** Epoch milliseconds when the current active segment started, or null while inactive. */
- @JsonProperty("activeSegmentStartedAt") Long activeSegmentStartedAt,
- /** Terminal run outcome, or null while nonterminal. */
- @JsonProperty("terminal") FactoryRunTerminal terminal,
- /** Whether the durable run state currently passes runtime resume eligibility checks. */
- @JsonProperty("canResume") Boolean canResume
-) {
-}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunTerminal.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunTerminal.java
deleted file mode 100644
index 0b0db7d9b7..0000000000
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunTerminal.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-// AUTO-GENERATED FILE - DO NOT EDIT
-// Generated from: api.schema.json
-
-package com.github.copilot.generated.rpc;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.github.copilot.CopilotExperimental;
-import javax.annotation.processing.Generated;
-
-/**
- * Prompt-safe terminal factory outcome.
- *
- * @apiNote This type is experimental and may change in a future version.
- *
- * @since 1.0.0
- */
-@CopilotExperimental
-@javax.annotation.processing.Generated("copilot-sdk-codegen")
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public record FactoryRunTerminal(
- /** Human-readable terminal reason. */
- @JsonProperty("reason") String reason,
- /** Machine-readable terminal failure. */
- @JsonProperty("failure") Object failure,
- /** Human-readable terminal error. */
- @JsonProperty("error") String error,
- /** Prompt-safe preview of the completed result. */
- @JsonProperty("resultPreview") String resultPreview,
- /** Pause initiator metadata, or null when the run did not pause. */
- @JsonProperty("pauseInfo") Object pauseInfo
-) {
-}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryPauseCheckpointAction.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/LoginProviderKind.java
similarity index 52%
rename from java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryPauseCheckpointAction.java
rename to java/sdk/src/generated/java/com/github/copilot/generated/rpc/LoginProviderKind.java
index a07aa8a677..75517e5892 100644
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryPauseCheckpointAction.java
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/LoginProviderKind.java
@@ -7,29 +7,35 @@
package com.github.copilot.generated.rpc;
+import com.github.copilot.CopilotExperimental;
import javax.annotation.processing.Generated;
/**
- * Action the runtime selected for a durable factory pause checkpoint.
+ * A provider a consumer may interactively sign in with.
+ *
+ * @apiNote This type is experimental and may change in a future version.
*
* @since 1.0.0
*/
+@CopilotExperimental
@javax.annotation.processing.Generated("copilot-sdk-codegen")
-public enum FactoryPauseCheckpointAction {
- /** The {@code continue} variant. */
- CONTINUE("continue"),
- /** The {@code pause} variant. */
- PAUSE("pause");
+public enum LoginProviderKind {
+ /** The {@code githubDotCom} variant. */
+ GITHUBDOTCOM("githubDotCom"),
+ /** The {@code proxima} variant. */
+ PROXIMA("proxima"),
+ /** The {@code entra} variant. */
+ ENTRA("entra");
private final String value;
- FactoryPauseCheckpointAction(String value) { this.value = value; }
+ LoginProviderKind(String value) { this.value = value; }
@com.fasterxml.jackson.annotation.JsonValue
public String getValue() { return value; }
@com.fasterxml.jackson.annotation.JsonCreator
- public static FactoryPauseCheckpointAction fromValue(String value) {
- for (FactoryPauseCheckpointAction v : values()) {
+ public static LoginProviderKind fromValue(String value) {
+ for (LoginProviderKind v : values()) {
if (v.value.equals(value)) return v;
}
- throw new IllegalArgumentException("Unknown FactoryPauseCheckpointAction value: " + value);
+ throw new IllegalArgumentException("Unknown LoginProviderKind value: " + value);
}
}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ModelChangeSource.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ModelChangeSource.java
index 6f0687414c..c7505885fa 100644
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ModelChangeSource.java
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ModelChangeSource.java
@@ -39,7 +39,9 @@ public enum ModelChangeSource {
/** The {@code changeboarding_shortcut} variant. */
CHANGEBOARDING_SHORTCUT("changeboarding_shortcut"),
/** The {@code sdk} variant. */
- SDK("sdk");
+ SDK("sdk"),
+ /** The {@code auto_tier_recommendation} variant. */
+ AUTO_TIER_RECOMMENDATION("auto_tier_recommendation");
private final String value;
ModelChangeSource(String value) { this.value = value; }
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunConsumed.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ProviderDescriptor.java
similarity index 67%
rename from java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunConsumed.java
rename to java/sdk/src/generated/java/com/github/copilot/generated/rpc/ProviderDescriptor.java
index 5ffc43435d..f56810a7f9 100644
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryRunConsumed.java
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/ProviderDescriptor.java
@@ -14,7 +14,7 @@
import javax.annotation.processing.Generated;
/**
- * Durable factory resource consumption.
+ * A provider offered for interactive login.
*
* @apiNote This type is experimental and may change in a future version.
*
@@ -24,12 +24,12 @@
@javax.annotation.processing.Generated("copilot-sdk-codegen")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public record FactoryRunConsumed(
- /** Accumulated active execution time in milliseconds. */
- @JsonProperty("activeMs") Long activeMs,
- /** Total subagents spawned by the run. */
- @JsonProperty("subagents") Long subagents,
- /** AI usage consumed by the run in nano-AIU. */
- @JsonProperty("nanoAiu") Long nanoAiu
+public record ProviderDescriptor(
+ /** The neutral provider kind. */
+ @JsonProperty("kind") LoginProviderKind kind,
+ /** Human-readable menu label, owned by the runtime so every consumer renders identical text. */
+ @JsonProperty("label") String label,
+ /** Whether this provider is currently available to sign in with. */
+ @JsonProperty("available") Boolean available
) {
}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/RunOptions.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/RunOptions.java
deleted file mode 100644
index ae535af8cf..0000000000
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/RunOptions.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-// AUTO-GENERATED FILE - DO NOT EDIT
-// Generated from: api.schema.json
-
-package com.github.copilot.generated.rpc;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.github.copilot.CopilotExperimental;
-import javax.annotation.processing.Generated;
-
-/**
- * Options controlling factory invocation.
- *
- * @apiNote This type is experimental and may change in a future version.
- *
- * @since 1.0.0
- */
-@CopilotExperimental
-@javax.annotation.processing.Generated("copilot-sdk-codegen")
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public record RunOptions(
- /** Per-invocation resource ceiling overrides. */
- @JsonProperty("limits") FactoryRunLimits limits,
- /** Whether to notify the originating session when the factory completes. */
- @JsonProperty("notifyOnComplete") Boolean notifyOnComplete,
- /** Whether to emit factory phase names to the session transcript. */
- @JsonProperty("logPhaseNames") Boolean logPhaseNames,
- /** Run identifier whose journal and progress should seed this resumed run. */
- @JsonProperty("resumeFromRunId") String resumeFromRunId
-) {
-}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionAccountsApi.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionAccountsApi.java
new file mode 100644
index 0000000000..76b3fdc7e0
--- /dev/null
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionAccountsApi.java
@@ -0,0 +1,85 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.generated.rpc;
+
+import com.github.copilot.CopilotExperimental;
+import java.util.concurrent.CompletableFuture;
+import javax.annotation.processing.Generated;
+
+/**
+ * API methods for the {@code accounts} namespace.
+ *
+ * @since 1.0.0
+ */
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+public final class SessionAccountsApi {
+
+ private static final com.fasterxml.jackson.databind.ObjectMapper MAPPER = RpcMapper.INSTANCE;
+
+ private final RpcCaller caller;
+ private final String sessionId;
+
+ /** API methods for the {@code accounts.login} sub-namespace. */
+ public final SessionAccountsLoginApi login;
+
+ /** @param caller the RPC transport function */
+ SessionAccountsApi(RpcCaller caller, String sessionId) {
+ this.caller = caller;
+ this.sessionId = sessionId;
+ this.login = new SessionAccountsLoginApi(caller, sessionId);
+ }
+
+ /**
+ * Enumerate request carrying the typed collection query.
+ *
+ * Note: the {@code sessionId} field in the params record is overridden
+ * by the session-scoped wrapper; any value provided is ignored.
+ *
+ * @apiNote This method is experimental and may change in a future version.
+ * @since 1.0.0
+ */
+ @CopilotExperimental
+ public CompletableFuture enumerate(SessionAccountsEnumerateParams params) {
+ com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params);
+ _p.put("sessionId", this.sessionId);
+ return caller.invoke("session.accounts.enumerate", _p, AuthEnumerateValue.class);
+ }
+
+ /**
+ * Read request carrying the typed datum query.
+ *
+ * Note: the {@code sessionId} field in the params record is overridden
+ * by the session-scoped wrapper; any value provided is ignored.
+ *
+ * @apiNote This method is experimental and may change in a future version.
+ * @since 1.0.0
+ */
+ @CopilotExperimental
+ public CompletableFuture get(SessionAccountsGetParams params) {
+ com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params);
+ _p.put("sessionId", this.sessionId);
+ return caller.invoke("session.accounts.get", _p, AuthReadValue.class);
+ }
+
+ /**
+ * Mutation request carrying the typed write command.
+ *
+ * Note: the {@code sessionId} field in the params record is overridden
+ * by the session-scoped wrapper; any value provided is ignored.
+ *
+ * @apiNote This method is experimental and may change in a future version.
+ * @since 1.0.0
+ */
+ @CopilotExperimental
+ public CompletableFuture set(SessionAccountsSetParams params) {
+ com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params);
+ _p.put("sessionId", this.sessionId);
+ return caller.invoke("session.accounts.set", _p, SessionAccountsSetResult.class);
+ }
+
+}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryPauseParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionAccountsEnumerateParams.java
similarity index 83%
rename from java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryPauseParams.java
rename to java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionAccountsEnumerateParams.java
index 00a1b4d660..480ba804b5 100644
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryPauseParams.java
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionAccountsEnumerateParams.java
@@ -14,7 +14,7 @@
import javax.annotation.processing.Generated;
/**
- * Parameters for pausing a running factory.
+ * Enumerate request carrying the typed collection query.
*
* @apiNote This method is experimental and may change in a future version.
* @since 1.0.0
@@ -23,10 +23,10 @@
@javax.annotation.processing.Generated("copilot-sdk-codegen")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public record SessionFactoryPauseParams(
+public record SessionAccountsEnumerateParams(
/** Target session identifier */
@JsonProperty("sessionId") String sessionId,
- /** Factory run identifier. */
- @JsonProperty("runId") String runId
+ /** Which typed accounts collection to enumerate. */
+ @JsonProperty("query") Object query
) {
}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryGetRunParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionAccountsGetParams.java
similarity index 85%
rename from java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryGetRunParams.java
rename to java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionAccountsGetParams.java
index f98e1f0d74..d75a1bc76a 100644
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryGetRunParams.java
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionAccountsGetParams.java
@@ -14,7 +14,7 @@
import javax.annotation.processing.Generated;
/**
- * Parameters for retrieving a factory run.
+ * Read request carrying the typed datum query.
*
* @apiNote This method is experimental and may change in a future version.
* @since 1.0.0
@@ -23,10 +23,10 @@
@javax.annotation.processing.Generated("copilot-sdk-codegen")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public record SessionFactoryGetRunParams(
+public record SessionAccountsGetParams(
/** Target session identifier */
@JsonProperty("sessionId") String sessionId,
- /** Factory run identifier. */
- @JsonProperty("runId") String runId
+ /** Which typed accounts datum to read. */
+ @JsonProperty("query") Object query
) {
}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryAbortParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionAccountsLoginAdvanceParams.java
similarity index 73%
rename from java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryAbortParams.java
rename to java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionAccountsLoginAdvanceParams.java
index 178c135cdd..e4a8e34b3a 100644
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryAbortParams.java
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionAccountsLoginAdvanceParams.java
@@ -14,7 +14,7 @@
import javax.annotation.processing.Generated;
/**
- * Parameters for cooperatively aborting a factory body.
+ * Advance an in-flight login flow, optionally fulfilling an input-required step.
*
* @apiNote This method is experimental and may change in a future version.
* @since 1.0.0
@@ -23,12 +23,12 @@
@javax.annotation.processing.Generated("copilot-sdk-codegen")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public record FactoryAbortParams(
+public record SessionAccountsLoginAdvanceParams(
/** Target session identifier */
@JsonProperty("sessionId") String sessionId,
- /** Factory run identifier. */
- @JsonProperty("runId") String runId,
- /** Opaque token identifying the execution attempt to abort. */
- @JsonProperty("executionToken") String executionToken
+ /** Opaque flow id from begin. */
+ @JsonProperty("flowId") String flowId,
+ /** Neutral input fulfilling a preceding input-required step (e.g. a GHEC host); ignored otherwise. */
+ @JsonProperty("input") String input
) {
}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryJournalApi.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionAccountsLoginApi.java
similarity index 56%
rename from java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryJournalApi.java
rename to java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionAccountsLoginApi.java
index e5bfb4e66a..5537a0dad2 100644
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryJournalApi.java
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionAccountsLoginApi.java
@@ -12,12 +12,12 @@
import javax.annotation.processing.Generated;
/**
- * API methods for the {@code factory.journal} namespace.
+ * API methods for the {@code accounts.login} namespace.
*
* @since 1.0.0
*/
@javax.annotation.processing.Generated("copilot-sdk-codegen")
-public final class SessionFactoryJournalApi {
+public final class SessionAccountsLoginApi {
private static final com.fasterxml.jackson.databind.ObjectMapper MAPPER = RpcMapper.INSTANCE;
@@ -25,13 +25,13 @@ public final class SessionFactoryJournalApi {
private final String sessionId;
/** @param caller the RPC transport function */
- SessionFactoryJournalApi(RpcCaller caller, String sessionId) {
+ SessionAccountsLoginApi(RpcCaller caller, String sessionId) {
this.caller = caller;
this.sessionId = sessionId;
}
/**
- * Parameters for reading a factory journal entry.
+ * Begin an interactive login flow for a provider kind. Dispatch is kind-only.
*
* Note: the {@code sessionId} field in the params record is overridden
* by the session-scoped wrapper; any value provided is ignored.
@@ -40,14 +40,14 @@ public final class SessionFactoryJournalApi {
* @since 1.0.0
*/
@CopilotExperimental
- public CompletableFuture get(SessionFactoryJournalGetParams params) {
+ public CompletableFuture begin(SessionAccountsLoginBeginParams params) {
com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params);
_p.put("sessionId", this.sessionId);
- return caller.invoke("session.factory.journal.get", _p, SessionFactoryJournalGetResult.class);
+ return caller.invoke("session.accounts.login.begin", _p, SessionAccountsLoginBeginResult.class);
}
/**
- * Parameters for storing a factory journal entry.
+ * Advance an in-flight login flow, optionally fulfilling an input-required step.
*
* Note: the {@code sessionId} field in the params record is overridden
* by the session-scoped wrapper; any value provided is ignored.
@@ -56,10 +56,26 @@ public CompletableFuture get(SessionFactoryJourn
* @since 1.0.0
*/
@CopilotExperimental
- public CompletableFuture put(SessionFactoryJournalPutParams params) {
+ public CompletableFuture advance(SessionAccountsLoginAdvanceParams params) {
com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params);
_p.put("sessionId", this.sessionId);
- return caller.invoke("session.factory.journal.put", _p, Void.class);
+ return caller.invoke("session.accounts.login.advance", _p, AuthLoginStep.class);
+ }
+
+ /**
+ * Cancel an in-flight login flow.
+ *
+ * Note: the {@code sessionId} field in the params record is overridden
+ * by the session-scoped wrapper; any value provided is ignored.
+ *
+ * @apiNote This method is experimental and may change in a future version.
+ * @since 1.0.0
+ */
+ @CopilotExperimental
+ public CompletableFuture cancel(SessionAccountsLoginCancelParams params) {
+ com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params);
+ _p.put("sessionId", this.sessionId);
+ return caller.invoke("session.accounts.login.cancel", _p, Void.class);
}
}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionAccountsLoginBeginParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionAccountsLoginBeginParams.java
new file mode 100644
index 0000000000..2f2fdc473e
--- /dev/null
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionAccountsLoginBeginParams.java
@@ -0,0 +1,32 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ *--------------------------------------------------------------------------------------------*/
+
+// AUTO-GENERATED FILE - DO NOT EDIT
+// Generated from: api.schema.json
+
+package com.github.copilot.generated.rpc;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.github.copilot.CopilotExperimental;
+import javax.annotation.processing.Generated;
+
+/**
+ * Begin an interactive login flow for a provider kind. Dispatch is kind-only.
+ *
+ * @apiNote This method is experimental and may change in a future version.
+ * @since 1.0.0
+ */
+@CopilotExperimental
+@javax.annotation.processing.Generated("copilot-sdk-codegen")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public record SessionAccountsLoginBeginParams(
+ /** Target session identifier */
+ @JsonProperty("sessionId") String sessionId,
+ /** The provider kind to sign in with. */
+ @JsonProperty("kind") LoginProviderKind kind
+) {
+}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryExecuteResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionAccountsLoginBeginResult.java
similarity index 76%
rename from java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryExecuteResult.java
rename to java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionAccountsLoginBeginResult.java
index b47b9fb073..451890e8c0 100644
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/FactoryExecuteResult.java
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionAccountsLoginBeginResult.java
@@ -14,7 +14,7 @@
import javax.annotation.processing.Generated;
/**
- * Result returned by an extension factory closure.
+ * A started login flow: its opaque id and first step.
*
* @apiNote This method is experimental and may change in a future version.
* @since 1.0.0
@@ -23,8 +23,10 @@
@javax.annotation.processing.Generated("copilot-sdk-codegen")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public record FactoryExecuteResult(
- /** Factory result value. */
- @JsonProperty("result") Object result
+public record SessionAccountsLoginBeginResult(
+ /** Opaque flow id used to advance or cancel this login. */
+ @JsonProperty("flowId") String flowId,
+ /** The first step of the flow. */
+ @JsonProperty("step") Object step
) {
}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryCancelParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionAccountsLoginCancelParams.java
similarity index 85%
rename from java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryCancelParams.java
rename to java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionAccountsLoginCancelParams.java
index 8ed7e4aa37..4426b02941 100644
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryCancelParams.java
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionAccountsLoginCancelParams.java
@@ -14,7 +14,7 @@
import javax.annotation.processing.Generated;
/**
- * Parameters for cancelling a factory run.
+ * Cancel an in-flight login flow.
*
* @apiNote This method is experimental and may change in a future version.
* @since 1.0.0
@@ -23,10 +23,10 @@
@javax.annotation.processing.Generated("copilot-sdk-codegen")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public record SessionFactoryCancelParams(
+public record SessionAccountsLoginCancelParams(
/** Target session identifier */
@JsonProperty("sessionId") String sessionId,
- /** Factory run identifier. */
- @JsonProperty("runId") String runId
+ /** Opaque flow id from begin. */
+ @JsonProperty("flowId") String flowId
) {
}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryGetRunDetailParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionAccountsSetParams.java
similarity index 83%
rename from java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryGetRunDetailParams.java
rename to java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionAccountsSetParams.java
index b4563d4b35..b7c16327d4 100644
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryGetRunDetailParams.java
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionAccountsSetParams.java
@@ -14,7 +14,7 @@
import javax.annotation.processing.Generated;
/**
- * Parameters for retrieving a factory run.
+ * Mutation request carrying the typed write command.
*
* @apiNote This method is experimental and may change in a future version.
* @since 1.0.0
@@ -23,10 +23,10 @@
@javax.annotation.processing.Generated("copilot-sdk-codegen")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public record SessionFactoryGetRunDetailParams(
+public record SessionAccountsSetParams(
/** Target session identifier */
@JsonProperty("sessionId") String sessionId,
- /** Factory run identifier. */
- @JsonProperty("runId") String runId
+ /** The non-interactive mutation command to apply. */
+ @JsonProperty("command") Object command
) {
}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryAgentResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionAccountsSetResult.java
similarity index 76%
rename from java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryAgentResult.java
rename to java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionAccountsSetResult.java
index dcd31fd34a..7c6c42c029 100644
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryAgentResult.java
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionAccountsSetResult.java
@@ -14,7 +14,7 @@
import javax.annotation.processing.Generated;
/**
- * Result of one factory-scoped subagent call.
+ * Result of a non-interactive accounts mutation.
*
* @apiNote This method is experimental and may change in a future version.
* @since 1.0.0
@@ -23,8 +23,10 @@
@javax.annotation.processing.Generated("copilot-sdk-codegen")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
-public record SessionFactoryAgentResult(
- /** Agent result, omitted when the agent produced no result. */
- @JsonProperty("result") Object result
+public record SessionAccountsSetResult(
+ /** Whether the mutation was applied. */
+ @JsonProperty("ok") Boolean ok,
+ /** For a logout, whether other signed-in accounts remain. */
+ @JsonProperty("moreUsers") Boolean moreUsers
) {
}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryAgentParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryAgentParams.java
deleted file mode 100644
index 6ab02c27eb..0000000000
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryAgentParams.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-// AUTO-GENERATED FILE - DO NOT EDIT
-// Generated from: api.schema.json
-
-package com.github.copilot.generated.rpc;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.github.copilot.CopilotExperimental;
-import javax.annotation.processing.Generated;
-
-/**
- * Parameters for one factory-scoped subagent call.
- *
- * @apiNote This method is experimental and may change in a future version.
- * @since 1.0.0
- */
-@CopilotExperimental
-@javax.annotation.processing.Generated("copilot-sdk-codegen")
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public record SessionFactoryAgentParams(
- /** Target session identifier */
- @JsonProperty("sessionId") String sessionId,
- /** Factory run identifier that owns the subagent. */
- @JsonProperty("factoryRunId") String factoryRunId,
- /** Opaque token identifying the current factory execution attempt. */
- @JsonProperty("executionToken") String executionToken,
- /** Prompt to send to the subagent. */
- @JsonProperty("prompt") String prompt,
- /** Subagent execution options. */
- @JsonProperty("opts") FactoryAgentOptions opts
-) {
-}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryApi.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryApi.java
deleted file mode 100644
index 12fa3cf6fd..0000000000
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryApi.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-// AUTO-GENERATED FILE - DO NOT EDIT
-// Generated from: api.schema.json
-
-package com.github.copilot.generated.rpc;
-
-import com.github.copilot.CopilotExperimental;
-import java.util.concurrent.CompletableFuture;
-import javax.annotation.processing.Generated;
-
-/**
- * API methods for the {@code factory} namespace.
- *
- * @since 1.0.0
- */
-@javax.annotation.processing.Generated("copilot-sdk-codegen")
-public final class SessionFactoryApi {
-
- private static final com.fasterxml.jackson.databind.ObjectMapper MAPPER = RpcMapper.INSTANCE;
-
- private final RpcCaller caller;
- private final String sessionId;
-
- /** API methods for the {@code factory.journal} sub-namespace. */
- public final SessionFactoryJournalApi journal;
-
- /** @param caller the RPC transport function */
- SessionFactoryApi(RpcCaller caller, String sessionId) {
- this.caller = caller;
- this.sessionId = sessionId;
- this.journal = new SessionFactoryJournalApi(caller, sessionId);
- }
-
- /**
- * Parameters for invoking a registered factory.
- *
- * Note: the {@code sessionId} field in the params record is overridden
- * by the session-scoped wrapper; any value provided is ignored.
- *
- * @apiNote This method is experimental and may change in a future version.
- * @since 1.0.0
- */
- @CopilotExperimental
- public CompletableFuture run(SessionFactoryRunParams params) {
- com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params);
- _p.put("sessionId", this.sessionId);
- return caller.invoke("session.factory.run", _p, SessionFactoryRunResult.class);
- }
-
- /**
- * Parameters for resuming a factory run from its persisted identity.
- *
- * Note: the {@code sessionId} field in the params record is overridden
- * by the session-scoped wrapper; any value provided is ignored.
- *
- * @apiNote This method is experimental and may change in a future version.
- * @since 1.0.0
- */
- @CopilotExperimental
- public CompletableFuture resume(SessionFactoryResumeParams params) {
- com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params);
- _p.put("sessionId", this.sessionId);
- return caller.invoke("session.factory.resume", _p, SessionFactoryResumeResult.class);
- }
-
- /**
- * Internal parameters for invoking a registered factory from a tool.
- *
- * Note: the {@code sessionId} field in the params record is overridden
- * by the session-scoped wrapper; any value provided is ignored.
- *
- * @apiNote This method is experimental and may change in a future version.
- * @since 1.0.0
- */
- @CopilotExperimental
- public CompletableFuture runFromTool(SessionFactoryRunFromToolParams params) {
- com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params);
- _p.put("sessionId", this.sessionId);
- return caller.invoke("session.factory.runFromTool", _p, SessionFactoryRunFromToolResult.class);
- }
-
- /**
- * Internal parameters for resuming a factory run from a tool.
- *
- * Note: the {@code sessionId} field in the params record is overridden
- * by the session-scoped wrapper; any value provided is ignored.
- *
- * @apiNote This method is experimental and may change in a future version.
- * @since 1.0.0
- */
- @CopilotExperimental
- public CompletableFuture resumeFromTool(SessionFactoryResumeFromToolParams params) {
- com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params);
- _p.put("sessionId", this.sessionId);
- return caller.invoke("session.factory.resumeFromTool", _p, SessionFactoryResumeFromToolResult.class);
- }
-
- /**
- * Parameters for retrieving a factory run.
- *
- * Note: the {@code sessionId} field in the params record is overridden
- * by the session-scoped wrapper; any value provided is ignored.
- *
- * @apiNote This method is experimental and may change in a future version.
- * @since 1.0.0
- */
- @CopilotExperimental
- public CompletableFuture getRun(SessionFactoryGetRunParams params) {
- com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params);
- _p.put("sessionId", this.sessionId);
- return caller.invoke("session.factory.getRun", _p, SessionFactoryGetRunResult.class);
- }
-
- /**
- * Parameters for paging factory runs.
- *
- * Note: the {@code sessionId} field in the params record is overridden
- * by the session-scoped wrapper; any value provided is ignored.
- *
- * @apiNote This method is experimental and may change in a future version.
- * @since 1.0.0
- */
- @CopilotExperimental
- public CompletableFuture listRuns(SessionFactoryListRunsParams params) {
- com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params);
- _p.put("sessionId", this.sessionId);
- return caller.invoke("session.factory.listRuns", _p, SessionFactoryListRunsResult.class);
- }
-
- /**
- * Parameters for retrieving a factory run.
- *
- * Note: the {@code sessionId} field in the params record is overridden
- * by the session-scoped wrapper; any value provided is ignored.
- *
- * @apiNote This method is experimental and may change in a future version.
- * @since 1.0.0
- */
- @CopilotExperimental
- public CompletableFuture getRunDetail(SessionFactoryGetRunDetailParams params) {
- com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params);
- _p.put("sessionId", this.sessionId);
- return caller.invoke("session.factory.getRunDetail", _p, SessionFactoryGetRunDetailResult.class);
- }
-
- /**
- * Parameters for paging factory progress.
- *
- * Note: the {@code sessionId} field in the params record is overridden
- * by the session-scoped wrapper; any value provided is ignored.
- *
- * @apiNote This method is experimental and may change in a future version.
- * @since 1.0.0
- */
- @CopilotExperimental
- public CompletableFuture getRunProgress(SessionFactoryGetRunProgressParams params) {
- com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params);
- _p.put("sessionId", this.sessionId);
- return caller.invoke("session.factory.getRunProgress", _p, SessionFactoryGetRunProgressResult.class);
- }
-
- /**
- * Parameters for cancelling a factory run.
- *
- * Note: the {@code sessionId} field in the params record is overridden
- * by the session-scoped wrapper; any value provided is ignored.
- *
- * @apiNote This method is experimental and may change in a future version.
- * @since 1.0.0
- */
- @CopilotExperimental
- public CompletableFuture cancel(SessionFactoryCancelParams params) {
- com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params);
- _p.put("sessionId", this.sessionId);
- return caller.invoke("session.factory.cancel", _p, SessionFactoryCancelResult.class);
- }
-
- /**
- * Parameters for pausing a running factory.
- *
- * Note: the {@code sessionId} field in the params record is overridden
- * by the session-scoped wrapper; any value provided is ignored.
- *
- * @apiNote This method is experimental and may change in a future version.
- * @since 1.0.0
- */
- @CopilotExperimental
- public CompletableFuture pause(SessionFactoryPauseParams params) {
- com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params);
- _p.put("sessionId", this.sessionId);
- return caller.invoke("session.factory.pause", _p, SessionFactoryPauseResult.class);
- }
-
- /**
- * Parameters for an owned durable pause checkpoint.
- *
- * Note: the {@code sessionId} field in the params record is overridden
- * by the session-scoped wrapper; any value provided is ignored.
- *
- * @apiNote This method is experimental and may change in a future version.
- * @since 1.0.0
- */
- @CopilotExperimental
- public CompletableFuture pauseAtCheckpoint(SessionFactoryPauseAtCheckpointParams params) {
- com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params);
- _p.put("sessionId", this.sessionId);
- return caller.invoke("session.factory.pauseAtCheckpoint", _p, SessionFactoryPauseAtCheckpointResult.class);
- }
-
- /**
- * Parameters for recording factory progress.
- *
- * Note: the {@code sessionId} field in the params record is overridden
- * by the session-scoped wrapper; any value provided is ignored.
- *
- * @apiNote This method is experimental and may change in a future version.
- * @since 1.0.0
- */
- @CopilotExperimental
- public CompletableFuture log(SessionFactoryLogParams params) {
- com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params);
- _p.put("sessionId", this.sessionId);
- return caller.invoke("session.factory.log", _p, Void.class);
- }
-
- /**
- * Parameters for one factory-scoped subagent call.
- *
- * Note: the {@code sessionId} field in the params record is overridden
- * by the session-scoped wrapper; any value provided is ignored.
- *
- * @apiNote This method is experimental and may change in a future version.
- * @since 1.0.0
- */
- @CopilotExperimental
- public CompletableFuture agent(SessionFactoryAgentParams params) {
- com.fasterxml.jackson.databind.node.ObjectNode _p = MAPPER.valueToTree(params);
- _p.put("sessionId", this.sessionId);
- return caller.invoke("session.factory.agent", _p, SessionFactoryAgentResult.class);
- }
-
-}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryCancelResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryCancelResult.java
deleted file mode 100644
index 42e1b38811..0000000000
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryCancelResult.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-// AUTO-GENERATED FILE - DO NOT EDIT
-// Generated from: api.schema.json
-
-package com.github.copilot.generated.rpc;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.github.copilot.CopilotExperimental;
-import javax.annotation.processing.Generated;
-
-/**
- * Complete current or terminal factory run envelope.
- *
- * @apiNote This method is experimental and may change in a future version.
- * @since 1.0.0
- */
-@CopilotExperimental
-@javax.annotation.processing.Generated("copilot-sdk-codegen")
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public record SessionFactoryCancelResult(
- /** Factory run identifier. */
- @JsonProperty("runId") String runId,
- /** One-based execution attempt represented by this envelope. Absent before the first attempt starts or when returned by an older runtime. */
- @JsonProperty("attempt") Long attempt,
- /** Current or terminal factory run status. */
- @JsonProperty("status") FactoryRunStatus status,
- /** Completed factory result. */
- @JsonProperty("result") Object result,
- /** Error message for an errored run. */
- @JsonProperty("error") String error,
- /** Machine-readable failure details for a halted or errored run. */
- @JsonProperty("failure") Object failure,
- /** Reason for a halted or cancelled run. */
- @JsonProperty("reason") String reason,
- /** Partial journal and progress snapshot for a halted, cancelled, or errored run. */
- @JsonProperty("snapshot") Object snapshot,
- /** Structured pause initiator metadata for a paused attempt. */
- @JsonProperty("pauseInfo") Object pauseInfo
-) {
-}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryGetRunDetailResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryGetRunDetailResult.java
deleted file mode 100644
index 0a3fb7f83a..0000000000
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryGetRunDetailResult.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-// AUTO-GENERATED FILE - DO NOT EDIT
-// Generated from: api.schema.json
-
-package com.github.copilot.generated.rpc;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.github.copilot.CopilotExperimental;
-import java.util.List;
-import javax.annotation.processing.Generated;
-
-/**
- * Full factory run observability detail.
- *
- * @apiNote This method is experimental and may change in a future version.
- * @since 1.0.0
- */
-@CopilotExperimental
-@javax.annotation.processing.Generated("copilot-sdk-codegen")
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public record SessionFactoryGetRunDetailResult(
- /** Factory run identifier. */
- @JsonProperty("runId") String runId,
- /** Registered factory name. */
- @JsonProperty("factoryName") String factoryName,
- /** Human-readable factory description. */
- @JsonProperty("description") String description,
- /** Current factory run status. */
- @JsonProperty("status") FactoryRunStatus status,
- /** Monotonic durable run revision. */
- @JsonProperty("revision") Long revision,
- /** Epoch milliseconds when the run was created. */
- @JsonProperty("createdAt") Long createdAt,
- /** Epoch milliseconds when execution first started, or null before start. */
- @JsonProperty("startedAt") Long startedAt,
- /** Epoch milliseconds when the durable run was last updated. */
- @JsonProperty("updatedAt") Long updatedAt,
- /** Epoch milliseconds when the run completed, or null while nonterminal. */
- @JsonProperty("completedAt") Long completedAt,
- /** Current phase identity, or null before any phase is entered. */
- @JsonProperty("currentPhase") FactoryCurrentPhase currentPhase,
- /** Number of phases declared by the factory. */
- @JsonProperty("declaredPhaseCount") Long declaredPhaseCount,
- /** Number of direct factory agents currently live. */
- @JsonProperty("liveAgentCount") Long liveAgentCount,
- /** Total direct factory agents spawned across all attempts. */
- @JsonProperty("totalSpawnedAgentCount") Long totalSpawnedAgentCount,
- /** Durable resource consumption. */
- @JsonProperty("consumed") FactoryRunConsumed consumed,
- /** Resource ceilings declared by the factory. */
- @JsonProperty("declaredLimits") FactoryDeclaredLimits declaredLimits,
- /** Approved effective resource ceilings, or null until approved. */
- @JsonProperty("approved") FactoryDeclaredLimits approved,
- /** Epoch milliseconds when this live-overlay snapshot was observed. */
- @JsonProperty("observedAt") Long observedAt,
- /** Epoch milliseconds when the current active segment started, or null while inactive. */
- @JsonProperty("activeSegmentStartedAt") Long activeSegmentStartedAt,
- /** Terminal run outcome, or null while nonterminal. */
- @JsonProperty("terminal") FactoryRunTerminal terminal,
- /** Whether the durable run state currently passes runtime resume eligibility checks. */
- @JsonProperty("canResume") Boolean canResume,
- /** Lifecycle and timing observations for each factory phase. */
- @JsonProperty("phases") List phases,
- /** Durable identities and live statuses for direct factory agents. */
- @JsonProperty("agents") List agents,
- /** Bidirectional page of durable factory progress. */
- @JsonProperty("progress") FactoryProgressPage progress
-) {
-}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryGetRunProgressParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryGetRunProgressParams.java
deleted file mode 100644
index 8445943cba..0000000000
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryGetRunProgressParams.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-// AUTO-GENERATED FILE - DO NOT EDIT
-// Generated from: api.schema.json
-
-package com.github.copilot.generated.rpc;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.github.copilot.CopilotExperimental;
-import javax.annotation.processing.Generated;
-
-/**
- * Parameters for paging factory progress.
- *
- * @apiNote This method is experimental and may change in a future version.
- * @since 1.0.0
- */
-@CopilotExperimental
-@javax.annotation.processing.Generated("copilot-sdk-codegen")
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public record SessionFactoryGetRunProgressParams(
- /** Target session identifier */
- @JsonProperty("sessionId") String sessionId,
- /** Factory run identifier. */
- @JsonProperty("runId") String runId,
- /** Optional phase identifier used to scope records and cursors. */
- @JsonProperty("phaseId") String phaseId,
- /** Exclusive forward cursor. */
- @JsonProperty("afterSeq") Long afterSeq,
- /** Exclusive backward cursor. */
- @JsonProperty("beforeSeq") Long beforeSeq,
- /** Maximum records to return. Defaults to 200 and is capped at 500. */
- @JsonProperty("limit") Long limit
-) {
-}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryGetRunProgressResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryGetRunProgressResult.java
deleted file mode 100644
index 2a4cb78cb2..0000000000
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryGetRunProgressResult.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-// AUTO-GENERATED FILE - DO NOT EDIT
-// Generated from: api.schema.json
-
-package com.github.copilot.generated.rpc;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.github.copilot.CopilotExperimental;
-import java.util.List;
-import javax.annotation.processing.Generated;
-
-/**
- * A bidirectional page of factory progress.
- *
- * @apiNote This method is experimental and may change in a future version.
- * @since 1.0.0
- */
-@CopilotExperimental
-@javax.annotation.processing.Generated("copilot-sdk-codegen")
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public record SessionFactoryGetRunProgressResult(
- /** Progress records in sequence order. */
- @JsonProperty("records") List records,
- /** Oldest sequence number in this page, or null when empty. */
- @JsonProperty("oldestSeq") Long oldestSeq,
- /** Newest sequence number in this page, or null when empty. */
- @JsonProperty("newestSeq") Long newestSeq,
- /** Whether progress records older than this page exist. */
- @JsonProperty("hasMoreOlder") Boolean hasMoreOlder,
- /** Whether progress records newer than this page exist. */
- @JsonProperty("hasMoreNewer") Boolean hasMoreNewer,
- /** Run revision reflected by this page. */
- @JsonProperty("revision") Long revision
-) {
-}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryGetRunResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryGetRunResult.java
deleted file mode 100644
index 9c141b28d4..0000000000
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryGetRunResult.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-// AUTO-GENERATED FILE - DO NOT EDIT
-// Generated from: api.schema.json
-
-package com.github.copilot.generated.rpc;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.github.copilot.CopilotExperimental;
-import javax.annotation.processing.Generated;
-
-/**
- * Complete current or terminal factory run envelope.
- *
- * @apiNote This method is experimental and may change in a future version.
- * @since 1.0.0
- */
-@CopilotExperimental
-@javax.annotation.processing.Generated("copilot-sdk-codegen")
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public record SessionFactoryGetRunResult(
- /** Factory run identifier. */
- @JsonProperty("runId") String runId,
- /** One-based execution attempt represented by this envelope. Absent before the first attempt starts or when returned by an older runtime. */
- @JsonProperty("attempt") Long attempt,
- /** Current or terminal factory run status. */
- @JsonProperty("status") FactoryRunStatus status,
- /** Completed factory result. */
- @JsonProperty("result") Object result,
- /** Error message for an errored run. */
- @JsonProperty("error") String error,
- /** Machine-readable failure details for a halted or errored run. */
- @JsonProperty("failure") Object failure,
- /** Reason for a halted or cancelled run. */
- @JsonProperty("reason") String reason,
- /** Partial journal and progress snapshot for a halted, cancelled, or errored run. */
- @JsonProperty("snapshot") Object snapshot,
- /** Structured pause initiator metadata for a paused attempt. */
- @JsonProperty("pauseInfo") Object pauseInfo
-) {
-}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryJournalGetParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryJournalGetParams.java
deleted file mode 100644
index 251ca946cb..0000000000
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryJournalGetParams.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-// AUTO-GENERATED FILE - DO NOT EDIT
-// Generated from: api.schema.json
-
-package com.github.copilot.generated.rpc;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.github.copilot.CopilotExperimental;
-import javax.annotation.processing.Generated;
-
-/**
- * Parameters for reading a factory journal entry.
- *
- * @apiNote This method is experimental and may change in a future version.
- * @since 1.0.0
- */
-@CopilotExperimental
-@javax.annotation.processing.Generated("copilot-sdk-codegen")
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public record SessionFactoryJournalGetParams(
- /** Target session identifier */
- @JsonProperty("sessionId") String sessionId,
- /** Factory run identifier. */
- @JsonProperty("runId") String runId,
- /** Opaque token identifying the current factory execution attempt. */
- @JsonProperty("executionToken") String executionToken,
- /** Namespaced journal key. */
- @JsonProperty("key") String key
-) {
-}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryJournalGetResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryJournalGetResult.java
deleted file mode 100644
index 4b97e10296..0000000000
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryJournalGetResult.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-// AUTO-GENERATED FILE - DO NOT EDIT
-// Generated from: api.schema.json
-
-package com.github.copilot.generated.rpc;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.github.copilot.CopilotExperimental;
-import javax.annotation.processing.Generated;
-
-/**
- * Result of reading a factory journal entry.
- *
- * @apiNote This method is experimental and may change in a future version.
- * @since 1.0.0
- */
-@CopilotExperimental
-@javax.annotation.processing.Generated("copilot-sdk-codegen")
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public record SessionFactoryJournalGetResult(
- /** Whether the journal contained the requested key. */
- @JsonProperty("hit") Boolean hit,
- /** Cached JSON result. The hit field distinguishes a cached JSON null from a miss. */
- @JsonProperty("resultJson") Object resultJson
-) {
-}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryJournalPutParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryJournalPutParams.java
deleted file mode 100644
index 06467b2657..0000000000
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryJournalPutParams.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-// AUTO-GENERATED FILE - DO NOT EDIT
-// Generated from: api.schema.json
-
-package com.github.copilot.generated.rpc;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.github.copilot.CopilotExperimental;
-import javax.annotation.processing.Generated;
-
-/**
- * Parameters for storing a factory journal entry.
- *
- * @apiNote This method is experimental and may change in a future version.
- * @since 1.0.0
- */
-@CopilotExperimental
-@javax.annotation.processing.Generated("copilot-sdk-codegen")
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public record SessionFactoryJournalPutParams(
- /** Target session identifier */
- @JsonProperty("sessionId") String sessionId,
- /** Factory run identifier. */
- @JsonProperty("runId") String runId,
- /** Opaque token identifying the current factory execution attempt. */
- @JsonProperty("executionToken") String executionToken,
- /** Namespaced journal key. */
- @JsonProperty("key") String key,
- /** JSON result to memoize. */
- @JsonProperty("resultJson") Object resultJson
-) {
-}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryListRunsParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryListRunsParams.java
deleted file mode 100644
index 41de4ae4a6..0000000000
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryListRunsParams.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-// AUTO-GENERATED FILE - DO NOT EDIT
-// Generated from: api.schema.json
-
-package com.github.copilot.generated.rpc;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.github.copilot.CopilotExperimental;
-import javax.annotation.processing.Generated;
-
-/**
- * Parameters for paging factory runs.
- *
- * @apiNote This method is experimental and may change in a future version.
- * @since 1.0.0
- */
-@CopilotExperimental
-@javax.annotation.processing.Generated("copilot-sdk-codegen")
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public record SessionFactoryListRunsParams(
- /** Target session identifier */
- @JsonProperty("sessionId") String sessionId,
- /** Exclusive forward cursor. */
- @JsonProperty("afterSeq") Long afterSeq,
- /** Exclusive backward cursor. */
- @JsonProperty("beforeSeq") Long beforeSeq,
- /** Maximum terminal runs to return. Defaults to 200 and is capped at 500. */
- @JsonProperty("limit") Long limit
-) {
-}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryListRunsResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryListRunsResult.java
deleted file mode 100644
index d081003e47..0000000000
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryListRunsResult.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-// AUTO-GENERATED FILE - DO NOT EDIT
-// Generated from: api.schema.json
-
-package com.github.copilot.generated.rpc;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.github.copilot.CopilotExperimental;
-import java.util.List;
-import javax.annotation.processing.Generated;
-
-/**
- * A page of factory runs in durable creation order.
- *
- * @apiNote This method is experimental and may change in a future version.
- * @since 1.0.0
- */
-@CopilotExperimental
-@javax.annotation.processing.Generated("copilot-sdk-codegen")
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public record SessionFactoryListRunsResult(
- /** Factory run summaries in durable creation order. */
- @JsonProperty("runs") List runs,
- /** Oldest terminal-run cursor in this page, or null when the terminal window is empty. */
- @JsonProperty("oldestSeq") Long oldestSeq,
- /** Newest terminal-run cursor in this page, or null when the terminal window is empty. */
- @JsonProperty("newestSeq") Long newestSeq,
- /** Whether terminal runs newer than this page exist. */
- @JsonProperty("hasMoreNewer") Boolean hasMoreNewer,
- /** Number of terminal runs older than this page. */
- @JsonProperty("omittedOlder") Long omittedOlder
-) {
-}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryLogParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryLogParams.java
deleted file mode 100644
index b4f52617f1..0000000000
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryLogParams.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-// AUTO-GENERATED FILE - DO NOT EDIT
-// Generated from: api.schema.json
-
-package com.github.copilot.generated.rpc;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.github.copilot.CopilotExperimental;
-import java.util.List;
-import javax.annotation.processing.Generated;
-
-/**
- * Parameters for recording factory progress.
- *
- * @apiNote This method is experimental and may change in a future version.
- * @since 1.0.0
- */
-@CopilotExperimental
-@javax.annotation.processing.Generated("copilot-sdk-codegen")
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public record SessionFactoryLogParams(
- /** Target session identifier */
- @JsonProperty("sessionId") String sessionId,
- /** Factory run identifier. */
- @JsonProperty("runId") String runId,
- /** Opaque token identifying the current factory execution attempt. */
- @JsonProperty("executionToken") String executionToken,
- /** Ordered progress lines to append. */
- @JsonProperty("lines") List lines
-) {
-}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryPauseAtCheckpointParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryPauseAtCheckpointParams.java
deleted file mode 100644
index a54c089e20..0000000000
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryPauseAtCheckpointParams.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-// AUTO-GENERATED FILE - DO NOT EDIT
-// Generated from: api.schema.json
-
-package com.github.copilot.generated.rpc;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.github.copilot.CopilotExperimental;
-import javax.annotation.processing.Generated;
-
-/**
- * Parameters for an owned durable pause checkpoint.
- *
- * @apiNote This method is experimental and may change in a future version.
- * @since 1.0.0
- */
-@CopilotExperimental
-@javax.annotation.processing.Generated("copilot-sdk-codegen")
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public record SessionFactoryPauseAtCheckpointParams(
- /** Target session identifier */
- @JsonProperty("sessionId") String sessionId,
- /** Factory run identifier. */
- @JsonProperty("runId") String runId,
- /** Opaque token identifying the execution attempt that reached the checkpoint. */
- @JsonProperty("executionToken") String executionToken,
- /** Stable author-defined checkpoint key. */
- @JsonProperty("key") String key
-) {
-}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryPauseAtCheckpointResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryPauseAtCheckpointResult.java
deleted file mode 100644
index 4775fa0c6b..0000000000
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryPauseAtCheckpointResult.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-// AUTO-GENERATED FILE - DO NOT EDIT
-// Generated from: api.schema.json
-
-package com.github.copilot.generated.rpc;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.github.copilot.CopilotExperimental;
-import javax.annotation.processing.Generated;
-
-/**
- * Result for the {@code session.factory.pauseAtCheckpoint} RPC method.
- *
- * @apiNote This method is experimental and may change in a future version.
- * @since 1.0.0
- */
-@CopilotExperimental
-@javax.annotation.processing.Generated("copilot-sdk-codegen")
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public record SessionFactoryPauseAtCheckpointResult(
- /** Whether this execution attempt must pause or may continue. */
- @JsonProperty("action") FactoryPauseCheckpointAction action
-) {
-}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryPauseResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryPauseResult.java
deleted file mode 100644
index aa93afbea2..0000000000
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryPauseResult.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-// AUTO-GENERATED FILE - DO NOT EDIT
-// Generated from: api.schema.json
-
-package com.github.copilot.generated.rpc;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.github.copilot.CopilotExperimental;
-import javax.annotation.processing.Generated;
-
-/**
- * Complete current or terminal factory run envelope.
- *
- * @apiNote This method is experimental and may change in a future version.
- * @since 1.0.0
- */
-@CopilotExperimental
-@javax.annotation.processing.Generated("copilot-sdk-codegen")
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public record SessionFactoryPauseResult(
- /** Factory run identifier. */
- @JsonProperty("runId") String runId,
- /** One-based execution attempt represented by this envelope. Absent before the first attempt starts or when returned by an older runtime. */
- @JsonProperty("attempt") Long attempt,
- /** Current or terminal factory run status. */
- @JsonProperty("status") FactoryRunStatus status,
- /** Completed factory result. */
- @JsonProperty("result") Object result,
- /** Error message for an errored run. */
- @JsonProperty("error") String error,
- /** Machine-readable failure details for a halted or errored run. */
- @JsonProperty("failure") Object failure,
- /** Reason for a halted or cancelled run. */
- @JsonProperty("reason") String reason,
- /** Partial journal and progress snapshot for a halted, cancelled, or errored run. */
- @JsonProperty("snapshot") Object snapshot,
- /** Structured pause initiator metadata for a paused attempt. */
- @JsonProperty("pauseInfo") Object pauseInfo
-) {
-}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryResumeFromToolParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryResumeFromToolParams.java
deleted file mode 100644
index 3a54179329..0000000000
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryResumeFromToolParams.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-// AUTO-GENERATED FILE - DO NOT EDIT
-// Generated from: api.schema.json
-
-package com.github.copilot.generated.rpc;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.github.copilot.CopilotExperimental;
-import javax.annotation.processing.Generated;
-
-/**
- * Internal parameters for resuming a factory run from a tool.
- *
- * @apiNote This method is experimental and may change in a future version.
- * @since 1.0.0
- */
-@CopilotExperimental
-@javax.annotation.processing.Generated("copilot-sdk-codegen")
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public record SessionFactoryResumeFromToolParams(
- /** Target session identifier */
- @JsonProperty("sessionId") String sessionId,
- /** Factory run identifier. */
- @JsonProperty("runId") String runId,
- /** Optional per-invocation resource ceiling overrides. */
- @JsonProperty("limits") FactoryRunLimits limits,
- /** Opaque identifier of the originating tool call. */
- @JsonProperty("toolCallId") String toolCallId
-) {
-}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryResumeParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryResumeParams.java
deleted file mode 100644
index edb39e0811..0000000000
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryResumeParams.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-// AUTO-GENERATED FILE - DO NOT EDIT
-// Generated from: api.schema.json
-
-package com.github.copilot.generated.rpc;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.github.copilot.CopilotExperimental;
-import javax.annotation.processing.Generated;
-
-/**
- * Parameters for resuming a factory run from its persisted identity.
- *
- * @apiNote This method is experimental and may change in a future version.
- * @since 1.0.0
- */
-@CopilotExperimental
-@javax.annotation.processing.Generated("copilot-sdk-codegen")
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public record SessionFactoryResumeParams(
- /** Target session identifier */
- @JsonProperty("sessionId") String sessionId,
- /** Factory run identifier. */
- @JsonProperty("runId") String runId,
- /** Optional per-invocation resource ceiling overrides. */
- @JsonProperty("limits") FactoryRunLimits limits,
- /** Whether to notify the originating session when the factory completes. */
- @JsonProperty("notifyOnComplete") Boolean notifyOnComplete,
- /** Whether to emit factory phase names to the session transcript. */
- @JsonProperty("logPhaseNames") Boolean logPhaseNames
-) {
-}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryRunFromToolParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryRunFromToolParams.java
deleted file mode 100644
index dab8ae120d..0000000000
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryRunFromToolParams.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-// AUTO-GENERATED FILE - DO NOT EDIT
-// Generated from: api.schema.json
-
-package com.github.copilot.generated.rpc;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.github.copilot.CopilotExperimental;
-import javax.annotation.processing.Generated;
-
-/**
- * Internal parameters for invoking a registered factory from a tool.
- *
- * @apiNote This method is experimental and may change in a future version.
- * @since 1.0.0
- */
-@CopilotExperimental
-@javax.annotation.processing.Generated("copilot-sdk-codegen")
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public record SessionFactoryRunFromToolParams(
- /** Target session identifier */
- @JsonProperty("sessionId") String sessionId,
- /** Registered factory name. */
- @JsonProperty("name") String name,
- /** Factory input value. */
- @JsonProperty("args") Object args,
- /** Tool-originated factory invocation options. */
- @JsonProperty("options") FactoryToolRunOptions options,
- /** Opaque identifier of the originating tool call. */
- @JsonProperty("toolCallId") String toolCallId
-) {
-}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryRunFromToolResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryRunFromToolResult.java
deleted file mode 100644
index b76daece8d..0000000000
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryRunFromToolResult.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-// AUTO-GENERATED FILE - DO NOT EDIT
-// Generated from: api.schema.json
-
-package com.github.copilot.generated.rpc;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.github.copilot.CopilotExperimental;
-import javax.annotation.processing.Generated;
-
-/**
- * Complete current or terminal factory run envelope.
- *
- * @apiNote This method is experimental and may change in a future version.
- * @since 1.0.0
- */
-@CopilotExperimental
-@javax.annotation.processing.Generated("copilot-sdk-codegen")
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public record SessionFactoryRunFromToolResult(
- /** Factory run identifier. */
- @JsonProperty("runId") String runId,
- /** One-based execution attempt represented by this envelope. Absent before the first attempt starts or when returned by an older runtime. */
- @JsonProperty("attempt") Long attempt,
- /** Current or terminal factory run status. */
- @JsonProperty("status") FactoryRunStatus status,
- /** Completed factory result. */
- @JsonProperty("result") Object result,
- /** Error message for an errored run. */
- @JsonProperty("error") String error,
- /** Machine-readable failure details for a halted or errored run. */
- @JsonProperty("failure") Object failure,
- /** Reason for a halted or cancelled run. */
- @JsonProperty("reason") String reason,
- /** Partial journal and progress snapshot for a halted, cancelled, or errored run. */
- @JsonProperty("snapshot") Object snapshot,
- /** Structured pause initiator metadata for a paused attempt. */
- @JsonProperty("pauseInfo") Object pauseInfo
-) {
-}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryRunParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryRunParams.java
deleted file mode 100644
index fd60b9643e..0000000000
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryRunParams.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-// AUTO-GENERATED FILE - DO NOT EDIT
-// Generated from: api.schema.json
-
-package com.github.copilot.generated.rpc;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.github.copilot.CopilotExperimental;
-import javax.annotation.processing.Generated;
-
-/**
- * Parameters for invoking a registered factory.
- *
- * @apiNote This method is experimental and may change in a future version.
- * @since 1.0.0
- */
-@CopilotExperimental
-@javax.annotation.processing.Generated("copilot-sdk-codegen")
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public record SessionFactoryRunParams(
- /** Target session identifier */
- @JsonProperty("sessionId") String sessionId,
- /** Registered factory name. */
- @JsonProperty("name") String name,
- /** Factory input value. */
- @JsonProperty("args") Object args,
- /** Factory invocation options. */
- @JsonProperty("options") RunOptions options
-) {
-}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryRunResult.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryRunResult.java
deleted file mode 100644
index 4a7cc978e4..0000000000
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionFactoryRunResult.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- *--------------------------------------------------------------------------------------------*/
-
-// AUTO-GENERATED FILE - DO NOT EDIT
-// Generated from: api.schema.json
-
-package com.github.copilot.generated.rpc;
-
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.github.copilot.CopilotExperimental;
-import javax.annotation.processing.Generated;
-
-/**
- * Complete current or terminal factory run envelope.
- *
- * @apiNote This method is experimental and may change in a future version.
- * @since 1.0.0
- */
-@CopilotExperimental
-@javax.annotation.processing.Generated("copilot-sdk-codegen")
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown = true)
-public record SessionFactoryRunResult(
- /** Factory run identifier. */
- @JsonProperty("runId") String runId,
- /** One-based execution attempt represented by this envelope. Absent before the first attempt starts or when returned by an older runtime. */
- @JsonProperty("attempt") Long attempt,
- /** Current or terminal factory run status. */
- @JsonProperty("status") FactoryRunStatus status,
- /** Completed factory result. */
- @JsonProperty("result") Object result,
- /** Error message for an errored run. */
- @JsonProperty("error") String error,
- /** Machine-readable failure details for a halted or errored run. */
- @JsonProperty("failure") Object failure,
- /** Reason for a halted or cancelled run. */
- @JsonProperty("reason") String reason,
- /** Partial journal and progress snapshot for a halted, cancelled, or errored run. */
- @JsonProperty("snapshot") Object snapshot,
- /** Structured pause initiator metadata for a paused attempt. */
- @JsonProperty("pauseInfo") Object pauseInfo
-) {
-}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionModelApplyStartupOverlayParams.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionModelApplyStartupOverlayParams.java
index d24ac9e7c2..73ae210e78 100644
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionModelApplyStartupOverlayParams.java
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionModelApplyStartupOverlayParams.java
@@ -45,6 +45,10 @@ public record SessionModelApplyStartupOverlayParams(
/** Model explicitly selected by the CLI, when provided. */
@JsonProperty("cliModel") String cliModel,
/** Whether the overlay is being applied while resuming a deferred session. */
- @JsonProperty("deferredResume") Boolean deferredResume
+ @JsonProperty("deferredResume") Boolean deferredResume,
+ /** Reasoning effort paired with the effective organization-managed model. Applies only when that concrete managed model is selected; it is ignored for Auto and for CLI, resume, or user overrides. */
+ @JsonProperty("managedReasoningEffort") String managedReasoningEffort,
+ /** Context tier paired with the effective organization-managed model. Applies only when that concrete managed model is selected; it is ignored for Auto and for CLI, resume, or user overrides. */
+ @JsonProperty("managedContextTier") String managedContextTier
) {
}
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionRpc.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionRpc.java
index 5f3f359551..bb3bb0680b 100644
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionRpc.java
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SessionRpc.java
@@ -33,12 +33,12 @@ public final class SessionRpc {
public final SessionSandboxApi sandbox;
/** API methods for the {@code gitHubAuth} namespace. */
public final SessionGitHubAuthApi gitHubAuth;
+ /** API methods for the {@code accounts} namespace. */
+ public final SessionAccountsApi accounts;
/** API methods for the {@code debug} namespace. */
public final SessionDebugApi debug;
/** API methods for the {@code canvas} namespace. */
public final SessionCanvasApi canvas;
- /** API methods for the {@code factory} namespace. */
- public final SessionFactoryApi factory;
/** API methods for the {@code workflow} namespace. */
public final SessionWorkflowApi workflow;
/** API methods for the {@code model} namespace. */
@@ -131,9 +131,9 @@ public SessionRpc(RpcCaller caller, String sessionId) {
this.sessionId = sessionId;
this.sandbox = new SessionSandboxApi(caller, sessionId);
this.gitHubAuth = new SessionGitHubAuthApi(caller, sessionId);
+ this.accounts = new SessionAccountsApi(caller, sessionId);
this.debug = new SessionDebugApi(caller, sessionId);
this.canvas = new SessionCanvasApi(caller, sessionId);
- this.factory = new SessionFactoryApi(caller, sessionId);
this.workflow = new SessionWorkflowApi(caller, sessionId);
this.model = new SessionModelApi(caller, sessionId);
this.mode = new SessionModeApi(caller, sessionId);
diff --git a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SlashCommandInvocationResultSetModel.java b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SlashCommandInvocationResultSetModel.java
index 95e4d8544c..4502ccb34b 100644
--- a/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SlashCommandInvocationResultSetModel.java
+++ b/java/sdk/src/generated/java/com/github/copilot/generated/rpc/SlashCommandInvocationResultSetModel.java
@@ -33,6 +33,10 @@ public final class SlashCommandInvocationResultSetModel extends SlashCommandInvo
@JsonProperty("model")
private String model;
+ /** Auto routing profile selected by the command, when the model is Auto. */
+ @JsonProperty("autoTier")
+ private AutoTier autoTier;
+
/** Settings scope modified by the command. */
@JsonProperty("scope")
private String scope;
@@ -60,6 +64,9 @@ public final class SlashCommandInvocationResultSetModel extends SlashCommandInvo
public String getModel() { return model; }
public void setModel(String model) { this.model = model; }
+ public AutoTier getAutoTier() { return autoTier; }
+ public void setAutoTier(AutoTier autoTier) { this.autoTier = autoTier; }
+
public String getScope() { return scope; }
public void setScope(String scope) { this.scope = scope; }
diff --git a/java/sdk/src/test/java/com/github/copilot/RpcSurfaceParityE2ETest.java b/java/sdk/src/test/java/com/github/copilot/RpcSurfaceParityE2ETest.java
index 43f07d2315..68339000a9 100644
--- a/java/sdk/src/test/java/com/github/copilot/RpcSurfaceParityE2ETest.java
+++ b/java/sdk/src/test/java/com/github/copilot/RpcSurfaceParityE2ETest.java
@@ -41,8 +41,8 @@ class RpcSurfaceParityE2ETest {
private static final ObjectMapper MAPPER = new ObjectMapper();
private static final long TIMEOUT_SECONDS = 30;
- private static final int EXPECTED_RPC_METHOD_COUNT = 420;
- private static final String EXPECTED_RPC_SIGNATURE_SHA256 = "b060cc39689fb59c658ddc1d073e23c3fc16f08abf719e9102a7f54b26a99166";
+ private static final int EXPECTED_RPC_METHOD_COUNT = 411;
+ private static final String EXPECTED_RPC_SIGNATURE_SHA256 = "6404e16283b5504806589a1bd2b594865dfe4f1d6447f1872b1195688609fd84";
private static final Map EXPECTED_METHODS_BY_DECLARING_TYPE = Map.ofEntries(
Map.entry("RpcCaller", 2), Map.entry("ServerAccountApi", 6), Map.entry("ServerAgentRegistryApi", 1),
Map.entry("ServerAgentsApi", 2), Map.entry("ServerCatalogApi", 2), Map.entry("ServerCommandsApi", 1),
@@ -53,15 +53,15 @@ class RpcSurfaceParityE2ETest {
Map.entry("ServerPluginsMarketplacesApi", 6), Map.entry("ServerRpc", 3), Map.entry("ServerRuntimeApi", 1),
Map.entry("ServerSandboxApi", 1), Map.entry("ServerSecretsApi", 1), Map.entry("ServerSessionFsApi", 1),
Map.entry("ServerSessionsApi", 34), Map.entry("ServerSkillsApi", 2), Map.entry("ServerSkillsConfigApi", 2),
- Map.entry("ServerToolsApi", 1), Map.entry("ServerUserSettingsApi", 3), Map.entry("SessionAgentApi", 7),
+ Map.entry("ServerToolsApi", 1), Map.entry("ServerUserSettingsApi", 3), Map.entry("SessionAccountsApi", 3),
+ Map.entry("SessionAccountsLoginApi", 3), Map.entry("SessionAgentApi", 7),
Map.entry("SessionAutopilotObjectiveApi", 1), Map.entry("SessionCanvasActionApi", 1),
Map.entry("SessionCanvasApi", 4), Map.entry("SessionCanvasProviderApi", 2),
Map.entry("SessionCommandsApi", 8), Map.entry("SessionCompletionsApi", 2),
Map.entry("SessionConnectorsApi", 11), Map.entry("SessionContentExclusionApi", 1),
Map.entry("SessionCustomizationsApi", 1), Map.entry("SessionDebugApi", 1),
- Map.entry("SessionEventLogApi", 4), Map.entry("SessionExtensionsApi", 5),
- Map.entry("SessionFactoryApi", 13), Map.entry("SessionFactoryJournalApi", 2),
- Map.entry("SessionFleetApi", 1), Map.entry("SessionGitHubAuthApi", 10), Map.entry("SessionHistoryApi", 10),
+ Map.entry("SessionEventLogApi", 4), Map.entry("SessionExtensionsApi", 5), Map.entry("SessionFleetApi", 1),
+ Map.entry("SessionGitHubAuthApi", 10), Map.entry("SessionHistoryApi", 10),
Map.entry("SessionInstructionsApi", 2), Map.entry("SessionLimitPredictionApi", 2),
Map.entry("SessionManagedSettingsApi", 1), Map.entry("SessionLspApi", 1), Map.entry("SessionMcpApi", 18),
Map.entry("SessionDiagnosticsApi", 2), Map.entry("SessionMcpAppsApi", 6),
@@ -321,13 +321,13 @@ void remainingGeneratedMethodsUseExactEntryPoints() {
rpc.eventLog.releaseInterest(params(SessionEventLogReleaseInterestParams.class, "{}"));
rpc.eventLog.tail();
rpc.extensions.sendAttachmentsToMessage(params(SessionExtensionsSendAttachmentsToMessageParams.class, "{}"));
- rpc.factory.cancel(params(SessionFactoryCancelParams.class, "{}"));
- rpc.factory.getRunDetail(params(SessionFactoryGetRunDetailParams.class, "{}"));
- rpc.factory.getRunProgress(params(SessionFactoryGetRunProgressParams.class, "{}"));
- rpc.factory.listRuns(params(SessionFactoryListRunsParams.class, "{}"));
- rpc.factory.pauseAtCheckpoint(params(SessionFactoryPauseAtCheckpointParams.class, "{}"));
- rpc.factory.resumeFromTool(params(SessionFactoryResumeFromToolParams.class, "{}"));
- rpc.factory.runFromTool(params(SessionFactoryRunFromToolParams.class, "{}"));
+ rpc.workflow.cancel(params(SessionWorkflowCancelParams.class, "{}"));
+ rpc.workflow.getRunDetail(params(SessionWorkflowGetRunDetailParams.class, "{}"));
+ rpc.workflow.getRunProgress(params(SessionWorkflowGetRunProgressParams.class, "{}"));
+ rpc.workflow.listRuns(params(SessionWorkflowListRunsParams.class, "{}"));
+ rpc.workflow.pauseAtCheckpoint(params(SessionWorkflowPauseAtCheckpointParams.class, "{}"));
+ rpc.workflow.resumeFromTool(params(SessionWorkflowResumeFromToolParams.class, "{}"));
+ rpc.workflow.runFromTool(params(SessionWorkflowRunFromToolParams.class, "{}"));
rpc.gitHubAuth.getAllAuthAvailable();
rpc.gitHubAuth.getCurrentAuthInfo();
rpc.gitHubAuth.lastAuthErrors();
@@ -631,7 +631,7 @@ void sessionControlRpcsSerializeRequestsAndProjectUnionsAndState() throws Except
}
@Test
- void factoryAndMcpRpcsSerializeRequestsAndProjectStateTransitions() throws Exception {
+ void workflowAndMcpRpcsSerializeRequestsAndProjectStateTransitions() throws Exception {
try (var runtime = new RpcSurfaceTestCli(RpcSurfaceParityE2ETest::handle); var client = createClient(runtime)) {
client.start().get(TIMEOUT_SECONDS, TimeUnit.SECONDS);
try (var session = client
@@ -639,49 +639,49 @@ void factoryAndMcpRpcsSerializeRequestsAndProjectStateTransitions() throws Excep
.get(TIMEOUT_SECONDS, TimeUnit.SECONDS)) {
var rpc = session.getRpc();
- var run = rpc.factory.run(params(SessionFactoryRunParams.class, """
- {"name":"rpc-factory","args":{"input":42},
+ var run = rpc.workflow.run(params(SessionWorkflowRunParams.class, """
+ {"name":"rpc-workflow","args":{"input":42},
"options":{"limits":{"maxAiCredits":2.5,"maxConcurrentSubagents":2,
"maxTotalSubagents":4,"timeoutSeconds":30},
"logPhaseNames":true,"notifyOnComplete":false}}
""")).get(TIMEOUT_SECONDS, TimeUnit.SECONDS);
- assertEquals("factory-run-1", run.runId());
- assertEquals(FactoryRunStatus.RUNNING, run.status());
+ assertEquals("workflow-run-1", run.runId());
+ assertEquals(WorkflowRunStatus.RUNNING, run.status());
assertEquals(1L, run.attempt());
- var resumed = rpc.factory.resume(params(SessionFactoryResumeParams.class, """
- {"runId":"factory-run-1","limits":{"maxTotalSubagents":8},
+ var resumed = rpc.workflow.resume(params(SessionWorkflowResumeParams.class, """
+ {"runId":"workflow-run-1","limits":{"maxTotalSubagents":8},
"notifyOnComplete":true,"logPhaseNames":false}
""")).get(TIMEOUT_SECONDS, TimeUnit.SECONDS);
- assertEquals("rpc-factory", resumed.factoryName());
+ assertEquals("rpc-workflow", resumed.workflowName());
assertEquals(2L, resumed.run().attempt());
- assertEquals(FactoryRunStatus.RUNNING,
- rpc.factory.getRun(new SessionFactoryGetRunParams(null, "factory-run-1"))
+ assertEquals(WorkflowRunStatus.RUNNING,
+ rpc.workflow.getRun(new SessionWorkflowGetRunParams(null, "workflow-run-1"))
.get(TIMEOUT_SECONDS, TimeUnit.SECONDS).status());
- assertEquals(FactoryRunStatus.PAUSED,
- rpc.factory.pause(new SessionFactoryPauseParams(null, "factory-run-1"))
+ assertEquals(WorkflowRunStatus.PAUSED,
+ rpc.workflow.pause(new SessionWorkflowPauseParams(null, "workflow-run-1"))
.get(TIMEOUT_SECONDS, TimeUnit.SECONDS).status());
- rpc.factory.log(params(SessionFactoryLogParams.class, """
- {"runId":"factory-run-1","executionToken":"execution-token-1",
- "lines":[{"kind":"log","seq":7,"text":"Factory progress"}]}
+ rpc.workflow.log(params(SessionWorkflowLogParams.class, """
+ {"runId":"workflow-run-1","executionToken":"execution-token-1",
+ "lines":[{"kind":"log","seq":7,"text":"Workflow progress"}]}
""")).get(TIMEOUT_SECONDS, TimeUnit.SECONDS);
- var agent = rpc.factory.agent(params(SessionFactoryAgentParams.class, """
- {"runId":"factory-run-1","executionToken":"execution-token-1",
+ var agent = rpc.workflow.agent(params(SessionWorkflowAgentParams.class, """
+ {"runId":"workflow-run-1","executionToken":"execution-token-1",
"prompt":"Complete the RPC task.",
"options":{"agent":"explore","label":"rpc-agent","model":"model-a",
"reasoningEffort":"high"}}
""")).get(TIMEOUT_SECONDS, TimeUnit.SECONDS);
assertEquals("agent-result", ((Map, ?>) agent.result()).get("answer"));
- var journal = rpc.factory.journal.get(
- new SessionFactoryJournalGetParams(null, "factory-run-1", "execution-token-1", "checkpoint"))
+ var journal = rpc.workflow.journal.get(
+ new SessionWorkflowJournalGetParams(null, "workflow-run-1", "execution-token-1", "checkpoint"))
.get(TIMEOUT_SECONDS, TimeUnit.SECONDS);
assertTrue(journal.hit());
assertEquals(7, ((Map, ?>) journal.resultJson()).get("checkpoint"));
- rpc.factory.journal.put(params(SessionFactoryJournalPutParams.class, """
- {"runId":"factory-run-1","executionToken":"execution-token-1",
+ rpc.workflow.journal.put(params(SessionWorkflowJournalPutParams.class, """
+ {"runId":"workflow-run-1","executionToken":"execution-token-1",
"key":"checkpoint","resultJson":{"checkpoint":8}}
""")).get(TIMEOUT_SECONDS, TimeUnit.SECONDS);
@@ -713,14 +713,14 @@ void factoryAndMcpRpcsSerializeRequestsAndProjectStateTransitions() throws Excep
assertEquals("resource-content", content.text());
assertEquals("assistant", content.meta().get("audience"));
- assertCalledOnce(runtime, "session.factory.run", "session.factory.resume", "session.factory.getRun",
- "session.factory.pause", "session.factory.log", "session.factory.agent",
- "session.factory.journal.get", "session.factory.journal.put",
+ assertCalledOnce(runtime, "session.workflow.run", "session.workflow.resume", "session.workflow.getRun",
+ "session.workflow.pause", "session.workflow.log", "session.workflow.agent",
+ "session.workflow.journal.get", "session.workflow.journal.put",
"session.mcp.moveLoadingToBackground", "session.mcp.startServer",
"session.mcp.oauth.authenticationStateChanged", "session.mcp.oauth.respond",
"session.mcp.resources.list", "session.mcp.resources.listTemplates",
"session.mcp.resources.read");
- assertEquals(42, parameters(runtime, "session.factory.run").path("args").path("input").asInt());
+ assertEquals(42, parameters(runtime, "session.workflow.run").path("args").path("input").asInt());
assertEquals("resource-cursor",
parameters(runtime, "session.mcp.resources.list").path("cursor").asText());
}
@@ -909,22 +909,22 @@ private static JsonNode handle(JsonNode request) {
case "session.log" -> json("""
{"eventId":"11111111-2222-3333-4444-555555555555"}
""");
- case "session.factory.run", "session.factory.getRun" -> json("""
- {"runId":"factory-run-1","status":"running","attempt":1,
+ case "session.workflow.run", "session.workflow.getRun" -> json("""
+ {"runId":"workflow-run-1","status":"running","attempt":1,
"result":{"value":"running"},"snapshot":{"step":1}}
""");
- case "session.factory.resume" -> json("""
- {"factoryName":"rpc-factory","run":{"runId":"factory-run-1","status":"running",
+ case "session.workflow.resume" -> json("""
+ {"workflowName":"rpc-workflow","run":{"runId":"workflow-run-1","status":"running",
"attempt":2,"snapshot":{"step":3}}}
""");
- case "session.factory.pause" -> json("""
- {"runId":"factory-run-1","status":"paused","attempt":1,
+ case "session.workflow.pause" -> json("""
+ {"runId":"workflow-run-1","status":"paused","attempt":1,
"reason":"caller requested pause","snapshot":{"step":2}}
""");
- case "session.factory.agent" -> json("""
+ case "session.workflow.agent" -> json("""
{"result":{"answer":"agent-result"}}
""");
- case "session.factory.journal.get" -> json("""
+ case "session.workflow.journal.get" -> json("""
{"hit":true,"resultJson":{"checkpoint":7}}
""");
case "session.mcp.moveLoadingToBackground" -> json("""
diff --git a/nodejs/docs/extensions.md b/nodejs/docs/extensions.md
index 15577bfdd0..5a50d9db3f 100644
--- a/nodejs/docs/extensions.md
+++ b/nodejs/docs/extensions.md
@@ -78,5 +78,4 @@ An approved extension can pass a granted value to anything it starts, so ask onl
- `examples.md` — Practical code examples for tools, hooks, events, and complete extensions
- `workflows.md` — Authoring, running, resuming, and observing Dynamic Workflows
-- `factories.md`: Authoring, running, resuming, and observing Agent Factories
- `agent-author.md` — Step-by-step workflow for agents authoring extensions programmatically
diff --git a/nodejs/docs/factories.md b/nodejs/docs/factories.md
deleted file mode 100644
index f07230a839..0000000000
--- a/nodejs/docs/factories.md
+++ /dev/null
@@ -1,296 +0,0 @@
-# Agent Factories
-
-Agent Factories are extension-authored, session-scoped workflows that coordinate subagents and durable steps. The API is experimental.
-
-## Define and register a factory
-
-Use `defineFactory` and pass the returned handle to `joinSession`:
-
-```js
-import { defineFactory, joinSession } from "@github/copilot-sdk/extension";
-
-const reviewChanged = defineFactory({
- meta: {
- name: "review-changed",
- description:
- "Review changed files and verify the findings. " +
- "args: { files: string[] } — the paths to review.",
- phases: [{ title: "Review" }, { title: "Verify" }],
- argsSchema: {
- type: "object",
- required: ["files"],
- properties: {
- files: { type: "array", items: { type: "string" } },
- },
- },
- },
- run: async (ctx) => {
- ctx.phase("Review");
- const reviews = await ctx.parallel(
- ctx.args.files.map(
- (file) => () => ctx.agent(`Review ${file}`, { label: `Review ${file}` })
- )
- );
-
- ctx.phase("Verify");
- const report = await ctx.step("report", () => ({ reviews }));
- ctx.log(`Completed factory run ${ctx.runId}`);
- return report;
- },
-});
-
-const session = await joinSession({ factories: [reviewChanged] });
-```
-
-Factory metadata contains a stable `name`, a human-readable `description`, declared `phases`, an optional `argsSchema`, and optional `limits`. Phase entries contain a `title` and optional `detail`.
-
-## Declaring an argument shape
-
-A factory that reads `ctx.args` should declare `meta.argsSchema`, as the example above does. When the model invokes the factory through the `run_factory` tool, the CLI validates `args` against the declaration **before** the run starts.
-
-Declaring one turns an expensive failure into a cheap one. With a schema, a malformed call is rejected up front — the model gets a correction hint and retries, and no run row, permission prompt, or credit spend happens. Without one, nothing validates: the run starts, takes a user approval, spends credits, and then dies inside the factory body with a confusing error. Agents can read the declared shape with `factories_manage` using `operation: "inspect"`.
-
-Enforcement covers structure — types, required properties, and enum or const values. Finer constraints such as `minLength`, `pattern`, or `additionalProperties` are recorded in the declaration but not enforced. The accepted vocabulary is the `FactoryJsonSchema` subset also used for subagent structured output: `type`, `required`, `enum`, `const`, recursive `properties`/`items`, and `anyOf`/`oneOf`/`allOf`. A `type` is one of `null`, `boolean`, `integer`, `number`, `string`, `array`, or `object`, or a non-empty array of those such as `["object", "null"]`. A declaration outside that subset is rejected at registration.
-
-`argsSchema` is optional and backward compatible. A factory that omits it behaves exactly as before, so **the `description` is then the only thing telling an agent what arguments to supply** — state the expected shape there.
-
-Validation covers the model's `run_factory` path only. An extension calling `session.factory.run(...)` directly is not validated against `argsSchema`; those arguments are typed through `defineFactory` instead, and that typing does not reach the model. So a factory that reads `ctx.args` should still validate it rather than assume a shape — the declared subset does not enforce every constraint, and it does not run at all on the SDK path.
-
-`defineFactory` accepts a `run(context)` function returning `Promise`, where `TResult` is `JsonValue | void`. Objects, arrays, strings, numbers, booleans, and `null` are valid results. Returning `undefined` completes the factory with no result. Other non-JSON values are rejected.
-
-## Factory context
-
-The `run()` context provides:
-
-* `ctx.runId`: Stable ID reused across resumed attempts.
-* `ctx.args`: Invocation arguments, forwarded verbatim. When the caller omits `args`, this is `{}` rather than `undefined`.
-* `ctx.agent(prompt, options?)`: Runs one factory-owned subagent. Options are exactly `label`, `schema`, `model`, `agent`, `reasoningEffort`, and `contextTier`. See [Subagent calls](#subagent-calls).
-* `ctx.parallel(thunks)`: Runs thunks concurrently and awaits all of them (a barrier). A thunk that throws becomes `null` in the result array, so one failed item does not lose the rest. Cancellation and hard runtime failures (`ResponseError`, `ConnectionError`) are the exception — those propagate and reject the whole call, because they mean the run itself is in trouble rather than one item having failed. Handle them at run level; do not assume every failure arrives as a `null`. Rejects above 4096 items.
-* `ctx.pipeline(items, ...stages)`: Flows each item through every stage without a barrier between stages, so one item can be in a later stage while another is still in an earlier one. Each stage is called as `(previous, item, index)`, where `previous` is the prior stage's result and `item` is the original input. A stage that throws drops that item to `null` and skips its remaining stages, with the same exception for cancellation and hard runtime failures. Rejects above 4096 items.
-* `ctx.phase(title)`: Starts a named progress phase. This sets a single run-global value, so calling it from inside concurrent `parallel`/`pipeline` stages races. Call it at run-level transitions and distinguish concurrent work by `label` instead.
-* `ctx.log(message)`: Appends a progress line. When a factory bounds its own coverage (top-N, sampling), log what was dropped.
-* `ctx.step(key, producer, options?)`: Journals the producer's JSON result under a stable key so a resume replays it without re-running the producer. A journaled (default) producer must return a JSON-serializable value; `undefined` or a non-JSON value is rejected. Pass `{ volatile: true }` to bypass the journal and run the producer every time.
-
- The key is the *sole* identity: neither the producer body nor its inputs contribute to it. A resume replays the cached value for a matching key even if the producer has since changed, so version the key (`"scan-v2"`) whenever its inputs or meaning change. Journaled producers are best-effort at-least-once and may run again across crashes or concurrent same-key callers, so keep side effects idempotent.
-* `ctx.pause(key)`: Pauses at a durable, one-shot checkpoint. The first attempt records the checkpoint, pauses, and throws `AbortError` after cooperative cancellation. When the run resumes, the factory starts again and the same checkpoint returns so execution can continue. Call it only from the main factory flow, not inside `ctx.parallel()` or `ctx.pipeline()`.
-* `ctx.session`: The session returned by `joinSession`. It refuses calls that start, resume, or pause a factory run. Call `extensions_manage` with `operation: "guide"` to read more about the session APIs.
-* `ctx.signal`: Cooperative cancellation signal for extension work and subprocesses.
-* `ctx.factory(...)`: Always rejects because nested factories are not supported.
-
-Factory-owned subagents are intentionally hidden from `read_agent` and `write_agent`. Use the factory observability APIs instead.
-
-### Subagent calls
-
-`ctx.agent(prompt, options?)` spawns one factory-scoped subagent and awaits it. Without a schema it resolves to the subagent's final text. With `options.schema` it resolves to the parsed JSON value.
-
-**Identical calls are memoized into one subagent.** Each call is journaled by its canonical prompt and options, including `label`. Two calls with the same prompt and the same options return one shared result — even when issued concurrently. To spawn N *independent* subagents, give each a unique `label` or vary the prompt:
-
-```js
-// One subagent, awaited five times — almost certainly not what you want.
-await ctx.parallel([1, 2, 3, 4, 5].map(() => () => ctx.agent("Find a bug")));
-
-// Five independent subagents.
-await ctx.parallel(
- [1, 2, 3, 4, 5].map((i) => () => ctx.agent("Find a bug", { label: `finder:${i}` }))
-);
-```
-
-**An ordinary failure resolves to `null` — it does not throw.** A subagent that errors, returns nothing, or (with a schema) produces output that still fails to parse or match after its one retry resolves `null`. Always guard the result before using it, including a bare `await ctx.agent(...)`:
-
-```js
-const finding = await ctx.agent(prompt, { label: "inspector" });
-if (!finding) return { finding: null };
-```
-
-Cancellation and hard runtime failures — a reached limit, a durable-state failure — reject instead, aborting the run. When filtering results, prefer `v => v !== null` over `Boolean`, which also discards a valid `false`, `0`, or `""`.
-
-**`schema` is a structural subset of JSON Schema, not a validator.** Honored: `type`, `required`, `enum`, `const`, recursive `properties`/`items`, and `anyOf`/`oneOf`/`allOf` — where `oneOf` is treated as `anyOf`, meaning at least one branch matches rather than exactly one. Ignored and *not* enforced: `additionalProperties`, `pattern`, `minLength`/`maxLength`, `format`, numeric ranges, and boolean schemas. Do not rely on an ignored keyword to constrain a result. A schema call retries once on a parse or match failure, so it may spawn twice, and both spawns count toward `maxTotalSubagents`.
-
-### Choosing between pipeline and parallel
-
-Prefer `pipeline` for multi-stage work. It has no barrier between stages, so each item advances as soon as its own prior stage finishes.
-
-Reach for a barrier — `parallel` between stages — only when a stage genuinely needs every prior result at once: deduplicating or merging across the full set, an early exit based on the total, or a prompt that compares one result against the others. Needing to map, filter, or flatten is not a reason to use a barrier; do that inside a pipeline stage. Barrier latency is real: if the slowest of N subagents takes three times the fastest, a barrier wastes the rest of the pool's time.
-
-See [factory-patterns.md](./factory-patterns.md) for composable orchestration patterns built on these primitives.
-
-## Resource limits
-
-Limits may be declared in `meta.limits` and overridden per invocation. Every limit is optional and must be positive when present; an omitted limit leaves that dimension unbounded, except that an omitted `maxConcurrentSubagents` falls back to `maxTotalSubagents`, so a declared total cap also bounds concurrency.
-
-Set a ceiling only from real knowledge of what the factory costs, or because the user named one. A guessed ceiling does not make a run safer: it stops a healthy run partway with `factory_limit_reached`, after that run has already spent credits. An agent authoring or invoking a factory on the user's behalf has no basis for estimating a number, so it should leave `limits` unset and bound the work with the factory's own counters instead. Omitting limits does not remove oversight of a model-initiated run: `run_factory` requests permission first, and that prompt shows the effective limits. SDK-initiated `run` and `resume` do not request permission, so an SDK caller that wants a ceiling sets it deliberately, from the cost it already knows.
-
-```js
-// Only when the cost profile is known, or the user asked for this ceiling.
-limits: { maxTotalSubagents: 10 },
-```
-
-- `maxConcurrentSubagents`: Positive integer concurrent-subagent cap. Additional subagents wait in a queue. Queueing applies backpressure and does not fail the run.
-- `maxTotalSubagents`: Positive integer cumulative admission cap. An attempted subagent beyond the cap ends the attempt with failure kind `maxTotalSubagents`.
-- `timeoutSeconds`: Positive finite number of seconds, including positive fractions, capped at `2_147_483.647`. It measures accumulated active-execution time across attempts, including the extension body, subprocess waits, queued-agent waits, and sleeps. Time between attempts is excluded. The timeout is soft because already-running work may take time to stop. Its failure kind is `timeoutSeconds`.
-- `maxAiCredits`: Positive finite AI-credit budget for the whole run's factory subagent subtree, including descendants. AI credits are GitHub Copilot's universal usage metric. This is a soft, post-paid ceiling, so completed or parallel turns can settle above it before the run stops. Accounting is fail-closed: an accounting failure stops a budgeted run rather than allowing untracked use. Its failure kind is `maxAiCredits`.
-
-`maxTotalSubagents`, `timeoutSeconds`, and `maxAiCredits` use reject-and-retry semantics. A rejected attempt ends with run status `error` and `failure.type` set to `factory_limit_reached`. The failed run keeps its ID, arguments, journal, and accounting. Resume the run with a raised limit when additional work is approved. Previously consumed resources still count.
-
-## Run and resume
-
-Run by registered name or handle:
-
-```ts
-const run = await session.factory.run("review-changed", {
- args: { files: ["src/a.ts"] },
- limits: { maxAiCredits: 3 },
- notifyOnComplete: true,
- logPhaseNames: true,
-});
-
-if (run.status === "completed") {
- console.log(run.result);
-} else {
- console.error(`run ${run.runId} ended as ${run.status}`, run.failure ?? run.error);
-}
-```
-
-The name overload is:
-
-```ts
-session.factory.run(
- name: string,
- options?: {
- args?: JsonValue;
- limits?: FactoryLimitOverrides;
- notifyOnComplete?: boolean;
- logPhaseNames?: boolean;
- },
-): Promise;
-```
-
-Resume by run ID without resending the name or arguments:
-
-```ts
-const run = await session.factory.resume(runId, {
- limits: { maxAiCredits: 6 },
- notifyOnComplete: true,
- logPhaseNames: true,
-});
-```
-
-The signature is:
-
-```ts
-session.factory.resume(
- runId: string,
- options?: {
- limits?: FactoryLimitOverrides;
- notifyOnComplete?: boolean;
- logPhaseNames?: boolean;
- },
-): Promise;
-```
-
-Set `notifyOnComplete` to `true` for factories that are likely to be invoked by an agent, so the originating session is notified when the factory completes. Set it to `false` for factories intended to be invoked programmatically, where the caller awaits the result directly. Set `logPhaseNames` to emit factory phase names to the session transcript. Both options apply to new and resumed runs.
-
-Both resolve with the run envelope (`FactoryRunResult`) for **every** outcome—`completed`, `error`, `halted`, `paused`, and `cancelled` alike. Inspect `status` and read `result` only when the run completed; a limit breach carries a typed `failure`. A `paused` envelope means that the current attempt settled, not that the durable run is permanently finished. Resume the same run ID to start another attempt with its journal and accounting intact. SDK-initiated `run` and `resume` do not request permission, so they have no declined outcome. The model's `run_factory` tool requests permission before the durable row exists; declining it creates no run row. An SDK-initiated run is refused only when the session already has its maximum number of active top-level runs. Pre-execution resume failures throw `FactoryResumeError`, whose `code` is one of `not_found`, `non_resumable`, `already_active`, `factory_already_running`, `factory_limits_invalid`, `factory_session_disposed`, `factory_storage_unavailable`, or `factory_storage_corrupt`.
-
-An agent that no longer has a prior run's ID in context can recover it with `factories_manage` and `operation: "runs"`, which lists the session's factory runs with their IDs and statuses. This matters for resume: a run that reached a limit keeps its journal, so resuming it replays completed work for free, while restarting it from scratch pays for that work twice.
-
-Pause a running attempt from outside its factory body:
-
-```ts
-const paused = await session.factory.pause(runId);
-```
-
-Inside a factory body, use a durable checkpoint instead:
-
-```ts
-await ctx.step("prepare", prepareInput);
-await ctx.pause("review-ready");
-await ctx.agent("Review the prepared input");
-```
-
-The first attempt pauses at `"review-ready"` and ends through cooperative cancellation. On resume, the factory starts from the beginning, reuses the journaled step, returns from the checkpoint, and continues.
-
-The agent-facing `run_factory` tool has exactly two input branches:
-
-```ts
-{ name: string; args?: JsonValue; limits?: FactoryLimitOverrides }
-{ resumeFromRunId: string; limits?: FactoryLimitOverrides }
-```
-
-## Authoring a factory from inside a session
-
-The agent-facing `factories_manage` tool writes a factory into a session-scoped extension at runtime with `operation: "author"`. The rules above all apply, plus one constraint that does not affect an extension author.
-
-**The `run` body is self-contained.** It is emitted verbatim into a generated module as a single async function expression. It closes over nothing: not the conversation that authored it, and not any authoring-time binding. Only its own locals, its `ctx` parameter, and standard Node and JavaScript globals are in scope, so every schema, constant, and helper must be defined *inside* the function. The generated module imports the SDK itself; the expression cannot add static `import` statements or use `require`. Load anything else with a dynamic `await import("...")` in the body.
-
-```js
-async ({ args, agent, phase }) => {
- // Defined inside — there is no outer scope to close over.
- const VERDICT = { type: "object", properties: { real: { type: "boolean" } }, required: ["real"] };
-
- phase("Inspect");
- const finding = await agent(`Name one likely bug in ${args.file ?? "the code"}.`, {
- label: "inspector",
- });
- if (!finding) return { finding: null, real: false };
-
- phase("Verify");
- const verdict = await agent(`Is this a real bug? Claim: ${finding}`, {
- label: "verifier",
- schema: VERDICT,
- });
- return { finding, real: verdict?.real === true };
-};
-```
-
-Authoring registers the factory but does not run it. Invoke it afterwards with `run_factory`. Use `factories_manage` with `operation: "list"` to see the factories already registered in the session and `operation: "inspect"` to read one factory's description, phases, declared argument shape, and limits before running it.
-
-## Observe a run
-
-The calling session can inspect its own factory runs:
-
-```ts
-const runs = await session.factory.listRuns();
-const runsPage = await session.factory.listRuns({
- afterSeq,
- beforeSeq,
- limit,
-});
-const detail = await session.factory.getRunDetail(runId);
-const progressPage = await session.factory.getRunProgress(runId, {
- phaseId,
- afterSeq,
- beforeSeq,
- limit,
-});
-```
-
-- `listRuns()` returns only the runs array from the newest default page of this session's durable factory runs. This overload preserves the original convenience API.
-- `listRuns({ afterSeq, beforeSeq, limit })` returns the full page. Its `oldestSeq`, `newestSeq`, `hasMoreNewer`, and `omittedOlder` fields let callers continue paging without raw RPC calls.
-- `getRunDetail(runId)` returns phases, prompt-safe agent summaries, and the latest progress page.
-- `getRunProgress(runId, options?)` pages progress forward, backward, by phase, or from the latest tail.
-
-`getRun(runId)` reads the latest run envelope. `pause(runId)` pauses a running attempt and returns its `paused` envelope. `cancel(runId)` cancels a run and returns its terminal envelope.
-
-`waitForRun(runId, options?)` resolves with the current attempt's envelope once it settles into `completed`, `error`, `halted`, `paused`, or `cancelled`. It resolves immediately when the current attempt has already settled:
-
-```ts
-const settled = await session.factory.waitForRun(runId);
-if (settled.status === "completed") {
- console.log(settled.result);
-}
-```
-
-It watches `factory.run_updated` and re-reads the durable envelope on each invalidation, collapsing a burst of events into a single in-flight read. A low-frequency periodic re-read runs alongside the subscription, so a dropped or missing invalidation degrades into a slightly late resolution rather than an unbounded wait. Pass a `signal` to stop waiting:
-
-```ts
-const controller = new AbortController();
-setTimeout(() => controller.abort(), 30_000);
-const settled = await session.factory.waitForRun(runId, { signal: controller.signal });
-```
-
-Aborting rejects the wait and has no effect on the run, which keeps executing—use `pause(runId)` or `cancel(runId)` to stop it. The resolved object is a snapshot of that settled attempt. If its status is `paused`, a later resume updates the durable envelope under the same run ID. Call `getRun(runId)` to read the latest envelope. `isFactoryRunTerminal(status)` exposes the same current-attempt settlement test for callers driving their own loop.
-
-Listen for the ephemeral `factory.run_updated` event. Its `{ runId, revision }` payload is an invalidation signal. Re-read the desired API when a newer monotonic revision arrives.
-
-Revisions cover durable lifecycle, accounting, phase, agent, and progress changes. Continuous read-time fields can change without a new revision. These include `observedAt`, active-time calculations, live counts, and a live agent's status or prompt-safe activity text. Factory prompts are never exposed by these APIs. A run is visible only through the session that owns it.
diff --git a/nodejs/docs/factory-patterns.md b/nodejs/docs/factory-patterns.md
deleted file mode 100644
index 8ae403d55a..0000000000
--- a/nodejs/docs/factory-patterns.md
+++ /dev/null
@@ -1,194 +0,0 @@
-# Agent Factory patterns
-
-Composable orchestration patterns built on the factory context. Read [factories.md](./factories.md) first for the API and its semantics. The API is experimental.
-
-Every snippet below assumes the surrounding `async (ctx) => { ... }` run body and destructures the hooks it uses. Three rules apply throughout, because breaking them fails silently:
-
-- **Give every independent subagent a unique `label`.** Identical prompt-and-options pairs memoize into a single shared subagent.
-- **Guard every `agent()` result.** An ordinary failure resolves to `null` rather than throwing.
-- **Filter with `v => v !== null`,** not `Boolean`, which also discards a valid `false`, `0`, or `""`.
-
-## Multi-stage review
-
-The default shape: fan out across dimensions, and let each dimension verify as soon as its own review lands. No barrier, so a slow dimension never holds up a fast one.
-
-```js
-async ({ pipeline, parallel, agent, phase, log }) => {
- const FINDINGS = {
- type: "object",
- properties: {
- findings: {
- type: "array",
- items: {
- type: "object",
- properties: { title: { type: "string" } },
- required: ["title"],
- },
- },
- },
- required: ["findings"],
- };
- const VERDICT = {
- type: "object",
- properties: { isReal: { type: "boolean" } },
- required: ["isReal"],
- };
- const DIMENSIONS = [
- { key: "bugs", prompt: "Review the diff for correctness bugs. Return JSON {findings:[{title}]}." },
- { key: "perf", prompt: "Review the diff for performance issues. Return JSON {findings:[{title}]}." },
- ];
-
- phase("Review"); // Run-global: set it before the fan-out, never inside a stage.
- const perDimension = await pipeline(
- DIMENSIONS,
- (d) => agent(d.prompt, { label: `review:${d.key}`, schema: FINDINGS }),
- (review, d) => {
- if (!review) {
- log(`review:${d.key} produced nothing`);
- return [];
- }
- return parallel(
- (review.findings ?? []).map((f, i) => () =>
- agent(`Adversarially verify this finding is real: ${f.title}`, {
- label: `verify:${d.key}:${i}`,
- schema: VERDICT,
- }).then((v) => (v && v.isReal ? f : null))
- )
- );
- }
- );
-
- return { confirmed: perDimension.flat().filter((v) => v !== null) };
-};
-```
-
-## When a barrier is correct
-
-Deduplicating across every finding needs the whole set in hand, so the barrier earns its cost here. Dedup itself is plain JavaScript, done in the body between the two fan-outs. This excerpt reuses `FINDINGS`, `VERDICT`, and `DIMENSIONS` from the previous example — define them inside your own function.
-
-```js
-const all = await parallel(
- DIMENSIONS.map((d) => () => agent(d.prompt, { label: `find:${d.key}`, schema: FINDINGS }))
-);
-const findings = all.filter((v) => v !== null).flatMap((r) => r.findings ?? []);
-const deduped = [...new Map(findings.map((f) => [f.title, f])).values()]; // Needs all of them.
-const verified = await parallel(
- deduped.map((f, i) => () => agent(`Verify: ${f.title}`, { label: `verify:${i}`, schema: VERDICT }))
-);
-```
-
-## Loop until count
-
-Accumulate toward a target. Each iteration needs a unique identity — a unique label plus a prompt that excludes what has already been found — a bounded attempt count, and a null guard.
-
-```js
-const BUG = {
- type: "object",
- properties: { title: { type: "string" } },
- required: ["title"],
-};
-
-const bugs = [];
-let attempt = 0;
-while (bugs.length < 10 && attempt < 30) {
- const r = await agent(
- `Find ONE distinct bug NOT already listed: ${JSON.stringify(bugs.map((b) => b.title))}. Return JSON {title}.`,
- { label: `finder:${attempt}`, schema: BUG }
- );
- attempt++;
- if (r && r.title) bugs.push(r);
- log(`${bugs.length}/10 found`);
-}
-```
-
-## Loop until dry
-
-Keep spawning finders until some number of consecutive rounds surface nothing new. Deduplicate against everything *seen*, not just what was kept, or discarded findings resurface every round.
-
-```js
-const BUGS = {
- type: "object",
- properties: {
- bugs: {
- type: "array",
- items: { type: "object", properties: { title: { type: "string" } }, required: ["title"] },
- },
- },
- required: ["bugs"],
-};
-const VERDICT = {
- type: "object",
- properties: { real: { type: "boolean" } },
- required: ["real"],
-};
-
-const seen = new Set();
-const confirmed = [];
-const keyOf = (b) => b.title.toLowerCase();
-let dry = 0;
-let round = 0;
-
-while (dry < 2 && round < 20) {
- const found = (
- await parallel(
- [0, 1, 2].map((i) => () =>
- agent(`Find bugs (finder ${i}, round ${round}). Return JSON {bugs:[{title}]}.`, {
- label: `find:${round}:${i}`,
- schema: BUGS,
- })
- )
- )
- )
- .filter((v) => v !== null)
- .flatMap((r) => r.bugs ?? []);
-
- const fresh = found.filter((b) => {
- const k = keyOf(b);
- if (seen.has(k)) return false;
- seen.add(k);
- return true;
- });
-
- if (!fresh.length) {
- dry++;
- round++;
- continue;
- }
- dry = 0;
-
- const judged = await parallel(
- fresh.map((b, i) => () =>
- parallel(
- ["correctness", "security", "repro"].map((lens) => () =>
- agent(`Judge via ${lens}: is "${b.title}" real? Return JSON {real}.`, {
- label: `judge:${round}:${i}:${lens}`,
- schema: VERDICT,
- })
- )
- ).then((vs) => ({ b, real: vs.filter((v) => v !== null).filter((v) => v.real).length >= 2 }))
- )
- );
-
- confirmed.push(...judged.filter((v) => v !== null && v.real).map((v) => v.b));
- round++;
-}
-```
-
-## Quality patterns
-
-Compose these freely.
-
-- **Adversarial verify.** Spawn several independent skeptics per finding, each prompted to *refute* it and to default to refuted when uncertain. Keep only what a majority fails to refute.
-- **Perspective-diverse verify.** Give each verifier a distinct lens — correctness, security, performance, does-it-reproduce — instead of several identical skeptics. The distinct prompts also stop them memoizing into one subagent.
-- **Judge panel.** Generate several independent attempts from different angles, score them with parallel judges, then synthesize from the winner while grafting the best ideas from the runners-up.
-- **Multi-modal sweep.** Run parallel searchers that each look a different way: by container, by content, by entity, by time.
-- **Completeness critic.** End with an agent asking what is missing — an angle not run, a claim unverified, a source unread — and use its answer to seed the next round.
-- **No silent caps.** When the factory bounds its own coverage with a top-N, a sampling step, or a no-retry rule, `log()` what was dropped.
-
-## Scaling
-
-Match the orchestration to what was asked. A quick check wants a couple of subagents and single-vote verification; a request to be thorough or comprehensive wants a larger finder pool, a three-to-five vote adversarial pass, and a synthesis stage.
-
-There is no in-script budget object. Scale with your own counters, as in the loop patterns above, and treat any declared limits as the safety ceiling rather than the control mechanism. Only `agent()` spawns are throttled, by `maxConcurrentSubagents` falling back to `maxTotalSubagents`; with neither declared there is no built-in concurrency cap, so bound a wide fan-out with the factory's own counters. Do not invent a ceiling to compensate, and see [Resource limits](./factories.md#resource-limits) for when declaring one is appropriate. `parallel` itself is `Promise.all`, so non-agent work in a thunk runs fully concurrently regardless.
-
-These patterns are not exhaustive. Compose novel harnesses — tournament brackets, self-repair loops, staged escalation — when the task calls for it.
diff --git a/nodejs/docs/workflows.md b/nodejs/docs/workflows.md
index 821778fcd8..872cbcb0fe 100644
--- a/nodejs/docs/workflows.md
+++ b/nodejs/docs/workflows.md
@@ -2,8 +2,6 @@
Dynamic Workflows are extension-authored, session-scoped workflows that coordinate subagents and durable steps. The API is experimental.
-Use Dynamic Workflows for new extension-authored orchestration. Existing Agent Factory extensions remain supported during the transition, but one `joinSession` call must register either `workflows` or `factories`, never both.
-
## Define and register a workflow
Use `defineWorkflow` and pass the returned handle to `joinSession`:
@@ -242,7 +240,7 @@ if (settled.status === "completed") {
}
```
-It watches the runtime's `factory.run_updated` compatibility event and re-reads the durable envelope on each invalidation, collapsing a burst of events into a single in-flight read. A low-frequency periodic re-read runs alongside the subscription, so a dropped or missing invalidation degrades into a slightly late resolution rather than an unbounded wait. Pass a `signal` to stop waiting:
+It watches `workflow.run_updated` and re-reads the durable envelope on each invalidation, collapsing a burst of events into a single in-flight read. A low-frequency periodic re-read runs alongside the subscription, so a dropped or missing invalidation degrades into a slightly late resolution rather than an unbounded wait. Pass a `signal` to stop waiting:
```ts
const controller = new AbortController();
@@ -252,6 +250,6 @@ const settled = await session.workflow.waitForRun(runId, { signal: controller.si
Aborting rejects the wait and has no effect on the run, which keeps executing—use `pause(runId)` or `cancel(runId)` to stop it. The resolved object is a snapshot of that settled attempt. If its status is `paused`, a later resume updates the durable envelope under the same run ID. Call `getRun(runId)` to read the latest envelope. `isWorkflowRunTerminal(status)` exposes the same current-attempt settlement test for callers driving their own loop.
-Listen for the ephemeral `factory.run_updated` compatibility event. Its `{ runId, revision }` payload is an invalidation signal. Re-read the desired API when a newer monotonic revision arrives.
+Listen for the ephemeral `workflow.run_updated` event. Its `{ runId, revision }` payload is an invalidation signal. Re-read the desired API when a newer monotonic revision arrives.
Revisions cover durable lifecycle, accounting, phase, agent, and progress changes. Continuous read-time fields can change without a new revision. These include `observedAt`, active-time calculations, live counts, and a live agent's status or prompt-safe activity text. Workflow prompts are never exposed by these APIs. A run is visible only through the session that owns it.
diff --git a/nodejs/package.json b/nodejs/package.json
index f6187b73d8..b5ee4a1872 100644
--- a/nodejs/package.json
+++ b/nodejs/package.json
@@ -5,7 +5,7 @@
"url": "https://github.com/github/copilot-sdk.git"
},
"version": "0.0.0-dev",
- "copilotCliVersion": "1.0.89-3",
+ "copilotCliVersion": "1.0.89-4",
"description": "TypeScript SDK for programmatic control of GitHub Copilot CLI via JSON-RPC",
"main": "./dist/cjs/index.js",
"types": "./dist/index.d.ts",
diff --git a/nodejs/src/cliVersion.ts b/nodejs/src/cliVersion.ts
index a2c01fa144..8f38c41ec6 100644
--- a/nodejs/src/cliVersion.ts
+++ b/nodejs/src/cliVersion.ts
@@ -1,3 +1,3 @@
-export const COPILOT_CLI_VERSION = "1.0.89-3";
+export const COPILOT_CLI_VERSION = "1.0.89-4";
export const COPILOT_CLI_USE_NPM_PACKAGE = false;
diff --git a/nodejs/src/client.ts b/nodejs/src/client.ts
index f4f911c273..c812598d73 100644
--- a/nodejs/src/client.ts
+++ b/nodejs/src/client.ts
@@ -93,11 +93,9 @@ import type {
TypedSessionLifecycleHandler,
} from "./types.js";
import { defaultJoinSessionPermissionHandler } from "./types.js";
-import type { FactoryHandle } from "./factory.js";
import type { WorkflowHandle } from "./workflow.js";
interface ExtensionOrchestrationContributions {
- factories?: FactoryHandle[];
workflows?: WorkflowHandle[];
}
@@ -1817,20 +1815,7 @@ export class CopilotClient {
async resumeSessionForExtension(
sessionId: string,
config: ResumeSessionConfig,
- factories?: FactoryHandle[],
- extensionOptions?: ExtensionJoinOptions
- ): Promise;
- /** @internal */
- async resumeSessionForExtension(
- sessionId: string,
- config: ResumeSessionConfig,
- contributions?: ExtensionOrchestrationContributions,
- extensionOptions?: ExtensionJoinOptions
- ): Promise;
- async resumeSessionForExtension(
- sessionId: string,
- config: ResumeSessionConfig,
- contributions: FactoryHandle[] | ExtensionOrchestrationContributions = {},
+ contributions: ExtensionOrchestrationContributions = {},
extensionOptions?: ExtensionJoinOptions
): Promise {
return this.resumeSessionInternal(sessionId, config, contributions, extensionOptions);
@@ -1839,15 +1824,10 @@ export class CopilotClient {
private async resumeSessionInternal(
sessionId: string,
config: ResumeSessionConfig,
- contributions: FactoryHandle[] | ExtensionOrchestrationContributions = {},
+ contributions: ExtensionOrchestrationContributions = {},
extensionOptions?: ExtensionJoinOptions
): Promise {
- const { factories, workflows } = Array.isArray(contributions)
- ? { factories: contributions, workflows: undefined }
- : contributions;
- if (factories !== undefined && workflows !== undefined) {
- throw new Error("Session configuration cannot include both factories and workflows");
- }
+ const { workflows } = contributions;
if (config.gitHubToken !== undefined && config.gitHubTokenProvider !== undefined) {
throw new Error("gitHubToken and gitHubTokenProvider are mutually exclusive");
}
@@ -1871,7 +1851,6 @@ export class CopilotClient {
session.registerTools(config.tools);
session.registerCanvases(config.canvases);
session.registerCommands(config.commands);
- session.registerFactories(factories);
session.registerWorkflows(workflows);
const {
wireProvider: bearerWireProvider,
@@ -1958,7 +1937,6 @@ export class CopilotClient {
})),
toolSearch: config.toolSearch,
canvases: config.canvases?.map((canvas) => canvas.declaration),
- factories: factories?.map((factory) => factory.meta),
workflows: workflows?.map((workflow) => workflow.meta),
requestCanvasRenderer: config.requestCanvasRenderer,
requestExtensions: config.requestExtensions,
diff --git a/nodejs/src/extension.ts b/nodejs/src/extension.ts
index e1b9a7f72a..e7bb21e3b2 100644
--- a/nodejs/src/extension.ts
+++ b/nodejs/src/extension.ts
@@ -9,7 +9,6 @@ import {
type PermissionHandler,
type ResumeSessionConfig,
} from "./types.js";
-import type { FactoryHandle } from "./factory.js";
import type { WorkflowHandle } from "./workflow.js";
export {
@@ -23,28 +22,6 @@ export {
type CanvasOptions,
} from "./canvas.js";
-type JoinSessionContributionConfig =
- | {
- /**
- * Factory handles to register when the extension joins the session.
- *
- * @experimental Part of the experimental Agent Factories surface and may
- * change or be removed in future SDK or CLI releases.
- */
- factories?: FactoryHandle[];
- workflows?: never;
- }
- | {
- factories?: never;
- /**
- * Workflow handles to register when the extension joins the session.
- *
- * @experimental Part of the experimental Dynamic Workflows surface and may
- * change or be removed in future SDK or CLI releases.
- */
- workflows?: WorkflowHandle[];
- };
-
export type JoinSessionConfig = Omit<
ResumeSessionConfig,
"onPermissionRequest" | "extensionSdkPath"
@@ -79,37 +56,16 @@ export type JoinSessionConfig = Omit<
* ```
*/
requestedEnvironmentVariables?: string[];
-} & JoinSessionContributionConfig;
+ /**
+ * Workflow handles to register when the extension joins the session.
+ *
+ * @experimental Part of the experimental Dynamic Workflows surface and may
+ * change or be removed in future SDK or CLI releases.
+ */
+ workflows?: WorkflowHandle[];
+};
-export type { ExtensionInfo, FactoryLimits, FactoryMeta } from "./types.js";
-export {
- defineFactory,
- FactoryResumeError,
- isFactoryRunTerminal,
- type RunOptions,
- type ResumeOptions,
- type FactoryResumeErrorCode,
- type SessionFactoryApi,
- type FactoryAgentOptions,
- type FactoryContext,
- type FactoryDefinition,
- type FactoryHandle,
- type FactoryJsonSchema,
- type JsonValue,
- type FactoryPipelineStage,
- type FactoryStepOptions,
- type FactoryRunResult,
- type FactoryRunStatus,
- type FactoryRunSummary,
- type FactoryListRunsOptions,
- type FactoryRunsPage,
- type FactoryRunDetail,
- type FactoryProgressPage,
- type FactoryProgressLine,
- type FactoryPhaseObservation,
- type FactoryPhaseStatus,
- type FactoryAgentSummary,
-} from "./factory.js";
+export type { ExtensionInfo } from "./types.js";
export {
defineWorkflow,
WorkflowResumeError,
@@ -123,6 +79,7 @@ export {
type WorkflowContext,
type WorkflowDefinition,
type WorkflowHandle,
+ type JsonValue,
type WorkflowJsonSchema,
type WorkflowLimits,
type WorkflowMeta,
@@ -170,7 +127,6 @@ export async function joinSession(config: JoinSessionConfig = {}): Promise = new Set([
- "completed",
- "halted",
- "paused",
- "cancelled",
- "error",
-]);
-
-/**
- * Whether a factory run status is terminal.
- *
- * @experimental Part of the experimental Agent Factories surface and may
- * change or be removed in future SDK or CLI releases.
- */
-export function isFactoryRunTerminal(status: FactoryRunStatus): boolean {
- return FACTORY_TERMINAL_STATUSES.has(status);
-}
-
-declare const factoryHandleBrand: unique symbol;
-
-/** A value that can be represented losslessly on the SDK JSON wire. */
-export type JsonValue =
- | null
- | boolean
- | number
- | string
- | JsonValue[]
- | { [key: string]: JsonValue };
-
-/**
- * Conservative JSON shape language accepted by the Agent Factories surface, for
- * both structured factory agent output and a factory's declared `argsSchema`.
- *
- * This is a best-effort structural guard — used to decide whether a subagent's
- * structured output should be accepted or retried, and whether a caller's
- * factory `args` match the declared shape — **not** a full JSON Schema
- * validator. Only these keywords are honored: `type`, `required`, `enum`,
- * `const`, recursive `properties`/`items`, and `anyOf`/`oneOf`/`allOf`. A `type`
- * is one of `null`, `boolean`, `integer`, `number`, `string`, `array`, or
- * `object`, or a non-empty array of those (for example `["object", "null"]`).
- *
- * Everything else is **ignored, not enforced**. In particular, string
- * constraints (`pattern`, `minLength`, `maxLength`, `format`), numeric ranges
- * (`minimum`, `maximum`), `additionalProperties`, and boolean (`true`/`false`)
- * schemas do not reject non-conforming output. `oneOf` is treated like `anyOf`
- * (at least one branch must match) rather than strict exactly-one. Author
- * schemas within this subset; do not rely on unsupported constraints for
- * correctness.
- *
- * @experimental Part of the experimental Agent Factories surface and may
- * change or be removed in future SDK or CLI releases.
- */
-export type FactoryJsonSchema = { [key: string]: JsonValue };
-
-/**
- * Options for one factory-scoped subagent call.
- *
- * @experimental Part of the experimental Agent Factories surface and may
- * change or be removed in future SDK or CLI releases.
- */
-export interface FactoryAgentOptions {
- label?: string;
- schema?: FactoryJsonSchema;
- model?: string;
- reasoningEffort?: string;
- contextTier?: ContextTier;
- agent?: string;
-}
-
-export const FACTORY_AGENT_OPTION_KEYS = [
- "label",
- "schema",
- "model",
- "reasoningEffort",
- "contextTier",
- "agent",
-] as const;
-
-/**
- * Options for a durable factory step.
- *
- * @experimental Part of the experimental Agent Factories surface and may
- * change or be removed in future SDK or CLI releases.
- */
-export interface FactoryStepOptions {
- /** Skip the journal and always invoke the producer. */
- volatile?: boolean;
-}
-
-/**
- * Per-invocation factory resource ceiling overrides.
- *
- * An omitted field preserves the existing/default ceiling, a number replaces
- * it, and `null` explicitly makes that dimension unlimited.
- *
- * @experimental Part of the experimental Agent Factories surface and may
- * change or be removed in future SDK or CLI releases.
- */
-export interface FactoryLimitOverrides {
- maxConcurrentSubagents?: number | null;
- maxTotalSubagents?: number | null;
- maxAiCredits?: number | null;
- timeoutSeconds?: number | null;
-}
-
-/**
- * One stage in a per-item factory pipeline.
- *
- * @experimental Part of the experimental Agent Factories surface and may
- * change or be removed in future SDK or CLI releases.
- */
-export type FactoryPipelineStage = (
- previous: TInput,
- item: unknown,
- index: number
-) => Promise | TResult;
-
-/**
- * Context passed to an extension-authored factory body.
- *
- * @experimental Part of the experimental Agent Factories surface and may
- * change or be removed in future SDK or CLI releases.
- */
-export interface FactoryContext {
- /** Stable identifier for the current factory run. */
- readonly runId: string;
- /** Spawn and await one factory-scoped subagent. */
- agent(prompt: string, options?: FactoryAgentOptions): Promise;
- /** Memoize an arbitrary producer under a stable author-supplied key. */
- step(
- key: string,
- producer: () => Promise | JsonValue,
- options?: FactoryStepOptions
- ): Promise;
- /**
- * Pause this run at a durable, one-shot checkpoint.
- *
- * The first attempt to reach a key pauses and aborts cooperatively. A
- * resumed attempt returns from the same key and continues.
- */
- pause(key: string): Promise;
- /**
- * Run thunks concurrently and await all of them.
- *
- * A thunk that throws becomes `null` in the result array, so one failed
- * item does not lose the rest. Cancellation and hard runtime failures
- * (`ResponseError`, `ConnectionError`) are the exception: those propagate
- * and reject the whole call, because they mean the run itself is in
- * trouble rather than one item having failed.
- */
- parallel(
- thunks: Array<() => Promise | TResult>
- ): Promise>;
- /**
- * Run each item through every stage without barriers between stages.
- *
- * A stage that throws drops that item to `null` and skips its remaining
- * stages. As with {@link FactoryContext.parallel}, cancellation and hard
- * runtime failures propagate instead of being recorded per item.
- */
- pipeline(items: unknown[], ...stages: FactoryPipelineStage[]): Promise;
- /** Start a named factory progress phase. */
- phase(title: string): void;
- /** Emit a factory progress line. */
- log(message: string): void;
- /** Reject because nested factories are not supported. */
- factory(name: string, args?: JsonValue): Promise;
- /** Caller-supplied input, forwarded verbatim. */
- args: TArgs;
- /**
- * The session instance returned by `joinSession`. It refuses calls that
- * start, resume, or pause a factory run.
- */
- session: CopilotSession;
- /** Cooperative cancellation signal for the current factory run. */
- signal: AbortSignal;
-}
-
-/**
- * Definition accepted by {@link defineFactory}.
- *
- * @experimental Part of the experimental Agent Factories surface and may
- * change or be removed in future SDK or CLI releases.
- */
-export interface FactoryDefinition<
- TArgs extends JsonValue = JsonValue,
- TResult extends JsonValue | void = JsonValue | void,
-> {
- meta: FactoryMeta;
- run(context: FactoryContext): Promise;
-}
-
-/**
- * A deeply immutable view of a value.
- *
- * `defineFactory` deep-freezes the metadata it stores, so the handle's view of
- * it has to be readonly all the way down or `handle.meta.name = "..."` and
- * `handle.meta.phases.push(...)` would compile and then throw at runtime.
- */
-type DeepReadonly = T extends (infer U)[]
- ? readonly DeepReadonly[]
- : T extends object
- ? { readonly [K in keyof T]: DeepReadonly }
- : T;
-
-/**
- * Opaque reusable reference to a defined factory.
- *
- * @experimental Part of the experimental Agent Factories surface and may
- * change or be removed in future SDK or CLI releases.
- */
-export interface FactoryHandle<
- TArgs extends JsonValue = JsonValue,
- TResult extends JsonValue | void = JsonValue | void,
-> {
- readonly meta: DeepReadonly;
- readonly [factoryHandleBrand]: {
- readonly args: TArgs;
- readonly result: TResult;
- };
-}
-
-/**
- * Options for invoking a factory.
- *
- * @experimental Part of the experimental Agent Factories surface and may
- * change or be removed in future SDK or CLI releases.
- */
-export interface RunOptions {
- /** Input surfaced as `context.args`. */
- args?: TArgs;
- /** Optional per-invocation resource ceiling overrides. */
- limits?: FactoryLimitOverrides;
- /** Whether to notify the originating session when the factory completes. */
- notifyOnComplete?: boolean;
- /** Whether to emit factory phase names to the session transcript. */
- logPhaseNames?: boolean;
- /**
- * Prior run whose persisted identity, arguments, journal, and accounting should be resumed.
- *
- * @deprecated Use {@link SessionFactoryApi.resume} instead.
- */
- resumeFromRunId?: string;
-}
-
-/**
- * Options for resuming a factory run by ID.
- *
- * @experimental Part of the experimental Agent Factories surface and may
- * change or be removed in future SDK or CLI releases.
- */
-export interface ResumeOptions {
- /** Optional per-invocation resource ceiling overrides. */
- limits?: FactoryLimitOverrides;
- /** Whether to notify the originating session when the factory completes. */
- notifyOnComplete?: boolean;
- /** Whether to emit factory phase names to the session transcript. */
- logPhaseNames?: boolean;
-}
-
-/**
- * Machine-readable pre-execution factory resume failure.
- *
- * @experimental Part of the experimental Agent Factories surface and may
- * change or be removed in future SDK or CLI releases.
- */
-export type FactoryResumeErrorCode =
- | "not_found"
- | "non_resumable"
- | "already_active"
- | "factory_already_running"
- | "factory_limits_invalid"
- | "factory_session_disposed"
- | "factory_storage_unavailable"
- | "factory_storage_corrupt";
-
-/**
- * Friendly factory API exposed on a session.
- *
- * @experimental Part of the experimental Agent Factories surface and may
- * change or be removed in future SDK or CLI releases.
- */
-export interface SessionFactoryApi {
- /**
- * Run a registered factory and resolve with its run envelope.
- *
- * The envelope is returned for every outcome, including `error`, `halted`,
- * `paused`, and `cancelled` — inspect `status` and read `result` only when
- * the run completed. `paused` settles the current attempt, but the same
- * durable run can later resume under its existing run ID. SDK-initiated
- * runs do not request permission, so they have no declined outcome. The
- * model's `run_factory` tool requests permission before a durable row
- * exists; declining it creates no run row. Failures that occur before a run
- * exists (such as an unknown factory or attempting to start a run while the
- * session is at its active top-level run limit) still reject.
- */
- run(name: string, options?: RunOptions): Promise;
- run(
- factory: FactoryHandle,
- options?: RunOptions
- ): Promise;
- /**
- * Resume a run from its persisted factory name, arguments, journal, and accounting.
- *
- * Resolves with the run envelope like {@link SessionFactoryApi.run}.
- * SDK-initiated resumes do not request permission. A pre-execution failure
- * with a documented resume code rejects with {@link FactoryResumeError}.
- */
- resume(runId: string, options?: ResumeOptions): Promise;
- /** Read the latest durable envelope for a factory run. */
- getRun(runId: string): Promise;
- /**
- * Wait for the current attempt to settle and resolve with its envelope.
- *
- * Resolves as soon as the run reaches `completed`, `error`, `halted`,
- * `paused`, or `cancelled`, and resolves immediately when the current
- * attempt has already settled. A `paused` envelope is an attempt-level
- * snapshot: resuming the same durable run can later change the envelope
- * returned by {@link SessionFactoryApi.getRun}.
- *
- * This watches the run's `factory.run_updated` invalidation events and
- * periodically re-reads the durable envelope so a missed event cannot
- * leave the wait hanging. Pass a `signal` to stop waiting; aborting rejects
- * and has no effect on the run itself, which keeps executing. Use
- * {@link SessionFactoryApi.cancel} to actually stop it.
- */
- waitForRun(runId: string, options?: { signal?: AbortSignal }): Promise;
- /**
- * List the newest default page of this session's durable factory runs.
- *
- * This backwards-compatible overload returns only the runs array. Pass
- * paging options to receive the full page, including its cursors and
- * truncation metadata.
- */
- listRuns(): Promise;
- /**
- * Page this session's durable factory runs.
- *
- * `afterSeq` and `beforeSeq` are exclusive cursors. The result includes
- * `oldestSeq`, `newestSeq`, `hasMoreNewer`, and `omittedOlder` so callers
- * can continue paging without using the raw RPC client.
- */
- listRuns(options: FactoryListRunsOptions): Promise;
- /** Read durable phases, direct agents, and the latest progress tail for a run. */
- getRunDetail(runId: string): Promise;
- /** Page durable progress forward, backward, or from the latest tail. */
- getRunProgress(
- runId: string,
- options?: Omit
- ): Promise;
- /** Pause a running factory attempt and return its `paused` envelope. */
- pause(runId: string): Promise;
- /** Cancel a factory run and return its terminal envelope. */
- cancel(runId: string): Promise;
-}
-
-/**
- * Error thrown when a factory cannot be resumed before execution begins.
- *
- * @experimental Part of the experimental Agent Factories surface and may
- * change or be removed in future SDK or CLI releases.
- */
-export class FactoryResumeError extends Error {
- constructor(
- public readonly code: FactoryResumeErrorCode,
- message: string
- ) {
- super(message);
- this.name = "FactoryResumeError";
- }
-}
-
-interface StoredFactory {
- meta: FactoryMeta;
- run(context: FactoryContext): Promise;
-}
-
-const factoryHandles = new WeakMap