@cortexkit/opencode-openai-auth 1.12.0 → 1.13.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-DFeGDzpN.d.ts → codex-request-Bu2sjxQn.d.ts} +1 -0
- package/dist/{index-dcvxs9xj.js → index-0bh5fs56.js} +1 -1
- package/dist/{index-7p1s64b4.js → index-2ccfywax.js} +1 -1
- package/dist/index-2g95z7kb.js +64 -0
- package/dist/index-4s50rsec.js +8 -0
- package/dist/index-7s8g79dd.js +91 -0
- package/dist/{index-p4qaa85r.js → index-cs0tey1r.js} +2 -2
- package/dist/index-khqwa7g2.js +76 -0
- package/dist/{index-7qztyb1b.js → index-p8v28mh9.js} +2 -2
- package/dist/{index-3pm1cvhy.js → index-r8y79mzp.js} +1 -1
- package/dist/{index-3nwj0h10.js → index-rhe4jm5t.js} +2 -2
- package/dist/{index-2xsz3z63.js → index-th0bzvpn.js} +2 -2
- package/dist/{index-5p6vw484.js → index-tzrf3ax2.js} +1 -1
- package/dist/{index-wtmxk263.js → index-zmerz2yv.js} +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/rpc/port-file.js +1 -1
- package/dist/rpc/protocol.js +1 -1
- package/dist/rpc/rpc-client.js +1 -1
- package/dist/rpc/rpc-dir.js +1 -1
- package/dist/sidebar-state.js +1 -1
- package/dist/{token-dr80qm6g.js → token-2qht8n50.js} +1 -1
- package/dist/token-util-20g3fwxd.js +1 -0
- package/dist/tui-preferences.js +1 -1
- package/dist/v2/server.d.ts +1 -1
- package/dist/v2/server.js +3 -3
- package/package.json +4 -3
- package/src/tui-compiled/raw/shared/0f77ebc3c914c9c6-custody.js +89 -31
- package/src/tui-compiled/raw/shared/4825e03209d6ae3e-with-lock.js +19 -13
- package/src/tui-compiled/raw/shared/549daf371622c304-index.tsx +49 -607
- package/src/tui-compiled/raw/shared/723b00f96290a097-lock-record.js +55 -0
- package/src/tui-compiled/raw/shared/94f53cfd572ba4bb-availability.js +9 -1
- package/src/tui-compiled/raw/shared/a75d0d866c227b3f-index.tsx +681 -0
- package/src/tui-compiled/raw/shared/b9588ad4725c1d10-enrollment.js +33 -2
- package/src/tui-compiled/raw/shared/c97089ed4243981c-host.js +11 -7
- package/src/tui-compiled/raw/shared/e8cd4929507508d8-refresh-file-lock.js +148 -92
- package/src/tui-compiled/raw/shared/e8d3c8da776ef9cd-index.js +1 -1
- package/src/tui-compiled/runtime/shared/0f77ebc3c914c9c6-custody.js +89 -31
- package/src/tui-compiled/runtime/shared/4825e03209d6ae3e-with-lock.js +19 -13
- package/src/tui-compiled/runtime/shared/549daf371622c304-index.js +36 -674
- package/src/tui-compiled/runtime/shared/723b00f96290a097-lock-record.js +55 -0
- package/src/tui-compiled/runtime/shared/94f53cfd572ba4bb-availability.js +9 -1
- package/src/tui-compiled/runtime/shared/a75d0d866c227b3f-index.js +678 -0
- package/src/tui-compiled/runtime/shared/b9588ad4725c1d10-enrollment.js +33 -2
- package/src/tui-compiled/runtime/shared/c97089ed4243981c-host.js +11 -7
- package/src/tui-compiled/runtime/shared/e8cd4929507508d8-refresh-file-lock.js +148 -92
- package/src/tui-compiled/runtime/shared/e8d3c8da776ef9cd-index.js +1 -1
- package/dist/index-2egbrywb.js +0 -8
- package/dist/index-dqk0c7wr.js +0 -64
- package/dist/index-n5jtwtrs.js +0 -76
- package/dist/index-phgm1zwn.js +0 -91
- package/dist/token-util-97td5ex3.js +0 -1
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { resolve } from "node:path";
|
|
2
|
+
import { PrivateFileError } from "./375d9cca2def037d-private-files.js";
|
|
3
|
+
/** A failed open is not evidence of deletion until the same path disappears. */
|
|
4
|
+
export class DisappearedLockRecordError extends Error {
|
|
5
|
+
path;
|
|
6
|
+
code = 'ENOENT';
|
|
7
|
+
constructor(path, cause) {
|
|
8
|
+
super(`Lock record disappeared: ${path}`, { cause });
|
|
9
|
+
this.path = path;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export function isWindowsAccessDeniedRead(error, paths) {
|
|
13
|
+
return (error instanceof PrivateFileError &&
|
|
14
|
+
error.reason === 'io-error' &&
|
|
15
|
+
error.win32Code === 5 &&
|
|
16
|
+
(error.stage === 'read' || error.stage === 'verify') &&
|
|
17
|
+
paths.some((path) => resolve(path) === error.path));
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* An exclusive create at the lock or eviction-directory name can fail with
|
|
21
|
+
* ACCESS_DENIED (5) while a holder's delete of that name is still pending. No
|
|
22
|
+
* reread settles a create refusal, so callers retry only under their existing
|
|
23
|
+
* bound and never infer staleness from it. owner.json is deliberately not a
|
|
24
|
+
* candidate: a marker directory created exclusively a moment ago cannot hold a
|
|
25
|
+
* delete-pending old owner.json, so a 5 there is a real refusal and the caller
|
|
26
|
+
* removes the directory it just created.
|
|
27
|
+
*/
|
|
28
|
+
export function isWindowsAccessDeniedCreate(error, paths, stage) {
|
|
29
|
+
return (error instanceof PrivateFileError &&
|
|
30
|
+
error.reason === 'io-error' &&
|
|
31
|
+
error.win32Code === 5 &&
|
|
32
|
+
error.stage === stage &&
|
|
33
|
+
paths.some((path) => resolve(path) === error.path));
|
|
34
|
+
}
|
|
35
|
+
export async function readLockRecord(path, read) {
|
|
36
|
+
try {
|
|
37
|
+
return await read();
|
|
38
|
+
}
|
|
39
|
+
catch (error) {
|
|
40
|
+
if (!isWindowsAccessDeniedRead(error, [path]))
|
|
41
|
+
throw error;
|
|
42
|
+
// Windows commonly maps STATUS_DELETE_PENDING to ACCESS_DENIED (5),
|
|
43
|
+
// which can also mean a permission refusal, not a sharing violation.
|
|
44
|
+
// Only a successful fresh read or ENOENT resolves that ambiguity. A
|
|
45
|
+
// persistent refusal escapes to the caller's existing deadline/backoff.
|
|
46
|
+
try {
|
|
47
|
+
return await read();
|
|
48
|
+
}
|
|
49
|
+
catch (recheckError) {
|
|
50
|
+
if (recheckError.code === 'ENOENT')
|
|
51
|
+
throw new DisappearedLockRecordError(path, error);
|
|
52
|
+
throw error;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -87,9 +87,17 @@ export const VAULT_FAILURE_CLASSES = Object.freeze({
|
|
|
87
87
|
* kind stays `unavailable` for callers handling ClaustrumConsumerError.
|
|
88
88
|
*/
|
|
89
89
|
export class ClaustrumUnreachableError extends ClaustrumConsumerError {
|
|
90
|
-
|
|
90
|
+
/**
|
|
91
|
+
* Non-secret host connection diagnostic. A missing accessor can recover
|
|
92
|
+
* once the host bridge installs; a failed accessor could not provide a client.
|
|
93
|
+
* Other unreachable failures leave this unset. Never use adapter error text.
|
|
94
|
+
*/
|
|
95
|
+
reason;
|
|
96
|
+
constructor(reason) {
|
|
91
97
|
super('unavailable', 'Claustrum scoped operation unavailable');
|
|
92
98
|
this.name = 'ClaustrumUnreachableError';
|
|
99
|
+
if (reason === 'host-accessor-missing' || reason === 'host-accessor-failed')
|
|
100
|
+
this.reason = reason;
|
|
93
101
|
}
|
|
94
102
|
}
|
|
95
103
|
export function classifyVaultFailure(error) {
|