@cortexkit/opencode-antigravity-auth 3.0.15 → 3.0.17
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/cli.js +26740 -24394
- package/dist/cli.js.map +4 -4
- package/dist/cli.meta.json +549 -452
- package/dist/index.js +34088 -31689
- package/dist/index.js.map +4 -4
- package/dist/index.meta.json +608 -550
- package/dist/server.js +28837 -26421
- package/dist/server.js.map +4 -4
- package/dist/server.meta.json +1 -1
- package/dist/src/__fixtures__/account-store-process.d.ts +2 -0
- package/dist/src/__fixtures__/account-store-process.d.ts.map +1 -0
- package/dist/src/__fixtures__/account-store-process.js +163 -0
- package/dist/src/__fixtures__/account-store-process.js.map +1 -0
- package/dist/src/cli.d.ts +22 -6
- package/dist/src/cli.d.ts.map +1 -1
- package/dist/src/cli.js +157 -9
- package/dist/src/cli.js.map +1 -1
- package/dist/src/common-auth-embedded/fs/refresh-file-lock.d.ts +13 -0
- package/dist/src/common-auth-embedded/fs/refresh-file-lock.js +159 -7
- package/dist/src/common-auth-embedded/pi-slot/lock.js +26 -1
- package/dist/src/common-auth-embedded/source-output.json +15 -15
- package/dist/src/ga/server/index.js +2 -2
- package/dist/src/ga/server/index.js.map +1 -1
- package/dist/src/plugin/__fixtures__/verified-store.js +2 -2
- package/dist/src/plugin/ga-location-services.d.ts +2 -0
- package/dist/src/plugin/ga-location-services.d.ts.map +1 -1
- package/dist/src/plugin/ga-location-services.js +3 -1
- package/dist/src/plugin/ga-location-services.js.map +1 -1
- package/dist/src/plugin/index.d.ts.map +1 -1
- package/dist/src/plugin/index.js +2 -2
- package/dist/src/plugin/index.js.map +1 -1
- package/dist/src/plugin/storage.d.ts +21 -0
- package/dist/src/plugin/storage.d.ts.map +1 -1
- package/dist/src/plugin/storage.js +103 -12
- package/dist/src/plugin/storage.js.map +1 -1
- package/dist/src/process-heartbeat.d.ts +33 -9
- package/dist/src/process-heartbeat.d.ts.map +1 -1
- package/dist/src/process-heartbeat.js +161 -61
- package/dist/src/process-heartbeat.js.map +1 -1
- package/dist/src/runtime-layout.d.ts +82 -1
- package/dist/src/runtime-layout.d.ts.map +1 -1
- package/dist/src/runtime-layout.js +415 -21
- package/dist/src/runtime-layout.js.map +1 -1
- package/dist/src/runtime-paths.d.ts +93 -9
- package/dist/src/runtime-paths.d.ts.map +1 -1
- package/dist/src/runtime-paths.js +153 -15
- package/dist/src/runtime-paths.js.map +1 -1
- package/dist/src/setup.d.ts.map +1 -1
- package/dist/src/setup.js +35 -7
- package/dist/src/setup.js.map +1 -1
- package/dist/src/vault-folder.d.ts +2 -0
- package/dist/src/vault-folder.d.ts.map +1 -1
- package/dist/src/vault-folder.js +8 -1
- package/dist/src/vault-folder.js.map +1 -1
- package/dist/src/version-fence.d.ts +37 -0
- package/dist/src/version-fence.d.ts.map +1 -1
- package/dist/src/version-fence.js +131 -12
- package/dist/src/version-fence.js.map +1 -1
- package/dist/tui-build-map.json +1 -1
- package/dist/tui-ga-build-map.json +1 -1
- package/dist/types/src/cli.d.ts +22 -6
- package/dist/types/src/cli.d.ts.map +1 -1
- package/dist/types/src/common-auth-embedded/fs/refresh-file-lock.d.ts +13 -0
- package/dist/types/src/plugin/ga-location-services.d.ts +2 -0
- package/dist/types/src/plugin/ga-location-services.d.ts.map +1 -1
- package/dist/types/src/plugin/index.d.ts.map +1 -1
- package/dist/types/src/plugin/storage.d.ts +21 -0
- package/dist/types/src/plugin/storage.d.ts.map +1 -1
- package/dist/types/src/process-heartbeat.d.ts +33 -9
- package/dist/types/src/process-heartbeat.d.ts.map +1 -1
- package/dist/types/src/runtime-layout.d.ts +82 -1
- package/dist/types/src/runtime-layout.d.ts.map +1 -1
- package/dist/types/src/runtime-paths.d.ts +93 -9
- package/dist/types/src/runtime-paths.d.ts.map +1 -1
- package/dist/types/src/setup.d.ts.map +1 -1
- package/dist/types/src/vault-folder.d.ts +2 -0
- package/dist/types/src/vault-folder.d.ts.map +1 -1
- package/dist/types/src/version-fence.d.ts +37 -0
- package/dist/types/src/version-fence.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/common-auth-embedded/fs/refresh-file-lock.d.ts +13 -0
- package/src/common-auth-embedded/fs/refresh-file-lock.js +159 -7
- package/src/common-auth-embedded/pi-slot/lock.js +26 -1
- package/src/common-auth-embedded/source-output.json +15 -15
|
@@ -211,6 +211,8 @@ export interface GaLocationServicesBindings {
|
|
|
211
211
|
readonly loadStoreModules: () => Promise<AccountStoreModules & AccountMigrationModules>;
|
|
212
212
|
/** Resolve the shared pool; a new workspace must not create a separate account store. */
|
|
213
213
|
readonly resolveAccountFile: (directory: string) => string;
|
|
214
|
+
/** A deferred start chooses its store only after local authority is checked. */
|
|
215
|
+
readonly prepareAccountStore?: () => Promise<void>;
|
|
214
216
|
readonly now: () => number;
|
|
215
217
|
readonly createSelector?: () => string;
|
|
216
218
|
/** The location runtime's collaborators (sidebar file, quota, refresh). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ga-location-services.d.ts","sourceRoot":"","sources":["../../../../src/plugin/ga-location-services.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EAEtB,KAAK,UAAU,EAEf,KAAK,mBAAmB,EAGxB,KAAK,uBAAuB,EAC5B,KAAK,2BAA2B,EAChC,KAAK,gCAAgC,EACrC,KAAK,6BAA6B,EAGlC,KAAK,wBAAwB,EAK7B,KAAK,iBAAiB,EAKtB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EAErB,KAAK,iBAAiB,EACtB,KAAK,MAAM,EAQX,KAAK,aAAa,EACnB,MAAM,kCAAkC,CAAA;AACzC,OAAO,KAAK,EACV,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACrB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EACV,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,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AC,MAAM,CAAC,CAAA;IACxD;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,IAAI,CACrB,2BAA2B,EAC3B,SAAS,GAAG,mBAAmB,GAAG,eAAe,GAAG,KAAK,GAAG,gBAAgB,CAC7E,CAAA;IACD,gEAAgE;IAChE,QAAQ,CAAC,KAAK,CAAC,EAAE,2BAA2B,CAAA;CAC7C;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,+BAA+B,CAC7C,KAAK,CAAC,EAAE,WAAW,GAClB,yBAAyB,CAwD3B;AAED,gFAAgF;AAChF,eAAO,MAAM,wBAAwB,EAAE,yBAOtC,CAAA"}
|
|
1
|
+
{"version":3,"file":"ga-location-services.d.ts","sourceRoot":"","sources":["../../../../src/plugin/ga-location-services.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EAEtB,KAAK,UAAU,EAEf,KAAK,mBAAmB,EAGxB,KAAK,uBAAuB,EAC5B,KAAK,2BAA2B,EAChC,KAAK,gCAAgC,EACrC,KAAK,6BAA6B,EAGlC,KAAK,wBAAwB,EAK7B,KAAK,iBAAiB,EAKtB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EAErB,KAAK,iBAAiB,EACtB,KAAK,MAAM,EAQX,KAAK,aAAa,EACnB,MAAM,kCAAkC,CAAA;AACzC,OAAO,KAAK,EACV,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACrB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EACV,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,eAAe,EACf,sBAAsB,EAEtB,aAAa,EACb,kBAAkB,EAGlB,sBAAsB,EACvB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAEV,mBAAmB,EACpB,MAAM,qBAAqB,CAAA;AAe5B,OA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3B,SAAS,GAAG,mBAAmB,GAAG,eAAe,GAAG,KAAK,GAAG,gBAAgB,CAC7E,CAAA;IACD,gEAAgE;IAChE,QAAQ,CAAC,KAAK,CAAC,EAAE,2BAA2B,CAAA;CAC7C;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,+BAA+B,CAC7C,KAAK,CAAC,EAAE,WAAW,GAClB,yBAAyB,CAyD3B;AAED,gFAAgF;AAChF,eAAO,MAAM,wBAAwB,EAAE,yBAOtC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugin/index.ts"],"names":[],"mappings":"AA0CA,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AACnE,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAA;AAmB9E,OAAO,EAEL,KAAK,yBAAyB,EAE/B,MAAM,gBAAgB,CAAA;AAQvB,OAAO,EAAyB,KAAK,eAAe,EAAE,MAAM,aAAa,CAAA;AAkBzE,OAAO,EAKL,KAAK,YAAY,EAGlB,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugin/index.ts"],"names":[],"mappings":"AA0CA,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AACnE,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAA;AAmB9E,OAAO,EAEL,KAAK,yBAAyB,EAE/B,MAAM,gBAAgB,CAAA;AAQvB,OAAO,EAAyB,KAAK,eAAe,EAAE,MAAM,aAAa,CAAA;AAkBzE,OAAO,EAKL,KAAK,YAAY,EAGlB,MAAM,SAAS,CAAA;AAuBhB,OAAO,KAAK,EAA0B,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAShF,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAmB3C;;;;GAIG;AACH,MAAM,WAAW,8BAA8B;IAC7C;;;;OAIG;IACH,YAAY,CAAC,EAAE,yBAAyB,CAAA;IACxC;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,sBAAsB,KAAK,IAAI,CAAA;IAC3D,qBAAqB,CAAC,EAAE,CAAC,MAAM,EAAE,2BAA2B,KAAK,IAAI,CAAA;CACtE;AAED,wBAAgB,4BAA4B,CAC1C,SAAS,EAAE,eAAe,EAC1B,YAAY,EAAE,YAAY,GACzB,IAAI,CAEN;AAED,eAAO,MAAM,uBAAuB,GACjC,YAAY,MAAM,EAAE,UAAS,8BAAmC,MAC1D,OAAO,WAAW,KAAG,OAAO,CAAC,YAAY,CAo2B/C,CAAA;AAEH,eAAO,MAAM,yBAAyB,UAt2BtB,WAAW,KAAG,OAAO,CAAC,YAAY,CAw2BjD,CAAA;AACD,eAAO,MAAM,iBAAiB,UAz2Bd,WAAW,KAAG,OAAO,CAAC,YAAY,CAy2BQ,CAAA"}
|
|
@@ -69,6 +69,27 @@ export declare function ensureGitignoreSync(configDir: string): void;
|
|
|
69
69
|
* On Windows, also checks for legacy %APPDATA%\opencode path for migration.
|
|
70
70
|
*/
|
|
71
71
|
declare function getConfigDir(): string;
|
|
72
|
+
/**
|
|
73
|
+
* Picks the Windows anchor that owns the accounts, without moving anything.
|
|
74
|
+
*
|
|
75
|
+
* A migrated store is found by its pointer file at either anchor, not only
|
|
76
|
+
* by the presence of the pool file: the migration retires the pool file, so
|
|
77
|
+
* after a migration at the `%APPDATA%\opencode` anchor no pool file is left
|
|
78
|
+
* to fall back on. The `%APPDATA%\opencode` anchor wins when only it
|
|
79
|
+
* publishes a store, the config anchor wins when only it does, and pointers
|
|
80
|
+
* at both anchors refuse instead of silently picking one. When neither
|
|
81
|
+
* anchor publishes a store, the unmigrated pool file still decides, exactly
|
|
82
|
+
* as before (missing at the config anchor but present at the legacy anchor
|
|
83
|
+
* means the legacy anchor).
|
|
84
|
+
*
|
|
85
|
+
* `legacyAccountFile()` in `runtime-paths.ts` shares this resolution for
|
|
86
|
+
* read paths that must not move files.
|
|
87
|
+
*/
|
|
88
|
+
export declare function resolveWindowsAccountAnchor(newPath: string, legacyPath: string): string;
|
|
89
|
+
/** Locate vault files without inspecting a possibly unauthorized account store. */
|
|
90
|
+
export declare function accountFileForVault(configDir?: string): string;
|
|
91
|
+
/** Finish a vault-only start's store decision before its first local opening. */
|
|
92
|
+
export declare function prepareLocalAccountStore(): Promise<void>;
|
|
72
93
|
export declare function getStoragePath(): string;
|
|
73
94
|
/**
|
|
74
95
|
* Gets the config directory path. Exported for use by other modules.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../../src/plugin/storage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAgBH,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,8BAA8B,EAC9B,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,kCAAkC,CAAA;AACzC,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,6BAA6B,EAC7B,KAAK,qBAAqB,EAC1B,KAAK,4BAA4B,EACjC,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../../src/plugin/storage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAgBH,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,8BAA8B,EAC9B,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,kCAAkC,CAAA;AACzC,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,6BAA6B,EAC7B,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AED,wBAAsB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAanD;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,2BAA2B,CAC/C,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,OAAO,GAC9C,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC,CAsBxC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type HeartbeatStoreRecord } from './runtime-paths.js';
|
|
1
2
|
/** Where one process keeps one config folder's runtime files. */
|
|
2
3
|
export type ProcessLayout = 'legacy' | 'state-home';
|
|
3
4
|
export interface ProcessHeartbeat {
|
|
@@ -6,6 +7,12 @@ export interface ProcessHeartbeat {
|
|
|
6
7
|
startedAt: number;
|
|
7
8
|
/** Config folder key (`processConfigFolderKey()`) to its layout. */
|
|
8
9
|
layouts: Record<string, ProcessLayout>;
|
|
10
|
+
/**
|
|
11
|
+
* Config folder key to where that folder's account store is kept, for a
|
|
12
|
+
* process that decided. Absent from a heartbeat of a version that predates
|
|
13
|
+
* the store move.
|
|
14
|
+
*/
|
|
15
|
+
stores?: Record<string, HeartbeatStoreRecord>;
|
|
9
16
|
}
|
|
10
17
|
/**
|
|
11
18
|
* The heartbeat directory, resolved the same way as the RPC directory:
|
|
@@ -37,16 +44,17 @@ export interface ProcessHeartbeatHandle {
|
|
|
37
44
|
release(): Promise<void>;
|
|
38
45
|
}
|
|
39
46
|
/**
|
|
40
|
-
* Record this process as running `version`, with `layouts`
|
|
41
|
-
*
|
|
42
|
-
* and tried again at the next owner start. The file is written only
|
|
43
|
-
* this process has not written it yet or its
|
|
47
|
+
* Record this process as running `version`, with `layouts` and `stores`
|
|
48
|
+
* added to what it already holds. Never throws: a failed write is logged at
|
|
49
|
+
* warn and tried again at the next owner start. The file is written only
|
|
50
|
+
* when this process has not written it yet or its records changed, so later
|
|
44
51
|
* owners of a process whose file is current write nothing.
|
|
45
52
|
*/
|
|
46
53
|
export declare function startProcessHeartbeat(input: {
|
|
47
54
|
version: string;
|
|
48
55
|
logger: HeartbeatLogger;
|
|
49
56
|
layouts?: Record<string, ProcessLayout>;
|
|
57
|
+
stores?: Record<string, HeartbeatStoreRecord>;
|
|
50
58
|
now?: () => number;
|
|
51
59
|
pid?: number;
|
|
52
60
|
dir?: string;
|
|
@@ -58,11 +66,11 @@ export declare function startProcessHeartbeat(input: {
|
|
|
58
66
|
*/
|
|
59
67
|
export declare function removeProcessHeartbeat(logger: HeartbeatLogger): Promise<void>;
|
|
60
68
|
/**
|
|
61
|
-
* Record which layout this process uses for one config folder
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
69
|
+
* Record which layout this process uses for one config folder and write the
|
|
70
|
+
* heartbeat at once, because another process deciding whether it may move
|
|
71
|
+
* the files reads it. A start makes the choice and this write while it holds
|
|
72
|
+
* the layout lock, so a process deciding later sees it; a start whose vault
|
|
73
|
+
* files moved long ago records it without that lock. Throws when the write
|
|
66
74
|
* fails, unlike `startProcessHeartbeat`.
|
|
67
75
|
*/
|
|
68
76
|
export declare function recordProcessLayout(input: {
|
|
@@ -73,6 +81,22 @@ export declare function recordProcessLayout(input: {
|
|
|
73
81
|
pid?: number;
|
|
74
82
|
dir?: string;
|
|
75
83
|
}): Promise<void>;
|
|
84
|
+
/**
|
|
85
|
+
* Record where this process keeps one config folder's account store (see
|
|
86
|
+
* `HeartbeatStoreRecord` in `runtime-paths.ts`) and write the heartbeat at
|
|
87
|
+
* once, because a process deciding whether it may move the store reads it.
|
|
88
|
+
* A start makes the choice and this write while it holds the layout lock, so
|
|
89
|
+
* a process deciding later sees it. Throws when the write fails, unlike
|
|
90
|
+
* `startProcessHeartbeat`.
|
|
91
|
+
*/
|
|
92
|
+
export declare function recordProcessAnchor(input: {
|
|
93
|
+
key: string;
|
|
94
|
+
anchor: HeartbeatStoreRecord;
|
|
95
|
+
version: string;
|
|
96
|
+
now?: () => number;
|
|
97
|
+
pid?: number;
|
|
98
|
+
dir?: string;
|
|
99
|
+
}): Promise<void>;
|
|
76
100
|
/** This plugin's version, from its package manifest. */
|
|
77
101
|
export declare function pluginPackageVersion(): Promise<string>;
|
|
78
102
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process-heartbeat.d.ts","sourceRoot":"","sources":["../../../src/process-heartbeat.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"process-heartbeat.d.ts","sourceRoot":"","sources":["../../../src/process-heartbeat.ts"],"names":[],"mappings":"AA0CA,OAAO,EAGL,KAAK,oBAAoB,EAE1B,MAAM,iBAAiB,CAAA;AAExB,iEAAiE;AACjE,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,YAAY,CAAA;AAEnD,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,oEAAoE;IACpE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;IACtC;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAA;CAC9C;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAG5C;AAED,wBAAgB,oBAAoB,CAClC,GAAG,GAAE,MAAoB,EACzB,GAAG,GAAE,MAA8B,GAClC,MAAM,CAER;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAO/C;AAsFD,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAA;CAC/D;AAED,MAAM,WAAW,sBAAsB;IACrC,wEAAwE;IACxE,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;IACxB;;;OAGG;IACH,OAAO,IAAI,OAAO,CAAC,IAAI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MG;AACH,wBAAsB,4BAA4B,CAChD,MAAM,EAAE,eAAe,GACtB,OAAO,CAAC,sBAAsB,CAAC,CAkBjC;AAED;;;;;;GAMG;AACH,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,eAAe,GACtB,OAAO,CAAC,IAAI,CAAC,CAEf;AAED,+DAA+D;AAC/D,wBAAgB,8BAA8B,IAAI,IAAI,CAOrD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type RuntimeLayout } from './runtime-paths.js';
|
|
1
|
+
import { type AccountStoreAnchor, type RuntimeLayout } from './runtime-paths.js';
|
|
2
2
|
import { type VersionFenceResult } from './version-fence.js';
|
|
3
3
|
export type { RuntimeLayout };
|
|
4
4
|
/** Name of the lock held while a process decides or moves the layout. */
|
|
@@ -21,6 +21,18 @@ export declare const VAULT_ENROLLMENT_STATE_FILE = "opencode-enrollment-state.js
|
|
|
21
21
|
export declare const VAULT_FILE_NAMES: readonly ["opencode-enrollment.json", "opencode-enrollment-state.json", "opencode-roster.json", "opencode-state.json", "opencode-mode.json"];
|
|
22
22
|
/** The message logged once by a process that keeps the legacy layout. */
|
|
23
23
|
export declare const RUNTIME_LAYOUT_DEFERRED_MESSAGE = "antigravity-auth keeps its vault files in OpenCode's config folder until every running OpenCode using it has restarted on this version.";
|
|
24
|
+
/**
|
|
25
|
+
* The message logged once, in plain words, by a process that keeps the
|
|
26
|
+
* account store in OpenCode's config folder because another live OpenCode
|
|
27
|
+
* could still be using it there.
|
|
28
|
+
*/
|
|
29
|
+
export declare const ACCOUNT_STORE_DEFERRED_MESSAGE = "antigravity-auth keeps the account store in OpenCode's config folder until every running OpenCode using it has restarted on this version.";
|
|
30
|
+
/**
|
|
31
|
+
* The message logged once by a process that keeps the account store in
|
|
32
|
+
* OpenCode's config folder because the state-home folder's path goes through
|
|
33
|
+
* a link, which the account store refuses to open a file through.
|
|
34
|
+
*/
|
|
35
|
+
export declare const ACCOUNT_STORE_LINKED_PATH_MESSAGE = "antigravity-auth keeps the account store in OpenCode's config folder because the path to its state folder goes through a link. Setting XDG_STATE_HOME to the real path of that folder lets it move there.";
|
|
24
36
|
/**
|
|
25
37
|
* Plugin start stops when it cannot settle a safe layout: it could not take
|
|
26
38
|
* the layout lock or write its heartbeat (so other processes could not see
|
|
@@ -32,7 +44,14 @@ export declare class RuntimeLayoutRefusal extends Error {
|
|
|
32
44
|
readonly errorClass: string;
|
|
33
45
|
constructor(stateDir: string, errorClass: string, message?: string);
|
|
34
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* Where this module reports what it did. `log` writes a line a user may want
|
|
49
|
+
* to see (a move happened, a deferral said why once); `info` and `warn` are
|
|
50
|
+
* the diagnostic stream. A logger that has no `log` reports information to
|
|
51
|
+
* `info`.
|
|
52
|
+
*/
|
|
35
53
|
export interface RuntimeLayoutLogger {
|
|
54
|
+
log?(message: string, meta?: Record<string, unknown>): unknown;
|
|
36
55
|
info(message: string, meta?: Record<string, unknown>): unknown;
|
|
37
56
|
warn(message: string, meta?: Record<string, unknown>): unknown;
|
|
38
57
|
}
|
|
@@ -76,6 +95,15 @@ export interface RuntimeLayoutOptions {
|
|
|
76
95
|
* folder. Defaults to `legacySignatureCacheFile()`.
|
|
77
96
|
*/
|
|
78
97
|
oldSignatureCacheFile?: string;
|
|
98
|
+
/**
|
|
99
|
+
* Test seam: run the account-store move by hand instead of the genuine
|
|
100
|
+
* offline relocation (`runStoreMove`). The move is the only operation that
|
|
101
|
+
* runs while the layout lock is held, and replacing it keeps this module's
|
|
102
|
+
* own tests about paths and decisions.
|
|
103
|
+
*/
|
|
104
|
+
relocate?: (input: StoreMoveInput) => Promise<StoreMoveResult>;
|
|
105
|
+
/** Test seam: the store fence; defaults to `versionFenceOpen` with `storeMove`. */
|
|
106
|
+
storeFence?: () => Promise<VersionFenceResult>;
|
|
79
107
|
}
|
|
80
108
|
/** Test seam: forget this process's runs and log lines. */
|
|
81
109
|
export declare function __resetRuntimeLayoutRunsForTest(): void;
|
|
@@ -87,6 +115,59 @@ export declare function __resetRuntimeLayoutRunsForTest(): void;
|
|
|
87
115
|
* plugin must not start.
|
|
88
116
|
*/
|
|
89
117
|
export declare function prepareRuntimeLayout(options: RuntimeLayoutOptions): Promise<RuntimeLayout>;
|
|
118
|
+
/** Read enrollment afresh; unreadable enrollment never authorizes local work. */
|
|
119
|
+
export declare function localAccountStoreAuthorized(): Promise<boolean>;
|
|
120
|
+
/**
|
|
121
|
+
* Decides, once per process, where this config folder's account store
|
|
122
|
+
* lives, and moves it into the state-home folder when that is safe. Call at
|
|
123
|
+
* a locally authorized start, or the first local use after disconnecting
|
|
124
|
+
* from the vault. The full decision and its heartbeat write hold the layout
|
|
125
|
+
* lock, including when an earlier start already moved the vault files. A
|
|
126
|
+
* process that already settled its anchor keeps it. Resolves to the anchor
|
|
127
|
+
* `getStoragePath()` in `plugin/storage.ts` now uses.
|
|
128
|
+
*
|
|
129
|
+
* An initial move runs only when every account store of this config folder
|
|
130
|
+
* is at the config folder anchor, no other live process could still be using
|
|
131
|
+
* it there (the `storeMove` fence, which also reads each heartbeat's
|
|
132
|
+
* `stores`), the state-home folder's path resolves through no link, and the
|
|
133
|
+
* store's own locks are free. Otherwise this process keeps the config folder
|
|
134
|
+
* for its whole life and says why once: a deferral is never a refusal. When
|
|
135
|
+
* a forwarding pointer already exists, its anchor is the answer whatever
|
|
136
|
+
* happens next, and an unfinished move there reports the store as unusable
|
|
137
|
+
* until a later start resumes it.
|
|
138
|
+
*/
|
|
139
|
+
export declare function prepareAccountStore(options: RuntimeLayoutOptions): Promise<AccountStoreAnchor | undefined>;
|
|
140
|
+
/** One offline store move between the two anchors of a config folder. */
|
|
141
|
+
export interface StoreMoveInput {
|
|
142
|
+
source: string;
|
|
143
|
+
target: string;
|
|
144
|
+
/** Restore the store at the config anchor, for a downgrade. */
|
|
145
|
+
back: boolean;
|
|
146
|
+
}
|
|
147
|
+
export type StoreMoveResult = {
|
|
148
|
+
status: 'completed';
|
|
149
|
+
id: string;
|
|
150
|
+
} | {
|
|
151
|
+
status: 'pending';
|
|
152
|
+
reason: string;
|
|
153
|
+
} | {
|
|
154
|
+
status: 'cancelled';
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* One offline store move with the stopped-process confirmation `migrate`
|
|
158
|
+
* takes. The start-time move and setup call it while they hold the layout
|
|
159
|
+
* lock; `antigravity-auth store relocate` takes no lock and relies on that
|
|
160
|
+
* confirmation alone, because every OpenCode is stopped.
|
|
161
|
+
*/
|
|
162
|
+
export declare function runStoreMove(input: StoreMoveInput): Promise<StoreMoveResult>;
|
|
163
|
+
/**
|
|
164
|
+
* Leaves a forwarding pointer at the config anchor for a store that now
|
|
165
|
+
* lives at the state-home anchor: the same schema-2 pointer a store move
|
|
166
|
+
* writes, so a version without the store move refuses it instead of reading
|
|
167
|
+
* "no accounts". Written atomically and durably through the account store's
|
|
168
|
+
* own writer.
|
|
169
|
+
*/
|
|
170
|
+
export declare function writeStateHomeStoreForward(id: string, stateAnchor: string, configAnchor?: string): Promise<void>;
|
|
90
171
|
/**
|
|
91
172
|
* After Disconnect, remove the enrollment state file a move left in the old
|
|
92
173
|
* vault folder, so an older version no longer reads this host as enrolled.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-layout.d.ts","sourceRoot":"","sources":["../../../src/runtime-layout.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"runtime-layout.d.ts","sourceRoot":"","sources":["../../../src/runtime-layout.ts"],"names":[],"mappings":"AA6IA,OAAO,EACL,KAAK,kBAAkB,EAUvB,KAAK,aAAa,EAQnB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,KAAK,kBAAkB,EAAoB,MAAM,iBAAiB,CAAA;AAE3E,YAAY,EAAE,aAAa,EAAE,CAAA;AAM7B,yEAAyE;AACzE,eAAO,MAAM,wBAAwB,mBAAmB,CAAA;AACxD,4EAA4E;AAC5E,eAAO,MAAM,4BAA4B,uBAAuB,CAAA;AAEhE;;;;GAI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C;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GACnC;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACrC;IAAE,MAAM,EAAE,WAAW,CAAA;CAAE,CAAA;AAE3B;;;;;GAKG;AACH,wBAAsB,YAAY,CAChC,KAAK,EAAE,cAAc,GACpB,OAAO,CAAC,eAAe,CAAC,CAe1B;AAuJD;;;;;;GAMG;AACH,wBAAsB,0BAA0B,CAC9C,EAAE,EAAE,MAAM,EACV,WAAW,EAAE,MAAM,EACnB,YAAY,GAAE,MAA6D,GAC1E,OAAO,CAAC,IAAI,CAAC,CAYf;AA2cD;;;;;;;;GAQG;AACH,wBAAsB,6BAA6B,CACjD,QAAQ,EAAE,MAAM,EAChB,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,IAAI,CAAC,CAmBf"}
|
|
@@ -15,14 +15,21 @@
|
|
|
15
15
|
* files once; until a process has decided, the layout marker alone tells.
|
|
16
16
|
*
|
|
17
17
|
* The account store (`antigravity-accounts.json`, its pointer and its
|
|
18
|
-
* generation folders)
|
|
19
|
-
*
|
|
18
|
+
* generation folders) is anchored to a folder of its own, decided once per
|
|
19
|
+
* process (`prepareRuntimeLayout` in `runtime-layout.ts`):
|
|
20
|
+
* - `config`, beside the pool file in OpenCode's config folder, where every
|
|
21
|
+
* release so far kept it;
|
|
22
|
+
* - `state-home`, in the state-home folder the vault moves to, which is
|
|
23
|
+
* where a release that can move the store keeps it.
|
|
24
|
+
* A process that has not decided reads a forwarding pointer left in the
|
|
25
|
+
* config folder (`readForwardedAccountStore`, written by the move) and
|
|
26
|
+
* otherwise follows the config folder.
|
|
20
27
|
*
|
|
21
|
-
* So `state-home` in a heartbeat's `layouts` means "vault in the state home
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
28
|
+
* So `state-home` in a heartbeat's `layouts` means "vault in the state home"
|
|
29
|
+
* and says nothing about the account store; that is the `stores` record. A
|
|
30
|
+
* process fences the store move on version (every live process at that
|
|
31
|
+
* release or newer) and on each live process's `stores` record, never on
|
|
32
|
+
* this layout value.
|
|
26
33
|
*/
|
|
27
34
|
/** In the state-home folder: present once that folder is authoritative. */
|
|
28
35
|
export declare const RUNTIME_LAYOUT_MARKER_FILE = "layout.json";
|
|
@@ -34,8 +41,14 @@ export declare const RUNTIME_CONFIG_DIR_NOTE_FILE = "config-dir.json";
|
|
|
34
41
|
* module does not load the vault code.
|
|
35
42
|
*/
|
|
36
43
|
export declare const VAULT_DIR_NAME = "antigravity-auth-vault";
|
|
37
|
-
/** The account file's name in
|
|
44
|
+
/** The account file's name, in whichever folder holds a store's anchor. */
|
|
38
45
|
export declare const ACCOUNT_FILE_NAME = "antigravity-accounts.json";
|
|
46
|
+
/**
|
|
47
|
+
* The suffix of the account store's pointer file. The pointer beside a pool
|
|
48
|
+
* file path `P` is `P.store.pointer.json`; this module reads it to find a
|
|
49
|
+
* forwarding pointer without loading the account-store code.
|
|
50
|
+
*/
|
|
51
|
+
export declare const ACCOUNT_STORE_POINTER_SUFFIX = ".store.pointer.json";
|
|
39
52
|
/**
|
|
40
53
|
* A config folder's identity: its real path as the file system spells it
|
|
41
54
|
* (symlinks resolved, on-disk case), or the resolved path when the folder
|
|
@@ -57,6 +70,16 @@ export interface RuntimeLayoutLocation {
|
|
|
57
70
|
isDefaultConfigDir: boolean;
|
|
58
71
|
}
|
|
59
72
|
export type RuntimeLayout = 'legacy' | 'state-home';
|
|
73
|
+
/**
|
|
74
|
+
* Where a process keeps one config folder's account store: beside the pool
|
|
75
|
+
* file in OpenCode's config folder (`config`), or in the state-home folder
|
|
76
|
+
* the vault moves to (`state-home`). It is recorded for each config folder
|
|
77
|
+
* in the process heartbeat (`stores` in `process-heartbeat.ts`), because a
|
|
78
|
+
* store move waits while any live process still uses the config folder.
|
|
79
|
+
*/
|
|
80
|
+
export type AccountStoreAnchor = 'config' | 'state-home';
|
|
81
|
+
/** A vault-only process has not opened or chosen a local account store. */
|
|
82
|
+
export type HeartbeatStoreRecord = AccountStoreAnchor | 'undecided';
|
|
60
83
|
/**
|
|
61
84
|
* Where this config folder's vault folder lives in the state home. Only the
|
|
62
85
|
* folder `<home>/.config/opencode` gets the plain `opencode/` folder; that is
|
|
@@ -75,6 +98,18 @@ export declare function runtimeLayoutLocation(configDir?: string): RuntimeLayout
|
|
|
75
98
|
export declare function setRuntimeLayout(location: RuntimeLayoutLocation, layout: RuntimeLayout): void;
|
|
76
99
|
/** The layout this process fixed for a config folder, if any. */
|
|
77
100
|
export declare function decidedRuntimeLayout(location: RuntimeLayoutLocation): RuntimeLayout | undefined;
|
|
101
|
+
/**
|
|
102
|
+
* Fix the account store's anchor for a config folder. Only
|
|
103
|
+
* `runtime-layout.ts` calls this, once per folder, while it holds the layout
|
|
104
|
+
* lock.
|
|
105
|
+
*/
|
|
106
|
+
export declare function setAccountStoreAnchor(location: RuntimeLayoutLocation, anchor: AccountStoreAnchor): void;
|
|
107
|
+
/**
|
|
108
|
+
* The account store's anchor for a config folder, or undefined while this
|
|
109
|
+
* process has not decided. OpenCode 1 and 2 locations of one process share
|
|
110
|
+
* it: the decision is made once per config folder.
|
|
111
|
+
*/
|
|
112
|
+
export declare function decidedAccountStoreAnchor(location: RuntimeLayoutLocation): AccountStoreAnchor | undefined;
|
|
78
113
|
/** Test seam: forget every decided layout and cached location. */
|
|
79
114
|
export declare function __resetRuntimeLayoutsForTest(): void;
|
|
80
115
|
/**
|
|
@@ -115,14 +150,63 @@ export declare function stateHomeLogsDir(): string;
|
|
|
115
150
|
* The account file a legacy-layout process uses for this config folder,
|
|
116
151
|
* without changing anything on disk: `<config>/antigravity-accounts.json`,
|
|
117
152
|
* except on Windows when that file is missing and one exists in
|
|
118
|
-
* `%APPDATA%\opencode`.
|
|
153
|
+
* `%APPDATA%\opencode`. A store migrated at the `%APPDATA%\opencode` anchor
|
|
154
|
+
* is found by its pointer there, the same choice `getStoragePath()` in
|
|
119
155
|
* `plugin/storage.ts` makes, minus its attempt to move the Windows file.
|
|
156
|
+
*
|
|
157
|
+
* A forwarding pointer at that anchor names the store's new anchor, so this
|
|
158
|
+
* is also where a process that has not decided discovers where the store is.
|
|
120
159
|
*/
|
|
121
160
|
export declare function legacyAccountFile(configDir?: string): string;
|
|
122
161
|
/** The vault folder of the legacy layout: beside the account file. */
|
|
123
162
|
export declare function legacyVaultDir(accountFile: string): string;
|
|
124
163
|
/** The vault folder of the state-home layout for one config folder. */
|
|
125
164
|
export declare function stateHomeVaultDir(location: RuntimeLayoutLocation): string;
|
|
165
|
+
/** The account file's path when the store stays in OpenCode's config folder. */
|
|
166
|
+
export declare function accountStorePointerPath(accountFile: string): string;
|
|
167
|
+
/**
|
|
168
|
+
* The account file's path when the store lives in the state-home folder: the
|
|
169
|
+
* same file name, in the folder the vault moves to. It is spelled with the
|
|
170
|
+
* real path of that folder wherever it exists, because the account store
|
|
171
|
+
* refuses a path whose folder goes through a link, and the state home often
|
|
172
|
+
* does (`/var` on macOS, a linked `~/.local/state`).
|
|
173
|
+
*/
|
|
174
|
+
export declare function stateHomeAccountFile(location: RuntimeLayoutLocation): string;
|
|
175
|
+
/**
|
|
176
|
+
* True when `path` is spelled with every folder it sits in resolved through
|
|
177
|
+
* any link. An account file must be: the store refuses one whose folder goes
|
|
178
|
+
* through a link, so a store move waits until the user sets XDG_STATE_HOME to
|
|
179
|
+
* the real path.
|
|
180
|
+
*/
|
|
181
|
+
export declare function folderResolvesToItself(path: string): boolean;
|
|
182
|
+
/** What a forwarding pointer at one anchor says. */
|
|
183
|
+
export interface ForwardedAccountStore {
|
|
184
|
+
/** The anchor the store moved to, as the forward spells it. */
|
|
185
|
+
legacyPath: string;
|
|
186
|
+
/** The generation id published at that anchor. */
|
|
187
|
+
id: string;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* The forwarding pointer at `anchor`, or undefined when there is none. A
|
|
191
|
+
* pointer that cannot be read or parsed is not a forward: every account-store
|
|
192
|
+
* reader decodes it again and refuses with its own reason, which is where a
|
|
193
|
+
* damaged pointer must fail. A pointer of schema 1 (an unmoved store) is not a
|
|
194
|
+
* forward either.
|
|
195
|
+
*/
|
|
196
|
+
export declare function readForwardedAccountStore(anchor: string): ForwardedAccountStore | undefined;
|
|
197
|
+
/**
|
|
198
|
+
* The anchor one folder's store is read at by a process that has not decided
|
|
199
|
+
* its own: the forward left beside the pool file in the config folder names
|
|
200
|
+
* the anchor the store moved to, and otherwise the store is where every
|
|
201
|
+
* release before the move kept it (the config folder, or the legacy Windows
|
|
202
|
+
* folder its pointer lives in).
|
|
203
|
+
*/
|
|
204
|
+
export declare function discoveredAccountFile(location?: RuntimeLayoutLocation): string;
|
|
205
|
+
/**
|
|
206
|
+
* Whether the file or folder `path` exists, following no link: a broken link
|
|
207
|
+
* counts as present, so a caller never treats one as a fresh install.
|
|
208
|
+
*/
|
|
209
|
+
export declare function pathPresent(path: string): Promise<boolean>;
|
|
126
210
|
/**
|
|
127
211
|
* The folder holding this config folder's vault files, for this process:
|
|
128
212
|
* the state-home vault folder in the state-home layout, and the folder beside
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-paths.d.ts","sourceRoot":"","sources":["../../../src/runtime-paths.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"runtime-paths.d.ts","sourceRoot":"","sources":["../../../src/runtime-paths.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAaH,2EAA2E;AAC3E,eAAO,MAAM,0BAA0B,gBAAgB,CAAA;AACvD,iFAAiF;AACjF,eAAO,MAAM,4BAA4B,oBAAoB,CAAA;AAC7D;;;;GAIG;AACH,eAAO,MAAM,cAAc,2BAA2B,CAAA;AACtD,2EAA2E;AAC3E,eAAO,MAAM,iBAAiB,8BAA8B,CAAA;AAC5D;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,wBAAwB,CAAA;AAEjE;;;;;;;GAOG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
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../src/setup.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../src/setup.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAC/C,OAAO,EAIL,KAAK,oBAAoB,EAEzB,KAAK,OAAO,EACZ,KAAK,WAAW,EACjB,MAAM,uCAAuC,CAAA;AAC9C,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAA;AAsF9E;;;GAGG;AACH,wBAAsB,wBAAwB,CAC5C,UAAU,EAAE,MAAM,EAClB,UAAU,CAAC,EAAE,oBAAoB,CAAC,oBAAoB,CAAC,GACtD,OAAO,CAAC,IAAI,CAAC,CAwBf;AAED,wBAAsB,uBAAuB,IAAI,OAAO,CAAC,IAAI,CAAC,CAE7D;AA4CD,2EAA2E;AAC3E,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,+BAA+B,EACvC,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,IAAI,CAAC,CAWf;AAED,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,eAAe,EACrB,eAAe,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,EACtC,UAAU,UAAQ,GACjB,OAAO,CAAC,WAAW,CAAC,CAwTtB;AAED,2FAA2F;AAC3F,wBAAsB,cAAc,CAClC,IAAI,EAAE,MAAM,EAAE,EACd,IAAI,EAAE,eAAe,EACrB,eAAe,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,EACtC,EAAE,GAAE,OAAY,GACf,OAAO,CAAC,IAAI,CAAC,CAOf"}
|
|
@@ -28,6 +28,8 @@ export declare function prepareVaultFolder(options: {
|
|
|
28
28
|
log?: RuntimeLayoutLogger;
|
|
29
29
|
/** Test seam: how long to wait for the layout lock. */
|
|
30
30
|
layoutLockWaitMs?: number;
|
|
31
|
+
/** Setup may inspect/migrate an existing store before preparing its anchor. */
|
|
32
|
+
accountStore?: boolean;
|
|
31
33
|
}): Promise<VaultFolder>;
|
|
32
34
|
/**
|
|
33
35
|
* The vault folder for code that runs after its entry point prepared: the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vault-folder.d.ts","sourceRoot":"","sources":["../../../src/vault-folder.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vault-folder.d.ts","sourceRoot":"","sources":["../../../src/vault-folder.ts"],"names":[],"mappings":"AAuBA,OAAO,EAGL,KAAK,mBAAmB,EACxB,oBAAoB,EACrB,MAAM,kBAAkB,CAAA;AAGzB,gEAAgE;AAChE,MAAM,WAAW,WAAW;IAC1B,4EAA4E;IAC5E,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,sEAAsE;IACtE,QAAQ,CAAC,OAAO,CAAC,EAAE,oBAAoB,CAAA;CACxC;AAmBD,yDAAyD;AACzD,wBAAgB,0BAA0B,IAAI,IAAI,CAEjD;AAED;;;;;;;GAOG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE;IAChD,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,GAAG,CAAC,EAAE,mBAAmB,CAAA;IACzB,uDAAuD;IACvD,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,+EAA+E;IAC/E,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,GAAG,OAAO,CAAC,WAAW,CAAC,CAuCvB;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,WAAW,CAKnE"}
|
|
@@ -29,6 +29,12 @@ export interface VersionFenceOptions {
|
|
|
29
29
|
* also keeps the fence shut.
|
|
30
30
|
*/
|
|
31
31
|
layoutMove?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Set when the account store is about to move: a live process that names no
|
|
34
|
+
* `stores` record, or that keeps the store in the config folder for any
|
|
35
|
+
* config folder, also keeps the fence shut.
|
|
36
|
+
*/
|
|
37
|
+
storeMove?: boolean;
|
|
32
38
|
}
|
|
33
39
|
/**
|
|
34
40
|
* The XDG state base every state-home file of the plugin lives under:
|
|
@@ -51,4 +57,35 @@ export declare function compareVersions(a: string, b: string): number | undefine
|
|
|
51
57
|
* it cannot establish counts as a blocker.
|
|
52
58
|
*/
|
|
53
59
|
export declare function versionFenceOpen(options: VersionFenceOptions): Promise<VersionFenceResult>;
|
|
60
|
+
/**
|
|
61
|
+
* Where a live heartbeat says a config folder's account store is kept
|
|
62
|
+
* (`stores` in `process-heartbeat.ts`): `config`, `state-home`, or unknown
|
|
63
|
+
* when the heartbeat names none for that folder or names something this
|
|
64
|
+
* release does not recognize. An unknown reading never counts as the new
|
|
65
|
+
* anchor, because the process's paths may still be the config folder's.
|
|
66
|
+
*/
|
|
67
|
+
export declare function heartbeatStoreAnchor(stores: Record<string, unknown> | undefined, key: string): 'config' | 'state-home' | 'undecided' | 'unknown';
|
|
68
|
+
/** What the other live processes say about one config folder's store. */
|
|
69
|
+
export interface StoreAnchorReading {
|
|
70
|
+
/** A live process keeps this folder's store in the config folder. */
|
|
71
|
+
configFolder: VersionFenceBlocker[];
|
|
72
|
+
/** A live process's anchor is unknown: no `stores` entry, or unreadable. */
|
|
73
|
+
unknown: VersionFenceBlocker[];
|
|
74
|
+
/** No live process holds anything but the state-home anchor. */
|
|
75
|
+
settled: boolean;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Reads which live processes could still hold one config folder's store in
|
|
79
|
+
* the config folder. Covers heartbeats (their `stores` record) and RPC port
|
|
80
|
+
* files, which name only a version and a pid and therefore always count as
|
|
81
|
+
* unknown while live. Never throws: anything it cannot establish counts
|
|
82
|
+
* against a move. The version rules on the same records are the
|
|
83
|
+
* `storeMove` fence of `versionFenceOpen`.
|
|
84
|
+
*/
|
|
85
|
+
export declare function readStoreAnchors(options: {
|
|
86
|
+
stateHome?: string;
|
|
87
|
+
rpcDir?: string;
|
|
88
|
+
isAlive?: (pid: number) => boolean;
|
|
89
|
+
selfPid?: number;
|
|
90
|
+
}, key: string): Promise<StoreAnchorReading>;
|
|
54
91
|
//# sourceMappingURL=version-fence.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-fence.d.ts","sourceRoot":"","sources":["../../../src/version-fence.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"version-fence.d.ts","sourceRoot":"","sources":["../../../src/version-fence.ts"],"names":[],"mappings":"AAgDA,kDAAkD;AAClD,MAAM,WAAW,mBAAmB;IAClC,4DAA4D;IAC5D,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;IACvB,oEAAoE;IACpE,OAAO,EAAE,MAAM,CAAA;IACf,4CAA4C;IAC5C,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,MAAM,kBAAkB,GAC1B;IAAE,IAAI,EAAE,IAAI,CAAA;CAAE,GACd;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,QAAQ,EAAE,mBAAmB,EAAE,CAAA;CAAE,CAAA;AAEpD,MAAM,WAAW,mBAAmB;IAClC,6EAA6E;IAC7E,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,6EAA6E;IAC7E,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,qCAAqC;IACrC,cAAc,EAAE,MAAM,CAAA;IACtB,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAA;IAClC,0EAA0E;IAC1E,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED,iEAAiE;AACjE,wBAAgB,mBAAmB,CAAC,SAAS,SAAqB,GAAG,MAAM,CAE1E;AAED,4DAA4D;AAC5D,wBAAgB,YAAY,CAAC,SAAS,SAAqB,GAAG,MAAM,CAEnE;AA+BD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CA2BxE;AAwED;;;GAGG;AACH,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,kBAAkB,CAAC,CAwF7B;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EAC3C,GAAG,EAAE,MAAM,GACV,QAAQ,GAAG,YAAY,GAAG,WAAW,GAAG,SAAS,CAKnD;AAED,yEAAyE;AACzE,MAAM,WAAW,kBAAkB;IACjC,qEAAqE;IACrE,YAAY,EAAE,mBAAmB,EAAE,CAAA;IACnC,4EAA4E;IAC5E,OAAO,EAAE,mBAAmB,EAAE,CAAA;IAC9B,gEAAgE;IAChE,OAAO,EAAE,OAAO,CAAA;CACjB;AAED;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CACpC,OAAO,EAAE;IACP,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAA;IAClC,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,EACD,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,kBAAkB,CAAC,CAyE7B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cortexkit/opencode-antigravity-auth",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.17",
|
|
4
4
|
"description": "Google Antigravity OAuth auth plugin for OpenCode - access Gemini and Claude models using Google credentials",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -130,8 +130,8 @@
|
|
|
130
130
|
"dependencies": {
|
|
131
131
|
"@cortexkit/claustrum-client": "0.12.0",
|
|
132
132
|
"@cortexkit/subc-client": "0.22.5",
|
|
133
|
-
"@cortexkit/antigravity-auth-core": "3.0.
|
|
134
|
-
"@cortexkit/private-files": "0.2.
|
|
133
|
+
"@cortexkit/antigravity-auth-core": "3.0.17",
|
|
134
|
+
"@cortexkit/private-files": "0.2.2",
|
|
135
135
|
"jsonc-parser": "^3.3.1",
|
|
136
136
|
"xdg-basedir": "^5.1.0",
|
|
137
137
|
"zod": "^4.0.0"
|
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
export declare function isLostMarkerRaceError(error: unknown): boolean;
|
|
2
|
+
/** Test-only fault injection between marker mkdir and owner.json write. */
|
|
3
|
+
export interface EvictionMarkerTestHooks {
|
|
4
|
+
/** Runs after the exclusive mkdir (and identity capture) before owner write. */
|
|
5
|
+
beforeOwnerWrite?: (evictPath: string, ownerPath: string) => Promise<void> | void;
|
|
6
|
+
/** Throw to fail the owner write; return an error to throw it. */
|
|
7
|
+
failOwnerWrite?: (evictPath: string, ownerPath: string) => Promise<unknown> | unknown;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Tests only: inject a failure or a directory replacement between the
|
|
11
|
+
* eviction-marker mkdir and its owner.json write. Production never sets this.
|
|
12
|
+
* Not exported from the fs entry point, so it is not part of the public API.
|
|
13
|
+
*/
|
|
14
|
+
export declare function setEvictionMarkerTestHooksForTest(hooks?: EvictionMarkerTestHooks): void;
|
|
2
15
|
export interface LockLoss {
|
|
3
16
|
readonly reason: 'taken-over' | 'expired' | 'unreadable' | 'renewal-failed' | 'marker-lost';
|
|
4
17
|
readonly expectedOwnerId: string;
|