@openclaw/discord 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 (104) hide show
  1. package/dist/action-runtime-api.js +1 -1
  2. package/dist/{api-Kq7vtaSO.js → api-ChQJ1kfZ.js} +2 -5
  3. package/dist/api.js +14 -14
  4. package/dist/{approval-handler.runtime-BDxD97LJ.js → approval-handler.runtime-CIZiiFBd.js} +5 -18
  5. package/dist/{audit-BdUjE2tr.js → audit-D6BXQsYY.js} +3 -3
  6. package/dist/{channel-9YoMy5Jf.js → channel--B_psO5e.js} +16 -16
  7. package/dist/{channel-actions-DZfkB0nd.js → channel-actions-BOH34yJ5.js} +2 -2
  8. package/dist/{channel-actions.runtime-suaDJHH0.js → channel-actions.runtime-B1RCm1JP.js} +10 -13
  9. package/dist/channel-config-api.js +1 -1
  10. package/dist/channel-plugin-api.js +1 -1
  11. package/dist/{channel.setup-B-kHacpx.js → channel.setup-COYdCbY_.js} +3 -3
  12. package/dist/{components-Dlc81IU5.js → components-DX5Baphr.js} +61 -20
  13. package/dist/{config-schema-CTzLsQlB.js → config-schema-3tZYNVTM.js} +13 -1
  14. package/dist/contract-api.js +2 -2
  15. package/dist/{conversation-identity-DAEgiGDV.js → conversation-identity-Dugx5WfH.js} +2 -2
  16. package/dist/{directory-config-Cgp0csDd.js → directory-config-CcjUkNgK.js} +1 -1
  17. package/dist/directory-contract-api.js +1 -1
  18. package/dist/{directory-live-C-ECRrM8.js → directory-live-NOtxlJZ3.js} +2 -2
  19. package/dist/{doctor-Q80i7GdG.js → doctor-Dy7sI1sL.js} +1 -1
  20. package/dist/{handle-action.guild-admin-DWFTAcfd.js → handle-action.guild-admin-wC9VaAdl.js} +11 -8
  21. package/dist/index.js +1 -1
  22. package/dist/{manager.runtime-D6V2SPKr.js → manager.runtime-Bwgq6hJW.js} +4 -5
  23. package/dist/{message-handler-B5-UG_oD.js → message-handler-DhqxKFLP.js} +9 -9
  24. package/dist/{message-handler.preflight-Ddww-wnF.js → message-handler.preflight-BC8QmsWW.js} +10 -10
  25. package/dist/{message-handler.process-HWGh2NOP.js → message-handler.process-DE1an2G4.js} +85 -17
  26. package/dist/{message-utils-4w0_DPFE.js → message-utils-BlvuUPP4.js} +1 -1
  27. package/dist/{outbound-adapter-DYUYRaBd.js → outbound-adapter-BGrOFkR8.js} +9 -7
  28. package/dist/{pluralkit-BS1MuvYs.js → pluralkit-Cq_PUr06.js} +1 -1
  29. package/dist/{probe-DfIM7zSY.js → probe-CSBPZIYV.js} +1 -1
  30. package/dist/{probe.runtime-DoXDN3rt.js → probe.runtime-BhWW0223.js} +1 -1
  31. package/dist/{provider-CO6pih5z.js → provider-DIVQuJTw.js} +99 -44
  32. package/dist/{provider-session.runtime-BD5XLPI8.js → provider-session.runtime-C7jT_K-7.js} +3 -3
  33. package/dist/provider.runtime-BtnupyG-.js +2 -0
  34. package/dist/{resolve-allowlist-common-QzX-w4-_.js → resolve-allowlist-common-CzfIcLSO.js} +1 -1
  35. package/dist/{resolve-channels-pD06YNCU.js → resolve-channels-CQ13aBCV.js} +3 -3
  36. package/dist/{resolve-users-BiWLqNNO.js → resolve-users-Bj4Y4uWR.js} +3 -3
  37. package/dist/retry-after-CSukypPP.js +21 -0
  38. package/dist/{runtime-xSazIM0F.js → runtime-DA70ebm-.js} +26 -23
  39. package/dist/runtime-api.actions.js +2 -2
  40. package/dist/runtime-api.js +19 -19
  41. package/dist/runtime-api.lookup.js +5 -5
  42. package/dist/runtime-api.monitor-P-emTjcx.js +5 -0
  43. package/dist/runtime-api.monitor.js +4 -4
  44. package/dist/runtime-api.send.js +5 -5
  45. package/dist/runtime-api.threads.js +3 -3
  46. package/dist/{send-BzXZ8iUI.js → send-3r8QQkTY.js} +7 -7
  47. package/dist/{send.components-AK8K4TwB.js → send.components-2qRLUwBn.js} +6 -6
  48. package/dist/{send.outbound-ZrMnBa8C.js → send.outbound-LjX_KYiO.js} +3 -3
  49. package/dist/{send.receipt-BzfsP3Bb.js → send.receipt-Bo_43DQZ.js} +64 -35
  50. package/dist/{send.shared-ehnDGwXx.js → send.shared-CXctTF1I.js} +2 -2
  51. package/dist/setup-plugin-api.js +1 -1
  52. package/dist/{shared-ToNRC7ax.js → shared-D3NkInmq.js} +2 -2
  53. package/dist/{subagent-hooks-Di_2iXU8.js → subagent-hooks-DoWTMQyQ.js} +2 -2
  54. package/dist/subagent-hooks-api.js +1 -1
  55. package/dist/{system-events-DbqKnNPF.js → system-events-DV85gUxb.js} +1 -1
  56. package/dist/{target-resolver-DXPvq5-L.js → target-resolver-DVpZI7ZL.js} +2 -2
  57. package/dist/targets-0WHF7kV0.js +3 -0
  58. package/dist/{thread-bindings-Bw40FTRZ.js → thread-bindings-Cm3GqlNC.js} +4 -4
  59. package/dist/{thread-bindings.discord-api-irWYI8YX.js → thread-bindings.discord-api-JrJXT7L0.js} +4 -4
  60. package/dist/{thread-bindings.manager-LoYZzlss.js → thread-bindings.manager-DqJuGG-r.js} +3 -3
  61. package/dist/transcripts-source-api.js +1 -1
  62. package/dist/{transcripts-source-CwahHAYt.js → transcripts-source-lEfSvSRD.js} +1 -1
  63. package/dist/{typing-Cv09OhaY.js → typing-DlT_14RX.js} +1 -1
  64. package/npm-shrinkwrap.json +3 -49
  65. package/openclaw.plugin.json +35 -1
  66. package/package.json +5 -7
  67. package/dist/inbound-context-B5EsqsSr.js +0 -48
  68. package/dist/provider.runtime-pUGk7VR5.js +0 -2
  69. package/dist/runtime-api.monitor-BjgSsR6H.js +0 -5
  70. package/dist/targets-BBVHRaeO.js +0 -3
  71. package/dist/test-api.js +0 -45
  72. package/node_modules/agent-base/LICENSE +0 -22
  73. package/node_modules/agent-base/README.md +0 -69
  74. package/node_modules/agent-base/dist/helpers.d.ts +0 -10
  75. package/node_modules/agent-base/dist/helpers.d.ts.map +0 -1
  76. package/node_modules/agent-base/dist/helpers.js +0 -37
  77. package/node_modules/agent-base/dist/helpers.js.map +0 -1
  78. package/node_modules/agent-base/dist/index.d.ts +0 -37
  79. package/node_modules/agent-base/dist/index.d.ts.map +0 -1
  80. package/node_modules/agent-base/dist/index.js +0 -146
  81. package/node_modules/agent-base/dist/index.js.map +0 -1
  82. package/node_modules/agent-base/package.json +0 -46
  83. package/node_modules/debug/LICENSE +0 -20
  84. package/node_modules/debug/README.md +0 -481
  85. package/node_modules/debug/package.json +0 -64
  86. package/node_modules/debug/src/browser.js +0 -272
  87. package/node_modules/debug/src/common.js +0 -292
  88. package/node_modules/debug/src/index.js +0 -10
  89. package/node_modules/debug/src/node.js +0 -263
  90. package/node_modules/https-proxy-agent/LICENSE +0 -22
  91. package/node_modules/https-proxy-agent/README.md +0 -70
  92. package/node_modules/https-proxy-agent/dist/index.d.ts +0 -43
  93. package/node_modules/https-proxy-agent/dist/index.d.ts.map +0 -1
  94. package/node_modules/https-proxy-agent/dist/index.js +0 -150
  95. package/node_modules/https-proxy-agent/dist/index.js.map +0 -1
  96. package/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +0 -12
  97. package/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts.map +0 -1
  98. package/node_modules/https-proxy-agent/dist/parse-proxy-response.js +0 -94
  99. package/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +0 -1
  100. package/node_modules/https-proxy-agent/package.json +0 -50
  101. package/node_modules/ms/index.js +0 -162
  102. package/node_modules/ms/license.md +0 -21
  103. package/node_modules/ms/package.json +0 -38
  104. package/node_modules/ms/readme.md +0 -59
