//! Static templates emitted by `skarn init` and `skarn hook`.

/// A starter `skarn.toml`.
pub const SKARN_TOML_TEMPLATE: &str = r#"# Skarn gateway configuration.
#
# `skarn serve` reads this file, connects to each downstream MCP server below,
# and exposes them to your AI client through the Code Mode meta-tools
# (`search`, `read_tool_docs`, `execute`).

[gateway]
# Also expose the namespaced downstream tools directly (e.g. `fs__read_file`),
# in addition to the Code Mode meta-tools. Leave false to get the full
# token-saving benefit of Code Mode.
passthrough = false

# ---------------------------------------------------------------------------
# Downstream MCP servers. Each [servers.<alias>] is launched as a child process
# and aggregated. The alias becomes the namespace prefix (alias__tool).
# ---------------------------------------------------------------------------

# A local filesystem server (uncomment and adjust):
# [servers.fs]
# transport = "stdio"
# command = "npx"
# args = ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/project"]

# A GitHub server:
# [servers.github]
# transport = "stdio"
# command = "npx"
# args = ["-y", "@modelcontextprotocol/server-github"]
# env = { GITHUB_TOKEN = "ghp_..." }

# A remote server over Streamable HTTP. Prefer `auth_bearer_env` so the token is
# read from the environment at startup instead of being stored in this file:
# [servers.remote]
# transport = "http"
# url = "https://api.example.com/mcp"
# auth_bearer_env = "EXAMPLE_API_TOKEN"
# headers = { X-Org = "acme" }
"#;

/// Printed by `skarn init` after writing the config.
pub const INTEGRATION_SNIPPETS: &str = r#"Next steps
==========

1. Add your downstream MCP servers to skarn.toml (examples are commented out).

2. Point your AI client at Skarn:

   Claude Code / Cursor / Windsurf — add to the client's MCP config
   (e.g. ~/.cursor/mcp.json or .mcp.json):

     {
       "mcpServers": {
         "skarn": {
           "command": "skarn",
           "args": ["serve"]
         }
       }
     }

3. (Optional) Route the agent's shell commands through Skarn for token
   compression and OS sandboxing — run `skarn hook` to print a Claude Code
   PreToolUse hook.

Verify your setup with:  skarn doctor
"#;

/// Printed by `skarn hook`.
pub const CLAUDE_HOOK_SNIPPET: &str = r#"# Claude Code PreToolUse hook
#
# Add this to your Claude Code settings (.claude/settings.json) to route Bash
# commands through Skarn, applying OS sandboxing and ~70-90% output
# compression transparently. Skarn confines the command to the project
# directory and denies network access by default.

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Bash",
        "hooks": [
          {
            "type": "command",
            "command": "skarn run --net deny --stats --"
          }
        ]
      }
    ]
  }
}

# Note: hook wiring differs slightly between agents and versions. The essential
# idea is to prefix the agent's shell invocation with `skarn run --`, e.g.:
#
#     skarn run --net deny -- cargo test
#
# which sandboxes `cargo test`, captures its output, and returns only the
# compressed signal (errors/warnings) to the model.
"#;
