Expand description
Shipslip engine.
Front-ends (the slip CLI, the desktop app) use only this public API.
The library never reads stdin or writes to stdout/stderr; it reports
progress as DeployEvents.
A deploy is two-phase:
prepareruns read-only preflight and returns aPreview.executeruns the deploy, and only accepts aConfirmationbuilt from that exact preview.
Re-exports§
pub use observation::ErrorGroup;pub use observation::ErrorVariant;pub use observation::LogPhase;pub use observation::SmokeResult;pub use observation::WatchResult;pub use observation::WatchStatus;
Modules§
- config
- Project configuration and local approval of deploy settings.
- connection_
check - The connection check: a person-started, read-only look at whether this
Mac reaches an environment, before or without an approval. It sits beside
crate::read_only, not inside it: that connector keeps refusing targets nobody approved, while this check connects only because a person asked and only runs commands that read. Probes after a failed connect are not run. Nothing retries or reconnects on its own. - create
- git
- Local Git operations and narrowly scoped GitHub publication.
- github_
auth - Temporary GitHub authentication for preflight fetches. Tokens are never included in deploy targets, previews, receipts, or detached step scripts.
- interrupt
- What an interrupt (Ctrl-C, closing the window) means at each stage of a
followed run. Front-ends map an
InterrupttoExecutionHandlecalls. - laravel
- logs
slip logs: a read-only snapshot of an environment’s log channels.- observation
- Bounded Laravel log observation and a local HTTP smoke check.
- projects
- The checkouts added in the app, and what a folder holds before it is added. The list keeps each checkout’s path and when it was added, nothing else; everything the app shows about a checkout is read from its folder, its approvals and its receipts.
- publish
- Reviewed, resumable publication to a new GitHub repository.
- read_
only - The MCP server’s only library boundary: records from this Mac and log snapshots for approved environments.
- receipt
- Durable local record of a deploy or of bringing the app up, written before every remote mutation.
- records
- Read results built from receipts and already-read log snapshots: what a front-end shows or prints as JSON. Nothing here touches a server, a deploy lock or a journal.
- setup
- Local toolchain discovery, health checks, and confirmed setup actions.
- ssh_
aliases - The
Hostaliases in the user’s ssh config, for picking one in the app. Shipslip only reads ssh files (ADR 0003): it lists aliases, asksssh -Gwhat one resolves to, and builds aHostblock for the user to paste themselves. Listing readsHostandIncludelines only to offer names; what an alias means is alwaysssh -G’s answer. - transport
- Remote execution boundary. The engine only talks to servers through
Transport, so tests can use a fake and other platforms can add their own backend.
Structs§
- Confirmation
- Proof that the user approved one specific
Preview. Fields are private and the only constructor takes the preview, so a deploy cannot run on a confirmation for a different env, commit range, or recipe. NotClone: one confirmation runs one deploy. - Deploy
Target - One environment of one project, as resolved from config.
- Execute
Rejected executerefused to start, so nothing ran. The preview is returned so the caller can stillcancelit and release its lock.- Execution
Handle - Controls for a running deploy.
- Lock
Info - Lock
Owner - Who holds a lock, as written by the holder.
- LogChannel
- How
slip logstreats one channel understorage/logs, or adds one. - Preview
- What a deploy will do, produced by
prepare. Onlypreparecan build one, and aConfirmationcan only be built from one. NotClone:executeandcancelconsume it, so a running deploy’s lock cannot be released through a copy. - RunEvents
- The events of one run, in order. While [
OUTPUT_QUEUE] output lines are unread, more output waits and the step’s log is read from the server more slowly, so a slow reader never grows memory or loses a line. Other events never wait, so the lock release and receipt never depend on the reader. - Step
Times - When this Mac sent a step and when it saw the step end, in milliseconds since the Unix epoch. Either may be missing; a duration is never guessed.
Enums§
- Abort
Reason - Why a deploy stopped at the recheck, before changing anything.
- Attach
Error - Block
Reason - Why preflight refused to deploy. Nothing on the server was changed.
- Break
Lock Error - Bring
UpError - Confirm
Error - Connection
Target - Deploy
Event - Progress reported by
crate::execute, in order. - Deploy
Outcome - Final result of a deploy run. Step indexes: 0 is the git fast-forward, 1..=N are recipe steps.
- Execute
Error - Lock
Status Error - Maintenance
Phase php artisan downbefore step 0, orphp artisan upafter the last step.- Prepare
Error - Prepare
Phase - What
prepare_with_progressis doing on the server. - RunPlan
- Which part of the configured recipe to run after its commit is deployed. Recipe steps are numbered from 1; step 0 is the built-in Git fast-forward.
- Step
Status - Result of a single step.
- Stop
Reason - Why a deploy stopped between steps.
Constants§
- POST_
DEPLOY_ WATCH - How long the log is watched after the last step.
- STALE_
AFTER - A lock whose heartbeat is this old may be broken.
Functions§
- attach
- Resumes observation of an unfinished run; an active step is never launched again.
- break_
lock - Breaks a stale deploy lock (see
LockInfo::is_stale). Check over SSH first that no step of the old run is still running. - bring_
app_ up - Turns maintenance mode off, e.g. after a failed deploy left the app down,
as a recorded run. Takes the deploy lock, so it cannot run during a
deploy, reads the server HEAD, and writes the receipt before the command
is sent; then follows it in the background like
execute. Ask the user before calling. After success, checks the smoke URL when configured. The code on the server does not change. - cancel
- Gives up a prepared deploy without running it, releasing its lock.
- check_
resumable - Whether an unfinished run belongs to this checkout and still uses its approved settings, so resuming it runs only what the user approved.
- execute
- Runs the confirmed deploy in the background. Events arrive on the
returned receiver; the last one is
Finished,Detached,Interrupted, orRunError. - execute_
recorded - Executes a confirmed run while journaling each mutation before it starts.
- lock_
status - Reads the deploy lock without changing it.
Noneif no lock is held. - prepare
- Preflight: resolves the current and target commits, takes the deploy
lock, and builds the
Preview. Changes nothing on the server except fetching refs and taking the lock. Release it withcancelif the deploy does not go ahead. - prepare_
with_ github_ token - Like
prepare_with_plan, using a local token only for the server’s GitHub fetch. Supports standard github.com HTTPS and SSH origins without rewriting their saved configuration. The token never enters the preview. - prepare_
with_ plan - Prepares a deploy, recipe rerun, or recipe restart from a selected step.
Reruns require
origin/<branch>to match the server’s current clean HEAD. - prepare_
with_ progress - Like
prepare_with_plan, callingon_phaseas each phase starts, so a front-end can say what a slow preview is waiting on. - step_
zero_ command - The exact command step 0 runs on the server.
- step_
zero_ label - Step 0’s name wherever it is shown: the preview, the run and the receipt.