@@ -399,6 +399,9 @@
399
399
  "raw",
400
400
  "status"
401
401
  ]
402
+ },
403
+ "commentary": {
404
+ "type": "boolean"
402
405
  }
403
406
  },
404
407
  "additionalProperties": false
@@ -1051,6 +1054,14 @@
1051
1054
  "type": "string",
1052
1055
  "minLength": 1
1053
1056
  },
1057
+ "speakerVoice": {
1058
+ "type": "string",
1059
+ "minLength": 1
1060
+ },
1061
+ "speakerVoiceId": {
1062
+ "type": "string",
1063
+ "minLength": 1
1064
+ },
1054
1065
  "voice": {
1055
1066
  "type": "string",
1056
1067
  "minLength": 1
@@ -2168,6 +2179,9 @@
2168
2179
  "raw",
2169
2180
  "status"
2170
2181
  ]
2182
+ },
2183
+ "commentary": {
2184
+ "type": "boolean"
2171
2185
  }
2172
2186
  },
2173
2187
  "additionalProperties": false
@@ -2820,6 +2834,14 @@
2820
2834
  "type": "string",
2821
2835
  "minLength": 1
2822
2836
  },
2837
+ "speakerVoice": {
2838
+ "type": "string",
2839
+ "minLength": 1
2840
+ },
2841
+ "speakerVoiceId": {
2842
+ "type": "string",
2843
+ "minLength": 1
2844
+ },
2823
2845
  "voice": {
2824
2846
  "type": "string",
2825
2847
  "minLength": 1
@@ -3666,6 +3688,10 @@
3666
3688
  "label": "Discord Progress Tool Lines",
3667
3689
  "help": "Show compact tool/progress lines in progress draft mode (default: true). Set false to keep only the label until final delivery."
3668
3690
  },
