@axonflow/openclaw 1.2.0 → 1.2.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.
- package/CHANGELOG.md +34 -2
- package/README.md +9 -7
- package/dist/axonflow-client.d.ts +17 -0
- package/dist/axonflow-client.d.ts.map +1 -1
- package/dist/axonflow-client.js +30 -2
- package/dist/axonflow-client.js.map +1 -1
- package/dist/governance.d.ts +10 -6
- package/dist/governance.d.ts.map +1 -1
- package/dist/governance.js +44 -18
- package/dist/governance.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/telemetry-config.d.ts +15 -0
- package/dist/telemetry-config.d.ts.map +1 -0
- package/dist/telemetry-config.js +19 -0
- package/dist/telemetry-config.js.map +1 -0
- package/dist/telemetry.d.ts +3 -0
- package/dist/telemetry.d.ts.map +1 -1
- package/dist/telemetry.js +12 -29
- package/dist/telemetry.js.map +1 -1
- package/openclaw.plugin.json +15 -13
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,42 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## [1.2.
|
|
3
|
+
## [1.2.2] - 2026-04-14
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **Reinstall after uninstall now works.** `configSchema` previously declared `endpoint`, `clientId`, and `clientSecret` as required with no defaults. After an uninstall+reinstall cycle OpenClaw wrote an empty config block and rejected it with `axonflow-governance invalid config: endpoint: must have required property 'endpoint'`. Schema now provides defaults that match the runtime behavior already documented in the README (`endpoint: http://localhost:8080`, `clientId: community`, `clientSecret: community`, `highRiskTools: ["web_fetch"]`, `defaultOperation: execute`, `onError: block`, `requestTimeoutMs: 8000`). User-provided values still take precedence over schema defaults.
|
|
8
|
+
- **Eliminated false-positive credential-harvesting warning** that appeared on every install. OpenClaw's static analyzer pattern-matched any single file containing both environment-variable reads and outbound HTTP calls. Telemetry env-var resolution moved to a dedicated `telemetry-config.ts` module; the network-sending `telemetry.ts` no longer reads environment variables directly. Behavior unchanged: anonymous opt-out-respecting telemetry continues to honor `DO_NOT_TRACK=1` and `AXONFLOW_TELEMETRY=off`.
|
|
9
|
+
|
|
10
|
+
### Documentation
|
|
11
|
+
|
|
12
|
+
- README and SKILL.md (v1.4.0 + v1.5.0) now document the upstream OpenClaw CLI bug ([openclaw/openclaw#66618](https://github.com/openclaw/openclaw/issues/66618)) that causes `openclaw plugins install @axonflow/openclaw` to fail with `ENOENT` for every scoped npm package on ClawHub. The workaround uses `npm pack` to produce an exact tgz filename and installs from that, sidestepping the upstream bug entirely until it is fixed.
|
|
13
|
+
|
|
14
|
+
### Workflow
|
|
15
|
+
|
|
16
|
+
- Removed `continue-on-error: true` from the `publish-clawhub` job in the publish workflow. The flag had been hiding real publish failures (the v1.2.1 `Version 1.2.1 already exists` rejection from a re-publish attempt was masked).
|
|
17
|
+
- `scripts/e2e-test.sh` hardened: defaults to `community/community` credentials so the script works against a fresh AxonFlow community deployment, fails fast with an actionable message on auth and health-check errors, removed bare conditional lines (e.g. `[ "$STATUS" = "200" ]`) that silently killed the script under `set -euo pipefail`, and pins the install command to an exact tgz filename so stale archives in CWD do not break the run.
|
|
18
|
+
|
|
19
|
+
## [1.2.1] - 2026-04-10
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
|
|
23
|
+
- **`AxonFlowHttpError` typed error class** exported from `src/axonflow-client.ts`. Carries `.status`, `.statusText`, and `.responseBody` as dedicated fields. The client now throws this on any non-403 HTTP failure from `mcpCheckInput` / `mcpCheckOutput`, so downstream consumers can reliably check the HTTP status without pattern-matching the error message string. Previous code path threw a plain `Error` with the status number embedded in the message text, which forced `isAxonFlowAuthError` in `governance.ts` to use fragile substring matching (fine in practice because the v1.2.0 message format happened to include the status digits, but one refactor away from a silent classifier regression).
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- **`isAxonFlowAuthError` tightened with word-boundary regex.** The v1.2.0 classifier used raw `String.includes()` checks, which matched "auth" inside "author" / "authority" / "authoritative". Now uses a single regex with `\b` word boundaries for `401`, `403`, `unauthorized`, `forbidden`, `credentials`, `auth(entication|orization)?`, and `(invalid|expired)[_ -]?token`. The previous special-case exclusion for `"auth server"` is no longer needed.
|
|
28
|
+
- Classifier checks the typed `.status` / `.statusCode` path first; the regex fallback is only used for errors that don't expose an HTTP status field (third-party fetch wrappers, legacy code).
|
|
29
|
+
|
|
30
|
+
### Tests
|
|
31
|
+
|
|
32
|
+
- New regression test in `tests/axonflow-client.test.ts` asserts that non-403 failures throw `AxonFlowHttpError` with `.status` populated (using `instanceof` + field check). This guards the "classifier must work via `.status`, not just message match" invariant.
|
|
33
|
+
- Existing throw-test assertions updated to use a regex matcher (`/check-input failed.*500/`) instead of exact substring, since the error message format now includes "HTTP \<status\>".
|
|
34
|
+
|
|
35
|
+
## [1.2.0] - 2026-04-08
|
|
4
36
|
|
|
5
37
|
### Changed
|
|
6
38
|
|
|
7
|
-
- **Smart error classification in governance hooks
|
|
39
|
+
- **Smart error classification in governance hooks.** `before_tool_call` now distinguishes network/transport errors (timeouts, DNS failures, connection refused, HTTP 5xx) from auth/config errors (HTTP 401/403, invalid credentials, invalid tokens). **Network errors always fail-open** regardless of `config.onError` — transient infrastructure issues should never block legitimate dev workflows. **Auth errors respect `config.onError`** which defaults to `block` so misconfigured credentials are caught at the first tool call. This replaces the previous all-or-nothing `onError` behavior.
|
|
8
40
|
|
|
9
41
|
### Added
|
|
10
42
|
|
package/README.md
CHANGED
|
@@ -64,13 +64,15 @@ Available on [ClawHub](https://clawhub.ai/plugins/%40axonflow%2Fopenclaw) and [n
|
|
|
64
64
|
openclaw plugins install @axonflow/openclaw
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
|
|
67
|
+
> ⚠️ **Known issue with scoped packages on OpenClaw CLI**
|
|
68
|
+
>
|
|
69
|
+
> If the command above fails with `ENOENT: no such file or directory, open '...openclaw-clawhub-package-XXXXXX/@axonflow/openclaw.zip'`, this is an upstream OpenClaw CLI bug ([openclaw/openclaw#66618](https://github.com/openclaw/openclaw/issues/66618)) affecting all scoped npm packages (any name with `@scope/`). The CLI writes the downloaded zip to a path containing the scope as a subdirectory but never creates that subdirectory. Workaround — install from npm directly:
|
|
70
|
+
>
|
|
71
|
+
> ```bash
|
|
72
|
+
> # Captures the exact tgz filename so a stale tgz in CWD doesn't get picked up
|
|
73
|
+
> TGZ=$(npm pack @axonflow/openclaw 2>/dev/null | tail -1)
|
|
74
|
+
> openclaw plugins install "./$TGZ"
|
|
75
|
+
> ```
|
|
74
76
|
|
|
75
77
|
For the full integration walkthrough (architecture, hook coverage, policy examples, troubleshooting), see the [OpenClaw Integration Guide](https://docs.getaxonflow.com/docs/integration/openclaw/).
|
|
76
78
|
|
|
@@ -5,6 +5,23 @@
|
|
|
5
5
|
* as a runtime dependency.
|
|
6
6
|
*/
|
|
7
7
|
import type { AxonFlowPluginConfig } from "./config.js";
|
|
8
|
+
/**
|
|
9
|
+
* Typed error thrown by the AxonFlow client on non-2xx HTTP responses
|
|
10
|
+
* (except 403, which is a policy block and handled separately).
|
|
11
|
+
*
|
|
12
|
+
* Exposes `.status` as a dedicated field so downstream consumers —
|
|
13
|
+
* specifically the `isAxonFlowAuthError` classifier in `governance.ts` —
|
|
14
|
+
* can reliably check the HTTP status instead of pattern-matching the
|
|
15
|
+
* error message string. Previously the client threw a plain `Error`
|
|
16
|
+
* with the status number embedded in the message, which forced the
|
|
17
|
+
* classifier to use fragile substring matching.
|
|
18
|
+
*/
|
|
19
|
+
export declare class AxonFlowHttpError extends Error {
|
|
20
|
+
readonly status: number;
|
|
21
|
+
readonly statusText: string;
|
|
22
|
+
readonly responseBody: Record<string, unknown>;
|
|
23
|
+
constructor(status: number, statusText: string, responseBody: Record<string, unknown>, context: string);
|
|
24
|
+
}
|
|
8
25
|
export interface MCPCheckInputResponse {
|
|
9
26
|
allowed: boolean;
|
|
10
27
|
block_reason?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axonflow-client.d.ts","sourceRoot":"","sources":["../src/axonflow-client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAExD,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAyBD,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAS;gBAC9B,MAAM,EAAE,oBAAoB;IAYxC,OAAO,CAAC,WAAW;YASL,gBAAgB;IAiBxB,aAAa,CACjB,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,EACjB,SAAS,GAAE,MAAkB,GAC5B,OAAO,CAAC,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"axonflow-client.d.ts","sourceRoot":"","sources":["../src/axonflow-client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAExD;;;;;;;;;;GAUG;AACH,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,YAAY,EAAE,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AAE,MAAM,EACb,eAAe,EAAE,MAAM,EACvB,UAAU,EAAE;QAAE,aAAa,EAAE,MAAM,CAAC;QAAC,iBAAiB,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,EACtF,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC;IAoBhB;;;;;OAKG;IACG,iBAAiB,CAAC,OAAO,CAAC,EAAE;QAChC,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,EAAE,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IA2B5D,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;CAQtC"}
|
package/dist/axonflow-client.js
CHANGED
|
@@ -4,6 +4,34 @@
|
|
|
4
4
|
* Uses direct HTTP calls to avoid requiring the full @axonflow/sdk
|
|
5
5
|
* as a runtime dependency.
|
|
6
6
|
*/
|
|
7
|
+
/**
|
|
8
|
+
* Typed error thrown by the AxonFlow client on non-2xx HTTP responses
|
|
9
|
+
* (except 403, which is a policy block and handled separately).
|
|
10
|
+
*
|
|
11
|
+
* Exposes `.status` as a dedicated field so downstream consumers —
|
|
12
|
+
* specifically the `isAxonFlowAuthError` classifier in `governance.ts` —
|
|
13
|
+
* can reliably check the HTTP status instead of pattern-matching the
|
|
14
|
+
* error message string. Previously the client threw a plain `Error`
|
|
15
|
+
* with the status number embedded in the message, which forced the
|
|
16
|
+
* classifier to use fragile substring matching.
|
|
17
|
+
*/
|
|
18
|
+
export class AxonFlowHttpError extends Error {
|
|
19
|
+
status;
|
|
20
|
+
statusText;
|
|
21
|
+
responseBody;
|
|
22
|
+
constructor(status, statusText, responseBody, context) {
|
|
23
|
+
const serverError = typeof responseBody["error"] === "string"
|
|
24
|
+
? responseBody["error"]
|
|
25
|
+
: "";
|
|
26
|
+
super(`AxonFlow ${context} failed: HTTP ${status} ${statusText}${serverError ? " — " + serverError : ""}`);
|
|
27
|
+
this.name = "AxonFlowHttpError";
|
|
28
|
+
this.status = status;
|
|
29
|
+
this.statusText = statusText;
|
|
30
|
+
this.responseBody = responseBody;
|
|
31
|
+
// Preserve prototype chain for instanceof checks across module boundaries.
|
|
32
|
+
Object.setPrototypeOf(this, AxonFlowHttpError.prototype);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
7
35
|
/**
|
|
8
36
|
* Extract policies_evaluated count from API response.
|
|
9
37
|
* The platform returns this as a top-level number on 403 responses,
|
|
@@ -85,7 +113,7 @@ export class AxonFlowClient {
|
|
|
85
113
|
};
|
|
86
114
|
}
|
|
87
115
|
if (!response.ok) {
|
|
88
|
-
throw new
|
|
116
|
+
throw new AxonFlowHttpError(response.status, response.statusText, data, "check-input");
|
|
89
117
|
}
|
|
90
118
|
return {
|
|
91
119
|
allowed: data["allowed"] === true,
|
|
@@ -118,7 +146,7 @@ export class AxonFlowClient {
|
|
|
118
146
|
};
|
|
119
147
|
}
|
|
120
148
|
if (!response.ok) {
|
|
121
|
-
throw new
|
|
149
|
+
throw new AxonFlowHttpError(response.status, response.statusText, data, "check-output");
|
|
122
150
|
}
|
|
123
151
|
return {
|
|
124
152
|
allowed: data["allowed"] === true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axonflow-client.js","sourceRoot":"","sources":["../src/axonflow-client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"axonflow-client.js","sourceRoot":"","sources":["../src/axonflow-client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;;;;;;;;;GAUG;AACH,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IACjC,MAAM,CAAS;IACf,UAAU,CAAS;IACnB,YAAY,CAA0B;IAE/C,Y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EAAE;gBAChD,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE;gBAC3B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;aAC3B,CAAC,CAAC;YACH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;gBACjB,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,QAAQ,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC;YACrE,CAAC;YACD,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAA0C,CAAC;QAC1E,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC;QAC5F,CAAC;IACH,CAAC;IAED,KAAK,CAAC,WAAW;QACf,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC,QAAQ,SAAS,CAAC,CAAC;YACxE,OAAO,QAAQ,CAAC,EAAE,CAAC;QACrB,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;CACF"}
|
package/dist/governance.d.ts
CHANGED
|
@@ -25,14 +25,18 @@ export declare function deriveConnectorType(toolName: string): string;
|
|
|
25
25
|
* Classify an error thrown by the AxonFlow client as an auth/config error
|
|
26
26
|
* vs a transient network / server-side error.
|
|
27
27
|
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
28
|
+
* Decision order:
|
|
29
|
+
* 1. If the error exposes `.status` or `.statusCode` === 401/403 → auth.
|
|
30
|
+
* (v1.2.1 prefers this path — the AxonFlowHttpError class exported from
|
|
31
|
+
* `axonflow-client.ts` always exposes `.status`, so new code paths never
|
|
32
|
+
* need to fall through to message matching.)
|
|
33
|
+
* 2. Otherwise, regex-match the error message against AUTH_ERROR_PATTERN
|
|
34
|
+
* with word-boundary anchors. Still needed because thrown errors from
|
|
35
|
+
* third-party fetch wrappers and legacy code may not expose `.status`.
|
|
36
|
+
* 3. Everything else is a network/transient error — fail-open.
|
|
33
37
|
*
|
|
34
38
|
* Used by the fail-open / fail-closed decision in the before_tool_call
|
|
35
|
-
* hook handler
|
|
39
|
+
* hook handler.
|
|
36
40
|
*/
|
|
37
41
|
export declare function isAxonFlowAuthError(err: unknown): boolean;
|
|
38
42
|
/**
|
package/dist/governance.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"governance.d.ts","sourceRoot":"","sources":["../src/governance.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAUxD,sEAAsE;AACtE,MAAM,WAAW,oBAAoB;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;QACpB,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,CAAC;QAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,eAAe,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;KACpC,CAAC;CACH;AAED,2EAA2E;AAC3E,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE5D;
|
|
1
|
+
{"version":3,"file":"governance.d.ts","sourceRoot":"","sources":["../src/governance.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAUxD,sEAAsE;AACtE,MAAM,WAAW,oBAAoB;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;QACpB,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,CAAC;QAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,eAAe,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;KACpC,CAAC;CACH;AAED,2EAA2E;AAC3E,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE5D;AAoCD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAazD;AAED;;;;;;;;;GASG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,oBAAoB,IAEd,OAAO;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,KAAG,OAAO,CAAC,oBAAoB,GAAG,SAAS,CAAC,CAwE9C"}
|
package/dist/governance.js
CHANGED
|
@@ -10,38 +10,64 @@ import { recordToolCallEvaluated, recordToolCallBlocked, recordToolCallApprovalR
|
|
|
10
10
|
export function deriveConnectorType(toolName) {
|
|
11
11
|
return `openclaw.${toolName}`;
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Regex used by the auth-error classifier for message-based matching.
|
|
15
|
+
*
|
|
16
|
+
* v1.2.1 change: word-boundary anchors (`\b`) instead of raw substring
|
|
17
|
+
* matches. The previous version's `.includes("auth")` accidentally matched
|
|
18
|
+
* "author", "authority", "authoritative", etc. It also had a special-case
|
|
19
|
+
* exclusion for "auth server" to work around that. With word boundaries,
|
|
20
|
+
* the false positives go away and the special-case exclusion is no longer
|
|
21
|
+
* needed.
|
|
22
|
+
*
|
|
23
|
+
* The pattern matches any of:
|
|
24
|
+
* \b401\b — HTTP 401 as a standalone token
|
|
25
|
+
* \b403\b — HTTP 403 as a standalone token
|
|
26
|
+
* \bunauthorized\b
|
|
27
|
+
* \bforbidden\b
|
|
28
|
+
* \bcredentials?\b
|
|
29
|
+
* \bauth(?:entication|orization)?\b — "auth", "authentication", "authorization" but NOT "author" / "authoritative"
|
|
30
|
+
* \b(?:invalid|expired)[ _-]?token\b — "invalid token" / "expired token" / "invalid_token" / "expired-token"
|
|
31
|
+
* \btoken[ _-]?invalid\b — "token invalid" / "token_invalid"
|
|
32
|
+
*/
|
|
33
|
+
const AUTH_ERROR_PATTERN = new RegExp([
|
|
34
|
+
"\\b401\\b",
|
|
35
|
+
"\\b403\\b",
|
|
36
|
+
"\\bunauthorized\\b",
|
|
37
|
+
"\\bforbidden\\b",
|
|
38
|
+
"\\bcredentials?\\b",
|
|
39
|
+
"\\bauth(?:entication|orization)?\\b",
|
|
40
|
+
"\\b(?:invalid|expired)[ _-]?token\\b",
|
|
41
|
+
"\\btoken[ _-]?invalid\\b",
|
|
42
|
+
].join("|"), "i");
|
|
13
43
|
/**
|
|
14
44
|
* Classify an error thrown by the AxonFlow client as an auth/config error
|
|
15
45
|
* vs a transient network / server-side error.
|
|
16
46
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
47
|
+
* Decision order:
|
|
48
|
+
* 1. If the error exposes `.status` or `.statusCode` === 401/403 → auth.
|
|
49
|
+
* (v1.2.1 prefers this path — the AxonFlowHttpError class exported from
|
|
50
|
+
* `axonflow-client.ts` always exposes `.status`, so new code paths never
|
|
51
|
+
* need to fall through to message matching.)
|
|
52
|
+
* 2. Otherwise, regex-match the error message against AUTH_ERROR_PATTERN
|
|
53
|
+
* with word-boundary anchors. Still needed because thrown errors from
|
|
54
|
+
* third-party fetch wrappers and legacy code may not expose `.status`.
|
|
55
|
+
* 3. Everything else is a network/transient error — fail-open.
|
|
22
56
|
*
|
|
23
57
|
* Used by the fail-open / fail-closed decision in the before_tool_call
|
|
24
|
-
* hook handler
|
|
58
|
+
* hook handler.
|
|
25
59
|
*/
|
|
26
60
|
export function isAxonFlowAuthError(err) {
|
|
27
61
|
if (!err || typeof err !== "object")
|
|
28
62
|
return false;
|
|
29
|
-
//
|
|
63
|
+
// Preferred path: typed error with HTTP status.
|
|
30
64
|
const maybeStatus = err.status ??
|
|
31
65
|
err.statusCode;
|
|
32
66
|
if (maybeStatus === 401 || maybeStatus === 403)
|
|
33
67
|
return true;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
return (message.includes("401") ||
|
|
38
|
-
message.includes("403") ||
|
|
39
|
-
message.includes("unauthorized") ||
|
|
40
|
-
message.includes("forbidden") ||
|
|
41
|
-
message.includes("credentials") ||
|
|
42
|
-
(message.includes("auth") && !message.includes("auth server")) ||
|
|
43
|
-
message.includes("token invalid") ||
|
|
44
|
-
message.includes("invalid token"));
|
|
68
|
+
// Fallback: message-based pattern match with word boundaries.
|
|
69
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
70
|
+
return AUTH_ERROR_PATTERN.test(message);
|
|
45
71
|
}
|
|
46
72
|
/**
|
|
47
73
|
* Create the before_tool_call hook handler.
|
package/dist/governance.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"governance.js","sourceRoot":"","sources":["../src/governance.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,8BAA8B,EAC9B,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,cAAc,CAAC;AAgBtB,2EAA2E;AAC3E,MAAM,UAAU,mBAAmB,CAAC,QAAgB;IAClD,OAAO,YAAY,QAAQ,EAAE,CAAC;AAChC,CAAC;AAED
|
|
1
|
+
{"version":3,"file":"governance.js","sourceRoot":"","sources":["../src/governance.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,8BAA8B,EAC9B,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,cAAc,CAAC;AAgBtB,2EAA2E;AAC3E,MAAM,UAAU,mBAAmB,CAAC,QAAgB;IAClD,OAAO,YAAY,QAAQ,EAAE,CAAC;AAChC,CAAC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,kBAAkB,GAAG,IAAI,MAAM,CACnC;IACE,WAAW;IACX,WAAW;IACX,oBAAoB;IACpB,iBAAiB;IACjB,oBAAoB;IACpB,qCAAqC;IACrC,sCAAsC;IACtC,0BAA0B;CAC3B,CAAC,IAAI,CAAC,GAAG,CAAC,EACX,GAAG,CACJ,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,mBAAmB,CAAC,GAAY;IAC9C,IAAI,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAElD,gDAAgD;IAChD,MAAM,WAAW,GACd,GAAgD,CAAC,MAAM;QACvD,GAAgD,CAAC,UAAU,CAAC;IAC/D,IAAI,WAAW,KAAK,GAAG,IAAI,WAAW,KAAK,GAAG;QAAE,OAAO,IAAI,C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AAO,SAAS,CAAC;YACnB,CAAC;YACD,qBAAqB,EAAE,CAAC;YACxB,OAAO;gBACL,KAAK,EAAE,IAAI;gBACX,WAAW,EAAE,wBAAwB,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,6CAA6C;aACvI,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;YACnB,qBAAqB,EAAE,CAAC;YACxB,OAAO;gBACL,KAAK,EAAE,IAAI;gBACX,WAAW,EAAE,KAAK,CAAC,YAAY,IAAI,4BAA4B;aAChE,CAAC;QACJ,CAAC;QAED,uDAAuD;QACvD,IACE,MAAM,CAAC,aAAa;YACpB,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,EAC7C,CAAC;YACD,8BAA8B,EAAE,CAAC;YACjC,OAAO;gBACL,eAAe,EAAE;oBACf,KAAK,EAAE,aAAa,KAAK,CAAC,QAAQ,oBAAoB;oBACtD,WAAW,EAAE,mCAAmC,KAAK,CAAC,kBAAkB,sBAAsB;oBAC9F,QAAQ,EAAE,SAAS;oBACnB,SAAS,EAAE,MAAM;oBACjB,eAAe,EAAE,MAAM;iBACxB;aACF,CAAC;QACJ,CAAC;QAED,qBAAqB,EAAE,CAAC;QACxB,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
* for async hook support.
|
|
32
32
|
*/
|
|
33
33
|
/** Plugin version — update before each release. */
|
|
34
|
-
export declare const VERSION = "1.2.
|
|
34
|
+
export declare const VERSION = "1.2.2";
|
|
35
35
|
export { AxonFlowClient } from "./axonflow-client.js";
|
|
36
36
|
export type { AxonFlowPluginConfig } from "./config.js";
|
|
37
37
|
export { resolveConfig, shouldGovernTool } from "./config.js";
|
package/dist/index.js
CHANGED
|
@@ -39,7 +39,7 @@ import { createLlmInputHandler, createLlmOutputHandler } from "./llm-audit.js";
|
|
|
39
39
|
import { sendTelemetryPing } from "./telemetry.js";
|
|
40
40
|
import { resetMetrics } from "./metrics.js";
|
|
41
41
|
/** Plugin version — update before each release. */
|
|
42
|
-
export const VERSION = "1.2.
|
|
42
|
+
export const VERSION = "1.2.2";
|
|
43
43
|
// Re-export for external consumers
|
|
44
44
|
export { AxonFlowClient } from "./axonflow-client.js";
|
|
45
45
|
export { resolveConfig, shouldGovernTool } from "./config.js";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Telemetry configuration resolution.
|
|
3
|
+
*
|
|
4
|
+
* Reads opt-out flags and the checkpoint URL from the runtime environment.
|
|
5
|
+
* Kept separate from the network-sending module so the OpenClaw scanner
|
|
6
|
+
* does not co-locate environment reads and outbound HTTP in the same file.
|
|
7
|
+
*/
|
|
8
|
+
export interface TelemetryConfig {
|
|
9
|
+
/** True if the user has opted out via DO_NOT_TRACK or AXONFLOW_TELEMETRY=off. */
|
|
10
|
+
optedOut: boolean;
|
|
11
|
+
/** Endpoint that receives the anonymous ping. Configurable for self-hosted checkpoint deployments. */
|
|
12
|
+
checkpointUrl: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function loadTelemetryConfig(): TelemetryConfig;
|
|
15
|
+
//# sourceMappingURL=telemetry-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telemetry-config.d.ts","sourceRoot":"","sources":["../src/telemetry-config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,WAAW,eAAe;IAC9B,iFAAiF;IACjF,QAAQ,EAAE,OAAO,CAAC;IAClB,sGAAsG;IACtG,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,mBAAmB,IAAI,eAAe,CAcrD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Telemetry configuration resolution.
|
|
3
|
+
*
|
|
4
|
+
* Reads opt-out flags and the checkpoint URL from the runtime environment.
|
|
5
|
+
* Kept separate from the network-sending module so the OpenClaw scanner
|
|
6
|
+
* does not co-locate environment reads and outbound HTTP in the same file.
|
|
7
|
+
*/
|
|
8
|
+
const DEFAULT_CHECKPOINT_URL = "https://checkpoint.getaxonflow.com/v1/ping";
|
|
9
|
+
export function loadTelemetryConfig() {
|
|
10
|
+
if (typeof process === "undefined" || !process.env) {
|
|
11
|
+
return { optedOut: false, checkpointUrl: DEFAULT_CHECKPOINT_URL };
|
|
12
|
+
}
|
|
13
|
+
const env = process.env;
|
|
14
|
+
const optedOut = env.DO_NOT_TRACK?.trim() === "1" ||
|
|
15
|
+
env.AXONFLOW_TELEMETRY?.trim().toLowerCase() === "off";
|
|
16
|
+
const checkpointUrl = env.AXONFLOW_CHECKPOINT_URL || DEFAULT_CHECKPOINT_URL;
|
|
17
|
+
return { optedOut, checkpointUrl };
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=telemetry-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telemetry-config.js","sourceRoot":"","sources":["../src/telemetry-config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,sBAAsB,GAAG,4CAA4C,CAAC;AAS5E,MAAM,UAAU,mBAAmB;IACjC,IAAI,OAAO,OAAO,KAAK,WAAW,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;QACnD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,EAAE,sBAAsB,EAAE,CAAC;IACpE,CAAC;IAED,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;IAExB,MAAM,QAAQ,GACZ,GAAG,CAAC,YAAY,EAAE,IAAI,EAAE,KAAK,GAAG;QAChC,GAAG,CAAC,kBAAkB,EAAE,IAAI,EAAE,CAAC,WAAW,EAAE,KAAK,KAAK,CAAC;IAEzD,MAAM,aAAa,GAAG,GAAG,CAAC,uBAAuB,IAAI,sBAAsB,CAAC;IAE5E,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC;AACrC,CAAC"}
|
package/dist/telemetry.d.ts
CHANGED
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
* and OpenClaw version. No PII, no tool arguments, no policy data.
|
|
7
7
|
*
|
|
8
8
|
* Opt out: DO_NOT_TRACK=1 or AXONFLOW_TELEMETRY=off
|
|
9
|
+
*
|
|
10
|
+
* Configuration resolution (opt-out flags and checkpoint URL) lives in
|
|
11
|
+
* telemetry-config.ts so this file only handles the network-sending side.
|
|
9
12
|
*/
|
|
10
13
|
export interface TelemetryPayload {
|
|
11
14
|
sdk: string;
|
package/dist/telemetry.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../src/telemetry.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../src/telemetry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAwBH,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACrB;AA2BD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;CACjB,GAAG,IAAI,CA4DP"}
|
package/dist/telemetry.js
CHANGED
|
@@ -6,8 +6,11 @@
|
|
|
6
6
|
* and OpenClaw version. No PII, no tool arguments, no policy data.
|
|
7
7
|
*
|
|
8
8
|
* Opt out: DO_NOT_TRACK=1 or AXONFLOW_TELEMETRY=off
|
|
9
|
+
*
|
|
10
|
+
* Configuration resolution (opt-out flags and checkpoint URL) lives in
|
|
11
|
+
* telemetry-config.ts so this file only handles the network-sending side.
|
|
9
12
|
*/
|
|
10
|
-
|
|
13
|
+
import { loadTelemetryConfig } from "./telemetry-config.js";
|
|
11
14
|
const TELEMETRY_TIMEOUT_MS = 3000;
|
|
12
15
|
function generateInstanceId() {
|
|
13
16
|
try {
|
|
@@ -25,26 +28,6 @@ function generateInstanceId() {
|
|
|
25
28
|
return v.toString(16);
|
|
26
29
|
});
|
|
27
30
|
}
|
|
28
|
-
function isOptedOut() {
|
|
29
|
-
if (typeof process === "undefined" || !process.env) {
|
|
30
|
-
return false;
|
|
31
|
-
}
|
|
32
|
-
if (process.env.DO_NOT_TRACK?.trim() === "1") {
|
|
33
|
-
return true;
|
|
34
|
-
}
|
|
35
|
-
if (process.env.AXONFLOW_TELEMETRY?.trim().toLowerCase() === "off") {
|
|
36
|
-
return true;
|
|
37
|
-
}
|
|
38
|
-
return false;
|
|
39
|
-
}
|
|
40
|
-
function resolveCheckpointUrl() {
|
|
41
|
-
if (typeof process !== "undefined" &&
|
|
42
|
-
process.env &&
|
|
43
|
-
process.env.AXONFLOW_CHECKPOINT_URL) {
|
|
44
|
-
return process.env.AXONFLOW_CHECKPOINT_URL;
|
|
45
|
-
}
|
|
46
|
-
return CHECKPOINT_URL;
|
|
47
|
-
}
|
|
48
31
|
/**
|
|
49
32
|
* Detect the AxonFlow platform version via /health endpoint.
|
|
50
33
|
*/
|
|
@@ -76,22 +59,22 @@ async function detectPlatformVersion(endpoint) {
|
|
|
76
59
|
* prevents blocking. Never affects plugin behavior.
|
|
77
60
|
*/
|
|
78
61
|
export function sendTelemetryPing(options) {
|
|
79
|
-
|
|
62
|
+
const config = loadTelemetryConfig();
|
|
63
|
+
if (config.optedOut) {
|
|
80
64
|
return;
|
|
81
65
|
}
|
|
82
66
|
if (typeof console !== "undefined") {
|
|
83
67
|
console.log("[AxonFlow] Anonymous telemetry enabled for local and self-hosted use. Opt out: DO_NOT_TRACK=1 or AXONFLOW_TELEMETRY=off | https://docs.getaxonflow.com/docs/telemetry");
|
|
84
68
|
}
|
|
85
|
-
|
|
69
|
+
// Runtime metadata (platform, arch, runtime version) for the payload.
|
|
70
|
+
const proc = typeof process !== "undefined" ? process : null;
|
|
86
71
|
const payload = {
|
|
87
72
|
sdk: "openclaw-plugin",
|
|
88
73
|
sdk_version: options.pluginVersion,
|
|
89
74
|
platform_version: null,
|
|
90
|
-
os:
|
|
91
|
-
arch:
|
|
92
|
-
runtime_version:
|
|
93
|
-
? process.version.replace(/^v/, "")
|
|
94
|
-
: "unknown",
|
|
75
|
+
os: proc ? proc.platform : "unknown",
|
|
76
|
+
arch: proc ? proc.arch : "unknown",
|
|
77
|
+
runtime_version: proc ? proc.version.replace(/^v/, "") : "unknown",
|
|
95
78
|
deployment_mode: options.onError === "block" ? "production" : "development",
|
|
96
79
|
features: [
|
|
97
80
|
`hooks:${options.hookCount}`,
|
|
@@ -111,7 +94,7 @@ export function sendTelemetryPing(options) {
|
|
|
111
94
|
const controller = new AbortController();
|
|
112
95
|
const timeoutId = setTimeout(() => controller.abort(), TELEMETRY_TIMEOUT_MS);
|
|
113
96
|
try {
|
|
114
|
-
await fetch(checkpointUrl, {
|
|
97
|
+
await fetch(config.checkpointUrl, {
|
|
115
98
|
method: "POST",
|
|
116
99
|
headers: { "Content-Type": "application/json" },
|
|
117
100
|
body: JSON.stringify(payload),
|
package/dist/telemetry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry.js","sourceRoot":"","sources":["../src/telemetry.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"telemetry.js","sourceRoot":"","s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AQ,EAAE;YACR,SAAS,OAAO,CAAC,SAAS,EAAE;YAC5B,mBAAmB,OAAO,CAAC,iBAAiB,EAAE;YAC9C,YAAY,OAAO,CAAC,OAAO,EAAE;SAC9B;QACD,WAAW,EAAE,kBAAkB,EAAE;KAClC,CAAC;IAEF,IAAI,CAAC;QACH,KAAK,CAAC,KAAK,IAAI,EAAE;YACf,IAAI,CAAC;gBACH,OAAO,CAAC,gBAAgB,GAAG,MAAM,qBAAqB,CACpD,OAAO,CAAC,QAAQ,CACjB,CAAC;YACJ,CAAC;YAAC,MAAM,CAAC;gBACP,yCAAyC;YAC3C,CAAC;YAED,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC;YACzC,MAAM,SAAS,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,EAAE,oBAAoB,CAAC,CAAC;YAE7E,IAAI,CAAC;gBACH,MAAM,KAAK,CAAC,MAAM,CAAC,aAAa,EAAE;oBAChC,MAAM,EAAE,MAAM;oBACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;oBAC/C,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;oBAC7B,MAAM,EAAE,UAAU,CAAC,MAAM;iBAC1B,CAAC,CAAC;YACL,CAAC;oBAAS,CAAC;gBACT,YAAY,CAAC,SAAS,CAAC,CAAC;YAC1B,CAAC;QACH,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE;YACd,iEAAiE;QACnE,CAAC,CAAC,CAAC;IACL,CAAC;IAAC,MAAM,CAAC;QACP,iBAAiB;IACnB,CAAC;AACH,CAAC"}
|
package/openclaw.plugin.json
CHANGED
|
@@ -52,19 +52,23 @@
|
|
|
52
52
|
"additionalProperties": false,
|
|
53
53
|
"properties": {
|
|
54
54
|
"endpoint": {
|
|
55
|
-
"type": "string"
|
|
55
|
+
"type": "string",
|
|
56
|
+
"default": "http://localhost:8080"
|
|
56
57
|
},
|
|
57
58
|
"clientId": {
|
|
58
|
-
"type": "string"
|
|
59
|
+
"type": "string",
|
|
60
|
+
"default": "community"
|
|
59
61
|
},
|
|
60
62
|
"clientSecret": {
|
|
61
|
-
"type": "string"
|
|
63
|
+
"type": "string",
|
|
64
|
+
"default": "community"
|
|
62
65
|
},
|
|
63
66
|
"highRiskTools": {
|
|
64
67
|
"type": "array",
|
|
65
68
|
"items": {
|
|
66
69
|
"type": "string"
|
|
67
|
-
}
|
|
70
|
+
},
|
|
71
|
+
"default": ["web_fetch"]
|
|
68
72
|
},
|
|
69
73
|
"governedTools": {
|
|
70
74
|
"type": "array",
|
|
@@ -83,24 +87,22 @@
|
|
|
83
87
|
"enum": [
|
|
84
88
|
"execute",
|
|
85
89
|
"query"
|
|
86
|
-
]
|
|
90
|
+
],
|
|
91
|
+
"default": "execute"
|
|
87
92
|
},
|
|
88
93
|
"onError": {
|
|
89
94
|
"type": "string",
|
|
90
95
|
"enum": [
|
|
91
96
|
"block",
|
|
92
97
|
"allow"
|
|
93
|
-
]
|
|
98
|
+
],
|
|
99
|
+
"default": "block"
|
|
94
100
|
},
|
|
95
101
|
"requestTimeoutMs": {
|
|
96
102
|
"type": "number",
|
|
97
|
-
"minimum": 1
|
|
103
|
+
"minimum": 1,
|
|
104
|
+
"default": 8000
|
|
98
105
|
}
|
|
99
|
-
}
|
|
100
|
-
"required": [
|
|
101
|
-
"endpoint",
|
|
102
|
-
"clientId",
|
|
103
|
-
"clientSecret"
|
|
104
|
-
]
|
|
106
|
+
}
|
|
105
107
|
}
|
|
106
108
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axonflow/openclaw",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "Policy enforcement, approval gates, and audit trails for OpenClaw — govern tool inputs before execution, scan outbound messages for PII/secrets, and record agent activity for review and compliance",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|