replicas-engine 0.1.1713 → 0.1.1716
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-6GAO2RSN.js → asp-host-WTSPYH32.js} +6 -6
- package/dist/src/{chunk-NYD3PMJT.js → chunk-4X74VGG6.js} +1 -1
- package/dist/src/{chunk-F7V3PQLH.js → chunk-CBCMDKIU.js} +2 -2
- package/dist/src/{chunk-65ZPGPRS.js → chunk-DU577KOI.js} +3 -3
- package/dist/src/{chunk-RPU6OJA6.js → chunk-IEVAGS56.js} +1 -1
- package/dist/src/{chunk-VRDOHLAY.js → chunk-M56OXEL4.js} +10 -3
- package/dist/src/{chunk-T4B2VCBO.js → chunk-NDHM5ENV.js} +1 -1
- package/dist/src/{chunk-SKA5LFKD.js → chunk-PY7IIPBT.js} +2 -2
- package/dist/src/{chunk-UJDIMALI.js → chunk-SGOZAMQU.js} +2 -2
- package/dist/src/{chunk-OZZ4KYIJ.js → chunk-V53TNQR2.js} +7 -7
- package/dist/src/{chunk-RQWM6JC4.js → chunk-WQVNKYLA.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 +19 -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-V53TNQR2.js";
|
|
12
|
+
import "./chunk-IEVAGS56.js";
|
|
13
|
+
import "./chunk-SGOZAMQU.js";
|
|
14
|
+
import "./chunk-DU577KOI.js";
|
|
15
|
+
import "./chunk-WQVNKYLA.js";
|
|
16
16
|
import "./chunk-UZSNFLDQ.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-M56OXEL4.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-SGOZAMQU.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-M56OXEL4.js";
|
|
22
22
|
|
|
23
23
|
// src/services/command-protection-service.ts
|
|
24
24
|
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-WQVNKYLA.js";
|
|
7
7
|
import {
|
|
8
8
|
isVersionBelow
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-M56OXEL4.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.1716";
|
|
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
|
SUBAGENT_MCP_TOOL_NAMES
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-M56OXEL4.js";
|
|
7
7
|
|
|
8
8
|
// src/managers/subagent-mcp-config.ts
|
|
9
9
|
import { existsSync } from "fs";
|
|
@@ -13906,7 +13906,7 @@ Read the event and act only when it asks something of you: a person's question o
|
|
|
13906
13906
|
|
|
13907
13907
|
**Titles name the problem**, not the fix: "Checkout fails for EU cards", not "Fix Stripe". **Descriptions carry the evidence:** what happens, how to reproduce it, links (Slack threads, logs, Sentry, pull requests), and screenshots. Write the description to a file and pass \`--description-file\`, so markdown survives your shell.
|
|
13908
13908
|
|
|
13909
|
-
**Show, don't tell.** Attach screenshots and recordings with \`--attach <file>\` on \`create\`, \`update\` or \`comment\`; each file is uploaded through \`replicas media upload\` and embedded inline. A media URL you already have embeds as \`\`.
|
|
13909
|
+
**Show, don't tell.** Attach screenshots and recordings with \`--attach <file>\` on \`create\`, \`update\` or \`comment\`; each file is uploaded through \`replicas media upload\` and embedded inline. A media URL you already have embeds as \`\`. When you file or delegate a request someone sent screenshots with, attach them: each message says where its images are saved.
|
|
13910
13910
|
|
|
13911
13911
|
**Keep the status true as you go:**
|
|
13912
13912
|
1. \`in_progress\` when you start.
|
|
@@ -21788,7 +21788,7 @@ async function withRetry(label, fn, options) {
|
|
|
21788
21788
|
}
|
|
21789
21789
|
|
|
21790
21790
|
// ../shared/src/tensorlake.ts
|
|
21791
|
-
var TENSORLAKE_IMAGE_NAME = "replicas-sandbox-2026-11-21-
|
|
21791
|
+
var TENSORLAKE_IMAGE_NAME = "replicas-sandbox-2026-11-21-v14";
|
|
21792
21792
|
var TENSORLAKE_DISK_MB = 100 * 1024;
|
|
21793
21793
|
|
|
21794
21794
|
// ../shared/src/egress.ts
|
|
@@ -22543,7 +22543,14 @@ var encoder3 = new TextEncoder();
|
|
|
22543
22543
|
|
|
22544
22544
|
// ../shared/src/routes/billing.ts
|
|
22545
22545
|
import { z as z36 } from "zod";
|
|
22546
|
-
var
|
|
22546
|
+
var CREDIT_PURCHASE_MIN_CENTS = 5e3;
|
|
22547
|
+
var CREDIT_PURCHASE_MAX_CENTS = 1e6;
|
|
22548
|
+
var AUTO_RELOAD_THRESHOLD_MIN_CENTS = 1e3;
|
|
22549
|
+
var autoReloadAmountsSchema = z36.object({
|
|
22550
|
+
thresholdCents: z36.number().int().multipleOf(100).min(AUTO_RELOAD_THRESHOLD_MIN_CENTS).max(CREDIT_PURCHASE_MAX_CENTS),
|
|
22551
|
+
amountCents: z36.number().int().multipleOf(100).min(CREDIT_PURCHASE_MIN_CENTS).max(CREDIT_PURCHASE_MAX_CENTS)
|
|
22552
|
+
});
|
|
22553
|
+
var SOURCE_LIMIT_SOURCES = ["limrun", "modal", "revyl", "inference"];
|
|
22547
22554
|
var usageLimitCentsSchema = z36.number().int().min(100).max(1e8);
|
|
22548
22555
|
var sourceLimitsCentsSchema = z36.partialRecord(z36.enum(SOURCE_LIMIT_SOURCES), usageLimitCentsSchema);
|
|
22549
22556
|
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-7ZDAVYTV.js";
|
|
7
7
|
import {
|
|
8
8
|
AspClient
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DU577KOI.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-M56OXEL4.js";
|
|
22
22
|
|
|
23
23
|
// src/managers/codex-asp/notification-dispatch.ts
|
|
24
24
|
var TURN_STARTED_METHOD = "turn/started";
|
|
@@ -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-WQVNKYLA.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-M56OXEL4.js";
|
|
25
25
|
|
|
26
26
|
// src/runtime-env-loader.ts
|
|
27
27
|
import { readFileSync } from "fs";
|
|
@@ -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-IEVAGS56.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-SGOZAMQU.js";
|
|
19
19
|
import {
|
|
20
20
|
AppServerProcess,
|
|
21
21
|
buildCodexAgentEnv
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-DU577KOI.js";
|
|
23
23
|
import {
|
|
24
24
|
SUBPROCESS_MAX_BUFFER,
|
|
25
25
|
execFileAsync
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-WQVNKYLA.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-M56OXEL4.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-WTSPYH32.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-WTSPYH32.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
|
HOOK_EXEC_MAX_BUFFER_BYTES
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-M56OXEL4.js";
|
|
7
7
|
|
|
8
8
|
// src/utils/exec.ts
|
|
9
9
|
import { exec, execFile } from "child_process";
|
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-4X74VGG6.js";
|
|
8
8
|
import "./chunk-7ZDAVYTV.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-IEVAGS56.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-M56OXEL4.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-CBCMDKIU.js";
|
|
7
|
+
import "./chunk-SGOZAMQU.js";
|
|
8
|
+
import "./chunk-WQVNKYLA.js";
|
|
9
9
|
import {
|
|
10
10
|
isRecord
|
|
11
11
|
} from "./chunk-UZSNFLDQ.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-M56OXEL4.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-PY7IIPBT.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-DU577KOI.js";
|
|
23
|
+
import "./chunk-WQVNKYLA.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-M56OXEL4.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-4X74VGG6.js";
|
|
94
94
|
import {
|
|
95
95
|
evaluateCommandProtection,
|
|
96
96
|
extractToolCommand,
|
|
97
97
|
reportCommandProtectionBlock
|
|
98
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-CBCMDKIU.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-PY7IIPBT.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-NDHM5ENV.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-V53TNQR2.js";
|
|
219
219
|
import {
|
|
220
220
|
SUBAGENT_MCP_TOOL_TIMEOUT_MS,
|
|
221
221
|
engineScriptProcess,
|
|
222
222
|
subagentMcpProcessConfig
|
|
223
|
-
} from "./chunk-
|
|
223
|
+
} from "./chunk-IEVAGS56.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-SGOZAMQU.js";
|
|
235
235
|
import {
|
|
236
236
|
AspRequestTimeoutError,
|
|
237
237
|
AspResponseError,
|
|
238
238
|
buildCodexAgentEnv,
|
|
239
239
|
getCodexModelProvider
|
|
240
|
-
} from "./chunk-
|
|
240
|
+
} from "./chunk-DU577KOI.js";
|
|
241
241
|
import {
|
|
242
242
|
SUBPROCESS_MAX_BUFFER,
|
|
243
243
|
execAsync,
|
|
244
244
|
execFileAsync
|
|
245
|
-
} from "./chunk-
|
|
245
|
+
} from "./chunk-WQVNKYLA.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-M56OXEL4.js";
|
|
547
547
|
import {
|
|
548
548
|
__commonJS,
|
|
549
549
|
__export,
|
|
@@ -61901,7 +61901,7 @@ function terminalErrorsFromEvent(event, provider) {
|
|
|
61901
61901
|
if (codexTurn) {
|
|
61902
61902
|
return normalizeCodexAspTranscriptStatus(codexTurn.status) === "failed" ? [codexTurn.error ?? "Codex run failed"] : void 0;
|
|
61903
61903
|
}
|
|
61904
|
-
const mayContainProviderError = provider === "cursor" && event.type === "cursor-error" || provider === "opencode" && (event.type === "opencode-error" || event.type === "opencode-message.updated") || provider === "pi" && (event.type === "pi-error" || event.type === "pi-message_end");
|
|
61904
|
+
const mayContainProviderError = provider === "cursor" && event.type === "cursor-error" || provider === "opencode" && (event.type === "opencode-error" || event.type === "opencode-message.updated") || provider === "pi" && (event.type === "pi-error" || event.type === "pi-message_end") || provider === "muse" && event.type === "muse-error";
|
|
61905
61905
|
if (!mayContainProviderError) return void 0;
|
|
61906
61906
|
const errors = parseAgentEvents([event], provider).flatMap((message) => message.type === "error" ? [message.message] : []);
|
|
61907
61907
|
return errors.length > 0 ? errors : void 0;
|
|
@@ -61943,6 +61943,7 @@ function isForkPreparing(chat) {
|
|
|
61943
61943
|
function hasActiveBackgroundWork(chat) {
|
|
61944
61944
|
return (chat.provider.hasActiveBackgroundTasks?.() ?? false) || isForkPreparing(chat);
|
|
61945
61945
|
}
|
|
61946
|
+
var NOT_WORK_MESSAGE_TYPES = /* @__PURE__ */ new Set(["user", "error", "capacity_retry", "quota_status", "auth_fallback"]);
|
|
61946
61947
|
function hasActiveAgentWork(chat) {
|
|
61947
61948
|
return chat.provider.isProcessing() || hasActiveBackgroundWork(chat) || chat.turnCompletion !== null;
|
|
61948
61949
|
}
|
|
@@ -63575,6 +63576,7 @@ ${note}`;
|
|
|
63575
63576
|
hasActiveTurn: false,
|
|
63576
63577
|
observedBranchesByRepo: /* @__PURE__ */ new Map(),
|
|
63577
63578
|
lastTurnErrors: null,
|
|
63579
|
+
turnWorked: false,
|
|
63578
63580
|
turnNotices: [],
|
|
63579
63581
|
unsaidNotes: [],
|
|
63580
63582
|
turnRequest: null,
|
|
@@ -63637,6 +63639,7 @@ ${note}`;
|
|
|
63637
63639
|
}
|
|
63638
63640
|
activateTurn(chat, messageId) {
|
|
63639
63641
|
chat.hasActiveTurn = true;
|
|
63642
|
+
chat.turnWorked = false;
|
|
63640
63643
|
chat.stopped = null;
|
|
63641
63644
|
chat.activeMessageId = messageId;
|
|
63642
63645
|
chat.activeErrorNotificationTargets = chat.errorNotificationTargets.get(messageId) ?? [];
|
|
@@ -63741,6 +63744,7 @@ ${note}`;
|
|
|
63741
63744
|
const parentToolUseId = typeof event.payload.parent_tool_use_id === "string" ? event.payload.parent_tool_use_id : null;
|
|
63742
63745
|
const messages = parseDisplayMessages([event], chat.persisted.provider, { filter: false, parentToolUseId });
|
|
63743
63746
|
if (chat.hasActiveTurn) this.agentChatActivityTrackerService.noteSkillMcpCalls(chatId, messages);
|
|
63747
|
+
if (messages.some((message) => !NOT_WORK_MESSAGE_TYPES.has(message.type))) chat.turnWorked = true;
|
|
63744
63748
|
if (!parentToolUseId && !chat.persisted.parentChatId && event.type !== CLAUDE_PARTIAL_MESSAGE_EVENT_TYPE) {
|
|
63745
63749
|
const step = currentStepLabel(messages, chat.plainStep ?? void 0);
|
|
63746
63750
|
chat.plainStep = lastPlainStepLabel(messages) ?? chat.plainStep;
|
|
@@ -63919,6 +63923,7 @@ ${note}`;
|
|
|
63919
63923
|
}
|
|
63920
63924
|
}
|
|
63921
63925
|
const stillProcessing = processing || forked;
|
|
63926
|
+
const failedWithoutWork = !lostToRestart && !!chat.lastTurnErrors?.length && !chat.turnWorked;
|
|
63922
63927
|
const answer = [...chat.turnAnswer.values()].filter((text) => text.trim()).join("\n\n").slice(-FINAL_MESSAGE_MAX) || null;
|
|
63923
63928
|
const request = chat.turnRequest;
|
|
63924
63929
|
chat.turnAnswer.clear();
|
|
@@ -63926,7 +63931,7 @@ ${note}`;
|
|
|
63926
63931
|
const responseComplete = this.publishTurnCompleted(chat, completedAt, stillProcessing, answer, request, userTurn);
|
|
63927
63932
|
const completion = this.publishAgentTurnCompleteWebhook(chat, completedAt, stillProcessing, forked ? null : exhaustion, responseComplete, chat.turnCompletion, lostToRestart, stopped).catch((error) => console.error("[ChatService] Failed to report turn completion:", { chatId, error })).finally(() => {
|
|
63928
63933
|
if (chat.turnCompletion === completion) chat.turnCompletion = null;
|
|
63929
|
-
this.notifyWorkspaceAgentIdle();
|
|
63934
|
+
this.notifyWorkspaceAgentIdle(failedWithoutWork);
|
|
63930
63935
|
this.scheduleIdleRelease(chat);
|
|
63931
63936
|
});
|
|
63932
63937
|
chat.turnCompletion = completion;
|
|
@@ -63960,9 +63965,9 @@ ${note}`;
|
|
|
63960
63965
|
}
|
|
63961
63966
|
}, AbortSignal.timeout(1e4));
|
|
63962
63967
|
}
|
|
63963
|
-
notifyWorkspaceAgentIdle() {
|
|
63968
|
+
notifyWorkspaceAgentIdle(failedWithoutWork = false) {
|
|
63964
63969
|
if (this.getProcessingCount() > 0) return;
|
|
63965
|
-
monolithService.sendEvent({ type: "workspace_agent_idle", payload: {} }).catch(() => {
|
|
63970
|
+
monolithService.sendEvent({ type: "workspace_agent_idle", payload: failedWithoutWork ? { failedWithoutWork: true } : {} }).catch(() => {
|
|
63966
63971
|
});
|
|
63967
63972
|
}
|
|
63968
63973
|
getRuntimeChat(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-NDHM5ENV.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-M56OXEL4.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