@cortexkit/opencode-openai-auth 1.1.0 → 1.3.0
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/bin.js +8 -8
- package/dist/{codex-request-BXDXToyt.d.ts → codex-request-B9D0e97Q.d.ts} +177 -28
- package/dist/{index-7c6sxtd6.js → index-1mbgsxsr.js} +2 -2
- package/dist/{index-4c8yw54k.js → index-2pgkrebq.js} +2 -2
- package/dist/index-4v2fs42x.js +65 -0
- package/dist/index-8x1aj7q3.js +2 -0
- package/dist/{index-f2fmb596.js → index-bc89akak.js} +1 -1
- package/dist/index-ex6nx3mq.js +2 -0
- package/dist/{index-zpm95mt5.js → index-ftkhhr6d.js} +1 -1
- package/dist/{index-msx2m78k.js → index-gn2b097f.js} +2 -2
- package/dist/{index-j8v2xwq6.js → index-m3ctrabv.js} +1 -1
- package/dist/index-psjyexj3.js +69 -0
- package/dist/{index-k6cydkgt.js → index-tddr876f.js} +2 -2
- package/dist/index-tn8x5tz8.js +90 -0
- package/dist/{index-csky2xpg.js → index-xwvze96g.js} +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.js +1 -1
- package/dist/{model-YRg7Uowo.d.ts → model-BdITTmeb.d.ts} +1 -1
- package/dist/{port-file-CxEpgSHY.d.ts → port-file-DbHIVC9a.d.ts} +1 -1
- package/dist/{protocol-CDV1Pc6h.d.ts → protocol-MysYPAho.d.ts} +1 -1
- package/dist/rpc/port-file.d.ts +1 -1
- package/dist/rpc/port-file.js +1 -1
- package/dist/rpc/protocol.d.ts +1 -1
- package/dist/rpc/protocol.js +1 -1
- package/dist/rpc/rpc-client.d.ts +3 -3
- package/dist/rpc/rpc-client.js +1 -1
- package/dist/rpc/rpc-dir.js +1 -1
- package/dist/{sidebar-state-DjTWUbmf.d.ts → sidebar-state-CVSok7zv.d.ts} +114 -5
- package/dist/sidebar-state.d.ts +2 -2
- package/dist/sidebar-state.js +1 -1
- package/dist/token-util-cf0nyh7n.js +1 -0
- package/dist/{token-rz4t3ay6.js → token-z6qq7a1d.js} +1 -1
- package/dist/tui-preferences.js +1 -1
- package/dist/tui.d.ts +2 -2
- package/dist/v2/server.d.ts +109 -2
- package/dist/v2/server.js +3 -3
- package/package.json +4 -4
- package/src/tui-compiled/raw/shared/0332701351b3eeec-format.js +203 -18
- package/src/tui-compiled/raw/shared/0f77ebc3c914c9c6-custody.js +242 -16
- package/src/tui-compiled/raw/shared/169b2b4bf30909bc-consumer.js +168 -6
- package/src/tui-compiled/raw/shared/375d9cca2def037d-private-files.js +10 -2
- package/src/tui-compiled/raw/shared/94f53cfd572ba4bb-availability.js +106 -0
- package/src/tui-compiled/raw/shared/d0f0b6be200311af-insula.js +286 -21
- package/src/tui-compiled/raw/shared/d5a8f1061ee2f114-index.js +1 -1
- package/src/tui-compiled/raw/shared/dc9290c2a7552ba6-watch.js +253 -0
- package/src/tui-compiled/raw/shared/e8d3c8da776ef9cd-index.js +4 -1
- package/src/tui-compiled/raw/sidebar-state.js +63 -1
- package/src/tui-compiled/raw/tui.tsx +82 -30
- package/src/tui-compiled/runtime/shared/0332701351b3eeec-format.js +203 -18
- package/src/tui-compiled/runtime/shared/0f77ebc3c914c9c6-custody.js +242 -16
- package/src/tui-compiled/runtime/shared/169b2b4bf30909bc-consumer.js +168 -6
- package/src/tui-compiled/runtime/shared/375d9cca2def037d-private-files.js +10 -2
- package/src/tui-compiled/runtime/shared/94f53cfd572ba4bb-availability.js +106 -0
- package/src/tui-compiled/runtime/shared/d0f0b6be200311af-insula.js +286 -21
- package/src/tui-compiled/runtime/shared/d5a8f1061ee2f114-index.js +1 -1
- package/src/tui-compiled/runtime/shared/dc9290c2a7552ba6-watch.js +253 -0
- package/src/tui-compiled/runtime/shared/e8d3c8da776ef9cd-index.js +4 -1
- package/src/tui-compiled/runtime/sidebar-state.js +63 -1
- package/src/tui-compiled/runtime/tui.js +245 -208
- package/dist/index-0yh85bwb.js +0 -69
- package/dist/index-7eb3dw37.js +0 -90
- package/dist/index-8re8rprk.js +0 -2
- package/dist/index-edbdscy7.js +0 -65
- package/dist/index-m5qmvr6c.js +0 -2
- package/dist/map-Buq-GW7l.d.ts +0 -56
- package/dist/token-util-tpy2c7h6.js +0 -1
package/dist/index-m5qmvr6c.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{We as O}from"./index-csky2xpg.js";import{randomUUID as w}from"node:crypto";import{lstat as N,readFile as B,rename as b,unlink as U}from"node:fs/promises";import{dirname as V,resolve as L}from"node:path";var S=process.platform==="win32",W=new Set;function I(j){if(j?.reason==="io-error"){if(j.win32Code===2||j.win32Code===3)return"ENOENT";if(j.win32Code===80||j.win32Code===183)return"EEXIST"}return j?.code??"ERR_PRIVATE_FILE"}var C;function q(){return C??=import("@cortexkit/private-files"),C}class R extends Error{path;stage;code;win32Code;reason;published=!1;durabilityConfirmed=!1;fileDurable=!1;attempts=0;elapsedMs=0;orphanPath;constructor(j,G,A){let z=A;super(`Private file refused at ${G}: ${j} (${z?.reason??z?.code??"io-error"}). Use a safe parent directory. Repair only a named secret file in safe ancestry whose owner the published policy trusts, without changing its owner or any existing directory. Previously exposed credentials may need rotation. Windows requires the private-files native prebuild and an ACL-persisting local filesystem such as NTFS.`,{cause:A});this.path=j,this.stage=G,this.name="PrivateFileError",this.code=I(z),this.win32Code=z?.win32Code,this.reason=z?.reason}}async function x(j,G,A){try{return await A()}catch(z){if(z instanceof R)throw z;throw new R(j,G,z)}}var E;async function _(j,G){j=L(j),G??=E,await x(j,"safe-parent",async()=>{let A=await(await q()).verifySafeParent(j,G);if(A.ok===!1){if(A.reason==="io-error"||A.reason==="wrong-kind")await N(j);throw new R(A.level??A.path,"safe-parent",{...A,code:"ERR_PRIVATE_FILES_SECURITY"})}})}async function T(j,G,A=!1){if(j=L(j),G==="directory")return _(j);await x(j,"verify",async()=>{let z=await q(),K=await z.verifyOwnerOnly(j),H=!1;if(!K.ok){let{reason:M}=K.refusal;if(M==="io-error")await z.verifyPrivatePath(j,G);if(A&&[z.EXTRA_ACE,z.NOT_PROTECTED,z.NULL_DACL,z.EMPTY_DACL].includes(M))await _(V(j)),await z.securePrivatePath(j,G),H=!0;else throw Object.assign(Error("Owner-only verification refused"),{reason:M,code:"ERR_PRIVATE_FILES_SECURITY"})}if(await z.verifyPrivatePath(j,G),H&&!W.has(j))W.add(j),process.emitWarning(`Private permissions tightened: ${j}. This object may have been readable before; rotate credentials if needed.`,"PrivateFileMigration")})}async function D(j,G=!1,A){j=L(j),await x(j,"directory",async()=>{let z=await q();try{return await N(j),await _(j,A)}catch(H){if(I(H)!=="ENOENT")throw H}let K=V(j);if(K===j)throw Object.assign(Error("Missing root"),{code:"ENOENT"});await D(K,!1,A);try{await z.createOwnerOnly(j,{kind:"dir"})}catch(H){if(I(H)!=="EEXIST")throw H}await _(j,A)})}async function m(j,G=!1){if(!S)return B(j,"utf8");return(await k(j,G)).toString("utf8")}async function k(j,G=!1){if(!S)return B(j);if(j=L(j),G)await _(V(j)),await T(j,"file",!0);return x(j,"read",async()=>(await q()).readOwnerOnly(j))}async function F(j,G){await _(V(L(j))),await x(j,"create",async()=>{await(await q()).createPrivateFile(L(j),G)})}async function c(j){await _(V(L(j))),await x(j,"directory-create",async()=>{await(await q()).createOwnerOnly(L(j),{kind:"dir"})})}async function g(j,G,A={}){j=L(j),G=L(G);let z=A.now??(()=>performance.now()),K=z(),H=Math.min(K+500,A.deadline??1/0),M=[0,10,20,40,80,100],Y,$=0;for(let Q of M){if(z()>=H)break;if(Q)await(A.sleep??((X)=>new Promise((Z)=>setTimeout(Z,X))))(Math.min(Q,Math.max(0,H-z())));if(z()>=H)break;if(await A.beforeRename?.(),z()>=H)break;$++;try{return await(A.rename??b)(j,G),{attempts:$,elapsedMs:z()-K}}catch(X){Y??=X;let Z=X;if(!(Z.win32Code!==void 0?Z.win32Code===32||Z.win32Code===33:["EBUSY","EPERM","EACCES"].includes(Z.code??"")&&!Z.reason))break}}let J=new R(G,"rename",Y??Object.assign(Error("Publication deadline expired"),{code:"ETIMEDOUT"}));throw J.attempts=$,J.elapsedMs=z()-K,J}async function v(j,G,A={}){j=L(j),await D(V(j));try{await T(j,"file",!0)}catch(J){if(J.code!=="ENOENT")throw J}let z=L(A.stagePath??`${j}.${w()}.tmp`);if(V(z)!==V(j))throw new R(j,"stage-directory",{code:"EXDEV"});let K=!1,H=!1,M={attempts:0,elapsedMs:0},Y="stage-create",$=(J)=>{try{A.onOutcome?.({path:j,stage:J?.stage??"published",published:H,fileDurable:H,durabilityConfirmed:!1,attempts:J?.attempts??M.attempts,elapsedMs:J?.elapsedMs??M.elapsedMs,...J&&{code:J.code,win32Code:J.win32Code}})}catch{}};try{if(await F(z,G),K=!0,Y="before-rename",M=await g(z,j,A),K=!1,H=!0,Y="published-callback",A.onRenamed?.(),Y="published-verify",await T(j,"file"),A.durable&&A.durability!=="file-only-on-windows")throw new R(j,"directory-sync-unsupported",{code:"ENOTSUP"});$()}catch(J){let Q=J instanceof R?J:new R(j,Y,J);if(Q.published=H,Q.fileDurable=H,H)Object.assign(Q,M);if(K){try{await U(z)}catch{Q.orphanPath=z}K=!1}throw $(Q),Q}finally{if(K)await U(z).catch(()=>{})}}
|
|
2
|
-
export{S as Fe,R as Ge,x as He,_ as Ie,T as Je,D as Ke,m as Le,F as Me,c as Ne,g as Oe,v as Pe};
|
package/dist/map-Buq-GW7l.d.ts
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
//#region ../../node_modules/.bun/@cortexkit+common-auth@0.18.0+0d2d5e37d881ac14/node_modules/@cortexkit/common-auth/dist/quota/map.d.ts
|
|
2
|
-
interface QuotaReadingEntry {
|
|
3
|
-
scope: string;
|
|
4
|
-
label: string;
|
|
5
|
-
kind: 'reading';
|
|
6
|
-
checkedAt: number;
|
|
7
|
-
usedPercent: number;
|
|
8
|
-
/** ISO timestamp at which the window resets, as the provider reported it. */
|
|
9
|
-
resetsAt?: string;
|
|
10
|
-
/** Window length in minutes, when the provider reported one. */
|
|
11
|
-
windowMinutes?: number;
|
|
12
|
-
}
|
|
13
|
-
interface QuotaRetiredEntry {
|
|
14
|
-
scope: string;
|
|
15
|
-
label: string;
|
|
16
|
-
kind: 'retired';
|
|
17
|
-
retiredAt: number;
|
|
18
|
-
}
|
|
19
|
-
interface QuotaAbsentEntry {
|
|
20
|
-
scope: string;
|
|
21
|
-
label: string;
|
|
22
|
-
kind: 'absent';
|
|
23
|
-
checkedAt: number;
|
|
24
|
-
}
|
|
25
|
-
type QuotaEntry = QuotaReadingEntry | QuotaRetiredEntry | QuotaAbsentEntry;
|
|
26
|
-
interface CreditBudgetReading {
|
|
27
|
-
kind: 'reading';
|
|
28
|
-
checkedAt: number;
|
|
29
|
-
/** The provider's own verdict that the budget is spent. */
|
|
30
|
-
reached: boolean;
|
|
31
|
-
remainingPercent?: number;
|
|
32
|
-
usedPercent?: number;
|
|
33
|
-
resetsAt?: string;
|
|
34
|
-
limit?: number;
|
|
35
|
-
used?: number;
|
|
36
|
-
remaining?: number;
|
|
37
|
-
unit?: string;
|
|
38
|
-
}
|
|
39
|
-
interface CreditBudgetCleared {
|
|
40
|
-
kind: 'cleared';
|
|
41
|
-
checkedAt: number;
|
|
42
|
-
}
|
|
43
|
-
type CreditBudgetEntry = CreditBudgetReading | CreditBudgetCleared;
|
|
44
|
-
interface QuotaCounter {
|
|
45
|
-
value: number;
|
|
46
|
-
checkedAt: number;
|
|
47
|
-
}
|
|
48
|
-
interface QuotaMap {
|
|
49
|
-
limits: QuotaEntry[];
|
|
50
|
-
/** Absent means no observation has reported on the budget yet. */
|
|
51
|
-
budget?: CreditBudgetEntry;
|
|
52
|
-
/** Provider-named counts, each with its own observation time. */
|
|
53
|
-
counters?: Record<string, QuotaCounter>;
|
|
54
|
-
}
|
|
55
|
-
//#endregion
|
|
56
|
-
export { QuotaMap as n, QuotaCounter as t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as a}from"./index-zpm95mt5.js";import"./index-csky2xpg.js";export default a();
|