1 ScoutsTracker Integration
Dave Sampson edited this page 2026-11-08 20:37:21 -05:00
This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

title description version date draft tags categories agents
ScoutsTracker-Integration ScoutsTracker event staging specifications, 51-property schema, jQuery 1.4.2 compatibility boundary, and DevTools staging lifecycle. 1.0.0 2026-11-08 false
scoutstracker
integration
staging
schema
jquery
human-in-the-loop
Integration
ScoutsTracker
agents_permission
agent_read
true
agent_write
true
agent_delete
false
agent_execute
false

ScoutsTracker Integration & Event Staging

Overview

ScoutsTracker is the primary operational records system utilized by Scouts Canada sections for scheduling events, managing attendance, and tracking badge advancement. ScoutsSync provides a safe, normalized staging pipeline that allows AI agents to translate schedule plans into validated event payloads without risking unintended production data corruption.


1. Human-in-the-Loop Safe Staging Lifecycle

To prevent unattended production database pollution or malformed schedule entries, ScoutsSync enforces a human-in-the-loop staging lifecycle. Automated tools do not post raw JSON mutations directly into the backend database. Instead, staging scripts inject the normalized payload into in-memory DOM state within the Scouter's authenticated browser session:

// Step 1: Instantiate uncommitted event object in memory
const outing = generateNewEvent(null, normalizedPayload, false);

// Step 2: Render event preview in UI
buildViewEvent(outing, true);

// Step 3: Open Scouter interactive verification dialog
buildEditEvent(outing);

Verification Flow

  1. Agent Normalization: Agent computes timestamps, builds the 51-property dictionary, and segregates duty rosters.
  2. Snippet Generation: FastMCP emits a single-line or multi-line JavaScript payload.
  3. Console Staging: The Scouter pastes the snippet into their active browser DevTools console on scoutstracker.ca.
  4. Interactive Audit: The native ScoutsTracker edit dialog opens with all fields pre-populated.
  5. Human Commit: The Scouter verifies the details and clicks Save, committing the event through standard application channels.

2. Canonical 51-Property Event Schema

All event payloads targeting ScoutsTracker conform to the canonical 51-property dictionary schema. Key attributes include:

Property Type Description & Constraints
externalid string Deterministic unique key (e.g. 27th-nepean-beavers-2026-9).
date number Unix epoch timestamp in milliseconds (UTC) for event start.
timestampend number Unix epoch timestamp in milliseconds (UTC) for event end.
isallday boolean false for timed section meetings, true for camps/hikes.
displayname string Formatted event title (e.g. Emergency Preparedness & Scouter Rusty).
location string Venue address (e.g. Mary Honeywell ES Gym, 73 Burnt Lands Dr).
notes2 Array<Note> Structured notes array with strict visibility controls.
cost object Cost structure { participant: 0, leader: 0, deposit: 0, other: 0 }.
labels Array<Label> Canadian Path OAS / Pond Area badge mappings [{ labelkey, count }].
timestampsignup number -1 for open signup, 0 for disabled, or deadline timestamp.
attendance object Initialized attendance container { present: [], absent: [] }.

notes2 Dual-Visibility Segregation Invariant

ScoutsTracker separates public family information from internal Scouter notes using numeric visibility flags within notes2:

  • Public Section (visibility: 0): Meeting overview, theme, parent instructions, what to bring, and uniform reminders. Visible to parents and youth in the tracker portal.
  • Scouters-Only Section (visibility: 2): Scouter Duty Roster (10 defined roles), safety plans, ratio verification, and emergency contacts. Strictly restricted to registered Leaders.

3. jQuery 1.4.2 Runtime Compatibility Boundary

ScoutsTracker operates on an legacy front-end stack utilizing jQuery 1.4.2 (/lib/jqtouch/jqtouch/jquery-1.4.2.min.js).

Warning

Injected scripts and console staging snippets must NEVER invoke APIs introduced in jQuery 1.6 or later.

Prohibited & Allowed API Invariants

  • $(...).prop(): FORBIDDEN (Introduced in jQuery 1.6). Invocations cause immediate runtime crashes (TypeError: $(...).prop is not a function).
  • Checkbox State Checking:
    • Forbidden: $('#checkbox').prop('checked')
    • Allowed: $('#checkbox').is(':checked') or $('#checkbox').attr('checked')
  • Attribute Access:
    • Allowed: $('#input').attr('value'), native DOM element.checked, element.value.
  • Event Binding:
    • Allowed: .bind(), .delegate(), .click(). Avoid .on() (jQuery 1.7+).

4. Timezone Arithmetic (America/Toronto)

Section meetings for the 27th Nepean Beaver Colony take place in the Ottawa area (America/Toronto time zone):

  • Standard Time (EST): UTC-5 (winter months).
  • Daylight Time (EDT): UTC-4 (spring, summer, early autumn).
  • Epoch Milliseconds: Timestamps in the payload must represent UTC epoch milliseconds calculated against local Toronto wall-clock time. For example:
    • Meeting: Wednesday 18:30–19:30 EDT.
    • Start: 1746052200000 (computed via zoneinfo.ZoneInfo("America/Toronto")).
    • End: 1746055800000.

Navigation & Cross-References