3691
+ "streaming.progress.commentary": {
3692
+ "label": "Discord Progress Commentary",
3693
+ "help": "Show assistant commentary/preamble text in the temporary progress draft. Final answer delivery is unchanged."
3694
+ },
3669
3695
  "streaming.progress.commandText": {
3670
3696
  "label": "Discord Progress Command Text",
3671
3697
  "help": "Command/exec detail in progress draft lines: \"raw\" preserves released behavior; \"status\" shows only the tool label."
@@ -3798,9 +3824,17 @@
3798
3824
  "label": "Discord Realtime Model",
3799
3825
  "help": "Provider realtime session model, such as gpt-realtime-2. This is separate from voice.model, which remains the OpenClaw agent brain model."
3800
3826
  },
3827
+ "voice.realtime.speakerVoice": {
3828
+ "label": "Discord Realtime Speaker Voice",
3829
+ "help": "Provider realtime output voice name, such as cedar."
3830
+ },
3831
+ "voice.realtime.speakerVoiceId": {
3832
+ "label": "Discord Realtime Speaker Voice ID",
3833
+ "help": "Provider realtime output voice id."
3834
+ },
3801
3835
  "voice.realtime.voice": {
3802
3836
  "label": "Discord Realtime Voice",
3803
- "help": "Provider realtime output voice, such as cedar."
3837
+ "help": "Deprecated provider realtime output voice. Use voice.realtime.speakerVoice."
3804
3838
  },
