发布

  • fix(cli): make permission allows expire after one hour (#3449)

    frostbyte_neo 发布于 2026-05-19 07:19:31 +00:00

    Summary

    • Rename the permission prompt action from “Allow for session” to “Allow
      for 1 hr” in browser and native UI flows.
    • Cache allow decisions with a 1-hour expiry in
      tool-permissions-cache.json, with an in-memory fast path and
      stale-entry pruning.
    • Preserve existing permission snapshot cache behavior while keeping
      cached allow decisions across CLI invocations until expiry.

    Tests

    • pnpm install --frozen-lockfile --ignore-scripts
    • pnpm build:packages
    • cd ts/packages/cli && pnpm run typecheck

    Notes

    • The decision enum remains allow_session for compatibility with
      existing backend/native callback payloads; only the UX/caching semantics
      now expose and enforce a 1-hour duration.
    下载附件