agentv 3.1.0 → 3.2.1

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 (70) hide show
  1. package/dist/agentv-provider-5CJVBBGG-2XVZBW7L.js +9 -0
  2. package/dist/agentv-provider-5CJVBBGG-2XVZBW7L.js.map +1 -0
  3. package/dist/chunk-3L2L5GIL.js +51 -0
  4. package/dist/chunk-3L2L5GIL.js.map +1 -0
  5. package/dist/chunk-5H446C7X.js +50 -0
  6. package/dist/chunk-5H446C7X.js.map +1 -0
  7. package/dist/chunk-6GSYTMXD.js +31520 -0
  8. package/dist/chunk-6GSYTMXD.js.map +1 -0
  9. package/dist/chunk-BL4PVUAT.js +261 -0
  10. package/dist/chunk-BL4PVUAT.js.map +1 -0
  11. package/dist/chunk-C5GOHBQM.js +84 -0
  12. package/dist/chunk-C5GOHBQM.js.map +1 -0
  13. package/dist/chunk-CY4TSIZS.js +6149 -0
  14. package/dist/chunk-CY4TSIZS.js.map +1 -0
  15. package/dist/chunk-JK6V4KVD.js +114 -0
  16. package/dist/chunk-JK6V4KVD.js.map +1 -0
  17. package/dist/chunk-LRULMAAA.js +1711 -0
  18. package/dist/chunk-LRULMAAA.js.map +1 -0
  19. package/dist/chunk-QHH6QXNY.js +24380 -0
  20. package/dist/chunk-QHH6QXNY.js.map +1 -0
  21. package/dist/chunk-QZRZDCHV.js +4263 -0
  22. package/dist/chunk-QZRZDCHV.js.map +1 -0
  23. package/dist/chunk-SR4I5KET.js +1238 -0
  24. package/dist/chunk-SR4I5KET.js.map +1 -0
  25. package/dist/chunk-VQ2ZO7XJ.js +2098 -0
  26. package/dist/chunk-VQ2ZO7XJ.js.map +1 -0
  27. package/dist/chunk-XALGXSKB.js +21 -0
  28. package/dist/chunk-XALGXSKB.js.map +1 -0
  29. package/dist/chunk-XOSNETAV.js +565 -0
  30. package/dist/chunk-XOSNETAV.js.map +1 -0
  31. package/dist/cli.js +29 -0
  32. package/dist/cli.js.map +1 -0
  33. package/dist/dist-NOJMJ5CF.js +305 -0
  34. package/dist/dist-NOJMJ5CF.js.map +1 -0
  35. package/dist/esm-5Q4BZALM-5REQWAUV.js +924 -0
  36. package/dist/esm-5Q4BZALM-5REQWAUV.js.map +1 -0
  37. package/dist/esm-CZAWIY6F.js +32 -0
  38. package/dist/esm-CZAWIY6F.js.map +1 -0
  39. package/dist/esm-QNEMCJPL.js +933 -0
  40. package/dist/esm-QNEMCJPL.js.map +1 -0
  41. package/dist/esm-R77SNOF5.js +65 -0
  42. package/dist/esm-R77SNOF5.js.map +1 -0
  43. package/dist/esm-RVQPUGWH.js +1207 -0
  44. package/dist/esm-RVQPUGWH.js.map +1 -0
  45. package/dist/getMachineId-bsd-HSK5LZMG.js +41 -0
  46. package/dist/getMachineId-bsd-HSK5LZMG.js.map +1 -0
  47. package/dist/getMachineId-darwin-4DP6CCJV.js +41 -0
  48. package/dist/getMachineId-darwin-4DP6CCJV.js.map +1 -0
  49. package/dist/getMachineId-linux-44LJ5UJB.js +33 -0
  50. package/dist/getMachineId-linux-44LJ5UJB.js.map +1 -0
  51. package/dist/getMachineId-unsupported-NVK6IATM.js +24 -0
  52. package/dist/getMachineId-unsupported-NVK6IATM.js.map +1 -0
  53. package/dist/getMachineId-win-YZ36S7VA.js +43 -0
  54. package/dist/getMachineId-win-YZ36S7VA.js.map +1 -0
  55. package/dist/index.js +20 -0
  56. package/dist/index.js.map +1 -0
  57. package/dist/interactive-Q37ICHBG.js +334 -0
  58. package/dist/interactive-Q37ICHBG.js.map +1 -0
  59. package/dist/otlp-json-file-exporter-77FDBRSY-EZAPHWP6.js +9 -0
  60. package/dist/otlp-json-file-exporter-77FDBRSY-EZAPHWP6.js.map +1 -0
  61. package/dist/simple-trace-file-exporter-S76DMABU-5FCJESD2.js +9 -0
  62. package/dist/simple-trace-file-exporter-S76DMABU-5FCJESD2.js.map +1 -0
  63. package/dist/src-ML4D2MC2.js +1733 -0
  64. package/dist/src-ML4D2MC2.js.map +1 -0
  65. package/dist/templates/.agentv/targets.yaml +5 -24
  66. package/dist/token-POXF46NU.js +66 -0
  67. package/dist/token-POXF46NU.js.map +1 -0
  68. package/dist/token-util-6GWYZWGE.js +8 -0
  69. package/dist/token-util-6GWYZWGE.js.map +1 -0
  70. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/src/default-service-name.ts","../../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/src/utils.ts","../../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/src/ResourceImpl.ts","../../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/src/detect-resources.ts","../../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/src/detectors/EnvDetector.ts","../../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/src/semconv.ts","../../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/src/detectors/platform/node/machine-id/getMachineId.ts","../../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/src/detectors/platform/node/utils.ts","../../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/src/detectors/platform/node/HostDetector.ts","../../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/src/detectors/platform/node/OSDetector.ts","../../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/src/detectors/platform/node/ProcessDetector.ts","../../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/src/detectors/platform/node/ServiceInstanceIdDetector.ts","../../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/src/detectors/platform/node/index.ts","../../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/src/detectors/platform/index.ts","../../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/src/detectors/index.ts","../../../node_modules/.bun/@opentelemetry+resources@2.5.1+460773ef8ff1e07c/node_modules/@opentelemetry/resources/src/index.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nlet serviceName: string | undefined;\n\n/**\n * Returns the default service name for OpenTelemetry resources.\n * In Node.js environments, returns \"unknown_service:<process.argv0>\".\n * In browser/edge environments, returns \"unknown_service\".\n */\nexport function defaultServiceName(): string {\n if (serviceName === undefined) {\n try {\n const argv0 = globalThis.process.argv0;\n serviceName = argv0 ? `unknown_service:${argv0}` : 'unknown_service';\n } catch {\n serviceName = 'unknown_service';\n }\n }\n return serviceName;\n}\n\n/** @internal For testing purposes only */\nexport function _clearDefaultServiceNameCache(): void {\n serviceName = undefined;\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const isPromiseLike = <R>(val: unknown): val is PromiseLike<R> => {\n return (\n val !== null &&\n typeof val === 'object' &&\n typeof (val as Partial<PromiseLike<R>>).then === 'function'\n );\n};\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Attributes, AttributeValue, diag } from '@opentelemetry/api';\nimport { SDK_INFO } from '@opentelemetry/core';\nimport {\n ATTR_SERVICE_NAME,\n ATTR_TELEMETRY_SDK_LANGUAGE,\n ATTR_TELEMETRY_SDK_NAME,\n ATTR_TELEMETRY_SDK_VERSION,\n} from '@opentelemetry/semantic-conventions';\nimport { Resource } from './Resource';\nimport { defaultServiceName } from './default-service-name';\nimport {\n DetectedResource,\n DetectedResourceAttributes,\n MaybePromise,\n RawResourceAttribute,\n ResourceOptions,\n} from './types';\nimport { isPromiseLike } from './utils';\n\nclass ResourceImpl implements Resource {\n private _rawAttributes: RawResourceAttribute[];\n private _asyncAttributesPending = false;\n private _schemaUrl?: string;\n\n private _memoizedAttributes?: Attributes;\n\n static FromAttributeList(\n attributes: [string, MaybePromise<AttributeValue | undefined>][],\n options?: ResourceOptions\n ): Resource {\n const res = new ResourceImpl({}, options);\n res._rawAttributes = guardedRawAttributes(attributes);\n res._asyncAttributesPending =\n attributes.filter(([_, val]) => isPromiseLike(val)).length > 0;\n return res;\n }\n\n constructor(\n /**\n * A dictionary of attributes with string keys and values that provide\n * information about the entity as numbers, strings or booleans\n * TODO: Consider to add check/validation on attributes.\n */\n resource: DetectedResource,\n options?: ResourceOptions\n ) {\n const attributes = resource.attributes ?? {};\n this._rawAttributes = Object.entries(attributes).map(([k, v]) => {\n if (isPromiseLike(v)) {\n // side-effect\n this._asyncAttributesPending = true;\n }\n\n return [k, v];\n });\n\n this._rawAttributes = guardedRawAttributes(this._rawAttributes);\n this._schemaUrl = validateSchemaUrl(options?.schemaUrl);\n }\n\n public get asyncAttributesPending(): boolean {\n return this._asyncAttributesPending;\n }\n\n public async waitForAsyncAttributes(): Promise<void> {\n if (!this.asyncAttributesPending) {\n return;\n }\n\n for (let i = 0; i < this._rawAttributes.length; i++) {\n const [k, v] = this._rawAttributes[i];\n this._rawAttributes[i] = [k, isPromiseLike(v) ? await v : v];\n }\n\n this._asyncAttributesPending = false;\n }\n\n public get attributes(): Attributes {\n if (this.asyncAttributesPending) {\n diag.error(\n 'Accessing resource attributes before async attributes settled'\n );\n }\n\n if (this._memoizedAttributes) {\n return this._memoizedAttributes;\n }\n\n const attrs: Attributes = {};\n for (const [k, v] of this._rawAttributes) {\n if (isPromiseLike(v)) {\n diag.debug(`Unsettled resource attribute ${k} skipped`);\n continue;\n }\n if (v != null) {\n attrs[k] ??= v;\n }\n }\n\n // only memoize output if all attributes are settled\n if (!this._asyncAttributesPending) {\n this._memoizedAttributes = attrs;\n }\n\n return attrs;\n }\n\n public getRawAttributes(): RawResourceAttribute[] {\n return this._rawAttributes;\n }\n\n public get schemaUrl(): string | undefined {\n return this._schemaUrl;\n }\n\n public merge(resource: Resource | null): Resource {\n if (resource == null) return this;\n\n // Order is important\n // Spec states incoming attributes override existing attributes\n const mergedSchemaUrl = mergeSchemaUrl(this, resource);\n const mergedOptions: ResourceOptions | undefined = mergedSchemaUrl\n ? { schemaUrl: mergedSchemaUrl }\n : undefined;\n\n return ResourceImpl.FromAttributeList(\n [...resource.getRawAttributes(), ...this.getRawAttributes()],\n mergedOptions\n );\n }\n}\n\nexport function resourceFromAttributes(\n attributes: DetectedResourceAttributes,\n options?: ResourceOptions\n): Resource {\n return ResourceImpl.FromAttributeList(Object.entries(attributes), options);\n}\n\nexport function resourceFromDetectedResource(\n detectedResource: DetectedResource,\n options?: ResourceOptions\n): Resource {\n return new ResourceImpl(detectedResource, options);\n}\n\nexport function emptyResource(): Resource {\n return resourceFromAttributes({});\n}\n\nexport function defaultResource(): Resource {\n return resourceFromAttributes({\n [ATTR_SERVICE_NAME]: defaultServiceName(),\n [ATTR_TELEMETRY_SDK_LANGUAGE]: SDK_INFO[ATTR_TELEMETRY_SDK_LANGUAGE],\n [ATTR_TELEMETRY_SDK_NAME]: SDK_INFO[ATTR_TELEMETRY_SDK_NAME],\n [ATTR_TELEMETRY_SDK_VERSION]: SDK_INFO[ATTR_TELEMETRY_SDK_VERSION],\n });\n}\n\nfunction guardedRawAttributes(\n attributes: RawResourceAttribute[]\n): RawResourceAttribute[] {\n return attributes.map(([k, v]) => {\n if (isPromiseLike(v)) {\n return [\n k,\n v.catch(err => {\n diag.debug(\n 'promise rejection for resource attribute: %s - %s',\n k,\n err\n );\n return undefined;\n }),\n ];\n }\n return [k, v];\n });\n}\n\nfunction validateSchemaUrl(schemaUrl?: string): string | undefined {\n if (typeof schemaUrl === 'string' || schemaUrl === undefined) {\n return schemaUrl;\n }\n\n diag.warn(\n 'Schema URL must be string or undefined, got %s. Schema URL will be ignored.',\n schemaUrl\n );\n\n return undefined;\n}\n\nfunction mergeSchemaUrl(\n old: Resource,\n updating: Resource | null\n): string | undefined {\n const oldSchemaUrl = old?.schemaUrl;\n const updatingSchemaUrl = updating?.schemaUrl;\n\n const isOldEmpty = oldSchemaUrl === undefined || oldSchemaUrl === '';\n const isUpdatingEmpty =\n updatingSchemaUrl === undefined || updatingSchemaUrl === '';\n\n if (isOldEmpty) {\n return updatingSchemaUrl;\n }\n\n if (isUpdatingEmpty) {\n return oldSchemaUrl;\n }\n\n if (oldSchemaUrl === updatingSchemaUrl) {\n return oldSchemaUrl;\n }\n\n diag.warn(\n 'Schema URL merge conflict: old resource has \"%s\", updating resource has \"%s\". Resulting resource will have undefined Schema URL.',\n oldSchemaUrl,\n updatingSchemaUrl\n );\n\n return undefined;\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { diag } from '@opentelemetry/api';\nimport { Resource } from './Resource';\nimport { emptyResource, resourceFromDetectedResource } from './ResourceImpl';\nimport { ResourceDetectionConfig } from './config';\n\n/**\n * Runs all resource detectors and returns the results merged into a single Resource.\n *\n * @param config Configuration for resource detection\n */\nexport const detectResources = (\n config: ResourceDetectionConfig = {}\n): Resource => {\n const resources: Resource[] = (config.detectors || []).map(d => {\n try {\n const resource = resourceFromDetectedResource(d.detect(config));\n diag.debug(`${d.constructor.name} found resource.`, resource);\n return resource;\n } catch (e) {\n diag.debug(`${d.constructor.name} failed: ${e.message}`);\n return emptyResource();\n }\n });\n\n return resources.reduce(\n (acc, resource) => acc.merge(resource),\n emptyResource()\n );\n};\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Attributes, diag } from '@opentelemetry/api';\nimport { ATTR_SERVICE_NAME } from '@opentelemetry/semantic-conventions';\nimport { ResourceDetectionConfig } from '../config';\nimport { DetectedResource, ResourceDetector } from '../types';\nimport { getStringFromEnv } from '@opentelemetry/core';\n\n/**\n * EnvDetector can be used to detect the presence of and create a Resource\n * from the OTEL_RESOURCE_ATTRIBUTES environment variable.\n */\nclass EnvDetector implements ResourceDetector {\n // Type, attribute keys, and attribute values should not exceed 256 characters.\n private readonly _MAX_LENGTH = 255;\n\n // OTEL_RESOURCE_ATTRIBUTES is a comma-separated list of attributes.\n private readonly _COMMA_SEPARATOR = ',';\n\n // OTEL_RESOURCE_ATTRIBUTES contains key value pair separated by '='.\n private readonly _LABEL_KEY_VALUE_SPLITTER = '=';\n\n private readonly _ERROR_MESSAGE_INVALID_CHARS =\n 'should be a ASCII string with a length greater than 0 and not exceed ' +\n this._MAX_LENGTH +\n ' characters.';\n\n private readonly _ERROR_MESSAGE_INVALID_VALUE =\n 'should be a ASCII string with a length not exceed ' +\n this._MAX_LENGTH +\n ' characters.';\n\n /**\n * Returns a {@link Resource} populated with attributes from the\n * OTEL_RESOURCE_ATTRIBUTES environment variable. Note this is an async\n * function to conform to the Detector interface.\n *\n * @param config The resource detection config\n */\n detect(_config?: ResourceDetectionConfig): DetectedResource {\n const attributes: Attributes = {};\n\n const rawAttributes = getStringFromEnv('OTEL_RESOURCE_ATTRIBUTES');\n const serviceName = getStringFromEnv('OTEL_SERVICE_NAME');\n\n if (rawAttributes) {\n try {\n const parsedAttributes = this._parseResourceAttributes(rawAttributes);\n Object.assign(attributes, parsedAttributes);\n } catch (e) {\n diag.debug(`EnvDetector failed: ${e.message}`);\n }\n }\n\n if (serviceName) {\n attributes[ATTR_SERVICE_NAME] = serviceName;\n }\n\n return { attributes };\n }\n\n /**\n * Creates an attribute map from the OTEL_RESOURCE_ATTRIBUTES environment\n * variable.\n *\n * OTEL_RESOURCE_ATTRIBUTES: A comma-separated list of attributes describing\n * the source in more detail, e.g. “key1=val1,key2=val2”. Domain names and\n * paths are accepted as attribute keys. Values may be quoted or unquoted in\n * general. If a value contains whitespace, =, or \" characters, it must\n * always be quoted.\n *\n * @param rawEnvAttributes The resource attributes as a comma-separated list\n * of key/value pairs.\n * @returns The sanitized resource attributes.\n */\n private _parseResourceAttributes(rawEnvAttributes?: string): Attributes {\n if (!rawEnvAttributes) return {};\n\n const attributes: Attributes = {};\n const rawAttributes: string[] = rawEnvAttributes.split(\n this._COMMA_SEPARATOR,\n -1\n );\n for (const rawAttribute of rawAttributes) {\n const keyValuePair: string[] = rawAttribute.split(\n this._LABEL_KEY_VALUE_SPLITTER,\n -1\n );\n if (keyValuePair.length !== 2) {\n continue;\n }\n let [key, value] = keyValuePair;\n // Leading and trailing whitespaces are trimmed.\n key = key.trim();\n value = value.trim().split(/^\"|\"$/).join('');\n if (!this._isValidAndNotEmpty(key)) {\n throw new Error(`Attribute key ${this._ERROR_MESSAGE_INVALID_CHARS}`);\n }\n if (!this._isValid(value)) {\n throw new Error(`Attribute value ${this._ERROR_MESSAGE_INVALID_VALUE}`);\n }\n attributes[key] = decodeURIComponent(value);\n }\n return attributes;\n }\n\n /**\n * Determines whether the given String is a valid printable ASCII string with\n * a length not exceed _MAX_LENGTH characters.\n *\n * @param str The String to be validated.\n * @returns Whether the String is valid.\n */\n private _isValid(name: string): boolean {\n return name.length <= this._MAX_LENGTH && this._isBaggageOctetString(name);\n }\n\n // https://www.w3.org/TR/baggage/#definition\n private _isBaggageOctetString(str: string): boolean {\n for (let i = 0; i < str.length; i++) {\n const ch = str.charCodeAt(i);\n if (ch < 0x21 || ch === 0x2c || ch === 0x3b || ch === 0x5c || ch > 0x7e) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Determines whether the given String is a valid printable ASCII string with\n * a length greater than 0 and not exceed _MAX_LENGTH characters.\n *\n * @param str The String to be validated.\n * @returns Whether the String is valid and not empty.\n */\n private _isValidAndNotEmpty(str: string): boolean {\n return str.length > 0 && this._isValid(str);\n }\n}\n\nexport const envDetector = new EnvDetector();\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * This file contains a copy of unstable semantic convention definitions\n * used by this package.\n * @see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#unstable-semconv\n */\n\n/**\n * The cloud account ID the resource is assigned to.\n *\n * @example 111111111111\n * @example opentelemetry\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_CLOUD_ACCOUNT_ID = 'cloud.account.id' as const;\n\n/**\n * Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running.\n *\n * @example us-east-1c\n *\n * @note Availability zones are called \"zones\" on Alibaba Cloud and Google Cloud.\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_CLOUD_AVAILABILITY_ZONE = 'cloud.availability_zone' as const;\n\n/**\n * Name of the cloud provider.\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_CLOUD_PROVIDER = 'cloud.provider' as const;\n\n/**\n * The geographical region the resource is running.\n *\n * @example us-central1\n * @example us-east-1\n *\n * @note Refer to your provider's docs to see the available regions, for example [Alibaba Cloud regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), [Azure regions](https://azure.microsoft.com/global-infrastructure/geographies/), [Google Cloud regions](https://cloud.google.com/about/locations), or [Tencent Cloud regions](https://www.tencentcloud.com/document/product/213/6091).\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_CLOUD_REGION = 'cloud.region' as const;\n\n/**\n * Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/containers/run/#container-identification). The UUID might be abbreviated.\n *\n * @example a3bf90e006b2\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_CONTAINER_ID = 'container.id' as const;\n\n/**\n * Name of the image the container was built on.\n *\n * @example gcr.io/opentelemetry/operator\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_CONTAINER_IMAGE_NAME = 'container.image.name' as const;\n\n/**\n * Container image tags. An example can be found in [Docker Image Inspect](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect). Should be only the `<tag>` section of the full name for example from `registry.example.com/my-org/my-image:<tag>`.\n *\n * @example [\"v1.27.1\", \"3.5.7-0\"]\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_CONTAINER_IMAGE_TAGS = 'container.image.tags' as const;\n\n/**\n * Container name used by container runtime.\n *\n * @example opentelemetry-autoconf\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_CONTAINER_NAME = 'container.name' as const;\n\n/**\n * The CPU architecture the host system is running on.\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_HOST_ARCH = 'host.arch' as const;\n\n/**\n * Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider. For non-containerized systems, this should be the `machine-id`. See the table below for the sources to use to determine the `machine-id` based on operating system.\n *\n * @example fdbf79e8af94cb7f9e8df36789187052\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_HOST_ID = 'host.id' as const;\n\n/**\n * VM image ID or host OS image ID. For Cloud, this value is from the provider.\n *\n * @example ami-07b06b442921831e5\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_HOST_IMAGE_ID = 'host.image.id' as const;\n\n/**\n * Name of the VM image or OS install the host was instantiated from.\n *\n * @example infra-ami-eks-worker-node-7d4ec78312\n * @example CentOS-8-x86_64-1905\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_HOST_IMAGE_NAME = 'host.image.name' as const;\n\n/**\n * The version string of the VM image or host OS as defined in [Version Attributes](/docs/resource/README.md#version-attributes).\n *\n * @example 0.1\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_HOST_IMAGE_VERSION = 'host.image.version' as const;\n\n/**\n * Name of the host. On Unix systems, it may contain what the hostname command returns, or the fully qualified hostname, or another name specified by the user.\n *\n * @example opentelemetry-test\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_HOST_NAME = 'host.name' as const;\n\n/**\n * Type of host. For Cloud, this must be the machine type.\n *\n * @example n1-standard-1\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_HOST_TYPE = 'host.type' as const;\n\n/**\n * The name of the cluster.\n *\n * @example opentelemetry-cluster\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_K8S_CLUSTER_NAME = 'k8s.cluster.name' as const;\n\n/**\n * The name of the Deployment.\n *\n * @example opentelemetry\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_K8S_DEPLOYMENT_NAME = 'k8s.deployment.name' as const;\n\n/**\n * The name of the namespace that the pod is running in.\n *\n * @example default\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_K8S_NAMESPACE_NAME = 'k8s.namespace.name' as const;\n\n/**\n * The name of the Pod.\n *\n * @example opentelemetry-pod-autoconf\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_K8S_POD_NAME = 'k8s.pod.name' as const;\n\n/**\n * The operating system type.\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_OS_TYPE = 'os.type' as const;\n\n/**\n * The version string of the operating system as defined in [Version Attributes](/docs/resource/README.md#version-attributes).\n *\n * @example 14.2.1\n * @example 18.04.1\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_OS_VERSION = 'os.version' as const;\n\n/**\n * The command used to launch the process (i.e. the command name). On Linux based systems, can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter extracted from `GetCommandLineW`.\n *\n * @example cmd/otelcol\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_PROCESS_COMMAND = 'process.command' as const;\n\n/**\n * All the command arguments (including the command/executable itself) as received by the process. On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be the full argv vector passed to `main`.\n *\n * @example [\"cmd/otecol\", \"--config=config.yaml\"]\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_PROCESS_COMMAND_ARGS = 'process.command_args' as const;\n\n/**\n * The name of the process executable. On Linux based systems, this **SHOULD** be set to the base name of the target of `/proc/[pid]/exe`. On Windows, this **SHOULD** be set to the base name of `GetProcessImageFileNameW`.\n *\n * @example otelcol\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_PROCESS_EXECUTABLE_NAME = 'process.executable.name' as const;\n\n/**\n * The full path to the process executable. On Linux based systems, can be set to the target of `proc/[pid]/exe`. On Windows, can be set to the result of `GetProcessImageFileNameW`.\n *\n * @example /usr/bin/cmd/otelcol\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_PROCESS_EXECUTABLE_PATH = 'process.executable.path' as const;\n\n/**\n * The username of the user that owns the process.\n *\n * @example root\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_PROCESS_OWNER = 'process.owner' as const;\n\n/**\n * Process identifier (PID).\n *\n * @example 1234\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_PROCESS_PID = 'process.pid' as const;\n\n/**\n * An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment.\n *\n * @example \"Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0\"\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_PROCESS_RUNTIME_DESCRIPTION =\n 'process.runtime.description' as const;\n\n/**\n * The name of the runtime of this process.\n *\n * @example OpenJDK Runtime Environment\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_PROCESS_RUNTIME_NAME = 'process.runtime.name' as const;\n\n/**\n * The version of the runtime of this process, as returned by the runtime without modification.\n *\n * @example \"14.0.2\"\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_PROCESS_RUNTIME_VERSION = 'process.runtime.version' as const;\n\n/**\n * The string ID of the service instance.\n *\n * @example 627cc493-f310-47de-96bd-71410b7dec09\n *\n * @note **MUST** be unique for each instance of the same `service.namespace,service.name` pair (in other words\n * `service.namespace,service.name,service.instance.id` triplet **MUST** be globally unique). The ID helps to\n * distinguish instances of the same service that exist at the same time (e.g. instances of a horizontally scaled\n * service).\n *\n * Implementations, such as SDKs, are recommended to generate a random Version 1 or Version 4 [RFC\n * 4122](https://www.ietf.org/rfc/rfc4122.txt) UUID, but are free to use an inherent unique ID as the source of\n * this value if stability is desirable. In that case, the ID **SHOULD** be used as source of a UUID Version 5 and\n * **SHOULD** use the following UUID as the namespace: `4d63009a-8d0f-11ee-aad7-4c796ed8e320`.\n *\n * UUIDs are typically recommended, as only an opaque value for the purposes of identifying a service instance is\n * needed. Similar to what can be seen in the man page for the\n * [`/etc/machine-id`](https://www.freedesktop.org/software/systemd/man/latest/machine-id.html) file, the underlying\n * data, such as pod name and namespace should be treated as confidential, being the user's choice to expose it\n * or not via another resource attribute.\n *\n * For applications running behind an application server (like unicorn), we do not recommend using one identifier\n * for all processes participating in the application. Instead, it's recommended each division (e.g. a worker\n * thread in unicorn) to have its own instance.id.\n *\n * It's not recommended for a Collector to set `service.instance.id` if it can't unambiguously determine the\n * service instance that is generating that telemetry. For instance, creating an UUID based on `pod.name` will\n * likely be wrong, as the Collector might not know from which container within that pod the telemetry originated.\n * However, Collectors can set the `service.instance.id` if they can unambiguously determine the service instance\n * for that telemetry. This is typically the case for scraping receivers, as they know the target address and\n * port.\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_SERVICE_INSTANCE_ID = 'service.instance.id' as const;\n\n/**\n * A namespace for `service.name`.\n *\n * @example Shop\n *\n * @note A string value having a meaning that helps to distinguish a group of services, for example the team name that owns a group of services. `service.name` is expected to be unique within the same namespace. If `service.namespace` is not specified in the Resource then `service.name` is expected to be unique for all services that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length namespace string is assumed equal to unspecified namespace.\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_SERVICE_NAMESPACE = 'service.namespace' as const;\n\n/**\n * Additional description of the web engine (e.g. detailed version and edition information).\n *\n * @example WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) - 2.2.2.Final\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_WEBENGINE_DESCRIPTION = 'webengine.description' as const;\n\n/**\n * The name of the web engine.\n *\n * @example WildFly\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_WEBENGINE_NAME = 'webengine.name' as const;\n\n/**\n * The version of the web engine.\n *\n * @example 21.0.0\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_WEBENGINE_VERSION = 'webengine.version' as const;\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as process from 'process';\n\nlet getMachineIdImpl: undefined | (() => Promise<string | undefined>);\n\nexport async function getMachineId(): Promise<string | undefined> {\n if (!getMachineIdImpl) {\n switch (process.platform) {\n case 'darwin':\n getMachineIdImpl = (await import('./getMachineId-darwin.js'))\n .getMachineId;\n break;\n case 'linux':\n getMachineIdImpl = (await import('./getMachineId-linux.js'))\n .getMachineId;\n break;\n case 'freebsd':\n getMachineIdImpl = (await import('./getMachineId-bsd.js')).getMachineId;\n break;\n case 'win32':\n getMachineIdImpl = (await import('./getMachineId-win.js')).getMachineId;\n break;\n default:\n getMachineIdImpl = (await import('./getMachineId-unsupported.js'))\n .getMachineId;\n break;\n }\n }\n\n return getMachineIdImpl();\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport const normalizeArch = (nodeArchString: string): string => {\n // Maps from https://nodejs.org/api/os.html#osarch to arch values in spec:\n // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/host.md\n switch (nodeArchString) {\n case 'arm':\n return 'arm32';\n case 'ppc':\n return 'ppc32';\n case 'x64':\n return 'amd64';\n default:\n return nodeArchString;\n }\n};\n\nexport const normalizeType = (nodePlatform: string): string => {\n // Maps from https://nodejs.org/api/os.html#osplatform to arch values in spec:\n // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/os.md\n switch (nodePlatform) {\n case 'sunos':\n return 'solaris';\n case 'win32':\n return 'windows';\n default:\n return nodePlatform;\n }\n};\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ATTR_HOST_ARCH, ATTR_HOST_ID, ATTR_HOST_NAME } from '../../../semconv';\nimport { arch, hostname } from 'os';\nimport { ResourceDetectionConfig } from '../../../config';\nimport {\n DetectedResource,\n DetectedResourceAttributes,\n ResourceDetector,\n} from '../../../types';\nimport { getMachineId } from './machine-id/getMachineId';\nimport { normalizeArch } from './utils';\n\n/**\n * HostDetector detects the resources related to the host current process is\n * running on. Currently only non-cloud-based attributes are included.\n */\nclass HostDetector implements ResourceDetector {\n detect(_config?: ResourceDetectionConfig): DetectedResource {\n const attributes: DetectedResourceAttributes = {\n [ATTR_HOST_NAME]: hostname(),\n [ATTR_HOST_ARCH]: normalizeArch(arch()),\n [ATTR_HOST_ID]: getMachineId(),\n };\n\n return { attributes };\n }\n}\n\nexport const hostDetector = new HostDetector();\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Attributes } from '@opentelemetry/api';\nimport { ATTR_OS_TYPE, ATTR_OS_VERSION } from '../../../semconv';\nimport { platform, release } from 'os';\nimport { ResourceDetectionConfig } from '../../../config';\nimport { DetectedResource, ResourceDetector } from '../../../types';\nimport { normalizeType } from './utils';\n\n/**\n * OSDetector detects the resources related to the operating system (OS) on\n * which the process represented by this resource is running.\n */\nclass OSDetector implements ResourceDetector {\n detect(_config?: ResourceDetectionConfig): DetectedResource {\n const attributes: Attributes = {\n [ATTR_OS_TYPE]: normalizeType(platform()),\n [ATTR_OS_VERSION]: release(),\n };\n return { attributes };\n }\n}\n\nexport const osDetector = new OSDetector();\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Attributes, diag } from '@opentelemetry/api';\nimport {\n ATTR_PROCESS_COMMAND,\n ATTR_PROCESS_COMMAND_ARGS,\n ATTR_PROCESS_EXECUTABLE_NAME,\n ATTR_PROCESS_EXECUTABLE_PATH,\n ATTR_PROCESS_OWNER,\n ATTR_PROCESS_PID,\n ATTR_PROCESS_RUNTIME_DESCRIPTION,\n ATTR_PROCESS_RUNTIME_NAME,\n ATTR_PROCESS_RUNTIME_VERSION,\n} from '../../../semconv';\nimport * as os from 'os';\nimport { ResourceDetectionConfig } from '../../../config';\nimport { DetectedResource, ResourceDetector } from '../../../types';\n\n/**\n * ProcessDetector will be used to detect the resources related current process running\n * and being instrumented from the NodeJS Process module.\n */\nclass ProcessDetector implements ResourceDetector {\n detect(_config?: ResourceDetectionConfig): DetectedResource {\n const attributes: Attributes = {\n [ATTR_PROCESS_PID]: process.pid,\n [ATTR_PROCESS_EXECUTABLE_NAME]: process.title,\n [ATTR_PROCESS_EXECUTABLE_PATH]: process.execPath,\n [ATTR_PROCESS_COMMAND_ARGS]: [\n process.argv[0],\n ...process.execArgv,\n ...process.argv.slice(1),\n ],\n [ATTR_PROCESS_RUNTIME_VERSION]: process.versions.node,\n [ATTR_PROCESS_RUNTIME_NAME]: 'nodejs',\n [ATTR_PROCESS_RUNTIME_DESCRIPTION]: 'Node.js',\n };\n\n if (process.argv.length > 1) {\n attributes[ATTR_PROCESS_COMMAND] = process.argv[1];\n }\n\n try {\n const userInfo = os.userInfo();\n attributes[ATTR_PROCESS_OWNER] = userInfo.username;\n } catch (e) {\n diag.debug(`error obtaining process owner: ${e}`);\n }\n\n return { attributes };\n }\n}\n\nexport const processDetector = new ProcessDetector();\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ATTR_SERVICE_INSTANCE_ID } from '../../../semconv';\nimport { randomUUID } from 'crypto';\nimport { ResourceDetectionConfig } from '../../../config';\nimport { DetectedResource, ResourceDetector } from '../../../types';\n\n/**\n * ServiceInstanceIdDetector detects the resources related to the service instance ID.\n */\nclass ServiceInstanceIdDetector implements ResourceDetector {\n detect(_config?: ResourceDetectionConfig): DetectedResource {\n return {\n attributes: {\n [ATTR_SERVICE_INSTANCE_ID]: randomUUID(),\n },\n };\n }\n}\n\n/**\n * @experimental\n */\nexport const serviceInstanceIdDetector = new ServiceInstanceIdDetector();\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { hostDetector } from './HostDetector';\nexport { osDetector } from './OSDetector';\nexport { processDetector } from './ProcessDetector';\nexport { serviceInstanceIdDetector } from './ServiceInstanceIdDetector';\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport {\n hostDetector,\n osDetector,\n processDetector,\n serviceInstanceIdDetector,\n} from './node';\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { envDetector } from './EnvDetector';\nexport {\n hostDetector,\n osDetector,\n processDetector,\n serviceInstanceIdDetector,\n} from './platform';\nexport { noopDetector } from './NoopDetector';\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport type { ResourceDetectionConfig } from './config';\nexport { detectResources } from './detect-resources';\nexport {\n envDetector,\n hostDetector,\n osDetector,\n processDetector,\n serviceInstanceIdDetector,\n} from './detectors';\nexport type { Resource } from './Resource';\nexport {\n resourceFromAttributes,\n defaultResource,\n emptyResource,\n} from './ResourceImpl';\nexport { defaultServiceName } from './default-service-name';\nexport type {\n ResourceDetector,\n DetectedResource,\n DetectedResourceAttributes,\n RawResourceAttribute,\n MaybePromise,\n} from './types';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAuBM,SAAU,qBAAkB;AAChC,MAAI,gBAAgB,QAAW;AAC7B,QAAI;AACF,YAAM,QAAQ,WAAW,QAAQ;AACjC,oBAAc,QAAQ,mBAAmB,KAAK,KAAK;YAC7C;AACN,oBAAc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AQ,SAAS;UACjD,CAAC,yBAAyB,GAAG;UAC7B,CAAC,gCAAgC,GAAG;;AAGtC,YAAI,QAAQ,KAAK,SAAS,GAAG;AAC3B,qBAAW,oBAAoB,IAAI,QAAQ,KAAK,CAAC;;AAGnD,YAAI;AACF,gBAAME,YAAc,YAAQ;AAC5B,qBAAW,kBAAkB,IAAIA,UAAS;iBACnC,GAAG;AACV,eAAK,MAAM,kCAAkC,CAAC,EAAE;;AAGlD,eAAO,EAAE,WAAU;MACrB;;AAGK,IAAM,kBAAkB,IAAI,gBAAe;;;;;AClDlD,SAAS,kBAAkB;AAjB3B,IAwBM,2BAaO;AArCb;;;AAgBA;AAQA,IAAM,4BAAN,MAA+B;MAC7B,OAAO,SAAiC;AACtC,eAAO;UACL,YAAY;YACV,CAAC,wBAAwB,GAAG,WAAU;;;MAG5C;;AAMK,IAAM,4BAA4B,IAAI,0BAAyB;;;;;ACrCtE;;;AAgBA;AACA;AACA;AACA;;;;;ACnBA;;;AAeA;;;;;ACfA;;;AAgBA;AACA;;;;;ACjBA,IAAAC,YAAA;;AAiBA;AACA;AAQA;AAKA;;;","names":["init_esm","init_esm","serviceName","process","init_utils","init_utils","platform","init_utils","userInfo","init_esm"]}
package/dist/cli.js ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
3
+ import {
4
+ runCli
5
+ } from "./chunk-CY4TSIZS.js";
6
+ import "./chunk-QZRZDCHV.js";
7
+ import "./chunk-QHH6QXNY.js";
8
+ import "./chunk-C5GOHBQM.js";
9
+ import "./chunk-JK6V4KVD.js";
10
+ import "./chunk-3L2L5GIL.js";
11
+ import "./chunk-6GSYTMXD.js";
12
+ import "./chunk-LRULMAAA.js";
13
+ import "./chunk-5H446C7X.js";
14
+
15
+ // src/cli.ts
16
+ runCli().then(() => {
17
+ process.exit(0);
18
+ }).catch((error) => {
19
+ if (error instanceof Error) {
20
+ console.error(`Error: ${error.message}`);
21
+ if (process.env.DEBUG) {
22
+ console.error(error.stack);
23
+ }
24
+ } else {
25
+ console.error(error);
26
+ }
27
+ process.exit(1);
28
+ });
29
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/cli.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { runCli } from './index.js';\n\nrunCli()\n .then(() => {\n process.exit(0);\n })\n .catch((error) => {\n if (error instanceof Error) {\n console.error(`Error: ${error.message}`);\n if (process.env.DEBUG) {\n console.error(error.stack);\n }\n } else {\n console.error(error);\n }\n process.exit(1);\n });\n"],"mappings":";;;;;;;;;;;;;;;AAGA,OAAO,EACJ,KAAK,MAAM;AACV,UAAQ,KAAK,CAAC;AAChB,CAAC,EACA,MAAM,CAAC,UAAU;AAChB,MAAI,iBAAiB,OAAO;AAC1B,YAAQ,MAAM,UAAU,MAAM,OAAO,EAAE;AACvC,QAAI,QAAQ,IAAI,OAAO;AACrB,cAAQ,MAAM,MAAM,KAAK;AAAA,IAC3B;AAAA,EACF,OAAO;AACL,YAAQ,MAAM,KAAK;AAAA,EACrB;AACA,UAAQ,KAAK,CAAC;AAChB,CAAC;","names":[]}
@@ -0,0 +1,305 @@
1
+ import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
2
+ import {
3
+ CodeEvaluator,
4
+ CompositeEvaluator,
5
+ CostEvaluator,
6
+ DEFAULT_EVALUATOR_TEMPLATE,
7
+ DEFAULT_EVAL_PATTERNS,
8
+ DEFAULT_EXPLORATION_TOOLS,
9
+ DeterministicAssertionEvaluator,
10
+ EvaluatorRegistry,
11
+ ExecutionMetricsEvaluator,
12
+ FieldAccuracyEvaluator,
13
+ LatencyEvaluator,
14
+ LlmGraderEvaluator,
15
+ OTEL_BACKEND_PRESETS,
16
+ OtelStreamingObserver,
17
+ OtelTraceExporter,
18
+ ProviderRegistry,
19
+ RepoManager,
20
+ ResponseCache,
21
+ SkillTriggerEvaluator,
22
+ TEST_MESSAGE_ROLES,
23
+ TemplateNotDirectoryError,
24
+ TemplateNotFoundError,
25
+ TokenUsageEvaluator,
26
+ ToolTrajectoryEvaluator,
27
+ WorkspaceCreationError,
28
+ WorkspacePoolManager,
29
+ assembleLlmGraderPrompt,
30
+ avgToolDurationMs,
31
+ buildDirectoryChain,
32
+ buildOutputSchema,
33
+ buildPromptInputs,
34
+ buildRubricOutputSchema,
35
+ buildScoreRangeOutputSchema,
36
+ buildSearchRoots,
37
+ calculateRubricScore,
38
+ captureFileChanges,
39
+ clampScore,
40
+ cleanupEvalWorkspaces,
41
+ cleanupWorkspace,
42
+ computeTraceSummary,
43
+ computeWorkspaceFingerprint,
44
+ consumeClaudeLogEntries,
45
+ consumeCodexLogEntries,
46
+ consumeCopilotCliLogEntries,
47
+ consumeCopilotSdkLogEntries,
48
+ consumePiLogEntries,
49
+ createAgentKernel,
50
+ createBuiltinProviderRegistry,
51
+ createBuiltinRegistry,
52
+ createProvider,
53
+ createTempWorkspace,
54
+ deepEqual,
55
+ defineConfig,
56
+ detectFormat,
57
+ discoverAssertions,
58
+ discoverGraders,
59
+ discoverProviders,
60
+ ensureVSCodeSubagents,
61
+ evaluate,
62
+ executeScript,
63
+ executeWorkspaceScript,
64
+ explorationRatio,
65
+ extractCacheConfig,
66
+ extractFailOnError,
67
+ extractJsonBlob,
68
+ extractTargetFromSuite,
69
+ extractTargetsFromSuite,
70
+ extractTargetsFromTestCase,
71
+ extractTrialsConfig,
72
+ fileExists,
73
+ findGitRoot,
74
+ freeformEvaluationSchema,
75
+ generateRubrics,
76
+ getAgentvHome,
77
+ getHitCount,
78
+ getOutputFilenames,
79
+ getSubagentsRoot,
80
+ getTraceStateRoot,
81
+ getWorkspacePath,
82
+ getWorkspacePoolRoot,
83
+ getWorkspacesRoot,
84
+ initializeBaseline,
85
+ isAgentSkillsFormat,
86
+ isEvaluatorKind,
87
+ isGuidelineFile,
88
+ isJsonObject,
89
+ isJsonValue,
90
+ isNonEmptyString,
91
+ isTestMessage,
92
+ isTestMessageRole,
93
+ listTargetNames,
94
+ loadConfig,
95
+ loadEvalCaseById,
96
+ loadEvalCases,
97
+ loadEvalSuite,
98
+ loadTestById,
99
+ loadTestSuite,
100
+ loadTests,
101
+ loadTsConfig,
102
+ mergeExecutionMetrics,
103
+ negateScore,
104
+ normalizeLineEndings,
105
+ parseAgentSkillsEvals,
106
+ parseJsonFromText,
107
+ parseJsonSafe,
108
+ readJsonFile,
109
+ readTargetDefinitions,
110
+ readTestSuiteMetadata,
111
+ readTextFile,
112
+ resolveAndCreateProvider,
113
+ resolveFileReference,
114
+ resolveTargetDefinition,
115
+ resolveWorkspaceTemplate,
116
+ rubricEvaluationSchema,
117
+ runContainsAllAssertion,
118
+ runContainsAnyAssertion,
119
+ runContainsAssertion,
120
+ runEndsWithAssertion,
121
+ runEqualsAssertion,
122
+ runEvalCase,
123
+ runEvaluation,
124
+ runIcontainsAllAssertion,
125
+ runIcontainsAnyAssertion,
126
+ runIcontainsAssertion,
127
+ runIsJsonAssertion,
128
+ runRegexAssertion,
129
+ runStartsWithAssertion,
130
+ scoreToVerdict,
131
+ shouldEnableCache,
132
+ shouldSkipCacheForTemperature,
133
+ subscribeToClaudeLogEntries,
134
+ subscribeToCodexLogEntries,
135
+ subscribeToCopilotCliLogEntries,
136
+ subscribeToCopilotSdkLogEntries,
137
+ subscribeToPiLogEntries,
138
+ substituteVariables,
139
+ toCamelCaseDeep,
140
+ toSnakeCaseDeep,
141
+ tokensPerTool,
142
+ transpileEvalYaml,
143
+ transpileEvalYamlFile,
144
+ trimBaselineResult
145
+ } from "./chunk-QHH6QXNY.js";
146
+ import {
147
+ OtlpJsonFileExporter
148
+ } from "./chunk-C5GOHBQM.js";
149
+ import {
150
+ SimpleTraceFileExporter
151
+ } from "./chunk-JK6V4KVD.js";
152
+ import "./chunk-3L2L5GIL.js";
153
+ import "./chunk-6GSYTMXD.js";
154
+ import "./chunk-LRULMAAA.js";
155
+ import "./chunk-5H446C7X.js";
156
+ export {
157
+ CodeEvaluator,
158
+ CompositeEvaluator,
159
+ CostEvaluator,
160
+ DEFAULT_EVALUATOR_TEMPLATE,
161
+ DEFAULT_EVAL_PATTERNS,
162
+ DEFAULT_EXPLORATION_TOOLS,
163
+ DeterministicAssertionEvaluator,
164
+ EvaluatorRegistry,
165
+ ExecutionMetricsEvaluator,
166
+ FieldAccuracyEvaluator,
167
+ LatencyEvaluator,
168
+ LlmGraderEvaluator,
169
+ LlmGraderEvaluator as LlmJudgeEvaluator,
170
+ OTEL_BACKEND_PRESETS,
171
+ OtelStreamingObserver,
172
+ OtelTraceExporter,
173
+ OtlpJsonFileExporter,
174
+ ProviderRegistry,
175
+ RepoManager,
176
+ ResponseCache,
177
+ SimpleTraceFileExporter,
178
+ SkillTriggerEvaluator,
179
+ TEST_MESSAGE_ROLES,
180
+ TemplateNotDirectoryError,
181
+ TemplateNotFoundError,
182
+ TokenUsageEvaluator,
183
+ ToolTrajectoryEvaluator,
184
+ WorkspaceCreationError,
185
+ WorkspacePoolManager,
186
+ assembleLlmGraderPrompt,
187
+ assembleLlmGraderPrompt as assembleLlmJudgePrompt,
188
+ avgToolDurationMs,
189
+ buildDirectoryChain,
190
+ buildOutputSchema,
191
+ buildPromptInputs,
192
+ buildRubricOutputSchema,
193
+ buildScoreRangeOutputSchema,
194
+ buildSearchRoots,
195
+ calculateRubricScore,
196
+ captureFileChanges,
197
+ clampScore,
198
+ cleanupEvalWorkspaces,
199
+ cleanupWorkspace,
200
+ computeTraceSummary,
201
+ computeWorkspaceFingerprint,
202
+ consumeClaudeLogEntries,
203
+ consumeCodexLogEntries,
204
+ consumeCopilotCliLogEntries,
205
+ consumeCopilotSdkLogEntries,
206
+ consumePiLogEntries,
207
+ createAgentKernel,
208
+ createBuiltinProviderRegistry,
209
+ createBuiltinRegistry,
210
+ createProvider,
211
+ createTempWorkspace,
212
+ deepEqual,
213
+ defineConfig,
214
+ detectFormat,
215
+ discoverAssertions,
216
+ discoverGraders,
217
+ discoverGraders as discoverJudges,
218
+ discoverProviders,
219
+ ensureVSCodeSubagents,
220
+ evaluate,
221
+ executeScript,
222
+ executeWorkspaceScript,
223
+ explorationRatio,
224
+ extractCacheConfig,
225
+ extractFailOnError,
226
+ extractJsonBlob,
227
+ extractTargetFromSuite,
228
+ extractTargetsFromSuite,
229
+ extractTargetsFromTestCase,
230
+ extractTrialsConfig,
231
+ fileExists,
232
+ findGitRoot,
233
+ freeformEvaluationSchema,
234
+ generateRubrics,
235
+ getAgentvHome,
236
+ getHitCount,
237
+ getOutputFilenames,
238
+ getSubagentsRoot,
239
+ getTraceStateRoot,
240
+ getWorkspacePath,
241
+ getWorkspacePoolRoot,
242
+ getWorkspacesRoot,
243
+ initializeBaseline,
244
+ isAgentSkillsFormat,
245
+ isEvaluatorKind,
246
+ isGuidelineFile,
247
+ isJsonObject,
248
+ isJsonValue,
249
+ isNonEmptyString,
250
+ isTestMessage,
251
+ isTestMessageRole,
252
+ listTargetNames,
253
+ loadConfig,
254
+ loadEvalCaseById,
255
+ loadEvalCases,
256
+ loadEvalSuite,
257
+ loadTestById,
258
+ loadTestSuite,
259
+ loadTests,
260
+ loadTsConfig,
261
+ mergeExecutionMetrics,
262
+ negateScore,
263
+ normalizeLineEndings,
264
+ parseAgentSkillsEvals,
265
+ parseJsonFromText,
266
+ parseJsonSafe,
267
+ readJsonFile,
268
+ readTargetDefinitions,
269
+ readTestSuiteMetadata,
270
+ readTextFile,
271
+ resolveAndCreateProvider,
272
+ resolveFileReference,
273
+ resolveTargetDefinition,
274
+ resolveWorkspaceTemplate,
275
+ rubricEvaluationSchema,
276
+ runContainsAllAssertion,
277
+ runContainsAnyAssertion,
278
+ runContainsAssertion,
279
+ runEndsWithAssertion,
280
+ runEqualsAssertion,
281
+ runEvalCase,
282
+ runEvaluation,
283
+ runIcontainsAllAssertion,
284
+ runIcontainsAnyAssertion,
285
+ runIcontainsAssertion,
286
+ runIsJsonAssertion,
287
+ runRegexAssertion,
288
+ runStartsWithAssertion,
289
+ scoreToVerdict,
290
+ shouldEnableCache,
291
+ shouldSkipCacheForTemperature,
292
+ subscribeToClaudeLogEntries,
293
+ subscribeToCodexLogEntries,
294
+ subscribeToCopilotCliLogEntries,
295
+ subscribeToCopilotSdkLogEntries,
296
+ subscribeToPiLogEntries,
297
+ substituteVariables,
298
+ toCamelCaseDeep,
299
+ toSnakeCaseDeep,
300
+ tokensPerTool,
301
+ transpileEvalYaml,
302
+ transpileEvalYamlFile,
303
+ trimBaselineResult
304
+ };
305
+ //# sourceMappingURL=dist-NOJMJ5CF.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}