@webex/internal-plugin-metrics 3.12.0-webex-services-ready.4 → 3.13.0-next.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 (77) hide show
  1. package/.repo-context.json +466 -0
  2. package/.sdd/manifest.json +626 -0
  3. package/AGENTS.md +208 -0
  4. package/README.md +274 -0
  5. package/dist/call-diagnostic/call-diagnostic-metrics.js +155 -94
  6. package/dist/call-diagnostic/call-diagnostic-metrics.js.map +1 -1
  7. package/dist/call-diagnostic/config.js +3 -1
  8. package/dist/call-diagnostic/config.js.map +1 -1
  9. package/dist/config.js +7 -0
  10. package/dist/config.js.map +1 -1
  11. package/dist/index.js +10 -1
  12. package/dist/index.js.map +1 -1
  13. package/dist/metrics.js +118 -5
  14. package/dist/metrics.js.map +1 -1
  15. package/dist/metrics.types.js.map +1 -1
  16. package/dist/network-telemetry.js +610 -0
  17. package/dist/network-telemetry.js.map +1 -0
  18. package/dist/new-metrics.js +47 -11
  19. package/dist/new-metrics.js.map +1 -1
  20. package/dist/privacy-and-security-permission-enricher/constants.js +18 -0
  21. package/dist/privacy-and-security-permission-enricher/constants.js.map +1 -0
  22. package/dist/privacy-and-security-permission-enricher/index.js +143 -0
  23. package/dist/privacy-and-security-permission-enricher/index.js.map +1 -0
  24. package/dist/privacy-and-security-permission-enricher/types.js +7 -0
  25. package/dist/privacy-and-security-permission-enricher/types.js.map +1 -0
  26. package/dist/privacy-and-security-permission-enricher/utils.js +71 -0
  27. package/dist/privacy-and-security-permission-enricher/utils.js.map +1 -0
  28. package/dist/types/call-diagnostic/call-diagnostic-metrics.d.ts +12 -3
  29. package/dist/types/call-diagnostic/config.d.ts +2 -0
  30. package/dist/types/config.d.ts +8 -0
  31. package/dist/types/index.d.ts +2 -2
  32. package/dist/types/metrics.types.d.ts +7 -3
  33. package/dist/types/network-telemetry.d.ts +108 -0
  34. package/dist/types/new-metrics.d.ts +13 -1
  35. package/dist/types/privacy-and-security-permission-enricher/constants.d.ts +6 -0
  36. package/dist/types/privacy-and-security-permission-enricher/index.d.ts +40 -0
  37. package/dist/types/privacy-and-security-permission-enricher/types.d.ts +14 -0
  38. package/dist/types/privacy-and-security-permission-enricher/utils.d.ts +5 -0
  39. package/dist/types/unhandled-exception-telemetry/index.d.ts +60 -0
  40. package/dist/types/unhandled-exception-telemetry/utils.d.ts +6 -0
  41. package/dist/unhandled-exception-telemetry/index.js +331 -0
  42. package/dist/unhandled-exception-telemetry/index.js.map +1 -0
  43. package/dist/unhandled-exception-telemetry/utils.js +105 -0
  44. package/dist/unhandled-exception-telemetry/utils.js.map +1 -0
  45. package/docs/adr/index.md +27 -0
  46. package/docs/architecture.md +437 -0
  47. package/docs/getting-started.md +131 -0
  48. package/docs/index.md +52 -0
  49. package/docs/specs/README.md +88 -0
  50. package/package.json +11 -11
  51. package/schemas/repo-context.schema.json +796 -0
  52. package/src/call-diagnostic/call-diagnostic-metrics.ts +100 -30
  53. package/src/call-diagnostic/config.ts +2 -0
  54. package/src/call-diagnostic/docs/README.md +535 -0
  55. package/src/config.js +7 -0
  56. package/src/docs/README.md +703 -0
  57. package/src/index.ts +11 -0
  58. package/src/metrics.js +123 -5
  59. package/src/metrics.types.ts +13 -3
  60. package/src/network-telemetry.ts +757 -0
  61. package/src/new-metrics.ts +44 -2
  62. package/src/privacy-and-security-permission-enricher/constants.ts +33 -0
  63. package/src/privacy-and-security-permission-enricher/docs/README.md +356 -0
  64. package/src/privacy-and-security-permission-enricher/index.ts +142 -0
  65. package/src/privacy-and-security-permission-enricher/types.ts +21 -0
  66. package/src/privacy-and-security-permission-enricher/utils.ts +82 -0
  67. package/src/rtcMetrics/docs/README.md +447 -0
  68. package/src/unhandled-exception-telemetry/docs/README.md +536 -0
  69. package/src/unhandled-exception-telemetry/index.ts +404 -0
  70. package/src/unhandled-exception-telemetry/utils.ts +101 -0
  71. package/test/unit/spec/call-diagnostic/call-diagnostic-metrics.ts +485 -21
  72. package/test/unit/spec/metrics.js +14 -5
  73. package/test/unit/spec/network-telemetry.ts +610 -0
  74. package/test/unit/spec/new-metrics.ts +190 -48
  75. package/test/unit/spec/privacy-and-security-permission-enricher.ts +318 -0
  76. package/test/unit/spec/unhandled-exception-telemetry/utils.ts +109 -0
  77. package/test/unit/spec/unhandled-exception-telemetry.ts +689 -0
