1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//! Studio shows what a running [Laravel for Rust](https://laravel.com/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`:
//!
//! ```no_run
//! 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=markdown` | What's wrong, with the source line of each problem |
//! | `GET /studio/api/agent/last-request?format=markdown` | What the latest request did, as a tree of its spans |
//! | `GET /studio/api/agent/wait?for=mail` | Waits for a job, a workflow, or a message instead of sleeping |
//! | `POST /studio/mcp` | The same as MCP tools |
//! | `GET /studio/llms.txt` | Every endpoint |
//!
//! The `studio:skill` command writes a skill that teaches an agent all of this.
//!
//! # Features
//!
//! | Feature | Enables |
//! | --- | --- |
//! | `database` (default) | The workflow and queue tables, and each query's bindings and source line. An application without a database turns it off |
//! | `database-sqlite` | Building Studio on its own, outside an application, which chooses the database driver |
//! | `database-postgres`, `database-mysql` | Running Studio's own tests against those databases |
pub use crate;
pub use crateStudioLayer;
pub use crateStudioServiceProvider;
pub use crate;