sporades 0.6.0 โ†’ 0.6.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.
Files changed (44) hide show
  1. package/CHANGES.md +170 -4
  2. package/README.md +2 -1
  3. package/bin/sporades-host-helper.js +2 -2
  4. package/bin/sporades.js +5742 -1995
  5. package/dist/bundle-pipeline.d.ts +12 -24
  6. package/dist/bundle-pipeline.d.ts.map +1 -1
  7. package/dist/bundle-pipeline.js +144 -32
  8. package/dist/bundle-pipeline.js.map +1 -1
  9. package/dist/cli/cli-help.d.ts +3 -3
  10. package/dist/cli/cli-help.d.ts.map +1 -1
  11. package/dist/cli/cli-help.js +13 -4
  12. package/dist/cli/cli-help.js.map +1 -1
  13. package/dist/cli/cli-version.d.ts +1 -1
  14. package/dist/cli/cli-version.js +1 -1
  15. package/dist/cli/project-config.d.ts +1 -0
  16. package/dist/cli/project-config.d.ts.map +1 -1
  17. package/dist/cli/project-config.js +5 -0
  18. package/dist/cli/project-config.js.map +1 -1
  19. package/dist/cli/sporades.js +313 -75
  20. package/dist/cli/sporades.js.map +1 -1
  21. package/dist/file-transaction.d.ts +17 -0
  22. package/dist/file-transaction.d.ts.map +1 -0
  23. package/dist/file-transaction.js +269 -0
  24. package/dist/file-transaction.js.map +1 -0
  25. package/dist/mail-config.d.ts +4 -0
  26. package/dist/mail-config.d.ts.map +1 -0
  27. package/dist/mail-config.js +119 -0
  28. package/dist/mail-config.js.map +1 -0
  29. package/dist/sealed-server-env.d.ts +3 -4
  30. package/dist/sealed-server-env.d.ts.map +1 -1
  31. package/dist/sealed-server-env.js +89 -2
  32. package/dist/sealed-server-env.js.map +1 -1
  33. package/dist/server-runtime-source.d.ts +82 -27
  34. package/dist/server-runtime-source.d.ts.map +1 -1
  35. package/dist/server-runtime-source.js +4994 -1875
  36. package/dist/server-runtime-source.js.map +1 -1
  37. package/dist/templates/scaffold-template.js +71 -73
  38. package/dist/templates/scaffold-template.js.map +1 -1
  39. package/dist/templates/server-bundle-template.d.ts.map +1 -1
  40. package/dist/templates/server-bundle-template.js +5 -1
  41. package/dist/templates/server-bundle-template.js.map +1 -1
  42. package/package.json +3 -1
  43. package/src/types/client.d.ts +7 -1
  44. package/src/types/server.d.ts +42 -0
package/CHANGES.md CHANGED
@@ -1,13 +1,179 @@
1
1
  # Changes
2
2
 
3
- ## Unreleased - 2026-07-29
3
+ ## Unreleased - 2026-08-03
4
4
 
5
- Changes since v0.5.0.
5
+ Changes since v0.6.1.
6
+
7
+ ### ๐Ÿš€ Features
8
+
9
+ - Add scriptable sealed env key management (742ac99).
10
+ - Add Microsoft OpenID Connect sign-in (affeed9).
11
+ - Complete SMTP runtime production parity (3237d21).
12
+ - Add Sign in with Apple (11b22ff).
13
+ - Add Facebook OAuth sign-in (3e166fc).
14
+ - Support portable SMTP relay modes (59817d3).
15
+ - Add multi-provider OAuth configuration (e9f388f).
16
+ - Add Mailgun SMTP extensions (c71314c).
17
+ - Add Postmark SMTP extensions (768b078).
18
+ - Add generic SMTP mail runtime (420d8b0).
19
+ - Add stable provider identities (2d5be36).
6
20
 
7
21
  ### ๐Ÿ› Bug Fixes
8
22
 