package/docs/index.md ADDED
@@ -0,0 +1,52 @@
1
+ ---
2
+ okf_version: '0.1'
3
+ ---
4
+ <!-- sdd-generated-metadata
5
+ doc_kind: standing-doc
6
+ generated_from: docs-index@0.3.0
7
+ generated_by: claude-code
8
+ approved_by: rarajes2@cisco.com
9
+ updated_at: 2026-10-07T04:50:31Z
10
+ validation_status: pass
11
+ -->
12
+
13
+ # @webex/internal-plugin-metrics documentation
14
+
15
+ Doc map for developers and agents working on the Webex JS SDK metrics plugin: the package that
16
+ collects, enriches, batches and submits every SDK-owned telemetry family to the Webex metrics and
17
+ unified telemetry services.
18
+
19
+ ## Start here
20
+
21
+ - [Getting started](getting-started.md)
22
+ - [Repository architecture](architecture.md)
23
+ - Service specification — not applicable; this package is a library plugin with no deployable
24
+ service, recorded as `docs/service.md: omit` in `.sdd/manifest.json`.
25
+ - API specification — not applicable; the package owns no HTTP surface, recorded as
26
+ `api-specs/openapi.yaml: omit` in `.sdd/manifest.json`.
27
+
28
+ ## Decisions
29
+
30
+ - [adr/](adr/) — architectural decision records
31
+
32
+ ## Specifications and contracts
33
+
34
+ - [architecture.md](architecture.md) — canonical repository-wide architecture and the contract index
35
+ - [specs/README.md](specs/README.md) — manifest-backed module and contract registry
36
+ - `<module-path>/docs/README.md` — the owning specification beside each module's code, one per
37
+ module in the registry
38
+ - [adr/](adr/) — concrete architectural decisions; blank ADR templates remain under `.sdd/`
39
+
40
+ Use the manifest-linked native source for exact contract details: the ecosystem-native SDK exports
41
+ in `package.json` and `src/index.ts` for the published package surface, the TypeScript declarations
42
+ in `src/metrics.types.ts` for every event envelope, and the externally owned
43
+ `@webex/event-dictionary-ts` schema for Call Analyzer event names and payload fields. Register and
44
+ link those sources from the architecture index and the owning module spec instead of copying them
45
+ into Markdown.
46
+
47
+ ## Related repository resources
48
+
49
+ - [README.md](../README.md) — the published npm landing page for this package. It is owner-authored
50
+ and retained in place; it is not generated and is not a canonical specification.
51
+ - Monorepo-level contribution, security and release governance lives at the `webex-js-sdk`
52
+ repository root rather than in this package.
@@ -0,0 +1,88 @@
1
+ ---
2
+ type: Reference
3
+ title: Specification registry
4
+ description: Canonical specification registry and change-routing guide.
5
+ tags: [specifications, registry]
6
+ ---
7
+ <!-- sdd-generated-metadata
8
+ doc_kind: standing-doc
9
+ generated_from: spec-index@0.3.0
10
+ generated_by: claude-code
11
+ approved_by: rarajes2@cisco.com
12
+ updated_at: 2026-10-07T04:50:31Z
13
+ validation_status: pass
14
+ -->
15
+
16
+ # Specification registry
17
+
18
+ Use this page to find the canonical repository architecture and every
19
+ instantiated module specification plus native contract. Keep technical facts
20
+ in one owning document and use this page only for navigation, ownership,
21
+ status, and change/test routing.
22
+
23
+ Start with the [repository architecture](../architecture.md). No service
24
+ specification exists: this package is a library plugin with no deployable
25
+ service, recorded as `docs/service.md: omit` in `.sdd/manifest.json`.
26
+
27
+ ## Document roles
28
+
29
+ | Document | Canonical ownership |
30
+ | --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
31
+ | [Repository architecture](../architecture.md) | Repository boundaries, resource inventory, interactions, dependency topology, and cross-cutting architecture |
32
+ | Service specification | Not applicable — no deployable service in this package |
33
+ | Module specifications | Stable behavior and design at each manifest-routed `<module-path>/docs/README.md` |
34
+ | [ADR](../adr/) | A durable decision, its deciders, rationale, consequences, and supersession lineage |
35
+
36
+ ## Instantiated specification registry
37
+
38
+ | Resource | Role | Canonical path | Owner | Status | Last verified |
39
+ | -------------------------------------------- | ------------ | --------------------------------------------------------------- | --------------------------------- | ------ | ------------- |
40
+ | Repository | Architecture | `docs/architecture.md` | Cisco Webex JS SDK — telemetry | Active | 2026-10-05 |
41
+ | Metrics plugin root | Module | `src/docs/README.md` | Cisco Webex JS SDK — telemetry | Active | 2026-10-05 |
42
+ | Call Analyzer diagnostics | Module | `src/call-diagnostic/docs/README.md` | Cisco Webex JS SDK — telemetry | Active | 2026-10-05 |
43
+ | Privacy and security permission enrichment | Module | `src/privacy-and-security-permission-enricher/docs/README.md` | Cisco Webex JS SDK — telemetry | Active | 2026-10-05 |
44
+ | WebRTC stats telemetry | Module | `src/rtcMetrics/docs/README.md` | Cisco Webex JS SDK — telemetry | Active | 2026-10-05 |
45
+ | Unhandled exception telemetry | Module | `src/unhandled-exception-telemetry/docs/README.md` | Cisco Webex JS SDK — telemetry | Active | 2026-10-05 |
46
+ | Published SDK surface | Contract | `src/index.ts` | Cisco Webex JS SDK — telemetry | Active | 2026-10-05 |
47
+ | Call Analyzer event schema | Contract | `@webex/event-dictionary-ts`, pinned in `package.json` | Webex Call Analyzer (external) | Active | 2026-10-05 |
48
+
49
+ ### Module registry
50
+
51
+ One row per module in `.sdd/manifest.json`, which stays authoritative; this table is its
52
+ human-readable mirror and the reconciliation surface for `scripts/check_spec_index.py`.
53
+
54
+ | Module | Responsibility | Manifest coverage state | Start here |
55
+ | --- | --- | --- | --- |
56
+ | `src/` | Plugin registration, the legacy `metrics` and current `newMetrics` façades, the batcher family, tagged-event metrics and SDK network telemetry | Partial | `src/docs/README.md` |
57
+ | ↳ `src/call-diagnostic/` | Call Analyzer client, feature and media-quality events, the latency ledger, error-code mapping and its own batcher | Partial | `src/call-diagnostic/docs/README.md` |
58
+ | ↳ `src/privacy-and-security-permission-enricher/` | Permission-change enrichment policy applied to Call Analyzer client events | Partial | `src/privacy-and-security-permission-enricher/docs/README.md` |
59
+ | ↳ `src/rtcMetrics/` | WebRTC stats telemetry submitted to the unified telemetry service | Partial | `src/rtcMetrics/docs/README.md` |
60
+ | ↳ `src/unhandled-exception-telemetry/` | Browser uncaught error and promise-rejection reporter | Partial | `src/unhandled-exception-telemetry/docs/README.md` |
61
+
62
+ Every module carries a generated canonical spec. All five are held at `Partial` because the first
63
+ generator-side coverage measurement has not yet produced a score; promotion to `Specced` is a
64
+ coverage-review decision recorded in `.sdd/manifest.json`, not a generation decision. Independent
65
+ semantic validation is a separate gate and is deferred to another runtime by explicit owner
66
+ instruction.
67
+
68
+ ## Change and verification routing
69
+
70
+ | Change affects | Load and update | Verification route |
71
+ | ------------------------------------------------------- | --------------------------------------------------------------------------------- | ------------------------------------------------ |
72
+ | Repository boundaries or cross-cutting architecture | `docs/architecture.md` and applicable ADRs | `test:unit` plus the affected owner specs |
73
+ | A submitted payload, metric name or event name | The owning module spec's `Protocol and wire format`, plus `src/metrics.types.ts` | `test:unit` for the owning module's spec file |
74
+ | A stable code, package, or component boundary | Its module spec | Module tests plus affected contracts |
75
+ | A public API, event, command, package, or file contract | The owning architecture/module section plus the native declaration | `test:unit` and `build` for declaration output |
76
+
77
+ ## Module and contract registration
78
+
79
+ Generate each module specification directly at the exact `modules[].canonical_spec` path recorded in
80
+ `.sdd/manifest.json` (default `<module-path>/docs/README.md`). Never copy a visible module starter or
81
+ reconstruct a path from an example. Register every module and submodule in the Module registry above
82
+ in manifest tree order.
83
+
84
+ Register each contract with a stable identity, `published` or `internal` publication state, canonical
85
+ native source, and owning-module link. This package owns no HTTP surface, so no OpenAPI document is
86
+ selected; its published surface is the ecosystem-native SDK export declared in `package.json` and
87
+ `src/index.ts`, and the upstream Webex metrics and unified telemetry HTTP contracts are externally
88
+ owned. This page provides navigation and ownership rather than a copied contract.
package/package.json CHANGED
@@ -26,21 +26,21 @@
26
26
  "@webex/eslint-config-legacy": "0.0.0",
