Tags: asklar/copilot-sdk
Tags
Update @github/copilot to 1.0.17 (github#999) * Update @github/copilot to 1.0.17 - Updated nodejs and test harness dependencies - Re-ran code generators - Formatted generated code * Skip permission RPC response when resolvedByHook is true When the runtime resolves a permission request via a permissionRequest hook, it sets resolvedByHook=true on the broadcast event. The SDK broadcast handlers were unconditionally invoking the permission handler and sending an RPC response, causing duplicate/invalid responses. Add a guard in all four SDKs (Node, Python, Go, .NET) to skip the permission handler and RPC response when resolvedByHook is set, while still allowing event subscribers to observe the event. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Mackinnon Buck <mackinnon.buck@gmail.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update @github/copilot to 1.0.17 (github#999) * Update @github/copilot to 1.0.17 - Updated nodejs and test harness dependencies - Re-ran code generators - Formatted generated code * Skip permission RPC response when resolvedByHook is true When the runtime resolves a permission request via a permissionRequest hook, it sets resolvedByHook=true on the broadcast event. The SDK broadcast handlers were unconditionally invoking the permission handler and sending an RPC response, causing duplicate/invalid responses. Add a guard in all four SDKs (Node, Python, Go, .NET) to skip the permission handler and RPC response when resolvedByHook is set, while still allowing event subscribers to observe the event. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Mackinnon Buck <mackinnon.buck@gmail.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
fix: Cross-SDK Consistency Reviewer posts duplicate comments per comm… …it (github#983) * Initial plan * fix: prevent duplicate PR comments from Cross-SDK Consistency Reviewer - Add tracker-id: sdk-consistency-review to identify workflow's comments - Add hide-older-comments: true (with allowed-reasons: [outdated]) to add-comment safe-output so older comments are hidden before a new one is posted on each commit - Move roles: all under on: block (codemod roles-to-on-roles, v0.10.0) required to compile with current gh aw v0.65.5 - Recompile both sdk-consistency-review.lock.yml and issue-triage.lock.yml (same roles migration needed for the latter to compile too) Agent-Logs-Url: https://github.com/github/copilot-sdk/sessions/c025f75a-3f57-4fde-8282-0768b84d77cf Co-authored-by: SteveSandersonMS <1101362+SteveSandersonMS@users.noreply.github.com> * revert: restore .github/agents and .github/aw/schemas to pre-PR state gh aw fix --write applied extra codemods beyond roles-to-on-roles: - replaced old per-task agent files with a new dispatcher agent file - deleted the agentic-workflow.json schema file (delete-schema-file codemod) These changes are unrelated to the duplicate-comment fix. Restore all four affected files to their original state. Agent-Logs-Url: https://github.com/github/copilot-sdk/sessions/5d0ca850-de42-4b6d-b65e-dec287140b60 Co-authored-by: SteveSandersonMS <1101362+SteveSandersonMS@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: SteveSandersonMS <1101362+SteveSandersonMS@users.noreply.github.com>
fix: Cross-SDK Consistency Reviewer posts duplicate comments per comm… …it (github#983) * Initial plan * fix: prevent duplicate PR comments from Cross-SDK Consistency Reviewer - Add tracker-id: sdk-consistency-review to identify workflow's comments - Add hide-older-comments: true (with allowed-reasons: [outdated]) to add-comment safe-output so older comments are hidden before a new one is posted on each commit - Move roles: all under on: block (codemod roles-to-on-roles, v0.10.0) required to compile with current gh aw v0.65.5 - Recompile both sdk-consistency-review.lock.yml and issue-triage.lock.yml (same roles migration needed for the latter to compile too) Agent-Logs-Url: https://github.com/github/copilot-sdk/sessions/c025f75a-3f57-4fde-8282-0768b84d77cf Co-authored-by: SteveSandersonMS <1101362+SteveSandersonMS@users.noreply.github.com> * revert: restore .github/agents and .github/aw/schemas to pre-PR state gh aw fix --write applied extra codemods beyond roles-to-on-roles: - replaced old per-task agent files with a new dispatcher agent file - deleted the agentic-workflow.json schema file (delete-schema-file codemod) These changes are unrelated to the duplicate-comment fix. Restore all four affected files to their original state. Agent-Logs-Url: https://github.com/github/copilot-sdk/sessions/5d0ca850-de42-4b6d-b65e-dec287140b60 Co-authored-by: SteveSandersonMS <1101362+SteveSandersonMS@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: SteveSandersonMS <1101362+SteveSandersonMS@users.noreply.github.com>
Update @github/copilot to 1.0.10 (github#900) - Updated nodejs and test harness dependencies - Re-ran code generators - Formatted generated code Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Add fine-grained system prompt customization (customize mode) (github… …#816) * Add fine-grained system prompt customization (customize mode) Add a new 'customize' mode for systemMessage configuration, enabling SDK consumers to selectively override individual sections of the CLI system prompt while preserving the rest. This sits between the existing 'append' and 'replace' modes. 9 configurable sections: identity, tone, tool_efficiency, environment_context, code_change_rules, guidelines, safety, tool_instructions, custom_instructions. 4 override actions per section: replace, remove, append, prepend. Unknown section IDs are handled gracefully: content-bearing overrides are appended to additional instructions with a warning, and remove on unknown sections is silently ignored. Types and constants added to all 4 SDK languages (TypeScript, Python, Go, .NET). Documentation updated across all READMEs and getting-started guide. Companion runtime PR: github/copilot-agent-runtime#4751 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address PR review feedback: fix docs, add examples and E2E tests - Fix incorrect package name in nodejs/README.md (@anthropic-ai/sdk -> @github/copilot-sdk) - Add standalone 'System Message Customization' sections with full code examples to Python and Go READMEs (matching TypeScript/.NET) - Add E2E tests for customize mode to Python, Go, and .NET (matching existing Node.js E2E test coverage) - Fix 'end of the prompt' wording in docs to 'additional instructions' Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add last_instructions configurable section Expose lastInstructions as a customizable section across all 4 SDKs, addressing review feedback about duplicate tool-efficiency blocks. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix lint: prettier formatting, Python import order and line length Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add transform operation for system prompt section customization Adds a new 'transform' action to SectionOverride that enables read-then-write mutation of system prompt sections via callbacks. The SDK intercepts function- valued actions before serialization, stores the callbacks locally, and handles the batched systemMessage.transform JSON-RPC callback from the runtime. Changes across all 4 SDKs (TypeScript, Python, Go, .NET): - Types: SectionTransformFn, SectionOverrideAction (TS/Python), Transform field (Go/.NET), SectionOverrideAction constants (Go) - Client: extractTransformCallbacks helper, transform callback registration, systemMessage.transform RPC handler - Session: transform callback storage and batched dispatch with error handling - E2E tests and shared snapshot YAML files Wire protocol: single batched RPC call with all transform sections, matching the runtime implementation in copilot-agent-runtime PR #5103. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Formatting Co-Authored-By: Copilot <223556219+Copilot@users.noreply.github.com> * Add E2E snapshot for customized systemMessage config test Generate the missing snapshot file that the 'should create a session with customized systemMessage config' test requires across all SDK languages (Node, Python, Go, .NET). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix Go fmt blank comment line and Python import ordering - Add blank // comment line between doc example and extractTransformCallbacks function doc comment in go/client.go (required by go fmt) - Fix ruff import sorting in python/copilot/__init__.py Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix Python ty type error in session transform handler Use str() to ensure transform callback result is typed as str, fixing the invalid-assignment error from ty type checker at session.py:689. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix Python E2E test to use keyword args for create_session The create_session() method was refactored to keyword-only params. Update the customized systemMessage test to use keyword arguments instead of a positional dict, and fix send_and_wait() call to pass prompt as a positional string. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Assert transform result in system message via HTTP traffic The 'should apply transform modifications' tests previously only verified that the transform callback was invoked, not that the transformed content actually reached the model. Now all 4 SDKs assert that TRANSFORM_MARKER appears in the system message captured from HTTP traffic. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix Go transform JSON serialization: add json tags for content field The systemMessageTransformRequest and systemMessageTransformResponse used anonymous structs without json tags, causing Content to serialize as uppercase 'Content' instead of lowercase 'content'. The CLI expects lowercase, so transform results were silently ignored. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Steve Sanderson <SteveSandersonMS@users.noreply.github.com>
PreviousNext