fix(cli): accept JWT share tokens when importing sessions - #13183
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Incremental review of commits since Files Reviewed (5 files)
Previous Review Summaries (4 snapshots, latest commit beba4a5)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit beba4a5)Status: 2 Issues Found | Recommendation: Address before merge Overview
Incremental review of commits since Issue Details (click to expand)SUGGESTION
Files Reviewed (3 files)
Fix these issues in Kilo Cloud Previous review (commit f23e9f2)Status: No Issues Found | Recommendation: Merge Files Reviewed (1 file)
Previous review (commit 343be14)Status: No Issues Found | Recommendation: Merge Files Reviewed (5 files)
Previous review (commit 43441e7)Status: No Issues Found | Recommendation: Merge Comment: lgtm — the parser change correctly handles JWT share tokens (allowing dots), Files Reviewed (5 files)
Reviewed by kimi-k3 · Input: 57.5K · Output: 5K · Cached: 192.4K Review guidance: REVIEW.md from base branch |
beba4a5 to
f23e9f2
Compare
Cloud share URLs now use purpose-bound JWTs at /s/{token}. The import
parser rejected those tokens because it only allowed [A-Za-z0-9_-], and
share() still expected the old public_id field.
Allow dots in the token so JWT share URLs import, without the URL constructor and bare catch.
f23e9f2 to
c8750fa
Compare
What
Cloud PR Kilo-Org/cloud#5300 replaced
/s/{public_id}with purpose-bound JWT share tokens.kilo import https://app.kilo.ai/s/<token>then failed withInvalid URL format. Expected: https://app.kilo.ai/s/<id>because the parser only allowed[A-Za-z0-9_-].Why
JWTs contain
.. Import needs to accept the new share URL, andshare()needs to readshare_tokenfrom ingest instead ofpublic_id.Changes
/s/<token>path onapp.kilo.aishare_tokenVerification
bun test ./test/cli/import.test.ts ./test/kilocode/session-share.test.tsfrompackages/opencode/bun run typecheckfrompackages/opencode/