@axonflow/openclaw 1.3.1 → 2.0.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.
- package/CHANGELOG.md +51 -0
- package/README.md +272 -134
- package/dist/audit.d.ts +2 -2
- package/dist/audit.d.ts.map +1 -1
- package/dist/audit.js +2 -2
- package/dist/audit.js.map +1 -1
- package/dist/axonflow-client.d.ts +22 -0
- package/dist/axonflow-client.d.ts.map +1 -1
- package/dist/axonflow-client.js +56 -0
- package/dist/axonflow-client.js.map +1 -1
- package/dist/cache-dir.d.ts +34 -0
- package/dist/cache-dir.d.ts.map +1 -0
- package/dist/cache-dir.js +106 -0
- package/dist/cache-dir.js.map +1 -0
- package/dist/client-ref.d.ts +19 -0
- package/dist/client-ref.d.ts.map +1 -0
- package/dist/client-ref.js +16 -0
- package/dist/client-ref.js.map +1 -0
- package/dist/community-saas-bootstrap.d.ts +58 -0
- package/dist/community-saas-bootstrap.d.ts.map +1 -0
- package/dist/community-saas-bootstrap.js +281 -0
- package/dist/community-saas-bootstrap.js.map +1 -0
- package/dist/config.d.ts +26 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +60 -30
- package/dist/config.js.map +1 -1
- package/dist/governance.d.ts +3 -2
- package/dist/governance.d.ts.map +1 -1
- package/dist/governance.js +2 -2
- package/dist/governance.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +123 -12
- package/dist/index.js.map +1 -1
- package/dist/llm-audit.d.ts +3 -3
- package/dist/llm-audit.d.ts.map +1 -1
- package/dist/llm-audit.js +3 -3
- package/dist/llm-audit.js.map +1 -1
- package/dist/message-guard.d.ts +2 -2
- package/dist/message-guard.d.ts.map +1 -1
- package/dist/message-guard.js +2 -2
- package/dist/message-guard.js.map +1 -1
- package/dist/plugin-version-check.d.ts +50 -0
- package/dist/plugin-version-check.d.ts.map +1 -0
- package/dist/plugin-version-check.js +89 -0
- package/dist/plugin-version-check.js.map +1 -0
- package/dist/telemetry-config.d.ts +7 -1
- package/dist/telemetry-config.d.ts.map +1 -1
- package/dist/telemetry-config.js +1 -2
- package/dist/telemetry-config.js.map +1 -1
- package/dist/telemetry.d.ts +37 -14
- package/dist/telemetry.d.ts.map +1 -1
- package/dist/telemetry.js +146 -46
- package/dist/telemetry.js.map +1 -1
- package/openclaw.plugin.json +3 -6
- package/package.json +9 -5
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Community-SaaS first-run bootstrap (TypeScript).
|
|
3
|
+
*
|
|
4
|
+
* Mirrors the bash plugins' scripts/community-saas-bootstrap.sh contract:
|
|
5
|
+
* registers the plugin against try.getaxonflow.com on first run when the
|
|
6
|
+
* user has not provided explicit clientId/clientSecret, persists the
|
|
7
|
+
* resulting credential to a 0600 file under the user's config dir, and
|
|
8
|
+
* returns Basic-auth credentials the caller can hand to the AxonFlow client.
|
|
9
|
+
*
|
|
10
|
+
* Design rules (per feedback_telemetry_heartbeat_design_rules.md and
|
|
11
|
+
* feedback_pg_advisory_lock_pin_connection.md):
|
|
12
|
+
* - Stamp-on-delivery: registration file is written ONLY after the
|
|
13
|
+
* POST returns 201 with a valid response body. A network failure
|
|
14
|
+
* leaves the previous (or absent) state untouched.
|
|
15
|
+
* - Atomic writes: temp + rename so a crash mid-write never produces
|
|
16
|
+
* a half-readable file.
|
|
17
|
+
* - In-flight gate: a per-process Promise-based lock so concurrent
|
|
18
|
+
* plugin loads don't both race to register.
|
|
19
|
+
* - File permissions: 0700 directory, 0600 file. The file holds the
|
|
20
|
+
* plain-text credential; world-readable would be a security bug.
|
|
21
|
+
* - 429 (registration rate-limit) → write a short backoff stamp and
|
|
22
|
+
* return null. Next call after backoff expires retries.
|
|
23
|
+
* - Cross-platform cache dir resolution (Linux/macOS/Windows).
|
|
24
|
+
* - Refuses to load a registration file with non-0600 permissions
|
|
25
|
+
* (defends against silent credential leak via accidental chmod).
|
|
26
|
+
*/
|
|
27
|
+
import * as fs from "fs";
|
|
28
|
+
import * as os from "os";
|
|
29
|
+
import * as path from "path";
|
|
30
|
+
import { axonflowCacheDir, axonflowConfigDir } from "./cache-dir.js";
|
|
31
|
+
const REGISTER_URL_DEFAULT = "https://try.getaxonflow.com/api/v1/register";
|
|
32
|
+
const ENDPOINT_DEFAULT = "https://try.getaxonflow.com";
|
|
33
|
+
const REGISTRATION_FILE_NAME = "try-registration.json";
|
|
34
|
+
const BACKOFF_FILE_NAME = "openclaw-plugin-register-backoff";
|
|
35
|
+
const BACKOFF_SECONDS = 3600;
|
|
36
|
+
// Refresh registrations whose expires_at is within 30 days so we never let
|
|
37
|
+
// a tenant lapse silently while users are actively using the plugin.
|
|
38
|
+
const REFRESH_WINDOW_MS = 30 * 24 * 60 * 60 * 1000;
|
|
39
|
+
/**
|
|
40
|
+
* Per-process in-flight gate. When two plugin loads happen concurrently
|
|
41
|
+
* (rare but possible in test harnesses or hot-reload scenarios), the second
|
|
42
|
+
* waits on the first's promise rather than firing a duplicate registration.
|
|
43
|
+
*/
|
|
44
|
+
let inFlight = null;
|
|
45
|
+
/**
|
|
46
|
+
* Bootstrap a Community-SaaS registration. Returns null if bootstrap was
|
|
47
|
+
* skipped (registration file unreadable due to permissions, network error,
|
|
48
|
+
* 429 rate-limited, etc); the caller is responsible for surfacing a clear
|
|
49
|
+
* "governance degraded" notice in that case.
|
|
50
|
+
*
|
|
51
|
+
* Safe to call concurrently — the second concurrent call awaits the first
|
|
52
|
+
* rather than racing.
|
|
53
|
+
*/
|
|
54
|
+
export async function bootstrapCommunitySaas(opts) {
|
|
55
|
+
if (inFlight) {
|
|
56
|
+
return inFlight;
|
|
57
|
+
}
|
|
58
|
+
inFlight = bootstrapCommunitySaasInner(opts).finally(() => {
|
|
59
|
+
inFlight = null;
|
|
60
|
+
});
|
|
61
|
+
return inFlight;
|
|
62
|
+
}
|
|
63
|
+
async function bootstrapCommunitySaasInner(opts) {
|
|
64
|
+
// Test-harness overrides — only honoured when AXONFLOW_HARNESS=1 and
|
|
65
|
+
// exclusively used by tests/heartbeat-real-stack/. Production callers
|
|
66
|
+
// leave AXONFLOW_HARNESS unset and the URLs stay pinned to
|
|
67
|
+
// try.getaxonflow.com.
|
|
68
|
+
const harnessOn = process.env.AXONFLOW_HARNESS === "1";
|
|
69
|
+
const harnessRegister = harnessOn ? process.env.AXONFLOW_HARNESS_REGISTER_URL : "";
|
|
70
|
+
const harnessAgent = harnessOn ? process.env.AXONFLOW_HARNESS_AGENT_ENDPOINT : "";
|
|
71
|
+
const registerUrl = opts?.registerUrl ?? (harnessRegister || REGISTER_URL_DEFAULT);
|
|
72
|
+
const endpoint = opts?.endpoint ?? (harnessAgent || ENDPOINT_DEFAULT);
|
|
73
|
+
const fetchFn = opts?.fetchImpl ?? fetch;
|
|
74
|
+
const now = opts?.now ?? (() => new Date());
|
|
75
|
+
const configDir = axonflowConfigDir();
|
|
76
|
+
if (!configDir) {
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
const registrationFile = path.join(configDir, REGISTRATION_FILE_NAME);
|
|
80
|
+
const cacheDir = axonflowCacheDir();
|
|
81
|
+
const backoffFile = cacheDir
|
|
82
|
+
? path.join(cacheDir, BACKOFF_FILE_NAME)
|
|
83
|
+
: "";
|
|
84
|
+
try {
|
|
85
|
+
fs.mkdirSync(configDir, { recursive: true, mode: 0o700 });
|
|
86
|
+
// mkdir's mode only applies to directories it creates. A user with
|
|
87
|
+
// ~/.config already at 0755 would otherwise hold our 0600 credential
|
|
88
|
+
// file inside a traversable directory; chmod restores the dir-mode
|
|
89
|
+
// contract on every invocation. Skip on Windows (mode bits don't map).
|
|
90
|
+
if (process.platform !== "win32") {
|
|
91
|
+
try {
|
|
92
|
+
fs.chmodSync(configDir, 0o700);
|
|
93
|
+
}
|
|
94
|
+
catch { /* best effort */ }
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
catch {
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
// Fast path: existing registration is fresh enough.
|
|
101
|
+
const cached = readRegistrationIfFreshAndSafe(registrationFile, now);
|
|
102
|
+
if (cached) {
|
|
103
|
+
return {
|
|
104
|
+
endpoint: cached.endpoint ?? endpoint,
|
|
105
|
+
clientId: cached.tenant_id,
|
|
106
|
+
clientSecret: cached.secret,
|
|
107
|
+
source: "cached-registration",
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
// Backoff path: 429 told us to slow down. Honour it.
|
|
111
|
+
if (backoffFile && isWithinBackoff(backoffFile, now)) {
|
|
112
|
+
return { endpoint, clientId: "", clientSecret: "", source: "rate-limited" };
|
|
113
|
+
}
|
|
114
|
+
// Issue the registration.
|
|
115
|
+
const label = buildLabel(opts?.pluginVersion);
|
|
116
|
+
let response;
|
|
117
|
+
try {
|
|
118
|
+
const ctl = new AbortController();
|
|
119
|
+
const timeoutHandle = setTimeout(() => ctl.abort(), 10_000);
|
|
120
|
+
try {
|
|
121
|
+
response = await fetchFn(registerUrl, {
|
|
122
|
+
method: "POST",
|
|
123
|
+
headers: { "Content-Type": "application/json" },
|
|
124
|
+
body: JSON.stringify({ label }),
|
|
125
|
+
signal: ctl.signal,
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
finally {
|
|
129
|
+
clearTimeout(timeoutHandle);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
catch {
|
|
133
|
+
return { endpoint, clientId: "", clientSecret: "", source: "failed" };
|
|
134
|
+
}
|
|
135
|
+
if (response.status === 429) {
|
|
136
|
+
if (backoffFile && cacheDir) {
|
|
137
|
+
try {
|
|
138
|
+
fs.mkdirSync(cacheDir, { recursive: true, mode: 0o700 });
|
|
139
|
+
if (process.platform !== "win32") {
|
|
140
|
+
try {
|
|
141
|
+
fs.chmodSync(cacheDir, 0o700);
|
|
142
|
+
}
|
|
143
|
+
catch { /* best effort */ }
|
|
144
|
+
}
|
|
145
|
+
const backoffUntil = Math.floor(now().getTime() / 1000) + BACKOFF_SECONDS;
|
|
146
|
+
writeFileAtomicallyWithMode(backoffFile, String(backoffUntil), 0o600);
|
|
147
|
+
}
|
|
148
|
+
catch {
|
|
149
|
+
// Best effort; if we can't write the backoff stamp, the next call retries.
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
return { endpoint, clientId: "", clientSecret: "", source: "rate-limited" };
|
|
153
|
+
}
|
|
154
|
+
if (response.status !== 201) {
|
|
155
|
+
return { endpoint, clientId: "", clientSecret: "", source: "failed" };
|
|
156
|
+
}
|
|
157
|
+
let parsed;
|
|
158
|
+
try {
|
|
159
|
+
const body = (await response.json());
|
|
160
|
+
if (typeof body.tenant_id !== "string" || body.tenant_id.length === 0 ||
|
|
161
|
+
typeof body.secret !== "string" || body.secret.length === 0 ||
|
|
162
|
+
typeof body.expires_at !== "string") {
|
|
163
|
+
return { endpoint, clientId: "", clientSecret: "", source: "failed" };
|
|
164
|
+
}
|
|
165
|
+
parsed = {
|
|
166
|
+
tenant_id: body.tenant_id,
|
|
167
|
+
secret: body.secret,
|
|
168
|
+
expires_at: body.expires_at,
|
|
169
|
+
endpoint: typeof body.endpoint === "string" ? body.endpoint : endpoint,
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
catch {
|
|
173
|
+
return { endpoint, clientId: "", clientSecret: "", source: "failed" };
|
|
174
|
+
}
|
|
175
|
+
// Stamp-on-delivery: only write after a fully-validated response.
|
|
176
|
+
try {
|
|
177
|
+
writeFileAtomicallyWithMode(registrationFile, JSON.stringify(parsed), 0o600);
|
|
178
|
+
if (backoffFile) {
|
|
179
|
+
try {
|
|
180
|
+
fs.unlinkSync(backoffFile);
|
|
181
|
+
}
|
|
182
|
+
catch { /* fine */ }
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
catch {
|
|
186
|
+
// We received valid credentials but couldn't persist them. Return them
|
|
187
|
+
// anyway so the current process can still authenticate; on next run we
|
|
188
|
+
// re-register (cheap; rate-limited, but bounded).
|
|
189
|
+
}
|
|
190
|
+
return {
|
|
191
|
+
endpoint: parsed.endpoint ?? endpoint,
|
|
192
|
+
clientId: parsed.tenant_id,
|
|
193
|
+
clientSecret: parsed.secret,
|
|
194
|
+
source: "fresh-registration",
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
function readRegistrationIfFreshAndSafe(file, now) {
|
|
198
|
+
let stat;
|
|
199
|
+
try {
|
|
200
|
+
stat = fs.statSync(file);
|
|
201
|
+
}
|
|
202
|
+
catch {
|
|
203
|
+
return null;
|
|
204
|
+
}
|
|
205
|
+
// Refuse to read a registration file with non-0600 permissions. World-
|
|
206
|
+
// readable credential storage is a real bug; the caller surfaces the
|
|
207
|
+
// refusal so the user knows to delete + re-register.
|
|
208
|
+
if (process.platform !== "win32") {
|
|
209
|
+
const mode = stat.mode & 0o777;
|
|
210
|
+
if (mode !== 0o600) {
|
|
211
|
+
try {
|
|
212
|
+
process.stderr.write(`[AxonFlow] ${file} has unsafe permissions (${mode.toString(8).padStart(3, "0")}); refusing to use. ` +
|
|
213
|
+
`Re-register: rm ${JSON.stringify(file)} and reload.\n`);
|
|
214
|
+
}
|
|
215
|
+
catch { /* stderr unavailable in some hosts */ }
|
|
216
|
+
return null;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
let parsed;
|
|
220
|
+
try {
|
|
221
|
+
const raw = fs.readFileSync(file, "utf8");
|
|
222
|
+
parsed = JSON.parse(raw);
|
|
223
|
+
}
|
|
224
|
+
catch {
|
|
225
|
+
return null;
|
|
226
|
+
}
|
|
227
|
+
if (typeof parsed.tenant_id !== "string" || parsed.tenant_id.length === 0 ||
|
|
228
|
+
typeof parsed.secret !== "string" || parsed.secret.length === 0 ||
|
|
229
|
+
typeof parsed.expires_at !== "string") {
|
|
230
|
+
return null;
|
|
231
|
+
}
|
|
232
|
+
const expiresMs = Date.parse(parsed.expires_at);
|
|
233
|
+
if (!Number.isFinite(expiresMs)) {
|
|
234
|
+
return null;
|
|
235
|
+
}
|
|
236
|
+
const remaining = expiresMs - now().getTime();
|
|
237
|
+
if (remaining < REFRESH_WINDOW_MS) {
|
|
238
|
+
return null;
|
|
239
|
+
}
|
|
240
|
+
return parsed;
|
|
241
|
+
}
|
|
242
|
+
function isWithinBackoff(backoffFile, now) {
|
|
243
|
+
try {
|
|
244
|
+
const raw = fs.readFileSync(backoffFile, "utf8").trim();
|
|
245
|
+
const until = Number(raw);
|
|
246
|
+
if (!Number.isFinite(until) || until <= 0)
|
|
247
|
+
return false;
|
|
248
|
+
return until > Math.floor(now().getTime() / 1000);
|
|
249
|
+
}
|
|
250
|
+
catch {
|
|
251
|
+
return false;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
function buildLabel(pluginVersion) {
|
|
255
|
+
const version = pluginVersion ?? "unknown";
|
|
256
|
+
const platform = `${os.type()}-${os.arch()}`;
|
|
257
|
+
const label = `openclaw-plugin@${version} / ${platform}`;
|
|
258
|
+
return label.length > 255 ? label.slice(0, 255) : label;
|
|
259
|
+
}
|
|
260
|
+
function writeFileAtomicallyWithMode(file, content, mode) {
|
|
261
|
+
// tmp file in the same directory so rename is atomic on POSIX. On Windows,
|
|
262
|
+
// fs.renameSync replaces the destination atomically since Node 14+.
|
|
263
|
+
const dir = path.dirname(file);
|
|
264
|
+
const tmp = path.join(dir, `${path.basename(file)}.tmp.${process.pid}`);
|
|
265
|
+
fs.writeFileSync(tmp, content, { mode });
|
|
266
|
+
// chmod again because some filesystems / umask combinations ignore the
|
|
267
|
+
// mode passed to writeFileSync for already-existing temp files.
|
|
268
|
+
try {
|
|
269
|
+
fs.chmodSync(tmp, mode);
|
|
270
|
+
}
|
|
271
|
+
catch { /* best effort */ }
|
|
272
|
+
fs.renameSync(tmp, file);
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Test-only: clear the in-flight gate so test cases can exercise concurrent
|
|
276
|
+
* bootstrap calls without sharing state across tests.
|
|
277
|
+
*/
|
|
278
|
+
export function _resetBootstrapInFlightForTests() {
|
|
279
|
+
inFlight = null;
|
|
280
|
+
}
|
|
281
|
+
//# sourceMappingURL=community-saas-bootstrap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"community-saas-bootstrap.js","sourceRoot":"","sources":["../src/community-saas-bootstrap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAErE,MAAM,oBAAoB,GAAG,6CAA6C,CAAC;AAC3E,MAAM,gBAAgB,GAAG,6BAA6B,CAAC;AACvD,MAAM,sBAAsB,GAAG,uBAAuB,CAAC;AACvD,MAAM,iBAAiB,GAAG,kCAAkC,CAAC;AAC7D,MAAM,eAAe,GAAG,IAAI,CAAC;AAC7B,2EAA2E;AAC3E,qEAAqE;AACrE,MAAM,iBAAiB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAoBnD;;;;GAIG;AACH,IAAI,QAAQ,GAA2C,IAAI,CAAC;AAE5D;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,IAM5C;IACC,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,QAAQ,GAAG,2BAA2B,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE;QACxD,QAAQ,GAAG,IAAI,CAAC;IAClB,CAAC,CAAC,CAAC;IACH,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,KAAK,UAAU,2BAA2B,CAAC,IAM1C;IACC,qEAAqE;IACrE,sEAAsE;IACtE,2DAA2D;IAC3D,uBAAuB;IACvB,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,gBAA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G,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC;IAC7C,MAAM,KAAK,GAAG,mBAAmB,OAAO,MAAM,QAAQ,EAAE,CAAC;IACzD,OAAO,KAAK,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AAC1D,CAAC;AAED,SAAS,2BAA2B,CAAC,IAAY,EAAE,OAAe,EAAE,IAAY;IAC9E,2EAA2E;IAC3E,oEAAoE;IACpE,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IACxE,EAAE,CAAC,aAAa,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;IACzC,uEAAuE;IACvE,gEAAgE;IAChE,IAAI,CAAC;QAAC,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IAAC,CAAC;IAAC,MAAM,CAAC,CAAC,iBAAiB,CAAC,CAAC;IAC5D,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;AAC3B,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,+BAA+B;IAC7C,QAAQ,GAAG,IAAI,CAAC;AAClB,CAAC"}
|
package/dist/config.d.ts
CHANGED
|
@@ -64,8 +64,33 @@ export interface AxonFlowPluginConfig {
|
|
|
64
64
|
* Defaults to 8000ms.
|
|
65
65
|
*/
|
|
66
66
|
requestTimeoutMs?: number;
|
|
67
|
+
/**
|
|
68
|
+
* Resolved deployment mode (set by `resolveConfig`):
|
|
69
|
+
* - "community-saas": user provided no explicit endpoint/clientId/clientSecret;
|
|
70
|
+
* plugin will register against try.getaxonflow.com on first run.
|
|
71
|
+
* - "self-hosted": user provided at least one of endpoint/clientId/clientSecret;
|
|
72
|
+
* plugin uses those values verbatim (no Community-SaaS bootstrap).
|
|
73
|
+
*
|
|
74
|
+
* Surfaced on the config so callers can emit the mode-clarity canary
|
|
75
|
+
* "[AxonFlow] Connected to AxonFlow at <URL> (mode=<X>)" and so the
|
|
76
|
+
* Gate 4 mode-clarity test can assert it.
|
|
77
|
+
*/
|
|
78
|
+
mode: "community-saas" | "self-hosted";
|
|
67
79
|
}
|
|
68
|
-
/**
|
|
80
|
+
/**
|
|
81
|
+
* Validate plugin config and return defaults.
|
|
82
|
+
*
|
|
83
|
+
* Resolution order (ADR-048):
|
|
84
|
+
* 1. If the user provided ANY of endpoint, clientId, clientSecret → mode is
|
|
85
|
+
* "self-hosted". Defaults are filled in: endpoint defaults to localhost,
|
|
86
|
+
* clientId defaults to "community", clientSecret stays empty (community
|
|
87
|
+
* mode). The user's explicit values are honoured untouched.
|
|
88
|
+
* 2. If the user provided NONE → mode is "community-saas". Endpoint
|
|
89
|
+
* defaults to https://try.getaxonflow.com. clientId/clientSecret stay
|
|
90
|
+
* EMPTY here — the caller (registerAxonFlowGovernance) is expected to
|
|
91
|
+
* bootstrap the registration via community-saas-bootstrap.ts and
|
|
92
|
+
* override clientId/clientSecret on the resulting client.
|
|
93
|
+
*/
|
|
69
94
|
export declare function resolveConfig(raw: Record<string, unknown> | undefined): AxonFlowPluginConfig;
|
|
70
95
|
/** Check if a tool should be governed based on config. */
|
|
71
96
|
export declare function shouldGovernTool(toolName: string, config: AxonFlowPluginConfig): boolean;
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,oBAAoB;IACnC,uEAAuE;IACvE,QAAQ,EAAE,MAAM,CAAC;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AC;CACxC;AAID;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAC3B,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GACvC,oBAAoB,CAyEtB;AAED,0DAA0D;AAC1D,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,oBAAoB,GAC3B,OAAO,CAWT"}
|
package/dist/config.js
CHANGED
|
@@ -4,50 +4,80 @@
|
|
|
4
4
|
* All configuration is read from the OpenClaw plugin config system
|
|
5
5
|
* (openclaw.plugin.json or runtime config).
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
const COMMUNITY_SAAS_DEFAULT_ENDPOINT = "https://try.getaxonflow.com";
|
|
8
|
+
/**
|
|
9
|
+
* Validate plugin config and return defaults.
|
|
10
|
+
*
|
|
11
|
+
* Resolution order (ADR-048):
|
|
12
|
+
* 1. If the user provided ANY of endpoint, clientId, clientSecret → mode is
|
|
13
|
+
* "self-hosted". Defaults are filled in: endpoint defaults to localhost,
|
|
14
|
+
* clientId defaults to "community", clientSecret stays empty (community
|
|
15
|
+
* mode). The user's explicit values are honoured untouched.
|
|
16
|
+
* 2. If the user provided NONE → mode is "community-saas". Endpoint
|
|
17
|
+
* defaults to https://try.getaxonflow.com. clientId/clientSecret stay
|
|
18
|
+
* EMPTY here — the caller (registerAxonFlowGovernance) is expected to
|
|
19
|
+
* bootstrap the registration via community-saas-bootstrap.ts and
|
|
20
|
+
* override clientId/clientSecret on the resulting client.
|
|
21
|
+
*/
|
|
8
22
|
export function resolveConfig(raw) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
// Defaults match SDK behavior: community mode works out of the box.
|
|
17
|
-
// Override with your evaluation/enterprise license credentials.
|
|
18
|
-
const rawClientId = typeof raw["clientId"] === "string" ? raw["clientId"] : "";
|
|
19
|
-
const rawClientSecret = typeof raw["clientSecret"] === "string" ? raw["clientSecret"] : "";
|
|
20
|
-
// Reject clientSecret without clientId — licensed mode must specify the tenant
|
|
23
|
+
const safe = raw ?? {};
|
|
24
|
+
const rawEndpoint = typeof safe["endpoint"] === "string" ? safe["endpoint"].trim() : "";
|
|
25
|
+
const rawClientId = typeof safe["clientId"] === "string" ? safe["clientId"].trim() : "";
|
|
26
|
+
const rawClientSecret = typeof safe["clientSecret"] === "string" ? safe["clientSecret"].trim() : "";
|
|
27
|
+
// Reject clientSecret without clientId regardless of mode — licensed
|
|
28
|
+
// setups must specify the tenant identity.
|
|
21
29
|
if (!rawClientId && rawClientSecret) {
|
|
22
30
|
throw new Error("AxonFlow plugin: 'clientId' is required when 'clientSecret' is set. " +
|
|
23
31
|
"Set clientId to your tenant identity (e.g., your deployment's AXONFLOW_CLIENT_ID).");
|
|
24
32
|
}
|
|
25
|
-
const
|
|
26
|
-
|
|
33
|
+
const userProvidedAnything = rawEndpoint !== "" || rawClientId !== "" || rawClientSecret !== "";
|
|
34
|
+
let endpoint;
|
|
35
|
+
let clientId;
|
|
36
|
+
let clientSecret;
|
|
37
|
+
let mode;
|
|
38
|
+
if (userProvidedAnything) {
|
|
39
|
+
mode = "self-hosted";
|
|
40
|
+
// Endpoint default for self-hosted users who set credentials but not
|
|
41
|
+
// endpoint: assume the canonical local-agent URL. Matches the bash
|
|
42
|
+
// plugins' resolution rule.
|
|
43
|
+
endpoint = rawEndpoint || "http://localhost:8080";
|
|
44
|
+
clientId = rawClientId || "community";
|
|
45
|
+
clientSecret = rawClientSecret;
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
mode = "community-saas";
|
|
49
|
+
endpoint = COMMUNITY_SAAS_DEFAULT_ENDPOINT;
|
|
50
|
+
// Bootstrap will fill these in. We deliberately leave them empty here
|
|
51
|
+
// so a misconfigured caller that skips the bootstrap step gets a clear
|
|
52
|
+
// 401 from the agent rather than a half-credentialled request.
|
|
53
|
+
clientId = "";
|
|
54
|
+
clientSecret = "";
|
|
55
|
+
}
|
|
27
56
|
return {
|
|
28
57
|
endpoint,
|
|
29
58
|
clientId,
|
|
30
59
|
clientSecret,
|
|
31
|
-
|
|
32
|
-
|
|
60
|
+
mode,
|
|
61
|
+
userEmail: typeof safe["userEmail"] === "string" && safe["userEmail"].trim()
|
|
62
|
+
? safe["userEmail"].trim()
|
|
33
63
|
: undefined,
|
|
34
|
-
highRiskTools: Array.isArray(
|
|
35
|
-
?
|
|
64
|
+
highRiskTools: Array.isArray(safe["highRiskTools"])
|
|
65
|
+
? safe["highRiskTools"]
|
|
36
66
|
: [],
|
|
37
|
-
governedTools: Array.isArray(
|
|
38
|
-
?
|
|
67
|
+
governedTools: Array.isArray(safe["governedTools"])
|
|
68
|
+
? safe["governedTools"]
|
|
39
69
|
: [],
|
|
40
|
-
excludedTools: Array.isArray(
|
|
41
|
-
?
|
|
70
|
+
excludedTools: Array.isArray(safe["excludedTools"])
|
|
71
|
+
? safe["excludedTools"]
|
|
42
72
|
: [],
|
|
43
|
-
defaultOperation: typeof
|
|
44
|
-
?
|
|
73
|
+
defaultOperation: typeof safe["defaultOperation"] === "string"
|
|
74
|
+
? safe["defaultOperation"]
|
|
45
75
|
: "execute",
|
|
46
|
-
onError:
|
|
47
|
-
requestTimeoutMs: typeof
|
|
48
|
-
Number.isFinite(
|
|
49
|
-
|
|
50
|
-
?
|
|
76
|
+
onError: safe["onError"] === "allow" ? "allow" : "block",
|
|
77
|
+
requestTimeoutMs: typeof safe["requestTimeoutMs"] === "number" &&
|
|
78
|
+
Number.isFinite(safe["requestTimeoutMs"]) &&
|
|
79
|
+
safe["requestTimeoutMs"] > 0
|
|
80
|
+
? safe["requestTimeoutMs"]
|
|
51
81
|
: 8000,
|
|
52
82
|
};
|
|
53
83
|
}
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;GA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AQ;YAC5C,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;YACxC,IAAI,CAAC,kBAAkB,CAAY,GAAG,CAAC;YACtC,CAAC,CAAE,IAAI,CAAC,kBAAkB,CAAY;YACtC,CAAC,CAAC,IAAI;KACX,CAAC;AACJ,CAAC;AAED,0DAA0D;AAC1D,MAAM,UAAU,gBAAgB,CAC9B,QAAgB,EAChB,MAA4B;IAE5B,iCAAiC;IACjC,IAAI,MAAM,CAAC,aAAa,IAAI,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;QACpE,OAAO,KAAK,CAAC;IACf,CAAC;IACD,yDAAyD;IACzD,IAAI,MAAM,CAAC,aAAa,IAAI,MAAM,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC5D,OAAO,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACjD,CAAC;IACD,4BAA4B;IAC5B,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/governance.d.ts
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
* Evaluates tool arguments against AxonFlow policies before execution.
|
|
5
5
|
* Can block the call, require human approval, or allow through.
|
|
6
6
|
*/
|
|
7
|
-
import type {
|
|
7
|
+
import type { MCPCheckInputResponse } from "./axonflow-client.js";
|
|
8
|
+
import type { ClientRef } from "./client-ref.js";
|
|
8
9
|
import type { AxonFlowPluginConfig } from "./config.js";
|
|
9
10
|
/** Result type matching OpenClaw's PluginHookBeforeToolCallResult. */
|
|
10
11
|
export interface BeforeToolCallResult {
|
|
@@ -63,7 +64,7 @@ export declare function isAxonFlowAuthError(err: unknown): boolean;
|
|
|
63
64
|
* 4. If tool is in highRiskTools AND allowed: return { requireApproval }
|
|
64
65
|
* 5. Otherwise: allow through
|
|
65
66
|
*/
|
|
66
|
-
export declare function createBeforeToolCallHandler(
|
|
67
|
+
export declare function createBeforeToolCallHandler(clientRef: ClientRef, config: AxonFlowPluginConfig): (event: {
|
|
67
68
|
toolName: string;
|
|
68
69
|
params: Record<string, unknown>;
|
|
69
70
|
runId?: string;
|
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,
|
|
1
|
+
{"version":3,"file":"governance.d.ts","sourceRoot":"","sources":["../src/governance.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,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;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,qBAAqB,GAAG,MAAM,CAgBxE;AAoCD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAazD;AAED;;;;;;;;;GASG;AACH,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,SAAS,EACpB,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,CAoF9C"}
|
package/dist/governance.js
CHANGED
|
@@ -113,7 +113,7 @@ export function isAxonFlowAuthError(err) {
|
|
|
113
113
|
* 4. If tool is in highRiskTools AND allowed: return { requireApproval }
|
|
114
114
|
* 5. Otherwise: allow through
|
|
115
115
|
*/
|
|
116
|
-
export function createBeforeToolCallHandler(
|
|
116
|
+
export function createBeforeToolCallHandler(clientRef, config) {
|
|
117
117
|
return async (event) => {
|
|
118
118
|
if (!shouldGovernTool(event.toolName, config)) {
|
|
119
119
|
return undefined;
|
|
@@ -123,7 +123,7 @@ export function createBeforeToolCallHandler(client, config) {
|
|
|
123
123
|
const statement = JSON.stringify(event.params);
|
|
124
124
|
let check;
|
|
125
125
|
try {
|
|
126
|
-
check = await
|
|
126
|
+
check = await clientRef.current.mcpCheckInput(connectorType, statement, config.defaultOperation ?? "execute");
|
|
127
127
|
}
|
|
128
128
|
catch (err) {
|
|
129
129
|
recordGovernanceError();
|
package/dist/governance.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"governance.js","sourceRoot":"","sources":["../src/governance.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"governance.js","sourceRoot":"","sources":["../src/governance.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,8BAA8B,EAC9B,qB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AU,KAAK,UAAU,IAAI,KAAK,CAAC,UAAU,KAAK,MAAM,EAAE,CAAC;gBACnE,QAAQ,GAAG,UAAU,CAAC;YACxB,CAAC;iBAAM,IAAI,KAAK,CAAC,UAAU,KAAK,KAAK,EAAE,CAAC;gBACtC,QAAQ,GAAG,MAAM,CAAC;YACpB,CAAC;YACD,OAAO;gBACL,eAAe,EAAE;oBACf,KAAK,EAAE,aAAa,KAAK,CAAC,QAAQ,oBAAoB;oBACtD,WAAW,EACT,mCAAmC,KAAK,CAAC,kBAAkB,sBAAsB;wBACjF,mBAAmB,CAAC,KAAK,CAAC;oBAC5B,QAAQ;oBACR,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 = "
|
|
34
|
+
export declare const VERSION = "2.0.0";
|
|
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.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAiBH,mDAAmD;AACnD,eAAO,MAAM,OAAO,UAAU,CAAC;AAG/B,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAElE;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,GAAG,EAAE;IAC9C,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,MAAM,EAAE;QAAE,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;QAAC,KAAK,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;KAAE,CAAC;IACpG,EAAE,EAAE,CACF,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAChC,IAAI,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,KACzB,IAAI,CAAC;CACX,GAAG,IAAI,CAyHP;AA4CD;;;;;;GAMG;;;;;;;AACH,wBAKE"}
|