slotlock 0.2.0 → 0.5.0

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 (66) hide show
  1. package/CHANGELOG.md +582 -0
  2. package/CONTRIBUTING.md +35 -8
  3. package/GOVERNANCE.md +4 -2
  4. package/MAINTAINERS.md +3 -2
  5. package/NOTICE +4 -4
  6. package/README.md +498 -65
  7. package/SECURITY.md +31 -2
  8. package/SPEC.md +142 -15
  9. package/agent-server.d.ts +62 -10
  10. package/agent-server.js +577 -105
  11. package/agent-store-backend.d.ts +12 -0
  12. package/agent-store-backend.js +1115 -55
  13. package/api-keys.d.ts +11 -3
  14. package/api-keys.js +29 -6
  15. package/application-api.d.ts +35 -1
  16. package/application-api.js +683 -12
  17. package/booking-rules.d.ts +84 -0
  18. package/booking-rules.js +149 -0
  19. package/config.d.ts +112 -0
  20. package/config.js +225 -0
  21. package/dashboard.d.ts +67 -5
  22. package/dashboard.js +1012 -140
  23. package/ddl.d.ts +45 -3
  24. package/ddl.js +1124 -13
  25. package/engine.d.ts +5 -0
  26. package/engine.js +23 -6
  27. package/event-feed.d.ts +178 -0
  28. package/event-feed.js +435 -0
  29. package/event-schema.d.ts +59 -0
  30. package/event-schema.js +85 -0
  31. package/ical-worker-thread.js +4 -2
  32. package/ical-worker.d.ts +8 -5
  33. package/ical-worker.js +9 -2
  34. package/index.d.ts +12 -6
  35. package/index.js +9 -4
  36. package/interop.d.ts +117 -0
  37. package/interop.js +356 -0
  38. package/maintenance.d.ts +27 -5
  39. package/maintenance.js +92 -28
  40. package/mcp-app.d.ts +7 -1
  41. package/mcp-app.js +259 -40
  42. package/metrics.d.ts +24 -0
  43. package/metrics.js +167 -0
  44. package/node-server.d.ts +9 -1
  45. package/node-server.js +7 -2
  46. package/openapi.json +10970 -0
  47. package/package.json +3 -2
  48. package/rate-limit.d.ts +80 -0
  49. package/rate-limit.js +741 -0
  50. package/rest-api.d.ts +22 -0
  51. package/rest-api.js +166 -11
  52. package/rules.js +6 -3
  53. package/self-host.d.ts +45 -8
  54. package/self-host.js +616 -46
  55. package/slotlock-manifest.schema.json +7 -1
  56. package/slotlock.manifest.json +8 -2
  57. package/store.d.ts +647 -28
  58. package/store.js +2982 -327
  59. package/sync.d.ts +43 -2
  60. package/sync.js +1515 -323
  61. package/timezone.d.ts +58 -3
  62. package/timezone.js +249 -20
  63. package/types.d.ts +300 -9
  64. package/types.js +0 -2
  65. package/webhooks.d.ts +91 -0
  66. package/webhooks.js +300 -0
@@ -17,6 +17,12 @@ export interface SlotlockStoreAgentBackendOptions {
17
17
  * writes events through the store itself and shows them to agents beside the tools' own results.
18
18
  */
19
19
  export declare function projectSlotlockCalendarEvent(event: SlotlockCalendarEvent): Record<string, unknown>;
20
+ /**
21
+ * The HTTP status a store refusal answers with on every agent surface: a missing or foreign
22
+ * record 404, a malformed request 400, a full agent quota 429, and any other conflict with what is
23
+ * stored 409. rest-api.ts declares the 404 and 409 each route can answer from this.
24
+ */
25
+ export declare function slotlockAgentErrorStatus(code: string): 400 | 404 | 409 | 429;
20
26
  /** Bind the protocol server to the production store without giving a request control of tenancy. */
21
27
  export declare function createSlotlockStoreAgentBackend(store: SlotlockStore, options: SlotlockStoreAgentBackendOptions): SlotlockAgentCalendarBackend;
22
28
  export interface SlotlockStoreApplicationBackendOptions {
@@ -27,6 +33,12 @@ export interface SlotlockStoreApplicationBackendOptions {
27
33
  maxTenantResources?: number;
28
34
  /** Batches of each maintenance task one `slotlock_run_maintenance` call runs, 1-100 (default 10). */
29
35
  maintenanceBatches?: number;
36
+ /**
37
+ * Let an admin key erase its own tenant (`slotlock_erase_tenant`), everything it has and every
38
+ * key it holds, with its tenant reference as confirmation. Off unless true: erasure cannot be
39
+ * undone, and an operator may owe a tenant's data a retention or review first.
40
+ */
41
+ tenantErasure?: boolean;
30
42
  }
31
43
  /**
32
44
  * Serve the application API (application-api.ts) from the production store, in the principal's