@xevy/cli 0.1.16 → 0.1.17

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/bin/dev-session.mjs +10 -11
  2. package/package.json +1 -1
@@ -244,13 +244,12 @@ export function createApiClient({ base, token, fetchImpl, registerController, se
244
244
  return { request };
245
245
  }
246
246
 
247
- function canonicalSessionUrl(hostname) {
248
- if (!hostname) return null;
249
- const candidate = /^https?:\/\//i.test(hostname) ? hostname : `https://${hostname}`;
250
- const parsed = new URL(candidate);
251
- const local = ["localhost", "127.0.0.1", "::1"].includes(parsed.hostname);
252
- if (parsed.protocol !== "https:" && !(local && parsed.protocol === "http:")) return null;
253
- return parsed.toString().replace(/\/$/, "");
247
+ export function devSessionLaunchUrl(base, task) {
248
+ const origin = normalizeBaseUrl(base);
249
+ return new URL(
250
+ `/${encodeURIComponent(task.workspaceIdentifier)}/${encodeURIComponent(task.projectIdentifier)}/task/${encodeURIComponent(task.id)}/dev-session/open`,
251
+ `${origin}/`,
252
+ ).toString();
254
253
  }
255
254
 
256
255
  function formatTask(task) {
@@ -600,8 +599,8 @@ export function createTerminalStatus({ output, writeLine, animate }) {
600
599
  };
601
600
  }
602
601
 
603
- function sessionSummary(task, session, writeLine) {
604
- const url = canonicalSessionUrl(session.hostname);
602
+ function sessionSummary(task, session, base, writeLine) {
603
+ const url = devSessionLaunchUrl(base, task);
605
604
  writeLine("\nDev Session");
606
605
  writeLine(` Task ${formatTask(task)}`);
607
606
  writeLine(` Site ${url || "not available yet"}`);
@@ -991,7 +990,7 @@ export async function runDevSession(options) {
991
990
  sleep,
992
991
  signal: detachController.signal,
993
992
  });
994
- sessionSummary(task, session, writeLine);
993
+ sessionSummary(task, session, base, writeLine);
995
994
 
996
995
  const nativeTerminal = options.nativeTerminal
997
996
  ?? (input === process.stdin && output === process.stdout);
@@ -1058,7 +1057,7 @@ export async function runDevSession(options) {
1058
1057
  const result = await api.request(`${sessionPath}/`, { signal: detachController.signal });
1059
1058
  if (!result?.session) throw new Error("No active Dev Session remains for this task.");
1060
1059
  session = result.session;
1061
- sessionSummary(task, session, writeLine);
1060
+ sessionSummary(task, session, base, writeLine);
1062
1061
  continue;
1063
1062
  }
1064
1063
  if (prompt === "/logs") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xevy/cli",
3
- "version": "0.1.16",
3
+ "version": "0.1.17",
4
4
  "description": "Xevy CLI — connect to remote Dev Sessions, configure credentials, pi, coding-agent skills, and MCP, and keep integrations current.",
5
5
  "type": "module",
6
6
  "keywords": [