sporades 0.4.0 → 0.5.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.
package/CHANGES.md CHANGED
@@ -1,286 +1,13 @@
1
1
  # Changes
2
2
 
3
- ## Unreleased - 2026-07-12
3
+ ## Unreleased - 2026-07-29
4
4
 
5
- Changes since v0.3.0.
6
-
7
- ### 🚀 Features
8
-
9
- - Contract client capability matrix (a118bef).
10
- - Complete Inferno client parity (2bd4313).
11
- - Admit Inferno esbuild capsules (425bd02).
12
- - Complete Lit template parity (a456eb2).
13
- - Admit Lit with reactive controllers (967652e).
14
- - Complete Solid template parity (64950f4).
15
- - Admit SolidJS Vite clients (f6923eb).
16
- - Complete Svelte template parity (e4570fa).
17
- - Admit Svelte Vite capsules (b2a4f68).
18
- - Complete Vue template parity (3885368).
19
- - Admit Vue Vite client framework (905fe68).
20
- - Admit Preact Vite client toolchain (c58e276).
21
- - Admit React Vite client toolchain (3cb977e).
22
- - Add vanilla TypeScript client framework (7fc8cdb).
23
- - Host complete public tree releases (b2e4485).
24
- - Mount container public trees (10408cf).
25
- - Build normalized public tree (4449de9).
26
- - Add stable keys to Campfire lists (df5130d).
27
- - Add Campfire realtime journey exemplar (fe2682b).
28
- - Finalize journey session boundaries (8cd7245).
29
- - Capture safe browser journey signals (e3b39d9).
30
- - Implement Journey TTL buffering and expiry (49941ce).
31
- - Observe capsule journey changes (337ba97).
32
- - Add explicit user journey sessions (4a304b6).
33
- - Timestamp photo template names every minute (be38452).
34
- - Inspect remote capsule schedules (91477a3).
35
- - Add Dev schedule inspection command (9156101).
36
- - Implement durable schedule recovery (85344de).
37
- - Apply schedule timezone semantics (5f519dc).
38
- - Add dynamic schedule payload factories (9c33cbc).
39
- - Run static recurring privileged jobs (29160ba).
40
- - Add controllable runtime clock (ef1a6fd).
41
- - Add cross-runtime job inspection (9c98b2e).
42
- - Filter job inspection lists (0a2160b).
43
- - Recover expired job leases (9897c78).
44
- - Add job delays retries and cancellation (0946b9c).
45
- - Add privileged job execution (b46b35e).
46
- - Add current-user job queue (c39658a).
47
- - Add version and host upgrade to CLI (01e28ac).
48
- - Implement security hardening (d6713fc).
49
- - Implement privileged server role (01ace81).
50
- - Implement privileged audit contract (20ac917).
5
+ Changes since v0.5.0.
51
6
 
52
7
  ### 🐛 Bug Fixes
53
8
 
