@datafog/fogclaw 0.1.0

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 (97) hide show
  1. package/.github/workflows/harness-docs.yml +30 -0
  2. package/AGENTS.md +28 -0
  3. package/LICENSE +21 -0
  4. package/README.md +208 -0
  5. package/dist/config.d.ts +4 -0
  6. package/dist/config.d.ts.map +1 -0
  7. package/dist/config.js +30 -0
  8. package/dist/config.js.map +1 -0
  9. package/dist/engines/gliner.d.ts +14 -0
  10. package/dist/engines/gliner.d.ts.map +1 -0
  11. package/dist/engines/gliner.js +75 -0
  12. package/dist/engines/gliner.js.map +1 -0
  13. package/dist/engines/regex.d.ts +5 -0
  14. package/dist/engines/regex.d.ts.map +1 -0
  15. package/dist/engines/regex.js +54 -0
  16. package/dist/engines/regex.js.map +1 -0
  17. package/dist/index.d.ts +19 -0
  18. package/dist/index.d.ts.map +1 -0
  19. package/dist/index.js +157 -0
  20. package/dist/index.js.map +1 -0
  21. package/dist/redactor.d.ts +3 -0
  22. package/dist/redactor.d.ts.map +1 -0
  23. package/dist/redactor.js +37 -0
  24. package/dist/redactor.js.map +1 -0
  25. package/dist/scanner.d.ts +11 -0
  26. package/dist/scanner.d.ts.map +1 -0
  27. package/dist/scanner.js +77 -0
  28. package/dist/scanner.js.map +1 -0
  29. package/dist/types.d.ts +31 -0
  30. package/dist/types.d.ts.map +1 -0
  31. package/dist/types.js +18 -0
  32. package/dist/types.js.map +1 -0
  33. package/docs/DATA.md +28 -0
  34. package/docs/DESIGN.md +17 -0
  35. package/docs/DOMAIN_DOCS.md +30 -0
  36. package/docs/FRONTEND.md +24 -0
  37. package/docs/OBSERVABILITY.md +25 -0
  38. package/docs/PLANS.md +171 -0
  39. package/docs/PRODUCT_SENSE.md +20 -0
  40. package/docs/RELIABILITY.md +60 -0
  41. package/docs/SECURITY.md +50 -0
  42. package/docs/design-docs/core-beliefs.md +17 -0
  43. package/docs/design-docs/index.md +8 -0
  44. package/docs/generated/README.md +36 -0
  45. package/docs/generated/memory.md +1 -0
  46. package/docs/plans/2026-02-16-fogclaw-design.md +172 -0
  47. package/docs/plans/2026-02-16-fogclaw-implementation.md +1606 -0
  48. package/docs/plans/README.md +15 -0
  49. package/docs/plans/active/2026-02-16-feat-openclaw-official-submission-plan.md +386 -0
  50. package/docs/plans/active/2026-02-17-feat-release-fogclaw-via-datafog-package-plan.md +318 -0
  51. package/docs/plans/active/2026-02-17-feat-submit-fogclaw-to-openclaw-plan.md +244 -0
  52. package/docs/plans/tech-debt-tracker.md +42 -0
  53. package/docs/plugins/fogclaw.md +95 -0
  54. package/docs/runbooks/address-review-findings.md +30 -0
  55. package/docs/runbooks/ci-failures.md +46 -0
  56. package/docs/runbooks/code-review.md +34 -0
  57. package/docs/runbooks/merge-change.md +28 -0
  58. package/docs/runbooks/pull-request.md +45 -0
  59. package/docs/runbooks/record-evidence.md +43 -0
  60. package/docs/runbooks/reproduce-bug.md +42 -0
  61. package/docs/runbooks/respond-to-feedback.md +42 -0
  62. package/docs/runbooks/review-findings.md +31 -0
  63. package/docs/runbooks/submit-openclaw-plugin.md +68 -0
  64. package/docs/runbooks/update-agents-md.md +59 -0
  65. package/docs/runbooks/update-domain-docs.md +42 -0
  66. package/docs/runbooks/validate-current-state.md +41 -0
  67. package/docs/runbooks/verify-release.md +69 -0
  68. package/docs/specs/2026-02-16-feat-openclaw-official-submission-spec.md +115 -0
  69. package/docs/specs/2026-02-17-feat-submit-fogclaw-to-openclaw.md +125 -0
  70. package/docs/specs/README.md +5 -0
  71. package/docs/specs/index.md +8 -0
  72. package/docs/spikes/README.md +8 -0
  73. package/fogclaw.config.example.json +15 -0
  74. package/openclaw.plugin.json +45 -0
  75. package/package.json +37 -0
  76. package/scripts/ci/he-docs-config.json +123 -0
  77. package/scripts/ci/he-docs-drift.sh +112 -0
  78. package/scripts/ci/he-docs-lint.sh +234 -0
  79. package/scripts/ci/he-plans-lint.sh +354 -0
  80. package/scripts/ci/he-runbooks-lint.sh +445 -0
  81. package/scripts/ci/he-specs-lint.sh +258 -0
  82. package/scripts/ci/he-spikes-lint.sh +249 -0
  83. package/scripts/runbooks/select-runbooks.sh +154 -0
  84. package/src/config.ts +46 -0
  85. package/src/engines/gliner.ts +88 -0
  86. package/src/engines/regex.ts +71 -0
  87. package/src/index.ts +223 -0
  88. package/src/redactor.ts +51 -0
  89. package/src/scanner.ts +90 -0
  90. package/src/types.ts +52 -0
  91. package/tests/config.test.ts +104 -0
  92. package/tests/gliner.test.ts +184 -0
  93. package/tests/plugin-smoke.test.ts +114 -0
  94. package/tests/redactor.test.ts +320 -0
  95. package/tests/regex.test.ts +345 -0
  96. package/tests/scanner.test.ts +199 -0
  97. package/tsconfig.json +20 -0
