replicas-engine 0.1.479 → 0.1.481

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.
Files changed (2) hide show
  1. package/dist/src/index.js +10 -8
  2. 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-22-v4";
585
+ var E2B_TEMPLATE_NAME = "replicas-sandbox-2026-07-23-v1";
586
586
 
587
587
  // ../shared/src/runtime-env.ts
588
588
  function shellQuotePosix(value) {
@@ -1614,9 +1614,10 @@ All writes are proposals: a human reviews them in the dashboard, and nothing tak
1614
1614
 
1615
1615
  Use \`replicas learnings --help\` and subcommand help such as \`replicas learnings add --help\`, \`replicas learnings update --help\`, or \`replicas learnings delete --help\` for current command syntax.
1616
1616
 
1617
- **Be very conservative:**
1618
- - Propose \`add\` only for repeatable, org-useful facts likely to matter again: explicit user corrections, hard-won environment or process knowledge.
1619
- - Never store task-specific details, anything derivable by reading the repo, or secrets/credentials.
1617
+ A human approves every proposal before it takes effect, so don't agonize over borderline calls \u2014 but keep proposals genuinely useful rather than reflexive.
1618
+
1619
+ - Propose \`add\` for anything repeatable and org-useful: user corrections and preferences, hard-won environment or process knowledge, conventions and decisions worth following, and gotchas that would waste time again. If you learned it the hard way this task, capture it.
1620
+ - Never store task-specific details that won't recur, facts trivially derivable by reading the repo, or secrets/credentials.
1620
1621
  - Propose \`update\` or \`delete\` when a learning is contradicted by the current code or docs, especially if the outdated guidance would affect future repeated work.
1621
1622
  - Write narrow triggers describing when the entry should surface (e.g. "UI/UX work on the admin panel"), not vague topics.`;
1622
1623
  var LEARNINGS_ABILITY = {
@@ -5494,7 +5495,7 @@ var GitService = class {
5494
5495
  const data = await response.json();
5495
5496
  if (!Array.isArray(data)) return { status: "not_found" };
5496
5497
  const branchMatches = data.filter((item) => isRecord4(item) && item.source_branch === branch);
5497
- const mergeRequest = branchMatches.find((item) => item.state === "opened") ?? branchMatches[0] ?? data[0];
5498
+ const mergeRequest = branchMatches.find((item) => item.state === "opened") ?? branchMatches[0];
5498
5499
  if (!isRecord4(mergeRequest)) return { status: "not_found" };
5499
5500
  const webUrl = mergeRequest.web_url;
5500
5501
  if (typeof webUrl === "string" && webUrl.length > 0) return { status: "found", url: webUrl };
@@ -5592,14 +5593,15 @@ var GitService = class {
5592
5593
  }
5593
5594
  }
5594
5595
  async refreshRepoMetadata(repo, currentBranch, startHooksCompleted, persistedState, observedBranches, includeDiffs = false) {
5595
- const prResult = await this.getPullRequestUrl(repo.name, repo.path, currentBranch, persistedState);
5596
+ const notFound = { status: "not_found" };
5597
+ const prResult = currentBranch === repo.defaultBranch ? notFound : await this.getPullRequestUrl(repo.name, repo.path, currentBranch, persistedState);
5596
5598
  let prUrls = persistedState?.prUrls ?? [];
5597
5599
  if (prResult.status === "found") {
5598
5600
  prUrls = appendUniqueUrl(prUrls, prResult.url);
5599
5601
  }
5600
5602
  if (observedBranches) {
5601
5603
  for (const branch of observedBranches) {
5602
- if (branch === currentBranch) continue;
5604
+ if (branch === currentBranch || branch === repo.defaultBranch) continue;
5603
5605
  const branchResult = await this.lookupPrOnRemote(repo.name, repo.path, branch);
5604
5606
  if (branchResult.status === "found") {
5605
5607
  prUrls = appendUniqueUrl(prUrls, branchResult.url);
@@ -9800,7 +9802,7 @@ var DEFAULT_CODEX_ARGS = ["app-server", "--listen", "stdio://"];
9800
9802
  var MIN_CODEX_CLI_VERSION = "0.144.6";
9801
9803
  var CODEX_UPGRADE_TIMEOUT_MS = 12e4;
9802
9804
  var codexCliVersionEnsured = null;
9803
- var ENGINE_PACKAGE_VERSION = "0.1.479";
9805
+ var ENGINE_PACKAGE_VERSION = "0.1.481";
9804
9806
  var INITIALIZE_METHOD = "initialize";
9805
9807
  var INITIALIZED_NOTIFICATION = "initialized";
9806
9808
  var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-engine",
3
- "version": "0.1.479",
3
+ "version": "0.1.481",
4
4
  "description": "Lightweight API server for Replicas workspaces",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",