@agent-team-foundation/first-tree-hub 0.9.3 → 0.9.6
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/{bootstrap-CWcBzk6C.mjs → bootstrap-DWifXj9b.mjs} +5 -5
- package/dist/cli/index.mjs +193 -171
- package/dist/{core-Y7M3d2aZ.mjs → core-USyOOh7y.mjs} +641 -2969
- package/dist/index.mjs +4 -4
- package/dist/{logger-core-2yeIU1fc-B-__AsQO.mjs → logger-core-BTmvdflj-DhdipBkV.mjs} +40 -5
- package/dist/{observability-CJzDFY_G-CmvgUuzc.mjs → observability-DV_fQKqV-CuLWzBxQ.mjs} +8 -3
- package/dist/{observability-Xi-sEZI7.mjs → observability-hDEdrmMS.mjs} +2 -2
- package/dist/web/assets/index-CzlAfdgm.js +361 -0
- package/dist/web/assets/index-DEwlT6PE.css +1 -0
- package/dist/web/fonts/inter-latin-ext.woff2 +0 -0
- package/dist/web/fonts/inter-latin.woff2 +0 -0
- package/dist/web/fonts/jetbrains-mono-latin-ext.woff2 +0 -0
- package/dist/web/fonts/jetbrains-mono-latin.woff2 +0 -0
- package/dist/web/index.html +4 -2
- package/package.json +1 -1
- package/dist/web/assets/geist-cyrillic-wght-normal-CHSlOQsW.woff2 +0 -0
- package/dist/web/assets/geist-latin-ext-wght-normal-DMtmJ5ZE.woff2 +0 -0
- package/dist/web/assets/geist-latin-wght-normal-Dm3htQBi.woff2 +0 -0
- package/dist/web/assets/geist-mono-cyrillic-wght-normal-BZdD_g9V.woff2 +0 -0
- package/dist/web/assets/geist-mono-latin-ext-wght-normal-b6lpi8_2.woff2 +0 -0
- package/dist/web/assets/geist-mono-latin-wght-normal-Cjtb1TV-.woff2 +0 -0
- package/dist/web/assets/index-C3GFm5oL.js +0 -361
- package/dist/web/assets/index-DEbM78Bl.css +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import {
|
|
3
|
-
import "./
|
|
4
|
-
import {
|
|
1
|
+
import "./observability-DV_fQKqV-CuLWzBxQ.mjs";
|
|
2
|
+
import { A as checkServerHealth, B as blank, C as runMigrations, D as checkDocker, E as checkDatabase, F as isDockerAvailable, G as SdkError, I as stopPostgres, L as ClientRuntime, M as checkWebSocket, N as printResults, O as checkNodeVersion, P as ensurePostgres, R as createOwner, S as uninstallClientService, T as checkClientConfig, U as status, W as FirstTreeHubSDK, _ as runHomeMigration, b as isServiceSupported, d as promptMissingFields, f as formatCheckReport, h as onboardCreate, j as checkServerReachable, k as checkServerConfig, l as isInteractive, m as onboardCheck, s as startServer, u as promptAddAgent, v as getClientServiceStatus, w as checkAgentConfigs, x as resolveCliInvocation, y as installClientService, z as hasUser } from "./core-USyOOh7y.mjs";
|
|
3
|
+
import "./logger-core-BTmvdflj-DhdipBkV.mjs";
|
|
4
|
+
import { a as resolveAccessToken, n as ensureFreshAccessToken, o as resolveServerUrl, r as ensureFreshAdminToken } from "./bootstrap-DWifXj9b.mjs";
|
|
5
5
|
import { n as bindFeishuUser, t as bindFeishuBot } from "./feishu-GlaczcVf.mjs";
|
|
6
6
|
export { ClientRuntime, FirstTreeHubSDK, SdkError, bindFeishuBot, bindFeishuUser, blank, checkAgentConfigs, checkClientConfig, checkDatabase, checkDocker, checkNodeVersion, checkServerConfig, checkServerHealth, checkServerReachable, checkWebSocket, createOwner, ensureFreshAccessToken, ensureFreshAdminToken, ensurePostgres, formatCheckReport, getClientServiceStatus, hasUser, installClientService, isDockerAvailable, isInteractive, isServiceSupported, onboardCheck, onboardCreate, printResults, promptAddAgent, promptMissingFields, resolveAccessToken, resolveCliInvocation, resolveServerUrl, runHomeMigration, runMigrations, startServer, status, stopPostgres, uninstallClientService };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { Writable } from "node:stream";
|
|
3
|
-
//#region ../shared/dist/logger-core-
|
|
3
|
+
//#region ../shared/dist/logger-core-BTmvdflj.mjs
|
|
4
4
|
/**
|
|
5
5
|
* Logger core — format / level primitives shared between server and client.
|
|
6
6
|
*
|
|
@@ -66,6 +66,39 @@ const SKIP_KEYS = new Set([
|
|
|
66
66
|
"hostname",
|
|
67
67
|
"v"
|
|
68
68
|
]);
|
|
69
|
+
/**
|
|
70
|
+
* Pino `redact.paths` entries applied to every root logger in Hub. Keeps the
|
|
71
|
+
* list short on purpose — pino's redact walks each path on every log call, so
|
|
72
|
+
* we target obvious sensitive field names plus a narrow set of nested forms
|
|
73
|
+
* (`*.foo` matches a single nesting level in pino v9).
|
|
74
|
+
*
|
|
75
|
+
* Values matching these paths are replaced with the censor string `[REDACTED]`.
|
|
76
|
+
*/
|
|
77
|
+
const LOG_REDACT_PATHS = [
|
|
78
|
+
"password",
|
|
79
|
+
"*.password",
|
|
80
|
+
"token",
|
|
81
|
+
"*.token",
|
|
82
|
+
"accessToken",
|
|
83
|
+
"*.accessToken",
|
|
84
|
+
"refreshToken",
|
|
85
|
+
"*.refreshToken",
|
|
86
|
+
"jwt",
|
|
87
|
+
"*.jwt",
|
|
88
|
+
"secret",
|
|
89
|
+
"*.secret",
|
|
90
|
+
"apiKey",
|
|
91
|
+
"*.apiKey",
|
|
92
|
+
"api_key",
|
|
93
|
+
"*.api_key",
|
|
94
|
+
"credentials",
|
|
95
|
+
"*.credentials",
|
|
96
|
+
"authorization",
|
|
97
|
+
"*.authorization",
|
|
98
|
+
"*.headers.cookie",
|
|
99
|
+
"*.headers.authorization"
|
|
100
|
+
];
|
|
101
|
+
const LOG_REDACT_CENSOR = "[REDACTED]";
|
|
69
102
|
function formatPrettyEntry(json) {
|
|
70
103
|
const obj = JSON.parse(json);
|
|
71
104
|
const level = obj.level;
|
|
@@ -92,20 +125,22 @@ function formatLocalTime() {
|
|
|
92
125
|
return `${d.toLocaleDateString("sv-SE")} ${d.toLocaleTimeString("en-GB", { hour12: false })}`;
|
|
93
126
|
}
|
|
94
127
|
function createLoggerOutputStream(options) {
|
|
128
|
+
const getDest = options.getDestination ?? (() => process.stderr);
|
|
95
129
|
return new Writable({ write(chunk, _, callback) {
|
|
96
130
|
const text = chunk.toString();
|
|
131
|
+
const dest = getDest();
|
|
97
132
|
try {
|
|
98
|
-
if (options.getFormat() === "pretty")
|
|
99
|
-
else
|
|
133
|
+
if (options.getFormat() === "pretty") dest.write(formatPrettyEntry(text));
|
|
134
|
+
else dest.write(text);
|
|
100
135
|
if (options.onJsonEntry) try {
|
|
101
136
|
const obj = JSON.parse(text);
|
|
102
137
|
options.onJsonEntry(obj);
|
|
103
138
|
} catch {}
|
|
104
139
|
} catch {
|
|
105
|
-
|
|
140
|
+
dest.write(text);
|
|
106
141
|
}
|
|
107
142
|
callback();
|
|
108
143
|
} });
|
|
109
144
|
}
|
|
110
145
|
//#endregion
|
|
111
|
-
export {
|
|
146
|
+
export { createLoggerOutputStream as a, logFormatSchema as c, SKIP_KEYS as i, logLevelSchema as l, LOG_REDACT_CENSOR as n, formatLocalTime as o, LOG_REDACT_PATHS as r, formatPrettyEntry as s, LOG_LEVELS as t, parseLogLevel as u };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { a as diag, d as __exportAll, f as __require, l as __commonJSMin, m as __toESM, n as init_esm$2, o as context, p as __toCommonJS, r as trace, s as SpanStatusCode, t as esm_exports$2, u as __esmMin } from "./esm-CYu4tXXn.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { a as createLoggerOutputStream, i as SKIP_KEYS, n as LOG_REDACT_CENSOR, o as formatLocalTime, r as LOG_REDACT_PATHS, u as parseLogLevel } from "./logger-core-BTmvdflj-DhdipBkV.mjs";
|
|
3
|
+
import { Writable } from "node:stream";
|
|
3
4
|
import * as fs from "fs";
|
|
4
5
|
import * as path from "path";
|
|
5
6
|
import * as zlib from "zlib";
|
|
@@ -33466,7 +33467,7 @@ var require_src = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
33466
33467
|
});
|
|
33467
33468
|
}));
|
|
33468
33469
|
//#endregion
|
|
33469
|
-
//#region ../server/dist/observability-
|
|
33470
|
+
//#region ../server/dist/observability-DV_fQKqV.mjs
|
|
33470
33471
|
var import_pino = /* @__PURE__ */ __toESM(require_pino(), 1);
|
|
33471
33472
|
var import_otel = /* @__PURE__ */ __toESM(require_otel(), 1);
|
|
33472
33473
|
init_esm$2();
|
|
@@ -33540,7 +33541,11 @@ const outputStream = createLoggerOutputStream({
|
|
|
33540
33541
|
});
|
|
33541
33542
|
const rootLogger = (0, import_pino.default)({
|
|
33542
33543
|
level: _level,
|
|
33543
|
-
timestamp: () => `,"time":"${formatLocalTime()}"
|
|
33544
|
+
timestamp: () => `,"time":"${formatLocalTime()}"`,
|
|
33545
|
+
redact: {
|
|
33546
|
+
paths: [...LOG_REDACT_PATHS],
|
|
33547
|
+
censor: LOG_REDACT_CENSOR
|
|
33548
|
+
}
|
|
33544
33549
|
}, outputStream);
|
|
33545
33550
|
if (initialLevel.fellBack) rootLogger.warn({ envValue: process.env.FIRST_TREE_HUB_LOG_LEVEL }, "invalid FIRST_TREE_HUB_LOG_LEVEL; falling back to info");
|
|
33546
33551
|
/** Create a module-scoped child logger. Module name is shown as `[Module]` in pretty output. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "./esm-CYu4tXXn.mjs";
|
|
2
|
-
import "./
|
|
3
|
-
import
|
|
2
|
+
import { m as shutdownTelemetry, s as initTelemetry } from "./observability-DV_fQKqV-CuLWzBxQ.mjs";
|
|
3
|
+
import "./logger-core-BTmvdflj-DhdipBkV.mjs";
|
|
4
4
|
export { initTelemetry, shutdownTelemetry };
|