Skip to content

Instantly share code, notes, and snippets.

View amirasyraf's full-sized avatar
💻
Computing

Amir Asyraf amirasyraf

💻
Computing
View GitHub Profile
@amirasyraf
amirasyraf / gist:6965d36e883c902339ba93c37b561e13
Created October 8, 2026 07:48
copilot-session-warmer-plan
# Native Copilot CLI extension implementation plan
## Goal and scope
Implement `github-session-warmer` as a native extension of the existing interactive Copilot CLI, following [REPORT.md](REPORT.md). Keep the stock terminal UI and attach through `joinSession()` from `@github/copilot-sdk/extension`.
Deliver cache observability first, then experimental warming using exactly:
```text
COPILOT_CACHE_WARMING
@amirasyraf
amirasyraf / gist:804525c15880de963d9c08fcddbb6fe6
Created October 8, 2026 07:47
copilot-session-warmer-report
# GitHub Copilot CLI Native Extension: Cache Warming and Cache Statistics
**Research report — 8 October 2026**
**Implementation scope:** A native extension running inside the **existing interactive GitHub Copilot CLI**, with no standalone SDK client, replacement TUI, external proxy, or feature request to GitHub.
**Background research only:** The standalone Copilot SDK and its low-level inference interception feature, isolated in **Appendix A**. It is **not** the implementation path.
**Verification:** Public documentation and source inspected; no authenticated live Copilot CLI extension test was performed.
## Executive summary
**Chosen direction: native Copilot CLI extension only.** The extension joins the running CLI session, observes usage and lifecycle events, keeps its own timers, and submits ordinary session messages via `session.send()`; the user continues using the stock Copilot terminal UI. It does **not** start a separate Copilot runtime or act as a custom SDK client.
[{"name":"Afghanistan","topLevelDomain":[".af"],"alpha2Code":"AF","alpha3Code":"AFG","callingCodes":["93"],"capital":"Kabul","altSpellings":["AF","Afġānistān"],"region":"Asia","subregion":"Southern Asia","population":27657145,"latlng":[33.0,65.0],"demonym":"Afghan","area":652230.0,"gini":27.8,"timezones":["UTC+04:30"],"borders":["IRN","PAK","TKM","UZB","TJK","CHN"],"nativeName":"افغانستان","numericCode":"004","currencies":[{"code":"AFN","name":"Afghan afghani","symbol":"؋"}],"languages":[{"iso639_1":"ps","iso639_2":"pus","name":"Pashto","nativeName":"پښتو"},{"iso639_1":"uz","iso639_2":"uzb","name":"Uzbek","nativeName":"Oʻzbek"},{"iso639_1":"tk","iso639_2":"tuk","name":"Turkmen","nativeName":"Türkmen"}],"translations":{"de":"Afghanistan","es":"Afganistán","fr":"Afghanistan","ja":"アフガニスタン","it":"Afghanistan","br":"Afeganistão","pt":"Afeganistão","nl":"Afghanistan","hr":"Afganistan","fa":"افغانستان"},"flag":"https://restcountries.eu/data/afg.svg","regionalBlocs":[{"acronym":"SAARC","name":"South Asian Associatio