lunel-cli 0.1.74 → 0.1.76

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.js +11 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -242,6 +242,7 @@ function parseExtraPortsFromArgs(args) {
242
242
  }
243
243
  const EXTRA_PORTS = parseExtraPortsFromArgs(CLI_ARGS);
244
244
  const SCAN_PORTS = Array.from(new Set([...DEV_PORTS, ...EXTRA_PORTS])).sort((a, b) => a - b);
245
+ const RUN_ABCD_MODE = CLI_ARGS.includes("--run-abcd");
245
246
  function samePortSet(a, b) {
246
247
  if (a.length !== b.length)
247
248
  return false;
@@ -2526,10 +2527,11 @@ function normalizeGatewayUrl(input) {
2526
2527
  const path = parsed.pathname === "/" ? "" : parsed.pathname.replace(/\/+$/, "");
2527
2528
  return `${parsed.protocol}//${parsed.host}${path}`;
2528
2529
  }
2529
- async function createSessionFromManager() {
2530
+ async function createSessionFromManager(opts = {}) {
2530
2531
  const response = await fetch(`${MANAGER_URL}/v1/session`, {
2531
2532
  method: "POST",
2532
2533
  headers: { "Content-Type": "application/json" },
2534
+ body: JSON.stringify(opts.requestedCode ? { requestedCode: opts.requestedCode } : {}),
2533
2535
  });
2534
2536
  if (!response.ok) {
2535
2537
  throw new Error(`Failed to create session from manager: ${response.status}`);
@@ -2901,6 +2903,9 @@ async function main() {
2901
2903
  if (cloudJobConfig?.session_code) {
2902
2904
  console.log(`[cloud] Running in VM mode (sandbox: ${cloudJobConfig.sandbox_id})`);
2903
2905
  }
2906
+ if (RUN_ABCD_MODE) {
2907
+ console.log("[review] Running in pinned review session mode (code: abcd)");
2908
+ }
2904
2909
  try {
2905
2910
  console.log("Checking PTY runtime...");
2906
2911
  await ensurePtyBinaryReady();
@@ -2921,7 +2926,11 @@ async function main() {
2921
2926
  }
2922
2927
  });
2923
2928
  let session;
2924
- if (cloudJobConfig?.session_code) {
2929
+ if (RUN_ABCD_MODE) {
2930
+ session = await createSessionFromManager({ requestedCode: "abcd" });
2931
+ console.log(`[review] Attached to session ${session.code} via ${session.primary}`);
2932
+ }
2933
+ else if (cloudJobConfig?.session_code) {
2925
2934
  // Cloud mode: connect to an existing session assigned by the manager
2926
2935
  session = await connectToCloudSession(cloudJobConfig.session_code);
2927
2936
  console.log(`[cloud] Connected to session ${session.code} via ${session.primary}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lunel-cli",
3
- "version": "0.1.74",
3
+ "version": "0.1.76",
4
4
  "author": [
5
5
  {
6
6
  "name": "Soham Bharambe",