@sockethub/platform-irc 4.0.0-alpha.13 → 4.0.0-alpha.15

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 CHANGED
@@ -18,6 +18,10 @@ messages.
18
18
 
19
19
  ## Usage
20
20
 
21
+ IRC room targets use `channel@server` in `target.id` (for example
22
+ `general@irc.libera.chat`). When you include `target.name`, use the channel
23
+ name as it appears on IRC (for example `#general`).
24
+
21
25
  ### Send Message Example
22
26
 
23
27
  ```json
@@ -33,8 +37,9 @@ messages.
33
37
  "type": "person"
34
38
  },
35
39
  "target": {
36
- "id": "#general@irc.libera.chat",
37
- "type": "room"
40
+ "id": "general@irc.libera.chat",
41
+ "type": "room",
42
+ "name": "#general"
38
43
  },
39
44
  "object": {
40
45
  "type": "message",
@@ -58,8 +63,9 @@ messages.
58
63
  "type": "person"
59
64
  },
60
65
  "target": {
61
- "id": "#general@irc.libera.chat",
62
- "type": "room"
66
+ "id": "general@irc.libera.chat",
67
+ "type": "room",
68
+ "name": "#general"
63
69
  }
64
70
  }
65
71
  ```
@@ -104,8 +110,9 @@ messages.
104
110
  "type": "person"
105
111
  },
106
112
  "target": {
107
- "id": "#general@irc.libera.chat",
108
- "type": "room"
113
+ "id": "general@irc.libera.chat",
114
+ "type": "room",
115
+ "name": "#general"
109
116
  },
110
117
  "object": {
111
118
  "type": "topic",
@@ -153,8 +160,9 @@ messages.
153
160
  "type": "person"
154
161
  },
155
162
  "target": {
156
- "id": "#general@irc.libera.chat",
157
- "type": "room"
163
+ "id": "general@irc.libera.chat",
164
+ "type": "room",
165
+ "name": "#general"
158
166
  },
159
167
  "object": {
160
168
  "type": "attendance"
@@ -173,8 +181,9 @@ messages.
173
181
  "https://sockethub.org/ns/context/platform/irc/v1.jsonld"
174
182
  ],
175
183
  "actor": {
176
- "id": "#general@irc.libera.chat",
177
- "type": "room"
184
+ "id": "general@irc.libera.chat",
185
+ "type": "room",
186
+ "name": "#general"
178
187
  },
179
188
  "target": {},
180
189
  "object": {
package/dist/index.js CHANGED
@@ -16989,6 +16989,311 @@ var ActivityStreamSchema = {
16989
16989
  }
16990
16990
  };
16991
16991
 
