Skip to main content

Crate shipslip

Crate shipslip 

Source
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:

  1. prepare runs read-only preflight and returns a Preview.
  2. execute runs the deploy, and only accepts a Confirmation built 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 Interrupt to ExecutionHandle calls.
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 Host aliases in the user’s ssh config, for picking one in the app. Shipslip only reads ssh files (ADR 0003): it lists aliases, asks ssh -G what one resolves to, and builds a Host block for the user to paste themselves. Listing reads Host and Include lines only to offer names; what an alias means is always ssh -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. Not Clone: one confirmation runs one deploy.
DeployTarget
One environment of one project, as resolved from config.
ExecuteRejected
execute refused to start, so nothing ran. The preview is returned so the caller can still cancel it and release its lock.
ExecutionHandle
Controls for a running deploy.
LockInfo
LockOwner
Who holds a lock, as written by the holder.
LogChannel
How slip logs treats one channel under storage/logs, or adds one.
Preview
What a deploy will do, produced by prepare. Only prepare can build one, and a Confirmation can only be built from one. Not Clone: execute and cancel consume 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.
StepTimes
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§

AbortReason
Why a deploy stopped at the recheck, before changing anything.
AttachError
BlockReason
Why preflight refused to deploy. Nothing on the server was changed.
BreakLockError
BringUpError
ConfirmError
ConnectionTarget
DeployEvent
Progress reported by crate::execute, in order.
DeployOutcome
Final result of a deploy run. Step indexes: 0 is the git fast-forward, 1..=N are recipe steps.
ExecuteError
LockStatusError
MaintenancePhase
php artisan down before step 0, or php artisan up after the last step.
PrepareError
PreparePhase
What prepare_with_progress is 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.
StepStatus
Result of a single step.
StopReason
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, or RunError.
execute_recorded
Executes a confirmed run while journaling each mutation before it starts.
lock_status
Reads the deploy lock without changing it. None if 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 with cancel if 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, calling on_phase as 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.