replicas-engine 0.1.1024 → 0.1.1026
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-RAWMASFX.js → asp-host-PCWQGSAZ.js} +5 -5
- package/dist/src/{chunk-KXADRVAB.js → chunk-7BKBAILL.js} +3 -3
- package/dist/src/{chunk-5HPD4VG2.js → chunk-GFAZ3ML4.js} +6 -6
- package/dist/src/{chunk-C2C4ZTHR.js → chunk-HCZS2Y4Y.js} +3 -3
- package/dist/src/{chunk-HHYJ2FOD.js → chunk-HLUAG4YU.js} +670 -581
- package/dist/src/{chunk-B4XY2JDA.js → chunk-IPL36DTU.js} +1 -1
- package/dist/src/{chunk-E5K35DUL.js → chunk-QFJFKNXF.js} +1 -1
- package/dist/src/{chunk-HW2ZEEFV.js → chunk-X5VJ2FDA.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 +22 -16
- package/dist/src/post-tool-pr-hook.js +2 -2
- package/dist/src/subagent-mcp.js +1 -1
- package/package.json +1 -1
|
@@ -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-HLUAG4YU.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-7BKBAILL.js";
|
|
7
|
+
import "./chunk-QFJFKNXF.js";
|
|
8
|
+
import "./chunk-IPL36DTU.js";
|
|
9
9
|
import {
|
|
10
10
|
isRecord
|
|
11
11
|
} from "./chunk-UZSNFLDQ.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-HLUAG4YU.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-HCZS2Y4Y.js";
|
|
11
|
+
import "./chunk-IPL36DTU.js";
|
|
12
12
|
import {
|
|
13
13
|
AGENT,
|
|
14
14
|
headlessAgentRequestSchema
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-HLUAG4YU.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-7BKBAILL.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-X5VJ2FDA.js";
|
|
61
61
|
import {
|
|
62
62
|
BaseRefreshManager,
|
|
63
63
|
CodexAspAuthMethodChangedError,
|
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
refreshDelayMs,
|
|
72
72
|
restartCodexAspHost,
|
|
73
73
|
routineRefreshRequest
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-GFAZ3ML4.js";
|
|
75
75
|
import {
|
|
76
76
|
ENGINE_ENV,
|
|
77
77
|
monolithRequest,
|
|
@@ -79,16 +79,16 @@ import {
|
|
|
79
79
|
readRuntimeEnvFile,
|
|
80
80
|
reloadEngineEnv,
|
|
81
81
|
setAgentCredentialSnapshot
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-QFJFKNXF.js";
|
|
83
83
|
import {
|
|
84
84
|
AspClient,
|
|
85
85
|
getCodexModelProvider
|
|
86
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-HCZS2Y4Y.js";
|
|
87
87
|
import {
|
|
88
88
|
SUBPROCESS_MAX_BUFFER,
|
|
89
89
|
execAsync,
|
|
90
90
|
execFileAsync
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-IPL36DTU.js";
|
|
92
92
|
import {
|
|
93
93
|
isRecord as isRecord2
|
|
94
94
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -306,6 +306,7 @@ import {
|
|
|
306
306
|
serializeMuseAuthFile,
|
|
307
307
|
shellQuotePosix,
|
|
308
308
|
shouldRefreshPullRequests,
|
|
309
|
+
skillNamesFromCommand,
|
|
309
310
|
spawnSubagentRequestSchema,
|
|
310
311
|
stripAgentDiagnosticErrors,
|
|
311
312
|
toClaudeCodeModel,
|
|
@@ -317,7 +318,7 @@ import {
|
|
|
317
318
|
workspaceTokenRequestSchema,
|
|
318
319
|
workspaceTokenResponseSchema,
|
|
319
320
|
wrapInTag
|
|
320
|
-
} from "./chunk-
|
|
321
|
+
} from "./chunk-HLUAG4YU.js";
|
|
321
322
|
import {
|
|
322
323
|
cloneMcpConfig,
|
|
323
324
|
ensureCompatibilityImports,
|
|
@@ -59085,24 +59086,27 @@ function mcpNameFromToolCall(message) {
|
|
|
59085
59086
|
}
|
|
59086
59087
|
return NON_MCP_SERVERS.has(message.server) ? null : message.server;
|
|
59087
59088
|
}
|
|
59088
|
-
|
|
59089
|
-
|
|
59089
|
+
var SHELL_TOOL_NAMES = /^(bash|shell|run_shell_command)$/i;
|
|
59090
|
+
function skillCallsFromCommand(id, skillNames, occurredAt) {
|
|
59090
59091
|
return skillNames.map((skillName, index) => ({
|
|
59091
59092
|
kind: "skill",
|
|
59092
|
-
id: skillNames.length === 1 ?
|
|
59093
|
+
id: skillNames.length === 1 ? id : `${id}-${index}`,
|
|
59093
59094
|
skillName,
|
|
59094
|
-
|
|
59095
|
+
useKind: "shell",
|
|
59096
|
+
occurredAt
|
|
59095
59097
|
}));
|
|
59096
59098
|
}
|
|
59097
59099
|
function extractSkillMcpCalls(messages) {
|
|
59098
59100
|
return messages.flatMap((message) => {
|
|
59099
59101
|
if (message.type === "skill") {
|
|
59100
|
-
return [{ kind: "skill", id: message.id, skillName: message.skillName, occurredAt: message.timestamp }];
|
|
59102
|
+
return [{ kind: "skill", id: message.id, skillName: message.skillName, useKind: message.path ? "read" : "invoke", occurredAt: message.timestamp }];
|
|
59101
59103
|
}
|
|
59102
59104
|
if (message.type === "command") {
|
|
59103
|
-
return skillCallsFromCommand(message);
|
|
59105
|
+
return skillCallsFromCommand(message.id, message.skillNames ?? [], message.timestamp);
|
|
59104
59106
|
}
|
|
59105
59107
|
if (message.type !== "tool_call") return [];
|
|
59108
|
+
const command = SHELL_TOOL_NAMES.test(message.tool) && isRecord(message.input) ? message.input.command ?? message.input.cmd : void 0;
|
|
59109
|
+
if (typeof command === "string") return skillCallsFromCommand(message.id, skillNamesFromCommand(command), message.timestamp);
|
|
59106
59110
|
const mcpName = mcpNameFromToolCall(message);
|
|
59107
59111
|
return mcpName ? [{ kind: "mcp", id: message.id, mcpName, occurredAt: message.timestamp }] : [];
|
|
59108
59112
|
});
|
|
@@ -59240,8 +59244,9 @@ var AgentChatActivityTrackerService = class {
|
|
|
59240
59244
|
const turn = this.turnActivityTracker.getActiveTurn(chatId);
|
|
59241
59245
|
if (!turn) return;
|
|
59242
59246
|
for (const call of extractSkillMcpCalls(messages)) {
|
|
59243
|
-
|
|
59244
|
-
turn.seenCallIds.
|
|
59247
|
+
const key = call.kind !== "skill" ? call.id : `skill:${call.useKind === "invoke" && !call.skillName.startsWith(LEARNED_SKILL_DIR_PREFIX) ? LEARNED_SKILL_DIR_PREFIX : ""}${call.skillName}`;
|
|
59248
|
+
if (turn.seenCallIds.has(key)) continue;
|
|
59249
|
+
turn.seenCallIds.add(key);
|
|
59245
59250
|
const activityRecord = {
|
|
59246
59251
|
callId: call.id,
|
|
59247
59252
|
chatId,
|
|
@@ -59255,7 +59260,8 @@ var AgentChatActivityTrackerService = class {
|
|
|
59255
59260
|
if (call.kind === "skill") {
|
|
59256
59261
|
this.skillActivityTracker.track(chatId, {
|
|
59257
59262
|
...activityRecord,
|
|
59258
|
-
skillName: call.skillName
|
|
59263
|
+
skillName: call.skillName,
|
|
59264
|
+
useKind: call.useKind
|
|
59259
59265
|
});
|
|
59260
59266
|
} else {
|
|
59261
59267
|
this.mcpActivityTracker.track(chatId, {
|
|
@@ -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-X5VJ2FDA.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-HLUAG4YU.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