@openclaw/gateway-protocol 2026.9.6 → 2026.9.8
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 +4 -0
- package/dist/client-info.d.mts +2 -1
- package/dist/client-info.mjs +3 -2
- package/dist/connect-error-details.d.mts +4 -3
- package/dist/connect-error-details.mjs +13 -16
- package/dist/frame-guards.d.mts +2 -2
- package/dist/frame-guards.mjs +4 -4
- package/dist/{frames-DrA9fYYy.d.mts → frames-ICrB58JF.d.mts} +32 -11
- package/dist/{gateway-error-details-B0Ms-xqB.d.mts → gateway-error-details-BH1DM8mu.d.mts} +462 -385
- package/dist/gateway-error-details.d.mts +1 -1
- package/dist/gateway-error-details.mjs +6 -6
- package/dist/index.d.mts +3210 -2803
- package/dist/index.mjs +40 -110
- package/dist/{protocol-value-normalization-DfM01tqg.mjs → protocol-value-normalization-Oati9UF1.mjs} +1 -1
- package/dist/{record-coerce-BVp8Dr-B.mjs → record-coerce-DVQGe6I0.mjs} +1 -1
- package/dist/restart-unavailable.d.mts +3 -1
- package/dist/restart-unavailable.mjs +4 -2
- package/dist/{schema-modules-CClcdadz.d.mts → schema-modules-CRgBq9O3.d.mts} +2759 -1911
- package/dist/schema.d.mts +10 -9
- package/dist/schema.mjs +50 -21
- package/dist/{server-capabilities-CBMEqI9z.mjs → server-capabilities-BnyAklc1.mjs} +6 -1
- package/dist/startup-unavailable.d.mts +1 -1
- package/dist/startup-unavailable.mjs +1 -1
- package/dist/{string-coerce-BJ6bjzdv.mjs → string-coerce-BSD-wsXs.mjs} +1 -1
- package/dist/system-agent-context.d.mts +1 -1
- package/dist/system-agent-context.mjs +8 -7
- package/dist/{theme-DEbDprgp.mjs → theme-_hQKgfH-.mjs} +2 -2
- package/dist/{theme-C4mhgADx.d.mts → theme-s6T9Ck6Z.d.mts} +2 -2
- package/dist/theme.d.mts +1 -1
- package/dist/theme.mjs +1 -1
- package/dist/{tools-catalog-CRxZFldZ.mjs → tools-catalog-pKZZLiUu.mjs} +1046 -768
- package/dist/{version-COV9CEyr.d.mts → version-BL42XeI-.d.mts} +1 -1
- package/dist/version.d.mts +1 -1
- package/dist/version.mjs +1 -1
- package/package.json +3 -3
- package/protocol.schema.json +8776 -4444
|
@@ -1,15 +1,20 @@
|
|
|
1
|
-
//#region src/server-capabilities.ts
|
|
1
|
+
//#region packages/gateway-protocol/src/server-capabilities.ts
|
|
2
2
|
/** Stable feature names advertised in Gateway hello responses. */
|
|
3
3
|
const GATEWAY_SERVER_CAPS = {
|
|
4
4
|
BOARD_WIDGET_PUT_CANVAS_DOC: "board-widget-put-canvas-doc",
|
|
5
5
|
CHAT_SEND_ROUTING_CONTRACT: "chat-send-routing-contract",
|
|
6
|
+
CONTROL_UI_BROWSER_FOCUS: "control-ui-browser-focus",
|
|
6
7
|
GATEWAY_RESTART_TARGET_SAFE: "gateway-restart-target-safe-v1",
|
|
7
8
|
MODEL_CATALOG_SNAPSHOT: "model-catalog-snapshot",
|
|
8
9
|
NODE_WORKER_BUNDLE_RETENTION: "node-worker-bundle-retention-v1",
|
|
9
10
|
NODE_WORKER_BUNDLE_STATUS: "node-worker-bundle-status-v1",
|
|
10
11
|
NODE_WORKER_CAPTURED_EXEC_POLICY: "node-worker-captured-exec-policy",
|
|
11
12
|
NODE_WORKER_ENVIRONMENT_SESSION: "node-worker-environment-session-v1",
|
|
13
|
+
NODE_WORKER_HOST_DIAGNOSTICS: "node-worker-host-diagnostics-v1",
|
|
14
|
+
NODE_WORKER_IDLE_RETENTION: "node-worker-idle-retention-v1",
|
|
15
|
+
NODE_WORKER_LAUNCH_TOOL_NAMES: "node-worker-launch-tool-names-v1",
|
|
12
16
|
NODE_WORKER_PORTAL_STREAM: "node-worker-portal-stream-v1",
|
|
17
|
+
NODE_WORKER_STATUS_WAIT: "node-worker-status-wait-v1",
|
|
13
18
|
PUBLISHED_MODEL_CATALOG: "published-model-catalog",
|
|
14
19
|
PROFILE_BINDING: "profile-binding-v1",
|
|
15
20
|
PROGRESS_CARD_AGENT_SCOPE: "progress-card-agent-scope-v1",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region src/startup-unavailable.d.ts
|
|
1
|
+
//#region packages/gateway-protocol/src/startup-unavailable.d.ts
|
|
2
2
|
/** Structured error reason used while gateway startup sidecars are still initializing. */
|
|
3
3
|
export declare const GATEWAY_STARTUP_UNAVAILABLE_REASON = "startup-sidecars";
|
|
4
4
|
/** Internal close cause that distinguishes startup retry closes from generic disconnects. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region src/startup-unavailable.ts
|
|
1
|
+
//#region packages/gateway-protocol/src/startup-unavailable.ts
|
|
2
2
|
/** Structured error reason used while gateway startup sidecars are still initializing. */
|
|
3
3
|
const GATEWAY_STARTUP_UNAVAILABLE_REASON = "startup-sidecars";
|
|
4
4
|
/** Internal close cause that distinguishes startup retry closes from generic disconnects. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region
|
|
1
|
+
//#region packages/normalization-core/src/string-coerce.ts
|
|
2
2
|
/** Trims string input and returns null for non-strings or empty strings. */
|
|
3
3
|
function normalizeNullableString(value) {
|
|
4
4
|
if (typeof value !== "string") return null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region src/system-agent-context.d.ts
|
|
1
|
+
//#region packages/gateway-protocol/src/system-agent-context.d.ts
|
|
2
2
|
/** Ephemeral, quoted UI references. These fields never carry configuration values. */
|
|
3
3
|
export declare const SYSTEM_AGENT_PLUGIN_REFERENCE_MAX_CHARS = 1024;
|
|
4
4
|
export declare const SYSTEM_AGENT_PLUGIN_ID_MAX_CHARS = 128;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { t as asNullableRecord } from "./record-coerce-DVQGe6I0.mjs";
|
|
2
|
+
//#region packages/gateway-protocol/src/system-agent-context.ts
|
|
2
3
|
/** Ephemeral, quoted UI references. These fields never carry configuration values. */
|
|
3
4
|
const SYSTEM_AGENT_PLUGIN_REFERENCE_MAX_CHARS = 1024;
|
|
4
5
|
const SYSTEM_AGENT_PLUGIN_ID_MAX_CHARS = 128;
|
|
@@ -16,8 +17,8 @@ const CAPABILITY_GROUPS = [
|
|
|
16
17
|
"mcpServers"
|
|
17
18
|
];
|
|
18
19
|
function addDeclaredCapabilities(reference, value) {
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
const raw = asNullableRecord(value);
|
|
21
|
+
if (!raw) return;
|
|
21
22
|
const declared = { incomplete: true };
|
|
22
23
|
reference.declared = declared;
|
|
23
24
|
const fits = () => JSON.stringify(reference).length <= SYSTEM_AGENT_PLUGIN_REFERENCE_MAX_CHARS;
|
|
@@ -54,8 +55,8 @@ function addDeclaredCapabilities(reference, value) {
|
|
|
54
55
|
if (!incomplete) delete declared.incomplete;
|
|
55
56
|
}
|
|
56
57
|
function normalizeSystemAgentPluginReference(value) {
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
const raw = asNullableRecord(value);
|
|
59
|
+
if (!raw) return;
|
|
59
60
|
if (typeof raw.id !== "string" || !/^[A-Za-z0-9@][A-Za-z0-9@._/-]{0,127}$/u.test(raw.id)) return;
|
|
60
61
|
if (typeof raw.name !== "string" || !raw.name.trim() || raw.name.length > 96) return;
|
|
61
62
|
const reference = {
|
|
@@ -63,8 +64,8 @@ function normalizeSystemAgentPluginReference(value) {
|
|
|
63
64
|
name: raw.name.trim()
|
|
64
65
|
};
|
|
65
66
|
if (typeof raw.installed === "boolean") reference.installed = raw.installed;
|
|
66
|
-
|
|
67
|
-
|
|
67
|
+
const setting = asNullableRecord(raw.setting);
|
|
68
|
+
if (setting) {
|
|
68
69
|
if (Array.isArray(setting.path) && setting.path.length > 0 && setting.path.length <= 16 && setting.path.every((part) => typeof part === "string" && part.length > 0 && part.length <= 64) && typeof setting.label === "string" && setting.label.trim() && setting.label.length <= 96) reference.setting = {
|
|
69
70
|
path: [...setting.path],
|
|
70
71
|
label: setting.label.trim()
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region src/theme-ids.ts
|
|
1
|
+
//#region packages/gateway-protocol/src/theme-ids.ts
|
|
2
2
|
/** Lightweight theme identifiers used while browser preferences boot. */
|
|
3
3
|
const BUILTIN_THEME_IDS = [
|
|
4
4
|
"claw",
|
|
@@ -29,7 +29,7 @@ function normalizeThemeMode(value) {
|
|
|
29
29
|
return value === "system" || value === "light" || value === "dark" ? value : void 0;
|
|
30
30
|
}
|
|
31
31
|
//#endregion
|
|
32
|
-
//#region src/theme.ts
|
|
32
|
+
//#region packages/gateway-protocol/src/theme.ts
|
|
33
33
|
const THEME_COLOR_KEYS = [
|
|
34
34
|
"background",
|
|
35
35
|
"foreground",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region src/theme-ids.d.ts
|
|
1
|
+
//#region packages/gateway-protocol/src/theme-ids.d.ts
|
|
2
2
|
/** Lightweight theme identifiers used while browser preferences boot. */
|
|
3
3
|
declare const BUILTIN_THEME_IDS: readonly ["claw", "knot", "dash", "absolutely", "tide", "beacon", "phosphor", "crt", "manuscript", "rose", "miami"];
|
|
4
4
|
type BuiltinThemeId = (typeof BUILTIN_THEME_IDS)[number];
|
|
@@ -10,7 +10,7 @@ declare function isBuiltinThemeId(value: unknown): value is BuiltinThemeId;
|
|
|
10
10
|
declare function isThemeId(value: unknown): value is ThemeId;
|
|
11
11
|
declare function normalizeThemeMode(value: unknown): ThemeMode | undefined;
|
|
12
12
|
//#endregion
|
|
13
|
-
//#region src/theme.d.ts
|
|
13
|
+
//#region packages/gateway-protocol/src/theme.d.ts
|
|
14
14
|
/** Portable theme data shared by profile preferences, plugins, and the Control UI. */
|
|
15
15
|
type ThemeColorMode = "light" | "dark";
|
|
16
16
|
declare const THEME_COLOR_KEYS: readonly ["background", "foreground", "card", "card-foreground", "popover", "popover-foreground", "primary", "primary-foreground", "secondary", "secondary-foreground", "muted", "muted-foreground", "accent", "accent-foreground", "destructive", "destructive-foreground", "border", "input", "ring"];
|
package/dist/theme.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as BuiltinThemeId, C as ThemePalette, D as parseThemeDefinition, E as normalizeThemeDefinition, F as isBuiltinThemeId, I as isThemeId, L as normalizeThemeMode, M as THEME_LOCAL_ID_PATTERN, N as ThemeId, O as resolveThemeBranding, P as ThemeMode, S as ThemeMascot, T as isThemeCritterId, _ as ThemeCatalogEntry, a as THEME_COLOR_KEYS, b as ThemeDefinition, c as THEME_FONT_KEYS, d as THEME_TOKEN_MAX_LENGTH, f as THEME_WORKING_PHRASES_MAX, g as ThemeBranding, h as ThemeAvatarHatId, i as THEME_AVATAR_HAT_IDS, j as THEME_LOCAL_ID_MAX_LENGTH, k as BUILTIN_THEME_IDS, l as THEME_MASCOT_VALUES, m as ThemeArtwork, n as MAX_THEME_DEFINITION_BYTES, o as THEME_CRITTER_IDS, p as THEME_WORKING_PHRASE_MAX_LENGTH, r as THEME_ARTWORK_ID_PATTERN, s as THEME_DESCRIPTION_MAX_LENGTH, t as BUILTIN_THEMES, u as THEME_NAME_MAX_LENGTH, v as ThemeColorMode, w as isThemeAvatarHatId, x as ThemeDescriptor, y as ThemeCritterId } from "./theme-
|
|
1
|
+
import { A as BuiltinThemeId, C as ThemePalette, D as parseThemeDefinition, E as normalizeThemeDefinition, F as isBuiltinThemeId, I as isThemeId, L as normalizeThemeMode, M as THEME_LOCAL_ID_PATTERN, N as ThemeId, O as resolveThemeBranding, P as ThemeMode, S as ThemeMascot, T as isThemeCritterId, _ as ThemeCatalogEntry, a as THEME_COLOR_KEYS, b as ThemeDefinition, c as THEME_FONT_KEYS, d as THEME_TOKEN_MAX_LENGTH, f as THEME_WORKING_PHRASES_MAX, g as ThemeBranding, h as ThemeAvatarHatId, i as THEME_AVATAR_HAT_IDS, j as THEME_LOCAL_ID_MAX_LENGTH, k as BUILTIN_THEME_IDS, l as THEME_MASCOT_VALUES, m as ThemeArtwork, n as MAX_THEME_DEFINITION_BYTES, o as THEME_CRITTER_IDS, p as THEME_WORKING_PHRASE_MAX_LENGTH, r as THEME_ARTWORK_ID_PATTERN, s as THEME_DESCRIPTION_MAX_LENGTH, t as BUILTIN_THEMES, u as THEME_NAME_MAX_LENGTH, v as ThemeColorMode, w as isThemeAvatarHatId, x as ThemeDescriptor, y as ThemeCritterId } from "./theme-s6T9Ck6Z.mjs";
|
|
2
2
|
export { BUILTIN_THEMES, BUILTIN_THEME_IDS, type BuiltinThemeId, MAX_THEME_DEFINITION_BYTES, THEME_ARTWORK_ID_PATTERN, THEME_AVATAR_HAT_IDS, THEME_COLOR_KEYS, THEME_CRITTER_IDS, THEME_DESCRIPTION_MAX_LENGTH, THEME_FONT_KEYS, THEME_LOCAL_ID_MAX_LENGTH, THEME_LOCAL_ID_PATTERN, THEME_MASCOT_VALUES, THEME_NAME_MAX_LENGTH, THEME_TOKEN_MAX_LENGTH, THEME_WORKING_PHRASES_MAX, THEME_WORKING_PHRASE_MAX_LENGTH, ThemeArtwork, ThemeAvatarHatId, ThemeBranding, ThemeCatalogEntry, ThemeColorMode, ThemeCritterId, ThemeDefinition, ThemeDescriptor, type ThemeId, ThemeMascot, type ThemeMode, ThemePalette, isBuiltinThemeId, isThemeAvatarHatId, isThemeCritterId, isThemeId, normalizeThemeDefinition, normalizeThemeMode, parseThemeDefinition, resolveThemeBranding };
|
package/dist/theme.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as isThemeId, S as isBuiltinThemeId, _ as parseThemeDefinition, a as THEME_COLOR_KEYS, b as THEME_LOCAL_ID_MAX_LENGTH, c as THEME_FONT_KEYS, d as THEME_TOKEN_MAX_LENGTH, f as THEME_WORKING_PHRASES_MAX, g as normalizeThemeDefinition, h as isThemeCritterId, i as THEME_AVATAR_HAT_IDS, l as THEME_MASCOT_VALUES, m as isThemeAvatarHatId, n as MAX_THEME_DEFINITION_BYTES, o as THEME_CRITTER_IDS, p as THEME_WORKING_PHRASE_MAX_LENGTH, r as THEME_ARTWORK_ID_PATTERN, s as THEME_DESCRIPTION_MAX_LENGTH, t as BUILTIN_THEMES, u as THEME_NAME_MAX_LENGTH, v as resolveThemeBranding, w as normalizeThemeMode, x as THEME_LOCAL_ID_PATTERN, y as BUILTIN_THEME_IDS } from "./theme-
|
|
1
|
+
import { C as isThemeId, S as isBuiltinThemeId, _ as parseThemeDefinition, a as THEME_COLOR_KEYS, b as THEME_LOCAL_ID_MAX_LENGTH, c as THEME_FONT_KEYS, d as THEME_TOKEN_MAX_LENGTH, f as THEME_WORKING_PHRASES_MAX, g as normalizeThemeDefinition, h as isThemeCritterId, i as THEME_AVATAR_HAT_IDS, l as THEME_MASCOT_VALUES, m as isThemeAvatarHatId, n as MAX_THEME_DEFINITION_BYTES, o as THEME_CRITTER_IDS, p as THEME_WORKING_PHRASE_MAX_LENGTH, r as THEME_ARTWORK_ID_PATTERN, s as THEME_DESCRIPTION_MAX_LENGTH, t as BUILTIN_THEMES, u as THEME_NAME_MAX_LENGTH, v as resolveThemeBranding, w as normalizeThemeMode, x as THEME_LOCAL_ID_PATTERN, y as BUILTIN_THEME_IDS } from "./theme-_hQKgfH-.mjs";
|
|
2
2
|
export { BUILTIN_THEMES, BUILTIN_THEME_IDS, MAX_THEME_DEFINITION_BYTES, THEME_ARTWORK_ID_PATTERN, THEME_AVATAR_HAT_IDS, THEME_COLOR_KEYS, THEME_CRITTER_IDS, THEME_DESCRIPTION_MAX_LENGTH, THEME_FONT_KEYS, THEME_LOCAL_ID_MAX_LENGTH, THEME_LOCAL_ID_PATTERN, THEME_MASCOT_VALUES, THEME_NAME_MAX_LENGTH, THEME_TOKEN_MAX_LENGTH, THEME_WORKING_PHRASES_MAX, THEME_WORKING_PHRASE_MAX_LENGTH, isBuiltinThemeId, isThemeAvatarHatId, isThemeCritterId, isThemeId, normalizeThemeDefinition, normalizeThemeMode, parseThemeDefinition, resolveThemeBranding };
|