Skip to content

feat: add opt-in provider costs beta - #2

Open
phantom5125 wants to merge 13 commits into
mainfrom
feat/provider-costs
Open

feat: add opt-in provider costs beta#2
phantom5125 wants to merge 13 commits into
mainfrom
feat/provider-costs

Conversation

@phantom5125

@phantom5125 phantom5125 commented Aug 29, 2026

Copy link
Copy Markdown
Owner

Summary

  • keep quota as the primary domain while introducing a separately gated Costs beta
  • fetch authoritative OpenRouter and DeepSeek balances without mixing them into coding-plan quota
  • estimate 7-day local API-equivalent costs for Codex, Claude, and Kimi from a reviewed price catalog
  • add localized Costs and menu-bar presentation with explicit Estimated/API-equivalent provenance and freshness
  • enforce streaming, file-size, privacy, memory, runtime, and executable-size boundaries in CI
  • update changelog, security boundaries, contribution rules, release gates, and merge-readiness evidence

Safety and privacy

  • disabled by default and first loaded only from the Costs page
  • credentials remain in Keychain; no monetary snapshots or transcript content are persisted or exported
  • local JSONL scans are read-only, regular-file-only, symlink-safe, and bounded to 50 MiB per file and 1 MiB per record
  • quota refresh, notifications, watch payloads, and quota provider behavior remain independent

Validation

  • rebased onto origin/main at 51b0aec
  • swift build
  • bash scripts/test.sh — 227 tests passed
  • swift format lint --strict Package.swift
  • swift format lint --recursive --strict Sources Tests
  • bash scripts/privacy_scan.sh
  • bash scripts/resource_check.sh — 9.48 s, 84,393,984 B maximum RSS, 5,717,768 B release executable
  • git diff --check

Detailed evidence: docs/validation/2026-08-30-provider-costs-beta.md.

Development disclosure

This change was implemented and reviewed with Codex assistance. The maintainer inspected the resulting diff and ran the validation listed above.

@phantom5125
phantom5125 changed the base branch from codex/watch-face-v2 to main August 29, 2026 21:31
@phantom5125 phantom5125 reopened this Aug 29, 2026
phantom5125 added a commit that referenced this pull request Aug 31, 2026
## Summary

- redesign the C152 first page around the TokenLink quota arc and
time-proportional pace
- add the Mac Cost Center with Today / Week / Month estimates and
calculation provenance
- align Codex API-equivalent costs with request-level community
accounting and reviewed GPT-5.6 prices
- preserve multi-plan Quota and session-focus behavior while improving
the small-size Mac icon
- prepare v0.2.3-rc.1 release notes and an ad-hoc-signed GitHub
prerelease path; stable tags still require Developer ID signing and
notarization

## Validation

- 265 Swift tests
- strict Swift format lint
- privacy scan
- resource gate: 79,200,256-byte max RSS, 9.84 s, 6,688,040-byte release
executable
- C152 PlatformIO build and simulator/native tests
- firmware package checksums
- Universal 2 TokenLink-0.2.3.dmg build, mount, resource, signature, and
architecture verification

## Review focus

Please use the v0.2.3-rc.1 assets for hands-on review before merge. This
PR supersedes the narrower provider-costs PR #2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant