sporades 0.6.6 โ†’ 0.7.1

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 (130) hide show
  1. package/CHANGES.md +17 -4
  2. package/README.md +16 -2
  3. package/bin/sporades-host-helper.js +34 -12
  4. package/bin/sporades.js +13502 -13147
  5. package/dist/acl-runtime.d.ts +107 -0
  6. package/dist/acl-runtime.d.ts.map +1 -0
  7. package/dist/acl-runtime.js +806 -0
  8. package/dist/acl-runtime.js.map +1 -0
  9. package/dist/auth-runtime.d.ts +262 -0
  10. package/dist/auth-runtime.d.ts.map +1 -0
  11. package/dist/auth-runtime.js +3015 -0
  12. package/dist/auth-runtime.js.map +1 -0
  13. package/dist/bundle-pipeline.d.ts.map +1 -1
  14. package/dist/bundle-pipeline.js +15 -3
  15. package/dist/bundle-pipeline.js.map +1 -1
  16. package/dist/cli/cli-help.d.ts +2 -2
  17. package/dist/cli/cli-help.js +1 -1
  18. package/dist/cli/cli-version.d.ts +1 -1
  19. package/dist/cli/cli-version.js +1 -1
  20. package/dist/cli/project-config.d.ts +1 -0
  21. package/dist/cli/project-config.d.ts.map +1 -1
  22. package/dist/cli/project-config.js +39 -0
  23. package/dist/cli/project-config.js.map +1 -1
  24. package/dist/cli/sporades.js +138 -2
  25. package/dist/cli/sporades.js.map +1 -1
  26. package/dist/database-runtime.d.ts +66 -0
  27. package/dist/database-runtime.d.ts.map +1 -0
  28. package/dist/database-runtime.js +1911 -0
  29. package/dist/database-runtime.js.map +1 -0
  30. package/dist/email-events-config.d.ts +4 -0
  31. package/dist/email-events-config.d.ts.map +1 -0
  32. package/dist/email-events-config.js +46 -0
  33. package/dist/email-events-config.js.map +1 -0
  34. package/dist/email-events-runtime.d.ts +19 -0
  35. package/dist/email-events-runtime.d.ts.map +1 -0
  36. package/dist/email-events-runtime.js +384 -0
  37. package/dist/email-events-runtime.js.map +1 -0
  38. package/dist/file-storage-runtime.d.ts +183 -0
  39. package/dist/file-storage-runtime.d.ts.map +1 -0
  40. package/dist/file-storage-runtime.js +1040 -0
  41. package/dist/file-storage-runtime.js.map +1 -0
  42. package/dist/http-runtime.d.ts +53 -0
  43. package/dist/http-runtime.d.ts.map +1 -0
  44. package/dist/http-runtime.js +579 -0
  45. package/dist/http-runtime.js.map +1 -0
  46. package/dist/inspection-sql.d.ts +104 -0
  47. package/dist/inspection-sql.d.ts.map +1 -0
  48. package/dist/inspection-sql.js +872 -0
  49. package/dist/inspection-sql.js.map +1 -0
  50. package/dist/jobs-runtime.d.ts +83 -0
  51. package/dist/jobs-runtime.d.ts.map +1 -0
  52. package/dist/jobs-runtime.js +633 -0
  53. package/dist/jobs-runtime.js.map +1 -0
  54. package/dist/log-index-guard.d.ts +5 -0
  55. package/dist/log-index-guard.d.ts.map +1 -0
  56. package/dist/log-index-guard.js +112 -0
  57. package/dist/log-index-guard.js.map +1 -0
  58. package/dist/log-index-storage.d.ts +10 -0
  59. package/dist/log-index-storage.d.ts.map +1 -0
  60. package/dist/log-index-storage.js +210 -0
  61. package/dist/log-index-storage.js.map +1 -0
  62. package/dist/mail-config-validation.d.ts +4 -0
  63. package/dist/mail-config-validation.d.ts.map +1 -0
  64. package/dist/mail-config-validation.js +30 -0
  65. package/dist/mail-config-validation.js.map +1 -0
  66. package/dist/mail-config.d.ts +9 -0
  67. package/dist/mail-config.d.ts.map +1 -1
  68. package/dist/mail-config.js +10 -34
  69. package/dist/mail-config.js.map +1 -1
  70. package/dist/mail-runtime.d.ts +23 -0
  71. package/dist/mail-runtime.d.ts.map +1 -0
  72. package/dist/mail-runtime.js +1167 -0
  73. package/dist/mail-runtime.js.map +1 -0
  74. package/dist/maybe-promise.d.ts +4 -0
  75. package/dist/maybe-promise.d.ts.map +1 -0
  76. package/dist/maybe-promise.js +57 -0
  77. package/dist/maybe-promise.js.map +1 -0
  78. package/dist/package-root.d.ts +2 -0
  79. package/dist/package-root.d.ts.map +1 -0
  80. package/dist/package-root.js +37 -0
  81. package/dist/package-root.js.map +1 -0
  82. package/dist/runtime-errors.d.ts +13 -0
  83. package/dist/runtime-errors.d.ts.map +1 -0
  84. package/dist/runtime-errors.js +87 -0
  85. package/dist/runtime-errors.js.map +1 -0
  86. package/dist/runtime-log-policy.d.ts +5 -0
  87. package/dist/runtime-log-policy.d.ts.map +1 -0
  88. package/dist/runtime-log-policy.js +50 -0
  89. package/dist/runtime-log-policy.js.map +1 -0
  90. package/dist/server-runtime-source.d.ts +53 -1360
  91. package/dist/server-runtime-source.d.ts.map +1 -1
  92. package/dist/server-runtime-source.js +2682 -11436
  93. package/dist/server-runtime-source.js.map +1 -1
  94. package/dist/server.d.ts +6 -0
  95. package/dist/server.d.ts.map +1 -1
  96. package/dist/server.js +11 -0
  97. package/dist/server.js.map +1 -1
  98. package/dist/stored-row-decoding.d.ts +7 -0
  99. package/dist/stored-row-decoding.d.ts.map +1 -0
  100. package/dist/stored-row-decoding.js +69 -0
  101. package/dist/stored-row-decoding.js.map +1 -0
  102. package/dist/stored-value-coding.d.ts +9 -0
  103. package/dist/stored-value-coding.d.ts.map +1 -0
  104. package/dist/stored-value-coding.js +160 -0
  105. package/dist/stored-value-coding.js.map +1 -0
  106. package/dist/templates/client-runtime-template.d.ts.map +1 -1
  107. package/dist/templates/client-runtime-template.js +18 -0
  108. package/dist/templates/client-runtime-template.js.map +1 -1
  109. package/dist/templates/scaffold-template.d.ts.map +1 -1
  110. package/dist/templates/scaffold-template.js +17 -13
  111. package/dist/templates/scaffold-template.js.map +1 -1
  112. package/dist/templates/server-bundle-entry.d.ts +3 -0
  113. package/dist/templates/server-bundle-entry.d.ts.map +1 -0
  114. package/dist/templates/server-bundle-entry.js +235 -0
  115. package/dist/templates/server-bundle-entry.js.map +1 -0
  116. package/dist/templates/server-bundle-module-graph.d.ts +10 -0
  117. package/dist/templates/server-bundle-module-graph.d.ts.map +1 -0
  118. package/dist/templates/server-bundle-module-graph.js +126 -0
  119. package/dist/templates/server-bundle-module-graph.js.map +1 -0
  120. package/dist/user-preferences-runtime.d.ts +25 -0
  121. package/dist/user-preferences-runtime.d.ts.map +1 -0
  122. package/dist/user-preferences-runtime.js +136 -0
  123. package/dist/user-preferences-runtime.js.map +1 -0
  124. package/package.json +4 -4
  125. package/src/types/client.d.ts +18 -0
  126. package/src/types/server.d.ts +75 -0
  127. package/dist/templates/server-bundle-template.d.ts +0 -8
  128. package/dist/templates/server-bundle-template.d.ts.map +0 -1
  129. package/dist/templates/server-bundle-template.js +0 -244
  130. package/dist/templates/server-bundle-template.js.map +0 -1
package/CHANGES.md CHANGED
@@ -1,9 +1,22 @@
1
1
  # Changes
2
2
 
3
- ## Unreleased - 2026-08-04
3
+ ## Unreleased - 2026-08-12
4
4
 
5
- Changes since v0.6.5.
5
+ Changes since v0.7.0.
6
6
 
7
- ### ๐Ÿ› Bug Fixes
7
+ ### ๐Ÿš€ Features
8
8
 
9
- - User preferences (cebd9f0).
9
+ - Adapt Mailgun email events (66d4291).
10
+ - Adapt Postmark email events (d30efa2).
11
+ - Adapt SMTP2GO email events (8d39237).
12
+ - Dispatch verified email provider events (d818b6d).
13
+ - Trust required native installers (c0a539c).
14
+
15
+ ### ๐Ÿ“ Documentation
16
+
17
+ - Clarify provider callback responses (7fde2ae).
18
+ - Document Mailjet SMTP configuration (e710ba2).
19
+
20
+ ### ๐Ÿงช Tests
21
+
22
+ - Cover Mailgun non-delivery retries (c5e566e).
package/README.md CHANGED
@@ -57,6 +57,10 @@ sporades host push --restart
57
57
 
58
58
  - [User guide](https://mgscox.github.io/sporades/user-guide): build, run, inspect, deploy, auth,
59
59
  preferences, files, endpoints, messages, and common workflows.
60
+ - [Feature reference](https://mgscox.github.io/sporades/guide/reference): exhaustive contracts and
61
+ command lookup, split into focused topic pages.
62
+ - [LLM documentation manifest](https://mgscox.github.io/sporades/llms.txt): release-matched Markdown
63
+ sources for agents and other documentation tools.
60
64
  - [Architecture](https://mgscox.github.io/sporades/architecture): platform model, runtime modes, Host
61
65
  server design, and ownership boundaries.
62
66
  - [Runtime layout](https://mgscox.github.io/sporades/runtime-layout): generated files, mounts, Host
@@ -210,6 +214,15 @@ sporades create notes --template todo
210
214
  cd notes
211
215
  ```
212
216
 
217
+ Use a reusable local Capsule template by passing its directory path. Sporades
218
+ copies the template while honouring its `.gitignore`, excludes `.git`,
219
+ `node_modules`, `.sporades`, and `.env.sporades.server`, rewrites the project
220
+ name, and merges the current Sporades dependency and standard scripts:
221
+
222
+ ```sh
223
+ sporades create notes --template /absolute/path/to/capsule-template
224
+ ```
225
+
213
226
  Run a local Dev session:
214
227
 
215
228
  ```sh
@@ -246,8 +259,9 @@ sporades host push --host personal --subname notes --verify --json
246
259
 
247
260
  Sporades is early, active platform work. It is useful for fast prototypes,
248
261
  agent-driven app loops, local production-like testing, and private hosted
249
- Capsules, but it is not trying to be a full production platform (yet). Check the
250
- [Roadmap](docs/ROADMAP.md) for in-flight and planned features.
262
+ Capsules, but it is not trying to be a full production platform (yet). Check the
263
+ [Roadmap](https://mgscox.github.io/sporades/ROADMAP) for in-flight and planned
264
+ features.
251
265
 
252
266
  The current focus is keeping the authoring surface small, the runtime
253
267
  inspectable, and the operational path friendly to both developers and agents.
@@ -161,15 +161,31 @@ function validatePublicTreeFileSet(files) {
161
161
  }
162
162
 
163
163
  // src/server-runtime-source.ts
164
- import { createHash, createHmac, createPrivateKey, randomBytes, randomUUID, scryptSync, sign, timingSafeEqual, verify } from "node:crypto";
164
+ import { createHash, randomBytes, randomUUID } from "node:crypto";
165
+
166
+ // src/file-storage-runtime.ts
167
+ var nodeCryptoModule = process.getBuiltinModule("node:crypto");
168
+
169
+ // src/auth-runtime.ts
170
+ var nodeCryptoModule2 = process.getBuiltinModule("node:crypto");
165
171
  var EMAIL_SIGN_IN_THROTTLE_WINDOW_MS = 15 * 60 * 1e3;
166
- function logPayloadMaxBytes(config = {}) {
167
- const configured = Number(config.logs?.payloadMaxBytes ?? config.logging?.payloadMaxBytes);
168
- return Number.isInteger(configured) && configured > 0 ? configured : 4096;
169
- }
170
- function logRedactedValue() {
171
- return "[REDACTED]";
172
+ var PASSWORD_RESET_DEFAULT_TTL_MS = 60 * 60 * 1e3;
173
+ var PASSWORD_RESET_MIN_TTL_MS = 5 * 60 * 1e3;
174
+ var PASSWORD_RESET_MAX_TTL_MS = 24 * 60 * 60 * 1e3;
175
+
176
+ // src/runtime-log-policy.ts
177
+ function isSensitiveLogKey(key) {
178
+ return /(^|[-_])(?:password|passwd|token|secret|authorization|cookie|client[-_]?secret|api[-_]?token|private[-_]?key|authorized[-_]?keys?|request[-_]?body|raw[-_]?body|stack(?:trace)?)([-_]|$)/i.test(String(key)) || /(?:password|passwd|token|secret|authorization|cookie|clientSecret|apiToken|privateKey|authorizedKeys|requestBody|rawRequestBody|stackTrace)/i.test(String(key));
172
179
  }
180
+
181
+ // src/database-runtime.ts
182
+ var nodeCryptoModule3 = process.getBuiltinModule("node:crypto");
183
+ var nodeFsModule = process.getBuiltinModule("node:fs");
184
+
185
+ // src/jobs-runtime.ts
186
+ var nodeCryptoModule4 = process.getBuiltinModule("node:crypto");
187
+
188
+ // src/acl-runtime.ts
173
189
  var PRIVILEGED_AUDIT_SCHEMA = "sporades.privileged-audit.v1";
174
190
  var PRIVILEGED_AUDIT_ACTOR_KINDS = /* @__PURE__ */ new Set(["privileged-server-role", "captured-user", "platform", "unknown"]);
175
191
  var PRIVILEGED_AUDIT_OUTCOMES = /* @__PURE__ */ new Set(["started", "completed", "errored", "finished"]);
@@ -240,6 +256,16 @@ function auditString(value, fallback) {
240
256
  const text = value === null || value === void 0 ? "" : String(value);
241
257
  return text.trim() ? text : fallback;
242
258
  }
259
+ var ACL_HELPER_STATE = Symbol("sporades.aclHelperState");
260
+
261
+ // src/server-runtime-source.ts
262
+ function logPayloadMaxBytes(config = {}) {
263
+ const configured = Number(config.logs?.payloadMaxBytes ?? config.logging?.payloadMaxBytes);
264
+ return Number.isInteger(configured) && configured > 0 ? configured : 4096;
265
+ }
266
+ function logRedactedValue() {
267
+ return "[REDACTED]";
268
+ }
243
269
  function createLogEnvelope(input) {
244
270
  const now = (/* @__PURE__ */ new Date()).toISOString();
245
271
  const config = input.config ?? {};
@@ -309,9 +335,6 @@ function logDataContainsServerEnvValue(value, serverEnv) {
309
335
  );
310
336
  return values.some((secret) => serialized.includes(String(secret)));
311
337
  }
312
- function isSensitiveLogKey(key) {
313
- return /(^|[-_])(?:password|passwd|token|secret|authorization|cookie|client[-_]?secret|api[-_]?token|private[-_]?key|authorized[-_]?keys?|request[-_]?body|raw[-_]?body|stack(?:trace)?)([-_]|$)/i.test(String(key)) || /(?:password|passwd|token|secret|authorization|cookie|clientSecret|apiToken|privateKey|authorizedKeys|requestBody|rawRequestBody|stackTrace)/i.test(String(key));
314
- }
315
338
  function isSensitiveLogString(value) {
316
339
  return /-----BEGIN [A-Z ]*PRIVATE KEY-----/.test(value) || /\b(?:ssh-rsa|ssh-ed25519|ecdsa-sha2-[^\s]+)\s+[A-Za-z0-9+/=]{32,}/.test(value) || /(^|\n)\s*at\s+.+:\d+:\d+/.test(value);
317
340
  }
@@ -348,7 +371,6 @@ function capLogEnvelope(envelope, maxBytes) {
348
371
  capped.message = capped.message.slice(0, 256);
349
372
  return capped;
350
373
  }
351
- var ACL_HELPER_STATE = Symbol("sporades.aclHelperState");
352
374
 
353
375
  // src/cli/cli-support.ts
354
376
  function errorDetails(error) {
@@ -391,7 +413,7 @@ function writeEnvelope(result, failed = false) {
391
413
  }
392
414
 
393
415
  // src/cli/cli-version.ts
394
- var CLI_VERSION = "0.6.6";
416
+ var CLI_VERSION = "0.7.1";
395
417
 
396
418
  // src/cli/schedule-inspection-envelope.ts
397
419
  function sanitizeScheduleInspectionEnvelope(envelope, invalid) {