@auto-engineer/cli 1.16.0 → 1.18.0

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 (61) hide show
  1. package/CHANGELOG.md +109 -0
  2. package/dist/src/config-loader.d.ts +13 -1
  3. package/dist/src/config-loader.d.ts.map +1 -1
  4. package/dist/src/config-loader.js +5 -1
  5. package/dist/src/config-loader.js.map +1 -1
  6. package/dist/src/index.js +104 -16
  7. package/dist/src/index.js.map +1 -1
  8. package/dist/src/server.d.ts +5 -0
  9. package/dist/src/server.d.ts.map +1 -1
  10. package/dist/src/server.js +8 -0
  11. package/dist/src/server.js.map +1 -1
  12. package/dist/src/tui/App.d.ts +18 -0
  13. package/dist/src/tui/App.d.ts.map +1 -0
  14. package/dist/src/tui/App.js +57 -0
  15. package/dist/src/tui/App.js.map +1 -0
  16. package/dist/src/tui/Dashboard.d.ts +26 -0
  17. package/dist/src/tui/Dashboard.d.ts.map +1 -0
  18. package/dist/src/tui/Dashboard.js +21 -0
  19. package/dist/src/tui/Dashboard.js.map +1 -0
  20. package/dist/src/tui/LogBuffer.d.ts +10 -0
  21. package/dist/src/tui/LogBuffer.d.ts.map +1 -0
  22. package/dist/src/tui/LogBuffer.js +23 -0
  23. package/dist/src/tui/LogBuffer.js.map +1 -0
  24. package/dist/src/tui/ServiceRegistry.d.ts +22 -0
  25. package/dist/src/tui/ServiceRegistry.d.ts.map +1 -0
  26. package/dist/src/tui/ServiceRegistry.js +41 -0
  27. package/dist/src/tui/ServiceRegistry.js.map +1 -0
  28. package/dist/src/tui/components/AutoTab.d.ts +24 -0
  29. package/dist/src/tui/components/AutoTab.d.ts.map +1 -0
  30. package/dist/src/tui/components/AutoTab.js +21 -0
  31. package/dist/src/tui/components/AutoTab.js.map +1 -0
  32. package/dist/src/tui/components/Footer.d.ts +3 -0
  33. package/dist/src/tui/components/Footer.d.ts.map +1 -0
  34. package/dist/src/tui/components/Footer.js +6 -0
  35. package/dist/src/tui/components/Footer.js.map +1 -0
  36. package/dist/src/tui/components/ServiceTab.d.ts +8 -0
  37. package/dist/src/tui/components/ServiceTab.d.ts.map +1 -0
  38. package/dist/src/tui/components/ServiceTab.js +12 -0
  39. package/dist/src/tui/components/ServiceTab.js.map +1 -0
  40. package/dist/src/tui/components/SummaryTab.d.ts +15 -0
  41. package/dist/src/tui/components/SummaryTab.d.ts.map +1 -0
  42. package/dist/src/tui/components/SummaryTab.js +19 -0
  43. package/dist/src/tui/components/SummaryTab.js.map +1 -0
  44. package/dist/src/tui/components/TabBar.d.ts +13 -0
  45. package/dist/src/tui/components/TabBar.d.ts.map +1 -0
  46. package/dist/src/tui/components/TabBar.js +10 -0
  47. package/dist/src/tui/components/TabBar.js.map +1 -0
  48. package/dist/src/tui/hooks/useServiceStreams.d.ts +4 -0
  49. package/dist/src/tui/hooks/useServiceStreams.d.ts.map +1 -0
  50. package/dist/src/tui/hooks/useServiceStreams.js +7 -0
  51. package/dist/src/tui/hooks/useServiceStreams.js.map +1 -0
  52. package/dist/src/tui/index.d.ts +20 -0
  53. package/dist/src/tui/index.d.ts.map +1 -0
  54. package/dist/src/tui/index.js +10 -0
  55. package/dist/src/tui/index.js.map +1 -0
  56. package/dist/src/tunnel.d.ts +14 -0
  57. package/dist/src/tunnel.d.ts.map +1 -0
  58. package/dist/src/tunnel.js +82 -0
  59. package/dist/src/tunnel.js.map +1 -0
  60. package/dist/tsconfig.tsbuildinfo +1 -1
  61. package/package.json +10 -4
