@datafog/fogclaw 0.1.0 → 0.1.2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"gliner.d.ts","sourceRoot":"","sources":["../../src/engines/gliner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAc1C,qBAAa,YAAY;IACvB,OAAO,CAAC,KAAK,CAAa;IAC1B,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,YAAY,CAAgB;IACpC,OAAO,CAAC,WAAW,CAAS;gBAEhB,SAAS,EAAE,MAAM,EAAE,SAAS,GAAE,MAAY;IAKhD,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAuBjC,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI;IAIjC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IA+BnE,IAAI,aAAa,IAAI,OAAO,CAE3B;CACF"}
1
+ {"version":3,"file":"gliner.d.ts","sourceRoot":"","sources":["../../src/engines/gliner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAc1C,qBAAa,YAAY;IACvB,OAAO,CAAC,KAAK,CAAa;IAC1B,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,YAAY,CAAgB;IACpC,OAAO,CAAC,WAAW,CAAS;gBAEhB,SAAS,EAAE,MAAM,EAAE,SAAS,GAAE,MAAY;IAKhD,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAwBjC,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI;IAIjC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IA+BnE,IAAI,aAAa,IAAI,OAAO,CAE3B;CACF"}
@@ -23,7 +23,8 @@ export class GlinerEngine {
23
23
  if (this.initialized)
24
24
  return;
25
25
  try {
26
- const { Gliner } = await import("gliner");
26
+ const glinerModule = await import("gliner/node").catch(async () => import("gliner"));
27
+ const { Gliner } = glinerModule;
27
28
  this.model = new Gliner({
28
29
  tokenizerPath: this.modelPath,
29
30
  onnxSettings: {
@@ -1 +1 @@
1
- {"version":3,"file":"gliner.js","sourceRoot":"","sources":["../../src/engines/gliner.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,kBAAkB,GAAG;IACzB,QAAQ;IACR,cAAc;IACd,UAAU;IACV,SAAS;IACT,eAAe;IACf,uBAAuB;IACvB,gBAAgB;IAChB,iBAAiB;CAClB,CAAC;AAEF,MAAM,OAAO,YAAY;IACf,KAAK,GAAQ,IAAI,CAAC;IAClB,SAAS,CAAS;IAClB,SAAS,CAAS;IAClB,YAAY,GAAa,EAAE,CAAC;IAC5B,WAAW,GAAG,KAAK,CAAC;IAE5B,YAAY,SAAiB,EAAE,YAAoB,GAAG;QACpD,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAED,KAAK,CAAC,UAAU;QACd,IAAI,IAAI,CAAC,WAAW;YAAE,OAAO;QAE7B,IAAI,CAAC;YACH,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,CAAC;YAC1C,IAAI,CAAC,KAAK,GAAG,IAAI,MAAM,CAAC;gBACtB,aAAa,EAAE,IAAI,CAAC,SAAS;gBAC7B,YAAY,EAAE;oBACZ,SAAS,EAAE,IAAI,CAAC,SAAS;oBACzB,iBAAiB,EAAE,KAAK;iBACzB;gBACD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AE,CAAC,CAAC,KAAK;YACd,GAAG,EAAE,CAAC,CAAC,GAAG;YACV,UAAU,EAAE,CAAC,CAAC,KAAK;YACnB,MAAM,EAAE,QAAiB;SAC1B,CAAC,CACH,CAAC;IACJ,CAAC;IAED,IAAI,aAAa;QACf,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;CACF"}
@@ -25,7 +25,10 @@ Users should be able to install and use FogClaw today from a DataFog-owned names
25
25
  - [x] (2026-02-17T18:54:00Z) P3 [M1] Updated `package-lock` metadata and refreshed scope for build/release artifacts.
26
26
  - [x] (2026-02-17T18:55:00Z) P4 [M2] Re-ran build/test/smoke + `npm pack --json` + `npm publish --dry-run` validations.
27
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).
28
+ - [ ] (2026-02-17T19:34:00Z) P5 [M2] Verify `openclaw plugins install @datafog/fogclaw` with live npm resolution (blocked until package is published).
29
+ - [x] (2026-02-17T19:27:00Z) P6 [M2] Fixed GLiNER startup blocker in Node by pinning `onnxruntime-web` to `1.21.0`, preventing `./webgpu` export resolution errors from `gliner` in OpenClaw install paths.
30
+ - [x] (2026-02-17T19:34:00Z) P6 [M2] Added direct `sharp` dependency `0.34.5` with an override to prevent optional sharp native install failure (`sharp-darwin-arm64v8.node` missing) during OpenClaw install-time dependency bootstrap.
31
+ - [ ] (2026-02-17T19:34:00Z) P6 [M3] Publish/ship this startup hardening update under `@datafog/fogclaw@0.1.2` after npm publish/auth is completed.
29
32
  - [ ] (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
33
  - [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
34
 
@@ -47,8 +50,10 @@ Users should be able to install and use FogClaw today from a DataFog-owned names
47
50
  - 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
51
  Evidence: CLI output from `openclaw plugins install @datafog/fogclaw` in current machine state.
49
52
 
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.
53
+ - Observation: GLiNER startup now avoids the `onnxruntime-web/webgpu` exports failure by pinning `onnxruntime-web` to 1.21.0, which has a Node-compatible `./webgpu` export path in this runtime.
54
+ Evidence: local `import('onnxruntime-web/webgpu')` succeeds after dependency pin, and OpenClaw install logs no longer show the subpath exports error.
55
+ - Observation: optional sharp runtime failures are now mitigated in clean install flows by pinning direct `sharp` 0.34.5; this removes the previously recurrent `Cannot find module '../build/Release/sharp-darwin-arm64v8.node'` warning in OpenClaw plugin install logs.
56
+ Evidence: `openclaw plugins install` from `datafog-fogclaw-0.1.2.tgz` clean runtime no longer emits that missing binary warning.
52
57
 
53
58
  ## Decision Log
54
59
 
@@ -79,7 +84,7 @@ Users should be able to install and use FogClaw today from a DataFog-owned names
79
84
  - `npm pack --json` and `npm publish --dry-run` now emit scoped package metadata under `@datafog/fogclaw`.
80
85
  - `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
86
  - `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.
87
+ - GLiNER startup now avoids the webgpu export resolution error after pinning `onnxruntime-web` to `1.21.0`; remaining startup behavior in this environment is currently a fallback when model backends are unavailable, with no further webgpu/export or sharp-missing warnings after dependency pinning.
83
88
 
84
89
 
85
90
  ## Context and Orientation
@@ -249,7 +254,7 @@ Expect:
249
254
  - Scope migration evidence:
250
255
 
251
256
  package: @datafog/fogclaw
252
- version: 0.1.0
257
+ version: 0.1.2
253
258
  `npm pkg get name` output: `"@datafog/fogclaw"`
254
259
  `npm pkg get openclaw` output:
255
260
  `{"extensions":["./dist/index.js"]}`
@@ -263,7 +268,7 @@ Expect:
263
268
  => `function fogclaw FogClaw`
264
269
 
265
270
  - Reproducibility evidence:
266
- - `npm pack --json` output includes `datafog-fogclaw-0.1.0.tgz` and `openclaw.plugin.json`/`dist/index.js` in file list.
271
+ - `npm pack --json` output includes `datafog-fogclaw-0.1.2.tgz` and `openclaw.plugin.json`/`dist/index.js` in file list.
267
272
  - `npm publish --dry-run` succeeded and produced scoped package manifest notice.
268
273
 
269
274
  - Installability evidence:
@@ -302,7 +307,7 @@ Expect:
302
307
  - date: 2026-02-17T19:08:00Z
303
308
  - open findings by priority (if any): pending
304
309
  - evidence:
305
- - installability in clean runtime succeeds for local `datafog-fogclaw-0.1.0.tgz` after tool-name registration fix
310
+ - installability in clean runtime succeeds for local `datafog-fogclaw-0.1.2.tgz` after tool-name registration and dependency-hardening fixes
306
311
  - scoped package install still returns registry 404 (not yet published)
307
312
  - rollback: revert to previous working scoped package state (or keep changes in branch) if publish credentials/visibility unavailable
308
313
  - post-release checks:
@@ -316,3 +321,4 @@ Expect:
316
321
  - 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
322
  - 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
323
  - 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`).
324
+ - 2026-02-17T19:34:00Z: Added explicit `sharp@0.34.5` dependency with override to avoid missing `sharp-darwin-arm64v8.node` crashes during OpenClaw dependency bootstrap; verified clean-plugin install no longer emits that optional native-module warning. Remaining GLiNER startup warnings are now backend-availability related in this environment, not sharp/webgpu export errors.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datafog/fogclaw",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "OpenClaw plugin for PII detection & custom entity redaction powered by DataFog",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -14,7 +14,9 @@
14
14
  },
15
15
  "dependencies": {
16
16
  "gliner": "^0.0.19",
17
- "onnxruntime-node": "1.19.2"
17
+ "onnxruntime-node": "1.19.2",
18
+ "onnxruntime-web": "1.21.0",
19
+ "sharp": "0.34.5"
18
20
  },
19
21
  "devDependencies": {
20
22
  "@types/node": "^22.0.0",
@@ -32,6 +34,10 @@
32
34
  "license": "MIT",
33
35
  "repository": {
34
36
  "type": "git",
35
- "url": "https://github.com/datafog/fogclaw"
37
+ "url": "git+https://github.com/datafog/fogclaw.git"
38
+ },
39
+ "overrides": {
40
+ "onnxruntime-web": "1.21.0",
41
+ "sharp": "0.34.5"
36
42
  }
37
43
  }
@@ -28,7 +28,8 @@ export class GlinerEngine {
28
28
  if (this.initialized) return;
29
29
 
30
30
  try {
31
- const { Gliner } = await import("gliner");
31
+ const glinerModule = await import("gliner/node").catch(async () => import("gliner"));
32
+ const { Gliner } = glinerModule;
32
33
  this.model = new Gliner({
33
34
  tokenizerPath: this.modelPath,
34
35
  onnxSettings: {