@kittymi/openclaw-generic-http 0.1.3
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/LICENSE +21 -0
- package/README.md +132 -0
- package/dist/channel/account.d.ts +7 -0
- package/dist/channel/account.js +18 -0
- package/dist/channel/capabilities.d.ts +10 -0
- package/dist/channel/capabilities.js +11 -0
- package/dist/channel/host-adapter.d.ts +28 -0
- package/dist/channel/host-adapter.js +36 -0
- package/dist/channel/lifecycle.d.ts +18 -0
- package/dist/channel/lifecycle.js +28 -0
- package/dist/channel/plugin.d.ts +46 -0
- package/dist/channel/plugin.js +120 -0
- package/dist/channel/probe.d.ts +19 -0
- package/dist/channel/probe.js +149 -0
- package/dist/channel/resolve.d.ts +30 -0
- package/dist/channel/resolve.js +98 -0
- package/dist/channel/stream.d.ts +35 -0
- package/dist/channel/stream.js +127 -0
- package/dist/config/host-config-schema.d.ts +21 -0
- package/dist/config/host-config-schema.js +80 -0
- package/dist/config/loader.d.ts +7 -0
- package/dist/config/loader.js +38 -0
- package/dist/config/schema.d.ts +48 -0
- package/dist/config/schema.js +1 -0
- package/dist/errors/codes.d.ts +11 -0
- package/dist/errors/codes.js +10 -0
- package/dist/errors/exceptions.d.ts +7 -0
- package/dist/errors/exceptions.js +12 -0
- package/dist/inbound/mapper.d.ts +21 -0
- package/dist/inbound/mapper.js +22 -0
- package/dist/inbound/validator.d.ts +4 -0
- package/dist/inbound/validator.js +114 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.js +31 -0
- package/dist/mapping/conversation-mapper.d.ts +1 -0
- package/dist/mapping/conversation-mapper.js +3 -0
- package/dist/mapping/sender-mapper.d.ts +1 -0
- package/dist/mapping/sender-mapper.js +3 -0
- package/dist/mapping/thread-mapper.d.ts +1 -0
- package/dist/mapping/thread-mapper.js +7 -0
- package/dist/openclaw-entry.d.ts +276 -0
- package/dist/openclaw-entry.js +728 -0
- package/dist/outbound/client.d.ts +6 -0
- package/dist/outbound/client.js +1 -0
- package/dist/outbound/controller.d.ts +15 -0
- package/dist/outbound/controller.js +28 -0
- package/dist/outbound/http-client.d.ts +23 -0
- package/dist/outbound/http-client.js +150 -0
- package/dist/outbound/mapper.d.ts +29 -0
- package/dist/outbound/mapper.js +19 -0
- package/dist/outbound/mock-client.d.ts +18 -0
- package/dist/outbound/mock-client.js +26 -0
- package/dist/outbound/sender.d.ts +3 -0
- package/dist/outbound/sender.js +5 -0
- package/dist/protocol/attachments.d.ts +10 -0
- package/dist/protocol/attachments.js +56 -0
- package/dist/protocol/dto.d.ts +46 -0
- package/dist/protocol/dto.js +1 -0
- package/dist/protocol/serializer.d.ts +1 -0
- package/dist/protocol/serializer.js +3 -0
- package/dist/security/nonce-store.d.ts +30 -0
- package/dist/security/nonce-store.js +32 -0
- package/dist/security/signer.d.ts +10 -0
- package/dist/security/signer.js +20 -0
- package/dist/security/verifier.d.ts +2 -0
- package/dist/security/verifier.js +20 -0
- package/dist/setup-entry.d.ts +351 -0
- package/dist/setup-entry.js +73 -0
- package/dist/utils/json.d.ts +1 -0
- package/dist/utils/json.js +3 -0
- package/dist/utils/log.d.ts +1 -0
- package/dist/utils/log.js +3 -0
- package/dist/utils/time.d.ts +1 -0
- package/dist/utils/time.js +3 -0
- package/openclaw.config.schema.json +80 -0
- package/openclaw.plugin.json +175 -0
- package/package.json +72 -0
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "openclaw-generic-http",
|
|
3
|
+
"name": "Generic HTTP",
|
|
4
|
+
"version": "0.1.2",
|
|
5
|
+
"description": "Generic HTTP channel plugin for OpenClaw",
|
|
6
|
+
"activation": {
|
|
7
|
+
"onStartup": false
|
|
8
|
+
},
|
|
9
|
+
"configSchema": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"additionalProperties": false,
|
|
12
|
+
"properties": {}
|
|
13
|
+
},
|
|
14
|
+
"entry": "./dist/index.js",
|
|
15
|
+
"setupEntry": "./dist/setup-entry.js",
|
|
16
|
+
"setup": {
|
|
17
|
+
"channelName": "generic-http",
|
|
18
|
+
"title": "Generic HTTP Channel Setup",
|
|
19
|
+
"summary": "Configure a bridge/relay account, wire third-party webhooks into bridge ingress, and consume inbound events through stream polling.",
|
|
20
|
+
"configSchema": "./openclaw.config.schema.json",
|
|
21
|
+
"accountFields": [
|
|
22
|
+
{
|
|
23
|
+
"key": "baseUrl",
|
|
24
|
+
"title": "Bridge Base URL",
|
|
25
|
+
"required": true,
|
|
26
|
+
"description": "Base URL of the bridge or relay service that exposes health, probe, stream, resolve, and outbound endpoints."
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"key": "apiKey",
|
|
30
|
+
"title": "API Key",
|
|
31
|
+
"required": false,
|
|
32
|
+
"description": "Optional shared credential sent on signed requests when the bridge requires API key authentication.",
|
|
33
|
+
"secret": true
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"key": "signingSecret",
|
|
37
|
+
"title": "Signing Secret",
|
|
38
|
+
"required": false,
|
|
39
|
+
"description": "Shared secret used to sign stream, probe, resolve, and outbound requests from the plugin.",
|
|
40
|
+
"secret": true
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"key": "inboundSecret",
|
|
44
|
+
"title": "Inbound Secret",
|
|
45
|
+
"required": false,
|
|
46
|
+
"description": "Optional dedicated secret used by the bridge when validating third-party webhook ingress.",
|
|
47
|
+
"secret": true
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"key": "outboundSecret",
|
|
51
|
+
"title": "Outbound Secret",
|
|
52
|
+
"required": false,
|
|
53
|
+
"description": "Optional dedicated secret used when outbound message signing is separated from other transport signing.",
|
|
54
|
+
"secret": true
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"steps": [
|
|
58
|
+
{
|
|
59
|
+
"id": "configure-account",
|
|
60
|
+
"title": "Configure bridge account",
|
|
61
|
+
"description": "Add at least one account with baseUrl and the shared credentials required by the bridge or relay."
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"id": "wire-webhook-ingress",
|
|
65
|
+
"title": "Wire webhook ingress",
|
|
66
|
+
"description": "Send third-party inbound events to POST /webhooks/inbound/messages on the bridge instead of calling a local OpenClaw URL."
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"id": "activate-stream-ingress",
|
|
70
|
+
"title": "Activate stream ingress",
|
|
71
|
+
"description": "Let the host activate the plugin so it can poll GET /stream/inbound and acknowledge processed messages through POST /stream/acks."
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"id": "verify-outbound-delivery",
|
|
75
|
+
"title": "Verify outbound delivery",
|
|
76
|
+
"description": "Confirm the bridge accepts POST /outbound/messages and that the external system returns successful delivery responses."
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
"channels": [
|
|
81
|
+
"generic-http"
|
|
82
|
+
],
|
|
83
|
+
"channelConfigs": {
|
|
84
|
+
"generic-http": {
|
|
85
|
+
"schema": {
|
|
86
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
87
|
+
"type": "object",
|
|
88
|
+
"title": "Generic HTTP Channel Config",
|
|
89
|
+
"description": "Configuration for the OpenClaw generic HTTP channel plugin using bridge/relay webhook and stream ingress.",
|
|
90
|
+
"properties": {
|
|
91
|
+
"enabled": {
|
|
92
|
+
"type": "boolean",
|
|
93
|
+
"title": "Enabled",
|
|
94
|
+
"description": "Whether the generic HTTP channel is enabled.",
|
|
95
|
+
"default": false
|
|
96
|
+
},
|
|
97
|
+
"defaultAccount": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"title": "Default Account",
|
|
100
|
+
"description": "Default account ID used when the host does not specify one."
|
|
101
|
+
},
|
|
102
|
+
"accounts": {
|
|
103
|
+
"type": "object",
|
|
104
|
+
"title": "Accounts",
|
|
105
|
+
"description": "Per-account bridge and outbound transport settings.",
|
|
106
|
+
"additionalProperties": {
|
|
107
|
+
"type": "object",
|
|
108
|
+
"properties": {
|
|
109
|
+
"baseUrl": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"format": "uri",
|
|
112
|
+
"title": "Bridge Base URL",
|
|
113
|
+
"description": "Bridge or relay base URL used for probe, resolve, stream ingress, and outbound delivery."
|
|
114
|
+
},
|
|
115
|
+
"apiKey": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"title": "API Key",
|
|
118
|
+
"description": "Optional shared credential for bridge authentication."
|
|
119
|
+
},
|
|
120
|
+
"signingSecret": {
|
|
121
|
+
"type": "string",
|
|
122
|
+
"title": "Signing Secret",
|
|
123
|
+
"description": "Shared secret used for signing outbound and stream transport requests."
|
|
124
|
+
},
|
|
125
|
+
"inboundSecret": {
|
|
126
|
+
"type": "string",
|
|
127
|
+
"title": "Inbound Secret",
|
|
128
|
+
"description": "Optional dedicated secret for inbound webhook validation on the bridge side."
|
|
129
|
+
},
|
|
130
|
+
"outboundSecret": {
|
|
131
|
+
"type": "string",
|
|
132
|
+
"title": "Outbound Secret",
|
|
133
|
+
"description": "Optional dedicated secret for outbound signing when outbound trust is split from inbound."
|
|
134
|
+
},
|
|
135
|
+
"connectTimeoutMillis": {
|
|
136
|
+
"type": "number",
|
|
137
|
+
"minimum": 0,
|
|
138
|
+
"title": "Connect Timeout (ms)",
|
|
139
|
+
"description": "HTTP connect timeout in milliseconds.",
|
|
140
|
+
"default": 5000
|
|
141
|
+
},
|
|
142
|
+
"readTimeoutMillis": {
|
|
143
|
+
"type": "number",
|
|
144
|
+
"minimum": 0,
|
|
145
|
+
"title": "Read Timeout (ms)",
|
|
146
|
+
"description": "HTTP read timeout in milliseconds.",
|
|
147
|
+
"default": 10000
|
|
148
|
+
},
|
|
149
|
+
"maxRetries": {
|
|
150
|
+
"type": "number",
|
|
151
|
+
"minimum": 0,
|
|
152
|
+
"title": "Max Retries",
|
|
153
|
+
"description": "Maximum retry count for retryable outbound HTTP failures.",
|
|
154
|
+
"default": 0
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"required": [
|
|
158
|
+
"baseUrl"
|
|
159
|
+
],
|
|
160
|
+
"additionalProperties": false
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"required": [
|
|
165
|
+
"enabled",
|
|
166
|
+
"defaultAccount",
|
|
167
|
+
"accounts"
|
|
168
|
+
],
|
|
169
|
+
"additionalProperties": false
|
|
170
|
+
},
|
|
171
|
+
"label": "Generic HTTP",
|
|
172
|
+
"description": "Bridge external systems into OpenClaw through webhook ingress and stream polling."
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@kittymi/openclaw-generic-http",
|
|
3
|
+
"version": "0.1.3",
|
|
4
|
+
"description": "OpenClaw channel plugin for the generic HTTP protocol",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"openclaw.config.schema.json",
|
|
11
|
+
"openclaw.plugin.json",
|
|
12
|
+
"README.md"
|
|
13
|
+
],
|
|
14
|
+
"keywords": [
|
|
15
|
+
"openclaw",
|
|
16
|
+
"plugin",
|
|
17
|
+
"channel",
|
|
18
|
+
"http",
|
|
19
|
+
"bridge"
|
|
20
|
+
],
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "git+https://github.com/KittyMi/openclaw-generic-http.git"
|
|
24
|
+
},
|
|
25
|
+
"homepage": "https://github.com/KittyMi/openclaw-generic-http",
|
|
26
|
+
"bugs": {
|
|
27
|
+
"url": "https://github.com/KittyMi/openclaw-generic-http/issues"
|
|
28
|
+
},
|
|
29
|
+
"license": "MIT",
|
|
30
|
+
"publishConfig": {
|
|
31
|
+
"access": "public"
|
|
32
|
+
},
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">=22.16.0"
|
|
35
|
+
},
|
|
36
|
+
"openclaw": {
|
|
37
|
+
"pluginManifest": "./openclaw.plugin.json",
|
|
38
|
+
"extensions": [
|
|
39
|
+
"./dist/index.js"
|
|
40
|
+
],
|
|
41
|
+
"runtimeExtensions": [
|
|
42
|
+
"./dist/index.js"
|
|
43
|
+
],
|
|
44
|
+
"setupEntry": "./dist/setup-entry.js",
|
|
45
|
+
"runtimeSetupEntry": "./dist/setup-entry.js",
|
|
46
|
+
"setupFeatures": {
|
|
47
|
+
"configPromotion": true
|
|
48
|
+
},
|
|
49
|
+
"channel": {
|
|
50
|
+
"id": "generic-http",
|
|
51
|
+
"label": "Generic HTTP",
|
|
52
|
+
"selectionLabel": "Generic HTTP",
|
|
53
|
+
"detailLabel": "Generic HTTP Bridge",
|
|
54
|
+
"docsPath": "/channels/generic-http",
|
|
55
|
+
"docsLabel": "generic-http",
|
|
56
|
+
"blurb": "Bridge external systems into OpenClaw through webhook ingress and stream polling.",
|
|
57
|
+
"markdownCapable": false
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"devDependencies": {
|
|
61
|
+
"@types/node": "^22.15.29",
|
|
62
|
+
"typescript": "^5.8.3",
|
|
63
|
+
"vitest": "^2.1.8"
|
|
64
|
+
},
|
|
65
|
+
"scripts": {
|
|
66
|
+
"build": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.json",
|
|
67
|
+
"clean": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
68
|
+
"pack:check": "node -e \"require('node:child_process').execSync('npm pack --dry-run',{stdio:'inherit'});\"",
|
|
69
|
+
"test": "vitest run",
|
|
70
|
+
"test:e2e": "npm run build && node scripts/e2e-bridge-regression.mjs"
|
|
71
|
+
}
|
|
72
|
+
}
|