54
- - Plan next feature (7c60c3e).
55
- - Make client capability matrix authoritative (96813f5).
56
- - Harden Inferno exemplar workflows (5380318).
57
- - Verify strict Lit scaffold behavior (c75591d).
58
- - Harden Lit lifecycle and defaults (52da69e).
59
- - Harden Dev refresh delivery (e0f5703).
60
- - Scope Dev refresh delivery receipts (b35c2c3).
61
- - Sequence Dev refresh subscriptions (378769a).
62
- - Honor Svelte mutation store contract (c5803b0).
63
- - Isolate Svelte store subscriptions (223bac3).
64
- - Serialize Campfire activity consent (162836c).
65
- - Contain project Vue compiler resolution (db2e924).
66
- - Harden Vue mutation and compiler ownership (3448d1d).
67
- - Harden React Vite toolchain admission (8884b09).
68
- - Let query unsubscribe overtake initial work (1d6f44d).
69
- - Harden vanilla client runtime boundaries (20eff80).
70
- - Harden public tree selection (a74183e).
71
- - Secure hosted release identity (34403a4).
72
- - Authorize container before SSH setup (eb3191a).
73
- - Preflight container replacement ownership (6e5756a).
74
- - Enforce container release ownership (3e4e4a4).
75
- - Transact container public releases (3971f89).
76
- - Publish ownership heartbeats atomically (7a45807).
77
- - Heartbeat public tree ownership (a14881b).
78
- - Validate public tree ownership (95aa2b9).
79
- - Lease public tree candidates (676ee78).
80
- - Harden public tree activation (642fc6b).
81
- - Activate public trees after runtime readiness (f16e81b).
82
- - Retire journey state on pagehide (d19a080).
83
- - Preserve journey consent across reconnect (c718f96).
84
- - Retire manual-only journey consent (0e68b3f).
85
- - Close journey lifecycle review gaps (0778487).
86
- - Fix journey meta observation targeting (852bfa8).
87
- - Stabilize journey record metadata (ef80a9c).
88
- - Dedupe native journey submit activation (9216466).
89
- - Correlate journey capture structurally (06e0ce4).
90
- - Harden journey browser capture (cff82ea).
91
- - Make journey subscriptions lifecycle-safe (200e5b5).
92
- - Clear journey consent on identity changes (53d757c).
93
- - Retire journeys on auth transitions (80fbd9f).
94
- - Preserve journey consent across reconnects (23171ad).
95
- - Roadmap status (3f35545).
96
- - Include scheduler recovery in generated runtime (9294ee3).
97
- - Sanitize container schedule inspection (09fc9bd).
98
- - Bound hosted schedule inspection (5e552f5).
99
- - Complete schedule timezone semantics (fdc2d77).
100
- - Serialize schedule payload factories by schedule (d1d30c5).
101
- - Make schedule provenance private (f232241).
102
- - Harden static schedule lifecycle (945fe4c).
103
- - Narrow inspection adapter declaration (be5939c).
104
- - Make job inspection storage read-only (6382292).
105
- - Secure active dev job inspection config (ea62ff4).
106
- - Harden job inspection boundaries (c2847c1).
107
- - Filter privileged job inspection (875e413).
108
- - Order expired lease recovery (3d58b91).
109
- - Delay expired lease recovery (57c22a0).
110
- - Cancel privileged jobs and clear wake timers (40a48be).
111
- - Wake delayed jobs and cancel privileged jobs (15f7a33).
112
- - Deduplicate privileged pending jobs (0fef839).
113
- - Seal privileged job capabilities (5463788).
114
- - Deduplicate pending job enqueues (d1664d0).
115
- - Persist jobs from trusted server handlers (8b89aa5).
116
- - Harden current-user job queue (0f958a5).
117
-
118
- ### 🔧 Improvements
119
-
120
- - Plan Campfire exemplar template (780debd).
121
- - Complete user journey tracker swarm (4959116).
122
- - Re-review journey framework guidance (a8b0840).
123
- - Rework journey framework guidance (860e738).
124
- - Review journey contract publication (b1498a7).
125
- - Dispatch journey contract publication (85000bc).
126
- - Complete journey lifecycle issue (f1a084d).
127
- - Re-review journey pagehide retirement (bfd66a0).
128
- - Rework journey pagehide retirement (d08ff6e).
129
- - Re-review journey reconnect ownership (c23e59a).
130
- - Rework journey reconnect ownership (d9a9a5c).
131
- - Re-review manual-only journey replacement (2a6b0d2).
132
- - Rework manual-only journey replacement (e185bf8).
133
- - Rework simplified journey lifecycle (fdbada1).
134
- - Review simplified journey lifecycle (54776fd).
135
- - Dispatch simplified journey lifecycle (eed1dca).
136
- - Block journey lifecycle on capability lifetime (87bcc52).
137
- - Rework journey capability persistence (ad87f1e).
138
- - Review durable journey capabilities (d0d203f).
139
- - Rework journey runtime replacement (ecc58d9).
140
- - Re-review bounded journey retirement (aaac45b).
141
- - Bound journey retirement rework (0bb84aa).
142
- - Re-review journey lifecycle issue (4e466f1).
143
- - Rework journey lifecycle retirement (4d7ef6f).
144
- - Review journey lifecycle issue (68921a8).
145
- - Dispatch journey lifecycle issue (e26fa01).
146
- - Resume user journey tracker swarm (af51482).
147
- - Record journey fix swarm verification (5bd74f6).
148
- - Complete journey review fix swarm (d92705e).
149
- - Review journey record metadata fix (b657195).
150
- - Review journey meta observer fix (a7d9c0c).
151
- - Dispatch journey review fix swarm (967466c).
152
- - Plan user journey tracker review fixes (1fc56f7).
153
- - Complete user journey tracker issue 04 (6763e62).
154
- - Complete user journey tracker issue 03 (bba2e57).
155
- - Complete user journey tracker issue 02 (6cf3c80).
156
- - Complete user journey tracker issue 01 (4799ebd).
157
- - Record job scheduling final verification (275e780).
158
- - Complete job scheduling issue 10 (d2e8c0a).
159
- - Rereview job scheduling issue 10 (4ab304d).
160
- - Rework job scheduling issue 10 (2cad09d).
161
- - Review job scheduling issue 10 (9f6777c).
162
- - Dispatch job scheduling issue 10 (5fd0e5f).
163
- - Complete job scheduling issue 09 (c3b4ec2).
164
- - Final review job scheduling issue 09 (f76e36d).
165
- - Harden container schedule inspection (39c980a).
166
- - Rereview job scheduling issue 09 (ff5fce7).
167
- - Rework job scheduling issue 09 (71632d6).
168
- - Review job scheduling issue 09 (1ce4f4b).
169
- - Dispatch job scheduling issue 09 (e55eebf).
170
- - Complete job scheduling issue 08 (8816c97).
171
- - Review job scheduling issue 08 (09b7575).
172
- - Dispatch job scheduling issue 08 (d443acf).
173
- - Complete job scheduling issue 07 (37334f0).
174
- - Final review job scheduling issue 07 (021f16f).
175
- - Harden schedule timestamp inspection (07ee2b8).
176
- - Rereview job scheduling issue 07 (53cccf7).
177
- - Rework job scheduling issue 07 (7f39f88).
178
- - Review job scheduling issue 07 (17eb0d3).
179
- - Dispatch job scheduling issue 07 (468c6d1).
180
- - Complete job scheduling issue 06 (413b122).
181
- - Rereview job scheduling issue 06 (7159e64).
182
- - Rework job scheduling issue 06 (5f2cb2f).
183
- - Review job scheduling issue 06 (286470c).
184
- - Dispatch job scheduling issue 06 (c5ad802).
185
- - Complete job scheduling issue 05 (37be3d4).
186
- - Rereview job scheduling issue 05 (4b0e010).
187
- - Rework job scheduling issue 05 (e32381d).
188
- - Review job scheduling issue 05 (97663dc).
189
- - Dispatch job scheduling issue 05 (88f455d).
190
- - Complete job scheduling issue 04 (be8c33f).
191
- - Final review job scheduling issue 04 (8c7a66e).
192
- - Rereview job scheduling issue 04 (6ad08bf).
193
- - Rework job scheduling issue 04 (c6b109e).
194
- - Review job scheduling issue 04 (3f77a8f).
195
- - Dispatch job scheduling issue 04 (87fac67).
196
- - Complete job scheduling issue 03 (6581e2b).
197
- - Rereview job scheduling issue 03 (5ea3e02).
198
- - Rework job scheduling issue 03 (c7702f5).
199
- - Review job scheduling issue 03 (07b7373).
200
- - Dispatch job scheduling issue 03 (74c7b61).
201
- - Complete job scheduling issue 02 (391f849).
202
- - Rereview hardened scheduling provenance (1b70069).
203
- - Harden job scheduling issue 02 provenance (35f8f9a).
204
- - Rereview job scheduling issue 02 (ed203a1).
205
- - Rework job scheduling issue 02 (a2c4252).
206
- - Review job scheduling issue 02 (9d57fc6).
207
- - Dispatch job scheduling issue 02 (5266d0b).
208
- - Complete job scheduling issue 01 (96675ce).
209
- - Review job scheduling issue 01 (110d084).
210
- - Dispatch job scheduling issue 01 (5b8ae0f).
211
- - Start job scheduling swarm ledger (4b33165).
212
- - Preserve schedule recovery blockers (4377ca2).
213
- - Link job scheduling issue graph (93ff0f1).
214
- - Normalize job scheduling blockers (98c96c6).
215
- - Normalize job scheduling issue status (7b5e100).
216
- - Complete job queue issue set (ad11361).
217
- - Record job inspection completion (2397009).
218
- - Record job queue inspection blocker (9c83866).
219
- - Record job queue issue 04 completion (175dd66).
220
- - Record job queue issue 03 completion (0995023).
221
- - Record job queue issue 02 completion (34a02ae).
222
- - Record job queue issue 01 completion (a1ab904).
223
-
224
- ### 📝 Documentation
225
-
226
- - Include framework list in intro (70a8997).
227
- - Prove client matrix runtime conformance (83e28a3).
228
- - Contract fixed client file infrastructure (808132a).
229
- - Specify multi-framework client toolchains (69ef70a).
230
- - Finalize journey contract publication (b7d7856).
231
- - Clarify Journey framework and Shadow DOM guidance (28d55cb).
232
- - Document User journey tracker contract (6c19643).
233
- - Simplify journey session boundaries (e08e845).
234
- - Plan user journey tracker (0fe2834).
235
- - Stabilize API source links (7965ff7).
236
- - Refresh API source links after integration (ba89bfd).
237
- - Resolve scheduling publication contradictions (3c6f411).
238
- - Publish job scheduling contract (febf4c9).
239
- - Clarify implemented scheduling scope (35e3457).
240
- - Align job scheduling PRD status (9c87d98).
241
- - Add multi-framework toolchain tickets (18a7af4).
242
- - Plan Job Scheduling (ba53888).
243
- - Plan multi-framework client toolchains (bb4f611).
244
- - Align job queue inspection expectations (ad13e2f).
245
- - Restore API source links (2faa48b).
246
- - Complete job queue documentation (b51ef32).
247
- - Record job queue docs alignment (ac4d85e).
248
- - Align implemented job queue scope (4f7263c).
249
- - Refresh job queue docs alignment scope (83261ad).
250
- - Refine job queue inspection issue graph (aaa73b9).
251
- - Cover exhausted job lease recovery (9cf771b).
252
- - Plan Job Queue (0e78191).
253
- - Plan privileged server role (5932535).
9
+ - Ensure esbuild dep and allowScript versions dont drift (36757e3).
254
10
 
255
11
  ### 🧪 Tests
256
12
 
257
- - Prove Lit stale publications are inert (5e13107).
258
- - Exercise Vue template behavior (f6ccfcf).
259
- - Harden Campfire fixture automation (50fc000).
260
- - Refine Campfire activity sharing (638f485).
261
- - Close Campfire lifecycle and durability gaps (609b0d4).
262
- - Harden Campfire exemplar contracts (b254a52).
263
- - Prove Campfire multi-user realtime behavior (56066ef).
264
- - Re-review journey lifecycle coverage (b0adf0b).
265
- - Prove journey browser capture contract (f43465b).
266
- - Test Journey Capsule capacity (34662fe).
267
- - Require canonical schedule inspection timestamps (28abf9d).
268
- - Harden schedule inspection correlations (e4589f5).
269
- - Inspect schedules through privileged server context (25bf0c4).
270
- - Recover scheduled occurrences after claim expiry (740a944).
271
- - Make scheduled occurrence creation crash-safe (e12208b).
272
- - Validate schedule reconciliation before writes (2f04c38).
273
- - Cover job inspection filters (8bde7f3).
274
- - Cover atomic job claims (c932161).
275
- - Cover job idempotency restart (0ac7ec8).
276
- - Cover queued job cancellation (44459dc).
277
- - Cover delayed wake timer cleanup (231ced6).
278
- - Cover delayed ordering and privileged cancellation signal (0ecca6a).
279
- - Cover running job cancellation outcomes (fb75562).
280
- - Cover delayed wake and retry exhaustion (c38b5b9).
281
- - Cover captured job actor boundaries (1ffebf8).
282
- - Cover privileged job types (32d0ced).
283
-
284
- ### 📦 Packaging
285
-
286
- - Bake CLI version into host helper (0cda575).
13
+ - Run endpoint handlers from bundled capsules (a760693).
package/README.md CHANGED
@@ -55,17 +55,17 @@ sporades host push --restart
55
55
 
56
56
  ## Documentation
57
57
 
58
- - [User guide](docs/user-guide.md): build, run, inspect, deploy, auth,
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
- - [Architecture](docs/architecture.md): platform model, runtime modes, Host
60
+ - [Architecture](https://mgscox.github.io/sporades/architecture): platform model, runtime modes, Host
61
61
  server design, and ownership boundaries.
62
- - [Runtime layout](docs/runtime-layout.md): generated files, mounts, Host
62
+ - [Runtime layout](https://mgscox.github.io/sporades/runtime-layout): generated files, mounts, Host
63
63
  directories, and persistent data locations.
64
- - [Host server installation](docs/server-installation.md): prepare a Linux Host
64
+ - [Host server installation](https://mgscox.github.io/sporades/server-installation): prepare a Linux Host
65
65
  server for Hosted Capsules.
66
- - [Product requirements](docs/PRD.md): implemented scope, deferred scope, and
66
+ - [Product requirements](https://mgscox.github.io/sporades/PRD): implemented scope, deferred scope, and
67
67
  core product principles.
68
- - [Roadmap](docs/ROADMAP.md): candidate features and promotion status.
68
+ - [Roadmap](https://mgscox.github.io/sporades/ROADMAP): candidate features and promotion status.
69
69
 
70
70
  ## A Tiny Capsule - the entire server code for a real-time 'to-do' app
71
71
 
@@ -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.4.0";
394
+ var CLI_VERSION = "0.5.1";
395
395
 
396
396
  // src/cli/schedule-inspection-envelope.ts
397
397
  function sanitizeScheduleInspectionEnvelope(envelope, invalid) {
package/bin/sporades.js CHANGED
@@ -1198,7 +1198,7 @@ function clientCapabilityError(framework, toolchain) {
1198
1198
  if (framework === "vanilla" && toolchain === "vite") return { message, hint: "Use React or Preact with Vite, or keep Vanilla TypeScript on esbuild." };
1199
1199
  const definition = clientFrameworkCapability(framework);
1200
1200
  if (definition && defaultClientToolchain(framework) === "vite") return { message, hint: `Use ${definition.label} with Vite.` };
1201
- return { message, hint: "Choose an admitted pair from the client capability matrix in docs/user-guide.md." };
1201
+ return { message, hint: "Choose an admitted pair from the client capability matrix in docs/guide/reference.md." };
1202
1202
  }
1203
1203
  var CLIENT_FRAMEWORK_HINT = `Use one of: ${CLIENT_FRAMEWORKS.filter((framework) => framework !== "vanilla").join(", ")}, vanilla.`;
1204
1204
  var CLIENT_TOOLCHAIN_HINT = `Use one of: ${CLIENT_TOOLCHAINS.join(", ")}.`;
@@ -2046,13 +2046,17 @@ var SERVER_RUNTIME_SOURCE_FUNCTIONS = [
2046
2046
  createPrivilegedAuditEmissionPublicError,
2047
2047
  isPrivilegedAuditEmissionPublicError,
2048
2048
  createPrivilegedHandlerContext,
2049
+ createPrivilegedScheduleApi,
2049
2050
  createPrivilegedFileApi,
2051
+ activePrivilegedFileAccess,
2050
2052
  privilegedAuthUserId,
2051
2053
  isReservedAuthUserId,
2052
2054
  assertNotReservedAuthUserId,
2053
2055
  createPrivilegedAuditLogInput,
2054
2056
  normalizePrivilegedAuditActorKind,
2055
2057
  normalizePrivilegedAuditOutcome,
2058
+ privilegedAuditLevelForOutcome,
2059
+ normalizePrivilegedAuditCorrelation,
2056
2060
  safePrivilegedAuditErrorCode,
2057
2061
  auditString,
2058
2062
  createLogEnvelope,
@@ -2083,6 +2087,7 @@ var SERVER_RUNTIME_SOURCE_FUNCTIONS = [
2083
2087
  schemaFieldFromCapsuleField,
2084
2088
  sqliteTypeForFieldKind,
2085
2089
  extractEndpoints,
2090
+ endpointHandlersFromCapsuleDefinition,
2086
2091
  extractQueryHandlers,
2087
2092
  extractQueryHandlersFromCapsule,
2088
2093
  extractMutationHandlers,
@@ -2141,6 +2146,7 @@ var SERVER_RUNTIME_SOURCE_FUNCTIONS = [
2141
2146
  applyReadAcl,
2142
2147
  filterRowsByReadAcl,
2143
2148
  createAclHelpers,
2149
+ aclRuleTouchedAsyncHelperRead,
2144
2150
  createAclDbHelpers,
2145
2151
  createAclStorageHelpers,
2146
2152
  assertAclHelperReadAllowed,
@@ -2566,7 +2572,7 @@ async function openDevDatabase(databasePath, serverSource, serverEnv = {}, confi
2566
2572
  serviceEnv
2567
2573
  });
2568
2574
  const schema = capsuleDefinition ? schemaFromCapsuleDefinition(capsuleDefinition) : extractSchema(serverSource);
2569
- const endpoints = extractEndpoints(serverSource);
2575
+ const endpoints = capsuleDefinition ? endpointHandlersFromCapsuleDefinition(capsuleDefinition) : extractEndpoints(serverSource);
2570
2576
  const queries = extractQueryHandlersFromCapsule(capsuleDefinition) ?? extractQueryHandlers(serverSource);
2571
2577
  const mutations = capsuleDefinition ? mutationHandlersFromCapsuleDefinition(serverSource, capsuleDefinition) : extractMutationHandlers(serverSource);
2572
2578
  const messages = extractMessageHandlers(serverSource);
@@ -5376,7 +5382,10 @@ function createPrivilegedFileApi(database, contextGetter) {
5376
5382
  ok: true,
5377
5383
  data: {
5378
5384
  url: `/__sporades/files/private/${row.id}?v=${encodeURIComponent(row.version)}`,
5379
- file: fileMetadataFromRow(row)
5385
+ file: {
5386
+ ...fileMetadataFromRow(row),
5387
+ ownerId: row.ownerId
5388
+ }
5380
5389
  },
5381
5390
  error: null
5382
5391
  };
@@ -6079,12 +6088,20 @@ function extractEndpoints(serverSource) {
6079
6088
  name: match[1],
6080
6089
  method: descriptor[1].toUpperCase(),
6081
6090
  path: descriptor[2],
6082
- handlerSource: argsSource.slice(descriptor[0].length).trim()
6091
+ handlerSource: argsSource.slice(descriptor[0].length).trim().replace(/,\s*$/, "")
6083
6092
  });
6084
6093
  endpointPattern.lastIndex = argsEnd + 1;
6085
6094
  }
6086
6095
  return endpoints;
6087
6096
  }
6097
+ function endpointHandlersFromCapsuleDefinition(capsuleDefinition) {
6098
+ return Object.entries(capsuleDefinition?.endpoints ?? {}).filter(([, definition]) => definition?.kind === "endpoint" && typeof definition.handler === "function" && typeof definition.options?.method === "string" && typeof definition.options?.path === "string").map(([name, definition]) => ({
6099
+ name,
6100
+ method: definition.options.method.toUpperCase(),
6101
+ path: definition.options.path,
6102
+ handler: definition.handler
6103
+ }));
6104
+ }
6088
6105
  function extractQueryHandlers(serverSource) {
6089
6106
  const queriesSource = extractObjectPropertySource(serverSource, "queries");
6090
6107
  if (!queriesSource) {
@@ -7172,8 +7189,7 @@ async function removeFileVersionBestEffort(database, fileId, version) {
7172
7189
  });
7173
7190
  }
7174
7191
  async function runEndpoint(database, endpoint, requestUrl, request) {
7175
- const createHandler = new Function(`return (${endpoint.handlerSource});`);
7176
- const handler = createHandler();
7192
+ const handler = typeof endpoint.handler === "function" ? endpoint.handler : new Function(`return (${endpoint.handlerSource});`)();
7177
7193
  const endpointRequest = await readEndpointRequest(database, requestUrl, request);
7178
7194
  const session = await resolveAnonymousSession(database, readEndpointSessionToken(endpointRequest.headers, endpointRequest.query));
7179
7195
  let context;
@@ -11076,6 +11092,10 @@ const sporadesActionIndex = process.argv.indexOf("--sporades-action");
11076
11092
  const sporadesAction = sporadesActionIndex < 0 ? null : process.argv[sporadesActionIndex + 1];
11077
11093
  const sporadesCapsuleModule = sporadesAction ? null : await import(${JSON.stringify(serverModuleDataUrl)});
11078
11094
  const sporadesCapsuleDefinition = sporadesCapsuleModule?.default ?? null;
11095
+ const PRIVILEGED_AUDIT_SCHEMA = "sporades.privileged-audit.v1";
11096
+ const PRIVILEGED_AUDIT_ACTOR_KINDS = new Set(["privileged-server-role", "captured-user", "platform", "unknown"]);
11097
+ const PRIVILEGED_AUDIT_OUTCOMES = new Set(["started", "completed", "errored", "finished"]);
11098
+ const ACL_HELPER_STATE = Symbol("sporades.aclHelperState");
11079
11099
  ${runtimeFunctions}
11080
11100
  ${publicTreeContract}
11081
11101
 
@@ -18183,7 +18203,7 @@ jobs:
18183
18203
  }
18184
18204
 
18185
18205
  // src/cli/cli-version.ts
18186
- var CLI_VERSION = "0.4.0";
18206
+ var CLI_VERSION = "0.5.1";
18187
18207
 
18188
18208
  // src/cli/sporades.ts
18189
18209
  var SUPPORTED_TEMPLATES = new Set(CLIENT_TEMPLATES);
@@ -23749,7 +23769,7 @@ function localContainerRuntimeUser() {
23749
23769
  return baseImageRuntimeUser();
23750
23770
  }
23751
23771
  function isMissingDockerContainerError(result) {
23752
- return /No such container/i.test(`${result.stderr ?? ""}
23772
+ return /No such (?:container|object)/i.test(`${result.stderr ?? ""}
23753
23773
  ${result.stdout ?? ""}`);
23754
23774
  }
23755
23775
  function writeJsonResponse(response, status, result) {
@@ -1,2 +1,2 @@
1
- export declare const CLI_VERSION = "0.4.0";
1
+ export declare const CLI_VERSION = "0.5.1";
2
2
  //# sourceMappingURL=cli-version.d.ts.map
@@ -1,3 +1,3 @@
1
1
  // Generated by `npm run build` from package.json. Do not edit by hand.
2
- export const CLI_VERSION = "0.4.0";
2
+ export const CLI_VERSION = "0.5.1";
3
3
  //# sourceMappingURL=cli-version.js.map
@@ -5353,7 +5353,7 @@ function localContainerRuntimeUser() {
5353
5353
  return baseImageRuntimeUser();
5354
5354
  }
5355
5355
  function isMissingDockerContainerError(result) {
5356
- return /No such container/i.test(`${result.stderr ?? ""}\n${result.stdout ?? ""}`);
5356
+ return /No such (?:container|object)/i.test(`${result.stderr ?? ""}\n${result.stdout ?? ""}`);
5357
5357
  }
5358
5358
  function writeJsonResponse(response, status, result) {
5359
5359
  response.writeHead(status, { "content-type": "application/json; charset=utf-8" });