interplane.Get Omega
Read in your language

interplane-forge

INTERPLANE Forge

Brought by drakestapleton

branch main Branches Tags History

interplane-forge / docs / BRING.md

252 lines · 18941 bytes Raw Blame History Source

interplane: bring a project, get a project, withdraw a project, send a patch

interplane is the person's program in the one-command contract (~/handoffs/yourtrained-cortex/briefs/one-command-contract.md, slice TOOL). It is seeded Omega: source in tools/bring/src/, built by tools/bring/build.sh, tested by tools/bring/tests/run.sh. What each target can do and why is in tools/bring/PLATFORMS.md.

interplane bring [folder]          publish a folder (default: the current folder)
interplane get <page address|rid>  download a project into ./<name>/
interplane withdraw <page address|rid>  take your project off the shelf (only from the computer that brought it)
interplane patch [--base REF] [--title T] [--message-file F] [--yes] OWNER/REPO
                                   send the commits of this git work tree as a patch to OWNER/REPO
interplane pack <folder> <file>    the walk, scan and archive only (no network, no key): for checks
interplane unpack <file> <folder>  the strict unpack only
interplane --version

What bring does, in order

  1. Walk. Regular files under the folder. .git (in any letter case: .GIT, .Git, as a folder or a file, at any depth) is left out without being opened (no git runs, so a partial clone never fetches). Symlinks, devices, sockets and FIFOs are left out. Paths that POSIX ustar cannot hold (over 255 bytes) are left out. Each is listed as Left out: <path>: <reason>.
  2. Secret scan. By name: .env*, id_*, *.pem, *.key, *.p12, .netrc, credentials. By content, read once while the file is copied to a private spool: a PRIVATE KEY----- block, ghp_, github_pat_, AKIA, xox, sk_live_, AIza, sk-ant-, and assignments such as DB_PASSWORD = "hunter2hunter2" (password/passwd/secret/token, = or :, a value of 8 or more bytes). A file with a hit is left out and listed. The scan is a safety net, not a guarantee; the hub refuses private key blocks again.
  3. Summary and consent. Name, file count, total size, then the contract's text. One line is read from /dev/tty (never stdin). Anything but exactly yes prints Nothing sent. and exits 1: no key is made, no program is started, no connection is opened.
  4. Key. ~/.interplane/key (ed25519, mode 0600, folder 0700) is made once with /usr/bin/ssh-keygen -t ed25519. It never leaves the machine. Its DID is did:key:z6Mk....
  5. Archive. POSIX ustar from the spool (the bytes that were scanned), sorted by path, mode 0644 or 0755, uid/gid 0, empty names, mtime 0, two zero blocks. The same folder gives the same bytes.
  6. Statement interplane-bring 1 / sha256 / files / bytes / name, signed with namespace interplane-bring.
  7. Sign-in (GET /login, sign interplane-forge-login:<nonce>:<ts> with namespace interplane-forge, POST /login, GET /open/ for the write csrf).
  8. Chunks of 45000 bytes, base64url without padding, with a progress line. 409 resumes at the server's next; 429 waits a second and sends the same chunk again, for as long as it lasts; 503 (queue or storage full) prints The download server is busy; trying again in 10 seconds., waits 10 seconds and sends the same chunk again, for as long as it lasts; 413 and 403 stop with a plain message.
  9. Finish, then the status JSON once a second until stored or refused: <reason>. A 429 on the finish (the forge write gate allows a key 30 writes in a clock minute, and every accepted chunk counts as one, so a finish right after the 30th chunk gets 429) waits a second and sends the same finish again, quietly, as the chunk loop does. A 503 (the hub's queue is full; it keeps nothing of that try) gets the busy line, 10 seconds and the same finish again. Resending is safe: when the .sig already exists, the hub answers "queued" and queues nothing. The status GET waits out a busy server like get does (below).
  10. Final lines: Your project page: <BASE>/open/<rid> and Developer details: Radicle ID rad:..., rad clone rad:....

get

GET /open/<rid>.json, then the download path; the file's SHA-256 must equal download_sha256. Both GETs wait out a busy server: the forge serves release and archive files through a cold-build cache that answers 503 with Retry-After for up to a minute, so 503, 502, 504 and 429 print The download server is busy; trying again in 10 seconds., wait 10 seconds and ask again, with no count. Any other code stops with Interplane answered with HTTP <code> and status 1. The whole archive is validated before anything is written. Then ./<name>/ is created (refused if it exists) and regular files are written inside it, each created exclusively. Refused: absolute paths, empty, . or .. components, a .git component in any letter case (the hub's rule in open/intake.om; downloads of open and held rows come from repositories the intake never parsed), NUL, unknown entry types, bad checksums, a truncated archive. Directory entries are implied, a pax global header (git archive's commit comment) is skipped, and link entries are never created (listed as skipped).

withdraw

The line people paste is curl -fsSL https://interplane.io/withdraw.sh | sh -s https://interplane.io/open/<rid>.

  1. Key. ~/.interplane/key must already exist; withdraw never makes one. Without it the tool says plainly that only the computer that brought a project can withdraw it, and stops with no program started and no request sent.
  2. Shelf row. GET /open/<rid>.json (busy codes waited out as for get): Project: <name> and Brought by: <did> are shown. 404 says the project is not on the shelf. If brought_by is not this key's did:key, the tool refuses plainly before asking anything, and nothing is sent.
  3. Text and consent. It prints: "Withdrawing takes your project off the Interplane shelf, stops this site serving it and stops the Interplane hub sharing it on Radicle. It cannot remove copies that other computers already fetched: publishing was permanent." Then it reads one line from /dev/tty after Type yes to withdraw it, anything else to stop:. Anything but exactly yes prints Nothing sent. and exits 1, with no sign-in and no POST.
  4. On yes: the sign-in of bring (step 7, which also takes the write csrf from GET /open/), then POST /open/ with csrf, action=withdraw and rid=rad:<rid>. 429 waits a second and sends again, quietly. 503, 502 and 504 print the busy line, wait 10 seconds and send again. Only a 303 whose Location is <base>/open/ counts as taken: absolute, or the base's path plus open/, which is what the hub writes, e.g. /open/. A 303 to /login means the hub signed this key out; the tool prints `Interplane signed you out before the withdraw was sent; nothing was withdrawn. Run the line again.` and exits 1 without polling. Any other answer stops with a plain message.
  5. Poll GET /open/<rid>.json once a second until it answers 404 (off the shelf; the hub lists only open, held and stored rows, whoever asks), then print Withdrawn.

The hub's own gates (only the bringer's key can withdraw; withdrawal unseeds and removes the download) are tested in open/tests/up.sh.

patch

interplane patch [--base REF] [--title T] [--message-file F] [--yes] OWNER/REPO (source tools/bring/src/50patch.om, contract ~/work/lanes/CONTRACT-interplane-connector-r1.md F7). Run it inside a git work tree whose commits on top of the project's main are the patch. The forge side, the checks and the answers are in docs/API.md "Git patches".

  1. Arguments. OWNER/REPO is two names of letters, digits, ., - and _ around one slash, given once. --title takes 1 to 256 bytes; a --base value that starts with - is refused as naming no commit; a flag given twice keeps its last value. A missing value, an unknown word or a second OWNER/REPO prints the usage line and exits 1.
  2. git, read only. Every git run is /usr/bin/git started with an argument list (no shell, no PATH search), an empty environment, standard input /dev/null, its output into the tool's private temp folder, in the current folder. In order:
    • git rev-parse --is-inside-work-tree must print true, and `git rev-parse --verify --quiet HEAD^{commit}` must name a commit (else: not inside a git work tree / no commit at HEAD).
    • The base: --base REF is git rev-parse --verify --quiet --end-of-options REF^{commit}; without it, git merge-base HEAD refs/remotes/origin/main (no such ref: the message says to name the base with --base).
    • git rev-list --count BASE..HEAD: 1 to 100 commits (0: nothing to send; more than 100: refused here, a patch holds at most 100).
    • `git format-patch --stdout --no-color --no-ext-diff --no-textconv --no-attach --no-thread --no-cover-letter --src-prefix=a/ --dst-prefix=b/ --no-signature BASE..HEAD`: the mbox, at most 2097152 bytes (larger: nothing sent). The flags pin what a repository's configuration could otherwise change in the output; with no HOME, no user configuration is read.
    • git diff --name-only -z BASE HEAD: the number of files changed.
    • The title: --title, else git log -1 --format=%s HEAD (the HEAD commit's subject); 1 to 256 bytes on one line, no control byte.
    • The description: the bytes of --message-file (none: empty), carriage returns dropped, blanks and line feeds at the end trimmed, at most 60000 bytes.
  3. What would be sent. Seven lines, then the question:
    Repository: drakestapleton/fixrepo
    Base: 937467a8c4a62d02a8dedb574a8603b17c5aa87e
    Commits: 2
    Files changed: 2
    Bytes: 854
    Title: src: e2e line, the patch title
    Send to: http://127.0.0.1:18488
    
    (a real run: patch/tests/e2e.sh on 2026-11-17 against a scratch forge, with --yes).
  4. Consent. Without --yes it asks Type yes to send this patch, anything else to stop: and reads one line from /dev/tty (never stdin). Anything but exactly yes, or no terminal, prints Nothing sent. and exits 1: no key is made, ssh-keygen and curl are not started, and nothing reaches the forge. --yes is the consent given on the command line (a harness's own permission prompt for the command is then the human gate).
  5. Key and statement. ~/.interplane/key is made once as bring makes it. The statement `interplane-patch 1\nOWNER/REPO\nBASE\n<sha256 of the mbox>\n<sha256 of title, line feed, description>\nis signed withssh-keygen -Y sign -n interplane-patch`. The key never leaves the computer.
  6. Sign-in and send. The sign-in of bring, then one POST <BASE>/OWNER/REPO/patches/new with the form csrf, repo, base, title, description, mbox (base64url, no padding) and sig. A 429 (the write gate) waits a second and sends the same form again, for as long as it lasts.
  7. Final lines. 201: Patch page: <BASE>/OWNER/REPO/patches/<id>, exit 0. 200 (the forge already has this statement): Interplane already has this patch. and the same line, exit 0. Any other answer: interplane: Interplane refused the patch: <the server's reason> (or the HTTP code when the answer has no reason line), exit 2.

Exit status: 0 sent (or already there), 1 nothing sent (usage, no work tree, no base, nothing or too much to send, git failed, a local check failed, no consent), 2 the server refused it. A failure of the sign-in itself stops with a message and exit 1, after the sign-in request but before the patch is sent. The tool never fetches, pushes, or writes the work tree, the index or any ref.

Tests: patch/tests/run.sh (the tool against a test forged: consent, the summary, replay, options, refusals, arguments; part of ./run.sh check-patch) and patch/tests/e2e.sh (the loopback run: the raw route is byte-equal to git format-patch with the flags above, and git am of it onto the base gives the tool's tree).

Programs and network

The tool starts only /usr/bin/curl (the one network path; --proto =https, no redirects, a cleared environment, no shell), /usr/bin/ssh-keygen and, for patch only, /usr/bin/git. bring starts curl and ssh-keygen only after the yes; withdraw reads the shelf JSON with curl before asking, and signs only after the yes; patch runs git (read only: rev-parse, merge-base, rev-list, format-patch, diff, log; never fetch, push or any write) before asking, and curl and ssh-keygen only after the yes. BASE is https://interplane.io; INTERPLANE_BASE may name another https:// base, or http://127.0.0.1: or http://localhost: for tests. On Linux the start word is execprog (empty environment, every descriptor above 2 closed); on macOS posix_spawn with POSIX_SPAWN_CLOEXEC_DEFAULT.

Installer

tools/bring/installer.om reads a release manifest on stdin and writes bring.sh, get.sh and withdraw.sh. They are the same script apart from the last line, which runs bring, get or withdraw with the script's arguments:

0.1.0
https://interplane.io/receipts/#tool-0.1.0
Linux-aarch64	https://.../interplane-linux-aarch64	<sha256>
Darwin-arm64	https://.../interplane-macos-arm64	<sha256>

Release 0.1.1 also carries Linux-x86_64 (interplane-linux-x86_64, built by build.sh x86linux). It is released checked under emulation, not yet on a real x86-64 machine: under qemu-x86_64 (binfmt on the AArch64 Spark), e2e-tool-x86 ran bring, get and withdraw against a sandboxed forged, 34 pass 0 fail at 10ace1ad (~/handoffs/open-builds/e2e-tool-x86-10ace1ad.log). See tools/bring/PLATFORMS.md.

A script detects uname -s-uname -m, downloads with curl over HTTPS only, prints the downloaded SHA-256, the expected one and the receipt page to compare against, refuses a mismatch without running anything, then runs the binary with stdin from /dev/tty. The download is a loop with no count: curl writes the HTTP code (-w '%{http_code}'); 503, 502, 504 and 429 print The download server is busy; trying again in 10 seconds., sleep 10 and ask again; 200 goes on to the fingerprint check; anything else prints The download failed with HTTP <code>. Nothing was run. and exits 1. HUP, INT and TERM exit (the EXIT trap removes the download), so Ctrl-C stops the wait. Only https URLs, printable bytes without quotes, known targets (once each) and lowercase 64-hex hashes are accepted; on any refusal no script is left behind. A target missing from the manifest prints that this platform has no release.

Where the release files live (PROPOSED, nothing published). Hop's files are served by the forge as release assets: https://interplane.io/drakestapleton/hop/releases/download/v0.4.0/Hop-0.4.0.zip with a SHA256SUMS beside it, and the receipt page carries the fingerprints (dl/dl.om: release assets are files in the tag's release-assets/ folder, cached with a .sha256 sidecar computed in Omega). The same shape for the tool: a repository drakestapleton/interplane holding this program, tag v0.1.0, release-assets/interplane-linux-aarch64, interplane-macos-arm64, SHA256SUMS, and the manifest. bring.sh and get.sh would be served at BASE/bring.sh and BASE/get.sh, the receipt rows on /receipts/, so the line is curl -fsSL https://interplane.io/bring.sh | sh. The repository name and the receipt anchors are Drake's to confirm.

Caps met in this slice (no-hard-caps point 6)

WhereNumberWhyWhat was done
file count, file size, archive sizenonewalk records go to a temp file, file bytes to a spool, the sort is a file-backed merge sort; nothing is held in memory per file
ustar path255 bytes (name 100 + prefix 155)the archive format the contract nameskept as a format boundary; longer paths are listed as left out
chunk size45000 bytesthe contract's wire fieldkept
project sizenone at the hub since 2026-11-11 (its free-space reserves bound it)not checked in the tool; a 413 (now only a proxy in front of the hub could send one) is shown in plain words
one argument list4096 bytes, 64 recordsexecprog packet limit at the pinned omc (OMEGESE s10)compiler boundary; the tool's lists are under 600 bytes. A path that would not fit stops with a message, never truncated
one path4095 bytesthe compiler's path boundary (OMEGESE s10)compiler boundary
a JSON or form value read back4096 byteswire fields (csrf, sha, rid, page)a longer value is refused as an answer the program does not understand; responses of any size are scanned through a window
status pollno limitthe contract: poll until stored or refuseda line says the hub is still publishing
429 retryno limitthe contract: never give up while the server says 429kept
busy retry (503, 502, 504, 429 on get's GETs, the status GET and withdraw's GETs and POST; 503 on a chunk or the finish; the scripts' download)no limitthe owner's rule: a stranger's first run must not fail on a cold cacheone line per try, 10 seconds apart; Ctrl-C stops it. The Omega loops carry bound 9223372036854775807, the language's required loop bound, not a give-up count
write-gate 429 on the finish and the withdraw POSTno limit30 writes a key a clock minute; every chunk countsa quiet second and the same request again, as for chunks
patch: commits100the contract (F1) and the forge's checkrefused before anything is sent
patch: mbox2097152 bytesthe contract (F1) and the forge's checkrefused before anything is sent
patch: title, description256 bytes, 60000 bytesthe forge's field rules (docs/collab-write.md section 2)refused before anything is sent
patch: write-gate 429no limit30 writes a key a clock minutea quiet second and the same form again

Tests

flock ~/handoffs/hive/queen/pool-17.lock taskset -c 17 bash tools/bring/tests/run.sh (Linux aarch64). The stand-in hub tools/bring/tests/standin.om (seeded Omega) answers the contract's routes on a private port and injects one 429 and one 409; files in its folder inject busy answers (busyj, busyt for get's JSON and archive, busyp for a chunk or the withdraw POST, busyf for the finish; each holds 3-digit codes, e.g. 503429). POST /open/ saves withdraw.form; the shelf JSON answers once more after it, then 404. The installer scripts run against a stand-in curl that answers a list of codes and a stand-in sleep that logs its argument. strace (execve, connect, openat) is the outside oracle for "no program, no connection"; a counting listener stands in for a partial clone's promisor remote. GNU tar, ssh-keygen -Y verify and basenc are the outside checks of the archive, the signatures and the uploaded bytes. Mutants remove one guard each and must fail.