Build Specification

urn:showpapers:format:build-spec:4JSON Schema 2020-12Download JSON

Local tooling input for `create`; never stored inside an archive. The writer computes media types, paths, sizes, digests and the manifest, sets its own generator, and derives relationship ids. Paper, reading and note payloads are given inline as record or as a JSON source file (kept byte for byte).

Top Level

MemberTypeRules
formatVersion required4
collection requiredcollection
agentsarray of agentmax items 32
originals requiredarray of originalSourcemax items 100
papersarray of paperSourcemax items 100
readingsarray of readingSourcemax items 100
notesarray of noteSourcemax items 100
foldersarray of foldermax items 64
peoplearray of personmax items 64
relationshipsarray of relationshipmax items 5000
librarylibrary

Definitions

id

string · pattern ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$

sha256

string · pattern ^[a-f0-9]{64}$

collectionTitle

string · min length 1; max length 200; pattern ^(?![ \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000])(?![\s\S]*[ \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000]$)[^\u0000-\u001f\u007f-\u009f\ud800-\udfff]+$

paperTitle

Unicode scalars. The apps' native title rule: trimmed, no control characters, no '/' or '\\'.

string · min length 1; max length 100; pattern ^(?![ \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000])(?![\s\S]*[ \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000]$)[^\u0000-\u001f\u007f-\u009f\ud800-\udfff/\\]+$

noteTitle

Collection: edge whitespace kept, at least one non-whitespace scalar.

string · min length 1; max length 160; pattern ^[^\u0000-\u001f\u007f-\u009f\ud800-\udfff]*[^\s\u0000-\u001f\u007f-\u009f\ud800-\udfff][^\u0000-\u001f\u007f-\u009f\ud800-\udfff]*$

collection

MemberTypeRules
id requiredid
revision requiredintegermin 1; max 9007199254740991
title requiredcollectionTitle
parentobjectclosed
The exact archive this revision was edited from. Optional; parent.revision is lower than revision.

agent

An external AI agent that proposed values in this file. Agent-origin values reference it by id and stay pending until the person reviews them.

MemberTypeRules
id requiredid
name requiredstringmin length 1; max length 80; pattern ^(?![ \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000])(?![\s\S]*[ \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000]$)[^\u0000-\u001f\u007f-\u009f\ud800-\udfff]+$
platform requiredstringmin length 0; max length 40; pattern ^[^\u0000-\u001f\u007f-\u009f\ud800-\udfff]*$
version requiredstringmin length 0; max length 40; pattern ^[^\u0000-\u001f\u007f-\u009f\ud800-\udfff]*$

rule

Automatic filing. autoAdd needs at least one document type. Clause fields are distinct; only the six date fields accept operators other than equals, and their values are ISO dates.

MemberTypeRules
documentTypes requiredarray of one of "evidence.identity.foreign-passport", "state.issued.us-passport", "state.issued.visa-foil", "cbp.record.i-94", "ice.sevp.issued.i-20", "uscis.issued.i-551", "uscis.issued.i-766", "uscis.notice.i-797", "uscis.notice.i-797a", "uscis.notice.i-797b", "uscis.notice.i-797c"max items 11; unique
autoAdd requiredboolean
excludedPaperIds requiredarray of idmax items 100; unique
condition requirednull or object or object

folder

A personal folder. Array order is the folder order. Folders hold papers only. Names are unique ignoring case and are limited in UTF-16 units, like the apps.

MemberTypeRules
id requiredid
name requiredstringmin length 1; max length 80; max UTF-16 units 80; pattern ^(?![ \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000])(?![\s\S]*[ \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000]$)[^\u0000-\u001f\u007f-\u009f\ud800-\udfff]+$
color requiredone of "blue", "teal", "green", "amber", "coral", "purple", "gray"
icon requirednull or one of "folder", "paper", "passport", "identity", "travel", "study", "work", "receipt", "shield", "people", "home", "checklist", "appointment"
purpose requiredstringmin length 0; max length 240; max UTF-16 units 240; pattern ^(?![ \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000])(?![\s\S]*[ \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000]$)[^\u0000-\u001f\u007f-\u009f\ud800-\udfff]*$
rule requirednull or rule
paperIds requiredarray of idmax items 100; unique

person

Names are unique ignoring case; at most one person is the owner (isMe).

MemberTypeRules
id requiredid
name requiredstringmin length 1; max length 80; pattern ^(?![ \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000])(?![\s\S]*[ \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000]$)[^\u0000-\u001f\u007f-\u009f\ud800-\udfff]+$
isMe requiredboolean

relationship

As in the manifest; id may be omitted and the writer derives it.

MemberTypeRules
idid
type requiredone of "same-case", "different-stage", "same-person", "same-record", "same-organization", "supporting-document", "renewal", "amendment", "subsequent-filing", "duplicate", "alternate-version"
paperIds requiredarray of idmin items 2; max items 2; unique
referringPaperId requirednull or id
status requiredone of "suggested", "confirmed", "rejected"
origin requiredone of "reading", "person", "agent"
agentId requirednull or id
reasons requiredarray of stringmax items 16
decision requirednull or object

categoryIcon

Icon chosen for a category group. label is the custom type for purpose custom, otherwise null.

MemberTypeRules
purpose requiredone of "identity", "admission", "approvals-and-receipts", "study", "work-permission", "personal-records", "tax", "insurance", "custom", "unknown"
label requirednull or label
icon requiredone of "folder", "paper", "passport", "identity", "travel", "study", "work", "receipt", "shield", "people", "home", "checklist", "appointment"

library

MemberTypeRules
pinnedPaperIds requiredarray of idmax items 100; unique
categoryIcons requiredarray of categoryIconmax items 64

label

string · min length 1; max length 80; pattern ^(?![ \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000])(?![\s\S]*[ \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000]$)[^\u0000-\u001f\u007f-\u009f\ud800-\udfff]+$

icon

one of "folder", "paper", "passport", "identity", "travel", "study", "work", "receipt", "shield", "people", "home", "checklist", "appointment"

source

string · min length 1; max length 4096; pattern ^(?!/)(?![\s\S]*(^|/)\.\.?(/|$))[^\\:]+$

originalSource

source: a regular file below the build-spec directory; its bytes become the original.

MemberTypeRules
id requiredid
title requiredpaperTitle
source requiredsource

paperSource

One of:

paperSource: variant 1

MemberTypeRules
id requiredid
record requiredobjectmax members 16
A complete urn:showpapers:paper-record:1 object, validated by paper-record.schema.json.

paperSource: variant 2

MemberTypeRules
id requiredid
source requiredsource

readingSource

One of:

readingSource: variant 1

MemberTypeRules
id requiredid
record requiredobjectmax members 8
A complete urn:showpapers:reading:1 object, validated by reading.schema.json.

readingSource: variant 2

MemberTypeRules
id requiredid
source requiredsource

noteSource

One of:

noteSource: variant 1

MemberTypeRules
id requiredid
title requirednoteTitle
record requiredobjectmax members 16
A complete urn:showpapers:scratch-record:1 object, validated by note-record.schema.json.

noteSource: variant 2

MemberTypeRules
id requiredid
title requirednoteTitle
source requiredsource