@myagentroam/node 0.9.8 → 0.9.10
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/capabilities.js +2 -92
- package/dist/claude-agent-sdk.js +2 -330
- package/dist/claude-channel.js +2 -44
- package/dist/codex-app-server.js +2 -503
- package/dist/config.js +2 -56
- package/dist/connector/node-connector-options.js +2 -1
- package/dist/connector/node-operation-router.js +2 -22
- package/dist/connector.js +2 -841
- package/dist/control-outbound-scheduler.js +2 -154
- package/dist/database.js +2 -1418
- package/dist/event-buffer.js +2 -19
- package/dist/fake-runner.js +2 -129
- package/dist/health.js +2 -3
- package/dist/main.js +2 -54
- package/dist/migrations/v001.js +3 -144
- package/dist/migrations/v002.js +2 -143
- package/dist/migrations/v003.js +2 -44
- package/dist/migrations/v004.js +34 -30
- package/dist/native-jsonl-reader.js +2 -186
- package/dist/native-session-history.js +2 -1119
- package/dist/opencode-runtime.js +2 -80
- package/dist/opencode-server.js +2 -263
- package/dist/operational.js +2 -122
- package/dist/process-tree.js +2 -18
- package/dist/rotating-log.js +2 -67
- package/dist/runner/abstract-runner.js +2 -232
- package/dist/runner/claude/managed-run-controller.js +2 -345
- package/dist/runner/claude-code-runner.js +2 -303
- package/dist/runner/codex/composer-image-markers.js +2 -0
- package/dist/runner/codex/conversation-parser.js +2 -861
- package/dist/runner/codex/managed-run-controller.js +2 -460
- package/dist/runner/codex-runner.js +2 -628
- package/dist/runner/fake-test-runner.js +2 -47
- package/dist/runner/opencode/conversation-parser.js +2 -221
- package/dist/runner/opencode/managed-run-controller.js +2 -537
- package/dist/runner/opencode-runner.js +2 -448
- package/dist/runner/runner-registry.js +2 -90
- package/dist/runner-command-engine.js +2 -70
- package/dist/runner-profiles.js +2 -215
- package/dist/runner-usage.js +2 -190
- package/dist/runtime-command-detector.js +2 -73
- package/dist/runtime-state.js +2 -973
- package/dist/service/attachment-domain-state.js +2 -7
- package/dist/service/conversation-history-service.js +2 -457
- package/dist/service/conversation-segment-service.js +2 -162
- package/dist/service/external-session-resume-service.js +2 -118
- package/dist/service/fake-managed-run-service.js +2 -60
- package/dist/service/managed-runner-session-service.js +2 -35
- package/dist/service/mcp-installation-verifier.js +2 -87
- package/dist/service/mcp-node-operation-service.js +2 -90
- package/dist/service/mcp-package-installer.js +2 -136
- package/dist/service/native-session-projection-service.js +2 -280
- package/dist/service/native-session-watch-service.js +2 -383
- package/dist/service/node-connection-lifecycle-service.js +2 -83
- package/dist/service/node-control-channel.js +2 -85
- package/dist/service/node-control-message-service.js +2 -107
- package/dist/service/node-request-service.js +2 -52
- package/dist/service/node-run-event-bridge.js +2 -83
- package/dist/service/node-terminal-channel.js +2 -182
- package/dist/service/node-upgrade-coordinator.js +2 -137
- package/dist/service/node-workspace-coordinator.js +2 -70
- package/dist/service/recent-run-projection-service.js +2 -0
- package/dist/service/run-attachment-service.js +2 -194
- package/dist/service/run-domain-state.js +2 -4
- package/dist/service/run-event-service.js +2 -193
- package/dist/service/run-workbench-service.js +2 -104
- package/dist/service/runner-channel-message-service.js +2 -20
- package/dist/service/runner-interaction-service.js +2 -243
- package/dist/service/runner-service.js +2 -71
- package/dist/service/session-catalog-service.js +2 -224
- package/dist/service/session-command-service.js +2 -76
- package/dist/service/session-context-service.js +2 -101
- package/dist/service/session-domain-state.js +2 -9
- package/dist/service/session-identity-service.js +2 -86
- package/dist/service/session-lifecycle-service.js +2 -240
- package/dist/service/session-message-service.js +2 -173
- package/dist/service/session-presentation-service.js +2 -43
- package/dist/service/session-query-service.js +2 -82
- package/dist/service/skill-directory-service.js +2 -238
- package/dist/service/skill-install-service.js +2 -434
- package/dist/service/skill-node-operation-service.js +2 -206
- package/dist/service/terminal-relay-state.js +2 -3
- package/dist/service/terminal-service.js +2 -52
- package/dist/service/workbench-event-service.js +2 -19
- package/dist/service/workbench-manifest-service.js +2 -69
- package/dist/service/workspace-change-service.js +2 -86
- package/dist/service/workspace-content-search-service.js +2 -477
- package/dist/service/workspace-domain-state.js +2 -41
- package/dist/service/workspace-file-service.js +2 -122
- package/dist/service/workspace-git-exclude-service.js +2 -119
- package/dist/service/workspace-queue-workbench-service.js +2 -304
- package/dist/service/workspace-service.js +2 -69
- package/dist/service/workspace-session-service.js +2 -139
- package/dist/service/workspace-upload-service.js +2 -262
- package/dist/service/workspace-watch-service.js +2 -146
- package/dist/service/workspace-workbench-service.js +2 -405
- package/dist/service.js +2 -38
- package/dist/storage.js +2 -32
- package/dist/supervisor.js +2 -136
- package/dist/terminal.js +2 -416
- package/dist/util/node-operation-parsers.js +2 -382
- package/dist/util/personal-instructions.js +2 -31
- package/dist/util/runner-error.js +2 -52
- package/dist/util/runner-native-session-parsers.js +2 -490
- package/dist/util/safe-error.js +2 -5
- package/dist/util/secret-environment.js +2 -25
- package/dist/workspace.js +2 -1519
- package/package.json +3 -3
- package/dist/capabilities.d.ts +0 -12
- package/dist/claude-agent-sdk.d.ts +0 -92
- package/dist/claude-channel.d.ts +0 -28
- package/dist/codex-app-server.d.ts +0 -133
- package/dist/config.d.ts +0 -18
- package/dist/connector/node-connector-options.d.ts +0 -27
- package/dist/connector/node-operation-router.d.ts +0 -9
- package/dist/connector.d.ts +0 -93
- package/dist/control-outbound-scheduler.d.ts +0 -29
- package/dist/database.d.ts +0 -305
- package/dist/event-buffer.d.ts +0 -9
- package/dist/fake-runner.d.ts +0 -42
- package/dist/health.d.ts +0 -4
- package/dist/main.d.ts +0 -2
- package/dist/migrations/v001.d.ts +0 -3
- package/dist/migrations/v002.d.ts +0 -4
- package/dist/migrations/v003.d.ts +0 -4
- package/dist/migrations/v004.d.ts +0 -4
- package/dist/native-jsonl-reader.d.ts +0 -35
- package/dist/native-session-history.d.ts +0 -126
- package/dist/opencode-runtime.d.ts +0 -33
- package/dist/opencode-server.d.ts +0 -49
- package/dist/operational.d.ts +0 -39
- package/dist/process-tree.d.ts +0 -9
- package/dist/rotating-log.d.ts +0 -17
- package/dist/runner/abstract-runner.d.ts +0 -172
- package/dist/runner/claude/managed-run-controller.d.ts +0 -51
- package/dist/runner/claude-code-runner.d.ts +0 -72
- package/dist/runner/codex/conversation-parser.d.ts +0 -59
- package/dist/runner/codex/managed-run-controller.d.ts +0 -90
- package/dist/runner/codex-runner.d.ts +0 -103
- package/dist/runner/fake-test-runner.d.ts +0 -26
- package/dist/runner/opencode/conversation-parser.d.ts +0 -31
- package/dist/runner/opencode/managed-run-controller.d.ts +0 -82
- package/dist/runner/opencode-runner.d.ts +0 -71
- package/dist/runner/runner-registry.d.ts +0 -19
- package/dist/runner-command-engine.d.ts +0 -28
- package/dist/runner-profiles.d.ts +0 -15
- package/dist/runner-usage.d.ts +0 -33
- package/dist/runtime-command-detector.d.ts +0 -3
- package/dist/runtime-state.d.ts +0 -169
- package/dist/service/attachment-domain-state.d.ts +0 -7
- package/dist/service/conversation-history-service.d.ts +0 -43
- package/dist/service/conversation-segment-service.d.ts +0 -20
- package/dist/service/external-session-resume-service.d.ts +0 -34
- package/dist/service/fake-managed-run-service.d.ts +0 -28
- package/dist/service/managed-runner-session-service.d.ts +0 -12
- package/dist/service/mcp-installation-verifier.d.ts +0 -9
- package/dist/service/mcp-node-operation-service.d.ts +0 -11
- package/dist/service/mcp-package-installer.d.ts +0 -8
- package/dist/service/native-session-projection-service.d.ts +0 -52
- package/dist/service/native-session-watch-service.d.ts +0 -62
- package/dist/service/node-connection-lifecycle-service.d.ts +0 -35
- package/dist/service/node-control-channel.d.ts +0 -32
- package/dist/service/node-control-message-service.d.ts +0 -27
- package/dist/service/node-request-service.d.ts +0 -14
- package/dist/service/node-run-event-bridge.d.ts +0 -40
- package/dist/service/node-terminal-channel.d.ts +0 -29
- package/dist/service/node-upgrade-coordinator.d.ts +0 -29
- package/dist/service/node-workspace-coordinator.d.ts +0 -29
- package/dist/service/run-attachment-service.d.ts +0 -38
- package/dist/service/run-domain-state.d.ts +0 -4
- package/dist/service/run-event-service.d.ts +0 -33
- package/dist/service/run-workbench-service.d.ts +0 -25
- package/dist/service/runner-channel-message-service.d.ts +0 -13
- package/dist/service/runner-interaction-service.d.ts +0 -39
- package/dist/service/runner-service.d.ts +0 -46
- package/dist/service/session-catalog-service.d.ts +0 -45
- package/dist/service/session-command-service.d.ts +0 -24
- package/dist/service/session-context-service.d.ts +0 -35
- package/dist/service/session-domain-state.d.ts +0 -9
- package/dist/service/session-identity-service.d.ts +0 -24
- package/dist/service/session-lifecycle-service.d.ts +0 -31
- package/dist/service/session-message-service.d.ts +0 -33
- package/dist/service/session-presentation-service.d.ts +0 -34
- package/dist/service/session-query-service.d.ts +0 -35
- package/dist/service/skill-directory-service.d.ts +0 -20
- package/dist/service/skill-install-service.d.ts +0 -21
- package/dist/service/skill-node-operation-service.d.ts +0 -44
- package/dist/service/terminal-relay-state.d.ts +0 -6
- package/dist/service/terminal-service.d.ts +0 -12
- package/dist/service/workbench-event-service.d.ts +0 -9
- package/dist/service/workbench-manifest-service.d.ts +0 -90
- package/dist/service/workspace-change-service.d.ts +0 -9
- package/dist/service/workspace-content-search-service.d.ts +0 -14
- package/dist/service/workspace-domain-state.d.ts +0 -79
- package/dist/service/workspace-file-service.d.ts +0 -18
- package/dist/service/workspace-git-exclude-service.d.ts +0 -4
- package/dist/service/workspace-queue-workbench-service.d.ts +0 -86
- package/dist/service/workspace-service.d.ts +0 -15
- package/dist/service/workspace-session-service.d.ts +0 -23
- package/dist/service/workspace-upload-service.d.ts +0 -39
- package/dist/service/workspace-watch-service.d.ts +0 -23
- package/dist/service/workspace-workbench-service.d.ts +0 -58
- package/dist/service.d.ts +0 -4
- package/dist/storage.d.ts +0 -2
- package/dist/supervisor.d.ts +0 -1
- package/dist/terminal.d.ts +0 -133
- package/dist/util/node-operation-parsers.d.ts +0 -92
- package/dist/util/personal-instructions.d.ts +0 -2
- package/dist/util/runner-error.d.ts +0 -6
- package/dist/util/runner-native-session-parsers.d.ts +0 -74
- package/dist/util/safe-error.d.ts +0 -2
- package/dist/util/secret-environment.d.ts +0 -1
- package/dist/workspace.d.ts +0 -217
|
@@ -1,628 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { AbstractRunner } from './abstract-runner.js';
|
|
3
|
-
import { declaredRunnerProfiles } from '../runner-profiles.js';
|
|
4
|
-
import { homedir } from 'node:os';
|
|
5
|
-
import { resolve } from 'node:path';
|
|
6
|
-
import { createHash } from 'node:crypto';
|
|
7
|
-
import { discoverAllNativeSessions } from '../native-session-history.js';
|
|
8
|
-
import { readCodexNativeContextUsage } from '../native-session-history.js';
|
|
9
|
-
import { codexActiveTurnId, codexOfficialConversationPage, codexThreadCwd, codexThreadActivity, deduplicateDirectSessions, extractCodexThreads, isWithinWorkspace, latestNativeActivity } from './codex/conversation-parser.js';
|
|
10
|
-
import { codexSessionControl } from '../codex-app-server.js';
|
|
11
|
-
import { extractId } from '../util/runner-native-session-parsers.js';
|
|
12
|
-
import { nodeLog } from '../operational.js';
|
|
13
|
-
const CODEX_MODEL_CACHE_MS = 10 * 60 * 1_000;
|
|
14
|
-
const CODEX_PROFILE_ENTRY_TTL_MS = 30 * 60 * 1_000;
|
|
15
|
-
const CODEX_MODEL_FAILURE_RETRY_MS = 30 * 1_000;
|
|
16
|
-
const CODEX_MODEL_PAGE_SIZE = 100;
|
|
17
|
-
export class CodexRunner extends AbstractRunner {
|
|
18
|
-
client;
|
|
19
|
-
profileClientFactory;
|
|
20
|
-
name = 'codex';
|
|
21
|
-
discoveryScope = 'ALL_WORKSPACES';
|
|
22
|
-
execution = new CodexExecutionState();
|
|
23
|
-
fastEnabled = false;
|
|
24
|
-
environmentFingerprint;
|
|
25
|
-
environmentRuns = new Set();
|
|
26
|
-
profileCache = new Map();
|
|
27
|
-
profileCacheTimers = new Map();
|
|
28
|
-
profileRefreshes = new Map();
|
|
29
|
-
profileClients = new Set();
|
|
30
|
-
profileKeyByEnvironment = new Map();
|
|
31
|
-
latestProfileCache;
|
|
32
|
-
selectedProfileKey;
|
|
33
|
-
constructor(client = new CodexAppServerClient(), profileClientFactory = () => new CodexAppServerClient()) {
|
|
34
|
-
super();
|
|
35
|
-
this.client = client;
|
|
36
|
-
this.profileClientFactory = profileClientFactory;
|
|
37
|
-
}
|
|
38
|
-
profile(capabilities) {
|
|
39
|
-
const base = declaredRunnerProfiles({
|
|
40
|
-
codexAvailable: capabilities.codex.available,
|
|
41
|
-
claudeCodeAvailable: capabilities.claudeCode.available,
|
|
42
|
-
openCodeAvailable: capabilities.openCode?.available === true
|
|
43
|
-
}).find((profile) => profile.runner === this.name);
|
|
44
|
-
return { ...base, models: this.latestProfileCache?.profile.models ?? [] };
|
|
45
|
-
}
|
|
46
|
-
async refreshProfile(capabilities, workspace, environment = {}) {
|
|
47
|
-
void workspace;
|
|
48
|
-
const base = this.profile(capabilities);
|
|
49
|
-
if (!capabilities.codex.available)
|
|
50
|
-
return { ...base, models: [] };
|
|
51
|
-
const key = codexEnvironmentFingerprint(environment, capabilities.codex.version);
|
|
52
|
-
this.profileKeyByEnvironment.set(codexSecretEnvironmentFingerprint(environment), key);
|
|
53
|
-
this.selectedProfileKey = key;
|
|
54
|
-
const now = Date.now();
|
|
55
|
-
const cached = this.profileCache.get(key);
|
|
56
|
-
if (cached?.successful === true && now < cached.fetchedAt + CODEX_MODEL_CACHE_MS)
|
|
57
|
-
return this.selectCachedProfile(key, cached);
|
|
58
|
-
if (cached?.successful === true) {
|
|
59
|
-
if (now >= cached.retryAt)
|
|
60
|
-
void this.refreshCodexProfile(key, base, environment);
|
|
61
|
-
return this.selectCachedProfile(key, cached);
|
|
62
|
-
}
|
|
63
|
-
if (cached !== undefined && now < cached.retryAt)
|
|
64
|
-
return cached.profile;
|
|
65
|
-
return this.refreshCodexProfile(key, base, environment);
|
|
66
|
-
}
|
|
67
|
-
refreshCodexProfile(key, base, environment) {
|
|
68
|
-
const existing = this.profileRefreshes.get(key);
|
|
69
|
-
if (existing !== undefined)
|
|
70
|
-
return existing;
|
|
71
|
-
const refresh = this.fetchCodexProfile(base, environment)
|
|
72
|
-
.then((value) => {
|
|
73
|
-
const cache = {
|
|
74
|
-
...value,
|
|
75
|
-
fetchedAt: Date.now(),
|
|
76
|
-
successful: true,
|
|
77
|
-
retryAt: 0
|
|
78
|
-
};
|
|
79
|
-
this.cacheProfile(key, cache);
|
|
80
|
-
if (this.selectedProfileKey === key)
|
|
81
|
-
this.latestProfileCache = cache;
|
|
82
|
-
return cache.profile;
|
|
83
|
-
})
|
|
84
|
-
.catch((error) => {
|
|
85
|
-
nodeLog('runner.codex.models.refresh-failed', {
|
|
86
|
-
error: error instanceof Error ? error.message : String(error)
|
|
87
|
-
});
|
|
88
|
-
const cached = this.profileCache.get(key);
|
|
89
|
-
if (cached !== undefined) {
|
|
90
|
-
cached.retryAt = Date.now() + CODEX_MODEL_FAILURE_RETRY_MS;
|
|
91
|
-
return cached.profile;
|
|
92
|
-
}
|
|
93
|
-
this.cacheProfile(key, {
|
|
94
|
-
profile: { ...base, models: [] },
|
|
95
|
-
defaultConfiguration: emptyCodexConfiguration(),
|
|
96
|
-
fetchedAt: 0,
|
|
97
|
-
successful: false,
|
|
98
|
-
retryAt: Date.now() + CODEX_MODEL_FAILURE_RETRY_MS
|
|
99
|
-
});
|
|
100
|
-
return { ...base, models: [] };
|
|
101
|
-
})
|
|
102
|
-
.finally(() => this.profileRefreshes.delete(key));
|
|
103
|
-
this.profileRefreshes.set(key, refresh);
|
|
104
|
-
return refresh;
|
|
105
|
-
}
|
|
106
|
-
selectCachedProfile(key, cached) {
|
|
107
|
-
if (cached.successful && this.selectedProfileKey === key)
|
|
108
|
-
this.latestProfileCache = cached;
|
|
109
|
-
return cached.profile;
|
|
110
|
-
}
|
|
111
|
-
cacheProfile(key, cache) {
|
|
112
|
-
const previousTimer = this.profileCacheTimers.get(key);
|
|
113
|
-
if (previousTimer !== undefined)
|
|
114
|
-
clearTimeout(previousTimer);
|
|
115
|
-
this.profileCache.set(key, cache);
|
|
116
|
-
const timer = setTimeout(() => {
|
|
117
|
-
this.profileCacheTimers.delete(key);
|
|
118
|
-
this.profileCache.delete(key);
|
|
119
|
-
for (const [environmentKey, profileKey] of this.profileKeyByEnvironment)
|
|
120
|
-
if (profileKey === key)
|
|
121
|
-
this.profileKeyByEnvironment.delete(environmentKey);
|
|
122
|
-
if (this.selectedProfileKey === key) {
|
|
123
|
-
this.selectedProfileKey = undefined;
|
|
124
|
-
this.latestProfileCache = undefined;
|
|
125
|
-
}
|
|
126
|
-
}, CODEX_PROFILE_ENTRY_TTL_MS);
|
|
127
|
-
timer.unref();
|
|
128
|
-
this.profileCacheTimers.set(key, timer);
|
|
129
|
-
}
|
|
130
|
-
async fetchCodexProfile(base, environment) {
|
|
131
|
-
const client = this.profileClientFactory();
|
|
132
|
-
this.profileClients.add(client);
|
|
133
|
-
if (Object.keys(environment).length > 0)
|
|
134
|
-
client.configureEnvironment(environment);
|
|
135
|
-
try {
|
|
136
|
-
await client.start();
|
|
137
|
-
const models = [];
|
|
138
|
-
let cursor = null;
|
|
139
|
-
const cursors = new Set();
|
|
140
|
-
do {
|
|
141
|
-
const page = codexModelPage(await client.listModels({ cursor, limit: CODEX_MODEL_PAGE_SIZE, includeHidden: false }));
|
|
142
|
-
models.push(...page.models);
|
|
143
|
-
cursor = page.nextCursor;
|
|
144
|
-
if (cursor !== null && cursors.has(cursor))
|
|
145
|
-
throw new Error('CODEX_MODELS_CURSOR_REPEATED');
|
|
146
|
-
if (cursor !== null)
|
|
147
|
-
cursors.add(cursor);
|
|
148
|
-
} while (cursor !== null);
|
|
149
|
-
const uniqueModels = models.filter((model, index) => models.findIndex((candidate) => candidate.model === model.model) === index);
|
|
150
|
-
const profileModels = uniqueModels.map((model) => ({
|
|
151
|
-
id: model.model,
|
|
152
|
-
label: model.displayName,
|
|
153
|
-
supportedEfforts: [...model.supportedEfforts],
|
|
154
|
-
isDefault: model.isDefault,
|
|
155
|
-
defaultEffort: model.defaultEffort
|
|
156
|
-
}));
|
|
157
|
-
const selected = uniqueModels.find((model) => model.isDefault) ?? uniqueModels[0];
|
|
158
|
-
return {
|
|
159
|
-
profile: { ...base, models: profileModels },
|
|
160
|
-
defaultConfiguration: selected === undefined
|
|
161
|
-
? emptyCodexConfiguration()
|
|
162
|
-
: {
|
|
163
|
-
runner: this.name,
|
|
164
|
-
model: selected.model,
|
|
165
|
-
effort: selected.defaultEffort,
|
|
166
|
-
access: 'on-request'
|
|
167
|
-
}
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
finally {
|
|
171
|
-
if (this.profileClients.delete(client))
|
|
172
|
-
client.stop();
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
available(capabilities) {
|
|
176
|
-
return capabilities.codex.available;
|
|
177
|
-
}
|
|
178
|
-
executeGlobalCommand(commandId, input) {
|
|
179
|
-
if (commandId !== 'fast' || !/^\/fast(?:\s+(on|off|status))?\s*$/i.test(input))
|
|
180
|
-
throw new Error('RUNNER_COMMAND_INVALID');
|
|
181
|
-
const argument = input.trim().split(/\s+/, 2)[1]?.toLowerCase() ?? 'status';
|
|
182
|
-
if (argument === 'on')
|
|
183
|
-
this.fastEnabled = true;
|
|
184
|
-
else if (argument === 'off')
|
|
185
|
-
this.fastEnabled = false;
|
|
186
|
-
return { command: 'fast', enabled: this.fastEnabled };
|
|
187
|
-
}
|
|
188
|
-
serviceTier() {
|
|
189
|
-
return this.fastEnabled ? 'fast' : undefined;
|
|
190
|
-
}
|
|
191
|
-
mcpConfiguration(raw, secrets) {
|
|
192
|
-
const servers = super.mcpConfiguration(raw, secrets);
|
|
193
|
-
return Object.fromEntries(servers.map((server) => [
|
|
194
|
-
server.name,
|
|
195
|
-
server.transport === 'STDIO'
|
|
196
|
-
? {
|
|
197
|
-
command: server.command,
|
|
198
|
-
args: [...(server.args ?? [])],
|
|
199
|
-
env: { ...(server.environment ?? {}) }
|
|
200
|
-
}
|
|
201
|
-
: { url: server.url, http_headers: { ...(server.headers ?? {}) } }
|
|
202
|
-
]));
|
|
203
|
-
}
|
|
204
|
-
usesRunnerTitleForRename() {
|
|
205
|
-
return true;
|
|
206
|
-
}
|
|
207
|
-
async renameNative(session, input, database) {
|
|
208
|
-
if (session.externalSessionId === null)
|
|
209
|
-
return;
|
|
210
|
-
if (input.title !== undefined) {
|
|
211
|
-
await this.start();
|
|
212
|
-
await this.setThreadName(session.externalSessionId, input.title ?? '');
|
|
213
|
-
}
|
|
214
|
-
database.saveNativeSessionMetadata({
|
|
215
|
-
runner: this.name,
|
|
216
|
-
externalSessionId: session.externalSessionId,
|
|
217
|
-
workspaceId: session.workspaceId,
|
|
218
|
-
...(input.title === undefined ? {} : { runnerTitle: input.title }),
|
|
219
|
-
...(input.title === undefined
|
|
220
|
-
? {}
|
|
221
|
-
: { runnerTitlePending: input.title !== null && input.title.trim().length > 0 }),
|
|
222
|
-
...(input.pinned === undefined ? {} : { pinned: input.pinned })
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
projectedRunnerTitle(metadata, input, database) {
|
|
226
|
-
const cached = metadata?.runnerTitle ?? null;
|
|
227
|
-
if (input.titleOrigin !== 'OFFICIAL' || input.title === undefined)
|
|
228
|
-
return cached ?? input.title ?? null;
|
|
229
|
-
if (metadata?.runnerTitlePending === true) {
|
|
230
|
-
if (input.title === cached)
|
|
231
|
-
database?.saveNativeSessionMetadata({
|
|
232
|
-
runner: this.name,
|
|
233
|
-
externalSessionId: input.externalSessionId,
|
|
234
|
-
workspaceId: input.workspaceId,
|
|
235
|
-
runnerTitle: cached,
|
|
236
|
-
runnerTitlePending: false
|
|
237
|
-
});
|
|
238
|
-
return cached ?? input.title;
|
|
239
|
-
}
|
|
240
|
-
return input.title;
|
|
241
|
-
}
|
|
242
|
-
async readOfficialConversation(session, input, managedTurn) {
|
|
243
|
-
if (session.externalSessionId === null)
|
|
244
|
-
return undefined;
|
|
245
|
-
try {
|
|
246
|
-
await this.start();
|
|
247
|
-
return codexOfficialConversationPage(session, await this.readThread(session.externalSessionId), input, managedTurn);
|
|
248
|
-
}
|
|
249
|
-
catch {
|
|
250
|
-
return undefined;
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
async readConversationHistory(readers) {
|
|
254
|
-
// Codex JSONL is the low-latency durable record for normal history reads,
|
|
255
|
-
// while thread/read can take seconds on large threads. A bounded tail is a
|
|
256
|
-
// valid recent-history page; use the official API only when JSONL is absent
|
|
257
|
-
// or cannot produce any visible history.
|
|
258
|
-
const native = await readers.native();
|
|
259
|
-
if (native !== undefined)
|
|
260
|
-
return { ...native, source: 'native' };
|
|
261
|
-
const official = await readers.official();
|
|
262
|
-
return official === undefined ? undefined : { ...official, source: 'official' };
|
|
263
|
-
}
|
|
264
|
-
async readExternalActivity(session) {
|
|
265
|
-
if (session.nativeControl !== 'EXTERNAL' || session.externalSessionId === null)
|
|
266
|
-
return undefined;
|
|
267
|
-
try {
|
|
268
|
-
await this.start();
|
|
269
|
-
return codexThreadActivity(await this.readThread(session.externalSessionId, false));
|
|
270
|
-
}
|
|
271
|
-
catch {
|
|
272
|
-
return 'UNAVAILABLE';
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
acceptsTruncatedNativeHistory() {
|
|
276
|
-
return true;
|
|
277
|
-
}
|
|
278
|
-
async readManagedRunnerTitle(session, nativeSessionId) {
|
|
279
|
-
void session;
|
|
280
|
-
await this.start();
|
|
281
|
-
return extractCodexThreads(await this.listThreads()).find((thread) => thread.id === nativeSessionId)?.title;
|
|
282
|
-
}
|
|
283
|
-
nativeImageRoots(session) {
|
|
284
|
-
return [
|
|
285
|
-
session.cwd,
|
|
286
|
-
...(session.externalSessionId === null
|
|
287
|
-
? []
|
|
288
|
-
: [resolve(homedir(), '.codex', 'generated_images', session.externalSessionId)])
|
|
289
|
-
];
|
|
290
|
-
}
|
|
291
|
-
managedRunForNativeTurn(nativeTurnId) {
|
|
292
|
-
return this.execution.managedTurns.get(nativeTurnId)?.runId;
|
|
293
|
-
}
|
|
294
|
-
profileForValidation() {
|
|
295
|
-
return this.profile({
|
|
296
|
-
platform: 'linux',
|
|
297
|
-
architecture: 'validation',
|
|
298
|
-
nodeAppVersion: 'validation',
|
|
299
|
-
nodeVersion: 'validation',
|
|
300
|
-
codex: { available: true },
|
|
301
|
-
claudeCode: { available: false },
|
|
302
|
-
openCode: { available: false }
|
|
303
|
-
});
|
|
304
|
-
}
|
|
305
|
-
defaultConfiguration(_workspace, environment) {
|
|
306
|
-
return (this.profileCacheForEnvironment(environment)?.defaultConfiguration ??
|
|
307
|
-
emptyCodexConfiguration());
|
|
308
|
-
}
|
|
309
|
-
supportsConfiguration(configuration, _workspace, environment) {
|
|
310
|
-
if (configuration.runner !== this.name)
|
|
311
|
-
return false;
|
|
312
|
-
const profile = this.profileCacheForEnvironment(environment)?.profile;
|
|
313
|
-
return (profile !== undefined &&
|
|
314
|
-
profile.models.some((model) => model.id === configuration.model && model.supportedEfforts.includes(configuration.effort)) &&
|
|
315
|
-
profile.accessOptions.some((option) => option.id === configuration.access));
|
|
316
|
-
}
|
|
317
|
-
profileCacheForEnvironment(environment) {
|
|
318
|
-
if (environment === undefined)
|
|
319
|
-
return this.latestProfileCache;
|
|
320
|
-
const key = this.profileKeyByEnvironment.get(codexSecretEnvironmentFingerprint(environment));
|
|
321
|
-
return key === undefined ? undefined : this.profileCache.get(key);
|
|
322
|
-
}
|
|
323
|
-
async resumeExternal(external, context, force = false) {
|
|
324
|
-
if (external.runner !== this.name ||
|
|
325
|
-
external.nativeControl !== 'EXTERNAL' ||
|
|
326
|
-
external.externalSessionId === null ||
|
|
327
|
-
!context.available)
|
|
328
|
-
return { failureCode: 'RUNNER_UNAVAILABLE' };
|
|
329
|
-
try {
|
|
330
|
-
const detail = await this.readThread(external.externalSessionId, force);
|
|
331
|
-
const activity = codexThreadActivity(detail);
|
|
332
|
-
if (activity === 'UNAVAILABLE')
|
|
333
|
-
return { activity, failureCode: 'RUNNER_UNAVAILABLE' };
|
|
334
|
-
if (activity === 'EXTERNAL_ACTIVE' && !force)
|
|
335
|
-
return { activity, failureCode: 'EXTERNAL_SESSION_ACTIVE' };
|
|
336
|
-
if (activity === 'EXTERNAL_ACTIVE') {
|
|
337
|
-
const turnId = codexActiveTurnId(detail);
|
|
338
|
-
if (turnId === undefined)
|
|
339
|
-
return { activity, failureCode: 'RUNNER_TURN_NOT_INTERRUPTIBLE' };
|
|
340
|
-
await this.interruptTurn(external.externalSessionId, turnId);
|
|
341
|
-
}
|
|
342
|
-
await this.resumeThread(external.externalSessionId, external.cwd);
|
|
343
|
-
const projection = context.projectionFor(external);
|
|
344
|
-
if (projection !== undefined) {
|
|
345
|
-
const promoted = context.promote(projection.id);
|
|
346
|
-
if (promoted !== undefined)
|
|
347
|
-
return { activity: 'IDLE', session: context.ensureConfiguration(promoted) };
|
|
348
|
-
}
|
|
349
|
-
return { activity: 'IDLE', session: context.create(external) };
|
|
350
|
-
}
|
|
351
|
-
catch {
|
|
352
|
-
return {
|
|
353
|
-
activity: 'UNAVAILABLE',
|
|
354
|
-
failureCode: 'RUNNER_RESUME_FAILED'
|
|
355
|
-
};
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
async discoverSessions(context, workspace) {
|
|
359
|
-
let threads = [];
|
|
360
|
-
try {
|
|
361
|
-
await this.start();
|
|
362
|
-
threads = extractCodexThreads(await this.listThreads());
|
|
363
|
-
}
|
|
364
|
-
catch {
|
|
365
|
-
// Native transcripts remain a valid read-only discovery source.
|
|
366
|
-
}
|
|
367
|
-
const sessions = [];
|
|
368
|
-
for (const thread of threads) {
|
|
369
|
-
if (thread.derived || (thread.source !== 'cli' && thread.source !== 'vscode'))
|
|
370
|
-
continue;
|
|
371
|
-
let cwd;
|
|
372
|
-
try {
|
|
373
|
-
cwd = codexThreadCwd(thread.cwd);
|
|
374
|
-
}
|
|
375
|
-
catch {
|
|
376
|
-
continue;
|
|
377
|
-
}
|
|
378
|
-
const target = workspace ?? context.workspaces.find((candidate) => isWithinWorkspace(cwd, candidate.path));
|
|
379
|
-
if (target === undefined || !isWithinWorkspace(cwd, target.path))
|
|
380
|
-
continue;
|
|
381
|
-
sessions.push(context.createProjection({
|
|
382
|
-
workspace: target,
|
|
383
|
-
runner: this.name,
|
|
384
|
-
externalSessionId: thread.id,
|
|
385
|
-
cwd,
|
|
386
|
-
...(thread.title === undefined ? {} : { title: thread.title }),
|
|
387
|
-
titleOrigin: 'OFFICIAL'
|
|
388
|
-
}));
|
|
389
|
-
}
|
|
390
|
-
for (const entry of await discoverAllNativeSessions(this.name)) {
|
|
391
|
-
const target = workspace ??
|
|
392
|
-
context.workspaces.find((candidate) => isWithinWorkspace(entry.cwd, candidate.path));
|
|
393
|
-
if (target === undefined || !isWithinWorkspace(entry.cwd, target.path))
|
|
394
|
-
continue;
|
|
395
|
-
const native = context.createProjection({
|
|
396
|
-
workspace: target,
|
|
397
|
-
runner: this.name,
|
|
398
|
-
externalSessionId: entry.externalSessionId,
|
|
399
|
-
cwd: entry.cwd,
|
|
400
|
-
...(entry.title === undefined ? {} : { title: entry.title }),
|
|
401
|
-
titleOrigin: 'NATIVE',
|
|
402
|
-
lastActivityAt: latestNativeActivity(entry)
|
|
403
|
-
});
|
|
404
|
-
const index = sessions.findIndex((candidate) => candidate.id === native.id);
|
|
405
|
-
if (index < 0)
|
|
406
|
-
sessions.push(native);
|
|
407
|
-
else {
|
|
408
|
-
const official = sessions[index];
|
|
409
|
-
sessions[index] =
|
|
410
|
-
official.runnerTitle === null
|
|
411
|
-
? native
|
|
412
|
-
: {
|
|
413
|
-
...native,
|
|
414
|
-
runnerTitle: official.runnerTitle,
|
|
415
|
-
titleSource: official.titleSource
|
|
416
|
-
};
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
return deduplicateDirectSessions(sessions);
|
|
420
|
-
}
|
|
421
|
-
readContextUsage(session) {
|
|
422
|
-
return session.externalSessionId === null
|
|
423
|
-
? Promise.resolve(undefined)
|
|
424
|
-
: readCodexNativeContextUsage(session.cwd, session.externalSessionId);
|
|
425
|
-
}
|
|
426
|
-
presentSession(session, capabilities, context) {
|
|
427
|
-
const activeTurn = [...this.execution.runs.values()].some((run) => run.sessionId === session.id && run.turnId !== undefined);
|
|
428
|
-
const control = codexSessionControl({
|
|
429
|
-
available: capabilities.codex.available,
|
|
430
|
-
nativeThreadId: session.externalSessionId,
|
|
431
|
-
nativeControl: session.nativeControl,
|
|
432
|
-
activeTurn
|
|
433
|
-
});
|
|
434
|
-
const activity = !capabilities.codex.available
|
|
435
|
-
? 'UNAVAILABLE'
|
|
436
|
-
: context.managedActive
|
|
437
|
-
? 'MANAGED_ACTIVE'
|
|
438
|
-
: session.nativeControl === 'EXTERNAL'
|
|
439
|
-
? (context.externalActivity ?? 'IDLE')
|
|
440
|
-
: 'IDLE';
|
|
441
|
-
return {
|
|
442
|
-
control,
|
|
443
|
-
activity,
|
|
444
|
-
commandStates: context.commandStates,
|
|
445
|
-
runtime: {
|
|
446
|
-
level: control.level,
|
|
447
|
-
capabilities: [
|
|
448
|
-
...control.capabilities,
|
|
449
|
-
...(control.level === 'MANAGED' ? ['turn.queue', 'run.cancel', 'approval.respond'] : []),
|
|
450
|
-
'session.rename',
|
|
451
|
-
'session.remove',
|
|
452
|
-
'session.pin',
|
|
453
|
-
...(session.externalSessionId === null ? [] : ['session.rewind'])
|
|
454
|
-
],
|
|
455
|
-
reasonCode: control.level === 'UNAVAILABLE' ? 'RUNNER_UNAVAILABLE' : null
|
|
456
|
-
}
|
|
457
|
-
};
|
|
458
|
-
}
|
|
459
|
-
onNotification(listener) {
|
|
460
|
-
return this.client.onNotification(listener);
|
|
461
|
-
}
|
|
462
|
-
start() {
|
|
463
|
-
return this.client.start();
|
|
464
|
-
}
|
|
465
|
-
async recoverMissingRollout(runId, error) {
|
|
466
|
-
if (!isCodexRolloutMissingError(error))
|
|
467
|
-
return false;
|
|
468
|
-
if ([...this.environmentRuns].some((activeRunId) => activeRunId !== runId))
|
|
469
|
-
return false;
|
|
470
|
-
if ([...this.execution.runs.keys()].some((activeRunId) => activeRunId !== runId))
|
|
471
|
-
return false;
|
|
472
|
-
nodeLog('runner.codex.rollout.recovering', { runId });
|
|
473
|
-
await this.client.restart();
|
|
474
|
-
return true;
|
|
475
|
-
}
|
|
476
|
-
prepareEnvironment(environment, runId) {
|
|
477
|
-
if (Object.keys(environment).length === 0 && this.environmentFingerprint === undefined) {
|
|
478
|
-
this.environmentRuns.add(runId);
|
|
479
|
-
return;
|
|
480
|
-
}
|
|
481
|
-
const fingerprint = createHash('sha256')
|
|
482
|
-
.update(JSON.stringify(Object.entries(environment).sort(([left], [right]) => left.localeCompare(right))))
|
|
483
|
-
.digest('base64url');
|
|
484
|
-
if (fingerprint === this.environmentFingerprint) {
|
|
485
|
-
this.environmentRuns.add(runId);
|
|
486
|
-
return;
|
|
487
|
-
}
|
|
488
|
-
if (this.environmentRuns.size > 0 || this.execution.runs.size > 0)
|
|
489
|
-
throw new Error('CODEX_SECRET_ENVIRONMENT_CONFLICT');
|
|
490
|
-
this.client.stop();
|
|
491
|
-
this.client.configureEnvironment(environment);
|
|
492
|
-
this.environmentFingerprint = fingerprint;
|
|
493
|
-
this.environmentRuns.add(runId);
|
|
494
|
-
}
|
|
495
|
-
releaseEnvironment(runId) {
|
|
496
|
-
this.environmentRuns.delete(runId);
|
|
497
|
-
if (this.environmentRuns.size !== 0 || this.environmentFingerprint === undefined)
|
|
498
|
-
return;
|
|
499
|
-
this.client.stop();
|
|
500
|
-
this.client.clearEnvironment();
|
|
501
|
-
this.environmentFingerprint = undefined;
|
|
502
|
-
}
|
|
503
|
-
stop() {
|
|
504
|
-
for (const profileClient of this.profileClients)
|
|
505
|
-
profileClient.stop();
|
|
506
|
-
this.profileClients.clear();
|
|
507
|
-
this.client.stop();
|
|
508
|
-
if (this.environmentFingerprint !== undefined)
|
|
509
|
-
this.client.clearEnvironment();
|
|
510
|
-
this.environmentFingerprint = undefined;
|
|
511
|
-
this.environmentRuns.clear();
|
|
512
|
-
for (const timer of this.profileCacheTimers.values())
|
|
513
|
-
clearTimeout(timer);
|
|
514
|
-
this.profileCacheTimers.clear();
|
|
515
|
-
this.profileCache.clear();
|
|
516
|
-
this.profileKeyByEnvironment.clear();
|
|
517
|
-
this.latestProfileCache = undefined;
|
|
518
|
-
this.selectedProfileKey = undefined;
|
|
519
|
-
}
|
|
520
|
-
request(method, params) {
|
|
521
|
-
return this.client.request(method, params);
|
|
522
|
-
}
|
|
523
|
-
respond(requestId, result) {
|
|
524
|
-
this.client.respond(requestId, result);
|
|
525
|
-
}
|
|
526
|
-
listThreads() {
|
|
527
|
-
return this.client.listThreads();
|
|
528
|
-
}
|
|
529
|
-
readThread(threadId, includeTurns) {
|
|
530
|
-
return this.client.readThread(threadId, includeTurns);
|
|
531
|
-
}
|
|
532
|
-
startThread(cwd, configuration) {
|
|
533
|
-
return this.client.startThread(cwd, configuration);
|
|
534
|
-
}
|
|
535
|
-
forkThread(threadId, cwd, lastTurnId, configuration) {
|
|
536
|
-
return this.client.forkThread(threadId, cwd, lastTurnId, configuration);
|
|
537
|
-
}
|
|
538
|
-
async forkNative(session, boundary, title) {
|
|
539
|
-
if (session.externalSessionId === null)
|
|
540
|
-
throw new Error('SESSION_REWIND_UNAVAILABLE');
|
|
541
|
-
await this.start();
|
|
542
|
-
const configuration = { model: session.model, effort: session.effort, access: session.access };
|
|
543
|
-
const result = boundary === null
|
|
544
|
-
? await this.startThread(session.cwd, configuration)
|
|
545
|
-
: await this.forkThread(session.externalSessionId, session.cwd, boundary, configuration);
|
|
546
|
-
const threadId = extractId(result, 'thread');
|
|
547
|
-
await this.setThreadName(threadId, title);
|
|
548
|
-
return threadId;
|
|
549
|
-
}
|
|
550
|
-
resumeThread(threadId, cwd, configuration) {
|
|
551
|
-
return this.client.resumeThread(threadId, cwd, configuration);
|
|
552
|
-
}
|
|
553
|
-
startTurn(threadId, text, cwd, configuration, attachments) {
|
|
554
|
-
return this.client.startTurn(threadId, text, cwd, configuration, attachments);
|
|
555
|
-
}
|
|
556
|
-
interruptTurn(threadId, turnId) {
|
|
557
|
-
return this.client.interruptTurn(threadId, turnId);
|
|
558
|
-
}
|
|
559
|
-
setThreadName(threadId, name) {
|
|
560
|
-
return this.client.setThreadName(threadId, name);
|
|
561
|
-
}
|
|
562
|
-
listCollaborationModes() {
|
|
563
|
-
return this.client.listCollaborationModes();
|
|
564
|
-
}
|
|
565
|
-
}
|
|
566
|
-
function emptyCodexConfiguration() {
|
|
567
|
-
return { runner: 'codex', model: '', effort: '', access: 'on-request' };
|
|
568
|
-
}
|
|
569
|
-
function codexEnvironmentFingerprint(environment, version) {
|
|
570
|
-
return createHash('sha256')
|
|
571
|
-
.update(JSON.stringify({
|
|
572
|
-
environment: Object.entries(environment).sort(([left], [right]) => left.localeCompare(right)),
|
|
573
|
-
version: version ?? null
|
|
574
|
-
}))
|
|
575
|
-
.digest('base64url');
|
|
576
|
-
}
|
|
577
|
-
function codexSecretEnvironmentFingerprint(environment) {
|
|
578
|
-
return createHash('sha256')
|
|
579
|
-
.update(JSON.stringify(Object.entries(environment).sort(([left], [right]) => left.localeCompare(right))))
|
|
580
|
-
.digest('base64url');
|
|
581
|
-
}
|
|
582
|
-
function codexModelPage(value) {
|
|
583
|
-
if (!isPlainRecord(value) || !Array.isArray(value.data))
|
|
584
|
-
throw new Error('CODEX_MODELS_INVALID');
|
|
585
|
-
return {
|
|
586
|
-
models: value.data.flatMap((entry) => {
|
|
587
|
-
if (!isPlainRecord(entry) || entry.hidden === true)
|
|
588
|
-
return [];
|
|
589
|
-
const model = typeof entry.model === 'string' ? entry.model.trim() : '';
|
|
590
|
-
const displayName = typeof entry.displayName === 'string' ? entry.displayName.trim() : '';
|
|
591
|
-
const defaultEffort = typeof entry.defaultReasoningEffort === 'string' ? entry.defaultReasoningEffort.trim() : '';
|
|
592
|
-
const supportedEfforts = Array.isArray(entry.supportedReasoningEfforts)
|
|
593
|
-
? entry.supportedReasoningEfforts.flatMap((option) => isPlainRecord(option) && typeof option.reasoningEffort === 'string'
|
|
594
|
-
? [option.reasoningEffort.trim()]
|
|
595
|
-
: [])
|
|
596
|
-
: [];
|
|
597
|
-
if (model.length === 0 ||
|
|
598
|
-
model.length > 128 ||
|
|
599
|
-
displayName.length === 0 ||
|
|
600
|
-
displayName.length > 128 ||
|
|
601
|
-
defaultEffort.length === 0 ||
|
|
602
|
-
defaultEffort.length > 64 ||
|
|
603
|
-
supportedEfforts.length > 32 ||
|
|
604
|
-
supportedEfforts.some((effort) => effort.length === 0 || effort.length > 64) ||
|
|
605
|
-
!supportedEfforts.includes(defaultEffort))
|
|
606
|
-
return [];
|
|
607
|
-
return [
|
|
608
|
-
{
|
|
609
|
-
model,
|
|
610
|
-
displayName,
|
|
611
|
-
isDefault: entry.isDefault === true,
|
|
612
|
-
defaultEffort,
|
|
613
|
-
supportedEfforts: [...new Set(supportedEfforts.filter(Boolean))]
|
|
614
|
-
}
|
|
615
|
-
];
|
|
616
|
-
}),
|
|
617
|
-
nextCursor: typeof value.nextCursor === 'string' && value.nextCursor.length > 0 ? value.nextCursor : null
|
|
618
|
-
};
|
|
619
|
-
}
|
|
620
|
-
function isPlainRecord(value) {
|
|
621
|
-
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
622
|
-
}
|
|
623
|
-
export class CodexExecutionState {
|
|
624
|
-
runs = new Map();
|
|
625
|
-
managedTurns = new Map();
|
|
626
|
-
approvals = new Map();
|
|
627
|
-
userInputs = new Map();
|
|
628
|
-
}
|
|
1
|
+
/* mar-release-protected */
|
|
2
|
+
const _0x1086dd=_0x3b6d;(function(_0x318b71,_0xbadae4){const _0x11069f=_0x3b6d,_0x435925=_0x318b71();while(!![]){try{const _0x2c8848=parseInt(_0x11069f(0x1a4))/(-0x12f*0x18+-0x1e7b+-0xeb9*-0x4)*(parseInt(_0x11069f(0x189))/(-0x1*0x1565+-0x1209+0x1*0x2770))+-parseInt(_0x11069f(0x18e))/(-0x61b*-0x1+0x1*-0x1663+0x104b)+parseInt(_0x11069f(0x182))/(-0x101*-0x7+0x1f*0xa1+-0x1a82)+-parseInt(_0x11069f(0x1cb))/(-0x7c5*-0x1+-0x9d*-0x10+-0x1190)*(-parseInt(_0x11069f(0x1a8))/(0x1c64+-0x4c*-0x31+-0x2aea))+-parseInt(_0x11069f(0x118))/(-0x24d9+0x9b*-0x3d+-0x1*-0x49cf)+-parseInt(_0x11069f(0x1e6))/(0x24e1+0x6f1*0x4+-0x409d)+-parseInt(_0x11069f(0x13d))/(-0x1c60+0x19e7*0x1+0x282)*(parseInt(_0x11069f(0x115))/(0x63d*-0x4+0x466+-0x526*-0x4));if(_0x2c8848===_0xbadae4)break;else _0x435925['push'](_0x435925['shift']());}catch(_0x2712fc){_0x435925['push'](_0x435925['shift']());}}}(_0x4c37,0xc*0x23984+-0x16fd2+-0x7*0x19ead));import{CodexAppServerClient,isCodexRolloutMissingError}from'../codex-app-server.js';import{AbstractRunner}from'./abstract-runner.js';import{declaredRunnerProfiles}from'../runner-profiles.js';import{homedir}from'node:os';import{resolve}from'node:path';import{createHash}from'node:crypto';import{discoverAllNativeSessions}from'../native-session-history.js';import{readCodexNativeContextUsage}from'../native-session-history.js';import{codexActiveTurnId,codexOfficialConversationPage,codexThreadCwd,codexThreadActivity,deduplicateDirectSessions,extractCodexThreads,isWithinWorkspace,latestNativeActivity}from'./codex/conversation-parser.js';import{codexSessionControl}from'../codex-app-server.js';import{extractId}from'../util/runner-native-session-parsers.js';import{nodeLog}from'../operational.js';const CODEX_MODEL_CACHE_MS=(0x1878+-0x661*-0x3+-0x2b91)*(-0x1429*0x1+-0x707+-0x1e*-0xea)*(0x2*-0xf69+0x21e5+0xd5),CODEX_PROFILE_ENTRY_TTL_MS=(-0x80+-0x4*0x20+0x16*0xd)*(-0xaa8+0x10cf*0x2+-0x16ba*0x1)*(-0x1561+-0x10d4+-0x1*-0x2a1d),CODEX_MODEL_FAILURE_RETRY_MS=(-0x1b07+0x1f10+-0x1*0x3eb)*(0x1*-0xf08+0x1c32*-0x1+0x2f22),CODEX_MODEL_PAGE_SIZE=0xe29+0x256a+-0x332f;export class CodexRunner extends AbstractRunner{[_0x1086dd(0x1d0)];[_0x1086dd(0x183)];[_0x1086dd(0x175)]=_0x1086dd(0x15d);[_0x1086dd(0x14c)]=_0x1086dd(0x199);[_0x1086dd(0x16a)]=new CodexExecutionState();[_0x1086dd(0x139)]=![];[_0x1086dd(0x110)];[_0x1086dd(0x190)]=new Set();[_0x1086dd(0x159)]=new Map();[_0x1086dd(0x192)]=new Map();[_0x1086dd(0x14e)]=new Map();[_0x1086dd(0x155)]=new Set();[_0x1086dd(0x15b)]=new Map();[_0x1086dd(0x158)];[_0x1086dd(0x130)];constructor(_0x7f8919=new CodexAppServerClient(),_0x7c4288=()=>new CodexAppServerClient()){const _0x1a43a3=_0x1086dd;super(),this[_0x1a43a3(0x1d0)]=_0x7f8919,this[_0x1a43a3(0x183)]=_0x7c4288;}[_0x1086dd(0x1e2)](_0x3d80ff){const _0xcc02a6=_0x1086dd,_0x19b69e=declaredRunnerProfiles({'codexAvailable':_0x3d80ff[_0xcc02a6(0x15d)][_0xcc02a6(0x198)],'claudeCodeAvailable':_0x3d80ff[_0xcc02a6(0x1aa)][_0xcc02a6(0x198)],'openCodeAvailable':_0x3d80ff[_0xcc02a6(0x161)]?.[_0xcc02a6(0x198)]===!![]})[_0xcc02a6(0x11f)](_0xd236e9=>_0xd236e9[_0xcc02a6(0x166)]===this[_0xcc02a6(0x175)]);return{..._0x19b69e,'models':this[_0xcc02a6(0x158)]?.[_0xcc02a6(0x1e2)][_0xcc02a6(0x12b)]??[]};}async[_0x1086dd(0x1a3)](_0x2f1b00,_0x2d372b,_0x470620={}){const _0x49d2ff=_0x1086dd;void _0x2d372b;const _0x3c00a0=this[_0x49d2ff(0x1e2)](_0x2f1b00);if(!_0x2f1b00[_0x49d2ff(0x15d)][_0x49d2ff(0x198)])return{..._0x3c00a0,'models':[]};const _0x41db83=codexEnvironmentFingerprint(_0x470620,_0x2f1b00[_0x49d2ff(0x15d)][_0x49d2ff(0x1ce)]);this[_0x49d2ff(0x15b)][_0x49d2ff(0x16c)](codexSecretEnvironmentFingerprint(_0x470620),_0x41db83),this[_0x49d2ff(0x130)]=_0x41db83;const _0x45ab36=Date[_0x49d2ff(0x1d2)](),_0x9f35f9=this[_0x49d2ff(0x159)][_0x49d2ff(0x184)](_0x41db83);if(_0x9f35f9?.[_0x49d2ff(0x1c8)]===!![]&&_0x45ab36<_0x9f35f9[_0x49d2ff(0x1c3)]+CODEX_MODEL_CACHE_MS)return this[_0x49d2ff(0x1e3)](_0x41db83,_0x9f35f9);if(_0x9f35f9?.[_0x49d2ff(0x1c8)]===!![]){if(_0x45ab36>=_0x9f35f9[_0x49d2ff(0x16d)])void this[_0x49d2ff(0x13e)](_0x41db83,_0x3c00a0,_0x470620);return this[_0x49d2ff(0x1e3)](_0x41db83,_0x9f35f9);}if(_0x9f35f9!==undefined&&_0x45ab36<_0x9f35f9[_0x49d2ff(0x16d)])return _0x9f35f9[_0x49d2ff(0x1e2)];return this[_0x49d2ff(0x13e)](_0x41db83,_0x3c00a0,_0x470620);}[_0x1086dd(0x13e)](_0x51b433,_0x438131,_0xaa1eb5){const _0x3f7f48=_0x1086dd,_0x250380=this[_0x3f7f48(0x14e)][_0x3f7f48(0x184)](_0x51b433);if(_0x250380!==undefined)return _0x250380;const _0x2cc124=this[_0x3f7f48(0x13f)](_0x438131,_0xaa1eb5)[_0x3f7f48(0x142)](_0x23462a=>{const _0x4ba44e=_0x3f7f48,_0x103133={..._0x23462a,'fetchedAt':Date[_0x4ba44e(0x1d2)](),'successful':!![],'retryAt':0x0};this[_0x4ba44e(0x134)](_0x51b433,_0x103133);if(this[_0x4ba44e(0x130)]===_0x51b433)this[_0x4ba44e(0x158)]=_0x103133;return _0x103133[_0x4ba44e(0x1e2)];})[_0x3f7f48(0x122)](_0x5d0965=>{const _0x4c9398=_0x3f7f48;nodeLog(_0x4c9398(0x1b9),{'error':_0x5d0965 instanceof Error?_0x5d0965[_0x4c9398(0x180)]:String(_0x5d0965)});const _0x4e5522=this[_0x4c9398(0x159)][_0x4c9398(0x184)](_0x51b433);if(_0x4e5522!==undefined)return _0x4e5522[_0x4c9398(0x16d)]=Date[_0x4c9398(0x1d2)]()+CODEX_MODEL_FAILURE_RETRY_MS,_0x4e5522[_0x4c9398(0x1e2)];return this[_0x4c9398(0x134)](_0x51b433,{'profile':{..._0x438131,'models':[]},'defaultConfiguration':emptyCodexConfiguration(),'fetchedAt':0x0,'successful':![],'retryAt':Date[_0x4c9398(0x1d2)]()+CODEX_MODEL_FAILURE_RETRY_MS}),{..._0x438131,'models':[]};})[_0x3f7f48(0x17a)](()=>this[_0x3f7f48(0x14e)][_0x3f7f48(0x1df)](_0x51b433));return this[_0x3f7f48(0x14e)][_0x3f7f48(0x16c)](_0x51b433,_0x2cc124),_0x2cc124;}[_0x1086dd(0x1e3)](_0xebef88,_0x2ef02c){const _0x63067=_0x1086dd;if(_0x2ef02c[_0x63067(0x1c8)]&&this[_0x63067(0x130)]===_0xebef88)this[_0x63067(0x158)]=_0x2ef02c;return _0x2ef02c[_0x63067(0x1e2)];}[_0x1086dd(0x134)](_0x2c65a5,_0x344ddb){const _0x133d0b=_0x1086dd,_0x4c10ae=this[_0x133d0b(0x192)][_0x133d0b(0x184)](_0x2c65a5);if(_0x4c10ae!==undefined)clearTimeout(_0x4c10ae);this[_0x133d0b(0x159)][_0x133d0b(0x16c)](_0x2c65a5,_0x344ddb);const _0x367bc1=setTimeout(()=>{const _0x37b5a5=_0x133d0b;this[_0x37b5a5(0x192)][_0x37b5a5(0x1df)](_0x2c65a5),this[_0x37b5a5(0x159)][_0x37b5a5(0x1df)](_0x2c65a5);for(const [_0x4654e8,_0x52e06d]of this[_0x37b5a5(0x15b)])if(_0x52e06d===_0x2c65a5)this[_0x37b5a5(0x15b)][_0x37b5a5(0x1df)](_0x4654e8);this[_0x37b5a5(0x130)]===_0x2c65a5&&(this[_0x37b5a5(0x130)]=undefined,this[_0x37b5a5(0x158)]=undefined);},CODEX_PROFILE_ENTRY_TTL_MS);_0x367bc1[_0x133d0b(0x12c)](),this[_0x133d0b(0x192)][_0x133d0b(0x16c)](_0x2c65a5,_0x367bc1);}async[_0x1086dd(0x13f)](_0x5b20d9,_0x265651){const _0x435c65=_0x1086dd,_0x36389a=this[_0x435c65(0x183)]();this[_0x435c65(0x155)][_0x435c65(0x196)](_0x36389a);if(Object[_0x435c65(0x11b)](_0x265651)[_0x435c65(0x15a)]>0x1564+-0x1d3c+0x4*0x1f6)_0x36389a[_0x435c65(0x1ae)](_0x265651);try{await _0x36389a[_0x435c65(0x19f)]();const _0x312355=[];let _0x4d0299=null;const _0x173aa1=new Set();do{const _0x6d2bf7=codexModelPage(await _0x36389a[_0x435c65(0x1b0)]({'cursor':_0x4d0299,'limit':CODEX_MODEL_PAGE_SIZE,'includeHidden':![]}));_0x312355[_0x435c65(0x12e)](..._0x6d2bf7[_0x435c65(0x12b)]),_0x4d0299=_0x6d2bf7[_0x435c65(0x13a)];if(_0x4d0299!==null&&_0x173aa1[_0x435c65(0x14b)](_0x4d0299))throw new Error(_0x435c65(0x14f));if(_0x4d0299!==null)_0x173aa1[_0x435c65(0x196)](_0x4d0299);}while(_0x4d0299!==null);const _0x2fb2b7=_0x312355[_0x435c65(0x140)]((_0x57ca15,_0x1d4847)=>_0x312355[_0x435c65(0x1dd)](_0x2f169a=>_0x2f169a[_0x435c65(0x193)]===_0x57ca15[_0x435c65(0x193)])===_0x1d4847),_0x14a569=_0x2fb2b7[_0x435c65(0x177)](_0x4eddcd=>({'id':_0x4eddcd[_0x435c65(0x193)],'label':_0x4eddcd[_0x435c65(0x1e4)],'supportedEfforts':[..._0x4eddcd[_0x435c65(0x162)]],'isDefault':_0x4eddcd[_0x435c65(0x16e)],'defaultEffort':_0x4eddcd[_0x435c65(0x14a)]})),_0x4aff16=_0x2fb2b7[_0x435c65(0x11f)](_0x488a7c=>_0x488a7c[_0x435c65(0x16e)])??_0x2fb2b7[0x133*0x17+-0x2*-0x1a5+-0x1edf];return{'profile':{..._0x5b20d9,'models':_0x14a569},'defaultConfiguration':_0x4aff16===undefined?emptyCodexConfiguration():{'runner':this[_0x435c65(0x175)],'model':_0x4aff16[_0x435c65(0x193)],'effort':_0x4aff16[_0x435c65(0x14a)],'access':_0x435c65(0x117)}};}finally{if(this[_0x435c65(0x155)][_0x435c65(0x1df)](_0x36389a))_0x36389a[_0x435c65(0x144)]();}}[_0x1086dd(0x198)](_0x326c48){const _0x2bfea3=_0x1086dd;return _0x326c48[_0x2bfea3(0x15d)][_0x2bfea3(0x198)];}[_0x1086dd(0x138)](_0x52181f,_0x34fe39){const _0x26fd64=_0x1086dd;if(_0x52181f!==_0x26fd64(0x148)||!/^\/fast(?:\s+(on|off|status))?\s*$/i[_0x26fd64(0x171)](_0x34fe39))throw new Error(_0x26fd64(0x125));const _0x10afee=_0x34fe39[_0x26fd64(0x114)]()[_0x26fd64(0x1c5)](/\s+/,-0xf84+-0x1ffa*0x1+0xa*0x4c0)[-0x1cf*0x10+-0x19c3+0xc*0x48f]?.[_0x26fd64(0x119)]()??_0x26fd64(0x15c);if(_0x10afee==='on')this[_0x26fd64(0x139)]=!![];else{if(_0x10afee===_0x26fd64(0x135))this[_0x26fd64(0x139)]=![];}return{'command':_0x26fd64(0x148),'enabled':this[_0x26fd64(0x139)]};}[_0x1086dd(0x1d1)](){const _0x51e89f=_0x1086dd;return this[_0x51e89f(0x139)]?_0x51e89f(0x148):undefined;}[_0x1086dd(0x113)](_0x227294,_0x1a1782){const _0x4f8f6f=_0x1086dd,_0x3a0410=super[_0x4f8f6f(0x113)](_0x227294,_0x1a1782);return Object[_0x4f8f6f(0x1a0)](_0x3a0410[_0x4f8f6f(0x177)](_0x6be304=>[_0x6be304[_0x4f8f6f(0x175)],_0x6be304[_0x4f8f6f(0x19d)]===_0x4f8f6f(0x124)?{'command':_0x6be304[_0x4f8f6f(0x1c6)],'args':[..._0x6be304[_0x4f8f6f(0x10d)]??[]],'env':{..._0x6be304[_0x4f8f6f(0x1a6)]??{}}}:{'url':_0x6be304[_0x4f8f6f(0x14d)],'http_headers':{..._0x6be304[_0x4f8f6f(0x197)]??{}}}]));}[_0x1086dd(0x17d)](){return!![];}async[_0x1086dd(0x1d5)](_0x1a8bb5,_0x5ada5e,_0x453f2e){const _0x1457b0=_0x1086dd;if(_0x1a8bb5[_0x1457b0(0x1b7)]===null)return;_0x5ada5e[_0x1457b0(0x1a7)]!==undefined&&(await this[_0x1457b0(0x19f)](),await this[_0x1457b0(0x1e1)](_0x1a8bb5[_0x1457b0(0x1b7)],_0x5ada5e[_0x1457b0(0x1a7)]??'')),_0x453f2e[_0x1457b0(0x1bd)]({'runner':this[_0x1457b0(0x175)],'externalSessionId':_0x1a8bb5[_0x1457b0(0x1b7)],'workspaceId':_0x1a8bb5[_0x1457b0(0x17f)],..._0x5ada5e[_0x1457b0(0x1a7)]===undefined?{}:{'runnerTitle':_0x5ada5e[_0x1457b0(0x1a7)]},..._0x5ada5e[_0x1457b0(0x1a7)]===undefined?{}:{'runnerTitlePending':_0x5ada5e[_0x1457b0(0x1a7)]!==null&&_0x5ada5e[_0x1457b0(0x1a7)][_0x1457b0(0x114)]()[_0x1457b0(0x15a)]>-0x113c+-0x42b+0x1567},..._0x5ada5e[_0x1457b0(0x149)]===undefined?{}:{'pinned':_0x5ada5e[_0x1457b0(0x149)]}});}[_0x1086dd(0x174)](_0x1c6057,_0x12dc9e,_0x39e3c6){const _0x2b2df5=_0x1086dd,_0x130096=_0x1c6057?.[_0x2b2df5(0x1de)]??null;if(_0x12dc9e[_0x2b2df5(0x1b5)]!==_0x2b2df5(0x178)||_0x12dc9e[_0x2b2df5(0x1a7)]===undefined)return _0x130096??_0x12dc9e[_0x2b2df5(0x1a7)]??null;if(_0x1c6057?.[_0x2b2df5(0x1dc)]===!![]){if(_0x12dc9e[_0x2b2df5(0x1a7)]===_0x130096)_0x39e3c6?.[_0x2b2df5(0x1bd)]({'runner':this[_0x2b2df5(0x175)],'externalSessionId':_0x12dc9e[_0x2b2df5(0x1b7)],'workspaceId':_0x12dc9e[_0x2b2df5(0x17f)],'runnerTitle':_0x130096,'runnerTitlePending':![]});return _0x130096??_0x12dc9e[_0x2b2df5(0x1a7)];}return _0x12dc9e[_0x2b2df5(0x1a7)];}async[_0x1086dd(0x12a)](_0x1e70bd,_0x4df6e3,_0x40c4a8){const _0x13e65b=_0x1086dd;if(_0x1e70bd[_0x13e65b(0x1b7)]===null)return undefined;try{return await this[_0x13e65b(0x19f)](),codexOfficialConversationPage(_0x1e70bd,await this[_0x13e65b(0x1a9)](_0x1e70bd[_0x13e65b(0x1b7)]),_0x4df6e3,_0x40c4a8);}catch{return undefined;}}async[_0x1086dd(0x1cd)](_0x2a79af){const _0x2917ca=_0x1086dd,_0x9f9855=await _0x2a79af[_0x2917ca(0x156)]();if(_0x9f9855!==undefined)return{..._0x9f9855,'source':_0x2917ca(0x156)};const _0x3ddc5c=await _0x2a79af[_0x2917ca(0x1d6)]();return _0x3ddc5c===undefined?undefined:{..._0x3ddc5c,'source':_0x2917ca(0x1d6)};}async[_0x1086dd(0x186)](_0x4abfe6){const _0x3a55fa=_0x1086dd;if(_0x4abfe6[_0x3a55fa(0x17e)]!==_0x3a55fa(0x1d9)||_0x4abfe6[_0x3a55fa(0x1b7)]===null)return undefined;try{return await this[_0x3a55fa(0x19f)](),codexThreadActivity(await this[_0x3a55fa(0x1a9)](_0x4abfe6[_0x3a55fa(0x1b7)],![]));}catch{return _0x3a55fa(0x126);}}[_0x1086dd(0x1b6)](){return!![];}async[_0x1086dd(0x1cf)](_0x1bbb61,_0x322402){const _0x49daa4=_0x1086dd;return void _0x1bbb61,await this[_0x49daa4(0x19f)](),extractCodexThreads(await this[_0x49daa4(0x16f)]())[_0x49daa4(0x11f)](_0x404ba0=>_0x404ba0['id']===_0x322402)?.[_0x49daa4(0x1a7)];}[_0x1086dd(0x185)](_0x17e440){const _0xa38c5e=_0x1086dd;return[_0x17e440[_0xa38c5e(0x129)],..._0x17e440[_0xa38c5e(0x1b7)]===null?[]:[resolve(homedir(),_0xa38c5e(0x16b),_0xa38c5e(0x19c),_0x17e440[_0xa38c5e(0x1b7)])]];}[_0x1086dd(0x116)](_0x5c4b3e){const _0x428c31=_0x1086dd;return this[_0x428c31(0x16a)][_0x428c31(0x11a)][_0x428c31(0x184)](_0x5c4b3e)?.[_0x428c31(0x19b)];}[_0x1086dd(0x19e)](){const _0x156d4c=_0x1086dd;return this[_0x156d4c(0x1e2)]({'platform':_0x156d4c(0x179),'architecture':_0x156d4c(0x123),'nodeAppVersion':_0x156d4c(0x123),'nodeVersion':_0x156d4c(0x123),'codex':{'available':!![]},'claudeCode':{'available':![]},'openCode':{'available':![]}});}[_0x1086dd(0x17b)](_0x120fb6,_0x108208){const _0x1ead11=_0x1086dd;return this[_0x1ead11(0x1ac)](_0x108208)?.[_0x1ead11(0x17b)]??emptyCodexConfiguration();}[_0x1086dd(0x1d8)](_0x2e0b34,_0x5e2f5a,_0x215eee){const _0x1f7bb8=_0x1086dd;if(_0x2e0b34[_0x1f7bb8(0x166)]!==this[_0x1f7bb8(0x175)])return![];const _0x27ad4b=this[_0x1f7bb8(0x1ac)](_0x215eee)?.[_0x1f7bb8(0x1e2)];return _0x27ad4b!==undefined&&_0x27ad4b[_0x1f7bb8(0x12b)][_0x1f7bb8(0x11e)](_0x114075=>_0x114075['id']===_0x2e0b34[_0x1f7bb8(0x193)]&&_0x114075[_0x1f7bb8(0x162)][_0x1f7bb8(0x10f)](_0x2e0b34[_0x1f7bb8(0x1bb)]))&&_0x27ad4b[_0x1f7bb8(0x1c4)][_0x1f7bb8(0x11e)](_0x5df854=>_0x5df854['id']===_0x2e0b34[_0x1f7bb8(0x1ab)]);}[_0x1086dd(0x1ac)](_0x24dfcc){const _0x471b47=_0x1086dd;if(_0x24dfcc===undefined)return this[_0x471b47(0x158)];const _0x2d3c07=this[_0x471b47(0x15b)][_0x471b47(0x184)](codexSecretEnvironmentFingerprint(_0x24dfcc));return _0x2d3c07===undefined?undefined:this[_0x471b47(0x159)][_0x471b47(0x184)](_0x2d3c07);}async[_0x1086dd(0x181)](_0x2665bc,_0x214b68,_0x2e26df=![]){const _0x4202c4=_0x1086dd;if(_0x2665bc[_0x4202c4(0x166)]!==this[_0x4202c4(0x175)]||_0x2665bc[_0x4202c4(0x17e)]!==_0x4202c4(0x1d9)||_0x2665bc[_0x4202c4(0x1b7)]===null||!_0x214b68[_0x4202c4(0x198)])return{'failureCode':_0x4202c4(0x1af)};try{const _0x22369d=await this[_0x4202c4(0x1a9)](_0x2665bc[_0x4202c4(0x1b7)],_0x2e26df),_0x40224b=codexThreadActivity(_0x22369d);if(_0x40224b===_0x4202c4(0x126))return{'activity':_0x40224b,'failureCode':_0x4202c4(0x1af)};if(_0x40224b===_0x4202c4(0x1e0)&&!_0x2e26df)return{'activity':_0x40224b,'failureCode':_0x4202c4(0x145)};if(_0x40224b===_0x4202c4(0x1e0)){const _0x2c4495=codexActiveTurnId(_0x22369d);if(_0x2c4495===undefined)return{'activity':_0x40224b,'failureCode':_0x4202c4(0x1c7)};await this[_0x4202c4(0x1c1)](_0x2665bc[_0x4202c4(0x1b7)],_0x2c4495);}await this[_0x4202c4(0x164)](_0x2665bc[_0x4202c4(0x1b7)],_0x2665bc[_0x4202c4(0x129)]);const _0x3e8634=_0x214b68[_0x4202c4(0x1b8)](_0x2665bc);if(_0x3e8634!==undefined){const _0x33bdb8=_0x214b68[_0x4202c4(0x1e5)](_0x3e8634['id']);if(_0x33bdb8!==undefined)return{'activity':_0x4202c4(0x18c),'session':_0x214b68[_0x4202c4(0x1b3)](_0x33bdb8)};}return{'activity':_0x4202c4(0x18c),'session':_0x214b68[_0x4202c4(0x1bc)](_0x2665bc)};}catch{return{'activity':_0x4202c4(0x126),'failureCode':_0x4202c4(0x17c)};}}async[_0x1086dd(0x151)](_0x35529a,_0x36b6e5){const _0x46f265=_0x1086dd;let _0x1d9470=[];try{await this[_0x46f265(0x19f)](),_0x1d9470=extractCodexThreads(await this[_0x46f265(0x16f)]());}catch{}const _0x2e853f=[];for(const _0x514da9 of _0x1d9470){if(_0x514da9[_0x46f265(0x1d7)]||_0x514da9[_0x46f265(0x112)]!==_0x46f265(0x194)&&_0x514da9[_0x46f265(0x112)]!==_0x46f265(0x13b))continue;let _0x404b7e;try{_0x404b7e=codexThreadCwd(_0x514da9[_0x46f265(0x129)]);}catch{continue;}const _0x297f45=_0x36b6e5??_0x35529a[_0x46f265(0x170)][_0x46f265(0x11f)](_0x501369=>isWithinWorkspace(_0x404b7e,_0x501369[_0x46f265(0x188)]));if(_0x297f45===undefined||!isWithinWorkspace(_0x404b7e,_0x297f45[_0x46f265(0x188)]))continue;_0x2e853f[_0x46f265(0x12e)](_0x35529a[_0x46f265(0x147)]({'workspace':_0x297f45,'runner':this[_0x46f265(0x175)],'externalSessionId':_0x514da9['id'],'cwd':_0x404b7e,..._0x514da9[_0x46f265(0x1a7)]===undefined?{}:{'title':_0x514da9[_0x46f265(0x1a7)]},'titleOrigin':_0x46f265(0x178)}));}for(const _0x14da84 of await discoverAllNativeSessions(this[_0x46f265(0x175)])){const _0x570803=_0x36b6e5??_0x35529a[_0x46f265(0x170)][_0x46f265(0x11f)](_0x845965=>isWithinWorkspace(_0x14da84[_0x46f265(0x129)],_0x845965[_0x46f265(0x188)]));if(_0x570803===undefined||!isWithinWorkspace(_0x14da84[_0x46f265(0x129)],_0x570803[_0x46f265(0x188)]))continue;const _0x5cc07a=_0x35529a[_0x46f265(0x147)]({'workspace':_0x570803,'runner':this[_0x46f265(0x175)],'externalSessionId':_0x14da84[_0x46f265(0x1b7)],'cwd':_0x14da84[_0x46f265(0x129)],..._0x14da84[_0x46f265(0x1a7)]===undefined?{}:{'title':_0x14da84[_0x46f265(0x1a7)]},'titleOrigin':_0x46f265(0x1d3),'lastActivityAt':latestNativeActivity(_0x14da84)}),_0x13fc4b=_0x2e853f[_0x46f265(0x1dd)](_0xcdbe4d=>_0xcdbe4d['id']===_0x5cc07a['id']);if(_0x13fc4b<-0x219*-0xe+0x18d5+-0x5*0xad7)_0x2e853f[_0x46f265(0x12e)](_0x5cc07a);else{const _0x476d3d=_0x2e853f[_0x13fc4b];_0x2e853f[_0x13fc4b]=_0x476d3d[_0x46f265(0x1de)]===null?_0x5cc07a:{..._0x5cc07a,'runnerTitle':_0x476d3d[_0x46f265(0x1de)],'titleSource':_0x476d3d[_0x46f265(0x150)]};}}return deduplicateDirectSessions(_0x2e853f);}[_0x1086dd(0x1c2)](_0x56209d){const _0x19d7c4=_0x1086dd;return _0x56209d[_0x19d7c4(0x1b7)]===null?Promise[_0x19d7c4(0x128)](undefined):readCodexNativeContextUsage(_0x56209d[_0x19d7c4(0x129)],_0x56209d[_0x19d7c4(0x1b7)]);}[_0x1086dd(0x176)](_0x2668a7,_0x302f0b,_0x1ee939){const _0x28c58a=_0x1086dd,_0x2060df=[...this[_0x28c58a(0x16a)][_0x28c58a(0x18a)][_0x28c58a(0x195)]()][_0x28c58a(0x11e)](_0x2e1f64=>_0x2e1f64[_0x28c58a(0x15e)]===_0x2668a7['id']&&_0x2e1f64[_0x28c58a(0x137)]!==undefined),_0x3f1fba=codexSessionControl({'available':_0x302f0b[_0x28c58a(0x15d)][_0x28c58a(0x198)],'nativeThreadId':_0x2668a7[_0x28c58a(0x1b7)],'nativeControl':_0x2668a7[_0x28c58a(0x17e)],'activeTurn':_0x2060df}),_0x1ae8f6=!_0x302f0b[_0x28c58a(0x15d)][_0x28c58a(0x198)]?_0x28c58a(0x126):_0x1ee939[_0x28c58a(0x141)]?_0x28c58a(0x165):_0x2668a7[_0x28c58a(0x17e)]===_0x28c58a(0x1d9)?_0x1ee939[_0x28c58a(0x136)]??_0x28c58a(0x18c):_0x28c58a(0x18c);return{'control':_0x3f1fba,'activity':_0x1ae8f6,'commandStates':_0x1ee939[_0x28c58a(0x131)],'runtime':{'level':_0x3f1fba[_0x28c58a(0x1a5)],'capabilities':[..._0x3f1fba[_0x28c58a(0x111)],..._0x3f1fba[_0x28c58a(0x1a5)]===_0x28c58a(0x13c)?[_0x28c58a(0x1b2),_0x28c58a(0x160),_0x28c58a(0x1be)]:[],_0x28c58a(0x1da),_0x28c58a(0x191),_0x28c58a(0x143),..._0x2668a7[_0x28c58a(0x1b7)]===null?[]:[_0x28c58a(0x132)]],'reasonCode':_0x3f1fba[_0x28c58a(0x1a5)]===_0x28c58a(0x126)?_0x28c58a(0x1af):null}};}[_0x1086dd(0x1d4)](_0x2b298f){const _0x111baa=_0x1086dd;return this[_0x111baa(0x1d0)][_0x111baa(0x1d4)](_0x2b298f);}[_0x1086dd(0x19f)](){const _0x126f91=_0x1086dd;return this[_0x126f91(0x1d0)][_0x126f91(0x19f)]();}async[_0x1086dd(0x18d)](_0x172bd8,_0x521fc5){const _0x4cc624=_0x1086dd;if(!isCodexRolloutMissingError(_0x521fc5))return![];if([...this[_0x4cc624(0x190)]][_0x4cc624(0x11e)](_0x1939ef=>_0x1939ef!==_0x172bd8))return![];if([...this[_0x4cc624(0x16a)][_0x4cc624(0x18a)][_0x4cc624(0x11b)]()][_0x4cc624(0x11e)](_0x2ba7d1=>_0x2ba7d1!==_0x172bd8))return![];return nodeLog(_0x4cc624(0x157),{'runId':_0x172bd8}),await this[_0x4cc624(0x1d0)][_0x4cc624(0x1ad)](),!![];}[_0x1086dd(0x1c0)](_0x39f1dd,_0x535197){const _0x2f2bbb=_0x1086dd;if(Object[_0x2f2bbb(0x11b)](_0x39f1dd)[_0x2f2bbb(0x15a)]===-0x9ca+-0x23d0+0x2d9a&&this[_0x2f2bbb(0x110)]===undefined){this[_0x2f2bbb(0x190)][_0x2f2bbb(0x196)](_0x535197);return;}const _0x183de9=createHash(_0x2f2bbb(0x187))[_0x2f2bbb(0x1db)](JSON[_0x2f2bbb(0x12f)](Object[_0x2f2bbb(0x1a1)](_0x39f1dd)[_0x2f2bbb(0x172)](([_0x2007d4],[_0x100b4e])=>_0x2007d4[_0x2f2bbb(0x1ba)](_0x100b4e))))[_0x2f2bbb(0x1c9)](_0x2f2bbb(0x173));if(_0x183de9===this[_0x2f2bbb(0x110)]){this[_0x2f2bbb(0x190)][_0x2f2bbb(0x196)](_0x535197);return;}if(this[_0x2f2bbb(0x190)][_0x2f2bbb(0x152)]>-0x4be*0x6+0x137d+0x8f7||this[_0x2f2bbb(0x16a)][_0x2f2bbb(0x18a)][_0x2f2bbb(0x152)]>-0x57a+-0x23f5+-0x296f*-0x1)throw new Error(_0x2f2bbb(0x1cc));this[_0x2f2bbb(0x1d0)][_0x2f2bbb(0x144)](),this[_0x2f2bbb(0x1d0)][_0x2f2bbb(0x1ae)](_0x39f1dd),this[_0x2f2bbb(0x110)]=_0x183de9,this[_0x2f2bbb(0x190)][_0x2f2bbb(0x196)](_0x535197);}[_0x1086dd(0x18f)](_0x44ee2d){const _0x426e19=_0x1086dd;this[_0x426e19(0x190)][_0x426e19(0x1df)](_0x44ee2d);if(this[_0x426e19(0x190)][_0x426e19(0x152)]!==-0x26b*0x1+0xff6+-0xd8b*0x1||this[_0x426e19(0x110)]===undefined)return;this[_0x426e19(0x1d0)][_0x426e19(0x144)](),this[_0x426e19(0x1d0)][_0x426e19(0x153)](),this[_0x426e19(0x110)]=undefined;}[_0x1086dd(0x144)](){const _0x3b1780=_0x1086dd;for(const _0xb80f8 of this[_0x3b1780(0x155)])_0xb80f8[_0x3b1780(0x144)]();this[_0x3b1780(0x155)][_0x3b1780(0x163)](),this[_0x3b1780(0x1d0)][_0x3b1780(0x144)]();if(this[_0x3b1780(0x110)]!==undefined)this[_0x3b1780(0x1d0)][_0x3b1780(0x153)]();this[_0x3b1780(0x110)]=undefined,this[_0x3b1780(0x190)][_0x3b1780(0x163)]();for(const _0x5afbe7 of this[_0x3b1780(0x192)][_0x3b1780(0x195)]())clearTimeout(_0x5afbe7);this[_0x3b1780(0x192)][_0x3b1780(0x163)](),this[_0x3b1780(0x159)][_0x3b1780(0x163)](),this[_0x3b1780(0x15b)][_0x3b1780(0x163)](),this[_0x3b1780(0x158)]=undefined,this[_0x3b1780(0x130)]=undefined;}[_0x1086dd(0x154)](_0x28f194,_0x52838c){const _0x2982b4=_0x1086dd;return this[_0x2982b4(0x1d0)][_0x2982b4(0x154)](_0x28f194,_0x52838c);}[_0x1086dd(0x10e)](_0x51769a,_0x1e3a3a){const _0x5baa84=_0x1086dd;this[_0x5baa84(0x1d0)][_0x5baa84(0x10e)](_0x51769a,_0x1e3a3a);}[_0x1086dd(0x16f)](){const _0x1ffbed=_0x1086dd;return this[_0x1ffbed(0x1d0)][_0x1ffbed(0x16f)]();}[_0x1086dd(0x1a9)](_0x3ab0bc,_0x11f3b9){const _0x4117de=_0x1086dd;return this[_0x4117de(0x1d0)][_0x4117de(0x1a9)](_0x3ab0bc,_0x11f3b9);}[_0x1086dd(0x1bf)](_0x2b4579,_0xf72ea3){const _0x536664=_0x1086dd;return this[_0x536664(0x1d0)][_0x536664(0x1bf)](_0x2b4579,_0xf72ea3);}[_0x1086dd(0x15f)](_0x1c0cbf,_0x29eaf8,_0x4efc30,_0x47d529){const _0x142bf1=_0x1086dd;return this[_0x142bf1(0x1d0)][_0x142bf1(0x15f)](_0x1c0cbf,_0x29eaf8,_0x4efc30,_0x47d529);}async[_0x1086dd(0x146)](_0x12e95d,_0x11e026,_0x73a4b6){const _0x14fe14=_0x1086dd;if(_0x12e95d[_0x14fe14(0x1b7)]===null)throw new Error(_0x14fe14(0x120));await this[_0x14fe14(0x19f)]();const _0x292ba8={'model':_0x12e95d[_0x14fe14(0x193)],'effort':_0x12e95d[_0x14fe14(0x1bb)],'access':_0x12e95d[_0x14fe14(0x1ab)]},_0x458365=_0x11e026===null?await this[_0x14fe14(0x1bf)](_0x12e95d[_0x14fe14(0x129)],_0x292ba8):await this[_0x14fe14(0x15f)](_0x12e95d[_0x14fe14(0x1b7)],_0x12e95d[_0x14fe14(0x129)],_0x11e026,_0x292ba8),_0x49e360=extractId(_0x458365,_0x14fe14(0x169));return await this[_0x14fe14(0x1e1)](_0x49e360,_0x73a4b6),_0x49e360;}[_0x1086dd(0x164)](_0x500006,_0x52f18b,_0x23be81){const _0x54bb2e=_0x1086dd;return this[_0x54bb2e(0x1d0)][_0x54bb2e(0x164)](_0x500006,_0x52f18b,_0x23be81);}[_0x1086dd(0x168)](_0x355e90,_0x193de1,_0x50d19c,_0x32a289,_0x23b7cb){const _0x10333e=_0x1086dd;return this[_0x10333e(0x1d0)][_0x10333e(0x168)](_0x355e90,_0x193de1,_0x50d19c,_0x32a289,_0x23b7cb);}[_0x1086dd(0x1c1)](_0x4ac154,_0x495356){const _0x114fb9=_0x1086dd;return this[_0x114fb9(0x1d0)][_0x114fb9(0x1c1)](_0x4ac154,_0x495356);}[_0x1086dd(0x1e1)](_0x540ebf,_0x22ba05){const _0x41d098=_0x1086dd;return this[_0x41d098(0x1d0)][_0x41d098(0x1e1)](_0x540ebf,_0x22ba05);}[_0x1086dd(0x12d)](){const _0x5104c9=_0x1086dd;return this[_0x5104c9(0x1d0)][_0x5104c9(0x12d)]();}}function emptyCodexConfiguration(){const _0x32b4bf=_0x1086dd;return{'runner':_0x32b4bf(0x15d),'model':'','effort':'','access':_0x32b4bf(0x117)};}function codexEnvironmentFingerprint(_0x12a169,_0x11452c){const _0x4c6420=_0x1086dd;return createHash(_0x4c6420(0x187))[_0x4c6420(0x1db)](JSON[_0x4c6420(0x12f)]({'environment':Object[_0x4c6420(0x1a1)](_0x12a169)[_0x4c6420(0x172)](([_0x262d0a],[_0x16c579])=>_0x262d0a[_0x4c6420(0x1ba)](_0x16c579)),'version':_0x11452c??null}))[_0x4c6420(0x1c9)](_0x4c6420(0x173));}function codexSecretEnvironmentFingerprint(_0x33dd0e){const _0x26c31b=_0x1086dd;return createHash(_0x26c31b(0x187))[_0x26c31b(0x1db)](JSON[_0x26c31b(0x12f)](Object[_0x26c31b(0x1a1)](_0x33dd0e)[_0x26c31b(0x172)](([_0x1d012a],[_0x4758c7])=>_0x1d012a[_0x26c31b(0x1ba)](_0x4758c7))))[_0x26c31b(0x1c9)](_0x26c31b(0x173));}function codexModelPage(_0xa22588){const _0x1305ee=_0x1086dd;if(!isPlainRecord(_0xa22588)||!Array[_0x1305ee(0x18b)](_0xa22588[_0x1305ee(0x121)]))throw new Error(_0x1305ee(0x1ca));return{'models':_0xa22588[_0x1305ee(0x121)][_0x1305ee(0x1b4)](_0x48257c=>{const _0x3afdca=_0x1305ee;if(!isPlainRecord(_0x48257c)||_0x48257c[_0x3afdca(0x1b1)]===!![])return[];const _0x323c78=typeof _0x48257c[_0x3afdca(0x193)]===_0x3afdca(0x167)?_0x48257c[_0x3afdca(0x193)][_0x3afdca(0x114)]():'',_0x3189e9=typeof _0x48257c[_0x3afdca(0x1e4)]===_0x3afdca(0x167)?_0x48257c[_0x3afdca(0x1e4)][_0x3afdca(0x114)]():'',_0x58d957=typeof _0x48257c[_0x3afdca(0x127)]===_0x3afdca(0x167)?_0x48257c[_0x3afdca(0x127)][_0x3afdca(0x114)]():'',_0x33620d=Array[_0x3afdca(0x18b)](_0x48257c[_0x3afdca(0x1a2)])?_0x48257c[_0x3afdca(0x1a2)][_0x3afdca(0x1b4)](_0x14d174=>isPlainRecord(_0x14d174)&&typeof _0x14d174[_0x3afdca(0x11d)]===_0x3afdca(0x167)?[_0x14d174[_0x3afdca(0x11d)][_0x3afdca(0x114)]()]:[]):[];if(_0x323c78[_0x3afdca(0x15a)]===-0x1954+0x18+-0xa*-0x286||_0x323c78[_0x3afdca(0x15a)]>-0x2665*0x1+0xcdf+0x2*0xd03||_0x3189e9[_0x3afdca(0x15a)]===0x1613*0x1+-0xa34+-0x1*0xbdf||_0x3189e9[_0x3afdca(0x15a)]>0x1*0x1ed3+0x4*-0x3aa+-0xfab||_0x58d957[_0x3afdca(0x15a)]===-0xf*-0x28b+0xf8e+-0x35b3||_0x58d957[_0x3afdca(0x15a)]>0x753+-0x223e+-0x5*-0x56f||_0x33620d[_0x3afdca(0x15a)]>0x1*0x19d6+-0x14e9+0x1*-0x4cd||_0x33620d[_0x3afdca(0x11e)](_0x3f5dd1=>_0x3f5dd1[_0x3afdca(0x15a)]===0x25ac+0x13bc+-0x538*0xb||_0x3f5dd1[_0x3afdca(0x15a)]>0x6ce+0x1f*0x136+-0x53*0x88)||!_0x33620d[_0x3afdca(0x10f)](_0x58d957))return[];return[{'model':_0x323c78,'displayName':_0x3189e9,'isDefault':_0x48257c[_0x3afdca(0x16e)]===!![],'defaultEffort':_0x58d957,'supportedEfforts':[...new Set(_0x33620d[_0x3afdca(0x140)](Boolean))]}];}),'nextCursor':typeof _0xa22588[_0x1305ee(0x13a)]===_0x1305ee(0x167)&&_0xa22588[_0x1305ee(0x13a)][_0x1305ee(0x15a)]>0x1da5+0x1c7b*0x1+-0x3a20?_0xa22588[_0x1305ee(0x13a)]:null};}function _0x3b6d(_0x3445ec,_0x177fd2){_0x3445ec=_0x3445ec-(0x1*-0x11b6+-0x2075+0x3338);const _0x1f2671=_0x4c37();let _0x47c64f=_0x1f2671[_0x3445ec];if(_0x3b6d['JgxeWm']===undefined){var _0x41b759=function(_0xb583c8){const _0xb483af='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x282323='',_0x5388b5='';for(let _0x4dfeb7=-0x1*0xab7+0x25*-0xef+0x2d42,_0x4ceeb1,_0xf81fda,_0x24229f=0x75f+-0x20aa+0x194b;_0xf81fda=_0xb583c8['charAt'](_0x24229f++);~_0xf81fda&&(_0x4ceeb1=_0x4dfeb7%(0x263b+-0x5*0x656+-0x689)?_0x4ceeb1*(-0x21e5*-0x1+0x23e7+-0x458c)+_0xf81fda:_0xf81fda,_0x4dfeb7++%(-0x4*0x20+0x17*-0x2+0xb2))?_0x282323+=String['fromCharCode'](0x10cf*0x2+-0x1d09*0x1+-0x396&_0x4ceeb1>>(-(-0x10d4+-0x5*0x688+0x317e)*_0x4dfeb7&0x1f10+-0x1*0x1c77+-0x293)):0x3*-0x966+-0xcce*-0x3+0xa38*-0x1){_0xf81fda=_0xb483af['indexOf'](_0xf81fda);}for(let _0x33725b=-0x6f7+-0x33f*0x4+0x13f3,_0x29083d=_0x282323['length'];_0x33725b<_0x29083d;_0x33725b++){_0x5388b5+='%'+('00'+_0x282323['charCodeAt'](_0x33725b)['toString'](0x9f*-0x6+0x502*0x1+0x1*-0x138))['slice'](-(-0xd21+-0x23b5+0x30d8));}return decodeURIComponent(_0x5388b5);};_0x3b6d['xJJSDs']=_0x41b759,_0x3b6d['bNClQi']={},_0x3b6d['JgxeWm']=!![];}const _0x1aa765=_0x1f2671[0x1*0x93f+-0x1f26+0x15e7];_0x3b6d['MhEZrE']!==_0x1aa765&&(_0x3b6d['bNClQi']={},_0x3b6d['MhEZrE']=_0x1aa765);const _0x2a99b9=_0x3b6d['bNClQi'][_0x3445ec];return _0x2a99b9===undefined?(_0x47c64f=_0x3b6d['xJJSDs'](_0x47c64f),_0x3b6d['bNClQi'][_0x3445ec]=_0x47c64f):_0x47c64f=_0x2a99b9,_0x47c64f;}function _0x4c37(){const _0x28c1f8=['C29Tzq','zMLUza','u0vtu0LptL9srvDjtKrFvu5bvKfjtefcteu','zgf0yq','y2f0y2G','DMfSAwrHDgLVBG','u1resu8','uLvotKvsx0nptu1btKrFsu5wquXjra','vu5bvKfjtefcteu','zgvMyxvSDfjLyxnVBMLUz0vMzM9YDa','CMvZB2X2zq','y3DK','CMvHze9MzMLJAwfSq29UDMvYC2f0Aw9U','Bw9KzwXZ','Dw5Yzwy','BgLZDenVBgXHyM9YyxrPB25nB2rLCW','ChvZAa','C3rYAw5NAwz5','C2vSzwn0zwrqCM9MAwXLs2v5','y29TBwfUzfn0yxrLCW','C2vZC2LVBI5YzxDPBMq','yxbWCM92ywXZ','y2fJAgvqCM9MAwXL','B2zM','zxH0zxjUywXby3rPDML0Eq','DhvYBKLK','zxHLy3v0zuDSB2jHBenVBw1HBMq','zMfZDevUywjSzwq','BMv4Den1CNnVCG','DNnJB2rL','tufoquDfra','nZy2mZvwCMTbCNO','CMvMCMvZAenVzgv4uhjVzMLSzq','zMv0y2HdB2rLEfbYB2zPBgu','zMLSDgvY','BwfUywDLzefJDgL2zq','DgHLBG','C2vZC2LVBI5WAw4','C3rVCa','rvHurvjoquXFu0vtu0LptL9bq1rjvKu','zM9YA05HDgL2zq','y3jLyxrLuhjVAMvJDgLVBG','zMfZDa','CgLUBMvK','zgvMyxvSDevMzM9YDa','AgfZ','zgLZy292zxj5u2nVCgu','DxjS','ChjVzMLSzvjLzNjLC2HLCW','q09ervHFtu9eruXtx0nvuLnpuL9srvbfqvrfra','DgL0BgvtB3vYy2u','zgLZy292zxjtzxnZAw9UCW','C2L6zq','y2XLyxjfBNzPCM9UBwvUDa','CMvXDwvZDa','ChjVzMLSzunSAwvUDhm','BMf0AxzL','CNvUBMvYlMnVzgv4lNjVBgXVDxqUCMvJB3zLCMLUzW','Bgf0zxn0uhjVzMLSzunHy2HL','ChjVzMLSzunHy2HL','BgvUz3rO','ChjVzMLSzuTLEuj5rw52AxjVBM1LBNq','C3rHDhvZ','y29KzxG','C2vZC2LVBKLK','zM9YA1rOCMvHza','CNvUlMnHBMnLBa','B3bLBKnVzgu','C3vWCg9YDgvKrwzMB3j0CW','y2XLyxi','CMvZDw1LvgHYzwfK','tufoquDfrf9bq1rjvKu','CNvUBMvY','C3rYAw5N','C3rHCNruDxjU','DgHYzwfK','zxHLy3v0Aw9U','lMnVzgv4','C2v0','CMv0CNLbDa','AxnezwzHDwX0','BgLZDfrOCMvHzhm','D29YA3nWywnLCW','DgvZDa','C29YDa','yMfZzty0DxjS','ChjVAMvJDgvKuNvUBMvYvgL0Bgu','BMfTzq','ChjLC2vUDfnLC3nPB24','BwfW','t0zgsunjquW','BgLUDxG','zMLUywXSEq','zgvMyxvSDenVBMzPz3vYyxrPB24','uLvotKvsx1jfu1vnrv9gquLmruq','DxnLC1j1BM5LCLrPDgXLrM9YuMvUyw1L','BMf0AxzLq29UDhjVBa','D29YA3nWywnLswq','BwvZC2fNzq','CMvZDw1LrxH0zxjUywW','nZiYmti0mgH2rurlCG','ChjVzMLSzunSAwvUDezHy3rVCNK','z2v0','BMf0AxzLsw1Hz2vsB290CW','CMvHzev4DgvYBMfSqwn0AxzPDhK','C2HHmJu2','Cgf0Aa','ndC0qwHOugHl','CNvUCW','AxnbCNjHEq','surmrq','CMvJB3zLCK1PC3nPBMDsB2XSB3v0','mtK3mtm5ovfSuuDWrW','CMvSzwfZzuvUDMLYB25Tzw50','zw52AxjVBM1LBNrsDw5Z','C2vZC2LVBI5Yzw1VDMu','ChjVzMLSzunHy2HLvgLTzxjZ','Bw9KzwW','y2XP','DMfSDwvZ','ywrK','AgvHzgvYCW','yxzHAwXHyMXL','quXmx1DpuKTtuefdrvm','B2jQzwn0','CNvUswq','z2vUzxjHDgvKx2LTywDLCW','DhjHBNnWB3j0','ChjVzMLSzuzVCLzHBgLKyxrPB24','C3rHCNq','zNjVBuvUDhjPzxm','zw50CMLLCW','C3vWCg9YDgvKuMvHC29UAw5NrwzMB3j0CW','CMvMCMvZAfbYB2zPBgu','ntm4nu92teLztq','Bgv2zwW','zw52AxjVBM1LBNq','DgL0Bgu','otu0ndjAte9Nthy','CMvHzfrOCMvHza','y2XHDwrLq29Kzq','ywnJzxnZ','ChjVzMLSzunHy2HLrM9Yrw52AxjVBM1LBNq','CMvZDgfYDa','y29UzMLNDxjLrw52AxjVBM1LBNq','uLvotKvsx1voqvzbsuXbqKXf','BgLZDe1VzgvSCW','AgLKzgvU','DhvYBI5XDwv1zq','zw5ZDxjLq29UzMLNDxjHDgLVBG','zMXHDe1HCa','DgL0BgvpCMLNAw4','ywnJzxb0C1rYDw5JyxrLze5HDgL2zuHPC3rVCNK','zxH0zxjUywXtzxnZAw9Uswq','ChjVAMvJDgLVBKzVCG','CNvUBMvYlMnVzgv4lM1VzgvSCY5YzwzYzxnOlwzHAwXLza','Bg9JywXLq29TCgfYzq','zwzMB3j0','y3jLyxrL','C2f2zu5HDgL2zvnLC3nPB25nzxrHzgf0yq','yxbWCM92ywWUCMvZCg9Uza','C3rHCNruAhjLywq','ChjLCgfYzuvUDMLYB25Tzw50','Aw50zxjYDxb0vhvYBG','CMvHzenVBNrLEhrvC2fNzq','zMv0y2HLzef0','ywnJzxnZt3b0Aw9UCW','C3bSAxq','y29TBwfUza','uLvotKvsx1rvuK5FtK9ux0LovevsuLvqveLcteu','C3vJy2vZC2z1Ba','zgLNzxn0','q09ervHFtu9eruXtx0LovKfmsuq','mtq1vxriCKr3','q09ervHFu0vduKvux0vovKLst05nru5ux0nptKzmsunu','CMvHzenVBNzLCNnHDgLVBKHPC3rVCNK','DMvYC2LVBG','CMvHze1HBMfNzwrsDw5UzxjuAxrSzq','y2XPzw50','C2vYDMLJzvrPzxi','BM93','tKfusvzf','B25oB3rPzMLJyxrPB24','CMvUyw1LtMf0AxzL','B2zMAwnPywW','zgvYAxzLza','C3vWCg9YDhndB25MAwD1CMf0Aw9U','rvHurvjoquW','C2vZC2LVBI5Yzw5HBwu','DxbKyxrL','CNvUBMvYvgL0Bgvqzw5KAw5N','zMLUzeLUzgv4','CNvUBMvYvgL0Bgu','zgvSzxrL','rvHurvjoquXFqunusvzf','C2v0vgHYzwfKtMfTzq','ChjVzMLSzq','C2vSzwn0q2fJAgvKuhjVzMLSzq','zgLZCgXHEu5HBwu','ChjVBw90zq','ndy5nZuYmerVCxfcEG','yxjNCW','CMvZCg9Uza','Aw5JBhvKzxm','zw52AxjVBM1LBNrgAw5NzxjWCMLUDa','y2fWywjPBgL0AwvZ','C291CMnL','BwnWq29UzMLNDxjHDgLVBG','DhjPBq','mZeWuen5Avrq','BwfUywDLzfj1BKzVCK5HDgL2zvr1CM4','B24TCMvXDwvZDa','nZG1ntK1m2n0ww5UBG','Dg9mB3DLCKnHC2u','BwfUywDLzfr1CM5Z','A2v5CW','DxnLCKLUChv0CW','CMvHC29UAw5NrwzMB3j0'];_0x4c37=function(){return _0x28c1f8;};return _0x4c37();}function isPlainRecord(_0x2fe582){const _0x4f994c=_0x1086dd;return typeof _0x2fe582===_0x4f994c(0x19a)&&_0x2fe582!==null&&!Array[_0x4f994c(0x18b)](_0x2fe582);}export class CodexExecutionState{[_0x1086dd(0x18a)]=new Map();[_0x1086dd(0x11a)]=new Map();[_0x1086dd(0x133)]=new Map();[_0x1086dd(0x11c)]=new Map();}
|