Skip to content

Port RPC API from official Copilot SDK (PRs #464, #491, #544)#11

Merged
kawax merged 3 commits intomainfrom
copilot/adjust-rpc-for-laravel
Feb 25, 2026
Merged

Port RPC API from official Copilot SDK (PRs #464, #491, #544)#11
kawax merged 3 commits intomainfrom
copilot/adjust-rpc-for-laravel

Conversation

Copy link
Contributor

Copilot AI commented Feb 25, 2026

Ports the typed RPC layer from copilot-sdk into the Laravel SDK, covering server-scoped and session-scoped methods. Also syncs the latest session-events.ts additions.

RPC Types (src/Types/Rpc/)

21 readonly classes following existing Arrayable + fromArray/toArray pattern: PingResult, ModelsListResult, SessionModeSetParams, SessionCompactionCompactResult, AgentInfo, etc.

RPC API (src/Rpc/)

Pending* naming (Laravel idiom, analogous to Python SDK's *Api classes):

  • ServerRpcPendingModels, PendingTools, PendingAccount
  • SessionRpcPendingModel, PendingMode, PendingPlan, PendingWorkspace, PendingFleet, PendingAgent, PendingCompaction
// Server-scoped
$client->rpc()->ping(new PingParams(message: 'hello'));
$client->rpc()->models()->list();
$client->rpc()->account()->getQuota();

// Session-scoped
$session->rpc()->mode()->set(new SessionModeSetParams(mode: 'plan'));
$session->rpc()->model()->switchTo(new SessionModelSwitchToParams(modelId: 'gpt-4'));
$session->rpc()->plan()->read();
$session->rpc()->workspace()->listFiles();
$session->rpc()->agent()->list();
$session->rpc()->compaction()->compact();

Contract & wiring changes

  • rpc() added to ClientServerRpc, SessionSessionRpc
  • CopilotClient and CopilotSession contracts updated
  • FakeSession implements rpc()

SessionEventType enum

7 new cases from latest session-events.ts: session.title_changed, session.warning, session.mode_changed, session.plan_changed, session.workspace_file_changed, session.task_complete, assistant.streaming_delta

Tests

87 new RPC tests + updated event type assertions. All 455 tests pass.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/copilot_internal/user
    • Triggering command: /home/REDACTED/.local/bin/copilot copilot --headless --stdio --log-level info (http block)
    • Triggering command: /home/REDACTED/.local/bin/copilot copilot --headless --stdio --log-level info t stty n/stty (http block)
    • Triggering command: /home/REDACTED/.local/bin/copilot copilot --headless --stdio --log-level info pilot-sdk/vendor/bin/stty stty ndor/bin/stty (http block)

If you need me to access, download, or install something from one of these locations, you can either:


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 25, 2026 04:48
…d update SessionEventType enum

Co-authored-by: kawax <1502086+kawax@users.noreply.github.com>
…ventType values

Co-authored-by: kawax <1502086+kawax@users.noreply.github.com>
Copilot AI changed the title [WIP] Adjust RPC implementation for Laravel compatibility Port RPC API from official Copilot SDK (PRs #464, #491, #544) Feb 25, 2026
Copilot AI requested a review from kawax February 25, 2026 04:53
@kawax kawax marked this pull request as ready for review February 25, 2026 05:00
@kawax kawax merged commit 741e2ec into main Feb 25, 2026
5 checks passed
@kawax kawax deleted the copilot/adjust-rpc-for-laravel branch February 25, 2026 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants