@hiai-gg/docsmint 2.1.3 → 2.1.5
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/README.md +8 -2
- package/dist/backend/index.js +225 -45
- package/dist/mcp-cli.js +1 -1
- package/dist/mcp-server.js +1 -1
- package/package.json +1 -1
- package/packages/cli/src/index.ts +1 -1
- package/server.json +2 -2
package/README.md
CHANGED
|
@@ -84,9 +84,15 @@ is a separate listing.
|
|
|
84
84
|
- **Choose how you run it.** Use [managed DocsMint](https://docsmint.com) or
|
|
85
85
|
self-host the application, database, search, queues, and files.
|
|
86
86
|
|
|
87
|
-
##
|
|
87
|
+
## Integration diagnostics
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
REST and HTTP MCP responses include a server-issued request ID in the
|
|
90
|
+
X-Request-ID header. Include that ID when reporting a failed request.
|
|
91
|
+
See the [2.1.5 release notes](docs/release/v2.1.5-notes.md).
|
|
92
|
+
|
|
93
|
+
## Document version patch 2.1.4
|
|
94
|
+
|
|
95
|
+
Preview and restore historical content without reloading the editor. See [2.1.4 release notes](docs/release/v2.1.4-notes.md).
|
|
90
96
|
|
|
91
97
|
## Security patch 2.1.1
|
|
92
98
|
|
package/dist/backend/index.js
CHANGED
|
@@ -3,6 +3,7 @@ var __create = Object.create;
|
|
|
3
3
|
var __getProtoOf = Object.getPrototypeOf;
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
8
|
function __accessProp(key) {
|
|
8
9
|
return this[key];
|
|
@@ -31,6 +32,23 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
31
32
|
cache.set(mod, to);
|
|
32
33
|
return to;
|
|
33
34
|
};
|
|
35
|
+
var __toCommonJS = (from) => {
|
|
36
|
+
var entry = (__moduleCache ??= new WeakMap).get(from), desc;
|
|
37
|
+
if (entry)
|
|
38
|
+
return entry;
|
|
39
|
+
entry = __defProp({}, "__esModule", { value: true });
|
|
40
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
41
|
+
for (var key of __getOwnPropNames(from))
|
|
42
|
+
if (!__hasOwnProp.call(entry, key))
|
|
43
|
+
__defProp(entry, key, {
|
|
44
|
+
get: __accessProp.bind(from, key),
|
|
45
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
__moduleCache.set(from, entry);
|
|
49
|
+
return entry;
|
|
50
|
+
};
|
|
51
|
+
var __moduleCache;
|
|
34
52
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
35
53
|
var __returnValue = (v) => v;
|
|
36
54
|
function __exportSetter(name, newValue) {
|
|
@@ -34846,6 +34864,153 @@ var require_browser = __commonJS(function(exports2, module2) {
|
|
|
34846
34864
|
};
|
|
34847
34865
|
});
|
|
34848
34866
|
|
|
34867
|
+
// ../../node_modules/.bun/supports-color@10.2.2/node_modules/supports-color/index.js
|
|
34868
|
+
var exports_supports_color = {};
|
|
34869
|
+
__export(exports_supports_color, {
|
|
34870
|
+
createSupportsColor: () => createSupportsColor,
|
|
34871
|
+
default: () => supports_color_default
|
|
34872
|
+
});
|
|
34873
|
+
import process2 from "process";
|
|
34874
|
+
import os2 from "os";
|
|
34875
|
+
import tty from "tty";
|
|
34876
|
+
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process2.argv) {
|
|
34877
|
+
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
34878
|
+
const position = argv.indexOf(prefix + flag);
|
|
34879
|
+
const terminatorPosition = argv.indexOf("--");
|
|
34880
|
+
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
34881
|
+
}
|
|
34882
|
+
function envForceColor() {
|
|
34883
|
+
if (!("FORCE_COLOR" in env3)) {
|
|
34884
|
+
return;
|
|
34885
|
+
}
|
|
34886
|
+
if (env3.FORCE_COLOR === "true") {
|
|
34887
|
+
return 1;
|
|
34888
|
+
}
|
|
34889
|
+
if (env3.FORCE_COLOR === "false") {
|
|
34890
|
+
return 0;
|
|
34891
|
+
}
|
|
34892
|
+
if (env3.FORCE_COLOR.length === 0) {
|
|
34893
|
+
return 1;
|
|
34894
|
+
}
|
|
34895
|
+
const level = Math.min(Number.parseInt(env3.FORCE_COLOR, 10), 3);
|
|
34896
|
+
if (![0, 1, 2, 3].includes(level)) {
|
|
34897
|
+
return;
|
|
34898
|
+
}
|
|
34899
|
+
return level;
|
|
34900
|
+
}
|
|
34901
|
+
function translateLevel(level) {
|
|
34902
|
+
if (level === 0) {
|
|
34903
|
+
return false;
|
|
34904
|
+
}
|
|
34905
|
+
return {
|
|
34906
|
+
level,
|
|
34907
|
+
hasBasic: true,
|
|
34908
|
+
has256: level >= 2,
|
|
34909
|
+
has16m: level >= 3
|
|
34910
|
+
};
|
|
34911
|
+
}
|
|
34912
|
+
function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
34913
|
+
const noFlagForceColor = envForceColor();
|
|
34914
|
+
if (noFlagForceColor !== undefined) {
|
|
34915
|
+
flagForceColor = noFlagForceColor;
|
|
34916
|
+
}
|
|
34917
|
+
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
34918
|
+
if (forceColor === 0) {
|
|
34919
|
+
return 0;
|
|
34920
|
+
}
|
|
34921
|
+
if (sniffFlags) {
|
|
34922
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
34923
|
+
return 3;
|
|
34924
|
+
}
|
|
34925
|
+
if (hasFlag("color=256")) {
|
|
34926
|
+
return 2;
|
|
34927
|
+
}
|
|
34928
|
+
}
|
|
34929
|
+
if ("TF_BUILD" in env3 && "AGENT_NAME" in env3) {
|
|
34930
|
+
return 1;
|
|
34931
|
+
}
|
|
34932
|
+
if (haveStream && !streamIsTTY && forceColor === undefined) {
|
|
34933
|
+
return 0;
|
|
34934
|
+
}
|
|
34935
|
+
const min = forceColor || 0;
|
|
34936
|
+
if (env3.TERM === "dumb") {
|
|
34937
|
+
return min;
|
|
34938
|
+
}
|
|
34939
|
+
if (process2.platform === "win32") {
|
|
34940
|
+
const osRelease = os2.release().split(".");
|
|
34941
|
+
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
34942
|
+
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
34943
|
+
}
|
|
34944
|
+
return 1;
|
|
34945
|
+
}
|
|
34946
|
+
if ("CI" in env3) {
|
|
34947
|
+
if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => (key in env3))) {
|
|
34948
|
+
return 3;
|
|
34949
|
+
}
|
|
34950
|
+
if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => (sign in env3)) || env3.CI_NAME === "codeship") {
|
|
34951
|
+
return 1;
|
|
34952
|
+
}
|
|
34953
|
+
return min;
|
|
34954
|
+
}
|
|
34955
|
+
if ("TEAMCITY_VERSION" in env3) {
|
|
34956
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env3.TEAMCITY_VERSION) ? 1 : 0;
|
|
34957
|
+
}
|
|
34958
|
+
if (env3.COLORTERM === "truecolor") {
|
|
34959
|
+
return 3;
|
|
34960
|
+
}
|
|
34961
|
+
if (env3.TERM === "xterm-kitty") {
|
|
34962
|
+
return 3;
|
|
34963
|
+
}
|
|
34964
|
+
if (env3.TERM === "xterm-ghostty") {
|
|
34965
|
+
return 3;
|
|
34966
|
+
}
|
|
34967
|
+
if (env3.TERM === "wezterm") {
|
|
34968
|
+
return 3;
|
|
34969
|
+
}
|
|
34970
|
+
if ("TERM_PROGRAM" in env3) {
|
|
34971
|
+
const version = Number.parseInt((env3.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
34972
|
+
switch (env3.TERM_PROGRAM) {
|
|
34973
|
+
case "iTerm.app": {
|
|
34974
|
+
return version >= 3 ? 3 : 2;
|
|
34975
|
+
}
|
|
34976
|
+
case "Apple_Terminal": {
|
|
34977
|
+
return 2;
|
|
34978
|
+
}
|
|
34979
|
+
}
|
|
34980
|
+
}
|
|
34981
|
+
if (/-256(color)?$/i.test(env3.TERM)) {
|
|
34982
|
+
return 2;
|
|
34983
|
+
}
|
|
34984
|
+
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env3.TERM)) {
|
|
34985
|
+
return 1;
|
|
34986
|
+
}
|
|
34987
|
+
if ("COLORTERM" in env3) {
|
|
34988
|
+
return 1;
|
|
34989
|
+
}
|
|
34990
|
+
return min;
|
|
34991
|
+
}
|
|
34992
|
+
function createSupportsColor(stream, options = {}) {
|
|
34993
|
+
const level = _supportsColor(stream, {
|
|
34994
|
+
streamIsTTY: stream && stream.isTTY,
|
|
34995
|
+
...options
|
|
34996
|
+
});
|
|
34997
|
+
return translateLevel(level);
|
|
34998
|
+
}
|
|
34999
|
+
var env3, flagForceColor, supportsColor, supports_color_default;
|
|
35000
|
+
var init_supports_color = __esm(() => {
|
|
35001
|
+
({ env: env3 } = process2);
|
|
35002
|
+
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
35003
|
+
flagForceColor = 0;
|
|
35004
|
+
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
35005
|
+
flagForceColor = 1;
|
|
35006
|
+
}
|
|
35007
|
+
supportsColor = {
|
|
35008
|
+
stdout: createSupportsColor({ isTTY: tty.isatty(1) }),
|
|
35009
|
+
stderr: createSupportsColor({ isTTY: tty.isatty(2) })
|
|
35010
|
+
};
|
|
35011
|
+
supports_color_default = supportsColor;
|
|
35012
|
+
});
|
|
35013
|
+
|
|
34849
35014
|
// ../../node_modules/.bun/debug@4.4.3/node_modules/debug/src/node.js
|
|
34850
35015
|
var require_node = __commonJS(function(exports2, module2) {
|
|
34851
35016
|
var tty = __require("tty");
|
|
@@ -34859,7 +35024,7 @@ var require_node = __commonJS(function(exports2, module2) {
|
|
|
34859
35024
|
exports2.destroy = util.deprecate(() => {}, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
34860
35025
|
exports2.colors = [6, 2, 3, 4, 5, 1];
|
|
34861
35026
|
try {
|
|
34862
|
-
const supportsColor = (()
|
|
35027
|
+
const supportsColor = (init_supports_color(), __toCommonJS(exports_supports_color));
|
|
34863
35028
|
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
|
|
34864
35029
|
exports2.colors = [
|
|
34865
35030
|
20,
|
|
@@ -51473,10 +51638,10 @@ function getBooleanEnvVar(key, fallback = true) {
|
|
|
51473
51638
|
return fallback;
|
|
51474
51639
|
return value !== "0" && value.toLowerCase() !== "false" && value !== "";
|
|
51475
51640
|
}
|
|
51476
|
-
var _envShim, _getEnv = (useShim) => globalThis.process?.env || globalThis.Deno?.env.toObject() || globalThis.__env__ || (useShim ? _envShim : globalThis),
|
|
51641
|
+
var _envShim, _getEnv = (useShim) => globalThis.process?.env || globalThis.Deno?.env.toObject() || globalThis.__env__ || (useShim ? _envShim : globalThis), env5, nodeENV, isProduction2, isDevelopment = () => nodeENV === "dev" || nodeENV === "development", isTest = () => nodeENV === "test" || toBoolean(env5.TEST), ENV;
|
|
51477
51642
|
var init_env_impl = __esm(() => {
|
|
51478
51643
|
_envShim = Object.create(null);
|
|
51479
|
-
|
|
51644
|
+
env5 = new Proxy(_envShim, {
|
|
51480
51645
|
get(_, prop) {
|
|
51481
51646
|
return _getEnv()[prop] ?? _envShim[prop];
|
|
51482
51647
|
},
|
|
@@ -51500,7 +51665,7 @@ var init_env_impl = __esm(() => {
|
|
|
51500
51665
|
return Object.keys(env2);
|
|
51501
51666
|
}
|
|
51502
51667
|
});
|
|
51503
|
-
nodeENV =
|
|
51668
|
+
nodeENV = env5.NODE_ENV ?? "";
|
|
51504
51669
|
isProduction2 = nodeENV === "production";
|
|
51505
51670
|
ENV = Object.freeze({
|
|
51506
51671
|
get BETTER_AUTH_SECRET() {
|
|
@@ -51546,17 +51711,17 @@ function getColorDepth() {
|
|
|
51546
51711
|
return COLORS_2;
|
|
51547
51712
|
if (getEnvVar("TMUX"))
|
|
51548
51713
|
return COLORS_16m;
|
|
51549
|
-
if ("TF_BUILD" in
|
|
51714
|
+
if ("TF_BUILD" in env5 && "AGENT_NAME" in env5)
|
|
51550
51715
|
return COLORS_16;
|
|
51551
|
-
if ("CI" in
|
|
51716
|
+
if ("CI" in env5) {
|
|
51552
51717
|
for (const { 0: envName, 1: colors } of CI_ENVS_MAP)
|
|
51553
|
-
if (envName in
|
|
51718
|
+
if (envName in env5)
|
|
51554
51719
|
return colors;
|
|
51555
51720
|
if (getEnvVar("CI_NAME") === "codeship")
|
|
51556
51721
|
return COLORS_256;
|
|
51557
51722
|
return COLORS_2;
|
|
51558
51723
|
}
|
|
51559
|
-
if ("TEAMCITY_VERSION" in
|
|
51724
|
+
if ("TEAMCITY_VERSION" in env5)
|
|
51560
51725
|
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.exec(getEnvVar("TEAMCITY_VERSION")) !== null ? COLORS_16 : COLORS_2;
|
|
51561
51726
|
switch (getEnvVar("TERM_PROGRAM")) {
|
|
51562
51727
|
case "iTerm.app":
|
|
@@ -152225,7 +152390,7 @@ for(const [k,v] of c.request.headers.entries())c.headers[k]=v
|
|
|
152225
152390
|
};
|
|
152226
152391
|
|
|
152227
152392
|
// ../../node_modules/.bun/elysia@1.4.30+867b8e1835835193/node_modules/elysia/dist/universal/env.mjs
|
|
152228
|
-
var
|
|
152393
|
+
var env4 = isBun ? Bun.env : typeof process < "u" && process?.env ? process.env : {};
|
|
152229
152394
|
|
|
152230
152395
|
// ../../node_modules/.bun/elysia@1.4.30+867b8e1835835193/node_modules/elysia/dist/dynamic-handle.mjs
|
|
152231
152396
|
var ARRAY_INDEX_REGEX = /^(.+)\[(\d+)\]$/;
|
|
@@ -152787,7 +152952,7 @@ var _Elysia = class _Elysia {
|
|
|
152787
152952
|
config.tags && (config.detail ? config.detail.tags = config.tags : config.detail = {
|
|
152788
152953
|
tags: config.tags
|
|
152789
152954
|
}), this.config = {
|
|
152790
|
-
aot:
|
|
152955
|
+
aot: env4.ELYSIA_AOT !== "false",
|
|
152791
152956
|
nativeStaticResponse: true,
|
|
152792
152957
|
encodeSchema: true,
|
|
152793
152958
|
normalize: true,
|
|
@@ -152827,7 +152992,7 @@ var _Elysia = class _Elysia {
|
|
|
152827
152992
|
get promisedModules() {
|
|
152828
152993
|
return this._promisedModules || (this._promisedModules = new PromiseGroup(console.error, () => {})), this._promisedModules;
|
|
152829
152994
|
}
|
|
152830
|
-
env(model, _env =
|
|
152995
|
+
env(model, _env = env4) {
|
|
152831
152996
|
if (getSchemaValidator(model, {
|
|
152832
152997
|
modules: this.definitions.typebox,
|
|
152833
152998
|
dynamic: true,
|
|
@@ -156309,7 +156474,7 @@ init_drizzle_orm();
|
|
|
156309
156474
|
init_schema2();
|
|
156310
156475
|
|
|
156311
156476
|
// ../../node_modules/.bun/postgres@3.4.9/node_modules/postgres/src/index.js
|
|
156312
|
-
import
|
|
156477
|
+
import os3 from "os";
|
|
156313
156478
|
import fs3 from "fs";
|
|
156314
156479
|
|
|
156315
156480
|
// ../../node_modules/.bun/postgres@3.4.9/node_modules/postgres/src/query.js
|
|
@@ -158272,7 +158437,7 @@ function parseUrl4(url) {
|
|
|
158272
158437
|
}
|
|
158273
158438
|
function osUsername() {
|
|
158274
158439
|
try {
|
|
158275
|
-
return
|
|
158440
|
+
return os3.userInfo().username;
|
|
158276
158441
|
} catch (_) {
|
|
158277
158442
|
return process.env.USERNAME || process.env.USER || process.env.LOGNAME;
|
|
158278
158443
|
}
|
|
@@ -160595,7 +160760,7 @@ function getBaseURL(url, path, request, loadEnv, trustedProxyHeaders) {
|
|
|
160595
160760
|
if (url)
|
|
160596
160761
|
return withPath(url, path);
|
|
160597
160762
|
if (loadEnv !== false) {
|
|
160598
|
-
const fromEnv =
|
|
160763
|
+
const fromEnv = env5.BETTER_AUTH_URL || env5.NEXT_PUBLIC_BETTER_AUTH_URL || env5.PUBLIC_BETTER_AUTH_URL || env5.NUXT_PUBLIC_BETTER_AUTH_URL || env5.NUXT_PUBLIC_AUTH_URL || (env5.BASE_URL !== "/" ? env5.BASE_URL : undefined);
|
|
160599
160764
|
if (fromEnv)
|
|
160600
160765
|
return withPath(fromEnv, path);
|
|
160601
160766
|
}
|
|
@@ -168118,7 +168283,7 @@ async function getTrustedOrigins(options, request) {
|
|
|
168118
168283
|
trustedOrigins.push(...validOrigins);
|
|
168119
168284
|
}
|
|
168120
168285
|
}
|
|
168121
|
-
const envTrustedOrigins =
|
|
168286
|
+
const envTrustedOrigins = env5.BETTER_AUTH_TRUSTED_ORIGINS;
|
|
168122
168287
|
if (envTrustedOrigins)
|
|
168123
168288
|
trustedOrigins.push(...envTrustedOrigins.split(","));
|
|
168124
168289
|
return trustedOrigins.filter((v) => Boolean(v));
|
|
@@ -178431,7 +178596,7 @@ init_internal();
|
|
|
178431
178596
|
init_env();
|
|
178432
178597
|
import fs4 from "fs";
|
|
178433
178598
|
import fsPromises2 from "fs/promises";
|
|
178434
|
-
import
|
|
178599
|
+
import os4 from "os";
|
|
178435
178600
|
import path from "path";
|
|
178436
178601
|
init_base64();
|
|
178437
178602
|
init_random();
|
|
@@ -178623,7 +178788,7 @@ async function getTelemetryAuthConfig(options, context) {
|
|
|
178623
178788
|
};
|
|
178624
178789
|
}
|
|
178625
178790
|
function detectPackageManager() {
|
|
178626
|
-
const userAgent =
|
|
178791
|
+
const userAgent = env5.npm_config_user_agent;
|
|
178627
178792
|
if (!userAgent)
|
|
178628
178793
|
return;
|
|
178629
178794
|
const pmSpec = userAgent.split(" ")[0];
|
|
@@ -178635,7 +178800,7 @@ function detectPackageManager() {
|
|
|
178635
178800
|
};
|
|
178636
178801
|
}
|
|
178637
178802
|
function isCI() {
|
|
178638
|
-
return
|
|
178803
|
+
return env5.CI !== "false" && (("BUILD_ID" in env5) || ("BUILD_NUMBER" in env5) || ("CI" in env5) || ("CI_APP_ID" in env5) || ("CI_BUILD_ID" in env5) || ("CI_BUILD_NUMBER" in env5) || ("CI_NAME" in env5) || ("CONTINUOUS_INTEGRATION" in env5) || ("RUN_ID" in env5));
|
|
178639
178804
|
}
|
|
178640
178805
|
function detectRuntime() {
|
|
178641
178806
|
if (typeof Deno !== "undefined")
|
|
@@ -178709,16 +178874,16 @@ async function getNameFromLocalPackageJson() {
|
|
|
178709
178874
|
}
|
|
178710
178875
|
async function detectSystemInfo() {
|
|
178711
178876
|
try {
|
|
178712
|
-
const cpus =
|
|
178877
|
+
const cpus = os4.cpus();
|
|
178713
178878
|
return {
|
|
178714
178879
|
deploymentVendor: getVendor(),
|
|
178715
|
-
systemPlatform:
|
|
178716
|
-
systemRelease:
|
|
178717
|
-
systemArchitecture:
|
|
178880
|
+
systemPlatform: os4.platform(),
|
|
178881
|
+
systemRelease: os4.release(),
|
|
178882
|
+
systemArchitecture: os4.arch(),
|
|
178718
178883
|
cpuCount: cpus.length,
|
|
178719
178884
|
cpuModel: cpus.length ? cpus[0].model : null,
|
|
178720
178885
|
cpuSpeed: cpus.length ? cpus[0].speed : null,
|
|
178721
|
-
memory:
|
|
178886
|
+
memory: os4.totalmem(),
|
|
178722
178887
|
isWSL: await isWsl(),
|
|
178723
178888
|
isDocker: await isDocker(),
|
|
178724
178889
|
isTTY: process.stdout ? process.stdout.isTTY : null
|
|
@@ -178808,7 +178973,7 @@ async function isWsl() {
|
|
|
178808
178973
|
try {
|
|
178809
178974
|
if (process.platform !== "linux")
|
|
178810
178975
|
return false;
|
|
178811
|
-
if (
|
|
178976
|
+
if (os4.release().toLowerCase().includes("microsoft")) {
|
|
178812
178977
|
if (await isInsideContainer())
|
|
178813
178978
|
return false;
|
|
178814
178979
|
return true;
|
|
@@ -178978,8 +179143,8 @@ async function createAuthContext(adapter, options, getDatabaseType) {
|
|
|
178978
179143
|
You are using the memory DB with generateId: false.
|
|
178979
179144
|
This will cause no id to be generated for any model.
|
|
178980
179145
|
Most of the features of Better Auth will not work correctly.`);
|
|
178981
|
-
const secretsArray = options.secrets ?? parseSecretsEnv(
|
|
178982
|
-
const legacySecret = options.secret ||
|
|
179146
|
+
const secretsArray = options.secrets ?? parseSecretsEnv(env5.BETTER_AUTH_SECRETS);
|
|
179147
|
+
const legacySecret = options.secret || env5.BETTER_AUTH_SECRET || env5.AUTH_SECRET || "";
|
|
178983
179148
|
let secret;
|
|
178984
179149
|
let secretConfig;
|
|
178985
179150
|
if (secretsArray) {
|
|
@@ -186589,7 +186754,7 @@ var getVariable = (name) => isNode2 ? undefinedToNull(process.env[name.toUpperCa
|
|
|
186589
186754
|
var hasConf = (name) => hasParam("--" + name) || getVariable(name) !== null;
|
|
186590
186755
|
var production = hasConf("production");
|
|
186591
186756
|
var forceColor = isNode2 && isOneOf(process.env.FORCE_COLOR, ["true", "1", "2"]);
|
|
186592
|
-
var
|
|
186757
|
+
var supportsColor2 = forceColor || !hasParam("--no-colors") && !hasConf("no-color") && (!isNode2 || process.stdout.isTTY) && (!isNode2 || hasParam("--color") || getVariable("COLORTERM") !== null || (getVariable("TERM") || "").includes("color"));
|
|
186593
186758
|
|
|
186594
186759
|
// ../../node_modules/.bun/lib0@0.2.117/node_modules/lib0/buffer.js
|
|
186595
186760
|
var createUint8ArrayFromLen = (len) => new Uint8Array(len);
|
|
@@ -187187,7 +187352,7 @@ var computeBrowserLoggingArgs = (args) => {
|
|
|
187187
187352
|
}
|
|
187188
187353
|
return logArgs;
|
|
187189
187354
|
};
|
|
187190
|
-
var computeLoggingArgs =
|
|
187355
|
+
var computeLoggingArgs = supportsColor2 ? computeBrowserLoggingArgs : computeNoColorLoggingArgs;
|
|
187191
187356
|
var print = (...args) => {
|
|
187192
187357
|
console.log(...computeLoggingArgs(args));
|
|
187193
187358
|
vconsoles.forEach((vc) => vc.print(args));
|
|
@@ -217569,7 +217734,7 @@ var RESOURCE_PERMISSIONS2 = new Set([
|
|
|
217569
217734
|
// ../../node_modules/.bun/@modelcontextprotocol+server@2.3.0/node_modules/@modelcontextprotocol/server/dist/chunk-Br0eD_fh.mjs
|
|
217570
217735
|
var __create2 = Object.create;
|
|
217571
217736
|
var __defProp3 = Object.defineProperty;
|
|
217572
|
-
var
|
|
217737
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
217573
217738
|
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
217574
217739
|
var __getProtoOf2 = Object.getPrototypeOf;
|
|
217575
217740
|
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
@@ -217594,7 +217759,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
217594
217759
|
if (!__hasOwnProp2.call(to, key) && key !== except) {
|
|
217595
217760
|
__defProp3(to, key, {
|
|
217596
217761
|
get: ((k) => from[k]).bind(null, key),
|
|
217597
|
-
enumerable: !(desc =
|
|
217762
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
217598
217763
|
});
|
|
217599
217764
|
}
|
|
217600
217765
|
}
|
|
@@ -235710,12 +235875,24 @@ function registerDocsmintMcpCapabilities(server, client, workspaceRouting, decor
|
|
|
235710
235875
|
registerPromptsAndResources(server, client);
|
|
235711
235876
|
}
|
|
235712
235877
|
function createDocsmintMcpServer(options = {}) {
|
|
235713
|
-
const server = new DocsMintMcpServer({ name: "docsmint", version: "2.1.
|
|
235878
|
+
const server = new DocsMintMcpServer({ name: "docsmint", version: "2.1.5" });
|
|
235714
235879
|
const client = options.docsClient ? createMcpDocsClient(options.docsClient, options.requestContext) : options.client ?? createMcpDocsClient(createDefaultDocsClient(), options.requestContext);
|
|
235715
235880
|
registerDocsmintMcpCapabilities(server, client, options.workspaceRouting, options.decorateResult);
|
|
235716
235881
|
return server;
|
|
235717
235882
|
}
|
|
235718
235883
|
|
|
235884
|
+
// ../../backend/src/api/routes/integration-collections.ts
|
|
235885
|
+
var publicIntegrationCollections = new Set([
|
|
235886
|
+
"documents",
|
|
235887
|
+
"folders",
|
|
235888
|
+
"categories",
|
|
235889
|
+
"tags",
|
|
235890
|
+
"search",
|
|
235891
|
+
"graph",
|
|
235892
|
+
"trash",
|
|
235893
|
+
"attachments"
|
|
235894
|
+
]);
|
|
235895
|
+
|
|
235719
235896
|
// ../../backend/src/api/routes/integration.ts
|
|
235720
235897
|
async function createIntegrationMcpServer(request, apiFetch) {
|
|
235721
235898
|
const authorization = request.headers.get("authorization") ?? "";
|
|
@@ -235735,16 +235912,6 @@ async function createIntegrationMcpServer(request, apiFetch) {
|
|
|
235735
235912
|
}
|
|
235736
235913
|
});
|
|
235737
235914
|
}
|
|
235738
|
-
var publicCollections = new Set([
|
|
235739
|
-
"documents",
|
|
235740
|
-
"folders",
|
|
235741
|
-
"categories",
|
|
235742
|
-
"tags",
|
|
235743
|
-
"search",
|
|
235744
|
-
"graph",
|
|
235745
|
-
"trash",
|
|
235746
|
-
"attachments"
|
|
235747
|
-
]);
|
|
235748
235915
|
function createIntegrationRoutes(options) {
|
|
235749
235916
|
const mcp = createDocsmintMcpHttpHandler({
|
|
235750
235917
|
allowedOrigins: options.allowedOrigins,
|
|
@@ -235804,7 +235971,7 @@ function createIntegrationRoutes(options) {
|
|
|
235804
235971
|
}
|
|
235805
235972
|
]));
|
|
235806
235973
|
const collection = url.pathname.slice("/api/v1/".length).split("/")[0] ?? "";
|
|
235807
|
-
if (!
|
|
235974
|
+
if (!publicIntegrationCollections.has(collection))
|
|
235808
235975
|
return finish(new Response(null, { status: 404 }));
|
|
235809
235976
|
url.pathname = url.pathname.replace(/^\/api\/v1(?=\/)/, "/api");
|
|
235810
235977
|
const forwarded = new Headers(request.headers);
|
|
@@ -242302,7 +242469,7 @@ var swaggerConfig = {
|
|
|
242302
242469
|
},
|
|
242303
242470
|
info: {
|
|
242304
242471
|
title: "DocsMint API",
|
|
242305
|
-
version: "2.1.
|
|
242472
|
+
version: "2.1.5",
|
|
242306
242473
|
description: "Self-hosted AI-native knowledge workspace and installable PWA with hybrid search, GraphRAG, REST, SDK, CLI, and MCP access for people and AI agents.",
|
|
242307
242474
|
contact: { name: "HiAi-gg", url: "https://github.com/HiAi-gg/docsmint" },
|
|
242308
242475
|
license: {
|
|
@@ -242334,7 +242501,15 @@ var swaggerConfig = {
|
|
|
242334
242501
|
}
|
|
242335
242502
|
};
|
|
242336
242503
|
var integrationOrigins = integrationAllowedOrigins(config3);
|
|
242337
|
-
var app = new Elysia().use(bodySizeLimit).onRequest(({ request
|
|
242504
|
+
var app = new Elysia().use(bodySizeLimit).onRequest(({ request, set }) => {
|
|
242505
|
+
const rejected = rejectIntegrationOrigin(request, integrationOrigins);
|
|
242506
|
+
if (rejected) {
|
|
242507
|
+
rejected.headers.set("X-Request-ID", crypto.randomUUID());
|
|
242508
|
+
return rejected;
|
|
242509
|
+
}
|
|
242510
|
+
set.headers["X-Request-ID"] = crypto.randomUUID();
|
|
242511
|
+
}).onError(({ error, set }) => {
|
|
242512
|
+
set.headers["X-Request-ID"] ??= crypto.randomUUID();
|
|
242338
242513
|
const purgeFence = translateAccountPurgeFencedError(error, set);
|
|
242339
242514
|
if (purgeFence)
|
|
242340
242515
|
return purgeFence;
|
|
@@ -242342,7 +242517,12 @@ var app = new Elysia().use(bodySizeLimit).onRequest(({ request }) => rejectInteg
|
|
|
242342
242517
|
set.status = error.status;
|
|
242343
242518
|
return { error: error.message };
|
|
242344
242519
|
}
|
|
242345
|
-
}).onAfterHandle(({ set }) => {
|
|
242520
|
+
}).onAfterHandle(({ set, responseValue }) => {
|
|
242521
|
+
if (responseValue instanceof Response && responseValue.headers.has("X-Request-ID")) {
|
|
242522
|
+
delete set.headers["X-Request-ID"];
|
|
242523
|
+
} else {
|
|
242524
|
+
set.headers["X-Request-ID"] ??= crypto.randomUUID();
|
|
242525
|
+
}
|
|
242346
242526
|
set.headers["Content-Security-Policy"] = CSP_POLICY;
|
|
242347
242527
|
set.headers["Strict-Transport-Security"] = HSTS_POLICY;
|
|
242348
242528
|
set.headers["X-Content-Type-Options"] = "nosniff";
|
package/dist/mcp-cli.js
CHANGED
|
@@ -1687,7 +1687,7 @@ function registerDocsmintMcpCapabilities(server, client, workspaceRouting, decor
|
|
|
1687
1687
|
registerPromptsAndResources(server, client);
|
|
1688
1688
|
}
|
|
1689
1689
|
function createDocsmintMcpServer(options = {}) {
|
|
1690
|
-
const server = new DocsMintMcpServer({ name: "docsmint", version: "2.1.
|
|
1690
|
+
const server = new DocsMintMcpServer({ name: "docsmint", version: "2.1.5" });
|
|
1691
1691
|
const client = options.docsClient ? createMcpDocsClient(options.docsClient, options.requestContext) : options.client ?? createMcpDocsClient(createDefaultDocsClient(), options.requestContext);
|
|
1692
1692
|
registerDocsmintMcpCapabilities(server, client, options.workspaceRouting, options.decorateResult);
|
|
1693
1693
|
return server;
|
package/dist/mcp-server.js
CHANGED
|
@@ -1885,7 +1885,7 @@ function registerDocsmintMcpCapabilities(server, client, workspaceRouting, decor
|
|
|
1885
1885
|
registerPromptsAndResources(server, client);
|
|
1886
1886
|
}
|
|
1887
1887
|
function createDocsmintMcpServer(options = {}) {
|
|
1888
|
-
const server = new DocsMintMcpServer({ name: "docsmint", version: "2.1.
|
|
1888
|
+
const server = new DocsMintMcpServer({ name: "docsmint", version: "2.1.5" });
|
|
1889
1889
|
const client = options.docsClient ? createMcpDocsClient(options.docsClient, options.requestContext) : options.client ?? createMcpDocsClient(createDefaultDocsClient(), options.requestContext);
|
|
1890
1890
|
registerDocsmintMcpCapabilities(server, client, options.workspaceRouting, options.decorateResult);
|
|
1891
1891
|
return server;
|
package/package.json
CHANGED
|
@@ -25,7 +25,7 @@ import { registerSearch } from './commands/search.js';
|
|
|
25
25
|
import { registerSnapshot } from './commands/snapshot.js';
|
|
26
26
|
import { registerUpdate } from './commands/update.js';
|
|
27
27
|
|
|
28
|
-
const VERSION = '2.1.
|
|
28
|
+
const VERSION = '2.1.5';
|
|
29
29
|
|
|
30
30
|
const program = new Command();
|
|
31
31
|
program.name('docsmint').description('CLI for the DocsMint knowledge workspace').version(VERSION);
|
package/server.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"id": "1249550690",
|
|
11
11
|
"subfolder": "packages/mcp-server"
|
|
12
12
|
},
|
|
13
|
-
"version": "2.1.
|
|
13
|
+
"version": "2.1.5",
|
|
14
14
|
"icons": [
|
|
15
15
|
{
|
|
16
16
|
"src": "https://raw.githubusercontent.com/HiAi-gg/docsmint/main/frontend/static/logo-dark.png",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"registryType": "npm",
|
|
35
35
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
36
36
|
"identifier": "@hiai-gg/docsmint",
|
|
37
|
-
"version": "2.1.
|
|
37
|
+
"version": "2.1.5",
|
|
38
38
|
"runtimeHint": "npx",
|
|
39
39
|
"transport": {
|
|
40
40
|
"type": "stdio"
|