@cortexkit/opencode-anthropic-auth 1.23.0 → 2.0.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 (82) 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 +98 -76
  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-1jkyhgyr.js +2 -0
  9. package/dist/{index-8y2t4mwz.js → index-2arfb1y3.js} +1 -1
  10. package/dist/{index-0jfsxyn9.js → index-4ya27n12.js} +1 -1
  11. package/dist/index-aaajxwzd.js +2 -0
  12. package/dist/index-ae3fq4n6.js +42 -0
  13. package/dist/{index-xzbhzz0a.js → index-fds0s2j4.js} +2 -2
  14. package/dist/index-nngmvczq.js +450 -0
  15. package/dist/index-pn597b6f.js +2 -0
  16. package/dist/{index-1gr8v4fn.js → index-rqync0pc.js} +1 -1
  17. package/dist/index.js +1 -38
  18. package/dist/native-command.d.ts +19 -0
  19. package/dist/rpc/notifications.d.ts +2 -1
  20. package/dist/rpc/port-file.js +1 -1
  21. package/dist/rpc/protocol.d.ts +8 -4
  22. package/dist/rpc/protocol.js +1 -1
  23. package/dist/rpc/rpc-client.d.ts +2 -0
  24. package/dist/rpc/rpc-client.js +1 -1
  25. package/dist/rpc/rpc-dir.js +1 -1
  26. package/dist/rpc/rpc-server.d.ts +5 -1
  27. package/dist/setup/command.d.ts +12 -0
  28. package/dist/setup/command.test.d.ts +1 -0
  29. package/dist/setup/native-activation.d.ts +29 -0
  30. package/dist/setup/native-enrollment.d.ts +26 -0
  31. package/dist/setup/native-enrollment.test.d.ts +1 -0
  32. package/dist/setup/native-local.d.ts +20 -0
  33. package/dist/setup/native-login.d.ts +3 -0
  34. package/dist/setup/native-paths.d.ts +15 -0
  35. package/dist/setup/native-paths.test.d.ts +1 -0
  36. package/dist/setup/pi.d.ts +13 -3
  37. package/dist/setup/process-fence.d.ts +7 -1
  38. package/dist/setup/process-fence.test.d.ts +1 -0
  39. package/dist/sidebar-state.js +1 -1
  40. package/dist/tui/command-dialogs.d.ts +5 -0
  41. package/dist/tui-preferences.js +2 -2
  42. package/dist/v2/activation.d.ts +7 -0
  43. package/dist/v2/adapter.d.ts +276 -0
  44. package/dist/v2/install.d.ts +13 -0
  45. package/dist/v2/lifecycle.d.ts +8 -0
  46. package/dist/v2/menu-contract.d.ts +8 -0
  47. package/dist/v2/menu.d.ts +10 -0
  48. package/dist/v2/models.d.ts +6 -0
  49. package/dist/v2/ownership.d.ts +11 -0
  50. package/dist/v2/prime.d.ts +12 -0
  51. package/dist/v2/rpc.d.ts +50 -0
  52. package/dist/v2/server.d.ts +8 -0
  53. package/dist/v2/server.js +4 -0
  54. package/dist/v2/setup.d.ts +58 -0
  55. package/dist/v2/source.d.ts +41 -0
  56. package/dist/v2/tui.d.ts +13 -0
  57. package/dist/v2/tui.js +2 -0
  58. package/dist/v2/wire.d.ts +36 -0
  59. package/package.json +20 -5
  60. package/src/rpc/notifications.ts +9 -2
  61. package/src/rpc/protocol.ts +8 -7
  62. package/src/rpc/rpc-client.ts +17 -0
  63. package/src/rpc/rpc-server.ts +20 -3
  64. package/src/tui/command-dialogs.tsx +264 -0
  65. package/src/tui/entry.mjs +44 -18
  66. package/src/tui-compiled/rpc/protocol.ts +8 -7
  67. package/src/tui-compiled/rpc/rpc-client.ts +17 -0
  68. package/src/tui-compiled/tui/command-dialogs.tsx +315 -76
  69. package/src/tui-compiled/tui.tsx +24 -7
  70. package/src/tui.tsx +37 -9
  71. package/dist/claustrum-enrollment-registry.d.ts +0 -4
  72. package/dist/custody-enrollment.d.ts +0 -14
  73. package/dist/custody-live.d.ts +0 -111
  74. package/dist/custody-manifest-watcher.d.ts +0 -16
  75. package/dist/index-1fq7h6yd.js +0 -430
  76. package/dist/index-797pmamn.js +0 -2
  77. package/dist/index-a5d6v3ba.js +0 -5
  78. package/dist/index-n96q8pks.js +0 -2
  79. package/dist/index-xxhyhp98.js +0 -2
  80. package/dist/index-z7gfdyv3.js +0 -1
  81. package/dist/local-login.d.ts +0 -64
  82. package/dist/logger-kk9vyem9.js +0 -1
@@ -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 {};