16992
+ // ../schemas/src/schemas/sockethub-config.ts
16993
+ var SockethubConfigSchema = {
16994
+ $id: "https://sockethub.org/schemas/v/sockethub-config.json",
16995
+ description: "Sockethub Config Schema",
16996
+ type: "object",
16997
+ required: ["platforms"],
16998
+ additionalProperties: false,
16999
+ properties: {
17000
+ $schema: {
17001
+ type: "string"
17002
+ },
17003
+ examples: {
17004
+ type: "boolean",
17005
+ default: true
17006
+ },
17007
+ info: {
17008
+ type: "boolean",
17009
+ default: false
17010
+ },
17011
+ logging: {
17012
+ type: "object",
17013
+ additionalProperties: false,
17014
+ properties: {
17015
+ level: {
17016
+ type: "string",
17017
+ enum: ["error", "warn", "info", "debug"],
17018
+ default: "info"
17019
+ },
17020
+ fileLevel: {
17021
+ type: "string",
17022
+ enum: ["error", "warn", "info", "debug"],
17023
+ default: "debug"
17024
+ },
17025
+ file: {
17026
+ type: "string",
17027
+ default: "sockethub.log"
17028
+ }
17029
+ }
17030
+ },
17031
+ platforms: {
17032
+ type: "array",
17033
+ items: {
17034
+ type: "string"
17035
+ },
17036
+ default: [
17037
+ "@sockethub/platform-dummy",
17038
+ "@sockethub/platform-feeds",
17039
+ "@sockethub/platform-irc",
17040
+ "@sockethub/platform-metadata",
17041
+ "@sockethub/platform-xmpp"
17042
+ ]
17043
+ },
17044
+ packageConfig: {
17045
+ type: "object",
17046
+ properties: {
17047
+ "@sockethub/platform-dummy": {
17048
+ type: "object",
17049
+ additionalProperties: false,
17050
+ properties: {
17051
+ greeting: { type: "string", default: "Hello" }
17052
+ }
17053
+ },
17054
+ "@sockethub/platform-feeds": {
17055
+ type: "object",
17056
+ additionalProperties: false,
17057
+ properties: {
17058
+ connectTimeoutMs: { type: "number" },
17059
+ allowPrivateAddresses: { type: "boolean" },
17060
+ concurrency: { type: "integer", minimum: 1 }
17061
+ }
17062
+ },
17063
+ "@sockethub/platform-irc": {
17064
+ type: "object",
17065
+ additionalProperties: false,
17066
+ properties: {
17067
+ connectTimeoutMs: { type: "number" }
17068
+ }
17069
+ },
17070
+ "@sockethub/platform-xmpp": {
17071
+ type: "object",
17072
+ additionalProperties: false,
17073
+ properties: {
17074
+ connectTimeoutMs: { type: "number" }
17075
+ }
17076
+ },
17077
+ "@sockethub/platform-metadata": {
17078
+ type: "object",
17079
+ additionalProperties: false,
17080
+ properties: {
17081
+ allowPrivateAddresses: { type: "boolean" },
17082
+ concurrency: { type: "integer", minimum: 1 }
17083
+ }
17084
+ }
17085
+ }
17086
+ },
17087
+ credentials: {
17088
+ type: "object",
17089
+ additionalProperties: false,
17090
+ properties: {
17091
+ ttlMs: {
17092
+ type: "number",
17093
+ minimum: 0,
17094
+ default: 604800000,
17095
+ description: "Sliding TTL in milliseconds for per-session encrypted " + "credential keys in Redis, refreshed on every save and " + "read. A backstop against keys orphaned by crashes; " + "sessions normally delete their key on disconnect. " + "Size generously — idle sessions do not refresh it. " + "0 disables expiry."
17096
+ }
17097
+ }
17098
+ },
17099
+ credentialCheck: {
17100
+ type: "object",
17101
+ additionalProperties: false,
17102
+ properties: {
17103
+ reconnectIpSource: {
17104
+ type: "string",
17105
+ enum: ["socket", "proxy"],
17106
+ default: "socket"
17107
+ },
17108
+ proxyHeader: {
17109
+ type: "string",
17110
+ default: "x-forwarded-for"
17111
+ }
17112
+ }
17113
+ },
17114
+ public: {
17115
+ type: "object",
17116
+ additionalProperties: false,
17117
+ properties: {
17118
+ protocol: {
17119
+ type: "string",
17120
+ default: "http"
17121
+ },
17122
+ host: {
17123
+ type: "string",
17124
+ default: "localhost"
17125
+ },
17126
+ port: {
17127
+ type: "number",
17128
+ default: 10550
17129
+ },
17130
+ path: {
17131
+ type: "string",
17132
+ default: "/"
17133
+ }
17134
+ }
17135
+ },
17136
+ rateLimiter: {
17137
+ type: "object",
17138
+ additionalProperties: false,
17139
+ properties: {
17140
+ windowMs: {
17141
+ type: "number",
17142
+ default: 1000
17143
+ },
17144
+ maxRequests: {
17145
+ type: "number",
17146
+ default: 100
17147
+ },
17148
+ blockDurationMs: {
17149
+ type: "number",
17150
+ default: 5000
17151
+ },
17152
+ maxConnectionsPerIp: {
17153
+ type: "number",
17154
+ minimum: 0,
17155
+ default: 0
17156
+ }
17157
+ }
17158
+ },
17159
+ limits: {
17160
+ type: "object",
17161
+ additionalProperties: false,
17162
+ properties: {
17163
+ maxPlatformInstances: {
17164
+ type: "number",
17165
+ minimum: 0,
17166
+ default: 0
17167
+ }
17168
+ }
17169
+ },
17170
+ redis: {
17171
+ type: "object",
17172
+ additionalProperties: false,
17173
+ properties: {
17174
+ url: {
17175
+ type: "string",
17176
+ default: "redis://127.0.0.1:6379"
17177
+ },
17178
+ connectTimeout: {
17179
+ type: "number",
17180
+ default: 1e4,
17181
+ description: "Connection timeout in milliseconds"
17182
+ },
17183
+ disconnectTimeout: {
17184
+ type: "number",
17185
+ default: 5000,
17186
+ description: "Disconnect timeout in milliseconds"
17187
+ },
17188
+ maxRetriesPerRequest: {
17189
+ type: ["number", "null"],
17190
+ default: null,
17191
+ description: "Maximum number of retries per request (null for BullMQ default)"
17192
+ }
17193
+ }
17194
+ },
17195
+ sentry: {
17196
+ type: "object",
17197
+ additionalProperties: false,
17198
+ properties: {
17199
+ dsn: {
17200
+ type: "string",
17201
+ default: ""
17202
+ },
17203
+ traceSampleRate: {
17204
+ type: "number",
17205
+ default: 1
17206
+ }
17207
+ }
17208
+ },
17209
+ sockethub: {
17210
+ type: "object",
17211
+ additionalProperties: false,
17212
+ properties: {
17213
+ port: {
17214
+ type: "number",
17215
+ default: 10550
17216
+ },
17217
+ host: {
17218
+ type: "string",
17219
+ default: "localhost"
17220
+ },
17221
+ path: {
17222
+ type: "string",
17223
+ default: "/sockethub"
17224
+ },
17225
+ cors: {
17226
+ type: "object",
17227
+ additionalProperties: false,
17228
+ properties: {
17229
+ origin: {
17230
+ type: "string",
17231
+ default: "*"
17232
+ }
17233
+ }
17234
+ }
17235
+ }
17236
+ },
17237
+ httpActions: {
17238
+ type: "object",
17239
+ additionalProperties: false,
17240
+ properties: {
17241
+ enabled: {
17242
+ type: "boolean",
17243
+ default: false
17244
+ },
17245
+ path: {
17246
+ type: "string",
17247
+ default: "/sockethub-http"
17248
+ },
17249
+ requireRequestId: {
17250
+ type: "boolean",
17251
+ default: true
17252
+ },
17253
+ maxMessagesPerRequest: {
17254
+ type: "number",
17255
+ minimum: 1,
17256
+ default: 20
17257
+ },
17258
+ maxPayloadBytes: {
17259
+ type: "number",
17260
+ minimum: 1,
17261
+ default: 262144
17262
+ },
17263
+ idempotencyTtlMs: {
17264
+ type: "number",
17265
+ minimum: 0,
17266
+ default: 300000
17267
+ },
17268
+ requestTimeoutMs: {
17269
+ type: "number",
17270
+ minimum: 0,
17271
+ default: 30000
17272
+ },
17273
+ idleTimeoutMs: {
17274
+ type: "number",
17275
+ minimum: 0,
17276
+ default: 15000
17277
+ }
17278
+ }
17279
+ },
17280
+ platformHeartbeat: {
17281
+ type: "object",
17282
+ additionalProperties: false,
17283
+ properties: {
17284
+ intervalMs: {
17285
+ type: "number",
17286
+ default: 5000
17287
+ },
17288
+ timeoutMs: {
17289
+ type: "number",
17290
+ default: 15000
17291
+ }
17292
+ }
17293
+ }
17294
+ }
17295
+ };
17296
+
16992
17297
  // ../schemas/src/validator.ts
