@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.
- package/README.md +239 -195
- package/dist/cli-failure.d.ts +69 -0
- package/dist/cli.d.ts +14 -9
- package/dist/cli.js +98 -76
- package/dist/custody-dimensions.d.ts +7 -24
- package/dist/custody-mode.d.ts +29 -169
- package/dist/effort-history.d.ts +6 -1
- package/dist/index-1jkyhgyr.js +2 -0
- package/dist/{index-8y2t4mwz.js → index-2arfb1y3.js} +1 -1
- package/dist/{index-0jfsxyn9.js → index-4ya27n12.js} +1 -1
- package/dist/index-aaajxwzd.js +2 -0
- package/dist/index-ae3fq4n6.js +42 -0
- package/dist/{index-xzbhzz0a.js → index-fds0s2j4.js} +2 -2
- package/dist/index-nngmvczq.js +450 -0
- package/dist/index-pn597b6f.js +2 -0
- package/dist/{index-1gr8v4fn.js → index-rqync0pc.js} +1 -1
- package/dist/index.js +1 -38
- package/dist/native-command.d.ts +19 -0
- package/dist/rpc/notifications.d.ts +2 -1
- package/dist/rpc/port-file.js +1 -1
- package/dist/rpc/protocol.d.ts +8 -4
- package/dist/rpc/protocol.js +1 -1
- package/dist/rpc/rpc-client.d.ts +2 -0
- package/dist/rpc/rpc-client.js +1 -1
- package/dist/rpc/rpc-dir.js +1 -1
- package/dist/rpc/rpc-server.d.ts +5 -1
- package/dist/setup/command.d.ts +12 -0
- package/dist/setup/command.test.d.ts +1 -0
- package/dist/setup/native-activation.d.ts +29 -0
- package/dist/setup/native-enrollment.d.ts +26 -0
- package/dist/setup/native-enrollment.test.d.ts +1 -0
- package/dist/setup/native-local.d.ts +20 -0
- package/dist/setup/native-login.d.ts +3 -0
- package/dist/setup/native-paths.d.ts +15 -0
- package/dist/setup/native-paths.test.d.ts +1 -0
- package/dist/setup/pi.d.ts +13 -3
- package/dist/setup/process-fence.d.ts +7 -1
- package/dist/setup/process-fence.test.d.ts +1 -0
- package/dist/sidebar-state.js +1 -1
- package/dist/tui/command-dialogs.d.ts +5 -0
- package/dist/tui-preferences.js +2 -2
- package/dist/v2/activation.d.ts +7 -0
- package/dist/v2/adapter.d.ts +276 -0
- package/dist/v2/install.d.ts +13 -0
- package/dist/v2/lifecycle.d.ts +8 -0
- package/dist/v2/menu-contract.d.ts +8 -0
- package/dist/v2/menu.d.ts +10 -0
- package/dist/v2/models.d.ts +6 -0
- package/dist/v2/ownership.d.ts +11 -0
- package/dist/v2/prime.d.ts +12 -0
- package/dist/v2/rpc.d.ts +50 -0
- package/dist/v2/server.d.ts +8 -0
- package/dist/v2/server.js +4 -0
- package/dist/v2/setup.d.ts +58 -0
- package/dist/v2/source.d.ts +41 -0
- package/dist/v2/tui.d.ts +13 -0
- package/dist/v2/tui.js +2 -0
- package/dist/v2/wire.d.ts +36 -0
- package/package.json +20 -5
- package/src/rpc/notifications.ts +9 -2
- package/src/rpc/protocol.ts +8 -7
- package/src/rpc/rpc-client.ts +17 -0
- package/src/rpc/rpc-server.ts +20 -3
- package/src/tui/command-dialogs.tsx +264 -0
- package/src/tui/entry.mjs +44 -18
- package/src/tui-compiled/rpc/protocol.ts +8 -7
- package/src/tui-compiled/rpc/rpc-client.ts +17 -0
- package/src/tui-compiled/tui/command-dialogs.tsx +315 -76
- package/src/tui-compiled/tui.tsx +24 -7
- package/src/tui.tsx +37 -9
- package/dist/claustrum-enrollment-registry.d.ts +0 -4
- package/dist/custody-enrollment.d.ts +0 -14
- package/dist/custody-live.d.ts +0 -111
- package/dist/custody-manifest-watcher.d.ts +0 -16
- package/dist/index-1fq7h6yd.js +0 -430
- package/dist/index-797pmamn.js +0 -2
- package/dist/index-a5d6v3ba.js +0 -5
- package/dist/index-n96q8pks.js +0 -2
- package/dist/index-xxhyhp98.js +0 -2
- package/dist/index-z7gfdyv3.js +0 -1
- package/dist/local-login.d.ts +0 -64
- package/dist/logger-kk9vyem9.js +0 -1
package/dist/custody-live.d.ts
DELETED
|
@@ -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 {};
|