sidekick-shared 0.27.4 → 0.27.6
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/CHANGELOG.md +43 -0
- package/README.md +92 -45
- package/dist/accountHealth.d.ts +14 -0
- package/dist/accountHealth.js +61 -14
- package/dist/accountLaunch.d.ts +6 -0
- package/dist/accountLaunch.js +61 -4
- package/dist/accountLease.d.ts +5 -0
- package/dist/accountLease.js +98 -0
- package/dist/accountManager.d.ts +7 -0
- package/dist/accountManager.js +226 -89
- package/dist/accountSync.d.ts +1 -5
- package/dist/accountSync.js +22 -6
- package/dist/accountSyncTypes.d.ts +9 -0
- package/dist/accounts.d.ts +75 -18
- package/dist/accounts.js +712 -189
- package/dist/claudeCredentialDoctor.d.ts +50 -0
- package/dist/claudeCredentialDoctor.js +277 -0
- package/dist/claudeCredentialLedger.d.ts +15 -0
- package/dist/claudeCredentialLedger.js +130 -0
- package/dist/claudeCredentials.d.ts +20 -3
- package/dist/claudeCredentials.js +50 -3
- package/dist/claudeLiveGuard.d.ts +33 -0
- package/dist/claudeLiveGuard.js +46 -0
- package/dist/claudeProfiles.d.ts +14 -0
- package/dist/claudeProfiles.js +22 -0
- package/dist/claudeRefreshLock.d.ts +15 -0
- package/dist/claudeRefreshLock.js +145 -0
- package/dist/codexAuth.d.ts +4 -0
- package/dist/codexAuth.js +18 -0
- package/dist/codexCredentialDoctor.d.ts +33 -0
- package/dist/codexCredentialDoctor.js +302 -0
- package/dist/codexCredentialStore.d.ts +29 -0
- package/dist/codexCredentialStore.js +213 -0
- package/dist/codexKeepAlive.d.ts +2 -0
- package/dist/codexKeepAlive.js +116 -0
- package/dist/codexPaths.d.ts +8 -2
- package/dist/codexPaths.js +51 -7
- package/dist/codexProfiles.d.ts +37 -31
- package/dist/codexProfiles.js +842 -671
- package/dist/credentialIO.d.ts +67 -7
- package/dist/credentialIO.js +211 -47
- package/dist/ensureDefaultAccounts.js +1 -8
- package/dist/index.d.ts +17 -4
- package/dist/index.js +36 -11
- package/dist/keepAlive.d.ts +2 -1
- package/dist/keepAlive.js +116 -29
- package/dist/liveCredentialGuard.d.ts +28 -0
- package/dist/liveCredentialGuard.js +36 -0
- package/dist/node.d.ts +3 -0
- package/dist/node.js +4 -2
- package/dist/processDetection.d.ts +10 -3
- package/dist/processDetection.js +44 -11
- package/dist/promptHistory.d.ts +66 -0
- package/dist/promptHistory.js +37 -18
- package/dist/schemas/accountManager.d.ts +22 -0
- package/dist/schemas/accountManager.js +4 -0
- package/dist/schemas/assistantTurn.d.ts +2 -2
- package/dist/sessionPromptHistory.d.ts +120 -0
- package/dist/sessionPromptHistory.js +278 -0
- package/dist/sessionPromptSignals.d.ts +56 -0
- package/dist/sessionPromptSignals.js +355 -0
- package/dist/terminalSync.d.ts +12 -2
- package/dist/terminalSync.js +27 -2
- package/package.json +1 -1
package/dist/terminalSync.d.ts
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
import type { AccountProviderId } from './accountRegistry';
|
|
2
2
|
/**
|
|
3
|
-
* Write a POSIX launcher script that runs the provider CLI
|
|
4
|
-
*
|
|
3
|
+
* Write a POSIX launcher script that runs the provider CLI as a saved account.
|
|
4
|
+
* The script defers to `sidekick accounts shell` at run time, which resolves
|
|
5
|
+
* the right home then: the account's profile home while it is inactive, the
|
|
6
|
+
* live home while it is the live login (a session pinned to the profile home
|
|
7
|
+
* would otherwise be a second copy of the live login). Unix only; on Windows
|
|
8
|
+
* use `sidekick accounts env --shell powershell`.
|
|
9
|
+
*/
|
|
10
|
+
export declare function writeAccountLauncher(name: string, provider: AccountProviderId, accountId: string): void;
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated Pins a launcher to one profile home; when that account becomes
|
|
13
|
+
* the live login the launcher runs a second copy of it. Use
|
|
14
|
+
* {@link writeAccountLauncher}.
|
|
5
15
|
*/
|
|
6
16
|
export declare function writeLauncher(name: string, provider: AccountProviderId, profileHome: string): void;
|
|
7
17
|
export declare function removeLauncher(name: string): void;
|
package/dist/terminalSync.js
CHANGED
|
@@ -33,6 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.writeAccountLauncher = writeAccountLauncher;
|
|
36
37
|
exports.writeLauncher = writeLauncher;
|
|
37
38
|
exports.removeLauncher = removeLauncher;
|
|
38
39
|
const fs = __importStar(require("fs"));
|
|
@@ -79,9 +80,33 @@ function assertNoLauncherCollision(name, targetPath) {
|
|
|
79
80
|
}
|
|
80
81
|
}
|
|
81
82
|
}
|
|
83
|
+
function shellSingleQuote(value) {
|
|
84
|
+
return `'${value.replace(/'/g, `'\\''`)}'`;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Write a POSIX launcher script that runs the provider CLI as a saved account.
|
|
88
|
+
* The script defers to `sidekick accounts shell` at run time, which resolves
|
|
89
|
+
* the right home then: the account's profile home while it is inactive, the
|
|
90
|
+
* live home while it is the live login (a session pinned to the profile home
|
|
91
|
+
* would otherwise be a second copy of the live login). Unix only; on Windows
|
|
92
|
+
* use `sidekick accounts env --shell powershell`.
|
|
93
|
+
*/
|
|
94
|
+
function writeAccountLauncher(name, provider, accountId) {
|
|
95
|
+
assertValidLauncherName(name);
|
|
96
|
+
const launcherPath = getLauncherPath(name);
|
|
97
|
+
assertNoLauncherCollision(name, launcherPath);
|
|
98
|
+
const script = [
|
|
99
|
+
'#!/bin/sh',
|
|
100
|
+
LAUNCHER_MARKER,
|
|
101
|
+
`exec sidekick accounts shell --provider ${provider} ${shellSingleQuote(accountId)} -- ${providerBinary(provider)} "$@"`,
|
|
102
|
+
'',
|
|
103
|
+
].join('\n');
|
|
104
|
+
(0, atomic_1.atomicWriteFileSync)(launcherPath, script, 0o755);
|
|
105
|
+
}
|
|
82
106
|
/**
|
|
83
|
-
*
|
|
84
|
-
*
|
|
107
|
+
* @deprecated Pins a launcher to one profile home; when that account becomes
|
|
108
|
+
* the live login the launcher runs a second copy of it. Use
|
|
109
|
+
* {@link writeAccountLauncher}.
|
|
85
110
|
*/
|
|
86
111
|
function writeLauncher(name, provider, profileHome) {
|
|
87
112
|
assertValidLauncherName(name);
|