Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions crates/openshell-sandbox/src/l7/rest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,6 @@ fn rewrite_request_line_target(
Ok(out)
}

// Used only in tests; kept as a `pub(crate)` helper for clarity.
#[allow(dead_code)]
pub(crate) fn parse_target_query(target: &str) -> Result<(String, HashMap<String, Vec<String>>)> {
match target.split_once('?') {
Some((path, query)) => Ok((path.to_string(), parse_query_params(query)?)),
Expand Down Expand Up @@ -697,28 +695,6 @@ fn find_crlf(buf: &[u8], start: usize) -> Option<usize> {
.map(|offset| start + offset)
}

/// Read and relay a full HTTP response (headers + body) from upstream to client.
///
/// Returns a [`RelayOutcome`] indicating whether the connection is reusable,
/// consumed, or has been upgraded (101 Switching Protocols).
///
/// Note: callers that receive `Upgraded` are responsible for switching to
/// raw bidirectional relay and forwarding the overflow bytes.
// Public helper retained as part of the relay API surface; internal callers
// currently use `relay_response` directly.
#[allow(dead_code)]
pub(crate) async fn relay_response_to_client<U, C>(
upstream: &mut U,
client: &mut C,
request_method: &str,
) -> Result<RelayOutcome>
where
U: AsyncRead + Unpin,
C: AsyncWrite + Unpin,
{
relay_response(request_method, upstream, client).await
}

async fn relay_response<U, C>(
request_method: &str,
upstream: &mut U,
Expand Down
2 changes: 1 addition & 1 deletion docs/get-started/tutorials/first-network-policy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -218,4 +218,4 @@ bash examples/sandbox-policy-quickstart/demo.sh

## Next Steps

- To walk through a full policy iteration with Claude Code, including diagnosing denials and applying fixes from outside the sandbox, refer to [Github Sandbox](/tutorials/github-sandbox).
- To walk through a full policy iteration with Claude Code, including diagnosing denials and applying fixes from outside the sandbox, refer to [GitHub Sandbox](/tutorials/github-sandbox).
2 changes: 1 addition & 1 deletion docs/get-started/tutorials/github-sandbox.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -348,4 +348,4 @@ The following resources cover related topics in greater depth:

- To add per-repository access levels (read-write vs read-only) or restrict to specific API methods, refer to the [Policy Schema Reference](/reference/policy-schema).
- To learn the full policy iteration workflow (pull, edit, push, verify), refer to [Policies](/sandboxes/policies).
- To inject credentials automatically instead of pasting tokens, refer to [Manage Providers](/sandboxes/manage-providers
- To inject credentials automatically instead of pasting tokens, refer to [Manage Providers](/sandboxes/manage-providers)
2 changes: 1 addition & 1 deletion docs/sandboxes/manage-providers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ The following provider types are supported.
| `claude` | `ANTHROPIC_API_KEY`, `CLAUDE_API_KEY` | Claude Code, Anthropic API |
| `codex` | `OPENAI_API_KEY` | OpenAI Codex |
| `generic` | User-defined | Any service with custom credentials |
| `github` | `GITHUB_TOKEN`, `GH_TOKEN` | GitHub API, `gh` CLI — refer to [Github Sandbox](/tutorials/github-sandbox) |
| `github` | `GITHUB_TOKEN`, `GH_TOKEN` | GitHub API, `gh` CLI — refer to [GitHub Sandbox](/tutorials/github-sandbox) |
| `gitlab` | `GITLAB_TOKEN`, `GLAB_TOKEN`, `CI_JOB_TOKEN` | GitLab API, `glab` CLI |
| `nvidia` | `NVIDIA_API_KEY` | NVIDIA API Catalog |
| `openai` | `OPENAI_API_KEY` | Any OpenAI-compatible endpoint. Set `--config OPENAI_BASE_URL` to point to the provider. Refer to [Configure](/inference/configure). |
Expand Down
2 changes: 1 addition & 1 deletion docs/sandboxes/manage-sandboxes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ openshell sandbox delete my-sandbox

## Next Steps

- To follow a complete end-to-end example, refer to the [Github Sandbox](/tutorials/github-sandbox) tutorial.
- To follow a complete end-to-end example, refer to the [GitHub Sandbox](/tutorials/github-sandbox) tutorial.
- To supply API keys or tokens, refer to [Manage Providers](/sandboxes/manage-providers).
- To control what the agent can access, refer to [Policies](/sandboxes/policies).
- To use a pre-built environment, refer to the [Community Sandboxes](/sandboxes/community-sandboxes) catalog.
2 changes: 1 addition & 1 deletion docs/sandboxes/policies.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ Endpoints without `protocol` use TCP passthrough, where the proxy allows the str
Allow Claude and the GitHub CLI to reach `api.github.com` with per-path rules: read-only (GET, HEAD, OPTIONS) and GraphQL (POST) for all paths; full write access for `alpha-repo`; and create/edit issues only for `bravo-repo`. Replace `<org_name>` with your GitHub org or username.

<Tip>
For an end-to-end walkthrough that combines this policy with a GitHub credential provider and sandbox creation, refer to [Github Sandbox](/tutorials/github-sandbox).
For an end-to-end walkthrough that combines this policy with a GitHub credential provider and sandbox creation, refer to [GitHub Sandbox](/tutorials/github-sandbox).

</Tip>

Expand Down
Loading