Hard to use across machines: state outside repo, absolute paths in generated launcher, per-repo config sprawl

オープン
#219 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
15/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
活発
領域
devtools

調査の方向性

This is a design discussion, not a single change: state location (~/.tokeneconomizer), the generated launcher ~/.tokeneconomizer/bin/te with its hardcoded plugin-cache path, and the per-repo .claude/settings.local.json deny rules are the places it touches. Settle the intended storage layout and runtime path resolution with the maintainers before any code is written; done means an agreed design, not a patch.

索引モデルが issue の本文から書いたものです。

説明

Feedback after using TokenEconomizer 0.1.0 (Claude Code plugin, Windows) across several repositories on two PCs, with ~/.claude synced through git. I ended up uninstalling it. These are the problems that led to that.

1. Not friendly to cloud/git sync
  • Learned state lives in ~/.tokeneconomizer (repos/, index.json, sessions/, locks/), outside ~/.claude and outside the repository. It cannot travel with a synced config or with the repo, so every machine relearns from scratch.
  • Per-repo state folders have hashed names (e.g. my-repo-73d35aa8b6, plus .bak-<timestamp> copies), so they cannot be matched or merged across machines by a person.
2. Absolute paths baked into generated files
  • The launcher written at session start, ~/.tokeneconomizer/bin/te, is a script like exec 'C:\Users\<name>\.claude\plugins\cache\tokeneconomizer\tokeneconomizer\0.1.0\scripts\te' "$@". It hardcodes the plugin cache path including user name and plugin version, so it is only valid on one machine and breaks on every plugin update or on a different profile folder.
  • Please resolve the plugin location at runtime (e.g. via CLAUDE_PLUGIN_ROOT or relative to the script) instead of writing it into a generated file.
3. Hard to see what is enabled where
  • Per-repo behaviour is spread over several places: .claude/settings.local.json deny rules in each repo, an extraKnownMarketplaces entry in each project's .claude/settings.json, project-scope plugin installs, and the state under ~/.tokeneconomizer.
  • In two of my repos the tool pruning had silently added about 250 entries to permissions.deny (Artifact, scheduled-tasks, Teams/Outlook/SharePoint connectors, Power Automate tools, ...). Nothing in the project made it obvious why those tools were missing. Support for finding out which repos are affected was limited to a command that must be run inside each repo.
  • With a user-level install plus project-level installs, the plugin list shows the same plugin several times, which made it hard to tell which copy applies where.
Suggestions
  • Keep state inside the repo (or an opt-in, relocatable directory), in a readable, mergeable format.
  • No absolute paths in generated files.
  • One place that shows which repos are enabled and what has been pruned, and prune via an explicit, visible, reversible step rather than a large silent deny list.
主要言語
Python
スター
5.6k
フォーク
344
平均マージ
17時間 41分
マージ済み PR(30日)
73

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/TokenEconomizer のほかの issue

microsoft/TokenEconomizer の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。