replicas-cli 0.3.605 → 0.3.606
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.cjs +24 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -22815,7 +22815,7 @@ function parseCodexTurnRetryPayload(payload) {
|
|
|
22815
22815
|
const { attempt, maxAttempts, [CODEX_ASP_ITEM_ID_PAYLOAD_KEY]: turnId } = payload;
|
|
22816
22816
|
return typeof attempt === "number" && typeof maxAttempts === "number" && typeof turnId === "string" ? { attempt, maxAttempts, [CODEX_ASP_ITEM_ID_PAYLOAD_KEY]: turnId } : void 0;
|
|
22817
22817
|
}
|
|
22818
|
-
var CLAUDE_PARTIAL_MESSAGE_EVENT_TYPE, ACCEPTED_USER_MESSAGE_SOURCE, QUEUED_MESSAGE_REMOVED_EVENT_TYPE, REMOVED_MESSAGE_IDS_PAYLOAD_KEY, USER_MESSAGE_ID_PAYLOAD_KEY, REPLACED_MESSAGE_ID_PAYLOAD_KEY, CODEX_ASP_ITEM_ID_PAYLOAD_KEY, CODEX_ITEM_EVENT_TYPE, CODEX_ITEM_PARTIAL_EVENT_TYPE, CODEX_TURN_EVENT_TYPE, CODEX_TURN_RETRY_EVENT_TYPE, CODEX_QUOTA_STATUS_EVENT_TYPE, CHAT_INTERRUPTED_EVENT_TYPE, CHAT_MESSAGE_REJECTED_EVENT_TYPE, REJECTED_MESSAGE_ID_PAYLOAD_KEY, REJECTED_CODE_PAYLOAD_KEY, REFUSED_COPY_MESSAGE_ID_PREFIX, CHAT_TURN_LOST_EVENT_TYPE, CHAT_TURN_LOST_MESSAGE, CLAUDE_PEER_MESSAGE_EVENT_TYPE, AUTH_FALLBACK_EVENT_TYPE;
|
|
22818
|
+
var CLAUDE_PARTIAL_MESSAGE_EVENT_TYPE, ACCEPTED_USER_MESSAGE_SOURCE, QUEUED_MESSAGE_REMOVED_EVENT_TYPE, REMOVED_MESSAGE_IDS_PAYLOAD_KEY, USER_MESSAGE_ID_PAYLOAD_KEY, REPLACED_MESSAGE_ID_PAYLOAD_KEY, RESENT_MESSAGE_ID_PAYLOAD_KEY, CODEX_ASP_ITEM_ID_PAYLOAD_KEY, CODEX_ITEM_EVENT_TYPE, CODEX_ITEM_PARTIAL_EVENT_TYPE, CODEX_TURN_EVENT_TYPE, CODEX_TURN_RETRY_EVENT_TYPE, CODEX_QUOTA_STATUS_EVENT_TYPE, CHAT_INTERRUPTED_EVENT_TYPE, CHAT_MESSAGE_REJECTED_EVENT_TYPE, REJECTED_MESSAGE_ID_PAYLOAD_KEY, REJECTED_CODE_PAYLOAD_KEY, REFUSED_COPY_MESSAGE_ID_PREFIX, CHAT_TURN_LOST_EVENT_TYPE, CHAT_TURN_LOST_MESSAGE, CLAUDE_PEER_MESSAGE_EVENT_TYPE, AUTH_FALLBACK_EVENT_TYPE;
|
|
22819
22819
|
var init_event = __esm({
|
|
22820
22820
|
"../shared/src/event.ts"() {
|
|
22821
22821
|
"use strict";
|
|
@@ -22829,6 +22829,7 @@ var init_event = __esm({
|
|
|
22829
22829
|
REMOVED_MESSAGE_IDS_PAYLOAD_KEY = "removedMessageIds";
|
|
22830
22830
|
USER_MESSAGE_ID_PAYLOAD_KEY = "replicasMessageId";
|
|
22831
22831
|
REPLACED_MESSAGE_ID_PAYLOAD_KEY = "replicasReplacedMessageId";
|
|
22832
|
+
RESENT_MESSAGE_ID_PAYLOAD_KEY = "replicasResentMessageId";
|
|
22832
22833
|
CODEX_ASP_ITEM_ID_PAYLOAD_KEY = "codexAspItemId";
|
|
22833
22834
|
CODEX_ITEM_EVENT_TYPE = "codex-item";
|
|
22834
22835
|
CODEX_ITEM_PARTIAL_EVENT_TYPE = "codex-item-partial";
|
|
@@ -23009,6 +23010,7 @@ var init_v1 = __esm({
|
|
|
23009
23010
|
errorNotificationTarget: integrationErrorNotificationTargetSchema.optional(),
|
|
23010
23011
|
errorNotificationTargets: external_exports.array(integrationErrorNotificationTargetSchema).optional(),
|
|
23011
23012
|
replacesMessageId: external_exports.string().min(1).max(256).optional(),
|
|
23013
|
+
resendsMessageId: external_exports.string().min(1).max(256).optional(),
|
|
23012
23014
|
steer: external_exports.union([external_exports.boolean(), external_exports.literal("alone")]).optional()
|
|
23013
23015
|
}).passthrough();
|
|
23014
23016
|
CODEX_ITEM_FIELD_CHECKS = {
|
|
@@ -39391,6 +39393,20 @@ var init_claude_parser = __esm({
|
|
|
39391
39393
|
});
|
|
39392
39394
|
|
|
39393
39395
|
// ../shared/src/display-message/parsers/index.ts
|
|
39396
|
+
function withoutResentMessages(messages, events, waiting = []) {
|
|
39397
|
+
const resent = /* @__PURE__ */ new Set();
|
|
39398
|
+
for (const event of events) {
|
|
39399
|
+
const messageId = getResentMessageId(event);
|
|
39400
|
+
if (messageId && typeof event.payload.userId === "string") resent.add(`${event.payload.userId}
|
|
39401
|
+
${messageId}`);
|
|
39402
|
+
}
|
|
39403
|
+
for (const { resendsMessageId, senderUserId } of waiting) {
|
|
39404
|
+
if (resendsMessageId && senderUserId) resent.add(`${senderUserId}
|
|
39405
|
+
${resendsMessageId}`);
|
|
39406
|
+
}
|
|
39407
|
+
return messages.filter((message2) => !(message2.type === "user" && message2.cancelled && message2.senderUserId && resent.has(`${message2.senderUserId}
|
|
39408
|
+
${message2.id}`)));
|
|
39409
|
+
}
|
|
39394
39410
|
function parseProviderEvents(events, agentType, parentToolUseId) {
|
|
39395
39411
|
if (agentType === "codex") {
|
|
39396
39412
|
return parseCodexEvents(events);
|
|
@@ -39417,7 +39433,7 @@ function parseProviderEvents(events, agentType, parentToolUseId) {
|
|
|
39417
39433
|
}
|
|
39418
39434
|
function parseDisplayMessages(events, agentType, options = {}) {
|
|
39419
39435
|
return withoutReplacedMessages(excludeQueuedAcceptedEvents(events, []), (segment) => {
|
|
39420
|
-
const parsedEvents = parseProviderEvents(segment, agentType, options.parentToolUseId);
|
|
39436
|
+
const parsedEvents = withoutResentMessages(parseProviderEvents(segment, agentType, options.parentToolUseId), segment, options.queue);
|
|
39421
39437
|
const reconciledEvents = [];
|
|
39422
39438
|
const firstIndexById = /* @__PURE__ */ new Map();
|
|
39423
39439
|
for (const message2 of parsedEvents) {
|
|
@@ -39660,6 +39676,10 @@ function getReplacedMessageId(event) {
|
|
|
39660
39676
|
const messageId = event.payload[REPLACED_MESSAGE_ID_PAYLOAD_KEY];
|
|
39661
39677
|
return typeof messageId === "string" && !messageId.startsWith(REFUSED_COPY_MESSAGE_ID_PREFIX) && !messageId.startsWith(`user-${REFUSED_COPY_MESSAGE_ID_PREFIX}`) ? messageId : null;
|
|
39662
39678
|
}
|
|
39679
|
+
function getResentMessageId(event) {
|
|
39680
|
+
const messageId = event.payload[RESENT_MESSAGE_ID_PAYLOAD_KEY];
|
|
39681
|
+
return typeof messageId === "string" ? messageId : null;
|
|
39682
|
+
}
|
|
39663
39683
|
function getRemovedMessageIds(event) {
|
|
39664
39684
|
if (event.type !== QUEUED_MESSAGE_REMOVED_EVENT_TYPE) return [];
|
|
39665
39685
|
const messageIds = event.payload[REMOVED_MESSAGE_IDS_PAYLOAD_KEY];
|
|
@@ -40531,6 +40551,7 @@ var init_types8 = __esm({
|
|
|
40531
40551
|
message: userMessageSchema,
|
|
40532
40552
|
userId: external_exports.string().nullable(),
|
|
40533
40553
|
messageId: external_exports.string().optional(),
|
|
40554
|
+
resendsMessageId: external_exports.string().optional(),
|
|
40534
40555
|
agentOutcome: harnessAgentOutcomeSchema.optional(),
|
|
40535
40556
|
model: external_exports.string().optional(),
|
|
40536
40557
|
thinkingLevel: external_exports.enum(VALID_THINKING_LEVELS).optional(),
|
|
@@ -40739,7 +40760,7 @@ var CLI_VERSION;
|
|
|
40739
40760
|
var init_cli_version = __esm({
|
|
40740
40761
|
"../shared/src/cli-version.ts"() {
|
|
40741
40762
|
"use strict";
|
|
40742
|
-
CLI_VERSION = "0.3.
|
|
40763
|
+
CLI_VERSION = "0.3.606";
|
|
40743
40764
|
}
|
|
40744
40765
|
});
|
|
40745
40766
|
|