@webex/storage-adapter-session-storage 3.13.0-next.5 → 3.13.0-next.7

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,376 @@
1
+ {
2
+ "manifest_version": 1,
3
+ "repository": {
4
+ "name": "@webex/storage-adapter-session-storage",
5
+ "purpose": "Published webex-core storage adapter backed by the browser sessionStorage API. new StorageAdapterSessionStorage(basekey) keeps every namespace of one instance in a single JSON document under that sessionStorage key. bind(namespace, options) checks the namespace and logger and resolves a binding whose get, put, and del read and rewrite the document and whose clear removes the whole basekey entry for every namespace. Absent keys reject with the webex-core NotFoundError, and each call logs one info line through the bound logger. No workspace package configures it; an application places an instance in a webex-core storage adapter slot.",
6
+ "category": "cat2-legacy",
7
+ "primary_languages": [
8
+ "javascript"
9
+ ]
10
+ },
11
+ "topology": "Orchestrator-plus-components",
12
+ "commands": {
13
+ "install": {
14
+ "command": "yarn",
15
+ "source_file": "../../../.github/workflows/deploy.yml",
16
+ "role": "install"
17
+ },
18
+ "compile": {
19
+ "command": "yarn workspace @webex/storage-adapter-session-storage build",
20
+ "source_file": "package.json",
21
+ "role": "compile"
22
+ },
23
+ "build": {
24
+ "command": "yarn workspace @webex/storage-adapter-session-storage build:src",
25
+ "source_file": "package.json",
26
+ "role": "package"
27
+ },
28
+ "unit-test": {
29
+ "command": "yarn workspace @webex/storage-adapter-session-storage test:unit",
30
+ "source_file": "package.json",
31
+ "role": "unit-test"
32
+ },
33
+ "lint": {
34
+ "command": "yarn workspace @webex/storage-adapter-session-storage test:style",
35
+ "source_file": "package.json",
36
+ "role": "lint"
37
+ },
38
+ "browser-test": {
39
+ "command": "yarn workspace @webex/storage-adapter-session-storage test:browser",
40
+ "source_file": "package.json",
41
+ "role": "other"
42
+ },
43
+ "deploy": {
44
+ "command": "yarn workspace @webex/storage-adapter-session-storage deploy:npm",
45
+ "source_file": "package.json",
46
+ "role": "deploy"
47
+ }
48
+ },
49
+ "tests": {
50
+ "unit": {
51
+ "command_ref": "unit-test",
52
+ "dir": "test/unit/spec",
53
+ "framework": "jest"
54
+ }
55
+ },
56
+ "toolchain": [
57
+ {
58
+ "name": "node",
59
+ "version": ">=16",
60
+ "origin": "repo-config",
61
+ "source_file": "package.json"
62
+ },
63
+ {
64
+ "name": "node",
65
+ "version": "22.14",
66
+ "origin": "repo-config",
67
+ "source_file": "../../../AGENTS.md"
68
+ },
69
+ {
70
+ "name": "node",
71
+ "version": "lts/jod",
72
+ "origin": "repo-config",
73
+ "source_file": "../../../.nvmrc"
74
+ },
75
+ {
76
+ "name": "node",
77
+ "version": "18.x",
78
+ "origin": "repo-config",
79
+ "source_file": "../../../package.json"
80
+ },
81
+ {
82
+ "name": "yarn",
83
+ "version": "3.4.1",
84
+ "origin": "repo-config",
85
+ "source_file": "../../../package.json"
86
+ },
87
+ {
88
+ "name": "babel",
89
+ "version": "^7.17.10",
90
+ "origin": "repo-config",
91
+ "source_file": "package.json"
92
+ },
93
+ {
94
+ "name": "eslint",
95
+ "version": "^8.24.0",
96
+ "origin": "repo-config",
97
+ "source_file": "package.json"
98
+ },
99
+ {
100
+ "name": "prettier",
101
+ "version": "^2.7.1",
102
+ "origin": "repo-config",
103
+ "source_file": "package.json"
104
+ }
105
+ ],
106
+ "quality_gates": {
107
+ "code_coverage": {
108
+ "origin": "none",
109
+ "declared_by": "rarajes2@cisco.com via the bootstrap questionnaire (generator check: test:unit runs webex-legacy-tools with --runner jest; jest.config.js re-exports @webex/jest-config-legacy, which sets no coverageThreshold; package.json defines no coverage script)"
110
+ }
111
+ },
112
+ "coverage_status_definitions": {
113
+ "specced": ">=80% public surface specced, drift <5% - spec is authoritative",
114
+ "partial": "40-80% specced - spec is a hint, cross-check code",
115
+ "untracked": "<40% specced - code is the source of truth"
116
+ },
117
+ "spec_source_policy": {
118
+ "mode": "keep-separate",
119
+ "migrated_source_disposition": "retain",
120
+ "disposition_decided_by": "rarajes2@cisco.com",
121
+ "disposition_decided_at": "2026-11-13T05:50:00Z",
122
+ "decided_by": "rarajes2@cisco.com",
123
+ "decided_at": "2026-11-13T05:50:00Z",
124
+ "decision_record": "docs/adr/0001-retain-product-readme.md"
125
+ },
126
+ "spec_sources": [
127
+ {
128
+ "path": "README.md",
129
+ "scope": "repo",
130
+ "role": "reference-only",
131
+ "canonical": false,
132
+ "use_by_agents": "context-only",
133
+ "post_migration_action": "retain",
134
+ "deletion_status": "not-applicable",
135
+ "notes": "npm page, kept unchanged under keep-separate. Its one-line description calls the package a localStorage adapter, while src/index.js uses sessionStorage; its Usage section only links to the developer portal. See docs/adr/0001-retain-product-readme.md."
136
+ }
137
+ ],
138
+ "modules": [
139
+ {
140
+ "path": "src",
141
+ "canonical_spec": "src/docs/README.md",
142
+ "coverage_status": "Partial",
143
+ "coverage_evidence": "Field coverage 100% (15/15) assessed 2026-11-13 by the generator; critical field coverage 7/7. No test route executes a case: test:unit exits 0 with all 21 shared-suite cases skipped under Node (skipInNode), and test:browser exits 0 with 0 tests completed because the shared suite calls the Jest beforeAll global under mocha. MOD-001 to MOD-017 and INV-001 to INV-004 rest on source reading plus an uncommitted 2026-11-13 behavior probe of the built dist. build:src, build, test:unit, and test:style exit 0. Independent validation passed 2026-11-13 on validator runtime 01a1d386-b645-7461-9a36-8a91051caadd with 0 Blocking, 0 Important, 0 Medium, and 0 Minor findings. The module stays Partial pending an executing test route, a characterization baseline, and promotion review.",
144
+ "last_assessed": "2026-11-13",
145
+ "contracts": {
146
+ "provides": [
147
+ "storage-adapter-session-storage-sdk",
148
+ "session-storage-bounded-document"
149
+ ],
150
+ "requires": [
151
+ "webex-core-store-adapter-interface",
152
+ "webex-core-storage-errors",
153
+ "storage-adapter-spec-suite"
154
+ ]
155
+ },
156
+ "section_profile": {
157
+ "has_tiers": false,
158
+ "has_ui": false,
159
+ "crosses_service_boundaries": false,
160
+ "holds_client_state": false,
161
+ "enforces_domain_rules": true,
162
+ "is_concurrent_async": true,
163
+ "owns_persistence": true,
164
+ "stateful_transitions": false,
165
+ "exposes_wire_protocol": false,
166
+ "ui_multi_screen": false,
167
+ "large_data_model": false,
168
+ "returns_caller_errors": true,
169
+ "module_specific_conventions": true,
170
+ "published_package": true,
171
+ "embedded_in_host": true,
172
+ "has_design_tradeoff": true,
173
+ "resolved_by": "claude-code (code evidence; bootstrap questionnaire)",
174
+ "resolved_at": "2026-11-13T05:50:00Z",
175
+ "has_submodules": false,
176
+ "has_submodules_computed_by": "scripts/module_tree.py",
177
+ "has_submodules_computed_at": "2026-11-13T05:50:00Z"
178
+ }
179
+ }
180
+ ],
181
+ "contract_catalog": {
182
+ "index_path": "docs/architecture.md",
183
+ "definitions": {
184
+ "storage-adapter-session-storage-sdk": {
185
+ "kind": "sdk",
186
+ "publication": "published",
187
+ "source_kind": "repository-path",
188
+ "source": "package.json",
189
+ "summary": "Published npm package. main is dist/index.js and devMain is src/index.js; no type declarations or API report are published. src/index.js default-exports StorageAdapterSessionStorage: new StorageAdapterSessionStorage(basekey); bind(namespace, options) rejects on a falsy namespace or missing options.logger, throws synchronously when the logger has no info method, and otherwise resolves a new binding exposing get, put, del, and clear. Importing the package has no side effects. Specified in src/docs/README.md."
190
+ },
191
+ "session-storage-bounded-document": {
192
+ "kind": "file",
193
+ "publication": "internal",
194
+ "source_kind": "repository-path",
195
+ "source": "src/index.js",
196
+ "summary": "At-rest JSON document stored in sessionStorage under the constructor basekey, shaped {namespace: {key: value}}. Read by _getRawData and _load, rewritten whole by _save, removed by clear. No version field, migration step, or schema check exists, and no compatibility rule is declared."
197
+ },
198
+ "webex-core-store-adapter-interface": {
199
+ "kind": "sdk",
200
+ "publication": "published",
201
+ "source_kind": "external",
202
+ "source": "@webex/webex-core (workspace package; storage spec consulted: packages/@webex/webex-core/src/lib/storage/docs/README.md Public surface, MOD-017, MOD-018, MOD-020, MOD-022; code checked: src/lib/storage/make-webex-store.js)",
203
+ "summary": "The adapter slots storage.boundedAdapter and storage.unboundedAdapter hold an object whose bind(namespace, {logger}) resolves a handle with get, put, del, and clear. WebexStore reads the slot on each use, binds each namespace once per store behind oneFlight inside a promise executor, turns put of undefined into del, and on clear calls clear on every binding it created. Both slots default to MemoryStoreAdapter."
204
+ },
205
+ "webex-core-storage-errors": {
206
+ "kind": "sdk",
207
+ "publication": "published",
208
+ "source_kind": "external",
209
+ "source": "@webex/webex-core (workspace package; storage spec consulted: packages/@webex/webex-core/src/lib/storage/docs/README.md Public surface, MOD-016, MOD-027; code checked: src/lib/storage/errors.js)",
210
+ "summary": "NotFoundError, built on StorageError, exported from the package entry. Host hydration treats it as absence and any other rejection as a fault, so adapters must reject get of an absent key with it."
211
+ },
212
+ "storage-adapter-spec-suite": {
213
+ "kind": "sdk",
214
+ "publication": "published",
215
+ "source_kind": "external",
216
+ "source": "@webex/storage-adapter-spec (workspace package; spec consulted: packages/@webex/storage-adapter-spec/src/docs/README.md MOD-001 to MOD-014)",
217
+ "summary": "Test-time only. runAbstractStorageAdapterSpec(adapter) declares 21 cases into the active runner using describe, it, and the Jest beforeAll global. Its isolation case is never awaited, its put-undefined cases do not isolate the behavior, and it leaves clear scope and signature unspecified."
218
+ }
219
+ }
220
+ },
221
+ "spec_policy": {
222
+ "require_what_and_why": true,
223
+ "require_provenance": true,
224
+ "protected_specs": [
225
+ "src/docs/README.md"
226
+ ]
227
+ },
228
+ "validation": {
229
+ "generator_runtime": "claude-code",
230
+ "generator_model": "claude-opus-5-5",
231
+ "generator_runtime_source": "host-metadata",
232
+ "source_commit": "b124d9842eb45e460fdfcf764a6e4651b4d3d542",
233
+ "base_ref": "next",
234
+ "minimum_independence": "different-runtime",
235
+ "blocking_severities": [
236
+ "Blocking"
237
+ ],
238
+ "validator_runtime": "01a1d386-b645-7461-9a36-8a91051caadd",
239
+ "validator_runtime_source": "host-metadata",
240
+ "runtime_fallback_tier": "different-runtime"
241
+ },
242
+ "layout": {
243
+ "sdd_root": ".sdd",
244
+ "docs_root": "docs",
245
+ "agent_entry_path": "AGENTS.md",
246
+ "standing_docs_root": "docs",
247
+ "spec_index_path": "docs/specs/README.md",
248
+ "module_docs_strategy": "source-local",
249
+ "module_docs_relative_path": "docs/README.md",
250
+ "module_docs_decision": {
251
+ "basis": "repo-standards-default",
252
+ "reason": "No module-local documentation existed. The source-local default gives src/docs/README.md. test:style runs eslint ./src/**/*.*, and the shared @webex/eslint-config-legacy ignore patterns exclude docs/** and *.md; build:src processes -js -ts only, so Markdown under src/ does not enter dist/.",
253
+ "decided_by": "rarajes2@cisco.com (bootstrap questionnaire)",
254
+ "decided_at": "2026-11-13T05:50:00Z"
255
+ },
256
+ "repo_context_decision": {
257
+ "path": ".repo-context.json",
258
+ "schema_path": "schemas/repo-context.schema.json",
259
+ "action": "create",
260
+ "schema_action": "create",
261
+ "reason": "Neither the operational context nor its schema existed in this package. The context is created from package evidence and the schema is copied from the repository-root .sdd/templates/repo-standards/schemas/repo-context.schema.json.",
262
+ "decided_by": "rarajes2@cisco.com (bootstrap questionnaire)",
263
+ "decided_at": "2026-11-13T05:50:00Z"
264
+ },
265
+ "artifact_decisions": [
266
+ {
267
+ "path": "docs/service.md",
268
+ "action": "omit",
269
+ "reason": "Library package, not a deployable service. package.json has no start script, container, or deployment descriptor.",
270
+ "decided_by": "claude-code (code evidence)",
271
+ "decided_at": "2026-11-13T05:50:00Z"
272
+ },
273
+ {
274
+ "path": "mkdocs.yml",
275
+ "action": "omit",
276
+ "reason": "No package-level documentation site exists. Documentation publishing stays with the workspace.",
277
+ "decided_by": "claude-code (code evidence)",
278
+ "decided_at": "2026-11-13T05:50:00Z"
279
+ },
280
+ {
281
+ "path": "api-specs/openapi.yaml",
282
+ "action": "omit",
283
+ "reason": "The package serves and calls no HTTP routes. Its published surface is the npm export described by storage-adapter-session-storage-sdk.",
284
+ "decided_by": "claude-code (code evidence)",
285
+ "decided_at": "2026-11-13T05:50:00Z"
286
+ },
287
+ {
288
+ "path": "SECURITY.md",
289
+ "action": "omit",
290
+ "reason": "No package-level security policy exists. The workspace owns security policy, and a per-package copy would duplicate it; security architecture is described in docs/architecture.md.",
291
+ "decided_by": "claude-code (code evidence)",
292
+ "decided_at": "2026-11-13T05:50:00Z"
293
+ },
294
+ {
295
+ "path": "CONTRIBUTING.md",
296
+ "action": "omit",
297
+ "reason": "Contribution instructions are owned at the workspace root CONTRIBUTING.md.",
298
+ "decided_by": "claude-code (code evidence)",
299
+ "decided_at": "2026-11-13T05:50:00Z"
300
+ },
301
+ {
302
+ "path": "CHANGELOG.md",
303
+ "action": "omit",
304
+ "reason": "Changelog generation is owned at the workspace root. This package has no changelog file.",
305
+ "decided_by": "claude-code (code evidence)",
306
+ "decided_at": "2026-11-13T05:50:00Z"
307
+ },
308
+ {
309
+ "path": "CTO_CHECKLIST.yml",
310
+ "action": "omit",
311
+ "reason": "The CTO readiness checklist applies to deployable services. This package is a library.",
312
+ "decided_by": "claude-code (code evidence)",
313
+ "decided_at": "2026-11-13T05:50:00Z"
314
+ },
315
+ {
316
+ "path": "schemas/cto-checklist.schema.json",
317
+ "action": "omit",
318
+ "reason": "Omitted together with CTO_CHECKLIST.yml.",
319
+ "decided_by": "claude-code (code evidence)",
320
+ "decided_at": "2026-11-13T05:50:00Z"
321
+ }
322
+ ],
323
+ "template_roots": {
324
+ "canonical": ".sdd/templates/repo-standards"
325
+ },
326
+ "contract_index_path": "docs/architecture.md",
327
+ "repo_skills_root": ".sdd/skills",
328
+ "monorepo_package": {
329
+ "package_path": "packages/@webex/storage-adapter-session-storage",
330
+ "root_manifest_path": "../../../.sdd/manifest.json",
331
+ "templates_root_path": "../../../.sdd/templates/repo-standards"
332
+ }
333
+ },
334
+ "tooling": {
335
+ "sdlc_skills": {
336
+ "source_ref": "repo-annotation@2.3.1"
337
+ }
338
+ },
339
+ "coverage_ratchet": {
340
+ "enabled": true,
341
+ "waivers": []
342
+ },
343
+ "substrate": {
344
+ "source": "WebexTools/repo-standards@d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
345
+ "consumed": [
346
+ "@webex/eslint-config-legacy via .eslintrc.js",
347
+ "@webex/babel-config-legacy via babel.config.js",
348
+ "@webex/jest-config-legacy via jest.config.js",
349
+ "@webex/legacy-tools build and test runner via package.json",
350
+ "package README.md (context only)",
351
+ "Repo Standards templates at the monorepo root .sdd/templates/repo-standards, referred to through layout.monorepo_package.templates_root_path (this package holds no templates)"
352
+ ],
353
+ "compliance_tier": "baseline"
354
+ },
355
+ "section_profiles": {
356
+ "repo": {
357
+ "owns_datastore": true,
358
+ "holds_client_state": false,
359
+ "components_interact": false,
360
+ "domain_data_across_components": false,
361
+ "caches_data": false,
362
+ "observability_convention": true,
363
+ "deploys_to_infra": false,
364
+ "shared_base_libs": true,
365
+ "is_monorepo": false,
366
+ "multi_platform": false,
367
+ "published_package": true,
368
+ "embedded_in_host": true,
369
+ "cross_repo_deps_material": false,
370
+ "security_arch_warranted": true,
371
+ "exposes_commands_or_artifacts": true
372
+ },
373
+ "resolved_by": "claude-code (code evidence; bootstrap questionnaire)",
374
+ "resolved_at": "2026-11-13T05:50:00Z"
375
+ }
376
+ }
package/AGENTS.md ADDED
@@ -0,0 +1,208 @@
1
+ <!-- sdd-generated-metadata
2
+ doc_kind: agent-entry
3
+ generated_from: agents@0.3.0
4
+ generated_by: claude-code
5
+ approved_by: rarajes2@cisco.com
6
+ updated_at: 2026-11-13T06:13:09Z
7
+ validation_status: pass
8
+ -->
9
+
10
+ # AI Agent Instructions
11
+
12
+ Package-scoped SDD entry for `@webex/storage-adapter-session-storage`, a webex-core storage adapter
13
+ that keeps every namespace of one basekey in a single browser `sessionStorage` JSON document. This
14
+ file orients agents. The monorepo root `AGENTS.md` governs workspace-wide setup.
15
+
16
+ ## Working Method
17
+
18
+ - Read the relevant package files before editing. Do not edit blind.
19
+ - Understand the task and affected surfaces before writing code.
20
+ - Prefer focused edits over rewriting whole files.
21
+ - Do not invent commands, paths, exports, method names, or storage keys. Verify them from this
22
+ package's source.
23
+ - Test or validate before declaring done.
24
+ - Keep output concise. If something is uncertain, say so instead of guessing.
25
+
26
+ ## Canonical Repository Documentation
27
+
28
+ Before changing code or documentation, start with:
29
+
30
+ - [`docs/index.md`](docs/index.md) for package documentation navigation;
31
+ - [`docs/architecture.md`](docs/architecture.md) for package boundaries and interactions;
32
+ - [`docs/specs/README.md`](docs/specs/README.md) for the manifest-backed module and contract registry;
33
+ - the module specification at [`src/docs/README.md`](src/docs/README.md) (sessionStorage adapter); and
34
+ - [`docs/adr/index.md`](docs/adr/index.md) plus applicable concrete ADRs.
35
+
36
+ Follow `.sdd/manifest.json` for each contract's publication state and canonical source. This package
37
+ publishes an SDK surface, so its contract artifact is `package.json` plus the `src/index.js` entry. It
38
+ serves no HTTP, so no OpenAPI applies.
39
+
40
+ ## 1. Commands (Run First)
41
+
42
+ Use only documented commands. Do not invent alternatives when a command is missing. Run everything from the workspace root: `yarn` to install, and
43
+ `yarn workspace @webex/storage-adapter-session-storage <script>` for the package scripts below.
44
+
45
+ | Task | Command |
46
+ | ---------------------- | ------- |
47
+ | Install dependencies | `yarn` (workspace root; the deploy workflow runs the same command) |
48
+ | Start dev environment | N/A — library package with no start script in `package.json` |
49
+ | Run tests | `yarn workspace @webex/storage-adapter-session-storage test:unit` (currently skips all 21 cases; see below) |
50
+ | Run linters | `yarn workspace @webex/storage-adapter-session-storage test:style` |
51
+ | Build/release artifact | `yarn workspace @webex/storage-adapter-session-storage build:src` (JavaScript and source map to `dist/`) |
52
+ | Format code | N/A — no format script; `prettier` is a devDependency used through eslint |
53
+
54
+ `yarn workspace @webex/storage-adapter-session-storage build` runs `build:src` and produces the same output; the package emits no type
55
+ declarations.
56
+
57
+ `yarn workspace @webex/storage-adapter-session-storage test:unit` exits 0 having skipped every case, and `yarn workspace @webex/storage-adapter-session-storage test:browser` exits 0 having completed
58
+ 0 tests, so neither proves behavior today. Do not use the aggregate `test` script: after lint and unit
59
+ tests it calls `test:integration`, which this package does not define, and exits 1. See
60
+ [Getting started](docs/getting-started.md#tests).
61
+
62
+ If a required command is unknown, stop and ask for the exact command.
63
+
64
+ ## 2. Agent Persona and Scope
65
+
66
+ You are the Webex JS SDK engineering assistant for `@webex/storage-adapter-session-storage`.
67
+
68
+ Primary outcomes:
69
+
70
+ - Deliver production-safe changes with build, lint, and unit tests passing.
71
+ - Preserve existing behavior unless a change request explicitly requires a behavior change.
72
+ - Keep docs and configuration aligned with code changes.
73
+
74
+ Definition of done:
75
+
76
+ 1. Requested change is implemented.
77
+ 2. Build, lint, and unit tests pass locally, and the change is exercised by a test that actually runs.
78
+ 3. Updated docs cover new behavior, including the owning module spec.
79
+ 4. PR summary includes risks and rollback notes.
80
+
81
+ ## 3. Repository Knowledge
82
+
83
+ ### Tech Stack
84
+
85
+ | Area | Tooling | Version |
86
+ | ---------------- | ------- | ------- |
87
+ | Language runtime | node; JavaScript sources for the browser | 22.14 (workspace root `AGENTS.md`; `.nvmrc` `lts/jod`); package `engines` accepts `>=16`; the workspace root `package.json` `engines.node` reads `18.x` |
88
+ | Build tool | yarn workspaces and `@webex/legacy-tools` over babel | yarn `3.4.1` (root `packageManager`), `@babel/core` `^7.17.10` |
89
+ | Test framework | jest through `webex-legacy-tools test --unit --runner jest`, running the shared suite from `@webex/storage-adapter-spec` | `@webex/jest-config-legacy` (`workspace:*`) |
90
+ | Lint/format | eslint via `@webex/eslint-config-legacy`, prettier | eslint `^8.24.0`, prettier `^2.7.1` |
91
+
92
+ ### Project Map
93
+
94
+ - `src/index.js`: the whole module — `StorageAdapterSessionStorage`, its `bind`, and the inner
95
+ `Bound` class with `get`, `put`, `del`, and `clear`.
96
+ - `test/unit/spec/storage-adapter-session-storage.js`: runs the shared adapter suite, skipped under
97
+ Node; imports the package by name, so it loads `dist/`.
98
+ - `process`: package-root module exporting `{browser: true}` for the envify transform.
99
+ - `dist/`: generated build output. Never edit by hand.
100
+ - `README.md`: retained npm page, context only; its description wrongly says localStorage; see
101
+ [ADR-0001](docs/adr/0001-retain-product-readme.md).
102
+ - Spec for every file under `src/`: `src/docs/README.md`.
103
+
104
+ ### Critical Constraints
105
+
106
+ - One sessionStorage entry, named by the constructor `basekey`, holds every namespace (`MOD-001` in
107
+ the module spec).
108
+ - `clear()` removes the whole basekey entry, every namespace, and takes no parameter (`MOD-010`,
109
+ `MOD-011`).
110
+ - `get` rejects `NotFoundError` for an absent key and resolves falsey values (`MOD-005`, `MOD-006`).
111
+ - `bind` rejects on a missing namespace or logger but throws synchronously on a logger without
112
+ `info`; `clear` throws synchronously without the global (`MOD-015`).
113
+ - `Object.prototype` names as keys or namespaces misbehave, and namespace `__proto__` pollutes a
114
+ built-in prototype (`MOD-016`).
115
+
116
+ ## 4. Testing Workflow
117
+
118
+ Run checks in this order, from the workspace root:
119
+
120
+ 1. `yarn workspace @webex/storage-adapter-session-storage build:src`
121
+ 2. `yarn workspace @webex/storage-adapter-session-storage test:unit`
122
+ 3. `yarn workspace @webex/storage-adapter-session-storage test:style`
123
+
124
+ Fresh-checkout workspace setup (building `webex-legacy-tools` and sibling `dist/`) is owned by the
125
+ workspace root; see [Prebuilding](../../../CONTRIBUTING.md#prebuilding).
126
+
127
+ Testing rules:
128
+
129
+ - Build before testing: the unit spec imports `@webex/storage-adapter-session-storage`, which
130
+ resolves to `dist/index.js`.
131
+ - The jest environment is Node, so a new case must provide its own `sessionStorage` stand-in (a sinon
132
+ stub or a small in-memory object assigned to the global and restored afterwards); otherwise it is
133
+ skipped or fails.
134
+ - Use sinon for stubs and `assert` from `@webex/test-helper-chai`; use `assert.calledOnceWithExactly`
135
+ for storage and logger calls, and parametrize when more than three cases are alike, such as the
136
+ falsey values or the `Object.prototype` names.
137
+ - Cover failure paths: missing global, logger without `info`, corrupt and non-conforming documents,
138
+ and non-JSON values.
139
+ - Do not remove tests to make CI pass.
140
+
141
+ No coverage gate applies to this package; do not infer one.
142
+
143
+ ## 5. Code Style and Patterns
144
+
145
+ Coding expectations:
146
+
147
+ - Follow repository style rules and static analysis output. The local `.eslintrc.js` sets
148
+ `root: true` and extends the legacy config.
149
+ - Prefer small functions over large procedural blocks.
150
+ - Make error handling explicit.
151
+ - Keep public interfaces stable unless a breaking change is requested.
152
+
153
+ Pattern example:
154
+
155
+ ```text
156
+ Preferred:
157
+ - Test presence with typeof value !== 'undefined' so 0, false, null, and '' survive.
158
+ - Keep basekey in the constructor closure and per-binding state in the module-level WeakMaps.
159
+ - Reject absent keys with NotFoundError imported from @webex/webex-core.
160
+ - Log through the bound logger with the session-storage-store-adapter: prefix.
161
+
162
+ Avoid:
163
+ - Truthiness checks on stored values.
164
+ - Logging stored values.
165
+ - Adding a key parameter to clear() or scoping it to one namespace without a change request.
166
+ - Changing the {namespace: {key: value}} layout without handling documents already stored.
167
+ ```
168
+
169
+ ## 6. Git Workflow
170
+
171
+ - Branch naming: no package convention is defined; follow the workspace `CONTRIBUTING.md`.
172
+ - Commit format: conventional commits (`feat:`, `fix:`, `docs:`, `refactor:`, `test:`, `chore:`), which
173
+ the workspace `CONTRIBUTING.md` requires for pull requests.
174
+ - Keep commits focused and reversible.
175
+ - Rebase on the target branch before opening a pull request.
176
+
177
+ PR checklist:
178
+
179
+ - What changed and why.
180
+ - Tests run and results, including how many cases actually ran.
181
+ - Risk and impact on applications that place this adapter in a webex-core storage slot.
182
+ - Rollback approach.
183
+
184
+ ## 7. Boundaries and Escalation
185
+
186
+ ### Always
187
+
188
+ - Prefer existing patterns over introducing new architecture.
189
+ - Keep changes minimal for the requested scope.
190
+ - Call out assumptions and unknowns explicitly.
191
+ - Update the owning module spec in the same change that alters observable behavior.
192
+
193
+ ### Ask First
194
+
195
+ - Adding or removing dependencies, including moving the test-only packages out of `dependencies`.
196
+ - Changing the constructor signature, the method set, the error types or messages, or the log level
197
+ and prefix.
198
+ - Changing what `clear()` removes, or the stored document layout or encoding.
199
+ - Hardening the `Object.prototype` and `__proto__` handling, which changes observable behavior.
200
+
201
+ ### Never
202
+
203
+ - Edit `dist/` by hand.
204
+ - Commit secrets, tokens, or credentials, including in test fixtures.
205
+ - Log stored values through the bound logger.
206
+ - Add a `.sdd/templates` directory, a copy of the templates, or a link to them in this package. The
207
+ templates live once at the monorepo root, `../../../.sdd/templates/repo-standards`, and
208
+ `.sdd/manifest.json` refers to them through `layout.monorepo_package`.
@@ -0,0 +1,94 @@
1
+ ---
2
+ type: ADR
3
+ title: ADR-0001 - Retain the product README
4
+ description: SDD onboarding keeps README.md as product documentation and routes it only as context.
5
+ tags: [adr]
6
+ timestamp: 2026-11-13T05:50:00Z
7
+ status: accepted
8
+ ---
9
+ <!-- sdd-generated-metadata
10
+ doc_kind: standing-doc
11
+ generated_from: adr@0.3.0
12
+ generated_by: claude-code
13
+ approved_by: rarajes2@cisco.com
14
+ updated_at: 2026-11-13T06:13:09Z
15
+ validation_status: pass
16
+ -->
17
+
18
+ # ADR-0001 - Retain the product README
19
+
20
+ | Field | Value |
21
+ | ------------- | ----- |
22
+ | Status | Accepted |
23
+ | Decision date | 2026-11-13 |
24
+ | Deciders | rarajes2@cisco.com (bootstrap questionnaire) |
25
+ | Supersedes | N/A |
26
+ | Superseded by | N/A |
27
+
28
+ ## Context
29
+
30
+ Onboarding found one existing document, `README.md`. It is the npm page: a readme-style badge, a
31
+ one-line description, an install command, a pointer to the developer portal and API docs, and
32
+ maintainer, contributing, and license sections. No other intent, design, or AI-authored spec exists
33
+ in this package, and no `AGENTS.md` existed.
34
+
35
+ The README makes one behavioral claim, and it does not match the code:
36
+
37
+ | README content | Code |
38
+ | -------------- | ---- |
39
+ | The description reads "localStorage adapter for the Cisco Webex JS SDK" | `src/index.js` reads, writes, and removes `sessionStorage` entries and logs with the prefix `session-storage-store-adapter:` |
40
+ | The table of contents lists Install, Usage, Contribute, Maintainers, and License | The Usage section only links to the developer portal; it shows no constructor or method |
41
+
42
+ ## Decision
43
+
44
+ Keep `README.md` unchanged. Do not migrate it into the module specification. Record
45
+ `spec_source_policy.mode` as `keep-separate` with `migrated_source_disposition` `retain`, and route
46
+ `README.md` in `spec_sources` as `reference-only` and `context-only`.
47
+
48
+ The canonical behavior is `src/` plus `test/`. The module specification follows code.
49
+
50
+ ## Why
51
+
52
+ The README is the npm-facing page. Correcting its description is a product-doc change, not a
53
+ requirement of making the package SDD-ready, and the other onboarded packages in this workspace kept
54
+ their READMEs the same way. It holds no behavior the specification lacks, so nothing is lost by not
55
+ migrating it.
56
+
57
+ ## Alternatives considered
58
+
59
+ | Alternative | Why it was not selected |
60
+ | ----------- | ----------------------- |
61
+ | Migrate the README into `src/docs/README.md` and delete it | It holds no behavior to migrate; deletion was not requested |
62
+ | Reconcile the README with the module specification in place | Reconciling would only carry the wrong storage name; the developer chose `keep-separate` |
63
+ | Correct the README during onboarding | Onboarding writes the SDD tree only and does not edit `README.md` |
64
+
65
+ ## Consequences
66
+
67
+ **Positive:**
68
+
69
+ - The npm page stays stable for consumers.
70
+ - The module specification is the single behavioral reference.
71
+
72
+ **Negative / tradeoffs:**
73
+
74
+ - The npm page keeps calling the package a localStorage adapter until a maintainer changes it.
75
+
76
+ ## Constraint on future changes
77
+
78
+ Do not delete `README.md` as part of spec maintenance. If its text changes, keep the module
79
+ specification aligned with code rather than with the README.
80
+
81
+ ## Follow-up
82
+
83
+ - [ ] A maintainer may change the README description to "sessionStorage adapter" and add a usage
84
+ example in a separate product-doc change.
85
+
86
+ ## Revisit when
87
+
88
+ - A maintainer rewrites the README.
89
+
90
+ ## References
91
+
92
+ - `README.md`
93
+ - `src/index.js`
94
+ - `.sdd/manifest.json` `spec_source_policy`