@cortexkit/opencode-openai-auth 1.12.0 → 1.14.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.
Files changed (55) hide show
  1. package/dist/bin.js +9 -9
  2. package/dist/{codex-request-DFeGDzpN.d.ts → codex-request-Cl6zEfsR.d.ts} +21 -3
  3. package/dist/{index-5p6vw484.js → index-1abcvt9p.js} +1 -1
  4. package/dist/{index-2xsz3z63.js → index-3c9pk6zn.js} +2 -2
  5. package/dist/{index-dcvxs9xj.js → index-4tpttpjw.js} +1 -1
  6. package/dist/index-4zpxwh8y.js +91 -0
  7. package/dist/{index-7p1s64b4.js → index-a9tzfpxy.js} +1 -1
  8. package/dist/index-bc2d4vma.js +64 -0
  9. package/dist/{index-wtmxk263.js → index-f7t7cc9b.js} +2 -2
  10. package/dist/{index-7qztyb1b.js → index-nfbmjq6g.js} +2 -2
  11. package/dist/{index-3pm1cvhy.js → index-q111b2h5.js} +1 -1
  12. package/dist/{index-3nwj0h10.js → index-wap9mf5f.js} +2 -2
  13. package/dist/{index-p4qaa85r.js → index-xxmaf5ks.js} +2 -2
  14. package/dist/index-yew3mp47.js +76 -0
  15. package/dist/index-zcpher1w.js +8 -0
  16. package/dist/index.d.ts +1 -1
  17. package/dist/index.js +1 -1
  18. package/dist/rpc/port-file.js +1 -1
  19. package/dist/rpc/protocol.js +1 -1
  20. package/dist/rpc/rpc-client.js +1 -1
  21. package/dist/rpc/rpc-dir.js +1 -1
  22. package/dist/sidebar-state.js +1 -1
  23. package/dist/{token-dr80qm6g.js → token-6x4q5r2r.js} +1 -1
  24. package/dist/token-util-54mhq85x.js +1 -0
  25. package/dist/tui-preferences.js +1 -1
  26. package/dist/v2/server.d.ts +1 -1
  27. package/dist/v2/server.js +3 -3
  28. package/package.json +8 -7
  29. package/src/tui-compiled/raw/shared/0f77ebc3c914c9c6-custody.js +89 -31
  30. package/src/tui-compiled/raw/shared/4825e03209d6ae3e-with-lock.js +19 -13
  31. package/src/tui-compiled/raw/shared/549daf371622c304-index.tsx +49 -607
  32. package/src/tui-compiled/raw/shared/723b00f96290a097-lock-record.js +55 -0
  33. package/src/tui-compiled/raw/shared/94f53cfd572ba4bb-availability.js +9 -1
  34. package/src/tui-compiled/raw/shared/a75d0d866c227b3f-index.tsx +681 -0
  35. package/src/tui-compiled/raw/shared/abd062d633e29fd2-pool-routing.js +21 -15
  36. package/src/tui-compiled/raw/shared/b9588ad4725c1d10-enrollment.js +110 -2
  37. package/src/tui-compiled/raw/shared/c97089ed4243981c-host.js +11 -7
  38. package/src/tui-compiled/raw/shared/e8cd4929507508d8-refresh-file-lock.js +148 -92
  39. package/src/tui-compiled/raw/shared/e8d3c8da776ef9cd-index.js +1 -1
  40. package/src/tui-compiled/runtime/shared/0f77ebc3c914c9c6-custody.js +89 -31
  41. package/src/tui-compiled/runtime/shared/4825e03209d6ae3e-with-lock.js +19 -13
  42. package/src/tui-compiled/runtime/shared/549daf371622c304-index.js +36 -674
  43. package/src/tui-compiled/runtime/shared/723b00f96290a097-lock-record.js +55 -0
  44. package/src/tui-compiled/runtime/shared/94f53cfd572ba4bb-availability.js +9 -1
  45. package/src/tui-compiled/runtime/shared/a75d0d866c227b3f-index.js +678 -0
  46. package/src/tui-compiled/runtime/shared/abd062d633e29fd2-pool-routing.js +21 -15
  47. package/src/tui-compiled/runtime/shared/b9588ad4725c1d10-enrollment.js +110 -2
  48. package/src/tui-compiled/runtime/shared/c97089ed4243981c-host.js +11 -7
  49. package/src/tui-compiled/runtime/shared/e8cd4929507508d8-refresh-file-lock.js +148 -92
  50. package/src/tui-compiled/runtime/shared/e8d3c8da776ef9cd-index.js +1 -1
  51. package/dist/index-2egbrywb.js +0 -8
  52. package/dist/index-dqk0c7wr.js +0 -64
  53. package/dist/index-n5jtwtrs.js +0 -76
  54. package/dist/index-phgm1zwn.js +0 -91
  55. 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
- constructor() {
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) {