From c3d962ae55ee55074243bc0910ebaf876a0c63b9 Mon Sep 17 00:00:00 2001 From: Ed Burns Date: Sun, 31 May 2026 22:02:09 -0700 Subject: [PATCH] # dd-3009225: Soft-archive standalone repo after monorepo migration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Remove most content from `github/copilot-sdk-java` after completing the migration to the `java/` directory of the monorepo [`github/copilot-sdk`](https://github.com/github/copilot-sdk). The standalone repo is kept only for `gh-pages` documentation hosting. ## What changed ### Deleted (1,017 files, ~87,500 lines removed) All source code, build configuration, CI/CD workflows, issue templates, scripts, and development tooling have been removed: - **Source & tests** — entire `src/` tree (production code + test code) - **Build system** — `pom.xml`, Maven wrapper (`mvnw`, `.mvn/`), checkstyle/spotbugs configs - **CI/CD** — all `.github/workflows/*.yml`, `.github/actions/`, `.github/scripts/` - **Codegen** — `scripts/codegen/` (java.ts, package.json, etc.) - **Repo metadata** — `CHANGELOG.md`, `CONTRIBUTING.md`, `CODE_OF_CONDUCT.md`, `LICENSE`, `SECURITY.md`, `SUPPORT.md`, `CODEOWNERS` - **IDE / agent configs** — `.vscode/`, `.claude/`, `.github/agents/`, `.github/prompts/`, `.github/skills/`, `instructions/` - **Docs & ADRs** — `docs/` directory - **Misc** — `jbang-example.java`, `dependabot.yml`, coverage badges, release config ### Modified - **`README.md`** — replaced full SDK documentation with a redirect notice pointing to the monorepo at `github/copilot-sdk/tree/main/java`. ### Kept (not touched) - `.github/workflows/` entries that were already removed in prior commit `00449e9dd` (schedule removal) - `gh-pages` branch content (served separately) ## Why The Java SDK now lives in `github/copilot-sdk` under `java/`. Keeping a full copy in the standalone repo creates confusion about which is canonical and risks divergent development. This change makes the standalone repo a thin redirect while preserving git history and `gh-pages` documentation. --- .../agentic-merge-reference-impl/SKILL.md | 7 - .../skills/commit-as-pull-request/SKILL.md | 7 - .../skills/documentation-coverage/SKILL.md | 7 - .github/CODEOWNERS | 1 - .github/ISSUE_TEMPLATE/bug.yml | 41 - .github/ISSUE_TEMPLATE/documentation.yml | 41 - .github/ISSUE_TEMPLATE/feature.yml | 41 - .github/ISSUE_TEMPLATE/maintenance.yml | 41 - .github/actions/setup-copilot/action.yml | 43 - .github/actions/test-report/action.yml | 186 -- .github/agents/agentic-workflows.agent.md | 169 -- .github/aw/actions-lock.json | 59 - .github/badges/jacoco-generated.svg | 18 - .github/badges/jacoco-handwritten.svg | 18 - .github/badges/jacoco.svg | 18 - .github/copilot-instructions.md | 323 --- .github/dependabot.yml | 29 - .../agentic-merge-reference-impl.prompt.md | 483 ---- ...agent-merge-reference-impl-instructions.md | 33 - .../prompts/commit-as-pull-request.prompt.md | 108 - .../test-coverage-assessment.prompt.md | 125 - .github/pull_request_template.md | 29 - .github/release.yml | 33 - .github/scripts/build/format-and-test.sh | 44 - .github/scripts/ci/commit-and-push.sh | 77 - .../ci/create-issue-assigned-to-copilot.ts | 135 - .github/scripts/ci/parse-repo-info.sh | 29 - .github/scripts/ci/sync-after-merge.sh | 29 - .github/scripts/generate-coverage-badge.sh | 108 - .../merge-reference-impl-diff.sh | 86 - .../merge-reference-impl-finish.sh | 81 - .../merge-reference-impl-start.sh | 88 - .../sync-cli-version-from-reference-impl.sh | 80 - .../sync-codegen-version.sh | 79 - .../scripts/release/test-update-changelog.sh | 270 -- .github/scripts/release/update-changelog.sh | 125 - .../agentic-merge-reference-impl/SKILL.md | 7 - .../skills/commit-as-pull-request/SKILL.md | 7 - .github/workflows/build-test.yml | 177 -- .../workflows/codegen-agentic-fix.lock.yml | 1457 ---------- .github/workflows/codegen-agentic-fix.md | 245 -- .github/workflows/codegen-check.yml | 191 -- .github/workflows/copilot-setup-steps.yml | 59 - .github/workflows/notes.template | 28 - .github/workflows/publish-maven.yml | 256 -- .github/workflows/publish-snapshot.yml | 53 - .../workflows/reference-impl-sync.lock.yml | 1457 ---------- .github/workflows/reference-impl-sync.md | 126 - .github/workflows/run-smoke-test.yml | 113 - .../workflows/update-copilot-dependency.yml | 266 -- .mvn/wrapper/maven-wrapper.properties | 3 - .vscode/launch.json | 21 - .vscode/mcp.json | 12 - .vscode/settings.json | 11 - CHANGELOG.md | 544 ---- CODE_OF_CONDUCT.md | 74 - CONTRIBUTING.md | 86 - LICENSE | 21 - README.md | 196 +- SECURITY.md | 31 - SUPPORT.md | 13 - config/checkstyle/checkstyle.xml | 52 - config/spotbugs/spotbugs-exclude.xml | 20 - docs/CUSTOM_SITE_CSS.md | 187 -- docs/WORKFLOWS.md | 141 - ...adr-001-semver-pre-general-availability.md | 28 - ...n-and-reference-implementation-tracking.md | 57 - instructions/copilot-sdk-java.instructions.md | 756 ----- jbang-example.java | 42 - mvnw | 295 -- mvnw.cmd | 189 -- pom.xml | 1022 ------- scripts/codegen/.gitignore | 1 - scripts/codegen/java.ts | 1608 ----------- scripts/codegen/package-lock.json | 691 ----- scripts/codegen/package.json | 14 - scripts/compare-standalone-to-monorepo.sh | 360 --- .../github/copilot/generated/AbortEvent.java | 42 - .../github/copilot/generated/AbortReason.java | 37 - .../generated/AssistantIntentEvent.java | 42 - .../generated/AssistantMessageDeltaEvent.java | 46 - .../generated/AssistantMessageEvent.java | 73 - .../generated/AssistantMessageStartEvent.java | 44 - .../AssistantMessageToolRequest.java | 41 - .../AssistantMessageToolRequestType.java | 35 - .../AssistantReasoningDeltaEvent.java | 44 - .../generated/AssistantReasoningEvent.java | 44 - .../AssistantStreamingDeltaEvent.java | 42 - .../generated/AssistantTurnEndEvent.java | 42 - .../generated/AssistantTurnStartEvent.java | 44 - .../generated/AssistantUsageApiEndpoint.java | 39 - .../generated/AssistantUsageCopilotUsage.java | 30 - ...AssistantUsageCopilotUsageTokenDetail.java | 33 - .../generated/AssistantUsageEvent.java | 79 - .../AssistantUsageQuotaSnapshot.java | 42 - .../AutoModeSwitchCompletedEvent.java | 44 - .../AutoModeSwitchRequestedEvent.java | 46 - .../generated/AutoModeSwitchResponse.java | 37 - .../AutopilotObjectiveChangedOperation.java | 37 - .../AutopilotObjectiveChangedStatus.java | 39 - .../generated/CanvasOpenedAvailability.java | 35 - .../CanvasRegistryChangedCanvas.java | 41 - .../CanvasRegistryChangedCanvasAction.java | 32 - .../generated/CapabilitiesChangedEvent.java | 42 - .../generated/CapabilitiesChangedUI.java | 31 - .../generated/CommandCompletedEvent.java | 42 - .../generated/CommandExecuteEvent.java | 48 - .../copilot/generated/CommandQueuedEvent.java | 44 - .../generated/CommandsChangedCommand.java | 29 - .../generated/CommandsChangedEvent.java | 43 - ...ompactionCompleteCompactionTokensUsed.java | 39 - ...pleteCompactionTokensUsedCopilotUsage.java | 30 - ...tionTokensUsedCopilotUsageTokenDetail.java | 33 - .../generated/CustomAgentsUpdatedAgent.java | 42 - .../generated/ElicitationCompletedAction.java | 37 - .../generated/ElicitationCompletedEvent.java | 47 - .../generated/ElicitationRequestedEvent.java | 54 - .../generated/ElicitationRequestedMode.java | 35 - .../generated/ElicitationRequestedSchema.java | 33 - .../copilot/generated/ExitPlanModeAction.java | 39 - .../generated/ExitPlanModeCompletedEvent.java | 50 - .../generated/ExitPlanModeRequestedEvent.java | 51 - .../generated/ExtensionsLoadedExtension.java | 33 - .../ExtensionsLoadedExtensionSource.java | 35 - .../ExtensionsLoadedExtensionStatus.java | 39 - .../generated/ExternalToolCompletedEvent.java | 42 - .../generated/ExternalToolRequestedEvent.java | 56 - .../copilot/generated/HandoffRepository.java | 31 - .../copilot/generated/HandoffSourceType.java | 35 - .../copilot/generated/HookEndError.java | 29 - .../copilot/generated/HookEndEvent.java | 50 - .../copilot/generated/HookProgressEvent.java | 42 - .../copilot/generated/HookStartEvent.java | 46 - .../McpAppToolCallCompleteError.java | 27 - .../McpAppToolCallCompleteEvent.java | 57 - .../McpAppToolCallCompleteToolMeta.java | 27 - .../McpAppToolCallCompleteToolMetaUI.java | 30 - .../generated/McpOauthCompletedEvent.java | 42 - .../generated/McpOauthRequiredEvent.java | 48 - .../McpOauthRequiredStaticClientConfig.java | 31 - .../copilot/generated/McpServerSource.java | 39 - .../copilot/generated/McpServerStatus.java | 43 - .../McpServerStatusChangedStatus.java | 43 - .../copilot/generated/McpServerTransport.java | 39 - .../generated/McpServersLoadedServer.java | 39 - .../McpServersLoadedServerStatus.java | 43 - .../generated/ModelCallFailureEvent.java | 58 - .../generated/ModelCallFailureSource.java | 37 - .../PendingMessagesModifiedEvent.java | 39 - .../generated/PermissionCompletedEvent.java | 46 - .../generated/PermissionCompletedKind.java | 47 - .../generated/PermissionCompletedResult.java | 27 - .../generated/PermissionRequestedEvent.java | 48 - .../generated/PlanChangedOperation.java | 37 - .../copilot/generated/ReasoningSummary.java | 37 - .../generated/SamplingCompletedEvent.java | 42 - .../generated/SamplingRequestedEvent.java | 46 - ...SessionAutopilotObjectiveChangedEvent.java | 46 - .../SessionBackgroundTasksChangedEvent.java | 39 - .../generated/SessionCanvasOpenedEvent.java | 60 - .../SessionCanvasRegistryChangedEvent.java | 43 - .../SessionCompactionCompleteEvent.java | 74 - .../SessionCompactionStartEvent.java | 46 - .../generated/SessionContextChangedEvent.java | 56 - .../SessionCustomAgentsUpdatedEvent.java | 47 - .../SessionCustomNotificationEvent.java | 51 - .../copilot/generated/SessionErrorEvent.java | 58 - .../copilot/generated/SessionEvent.java | 241 -- .../SessionExtensionsLoadedEvent.java | 43 - .../generated/SessionHandoffEvent.java | 55 - .../copilot/generated/SessionIdleEvent.java | 42 - .../copilot/generated/SessionInfoEvent.java | 48 - .../SessionMcpServerStatusChangedEvent.java | 46 - .../SessionMcpServersLoadedEvent.java | 43 - .../github/copilot/generated/SessionMode.java | 37 - .../generated/SessionModeChangedEvent.java | 44 - .../generated/SessionModelChangeEvent.java | 75 - .../SessionPermissionsChangedEvent.java | 44 - .../generated/SessionPlanChangedEvent.java | 42 - .../SessionRemoteSteerableChangedEvent.java | 42 - .../copilot/generated/SessionResumeEvent.java | 61 - .../SessionScheduleCancelledEvent.java | 42 - .../SessionScheduleCreatedEvent.java | 50 - .../generated/SessionShutdownEvent.java | 69 - .../generated/SessionSkillsLoadedEvent.java | 43 - .../generated/SessionSnapshotRewindEvent.java | 44 - .../copilot/generated/SessionStartEvent.java | 65 - .../generated/SessionTaskCompleteEvent.java | 44 - .../generated/SessionTitleChangedEvent.java | 42 - .../generated/SessionToolsUpdatedEvent.java | 42 - .../generated/SessionTruncationEvent.java | 56 - .../generated/SessionUsageInfoEvent.java | 54 - .../generated/SessionWarningEvent.java | 46 - .../SessionWorkspaceFileChangedEvent.java | 44 - .../generated/ShutdownCodeChanges.java | 32 - .../generated/ShutdownModelMetric.java | 34 - .../ShutdownModelMetricRequests.java | 29 - .../ShutdownModelMetricTokenDetail.java | 27 - .../generated/ShutdownModelMetricUsage.java | 35 - .../generated/ShutdownTokenDetail.java | 27 - .../copilot/generated/ShutdownType.java | 35 - .../copilot/generated/SkillInvokedEvent.java | 59 - .../generated/SkillInvokedTrigger.java | 37 - .../github/copilot/generated/SkillSource.java | 45 - .../copilot/generated/SkillsLoadedSkill.java | 37 - .../generated/SubagentCompletedEvent.java | 54 - .../generated/SubagentDeselectedEvent.java | 39 - .../generated/SubagentFailedEvent.java | 56 - .../generated/SubagentSelectedEvent.java | 47 - .../generated/SubagentStartedEvent.java | 50 - .../copilot/generated/SystemMessageEvent.java | 48 - .../generated/SystemMessageMetadata.java | 30 - .../copilot/generated/SystemMessageRole.java | 35 - .../generated/SystemNotificationEvent.java | 44 - .../generated/ToolExecutionCompleteError.java | 29 - .../generated/ToolExecutionCompleteEvent.java | 65 - .../ToolExecutionCompleteResult.java | 34 - .../ToolExecutionCompleteToolDescription.java | 31 - ...lExecutionCompleteToolDescriptionMeta.java | 27 - ...xecutionCompleteToolDescriptionMetaUI.java | 30 - ...mpleteToolDescriptionMetaUIVisibility.java | 35 - .../ToolExecutionCompleteUIResource.java | 35 - .../ToolExecutionCompleteUIResourceMeta.java | 27 - ...ToolExecutionCompleteUIResourceMetaUI.java | 31 - ...lExecutionCompleteUIResourceMetaUICsp.java | 30 - ...onCompleteUIResourceMetaUIPermissions.java | 33 - ...leteUIResourceMetaUIPermissionsCamera.java | 24 - ...sourceMetaUIPermissionsClipboardWrite.java | 24 - ...IResourceMetaUIPermissionsGeolocation.java | 24 - ...UIResourceMetaUIPermissionsMicrophone.java | 24 - .../ToolExecutionPartialResultEvent.java | 44 - .../generated/ToolExecutionProgressEvent.java | 44 - .../generated/ToolExecutionStartEvent.java | 56 - .../generated/ToolUserRequestedEvent.java | 46 - .../generated/UnknownSessionEvent.java | 31 - .../generated/UserInputCompletedEvent.java | 46 - .../generated/UserInputRequestedEvent.java | 51 - .../generated/UserMessageAgentMode.java | 39 - .../copilot/generated/UserMessageEvent.java | 61 - .../generated/WorkingDirectoryContext.java | 41 - .../WorkingDirectoryContextHostType.java | 35 - .../WorkspaceFileChangedOperation.java | 35 - .../copilot/generated/rpc/AbortReason.java | 37 - .../generated/rpc/AccountGetQuotaResult.java | 28 - .../generated/rpc/AccountQuotaSnapshot.java | 42 - .../copilot/generated/rpc/AgentInfo.java | 49 - .../generated/rpc/AgentInfoSource.java | 43 - .../rpc/AgentRegistrySpawnParams.java | 37 - .../rpc/AgentRegistrySpawnPermissionMode.java | 35 - .../copilot/generated/rpc/AuthInfoType.java | 45 - .../copilot/generated/rpc/CanvasAction.java | 31 - .../generated/rpc/CanvasCloseParams.java | 37 - .../generated/rpc/CanvasHostContext.java | 27 - .../rpc/CanvasHostContextCapabilities.java | 27 - .../rpc/CanvasInstanceAvailability.java | 35 - .../rpc/CanvasInvokeActionParams.java | 41 - .../generated/rpc/CanvasOpenParams.java | 39 - .../generated/rpc/CanvasOpenResult.java | 31 - .../generated/rpc/CanvasSessionContext.java | 27 - .../copilot/generated/rpc/ConnectParams.java | 27 - .../copilot/generated/rpc/ConnectResult.java | 31 - .../rpc/ConnectedRemoteSessionMetadata.java | 48 - .../ConnectedRemoteSessionMetadataKind.java | 35 - ...nectedRemoteSessionMetadataRepository.java | 31 - .../generated/rpc/DiscoveredCanvas.java | 40 - .../generated/rpc/DiscoveredMcpServer.java | 33 - .../rpc/DiscoveredMcpServerSource.java | 39 - .../rpc/DiscoveredMcpServerType.java | 39 - .../generated/rpc/EventsAgentScope.java | 35 - .../generated/rpc/EventsCursorStatus.java | 35 - .../copilot/generated/rpc/Extension.java | 35 - .../generated/rpc/ExtensionSource.java | 35 - .../generated/rpc/ExtensionStatus.java | 39 - .../rpc/HistoryCompactContextWindow.java | 37 - .../generated/rpc/InstalledPlugin.java | 39 - .../generated/rpc/InstructionsSources.java | 44 - .../rpc/InstructionsSourcesLocation.java | 39 - .../rpc/InstructionsSourcesType.java | 45 - .../rpc/McpAppsDiagnoseCapability.java | 31 - .../generated/rpc/McpAppsDiagnoseServer.java | 34 - .../rpc/McpAppsHostContextDetails.java | 40 - ...ostContextDetailsAvailableDisplayMode.java | 37 - .../McpAppsHostContextDetailsDisplayMode.java | 37 - .../McpAppsHostContextDetailsPlatform.java | 37 - .../rpc/McpAppsHostContextDetailsTheme.java | 35 - .../generated/rpc/McpAppsResourceContent.java | 36 - .../rpc/McpAppsSetHostContextDetails.java | 40 - ...ostContextDetailsAvailableDisplayMode.java | 37 - ...pAppsSetHostContextDetailsDisplayMode.java | 37 - .../McpAppsSetHostContextDetailsPlatform.java | 37 - .../McpAppsSetHostContextDetailsTheme.java | 35 - .../generated/rpc/McpConfigAddParams.java | 29 - .../generated/rpc/McpConfigDisableParams.java | 28 - .../generated/rpc/McpConfigEnableParams.java | 28 - .../generated/rpc/McpConfigListResult.java | 28 - .../generated/rpc/McpConfigRemoveParams.java | 27 - .../generated/rpc/McpConfigUpdateParams.java | 29 - .../generated/rpc/McpDiscoverParams.java | 27 - .../generated/rpc/McpDiscoverResult.java | 28 - .../rpc/McpExecuteSamplingRequest.java | 24 - .../rpc/McpExecuteSamplingResult.java | 24 - .../rpc/McpSamplingExecutionAction.java | 37 - .../copilot/generated/rpc/McpServer.java | 33 - .../generated/rpc/McpServerSource.java | 39 - .../generated/rpc/McpServerStatus.java | 43 - .../rpc/McpSetEnvValueModeDetails.java | 35 - .../rpc/MetadataSnapshotCurrentMode.java | 37 - .../rpc/MetadataSnapshotRemoteMetadata.java | 33 - ...adataSnapshotRemoteMetadataRepository.java | 31 - ...etadataSnapshotRemoteMetadataTaskType.java | 35 - .../github/copilot/generated/rpc/Model.java | 44 - .../copilot/generated/rpc/ModelBilling.java | 29 - .../rpc/ModelBillingTokenPrices.java | 37 - .../ModelBillingTokenPricesLongContext.java | 33 - .../generated/rpc/ModelCapabilities.java | 29 - .../rpc/ModelCapabilitiesLimits.java | 33 - .../rpc/ModelCapabilitiesLimitsVision.java | 32 - .../rpc/ModelCapabilitiesOverride.java | 29 - .../rpc/ModelCapabilitiesOverrideLimits.java | 33 - ...ModelCapabilitiesOverrideLimitsVision.java | 32 - .../ModelCapabilitiesOverrideSupports.java | 29 - .../rpc/ModelCapabilitiesSupports.java | 29 - .../generated/rpc/ModelPickerCategory.java | 37 - .../rpc/ModelPickerPriceCategory.java | 39 - .../copilot/generated/rpc/ModelPolicy.java | 29 - .../generated/rpc/ModelPolicyState.java | 37 - .../generated/rpc/ModelsListResult.java | 28 - .../generated/rpc/OpenCanvasInstance.java | 45 - .../rpc/OptionsUpdateEnvValueMode.java | 35 - .../OptionsUpdateToolFilterPrecedence.java | 35 - .../rpc/PendingPermissionRequest.java | 29 - .../generated/rpc/PermissionLocationType.java | 35 - .../generated/rpc/PermissionPathsConfig.java | 34 - .../copilot/generated/rpc/PermissionRule.java | 29 - .../generated/rpc/PermissionRulesSet.java | 30 - .../generated/rpc/PermissionUrlsConfig.java | 30 - ...igureAdditionalContentExclusionPolicy.java | 30 - ...eAdditionalContentExclusionPolicyRule.java | 31 - ...ionalContentExclusionPolicyRuleSource.java | 27 - ...AdditionalContentExclusionPolicyScope.java | 35 - .../rpc/PermissionsModifyRulesScope.java | 35 - .../rpc/PermissionsSetApproveAllSource.java | 39 - .../copilot/generated/rpc/PingParams.java | 27 - .../copilot/generated/rpc/PingResult.java | 32 - .../github/copilot/generated/rpc/Plugin.java | 33 - .../generated/rpc/QueuePendingItems.java | 29 - .../generated/rpc/QueuePendingItemsKind.java | 35 - .../generated/rpc/ReasoningSummary.java | 37 - .../generated/rpc/RemoteSessionMode.java | 37 - .../copilot/generated/rpc/RpcCaller.java | 38 - .../copilot/generated/rpc/RpcMapper.java | 38 - .../copilot/generated/rpc/ScheduleEntry.java | 38 - .../rpc/SecretsAddFilterValuesParams.java | 28 - .../rpc/SecretsAddFilterValuesResult.java | 27 - .../copilot/generated/rpc/SendAgentMode.java | 39 - .../copilot/generated/rpc/SendMode.java | 35 - .../generated/rpc/ServerAccountApi.java | 36 - .../generated/rpc/ServerAgentRegistryApi.java | 38 - .../copilot/generated/rpc/ServerMcpApi.java | 40 - .../generated/rpc/ServerMcpConfigApi.java | 76 - .../generated/rpc/ServerModelsApi.java | 36 - .../copilot/generated/rpc/ServerRpc.java | 80 - .../generated/rpc/ServerSecretsApi.java | 36 - .../generated/rpc/ServerSessionFsApi.java | 36 - .../generated/rpc/ServerSessionsApi.java | 218 -- .../copilot/generated/rpc/ServerSkill.java | 39 - .../generated/rpc/ServerSkillsApi.java | 40 - .../generated/rpc/ServerSkillsConfigApi.java | 36 - .../copilot/generated/rpc/ServerToolsApi.java | 36 - .../generated/rpc/SessionAbortParams.java | 29 - .../generated/rpc/SessionAbortResult.java | 29 - .../generated/rpc/SessionAgentApi.java | 87 - .../rpc/SessionAgentDeselectParams.java | 27 - .../rpc/SessionAgentDeselectResult.java | 24 - .../rpc/SessionAgentGetCurrentParams.java | 27 - .../rpc/SessionAgentGetCurrentResult.java | 27 - .../generated/rpc/SessionAgentListParams.java | 27 - .../generated/rpc/SessionAgentListResult.java | 28 - .../rpc/SessionAgentReloadParams.java | 27 - .../rpc/SessionAgentReloadResult.java | 28 - .../rpc/SessionAgentSelectParams.java | 29 - .../rpc/SessionAgentSelectResult.java | 27 - .../copilot/generated/rpc/SessionAuthApi.java | 57 - .../rpc/SessionAuthGetStatusParams.java | 27 - .../rpc/SessionAuthGetStatusResult.java | 37 - .../rpc/SessionAuthSetCredentialsParams.java | 29 - .../rpc/SessionAuthSetCredentialsResult.java | 27 - .../generated/rpc/SessionCanvasApi.java | 97 - .../rpc/SessionCanvasCloseParams.java | 29 - .../rpc/SessionCanvasInvokeActionParams.java | 33 - .../rpc/SessionCanvasInvokeActionResult.java | 27 - .../rpc/SessionCanvasListOpenParams.java | 27 - .../rpc/SessionCanvasListOpenResult.java | 28 - .../rpc/SessionCanvasListParams.java | 27 - .../rpc/SessionCanvasListResult.java | 28 - .../rpc/SessionCanvasOpenParams.java | 35 - .../rpc/SessionCanvasOpenResult.java | 45 - .../generated/rpc/SessionCommandsApi.java | 117 - .../rpc/SessionCommandsEnqueueParams.java | 29 - .../rpc/SessionCommandsEnqueueResult.java | 27 - .../rpc/SessionCommandsExecuteParams.java | 31 - .../rpc/SessionCommandsExecuteResult.java | 27 - ...ionCommandsHandlePendingCommandParams.java | 31 - ...ionCommandsHandlePendingCommandResult.java | 27 - .../rpc/SessionCommandsInvokeParams.java | 31 - .../rpc/SessionCommandsListParams.java | 27 - .../rpc/SessionCommandsListResult.java | 28 - ...nCommandsRespondToQueuedCommandParams.java | 31 - ...nCommandsRespondToQueuedCommandResult.java | 27 - .../copilot/generated/rpc/SessionContext.java | 35 - .../generated/rpc/SessionContextHostType.java | 35 - .../generated/rpc/SessionEventLogApi.java | 87 - .../rpc/SessionEventLogReadParams.java | 37 - .../rpc/SessionEventLogReadResult.java | 34 - ...SessionEventLogRegisterInterestParams.java | 29 - ...SessionEventLogRegisterInterestResult.java | 27 - .../SessionEventLogReleaseInterestParams.java | 29 - .../SessionEventLogReleaseInterestResult.java | 27 - .../rpc/SessionEventLogTailParams.java | 27 - .../rpc/SessionEventLogTailResult.java | 27 - .../generated/rpc/SessionExtensionsApi.java | 82 - .../rpc/SessionExtensionsDisableParams.java | 29 - .../rpc/SessionExtensionsDisableResult.java | 24 - .../rpc/SessionExtensionsEnableParams.java | 29 - .../rpc/SessionExtensionsEnableResult.java | 24 - .../rpc/SessionExtensionsListParams.java | 27 - .../rpc/SessionExtensionsListResult.java | 28 - .../rpc/SessionExtensionsReloadParams.java | 27 - .../rpc/SessionExtensionsReloadResult.java | 24 - .../generated/rpc/SessionFleetApi.java | 47 - .../rpc/SessionFleetStartParams.java | 29 - .../rpc/SessionFleetStartResult.java | 27 - .../rpc/SessionFsAppendFileParams.java | 33 - .../copilot/generated/rpc/SessionFsError.java | 29 - .../generated/rpc/SessionFsErrorCode.java | 35 - .../generated/rpc/SessionFsExistsParams.java | 29 - .../generated/rpc/SessionFsExistsResult.java | 27 - .../generated/rpc/SessionFsMkdirParams.java | 33 - .../rpc/SessionFsReadFileParams.java | 29 - .../rpc/SessionFsReadFileResult.java | 29 - .../generated/rpc/SessionFsReaddirParams.java | 29 - .../generated/rpc/SessionFsReaddirResult.java | 30 - .../rpc/SessionFsReaddirWithTypesEntry.java | 29 - .../SessionFsReaddirWithTypesEntryType.java | 35 - .../rpc/SessionFsReaddirWithTypesParams.java | 29 - .../rpc/SessionFsReaddirWithTypesResult.java | 30 - .../generated/rpc/SessionFsRenameParams.java | 31 - .../generated/rpc/SessionFsRmParams.java | 33 - .../rpc/SessionFsSetProviderCapabilities.java | 27 - .../rpc/SessionFsSetProviderConventions.java | 35 - .../rpc/SessionFsSetProviderParams.java | 33 - .../rpc/SessionFsSetProviderResult.java | 27 - .../rpc/SessionFsSqliteExistsParams.java | 27 - .../rpc/SessionFsSqliteExistsResult.java | 27 - .../rpc/SessionFsSqliteQueryParams.java | 34 - .../rpc/SessionFsSqliteQueryResult.java | 37 - .../rpc/SessionFsSqliteQueryType.java | 37 - .../generated/rpc/SessionFsStatParams.java | 29 - .../generated/rpc/SessionFsStatResult.java | 38 - .../rpc/SessionFsWriteFileParams.java | 33 - ...ionHistoryAbortManualCompactionParams.java | 27 - ...ionHistoryAbortManualCompactionResult.java | 27 - .../generated/rpc/SessionHistoryApi.java | 87 - ...storyCancelBackgroundCompactionParams.java | 27 - ...storyCancelBackgroundCompactionResult.java | 27 - .../rpc/SessionHistoryCompactParams.java | 27 - .../rpc/SessionHistoryCompactResult.java | 35 - ...ssionHistorySummarizeForHandoffParams.java | 27 - ...ssionHistorySummarizeForHandoffResult.java | 27 - .../rpc/SessionHistoryTruncateParams.java | 29 - .../rpc/SessionHistoryTruncateResult.java | 27 - .../generated/rpc/SessionInstalledPlugin.java | 39 - .../generated/rpc/SessionInstructionsApi.java | 40 - .../SessionInstructionsGetSourcesParams.java | 27 - .../SessionInstructionsGetSourcesResult.java | 28 - .../generated/rpc/SessionLogLevel.java | 37 - .../generated/rpc/SessionLogParams.java | 39 - .../generated/rpc/SessionLogResult.java | 28 - .../copilot/generated/rpc/SessionLspApi.java | 47 - .../rpc/SessionLspInitializeParams.java | 33 - .../copilot/generated/rpc/SessionMcpApi.java | 144 - .../generated/rpc/SessionMcpAppsApi.java | 117 - .../rpc/SessionMcpAppsCallToolParams.java | 36 - .../rpc/SessionMcpAppsDiagnoseParams.java | 29 - .../rpc/SessionMcpAppsDiagnoseResult.java | 29 - .../SessionMcpAppsGetHostContextParams.java | 27 - .../SessionMcpAppsGetHostContextResult.java | 27 - .../rpc/SessionMcpAppsListToolsParams.java | 31 - .../rpc/SessionMcpAppsListToolsResult.java | 29 - .../rpc/SessionMcpAppsReadResourceParams.java | 31 - .../rpc/SessionMcpAppsReadResourceResult.java | 28 - .../SessionMcpAppsSetHostContextParams.java | 29 - ...ssionMcpCancelSamplingExecutionParams.java | 29 - ...ssionMcpCancelSamplingExecutionResult.java | 27 - .../rpc/SessionMcpDisableParams.java | 29 - .../rpc/SessionMcpDisableResult.java | 24 - .../generated/rpc/SessionMcpEnableParams.java | 29 - .../generated/rpc/SessionMcpEnableResult.java | 24 - .../rpc/SessionMcpExecuteSamplingParams.java | 35 - .../rpc/SessionMcpExecuteSamplingResult.java | 31 - .../generated/rpc/SessionMcpListParams.java | 27 - .../generated/rpc/SessionMcpListResult.java | 28 - .../generated/rpc/SessionMcpOauthApi.java | 47 - .../rpc/SessionMcpOauthLoginParams.java | 35 - .../rpc/SessionMcpOauthLoginResult.java | 27 - .../generated/rpc/SessionMcpReloadParams.java | 27 - .../generated/rpc/SessionMcpReloadResult.java | 24 - .../rpc/SessionMcpRemoveGitHubParams.java | 27 - .../rpc/SessionMcpRemoveGitHubResult.java | 27 - .../rpc/SessionMcpSetEnvValueModeParams.java | 29 - .../rpc/SessionMcpSetEnvValueModeResult.java | 27 - .../generated/rpc/SessionMetadata.java | 45 - .../generated/rpc/SessionMetadataApi.java | 112 - .../rpc/SessionMetadataContextInfoParams.java | 33 - .../rpc/SessionMetadataContextInfoResult.java | 52 - .../SessionMetadataIsProcessingParams.java | 27 - .../SessionMetadataIsProcessingResult.java | 27 - ...nMetadataRecomputeContextTokensParams.java | 29 - ...nMetadataRecomputeContextTokensResult.java | 31 - ...sionMetadataRecordContextChangeParams.java | 29 - ...sionMetadataRecordContextChangeResult.java | 24 - ...sionMetadataSetWorkingDirectoryParams.java | 29 - ...sionMetadataSetWorkingDirectoryResult.java | 27 - .../rpc/SessionMetadataSnapshotParams.java | 27 - .../rpc/SessionMetadataSnapshotResult.java | 79 - .../copilot/generated/rpc/SessionMode.java | 37 - .../copilot/generated/rpc/SessionModeApi.java | 57 - .../generated/rpc/SessionModeGetParams.java | 27 - .../generated/rpc/SessionModeGetResult.java | 49 - .../generated/rpc/SessionModeSetParams.java | 29 - .../generated/rpc/SessionModeSetResult.java | 49 - .../generated/rpc/SessionModelApi.java | 72 - .../rpc/SessionModelGetCurrentParams.java | 27 - .../rpc/SessionModelGetCurrentResult.java | 29 - .../SessionModelSetReasoningEffortParams.java | 29 - .../SessionModelSetReasoningEffortResult.java | 27 - .../rpc/SessionModelSwitchToParams.java | 35 - .../rpc/SessionModelSwitchToResult.java | 27 - .../copilot/generated/rpc/SessionNameApi.java | 72 - .../generated/rpc/SessionNameGetParams.java | 27 - .../generated/rpc/SessionNameGetResult.java | 27 - .../rpc/SessionNameSetAutoParams.java | 29 - .../rpc/SessionNameSetAutoResult.java | 27 - .../generated/rpc/SessionNameSetParams.java | 29 - .../generated/rpc/SessionOptionsApi.java | 47 - .../rpc/SessionOptionsUpdateParams.java | 103 - .../rpc/SessionOptionsUpdateResult.java | 27 - .../generated/rpc/SessionPermissionsApi.java | 180 -- .../SessionPermissionsConfigureParams.java | 40 - .../SessionPermissionsConfigureResult.java | 27 - ...ermissionsFolderTrustAddTrustedParams.java | 29 - ...ermissionsFolderTrustAddTrustedResult.java | 27 - .../rpc/SessionPermissionsFolderTrustApi.java | 62 - ...PermissionsFolderTrustIsTrustedParams.java | 29 - ...PermissionsFolderTrustIsTrustedResult.java | 27 - .../SessionPermissionsGetAllowAllParams.java | 27 - .../SessionPermissionsGetAllowAllResult.java | 27 - ...sHandlePendingPermissionRequestParams.java | 31 - ...sHandlePendingPermissionRequestResult.java | 27 - ...issionsLocationsAddToolApprovalParams.java | 31 - ...issionsLocationsAddToolApprovalResult.java | 27 - .../rpc/SessionPermissionsLocationsApi.java | 77 - ...essionPermissionsLocationsApplyParams.java | 29 - ...essionPermissionsLocationsApplyResult.java | 38 - ...sionPermissionsLocationsResolveParams.java | 29 - ...sionPermissionsLocationsResolveResult.java | 29 - .../SessionPermissionsModifyRulesParams.java | 36 - .../SessionPermissionsModifyRulesResult.java | 27 - ...ionPermissionsNotifyPromptShownParams.java | 29 - ...ionPermissionsNotifyPromptShownResult.java | 27 - .../rpc/SessionPermissionsPathsAddParams.java | 29 - .../rpc/SessionPermissionsPathsAddResult.java | 27 - .../rpc/SessionPermissionsPathsApi.java | 102 - ...sIsPathWithinAllowedDirectoriesParams.java | 29 - ...sIsPathWithinAllowedDirectoriesResult.java | 27 - ...sionsPathsIsPathWithinWorkspaceParams.java | 29 - ...sionsPathsIsPathWithinWorkspaceResult.java | 27 - .../SessionPermissionsPathsListParams.java | 27 - .../SessionPermissionsPathsListResult.java | 30 - ...onPermissionsPathsUpdatePrimaryParams.java | 29 - ...onPermissionsPathsUpdatePrimaryResult.java | 27 - ...ssionPermissionsPendingRequestsParams.java | 27 - ...ssionPermissionsPendingRequestsResult.java | 28 - ...ermissionsResetSessionApprovalsParams.java | 27 - ...ermissionsResetSessionApprovalsResult.java | 27 - .../SessionPermissionsSetAllowAllParams.java | 29 - .../SessionPermissionsSetAllowAllResult.java | 29 - ...SessionPermissionsSetApproveAllParams.java | 31 - ...SessionPermissionsSetApproveAllResult.java | 27 - .../SessionPermissionsSetRequiredParams.java | 29 - .../SessionPermissionsSetRequiredResult.java | 27 - .../rpc/SessionPermissionsUrlsApi.java | 47 - ...missionsUrlsSetUnrestrictedModeParams.java | 29 - ...missionsUrlsSetUnrestrictedModeResult.java | 27 - .../copilot/generated/rpc/SessionPlanApi.java | 67 - .../rpc/SessionPlanDeleteParams.java | 27 - .../rpc/SessionPlanDeleteResult.java | 24 - .../generated/rpc/SessionPlanReadParams.java | 27 - .../generated/rpc/SessionPlanReadResult.java | 31 - .../rpc/SessionPlanUpdateParams.java | 29 - .../rpc/SessionPlanUpdateResult.java | 24 - .../generated/rpc/SessionPluginsApi.java | 40 - .../rpc/SessionPluginsListParams.java | 27 - .../rpc/SessionPluginsListResult.java | 28 - .../generated/rpc/SessionQueueApi.java | 60 - .../rpc/SessionQueueClearParams.java | 27 - .../rpc/SessionQueuePendingItemsParams.java | 27 - .../rpc/SessionQueuePendingItemsResult.java | 30 - .../SessionQueueRemoveMostRecentParams.java | 27 - .../SessionQueueRemoveMostRecentResult.java | 27 - .../generated/rpc/SessionRemoteApi.java | 72 - .../rpc/SessionRemoteDisableParams.java | 27 - .../rpc/SessionRemoteEnableParams.java | 29 - .../rpc/SessionRemoteEnableResult.java | 29 - ...ionRemoteNotifySteerableChangedParams.java | 29 - ...ionRemoteNotifySteerableChangedResult.java | 24 - .../copilot/generated/rpc/SessionRpc.java | 203 -- .../generated/rpc/SessionScheduleApi.java | 57 - .../rpc/SessionScheduleListParams.java | 27 - .../rpc/SessionScheduleListResult.java | 28 - .../rpc/SessionScheduleStopParams.java | 29 - .../rpc/SessionScheduleStopResult.java | 27 - .../generated/rpc/SessionSendParams.java | 55 - .../generated/rpc/SessionSendResult.java | 27 - .../generated/rpc/SessionShellApi.java | 62 - .../generated/rpc/SessionShellExecParams.java | 33 - .../generated/rpc/SessionShellExecResult.java | 27 - .../generated/rpc/SessionShellKillParams.java | 31 - .../generated/rpc/SessionShellKillResult.java | 27 - .../generated/rpc/SessionShutdownParams.java | 31 - .../generated/rpc/SessionSkillsApi.java | 102 - .../rpc/SessionSkillsDisableParams.java | 29 - .../rpc/SessionSkillsDisableResult.java | 24 - .../rpc/SessionSkillsEnableParams.java | 29 - .../rpc/SessionSkillsEnableResult.java | 24 - .../rpc/SessionSkillsEnsureLoadedParams.java | 27 - .../rpc/SessionSkillsGetInvokedParams.java | 27 - .../rpc/SessionSkillsGetInvokedResult.java | 28 - .../rpc/SessionSkillsListParams.java | 27 - .../rpc/SessionSkillsListResult.java | 28 - .../rpc/SessionSkillsReloadParams.java | 27 - .../rpc/SessionSkillsReloadResult.java | 30 - .../generated/rpc/SessionSuspendParams.java | 27 - .../generated/rpc/SessionTasksApi.java | 172 -- .../rpc/SessionTasksCancelParams.java | 29 - .../rpc/SessionTasksCancelResult.java | 27 - ...essionTasksGetCurrentPromotableParams.java | 27 - ...essionTasksGetCurrentPromotableResult.java | 27 - .../rpc/SessionTasksGetProgressParams.java | 29 - .../rpc/SessionTasksGetProgressResult.java | 27 - .../generated/rpc/SessionTasksListParams.java | 27 - .../generated/rpc/SessionTasksListResult.java | 28 - ...TasksPromoteCurrentToBackgroundParams.java | 27 - ...TasksPromoteCurrentToBackgroundResult.java | 27 - ...SessionTasksPromoteToBackgroundParams.java | 29 - ...SessionTasksPromoteToBackgroundResult.java | 27 - .../rpc/SessionTasksRefreshParams.java | 27 - .../rpc/SessionTasksRefreshResult.java | 24 - .../rpc/SessionTasksRemoveParams.java | 29 - .../rpc/SessionTasksRemoveResult.java | 27 - .../rpc/SessionTasksSendMessageParams.java | 33 - .../rpc/SessionTasksSendMessageResult.java | 29 - .../rpc/SessionTasksStartAgentParams.java | 37 - .../rpc/SessionTasksStartAgentResult.java | 27 - .../rpc/SessionTasksWaitForPendingParams.java | 27 - .../rpc/SessionTasksWaitForPendingResult.java | 24 - .../generated/rpc/SessionTelemetryApi.java | 47 - ...ionTelemetrySetFeatureOverridesParams.java | 30 - .../generated/rpc/SessionToolsApi.java | 57 - ...ssionToolsHandlePendingToolCallParams.java | 33 - ...ssionToolsHandlePendingToolCallResult.java | 27 - ...ssionToolsInitializeAndValidateParams.java | 27 - ...ssionToolsInitializeAndValidateResult.java | 24 - .../copilot/generated/rpc/SessionUiApi.java | 147 - .../rpc/SessionUiElicitationParams.java | 31 - .../rpc/SessionUiElicitationResult.java | 30 - ...onUiHandlePendingAutoModeSwitchParams.java | 31 - ...onUiHandlePendingAutoModeSwitchResult.java | 27 - ...ssionUiHandlePendingElicitationParams.java | 31 - ...ssionUiHandlePendingElicitationResult.java | 27 - ...sionUiHandlePendingExitPlanModeParams.java | 31 - ...sionUiHandlePendingExitPlanModeResult.java | 27 - .../SessionUiHandlePendingSamplingParams.java | 31 - .../SessionUiHandlePendingSamplingResult.java | 27 - ...SessionUiHandlePendingUserInputParams.java | 31 - ...SessionUiHandlePendingUserInputResult.java | 27 - ...sterDirectAutoModeSwitchHandlerParams.java | 27 - ...sterDirectAutoModeSwitchHandlerResult.java | 27 - ...sterDirectAutoModeSwitchHandlerParams.java | 29 - ...sterDirectAutoModeSwitchHandlerResult.java | 27 - .../generated/rpc/SessionUsageApi.java | 40 - .../rpc/SessionUsageGetMetricsParams.java | 27 - .../rpc/SessionUsageGetMetricsResult.java | 49 - .../rpc/SessionWorkingDirectoryContext.java | 41 - ...essionWorkingDirectoryContextHostType.java | 35 - .../generated/rpc/SessionWorkspaceApi.java | 66 - .../rpc/SessionWorkspaceCreateFileParams.java | 31 - .../rpc/SessionWorkspaceCreateFileResult.java | 24 - .../rpc/SessionWorkspaceListFilesParams.java | 27 - .../rpc/SessionWorkspaceListFilesResult.java | 28 - .../rpc/SessionWorkspaceReadFileParams.java | 29 - .../rpc/SessionWorkspaceReadFileResult.java | 27 - .../generated/rpc/SessionWorkspacesApi.java | 137 - .../SessionWorkspacesCreateFileParams.java | 31 - .../rpc/SessionWorkspacesDiffParams.java | 29 - .../rpc/SessionWorkspacesDiffResult.java | 36 - .../SessionWorkspacesGetWorkspaceParams.java | 27 - .../SessionWorkspacesGetWorkspaceResult.java | 54 - ...essionWorkspacesListCheckpointsParams.java | 27 - ...essionWorkspacesListCheckpointsResult.java | 28 - .../rpc/SessionWorkspacesListFilesParams.java | 27 - .../rpc/SessionWorkspacesListFilesResult.java | 28 - ...SessionWorkspacesReadCheckpointParams.java | 29 - ...SessionWorkspacesReadCheckpointResult.java | 27 - .../rpc/SessionWorkspacesReadFileParams.java | 29 - .../rpc/SessionWorkspacesReadFileResult.java | 27 - ...SessionWorkspacesSaveLargePasteParams.java | 29 - ...SessionWorkspacesSaveLargePasteResult.java | 39 - .../rpc/SessionsBulkDeleteParams.java | 28 - .../rpc/SessionsBulkDeleteResult.java | 28 - .../rpc/SessionsCheckInUseParams.java | 28 - .../rpc/SessionsCheckInUseResult.java | 28 - .../generated/rpc/SessionsCloseParams.java | 27 - .../generated/rpc/SessionsCloseResult.java | 24 - .../generated/rpc/SessionsConnectParams.java | 27 - .../generated/rpc/SessionsConnectResult.java | 29 - .../rpc/SessionsEnrichMetadataParams.java | 28 - .../rpc/SessionsEnrichMetadataResult.java | 28 - .../rpc/SessionsFindByPrefixParams.java | 27 - .../rpc/SessionsFindByPrefixResult.java | 27 - .../rpc/SessionsFindByTaskIdParams.java | 27 - .../rpc/SessionsFindByTaskIdResult.java | 27 - .../generated/rpc/SessionsForkParams.java | 31 - .../generated/rpc/SessionsForkResult.java | 29 - .../rpc/SessionsGetEventFilePathParams.java | 27 - .../rpc/SessionsGetEventFilePathResult.java | 27 - .../rpc/SessionsGetLastForContextParams.java | 27 - .../rpc/SessionsGetLastForContextResult.java | 27 - ...ionsGetPersistedRemoteSteerableParams.java | 27 - ...ionsGetPersistedRemoteSteerableResult.java | 27 - .../generated/rpc/SessionsGetSizesResult.java | 28 - .../generated/rpc/SessionsListResult.java | 28 - .../SessionsLoadDeferredRepoHooksParams.java | 27 - .../SessionsLoadDeferredRepoHooksResult.java | 30 - .../generated/rpc/SessionsPruneOldParams.java | 34 - .../generated/rpc/SessionsPruneOldResult.java | 36 - .../rpc/SessionsReleaseLockParams.java | 27 - .../rpc/SessionsReleaseLockResult.java | 24 - .../rpc/SessionsReloadPluginHooksParams.java | 29 - .../rpc/SessionsReloadPluginHooksResult.java | 24 - .../generated/rpc/SessionsSaveParams.java | 27 - .../generated/rpc/SessionsSaveResult.java | 24 - .../SessionsSetAdditionalPluginsParams.java | 28 - .../SessionsSetAdditionalPluginsResult.java | 24 - .../generated/rpc/ShellKillSignal.java | 37 - .../copilot/generated/rpc/ShutdownType.java | 35 - .../github/copilot/generated/rpc/Skill.java | 39 - .../copilot/generated/rpc/SkillSource.java | 45 - .../SkillsConfigSetDisabledSkillsParams.java | 28 - .../generated/rpc/SkillsDiscoverParams.java | 30 - .../generated/rpc/SkillsDiscoverResult.java | 28 - .../generated/rpc/SkillsInvokedSkill.java | 36 - .../generated/rpc/SlashCommandInfo.java | 40 - .../generated/rpc/SlashCommandInput.java | 33 - .../rpc/SlashCommandInputCompletion.java | 33 - .../generated/rpc/SlashCommandKind.java | 37 - .../github/copilot/generated/rpc/Tool.java | 36 - .../generated/rpc/ToolsListParams.java | 27 - .../generated/rpc/ToolsListResult.java | 28 - .../rpc/UIAutoModeSwitchResponse.java | 37 - .../generated/rpc/UIElicitationResponse.java | 30 - .../rpc/UIElicitationResponseAction.java | 37 - .../generated/rpc/UIElicitationSchema.java | 33 - .../generated/rpc/UIExitPlanModeAction.java | 39 - .../generated/rpc/UIExitPlanModeResponse.java | 33 - .../rpc/UIHandlePendingSamplingResponse.java | 24 - .../generated/rpc/UIUserInputResponse.java | 29 - .../rpc/UsageMetricsCodeChanges.java | 34 - .../rpc/UsageMetricsModelMetric.java | 34 - .../rpc/UsageMetricsModelMetricRequests.java | 29 - .../UsageMetricsModelMetricTokenDetail.java | 27 - .../rpc/UsageMetricsModelMetricUsage.java | 35 - .../rpc/UsageMetricsTokenDetail.java | 27 - .../rpc/WorkspaceDiffFileChange.java | 35 - .../rpc/WorkspaceDiffFileChangeType.java | 39 - .../generated/rpc/WorkspaceDiffMode.java | 35 - .../rpc/WorkspaceSummaryHostType.java | 35 - .../generated/rpc/WorkspacesCheckpoints.java | 31 - .../WorkspacesWorkspaceDetailsHostType.java | 35 - .../com/github/copilot/CliServerManager.java | 337 --- .../com/github/copilot/ConnectionState.java | 36 - .../com/github/copilot/CopilotClient.java | 1211 -------- .../com/github/copilot/CopilotSession.java | 2035 ------------- .../com/github/copilot/EventErrorHandler.java | 58 - .../com/github/copilot/EventErrorPolicy.java | 67 - .../github/copilot/ExtractedTransforms.java | 30 - .../copilot/InternalExecutorProvider.java | 60 - .../com/github/copilot/JsonRpcClient.java | 361 --- .../com/github/copilot/JsonRpcException.java | 50 - .../github/copilot/LifecycleEventManager.java | 104 - .../com/github/copilot/LoggingHelpers.java | 77 - .../github/copilot/RpcHandlerDispatcher.java | 514 ---- .../github/copilot/SdkProtocolVersion.java | 37 - .../github/copilot/SessionRequestBuilder.java | 350 --- .../com/github/copilot/SystemMessageMode.java | 64 - .../java/com/github/copilot/package-info.java | 57 - .../com/github/copilot/rpc/AgentInfo.java | 89 - .../com/github/copilot/rpc/AgentMode.java | 72 - .../com/github/copilot/rpc/Attachment.java | 39 - .../copilot/rpc/AutoModeSwitchHandler.java | 48 - .../copilot/rpc/AutoModeSwitchInvocation.java | 36 - .../copilot/rpc/AutoModeSwitchRequest.java | 68 - .../copilot/rpc/AutoModeSwitchResponse.java | 40 - .../com/github/copilot/rpc/AzureOptions.java | 54 - .../github/copilot/rpc/BlobAttachment.java | 115 - .../com/github/copilot/rpc/BuiltInTools.java | 37 - .../copilot/rpc/CloudSessionOptions.java | 43 - .../copilot/rpc/CloudSessionRepository.java | 89 - .../github/copilot/rpc/CommandContext.java | 74 - .../github/copilot/rpc/CommandDefinition.java | 98 - .../github/copilot/rpc/CommandHandler.java | 41 - .../copilot/rpc/CommandWireDefinition.java | 58 - .../github/copilot/rpc/CopilotClientMode.java | 45 - .../copilot/rpc/CopilotClientOptions.java | 701 ----- .../copilot/rpc/CreateSessionRequest.java | 650 ----- .../copilot/rpc/CreateSessionResponse.java | 22 - .../github/copilot/rpc/CustomAgentConfig.java | 285 -- .../copilot/rpc/DefaultAgentConfig.java | 59 - .../copilot/rpc/DeleteSessionResponse.java | 25 - .../copilot/rpc/ElicitationContext.java | 112 - .../copilot/rpc/ElicitationHandler.java | 44 - .../github/copilot/rpc/ElicitationParams.java | 58 - .../github/copilot/rpc/ElicitationResult.java | 68 - .../copilot/rpc/ElicitationResultAction.java | 33 - .../github/copilot/rpc/ElicitationSchema.java | 92 - .../copilot/rpc/ExitPlanModeHandler.java | 48 - .../copilot/rpc/ExitPlanModeInvocation.java | 36 - .../copilot/rpc/ExitPlanModeRequest.java | 119 - .../copilot/rpc/ExitPlanModeResult.java | 87 - .../copilot/rpc/GetAuthStatusResponse.java | 94 - .../rpc/GetForegroundSessionResponse.java | 24 - .../copilot/rpc/GetLastSessionIdResponse.java | 13 - .../copilot/rpc/GetMessagesResponse.java | 16 - .../github/copilot/rpc/GetModelsResponse.java | 33 - .../rpc/GetSessionMetadataResponse.java | 19 - .../github/copilot/rpc/GetStatusResponse.java | 49 - .../github/copilot/rpc/HookInvocation.java | 36 - .../copilot/rpc/InfiniteSessionConfig.java | 160 - .../com/github/copilot/rpc/InputOptions.java | 148 - .../com/github/copilot/rpc/JsonRpcError.java | 98 - .../github/copilot/rpc/JsonRpcRequest.java | 111 - .../github/copilot/rpc/JsonRpcResponse.java | 113 - .../copilot/rpc/LargeToolOutputConfig.java | 96 - .../copilot/rpc/ListSessionsResponse.java | 26 - .../copilot/rpc/McpHttpServerConfig.java | 106 - .../github/copilot/rpc/McpServerConfig.java | 88 - .../copilot/rpc/McpStdioServerConfig.java | 155 - .../github/copilot/rpc/MessageAttachment.java | 32 - .../github/copilot/rpc/MessageOptions.java | 226 -- .../com/github/copilot/rpc/ModelBilling.java | 29 - .../github/copilot/rpc/ModelCapabilities.java | 41 - .../rpc/ModelCapabilitiesOverride.java | 297 -- .../com/github/copilot/rpc/ModelInfo.java | 152 - .../com/github/copilot/rpc/ModelLimits.java | 53 - .../com/github/copilot/rpc/ModelPolicy.java | 41 - .../com/github/copilot/rpc/ModelSupports.java | 53 - .../github/copilot/rpc/ModelVisionLimits.java | 55 - .../github/copilot/rpc/PermissionHandler.java | 66 - .../copilot/rpc/PermissionInvocation.java | 40 - .../github/copilot/rpc/PermissionRequest.java | 89 - .../copilot/rpc/PermissionRequestResult.java | 171 -- .../rpc/PermissionRequestResultKind.java | 124 - .../com/github/copilot/rpc/PingResponse.java | 30 - .../rpc/PostToolUseFailureHandler.java | 33 - .../rpc/PostToolUseFailureHookInput.java | 166 -- .../rpc/PostToolUseFailureHookOutput.java | 45 - .../copilot/rpc/PostToolUseHandler.java | 35 - .../copilot/rpc/PostToolUseHookInput.java | 162 -- .../copilot/rpc/PostToolUseHookOutput.java | 26 - .../copilot/rpc/PreMcpToolCallHandler.java | 35 - .../copilot/rpc/PreMcpToolCallHookInput.java | 215 -- .../copilot/rpc/PreMcpToolCallHookOutput.java | 72 - .../github/copilot/rpc/PreToolUseHandler.java | 35 - .../copilot/rpc/PreToolUseHookInput.java | 138 - .../copilot/rpc/PreToolUseHookOutput.java | 84 - .../github/copilot/rpc/ProviderConfig.java | 372 --- .../copilot/rpc/ResumeSessionConfig.java | 1267 -------- .../copilot/rpc/ResumeSessionRequest.java | 665 ----- .../copilot/rpc/ResumeSessionResponse.java | 22 - .../github/copilot/rpc/SectionOverride.java | 138 - .../copilot/rpc/SectionOverrideAction.java | 55 - .../copilot/rpc/SendMessageRequest.java | 123 - .../copilot/rpc/SendMessageResponse.java | 23 - .../copilot/rpc/SessionCapabilities.java | 39 - .../com/github/copilot/rpc/SessionConfig.java | 1391 --------- .../github/copilot/rpc/SessionContext.java | 116 - .../github/copilot/rpc/SessionEndHandler.java | 40 - .../copilot/rpc/SessionEndHookInput.java | 36 - .../copilot/rpc/SessionEndHookOutput.java | 29 - .../com/github/copilot/rpc/SessionHooks.java | 218 -- .../copilot/rpc/SessionLifecycleEvent.java | 53 - .../rpc/SessionLifecycleEventMetadata.java | 18 - .../rpc/SessionLifecycleEventTypes.java | 45 - .../copilot/rpc/SessionLifecycleHandler.java | 25 - .../github/copilot/rpc/SessionListFilter.java | 81 - .../github/copilot/rpc/SessionMetadata.java | 174 -- .../copilot/rpc/SessionStartHandler.java | 40 - .../copilot/rpc/SessionStartHookInput.java | 32 - .../copilot/rpc/SessionStartHookOutput.java | 26 - .../com/github/copilot/rpc/SessionUiApi.java | 86 - .../copilot/rpc/SessionUiCapabilities.java | 96 - .../rpc/SetForegroundSessionRequest.java | 20 - .../rpc/SetForegroundSessionResponse.java | 24 - .../copilot/rpc/SystemMessageConfig.java | 140 - .../copilot/rpc/SystemPromptSections.java | 75 - .../github/copilot/rpc/TelemetryConfig.java | 168 -- .../github/copilot/rpc/ToolBinaryResult.java | 38 - .../github/copilot/rpc/ToolDefinition.java | 136 - .../com/github/copilot/rpc/ToolHandler.java | 57 - .../github/copilot/rpc/ToolInvocation.java | 171 -- .../github/copilot/rpc/ToolResultObject.java | 111 - .../java/com/github/copilot/rpc/ToolSet.java | 122 - .../github/copilot/rpc/UserInputHandler.java | 43 - .../copilot/rpc/UserInputInvocation.java | 36 - .../github/copilot/rpc/UserInputRequest.java | 113 - .../github/copilot/rpc/UserInputResponse.java | 63 - .../rpc/UserPromptSubmittedHandler.java | 43 - .../rpc/UserPromptSubmittedHookInput.java | 31 - .../rpc/UserPromptSubmittedHookOutput.java | 28 - .../com/github/copilot/rpc/package-info.java | 95 - src/main/java/module-info.java | 26 - .../copilot/InternalExecutorProvider.java | 65 - src/site/jacoco-resources/report.css | 299 -- src/site/markdown/advanced.md | 1418 --------- src/site/markdown/cookbook/README.md | 38 - src/site/markdown/cookbook/error-handling.md | 281 -- .../markdown/cookbook/managing-local-files.md | 213 -- .../markdown/cookbook/multiple-sessions.md | 235 -- .../markdown/cookbook/persisting-sessions.md | 293 -- .../markdown/cookbook/pr-visualization.md | 236 -- src/site/markdown/documentation.md | 737 ----- src/site/markdown/getting-started.md | 378 --- src/site/markdown/hooks.md | 475 --- src/site/markdown/index.md | 123 - src/site/markdown/mcp.md | 126 - src/site/markdown/setup.md | 435 --- src/site/resources/css/site.css | 319 -- src/site/resources/image.png | Bin 2245606 -> 0 bytes src/site/resources/images/github-copilot.jpg | Bin 13161 -> 0 bytes src/site/site.xml | 80 - .../com/github/copilot/AgentInfoTest.java | 64 - .../com/github/copilot/AgentModeTest.java | 70 - .../java/com/github/copilot/AskUserTest.java | 167 -- .../java/com/github/copilot/CapiProxy.java | 477 --- .../github/copilot/CliServerManagerTest.java | 275 -- .../copilot/ClosedSessionGuardTest.java | 374 --- .../java/com/github/copilot/CommandsTest.java | 157 - .../com/github/copilot/CompactionTest.java | 177 -- .../com/github/copilot/ConfigCloneTest.java | 423 --- .../github/copilot/CopilotClientModeTest.java | 63 - .../com/github/copilot/CopilotClientTest.java | 536 ---- .../github/copilot/CopilotSessionTest.java | 955 ------ .../copilot/CreateSessionReKeyEntryTest.java | 262 -- .../copilot/DataObjectCoverageTest.java | 290 -- .../copilot/DocumentationSamplesTest.java | 139 - .../com/github/copilot/E2ETestContext.java | 492 ---- .../com/github/copilot/ElicitationTest.java | 191 -- .../com/github/copilot/ErrorHandlingTest.java | 239 -- .../com/github/copilot/EventFidelityTest.java | 111 - .../github/copilot/ExecutorWiringTest.java | 359 --- .../copilot/ForwardCompatibilityTest.java | 98 - .../java/com/github/copilot/HooksTest.java | 226 -- .../copilot/InternalExecutorProviderIT.java | 108 - .../InternalExecutorProviderProbe.java | 74 - .../copilot/InternalExecutorProviderTest.java | 55 - .../copilot/JsonIncludeNonNullTest.java | 159 - .../com/github/copilot/JsonRpcClientTest.java | 457 --- .../copilot/LifecycleEventManagerTest.java | 199 -- .../com/github/copilot/McpAndAgentsTest.java | 475 --- .../github/copilot/MessageAttachmentTest.java | 158 - .../com/github/copilot/MetadataApiTest.java | 275 -- .../com/github/copilot/ModeHandlersTest.java | 151 - .../com/github/copilot/ModelInfoTest.java | 68 - .../github/copilot/ModuleDescriptorTest.java | 27 - .../copilot/OptionalApiAndJacksonTest.java | 635 ---- .../github/copilot/PerSessionAuthTest.java | 145 - .../PermissionRequestResultKindTest.java | 127 - .../copilot/PermissionRequestResultTest.java | 73 - .../com/github/copilot/PermissionsTest.java | 477 --- .../copilot/PreMcpToolCallHookTest.java | 177 -- .../github/copilot/ProviderConfigTest.java | 437 --- .../com/github/copilot/RemoteSessionTest.java | 399 --- .../copilot/RpcHandlerDispatcherTest.java | 593 ---- .../com/github/copilot/RpcWrappersTest.java | 471 --- .../copilot/SchedulerShutdownRaceTest.java | 62 - .../github/copilot/SessionConfigE2ETest.java | 174 -- .../SessionEventDeserializationTest.java | 2561 ----------------- .../copilot/SessionEventHandlingTest.java | 876 ------ .../github/copilot/SessionEventsE2ETest.java | 297 -- .../github/copilot/SessionHandlerTest.java | 392 --- .../copilot/SessionRequestBuilderTest.java | 785 ----- .../java/com/github/copilot/SkillsTest.java | 236 -- .../github/copilot/StreamingFidelityTest.java | 281 -- .../github/copilot/TelemetryConfigTest.java | 77 - .../java/com/github/copilot/TestUtil.java | 115 - .../github/copilot/TimeoutEdgeCaseTest.java | 142 - .../github/copilot/ToolInvocationTest.java | 177 -- .../com/github/copilot/ToolResultsTest.java | 148 - .../java/com/github/copilot/ToolSetTest.java | 100 - .../java/com/github/copilot/ToolsTest.java | 468 --- .../UpdateSessionOptionsForModeTest.java | 260 -- .../copilot/ZeroTimeoutContractTest.java | 57 - .../GeneratedEventTypesCoverageTest.java | 704 ----- .../rpc/GeneratedRpcApiCoverageTest.java | 694 ----- .../rpc/GeneratedRpcRecordsCoverageTest.java | 991 ------- src/test/prompts/PROMPT-smoke-test.md | 135 - src/test/resources/logging-debug.properties | 21 - src/test/resources/logging.properties | 8 - test | 0 1019 files changed, 3 insertions(+), 87475 deletions(-) delete mode 100644 .claude/skills/agentic-merge-reference-impl/SKILL.md delete mode 100644 .claude/skills/commit-as-pull-request/SKILL.md delete mode 100644 .claude/skills/documentation-coverage/SKILL.md delete mode 100644 .github/CODEOWNERS delete mode 100644 .github/ISSUE_TEMPLATE/bug.yml delete mode 100644 .github/ISSUE_TEMPLATE/documentation.yml delete mode 100644 .github/ISSUE_TEMPLATE/feature.yml delete mode 100644 .github/ISSUE_TEMPLATE/maintenance.yml delete mode 100644 .github/actions/setup-copilot/action.yml delete mode 100644 .github/actions/test-report/action.yml delete mode 100644 .github/agents/agentic-workflows.agent.md delete mode 100644 .github/aw/actions-lock.json delete mode 100644 .github/badges/jacoco-generated.svg delete mode 100644 .github/badges/jacoco-handwritten.svg delete mode 100644 .github/badges/jacoco.svg delete mode 100644 .github/copilot-instructions.md delete mode 100644 .github/dependabot.yml delete mode 100644 .github/prompts/agentic-merge-reference-impl.prompt.md delete mode 100644 .github/prompts/coding-agent-merge-reference-impl-instructions.md delete mode 100644 .github/prompts/commit-as-pull-request.prompt.md delete mode 100644 .github/prompts/test-coverage-assessment.prompt.md delete mode 100644 .github/pull_request_template.md delete mode 100644 .github/release.yml delete mode 100755 .github/scripts/build/format-and-test.sh delete mode 100755 .github/scripts/ci/commit-and-push.sh delete mode 100644 .github/scripts/ci/create-issue-assigned-to-copilot.ts delete mode 100755 .github/scripts/ci/parse-repo-info.sh delete mode 100755 .github/scripts/ci/sync-after-merge.sh delete mode 100755 .github/scripts/generate-coverage-badge.sh delete mode 100755 .github/scripts/reference-impl-sync/merge-reference-impl-diff.sh delete mode 100755 .github/scripts/reference-impl-sync/merge-reference-impl-finish.sh delete mode 100755 .github/scripts/reference-impl-sync/merge-reference-impl-start.sh delete mode 100755 .github/scripts/reference-impl-sync/sync-cli-version-from-reference-impl.sh delete mode 100755 .github/scripts/reference-impl-sync/sync-codegen-version.sh delete mode 100755 .github/scripts/release/test-update-changelog.sh delete mode 100755 .github/scripts/release/update-changelog.sh delete mode 100644 .github/skills/agentic-merge-reference-impl/SKILL.md delete mode 100644 .github/skills/commit-as-pull-request/SKILL.md delete mode 100644 .github/workflows/build-test.yml delete mode 100644 .github/workflows/codegen-agentic-fix.lock.yml delete mode 100644 .github/workflows/codegen-agentic-fix.md delete mode 100644 .github/workflows/codegen-check.yml delete mode 100644 .github/workflows/copilot-setup-steps.yml delete mode 100644 .github/workflows/notes.template delete mode 100644 .github/workflows/publish-maven.yml delete mode 100644 .github/workflows/publish-snapshot.yml delete mode 100644 .github/workflows/reference-impl-sync.lock.yml delete mode 100644 .github/workflows/reference-impl-sync.md delete mode 100644 .github/workflows/run-smoke-test.yml delete mode 100644 .github/workflows/update-copilot-dependency.yml delete mode 100644 .mvn/wrapper/maven-wrapper.properties delete mode 100644 .vscode/launch.json delete mode 100644 .vscode/mcp.json delete mode 100644 .vscode/settings.json delete mode 100644 CHANGELOG.md delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md delete mode 100644 LICENSE delete mode 100644 SECURITY.md delete mode 100644 SUPPORT.md delete mode 100644 config/checkstyle/checkstyle.xml delete mode 100644 config/spotbugs/spotbugs-exclude.xml delete mode 100644 docs/CUSTOM_SITE_CSS.md delete mode 100644 docs/WORKFLOWS.md delete mode 100644 docs/adr/adr-001-semver-pre-general-availability.md delete mode 100644 docs/adr/adr-002-maven-version-and-reference-implementation-tracking.md delete mode 100644 instructions/copilot-sdk-java.instructions.md delete mode 100644 jbang-example.java delete mode 100755 mvnw delete mode 100644 mvnw.cmd delete mode 100644 pom.xml delete mode 100644 scripts/codegen/.gitignore delete mode 100644 scripts/codegen/java.ts delete mode 100644 scripts/codegen/package-lock.json delete mode 100644 scripts/codegen/package.json delete mode 100755 scripts/compare-standalone-to-monorepo.sh delete mode 100644 src/generated/java/com/github/copilot/generated/AbortEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/AbortReason.java delete mode 100644 src/generated/java/com/github/copilot/generated/AssistantIntentEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/AssistantMessageDeltaEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/AssistantMessageEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/AssistantMessageStartEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/AssistantMessageToolRequest.java delete mode 100644 src/generated/java/com/github/copilot/generated/AssistantMessageToolRequestType.java delete mode 100644 src/generated/java/com/github/copilot/generated/AssistantReasoningDeltaEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/AssistantReasoningEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/AssistantStreamingDeltaEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/AssistantTurnEndEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/AssistantTurnStartEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/AssistantUsageApiEndpoint.java delete mode 100644 src/generated/java/com/github/copilot/generated/AssistantUsageCopilotUsage.java delete mode 100644 src/generated/java/com/github/copilot/generated/AssistantUsageCopilotUsageTokenDetail.java delete mode 100644 src/generated/java/com/github/copilot/generated/AssistantUsageEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/AssistantUsageQuotaSnapshot.java delete mode 100644 src/generated/java/com/github/copilot/generated/AutoModeSwitchCompletedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/AutoModeSwitchRequestedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/AutoModeSwitchResponse.java delete mode 100644 src/generated/java/com/github/copilot/generated/AutopilotObjectiveChangedOperation.java delete mode 100644 src/generated/java/com/github/copilot/generated/AutopilotObjectiveChangedStatus.java delete mode 100644 src/generated/java/com/github/copilot/generated/CanvasOpenedAvailability.java delete mode 100644 src/generated/java/com/github/copilot/generated/CanvasRegistryChangedCanvas.java delete mode 100644 src/generated/java/com/github/copilot/generated/CanvasRegistryChangedCanvasAction.java delete mode 100644 src/generated/java/com/github/copilot/generated/CapabilitiesChangedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/CapabilitiesChangedUI.java delete mode 100644 src/generated/java/com/github/copilot/generated/CommandCompletedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/CommandExecuteEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/CommandQueuedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/CommandsChangedCommand.java delete mode 100644 src/generated/java/com/github/copilot/generated/CommandsChangedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/CompactionCompleteCompactionTokensUsed.java delete mode 100644 src/generated/java/com/github/copilot/generated/CompactionCompleteCompactionTokensUsedCopilotUsage.java delete mode 100644 src/generated/java/com/github/copilot/generated/CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail.java delete mode 100644 src/generated/java/com/github/copilot/generated/CustomAgentsUpdatedAgent.java delete mode 100644 src/generated/java/com/github/copilot/generated/ElicitationCompletedAction.java delete mode 100644 src/generated/java/com/github/copilot/generated/ElicitationCompletedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/ElicitationRequestedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/ElicitationRequestedMode.java delete mode 100644 src/generated/java/com/github/copilot/generated/ElicitationRequestedSchema.java delete mode 100644 src/generated/java/com/github/copilot/generated/ExitPlanModeAction.java delete mode 100644 src/generated/java/com/github/copilot/generated/ExitPlanModeCompletedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/ExitPlanModeRequestedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/ExtensionsLoadedExtension.java delete mode 100644 src/generated/java/com/github/copilot/generated/ExtensionsLoadedExtensionSource.java delete mode 100644 src/generated/java/com/github/copilot/generated/ExtensionsLoadedExtensionStatus.java delete mode 100644 src/generated/java/com/github/copilot/generated/ExternalToolCompletedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/ExternalToolRequestedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/HandoffRepository.java delete mode 100644 src/generated/java/com/github/copilot/generated/HandoffSourceType.java delete mode 100644 src/generated/java/com/github/copilot/generated/HookEndError.java delete mode 100644 src/generated/java/com/github/copilot/generated/HookEndEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/HookProgressEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/HookStartEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/McpAppToolCallCompleteError.java delete mode 100644 src/generated/java/com/github/copilot/generated/McpAppToolCallCompleteEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/McpAppToolCallCompleteToolMeta.java delete mode 100644 src/generated/java/com/github/copilot/generated/McpAppToolCallCompleteToolMetaUI.java delete mode 100644 src/generated/java/com/github/copilot/generated/McpOauthCompletedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/McpOauthRequiredEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/McpOauthRequiredStaticClientConfig.java delete mode 100644 src/generated/java/com/github/copilot/generated/McpServerSource.java delete mode 100644 src/generated/java/com/github/copilot/generated/McpServerStatus.java delete mode 100644 src/generated/java/com/github/copilot/generated/McpServerStatusChangedStatus.java delete mode 100644 src/generated/java/com/github/copilot/generated/McpServerTransport.java delete mode 100644 src/generated/java/com/github/copilot/generated/McpServersLoadedServer.java delete mode 100644 src/generated/java/com/github/copilot/generated/McpServersLoadedServerStatus.java delete mode 100644 src/generated/java/com/github/copilot/generated/ModelCallFailureEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/ModelCallFailureSource.java delete mode 100644 src/generated/java/com/github/copilot/generated/PendingMessagesModifiedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/PermissionCompletedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/PermissionCompletedKind.java delete mode 100644 src/generated/java/com/github/copilot/generated/PermissionCompletedResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/PermissionRequestedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/PlanChangedOperation.java delete mode 100644 src/generated/java/com/github/copilot/generated/ReasoningSummary.java delete mode 100644 src/generated/java/com/github/copilot/generated/SamplingCompletedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SamplingRequestedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SessionAutopilotObjectiveChangedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SessionBackgroundTasksChangedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SessionCanvasOpenedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SessionCanvasRegistryChangedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SessionCompactionCompleteEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SessionCompactionStartEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SessionContextChangedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SessionCustomAgentsUpdatedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SessionCustomNotificationEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SessionErrorEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SessionEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SessionExtensionsLoadedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SessionHandoffEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SessionIdleEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SessionInfoEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SessionMcpServerStatusChangedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SessionMcpServersLoadedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SessionMode.java delete mode 100644 src/generated/java/com/github/copilot/generated/SessionModeChangedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SessionModelChangeEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SessionPermissionsChangedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SessionPlanChangedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SessionRemoteSteerableChangedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SessionResumeEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SessionScheduleCancelledEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SessionScheduleCreatedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SessionShutdownEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SessionSkillsLoadedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SessionSnapshotRewindEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SessionStartEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SessionTaskCompleteEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SessionTitleChangedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SessionToolsUpdatedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SessionTruncationEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SessionUsageInfoEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SessionWarningEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SessionWorkspaceFileChangedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/ShutdownCodeChanges.java delete mode 100644 src/generated/java/com/github/copilot/generated/ShutdownModelMetric.java delete mode 100644 src/generated/java/com/github/copilot/generated/ShutdownModelMetricRequests.java delete mode 100644 src/generated/java/com/github/copilot/generated/ShutdownModelMetricTokenDetail.java delete mode 100644 src/generated/java/com/github/copilot/generated/ShutdownModelMetricUsage.java delete mode 100644 src/generated/java/com/github/copilot/generated/ShutdownTokenDetail.java delete mode 100644 src/generated/java/com/github/copilot/generated/ShutdownType.java delete mode 100644 src/generated/java/com/github/copilot/generated/SkillInvokedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SkillInvokedTrigger.java delete mode 100644 src/generated/java/com/github/copilot/generated/SkillSource.java delete mode 100644 src/generated/java/com/github/copilot/generated/SkillsLoadedSkill.java delete mode 100644 src/generated/java/com/github/copilot/generated/SubagentCompletedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SubagentDeselectedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SubagentFailedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SubagentSelectedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SubagentStartedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SystemMessageEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/SystemMessageMetadata.java delete mode 100644 src/generated/java/com/github/copilot/generated/SystemMessageRole.java delete mode 100644 src/generated/java/com/github/copilot/generated/SystemNotificationEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/ToolExecutionCompleteError.java delete mode 100644 src/generated/java/com/github/copilot/generated/ToolExecutionCompleteEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/ToolExecutionCompleteResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/ToolExecutionCompleteToolDescription.java delete mode 100644 src/generated/java/com/github/copilot/generated/ToolExecutionCompleteToolDescriptionMeta.java delete mode 100644 src/generated/java/com/github/copilot/generated/ToolExecutionCompleteToolDescriptionMetaUI.java delete mode 100644 src/generated/java/com/github/copilot/generated/ToolExecutionCompleteToolDescriptionMetaUIVisibility.java delete mode 100644 src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResource.java delete mode 100644 src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMeta.java delete mode 100644 src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUI.java delete mode 100644 src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUICsp.java delete mode 100644 src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUIPermissions.java delete mode 100644 src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUIPermissionsCamera.java delete mode 100644 src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite.java delete mode 100644 src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation.java delete mode 100644 src/generated/java/com/github/copilot/generated/ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone.java delete mode 100644 src/generated/java/com/github/copilot/generated/ToolExecutionPartialResultEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/ToolExecutionProgressEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/ToolExecutionStartEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/ToolUserRequestedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/UnknownSessionEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/UserInputCompletedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/UserInputRequestedEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/UserMessageAgentMode.java delete mode 100644 src/generated/java/com/github/copilot/generated/UserMessageEvent.java delete mode 100644 src/generated/java/com/github/copilot/generated/WorkingDirectoryContext.java delete mode 100644 src/generated/java/com/github/copilot/generated/WorkingDirectoryContextHostType.java delete mode 100644 src/generated/java/com/github/copilot/generated/WorkspaceFileChangedOperation.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/AbortReason.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/AccountGetQuotaResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/AccountQuotaSnapshot.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/AgentInfo.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/AgentInfoSource.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/AgentRegistrySpawnParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/AgentRegistrySpawnPermissionMode.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/AuthInfoType.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/CanvasAction.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/CanvasCloseParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/CanvasHostContext.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/CanvasHostContextCapabilities.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/CanvasInstanceAvailability.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/CanvasInvokeActionParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/CanvasOpenParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/CanvasOpenResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/CanvasSessionContext.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ConnectParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ConnectResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ConnectedRemoteSessionMetadata.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ConnectedRemoteSessionMetadataKind.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ConnectedRemoteSessionMetadataRepository.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/DiscoveredCanvas.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/DiscoveredMcpServer.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/DiscoveredMcpServerSource.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/DiscoveredMcpServerType.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/EventsAgentScope.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/EventsCursorStatus.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/Extension.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ExtensionSource.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ExtensionStatus.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/HistoryCompactContextWindow.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/InstalledPlugin.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/InstructionsSources.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/InstructionsSourcesLocation.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/InstructionsSourcesType.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/McpAppsDiagnoseCapability.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/McpAppsDiagnoseServer.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/McpAppsHostContextDetails.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/McpAppsHostContextDetailsAvailableDisplayMode.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/McpAppsHostContextDetailsDisplayMode.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/McpAppsHostContextDetailsPlatform.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/McpAppsHostContextDetailsTheme.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/McpAppsResourceContent.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/McpAppsSetHostContextDetails.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/McpAppsSetHostContextDetailsAvailableDisplayMode.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/McpAppsSetHostContextDetailsDisplayMode.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/McpAppsSetHostContextDetailsPlatform.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/McpAppsSetHostContextDetailsTheme.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/McpConfigAddParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/McpConfigDisableParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/McpConfigEnableParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/McpConfigListResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/McpConfigRemoveParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/McpConfigUpdateParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/McpDiscoverParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/McpDiscoverResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/McpExecuteSamplingRequest.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/McpExecuteSamplingResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/McpSamplingExecutionAction.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/McpServer.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/McpServerSource.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/McpServerStatus.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/McpSetEnvValueModeDetails.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/MetadataSnapshotCurrentMode.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/MetadataSnapshotRemoteMetadata.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/MetadataSnapshotRemoteMetadataRepository.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/MetadataSnapshotRemoteMetadataTaskType.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/Model.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ModelBilling.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ModelBillingTokenPrices.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ModelBillingTokenPricesLongContext.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ModelCapabilities.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ModelCapabilitiesLimits.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ModelCapabilitiesLimitsVision.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ModelCapabilitiesOverride.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ModelCapabilitiesOverrideLimits.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ModelCapabilitiesOverrideLimitsVision.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ModelCapabilitiesOverrideSupports.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ModelCapabilitiesSupports.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ModelPickerCategory.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ModelPickerPriceCategory.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ModelPolicy.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ModelPolicyState.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ModelsListResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/OpenCanvasInstance.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateEnvValueMode.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/OptionsUpdateToolFilterPrecedence.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/PendingPermissionRequest.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/PermissionLocationType.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/PermissionPathsConfig.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/PermissionRule.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/PermissionRulesSet.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/PermissionUrlsConfig.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicy.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicyRule.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicyRuleSource.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/PermissionsConfigureAdditionalContentExclusionPolicyScope.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/PermissionsModifyRulesScope.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/PermissionsSetApproveAllSource.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/PingParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/PingResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/Plugin.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/QueuePendingItems.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/QueuePendingItemsKind.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ReasoningSummary.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/RemoteSessionMode.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/RpcCaller.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/RpcMapper.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ScheduleEntry.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SecretsAddFilterValuesParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SecretsAddFilterValuesResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SendAgentMode.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SendMode.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ServerAccountApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ServerAgentRegistryApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ServerMcpApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ServerMcpConfigApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ServerModelsApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ServerRpc.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ServerSecretsApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ServerSessionFsApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ServerSessionsApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ServerSkill.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ServerSkillsApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ServerSkillsConfigApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ServerToolsApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionAbortParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionAbortResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionAgentApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionAgentDeselectParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionAgentDeselectResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionAgentGetCurrentParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionAgentGetCurrentResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionAgentListParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionAgentListResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionAgentReloadParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionAgentReloadResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionAgentSelectParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionAgentSelectResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionAuthApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionAuthGetStatusParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionAuthGetStatusResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionAuthSetCredentialsParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionAuthSetCredentialsResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionCanvasApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionCanvasCloseParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionCanvasInvokeActionParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionCanvasInvokeActionResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionCanvasListOpenParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionCanvasListOpenResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionCanvasListParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionCanvasListResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionCanvasOpenParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionCanvasOpenResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionCommandsApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionCommandsEnqueueParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionCommandsEnqueueResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionCommandsExecuteParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionCommandsExecuteResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionCommandsHandlePendingCommandParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionCommandsHandlePendingCommandResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionCommandsInvokeParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionCommandsListParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionCommandsListResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionCommandsRespondToQueuedCommandParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionCommandsRespondToQueuedCommandResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionContext.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionContextHostType.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionEventLogApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionEventLogReadParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionEventLogReadResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionEventLogRegisterInterestParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionEventLogRegisterInterestResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionEventLogReleaseInterestParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionEventLogReleaseInterestResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionEventLogTailParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionEventLogTailResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionExtensionsApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionExtensionsDisableParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionExtensionsDisableResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionExtensionsEnableParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionExtensionsEnableResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionExtensionsListParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionExtensionsListResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionExtensionsReloadParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionExtensionsReloadResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionFleetApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionFleetStartParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionFleetStartResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionFsAppendFileParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionFsError.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionFsErrorCode.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionFsExistsParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionFsExistsResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionFsMkdirParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionFsReadFileParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionFsReadFileResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionFsReaddirParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionFsReaddirResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionFsReaddirWithTypesEntry.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionFsReaddirWithTypesEntryType.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionFsReaddirWithTypesParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionFsReaddirWithTypesResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionFsRenameParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionFsRmParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionFsSetProviderCapabilities.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionFsSetProviderConventions.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionFsSetProviderParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionFsSetProviderResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionFsSqliteExistsParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionFsSqliteExistsResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionFsSqliteQueryParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionFsSqliteQueryResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionFsSqliteQueryType.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionFsStatParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionFsStatResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionFsWriteFileParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionHistoryAbortManualCompactionParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionHistoryAbortManualCompactionResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionHistoryApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionHistoryCancelBackgroundCompactionParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionHistoryCancelBackgroundCompactionResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionHistoryCompactParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionHistoryCompactResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionHistorySummarizeForHandoffParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionHistorySummarizeForHandoffResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionHistoryTruncateParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionHistoryTruncateResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionInstalledPlugin.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionInstructionsApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionInstructionsGetSourcesParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionInstructionsGetSourcesResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionLogLevel.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionLogParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionLogResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionLspApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionLspInitializeParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMcpApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMcpAppsApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMcpAppsCallToolParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMcpAppsDiagnoseParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMcpAppsDiagnoseResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMcpAppsGetHostContextParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMcpAppsGetHostContextResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMcpAppsListToolsParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMcpAppsListToolsResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMcpAppsReadResourceParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMcpAppsReadResourceResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMcpAppsSetHostContextParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMcpCancelSamplingExecutionParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMcpCancelSamplingExecutionResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMcpDisableParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMcpDisableResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMcpEnableParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMcpEnableResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMcpExecuteSamplingParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMcpExecuteSamplingResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMcpListParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMcpListResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMcpOauthApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMcpOauthLoginParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMcpOauthLoginResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMcpReloadParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMcpReloadResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMcpRemoveGitHubParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMcpRemoveGitHubResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMcpSetEnvValueModeParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMcpSetEnvValueModeResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMetadata.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMetadataApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMetadataContextInfoParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMetadataContextInfoResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMetadataIsProcessingParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMetadataIsProcessingResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMetadataRecomputeContextTokensParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMetadataRecomputeContextTokensResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMetadataRecordContextChangeParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMetadataRecordContextChangeResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMetadataSetWorkingDirectoryParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMetadataSetWorkingDirectoryResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMetadataSnapshotParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMetadataSnapshotResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionMode.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionModeApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionModeGetParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionModeGetResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionModeSetParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionModeSetResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionModelApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionModelGetCurrentParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionModelGetCurrentResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionModelSetReasoningEffortParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionModelSetReasoningEffortResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionModelSwitchToParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionModelSwitchToResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionNameApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionNameGetParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionNameGetResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionNameSetAutoParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionNameSetAutoResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionNameSetParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionOptionsApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionOptionsUpdateParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionOptionsUpdateResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsConfigureParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsConfigureResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsFolderTrustAddTrustedParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsFolderTrustAddTrustedResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsFolderTrustApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsFolderTrustIsTrustedParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsFolderTrustIsTrustedResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsGetAllowAllParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsGetAllowAllResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsHandlePendingPermissionRequestParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsHandlePendingPermissionRequestResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsLocationsAddToolApprovalParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsLocationsAddToolApprovalResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsLocationsApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsLocationsApplyParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsLocationsApplyResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsLocationsResolveParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsLocationsResolveResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsModifyRulesParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsModifyRulesResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsNotifyPromptShownParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsNotifyPromptShownResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsPathsAddParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsPathsAddResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsPathsApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsPathsIsPathWithinAllowedDirectoriesParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsPathsIsPathWithinAllowedDirectoriesResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsPathsIsPathWithinWorkspaceParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsPathsIsPathWithinWorkspaceResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsPathsListParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsPathsListResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsPathsUpdatePrimaryParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsPathsUpdatePrimaryResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsPendingRequestsParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsPendingRequestsResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsResetSessionApprovalsParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsResetSessionApprovalsResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsSetAllowAllParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsSetAllowAllResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsSetApproveAllParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsSetApproveAllResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsSetRequiredParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsSetRequiredResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsUrlsApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsUrlsSetUnrestrictedModeParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsUrlsSetUnrestrictedModeResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPlanApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPlanDeleteParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPlanDeleteResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPlanReadParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPlanReadResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPlanUpdateParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPlanUpdateResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPluginsApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPluginsListParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionPluginsListResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionQueueApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionQueueClearParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionQueuePendingItemsParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionQueuePendingItemsResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionQueueRemoveMostRecentParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionQueueRemoveMostRecentResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionRemoteApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionRemoteDisableParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionRemoteEnableParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionRemoteEnableResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionRemoteNotifySteerableChangedParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionRemoteNotifySteerableChangedResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionRpc.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionScheduleApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionScheduleListParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionScheduleListResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionScheduleStopParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionScheduleStopResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionSendParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionSendResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionShellApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionShellExecParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionShellExecResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionShellKillParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionShellKillResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionShutdownParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionSkillsApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionSkillsDisableParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionSkillsDisableResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionSkillsEnableParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionSkillsEnableResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionSkillsEnsureLoadedParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionSkillsGetInvokedParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionSkillsGetInvokedResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionSkillsListParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionSkillsListResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionSkillsReloadParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionSkillsReloadResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionSuspendParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionTasksApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionTasksCancelParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionTasksCancelResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionTasksGetCurrentPromotableParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionTasksGetCurrentPromotableResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionTasksGetProgressParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionTasksGetProgressResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionTasksListParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionTasksListResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionTasksPromoteCurrentToBackgroundParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionTasksPromoteCurrentToBackgroundResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionTasksPromoteToBackgroundParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionTasksPromoteToBackgroundResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionTasksRefreshParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionTasksRefreshResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionTasksRemoveParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionTasksRemoveResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionTasksSendMessageParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionTasksSendMessageResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionTasksStartAgentParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionTasksStartAgentResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionTasksWaitForPendingParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionTasksWaitForPendingResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionTelemetryApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionTelemetrySetFeatureOverridesParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionToolsApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionToolsHandlePendingToolCallParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionToolsHandlePendingToolCallResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionToolsInitializeAndValidateParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionToolsInitializeAndValidateResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionUiApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionUiElicitationParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionUiElicitationResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionUiHandlePendingAutoModeSwitchParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionUiHandlePendingAutoModeSwitchResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionUiHandlePendingElicitationParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionUiHandlePendingElicitationResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionUiHandlePendingExitPlanModeParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionUiHandlePendingExitPlanModeResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionUiHandlePendingSamplingParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionUiHandlePendingSamplingResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionUiHandlePendingUserInputParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionUiHandlePendingUserInputResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionUiRegisterDirectAutoModeSwitchHandlerParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionUiRegisterDirectAutoModeSwitchHandlerResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionUiUnregisterDirectAutoModeSwitchHandlerParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionUiUnregisterDirectAutoModeSwitchHandlerResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionUsageApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionUsageGetMetricsParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionUsageGetMetricsResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionWorkingDirectoryContext.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionWorkingDirectoryContextHostType.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionWorkspaceApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionWorkspaceCreateFileParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionWorkspaceCreateFileResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionWorkspaceListFilesParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionWorkspaceListFilesResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionWorkspaceReadFileParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionWorkspaceReadFileResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionWorkspacesApi.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionWorkspacesCreateFileParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionWorkspacesDiffParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionWorkspacesDiffResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionWorkspacesGetWorkspaceParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionWorkspacesGetWorkspaceResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionWorkspacesListCheckpointsParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionWorkspacesListCheckpointsResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionWorkspacesListFilesParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionWorkspacesListFilesResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionWorkspacesReadCheckpointParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionWorkspacesReadCheckpointResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionWorkspacesReadFileParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionWorkspacesReadFileResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionWorkspacesSaveLargePasteParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionWorkspacesSaveLargePasteResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionsBulkDeleteParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionsBulkDeleteResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionsCheckInUseParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionsCheckInUseResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionsCloseParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionsCloseResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionsConnectParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionsConnectResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionsEnrichMetadataParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionsEnrichMetadataResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionsFindByPrefixParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionsFindByPrefixResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionsFindByTaskIdParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionsFindByTaskIdResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionsForkParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionsForkResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionsGetEventFilePathParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionsGetEventFilePathResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionsGetLastForContextParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionsGetLastForContextResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionsGetPersistedRemoteSteerableParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionsGetPersistedRemoteSteerableResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionsGetSizesResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionsListResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionsLoadDeferredRepoHooksParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionsLoadDeferredRepoHooksResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionsPruneOldParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionsPruneOldResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionsReleaseLockParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionsReleaseLockResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionsReloadPluginHooksParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionsReloadPluginHooksResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionsSaveParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionsSaveResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionsSetAdditionalPluginsParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SessionsSetAdditionalPluginsResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ShellKillSignal.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ShutdownType.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/Skill.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SkillSource.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SkillsConfigSetDisabledSkillsParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SkillsDiscoverParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SkillsDiscoverResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SkillsInvokedSkill.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SlashCommandInfo.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SlashCommandInput.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SlashCommandInputCompletion.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/SlashCommandKind.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/Tool.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ToolsListParams.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/ToolsListResult.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/UIAutoModeSwitchResponse.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/UIElicitationResponse.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/UIElicitationResponseAction.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/UIElicitationSchema.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/UIExitPlanModeAction.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/UIExitPlanModeResponse.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/UIHandlePendingSamplingResponse.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/UIUserInputResponse.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/UsageMetricsCodeChanges.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/UsageMetricsModelMetric.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/UsageMetricsModelMetricRequests.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/UsageMetricsModelMetricTokenDetail.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/UsageMetricsModelMetricUsage.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/UsageMetricsTokenDetail.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/WorkspaceDiffFileChange.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/WorkspaceDiffFileChangeType.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/WorkspaceDiffMode.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/WorkspaceSummaryHostType.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/WorkspacesCheckpoints.java delete mode 100644 src/generated/java/com/github/copilot/generated/rpc/WorkspacesWorkspaceDetailsHostType.java delete mode 100644 src/main/java/com/github/copilot/CliServerManager.java delete mode 100644 src/main/java/com/github/copilot/ConnectionState.java delete mode 100644 src/main/java/com/github/copilot/CopilotClient.java delete mode 100644 src/main/java/com/github/copilot/CopilotSession.java delete mode 100644 src/main/java/com/github/copilot/EventErrorHandler.java delete mode 100644 src/main/java/com/github/copilot/EventErrorPolicy.java delete mode 100644 src/main/java/com/github/copilot/ExtractedTransforms.java delete mode 100644 src/main/java/com/github/copilot/InternalExecutorProvider.java delete mode 100644 src/main/java/com/github/copilot/JsonRpcClient.java delete mode 100644 src/main/java/com/github/copilot/JsonRpcException.java delete mode 100644 src/main/java/com/github/copilot/LifecycleEventManager.java delete mode 100644 src/main/java/com/github/copilot/LoggingHelpers.java delete mode 100644 src/main/java/com/github/copilot/RpcHandlerDispatcher.java delete mode 100644 src/main/java/com/github/copilot/SdkProtocolVersion.java delete mode 100644 src/main/java/com/github/copilot/SessionRequestBuilder.java delete mode 100644 src/main/java/com/github/copilot/SystemMessageMode.java delete mode 100644 src/main/java/com/github/copilot/package-info.java delete mode 100644 src/main/java/com/github/copilot/rpc/AgentInfo.java delete mode 100644 src/main/java/com/github/copilot/rpc/AgentMode.java delete mode 100644 src/main/java/com/github/copilot/rpc/Attachment.java delete mode 100644 src/main/java/com/github/copilot/rpc/AutoModeSwitchHandler.java delete mode 100644 src/main/java/com/github/copilot/rpc/AutoModeSwitchInvocation.java delete mode 100644 src/main/java/com/github/copilot/rpc/AutoModeSwitchRequest.java delete mode 100644 src/main/java/com/github/copilot/rpc/AutoModeSwitchResponse.java delete mode 100644 src/main/java/com/github/copilot/rpc/AzureOptions.java delete mode 100644 src/main/java/com/github/copilot/rpc/BlobAttachment.java delete mode 100644 src/main/java/com/github/copilot/rpc/BuiltInTools.java delete mode 100644 src/main/java/com/github/copilot/rpc/CloudSessionOptions.java delete mode 100644 src/main/java/com/github/copilot/rpc/CloudSessionRepository.java delete mode 100644 src/main/java/com/github/copilot/rpc/CommandContext.java delete mode 100644 src/main/java/com/github/copilot/rpc/CommandDefinition.java delete mode 100644 src/main/java/com/github/copilot/rpc/CommandHandler.java delete mode 100644 src/main/java/com/github/copilot/rpc/CommandWireDefinition.java delete mode 100644 src/main/java/com/github/copilot/rpc/CopilotClientMode.java delete mode 100644 src/main/java/com/github/copilot/rpc/CopilotClientOptions.java delete mode 100644 src/main/java/com/github/copilot/rpc/CreateSessionRequest.java delete mode 100644 src/main/java/com/github/copilot/rpc/CreateSessionResponse.java delete mode 100644 src/main/java/com/github/copilot/rpc/CustomAgentConfig.java delete mode 100644 src/main/java/com/github/copilot/rpc/DefaultAgentConfig.java delete mode 100644 src/main/java/com/github/copilot/rpc/DeleteSessionResponse.java delete mode 100644 src/main/java/com/github/copilot/rpc/ElicitationContext.java delete mode 100644 src/main/java/com/github/copilot/rpc/ElicitationHandler.java delete mode 100644 src/main/java/com/github/copilot/rpc/ElicitationParams.java delete mode 100644 src/main/java/com/github/copilot/rpc/ElicitationResult.java delete mode 100644 src/main/java/com/github/copilot/rpc/ElicitationResultAction.java delete mode 100644 src/main/java/com/github/copilot/rpc/ElicitationSchema.java delete mode 100644 src/main/java/com/github/copilot/rpc/ExitPlanModeHandler.java delete mode 100644 src/main/java/com/github/copilot/rpc/ExitPlanModeInvocation.java delete mode 100644 src/main/java/com/github/copilot/rpc/ExitPlanModeRequest.java delete mode 100644 src/main/java/com/github/copilot/rpc/ExitPlanModeResult.java delete mode 100644 src/main/java/com/github/copilot/rpc/GetAuthStatusResponse.java delete mode 100644 src/main/java/com/github/copilot/rpc/GetForegroundSessionResponse.java delete mode 100644 src/main/java/com/github/copilot/rpc/GetLastSessionIdResponse.java delete mode 100644 src/main/java/com/github/copilot/rpc/GetMessagesResponse.java delete mode 100644 src/main/java/com/github/copilot/rpc/GetModelsResponse.java delete mode 100644 src/main/java/com/github/copilot/rpc/GetSessionMetadataResponse.java delete mode 100644 src/main/java/com/github/copilot/rpc/GetStatusResponse.java delete mode 100644 src/main/java/com/github/copilot/rpc/HookInvocation.java delete mode 100644 src/main/java/com/github/copilot/rpc/InfiniteSessionConfig.java delete mode 100644 src/main/java/com/github/copilot/rpc/InputOptions.java delete mode 100644 src/main/java/com/github/copilot/rpc/JsonRpcError.java delete mode 100644 src/main/java/com/github/copilot/rpc/JsonRpcRequest.java delete mode 100644 src/main/java/com/github/copilot/rpc/JsonRpcResponse.java delete mode 100644 src/main/java/com/github/copilot/rpc/LargeToolOutputConfig.java delete mode 100644 src/main/java/com/github/copilot/rpc/ListSessionsResponse.java delete mode 100644 src/main/java/com/github/copilot/rpc/McpHttpServerConfig.java delete mode 100644 src/main/java/com/github/copilot/rpc/McpServerConfig.java delete mode 100644 src/main/java/com/github/copilot/rpc/McpStdioServerConfig.java delete mode 100644 src/main/java/com/github/copilot/rpc/MessageAttachment.java delete mode 100644 src/main/java/com/github/copilot/rpc/MessageOptions.java delete mode 100644 src/main/java/com/github/copilot/rpc/ModelBilling.java delete mode 100644 src/main/java/com/github/copilot/rpc/ModelCapabilities.java delete mode 100644 src/main/java/com/github/copilot/rpc/ModelCapabilitiesOverride.java delete mode 100644 src/main/java/com/github/copilot/rpc/ModelInfo.java delete mode 100644 src/main/java/com/github/copilot/rpc/ModelLimits.java delete mode 100644 src/main/java/com/github/copilot/rpc/ModelPolicy.java delete mode 100644 src/main/java/com/github/copilot/rpc/ModelSupports.java delete mode 100644 src/main/java/com/github/copilot/rpc/ModelVisionLimits.java delete mode 100644 src/main/java/com/github/copilot/rpc/PermissionHandler.java delete mode 100644 src/main/java/com/github/copilot/rpc/PermissionInvocation.java delete mode 100644 src/main/java/com/github/copilot/rpc/PermissionRequest.java delete mode 100644 src/main/java/com/github/copilot/rpc/PermissionRequestResult.java delete mode 100644 src/main/java/com/github/copilot/rpc/PermissionRequestResultKind.java delete mode 100644 src/main/java/com/github/copilot/rpc/PingResponse.java delete mode 100644 src/main/java/com/github/copilot/rpc/PostToolUseFailureHandler.java delete mode 100644 src/main/java/com/github/copilot/rpc/PostToolUseFailureHookInput.java delete mode 100644 src/main/java/com/github/copilot/rpc/PostToolUseFailureHookOutput.java delete mode 100644 src/main/java/com/github/copilot/rpc/PostToolUseHandler.java delete mode 100644 src/main/java/com/github/copilot/rpc/PostToolUseHookInput.java delete mode 100644 src/main/java/com/github/copilot/rpc/PostToolUseHookOutput.java delete mode 100644 src/main/java/com/github/copilot/rpc/PreMcpToolCallHandler.java delete mode 100644 src/main/java/com/github/copilot/rpc/PreMcpToolCallHookInput.java delete mode 100644 src/main/java/com/github/copilot/rpc/PreMcpToolCallHookOutput.java delete mode 100644 src/main/java/com/github/copilot/rpc/PreToolUseHandler.java delete mode 100644 src/main/java/com/github/copilot/rpc/PreToolUseHookInput.java delete mode 100644 src/main/java/com/github/copilot/rpc/PreToolUseHookOutput.java delete mode 100644 src/main/java/com/github/copilot/rpc/ProviderConfig.java delete mode 100644 src/main/java/com/github/copilot/rpc/ResumeSessionConfig.java delete mode 100644 src/main/java/com/github/copilot/rpc/ResumeSessionRequest.java delete mode 100644 src/main/java/com/github/copilot/rpc/ResumeSessionResponse.java delete mode 100644 src/main/java/com/github/copilot/rpc/SectionOverride.java delete mode 100644 src/main/java/com/github/copilot/rpc/SectionOverrideAction.java delete mode 100644 src/main/java/com/github/copilot/rpc/SendMessageRequest.java delete mode 100644 src/main/java/com/github/copilot/rpc/SendMessageResponse.java delete mode 100644 src/main/java/com/github/copilot/rpc/SessionCapabilities.java delete mode 100644 src/main/java/com/github/copilot/rpc/SessionConfig.java delete mode 100644 src/main/java/com/github/copilot/rpc/SessionContext.java delete mode 100644 src/main/java/com/github/copilot/rpc/SessionEndHandler.java delete mode 100644 src/main/java/com/github/copilot/rpc/SessionEndHookInput.java delete mode 100644 src/main/java/com/github/copilot/rpc/SessionEndHookOutput.java delete mode 100644 src/main/java/com/github/copilot/rpc/SessionHooks.java delete mode 100644 src/main/java/com/github/copilot/rpc/SessionLifecycleEvent.java delete mode 100644 src/main/java/com/github/copilot/rpc/SessionLifecycleEventMetadata.java delete mode 100644 src/main/java/com/github/copilot/rpc/SessionLifecycleEventTypes.java delete mode 100644 src/main/java/com/github/copilot/rpc/SessionLifecycleHandler.java delete mode 100644 src/main/java/com/github/copilot/rpc/SessionListFilter.java delete mode 100644 src/main/java/com/github/copilot/rpc/SessionMetadata.java delete mode 100644 src/main/java/com/github/copilot/rpc/SessionStartHandler.java delete mode 100644 src/main/java/com/github/copilot/rpc/SessionStartHookInput.java delete mode 100644 src/main/java/com/github/copilot/rpc/SessionStartHookOutput.java delete mode 100644 src/main/java/com/github/copilot/rpc/SessionUiApi.java delete mode 100644 src/main/java/com/github/copilot/rpc/SessionUiCapabilities.java delete mode 100644 src/main/java/com/github/copilot/rpc/SetForegroundSessionRequest.java delete mode 100644 src/main/java/com/github/copilot/rpc/SetForegroundSessionResponse.java delete mode 100644 src/main/java/com/github/copilot/rpc/SystemMessageConfig.java delete mode 100644 src/main/java/com/github/copilot/rpc/SystemPromptSections.java delete mode 100644 src/main/java/com/github/copilot/rpc/TelemetryConfig.java delete mode 100644 src/main/java/com/github/copilot/rpc/ToolBinaryResult.java delete mode 100644 src/main/java/com/github/copilot/rpc/ToolDefinition.java delete mode 100644 src/main/java/com/github/copilot/rpc/ToolHandler.java delete mode 100644 src/main/java/com/github/copilot/rpc/ToolInvocation.java delete mode 100644 src/main/java/com/github/copilot/rpc/ToolResultObject.java delete mode 100644 src/main/java/com/github/copilot/rpc/ToolSet.java delete mode 100644 src/main/java/com/github/copilot/rpc/UserInputHandler.java delete mode 100644 src/main/java/com/github/copilot/rpc/UserInputInvocation.java delete mode 100644 src/main/java/com/github/copilot/rpc/UserInputRequest.java delete mode 100644 src/main/java/com/github/copilot/rpc/UserInputResponse.java delete mode 100644 src/main/java/com/github/copilot/rpc/UserPromptSubmittedHandler.java delete mode 100644 src/main/java/com/github/copilot/rpc/UserPromptSubmittedHookInput.java delete mode 100644 src/main/java/com/github/copilot/rpc/UserPromptSubmittedHookOutput.java delete mode 100644 src/main/java/com/github/copilot/rpc/package-info.java delete mode 100644 src/main/java/module-info.java delete mode 100644 src/main/java25/com/github/copilot/InternalExecutorProvider.java delete mode 100644 src/site/jacoco-resources/report.css delete mode 100644 src/site/markdown/advanced.md delete mode 100644 src/site/markdown/cookbook/README.md delete mode 100644 src/site/markdown/cookbook/error-handling.md delete mode 100644 src/site/markdown/cookbook/managing-local-files.md delete mode 100644 src/site/markdown/cookbook/multiple-sessions.md delete mode 100644 src/site/markdown/cookbook/persisting-sessions.md delete mode 100644 src/site/markdown/cookbook/pr-visualization.md delete mode 100644 src/site/markdown/documentation.md delete mode 100644 src/site/markdown/getting-started.md delete mode 100644 src/site/markdown/hooks.md delete mode 100644 src/site/markdown/index.md delete mode 100644 src/site/markdown/mcp.md delete mode 100644 src/site/markdown/setup.md delete mode 100644 src/site/resources/css/site.css delete mode 100644 src/site/resources/image.png delete mode 100644 src/site/resources/images/github-copilot.jpg delete mode 100644 src/site/site.xml delete mode 100644 src/test/java/com/github/copilot/AgentInfoTest.java delete mode 100644 src/test/java/com/github/copilot/AgentModeTest.java delete mode 100644 src/test/java/com/github/copilot/AskUserTest.java delete mode 100644 src/test/java/com/github/copilot/CapiProxy.java delete mode 100644 src/test/java/com/github/copilot/CliServerManagerTest.java delete mode 100644 src/test/java/com/github/copilot/ClosedSessionGuardTest.java delete mode 100644 src/test/java/com/github/copilot/CommandsTest.java delete mode 100644 src/test/java/com/github/copilot/CompactionTest.java delete mode 100644 src/test/java/com/github/copilot/ConfigCloneTest.java delete mode 100644 src/test/java/com/github/copilot/CopilotClientModeTest.java delete mode 100644 src/test/java/com/github/copilot/CopilotClientTest.java delete mode 100644 src/test/java/com/github/copilot/CopilotSessionTest.java delete mode 100644 src/test/java/com/github/copilot/CreateSessionReKeyEntryTest.java delete mode 100644 src/test/java/com/github/copilot/DataObjectCoverageTest.java delete mode 100644 src/test/java/com/github/copilot/DocumentationSamplesTest.java delete mode 100644 src/test/java/com/github/copilot/E2ETestContext.java delete mode 100644 src/test/java/com/github/copilot/ElicitationTest.java delete mode 100644 src/test/java/com/github/copilot/ErrorHandlingTest.java delete mode 100644 src/test/java/com/github/copilot/EventFidelityTest.java delete mode 100644 src/test/java/com/github/copilot/ExecutorWiringTest.java delete mode 100644 src/test/java/com/github/copilot/ForwardCompatibilityTest.java delete mode 100644 src/test/java/com/github/copilot/HooksTest.java delete mode 100644 src/test/java/com/github/copilot/InternalExecutorProviderIT.java delete mode 100644 src/test/java/com/github/copilot/InternalExecutorProviderProbe.java delete mode 100644 src/test/java/com/github/copilot/InternalExecutorProviderTest.java delete mode 100644 src/test/java/com/github/copilot/JsonIncludeNonNullTest.java delete mode 100644 src/test/java/com/github/copilot/JsonRpcClientTest.java delete mode 100644 src/test/java/com/github/copilot/LifecycleEventManagerTest.java delete mode 100644 src/test/java/com/github/copilot/McpAndAgentsTest.java delete mode 100644 src/test/java/com/github/copilot/MessageAttachmentTest.java delete mode 100644 src/test/java/com/github/copilot/MetadataApiTest.java delete mode 100644 src/test/java/com/github/copilot/ModeHandlersTest.java delete mode 100644 src/test/java/com/github/copilot/ModelInfoTest.java delete mode 100644 src/test/java/com/github/copilot/ModuleDescriptorTest.java delete mode 100644 src/test/java/com/github/copilot/OptionalApiAndJacksonTest.java delete mode 100644 src/test/java/com/github/copilot/PerSessionAuthTest.java delete mode 100644 src/test/java/com/github/copilot/PermissionRequestResultKindTest.java delete mode 100644 src/test/java/com/github/copilot/PermissionRequestResultTest.java delete mode 100644 src/test/java/com/github/copilot/PermissionsTest.java delete mode 100644 src/test/java/com/github/copilot/PreMcpToolCallHookTest.java delete mode 100644 src/test/java/com/github/copilot/ProviderConfigTest.java delete mode 100644 src/test/java/com/github/copilot/RemoteSessionTest.java delete mode 100644 src/test/java/com/github/copilot/RpcHandlerDispatcherTest.java delete mode 100644 src/test/java/com/github/copilot/RpcWrappersTest.java delete mode 100644 src/test/java/com/github/copilot/SchedulerShutdownRaceTest.java delete mode 100644 src/test/java/com/github/copilot/SessionConfigE2ETest.java delete mode 100644 src/test/java/com/github/copilot/SessionEventDeserializationTest.java delete mode 100644 src/test/java/com/github/copilot/SessionEventHandlingTest.java delete mode 100644 src/test/java/com/github/copilot/SessionEventsE2ETest.java delete mode 100644 src/test/java/com/github/copilot/SessionHandlerTest.java delete mode 100644 src/test/java/com/github/copilot/SessionRequestBuilderTest.java delete mode 100644 src/test/java/com/github/copilot/SkillsTest.java delete mode 100644 src/test/java/com/github/copilot/StreamingFidelityTest.java delete mode 100644 src/test/java/com/github/copilot/TelemetryConfigTest.java delete mode 100644 src/test/java/com/github/copilot/TestUtil.java delete mode 100644 src/test/java/com/github/copilot/TimeoutEdgeCaseTest.java delete mode 100644 src/test/java/com/github/copilot/ToolInvocationTest.java delete mode 100644 src/test/java/com/github/copilot/ToolResultsTest.java delete mode 100644 src/test/java/com/github/copilot/ToolSetTest.java delete mode 100644 src/test/java/com/github/copilot/ToolsTest.java delete mode 100644 src/test/java/com/github/copilot/UpdateSessionOptionsForModeTest.java delete mode 100644 src/test/java/com/github/copilot/ZeroTimeoutContractTest.java delete mode 100644 src/test/java/com/github/copilot/generated/GeneratedEventTypesCoverageTest.java delete mode 100644 src/test/java/com/github/copilot/generated/rpc/GeneratedRpcApiCoverageTest.java delete mode 100644 src/test/java/com/github/copilot/generated/rpc/GeneratedRpcRecordsCoverageTest.java delete mode 100644 src/test/prompts/PROMPT-smoke-test.md delete mode 100644 src/test/resources/logging-debug.properties delete mode 100644 src/test/resources/logging.properties delete mode 100644 test diff --git a/.claude/skills/agentic-merge-reference-impl/SKILL.md b/.claude/skills/agentic-merge-reference-impl/SKILL.md deleted file mode 100644 index 421ea147b2..0000000000 --- a/.claude/skills/agentic-merge-reference-impl/SKILL.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -name: agentic-merge-reference-impl -description: Merge reference implementation changes from the official Copilot SDK into this Java SDK. -license: MIT ---- - -Follow instructions in the [agentic-merge-reference-impl prompt](../../../.github/prompts/agentic-merge-reference-impl.prompt.md) to merge reference implementation changes from the official Copilot SDK into this Java SDK. diff --git a/.claude/skills/commit-as-pull-request/SKILL.md b/.claude/skills/commit-as-pull-request/SKILL.md deleted file mode 100644 index 23aef57142..0000000000 --- a/.claude/skills/commit-as-pull-request/SKILL.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -name: commit-as-pull-request -description: Commit current changes as a pull request — creates a branch, pushes, opens a PR, squash-merges, and syncs local main. -license: MIT ---- - -Follow instructions in the [commit-as-pull-request prompt](../../../.github/prompts/commit-as-pull-request.prompt.md) to take the current uncommitted changes, create a feature branch, push it, open a pull request, squash-merge it into main, and sync the local repository. diff --git a/.claude/skills/documentation-coverage/SKILL.md b/.claude/skills/documentation-coverage/SKILL.md deleted file mode 100644 index 562f4e29c6..0000000000 --- a/.claude/skills/documentation-coverage/SKILL.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -name: documentation-coverage -description: Assess whether the documentation in src/site/markdown/ adequately covers the Java SDK functionality. -license: MIT ---- - -Follow instructions in the [documentation-coverage prompt](../../../.github/prompts/documentation-coverage.prompt.md) to analyze gaps between the SDK's implemented features and its documentation. diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index c6959d3089..0000000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1 +0,0 @@ -* @github/copilot-sdk diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml deleted file mode 100644 index 9e5a9238f1..0000000000 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Bug -description: File a bug report -title: "[BUG]: " -labels: ["Type: Bug", "Status: Triage"] -body: - - type: markdown - attributes: - value: | - Thanks for taking the time to fill out this bug report! - - type: textarea - id: what-happened - attributes: - label: What happened? - description: What did you do? What happened? What did you expect to happen? - placeholder: Put your description of the bug here. - validations: - required: true - - type: textarea - id: versions - attributes: - label: Versions - description: What versions of the relevant software are you running? - placeholder: copilot-sdk-java v1.0.0, Java 17.0.10, Maven 3.9.6, Copilot CLI v1.0.0 - validations: - required: true - - type: textarea - id: logs - attributes: - label: Relevant log output - description: | - Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. - Please check your logs before submission to ensure sensitive information is redacted. - render: shell - - type: checkboxes - id: terms - attributes: - label: Code of Conduct - description: By submitting this issue, you agree to follow our [Code of Conduct](CODE_OF_CONDUCT.md) - options: - - label: I agree to follow this project's Code of Conduct - required: true diff --git a/.github/ISSUE_TEMPLATE/documentation.yml b/.github/ISSUE_TEMPLATE/documentation.yml deleted file mode 100644 index 7f049a2ed6..0000000000 --- a/.github/ISSUE_TEMPLATE/documentation.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Documentation -description: Update or add documentation -title: "[DOCS]: " -labels: ["Type: Documentation", "Status: Triage"] -body: - - type: markdown - attributes: - value: | - Thanks for taking the time to fill this out! - - type: textarea - id: describe-need - attributes: - label: Describe the need - description: What do you wish was different about our docs? - placeholder: Describe the need for documentation updates here. - validations: - required: true - - type: input - id: sdk_version - attributes: - label: SDK Version - description: Do these docs apply to a specific SDK version? - placeholder: copilot-sdk-java v1.0.0 - validations: - required: false - - type: textarea - id: logs - attributes: - label: Relevant log output - description: | - Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. - Please check your logs before submission to ensure sensitive information is redacted. - render: shell - - type: checkboxes - id: terms - attributes: - label: Code of Conduct - description: By submitting this issue, you agree to follow our [Code of Conduct](CODE_OF_CONDUCT.md) - options: - - label: I agree to follow this project's Code of Conduct - required: true diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml deleted file mode 100644 index 377cd12ab8..0000000000 --- a/.github/ISSUE_TEMPLATE/feature.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Feature -description: Suggest an idea for a new feature or enhancement -title: "[FEAT]: " -labels: ["Type: Feature", "Status: Triage"] -body: - - type: markdown - attributes: - value: | - Thanks for taking the time to fill this out! - - type: textarea - id: describe-need - attributes: - label: Describe the need - description: What do you want to happen? What problem are you trying to solve? - placeholder: Describe the need for the feature. - validations: - required: true - - type: input - id: sdk_version - attributes: - label: SDK Version - description: Does this feature suggestion apply to a specific SDK version? - placeholder: copilot-sdk-java v1.0.0 - validations: - required: false - - type: textarea - id: logs - attributes: - label: Relevant log output - description: | - Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. - Please check your logs before submission to ensure sensitive information is redacted. - render: shell - - type: checkboxes - id: terms - attributes: - label: Code of Conduct - description: By submitting this issue, you agree to follow our [Code of Conduct](CODE_OF_CONDUCT.md) - options: - - label: I agree to follow this project's Code of Conduct - required: true diff --git a/.github/ISSUE_TEMPLATE/maintenance.yml b/.github/ISSUE_TEMPLATE/maintenance.yml deleted file mode 100644 index de21996db7..0000000000 --- a/.github/ISSUE_TEMPLATE/maintenance.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Maintenance -description: Dependencies, cleanup, refactoring, reworking of code -title: "[MAINT]: " -labels: ["Type: Maintenance", "Status: Triage"] -body: - - type: markdown - attributes: - value: | - Thanks for taking the time to fill this out! - - type: textarea - id: describe-need - attributes: - label: Describe the need - description: What do you want to happen? - placeholder: Describe the maintenance need here. - validations: - required: true - - type: input - id: sdk_version - attributes: - label: SDK Version - description: Does this maintenance apply to a specific SDK version? - placeholder: copilot-sdk-java v1.0.0 - validations: - required: false - - type: textarea - id: logs - attributes: - label: Relevant log output - description: | - Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. - Please check your logs before submission to ensure sensitive information is redacted. - render: shell - - type: checkboxes - id: terms - attributes: - label: Code of Conduct - description: By submitting this issue, you agree to follow our [Code of Conduct](CODE_OF_CONDUCT.md) - options: - - label: I agree to follow this project's Code of Conduct - required: true diff --git a/.github/actions/setup-copilot/action.yml b/.github/actions/setup-copilot/action.yml deleted file mode 100644 index 1288a1d89b..0000000000 --- a/.github/actions/setup-copilot/action.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: "Setup Copilot" -description: "Setup Copilot CLI for testing the Java SDK." -outputs: - cli-path: - description: "Path to the Copilot CLI executable" - value: ${{ steps.cli-path.outputs.path }} - cli-version: - description: "Pinned @github/copilot version installed (read from pom.xml)" - value: ${{ steps.cli-version.outputs.version }} -runs: - using: "composite" - steps: - - uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v6 - with: - node-version: 22 - - name: Read pinned @github/copilot version from pom.xml - id: cli-version - shell: bash - # The version is the SINGLE SOURCE OF TRUTH for the Copilot CLI version - # used across all CI paths. It is kept in sync with the reference - # implementation pinned in .lastmerge by - # .github/scripts/reference-impl-sync/sync-cli-version-from-reference-impl.sh. - run: | - PROP="readonly-copilot-sdk-ref-impl-version-from-lastmerge-file-updated-by-reference-impl-sync" - VERSION=$(sed -n "s|.*<${PROP}>\(.*\).*|\1|p" pom.xml | head -n 1 | tr -d '[:space:]') - if [[ -z "$VERSION" || "$VERSION" == "PRIMER_TO_REPLACE" ]]; then - echo "::error::Could not read pinned @github/copilot version from pom.xml property <${PROP}>" >&2 - exit 1 - fi - echo "Pinned @github/copilot version: $VERSION" - echo "version=$VERSION" >> "$GITHUB_OUTPUT" - - name: Install Copilot CLI (pinned to pom.xml version) - shell: bash - env: - CLI_VERSION: ${{ steps.cli-version.outputs.version }} - run: npm install -g "@github/copilot@${CLI_VERSION}" - - name: Set CLI path - id: cli-path - run: echo "path=$(which copilot)" >> $GITHUB_OUTPUT - shell: bash - - name: Verify CLI works - run: copilot --version - shell: bash diff --git a/.github/actions/test-report/action.yml b/.github/actions/test-report/action.yml deleted file mode 100644 index 6ac1fcbc76..0000000000 --- a/.github/actions/test-report/action.yml +++ /dev/null @@ -1,186 +0,0 @@ -name: "Test Report" -description: "Generate and publish test reports with summary for Java SDK tests." -inputs: - report-path: - description: "Path to the test report XML files (glob pattern)" - required: false - default: "target/{surefire-reports*,failsafe-reports}/TEST-*.xml" - jacoco-path: - description: "Path to the JaCoCo XML report" - required: false - default: "target/site/jacoco-coverage/jacoco.xml" - jacoco-csv-path: - description: "Path to the JaCoCo CSV report" - required: false - default: "target/site/jacoco-coverage/jacoco.csv" - check-name: - description: "Name for the check run" - required: false - default: "Java SDK Test Results" - title: - description: "Title for the test report summary" - required: false - default: "Copilot Java SDK :: Test Results" -runs: - using: "composite" - steps: - - name: Generate Test Summary - shell: bash - run: | - echo "## 🧪 ${{ inputs.title }}" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - - if ls ${{ inputs.report-path }} 1>/dev/null 2>&1; then - TESTS_RUN=$(grep -h "tests=" ${{ inputs.report-path }} 2>/dev/null | sed 's/.*tests="\([0-9]*\)".*/\1/' | awk '{s+=$1} END {print s}') - FAILURES=$(grep -h "failures=" ${{ inputs.report-path }} 2>/dev/null | sed 's/.*failures="\([0-9]*\)".*/\1/' | awk '{s+=$1} END {print s}') - ERRORS=$(grep -h "errors=" ${{ inputs.report-path }} 2>/dev/null | sed 's/.*errors="\([0-9]*\)".*/\1/' | awk '{s+=$1} END {print s}') - SKIPPED=$(grep -h "skipped=" ${{ inputs.report-path }} 2>/dev/null | sed 's/.*skipped="\([0-9]*\)".*/\1/' | awk '{s+=$1} END {print s}') - - TESTS_RUN=${TESTS_RUN:-0} - FAILURES=${FAILURES:-0} - ERRORS=${ERRORS:-0} - SKIPPED=${SKIPPED:-0} - PASSED=$((TESTS_RUN - FAILURES - ERRORS - SKIPPED)) - - if [ "$FAILURES" -eq 0 ] && [ "$ERRORS" -eq 0 ]; then - echo "### ✅ All tests passed!" >> $GITHUB_STEP_SUMMARY - else - echo "### ❌ Some tests failed" >> $GITHUB_STEP_SUMMARY - fi - - echo "" >> $GITHUB_STEP_SUMMARY - echo "| Metric | Count |" >> $GITHUB_STEP_SUMMARY - echo "|--------|-------|" >> $GITHUB_STEP_SUMMARY - echo "| ✅ Passed | $PASSED |" >> $GITHUB_STEP_SUMMARY - echo "| ❌ Failed | $FAILURES |" >> $GITHUB_STEP_SUMMARY - echo "| 💥 Errors | $ERRORS |" >> $GITHUB_STEP_SUMMARY - echo "| ⏭️ Skipped | $SKIPPED |" >> $GITHUB_STEP_SUMMARY - echo "| 📊 Total | $TESTS_RUN |" >> $GITHUB_STEP_SUMMARY - - echo "" >> $GITHUB_STEP_SUMMARY - echo "### Test Classes" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "| Class | Tests | Passed | Failed | Errors | Time |" >> $GITHUB_STEP_SUMMARY - echo "|-------|-------|--------|--------|--------|------|" >> $GITHUB_STEP_SUMMARY - - for file in ${{ inputs.report-path }}; do - if [ -f "$file" ]; then - CLASS=$(basename "$file" .xml | sed 's/TEST-//') - T=$(grep -o 'tests="[0-9]*"' "$file" | head -1 | sed 's/[^0-9]//g') - F=$(grep -o 'failures="[0-9]*"' "$file" | head -1 | sed 's/[^0-9]//g') - E=$(grep -o 'errors="[0-9]*"' "$file" | head -1 | sed 's/[^0-9]//g') - TIME=$(grep -o 'time="[0-9.]*"' "$file" | head -1 | sed 's/[^0-9.]//g') - P=$((T - F - E)) - - STATUS="✅" - if [ "${F:-0}" -gt 0 ] || [ "${E:-0}" -gt 0 ]; then - STATUS="❌" - fi - - echo "| $STATUS $CLASS | ${T:-0} | ${P:-0} | ${F:-0} | ${E:-0} | ${TIME:-0}s |" >> $GITHUB_STEP_SUMMARY - fi - done - else - echo "⚠️ No test reports found at ${{ inputs.report-path }}" >> $GITHUB_STEP_SUMMARY - fi - - - name: Generate Coverage Summary - shell: bash - run: | - JACOCO_XML="${{ inputs.jacoco-path }}" - JACOCO_CSV="${{ inputs.jacoco-csv-path }}" - - if [ -f "$JACOCO_XML" ]; then - echo "" >> $GITHUB_STEP_SUMMARY - echo "## 📊 Code Coverage" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - - # JaCoCo XML may be on a single line - split it for parsing - # Extract report-level counters (last occurrence of each type before ) - extract_counter() { - local type=$1 - local field=$2 - # Split XML on > to get one tag per line, find counter, extract value - sed 's/>/>\n/g' "$JACOCO_XML" | grep "> $GITHUB_STEP_SUMMARY - echo "|--------|---------|--------|----------|" >> $GITHUB_STEP_SUMMARY - echo "| 📝 Instructions | ${INSTR_COVERED:-0} | ${INSTR_MISSED:-0} | ${INSTR_PCT}% |" >> $GITHUB_STEP_SUMMARY - echo "| 🌿 Branches | ${BRANCH_COVERED:-0} | ${BRANCH_MISSED:-0} | ${BRANCH_PCT}% |" >> $GITHUB_STEP_SUMMARY - echo "| 📏 Lines | ${LINE_COVERED:-0} | ${LINE_MISSED:-0} | ${LINE_PCT}% |" >> $GITHUB_STEP_SUMMARY - echo "| 🔧 Methods | ${METHOD_COVERED:-0} | ${METHOD_MISSED:-0} | ${METHOD_PCT}% |" >> $GITHUB_STEP_SUMMARY - echo "| 📦 Classes | ${CLASS_COVERED:-0} | ${CLASS_MISSED:-0} | ${CLASS_PCT}% |" >> $GITHUB_STEP_SUMMARY - - if [ -f "$JACOCO_CSV" ]; then - extract_instruction_scope() { - local scope=$1 - awk -F',' -v scope="$scope" -v generated_prefix="com.github.copilot.generated" ' - NR > 1 { - is_generated = index($2, generated_prefix) == 1 - if ((scope == "generated" && is_generated) || - (scope == "handwritten" && !is_generated)) { - missed += $4 - covered += $5 - } - } - END { print covered + 0 "," missed + 0 } - ' "$JACOCO_CSV" - } - - IFS=, read -r HANDWRITTEN_COVERED HANDWRITTEN_MISSED <<< "$(extract_instruction_scope handwritten)" - IFS=, read -r GENERATED_COVERED GENERATED_MISSED <<< "$(extract_instruction_scope generated)" - HANDWRITTEN_PCT=$(calc_pct "${HANDWRITTEN_COVERED:-0}" "${HANDWRITTEN_MISSED:-0}") - GENERATED_PCT=$(calc_pct "${GENERATED_COVERED:-0}" "${GENERATED_MISSED:-0}") - - echo "" >> $GITHUB_STEP_SUMMARY - echo "### Coverage by Code Origin (Instructions)" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "| Origin | Covered | Missed | Coverage |" >> $GITHUB_STEP_SUMMARY - echo "|--------|---------|--------|----------|" >> $GITHUB_STEP_SUMMARY - echo "| ✍️ Handwritten | ${HANDWRITTEN_COVERED:-0} | ${HANDWRITTEN_MISSED:-0} | ${HANDWRITTEN_PCT}% |" >> $GITHUB_STEP_SUMMARY - echo "| 🤖 Generated | ${GENERATED_COVERED:-0} | ${GENERATED_MISSED:-0} | ${GENERATED_PCT}% |" >> $GITHUB_STEP_SUMMARY - fi - else - echo "" >> $GITHUB_STEP_SUMMARY - echo "## 📊 Code Coverage" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "⚠️ No JaCoCo report found at $JACOCO_XML" >> $GITHUB_STEP_SUMMARY - fi diff --git a/.github/agents/agentic-workflows.agent.md b/.github/agents/agentic-workflows.agent.md deleted file mode 100644 index e8f499139a..0000000000 --- a/.github/agents/agentic-workflows.agent.md +++ /dev/null @@ -1,169 +0,0 @@ ---- -name: Agentic Workflows -description: GitHub Agentic Workflows (gh-aw) - Create, debug, and upgrade AI-powered workflows with intelligent prompt routing -user-invocable: true -disable-model-invocation: true ---- - -# GitHub Agentic Workflows Agent - -This agent helps you work with **GitHub Agentic Workflows (gh-aw)**, a CLI extension for creating AI-powered workflows in natural language using markdown files. - -## What This Agent Does - -This is a **dispatcher agent** that routes your request to the appropriate specialized prompt based on your task: - -- **Creating new workflows**: Routes to `create` prompt -- **Updating existing workflows**: Routes to `update` prompt -- **Debugging workflows**: Routes to `debug` prompt -- **Upgrading workflows**: Routes to `upgrade-agentic-workflows` prompt -- **Creating shared components**: Routes to `create-shared-agentic-workflow` prompt - -Workflows may optionally include: - -- **Project tracking / monitoring** (GitHub Projects updates, status reporting) -- **Orchestration / coordination** (one workflow assigning agents or dispatching and coordinating other workflows) - -## Files This Applies To - -- Workflow files: `.github/workflows/*.md` and `.github/workflows/**/*.md` -- Workflow lock files: `.github/workflows/*.lock.yml` -- Shared components: `.github/workflows/shared/*.md` -- Configuration: https://github.com/github/gh-aw/blob/v0.42.17/.github/aw/github-agentic-workflows.md - -## Problems This Solves - -- **Workflow Creation**: Design secure, validated agentic workflows with proper triggers, tools, and permissions -- **Workflow Debugging**: Analyze logs, identify missing tools, investigate failures, and fix configuration issues -- **Version Upgrades**: Migrate workflows to new gh-aw versions, apply codemods, fix breaking changes -- **Component Design**: Create reusable shared workflow components that wrap MCP servers - -## How to Use - -When you interact with this agent, it will: - -1. **Understand your intent** - Determine what kind of task you're trying to accomplish -2. **Route to the right prompt** - Load the specialized prompt file for your task -3. **Execute the task** - Follow the detailed instructions in the loaded prompt - -## Available Prompts - -### Create New Workflow -**Load when**: User wants to create a new workflow from scratch, add automation, or design a workflow that doesn't exist yet - -**Prompt file**: https://github.com/github/gh-aw/blob/v0.42.17/.github/aw/create-agentic-workflow.md - -**Use cases**: -- "Create a workflow that triages issues" -- "I need a workflow to label pull requests" -- "Design a weekly research automation" - -### Update Existing Workflow -**Load when**: User wants to modify, improve, or refactor an existing workflow - -**Prompt file**: https://github.com/github/gh-aw/blob/v0.42.17/.github/aw/update-agentic-workflow.md - -**Use cases**: -- "Add web-fetch tool to the issue-classifier workflow" -- "Update the PR reviewer to use discussions instead of issues" -- "Improve the prompt for the weekly-research workflow" - -### Debug Workflow -**Load when**: User needs to investigate, audit, debug, or understand a workflow, troubleshoot issues, analyze logs, or fix errors - -**Prompt file**: https://github.com/github/gh-aw/blob/v0.42.17/.github/aw/debug-agentic-workflow.md - -**Use cases**: -- "Why is this workflow failing?" -- "Analyze the logs for workflow X" -- "Investigate missing tool calls in run #12345" - -### Upgrade Agentic Workflows -**Load when**: User wants to upgrade workflows to a new gh-aw version or fix deprecations - -**Prompt file**: https://github.com/github/gh-aw/blob/v0.42.17/.github/aw/upgrade-agentic-workflows.md - -**Use cases**: -- "Upgrade all workflows to the latest version" -- "Fix deprecated fields in workflows" -- "Apply breaking changes from the new release" - -### Create Shared Agentic Workflow -**Load when**: User wants to create a reusable workflow component or wrap an MCP server - -**Prompt file**: https://github.com/github/gh-aw/blob/v0.42.17/.github/aw/create-shared-agentic-workflow.md - -**Use cases**: -- "Create a shared component for Notion integration" -- "Wrap the Slack MCP server as a reusable component" -- "Design a shared workflow for database queries" - -### Orchestration and Delegation - -**Load when**: Creating or updating workflows that coordinate multiple agents or dispatch work to other workflows - -**Prompt file**: https://github.com/github/gh-aw/blob/v0.42.17/.github/aw/orchestration.md - -**Use cases**: -- Assigning work to AI coding agents -- Dispatching specialized worker workflows -- Using correlation IDs for tracking -- Orchestration design patterns - -### GitHub Projects Integration - -**Load when**: Creating or updating workflows that manage GitHub Projects v2 - -**Prompt file**: https://github.com/github/gh-aw/blob/v0.42.17/.github/aw/projects.md - -**Use cases**: -- Tracking items and fields with update-project -- Posting periodic run summaries -- Creating new projects -- Projects v2 authentication and configuration - -## Instructions - -When a user interacts with you: - -1. **Identify the task type** from the user's request -2. **Load the appropriate prompt** from the GitHub repository URLs listed above -3. **Follow the loaded prompt's instructions** exactly -4. **If uncertain**, ask clarifying questions to determine the right prompt - -## Quick Reference - -```bash -# Initialize repository for agentic workflows -gh aw init - -# Compile workflows -gh aw compile [workflow-name] - -# Debug workflow runs -gh aw logs [workflow-name] -gh aw audit - -# Upgrade workflows -gh aw fix --write -gh aw compile --validate -``` - -## Key Features of gh-aw - -- **Natural Language Workflows**: Write workflows in markdown with YAML frontmatter -- **AI Engine Support**: Copilot, Claude, Codex, or custom engines -- **MCP Server Integration**: Connect to Model Context Protocol servers for tools -- **Safe Outputs**: Structured communication between AI and GitHub API -- **Strict Mode**: Security-first validation and sandboxing -- **Shared Components**: Reusable workflow building blocks -- **Repo Memory**: Persistent git-backed storage for agents -- **Sandboxed Execution**: All workflows run in the Agent Workflow Firewall (AWF) sandbox, enabling full `bash` and `edit` tools by default - -## Important Notes - -- Always reference the instructions file at https://github.com/github/gh-aw/blob/v0.42.17/.github/aw/github-agentic-workflows.md for complete documentation -- Use the MCP tool `agentic-workflows` when running in GitHub Copilot Cloud -- Workflows must be compiled to `.lock.yml` files before running in GitHub Actions -- **Bash tools are enabled by default** - Don't restrict bash commands unnecessarily since workflows are sandboxed by the AWF -- Follow security best practices: minimal permissions, explicit network access, no template injection diff --git a/.github/aw/actions-lock.json b/.github/aw/actions-lock.json deleted file mode 100644 index 3453f55f55..0000000000 --- a/.github/aw/actions-lock.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "entries": { - "actions/checkout@v6.0.2": { - "repo": "actions/checkout", - "version": "v6.0.2", - "sha": "de0fac2e4500dabe0009e67214ff5f5447ce83dd" - }, - "actions/download-artifact@v8.0.1": { - "repo": "actions/download-artifact", - "version": "v8.0.1", - "sha": "3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c" - }, - "actions/github-script@v8": { - "repo": "actions/github-script", - "version": "v8", - "sha": "ed597411d8f924073f98dfc5c65a23a2325f34cd" - }, - "actions/github-script@v9": { - "repo": "actions/github-script", - "version": "v9", - "sha": "373c709c69115d41ff229c7e5df9f8788daa9553" - }, - "actions/github-script@v9.0.0": { - "repo": "actions/github-script", - "version": "v9.0.0", - "sha": "3a2844b7e9c422d3c10d287c895573f7108da1b3" - }, - "actions/setup-java@v4": { - "repo": "actions/setup-java", - "version": "v4", - "sha": "c1e323688fd81a25caa38c78aa6df2d33d3e20d9" - }, - "actions/setup-node@v4": { - "repo": "actions/setup-node", - "version": "v4", - "sha": "49933ea5288caeca8642d1e84afbd3f7d6820020" - }, - "actions/upload-artifact@v7.0.1": { - "repo": "actions/upload-artifact", - "version": "v7.0.1", - "sha": "043fb46d1a93c77aae656e7c1c64a875d1fc6a0a" - }, - "github/gh-aw-actions/setup-cli@v0.74.8": { - "repo": "github/gh-aw-actions/setup-cli", - "version": "v0.74.8", - "sha": "efa55847f72aadb03490d955263ff911bf758700" - }, - "github/gh-aw-actions/setup@v0.74.8": { - "repo": "github/gh-aw-actions/setup", - "version": "v0.74.8", - "sha": "efa55847f72aadb03490d955263ff911bf758700" - }, - "github/gh-aw/actions/setup@v0.51.6": { - "repo": "github/gh-aw/actions/setup", - "version": "v0.51.6", - "sha": "33cd6c7f1fee588654ef19def2e6a4174be66197" - } - } -} diff --git a/.github/badges/jacoco-generated.svg b/.github/badges/jacoco-generated.svg deleted file mode 100644 index 9422a5629e..0000000000 --- a/.github/badges/jacoco-generated.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - coverage generated - coverage generated - 72.8% - 72.8% - - diff --git a/.github/badges/jacoco-handwritten.svg b/.github/badges/jacoco-handwritten.svg deleted file mode 100644 index c7f675e6e9..0000000000 --- a/.github/badges/jacoco-handwritten.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - coverage handwritten - coverage handwritten - 82.5% - 82.5% - - diff --git a/.github/badges/jacoco.svg b/.github/badges/jacoco.svg deleted file mode 100644 index bcfcc44d75..0000000000 --- a/.github/badges/jacoco.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - coverage - coverage - 78.3% - 78.3% - - diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md deleted file mode 100644 index 5c5c0ff8ec..0000000000 --- a/.github/copilot-instructions.md +++ /dev/null @@ -1,323 +0,0 @@ -# Copilot Instructions for copilot-sdk-java - -A Java SDK for programmatic control of GitHub Copilot CLI. This is a port of the official .NET SDK, targeting Java 17+. - -## About These Instructions - -These instructions guide GitHub Copilot when assisting with this repository. They cover: - -- **Tech Stack**: Java 17+, Maven, Jackson for JSON, JUnit for testing -- **Purpose**: Provide a Java SDK for programmatic control of GitHub Copilot CLI -- **Architecture**: JSON-RPC client communicating with Copilot CLI over stdio -- **Key Goals**: Maintain parity with reference implementation .NET SDK while following Java idioms - -## Build & Test Commands - -```bash -# Build and run all tests -mvn clean verify - -# Run a single test class -mvn test -Dtest=CopilotClientTest - -# Run a single test method -mvn test -Dtest=ToolsTest#testToolInvocation - -# Format code (required before commit) -mvn spotless:apply - -# Check formatting only -mvn spotless:check - -# Build without tests -mvn clean package -DskipTests - -# Run tests with debug logging -mvn test -Pdebug -``` - -### Running Tests from AI Agents / Copilot - -When running tests to verify changes, **always use `mvn verify` without `-q` and without piping through `grep`**. The full output is needed to diagnose failures. Do NOT use commands like: - -```bash -# BAD - hides critical failure details, often requires a second run -mvn verify -q 2>&1 | grep -E 'Tests run:|BUILD' -mvn verify 2>&1 | grep -E 'Tests run.*in com|BUILD|test failure' -``` - -Instead, use one of these approaches: - -```bash -# GOOD - run tests with full output (preferred for investigating failures) -mvn verify - -# GOOD - run tests showing just the summary and result using Maven's built-in log level -mvn verify -B --fail-at-end 2>&1 | tail -30 - -# GOOD - run a single test class when debugging a specific test -mvn test -Dtest=CopilotClientTest -``` - -**Interpreting results:** -- `BUILD SUCCESS` at the end means all tests passed. No further investigation needed. -- `BUILD FAILURE` means something failed. The lines immediately above `BUILD FAILURE` will contain the relevant error information. Look for `[ERROR]` lines near the bottom of the output. -- The Surefire summary line `Tests run: X, Failures: Y, Errors: Z, Skipped: W` appears near the end and gives the counts. -- **Do NOT run tests a second time** just to get different output formatting. One run with full output is sufficient. - -## Architecture - -### Core Components - -- **CopilotClient** - Main entry point. Manages connection to Copilot CLI server via JSON-RPC over stdio. Spawns CLI process or connects to existing server. -- **CopilotSession** - Represents a conversation session. Handles event subscriptions, tool registration, permissions, and message sending. -- **JsonRpcClient** - Low-level JSON-RPC protocol implementation using Jackson for serialization. - -### Package Structure - -- `com.github.copilot` - Core classes (CopilotClient, CopilotSession, JsonRpcClient) -- `com.github.copilot.rpc` - DTOs, request/response types, handler interfaces (SessionConfig, MessageOptions, ToolDefinition, etc.) -- `com.github.copilot.generated` - Generated event types for session streaming (SessionEvent, AssistantMessageEvent, SessionIdleEvent, ToolExecutionStartEvent, etc.) - -### Test Infrastructure - -Tests use the official copilot-sdk test harness from `https://github.com/github/copilot-sdk`. The harness is automatically cloned during `generate-test-resources` phase to `target/copilot-sdk/`. - -- **E2ETestContext** - Manages test environment with CapiProxy for deterministic API responses -- **CapiProxy** - Node.js-based replaying proxy using YAML snapshots from `test/snapshots/` -- Test snapshots are stored in the reference implementation repo's `test/snapshots/` directory - -## Key Conventions - -### Reference Implementation Merging - -This SDK tracks the official .NET implementation at `github/copilot-sdk`. The `.lastmerge` file contains the last merged reference implementation commit hash. Use the `agentic-merge-reference-impl` skill (see `.github/prompts/agentic-merge-reference-impl.prompt.md`) to port changes. - -When porting from .NET: -- Adapt to Java idioms, don't copy C# patterns directly -- Convert `async/await` → `CompletableFuture` -- Convert C# properties → Java getters/setters or fluent setters -- Use Jackson for JSON (`ObjectMapper`, `@JsonProperty`) - -### Code Style - -- 4-space indentation (enforced by Spotless with Eclipse formatter) -- Fluent setter pattern for configuration classes (e.g., `new SessionConfig().setModel("gpt-5").setTools(tools)`) -- Public APIs require Javadoc (enforced by Checkstyle, except `json` and `events` packages) -- Pre-commit hook runs `mvn spotless:check` - Must be manually enabled with: `git config core.hooksPath .githooks`, except in the Copilot coding agent environment. This hook is explicitly enabled in the Copilot coding agent environment. See [copilot-setup-steps.yml](workflows/copilot-setup-steps.yml). - -### Handler Pattern - -Handlers use functional interfaces with `CompletableFuture` returns: - -```java -session.createSession(new SessionConfig() - .setOnPermissionRequest((request, invocation) -> - CompletableFuture.completedFuture(new PermissionRequestResult().setKind("allow"))) - .setOnUserInput((request, invocation) -> - CompletableFuture.completedFuture(new UserInputResponse().setResponse("user input"))) -); -``` - -### Event Handling - -Sessions emit typed events via `session.on()`: - -```java -session.on(AssistantMessageEvent.class, msg -> System.out.println(msg.getData().content())); -session.on(SessionIdleEvent.class, idle -> done.complete(null)); -``` - -### Sealed Event Hierarchy - -`AbstractSessionEvent` is a sealed class permitting specific event types. Use pattern matching: - -```java -switch (event) { - case AssistantMessageEvent msg -> handleMessage(msg); - case ToolExecutionStartEvent tool -> handleToolStart(tool); - case SessionIdleEvent idle -> handleIdle(); - default -> { } -} -``` - -### Tool Definition Pattern - -Custom tools use `ToolDefinition.create()` with JSON Schema parameters and a `ToolHandler`: - -```java -var tool = ToolDefinition.create( - "get_weather", - "Get weather for a location", - Map.of( - "type", "object", - "properties", Map.of("location", Map.of("type", "string")), - "required", List.of("location") - ), - invocation -> { - // Type-safe: invocation.getArgumentsAs(WeatherArgs.class) - // Or Map-based: invocation.getArguments().get("location") - return CompletableFuture.completedFuture(result); - } -); -``` - -## Testing Conventions - -### E2E Test Structure - -Tests extend the shared context pattern: - -```java -private static E2ETestContext ctx; - -@BeforeAll -static void setup() throws Exception { - ctx = E2ETestContext.create(); -} - -@AfterAll -static void teardown() throws Exception { - if (ctx != null) ctx.close(); -} - -@Test -void testFeature() throws Exception { - ctx.configureForTest("category", "test_name"); // Loads test/snapshots/category/test_name.yaml - try (CopilotClient client = ctx.createClient()) { - // Test logic - } -} -``` - -### Snapshot Naming - -Test method names are converted to lowercase snake_case for snapshot filenames to avoid case collisions on macOS/Windows. - -## JSON Serialization - -- Uses Jackson with `@JsonProperty` annotations -- `@JsonInclude(JsonInclude.Include.NON_NULL)` on DTOs to omit null fields -- `ObjectMapper` configured via `JsonRpcClient.getObjectMapper()` with: - - `JavaTimeModule` for date/time handling - - `FAIL_ON_UNKNOWN_PROPERTIES = false` for forward compatibility - -## Documentation - -- Site docs in `src/site/markdown/` (filtered for `${project.version}` substitution) -- Update `src/site/site.xml` when adding new documentation pages -- Javadoc required for public APIs except `json` and `events` packages (self-documenting DTOs) -- **Copilot CLI Version**: When updating the required Copilot CLI version in `README.md`, also update it in `src/site/markdown/index.md` to keep them in sync - -## Boundaries and Restrictions - -### What NOT to Modify - -- **DO NOT** edit, create, or delete any file under `src/generated/java/` — these are **auto-generated** by `scripts/codegen/java.ts` and will be overwritten. To update generated code, run `mvn generate-sources -Pcodegen` or trigger the `update-copilot-dependency.yml` workflow. - If you need to get a new version of the schemas, run `mvn generate-sources -Pupdate-schemas-from-npm-artifact` before running the code generator. -- **DO NOT** edit `.github/agents/` directory - these contain instructions for other agents -- **DO NOT** modify `target/` directory - this contains build artifacts -- **DO NOT** edit `pom.xml` dependencies without careful consideration - this SDK has minimal dependencies by design -- **DO NOT** change the Jackson version without testing against all serialization patterns -- **DO NOT** modify test snapshots in `target/copilot-sdk/test/snapshots/` - these come from reference implementation -- **DO NOT** alter the Eclipse formatter configuration in `pom.xml` without team consensus -- **DO NOT** remove or skip Checkstyle or Spotless checks -- **YOU MUST ALWAYS** run `gh aw compile ` after editing any `.github/workflows/*.md` agentic workflow source file to regenerate the corresponding `.lock.yml`. The lock file contains a content hash of the frontmatter — any edit to the `.md` without recompiling will cause the workflow to fail at runtime with a "lock file out of sync" error. -- **DO NOT** edit `.github/workflows/*.lock.yml` directly — these are auto-generated by `gh aw compile` from the `.md` source files. - -### Security Guidelines - -- **NEVER** commit secrets, API keys, tokens, or credentials to the repository -- **NEVER** commit `.env` files or any files containing sensitive configuration -- **NEVER** log sensitive data in code (API keys, tokens, user data) -- Always use `try-with-resources` for streams and readers to prevent resource leaks -- Always use `StandardCharsets.UTF_8` when creating InputStreamReader/OutputStreamWriter -- Review any new dependencies for known security vulnerabilities before adding them -- When handling user input in tools or handlers, consider injection risks - -## Dependency Management - -This SDK is designed to be **lightweight with minimal dependencies**: - -- Core dependencies: Jackson (JSON), JUnit (tests only) -- Before adding new dependencies: - 1. Consider if the functionality can be implemented without a new dependency - 2. Check if Jackson already provides the needed functionality - 3. Ensure the dependency is actively maintained and widely used - 4. Verify compatibility with Java 17+ - 5. Check for security vulnerabilities - 6. Get team approval for non-trivial additions - -## Pre-commit Hooks and Formatting (Coding Agent) - -The repository has a pre-commit hook (`.githooks/pre-commit`) that is **automatically enabled** in the Copilot coding agent environment via `copilot-setup-steps.yml`. The hook runs `mvn spotless:check` on any commit that includes changes under `src/`. - -**If a commit fails due to the pre-commit hook:** - -1. Run `mvn spotless:apply` to auto-fix formatting issues. -2. Re-stage the changed files with `git add -u`. -3. Retry the commit. - -**Best practice:** Always run `mvn spotless:apply` before committing Java source changes to avoid hook failures in the first place. If you forget and the hook rejects the commit, follow the three steps above and continue. - -## Commit and PR Guidelines - -### Commit Messages - -- Use clear, descriptive commit messages -- Start with a verb in present tense (e.g., "Add", "Fix", "Update", "Refactor") -- Keep the first line under 72 characters -- Add details in the body if needed -- Examples: - - `Add support for streaming responses` - - `Fix resource leak in JsonRpcClient` - - `Update documentation for tool handlers` - - `Refactor event handling to use sealed classes` - -### Pull Requests - -- Keep PRs focused and minimal - one feature/fix per PR -- Ensure all tests pass before requesting review -- Run `mvn spotless:apply` before committing -- Include tests for new functionality -- Update documentation if adding/changing public APIs -- Reference related issues using `#issue-number` -- For reference implementation merges, follow the `agentic-merge-reference-impl` skill workflow - -## Development Workflow - -1. **Setup**: Enable git hooks with `git config core.hooksPath .githooks` -2. **Branch**: Create feature branches from `main` -3. **Code**: Write code following the conventions above -4. **Format**: Run `mvn spotless:apply` to format code -5. **Test**: Run `mvn clean verify` to ensure all tests pass -6. **Commit**: Make focused commits with clear messages -7. **Push**: Push your branch and create a PR -8. **Review**: Address review feedback and iterate - -## Release Process - -The release process is automated via the `publish-maven.yml` GitHub Actions workflow. Key steps: - -1. **CHANGELOG Update**: The script `.github/scripts/release/update-changelog.sh` automatically: - - Converts the `## [Unreleased]` section to `## [version] - date` - - Creates a new empty `## [Unreleased]` section at the top - - Updates version comparison links at the bottom of CHANGELOG.md - - Injects the reference implementation SDK commit hash (from `.lastmerge`) as a `> **Reference implementation sync:**` blockquote in both the new `[Unreleased]` section and the released version section - -2. **Reference Implementation Sync Tracking**: Each release records which commit from the official `github/copilot-sdk` it is synced to: - - The `.lastmerge` file is read during the release workflow - - The commit hash is injected into `CHANGELOG.md` under the release heading - - Format: `> **Reference implementation sync:** [\`github/copilot-sdk@SHORT_HASH\`](link-to-commit)` - -3. **Documentation Updates**: README.md and jbang-example.java are updated with the new version. - -4. **Maven Release**: Uses `maven-release-plugin` to: - - Update pom.xml version - - Create a git tag - - Deploy to Maven Central - -5. **Rollback**: If the release fails, the documentation commit is automatically reverted - -The workflow is triggered manually via workflow_dispatch with optional version parameters. - diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index b7d1cb416a..0000000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,29 +0,0 @@ -updates: -- directory: / - groups: - github-actions: - patterns: - - "*" - ignore: - - dependency-name: "actions/github-script" - - dependency-name: "github/gh-aw-actions" - - dependency-name: "*" - update-types: - - version-update:semver-major - - dependency-name: "github/gh-aw-actions/**" # Managed by gh aw compile. Version-locked to the gh-aw compiler; do not bump. - package-ecosystem: github-actions - schedule: - interval: weekly -- directory: / - groups: - maven-deps: - patterns: - - "*" - ignore: - - dependency-name: "*" - update-types: - - version-update:semver-major - package-ecosystem: maven - schedule: - interval: weekly -version: 2 diff --git a/.github/prompts/agentic-merge-reference-impl.prompt.md b/.github/prompts/agentic-merge-reference-impl.prompt.md deleted file mode 100644 index d5c3528b3f..0000000000 --- a/.github/prompts/agentic-merge-reference-impl.prompt.md +++ /dev/null @@ -1,483 +0,0 @@ -# Merge Reference Implementation SDK Changes - -You are an expert Java developer tasked with porting changes from the reference implementation of the Copilot SDK (primarily the .NET implementation) to this Java SDK. - -## ❌❌❌ ABSOLUTE PROHIBITION: DO NOT TOUCH GENERATED CODE ❌❌❌ - -> ### 🚫 THE FILES UNDER `src/generated/java/` ARE FORBIDDEN 🚫 -> -> **NEVER, UNDER ANY CIRCUMSTANCES, MODIFY ANY FILE IN `src/generated/java/`.** -> -> These files are AUTO-GENERATED by `scripts/codegen/java.ts` and MUST NOT be hand-edited. -> They are regenerated automatically when the `@github/copilot` npm package version is updated. -> -> ❌ DO NOT edit `src/generated/java/**/*.java` -> ❌ DO NOT create new files in `src/generated/java/` -> ❌ DO NOT delete files from `src/generated/java/` -> ❌ DO NOT "fix" or "improve" generated code — it will be overwritten -> -> **IF ANY CHANGE YOU NEED TO MAKE REQUIRES TOUCHING `src/generated/java/`:** -> -> 1. **STOP IMMEDIATELY** — do not make the change -> 2. **FAIL the agentic sync** — do not attempt to work around this restriction -> 3. **Push an explanatory commit** with a message such as: -> ``` -> SYNC BLOCKED: Required change needs generated code update -> -> The reference implementation change '' requires updates -> to the generated RPC/event types in src/generated/java/. These files -> cannot be hand-edited — they must be regenerated. -> -> ACTION REQUIRED: Re-run the update-copilot-dependency.yml workflow -> to update the @github/copilot npm package and regenerate the Java -> source files before this sync can be completed. -> ``` -> 4. **Document in the PR body** which reference implementation changes were blocked and why -> 5. **Do NOT attempt to work around this restriction** by making equivalent changes elsewhere -> -> The correct way to update generated code is: -> - Trigger the `update-copilot-dependency.yml` workflow with the new `@github/copilot` version -> - That workflow updates `package.json`, regenerates all files in `src/generated/java/`, and opens a PR - -## ⚠️ IMPORTANT: Java SDK Design Takes Priority - -**The current design and architecture of the Java SDK is the priority.** When porting changes from the reference implementation: - -1. **Adapt, don't copy** - Translate reference implementation features to fit the Java SDK's existing patterns, naming conventions, and architecture -2. **Preserve Java idioms** - The Java SDK should feel natural to Java developers, not like a C# port -3. **Maintain consistency** - New code must match the existing codebase style and structure -4. **Evaluate before porting** - Not every reference implementation change needs to be ported; some may not be applicable or may conflict with Java SDK design decisions - -Before making any changes, **read and understand the existing Java SDK implementation** to ensure new code integrates seamlessly. - -## Utility Scripts - -The `.github/scripts/` directory contains helper scripts that automate the repeatable parts of this workflow. **Use these scripts instead of running the commands manually.** - -| Script | Purpose | -|---|---| -| `.github/scripts/reference-impl-sync/merge-reference-impl-start.sh` | Creates branch, updates CLI, clones reference implementation, reads `.lastmerge`, prints commit summary | -| `.github/scripts/reference-impl-sync/merge-reference-impl-diff.sh` | Detailed diff analysis grouped by area (`.NET src`, tests, snapshots, docs, etc.) | -| `.github/scripts/reference-impl-sync/merge-reference-impl-finish.sh` | Runs format + test + build, updates `.lastmerge`, commits, pushes branch | -| `.github/scripts/build/format-and-test.sh` | Standalone `spotless:apply` + `mvn clean verify` (useful during porting too) | - -All scripts write/read a `.merge-env` file (git-ignored) to share state (branch name, reference-impl dir, last-merge commit). - -## Workflow Overview - -1. Run `./.github/scripts/reference-impl-sync/merge-reference-impl-start.sh` (creates branch, clones reference implementation, shows summary) -2. Run `./.github/scripts/reference-impl-sync/merge-reference-impl-diff.sh` (analyze changes) -3. Update README with minimum CLI version requirement -4. Identify reference implementation changes to port -5. Apply changes to Java SDK (commit as you go) -6. Port/adjust tests from reference implementation changes -7. Run `./.github/scripts/build/format-and-test.sh` frequently while porting -8. Build the package -9. Update documentation (**required for every user-facing reference implementation change**) -10. Run `./.github/scripts/reference-impl-sync/merge-reference-impl-finish.sh` (final test + push) and finalize Pull Request (see note below about coding agent vs. manual workflow) -11. Perform final review before handing off - ---- - -## Step 1: Initialize Reference Implementation Sync - -Run the start script to create a branch, update the CLI, clone the reference implementation repo, and see a summary of new commits: - -```bash -./.github/scripts/reference-impl-sync/merge-reference-impl-start.sh -``` - -This writes a `.merge-env` file used by the other scripts. It outputs: -- The branch name created -- The Copilot CLI version -- The reference-impl dir path -- A short log of reference implementation commits since `.lastmerge` - -## Step 2: Analyze reference implementation Changes - -Run the diff script for a detailed breakdown by area: - -```bash -./.github/scripts/reference-impl-sync/merge-reference-impl-diff.sh # stat only -./.github/scripts/reference-impl-sync/merge-reference-impl-diff.sh --full # full diffs -``` - -The diff script groups changes into: .NET source, .NET tests, test snapshots, documentation, protocol/config, Go/Node.js/Python SDKs, and other files. - -## Step 3: Update README with CLI Version - -After the start script runs, check the CLI version it printed (also saved in `.merge-env` as `CLI_VERSION`). Update the Requirements section in `README.md` and `src/site/markdown/index.md` to specify the minimum CLI version requirement. - -Commit this change before proceeding: - -```bash -git add README.md src/site/markdown/index.md -git commit -m "Update Copilot CLI minimum version requirement" -``` - -## Step 4: Identify Changes to Port - -Using the output from `merge-reference-impl-diff.sh`, focus on: -- `dotnet/src/` - Primary reference implementation -- `dotnet/test/` - Test cases to port -- `docs/` - Documentation updates -- `sdk-protocol-version.json` - Protocol version changes - -For each change in the reference implementation diff, determine: - -1. **New Features**: New methods, classes, or capabilities added to the SDK -2. **Bug Fixes**: Corrections to existing functionality -3. **API Changes**: Changes to public interfaces or method signatures -4. **Protocol Updates**: Changes to the JSON-RPC protocol or message types -5. **Test Updates**: New or modified test cases - -### Key Files to Compare - -| reference implementation (.NET) | Java SDK Equivalent | -|------------------------------------|--------------------------------------------------------| -| `dotnet/src/Client.cs` | `src/main/java/com/github/copilot/CopilotClient.java` | -| `dotnet/src/Session.cs` | `src/main/java/com/github/copilot/CopilotSession.java` | -| `dotnet/src/Types.cs` | `src/main/java/com/github/copilot/types/*.java` | -| `dotnet/src/Generated/*.cs` | ❌ **DO NOT TOUCH** `src/generated/java/**` — see top of this file | -| `dotnet/test/*.cs` | `src/test/java/com/github/copilot/*Test.java` | -| `docs/getting-started.md` | `README.md` and `src/site/markdown/*.md` | -| `docs/*.md` (new files) | `src/site/markdown/*.md` + update `src/site/site.xml` | -| `sdk-protocol-version.json` | (embedded in Java code or resource file) | - -> **⚠️ Important:** When adding new documentation pages, always update `src/site/site.xml` to include them in the navigation menu. - -## Step 5: Apply Changes to Java SDK - -> ### ❌❌❌ REMINDER: `src/generated/java/` IS FORBIDDEN ❌❌❌ -> Any change that requires modifying `src/generated/java/` MUST stop the sync. -> See the **ABSOLUTE PROHIBITION** section at the top of this file for required actions. - -When porting changes: - -### ⚠️ Priority: Preserve Java SDK Design - -Before modifying any code: - -1. **Read the existing Java implementation first** - Understand current patterns, class structure, and naming -2. **Identify the Java equivalent approach** - Don't replicate C# patterns; find the idiomatic Java way -3. **Check for existing abstractions** - The Java SDK may already have mechanisms that differ from .NET -4. **Preserve backward compatibility** - Existing API signatures should not break unless absolutely necessary -5. **When in doubt, match existing code** - Follow what's already in the Java SDK, not the reference implementation - -### Commit Changes Incrementally - -**Important:** Commit your changes as you work, grouping related changes together: - -```bash -# After porting a feature or fix, commit with a descriptive message -git add -git commit -m "Port from the reference implementation" - -# Example commits: -# git commit -m "Port new authentication flow from the reference implementation" -# git commit -m "Add new message types from the reference implementation protocol update" -# git commit -m "Port bug fix for session handling from the reference implementation" -``` - -This creates a clear history of changes that can be reviewed in the Pull Request. - -### General Guidelines - -- **Naming Conventions**: Convert C# PascalCase to Java camelCase for methods/variables -- **Async Patterns**: C# `async/await` → Java `CompletableFuture` or synchronous equivalents -- **Nullable Types**: C# `?` nullable → Java `@Nullable` annotations or `Optional` -- **Properties**: C# properties → Java getters/setters or records -- **Records**: C# records → Java records (Java 17+) -- **Events**: C# events → Java callbacks or listeners - -### Type Mappings - -| C# Type | Java Equivalent | -|------------------------|------------------------------| -| `string` | `String` | -| `int` | `int` / `Integer` | -| `bool` | `boolean` / `Boolean` | -| `Task` | `CompletableFuture` | -| `CancellationToken` | (custom implementation) | -| `IAsyncEnumerable` | `Stream` or `Iterator` | -| `JsonElement` | `JsonNode` (Jackson) | -| `Dictionary` | `Map` | -| `List` | `List` | - -### Code Style - -Follow the existing Java SDK patterns: -- Use Jackson for JSON serialization (`ObjectMapper`) -- Use Java records for DTOs where appropriate -- Follow the existing package structure under `com.github.copilot` -- Maintain backward compatibility when possible -- **Match the style of surrounding code** - Consistency with existing code is more important than reference implementation patterns -- **Prefer existing abstractions** - If the Java SDK already solves a problem differently than .NET, keep the Java approach - -## Step 6: Port Tests - -After porting implementation changes, **always check for new or updated tests** in the reference implementation repository: - -### Check for New Tests - -```bash -cd "$TEMP_DIR/copilot-sdk" -git diff "$LAST_REFERENCE_IMPL_COMMIT"..origin/main --stat -- dotnet/test/ -git diff "$LAST_REFERENCE_IMPL_COMMIT"..origin/main --stat -- test/snapshots/ -``` - -### Port Test Cases - -For each new or modified test file in `dotnet/test/`: - -1. **Create corresponding Java test class** in `src/test/java/com/github/copilot/` -2. **Follow existing test patterns** - Look at existing tests like `PermissionsTest.java` for structure -3. **Use the E2ETestContext** infrastructure for tests that need the test harness -4. **Match snapshot directory names** - Test snapshots in `test/snapshots/` must match the directory name used in `ctx.configureForTest()` - -### Test File Mapping - -| reference implementation Test (.NET) | Java SDK Test | -|-----------------------------|--------------------------------------------------------| -| `dotnet/test/AskUserTests.cs` | `src/test/java/com/github/copilot/AskUserTest.java` | -| `dotnet/test/HooksTests.cs` | `src/test/java/com/github/copilot/HooksTest.java` | -| `dotnet/test/ClientTests.cs` | `src/test/java/com/github/copilot/CopilotClientTest.java` | -| `dotnet/test/*Tests.cs` | `src/test/java/com/github/copilot/*Test.java` | - -### Test Snapshot Compatibility - -New test snapshots are stored in `test/snapshots/` in the reference implementation repository. These snapshots are automatically cloned during the Maven build process. - -If tests fail with errors like `TypeError: Cannot read properties of undefined`, the test harness may not yet support the new RPC methods. In this case: - -1. **Mark tests as `@Disabled`** with a clear reason (e.g., `@Disabled("Requires test harness update with X support - see reference implementation PR #NNN")`) -2. **Document the dependency** in the test class Javadoc -3. **Enable tests later** once the harness is updated - -### Unit Tests vs E2E Tests - -- **Unit tests** (like auth option validation) can run without the test harness -- **E2E tests** require the test harness with matching snapshots - -Commit tests separately or together with their corresponding implementation changes. - -## Step 7: Format and Run Tests - -After applying changes, use the convenience script: - -```bash -./.github/scripts/build/format-and-test.sh # format + full verify -./.github/scripts/build/format-and-test.sh --debug # with debug logging -``` - -Or for quicker iteration during porting: - -```bash -./.github/scripts/build/format-and-test.sh --format-only # just spotless -./.github/scripts/build/format-and-test.sh --test-only # skip formatting -``` - -### If Tests Fail - -1. Read the test output carefully -2. Identify the root cause (compilation error, runtime error, assertion failure) -3. Fix the issue in the Java code -4. Re-run tests -5. Repeat until all tests pass - -### Common Issues - -- **Missing imports**: Add required import statements -- **Type mismatches**: Ensure proper type conversions -- **Null handling**: Add null checks where C# had nullable types -- **JSON serialization**: Verify Jackson annotations are correct - -## Step 8: Build the Package - -Once tests pass, build the complete package: - -```bash -mvn clean package -DskipTests -``` - -Verify: -- No compilation errors -- No warnings (if possible) -- JAR file is generated in `target/` - -## Step 9: Update Documentation - -**Documentation is critical for new features.** Every new feature ported from the reference implementation must be documented before the merge is complete. -Review and complete this documentation checklist before proceeding to Step 10. -If you determine no docs changes are needed, document that decision and rationale in the PR body under a clear heading (for example, `Documentation Impact`). - -### Documentation Checklist - -For each new feature or significant change: - -1. **README.md**: Update the main README if there are user-facing changes -2. **src/site/markdown/index.md**: Update if requirements or quick start examples change -3. **src/site/markdown/documentation.md**: Add sections for new basic usage patterns -4. **src/site/markdown/advanced.md**: Add sections for new advanced features (tools, handlers, configurations) -5. **src/site/markdown/mcp.md**: Update if MCP-related changes are made -6. **Javadoc**: Add/update Javadoc comments for all new/changed public APIs -7. **src/site/site.xml**: Update if new documentation pages were added - -### Documentation Requirements for New Features - -When adding a new feature, ensure the documentation includes: - -- **What it does**: Clear explanation of the feature's purpose -- **How to use it**: Code example showing typical usage -- **API reference**: Link to relevant Javadoc -- **Configuration options**: All available settings/properties - -### Example: Documenting a New Handler - -If a new handler (like `UserInputHandler`, `PermissionHandler`) is added, create a section in `advanced.md`: - -```markdown -## Feature Name - -Brief description of what the feature does. - -\`\`\`java -var session = client.createSession( - new SessionConfig() - .setOnFeatureRequest((request, invocation) -> { - // Handle the request - return CompletableFuture.completedFuture(result); - }) -).get(); -\`\`\` - -Explain the request/response objects and their properties. - -See [FeatureHandler](apidocs/com/github/copilot/rpc/FeatureHandler.html) Javadoc for more details. -``` - -### Verify Documentation Consistency - -Ensure consistency across all documentation files: - -- Requirements section should match in `README.md` and `src/site/markdown/index.md` -- Code examples should use the same patterns and be tested -- Links to Javadoc should use correct paths (`apidocs/...`) - -## Step 10: Finish, Push, and Finalize Pull Request - -Run the finish script which updates `.lastmerge`, runs a final build, and pushes the branch: - -```bash -./.github/scripts/reference-impl-sync/merge-reference-impl-finish.sh # full format + test + push -./.github/scripts/reference-impl-sync/merge-reference-impl-finish.sh --skip-tests # if tests already passed -``` - -### PR Handling: Coding Agent vs. Manual Workflow - -**If running as a Copilot coding agent** (triggered via GitHub issue assignment by the weekly sync workflow), a pull request has **already been created automatically** for you. Do NOT create a new one. Just push your commits to the current branch — the existing PR will be updated. Add the `reference-impl-sync` label to the existing PR by running this command in a terminal: - -```bash -gh pr edit --add-label "reference-impl-sync" -``` - -> **No-changes scenario (coding agent only):** If after analyzing the reference implementation diff there are no relevant changes to port to the Java SDK, push an empty commit with a message explaining why no changes were needed, so the PR reflects the analysis outcome. The repository maintainer will close the PR and issue manually. - -**If running manually** (e.g., from VS Code via the reusable prompt), create the Pull Request using `gh` CLI or the GitHub MCP tool. Then add the label: - -```bash -gh pr create --base main --title "Merge reference implementation SDK changes (YYYY-MM-DD)" --body-file /dev/stdin <<< "$PR_BODY" -gh pr edit --add-label "reference-impl-sync" -``` - -The PR body should include: -1. **Title**: `Merge reference implementation SDK changes (YYYY-MM-DD)` -2. **Body** with: - - Summary of reference implementation commits analyzed (with count and commit range) - - Table of changes ported (commit hash + description) - - List of changes intentionally not ported (with reasons) - - Verification status (test count, build status) - -### PR Body Template - -```markdown -## Reference Implementation Merge - -Ports changes from the official Copilot SDK ([github/copilot-sdk](https://github.com/github/copilot-sdk)) since last merge (``→``). - -### Reference implementation commits analyzed (N commits) - -- Brief description of each reference implementation change and whether it was ported or not - -### Changes ported - -| Commit | Description | -|---|---| -| `` | Description of change | - -### Not ported (intentionally) - -- **Feature name** — Reason why it wasn't ported - -### Verification - -- All **N tests pass** (`mvn clean test`) -- Package builds successfully (`mvn clean package -DskipTests`) -- Code formatted with Spotless -``` - -## Step 11: Final Review - -Before finishing: - -1. Run `git log --oneline main..$BRANCH_NAME` to review all commits -2. Run `git diff main..$BRANCH_NAME --stat` to see a summary of all changes -3. Ensure no unintended changes were made -4. Verify code follows project conventions -5. Confirm the branch was pushed to remote -6. Confirm the Pull Request is ready (created or updated) and provide the PR URL to the user - ---- - -## Checklist - -- [ ] ❌ **VERIFIED: No files in `src/generated/java/` were modified** (if any were needed, sync was stopped per ABSOLUTE PROHIBITION above) -- [ ] New branch created from `main` -- [ ] Copilot CLI updated to latest version -- [ ] README.md updated with minimum CLI version requirement -- [ ] reference implementation repository cloned -- [ ] Diff analyzed between `.lastmerge` commit and HEAD -- [ ] New features/fixes identified -- [ ] Changes ported to Java SDK following conventions -- [ ] **New/updated tests ported from the reference implementation** (check `dotnet/test/` and `test/snapshots/`) -- [ ] Tests marked `@Disabled` if harness doesn't support new features yet -- [ ] Changes committed incrementally with descriptive messages -- [ ] `mvn test` passes -- [ ] `mvn package` builds successfully -- [ ] **Documentation updated for new features:** - - [ ] `README.md` updated if user-facing changes - - [ ] `src/site/markdown/index.md` updated if requirements changed - - [ ] `src/site/markdown/documentation.md` updated for new basic usage - - [ ] `src/site/markdown/advanced.md` updated for new advanced features - - [ ] Javadoc added/updated for new public APIs -- [ ] If no documentation files were changed for user-facing reference implementation changes, PR body explicitly explains why documentation changes were not needed -- [ ] `src/site/site.xml` updated if new documentation pages were added -- [ ] `.lastmerge` file updated with new commit hash -- [ ] Branch pushed to remote -- [ ] **Pull Request finalized** (coding agent: push to existing PR; manual: create via `mcp_github_create_pull_request`) -- [ ] **`reference-impl-sync` label added** to the PR via `mcp_github_add_issue_labels` -- [ ] PR URL provided to user - ---- - -## Notes - -- ❌❌❌ **`src/generated/java/` IS FORBIDDEN** — NEVER modify generated files; re-run `update-copilot-dependency.yml` instead ❌❌❌ -- The reference implementation SDK is at: `https://github.com/github/copilot-sdk.git` -- Primary reference implementation is in `dotnet/` folder -- This Java SDK targets Java 17+ -- Uses Jackson for JSON processing -- Uses JUnit 5 for testing -- **Java SDK design decisions take precedence over reference implementation patterns** -- **Adapt reference implementation changes to fit Java idioms, not the other way around** - diff --git a/.github/prompts/coding-agent-merge-reference-impl-instructions.md b/.github/prompts/coding-agent-merge-reference-impl-instructions.md deleted file mode 100644 index 5ae1621db6..0000000000 --- a/.github/prompts/coding-agent-merge-reference-impl-instructions.md +++ /dev/null @@ -1,33 +0,0 @@ - - - -Follow the agentic-merge-reference-impl prompt at .github/prompts/agentic-merge-reference-impl.prompt.md -to port reference implementation changes to the Java SDK. - -Use the utility scripts in .github/scripts/ subfolders for initialization, diffing, formatting, and testing. -Commit changes incrementally. Update .lastmerge when done. - -IMPORTANT: A pull request has already been created automatically for you — do NOT create a new -one. Push your commits to the current branch, and the existing PR will be updated. - -Add the 'reference-impl-sync' label to the existing PR by running this command in a terminal: - - gh pr edit --add-label "reference-impl-sync" - -If after analyzing the reference implementation diff there are no relevant changes to port to the Java SDK, -push an empty commit with a message explaining why no changes were needed, so the PR reflects -the analysis outcome. The repository maintainer will close the PR and issue manually. - -❌❌❌ ABSOLUTE PROHIBITION ❌❌❌ - -NEVER MODIFY ANY FILE UNDER src/generated/java/ — THESE FILES ARE AUTO-GENERATED AND FORBIDDEN. - -If any change requires modifying src/generated/java/: -1. STOP IMMEDIATELY — do not make the change -2. FAIL the sync with an explanatory commit message -3. Instruct the maintainer to re-run update-copilot-dependency.yml to regenerate these files - -See the ABSOLUTE PROHIBITION section in .github/prompts/agentic-merge-reference-impl.prompt.md -for the full required procedure and commit message template. - -❌❌❌ END ABSOLUTE PROHIBITION ❌❌❌ diff --git a/.github/prompts/commit-as-pull-request.prompt.md b/.github/prompts/commit-as-pull-request.prompt.md deleted file mode 100644 index 91b33fabc4..0000000000 --- a/.github/prompts/commit-as-pull-request.prompt.md +++ /dev/null @@ -1,108 +0,0 @@ -# Commit as Pull Request - -You are an automated assistant that takes the current uncommitted changes in the workspace, creates a branch, commits, pushes, opens a pull request, merges it, and syncs the local `main` branch. - -## Prerequisites - -- The workspace must be a git repository with a configured remote named `origin`. -- The project must be compiling successfully with the current changes (if applicable). -- The project must be building successfully with the current changes (if applicable). -- There must be uncommitted changes (staged or unstaged) in the working tree. -- The GitHub MCP tools must be available for creating and merging pull requests. - -## Helper Scripts - -The following scripts in `.github/scripts/ci/` automate the git operations for this workflow: - -| Script | Purpose | -|--------|---------| -| `parse-repo-info.sh` | Extracts `REPO_OWNER` and `REPO_NAME` from the git remote URL | -| `commit-and-push.sh` | Verifies changes, runs formatter, creates branch, commits, and pushes | -| `sync-after-merge.sh` | Syncs local `main` and deletes the feature branch | - -## Workflow - -Execute the following steps **in order**. Stop immediately if any step fails. - -### Step 1: Determine the repository owner and name - -```bash -eval "$(.github/scripts/ci/parse-repo-info.sh)" -# Sets: REPO_OWNER, REPO_NAME -``` - -### Step 2: Auto-detect branch name and define commit message - -Analyze the changed files using `git diff` (and `git diff --cached` for staged changes) to understand what was modified. Generate: - -- **Branch name**: A short, kebab-case branch name prefixed with an appropriate category (`fix/`, `feat/`, `docs/`, `refactor/`, `chore/`). Example: `fix/cliurl-auto-correct-usestdio`. -- **Commit message**: A clear, descriptive commit message following the project conventions: - - First line: imperative verb, under 72 characters (e.g., "Fix cliUrl to auto-correct useStdio") - - Body (if needed): explain *why* the change was made - -If the user has provided an explicit branch name or commit message, use those instead. - -### Step 3: Verify the project builds - -If the changes include Java source files, run the build to confirm the project compiles and tests pass: - -```bash -mvn clean verify -``` - -If only non-Java files changed (e.g., documentation, scripts, configuration), this step may be skipped. - -**Stop immediately if the build fails.** Do not proceed to commit broken code. - -### Step 4: Commit and push - -Runs the formatter (if applicable), creates the branch, stages all changes, commits, and pushes: - -```bash -.github/scripts/ci/commit-and-push.sh "" "" -# Outputs: BRANCH_NAME (may differ if suffix was appended) -``` - -Pass `--skip-format` as a third argument to skip `mvn spotless:apply` (e.g., when only non-Java files changed). - -### Step 5: Create a pull request - -Use the GitHub MCP `create_pull_request` tool with: - -- **owner** and **repo**: from Step 1 -- **title**: the first line of the commit message -- **head**: the branch name from Step 4 -- **base**: `main` (or the repository's default branch) -- **body**: A well-structured PR description including: - - **Summary**: What the change does and why - - **Changes**: Bullet list of files/areas modified - - **Testing**: How the changes were verified - -### Step 6: Merge the pull request - -Use the GitHub MCP `merge_pull_request` tool with: - -- **merge_method**: `squash` -- **commit_title**: ` (#)` - -### Step 7: Sync and clean up - -```bash -.github/scripts/ci/sync-after-merge.sh "" -``` - -## Error Handling - -- Branch name collisions are handled automatically by `commit-and-push.sh` (appends a numeric suffix). -- If the push fails due to authentication, the script exits with code 2 — inform the user and stop. -- If the PR creation fails, provide the error and stop. -- If the merge fails (e.g., merge conflicts, required checks), inform the user and leave the PR open. - -## Output - -After completion, provide a brief summary: - -1. Branch name -2. PR URL and number -3. Merge commit SHA -4. Confirmation that local `main` is up to date diff --git a/.github/prompts/test-coverage-assessment.prompt.md b/.github/prompts/test-coverage-assessment.prompt.md deleted file mode 100644 index 6233ad099e..0000000000 --- a/.github/prompts/test-coverage-assessment.prompt.md +++ /dev/null @@ -1,125 +0,0 @@ -# Test Coverage Assessment - -You are an expert Java developer tasked with analyzing test coverage for this Java SDK. Your goal is to produce a comprehensive report of what is tested and what gaps exist. - -## Objective - -Analyze the test coverage of the SDK by examining: -1. **Event types** - All session events defined in `SessionEventParser` -2. **Hook types** - All hooks defined in `SessionHooks` -3. **Core functionality** - Session management, tools, permissions, etc. - -## Assessment Process - -### Step 1: Identify All Testable Components - -First, examine the source code to identify all components that should be tested: - -```bash -# List all event classes -ls src/main/java/com/github/copilot/events/ - -# Check the event type mapping in SessionEventParser -grep -n "TYPE_MAP.put" src/main/java/com/github/copilot/events/SessionEventParser.java -``` - -Extract the list of all registered event types from `SessionEventParser.java`. - -### Step 2: Identify All Hook Types - -Check `SessionHooks.java` for all available hook handlers: - -```bash -grep -E "private.*Handler" src/main/java/com/github/copilot/rpc/SessionHooks.java -``` - -### Step 3: Analyze Existing Tests - -Examine the test files to understand current coverage: - -```bash -# List all test files -ls src/test/java/com/github/copilot/ - -# Check for event-related tests -grep -r "import.*events\." src/test/java/com/github/copilot/ | grep -v "\.class" - -# Check for hook tests -grep -l "SessionHooks\|Hook" src/test/java/com/github/copilot/*.java -``` - -### Step 4: Categorize Test Coverage - -For each component, determine: -- **Unit Test Coverage**: Tests that verify JSON parsing/serialization without E2E flow -- **E2E Test Coverage**: Tests that verify the component works in a real session flow - -## Report Format - -Generate a comprehensive report in the following format: - -### Event Types Coverage - -| Event Type | Event Class | Unit Test | E2E Test | Notes | -|------------|-------------|:---------:|:--------:|-------| -| `session.start` | `SessionStartEvent` | ✅/❌ | ✅/❌ | Any notes | -| ... | ... | ... | ... | ... | - -### Hook Types Coverage - -| Hook Type | Handler Interface | Unit Test | E2E Test | Notes | -|-----------|-------------------|:---------:|:--------:|-------| -| `preToolUse` | `PreToolUseHandler` | ✅/❌ | ✅/❌ | Any notes | -| ... | ... | ... | ... | ... | - -### Coverage Summary - -| Category | Total | Unit Tested | E2E Tested | Coverage % | -|----------|-------|-------------|------------|------------| -| Events | X | X | X | X% | -| Hooks | X | X | X | X% | - -### Gaps Identified - -List components that lack tests: -1. **Missing Unit Tests**: Components without JSON parsing tests -2. **Missing E2E Tests**: Components not exercised in integration tests -3. **Partially Tested**: Components with incomplete test coverage - -### Recommendations - -Prioritized list of tests to add: -1. High priority: Critical paths without coverage -2. Medium priority: Common use cases without coverage -3. Low priority: Edge cases and rare events - -## Key Files to Examine - -- `src/main/java/com/github/copilot/events/SessionEventParser.java` - Event type registry -- `src/main/java/com/github/copilot/rpc/SessionHooks.java` - Hook definitions -- `src/main/java/com/github/copilot/CopilotSession.java` - Hook handling logic -- `src/test/java/com/github/copilot/SessionEventParserTest.java` - Event parsing tests -- `src/test/java/com/github/copilot/SessionEventsE2ETest.java` - Event E2E tests -- `src/test/java/com/github/copilot/HooksTest.java` - Hook tests -- `src/test/java/com/github/copilot/SessionEventHandlingTest.java` - Event handling tests - -## Verification - -After producing the report, verify by running: - -```bash -# Count total tests -mvn test 2>&1 | grep "Tests run:" - -# Run specific test categories -mvn test -Dtest=SessionEventParserTest -mvn test -Dtest=SessionEventsE2ETest -mvn test -Dtest=HooksTest -``` - -## Output - -Provide: -1. The complete coverage report in markdown table format -2. A prioritized list of recommended improvements -3. Optionally: Skeleton test code for missing high-priority tests diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md deleted file mode 100644 index 8993ca1468..0000000000 --- a/.github/pull_request_template.md +++ /dev/null @@ -1,29 +0,0 @@ - - -Resolves #ISSUE_NUMBER - ----- - -### Before the change? - - -* - -### After the change? - - -* - -### Pull request checklist -- [ ] Tests for the changes have been added (for bug fixes / features) -- [ ] Docs have been reviewed and added / updated if needed (for bug fixes / features) -- [ ] `mvn spotless:apply` has been run to format the code -- [ ] `mvn clean verify` passes locally - -### Does this introduce a breaking change? - - -- [ ] Yes -- [ ] No - ----- diff --git a/.github/release.yml b/.github/release.yml deleted file mode 100644 index 122230d0eb..0000000000 --- a/.github/release.yml +++ /dev/null @@ -1,33 +0,0 @@ -# Configuration for automatically generated release notes -# https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes - -changelog: - header: | - 📋 **Full Changelog**: See [CHANGELOG.md](https://github.com/github/copilot-sdk-java/blob/main/CHANGELOG.md) for detailed release notes. - exclude: - labels: - - ignore-for-release - authors: - - dependabot - - github-actions[bot] - categories: - - title: 🚀 Features - labels: - - enhancement - - feature - - title: 🐛 Bug Fixes - labels: - - bug - - fix - - title: 📚 Documentation - labels: - - documentation - - docs - - title: 🔧 Maintenance - labels: - - chore - - maintenance - - dependencies - - title: 📦 Other Changes - labels: - - "*" diff --git a/.github/scripts/build/format-and-test.sh b/.github/scripts/build/format-and-test.sh deleted file mode 100755 index c827813bb1..0000000000 --- a/.github/scripts/build/format-and-test.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env bash -# ────────────────────────────────────────────────────────────── -# format-and-test.sh -# -# Convenience script that runs the full quality pipeline: -# 1. spotless:apply (auto-format code) -# 2. mvn clean verify (compile + test + checkstyle + spotbugs) -# -# Usage: ./.github/scripts/build/format-and-test.sh -# ./.github/scripts/build/format-and-test.sh --format-only -# ./.github/scripts/build/format-and-test.sh --test-only -# ./.github/scripts/build/format-and-test.sh --debug (uses -Pdebug) -# ────────────────────────────────────────────────────────────── -set -euo pipefail - -ROOT_DIR="$(cd "$(dirname "$0")/../../.." && pwd)" -cd "$ROOT_DIR" - -FORMAT=true -TEST=true -MVN_PROFILE="" - -for arg in "$@"; do - case "$arg" in - --format-only) TEST=false ;; - --test-only) FORMAT=false ;; - --debug) MVN_PROFILE="-Pdebug" ;; - *) echo "Unknown option: $arg"; exit 1 ;; - esac -done - -if $FORMAT; then - echo "▸ Running Spotless (format)…" - mvn spotless:apply -fi - -if $TEST; then - echo "▸ Running mvn clean verify $MVN_PROFILE …" - mvn clean verify $MVN_PROFILE - echo "" - echo "✅ All checks passed." -else - echo "✅ Formatting complete." -fi diff --git a/.github/scripts/ci/commit-and-push.sh b/.github/scripts/ci/commit-and-push.sh deleted file mode 100755 index 65fcac51b8..0000000000 --- a/.github/scripts/ci/commit-and-push.sh +++ /dev/null @@ -1,77 +0,0 @@ -#!/usr/bin/env bash -# Verify changes, optionally run the code formatter, create a branch, -# stage all changes, commit, and push to origin. -# -# Usage: -# ./commit-and-push.sh [--skip-format] -# -# Arguments: -# branch-name The branch to create (e.g., fix/my-change) -# commit-message The commit message (may include newlines via $'...' syntax) -# --skip-format Skip running mvn spotless:apply -# -# Exit codes: -# 0 Success -# 1 No changes to commit / general error -# 2 Push failed - -set -euo pipefail - -if [[ $# -lt 2 ]]; then - echo "Usage: $0 [--skip-format]" >&2 - exit 1 -fi - -branch_name="$1" -commit_message="$2" -skip_format="${3:-}" - -# -- Step 1: Verify there are changes to commit --------------------------------- -if [[ -z "$(git status --porcelain)" ]]; then - echo "ERROR: No uncommitted changes found. Nothing to commit." >&2 - exit 1 -fi - -echo "✓ Uncommitted changes detected." - -# -- Step 4: Run code formatter (if applicable) ---------------------------------- -if [[ "$skip_format" != "--skip-format" ]] && [[ -f pom.xml ]]; then - if grep -q 'spotless-maven-plugin' pom.xml 2>/dev/null; then - echo "Running Spotless formatter..." - mvn -q spotless:apply - echo "✓ Spotless formatting applied." - fi -fi - -# -- Step 5: Create branch, stage, and commit ------------------------------------ -# If the branch already exists locally, append a numeric suffix -actual_branch="$branch_name" -suffix=2 -while git show-ref --verify --quiet "refs/heads/$actual_branch" 2>/dev/null; do - actual_branch="${branch_name}-${suffix}" - suffix=$((suffix + 1)) -done - -git checkout -b "$actual_branch" -git add -A -git commit -m "$commit_message" - -echo "✓ Committed on branch '$actual_branch'." - -# -- Step 6: Push the branch ----------------------------------------------------- -if ! git push -u origin "$actual_branch" 2>&1; then - echo "ERROR: Push failed." >&2 - exit 2 -fi - -# Verify the push actually transferred the commit -remote_sha=$(git ls-remote origin "refs/heads/$actual_branch" | awk '{print $1}') -local_sha=$(git rev-parse HEAD) - -if [[ "$remote_sha" != "$local_sha" ]]; then - echo "WARNING: Remote SHA does not match local. Retrying push..." >&2 - git push -u origin "$actual_branch" 2>&1 || { echo "ERROR: Retry push failed." >&2; exit 2; } -fi - -echo "✓ Pushed to origin/$actual_branch." -echo "BRANCH_NAME=$actual_branch" diff --git a/.github/scripts/ci/create-issue-assigned-to-copilot.ts b/.github/scripts/ci/create-issue-assigned-to-copilot.ts deleted file mode 100644 index 28f02c6b1e..0000000000 --- a/.github/scripts/ci/create-issue-assigned-to-copilot.ts +++ /dev/null @@ -1,135 +0,0 @@ -import { Octokit } from '@octokit/rest'; - -const GITHUB_TOKEN = process.env.GITHUB_TOKEN; -const GITHUB_REPO_OWNER = process.env.GITHUB_REPO_OWNER; -const GITHUB_REPO_NAME = process.env.GITHUB_REPO_NAME; - -const GRAPHQL_FEATURES_HEADER = 'issues_copilot_assignment_api_support,coding_agent_model_selection'; - -/** - * Creates a GitHub issue and assigns it to the Copilot Coding Agent. - * Follows the official GitHub API docs: - * 1. Query suggestedActors to find copilot-swe-agent and get its node ID - * 2. Get the repository node ID - * 3. Create issue with assigneeIds + agentAssignment, including required GraphQL-Features header - * Returns the issue URL on success, null on failure. - */ -export async function createIssueWithCopilot(description: string): Promise { - if (!GITHUB_TOKEN || !GITHUB_REPO_OWNER || !GITHUB_REPO_NAME) { - return null; - } - - if (!description.trim()) { - return null; - } - - const octokit = new Octokit({ auth: GITHUB_TOKEN }); - - try { - // Step 1: Fetch repo ID and find copilot-swe-agent in suggestedActors - const repoInfo: any = await octokit.graphql(` - query($owner: String!, $name: String!) { - repository(owner: $owner, name: $name) { - id - suggestedActors(capabilities: [CAN_BE_ASSIGNED], first: 100) { - nodes { - login - __typename - ... on Bot { id } - ... on User { id } - } - } - } - } - `, { - owner: GITHUB_REPO_OWNER, - name: GITHUB_REPO_NAME, - headers: { - 'GraphQL-Features': GRAPHQL_FEATURES_HEADER, - }, - }); - - const repoId = repoInfo?.repository?.id; - if (!repoId) { - console.error('Could not fetch repository ID'); - return null; - } - - const copilotBot = repoInfo.repository.suggestedActors.nodes.find( - (node: any) => node.login === 'copilot-swe-agent' - ); - - let botId: string; - if (copilotBot) { - botId = copilotBot.id; - console.log(`Found Copilot bot: login=${copilotBot.login}, id=${botId}, type=${copilotBot.__typename}`); - } else { - // Fallback: the GITHUB_TOKEN in Actions may lack permission to see suggestedActors. - // Use the known node ID for copilot-swe-agent. - botId = 'BOT_kgDOC9w8XQ'; - console.log(`copilot-swe-agent not found in suggestedActors, using known bot ID: ${botId}`); - } - - const title = description.split('\n')[0].slice(0, 100); - - // Step 2: Create issue with agentAssignment and required GraphQL-Features header - const response: any = await octokit.graphql(` - mutation($repoId: ID!, $title: String!, $body: String!, $assigneeIds: [ID!]) { - createIssue(input: { - repositoryId: $repoId, - title: $title, - body: $body, - assigneeIds: $assigneeIds, - agentAssignment: { - targetRepositoryId: $repoId, - baseRef: "main", - customInstructions: "", - customAgent: "", - model: "" - } - }) { - issue { - number - title - url - assignees(first: 10) { nodes { login } } - } - } - } - `, { - repoId, - title, - body: description, - assigneeIds: [botId], - headers: { - 'GraphQL-Features': GRAPHQL_FEATURES_HEADER, - }, - }); - - const issue = response?.createIssue?.issue; - if (!issue) { - return null; - } - - console.log(`Assigned to: ${issue.assignees.nodes.map((a: any) => a.login).join(', ')}`); - return issue.url; - } catch (error) { - console.error('Error creating issue:', error); - return null; - } -} - -// CLI entry point -const description = process.argv[2]; -if (!description) { - console.error('Usage: npx tsx create-issue-assigned-to-copilot.py '); - process.exit(1); -} -createIssueWithCopilot(description).then((url) => { - if (url) { - console.log(`Issue created: ${url}`); - } else { - console.error('Failed to create issue'); - process.exit(1); - } -}); \ No newline at end of file diff --git a/.github/scripts/ci/parse-repo-info.sh b/.github/scripts/ci/parse-repo-info.sh deleted file mode 100755 index 3d89115c77..0000000000 --- a/.github/scripts/ci/parse-repo-info.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bash -# Parse the GitHub owner and repository name from the git remote URL. -# Outputs two lines: owner on the first, repo on the second. -# Handles both HTTPS and SSH remote URL formats. -# -# Usage: -# eval "$(./parse-repo-info.sh)" -# echo "Owner: $REPO_OWNER Repo: $REPO_NAME" - -set -euo pipefail - -remote_url=$(git remote get-url origin 2>/dev/null) || { - echo "ERROR: No git remote named 'origin' found." >&2 - exit 1 -} - -# Strip trailing .git if present -remote_url="${remote_url%.git}" - -if [[ "$remote_url" =~ github\.com[:/]([^/]+)/([^/]+)$ ]]; then - owner="${BASH_REMATCH[1]}" - repo="${BASH_REMATCH[2]}" -else - echo "ERROR: Could not parse owner/repo from remote URL: $remote_url" >&2 - exit 1 -fi - -echo "REPO_OWNER=$owner" -echo "REPO_NAME=$repo" diff --git a/.github/scripts/ci/sync-after-merge.sh b/.github/scripts/ci/sync-after-merge.sh deleted file mode 100755 index 94ec9cf8e8..0000000000 --- a/.github/scripts/ci/sync-after-merge.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bash -# After a PR has been merged, sync the local main branch and -# optionally delete the local feature branch. -# -# Usage: -# ./sync-after-merge.sh [branch-name] -# -# Arguments: -# branch-name The local branch to delete (optional). Skipped if omitted. - -set -euo pipefail - -branch_name="${1:-}" - -# -- Step 9: Sync local main ---------------------------------------------------- -git checkout main -git pull - -echo "✓ Local main is up to date." - -# -- Step 10: Clean up the local branch ------------------------------------------ -if [[ -n "$branch_name" ]]; then - if git show-ref --verify --quiet "refs/heads/$branch_name" 2>/dev/null; then - git branch -d "$branch_name" 2>/dev/null || git branch -D "$branch_name" - echo "✓ Deleted local branch '$branch_name'." - else - echo "Branch '$branch_name' does not exist locally (already cleaned up)." - fi -fi diff --git a/.github/scripts/generate-coverage-badge.sh b/.github/scripts/generate-coverage-badge.sh deleted file mode 100755 index 324b3194fb..0000000000 --- a/.github/scripts/generate-coverage-badge.sh +++ /dev/null @@ -1,108 +0,0 @@ -#!/usr/bin/env bash -# Generates SVG coverage badges from a JaCoCo CSV report. -# -# Usage: generate-coverage-badge.sh [jacoco.csv] [output-dir] -# jacoco.csv - Path to JaCoCo CSV report (default: target/site/jacoco-coverage/jacoco.csv) -# output-dir - Directory for the badge SVG (default: .github/badges) -set -euo pipefail - -CSV="${1:-target/site/jacoco-coverage/jacoco.csv}" -BADGES_DIR="${2:-.github/badges}" -GENERATED_PREFIX="com.github.copilot.sdk.generated" - -if [ ! -f "$CSV" ]; then - echo "⚠️ No JaCoCo CSV report found at $CSV" - exit 0 -fi - -calc_totals() { - local scope=$1 - awk -F',' -v scope="$scope" -v generated_prefix="$GENERATED_PREFIX" ' - NR > 1 { - is_generated = index($2, generated_prefix) == 1 - if (scope == "overall" || - (scope == "generated" && is_generated) || - (scope == "handwritten" && !is_generated)) { - missed += $4 - covered += $5 - } - } - END { print missed + 0, covered + 0 } - ' "$CSV" -} - -format_pct() { - local missed=$1 - local covered=$2 - local total=$((missed + covered)) - if [ "$total" -eq 0 ]; then - echo "0" - else - awk "BEGIN { printf \"%.1f\", ($covered / $total) * 100 }" | sed 's/\.0$//' - fi -} - -pick_color() { - local pct=$1 - local color="#e05d44" # red <60 - if awk "BEGIN{exit!($pct>=100)}"; then color="#4c1" # bright green - elif awk "BEGIN{exit!($pct>=90)}"; then color="#97ca00" # green - elif awk "BEGIN{exit!($pct>=80)}"; then color="#a4a61d" # yellow-green - elif awk "BEGIN{exit!($pct>=70)}"; then color="#dfb317" # yellow - elif awk "BEGIN{exit!($pct>=60)}"; then color="#fe7d37" # orange - fi - echo "$color" -} - -generate_badge() { - local label=$1 - local value=$2 - local output=$3 - local pct=${value%\%} - local color - color=$(pick_color "$pct") - local lw=$(( ${#label} * 7 + 12 )) - local vw=$(( ${#value} * 7 + 16 )) - local tw=$((lw + vw)) - - cat > "$output" < - - - - - - - - - - - - ${label} - ${label} - ${value} - ${value} - - -EOF -} - -mkdir -p "$BADGES_DIR" - -read -r overall_missed overall_covered <<< "$(calc_totals overall)" -read -r handwritten_missed handwritten_covered <<< "$(calc_totals handwritten)" -read -r generated_missed generated_covered <<< "$(calc_totals generated)" - -overall_pct=$(format_pct "$overall_missed" "$overall_covered") -handwritten_pct=$(format_pct "$handwritten_missed" "$handwritten_covered") -generated_pct=$(format_pct "$generated_missed" "$generated_covered") - -echo "Overall coverage: ${overall_pct}%" -echo "Handwritten coverage: ${handwritten_pct}%" -echo "Generated coverage: ${generated_pct}%" - -generate_badge "coverage" "${overall_pct}%" "${BADGES_DIR}/jacoco.svg" -generate_badge "coverage handwritten" "${handwritten_pct}%" "${BADGES_DIR}/jacoco-handwritten.svg" -generate_badge "coverage generated" "${generated_pct}%" "${BADGES_DIR}/jacoco-generated.svg" - -echo "Badges generated in ${BADGES_DIR}" diff --git a/.github/scripts/reference-impl-sync/merge-reference-impl-diff.sh b/.github/scripts/reference-impl-sync/merge-reference-impl-diff.sh deleted file mode 100755 index 8ff8701035..0000000000 --- a/.github/scripts/reference-impl-sync/merge-reference-impl-diff.sh +++ /dev/null @@ -1,86 +0,0 @@ -#!/usr/bin/env bash -# ────────────────────────────────────────────────────────────── -# merge-reference-impl-diff.sh -# -# Generates a detailed diff analysis of reference implementation changes since -# the last merge, grouped by area of interest: -# • .NET source (primary reference) -# • .NET tests -# • Test snapshots -# • Documentation -# • Protocol / config files -# -# Usage: ./.github/scripts/reference-impl-sync/merge-reference-impl-diff.sh [--full] -# --full Show actual diffs, not just stats -# -# Requires: .merge-env written by merge-reference-impl-start.sh -# ────────────────────────────────────────────────────────────── -set -euo pipefail - -ROOT_DIR="$(cd "$(dirname "$0")/../../.." && pwd)" -ENV_FILE="$ROOT_DIR/.merge-env" - -if [[ ! -f "$ENV_FILE" ]]; then - echo "❌ $ENV_FILE not found. Run ./.github/scripts/reference-impl-sync/merge-reference-impl-start.sh first." - exit 1 -fi - -# shellcheck source=/dev/null -source "$ENV_FILE" - -SHOW_FULL=false -if [[ "${1:-}" == "--full" ]]; then - SHOW_FULL=true -fi - -cd "$REFERENCE_IMPL_DIR" -git fetch origin main 2>/dev/null - -RANGE="$LAST_MERGE_COMMIT..origin/main" - -echo "════════════════════════════════════════════════════════════" -echo " Reference implementation diff analysis: $RANGE" -echo "════════════════════════════════════════════════════════════" - -# ── Commit log ──────────────────────────────────────────────── -echo "" -echo "── Commit log ──" -git log --oneline --no-decorate "$RANGE" -echo "" - -# Helper to print a section -section() { - local title="$1"; shift - local paths=("$@") - - echo "── $title ──" - local stat - stat=$(git diff "$RANGE" --stat -- "${paths[@]}" 2>/dev/null || true) - if [[ -z "$stat" ]]; then - echo " (no changes)" - else - echo "$stat" - if $SHOW_FULL; then - echo "" - git diff "$RANGE" -- "${paths[@]}" 2>/dev/null || true - fi - fi - echo "" -} - -# ── Sections ────────────────────────────────────────────────── -section ".NET source (dotnet/src)" "dotnet/src/" -section ".NET tests (dotnet/test)" "dotnet/test/" -section "Test snapshots" "test/snapshots/" -section "Documentation (docs/)" "docs/" -section "Protocol & config" "sdk-protocol-version.json" "package.json" "justfile" -section "Go SDK" "go/" -section "Node.js SDK" "nodejs/" -section "Python SDK" "python/" -section "Other files" "README.md" "CONTRIBUTING.md" "SECURITY.md" "SUPPORT.md" - -echo "════════════════════════════════════════════════════════════" -echo " To see full diffs: $0 --full" -echo " To see a specific path:" -echo " cd $REFERENCE_IMPL_DIR && git diff $RANGE -- " -echo "════════════════════════════════════════════════════════════" diff --git a/.github/scripts/reference-impl-sync/merge-reference-impl-finish.sh b/.github/scripts/reference-impl-sync/merge-reference-impl-finish.sh deleted file mode 100755 index 2dda8da07f..0000000000 --- a/.github/scripts/reference-impl-sync/merge-reference-impl-finish.sh +++ /dev/null @@ -1,81 +0,0 @@ -#!/usr/bin/env bash -# ────────────────────────────────────────────────────────────── -# merge-reference-impl-finish.sh -# -# Finalises a reference implementation merge: -# 1. Runs format + test + build (via format-and-test.sh) -# 2. Updates .lastmerge to reference implementation HEAD -# 3. Syncs the @github/copilot version property in pom.xml from the -# cloned reference implementation's nodejs/package.json -# 4. Syncs scripts/codegen/package.json to the same @github/copilot -# version so the code generator uses matching schemas -# 5. Commits the .lastmerge + pom.xml + codegen package updates -# 6. Pushes the branch to origin -# -# Usage: ./.github/scripts/reference-impl-sync/merge-reference-impl-finish.sh -# ./.github/scripts/reference-impl-sync/merge-reference-impl-finish.sh --skip-tests -# -# Requires: .merge-env written by merge-reference-impl-start.sh -# ────────────────────────────────────────────────────────────── -set -euo pipefail - -ROOT_DIR="$(cd "$(dirname "$0")/../../.." && pwd)" -ENV_FILE="$ROOT_DIR/.merge-env" - -if [[ ! -f "$ENV_FILE" ]]; then - echo "❌ $ENV_FILE not found. Run ./.github/scripts/reference-impl-sync/merge-reference-impl-start.sh first." - exit 1 -fi - -# shellcheck source=/dev/null -source "$ENV_FILE" - -SKIP_TESTS=false -if [[ "${1:-}" == "--skip-tests" ]]; then - SKIP_TESTS=true -fi - -cd "$ROOT_DIR" - -# ── 1. Format, test, build ─────────────────────────────────── -if $SKIP_TESTS; then - echo "▸ Formatting only (tests skipped)…" - mvn spotless:apply - mvn clean package -DskipTests -else - echo "▸ Running format + test + build…" - "$ROOT_DIR/.github/scripts/build/format-and-test.sh" -fi - -# ── 2. Update .lastmerge ───────────────────────────────────── -echo "▸ Updating .lastmerge…" -NEW_COMMIT=$(cd "$REFERENCE_IMPL_DIR" && git rev-parse origin/main) -echo "$NEW_COMMIT" > "$ROOT_DIR/.lastmerge" - -# ── 2b. Sync pom.xml @github/copilot version ───────────────── -# Keeps the canonical CLI version in pom.xml aligned with what the -# reference implementation pinned in .lastmerge depends on. -echo "▸ Syncing @github/copilot version in pom.xml from reference implementation…" -"$ROOT_DIR/.github/scripts/reference-impl-sync/sync-cli-version-from-reference-impl.sh" "$REFERENCE_IMPL_DIR" - -# ── 2c. Sync scripts/codegen @github/copilot version ───────── -# Keeps scripts/codegen/package.json in lockstep so the code generator -# uses schemas from the same CLI version that the tests run against. -# This eliminates the gap where Dependabot could race ahead of the -# reference implementation sync. -echo "▸ Syncing @github/copilot version in scripts/codegen/package.json…" -"$ROOT_DIR/.github/scripts/reference-impl-sync/sync-codegen-version.sh" "$REFERENCE_IMPL_DIR" - -git add .lastmerge pom.xml scripts/codegen/package.json scripts/codegen/package-lock.json -git commit -m "Update .lastmerge to $NEW_COMMIT, sync pom.xml CLI version, and update scripts/codegen @github/copilot version" - -# ── 3. Push branch ─────────────────────────────────────────── -echo "▸ Pushing branch $BRANCH_NAME to origin…" -git push -u origin "$BRANCH_NAME" - -echo "" -echo "✅ Branch pushed. Next step:" -echo " Create a Pull Request (base: main, head: $BRANCH_NAME)" -echo "" -echo " Suggested title: Merge reference implementation SDK changes ($(date +%Y-%m-%d))" -echo " Don't forget to add the 'reference-impl-sync' label." diff --git a/.github/scripts/reference-impl-sync/merge-reference-impl-start.sh b/.github/scripts/reference-impl-sync/merge-reference-impl-start.sh deleted file mode 100755 index 76408e4ec1..0000000000 --- a/.github/scripts/reference-impl-sync/merge-reference-impl-start.sh +++ /dev/null @@ -1,88 +0,0 @@ -#!/usr/bin/env bash -# ────────────────────────────────────────────────────────────── -# merge-reference-impl-start.sh -# -# Prepares the workspace for a reference implementation merge: -# 1. Creates a dated branch from main -# 2. Updates Copilot CLI and records the new version -# 3. Clones the reference implementation copilot-sdk repo into a temp dir -# 4. Reads .lastmerge and prints a short summary of new commits -# -# Usage: ./.github/scripts/reference-impl-sync/merge-reference-impl-start.sh -# Output: Exports REFERENCE_IMPL_DIR and LAST_MERGE_COMMIT to a -# .merge-env file so other scripts can source it. -# ────────────────────────────────────────────────────────────── -set -euo pipefail - -ROOT_DIR="$(cd "$(dirname "$0")/../../.." && pwd)" -cd "$ROOT_DIR" - -REFERENCE_IMPL_REPO="https://github.com/github/copilot-sdk.git" -ENV_FILE="$ROOT_DIR/.merge-env" - -# ── 1. Create branch (or reuse existing) ───────────────────── -CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) - -if [[ "$CURRENT_BRANCH" != "main" ]]; then - # Already on a non-main branch (e.g., coding agent's auto-created PR branch). - # Stay on this branch — do not create a new one. - BRANCH_NAME="$CURRENT_BRANCH" - echo "▸ Already on branch '$BRANCH_NAME' — reusing it (coding agent mode)." - git pull origin main --no-edit 2>/dev/null || echo " (pull from main skipped or fast-forward not possible)" -else - echo "▸ Ensuring main is up to date…" - git pull origin main - - BRANCH_NAME="merge-reference-impl-$(date +%Y%m%d)" - echo "▸ Creating branch: $BRANCH_NAME" - git checkout -b "$BRANCH_NAME" -fi - -# ── 2. Update Copilot CLI ──────────────────────────────────── -echo "▸ Updating Copilot CLI…" -if command -v copilot &>/dev/null; then - copilot update || echo " (copilot update returned non-zero – check manually)" - CLI_VERSION=$(copilot --version | head -n 1 | awk '{print $NF}') - echo " Copilot CLI version: $CLI_VERSION" -else - echo " ⚠ 'copilot' command not found – skipping CLI update." - CLI_VERSION="UNKNOWN" -fi - -# ── 3. Clone reference implementation ──────────────────────────────────────── -TEMP_DIR=$(mktemp -d) -REFERENCE_IMPL_DIR="$TEMP_DIR/copilot-sdk" -echo "▸ Cloning reference implementation into $REFERENCE_IMPL_DIR …" -git clone --depth=200 "$REFERENCE_IMPL_REPO" "$REFERENCE_IMPL_DIR" - -# ── 4. Read last merge commit ──────────────────────────────── -if [[ ! -f "$ROOT_DIR/.lastmerge" ]]; then - echo "❌ .lastmerge file not found in repo root." - exit 1 -fi -LAST_MERGE_COMMIT=$(tr -d '[:space:]' < "$ROOT_DIR/.lastmerge") -echo "▸ Last merged reference implementation commit: $LAST_MERGE_COMMIT" - -# Quick summary -echo "" -echo "── Reference implementation commits since last merge ──" -(cd "$REFERENCE_IMPL_DIR" && git fetch origin main && \ - git log --oneline "$LAST_MERGE_COMMIT"..origin/main) || \ - echo " (could not generate log – the commit may have been rebased)" -echo "" - -# ── 5. Write env file for other scripts ────────────────────── -cat > "$ENV_FILE" < -# -# This keeps the canonical Copilot CLI version (declared in pom.xml) -# in sync with whatever the reference implementation pinned in -# .lastmerge depends on. All workflows that install the Copilot CLI -# (build-test.yml — implicitly via cloned SDK, run-smoke-test.yml and -# update-copilot-dependency.yml — via the setup-copilot action) read -# this single property so every CI path uses the same CLI version. -# -# Usage: -# ./sync-cli-version-from-reference-impl.sh -# -# Or, when invoked from merge-reference-impl-finish.sh, sources -# REFERENCE_IMPL_DIR from the .merge-env file. -# ────────────────────────────────────────────────────────────── -set -euo pipefail - -# Locate the repo root by walking up from this script until we find a pom.xml. -# This is resilient to the script being moved to a different depth under -# .github/scripts/ in the future. -find_repo_root() { - local dir - dir="$(cd "$(dirname "$0")" && pwd)" - while [[ "$dir" != "/" ]]; do - if [[ -f "$dir/pom.xml" ]]; then - echo "$dir" - return 0 - fi - dir="$(dirname "$dir")" - done - echo "❌ Could not locate repo root (no pom.xml found above $(dirname "$0"))" >&2 - return 1 -} -ROOT_DIR="$(find_repo_root)" - -REFERENCE_IMPL_DIR="${1:-${REFERENCE_IMPL_DIR:-}}" -if [[ -z "$REFERENCE_IMPL_DIR" ]]; then - echo "❌ Usage: $0 " >&2 - echo " or set REFERENCE_IMPL_DIR in the environment." >&2 - exit 1 -fi - -PKG_JSON="$REFERENCE_IMPL_DIR/nodejs/package.json" -if [[ ! -f "$PKG_JSON" ]]; then - echo "❌ Cannot find $PKG_JSON" >&2 - exit 1 -fi - -# node is always available since the reference implementation uses npm. -CLI_VERSION=$(node -e \ - "const fs=require('fs');const p=JSON.parse(fs.readFileSync(process.argv[1],'utf8'));const v=(p.dependencies&&p.dependencies['@github/copilot'])||(p.devDependencies&&p.devDependencies['@github/copilot']);process.stdout.write(v||'');" \ - "$PKG_JSON") - -if [[ -z "$CLI_VERSION" ]]; then - echo "❌ Could not extract @github/copilot version from $PKG_JSON" >&2 - exit 1 -fi - -POM="$ROOT_DIR/pom.xml" -PROP="readonly-copilot-sdk-ref-impl-version-from-lastmerge-file-updated-by-reference-impl-sync" - -if ! grep -q "<${PROP}>" "$POM"; then - echo "❌ Property <${PROP}> not found in $POM" >&2 - exit 1 -fi - -# Use a portable sed invocation (works on both BSD/macOS and GNU/Linux). -TMP="$(mktemp)" -sed -E "s|<${PROP}>[^<]*|<${PROP}>${CLI_VERSION}|" "$POM" > "$TMP" -mv "$TMP" "$POM" - -echo "▸ Updated pom.xml: <${PROP}> = ${CLI_VERSION}" diff --git a/.github/scripts/reference-impl-sync/sync-codegen-version.sh b/.github/scripts/reference-impl-sync/sync-codegen-version.sh deleted file mode 100755 index f3baa0ab5e..0000000000 --- a/.github/scripts/reference-impl-sync/sync-codegen-version.sh +++ /dev/null @@ -1,79 +0,0 @@ -#!/usr/bin/env bash -# ────────────────────────────────────────────────────────────── -# sync-codegen-version.sh -# -# Updates the @github/copilot dependency in scripts/codegen/package.json -# to match the version used by the reference implementation. This keeps -# the code generator schemas in lockstep with the CLI version used for -# testing, eliminating the gap where Dependabot could race ahead. -# -# Usage: -# ./sync-codegen-version.sh -# -# Or, when invoked from merge-reference-impl-finish.sh, the directory -# is passed as $1. -# ────────────────────────────────────────────────────────────── -set -euo pipefail - -# Locate the repo root by walking up from this script until we find a pom.xml. -find_repo_root() { - local dir - dir="$(cd "$(dirname "$0")" && pwd)" - while [[ "$dir" != "/" ]]; do - if [[ -f "$dir/pom.xml" ]]; then - echo "$dir" - return 0 - fi - dir="$(dirname "$dir")" - done - echo "❌ Could not locate repo root (no pom.xml found above $(dirname "$0"))" >&2 - return 1 -} -ROOT_DIR="$(find_repo_root)" - -REFERENCE_IMPL_DIR="${1:-${REFERENCE_IMPL_DIR:-}}" -if [[ -z "$REFERENCE_IMPL_DIR" ]]; then - echo "❌ Usage: $0 " >&2 - echo " or set REFERENCE_IMPL_DIR in the environment." >&2 - exit 1 -fi - -PKG_JSON="$REFERENCE_IMPL_DIR/nodejs/package.json" -if [[ ! -f "$PKG_JSON" ]]; then - echo "❌ Cannot find $PKG_JSON" >&2 - exit 1 -fi - -# Extract the @github/copilot version from the reference implementation. -CLI_VERSION=$(node -e \ - "const fs=require('fs');const p=JSON.parse(fs.readFileSync(process.argv[1],'utf8'));const v=(p.dependencies&&p.dependencies['@github/copilot'])||(p.devDependencies&&p.devDependencies['@github/copilot']);process.stdout.write(v||'');" \ - "$PKG_JSON") - -if [[ -z "$CLI_VERSION" ]]; then - echo "❌ Could not extract @github/copilot version from $PKG_JSON" >&2 - exit 1 -fi - -CODEGEN_DIR="$ROOT_DIR/scripts/codegen" -CODEGEN_PKG="$CODEGEN_DIR/package.json" - -if [[ ! -f "$CODEGEN_PKG" ]]; then - echo "❌ Cannot find $CODEGEN_PKG" >&2 - exit 1 -fi - -# Update scripts/codegen/package.json with the new version and regenerate the lock file. -# Write the version string directly into package.json to preserve the exact specifier -# used by the reference implementation (e.g. '^1.0.43-0'). npm install normalises -# caret ranges and would silently strip the prerelease suffix, causing a mismatch -# with pom.xml. -echo "▸ Updating scripts/codegen/package.json: @github/copilot → ${CLI_VERSION}" -cd "$CODEGEN_DIR" -node -e " -const fs = require('fs'); -const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8')); -pkg.dependencies['@github/copilot'] = process.argv[1]; -fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n'); -" "$CLI_VERSION" -npm install -echo "▸ Updated scripts/codegen to @github/copilot@${CLI_VERSION}" diff --git a/.github/scripts/release/test-update-changelog.sh b/.github/scripts/release/test-update-changelog.sh deleted file mode 100755 index b5fc8486b7..0000000000 --- a/.github/scripts/release/test-update-changelog.sh +++ /dev/null @@ -1,270 +0,0 @@ -#!/bin/bash -# Test script for update-changelog.sh - -set -e - -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -UPDATE_SCRIPT="${SCRIPT_DIR}/update-changelog.sh" -TEST_DIR="/tmp/changelog-test-$$" - -# Colors for output -GREEN='\033[0;32m' -RED='\033[0;31m' -NC='\033[0m' # No Color - -passed=0 -failed=0 - -# Setup test directory -mkdir -p "$TEST_DIR" - -# Cleanup on exit -cleanup() { - rm -rf "$TEST_DIR" -} -trap cleanup EXIT - -# Helper function to run a test -run_test() { - local test_name="$1" - local test_func="$2" - - echo -n "Testing: $test_name ... " - - if $test_func; then - echo -e "${GREEN}PASSED${NC}" - passed=$((passed + 1)) - else - echo -e "${RED}FAILED${NC}" - failed=$((failed + 1)) - fi -} - -# Test 1: Basic functionality - Replace Unreleased with version -test_basic_replace() { - local test_file="${TEST_DIR}/test1.md" - cat > "$test_file" << 'EOF' -# Changelog - -## [Unreleased] - -### Added -- New feature - -## [1.0.0] - 2026-01-01 - -### Added -- Initial release - -[1.0.0]: https://github.com/test/repo/releases/tag/1.0.0 -EOF - - # Run the script - CHANGELOG_FILE="$test_file" bash "$UPDATE_SCRIPT" 1.0.1 > /dev/null 2>&1 - - # Verify the changes - if grep -q "## \[Unreleased\]" "$test_file" && \ - grep -q "## \[1.0.1\] - $(date +%Y-%m-%d)" "$test_file" && \ - grep -q "\[Unreleased\]: https://github.com/test/repo/compare/v1.0.1...HEAD" "$test_file" && \ - grep -q "\[1.0.1\]: https://github.com/test/repo/compare/v1.0.0...v1.0.1" "$test_file"; then - return 0 - else - return 1 - fi -} - -# Test 2: Handle CHANGELOG without Unreleased link -test_no_unreleased_link() { - local test_file="${TEST_DIR}/test2.md" - cat > "$test_file" << 'EOF' -# Changelog - -## [Unreleased] - -### Added -- New feature - -## [1.0.0] - 2026-01-01 - -[1.0.0]: https://github.com/test/repo/releases/tag/1.0.0 -EOF - - CHANGELOG_FILE="$test_file" bash "$UPDATE_SCRIPT" 1.0.1 > /dev/null 2>&1 - - # Should add both Unreleased and version links - if grep -q "\[Unreleased\]: https://github.com/test/repo/compare/v1.0.1...HEAD" "$test_file" && \ - grep -q "\[1.0.1\]: https://github.com/test/repo/compare/v1.0.0...v1.0.1" "$test_file"; then - return 0 - else - return 1 - fi -} - -# Test 3: Preserve content structure -test_preserve_content() { - local test_file="${TEST_DIR}/test3.md" - cat > "$test_file" << 'EOF' -# Changelog - -## [Unreleased] - -### Added -- Feature A -- Feature B - -### Fixed -- Bug fix - -## [1.0.0] - 2026-01-01 - -[1.0.0]: https://github.com/test/repo/releases/tag/1.0.0 -EOF - - CHANGELOG_FILE="$test_file" bash "$UPDATE_SCRIPT" 1.0.1 > /dev/null 2>&1 - - # Verify content is preserved under the new version - if grep -A 6 "## \[1.0.1\]" "$test_file" | grep -q "Feature A" && \ - grep -A 6 "## \[1.0.1\]" "$test_file" | grep -q "Bug fix"; then - return 0 - else - return 1 - fi -} - -# Test 4: Error handling - no Unreleased section -test_no_unreleased_section() { - local test_file="${TEST_DIR}/test4.md" - cat > "$test_file" << 'EOF' -# Changelog - -## [1.0.0] - 2026-01-01 - -[1.0.0]: https://github.com/test/repo/releases/tag/1.0.0 -EOF - - # Should fail because there's no Unreleased section - if ! CHANGELOG_FILE="$test_file" bash "$UPDATE_SCRIPT" 1.0.1 > /dev/null 2>&1; then - return 0 - else - return 1 - fi -} - -# Test 5: Multiple version handling -test_multiple_versions() { - local test_file="${TEST_DIR}/test5.md" - cat > "$test_file" << 'EOF' -# Changelog - -## [Unreleased] - -### Added -- New feature - -## [1.0.1] - 2026-02-01 - -## [1.0.0] - 2026-01-01 - -[1.0.1]: https://github.com/test/repo/compare/v1.0.0...v1.0.1 -[1.0.0]: https://github.com/test/repo/releases/tag/1.0.0 -EOF - - CHANGELOG_FILE="$test_file" bash "$UPDATE_SCRIPT" 1.0.2 > /dev/null 2>&1 - - # Verify the new version is added and links are updated - if grep -q "## \[1.0.2\] - $(date +%Y-%m-%d)" "$test_file" && \ - grep -q "\[1.0.2\]: https://github.com/test/repo/compare/v1.0.1...v1.0.2" "$test_file"; then - return 0 - else - return 1 - fi -} - -# Test 6: Beta-java version format (e.g., 1.0.0-beta-java.N) -test_beta_java_version() { - local test_file="${TEST_DIR}/test6.md" - cat > "$test_file" << 'EOF' -# Changelog - -## [Unreleased] - -### Added -- New feature - -## [1.0.0-beta-java.1] - 2026-05-01 - -[Unreleased]: https://github.com/test/repo/compare/v1.0.0-beta-java.1...HEAD -[1.0.0-beta-java.1]: https://github.com/test/repo/compare/v0.3.0-java.2...v1.0.0-beta-java.1 -[0.3.0-java.2]: https://github.com/test/repo/releases/tag/0.3.0-java.2 -EOF - - CHANGELOG_FILE="$test_file" bash "$UPDATE_SCRIPT" 1.0.0-beta-java.2 > /dev/null 2>&1 - - # The [Unreleased] link should now point to v1.0.0-beta-java.2 - # [1.0.0-beta-java.2] should compare from v1.0.0-beta-java.1 - if grep -q "\[Unreleased\]: https://github.com/test/repo/compare/v1.0.0-beta-java.2...HEAD" "$test_file" && \ - grep -q "\[1.0.0-beta-java.2\]: https://github.com/test/repo/compare/v1.0.0-beta-java.1...v1.0.0-beta-java.2" "$test_file"; then - return 0 - else - return 1 - fi -} - -# Test 7: No duplicate [Unreleased] links when existing [Unreleased] link is present -test_no_duplicate_unreleased_links() { - local test_file="${TEST_DIR}/test7.md" - cat > "$test_file" << 'EOF' -# Changelog - -## [Unreleased] - -### Added -- New feature - -## [1.0.0-beta-java.2] - 2026-05-08 - -## [1.0.0-beta-java.1] - 2026-05-05 - -[Unreleased]: https://github.com/test/repo/compare/v1.0.0-beta-java.2...HEAD -[1.0.0-beta-java.2]: https://github.com/test/repo/compare/v1.0.0-beta-java.1...v1.0.0-beta-java.2 -[1.0.0-beta-java.1]: https://github.com/test/repo/compare/v0.3.0-java.2...v1.0.0-beta-java.1 -[0.3.0-java.2]: https://github.com/test/repo/releases/tag/0.3.0-java.2 -EOF - - CHANGELOG_FILE="$test_file" bash "$UPDATE_SCRIPT" 1.0.0-beta-java.3 > /dev/null 2>&1 - - # Count [Unreleased] link definitions - there should be exactly one - local unreleased_count - unreleased_count=$(grep -c "^\[Unreleased\]:" "$test_file") - if [ "$unreleased_count" -eq 1 ] && \ - grep -q "\[Unreleased\]: https://github.com/test/repo/compare/v1.0.0-beta-java.3...HEAD" "$test_file" && \ - grep -q "\[1.0.0-beta-java.3\]: https://github.com/test/repo/compare/v1.0.0-beta-java.2...v1.0.0-beta-java.3" "$test_file"; then - return 0 - else - return 1 - fi -} - -# Run all tests -echo "Running CHANGELOG update script tests..." -echo "" - -run_test "Basic functionality - Replace Unreleased with version" test_basic_replace -run_test "Handle CHANGELOG without Unreleased link" test_no_unreleased_link -run_test "Preserve content structure" test_preserve_content -run_test "Error handling - no Unreleased section" test_no_unreleased_section -run_test "Multiple version handling" test_multiple_versions -run_test "Beta-java version format (e.g., 1.0.0-beta-java.N)" test_beta_java_version -run_test "No duplicate [Unreleased] links when existing link is present" test_no_duplicate_unreleased_links - -echo "" -echo "==========================================" -echo -e "Tests passed: ${GREEN}${passed}${NC}" -echo -e "Tests failed: ${RED}${failed}${NC}" -echo "==========================================" - -if [ $failed -eq 0 ]; then - exit 0 -else - exit 1 -fi diff --git a/.github/scripts/release/update-changelog.sh b/.github/scripts/release/update-changelog.sh deleted file mode 100755 index e21d03774e..0000000000 --- a/.github/scripts/release/update-changelog.sh +++ /dev/null @@ -1,125 +0,0 @@ -#!/bin/bash -set -e - -# Script to update CHANGELOG.md during release process -# Usage: ./update-changelog.sh [reference-impl-hash] -# Example: ./update-changelog.sh 1.0.8 -# Example: ./update-changelog.sh 1.0.8 05e3c46c8c23130c9c064dc43d00ec78f7a75eab - -if [ -z "$1" ]; then - echo "Error: Version argument required" - echo "Usage: $0 [reference-impl-hash]" - exit 1 -fi - -VERSION="$1" -REFERENCE_IMPL_HASH="${2:-}" -CHANGELOG_FILE="${CHANGELOG_FILE:-CHANGELOG.md}" -RELEASE_DATE=$(date +%Y-%m-%d) - -echo "Updating CHANGELOG.md for version ${VERSION} (${RELEASE_DATE})" -if [ -n "$REFERENCE_IMPL_HASH" ]; then - echo " Reference implementation SDK sync: ${REFERENCE_IMPL_HASH:0:7}" -fi - -# Check if CHANGELOG.md exists -if [ ! -f "$CHANGELOG_FILE" ]; then - echo "Error: CHANGELOG.md not found" - exit 1 -fi - -# Check if there's an [Unreleased] section -if ! grep -q "## \[Unreleased\]" "$CHANGELOG_FILE"; then - echo "Error: No [Unreleased] section found in CHANGELOG.md" - exit 1 -fi - -# Create a temporary file -TEMP_FILE=$(mktemp) - -# Process the CHANGELOG -awk -v version="$VERSION" -v date="$RELEASE_DATE" -v REFERENCE_IMPL_HASH="$REFERENCE_IMPL_HASH" ' -BEGIN { - unreleased_found = 0 - content_found = 0 - links_section = 0 - first_version_link = "" - repo_url = "" - unreleased_link_handled = 0 -} - -# Track if we are in the links section at the bottom -/^\[/ { - links_section = 1 -} - -# Capture the repository URL from the first version link -links_section && repo_url == "" && /^\[[0-9]+\.[0-9]+\.[0-9]+(-(beta-)?java(-preview)?\.[0-9]+)?\]:/ { - match($0, /(https:\/\/github\.com\/[^\/]+\/[^\/]+)\//, arr) - if (arr[1] != "") { - repo_url = arr[1] - } -} - -# Replace [Unreleased] with the version and date -/^## \[Unreleased\]/ { - if (!unreleased_found) { - print "## [Unreleased]" - print "" - if (REFERENCE_IMPL_HASH != "") { - short_hash = substr(REFERENCE_IMPL_HASH, 1, 7) - print "> **Reference implementation sync:** [`github/copilot-sdk@" short_hash "`](https://github.com/github/copilot-sdk/commit/" REFERENCE_IMPL_HASH ")" - print "" - } - print "## [" version "] - " date - if (REFERENCE_IMPL_HASH != "") { - print "" - print "> **Reference implementation sync:** [`github/copilot-sdk@" short_hash "`](https://github.com/github/copilot-sdk/commit/" REFERENCE_IMPL_HASH ")" - } - unreleased_found = 1 - skip_old_reference_impl = 1 - next - } -} - -# Skip the old Reference implementation sync line and surrounding blank lines from the previous [Unreleased] section -skip_old_reference_impl && /^[[:space:]]*$/ { next } -skip_old_reference_impl && /^> \*\*Reference implementation sync:\*\*/ { next } -skip_old_reference_impl && !/^[[:space:]]*$/ && !/^> \*\*Reference implementation sync:\*\*/ { skip_old_reference_impl = 0 } - -# Update existing [Unreleased] link if present (must be checked before the first-version-link block) -links_section && /^\[Unreleased\]:/ { - # Get the previous version and repo URL from the existing link - match($0, /(https:\/\/github\.com\/[^\/]+\/[^\/]+)\/compare\/v([0-9]+\.[0-9]+\.[0-9]+(-(beta-)?java(-preview)?\.[0-9]+)?)\.\.\.HEAD/, arr) - if (arr[1] != "" && arr[2] != "") { - print "[Unreleased]: " arr[1] "/compare/v" version "...HEAD" - print "[" version "]: " arr[1] "/compare/v" arr[2] "...v" version - unreleased_link_handled = 1 - next - } -} - -# Capture the first version link to get the previous version -# Only fires if the [Unreleased] link was not already handled above -links_section && first_version_link == "" && !unreleased_link_handled && /^\[[0-9]+\.[0-9]+\.[0-9]+(-(beta-)?java(-preview)?\.[0-9]+)?\]:/ { - match($0, /\[([0-9]+\.[0-9]+\.[0-9]+(-(beta-)?java(-preview)?\.[0-9]+)?)\]:/, arr) - if (arr[1] != "" && repo_url != "") { - first_version_link = arr[1] - # Insert Unreleased and new version links before first version link - print "[Unreleased]: " repo_url "/compare/v" version "...HEAD" - print "[" version "]: " repo_url "/compare/v" arr[1] "...v" version - } -} - -# Print all other lines unchanged -{ print } -' "$CHANGELOG_FILE" > "$TEMP_FILE" - -# Replace the original file -mv "$TEMP_FILE" "$CHANGELOG_FILE" - -echo "✓ CHANGELOG.md updated successfully" -echo " - Added version ${VERSION} with date ${RELEASE_DATE}" -echo " - Created new [Unreleased] section" -echo " - Updated version comparison links" - diff --git a/.github/skills/agentic-merge-reference-impl/SKILL.md b/.github/skills/agentic-merge-reference-impl/SKILL.md deleted file mode 100644 index 43addbac41..0000000000 --- a/.github/skills/agentic-merge-reference-impl/SKILL.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -name: agentic-merge-reference-impl -description: Merge reference implementation changes from the official Copilot SDK into this Java SDK. -license: MIT ---- - -Follow instructions in the [agentic-merge-reference-impl prompt](../../prompts/agentic-merge-reference-impl.prompt.md) to merge reference implementation changes from the official Copilot SDK into this Java SDK. diff --git a/.github/skills/commit-as-pull-request/SKILL.md b/.github/skills/commit-as-pull-request/SKILL.md deleted file mode 100644 index ebc614d7d6..0000000000 --- a/.github/skills/commit-as-pull-request/SKILL.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -name: commit-as-pull-request -description: Commit current changes as a pull request — creates a branch, pushes, opens a PR, squash-merges, and syncs local main. -license: MIT ---- - -Follow instructions in the [commit-as-pull-request prompt](../../prompts/commit-as-pull-request.prompt.md) to take the current uncommitted changes, create a feature branch, push it, open a pull request, squash-merge it into main, and sync the local repository. diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml deleted file mode 100644 index 2fdf8882e3..0000000000 --- a/.github/workflows/build-test.yml +++ /dev/null @@ -1,177 +0,0 @@ -name: "Build & Test" - -on: - push: - branches: [main] - paths-ignore: - - 'README.md' - - 'LICENSE' - - '.github/**' - pull_request: - paths-ignore: - - 'README.md' - - 'LICENSE' - - '.github/**' - workflow_dispatch: - merge_group: - -permissions: - contents: read - -jobs: - - smoke-test: - name: "Smoke Test" - uses: ./.github/workflows/run-smoke-test.yml - secrets: - COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} - - java-sdk: - name: "Java SDK Tests (JDK ${{ matrix.test-jdk }})" - needs: smoke-test - if: ${{ always() && needs.smoke-test.result != 'failure' }} - permissions: - contents: write - checks: write - pull-requests: write - - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - test-jdk: ["25", "17"] - defaults: - run: - shell: bash - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - - uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5 - with: - java-version: "25" - distribution: "microsoft" - cache: "maven" - - - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 - with: - node-version: 22 - - - name: Build SDK and set up test harness - run: mvn test-compile jar:jar - - - name: Verify Javadoc generation - if: matrix.test-jdk == '25' - run: mvn javadoc:javadoc -q - - - name: Verify CLI works - run: node target/copilot-sdk/nodejs/node_modules/@github/copilot/index.js --version - - - name: Run spotless check - if: matrix.test-jdk == '25' - run: | - mvn spotless:check - if [ $? -ne 0 ]; then - echo "❌ spotless:check failed. Please run 'mvn spotless:apply' in java" - exit 1 - fi - echo "✅ spotless:check passed" - - - name: Run Java SDK tests (JDK 25) - if: matrix.test-jdk == '25' - env: - CI: "true" - run: mvn verify -Dskip.test.harness=true - - - name: Switch to JDK 17 - if: matrix.test-jdk == '17' - uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5 - with: - java-version: "17" - distribution: "microsoft" - - - name: Run Java SDK tests (JDK 17, no recompilation) - if: matrix.test-jdk == '17' - env: - CI: "true" - run: | - echo "Running tests against JDK 25-built classes using JDK 17 runtime..." - java -version - mvn jacoco:prepare-agent@wire-up-coverage-instrumentation antrun:run@print-test-jdk-banner surefire:test failsafe:integration-test failsafe:verify jacoco:report@build-coverage-report-from-tests -Denforcer.skip=true - - - name: Validate reference-impl-sync completeness - if: >- - github.event_name == 'pull_request' && - contains(github.event.pull_request.labels.*.name, 'reference-impl-sync') - run: | - git fetch origin main --depth=1 - CHANGED=$(git diff --name-only origin/main...HEAD) - - # 1. .lastmerge must be updated (proves finish script ran) - if echo "$CHANGED" | grep -q '^\\.lastmerge$'; then - echo "✅ .lastmerge was updated (finish script ran)" - else - echo "❌ .lastmerge was not updated. The merge-reference-impl-finish.sh script" - echo " must be run before this PR can merge. This script updates .lastmerge," - echo " syncs the CLI version in pom.xml, and syncs scripts/codegen/package.json." - exit 1 - fi - - # 2. If codegen inputs changed, generated output must also have changed - if echo "$CHANGED" | grep -q '^scripts/codegen/'; then - if echo "$CHANGED" | grep -q '^src/generated/java/'; then - echo "✅ Codegen inputs changed and generated files were regenerated" - else - echo "❌ scripts/codegen/ was updated but src/generated/java/ has no changes." - echo " The Codegen Check workflow should regenerate these files automatically." - echo " If it hasn't run yet, wait for it to complete and push regenerated files." - echo " Or run manually: cd scripts/codegen && npm ci && npm run generate" - exit 1 - fi - else - echo "✅ No codegen input changes — regeneration not needed" - fi - - - name: Upload test results for site generation - if: success() && github.ref == 'refs/heads/main' && matrix.test-jdk == '25' - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 - with: - name: test-results-for-site - path: | - target/jacoco-test-results/sdk-tests.exec - target/surefire-reports/ - target/surefire-reports-isolated/ - retention-days: 1 - - - name: Generate JaCoCo badge - if: success() && github.ref == 'refs/heads/main' && matrix.test-jdk == '25' - run: .github/scripts/generate-coverage-badge.sh - - - name: Create PR for JaCoCo badge update - if: success() && github.ref == 'refs/heads/main' && matrix.test-jdk == '25' - uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v7 - with: - commit-message: "Update JaCoCo coverage badge" - title: "Update JaCoCo coverage badge" - body: "Automated JaCoCo coverage badge update from CI." - branch: auto/update-jacoco-badge - add-paths: .github/badges/ - delete-branch: true - - - name: Generate Test Report Summary - if: always() - uses: ./.github/actions/test-report - with: - title: "Copilot Java SDK :: Test Results JDK ${{ matrix.test-jdk }}" - - - name: Upload test results on failure - if: failure() - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 - with: - name: test-results-jdk-${{ matrix.test-jdk }} - path: | - target/surefire-reports/ - target/surefire-reports-isolated/ - target/failsafe-reports/ - retention-days: 7 diff --git a/.github/workflows/codegen-agentic-fix.lock.yml b/.github/workflows/codegen-agentic-fix.lock.yml deleted file mode 100644 index 6db47120b8..0000000000 --- a/.github/workflows/codegen-agentic-fix.lock.yml +++ /dev/null @@ -1,1457 +0,0 @@ -# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"70880e5fb9ec78342cf56974b2414d8cf0a516533e201e437835164543ef58c0","compiler_version":"v0.74.8","strict":true,"agent_id":"copilot"} -# gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_CI_TRIGGER_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"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/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"efa55847f72aadb03490d955263ff911bf758700","version":"v0.74.8"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.49"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.49"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.49"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.9","digest":"sha256:64828b42a4482f58fab16509d7f8f495a6d97c972a98a68aff20543531ac0388","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.3.9@sha256:64828b42a4482f58fab16509d7f8f495a6d97c972a98a68aff20543531ac0388"},{"image":"ghcr.io/github/github-mcp-server:v1.0.4"},{"image":"node:lts-alpine","digest":"sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f","pinned_image":"node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f"}]} -# ___ _ _ -# / _ \ | | (_) -# | |_| | __ _ ___ _ __ | |_ _ ___ -# | _ |/ _` |/ _ \ '_ \| __| |/ __| -# | | | | (_| | __/ | | | |_| | (__ -# \_| |_/\__, |\___|_| |_|\__|_|\___| -# __/ | -# _ _ |___/ -# | | | | / _| | -# | | | | ___ _ __ _ __| |_| | _____ ____ -# | |/\| |/ _ \ '__| |/ /| _| |/ _ \ \ /\ / / ___| -# \ /\ / (_) | | | | ( | | | | (_) \ V V /\__ \ -# \/ \/ \___/|_| |_|\_\|_| |_|\___/ \_/\_/ |___/ -# -# This file was automatically generated by gh-aw (v0.74.8). DO NOT EDIT. -# -# 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/ -# -# Agentic fix for codegen-related build/test failures. Invoked when -# mvn verify fails after code generation changes. -# -# Secrets used: -# - COPILOT_GITHUB_TOKEN -# - GH_AW_CI_TRIGGER_TOKEN -# - GH_AW_GITHUB_MCP_SERVER_TOKEN -# - GH_AW_GITHUB_TOKEN -# - GITHUB_TOKEN -# -# Custom actions used: -# - actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 -# - actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 -# - actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 -# - actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 -# - actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 -# - actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 -# - github/gh-aw-actions/setup@efa55847f72aadb03490d955263ff911bf758700 # v0.74.8 -# -# Container images used: -# - ghcr.io/github/gh-aw-firewall/agent:0.25.49 -# - ghcr.io/github/gh-aw-firewall/api-proxy:0.25.49 -# - ghcr.io/github/gh-aw-firewall/squid:0.25.49 -# - ghcr.io/github/gh-aw-mcpg:v0.3.9@sha256:64828b42a4482f58fab16509d7f8f495a6d97c972a98a68aff20543531ac0388 -# - ghcr.io/github/github-mcp-server:v1.0.4 -# - node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f - -name: "Codegen Agentic Fix" -on: - workflow_dispatch: - inputs: - aw_context: - default: "" - description: "Agent caller context (used internally by Agentic Workflows)." - required: false - type: string - branch: - description: Branch to fix - required: true - type: string - error_summary: - description: Summary of mvn verify failures - required: true - type: string - pr_number: - description: PR number to push fixes to - required: true - type: string - -permissions: {} - -concurrency: - group: "gh-aw-${{ github.workflow }}-${{ github.ref || github.run_id }}" - -run-name: "Codegen Agentic Fix" - -jobs: - activation: - runs-on: ubuntu-slim - permissions: - actions: read - contents: read - outputs: - comment_id: "" - comment_repo: "" - 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 }} - secret_verification_result: ${{ steps.validate-secret.outputs.verification_result }} - 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' }} - steps: - - name: Setup Scripts - id: setup - uses: github/gh-aw-actions/setup@efa55847f72aadb03490d955263ff911bf758700 # v0.74.8 - with: - destination: ${{ runner.temp }}/gh-aw/actions - job-name: ${{ github.job }} - env: - GH_AW_SETUP_WORKFLOW_NAME: "Codegen Agentic Fix" - GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/codegen-agentic-fix.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.48" - GH_AW_INFO_ENGINE_ID: "copilot" - - 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 || 'claude-sonnet-4.5' }} - GH_AW_INFO_VERSION: "1.0.48" - GH_AW_INFO_AGENT_VERSION: "1.0.48" - GH_AW_INFO_CLI_VERSION: "v0.74.8" - GH_AW_INFO_WORKFLOW_NAME: "Codegen Agentic Fix" - GH_AW_INFO_EXPERIMENTAL: "false" - GH_AW_INFO_SUPPORTS_TOOLS_ALLOWLIST: "true" - GH_AW_INFO_STAGED: "false" - GH_AW_INFO_ALLOWED_DOMAINS: '["defaults","github"]' - GH_AW_INFO_FIREWALL_ENABLED: "true" - GH_AW_INFO_AWF_VERSION: "v0.25.49" - GH_AW_INFO_AWMG_VERSION: "" - GH_AW_INFO_FIREWALL_TYPE: "squid" - GH_AW_COMPILED_STRICT: "true" - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 - with: - script: | - const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_aw_info.cjs'); - await main(core, context); - - name: Validate COPILOT_GITHUB_TOKEN secret - id: validate-secret - run: bash "${RUNNER_TEMP}/gh-aw/actions/validate_multi_secret.sh" COPILOT_GITHUB_TOKEN 'GitHub Copilot CLI' https://github.github.com/gh-aw/reference/engines/#github-copilot-default - env: - COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} - - name: Checkout .github and .agents folders - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - sparse-checkout: | - .github - .agents - .claude - .codex - .crush - .gemini - .opencode - .pi - sparse-checkout-cone-mode: true - fetch-depth: 1 - - name: Save agent config folders for base branch restoration - env: - GH_AW_AGENT_FOLDERS: ".agents .claude .codex .crush .gemini .github .opencode .pi" - GH_AW_AGENT_FILES: ".crush.json AGENTS.md CLAUDE.md GEMINI.md PI.md opencode.jsonc" - # poutine:ignore untrusted_checkout_exec - 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: "codegen-agentic-fix.lock.yml" - GH_AW_CONTEXT_WORKFLOW_REF: "${{ github.workflow_ref }}" - with: - script: | - const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/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.74.8" - with: - script: | - const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/check_version_updates.cjs'); - await main(); - - name: Create prompt with built-in context - env: - GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt - GH_AW_SAFE_OUTPUTS: ${{ runner.temp }}/gh-aw/safeoutputs/outputs.jsonl - 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_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_BRANCH: ${{ inputs.branch }} - GH_AW_INPUTS_ERROR_SUMMARY: ${{ inputs.error_summary }} - GH_AW_INPUTS_PR_NUMBER: ${{ inputs.pr_number }} - # poutine:ignore untrusted_checkout_exec - run: | - bash "${RUNNER_TEMP}/gh-aw/actions/create_prompt_first.sh" - { - cat << 'GH_AW_PROMPT_d94a435f1fbdc38f_EOF' - - GH_AW_PROMPT_d94a435f1fbdc38f_EOF - cat "${RUNNER_TEMP}/gh-aw/prompts/xpia.md" - cat "${RUNNER_TEMP}/gh-aw/prompts/temp_folder_prompt.md" - cat "${RUNNER_TEMP}/gh-aw/prompts/markdown.md" - cat "${RUNNER_TEMP}/gh-aw/prompts/safe_outputs_prompt.md" - cat << 'GH_AW_PROMPT_d94a435f1fbdc38f_EOF' - - Tools: add_comment(max:5), push_to_pull_request_branch, missing_tool, missing_data, noop - GH_AW_PROMPT_d94a435f1fbdc38f_EOF - cat "${RUNNER_TEMP}/gh-aw/prompts/safe_outputs_push_to_pr_branch.md" - cat << 'GH_AW_PROMPT_d94a435f1fbdc38f_EOF' - - GH_AW_PROMPT_d94a435f1fbdc38f_EOF - cat "${RUNNER_TEMP}/gh-aw/prompts/mcp_cli_tools_prompt.md" - cat << 'GH_AW_PROMPT_d94a435f1fbdc38f_EOF' - - The following GitHub context information is available for this workflow: - {{#if github.actor}} - - **actor**: __GH_AW_GITHUB_ACTOR__ - {{/if}} - {{#if github.repository}} - - **repository**: __GH_AW_GITHUB_REPOSITORY__ - {{/if}} - {{#if github.workspace}} - - **workspace**: __GH_AW_GITHUB_WORKSPACE__ - {{/if}} - {{#if github.event.issue.number || (github.aw.context.item_type == 'issue' && github.aw.context.item_number)}} - - **issue-number**: #__GH_AW_EXPR_802A9F6A__ - {{/if}} - {{#if github.event.discussion.number || (github.aw.context.item_type == 'discussion' && github.aw.context.item_number)}} - - **discussion-number**: #__GH_AW_EXPR_1A3A194A__ - {{/if}} - {{#if github.event.pull_request.number || (github.aw.context.item_type == 'pull_request' && github.aw.context.item_number)}} - - **pull-request-number**: #__GH_AW_EXPR_463A214A__ - {{/if}} - {{#if github.event.comment.id || github.aw.context.comment_id}} - - **comment-id**: __GH_AW_EXPR_FF1D34CE__ - {{/if}} - {{#if github.run_id}} - - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__ - {{/if}} - - - GH_AW_PROMPT_d94a435f1fbdc38f_EOF - cat "${RUNNER_TEMP}/gh-aw/prompts/github_mcp_tools_with_safeoutputs_prompt.md" - cat << 'GH_AW_PROMPT_d94a435f1fbdc38f_EOF' - - {{#runtime-import .github/workflows/codegen-agentic-fix.md}} - GH_AW_PROMPT_d94a435f1fbdc38f_EOF - } > "$GH_AW_PROMPT" - - name: Interpolate variables and render templates - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 - env: - GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt - GH_AW_ENGINE_ID: "copilot" - GH_AW_INPUTS_BRANCH: ${{ inputs.branch }} - GH_AW_INPUTS_ERROR_SUMMARY: ${{ inputs.error_summary }} - GH_AW_INPUTS_PR_NUMBER: ${{ inputs.pr_number }} - with: - script: | - const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/interpolate_prompt.cjs'); - await main(); - - name: Substitute placeholders - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 - env: - GH_AW_PROMPT: /tmp/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_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_BRANCH: ${{ inputs.branch }} - GH_AW_INPUTS_ERROR_SUMMARY: ${{ inputs.error_summary }} - GH_AW_INPUTS_PR_NUMBER: ${{ inputs.pr_number }} - GH_AW_MCP_CLI_SERVERS_LIST: '- `safeoutputs` — run `safeoutputs --help` to see available tools' - with: - script: | - const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - - const substitutePlaceholders = require('${{ runner.temp }}/gh-aw/actions/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_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_BRANCH: process.env.GH_AW_INPUTS_BRANCH, - GH_AW_INPUTS_ERROR_SUMMARY: process.env.GH_AW_INPUTS_ERROR_SUMMARY, - 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: /tmp/gh-aw/aw-prompts/prompt.txt - # poutine:ignore untrusted_checkout_exec - run: bash "${RUNNER_TEMP}/gh-aw/actions/validate_prompt_placeholders.sh" - - name: Print prompt - env: - GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt - # poutine:ignore untrusted_checkout_exec - run: bash "${RUNNER_TEMP}/gh-aw/actions/print_prompt_summary.sh" - - name: Upload activation artifact - if: success() - 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/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 - if-no-files-found: ignore - retention-days: 1 - - agent: - needs: activation - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - 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_WORKFLOW_ID_SANITIZED: codegenagenticfix - outputs: - agentic_engine_timeout: ${{ steps.detect-copilot-errors.outputs.agentic_engine_timeout || 'false' }} - checkout_pr_success: ${{ steps.checkout-pr.outputs.checkout_pr_success || 'true' }} - effective_tokens: ${{ steps.parse-mcp-gateway.outputs.effective_tokens }} - effective_tokens_rate_limit_error: ${{ steps.parse-mcp-gateway.outputs.effective_tokens_rate_limit_error || 'false' }} - has_patch: ${{ steps.collect_output.outputs.has_patch }} - inference_access_error: ${{ steps.detect-copilot-errors.outputs.inference_access_error || 'false' }} - mcp_policy_error: ${{ steps.detect-copilot-errors.outputs.mcp_policy_error || 'false' }} - model: ${{ needs.activation.outputs.model }} - model_not_supported_error: ${{ steps.detect-copilot-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 }} - steps: - - name: Setup Scripts - id: setup - uses: github/gh-aw-actions/setup@efa55847f72aadb03490d955263ff911bf758700 # v0.74.8 - 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: "Codegen Agentic Fix" - GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/codegen-agentic-fix.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.48" - GH_AW_INFO_ENGINE_ID: "copilot" - - name: Set runtime paths - id: set-runtime-paths - run: | - { - 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: Checkout repository - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - 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: Configure Git credentials - env: - REPO_NAME: ${{ github.repository }} - SERVER_URL: ${{ github.server_url }} - GITHUB_TOKEN: ${{ github.token }} - run: | - git config --global user.email "github-actions[bot]@users.noreply.github.com" - git config --global user.name "github-actions[bot]" - git config --global am.keepcr true - # Re-authenticate git with GitHub token - SERVER_URL_STRIPPED="${SERVER_URL#https://}" - git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@${SERVER_URL_STRIPPED}/${REPO_NAME}.git" - echo "Git configured with standard GitHub Actions identity" - - name: Checkout PR branch - id: checkout-pr - if: | - github.event.pull_request || github.event.issue.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 { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/checkout_pr_branch.cjs'); - await main(); - - name: Install GitHub Copilot CLI - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.48 - env: - GH_HOST: github.com - - name: Install AWF binary - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.49 - - 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 determineAutomaticLockdown = require('${{ runner.temp }}/gh-aw/actions/determine_automatic_lockdown.cjs'); - await determineAutomaticLockdown(github, context, core); - - name: Download activation artifact - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - name: activation - path: /tmp/gh-aw - - name: Restore agent config folders from base branch - if: steps.checkout-pr.outcome == 'success' - env: - GH_AW_AGENT_FOLDERS: ".agents .claude .codex .crush .gemini .github .opencode .pi" - GH_AW_AGENT_FILES: ".crush.json AGENTS.md CLAUDE.md GEMINI.md PI.md opencode.jsonc" - 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: Download container images - run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.49 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.49 ghcr.io/github/gh-aw-firewall/squid:0.25.49 ghcr.io/github/gh-aw-mcpg:v0.3.9@sha256:64828b42a4482f58fab16509d7f8f495a6d97c972a98a68aff20543531ac0388 ghcr.io/github/github-mcp-server:v1.0.4 node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f - - name: Generate Safe Outputs Config - run: | - mkdir -p "${RUNNER_TEMP}/gh-aw/safeoutputs" - mkdir -p /tmp/gh-aw/safeoutputs - mkdir -p /tmp/gh-aw/mcp-logs/safeoutputs - cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_b6e7bb90508de076_EOF' - {"add_comment":{"max":5,"target":"*"},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"false"},"push_to_pull_request_branch":{"if_no_changes":"warn","labels":["dependencies"],"max_patch_size":1024,"protect_top_level_dot_folders":true,"protected_files":["package.json","bun.lockb","bunfig.toml","deno.json","deno.jsonc","deno.lock","global.json","NuGet.Config","Directory.Packages.props","mix.exs","mix.lock","go.mod","go.sum","stack.yaml","stack.yaml.lock","pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","package-lock.json","yarn.lock","pnpm-lock.yaml","npm-shrinkwrap.json","requirements.txt","Pipfile","Pipfile.lock","pyproject.toml","setup.py","setup.cfg","Gemfile","Gemfile.lock","uv.lock","CODEOWNERS","DESIGN.md","README.md","CONTRIBUTING.md","CHANGELOG.md","SECURITY.md","CODE_OF_CONDUCT.md","AGENTS.md","CLAUDE.md","GEMINI.md"],"target":"*"},"report_incomplete":{}} - GH_AW_SAFE_OUTPUTS_CONFIG_b6e7bb90508de076_EOF - - name: Generate Safe Outputs Tools - env: - GH_AW_TOOLS_META_JSON: | - { - "description_suffixes": { - "add_comment": " CONSTRAINTS: Maximum 5 comment(s) can be added. Target: *. Supports reply_to_id for discussion threading." - }, - "repo_params": {}, - "dynamic_tools": [] - } - GH_AW_VALIDATION_JSON: | - { - "add_comment": { - "defaultMax": 1, - "fields": { - "body": { - "required": true, - "type": "string", - "sanitize": true, - "maxLength": 65000 - }, - "item_number": { - "issueOrPRNumber": true - }, - "reply_to_id": { - "type": "string", - "maxLength": 256 - }, - "repo": { - "type": "string", - "maxLength": 256 - } - } - }, - "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 - } - } - }, - "push_to_pull_request_branch": { - "defaultMax": 1, - "fields": { - "branch": { - "required": true, - "type": "string", - "sanitize": true, - "maxLength": 256 - }, - "message": { - "required": true, - "type": "string", - "sanitize": true, - "maxLength": 65000 - }, - "pull_request_number": { - "issueOrPRNumber": true - } - } - }, - "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 { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_safe_outputs_tools.cjs'); - await main(); - - name: Generate Safe Outputs MCP Server Config - id: safe-outputs-config - run: | - # Generate a secure random API key (360 bits of entropy, 40+ chars) - # Mask immediately to prevent timing vulnerabilities - API_KEY=$(openssl rand -base64 45 | tr -d '/+=') - echo "::add-mask::${API_KEY}" - - PORT=3001 - - # Set outputs for next steps - { - echo "safe_outputs_api_key=${API_KEY}" - echo "safe_outputs_port=${PORT}" - } >> "$GITHUB_OUTPUT" - - echo "Safe Outputs MCP server will run on port ${PORT}" - - - name: Start Safe Outputs MCP HTTP Server - id: safe-outputs-start - env: - DEBUG: '*' - GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }} - GH_AW_SAFE_OUTPUTS_PORT: ${{ steps.safe-outputs-config.outputs.safe_outputs_port }} - GH_AW_SAFE_OUTPUTS_API_KEY: ${{ steps.safe-outputs-config.outputs.safe_outputs_api_key }} - GH_AW_SAFE_OUTPUTS_TOOLS_PATH: ${{ runner.temp }}/gh-aw/safeoutputs/tools.json - GH_AW_SAFE_OUTPUTS_CONFIG_PATH: ${{ runner.temp }}/gh-aw/safeoutputs/config.json - GH_AW_MCP_LOG_DIR: /tmp/gh-aw/mcp-logs/safeoutputs - run: | - # Environment variables are set above to prevent template injection - export DEBUG - export GH_AW_SAFE_OUTPUTS - export GH_AW_SAFE_OUTPUTS_PORT - export GH_AW_SAFE_OUTPUTS_API_KEY - export GH_AW_SAFE_OUTPUTS_TOOLS_PATH - export GH_AW_SAFE_OUTPUTS_CONFIG_PATH - export GH_AW_MCP_LOG_DIR - - bash "${RUNNER_TEMP}/gh-aw/actions/start_safe_outputs_server.sh" - - - name: Start MCP Gateway - id: start-mcp-gateway - env: - GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }} - GH_AW_SAFE_OUTPUTS_API_KEY: ${{ steps.safe-outputs-start.outputs.api_key }} - GH_AW_SAFE_OUTPUTS_PORT: ${{ steps.safe-outputs-start.outputs.port }} - 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 }} - run: | - set -eo pipefail - mkdir -p "${RUNNER_TEMP}/gh-aw/mcp-config" - - # Export gateway environment variables for MCP config and gateway script - export MCP_GATEWAY_PORT="8080" - export MCP_GATEWAY_DOMAIN="host.docker.internal" - export MCP_GATEWAY_HOST_DOMAIN="localhost" - MCP_GATEWAY_API_KEY=$(openssl rand -base64 45 | tr -d '/+=') - echo "::add-mask::${MCP_GATEWAY_API_KEY}" - export MCP_GATEWAY_API_KEY - export MCP_GATEWAY_PAYLOAD_DIR="/tmp/gh-aw/mcp-payloads" - mkdir -p "${MCP_GATEWAY_PAYLOAD_DIR}" - export MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD="524288" - 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') - case "${DOCKER_HOST:-}" in - unix://* ) DOCKER_SOCK_PATH="${DOCKER_HOST#unix://}" ;; - /* ) DOCKER_SOCK_PATH="$DOCKER_HOST" ;; - * ) DOCKER_SOCK_PATH=/var/run/docker.sock ;; - esac - DOCKER_SOCK_GID=$(stat -c '%g' "$DOCKER_SOCK_PATH" 2>/dev/null || echo '0') - export MCP_GATEWAY_DOCKER_COMMAND='docker run -i --rm --network host --add-host host.docker.internal:127.0.0.1 --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_API_KEY -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_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 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 GH_AW_SAFE_OUTPUTS_PORT -e GH_AW_SAFE_OUTPUTS_API_KEY -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 ghcr.io/github/gh-aw-mcpg:v0.3.9' - - mkdir -p /home/runner/.copilot - GH_AW_NODE=$(which node 2>/dev/null || command -v node 2>/dev/null || echo node) - cat << GH_AW_MCP_CONFIG_f8f308e27510535f_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.0.4", - "env": { - "GITHUB_HOST": "\${GITHUB_SERVER_URL}", - "GITHUB_PERSONAL_ACCESS_TOKEN": "\${GITHUB_MCP_SERVER_TOKEN}", - "GITHUB_READ_ONLY": "1", - "GITHUB_TOOLSETS": "context,repos" - }, - "guard-policies": { - "allow-only": { - "min-integrity": "$GITHUB_MCP_GUARD_MIN_INTEGRITY", - "repos": "$GITHUB_MCP_GUARD_REPOS" - } - } - }, - "safeoutputs": { - "type": "http", - "url": "http://host.docker.internal:$GH_AW_SAFE_OUTPUTS_PORT", - "headers": { - "Authorization": "\${GH_AW_SAFE_OUTPUTS_API_KEY}" - }, - "guard-policies": { - "write-sink": { - "accept": [ - "*" - ] - } - } - } - }, - "gateway": { - "port": $MCP_GATEWAY_PORT, - "domain": "${MCP_GATEWAY_DOMAIN}", - "apiKey": "${MCP_GATEWAY_API_KEY}", - "payloadDir": "${MCP_GATEWAY_PAYLOAD_DIR}" - } - } - GH_AW_MCP_CONFIG_f8f308e27510535f_EOF - - name: Mount MCP servers as CLIs - id: mount-mcp-clis - continue-on-error: true - env: - MCP_GATEWAY_API_KEY: ${{ steps.start-mcp-gateway.outputs.gateway-api-key }} - 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 { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io); - const { main } = require('${{ runner.temp }}/gh-aw/actions/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: 60 - run: | - set -o pipefail - printf '%s' "$(date +%s%3N)" > /tmp/gh-aw/agent_cli_start_ms.txt - 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) - printf '%s\n' '{"$schema":"https://github.com/github/gh-aw-firewall/releases/download/v0.25.49/awf-config.schema.json","network":{"allowDomains":["*.githubusercontent.com","api.business.githubcopilot.com","api.enterprise.githubcopilot.com","api.github.com","api.githubcopilot.com","api.individual.githubcopilot.com","api.snapcraft.io","archive.ubuntu.com","azure.archive.ubuntu.com","codeload.github.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","docs.github.com","github-cloud.githubusercontent.com","github-cloud.s3.amazonaws.com","github.blog","github.com","github.githubassets.com","host.docker.internal","json-schema.org","json.schemastore.org","keyserver.ubuntu.com","lfs.github.com","objects.githubusercontent.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","patch-diff.githubusercontent.com","ppa.launchpad.net","raw.githubusercontent.com","registry.npmjs.org","s.symcb.com","s.symcd.com","security.ubuntu.com","telemetry.enterprise.githubcopilot.com","ts-crl.ws.symantec.com","ts-ocsp.ws.symantec.com","www.googleapis.com"]},"apiProxy":{"enabled":true,"enableTokenSteering":true,"maxRuns":500,"maxEffectiveTokens":25000000,"models":{"agent":["sonnet-6x","gpt-5.4","gpt-5","gemini-pro","haiku","any"],"any":["copilot/*","anthropic/*","openai/*","google/*","gemini/*"],"auto":["large"],"claude":["agent","sonnet-6x","haiku","any"],"codex":["agent","gpt-5-codex","gpt-5","any"],"coding":["copilot/gpt-5*codex*","openai/gpt-5*codex*","gpt-5-codex"],"copilot":["agent","gpt-5.4","sonnet","gpt-5","any"],"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*"],"gemini":["agent","gemini-pro","gemini-flash","any"],"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-pro":["copilot/gemini-*pro*","google/gemini-*pro*","gemini/gemini-*pro*"],"gemma":["copilot/gemma*","google/gemma*","gemini/gemma*"],"gpt-4.1":["copilot/gpt-4.1*","openai/gpt-4.1*"],"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*"],"haiku":["copilot/*haiku*","anthropic/*haiku*"],"large":["sonnet","gpt-5-pro","gpt-5","gemini-pro"],"mini":["haiku","gpt-5-mini","gpt-5-nano","gemini-flash-lite","copilot/raptor*mini*"],"opus":["copilot/*opus*","anthropic/*opus*"],"reasoning":["copilot/o1*","copilot/o3*","copilot/o4*","openai/o1*","openai/o3*","openai/o4*"],"small":["mini"],"sonnet":["copilot/*sonnet*","anthropic/*sonnet*"],"sonnet-6x":["copilot/*sonnet-4.5*","copilot/*sonnet-4-5*","anthropic/*sonnet-4.5*","anthropic/*sonnet-4-5*","copilot/*sonnet-3.7*","copilot/*sonnet-3-7*","anthropic/*sonnet-3.7*","anthropic/*sonnet-3-7*","copilot/*sonnet-3.5*","copilot/*sonnet-3-5*","anthropic/*sonnet-3.5*","anthropic/*sonnet-3-5*"],"vision":["copilot/gemini-*image*","gemini/gemini-*image*","copilot/gemini-*flash*","gemini/gemini-*flash*"]}},"container":{"imageTag":"0.25.49"}}' > "${RUNNER_TEMP}/gh-aw/awf-config.json" - cp "${RUNNER_TEMP}/gh-aw/awf-config.json" /tmp/gh-aw/awf-config.json - GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS="" - if [[ "${DOCKER_HOST:-}" =~ ^tcp:// ]]; then - GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS="--docker-host-path-prefix /tmp/gh-aw" - fi - # shellcheck disable=SC1003 - sudo -E 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_DOCKER_HOST_PATH_PREFIX_ARGS} --env-all --exclude-env COPILOT_GITHUB_TOKEN --exclude-env GITHUB_MCP_SERVER_TOKEN --exclude-env MCP_GATEWAY_API_KEY --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --allow-host-ports 80,443,8080 --skip-pull \ - -- /bin/bash -c 'export PATH="${RUNNER_TEMP}/gh-aw/mcp-cli/bin:$PATH" && export PATH="$(find /opt/hostedtoolcache /home/runner/work/_tool -maxdepth 5 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/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_NODE_EXEC" ${RUNNER_TEMP}/gh-aw/actions/copilot_harness.cjs /usr/local/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' 2>&1 | tee -a /tmp/gh-aw/agent-stdio.log - env: - AWF_REFLECT_ENABLED: 1 - COPILOT_AGENT_RUNNER_TYPE: STANDALONE - COPILOT_DUMMY_BYOK: dummy-byok-key-for-offline-mode - COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} - COPILOT_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || 'claude-sonnet-4.5' }} - GH_AW_MCP_CONFIG: /home/runner/.copilot/mcp-config.json - 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_VERSION: v0.74.8 - 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] - XDG_CONFIG_HOME: /home/runner - - name: Detect Copilot errors - id: detect-copilot-errors - if: always() - continue-on-error: true - run: node "${RUNNER_TEMP}/gh-aw/actions/detect_copilot_errors.cjs" - - name: Configure Git credentials - env: - REPO_NAME: ${{ github.repository }} - SERVER_URL: ${{ github.server_url }} - GITHUB_TOKEN: ${{ github.token }} - run: | - git config --global user.email "github-actions[bot]@users.noreply.github.com" - git config --global user.name "github-actions[bot]" - git config --global am.keepcr true - # Re-authenticate git with GitHub token - SERVER_URL_STRIPPED="${SERVER_URL#https://}" - git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@${SERVER_URL_STRIPPED}/${REPO_NAME}.git" - echo "Git configured with standard GitHub Actions identity" - - 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_API_KEY: ${{ steps.start-mcp-gateway.outputs.gateway-api-key }} - 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 { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/redact_secrets.cjs'); - await main(); - env: - GH_AW_SECRET_NAMES: 'COPILOT_GITHUB_TOKEN,GH_AW_GITHUB_MCP_SERVER_TOKEN,GH_AW_GITHUB_TOKEN,GITHUB_TOKEN' - SECRET_COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_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: "*.githubusercontent.com,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,codeload.github.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,docs.github.com,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.blog,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.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,patch-diff.githubusercontent.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.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 { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/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/ - with: - script: | - const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/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 { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/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: | - # Fix permissions on firewall logs/audit dirs so they can be uploaded as artifacts - # AWF runs with sudo, creating files owned by root - sudo chmod -R a+rX /tmp/gh-aw/sandbox/firewall 2>/dev/null || true - # Only run awf logs summary if awf command exists (it may not be installed if workflow failed before install step) - if command -v awf &> /dev/null; then - awf logs summary | tee -a "$GITHUB_STEP_SUMMARY" - else - echo 'AWF binary not installed, skipping firewall log summary' - fi - - name: Parse token usage for step summary - if: always() - continue-on-error: true - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 - with: - script: | - const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/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 { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/awf_reflect_summary.cjs'); - await main(); - - 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 - - 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/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.stale_lock_file_failed == 'true') - runs-on: ubuntu-slim - permissions: - contents: write - discussions: write - issues: write - pull-requests: write - concurrency: - group: "gh-aw-conclusion-codegen-agentic-fix" - cancel-in-progress: false - queue: max - 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@efa55847f72aadb03490d955263ff911bf758700 # v0.74.8 - 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: "Codegen Agentic Fix" - GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/codegen-agentic-fix.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.48" - 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: - name: agent - 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 - echo "GH_AW_AGENT_OUTPUT=/tmp/gh-aw/agent_output.json" >> "$GITHUB_OUTPUT" - - 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: "Codegen Agentic Fix" - 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" - with: - github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} - script: | - const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/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: "Codegen Agentic Fix" - 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 { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/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: "Codegen Agentic Fix" - with: - github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} - script: | - const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/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: "Codegen Agentic Fix" - with: - github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} - script: | - const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/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: "Codegen Agentic Fix" - 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: "codegen-agentic-fix" - GH_AW_ACTION_FAILURE_ISSUE_EXPIRES_HOURS: "168" - GH_AW_ENGINE_ID: "copilot" - GH_AW_SECRET_VERIFICATION_RESULT: ${{ needs.activation.outputs.secret_verification_result }} - GH_AW_CHECKOUT_PR_SUCCESS: ${{ needs.agent.outputs.checkout_pr_success }} - GH_AW_EFFECTIVE_TOKENS: ${{ needs.agent.outputs.effective_tokens || '' }} - GH_AW_EFFECTIVE_TOKENS_RATE_LIMIT_ERROR: ${{ needs.agent.outputs.effective_tokens_rate_limit_error || 'false' }} - 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_ENGINE_API_HOSTS: "api.enterprise.githubcopilot.com,api.githubcopilot.com,api.business.githubcopilot.com,api.individual.githubcopilot.com" - GH_AW_CODE_PUSH_FAILURE_ERRORS: ${{ needs.safe_outputs.outputs.code_push_failure_errors }} - GH_AW_CODE_PUSH_FAILURE_COUNT: ${{ needs.safe_outputs.outputs.code_push_failure_count }} - GH_AW_LOCKDOWN_CHECK_FAILED: ${{ needs.activation.outputs.lockdown_check_failed }} - GH_AW_STALE_LOCK_FILE_FAILED: ${{ needs.activation.outputs.stale_lock_file_failed }} - 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: "60" - GH_AW_MAX_EFFECTIVE_TOKENS: "25000000" - with: - github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} - script: | - const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/handle_agent_failure.cjs'); - await main(); - - detection: - needs: - - activation - - agent - if: > - always() && needs.agent.result != 'skipped' && (needs.agent.outputs.output_types != '' || needs.agent.outputs.has_patch == 'true') - runs-on: ubuntu-latest - permissions: - contents: read - outputs: - 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@efa55847f72aadb03490d955263ff911bf758700 # v0.74.8 - 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: "Codegen Agentic Fix" - GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/codegen-agentic-fix.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.48" - 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: - name: agent - 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 - echo "GH_AW_AGENT_OUTPUT=/tmp/gh-aw/agent_output.json" >> "$GITHUB_OUTPUT" - - name: Checkout repository for patch context - if: needs.agent.outputs.has_patch == 'true' - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - 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.25.49 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.49 ghcr.io/github/gh-aw-firewall/squid:0.25.49 - - 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/runner/.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: | - mkdir -p /tmp/gh-aw/threat-detection/aw-prompts - cp /tmp/gh-aw/aw-prompts/prompt.txt /tmp/gh-aw/threat-detection/aw-prompts/prompt.txt 2>/dev/null || true - cp /tmp/gh-aw/agent_output.json /tmp/gh-aw/threat-detection/agent_output.json 2>/dev/null || true - for f in /tmp/gh-aw/aw-*.patch; do - [ -f "$f" ] && cp "$f" /tmp/gh-aw/threat-detection/ 2>/dev/null || true - done - for f in /tmp/gh-aw/aw-*.bundle; do - [ -f "$f" ] && cp "$f" /tmp/gh-aw/threat-detection/ 2>/dev/null || true - done - echo "Prepared threat detection files:" - ls -la /tmp/gh-aw/threat-detection/ 2>/dev/null || true - - name: Setup threat detection - if: always() && steps.detection_guard.outputs.run_detection == 'true' - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 - env: - WORKFLOW_NAME: "Codegen Agentic Fix" - WORKFLOW_DESCRIPTION: "Agentic fix for codegen-related build/test failures. Invoked when\nmvn verify fails after code generation changes." - HAS_PATCH: ${{ needs.agent.outputs.has_patch }} - with: - script: | - const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/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: Setup Node.js - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 - with: - node-version: '24' - package-manager-cache: false - - name: Install GitHub Copilot CLI - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.48 - env: - GH_HOST: github.com - - name: Install AWF binary - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.49 - - name: Execute GitHub Copilot CLI - if: always() && steps.detection_guard.outputs.run_detection == 'true' - continue-on-error: true - id: detection_agentic_execution - # Copilot CLI tool arguments (sorted): - timeout-minutes: 20 - run: | - set -o pipefail - printf '%s' "$(date +%s%3N)" > /tmp/gh-aw/agent_cli_start_ms.txt - 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/threat-detection/detection.log) - printf '%s\n' '{"$schema":"https://github.com/github/gh-aw-firewall/releases/download/v0.25.49/awf-config.schema.json","network":{"allowDomains":["api.business.githubcopilot.com","api.enterprise.githubcopilot.com","api.github.com","api.githubcopilot.com","api.individual.githubcopilot.com","github.com","host.docker.internal","telemetry.enterprise.githubcopilot.com"]},"apiProxy":{"enabled":true,"enableTokenSteering":true,"maxRuns":500,"maxEffectiveTokens":25000000},"container":{"imageTag":"0.25.49"}}' > "${RUNNER_TEMP}/gh-aw/awf-config.json" - cp "${RUNNER_TEMP}/gh-aw/awf-config.json" /tmp/gh-aw/awf-config.json - GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS="" - if [[ "${DOCKER_HOST:-}" =~ ^tcp:// ]]; then - GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS="--docker-host-path-prefix /tmp/gh-aw" - fi - # shellcheck disable=SC1003 - sudo -E 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_DOCKER_HOST_PATH_PREFIX_ARGS} --env-all --exclude-env COPILOT_GITHUB_TOKEN --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --allow-host-ports 80,443,8080 --skip-pull \ - -- /bin/bash -c 'export PATH="$(find /opt/hostedtoolcache /home/runner/work/_tool -maxdepth 5 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/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_NODE_EXEC" ${RUNNER_TEMP}/gh-aw/actions/copilot_harness.cjs /usr/local/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 --add-dir "${GITHUB_WORKSPACE}" --prompt-file /tmp/gh-aw/aw-prompts/prompt.txt' 2>&1 | tee -a /tmp/gh-aw/threat-detection/detection.log - env: - AWF_REFLECT_ENABLED: 1 - COPILOT_AGENT_RUNNER_TYPE: STANDALONE - COPILOT_DUMMY_BYOK: dummy-byok-key-for-offline-mode - COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} - COPILOT_MODEL: ${{ vars.GH_AW_MODEL_DETECTION_COPILOT || 'claude-sonnet-4.5' }} - GH_AW_PHASE: detection - GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt - GH_AW_VERSION: v0.74.8 - 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] - XDG_CONFIG_HOME: /home/runner - - name: Upload threat detection log - 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.log - if-no-files-found: ignore - - name: Parse and conclude threat detection - id: detection_conclusion - if: always() - continue-on-error: true - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 - 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" - with: - script: | - try { - const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_threat_detection_results.cjs'); - await main(); - } catch (loadErr) { - const continueOnError = process.env.GH_AW_DETECTION_CONTINUE_ON_ERROR !== 'false'; - const detectionExecutionFailed = process.env.DETECTION_AGENTIC_EXECUTION_OUTCOME === 'failure'; - const msg = 'ERR_SYSTEM: \u274C Unexpected error loading threat detection module: ' + (loadErr && loadErr.message ? loadErr.message : String(loadErr)); - core.error(msg); - core.setOutput('reason', 'parse_error'); - if (continueOnError && !detectionExecutionFailed) { - core.warning('\u26A0\uFE0F ' + msg); - core.setOutput('conclusion', 'warning'); - core.setOutput('success', 'false'); - } else { - core.setOutput('conclusion', 'failure'); - core.setOutput('success', 'false'); - core.setFailed(msg); - } - } - - safe_outputs: - needs: - - activation - - agent - - detection - if: (!cancelled()) && needs.agent.result != 'skipped' && needs.detection.result == 'success' - runs-on: ubuntu-slim - permissions: - contents: write - discussions: write - issues: write - pull-requests: write - timeout-minutes: 15 - env: - GH_AW_CALLER_WORKFLOW_ID: "${{ github.repository }}/codegen-agentic-fix" - 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: ${{ needs.agent.outputs.model }} - GH_AW_ENGINE_VERSION: "1.0.48" - GH_AW_WORKFLOW_ID: "codegen-agentic-fix" - GH_AW_WORKFLOW_NAME: "Codegen Agentic Fix" - 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_processed_count: ${{ steps.process_safe_outputs.outputs.processed_count }} - process_safe_outputs_temporary_id_map: ${{ steps.process_safe_outputs.outputs.temporary_id_map }} - push_commit_sha: ${{ steps.process_safe_outputs.outputs.push_commit_sha }} - push_commit_url: ${{ steps.process_safe_outputs.outputs.push_commit_url }} - steps: - - name: Setup Scripts - id: setup - uses: github/gh-aw-actions/setup@efa55847f72aadb03490d955263ff911bf758700 # v0.74.8 - 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: "Codegen Agentic Fix" - GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/codegen-agentic-fix.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.48" - 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: - name: agent - 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 - echo "GH_AW_AGENT_OUTPUT=/tmp/gh-aw/agent_output.json" >> "$GITHUB_OUTPUT" - - name: Download patch artifact - continue-on-error: true - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - name: agent - path: /tmp/gh-aw/ - - name: Extract base branch from agent output - id: extract-base-branch - if: steps.download-agent-output.outcome == 'success' - shell: bash - run: | - if [ -f "/tmp/gh-aw/agent_output.json" ]; then - GH_AW_NODE=$(which node 2>/dev/null || command -v node 2>/dev/null || echo node) - BASE_BRANCH=$("$GH_AW_NODE" -e " - try { - const data = JSON.parse(require('fs').readFileSync('/tmp/gh-aw/agent_output.json', 'utf8')); - const item = (data.items || []).find(i => - (i.type === 'create_pull_request' || i.type === 'push_to_pull_request_branch') && - i.base_branch - ); - if (item) process.stdout.write(item.base_branch); - } catch(e) {} - " 2>/dev/null || true) - # Validate: only allow safe git branch name characters - if [[ "$BASE_BRANCH" =~ ^[a-zA-Z0-9/_.-]+$ ]] && [ ${#BASE_BRANCH} -le 255 ]; then - printf 'base-branch=%s\n' "$BASE_BRANCH" >> "$GITHUB_OUTPUT" - echo "Extracted base branch from safe output: $BASE_BRANCH" - fi - fi - - name: Checkout repository (trusted default branch for comment events) - if: (!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'push_to_pull_request_branch') && (github.event_name == 'issue_comment' || github.event_name == 'pull_request_review_comment') - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - ref: ${{ github.event.repository.default_branch }} - token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} - persist-credentials: false - fetch-depth: 1 - - name: Checkout repository - if: (!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'push_to_pull_request_branch') && github.event_name != 'issue_comment' && github.event_name != 'pull_request_review_comment' - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - ref: ${{ steps.extract-base-branch.outputs.base-branch || github.base_ref || github.event.pull_request.base.ref || github.ref_name || github.event.repository.default_branch }} - token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} - persist-credentials: false - fetch-depth: 1 - - name: Configure Git credentials - if: (!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'push_to_pull_request_branch') - env: - REPO_NAME: ${{ github.repository }} - SERVER_URL: ${{ github.server_url }} - GIT_TOKEN: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} - run: | - git config --global user.email "github-actions[bot]@users.noreply.github.com" - git config --global user.name "github-actions[bot]" - git config --global am.keepcr true - # Re-authenticate git with GitHub token - SERVER_URL_STRIPPED="${SERVER_URL#https://}" - git remote set-url origin "https://x-access-token:${GIT_TOKEN}@${SERVER_URL_STRIPPED}/${REPO_NAME}.git" - echo "Git configured with standard GitHub Actions identity" - - name: Configure GH_HOST for enterprise compatibility - id: ghes-host-config - shell: bash - run: | - # 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: "*.githubusercontent.com,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,codeload.github.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,docs.github.com,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.blog,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.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,patch-diff.githubusercontent.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.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\":{\"max\":5,\"target\":\"*\"},\"create_report_incomplete_issue\":{},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"false\"},\"push_to_pull_request_branch\":{\"if_no_changes\":\"warn\",\"labels\":[\"dependencies\"],\"max_patch_size\":1024,\"protect_top_level_dot_folders\":true,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"CODEOWNERS\",\"DESIGN.md\",\"README.md\",\"CONTRIBUTING.md\",\"CHANGELOG.md\",\"SECURITY.md\",\"CODE_OF_CONDUCT.md\",\"AGENTS.md\",\"CLAUDE.md\",\"GEMINI.md\"],\"target\":\"*\"},\"report_incomplete\":{}}" - GH_AW_CI_TRIGGER_TOKEN: ${{ secrets.GH_AW_CI_TRIGGER_TOKEN }} - with: - github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} - script: | - const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/safe_output_handler_manager.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 - if-no-files-found: ignore - diff --git a/.github/workflows/codegen-agentic-fix.md b/.github/workflows/codegen-agentic-fix.md deleted file mode 100644 index 948524999e..0000000000 --- a/.github/workflows/codegen-agentic-fix.md +++ /dev/null @@ -1,245 +0,0 @@ ---- -description: | - Agentic fix for codegen-related build/test failures. Invoked when - mvn verify fails after code generation changes. - -on: - workflow_dispatch: - inputs: - branch: - description: 'Branch to fix' - required: true - type: string - pr_number: - description: 'PR number to push fixes to' - required: true - type: string - error_summary: - description: 'Summary of mvn verify failures' - required: true - type: string - -permissions: - contents: read - actions: read - -timeout-minutes: 60 - -network: - allowed: - - defaults - - github - -tools: - github: - toolsets: [context, repos] - -safe-outputs: - push-to-pull-request-branch: - target: "*" - labels: [dependencies] - add-comment: - target: "*" - max: 5 - noop: - report-as-issue: false ---- -# Codegen Agentic Fix - -You are an automation agent that fixes Java compilation and test failures caused by code generation changes in the `copilot-sdk-java` repository. - -## Context - -A Dependabot PR bumped the `@github/copilot` npm dependency in `scripts/codegen/package.json`. The `codegen-check` workflow ran the code generator (`scripts/codegen/java.ts`) against the new schemas and `mvn verify` subsequently failed. Your job is to fix **both** the code generator script (if needed) and the handwritten SDK/test source code so the build passes. - -**❌❌❌ YOU MUST NEVER EDIT any of the java source code in `src/generated/` directly.** ✅✅Rather, the way to affect changes in these files is to change the code generator script and re-generate the classes in `src/generated`. - -The branch to fix is: `${{ inputs.branch }}` -The PR number is: `${{ inputs.pr_number }}` - -The error summary from the failing build is: -``` -${{ inputs.error_summary }} -``` - -## Architecture overview - -The code generator (`scripts/codegen/java.ts`) reads JSON schemas from `node_modules/@github/copilot/schemas/` and produces Java source files under `src/generated/java/`. These generated types are consumed by handwritten code in `src/main/java/` (primarily `CopilotSession.java`) and tested by handwritten tests in `src/test/java/`. - -When `@github/copilot` is bumped, the schemas may change in ways the code generator does not yet handle. Common schema changes include: - -- **`$ref` references**: Inline nested type definitions replaced with `$ref` pointers to `#/definitions/` entries. The code generator must resolve these references and emit standalone Java types instead of nested records. -- **Field type changes**: Numeric fields changing between `double`, `Long`, `int`, etc. -- **Renamed fields/properties**: JSON property names changing (e.g. `input` → `inputTokens`). -- **New types or events**: Entirely new schemas or event types added. -- **Structural changes**: Properties moving between objects, new required fields, changed enum values. - -## Instructions - -Follow these steps exactly. You have a maximum of **3 attempts** to get `mvn verify` passing. - -### Step 0: Setup - -Check out the branch and ensure the environment is ready: - -```bash -git checkout "${{ inputs.branch }}" -git pull origin "${{ inputs.branch }}" -``` - -Set up the Java 17 environment and verify Maven and Node.js are available: - -```bash -java -version -mvn --version -node --version -``` - -Install codegen dependencies: - -```bash -cd scripts/codegen && npm ci && cd ../.. -``` - -### Step 1: Reproduce the failure - -Run `mvn verify` to see the current errors: - -```bash -mvn verify 2>&1 | tee /tmp/mvn-verify.log -``` - -Review the full log at `/tmp/mvn-verify.log` if the tail output is insufficient. The earliest errors are often the root cause. - -If `mvn verify` succeeds (exit code 0), there is nothing to fix. Call the `noop` safe-output with message "mvn verify already passes on branch ${{ inputs.branch }}. No fixes needed." and stop. - -### Step 2: Diagnose the root cause - -Before making fixes, determine whether the failure is caused by: - -**(A) The code generator not handling new schema patterns.** Signs: -- Generated types are missing fields that the handwritten code references -- Generated types have wrong field types (e.g. `double` instead of `Long`) -- Types that used to be nested records are now missing (because `$ref` moved them to `#/definitions/`) -- New schemas exist but no corresponding Java types were generated - -**(B) Handwritten code referencing old generated type names/shapes.** Signs: -- Compilation errors in `src/main/java/` or `src/test/java/` referencing types that no longer exist -- Test data using old JSON field names - -Often **both** (A) and (B) apply: the codegen needs fixing first, then handwritten code needs updating. - -To diagnose, compare the current schemas with the generated output: - -```bash -# List available schemas -ls node_modules/@github/copilot/schemas/ - -# Check for $ref usage in schemas (indicates the codegen may need $ref resolution) -grep -r '"$ref"' node_modules/@github/copilot/schemas/ | head -20 - -# Look at a specific schema that relates to failing types -cat node_modules/@github/copilot/schemas/.json | head -80 -``` - -### Step 3: Fix the code generator (if needed) - -If the diagnosis shows the code generator does not handle the new schema format: - -1. **Read `scripts/codegen/java.ts`** to understand the current generation logic. - -2. **Fix `scripts/codegen/java.ts`** to handle the new schema patterns. Common fixes include: - - Adding `$ref` resolution to dereference `#/definitions/` pointers - - Generating standalone types for definitions instead of nested records - - Fixing type mappings for changed field types - -3. **Re-run code generation** to produce updated generated files: - ```bash - cd scripts/codegen && npm run generate && cd ../.. - ``` - -4. **Verify the generated output** looks reasonable: - ```bash - git diff --stat src/generated/java/ - ``` - -**You may ONLY modify `scripts/codegen/java.ts`.** Do not modify `package.json`, `package-lock.json`, or any other file under `scripts/codegen/`. - -### Step 4: Fix handwritten code (up to 3 attempts) - -For each attempt: - -1. **Read the errors carefully.** Look for: - - Compilation errors (missing methods, type mismatches, import issues) - - Test failures (assertion errors, runtime exceptions) - - The specific files and line numbers mentioned in the errors - -2. **Read the generated types** to understand what changed. Check the generated files that the handwritten code references: - ```bash - # Example: check what a generated type looks like now - cat src/generated/java/com/github/copilot/generated/rpc/.java - ``` - -3. **Fix the affected source files.** You may modify files under: - - `src/main/java/` — handwritten SDK source code - - `src/test/java/` — handwritten test code - - Common fixes: - - Update type references from old nested types to new standalone types (e.g. `SessionMcpListResultServersItem` → `McpServer`) - - Fix constructor arguments for changed field types (`double` → `Long`) - - Update JSON keys in test data to match renamed schema properties - - Add/remove imports for renamed/relocated types - -4. **Run formatting after making changes:** - ```bash - mvn spotless:apply - ``` - -5. **Verify the fix:** - ```bash - mvn verify 2>&1 | tee /tmp/mvn-verify.log - ``` - - If the output is long, check `/tmp/mvn-verify.log` for the full error details — root causes often appear early in the log. - -6. If `mvn verify` passes, proceed to Step 5. - If it fails and you have attempts remaining, go back to sub-step 1. - -### Step 5: Push fixes - -After `mvn verify` passes, commit all changes and use the `push-to-pull-request-branch` safe-output tool to push to PR #${{ inputs.pr_number }}: - -```bash -git add -A -git commit -m "Fix codegen and build failures after @github/copilot update - -Automated fix applied by codegen-agentic-fix workflow." -``` - -Then call the `push-to-pull-request-branch` tool to push your commits to the PR branch. - -### Step 6: Failure handling - -If all 3 attempts fail: - -1. Call the `add-comment` tool on PR #${{ inputs.pr_number }} explaining: - - What errors remain - - What fixes were attempted - - Whether the issue is in the code generator or handwritten code - - That manual intervention is needed - -2. Call the `noop` safe-output with a message summarizing the failure. - -Do **NOT** push broken code. - -## Important constraints - -- **NEVER** hand-edit files under `src/generated/java/` — these are auto-generated. They are updated by running `cd scripts/codegen && npm run generate`. -- **NEVER** modify `pom.xml` — build config is not in scope -- **NEVER** modify `scripts/codegen/package.json` or `scripts/codegen/package-lock.json` — dependency versions are not in scope -- **NEVER** modify files under `.github/` — workflow files are not in scope -- You **MAY** modify `scripts/codegen/java.ts` to fix the code generator -- You **MAY** modify files under `src/main/java/` and `src/test/java/` to fix handwritten code -- Always run `mvn spotless:apply` before committing to ensure code formatting -- Maximum 3 fix attempts before reporting failure via `noop` -- Only push if `mvn verify` passes diff --git a/.github/workflows/codegen-check.yml b/.github/workflows/codegen-check.yml deleted file mode 100644 index 95e9365782..0000000000 --- a/.github/workflows/codegen-check.yml +++ /dev/null @@ -1,191 +0,0 @@ -name: "Codegen Check" - -on: - push: - branches: - - main - pull_request: - paths: - - 'scripts/codegen/**' - - 'src/generated/java/**' - - '.github/workflows/codegen-check.yml' - workflow_dispatch: - -# Permissions: contents: write and pull-requests: write are needed to push -# regenerated files back to PR branches. actions: write is needed to trigger -# the agentic fix workflow via gh workflow run. -# -# Dependabot PR caveat: Workflows triggered by pull_request from Dependabot -# run with a read-only GITHUB_TOKEN regardless of declared permissions. -# The push step uses continue-on-error to handle this gracefully — if the -# push fails (Dependabot), the agentic fix workflow will handle pushing -# via its own push-to-pull-request-branch safe-output. -permissions: - contents: write - pull-requests: write - actions: write - -jobs: - check: - name: "Verify generated files are up-to-date" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - ref: ${{ github.event.pull_request.head.sha || github.sha }} - # For PRs, check out the PR head so we can push back to it - repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }} - - - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 - with: - node-version: 22 - - - name: Install codegen dependencies - working-directory: ./scripts/codegen - run: npm ci - - - name: Run codegen - working-directory: ./scripts/codegen - run: npm run generate - - - name: Check for uncommitted changes - id: check-changes - run: | - if [ -n "$(git status --porcelain)" ]; then - echo "changed=true" >> "$GITHUB_OUTPUT" - echo "Generated files are out of date." - git diff --stat - else - echo "changed=false" >> "$GITHUB_OUTPUT" - echo "✅ Generated files are up-to-date" - fi - - # --- On push to main: fail if generated files are stale (existing behavior) --- - - name: Fail on stale generated files (push to main) - if: steps.check-changes.outputs.changed == 'true' && github.event_name != 'pull_request' - run: | - echo "::error::Generated files are out of date. Run 'cd scripts/codegen && npm run generate' and commit the changes." - git diff - exit 1 - - # --- On PR: commit regenerated files back and verify build --- - - name: Commit and push regenerated files to PR branch - id: push-regen - if: steps.check-changes.outputs.changed == 'true' && github.event_name == 'pull_request' - continue-on-error: true - env: - GH_TOKEN: ${{ github.token }} - HEAD_REF: ${{ github.head_ref }} - run: | - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - git add -A - git commit -m "Regenerate codegen output - - Auto-committed by codegen-check workflow." - git push origin "HEAD:$HEAD_REF" - - - name: Fail if regenerated files could not be pushed - if: steps.push-regen.outcome == 'failure' - run: | - echo "::error::Could not push regenerated files to the PR branch. This is expected for Dependabot PRs (read-only token) and fork PRs." - echo "To fix: check out this PR branch locally, run 'cd scripts/codegen && npm run generate', commit, and push." - exit 1 - - - uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5 - if: steps.push-regen.outcome == 'success' - with: - java-version: "17" - distribution: "microsoft" - cache: "maven" - - - name: Run mvn verify - id: mvn-verify - if: steps.push-regen.outcome == 'success' - continue-on-error: true - env: - COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} - run: | - set -o pipefail - mvn verify 2>&1 | tee /tmp/mvn-verify-output.txt - echo "exit_code=$?" >> "$GITHUB_OUTPUT" - - - name: Capture error summary - id: error-summary - if: steps.mvn-verify.outcome == 'failure' - run: | - SUMMARY=$(tail -80 /tmp/mvn-verify-output.txt) - echo "$SUMMARY" > /tmp/error-summary.txt - echo "has_errors=true" >> "$GITHUB_OUTPUT" - - - name: Trigger agentic fix workflow - id: trigger-fix - if: steps.error-summary.outputs.has_errors == 'true' && steps.push-regen.outcome == 'success' - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PR_NUMBER: ${{ github.event.pull_request.number }} - BRANCH: ${{ github.head_ref }} - run: | - ERROR_SUMMARY=$(cat /tmp/error-summary.txt) - - # Ensure PR has dependencies label (required by codegen-agentic-fix safe-output) - gh pr edit "$PR_NUMBER" --add-label dependencies - - gh workflow run codegen-agentic-fix.lock.yml \ - -f branch="$BRANCH" \ - -f pr_number="$PR_NUMBER" \ - -f error_summary="$ERROR_SUMMARY" - echo "Triggered codegen-agentic-fix workflow on branch $BRANCH for PR #$PR_NUMBER" - - - name: Wait for agentic fix to complete - if: steps.trigger-fix.outcome == 'success' - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BRANCH: ${{ github.head_ref }} - run: | - echo "Waiting for agentic fix workflow to start..." - sleep 30 - - for i in $(seq 1 60); do - RUN_ID=$(gh run list \ - --workflow=codegen-agentic-fix.lock.yml \ - --branch="$BRANCH" \ - --limit=1 \ - --json databaseId,status \ - --jq '.[0].databaseId') - - STATUS=$(gh run list \ - --workflow=codegen-agentic-fix.lock.yml \ - --branch="$BRANCH" \ - --limit=1 \ - --json databaseId,status \ - --jq '.[0].status') - - if [ "$STATUS" = "completed" ]; then - echo "Agentic fix workflow run $RUN_ID completed." - CONCLUSION=$(gh run view "$RUN_ID" --json conclusion --jq .conclusion) - echo "Conclusion: $CONCLUSION" - break - fi - - echo "Run $RUN_ID status: $STATUS (attempt $i/60)" - sleep 30 - done - - if [ "$STATUS" != "completed" ]; then - echo "::warning::Agentic fix workflow did not complete within 30 minutes." - fi - - - name: Fetch latest changes after agentic fix - if: steps.trigger-fix.outcome == 'success' - env: - HEAD_REF: ${{ github.head_ref }} - run: | - git fetch origin "$HEAD_REF" - git reset --hard "origin/$HEAD_REF" - - - name: Final mvn verify after agentic fix - if: steps.trigger-fix.outcome == 'success' - env: - COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} - run: mvn verify diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml deleted file mode 100644 index b53c9e8699..0000000000 --- a/.github/workflows/copilot-setup-steps.yml +++ /dev/null @@ -1,59 +0,0 @@ -name: "Copilot Setup Steps" - -# This workflow configures the environment for GitHub Copilot Agent with gh-aw MCP server -on: - workflow_dispatch: - push: - paths: - - .github/workflows/copilot-setup-steps.yml - -jobs: - # The job MUST be called 'copilot-setup-steps' to be recognized by GitHub Copilot Agent - copilot-setup-steps: - runs-on: ubuntu-latest - - # Set minimal permissions for setup steps - # Copilot Agent receives its own token with appropriate permissions - permissions: - contents: read - - steps: - # Clone the repository - - name: Checkout repository - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - # Install GitHub CLI and gh-aw extension for Copilot Agent interaction - - name: Install gh-aw extension - uses: github/gh-aw/actions/setup-cli@0feed75a980b06f247abbbf80127f8eb2c19e2c5 # v0.74.8 - with: - version: v0.68.3 - - # Setup Node.js - - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 - with: - node-version: 22 - - # Set up JDK 17 - - name: Set up JDK 17 - uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5 - with: - java-version: '17' - distribution: 'temurin' - cache: 'maven' - - # Enable repository pre-commit hooks (including Spotless checks for relevant source changes) - - name: Enable pre-commit hooks - run: git config core.hooksPath .githooks - - # Verify installations - - name: Verify tool installations - run: | - echo "=== Verifying installations ===" - node --version - npm --version - java -version - gh --version - gh aw version - echo "--- Git hooks path ---" - git config core.hooksPath - echo "✅ All tools installed successfully" diff --git a/.github/workflows/notes.template b/.github/workflows/notes.template deleted file mode 100644 index 9c148cdf13..0000000000 --- a/.github/workflows/notes.template +++ /dev/null @@ -1,28 +0,0 @@ -# Installation - -ℹ️ **Public Preview:** This is the official Java SDK for GitHub Copilot. This repository treats the official .NET and Node.js SDKs for GitHub Copilot as reference implementations. These SDKs are all officially supported as GitHub open source projects. The Java implementation follows the backward compatibility guarantees offered by the reference implementations. While in public preview, minor breaking changes may still occur between releases. - -⚠️ **Artifact versioning plan:** Releases of this implementation track releases of the reference implementation. For each release of the reference implementation, there may follow a corresponding relase of this implementation with the same number as the reference implementation. Release identifiers of the reference implementation are in the form `vMaj.Min.Micro`. For example v0.1.32. The corresponding maven version for the release will be `Maj.Min.Micro-java.N`, where `Maj`, `Min` and `Micro` are the corresponding numbers for the reference impementation release, and `N` is a monotonically increasing sequence number starting with 0 for each release. See the corrseponding architectural decision record for more information in the `docs/adr` directory of the source code. - -📦 [View on Maven Central](https://central.sonatype.com/artifact/${GROUP_ID}/${ARTIFACT_ID}/${VERSION}) - -📖 [Documentation](https://github.github.io/copilot-sdk-java/${VERSION}/) · [Javadoc](https://github.github.io/copilot-sdk-java/${VERSION}/apidocs/index.html) - -## Maven -```xml - - ${GROUP_ID} - ${ARTIFACT_ID} - ${VERSION} - -``` - -## Gradle (Kotlin DSL) -```kotlin -implementation("${GROUP_ID}:${ARTIFACT_ID}:${VERSION}") -``` - -## Gradle (Groovy DSL) -```groovy -implementation '${GROUP_ID}:${ARTIFACT_ID}:${VERSION}' -``` diff --git a/.github/workflows/publish-maven.yml b/.github/workflows/publish-maven.yml deleted file mode 100644 index cc612389b7..0000000000 --- a/.github/workflows/publish-maven.yml +++ /dev/null @@ -1,256 +0,0 @@ -name: Publish to Maven Central - -env: - # Disable Husky Git hooks in CI to prevent local development hooks - # (e.g., pre-commit formatting checks) from running during automated - # workflows that perform git commits and pushes. - HUSKY: 0 - -on: - workflow_dispatch: - inputs: - releaseVersion: - description: "Release version (e.g., 1.0.0). If empty, derives from pom.xml by removing -SNAPSHOT" - required: false - type: string - developmentVersion: - description: "Next development version (e.g., 1.0.1-SNAPSHOT). If empty, increments patch version" - required: false - type: string - prerelease: - description: "Is this a prerelease?" - type: boolean - required: false - default: false - -permissions: - contents: write - id-token: write - -concurrency: - group: publish-maven - cancel-in-progress: false - -jobs: - publish-maven: - name: Publish Java SDK to Maven Central - runs-on: ubuntu-latest - outputs: - version: ${{ steps.versions.outputs.release_version }} - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - fetch-depth: 0 - token: ${{ secrets.RELEASE_TOKEN }} - - - name: Configure Git for Maven Release - run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - - - uses: ./.github/actions/setup-copilot - - - name: Set up JDK 17 - uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5 - with: - java-version: "17" - distribution: "microsoft" - cache: "maven" - server-id: central - server-username: MAVEN_USERNAME - server-password: MAVEN_PASSWORD - gpg-private-key: ${{ secrets.GPG_SECRET_KEY }} - gpg-passphrase: GPG_PASSPHRASE - - - name: Determine versions - id: versions - run: | - CURRENT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) - echo "Current pom.xml version: $CURRENT_VERSION" - - # Determine release version - if [ -n "${{ inputs.releaseVersion }}" ]; then - RELEASE_VERSION="${{ inputs.releaseVersion }}" - else - # Remove -SNAPSHOT suffix if present - RELEASE_VERSION="${CURRENT_VERSION%-SNAPSHOT}" - fi - echo "Release version: $RELEASE_VERSION" - - # Determine next development version - if [ -n "${{ inputs.developmentVersion }}" ]; then - DEV_VERSION="${{ inputs.developmentVersion }}" - if [[ "$DEV_VERSION" != *-SNAPSHOT ]]; then - echo "::error::developmentVersion '${DEV_VERSION}' must end with '-SNAPSHOT' (e.g., '${DEV_VERSION}-SNAPSHOT'). The maven-release-plugin requires the next development version to be a snapshot." - exit 1 - fi - else - # Split version: supports "0.1.32", "0.1.32-java.0", and "0.1.32-java-preview.0" formats - # Validate RELEASE_VERSION format explicitly to provide clear errors - if ! echo "$RELEASE_VERSION" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+(-(beta-)?java(-preview)?\.[0-9]+)?$'; then - echo "Error: RELEASE_VERSION '$RELEASE_VERSION' is invalid. Expected format: M.M.P, M.M.P-java.N, M.M.P-java-preview.N, M.M.P-beta-java.N, or M.M.P-beta-java-preview.N (e.g., 1.2.3, 1.2.3-java.0, 1.2.3-java-preview.0, 1.2.3-beta-java.0, or 1.2.3-beta-java-preview.0)." >&2 - exit 1 - fi - # Extract the base M.M.P portion (before any qualifier) - BASE_VERSION=$(echo "$RELEASE_VERSION" | grep -oE '^[0-9]+\.[0-9]+\.[0-9]+') - QUALIFIER=$(echo "$RELEASE_VERSION" | sed "s|^${BASE_VERSION}||") - IFS='.' read -r MAJOR MINOR PATCH <<< "$BASE_VERSION" - NEXT_PATCH=$((PATCH + 1)) - DEV_VERSION="${MAJOR}.${MINOR}.${NEXT_PATCH}${QUALIFIER}-SNAPSHOT" - fi - echo "Next development version: $DEV_VERSION" - - echo "release_version=$RELEASE_VERSION" >> $GITHUB_OUTPUT - echo "dev_version=$DEV_VERSION" >> $GITHUB_OUTPUT - - echo "### Version Summary" >> $GITHUB_STEP_SUMMARY - echo "- **Release version:** $RELEASE_VERSION" >> $GITHUB_STEP_SUMMARY - echo "- **Next development version:** $DEV_VERSION" >> $GITHUB_STEP_SUMMARY - - - name: Update documentation with release version - id: update-docs - run: | - VERSION="${{ steps.versions.outputs.release_version }}" - - # Read the reference implementation SDK commit hash that this release is synced to - REFERENCE_IMPL_HASH=$(cat .lastmerge) - REFERENCE_IMPL_SHORT="${REFERENCE_IMPL_HASH:0:7}" - REFERENCE_IMPL_URL="https://github.com/github/copilot-sdk/commit/${REFERENCE_IMPL_HASH}" - echo "Reference implementation SDK sync: ${REFERENCE_IMPL_SHORT} (${REFERENCE_IMPL_URL})" - - # Update CHANGELOG.md with release version and Reference implementation sync hash - ./.github/scripts/release/update-changelog.sh "${VERSION}" "${REFERENCE_IMPL_HASH}" - - # Update version in README.md (supports any version qualifier like -java.N, -java-preview.N, -beta-java.N) - sed -i "s|[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-[a-z][a-z0-9-]*\.[0-9][0-9]*\)*|${VERSION}|g" README.md - sed -i "s|copilot-sdk-java:[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-[a-z][a-z0-9-]*\.[0-9][0-9]*\)*|copilot-sdk-java:${VERSION}|g" README.md - - # Update snapshot version in README.md - DEV_VERSION="${{ steps.versions.outputs.dev_version }}" - sed -i "s|[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-[a-z][a-z0-9-]*\.[0-9][0-9]*\)*-SNAPSHOT|${DEV_VERSION}|g" README.md - - # Update version in jbang-example.java - sed -i "s|copilot-sdk-java:[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-[a-z][a-z0-9-]*\.[0-9][0-9]*\)*|copilot-sdk-java:${VERSION}|g" jbang-example.java - sed -i 's|copilot-sdk-java:${project\.version}|copilot-sdk-java:'"${VERSION}"'|g' jbang-example.java - - # Update version in cookbook files (hardcoded for direct GitHub browsing and JBang usage) - find src/site/markdown/cookbook -name "*.md" -type f -exec \ - sed -i "s|copilot-sdk-java:[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-[a-z][a-z0-9-]*\.[0-9][0-9]*\)*|copilot-sdk-java:${VERSION}|g" {} \; - - # Commit the documentation changes before release:prepare (requires clean working directory) - git add CHANGELOG.md README.md jbang-example.java src/site/markdown/cookbook/ - git commit -m "docs: update version references to ${VERSION}" - - # Save the commit SHA for potential rollback - echo "docs_commit_sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT - - git push origin main - - - name: Prepare Release - run: | - mvn -B release:prepare \ - -DreleaseVersion=${{ steps.versions.outputs.release_version }} \ - -DdevelopmentVersion=${{ steps.versions.outputs.dev_version }} \ - -DtagNameFormat=v@{project.version} \ - -DpushChanges=true \ - -Darguments="-DskipTests" - env: - MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }} - MAVEN_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} - GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} - - - name: Perform Release and Deploy to Maven Central - run: | - mvn -B release:perform \ - -Dgoals="deploy" \ - -Darguments="-DskipTests -Prelease" - env: - MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }} - MAVEN_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} - GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} - - - name: Rollback documentation commit on failure - if: failure() && steps.update-docs.outputs.docs_commit_sha != '' - run: | - echo "Release failed, rolling back documentation commit..." - git revert --no-edit ${{ steps.update-docs.outputs.docs_commit_sha }} - git push origin main - - # Also run Maven release:rollback to clean up any partial release state - mvn -B release:rollback || true - - github-release: - name: Create GitHub Release - needs: publish-maven - if: github.ref == 'refs/heads/main' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - fetch-depth: 0 - - name: Create GitHub Release - run: | - VERSION="${{ needs.publish-maven.outputs.version }}" - GROUP_ID="com.github" - ARTIFACT_ID="copilot-sdk-java" - CURRENT_TAG="v${VERSION}" - - if gh release view "${CURRENT_TAG}" >/dev/null 2>&1; then - echo "Release ${CURRENT_TAG} already exists. Skipping creation." - exit 0 - fi - - # Generate release notes from template - export VERSION GROUP_ID ARTIFACT_ID - RELEASE_NOTES=$(envsubst < .github/workflows/notes.template) - - # Get the previous tag for generating notes - PREV_TAG=$(git tag --list 'v*' --sort=-version:refname \ - | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+(-java(-preview)?\.[0-9]+)?$' \ - | grep -Fxv "${CURRENT_TAG}" \ - | head -n 1) - - echo "Current tag: ${CURRENT_TAG}" - echo "Previous tag: ${PREV_TAG}" - - # Build the gh release command - GH_ARGS=("${CURRENT_TAG}") - GH_ARGS+=("--title" "GitHub Copilot SDK for Java ${VERSION}") - GH_ARGS+=("--notes" "${RELEASE_NOTES}") - GH_ARGS+=("--generate-notes") - - if [ -n "$PREV_TAG" ]; then - GH_ARGS+=("--notes-start-tag" "$PREV_TAG") - fi - - ${{ inputs.prerelease == true && 'GH_ARGS+=("--prerelease")' || '' }} - - gh release create "${GH_ARGS[@]}" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Move 'latest' tag to new release - run: | - VERSION="${{ needs.publish-maven.outputs.version }}" - git tag -f latest "v${VERSION}" - git push origin latest --force - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - deploy-site: - name: Deploy Documentation - needs: [publish-maven, github-release] - runs-on: ubuntu-latest - permissions: - actions: write - contents: read - steps: - - name: Trigger site deployment - run: | - gh workflow run deploy-site.yml \ - --repo ${{ github.repository }} \ - -f version="${{ needs.publish-maven.outputs.version }}" \ - -f publish_as_latest=true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - diff --git a/.github/workflows/publish-snapshot.yml b/.github/workflows/publish-snapshot.yml deleted file mode 100644 index a341b04a1d..0000000000 --- a/.github/workflows/publish-snapshot.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: Publish Snapshot to Maven Central - -env: - HUSKY: 0 - -on: - workflow_dispatch: - -permissions: - contents: read - -concurrency: - group: publish-snapshot - cancel-in-progress: false - -jobs: - publish-snapshot: - name: Publish SNAPSHOT to Maven Central - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - fetch-depth: 0 - - - uses: ./.github/actions/setup-copilot - - - name: Set up JDK 17 - uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5 - with: - java-version: "17" - distribution: "microsoft" - cache: "maven" - server-id: central - server-username: MAVEN_USERNAME - server-password: MAVEN_PASSWORD - - - name: Verify version is a SNAPSHOT - run: | - VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) - echo "Publishing version: $VERSION" - if [[ "$VERSION" != *"-SNAPSHOT" ]]; then - echo "ERROR: This workflow only publishes SNAPSHOT versions. Current version: $VERSION" - exit 1 - fi - echo "### Snapshot Publish" >> $GITHUB_STEP_SUMMARY - echo "- **Version:** $VERSION" >> $GITHUB_STEP_SUMMARY - echo "- **Repository:** Maven Central Snapshots" >> $GITHUB_STEP_SUMMARY - - - name: Deploy Snapshot - run: mvn -B deploy -DskipTests - env: - MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }} - MAVEN_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} diff --git a/.github/workflows/reference-impl-sync.lock.yml b/.github/workflows/reference-impl-sync.lock.yml deleted file mode 100644 index 653aab5f95..0000000000 --- a/.github/workflows/reference-impl-sync.lock.yml +++ /dev/null @@ -1,1457 +0,0 @@ -# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"e070dae210e4eea3d67e1692aa7e929fdc4c6a2c9e86bfbd6f11a786ad051bc3","compiler_version":"v0.74.8","strict":true,"agent_id":"copilot"} -# gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_AGENT_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"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/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"efa55847f72aadb03490d955263ff911bf758700","version":"v0.74.8"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.49"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.49"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.49"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.9","digest":"sha256:64828b42a4482f58fab16509d7f8f495a6d97c972a98a68aff20543531ac0388","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.3.9@sha256:64828b42a4482f58fab16509d7f8f495a6d97c972a98a68aff20543531ac0388"},{"image":"ghcr.io/github/github-mcp-server:v1.0.4"},{"image":"node:lts-alpine","digest":"sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f","pinned_image":"node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f"}]} -# ___ _ _ -# / _ \ | | (_) -# | |_| | __ _ ___ _ __ | |_ _ ___ -# | _ |/ _` |/ _ \ '_ \| __| |/ __| -# | | | | (_| | __/ | | | |_| | (__ -# \_| |_/\__, |\___|_| |_|\__|_|\___| -# __/ | -# _ _ |___/ -# | | | | / _| | -# | | | | ___ _ __ _ __| |_| | _____ ____ -# | |/\| |/ _ \ '__| |/ /| _| |/ _ \ \ /\ / / ___| -# \ /\ / (_) | | | | ( | | | | (_) \ V V /\__ \ -# \/ \/ \___/|_| |_|\_\|_| |_|\___/ \_/\_/ |___/ -# -# This file was automatically generated by gh-aw (v0.74.8). DO NOT EDIT. -# -# 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/ -# -# Reference implementation sync workflow. Checks for new commits in the official -# Copilot SDK (github/copilot-sdk) and assigns to Copilot to port changes. -# -# Secrets used: -# - COPILOT_GITHUB_TOKEN -# - GH_AW_AGENT_TOKEN -# - GH_AW_GITHUB_MCP_SERVER_TOKEN -# - GH_AW_GITHUB_TOKEN -# - GITHUB_TOKEN -# -# Custom actions used: -# - actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 -# - actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 -# - actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 -# - actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 -# - actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 -# - actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 -# - github/gh-aw-actions/setup@efa55847f72aadb03490d955263ff911bf758700 # v0.74.8 -# -# Container images used: -# - ghcr.io/github/gh-aw-firewall/agent:0.25.49 -# - ghcr.io/github/gh-aw-firewall/api-proxy:0.25.49 -# - ghcr.io/github/gh-aw-firewall/squid:0.25.49 -# - ghcr.io/github/gh-aw-mcpg:v0.3.9@sha256:64828b42a4482f58fab16509d7f8f495a6d97c972a98a68aff20543531ac0388 -# - ghcr.io/github/github-mcp-server:v1.0.4 -# - node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f - -name: "Reference Implementation Sync" -on: - workflow_dispatch: - inputs: - aw_context: - default: "" - description: "Agent caller context (used internally by Agentic Workflows)." - required: false - type: string - -permissions: {} - -concurrency: - group: "gh-aw-${{ github.workflow }}" - -run-name: "Reference Implementation Sync" - -jobs: - activation: - runs-on: ubuntu-slim - permissions: - actions: read - contents: read - outputs: - comment_id: "" - comment_repo: "" - 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 }} - secret_verification_result: ${{ steps.validate-secret.outputs.verification_result }} - 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' }} - steps: - - name: Setup Scripts - id: setup - uses: github/gh-aw-actions/setup@efa55847f72aadb03490d955263ff911bf758700 # v0.74.8 - with: - destination: ${{ runner.temp }}/gh-aw/actions - job-name: ${{ github.job }} - env: - GH_AW_SETUP_WORKFLOW_NAME: "Reference Implementation Sync" - GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/reference-impl-sync.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.48" - GH_AW_INFO_ENGINE_ID: "copilot" - - 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 || 'claude-sonnet-4.5' }} - GH_AW_INFO_VERSION: "1.0.48" - GH_AW_INFO_AGENT_VERSION: "1.0.48" - GH_AW_INFO_CLI_VERSION: "v0.74.8" - GH_AW_INFO_WORKFLOW_NAME: "Reference Implementation Sync" - GH_AW_INFO_EXPERIMENTAL: "false" - GH_AW_INFO_SUPPORTS_TOOLS_ALLOWLIST: "true" - GH_AW_INFO_STAGED: "false" - GH_AW_INFO_ALLOWED_DOMAINS: '["defaults","github"]' - GH_AW_INFO_FIREWALL_ENABLED: "true" - GH_AW_INFO_AWF_VERSION: "v0.25.49" - GH_AW_INFO_AWMG_VERSION: "" - GH_AW_INFO_FIREWALL_TYPE: "squid" - GH_AW_COMPILED_STRICT: "true" - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 - with: - script: | - const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_aw_info.cjs'); - await main(core, context); - - name: Validate COPILOT_GITHUB_TOKEN secret - id: validate-secret - run: bash "${RUNNER_TEMP}/gh-aw/actions/validate_multi_secret.sh" COPILOT_GITHUB_TOKEN 'GitHub Copilot CLI' https://github.github.com/gh-aw/reference/engines/#github-copilot-default - env: - COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} - - name: Checkout .github and .agents folders - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - sparse-checkout: | - .github - .agents - .claude - .codex - .crush - .gemini - .opencode - .pi - sparse-checkout-cone-mode: true - fetch-depth: 1 - - name: Save agent config folders for base branch restoration - env: - GH_AW_AGENT_FOLDERS: ".agents .claude .codex .crush .gemini .github .opencode .pi" - GH_AW_AGENT_FILES: ".crush.json AGENTS.md CLAUDE.md GEMINI.md PI.md opencode.jsonc" - # poutine:ignore untrusted_checkout_exec - 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: "reference-impl-sync.lock.yml" - GH_AW_CONTEXT_WORKFLOW_REF: "${{ github.workflow_ref }}" - with: - script: | - const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/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.74.8" - with: - script: | - const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/check_version_updates.cjs'); - await main(); - - name: Create prompt with built-in context - env: - GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt - GH_AW_SAFE_OUTPUTS: ${{ runner.temp }}/gh-aw/safeoutputs/outputs.jsonl - 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_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 }} - # poutine:ignore untrusted_checkout_exec - run: | - bash "${RUNNER_TEMP}/gh-aw/actions/create_prompt_first.sh" - { - cat << 'GH_AW_PROMPT_6607af3a63638eca_EOF' - - GH_AW_PROMPT_6607af3a63638eca_EOF - cat "${RUNNER_TEMP}/gh-aw/prompts/xpia.md" - cat "${RUNNER_TEMP}/gh-aw/prompts/temp_folder_prompt.md" - cat "${RUNNER_TEMP}/gh-aw/prompts/markdown.md" - cat "${RUNNER_TEMP}/gh-aw/prompts/safe_outputs_prompt.md" - cat << 'GH_AW_PROMPT_6607af3a63638eca_EOF' - - Tools: add_comment(max:10), create_issue, close_issue(max:10), close_pull_request(max:10), assign_to_agent, missing_tool, missing_data, noop - - GH_AW_PROMPT_6607af3a63638eca_EOF - cat "${RUNNER_TEMP}/gh-aw/prompts/mcp_cli_tools_prompt.md" - cat << 'GH_AW_PROMPT_6607af3a63638eca_EOF' - - The following GitHub context information is available for this workflow: - {{#if github.actor}} - - **actor**: __GH_AW_GITHUB_ACTOR__ - {{/if}} - {{#if github.repository}} - - **repository**: __GH_AW_GITHUB_REPOSITORY__ - {{/if}} - {{#if github.workspace}} - - **workspace**: __GH_AW_GITHUB_WORKSPACE__ - {{/if}} - {{#if github.event.issue.number || (github.aw.context.item_type == 'issue' && github.aw.context.item_number)}} - - **issue-number**: #__GH_AW_EXPR_802A9F6A__ - {{/if}} - {{#if github.event.discussion.number || (github.aw.context.item_type == 'discussion' && github.aw.context.item_number)}} - - **discussion-number**: #__GH_AW_EXPR_1A3A194A__ - {{/if}} - {{#if github.event.pull_request.number || (github.aw.context.item_type == 'pull_request' && github.aw.context.item_number)}} - - **pull-request-number**: #__GH_AW_EXPR_463A214A__ - {{/if}} - {{#if github.event.comment.id || github.aw.context.comment_id}} - - **comment-id**: __GH_AW_EXPR_FF1D34CE__ - {{/if}} - {{#if github.run_id}} - - **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__ - {{/if}} - - - GH_AW_PROMPT_6607af3a63638eca_EOF - cat "${RUNNER_TEMP}/gh-aw/prompts/github_mcp_tools_with_safeoutputs_prompt.md" - cat << 'GH_AW_PROMPT_6607af3a63638eca_EOF' - - {{#runtime-import .github/workflows/reference-impl-sync.md}} - GH_AW_PROMPT_6607af3a63638eca_EOF - } > "$GH_AW_PROMPT" - - name: Interpolate variables and render templates - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 - env: - GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt - GH_AW_ENGINE_ID: "copilot" - with: - script: | - const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/interpolate_prompt.cjs'); - await main(); - - name: Substitute placeholders - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 - env: - GH_AW_PROMPT: /tmp/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_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_MCP_CLI_SERVERS_LIST: '- `safeoutputs` — run `safeoutputs --help` to see available tools' - with: - script: | - const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - - const substitutePlaceholders = require('${{ runner.temp }}/gh-aw/actions/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_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_MCP_CLI_SERVERS_LIST: process.env.GH_AW_MCP_CLI_SERVERS_LIST - } - }); - - name: Validate prompt placeholders - env: - GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt - # poutine:ignore untrusted_checkout_exec - run: bash "${RUNNER_TEMP}/gh-aw/actions/validate_prompt_placeholders.sh" - - name: Print prompt - env: - GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt - # poutine:ignore untrusted_checkout_exec - run: bash "${RUNNER_TEMP}/gh-aw/actions/print_prompt_summary.sh" - - name: Upload activation artifact - if: success() - 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/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 - if-no-files-found: ignore - retention-days: 1 - - agent: - needs: activation - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - issues: read - pull-requests: read - 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_WORKFLOW_ID_SANITIZED: referenceimplsync - outputs: - agentic_engine_timeout: ${{ steps.detect-copilot-errors.outputs.agentic_engine_timeout || 'false' }} - checkout_pr_success: ${{ steps.checkout-pr.outputs.checkout_pr_success || 'true' }} - effective_tokens: ${{ steps.parse-mcp-gateway.outputs.effective_tokens }} - effective_tokens_rate_limit_error: ${{ steps.parse-mcp-gateway.outputs.effective_tokens_rate_limit_error || 'false' }} - has_patch: ${{ steps.collect_output.outputs.has_patch }} - inference_access_error: ${{ steps.detect-copilot-errors.outputs.inference_access_error || 'false' }} - mcp_policy_error: ${{ steps.detect-copilot-errors.outputs.mcp_policy_error || 'false' }} - model: ${{ needs.activation.outputs.model }} - model_not_supported_error: ${{ steps.detect-copilot-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 }} - steps: - - name: Setup Scripts - id: setup - uses: github/gh-aw-actions/setup@efa55847f72aadb03490d955263ff911bf758700 # v0.74.8 - 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: "Reference Implementation Sync" - GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/reference-impl-sync.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.48" - GH_AW_INFO_ENGINE_ID: "copilot" - - name: Set runtime paths - id: set-runtime-paths - run: | - { - 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: Checkout repository - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - 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: Configure Git credentials - env: - REPO_NAME: ${{ github.repository }} - SERVER_URL: ${{ github.server_url }} - GITHUB_TOKEN: ${{ github.token }} - run: | - git config --global user.email "github-actions[bot]@users.noreply.github.com" - git config --global user.name "github-actions[bot]" - git config --global am.keepcr true - # Re-authenticate git with GitHub token - SERVER_URL_STRIPPED="${SERVER_URL#https://}" - git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@${SERVER_URL_STRIPPED}/${REPO_NAME}.git" - echo "Git configured with standard GitHub Actions identity" - - name: Checkout PR branch - id: checkout-pr - if: | - github.event.pull_request || github.event.issue.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 { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/checkout_pr_branch.cjs'); - await main(); - - name: Install GitHub Copilot CLI - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.48 - env: - GH_HOST: github.com - - name: Install AWF binary - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.49 - - 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 determineAutomaticLockdown = require('${{ runner.temp }}/gh-aw/actions/determine_automatic_lockdown.cjs'); - await determineAutomaticLockdown(github, context, core); - - name: Download activation artifact - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - name: activation - path: /tmp/gh-aw - - name: Restore agent config folders from base branch - if: steps.checkout-pr.outcome == 'success' - env: - GH_AW_AGENT_FOLDERS: ".agents .claude .codex .crush .gemini .github .opencode .pi" - GH_AW_AGENT_FILES: ".crush.json AGENTS.md CLAUDE.md GEMINI.md PI.md opencode.jsonc" - 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: Download container images - run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.49 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.49 ghcr.io/github/gh-aw-firewall/squid:0.25.49 ghcr.io/github/gh-aw-mcpg:v0.3.9@sha256:64828b42a4482f58fab16509d7f8f495a6d97c972a98a68aff20543531ac0388 ghcr.io/github/github-mcp-server:v1.0.4 node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f - - name: Generate Safe Outputs Config - run: | - mkdir -p "${RUNNER_TEMP}/gh-aw/safeoutputs" - mkdir -p /tmp/gh-aw/safeoutputs - mkdir -p /tmp/gh-aw/mcp-logs/safeoutputs - cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_a313f45aa31633ba_EOF' - {"add_comment":{"max":10,"target":"*"},"assign_to_agent":{"max":1,"model":"claude-opus-4.6","name":"copilot","target":"*"},"close_issue":{"max":10,"required_labels":["reference-impl-sync"],"target":"*"},"close_pull_request":{"max":10,"target":"*"},"create_issue":{"labels":["reference-impl-sync"],"max":1,"title_prefix":"[reference-impl-sync] "},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"false"},"report_incomplete":{}} - GH_AW_SAFE_OUTPUTS_CONFIG_a313f45aa31633ba_EOF - - name: Generate Safe Outputs Tools - env: - GH_AW_TOOLS_META_JSON: | - { - "description_suffixes": { - "add_comment": " CONSTRAINTS: Maximum 10 comment(s) can be added. Target: *. Supports reply_to_id for discussion threading.", - "assign_to_agent": " CONSTRAINTS: Maximum 1 issue(s) can be assigned to agent.", - "close_issue": " CONSTRAINTS: Maximum 10 issue(s) can be closed. Target: *.", - "close_pull_request": " CONSTRAINTS: Maximum 10 pull request(s) can be closed. Target: *.", - "create_issue": " CONSTRAINTS: Maximum 1 issue(s) can be created. Title will be prefixed with \"[reference-impl-sync] \". Labels [\"reference-impl-sync\"] will be automatically added." - }, - "repo_params": {}, - "dynamic_tools": [] - } - GH_AW_VALIDATION_JSON: | - { - "add_comment": { - "defaultMax": 1, - "fields": { - "body": { - "required": true, - "type": "string", - "sanitize": true, - "maxLength": 65000 - }, - "item_number": { - "issueOrPRNumber": true - }, - "reply_to_id": { - "type": "string", - "maxLength": 256 - }, - "repo": { - "type": "string", - "maxLength": 256 - } - } - }, - "assign_to_agent": { - "defaultMax": 1, - "fields": { - "agent": { - "type": "string", - "sanitize": true, - "maxLength": 128 - }, - "issue_number": { - "issueNumberOrTemporaryId": true - }, - "pull_number": { - "optionalPositiveInteger": true - }, - "pull_request_repo": { - "type": "string", - "maxLength": 256 - }, - "repo": { - "type": "string", - "maxLength": 256 - } - }, - "customValidation": "requiresOneOf:issue_number,pull_number" - }, - "close_issue": { - "defaultMax": 1, - "fields": { - "body": { - "required": true, - "type": "string", - "sanitize": true, - "maxLength": 65000 - }, - "issue_number": { - "optionalPositiveInteger": true - }, - "repo": { - "type": "string", - "maxLength": 256 - } - } - }, - "close_pull_request": { - "defaultMax": 1, - "fields": { - "body": { - "required": true, - "type": "string", - "sanitize": true, - "maxLength": 65000 - }, - "pull_request_number": { - "optionalPositiveInteger": true - }, - "repo": { - "type": "string", - "maxLength": 256 - } - } - }, - "create_issue": { - "defaultMax": 1, - "fields": { - "body": { - "required": true, - "type": "string", - "sanitize": true, - "maxLength": 65000 - }, - "fields": { - "type": "array" - }, - "labels": { - "type": "array", - "itemType": "string", - "itemSanitize": true, - "itemMaxLength": 128 - }, - "parent": { - "issueOrPRNumber": true - }, - "repo": { - "type": "string", - "maxLength": 256 - }, - "temporary_id": { - "type": "string" - }, - "title": { - "required": true, - "type": "string", - "sanitize": true, - "maxLength": 128 - } - } - }, - "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 { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_safe_outputs_tools.cjs'); - await main(); - - name: Generate Safe Outputs MCP Server Config - id: safe-outputs-config - run: | - # Generate a secure random API key (360 bits of entropy, 40+ chars) - # Mask immediately to prevent timing vulnerabilities - API_KEY=$(openssl rand -base64 45 | tr -d '/+=') - echo "::add-mask::${API_KEY}" - - PORT=3001 - - # Set outputs for next steps - { - echo "safe_outputs_api_key=${API_KEY}" - echo "safe_outputs_port=${PORT}" - } >> "$GITHUB_OUTPUT" - - echo "Safe Outputs MCP server will run on port ${PORT}" - - - name: Start Safe Outputs MCP HTTP Server - id: safe-outputs-start - env: - DEBUG: '*' - GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }} - GH_AW_SAFE_OUTPUTS_PORT: ${{ steps.safe-outputs-config.outputs.safe_outputs_port }} - GH_AW_SAFE_OUTPUTS_API_KEY: ${{ steps.safe-outputs-config.outputs.safe_outputs_api_key }} - GH_AW_SAFE_OUTPUTS_TOOLS_PATH: ${{ runner.temp }}/gh-aw/safeoutputs/tools.json - GH_AW_SAFE_OUTPUTS_CONFIG_PATH: ${{ runner.temp }}/gh-aw/safeoutputs/config.json - GH_AW_MCP_LOG_DIR: /tmp/gh-aw/mcp-logs/safeoutputs - run: | - # Environment variables are set above to prevent template injection - export DEBUG - export GH_AW_SAFE_OUTPUTS - export GH_AW_SAFE_OUTPUTS_PORT - export GH_AW_SAFE_OUTPUTS_API_KEY - export GH_AW_SAFE_OUTPUTS_TOOLS_PATH - export GH_AW_SAFE_OUTPUTS_CONFIG_PATH - export GH_AW_MCP_LOG_DIR - - bash "${RUNNER_TEMP}/gh-aw/actions/start_safe_outputs_server.sh" - - - name: Start MCP Gateway - id: start-mcp-gateway - env: - GH_AW_SAFE_OUTPUTS: ${{ steps.set-runtime-paths.outputs.GH_AW_SAFE_OUTPUTS }} - GH_AW_SAFE_OUTPUTS_API_KEY: ${{ steps.safe-outputs-start.outputs.api_key }} - GH_AW_SAFE_OUTPUTS_PORT: ${{ steps.safe-outputs-start.outputs.port }} - 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 }} - run: | - set -eo pipefail - mkdir -p "${RUNNER_TEMP}/gh-aw/mcp-config" - - # Export gateway environment variables for MCP config and gateway script - export MCP_GATEWAY_PORT="8080" - export MCP_GATEWAY_DOMAIN="host.docker.internal" - export MCP_GATEWAY_HOST_DOMAIN="localhost" - MCP_GATEWAY_API_KEY=$(openssl rand -base64 45 | tr -d '/+=') - echo "::add-mask::${MCP_GATEWAY_API_KEY}" - export MCP_GATEWAY_API_KEY - export MCP_GATEWAY_PAYLOAD_DIR="/tmp/gh-aw/mcp-payloads" - mkdir -p "${MCP_GATEWAY_PAYLOAD_DIR}" - export MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD="524288" - 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') - case "${DOCKER_HOST:-}" in - unix://* ) DOCKER_SOCK_PATH="${DOCKER_HOST#unix://}" ;; - /* ) DOCKER_SOCK_PATH="$DOCKER_HOST" ;; - * ) DOCKER_SOCK_PATH=/var/run/docker.sock ;; - esac - DOCKER_SOCK_GID=$(stat -c '%g' "$DOCKER_SOCK_PATH" 2>/dev/null || echo '0') - export MCP_GATEWAY_DOCKER_COMMAND='docker run -i --rm --network host --add-host host.docker.internal:127.0.0.1 --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_API_KEY -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_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 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 GH_AW_SAFE_OUTPUTS_PORT -e GH_AW_SAFE_OUTPUTS_API_KEY -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 ghcr.io/github/gh-aw-mcpg:v0.3.9' - - mkdir -p /home/runner/.copilot - GH_AW_NODE=$(which node 2>/dev/null || command -v node 2>/dev/null || echo node) - cat << GH_AW_MCP_CONFIG_b1707c5ba8268c3f_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.0.4", - "env": { - "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": "http", - "url": "http://host.docker.internal:$GH_AW_SAFE_OUTPUTS_PORT", - "headers": { - "Authorization": "\${GH_AW_SAFE_OUTPUTS_API_KEY}" - }, - "guard-policies": { - "write-sink": { - "accept": [ - "*" - ] - } - } - } - }, - "gateway": { - "port": $MCP_GATEWAY_PORT, - "domain": "${MCP_GATEWAY_DOMAIN}", - "apiKey": "${MCP_GATEWAY_API_KEY}", - "payloadDir": "${MCP_GATEWAY_PAYLOAD_DIR}" - } - } - GH_AW_MCP_CONFIG_b1707c5ba8268c3f_EOF - - name: Mount MCP servers as CLIs - id: mount-mcp-clis - continue-on-error: true - env: - MCP_GATEWAY_API_KEY: ${{ steps.start-mcp-gateway.outputs.gateway-api-key }} - 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 { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io); - const { main } = require('${{ runner.temp }}/gh-aw/actions/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: 20 - run: | - set -o pipefail - printf '%s' "$(date +%s%3N)" > /tmp/gh-aw/agent_cli_start_ms.txt - 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) - printf '%s\n' '{"$schema":"https://github.com/github/gh-aw-firewall/releases/download/v0.25.49/awf-config.schema.json","network":{"allowDomains":["*.githubusercontent.com","api.business.githubcopilot.com","api.enterprise.githubcopilot.com","api.github.com","api.githubcopilot.com","api.individual.githubcopilot.com","api.snapcraft.io","archive.ubuntu.com","azure.archive.ubuntu.com","codeload.github.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","docs.github.com","github-cloud.githubusercontent.com","github-cloud.s3.amazonaws.com","github.blog","github.com","github.githubassets.com","host.docker.internal","json-schema.org","json.schemastore.org","keyserver.ubuntu.com","lfs.github.com","objects.githubusercontent.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","patch-diff.githubusercontent.com","ppa.launchpad.net","raw.githubusercontent.com","registry.npmjs.org","s.symcb.com","s.symcd.com","security.ubuntu.com","telemetry.enterprise.githubcopilot.com","ts-crl.ws.symantec.com","ts-ocsp.ws.symantec.com","www.googleapis.com"]},"apiProxy":{"enabled":true,"enableTokenSteering":true,"maxRuns":500,"maxEffectiveTokens":25000000,"models":{"agent":["sonnet-6x","gpt-5.4","gpt-5","gemini-pro","haiku","any"],"any":["copilot/*","anthropic/*","openai/*","google/*","gemini/*"],"auto":["large"],"claude":["agent","sonnet-6x","haiku","any"],"codex":["agent","gpt-5-codex","gpt-5","any"],"coding":["copilot/gpt-5*codex*","openai/gpt-5*codex*","gpt-5-codex"],"copilot":["agent","gpt-5.4","sonnet","gpt-5","any"],"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*"],"gemini":["agent","gemini-pro","gemini-flash","any"],"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-pro":["copilot/gemini-*pro*","google/gemini-*pro*","gemini/gemini-*pro*"],"gemma":["copilot/gemma*","google/gemma*","gemini/gemma*"],"gpt-4.1":["copilot/gpt-4.1*","openai/gpt-4.1*"],"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*"],"haiku":["copilot/*haiku*","anthropic/*haiku*"],"large":["sonnet","gpt-5-pro","gpt-5","gemini-pro"],"mini":["haiku","gpt-5-mini","gpt-5-nano","gemini-flash-lite","copilot/raptor*mini*"],"opus":["copilot/*opus*","anthropic/*opus*"],"reasoning":["copilot/o1*","copilot/o3*","copilot/o4*","openai/o1*","openai/o3*","openai/o4*"],"small":["mini"],"sonnet":["copilot/*sonnet*","anthropic/*sonnet*"],"sonnet-6x":["copilot/*sonnet-4.5*","copilot/*sonnet-4-5*","anthropic/*sonnet-4.5*","anthropic/*sonnet-4-5*","copilot/*sonnet-3.7*","copilot/*sonnet-3-7*","anthropic/*sonnet-3.7*","anthropic/*sonnet-3-7*","copilot/*sonnet-3.5*","copilot/*sonnet-3-5*","anthropic/*sonnet-3.5*","anthropic/*sonnet-3-5*"],"vision":["copilot/gemini-*image*","gemini/gemini-*image*","copilot/gemini-*flash*","gemini/gemini-*flash*"]}},"container":{"imageTag":"0.25.49"}}' > "${RUNNER_TEMP}/gh-aw/awf-config.json" - cp "${RUNNER_TEMP}/gh-aw/awf-config.json" /tmp/gh-aw/awf-config.json - GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS="" - if [[ "${DOCKER_HOST:-}" =~ ^tcp:// ]]; then - GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS="--docker-host-path-prefix /tmp/gh-aw" - fi - # shellcheck disable=SC1003 - sudo -E 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_DOCKER_HOST_PATH_PREFIX_ARGS} --env-all --exclude-env COPILOT_GITHUB_TOKEN --exclude-env GITHUB_MCP_SERVER_TOKEN --exclude-env MCP_GATEWAY_API_KEY --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --allow-host-ports 80,443,8080 --skip-pull \ - -- /bin/bash -c 'export PATH="${RUNNER_TEMP}/gh-aw/mcp-cli/bin:$PATH" && export PATH="$(find /opt/hostedtoolcache /home/runner/work/_tool -maxdepth 5 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/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_NODE_EXEC" ${RUNNER_TEMP}/gh-aw/actions/copilot_harness.cjs /usr/local/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' 2>&1 | tee -a /tmp/gh-aw/agent-stdio.log - env: - AWF_REFLECT_ENABLED: 1 - COPILOT_AGENT_RUNNER_TYPE: STANDALONE - COPILOT_DUMMY_BYOK: dummy-byok-key-for-offline-mode - COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} - COPILOT_MODEL: ${{ vars.GH_AW_MODEL_AGENT_COPILOT || 'claude-sonnet-4.5' }} - GH_AW_MCP_CONFIG: /home/runner/.copilot/mcp-config.json - 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_VERSION: v0.74.8 - 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] - XDG_CONFIG_HOME: /home/runner - - name: Detect Copilot errors - id: detect-copilot-errors - if: always() - continue-on-error: true - run: node "${RUNNER_TEMP}/gh-aw/actions/detect_copilot_errors.cjs" - - name: Configure Git credentials - env: - REPO_NAME: ${{ github.repository }} - SERVER_URL: ${{ github.server_url }} - GITHUB_TOKEN: ${{ github.token }} - run: | - git config --global user.email "github-actions[bot]@users.noreply.github.com" - git config --global user.name "github-actions[bot]" - git config --global am.keepcr true - # Re-authenticate git with GitHub token - SERVER_URL_STRIPPED="${SERVER_URL#https://}" - git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@${SERVER_URL_STRIPPED}/${REPO_NAME}.git" - echo "Git configured with standard GitHub Actions identity" - - 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_API_KEY: ${{ steps.start-mcp-gateway.outputs.gateway-api-key }} - 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 { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/redact_secrets.cjs'); - await main(); - env: - GH_AW_SECRET_NAMES: 'COPILOT_GITHUB_TOKEN,GH_AW_GITHUB_MCP_SERVER_TOKEN,GH_AW_GITHUB_TOKEN,GITHUB_TOKEN' - SECRET_COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_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: "*.githubusercontent.com,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,codeload.github.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,docs.github.com,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.blog,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.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,patch-diff.githubusercontent.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.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 { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/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/ - with: - script: | - const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/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 { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/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: | - # Fix permissions on firewall logs/audit dirs so they can be uploaded as artifacts - # AWF runs with sudo, creating files owned by root - sudo chmod -R a+rX /tmp/gh-aw/sandbox/firewall 2>/dev/null || true - # Only run awf logs summary if awf command exists (it may not be installed if workflow failed before install step) - if command -v awf &> /dev/null; then - awf logs summary | tee -a "$GITHUB_STEP_SUMMARY" - else - echo 'AWF binary not installed, skipping firewall log summary' - fi - - name: Parse token usage for step summary - if: always() - continue-on-error: true - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 - with: - script: | - const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/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 { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/awf_reflect_summary.cjs'); - await main(); - - 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 - - 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/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.stale_lock_file_failed == 'true') - runs-on: ubuntu-slim - permissions: - contents: read - discussions: write - issues: write - pull-requests: write - concurrency: - group: "gh-aw-conclusion-reference-impl-sync" - cancel-in-progress: false - queue: max - 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@efa55847f72aadb03490d955263ff911bf758700 # v0.74.8 - 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: "Reference Implementation Sync" - GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/reference-impl-sync.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.48" - 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: - name: agent - 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 - echo "GH_AW_AGENT_OUTPUT=/tmp/gh-aw/agent_output.json" >> "$GITHUB_OUTPUT" - - 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: "Reference Implementation Sync" - 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" - with: - github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} - script: | - const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/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: "Reference Implementation Sync" - 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 { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/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: "Reference Implementation Sync" - with: - github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} - script: | - const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/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: "Reference Implementation Sync" - with: - github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} - script: | - const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/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: "Reference Implementation Sync" - 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: "reference-impl-sync" - GH_AW_ACTION_FAILURE_ISSUE_EXPIRES_HOURS: "168" - GH_AW_ENGINE_ID: "copilot" - GH_AW_SECRET_VERIFICATION_RESULT: ${{ needs.activation.outputs.secret_verification_result }} - GH_AW_CHECKOUT_PR_SUCCESS: ${{ needs.agent.outputs.checkout_pr_success }} - GH_AW_EFFECTIVE_TOKENS: ${{ needs.agent.outputs.effective_tokens || '' }} - GH_AW_EFFECTIVE_TOKENS_RATE_LIMIT_ERROR: ${{ needs.agent.outputs.effective_tokens_rate_limit_error || 'false' }} - 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_ENGINE_API_HOSTS: "api.enterprise.githubcopilot.com,api.githubcopilot.com,api.business.githubcopilot.com,api.individual.githubcopilot.com" - GH_AW_ASSIGNMENT_ERRORS: ${{ needs.safe_outputs.outputs.assign_to_agent_assignment_errors }} - GH_AW_ASSIGNMENT_ERROR_COUNT: ${{ needs.safe_outputs.outputs.assign_to_agent_assignment_error_count }} - GH_AW_LOCKDOWN_CHECK_FAILED: ${{ needs.activation.outputs.lockdown_check_failed }} - GH_AW_STALE_LOCK_FILE_FAILED: ${{ needs.activation.outputs.stale_lock_file_failed }} - 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: "20" - GH_AW_MAX_EFFECTIVE_TOKENS: "25000000" - with: - github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} - script: | - const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/handle_agent_failure.cjs'); - await main(); - - detection: - needs: - - activation - - agent - if: > - always() && needs.agent.result != 'skipped' && (needs.agent.outputs.output_types != '' || needs.agent.outputs.has_patch == 'true') - runs-on: ubuntu-latest - permissions: - contents: read - outputs: - 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@efa55847f72aadb03490d955263ff911bf758700 # v0.74.8 - 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: "Reference Implementation Sync" - GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/reference-impl-sync.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.48" - 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: - name: agent - 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 - echo "GH_AW_AGENT_OUTPUT=/tmp/gh-aw/agent_output.json" >> "$GITHUB_OUTPUT" - - name: Checkout repository for patch context - if: needs.agent.outputs.has_patch == 'true' - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - 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.25.49 ghcr.io/github/gh-aw-firewall/api-proxy:0.25.49 ghcr.io/github/gh-aw-firewall/squid:0.25.49 - - 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/runner/.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: | - mkdir -p /tmp/gh-aw/threat-detection/aw-prompts - cp /tmp/gh-aw/aw-prompts/prompt.txt /tmp/gh-aw/threat-detection/aw-prompts/prompt.txt 2>/dev/null || true - cp /tmp/gh-aw/agent_output.json /tmp/gh-aw/threat-detection/agent_output.json 2>/dev/null || true - for f in /tmp/gh-aw/aw-*.patch; do - [ -f "$f" ] && cp "$f" /tmp/gh-aw/threat-detection/ 2>/dev/null || true - done - for f in /tmp/gh-aw/aw-*.bundle; do - [ -f "$f" ] && cp "$f" /tmp/gh-aw/threat-detection/ 2>/dev/null || true - done - echo "Prepared threat detection files:" - ls -la /tmp/gh-aw/threat-detection/ 2>/dev/null || true - - name: Setup threat detection - if: always() && steps.detection_guard.outputs.run_detection == 'true' - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 - env: - WORKFLOW_NAME: "Reference Implementation Sync" - WORKFLOW_DESCRIPTION: "Reference implementation sync workflow. Checks for new commits in the official\nCopilot SDK (github/copilot-sdk) and assigns to Copilot to port changes." - HAS_PATCH: ${{ needs.agent.outputs.has_patch }} - with: - script: | - const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/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: Setup Node.js - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 - with: - node-version: '24' - package-manager-cache: false - - name: Install GitHub Copilot CLI - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_copilot_cli.sh" 1.0.48 - env: - GH_HOST: github.com - - name: Install AWF binary - run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.49 - - name: Execute GitHub Copilot CLI - if: always() && steps.detection_guard.outputs.run_detection == 'true' - continue-on-error: true - id: detection_agentic_execution - # Copilot CLI tool arguments (sorted): - timeout-minutes: 20 - run: | - set -o pipefail - printf '%s' "$(date +%s%3N)" > /tmp/gh-aw/agent_cli_start_ms.txt - 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/threat-detection/detection.log) - printf '%s\n' '{"$schema":"https://github.com/github/gh-aw-firewall/releases/download/v0.25.49/awf-config.schema.json","network":{"allowDomains":["api.business.githubcopilot.com","api.enterprise.githubcopilot.com","api.github.com","api.githubcopilot.com","api.individual.githubcopilot.com","github.com","host.docker.internal","telemetry.enterprise.githubcopilot.com"]},"apiProxy":{"enabled":true,"enableTokenSteering":true,"maxRuns":500,"maxEffectiveTokens":25000000},"container":{"imageTag":"0.25.49"}}' > "${RUNNER_TEMP}/gh-aw/awf-config.json" - cp "${RUNNER_TEMP}/gh-aw/awf-config.json" /tmp/gh-aw/awf-config.json - GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS="" - if [[ "${DOCKER_HOST:-}" =~ ^tcp:// ]]; then - GH_AW_DOCKER_HOST_PATH_PREFIX_ARGS="--docker-host-path-prefix /tmp/gh-aw" - fi - # shellcheck disable=SC1003 - sudo -E 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_DOCKER_HOST_PATH_PREFIX_ARGS} --env-all --exclude-env COPILOT_GITHUB_TOKEN --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --audit-dir /tmp/gh-aw/sandbox/firewall/audit --enable-host-access --allow-host-ports 80,443,8080 --skip-pull \ - -- /bin/bash -c 'export PATH="$(find /opt/hostedtoolcache /home/runner/work/_tool -maxdepth 5 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/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_NODE_EXEC" ${RUNNER_TEMP}/gh-aw/actions/copilot_harness.cjs /usr/local/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 --add-dir "${GITHUB_WORKSPACE}" --prompt-file /tmp/gh-aw/aw-prompts/prompt.txt' 2>&1 | tee -a /tmp/gh-aw/threat-detection/detection.log - env: - AWF_REFLECT_ENABLED: 1 - COPILOT_AGENT_RUNNER_TYPE: STANDALONE - COPILOT_DUMMY_BYOK: dummy-byok-key-for-offline-mode - COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} - COPILOT_MODEL: ${{ vars.GH_AW_MODEL_DETECTION_COPILOT || 'claude-sonnet-4.5' }} - GH_AW_PHASE: detection - GH_AW_PROMPT: /tmp/gh-aw/aw-prompts/prompt.txt - GH_AW_VERSION: v0.74.8 - 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] - XDG_CONFIG_HOME: /home/runner - - name: Upload threat detection log - 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.log - if-no-files-found: ignore - - name: Parse and conclude threat detection - id: detection_conclusion - if: always() - continue-on-error: true - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 - 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" - with: - script: | - try { - const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_threat_detection_results.cjs'); - await main(); - } catch (loadErr) { - const continueOnError = process.env.GH_AW_DETECTION_CONTINUE_ON_ERROR !== 'false'; - const detectionExecutionFailed = process.env.DETECTION_AGENTIC_EXECUTION_OUTCOME === 'failure'; - const msg = 'ERR_SYSTEM: \u274C Unexpected error loading threat detection module: ' + (loadErr && loadErr.message ? loadErr.message : String(loadErr)); - core.error(msg); - core.setOutput('reason', 'parse_error'); - if (continueOnError && !detectionExecutionFailed) { - core.warning('\u26A0\uFE0F ' + msg); - core.setOutput('conclusion', 'warning'); - core.setOutput('success', 'false'); - } else { - core.setOutput('conclusion', 'failure'); - core.setOutput('success', 'false'); - core.setFailed(msg); - } - } - - safe_outputs: - needs: - - activation - - agent - - detection - if: (!cancelled()) && needs.agent.result != 'skipped' && needs.detection.result == 'success' - runs-on: ubuntu-slim - permissions: - contents: read - discussions: write - issues: write - pull-requests: write - timeout-minutes: 15 - env: - GH_AW_CALLER_WORKFLOW_ID: "${{ github.repository }}/reference-impl-sync" - 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: ${{ needs.agent.outputs.model }} - GH_AW_ENGINE_VERSION: "1.0.48" - GH_AW_WORKFLOW_ID: "reference-impl-sync" - GH_AW_WORKFLOW_NAME: "Reference Implementation Sync" - outputs: - assign_to_agent_assigned: ${{ steps.process_safe_outputs.outputs.assign_to_agent_assigned }} - assign_to_agent_assignment_error_count: ${{ steps.process_safe_outputs.outputs.assign_to_agent_assignment_error_count }} - assign_to_agent_assignment_errors: ${{ steps.process_safe_outputs.outputs.assign_to_agent_assignment_errors }} - 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 }} - created_issue_number: ${{ steps.process_safe_outputs.outputs.created_issue_number }} - created_issue_url: ${{ steps.process_safe_outputs.outputs.created_issue_url }} - process_safe_outputs_processed_count: ${{ steps.process_safe_outputs.outputs.processed_count }} - 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@efa55847f72aadb03490d955263ff911bf758700 # v0.74.8 - 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: "Reference Implementation Sync" - GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/reference-impl-sync.lock.yml@${{ github.ref }} - GH_AW_INFO_VERSION: "1.0.48" - 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: - name: agent - 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 - echo "GH_AW_AGENT_OUTPUT=/tmp/gh-aw/agent_output.json" >> "$GITHUB_OUTPUT" - - name: Configure GH_HOST for enterprise compatibility - id: ghes-host-config - shell: bash - run: | - # 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: "*.githubusercontent.com,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,codeload.github.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,docs.github.com,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.blog,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.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,patch-diff.githubusercontent.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.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\":{\"max\":10,\"target\":\"*\"},\"assign_to_agent\":{\"max\":1,\"model\":\"claude-opus-4.6\",\"name\":\"copilot\",\"target\":\"*\"},\"close_issue\":{\"max\":10,\"required_labels\":[\"reference-impl-sync\"],\"target\":\"*\"},\"close_pull_request\":{\"max\":10,\"target\":\"*\"},\"create_issue\":{\"labels\":[\"reference-impl-sync\"],\"max\":1,\"title_prefix\":\"[reference-impl-sync] \"},\"create_report_incomplete_issue\":{},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"false\"},\"report_incomplete\":{}}" - GH_AW_ASSIGN_TO_AGENT_TOKEN: ${{ secrets.GH_AW_AGENT_TOKEN || secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} - with: - github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} - script: | - const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io, getOctokit); - const { main } = require('${{ runner.temp }}/gh-aw/actions/safe_output_handler_manager.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 - if-no-files-found: ignore - diff --git a/.github/workflows/reference-impl-sync.md b/.github/workflows/reference-impl-sync.md deleted file mode 100644 index 44f84c0ffc..0000000000 --- a/.github/workflows/reference-impl-sync.md +++ /dev/null @@ -1,126 +0,0 @@ ---- -description: | - Reference implementation sync workflow. Checks for new commits in the official - Copilot SDK (github/copilot-sdk) and assigns to Copilot to port changes. - -on: - workflow_dispatch: - -permissions: - contents: read - actions: read - issues: read - pull-requests: read - -network: - allowed: - - defaults - - github - -tools: - github: - toolsets: [context, repos, issues, pull_requests] - -safe-outputs: - create-issue: - title-prefix: "[reference-impl-sync] " - labels: [reference-impl-sync] - close-issue: - required-labels: [reference-impl-sync] - target: "*" - max: 10 - add-comment: - target: "*" - max: 10 - assign-to-agent: - name: "copilot" - model: "claude-opus-4.6" - target: "*" - close-pull-request: - target: "*" - max: 10 - noop: - report-as-issue: false ---- -# Reference Implementation Sync - -You are an automation agent that detects new reference implementation changes and creates GitHub issues. You do **NOT** perform any code merges, edits, or pushes. Do **NOT** invoke any skills (especially `agentic-merge-reference-impl`). Your only job is to check for changes and use safe-output tools to create or close issues. - -## Instructions - -Follow these steps exactly: - -### Step 1: Read `.lastmerge` - -Read the file `.lastmerge` in the repository root. It contains the SHA of the last reference implementation commit that was merged into this Java SDK. - -### Step 2: Check for reference implementation changes - -Clone the reference implementation repository and compare commits: - -```bash -LAST_MERGE=$(cat .lastmerge) -git clone --quiet https://github.com/github/copilot-sdk.git /tmp/gh-aw/agent/reference-impl -cd /tmp/gh-aw/agent/reference-impl -REFERENCE_IMPL_HEAD=$(git rev-parse HEAD) -``` - -If `LAST_MERGE` equals `REFERENCE_IMPL_HEAD`, there are **no new changes**. Go to Step 3a. - -If they differ, count the new commits and generate a summary: - -```bash -COMMIT_COUNT=$(git rev-list --count "$LAST_MERGE".."$REFERENCE_IMPL_HEAD") -SUMMARY=$(git log --oneline "$LAST_MERGE".."$REFERENCE_IMPL_HEAD" | head -20) -``` - -Go to Step 3b. - -### Step 3a: No changes detected - -1. Search for any open issues with the `reference-impl-sync` label using the GitHub MCP tools. -2. If there are open `reference-impl-sync` labeled issues, close each one using the `close_issue` safe-output tool with a comment: "No new reference implementation changes detected. The Java SDK is up to date. Closing." -3. Search for any open pull requests whose head branch starts with `copilot/reference-impl`. Close each one using the `close_pull_request` safe-output tool with a comment: "Superseded — the Java SDK is up to date with the reference implementation. Closing stale sync PR." -4. Call the `noop` safe-output tool with message: "No new reference implementation changes since last merge ()." -5. **Stop here.** Do not proceed further. - -### Step 3b: Changes detected - -1. Search for any open issues with the `reference-impl-sync` label using the GitHub MCP tools. -2. Close each existing open `reference-impl-sync` issue using the `close_issue` safe-output tool with a comment: "Superseded by a newer reference implementation sync check." -3. Search for any open pull requests whose head branch starts with `copilot/reference-impl`. Close each one using the `close_pull_request` safe-output tool with a comment: "Superseded by a newer reference implementation sync issue. Closing stale sync PR." -4. Create a new issue using the `create_issue` safe-output tool with: - - **Title:** `Reference Implementation sync: new commits ()` - - **Body:** Include the following information: - ``` - ## Automated Reference Implementation Sync - - There are **** new commits in the [official Copilot SDK](https://github.com/github/copilot-sdk) since the last merge. - - - **Last merged commit:** [``](https://github.com/github/copilot-sdk/commit/) - - **Reference Implementation HEAD:** [``](https://github.com/github/copilot-sdk/commit/) - - ### Recent reference implementation commits - - ``` - - ``` - - ### Instructions - - **You MUST follow these steps in order. Do NOT improvise or skip scripts.** - - 1. ✅✅Read [.github/prompts/agentic-merge-reference-impl.prompt.md](.github/prompts/agentic-merge-reference-impl.prompt.md) in full before starting✅✅ - - ❌❌Do NOT clone the reference implementation manually — the start script does this.❌❌ - ❌❌Do NOT update .lastmerge manually — the finish script does this.❌❌ - ❌❌Do NOT skip the finish script — it syncs codegen versions and updates .lastmerge.❌❌ - ``` -5. After creating the issue, use the `assign_to_agent` safe-output tool to assign Copilot to the newly created issue. - -## Important constraints - -- **Do NOT edit any files**, create branches, or push code. -- **Do NOT invoke any skills** such as `agentic-merge-agentic-merge-reference-impl` or `commit-as-pull-request`. -- **Do NOT attempt to merge or port reference implementation changes.** That is done by a separate agent that picks up the issue you create. -- You **MUST** call at least one safe-output tool (`create_issue`, `close_issue`, `noop`, etc.) before finishing. diff --git a/.github/workflows/run-smoke-test.yml b/.github/workflows/run-smoke-test.yml deleted file mode 100644 index 8d0feac0c1..0000000000 --- a/.github/workflows/run-smoke-test.yml +++ /dev/null @@ -1,113 +0,0 @@ -name: Run smoke test - -on: - workflow_dispatch: - workflow_call: - secrets: - COPILOT_GITHUB_TOKEN: - required: true - -permissions: - contents: read - -jobs: - smoke-test-jdk17: - name: Build SDK and run smoke test (JDK 17) - runs-on: ubuntu-latest - if: github.ref == 'refs/heads/main' - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - - name: Set up JDK 17 - uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5 - with: - java-version: "17" - distribution: "microsoft" - cache: "maven" - - - uses: ./.github/actions/setup-copilot - - - name: Build SDK and install to local repo - run: mvn -DskipTests -Pskip-test-harness clean install - - - name: Create and run smoke test via Copilot CLI - env: - COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} - run: | - cat > /tmp/smoke-test-prompt.txt << 'PROMPT_EOF' - You are running inside the copilot-sdk-java repository. - The SDK has already been built and installed into the local Maven repository. - JDK 17 and Maven are already installed and on PATH. - - Execute the prompt at `src/test/prompts/PROMPT-smoke-test.md` with the following critical overrides: - - **Critical override — disable SNAPSHOT updates (but allow downloads):** The goal of this workflow is to validate the SDK SNAPSHOT that was just built and installed locally, not any newer SNAPSHOT that might exist in a remote repository. To ensure Maven does not download a newer timestamped SNAPSHOT of the SDK while still allowing it to download any missing plugins or dependencies, you must run the smoke-test Maven build without `-U` and with `--no-snapshot-updates`, so that it uses the locally installed SDK artifact. Use `mvn --no-snapshot-updates clean package` instead of `mvn -U clean package` or `mvn -o clean package`. - - **Critical override — do NOT run the jar:** Stop after the `mvn --no-snapshot-updates clean package` build succeeds. Do NOT execute Step 4 (java -jar) or Step 5 (verify exit code) from the prompt. The workflow will run the jar in a separate deterministic step to guarantee the exit code propagates correctly. - - Follow steps 1-3 only: create the `smoke-test/` directory, create `pom.xml` and the Java source file exactly as specified, and build with `mvn --no-snapshot-updates clean package` (no SNAPSHOT updates and without `-U`). - - If any step fails, exit with a non-zero exit code. Do not silently fix errors. - PROMPT_EOF - - copilot --yolo --prompt "$(cat /tmp/smoke-test-prompt.txt)" - - - name: Run smoke test jar - env: - COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} - run: | - cd smoke-test - java -jar ./target/copilot-sdk-smoketest-1.0-SNAPSHOT.jar - echo "Smoke test passed (exit code 0)" - - smoke-test-java25: - name: Build SDK and run smoke test (JDK 25) - runs-on: ubuntu-latest - if: github.ref == 'refs/heads/main' - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - - name: Set up JDK 25 - uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5 - with: - java-version: "25" - distribution: "microsoft" - cache: "maven" - - - uses: ./.github/actions/setup-copilot - - - name: Build SDK and install to local repo - run: mvn -DskipTests -Pskip-test-harness clean install - - - name: Create and run smoke test via Copilot CLI - env: - COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} - run: | - cat > /tmp/smoke-test-prompt.txt << 'PROMPT_EOF' - You are running inside the copilot-sdk-java repository. - The SDK has already been built and installed into the local Maven repository. - JDK 25 and Maven are already installed and on PATH. - - Execute the prompt at `src/test/prompts/PROMPT-smoke-test.md` with the following critical overrides: - - **Critical override — disable SNAPSHOT updates (but allow downloads):** The goal of this workflow is to validate the SDK SNAPSHOT that was just built and installed locally, not any newer SNAPSHOT that might exist in a remote repository. To ensure Maven does not download a newer timestamped SNAPSHOT of the SDK while still allowing it to download any missing plugins or dependencies, you must run the smoke-test Maven build without `-U` and with `--no-snapshot-updates`, so that it uses the locally installed SDK artifact. Use `mvn --no-snapshot-updates clean package` instead of `mvn -U clean package` or `mvn -o clean package`. - - **Critical override — do NOT run the jar:** Stop after the `mvn --no-snapshot-updates clean package` build succeeds. Do NOT execute Step 4 (java -jar) or Step 5 (verify exit code) from the prompt. The workflow will run the jar in a separate deterministic step to guarantee the exit code propagates correctly. - - **Critical override — enable Virtual Threads for JDK 25:** After creating the Java source file from the README "Quick Start" section but BEFORE building, you must modify the source file to enable virtual thread support. The Quick Start code contains inline comments that start with `// JDK 25+:` — these are instructions. Find every such comment and follow what it says (comment out lines it says to comment out, uncomment lines it says to uncomment). Add any imports required by the newly uncommented code (e.g. `java.util.concurrent.Executors`). - Also set `maven.compiler.source` and `maven.compiler.target` to `25` in the `pom.xml`. - - Follow steps 1-3 only: create the `smoke-test/` directory, create `pom.xml` and the Java source file exactly as specified, apply the JDK 25 virtual thread modifications described above, and build with `mvn --no-snapshot-updates clean package` (no SNAPSHOT updates and without `-U`). - - If any step fails, exit with a non-zero exit code. Do not silently fix errors. - PROMPT_EOF - - copilot --yolo --prompt "$(cat /tmp/smoke-test-prompt.txt)" - - - name: Run smoke test jar - env: - COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} - run: | - cd smoke-test - java -jar ./target/copilot-sdk-smoketest-1.0-SNAPSHOT.jar - echo "Smoke test passed (exit code 0)" diff --git a/.github/workflows/update-copilot-dependency.yml b/.github/workflows/update-copilot-dependency.yml deleted file mode 100644 index e6d76c2125..0000000000 --- a/.github/workflows/update-copilot-dependency.yml +++ /dev/null @@ -1,266 +0,0 @@ -name: "Update @github/copilot Dependency" - -on: - workflow_dispatch: - inputs: - version: - description: 'Target version of @github/copilot (e.g. 1.0.24)' - required: true - type: string - -permissions: - contents: write - pull-requests: write - actions: write - -jobs: - update: - name: "Update @github/copilot to ${{ inputs.version }}" - runs-on: ubuntu-latest - steps: - - name: Validate version input - env: - VERSION: ${{ inputs.version }} - run: | - if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9._-]+)?$ ]]; then - echo "::error::Invalid version format '$VERSION'. Expected semver (e.g. 1.0.24)." - exit 1 - fi - - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 - with: - node-version: 22 - - - name: Update @github/copilot in scripts/codegen - env: - VERSION: ${{ inputs.version }} - working-directory: ./scripts/codegen - # npm install updates package.json and package-lock.json to the new - # version; npm ci (below) then does a clean, reproducible install from - # the updated lock file. Both steps are required: npm install alone - # leaves leftover packages, while npm ci alone cannot change the pinned - # version in the lock file. - run: npm install "@github/copilot@$VERSION" - - - name: Install codegen dependencies - working-directory: ./scripts/codegen - run: npm ci - - - name: Run codegen - working-directory: ./scripts/codegen - run: npm run generate - - - uses: ./.github/actions/setup-copilot - - - name: Verify generated code against schema - env: - COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} - run: | - cat > /tmp/verify-codegen-prompt.txt << 'PROMPT_EOF' - You are running inside the copilot-sdk-java repository. - The code generator has just run and produced Java source files under - src/generated/java/com/github/copilot/generated/rpc/. - - Your task is to spot-check the generated API classes against the source - JSON schema to verify the generator produced correct output. - - **Critical constraint: Do NOT modify any files. This is a read-only - verification. Use only read/inspect operations.** - - **Steps:** - 1. Read the API schema at: - scripts/codegen/node_modules/@github/copilot/schemas/api.schema.json - - 2. Pick these 3 generated API classes to verify: - - src/generated/java/com/github/copilot/generated/rpc/SessionToolsApi.java - - src/generated/java/com/github/copilot/generated/rpc/SessionUiApi.java - - src/generated/java/com/github/copilot/generated/rpc/SessionPermissionsApi.java - - 3. For each class, verify: - - Every RPC method in the schema's corresponding namespace has a - matching Java method in the generated class - - Parameter record fields match the JSON schema property names - - Java types are consistent with JSON schema types (String for - "string", Integer/int for "integer", Boolean/boolean for - "boolean", List for "array", Map or a generated class for - "object", etc.) - - No extra methods exist in the Java class that are not in the - schema - - 4. Print a summary table of what was checked and the result for each - method. - - 5. If ANY mismatch is found, print the details and exit with a - non-zero code. - If all checks pass, print "Schema verification passed" and exit 0. - PROMPT_EOF - - copilot --yolo --prompt "$(cat /tmp/verify-codegen-prompt.txt)" - - # --- Commit, create PR, then run mvn verify --- - # The PR must exist before triggering the agentic fix workflow, which - # uses push-to-pull-request-branch safe-output to push fixes. - - - name: Commit and push changes - id: commit-changes - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - VERSION: ${{ inputs.version }} - run: | - BRANCH="update-copilot-$VERSION" - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - - if git rev-parse --verify "origin/$BRANCH" >/dev/null 2>&1; then - git checkout "$BRANCH" - git reset --hard HEAD - else - git checkout -b "$BRANCH" - fi - - git add -A - - if git diff --cached --quiet; then - echo "No changes detected; skipping commit and PR creation." - echo "has_changes=false" >> "$GITHUB_OUTPUT" - exit 0 - fi - - git commit -m "Update @github/copilot to $VERSION - - - Updated @github/copilot in scripts/codegen - - Re-ran Java code generator" - git push origin "$BRANCH" --force-with-lease - echo "has_changes=true" >> "$GITHUB_OUTPUT" - echo "branch=$BRANCH" >> "$GITHUB_OUTPUT" - - - name: Create pull request - id: create-pr - if: steps.commit-changes.outputs.has_changes == 'true' - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - VERSION: ${{ inputs.version }} - BRANCH: ${{ steps.commit-changes.outputs.branch }} - run: | - if gh pr view "$BRANCH" >/dev/null 2>&1; then - echo "Pull request for branch '$BRANCH' already exists; updated branch only." - PR_NUMBER=$(gh pr view "$BRANCH" --json number --jq .number) - gh pr edit "$PR_NUMBER" --add-label dependencies - else - PR_NUMBER=$(gh pr create \ - --title "Update @github/copilot to $VERSION" \ - --body "Automated update of \`@github/copilot\` to version \`$VERSION\`. - - ### Changes - - Updated \`@github/copilot\` in \`scripts/codegen/package.json\` - - Re-ran Java code generator (\`scripts/codegen\`) - - > Created by the **Update @github/copilot Dependency** workflow." \ - --label dependencies \ - --base main \ - --head "$BRANCH" \ - | grep -oE '[0-9]+$' || gh pr view "$BRANCH" --json number --jq .number) - fi - echo "pr_number=$PR_NUMBER" >> "$GITHUB_OUTPUT" - - # --- Build verification --- - - - uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5 - if: steps.commit-changes.outputs.has_changes == 'true' - with: - java-version: "17" - distribution: "microsoft" - cache: "maven" - - - name: Run mvn verify - id: mvn-verify - if: steps.commit-changes.outputs.has_changes == 'true' - continue-on-error: true - env: - COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} - run: | - set -o pipefail - mvn verify 2>&1 | tee /tmp/mvn-verify-output.txt - echo "exit_code=$?" >> "$GITHUB_OUTPUT" - - - name: Capture error summary - id: error-summary - if: steps.mvn-verify.outcome == 'failure' - run: | - # Extract the last 80 lines as error summary (enough context for the agent) - SUMMARY=$(tail -80 /tmp/mvn-verify-output.txt) - # Write to file to avoid shell escaping issues with multiline strings - echo "$SUMMARY" > /tmp/error-summary.txt - echo "has_errors=true" >> "$GITHUB_OUTPUT" - - # --- Agentic fix on failure --- - - - name: Trigger agentic fix workflow - id: trigger-fix - if: steps.error-summary.outputs.has_errors == 'true' - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BRANCH: ${{ steps.commit-changes.outputs.branch }} - PR_NUMBER: ${{ steps.create-pr.outputs.pr_number }} - run: | - ERROR_SUMMARY=$(cat /tmp/error-summary.txt) - gh workflow run codegen-agentic-fix.lock.yml \ - -f branch="$BRANCH" \ - -f pr_number="$PR_NUMBER" \ - -f error_summary="$ERROR_SUMMARY" - echo "Triggered codegen-agentic-fix workflow on branch $BRANCH" - - - name: Wait for agentic fix to complete - if: steps.trigger-fix.outcome == 'success' - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BRANCH: ${{ steps.commit-changes.outputs.branch }} - run: | - echo "Waiting for agentic fix workflow to start..." - sleep 30 - - for i in $(seq 1 60); do - RUN_ID=$(gh run list \ - --workflow=codegen-agentic-fix.lock.yml \ - --branch="$BRANCH" \ - --limit=1 \ - --json databaseId,status \ - --jq '.[0].databaseId') - - STATUS=$(gh run list \ - --workflow=codegen-agentic-fix.lock.yml \ - --branch="$BRANCH" \ - --limit=1 \ - --json databaseId,status \ - --jq '.[0].status') - - if [ "$STATUS" = "completed" ]; then - echo "Agentic fix workflow run $RUN_ID completed." - CONCLUSION=$(gh run view "$RUN_ID" --json conclusion --jq .conclusion) - echo "Conclusion: $CONCLUSION" - break - fi - - echo "Run $RUN_ID status: $STATUS (attempt $i/60)" - sleep 30 - done - - if [ "$STATUS" != "completed" ]; then - echo "::warning::Agentic fix workflow did not complete within 30 minutes." - fi - - - name: Fetch latest changes after agentic fix - if: steps.trigger-fix.outcome == 'success' - env: - BRANCH: ${{ steps.commit-changes.outputs.branch }} - run: | - git fetch origin "$BRANCH" - git reset --hard "origin/$BRANCH" - - - name: Final mvn verify after agentic fix - if: steps.trigger-fix.outcome == 'success' - env: - COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} - run: mvn verify diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties deleted file mode 100644 index 8dea6c227c..0000000000 --- a/.mvn/wrapper/maven-wrapper.properties +++ /dev/null @@ -1,3 +0,0 @@ -wrapperVersion=3.3.4 -distributionType=only-script -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.12/apache-maven-3.9.12-bin.zip diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 9be6c3347b..0000000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "version": "0.2.0", - "configurations": [ - { - "type": "java", - "name": "Debug JUnit Tests (with FINE logging)", - "request": "launch", - "mainClass": "", - "projectName": "copilot-sdk", - "vmArgs": "-Djava.util.logging.config.file=${workspaceFolder}/src/test/resources/logging-debug.properties -Dcopilot.sdk.dir=${workspaceFolder}/target/copilot-sdk -Dcopilot.tests.dir=${workspaceFolder}/target/copilot-sdk/test" - }, - { - "type": "java", - "name": "Debug Current Test File", - "request": "launch", - "mainClass": "", - "projectName": "copilot-sdk", - "vmArgs": "-Djava.util.logging.config.file=${workspaceFolder}/src/test/resources/logging-debug.properties -Dcopilot.sdk.dir=${workspaceFolder}/target/copilot-sdk -Dcopilot.tests.dir=${workspaceFolder}/target/copilot-sdk/test" - } - ] -} diff --git a/.vscode/mcp.json b/.vscode/mcp.json deleted file mode 100644 index 6699af5648..0000000000 --- a/.vscode/mcp.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "servers": { - "github-agentic-workflows": { - "command": "gh", - "args": [ - "aw", - "mcp-server" - ], - "cwd": "${workspaceFolder}" - } - } -} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 66748785b5..0000000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "java.test.config": { - "vmArgs": [ - "-Djava.util.logging.config.file=${workspaceFolder}/src/test/resources/logging-debug.properties", - "-Dcopilot.sdk.dir=${workspaceFolder}/target/copilot-sdk", - "-Dcopilot.tests.dir=${workspaceFolder}/target/copilot-sdk/test" - ] - }, - "java.compile.nullAnalysis.mode": "automatic", - "java.configuration.updateBuildConfiguration": "automatic" -} diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 20d8d21470..0000000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,544 +0,0 @@ -# Changelog - -All notable changes to the GitHub Copilot SDK for Java will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - -> Note: This file is automatically modified by scripts and coding agents. Do not change it manually. - -## [Unreleased] - -> **Reference implementation sync:** [`github/copilot-sdk@6010405`](https://github.com/github/copilot-sdk/commit/60104052cd914949ddf8c7a31e1856cd6db0a57c) - -## [1.0.0-beta-10-java.0] - 2026-05-28 - -> **Reference implementation sync:** [`github/copilot-sdk@6010405`](https://github.com/github/copilot-sdk/commit/60104052cd914949ddf8c7a31e1856cd6db0a57c) -## [1.0.0-beta-8-java.0] - 2026-05-28 - -> **Reference implementation sync:** [`github/copilot-sdk@6010405`](https://github.com/github/copilot-sdk/commit/60104052cd914949ddf8c7a31e1856cd6db0a57c) -## [1.0.0-beta-java.4] - 2026-05-16 - -> **Reference implementation sync:** [`github/copilot-sdk@e20f5be`](https://github.com/github/copilot-sdk/commit/e20f5bef125860accb30c60d1b35109371a77f16) -## [1.0.0-beta-java.3] - 2026-05-11 - -> **Reference implementation sync:** [`github/copilot-sdk@4a0437b`](https://github.com/github/copilot-sdk/commit/4a0437bb03a0b60a1867f14ae8e3faf053afa5aa) -## [1.0.0-beta-java.2] - 2026-05-08 - -> **Reference implementation sync:** [`github/copilot-sdk@066a69c`](https://github.com/github/copilot-sdk/commit/066a69c1e849adf1bd98564ab1b52316ec471182) -## [1.0.0-beta-java.1] - 2026-05-05 - -> **Reference implementation sync:** [`github/copilot-sdk@c063458`](https://github.com/github/copilot-sdk/commit/c063458ecc3d606766f04cf203b11b08de672cc8) -## [0.3.0-java.2] - 2026-04-26 - -> **Reference implementation sync:** [`github/copilot-sdk@dd2dcbc`](https://github.com/github/copilot-sdk/commit/dd2dcbc439256acfb9feb2cff07c0b9c820091b8) -## [0.3.0-java-preview.1] - 2026-04-21 - -> **Reference implementation sync:** [`github/copilot-sdk@922959f`](https://github.com/github/copilot-sdk/commit/922959f4a7b83509c3620d4881733c6c5677f00c) -## [0.3.0-java-preview.0] - 2026-04-21 - -> **Reference implementation sync:** [`github/copilot-sdk@c3fa6cb`](https://github.com/github/copilot-sdk/commit/c3fa6cbfb83d4a20b7912b1a17013d48f5a277a1) -## [0.2.2-java.1] - 2026-04-07 - -> **Reference implementation sync:** [`github/copilot-sdk@c3fa6cb`](https://github.com/github/copilot-sdk/commit/c3fa6cbfb83d4a20b7912b1a17013d48f5a277a1) -### Added - -- Slash commands — register `/command` handlers invoked from the CLI TUI via `SessionConfig.setCommands()` (reference implementation: [`f7fd757`](https://github.com/github/copilot-sdk/commit/f7fd757)) -- `CommandDefinition`, `CommandContext`, `CommandHandler`, `CommandWireDefinition` — types for defining and handling slash commands -- `CommandExecuteEvent` — event dispatched when a registered slash command is executed -- Elicitation (UI dialogs) — incoming handler via `SessionConfig.setOnElicitationRequest()` and outgoing convenience methods via `session.getUi()` (reference implementation: [`f7fd757`](https://github.com/github/copilot-sdk/commit/f7fd757)) -- `ElicitationContext`, `ElicitationHandler`, `ElicitationParams`, `ElicitationResult`, `ElicitationResultAction`, `ElicitationSchema`, `InputOptions` — types for elicitation -- `ElicitationRequestedEvent` — event dispatched when an elicitation request is received -- `SessionUiApi` — convenience API on `session.getUi()` for `confirm()`, `select()`, `input()`, and `elicitation()` calls -- `SessionCapabilities` and `SessionUiCapabilities` — session capability reporting populated from create/resume response -- `CapabilitiesChangedEvent` — event dispatched when session capabilities are updated -- `CopilotClient.getSessionMetadata(String)` — O(1) session lookup by ID -- `GetSessionMetadataResponse` — response type for `getSessionMetadata` - -### Fixed - -- Permission events already resolved by a pre-hook now short-circuit before invoking the client-side handler -- `SessionUiApi` Javadoc now uses valid Java null-check syntax instead of `?.` -- README updated to say "GitHub Copilot CLI 1.0.17" instead of "GitHub Copilot 1.0.17" - -## [0.2.1-java.1] - 2026-04-02 - -> **Reference implementation sync:** [`github/copilot-sdk@4088739`](https://github.com/github/copilot-sdk/commit/40887393a9e687dacc141a645799441b0313ff15) -## [0.2.1-java.0] - 2026-03-26 - -> **Reference implementation sync:** [`github/copilot-sdk@4088739`](https://github.com/github/copilot-sdk/commit/40887393a9e687dacc141a645799441b0313ff15) -### Added - -- `UnknownSessionEvent` — forward-compatible placeholder for event types not yet known to the SDK; unknown events are now dispatched to handlers instead of being silently dropped (reference implementation: [`d82fd62`](https://github.com/github/copilot-sdk/commit/d82fd62)) -- `PermissionRequestResultKind.NO_RESULT` — new constant that signals the handler intentionally abstains from answering a permission request, leaving it unanswered for another client (reference implementation: [`df59a0e`](https://github.com/github/copilot-sdk/commit/df59a0e)) -- `ToolDefinition.skipPermission` field and `ToolDefinition.createSkipPermission()` factory — marks a tool to skip the permission prompt (reference implementation: [`10c4d02`](https://github.com/github/copilot-sdk/commit/10c4d02)) -- `SystemMessageMode.CUSTOMIZE` — new enum value for fine-grained system prompt customization (reference implementation: [`005b780`](https://github.com/github/copilot-sdk/commit/005b780)) -- `SectionOverrideAction` enum — specifies the operation on a system prompt section (replace, remove, append, prepend, transform) (reference implementation: [`005b780`](https://github.com/github/copilot-sdk/commit/005b780)) -- `SectionOverride` class — describes how one section of the system prompt should be modified, with optional transform callback (reference implementation: [`005b780`](https://github.com/github/copilot-sdk/commit/005b780)) -- `SystemPromptSections` constants — well-known section identifier strings for use with CUSTOMIZE mode (reference implementation: [`005b780`](https://github.com/github/copilot-sdk/commit/005b780)) -- `SystemMessageConfig.setSections(Map)` — section-level overrides for CUSTOMIZE mode (reference implementation: [`005b780`](https://github.com/github/copilot-sdk/commit/005b780)) -- `systemMessage.transform` RPC handler — the SDK now registers a handler that invokes transform callbacks registered in the session config (reference implementation: [`005b780`](https://github.com/github/copilot-sdk/commit/005b780)) -- `CopilotSession.setModel(String, String)` — new overload that accepts an optional reasoning effort level (reference implementation: [`ea90f07`](https://github.com/github/copilot-sdk/commit/ea90f07)) -- `CopilotSession.log(String, String, Boolean, String)` — new overload with an optional `url` parameter (minor addition) -- `BlobAttachment` class — inline base64-encoded binary attachment for messages (e.g., images) (reference implementation: [`698b259`](https://github.com/github/copilot-sdk/commit/698b259)) -- `MessageAttachment` sealed interface — type-safe base for all attachment types (`Attachment`, `BlobAttachment`), with Jackson polymorphic serialization support -- `TelemetryConfig` class — OpenTelemetry configuration for the CLI server; set on `CopilotClientOptions.setTelemetry()` (reference implementation: [`f2d21a0`](https://github.com/github/copilot-sdk/commit/f2d21a0)) -- `CopilotClientOptions.setTelemetry(TelemetryConfig)` — enables OpenTelemetry instrumentation in the CLI server (reference implementation: [`f2d21a0`](https://github.com/github/copilot-sdk/commit/f2d21a0)) - -### Changed - -- `Attachment` record now implements `MessageAttachment` sealed interface -- `BlobAttachment` class now implements `MessageAttachment` sealed interface and is `final` -- `MessageOptions.setAttachments(List)` — parameter type changed from `List` to `List` to support both `Attachment` and `BlobAttachment` in the same list with full compile-time safety -- `SendMessageRequest.setAttachments(List)` — matching change for the internal request type - -### Deprecated - -- `CopilotClientOptions.setAutoRestart(boolean)` — this option has no effect and will be removed in a future release - -## [0.1.32-java.0] - 2026-03-17 - -> **Reference implementation sync:** [`github/copilot-sdk@062b61c`](https://github.com/github/copilot-sdk/commit/062b61c8aa63b9b5d45fa1d7b01723e6660ffa83) -## [1.0.11] - 2026-03-12 - -> **Reference implementation sync:** [`github/copilot-sdk@062b61c`](https://github.com/github/copilot-sdk/commit/062b61c8aa63b9b5d45fa1d7b01723e6660ffa83) -### Added - -- `CopilotClientOptions.setOnListModels(Supplier>>)` — custom handler for `listModels()` used in BYOK mode to return models from a custom provider instead of querying the CLI (reference implementation: [`e478657`](https://github.com/github/copilot-sdk/commit/e478657)) -- `SessionConfig.setAgent(String)` — pre-selects a custom agent by name when creating a session (reference implementation: [`7766b1a`](https://github.com/github/copilot-sdk/commit/7766b1a)) -- `ResumeSessionConfig.setAgent(String)` — pre-selects a custom agent by name when resuming a session (reference implementation: [`7766b1a`](https://github.com/github/copilot-sdk/commit/7766b1a)) -- `SessionConfig.setOnEvent(Consumer)` — registers an event handler before the `session.create` RPC is issued, ensuring no early events are missed (reference implementation: [`4125fe7`](https://github.com/github/copilot-sdk/commit/4125fe7)) -- `ResumeSessionConfig.setOnEvent(Consumer)` — registers an event handler before the `session.resume` RPC is issued (reference implementation: [`4125fe7`](https://github.com/github/copilot-sdk/commit/4125fe7)) -- New broadcast session event types (protocol v3): `ExternalToolRequestedEvent` (`external_tool.requested`), `ExternalToolCompletedEvent` (`external_tool.completed`), `PermissionRequestedEvent` (`permission.requested`), `PermissionCompletedEvent` (`permission.completed`), `CommandQueuedEvent` (`command.queued`), `CommandCompletedEvent` (`command.completed`), `ExitPlanModeRequestedEvent` (`exit_plan_mode.requested`), `ExitPlanModeCompletedEvent` (`exit_plan_mode.completed`), `SystemNotificationEvent` (`system.notification`) (reference implementation: [`1653812`](https://github.com/github/copilot-sdk/commit/1653812), [`396e8b3`](https://github.com/github/copilot-sdk/commit/396e8b3)) -- `CopilotSession.log(String)` and `CopilotSession.log(String, String, Boolean)` — log a message to the session timeline (reference implementation: [`4125fe7`](https://github.com/github/copilot-sdk/commit/4125fe7)) - -### Changed - -- **Protocol version bumped to v3.** The SDK now supports CLI servers running v2 or v3 (backward-compatible range). Sessions are now registered in the client's session map *before* the `session.create`/`session.resume` RPC is issued, ensuring broadcast events emitted immediately on session start are never dropped (reference implementation: [`4125fe7`](https://github.com/github/copilot-sdk/commit/4125fe7), [`1653812`](https://github.com/github/copilot-sdk/commit/1653812)) -- In protocol v3, tool calls and permission requests that have a registered handler are now handled automatically via `ExternalToolRequestedEvent` and `PermissionRequestedEvent` broadcast events; results are sent back via `session.tools.handlePendingToolCall` and `session.permissions.handlePendingPermissionRequest` RPC calls (reference implementation: [`1653812`](https://github.com/github/copilot-sdk/commit/1653812)) - -## [1.0.10] - 2026-03-03 - -> **Reference implementation sync:** [`github/copilot-sdk@dcd86c1`](https://github.com/github/copilot-sdk/commit/dcd86c189501ce1b46b787ca60d90f3f315f3079) -### Added - -- `CopilotSession.setModel(String)` — changes the model for an existing session mid-conversation; the new model takes effect for the next message, and conversation history is preserved (reference implementation: [`bd98e3a`](https://github.com/github/copilot-sdk/commit/bd98e3a)) -- `ToolDefinition.createOverride(String, String, Map, ToolHandler)` — creates a tool definition that overrides a built-in CLI tool with the same name (reference implementation: [`f843c80`](https://github.com/github/copilot-sdk/commit/f843c80)) -- `ToolDefinition` record now includes `overridesBuiltInTool` field; when `true`, signals to the CLI that the custom tool intentionally replaces a built-in (reference implementation: [`f843c80`](https://github.com/github/copilot-sdk/commit/f843c80)) -- `CopilotSession.listAgents()` — lists custom agents available for selection (reference implementation: [`9d998fb`](https://github.com/github/copilot-sdk/commit/9d998fb)) -- `CopilotSession.getCurrentAgent()` — gets the currently selected custom agent (reference implementation: [`9d998fb`](https://github.com/github/copilot-sdk/commit/9d998fb)) -- `CopilotSession.selectAgent(String)` — selects a custom agent for the session (reference implementation: [`9d998fb`](https://github.com/github/copilot-sdk/commit/9d998fb)) -- `CopilotSession.deselectAgent()` — deselects the current custom agent (reference implementation: [`9d998fb`](https://github.com/github/copilot-sdk/commit/9d998fb)) -- `CopilotSession.compact()` — triggers immediate session context compaction (reference implementation: [`9d998fb`](https://github.com/github/copilot-sdk/commit/9d998fb)) -- `AgentInfo` — new JSON type representing a custom agent with `name`, `displayName`, and `description` (reference implementation: [`9d998fb`](https://github.com/github/copilot-sdk/commit/9d998fb)) -- New event types: `SessionTaskCompleteEvent` (`session.task_complete`), `AssistantStreamingDeltaEvent` (`assistant.streaming_delta`), `SubagentDeselectedEvent` (`subagent.deselected`) (reference implementation: various commits) -- `AssistantTurnStartEvent` data now includes `interactionId` field -- `AssistantMessageEvent` data now includes `interactionId` field -- `ToolExecutionCompleteEvent` data now includes `model` and `interactionId` fields -- `SkillInvokedEvent` data now includes `pluginName` and `pluginVersion` fields -- `AssistantUsageEvent` data now includes `copilotUsage` field with `CopilotUsage` and `TokenDetails` nested types -- E2E tests for custom tool permission approval and denial flows (reference implementation: [`388f2f3`](https://github.com/github/copilot-sdk/commit/388f2f3)) - -### Changed - -- **Breaking:** `createSession(SessionConfig)` now requires a non-null `onPermissionRequest` handler; throws `IllegalArgumentException` if not provided (reference implementation: [`279f6c4`](https://github.com/github/copilot-sdk/commit/279f6c4)) -- **Breaking:** `resumeSession(String, ResumeSessionConfig)` now requires a non-null `onPermissionRequest` handler; throws `IllegalArgumentException` if not provided (reference implementation: [`279f6c4`](https://github.com/github/copilot-sdk/commit/279f6c4)) -- **Breaking:** The no-arg `createSession()` and `resumeSession(String)` overloads were removed (reference implementation: [`279f6c4`](https://github.com/github/copilot-sdk/commit/279f6c4)) -- `AssistantMessageDeltaEvent` data: `totalResponseSizeBytes` field moved to new `AssistantStreamingDeltaEvent` (reference implementation: various) - -### Fixed - -- Permission checks now also apply to SDK-registered custom tools, invoking the `onPermissionRequest` handler with `kind="custom-tool"` before executing tools (reference implementation: [`388f2f3`](https://github.com/github/copilot-sdk/commit/388f2f3)) - -## [1.0.9] - 2026-02-16 - -> **Reference implementation sync:** [`github/copilot-sdk@e40d57c`](https://github.com/github/copilot-sdk/commit/e40d57c86e18b495722adbf42045288c03924342) -### Added - -#### Cookbook with Practical Recipes - -Added a comprehensive cookbook with 5 practical recipes demonstrating common SDK usage patterns. All examples are JBang-compatible and can be run directly without a full Maven project setup. - -**Recipes:** -- **Error Handling** - Connection failures, timeouts, cleanup patterns, tool errors -- **Multiple Sessions** - Parallel conversations, custom session IDs, lifecycle management -- **Managing Local Files** - AI-powered file organization with grouping strategies -- **PR Visualization** - Interactive CLI tool for analyzing PR age distribution via GitHub MCP Server -- **Persisting Sessions** - Save and resume conversations across restarts - -**Location:** `src/site/markdown/cookbook/` - -**Usage:** -```bash -jbang BasicErrorHandling.java -jbang MultipleSessions.java -jbang PRVisualization.java github/copilot-sdk -``` - -Each recipe includes JBang prerequisites, usage instructions, and best practices. - -#### Session Context and Filtering - -Added session context tracking and filtering capabilities to help manage multiple Copilot sessions across different repositories and working directories. - -**New Classes:** -- `SessionContext` - Represents working directory context (cwd, gitRoot, repository, branch) with fluent setters -- `SessionListFilter` - Filter sessions by context fields (extends SessionContext) -- `SessionContextChangedEvent` - Event fired when working directory context changes between turns - -**Updated APIs:** -- `SessionMetadata.getContext()` - Returns optional context information for persisted sessions -- `CopilotClient.listSessions(SessionListFilter)` - New overload to filter sessions by context criteria - -**Example:** -```java -// List sessions for a specific repository -var filter = new SessionListFilter() - .setRepository("owner/repo") - .setBranch("main"); -var sessions = client.listSessions(filter).get(); - -// Access context information -for (var session : sessions) { - var ctx = session.getContext(); - if (ctx != null) { - System.out.println("CWD: " + ctx.getCwd()); - System.out.println("Repo: " + ctx.getRepository()); - } -} - -// Listen for context changes -session.on(SessionContextChangedEvent.class, event -> { - SessionContext newContext = event.getData(); - System.out.println("Working directory changed to: " + newContext.getCwd()); -}); -``` - -**Requirements:** -- GitHub Copilot CLI 0.0.409 or later - -## [1.0.8] - 2026-02-08 - -> **Reference implementation sync:** [`github/copilot-sdk@05e3c46`](https://github.com/github/copilot-sdk/commit/05e3c46c8c23130c9c064dc43d00ec78f7a75eab) - -### Added - -#### ResumeSessionConfig Parity with SessionConfig -Added missing options to `ResumeSessionConfig` for parity with `SessionConfig` when resuming sessions. You can now change the model, system message, tool filters, and other settings when resuming: - -- `model` - Change the AI model when resuming -- `systemMessage` - Override or extend the system prompt -- `availableTools` - Restrict which tools are available -- `excludedTools` - Disable specific tools -- `configDir` - Override configuration directory -- `infiniteSessions` - Configure infinite session behavior - -**Example:** -```java -var config = new ResumeSessionConfig() - .setModel("claude-sonnet-4") - .setReasoningEffort("high") - .setSystemMessage(new SystemMessageConfig() - .setMode(SystemMessageMode.APPEND) - .setContent("Focus on security.")); - -var session = client.resumeSession(sessionId, config).get(); -``` - -#### EventErrorHandler for Custom Error Handling -Added `EventErrorHandler` interface for custom handling of exceptions thrown by event handlers. Set via `session.setEventErrorHandler()` to receive the event and exception when a handler fails. - -```java -session.setEventErrorHandler((event, exception) -> { - logger.error("Handler failed for event: " + event.getType(), exception); -}); -``` - -#### EventErrorPolicy for Dispatch Control -Added `EventErrorPolicy` enum to control whether event dispatch continues or stops when a handler throws an exception. Errors are always logged at `WARNING` level. The default policy is `PROPAGATE_AND_LOG_ERRORS` which stops dispatch on the first error. Set `SUPPRESS_AND_LOG_ERRORS` to continue dispatching despite errors: - -```java -session.setEventErrorPolicy(EventErrorPolicy.SUPPRESS_AND_LOG_ERRORS); -``` - -The `EventErrorHandler` is always invoked regardless of the policy. - -#### Type-Safe Event Handlers -Promoted type-safe `on(Class, Consumer)` event handlers as the primary API. Handlers now receive strongly-typed events instead of raw `AbstractSessionEvent`. - -```java -session.on(AssistantMessageEvent.class, msg -> { - System.out.println(msg.getData().getContent()); -}); -``` - -#### SpotBugs Static Analysis -Integrated SpotBugs for static code analysis with exclusion filters for `events` and `json` packages. - -### Changed - -- **Copilot CLI**: Minimum version updated to **0.0.405** -- **CopilotClient**: Made `final` to prevent Finalizer attacks (security hardening) -- **JBang Example**: Refactored `jbang-example.java` with streamlined session creation and usage metrics display -- **Code Style**: Use `var` for local variable type inference throughout the codebase - -### Fixed - -- **SpotBugs OS_OPEN_STREAM**: Wrap `BufferedReader` in try-with-resources to prevent resource leaks -- **SpotBugs REC_CATCH_EXCEPTION**: Narrow exception catch in `JsonRpcClient.handleMessage()` -- **SpotBugs DM_DEFAULT_ENCODING**: Add explicit UTF-8 charset to `InputStreamReader` -- **SpotBugs EI_EXPOSE_REP**: Add defensive copies to collection getters in events and JSON packages - -## [1.0.7] - 2026-02-05 - -### Added - -#### Session Lifecycle Hooks -Extended the hooks system with three new hook types for session lifecycle control: -- **`onSessionStart`** - Called when a session starts (new or resumed) -- **`onSessionEnd`** - Called when a session ends -- **`onUserPromptSubmitted`** - Called when the user submits a prompt - -New types: -- `SessionStartHandler`, `SessionStartHookInput`, `SessionStartHookOutput` -- `SessionEndHandler`, `SessionEndHookInput`, `SessionEndHookOutput` -- `UserPromptSubmittedHandler`, `UserPromptSubmittedHookInput`, `UserPromptSubmittedHookOutput` - -#### Session Lifecycle Events (Client-Level) -Added client-level lifecycle event subscriptions: -- `client.onLifecycle(handler)` - Subscribe to all session lifecycle events -- `client.onLifecycle(eventType, handler)` - Subscribe to specific event types -- `SessionLifecycleEventTypes.CREATED`, `DELETED`, `UPDATED`, `FOREGROUND`, `BACKGROUND` - -New types: `SessionLifecycleEvent`, `SessionLifecycleEventMetadata`, `SessionLifecycleHandler` - -#### Foreground Session Control (TUI+Server Mode) -For servers running with `--ui-server`: -- `client.getForegroundSessionId()` - Get the session displayed in TUI -- `client.setForegroundSessionId(sessionId)` - Switch TUI display to a session - -New types: `GetForegroundSessionResponse`, `SetForegroundSessionResponse` - -#### New Event Types -- **`SessionShutdownEvent`** - Emitted when session is shutting down, includes reason and exit code -- **`SkillInvokedEvent`** - Emitted when a skill is invoked, includes skill name and context - -#### Extended Event Data -- `AssistantMessageEvent.Data` - Added `id`, `isLastReply`, `thinkingContent` fields -- `AssistantUsageEvent.Data` - Added `outputReasoningTokens` field -- `SessionCompactionCompleteEvent.Data` - Added `success`, `messagesRemoved`, `tokensRemoved` fields -- `SessionErrorEvent.Data` - Extended with additional error context - -#### Documentation -- New **[hooks.md](src/site/markdown/hooks.md)** - Comprehensive guide covering all 5 session hooks with examples for security gates, logging, result enrichment, and lifecycle management -- Expanded **[documentation.md](src/site/markdown/documentation.md)** with all 33 event types, `getMessages()`, `abort()`, and custom timeout examples -- Enhanced **[advanced.md](src/site/markdown/advanced.md)** with session hooks, lifecycle events, and foreground session control -- Added **[.github/copilot-instructions.md](.github/copilot-instructions.md)** for AI assistants - -#### Testing -- `SessionEventParserTest` - 850+ lines of unit tests for JSON event deserialization -- `SessionEventsE2ETest` - End-to-end tests for session event lifecycle -- `ErrorHandlingTest` - Tests for error handling scenarios -- Enhanced `E2ETestContext` with snapshot validation and expected prompt logging -- Added logging configuration (`logging.properties`) - -#### Build & CI -- JaCoCo 0.8.14 for test coverage reporting -- Coverage reports generated at `target/site/jacoco-coverage/` -- New test report action at `.github/actions/test-report/` -- JaCoCo coverage summary in workflow summary -- Coverage report artifact upload - -### Changed - -- **Copilot CLI**: Minimum version updated from 0.0.400 to **0.0.404** -- Refactored `ProcessInfo` and `Connection` to use records -- Extended `SessionHooks` to support 5 hook types (was 2) -- Renamed test methods to match snapshot naming conventions with Javadoc - -### Fixed - -- Improved timeout exception handling with detailed logging -- Test infrastructure improvements for proxy resilience - -## [1.0.6] - 2026-02-02 - -### Added - -- Auth options for BYOK configuration (`authType`, `apiKey`, `organizationId`, `endpoint`) -- Reasoning effort configuration (`reasoningEffort` in session config) -- User input handler for freeform user prompts (`UserInputHandler`, `UserInputRequest`, `UserInputResponse`) -- Pre-tool use and post-tool use hooks (`PreToolUseHandler`, `PostToolUseHandler`) -- VSCode launch and debug configurations -- Logging configuration for test debugging - -### Changed - -- Enhanced permission request handling with graceful error recovery -- Updated test harness integration to clone from reference implementation SDK -- Improved logging for session events and user input requests - -### Fixed - -- Non-null answer enforcement in user input responses for CLI compatibility -- Permission handler error handling improvements - -## [1.0.5] - 2026-01-29 - -### Added - -- Skills configuration: `skillDirectories` and `disabledSkills` in `SessionConfig` -- Skill events handling (`SkillInvokedEvent`) -- Javadoc verification step in build workflow -- Deploy-site job for automatic documentation deployment after releases - -### Changed - -- Merged reference implementation SDK changes (commit 87ff5510) -- Added agentic-merge-reference-impl Claude skill for tracking reference implementation changes - -### Fixed - -- Resume session handling to keep first client alive -- Build workflow updated to use `test-compile` instead of `compile` -- NPM dependency installation in CI workflow -- Enhanced error handling in permission request processing -- Checkstyle and Maven Resources Plugin version updates -- Test harness CLI installation to match reference implementation version - -## [1.0.4] - 2026-01-27 - -### Added - -- Advanced usage documentation with comprehensive examples -- Getting started guide with Maven and JBang instructions -- Package-info.java files for `com.github.copilot`, `events`, and `json` packages -- `@since` annotations on all public classes -- Versioned documentation with version selector on GitHub Pages -- Maven resources plugin for site markdown filtering - -### Changed - -- Refactored tool argument handling for improved type safety -- Optimized event listener registration in examples -- Enhanced site navigation with documentation links -- Merged reference implementation SDK changes from commit f902b76 - -### Fixed - -- BufferedReader replaced with BufferedInputStream for accurate JSON-RPC byte reading -- Timeout thread now uses daemon thread to prevent JVM exit blocking -- XML root element corrected from `` to `` in site.xml -- Badge titles in README for consistency - -## [1.0.3] - 2026-01-26 - -### Added - -- MCP Servers documentation and integration examples -- Infinite sessions documentation section -- Versioned documentation template with version selector -- Guidelines for porting reference implementation SDK changes to Java -- Configuration for automatically generated release notes - -### Changed - -- Renamed and retitled GitHub Actions workflows for clarity -- Improved gh-pages initialization and remote setup - -### Fixed - -- Documentation navigation to include MCP Servers section -- GitHub Pages deployment workflow to use correct branch -- Enhanced version handling in documentation build steps -- Rollback mechanism added for release failures - -## [1.0.2] - 2026-01-25 - -### Added - -- Infinite sessions support with `InfiniteSessionConfig` and workspace persistence -- GitHub Actions workflow for GitHub Pages deployment -- Daily schedule trigger for SDK E2E tests -- Checkstyle configuration and Maven integration - -### Changed - -- Updated GitHub Actions to latest action versions -- Enhanced Maven site deployment with documentation versioning -- Simplified GitHub release title naming convention - -### Fixed - -- Documentation links in site.xml and README for consistency -- Maven build step to include `clean` for fresh builds -- Image handling in README and site generation - -## [1.0.1] - 2026-01-22 - -### Added - -- Metadata APIs implementation -- Tool execution progress event (`ToolExecutionProgressEvent`) -- SDK protocol version 2 support -- Image in README for visual representation -- Detailed sections in README with usage examples -- Badges for build status, Maven Central, Java version, and license - -### Changed - -- Enhanced version handling in Maven release workflow -- Updated SCM connection URLs to use HTTPS - -### Fixed - -- GitHub release command version formatting and title -- Documentation commit messages to include version information -- JBang dependency declaration with correct group ID - -## [1.0.0] - 2026-01-21 - -### Added - -- Initial release of the GitHub Copilot SDK for Java -- Core classes: `CopilotClient`, `CopilotSession`, `JsonRpcClient` -- Session configuration with `SessionConfig` -- Custom tools with `ToolDefinition` and `ToolHandler` -- Event system with 30+ event types extending `AbstractSessionEvent` -- Permission handling with `PermissionHandler` -- BYOK (Bring Your Own Key) support with `ProviderConfig` -- MCP server integration via `McpServerConfig` -- System message customization with `SystemMessageConfig` -- File attachments support -- Streaming responses with delta events -- JBang example for quick testing -- GitHub Actions workflows for testing and Maven Central publishing -- Pre-commit hook for Spotless code formatting -- Comprehensive API documentation - -[Unreleased]: https://github.com/github/copilot-sdk-java/compare/v1.0.0-beta-8-java.0...HEAD -[1.0.0-beta-8-java.0]: https://github.com/github/copilot-sdk-java/compare/v1.0.0-beta-java.4...v1.0.0-beta-8-java.0 -[Unreleased]: https://github.com/github/copilot-sdk-java/compare/v1.0.0-beta-10-java.0...HEAD -[1.0.0-beta-10-java.0]: https://github.com/github/copilot-sdk-java/compare/v1.0.0-beta-java.4...v1.0.0-beta-10-java.0 -[1.0.0-beta-java.4]: https://github.com/github/copilot-sdk-java/compare/v1.0.0-beta-java.3...v1.0.0-beta-java.4 -[1.0.0-beta-java.3]: https://github.com/github/copilot-sdk-java/compare/v1.0.0-beta-java.2...v1.0.0-beta-java.3 -[1.0.0-beta-java.2]: https://github.com/github/copilot-sdk-java/compare/v1.0.0-beta-java.1...v1.0.0-beta-java.2 -[1.0.0-beta-java.1]: https://github.com/github/copilot-sdk-java/compare/v0.3.0-java.2...v1.0.0-beta-java.1 -[0.3.0-java.2]: https://github.com/github/copilot-sdk-java/compare/v0.2.2-java.1...v0.3.0-java.2 -[0.3.0-java-preview.1]: https://github.com/github/copilot-sdk-java/compare/v0.2.2-java.1...v0.3.0-java-preview.1 -[0.3.0-java-preview.0]: https://github.com/github/copilot-sdk-java/compare/v0.2.2-java.1...v0.3.0-java-preview.0 -[0.2.2-java.1]: https://github.com/github/copilot-sdk-java/compare/v0.2.1-java.1...v0.2.2-java.1 -[0.2.1-java.1]: https://github.com/github/copilot-sdk-java/compare/v0.2.1-java.0...v0.2.1-java.1 -[0.2.1-java.0]: https://github.com/github/copilot-sdk-java/compare/v0.1.32-java.0...v0.2.1-java.0 -[0.1.32-java.0]: https://github.com/github/copilot-sdk-java/compare/v1.0.11...v0.1.32-java.0 -[1.0.11]: https://github.com/github/copilot-sdk-java/compare/v1.0.10...v1.0.11 -[1.0.10]: https://github.com/github/copilot-sdk-java/compare/v1.0.9...v1.0.10 -[1.0.9]: https://github.com/github/copilot-sdk-java/compare/v1.0.8...v1.0.9 -[1.0.8]: https://github.com/github/copilot-sdk-java/compare/v1.0.7...v1.0.8 -[1.0.7]: https://github.com/github/copilot-sdk-java/compare/v1.0.6...v1.0.7 -[1.0.6]: https://github.com/github/copilot-sdk-java/compare/v1.0.5...v1.0.6 -[1.0.5]: https://github.com/github/copilot-sdk-java/compare/v1.0.4...v1.0.5 -[1.0.4]: https://github.com/github/copilot-sdk-java/compare/v1.0.3...v1.0.4 -[1.0.3]: https://github.com/github/copilot-sdk-java/compare/v1.0.2...v1.0.3 -[1.0.2]: https://github.com/github/copilot-sdk-java/compare/v1.0.1...v1.0.2 -[1.0.1]: https://github.com/github/copilot-sdk-java/compare/1.0.0...v1.0.1 -[1.0.0]: https://github.com/github/copilot-sdk-java/releases/tag/1.0.0 diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md deleted file mode 100644 index c758952453..0000000000 --- a/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,74 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to making participation in our project and -our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, gender identity and expression, level of experience, -nationality, personal appearance, race, religion, or sexual identity and -orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment -include: - -- Using welcoming and inclusive language -- Being respectful of differing viewpoints and experiences -- Gracefully accepting constructive criticism -- Focusing on what is best for the community -- Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -- The use of sexualized language or imagery and unwelcome sexual attention or - advance -- Trolling, insulting/derogatory comments, and personal or political attacks -- Public or private harassment -- Publishing others' private information, such as a physical or electronic - address, without explicit permission -- Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or -reject comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct, or to ban temporarily or -permanently any contributor for other behaviors that they deem inappropriate, -threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. Examples of -representing a project or community include using an official project e-mail -address, posting via an official social media account, or acting as an appointed -representative at an online or offline event. Representation of a project may be -further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at . All -complaints will be reviewed and investigated and will result in a response that -is deemed necessary and appropriate to the circumstances. The project team is -obligated to maintain confidentiality with regard to the reporter of an incident. -Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good -faith may face temporary or permanent repercussions as determined by other -members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, -available at [http://contributor-covenant.org/version/1/4][version] - -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 38f2def77c..0000000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,86 +0,0 @@ -## Contributing - -[fork]: https://github.com/github/copilot-sdk-java/fork -[pr]: https://github.com/github/copilot-sdk-java/compare - -Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great. - -This repository contains the **GitHub Copilot SDK for Java**, the official Java variant of the official [GitHub Copilot SDK](https://github.com/github/copilot-sdk). For issues or features related to the reference implementation SDK, please contribute there instead. - -Contributions to this project are [released](https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license) to the public under the [project's open source license](LICENSE). - -Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms. - -## What kinds of contributions we're looking for - -We'd love your help with: - - * Fixing any bugs in the existing feature set - * Making the SDK more idiomatic and nice to use for Java developers - * Improving documentation - -If you have ideas for entirely new features, please post an issue or start a discussion. We're very open to new features but need to make sure they align with the direction of the [Copilot SDK](https://github.com/github/copilot-sdk) reference implementation and can be maintained in sync. Note that this repo periodically merges reference implementation changes — see the [README](README.md#agentic-reference-implementation-merge-and-sync) for details on how that works. - -## Prerequisites for running and testing code - -1. Install [Java 17+](https://openjdk.org/) (JDK) -1. Install [Maven 3.9+](https://maven.apache.org/download.cgi) (or use the included `mvnw` wrapper) -1. Install [Node.js](https://nodejs.org/) (v18+) — required for the E2E test harness - -## Submitting a pull request - -1. [Fork][fork] and clone the repository -1. Enable git hooks: `git config core.hooksPath .githooks` -1. Make sure the tests pass on your machine: `mvn clean verify` -1. Make sure formatting passes: `mvn spotless:check` -1. Create a new branch: `git checkout -b my-branch-name` -1. Make your change, add tests, and make sure the tests and linter still pass -1. Push to your fork and [submit a pull request][pr] -1. Pat yourself on the back and wait for your pull request to be reviewed and merged. - -### Running locally, including tests and linters - -The POM has logic to ensure a known correct installation of Copilot CLI is used when executing the tests. If you want to test against a different installation of Copilot CLI, set the value of the `copilot.cli.path` maven property to the fully qualified path to the Copilot CLI. - -```bash -# Build and run all tests -mvn clean verify - -# Run a single test class -mvn test -Dtest=CopilotClientTest - -# Format code (required before commit) -mvn spotless:apply - -# Check formatting only -mvn spotless:check -``` - -## Running the known correct Copilot CLI installation - -### POSIX - -```bash -export COPILOT_CLI_PATH="$(find "$PWD/target" -type f -path '*/nodejs/node_modules/@github/copilot/index.js' | head -n 1)" -node ${COPILOT_CLI_PATH} -``` - -### PowerShell - -```PowerShell -$env:COPILOT_CLI_PATH = (Get-ChildItem -Path "$PWD\target" -Recurse -Filter 'index.js' -File | Where-Object { $_.FullName -match '[\\/]nodejs[\\/]node_modules[\\/]@github[\\/]copilot[\\/]index\.js$' } | Select-Object -First 1 -ExpandProperty FullName) -node $env:COPILOT_CLI_PATH -``` - -Here are a few things you can do that will increase the likelihood of your pull request being accepted: - -- Write tests. -- Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests. -- Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html). - -## Resources - -- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/) -- [Using Pull Requests](https://help.github.com/articles/about-pull-requests/) -- [GitHub Help](https://help.github.com) - diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 28a50fa226..0000000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright GitHub, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/README.md b/README.md index c665244911..a9d587c63a 100644 --- a/README.md +++ b/README.md @@ -1,197 +1,7 @@ # GitHub Copilot SDK for Java -[![Build](https://github.com/github/copilot-sdk/actions/workflows/java-sdk-tests.yml/badge.svg)](https://github.com/github/copilot-sdk/actions/workflows/java-sdk-tests.yml) -[![Java 17+](https://img.shields.io/badge/Java-17%2B-blue?logo=openjdk&logoColor=white)](https://openjdk.org/) -[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) +# Copilot SDK for Java -#### Latest release - -[![GitHub Release Date](https://img.shields.io/github/release-date/github/copilot-sdk)](https://github.com/github/copilot-sdk/releases) -[![GitHub Release](https://img.shields.io/github/v/release/github/copilot-sdk)](https://github.com/github/copilot-sdk/releases) -[![Maven Central](https://img.shields.io/maven-central/v/com.github/copilot-sdk-java)](https://central.sonatype.com/artifact/com.github/copilot-sdk-java) -[![Javadoc](https://javadoc.io/badge2/com.github/copilot-sdk-java/javadoc.svg?q=1)](https://javadoc.io/doc/com.github/copilot-sdk-java/latest/index.html) - -## Background - -> ℹ️ **Public Preview:** This SDK tracks the [GitHub Copilot SDKs](https://github.com/github/copilot-sdk) for [.NET](https://github.com/github/copilot-sdk/tree/main/dotnet) and [Node.js](https://github.com/github/copilot-sdk/tree/main/nodejs). While in public preview, minor breaking changes may still occur between releases. - -Java SDK for programmatic control of GitHub Copilot CLI, enabling you to build AI-powered applications and agentic workflows. - -## Installation - -### Runtime requirements - -- Java 17 or later. **JDK 25 recommended**. The distributed jar is a multi-release jar (MR-JAR) and is compiled on JDK 25 with `maven.compiler.release` set to 17. This means, when run on JDK 25 and later, the SDK automatically uses virtual threads for its default internal executor. -- GitHub Copilot CLI 1.0.55-5. or later installed and in `PATH` (or provide custom `cliPath`) - -### Maven - -```xml - - com.github - copilot-sdk-java - 1.0.0-beta-10-java.0 - -``` - -### Gradle - -```groovy -implementation 'com.github:copilot-sdk-java:1.0.0-beta-10-java.0' - - -#### Snapshot Builds - -Snapshot builds of the next development version are published to Maven Central Snapshots. To use them, add the repository and update the dependency version in your `pom.xml`: - -```xml - - - central-snapshots - https://central.sonatype.com/repository/maven-snapshots/ - true - - - - - com.github - copilot-sdk-java - 1.0.0-beta-10-java.1-SNAPSHOT - -``` - -### Gradle - -```groovy -implementation 'com.github:copilot-sdk-java:1.0.0-beta-10-java.0-SNAPSHOT' -``` - -## Quick Start - -```java -import com.github.copilot.CopilotClient; -import com.github.copilot.generated.AssistantMessageEvent; -import com.github.copilot.generated.SessionUsageInfoEvent; -import com.github.copilot.rpc.MessageOptions; -import com.github.copilot.rpc.PermissionHandler; -import com.github.copilot.rpc.SessionConfig; - -public class CopilotSDK { - public static void main(String[] args) throws Exception { - var lastMessage = new String[]{null}; - - // Create and start client - try (var client = new CopilotClient()) { - client.start().get(); - - // Create a session - var session = client.createSession( - new SessionConfig().setOnPermissionRequest(PermissionHandler.APPROVE_ALL).setModel("claude-sonnet-4.5")).get(); - - - // Handle assistant message events - session.on(AssistantMessageEvent.class, msg -> { - lastMessage[0] = msg.getData().content(); - System.out.println(lastMessage[0]); - }); - - // Handle session usage info events - session.on(SessionUsageInfoEvent.class, usage -> { - var data = usage.getData(); - System.out.println("\n--- Usage Metrics ---"); - System.out.println("Current tokens: " + data.currentTokens().intValue()); - System.out.println("Token limit: " + data.tokenLimit().intValue()); - System.out.println("Messages count: " + data.messagesLength().intValue()); - }); - - // Send a message - var completable = session.sendAndWait(new MessageOptions().setPrompt("What is 2+2?")); - // and wait for completion - completable.get(); - } - - boolean success = lastMessage[0] != null && lastMessage[0].contains("4"); - System.exit(success ? 0 : -1); - } -} -``` - -## Try it with JBang - -You can run the SDK without setting up a full Java project, by using [JBang](https://www.jbang.dev/). - -See the full source of [`jbang-example.java`](jbang-example.java) for a complete example with more features like session idle handling and usage info events. - -Or run it directly from the repository: - -```bash -jbang https://github.com/github/copilot-sdk/blob/main/java/jbang-example.java -``` - -## Projects Using This SDK - -| Project | Description | -| ----------------------------------------------------------------------------- | ------------------------------------------ | -| [JMeter Copilot Plugin](https://github.com/brunoborges/jmeter-copilot-plugin) | JMeter plugin for AI-assisted load testing | - -> Want to add your project? Open a PR! - -## CI/CD Workflows - -This project uses several GitHub Actions workflows for building, testing, releasing, and syncing with the reference implementation SDK. - -See [WORKFLOWS.md](docs/WORKFLOWS.md) for a full overview and details on each workflow. - -## Contributing - -Contributions are welcome! Please see the [Contributing Guide](CONTRIBUTING.md) for details. - -### Agentic Reference Implementation Merge and Sync - -This SDK tracks the official [Copilot SDK](https://github.com/github/copilot-sdk) (.NET reference implementation) and ports changes to Java. The reference implementation merge process is automated with AI assistance: - -**Automated sync** — A [scheduled GitHub Actions workflow](.github/workflows/reference-impl-sync.yml) runs on the schedule specified in that file. It checks for new reference implementation commits since the last merge (tracked in [`.lastmerge`](.lastmerge)), and if changes are found, creates an issue labeled `reference-impl-sync` and assigns it to the GitHub Copilot coding agent. Any previously open `reference-impl-sync` issues are automatically closed. The sync also updates the `@github/copilot` version in both `pom.xml` and `scripts/codegen/package.json` to keep schemas and test CLI in lockstep. - -**Reusable prompt** — The merge workflow is defined in [`agentic-merge-reference-impl.prompt.md`](.github/prompts/agentic-merge-reference-impl.prompt.md). It can be triggered manually from: - -- **VS Code Copilot Chat** — type `/agentic-merge-reference-impl` -- **GitHub Copilot CLI** — use `copilot` CLI with the same skill reference - -### Development Setup - -Requires JDK 25 or later for development. - -```bash -# Clone the repository -git clone https://github.com/github/copilot-sdk.git -cd copilot-sdk/java - -# Enable git hooks for code formatting -git config core.hooksPath .githooks - -# Build and test with JDK 25 -mvn clean verify - -# Set your paths for JDK 17 -# Run the JDK 25 built jar with JDK 17 JVM for tests. Do not re-compile the jar. -mvn jacoco:prepare-agent@wire-up-coverage-instrumentation antrun:run@print-test-jdk-banner surefire:test failsafe:integration-test failsafe:verify jacoco:report@build-coverage-report-from-tests -Denforcer.skip=true -``` - -The tests require the official [copilot-sdk](https://github.com/github/copilot-sdk) test harness, which is automatically cloned during build. - -## Support - -See [SUPPORT.md](SUPPORT.md) for how to file issues and get help. - -## Code of Conduct - -This project has adopted the [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md). See [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) for details. - -## Security - -See [SECURITY.md](SECURITY.md) for reporting security vulnerabilities. - -## License - -MIT — see [LICENSE](LICENSE) for details. +> 🚨 **This stand-alone repository is archived.** The official GitHub Copilot SDK for Java is now maintained in the `java` directory at **[github/copilot-sdk](https://github.com/github/copilot-sdk)**. This site remains for serving the `gh-pages` documentation only. Please use the SDK from the monorepo going forward. +See the [README](https://github.com/github/copilot-sdk/tree/main/java#readme) in the monorepo. diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index ef183e6fc7..0000000000 --- a/SECURITY.md +++ /dev/null @@ -1,31 +0,0 @@ -Thanks for helping make GitHub safe for everyone. - -# Security - -GitHub takes the security of our software products and services seriously, including all of the open source code repositories managed through our GitHub organizations, such as [GitHub](https://github.com/GitHub). - -Even though [open source repositories are outside of the scope of our bug bounty program](https://bounty.github.com/index.html#scope) and therefore not eligible for bounty rewards, we will ensure that your finding gets passed along to the appropriate maintainers for remediation. - -## Reporting Security Issues - -If you believe you have found a security vulnerability in any GitHub-owned repository, please report it to us through coordinated disclosure. - -**Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.** - -Instead, please send an email to opensource-security[@]github.com. - -Please include as much of the information listed below as you can to help us better understand and resolve the issue: - -- The type of issue (e.g., buffer overflow, SQL injection, or cross-site scripting) -- Full paths of source file(s) related to the manifestation of the issue -- The location of the affected source code (tag/branch/commit or direct URL) -- Any special configuration required to reproduce the issue -- Step-by-step instructions to reproduce the issue -- Proof-of-concept or exploit code (if possible) -- Impact of the issue, including how an attacker might exploit the issue - -This information will help us triage your report more quickly. - -## Policy - -See [GitHub's Safe Harbor Policy](https://docs.github.com/en/site-policy/security-policies/github-bug-bounty-program-legal-safe-harbor#1-safe-harbor-terms) diff --git a/SUPPORT.md b/SUPPORT.md deleted file mode 100644 index 86a014fa28..0000000000 --- a/SUPPORT.md +++ /dev/null @@ -1,13 +0,0 @@ -# Support - -## How to file issues and get help - -This project uses GitHub issues to track bugs and feature requests. Please search the existing issues before filing new issues to avoid duplicates. For new issues, file your bug or feature request as a new issue. - -For help or questions about using this project, please file an issue. - -**GitHub Copilot SDK for Java** is under active development. We will do our best to respond to support, feature requests, and community questions in a timely manner. - -## GitHub Support Policy - -Support for this project is limited to the resources listed above. diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml deleted file mode 100644 index fcde1f6c97..0000000000 --- a/config/checkstyle/checkstyle.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/config/spotbugs/spotbugs-exclude.xml b/config/spotbugs/spotbugs-exclude.xml deleted file mode 100644 index b0b3628827..0000000000 --- a/config/spotbugs/spotbugs-exclude.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - diff --git a/docs/CUSTOM_SITE_CSS.md b/docs/CUSTOM_SITE_CSS.md deleted file mode 100644 index 9181118f12..0000000000 --- a/docs/CUSTOM_SITE_CSS.md +++ /dev/null @@ -1,187 +0,0 @@ -# Custom Site CSS - -This project applies custom CSS themes to both the **Maven-generated documentation site** and the **JaCoCo coverage reports** so they share a consistent visual identity: light backgrounds, GitHub-inspired colors, purple gradient accents, and rounded card-style containers. - -## Architecture Overview - -``` -src/site/ -├── resources/ -│ ├── css/ -│ │ └── site.css ← Maven site theme (loaded automatically by Fluido) -│ └── images/ -│ └── github-copilot.jpg ← Copilot logo for "Powered By" sidebar -├── jacoco-resources/ -│ └── report.css ← JaCoCo report theme (overlaid after generation) -└── site.xml ← Fluido skin configuration - -.github/ -├── templates/ -│ ├── index.html ← Version picker page template -│ └── styles.css ← Version picker CSS -└── workflows/ - └── deploy-site.yml ← Deploys site + overlays JaCoCo CSS -``` - -## Maven Site Theme (`src/site/resources/css/site.css`) - -### How It Works - -The Maven Fluido Skin 2.1.0 (configured in `src/site/site.xml`) automatically loads `css/site.css` from the site resources directory. No additional configuration is needed — placing the file at `src/site/resources/css/site.css` is sufficient. - -### Design Choices - -| Element | Style | -|---------|-------| -| **Navbar** | Dark (`#24292f`) with no gradient or border, subtle box shadow | -| **Sidebar** | White card with rounded corners (`border-radius: 10px`), 1px border | -| **Active nav item** | Purple gradient (`#667eea → #764ba2`) | -| **Links** | GitHub-blue (`#0969da`), hover darkens to `#0550ae` | -| **Code blocks** | Light gray background (`#eef1f6`) to distinguish from the white page | -| **Inline code** | Tinted purple background (`rgba(102, 126, 234, 0.1)`) | -| **Tables** | Rounded borders, light header, subtle row hover | -| **Sections** | White card with border and padding (nested sections are transparent) | -| **Alerts** | Rounded with 4px left accent border, color-coded (info/warning/danger/success) | -| **Typography** | System font stack (`-apple-system, BlinkMacSystemFont, 'Segoe UI', ...`) | - -### GitHub Ribbon Override - -The Fluido skin renders a "Fork me on GitHub" ribbon using a `::after` pseudo-element with `content: attr(data-ribbon)`. We override this to say "View on GitHub" with a purple gradient background: - -```css -.github-fork-ribbon:before { - background-color: #667eea !important; - background-image: linear-gradient(135deg, #667eea, #764ba2) !important; -} - -.github-fork-ribbon:after { - content: 'View on GitHub' !important; -} -``` - -> **Note:** Both `background-color` and `background-image` with `!important` are required because Fluido injects an inline `