9
- - Ensure esbuild dep and allowScript versions dont drift (36757e3).
23
+ - Isolate SMTP transport error classification (279e629).
24
+ - Guard SMTP error and close traps (203724b).
25
+ - Harden SMTP failure and shutdown boundaries (2a77579).
26
+ - Preserve Facebook body timeouts (bbbb5b5).
27
+ - Harden Facebook OAuth transport (c8ddcc6).
28
+ - Harden portable SMTP configuration (edaf97e).
29
+
30
+ ### ๐Ÿ”ง Improvements
31
+
32
+ - Complete multi-provider OAuth implementation swarm (83217df).
33
+ - Accept OAuth coexistence issue 07 (df102b9).
34
+ - Final review for OAuth coexistence issue 07 (fa1c3e0).
35
+ - Request Apple JWKS taxonomy fix for OAuth issue 07 (63328b1).
36
+ - Re-review OAuth endpoint confinement (3a5f38a).
37
+ - Request JWKS confinement rework for OAuth issue 07 (fbcc0e6).
38
+ - Re-review OAuth coexistence issue 07 (609aa56).
39
+ - Request rework for OAuth coexistence issue 07 (e03ef29).
40
+ - Review OAuth coexistence issue 07 (81b8cb2).
41
+ - Dispatch multi-provider OAuth issue 07 (2c54c36).
42
+ - Complete Microsoft OAuth issue 04 (b18dae7).
43
+ - Accept Microsoft OAuth issue 04 integration (6c6b7db).
44
+ - Record SMTP swarm final verification (291cb7c).
45
+ - Review three-provider OAuth integration (df527e8).
46
+ - Accept Microsoft OAuth issue 04 candidate (b63b4b1).
47
+ - Complete SMTP mail issue 05 (cedc452).
48
+ - Accept SMTP mail issue 05 (39684a1).
49
+ - Re-review Microsoft OAuth cache saturation (487686a).
50
+ - Re-review third replacement for SMTP mail issue 05 (6f64f23).
51
+ - Clean up Apple OAuth worktree (40ceac4).
52
+ - Request saturation rework for Microsoft OAuth cache (9fb94d5).
53
+ - Request third rework for SMTP mail issue 05 (cd611fd).
54
+ - Re-review Microsoft OAuth cache lifecycle (c2d5a95).
55
+ - Re-review second replacement for SMTP mail issue 05 (b2f455b).
56
+ - Complete Apple OAuth issue 05 (ac9eacf).
57
+ - Request second rework for SMTP mail issue 05 (f036856).
58
+ - Accept Apple OAuth issue 05 integration (06d6af7).
59
+ - Request lifecycle rework for Microsoft OAuth cache (5ec1cff).
60
+ - Re-review SMTP mail issue 05 (137d31a).
61
+ - Review Apple and Facebook OAuth integration (15408ad).
62
+ - Re-review Microsoft OAuth cache handling (a2814b4).
63
+ - Request rework for SMTP mail issue 05 (55876a9).
64
+ - Complete Facebook OAuth issue 06 (49471f2).
65
+ - Accept Facebook OAuth issue 06 (e73b98e).
66
+ - Re-review Apple OAuth callback parser (b258d8f).
67
+ - Re-review Facebook OAuth timeout handling (fc9d1e5).
68
+ - Review SMTP mail issue 05 (ebc29e8).
69
+ - Request cache rework for Microsoft OAuth issue 04 (2261ffc).
70
+ - Request parser rework for Apple OAuth issue 05 (1a4af01).
71
+ - Advance Microsoft and Facebook OAuth rework (9c488f6).
72
+ - Re-review Apple OAuth issue 05 (d2cc161).
73
+ - Re-review Facebook OAuth issue 06 (4a48c7e).
74
+ - Dispatch SMTP mail issue 05 (3675858).
75
+ - Complete SMTP mail issue 04 (630b589).
76
+ - Accept SMTP mail issue 04 (1381dbd).
77
+ - Re-review second replacement for SMTP mail issue 04 (3041f53).
78
+ - Request second rework for SMTP mail issue 04 (e94dabd).
79
+ - Request rework for Facebook OAuth issue 06 (a84fd43).
80
+ - Re-review SMTP mail issue 04 (ea9df9e).
81
+ - Request rework for Microsoft OAuth issue 04 (8a7b75e).
82
+ - Review Facebook OAuth issue 06 (af9f4e8).
83
+ - Request rework for SMTP mail issue 04 (8140e85).
84
+ - Review Microsoft OAuth issue 04 (6a02358).
85
+ - Request rework for Apple OAuth issue 05 (f60ad7b).
86
+ - Review Apple OAuth issue 05 (274f085).
87
+ - Review SMTP mail issue 04 (3d67ba2).
88
+ - Dispatch provider OAuth implementation frontier (a53d2aa).
89
+ - Complete multi-provider OAuth issue 03 (1dc0371).
90
+ - Accept multi-provider OAuth issue 03 (32e289c).
91
+ - Re-review invariant-safe OAuth issue 03 (4257dbb).
92
+ - Dispatch SMTP mail issue 04 (ff61b3e).
93
+ - Complete SMTP mail issue 03 (f7e9916).
94
+ - Accept SMTP mail issue 03 (54ab22c).
95
+ - Re-review third replacement for SMTP mail issue 03 (50495c8).
96
+ - Request invariant rework for multi-provider OAuth issue 03 (ad54e22).
97
+ - Request third rework for SMTP mail issue 03 (31da8bc).
98
+ - Re-review atomic multi-provider OAuth issue 03 (cb94846).
99
+ - Re-review second replacement for SMTP mail issue 03 (a4614cd).
100
+ - Request second rework for SMTP mail issue 03 (53b0d36).
101
+ - Re-review SMTP mail issue 03 (ec21ea5).
102
+ - Request atomic rework for multi-provider OAuth issue 03 (15a9336).
103
+ - Re-review multi-provider OAuth issue 03 (c58107a).
104
+ - Request rework for SMTP mail issue 03 (fbf0fc2).
105
+ - Review SMTP mail issue 03 (7f8623a).
106
+ - Request rework for multi-provider OAuth issue 03 (8295165).
107
+ - Dispatch SMTP mail issue 03 (239f016).
108
+ - Complete SMTP mail issue 02 (912a1ac).
109
+ - Review multi-provider OAuth issue 03 (fe44a93).
110
+ - Accept SMTP mail issue 02 (8e91a6e).
111
+ - Re-review SMTP mail issue 02 (9944346).
112
+ - Request rework for SMTP mail issue 02 (855ecbf).
113
+ - Review SMTP mail issue 02 (2708b4f).
114
+ - Dispatch SMTP mail issue 02 (9339ad0).
115
+ - Complete SMTP mail issue 01 (6b0d35f).
116
+ - Accept SMTP mail issue 01 (86c590c).
117
+ - Re-review encoded address fix for SMTP mail issue 01 (fc30f8f).
118
+ - Request third rework for SMTP mail issue 01 (8befa61).
119
+ - Re-review RFC 2047 fix for SMTP mail issue 01 (99dd6ac).
120
+ - Request second rework for SMTP mail issue 01 (f864623).
121
+ - Dispatch multi-provider OAuth issue 03 (7d345e9).
122
+ - Complete multi-provider OAuth issue 02 (c3da4ab).
123
+ - Accept multi-provider OAuth issue 02 (cc6d385).
124
+ - Re-review SMTP mail issue 01 (486fed4).
125
+ - Re-review multi-provider OAuth issue 02 (2e632ae).
126
+ - Request rework for SMTP mail issue 01 (075813f).
127
+ - Request rework for multi-provider OAuth issue 02 (dbffa22).
128
+ - Dispatch review for SMTP mail issue 01 (34d9960).
129
+ - Review SMTP mail issue 01 (4271868).
130
+ - Review multi-provider OAuth issue 02 (bb0292c).
131
+ - Dispatch SMTP mail issue 01 (a51c647).
132
+ - Initialize SMTP mail swarm ledger (ac20cf1).
133
+ - Clean up multi-provider OAuth issue 01 worktree (4297774).
134
+ - Dispatch multi-provider OAuth issue 02 (d059d44).
135
+ - Complete multi-provider OAuth issue 01 (da7602c).
136
+ - Accept multi-provider OAuth issue 01 (e925fa0).
137
+ - Re-review multi-provider OAuth issue 01 (6595fa4).
138
+ - Re-review multi-provider OAuth issue 01 (33decb6).
139
+ - Plan SMTP mail support (35e1519).
140
+ - Request rework for multi-provider OAuth issue 01 (0f08d69).
141
+ - Review multi-provider OAuth issue 01 (b4f5d58).
142
+ - Dispatch multi-provider OAuth issue 01 (ab58692).
143
+ - Initialize multi-provider OAuth swarm ledger (716075b).
144
+ - Plan multi-provider OAuth expansion (1cc5f60).
145
+
146
+ ### ๐Ÿ“ Documentation
147
+
148
+ - Contract provider-neutral OAuth runtime (df4901f).
149
+ - Fail closed on Microsoft OIDC cache saturation (5889257).
150
+ - Bound Microsoft OIDC cache lifecycle (9e3aeff).
151
+ - Coalesce Microsoft OIDC cache refreshes (7b54d69).
152
+ - Harden Microsoft OIDC network and token parsing (13774fe).
153
+ - Reject malformed OAuth form callbacks (1817519).
154
+ - Harden Sign in with Apple boundaries (301ff15).
155
+ - Reject duplicate file transaction targets (3cabaf0).
156
+ - Make OAuth configuration updates failure-atomic (b94bb52).
157
+ - Harden multi-provider OAuth configuration (56a1f14).
158
+ - Make Mailgun header boundaries exact (378ca69).
159
+ - Validate Mailgun headers before delivery (66080b0).
160
+ - Harden Mailgun SMTP header encoding (9436714).
161
+ - Update generated SMTP API docs (0cf6139).
162
+ - Harden SMTP MIME and TLS errors (89536c1).
163
+ - Harden OAuth state and identity validation (6ef5d6a).
164
+ - Deepen runtime OAuth provider seam (210aeb2).
165
+ - Harden legacy provider identity claims (39e9e7a).
10
166
 
