viagen 0.2.0 → 0.2.2

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/dist/cli.js CHANGED
@@ -267,9 +267,11 @@ async function deploySandbox(opts) {
267
267
  `Dev server failed to start: ${ready.error}`
268
268
  );
269
269
  }
270
+ const appBaseUrl = hasAppCommand ? sandbox2.domain(appPort) : baseUrl;
270
271
  return {
271
272
  url: url2,
272
273
  token,
274
+ appUrl: appBaseUrl,
273
275
  sandboxId: sandbox2.sandboxId,
274
276
  mode: useGit ? "git" : "upload",
275
277
  streamLogs: (opts2) => devServer.logs(opts2),
@@ -20824,11 +20826,12 @@ async function sandbox(args, options) {
20824
20826
  clearInterval(spinner);
20825
20827
  process.stdout.write("\r \u2713 Sandbox ready! \n");
20826
20828
  const baseUrl = result.url.replace(/\/t\/.*$/, "");
20827
- const iframeUrl = `${baseUrl}/via/iframe/t/${result.token}`;
20829
+ const appParam = result.appUrl !== baseUrl ? `&appUrl=${encodeURIComponent(`${result.appUrl}/t/${result.token}`)}` : "";
20830
+ const iframeUrl = `${baseUrl}/via/iframe/t/${result.token}${appParam ? `?${appParam.slice(1)}` : ""}`;
20828
20831
  const chatUrl = `${baseUrl}/via/ui/t/${result.token}`;
20829
20832
  const popUrl = `${baseUrl}/via/pop/t/${result.token}`;
20830
20833
  console.log("");
20831
- console.log(` App: ${result.url}`);
20834
+ console.log(` App: ${result.appUrl}/t/${result.token}`);
20832
20835
  console.log(` App + Chat: ${popUrl}`);
20833
20836
  console.log(` Split view: ${iframeUrl}`);
20834
20837
  console.log(` Chat only: ${chatUrl}`);
package/dist/index.d.ts CHANGED
@@ -64,6 +64,8 @@ interface DeploySandboxResult {
64
64
  sandboxId: string;
65
65
  /** Deployment mode used. */
66
66
  mode: "git" | "upload";
67
+ /** App URL (different subdomain in standalone mode, same as url otherwise). */
68
+ appUrl: string;
67
69
  /** Stream dev server logs. Yields { data, stream } entries. Call close() to stop. */
68
70
  streamLogs(opts?: {
69
71
  signal?: AbortSignal;
package/dist/index.js CHANGED
@@ -111,7 +111,7 @@ function registerHealthRoutes(server, env, errorRef) {
111
111
  );
112
112
  }
113
113
  });
114
- const currentVersion = true ? "0.2.0" : "0.0.0";
114
+ const currentVersion = true ? "0.2.2" : "0.0.0";
115
115
  debug("health", `version resolved: ${currentVersion}`);
116
116
  let versionCache = null;
117
117
  server.middlewares.use("/via/version", (_req, res) => {
@@ -19553,9 +19553,11 @@ async function deploySandbox(opts) {
19553
19553
  `Dev server failed to start: ${ready.error}`
19554
19554
  );
19555
19555
  }
19556
+ const appBaseUrl = hasAppCommand ? sandbox.domain(appPort) : baseUrl;
19556
19557
  return {
19557
19558
  url: url2,
19558
19559
  token,
19560
+ appUrl: appBaseUrl,
19559
19561
  sandboxId: sandbox.sandboxId,
19560
19562
  mode: useGit ? "git" : "upload",
19561
19563
  streamLogs: (opts2) => devServer.logs(opts2),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "viagen",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Vite dev server plugin that exposes endpoints for chatting with Claude Code SDK",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",