Skip to main content

Crate laravel_rust_studio

Crate laravel_rust_studio 

Source
Expand description

Studio shows what a running Laravel for Rust application did: every request with its queries, each error with its source line, the mail it sent, its queued jobs, and its durable workflow runs. It answers a developer in the browser, and a coding agent in Markdown and over MCP.

Add the provider in src/app.rs, run the application, and open /studio:

use laravel::Application;
use laravel_rust_studio::StudioServiceProvider;

Application::configure().with_providers(|providers| {
    providers.add(StudioServiceProvider::new());
});

Laravel already traces its requests, queries, cache operations, jobs, and workflow steps. Studio listens to that with a StudioLayer, so an application needs no instrumentation of its own. What it hears goes into a StudioStore, which each process shares with the others through files in storage/studio. A queue worker’s traces and mail therefore show up in the web server’s Studio.

Studio answers in the local and testing environments. Elsewhere it responds 403 and captures nothing, until StudioServiceProvider::authorize says who may see it.

§For coding agents

GET /studio/api/agent/diagnose?format=markdownWhat’s wrong, with the source line of each problem
GET /studio/api/agent/last-request?format=markdownWhat the latest request did, as a tree of its spans
GET /studio/api/agent/wait?for=mailWaits for a job, a workflow, or a message instead of sleeping
POST /studio/mcpThe same as MCP tools
GET /studio/llms.txtEvery endpoint

The studio:skill command writes a skill that teaches an agent all of this.

§Features

FeatureEnables
database (default)The workflow and queue tables, and each query’s bindings and source line. An application without a database turns it off
database-sqliteBuilding Studio on its own, outside an application, which chooses the database driver
database-postgres, database-mysqlRunning Studio’s own tests against those databases

Re-exports§

pub use crate::config::AuthorizeFn;
pub use crate::config::StudioConfig;
pub use crate::config::StudioGate;
pub use crate::layer::StudioLayer;
pub use crate::provider::StudioServiceProvider;
pub use crate::store::ProcessInfo;
pub use crate::store::QueryFilter;
pub use crate::store::StudioStore;
pub use crate::store::TraceFilter;

Modules§

agent
What Studio offers a coding agent: the application’s state in one call, the problems found in it, and a call that waits for something to happen instead of sleeping.
config
Studio’s settings, and who may open it.
docs
The documents that tell a coding agent Studio exists and how to use it: the skill, the llms.txt index of its endpoints, and the command that installs the skill.
http
Studio’s routes: the page that hosts its interface, the JSON API behind it, the live event stream, the endpoints written for coding agents, and the MCP server.
layer
The tracing layer that turns Laravel’s own spans and log lines into Studio’s traces, queries, cache operations, outgoing requests, mail previews, exceptions, and logs. Laravel already instruments requests, jobs, workflows, queries, and the rest, so an application needs no instrumentation of its own.
markdown
Markdown for coding agents: the same facts as the JSON, in a fraction of the tokens.
mcp
Studio as a Model Context Protocol server, over the protocol’s Streamable HTTP transport: one JSON-RPC message in, one out. Its tools answer in Markdown, as the agent endpoints do.
provider
The service provider that installs Studio into an application.
queues
The queues: what waits on each, what failed for good, the batches, and the same controls the queue:* commands give: retry, forget, flush, pause, continue, and restart.
store
The telemetry store: bounded in-memory buffers, the cross-process journal that feeds them, the diagnostics engine, and the live event bus behind the SSE stream.
types
What Studio captures and what its API answers with. The interface’s types.ts mirrors these.
workflows
Durable workflow runs: listing them, reading one with every step’s output, and what the workflow:* commands do: resume, cancel, retry, recover, and prune.