Skip to contents

Trust decides whether gptr applies or runs what a project directory contains: project settings beyond tightening, .gptr/extensions/ and project plugins, project MCP servers (.gptr/mcp.json and the .mcp.json, .codex/config.toml, .cursor/mcp.json, .vscode/mcp.json and .pi/mcp.json of other harnesses), SYSTEM.md and APPEND_SYSTEM.md, project .env discovery, provider base-URL overrides, project skills (.gptr/skills/, .agents/skills/, .claude/skills/ and relative skills.paths entries), prompt templates (.gptr/prompts/), the tool and model fields of project agent files, and the authority of project instructions. The decision is kept in tools::R_user_dir("gptr", "config")/trust.json with a fingerprint of the trust-gated files; when they change, the project counts as untrusted again until you confirm. Called from model code during a run, recording a decision is refused.

Usage

gptr_trust(path = ".", trust = NULL)

Arguments

path

A directory inside the project; its project root is used.

trust

NULL to read the decision, TRUE or FALSE to record one.

Value

With trust = NULL, the recorded decision: TRUE, FALSE or NA (undecided, also when a trust-gated file changed since the project was trusted). Otherwise the previous recorded decision, invisibly.

Examples

d = tempfile("proj")
dir.create(d)
gptr_trust(d)
#> [1] NA
unlink(d, recursive = TRUE)