Events reference

Generated from the JSON schema for the progress events a workshop reports. The schema itself is printed by jupyter workshop schema --events and published beside the manifest schema; Progress events explains how the events are recorded and reported.

The progress events a workshop reports: one JSON object per line in _workshop/events.jsonl and in the application/x-ndjson body posted to a sink. This schema describes one event. Every event carries the base fields below; each kind adds the fields listed under its entry in definitions/kinds. Fields whose values are open sets (frontend, host, platform, kind, status, trigger) are plain strings with the known values named in their descriptions, so a consumer validating against this schema keeps accepting events from a frontend or hosting service added later. A consumer that understands a kind validates the event against the base fields and then against that kind’s definition; an unknown kind is stored as it arrived.

Base fields

Every event carries these, whatever its kind.

Field

Type

Required

Description

kind

string

yes

What happened: workshop-start, workshop-resume, workshop-finish, workshop-abandon, page-enter, page-leave, heartbeat, gate-skipped, action-executed, verify-result, quiz-answered, form-submitted, hint-opened, checkpoint-restored, preflight-result or environment-created. Open: a later release may add kinds.

ts

string

yes

When the event happened, as an ISO 8601 timestamp from the learner’s clock.

session_id

string

yes

Random id of one open of the workshop. A resume is a new session that names the previous one in resumed_from; a restart is a new session that names it in restarted_from.

instance_id

string

yes

Id of the running frontend the session ran under: one run of the Jupyter server for JupyterLab, one page load for JupyterLite. Every workshop opened under that run carries the same value, which is how sessions of one learner working through a collection are grouped.

workshop

string

yes

Directory of the workshop relative to the JupyterLab root.

name

string

yes

The manifest name of the workshop.

version

string

yes

The manifest version of the workshop, always a string; empty when the manifest has none.

source

string

yes

Where the workshop came from, as the trust source key: git:@/, archive: or local:. Not a cross-deployment identity, since the same workshop is a local directory on one deployment and a git checkout on another; name and collection are.

collection

string

yes

The subscribed collection that lists the workshop, as the index URL or repository it was subscribed from; empty when no collection does. Together with name it identifies a workshop across deployments.

collection_id

string

no

The id the collection’s index declares, the same wherever the collection runs; absent or empty when the index declares none, in which case collection alone identifies it. A sink keys on this when present.

collection_title

string

no

The title of the collection’s index, for display; absent or empty when it has none.

seq

integer

yes

Sequence number within the session, starting at 1 and incremented on every event, so a consumer can tell received from expected and find the gaps where a batch was lost.

labels

mapping

yes

Key and value pairs from the analytics block that supplied the sink, stamped on every event for slicing reports; empty when the block declares none. At most 16, with keys of lower case letters, digits, underscore, dot and hyphen up to 63 characters and values up to 128.

frontend

string

yes

The frontend that produced the event: jupyterlab or jupyterlite today. Open: a workshop extension for another editor would report its own name.

frontend_version

string

yes

Version of the extension that produced the event, which identifies the code that built it under JupyterLite as well as under a server.

host

string

yes

The service hosting the session: local, binder, jupyterhub, codespaces, container for a container with no such service behind it, or static for a JupyterLite site. Open: a later release may detect more.

platform

string

yes

The operating system the workshop runs on: linux, macos, windows, or emscripten under JupyterLite, which runs on Pyodide whatever the browser’s operating system. Open.

trust

string

yes

The trust level the workshop opened at: trusted, restricted or ask; empty before a decision.

user

string

no

The learner’s identity when the deployment’s analytics identity policy adds one, such as the JupyterHub user name under identity: hub; absent otherwise, so every consumer treats it as optional.

Kinds

workshop-start

A workshop was opened with no recorded progress, or restarted.

Field

Type

Required

Description

page

string

yes

Id of the page shown first.

pages

list of mapping

yes

The visible pages in order, as the session ran with them, so a consumer can compute a funnel and show page 3 of 8 without reading the workshop.

restarted_from

string

no

The session id of the open that the learner chose to restart rather than continue, when this start follows the restart dialog.

pages entries

One page of the workshop as it was listed when the session started.

Field

Type

Required

Description

id

string

yes

The page id every other event’s page field refers to: the file name without its extension unless the page’s front matter sets id.

path

string

yes

The page file relative to the workshop directory.

title

string

yes

The page title as shown in the panel.

directives

list of mapping

no

The directives on the page that can produce an event, in document order, so a consumer can tell what was never run. Sent since extension 0.2.1; absent from earlier sessions.

directives entries

One directive of a page as the inventory lists it.

Field

Type

Required

Description

id

string

yes

The directive id, as action-executed, verify-result, quiz-answered, form-submitted and hint-opened report it: the id option when set, otherwise generated from the page id and the directive’s position on the page.

