-
Notifications
You must be signed in to change notification settings - Fork 0
Project First Run Trust
A user enters a new project directory for the first time. The project ships a .stud/ folder with extensions and an mcp.json. stud-cli does not auto-load the project layer — it prompts the user to trust the directory first.
- User runs
stud-cliin a directory that contains<cwd>/.stud/. - No prior trust decision exists for this path in the user's global trust list.
-
<cwd>/.stud/contains: a few extensions, a local tools folder, andmcp.jsonreferencing two MCP servers.
sequenceDiagram
autonumber
actor User
participant CLI as stud-cli startup
participant Core
participant Trust as "trust list (~/.stud/trust.json)"
participant TUI
User->>CLI: "invoke in {cwd}"
CLI->>Core: bootstrap
Core->>Core: "detect {cwd}/.stud/"
Core->>Trust: lookup path
Trust-->>Core: not found
Core->>TUI: "InteractionRequest { kind: 'trustProject', path, summary }"
TUI->>User: render trust prompt
alt user trusts
User-->>TUI: trust
TUI-->>Core: trust
Core->>Trust: "append { path, decision: trust, timestamp }"
Core->>Core: load project layer
Core->>Core: start session with bundled + global + project
else user declines
User-->>TUI: decline
TUI-->>Core: decline
Core->>Trust: "append { path, decision: decline, timestamp }"
Core->>Core: start session with bundled + global only
Core-->>TUI: "notice: project layer skipped"
else user picks "trust once"
User-->>TUI: trust once
TUI-->>Core: trust once
Core->>Core: load project layer for this session
Note over Core,Trust: no trust-list entry written —<br/>re-prompts next time
end
See Project Trust § What the prompt shows for the canonical list of fields and decision options shown in the trust prompt. The prompt quotes the v1 unsandboxed invariant verbatim because once trusted, project code runs with the same access as bundled or global code. See also Extension Isolation.
See Project Trust — The trust list for the canonical field list and semantics. The list is user-global, keyed by canonical absolute path; editing or clearing it takes effect on the next session start.
Project mcp.json is covered by this prompt. Trusting the project implicitly trusts its MCP server list for startup. Global mcp.json is trusted once at install/setup time and is not re-prompted per session.
If a subsequent project change adds an executable-launching MCP server (as opposed to a remote URL), the next startup surfaces a secondary MCP trust prompt scoped to that server. See MCP Trust.
See Project Trust — Re-prompt triggers. The re-prompt shows the reason; there is no silent re-trust.
-
ProjectTrustedorProjectDeclinedwith path, decision, timestamp. -
ProjectTrustRepromptedwith reason.
See Audit Trail.
- Execution Model
- Message Loop
- Concurrency and Cancellation
- Error Model
- Event and Command Ordering
- Event Bus
- Command Model
- Interaction Protocol
- Hook Taxonomy
- Host API
- Extension Lifecycle
- Env Provider
- Prompt Registry
- Resource Registry
- Session Lifecycle
- Session Manifest
- Persistence and Recovery
- Stage Executions
- Subagent Sessions
- Contract Pattern
- Versioning and Compatibility
- Deprecation Policy
- Capability Negotiation
- Dependency Resolution
- Validation Pipeline
- Cardinality and Activation
- Extension State
- Conformance and Testing
- Providers
- Provider Params
- Tools
- Hooks
- UI
- Loggers
- State Machines
- SM Stage Lifecycle
- Stage Definitions
- Commands
- Session Store
- Context Providers
- Settings Shape
- Trust Model
- Project Trust
- Extension Isolation
- Extension Integrity
- LLM Context Isolation
- Secrets Hygiene
- Security Modes
- Tool Approvals
- MCP Trust
- Sandboxing
- Configuration Scopes
- Project Root
- Extension Discovery
- Extension Installation
- Extension Reloading
- Headless and Interactor
- Determinism and Ordering
- Launch Arguments
- Network Policy
- Platform Integration
Tools
UI
Session Stores
Loggers
Providers
Hooks
Context Providers
Commands
- First Run
- Default Chat
- Tool Call Cycle
- Hook Interception
- Guard Deny Reproposal
- State Machine Workflow
- SM Stage Retry
- Hot Model Switch
- Capability Mismatch Switch
- Session Resume
- Session Resume Drift
- Approval and Auth
- Interaction Timeout
- Headless Run
- Parallel Tool Approvals
- Subagent Delegation
- Scope Layering
- Project First-Run Trust
- Reload Mid-Turn
- Compaction Warning
- MCP Remote Tool Call
- MCP Prompt Consume
- MCP Resource Bind
- MCP Reconnect