11
167
  ### ๐Ÿงช Tests
12
168
 
13
- - Run endpoint handlers from bundled capsules (a760693).
169
+ - Integrate Microsoft OAuth with sibling providers (11bf24e).
170
+ - Prove implicit TLS fails closed (24f10b2).
171
+ - Define portable SMTP security contract (81698b3).
172
+ - Harden Postmark provider data objects (3940fd5).
173
+ - Fold encoded address headers at 76 columns (ab731ed).
174
+ - Bound MIME encoded-word lines (b78ca71).
175
+
176
+ ### ๐Ÿ“ฆ Packaging
177
+
178
+ - Release v0.6.2 (3d21e1a).
179
+ - Align esbuild script approval version (613f597).
package/README.md CHANGED
@@ -142,7 +142,8 @@ Sporades currently includes:
142
142
  - Local Docker Container sessions for production-like staging tests.
143
143
  - Hosted Capsules on SSH-reachable Host servers, routed through Caddy and run in
144
144
  hardened Docker containers.
145
- - Runtime-owned auth with anonymous sessions, email auth, Google OAuth, and
145
+ - Runtime-owned auth with anonymous sessions, email auth, Google OAuth,
146
+ Microsoft OpenID Connect, Sign in with Apple, Facebook Login, and
146
147
  local identity simulation for tests and agents.
