replicas-engine 0.1.977 → 0.1.980
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-N276J7RL.js → asp-host-B2JCJN3Z.js} +5 -5
- package/dist/src/{chunk-ZAPWSOKN.js → chunk-46LSTB3K.js} +3 -3
- package/dist/src/{chunk-RCD357QL.js → chunk-B3O2TRKY.js} +1 -1
- package/dist/src/{chunk-56WQAG5I.js → chunk-KY6CIXSR.js} +3 -3
- package/dist/src/{chunk-7PG7CEM5.js → chunk-MH7ZFBXK.js} +6 -6
- package/dist/src/{chunk-LGWE7MSQ.js → chunk-NY2TNHT2.js} +18 -9
- package/dist/src/{chunk-K2WA7ZYZ.js → chunk-OPPLXGDJ.js} +1 -1
- package/dist/src/{chunk-TMQGB4OW.js → chunk-UYGRW6IC.js} +1 -1
- package/dist/src/command-protection-hook.js +4 -4
- package/dist/src/headless-agent.js +3 -3
- package/dist/src/index.js +8 -13
- package/dist/src/post-tool-pr-hook.js +2 -2
- package/dist/src/subagent-mcp.js +1 -1
- package/package.json +1 -1
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
getCodexAspHost,
|
|
6
6
|
restartCodexAspHost,
|
|
7
7
|
restartCodexAspHostIfRunning
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-MH7ZFBXK.js";
|
|
9
|
+
import "./chunk-B3O2TRKY.js";
|
|
10
|
+
import "./chunk-KY6CIXSR.js";
|
|
11
|
+
import "./chunk-UYGRW6IC.js";
|
|
12
12
|
import "./chunk-UZSNFLDQ.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-NY2TNHT2.js";
|
|
14
14
|
import "./chunk-VEQXQN22.js";
|
|
15
15
|
export {
|
|
16
16
|
getCodexAspHost,
|
|
@@ -3,18 +3,18 @@ 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-B3O2TRKY.js";
|
|
7
7
|
import {
|
|
8
8
|
SUBPROCESS_MAX_BUFFER,
|
|
9
9
|
execFileAsync
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-UYGRW6IC.js";
|
|
11
11
|
import {
|
|
12
12
|
extractCommandProtectionCommandText,
|
|
13
13
|
findCommandProtectionGitLookups,
|
|
14
14
|
findGitCommitSignals,
|
|
15
15
|
findPrMergeSignals,
|
|
16
16
|
parseCommandProtectionRequest
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-NY2TNHT2.js";
|
|
18
18
|
|
|
19
19
|
// src/services/command-protection-service.ts
|
|
20
20
|
import { readFile, stat } from "fs/promises";
|
|
@@ -3,10 +3,10 @@ import { createRequire as __createRequire } from 'node:module';
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
execFileAsync
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UYGRW6IC.js";
|
|
7
7
|
import {
|
|
8
8
|
isVersionBelow
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-NY2TNHT2.js";
|
|
10
10
|
|
|
11
11
|
// src/utils/codex-agent-env.ts
|
|
12
12
|
function buildCodexAgentEnv(source = process.env) {
|
|
@@ -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.980";
|
|
244
244
|
var INITIALIZE_METHOD = "initialize";
|
|
245
245
|
var INITIALIZED_NOTIFICATION = "initialized";
|
|
246
246
|
var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
|
|
@@ -5,15 +5,15 @@ import {
|
|
|
5
5
|
ENGINE_ENV,
|
|
6
6
|
monolithRequest,
|
|
7
7
|
setAgentCredentialSnapshot
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-B3O2TRKY.js";
|
|
9
9
|
import {
|
|
10
10
|
AppServerProcess,
|
|
11
11
|
buildCodexAgentEnv
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-KY6CIXSR.js";
|
|
13
13
|
import {
|
|
14
14
|
SUBPROCESS_MAX_BUFFER,
|
|
15
15
|
execFileAsync
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-UYGRW6IC.js";
|
|
17
17
|
import {
|
|
18
18
|
isRecord
|
|
19
19
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
listOpenAICompatibleModels,
|
|
28
28
|
readOllamaAuthEnv,
|
|
29
29
|
resolveOpenAICompatibleModelsUrl
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-NY2TNHT2.js";
|
|
31
31
|
|
|
32
32
|
// src/managers/codex-token-manager.ts
|
|
33
33
|
import { promises as fs } from "fs";
|
|
@@ -260,7 +260,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
|
|
|
260
260
|
await this.applyCredentialUpdate(++this.credentialGeneration, async () => {
|
|
261
261
|
await this.applyCredentialsResponse(data);
|
|
262
262
|
setAgentCredentialSnapshot("codex", data);
|
|
263
|
-
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-
|
|
263
|
+
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-B2JCJN3Z.js");
|
|
264
264
|
await restartCodexAspHostIfRunning2();
|
|
265
265
|
});
|
|
266
266
|
await this.start(true);
|
|
@@ -280,7 +280,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
|
|
|
280
280
|
await this.applyCredentialUpdate(generation, async () => {
|
|
281
281
|
await this.applyCredentialsResponse(data);
|
|
282
282
|
if (restartOnChange && CODEX_AUTH_ENV_KEYS.some((key, index) => process.env[key] !== previousEnv[index])) {
|
|
283
|
-
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-
|
|
283
|
+
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-B2JCJN3Z.js");
|
|
284
284
|
await restartCodexAspHostIfRunning2();
|
|
285
285
|
}
|
|
286
286
|
setAgentCredentialSnapshot("codex", data);
|
|
@@ -2682,14 +2682,17 @@ var automationTriggerSchema = z9.discriminatedUnion("type", [
|
|
|
2682
2682
|
]);
|
|
2683
2683
|
|
|
2684
2684
|
// ../shared/src/replicas-mcp.ts
|
|
2685
|
-
var REPLICAS_MCP_SERVER_NAME = "replicas-mcp";
|
|
2686
2685
|
var REPLICAS_MCP_TOOLS = {
|
|
2687
2686
|
listEnvironments: "list_environments",
|
|
2688
2687
|
createAutomation: "create_automation",
|
|
2689
2688
|
spawn: "spawn_workspace",
|
|
2690
2689
|
relay: "relay_to_workspace",
|
|
2691
2690
|
linearStart: "start_linear_session",
|
|
2692
|
-
linearSessionIntent: "register_linear_session_intent"
|
|
2691
|
+
linearSessionIntent: "register_linear_session_intent",
|
|
2692
|
+
spawnSubagent: "spawn_subagent",
|
|
2693
|
+
messageSubagent: "message_subagent",
|
|
2694
|
+
listSubagents: "list_subagents",
|
|
2695
|
+
readSubagent: "read_subagent"
|
|
2693
2696
|
};
|
|
2694
2697
|
var automationToolInputSchema = z10.object({
|
|
2695
2698
|
name: z10.string().describe("Short automation name."),
|
|
@@ -4881,13 +4884,6 @@ function removeTag(text2, tag) {
|
|
|
4881
4884
|
function removeReplicasInstructions(text2) {
|
|
4882
4885
|
return removeTag(text2, REPLICAS_INSTRUCTIONS_TAG);
|
|
4883
4886
|
}
|
|
4884
|
-
var mothershipMcpActions = `These are tools of the \`${REPLICAS_MCP_SERVER_NAME}\` MCP server; their argument names match the envelope fields. Call them directly as tools, never through a shell or the Replicas CLI.
|
|
4885
|
-
- **Spawn** a dedicated workspace for the thread and hand off: \`${REPLICAS_MCP_TOOLS.spawn}\`, with \`environment_id\` when you chose one.
|
|
4886
|
-
- **Relay** a follow-up that is clearly meant for you into the workspace already bound to the thread (pass the envelope's \`user_id\` so it's attributed to its author): \`${REPLICAS_MCP_TOOLS.relay}\`, with \`queue: true\` to queue it.
|
|
4887
|
-
- **List environments**: \`${REPLICAS_MCP_TOOLS.listEnvironments}\`.
|
|
4888
|
-
- **Create an automation**: \`${REPLICAS_MCP_TOOLS.createAutomation}\`, filling its \`confirmation_*\` arguments from the accepting message's envelope.
|
|
4889
|
-
- **Register a Linear session intent**: \`${REPLICAS_MCP_TOOLS.linearSessionIntent}\` with \`comment_id\` and \`action\`.
|
|
4890
|
-
- **Start a Linear session**: \`${REPLICAS_MCP_TOOLS.linearStart}\` with \`issue_id\`, \`agent_session_id\`, and \`prompt\`.`;
|
|
4891
4887
|
|
|
4892
4888
|
// ../shared/src/user-message-attachments.ts
|
|
4893
4889
|
var ATTACHMENT_PLACEHOLDER_REGEX = /^\[\d+ (?:(?:images?|files?)(?: and \d+ files?)? attached|(?:image )?attachments?)\]$/;
|
|
@@ -6870,6 +6866,12 @@ function attachSendersToMessages(messages, senders) {
|
|
|
6870
6866
|
return next;
|
|
6871
6867
|
}
|
|
6872
6868
|
|
|
6869
|
+
// ../shared/src/display-message/final-response.ts
|
|
6870
|
+
function extractFinalResponse(history, provider) {
|
|
6871
|
+
const message = parseAgentEvents(history.events ?? [], provider).findLast((candidate) => candidate.type === "agent");
|
|
6872
|
+
return message?.type === "agent" && message.content ? message.content : null;
|
|
6873
|
+
}
|
|
6874
|
+
|
|
6873
6875
|
// ../shared/src/agent-event-utils.ts
|
|
6874
6876
|
function getUserMessage(event) {
|
|
6875
6877
|
return event.type === "event_msg" && event.payload.type === "user_message" && typeof event.payload.message === "string" ? event.payload.message : null;
|
|
@@ -7479,6 +7481,12 @@ var SLASH_COMMANDS = [
|
|
|
7479
7481
|
providers: [...VALID_AGENT_PROVIDERS]
|
|
7480
7482
|
}))
|
|
7481
7483
|
];
|
|
7484
|
+
var MULTITASK_SLASH_COMMAND = {
|
|
7485
|
+
command: "/multitask",
|
|
7486
|
+
description: "Hand work to parallel subagent workspaces that report back here.",
|
|
7487
|
+
argumentHint: "[prompt]",
|
|
7488
|
+
providers: [...VALID_AGENT_PROVIDERS]
|
|
7489
|
+
};
|
|
7482
7490
|
function mergeSlashCommands(...commandGroups) {
|
|
7483
7491
|
const seen = /* @__PURE__ */ new Set();
|
|
7484
7492
|
const commands = [];
|
|
@@ -9111,6 +9119,7 @@ export {
|
|
|
9111
9119
|
isClaudeResultError,
|
|
9112
9120
|
parseAgentEvents,
|
|
9113
9121
|
parseDisplayMessages,
|
|
9122
|
+
extractFinalResponse,
|
|
9114
9123
|
getUserMessage,
|
|
9115
9124
|
getUserMessageId,
|
|
9116
9125
|
getRemovedMessageIds,
|
|
@@ -3,7 +3,7 @@ import { createRequire as __createRequire } from 'node:module';
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
HOOK_EXEC_MAX_BUFFER_BYTES
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NY2TNHT2.js";
|
|
7
7
|
|
|
8
8
|
// src/utils/exec.ts
|
|
9
9
|
import { exec, execFile } from "child_process";
|
|
@@ -3,13 +3,13 @@ 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-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-46LSTB3K.js";
|
|
7
|
+
import "./chunk-B3O2TRKY.js";
|
|
8
|
+
import "./chunk-UYGRW6IC.js";
|
|
9
9
|
import {
|
|
10
10
|
isRecord
|
|
11
11
|
} from "./chunk-UZSNFLDQ.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-NY2TNHT2.js";
|
|
13
13
|
import "./chunk-VEQXQN22.js";
|
|
14
14
|
|
|
15
15
|
// src/command-protection-hook.ts
|
|
@@ -7,12 +7,12 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
AppServerProcess,
|
|
9
9
|
buildCodexAgentEnv
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-KY6CIXSR.js";
|
|
11
|
+
import "./chunk-UYGRW6IC.js";
|
|
12
12
|
import {
|
|
13
13
|
AGENT,
|
|
14
14
|
headlessAgentRequestSchema
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-NY2TNHT2.js";
|
|
16
16
|
import "./chunk-VEQXQN22.js";
|
|
17
17
|
|
|
18
18
|
// src/headless-agent.ts
|
package/dist/src/index.js
CHANGED
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
reportCommandProtectionBlock,
|
|
33
33
|
resolveDiffBase,
|
|
34
34
|
runGitCommand
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-46LSTB3K.js";
|
|
36
36
|
import {
|
|
37
37
|
ACCOUNT_RATE_LIMITS_UPDATED_METHOD,
|
|
38
38
|
AGENT_MESSAGE_DELTA_METHOD,
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
} from "./chunk-P73LGPQO.js";
|
|
58
58
|
import {
|
|
59
59
|
publishedPullRequestUrls
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-OPPLXGDJ.js";
|
|
61
61
|
import {
|
|
62
62
|
BaseRefreshManager,
|
|
63
63
|
CodexAspAuthMethodChangedError,
|
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
refreshDelayMs,
|
|
73
73
|
restartCodexAspHost,
|
|
74
74
|
routineRefreshExclusions
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-MH7ZFBXK.js";
|
|
76
76
|
import {
|
|
77
77
|
ENGINE_ENV,
|
|
78
78
|
monolithRequest,
|
|
@@ -80,16 +80,16 @@ import {
|
|
|
80
80
|
readRuntimeEnvFile,
|
|
81
81
|
reloadEngineEnv,
|
|
82
82
|
setAgentCredentialSnapshot
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-B3O2TRKY.js";
|
|
84
84
|
import {
|
|
85
85
|
AspClient,
|
|
86
86
|
getCodexModelProvider
|
|
87
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-KY6CIXSR.js";
|
|
88
88
|
import {
|
|
89
89
|
SUBPROCESS_MAX_BUFFER,
|
|
90
90
|
execAsync,
|
|
91
91
|
execFileAsync
|
|
92
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-UYGRW6IC.js";
|
|
93
93
|
import {
|
|
94
94
|
isRecord as isRecord2
|
|
95
95
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -219,6 +219,7 @@ import {
|
|
|
219
219
|
detectLanguageByPath,
|
|
220
220
|
excludeQueuedAcceptedEvents,
|
|
221
221
|
extractErrorText,
|
|
222
|
+
extractFinalResponse,
|
|
222
223
|
extractLatestContextUsage,
|
|
223
224
|
extractToolResultText,
|
|
224
225
|
fetchOpenCodeGoCatalog,
|
|
@@ -312,7 +313,7 @@ import {
|
|
|
312
313
|
workspaceCredentialProviderSchema,
|
|
313
314
|
workspaceTokenRequestSchema,
|
|
314
315
|
workspaceTokenResponseSchema
|
|
315
|
-
} from "./chunk-
|
|
316
|
+
} from "./chunk-NY2TNHT2.js";
|
|
316
317
|
import {
|
|
317
318
|
cloneMcpConfig,
|
|
318
319
|
ensureCompatibilityImports,
|
|
@@ -58906,12 +58907,6 @@ var PiManager = class extends CodingAgentManager {
|
|
|
58906
58907
|
}
|
|
58907
58908
|
};
|
|
58908
58909
|
|
|
58909
|
-
// src/managers/subagent-tools.ts
|
|
58910
|
-
function extractFinalResponse(history, provider) {
|
|
58911
|
-
const message = parseAgentEvents(history.events ?? [], provider).findLast((candidate) => candidate.type === "agent");
|
|
58912
|
-
return message?.type === "agent" && message.content ? message.content : null;
|
|
58913
|
-
}
|
|
58914
|
-
|
|
58915
58910
|
// src/analytics/agent/activity/agent-chat-activity-tracker-service.ts
|
|
58916
58911
|
import { randomUUID as randomUUID10 } from "crypto";
|
|
58917
58912
|
|
|
@@ -3,13 +3,13 @@ import { createRequire as __createRequire } from 'node:module';
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
publishedPullRequestUrls
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-OPPLXGDJ.js";
|
|
7
7
|
import {
|
|
8
8
|
isRecord
|
|
9
9
|
} from "./chunk-UZSNFLDQ.js";
|
|
10
10
|
import {
|
|
11
11
|
shouldRefreshPullRequests
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-NY2TNHT2.js";
|
|
13
13
|
import "./chunk-VEQXQN22.js";
|
|
14
14
|
|
|
15
15
|
// src/services/post-tool-pr-notifier.ts
|
package/dist/src/subagent-mcp.js
CHANGED