endSession() now pushes the world's active module list to Frappe after
the snapshot push. Each module is projected to {id, title, url,
authors[].name + url} — versions and compatibility info are intentionally
omitted so the eventual public credits page doesn't leak dependency
versions. The Frappe endpoint also strips these fields server-side.
Module inventory push is treated as non-critical: a failure logs a
warning and adds a line to the chat summary, but doesn't abort the
session-completion flow. The chat summary now reports the count of
modules tracked.
Public API gains seitimeBridge.pushModuleInventory() for manual pushes.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Adds the GM-facing end-of-session orchestration. The expected use is a
Foundry macro of type Script with body:
seitimeBridge.endSession();
Flow:
1. Fetch scheduled sessions for this world from Frappe.
2. If 0 → notify and abort. If 1 → confirm dialog. If 2+ → picker dialog.
3. POST complete_session to mark the chosen session Completed and
schedule the next one (Frappe-side schedule_next_session).
4. Push snapshots for every PC in parallel (Promise.allSettled — partial
failures are surfaced, not fatal).
5. Whisper a summary chat message to the GM (counts and any failed
actor names with errors).
scripts/macros.js holds the orchestration; scripts/api.js gains thin
fetch wrappers for list_scheduled_sessions and complete_session. HTML in
dialogs and chat is escaped on output since session titles ultimately
come from user input.
Public API now: testConnection, pushManifest, pushSnapshot,
pushAllSnapshots, endSession.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>