opencode-quota-gui 1.2.0 → 1.3.1
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/README.md +104 -34
- package/dist/contracts/analytics-entity.d.ts +6 -1
- package/dist/contracts/analytics-entity.js +27 -10
- package/dist/contracts/build-identity.js +1 -1
- package/dist/contracts/card-visibility.d.ts +21 -0
- package/dist/contracts/card-visibility.js +19 -0
- package/dist/contracts/dashboard.d.ts +35 -1
- package/dist/contracts/dashboard.js +2 -0
- package/dist/contracts/dto-guards.d.ts +24 -0
- package/dist/contracts/dto-guards.js +594 -0
- package/dist/contracts/openai-quota.d.ts +3 -0
- package/dist/contracts/openai-quota.js +3 -0
- package/dist/contracts/provider-failure.d.ts +18 -0
- package/dist/contracts/provider-failure.js +25 -0
- package/dist/data/modelsdev-temporal.min.json +57 -0
- package/dist/gui/config.d.ts +20 -3
- package/dist/gui/config.js +72 -4
- package/dist/gui/dashboard-errors.d.ts +32 -0
- package/dist/gui/dashboard-errors.js +97 -0
- package/dist/gui/lifecycle.d.ts +47 -12
- package/dist/gui/lifecycle.js +215 -37
- package/dist/gui/primary-quota-windows.d.ts +28 -0
- package/dist/gui/primary-quota-windows.js +149 -0
- package/dist/gui/provider-cards.d.ts +11 -3
- package/dist/gui/provider-cards.js +85 -33
- package/dist/gui/quota-notification-detector.d.ts +151 -0
- package/dist/gui/quota-notification-detector.js +318 -0
- package/dist/gui/quota-notification-observer.d.ts +54 -0
- package/dist/gui/quota-notification-observer.js +412 -0
- package/dist/gui/rpc.d.ts +61 -0
- package/dist/gui/rpc.js +310 -0
- package/dist/gui/server.d.ts +15 -27
- package/dist/gui/server.js +34 -123
- package/dist/gui/snapshot-service.d.ts +34 -5
- package/dist/gui/snapshot-service.js +301 -70
- package/dist/gui/sources.d.ts +1 -1
- package/dist/gui/sources.js +98 -56
- package/dist/gui-experimental.cjs +1761 -0
- package/dist/lib/accounting-format.js +8 -0
- package/dist/lib/alibaba-coding-plan-cli.d.ts +79 -0
- package/dist/lib/alibaba-coding-plan-cli.js +539 -0
- package/dist/lib/anthropic-auth.d.ts +2 -3
- package/dist/lib/anthropic-auth.js +2 -3
- package/dist/lib/anthropic.d.ts +53 -12
- package/dist/lib/anthropic.js +622 -270
- package/dist/lib/api-key-retry-after.d.ts +7 -0
- package/dist/lib/api-key-retry-after.js +62 -0
- package/dist/lib/atomic-json.d.ts +2 -0
- package/dist/lib/atomic-json.js +1 -0
- package/dist/lib/cache-observer-ingestion.d.ts +90 -0
- package/dist/lib/cache-observer-ingestion.js +981 -0
- package/dist/lib/cache-observer.d.ts +138 -0
- package/dist/lib/cache-observer.js +317 -0
- package/dist/lib/canonical-config-lock.d.ts +9 -0
- package/dist/lib/canonical-config-lock.js +36 -0
- package/dist/lib/chutes.js +63 -35
- package/dist/lib/claude-agent-transcript-ttl.d.ts +48 -0
- package/dist/lib/claude-agent-transcript-ttl.js +154 -0
- package/dist/lib/claude-agent-ttl-tracker.d.ts +21 -0
- package/dist/lib/claude-agent-ttl-tracker.js +152 -0
- package/dist/lib/cli-show.js +5 -3
- package/dist/lib/config-write-target.d.ts +1 -1
- package/dist/lib/config-write-target.js +5 -2
- package/dist/lib/config.d.ts +6 -1
- package/dist/lib/config.js +241 -2
- package/dist/lib/copilot.js +198 -85
- package/dist/lib/dashboard-web-policy.d.ts +35 -0
- package/dist/lib/dashboard-web-policy.js +24 -0
- package/dist/lib/deepseek.js +34 -11
- package/dist/lib/display-sanitize.js +3 -0
- package/dist/lib/entries.d.ts +26 -0
- package/dist/lib/entries.js +2 -0
- package/dist/lib/format-utils.d.ts +1 -1
- package/dist/lib/format-utils.js +2 -2
- package/dist/lib/glm-coding-plan.js +102 -68
- package/dist/lib/google-agy.js +147 -24
- package/dist/lib/google-gemini-cli.js +140 -23
- package/dist/lib/http.d.ts +4 -0
- package/dist/lib/http.js +16 -2
- package/dist/lib/init-installer.js +30 -7
- package/dist/lib/kilo.js +63 -55
- package/dist/lib/kimi.js +43 -14
- package/dist/lib/mimo.d.ts +4 -0
- package/dist/lib/mimo.js +45 -1
- package/dist/lib/nanogpt.d.ts +3 -0
- package/dist/lib/nanogpt.js +50 -6
- package/dist/lib/ollama-cloud.d.ts +1 -1
- package/dist/lib/ollama-cloud.js +51 -29
- package/dist/lib/openai.js +90 -40
- package/dist/lib/opencode-auth-sqlite.d.ts +2 -2
- package/dist/lib/opencode-auth-sqlite.js +2 -2
- package/dist/lib/opencode-auth.d.ts +3 -2
- package/dist/lib/opencode-auth.js +8 -1
- package/dist/lib/opencode-config-editor.d.ts +1 -0
- package/dist/lib/opencode-config-editor.js +6 -1
- package/dist/lib/opencode-go.js +53 -5
- package/dist/lib/opencode-version-core.d.ts +23 -0
- package/dist/lib/opencode-version-core.js +49 -0
- package/dist/lib/opencode-version.d.ts +4 -3
- package/dist/lib/opencode-version.js +15 -11
- package/dist/lib/opencode-zen.d.ts +12 -1
- package/dist/lib/opencode-zen.js +98 -12
- package/dist/lib/provider-add.js +5 -2
- package/dist/lib/provider-registration.d.ts +19 -9
- package/dist/lib/provider-registration.js +17 -6
- package/dist/lib/quota-command-format.js +1 -1
- package/dist/lib/quota-exhaustion-projection.d.ts +11 -0
- package/dist/lib/quota-exhaustion-projection.js +25 -0
- package/dist/lib/quota-providers-remote.d.ts +4 -1
- package/dist/lib/quota-providers-remote.js +137 -22
- package/dist/lib/quota-providers.d.ts +1 -1
- package/dist/lib/quota-providers.js +12 -35
- package/dist/lib/quota-render-data.d.ts +6 -0
- package/dist/lib/quota-render-data.js +43 -17
- package/dist/lib/quota-reset-notifications.d.ts +17 -0
- package/dist/lib/quota-reset-notifications.js +11 -2
- package/dist/lib/quota-state-codec.js +19 -1
- package/dist/lib/quota-state.d.ts +7 -1
- package/dist/lib/quota-state.js +208 -34
- package/dist/lib/quota-stats.js +21 -0
- package/dist/lib/quota-status.js +3 -51
- package/dist/lib/scoped-update.d.ts +1 -1
- package/dist/lib/synthetic.js +67 -48
- package/dist/lib/types.d.ts +49 -1
- package/dist/lib/types.js +16 -0
- package/dist/lib/xai.js +64 -24
- package/dist/plugin.d.ts +4 -3
- package/dist/plugin.js +293 -16
- package/dist/provider-logos/NOTICE.md +1 -1
- package/dist/provider-logos/OPENCODE-NOTICE.md +4 -3
- package/dist/providers/alibaba-coding-plan.js +107 -102
- package/dist/providers/alibaba-token-plan.js +17 -0
- package/dist/providers/anthropic.d.ts +12 -3
- package/dist/providers/anthropic.js +71 -219
- package/dist/providers/cache-policies.d.ts +11 -4
- package/dist/providers/cache-policies.js +19 -13
- package/dist/providers/claude-agent.d.ts +19 -0
- package/dist/providers/claude-agent.js +196 -0
- package/dist/providers/copilot.js +12 -2
- package/dist/providers/glm-coding-plan-provider.d.ts +3 -0
- package/dist/providers/glm-coding-plan-provider.js +5 -1
- package/dist/providers/google-account-format.js +2 -0
- package/dist/providers/google-agy.d.ts +6 -5
- package/dist/providers/google-agy.js +55 -17
- package/dist/providers/google-gemini-cli.js +13 -2
- package/dist/providers/kilo.js +10 -1
- package/dist/providers/kimi-code.js +13 -6
- package/dist/providers/mimo.js +9 -2
- package/dist/providers/minimax-coding-plan.js +28 -5
- package/dist/providers/nanogpt.js +4 -0
- package/dist/providers/ollama-cloud.js +3 -0
- package/dist/providers/openai.js +1 -0
- package/dist/providers/opencode-go.js +11 -1
- package/dist/providers/opencode-zen.js +32 -3
- package/dist/providers/openrouter.js +4 -0
- package/dist/providers/quota-providers.js +46 -9
- package/dist/providers/registry.js +2 -0
- package/dist/providers/result-helpers.d.ts +6 -0
- package/dist/providers/result-helpers.js +18 -2
- package/dist/rpc.d.ts +440 -4
- package/dist/rpc.js +507 -2
- package/dist/ui/assets/{index-Cs-nrywz.css → index-BcueIm3Z.css} +1 -1
- package/dist/ui/assets/index-C6qRSoh8.js +10 -0
- package/dist/ui/assets/{popover-DKRrwr_K.js → popover-4bFSvRZ7.js} +1 -1
- package/dist/ui/assets/providers/claude-agent.svg +3 -0
- package/dist/ui/index.html +2 -2
- package/package.json +15 -7
- package/dist/bin/opencode-quota-gui.d.ts.map +0 -1
- package/dist/bin/opencode-quota-gui.js.map +0 -1
- package/dist/contracts/analytics-entity.d.ts.map +0 -1
- package/dist/contracts/analytics-entity.js.map +0 -1
- package/dist/contracts/analytics-temporal.d.ts.map +0 -1
- package/dist/contracts/analytics-temporal.js.map +0 -1
- package/dist/contracts/build-identity.d.ts.map +0 -1
- package/dist/contracts/card-order.d.ts.map +0 -1
- package/dist/contracts/card-order.js.map +0 -1
- package/dist/contracts/collision-safe-key.d.ts.map +0 -1
- package/dist/contracts/collision-safe-key.js.map +0 -1
- package/dist/contracts/dashboard.d.ts.map +0 -1
- package/dist/contracts/dashboard.js.map +0 -1
- package/dist/contracts/guards.d.ts.map +0 -1
- package/dist/contracts/guards.js.map +0 -1
- package/dist/contracts/identity.d.ts.map +0 -1
- package/dist/contracts/identity.js.map +0 -1
- package/dist/contracts/openai-quota.d.ts.map +0 -1
- package/dist/contracts/openai-quota.js.map +0 -1
- package/dist/contracts/ranges.d.ts.map +0 -1
- package/dist/contracts/ranges.js.map +0 -1
- package/dist/contracts/settings.d.ts.map +0 -1
- package/dist/contracts/settings.js.map +0 -1
- package/dist/contracts/temporal.d.ts.map +0 -1
- package/dist/contracts/temporal.js.map +0 -1
- package/dist/contracts/time-zone.d.ts.map +0 -1
- package/dist/contracts/time-zone.js.map +0 -1
- package/dist/gui/aggregation.d.ts.map +0 -1
- package/dist/gui/aggregation.js.map +0 -1
- package/dist/gui/analytics-bridge.d.ts.map +0 -1
- package/dist/gui/analytics-bridge.js.map +0 -1
- package/dist/gui/analytics-engine.d.ts.map +0 -1
- package/dist/gui/analytics-engine.js.map +0 -1
- package/dist/gui/analytics-indexes.d.ts.map +0 -1
- package/dist/gui/analytics-indexes.js.map +0 -1
- package/dist/gui/analytics-model.d.ts.map +0 -1
- package/dist/gui/analytics-model.js.map +0 -1
- package/dist/gui/analytics-pricing-revision.d.ts.map +0 -1
- package/dist/gui/analytics-pricing-revision.js.map +0 -1
- package/dist/gui/analytics-protocol.d.ts.map +0 -1
- package/dist/gui/analytics-protocol.js.map +0 -1
- package/dist/gui/analytics-reader.d.ts.map +0 -1
- package/dist/gui/analytics-reader.js.map +0 -1
- package/dist/gui/analytics-service.d.ts.map +0 -1
- package/dist/gui/analytics-service.js.map +0 -1
- package/dist/gui/analytics-state.d.ts.map +0 -1
- package/dist/gui/analytics-state.js.map +0 -1
- package/dist/gui/analytics-worker-runtime.d.ts.map +0 -1
- package/dist/gui/analytics-worker-runtime.js.map +0 -1
- package/dist/gui/analytics-worker.d.ts.map +0 -1
- package/dist/gui/analytics-worker.js.map +0 -1
- package/dist/gui/config.d.ts.map +0 -1
- package/dist/gui/config.js.map +0 -1
- package/dist/gui/identity.d.ts.map +0 -1
- package/dist/gui/identity.js.map +0 -1
- package/dist/gui/lifecycle.d.ts.map +0 -1
- package/dist/gui/lifecycle.js.map +0 -1
- package/dist/gui/log.d.ts.map +0 -1
- package/dist/gui/log.js.map +0 -1
- package/dist/gui/provider-cards.d.ts.map +0 -1
- package/dist/gui/provider-cards.js.map +0 -1
- package/dist/gui/server.d.ts.map +0 -1
- package/dist/gui/server.js.map +0 -1
- package/dist/gui/settings-file-opener.d.ts.map +0 -1
- package/dist/gui/settings-file-opener.js.map +0 -1
- package/dist/gui/snapshot-service.d.ts.map +0 -1
- package/dist/gui/snapshot-service.js.map +0 -1
- package/dist/gui/sources.d.ts.map +0 -1
- package/dist/gui/sources.js.map +0 -1
- package/dist/gui/sse.d.ts.map +0 -1
- package/dist/gui/sse.js.map +0 -1
- package/dist/gui/temporal-quota-policy-data.d.ts.map +0 -1
- package/dist/gui/temporal-quota-policy-data.js.map +0 -1
- package/dist/gui/temporal-quota-policy.d.ts.map +0 -1
- package/dist/gui/temporal-quota-policy.js.map +0 -1
- package/dist/gui/temporal-status.d.ts.map +0 -1
- package/dist/gui/temporal-status.js.map +0 -1
- package/dist/gui/time-zone.d.ts.map +0 -1
- package/dist/gui/time-zone.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lib/accounting-format.d.ts.map +0 -1
- package/dist/lib/accounting-format.js.map +0 -1
- package/dist/lib/alibaba-auth.d.ts.map +0 -1
- package/dist/lib/alibaba-auth.js.map +0 -1
- package/dist/lib/alibaba-coding-plan-local-quota.d.ts +0 -47
- package/dist/lib/alibaba-coding-plan-local-quota.d.ts.map +0 -1
- package/dist/lib/alibaba-coding-plan-local-quota.js +0 -146
- package/dist/lib/alibaba-coding-plan-local-quota.js.map +0 -1
- package/dist/lib/alibaba-token-plan.d.ts.map +0 -1
- package/dist/lib/alibaba-token-plan.js.map +0 -1
- package/dist/lib/anthropic-auth.d.ts.map +0 -1
- package/dist/lib/anthropic-auth.js.map +0 -1
- package/dist/lib/anthropic.d.ts.map +0 -1
- package/dist/lib/anthropic.js.map +0 -1
- package/dist/lib/api-key-resolver.d.ts.map +0 -1
- package/dist/lib/api-key-resolver.js.map +0 -1
- package/dist/lib/atomic-json.d.ts.map +0 -1
- package/dist/lib/atomic-json.js.map +0 -1
- package/dist/lib/chutes-config.d.ts.map +0 -1
- package/dist/lib/chutes-config.js.map +0 -1
- package/dist/lib/chutes.d.ts.map +0 -1
- package/dist/lib/chutes.js.map +0 -1
- package/dist/lib/cli-reports.d.ts.map +0 -1
- package/dist/lib/cli-reports.js.map +0 -1
- package/dist/lib/cli-show.d.ts.map +0 -1
- package/dist/lib/cli-show.js.map +0 -1
- package/dist/lib/cli-status.d.ts.map +0 -1
- package/dist/lib/cli-status.js.map +0 -1
- package/dist/lib/command-parsing.d.ts.map +0 -1
- package/dist/lib/command-parsing.js.map +0 -1
- package/dist/lib/config-file-utils.d.ts.map +0 -1
- package/dist/lib/config-file-utils.js.map +0 -1
- package/dist/lib/config-write-target.d.ts.map +0 -1
- package/dist/lib/config-write-target.js.map +0 -1
- package/dist/lib/config.d.ts.map +0 -1
- package/dist/lib/config.js.map +0 -1
- package/dist/lib/copilot.d.ts.map +0 -1
- package/dist/lib/copilot.js.map +0 -1
- package/dist/lib/cursor-detection.d.ts.map +0 -1
- package/dist/lib/cursor-detection.js.map +0 -1
- package/dist/lib/cursor-pricing.d.ts.map +0 -1
- package/dist/lib/cursor-pricing.js.map +0 -1
- package/dist/lib/cursor-usage.d.ts.map +0 -1
- package/dist/lib/cursor-usage.js.map +0 -1
- package/dist/lib/dashboard-visibility.d.ts.map +0 -1
- package/dist/lib/dashboard-visibility.js.map +0 -1
- package/dist/lib/deepseek-auth.d.ts.map +0 -1
- package/dist/lib/deepseek-auth.js.map +0 -1
- package/dist/lib/deepseek.d.ts.map +0 -1
- package/dist/lib/deepseek.js.map +0 -1
- package/dist/lib/display-sanitize.d.ts.map +0 -1
- package/dist/lib/display-sanitize.js.map +0 -1
- package/dist/lib/entries.d.ts.map +0 -1
- package/dist/lib/entries.js.map +0 -1
- package/dist/lib/env-template.d.ts.map +0 -1
- package/dist/lib/env-template.js.map +0 -1
- package/dist/lib/format-utils.d.ts.map +0 -1
- package/dist/lib/format-utils.js.map +0 -1
- package/dist/lib/format.d.ts.map +0 -1
- package/dist/lib/format.js.map +0 -1
- package/dist/lib/glm-coding-plan.d.ts.map +0 -1
- package/dist/lib/glm-coding-plan.js.map +0 -1
- package/dist/lib/google-agy-companion.d.ts.map +0 -1
- package/dist/lib/google-agy-companion.js.map +0 -1
- package/dist/lib/google-agy.d.ts.map +0 -1
- package/dist/lib/google-agy.js.map +0 -1
- package/dist/lib/google-companion-credentials.d.ts.map +0 -1
- package/dist/lib/google-companion-credentials.js.map +0 -1
- package/dist/lib/google-gemini-cli-companion.d.ts.map +0 -1
- package/dist/lib/google-gemini-cli-companion.js.map +0 -1
- package/dist/lib/google-gemini-cli.d.ts.map +0 -1
- package/dist/lib/google-gemini-cli.js.map +0 -1
- package/dist/lib/google-token-cache.d.ts.map +0 -1
- package/dist/lib/google-token-cache.js.map +0 -1
- package/dist/lib/grouped-entry-normalization.d.ts.map +0 -1
- package/dist/lib/grouped-entry-normalization.js.map +0 -1
- package/dist/lib/grouped-header-format.d.ts.map +0 -1
- package/dist/lib/grouped-header-format.js.map +0 -1
- package/dist/lib/gui-config-target.d.ts.map +0 -1
- package/dist/lib/gui-config-target.js.map +0 -1
- package/dist/lib/home-dir-display.d.ts.map +0 -1
- package/dist/lib/home-dir-display.js.map +0 -1
- package/dist/lib/http.d.ts.map +0 -1
- package/dist/lib/http.js.map +0 -1
- package/dist/lib/init-installer.d.ts.map +0 -1
- package/dist/lib/init-installer.js.map +0 -1
- package/dist/lib/jsonc.d.ts.map +0 -1
- package/dist/lib/jsonc.js.map +0 -1
- package/dist/lib/kilo-config.d.ts.map +0 -1
- package/dist/lib/kilo-config.js.map +0 -1
- package/dist/lib/kilo.d.ts.map +0 -1
- package/dist/lib/kilo.js.map +0 -1
- package/dist/lib/kimi-auth.d.ts.map +0 -1
- package/dist/lib/kimi-auth.js.map +0 -1
- package/dist/lib/kimi-endpoints.d.ts.map +0 -1
- package/dist/lib/kimi-endpoints.js.map +0 -1
- package/dist/lib/kimi.d.ts.map +0 -1
- package/dist/lib/kimi.js.map +0 -1
- package/dist/lib/maintainer-announcements.d.ts.map +0 -1
- package/dist/lib/maintainer-announcements.js.map +0 -1
- package/dist/lib/map-with-concurrency.d.ts.map +0 -1
- package/dist/lib/map-with-concurrency.js.map +0 -1
- package/dist/lib/markdown-table.d.ts.map +0 -1
- package/dist/lib/markdown-table.js.map +0 -1
- package/dist/lib/mimo-config.d.ts.map +0 -1
- package/dist/lib/mimo-config.js.map +0 -1
- package/dist/lib/mimo.d.ts.map +0 -1
- package/dist/lib/mimo.js.map +0 -1
- package/dist/lib/minimax-auth.d.ts.map +0 -1
- package/dist/lib/minimax-auth.js.map +0 -1
- package/dist/lib/minimax-endpoints.d.ts.map +0 -1
- package/dist/lib/minimax-endpoints.js.map +0 -1
- package/dist/lib/modelsdev-pricing.d.ts.map +0 -1
- package/dist/lib/modelsdev-pricing.js.map +0 -1
- package/dist/lib/modelsdev-temporal.d.ts.map +0 -1
- package/dist/lib/modelsdev-temporal.js.map +0 -1
- package/dist/lib/nanogpt-config.d.ts.map +0 -1
- package/dist/lib/nanogpt-config.js.map +0 -1
- package/dist/lib/nanogpt.d.ts.map +0 -1
- package/dist/lib/nanogpt.js.map +0 -1
- package/dist/lib/ollama-cloud-config.d.ts.map +0 -1
- package/dist/lib/ollama-cloud-config.js.map +0 -1
- package/dist/lib/ollama-cloud.d.ts.map +0 -1
- package/dist/lib/ollama-cloud.js.map +0 -1
- package/dist/lib/openai.d.ts.map +0 -1
- package/dist/lib/openai.js.map +0 -1
- package/dist/lib/opencode-auth-sqlite.d.ts.map +0 -1
- package/dist/lib/opencode-auth-sqlite.js.map +0 -1
- package/dist/lib/opencode-auth.d.ts.map +0 -1
- package/dist/lib/opencode-auth.js.map +0 -1
- package/dist/lib/opencode-config-editor.d.ts.map +0 -1
- package/dist/lib/opencode-config-editor.js.map +0 -1
- package/dist/lib/opencode-config-providers.d.ts.map +0 -1
- package/dist/lib/opencode-config-providers.js.map +0 -1
- package/dist/lib/opencode-config-read.d.ts.map +0 -1
- package/dist/lib/opencode-config-read.js.map +0 -1
- package/dist/lib/opencode-console-auth.d.ts.map +0 -1
- package/dist/lib/opencode-console-auth.js.map +0 -1
- package/dist/lib/opencode-db-path.d.ts.map +0 -1
- package/dist/lib/opencode-db-path.js.map +0 -1
- package/dist/lib/opencode-go-auth.d.ts.map +0 -1
- package/dist/lib/opencode-go-auth.js.map +0 -1
- package/dist/lib/opencode-go.d.ts.map +0 -1
- package/dist/lib/opencode-go.js.map +0 -1
- package/dist/lib/opencode-runtime-paths.d.ts.map +0 -1
- package/dist/lib/opencode-runtime-paths.js.map +0 -1
- package/dist/lib/opencode-sqlite.d.ts.map +0 -1
- package/dist/lib/opencode-sqlite.js.map +0 -1
- package/dist/lib/opencode-storage.d.ts.map +0 -1
- package/dist/lib/opencode-storage.js.map +0 -1
- package/dist/lib/opencode-version.d.ts.map +0 -1
- package/dist/lib/opencode-version.js.map +0 -1
- package/dist/lib/opencode-zen.d.ts.map +0 -1
- package/dist/lib/opencode-zen.js.map +0 -1
- package/dist/lib/openrouter.d.ts.map +0 -1
- package/dist/lib/openrouter.js.map +0 -1
- package/dist/lib/private-state-paths.d.ts.map +0 -1
- package/dist/lib/private-state-paths.js.map +0 -1
- package/dist/lib/provider-add-command.d.ts.map +0 -1
- package/dist/lib/provider-add-command.js.map +0 -1
- package/dist/lib/provider-add-json-v1-questionnaire.d.ts.map +0 -1
- package/dist/lib/provider-add-json-v1-questionnaire.js.map +0 -1
- package/dist/lib/provider-add.d.ts.map +0 -1
- package/dist/lib/provider-add.js.map +0 -1
- package/dist/lib/provider-availability.d.ts.map +0 -1
- package/dist/lib/provider-availability.js.map +0 -1
- package/dist/lib/provider-metadata.d.ts.map +0 -1
- package/dist/lib/provider-metadata.js.map +0 -1
- package/dist/lib/provider-model-matching.d.ts.map +0 -1
- package/dist/lib/provider-model-matching.js.map +0 -1
- package/dist/lib/provider-registration.d.ts.map +0 -1
- package/dist/lib/provider-registration.js.map +0 -1
- package/dist/lib/quota-accounting-projection.d.ts.map +0 -1
- package/dist/lib/quota-accounting-projection.js.map +0 -1
- package/dist/lib/quota-columns.d.ts.map +0 -1
- package/dist/lib/quota-columns.js.map +0 -1
- package/dist/lib/quota-command-format.d.ts.map +0 -1
- package/dist/lib/quota-command-format.js.map +0 -1
- package/dist/lib/quota-dialog-command-specs.d.ts.map +0 -1
- package/dist/lib/quota-dialog-command-specs.js.map +0 -1
- package/dist/lib/quota-dialog-commands.d.ts.map +0 -1
- package/dist/lib/quota-dialog-commands.js.map +0 -1
- package/dist/lib/quota-entry-display.d.ts.map +0 -1
- package/dist/lib/quota-entry-display.js.map +0 -1
- package/dist/lib/quota-exhaustion-projection.d.ts.map +0 -1
- package/dist/lib/quota-exhaustion-projection.js.map +0 -1
- package/dist/lib/quota-export-types.d.ts.map +0 -1
- package/dist/lib/quota-export-types.js.map +0 -1
- package/dist/lib/quota-export.d.ts.map +0 -1
- package/dist/lib/quota-export.js.map +0 -1
- package/dist/lib/quota-format-style.d.ts.map +0 -1
- package/dist/lib/quota-format-style.js.map +0 -1
- package/dist/lib/quota-providers-local.d.ts.map +0 -1
- package/dist/lib/quota-providers-local.js.map +0 -1
- package/dist/lib/quota-providers-remote.d.ts.map +0 -1
- package/dist/lib/quota-providers-remote.js.map +0 -1
- package/dist/lib/quota-providers.d.ts.map +0 -1
- package/dist/lib/quota-providers.js.map +0 -1
- package/dist/lib/quota-render-data.d.ts.map +0 -1
- package/dist/lib/quota-render-data.js.map +0 -1
- package/dist/lib/quota-report-message.d.ts.map +0 -1
- package/dist/lib/quota-report-message.js.map +0 -1
- package/dist/lib/quota-reset-notifications.d.ts.map +0 -1
- package/dist/lib/quota-reset-notifications.js.map +0 -1
- package/dist/lib/quota-retry-wait.d.ts.map +0 -1
- package/dist/lib/quota-retry-wait.js.map +0 -1
- package/dist/lib/quota-runtime-context.d.ts.map +0 -1
- package/dist/lib/quota-runtime-context.js.map +0 -1
- package/dist/lib/quota-state-codec.d.ts.map +0 -1
- package/dist/lib/quota-state-codec.js.map +0 -1
- package/dist/lib/quota-state.d.ts.map +0 -1
- package/dist/lib/quota-state.js.map +0 -1
- package/dist/lib/quota-stats-format.d.ts.map +0 -1
- package/dist/lib/quota-stats-format.js.map +0 -1
- package/dist/lib/quota-stats.d.ts.map +0 -1
- package/dist/lib/quota-stats.js.map +0 -1
- package/dist/lib/quota-status.d.ts.map +0 -1
- package/dist/lib/quota-status.js.map +0 -1
- package/dist/lib/quota-surface-data.d.ts.map +0 -1
- package/dist/lib/quota-surface-data.js.map +0 -1
- package/dist/lib/quota-telemetry.d.ts.map +0 -1
- package/dist/lib/quota-telemetry.js.map +0 -1
- package/dist/lib/report-document.d.ts.map +0 -1
- package/dist/lib/report-document.js.map +0 -1
- package/dist/lib/resolved-auth-identity.d.ts.map +0 -1
- package/dist/lib/resolved-auth-identity.js.map +0 -1
- package/dist/lib/runtime-provider-ids.d.ts.map +0 -1
- package/dist/lib/runtime-provider-ids.js.map +0 -1
- package/dist/lib/scoped-query-chunks.d.ts.map +0 -1
- package/dist/lib/scoped-query-chunks.js.map +0 -1
- package/dist/lib/scoped-update-migration.d.ts.map +0 -1
- package/dist/lib/scoped-update-migration.js.map +0 -1
- package/dist/lib/scoped-update.d.ts.map +0 -1
- package/dist/lib/scoped-update.js.map +0 -1
- package/dist/lib/session-tokens-format.d.ts.map +0 -1
- package/dist/lib/session-tokens-format.js.map +0 -1
- package/dist/lib/session-tokens.d.ts.map +0 -1
- package/dist/lib/session-tokens.js.map +0 -1
- package/dist/lib/synthetic-config.d.ts.map +0 -1
- package/dist/lib/synthetic-config.js.map +0 -1
- package/dist/lib/synthetic.d.ts.map +0 -1
- package/dist/lib/synthetic.js.map +0 -1
- package/dist/lib/toast-format-grouped.d.ts.map +0 -1
- package/dist/lib/toast-format-grouped.js.map +0 -1
- package/dist/lib/token-buckets.d.ts.map +0 -1
- package/dist/lib/token-buckets.js.map +0 -1
- package/dist/lib/token-cost.d.ts.map +0 -1
- package/dist/lib/token-cost.js.map +0 -1
- package/dist/lib/tui-compact-format.d.ts.map +0 -1
- package/dist/lib/tui-compact-format.js.map +0 -1
- package/dist/lib/tui-panel-state.d.ts.map +0 -1
- package/dist/lib/tui-panel-state.js.map +0 -1
- package/dist/lib/tui-prompt-bar-format.d.ts.map +0 -1
- package/dist/lib/tui-prompt-bar-format.js.map +0 -1
- package/dist/lib/tui-sidebar-format.d.ts.map +0 -1
- package/dist/lib/tui-sidebar-format.js.map +0 -1
- package/dist/lib/types.d.ts.map +0 -1
- package/dist/lib/types.js.map +0 -1
- package/dist/lib/usage-ownership.d.ts.map +0 -1
- package/dist/lib/usage-ownership.js.map +0 -1
- package/dist/lib/version.d.ts.map +0 -1
- package/dist/lib/version.js.map +0 -1
- package/dist/lib/xai.d.ts.map +0 -1
- package/dist/lib/xai.js.map +0 -1
- package/dist/lib/zai-auth.d.ts.map +0 -1
- package/dist/lib/zai-auth.js.map +0 -1
- package/dist/lib/zai.d.ts.map +0 -1
- package/dist/lib/zai.js.map +0 -1
- package/dist/lib/zhipu-auth.d.ts.map +0 -1
- package/dist/lib/zhipu-auth.js.map +0 -1
- package/dist/lib/zhipu.d.ts.map +0 -1
- package/dist/lib/zhipu.js.map +0 -1
- package/dist/plugin.d.ts.map +0 -1
- package/dist/plugin.js.map +0 -1
- package/dist/providers/accounting-decimal.d.ts.map +0 -1
- package/dist/providers/accounting-decimal.js.map +0 -1
- package/dist/providers/alibaba-coding-plan.d.ts.map +0 -1
- package/dist/providers/alibaba-coding-plan.js.map +0 -1
- package/dist/providers/alibaba-token-plan.d.ts.map +0 -1
- package/dist/providers/alibaba-token-plan.js.map +0 -1
- package/dist/providers/anthropic.d.ts.map +0 -1
- package/dist/providers/anthropic.js.map +0 -1
- package/dist/providers/cache-policies.d.ts.map +0 -1
- package/dist/providers/cache-policies.js.map +0 -1
- package/dist/providers/chutes.d.ts.map +0 -1
- package/dist/providers/chutes.js.map +0 -1
- package/dist/providers/copilot.d.ts.map +0 -1
- package/dist/providers/copilot.js.map +0 -1
- package/dist/providers/cursor.d.ts.map +0 -1
- package/dist/providers/cursor.js.map +0 -1
- package/dist/providers/deepseek.d.ts.map +0 -1
- package/dist/providers/deepseek.js.map +0 -1
- package/dist/providers/glm-coding-plan-provider.d.ts.map +0 -1
- package/dist/providers/glm-coding-plan-provider.js.map +0 -1
- package/dist/providers/google-account-format.d.ts.map +0 -1
- package/dist/providers/google-account-format.js.map +0 -1
- package/dist/providers/google-agy.d.ts.map +0 -1
- package/dist/providers/google-agy.js.map +0 -1
- package/dist/providers/google-gemini-cli.d.ts.map +0 -1
- package/dist/providers/google-gemini-cli.js.map +0 -1
- package/dist/providers/kilo.d.ts.map +0 -1
- package/dist/providers/kilo.js.map +0 -1
- package/dist/providers/kimi-code.d.ts.map +0 -1
- package/dist/providers/kimi-code.js.map +0 -1
- package/dist/providers/mimo.d.ts.map +0 -1
- package/dist/providers/mimo.js.map +0 -1
- package/dist/providers/minimax-coding-plan.d.ts.map +0 -1
- package/dist/providers/minimax-coding-plan.js.map +0 -1
- package/dist/providers/nanogpt.d.ts.map +0 -1
- package/dist/providers/nanogpt.js.map +0 -1
- package/dist/providers/ollama-cloud.d.ts.map +0 -1
- package/dist/providers/ollama-cloud.js.map +0 -1
- package/dist/providers/openai.d.ts.map +0 -1
- package/dist/providers/openai.js.map +0 -1
- package/dist/providers/opencode-go.d.ts.map +0 -1
- package/dist/providers/opencode-go.js.map +0 -1
- package/dist/providers/opencode-zen.d.ts.map +0 -1
- package/dist/providers/opencode-zen.js.map +0 -1
- package/dist/providers/openrouter.d.ts.map +0 -1
- package/dist/providers/openrouter.js.map +0 -1
- package/dist/providers/quota-providers.d.ts.map +0 -1
- package/dist/providers/quota-providers.js.map +0 -1
- package/dist/providers/registry.d.ts.map +0 -1
- package/dist/providers/registry.js.map +0 -1
- package/dist/providers/result-helpers.d.ts.map +0 -1
- package/dist/providers/result-helpers.js.map +0 -1
- package/dist/providers/synthetic.d.ts.map +0 -1
- package/dist/providers/synthetic.js.map +0 -1
- package/dist/providers/xai.d.ts.map +0 -1
- package/dist/providers/xai.js.map +0 -1
- package/dist/providers/zai.d.ts.map +0 -1
- package/dist/providers/zai.js.map +0 -1
- package/dist/providers/zhipu.d.ts.map +0 -1
- package/dist/providers/zhipu.js.map +0 -1
- package/dist/rpc.d.ts.map +0 -1
- package/dist/rpc.js.map +0 -1
- package/dist/ui/assets/index-D9lFKhSN.js +0 -9
|
@@ -2,7 +2,7 @@ import { mapWithConcurrency } from "../lib/map-with-concurrency.js";
|
|
|
2
2
|
import { customQuotaProviderDefinitions, QUOTA_PROVIDERS_AGGREGATE_ID, resolveQuotaProviderSessionModelIdentity, selectEligibleQuotaProviderDefinitions, } from "../lib/quota-providers.js";
|
|
3
3
|
import { collectLocalQuotaProviderEstimate, inspectLocalQuotaProviderState, } from "../lib/quota-providers-local.js";
|
|
4
4
|
import { fetchRemoteQuotaProvider, QUOTA_PROVIDER_CONCURRENCY, resolveQuotaProviderApiKey, } from "../lib/quota-providers-remote.js";
|
|
5
|
-
import { fetchQuotaProviderResult } from "../lib/quota-state.js";
|
|
5
|
+
import { fetchQuotaProviderResult, QUOTA_FORCE_REFRESH } from "../lib/quota-state.js";
|
|
6
6
|
import { resolveQuotaProviderDefinitionAuthIdentity } from "./cache-policies.js";
|
|
7
7
|
export const QUOTA_PROVIDERS_PROVIDER_ID = QUOTA_PROVIDERS_AGGREGATE_ID;
|
|
8
8
|
export const selectEligibleQuotaProviders = selectEligibleQuotaProviderDefinitions;
|
|
@@ -19,6 +19,12 @@ function matchesConfiguredCurrentSelection(model, context) {
|
|
|
19
19
|
async function getAvailableProviderIds(ctx) {
|
|
20
20
|
return ctx.resolveRuntimeProviderIds();
|
|
21
21
|
}
|
|
22
|
+
function configuredDefinitions(ctx) {
|
|
23
|
+
return ctx.config.quotaProviders ?? [];
|
|
24
|
+
}
|
|
25
|
+
function selectedDefinitionsStillCurrent(selected, current) {
|
|
26
|
+
return selected.filter((definition) => current.some((candidate) => candidate.id === definition.id));
|
|
27
|
+
}
|
|
22
28
|
function buildDiagnosticIdentity(definition) {
|
|
23
29
|
return {
|
|
24
30
|
sourceId: definition.id,
|
|
@@ -67,7 +73,13 @@ async function executeRemote(definition, requestTimeoutMs) {
|
|
|
67
73
|
if (!auth.key) {
|
|
68
74
|
return {
|
|
69
75
|
entries: [],
|
|
70
|
-
errors: [
|
|
76
|
+
errors: [
|
|
77
|
+
{
|
|
78
|
+
label: definition.label,
|
|
79
|
+
message: "API key not configured",
|
|
80
|
+
failureCategory: "credentials",
|
|
81
|
+
},
|
|
82
|
+
],
|
|
71
83
|
diagnostic: {
|
|
72
84
|
...buildDiagnosticIdentity(definition),
|
|
73
85
|
attempted: false,
|
|
@@ -83,7 +95,16 @@ async function executeRemote(definition, requestTimeoutMs) {
|
|
|
83
95
|
if (!result.success) {
|
|
84
96
|
return {
|
|
85
97
|
entries: [],
|
|
86
|
-
errors: [
|
|
98
|
+
errors: [
|
|
99
|
+
{
|
|
100
|
+
label: definition.label,
|
|
101
|
+
message: result.error,
|
|
102
|
+
...(result.retryAtMs !== undefined ? { retryAtMs: result.retryAtMs } : {}),
|
|
103
|
+
...(result.failureCategory !== undefined
|
|
104
|
+
? { failureCategory: result.failureCategory }
|
|
105
|
+
: {}),
|
|
106
|
+
},
|
|
107
|
+
],
|
|
87
108
|
diagnostic: {
|
|
88
109
|
...buildDiagnosticIdentity(definition),
|
|
89
110
|
attempted: true,
|
|
@@ -121,7 +142,7 @@ async function executeRemoteWithCache(definition, ctx) {
|
|
|
121
142
|
isAvailable: async () => true,
|
|
122
143
|
cachePolicy: {
|
|
123
144
|
kind: "resolved-auth",
|
|
124
|
-
resolveIdentity: () => resolveQuotaProviderDefinitionAuthIdentity(definition),
|
|
145
|
+
resolveIdentity: (_cacheCtx) => resolveQuotaProviderDefinitionAuthIdentity(definition),
|
|
125
146
|
},
|
|
126
147
|
fetch: async () => {
|
|
127
148
|
const result = await executeRemote(definition, ctx.config.requestTimeoutMs);
|
|
@@ -143,6 +164,7 @@ async function executeRemoteWithCache(definition, ctx) {
|
|
|
143
164
|
},
|
|
144
165
|
},
|
|
145
166
|
ttlMs: ctx.config.providerCacheTtlMs ?? 0,
|
|
167
|
+
forceRefresh: ctx.operationCache?.get(QUOTA_FORCE_REFRESH) === true,
|
|
146
168
|
});
|
|
147
169
|
return {
|
|
148
170
|
entries: result.entries,
|
|
@@ -187,7 +209,13 @@ async function executeDefinition(definition, ctx) {
|
|
|
187
209
|
const state = await inspectLocalQuotaProviderState(definition);
|
|
188
210
|
return {
|
|
189
211
|
entries: [],
|
|
190
|
-
errors: [
|
|
212
|
+
errors: [
|
|
213
|
+
{
|
|
214
|
+
label: definition.label,
|
|
215
|
+
message: "Failed to update local accounting state",
|
|
216
|
+
failureCategory: "local",
|
|
217
|
+
},
|
|
218
|
+
],
|
|
191
219
|
diagnostic: {
|
|
192
220
|
...buildDiagnosticIdentity(definition),
|
|
193
221
|
attempted: true,
|
|
@@ -207,7 +235,7 @@ async function executeDefinition(definition, ctx) {
|
|
|
207
235
|
export const quotaProvidersProvider = {
|
|
208
236
|
id: QUOTA_PROVIDERS_PROVIDER_ID,
|
|
209
237
|
async isAvailable(ctx) {
|
|
210
|
-
const definitions = ctx
|
|
238
|
+
const definitions = configuredDefinitions(ctx);
|
|
211
239
|
if (customQuotaProviderDefinitions(definitions).length === 0)
|
|
212
240
|
return false;
|
|
213
241
|
const availableProviderIds = await getAvailableProviderIds(ctx);
|
|
@@ -223,12 +251,15 @@ export const quotaProvidersProvider = {
|
|
|
223
251
|
return matchesConfiguredCurrentSelection(model, context);
|
|
224
252
|
},
|
|
225
253
|
async fetch(ctx, cacheContext) {
|
|
226
|
-
const definitions = ctx
|
|
254
|
+
const definitions = configuredDefinitions(ctx);
|
|
227
255
|
if (customQuotaProviderDefinitions(definitions).length === 0) {
|
|
228
256
|
return { attempted: false, entries: [], errors: [] };
|
|
229
257
|
}
|
|
230
258
|
let selected = cacheContext?.runtimeEligibleQuotaProviders;
|
|
231
|
-
if (
|
|
259
|
+
if (selected) {
|
|
260
|
+
selected = selectedDefinitionsStillCurrent(selected, definitions);
|
|
261
|
+
}
|
|
262
|
+
else {
|
|
232
263
|
let availableProviderIds;
|
|
233
264
|
try {
|
|
234
265
|
availableProviderIds = await getAvailableProviderIds(ctx);
|
|
@@ -241,6 +272,7 @@ export const quotaProvidersProvider = {
|
|
|
241
272
|
{
|
|
242
273
|
label: "Quota providers",
|
|
243
274
|
message: "Failed to read exact runtime provider identities",
|
|
275
|
+
failureCategory: "local",
|
|
244
276
|
},
|
|
245
277
|
],
|
|
246
278
|
};
|
|
@@ -263,7 +295,12 @@ export const quotaProvidersProvider = {
|
|
|
263
295
|
catch {
|
|
264
296
|
return {
|
|
265
297
|
entries: [],
|
|
266
|
-
errors: [
|
|
298
|
+
errors: [
|
|
299
|
+
{
|
|
300
|
+
label: definition.label,
|
|
301
|
+
message: "Provider execution failed",
|
|
302
|
+
},
|
|
303
|
+
],
|
|
267
304
|
diagnostic: {
|
|
268
305
|
...buildDiagnosticIdentity(definition),
|
|
269
306
|
attempted: true,
|
|
@@ -10,6 +10,7 @@ import { alibabaTokenPlanProvider } from "./alibaba-token-plan.js";
|
|
|
10
10
|
import { anthropicProvider } from "./anthropic.js";
|
|
11
11
|
import { PROVIDER_CACHE_POLICIES } from "./cache-policies.js";
|
|
12
12
|
import { chutesProvider } from "./chutes.js";
|
|
13
|
+
import { claudeAgentProvider } from "./claude-agent.js";
|
|
13
14
|
import { copilotProvider } from "./copilot.js";
|
|
14
15
|
import { cursorProvider } from "./cursor.js";
|
|
15
16
|
import { deepseekProvider } from "./deepseek.js";
|
|
@@ -32,6 +33,7 @@ import { zaiProvider } from "./zai.js";
|
|
|
32
33
|
import { zhipuProvider } from "./zhipu.js";
|
|
33
34
|
const PROVIDERS_BY_ID = {
|
|
34
35
|
anthropic: anthropicProvider,
|
|
36
|
+
"claude-agent": claudeAgentProvider,
|
|
35
37
|
copilot: copilotProvider,
|
|
36
38
|
openai: openaiProvider,
|
|
37
39
|
openrouter: openRouterProvider,
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import type { ProviderFailureCategory } from "../contracts/provider-failure.js";
|
|
1
2
|
import type { AccountingMetadata, FixedWindowProjectionEvidence, QuotaProviderPresentation, QuotaProviderResult, QuotaProviderStatusDetail, QuotaToastEntry, QuotaToastError } from "../lib/entries.js";
|
|
2
3
|
export declare function notAttemptedResult(): QuotaProviderResult;
|
|
3
4
|
export declare function attemptedResult(entries: QuotaToastEntry[], errors?: QuotaToastError[], presentation?: QuotaProviderPresentation): QuotaProviderResult;
|
|
4
5
|
export declare function attemptedErrorResult(label: string, message: string, options?: {
|
|
5
6
|
retryable?: boolean;
|
|
7
|
+
failureCategory?: ProviderFailureCategory;
|
|
8
|
+
retryAtMs?: number;
|
|
6
9
|
}): QuotaProviderResult;
|
|
7
10
|
export declare function statusDetailsFromRecord(values: Readonly<Record<string, string | undefined>>): QuotaProviderStatusDetail[];
|
|
8
11
|
export declare function configStatusDetails(diagnostics: {
|
|
@@ -38,8 +41,11 @@ export declare function mapNullableProviderResult<TResult extends {
|
|
|
38
41
|
success: false;
|
|
39
42
|
error: string;
|
|
40
43
|
retryable?: boolean;
|
|
44
|
+
retryAtMs?: number;
|
|
45
|
+
failureCategory?: ProviderFailureCategory;
|
|
41
46
|
} | null>(result: TResult, params: {
|
|
42
47
|
errorLabel: string;
|
|
48
|
+
failureCategory?: ProviderFailureCategory;
|
|
43
49
|
onSuccess: (result: Extract<TResult, {
|
|
44
50
|
success: true;
|
|
45
51
|
}>) => QuotaProviderResult;
|
|
@@ -12,7 +12,17 @@ export function attemptedResult(entries, errors = [], presentation) {
|
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
14
|
export function attemptedErrorResult(label, message, options = {}) {
|
|
15
|
-
return attemptedResult([], [
|
|
15
|
+
return attemptedResult([], [
|
|
16
|
+
{
|
|
17
|
+
label,
|
|
18
|
+
message,
|
|
19
|
+
...(options.retryable === true ? { retryable: true } : {}),
|
|
20
|
+
...(options.retryAtMs !== undefined ? { retryAtMs: options.retryAtMs } : {}),
|
|
21
|
+
...(options.failureCategory !== undefined
|
|
22
|
+
? { failureCategory: options.failureCategory }
|
|
23
|
+
: {}),
|
|
24
|
+
},
|
|
25
|
+
]);
|
|
16
26
|
}
|
|
17
27
|
export function statusDetailsFromRecord(values) {
|
|
18
28
|
return Object.entries(values).flatMap(([key, value]) => value === undefined ? [] : [{ key, value }]);
|
|
@@ -86,7 +96,13 @@ export function mapNullableProviderResult(result, params) {
|
|
|
86
96
|
return notAttemptedResult();
|
|
87
97
|
}
|
|
88
98
|
if (!result.success) {
|
|
89
|
-
return attemptedErrorResult(params.errorLabel, result.error, {
|
|
99
|
+
return attemptedErrorResult(params.errorLabel, result.error, {
|
|
100
|
+
...(result.retryable === true ? { retryable: true } : {}),
|
|
101
|
+
...(result.retryAtMs !== undefined ? { retryAtMs: result.retryAtMs } : {}),
|
|
102
|
+
...((result.failureCategory ?? params.failureCategory) !== undefined
|
|
103
|
+
? { failureCategory: result.failureCategory ?? params.failureCategory }
|
|
104
|
+
: {}),
|
|
105
|
+
});
|
|
90
106
|
}
|
|
91
107
|
return params.onSuccess(result);
|
|
92
108
|
}
|
package/dist/rpc.d.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The plugin RPC
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* The plugin RPC definitions. `QuotaRpc` is a legacy terminal-client contract
|
|
3
|
+
* retained for compatibility, but is not registered by the GUI-only server
|
|
4
|
+
* plugin. `DashboardRpc` is the typed dashboard contract the
|
|
5
|
+
* server plugin registers for native clients. Imports from `@opencode/*` stay
|
|
6
|
+
* type-only, so loading this file loads no OpenCode package.
|
|
5
7
|
*/
|
|
6
|
-
import type { Rpc } from "@opencode/plugin";
|
|
8
|
+
import type { Rpc } from "@opencode/plugin/rpc";
|
|
9
|
+
import { type AnalyticsGroupQuery, type DashboardEventTopic, type DashboardHealth, type JsonValue } from "./contracts/dashboard.js";
|
|
10
|
+
import { type RangeKey } from "./contracts/ranges.js";
|
|
7
11
|
import { type QuotaDialogCommandId, type QuotaDialogCommandOutputResult } from "./lib/quota-dialog-command-specs.js";
|
|
8
12
|
export declare const QUOTA_RPC_ID = "opencode-quota-gui";
|
|
9
13
|
export type QuotaRpcSurfaceInput = {
|
|
@@ -46,6 +50,23 @@ type QuotaRpcSchema<T> = StandardValueSchema & {
|
|
|
46
50
|
};
|
|
47
51
|
};
|
|
48
52
|
};
|
|
53
|
+
type ObjectEventSchema<T extends Record<string, unknown>> = {
|
|
54
|
+
"~standard": {
|
|
55
|
+
version: 1;
|
|
56
|
+
vendor: string;
|
|
57
|
+
validate: (value: unknown) => {
|
|
58
|
+
value: T;
|
|
59
|
+
} | {
|
|
60
|
+
issues: ReadonlyArray<{
|
|
61
|
+
message: string;
|
|
62
|
+
}>;
|
|
63
|
+
};
|
|
64
|
+
types?: {
|
|
65
|
+
input: T;
|
|
66
|
+
output: T;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
};
|
|
49
70
|
export declare const QuotaRpc: {
|
|
50
71
|
id: string;
|
|
51
72
|
events: {};
|
|
@@ -68,5 +89,420 @@ export declare const QuotaRpc: {
|
|
|
68
89
|
};
|
|
69
90
|
};
|
|
70
91
|
};
|
|
92
|
+
export declare const DASHBOARD_RPC_ID = "opencode-quota-gui.dashboard";
|
|
93
|
+
export type DashboardRpcViewScope = "quota" | "analytics";
|
|
94
|
+
export type DashboardRpcNoInput = Record<string, never>;
|
|
95
|
+
export type DashboardRpcSaveSettingsInput = {
|
|
96
|
+
patch: Record<string, JsonValue>;
|
|
97
|
+
expectedRevision: string;
|
|
98
|
+
};
|
|
99
|
+
export type DashboardRpcSaveVisibilityInput = {
|
|
100
|
+
hiddenCards: string[];
|
|
101
|
+
hiddenRows: string[];
|
|
102
|
+
expectedRevision: string;
|
|
103
|
+
};
|
|
104
|
+
export type DashboardRpcImportApplyInput = {
|
|
105
|
+
expectedRevision: string;
|
|
106
|
+
};
|
|
107
|
+
export type DashboardRpcWatchInput = {
|
|
108
|
+
scope: DashboardRpcViewScope;
|
|
109
|
+
/** Optional for older callers; Native uses it to correlate the source cutover snapshot. */
|
|
110
|
+
attemptNonce?: string;
|
|
111
|
+
};
|
|
112
|
+
export type DashboardRpcWatchOutput = {
|
|
113
|
+
active: boolean;
|
|
114
|
+
};
|
|
115
|
+
export type DashboardRpcOpenSettingsOutput = {
|
|
116
|
+
opened: true;
|
|
117
|
+
};
|
|
118
|
+
export type DashboardRpcCacheObserverEvent = {
|
|
119
|
+
type: "session.step.started";
|
|
120
|
+
created: number;
|
|
121
|
+
data: {
|
|
122
|
+
sessionID: string;
|
|
123
|
+
assistantMessageID: string;
|
|
124
|
+
/** OpenCode's selected model identity, not the resolved HTTP request route. */
|
|
125
|
+
model: {
|
|
126
|
+
providerID: string;
|
|
127
|
+
id: string;
|
|
128
|
+
variant?: string;
|
|
129
|
+
};
|
|
130
|
+
/** Captured before `llm.stream`; event.created is emitted at first output instead. */
|
|
131
|
+
started?: number;
|
|
132
|
+
connectionMethod?: "oauth" | "key" | "external";
|
|
133
|
+
};
|
|
134
|
+
} | {
|
|
135
|
+
type: "session.step.ended";
|
|
136
|
+
created: number;
|
|
137
|
+
data: {
|
|
138
|
+
sessionID: string;
|
|
139
|
+
assistantMessageID: string;
|
|
140
|
+
tokens: {
|
|
141
|
+
input?: number;
|
|
142
|
+
cache?: {
|
|
143
|
+
read?: number;
|
|
144
|
+
write?: number;
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
} | {
|
|
149
|
+
/**
|
|
150
|
+
* One completed Claude Agent invocation whose cache writes were observed as 1-hour-only.
|
|
151
|
+
* Carries no transcript content, path or native id.
|
|
152
|
+
*/
|
|
153
|
+
type: "session.cache.ttl";
|
|
154
|
+
created: number;
|
|
155
|
+
data: {
|
|
156
|
+
sessionID: string;
|
|
157
|
+
assistantMessageID: string;
|
|
158
|
+
ttlMs: 3_600_000;
|
|
159
|
+
};
|
|
160
|
+
} | {
|
|
161
|
+
type: "session.created";
|
|
162
|
+
data: {
|
|
163
|
+
sessionID: string;
|
|
164
|
+
parentID: string;
|
|
165
|
+
};
|
|
166
|
+
} | {
|
|
167
|
+
type: "session.forked";
|
|
168
|
+
data: {
|
|
169
|
+
sessionID: string;
|
|
170
|
+
parentID?: string;
|
|
171
|
+
};
|
|
172
|
+
} | {
|
|
173
|
+
type: "session.compaction.ended" | "session.deleted";
|
|
174
|
+
data: {
|
|
175
|
+
sessionID: string;
|
|
176
|
+
};
|
|
177
|
+
} | {
|
|
178
|
+
/**
|
|
179
|
+
* Authoritative session execution state, projected from the host's own
|
|
180
|
+
* `session.status`, `session.idle` and `session.execution.*` events.
|
|
181
|
+
* Carries no message, error or credential content.
|
|
182
|
+
*/
|
|
183
|
+
type: "session.status";
|
|
184
|
+
created: number;
|
|
185
|
+
data: {
|
|
186
|
+
sessionID: string;
|
|
187
|
+
state: "busy" | "idle";
|
|
188
|
+
};
|
|
189
|
+
} | {
|
|
190
|
+
/**
|
|
191
|
+
* Narrow session-identity update, projected from the host's own
|
|
192
|
+
* `session.renamed`, `session.agent.selected` and `session.model.selected`
|
|
193
|
+
* events. Only display-identity fields are carried, and only those the
|
|
194
|
+
* source event contains; `created` is the host timestamp that dates the
|
|
195
|
+
* change for recency ordering.
|
|
196
|
+
*/
|
|
197
|
+
type: "session.metadata";
|
|
198
|
+
created: number;
|
|
199
|
+
data: {
|
|
200
|
+
sessionID: string;
|
|
201
|
+
title?: string;
|
|
202
|
+
agent?: string;
|
|
203
|
+
model?: {
|
|
204
|
+
providerID: string;
|
|
205
|
+
id: string;
|
|
206
|
+
variant?: string;
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
} | {
|
|
210
|
+
type: "source.status";
|
|
211
|
+
created: number;
|
|
212
|
+
data: {
|
|
213
|
+
state: "unverified" | "observed" | "unavailable" | "stopped";
|
|
214
|
+
/** Present only on a source snapshot requested by an active watch attempt. */
|
|
215
|
+
attemptNonce?: string;
|
|
216
|
+
/** Opaque identity of the setup-owned host-event source that emitted this state. */
|
|
217
|
+
sourceBinding?: string;
|
|
218
|
+
};
|
|
219
|
+
};
|
|
220
|
+
export type DashboardRpcEventData = {
|
|
221
|
+
topic: DashboardEventTopic | "cache.observer";
|
|
222
|
+
at: number;
|
|
223
|
+
scope?: "visibility";
|
|
224
|
+
cacheObserverEvent?: DashboardRpcCacheObserverEvent;
|
|
225
|
+
};
|
|
226
|
+
export type DashboardRpcQuotaNotificationKind = "low" | "exhausted" | "reset" | "provider-error";
|
|
227
|
+
/**
|
|
228
|
+
* Safe quota notification payload. The host writes the wording; no raw provider
|
|
229
|
+
* message, label, path or credential is ever carried.
|
|
230
|
+
*/
|
|
231
|
+
export type DashboardRpcQuotaNotificationData = {
|
|
232
|
+
id: string;
|
|
233
|
+
kind: DashboardRpcQuotaNotificationKind;
|
|
234
|
+
title: string;
|
|
235
|
+
description?: string;
|
|
236
|
+
};
|
|
237
|
+
export type DashboardRpcErrorDetails = {
|
|
238
|
+
key?: string;
|
|
239
|
+
reason?: string;
|
|
240
|
+
};
|
|
241
|
+
/**
|
|
242
|
+
* One explicit error vocabulary for every dashboard method. Any raw failure is
|
|
243
|
+
* mapped to one of these codes by the server handler; messages are fixed
|
|
244
|
+
* generics and details only carry an allowlisted setting key/reason.
|
|
245
|
+
*/
|
|
246
|
+
declare const DASHBOARD_RPC_ERRORS: {
|
|
247
|
+
readonly "bad-request": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
248
|
+
readonly "config-read-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
249
|
+
readonly "config-changed": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
250
|
+
readonly "config-target-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
251
|
+
readonly "config-write-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
252
|
+
readonly "unknown-setting": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
253
|
+
readonly "invalid-setting": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
254
|
+
readonly "project-not-found": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
255
|
+
readonly "session-not-found": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
256
|
+
readonly internal: QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
257
|
+
};
|
|
258
|
+
export type DashboardRpcErrorCode = keyof typeof DASHBOARD_RPC_ERRORS;
|
|
259
|
+
export type DashboardRpcMethod = (typeof DashboardRpc.methods)[keyof typeof DashboardRpc.methods];
|
|
260
|
+
/**
|
|
261
|
+
* The explicit typed dashboard RPC. Methods map to a dashboard data-source or
|
|
262
|
+
* user settings-store operation (plus `watch`); there is no generic dispatch.
|
|
263
|
+
*/
|
|
264
|
+
export declare const DashboardRpc: {
|
|
265
|
+
id: string;
|
|
266
|
+
events: {
|
|
267
|
+
invalidated: {
|
|
268
|
+
schema: ObjectEventSchema<DashboardRpcEventData>;
|
|
269
|
+
};
|
|
270
|
+
quotaNotification: {
|
|
271
|
+
schema: ObjectEventSchema<DashboardRpcQuotaNotificationData>;
|
|
272
|
+
};
|
|
273
|
+
};
|
|
274
|
+
methods: {
|
|
275
|
+
health: {
|
|
276
|
+
input: QuotaRpcSchema<DashboardRpcNoInput>;
|
|
277
|
+
output: QuotaRpcSchema<DashboardHealth>;
|
|
278
|
+
errors: {
|
|
279
|
+
readonly "bad-request": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
280
|
+
readonly "config-read-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
281
|
+
readonly "config-changed": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
282
|
+
readonly "config-target-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
283
|
+
readonly "config-write-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
284
|
+
readonly "unknown-setting": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
285
|
+
readonly "invalid-setting": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
286
|
+
readonly "project-not-found": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
287
|
+
readonly "session-not-found": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
288
|
+
readonly internal: QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
289
|
+
};
|
|
290
|
+
};
|
|
291
|
+
quota: {
|
|
292
|
+
input: QuotaRpcSchema<{
|
|
293
|
+
refresh?: boolean;
|
|
294
|
+
}>;
|
|
295
|
+
output: QuotaRpcSchema<import("./contracts/dashboard.js").QuotaSnapshot>;
|
|
296
|
+
errors: {
|
|
297
|
+
readonly "bad-request": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
298
|
+
readonly "config-read-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
299
|
+
readonly "config-changed": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
300
|
+
readonly "config-target-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
301
|
+
readonly "config-write-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
302
|
+
readonly "unknown-setting": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
303
|
+
readonly "invalid-setting": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
304
|
+
readonly "project-not-found": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
305
|
+
readonly "session-not-found": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
306
|
+
readonly internal: QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
307
|
+
};
|
|
308
|
+
};
|
|
309
|
+
home: {
|
|
310
|
+
input: QuotaRpcSchema<{
|
|
311
|
+
range: RangeKey;
|
|
312
|
+
}>;
|
|
313
|
+
output: QuotaRpcSchema<import("./contracts/dashboard.js").HomeSnapshot>;
|
|
314
|
+
errors: {
|
|
315
|
+
readonly "bad-request": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
316
|
+
readonly "config-read-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
317
|
+
readonly "config-changed": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
318
|
+
readonly "config-target-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
319
|
+
readonly "config-write-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
320
|
+
readonly "unknown-setting": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
321
|
+
readonly "invalid-setting": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
322
|
+
readonly "project-not-found": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
323
|
+
readonly "session-not-found": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
324
|
+
readonly internal: QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
325
|
+
};
|
|
326
|
+
};
|
|
327
|
+
groups: {
|
|
328
|
+
input: QuotaRpcSchema<AnalyticsGroupQuery>;
|
|
329
|
+
output: QuotaRpcSchema<import("./contracts/dashboard.js").AnalyticsGroupSnapshot>;
|
|
330
|
+
errors: {
|
|
331
|
+
readonly "bad-request": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
332
|
+
readonly "config-read-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
333
|
+
readonly "config-changed": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
334
|
+
readonly "config-target-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
335
|
+
readonly "config-write-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
336
|
+
readonly "unknown-setting": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
337
|
+
readonly "invalid-setting": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
338
|
+
readonly "project-not-found": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
339
|
+
readonly "session-not-found": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
340
|
+
readonly internal: QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
341
|
+
};
|
|
342
|
+
};
|
|
343
|
+
project: {
|
|
344
|
+
input: QuotaRpcSchema<{
|
|
345
|
+
projectId: string;
|
|
346
|
+
range: RangeKey;
|
|
347
|
+
}>;
|
|
348
|
+
output: QuotaRpcSchema<import("./contracts/dashboard.js").ProjectSnapshot>;
|
|
349
|
+
errors: {
|
|
350
|
+
readonly "bad-request": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
351
|
+
readonly "config-read-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
352
|
+
readonly "config-changed": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
353
|
+
readonly "config-target-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
354
|
+
readonly "config-write-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
355
|
+
readonly "unknown-setting": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
356
|
+
readonly "invalid-setting": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
357
|
+
readonly "project-not-found": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
358
|
+
readonly "session-not-found": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
359
|
+
readonly internal: QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
360
|
+
};
|
|
361
|
+
};
|
|
362
|
+
session: {
|
|
363
|
+
input: QuotaRpcSchema<{
|
|
364
|
+
sessionId: string;
|
|
365
|
+
}>;
|
|
366
|
+
output: QuotaRpcSchema<import("./contracts/dashboard.js").SessionSnapshot>;
|
|
367
|
+
errors: {
|
|
368
|
+
readonly "bad-request": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
369
|
+
readonly "config-read-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
370
|
+
readonly "config-changed": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
371
|
+
readonly "config-target-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
372
|
+
readonly "config-write-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
373
|
+
readonly "unknown-setting": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
374
|
+
readonly "invalid-setting": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
375
|
+
readonly "project-not-found": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
376
|
+
readonly "session-not-found": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
377
|
+
readonly internal: QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
378
|
+
};
|
|
379
|
+
};
|
|
380
|
+
settings: {
|
|
381
|
+
input: QuotaRpcSchema<DashboardRpcNoInput>;
|
|
382
|
+
output: QuotaRpcSchema<import("./contracts/dashboard.js").SettingsSnapshot>;
|
|
383
|
+
errors: {
|
|
384
|
+
readonly "bad-request": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
385
|
+
readonly "config-read-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
386
|
+
readonly "config-changed": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
387
|
+
readonly "config-target-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
388
|
+
readonly "config-write-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
389
|
+
readonly "unknown-setting": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
390
|
+
readonly "invalid-setting": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
391
|
+
readonly "project-not-found": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
392
|
+
readonly "session-not-found": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
393
|
+
readonly internal: QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
394
|
+
};
|
|
395
|
+
};
|
|
396
|
+
saveSettings: {
|
|
397
|
+
input: QuotaRpcSchema<DashboardRpcSaveSettingsInput>;
|
|
398
|
+
output: QuotaRpcSchema<import("./contracts/dashboard.js").SettingsWriteResult>;
|
|
399
|
+
errors: {
|
|
400
|
+
readonly "bad-request": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
401
|
+
readonly "config-read-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
402
|
+
readonly "config-changed": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
403
|
+
readonly "config-target-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
404
|
+
readonly "config-write-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
405
|
+
readonly "unknown-setting": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
406
|
+
readonly "invalid-setting": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
407
|
+
readonly "project-not-found": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
408
|
+
readonly "session-not-found": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
409
|
+
readonly internal: QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
410
|
+
};
|
|
411
|
+
};
|
|
412
|
+
saveVisibility: {
|
|
413
|
+
input: QuotaRpcSchema<DashboardRpcSaveVisibilityInput>;
|
|
414
|
+
output: QuotaRpcSchema<import("./contracts/dashboard.js").SettingsWriteResult>;
|
|
415
|
+
errors: {
|
|
416
|
+
readonly "bad-request": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
417
|
+
readonly "config-read-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
418
|
+
readonly "config-changed": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
419
|
+
readonly "config-target-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
420
|
+
readonly "config-write-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
421
|
+
readonly "unknown-setting": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
422
|
+
readonly "invalid-setting": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
423
|
+
readonly "project-not-found": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
424
|
+
readonly "session-not-found": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
425
|
+
readonly internal: QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
426
|
+
};
|
|
427
|
+
};
|
|
428
|
+
importPreview: {
|
|
429
|
+
input: QuotaRpcSchema<DashboardRpcNoInput>;
|
|
430
|
+
output: QuotaRpcSchema<import("./contracts/dashboard.js").ImportPreview>;
|
|
431
|
+
errors: {
|
|
432
|
+
readonly "bad-request": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
433
|
+
readonly "config-read-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
434
|
+
readonly "config-changed": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
435
|
+
readonly "config-target-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
436
|
+
readonly "config-write-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
437
|
+
readonly "unknown-setting": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
438
|
+
readonly "invalid-setting": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
439
|
+
readonly "project-not-found": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
440
|
+
readonly "session-not-found": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
441
|
+
readonly internal: QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
442
|
+
};
|
|
443
|
+
};
|
|
444
|
+
importApply: {
|
|
445
|
+
input: QuotaRpcSchema<DashboardRpcImportApplyInput>;
|
|
446
|
+
output: QuotaRpcSchema<import("./contracts/dashboard.js").SettingsWriteResult>;
|
|
447
|
+
errors: {
|
|
448
|
+
readonly "bad-request": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
449
|
+
readonly "config-read-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
450
|
+
readonly "config-changed": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
451
|
+
readonly "config-target-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
452
|
+
readonly "config-write-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
453
|
+
readonly "unknown-setting": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
454
|
+
readonly "invalid-setting": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
455
|
+
readonly "project-not-found": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
456
|
+
readonly "session-not-found": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
457
|
+
readonly internal: QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
458
|
+
};
|
|
459
|
+
};
|
|
460
|
+
openSettingsFile: {
|
|
461
|
+
input: QuotaRpcSchema<DashboardRpcNoInput>;
|
|
462
|
+
output: QuotaRpcSchema<DashboardRpcOpenSettingsOutput>;
|
|
463
|
+
errors: {
|
|
464
|
+
readonly "bad-request": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
465
|
+
readonly "config-read-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
466
|
+
readonly "config-changed": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
467
|
+
readonly "config-target-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
468
|
+
readonly "config-write-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
469
|
+
readonly "unknown-setting": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
470
|
+
readonly "invalid-setting": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
471
|
+
readonly "project-not-found": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
472
|
+
readonly "session-not-found": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
473
|
+
readonly internal: QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
474
|
+
};
|
|
475
|
+
};
|
|
476
|
+
watch: {
|
|
477
|
+
input: QuotaRpcSchema<DashboardRpcWatchInput>;
|
|
478
|
+
output: QuotaRpcSchema<DashboardRpcWatchOutput>;
|
|
479
|
+
errors: {
|
|
480
|
+
readonly "bad-request": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
481
|
+
readonly "config-read-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
482
|
+
readonly "config-changed": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
483
|
+
readonly "config-target-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
484
|
+
readonly "config-write-error": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
485
|
+
readonly "unknown-setting": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
486
|
+
readonly "invalid-setting": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
487
|
+
readonly "project-not-found": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
488
|
+
readonly "session-not-found": QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
489
|
+
readonly internal: QuotaRpcSchema<DashboardRpcErrorDetails>;
|
|
490
|
+
};
|
|
491
|
+
};
|
|
492
|
+
};
|
|
493
|
+
};
|
|
494
|
+
export declare const DASHBOARD_HEALTH: DashboardHealth;
|
|
495
|
+
/**
|
|
496
|
+
* Runtime guard for the event seam. It mirrors the RPC schema so a malformed or
|
|
497
|
+
* unsafe payload is dropped before it can reach a window's presenter.
|
|
498
|
+
*/
|
|
499
|
+
export declare function isDashboardRpcQuotaNotificationData(value: unknown): value is DashboardRpcQuotaNotificationData;
|
|
500
|
+
/** Strict runtime validation for the narrow, content-free cache observer event DTO. */
|
|
501
|
+
export declare function isDashboardRpcCacheObserverEvent(value: unknown): value is DashboardRpcCacheObserverEvent;
|
|
502
|
+
/** Strict guard for cache observer DTOs wrapped in the existing invalidation event envelope. */
|
|
503
|
+
export declare function isDashboardRpcCacheObserverEventData(value: unknown): value is DashboardRpcEventData & {
|
|
504
|
+
topic: "cache.observer";
|
|
505
|
+
cacheObserverEvent: DashboardRpcCacheObserverEvent;
|
|
506
|
+
};
|
|
71
507
|
export {};
|
|
72
508
|
//# sourceMappingURL=rpc.d.ts.map
|