@solongate/proxy 0.81.51 → 0.81.52

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/index.js CHANGED
@@ -12599,6 +12599,28 @@ function fileInfo(dir) {
12599
12599
  }
12600
12600
  async function runLogsServer() {
12601
12601
  const argv = process.argv.slice(3);
12602
+ const verb = argv[0];
12603
+ if (verb === "start" || verb === "stop" || verb === "status") {
12604
+ const d = await Promise.resolve().then(() => (init_logs_server_daemon(), logs_server_daemon_exports));
12605
+ if (verb === "start") {
12606
+ d.startLogsServerDaemon();
12607
+ await new Promise((r) => setTimeout(r, 800));
12608
+ const st = d.logsServerStatus();
12609
+ process.stdout.write(
12610
+ st.running ? `[SolonGate] Local logs service running on http://127.0.0.1:${st.port} \u2014 background service, survives closing this terminal. Disable: solongate logs-server stop
12611
+ ` : `[SolonGate] Could not start the local logs service \u2014 see ~/.solongate/logs-server.log
12612
+ `
12613
+ );
12614
+ } else if (verb === "stop") {
12615
+ d.stopLogsServerDaemon();
12616
+ process.stdout.write("[SolonGate] Local logs service stopped and disabled (re-enable from the dataroom Settings or with `solongate logs-server start`).\n");
12617
+ } else {
12618
+ const st = d.logsServerStatus();
12619
+ process.stdout.write(`[SolonGate] Local logs service: ${st.running ? `running on http://127.0.0.1:${st.port} (pid ${st.pid})` : "stopped"} \xB7 desired ${st.desired}
12620
+ `);
12621
+ }
12622
+ return;
12623
+ }
12602
12624
  const portArg = argv[argv.indexOf("--port") + 1];
12603
12625
  const port = Number(process.env.SOLONGATE_LOGS_PORT || (argv.includes("--port") ? portArg : "") || DEFAULT_PORT) || DEFAULT_PORT;
12604
12626
  const server = createServer2(async (req, res) => {
@@ -187,6 +187,28 @@ function fileInfo(dir) {
187
187
  }
188
188
  async function runLogsServer() {
189
189
  const argv = process.argv.slice(3);
190
+ const verb = argv[0];
191
+ if (verb === "start" || verb === "stop" || verb === "status") {
192
+ const d = await Promise.resolve().then(() => (init_logs_server_daemon(), logs_server_daemon_exports));
193
+ if (verb === "start") {
194
+ d.startLogsServerDaemon();
195
+ await new Promise((r) => setTimeout(r, 800));
196
+ const st = d.logsServerStatus();
197
+ process.stdout.write(
198
+ st.running ? `[SolonGate] Local logs service running on http://127.0.0.1:${st.port} \u2014 background service, survives closing this terminal. Disable: solongate logs-server stop
199
+ ` : `[SolonGate] Could not start the local logs service \u2014 see ~/.solongate/logs-server.log
200
+ `
201
+ );
202
+ } else if (verb === "stop") {
203
+ d.stopLogsServerDaemon();
204
+ process.stdout.write("[SolonGate] Local logs service stopped and disabled (re-enable from the dataroom Settings or with `solongate logs-server start`).\n");
205
+ } else {
206
+ const st = d.logsServerStatus();
207
+ process.stdout.write(`[SolonGate] Local logs service: ${st.running ? `running on http://127.0.0.1:${st.port} (pid ${st.pid})` : "stopped"} \xB7 desired ${st.desired}
208
+ `);
209
+ }
210
+ return;
211
+ }
190
212
  const portArg = argv[argv.indexOf("--port") + 1];
191
213
  const port = Number(process.env.SOLONGATE_LOGS_PORT || (argv.includes("--port") ? portArg : "") || DEFAULT_PORT) || DEFAULT_PORT;
192
214
  const server = createServer(async (req, res) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solongate/proxy",
3
- "version": "0.81.51",
3
+ "version": "0.81.52",
4
4
  "description": "AI tool security proxy: protect any AI tool server with customizable policies, path/command constraints, rate limiting, and audit logging. No code changes required.",
5
5
  "type": "module",
6
6
  "bin": {