@agent-team-foundation/first-tree-hub 0.14.4 → 0.14.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.
Files changed (101) hide show
  1. package/dist/bootstrap-BmeaRhRp.mjs +3 -0
  2. package/dist/{bootstrap-CQQGgIx1.mjs → bootstrap-CmkHQsnS.mjs} +24 -16
  3. package/dist/cli/index.mjs +6 -94
  4. package/dist/{dist-CrdnqZjv.mjs → feishu-BE7QRxnE.mjs} +170 -379
  5. package/dist/feishu-De9_bA91.mjs +3 -0
  6. package/dist/index.mjs +5 -12
  7. package/dist/saas-connect-CNY9Ve5V.mjs +13748 -0
  8. package/package.json +4 -12
  9. package/dist/chunk-BSw8zbkd.mjs +0 -37
  10. package/dist/client-BPRIfrOT-CoV_2o7e.mjs +0 -4230
  11. package/dist/client-CEdYVnoj-BGiGcJbH.mjs +0 -7
  12. package/dist/dist-LgF7LHpE.mjs +0 -430
  13. package/dist/drizzle/0000_shocking_darkhawk.sql +0 -92
  14. package/dist/drizzle/0001_v2_schema_updates.sql +0 -26
  15. package/dist/drizzle/0002_adapter_tables.sql +0 -64
  16. package/dist/drizzle/0003_feishu_adapter.sql +0 -21
  17. package/dist/drizzle/0004_adapter_refactor.sql +0 -13
  18. package/dist/drizzle/0005_delegate_mention.sql +0 -1
  19. package/dist/drizzle/0006_agent_tree_path.sql +0 -1
  20. package/dist/drizzle/0007_decouple_context_tree.sql +0 -2
  21. package/dist/drizzle/0008_uuid_identity.sql +0 -12
  22. package/dist/drizzle/0009_agent_runtime_m1.sql +0 -31
  23. package/dist/drizzle/0010_cloud_multi_tenancy.sql +0 -34
  24. package/dist/drizzle/0011_org_uuid_pk.sql +0 -22
  25. package/dist/drizzle/0012_session_level_state.sql +0 -19
  26. package/dist/drizzle/0013_hub_tasks.sql +0 -38
  27. package/dist/drizzle/0014_drop_task_fks.sql +0 -9
  28. package/dist/drizzle/0015_member_system.sql +0 -34
  29. package/dist/drizzle/0016_strange_havok.sql +0 -25
  30. package/dist/drizzle/0017_session_outputs_unique.sql +0 -1
  31. package/dist/drizzle/0018_agent_visibility.sql +0 -13
  32. package/dist/drizzle/0019_agent_configs.sql +0 -30
  33. package/dist/drizzle/0020_unified_user_token.sql +0 -154
  34. package/dist/drizzle/0021_drop_agents_profile.sql +0 -10
  35. package/dist/drizzle/0022_session_events.sql +0 -32
  36. package/dist/drizzle/0023_clients_org_scoping.sql +0 -40
  37. package/dist/drizzle/0024_display_name_not_null.sql +0 -31
  38. package/dist/drizzle/0025_inbox_silent_entries.sql +0 -53
  39. package/dist/drizzle/0026_saas_onboarding.sql +0 -153
  40. package/dist/drizzle/0027_runtime_provider.sql +0 -10
  41. package/dist/drizzle/0028_auth_identity_user_github_unique.sql +0 -12
  42. package/dist/drizzle/0029_direct_agent_only_mention_only.sql +0 -28
  43. package/dist/drizzle/0030_chat_first_workspace.sql +0 -129
  44. package/dist/drizzle/0031_drop_system_configs.sql +0 -11
  45. package/dist/drizzle/0032_organization_settings.sql +0 -36
  46. package/dist/drizzle/0033_onboarding_dismissed_at.sql +0 -13
  47. package/dist/drizzle/0034_pending_questions.sql +0 -34
  48. package/dist/drizzle/0035_drop_hub_tasks.sql +0 -7
  49. package/dist/drizzle/0036_github_entity_chat_mappings.sql +0 -47
  50. package/dist/drizzle/0037_github_app_installations.sql +0 -52
  51. package/dist/drizzle/0038_chat_membership_user_state.sql +0 -223
  52. package/dist/drizzle/0039_drop_chat_participants_subscriptions.sql +0 -26
  53. package/dist/drizzle/0040_chat_user_state_engagement.sql +0 -24
  54. package/dist/drizzle/0041_notifications_dedup_key.sql +0 -29
  55. package/dist/drizzle/0042_notifications_drop_legacy_types.sql +0 -36
  56. package/dist/drizzle/0043_onboarding_completed_at.sql +0 -32
  57. package/dist/drizzle/0044_agent_avatar_color.sql +0 -11
  58. package/dist/drizzle/0045_agent_avatar_image.sql +0 -17
  59. package/dist/drizzle/meta/0000_snapshot.json +0 -687
  60. package/dist/drizzle/meta/0001_snapshot.json +0 -687
  61. package/dist/drizzle/meta/0012_snapshot.json +0 -1451
  62. package/dist/drizzle/meta/0013_snapshot.json +0 -1771
  63. package/dist/drizzle/meta/0014_snapshot.json +0 -1717
  64. package/dist/drizzle/meta/0016_snapshot.json +0 -1917
  65. package/dist/drizzle/meta/0018_snapshot.json +0 -1938
  66. package/dist/drizzle/meta/_journal.json +0 -328
  67. package/dist/esm-iadMkGbV.mjs +0 -1516
  68. package/dist/execAsync-DUfRkc4a.mjs +0 -10
  69. package/dist/execAsync-YbEZSOYd.mjs +0 -10
  70. package/dist/feishu-DNoBroKK.mjs +0 -53
  71. package/dist/from-DQ7eNRwu.mjs +0 -3840
  72. package/dist/getMachineId-bsd-BmasEOJr.mjs +0 -27
  73. package/dist/getMachineId-bsd-Dh3h0DDE.mjs +0 -27
  74. package/dist/getMachineId-darwin-CuhM3hfZ.mjs +0 -24
  75. package/dist/getMachineId-darwin-D9wR0SLj.mjs +0 -24
  76. package/dist/getMachineId-linux-CYfb0oxZ.mjs +0 -20
  77. package/dist/getMachineId-linux-D8ZaSjAC.mjs +0 -20
  78. package/dist/getMachineId-unsupported-Cu3iisaD.mjs +0 -15
  79. package/dist/getMachineId-unsupported-DZqI4ZT5.mjs +0 -15
  80. package/dist/getMachineId-win-8ZJbtrdf.mjs +0 -26
  81. package/dist/getMachineId-win-DT-hqwVp.mjs +0 -26
  82. package/dist/invitation-C9m2gQx4-C_4f5VTs.mjs +0 -4
  83. package/dist/invitation-D_ENPHyj-5ETiae5r.mjs +0 -167
  84. package/dist/logger-core-BTmvdflj-DjW8FM4T.mjs +0 -146
  85. package/dist/multipart-parser-QRu3OKK4.mjs +0 -294
  86. package/dist/observability-BAScT_5S-BcW9HgkG.mjs +0 -96129
  87. package/dist/observability-eLA9iNK_.mjs +0 -5
  88. package/dist/saas-connect-Da55XxRX.mjs +0 -21635
  89. package/dist/src-DFlbpJfU.mjs +0 -1176
  90. package/dist/src-DNBS5Yjj.mjs +0 -735
  91. package/dist/uuid-DbS_4vFh-iFghv4zA.mjs +0 -129
  92. package/dist/web/assets/index-9wK0udbH.js +0 -416
  93. package/dist/web/assets/index-C7x7O7dG.js +0 -11
  94. package/dist/web/assets/index-DE7Q3QWE.css +0 -1
  95. package/dist/web/favicon.svg +0 -9
  96. package/dist/web/fonts/inter-latin-ext.woff2 +0 -0
  97. package/dist/web/fonts/inter-latin.woff2 +0 -0
  98. package/dist/web/fonts/jetbrains-mono-latin-ext.woff2 +0 -0
  99. package/dist/web/fonts/jetbrains-mono-latin.woff2 +0 -0
  100. package/dist/web/index.html +0 -39
  101. /package/dist/{cli-fetch--tiwKm5S.mjs → cli-fetch-BGVItZxo.mjs} +0 -0