27
27
  "@webex/jest-config-legacy": "0.0.0",
28
28
  "@webex/legacy-tools": "0.0.0",
29
- "@webex/test-helper-chai": "3.12.0-webex-services-ready.4",
30
- "@webex/test-helper-mocha": "3.12.0-webex-services-ready.4",
31
- "@webex/test-helper-mock-webex": "3.12.0-webex-services-ready.4",
32
- "@webex/test-helper-test-users": "3.12.0-webex-services-ready.4",
29
+ "@webex/test-helper-chai": "3.12.0-next.13",
30
+ "@webex/test-helper-mocha": "3.12.0-next.13",
31
+ "@webex/test-helper-mock-webex": "3.12.0-next.13",
32
+ "@webex/test-helper-test-users": "3.12.0-next.13",
33
33
  "eslint": "^8.24.0",
34
34
  "prettier": "^2.7.1",
35
35
  "sinon": "^9.2.4"
36
36
  },
37
37
  "dependencies": {
38
- "@webex/common": "3.12.0-webex-services-ready.4",
39
- "@webex/common-timers": "3.12.0-webex-services-ready.4",
40
- "@webex/event-dictionary-ts": "^1.0.2215",
41
- "@webex/test-helper-chai": "3.12.0-webex-services-ready.4",
42
- "@webex/test-helper-mock-webex": "3.12.0-webex-services-ready.4",
43
- "@webex/webex-core": "3.12.0-webex-services-ready.4",
38
+ "@webex/common": "3.12.0-next.13",
39
+ "@webex/common-timers": "3.12.0-next.14",
40
+ "@webex/event-dictionary-ts": "^1.0.2220",
41
+ "@webex/test-helper-chai": "3.12.0-next.13",
42
+ "@webex/test-helper-mock-webex": "3.12.0-next.13",
43
+ "@webex/webex-core": "3.13.0-next.1",
44
44
  "ip-anonymize": "^0.1.0",
45
45
  "isbot": "5.2.1",
46
46
  "lodash": "^4.17.21",
@@ -54,5 +54,5 @@
54
54
  "test:style": "eslint ./src/**/*.*",
55
55
  "test:unit": "webex-legacy-tools test --unit --runner mocha"
56
56
  },
57
- "version": "3.12.0-webex-services-ready.4"
57
+ "version": "3.13.0-next.1"
58
58
  }