type

string

yes

The directive name: an action type such as execute, or verify, quiz, form or hint.

trigger

string

yes

How the directive is expected to start, in the words action-executed and verify-result report: auto when it carries the auto option, cascade when another directive’s cascade names it or falls through to it, trigger when a check’s trigger option lists anything beyond a click, and click otherwise. The first of those wins where more than one applies, and the manifest’s defaults.actions apply under the directive’s own options.

conditional

boolean

no

Present and true when a when block or a when option decides whether the learner sees the directive, so one never run may never have been shown.

workshop-resume

A workshop with recorded progress was opened again.

Field

Type

Required

Description

page

string

yes

Id of the page resumed at.

pages

list of mapping

yes

The visible pages in order, as for workshop-start.

resumed_from

string

no

The session id of the previous open, read from the workshop state; the only link between one open and the next on a host without identity.

pages entries

One page of the workshop as it was listed when the session started.

Field

Type

Required

Description

id

string

yes

The page id every other event’s page field refers to: the file name without its extension unless the page’s front matter sets id.

path

string

yes

The page file relative to the workshop directory.

title

string

yes

The page title as shown in the panel.

directives

list of mapping

no

The directives on the page that can produce an event, in document order, so a consumer can tell what was never run. Sent since extension 0.2.1; absent from earlier sessions.

directives entries

One directive of a page as the inventory lists it.

Field

Type

Required

Description

id

string

yes

The directive id, as action-executed, verify-result, quiz-answered, form-submitted and hint-opened report it: the id option when set, otherwise generated from the page id and the directive’s position on the page.

type

string

yes

The directive name: an action type such as execute, or verify, quiz, form or hint.

trigger

string

yes

How the directive is expected to start, in the words action-executed and verify-result report: auto when it carries the auto option, cascade when another directive’s cascade names it or falls through to it, trigger when a check’s trigger option lists anything beyond a click, and click otherwise. The first of those wins where more than one applies, and the manifest’s defaults.actions apply under the directive’s own options.

conditional

boolean

no

Present and true when a when block or a when option decides whether the learner sees the directive, so one never run may never have been shown.

workshop-finish

Finish was pressed on the last page.

Field

Type

Required

Description

pages

integer

yes

How many pages were visible.

workshop-abandon

The workshop was closed or replaced before finishing. A closed tab or a stopped server sends nothing; silence after the last heartbeat is what a consumer sees then.

Field

Type

Required

Description

page

string

yes

Id of the page left.

page-enter

A page was shown.

Field

Type

Required

Description

page

string

yes

page-leave

A page was left.

Field

Type

Required

Description

page

string

yes

active_ms

integer

yes

Milliseconds between entering and leaving the page.

heartbeat

The workshop is still open: sent every 60 seconds while the page is visible, every 5 minutes while it is hidden, and once immediately whenever visibility changes.

Field

Type

Required

Description

page

string

yes

Id of the current page.

hidden

boolean

yes

Whether the browser tab was hidden when the heartbeat was sent.

gate-skipped

The learner moved on past unmet requirements under soft gating.

Field

Type

Required

Description

page

string

yes

requirements

list of string

yes

The unmet requirements as kind:id strings.

action-executed

An action ran, was skipped or failed.

Field

Type

Required

Description

id

string

yes

The directive id.

type

string

yes

The directive name, such as execute.

status

string

yes

ok, error or skipped.

trigger

string

yes

What ran it: click, role, auto, cascade or trigger.

downgraded

boolean

yes

Whether the trust level replaced the action with a safer one.

verify-result

A check ran.

Field

Type

Required

Description

id

string

yes

status

string

yes

ok, error or skipped.

attempt

integer

yes

How many times the check has run in this workshop, this one included.

trigger

string

yes

quiz-answered

A quiz was answered.

Field

Type

Required

Description

id

string

yes

correct

boolean

yes

attempt

integer

yes

form-submitted

A form was submitted; the field names only, never the values.

Field

Type

Required

Description

id

string

yes

fields

list of string

yes

hint-opened

A hint was expanded.

Field

Type

Required

Description

id

string

yes

checkpoint-restored

A checkpoint was restored.

Field

Type

Required

Description

name

string

yes

preflight-result

The required tools were checked.

Field

Type

Required

Description

tools

list of mapping

yes

tools entries

One tool the preflight looked for.

Field

Type

Required

Description

name

string

yes

found

boolean

yes

satisfied

boolean

yes

Whether the tool was found at a version the manifest accepts.

version

string

yes

The version found, or empty when not run or not found.

environment-created

The isolated environment was created.

Field

Type

Required

Description

kernel

string

yes

The registered kernel name.