@webex/common-timers 3.12.0-mobius-socket.3 → 3.12.0-next.10

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.
@@ -0,0 +1,534 @@
1
+ {
2
+ "$schema": "./schemas/repo-context.schema.json",
3
+ "version": 1,
4
+ "repository": {
5
+ "name": "@webex/common-timers",
6
+ "purpose": "Timer primitives for the Cisco Webex JS SDK that never hold a Node process open: unref-ing wrappers over setTimeout and setInterval, plus a restartable one-shot Timer with a guarded init-running-done lifecycle."
7
+ },
8
+ "commands": {
9
+ "install": "yarn install",
10
+ "compile": "yarn workspace @webex/common-timers build:src",
11
+ "build": "yarn workspace @webex/common-timers build",
12
+ "unit-test": "yarn workspace @webex/common-timers test:unit",
13
+ "lint": "yarn workspace @webex/common-timers test:style",
14
+ "deploy": "yarn workspace @webex/common-timers deploy:npm"
15
+ },
16
+ "public_interfaces": [
17
+ {
18
+ "name": "package exports",
19
+ "kind": "package_export",
20
+ "source": "package.json",
21
+ "entrypoints": [
22
+ "safeSetTimeout",
23
+ "safeSetInterval",
24
+ "Timer"
25
+ ],
26
+ "audience": "Ten workspace packages inside the Webex JS SDK plus external npm consumers of @webex/common-timers.",
27
+ "notes": "Verify names and types against src/index.ts, and the compatibility commitments against the Public surface and Export stability sections of src/docs/README.md. The exported handle type is the union number or NodeJS.Timeout."
28
+ },
29
+ {
30
+ "name": "package scripts",
31
+ "kind": "npm_scripts",
32
+ "source": "package.json",
33
+ "entrypoints": [
34
+ "build",
35
+ "build:src",
36
+ "test:unit",
37
+ "test:style",
38
+ "deploy:npm"
39
+ ],
40
+ "audience": "Contributors and CI jobs operating on this package from the workspace root.",
41
+ "notes": "The declared aggregate test script chains test:integration and test:browser, neither of which this package defines, so it cannot succeed. Use test:unit and test:style individually."
42
+ }
43
+ ],
44
+ "source_of_truth": [
45
+ {
46
+ "surface": "timer primitives",
47
+ "paths": [
48
+ "src/index.ts"
49
+ ],
50
+ "generated_artifacts": [
51
+ "dist"
52
+ ],
53
+ "refresh_with": [
54
+ "yarn workspace @webex/common-timers build:src"
55
+ ],
56
+ "validate_with": [
57
+ "yarn workspace @webex/common-timers test:unit",
58
+ "yarn workspace @webex/common-timers test:style"
59
+ ]
60
+ },
61
+ {
62
+ "surface": "module specification",
63
+ "paths": [
64
+ "src/docs/README.md"
65
+ ],
66
+ "generated_artifacts": [],
67
+ "refresh_with": [],
68
+ "validate_with": [
69
+ "Run the active Repo Annotation installation's spec-drift-changed skill on the current diff"
70
+ ]
71
+ },
72
+ {
73
+ "surface": "package standing documentation",
74
+ "paths": [
75
+ "docs/index.md",
76
+ "docs/architecture.md",
77
+ "docs/getting-started.md",
78
+ "docs/specs/README.md",
79
+ "docs/adr/index.md",
80
+ "AGENTS.md"
81
+ ],
82
+ "generated_artifacts": [],
83
+ "refresh_with": [],
84
+ "validate_with": [
85
+ "Run the active Repo Annotation installation's check_spec_index.py and check_repo_context.py against this package"
86
+ ]
87
+ },
88
+ {
89
+ "surface": "unit test suite",
90
+ "paths": [
91
+ "test/unit/spec/index.ts"
92
+ ],
93
+ "generated_artifacts": [],
94
+ "refresh_with": [],
95
+ "validate_with": [
96
+ "yarn workspace @webex/common-timers test:unit"
97
+ ]
98
+ },
99
+ {
100
+ "surface": "build, lint, and test configuration",
101
+ "paths": [
102
+ "jest.config.js",
103
+ "babel.config.js",
104
+ ".eslintrc.js"
105
+ ],
106
+ "generated_artifacts": [],
107
+ "refresh_with": [],
108
+ "validate_with": [
109
+ "yarn workspace @webex/common-timers test:unit",
110
+ "yarn workspace @webex/common-timers test:style"
111
+ ]
112
+ },
113
+ {
114
+ "surface": "SDD routing and coverage state",
115
+ "paths": [
116
+ ".sdd/manifest.json"
117
+ ],
118
+ "generated_artifacts": [],
119
+ "refresh_with": [],
120
+ "validate_with": [
121
+ "Run the active Repo Annotation installation's check_manifest.py against this package"
122
+ ]
123
+ }
124
+ ],
125
+ "generated_artifacts": [
126
+ {
127
+ "path": ".sdd/templates/repo-standards/template-map.json",
128
+ "generated_from": "WebexTools/repo-standards@d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
129
+ "refresh_with": "Run the active Repo Annotation installation's setup-skills.sh against this package to re-materialize the bundled Repo Standards snapshot"
130
+ },
131
+ {
132
+ "path": "dist",
133
+ "generated_from": "src",
134
+ "refresh_with": "yarn workspace @webex/common-timers build:src"
135
+ }
136
+ ],
137
+ "validation_matrix": [
138
+ {
139
+ "paths": [
140
+ "src/index.ts"
141
+ ],
142
+ "minimum": [
143
+ "yarn workspace @webex/common-timers test:unit"
144
+ ],
145
+ "recommended": [
146
+ "yarn workspace @webex/common-timers test:style",
147
+ "yarn workspace @webex/common-timers build:src"
148
+ ]
149
+ },
150
+ {
151
+ "paths": [
152
+ "test/unit/spec/index.ts"
153
+ ],
154
+ "minimum": [
155
+ "yarn workspace @webex/common-timers test:unit"
156
+ ],
157
+ "recommended": []
158
+ },
159
+ {
160
+ "paths": [
161
+ "package.json",
162
+ "jest.config.js",
163
+ "babel.config.js",
164
+ ".eslintrc.js"
165
+ ],
166
+ "minimum": [
167
+ "yarn workspace @webex/common-timers test:unit"
168
+ ],
169
+ "recommended": [
170
+ "yarn workspace @webex/common-timers test:style",
171
+ "yarn workspace @webex/common-timers build:src"
172
+ ]
173
+ },
174
+ {
175
+ "paths": [
176
+ "src/docs/README.md",
177
+ "docs",
178
+ "AGENTS.md",
179
+ ".sdd/manifest.json"
180
+ ],
181
+ "minimum": [
182
+ "Run the active Repo Annotation installation's check_manifest.py, check_spec_index.py, and check_repo_context.py against this package"
183
+ ],
184
+ "recommended": [
185
+ "Run the active Repo Annotation installation's spec-drift-changed skill on the current diff"
186
+ ]
187
+ }
188
+ ],
189
+ "change_impact": [
190
+ {
191
+ "paths": [
192
+ "src/index.ts"
193
+ ],
194
+ "affects": [
195
+ "@webex/internal-plugin-mercury",
196
+ "@webex/internal-plugin-metrics",
197
+ "@webex/internal-plugin-device",
198
+ "@webex/internal-plugin-encryption",
199
+ "@webex/internal-plugin-avatar",
200
+ "@webex/internal-plugin-dss",
201
+ "@webex/internal-plugin-ai-assistant",
202
+ "@webex/internal-plugin-scheduler",
203
+ "@webex/webex-core",
204
+ "@webex/calling",
205
+ "@webex/plugin-meetings",
206
+ "external npm consumers of @webex/common-timers"
207
+ ],
208
+ "refresh_with": [
209
+ "yarn workspace @webex/common-timers build:src"
210
+ ],
211
+ "validate_with": [
212
+ "yarn workspace @webex/common-timers test:unit"
213
+ ],
214
+ "avoid_direct_edits": [
215
+ "dist"
216
+ ],
217
+ "notes": "Any change to safeSetTimeout, safeSetInterval, or Timer is a published surface change. Behavior changes must update the Requirements, State machine, Caller-visible failure modes, and Verification sections of src/docs/README.md in the same commit. The affects list is derived from source imports, not manifests alone: internal-plugin-scheduler declares the dependency without importing it, and plugin-meetings imports it without declaring it."
218
+ },
219
+ {
220
+ "paths": [
221
+ ".sdd/manifest.json"
222
+ ],
223
+ "affects": [
224
+ "docs/specs/README.md",
225
+ "src/docs/README.md",
226
+ "docs/architecture.md"
227
+ ],
228
+ "refresh_with": [],
229
+ "validate_with": [
230
+ "Run the active Repo Annotation installation's check_manifest.py and check_spec_index.py against this package"
231
+ ],
232
+ "avoid_direct_edits": [
233
+ ".sdd/templates/repo-standards"
234
+ ],
235
+ "notes": "The manifest is authoritative for module routing, coverage state, contracts, and artifact decisions. The specification registry is its human-readable mirror and must be regenerated alongside it."
236
+ },
237
+ {
238
+ "paths": [
239
+ "package.json"
240
+ ],
241
+ "affects": [
242
+ ".repo-context.json",
243
+ ".sdd/manifest.json",
244
+ "docs/getting-started.md",
245
+ "AGENTS.md"
246
+ ],
247
+ "refresh_with": [],
248
+ "validate_with": [
249
+ "Run the active Repo Annotation installation's check_repo_context.py against this package"
250
+ ],
251
+ "avoid_direct_edits": [
252
+ "dist"
253
+ ],
254
+ "notes": "Command strings are duplicated between the manifest and this context by contract and must stay identical; the checker fails on any divergence."
255
+ }
256
+ ],
257
+ "glossary": [
258
+ {
259
+ "term": "unref",
260
+ "definition": "Asking a Node timer handle to stop counting toward process liveness, so a pending timer cannot prevent the process from exiting.",
261
+ "notes": "Available only on Node timer handles. Browsers return a number with no such method, which is why every wrapper feature-detects it."
262
+ },
263
+ {
264
+ "term": "safe",
265
+ "definition": "In safeSetTimeout and safeSetInterval, specifically safe against wedging a process open.",
266
+ "notes": "It implies nothing about error handling, argument validation, or type safety."
267
+ },
268
+ {
269
+ "term": "handle",
270
+ "definition": "The value the host scheduler returns: a Timeout object in Node, a number in a browser. The package returns it unchanged after unref-ing it.",
271
+ "notes": "Callers pass it to the platform clearTimeout or clearInterval; the package exports no clear function."
272
+ },
273
+ {
274
+ "term": "arm",
275
+ "definition": "Move a Timer from init to running by scheduling its callback.",
276
+ "notes": "Only start arms a timer. Construction schedules nothing."
277
+ },
278
+ {
279
+ "term": "reset",
280
+ "definition": "Clear a running Timer and re-arm it for the full original timeout.",
281
+ "notes": "It is an idle deadline, not a pause or a resume; the remaining time is discarded."
282
+ },
283
+ {
284
+ "term": "done",
285
+ "definition": "The terminal Timer state, reached by either expiry or cancellation.",
286
+ "notes": "It is not recoverable, and the two causes are indistinguishable to a caller."
287
+ }
288
+ ],
289
+ "evidence_rules": [
290
+ {
291
+ "claim_category": "command_name",
292
+ "sources": [
293
+ "package.json"
294
+ ],
295
+ "requirement": "Emit a command only when its script exists in package.json and the workspace-scoped invocation was verified to run.",
296
+ "notes": "The declared aggregate test script is the counterexample: it is present in package.json but cannot succeed, so it is never emitted as a runnable command."
297
+ },
298
+ {
299
+ "claim_category": "import_path",
300
+ "sources": [
301
+ "src/index.ts",
302
+ "package.json"
303
+ ],
304
+ "requirement": "Emit an export name only when it is declared in src/index.ts and reachable through the entry point declared by main or devMain."
305
+ },
306
+ {
307
+ "claim_category": "behavior_claim",
308
+ "sources": [
309
+ "src/index.ts",
310
+ "test/unit/spec/index.ts"
311
+ ],
312
+ "requirement": "Ground every behavior claim in the implementation, and state separately whether a test observes it. Nine Timer lifecycle branches are tested; the unref behavior is not.",
313
+ "notes": "Commit history is not acceptable rationale evidence for this package."
314
+ },
315
+ {
316
+ "claim_category": "placeholder_token",
317
+ "sources": [
318
+ ".sdd/templates/repo-standards/template-map.json"
319
+ ],
320
+ "requirement": "Never ship a template placeholder in a generated document; replace it with verified repository evidence or surface the gap as a blocking question."
321
+ }
322
+ ],
323
+ "negative_guidance": [
324
+ {
325
+ "rule": "Do not infer the runtime platform; feature-detect unref on the returned handle.",
326
+ "why": "One module and one build serve both Node and the browser. A platform branch would add a conditional export or bundler shim the package has deliberately avoided."
327
+ },
328
+ {
329
+ "rule": "Do not turn an invalid Timer transition into a silent no-op.",
330
+ "why": "Consumers rely on the throw being loud, and the message wording is asserted by regular expression in the unit suite."
331
+ },
332
+ {
333
+ "rule": "Do not treat reset as a pause or resume.",
334
+ "why": "It restores the full original timeout by design; both production consumers use it as an idle deadline."
335
+ },
336
+ {
337
+ "rule": "Do not add a runtime dependency without escalating.",
338
+ "why": "The package currently declares none, which is what removes every cycle and third-party failure mode from the eleven workspace packages that consume it."
339
+ },
340
+ {
341
+ "rule": "Do not cite commit or pull-request history as rationale for current behavior.",
342
+ "why": "The package owner verified during onboarding that its history is dominated by release chores and repo-wide sweeps, so it cannot explain why behavior exists."
343
+ },
344
+ {
345
+ "rule": "Do not publish a Repo Standards template out of .sdd/templates into docs.",
346
+ "why": "Authoring templates stay hidden; only instantiated, repository-grounded documents belong in the visible documentation tree."
347
+ },
348
+ {
349
+ "rule": "Do not treat a green unit run as proof that the unref contract still holds.",
350
+ "why": "No test asserts that unref() is called, so removing it from src/index.ts leaves the suite green. The module's core guarantee is currently supported by code reading only; see the Verification section of src/docs/README.md."
351
+ },
352
+ {
353
+ "rule": "Do not trust a green unit run after changing src without rebuilding first.",
354
+ "why": "The suite imports the package by name, which resolves through main to dist/, so it validates the built artifact rather than the source."
355
+ }
356
+ ],
357
+ "confidence_policy": {
358
+ "high": {
359
+ "action": "update",
360
+ "expectation": "The claim is backed by src/index.ts or test/unit/spec/index.ts and the affected specification sections are updated in the same change."
361
+ },
362
+ "medium": {
363
+ "action": "narrow-scope",
364
+ "expectation": "Implementation evidence exists but no test observes the behavior, as with the unref calls. Record the gap in the Verification section rather than asserting verified coverage."
365
+ },
366
+ "low": {
367
+ "action": "noop",
368
+ "expectation": "Neither code nor tests establish the fact. Stop and ask the package owner; do not fall back to commit history or to a plausible default."
369
+ }
370
+ },
371
+ "repository_topology": {
372
+ "main_entrypoints": [
373
+ {
374
+ "name": "package entry point",
375
+ "path": "src/index.ts",
376
+ "purpose": "Declares the entire public surface: safeSetTimeout, safeSetInterval, and Timer.",
377
+ "notes": "Resolved directly by workspace consumers through devMain; published consumers resolve the built dist output through main."
378
+ }
379
+ ],
380
+ "workspace_packages": [
381
+ {
382
+ "name": "@webex/common-timers",
383
+ "paths": [
384
+ "package.json"
385
+ ],
386
+ "notes": "A single published library package inside the Webex JS SDK yarn workspace, with no runtime dependencies."
387
+ }
388
+ ],
389
+ "source_surfaces": [
390
+ {
391
+ "name": "module source",
392
+ "paths": [
393
+ "src"
394
+ ],
395
+ "notes": "One file. The whole module is src/index.ts; src/docs holds its canonical specification."
396
+ },
397
+ {
398
+ "name": "unit tests",
399
+ "paths": [
400
+ "test/unit"
401
+ ],
402
+ "notes": "Mirrors the src layout one-to-one, as every package in this workspace does. 13 jest cases using sinon fake timers."
403
+ },
404
+ {
405
+ "name": "inherited configuration",
406
+ "paths": [
407
+ "jest.config.js",
408
+ "babel.config.js",
409
+ ".eslintrc.js",
410
+ "process"
411
+ ],
412
+ "notes": "Three files re-export shared workspace configuration; process is a one-line browser shim for the browserify transform."
413
+ }
414
+ ],
415
+ "generated_surfaces": [
416
+ {
417
+ "name": "Repo Standards template snapshot",
418
+ "paths": [
419
+ ".sdd/templates/repo-standards"
420
+ ],
421
+ "generated_from": "WebexTools/repo-standards@d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
422
+ "refresh_with": "Run the active Repo Annotation installation's setup-skills.sh against this package",
423
+ "notes": "Hidden authoring templates. Never edited by hand and never published into the visible documentation tree."
424
+ },
425
+ {
426
+ "name": "build output",
427
+ "paths": [
428
+ "dist"
429
+ ],
430
+ "generated_from": "src",
431
+ "refresh_with": "yarn workspace @webex/common-timers build:src",
432
+ "notes": "Transpiled module, type declarations, and source maps. Ignored by version control and never edited directly."
433
+ }
434
+ ],
435
+ "sync_paths": [
436
+ {
437
+ "source": "WebexTools/repo-standards@d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
438
+ "targets": [
439
+ ".sdd/templates/repo-standards"
440
+ ],
441
+ "mechanism": "Run the active Repo Annotation installation's setup-skills.sh against this package",
442
+ "notes": "The seeded snapshot is checksum-verified against the bundled upstream inventory before it is applied."
443
+ }
444
+ ],
445
+ "validation_entrypoints": [
446
+ {
447
+ "name": "unit tests",
448
+ "command": "yarn workspace @webex/common-timers test:unit",
449
+ "scope": "Behavior of safeSetTimeout, safeSetInterval, and every Timer lifecycle transition.",
450
+ "notes": "Coverage collection is disabled by the resolved jest configuration, so no threshold gates this package."
451
+ },
452
+ {
453
+ "name": "lint",
454
+ "command": "yarn workspace @webex/common-timers test:style",
455
+ "scope": "ESLint over src, using the shared workspace rule set."
456
+ },
457
+ {
458
+ "name": "build",
459
+ "command": "yarn workspace @webex/common-timers build:src",
460
+ "scope": "Transpilation and declaration emission for the published artifact."
461
+ }
462
+ ]
463
+ },
464
+ "surface_owners": [
465
+ {
466
+ "surface": "timer primitives and the published export surface",
467
+ "owner": "Cisco Webex for Developers",
468
+ "edit_boundary": "src/index.ts is the only implementation file. A change here is a published surface change and must update src/docs/README.md in the same commit."
469
+ },
470
+ {
471
+ "surface": "module specification and package standing documentation",
472
+ "owner": "Cisco Webex for Developers",
473
+ "edit_boundary": "Generated from the Repo Standards templates and routed by .sdd/manifest.json. Edit the generated documents in place; never edit the hidden templates."
474
+ },
475
+ {
476
+ "surface": "build, lint, and test configuration",
477
+ "owner": "Webex JS SDK workspace",
478
+ "edit_boundary": "Owned by the shared @webex legacy config packages. There is no package-local knob; change the shared configuration instead."
479
+ },
480
+ {
481
+ "surface": "release, changelog, contribution policy, and security policy",
482
+ "owner": "Webex JS SDK workspace root",
483
+ "edit_boundary": "Not owned by this package. It intentionally ships no CHANGELOG.md, CONTRIBUTING.md, or SECURITY.md."
484
+ }
485
+ ],
486
+ "do_not_edit": [
487
+ "dist",
488
+ ".sdd/templates/repo-standards"
489
+ ],
490
+ "marker_scopes": {
491
+ "sdd-generated-metadata": [
492
+ "AGENTS.md",
493
+ "docs/index.md",
494
+ "docs/architecture.md",
495
+ "docs/getting-started.md",
496
+ "docs/specs/README.md",
497
+ "docs/adr/index.md",
498
+ "src/docs/README.md"
499
+ ]
500
+ },
501
+ "fallback_rules": [
502
+ "When code and this context disagree, the code wins; correct the context and the affected specification sections in the same change.",
503
+ "When a fact cannot be established from src/index.ts, test/unit/spec/index.ts, or package.json, stop and ask the package owner rather than inferring it from commit history.",
504
+ "When a required command is missing, say so and stop; do not substitute a plausible alternative.",
505
+ "When a change would alter the published export surface, treat it as breaking until a dependent-package review proves otherwise."
506
+ ],
507
+ "downstream_context_pack": {
508
+ "required_human_surfaces": [
509
+ "README.md",
510
+ "docs/index.md",
511
+ "docs/getting-started.md",
512
+ "docs/architecture.md"
513
+ ],
514
+ "required_agent_operational_surfaces": [
515
+ "AGENTS.md",
516
+ "docs/specs/README.md",
517
+ "src/docs/README.md"
518
+ ],
519
+ "required_machine_readable_surface": ".repo-context.json",
520
+ "recommended_machine_readable_sections": [
521
+ "public_interfaces",
522
+ "source_of_truth",
523
+ "generated_artifacts",
524
+ "validation_matrix",
525
+ "change_impact",
526
+ "glossary",
527
+ "evidence_rules",
528
+ "negative_guidance",
529
+ "confidence_policy",
530
+ "repository_topology",
531
+ "surface_owners"
532
+ ]
533
+ }
534
+ }