replicas-cli 0.3.86 → 0.3.88
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 +11 -5
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -7704,6 +7704,12 @@ function getCodingAgentDisplayNames() {
|
|
|
7704
7704
|
return VALID_AGENT_PROVIDERS.map((provider2) => getProviderDisplayName(provider2)).join(", ");
|
|
7705
7705
|
}
|
|
7706
7706
|
|
|
7707
|
+
// ../shared/src/agent-quota.ts
|
|
7708
|
+
var AGENT_FALLBACK_REASONS = ["rate_limit", "out_of_credits", "auth_failed"];
|
|
7709
|
+
function isAgentFallbackReason(value) {
|
|
7710
|
+
return AGENT_FALLBACK_REASONS.some((reason) => reason === value);
|
|
7711
|
+
}
|
|
7712
|
+
|
|
7707
7713
|
// ../shared/src/credentials/services.ts
|
|
7708
7714
|
var API_KEY_CREDENTIAL_SERVICES = [
|
|
7709
7715
|
"anthropic",
|
|
@@ -22927,7 +22933,7 @@ function classifyCanvasFilename(filename) {
|
|
|
22927
22933
|
}
|
|
22928
22934
|
|
|
22929
22935
|
// ../shared/src/chat-fork.ts
|
|
22930
|
-
var
|
|
22936
|
+
var fallbackReasonSchema = external_exports.enum(AGENT_FALLBACK_REASONS);
|
|
22931
22937
|
var chatForkInfoSchema = external_exports.object({
|
|
22932
22938
|
source: external_exports.object({
|
|
22933
22939
|
chatId: external_exports.string().min(1),
|
|
@@ -22935,7 +22941,7 @@ var chatForkInfoSchema = external_exports.object({
|
|
|
22935
22941
|
title: external_exports.string()
|
|
22936
22942
|
}),
|
|
22937
22943
|
trigger: external_exports.enum(["manual", "auto", "side"]),
|
|
22938
|
-
reason:
|
|
22944
|
+
reason: fallbackReasonSchema.optional(),
|
|
22939
22945
|
state: external_exports.enum(["preparing", "ready", "failed"]),
|
|
22940
22946
|
error: external_exports.string().optional(),
|
|
22941
22947
|
startedAt: external_exports.string(),
|
|
@@ -22958,7 +22964,7 @@ var forkChatRequestSchema = external_exports.object({
|
|
|
22958
22964
|
});
|
|
22959
22965
|
var agentQuotaExhaustedPayloadSchema = external_exports.object({
|
|
22960
22966
|
provider: external_exports.enum(VALID_AGENT_PROVIDERS),
|
|
22961
|
-
reason:
|
|
22967
|
+
reason: fallbackReasonSchema,
|
|
22962
22968
|
detail: external_exports.string().optional(),
|
|
22963
22969
|
forkTo: fallbackHarnessStepSchema.optional()
|
|
22964
22970
|
});
|
|
@@ -23005,7 +23011,7 @@ function coerceAuthFallbackPayload(payload) {
|
|
|
23005
23011
|
const { provider: provider2, reason, exhaustedMethod, exhaustedScope, candidateMethod, candidateScope, status, detail } = payload;
|
|
23006
23012
|
const exhaustedAccount = credentialAccountSchema.safeParse(payload.exhaustedAccount).data;
|
|
23007
23013
|
const candidateAccount = credentialAccountSchema.safeParse(payload.candidateAccount).data;
|
|
23008
|
-
if (typeof provider2 !== "string" || !isValidAgentProvider(provider2) || reason
|
|
23014
|
+
if (typeof provider2 !== "string" || !isValidAgentProvider(provider2) || !isAgentFallbackReason(reason) || !isAuthMethod(exhaustedMethod) || !isAuthMethod(candidateMethod) || !isCredentialScope(candidateScope) || status !== "switched" && status !== "failed") {
|
|
23009
23015
|
return null;
|
|
23010
23016
|
}
|
|
23011
23017
|
return {
|
|
@@ -28646,7 +28652,7 @@ var headlessAgentRequestSchema = external_exports.object({
|
|
|
28646
28652
|
});
|
|
28647
28653
|
|
|
28648
28654
|
// ../shared/src/cli-version.ts
|
|
28649
|
-
var CLI_VERSION = "0.3.
|
|
28655
|
+
var CLI_VERSION = "0.3.88";
|
|
28650
28656
|
|
|
28651
28657
|
// ../shared/src/version.ts
|
|
28652
28658
|
function compareVersions(v1, v2) {
|