@openclaw/slack 2026.5.27 → 2026.5.28-beta.2

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.
Files changed (94) hide show
  1. package/dist/{account-inspect-vVg3pT03.js → account-inspect-CdGk6R7l.js} +1 -1
  2. package/dist/account-inspect-api.js +1 -1
  3. package/dist/{accounts-BnLQ3fe2.js → accounts-f6Xcv9Vi.js} +42 -1
  4. package/dist/accounts.runtime-BJt1IxOS.js +2 -0
  5. package/dist/{action-runtime-JVb7KyQs.js → action-runtime-BOEgcnv6.js} +7 -8
  6. package/dist/action-runtime.runtime-BXQYV0yA.js +2 -0
  7. package/dist/{actions-1o9nMIY8.js → actions-zfVWcIY6.js} +4 -4
  8. package/dist/{actions.runtime-qQtdNww-.js → actions.runtime-CoijPN8g.js} +1 -1
  9. package/dist/api.js +14 -17
  10. package/dist/{approval-handler.runtime-Ba8nwnYi.js → approval-handler.runtime-CWz3XLfN.js} +12 -69
  11. package/dist/{channel-Bd7eept6.js → channel-D8p_1twn.js} +25 -28
  12. package/dist/channel-config-api.js +1 -1
  13. package/dist/channel-plugin-api.js +1 -1
  14. package/dist/{channel.setup-WNNVmCm0.js → channel.setup-oGp4gSTP.js} +4 -4
  15. package/dist/{client-Dc2Ji2YN.js → client-DowBk5k0.js} +6 -24
  16. package/dist/{config-schema-CUiDK8HV.js → config-schema-C0RewpJQ.js} +4 -0
  17. package/dist/contract-api.js +1 -1
  18. package/dist/{directory-config-9_djLTOK.js → directory-config-8UPAEyNg.js} +1 -1
  19. package/dist/directory-contract-api.js +1 -1
  20. package/dist/{directory-live-Cl83cGLZ.js → directory-live-BFB1pSax.js} +2 -2
  21. package/dist/http-routes-api.js +1 -1
  22. package/dist/index.js +3 -7
  23. package/dist/{interactive-replies-DtYu4Sf5.js → interactive-replies-DrBq4Mld.js} +1 -1
  24. package/dist/interactive-replies-api.js +1 -1
  25. package/dist/{message-tool-api-BieXX5lk.js → message-tool-api-B9M0zzlQ.js} +2 -2
  26. package/dist/message-tool-api.js +1 -1
  27. package/dist/{monitor-Cn7LUDFL.js → monitor-D7jGKmQk.js} +3 -4
  28. package/dist/{outbound-adapter-ChuR4_0v.js → outbound-adapter-BHZMgblN.js} +4 -7
  29. package/dist/pipeline.runtime-xM6ppqQZ.js +3492 -0
  30. package/dist/plugin-routes-B9PvcDQJ.js +22 -0
  31. package/dist/{policy-pu8tsF8_.js → policy-BBDU-PQK.js} +1 -1
  32. package/dist/{probe-cBVPhCKZ.js → probe-Djes9Fy6.js} +1 -1
  33. package/dist/{provider-Bccng2Wp.js → provider-CxMP_s2o.js} +828 -28
  34. package/dist/{replies-jiEDV6lH.js → replies-DkmWK7JW.js} +2 -4
  35. package/dist/{resolve-channels-CT4oiz_9.js → resolve-channels-zXt5f47h.js} +1 -1
  36. package/dist/{resolve-users-o5S-Ijks.js → resolve-users-BLfGAz1v.js} +1 -1
  37. package/dist/{runtime-api-CyPE-EvY.js → runtime-api-DvpUD2hw.js} +2 -2
  38. package/dist/runtime-api.js +12 -12
  39. package/dist/{scopes-CnyhLIPT.js → scopes-DiiHsqh1.js} +1 -1
  40. package/dist/{send-DvfE8LVm.js → send-BURYyCXI.js} +4 -4
  41. package/dist/send.runtime-CKaMG3s-.js +2 -0
  42. package/dist/{setup-core-DKe7Ug3V.js → setup-core-POfI_bgP.js} +2 -2
  43. package/dist/setup-entry.js +8 -1
  44. package/dist/setup-plugin-api.js +1 -1
  45. package/dist/{setup-surface-gjRthuZA.js → setup-surface-DJTHAguz.js} +5 -5
  46. package/dist/{shared-D8A7iVVH.js → shared-D9WMYymo.js} +5 -5
  47. package/dist/{slash-dispatch.runtime-BBhdJHb8.js → slash-dispatch.runtime-lsyTm_q5.js} +1 -1
  48. package/dist/thread-ts-NSVqWybn.js +646 -0
  49. package/node_modules/semver/classes/range.js +7 -0
  50. package/node_modules/semver/package.json +1 -1
  51. package/node_modules/semver/ranges/subset.js +2 -2
  52. package/npm-shrinkwrap.json +6 -29
  53. package/openclaw.plugin.json +10 -0
  54. package/package.json +8 -7
  55. package/dist/accounts.runtime-BVdtQeuq.js +0 -2
  56. package/dist/action-runtime.runtime-BZa5VDjs.js +0 -2
  57. package/dist/allow-list-B1lkGjwl.js +0 -82
  58. package/dist/blocks-render-CNC4vQnd.js +0 -232
  59. package/dist/inbound-contract-test-api.js +0 -3
  60. package/dist/magic-string.es-BPXBBMwL.js +0 -1011
  61. package/dist/outbound-payload-test-api.js +0 -2
  62. package/dist/outbound-payload.test-harness-8MnHFgR1.js +0 -13551
  63. package/dist/pipeline.runtime-BVK8yXw_.js +0 -1473
  64. package/dist/plugin-routes-DRR3ijKM.js +0 -20
  65. package/dist/prepare-Bl5WcC3f.js +0 -1713
  66. package/dist/prepare.test-helpers-BcAo4KMw.js +0 -49
  67. package/dist/reply-blocks-BlOURkUm.js +0 -290
  68. package/dist/room-context-BmNTBiw5.js +0 -816
  69. package/dist/send.runtime-Dv6ajTGK.js +0 -2
  70. package/dist/send.runtime-v3TSw9xY.js +0 -2
  71. package/dist/test-api.js +0 -8
  72. package/dist/thread-ts-ks-O8cEG.js +0 -52
  73. package/node_modules/agent-base/LICENSE +0 -22
  74. package/node_modules/agent-base/README.md +0 -69
  75. package/node_modules/agent-base/dist/helpers.d.ts +0 -10
  76. package/node_modules/agent-base/dist/helpers.d.ts.map +0 -1
  77. package/node_modules/agent-base/dist/helpers.js +0 -37
  78. package/node_modules/agent-base/dist/helpers.js.map +0 -1
  79. package/node_modules/agent-base/dist/index.d.ts +0 -37
  80. package/node_modules/agent-base/dist/index.d.ts.map +0 -1
  81. package/node_modules/agent-base/dist/index.js +0 -146
  82. package/node_modules/agent-base/dist/index.js.map +0 -1
  83. package/node_modules/agent-base/package.json +0 -46
  84. package/node_modules/https-proxy-agent/LICENSE +0 -22
  85. package/node_modules/https-proxy-agent/README.md +0 -70
  86. package/node_modules/https-proxy-agent/dist/index.d.ts +0 -43
  87. package/node_modules/https-proxy-agent/dist/index.d.ts.map +0 -1
  88. package/node_modules/https-proxy-agent/dist/index.js +0 -150
  89. package/node_modules/https-proxy-agent/dist/index.js.map +0 -1
  90. package/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +0 -12
  91. package/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts.map +0 -1
  92. package/node_modules/https-proxy-agent/dist/parse-proxy-response.js +0 -94
  93. package/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +0 -1
  94. package/node_modules/https-proxy-agent/package.json +0 -50
