sidekick-shared 0.20.0 → 0.21.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 +12 -0
- package/dist/accountManager.d.ts +52 -0
- package/dist/accountManager.js +344 -0
- package/dist/accounts.d.ts +3 -0
- package/dist/accounts.js +180 -40
- package/dist/autoSwitch.d.ts +70 -0
- package/dist/autoSwitch.js +160 -0
- package/dist/claudeProfiles.d.ts +12 -0
- package/dist/claudeProfiles.js +96 -0
- package/dist/codexProfiles.d.ts +6 -2
- package/dist/codexProfiles.js +6 -1
- package/dist/credentialIO.d.ts +3 -2
- package/dist/credentialIO.js +11 -9
- package/dist/ensureDefaultAccounts.js +6 -0
- package/dist/index.d.ts +9 -1
- package/dist/index.js +41 -3
- package/dist/schemas/accountManager.d.ts +104 -0
- package/dist/schemas/accountManager.js +84 -0
- package/dist/schemas/assistantTurn.d.ts +5 -5
- package/dist/schemas/index.d.ts +4 -0
- package/dist/schemas/index.js +9 -1
- package/dist/schemas/quota.d.ts +20 -20
- package/dist/schemas/quotaHistory.d.ts +1 -1
- package/dist/terminalSync.d.ts +7 -0
- package/dist/terminalSync.js +202 -0
- package/package.json +1 -1
package/dist/codexProfiles.js
CHANGED
|
@@ -37,6 +37,8 @@ exports.getSystemCodexHome = getSystemCodexHome;
|
|
|
37
37
|
exports.getCodexMonitoringHomes = getCodexMonitoringHomes;
|
|
38
38
|
exports.getCodexProfilesDir = getCodexProfilesDir;
|
|
39
39
|
exports.getCodexProfileHome = getCodexProfileHome;
|
|
40
|
+
exports.readCodexAccountMetadata = readCodexAccountMetadata;
|
|
41
|
+
exports.isCodexProfileAuthenticated = isCodexProfileAuthenticated;
|
|
40
42
|
exports.listCodexAccounts = listCodexAccounts;
|
|
41
43
|
exports.getActiveCodexAccount = getActiveCodexAccount;
|
|
42
44
|
exports.resolveSidekickCodexHome = resolveSidekickCodexHome;
|
|
@@ -378,7 +380,7 @@ function prepareCodexAccount(label) {
|
|
|
378
380
|
needsLogin: true,
|
|
379
381
|
};
|
|
380
382
|
}
|
|
381
|
-
function finalizeCodexAccount(profileId) {
|
|
383
|
+
function finalizeCodexAccount(profileId, opts = {}) {
|
|
382
384
|
const pending = readPendingProfile(profileId);
|
|
383
385
|
if (!pending) {
|
|
384
386
|
return { success: false, error: `Codex profile ${profileId} was not prepared.` };
|
|
@@ -397,6 +399,9 @@ function finalizeCodexAccount(profileId) {
|
|
|
397
399
|
metadata,
|
|
398
400
|
};
|
|
399
401
|
(0, accountRegistry_1.upsertSavedAccountProfile)(profile);
|
|
402
|
+
if (opts.activate === false) {
|
|
403
|
+
return { success: true };
|
|
404
|
+
}
|
|
400
405
|
const hasCredentialFiles = fs.existsSync(path.join(codexHome, 'auth.json')) ||
|
|
401
406
|
fs.existsSync(path.join(codexHome, '.credentials.json'));
|
|
402
407
|
if (!hasCredentialFiles) {
|
package/dist/credentialIO.d.ts
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* Both accounts.ts and credentials.ts consume this module so that all
|
|
9
9
|
* credential access is platform-correct in one place.
|
|
10
10
|
*/
|
|
11
|
+
export declare const KEYCHAIN_SERVICE = "Claude Code-credentials";
|
|
11
12
|
/**
|
|
12
13
|
* Read the active Claude Code credentials as a parsed object.
|
|
13
14
|
*
|
|
@@ -16,7 +17,7 @@
|
|
|
16
17
|
*
|
|
17
18
|
* Returns `null` when credentials are absent or unreadable.
|
|
18
19
|
*/
|
|
19
|
-
export declare function readActiveCredentials(): unknown;
|
|
20
|
+
export declare function readActiveCredentials(configDir?: string): unknown;
|
|
20
21
|
/**
|
|
21
22
|
* Write credentials to the active Claude Code credential store.
|
|
22
23
|
*
|
|
@@ -25,4 +26,4 @@ export declare function readActiveCredentials(): unknown;
|
|
|
25
26
|
*
|
|
26
27
|
* Throws on failure.
|
|
27
28
|
*/
|
|
28
|
-
export declare function writeActiveCredentials(credentials: unknown): void;
|
|
29
|
+
export declare function writeActiveCredentials(credentials: unknown, configDir?: string): void;
|
package/dist/credentialIO.js
CHANGED
|
@@ -43,15 +43,17 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
43
43
|
};
|
|
44
44
|
})();
|
|
45
45
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
+
exports.KEYCHAIN_SERVICE = void 0;
|
|
46
47
|
exports.readActiveCredentials = readActiveCredentials;
|
|
47
48
|
exports.writeActiveCredentials = writeActiveCredentials;
|
|
48
49
|
const fs = __importStar(require("fs"));
|
|
49
50
|
const path = __importStar(require("path"));
|
|
50
51
|
const os = __importStar(require("os"));
|
|
51
52
|
const child_process_1 = require("child_process");
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
const claudeProfiles_1 = require("./claudeProfiles");
|
|
54
|
+
exports.KEYCHAIN_SERVICE = 'Claude Code-credentials';
|
|
55
|
+
function getCredentialsFilePath(configDir) {
|
|
56
|
+
return path.join(configDir ?? path.join(os.homedir(), '.claude'), '.credentials.json');
|
|
55
57
|
}
|
|
56
58
|
/**
|
|
57
59
|
* Read the active Claude Code credentials as a parsed object.
|
|
@@ -61,11 +63,11 @@ function getCredentialsFilePath() {
|
|
|
61
63
|
*
|
|
62
64
|
* Returns `null` when credentials are absent or unreadable.
|
|
63
65
|
*/
|
|
64
|
-
function readActiveCredentials() {
|
|
66
|
+
function readActiveCredentials(configDir) {
|
|
65
67
|
if (process.platform === 'darwin') {
|
|
66
68
|
try {
|
|
67
69
|
const raw = (0, child_process_1.execFileSync)('security', [
|
|
68
|
-
'find-generic-password', '-s',
|
|
70
|
+
'find-generic-password', '-s', (0, claudeProfiles_1.claudeKeychainService)(configDir), '-w',
|
|
69
71
|
], { encoding: 'utf8', stdio: ['pipe', 'pipe', 'pipe'] });
|
|
70
72
|
return JSON.parse(raw.trim());
|
|
71
73
|
}
|
|
@@ -75,7 +77,7 @@ function readActiveCredentials() {
|
|
|
75
77
|
}
|
|
76
78
|
// Linux / WSL / Windows — file-based
|
|
77
79
|
try {
|
|
78
|
-
return JSON.parse(fs.readFileSync(getCredentialsFilePath(), 'utf8'));
|
|
80
|
+
return JSON.parse(fs.readFileSync(getCredentialsFilePath(configDir), 'utf8'));
|
|
79
81
|
}
|
|
80
82
|
catch {
|
|
81
83
|
return null;
|
|
@@ -89,20 +91,20 @@ function readActiveCredentials() {
|
|
|
89
91
|
*
|
|
90
92
|
* Throws on failure.
|
|
91
93
|
*/
|
|
92
|
-
function writeActiveCredentials(credentials) {
|
|
94
|
+
function writeActiveCredentials(credentials, configDir) {
|
|
93
95
|
const json = JSON.stringify(credentials);
|
|
94
96
|
JSON.parse(json); // validate round-trip
|
|
95
97
|
if (process.platform === 'darwin') {
|
|
96
98
|
(0, child_process_1.execFileSync)('security', [
|
|
97
99
|
'add-generic-password', '-U',
|
|
98
|
-
'-s',
|
|
100
|
+
'-s', (0, claudeProfiles_1.claudeKeychainService)(configDir),
|
|
99
101
|
'-a', process.env.USER || 'user',
|
|
100
102
|
'-w', json,
|
|
101
103
|
], { stdio: ['pipe', 'pipe', 'pipe'] });
|
|
102
104
|
return;
|
|
103
105
|
}
|
|
104
106
|
// Linux / WSL / Windows — file-based
|
|
105
|
-
const credPath = getCredentialsFilePath();
|
|
107
|
+
const credPath = getCredentialsFilePath(configDir);
|
|
106
108
|
const tmp = credPath + '.tmp';
|
|
107
109
|
fs.writeFileSync(tmp, json, { encoding: 'utf8', mode: 0o600 });
|
|
108
110
|
fs.renameSync(tmp, credPath);
|
|
@@ -96,6 +96,12 @@ function ensureDefaultCodexAccount(options) {
|
|
|
96
96
|
async function ensureDefaultAccounts(options) {
|
|
97
97
|
const claude = await ensureDefaultClaudeAccount(options);
|
|
98
98
|
const codex = ensureDefaultCodexAccount(options);
|
|
99
|
+
try {
|
|
100
|
+
(0, accounts_1.reconcileClaudeAuthState)();
|
|
101
|
+
}
|
|
102
|
+
catch (error) {
|
|
103
|
+
logFailure(options, 'Claude auth reconciliation failed.', error);
|
|
104
|
+
}
|
|
99
105
|
try {
|
|
100
106
|
(0, codexProfiles_1.reconcileCodexAuthState)();
|
|
101
107
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -93,14 +93,21 @@ export { readClaudeMaxCredentials, readClaudeMaxAccessTokenSync } from './creden
|
|
|
93
93
|
export type { ClaudeMaxCredentials } from './credentials';
|
|
94
94
|
export { ensureDefaultAccounts, } from './ensureDefaultAccounts';
|
|
95
95
|
export type { EnsureDefaultAccountStatus, EnsureDefaultAccountsOptions, EnsureDefaultAccountsResult, } from './ensureDefaultAccounts';
|
|
96
|
-
export { readAccountRegistry, writeAccountRegistry, readActiveClaudeAccount, addCurrentAccount, switchToAccount, removeAccount, listAccounts, getActiveAccount, isMultiAccountEnabled, } from './accounts';
|
|
96
|
+
export { readAccountRegistry, writeAccountRegistry, readActiveClaudeAccount, addCurrentAccount, switchToAccount, resolveActiveClaudeHome, applyActiveClaudeToLiveHome, reconcileClaudeAuthState, removeAccount, listAccounts, getActiveAccount, isMultiAccountEnabled, } from './accounts';
|
|
97
97
|
export type { AccountEntry, AccountRegistry, ActiveAccountInfo, AccountManagerResult } from './accounts';
|
|
98
|
+
export { beginAccountLogin, getAccountLoginStatus, finalizeAccountLogin, spawnAccountLogin, switchAccount, listAllAccounts, resolveClaudeLoginCommand, } from './accountManager';
|
|
99
|
+
export type { AccountLoginCommand, AccountLoginState, AccountLoginStatus, BeginAccountLoginResult, FinalizeAccountLoginOptions, ListAllAccountsResult, SpawnAccountLoginOptions, } from './accountManager';
|
|
98
100
|
export { getAccountsDir, readSavedAccountRegistry, writeSavedAccountRegistry, listSavedAccountProfiles, getActiveSavedAccount, upsertSavedAccountProfile, setActiveSavedAccount, replaceSavedAccountProfiles, removeSavedAccountProfile, } from './accountRegistry';
|
|
99
101
|
export type { AccountProviderId, AccountIdentityMetadata, SavedAccountProfile, SavedAccountRegistry, } from './accountRegistry';
|
|
100
102
|
export { getActiveAccountStatus } from './accountStatus';
|
|
101
103
|
export type { ActiveAccountStatus, ActiveProviderAccountStatus } from './accountStatus';
|
|
104
|
+
export { getClaudeProfilesDir, getClaudeProfileHome, claudeKeychainSuffix, claudeKeychainService, isClaudeProfileAuthenticated, readClaudeProfileIdentity, } from './claudeProfiles';
|
|
105
|
+
export type { ClaudeProfileIdentity } from './claudeProfiles';
|
|
102
106
|
export { getCodexProfilesDir, getCodexProfileHome, getCodexMonitoringHomes, getSystemCodexHome, listCodexAccounts, getActiveCodexAccount, resolveSidekickCodexHome, getCodexExecutionEnv, prepareCodexAccount, finalizeCodexAccount, switchToCodexAccount, removeCodexAccount, } from './codexProfiles';
|
|
103
107
|
export type { CodexAccountManagerResult } from './codexProfiles';
|
|
108
|
+
export { setTerminalActiveProfile, installShellHook, uninstallShellHook, isShellHookInstalled, writeLauncher, removeLauncher, } from './terminalSync';
|
|
109
|
+
export { DEFAULT_AUTO_SWITCH_CONFIG, decideAutoSwitch, AutoSwitchController, } from './autoSwitch';
|
|
110
|
+
export type { AutoSwitchActiveAccount, AutoSwitchCandidate, AutoSwitchConfig, AutoSwitchControllerOptions, AutoSwitchDecision, AutoSwitchTransitionEvent, } from './autoSwitch';
|
|
104
111
|
export { fetchQuota } from './quota';
|
|
105
112
|
export type { QuotaWindow, QuotaState } from './quota';
|
|
106
113
|
export { describeQuotaFailure } from './quotaPresentation';
|
|
@@ -134,6 +141,7 @@ export { messageUsageSchema, sessionMessageSchema, sessionEventSchema, permissio
|
|
|
134
141
|
export { quotaWindowSchema, quotaStateSchema, quotaFailureKindSchema, quotaProviderIdSchema, quotaSourceSchema, peakHoursStateSchema, quotaFailureDescriptorSchema, runtimeQuotaProviderSchema, providerQuotaStateSchema, claudeProviderQuotaStateSchema, codexProviderQuotaStateSchema, providerQuotaMapSchema, } from './schemas/quota';
|
|
135
142
|
export { quotaHistoryRuntimeProviderSchema, quotaHistorySampleSchema, quotaHistoryDailyBucketSchema, } from './schemas/quotaHistory';
|
|
136
143
|
export { activeProviderAccountStatusSchema, activeAccountStatusSchema, } from './schemas/accountStatus';
|
|
144
|
+
export { accountProviderIdSchema, accountManagerResultSchema, beginAccountLoginResultSchema, accountLoginStatusSchema, accountEntrySchema, savedAccountProfileSchema, listAllAccountsResultSchema, } from './schemas/accountManager';
|
|
137
145
|
export { assistantTurnEventSchema, assistantTurnEventTypeSchema, assistantTurnNarrationStepSchema, assistantTurnProcessSchema, assistantTurnProcessStepSchema, assistantTurnProjectionSchema, assistantTurnReasoningTimelineItemSchema, assistantTurnSubagentSchema, assistantTurnSubagentStatusSchema, assistantTurnTimelineItemSchema, assistantTurnToolGroupStepSchema, assistantTurnToolRefSchema, } from './schemas/assistantTurn';
|
|
138
146
|
export { fetchProviderStatus, fetchOpenAIStatus } from './providerStatus';
|
|
139
147
|
export type { ProviderStatusState } from './providerStatus';
|
package/dist/index.js
CHANGED
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.findActiveClaudeSession = exports.discoverSessionDirectory = exports.getClaudeSessionDirectory = exports.encodeClaudeWorkspacePath = exports.detectSessionActivity = exports.extractTaskInfo = exports.scanSubagentDir = exports.normalizeCodexToolInput = exports.normalizeCodexToolName = exports.extractPatchFilePaths = exports.CodexRolloutParser = exports.parseDbPartData = exports.parseDbMessageData = exports.convertOpenCodeMessage = exports.detectPlanModeFromText = exports.normalizeToolInput = exports.normalizeToolName = exports.TRUNCATION_PATTERNS = exports.JsonlParser = exports.CodexProvider = exports.OpenCodeProvider = exports.ClaudeCodeProvider = exports.getAllDetectedProviders = exports.detectProvider = exports.readClaudeCodePlanFiles = exports.getPlanAnalytics = exports.writePlans = exports.getLatestPlan = exports.readPlans = exports.readLatestHandoff = exports.readHistory = exports.readNotes = exports.readDecisions = exports.readTasks = exports.getProjectSlugRaw = exports.getProjectSlug = exports.encodeWorkspacePath = exports.getGlobalDataPath = exports.getProjectDataPath = exports.getConfigDir = exports.MAX_PLANS_PER_PROJECT = exports.PLAN_SCHEMA_VERSION = exports.createEmptyTokenTotals = exports.HISTORICAL_DATA_SCHEMA_VERSION = exports.STALENESS_THRESHOLDS = exports.IMPORTANCE_DECAY_FACTORS = exports.KNOWLEDGE_NOTE_SCHEMA_VERSION = exports.DECISION_LOG_SCHEMA_VERSION = exports.normalizeTaskStatus = exports.TASK_PERSISTENCE_SCHEMA_VERSION = void 0;
|
|
7
7
|
exports.clearHighlightCache = exports.highlightEvent = exports.formatSessionJson = exports.formatSessionMarkdown = exports.formatSessionText = exports.classifyNoise = exports.shouldMergeWithPrevious = exports.classifyFollowEvent = exports.classifyMessage = exports.getSoftNoiseReason = exports.isHardNoiseFollowEvent = exports.isHardNoise = exports.formatToolSummary = exports.formatTokenCount = exports.formatDurationMs = exports.createJsonlTail = exports.toFollowEvents = exports.createWatcher = exports.parseChangelog = exports.extractProposedPlanShared = exports.parsePlanMarkdownShared = exports.PlanExtractor = exports.segmentAssistantTurn = exports.reasoningSummary = exports.isAssistantTurnSubagentTool = exports.extractTurnSubagents = exports.assistantTurnEventsFromSessionEvents = exports.readSessionContextSnapshot = exports.createSessionContextProjector = exports.calculateSessionContextPressure = exports.buildSessionContextSnapshot = exports.composeContext = exports.FilterEngine = exports.searchSessions = exports.CodexDatabase = exports.OpenCodeDatabase = exports.discoverDebugLogs = exports.collapseDuplicates = exports.filterByLevel = exports.parseDebugLog = exports.scanSubagentTraces = exports.findAllSessionsWithWorktrees = exports.discoverWorktreeSiblings = exports.resolveWorktreeMainRepo = exports.getAllClaudeProjectFolders = exports.decodeEncodedPath = exports.getMostRecentlyActiveSessionDir = exports.findSubdirectorySessionDirs = exports.findSessionsInDirectory = exports.findAllClaudeSessions = void 0;
|
|
8
|
-
exports.
|
|
9
|
-
exports.
|
|
10
|
-
exports.
|
|
8
|
+
exports.replaceSavedAccountProfiles = exports.setActiveSavedAccount = exports.upsertSavedAccountProfile = exports.getActiveSavedAccount = exports.listSavedAccountProfiles = exports.writeSavedAccountRegistry = exports.readSavedAccountRegistry = exports.getAccountsDir = exports.resolveClaudeLoginCommand = exports.listAllAccounts = exports.switchAccount = exports.spawnAccountLogin = exports.finalizeAccountLogin = exports.getAccountLoginStatus = exports.beginAccountLogin = exports.isMultiAccountEnabled = exports.getActiveAccount = exports.listAccounts = exports.removeAccount = exports.reconcileClaudeAuthState = exports.applyActiveClaudeToLiveHome = exports.resolveActiveClaudeHome = exports.switchToAccount = exports.addCurrentAccount = exports.readActiveClaudeAccount = exports.writeAccountRegistry = exports.readAccountRegistry = exports.ensureDefaultAccounts = exports.readClaudeMaxAccessTokenSync = exports.readClaudeMaxCredentials = exports.writeActiveCredentials = exports.readActiveCredentials = exports.openInBrowser = exports.parseTranscriptFromEvents = exports.parseTranscript = exports.generateHtmlReport = exports.PatternExtractor = exports.HeatmapTracker = exports.FrequencyTracker = exports.getSnapshotPath = exports.isSnapshotValid = exports.deleteSnapshot = exports.loadSnapshot = exports.saveSnapshot = exports.parseTodoDependencies = exports.EventAggregator = exports.getRandomPhrase = exports.PHRASE_CATEGORIES = exports.ALL_PHRASES = exports.HIGHLIGHT_CSS = void 0;
|
|
9
|
+
exports.getModelPricing = exports.parseModelId = exports.DEFAULT_CONTEXT_WINDOW = exports.getModelContextWindowSize = exports.MultiProviderQuotaService = exports.CodexQuotaWatcher = exports.resolveCodexQuotaFromLocalSources = exports.resolveCodexQuota = exports.readLatestCodexQuotaFromRollouts = exports.quotaFromCodexRateLimits = exports.fetchCodexQuotaFromApi = exports.getWorkspaceIdFromPath = exports.pruneQuotaHistory = exports.readQuotaHistoryDailyBuckets = exports.readQuotaHistoryRange = exports.appendQuotaHistorySample = exports.writeQuotaSnapshot = exports.readQuotaSnapshot = exports.QuotaPoller = exports.describeQuotaFailure = exports.fetchQuota = exports.AutoSwitchController = exports.decideAutoSwitch = exports.DEFAULT_AUTO_SWITCH_CONFIG = exports.removeLauncher = exports.writeLauncher = exports.isShellHookInstalled = exports.uninstallShellHook = exports.installShellHook = exports.setTerminalActiveProfile = exports.removeCodexAccount = exports.switchToCodexAccount = exports.finalizeCodexAccount = exports.prepareCodexAccount = exports.getCodexExecutionEnv = exports.resolveSidekickCodexHome = exports.getActiveCodexAccount = exports.listCodexAccounts = exports.getSystemCodexHome = exports.getCodexMonitoringHomes = exports.getCodexProfileHome = exports.getCodexProfilesDir = exports.readClaudeProfileIdentity = exports.isClaudeProfileAuthenticated = exports.claudeKeychainService = exports.claudeKeychainSuffix = exports.getClaudeProfileHome = exports.getClaudeProfilesDir = exports.getActiveAccountStatus = exports.removeSavedAccountProfile = void 0;
|
|
10
|
+
exports.accountLoginStatusSchema = exports.beginAccountLoginResultSchema = exports.accountManagerResultSchema = exports.accountProviderIdSchema = exports.activeAccountStatusSchema = exports.activeProviderAccountStatusSchema = exports.quotaHistoryDailyBucketSchema = exports.quotaHistorySampleSchema = exports.quotaHistoryRuntimeProviderSchema = exports.providerQuotaMapSchema = exports.codexProviderQuotaStateSchema = exports.claudeProviderQuotaStateSchema = exports.providerQuotaStateSchema = exports.runtimeQuotaProviderSchema = exports.quotaFailureDescriptorSchema = exports.peakHoursStateSchema = exports.quotaSourceSchema = exports.quotaProviderIdSchema = exports.quotaFailureKindSchema = exports.quotaStateSchema = exports.quotaWindowSchema = exports.extractSessionEvents = exports.permissionModeSchema = exports.sessionEventSchema = exports.sessionMessageSchema = exports.messageUsageSchema = exports.gatherAssetsForCwd = exports.codexSessions = exports.readCodexAssets = exports.claudeSessions = exports.readClaudeAssets = exports.extractCommands = exports.extractFilePaths = exports.extractUrls = exports.extractToolCalls = exports.extractToolCall = exports.extractTokenUsage = exports.LITELLM_CATALOG_URL = exports.normalizeLiteLlmCatalog = exports.hydratePricingCatalog = exports.formatCost = exports.sortModelIds = exports.compareModelIds = exports.getModelDisplayInfo = exports.shortModelName = exports.mergeCostSources = exports.calculateCostWithProvenance = exports.calculateCostWithPricing = exports.calculateCost = exports.getModelInfo = void 0;
|
|
11
|
+
exports.scopePeakHoursToSessionProvider = exports.isClaudeCodeSessionProvider = exports.fetchPeakHoursStatus = exports.createPeakHoursNotApplicableState = exports.fetchOpenAIStatus = exports.fetchProviderStatus = exports.assistantTurnToolRefSchema = exports.assistantTurnToolGroupStepSchema = exports.assistantTurnTimelineItemSchema = exports.assistantTurnSubagentStatusSchema = exports.assistantTurnSubagentSchema = exports.assistantTurnReasoningTimelineItemSchema = exports.assistantTurnProjectionSchema = exports.assistantTurnProcessStepSchema = exports.assistantTurnProcessSchema = exports.assistantTurnNarrationStepSchema = exports.assistantTurnEventTypeSchema = exports.assistantTurnEventSchema = exports.listAllAccountsResultSchema = exports.savedAccountProfileSchema = exports.accountEntrySchema = void 0;
|
|
11
12
|
var taskPersistence_1 = require("./types/taskPersistence");
|
|
12
13
|
Object.defineProperty(exports, "TASK_PERSISTENCE_SCHEMA_VERSION", { enumerable: true, get: function () { return taskPersistence_1.TASK_PERSISTENCE_SCHEMA_VERSION; } });
|
|
13
14
|
Object.defineProperty(exports, "normalizeTaskStatus", { enumerable: true, get: function () { return taskPersistence_1.normalizeTaskStatus; } });
|
|
@@ -212,10 +213,21 @@ Object.defineProperty(exports, "writeAccountRegistry", { enumerable: true, get:
|
|
|
212
213
|
Object.defineProperty(exports, "readActiveClaudeAccount", { enumerable: true, get: function () { return accounts_1.readActiveClaudeAccount; } });
|
|
213
214
|
Object.defineProperty(exports, "addCurrentAccount", { enumerable: true, get: function () { return accounts_1.addCurrentAccount; } });
|
|
214
215
|
Object.defineProperty(exports, "switchToAccount", { enumerable: true, get: function () { return accounts_1.switchToAccount; } });
|
|
216
|
+
Object.defineProperty(exports, "resolveActiveClaudeHome", { enumerable: true, get: function () { return accounts_1.resolveActiveClaudeHome; } });
|
|
217
|
+
Object.defineProperty(exports, "applyActiveClaudeToLiveHome", { enumerable: true, get: function () { return accounts_1.applyActiveClaudeToLiveHome; } });
|
|
218
|
+
Object.defineProperty(exports, "reconcileClaudeAuthState", { enumerable: true, get: function () { return accounts_1.reconcileClaudeAuthState; } });
|
|
215
219
|
Object.defineProperty(exports, "removeAccount", { enumerable: true, get: function () { return accounts_1.removeAccount; } });
|
|
216
220
|
Object.defineProperty(exports, "listAccounts", { enumerable: true, get: function () { return accounts_1.listAccounts; } });
|
|
217
221
|
Object.defineProperty(exports, "getActiveAccount", { enumerable: true, get: function () { return accounts_1.getActiveAccount; } });
|
|
218
222
|
Object.defineProperty(exports, "isMultiAccountEnabled", { enumerable: true, get: function () { return accounts_1.isMultiAccountEnabled; } });
|
|
223
|
+
var accountManager_1 = require("./accountManager");
|
|
224
|
+
Object.defineProperty(exports, "beginAccountLogin", { enumerable: true, get: function () { return accountManager_1.beginAccountLogin; } });
|
|
225
|
+
Object.defineProperty(exports, "getAccountLoginStatus", { enumerable: true, get: function () { return accountManager_1.getAccountLoginStatus; } });
|
|
226
|
+
Object.defineProperty(exports, "finalizeAccountLogin", { enumerable: true, get: function () { return accountManager_1.finalizeAccountLogin; } });
|
|
227
|
+
Object.defineProperty(exports, "spawnAccountLogin", { enumerable: true, get: function () { return accountManager_1.spawnAccountLogin; } });
|
|
228
|
+
Object.defineProperty(exports, "switchAccount", { enumerable: true, get: function () { return accountManager_1.switchAccount; } });
|
|
229
|
+
Object.defineProperty(exports, "listAllAccounts", { enumerable: true, get: function () { return accountManager_1.listAllAccounts; } });
|
|
230
|
+
Object.defineProperty(exports, "resolveClaudeLoginCommand", { enumerable: true, get: function () { return accountManager_1.resolveClaudeLoginCommand; } });
|
|
219
231
|
var accountRegistry_1 = require("./accountRegistry");
|
|
220
232
|
Object.defineProperty(exports, "getAccountsDir", { enumerable: true, get: function () { return accountRegistry_1.getAccountsDir; } });
|
|
221
233
|
Object.defineProperty(exports, "readSavedAccountRegistry", { enumerable: true, get: function () { return accountRegistry_1.readSavedAccountRegistry; } });
|
|
@@ -228,6 +240,13 @@ Object.defineProperty(exports, "replaceSavedAccountProfiles", { enumerable: true
|
|
|
228
240
|
Object.defineProperty(exports, "removeSavedAccountProfile", { enumerable: true, get: function () { return accountRegistry_1.removeSavedAccountProfile; } });
|
|
229
241
|
var accountStatus_1 = require("./accountStatus");
|
|
230
242
|
Object.defineProperty(exports, "getActiveAccountStatus", { enumerable: true, get: function () { return accountStatus_1.getActiveAccountStatus; } });
|
|
243
|
+
var claudeProfiles_1 = require("./claudeProfiles");
|
|
244
|
+
Object.defineProperty(exports, "getClaudeProfilesDir", { enumerable: true, get: function () { return claudeProfiles_1.getClaudeProfilesDir; } });
|
|
245
|
+
Object.defineProperty(exports, "getClaudeProfileHome", { enumerable: true, get: function () { return claudeProfiles_1.getClaudeProfileHome; } });
|
|
246
|
+
Object.defineProperty(exports, "claudeKeychainSuffix", { enumerable: true, get: function () { return claudeProfiles_1.claudeKeychainSuffix; } });
|
|
247
|
+
Object.defineProperty(exports, "claudeKeychainService", { enumerable: true, get: function () { return claudeProfiles_1.claudeKeychainService; } });
|
|
248
|
+
Object.defineProperty(exports, "isClaudeProfileAuthenticated", { enumerable: true, get: function () { return claudeProfiles_1.isClaudeProfileAuthenticated; } });
|
|
249
|
+
Object.defineProperty(exports, "readClaudeProfileIdentity", { enumerable: true, get: function () { return claudeProfiles_1.readClaudeProfileIdentity; } });
|
|
231
250
|
var codexProfiles_1 = require("./codexProfiles");
|
|
232
251
|
Object.defineProperty(exports, "getCodexProfilesDir", { enumerable: true, get: function () { return codexProfiles_1.getCodexProfilesDir; } });
|
|
233
252
|
Object.defineProperty(exports, "getCodexProfileHome", { enumerable: true, get: function () { return codexProfiles_1.getCodexProfileHome; } });
|
|
@@ -241,6 +260,17 @@ Object.defineProperty(exports, "prepareCodexAccount", { enumerable: true, get: f
|
|
|
241
260
|
Object.defineProperty(exports, "finalizeCodexAccount", { enumerable: true, get: function () { return codexProfiles_1.finalizeCodexAccount; } });
|
|
242
261
|
Object.defineProperty(exports, "switchToCodexAccount", { enumerable: true, get: function () { return codexProfiles_1.switchToCodexAccount; } });
|
|
243
262
|
Object.defineProperty(exports, "removeCodexAccount", { enumerable: true, get: function () { return codexProfiles_1.removeCodexAccount; } });
|
|
263
|
+
var terminalSync_1 = require("./terminalSync");
|
|
264
|
+
Object.defineProperty(exports, "setTerminalActiveProfile", { enumerable: true, get: function () { return terminalSync_1.setTerminalActiveProfile; } });
|
|
265
|
+
Object.defineProperty(exports, "installShellHook", { enumerable: true, get: function () { return terminalSync_1.installShellHook; } });
|
|
266
|
+
Object.defineProperty(exports, "uninstallShellHook", { enumerable: true, get: function () { return terminalSync_1.uninstallShellHook; } });
|
|
267
|
+
Object.defineProperty(exports, "isShellHookInstalled", { enumerable: true, get: function () { return terminalSync_1.isShellHookInstalled; } });
|
|
268
|
+
Object.defineProperty(exports, "writeLauncher", { enumerable: true, get: function () { return terminalSync_1.writeLauncher; } });
|
|
269
|
+
Object.defineProperty(exports, "removeLauncher", { enumerable: true, get: function () { return terminalSync_1.removeLauncher; } });
|
|
270
|
+
var autoSwitch_1 = require("./autoSwitch");
|
|
271
|
+
Object.defineProperty(exports, "DEFAULT_AUTO_SWITCH_CONFIG", { enumerable: true, get: function () { return autoSwitch_1.DEFAULT_AUTO_SWITCH_CONFIG; } });
|
|
272
|
+
Object.defineProperty(exports, "decideAutoSwitch", { enumerable: true, get: function () { return autoSwitch_1.decideAutoSwitch; } });
|
|
273
|
+
Object.defineProperty(exports, "AutoSwitchController", { enumerable: true, get: function () { return autoSwitch_1.AutoSwitchController; } });
|
|
244
274
|
// Quota
|
|
245
275
|
var quota_1 = require("./quota");
|
|
246
276
|
Object.defineProperty(exports, "fetchQuota", { enumerable: true, get: function () { return quota_1.fetchQuota; } });
|
|
@@ -341,6 +371,14 @@ Object.defineProperty(exports, "quotaHistoryDailyBucketSchema", { enumerable: tr
|
|
|
341
371
|
var accountStatus_2 = require("./schemas/accountStatus");
|
|
342
372
|
Object.defineProperty(exports, "activeProviderAccountStatusSchema", { enumerable: true, get: function () { return accountStatus_2.activeProviderAccountStatusSchema; } });
|
|
343
373
|
Object.defineProperty(exports, "activeAccountStatusSchema", { enumerable: true, get: function () { return accountStatus_2.activeAccountStatusSchema; } });
|
|
374
|
+
var accountManager_2 = require("./schemas/accountManager");
|
|
375
|
+
Object.defineProperty(exports, "accountProviderIdSchema", { enumerable: true, get: function () { return accountManager_2.accountProviderIdSchema; } });
|
|
376
|
+
Object.defineProperty(exports, "accountManagerResultSchema", { enumerable: true, get: function () { return accountManager_2.accountManagerResultSchema; } });
|
|
377
|
+
Object.defineProperty(exports, "beginAccountLoginResultSchema", { enumerable: true, get: function () { return accountManager_2.beginAccountLoginResultSchema; } });
|
|
378
|
+
Object.defineProperty(exports, "accountLoginStatusSchema", { enumerable: true, get: function () { return accountManager_2.accountLoginStatusSchema; } });
|
|
379
|
+
Object.defineProperty(exports, "accountEntrySchema", { enumerable: true, get: function () { return accountManager_2.accountEntrySchema; } });
|
|
380
|
+
Object.defineProperty(exports, "savedAccountProfileSchema", { enumerable: true, get: function () { return accountManager_2.savedAccountProfileSchema; } });
|
|
381
|
+
Object.defineProperty(exports, "listAllAccountsResultSchema", { enumerable: true, get: function () { return accountManager_2.listAllAccountsResultSchema; } });
|
|
344
382
|
var assistantTurn_2 = require("./schemas/assistantTurn");
|
|
345
383
|
Object.defineProperty(exports, "assistantTurnEventSchema", { enumerable: true, get: function () { return assistantTurn_2.assistantTurnEventSchema; } });
|
|
346
384
|
Object.defineProperty(exports, "assistantTurnEventTypeSchema", { enumerable: true, get: function () { return assistantTurn_2.assistantTurnEventTypeSchema; } });
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schemas for runtime validation of account management payloads.
|
|
3
|
+
*
|
|
4
|
+
* These schemas mirror the TypeScript interfaces in `accounts.ts`,
|
|
5
|
+
* `accountRegistry.ts`, and `accountManager.ts` (keep in sync when those
|
|
6
|
+
* change). They let consumers validate account-management IPC payloads
|
|
7
|
+
* without hand-mirroring the interfaces.
|
|
8
|
+
*
|
|
9
|
+
* @module schemas/accountManager
|
|
10
|
+
*/
|
|
11
|
+
import { z } from 'zod';
|
|
12
|
+
export declare const accountProviderIdSchema: z.ZodEnum<{
|
|
13
|
+
"claude-code": "claude-code";
|
|
14
|
+
codex: "codex";
|
|
15
|
+
}>;
|
|
16
|
+
export declare const accountManagerResultSchema: z.ZodObject<{
|
|
17
|
+
success: z.ZodBoolean;
|
|
18
|
+
error: z.ZodOptional<z.ZodString>;
|
|
19
|
+
warning: z.ZodOptional<z.ZodString>;
|
|
20
|
+
needsLogin: z.ZodOptional<z.ZodBoolean>;
|
|
21
|
+
profileId: z.ZodOptional<z.ZodString>;
|
|
22
|
+
codexHome: z.ZodOptional<z.ZodString>;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
export declare const beginAccountLoginResultSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
25
|
+
success: z.ZodLiteral<true>;
|
|
26
|
+
loginId: z.ZodString;
|
|
27
|
+
alreadyComplete: z.ZodOptional<z.ZodBoolean>;
|
|
28
|
+
command: z.ZodOptional<z.ZodString>;
|
|
29
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
30
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
31
|
+
configDir: z.ZodOptional<z.ZodString>;
|
|
32
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
33
|
+
success: z.ZodLiteral<false>;
|
|
34
|
+
error: z.ZodString;
|
|
35
|
+
}, z.core.$strip>]>;
|
|
36
|
+
export declare const accountLoginStatusSchema: z.ZodObject<{
|
|
37
|
+
state: z.ZodEnum<{
|
|
38
|
+
pending: "pending";
|
|
39
|
+
authenticated: "authenticated";
|
|
40
|
+
failed: "failed";
|
|
41
|
+
}>;
|
|
42
|
+
email: z.ZodOptional<z.ZodString>;
|
|
43
|
+
error: z.ZodOptional<z.ZodString>;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
export declare const accountEntrySchema: z.ZodObject<{
|
|
46
|
+
uuid: z.ZodString;
|
|
47
|
+
email: z.ZodString;
|
|
48
|
+
label: z.ZodOptional<z.ZodString>;
|
|
49
|
+
addedAt: z.ZodString;
|
|
50
|
+
}, z.core.$strip>;
|
|
51
|
+
export declare const savedAccountProfileSchema: z.ZodObject<{
|
|
52
|
+
id: z.ZodString;
|
|
53
|
+
providerId: z.ZodEnum<{
|
|
54
|
+
"claude-code": "claude-code";
|
|
55
|
+
codex: "codex";
|
|
56
|
+
}>;
|
|
57
|
+
addedAt: z.ZodString;
|
|
58
|
+
label: z.ZodOptional<z.ZodString>;
|
|
59
|
+
email: z.ZodOptional<z.ZodString>;
|
|
60
|
+
providerAccountId: z.ZodOptional<z.ZodString>;
|
|
61
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
62
|
+
email: z.ZodOptional<z.ZodString>;
|
|
63
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
64
|
+
planType: z.ZodOptional<z.ZodString>;
|
|
65
|
+
authMode: z.ZodOptional<z.ZodEnum<{
|
|
66
|
+
chatgpt: "chatgpt";
|
|
67
|
+
"api-key": "api-key";
|
|
68
|
+
unknown: "unknown";
|
|
69
|
+
}>>;
|
|
70
|
+
}, z.core.$strip>>;
|
|
71
|
+
}, z.core.$strip>;
|
|
72
|
+
export declare const listAllAccountsResultSchema: z.ZodObject<{
|
|
73
|
+
claude: z.ZodArray<z.ZodObject<{
|
|
74
|
+
uuid: z.ZodString;
|
|
75
|
+
email: z.ZodString;
|
|
76
|
+
label: z.ZodOptional<z.ZodString>;
|
|
77
|
+
addedAt: z.ZodString;
|
|
78
|
+
}, z.core.$strip>>;
|
|
79
|
+
codex: z.ZodArray<z.ZodObject<{
|
|
80
|
+
id: z.ZodString;
|
|
81
|
+
providerId: z.ZodEnum<{
|
|
82
|
+
"claude-code": "claude-code";
|
|
83
|
+
codex: "codex";
|
|
84
|
+
}>;
|
|
85
|
+
addedAt: z.ZodString;
|
|
86
|
+
label: z.ZodOptional<z.ZodString>;
|
|
87
|
+
email: z.ZodOptional<z.ZodString>;
|
|
88
|
+
providerAccountId: z.ZodOptional<z.ZodString>;
|
|
89
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
90
|
+
email: z.ZodOptional<z.ZodString>;
|
|
91
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
92
|
+
planType: z.ZodOptional<z.ZodString>;
|
|
93
|
+
authMode: z.ZodOptional<z.ZodEnum<{
|
|
94
|
+
chatgpt: "chatgpt";
|
|
95
|
+
"api-key": "api-key";
|
|
96
|
+
unknown: "unknown";
|
|
97
|
+
}>>;
|
|
98
|
+
}, z.core.$strip>>;
|
|
99
|
+
}, z.core.$strip>>;
|
|
100
|
+
activeByProvider: z.ZodObject<{
|
|
101
|
+
'claude-code': z.ZodNullable<z.ZodString>;
|
|
102
|
+
codex: z.ZodNullable<z.ZodString>;
|
|
103
|
+
}, z.core.$strip>;
|
|
104
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Zod schemas for runtime validation of account management payloads.
|
|
4
|
+
*
|
|
5
|
+
* These schemas mirror the TypeScript interfaces in `accounts.ts`,
|
|
6
|
+
* `accountRegistry.ts`, and `accountManager.ts` (keep in sync when those
|
|
7
|
+
* change). They let consumers validate account-management IPC payloads
|
|
8
|
+
* without hand-mirroring the interfaces.
|
|
9
|
+
*
|
|
10
|
+
* @module schemas/accountManager
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.listAllAccountsResultSchema = exports.savedAccountProfileSchema = exports.accountEntrySchema = exports.accountLoginStatusSchema = exports.beginAccountLoginResultSchema = exports.accountManagerResultSchema = exports.accountProviderIdSchema = void 0;
|
|
14
|
+
const zod_1 = require("zod");
|
|
15
|
+
// ── AccountProviderId ──
|
|
16
|
+
exports.accountProviderIdSchema = zod_1.z.enum([
|
|
17
|
+
'claude-code',
|
|
18
|
+
'codex',
|
|
19
|
+
]);
|
|
20
|
+
// ── AccountManagerResult ──
|
|
21
|
+
exports.accountManagerResultSchema = zod_1.z.object({
|
|
22
|
+
success: zod_1.z.boolean(),
|
|
23
|
+
error: zod_1.z.string().optional(),
|
|
24
|
+
warning: zod_1.z.string().optional(),
|
|
25
|
+
needsLogin: zod_1.z.boolean().optional(),
|
|
26
|
+
profileId: zod_1.z.string().optional(),
|
|
27
|
+
codexHome: zod_1.z.string().optional(),
|
|
28
|
+
});
|
|
29
|
+
// ── BeginAccountLoginResult ──
|
|
30
|
+
const beginAccountLoginSuccessSchema = zod_1.z.object({
|
|
31
|
+
success: zod_1.z.literal(true),
|
|
32
|
+
loginId: zod_1.z.string(),
|
|
33
|
+
alreadyComplete: zod_1.z.boolean().optional(),
|
|
34
|
+
command: zod_1.z.string().optional(),
|
|
35
|
+
args: zod_1.z.array(zod_1.z.string()).optional(),
|
|
36
|
+
env: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).optional(),
|
|
37
|
+
configDir: zod_1.z.string().optional(),
|
|
38
|
+
});
|
|
39
|
+
const beginAccountLoginFailureSchema = zod_1.z.object({
|
|
40
|
+
success: zod_1.z.literal(false),
|
|
41
|
+
error: zod_1.z.string(),
|
|
42
|
+
});
|
|
43
|
+
exports.beginAccountLoginResultSchema = zod_1.z.union([
|
|
44
|
+
beginAccountLoginSuccessSchema,
|
|
45
|
+
beginAccountLoginFailureSchema,
|
|
46
|
+
]);
|
|
47
|
+
// ── AccountLoginStatus ──
|
|
48
|
+
exports.accountLoginStatusSchema = zod_1.z.object({
|
|
49
|
+
state: zod_1.z.enum(['pending', 'authenticated', 'failed']),
|
|
50
|
+
email: zod_1.z.string().optional(),
|
|
51
|
+
error: zod_1.z.string().optional(),
|
|
52
|
+
});
|
|
53
|
+
// ── AccountEntry ──
|
|
54
|
+
exports.accountEntrySchema = zod_1.z.object({
|
|
55
|
+
uuid: zod_1.z.string(),
|
|
56
|
+
email: zod_1.z.string(),
|
|
57
|
+
label: zod_1.z.string().optional(),
|
|
58
|
+
addedAt: zod_1.z.string(),
|
|
59
|
+
});
|
|
60
|
+
// ── SavedAccountProfile ──
|
|
61
|
+
const accountIdentityMetadataSchema = zod_1.z.object({
|
|
62
|
+
email: zod_1.z.string().optional(),
|
|
63
|
+
workspaceId: zod_1.z.string().optional(),
|
|
64
|
+
planType: zod_1.z.string().optional(),
|
|
65
|
+
authMode: zod_1.z.enum(['chatgpt', 'api-key', 'unknown']).optional(),
|
|
66
|
+
});
|
|
67
|
+
exports.savedAccountProfileSchema = zod_1.z.object({
|
|
68
|
+
id: zod_1.z.string(),
|
|
69
|
+
providerId: exports.accountProviderIdSchema,
|
|
70
|
+
addedAt: zod_1.z.string(),
|
|
71
|
+
label: zod_1.z.string().optional(),
|
|
72
|
+
email: zod_1.z.string().optional(),
|
|
73
|
+
providerAccountId: zod_1.z.string().optional(),
|
|
74
|
+
metadata: accountIdentityMetadataSchema.optional(),
|
|
75
|
+
});
|
|
76
|
+
// ── ListAllAccountsResult ──
|
|
77
|
+
exports.listAllAccountsResultSchema = zod_1.z.object({
|
|
78
|
+
claude: zod_1.z.array(exports.accountEntrySchema),
|
|
79
|
+
codex: zod_1.z.array(exports.savedAccountProfileSchema),
|
|
80
|
+
activeByProvider: zod_1.z.object({
|
|
81
|
+
'claude-code': zod_1.z.string().nullable(),
|
|
82
|
+
codex: zod_1.z.string().nullable(),
|
|
83
|
+
}),
|
|
84
|
+
});
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
import { z } from 'zod';
|
|
8
8
|
export declare const assistantTurnEventTypeSchema: z.ZodEnum<{
|
|
9
9
|
status: "status";
|
|
10
|
+
error: "error";
|
|
10
11
|
tool_use: "tool_use";
|
|
11
12
|
tool_result: "tool_result";
|
|
12
|
-
error: "error";
|
|
13
13
|
text: "text";
|
|
14
14
|
progress: "progress";
|
|
15
15
|
thinking: "thinking";
|
|
@@ -18,9 +18,9 @@ export declare const assistantTurnEventTypeSchema: z.ZodEnum<{
|
|
|
18
18
|
export declare const assistantTurnEventSchema: z.ZodObject<{
|
|
19
19
|
eventType: z.ZodEnum<{
|
|
20
20
|
status: "status";
|
|
21
|
+
error: "error";
|
|
21
22
|
tool_use: "tool_use";
|
|
22
23
|
tool_result: "tool_result";
|
|
23
|
-
error: "error";
|
|
24
24
|
text: "text";
|
|
25
25
|
progress: "progress";
|
|
26
26
|
thinking: "thinking";
|
|
@@ -96,8 +96,8 @@ export declare const assistantTurnProcessSchema: z.ZodObject<{
|
|
|
96
96
|
}, z.core.$strip>], "kind">>;
|
|
97
97
|
}, z.core.$strip>;
|
|
98
98
|
export declare const assistantTurnSubagentStatusSchema: z.ZodEnum<{
|
|
99
|
-
completed: "completed";
|
|
100
99
|
failed: "failed";
|
|
100
|
+
completed: "completed";
|
|
101
101
|
running: "running";
|
|
102
102
|
}>;
|
|
103
103
|
export declare const assistantTurnSubagentSchema: z.ZodObject<{
|
|
@@ -105,8 +105,8 @@ export declare const assistantTurnSubagentSchema: z.ZodObject<{
|
|
|
105
105
|
label: z.ZodString;
|
|
106
106
|
agentType: z.ZodOptional<z.ZodString>;
|
|
107
107
|
status: z.ZodEnum<{
|
|
108
|
-
completed: "completed";
|
|
109
108
|
failed: "failed";
|
|
109
|
+
completed: "completed";
|
|
110
110
|
running: "running";
|
|
111
111
|
}>;
|
|
112
112
|
}, z.core.$strip>;
|
|
@@ -147,8 +147,8 @@ export declare const assistantTurnProjectionSchema: z.ZodObject<{
|
|
|
147
147
|
label: z.ZodString;
|
|
148
148
|
agentType: z.ZodOptional<z.ZodString>;
|
|
149
149
|
status: z.ZodEnum<{
|
|
150
|
-
completed: "completed";
|
|
151
150
|
failed: "failed";
|
|
151
|
+
completed: "completed";
|
|
152
152
|
running: "running";
|
|
153
153
|
}>;
|
|
154
154
|
}, z.core.$strip>>;
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -21,5 +21,9 @@ export { quotaHistoryRuntimeProviderSchema, quotaHistorySampleSchema, quotaHisto
|
|
|
21
21
|
export type { QuotaHistoryRuntimeProvider, QuotaHistorySample, QuotaHistoryDailyBucket, } from '../quotaHistory';
|
|
22
22
|
export { activeProviderAccountStatusSchema, activeAccountStatusSchema, } from './accountStatus';
|
|
23
23
|
export type { ActiveProviderAccountStatus, ActiveAccountStatus, } from '../accountStatus';
|
|
24
|
+
export { accountProviderIdSchema, accountManagerResultSchema, beginAccountLoginResultSchema, accountLoginStatusSchema, accountEntrySchema, savedAccountProfileSchema, listAllAccountsResultSchema, } from './accountManager';
|
|
25
|
+
export type { AccountEntry, AccountManagerResult } from '../accounts';
|
|
26
|
+
export type { AccountProviderId, SavedAccountProfile, } from '../accountRegistry';
|
|
27
|
+
export type { AccountLoginStatus, BeginAccountLoginResult, ListAllAccountsResult, } from '../accountManager';
|
|
24
28
|
export { assistantTurnEventSchema, assistantTurnEventTypeSchema, assistantTurnNarrationStepSchema, assistantTurnProcessSchema, assistantTurnProcessStepSchema, assistantTurnProjectionSchema, assistantTurnReasoningTimelineItemSchema, assistantTurnSubagentSchema, assistantTurnSubagentStatusSchema, assistantTurnTimelineItemSchema, assistantTurnToolGroupStepSchema, assistantTurnToolRefSchema, } from './assistantTurn';
|
|
25
29
|
export type { AssistantTurnEvent, AssistantTurnEventType, AssistantTurnProcess, AssistantTurnProcessStep, AssistantTurnProjection, AssistantTurnSubagent, AssistantTurnSubagentStatus, AssistantTurnTimelineItem, AssistantTurnToolRef, } from '../turns/assistantTurn';
|
package/dist/schemas/index.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* subpath is self-sufficient for boundary-validation modules.
|
|
13
13
|
*/
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.assistantTurnToolRefSchema = exports.assistantTurnToolGroupStepSchema = exports.assistantTurnTimelineItemSchema = exports.assistantTurnSubagentStatusSchema = exports.assistantTurnSubagentSchema = exports.assistantTurnReasoningTimelineItemSchema = exports.assistantTurnProjectionSchema = exports.assistantTurnProcessStepSchema = exports.assistantTurnProcessSchema = exports.assistantTurnNarrationStepSchema = exports.assistantTurnEventTypeSchema = exports.assistantTurnEventSchema = exports.activeAccountStatusSchema = exports.activeProviderAccountStatusSchema = exports.quotaHistoryDailyBucketSchema = exports.quotaHistorySampleSchema = exports.quotaHistoryRuntimeProviderSchema = exports.providerQuotaMapSchema = exports.codexProviderQuotaStateSchema = exports.claudeProviderQuotaStateSchema = exports.providerQuotaStateSchema = exports.runtimeQuotaProviderSchema = exports.quotaFailureDescriptorSchema = exports.peakHoursStateSchema = exports.quotaSourceSchema = exports.quotaProviderIdSchema = exports.quotaFailureKindSchema = exports.quotaStateSchema = exports.quotaWindowSchema = exports.extractSessionEvents = exports.permissionModeSchema = exports.sessionEventSchema = exports.sessionMessageSchema = exports.messageUsageSchema = void 0;
|
|
15
|
+
exports.assistantTurnToolRefSchema = exports.assistantTurnToolGroupStepSchema = exports.assistantTurnTimelineItemSchema = exports.assistantTurnSubagentStatusSchema = exports.assistantTurnSubagentSchema = exports.assistantTurnReasoningTimelineItemSchema = exports.assistantTurnProjectionSchema = exports.assistantTurnProcessStepSchema = exports.assistantTurnProcessSchema = exports.assistantTurnNarrationStepSchema = exports.assistantTurnEventTypeSchema = exports.assistantTurnEventSchema = exports.listAllAccountsResultSchema = exports.savedAccountProfileSchema = exports.accountEntrySchema = exports.accountLoginStatusSchema = exports.beginAccountLoginResultSchema = exports.accountManagerResultSchema = exports.accountProviderIdSchema = exports.activeAccountStatusSchema = exports.activeProviderAccountStatusSchema = exports.quotaHistoryDailyBucketSchema = exports.quotaHistorySampleSchema = exports.quotaHistoryRuntimeProviderSchema = exports.providerQuotaMapSchema = exports.codexProviderQuotaStateSchema = exports.claudeProviderQuotaStateSchema = exports.providerQuotaStateSchema = exports.runtimeQuotaProviderSchema = exports.quotaFailureDescriptorSchema = exports.peakHoursStateSchema = exports.quotaSourceSchema = exports.quotaProviderIdSchema = exports.quotaFailureKindSchema = exports.quotaStateSchema = exports.quotaWindowSchema = exports.extractSessionEvents = exports.permissionModeSchema = exports.sessionEventSchema = exports.sessionMessageSchema = exports.messageUsageSchema = void 0;
|
|
16
16
|
var sessionEvent_1 = require("./sessionEvent");
|
|
17
17
|
Object.defineProperty(exports, "messageUsageSchema", { enumerable: true, get: function () { return sessionEvent_1.messageUsageSchema; } });
|
|
18
18
|
Object.defineProperty(exports, "sessionMessageSchema", { enumerable: true, get: function () { return sessionEvent_1.sessionMessageSchema; } });
|
|
@@ -39,6 +39,14 @@ Object.defineProperty(exports, "quotaHistoryDailyBucketSchema", { enumerable: tr
|
|
|
39
39
|
var accountStatus_1 = require("./accountStatus");
|
|
40
40
|
Object.defineProperty(exports, "activeProviderAccountStatusSchema", { enumerable: true, get: function () { return accountStatus_1.activeProviderAccountStatusSchema; } });
|
|
41
41
|
Object.defineProperty(exports, "activeAccountStatusSchema", { enumerable: true, get: function () { return accountStatus_1.activeAccountStatusSchema; } });
|
|
42
|
+
var accountManager_1 = require("./accountManager");
|
|
43
|
+
Object.defineProperty(exports, "accountProviderIdSchema", { enumerable: true, get: function () { return accountManager_1.accountProviderIdSchema; } });
|
|
44
|
+
Object.defineProperty(exports, "accountManagerResultSchema", { enumerable: true, get: function () { return accountManager_1.accountManagerResultSchema; } });
|
|
45
|
+
Object.defineProperty(exports, "beginAccountLoginResultSchema", { enumerable: true, get: function () { return accountManager_1.beginAccountLoginResultSchema; } });
|
|
46
|
+
Object.defineProperty(exports, "accountLoginStatusSchema", { enumerable: true, get: function () { return accountManager_1.accountLoginStatusSchema; } });
|
|
47
|
+
Object.defineProperty(exports, "accountEntrySchema", { enumerable: true, get: function () { return accountManager_1.accountEntrySchema; } });
|
|
48
|
+
Object.defineProperty(exports, "savedAccountProfileSchema", { enumerable: true, get: function () { return accountManager_1.savedAccountProfileSchema; } });
|
|
49
|
+
Object.defineProperty(exports, "listAllAccountsResultSchema", { enumerable: true, get: function () { return accountManager_1.listAllAccountsResultSchema; } });
|
|
42
50
|
var assistantTurn_1 = require("./assistantTurn");
|
|
43
51
|
Object.defineProperty(exports, "assistantTurnEventSchema", { enumerable: true, get: function () { return assistantTurn_1.assistantTurnEventSchema; } });
|
|
44
52
|
Object.defineProperty(exports, "assistantTurnEventTypeSchema", { enumerable: true, get: function () { return assistantTurn_1.assistantTurnEventTypeSchema; } });
|