@alexgreensh/token-optimizer 5.13.70 → 5.13.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/hooks/module_runner.py +3 -3
- package/hooks/sessionstart_runner.py +6 -0
- package/package.json +1 -1
- package/skills/token-optimizer/assets/dashboard.html +361 -289
- package/skills/token-optimizer/assets/savings_story.js +140 -36
- package/skills/token-optimizer/references/cli-reference.md +1 -1
- package/skills/token-optimizer/scripts/_measure/__init__.py +3 -3
- package/skills/token-optimizer/scripts/_measure/config_cache.py +63 -0
- package/skills/token-optimizer/scripts/_measure/context_reset_marker.py +3 -1
- package/skills/token-optimizer/scripts/_measure/counted_cap.py +4 -2
- package/skills/token-optimizer/scripts/_measure/coverage_report.py +11 -1
- package/skills/token-optimizer/scripts/_measure/dashboard.py +35 -64
- package/skills/token-optimizer/scripts/_measure/holdout_report.py +5 -1
- package/skills/token-optimizer/scripts/_measure/keepwarm_safety.py +4 -0
- package/skills/token-optimizer/scripts/_measure/lifecycle.py +6 -7
- package/skills/token-optimizer/scripts/_measure/quality_checkpoint.py +4 -3
- package/skills/token-optimizer/scripts/_measure/savings.py +11 -4
- package/skills/token-optimizer/scripts/_measure/savings_headline.py +130 -0
- package/skills/token-optimizer/scripts/_measure/sessions.py +7 -0
- package/skills/token-optimizer/scripts/_measure/setup_observation_cache.py +99 -0
- package/skills/token-optimizer/scripts/_measure/setup_step.py +4 -5
- package/skills/token-optimizer/scripts/_measure/status_bar_refresh.py +218 -0
- package/skills/token-optimizer/scripts/_measure/structural_report.py +25 -6
- package/skills/token-optimizer/scripts/_measure/structural_value.py +16 -10
- package/skills/token-optimizer/scripts/cloud_kit.py +1 -2
- package/skills/token-optimizer/scripts/codemap.py +33 -5
- package/skills/token-optimizer/scripts/codemap_hint.py +152 -11
- package/skills/token-optimizer/scripts/codemap_index.py +100 -11
- package/skills/token-optimizer/scripts/codemap_ledger.py +29 -0
- package/skills/token-optimizer/scripts/codex_doctor.py +3 -3
- package/skills/token-optimizer/scripts/hermes_doctor.py +3 -3
- package/skills/token-optimizer/scripts/hermes_install.py +3 -3
- package/skills/token-optimizer/scripts/statusline.js +157 -30
- package/skills/token-optimizer/scripts/_measure/keepwarm_fork.py +0 -140
- package/skills/token-optimizer/scripts/_measure/keepwarm_guard.py +0 -35
- package/skills/token-optimizer/scripts/_measure/keepwarm_guard_server.py +0 -85
- package/skills/token-optimizer/scripts/_measure/keepwarm_prefix.py +0 -143
- package/skills/token-optimizer/scripts/_measure/keepwarm_response_filter.py +0 -84
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"name": "token-optimizer",
|
|
14
14
|
"source": "./",
|
|
15
15
|
"description": "Audit, fix, and monitor Claude Code context window usage. Find the ghost tokens.",
|
|
16
|
-
"version": "5.13.
|
|
16
|
+
"version": "5.13.72",
|
|
17
17
|
"author": {
|
|
18
18
|
"name": "Alex Greenshpun",
|
|
19
19
|
"url": "https://linkedin.com/in/alexgreensh"
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"name": "token-optimizer-cowork",
|
|
56
56
|
"source": "./cowork/token-optimizer",
|
|
57
57
|
"description": "Token Optimizer for Claude Cowork \u2014 full skills + Cowork-native hooks (beta). Install THIS in Cowork; the standard token-optimizer entry is for desktop Claude Code.",
|
|
58
|
-
"version": "5.13.
|
|
58
|
+
"version": "5.13.72",
|
|
59
59
|
"author": {
|
|
60
60
|
"name": "Alex Greenshpun",
|
|
61
61
|
"url": "https://linkedin.com/in/alexgreensh"
|
package/hooks/module_runner.py
CHANGED
|
@@ -137,11 +137,11 @@ _COLD_COMPILE_TAG = "token-optimizer-bytecode-warmup"
|
|
|
137
137
|
_MEASURE_PACKAGE_SOURCES = (
|
|
138
138
|
'__init__.py', '_compat.py', 'runtime.py', 'pricing.py', 'audit.py',
|
|
139
139
|
'dashboard.py', 'lifecycle.py', 'sessions.py', 'trends.py', 'cache_policy.py',
|
|
140
|
-
'daemon.py', 'quality_archive.py', 'continuity.py', 'savings.py', 'cli.py', 'dashboard_history.py', 'weekly_activity.py', 'headline.py', 'counted_position.py', 'counted_pricing_v5.py', 'transcript_backfill.py', 'counted_subagents.py', 'lean_resume_threshold.py', 'output_reread.py', 'session_effect.py', 'structural_ledger.py', 'structural_archives.py', 'structural_listing.py', 'structural_report.py', 'structural_seed.py', 'structural_value.py', 'rework_metrics.py', 'session_best.py', 'savings_story.py', 'counted_orphans.py', 'counted_cap.py', 'archive_void_evidence.py', 'cost_per_message_trend.py', 'lean_resume_receivers.py', 'routing_period.py', 'fixture_context.py', 'transcript_product.py', 'periphery_exposure.py', 'structure_funnel.py', 'setup_attachment_counter.py', 'first_read_outcomes.py', 'setup_budget_monitor.py', 'setup_connector_ledger.py', 'first_call_context.py', 'timestamp_cache.py', 'token_type_split.py', 'evidence_parallel.py', 'ttl_period.py', 'first_read_revive.py', 'mcp_archive_tripwire.py', 'compaction_survival.py', 'archive_void_codex.py', 'compression_fixture_void.py', 'feature_health.py', 'archive_health.py', 'coverage_report.py', 'file_refetch.py', 'holdout_report.py', 'structural_dedupe.py', 'setup_step.py', 'baseline_provenance.py', 'own_price_card.py',
|
|
140
|
+
'daemon.py', 'quality_archive.py', 'continuity.py', 'savings.py', 'cli.py', 'dashboard_history.py', 'weekly_activity.py', 'headline.py', 'counted_position.py', 'counted_pricing_v5.py', 'transcript_backfill.py', 'counted_subagents.py', 'lean_resume_threshold.py', 'output_reread.py', 'session_effect.py', 'structural_ledger.py', 'structural_archives.py', 'structural_listing.py', 'structural_report.py', 'structural_seed.py', 'structural_value.py', 'rework_metrics.py', 'session_best.py', 'savings_story.py', 'savings_headline.py', 'counted_orphans.py', 'counted_cap.py', 'archive_void_evidence.py', 'cost_per_message_trend.py', 'lean_resume_receivers.py', 'routing_period.py', 'fixture_context.py', 'transcript_product.py', 'periphery_exposure.py', 'structure_funnel.py', 'setup_attachment_counter.py', 'first_read_outcomes.py', 'setup_budget_monitor.py', 'setup_connector_ledger.py', 'first_call_context.py', 'timestamp_cache.py', 'token_type_split.py', 'evidence_parallel.py', 'ttl_period.py', 'first_read_revive.py', 'mcp_archive_tripwire.py', 'compaction_survival.py', 'archive_void_codex.py', 'compression_fixture_void.py', 'feature_health.py', 'archive_health.py', 'coverage_report.py', 'file_refetch.py', 'holdout_report.py', 'structural_dedupe.py', 'setup_step.py', 'baseline_provenance.py', 'own_price_card.py',
|
|
141
141
|
)
|
|
142
142
|
_MEASURE_PACKAGE_SOURCES += ('transcript_stream.py', 'checkpoint_direction.py', 'checkpoint_retention.py')
|
|
143
|
-
_MEASURE_PACKAGE_SOURCES += ('keepwarm_safety.py', 'keepwarm_economics.py', 'keepwarm_linux.py', '
|
|
144
|
-
_MEASURE_PACKAGE_SOURCES += ('quality_continuity.py', 'quality_checkpoint.py', 'codex_quality.py', 'lease_candidate_cleanup.py', 'session_store_spool.py', 'upgrade_drain_control.py', 'compression_scan_checkpoint.py', 'status_bar_lock.py', 'session_flush_lock.py', 'context_reset_marker.py', 'holdout_fallback.py', 'dashboard_heal_claim.py',)
|
|
143
|
+
_MEASURE_PACKAGE_SOURCES += ('keepwarm_safety.py', 'keepwarm_economics.py', 'keepwarm_linux.py', 'mod_action_booking.py', 'mod_compaction_booking.py', 'mod_fresh_booking.py',)
|
|
144
|
+
_MEASURE_PACKAGE_SOURCES += ('quality_continuity.py', 'quality_checkpoint.py', 'codex_quality.py', 'lease_candidate_cleanup.py', 'session_store_spool.py', 'upgrade_drain_control.py', 'compression_scan_checkpoint.py', 'status_bar_lock.py', 'session_flush_lock.py', 'context_reset_marker.py', 'holdout_fallback.py', 'dashboard_heal_claim.py', 'config_cache.py', 'setup_observation_cache.py', 'status_bar_refresh.py',)
|
|
145
145
|
|
|
146
146
|
|
|
147
147
|
def _runtime_sources(measure_src):
|
|
@@ -507,6 +507,11 @@ def _sub_compact_restore_new_session(hook_input: dict, sink: list) -> None:
|
|
|
507
507
|
sink.append(buf.getvalue())
|
|
508
508
|
|
|
509
509
|
|
|
510
|
+
def _sub_codemap_cleanup() -> None:
|
|
511
|
+
import codemap_hint # noqa: PLC0415
|
|
512
|
+
codemap_hint.cleanup_old_indexes_daily()
|
|
513
|
+
|
|
514
|
+
|
|
510
515
|
def _sub_codemap_hint(hook_input: dict) -> None:
|
|
511
516
|
"""Code map discovery hint (codemap_hint.py): plain text, so it lands in
|
|
512
517
|
additionalContext via the envelope. Silent when the feature is off
|
|
@@ -650,6 +655,7 @@ def main() -> int:
|
|
|
650
655
|
_capture("read_cache --clear-compacted", _sub_clear_compacted, hook_input)
|
|
651
656
|
_capture("compact-restore --new-session-only", _sub_compact_restore_new_session,
|
|
652
657
|
hook_input, _wrapped)
|
|
658
|
+
_capture("codemap cleanup", _sub_codemap_cleanup)
|
|
653
659
|
_capture("codemap hint", _sub_codemap_hint, hook_input)
|
|
654
660
|
|
|
655
661
|
# Emit the compact-restore payloads and ensure-health/quality-cache
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alexgreensh/token-optimizer",
|
|
3
|
-
"version": "5.13.
|
|
3
|
+
"version": "5.13.72",
|
|
4
4
|
"description": "Token Optimizer for Claude Code cloud sessions: the real plugin, installed by your cloud environment's setup script.",
|
|
5
5
|
"license": "PolyForm-Noncommercial-1.0.0",
|
|
6
6
|
"author": "Alex Greenshpun (https://linkedin.com/in/alexgreensh)",
|