replicas-engine 0.1.1305 → 0.1.1306
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/src/{asp-host-QEZNRY2W.js → asp-host-AQZFJO5T.js} +2 -2
- package/dist/src/{chunk-NG63G5VA.js → chunk-4AY3GCWL.js} +1 -1
- package/dist/src/{chunk-AS77RMSN.js → chunk-OSPDTEXF.js} +1 -1
- package/dist/src/{chunk-SYZXJP4X.js → chunk-YJ7NCHM6.js} +3 -3
- package/dist/src/headless-agent.js +2 -2
- package/dist/src/index.js +21 -21
- package/package.json +1 -1
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
listRunningCodexModels,
|
|
9
9
|
restartCodexAspHost,
|
|
10
10
|
restartCodexAspHostIfRunning
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-YJ7NCHM6.js";
|
|
12
12
|
import "./chunk-TKAWFIXX.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-OSPDTEXF.js";
|
|
14
14
|
import "./chunk-IHC4JY3Q.js";
|
|
15
15
|
import "./chunk-UZSNFLDQ.js";
|
|
16
16
|
import "./chunk-QBNBBWCE.js";
|
|
@@ -240,7 +240,7 @@ function getCodexModelProvider(method) {
|
|
|
240
240
|
if (method === "foundry") return "azure";
|
|
241
241
|
return method === "ollama" || method === "openai-compatible" ? "replicas_openai_compatible" : "openai";
|
|
242
242
|
}
|
|
243
|
-
var ENGINE_PACKAGE_VERSION = "0.1.
|
|
243
|
+
var ENGINE_PACKAGE_VERSION = "0.1.1306";
|
|
244
244
|
var INITIALIZE_METHOD = "initialize";
|
|
245
245
|
var INITIALIZED_NOTIFICATION = "initialized";
|
|
246
246
|
var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
AppServerProcess,
|
|
16
16
|
buildCodexAgentEnv
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-OSPDTEXF.js";
|
|
18
18
|
import {
|
|
19
19
|
SUBPROCESS_MAX_BUFFER,
|
|
20
20
|
execFileAsync
|
|
@@ -306,7 +306,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
|
|
|
306
306
|
await this.applyCredentialUpdate(++this.credentialGeneration, async () => {
|
|
307
307
|
await this.applyCredentialsResponse(data);
|
|
308
308
|
setAgentCredentialSnapshot("codex", data);
|
|
309
|
-
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-
|
|
309
|
+
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-AQZFJO5T.js");
|
|
310
310
|
await restartCodexAspHostIfRunning2();
|
|
311
311
|
});
|
|
312
312
|
await this.start(true);
|
|
@@ -328,7 +328,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
|
|
|
328
328
|
const accountChanged = ENGINE_ENV.REPLICAS_AGENT_CREDENTIALS.codex?.credentialId !== data.credentialId;
|
|
329
329
|
await this.applyCredentialsResponse(data);
|
|
330
330
|
if (restartOnChange && (accountChanged || CODEX_AUTH_ENV_KEYS.some((key, index) => process.env[key] !== previousEnv[index]))) {
|
|
331
|
-
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-
|
|
331
|
+
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-AQZFJO5T.js");
|
|
332
332
|
await restartCodexAspHostIfRunning2();
|
|
333
333
|
}
|
|
334
334
|
setAgentCredentialSnapshot("codex", data);
|
|
@@ -14,11 +14,11 @@ import {
|
|
|
14
14
|
recoverCompletedTurn,
|
|
15
15
|
spawnMuseMsp,
|
|
16
16
|
startMuseSession
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-4AY3GCWL.js";
|
|
18
18
|
import {
|
|
19
19
|
AppServerProcess,
|
|
20
20
|
buildCodexAgentEnv
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-OSPDTEXF.js";
|
|
22
22
|
import "./chunk-IHC4JY3Q.js";
|
|
23
23
|
import {
|
|
24
24
|
AGENT,
|
package/dist/src/index.js
CHANGED
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
spawnMuseMsp,
|
|
66
66
|
startMuseSession,
|
|
67
67
|
uuidV7
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-4AY3GCWL.js";
|
|
69
69
|
import {
|
|
70
70
|
publishedPullRequestUrls
|
|
71
71
|
} from "./chunk-DDUTPOJ3.js";
|
|
@@ -143,7 +143,7 @@ import {
|
|
|
143
143
|
timestampFromSeconds,
|
|
144
144
|
upsertCredentialFileLines,
|
|
145
145
|
writeSecureCredentialFile
|
|
146
|
-
} from "./chunk-
|
|
146
|
+
} from "./chunk-YJ7NCHM6.js";
|
|
147
147
|
import {
|
|
148
148
|
ENGINE_ENV,
|
|
149
149
|
monolithRequest,
|
|
@@ -156,7 +156,7 @@ import {
|
|
|
156
156
|
} from "./chunk-TKAWFIXX.js";
|
|
157
157
|
import {
|
|
158
158
|
getCodexModelProvider
|
|
159
|
-
} from "./chunk-
|
|
159
|
+
} from "./chunk-OSPDTEXF.js";
|
|
160
160
|
import {
|
|
161
161
|
SUBPROCESS_MAX_BUFFER,
|
|
162
162
|
execAsync,
|
|
@@ -10639,11 +10639,9 @@ function getComparableUserMessage(event) {
|
|
|
10639
10639
|
}
|
|
10640
10640
|
function areDuplicateUserMessages(a, b) {
|
|
10641
10641
|
if (areSameUserMessageEvents(a, b)) return true;
|
|
10642
|
-
const aId =
|
|
10643
|
-
const bId =
|
|
10642
|
+
const { userMessageId: aId, userMessage: aMessage } = workspaceChatEventSignals(a);
|
|
10643
|
+
const { userMessageId: bId, userMessage: bMessage } = workspaceChatEventSignals(b);
|
|
10644
10644
|
if (aId !== null && bId !== null && aId !== bId) return false;
|
|
10645
|
-
const aMessage = getComparableUserMessage(a);
|
|
10646
|
-
const bMessage = getComparableUserMessage(b);
|
|
10647
10645
|
if (!aMessage || aMessage !== bMessage) return false;
|
|
10648
10646
|
const aAccepted = isAcceptedUserMessage(a);
|
|
10649
10647
|
const bAccepted = isAcceptedUserMessage(b);
|
|
@@ -10652,7 +10650,7 @@ function areDuplicateUserMessages(a, b) {
|
|
|
10652
10650
|
{ content: bMessage, timestamp: b.timestamp }
|
|
10653
10651
|
) : false;
|
|
10654
10652
|
}
|
|
10655
|
-
var
|
|
10653
|
+
var eventSignalsCache = /* @__PURE__ */ new WeakMap();
|
|
10656
10654
|
function claudeToolResultId(event) {
|
|
10657
10655
|
if (event.type !== "claude-user") return null;
|
|
10658
10656
|
const { message } = event.payload;
|
|
@@ -10661,17 +10659,18 @@ function claudeToolResultId(event) {
|
|
|
10661
10659
|
return isRecord(result) && typeof result.tool_use_id === "string" ? `tool_result:${result.tool_use_id}` : null;
|
|
10662
10660
|
}
|
|
10663
10661
|
function workspaceChatEventSignals(event) {
|
|
10664
|
-
let
|
|
10665
|
-
if (
|
|
10666
|
-
|
|
10667
|
-
|
|
10662
|
+
let signals = eventSignalsCache.get(event);
|
|
10663
|
+
if (signals === void 0) {
|
|
10664
|
+
signals = {
|
|
10665
|
+
streamId: getEventStreamId(event) ?? claudeToolResultId(event),
|
|
10666
|
+
json: JSON.stringify(event),
|
|
10667
|
+
userMessage: getComparableUserMessage(event),
|
|
10668
|
+
userMessageId: event.type === QUEUED_MESSAGE_REMOVED_EVENT_TYPE ? null : getUserMessageId(event),
|
|
10669
|
+
timestampMs: getEventTimestampMs(event)
|
|
10670
|
+
};
|
|
10671
|
+
eventSignalsCache.set(event, signals);
|
|
10668
10672
|
}
|
|
10669
|
-
return
|
|
10670
|
-
streamId: getEventStreamId(event) ?? claudeToolResultId(event),
|
|
10671
|
-
json,
|
|
10672
|
-
userMessage: getComparableUserMessage(event),
|
|
10673
|
-
userMessageId: event.type === QUEUED_MESSAGE_REMOVED_EVENT_TYPE ? null : getUserMessageId(event)
|
|
10674
|
-
};
|
|
10673
|
+
return signals;
|
|
10675
10674
|
}
|
|
10676
10675
|
var emptyIndex = () => ({
|
|
10677
10676
|
byStreamId: /* @__PURE__ */ new Map(),
|
|
@@ -10799,12 +10798,13 @@ function mergeWorkspaceChatHistoryEvents(primary, supplemental, removedMessageId
|
|
|
10799
10798
|
);
|
|
10800
10799
|
}
|
|
10801
10800
|
function insertChronologically(existing, additions) {
|
|
10802
|
-
const
|
|
10801
|
+
const timestampMs2 = (event) => workspaceChatEventSignals(event).timestampMs;
|
|
10802
|
+
const sorted = [...additions].sort((a, b) => timestampMs2(a) - timestampMs2(b));
|
|
10803
10803
|
const result = [];
|
|
10804
10804
|
let next = 0;
|
|
10805
10805
|
for (const event of existing) {
|
|
10806
|
-
const ms =
|
|
10807
|
-
while (next < sorted.length &&
|
|
10806
|
+
const ms = timestampMs2(event);
|
|
10807
|
+
while (next < sorted.length && timestampMs2(sorted[next]) < ms) result.push(sorted[next++]);
|
|
10808
10808
|
result.push(event);
|
|
10809
10809
|
}
|
|
10810
10810
|
result.push(...sorted.slice(next));
|