chatroom-cli 1.91.5 → 1.91.7
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/index.js +45 -21
- package/dist/index.js.map +5 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -29834,7 +29834,7 @@ var init_model_variant = __esm(() => {
|
|
|
29834
29834
|
});
|
|
29835
29835
|
|
|
29836
29836
|
// src/daemon/infrastructure/local/harness/services/codex-sdk/codex-sdk-package.ts
|
|
29837
|
-
import { existsSync as existsSync2, readFileSync as readFileSync4, statSync } from "node:fs";
|
|
29837
|
+
import { existsSync as existsSync2, readFileSync as readFileSync4, realpathSync, statSync } from "node:fs";
|
|
29838
29838
|
import { createRequire as createRequire4 } from "node:module";
|
|
29839
29839
|
import { dirname as dirname3, join as join8 } from "node:path";
|
|
29840
29840
|
import { fileURLToPath as fileURLToPath3, pathToFileURL as pathToFileURL2 } from "node:url";
|
|
@@ -29909,6 +29909,25 @@ function isRegularFile(filePath) {
|
|
|
29909
29909
|
return false;
|
|
29910
29910
|
}
|
|
29911
29911
|
}
|
|
29912
|
+
function addPlatformPackageJsonCandidate(candidates, candidate) {
|
|
29913
|
+
if (candidate && existsSync2(candidate) && !candidates.includes(candidate)) {
|
|
29914
|
+
candidates.push(candidate);
|
|
29915
|
+
}
|
|
29916
|
+
}
|
|
29917
|
+
function resolvePlatformPackageJsonCandidates(platformPkg, chatroomCliRoot, codexPackageJson, chatroomRequire, codexRequire) {
|
|
29918
|
+
const candidates = [];
|
|
29919
|
+
const codexPackageDir = realpathSync(dirname3(codexPackageJson));
|
|
29920
|
+
const platformPkgBaseName = platformPkg.includes("/") ? platformPkg.slice(platformPkg.indexOf("/") + 1) : platformPkg;
|
|
29921
|
+
try {
|
|
29922
|
+
addPlatformPackageJsonCandidate(candidates, codexRequire.resolve(`${platformPkg}/package.json`));
|
|
29923
|
+
} catch {}
|
|
29924
|
+
try {
|
|
29925
|
+
addPlatformPackageJsonCandidate(candidates, chatroomRequire.resolve(`${platformPkg}/package.json`, { paths: [chatroomCliRoot] }));
|
|
29926
|
+
} catch {}
|
|
29927
|
+
addPlatformPackageJsonCandidate(candidates, join8(codexPackageDir, "..", platformPkgBaseName, "package.json"));
|
|
29928
|
+
addPlatformPackageJsonCandidate(candidates, join8(codexPackageDir, "node_modules", platformPkg, "package.json"));
|
|
29929
|
+
return candidates;
|
|
29930
|
+
}
|
|
29912
29931
|
function resolveNativeCodexBinary(vendorRoot, targetTriple, codexBinaryName) {
|
|
29913
29932
|
const packageRoot = join8(vendorRoot, targetTriple);
|
|
29914
29933
|
const packageBinaryPath = join8(packageRoot, "bin", codexBinaryName);
|
|
@@ -29922,8 +29941,6 @@ function resolveNativeCodexBinary(vendorRoot, targetTriple, codexBinaryName) {
|
|
|
29922
29941
|
return;
|
|
29923
29942
|
}
|
|
29924
29943
|
function resolveCodexExecutablePath(moduleRef = import.meta.url) {
|
|
29925
|
-
if (cachedExecutablePath2)
|
|
29926
|
-
return cachedExecutablePath2;
|
|
29927
29944
|
const chatroomCliRoot = resolveChatroomCliRoot2(moduleRef);
|
|
29928
29945
|
const require3 = createRequire4(join8(chatroomCliRoot, "package.json"));
|
|
29929
29946
|
let codexPackageJson;
|
|
@@ -29938,18 +29955,7 @@ function resolveCodexExecutablePath(moduleRef = import.meta.url) {
|
|
|
29938
29955
|
const platformPkg = resolvePlatformPackageName2(targetTriple);
|
|
29939
29956
|
const codexBinaryName = process.platform === "win32" ? "codex.exe" : "codex";
|
|
29940
29957
|
const codexRequire = createRequire4(codexPackageJson);
|
|
29941
|
-
const platformPackageJsonCandidates =
|
|
29942
|
-
try {
|
|
29943
|
-
platformPackageJsonCandidates.push(codexRequire.resolve(`${platformPkg}/package.json`));
|
|
29944
|
-
} catch {}
|
|
29945
|
-
try {
|
|
29946
|
-
const fromCliRoot = require3.resolve(`${platformPkg}/package.json`, {
|
|
29947
|
-
paths: [chatroomCliRoot]
|
|
29948
|
-
});
|
|
29949
|
-
if (!platformPackageJsonCandidates.includes(fromCliRoot)) {
|
|
29950
|
-
platformPackageJsonCandidates.push(fromCliRoot);
|
|
29951
|
-
}
|
|
29952
|
-
} catch {}
|
|
29958
|
+
const platformPackageJsonCandidates = resolvePlatformPackageJsonCandidates(platformPkg, chatroomCliRoot, codexPackageJson, require3, codexRequire);
|
|
29953
29959
|
if (platformPackageJsonCandidates.length === 0) {
|
|
29954
29960
|
throw new CodexSdkPackageError(`Native Codex CLI package ${platformPkg} is not installed. Ensure ${CODEX_NPM_NAME} is installed with optional dependencies. ${REINSTALL_HINT2}`);
|
|
29955
29961
|
}
|
|
@@ -29957,8 +29963,7 @@ function resolveCodexExecutablePath(moduleRef = import.meta.url) {
|
|
|
29957
29963
|
const vendorRoot = join8(dirname3(platformPackageJson), "vendor");
|
|
29958
29964
|
const binaryPath = resolveNativeCodexBinary(vendorRoot, targetTriple, codexBinaryName);
|
|
29959
29965
|
if (binaryPath) {
|
|
29960
|
-
|
|
29961
|
-
return cachedExecutablePath2;
|
|
29966
|
+
return binaryPath;
|
|
29962
29967
|
}
|
|
29963
29968
|
}
|
|
29964
29969
|
throw new CodexSdkPackageError(`Unable to locate Codex CLI binaries for ${targetTriple}. Ensure ${CODEX_NPM_NAME} is installed with optional dependencies. ${REINSTALL_HINT2}`);
|
|
@@ -30004,7 +30009,7 @@ function formatCodexSdkLoadError(err) {
|
|
|
30004
30009
|
}
|
|
30005
30010
|
return formatCodexSdkError(err);
|
|
30006
30011
|
}
|
|
30007
|
-
var REINSTALL_HINT2 = "Reinstall chatroom-cli: npm install -g chatroom-cli@latest", CODEX_NPM_NAME = "@openai/codex", PLATFORM_PACKAGE_BY_TARGET, CodexSdkPackageError
|
|
30012
|
+
var REINSTALL_HINT2 = "Reinstall chatroom-cli: npm install -g chatroom-cli@latest", CODEX_NPM_NAME = "@openai/codex", PLATFORM_PACKAGE_BY_TARGET, CodexSdkPackageError;
|
|
30008
30013
|
var init_codex_sdk_package = __esm(() => {
|
|
30009
30014
|
PLATFORM_PACKAGE_BY_TARGET = {
|
|
30010
30015
|
"x86_64-unknown-linux-musl": "@openai/codex-linux-x64",
|
|
@@ -98351,6 +98356,20 @@ function parseAssignedTaskSignal(raw) {
|
|
|
98351
98356
|
return assignedTaskSignalSchema.parse(raw);
|
|
98352
98357
|
}
|
|
98353
98358
|
function parseAssignedTaskPresenceSignal(raw) {
|
|
98359
|
+
const delta = assignedTaskPresenceDeltaSchema.safeParse(raw);
|
|
98360
|
+
const hasFullWireFields = typeof raw === "object" && raw !== null && "chatroomId" in raw && "presenceUpdatedAt" in raw;
|
|
98361
|
+
if (delta.success && !hasFullWireFields) {
|
|
98362
|
+
const presenceUpdatedAt = Number(delta.data.presenceKey.split(":")[0]);
|
|
98363
|
+
const resolvedAt = Number.isFinite(presenceUpdatedAt) ? presenceUpdatedAt : 0;
|
|
98364
|
+
return {
|
|
98365
|
+
taskId: delta.data.taskId,
|
|
98366
|
+
chatroomId: "",
|
|
98367
|
+
role: delta.data.role,
|
|
98368
|
+
lastSeenAt: resolvedAt,
|
|
98369
|
+
presenceUpdatedAt: resolvedAt,
|
|
98370
|
+
presenceKey: delta.data.presenceKey
|
|
98371
|
+
};
|
|
98372
|
+
}
|
|
98354
98373
|
return assignedTaskPresenceSignalSchema.parse(raw);
|
|
98355
98374
|
}
|
|
98356
98375
|
function parseAssignedTaskMonitorRow(raw) {
|
|
@@ -98362,7 +98381,7 @@ function parseAssignedTaskMonitorRows(raw) {
|
|
|
98362
98381
|
}
|
|
98363
98382
|
return raw.map((row) => parseAssignedTaskMonitorRow(row));
|
|
98364
98383
|
}
|
|
98365
|
-
var ACTIVE_TASK_STATUSES, activeTaskStatusSchema, ASSIGNED_TASK_SIGNAL_TYPES, assignedTaskSignalTypeSchema, SESSION_AUGMENTATION_MODES, sessionAugmentationSchema, AGENT_DESIRED_STATES, agentDesiredStateSchema, AGENT_CIRCUIT_STATES, agentCircuitStateSchema, chatroomTaskIdSchema, chatroomRoomIdSchema, assignedTaskAgentConfigSchema, assignedTaskParticipantSchema, assignedTaskSignalBootstrapFields, assignedTaskSignalSchema, assignedTaskPresenceSignalSchema, assignedTaskMonitorRowSchema;
|
|
98384
|
+
var ACTIVE_TASK_STATUSES, activeTaskStatusSchema, ASSIGNED_TASK_SIGNAL_TYPES, assignedTaskSignalTypeSchema, SESSION_AUGMENTATION_MODES, sessionAugmentationSchema, AGENT_DESIRED_STATES, agentDesiredStateSchema, AGENT_CIRCUIT_STATES, agentCircuitStateSchema, chatroomTaskIdSchema, chatroomRoomIdSchema, assignedTaskAgentConfigSchema, assignedTaskParticipantSchema, assignedTaskSignalBootstrapFields, assignedTaskSignalSchema, assignedTaskPresenceSignalSchema, assignedTaskPresenceDeltaSchema, assignedTaskMonitorRowSchema;
|
|
98366
98385
|
var init_assigned_task_monitor_contract = __esm(() => {
|
|
98367
98386
|
init_zod();
|
|
98368
98387
|
init_convex_id();
|
|
@@ -98421,6 +98440,11 @@ var init_assigned_task_monitor_contract = __esm(() => {
|
|
|
98421
98440
|
presenceUpdatedAt: exports_external.number(),
|
|
98422
98441
|
presenceKey: exports_external.string()
|
|
98423
98442
|
});
|
|
98443
|
+
assignedTaskPresenceDeltaSchema = exports_external.object({
|
|
98444
|
+
taskId: chatroomTaskIdSchema,
|
|
98445
|
+
role: exports_external.string(),
|
|
98446
|
+
presenceKey: exports_external.string()
|
|
98447
|
+
});
|
|
98424
98448
|
assignedTaskMonitorRowSchema = exports_external.object({
|
|
98425
98449
|
taskId: chatroomTaskIdSchema,
|
|
98426
98450
|
chatroomId: chatroomRoomIdSchema,
|
|
@@ -115849,7 +115873,7 @@ var init_assigned_task_presence = __esm(() => {
|
|
|
115849
115873
|
init_api3();
|
|
115850
115874
|
assignedTaskPresenceFeedDef = {
|
|
115851
115875
|
name: "assigned-task-presence",
|
|
115852
|
-
itemKey: (item) =>
|
|
115876
|
+
itemKey: (item) => item.presenceKey,
|
|
115853
115877
|
parseItem: parseAssignedTaskPresenceSignal
|
|
115854
115878
|
};
|
|
115855
115879
|
assignedTaskPresenceSubscribeTarget = {
|
|
@@ -117823,4 +117847,4 @@ program2.hook("preAction", async (_thisCommand, actionCommand) => {
|
|
|
117823
117847
|
});
|
|
117824
117848
|
program2.parse();
|
|
117825
117849
|
|
|
117826
|
-
//# debugId=
|
|
117850
|
+
//# debugId=8936EE56C4B1994564756E2164756E21
|