@cortexkit/opencode-anthropic-auth 1.23.0 → 2.0.1

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 (88) hide show
  1. package/README.md +239 -195
  2. package/dist/cli-failure.d.ts +69 -0
  3. package/dist/cli.d.ts +14 -9
  4. package/dist/cli.js +103 -80
  5. package/dist/custody-dimensions.d.ts +7 -24
  6. package/dist/custody-mode.d.ts +29 -169
  7. package/dist/effort-history.d.ts +6 -1
  8. package/dist/{index-xzbhzz0a.js → index-04syas8a.js} +2 -2
  9. package/dist/index-1jkyhgyr.js +2 -0
  10. package/dist/{index-8y2t4mwz.js → index-2arfb1y3.js} +1 -1
  11. package/dist/index-3xqv3rw3.js +2 -0
  12. package/dist/{index-0jfsxyn9.js → index-52r2e1h9.js} +1 -1
  13. package/dist/index-b3mxpp4w.js +2 -0
  14. package/dist/index-p4wvcwhh.js +3 -0
  15. package/dist/{index-1gr8v4fn.js → index-rqync0pc.js} +1 -1
  16. package/dist/index-ynq181e8.js +42 -0
  17. package/dist/index-yxtdke11.js +449 -0
  18. package/dist/index-zdgceztz.js +1 -0
  19. package/dist/index.js +1 -38
  20. package/dist/native-command.d.ts +19 -0
  21. package/dist/rpc/notifications.d.ts +2 -1
  22. package/dist/rpc/port-file.js +1 -1
  23. package/dist/rpc/protocol.d.ts +8 -4
  24. package/dist/rpc/protocol.js +1 -1
  25. package/dist/rpc/rpc-client.d.ts +2 -0
  26. package/dist/rpc/rpc-client.js +1 -1
  27. package/dist/rpc/rpc-dir.js +1 -1
  28. package/dist/rpc/rpc-server.d.ts +5 -1
  29. package/dist/setup/command.d.ts +12 -0
  30. package/dist/setup/command.test.d.ts +1 -0
  31. package/dist/setup/detect.d.ts +7 -4
  32. package/dist/setup/host-executable.d.ts +3 -0
  33. package/dist/setup/native-activation.d.ts +29 -0
  34. package/dist/setup/native-enrollment.d.ts +26 -0
  35. package/dist/setup/native-enrollment.test.d.ts +1 -0
  36. package/dist/setup/native-local.d.ts +20 -0
  37. package/dist/setup/native-login.d.ts +3 -0
  38. package/dist/setup/native-paths.d.ts +15 -0
  39. package/dist/setup/native-paths.test.d.ts +1 -0
  40. package/dist/setup/paths.d.ts +3 -2
  41. package/dist/setup/pi.d.ts +14 -4
  42. package/dist/setup/process-fence.d.ts +7 -1
  43. package/dist/setup/process-fence.test.d.ts +1 -0
  44. package/dist/sidebar-state.js +1 -1
  45. package/dist/tui/command-dialogs.d.ts +5 -0
  46. package/dist/tui-preferences.js +2 -2
  47. package/dist/v2/activation.d.ts +7 -0
  48. package/dist/v2/adapter.d.ts +276 -0
  49. package/dist/v2/install.d.ts +13 -0
  50. package/dist/v2/lifecycle.d.ts +8 -0
  51. package/dist/v2/menu-contract.d.ts +8 -0
  52. package/dist/v2/menu.d.ts +10 -0
  53. package/dist/v2/models.d.ts +6 -0
  54. package/dist/v2/ownership.d.ts +11 -0
  55. package/dist/v2/prime.d.ts +12 -0
  56. package/dist/v2/rpc.d.ts +50 -0
  57. package/dist/v2/server.d.ts +8 -0
  58. package/dist/v2/server.js +4 -0
  59. package/dist/v2/setup.d.ts +58 -0
  60. package/dist/v2/source.d.ts +41 -0
  61. package/dist/v2/tui.d.ts +13 -0
  62. package/dist/v2/tui.js +2 -0
  63. package/dist/v2/wire.d.ts +36 -0
  64. package/package.json +20 -5
  65. package/src/rpc/notifications.ts +9 -2
  66. package/src/rpc/protocol.ts +8 -7
  67. package/src/rpc/rpc-client.ts +17 -0
  68. package/src/rpc/rpc-server.ts +20 -3
  69. package/src/tui/command-dialogs.tsx +264 -0
  70. package/src/tui/entry.mjs +44 -18
  71. package/src/tui-compiled/rpc/protocol.ts +8 -7
  72. package/src/tui-compiled/rpc/rpc-client.ts +17 -0
  73. package/src/tui-compiled/tui/command-dialogs.tsx +315 -76
  74. package/src/tui-compiled/tui.tsx +24 -7
  75. package/src/tui.tsx +37 -9
  76. package/dist/claustrum-enrollment-registry.d.ts +0 -4
  77. package/dist/custody-enrollment.d.ts +0 -14
  78. package/dist/custody-live.d.ts +0 -111
  79. package/dist/custody-manifest-watcher.d.ts +0 -16
  80. package/dist/index-1fq7h6yd.js +0 -430
  81. package/dist/index-797pmamn.js +0 -2
  82. package/dist/index-a5d6v3ba.js +0 -5
  83. package/dist/index-n96q8pks.js +0 -2
  84. package/dist/index-xxhyhp98.js +0 -2
  85. package/dist/index-z7gfdyv3.js +0 -1
  86. package/dist/local-login.d.ts +0 -64
  87. package/dist/logger-kk9vyem9.js +0 -1
  88. package/dist/setup/claustrum.d.ts +0 -26
