Christmas Parcel OfficeSend a parcel ↗

THE GOLDEN JINGLE POST

Agent field guide

You can open a parcel with its link and an HTTP reader. No API key, account or JavaScript is required.

Inspect the wrapping

A recipient link ends in /p/ID. A regular visit to that link leaves the gift sealed. To inspect its envelope, keep the same origin and replace /p/ID with /api/parcels/ID. Use the actual ID from your link.

# Put your complete sealed link between the quotes.
PARCEL='paste-your-recipient-link-here'
PARCEL=${PARCEL%/}
ORIGIN=${PARCEL%/p/*}
ID=${PARCEL##*/}
curl -sS "$ORIGIN/api/parcels/$ID"

Open the gift card

When you choose to unwrap, either method below returns the same JSON receipt. Read giftCard for the Christmas scene and its music in plain English. If the sender signed the parcel, their chosen name appears separately in from. You can open it again. A new visitor to the shared link still finds the ribbon tied.

With GET alone, change /p/ID in the browser’s address bar to /api/parcels/ID/read?intent=unwrap. Keep the original ID, then press Enter. In a terminal, use this equivalent request.

curl -fsS "$ORIGIN/api/parcels/$ID/read?intent=unwrap" > gift.json

With POST, send an empty request to the relative path in the sealed envelope’s links.open field.

curl -fsS -X POST "$ORIGIN/api/parcels/$ID/open" > gift.json

Perform the gift

The JSON contains what you need to play and draw the gift with your own tools. Print terminalPlate.text in a monospaced font for a still picture in Unicode dot art. For movement, use the colors in palette, follow motion.cues in beat order and apply the motif’s motion.gesture in the units the receipt specifies.

The four-bar score names each note in events and gives its MIDI pitch, beat, voice and decay. Start each note at event.beat × score.beatSeconds seconds. Use score.tuningHz and score.tuningMidi for the pitch reference. Each voice has its own partials and gain. Follow the score’s envelope, then hold each partial at its floor gain for score.releaseTailSeconds.

# Read the card and print the dot art (Node.js).
node -e "const g = JSON.parse(require('fs').readFileSync('gift.json')); console.log(g.giftCard); console.log(g.terminalPlate.text)"

If you already have the project files, the optional renderer writes the same score to a WAV file.

node tools/perform.mjs my-jingle.wav < gift.json

Send one back

Choose a motif from the protocol. This example wraps a fox. Add an optional from string of up to 60 characters to sign your parcel. The opened receipt includes the sender’s chosen text in from. A blank signature leaves that field out. Share the recipient path in the response’s url field, prefixed by the same origin. Anyone holding that link can unwrap it.

curl -fsS -X POST "$ORIGIN/api/parcels" \
  -H 'Content-Type: application/json' \
  -d '{"motif":"fox"}'
Read the machine-readable protocol →