@openclaw/gateway-protocol 2026.9.3 → 2026.9.5

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.
@@ -0,0 +1,26 @@
1
+ //#region src/server-capabilities.ts
2
+ /** Stable feature names advertised in Gateway hello responses. */
3
+ const GATEWAY_SERVER_CAPS = {
4
+ BOARD_WIDGET_PUT_CANVAS_DOC: "board-widget-put-canvas-doc",
5
+ CHAT_SEND_ROUTING_CONTRACT: "chat-send-routing-contract",
6
+ GATEWAY_RESTART_TARGET_SAFE: "gateway-restart-target-safe-v1",
7
+ MODEL_CATALOG_SNAPSHOT: "model-catalog-snapshot",
8
+ NODE_WORKER_BUNDLE_RETENTION: "node-worker-bundle-retention-v1",
9
+ NODE_WORKER_BUNDLE_STATUS: "node-worker-bundle-status-v1",
10
+ NODE_WORKER_ENVIRONMENT_SESSION: "node-worker-environment-session-v1",
11
+ NODE_WORKER_PORTAL_STREAM: "node-worker-portal-stream-v1",
12
+ PUBLISHED_MODEL_CATALOG: "published-model-catalog",
13
+ PROFILE_BINDING: "profile-binding-v1",
14
+ PROGRESS_CARD_AGENT_SCOPE: "progress-card-agent-scope-v1",
15
+ SESSION_SCOPED_CHAT_METADATA: "session-scoped-chat-metadata",
16
+ SESSION_SCOPED_MODEL_CATALOG: "session-scoped-model-catalog",
17
+ SESSION_UNREAD_ACK_CONTRACT: "session-unread-ack-contract",
18
+ SESSION_GOAL_START: "session-goal-start-v1",
19
+ SESSION_SETTINGS_CONTRACT: "session-settings-contract",
20
+ SESSION_SETTINGS_CAS: "session-settings-cas-v1",
21
+ SYSTEM_AGENT_WIZARD_CANCEL: "openclaw-chat-wizard-cancel",
22
+ SYSTEM_AGENT_SETUP_MODEL_REF: "openclaw-setup-model-ref",
23
+ TASK_SUGGESTIONS_ACCEPT_MODES: "taskSuggestions.acceptModes"
24
+ };
25
+ //#endregion
26
+ export { GATEWAY_SERVER_CAPS as t };
@@ -0,0 +1,18 @@
1
+ //#region src/system-agent-context.d.ts
2
+ /** Ephemeral, quoted UI references. These fields never carry configuration values. */
3
+ export declare const SYSTEM_AGENT_PLUGIN_REFERENCE_MAX_CHARS = 1024;
4
+ export declare const SYSTEM_AGENT_PLUGIN_ID_MAX_CHARS = 128;
5
+ export declare const SYSTEM_AGENT_PLUGIN_NAME_MAX_CHARS = 96;
6
+ export declare const SYSTEM_AGENT_SETTING_PATH_MAX_SEGMENTS = 16;
7
+ export declare const SYSTEM_AGENT_SETTING_SEGMENT_MAX_CHARS = 64;
8
+ export type SystemAgentPluginReference = {
9
+ id: string;
10
+ name: string;
11
+ installed?: boolean;
12
+ setting?: {
13
+ path: string[];
14
+ label: string;
15
+ };
16
+ };
17
+ export declare function normalizeSystemAgentPluginReference(value: unknown): SystemAgentPluginReference | undefined;
18
+ //#endregion
@@ -0,0 +1,29 @@
1
+ //#region src/system-agent-context.ts
2
+ /** Ephemeral, quoted UI references. These fields never carry configuration values. */
3
+ const SYSTEM_AGENT_PLUGIN_REFERENCE_MAX_CHARS = 1024;
4
+ const SYSTEM_AGENT_PLUGIN_ID_MAX_CHARS = 128;
5
+ const SYSTEM_AGENT_PLUGIN_NAME_MAX_CHARS = 96;
6
+ const SYSTEM_AGENT_SETTING_PATH_MAX_SEGMENTS = 16;
7
+ const SYSTEM_AGENT_SETTING_SEGMENT_MAX_CHARS = 64;
8
+ function normalizeSystemAgentPluginReference(value) {
9
+ if (!value || typeof value !== "object" || Array.isArray(value)) return;
10
+ const raw = value;
11
+ if (typeof raw.id !== "string" || !/^[A-Za-z0-9@][A-Za-z0-9@._/-]{0,127}$/u.test(raw.id)) return;
12
+ if (typeof raw.name !== "string" || !raw.name.trim() || raw.name.length > 96) return;
13
+ const reference = {
14
+ id: raw.id,
15
+ name: raw.name.trim()
16
+ };
17
+ if (typeof raw.installed === "boolean") reference.installed = raw.installed;
18
+ if (raw.setting && typeof raw.setting === "object" && !Array.isArray(raw.setting)) {
19
+ const setting = raw.setting;
20
+ 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 = {
21
+ path: [...setting.path],
22
+ label: setting.label.trim()
23
+ };
24
+ }
25
+ if (JSON.stringify(reference).length > 1024) delete reference.setting;
26
+ return JSON.stringify(reference).length <= 1024 ? reference : void 0;
27
+ }
28
+ //#endregion
29
+ export { SYSTEM_AGENT_PLUGIN_ID_MAX_CHARS, SYSTEM_AGENT_PLUGIN_NAME_MAX_CHARS, SYSTEM_AGENT_PLUGIN_REFERENCE_MAX_CHARS, SYSTEM_AGENT_SETTING_PATH_MAX_SEGMENTS, SYSTEM_AGENT_SETTING_SEGMENT_MAX_CHARS, normalizeSystemAgentPluginReference };