16993
17298
  var import_ajv = __toESM(require_ajv(), 1);
16994
17299
  var import_ajv_formats = __toESM(require_dist(), 1);
@@ -17029,7 +17334,7 @@ var import_irc_socket_sasl = __toESM(require_irc_socket(), 1);
17029
17334
  var package_default = {
17030
17335
  name: "@sockethub/platform-irc",
17031
17336
  description: "A sockethub platform module implementing IRC functionality",
17032
- version: "4.0.0-alpha.13",
17337
+ version: "4.0.0-alpha.15",
17033
17338
  private: false,
17034
17339
  author: "Nick Jennings <nick@silverbucket.net>",
17035
17340
  license: "LGPL-3.0+",
@@ -17073,23 +17378,23 @@ var package_default = {
17073
17378
  doc: "typedoc --options typedoc.json"
17074
17379
  },
17075
17380
  dependencies: {
17076
- "@sockethub/irc2as": "^4.0.0-alpha.13",
17381
+ "@sockethub/irc2as": "^4.0.0-alpha.15",
17077
17382
  "irc-socket-sasl": "^4.1.2"
17078
17383
  },
17079
17384
  devDependencies: {
17080
- "@sockethub/schemas": "^3.0.0-alpha.13",
17385
+ "@sockethub/schemas": "^3.0.0-alpha.15",
17081
17386
  "@types/bun": "latest",
17082
17387
  typedoc: "^0.28.14"
17083
17388
  },
17084
17389
  peerDependencies: {
17085
- "@sockethub/server": "^5.0.0-alpha.13"
17390
+ "@sockethub/server": "^5.0.0-alpha.15"
17086
17391
  },
17087
17392
  peerDependenciesMeta: {
17088
17393
  "@sockethub/server": {
17089
17394
  optional: true
17090
17395
  }
17091
17396
  },
17092
- gitHead: "745e85ac71f3c027f8ef8b8edc49398be8dbaccd",
17397
+ gitHead: "7f85c0aa1c317b56336af4149b29dc78afc5f2bd",
17093
17398
  types: "./dist/index.d.ts"
17094
17399
  };
17095
17400
 
@@ -17756,4 +18061,4 @@ export {
17756
18061
  IRC
17757
18062
  };
17758
18063
 
17759
- //# debugId=C44E30207832792D64756E2164756E21
18064
+ //# debugId=C624D09E20C6388C64756E2164756E21