Repository navigation
plugin: locate core package across Copilot, VS Code, and stubbed installs - #267
Open
Çağdaş Yürekli (cagdasyurekli) wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Addresses #265 and the remaining package-discovery part of #167 (left open by #241).
plugin/scripts/te_bootstrap.pyonly inspected<home>/plugins/cache/<market>/<plugin>/<version>(Claude Code / Codex). When Copilot CLI or VS Code installs the plugin into~/.copilot/installed-plugins/<market>/<plugin>or mirrors it underCode/agentPlugins/file-.../<hash>without symlinks (solib/tokeneconomizeris missing or a 21-byte text stub),core_path()returnedNone, hooks failed open with{}, and~/.tokeneconomizer/bin/te.jsonwas never written.bin/te.jsonis missing, the PowerShell slash commands inplugin/slash-commands/*.mdthrew an unhandledGet-ContentItemNotFoundException.Fix
plugin/scripts/te_bootstrap.py(keeping Python 3.0 syntax and preserving_marketplace_sourcesbehavior for existing Codex/Claude cache tests):_extra_sources(plugin_root)to inspect:installed-pluginsmarketplace directories (marketplaces/,.marketplaces/,plugins/marketplaces/,marketplace-cache/) and registries (config.jsonstripping//comments,marketplaces.json,known_marketplaces.json).agentPluginsmirrors (installed.jsonentries includingfile:///URIs, plus the user's~/.copilotmarketplaces).~/.claude/plugins/known_marketplaces.json(coversomp/Copilot installs sharing a local Claude checkout).<TOKENECONOMIZER_HOME or ~/.tokeneconomizer>/srcas a final checkout fallback.plugin/slash-commands/*.md: CheckTest-Path -LiteralPath $metabefore readingbin\te.json, fall back to$env:COPILOT_PLUGIN_ROOT\scripts\te_bootstrap.pyif available, and otherwise print a clear initialization diagnostic to stderr (reading the tail oferrors.logif present).plugin/README.md: Clarified under GitHub Copilot in VS Code how to supply the core package when installing without a local clone or Git symlinks.Verification
tests/test_plugin_package.py:test_copilot_and_vscode_plugin_copies_find_the_coretest_te_bootstrap_stays_python30_compatibletest_powershell_slash_commands_guard_missing_te_jsontest_powershell_slash_command_reports_cleanly_when_te_json_missing(Windows PowerShell marker)python -m pytest testslocally: 1247 passed, 31 skipped (Python 3.12.13, macOS).python scripts/dead_code.py --json: no new unreferenced or test-only symbols.