@@ -1,150 +0,0 @@
1
- import * as net from 'net';
2
- import * as tls from 'tls';
3
- import assert from 'assert';
4
- import createDebug from 'debug';
5
- import { Agent } from 'agent-base';
6
- import { URL } from 'url';
7
- import { parseProxyResponse } from './parse-proxy-response.js';
8
- const debug = createDebug('https-proxy-agent');
9
- const setServernameFromNonIpHost = (options) => {
10
- if (options.servername === undefined &&
11
- options.host &&
12
- !net.isIP(options.host)) {
13
- return {
14
- ...options,
15
- servername: options.host,
16
- };
17
- }
18
- return options;
19
- };
20
- /**
21
- * The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to
22
- * the specified "HTTP(s) proxy server" in order to proxy HTTPS requests.
23
- *
24
- * Outgoing HTTP requests are first tunneled through the proxy server using the
25
- * `CONNECT` HTTP request method to establish a connection to the proxy server,
26
- * and then the proxy server connects to the destination target and issues the
27
- * HTTP request from the proxy server.
28
- *
29
- * `https:` requests have their socket connection upgraded to TLS once
30
- * the connection to the proxy server has been established.
31
- */
32
- export class HttpsProxyAgent extends Agent {
33
- constructor(proxy, opts) {
34
- super(opts);
35
- this.options = { path: undefined };
36
- this.proxy = typeof proxy === 'string' ? new URL(proxy) : proxy;
37
- this.proxyHeaders = opts?.headers ?? {};
38
- debug('Creating new HttpsProxyAgent instance: %o', this.proxy.href);
39
- // Trim off the brackets from IPv6 addresses
40
- const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, '');
41
- const port = this.proxy.port
42
- ? parseInt(this.proxy.port, 10)
43
- : this.proxy.protocol === 'https:'
44
- ? 443
45
- : 80;
46
- this.connectOpts = {
47
- // Attempt to negotiate http/1.1 for proxy servers that support http/2
48
- ALPNProtocols: ['http/1.1'],
49
- ...(opts ? omit(opts, 'headers') : null),
50
- host,
51
- port,
52
- };
53
- }
54
- /**
55
- * Called when the node-core HTTP client library is creating a
56
- * new HTTP request.
57
- */
58
- async connect(req, opts) {
59
- const { proxy } = this;
60
- if (!opts.host) {
61
- throw new TypeError('No "host" provided');
62
- }
63
- // Create a socket connection to the proxy server.
64
- let socket;
65
- if (proxy.protocol === 'https:') {
66
- debug('Creating `tls.Socket`: %o', this.connectOpts);
67
- socket = tls.connect(setServernameFromNonIpHost(this.connectOpts));
68
- }
69
- else {
70
- debug('Creating `net.Socket`: %o', this.connectOpts);
71
- socket = net.connect(this.connectOpts);
72
- }
73
- const headers = typeof this.proxyHeaders === 'function'
74
- ? this.proxyHeaders()
75
- : { ...this.proxyHeaders };
76
- const host = net.isIPv6(opts.host) ? `[${opts.host}]` : opts.host;
77
- let payload = `CONNECT ${host}:${opts.port} HTTP/1.1\r\n`;
78
- // Inject the `Proxy-Authorization` header if necessary.
79
- if (proxy.username || proxy.password) {
80
- const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`;
81
- headers['Proxy-Authorization'] = `Basic ${Buffer.from(auth).toString('base64')}`;
82
- }
83
- headers.Host = `${host}:${opts.port}`;
84
- if (!headers['Proxy-Connection']) {
85
- headers['Proxy-Connection'] = this.keepAlive
86
- ? 'Keep-Alive'
87
- : 'close';
88
- }
89
- for (const name of Object.keys(headers)) {
90
- payload += `${name}: ${headers[name]}\r\n`;
91
- }
92
- const proxyResponsePromise = parseProxyResponse(socket);
93
- socket.write(`${payload}\r\n`);
94
- const { connect, buffered } = await proxyResponsePromise;
95
- req.emit('proxyConnect', connect);
96
- this.emit('proxyConnect', connect, req);
97
- if (connect.statusCode === 200) {
98
- req.once('socket', resume);
99
- if (opts.secureEndpoint) {
100
- // The proxy is connecting to a TLS server, so upgrade
101
- // this socket connection to a TLS connection.
102
- debug('Upgrading socket connection to TLS');
103
- return tls.connect({
104
- ...omit(setServernameFromNonIpHost(opts), 'host', 'path', 'port'),
105
- socket,
106
- });
107
- }
108
- return socket;
109
- }
110
- // Some other status code that's not 200... need to re-play the HTTP
111
- // header "data" events onto the socket once the HTTP machinery is
112
- // attached so that the node core `http` can parse and handle the
113
- // error status code.
114
- // Close the original socket, and a new "fake" socket is returned
115
- // instead, so that the proxy doesn't get the HTTP request
116
- // written to it (which may contain `Authorization` headers or other
117
- // sensitive data).
118
- //
119
- // See: https://hackerone.com/reports/541502
120
- socket.destroy();
121
- const fakeSocket = new net.Socket({ writable: false });
122
- fakeSocket.readable = true;
123
- // Need to wait for the "socket" event to re-play the "data" events.
124
- req.once('socket', (s) => {
125
- debug('Replaying proxy buffer for failed request');
126
- assert(s.listenerCount('data') > 0);
127
- // Replay the "buffered" Buffer onto the fake `socket`, since at
128
- // this point the HTTP module machinery has been hooked up for
129
- // the user.
130
- s.push(buffered);
131
- s.push(null);
132
- });
133
- return fakeSocket;
134
- }
135
- }
136
- HttpsProxyAgent.protocols = ['http', 'https'];
137
- function resume(socket) {
138
- socket.resume();
139
- }
140
- function omit(obj, ...keys) {
141
- const ret = {};
142
- let key;
143
- for (key in obj) {
144
- if (!keys.includes(key)) {
145
- ret[key] = obj[key];
146
- }
147
- }
148
- return ret;
149
- }
150
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAC3B,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAE3B,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,WAAW,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,KAAK,EAAoB,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CA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AAC,MAAkC;IACjD,MAAM,CAAC,MAAM,EAAE,CAAC;AACjB,CAAC;AAED,SAAS,IAAI,CACZ,GAAM,EACN,GAAG,IAAO;IAIV,MAAM,GAAG,GAAG,EAEX,CAAC;IACF,IAAI,GAAqB,CAAC;IAC1B,KAAK,GAAG,IAAI,GAAG,EAAE,CAAC;QACjB,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YACzB,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;QACrB,CAAC;IACF,CAAC;IACD,OAAO,GAAG,CAAC;AACZ,CAAC"}
@@ -1,12 +0,0 @@
1
- import { IncomingHttpHeaders } from 'http';
2
- import { Readable } from 'stream';
3
- export interface ConnectResponse {
4
- statusCode: number;
5
- statusText: string;
6
- headers: IncomingHttpHeaders;
7
- }
8
- export declare function parseProxyResponse(socket: Readable): Promise<{
9
- connect: ConnectResponse;
10
- buffered: Buffer;
11
- }>;
12
- //# sourceMappingURL=parse-proxy-response.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parse-proxy-response.d.ts","sourceRoot":"","sources":["../src/parse-proxy-response.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,MAAM,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAIlC,MAAM,WAAW,eAAe;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,mBAAmB,CAAC;CAC7B;AAED,wBAAgB,kBAAkB,CACjC,MAAM,EAAE,QAAQ,GACd,OAAO,CAAC;IAAE,OAAO,EAAE,eAAe,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CAyGzD"}
@@ -1,94 +0,0 @@
1
- import createDebug from 'debug';
2
- const debug = createDebug('https-proxy-agent:parse-proxy-response');
3
- export function parseProxyResponse(socket) {
4
- return new Promise((resolve, reject) => {
5
- // we need to buffer any HTTP traffic that happens with the proxy before we get
6
- // the CONNECT response, so that if the response is anything other than an "200"
7
- // response code, then we can re-play the "data" events on the socket once the
8
- // HTTP parser is hooked up...
9
- let buffersLength = 0;
10
- const buffers = [];
11
- function read() {
12
- const b = socket.read();
13
- if (b)
14
- ondata(b);
15
- else
16
- socket.once('readable', read);
17
- }
18
- function cleanup() {
19
- socket.removeListener('end', onend);
20
- socket.removeListener('error', onerror);
21
- socket.removeListener('readable', read);
22
- }
23
- function onend() {
24
- cleanup();
25
- debug('onend');
26
- reject(new Error('Proxy connection ended before receiving CONNECT response'));
27
- }
28
- function onerror(err) {
29
- cleanup();
30
- debug('onerror %o', err);
31
- reject(err);
32
- }
33
- function ondata(b) {
34
- buffers.push(b);
35
- buffersLength += b.length;
36
- const buffered = Buffer.concat(buffers, buffersLength);
37
- const endOfHeaders = buffered.indexOf('\r\n\r\n');
38
- if (endOfHeaders === -1) {
39
- // keep buffering
40
- debug('have not received end of HTTP headers yet...');
41
- read();
42
- return;
43
- }
44
- const headerParts = buffered
45
- .slice(0, endOfHeaders)
46
- .toString('ascii')
47
- .split('\r\n');
48
- const firstLine = headerParts.shift();
49
- if (!firstLine) {
50
- socket.destroy();
51
- return reject(new Error('No header received from proxy CONNECT response'));
52
- }
53
- const firstLineParts = firstLine.split(' ');
54
- const statusCode = +firstLineParts[1];
55
- const statusText = firstLineParts.slice(2).join(' ');
56
- const headers = {};
57
- for (const header of headerParts) {
58
- if (!header)
59
- continue;
60
- const firstColon = header.indexOf(':');
61
- if (firstColon === -1) {
62
- socket.destroy();
63
- return reject(new Error(`Invalid header from proxy CONNECT response: "${header}"`));
64
- }
65
- const key = header.slice(0, firstColon).toLowerCase();
66
- const value = header.slice(firstColon + 1).trimStart();
67
- const current = headers[key];
68
- if (typeof current === 'string') {
69
- headers[key] = [current, value];
70
- }
71
- else if (Array.isArray(current)) {
72
- current.push(value);
73
- }
74
- else {
75
- headers[key] = value;
76
- }
77
- }
78
- debug('got proxy server response: %o %o', firstLine, headers);
79
- cleanup();
80
- resolve({
81
- connect: {
82
- statusCode,
83
- statusText,
84
- headers,
85
- },
86
- buffered,
87
- });
88
- }
89
- socket.on('error', onerror);
90
- socket.on('end', onend);
91
- read();
92
- });
93
- }
94
- //# sourceMappingURL=parse-proxy-response.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parse-proxy-response.js","sourceRoot":"","sources":["../src/parse-proxy-response.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,OAAO,CAAC;AAIhC,MAAM,KAAK,GAAG,WAAW,CAAC,wCAAwC,CAAC,CAAC;AAQpE,MAAM,UAAU,kBAAkB,CACjC,MAAgB;IAEhB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACtC,+EAA+E;QAC/E,gFAAgF;QAChF,8EAA8E;QAC9E,8BAA8B;QAC9B,IAAI,aAAa,GAAG,CAAC,CAAC;QACtB,MAAM,OAAO,GAAa,EAAE,CAAC;QAE7B,SAAS,IAAI;YACZ,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;YACxB,IAAI,CAAC;gBAAE,MAAM,CAAC,CAAC,CAAC,CAAC;;gBACZ,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QACpC,CAAC;QAED,SAAS,OAAO;YACf,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YACpC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YACxC,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QACzC,CAAC;QAED,SAAS,KAAK;YACb,OAAO,EAAE,CAAC;YACV,KAAK,CAAC,OAAO,CAAC,CAAC;YACf,MAAM,CACL,IAAI,KAAK,CACR,0DAA0D,CAC1D,CACD,CAAC;QACH,CAAC;QAED,SAAS,OAAO,CAAC,GAAU;YAC1B,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-1,50 +0,0 @@
1
- {
2
- "name": "https-proxy-agent",
3
- "version": "9.0.0",
4
- "type": "module",
5
- "description": "An HTTP(s) proxy `http.Agent` implementation for HTTPS",
6
- "exports": {
7
- "types": "./dist/index.d.ts",
8
- "default": "./dist/index.js"
9
- },
10
- "files": [
11
- "dist"
12
- ],
13
- "repository": {
14
- "type": "git",
15
- "url": "https://github.com/TooTallNate/proxy-agents.git",
16
- "directory": "packages/https-proxy-agent"
17
- },
18
- "keywords": [
19
- "https",
20
- "proxy",
21
- "endpoint",
22
- "agent"
23
- ],
24
- "author": "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io/)",
25
- "license": "MIT",
26
- "dependencies": {
27
- "debug": "^4.3.4",
28
- "agent-base": "9.0.0"
29
- },
30
- "devDependencies": {
31
- "@types/async-retry": "^1.4.5",
32
- "@types/debug": "^4.1.7",
33
- "@types/node": "^22.13.0",
34
- "async-listen": "^3.0.0",
35
- "async-retry": "^1.3.3",
36
- "typescript": "^5.1.6",
37
- "proxy": "4.0.0",
38
- "tsconfig": "0.0.0"
39
- },
40
- "engines": {
41
- "node": ">= 20"
42
- },
43
- "scripts": {
44
- "build": "tsc",
45
- "test": "vitest --exclude test/e2e.test.ts",
46
- "test-e2e": "vitest run test/e2e.test.ts",
47
- "lint": "eslint --ext .ts",
48
- "pack": "node ../../scripts/pack.mjs"
49
- }
50
- }