@@ -1,1516 +0,0 @@
1
- import { n as __esmMin, r as __exportAll } from "./chunk-BSw8zbkd.mjs";
2
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/version.js
3
- var VERSION;
4
- var init_version = __esmMin((() => {
5
- VERSION = "1.9.1";
6
- }));
7
- //#endregion
8
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/internal/semver.js
9
- /**
10
- * Create a function to test an API version to see if it is compatible with the provided ownVersion.
11
- *
12
- * The returned function has the following semantics:
13
- * - Exact match is always compatible
14
- * - Major versions must match exactly
15
- * - 1.x package cannot use global 2.x package
16
- * - 2.x package cannot use global 1.x package
17
- * - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API
18
- * - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects
19
- * - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3
20
- * - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor
21
- * - Patch and build tag differences are not considered at this time
22
- *
23
- * @param ownVersion version which should be checked against
24
- */
25
- function _makeCompatibilityCheck(ownVersion) {
26
- const acceptedVersions = new Set([ownVersion]);
27
- const rejectedVersions = /* @__PURE__ */ new Set();
28
- const myVersionMatch = ownVersion.match(re);
29
- if (!myVersionMatch) return () => false;
30
- const ownVersionParsed = {
31
- major: +myVersionMatch[1],
32
- minor: +myVersionMatch[2],
33
- patch: +myVersionMatch[3],
34
- prerelease: myVersionMatch[4]
35
- };
36
- if (ownVersionParsed.prerelease != null) return function isExactmatch(globalVersion) {
37
- return globalVersion === ownVersion;
38
- };
39
- function _reject(v) {
40
- rejectedVersions.add(v);
41
- return false;
42
- }
43
- function _accept(v) {
44
- acceptedVersions.add(v);
45
- return true;
46
- }
47
- return function isCompatible(globalVersion) {
48
- if (acceptedVersions.has(globalVersion)) return true;
49
- if (rejectedVersions.has(globalVersion)) return false;
50
- const globalVersionMatch = globalVersion.match(re);
51
- if (!globalVersionMatch) return _reject(globalVersion);
52
- const globalVersionParsed = {
53
- major: +globalVersionMatch[1],
54
- minor: +globalVersionMatch[2],
55
- patch: +globalVersionMatch[3],
56
- prerelease: globalVersionMatch[4]
57
- };
58
- if (globalVersionParsed.prerelease != null) return _reject(globalVersion);
59
- if (ownVersionParsed.major !== globalVersionParsed.major) return _reject(globalVersion);
60
- if (ownVersionParsed.major === 0) {
61
- if (ownVersionParsed.minor === globalVersionParsed.minor && ownVersionParsed.patch <= globalVersionParsed.patch) return _accept(globalVersion);
62
- return _reject(globalVersion);
63
- }
64
- if (ownVersionParsed.minor <= globalVersionParsed.minor) return _accept(globalVersion);
65
- return _reject(globalVersion);
66
- };
67
- }
68
- var re, isCompatible;
69
- var init_semver = __esmMin((() => {
70
- init_version();
71
- re = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
72
- isCompatible = _makeCompatibilityCheck(VERSION);
73
- }));
74
- //#endregion
75
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/internal/global-utils.js
76
- function registerGlobal(type, instance, diag, allowOverride = false) {
77
- var _a;
78
- const api = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a !== void 0 ? _a : { version: VERSION };
79
- if (!allowOverride && api[type]) {
80
- const err = /* @__PURE__ */ new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${type}`);
81
- diag.error(err.stack || err.message);
82
- return false;
83
- }
84
- if (api.version !== "1.9.1") {
85
- const err = /* @__PURE__ */ new Error(`@opentelemetry/api: Registration of version v${api.version} for ${type} does not match previously registered API v${VERSION}`);
86
- diag.error(err.stack || err.message);
87
- return false;
88
- }
89
- api[type] = instance;
90
- diag.debug(`@opentelemetry/api: Registered a global for ${type} v${VERSION}.`);
91
- return true;
92
- }
93
- function getGlobal(type) {
94
- var _a, _b;
95
- const globalVersion = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a === void 0 ? void 0 : _a.version;
96
- if (!globalVersion || !isCompatible(globalVersion)) return;
97
- return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === void 0 ? void 0 : _b[type];
98
- }
99
- function unregisterGlobal(type, diag) {
100
- diag.debug(`@opentelemetry/api: Unregistering a global for ${type} v${VERSION}.`);
101
- const api = _global[GLOBAL_OPENTELEMETRY_API_KEY];
102
- if (api) delete api[type];
103
- }
104
- var major, GLOBAL_OPENTELEMETRY_API_KEY, _global;
105
- var init_global_utils = __esmMin((() => {
106
- init_version();
107
- init_semver();
108
- major = VERSION.split(".")[0];
109
- GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(`opentelemetry.js.api.${major}`);
110
- _global = typeof globalThis === "object" ? globalThis : typeof self === "object" ? self : typeof window === "object" ? window : typeof global === "object" ? global : {};
111
- }));
112
- //#endregion
113
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/diag/ComponentLogger.js
114
- function logProxy(funcName, namespace, args) {
115
- const logger = getGlobal("diag");
116
- if (!logger) return;
117
- return logger[funcName](namespace, ...args);
118
- }
119
- var DiagComponentLogger;
120
- var init_ComponentLogger = __esmMin((() => {
121
- init_global_utils();
122
- DiagComponentLogger = class {
123
- constructor(props) {
124
- this._namespace = props.namespace || "DiagComponentLogger";
125
- }
126
- debug(...args) {
127
- return logProxy("debug", this._namespace, args);
128
- }
129
- error(...args) {
130
- return logProxy("error", this._namespace, args);
131
- }
132
- info(...args) {
133
- return logProxy("info", this._namespace, args);
134
- }
135
- warn(...args) {
136
- return logProxy("warn", this._namespace, args);
137
- }
138
- verbose(...args) {
139
- return logProxy("verbose", this._namespace, args);
140
- }
141
- };
142
- }));
143
- //#endregion
144
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/diag/types.js
145
- var DiagLogLevel;
146
- var init_types = __esmMin((() => {
147
- (function(DiagLogLevel) {
148
- /** Diagnostic Logging level setting to disable all logging (except and forced logs) */
149
- DiagLogLevel[DiagLogLevel["NONE"] = 0] = "NONE";
150
- /** Identifies an error scenario */
151
- DiagLogLevel[DiagLogLevel["ERROR"] = 30] = "ERROR";
152
- /** Identifies a warning scenario */
153
- DiagLogLevel[DiagLogLevel["WARN"] = 50] = "WARN";
154
- /** General informational log message */
155
- DiagLogLevel[DiagLogLevel["INFO"] = 60] = "INFO";
156
- /** General debug log message */
157
- DiagLogLevel[DiagLogLevel["DEBUG"] = 70] = "DEBUG";
158
- /**
159
- * Detailed trace level logging should only be used for development, should only be set
160
- * in a development environment.
161
- */
162
- DiagLogLevel[DiagLogLevel["VERBOSE"] = 80] = "VERBOSE";
163
- /** Used to set the logging level to include all logging */
164
- DiagLogLevel[DiagLogLevel["ALL"] = 9999] = "ALL";
165
- })(DiagLogLevel || (DiagLogLevel = {}));
166
- }));
167
- //#endregion
168
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/diag/internal/logLevelLogger.js
169
- function createLogLevelDiagLogger(maxLevel, logger) {
170
- if (maxLevel < DiagLogLevel.NONE) maxLevel = DiagLogLevel.NONE;
171
- else if (maxLevel > DiagLogLevel.ALL) maxLevel = DiagLogLevel.ALL;
172
- logger = logger || {};
173
- function _filterFunc(funcName, theLevel) {
174
- const theFunc = logger[funcName];
175
- if (typeof theFunc === "function" && maxLevel >= theLevel) return theFunc.bind(logger);
176
- return function() {};
177
- }
178
- return {
179
- error: _filterFunc("error", DiagLogLevel.ERROR),
180
- warn: _filterFunc("warn", DiagLogLevel.WARN),
181
- info: _filterFunc("info", DiagLogLevel.INFO),
182
- debug: _filterFunc("debug", DiagLogLevel.DEBUG),
183
- verbose: _filterFunc("verbose", DiagLogLevel.VERBOSE)
184
- };
185
- }
186
- var init_logLevelLogger = __esmMin((() => {
187
- init_types();
188
- }));
189
- //#endregion
190
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/api/diag.js
191
- var API_NAME$4, DiagAPI;
192
- var init_diag = __esmMin((() => {
193
- init_ComponentLogger();
194
- init_logLevelLogger();
195
- init_types();
196
- init_global_utils();
197
- API_NAME$4 = "diag";
198
- DiagAPI = class DiagAPI {
199
- /** Get the singleton instance of the DiagAPI API */
200
- static instance() {
201
- if (!this._instance) this._instance = new DiagAPI();
202
- return this._instance;
203
- }
204
- /**
205
- * Private internal constructor
206
- * @private
207
- */
208
- constructor() {
209
- function _logProxy(funcName) {
210
- return function(...args) {
211
- const logger = getGlobal("diag");
212
- if (!logger) return;
213
- return logger[funcName](...args);
214
- };
215
- }
216
- const self = this;
217
- const setLogger = (logger, optionsOrLogLevel = { logLevel: DiagLogLevel.INFO }) => {
218
- var _a, _b, _c;
219
- if (logger === self) {
220
- const err = /* @__PURE__ */ new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");
221
- self.error((_a = err.stack) !== null && _a !== void 0 ? _a : err.message);
222
- return false;
223
- }
224
- if (typeof optionsOrLogLevel === "number") optionsOrLogLevel = { logLevel: optionsOrLogLevel };
225
- const oldLogger = getGlobal("diag");
226
- const newLogger = createLogLevelDiagLogger((_b = optionsOrLogLevel.logLevel) !== null && _b !== void 0 ? _b : DiagLogLevel.INFO, logger);
227
- if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {
228
- const stack = (_c = (/* @__PURE__ */ new Error()).stack) !== null && _c !== void 0 ? _c : "<failed to generate stacktrace>";
229
- oldLogger.warn(`Current logger will be overwritten from ${stack}`);
230
- newLogger.warn(`Current logger will overwrite one already registered from ${stack}`);
231
- }
232
- return registerGlobal("diag", newLogger, self, true);
233
- };
234
- self.setLogger = setLogger;
235
- self.disable = () => {
236
- unregisterGlobal(API_NAME$4, self);
237
- };
238
- self.createComponentLogger = (options) => {
239
- return new DiagComponentLogger(options);
240
- };
241
- self.verbose = _logProxy("verbose");
242
- self.debug = _logProxy("debug");
243
- self.info = _logProxy("info");
244
- self.warn = _logProxy("warn");
245
- self.error = _logProxy("error");
246
- }
247
- };
248
- }));
249
- //#endregion
250
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/baggage/internal/baggage-impl.js
251
- var BaggageImpl;
252
- var init_baggage_impl = __esmMin((() => {
253
- BaggageImpl = class BaggageImpl {
254
- constructor(entries) {
255
- this._entries = entries ? new Map(entries) : /* @__PURE__ */ new Map();
256
- }
257
- getEntry(key) {
258
- const entry = this._entries.get(key);
259
- if (!entry) return;
260
- return Object.assign({}, entry);
261
- }
262
- getAllEntries() {
263
- return Array.from(this._entries.entries());
264
- }
265
- setEntry(key, entry) {
266
- const newBaggage = new BaggageImpl(this._entries);
267
- newBaggage._entries.set(key, entry);
268
- return newBaggage;
269
- }
270
- removeEntry(key) {
271
- const newBaggage = new BaggageImpl(this._entries);
272
- newBaggage._entries.delete(key);
273
- return newBaggage;
274
- }
275
- removeEntries(...keys) {
276
- const newBaggage = new BaggageImpl(this._entries);
277
- for (const key of keys) newBaggage._entries.delete(key);
278
- return newBaggage;
279
- }
280
- clear() {
281
- return new BaggageImpl();
282
- }
283
- };
284
- }));
285
- //#endregion
286
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/baggage/internal/symbol.js
287
- var baggageEntryMetadataSymbol;
288
- var init_symbol = __esmMin((() => {
289
- baggageEntryMetadataSymbol = Symbol("BaggageEntryMetadata");
290
- }));
291
- //#endregion
292
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/baggage/utils.js
293
- /**
294
- * Create a new Baggage with optional entries
295
- *
296
- * @param entries An array of baggage entries the new baggage should contain
297
- */
298
- function createBaggage(entries = {}) {
299
- return new BaggageImpl(new Map(Object.entries(entries)));
300
- }
301
- /**
302
- * Create a serializable BaggageEntryMetadata object from a string.
303
- *
304
- * @param str string metadata. Format is currently not defined by the spec and has no special meaning.
305
- *
306
- * @since 1.0.0
307
- */
308
- function baggageEntryMetadataFromString(str) {
309
- if (typeof str !== "string") {
310
- diag$1.error(`Cannot create baggage metadata from unknown type: ${typeof str}`);
311
- str = "";
312
- }
313
- return {
314
- __TYPE__: baggageEntryMetadataSymbol,
315
- toString() {
316
- return str;
317
- }
318
- };
319
- }
320
- var diag$1;
321
- var init_utils$1 = __esmMin((() => {
322
- init_diag();
323
- init_baggage_impl();
324
- init_symbol();
325
- diag$1 = DiagAPI.instance();
326
- }));
327
- //#endregion
328
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/context/context.js
329
- /**
330
- * Get a key to uniquely identify a context value
331
- *
332
- * @since 1.0.0
333
- */
334
- function createContextKey(description) {
335
- return Symbol.for(description);
336
- }
337
- var BaseContext, ROOT_CONTEXT;
338
- var init_context$1 = __esmMin((() => {
339
- BaseContext = class BaseContext {
340
- /**
341
- * Construct a new context which inherits values from an optional parent context.
342
- *
343
- * @param parentContext a context from which to inherit values
344
- */
345
- constructor(parentContext) {
346
- const self = this;
347
- self._currentContext = parentContext ? new Map(parentContext) : /* @__PURE__ */ new Map();
348
- self.getValue = (key) => self._currentContext.get(key);
349
- self.setValue = (key, value) => {
350
- const context = new BaseContext(self._currentContext);
351
- context._currentContext.set(key, value);
352
- return context;
353
- };
354
- self.deleteValue = (key) => {
355
- const context = new BaseContext(self._currentContext);
356
- context._currentContext.delete(key);
357
- return context;
358
- };
359
- }
360
- };
361
- ROOT_CONTEXT = new BaseContext();
362
- }));
363
- //#endregion
364
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/diag/consoleLogger.js
365
- var consoleMap, _originalConsoleMethods, DiagConsoleLogger;
366
- var init_consoleLogger = __esmMin((() => {
367
- consoleMap = [
368
- {
369
- n: "error",
370
- c: "error"
371
- },
372
- {
373
- n: "warn",
374
- c: "warn"
375
- },
376
- {
377
- n: "info",
378
- c: "info"
379
- },
380
- {
381
- n: "debug",
382
- c: "debug"
383
- },
384
- {
385
- n: "verbose",
386
- c: "trace"
387
- }
388
- ];
389
- _originalConsoleMethods = {};
390
- if (typeof console !== "undefined") {
391
- for (const key of [
392
- "error",
393
- "warn",
394
- "info",
395
- "debug",
396
- "trace",
397
- "log"
398
- ]) if (typeof console[key] === "function") _originalConsoleMethods[key] = console[key];
399
- }
400
- DiagConsoleLogger = class {
401
- constructor() {
402
- function _consoleFunc(funcName) {
403
- return function(...args) {
404
- let theFunc = _originalConsoleMethods[funcName];
405
- if (typeof theFunc !== "function") theFunc = _originalConsoleMethods["log"];
406
- if (typeof theFunc !== "function" && console) {
407
- theFunc = console[funcName];
408
- if (typeof theFunc !== "function") theFunc = console.log;
409
- }
410
- if (typeof theFunc === "function") return theFunc.apply(console, args);
411
- };
412
- }
413
- for (let i = 0; i < consoleMap.length; i++) this[consoleMap[i].n] = _consoleFunc(consoleMap[i].c);
414
- }
415
- };
416
- }));
417
- //#endregion
418
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/metrics/NoopMeter.js
419
- /**
420
- * Create a no-op Meter
421
- *
422
- * @since 1.3.0
423
- */
424
- function createNoopMeter() {
425
- return NOOP_METER;
426
- }
427
- var NoopMeter, NoopMetric, NoopCounterMetric, NoopUpDownCounterMetric, NoopGaugeMetric, NoopHistogramMetric, NoopObservableMetric, NoopObservableCounterMetric, NoopObservableGaugeMetric, NoopObservableUpDownCounterMetric, NOOP_METER, NOOP_COUNTER_METRIC, NOOP_GAUGE_METRIC, NOOP_HISTOGRAM_METRIC, NOOP_UP_DOWN_COUNTER_METRIC, NOOP_OBSERVABLE_COUNTER_METRIC, NOOP_OBSERVABLE_GAUGE_METRIC, NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC;
428
- var init_NoopMeter = __esmMin((() => {
429
- NoopMeter = class {
430
- constructor() {}
431
- /**
432
- * @see {@link Meter.createGauge}
433
- */
434
- createGauge(_name, _options) {
435
- return NOOP_GAUGE_METRIC;
436
- }
437
- /**
438
- * @see {@link Meter.createHistogram}
439
- */
440
- createHistogram(_name, _options) {
441
- return NOOP_HISTOGRAM_METRIC;
442
- }
443
- /**
444
- * @see {@link Meter.createCounter}
445
- */
446
- createCounter(_name, _options) {
447
- return NOOP_COUNTER_METRIC;
448
- }
449
- /**
450
- * @see {@link Meter.createUpDownCounter}
451
- */
452
- createUpDownCounter(_name, _options) {
453
- return NOOP_UP_DOWN_COUNTER_METRIC;
454
- }
455
- /**
456
- * @see {@link Meter.createObservableGauge}
457
- */
458
- createObservableGauge(_name, _options) {
459
- return NOOP_OBSERVABLE_GAUGE_METRIC;
460
- }
461
- /**
462
- * @see {@link Meter.createObservableCounter}
463
- */
464
- createObservableCounter(_name, _options) {
465
- return NOOP_OBSERVABLE_COUNTER_METRIC;
466
- }
467
- /**
468
- * @see {@link Meter.createObservableUpDownCounter}
469
- */
470
- createObservableUpDownCounter(_name, _options) {
471
- return NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC;
472
- }
473
- /**
474
- * @see {@link Meter.addBatchObservableCallback}
475
- */
476
- addBatchObservableCallback(_callback, _observables) {}
477
- /**
478
- * @see {@link Meter.removeBatchObservableCallback}
479
- */
480
- removeBatchObservableCallback(_callback) {}
481
- };
482
- NoopMetric = class {};
483
- NoopCounterMetric = class extends NoopMetric {
484
- add(_value, _attributes) {}
485
- };
486
- NoopUpDownCounterMetric = class extends NoopMetric {
487
- add(_value, _attributes) {}
488
- };
489
- NoopGaugeMetric = class extends NoopMetric {
490
- record(_value, _attributes) {}
491
- };
492
- NoopHistogramMetric = class extends NoopMetric {
493
- record(_value, _attributes) {}
494
- };
495
- NoopObservableMetric = class {
496
- addCallback(_callback) {}
497
- removeCallback(_callback) {}
498
- };
499
- NoopObservableCounterMetric = class extends NoopObservableMetric {};
500
- NoopObservableGaugeMetric = class extends NoopObservableMetric {};
501
- NoopObservableUpDownCounterMetric = class extends NoopObservableMetric {};
502
- NOOP_METER = new NoopMeter();
503
- NOOP_COUNTER_METRIC = new NoopCounterMetric();
504
- NOOP_GAUGE_METRIC = new NoopGaugeMetric();
505
- NOOP_HISTOGRAM_METRIC = new NoopHistogramMetric();
506
- NOOP_UP_DOWN_COUNTER_METRIC = new NoopUpDownCounterMetric();
507
- NOOP_OBSERVABLE_COUNTER_METRIC = new NoopObservableCounterMetric();
508
- NOOP_OBSERVABLE_GAUGE_METRIC = new NoopObservableGaugeMetric();
509
- NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = new NoopObservableUpDownCounterMetric();
510
- }));
511
- //#endregion
512
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/metrics/Metric.js
513
- var ValueType;
514
- var init_Metric = __esmMin((() => {
515
- (function(ValueType) {
516
- ValueType[ValueType["INT"] = 0] = "INT";
517
- ValueType[ValueType["DOUBLE"] = 1] = "DOUBLE";
518
- })(ValueType || (ValueType = {}));
519
- }));
520
- //#endregion
521
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/propagation/TextMapPropagator.js
522
- var defaultTextMapGetter, defaultTextMapSetter;
523
- var init_TextMapPropagator = __esmMin((() => {
524
- defaultTextMapGetter = {
525
- get(carrier, key) {
526
- if (carrier == null) return;
527
- return carrier[key];
528
- },
529
- keys(carrier) {
530
- if (carrier == null) return [];
531
- return Object.keys(carrier);
532
- }
533
- };
534
- defaultTextMapSetter = { set(carrier, key, value) {
535
- if (carrier == null) return;
536
- carrier[key] = value;
537
- } };
538
- }));
539
- //#endregion
540
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/context/NoopContextManager.js
541
- var NoopContextManager;
542
- var init_NoopContextManager = __esmMin((() => {
543
- init_context$1();
544
- NoopContextManager = class {
545
- active() {
546
- return ROOT_CONTEXT;
547
- }
548
- with(_context, fn, thisArg, ...args) {
549
- return fn.call(thisArg, ...args);
550
- }
551
- bind(_context, target) {
552
- return target;
553
- }
554
- enable() {
555
- return this;
556
- }
557
- disable() {
558
- return this;
559
- }
560
- };
561
- }));
562
- //#endregion
563
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/api/context.js
564
- var API_NAME$3, NOOP_CONTEXT_MANAGER, ContextAPI;
565
- var init_context = __esmMin((() => {
566
- init_NoopContextManager();
567
- init_global_utils();
568
- init_diag();
569
- API_NAME$3 = "context";
570
- NOOP_CONTEXT_MANAGER = new NoopContextManager();
571
- ContextAPI = class ContextAPI {
572
- /** Empty private constructor prevents end users from constructing a new instance of the API */
573
- constructor() {}
574
- /** Get the singleton instance of the Context API */
575
- static getInstance() {
576
- if (!this._instance) this._instance = new ContextAPI();
577
- return this._instance;
578
- }
579
- /**
580
- * Set the current context manager.
581
- *
582
- * @returns true if the context manager was successfully registered, else false
583
- */
584
- setGlobalContextManager(contextManager) {
585
- return registerGlobal(API_NAME$3, contextManager, DiagAPI.instance());
586
- }
587
- /**
588
- * Get the currently active context
589
- */
590
- active() {
591
- return this._getContextManager().active();
592
- }
593
- /**
594
- * Execute a function with an active context
595
- *
596
- * @param context context to be active during function execution
597
- * @param fn function to execute in a context
598
- * @param thisArg optional receiver to be used for calling fn
599
- * @param args optional arguments forwarded to fn
600
- */
601
- with(context, fn, thisArg, ...args) {
602
- return this._getContextManager().with(context, fn, thisArg, ...args);
603
- }
604
- /**
605
- * Bind a context to a target function or event emitter
606
- *
607
- * @param context context to bind to the event emitter or function. Defaults to the currently active context
608
- * @param target function or event emitter to bind
609
- */
610
- bind(context, target) {
611
- return this._getContextManager().bind(context, target);
612
- }
613
- _getContextManager() {
614
- return getGlobal(API_NAME$3) || NOOP_CONTEXT_MANAGER;
615
- }
616
- /** Disable and remove the global context manager */
617
- disable() {
618
- this._getContextManager().disable();
619
- unregisterGlobal(API_NAME$3, DiagAPI.instance());
620
- }
621
- };
622
- }));
623
- //#endregion
624
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/trace_flags.js
625
- var TraceFlags;
626
- var init_trace_flags = __esmMin((() => {
627
- (function(TraceFlags) {
628
- /** Represents no flag set. */
629
- TraceFlags[TraceFlags["NONE"] = 0] = "NONE";
630
- /** Bit to represent whether trace is sampled in trace flags. */
631
- TraceFlags[TraceFlags["SAMPLED"] = 1] = "SAMPLED";
632
- })(TraceFlags || (TraceFlags = {}));
633
- }));
634
- //#endregion
635
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/invalid-span-constants.js
636
- var INVALID_SPANID, INVALID_TRACEID, INVALID_SPAN_CONTEXT;
637
- var init_invalid_span_constants = __esmMin((() => {
638
- init_trace_flags();
639
- INVALID_SPANID = "0000000000000000";
640
- INVALID_TRACEID = "00000000000000000000000000000000";
641
- INVALID_SPAN_CONTEXT = {
642
- traceId: INVALID_TRACEID,
643
- spanId: INVALID_SPANID,
644
- traceFlags: TraceFlags.NONE
645
- };
646
- }));
647
- //#endregion
648
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/NonRecordingSpan.js
649
- var NonRecordingSpan;
650
- var init_NonRecordingSpan = __esmMin((() => {
651
- init_invalid_span_constants();
652
- NonRecordingSpan = class {
653
- constructor(spanContext = INVALID_SPAN_CONTEXT) {
654
- this._spanContext = spanContext;
655
- }
656
- spanContext() {
657
- return this._spanContext;
658
- }
659
- setAttribute(_key, _value) {
660
- return this;
661
- }
662
- setAttributes(_attributes) {
663
- return this;
664
- }
665
- addEvent(_name, _attributes) {
666
- return this;
667
- }
668
- addLink(_link) {
669
- return this;
670
- }
671
- addLinks(_links) {
672
- return this;
673
- }
674
- setStatus(_status) {
675
- return this;
676
- }
677
- updateName(_name) {
678
- return this;
679
- }
680
- end(_endTime) {}
681
- isRecording() {
682
- return false;
683
- }
684
- recordException(_exception, _time) {}
685
- };
686
- }));
687
- //#endregion
688
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/context-utils.js
689
- /**
690
- * Return the span if one exists
691
- *
692
- * @param context context to get span from
693
- */
694
- function getSpan(context) {
695
- return context.getValue(SPAN_KEY) || void 0;
696
- }
697
- /**
698
- * Gets the span from the current context, if one exists.
699
- */
700
- function getActiveSpan() {
701
- return getSpan(ContextAPI.getInstance().active());
702
- }
703
- /**
704
- * Set the span on a context
705
- *
706
- * @param context context to use as parent
707
- * @param span span to set active
708
- */
709
- function setSpan(context, span) {
710
- return context.setValue(SPAN_KEY, span);
711
- }
712
- /**
713
- * Remove current span stored in the context
714
- *
715
- * @param context context to delete span from
716
- */
717
- function deleteSpan(context) {
718
- return context.deleteValue(SPAN_KEY);
719
- }
720
- /**
721
- * Wrap span context in a NoopSpan and set as span in a new
722
- * context
723
- *
724
- * @param context context to set active span on
725
- * @param spanContext span context to be wrapped
726
- */
727
- function setSpanContext(context, spanContext) {
728
- return setSpan(context, new NonRecordingSpan(spanContext));
729
- }
730
- /**
731
- * Get the span context of the span if it exists.
732
- *
733
- * @param context context to get values from
734
- */
735
- function getSpanContext(context) {
736
- var _a;
737
- return (_a = getSpan(context)) === null || _a === void 0 ? void 0 : _a.spanContext();
738
- }
739
- var SPAN_KEY;
740
- var init_context_utils = __esmMin((() => {
741
- init_context$1();
742
- init_NonRecordingSpan();
743
- init_context();
744
- SPAN_KEY = createContextKey("OpenTelemetry Context Key SPAN");
745
- }));
746
- //#endregion
747
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/spancontext-utils.js
748
- function isValidHex(id, length) {
749
- if (typeof id !== "string" || id.length !== length) return false;
750
- let r = 0;
751
- for (let i = 0; i < id.length; i += 4) r += (isHex[id.charCodeAt(i)] | 0) + (isHex[id.charCodeAt(i + 1)] | 0) + (isHex[id.charCodeAt(i + 2)] | 0) + (isHex[id.charCodeAt(i + 3)] | 0);
752
- return r === length;
753
- }
754
- /**
755
- * @since 1.0.0
756
- */
757
- function isValidTraceId(traceId) {
758
- return isValidHex(traceId, 32) && traceId !== "00000000000000000000000000000000";
759
- }
760
- /**
761
- * @since 1.0.0
762
- */
763
- function isValidSpanId(spanId) {
764
- return isValidHex(spanId, 16) && spanId !== "0000000000000000";
765
- }
766
- /**
767
- * Returns true if this {@link SpanContext} is valid.
768
- * @return true if this {@link SpanContext} is valid.
769
- *
770
- * @since 1.0.0
771
- */
772
- function isSpanContextValid(spanContext) {
773
- return isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId);
774
- }
775
- /**
776
- * Wrap the given {@link SpanContext} in a new non-recording {@link Span}
777
- *
778
- * @param spanContext span context to be wrapped
779
- * @returns a new non-recording {@link Span} with the provided context
780
- */
781
- function wrapSpanContext(spanContext) {
782
- return new NonRecordingSpan(spanContext);
783
- }
784
- var isHex;
785
- var init_spancontext_utils = __esmMin((() => {
786
- init_invalid_span_constants();
787
- init_NonRecordingSpan();
788
- isHex = new Uint8Array([
789
- 0,
790
- 0,
791
- 0,
792
- 0,
793
- 0,
794
- 0,
795
- 0,
796
- 0,
797
- 0,
798
- 0,
799
- 0,
800
- 0,
801
- 0,
802
- 0,
803
- 0,
804
- 0,
805
- 0,
806
- 0,
807
- 0,
808
- 0,
809
- 0,
810
- 0,
811
- 0,
812
- 0,
813
- 0,
814
- 0,
815
- 0,
816
- 0,
817
- 0,
818
- 0,
819
- 0,
820
- 0,
821
- 0,
822
- 0,
823
- 0,
824
- 0,
825
- 0,
826
- 0,
827
- 0,
828
- 0,
829
- 0,
830
- 0,
831
- 0,
832
- 0,
833
- 0,
834
- 0,
835
- 0,
836
- 0,
837
- 1,
838
- 1,
839
- 1,
840
- 1,
841
- 1,
842
- 1,
843
- 1,
844
- 1,
845
- 1,
846
- 1,
847
- 0,
848
- 0,
849
- 0,
850
- 0,
851
- 0,
852
- 0,
853
- 0,
854
- 1,
855
- 1,
856
- 1,
857
- 1,
858
- 1,
859
- 1,
860
- 0,
861
- 0,
862
- 0,
863
- 0,
864
- 0,
865
- 0,
866
- 0,
867
- 0,
868
- 0,
869
- 0,
870
- 0,
871
- 0,
872
- 0,
873
- 0,
874
- 0,
875
- 0,
876
- 0,
877
- 0,
878
- 0,
879
- 0,
880
- 0,
881
- 0,
882
- 0,
883
- 0,
884
- 0,
885
- 0,
886
- 1,
887
- 1,
888
- 1,
889
- 1,
890
- 1,
891
- 1
892
- ]);
893
- }));
894
- //#endregion
895
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/NoopTracer.js
896
- function isSpanContext(spanContext) {
897
- return spanContext !== null && typeof spanContext === "object" && "spanId" in spanContext && typeof spanContext["spanId"] === "string" && "traceId" in spanContext && typeof spanContext["traceId"] === "string" && "traceFlags" in spanContext && typeof spanContext["traceFlags"] === "number";
898
- }
899
- var contextApi, NoopTracer;
900
- var init_NoopTracer = __esmMin((() => {
901
- init_context();
902
- init_context_utils();
903
- init_NonRecordingSpan();
904
- init_spancontext_utils();
905
- contextApi = ContextAPI.getInstance();
906
- NoopTracer = class {
907
- startSpan(name, options, context = contextApi.active()) {
908
- if (Boolean(options === null || options === void 0 ? void 0 : options.root)) return new NonRecordingSpan();
909
- const parentFromContext = context && getSpanContext(context);
910
- if (isSpanContext(parentFromContext) && isSpanContextValid(parentFromContext)) return new NonRecordingSpan(parentFromContext);
911
- else return new NonRecordingSpan();
912
- }
913
- startActiveSpan(name, arg2, arg3, arg4) {
914
- let opts;
915
- let ctx;
916
- let fn;
917
- if (arguments.length < 2) return;
918
- else if (arguments.length === 2) fn = arg2;
919
- else if (arguments.length === 3) {
920
- opts = arg2;
921
- fn = arg3;
922
- } else {
923
- opts = arg2;
924
- ctx = arg3;
925
- fn = arg4;
926
- }
927
- const parentContext = ctx !== null && ctx !== void 0 ? ctx : contextApi.active();
928
- const span = this.startSpan(name, opts, parentContext);
929
- const contextWithSpanSet = setSpan(parentContext, span);
930
- return contextApi.with(contextWithSpanSet, fn, void 0, span);
931
- }
932
- };
933
- }));
934
- //#endregion
935
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/ProxyTracer.js
936
- var NOOP_TRACER, ProxyTracer;
937
- var init_ProxyTracer = __esmMin((() => {
938
- init_NoopTracer();
939
- NOOP_TRACER = new NoopTracer();
940
- ProxyTracer = class {
941
- constructor(provider, name, version, options) {
942
- this._provider = provider;
943
- this.name = name;
944
- this.version = version;
945
- this.options = options;
946
- }
947
- startSpan(name, options, context) {
948
- return this._getTracer().startSpan(name, options, context);
949
- }
950
- startActiveSpan(_name, _options, _context, _fn) {
951
- const tracer = this._getTracer();
952
- return Reflect.apply(tracer.startActiveSpan, tracer, arguments);
953
- }
954
- /**
955
- * Try to get a tracer from the proxy tracer provider.
956
- * If the proxy tracer provider has no delegate, return a noop tracer.
957
- */
958
- _getTracer() {
959
- if (this._delegate) return this._delegate;
960
- const tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);
961
- if (!tracer) return NOOP_TRACER;
962
- this._delegate = tracer;
963
- return this._delegate;
964
- }
965
- };
966
- }));
967
- //#endregion
968
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/NoopTracerProvider.js
969
- var NoopTracerProvider;
970
- var init_NoopTracerProvider = __esmMin((() => {
971
- init_NoopTracer();
972
- NoopTracerProvider = class {
973
- getTracer(_name, _version, _options) {
974
- return new NoopTracer();
975
- }
976
- };
977
- }));
978
- //#endregion
979
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/ProxyTracerProvider.js
980
- var NOOP_TRACER_PROVIDER, ProxyTracerProvider;
981
- var init_ProxyTracerProvider = __esmMin((() => {
982
- init_ProxyTracer();
983
- init_NoopTracerProvider();
984
- NOOP_TRACER_PROVIDER = new NoopTracerProvider();
985
- ProxyTracerProvider = class {
986
- /**
987
- * Get a {@link ProxyTracer}
988
- */
989
- getTracer(name, version, options) {
990
- var _a;
991
- return (_a = this.getDelegateTracer(name, version, options)) !== null && _a !== void 0 ? _a : new ProxyTracer(this, name, version, options);
992
- }
993
- getDelegate() {
994
- var _a;
995
- return (_a = this._delegate) !== null && _a !== void 0 ? _a : NOOP_TRACER_PROVIDER;
996
- }
997
- /**
998
- * Set the delegate tracer provider
999
- */
1000
- setDelegate(delegate) {
1001
- this._delegate = delegate;
1002
- }
1003
- getDelegateTracer(name, version, options) {
1004
- var _a;
1005
- return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version, options);
1006
- }
1007
- };
1008
- }));
1009
- //#endregion
1010
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/SamplingResult.js
1011
- var SamplingDecision;
1012
- var init_SamplingResult = __esmMin((() => {
1013
- (function(SamplingDecision) {
1014
- /**
1015
- * `Span.isRecording() === false`, span will not be recorded and all events
1016
- * and attributes will be dropped.
1017
- */
1018
- SamplingDecision[SamplingDecision["NOT_RECORD"] = 0] = "NOT_RECORD";
1019
- /**
1020
- * `Span.isRecording() === true`, but `Sampled` flag in {@link TraceFlags}
1021
- * MUST NOT be set.
1022
- */
1023
- SamplingDecision[SamplingDecision["RECORD"] = 1] = "RECORD";
1024
- /**
1025
- * `Span.isRecording() === true` AND `Sampled` flag in {@link TraceFlags}
1026
- * MUST be set.
1027
- */
1028
- SamplingDecision[SamplingDecision["RECORD_AND_SAMPLED"] = 2] = "RECORD_AND_SAMPLED";
1029
- })(SamplingDecision || (SamplingDecision = {}));
1030
- }));
1031
- //#endregion
1032
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/span_kind.js
1033
- var SpanKind;
1034
- var init_span_kind = __esmMin((() => {
1035
- (function(SpanKind) {
1036
- /** Default value. Indicates that the span is used internally. */
1037
- SpanKind[SpanKind["INTERNAL"] = 0] = "INTERNAL";
1038
- /**
1039
- * Indicates that the span covers server-side handling of an RPC or other
1040
- * remote request.
1041
- */
1042
- SpanKind[SpanKind["SERVER"] = 1] = "SERVER";
1043
- /**
1044
- * Indicates that the span covers the client-side wrapper around an RPC or
1045
- * other remote request.
1046
- */
1047
- SpanKind[SpanKind["CLIENT"] = 2] = "CLIENT";
1048
- /**
1049
- * Indicates that the span describes producer sending a message to a
1050
- * broker. Unlike client and server, there is no direct critical path latency
1051
- * relationship between producer and consumer spans.
1052
- */
1053
- SpanKind[SpanKind["PRODUCER"] = 3] = "PRODUCER";
1054
- /**
1055
- * Indicates that the span describes consumer receiving a message from a
1056
- * broker. Unlike client and server, there is no direct critical path latency
1057
- * relationship between producer and consumer spans.
1058
- */
1059
- SpanKind[SpanKind["CONSUMER"] = 4] = "CONSUMER";
1060
- })(SpanKind || (SpanKind = {}));
1061
- }));
1062
- //#endregion
1063
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/status.js
1064
- var SpanStatusCode;
1065
- var init_status = __esmMin((() => {
1066
- (function(SpanStatusCode) {
1067
- /**
1068
- * The default status.
1069
- */
1070
- SpanStatusCode[SpanStatusCode["UNSET"] = 0] = "UNSET";
1071
- /**
1072
- * The operation has been validated by an Application developer or
1073
- * Operator to have completed successfully.
1074
- */
1075
- SpanStatusCode[SpanStatusCode["OK"] = 1] = "OK";
1076
- /**
1077
- * The operation contains an error.
1078
- */
1079
- SpanStatusCode[SpanStatusCode["ERROR"] = 2] = "ERROR";
1080
- })(SpanStatusCode || (SpanStatusCode = {}));
1081
- }));
1082
- //#endregion
1083
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/internal/tracestate-validators.js
1084
- /**
1085
- * Key is opaque string up to 256 characters printable. It MUST begin with a
1086
- * lowercase letter, and can only contain lowercase letters a-z, digits 0-9,
1087
- * underscores _, dashes -, asterisks *, and forward slashes /.
1088
- * For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the
1089
- * vendor name. Vendors SHOULD set the tenant ID at the beginning of the key.
1090
- * see https://www.w3.org/TR/trace-context/#key
1091
- */
1092
- function validateKey(key) {
1093
- return VALID_KEY_REGEX.test(key);
1094
- }
1095
- /**
1096
- * Value is opaque string up to 256 characters printable ASCII RFC0020
1097
- * characters (i.e., the range 0x20 to 0x7E) except comma , and =.
1098
- */
1099
- function validateValue(value) {
1100
- return VALID_VALUE_BASE_REGEX.test(value) && !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value);
1101
- }
1102
- var VALID_KEY_CHAR_RANGE, VALID_KEY, VALID_VENDOR_KEY, VALID_KEY_REGEX, VALID_VALUE_BASE_REGEX, INVALID_VALUE_COMMA_EQUAL_REGEX;
1103
- var init_tracestate_validators = __esmMin((() => {
1104
- VALID_KEY_CHAR_RANGE = "[_0-9a-z-*/]";
1105
- VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;
1106
- VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;
1107
- VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);
1108
- VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;
1109
- INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
1110
- }));
1111
- //#endregion
1112
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/internal/tracestate-impl.js
1113
- var MAX_TRACE_STATE_ITEMS, MAX_TRACE_STATE_LEN, LIST_MEMBERS_SEPARATOR, LIST_MEMBER_KEY_VALUE_SPLITTER, TraceStateImpl;
1114
- var init_tracestate_impl = __esmMin((() => {
1115
- init_tracestate_validators();
1116
- MAX_TRACE_STATE_ITEMS = 32;
1117
- MAX_TRACE_STATE_LEN = 512;
1118
- LIST_MEMBERS_SEPARATOR = ",";
1119
- LIST_MEMBER_KEY_VALUE_SPLITTER = "=";
1120
- TraceStateImpl = class TraceStateImpl {
1121
- constructor(rawTraceState) {
1122
- this._internalState = /* @__PURE__ */ new Map();
1123
- if (rawTraceState) this._parse(rawTraceState);
1124
- }
1125
- set(key, value) {
1126
- const traceState = this._clone();
1127
- if (traceState._internalState.has(key)) traceState._internalState.delete(key);
1128
- traceState._internalState.set(key, value);
1129
- return traceState;
1130
- }
1131
- unset(key) {
1132
- const traceState = this._clone();
1133
- traceState._internalState.delete(key);
1134
- return traceState;
1135
- }
1136
- get(key) {
1137
- return this._internalState.get(key);
1138
- }
1139
- serialize() {
1140
- return Array.from(this._internalState.keys()).reduceRight((agg, key) => {
1141
- agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));
1142
- return agg;
1143
- }, []).join(LIST_MEMBERS_SEPARATOR);
1144
- }
1145
- _parse(rawTraceState) {
1146
- if (rawTraceState.length > MAX_TRACE_STATE_LEN) return;
1147
- this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR).reduceRight((agg, part) => {
1148
- const listMember = part.trim();
1149
- const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
1150
- if (i !== -1) {
1151
- const key = listMember.slice(0, i);
1152
- const value = listMember.slice(i + 1, part.length);
1153
- if (validateKey(key) && validateValue(value)) agg.set(key, value);
1154
- }
1155
- return agg;
1156
- }, /* @__PURE__ */ new Map());
1157
- if (this._internalState.size > MAX_TRACE_STATE_ITEMS) this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, MAX_TRACE_STATE_ITEMS));
1158
- }
1159
- _keys() {
1160
- return Array.from(this._internalState.keys()).reverse();
1161
- }
1162
- _clone() {
1163
- const traceState = new TraceStateImpl();
1164
- traceState._internalState = new Map(this._internalState);
1165
- return traceState;
1166
- }
1167
- };
1168
- }));
1169
- //#endregion
1170
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/internal/utils.js
1171
- /**
1172
- * @since 1.1.0
1173
- */
1174
- function createTraceState(rawTraceState) {
1175
- return new TraceStateImpl(rawTraceState);
1176
- }
1177
- var init_utils = __esmMin((() => {
1178
- init_tracestate_impl();
1179
- }));
1180
- //#endregion
1181
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/context-api.js
1182
- var context;
1183
- var init_context_api = __esmMin((() => {
1184
- init_context();
1185
- context = ContextAPI.getInstance();
1186
- }));
1187
- //#endregion
1188
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/diag-api.js
1189
- var diag;
1190
- var init_diag_api = __esmMin((() => {
1191
- init_diag();
1192
- diag = DiagAPI.instance();
1193
- }));
1194
- //#endregion
1195
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/metrics/NoopMeterProvider.js
1196
- var NoopMeterProvider, NOOP_METER_PROVIDER;
1197
- var init_NoopMeterProvider = __esmMin((() => {
1198
- init_NoopMeter();
1199
- NoopMeterProvider = class {
1200
- getMeter(_name, _version, _options) {
1201
- return NOOP_METER;
1202
- }
1203
- };
1204
- NOOP_METER_PROVIDER = new NoopMeterProvider();
1205
- }));
1206
- //#endregion
1207
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/api/metrics.js
1208
- var API_NAME$2, MetricsAPI;
1209
- var init_metrics = __esmMin((() => {
1210
- init_NoopMeterProvider();
1211
- init_global_utils();
1212
- init_diag();
1213
- API_NAME$2 = "metrics";
1214
- MetricsAPI = class MetricsAPI {
1215
- /** Empty private constructor prevents end users from constructing a new instance of the API */
1216
- constructor() {}
1217
- /** Get the singleton instance of the Metrics API */
1218
- static getInstance() {
1219
- if (!this._instance) this._instance = new MetricsAPI();
1220
- return this._instance;
1221
- }
1222
- /**
1223
- * Set the current global meter provider.
1224
- * Returns true if the meter provider was successfully registered, else false.
1225
- */
1226
- setGlobalMeterProvider(provider) {
1227
- return registerGlobal(API_NAME$2, provider, DiagAPI.instance());
1228
- }
1229
- /**
1230
- * Returns the global meter provider.
1231
- */
1232
- getMeterProvider() {
1233
- return getGlobal(API_NAME$2) || NOOP_METER_PROVIDER;
1234
- }
1235
- /**
1236
- * Returns a meter from the global meter provider.
1237
- */
1238
- getMeter(name, version, options) {
1239
- return this.getMeterProvider().getMeter(name, version, options);
1240
- }
1241
- /** Remove the global meter provider */
1242
- disable() {
1243
- unregisterGlobal(API_NAME$2, DiagAPI.instance());
1244
- }
1245
- };
1246
- }));
1247
- //#endregion
1248
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/metrics-api.js
1249
- var metrics;
1250
- var init_metrics_api = __esmMin((() => {
1251
- init_metrics();
1252
- metrics = MetricsAPI.getInstance();
1253
- }));
1254
- //#endregion
1255
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/propagation/NoopTextMapPropagator.js
1256
- var NoopTextMapPropagator;
1257
- var init_NoopTextMapPropagator = __esmMin((() => {
1258
- NoopTextMapPropagator = class {
1259
- /** Noop inject function does nothing */
1260
- inject(_context, _carrier) {}
1261
- /** Noop extract function does nothing and returns the input context */
1262
- extract(context, _carrier) {
1263
- return context;
1264
- }
1265
- fields() {
1266
- return [];
1267
- }
1268
- };
1269
- }));
1270
- //#endregion
1271
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/baggage/context-helpers.js
1272
- /**
1273
- * Retrieve the current baggage from the given context
1274
- *
1275
- * @param {Context} Context that manage all context values
1276
- * @returns {Baggage} Extracted baggage from the context
1277
- */
1278
- function getBaggage(context) {
1279
- return context.getValue(BAGGAGE_KEY) || void 0;
1280
- }
1281
- /**
1282
- * Retrieve the current baggage from the active/current context
1283
- *
1284
- * @returns {Baggage} Extracted baggage from the context
1285
- */
1286
- function getActiveBaggage() {
1287
- return getBaggage(ContextAPI.getInstance().active());
1288
- }
1289
- /**
1290
- * Store a baggage in the given context
1291
- *
1292
- * @param {Context} Context that manage all context values
1293
- * @param {Baggage} baggage that will be set in the actual context
1294
- */
1295
- function setBaggage(context, baggage) {
1296
- return context.setValue(BAGGAGE_KEY, baggage);
1297
- }
1298
- /**
1299
- * Delete the baggage stored in the given context
1300
- *
1301
- * @param {Context} Context that manage all context values
1302
- */
1303
- function deleteBaggage(context) {
1304
- return context.deleteValue(BAGGAGE_KEY);
1305
- }
1306
- var BAGGAGE_KEY;
1307
- var init_context_helpers = __esmMin((() => {
1308
- init_context();
1309
- init_context$1();
1310
- BAGGAGE_KEY = createContextKey("OpenTelemetry Baggage Key");
1311
- }));
1312
- //#endregion
1313
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/api/propagation.js
1314
- var API_NAME$1, NOOP_TEXT_MAP_PROPAGATOR, PropagationAPI;
1315
- var init_propagation = __esmMin((() => {
1316
- init_global_utils();
1317
- init_NoopTextMapPropagator();
1318
- init_TextMapPropagator();
1319
- init_context_helpers();
1320
- init_utils$1();
1321
- init_diag();
1322
- API_NAME$1 = "propagation";
1323
- NOOP_TEXT_MAP_PROPAGATOR = new NoopTextMapPropagator();
1324
- PropagationAPI = class PropagationAPI {
1325
- /** Empty private constructor prevents end users from constructing a new instance of the API */
1326
- constructor() {
1327
- this.createBaggage = createBaggage;
1328
- this.getBaggage = getBaggage;
1329
- this.getActiveBaggage = getActiveBaggage;
1330
- this.setBaggage = setBaggage;
1331
- this.deleteBaggage = deleteBaggage;
1332
- }
1333
- /** Get the singleton instance of the Propagator API */
1334
- static getInstance() {
1335
- if (!this._instance) this._instance = new PropagationAPI();
1336
- return this._instance;
1337
- }
1338
- /**
1339
- * Set the current propagator.
1340
- *
1341
- * @returns true if the propagator was successfully registered, else false
1342
- */
1343
- setGlobalPropagator(propagator) {
1344
- return registerGlobal(API_NAME$1, propagator, DiagAPI.instance());
1345
- }
1346
- /**
1347
- * Inject context into a carrier to be propagated inter-process
1348
- *
1349
- * @param context Context carrying tracing data to inject
1350
- * @param carrier carrier to inject context into
1351
- * @param setter Function used to set values on the carrier
1352
- */
1353
- inject(context, carrier, setter = defaultTextMapSetter) {
1354
- return this._getGlobalPropagator().inject(context, carrier, setter);
1355
- }
1356
- /**
1357
- * Extract context from a carrier
1358
- *
1359
- * @param context Context which the newly created context will inherit from
1360
- * @param carrier Carrier to extract context from
1361
- * @param getter Function used to extract keys from a carrier
1362
- */
1363
- extract(context, carrier, getter = defaultTextMapGetter) {
1364
- return this._getGlobalPropagator().extract(context, carrier, getter);
1365
- }
1366
- /**
1367
- * Return a list of all fields which may be used by the propagator.
1368
- */
1369
- fields() {
1370
- return this._getGlobalPropagator().fields();
1371
- }
1372
- /** Remove the global propagator */
1373
- disable() {
1374
- unregisterGlobal(API_NAME$1, DiagAPI.instance());
1375
- }
1376
- _getGlobalPropagator() {
1377
- return getGlobal(API_NAME$1) || NOOP_TEXT_MAP_PROPAGATOR;
1378
- }
1379
- };
1380
- }));
1381
- //#endregion
1382
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/propagation-api.js
1383
- var propagation;
1384
- var init_propagation_api = __esmMin((() => {
1385
- init_propagation();
1386
- propagation = PropagationAPI.getInstance();
1387
- }));
1388
- //#endregion
1389
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/api/trace.js
1390
- var API_NAME, TraceAPI;
1391
- var init_trace = __esmMin((() => {
1392
- init_global_utils();
1393
- init_ProxyTracerProvider();
1394
- init_spancontext_utils();
1395
- init_context_utils();
1396
- init_diag();
1397
- API_NAME = "trace";
1398
- TraceAPI = class TraceAPI {
1399
- /** Empty private constructor prevents end users from constructing a new instance of the API */
1400
- constructor() {
1401
- this._proxyTracerProvider = new ProxyTracerProvider();
1402
- this.wrapSpanContext = wrapSpanContext;
1403
- this.isSpanContextValid = isSpanContextValid;
1404
- this.deleteSpan = deleteSpan;
1405
- this.getSpan = getSpan;
1406
- this.getActiveSpan = getActiveSpan;
1407
- this.getSpanContext = getSpanContext;
1408
- this.setSpan = setSpan;
1409
- this.setSpanContext = setSpanContext;
1410
- }
1411
- /** Get the singleton instance of the Trace API */
1412
- static getInstance() {
1413
- if (!this._instance) this._instance = new TraceAPI();
1414
- return this._instance;
1415
- }
1416
- /**
1417
- * Set the current global tracer.
1418
- *
1419
- * @returns true if the tracer provider was successfully registered, else false
1420
- */
1421
- setGlobalTracerProvider(provider) {
1422
- const success = registerGlobal(API_NAME, this._proxyTracerProvider, DiagAPI.instance());
1423
- if (success) this._proxyTracerProvider.setDelegate(provider);
1424
- return success;
1425
- }
1426
- /**
1427
- * Returns the global tracer provider.
1428
- */
1429
- getTracerProvider() {
1430
- return getGlobal(API_NAME) || this._proxyTracerProvider;
1431
- }
1432
- /**
1433
- * Returns a tracer from the global tracer provider.
1434
- */
1435
- getTracer(name, version) {
1436
- return this.getTracerProvider().getTracer(name, version);
1437
- }
1438
- /** Remove the global tracer provider */
1439
- disable() {
1440
- unregisterGlobal(API_NAME, DiagAPI.instance());
1441
- this._proxyTracerProvider = new ProxyTracerProvider();
1442
- }
1443
- };
1444
- }));
1445
- //#endregion
1446
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace-api.js
1447
- var trace;
1448
- var init_trace_api = __esmMin((() => {
1449
- init_trace();
1450
- trace = TraceAPI.getInstance();
1451
- }));
1452
- //#endregion
1453
- //#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/index.js
1454
- var esm_exports = /* @__PURE__ */ __exportAll({
1455
- DiagConsoleLogger: () => DiagConsoleLogger,
1456
- DiagLogLevel: () => DiagLogLevel,
1457
- INVALID_SPANID: () => INVALID_SPANID,
1458
- INVALID_SPAN_CONTEXT: () => INVALID_SPAN_CONTEXT,
1459
- INVALID_TRACEID: () => INVALID_TRACEID,
1460
- ProxyTracer: () => ProxyTracer,
1461
- ProxyTracerProvider: () => ProxyTracerProvider,
1462
- ROOT_CONTEXT: () => ROOT_CONTEXT,
1463
- SamplingDecision: () => SamplingDecision,
1464
- SpanKind: () => SpanKind,
1465
- SpanStatusCode: () => SpanStatusCode,
1466
- TraceFlags: () => TraceFlags,
1467
- ValueType: () => ValueType,
1468
- baggageEntryMetadataFromString: () => baggageEntryMetadataFromString,
1469
- context: () => context,
1470
- createContextKey: () => createContextKey,
1471
- createNoopMeter: () => createNoopMeter,
1472
- createTraceState: () => createTraceState,
1473
- default: () => esm_default,
1474
- defaultTextMapGetter: () => defaultTextMapGetter,
1475
- defaultTextMapSetter: () => defaultTextMapSetter,
1476
- diag: () => diag,
1477
- isSpanContextValid: () => isSpanContextValid,
1478
- isValidSpanId: () => isValidSpanId,
1479
- isValidTraceId: () => isValidTraceId,
1480
- metrics: () => metrics,
1481
- propagation: () => propagation,
1482
- trace: () => trace
1483
- });
1484
- var esm_default;
1485
- var init_esm = __esmMin((() => {
1486
- init_utils$1();
1487
- init_context$1();
1488
- init_consoleLogger();
1489
- init_types();
1490
- init_NoopMeter();
1491
- init_Metric();
1492
- init_TextMapPropagator();
1493
- init_ProxyTracer();
1494
- init_ProxyTracerProvider();
1495
- init_SamplingResult();
1496
- init_span_kind();
1497
- init_status();
1498
- init_trace_flags();
1499
- init_utils();
1500
- init_spancontext_utils();
1501
- init_invalid_span_constants();
1502
- init_context_api();
1503
- init_diag_api();
1504
- init_metrics_api();
1505
- init_propagation_api();
1506
- init_trace_api();
1507
- esm_default = {
1508
- context,
1509
- diag,
1510
- metrics,
1511
- propagation,
1512
- trace
1513
- };
1514
- }));
1515
- //#endregion
1516
- export { metrics as a, SpanStatusCode as c, createContextKey as d, DiagLogLevel as f, propagation as i, SpanKind as l, init_esm as n, diag as o, trace as r, context as s, esm_exports as t, DiagConsoleLogger as u };