@sockethub/server 5.0.0-alpha.24 → 5.0.0-alpha.25

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 (48) hide show
  1. package/README.md +11 -0
  2. package/dist/api-info.d.ts +39 -0
  3. package/dist/bootstrap/load-platforms.d.ts +1 -0
  4. package/dist/http/actions.d.ts +4 -0
  5. package/dist/index.js +8048 -49071
  6. package/dist/platform.js +1480 -42524
  7. package/dist/sockethub.d.ts +0 -6
  8. package/dist/version.d.ts +14 -0
  9. package/package.json +16 -16
  10. package/res/sockethub-client.js +29 -17681
  11. package/dist/index.js.map +0 -1513
  12. package/dist/platform.js.map +0 -1247
  13. package/dist/sentry_cpu_profiler-darwin-arm64-108-x9pvc8sn.node +0 -0
  14. package/dist/sentry_cpu_profiler-darwin-arm64-115-f1zntp0c.node +0 -0
  15. package/dist/sentry_cpu_profiler-darwin-arm64-127-bkbjv4gh.node +0 -0
  16. package/dist/sentry_cpu_profiler-darwin-arm64-137-bnbev7dh.node +0 -0
  17. package/dist/sentry_cpu_profiler-darwin-arm64-147-zca3q0df.node +0 -0
  18. package/dist/sentry_cpu_profiler-darwin-x64-108-k9ejvb8b.node +0 -0
  19. package/dist/sentry_cpu_profiler-darwin-x64-115-5y3qs5bt.node +0 -0
  20. package/dist/sentry_cpu_profiler-darwin-x64-127-a90vbs03.node +0 -0
  21. package/dist/sentry_cpu_profiler-darwin-x64-137-93m96kya.node +0 -0
  22. package/dist/sentry_cpu_profiler-darwin-x64-147-jyxe4y9b.node +0 -0
  23. package/dist/sentry_cpu_profiler-linux-arm64-glibc-108-mqfvew5f.node +0 -0
  24. package/dist/sentry_cpu_profiler-linux-arm64-glibc-115-mqfvew5f.node +0 -0
  25. package/dist/sentry_cpu_profiler-linux-arm64-glibc-127-3tk3cast.node +0 -0
  26. package/dist/sentry_cpu_profiler-linux-arm64-glibc-137-0718g7v6.node +0 -0
  27. package/dist/sentry_cpu_profiler-linux-arm64-glibc-147-ap99rr48.node +0 -0
  28. package/dist/sentry_cpu_profiler-linux-arm64-musl-108-g2bwvb9e.node +0 -0
  29. package/dist/sentry_cpu_profiler-linux-arm64-musl-115-g2bwvb9e.node +0 -0
  30. package/dist/sentry_cpu_profiler-linux-arm64-musl-127-g2bwvb9e.node +0 -0
  31. package/dist/sentry_cpu_profiler-linux-arm64-musl-137-fda5zb96.node +0 -0
  32. package/dist/sentry_cpu_profiler-linux-arm64-musl-147-ky1pmw1r.node +0 -0
  33. package/dist/sentry_cpu_profiler-linux-x64-glibc-108-b4v94gym.node +0 -0
  34. package/dist/sentry_cpu_profiler-linux-x64-glibc-115-b4v94gym.node +0 -0
  35. package/dist/sentry_cpu_profiler-linux-x64-glibc-127-77sdzmpr.node +0 -0
  36. package/dist/sentry_cpu_profiler-linux-x64-glibc-137-5pe8gxxz.node +0 -0
  37. package/dist/sentry_cpu_profiler-linux-x64-glibc-147-08jxr90t.node +0 -0
  38. package/dist/sentry_cpu_profiler-linux-x64-musl-108-09j0f4jg.node +0 -0
  39. package/dist/sentry_cpu_profiler-linux-x64-musl-115-09j0f4jg.node +0 -0
  40. package/dist/sentry_cpu_profiler-linux-x64-musl-127-saq18043.node +0 -0
  41. package/dist/sentry_cpu_profiler-linux-x64-musl-137-p73z6xnr.node +0 -0
  42. package/dist/sentry_cpu_profiler-linux-x64-musl-147-bg1yh1wf.node +0 -0
  43. package/dist/sentry_cpu_profiler-win32-x64-108-mse3z67f.node +0 -0
  44. package/dist/sentry_cpu_profiler-win32-x64-115-p638z8w6.node +0 -0
  45. package/dist/sentry_cpu_profiler-win32-x64-127-1t1rmdnc.node +0 -0
  46. package/dist/sentry_cpu_profiler-win32-x64-137-fd76n204.node +0 -0
  47. package/dist/sentry_cpu_profiler-win32-x64-147-w12dzy7w.node +0 -0
  48. package/res/sockethub-client.min.js +0 -32
