@kenhkl/agent-gate 0.8.1 → 0.8.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/v1/cli.js CHANGED
@@ -1453,7 +1453,7 @@ var init_version = __esm({
1453
1453
  "src/version.ts"() {
1454
1454
  "use strict";
1455
1455
  init_cjs_shims();
1456
- _version = true ? "0.8.1" : (() => {
1456
+ _version = true ? "0.8.2" : (() => {
1457
1457
  try {
1458
1458
  const require2 = createRequire(importMetaUrl);
1459
1459
  const pkg = require2("../package.json");
@@ -1983,7 +1983,12 @@ function createApp() {
1983
1983
  allowMethods: ["GET", "POST", "OPTIONS", "DELETE"],
1984
1984
  allowHeaders: ["*"]
1985
1985
  }));
1986
- app.use("*", (0, import_logger.logger)());
1986
+ app.use(
1987
+ "*",
1988
+ (0, import_logger.logger)(
1989
+ (str, ...rest) => console.log(str.replace(/([?&]token=)[^&\s"']+/gi, "$1***"), ...rest)
1990
+ )
1991
+ );
1987
1992
  app.use("*", async (c, next) => {
1988
1993
  const path = new URL(c.req.url).pathname;
1989
1994
  const method = c.req.method.toUpperCase();
@@ -2210,7 +2215,10 @@ async function main() {
2210
2215
  const app = createApp2();
2211
2216
  console.log(`AgentGate HTTP server on ${host}:${port}`);
2212
2217
  if (authEnabled2() && authToken2()) {
2213
- console.log(`Dashboard: http://localhost:${port}/dashboard/?token=${authToken2()}`);
2218
+ const dash = `http://localhost:${port}/dashboard/?token=${authToken2()}`;
2219
+ console.log(
2220
+ `Dashboard: ${process.stdout.isTTY ? dash : dash.replace(/([?&]token=)[^&\s"']+/gi, "$1***")}`
2221
+ );
2214
2222
  }
2215
2223
  serve({ fetch: app.fetch, hostname: host, port }, (info) => {
2216
2224
  console.log(`Listening on http://${host}:${port}`);
package/dist/v1/server.js CHANGED
@@ -1343,7 +1343,7 @@ var import_zod = require("zod");
1343
1343
 
1344
1344
  // src/version.ts
1345
1345
  init_cjs_shims();
1346
- var _version = true ? "0.8.1" : (() => {
1346
+ var _version = true ? "0.8.2" : (() => {
1347
1347
  try {
1348
1348
  const require2 = createRequire(importMetaUrl);
1349
1349
  const pkg = require2("../package.json");
@@ -1836,7 +1836,12 @@ function createApp() {
1836
1836
  allowMethods: ["GET", "POST", "OPTIONS", "DELETE"],
1837
1837
  allowHeaders: ["*"]
1838
1838
  }));
1839
- app.use("*", (0, import_logger.logger)());
1839
+ app.use(
1840
+ "*",
1841
+ (0, import_logger.logger)(
1842
+ (str, ...rest) => console.log(str.replace(/([?&]token=)[^&\s"']+/gi, "$1***"), ...rest)
1843
+ )
1844
+ );
1840
1845
  app.use("*", async (c, next) => {
1841
1846
  const path = new URL(c.req.url).pathname;
1842
1847
  const method = c.req.method.toUpperCase();
package/dist/v3/cli.js CHANGED
@@ -50,7 +50,7 @@ var init_version = __esm({
50
50
  "src/version.ts"() {
51
51
  "use strict";
52
52
  init_cjs_shims();
53
- _version = true ? "0.8.1" : (() => {
53
+ _version = true ? "0.8.2" : (() => {
54
54
  try {
55
55
  const require2 = createRequire(importMetaUrl);
56
56
  const pkg = require2("../package.json");
@@ -1986,7 +1986,12 @@ function createApp() {
1986
1986
  allowMethods: ["GET", "POST", "OPTIONS", "DELETE"],
1987
1987
  allowHeaders: ["*"]
1988
1988
  }));
1989
- app.use("*", (0, import_logger.logger)());
1989
+ app.use(
1990
+ "*",
1991
+ (0, import_logger.logger)(
1992
+ (str, ...rest) => console.log(str.replace(/([?&]token=)[^&\s"']+/gi, "$1***"), ...rest)
1993
+ )
1994
+ );
1990
1995
  app.use("*", async (c, next) => {
1991
1996
  const path11 = new URL(c.req.url).pathname;
1992
1997
  const method = c.req.method.toUpperCase();
@@ -34174,7 +34179,10 @@ Run options:
34174
34179
  const app = createApp2();
34175
34180
  console.log(`AgentGate HTTP server on ${host}:${port}`);
34176
34181
  if (authEnabled2() && authToken2()) {
34177
- console.log(`Dashboard: http://localhost:${port}/dashboard/?token=${authToken2()}`);
34182
+ const dash = `http://localhost:${port}/dashboard/?token=${authToken2()}`;
34183
+ console.log(
34184
+ `Dashboard: ${process.stdout.isTTY ? dash : dash.replace(/([?&]token=)[^&\s"']+/gi, "$1***")}`
34185
+ );
34178
34186
  }
34179
34187
  serve({ fetch: app.fetch, hostname: host, port }, (info) => {
34180
34188
  console.log(`Listening on http://${host}:${port}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kenhkl/agent-gate",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "description": "AI Agent data collection & security analysis gateway (TypeScript)",
5
5
  "main": "dist/v1/server.js",
6
6
  "bin": {