@@ -0,0 +1,318 @@
1
+ ---
2
+ slug: 2026-02-17-feat-release-fogclaw-via-datafog-package
3
+ status: active
4
+ phase: plan
5
+ plan_mode: execution
6
+ detail_level: more
7
+ priority: high
8
+ owner: DataFog Platform Team
9
+ ---
10
+
11
+ # Enable an interim DataFog-owned `@datafog/fogclaw` release path
12
+
13
+ This Plan is a living document. The sections `Progress`, `Surprises & Discoveries`, `Decision Log`, `Outcomes & Retrospective`, and `Revision Notes` must be kept current as work proceeds.
14
+
15
+ This plan is maintained in accordance with `docs/PLANS.md`.
16
+
17
+ ## Purpose / Big Picture
18
+
19
+ Users should be able to install and use FogClaw today from a DataFog-owned namespace without waiting for official OpenClaw plugin listing approval. The result should be a published package `@datafog/fogclaw` that can be installed with `openclaw plugins install @datafog/fogclaw`, loads correctly through OpenClaw plugin discovery, and exposes the same guardrail + tool behavior that was already validated for the merged FogClaw line.
20
+
21
+ ## Progress
22
+
23
+ - [x] (2026-02-17T18:52:00Z) P1 [M1] Confirmed baseline package identity references and package files in the DataFog repo.
24
+ - [x] (2026-02-17T18:53:00Z) P2 [M1] Updated `package.json` and user docs to `@datafog/fogclaw`.
25
+ - [x] (2026-02-17T18:54:00Z) P3 [M1] Updated `package-lock` metadata and refreshed scope for build/release artifacts.
26
+ - [x] (2026-02-17T18:55:00Z) P4 [M2] Re-ran build/test/smoke + `npm pack --json` + `npm publish --dry-run` validations.
27
+ - [x] (2026-02-17T18:56:00Z) P5 [M2] Verified `openclaw plugins install` against the built `datafog-fogclaw-0.1.0.tgz` in a clean runtime; plugin now loads as `fogclaw` with status `loaded` and tools `fogclaw_scan, fogclaw_redact`.
28
+ - [ ] (2026-02-17T18:56:00Z) P5 [M2] Verify `openclaw plugins install @datafog/fogclaw` with live npm resolution (blocked until package is published).
29
+ - [ ] (2026-02-17T18:56:00Z) P6 [M3] Prepare and execute V1 publish/release of `@datafog/fogclaw` (publishing blocked by org access/2FA status in current environment).
30
+ - [x] (2026-02-17T18:57:00Z) P7 [M3] Capture release artifacts and update evidence notes; add follow-up for dependency install blocker in OpenClaw install path.
31
+
32
+
33
+ ## Surprises & Discoveries
34
+
35
+ - Observation: In the DataFog repo, multiple docs and user-facing examples currently point to `@openclaw/fogclaw`, and migration must be done consistently across `README.md`, `docs/plugins/fogclaw.md`, and install examples to avoid user confusion.
36
+ Evidence: `rg -n "@openclaw/fogclaw|openclaw plugins install"` in `/Users/sidmohan/Projects/datafog/fogclaw`.
37
+
38
+ - Observation: `package-lock.json` pins package metadata to `@openclaw/fogclaw` and must be regenerated after namespace rename.
39
+ Evidence: top-level `package-lock.json` package metadata `name` field.
40
+
41
+ - Observation: `openclaw plugins install` of a clean extracted `datafog-fogclaw-0.1.0.tgz` now completes successfully on a clean runtime.
42
+ Evidence: `openclaw plugins install /Users/sidmohan/Projects/datafog/fogclaw/datafog-fogclaw-0.1.0.tgz`, `openclaw plugins info fogclaw`, and `openclaw plugins list` all report plugin `fogclaw` as `loaded` with tools.
43
+
44
+ - Observation: The prior `TypeError: Cannot read properties of undefined (reading 'trim')` install failure was caused by OpenClaw's `registerTool` contract when tool objects omit a top-level `name`.
45
+ Evidence: `src/plugins/registry.ts` in OpenClaw (`registerTool` maps `tool.name` without null-guard); fixed in this repository by adding `name` fields to both tool objects.
46
+
47
+ - Observation: `openclaw plugins install @datafog/fogclaw` still fails in this environment with `404 Not Found - GET https://registry.npmjs.org/@datafog%2ffogclaw` because the scoped package is not yet published to npm.
48
+ Evidence: CLI output from `openclaw plugins install @datafog/fogclaw` in current machine state.
49
+
50
+ - Observation: plugin loads with runtime warning about optional `sharp` optional dependency for GLiNER image ops; warning does not prevent plugin load.
51
+ Evidence: repeat `Cannot find module '../build/Release/sharp-darwin-arm64v8.node'` messages from `openclaw plugins install` run on clean state.
52
+
53
+ ## Decision Log
54
+
55
+ - Decision: Keep package behavior unchanged while implementing namespace migration and release plumbing.
56
+ Rationale: V1 goal is immediate user availability through DataFog namespace, not plugin runtime changes.
57
+ Date/Author: 2026-02-17T10:57:00Z / sidmohan
58
+
59
+ - Decision: Maintain plugin `id: "fogclaw"` and `openclaw.extensions` compatibility.
60
+ Rationale: OpenClaw discovery is keyed by plugin id in manifest and extension path; changing `id` would require user-facing config migration.
61
+ Date/Author: 2026-02-17T10:57:00Z / sidmohan
62
+
63
+ - Decision: Use `@datafog/fogclaw` for interim installs and document fallback to official listing work separately.
64
+ Rationale: This matches the user objective for independently publishable DataFog namespace while official inclusion is pending.
65
+ Date/Author: 2026-02-17T10:57:00Z / sidmohan
66
+
67
+ - Decision: Keep behavioral compatibility unchanged for the V1 scope.
68
+ Rationale: The goal is install-path enablement and namespace migration, not feature changes to detection/redaction behavior.
69
+ Date/Author: 2026-02-17T18:57:00Z / sidmohan
70
+
71
+ - Decision: Add a targeted registration compatibility fix for OpenClaw API expectations while keeping runtime behavior unchanged.
72
+ Rationale: OpenClaw's `registerTool` requires a tool `name` field in object registrations to avoid `trim` crashes; adding `name` fields in FogClaw's tool registrations is a non-functional compatibility patch and required to complete installability.
73
+ Date/Author: 2026-02-17T19:08:00Z / sidmohan
74
+
75
+ ## Outcomes & Retrospective
76
+
77
+ - V1 package identity migration and documentation updates are complete in the DataFog repo with no runtime behavior changes.
78
+ - Local validation confirms namespace rename compiles and tests (`npm run build`, `npm run test`, `npm run test:plugin-smoke`) continue to pass.
79
+ - `npm pack --json` and `npm publish --dry-run` now emit scoped package metadata under `@datafog/fogclaw`.
80
+ - `openclaw plugins install` against a clean temporary state and local `datafog-fogclaw-0.1.0.tgz` now succeeds; `openclaw plugins info fogclaw` shows status `loaded` and tools `fogclaw_scan`, `fogclaw_redact`.
81
+ - `openclaw plugins install @datafog/fogclaw` via npm registry is still blocked in this environment by publish visibility (`404 Not Found`) until release is live.
82
+ - GLiNER/`sharp` warnings are still non-fatal during plugin registration in this environment and do not prevent plugin load.
83
+
84
+
85
+ ## Context and Orientation
86
+
87
+ This repository is `/Users/sidmohan/Projects/datafog/fogclaw`.
88
+
89
+ Key files:
90
+
91
+ - `package.json`: package identity (`name`) and plugin manifest pointer (`openclaw.extensions`).
92
+ - `package-lock.json`: locked package metadata used by npm publish and reproducibility checks.
93
+ - `openclaw.plugin.json`: plugin manifest required by OpenClaw (`id`, config schema, metadata).
94
+ - `dist/index.js`: compiled plugin entrypoint referenced by `openclaw.extensions`.
95
+ - `src/index.ts`: plugin registration (`before_agent_start`, `fogclaw_scan`, `fogclaw_redact`).
96
+ - `tests/plugin-smoke.test.ts`: local contract check for hook/tool registration.
97
+ - `README.md` and `docs/plugins/fogclaw.md`: primary install and usage documentation.
98
+ - `/Users/sidmohan/Projects/datafog/openclaw` provides target runtime install behavior for `openclaw plugins install`.
99
+
100
+ **OpenClaw install flow (important for this initiative):**
101
+ `openclaw plugins install <npm-spec>` invokes `npm pack`, extracts into plugin extension directory, records install metadata, and loads the extracted package through plugin manifest/entrypoint discovery.
102
+
103
+ ## Milestones
104
+
105
+ ### Milestone 1 — Namespace migration in DataFog repo
106
+
107
+ Rename the package to `@datafog/fogclaw` across package metadata and documentation without changing runtime behavior. This milestone exists so users can consistently install the package from DataFog namespace and the published tarball name matches the user-facing command.
108
+
109
+ ### Milestone 2 — Validation of local contract and installability
110
+
111
+ Prove the renamed package remains install-ready by running build/tests/pack checks and an end-to-end OpenClaw install smoke flow. This milestone ensures compatibility with OpenClaw’s plugin loader and confirms no manifest or entrypoint regressions.
112
+
113
+ ### Milestone 3 — Release and evidence publishing
114
+
115
+ Publish V1 package release to npm, then record release evidence and update operational/runbook notes so users can reliably install `@datafog/fogclaw` today.
116
+
117
+ ## Plan of Work
118
+
119
+ Work should proceed in small, testable edits.
120
+
121
+ First, update DataFog package metadata and references to the desired scope and verify there are no conflicting names left behind. This includes package name, lockfile metadata, user documentation commands, and plugin docs in the DataFog repo.
122
+
123
+ Second, run an installability verification sequence in the same repo: compile and test, generate a dry-run publish artifact, and validate OpenClaw loading behavior from a clean install path using the newly scoped npm spec. For the smoke path, use either a temporary local publish or a pre-release test package if external network restrictions prevent immediate production publish.
124
+
125
+ Third, perform the final publish/release steps and capture deterministic artifacts (pack info, version, install command, expected `openclaw plugin` diagnostics) in the plan’s evidence section. Keep open questions explicit if npm publish access/rate-limiting or token setup is an external blocker.
126
+
127
+ ## Concrete Steps
128
+
129
+ From repo root `/Users/sidmohan/Projects/datafog/fogclaw`:
130
+
131
+ 1. Inspect current scope references.
132
+
133
+ rg -n "@openclaw/fogclaw|@datafog/fogclaw|openclaw plugins install" README.md package.json package-lock.json docs/plugins/fogclaw.md src docs/PLANS.md
134
+
135
+ Expected:
136
+
137
+ - Install/documentation references should consistently show `@datafog/fogclaw` (legacy `@openclaw/fogclaw` references would be migration follow-ups).
138
+
139
+ 2. Update package identity to DataFog namespace.
140
+
141
+ python - <<'PY'
142
+ import json
143
+ from pathlib import Path
144
+ p = Path('package.json')
145
+ obj = json.loads(p.read_text())
146
+ obj['name'] = '@datafog/fogclaw'
147
+ p.write_text(json.dumps(obj, indent=2) + "\n")
148
+ print('updated', p)
149
+
150
+ p = Path('package-lock.json')
151
+ obj = json.loads(p.read_text())
152
+ obj['name'] = '@datafog/fogclaw'
153
+ if isinstance(obj.get('packages'), dict) and '' in obj['packages']:
154
+ obj['packages']['']['name'] = '@datafog/fogclaw'
155
+ p.write_text(json.dumps(obj, indent=2) + "\n")
156
+ print('updated', p)
157
+ PY
158
+
159
+ Expected:
160
+
161
+ - Both files use `@datafog/fogclaw` as package `name`.
162
+ - `package-lock.json` root package and lock metadata are coherent.
163
+
164
+ 3. Update install/docs references to the scoped package.
165
+
166
+ rg -n "@openclaw/fogclaw|openclaw plugins install @" README.md docs/plugins/fogclaw.md docs/specs/*.md docs/plans/active/*.md
167
+
168
+ Then edit all DataFog user-facing examples to:
169
+
170
+ - `openclaw plugins install @datafog/fogclaw`
171
+
172
+ and adjust standalone import examples if they currently imply `@openclaw/fogclaw` identity.
173
+
174
+ Expected:
175
+
176
+ - Documentation consistently points users at `@datafog/fogclaw` for interim install path.
177
+ - Core plugin `id` and extension path references remain unchanged.
178
+
179
+ 4. Rebuild and refresh lock-derived metadata as needed.
180
+
181
+ npm install
182
+ npm run build
183
+ npm test
184
+ npm run test:plugin-smoke
185
+
186
+ Expected:
187
+
188
+ - Build/test suite passes.
189
+ - `dist/index.js` and test artifacts remain valid.
190
+ - Plugin contract checks still pass.
191
+
192
+ 5. Validate package pack shape before publish.
193
+
194
+ npm pack --json
195
+ npm publish --dry-run
196
+
197
+ Expected:
198
+
199
+ - Tarball contains `dist/index.js` and `openclaw.plugin.json` and `package.json`.
200
+ - No unintended paths (e.g., local `.git`, build cache, editor artifacts) leak into the packed payload.
201
+
202
+ 6. Verify install path from OpenClaw using scoped spec on a local/clean extension path.
203
+
204
+ openclaw plugins install @datafog/fogclaw
205
+ openclaw plugins info fogclaw
206
+ openclaw plugins list | rg fogclaw
207
+
208
+ Expected:
209
+
210
+ - `fogclaw` plugin appears and can be enabled/referenced in OpenClaw config.
211
+ - No manifest/schema errors are thrown in plugin load.
212
+
213
+ ## Validation and Acceptance
214
+
215
+ A completed V1 initiative is successful when all commands below pass in this repo and in an `openclaw` runtime that can install third-party packages.
216
+
217
+ - Run:
218
+ - `npm install`
219
+ - `npm run build`
220
+ - `npm test`
221
+ - `npm run test:plugin-smoke`
222
+ - `npm pack --json`
223
+ - `npm publish --dry-run`
224
+
225
+ Expect:
226
+
227
+ - Plugin build/tests pass.
228
+ - Pack metadata is minimal and includes `openclaw.plugin.json` + `dist/index.js`.
229
+ - Installability command either succeeds with a published `@datafog/fogclaw` package or demonstrates a reproducible blocker (e.g., publish access) with mitigation.
230
+
231
+ - `openclaw plugins install @datafog/fogclaw`
232
+ - `openclaw plugins info fogclaw`
233
+ - `openclaw plugins list | rg fogclaw`
234
+
235
+ Expect:
236
+
237
+ - Plugin installation metadata registers as `fogclaw` and lists both hook/tool availability from manifest.
238
+ - `openclaw plugins info fogclaw` shows no critical errors.
239
+
240
+ ## Idempotence and Recovery
241
+
242
+ - Re-running namespace renames is safe if done as a single set of edits (`package.json`, `package-lock.json`, docs).
243
+ - If `openclaw plugins install @datafog/fogclaw` cannot run due stale install artifacts, run `openclaw plugins uninstall fogclaw` (or remove stale extension dir) and re-run from a clean extension path.
244
+ - If `npm publish` is blocked, capture exact npm error + timestamp, resolve token/2FA/access, then rerun from step 5 onward.
245
+ - If the package publishes but install fails due manifest mismatch, roll back to previous package version in npm and fix manifest/docs before republishing.
246
+
247
+ ## Artifacts and Notes
248
+
249
+ - Scope migration evidence:
250
+
251
+ package: @datafog/fogclaw
252
+ version: 0.1.0
253
+ `npm pkg get name` output: `"@datafog/fogclaw"`
254
+ `npm pkg get openclaw` output:
255
+ `{"extensions":["./dist/index.js"]}`
256
+
257
+ - Contract smoke evidence:
258
+
259
+ `node - <<'NODE'
260
+ import plugin from './dist/index.js';
261
+ console.log(typeof plugin?.register, plugin?.id, plugin?.name);
262
+ NODE`
263
+ => `function fogclaw FogClaw`
264
+
265
+ - Reproducibility evidence:
266
+ - `npm pack --json` output includes `datafog-fogclaw-0.1.0.tgz` and `openclaw.plugin.json`/`dist/index.js` in file list.
267
+ - `npm publish --dry-run` succeeded and produced scoped package manifest notice.
268
+
269
+ - Installability evidence:
270
+ - `openclaw plugins install @datafog/fogclaw` currently fails with `npm 404 Not Found` until package publish is live.
271
+ - `openclaw plugins install` against local `datafog-fogclaw-0.1.0.tgz` in a clean temp runtime now succeeds and reports plugin status `loaded` with tools `fogclaw_scan`, `fogclaw_redact`.
272
+ - GLiNER startup logs still surface optional `sharp` module warnings, but plugin registration now succeeds.
273
+
274
+ - `git rev-parse HEAD` (of implementation snapshot): capture before final merge.
275
+
276
+ - Scoped package discoverability: not yet in npm registry during this environment run.
277
+
278
+
279
+ ## Interfaces and Dependencies
280
+
281
+ - OpenClaw plugin package contract:
282
+ - `package.json` field `openclaw.extensions` still points to `./dist/index.js`.
283
+ - `openclaw.plugin.json` remains installable by OpenClaw manifest parser.
284
+ - Build and verification commands rely on:
285
+ - `typescript`, `vitest`, and Node runtime already present in project.
286
+ - Publish path depends on npm credentials and any 2FA / publish policy in DataFog org scope.
287
+
288
+ ## Pull Request
289
+
290
+ - pr: <url>
291
+ - branch:
292
+ - commit:
293
+ - ci:
294
+
295
+ ## Review Findings
296
+
297
+ - Pending until review stage.
298
+
299
+ ## Verify/Release Decision
300
+
301
+ - decision: blocked
302
+ - date: 2026-02-17T19:08:00Z
303
+ - open findings by priority (if any): pending
304
+ - evidence:
305
+ - installability in clean runtime succeeds for local `datafog-fogclaw-0.1.0.tgz` after tool-name registration fix
306
+ - scoped package install still returns registry 404 (not yet published)
307
+ - rollback: revert to previous working scoped package state (or keep changes in branch) if publish credentials/visibility unavailable
308
+ - post-release checks:
309
+ - `openclaw plugins install @datafog/fogclaw`
310
+ - `openclaw plugins info fogclaw`
311
+ - `openclaw plugins list | rg fogclaw`
312
+ - owner: sidmohan
313
+
314
+ ## Revision Notes
315
+
316
+ - 2026-02-17T10:57:00Z: Initialized plan for V1 scoped-release path in `@datafog/fogclaw` and documented zero-logic-change constraints for immediate installability milestone.
317
+ - 2026-02-17T18:57:00Z: Completed namespace migration in package metadata and install/docs (`package.json`, `package-lock.json`, `README.md`, `docs/plugins/fogclaw.md`). Ran full local validation (`npm run build`, `npm run test`, `npm run test:plugin-smoke`, `npm pack --json`, `npm publish --dry-run`) and documented install blocker (package not yet published to npm).
318
+ - 2026-02-17T19:08:00Z: Fixed OpenClaw compatibility in `src/index.ts` by adding explicit `name` fields to `fogclaw_scan` and `fogclaw_redact` tool registrations to avoid undefined `.trim()` during registration; verified clean-runtime install/load succeeds with local tarball (`openclaw plugins install <tgz>`, `plugins info`, `plugins list`).
@@ -0,0 +1,244 @@
1
+ ---
2
+ slug: 2026-02-17-feat-submit-fogclaw-to-openclaw
3
+ status: active
4
+ phase: plan
5
+ plan_mode: execution
6
+ detail_level: more
7
+ priority: high
8
+ owner: sidmohan
9
+ ---
10
+
11
+ # Submit FogClaw to OpenClaw's official plugin submission path
12
+
13
+ This plan is a living document. Keep `Progress`, `Surprises & Discoveries`, `Decision Log`, `Outcomes & Retrospective`, and `Revision Notes` current as work progresses.
14
+
15
+ This plan must be maintained in accordance with `docs/PLANS.md`.
16
+
17
+ ## Purpose / Big Picture
18
+
19
+ The plugin is already merged in `DataFog/fogclaw` and ready for publication. This initiative moves beyond local repository hardening to complete the **official OpenClaw submission process** in the upstream ecosystem, so maintainers and users can discover FogClaw through OpenClaw’s normal plugin intake path.
20
+
21
+ After this initiative, a reviewer should be able to find a dedicated upstream OpenClaw PR containing reproducible evidence for plugin loadability, tool/guardrail behavior, and package identity, with clear status and follow-up notes if maintainers request changes.
22
+
23
+ ## Progress
24
+
25
+ - [x] (2026-02-17T01:56:00Z) P1 [Setup] Create submission intent spec for official OpenClaw side flow in `docs/specs/2026-02-17-feat-submit-fogclaw-to-openclaw.md`.
26
+ - [x] (2026-02-17T01:58:00Z) P2 [M1] Read and align the plan against repository conventions (`docs/PLANS.md` + `docs/runbooks/`) and confirm open questions from spec.
27
+ - [x] (2026-02-17T02:05:00Z) P3 [M1] Confirm target OpenClaw submission repository/path and required PR checklist/template.
28
+ - [x] (2026-02-17T02:20:00Z) P4 [M2] Draft external PR body with reproducible evidence block and maintainer-facing rationale.
29
+ - [x] (2026-02-17T02:28:00Z) P5 [M2] Open upstream OpenClaw PR from branch containing only FogClaw submission/supporting docs (`docs/plugins/fogclaw.md`).
30
+ - [ ] (2026-02-17T02:40:00Z) P6 [M3] Record maintainer feedback and implement any required follow-up in repository or PR only when explicitly requested.
31
+ - [ ] (2026-02-17T02:50:00Z) P7 [M3] Update this plan `Pull Request` and `Verify/Review` sections with final submission state and closeout status.
32
+
33
+ ## Surprises & Discoveries
34
+
35
+ - Observation: OpenClaw intake guidance is not documented as a dedicated "plugin submission" checklist; the operative path is standard upstream PR flow on `openclaw/openclaw` with the canonical PR template.
36
+ Evidence: repo-level review (`.github/pull_request_template.md`) plus `docs/reference/RELEASING.md` plugin scope notes.
37
+
38
+ - Observation: `DataFog/fogclaw` is not a fork of `openclaw/openclaw`, so direct cross-repo PR creation from that repo was not possible via `gh`.
39
+ Resolution at the time: opened a temporary PR from a personal fork (`#18779`) for speed, then migrated to `DataFog/openclaw` when the org-owned upstream fork became available.
40
+
41
+ - Observation: A DataFog-owned OpenClaw fork improves ownership alignment for future external submissions.
42
+ Resolution: created `DataFog/openclaw` fork and moved upstream submission PR to come from `DataFog:openclaw-upstream-submission` (PR `#18791`).
43
+
44
+ ## Decision Log
45
+
46
+ - Decision: Scope this initiative to upstream OpenClaw submission only, with zero functional/plugin code changes.
47
+ Rationale: Plugin behavior and API are already stabilized and merged locally; additional code changes would dilute the submission objective and risk destabilizing already verified artifacts.
48
+ Date/Author: 2026-02-17T01:58:00Z / sidmohan
49
+
50
+ - Decision: Keep `@openclaw/fogclaw` as the canonical package identity and treat manifest evidence (`openclaw.plugin.json`, `dist/index.js`, and install command) as mandatory submission evidence.
51
+ Rationale: Submission evidence must be reproducible and match what was already validated in the internal PR phase.
52
+ Date/Author: 2026-02-17T01:58:00Z / sidmohan
53
+
54
+ - Decision: Use standard upstream PR delivery on `openclaw/openclaw` and open from a true fork rather than the DataFog repo.
55
+ Rationale: `DataFog/fogclaw` is not a fork of the target repo, and `gh` blocks non-fork cross-repo PRs with direct refs.
56
+ Date/Author: 2026-02-17T02:29:00Z / sidmohan
57
+
58
+ - Decision: Prefer a `DataFog`-owned fork (`DataFog/openclaw`) as the canonical upstream fork source for future plugin-submission PRs.
59
+ Rationale: Ownership alignment and provenance are clearer for external partner submissions when PRs originate from the company/org fork.
60
+ Date/Author: 2026-02-17T02:46:00Z / sidmohan
61
+
62
+ ## Outcomes & Retrospective
63
+
64
+ - A merged baseline exists in `DataFog/fogclaw` and the next step is organizational rather than technical.
65
+ - Submission-specific actions are now separated from detection hardening to reduce rework.
66
+
67
+ ## Context and Orientation
68
+
69
+ This repository (`/Users/sidmohan/Projects/datafog/fogclaw`) currently contains the source plugin, build outputs configuration, and release evidence updates already merged into `main`.
70
+
71
+ Key runtime files are:
72
+
73
+ - `src/index.ts`: registers `before_agent_start`, `fogclaw_scan`, and `fogclaw_redact`.
74
+ - `openclaw.plugin.json`: plugin manifest used by OpenClaw to discover package entry.
75
+ - `package.json`: plugin identity (`name: @openclaw/fogclaw`) and `openclaw.extensions` entry.
76
+ - `README.md`: reviewer-facing install/evidence commands.
77
+ - `tests/plugin-smoke.test.ts`: non-mocked contract test proving tool and hook behavior on a local mock API.
78
+ - `docs/plans/active/2026-02-16-feat-openclaw-official-submission-plan.md`: closed internal submission-readiness initiative details.
79
+
80
+ For this initiative, a repository branch/PR in an external OpenClaw repo is an **upstream submission route**: it is the place maintainers expect to receive plugin listing evidence. The core task is therefore documentation and submission logistics, not code edits.
81
+
82
+ ## Milestones
83
+
84
+ ### Milestone 1 - Confirm upstream submission target and acceptance expectations
85
+
86
+ At the end of this milestone, the team has identified exactly where and how OpenClaw accepts plugin submissions and what explicit checklist fields must be present in the upstream PR. This is required before drafting or opening the PR and avoids submitting to the wrong repo/branch.
87
+
88
+ ### Milestone 2 - Prepare and open the upstream OpenClaw PR
89
+
90
+ At the end of this milestone, a ready-to-review OpenClaw PR exists with clear install and verification evidence. The PR body should include commands and expected output and point to this repo’s validated artifact path. The branch should contain only submission-facing changes if any are required, not detection logic changes.
91
+
92
+ ### Milestone 3 - Maintain submission loop and close evidence handoff
93
+
94
+ At the end of this milestone, maintainer feedback is either satisfied or clearly documented as a blocker with exact follow-up action. This plan is updated with final PR status, and the submission outcome is captured for handoff or continue-work.
95
+
96
+ ## Plan of Work
97
+
98
+ The work begins by confirming the exact OpenClaw repository path for official plugin submissions. If the target and PR template are known from existing policy, proceed to drafting the upstream PR body.
99
+
100
+ Draft a clean upstream submission body in local notes, ensuring it contains explicit commands and expected outputs from this repository’s `main` branch state. Include the merge commit reference and package identity evidence (`npm pkg get openclaw`, smoke import check from `dist/index.js`, and test status).
101
+
102
+ Open the upstream PR with a title and body that maps directly to maintainer review needs, avoiding implementation detail beyond what was already merged internally. If no additional documentation changes are required locally, this milestone should avoid new feature edits.
103
+
104
+ If maintainers request adjustments, isolate required follow-up work to the smallest possible set. If changes are non-code metadata tasks (for example: clarifying submission checklist text), prefer direct PR updates; if code/manifest edits are requested, open a follow-up branch with precise evidence.
105
+
106
+ ## Concrete Steps
107
+
108
+ From repo root `/Users/sidmohan/Projects/datafog/fogclaw`:
109
+
110
+ 1) Confirm local state and current merged commit hash:
111
+
112
+ git log --oneline --max-count=3
113
+
114
+ Expected (example pattern):
115
+
116
+ <hash> docs(plan): record PR merge completion on main
117
+ 3deae34 Merge pull request #1 from DataFog/openclaw-plugin-submission
118
+
119
+ 2) Validate submission evidence locally one more time:
120
+
121
+ npm test
122
+ npm run build
123
+ npm run test:plugin-smoke
124
+ npm pkg get openclaw
125
+ node - <<'NODE'
126
+ import plugin from './dist/index.js';
127
+ console.log(typeof plugin?.register === 'function', plugin?.id, plugin?.name);
128
+ NODE
129
+
130
+ Expected:
131
+
132
+ Test and build complete successfully.
133
+ npm pkg get openclaw returns { "extensions": ["./dist/index.js"] }.
134
+ node import prints `true fogclaw FogClaw`.
135
+
136
+ 3) Capture upstream submission inputs:
137
+
138
+ openclaw-target=<openclaw-repo-path>
139
+ openclaw-pr-title="feat(openclaw): official fogclaw plugin submission"
140
+
141
+ Then prepare PR body fields including: package ID, install command, evidence command list, and maintainer-impact notes.
142
+
143
+ 4) Open upstream PR (using OpenClaw submission target):
144
+
145
+ gh pr create --repo <openclaw-target> --base main --head <your-branch> --title "$openclaw-pr-title" --body-file <generated-body>
146
+
147
+ Expected:
148
+
149
+ PR URL printed and state set to open.
150
+
151
+ 5) Track review and iterate:
152
+
153
+ gh pr view --repo <openclaw-target> --json number,title,state,reviewDecision,url,headRefName,baseRefName
154
+ gh pr checks --repo <openclaw-target> --watch
155
+
156
+ Expected:
157
+
158
+ Visible PR state and any required checks or maintainer feedback.
159
+
160
+ ## Validation and Acceptance
161
+
162
+ A successful outcome for this initiative is: the upstream submission PR is open in the official OpenClaw path and contains reproducible proof that the plugin package is installable and contract-safe.
163
+
164
+ Specifically:
165
+
166
+ - The PR body includes install and verification commands from this merged plugin state.
167
+ - Evidence output matches this repo’s local validations (tests, build, smoke, package manifest path).
168
+ - No code changes are introduced without a maintainer-triggered request.
169
+ - If maintainer asks for changes, they are closed with a targeted follow-up and documented in this plan.
170
+
171
+ ## Idempotence and Recovery
172
+
173
+ If the upstream target path is wrong, update only the submission-path variables and rerun steps 3–5. If review feedback requires code edits, apply minimal patches, rerun the same local evidence commands, and either amend or recreate the upstream PR as needed. If a submission PR was opened incorrectly, close it with a short note and open a corrected PR to avoid mixed evidence.
174
+
175
+ Rollback during this initiative is low-risk: no functional code changes are planned, so revert only submission artifacts or follow-up docs after maintainer feedback confirmation.
176
+
177
+ ## Artifacts and Notes
178
+
179
+ - Internal merge evidence already exists in `docs/plans/active/2026-02-16-feat-openclaw-official-submission-plan.md` and includes:
180
+ - `npm test` run success
181
+ - `npm run build` success
182
+ - `npm run test:plugin-smoke` pass
183
+ - `npm pkg get openclaw` and import smoke output
184
+
185
+ - Upstream PR status:
186
+ - PR `#18779` was created from a temporary personal fork and then superseded by PR `#18791` from `DataFog/openclaw` to align with official ownership.
187
+ - PR `#18791` is now the active upstream request with submission body + reproducible evidence.
188
+ - Target repository: `openclaw/openclaw` (main branch).
189
+ - Required template source: `.github/pull_request_template.md`.
190
+ - Plugin release scope constraints used from `docs/reference/RELEASING.md` (npm plugin scope + existing plugin list expectations).
191
+
192
+ - Registry/installability note:
193
+ - `npm view @openclaw/fogclaw version` currently returns `E404` (package not yet visible in registry from this environment). Actual runtime/installability remains coupled to maintainer publish flow. This is intentionally tracked as evidence gap outside plugin logic scope.
194
+
195
+ ## Interfaces and Dependencies
196
+
197
+ No new runtime interfaces are introduced in this initiative. The key artifacts to reference are:
198
+
199
+ - `package.json` `openclaw.extensions` + `name`.
200
+ - `openclaw.plugin.json`.
201
+ - `README.md` evidence section (already updated).
202
+ - `tests/plugin-smoke.test.ts` for local behavioral proof.
203
+ - GitHub CLI (`gh`) for PR operations.
204
+
205
+ The external OpenClaw PR should reference these repo files without changing their internals in this phase.
206
+
207
+ ## Pull Request
208
+
209
+ - pr: https://github.com/openclaw/openclaw/pull/18791
210
+ - branch: DataFog:openclaw-upstream-submission
211
+ - commit: 2609f9838 (fork branch)
212
+ - ci: initiated (openclaw/pull/18791 CI: docs-scope, check-docs, secrets passed; several workflows still queued for label/conformance/format checks at creation time)
213
+
214
+ ## Review Findings
215
+
216
+ - PR #18779 was intentionally closed and superseded.
217
+ - PR #18791 is now active and in maintainer triage.
218
+ - Pending: check for checklist/approval or requested follow-up once review starts.
219
+
220
+ ## Verify/Release Decision
221
+
222
+ - decision: pending (upstream PR open; final release decision deferred to maintainer review)
223
+ - date: 2026-02-17T02:35:00Z
224
+ - open findings by priority (if any): pending
225
+ - evidence:
226
+ - `npm test`
227
+ - `pnpm build`
228
+ - `npm run test:plugin-smoke`
229
+ - `npm pkg get openclaw`
230
+ - `node` import smoke (`true fogclaw FogClaw`)
231
+ - upstream PR created: `https://github.com/openclaw/openclaw/pull/18791`
232
+ - CI snapshot at submit time: `check-docs` / `docs-scope` / `secrets` passed; `label`, `label-issues`, `formal_conformance`, `no-tabs` checks still queued
233
+ - rollback:
234
+ - Close/recreate PR if maintainers request intake-path correction.
235
+ - post-release checks:
236
+ - monitor review comments and any requested follow-up changes.
237
+ - once approved, confirm plugin docs/listing + release status in upstream merge checks.
238
+ - owner: sidmohan
239
+
240
+ ## Revision Notes
241
+
242
+ - 2026-02-17T01:58:00Z: Initialized plan from spec `2026-02-17-feat-submit-fogclaw-to-openclaw`. Reason: transition intent to upstream OpenClaw submission as the remaining official readiness step.
243
+ - 2026-02-17T02:28:00Z: Opened initial upstream submission PR `https://github.com/openclaw/openclaw/pull/18779` (temporary personal-fork variant) with evidence-first PR body and `docs/plugins/fogclaw.md` content only.
244
+ - 2026-02-17T02:47:00Z: Created official DataFog upstream fork `https://github.com/DataFog/openclaw` and moved submission PR ownership to `https://github.com/openclaw/openclaw/pull/18791` (source `DataFog:openclaw-upstream-submission`); closed PR #18779 as superseded.
@@ -0,0 +1,42 @@
1
+ # Tech Debt Tracker
2
+
3
+ General-purpose deferred-work queue. Review findings, cleanup tasks, improvement ideas — anything we want to address later but shouldn't block now. Any skill can append to this file.
4
+
5
+ Treat this file as append-and-update: do not delete historical rows unless duplicated by mistake. When status changes, update both the index table row and the detail entry.
6
+
7
+ ## Status Semantics
8
+
9
+ - `new`: captured, not yet scheduled.
10
+ - `queued`: prioritized for a future slug.
11
+ - `in_progress`: being addressed in an active plan.
12
+ - `resolved`: fixed, evidence linked.
13
+ - `wont_fix`: consciously accepted with documented rationale.
14
+
15
+ ## Index
16
+
17
+ | ID | Date | Priority | Source | Status | Summary |
18
+ |---|---|---|---|---|---|
19
+ | TD-2026-02-17-01 | 2026-02-17 | high | 2026-02-17-feat-submit-fogclaw-to-openclaw-plan | resolved | Define and document the canonical upstream PR path for external plugin submissions from non-fork plugin repos.
20
+ | TD-2026-02-17-02 | 2026-02-17 | medium | 2026-02-17-feat-submit-fogclaw-to-openclaw-plan | new | Track package scope/publish readiness (`@openclaw/fogclaw` visibility) separately from PR review progress.
21
+
22
+ ## Detail Entries
23
+
24
+ <!-- Append new entries below this line. -->
25
+
26
+ - **TD-2026-02-17-01**
27
+ - **Source:** initiative `docs/plans/active/2026-02-17-feat-submit-fogclaw-to-openclaw-plan.md`
28
+ - **Status:** resolved
29
+ - **Priority:** high
30
+ - **Owner:** sidmohan / OpenClaw intake coordination
31
+ - **Action:** Add and maintain the submission-runbook path so all future external plugin submissions use the same fork-first + forked PR pattern.
32
+ - **Evidence/Reference:** Created `DataFog/openclaw` fork and moved active PR to `openclaw/openclaw` PR #18791 from `DataFog:openclaw-upstream-submission`.
33
+ - **Rollback:** none; process doc update is now in place as docs-only.
34
+
35
+ - **TD-2026-02-17-02**
36
+ - **Source:** initiative `docs/plans/active/2026-02-17-feat-submit-fogclaw-to-openclaw-plan.md`
37
+ - **Status:** new
38
+ - **Priority:** medium
39
+ - **Owner:** sidmohan / OpenClaw release coordinators
40
+ - **Action:** Add release gate that confirms `npm view @openclaw/<plugin>` visibility before merge is finalized.
41
+ - **Evidence/Reference:** `npm view @openclaw/fogclaw version` currently returns E404 from this environment.
42
+ - **Rollback:** if scope changes, update entry to `resolved` with release evidence and PR link.