@wirecat/cli-memo 0.131.76 → 0.131.77
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/bin/memo.js +2 -2
- package/dist/bin/memo.js.map +1 -1
- package/dist/bundle/{all-profiles-CGQTLFDM.js → all-profiles-4UWCPMRQ.js} +10 -8
- package/dist/bundle/{anthropic-C744EPRR.js → anthropic-HECHQVOK.js} +7 -5
- package/dist/bundle/{app-server-LOH7WXAB.js → app-server-GQEQWFYQ.js} +42 -40
- package/dist/bundle/auto-3O7JD27U.js +91 -0
- package/dist/bundle/{bun-SQWZDSWT.js → bun-IWGIAD7H.js} +2 -2
- package/dist/bundle/{bun-sqlite-YVBFXNWB.js → bun-sqlite-VJFM4TVN.js} +7 -5
- package/dist/bundle/{chunk-7OZEQIK7.js → chunk-2DLCQ4AK.js} +1 -1
- package/dist/bundle/{chunk-W46O6RJ5.js → chunk-2IQWMWMC.js} +42 -130
- package/dist/bundle/{chunk-4O2MYFYC.js → chunk-3EPBPSP6.js} +1 -1
- package/dist/bundle/{chunk-KEBL3PY4.js → chunk-3QBRLN6T.js} +2 -2
- package/dist/bundle/{chunk-NE3UIK5P.js → chunk-3URQNBDV.js} +2 -2
- package/dist/bundle/{chunk-SF2OLWBU.js → chunk-4EFQOTNQ.js} +7 -7
- package/dist/bundle/{chunk-5NY7U6CM.js → chunk-4VO2RJAE.js} +12 -10
- package/dist/bundle/{chunk-AUCXJVUI.js → chunk-5APYWW46.js} +34 -32
- package/dist/bundle/{chunk-VYCLOFPC.js → chunk-6A37YXAL.js} +6 -184
- package/dist/bundle/{chunk-RTSRESGX.js → chunk-6RN34ZWU.js} +6 -6
- package/dist/bundle/{chunk-7PSGKP3R.js → chunk-6VISMU6R.js} +8 -8
- package/dist/bundle/{chunk-AI6PMW7L.js → chunk-76T57Y3Q.js} +6 -6
- package/dist/bundle/{chunk-V6CRCAWN.js → chunk-7YALAAL4.js} +364 -305
- package/dist/bundle/{chunk-KA5MDFLU.js → chunk-A3QZXQI3.js} +1 -1
- package/dist/bundle/{chunk-YSOTOUHJ.js → chunk-A54EZ6DV.js} +15 -15
- package/dist/bundle/{chunk-MODHP5VA.js → chunk-AH6V2UJZ.js} +22 -18
- package/dist/bundle/{chunk-2EZFUIL4.js → chunk-BA6GHX5B.js} +27 -27
- package/dist/bundle/{chunk-TPWAXJUQ.js → chunk-BFEXVALS.js} +1 -1
- package/dist/bundle/{chunk-H3WELZYK.js → chunk-BNOSAHVH.js} +3 -3
- package/dist/bundle/{chunk-Z3NRIW4M.js → chunk-C3HS26N5.js} +1 -1
- package/dist/bundle/{chunk-6RPLAGAL.js → chunk-CFZZUGUD.js} +22 -22
- package/dist/bundle/{chunk-KYLKZKQ7.js → chunk-CPKS7JKX.js} +2 -2
- package/dist/bundle/{chunk-4DTJF6E7.js → chunk-D7KQYLAN.js} +8 -8
- package/dist/bundle/{chunk-N2FIIVJV.js → chunk-DE5BNDIA.js} +4 -4
- package/dist/bundle/{chunk-LLBZDBPT.js → chunk-DJYMK7EI.js} +4 -4
- package/dist/bundle/{chunk-YRJ2576I.js → chunk-DNPE4LOZ.js} +11 -11
- package/dist/bundle/chunk-EXFRC4OT.js +106 -0
- package/dist/bundle/{chunk-ODCHYVTW.js → chunk-EY46RMMS.js} +158 -154
- package/dist/bundle/{chunk-C7OOLF5J.js → chunk-HFZHXP4U.js} +6 -6
- package/dist/bundle/{chunk-Y7YXXWQI.js → chunk-HKDUGTWQ.js} +3 -3
- package/dist/bundle/{chunk-7XFJRX6F.js → chunk-HWIKY7KF.js} +3 -3
- package/dist/bundle/{chunk-ZHAHSVQO.js → chunk-INXIJXU2.js} +7 -7
- package/dist/bundle/{chunk-YNXQAB4X.js → chunk-IYINNZQE.js} +11 -11
- package/dist/bundle/{chunk-42UNPXTC.js → chunk-JKLJM7EG.js} +2 -2
- package/dist/bundle/{chunk-GB64N6DP.js → chunk-JSGRDE5Q.js} +298 -297
- package/dist/bundle/{chunk-O3KNZVDZ.js → chunk-JTLPFUIQ.js} +4 -4
- package/dist/bundle/{chunk-TXVXEE7L.js → chunk-KTBPBMNR.js} +6 -6
- package/dist/bundle/{chunk-NM4QMIOQ.js → chunk-KYW7RWGE.js} +3 -3
- package/dist/bundle/{chunk-OEH5JUAL.js → chunk-LHVNZ25W.js} +13 -13
- package/dist/bundle/{chunk-OJU774SG.js → chunk-LO74ISD6.js} +4 -4
- package/dist/bundle/{chunk-GBU4U55M.js → chunk-M4MM4QUM.js} +1 -1
- package/dist/bundle/{chunk-TD4HM7XL.js → chunk-MRUE3BWX.js} +1 -1
- package/dist/bundle/{chunk-ZIA7AU7L.js → chunk-MZHH5XMX.js} +2 -2
- package/dist/bundle/{chunk-3NCRQMEN.js → chunk-NGWUFB4K.js} +1 -1
- package/dist/bundle/{chunk-DDSKTPU7.js → chunk-OAWNQZ3V.js} +4 -4
- package/dist/bundle/{chunk-YD7XTYEC.js → chunk-OB3OPV55.js} +6 -6
- package/dist/bundle/{chunk-5AQIET5P.js → chunk-OQSIFLZS.js} +2 -2
- package/dist/bundle/{chunk-6YRVBXFH.js → chunk-PPARTGFE.js} +10 -10
- package/dist/bundle/{chunk-VFJAGY3L.js → chunk-QNJ6O6J4.js} +3 -3
- package/dist/bundle/{chunk-TGURQ4YH.js → chunk-S5T4SO7I.js} +2 -2
- package/dist/bundle/{chunk-W5ARY4U2.js → chunk-SHO3T3F2.js} +4 -4
- package/dist/bundle/{chunk-HAMGOLFU.js → chunk-TFXKS2WG.js} +1 -1
- package/dist/bundle/{chunk-47WS4BML.js → chunk-TIHQFMH2.js} +12 -10
- package/dist/bundle/{chunk-EVLOYNXC.js → chunk-TXXKLYJQ.js} +4 -4
- package/dist/bundle/{chunk-2KGYREGD.js → chunk-UD5JUJES.js} +357 -357
- package/dist/bundle/{chunk-S54Z74G2.js → chunk-UDRKGCDS.js} +2 -2
- package/dist/bundle/{chunk-4IWOPJL4.js → chunk-UIS44ZMF.js} +7 -7
- package/dist/bundle/{chunk-XGPSFPLH.js → chunk-VIY77EDM.js} +48 -48
- package/dist/bundle/{chunk-DUON3SRD.js → chunk-VMTTWF2M.js} +8 -8
- package/dist/bundle/{chunk-YU7KZW5I.js → chunk-W36BMC6F.js} +5 -5
- package/dist/bundle/{chunk-FUATAPSB.js → chunk-WZZ426CJ.js} +83 -81
- package/dist/bundle/chunk-X2SA73EE.js +200 -0
- package/dist/bundle/{chunk-3PLYUZAR.js → chunk-XLZPP5MB.js} +1 -1
- package/dist/bundle/{chunk-FH753LZS.js → chunk-YABNPKKQ.js} +2 -2
- package/dist/bundle/{chunk-PFNEOHCY.js → chunk-YZ4J67GU.js} +3 -3
- package/dist/bundle/{chunk-RLRKBPLJ.js → chunk-ZPB3VTS7.js} +17 -13
- package/dist/bundle/{chunk-MFQTOOHR.js → chunk-ZPPMGXER.js} +35 -35
- package/dist/bundle/command-contract-SEDOYJIJ.js +34 -0
- package/dist/bundle/{command-server-entry-472XWNSN.js → command-server-entry-TQBKNSM3.js} +22 -20
- package/dist/bundle/{decode-SFZ67QJN.js → decode-VFRSEIBD.js} +7 -5
- package/dist/bundle/{dispatch-PHB2Y6ZL.js → dispatch-N73TJNYM.js} +3 -3
- package/dist/bundle/{echarts-3U34KH7O.js → echarts-DP2GC2C6.js} +2 -2
- package/dist/bundle/{embed-ZEZXJ45Q.js → embed-BIINGRNY.js} +8 -6
- package/dist/bundle/{embedder-AASO2I4Z.js → embedder-2AUO2PHQ.js} +11 -9
- package/dist/bundle/entry-APUFP74B.js +23 -0
- package/dist/bundle/entry-LGJ2Y7AS.js +78 -0
- package/dist/bundle/failure-5QSMH2CD.js +71 -0
- package/dist/bundle/{failure-OBT7CUVW.js → failure-IPHFR3KW.js} +3 -2
- package/dist/bundle/{first-run-YL3TIUU3.js → first-run-7UMKRQL7.js} +11 -9
- package/dist/bundle/first-screen-H5CQSLIX.js +32 -0
- package/dist/bundle/{instructions-HG2ZZ7AP.js → instructions-WDKCHEG6.js} +1 -1
- package/dist/bundle/mcp-3HKOGYHL.js +92 -0
- package/dist/bundle/memo.js +9 -56
- package/dist/bundle/{node-7AQN6OTR.js → node-QBL3F2VF.js} +2 -2
- package/dist/bundle/{node-sqlite-55KMFPGI.js → node-sqlite-WFKC73E5.js} +8 -6
- package/dist/bundle/{oauth-S2GLD4PY.js → oauth-4PT7N4SE.js} +9 -7
- package/dist/bundle/{open-6R4UPST5.js → open-I7XENSGI.js} +7 -5
- package/dist/bundle/openai-DUSBTUFI.js +26 -0
- package/dist/bundle/{process-C7J3IT7Q.js → process-TVXEHAK6.js} +1 -1
- package/dist/bundle/{program-KWI6M5IB.js → program-3X4EPBEW.js} +298 -148
- package/dist/bundle/{prompt-EEFKVWSA.js → prompt-QRYXTON7.js} +7 -5
- package/dist/bundle/{recognize-STYHVWQ6.js → recognize-ZLDPIN36.js} +6 -4
- package/dist/bundle/{remote-6MXZXHYY.js → remote-3GRP5YE3.js} +9 -7
- package/dist/bundle/{rerank-IMX2ONZG.js → rerank-6B2FI6LN.js} +9 -7
- package/dist/bundle/serve-ZP3TEANT.js +24 -0
- package/dist/bundle/{server-L6OS2MJ5.js → server-3SJJNNSX.js} +62 -59
- package/dist/bundle/server-72VZYABL.js +50 -0
- package/dist/bundle/server-UY47EXPQ.js +64 -0
- package/dist/bundle/{state-7MP4KKPG.js → state-JDH2X2CY.js} +8 -6
- package/dist/bundle/{store-EMAKEEYI.js → store-FDNYGJUF.js} +14 -12
- package/dist/bundle/store-maintenance-command-5LFS45JM.js +49 -0
- package/dist/bundle/update-257J2SPM.js +74 -0
- package/dist/run/entry.d.ts +7 -0
- package/dist/run/entry.d.ts.map +1 -0
- package/dist/run/entry.js +62 -0
- package/dist/run/entry.js.map +1 -0
- package/dist/sources/command.d.ts.map +1 -1
- package/dist/sources/command.js +29 -3
- package/dist/sources/command.js.map +1 -1
- package/dist/sources/read.d.ts +16 -2
- package/dist/sources/read.d.ts.map +1 -1
- package/dist/sources/read.js +40 -4
- package/dist/sources/read.js.map +1 -1
- package/dist/sources/readers/ai-model.d.ts +4 -0
- package/dist/sources/readers/ai-model.d.ts.map +1 -0
- package/dist/sources/readers/ai-model.js +74 -0
- package/dist/sources/readers/ai-model.js.map +1 -0
- package/dist/sources/readers/index.d.ts +1 -0
- package/dist/sources/readers/index.d.ts.map +1 -1
- package/dist/sources/readers/index.js +3 -1
- package/dist/sources/readers/index.js.map +1 -1
- package/dist/sources/readers/keys.js +1 -1
- package/dist/sources/readers/keys.js.map +1 -1
- package/dist/sources/readers/types.d.ts +5 -2
- package/dist/sources/readers/types.d.ts.map +1 -1
- package/dist/sources/readers/types.js +1 -1
- package/dist/sources/readers/types.js.map +1 -1
- package/dist/sources/suggest-command.d.ts.map +1 -1
- package/dist/sources/suggest-command.js +16 -5
- package/dist/sources/suggest-command.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/dist/bundle/auto-R3ABUML7.js +0 -89
- package/dist/bundle/command-contract-IEUSFI3B.js +0 -32
- package/dist/bundle/entry-7VHMR3LD.js +0 -21
- package/dist/bundle/failure-DJSK3LGN.js +0 -69
- package/dist/bundle/first-screen-OQVOWRYM.js +0 -30
- package/dist/bundle/mcp-EUFDOVMI.js +0 -90
- package/dist/bundle/openai-JK5GCSDK.js +0 -24
- package/dist/bundle/serve-ZNN464BH.js +0 -22
- package/dist/bundle/server-4CHUUMVI.js +0 -48
- package/dist/bundle/server-VCZCAQOB.js +0 -62
- package/dist/bundle/store-maintenance-command-LWN6OUFA.js +0 -47
- package/dist/bundle/update-I4X2UO6J.js +0 -72
- /package/dist/bundle/{chunk-IKIYW7FW.js → chunk-6AALVDEA.js} +0 -0
|
@@ -2,11 +2,11 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
updateCommand
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-3QBRLN6T.js";
|
|
6
6
|
import {
|
|
7
7
|
DEFAULT_STEMMERS,
|
|
8
8
|
LANGUAGES
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-VMTTWF2M.js";
|
|
10
10
|
import {
|
|
11
11
|
installerOf
|
|
12
12
|
} from "./chunk-NT5IOEEK.js";
|
|
@@ -15,18 +15,18 @@ import {
|
|
|
15
15
|
readSetupAnswers,
|
|
16
16
|
unanswered,
|
|
17
17
|
writeSetupAnswers
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-TXXKLYJQ.js";
|
|
19
19
|
import {
|
|
20
20
|
sharedConfigPath
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-KTBPBMNR.js";
|
|
22
22
|
import {
|
|
23
23
|
storePath
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-YABNPKKQ.js";
|
|
25
25
|
import {
|
|
26
26
|
__name
|
|
27
27
|
} from "./chunk-ZVVMGPBJ.js";
|
|
28
28
|
|
|
29
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/cli/first-run.js
|
|
30
30
|
import { spawnSync } from "node:child_process";
|
|
31
31
|
import { accessSync, constants, realpathSync } from "node:fs";
|
|
32
32
|
import { delimiter, join } from "node:path";
|
|
@@ -84,7 +84,7 @@ var suggested = /* @__PURE__ */ __name((env, contentLanguages) => {
|
|
|
84
84
|
return (own.length ? own : LANGUAGES.filter(({ code }) => code === "en" || code === system)).map(({ name }) => name);
|
|
85
85
|
}, "suggested");
|
|
86
86
|
var askLanguages = /* @__PURE__ */ __name(async ({ command, env, io, contentLanguages }) => {
|
|
87
|
-
const { openStore } = await import("./store-
|
|
87
|
+
const { openStore } = await import("./store-FDNYGJUF.js");
|
|
88
88
|
const store = await openStore({ env });
|
|
89
89
|
let rebuild = false;
|
|
90
90
|
try {
|
|
@@ -113,8 +113,8 @@ var askLanguages = /* @__PURE__ */ __name(async ({ command, env, io, contentLang
|
|
|
113
113
|
if (!rebuild)
|
|
114
114
|
return;
|
|
115
115
|
const [{ openCache }, { buildStems }] = await Promise.all([
|
|
116
|
-
import("./open-
|
|
117
|
-
import("./store-maintenance-command-
|
|
116
|
+
import("./open-I7XENSGI.js"),
|
|
117
|
+
import("./store-maintenance-command-5LFS45JM.js")
|
|
118
118
|
]);
|
|
119
119
|
const database = await openCache(storePath(env));
|
|
120
120
|
try {
|
|
@@ -126,7 +126,7 @@ var askLanguages = /* @__PURE__ */ __name(async ({ command, env, io, contentLang
|
|
|
126
126
|
var askTools = /* @__PURE__ */ __name(async (run) => {
|
|
127
127
|
const { command, env, io } = run;
|
|
128
128
|
const installed = run.installed ?? ((name) => onPath(name, env));
|
|
129
|
-
const { WIRECAT_TOOLS } = await import("./first-screen-
|
|
129
|
+
const { WIRECAT_TOOLS } = await import("./first-screen-H5CQSLIX.js");
|
|
130
130
|
const others = WIRECAT_TOOLS.filter((tool) => tool.command !== command);
|
|
131
131
|
const missing = others.filter((tool) => !installed(tool.command));
|
|
132
132
|
io.say("Other WireCat tools \u2014 they share this store, so one search finds everything:");
|
|
@@ -199,7 +199,7 @@ var setupAtStart = /* @__PURE__ */ __name(async (start) => {
|
|
|
199
199
|
contentLanguages: start.contentLanguages,
|
|
200
200
|
all: start.path[0] === "setup",
|
|
201
201
|
io: {
|
|
202
|
-
ask: /* @__PURE__ */ __name(async (prompt) => (await import("./prompt-
|
|
202
|
+
ask: /* @__PURE__ */ __name(async (prompt) => (await import("./prompt-QRYXTON7.js")).readSecret(prompt, { input, echo: true }), "ask"),
|
|
203
203
|
say: /* @__PURE__ */ __name((text) => process.stderr.write(`${text}
|
|
204
204
|
`), "say")
|
|
205
205
|
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
array,
|
|
5
|
+
dottedId,
|
|
6
|
+
duplicates,
|
|
7
|
+
isoTime,
|
|
8
|
+
optional,
|
|
9
|
+
parseRegistry,
|
|
10
|
+
picklist,
|
|
11
|
+
pipe,
|
|
12
|
+
record,
|
|
13
|
+
regex,
|
|
14
|
+
strictObject,
|
|
15
|
+
string,
|
|
16
|
+
text,
|
|
17
|
+
unknown
|
|
18
|
+
} from "./chunk-6A37YXAL.js";
|
|
19
|
+
import {
|
|
20
|
+
__name
|
|
21
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
22
|
+
|
|
23
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/log.js
|
|
24
|
+
var LOG_SEVERITIES = ["trace", "debug", "info", "warn", "error", "fatal"];
|
|
25
|
+
var logRecordSchema = strictObject({
|
|
26
|
+
time: isoTime,
|
|
27
|
+
severity: picklist(LOG_SEVERITIES),
|
|
28
|
+
/** The registered event id, `provider.request.failed`: never a sentence, so never content. */
|
|
29
|
+
body: string(),
|
|
30
|
+
run_id: text,
|
|
31
|
+
/** From an MCP caller's `_meta.traceparent`, when it sent one. */
|
|
32
|
+
trace_id: optional(pipe(string(), regex(/^[0-9a-f]{32}$/, "32 lower-case hex digits"))),
|
|
33
|
+
command: string(),
|
|
34
|
+
attributes: record(string(), unknown()),
|
|
35
|
+
resource: strictObject({ service: text, version: text })
|
|
36
|
+
});
|
|
37
|
+
var logEventSchema = strictObject({
|
|
38
|
+
id: dottedId,
|
|
39
|
+
meaning: text,
|
|
40
|
+
/** Attribute keys every record of this event carries. */
|
|
41
|
+
keys: array(string())
|
|
42
|
+
});
|
|
43
|
+
var defineLogEvents = /* @__PURE__ */ __name((input) => parseRegistry("log events", array(logEventSchema), input, (events) => [
|
|
44
|
+
...duplicates(events.map((event) => event.id)).map((id) => `"${id}" is listed twice`),
|
|
45
|
+
...events.flatMap((event) => duplicates(event.keys).map((key) => `${event.id}: key "${key}" is listed twice`))
|
|
46
|
+
]), "defineLogEvents");
|
|
47
|
+
var LOG_EVENTS = defineLogEvents([
|
|
48
|
+
{ id: "command.failed", meaning: "a command ended with an error", keys: ["code", "reason"] }
|
|
49
|
+
]);
|
|
50
|
+
var LOG_ATTRIBUTE_KEYS = [
|
|
51
|
+
"code",
|
|
52
|
+
"count",
|
|
53
|
+
"durationMs",
|
|
54
|
+
"errorClass",
|
|
55
|
+
"errorCode",
|
|
56
|
+
"event",
|
|
57
|
+
"frames",
|
|
58
|
+
"operation",
|
|
59
|
+
"outcome",
|
|
60
|
+
"reason",
|
|
61
|
+
"status"
|
|
62
|
+
];
|
|
63
|
+
var CONTENT_WORDS = /* @__PURE__ */ new Set([
|
|
64
|
+
"authorization",
|
|
65
|
+
"body",
|
|
66
|
+
"caption",
|
|
67
|
+
"content",
|
|
68
|
+
"cookie",
|
|
69
|
+
"credential",
|
|
70
|
+
"credentials",
|
|
71
|
+
"email",
|
|
72
|
+
"password",
|
|
73
|
+
"phone",
|
|
74
|
+
"query",
|
|
75
|
+
"secret",
|
|
76
|
+
"text",
|
|
77
|
+
"title",
|
|
78
|
+
"token"
|
|
79
|
+
]);
|
|
80
|
+
var CONTENT_LAST_WORDS = /* @__PURE__ */ new Set(["message", "name"]);
|
|
81
|
+
var wordsOf = /* @__PURE__ */ __name((key) => key.replace(/([a-z0-9])([A-Z])/g, "$1 $2").split(/[\s_.-]+/).filter(Boolean).map((word) => word.toLowerCase()), "wordsOf");
|
|
82
|
+
var isContentKey = /* @__PURE__ */ __name((key) => {
|
|
83
|
+
const words = wordsOf(key);
|
|
84
|
+
return words.some((word) => CONTENT_WORDS.has(word)) || CONTENT_LAST_WORDS.has(words.at(-1) ?? "");
|
|
85
|
+
}, "isContentKey");
|
|
86
|
+
var TRACEPARENT = /^([0-9a-f]{2})-([0-9a-f]{32})-([0-9a-f]{16})-([0-9a-f]{2})(-.*)?$/;
|
|
87
|
+
var traceIdOf = /* @__PURE__ */ __name((traceparent) => {
|
|
88
|
+
if (typeof traceparent !== "string")
|
|
89
|
+
return void 0;
|
|
90
|
+
const match = TRACEPARENT.exec(traceparent.trim());
|
|
91
|
+
if (!match)
|
|
92
|
+
return void 0;
|
|
93
|
+
const [, version, traceId = "", parentId = "", , rest] = match;
|
|
94
|
+
if (version === "ff" || version === "00" && rest !== void 0)
|
|
95
|
+
return void 0;
|
|
96
|
+
if (/^0+$/.test(traceId) || /^0+$/.test(parentId))
|
|
97
|
+
return void 0;
|
|
98
|
+
return traceId;
|
|
99
|
+
}, "traceIdOf");
|
|
100
|
+
|
|
101
|
+
export {
|
|
102
|
+
defineLogEvents,
|
|
103
|
+
LOG_ATTRIBUTE_KEYS,
|
|
104
|
+
isContentKey,
|
|
105
|
+
traceIdOf
|
|
106
|
+
};
|