replicas-engine 0.1.942 → 0.1.944
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-GRHUKS4Z.js → asp-host-B47RPYQ6.js} +5 -5
- package/dist/src/{chunk-BJT6MJOM.js → chunk-355JOUGZ.js} +3 -3
- package/dist/src/{chunk-YLUI6AMS.js → chunk-H7XE4HV5.js} +3 -3
- package/dist/src/{chunk-NOB6RRL2.js → chunk-I6BM73FG.js} +1 -1
- package/dist/src/{chunk-ZSFMWDCA.js → chunk-L7DL6QRO.js} +6 -6
- package/dist/src/{chunk-CBG53K5N.js → chunk-NMBCHNJH.js} +1 -1
- package/dist/src/{chunk-2GKG7HNY.js → chunk-T3N2GDCA.js} +1 -1
- package/dist/src/{chunk-KZVXTHPA.js → chunk-TQN7RTPE.js} +586 -327
- package/dist/src/{chunk-LURTYTNW.js → chunk-UFCXGOL2.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 +28 -13
- package/dist/src/post-tool-pr-hook.js +2 -2
- package/dist/src/relay-mcp.js +2 -2
- 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
|
RELAY_MCP_TOOL_NAMES
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-TQN7RTPE.js";
|
|
7
7
|
|
|
8
8
|
// src/managers/relay-mcp-config.ts
|
|
9
9
|
import { existsSync } from "fs";
|
|
@@ -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-355JOUGZ.js";
|
|
7
|
+
import "./chunk-T3N2GDCA.js";
|
|
8
|
+
import "./chunk-NMBCHNJH.js";
|
|
9
9
|
import {
|
|
10
10
|
isRecord
|
|
11
11
|
} from "./chunk-UZSNFLDQ.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-TQN7RTPE.js";
|
|
13
13
|
import "./chunk-VEQXQN22.js";
|
|
14
14
|
|
|
15
15
|
// src/command-protection-hook.ts
|
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
AppServerProcess,
|
|
10
10
|
buildCodexAgentEnv
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-H7XE4HV5.js";
|
|
12
|
+
import "./chunk-NMBCHNJH.js";
|
|
13
13
|
import {
|
|
14
14
|
AGENT,
|
|
15
15
|
getMemoryOutputSafetyViolation,
|
|
16
16
|
headlessAgentRequestSchema
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-TQN7RTPE.js";
|
|
18
18
|
import "./chunk-VEQXQN22.js";
|
|
19
19
|
|
|
20
20
|
// 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-355JOUGZ.js";
|
|
36
36
|
import {
|
|
37
37
|
ACCOUNT_RATE_LIMITS_UPDATED_METHOD,
|
|
38
38
|
AGENT_MESSAGE_DELTA_METHOD,
|
|
@@ -57,12 +57,12 @@ import {
|
|
|
57
57
|
} from "./chunk-FLDA7BX3.js";
|
|
58
58
|
import {
|
|
59
59
|
publishedPullRequestUrls
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-I6BM73FG.js";
|
|
61
61
|
import {
|
|
62
62
|
RELAY_MCP_TOOL_TIMEOUT_MS,
|
|
63
63
|
relayCodexMcpConfig,
|
|
64
64
|
relayMcpProcessConfig
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-UFCXGOL2.js";
|
|
66
66
|
import {
|
|
67
67
|
BaseRefreshManager,
|
|
68
68
|
CodexAspAuthMethodChangedError,
|
|
@@ -77,7 +77,7 @@ import {
|
|
|
77
77
|
refreshDelayMs,
|
|
78
78
|
restartCodexAspHost,
|
|
79
79
|
routineRefreshExclusions
|
|
80
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-L7DL6QRO.js";
|
|
81
81
|
import {
|
|
82
82
|
ENGINE_ENV,
|
|
83
83
|
monolithRequest,
|
|
@@ -85,16 +85,16 @@ import {
|
|
|
85
85
|
readRuntimeEnvFile,
|
|
86
86
|
reloadEngineEnv,
|
|
87
87
|
setAgentCredentialSnapshot
|
|
88
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-T3N2GDCA.js";
|
|
89
89
|
import {
|
|
90
90
|
AspClient,
|
|
91
91
|
getCodexModelProvider
|
|
92
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-H7XE4HV5.js";
|
|
93
93
|
import {
|
|
94
94
|
SUBPROCESS_MAX_BUFFER,
|
|
95
95
|
execAsync,
|
|
96
96
|
execFileAsync
|
|
97
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-NMBCHNJH.js";
|
|
98
98
|
import {
|
|
99
99
|
isRecord as isRecord2
|
|
100
100
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -326,7 +326,7 @@ import {
|
|
|
326
326
|
workspaceCredentialProviderSchema,
|
|
327
327
|
workspaceTokenRequestSchema,
|
|
328
328
|
workspaceTokenResponseSchema
|
|
329
|
-
} from "./chunk-
|
|
329
|
+
} from "./chunk-TQN7RTPE.js";
|
|
330
330
|
import {
|
|
331
331
|
cloneMcpConfig,
|
|
332
332
|
ensureCompatibilityImports,
|
|
@@ -13263,6 +13263,7 @@ var ClaudeManager = class _ClaudeManager extends CodingAgentManager {
|
|
|
13263
13263
|
// Set when background tasks outlive a turn; cleared once their completion
|
|
13264
13264
|
// has been reported through onTurnComplete.
|
|
13265
13265
|
pendingBackgroundCompletion = false;
|
|
13266
|
+
backgroundCompletionsInFlight = 0;
|
|
13266
13267
|
partialMessageStreams = /* @__PURE__ */ new Map();
|
|
13267
13268
|
partialMessageFlushTimers = /* @__PURE__ */ new Map();
|
|
13268
13269
|
/** Active tool-input requests keyed by requestId; resolved when the user selects an option. */
|
|
@@ -13279,7 +13280,14 @@ var ClaudeManager = class _ClaudeManager extends CodingAgentManager {
|
|
|
13279
13280
|
chatCredentials = null;
|
|
13280
13281
|
turnCredentials = null;
|
|
13281
13282
|
constructor(options) {
|
|
13282
|
-
super({
|
|
13283
|
+
super({
|
|
13284
|
+
...options,
|
|
13285
|
+
provider: AGENT.CLAUDE,
|
|
13286
|
+
onProcessingChanged: (processing) => {
|
|
13287
|
+
if (!processing) this.maybeCompleteBackgroundTurn();
|
|
13288
|
+
options.onProcessingChanged?.(processing);
|
|
13289
|
+
}
|
|
13290
|
+
});
|
|
13283
13291
|
this.chatId = options.chatId;
|
|
13284
13292
|
this.onChatCredential = options.onChatCredential ?? (() => {
|
|
13285
13293
|
});
|
|
@@ -13332,7 +13340,7 @@ var ClaudeManager = class _ClaudeManager extends CodingAgentManager {
|
|
|
13332
13340
|
return this.authRetrying;
|
|
13333
13341
|
}
|
|
13334
13342
|
isProcessing() {
|
|
13335
|
-
return super.isProcessing() || isClaudeSessionActive(this.sessionActivity) || this.hasActiveBackgroundTasks();
|
|
13343
|
+
return super.isProcessing() || isClaudeSessionActive(this.sessionActivity) || this.pendingBackgroundCompletion || this.backgroundCompletionsInFlight > 0 || this.hasActiveBackgroundTasks();
|
|
13336
13344
|
}
|
|
13337
13345
|
getGoal() {
|
|
13338
13346
|
return this.currentGoal;
|
|
@@ -14048,6 +14056,7 @@ var ClaudeManager = class _ClaudeManager extends CodingAgentManager {
|
|
|
14048
14056
|
}
|
|
14049
14057
|
return;
|
|
14050
14058
|
}
|
|
14059
|
+
const wasProcessing = this.isProcessing();
|
|
14051
14060
|
this.setAuthRetrying(false);
|
|
14052
14061
|
if (this.pendingTurn && _ClaudeManager.isTurnActivity(msg)) {
|
|
14053
14062
|
this.pendingTurn.sawActivity = true;
|
|
@@ -14084,6 +14093,7 @@ var ClaudeManager = class _ClaudeManager extends CodingAgentManager {
|
|
|
14084
14093
|
}
|
|
14085
14094
|
}
|
|
14086
14095
|
this.maybeCompleteBackgroundTurn();
|
|
14096
|
+
if (wasProcessing && !this.isProcessing()) this.onProcessingChanged(false);
|
|
14087
14097
|
}
|
|
14088
14098
|
} catch (error) {
|
|
14089
14099
|
loopError = error;
|
|
@@ -14153,9 +14163,14 @@ var ClaudeManager = class _ClaudeManager extends CodingAgentManager {
|
|
|
14153
14163
|
this.backgroundWatchdogTriggered = false;
|
|
14154
14164
|
this.notifyBackgroundTurnComplete();
|
|
14155
14165
|
}
|
|
14156
|
-
notifyBackgroundTurnComplete() {
|
|
14157
|
-
|
|
14166
|
+
notifyBackgroundTurnComplete(after) {
|
|
14167
|
+
this.backgroundCompletionsInFlight += 1;
|
|
14168
|
+
void Promise.resolve(after).catch(() => {
|
|
14169
|
+
}).then(() => this.historyFile.flush()).then(() => this.onTurnComplete()).catch((error) => {
|
|
14158
14170
|
console.error("[ClaudeManager] Background turn completion failed:", error);
|
|
14171
|
+
}).finally(() => {
|
|
14172
|
+
this.backgroundCompletionsInFlight -= 1;
|
|
14173
|
+
if (!this.isProcessing()) this.onProcessingChanged(false);
|
|
14159
14174
|
});
|
|
14160
14175
|
}
|
|
14161
14176
|
failPendingTurn(err) {
|
|
@@ -14286,6 +14301,7 @@ var ClaudeManager = class _ClaudeManager extends CodingAgentManager {
|
|
|
14286
14301
|
const stream = this.activePromptStream;
|
|
14287
14302
|
const loop = this.sessionLoop;
|
|
14288
14303
|
const notifyCompletion = this.pendingBackgroundCompletion && !this.messageQueue.isProcessing();
|
|
14304
|
+
if (notifyCompletion) this.notifyBackgroundTurnComplete(loop);
|
|
14289
14305
|
this.settleBackgroundTasks();
|
|
14290
14306
|
if (interrupted) this.resolvePendingTurn();
|
|
14291
14307
|
else this.failPendingTurn(new Error("Claude session torn down"));
|
|
@@ -14304,7 +14320,6 @@ var ClaudeManager = class _ClaudeManager extends CodingAgentManager {
|
|
|
14304
14320
|
} catch {
|
|
14305
14321
|
}
|
|
14306
14322
|
}
|
|
14307
|
-
if (notifyCompletion) this.notifyBackgroundTurnComplete();
|
|
14308
14323
|
}
|
|
14309
14324
|
settleBackgroundTasks(error) {
|
|
14310
14325
|
for (const taskId of this.backgroundTasks.active.keys()) {
|
|
@@ -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-I6BM73FG.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-TQN7RTPE.js";
|
|
13
13
|
import "./chunk-VEQXQN22.js";
|
|
14
14
|
|
|
15
15
|
// src/services/post-tool-pr-notifier.ts
|
package/dist/src/relay-mcp.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __createRequire } from 'node:module';
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
|
-
import "./chunk-
|
|
4
|
+
import "./chunk-UFCXGOL2.js";
|
|
5
5
|
import {
|
|
6
6
|
RELAY_MCP_SERVER_NAME,
|
|
7
7
|
RELAY_MCP_TOOLS,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
relaySubagentResponseSchema,
|
|
11
11
|
spawnRelaySubagentRequestSchema,
|
|
12
12
|
waitRelaySubagentRequestSchema
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-TQN7RTPE.js";
|
|
14
14
|
import "./chunk-VEQXQN22.js";
|
|
15
15
|
|
|
16
16
|
// src/relay-mcp.ts
|