@webex/storage-adapter-local-forage 3.13.0-next.5 → 3.13.0-next.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.repo-context.json +513 -0
- package/.sdd/manifest.json +332 -0
- package/AGENTS.md +222 -0
- package/docs/adr/index.md +31 -0
- package/docs/architecture.md +262 -0
- package/docs/getting-started.md +115 -0
- package/docs/index.md +59 -0
- package/docs/specs/README.md +85 -0
- package/package.json +8 -8
- package/schemas/repo-context.schema.json +796 -0
- package/src/docs/README.md +511 -0
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
{
|
|
2
|
+
"manifest_version": 1,
|
|
3
|
+
"repository": {
|
|
4
|
+
"name": "@webex/storage-adapter-local-forage",
|
|
5
|
+
"purpose": "A localforage-backed (IndexedDB first) implementation of the Webex storage-adapter interface, published to npm so a browser host can persist Webex JS SDK storage namespaces across page reloads and browser restarts.",
|
|
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": "[NEEDS HUMAN INPUT] -- no standalone compile step exists; build:src transpiles src into dist and emits the distributable output in one step, so there is no compile-only command.",
|
|
19
|
+
"unit-test": "[NEEDS HUMAN INPUT] -- package.json defines no test:unit script although its aggregate test script chains one; the owner confirmed on 2026-10-06 that no canonical unit-test command exists and declined to adopt test:browser for this role.",
|
|
20
|
+
"build": {
|
|
21
|
+
"command": "yarn workspace @webex/storage-adapter-local-forage build",
|
|
22
|
+
"source_file": "package.json",
|
|
23
|
+
"role": "package"
|
|
24
|
+
},
|
|
25
|
+
"lint": {
|
|
26
|
+
"command": "yarn workspace @webex/storage-adapter-local-forage test:style",
|
|
27
|
+
"source_file": "package.json",
|
|
28
|
+
"role": "lint"
|
|
29
|
+
},
|
|
30
|
+
"browser-test": {
|
|
31
|
+
"command": "yarn workspace @webex/storage-adapter-local-forage test:browser",
|
|
32
|
+
"source_file": "package.json",
|
|
33
|
+
"role": "other"
|
|
34
|
+
},
|
|
35
|
+
"deploy": {
|
|
36
|
+
"command": "yarn workspace @webex/storage-adapter-local-forage deploy:npm",
|
|
37
|
+
"source_file": "package.json",
|
|
38
|
+
"role": "deploy"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"toolchain": [
|
|
42
|
+
{
|
|
43
|
+
"name": "node",
|
|
44
|
+
"version": ">=18",
|
|
45
|
+
"origin": "repo-config",
|
|
46
|
+
"source_file": "package.json"
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"tests": {
|
|
50
|
+
"qa": {
|
|
51
|
+
"location": "test/unit/spec/storage-adapter-local-forage.js is the package's only test file. It runs the shared conformance suite from @webex/storage-adapter-spec against the adapter and declares no case of its own.",
|
|
52
|
+
"notes": "Derived from code on 2026-10-06, not measured (the generation worktree had no installed dependencies). No automated test executes this module: package.json defines no test:unit script; under the shared Jest configuration (testEnvironment node) the suite is wrapped in skipInNode and skipped; test:browser runs Karma with the Mocha framework while the shared suite calls the Jest-only beforeAll hook, so the suite cannot load. The aggregate test script chains test:unit and test:integration, which this package does not define."
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"quality_gates": {
|
|
56
|
+
"code_coverage": {
|
|
57
|
+
"origin": "none",
|
|
58
|
+
"declared_by": "rsarika@cisco.com via bootstrap questionnaire 2026-10-06, corroborated by code: package.json defines no test:coverage script, the shared legacy Jest configuration sets collectCoverage false, and the CI coverage job runs test:coverage only in workspaces that define it."
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"coverage_status_definitions": {
|
|
62
|
+
"specced": ">=80% public surface specced, drift <5% - spec is authoritative",
|
|
63
|
+
"partial": "40-80% specced - spec is a hint, cross-check code",
|
|
64
|
+
"untracked": "<40% specced - code is the source of truth"
|
|
65
|
+
},
|
|
66
|
+
"modules": [
|
|
67
|
+
{
|
|
68
|
+
"path": "src/",
|
|
69
|
+
"coverage_status": "Partial",
|
|
70
|
+
"coverage_evidence": "Generator-side field measurement complete 2026-11-09: 93%, 13 of 14 mandatory fields PRESENT, critical 7 of 7. The canonical spec at src/docs/README.md records 13 requirements and 1 invariant; the 2026-11-09 reconcile found no spec/code drift and refreshed dependency evidence to the webex-core storage sub-module spec. Promoted Untracked -> Partial on 2026-11-09 by rsarika@cisco.com (default policy: field score >=40% and drift <10%). The one WEAK field is test and characterization coverage: no automated test executes the module (the shared suite is skipped in Node and is expected to fail at load under Karma with Mocha) and no characterization baseline exists; that gap blocks promotion to Specced. Independent validation on 2026-11-10 by runtime codex passed with warnings: 0 Blocking and 2 Important findings (I-01, I-02).",
|
|
71
|
+
"canonical_spec": "src/docs/README.md",
|
|
72
|
+
"contracts": {
|
|
73
|
+
"provides": [
|
|
74
|
+
"local-forage-storage-adapter",
|
|
75
|
+
"local-forage-indexeddb-store"
|
|
76
|
+
],
|
|
77
|
+
"requires": [
|
|
78
|
+
"storage-adapter-spec-suite",
|
|
79
|
+
"webex-common-js-api",
|
|
80
|
+
"webex-core-storage-layer",
|
|
81
|
+
"localforage-api"
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
"last_assessed": "2026-11-09",
|
|
85
|
+
"section_profile": {
|
|
86
|
+
"has_ui": false,
|
|
87
|
+
"crosses_service_boundaries": false,
|
|
88
|
+
"enforces_domain_rules": true,
|
|
89
|
+
"is_concurrent_async": true,
|
|
90
|
+
"owns_persistence": true,
|
|
91
|
+
"returns_caller_errors": true,
|
|
92
|
+
"has_design_tradeoff": true,
|
|
93
|
+
"stateful_transitions": false,
|
|
94
|
+
"exposes_wire_protocol": false,
|
|
95
|
+
"ui_multi_screen": false,
|
|
96
|
+
"large_data_model": false,
|
|
97
|
+
"has_tiers": false,
|
|
98
|
+
"module_specific_conventions": true,
|
|
99
|
+
"published_package": true,
|
|
100
|
+
"embedded_in_host": true,
|
|
101
|
+
"holds_client_state": true,
|
|
102
|
+
"resolved_by": "claude-code/claude-opus-5-5 (host metadata; bootstrap questionnaire)",
|
|
103
|
+
"resolved_at": "2026-10-06T11:27:43Z",
|
|
104
|
+
"has_submodules": false,
|
|
105
|
+
"has_submodules_computed_by": "scripts/module_tree.py",
|
|
106
|
+
"has_submodules_computed_at": "2026-10-06T11:38:37Z"
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
"contract_catalog": {
|
|
111
|
+
"index_path": "docs/architecture.md",
|
|
112
|
+
"definitions": {
|
|
113
|
+
"local-forage-storage-adapter": {
|
|
114
|
+
"kind": "sdk",
|
|
115
|
+
"publication": "published",
|
|
116
|
+
"source_kind": "repository-path",
|
|
117
|
+
"source": "package.json",
|
|
118
|
+
"summary": "The published npm surface: the default export StorageAdapterLocalForage (constructor arguments ignored), whose bind(namespace, options) resolves a binding exposing get, put, del, and clear. package.json declares the entry points (main dist/index.js, devMain src/index.js); src/index.js is the authoritative definition of the exported shape, and the owning module spec specifies its behavior."
|
|
119
|
+
},
|
|
120
|
+
"local-forage-indexeddb-store": {
|
|
121
|
+
"kind": "file",
|
|
122
|
+
"publication": "published",
|
|
123
|
+
"source_kind": "repository-path",
|
|
124
|
+
"source": "src/index.js",
|
|
125
|
+
"summary": "The on-device record layout the adapter owns: one record per namespace/key pair, keyed by the template literal namespace + '/' + key, in the origin's default localforage database (name localforage, store keyvaluepairs; IndexedDB, else WebSQL, else localStorage). Values are stored unencrypted and unversioned, persist across sessions and releases, and are erased wholesale by clear(). src/index.js is its only authoritative definition."
|
|
126
|
+
},
|
|
127
|
+
"storage-adapter-spec-suite": {
|
|
128
|
+
"kind": "sdk",
|
|
129
|
+
"publication": "published",
|
|
130
|
+
"source_kind": "external",
|
|
131
|
+
"source": "Workspace package @webex/storage-adapter-spec (workspace path packages/@webex/storage-adapter-spec/src/index.js; canonical spec packages/@webex/storage-adapter-spec/src/docs/README.md)",
|
|
132
|
+
"summary": "The executable conformance suite defining the Webex storage-adapter interface, run by this package's test. Owned and specified by @webex/storage-adapter-spec; recorded here only as a requirement."
|
|
133
|
+
},
|
|
134
|
+
"webex-common-js-api": {
|
|
135
|
+
"kind": "sdk",
|
|
136
|
+
"publication": "published",
|
|
137
|
+
"source_kind": "external",
|
|
138
|
+
"source": "Workspace package @webex/common (workspace path packages/@webex/common/src/one-flight.js; canonical spec packages/@webex/common/src/docs/README.md)",
|
|
139
|
+
"summary": "The @webex/common export surface; this package uses only the oneFlight decorator, which de-duplicates concurrent calls per instance, method, and keyFactory key and evicts the flight when it settles."
|
|
140
|
+
},
|
|
141
|
+
"webex-core-storage-layer": {
|
|
142
|
+
"kind": "sdk",
|
|
143
|
+
"publication": "published",
|
|
144
|
+
"source_kind": "external",
|
|
145
|
+
"source": "Workspace package @webex/webex-core (workspace paths packages/@webex/webex-core/src/lib/storage/make-webex-store.js and packages/@webex/webex-core/src/lib/storage/errors.js; canonical spec packages/@webex/webex-core/src/lib/storage/docs/README.md)",
|
|
146
|
+
"summary": "The SDK storage layer that drives the adapter: it calls bind(namespace, {logger}) once per namespace, caches the binding, routes get/put/del/clear to it, and treats a NotFoundError rejection as no data. It also exports the NotFoundError class this package rejects with."
|
|
147
|
+
},
|
|
148
|
+
"localforage-api": {
|
|
149
|
+
"kind": "sdk",
|
|
150
|
+
"publication": "published",
|
|
151
|
+
"source_kind": "external",
|
|
152
|
+
"source": "npm package localforage ^1.7.3, resolved to 1.10.0 by the workspace lockfile",
|
|
153
|
+
"summary": "Promise-based key-value storage over IndexedDB, WebSQL, or localStorage. The adapter uses getItem, setItem, removeItem, keys, and clear on the default instance; with no usable driver every call rejects with 'No available storage method found.'"
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"spec_source_policy": {
|
|
158
|
+
"mode": "reconcile",
|
|
159
|
+
"migrated_source_disposition": "retain",
|
|
160
|
+
"disposition_decided_by": "rsarika@cisco.com",
|
|
161
|
+
"disposition_decided_at": "2026-11-09T11:55:37Z",
|
|
162
|
+
"decided_by": "rsarika@cisco.com",
|
|
163
|
+
"decided_at": "2026-11-09T11:55:37Z",
|
|
164
|
+
"decision_record": ".generated/sdd/spec-source-policy/decision.md"
|
|
165
|
+
},
|
|
166
|
+
"spec_sources": [
|
|
167
|
+
{
|
|
168
|
+
"path": "README.md",
|
|
169
|
+
"scope": "repo",
|
|
170
|
+
"role": "source-material",
|
|
171
|
+
"canonical": false,
|
|
172
|
+
"use_by_agents": "source-for-reconciliation",
|
|
173
|
+
"canonical_target": "docs/getting-started.md",
|
|
174
|
+
"post_migration_action": "retain",
|
|
175
|
+
"deletion_status": "not-applicable",
|
|
176
|
+
"notes": "Native npm-facing readme. Its install command reconciles into docs/getting-started.md (consumer install) and its purpose statement into docs/index.md and docs/architecture.md; its contribution and maintainer pointers stay owned at the workspace root. Remains the authoritative npm readme in place, unchanged by this run, and is never a deletion candidate."
|
|
177
|
+
}
|
|
178
|
+
],
|
|
179
|
+
"spec_policy": {
|
|
180
|
+
"require_what_and_why": true,
|
|
181
|
+
"require_provenance": true,
|
|
182
|
+
"protected_specs": [
|
|
183
|
+
"src/docs/README.md"
|
|
184
|
+
]
|
|
185
|
+
},
|
|
186
|
+
"validation": {
|
|
187
|
+
"generator_runtime": "claude-code",
|
|
188
|
+
"generator_model": "claude-opus-5-5",
|
|
189
|
+
"generator_run_id": "727b3c81-99c9-47f8-8f45-88547401958e",
|
|
190
|
+
"generator_runtime_source": "host-metadata",
|
|
191
|
+
"minimum_independence": "different-runtime",
|
|
192
|
+
"blocking_severities": [
|
|
193
|
+
"Blocking"
|
|
194
|
+
],
|
|
195
|
+
"source_commit": "696c161e6e",
|
|
196
|
+
"base_ref": "next",
|
|
197
|
+
"head_ref": "chore/spec-validator-local-forage",
|
|
198
|
+
"validator_runtime": "codex",
|
|
199
|
+
"validator_runtime_source": "human-provided",
|
|
200
|
+
"runtime_fallback_tier": "different-runtime"
|
|
201
|
+
},
|
|
202
|
+
"layout": {
|
|
203
|
+
"sdd_root": ".sdd",
|
|
204
|
+
"docs_root": "docs",
|
|
205
|
+
"agent_entry_path": "AGENTS.md",
|
|
206
|
+
"standing_docs_root": "docs",
|
|
207
|
+
"spec_index_path": "docs/specs/README.md",
|
|
208
|
+
"module_docs_strategy": "source-local",
|
|
209
|
+
"module_docs_relative_path": "docs/README.md",
|
|
210
|
+
"module_docs_decision": {
|
|
211
|
+
"basis": "repo-standards-default",
|
|
212
|
+
"reason": "The package has no module-local documentation folder, documentation build, or protected authored file, so the repo-standards source-local default src/docs/README.md applies unchanged; the owner confirmed it with the module map on 2026-10-06. The file falls inside the test:style glob ./src/**/*.*, but the shared ESLint configuration ignores *.md, and build:src processes only js and ts sources.",
|
|
213
|
+
"decided_by": "rsarika@cisco.com (bootstrap questionnaire)",
|
|
214
|
+
"decided_at": "2026-10-06T11:32:37Z"
|
|
215
|
+
},
|
|
216
|
+
"repo_context_decision": {
|
|
217
|
+
"path": ".repo-context.json",
|
|
218
|
+
"schema_path": "schemas/repo-context.schema.json",
|
|
219
|
+
"action": "create",
|
|
220
|
+
"schema_action": "create",
|
|
221
|
+
"reason": "Neither the operational context nor its schema existed in this package at first onboarding (2026-10-06); both were created from the monorepo-root .sdd/templates/repo-standards snapshot (reached through layout.monorepo_package.templates_root_path) and verified package evidence. The 2026-11-09 refresh updates the context in place; the schema is unchanged and byte-identical to the root snapshot copy. The package holds no templates of its own.",
|
|
222
|
+
"decided_by": "claude-code (bootstrap questionnaire)",
|
|
223
|
+
"decided_at": "2026-10-06T11:32:37Z"
|
|
224
|
+
},
|
|
225
|
+
"artifact_decisions": [
|
|
226
|
+
{
|
|
227
|
+
"path": "docs/service.md",
|
|
228
|
+
"action": "omit",
|
|
229
|
+
"reason": "The package is a published browser library, not a deployable service; package.json declares no runtime entry point, container, or deployment manifest.",
|
|
230
|
+
"decided_by": "claude-code (bootstrap questionnaire)",
|
|
231
|
+
"decided_at": "2026-10-06T11:32:37Z"
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"path": "mkdocs.yml",
|
|
235
|
+
"action": "omit",
|
|
236
|
+
"reason": "No package-level documentation site exists; documentation publishing is owned at the workspace root.",
|
|
237
|
+
"decided_by": "claude-code (bootstrap questionnaire)",
|
|
238
|
+
"decided_at": "2026-10-06T11:32:37Z"
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"path": "api-specs/openapi.yaml",
|
|
242
|
+
"action": "omit",
|
|
243
|
+
"reason": "The package serves no HTTP routes and makes no network calls; its published contracts are the npm package surface (package.json) and the on-device record layout (src/index.js).",
|
|
244
|
+
"decided_by": "claude-code (bootstrap questionnaire)",
|
|
245
|
+
"decided_at": "2026-10-06T11:32:37Z"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"path": "SECURITY.md",
|
|
249
|
+
"action": "omit",
|
|
250
|
+
"reason": "No security policy exists in this package or at the workspace root, so a package copy would invent a reporting contact; the security posture of stored data is documented in docs/architecture.md.",
|
|
251
|
+
"decided_by": "claude-code (bootstrap questionnaire)",
|
|
252
|
+
"decided_at": "2026-10-06T11:32:37Z"
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"path": "CONTRIBUTING.md",
|
|
256
|
+
"action": "omit",
|
|
257
|
+
"reason": "Contribution instructions are owned at the workspace root and linked from the package README.md.",
|
|
258
|
+
"decided_by": "claude-code (bootstrap questionnaire)",
|
|
259
|
+
"decided_at": "2026-10-06T11:32:37Z"
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"path": "CHANGELOG.md",
|
|
263
|
+
"action": "omit",
|
|
264
|
+
"reason": "Changelog generation is owned at the workspace root; no package-level changelog exists.",
|
|
265
|
+
"decided_by": "claude-code (bootstrap questionnaire)",
|
|
266
|
+
"decided_at": "2026-10-06T11:32:37Z"
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"path": "CTO_CHECKLIST.yml",
|
|
270
|
+
"action": "omit",
|
|
271
|
+
"reason": "The CTO readiness workflow applies to deployable services; this package is a published library.",
|
|
272
|
+
"decided_by": "claude-code (bootstrap questionnaire)",
|
|
273
|
+
"decided_at": "2026-10-06T11:32:37Z"
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"path": "schemas/cto-checklist.schema.json",
|
|
277
|
+
"action": "omit",
|
|
278
|
+
"reason": "Selected together with CTO_CHECKLIST.yml, which is omitted.",
|
|
279
|
+
"decided_by": "claude-code (bootstrap questionnaire)",
|
|
280
|
+
"decided_at": "2026-10-06T11:32:37Z"
|
|
281
|
+
}
|
|
282
|
+
],
|
|
283
|
+
"template_roots": {
|
|
284
|
+
"canonical": ".sdd/templates/repo-standards"
|
|
285
|
+
},
|
|
286
|
+
"repo_skills_root": ".sdd/skills",
|
|
287
|
+
"contract_index_path": "docs/architecture.md",
|
|
288
|
+
"monorepo_package": {
|
|
289
|
+
"package_path": "packages/@webex/storage-adapter-local-forage",
|
|
290
|
+
"root_manifest_path": "../../../.sdd/manifest.json",
|
|
291
|
+
"templates_root_path": "../../../.sdd/templates/repo-standards"
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
"substrate": {
|
|
295
|
+
"source": "WebexTools/repo-standards@d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
|
|
296
|
+
"consumed": [
|
|
297
|
+
"the monorepo-root .sdd/templates/repo-standards snapshot, referred to through layout.monorepo_package.templates_root_path and never copied or linked into this package (resolve_templates.py --check passed against the bundled snapshot on 2026-11-09)",
|
|
298
|
+
"@webex/eslint-config-legacy via .eslintrc.js",
|
|
299
|
+
"@webex/babel-config-legacy via babel.config.js",
|
|
300
|
+
"@webex/jest-config-legacy via jest.config.js",
|
|
301
|
+
"@webex/legacy-tools build and test runner via package.json",
|
|
302
|
+
"the existing package README.md as repository-owned governance evidence"
|
|
303
|
+
],
|
|
304
|
+
"compliance_tier": "baseline"
|
|
305
|
+
},
|
|
306
|
+
"section_profiles": {
|
|
307
|
+
"repo": {
|
|
308
|
+
"owns_datastore": true,
|
|
309
|
+
"holds_client_state": true,
|
|
310
|
+
"components_interact": false,
|
|
311
|
+
"domain_data_across_components": false,
|
|
312
|
+
"caches_data": false,
|
|
313
|
+
"observability_convention": true,
|
|
314
|
+
"deploys_to_infra": false,
|
|
315
|
+
"shared_base_libs": true,
|
|
316
|
+
"is_monorepo": false,
|
|
317
|
+
"multi_platform": false,
|
|
318
|
+
"published_package": true,
|
|
319
|
+
"embedded_in_host": true,
|
|
320
|
+
"cross_repo_deps_material": false,
|
|
321
|
+
"security_arch_warranted": true,
|
|
322
|
+
"exposes_commands_or_artifacts": true
|
|
323
|
+
},
|
|
324
|
+
"resolved_by": "claude-code/claude-opus-5-5 (host metadata; bootstrap questionnaire)",
|
|
325
|
+
"resolved_at": "2026-10-06T11:27:43Z"
|
|
326
|
+
},
|
|
327
|
+
"tooling": {
|
|
328
|
+
"sdlc_skills": {
|
|
329
|
+
"source_ref": "repo-annotation@2.3.1"
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
package/AGENTS.md
ADDED
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
<!-- sdd-generated-metadata
|
|
2
|
+
doc_kind: agent-entry
|
|
3
|
+
generated_from: agents@0.3.0
|
|
4
|
+
generated_by: claude-code
|
|
5
|
+
approved_by: rsarika@cisco.com
|
|
6
|
+
updated_at: 2026-11-10T00:00:00Z
|
|
7
|
+
validation_status: pass-with-warnings
|
|
8
|
+
-->
|
|
9
|
+
|
|
10
|
+
# AI Agent Instructions
|
|
11
|
+
|
|
12
|
+
Instructions for AI coding assistants working on `@webex/storage-adapter-local-forage`, the package
|
|
13
|
+
that persists Webex JS SDK storage in the browser's IndexedDB through `localforage`.
|
|
14
|
+
|
|
15
|
+
## Working Method
|
|
16
|
+
|
|
17
|
+
- Read the relevant repository files before editing. Do not edit blind.
|
|
18
|
+
- Understand the task and affected surfaces before writing code.
|
|
19
|
+
- Prefer focused edits over rewriting whole files.
|
|
20
|
+
- Do not invent commands, paths, exports, or behavior. Verify them from repository-local source.
|
|
21
|
+
- Test or validate before declaring done.
|
|
22
|
+
- Keep output concise. If something is uncertain, say so instead of guessing.
|
|
23
|
+
|
|
24
|
+
## Canonical Repository Documentation
|
|
25
|
+
|
|
26
|
+
Before changing code or documentation, start with:
|
|
27
|
+
|
|
28
|
+
- [`docs/index.md`](docs/index.md) for documentation navigation;
|
|
29
|
+
- [`docs/architecture.md`](docs/architecture.md) for package boundaries, the data location, the
|
|
30
|
+
security view, and the contract index;
|
|
31
|
+
- [`docs/specs/README.md`](docs/specs/README.md) for the manifest-backed module and contract
|
|
32
|
+
registry;
|
|
33
|
+
- [`src/docs/README.md`](src/docs/README.md), the module specification and the document that matters
|
|
34
|
+
most here. It owns the public surface, every requirement, the record layout, the caller-visible
|
|
35
|
+
failure modes, the known hazards, and the test gaps; and
|
|
36
|
+
- [`docs/adr/index.md`](docs/adr/index.md) for durable decisions. None are registered yet; the
|
|
37
|
+
design choices behind the current behavior are in the module spec's `Key design trade-off`.
|
|
38
|
+
|
|
39
|
+
Follow `.sdd/manifest.json` for each contract's publication state and canonical source. This package
|
|
40
|
+
publishes two contracts: `local-forage-storage-adapter`, an npm package surface whose native source
|
|
41
|
+
is the entry point declared in `package.json`, and `local-forage-indexeddb-store`, the on-device record
|
|
42
|
+
layout defined in `src/index.js`. There is no OpenAPI document because the package serves no HTTP. The
|
|
43
|
+
manifest remains authoritative for canonical paths and artifact decisions.
|
|
44
|
+
|
|
45
|
+
The SDD templates are the shared monorepo-root snapshot at `../../../.sdd/templates/repo-standards`,
|
|
46
|
+
reached through `layout.monorepo_package.templates_root_path`. The package holds no templates: do not
|
|
47
|
+
create a package-level `.sdd/templates` directory, copy, or symlink. Refresh the root snapshot
|
|
48
|
+
instead. The monorepo-root routing manifest at `../../../.sdd/manifest.json`
|
|
49
|
+
(`layout.monorepo_package.root_manifest_path`) lists this package.
|
|
50
|
+
|
|
51
|
+
## 1. Commands (Run First)
|
|
52
|
+
|
|
53
|
+
Run every command from the Webex JS SDK workspace root. Use only documented commands; do not invent
|
|
54
|
+
alternatives when a command is missing.
|
|
55
|
+
|
|
56
|
+
| Task | Command |
|
|
57
|
+
| ---------------------- | ------- |
|
|
58
|
+
| Install dependencies | `yarn` |
|
|
59
|
+
| Start dev environment | N/A; the package is a library with no runnable entry point |
|
|
60
|
+
| Run tests | None canonical. `yarn workspace @webex/storage-adapter-local-forage test:browser` is the only committed runner and does not execute the shared suite (see `src/docs/README.md` `Verification`) |
|
|
61
|
+
| Run linters | `yarn workspace @webex/storage-adapter-local-forage test:style` |
|
|
62
|
+
| Build/release artifact | `yarn workspace @webex/storage-adapter-local-forage build` |
|
|
63
|
+
| Format code | N/A; no package-local format command. Prettier configuration is owned at the workspace root |
|
|
64
|
+
|
|
65
|
+
Do not run the package's aggregate `test` script or a `test:unit` script. The package
|
|
66
|
+
defines no `test:unit` or `test:integration` script, and the aggregate `test` script chains both, so
|
|
67
|
+
it cannot succeed. If a required command is unknown, stop and ask for the exact command.
|
|
68
|
+
|
|
69
|
+
## 2. Agent Persona and Scope
|
|
70
|
+
|
|
71
|
+
You are the Webex web-client storage engineering assistant for `@webex/storage-adapter-local-forage`.
|
|
72
|
+
|
|
73
|
+
Primary outcomes:
|
|
74
|
+
|
|
75
|
+
- Deliver production-safe changes with passing tests.
|
|
76
|
+
- Preserve existing behavior unless a change request explicitly requires a behavior change.
|
|
77
|
+
- Keep docs and configuration aligned with code changes.
|
|
78
|
+
|
|
79
|
+
Definition of done:
|
|
80
|
+
|
|
81
|
+
1. Requested change is implemented.
|
|
82
|
+
2. `test:style` and `build` pass locally, and any test you add actually executes.
|
|
83
|
+
3. Updated docs cover new behavior. A behavior change updates `src/docs/README.md` in the same
|
|
84
|
+
commit.
|
|
85
|
+
4. PR summary includes risks and rollback notes, including the effect on records already stored in
|
|
86
|
+
users' browsers.
|
|
87
|
+
|
|
88
|
+
## 3. Repository Knowledge
|
|
89
|
+
|
|
90
|
+
### Tech Stack
|
|
91
|
+
|
|
92
|
+
| Area | Tooling | Version |
|
|
93
|
+
| ---------------- | ------- | ------- |
|
|
94
|
+
| Language runtime | JavaScript (ES modules with decorators) running in a browser; Node.js only for tooling | Node `>=18` per `package.json` `engines` |
|
|
95
|
+
| Storage library | `localforage` | `^1.7.3` (the workspace lockfile resolves 1.10.0) |
|
|
96
|
+
| Build tool | `webex-legacy-tools` via `@webex/legacy-tools`, with `@webex/babel-config-legacy` | `workspace:*` |
|
|
97
|
+
| Test framework | Shared conformance suite from `@webex/storage-adapter-spec`; Karma with Mocha via `test:browser`; Jest config via `@webex/jest-config-legacy` | `workspace:*` |
|
|
98
|
+
| Lint/format | ESLint via `@webex/eslint-config-legacy`; Prettier | ESLint `^8.24.0`; Prettier `^2.7.1` (no local script) |
|
|
99
|
+
|
|
100
|
+
### Project Map
|
|
101
|
+
|
|
102
|
+
- `src/index.js`: the whole module, `StorageAdapterLocalForage` and its per-instance `Bound` binding
|
|
103
|
+
class. There is no other source file.
|
|
104
|
+
- `src/docs/README.md`: the module specification. Update it in the same change that alters behavior.
|
|
105
|
+
- `test/unit/spec/storage-adapter-local-forage.js`: the only test file. It runs the shared
|
|
106
|
+
conformance suite inside `skipInNode(describe)` and declares no case of its own.
|
|
107
|
+
- `docs/`: package-wide standing documentation (index, architecture, getting started, spec registry,
|
|
108
|
+
ADR index).
|
|
109
|
+
- `.sdd/manifest.json`: SDD routing, coverage state, contracts, artifact decisions, and the route back
|
|
110
|
+
to the monorepo root (`layout.monorepo_package`). The Repo Standards templates live only in the
|
|
111
|
+
monorepo root's `.sdd/templates/repo-standards`.
|
|
112
|
+
- `process`: a one-line module exporting `{browser: true}`; nothing in this package or its build
|
|
113
|
+
tooling references it.
|
|
114
|
+
- `jest.config.js`, `babel.config.js`, `.eslintrc.js`: thin files over shared workspace configuration.
|
|
115
|
+
|
|
116
|
+
### Critical Constraints
|
|
117
|
+
|
|
118
|
+
- **The stored record layout is a compatibility contract.** Records are keyed `${namespace}/${key}`
|
|
119
|
+
in the default `localforage` database (`localforage` / `keyvaluepairs`). Changing the composition,
|
|
120
|
+
the database, or the store name orphans data in every user's browser. Do it only with a migration.
|
|
121
|
+
- **`clear()` empties the whole default database, and the constructor argument is ignored.** Both
|
|
122
|
+
are current behavior that the owner classified on 2026-10-06 as known hazards to fix separately.
|
|
123
|
+
Do not rely on either as a contract, and do not change either silently. A fix is a behavior change
|
|
124
|
+
for the logout path, which calls `clear()` on every cached binding.
|
|
125
|
+
- **`get` must keep a missing key distinct from a stored `null`.** The storage layer treats
|
|
126
|
+
`NotFoundError` as "no data" and any other rejection as a failure.
|
|
127
|
+
- **Stored values are unencrypted and can include KMS key material.** Escalate any change to what is
|
|
128
|
+
stored, logged, or cleared.
|
|
129
|
+
- **The package is browser-only.** In Node, `localforage` has no driver and every operation rejects.
|
|
130
|
+
|
|
131
|
+
## 4. Testing Workflow
|
|
132
|
+
|
|
133
|
+
Run checks in this order:
|
|
134
|
+
|
|
135
|
+
1. No unit tier executes today. In Node the suite is skipped, and the `test:browser` run that CI starts
|
|
136
|
+
for a change here is expected to fail while loading the suite. Neither is evidence of behavior.
|
|
137
|
+
2. `yarn workspace @webex/storage-adapter-local-forage test:style`
|
|
138
|
+
3. `yarn workspace @webex/storage-adapter-local-forage build`
|
|
139
|
+
|
|
140
|
+
Testing rules:
|
|
141
|
+
|
|
142
|
+
- Add or update tests for every behavior change, and confirm that the new test actually runs. The
|
|
143
|
+
shared suite is skipped in Node and calls the Jest-only `beforeAll` under Karma with Mocha.
|
|
144
|
+
- Cover failure paths and edge cases, not only happy paths: missing namespace or logger, a missing
|
|
145
|
+
key versus a stored `null`, and `put(key, undefined)`.
|
|
146
|
+
- Do not remove tests to make CI pass.
|
|
147
|
+
- Add a characterization baseline before any risky modification; this module has none.
|
|
148
|
+
|
|
149
|
+
## 5. Code Style and Patterns
|
|
150
|
+
|
|
151
|
+
Coding expectations:
|
|
152
|
+
|
|
153
|
+
- Follow repository style rules and static analysis output.
|
|
154
|
+
- Prefer small, composable functions over large procedural blocks.
|
|
155
|
+
- Make error handling explicit at system boundaries.
|
|
156
|
+
- Keep public interfaces stable unless a breaking change is requested.
|
|
157
|
+
- Before adding a literal path, filename, command, workflow identifier, status,
|
|
158
|
+
or other policy value, search the repository for exact and semantically
|
|
159
|
+
equivalent uses. When repeated production values represent one shared
|
|
160
|
+
contract, move them to the narrowest owning shared module or catalog as one
|
|
161
|
+
canonical named constant, enum, or type and update consumers. Keep incidental
|
|
162
|
+
similarities, one-off implementation details, and independent test fixtures
|
|
163
|
+
local.
|
|
164
|
+
- Do not import a default, named, object, or namespace binding and immediately
|
|
165
|
+
re-export it. Consumers should import from the owning module; package barrels
|
|
166
|
+
should use direct named re-exports.
|
|
167
|
+
- Do not write inline runtime `typeof` checks outside descriptively named guard
|
|
168
|
+
implementations. Import and reuse the owning guard instead; TypeScript
|
|
169
|
+
type-position `typeof` queries remain allowed.
|
|
170
|
+
- Log only through the binding's injected logger, with the `storage-adapter-local-forage:` prefix.
|
|
171
|
+
- Keep namespace and logger in the module-level WeakMaps; do not expose them as binding properties.
|
|
172
|
+
- Keep the `// eslint-disable-next-line require-jsdoc` comment above each `oneFlight`-decorated
|
|
173
|
+
method.
|
|
174
|
+
|
|
175
|
+
Pattern example:
|
|
176
|
+
|
|
177
|
+
```text
|
|
178
|
+
Preferred:
|
|
179
|
+
- Validate bind() arguments before creating a binding and reject with a descriptive Error.
|
|
180
|
+
- Reject a missing key with NotFoundError from @webex/webex-core.
|
|
181
|
+
- Compose every stored key as `${namespace}/${key}`.
|
|
182
|
+
|
|
183
|
+
Avoid:
|
|
184
|
+
- Resolving undefined or null for a missing key.
|
|
185
|
+
- Writing to a different localforage instance or store without a data migration.
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## 6. Git Workflow
|
|
189
|
+
|
|
190
|
+
- Branch naming: `[feature|fix|chore]/[short-description]`
|
|
191
|
+
- Commit format: conventional commits (`feat:`, `fix:`, `docs:`, `refactor:`, `test:`, `chore:`)
|
|
192
|
+
- Keep commits focused and reversible.
|
|
193
|
+
- Rebase on the target branch before opening PR.
|
|
194
|
+
|
|
195
|
+
PR checklist:
|
|
196
|
+
|
|
197
|
+
- What changed and why.
|
|
198
|
+
- Tests run and results.
|
|
199
|
+
- Risk/impact areas.
|
|
200
|
+
- Rollback approach.
|
|
201
|
+
|
|
202
|
+
## 7. Boundaries and Escalation
|
|
203
|
+
|
|
204
|
+
### Always
|
|
205
|
+
|
|
206
|
+
- Prefer existing patterns over introducing new architecture.
|
|
207
|
+
- Keep changes minimal for the requested scope.
|
|
208
|
+
- Call out assumptions and unknowns explicitly.
|
|
209
|
+
|
|
210
|
+
### Ask First
|
|
211
|
+
|
|
212
|
+
- Adding new dependencies or external services, including replacing or upgrading `localforage`.
|
|
213
|
+
- Large refactors or schema migrations, including any change to the record layout or `clear()` scope.
|
|
214
|
+
- Security-sensitive changes (auth, encryption, secrets handling), including what is stored or logged.
|
|
215
|
+
- Any destructive data or infrastructure operation.
|
|
216
|
+
|
|
217
|
+
### Never
|
|
218
|
+
|
|
219
|
+
- Commit secrets, keys, or credentials.
|
|
220
|
+
- Bypass required checks by disabling tests or linters.
|
|
221
|
+
- Rewrite history on shared branches.
|
|
222
|
+
- Change unrelated files "while here" without clear need.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<!-- sdd-generated-metadata
|
|
2
|
+
doc_kind: standing-doc
|
|
3
|
+
generated_from: adr-index@0.3.0
|
|
4
|
+
generated_by: claude-code
|
|
5
|
+
approved_by: rsarika@cisco.com
|
|
6
|
+
updated_at: 2026-11-10T00:00:00Z
|
|
7
|
+
validation_status: pass-with-warnings
|
|
8
|
+
-->
|
|
9
|
+
|
|
10
|
+
# Architectural decision records
|
|
11
|
+
|
|
12
|
+
Numbered, append-only records of structural decisions affecting `@webex/storage-adapter-local-forage`
|
|
13
|
+
and its documentation. Add a concrete ADR (for example, `0001-scope-clear-to-namespace.md`) when a
|
|
14
|
+
decision is non-obvious, hard to reverse, or worth explaining to a future contributor. Do not edit an
|
|
15
|
+
accepted decision in place when its outcome changes; supersede it with a new ADR and link both
|
|
16
|
+
records.
|
|
17
|
+
|
|
18
|
+
## Index
|
|
19
|
+
|
|
20
|
+
No architectural decisions are registered yet. The current design choices are the shared default
|
|
21
|
+
`localforage` database, the `keys()` scan used to tell a stored `null` from a missing key, and
|
|
22
|
+
`oneFlight` on reads and deletes. They are recorded with their costs in the module specification's
|
|
23
|
+
[Key design trade-off](../../src/docs/README.md#key-design-trade-off) section. On 2026-10-06 the owner
|
|
24
|
+
classified the whole-database `clear()` and the ignored constructor argument as known hazards to fix
|
|
25
|
+
separately, so a fix to either should arrive with a concrete ADR.
|
|
26
|
+
|
|
27
|
+
Add new entries as ADRs are accepted. Keep this list in numeric order.
|
|
28
|
+
|
|
29
|
+
Each ADR should state its context, decision, alternatives, consequences, and the condition that would
|
|
30
|
+
cause the team to revisit it. Record the deciders, any superseded decision, and the constraint future
|
|
31
|
+
changes must preserve.
|