3805
3839
  "voice.realtime.toolPolicy": {
3806
3840
  "label": "Discord Realtime Tool Policy",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/discord",
3
- "version": "2026.5.27",
3
+ "version": "2026.5.28-beta.2",
4
4
  "description": "OpenClaw Discord channel plugin for channels, DMs, commands, and app events.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -10,14 +10,13 @@
10
10
  "dependencies": {
11
11
  "@discordjs/voice": "0.19.2",
12
12
  "discord-api-types": "0.38.48",
13
- "https-proxy-agent": "9.0.0",
14
13
  "libopus-wasm": "0.1.0",
15
14
  "typebox": "1.1.38",
16
15
  "undici": "8.3.0",
17
16
  "ws": "8.21.0"
18
17
  },
19
18
  "peerDependencies": {
20
- "openclaw": ">=2026.5.27"
19
+ "openclaw": ">=2026.5.28-beta.2"
21
20
  },
22
21
  "peerDependenciesMeta": {
23
22
  "openclaw": {
@@ -57,14 +56,14 @@
57
56
  "install": {
58
57
  "npmSpec": "@openclaw/discord",
59
58
  "defaultChoice": "npm",
60
- "minHostVersion": ">=2026.5.27",
59
+ "minHostVersion": ">=2026.5.26",
61
60
  "allowInvalidConfigRecovery": true
62
61
  },
63
62
  "compat": {
64
- "pluginApi": ">=2026.5.27"
63
+ "pluginApi": ">=2026.5.28-beta.2"
65
64
  },
66
65
  "build": {
67
- "openclawVersion": "2026.5.27"
66
+ "openclawVersion": "2026.5.28-beta.2"
68
67
  },
69
68
  "release": {
70
69
  "publishToClawHub": true,
@@ -83,7 +82,6 @@
83
82
  "bundledDependencies": [
84
83
  "@discordjs/voice",
85
84
  "discord-api-types",
86
- "https-proxy-agent",
87
85
  "libopus-wasm",
88
86
  "typebox",
89
87
  "undici",
@@ -1,48 +0,0 @@
1
- import { h as resolveDiscordOwnerAllowFrom, p as resolveDiscordMemberAllowed } from "./allow-list-BnkWtVpA.js";
2
- //#region extensions/discord/src/monitor/inbound-context.ts
3
- function createDiscordSupplementalContextAccessChecker(params) {
4
- return (sender) => {
5
- if (!params.isGuild) return true;
6
- return resolveDiscordMemberAllowed({
7
- userAllowList: params.channelConfig?.users ?? params.guildInfo?.users,
8
- roleAllowList: params.channelConfig?.roles ?? params.guildInfo?.roles,
9
- memberRoleIds: sender.memberRoleIds ?? [],
10
- userId: sender.id ?? "",
11
- userName: sender.name,
12
- userTag: sender.tag,
13
- allowNameMatching: params.allowNameMatching
14
- });
15
- };
16
- }
17
- function buildDiscordGroupSystemPrompt(channelConfig) {
18
- const systemPromptParts = [channelConfig?.systemPrompt?.trim() || null].filter((entry) => Boolean(entry));
19
- return systemPromptParts.length > 0 ? systemPromptParts.join("\n\n") : void 0;
20
- }
21
- function buildDiscordUntrustedContext(params) {
22
- if (!params.isGuild) return;
23
- const entries = [];
24
- if (typeof params.channelTopic === "string" && params.channelTopic.trim().length > 0) entries.push({
25
- label: "Discord channel metadata",
26
- source: "discord",
27
- type: "channel_metadata",
28
- payload: { topic: params.channelTopic.trim() }
29
- });
30
- return entries.length > 0 ? entries : void 0;
31
- }
32
- function buildDiscordInboundAccessContext(params) {
33
- return {
34
- groupSystemPrompt: params.isGuild ? buildDiscordGroupSystemPrompt(params.channelConfig) : void 0,
35
- untrustedContext: buildDiscordUntrustedContext({
36
- isGuild: params.isGuild,
37
- channelTopic: params.channelTopic
38
- }),
39
- ownerAllowFrom: resolveDiscordOwnerAllowFrom({
40
- channelConfig: params.channelConfig,
41
- guildInfo: params.guildInfo,
42
- sender: params.sender,
43
- allowNameMatching: params.allowNameMatching
44
- })
45
- };
46
- }
47
- //#endregion
48
- export { buildDiscordInboundAccessContext as n, createDiscordSupplementalContextAccessChecker as r, buildDiscordGroupSystemPrompt as t };
@@ -1,2 +0,0 @@
1
- import { t as monitorDiscordProvider } from "./provider-CO6pih5z.js";
2
- export { monitorDiscordProvider };
@@ -1,5 +0,0 @@
1
- import "./allow-list-BnkWtVpA.js";
2
- import "./provider-CO6pih5z.js";
3
- import "./message-utils-4w0_DPFE.js";
4
- import "./message-handler-B5-UG_oD.js";
5
- export {};
@@ -1,3 +0,0 @@
1
- import "./send.receipt-BzfsP3Bb.js";
2
- import "./target-resolver-DXPvq5-L.js";
3
- export {};
package/dist/test-api.js DELETED
@@ -1,45 +0,0 @@
1
- import { t as discordPlugin } from "./channel-9YoMy5Jf.js";
2
- import { n as discordOutbound } from "./outbound-adapter-DYUYRaBd.js";
3
- import { i as testing } from "./thread-bindings.manager-LoYZzlss.js";
4
- import { n as buildDiscordInboundAccessContext } from "./inbound-context-B5EsqsSr.js";
5
- import { finalizeInboundContext } from "openclaw/plugin-sdk/reply-dispatch-runtime";
6
- //#region extensions/discord/src/monitor/inbound-context.test-helpers.ts
7
- function buildFinalizedDiscordDirectInboundContext() {
8
- const { groupSystemPrompt, ownerAllowFrom, untrustedContext } = buildDiscordInboundAccessContext({
9
- channelConfig: null,
10
- guildInfo: null,
11
- sender: {
12
- id: "U1",
13
- name: "Alice",
14
- tag: "alice"
15
- },
16
- isGuild: false
17
- });
18
- return finalizeInboundContext({
19
- Body: "hi",
20
- BodyForAgent: "hi",
21
- RawBody: "hi",
22
- CommandBody: "hi",
23
- From: "discord:U1",
24
- To: "user:U1",
25
- SessionKey: "agent:main:discord:direct:u1",
26
- AccountId: "default",
27
- ChatType: "direct",
28
- ConversationLabel: "Alice",
29
- SenderName: "Alice",
30
- SenderId: "U1",
31
- SenderUsername: "alice",
32
- GroupSystemPrompt: groupSystemPrompt,
33
- OwnerAllowFrom: ownerAllowFrom,
34
- UntrustedStructuredContext: untrustedContext,
35
- Provider: "discord",
36
- Surface: "discord",
37
- WasMentioned: false,
38
- MessageSid: "m1",
39
- CommandAuthorized: true,
40
- OriginatingChannel: "discord",
41
- OriginatingTo: "user:U1"
42
- });
43
- }
44
- //#endregion
45
- export { buildFinalizedDiscordDirectInboundContext, discordOutbound, discordPlugin, testing as discordThreadBindingTesting };
@@ -1,22 +0,0 @@
1
- (The MIT License)
2
-
3
- Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net>
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- 'Software'), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,69 +0,0 @@
1
- agent-base
2
- ==========
3
- ### Turn a function into an [`http.Agent`][http.Agent] instance
4
-
5
- This module is a thin wrapper around the base `http.Agent` class.
6
-
7
- It provides an abstract class that must define a `connect()` function,
8
- which is responsible for creating the underlying socket that the HTTP
9
- client requests will use.
10
-
11
- The `connect()` function may return an arbitrary `Duplex` stream, or
12
- another `http.Agent` instance to delegate the request to, and may be
13
- asynchronous (by defining an `async` function).
14
-
15
- Instances of this agent can be used with the `http` and `https`
16
- modules. To differentiate, the options parameter in the `connect()`
17
- function includes a `secureEndpoint` property, which can be checked
18
- to determine what type of socket should be returned.
19
-
20
- #### Some subclasses:
21
-
22
- Here are some more interesting uses of `agent-base`.
23
- Send a pull request to list yours!
24
-
25
- * [`http-proxy-agent`][http-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTP endpoints
26
- * [`https-proxy-agent`][https-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTPS endpoints
27
- * [`pac-proxy-agent`][pac-proxy-agent]: A PAC file proxy `http.Agent` implementation for HTTP and HTTPS
28
- * [`socks-proxy-agent`][socks-proxy-agent]: A SOCKS proxy `http.Agent` implementation for HTTP and HTTPS
29
-
30
- Example
31
- -------
32
-
33
- Here's a minimal example that creates a new `net.Socket` or `tls.Socket`
34
- based on the `secureEndpoint` property. This agent can be used with both
35
- the `http` and `https` modules.
36
-
37
- ```ts
38
- import * as net from 'net';
39
- import * as tls from 'tls';
40
- import * as http from 'http';
41
- import { Agent } from 'agent-base';
42
-
43
- class MyAgent extends Agent {
44
- connect(req, opts) {
45
- // `secureEndpoint` is true when using the "https" module
46
- if (opts.secureEndpoint) {
47
- return tls.connect(opts);
48
- } else {
49
- return net.connect(opts);
50
- }
51
- }
52
- });
53
-
54
- // Keep alive enabled means that `connect()` will only be
55
- // invoked when a new connection needs to be created
56
- const agent = new MyAgent({ keepAlive: true });
57
-
58
- // Pass the `agent` option when creating the HTTP request
59
- http.get('http://nodejs.org/api/', { agent }, (res) => {
60
- console.log('"response" event!', res.headers);
61
- res.pipe(process.stdout);
62
- });
63
- ```
64
-
65
- [http-proxy-agent]: ../http-proxy-agent
66
- [https-proxy-agent]: ../https-proxy-agent
67
- [pac-proxy-agent]: ../pac-proxy-agent
68
- [socks-proxy-agent]: ../socks-proxy-agent
69
- [http.Agent]: https://nodejs.org/api/http.html#http_class_http_agent
@@ -1,10 +0,0 @@
1
- import * as http from 'http';
2
- import * as https from 'https';
3
- import type { Readable } from 'stream';
4
- export type ThenableRequest = http.ClientRequest & {
5
- then: Promise<http.IncomingMessage>['then'];
6
- };
7
- export declare function toBuffer(stream: Readable): Promise<Buffer>;
8
- export declare function json(stream: Readable): Promise<any>;
9
- export declare function req(url: string | URL, opts?: https.RequestOptions): ThenableRequest;
10
- //# sourceMappingURL=helpers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAEvC,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,aAAa,GAAG;IAClD,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;CAC5C,CAAC;AAEF,wBAAsB,QAAQ,CAAC,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAQhE;AAGD,wBAAsB,IAAI,CAAC,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,CAUzD;AAED,wBAAgB,GAAG,CAClB,GAAG,EAAE,MAAM,GAAG,GAAG,EACjB,IAAI,GAAE,KAAK,CAAC,cAAmB,GAC7B,eAAe,CAcjB"}
@@ -1,37 +0,0 @@
1
- import * as http from 'http';
2
- import * as https from 'https';
3
- export async function toBuffer(stream) {
4
- let length = 0;
5
- const chunks = [];
6
- for await (const chunk of stream) {
7
- length += chunk.length;
8
- chunks.push(chunk);
9
- }
10
- return Buffer.concat(chunks, length);
11
- }
12
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
13
- export async function json(stream) {
14
- const buf = await toBuffer(stream);
15
- const str = buf.toString('utf8');
16
- try {
17
- return JSON.parse(str);
18
- }
19
- catch (_err) {
20
- const err = _err;
21
- err.message += ` (input: ${str})`;
22
- throw err;
23
- }
24
- }
25
- export function req(url, opts = {}) {
26
- const href = typeof url === 'string' ? url : url.href;
27
- const req = (href.startsWith('https:') ? https : http).request(url, opts);
28
- const promise = new Promise((resolve, reject) => {
29
- req
30
- .once('response', resolve)
31
- .once('error', reject)
32
- .end();
33
- });
34
- req.then = promise.then.bind(promise);
35
- return req;
36
- }
37
- //# sourceMappingURL=helpers.js.map
@@ -1 +0,0 @@
1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C,CAAC,IAAI,CAAC,CAAC,OAAO,CAC7D,GAAG,EACH,IAAI,CACe,CAAC;IACrB,MAAM,OAAO,GAAG,IAAI,OAAO,CAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrE,GAAG;aACD,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC;aACzB,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC;aACrB,GAAG,EAAqB,CAAC;IAC5B,CAAC,CAAC,CAAC;IACH,GAAG,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACtC,OAAO,GAAG,CAAC;AACZ,CAAC"}
@@ -1,37 +0,0 @@
1
- import * as net from 'net';
2
- import * as tls from 'tls';
3
- import * as http from 'http';
4
- import type { Duplex } from 'stream';
5
- export * from './helpers.js';
6
- interface HttpConnectOpts extends net.TcpNetConnectOpts {
7
- secureEndpoint: false;
8
- protocol?: string;
9
- }
10
- interface HttpsConnectOpts extends tls.ConnectionOptions {
11
- secureEndpoint: true;
12
- protocol?: string;
13
- port: number;
14
- }
15
- export type AgentConnectOpts = HttpConnectOpts | HttpsConnectOpts;
16
- declare const INTERNAL: unique symbol;
17
- export declare abstract class Agent extends http.Agent {
18
- private [INTERNAL];
19
- options: Partial<net.TcpNetConnectOpts & tls.ConnectionOptions>;
20
- keepAlive: boolean;
21
- constructor(opts?: http.AgentOptions);
22
- abstract connect(req: http.ClientRequest, options: AgentConnectOpts): Promise<Duplex | http.Agent> | Duplex | http.Agent;
23
- /**
24
- * Determine whether this is an `http` or `https` request.
25
- */
26
- isSecureEndpoint(options?: AgentConnectOpts): boolean;
27
- private incrementSockets;
28
- private decrementSockets;
29
- getName(options?: AgentConnectOpts): string;
30
- createSocket(req: http.ClientRequest, options: AgentConnectOpts, cb: (err: Error | null, s?: Duplex) => void): void;
31
- createConnection(): Duplex;
32
- get defaultPort(): number;
33
- set defaultPort(v: number);
34
- get protocol(): string;
35
- set protocol(v: string);
36
-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O,CAAC,gBAAgB;IAmBxB,OAAO,CAAC,OAAO,CAAC,EAAE,gBAAgB,GAAG,MAAM;IAQ3C,YAAY,CACX,GAAG,EAAE,IAAI,CAAC,aAAa,EACvB,OAAO,EAAE,gBAAgB,EACzB,EAAE,EAAE,CAAC,GAAG,EAAE,KAAK,GAAG,IAAI,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;IAuC5C,gBAAgB,IAAI,MAAM;IAW1B,IAAI,WAAW,IAAI,MAAM,CAKxB;IAED,IAAI,WAAW,CAAC,CAAC,EAAE,MAAM,EAIxB;IAED,IAAI,QAAQ,IAAI,MAAM,CAKrB;IAED,IAAI,QAAQ,CAAC,CAAC,EAAE,MAAM,EAIrB;CACD"}
@@ -1,146 +0,0 @@
1
- import * as net from 'net';
2
- import * as http from 'http';
3
- import { Agent as HttpsAgent } from 'https';
4
- export * from './helpers.js';
5
- const INTERNAL = Symbol('AgentBaseInternalState');
6
- export class Agent extends http.Agent {
7
- constructor(opts) {
8
- super(opts);
9
- this[INTERNAL] = {};
10
- }
11
- /**
12
- * Determine whether this is an `http` or `https` request.
13
- */
14
- isSecureEndpoint(options) {
15
- if (options) {
16
- // First check the `secureEndpoint` property explicitly, since this
17
- // means that a parent `Agent` is "passing through" to this instance.
18
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
19
- if (typeof options.secureEndpoint === 'boolean') {
20
- return options.secureEndpoint;
21
- }
22
- // If no explicit `secure` endpoint, check if `protocol` property is
23
- // set. This will usually be the case since using a full string URL
24
- // or `URL` instance should be the most common usage.
25
- if (typeof options.protocol === 'string') {
26
- return options.protocol === 'https:';
27
- }
28
- }
29
- // Finally, if no `protocol` property was set, then fall back to
30
- // checking the stack trace of the current call stack, and try to
31
- // detect the "https" module.
32
- const { stack } = new Error();
33
- if (typeof stack !== 'string')
34
- return false;
35
- return stack
36
- .split('\n')
37
- .some((l) => l.indexOf('(https.js:') !== -1 ||
38
- l.indexOf('node:https:') !== -1);
39
- }
40
- // In order to support async signatures in `connect()` and Node's native
41
- // connection pooling in `http.Agent`, the array of sockets for each origin
42
- // has to be updated synchronously. This is so the length of the array is
43
- // accurate when `addRequest()` is next called. We achieve this by creating a
44
- // fake socket and adding it to `sockets[origin]` and incrementing
45
- // `totalSocketCount`.
46
- incrementSockets(name) {
47
- // If `maxSockets` and `maxTotalSockets` are both Infinity then there is no
48
- // need to create a fake socket because Node.js native connection pooling
49
- // will never be invoked.
50
- if (this.maxSockets === Infinity && this.maxTotalSockets === Infinity) {
51
- return null;
52
- }
53
- // All instances of `sockets` are expected TypeScript errors. The
54
- // alternative is to add it as a private property of this class but that
55
- // will break TypeScript subclassing.
56
- if (!this.sockets[name]) {
57
- // @ts-expect-error `sockets` is readonly in `@types/node`
58
- this.sockets[name] = [];
59
- }
60
- const fakeSocket = new net.Socket({ writable: false });
61
- this.sockets[name].push(fakeSocket);
62
- // @ts-expect-error `totalSocketCount` isn't defined in `@types/node`
63
- this.totalSocketCount++;
64
- return fakeSocket;
65
- }
66
- decrementSockets(name, socket) {
67
- if (!this.sockets[name] || socket === null) {
68
- return;
69
- }
70
- const sockets = this.sockets[name];
71
- const index = sockets.indexOf(socket);
72
- if (index !== -1) {
73
- sockets.splice(index, 1);
74
- // @ts-expect-error `totalSocketCount` isn't defined in `@types/node`
75
- this.totalSocketCount--;
76
- if (sockets.length === 0) {
77
- // @ts-expect-error `sockets` is readonly in `@types/node`
78
- delete this.sockets[name];
79
- }
80
- }
81
- }
82
- // In order to properly update the socket pool, we need to call `getName()` on
83
- // the core `https.Agent` if it is a secureEndpoint.
84
- getName(options) {
85
- const secureEndpoint = this.isSecureEndpoint(options);
86
- if (secureEndpoint) {
87
- return HttpsAgent.prototype.getName.call(this, options);
88
- }
89
- return super.getName(options);
90
- }
91
- createSocket(req, options, cb) {
92
- const connectOpts = {
93
- ...options,
94
- secureEndpoint: this.isSecureEndpoint(options),
95
- };
96
- const name = this.getName(connectOpts);
97
- const fakeSocket = this.incrementSockets(name);
98
- Promise.resolve()
99
- .then(() => this.connect(req, connectOpts))
100
- .then((socket) => {
101
- this.decrementSockets(name, fakeSocket);
102
- if (typeof socket
103
- .addRequest === 'function') {
104
- try {
105
- return socket.addRequest(req, connectOpts);
106
- }
107
- catch (err) {
108
- return cb(err);
109
- }
110
- }
111
- this[INTERNAL].currentSocket = socket;
112
- // @ts-expect-error `createSocket()` isn't defined in `@types/node`
113
- super.createSocket(req, options, cb);
114
- }, (err) => {
115
- this.decrementSockets(name, fakeSocket);
116
- cb(err);
117
- });
118
- }
119
- createConnection() {
120
- const socket = this[INTERNAL].currentSocket;
121
- this[INTERNAL].currentSocket = undefined;
122
- if (!socket) {
123
- throw new Error('No socket was returned in the `connect()` function');
124
- }
125
- return socket;
126
- }
127
- get defaultPort() {
128
- return (this[INTERNAL].defaultPort ??
129
- (this.protocol === 'https:' ? 443 : 80));
130
- }
131
- set defaultPort(v) {
132
- if (this[INTERNAL]) {
133
- this[INTERNAL].defaultPort = v;
134
- }
135
- }
136
- get protocol() {
137
- return (this[INTERNAL].protocol ??
138
- (this.isSecureEndpoint() ? 'https:' : 'http:'));
139
- }
140
- set protocol(v) {
141
- if (this[INTERNAL]) {
142
- this[INTERNAL].protocol = v;
143
- }
144
- }
145
- }
146
- //# 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;AAE3B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,KAAK,IAAI,UAAU,EAAE,MAAM,OAAO,CAAC;AAG5C,cAAc,cAAc,CAAC;AAe7B,MAAM,QAAQ,GAAG,MAAM,CAAC,wBAAwB,CAAC,CAAC;AAQlD,MAAM,OAAgB,KAAM,SAAQ,IAAI,CAAC,KAAK;IAO7C,YAAY,IAAwB;QACnC,KAAK,CAAC,IAAI,CAAC,CAAC;QACZ,IAAI,CAAC,QAAQ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,CAAC;QAC5C,IAAI,CAAC,QAAQ,CAAC,CAAC,aAAa,GAAG,SAAS,CAAC;QACzC,IAAI,CAAC,MAAM,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CACd,oDAAoD,CACpD,CAAC;QACH,CAAC;QACD,OAAO,MAAM,CAAC;IACf,CAAC;IAED,IAAI,WAAW;QACd,OAAO,CACN,IAAI,CAAC,QAAQ,CAAC,CAAC,WAAW;YAC1B,CAAC,IAAI,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CACvC,CAAC;IACH,CAAC;IAED,IAAI,WAAW,CAAC,CAAS;QACxB,IAAI,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;YACpB,IAAI,CAAC,QAAQ,CAAC,CAAC,WAAW,GAAG,CAAC,CAAC;QAChC,CAAC;IACF,CAAC;IAED,IAAI,QAAQ;QACX,OAAO,CACN,IAAI,CAAC,QAAQ,CAAC,CAAC,QAAQ;YACvB,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAC9C,CAAC;IACH,CAAC;IAED,IAAI,QAAQ,CAAC,CAAS;QACrB,IAAI,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;YACpB,IAAI,CAAC,QAAQ,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC;QAC7B,CAAC;IACF,CAAC;CACD"}
@@ -1,46 +0,0 @@
1
- {
2
- "name": "agent-base",
3
- "version": "9.0.0",
4
- "type": "module",
5
- "description": "Turn a function into an `http.Agent` instance",
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/agent-base"
17
- },
18
- "keywords": [
19
- "http",
20
- "agent",
21
- "base",
22
- "barebones",
23
- "https"
24
- ],
25
- "author": "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io/)",
26
- "license": "MIT",
27
- "devDependencies": {
28
- "@types/debug": "^4.1.7",
29
- "@types/node": "^22.13.0",
30
- "@types/semver": "^7.3.13",
31
- "@types/ws": "^8.5.4",
32
- "async-listen": "^3.0.0",
33
- "typescript": "^5.1.6",
34
- "ws": "^8.13.0",
35
- "tsconfig": "0.0.0"
36
- },
37
- "engines": {
38
- "node": ">= 20"
39
- },
40
- "scripts": {
41
- "build": "tsc",
42
- "test": "vitest",
43
- "lint": "eslint . --ext .ts",
44
- "pack": "node ../../scripts/pack.mjs"
45
- }
46
- }
@@ -1,20 +0,0 @@
1
- (The MIT License)
2
-
3
- Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca>
4
- Copyright (c) 2018-2021 Josh Junon
5
-
6
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software
7
- and associated documentation files (the 'Software'), to deal in the Software without restriction,
8
- including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
9
- and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
10
- subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all copies or substantial
13
- portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
16
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
18
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
19
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
-