replicas-engine 0.1.907 → 0.1.909
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-2P6HEMN5.js → asp-host-VBFVCBG5.js} +4 -4
- package/dist/src/{chunk-7R7AQ77Z.js → chunk-7KUALGJK.js} +1 -2
- package/dist/src/{chunk-6SXCGH4F.js → chunk-AIMXTL65.js} +2 -2
- package/dist/src/{chunk-2USMONJR.js → chunk-NAPCNWTB.js} +1 -1
- package/dist/src/{chunk-T4HLIO43.js → chunk-NJY73FDM.js} +2 -203
- package/dist/src/{chunk-FC2Z2DIV.js → chunk-P57WPSR3.js} +2 -2
- package/dist/src/{chunk-QPDXHNH6.js → chunk-SJSIX3BZ.js} +5 -5
- package/dist/src/command-protection-hook.js +4 -4
- package/dist/src/headless-agent.js +2 -2
- package/dist/src/index.js +1642 -2308
- package/dist/src/post-tool-pr-hook.js +22 -4
- package/dist/src/relay-mcp.js +1 -1
- package/package.json +1 -3
- package/dist/src/chunk-U2NGMU7L.js +0 -30
- package/dist/src/deepseek-command-protection-plugin.js +0 -37
- package/dist/src/{mcp-panel-IBIVWX27.js → mcp-panel-2XMW56WJ.js} +3 -3
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
getCodexAspHost,
|
|
6
6
|
restartCodexAspHost,
|
|
7
7
|
restartCodexAspHostIfRunning
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-SJSIX3BZ.js";
|
|
9
|
+
import "./chunk-7KUALGJK.js";
|
|
10
|
+
import "./chunk-AIMXTL65.js";
|
|
11
11
|
import "./chunk-UZSNFLDQ.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-NJY73FDM.js";
|
|
13
13
|
import "./chunk-VEQXQN22.js";
|
|
14
14
|
export {
|
|
15
15
|
getCodexAspHost,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
isValidRelayBaseProvider,
|
|
16
16
|
parsePosixEnvFile,
|
|
17
17
|
readReplicasRuntimeEnv
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-NJY73FDM.js";
|
|
19
19
|
|
|
20
20
|
// src/engine-env.ts
|
|
21
21
|
import { readFileSync as readFileSync2 } from "fs";
|
|
@@ -141,7 +141,6 @@ function loadEngineEnv() {
|
|
|
141
141
|
CODEX_OPENAI_AUTHORIZATION_HEADER: readEnv("CODEX_OPENAI_AUTHORIZATION_HEADER"),
|
|
142
142
|
CURSOR_API_KEY: readEnv("CURSOR_API_KEY"),
|
|
143
143
|
AI_GATEWAY_API_KEY: readEnv("AI_GATEWAY_API_KEY"),
|
|
144
|
-
GEMINI_API_KEY: readEnv("GEMINI_API_KEY"),
|
|
145
144
|
CLAUDE_CODE_USE_BEDROCK: readEnv("CLAUDE_CODE_USE_BEDROCK"),
|
|
146
145
|
AWS_ACCESS_KEY_ID: readEnv("AWS_ACCESS_KEY_ID"),
|
|
147
146
|
AWS_SECRET_ACCESS_KEY: readEnv("AWS_SECRET_ACCESS_KEY"),
|
|
@@ -4,7 +4,7 @@ const require = __createRequire(import.meta.url);
|
|
|
4
4
|
import {
|
|
5
5
|
HOOK_EXEC_MAX_BUFFER_BYTES,
|
|
6
6
|
isVersionBelow
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-NJY73FDM.js";
|
|
8
8
|
|
|
9
9
|
// src/utils/codex-agent-env.ts
|
|
10
10
|
function buildCodexAgentEnv(source = process.env) {
|
|
@@ -245,7 +245,7 @@ function getCodexModelProvider(method) {
|
|
|
245
245
|
if (method === "foundry") return "azure";
|
|
246
246
|
return method === "ollama" || method === "openai-compatible" ? "replicas_openai_compatible" : "openai";
|
|
247
247
|
}
|
|
248
|
-
var ENGINE_PACKAGE_VERSION = "0.1.
|
|
248
|
+
var ENGINE_PACKAGE_VERSION = "0.1.909";
|
|
249
249
|
var INITIALIZE_METHOD = "initialize";
|
|
250
250
|
var INITIALIZED_NOTIFICATION = "initialized";
|
|
251
251
|
var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
|
|
@@ -7,9 +7,7 @@ var AGENT = {
|
|
|
7
7
|
CLAUDE: "claude",
|
|
8
8
|
CODEX: "codex",
|
|
9
9
|
CURSOR: "cursor",
|
|
10
|
-
DEEPSEEK: "deepseek",
|
|
11
10
|
FX: "fx",
|
|
12
|
-
GEMINI: "gemini",
|
|
13
11
|
KIMI: "kimi",
|
|
14
12
|
MUSE: "muse",
|
|
15
13
|
OPENCODE: "opencode",
|
|
@@ -21,7 +19,6 @@ var VALID_RELAY_SUBAGENT_PROVIDERS = VALID_AGENT_PROVIDERS;
|
|
|
21
19
|
var VALID_RELAY_BASE_PROVIDERS = [
|
|
22
20
|
AGENT.CLAUDE,
|
|
23
21
|
AGENT.CODEX,
|
|
24
|
-
AGENT.DEEPSEEK,
|
|
25
22
|
AGENT.OPENCODE,
|
|
26
23
|
AGENT.PI
|
|
27
24
|
];
|
|
@@ -44,9 +41,7 @@ var THINKING_LEVELS_BY_AGENT = {
|
|
|
44
41
|
claude: [...STANDARD_THINKING_LEVELS, "ultracode"],
|
|
45
42
|
codex: [...STANDARD_THINKING_LEVELS, "ultra"],
|
|
46
43
|
cursor: STANDARD_THINKING_LEVELS,
|
|
47
|
-
deepseek: STANDARD_THINKING_LEVELS,
|
|
48
44
|
fx: STANDARD_THINKING_LEVELS,
|
|
49
|
-
gemini: STANDARD_THINKING_LEVELS,
|
|
50
45
|
kimi: STANDARD_THINKING_LEVELS,
|
|
51
46
|
muse: VALID_THINKING_LEVELS.filter((level) => level !== "max" && level !== "ultracode"),
|
|
52
47
|
opencode: STANDARD_THINKING_LEVELS,
|
|
@@ -74,12 +69,8 @@ function getProviderDisplayName(provider, variant = "short") {
|
|
|
74
69
|
return "Codex";
|
|
75
70
|
case "cursor":
|
|
76
71
|
return "Cursor";
|
|
77
|
-
case "deepseek":
|
|
78
|
-
return variant === "long" ? "DeepSeek Harness" : "DeepSeek";
|
|
79
72
|
case "fx":
|
|
80
73
|
return "fx";
|
|
81
|
-
case "gemini":
|
|
82
|
-
return "Gemini";
|
|
83
74
|
case "kimi":
|
|
84
75
|
return variant === "long" ? "Kimi Code" : "Kimi";
|
|
85
76
|
case "muse":
|
|
@@ -195,9 +186,7 @@ var DEFAULT_CHAT_TITLES = {
|
|
|
195
186
|
claude: "Claude Code",
|
|
196
187
|
codex: "Codex",
|
|
197
188
|
cursor: "Cursor",
|
|
198
|
-
deepseek: "DeepSeek Harness",
|
|
199
189
|
fx: "fx",
|
|
200
|
-
gemini: "Gemini CLI",
|
|
201
190
|
kimi: "Kimi Code",
|
|
202
191
|
muse: "Muse Code",
|
|
203
192
|
opencode: "Opencode",
|
|
@@ -237,9 +226,7 @@ var GLM_5_3_FLASH_MODEL = "z-ai/glm-5.3-flash";
|
|
|
237
226
|
var OX_ALPHA_MODEL = "stealth/ox-alpha";
|
|
238
227
|
var DEEPSEEK_V4_PRO_MODEL = "deepseek/deepseek-v4-pro-0813";
|
|
239
228
|
var DEEPSEEK_V4_FLASH_MODEL = "deepseek/deepseek-v4-flash-0731";
|
|
240
|
-
var DEFAULT_DEEPSEEK_MODEL = DEEPSEEK_V4_PRO_MODEL;
|
|
241
229
|
var DEFAULT_FX_MODEL = "zai/glm-5.2";
|
|
242
|
-
var DEFAULT_GEMINI_MODEL = "gemini-3.8-flash";
|
|
243
230
|
var DEFAULT_KIMI_MODEL = "moonshotai/kimi-k2.6";
|
|
244
231
|
var MUSE_SPARK_1_3_MODEL = "muse-spark-1.3";
|
|
245
232
|
var DEFAULT_MUSE_MODEL = "muse-spark-1.2";
|
|
@@ -261,19 +248,11 @@ var OPENROUTER_MODELS = [
|
|
|
261
248
|
"xiaomi/mimo-v2.5-pro",
|
|
262
249
|
"meta/muse-spark-1.3"
|
|
263
250
|
];
|
|
264
|
-
function prioritizeDeepseekModels(models) {
|
|
265
|
-
return [
|
|
266
|
-
...models.filter((model) => model.startsWith("deepseek/")),
|
|
267
|
-
...models.filter((model) => !model.startsWith("deepseek/"))
|
|
268
|
-
];
|
|
269
|
-
}
|
|
270
251
|
var FALLBACK_AGENT_MODEL = {
|
|
271
252
|
claude: DEFAULT_CLAUDE_MODEL,
|
|
272
253
|
codex: DEFAULT_CODEX_MODEL,
|
|
273
254
|
cursor: DEFAULT_CURSOR_MODEL,
|
|
274
|
-
deepseek: DEFAULT_DEEPSEEK_MODEL,
|
|
275
255
|
fx: DEFAULT_FX_MODEL,
|
|
276
|
-
gemini: DEFAULT_GEMINI_MODEL,
|
|
277
256
|
kimi: DEFAULT_KIMI_MODEL,
|
|
278
257
|
muse: DEFAULT_MUSE_MODEL,
|
|
279
258
|
opencode: DEFAULT_OPENCODE_MODEL,
|
|
@@ -375,9 +354,7 @@ var AGENT_MODELS = {
|
|
|
375
354
|
CLAUDE_HAIKU_4_5_MODEL,
|
|
376
355
|
"kimi-k2.5"
|
|
377
356
|
],
|
|
378
|
-
deepseek: prioritizeDeepseekModels(DEFAULT_OPENROUTER_MODELS),
|
|
379
357
|
fx: [DEFAULT_FX_MODEL],
|
|
380
|
-
gemini: [DEFAULT_GEMINI_MODEL, "gemini-3.1-pro-preview"],
|
|
381
358
|
kimi: [DEFAULT_KIMI_MODEL],
|
|
382
359
|
muse: [MUSE_SPARK_1_3_MODEL, DEFAULT_MUSE_MODEL],
|
|
383
360
|
opencode: [...DEFAULT_OPENROUTER_MODELS, ...ASTER_MODELS],
|
|
@@ -432,8 +409,6 @@ var MODEL_LABELS = {
|
|
|
432
409
|
"xiaomi/mimo-v2.5-pro": "MiMo V2.5 Pro via OpenRouter",
|
|
433
410
|
"moonshotai/kimi-k2.6": "Kimi K2.6 via OpenRouter",
|
|
434
411
|
"moonshotai/kimi-k3": "Kimi K3 via OpenRouter",
|
|
435
|
-
"gemini-3-flash-preview": "Gemini 3 Flash Preview",
|
|
436
|
-
"gemini-3.1-pro-preview": "Gemini 3.1 Pro Preview",
|
|
437
412
|
[MUSE_SPARK_1_3_MODEL]: "Muse Spark 1.3",
|
|
438
413
|
[DEFAULT_MUSE_MODEL]: "Muse Spark 1.2",
|
|
439
414
|
"meta/muse-spark-1.3": "Muse Spark 1.3 via OpenRouter",
|
|
@@ -698,7 +673,7 @@ function resolveOpenAICompatibleModelsUrl(values) {
|
|
|
698
673
|
}
|
|
699
674
|
|
|
700
675
|
// ../shared/src/credentials/ollama.ts
|
|
701
|
-
var OLLAMA_AGENTS = ["claude", "codex", "
|
|
676
|
+
var OLLAMA_AGENTS = ["claude", "codex", "kimi", "opencode", "pi"];
|
|
702
677
|
function ollamaAuthEnvKeys(agent) {
|
|
703
678
|
return ["API_KEY", "BASE_URL"].map((key) => `REPLICAS_${agent.toUpperCase()}_OLLAMA_${key}`);
|
|
704
679
|
}
|
|
@@ -809,7 +784,6 @@ var CREDENTIAL_TYPE = {
|
|
|
809
784
|
ASTER_API_KEY: "aster_api_key",
|
|
810
785
|
OPENROUTER_API_KEY: "openrouter_api_key",
|
|
811
786
|
AI_GATEWAY_API_KEY: "ai_gateway_api_key",
|
|
812
|
-
GEMINI_API_KEY: "gemini_api_key",
|
|
813
787
|
MUSE_OAUTH: "muse_oauth",
|
|
814
788
|
MUSE_API_KEY: "muse_api_key"
|
|
815
789
|
};
|
|
@@ -837,16 +811,9 @@ var AGENT_CREDENTIAL_METHODS_IN_ORDER = {
|
|
|
837
811
|
[AGENT.CURSOR]: [
|
|
838
812
|
{ method: CREDENTIAL_METHOD.API_KEY, credentialType: CREDENTIAL_TYPE.CURSOR_API_KEY }
|
|
839
813
|
],
|
|
840
|
-
[AGENT.DEEPSEEK]: [
|
|
841
|
-
{ method: CREDENTIAL_METHOD.OPENROUTER, credentialType: CREDENTIAL_TYPE.OPENROUTER_API_KEY },
|
|
842
|
-
{ method: CREDENTIAL_METHOD.OLLAMA, credentialType: CREDENTIAL_TYPE.OLLAMA }
|
|
843
|
-
],
|
|
844
814
|
[AGENT.FX]: [
|
|
845
815
|
{ method: CREDENTIAL_METHOD.AI_GATEWAY, credentialType: CREDENTIAL_TYPE.AI_GATEWAY_API_KEY }
|
|
846
816
|
],
|
|
847
|
-
[AGENT.GEMINI]: [
|
|
848
|
-
{ method: CREDENTIAL_METHOD.API_KEY, credentialType: CREDENTIAL_TYPE.GEMINI_API_KEY }
|
|
849
|
-
],
|
|
850
817
|
[AGENT.KIMI]: [
|
|
851
818
|
{ method: CREDENTIAL_METHOD.AI_GATEWAY, credentialType: CREDENTIAL_TYPE.AI_GATEWAY_API_KEY },
|
|
852
819
|
{ method: CREDENTIAL_METHOD.OLLAMA, credentialType: CREDENTIAL_TYPE.OLLAMA }
|
|
@@ -879,7 +846,6 @@ function getCredentialMethodLabel(agent, method) {
|
|
|
879
846
|
case CREDENTIAL_METHOD.API_KEY:
|
|
880
847
|
if (agent === AGENT.CODEX) return "OpenAI API key";
|
|
881
848
|
if (agent === AGENT.CURSOR) return "Cursor API key";
|
|
882
|
-
if (agent === AGENT.GEMINI) return "Gemini API key";
|
|
883
849
|
if (agent === AGENT.MUSE) return "Muse API key";
|
|
884
850
|
return "Anthropic API key";
|
|
885
851
|
case CREDENTIAL_METHOD.OPENAI_COMPATIBLE:
|
|
@@ -4844,165 +4810,6 @@ function parseCursorEvents(events) {
|
|
|
4844
4810
|
return messages;
|
|
4845
4811
|
}
|
|
4846
4812
|
|
|
4847
|
-
// ../shared/src/display-message/parsers/deepseek-parser.ts
|
|
4848
|
-
function parseArguments(value) {
|
|
4849
|
-
if (typeof value !== "string") return void 0;
|
|
4850
|
-
const parsed = safeJsonParse(value, value);
|
|
4851
|
-
return isRecord(parsed) ? parsed : stringifyDisplayValue(parsed);
|
|
4852
|
-
}
|
|
4853
|
-
function getDeepseekAssistantMessageText(event, blockType) {
|
|
4854
|
-
if (!isRecord(event) || event.type !== "assistant/message" || !isRecord(event.data) || !isRecord(event.data.message) || !Array.isArray(event.data.message.content)) return "";
|
|
4855
|
-
return event.data.message.content.flatMap((block) => isRecord(block) && block.type === blockType && typeof block.text === "string" ? [block.text] : []).join("");
|
|
4856
|
-
}
|
|
4857
|
-
function parseDeepseekEvents(events) {
|
|
4858
|
-
const messages = [];
|
|
4859
|
-
for (const source of events) {
|
|
4860
|
-
if (source.type === "event_msg" && source.payload.type === "user_message") {
|
|
4861
|
-
if (typeof source.payload.message === "string" && source.payload.message.trim()) {
|
|
4862
|
-
const messageId = source.payload[USER_MESSAGE_ID_PAYLOAD_KEY];
|
|
4863
|
-
messages.push({
|
|
4864
|
-
id: typeof messageId === "string" ? messageId : `deepseek-user-${source.timestamp}`,
|
|
4865
|
-
type: "user",
|
|
4866
|
-
content: source.payload.message,
|
|
4867
|
-
timestamp: source.timestamp
|
|
4868
|
-
});
|
|
4869
|
-
}
|
|
4870
|
-
continue;
|
|
4871
|
-
}
|
|
4872
|
-
if (source.type === "deepseek-error") {
|
|
4873
|
-
messages.push({
|
|
4874
|
-
id: `deepseek-error-${source.timestamp}`,
|
|
4875
|
-
type: "error",
|
|
4876
|
-
message: typeof source.payload.message === "string" ? source.payload.message : "DeepSeek Harness failed",
|
|
4877
|
-
timestamp: source.timestamp
|
|
4878
|
-
});
|
|
4879
|
-
continue;
|
|
4880
|
-
}
|
|
4881
|
-
if (source.type === "deepseek-input-request") {
|
|
4882
|
-
const requestId = typeof source.payload.requestId === "string" ? source.payload.requestId : `deepseek-input-${source.timestamp}`;
|
|
4883
|
-
if (source.payload.kind === "approval") {
|
|
4884
|
-
upsertDisplayMessage(messages, createCallDisplayMessage({
|
|
4885
|
-
id: requestId,
|
|
4886
|
-
server: "deepseek",
|
|
4887
|
-
tool: typeof source.payload.toolName === "string" ? source.payload.toolName : "approval",
|
|
4888
|
-
input: typeof source.payload.reason === "string" ? source.payload.reason : void 0,
|
|
4889
|
-
status: "in_progress",
|
|
4890
|
-
timestamp: source.timestamp,
|
|
4891
|
-
inputRequest: {
|
|
4892
|
-
requestId,
|
|
4893
|
-
status: "pending",
|
|
4894
|
-
options: [
|
|
4895
|
-
{ id: "deny", label: "Deny", variant: "secondary" },
|
|
4896
|
-
{ id: "allow", label: "Allow once", variant: "primary" }
|
|
4897
|
-
]
|
|
4898
|
-
}
|
|
4899
|
-
}));
|
|
4900
|
-
} else {
|
|
4901
|
-
const questions = Array.isArray(source.payload.questions) ? source.payload.questions : [];
|
|
4902
|
-
upsertDisplayMessage(messages, createCallDisplayMessage({
|
|
4903
|
-
id: requestId,
|
|
4904
|
-
server: "deepseek",
|
|
4905
|
-
tool: "ask_user",
|
|
4906
|
-
status: "in_progress",
|
|
4907
|
-
timestamp: source.timestamp,
|
|
4908
|
-
inputRequest: {
|
|
4909
|
-
requestId,
|
|
4910
|
-
status: "pending",
|
|
4911
|
-
questions: questions.flatMap((question) => {
|
|
4912
|
-
if (!isRecord(question) || typeof question.id !== "string" || typeof question.question !== "string") return [];
|
|
4913
|
-
const options = Array.isArray(question.options) ? question.options : [];
|
|
4914
|
-
return [{
|
|
4915
|
-
id: question.id,
|
|
4916
|
-
prompt: question.question,
|
|
4917
|
-
multiSelect: question.multiSelect === true,
|
|
4918
|
-
options: options.flatMap((option) => isRecord(option) && typeof option.label === "string" ? [{ id: `${question.id}:${option.label}`, label: option.label, ...typeof option.description === "string" ? { description: option.description } : {} }] : [])
|
|
4919
|
-
}];
|
|
4920
|
-
})
|
|
4921
|
-
}
|
|
4922
|
-
}));
|
|
4923
|
-
}
|
|
4924
|
-
continue;
|
|
4925
|
-
}
|
|
4926
|
-
if (source.type === "deepseek-input-resolved") {
|
|
4927
|
-
const requestId = typeof source.payload.requestId === "string" ? source.payload.requestId : "";
|
|
4928
|
-
const existing = messages.find((message) => message.type === "tool_call" && message.inputRequest?.requestId === requestId);
|
|
4929
|
-
if (existing?.type === "tool_call" && existing.inputRequest) {
|
|
4930
|
-
existing.inputRequest.status = source.payload.status === "aborted" ? "aborted" : "resolved";
|
|
4931
|
-
existing.status = source.payload.status === "aborted" ? "failed" : "completed";
|
|
4932
|
-
}
|
|
4933
|
-
continue;
|
|
4934
|
-
}
|
|
4935
|
-
if (source.type === "deepseek-jobs" && Array.isArray(source.payload.jobs)) {
|
|
4936
|
-
for (const job of source.payload.jobs) {
|
|
4937
|
-
if (!isRecord(job) || typeof job.id !== "string") continue;
|
|
4938
|
-
const existing = messages.find((message) => message.type === "background_task" && message.taskId === job.id);
|
|
4939
|
-
const status = normalizeBackgroundTaskStatus(job.status);
|
|
4940
|
-
const next = {
|
|
4941
|
-
id: existing?.id ?? `deepseek-job-${job.id}`,
|
|
4942
|
-
type: "background_task",
|
|
4943
|
-
taskId: job.id,
|
|
4944
|
-
status,
|
|
4945
|
-
description: typeof job.label === "string" ? job.label : void 0,
|
|
4946
|
-
taskType: typeof job.kind === "string" ? job.kind : void 0,
|
|
4947
|
-
error: status === "failed" && typeof job.detail === "string" ? job.detail : void 0,
|
|
4948
|
-
timestamp: existing?.timestamp ?? source.timestamp
|
|
4949
|
-
};
|
|
4950
|
-
if (existing?.type === "background_task") Object.assign(existing, next);
|
|
4951
|
-
else messages.push(next);
|
|
4952
|
-
}
|
|
4953
|
-
continue;
|
|
4954
|
-
}
|
|
4955
|
-
if (source.type !== "deepseek-session-event" || !isRecord(source.payload.event)) continue;
|
|
4956
|
-
const event = source.payload.event;
|
|
4957
|
-
const data = isRecord(event.data) ? event.data : {};
|
|
4958
|
-
const seq = typeof event.seq === "number" ? event.seq : source.timestamp;
|
|
4959
|
-
if (event.type === "assistant/message") {
|
|
4960
|
-
const content = getDeepseekAssistantMessageText(event, "text");
|
|
4961
|
-
const reasoning = getDeepseekAssistantMessageText(event, "reasoning");
|
|
4962
|
-
if (reasoning.trim()) messages.push({ id: `deepseek-reasoning-${seq}`, type: "reasoning", content: reasoning, status: "completed", timestamp: source.timestamp });
|
|
4963
|
-
if (content.trim()) messages.push({ id: `deepseek-assistant-${seq}`, type: "agent", content, timestamp: source.timestamp });
|
|
4964
|
-
continue;
|
|
4965
|
-
}
|
|
4966
|
-
if (event.type === "tool/call") {
|
|
4967
|
-
const callId = typeof data.callId === "string" ? data.callId : String(seq);
|
|
4968
|
-
upsertDisplayMessage(messages, createCallDisplayMessage({
|
|
4969
|
-
id: `deepseek-tool-${callId}`,
|
|
4970
|
-
server: "deepseek",
|
|
4971
|
-
tool: typeof data.name === "string" ? data.name : "tool",
|
|
4972
|
-
input: parseArguments(data.arguments),
|
|
4973
|
-
status: "in_progress",
|
|
4974
|
-
timestamp: source.timestamp
|
|
4975
|
-
}));
|
|
4976
|
-
continue;
|
|
4977
|
-
}
|
|
4978
|
-
if (event.type === "tool/result") {
|
|
4979
|
-
const message = isRecord(data.message) ? data.message : {};
|
|
4980
|
-
const messageSource = isRecord(message.source) ? message.source : {};
|
|
4981
|
-
const result = Array.isArray(message.content) && isRecord(message.content[0]) ? message.content[0] : {};
|
|
4982
|
-
const callId = typeof messageSource.callId === "string" ? messageSource.callId : typeof data.callId === "string" ? data.callId : String(seq);
|
|
4983
|
-
const existing = messages.find((message2) => message2.id === `deepseek-tool-${callId}` && message2.type === "tool_call");
|
|
4984
|
-
if (existing?.type === "tool_call") {
|
|
4985
|
-
existing.output = stringifyDisplayValue(result.content ?? data.result);
|
|
4986
|
-
existing.status = result.isError === true || data.isError === true ? "failed" : "completed";
|
|
4987
|
-
}
|
|
4988
|
-
continue;
|
|
4989
|
-
}
|
|
4990
|
-
if (event.type === "todo/write" && Array.isArray(data.items)) {
|
|
4991
|
-
messages.push({
|
|
4992
|
-
id: `deepseek-todo-${seq}`,
|
|
4993
|
-
type: "todo_list",
|
|
4994
|
-
items: data.items.flatMap((item) => {
|
|
4995
|
-
if (!isRecord(item) || typeof item.content !== "string") return [];
|
|
4996
|
-
const itemStatus = item.status === "in_progress" || item.status === "completed" ? item.status : "pending";
|
|
4997
|
-
return [{ text: item.content, completed: itemStatus === "completed", itemStatus }];
|
|
4998
|
-
}),
|
|
4999
|
-
timestamp: source.timestamp
|
|
5000
|
-
});
|
|
5001
|
-
}
|
|
5002
|
-
}
|
|
5003
|
-
return messages;
|
|
5004
|
-
}
|
|
5005
|
-
|
|
5006
4813
|
// ../shared/src/display-message/parsers/acp-parser.ts
|
|
5007
4814
|
var FX_CONTEXT_DIAGNOSTIC = /^\[context\] skill catalog omitted .*?(?:\r?\n|$)/;
|
|
5008
4815
|
function getAcpTextChunk(update, kind) {
|
|
@@ -6226,18 +6033,12 @@ function parseAgentEvents(events, agentType) {
|
|
|
6226
6033
|
if (agentType === "cursor") {
|
|
6227
6034
|
return parseCursorEvents(events);
|
|
6228
6035
|
}
|
|
6229
|
-
if (agentType === "deepseek") {
|
|
6230
|
-
return parseDeepseekEvents(events);
|
|
6231
|
-
}
|
|
6232
6036
|
if (agentType === "fx") {
|
|
6233
6037
|
return parseFxEvents(events);
|
|
6234
6038
|
}
|
|
6235
6039
|
if (agentType === "kimi") {
|
|
6236
6040
|
return parseAcpEvents(events, "kimi");
|
|
6237
6041
|
}
|
|
6238
|
-
if (agentType === "gemini") {
|
|
6239
|
-
return parseAcpEvents(events, "gemini");
|
|
6240
|
-
}
|
|
6241
6042
|
if (agentType === "muse") {
|
|
6242
6043
|
return parseMuseEvents(events);
|
|
6243
6044
|
}
|
|
@@ -6952,7 +6753,7 @@ var SLASH_COMMANDS = [
|
|
|
6952
6753
|
command: "/plan",
|
|
6953
6754
|
description: "Switch to plan mode and optionally send a prompt.",
|
|
6954
6755
|
argumentHint: "[prompt]",
|
|
6955
|
-
providers: ["claude", "codex", "cursor", "
|
|
6756
|
+
providers: ["claude", "codex", "cursor", "fx", "kimi", "muse", "opencode", "pi", "relay"]
|
|
6956
6757
|
},
|
|
6957
6758
|
{
|
|
6958
6759
|
command: "/fast",
|
|
@@ -8265,9 +8066,7 @@ export {
|
|
|
8265
8066
|
DEFAULT_CODEX_MODEL,
|
|
8266
8067
|
DEFAULT_CURSOR_MODEL,
|
|
8267
8068
|
DEFAULT_OPENCODE_MODEL,
|
|
8268
|
-
DEFAULT_DEEPSEEK_MODEL,
|
|
8269
8069
|
DEFAULT_FX_MODEL,
|
|
8270
|
-
DEFAULT_GEMINI_MODEL,
|
|
8271
8070
|
DEFAULT_KIMI_MODEL,
|
|
8272
8071
|
DEFAULT_MUSE_MODEL,
|
|
8273
8072
|
DEFAULT_PI_MODEL,
|
|
@@ -3,12 +3,12 @@ import { createRequire as __createRequire } from 'node:module';
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
monolithRequest
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7KUALGJK.js";
|
|
7
7
|
import {
|
|
8
8
|
extractCommandProtectionCommandText,
|
|
9
9
|
findGitCommitSignals,
|
|
10
10
|
findPrMergeSignals
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-NJY73FDM.js";
|
|
12
12
|
|
|
13
13
|
// src/services/command-protection-service.ts
|
|
14
14
|
var DEFAULT_COMMAND_PROTECTION_BLOCK_MESSAGE = "Blocked by Replicas command protection.";
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
ENGINE_ENV,
|
|
6
6
|
monolithRequest,
|
|
7
7
|
setAgentCredentialSnapshot
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-7KUALGJK.js";
|
|
9
9
|
import {
|
|
10
10
|
AppServerProcess,
|
|
11
11
|
SUBPROCESS_MAX_BUFFER,
|
|
12
12
|
buildCodexAgentEnv,
|
|
13
13
|
execFileAsync
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-AIMXTL65.js";
|
|
15
15
|
import {
|
|
16
16
|
isRecord
|
|
17
17
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
listOpenAICompatibleModels,
|
|
26
26
|
readOllamaAuthEnv,
|
|
27
27
|
resolveOpenAICompatibleModelsUrl
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-NJY73FDM.js";
|
|
29
29
|
|
|
30
30
|
// src/managers/codex-token-manager.ts
|
|
31
31
|
import { promises as fs } from "fs";
|
|
@@ -255,7 +255,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
|
|
|
255
255
|
await this.applyCredentialUpdate(++this.credentialGeneration, async () => {
|
|
256
256
|
await this.applyCredentialsResponse(data);
|
|
257
257
|
if (data.scope) setAgentCredentialSnapshot("codex", { method: data.type, scope: data.scope, revision: data.revision });
|
|
258
|
-
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-
|
|
258
|
+
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-VBFVCBG5.js");
|
|
259
259
|
await restartCodexAspHostIfRunning2();
|
|
260
260
|
});
|
|
261
261
|
await this.start(true);
|
|
@@ -275,7 +275,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
|
|
|
275
275
|
await this.applyCredentialUpdate(generation, async () => {
|
|
276
276
|
await this.applyCredentialsResponse(data);
|
|
277
277
|
if (restartOnChange && CODEX_AUTH_ENV_KEYS.some((key, index) => process.env[key] !== previousEnv[index])) {
|
|
278
|
-
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-
|
|
278
|
+
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-VBFVCBG5.js");
|
|
279
279
|
await restartCodexAspHostIfRunning2();
|
|
280
280
|
}
|
|
281
281
|
if (data.scope) {
|
|
@@ -3,12 +3,12 @@ import { createRequire as __createRequire } from 'node:module';
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
evaluateCommandProtection
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-P57WPSR3.js";
|
|
7
|
+
import "./chunk-7KUALGJK.js";
|
|
8
8
|
import {
|
|
9
9
|
isRecord
|
|
10
10
|
} from "./chunk-UZSNFLDQ.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-NJY73FDM.js";
|
|
12
12
|
import "./chunk-VEQXQN22.js";
|
|
13
13
|
|
|
14
14
|
// src/command-protection-hook.ts
|
|
@@ -28,7 +28,7 @@ function writeResult(allowed, reason) {
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
async function main() {
|
|
31
|
-
if (provider !== "cursor" && provider !== "
|
|
31
|
+
if (provider !== "cursor" && provider !== "kimi" && provider !== "opencode") {
|
|
32
32
|
throw new Error("Unknown command protection hook provider.");
|
|
33
33
|
}
|
|
34
34
|
let body = "";
|
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
AppServerProcess,
|
|
10
10
|
buildCodexAgentEnv
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-AIMXTL65.js";
|
|
12
12
|
import {
|
|
13
13
|
AGENT,
|
|
14
14
|
getMemoryOutputSafetyViolation,
|
|
15
15
|
headlessAgentRequestSchema
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-NJY73FDM.js";
|
|
17
17
|
import "./chunk-VEQXQN22.js";
|
|
18
18
|
|
|
19
19
|
// src/headless-agent.ts
|