package/README.md CHANGED
@@ -152,6 +152,17 @@ metrics and traces. Logs are opt-in. Profiling is disabled when its sample rate
152
152
  is zero. Run `sockethub --sentry-test --config /path/to/config.json` to send a
153
153
  verification event and exit.
154
154
 
155
+ The published server package intentionally omits source maps. They accounted
156
+ for most of the package size while providing limited value for the server
157
+ bundles. Source maps are not uploaded to Sentry either: Sockethub does not
158
+ currently run a release artifact upload, and its public source remains the
159
+ debugging reference. If artifact uploads are added later, maps should remain
160
+ excluded from npm packages.
161
+
162
+ The build also leaves the Sentry runtime packages external. The package
163
+ manager can then install the profiler binary appropriate for the deployment
164
+ instead of the server bundle carrying binaries for every platform and Node ABI.
165
+
155
166
  ### Command-line params
156
167
 
157
168
  ```
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Public API compatibility information.
3
+ *
4
+ * Both public transports publish from here — the Socket.IO `schemas`
5
+ * bootstrap and the HTTP actions service descriptor — so they cannot disagree
6
+ * on API versions. Exact package versions are deliberately absent: clients
7
+ * check compatibility against SemVer majors, and publishing release numbers
8
+ * would make deployments easy to fingerprint.
9
+ */
10
+ import { type ServiceDescriptor } from "@sockethub/schemas";
11
+ import type { PlatformMap } from "./bootstrap/load-platforms.js";
12
+ /**
13
+ * The machine-readable descriptor served on a bare GET of the HTTP actions
14
+ * path. Its shape is published as `ServiceDescriptorSchema`.
15
+ */
16
+ export declare function buildServiceDescriptor(platforms: PlatformMap): ServiceDescriptor;
17
+ /**
18
+ * The platform registry payload sent to Socket.IO clients.
19
+ * This is the canonical source for base contexts + platform context/schema metadata.
20
+ */
21
+ export declare function buildPlatformRegistryPayload(platforms: PlatformMap): {
22
+ apiVersion: number;
23
+ contexts: {
24
+ as: string;
25
+ sockethub: string;
26
+ };
27
+ platforms: {
28
+ id: string;
29
+ apiVersion: number;
30
+ contextUrl: string;
31
+ contextVersion: string;
32
+ schemaVersion: string;
33
+ types: string[];
34
+ schemas: {
35
+ credentials: true | import("ajv").SchemaObject;
36
+ messages: true | import("ajv").SchemaObject;
37
+ };
38
+ }[];
39
+ };
@@ -7,6 +7,7 @@ export type PlatformStruct = {
7
7
  config: PlatformConfig;
8
8
  schemas: PlatformSchemaRegistry;
9
9
  version: string;
10
+ apiVersion: number;
10
11
  contextUrl: string;
11
12
  contextVersion: string;
12
13
  schemaVersion: string;
@@ -3,16 +3,20 @@
3
3
  *
4
4
  * Accepts ActivityStreams via POST, streams NDJSON results as jobs complete,
5
5
  * and optionally caches results in Redis for idempotent replay + GET retrieval.
6
+ * A GET without a request id returns the public service descriptor (API
7
+ * versions of the server and loaded platforms).
6
8
  */
7
9
  import type { RedisConfig } from "@sockethub/data-layer";
8
10
  import { type CredentialsStoreInterface } from "@sockethub/data-layer";
9
11
  import { type Express, type RequestHandler } from "express";
12
+ import type { PlatformMap } from "../bootstrap/load-platforms.js";
10
13
  import { createMessageHandlers } from "../message-handlers.js";
11
14
  import type ProcessManager from "../process-manager.js";
12
15
  interface HttpActionsOptions {
13
16
  processManager: ProcessManager;
14
17
  parentId: string;
15
18
  parentSecret1: string;
19
+ platforms: PlatformMap;
16
20
  }
17
21
  interface HttpActionsDependencies {
18
22
  getConfig?: (key: string) => unknown;