@@ -1,111 +0,0 @@
1
- import * as core from '@cortexkit/anthropic-auth-core';
2
- import { type ClaustrumTakeoverPlan, type CustodyCacheCredential, type ExecuteClaustrumTakeoverDeps } from './custody-mode.ts';
3
- type Lock = {
4
- release: () => Promise<void>;
5
- };
6
- type RawCacheCredential = core.ClaustrumCredential | CustodyCacheCredential;
7
- type LiveRoute = {
8
- id: string;
9
- label?: string;
10
- type: string;
11
- enabled?: boolean;
12
- local?: unknown;
13
- claustrumHandle?: string;
14
- };
15
- type ClaustrumTakeoverCommandDeps = {
16
- storagePath: string;
17
- loadStorage: () => Promise<core.AccountStorage | null>;
18
- getCache: () => Promise<{
19
- get: (handle: string, minTtlMs?: number) => Promise<RawCacheCredential>;
20
- } | null>;
21
- latestGetAuth?: () => Promise<unknown>;
22
- now: () => number;
23
- fallbackManager?: Pick<core.FallbackAccountManager, 'withAccountRefreshLock'>;
24
- refreshManifest: () => Promise<void>;
25
- debug?: (message: string) => void;
26
- };
27
- export declare function runClaustrumTakeoverCommand(deps: ClaustrumTakeoverCommandDeps, mode: 'local' | 'claustrum'): Promise<{
28
- text: string;
29
- }>;
30
- export declare function createLiveCustodyDeps(input: {
31
- storagePath: string;
32
- cache: {
33
- get: (handle: string, minTtlMs?: number) => Promise<RawCacheCredential>;
34
- };
35
- latestGetAuth: () => Promise<unknown>;
36
- now: number | (() => number);
37
- fallbackManager?: Pick<core.FallbackAccountManager, 'withAccountRefreshLock'>;
38
- storage?: core.AccountStorage | null;
39
- writeManifestEntryLocked?: typeof core.writeCustodyHandleManifestEntryLocked;
40
- debug?: (message: string) => void;
41
- }): {
42
- hostAuth: {
43
- get: () => Promise<unknown>;
44
- };
45
- readonly manifestPath: string;
46
- readBindings(routes: LiveRoute[]): Promise<{
47
- accountId: string;
48
- label: string;
49
- handle: string;
50
- credentialId: string;
51
- source: "legacy" | "manifest";
52
- }[]>;
53
- cache: {
54
- get: (handle: string, options: {
55
- minTtlMs: number;
56
- }) => Promise<CustodyCacheCredential>;
57
- };
58
- preflightInput(main: Pick<LiveRoute, 'id' | 'label' | 'enabled'>, fallbacks: LiveRoute[]): Promise<{
59
- now: number;
60
- storage: core.AccountStorage | null;
61
- main: Pick<LiveRoute, "enabled" | "id" | "label">;
62
- fallbacks: {
63
- id: string;
64
- label?: string;
65
- type: string;
66
- enabled?: boolean;
67
- claustrumHandle?: string;
68
- local: {};
69
- }[];
70
- hostAuth: {
71
- get: () => Promise<unknown>;
72
- };
73
- bindings: {
74
- accountId: string;
75
- label: string;
76
- handle: string;
77
- credentialId: string;
78
- source: "legacy" | "manifest";
79
- }[];
80
- cache: {
81
- get: (handle: string, options: {
82
- minTtlMs: number;
83
- }) => Promise<CustodyCacheCredential>;
84
- };
85
- debug: ((message: string) => void) | undefined;
86
- }>;
87
- locks: {
88
- storagePath: string;
89
- readonly manifestPath: string;
90
- acquireTransition: ({ name, path }: {
91
- name: string;
92
- path: string;
93
- }) => Promise<{
94
- release: () => Promise<void>;
95
- assertOwned: () => Promise<void>;
96
- } | null>;
97
- acquireManifest: ({ path }: {
98
- path: string;
99
- }) => Promise<Lock>;
100
- acquireRefresh: ({ name, path }: {
101
- name: string;
102
- path: string;
103
- }) => Promise<Lock> | Promise<{
104
- release: () => Promise<void>;
105
- assertOwned: () => Promise<void>;
106
- } | null>;
107
- withFallbackRefreshLock: <T>(accountId: string, fn: () => Promise<T>) => Promise<T>;
108
- };
109
- takeoverDeps(plan: ClaustrumTakeoverPlan): ExecuteClaustrumTakeoverDeps;
110
- };
111
- export {};
@@ -1,16 +0,0 @@
1
- import { watch } from 'node:fs';
2
- type Listener = () => void | Promise<void>;
3
- type WatchFactory = typeof watch;
4
- export declare function adoptCustodyManifestWatcher(manifestPath: string, listener: Listener, options?: {
5
- watchImpl?: WatchFactory;
6
- setTimeoutImpl?: typeof setTimeout;
7
- clearTimeoutImpl?: typeof clearTimeout;
8
- pollSetTimeoutImpl?: typeof setTimeout;
9
- pollClearTimeoutImpl?: typeof clearTimeout;
10
- debounceMs?: number;
11
- pollIntervalMs?: number;
12
- onError?: (error: unknown) => void;
13
- }): {
14
- release: () => void;
15
- };
16
- export {};