@openclaw/acpx 2026.9.7 → 2026.10.1-beta.1
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/README.md +6 -0
- package/assets/icon.png +0 -0
- package/dist/.setup/{config-CdPsIued.mjs → config-76krYh6C.mjs} +145 -17
- package/dist/.setup/{pi-session-catalog-runtime-UhiQSaDw.mjs → pi-session-catalog-runtime-7jc50ZJ4.mjs} +21 -56
- package/dist/.setup/{register.runtime-Bm4HrMCp.mjs → register.runtime-C0nVOTzT.mjs} +15 -38
- package/dist/.setup/runtime-doctor-migrations-hxP-CXX7.mjs +191 -0
- package/dist/.setup/{service-DMae5pPH.mjs → service-BXgGdE56.mjs} +111 -183
- package/dist/.setup/session-owner-migration-C73lfijV.mjs +431 -0
- package/dist/.setup/{session-resource-BaJ6bs5d.mjs → session-resource-DKJsUJPu.mjs} +1 -13
- package/dist/doctor-contract-api.js +10 -104
- package/dist/index.js +43 -22
- package/dist/register.runtime.js +1 -1
- package/openclaw.plugin.json +0 -1
- package/package.json +7 -16
- package/skills/acp-router/SKILL.md +2 -2
- package/dist/.setup/command-line-CPBLOiZM.mjs +0 -138
- package/dist/.setup/process-lease-C3dNPtu8.mjs +0 -138
- package/dist/.setup/session-owner-migration-CdJSYRk1.mjs +0 -203
- package/dist/mcp-command-line.mjs +0 -128
- package/dist/mcp-proxy.mjs +0 -159
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __exportAll = (all, no_symbols) => {
|
|
8
|
+
let target = {};
|
|
9
|
+
for (var name in all) __defProp(target, name, {
|
|
10
|
+
get: all[name],
|
|
11
|
+
enumerable: true
|
|
12
|
+
});
|
|
13
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
14
|
+
return target;
|
|
15
|
+
};
|
|
16
|
+
var __copyProps = (to, from, except, desc) => {
|
|
17
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
18
|
+
key = keys[i];
|
|
19
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
20
|
+
get: ((k) => from[k]).bind(null, key),
|
|
21
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region packages/normalization-core/src/record-coerce.ts
|
|
29
|
+
/** Type guard for non-array object records at browser-safe boundaries. */
|
|
30
|
+
function isRecord(value) {
|
|
31
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
32
|
+
}
|
|
33
|
+
/** Returns a non-array record or null. */
|
|
34
|
+
function asNullableRecord(value) {
|
|
35
|
+
return isRecord(value) ? value : null;
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
//#region src/config/channel-config-normalization.ts
|
|
39
|
+
/** Applies one channel-specific doctor migration to every object-shaped account. */
|
|
40
|
+
function normalizeChannelAccounts(params) {
|
|
41
|
+
const rawAccounts = asNullableRecord(params.entry.accounts);
|
|
42
|
+
if (!rawAccounts) return {
|
|
43
|
+
entry: params.entry,
|
|
44
|
+
changed: false
|
|
45
|
+
};
|
|
46
|
+
let changed = false;
|
|
47
|
+
const accounts = { ...rawAccounts };
|
|
48
|
+
for (const [accountId, value] of Object.entries(rawAccounts)) {
|
|
49
|
+
const account = asNullableRecord(value);
|
|
50
|
+
if (!account) continue;
|
|
51
|
+
const normalized = params.normalizeAccount({
|
|
52
|
+
account,
|
|
53
|
+
accountId,
|
|
54
|
+
pathPrefix: `${params.pathPrefix}.accounts.${accountId}`,
|
|
55
|
+
changes: params.changes
|
|
56
|
+
});
|
|
57
|
+
if (normalized.changed) {
|
|
58
|
+
accounts[accountId] = normalized.entry;
|
|
59
|
+
changed = true;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return changed ? {
|
|
63
|
+
entry: {
|
|
64
|
+
...params.entry,
|
|
65
|
+
accounts
|
|
66
|
+
},
|
|
67
|
+
changed: true
|
|
68
|
+
} : {
|
|
69
|
+
entry: params.entry,
|
|
70
|
+
changed: false
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
/** Applies the same channel-specific doctor migration at root and account scope. */
|
|
74
|
+
function normalizeChannelConfigEntries(params) {
|
|
75
|
+
const changes = params.changes ?? [];
|
|
76
|
+
const channels = params.cfg.channels;
|
|
77
|
+
const entry = asNullableRecord(channels?.[params.channelId]);
|
|
78
|
+
if (!entry) return {
|
|
79
|
+
config: params.cfg,
|
|
80
|
+
changes
|
|
81
|
+
};
|
|
82
|
+
const channelPath = `channels.${params.channelId}`;
|
|
83
|
+
const root = params.normalizeEntry({
|
|
84
|
+
entry,
|
|
85
|
+
pathPrefix: channelPath,
|
|
86
|
+
changes
|
|
87
|
+
});
|
|
88
|
+
const accounts = normalizeChannelAccounts({
|
|
89
|
+
entry: root.entry,
|
|
90
|
+
pathPrefix: channelPath,
|
|
91
|
+
changes,
|
|
92
|
+
normalizeAccount: (accountParams) => params.normalizeEntry({
|
|
93
|
+
entry: accountParams.account,
|
|
94
|
+
accountId: accountParams.accountId,
|
|
95
|
+
pathPrefix: accountParams.pathPrefix,
|
|
96
|
+
changes: accountParams.changes
|
|
97
|
+
})
|
|
98
|
+
});
|
|
99
|
+
if (!root.changed && !accounts.changed) return {
|
|
100
|
+
config: params.cfg,
|
|
101
|
+
changes
|
|
102
|
+
};
|
|
103
|
+
return {
|
|
104
|
+
config: {
|
|
105
|
+
...params.cfg,
|
|
106
|
+
channels: {
|
|
107
|
+
...channels,
|
|
108
|
+
[params.channelId]: accounts.entry
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
changes
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
//#endregion
|
|
115
|
+
//#region src/plugin-sdk/legacy-webhook-listener-migration.ts
|
|
116
|
+
/** Preserve explicitly configured webhook listeners while moving ingress onto Gateway routes. */
|
|
117
|
+
function createLegacyWebhookListenerDoctorContract(params) {
|
|
118
|
+
const portKey = params.portKey ?? "webhookPort";
|
|
119
|
+
const hostKey = params.hostKey === void 0 ? "webhookHost" : params.hostKey;
|
|
120
|
+
const source = (entry) => params.webhookKey ? asNullableRecord(entry[params.webhookKey]) : entry;
|
|
121
|
+
const hasLegacy = (value) => {
|
|
122
|
+
const entry = asNullableRecord(value);
|
|
123
|
+
const listener = entry && source(entry);
|
|
124
|
+
return Boolean(listener && (Object.hasOwn(listener, portKey) || hostKey && Object.hasOwn(listener, hostKey)));
|
|
125
|
+
};
|
|
126
|
+
const prefix = `channels.${params.channelKey}`;
|
|
127
|
+
return {
|
|
128
|
+
historicalWebhookListener: {
|
|
129
|
+
channelId: params.channelKey,
|
|
130
|
+
port: params.defaultPort,
|
|
131
|
+
preserveAuthoredActivation: params.preserveAuthoredActivation,
|
|
132
|
+
...params.defaultHost === void 0 ? {} : { host: params.defaultHost }
|
|
133
|
+
},
|
|
134
|
+
legacyConfigRules: [{
|
|
135
|
+
path: ["channels", params.channelKey],
|
|
136
|
+
message: `${prefix} webhook listeners moved to Gateway routes. Run "openclaw doctor --fix" to preserve explicitly configured listener settings as legacyWebhook.`,
|
|
137
|
+
match: (value) => {
|
|
138
|
+
const accounts = asNullableRecord(asNullableRecord(value)?.accounts);
|
|
139
|
+
return hasLegacy(value) || Object.values(accounts ?? {}).some(hasLegacy);
|
|
140
|
+
}
|
|
141
|
+
}],
|
|
142
|
+
normalizeCompatibilityConfig: ({ cfg }) => {
|
|
143
|
+
const root = asNullableRecord(asNullableRecord(cfg.channels)?.[params.channelKey]);
|
|
144
|
+
const inherited = root && source(root);
|
|
145
|
+
const canonicalRoot = asNullableRecord(root?.legacyWebhook);
|
|
146
|
+
return normalizeChannelConfigEntries({
|
|
147
|
+
cfg,
|
|
148
|
+
channelId: params.channelKey,
|
|
149
|
+
normalizeEntry: ({ entry, accountId, pathPrefix, changes }) => {
|
|
150
|
+
const listener = source(entry);
|
|
151
|
+
if (!listener || !hasLegacy(entry)) return {
|
|
152
|
+
entry,
|
|
153
|
+
changed: false
|
|
154
|
+
};
|
|
155
|
+
const next = { ...entry };
|
|
156
|
+
const port = Object.hasOwn(listener, portKey) ? listener[portKey] : (accountId ? canonicalRoot?.port ?? inherited?.[portKey] : void 0) ?? params.defaultPort;
|
|
157
|
+
const inheritedHost = accountId ? canonicalRoot ? canonicalRoot.host : (hostKey ? inherited?.[hostKey] : void 0) ?? params.defaultHost : params.defaultHost;
|
|
158
|
+
const host = hostKey ? listener[hostKey] ?? inheritedHost : inheritedHost;
|
|
159
|
+
const legacyPath = [pathPrefix, params.webhookKey].filter(Boolean).join(".");
|
|
160
|
+
if (Object.hasOwn(entry, "legacyWebhook")) changes.push(`Removed ${legacyPath} legacy listener keys; ${pathPrefix}.legacyWebhook is already configured.`);
|
|
161
|
+
else if (accountId && root?.legacyWebhook === false) changes.push(`Removed ${legacyPath} legacy listener keys; ${prefix}.legacyWebhook: false keeps this account's inherited listener disabled.`);
|
|
162
|
+
else {
|
|
163
|
+
next.legacyWebhook = {
|
|
164
|
+
port,
|
|
165
|
+
...host !== void 0 ? { host } : {}
|
|
166
|
+
};
|
|
167
|
+
changes.push(`Moved ${legacyPath} listener settings to ${pathPrefix}.legacyWebhook. Point the external callback or reverse proxy at the Gateway port and webhook path, verify delivery, then set legacyWebhook: false to disable legacy forwarding.`);
|
|
168
|
+
}
|
|
169
|
+
const updated = params.webhookKey ? { ...listener } : next;
|
|
170
|
+
delete updated[portKey];
|
|
171
|
+
if (hostKey) delete updated[hostKey];
|
|
172
|
+
if (params.webhookKey) {
|
|
173
|
+
if (Object.keys(updated).length) next[params.webhookKey] = updated;
|
|
174
|
+
else delete next[params.webhookKey];
|
|
175
|
+
}
|
|
176
|
+
return {
|
|
177
|
+
entry: next,
|
|
178
|
+
changed: true
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
//#endregion
|
|
186
|
+
//#region \0openclaw:bundled-sdk:openclaw/plugin-sdk/runtime-doctor-migrations
|
|
187
|
+
var runtime_doctor_migrations_exports = /* @__PURE__ */ __exportAll({ createLegacyWebhookListenerDoctorContract: () => createLegacyWebhookListenerDoctorContract });
|
|
188
|
+
import * as import_openclaw_plugin_sdk_runtime_doctor_migrations from "openclaw/plugin-sdk/runtime-doctor-migrations";
|
|
189
|
+
__reExport(runtime_doctor_migrations_exports, import_openclaw_plugin_sdk_runtime_doctor_migrations);
|
|
190
|
+
//#endregion
|
|
191
|
+
export { __exportAll as n, runtime_doctor_migrations_exports as t };
|