replicas-engine 0.1.1720 → 0.1.1722
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-7SAEDBAB.js → asp-host-VHAAGTZW.js} +6 -6
- package/dist/src/{chunk-HGL27LUT.js → chunk-75LHA6I6.js} +2 -2
- package/dist/src/{chunk-D3VZWJLK.js → chunk-AHJEBSQV.js} +1 -1
- package/dist/src/{chunk-RNBSBOOO.js → chunk-DR7RF3CO.js} +2 -2
- package/dist/src/{chunk-PEWPHPTT.js → chunk-M656E2I6.js} +1 -1
- package/dist/src/{chunk-XJLAUB74.js → chunk-R7FKDCHE.js} +16 -4
- package/dist/src/{chunk-LSOBZ4Z7.js → chunk-SFJUVEHO.js} +2 -2
- package/dist/src/{chunk-6GHQ7YGK.js → chunk-TVPCAVPR.js} +3 -3
- package/dist/src/{chunk-WXPGPIBU.js → chunk-V6RDMCB7.js} +7 -7
- package/dist/src/{chunk-YTRVDK23.js → chunk-YUOAXEDM.js} +1 -1
- package/dist/src/{chunk-KK2C56MJ.js → chunk-ZXUGUSB7.js} +1 -1
- package/dist/src/codemode-mcp.js +3 -3
- package/dist/src/command-protection-hook.js +4 -4
- package/dist/src/headless-agent.js +4 -4
- package/dist/src/index.js +23 -14
- package/dist/src/post-tool-pr-hook.js +2 -2
- package/dist/src/subagent-mcp.js +1 -1
- package/package.json +1 -1
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
listCodexModelsForDetails,
|
|
9
9
|
restartCodexAspHost,
|
|
10
10
|
restartCodexAspHostIfRunning
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-V6RDMCB7.js";
|
|
12
|
+
import "./chunk-ZXUGUSB7.js";
|
|
13
|
+
import "./chunk-DR7RF3CO.js";
|
|
14
|
+
import "./chunk-TVPCAVPR.js";
|
|
15
|
+
import "./chunk-AHJEBSQV.js";
|
|
16
16
|
import "./chunk-UZSNFLDQ.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-R7FKDCHE.js";
|
|
18
18
|
import "./chunk-VEQXQN22.js";
|
|
19
19
|
export {
|
|
20
20
|
CODEX_ULTRAFAST_SERVICE_TIER,
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
ENGINE_ENV,
|
|
6
6
|
monolithRequest,
|
|
7
7
|
runGitCommand
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-DR7RF3CO.js";
|
|
9
9
|
import {
|
|
10
10
|
COMMAND_PROTECTION_MAX_MESSAGE_FILE_BYTES,
|
|
11
11
|
COMMAND_PROTECTION_REPO_GIT_ARGS,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
parseCommandProtectionRequest,
|
|
19
19
|
toCommandProtectionRepoState,
|
|
20
20
|
withRetry
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-R7FKDCHE.js";
|
|
22
22
|
|
|
23
23
|
// src/services/command-protection-service.ts
|
|
24
24
|
import { readFile, stat } from "fs/promises";
|
|
@@ -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-R7FKDCHE.js";
|
|
7
7
|
|
|
8
8
|
// src/utils/exec.ts
|
|
9
9
|
import { exec, execFile } from "child_process";
|
|
@@ -4,7 +4,7 @@ const require = __createRequire(import.meta.url);
|
|
|
4
4
|
import {
|
|
5
5
|
SUBPROCESS_MAX_BUFFER,
|
|
6
6
|
execFileAsync
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-AHJEBSQV.js";
|
|
8
8
|
import {
|
|
9
9
|
isRecord
|
|
10
10
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
provisionedDeviceSchema,
|
|
22
22
|
readReplicasRuntimeEnv,
|
|
23
23
|
serializePosixEnvFile
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-R7FKDCHE.js";
|
|
25
25
|
|
|
26
26
|
// src/runtime-env-loader.ts
|
|
27
27
|
import { readFileSync } from "fs";
|
|
@@ -9859,7 +9859,8 @@ var GPT_6_2_ASTRA_MODEL = "gpt-6.2-astra";
|
|
|
9859
9859
|
var CLAUDE_OPUS_5_5_MODEL = "claude-opus-5-5";
|
|
9860
9860
|
var CLAUDE_FABLE_5_2_MODEL = "claude-fable-5-2";
|
|
9861
9861
|
var DEEPSEEK_V4_1_FLASH_MODEL = "deepseek-v4.1-flash";
|
|
9862
|
-
var
|
|
9862
|
+
var GEMINI_4_NEON_MODEL = "gemini-4-neon";
|
|
9863
|
+
var REPLICAS_MODEL_PROVIDERS = ["openai", "anthropic", "baseten", "google-vertex"];
|
|
9863
9864
|
var REPLICAS_MODEL_CATALOG = {
|
|
9864
9865
|
[GPT_6_2_SOL_MODEL]: {
|
|
9865
9866
|
label: "GPT-6.2 Sol",
|
|
@@ -9903,13 +9904,21 @@ var REPLICAS_MODEL_CATALOG = {
|
|
|
9903
9904
|
provider: "baseten",
|
|
9904
9905
|
cost: { input: 0.3, output: 1.2, cacheRead: 7e-3, cacheWrite: 0 },
|
|
9905
9906
|
priceVersion: "2026-11-21"
|
|
9907
|
+
},
|
|
9908
|
+
// https://cloud.google.com/vertex-ai/generative-ai/pricing. Caching is implicit and its writes are free.
|
|
9909
|
+
[GEMINI_4_NEON_MODEL]: {
|
|
9910
|
+
label: "Gemini 4 Neon",
|
|
9911
|
+
provider: "google-vertex",
|
|
9912
|
+
cost: { input: 3, output: 15, cacheRead: 0.15, cacheWrite: 0 },
|
|
9913
|
+
priceVersion: "2026-11-21"
|
|
9906
9914
|
}
|
|
9907
9915
|
};
|
|
9908
9916
|
var CATALOG_IDS = Object.keys(REPLICAS_MODEL_CATALOG).filter(isReplicasModel);
|
|
9909
9917
|
var REPLICAS_MODELS = {
|
|
9910
9918
|
openai: CATALOG_IDS.filter((id) => REPLICAS_MODEL_CATALOG[id].provider === "openai"),
|
|
9911
9919
|
anthropic: CATALOG_IDS.filter((id) => REPLICAS_MODEL_CATALOG[id].provider === "anthropic"),
|
|
9912
|
-
baseten: CATALOG_IDS.filter((id) => REPLICAS_MODEL_CATALOG[id].provider === "baseten")
|
|
9920
|
+
baseten: CATALOG_IDS.filter((id) => REPLICAS_MODEL_CATALOG[id].provider === "baseten"),
|
|
9921
|
+
"google-vertex": CATALOG_IDS.filter((id) => REPLICAS_MODEL_CATALOG[id].provider === "google-vertex")
|
|
9913
9922
|
};
|
|
9914
9923
|
function isReplicasModel(model2) {
|
|
9915
9924
|
return Object.hasOwn(REPLICAS_MODEL_CATALOG, model2);
|
|
@@ -10368,7 +10377,10 @@ var sandboxResourceMinuteSchema = z7.object({
|
|
|
10368
10377
|
memoryPressureFullMax: resourcePressure,
|
|
10369
10378
|
ioPressureSomeMax: resourcePressure,
|
|
10370
10379
|
ioPressureFullMax: resourcePressure,
|
|
10371
|
-
oomKills: z7.number().int().min(0)
|
|
10380
|
+
oomKills: z7.number().int().min(0),
|
|
10381
|
+
// Engines from before these fields omit them.
|
|
10382
|
+
cpuStealAvg: z7.number().min(0).optional(),
|
|
10383
|
+
cpuProbeMs: z7.number().min(0).optional()
|
|
10372
10384
|
});
|
|
10373
10385
|
var MAX_PENDING_RESOURCE_MINUTES = 120;
|
|
10374
10386
|
var sandboxResourceMinutesSchema = z7.array(sandboxResourceMinuteSchema).max(MAX_PENDING_RESOURCE_MINUTES);
|
|
@@ -21797,7 +21809,7 @@ async function withRetry(label, fn, options) {
|
|
|
21797
21809
|
}
|
|
21798
21810
|
|
|
21799
21811
|
// ../shared/src/tensorlake.ts
|
|
21800
|
-
var TENSORLAKE_IMAGE_NAME = "replicas-sandbox-2026-11-21-
|
|
21812
|
+
var TENSORLAKE_IMAGE_NAME = "replicas-sandbox-2026-11-21-v19";
|
|
21801
21813
|
var TENSORLAKE_DISK_MB = 100 * 1024;
|
|
21802
21814
|
|
|
21803
21815
|
// ../shared/src/egress.ts
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-7ZDAVYTV.js";
|
|
7
7
|
import {
|
|
8
8
|
AspClient
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-TVPCAVPR.js";
|
|
10
10
|
import {
|
|
11
11
|
ASTER_BASE_URL,
|
|
12
12
|
ASTER_PROVIDER,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
isRecord,
|
|
19
19
|
readOllamaAuthEnv,
|
|
20
20
|
readOpenAICompatibleAuthEnv
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-R7FKDCHE.js";
|
|
22
22
|
|
|
23
23
|
// src/managers/codex-asp/notification-dispatch.ts
|
|
24
24
|
var TURN_STARTED_METHOD = "turn/started";
|
|
@@ -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-AHJEBSQV.js";
|
|
7
7
|
import {
|
|
8
8
|
isVersionBelow
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-R7FKDCHE.js";
|
|
10
10
|
|
|
11
11
|
// src/utils/codex-agent-env.ts
|
|
12
12
|
function buildCodexAgentEnv(source = process.env) {
|
|
@@ -244,7 +244,7 @@ function getCodexModelProvider(method) {
|
|
|
244
244
|
if (method === "foundry") return "azure";
|
|
245
245
|
return method === "ollama" || method === "openai-compatible" ? "replicas_openai_compatible" : "openai";
|
|
246
246
|
}
|
|
247
|
-
var ENGINE_PACKAGE_VERSION = "0.1.
|
|
247
|
+
var ENGINE_PACKAGE_VERSION = "0.1.1722";
|
|
248
248
|
var INITIALIZE_METHOD = "initialize";
|
|
249
249
|
var INITIALIZED_NOTIFICATION = "initialized";
|
|
250
250
|
var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
|
|
@@ -3,7 +3,7 @@ import { createRequire as __createRequire } from 'node:module';
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
subagentCodexMcpConfig
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZXUGUSB7.js";
|
|
7
7
|
import {
|
|
8
8
|
ENGINE_ENV,
|
|
9
9
|
UNQUOTED_PATHS_CONFIG,
|
|
@@ -15,15 +15,15 @@ import {
|
|
|
15
15
|
resolveDiffBase,
|
|
16
16
|
runGitCommand,
|
|
17
17
|
setAgentCredentialSnapshot
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-DR7RF3CO.js";
|
|
19
19
|
import {
|
|
20
20
|
AppServerProcess,
|
|
21
21
|
buildCodexAgentEnv
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-TVPCAVPR.js";
|
|
23
23
|
import {
|
|
24
24
|
SUBPROCESS_MAX_BUFFER,
|
|
25
25
|
execFileAsync
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-AHJEBSQV.js";
|
|
27
27
|
import {
|
|
28
28
|
isRecord
|
|
29
29
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
shrunkImageSize,
|
|
64
64
|
splitManagerInstructions,
|
|
65
65
|
withTimeout
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-R7FKDCHE.js";
|
|
67
67
|
|
|
68
68
|
// src/managers/codex-token-manager.ts
|
|
69
69
|
import { promises as fs } from "fs";
|
|
@@ -463,7 +463,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
|
|
|
463
463
|
await this.applyCredentialUpdate(++this.credentialGeneration, async () => {
|
|
464
464
|
await this.applyCredentialsResponse(data);
|
|
465
465
|
setAgentCredentialSnapshot("codex", data);
|
|
466
|
-
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-
|
|
466
|
+
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-VHAAGTZW.js");
|
|
467
467
|
await restartCodexAspHostIfRunning2();
|
|
468
468
|
});
|
|
469
469
|
await this.start(true);
|
|
@@ -485,7 +485,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
|
|
|
485
485
|
const accountChanged = ENGINE_ENV.REPLICAS_AGENT_CREDENTIALS.codex?.credentialId !== data.credentialId;
|
|
486
486
|
await this.applyCredentialsResponse(data);
|
|
487
487
|
if (restartOnChange && (accountChanged || CODEX_AUTH_ENV_KEYS.some((key, index) => process.env[key] !== previousEnv[index]))) {
|
|
488
|
-
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-
|
|
488
|
+
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-VHAAGTZW.js");
|
|
489
489
|
await restartCodexAspHostIfRunning2();
|
|
490
490
|
}
|
|
491
491
|
setAgentCredentialSnapshot("codex", data);
|
|
@@ -3,7 +3,7 @@ import { createRequire as __createRequire } from 'node:module';
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
SUBAGENT_MCP_TOOL_NAMES
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-R7FKDCHE.js";
|
|
7
7
|
|
|
8
8
|
// src/managers/subagent-mcp-config.ts
|
|
9
9
|
import { existsSync } from "fs";
|
package/dist/src/codemode-mcp.js
CHANGED
|
@@ -4,15 +4,15 @@ const require = __createRequire(import.meta.url);
|
|
|
4
4
|
import {
|
|
5
5
|
getManagedPiMcpServers,
|
|
6
6
|
managedMcpServerProcess
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-M656E2I6.js";
|
|
8
8
|
import "./chunk-7ZDAVYTV.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-ZXUGUSB7.js";
|
|
10
10
|
import {
|
|
11
11
|
isRecord
|
|
12
12
|
} from "./chunk-UZSNFLDQ.js";
|
|
13
13
|
import {
|
|
14
14
|
rankToolsByQuery
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-R7FKDCHE.js";
|
|
16
16
|
import "./chunk-VEQXQN22.js";
|
|
17
17
|
|
|
18
18
|
// src/codemode-mcp.ts
|
|
@@ -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-75LHA6I6.js";
|
|
7
|
+
import "./chunk-DR7RF3CO.js";
|
|
8
|
+
import "./chunk-AHJEBSQV.js";
|
|
9
9
|
import {
|
|
10
10
|
isRecord
|
|
11
11
|
} from "./chunk-UZSNFLDQ.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-R7FKDCHE.js";
|
|
13
13
|
import "./chunk-VEQXQN22.js";
|
|
14
14
|
|
|
15
15
|
// src/command-protection-hook.ts
|
|
@@ -14,13 +14,13 @@ import {
|
|
|
14
14
|
recoverCompletedTurn,
|
|
15
15
|
spawnMuseMsp,
|
|
16
16
|
startMuseSession
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-SFJUVEHO.js";
|
|
18
18
|
import "./chunk-7ZDAVYTV.js";
|
|
19
19
|
import {
|
|
20
20
|
AppServerProcess,
|
|
21
21
|
buildCodexAgentEnv
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import "./chunk-
|
|
22
|
+
} from "./chunk-TVPCAVPR.js";
|
|
23
|
+
import "./chunk-AHJEBSQV.js";
|
|
24
24
|
import {
|
|
25
25
|
AGENT,
|
|
26
26
|
OPENCODE_GO_PROVIDER,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
headlessAgentUsagePath,
|
|
31
31
|
isRecord,
|
|
32
32
|
withTimeout
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-R7FKDCHE.js";
|
|
34
34
|
import "./chunk-VEQXQN22.js";
|
|
35
35
|
|
|
36
36
|
// src/headless-agent.ts
|
package/dist/src/index.js
CHANGED
|
@@ -90,12 +90,12 @@ import {
|
|
|
90
90
|
import {
|
|
91
91
|
getManagedPiMcpServers,
|
|
92
92
|
managedMcpServerProcess
|
|
93
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-M656E2I6.js";
|
|
94
94
|
import {
|
|
95
95
|
evaluateCommandProtection,
|
|
96
96
|
extractToolCommand,
|
|
97
97
|
reportCommandProtectionBlock
|
|
98
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-75LHA6I6.js";
|
|
99
99
|
import {
|
|
100
100
|
ACCOUNT_RATE_LIMITS_UPDATED_METHOD,
|
|
101
101
|
AGENT_MESSAGE_DELTA_METHOD,
|
|
@@ -129,7 +129,7 @@ import {
|
|
|
129
129
|
spawnMuseMsp,
|
|
130
130
|
startMuseSession,
|
|
131
131
|
uuidV7
|
|
132
|
-
} from "./chunk-
|
|
132
|
+
} from "./chunk-SFJUVEHO.js";
|
|
133
133
|
import {
|
|
134
134
|
MUSE_AUTH_PATH,
|
|
135
135
|
OPENCODE_AUTH_PATH,
|
|
@@ -137,7 +137,7 @@ import {
|
|
|
137
137
|
} from "./chunk-7ZDAVYTV.js";
|
|
138
138
|
import {
|
|
139
139
|
publishedPullRequestUrls
|
|
140
|
-
} from "./chunk-
|
|
140
|
+
} from "./chunk-YUOAXEDM.js";
|
|
141
141
|
import {
|
|
142
142
|
ACCOUNT_RATE_LIMITS_READ_METHOD,
|
|
143
143
|
AsyncLock,
|
|
@@ -215,12 +215,12 @@ import {
|
|
|
215
215
|
transcriptSecrets,
|
|
216
216
|
upsertCredentialFileLines,
|
|
217
217
|
writeSecureCredentialFile
|
|
218
|
-
} from "./chunk-
|
|
218
|
+
} from "./chunk-V6RDMCB7.js";
|
|
219
219
|
import {
|
|
220
220
|
SUBAGENT_MCP_TOOL_TIMEOUT_MS,
|
|
221
221
|
engineScriptProcess,
|
|
222
222
|
subagentMcpProcessConfig
|
|
223
|
-
} from "./chunk-
|
|
223
|
+
} from "./chunk-ZXUGUSB7.js";
|
|
224
224
|
import {
|
|
225
225
|
ENGINE_ENV,
|
|
226
226
|
UNQUOTED_PATHS_CONFIG,
|
|
@@ -231,18 +231,18 @@ import {
|
|
|
231
231
|
resolveDiffBase,
|
|
232
232
|
setAgentCredentialSnapshot,
|
|
233
233
|
setLinearSessionId
|
|
234
|
-
} from "./chunk-
|
|
234
|
+
} from "./chunk-DR7RF3CO.js";
|
|
235
235
|
import {
|
|
236
236
|
AspRequestTimeoutError,
|
|
237
237
|
AspResponseError,
|
|
238
238
|
buildCodexAgentEnv,
|
|
239
239
|
getCodexModelProvider
|
|
240
|
-
} from "./chunk-
|
|
240
|
+
} from "./chunk-TVPCAVPR.js";
|
|
241
241
|
import {
|
|
242
242
|
SUBPROCESS_MAX_BUFFER,
|
|
243
243
|
execAsync,
|
|
244
244
|
execFileAsync
|
|
245
|
-
} from "./chunk-
|
|
245
|
+
} from "./chunk-AHJEBSQV.js";
|
|
246
246
|
import {
|
|
247
247
|
isRecord
|
|
248
248
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -543,7 +543,7 @@ import {
|
|
|
543
543
|
workspaceTokenRequestSchema,
|
|
544
544
|
workspaceTokenResponseSchema,
|
|
545
545
|
wrapInTag
|
|
546
|
-
} from "./chunk-
|
|
546
|
+
} from "./chunk-R7FKDCHE.js";
|
|
547
547
|
import {
|
|
548
548
|
__commonJS,
|
|
549
549
|
__export,
|
|
@@ -66681,6 +66681,12 @@ function parsePressure(text, kind) {
|
|
|
66681
66681
|
const match = text?.match(new RegExp(`^${kind} avg10=([\\d.]+)`, "m"));
|
|
66682
66682
|
return match ? Number(match[1]) : null;
|
|
66683
66683
|
}
|
|
66684
|
+
var probeState = 1;
|
|
66685
|
+
function cpuProbeMs() {
|
|
66686
|
+
const start = performance.now();
|
|
66687
|
+
for (let i = 0; i < 1e6; i++) probeState = Math.imul(probeState, 1103515245) + 12345 >>> 0;
|
|
66688
|
+
return performance.now() - start;
|
|
66689
|
+
}
|
|
66684
66690
|
var round = (value, digits = 0) => Math.round(value * 10 ** digits) / 10 ** digits;
|
|
66685
66691
|
var average = (values) => values.reduce((sum, value) => sum + value, 0) / values.length;
|
|
66686
66692
|
function maxPressure(samples, key) {
|
|
@@ -66740,7 +66746,7 @@ var ResourceMonitor = class {
|
|
|
66740
66746
|
const lines = stat8.split("\n");
|
|
66741
66747
|
const jiffies = lines[0].trim().split(/\s+/).slice(1, 9).map(Number);
|
|
66742
66748
|
const total = jiffies.reduce((sum, value) => sum + value, 0);
|
|
66743
|
-
const cpu = { busy: total - jiffies[3] - jiffies[4], total };
|
|
66749
|
+
const cpu = { busy: total - jiffies[3] - jiffies[4], steal: jiffies[7], total };
|
|
66744
66750
|
const previous = this.previousCpu;
|
|
66745
66751
|
this.previousCpu = cpu;
|
|
66746
66752
|
if (!previous || cpu.total <= previous.total) return;
|
|
@@ -66751,6 +66757,7 @@ var ResourceMonitor = class {
|
|
|
66751
66757
|
cpuCount,
|
|
66752
66758
|
memoryTotalMb: memory.MemTotal / 1024,
|
|
66753
66759
|
busyCpus: (cpu.busy - previous.busy) / (cpu.total - previous.total) * cpuCount,
|
|
66760
|
+
stealCpus: (cpu.steal - previous.steal) / (cpu.total - previous.total) * cpuCount,
|
|
66754
66761
|
usedMb: (memory.MemTotal - memory.MemFree - cacheKb) / 1024,
|
|
66755
66762
|
cacheMb: cacheKb / 1024,
|
|
66756
66763
|
availableMb: memory.MemAvailable / 1024,
|
|
@@ -66769,7 +66776,7 @@ var ResourceMonitor = class {
|
|
|
66769
66776
|
this.minute = null;
|
|
66770
66777
|
await this.finishMinute(finished);
|
|
66771
66778
|
}
|
|
66772
|
-
this.minute ??= { start, samples: [] };
|
|
66779
|
+
this.minute ??= { start, samples: [], probeMs: cpuProbeMs() };
|
|
66773
66780
|
this.minute.samples.push(sample);
|
|
66774
66781
|
this.onMemorySample?.({
|
|
66775
66782
|
at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -66783,7 +66790,7 @@ var ResourceMonitor = class {
|
|
|
66783
66790
|
this.sampling = false;
|
|
66784
66791
|
}
|
|
66785
66792
|
}
|
|
66786
|
-
async finishMinute({ start, samples }) {
|
|
66793
|
+
async finishMinute({ start, samples, probeMs }) {
|
|
66787
66794
|
const previous = this.oomBaseline;
|
|
66788
66795
|
const counters = this.readOomCounters();
|
|
66789
66796
|
this.oomBaseline = Promise.all([previous, counters]).then(([before, now]) => ({
|
|
@@ -66815,7 +66822,9 @@ var ResourceMonitor = class {
|
|
|
66815
66822
|
ioPressureSomeMax: maxPressure(samples, "ioSome"),
|
|
66816
66823
|
ioPressureFullMax: maxPressure(samples, "ioFull"),
|
|
66817
66824
|
// /proc/vmstat counts every kill in a VM; the cgroup counter covers sandboxes where /proc shows the host.
|
|
66818
|
-
oomKills: Math.max(killed("vmstat"), killed("cgroup"), 0)
|
|
66825
|
+
oomKills: Math.max(killed("vmstat"), killed("cgroup"), 0),
|
|
66826
|
+
cpuStealAvg: round(average(samples.map((sample) => sample.stealCpus)), 2),
|
|
66827
|
+
cpuProbeMs: round(probeMs, 2)
|
|
66819
66828
|
});
|
|
66820
66829
|
if (this.pending.length > MAX_PENDING_RESOURCE_MINUTES) this.pending.splice(0, this.pending.length - MAX_PENDING_RESOURCE_MINUTES);
|
|
66821
66830
|
}
|
|
@@ -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-YUOAXEDM.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-R7FKDCHE.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