@@ -0,0 +1,21 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box } from 'ink';
3
+ import { AutoTab } from './components/AutoTab.js';
4
+ import { Footer } from './components/Footer.js';
5
+ import { ServiceTab } from './components/ServiceTab.js';
6
+ import { TabBar } from './components/TabBar.js';
7
+ export function Dashboard({ serverInfo, services, activeTab }) {
8
+ const hasAutoError = !!serverInfo.tunnelError || services.some((s) => s.status === 'error');
9
+ const tabs = [
10
+ { id: 'auto', label: 'Auto', hasError: hasAutoError },
11
+ ...services.map((s) => ({ id: s.id, label: s.displayName, hasError: s.status === 'error' })),
12
+ ];
13
+ const activeService = services.find((s) => s.id === activeTab);
14
+ return (_jsxs(Box, { flexDirection: "column", height: "100%", children: [_jsx(TabBar, { tabs: tabs, activeTab: activeTab }), _jsx(Box, { flexGrow: 1, overflowY: "hidden", children: activeTab === 'auto' ? (_jsx(AutoTab, { serverInfo: serverInfo, services: services.map((s) => ({
15
+ id: s.id,
16
+ displayName: s.displayName,
17
+ status: s.status,
18
+ statusMessage: s.statusMessage,
19
+ })) })) : activeService ? (_jsx(ServiceTab, { displayName: activeService.displayName, logs: activeService.logs })) : null }), _jsx(Footer, {})] }));
20
+ }
21
+ //# sourceMappingURL=Dashboard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dashboard.js","sourceRoot":"","sources":["../../../src/tui/Dashboard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAY,MAAM,EAAE,MAAM,wBAAwB,CAAC;AA6B1D,MAAM,UAAU,SAAS,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAkB;IAC3E,MAAM,YAAY,GAAG,CAAC,CAAC,UAAU,CAAC,WAAW,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,OAAO,CAAC,CAAC;IAC5F,MAAM,IAAI,GAAU;QAClB,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE;QACrD,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,WAAW,EAAE,QAAQ,EAAE,CAAC,CAAC,MAAM,KAAK,OAAO,EAAE,CAAC,CAAC;KAC7F,CAAC;IAEF,MAAM,aAAa,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,SAAS,CAAC,CAAC;IAE/D,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,MAAM,EAAC,MAAM,aACvC,KAAC,MAAM,IAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,GAAI,EAE5C,KAAC,GAAG,IAAC,QAAQ,EAAE,CAAC,EAAE,SAAS,EAAC,QAAQ,YACjC,SAAS,KAAK,MAAM,CAAC,CAAC,CAAC,CACtB,KAAC,OAAO,IACN,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;wBAC7B,EAAE,EAAE,CAAC,CAAC,EAAE;wBACR,WAAW,EAAE,CAAC,CAAC,WAAW;wBAC1B,MAAM,EAAE,CAAC,CAAC,MAAM;wBAChB,aAAa,EAAE,CAAC,CAAC,aAAa;qBAC/B,CAAC,CAAC,GACH,CACH,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAClB,KAAC,UAAU,IAAC,WAAW,EAAE,aAAa,CAAC,WAAW,EAAE,IAAI,EAAE,aAAa,CAAC,IAAI,GAAI,CACjF,CAAC,CAAC,CAAC,IAAI,GACJ,EAEN,KAAC,MAAM,KAAG,IACN,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,10 @@
1
+ export declare class LogBuffer {
2
+ private lines;
3
+ private readonly capacity;
4
+ constructor(capacity: number);
5
+ append(text: string): void;
6
+ getLines(): string[];
7
+ clear(): void;
8
+ get lineCount(): number;
9
+ }
10
+ //# sourceMappingURL=LogBuffer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LogBuffer.d.ts","sourceRoot":"","sources":["../../../src/tui/LogBuffer.ts"],"names":[],"mappings":"AAAA,qBAAa,SAAS;IACpB,OAAO,CAAC,KAAK,CAAgB;IAC7B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;gBAEtB,QAAQ,EAAE,MAAM;IAI5B,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAS1B,QAAQ,IAAI,MAAM,EAAE;IAIpB,KAAK,IAAI,IAAI;IAIb,IAAI,SAAS,IAAI,MAAM,CAEtB;CACF"}
@@ -0,0 +1,23 @@
1
+ export class LogBuffer {
2
+ constructor(capacity) {
3
+ this.lines = [];
4
+ this.capacity = capacity;
5
+ }
6
+ append(text) {
7
+ const newLines = text.split('\n');
8
+ this.lines.push(...newLines);
9
+ if (this.lines.length > this.capacity) {
10
+ this.lines = this.lines.slice(-this.capacity);
11
+ }
12
+ }
13
+ getLines() {
14
+ return [...this.lines];
15
+ }
16
+ clear() {
17
+ this.lines = [];
18
+ }
19
+ get lineCount() {
20
+ return this.lines.length;
21
+ }
22
+ }
23
+ //# sourceMappingURL=LogBuffer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LogBuffer.js","sourceRoot":"","sources":["../../../src/tui/LogBuffer.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,SAAS;IAIpB,YAAY,QAAgB;QAHpB,UAAK,GAAa,EAAE,CAAC;QAI3B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED,MAAM,CAAC,IAAY;QACjB,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAClC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC;QAE7B,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;YACtC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAChD,CAAC;IACH,CAAC;IAED,QAAQ;QACN,OAAO,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;IACzB,CAAC;IAED,KAAK;QACH,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;IAClB,CAAC;IAED,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;IAC3B,CAAC;CACF"}
@@ -0,0 +1,22 @@
1
+ import type { ChildProcess } from 'node:child_process';
2
+ import type { Readable } from 'node:stream';
3
+ export interface ServiceHandle {
4
+ id: string;
5
+ displayName: string;
6
+ color: string;
7
+ stdout: Readable;
8
+ stderr: Readable;
9
+ process: ChildProcess;
10
+ }
11
+ type ServiceListener = (handle: ServiceHandle) => void;
12
+ export declare class ServiceRegistry {
13
+ private services;
14
+ private listeners;
15
+ register(handle: ServiceHandle): void;
16
+ get(id: string): ServiceHandle | undefined;
17
+ getAll(): ServiceHandle[];
18
+ onServiceAdded(listener: ServiceListener): () => void;
19
+ killAll(): void;
20
+ }
21
+ export {};
22
+ //# sourceMappingURL=ServiceRegistry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ServiceRegistry.d.ts","sourceRoot":"","sources":["../../../src/tui/ServiceRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,QAAQ,CAAC;IACjB,MAAM,EAAE,QAAQ,CAAC;IACjB,OAAO,EAAE,YAAY,CAAC;CACvB;AAED,KAAK,eAAe,GAAG,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAC;AAEvD,qBAAa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAAoC;IACpD,OAAO,CAAC,SAAS,CAAyB;IAE1C,QAAQ,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI;IAOrC,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS;IAI1C,MAAM,IAAI,aAAa,EAAE;IAIzB,cAAc,CAAC,QAAQ,EAAE,eAAe,GAAG,MAAM,IAAI;IAUrD,OAAO,IAAI,IAAI;CAYhB"}
@@ -0,0 +1,41 @@
1
+ export class ServiceRegistry {
2
+ constructor() {
3
+ this.services = new Map();
4
+ this.listeners = [];
5
+ }
6
+ register(handle) {
7
+ this.services.set(handle.id, handle);
8
+ for (const listener of this.listeners) {
9
+ listener(handle);
10
+ }
11
+ }
12
+ get(id) {
13
+ return this.services.get(id);
14
+ }
15
+ getAll() {
16
+ return [...this.services.values()];
17
+ }
18
+ onServiceAdded(listener) {
19
+ this.listeners.push(listener);
20
+ return () => {
21
+ const index = this.listeners.indexOf(listener);
22
+ if (index !== -1) {
23
+ this.listeners.splice(index, 1);
24
+ }
25
+ };
26
+ }
27
+ killAll() {
28
+ for (const handle of this.services.values()) {
29
+ try {
30
+ // Only kill actual child processes (not the main process used as placeholder)
31
+ if (handle.process?.pid && typeof handle.process.kill === 'function' && handle.process.pid !== process.pid) {
32
+ handle.process.kill('SIGTERM');
33
+ }
34
+ }
35
+ catch {
36
+ // Process may already be dead
37
+ }
38
+ }
39
+ }
40
+ }
41
+ //# sourceMappingURL=ServiceRegistry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ServiceRegistry.js","sourceRoot":"","sources":["../../../src/tui/ServiceRegistry.ts"],"names":[],"mappings":"AAcA,MAAM,OAAO,eAAe;IAA5B;QACU,aAAQ,GAAG,IAAI,GAAG,EAAyB,CAAC;QAC5C,cAAS,GAAsB,EAAE,CAAC;IAu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;IACH,CAAC;CACF"}
@@ -0,0 +1,24 @@
1
+ import type { ReactElement } from 'react';
2
+ type ServiceStatus = 'starting' | 'running' | 'error' | 'stopped';
3
+ interface ServiceSummary {
4
+ id: string;
5
+ displayName: string;
6
+ status: ServiceStatus;
7
+ statusMessage?: string;
8
+ }
9
+ interface TunnelInfo {
10
+ url: string;
11
+ token: string;
12
+ }
13
+ interface ServerInfo {
14
+ port: number;
15
+ tunnel?: TunnelInfo;
16
+ tunnelError?: string;
17
+ }
18
+ interface AutoTabProps {
19
+ serverInfo: ServerInfo;
20
+ services: ServiceSummary[];
21
+ }
22
+ export declare function AutoTab({ serverInfo, services }: AutoTabProps): ReactElement;
23
+ export {};
24
+ //# sourceMappingURL=AutoTab.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AutoTab.d.ts","sourceRoot":"","sources":["../../../../src/tui/components/AutoTab.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,KAAK,aAAa,GAAG,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAElE,UAAU,cAAc;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,aAAa,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,UAAU;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf;AAED,UAAU,UAAU;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,UAAU,YAAY;IACpB,UAAU,EAAE,UAAU,CAAC;IACvB,QAAQ,EAAE,cAAc,EAAE,CAAC;CAC5B;AAeD,wBAAgB,OAAO,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,YAAY,GAAG,YAAY,CA2F5E"}
@@ -0,0 +1,21 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box, Text } from 'ink';
3
+ function StatusIcon({ status }) {
4
+ switch (status) {
5
+ case 'running':
6
+ return _jsx(Text, { color: "green", children: "\u2713" });
7
+ case 'starting':
8
+ return _jsx(Text, { color: "yellow", children: "\u23F3" });
9
+ case 'error':
10
+ return _jsx(Text, { color: "red", children: "\u2717" });
11
+ case 'stopped':
12
+ return _jsx(Text, { color: "gray", children: "\u25CB" });
13
+ }
14
+ }
15
+ export function AutoTab({ serverInfo, services }) {
16
+ const { port, tunnel, tunnelError } = serverInfo;
17
+ const baseUrl = `http://localhost:${port}`;
18
+ const errors = services.filter((s) => s.status === 'error');
19
+ return (_jsxs(Box, { flexDirection: "column", padding: 1, children: [_jsxs(Box, { marginBottom: 1, children: [_jsx(Text, { color: "green", children: "\u2713 " }), _jsx(Text, { children: "Pipeline server running at " }), _jsx(Text, { color: "cyan", children: baseUrl })] }), tunnelError ? (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsx(Text, { bold: true, color: "red", children: "Tunnel Error:" }), _jsx(Box, { marginLeft: 2, children: _jsx(Text, { color: "red", children: tunnelError }) })] })) : tunnel ? (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsx(Text, { bold: true, color: "cyan", children: "Tunnel:" }), _jsxs(Box, { marginLeft: 2, children: [_jsx(Text, { dimColor: true, children: "Public URL: " }), _jsx(Text, { children: tunnel.url })] }), _jsxs(Box, { marginLeft: 2, children: [_jsx(Text, { dimColor: true, children: "Auth Token: " }), _jsx(Text, { children: tunnel.token })] }), _jsx(Box, { marginLeft: 2, children: _jsx(Text, { dimColor: true, children: "Use these to connect from the Auto cloud app." }) })] })) : (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsx(Text, { bold: true, color: "cyan", children: "Remote Access:" }), _jsx(Box, { marginLeft: 2, children: _jsx(Text, { dimColor: true, children: "Run with --tunnel to expose a public URL via ngrok for the Auto cloud app." }) })] })), _jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsx(Text, { bold: true, color: "cyan", children: "Endpoints:" }), _jsx(Box, { marginLeft: 2, children: _jsx(Text, { dimColor: true, children: "/health \u00B7 /registry \u00B7 /pipeline \u00B7 /pipeline/diagram" }) }), _jsx(Box, { marginLeft: 2, children: _jsx(Text, { dimColor: true, children: "/events (SSE) \u00B7 /file-sync (WebSocket)" }) })] }), services.length > 0 && (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsx(Text, { bold: true, children: "Services:" }), services.map((service) => (_jsxs(Box, { marginLeft: 2, children: [_jsx(StatusIcon, { status: service.status }), _jsxs(Text, { children: [" ", service.displayName] }), service.statusMessage && _jsxs(Text, { dimColor: true, children: [" ", service.statusMessage] })] }, service.id)))] })), errors.length > 0 && (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { bold: true, color: "red", children: "Recent Issues:" }), errors.map((service) => (_jsx(Box, { marginLeft: 2, children: _jsxs(Text, { color: "red", children: [service.displayName, ": ", service.statusMessage] }) }, service.id)))] }))] }));
20
+ }
21
+ //# sourceMappingURL=AutoTab.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AutoTab.js","sourceRoot":"","sources":["../../../../src/tui/components/AutoTab.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AA4BhC,SAAS,UAAU,CAAC,EAAE,MAAM,EAA6B;IACvD,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,SAAS;YACZ,OAAO,KAAC,IAAI,IAAC,KAAK,EAAC,OAAO,uBAAS,CAAC;QACtC,KAAK,UAAU;YACb,OAAO,KAAC,IAAI,IAAC,KAAK,EAAC,QAAQ,uBAAS,CAAC;QACvC,KAAK,OAAO;YACV,OAAO,KAAC,IAAI,IAAC,KAAK,EAAC,KAAK,uBAAS,CAAC;QACpC,KAAK,SAAS;YACZ,OAAO,KAAC,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HhE,OAAO,CAAC,EAAE,CAId,CACP,CAAC,IACE,CACP,EAEA,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,CACpB,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,aACzB,KAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAC,KAAK,+BAEf,EACN,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CACvB,KAAC,GAAG,IAAkB,UAAU,EAAE,CAAC,YACjC,MAAC,IAAI,IAAC,KAAK,EAAC,KAAK,aACd,OAAO,CAAC,WAAW,QAAI,OAAO,CAAC,aAAa,IACxC,IAHC,OAAO,CAAC,EAAE,CAId,CACP,CAAC,IACE,CACP,IACG,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { ReactElement } from 'react';
2
+ export declare function Footer(): ReactElement;
3
+ //# sourceMappingURL=Footer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Footer.d.ts","sourceRoot":"","sources":["../../../../src/tui/components/Footer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,wBAAgB,MAAM,IAAI,YAAY,CAMrC"}
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Box, Text } from 'ink';
3
+ export function Footer() {
4
+ return (_jsx(Box, { children: _jsx(Text, { dimColor: true, children: "[Tab] switch [q] quit" }) }));
5
+ }
6
+ //# sourceMappingURL=Footer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Footer.js","sourceRoot":"","sources":["../../../../src/tui/components/Footer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAGhC,MAAM,UAAU,MAAM;IACpB,OAAO,CACL,KAAC,GAAG,cACF,KAAC,IAAI,IAAC,QAAQ,4CAA6B,GACvC,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { ReactElement } from 'react';
2
+ interface ServiceTabProps {
3
+ displayName: string;
4
+ logs: string[];
5
+ }
6
+ export declare function ServiceTab({ displayName, logs }: ServiceTabProps): ReactElement;
7
+ export {};
8
+ //# sourceMappingURL=ServiceTab.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ServiceTab.d.ts","sourceRoot":"","sources":["../../../../src/tui/components/ServiceTab.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,UAAU,eAAe;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAED,wBAAgB,UAAU,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,eAAe,GAAG,YAAY,CA8B/E"}
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box, Text, useStdout } from 'ink';
3
+ export function ServiceTab({ displayName, logs }) {
4
+ const { stdout } = useStdout();
5
+ // Reserve lines for: header (2 with margin), footer (1), tab bar (1), padding (2)
6
+ const reservedLines = 6;
7
+ const maxLines = Math.max(1, (stdout?.rows ?? 24) - reservedLines);
8
+ // Show only the last N lines that fit
9
+ const visibleLogs = logs.slice(-maxLines);
10
+ return (_jsxs(Box, { flexDirection: "column", padding: 1, height: maxLines + 3, overflowY: "hidden", children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { bold: true, color: "cyan", children: displayName }) }), logs.length === 0 ? (_jsx(Text, { dimColor: true, children: "No output yet" })) : (_jsx(Box, { flexDirection: "column", overflowY: "hidden", children: visibleLogs.map((line, index) => (_jsx(Text, { wrap: "truncate", children: line }, `log-${index}-${line.slice(0, 20)}`))) }))] }));
11
+ }
12
+ //# sourceMappingURL=ServiceTab.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ServiceTab.js","sourceRoot":"","sources":["../../../../src/tui/components/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} from 'react';
2
+ type ServiceStatus = 'starting' | 'running' | 'error' | 'stopped';
3
+ interface ServiceSummary {
4
+ id: string;
5
+ displayName: string;
6
+ status: ServiceStatus;
7
+ statusMessage?: string;
8
+ }
9
+ interface SummaryTabProps {
10
+ serverUrl: string;
11
+ services: ServiceSummary[];
12
+ }
13
+ export declare function SummaryTab({ serverUrl, services }: SummaryTabProps): ReactElement;
14
+ export {};
15
+ //# sourceMappingURL=SummaryTab.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SummaryTab.d.ts","sourceRoot":"","sources":["../../../../src/tui/components/SummaryTab.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,KAAK,aAAa,GAAG,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAElE,UAAU,cAAc;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,aAAa,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,eAAe;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,cAAc,EAAE,CAAC;CAC5B;AAeD,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,eAAe,GAAG,YAAY,CAwCjF"}
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box, Text } from 'ink';
3
+ function StatusIcon({ status }) {
4
+ switch (status) {
5
+ case 'running':
6
+ return _jsx(Text, { color: "green", children: "\u2713" });
7
+ case 'starting':
8
+ return _jsx(Text, { color: "yellow", children: "\u23F3" });
9
+ case 'error':
10
+ return _jsx(Text, { color: "red", children: "\u2717" });
11
+ case 'stopped':
12
+ return _jsx(Text, { color: "gray", children: "\u25CB" });
13
+ }
14
+ }
15
+ export function SummaryTab({ serverUrl, services }) {
16
+ const errors = services.filter((s) => s.status === 'error');
17
+ return (_jsxs(Box, { flexDirection: "column", padding: 1, children: [_jsxs(Box, { marginBottom: 1, children: [_jsx(Text, { color: "green", children: "\u2713 " }), _jsx(Text, { children: "Pipeline server running at " }), _jsx(Text, { color: "cyan", children: serverUrl })] }), services.length > 0 && (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsx(Text, { bold: true, children: "Services:" }), services.map((service) => (_jsxs(Box, { marginLeft: 2, children: [_jsx(StatusIcon, { status: service.status }), _jsxs(Text, { children: [" ", service.displayName] }), service.statusMessage && _jsxs(Text, { dimColor: true, children: [" ", service.statusMessage] })] }, service.id)))] })), errors.length > 0 && (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { bold: true, color: "red", children: "Recent Issues:" }), errors.map((service) => (_jsx(Box, { marginLeft: 2, children: _jsxs(Text, { color: "red", children: [service.displayName, ": ", service.statusMessage] }) }, service.id)))] }))] }));
18
+ }
19
+ //# sourceMappingURL=SummaryTab.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SummaryTab.js","sourceRoot":"","sources":["../../../../src/tui/components/SummaryTab.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAiBhC,SAAS,UAAU,CAAC,EAAE,MAAM,EAA6B;IACvD,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,SAAS;YACZ,OAAO,KAAC,IAAI,IAAC,KAAK,EAAC,OAAO,uBAAS,CAAC;QACtC,KAAK,UAAU;YACb,OAAO,KAAC,IAAI,IAAC,KAAK,EAAC,QAAQ,uBAAS,CAAC;QACvC,KAAK,OAAO;YACV,OAAO,KAAC,IAAI,IAAC,KAAK,EAAC,KAAK,uBAAS,CAAC;QACpC,KAAK,SAAS;YACZ,OAAO,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,uBAAS,CAAC;IACvC,CAAC;AACH,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,EAAE,SAAS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,OAAO,CAAC,aAAa,IACxC,IAHC,OAAO,CAAC,EAAE,CAId,CACP,CAAC,IACE,CACP,IACG,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { ReactElement } from 'react';
2
+ export interface Tab {
3
+ id: string;
4
+ label: string;
5
+ hasError?: boolean;
6
+ }
7
+ interface TabBarProps {
8
+ tabs: Tab[];
9
+ activeTab: string;
10
+ }
11
+ export declare function TabBar({ tabs, activeTab }: TabBarProps): ReactElement;
12
+ export {};
13
+ //# sourceMappingURL=TabBar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TabBar.d.ts","sourceRoot":"","sources":["../../../../src/tui/components/TabBar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,MAAM,WAAW,GAAG;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,UAAU,WAAW;IACnB,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,MAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,WAAW,GAAG,YAAY,CAqBrE"}
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box, Text } from 'ink';
3
+ export function TabBar({ tabs, activeTab }) {
4
+ return (_jsx(Box, { children: tabs.map((tab) => {
5
+ const isActive = tab.id === activeTab;
6
+ const errorIndicator = tab.hasError ? _jsx(Text, { color: "red", children: "\u25CF" }) : null;
7
+ return (_jsxs(Box, { marginRight: 1, children: [isActive ? (_jsxs(Text, { bold: true, color: "cyan", children: ["[", tab.label, "]"] })) : (_jsxs(Text, { dimColor: true, children: [" ", tab.label, " "] })), errorIndicator] }, tab.id));
8
+ }) }));
9
+ }
10
+ //# sourceMappingURL=TabBar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TabBar.js","sourceRoot":"","sources":["../../../../src/tui/components/TabBar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAchC,MAAM,UAAU,MAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAe;IACrD,OAAO,CACL,KAAC,GAAG,cACD,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;YAChB,MAAM,QAAQ,GAAG,GAAG,CAAC,EAAE,KAAK,SAAS,CAAC;YACtC,MAAM,cAAc,GAAG,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAC,IAAI,IAAC,KAAK,EAAC,KAAK,uBAAS,CAAC,CAAC,CAAC,IAAI,CAAC;YACxE,OAAO,CACL,MAAC,GAAG,IAAc,WAAW,EAAE,CAAC,aAC7B,QAAQ,CAAC,CAAC,CAAC,CACV,MAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAC,MAAM,kBACnB,GAAG,CAAC,KAAK,SACN,CACR,CAAC,CAAC,CAAC,CACF,MAAC,IAAI,IAAC,QAAQ,wBAAG,GAAG,CAAC,KAAK,SAAS,CACpC,EACA,cAAc,KARP,GAAG,CAAC,EAAE,CASV,CACP,CAAC;QACJ,CAAC,CAAC,GACE,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { Readable } from 'node:stream';
2
+ import type { LogBuffer } from '../LogBuffer.js';
3
+ export declare function wireServiceStream(stream: Readable, buffer: LogBuffer, onChange?: () => void): void;
4
+ //# sourceMappingURL=useServiceStreams.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useServiceStreams.d.ts","sourceRoot":"","sources":["../../../../src/tui/hooks/useServiceStreams.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,MAAM,IAAI,GAAG,IAAI,CAKlG"}
@@ -0,0 +1,7 @@
1
+ export function wireServiceStream(stream, buffer, onChange) {
2
+ stream.on('data', (chunk) => {
3
+ buffer.append(chunk.toString());
4
+ onChange?.();
5
+ });
6
+ }
7
+ //# sourceMappingURL=useServiceStreams.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useServiceStreams.js","sourceRoot":"","sources":["../../../../src/tui/hooks/useServiceStreams.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,iBAAiB,CAAC,MAAgB,EAAE,MAAiB,EAAE,QAAqB;IAC1F,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAa,EAAE,EAAE;QAClC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;QAChC,QAAQ,EAAE,EAAE,CAAC;IACf,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,20 @@
1
+ import type { ServiceRegistry } from './ServiceRegistry.js';
2
+ export { LogBuffer } from './LogBuffer.js';
3
+ export { type ServiceHandle, ServiceRegistry } from './ServiceRegistry.js';
4
+ interface TunnelInfo {
5
+ url: string;
6
+ token: string;
7
+ }
8
+ interface ServerInfo {
9
+ port: number;
10
+ tunnel?: TunnelInfo;
11
+ tunnelError?: string;
12
+ }
13
+ interface RenderTuiOptions {
14
+ serverInfo: ServerInfo;
15
+ registry: ServiceRegistry;
16
+ }
17
+ export declare function renderTui({ serverInfo, registry }: RenderTuiOptions): {
18
+ unmount: () => void;
19
+ };
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tui/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,KAAK,aAAa,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE3E,UAAU,UAAU;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf;AAED,UAAU,UAAU;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,UAAU,gBAAgB;IACxB,UAAU,EAAE,UAAU,CAAC;IACvB,QAAQ,EAAE,eAAe,CAAC;CAC3B;AAED,wBAAgB,SAAS,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,gBAAgB,GAAG;IAAE,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,CAG7F"}
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { render } from 'ink';
3
+ import { App } from './App.js';
4
+ export { LogBuffer } from './LogBuffer.js';
5
+ export { ServiceRegistry } from './ServiceRegistry.js';
6
+ export function renderTui({ serverInfo, registry }) {
7
+ const { unmount } = render(_jsx(App, { serverInfo: serverInfo, registry: registry }));
8
+ return { unmount };
9
+ }
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tui/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAG/B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAsB,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAkB3E,MAAM,UAAU,SAAS,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAoB;IAClE,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC,KAAC,GAAG,IAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,GAAI,CAAC,CAAC;IAChF,OAAO,EAAE,OAAO,EAAE,CAAC;AACrB,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { RequestHandler } from 'express';
2
+ import type { SocketMiddleware } from './file-syncer/index.js';
3
+ export declare function generateBearerToken(): string;
4
+ export declare function createTunnelAuthMiddleware(bearerToken: string): RequestHandler;
5
+ export declare function createTunnelSocketMiddleware(bearerToken: string): SocketMiddleware;
6
+ export declare function startTunnel(options: {
7
+ port: number;
8
+ authtoken?: string;
9
+ domain?: string;
10
+ }): Promise<{
11
+ url: string;
12
+ close: () => Promise<void>;
13
+ }>;
14
+ //# sourceMappingURL=tunnel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tunnel.d.ts","sourceRoot":"","sources":["../../src/tunnel.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAyB,cAAc,EAAY,MAAM,SAAS,CAAC;AAE/E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAK/D,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C;AAED,wBAAgB,0BAA0B,CAAC,WAAW,EAAE,MAAM,GAAG,cAAc,CAe9E;AAED,wBAAgB,4BAA4B,CAAC,WAAW,EAAE,MAAM,GAAG,gBAAgB,CAelF;AAED,wBAAsB,WAAW,CAAC,OAAO,EAAE;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,OAAO,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,CAAC,CAkDvD"}
@@ -0,0 +1,82 @@
1
+ import crypto from 'node:crypto';
2
+ import { PassThrough } from 'node:stream';
3
+ import { getServiceRegistry } from './server.js';
4
+ const LOCALHOST_IPS = new Set(['127.0.0.1', '::1', '::ffff:127.0.0.1']);
5
+ export function generateBearerToken() {
6
+ return crypto.randomBytes(32).toString('hex');
7
+ }
8
+ export function createTunnelAuthMiddleware(bearerToken) {
9
+ return (req, res, next) => {
10
+ if (LOCALHOST_IPS.has(req.ip ?? '')) {
11
+ next();
12
+ return;
13
+ }
14
+ const authHeader = req.headers.authorization;
15
+ if (authHeader === `Bearer ${bearerToken}`) {
16
+ next();
17
+ return;
18
+ }
19
+ res.status(401).json({ error: 'Unauthorized' });
20
+ };
21
+ }
22
+ export function createTunnelSocketMiddleware(bearerToken) {
23
+ return (socket, next) => {
24
+ if (LOCALHOST_IPS.has(socket.handshake.address)) {
25
+ next();
26
+ return;
27
+ }
28
+ const token = socket.handshake.auth.token;
29
+ if (token === bearerToken) {
30
+ next();
31
+ return;
32
+ }
33
+ next(new Error('Unauthorized'));
34
+ };
35
+ }
36
+ export async function startTunnel(options) {
37
+ try {
38
+ const ngrok = await import('@ngrok/ngrok');
39
+ const isTuiMode = process.env.AUTO_TUI_MODE === '1';
40
+ // Create streams to capture ngrok logs for TUI
41
+ const stdout = new PassThrough();
42
+ const stderr = new PassThrough();
43
+ const listener = await ngrok.default.forward({
44
+ addr: options.port,
45
+ authtoken: options.authtoken,
46
+ domain: options.domain,
47
+ onLogEvent: isTuiMode
48
+ ? (log) => {
49
+ stdout.write(`${log}\n`);
50
+ }
51
+ : undefined,
52
+ });
53
+ // Register ngrok as a service in TUI mode
54
+ if (isTuiMode) {
55
+ const registry = getServiceRegistry();
56
+ if (registry) {
57
+ stdout.write(`Tunnel established: ${listener.url()}\n`);
58
+ registry.register({
59
+ id: 'ngrok',
60
+ displayName: 'ngrok',
61
+ color: 'blue',
62
+ stdout,
63
+ stderr,
64
+ process: process, // ngrok doesn't have a child process, use current process as placeholder
65
+ });
66
+ }
67
+ }
68
+ return {
69
+ url: listener.url(),
70
+ close: async () => {
71
+ stdout.end();
72
+ stderr.end();
73
+ await listener.close();
74
+ },
75
+ };
76
+ }
77
+ catch (error) {
78
+ const message = error instanceof Error ? error.message : String(error);
79
+ throw new Error(`Failed to start ngrok tunnel: ${message}. Set NGROK_AUTHTOKEN env var or tunnel.authtoken in auto.config.ts`);
80
+ }
81
+ }
82
+ //# sourceMappingURL=tunnel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tunnel.js","sourceRoot":"","sources":["../../src/tunnel.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAI1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC;AAExE,MAAM,UAAU,mBAAmB;IACjC,OAAO,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAChD,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,WAAmB;IAC5D,OAAO,CAAC,GAAY,EAAE,GAAa,EAAE,IAAkB,EAAE,EAAE;QACzD,IAAI,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;YACpC,IAAI,EAAE,CAAC;YACP,OAAO;QACT,CAAC;QAED,MAAM,UAAU,GAAG,GAAG,CAAC,OAAO,CAAC,aAAa,CAAC;QAC7C,IAAI,UAAU,KAAK,UAAU,WAAW,EAAE,EAAE,CAAC;YAC3C,IAAI,EAAE,CAAC;YACP,OAAO;QACT,CAAC;QAED,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC,CAAC;IAClD,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,4BAA4B,CAAC,WAAmB;IAC9D,OAAO,CAAC,MAAc,EAAE,IAA2B,EAA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