@schuttdev/gigai 0.1.0-beta.13 → 0.1.0-beta.14

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.
@@ -787,7 +787,9 @@ async function createServer(opts) {
787
787
  trustProxy: !dev
788
788
  // Only trust proxy headers in production (behind HTTPS reverse proxy)
789
789
  });
790
- if (!dev) {
790
+ const httpsProvider = config.server.https?.provider;
791
+ const behindTunnel = httpsProvider === "tailscale" || httpsProvider === "cloudflare";
792
+ if (!dev && !behindTunnel) {
791
793
  server.addHook("onRequest", async (request, _reply) => {
792
794
  if (request.protocol !== "https") {
793
795
  throw new GigaiError(ErrorCode.HTTPS_REQUIRED, "HTTPS is required");
@@ -867,7 +869,7 @@ async function enableFunnel(port) {
867
869
  if (exitCode !== 0) {
868
870
  throw new Error(`Failed to enable Tailscale Funnel: ${stdout}`);
869
871
  }
870
- return `https://${status.hostname}:${port}`;
872
+ return `https://${status.hostname}`;
871
873
  }
872
874
  async function disableFunnel(port) {
873
875
  await runCommand("tailscale", ["funnel", "--bg", "off", `${port}`]);
@@ -1023,7 +1025,7 @@ async function runInit() {
1023
1025
  if (httpsProvider === "tailscale") {
1024
1026
  const dnsName = await getTailscaleDnsName();
1025
1027
  if (dnsName) {
1026
- serverUrl = `https://${dnsName}:${port}`;
1028
+ serverUrl = `https://${dnsName}`;
1027
1029
  console.log(` Detected Tailscale URL: ${serverUrl}`);
1028
1030
  }
1029
1031
  } else if (httpsProvider === "cloudflare" && httpsConfig && "domain" in httpsConfig && httpsConfig.domain) {
package/dist/index.js CHANGED
@@ -538,7 +538,7 @@ function runCitty() {
538
538
  dev: { type: "boolean", description: "Development mode (no HTTPS)" }
539
539
  },
540
540
  async run({ args }) {
541
- const { startServer } = await import("./dist-SIS4UF2D.js");
541
+ const { startServer } = await import("./dist-EG3MXFDE.js");
542
542
  const extraArgs = [];
543
543
  if (args.config) extraArgs.push("--config", args.config);
544
544
  if (args.dev) extraArgs.push("--dev");
@@ -549,7 +549,7 @@ function runCitty() {
549
549
  init: defineCommand({
550
550
  meta: { name: "init", description: "Interactive setup wizard" },
551
551
  async run() {
552
- const { runInit } = await import("./dist-SIS4UF2D.js");
552
+ const { runInit } = await import("./dist-EG3MXFDE.js");
553
553
  await runInit();
554
554
  }
555
555
  }),
@@ -559,7 +559,7 @@ function runCitty() {
559
559
  config: { type: "string", alias: "c", description: "Config file path" }
560
560
  },
561
561
  async run({ args }) {
562
- const { generateServerPairingCode } = await import("./dist-SIS4UF2D.js");
562
+ const { generateServerPairingCode } = await import("./dist-EG3MXFDE.js");
563
563
  await generateServerPairingCode(args.config);
564
564
  }
565
565
  }),
@@ -586,21 +586,21 @@ function runCitty() {
586
586
  cli: defineCommand({
587
587
  meta: { name: "cli", description: "Wrap a CLI command" },
588
588
  async run() {
589
- const { wrapCli } = await import("./dist-SIS4UF2D.js");
589
+ const { wrapCli } = await import("./dist-EG3MXFDE.js");
590
590
  await wrapCli();
591
591
  }
592
592
  }),
593
593
  mcp: defineCommand({
594
594
  meta: { name: "mcp", description: "Wrap an MCP server" },
595
595
  async run() {
596
- const { wrapMcp } = await import("./dist-SIS4UF2D.js");
596
+ const { wrapMcp } = await import("./dist-EG3MXFDE.js");
597
597
  await wrapMcp();
598
598
  }
599
599
  }),
600
600
  script: defineCommand({
601
601
  meta: { name: "script", description: "Wrap a script" },
602
602
  async run() {
603
- const { wrapScript } = await import("./dist-SIS4UF2D.js");
603
+ const { wrapScript } = await import("./dist-EG3MXFDE.js");
604
604
  await wrapScript();
605
605
  }
606
606
  }),
@@ -610,7 +610,7 @@ function runCitty() {
610
610
  path: { type: "positional", description: "Path to config file", required: true }
611
611
  },
612
612
  async run({ args }) {
613
- const { wrapImport } = await import("./dist-SIS4UF2D.js");
613
+ const { wrapImport } = await import("./dist-EG3MXFDE.js");
614
614
  await wrapImport(args.path);
615
615
  }
616
616
  })
@@ -622,7 +622,7 @@ function runCitty() {
622
622
  name: { type: "positional", description: "Tool name", required: true }
623
623
  },
624
624
  async run({ args }) {
625
- const { unwrapTool } = await import("./dist-SIS4UF2D.js");
625
+ const { unwrapTool } = await import("./dist-EG3MXFDE.js");
626
626
  await unwrapTool(args.name);
627
627
  }
628
628
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schuttdev/gigai",
3
- "version": "0.1.0-beta.13",
3
+ "version": "0.1.0-beta.14",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "gigai": "dist/index.js"