replicas-cli 0.3.216 → 0.3.218

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/index.cjs +23 -19
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -17124,13 +17124,29 @@ var init_environment = __esm({
17124
17124
  }
17125
17125
  });
17126
17126
 
17127
+ // ../shared/src/routes/pull-requests.ts
17128
+ var PULL_REQUEST_MERGE_METHODS, DEPLOY_START_WINDOW_MS, mergePullRequestRequestSchema;
17129
+ var init_pull_requests = __esm({
17130
+ "../shared/src/routes/pull-requests.ts"() {
17131
+ "use strict";
17132
+ init_zod();
17133
+ PULL_REQUEST_MERGE_METHODS = ["merge", "squash", "rebase"];
17134
+ DEPLOY_START_WINDOW_MS = 30 * 6e4;
17135
+ mergePullRequestRequestSchema = external_exports.object({
17136
+ mergeMethod: external_exports.enum(PULL_REQUEST_MERGE_METHODS).optional(),
17137
+ bypassRules: external_exports.boolean().optional()
17138
+ });
17139
+ }
17140
+ });
17141
+
17127
17142
  // ../shared/src/routes/mothership.ts
17128
- var SUBAGENT_SERVICE_TIERS, mothershipSubagentSettingsSchema;
17143
+ var SUBAGENT_SERVICE_TIERS, mothershipSubagentSettingsSchema, DEPLOYED_SHOWN_MS, MOTHERSHIP_SHIPPING_LOOKBACK_MS;
17129
17144
  var init_mothership = __esm({
17130
17145
  "../shared/src/routes/mothership.ts"() {
17131
17146
  "use strict";
17132
17147
  init_zod();
17133
17148
  init_agent();
17149
+ init_pull_requests();
17134
17150
  SUBAGENT_SERVICE_TIERS = ["default", "fast", "ultrafast"];
17135
17151
  mothershipSubagentSettingsSchema = external_exports.object({
17136
17152
  coding_agent: external_exports.enum(VALID_AGENT_PROVIDERS),
@@ -17140,6 +17156,8 @@ var init_mothership = __esm({
17140
17156
  goal_mode: external_exports.boolean(),
17141
17157
  plan_mode: external_exports.boolean()
17142
17158
  });
17159
+ DEPLOYED_SHOWN_MS = 3 * 60 * 6e4;
17160
+ MOTHERSHIP_SHIPPING_LOOKBACK_MS = 3 * 24 * 60 * 6e4;
17143
17161
  }
17144
17162
  });
17145
17163
 
@@ -19882,7 +19900,7 @@ var init_visuals = __esm({
19882
19900
  VISUAL_COLUMN_WIDTH = 760;
19883
19901
  VISUAL_PHONE_WIDTH = 390;
19884
19902
  VISUAL_MIN_HEIGHT = 24;
19885
- VISUAL_MAX_HEIGHT = 4e3;
19903
+ VISUAL_MAX_HEIGHT = 2e4;
19886
19904
  VISUAL_FONT_PATH = "/fonts/GeneralSans-Variable.woff2";
19887
19905
  FONT_SANS = '"General Sans", system-ui, -apple-system, "Segoe UI", sans-serif';
19888
19906
  FONT_MONO = '"Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace';
@@ -32218,20 +32236,6 @@ var init_repositories = __esm({
32218
32236
  }
32219
32237
  });
32220
32238
 
32221
- // ../shared/src/routes/pull-requests.ts
32222
- var PULL_REQUEST_MERGE_METHODS, mergePullRequestRequestSchema;
32223
- var init_pull_requests = __esm({
32224
- "../shared/src/routes/pull-requests.ts"() {
32225
- "use strict";
32226
- init_zod();
32227
- PULL_REQUEST_MERGE_METHODS = ["merge", "squash", "rebase"];
32228
- mergePullRequestRequestSchema = external_exports.object({
32229
- mergeMethod: external_exports.enum(PULL_REQUEST_MERGE_METHODS).optional(),
32230
- bypassRules: external_exports.boolean().optional()
32231
- });
32232
- }
32233
- });
32234
-
32235
32239
  // ../shared/src/routes/review-messages.ts
32236
32240
  var sendPullRequestReviewMessageRequestSchema;
32237
32241
  var init_review_messages = __esm({
@@ -38367,7 +38371,7 @@ async function inspect(html, source) {
38367
38371
  const resize = (width, height) => page.send("Emulation.setDeviceMetricsOverride", { width, height, deviceScaleFactor: 1, mobile: false });
38368
38372
  const screenshot = async (appearance, width) => {
38369
38373
  await load(appearance, width, 600);
38370
- await resize(width, clampVisualHeight(await settledHeight(page)));
38374
+ await resize(width, clampVisualHeight(Math.min(MAX_SCREENSHOT_HEIGHT, await settledHeight(page))));
38371
38375
  const { data } = await page.send("Page.captureScreenshot", { format: "png" });
38372
38376
  import_fs10.default.mkdirSync(SCREENSHOT_DIR, { recursive: true });
38373
38377
  const file2 = import_path9.default.join(SCREENSHOT_DIR, `${import_path9.default.basename(source, import_path9.default.extname(source))}-${appearance}-${width}.png`);
@@ -38407,7 +38411,6 @@ function warnings(inspection) {
38407
38411
  return [
38408
38412
  ...inspection.viewportDependent ? [VIEWPORT_DEPENDENT_FIX] : [],
38409
38413
  ...inspection.overflowWidths.length > 0 ? [`Content overflows horizontally at ${inspection.overflowWidths.join("px, ")}px. Let it wrap or stack at narrow widths.`] : [],
38410
- ...inspection.heights.some(([, height]) => height > VISUAL_MAX_HEIGHT) ? [`The page is taller than ${VISUAL_MAX_HEIGHT}px at some widths, so chat cuts off the bottom. Make it shorter or split it into several visuals.`] : [],
38411
38414
  ...inspection.background ? [`The page paints its own background (${inspection.background}) on html or body. Leave them transparent so it sits on the chat background.`] : []
38412
38415
  ];
38413
38416
  }
@@ -38465,7 +38468,7 @@ Next: publish with \`replicas visualize ${file2} --title "<short title>"\`.`);
38465
38468
  console.log("\nNext: paste the ![\u2026](\u2026) line on its own line where the visual belongs in your final reply. The user sees the visual itself, so don't introduce or restate it; add only what it doesn't say. The Forge link is for posting outside Replicas chat (PRs, Slack, Linear); leave it out of your chat reply.");
38466
38469
  });
38467
38470
  }
38468
- var import_fs10, import_http3, import_path9, MIB, MAX_IMAGE_BYTES, MAX_PAGE_BYTES, LOAD_TIMEOUT_MS, SCREENSHOT_DIR, LOCAL_IMAGE, webAppUrl, VIEWPORT_DEPENDENT_FIX, consoleErrors;
38471
+ var import_fs10, import_http3, import_path9, MIB, MAX_IMAGE_BYTES, MAX_PAGE_BYTES, LOAD_TIMEOUT_MS, MAX_SCREENSHOT_HEIGHT, SCREENSHOT_DIR, LOCAL_IMAGE, webAppUrl, VIEWPORT_DEPENDENT_FIX, consoleErrors;
38469
38472
  var init_visualize = __esm({
38470
38473
  "src/commands/visualize.ts"() {
38471
38474
  "use strict";
@@ -38484,6 +38487,7 @@ var init_visualize = __esm({
38484
38487
  MAX_IMAGE_BYTES = 10 * MIB;
38485
38488
  MAX_PAGE_BYTES = 25 * MIB;
38486
38489
  LOAD_TIMEOUT_MS = 1e4;
38490
+ MAX_SCREENSHOT_HEIGHT = 4e3;
38487
38491
  SCREENSHOT_DIR = "/tmp/replicas-visualize";
38488
38492
  LOCAL_IMAGE = /(["'`])(\/(?!\/)[^"'`\r\n]*?\.(?:png|jpe?g|gif|webp|avif|svg))\1|url\(\s*(\/(?!\/)[^\s"'`()]*?\.(?:png|jpe?g|gif|webp|avif|svg))\s*\)/gi;
38489
38493
  webAppUrl = () => process.env.REPLICAS_WEB_URL || DEFAULT_WEB_APP_URL;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.3.216",
3
+ "version": "0.3.218",
4
4
  "description": "CLI for managing Replicas workspaces - SSH into cloud dev environments with automatic port forwarding",
5
5
  "main": "dist/index.cjs",
6
6
  "bin": {