@cortexkit/opencode-anthropic-auth 2.4.3 → 2.4.5
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/dist/cache-diagnostics.d.ts +1 -1
- package/dist/cli.js +44 -44
- package/dist/fable-fallback.d.ts +55 -1
- package/dist/index-61bbefpq.js +2 -0
- package/dist/index-j2cv839v.js +2 -0
- package/dist/index-y35yxsnq.js +45 -0
- package/dist/index.js +1 -1
- package/dist/plugin-test-handles.d.ts +2 -0
- package/dist/sidebar-state.js +1 -1
- package/dist/transform.d.ts +9 -0
- package/dist/v2/adapter.d.ts +8 -1
- package/dist/v2/cachekeep-store.d.ts +36 -0
- package/dist/v2/cachekeep.d.ts +4 -0
- package/dist/v2/server.js +11 -11
- package/dist/v2/sidebar.d.ts +1 -1
- package/dist/v2/source.d.ts +9 -2
- package/dist/v2/tui.js +1 -1
- package/package.json +2 -2
- package/src/sidebar-state.ts +2 -2
- package/src/tui-compiled/sidebar-state.ts +2 -2
- package/dist/index-42r4bnpm.js +0 -45
- package/dist/index-hbk67489.js +0 -2
- package/dist/index-t4aky73k.js +0 -2
package/dist/v2/tui.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{u as q}from"../index-
|
|
1
|
+
import{u as q}from"../index-61bbefpq.js";import"../index-j2cv839v.js";import"../index-71temqvq.js";var N="Open this link in your browser and sign in. Then choose Finish OAuth sign-in in the Accounts menu and paste the code Claude shows you.";async function g(D,M={}){let B=D.client.rpc(q),Z=!0,V=!1,Y=new AbortController,$=()=>{let j=D.ui.router.current();return j.type==="session"?j.sessionID:void 0};function C(j){return new Promise((Q)=>{let z="",J=!1,G=D.keymap.mode.push("cortexkit-protected-entry"),X=(H,W=!0)=>{if(J)return;J=!0,D.renderer.keyInput.off("keypress",O),D.renderer.keyInput.off("paste",P),Y.signal.removeEventListener("abort",K),G();let F=H?z:void 0;if(z="",W)D.ui.dialog.clear();Q(F)},K=()=>X(!1),O=(H)=>{if(H.preventDefault(),H.stopPropagation(),H.name==="escape"||H.ctrl&&H.name==="c")return X(!1);if(H.name==="return"||H.name==="enter")return X(!0);if(H.name==="backspace"){z=Array.from(z).slice(0,-1).join("");return}if(!H.ctrl&&!H.meta&&!H.option&&Array.from(H.sequence).every((W)=>W.charCodeAt(0)>=32&&W.charCodeAt(0)!==127))z=(z+H.sequence).slice(0,4096)},P=(H)=>{H.preventDefault(),H.stopPropagation(),z=(z+Array.from(new TextDecoder().decode(H.bytes)).filter((W)=>W.charCodeAt(0)>=32&&W.charCodeAt(0)!==127).join("")).slice(0,4096)};if(D.renderer.keyInput.prependListener("keypress",O),D.renderer.keyInput.prependListener("paste",P),Y.signal.addEventListener("abort",K,{once:!0}),D.ui.dialog.alert({title:j,message:"Type or paste the value. Input is hidden. Enter accepts; Escape cancels."}).then(()=>X(!1,!1),()=>X(!1,!1)),Y.signal.aborted)K()})}async function E(j){let Q={};for(let z of j.knobs){if(!Z)return;if(z.kind==="choice"){let J=await D.ui.dialog.select({title:z.label,options:z.choices.map((G)=>({title:G.label,value:G.value})),current:z.value});if(J===void 0)return;Q[z.id]=J}else if(z.kind==="toggle"){let J=await D.ui.dialog.select({title:z.label,options:[{title:"On",value:!0},{title:"Off",value:!1}],current:z.value});if(J===void 0)return;Q[z.id]=J}else{let J=z.kind==="text"&&z.masked?await C(z.label):await D.ui.dialog.prompt({title:z.label,value:z.value===void 0?void 0:String(z.value),placeholder:z.kind==="text"?z.placeholder:void 0});if(J===void 0)return;Q[z.id]=J===""&&!z.required?null:z.kind==="number"?Number(J):J}}return Q}async function A(j){if(M.showSignInLink)try{await M.showSignInLink(D,j,Y.signal);return}catch{}await D.ui.dialog.alert({title:"Claude sign-in",message:`${N}
|
|
2
2
|
|
|
3
3
|
${j}
|
|
4
4
|
`})}async function T(j,Q){let z=`${Q.title} status`;if(M.showStatus)try{await M.showStatus(D,{title:z,lines:Q.lines,...Q.slot==="quota"&&{readQuota:(J)=>B.sidebar({sessionId:j},{signal:J,location:D.location})}},Y.signal);return}catch{}await D.ui.dialog.alert({title:z,message:Q.lines.join(`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cortexkit/opencode-anthropic-auth",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
},
|
|
78
78
|
"dependencies": {
|
|
79
79
|
"@clack/prompts": "^1.6.0",
|
|
80
|
-
"@cortexkit/anthropic-auth-core": "2.4.
|
|
80
|
+
"@cortexkit/anthropic-auth-core": "2.4.5",
|
|
81
81
|
"@cortexkit/claustrum-client": "0.13.0",
|
|
82
82
|
"@cortexkit/private-files": "0.2.2",
|
|
83
83
|
"@cortexkit/subc-client": "^0.22.10",
|
package/src/sidebar-state.ts
CHANGED
|
@@ -244,7 +244,7 @@ function normalizeQuotaWindow(value: unknown): QuotaWindow | undefined {
|
|
|
244
244
|
return {
|
|
245
245
|
usedPercent,
|
|
246
246
|
remainingPercent,
|
|
247
|
-
|
|
247
|
+
...(typeof value.resetsAt === 'string' && { resetsAt: value.resetsAt }),
|
|
248
248
|
...(isFiniteNumber(value.checkedAt) && { checkedAt: value.checkedAt }),
|
|
249
249
|
}
|
|
250
250
|
}
|
|
@@ -464,7 +464,7 @@ export function normalizeSidebarState(raw: unknown): SidebarState {
|
|
|
464
464
|
typeof raw.fastMode === 'boolean'
|
|
465
465
|
? raw.fastMode
|
|
466
466
|
: DEFAULT_SIDEBAR_STATE.fastMode,
|
|
467
|
-
cacheKeep,
|
|
467
|
+
...(cacheKeep && { cacheKeep }),
|
|
468
468
|
...(prime && { prime }),
|
|
469
469
|
...(fableRecoveries.length > 0 && { fableRecoveries }),
|
|
470
470
|
lastUpdated: isFiniteNumber(raw.lastUpdated) ? raw.lastUpdated : 0,
|
|
@@ -244,7 +244,7 @@ function normalizeQuotaWindow(value: unknown): QuotaWindow | undefined {
|
|
|
244
244
|
return {
|
|
245
245
|
usedPercent,
|
|
246
246
|
remainingPercent,
|
|
247
|
-
|
|
247
|
+
...(typeof value.resetsAt === 'string' && { resetsAt: value.resetsAt }),
|
|
248
248
|
...(isFiniteNumber(value.checkedAt) && { checkedAt: value.checkedAt }),
|
|
249
249
|
}
|
|
250
250
|
}
|
|
@@ -464,7 +464,7 @@ export function normalizeSidebarState(raw: unknown): SidebarState {
|
|
|
464
464
|
typeof raw.fastMode === 'boolean'
|
|
465
465
|
? raw.fastMode
|
|
466
466
|
: DEFAULT_SIDEBAR_STATE.fastMode,
|
|
467
|
-
cacheKeep,
|
|
467
|
+
...(cacheKeep && { cacheKeep }),
|
|
468
468
|
...(prime && { prime }),
|
|
469
469
|
...(fableRecoveries.length > 0 && { fableRecoveries }),
|
|
470
470
|
lastUpdated: isFiniteNumber(raw.lastUpdated) ? raw.lastUpdated : 0,
|