replicas-engine 0.1.470 → 0.1.471
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/index.js +25 -11
- package/package.json +1 -1
package/dist/src/index.js
CHANGED
|
@@ -582,7 +582,7 @@ var WORKSPACE_SIZES = ["small", "large"];
|
|
|
582
582
|
var INVALID_WORKSPACE_SIZE_ERROR = `Invalid size: must be one of ${WORKSPACE_SIZES.join(", ")}`;
|
|
583
583
|
|
|
584
584
|
// ../shared/src/e2b.ts
|
|
585
|
-
var E2B_TEMPLATE_NAME = "replicas-sandbox-2026-07-
|
|
585
|
+
var E2B_TEMPLATE_NAME = "replicas-sandbox-2026-07-21-v1";
|
|
586
586
|
|
|
587
587
|
// ../shared/src/runtime-env.ts
|
|
588
588
|
function shellQuotePosix(value) {
|
|
@@ -1190,7 +1190,7 @@ GitHub does NOT have a public API for uploading images to PRs/issues. When you n
|
|
|
1190
1190
|
- Do NOT commit screenshots as files to the repository
|
|
1191
1191
|
- Run \`replicas media upload <image> --share\` and put the printed \`Forge embed\` Markdown in the PR body or comment
|
|
1192
1192
|
- For video, embed a shared poster image linked to the recording's **View in Replicas** URL; GitHub does not reliably render externally hosted video inline
|
|
1193
|
-
- Treat the public URL as an opt-in bearer capability
|
|
1193
|
+
- Treat the public URL as an opt-in bearer capability; revoke it with \`replicas media revoke <media-id>\` only when the user asks or the media should stop rendering \u2014 revoking breaks embeds already posted on the PR
|
|
1194
1194
|
- If you were triggered from Slack, also upload the image to the Slack thread so the user can see it directly
|
|
1195
1195
|
`;
|
|
1196
1196
|
var GITHUB_ABILITY = {
|
|
@@ -1969,7 +1969,7 @@ GitHub does not reliably render arbitrary external videos as inline players. For
|
|
|
1969
1969
|
[](<recording-dashboard-url>)
|
|
1970
1970
|
\`\`\`
|
|
1971
1971
|
|
|
1972
|
-
Public forge shares are bearer capabilities. For private repositories, create one only when the user asked for inline PR media
|
|
1972
|
+
Public forge shares are bearer capabilities. For private repositories, create one only when the user asked for inline PR media. Revoke with \`replicas media revoke <media-id>\` **only** when the user asks or the media should intentionally stop rendering \u2014 never as routine post-task cleanup, since revoking breaks every embed already posted on the PR.
|
|
1973
1973
|
|
|
1974
1974
|
Do **not** commit screenshots to the repo, use placeholder URLs, expose the authenticated \`/v1/media/<id>\` URL, or automate GitHub's undocumented browser upload flow.
|
|
1975
1975
|
|
|
@@ -9832,7 +9832,7 @@ var DEFAULT_CODEX_ARGS = ["app-server", "--listen", "stdio://"];
|
|
|
9832
9832
|
var MIN_CODEX_CLI_VERSION = "0.144.6";
|
|
9833
9833
|
var CODEX_UPGRADE_TIMEOUT_MS = 12e4;
|
|
9834
9834
|
var codexCliVersionEnsured = null;
|
|
9835
|
-
var ENGINE_PACKAGE_VERSION = "0.1.
|
|
9835
|
+
var ENGINE_PACKAGE_VERSION = "0.1.471";
|
|
9836
9836
|
var INITIALIZE_METHOD = "initialize";
|
|
9837
9837
|
var INITIALIZED_NOTIFICATION = "initialized";
|
|
9838
9838
|
var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
|
|
@@ -12063,6 +12063,7 @@ var CursorManager = class extends CodingAgentManager {
|
|
|
12063
12063
|
abortActiveTurn = null;
|
|
12064
12064
|
blockedToolCallIds = /* @__PURE__ */ new Set();
|
|
12065
12065
|
pendingCursorBlockReason = null;
|
|
12066
|
+
instructionsDelivered = false;
|
|
12066
12067
|
historyFilePath;
|
|
12067
12068
|
historyFile;
|
|
12068
12069
|
slashCommandsCache = null;
|
|
@@ -12136,16 +12137,18 @@ var CursorManager = class extends CodingAgentManager {
|
|
|
12136
12137
|
throw new Error("Cursor API key is not configured for this workspace.");
|
|
12137
12138
|
}
|
|
12138
12139
|
const model = { id: request.model ?? DEFAULT_CURSOR_MODEL };
|
|
12140
|
+
const settingSources = ["project", "user"];
|
|
12141
|
+
const local = { cwd: this.workingDirectory, settingSources };
|
|
12139
12142
|
this.agent = this.initialSessionId ? await CursorAgent.resume(this.initialSessionId, {
|
|
12140
12143
|
apiKey,
|
|
12141
12144
|
model,
|
|
12142
|
-
local
|
|
12145
|
+
local
|
|
12143
12146
|
}) : await CursorAgent.create({
|
|
12144
12147
|
apiKey,
|
|
12145
12148
|
model,
|
|
12146
|
-
local
|
|
12149
|
+
local
|
|
12147
12150
|
});
|
|
12148
|
-
await this.onSaveSessionId(this.agent.agentId);
|
|
12151
|
+
if (this.initialSessionId) await this.onSaveSessionId(this.agent.agentId);
|
|
12149
12152
|
return this.agent;
|
|
12150
12153
|
}
|
|
12151
12154
|
async processMessageInternal(request) {
|
|
@@ -12156,8 +12159,9 @@ var CursorManager = class extends CodingAgentManager {
|
|
|
12156
12159
|
const linearSessionId = ENGINE_ENV.LINEAR_SESSION_ID;
|
|
12157
12160
|
const linearForwarder = new LinearEventForwarder(linearSessionId);
|
|
12158
12161
|
try {
|
|
12162
|
+
const includeInstructions = !this.initialSessionId && !this.instructionsDelivered;
|
|
12163
|
+
const message = await this.toCursorMessage(request, includeInstructions);
|
|
12159
12164
|
const agent = await this.ensureAgent(request);
|
|
12160
|
-
const message = await this.toCursorMessage(request);
|
|
12161
12165
|
const model = request.model ?? DEFAULT_CURSOR_MODEL;
|
|
12162
12166
|
this.recordHistoryEvent("event_msg", {
|
|
12163
12167
|
type: "user_message",
|
|
@@ -12211,6 +12215,10 @@ var CursorManager = class extends CodingAgentManager {
|
|
|
12211
12215
|
if (result === TIMEOUT) {
|
|
12212
12216
|
throw new Error("Cursor run did not report a result after its event stream ended");
|
|
12213
12217
|
}
|
|
12218
|
+
if (includeInstructions) {
|
|
12219
|
+
this.instructionsDelivered = true;
|
|
12220
|
+
await this.onSaveSessionId(agent.agentId);
|
|
12221
|
+
}
|
|
12214
12222
|
if (result.status === "error") {
|
|
12215
12223
|
this.recordHistoryEvent("cursor-error", {
|
|
12216
12224
|
type: "error",
|
|
@@ -12269,13 +12277,19 @@ var CursorManager = class extends CodingAgentManager {
|
|
|
12269
12277
|
}
|
|
12270
12278
|
this.pendingCursorBlockReason = message;
|
|
12271
12279
|
}
|
|
12272
|
-
async toCursorMessage(request) {
|
|
12280
|
+
async toCursorMessage(request, includeInstructions) {
|
|
12281
|
+
const instructions = includeInstructions ? this.buildCombinedInstructions(request.customInstructions) : void 0;
|
|
12282
|
+
const text = instructions ? `<workspace-instructions>
|
|
12283
|
+
${instructions}
|
|
12284
|
+
</workspace-instructions>
|
|
12285
|
+
|
|
12286
|
+
${request.message}` : request.message;
|
|
12273
12287
|
if (!request.images || request.images.length === 0) {
|
|
12274
|
-
return
|
|
12288
|
+
return text;
|
|
12275
12289
|
}
|
|
12276
12290
|
const images = await normalizeImages(request.images);
|
|
12277
12291
|
return {
|
|
12278
|
-
text
|
|
12292
|
+
text,
|
|
12279
12293
|
images: images.map((image) => ({
|
|
12280
12294
|
data: image.source.data,
|
|
12281
12295
|
mimeType: image.source.media_type
|