replicas-engine 0.1.434 → 0.1.435

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/README.md CHANGED
@@ -97,6 +97,7 @@ Engine persistence locations:
97
97
  - `~/.replicas/startHooks.log`
98
98
  - Canvas read locations (for `/canvas` endpoints):
99
99
  - `~/.claude/plans` (where Claude Code writes its plans)
100
+ - `~/.local/share/opencode/plans` and each repository's `.opencode/plans`
100
101
  - `~/.replicas/canvas`
101
102
  - Health endpoint readiness signal file:
102
103
  - `/var/log/cloud-init-output.log` (if missing, `/health` reports `initializing`)
package/dist/src/index.js CHANGED
@@ -506,7 +506,7 @@ var WORKSPACE_SIZES = ["small", "large"];
506
506
  var INVALID_WORKSPACE_SIZE_ERROR = `Invalid size: must be one of ${WORKSPACE_SIZES.join(", ")}`;
507
507
 
508
508
  // ../shared/src/e2b.ts
509
- var E2B_TEMPLATE_NAME = "replicas-sandbox-2026-07-14-v5";
509
+ var E2B_TEMPLATE_NAME = "replicas-sandbox-2026-07-14-v6";
510
510
 
511
511
  // ../shared/src/runtime-env.ts
512
512
  function shellQuotePosix(value) {
@@ -8478,7 +8478,7 @@ var DEFAULT_CODEX_ARGS = ["app-server", "--listen", "stdio://"];
8478
8478
  var MIN_CODEX_CLI_VERSION = "0.144.0";
8479
8479
  var CODEX_UPGRADE_TIMEOUT_MS = 12e4;
8480
8480
  var codexCliVersionEnsured = null;
8481
- var ENGINE_PACKAGE_VERSION = "0.1.434";
8481
+ var ENGINE_PACKAGE_VERSION = "0.1.435";
8482
8482
  var INITIALIZE_METHOD = "initialize";
8483
8483
  var INITIALIZED_NOTIFICATION = "initialized";
8484
8484
  var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
@@ -9224,7 +9224,7 @@ async function buildTurnInput(request) {
9224
9224
  })));
9225
9225
  return { input, tempImagePaths };
9226
9226
  }
9227
- async function buildTurnStartParams(threadId, request, developerInstructions, serviceTier) {
9227
+ async function buildTurnStartParams(threadId, request, serviceTier) {
9228
9228
  const effort = toReasoningEffort(request.thinkingLevel);
9229
9229
  const model = request.model ?? DEFAULT_MODEL;
9230
9230
  const { input, tempImagePaths } = await buildTurnInput(request);
@@ -9236,16 +9236,14 @@ async function buildTurnStartParams(threadId, request, developerInstructions, se
9236
9236
  ...serviceTier !== void 0 ? { serviceTier } : {},
9237
9237
  ...codexApprovalPolicyOverrides(),
9238
9238
  ...effort ? { effort } : {},
9239
- ...developerInstructions ? {
9240
- collaborationMode: {
9241
- mode: "default",
9242
- settings: {
9243
- model,
9244
- reasoning_effort: effort ?? null,
9245
- developer_instructions: developerInstructions
9246
- }
9239
+ collaborationMode: {
9240
+ mode: request.planMode ? "plan" : "default",
9241
+ settings: {
9242
+ model,
9243
+ reasoning_effort: effort ?? null,
9244
+ developer_instructions: null
9247
9245
  }
9248
- } : {}
9246
+ }
9249
9247
  },
9250
9248
  tempImagePaths
9251
9249
  };
@@ -9724,10 +9722,10 @@ var CodexAspManager = class extends CodingAgentManager {
9724
9722
  const threadId = await this.ensureThread(host, request, developerInstructions);
9725
9723
  const serviceTier = await this.resolveRequestedServiceTier(host, request);
9726
9724
  await this.applyThreadServiceTier(host, threadId, serviceTier);
9727
- const runTurn = options.runTurn ?? ((aspHost, aspThreadId, aspInstructions) => this.runTurn(aspHost, aspThreadId, request, aspInstructions, serviceTier));
9725
+ const runTurn = options.runTurn ?? ((aspHost, aspThreadId) => this.runTurn(aspHost, aspThreadId, request, serviceTier));
9728
9726
  let completedTurn;
9729
9727
  try {
9730
- completedTurn = await runTurn(host, threadId, developerInstructions);
9728
+ completedTurn = await runTurn(host, threadId);
9731
9729
  } catch (error) {
9732
9730
  await this.refreshQuotaSnapshot(host);
9733
9731
  if (this.quotaStatus.blocked) {
@@ -9822,8 +9820,8 @@ var CodexAspManager = class extends CodingAgentManager {
9822
9820
  console.warn("[CodexAspManager] Failed to apply skill registries:", error);
9823
9821
  }
9824
9822
  }
9825
- async runTurn(host, threadId, request, developerInstructions, serviceTier) {
9826
- const { params, tempImagePaths } = await buildTurnStartParams(threadId, request, developerInstructions, serviceTier);
9823
+ async runTurn(host, threadId, request, serviceTier) {
9824
+ const { params, tempImagePaths } = await buildTurnStartParams(threadId, request, serviceTier);
9827
9825
  return this.observeTurn(host, threadId, request, async () => {
9828
9826
  const turnStartResponse = await host.client.request(
9829
9827
  TURN_START_METHOD,
@@ -12290,14 +12288,22 @@ var keepAliveService = new KeepAliveService();
12290
12288
  import { readdir as readdir6, readFile as readFile12, stat as stat3 } from "fs/promises";
12291
12289
  import { homedir as homedir13 } from "os";
12292
12290
  import { join as join19 } from "path";
12293
- var CANVAS_DIRECTORIES = [
12294
- join19(homedir13(), ".replicas", "canvas"),
12295
- join19(homedir13(), ".claude", "plans")
12291
+ var GLOBAL_CANVAS_DIRECTORIES = [
12292
+ join19(homedir13(), ".claude", "plans"),
12293
+ join19(process.env.XDG_DATA_HOME ?? join19(homedir13(), ".local", "share"), "opencode", "plans"),
12294
+ join19(homedir13(), ".replicas", "canvas")
12296
12295
  ];
12296
+ async function canvasDirectories() {
12297
+ const repositories = await gitService.listRepositories().catch(() => []);
12298
+ return [
12299
+ ...GLOBAL_CANVAS_DIRECTORIES,
12300
+ ...repositories.map((repository) => join19(repository.path, ".opencode", "plans"))
12301
+ ];
12302
+ }
12297
12303
  var CanvasService = class {
12298
12304
  async listItems() {
12299
12305
  const items = /* @__PURE__ */ new Map();
12300
- for (const directory of CANVAS_DIRECTORIES) {
12306
+ for (const directory of await canvasDirectories()) {
12301
12307
  let entries;
12302
12308
  try {
12303
12309
  entries = await readdir6(directory, { withFileTypes: true });
@@ -12325,7 +12331,7 @@ var CanvasService = class {
12325
12331
  const safe = sanitizeCanvasFilename(filename);
12326
12332
  if (!safe) return null;
12327
12333
  const { kind, mimeType } = classifyCanvasFilename(safe);
12328
- for (const directory of CANVAS_DIRECTORIES) {
12334
+ for (const directory of await canvasDirectories()) {
12329
12335
  const filePath = join19(directory, safe);
12330
12336
  let sizeBytes = 0;
12331
12337
  let updatedAt = "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-engine",
3
- "version": "0.1.434",
3
+ "version": "0.1.435",
4
4
  "description": "Lightweight API server for Replicas workspaces",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",