Speech kits
Pixling is preparing for Mac App Store release. Join the waitlist on pixling.app to hear when it launches.
A speech kit is a pictured outfit for the speech bubble: its paper, tail, controls and ornaments drawn as pixel art. Residents wear one through speech.kit (one resident with resident.set, all residents with settings.set). The kit.* operations read, edit, preview, export and import the kits themselves. They are in the Library MCP group.
pixling kit listpixling kit describe steampixling kit set steam '{"for":"app","parts":{"gauge":{"visible":false}}}'pixling kit preview steam.mineThe third line copies the built-in steam kit to the user’s steam.mine, hides its gauge ornament there, and wears steam.mine for every resident. The last line writes a preview PNG under importFolder.previews.
Kits and where they live
Section titled “Kits and where they live”origin |
Kits | Changed by kit.set |
kit.delete |
|---|---|---|---|
builtIn |
Shipped with Pixling (note, quiet-card, steam, steam-metal, pocket-meter, postage-stamp, timber-plaque, glass-case) |
Copied to <id>.mine on the first change |
Refused (kitNotYours) |
user |
The user’s own: copies, duplicates and imports (the id holds a .) |
In place | Deleted |
- One copy per kit. Every change made from a built-in kit lands in the same
<id>.mine. A further copy comes fromkit.duplicate. - A copy follows its kit.
<id>.minestores only its changes (derivedFromnames the kit). Whenkit.deleteremoves a user kit that others were copied from, each copy first becomes a standalone kit that looks the same; if one cannot, nothing is deleted (kitInUse). - Stored locally. Kits stay on the Mac. No call reaches the network.
List and describe
Section titled “List and describe”kit.list takes no arguments and returns {kits}, one row a kit:
| Field | Meaning |
|---|---|
id |
What kit, speech.kit and kit.* name |
title |
The name the outfit tiles show |
origin |
builtIn or user |
derivedFrom |
The kit a copy changes, else null |
revision |
Changes whenever the kit or the kit it changes does |
motion |
lively, reactive (nothing loops at rest) or still (nothing moves) |
glassMax |
The most see-through the kit allows, else null |
notes |
Present only when the kit is read with something left out |
kit.describe {kit} returns the kit as it is drawn now:
| Field | Meaning |
|---|---|
parts |
One row a part: id, role, takes, sheet, sheets, scale, visible, hidable, plus placement fields where present |
colours |
Editable colors: key, title, colour (#RRGGBB or null) and kitColour |
textColour |
Effective text color (#RRGGBB) used for contrast checks |
sheets |
Sprite sheets in the kit: name, width, height, frames, slicing and animations |
presets |
Named sets of changes: name, title |
motion, forms, derivedFrom, revision |
As drawn; forms lists the kit’s shapes for short or lone bubbles |
notes |
What reading it left out and why (empty when whole) |
A part hidden by a change is still listed, with visible: false, so it can be shown again. Each part’s optional placement fields include shown, anchor, pivot, x, y, layer, order, host, side and offset.
Change a kit
Section titled “Change a kit”{ "kit": "steam", "for": "app", "parts": { "gauge": { "visible": false }, "valve": { "anchor": "topLeft", "x": 4, "y": -2, "layer": "top", "order": 30 } }, "colours": { "brass": "#8FA3B0" }}{ "kit": "steam.mine", "forked": true, "worn": true }| Argument | Takes |
|---|---|
kit |
Required. A kit id from kit.list |
parts |
Part id → part fields below, or null to drop that part’s changes |
colours |
Color key → #RRGGBB, or null for the kit’s own |
motion |
lively, reactive or still |
preset |
A preset name from kit.describe, applied before the rest of the call |
frameSpec |
Frame layout override (nineSlice or modular), or null to clear |
props |
Prop id (a-z, 0-9, ., -, 1–32 chars) → prop object, or null to remove |
clearProps |
When true, removes all custom props before applying props |
surfaceMaterials |
Pixel-PBR finish per slot (plate, frame, part:<id>, prop:<id>), or slot null to clear |
for |
Where the kit written is worn: app (all residents’ speech.kit) or one resident selector |
Give at least one field besides kit and for. The result is {kit, forked, worn}: kit is the kit written (the copy’s id when the call copied a built-in kit), forked is true on that first change, and worn is true when the copy was worn where for says. A change to a user kit wears nothing new. Without for, the call only edits; wear the kit with settings.set or resident.set.
Over MCP, for: app needs the App settings group and for: <resident> the Placement group: with that group turned off, the call is refused with toolFamilyOff and path: "for", and the same call without for still goes through.
Part fields
Section titled “Part fields”| Field | Value | Parts that take it |
|---|---|---|
visible |
true or false |
Ornaments; body, header, seat, tail |
shown |
always, hover or never |
Slots (fold is never hidden) |
sheet, scale |
A sheet name of the kit, a whole number | Every part but a painted tail |
anchor, pivot |
topLeft, top, topRight, left, centre, right, bottomLeft, bottom, bottomRight |
Ornaments and slots |
x, y |
Dots from the anchor | Ornaments and slots |
layer, order |
behind, paper, content or top; a whole number (higher stands above) |
Ornaments and slots |
side |
wanted, top, left, bottom or right |
tail |
offset |
wanted, centre, {"start": n} or {"end": n} (dots from that end of the edge) |
tail |
host |
paper, header, history or another slot’s id |
Slots |
Which fields a part takes is its takes in kit.describe. A field the part does not take, a part the kit does not have, a color that fails contrast checks, a reserved prop id, or a missing preset refuses the whole call with kitRefused, path naming it, and reason giving the rule or measured ratio. Nothing is written.
Frame, props and materials
Section titled “Frame, props and materials”frameSpecoverrides how the paper frame is sliced (nineSlicewithinsets, ormodularwith corner/edge/center sheets). The tool input schema lists every field.propsplaces custom prop art (visual.sheetreferencing aspeech-props/<sha256>.pngasset imported viakit.propImport), with normalizedplacement.anchor({u, v}),layer(behindCard,onBackdrop,onFrame,overChat),zIndex,pointer,visibleWhenconditions, andhooks. Reserved fixed part ids (such asbadge,paper,tail) are refused.surfaceMaterialsapplies Pixel-PBR finishes per slot (texture,metalness,roughness,bevel,lightMode,samplingand rim settings), matching the schema ofkit.set.
Preview and prop images
Section titled “Preview and prop images”kit.preview {kit, mode?, text?, residentName?, width?, scale?, for?}renders a one-shot offscreen PNG of the kit intoimportFolder.previews(kit-<id>-<mode>.png) and returns{kit, revision, mode, path, relativePath, width, height, logicalSize, paperRect, dot, propRects}.modeismessage(default) orquestion;widthis160–480pt (default248);scaleis1or2(default2).kit.propListlists imported prop images stored inspeech-props/with theirsheet(speech-props/<sha256>.png),sha256,label,width,heightandbytes.kit.propImport {file, label?}copies a PNG fromimportFolder.path(bare file name, never a path; max 512×512 px, 65,536 dots) into the content-addressed prop store and returns{sheet, sha256, label, width, height, bytes}. Usesheetinkit.set’spropsorframeSpec.
Copy, delete, export and import
Section titled “Copy, delete, export and import”kit.duplicate {kit, name?}copies any kit as a user kit and returns{kit}with the new id (steam.copy, thensteam.copy-2).nameis 1 to 60 characters. Without it, a copy of a built-in kit is named<name> (copy)and a copy of a user kit keeps its name.kit.delete {kit}deletes one user kit and returns{kit, deleted: true}. Residents that wore it keep the stored name and draw the plain speech bubble. It is annotated as destructive. If a copy made over it cannot stand alone looking the same, nothing is deleted (kitInUse).- Long ids. A generated id (
.mine,.copy,.import,-2) longer than 64 characters keeps the start of the kit’s id and a short hash of it, the same every time. kit.export {kit, folder?, overwrite?, flatten?}writes any built-in (includingnote) or user kit intoimportFolder.path/<folder>(default<kit>) withkit.json,parts/*.pngand any referencedspeech-props/<sha256>.png. Use it to inspect a workingkit.jsonbefore authoring a custom kit. Setflatten: trueto materialize a derived copy as a standalone kit, oroverwrite: trueto replace an existing folder.kit.import {folder, replace?}imports a kit folder (kit.jsonandparts/) fromimportFolder.pathby bare folder name, never a path.sheets.*.bytes/sha256andsheets.*.attachment.bytes/sha256may be omitted (Pixling computes them from the PNGs while enforcing size limits), and colors inkit.jsonaccept#RRGGBB,#RRGGBBAAor{red, green, blue, alpha?}(0–255 integers). Passreplace: trueto update an existing user kit atomically in place (replaced: true) instead of creating<id>.import-2.
CLI: pixling kit
Section titled “CLI: pixling kit”pixling kit set steam.mine '{"colours":{"brass":"#8FA3B0"},"motion":"still"}'pixling kit set steam.mine '{"parts":{"gauge":{"visible":false},"valve":null}}'pixling kit preview steam.mine --mode message --text 'Hello!'pixling kit export quiet-card quiet-card-src --flattenpixling kit import quiet-card-src --replacepixling kit prop-import badge.pngpixling kit prop-listpixling kit duplicate steam --name 'Brass days'pixling kit delete steam.copykit set <kit> [input] takes the same JSON patch object as MCP (parts, colours, motion, preset, frameSpec, props, surfaceMaterials, for) inline, from @file.json, or from standard input (- or piped), allowing multi-part edits in one call. --json prints the result document.
Refusals
Section titled “Refusals”detail |
code |
When |
|---|---|---|
kitNotFound |
targetNotFound |
No kit of that id |
kitNotYours |
rejected |
kit.delete of a built-in kit |
kitRefused |
rejected |
The kit refuses the change; path names the field, reason gives the rule or contrast ratio |
kitInUse |
rejected |
kit.delete or kit.import --replace would break a copy derived from this kit |
residentNotFound |
targetNotFound |
The resident in for left the desk during the call; nothing was written |
toolFamilyOff |
rejected |
Over MCP, for names a group turned off (path: "for") |
kitUnreadable |
rejected |
The kit or imported folder cannot be read; reason names the field or file |
tooManyKits |
rejected |
The user already has 64 kits |
folderNotFound, pathNotInImportFolder |
rejected |
kit.import/kit.export/kit.propImport could not find the item, or received a path |
folderExists |
rejected |
kit.export target folder already exists and overwrite is false |
fileNotFound, propInvalid, tooManyProps |
rejected |
kit.propImport file is missing, not a valid PNG within limits, or prop store is full |
notReady |
unavailable |
The desk is starting, or this build keeps no kits |
cannotWrite |
internalFailure |
Writing failed; nothing changed |
Every refusal carries a hint. A resident named in for follows the usual selector and binding rules.