147
148
  - Runtime-owned current-user preferences exposed through `sporades/client`
148
149
  without app preference tables. Preferences follow the Sporades user identity,
@@ -161,7 +161,7 @@ function validatePublicTreeFileSet(files) {
161
161
  }
162
162
 
163
163
  // src/server-runtime-source.ts
164
- import { createHash, createHmac, randomBytes, randomUUID, scryptSync, timingSafeEqual } from "node:crypto";
164
+ import { createHash, createHmac, createPrivateKey, randomBytes, randomUUID, scryptSync, sign, timingSafeEqual, verify } from "node:crypto";
165
165
  var EMAIL_SIGN_IN_THROTTLE_WINDOW_MS = 15 * 60 * 1e3;
166
166
  function logPayloadMaxBytes(config = {}) {
167
167
  const configured = Number(config.logs?.payloadMaxBytes ?? config.logging?.payloadMaxBytes);
@@ -391,7 +391,7 @@ function writeEnvelope(result, failed = false) {
391
391
  }
392
392
 
393
393
  // src/cli/cli-version.ts
394
- var CLI_VERSION = "0.6.0";
394
+ var CLI_VERSION = "0.6.3";
395
395
 
396
396
  // src/cli/schedule-inspection-envelope.ts
397
397
  function sanitizeScheduleInspectionEnvelope(envelope, invalid) {