Skip to content
Merged
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
5 changes: 5 additions & 0 deletions .agents/skills/debug-inference/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ Check:
- Required credential key exists
- `*_BASE_URL` override is correct when using a self-hosted endpoint

An `OPENAI_BASE_URL` or `ANTHROPIC_BASE_URL` override is route-only. It does not
authorize the fixed public-vendor endpoint or expose the alternate-upstream key
for substitution there. Use an imported endpoint-bearing custom profile when a
sandbox needs direct access to the alternate upstream.

Fix examples:

```bash
Expand Down
12 changes: 12 additions & 0 deletions .agents/skills/debug-openshell-cluster/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,10 @@ When `userns` is configured (e.g. `userns = "auto"` or `userns = "keep-id"`):
rootful Podman uses absolute host IDs (e.g. `uidmap = ["0:1000:1", "1:100000:65536"]`).
- `nomap` (without hyphen) is accepted as input but canonicalized to `no-map`
for Podman's API.
- A workload remains in `stopping` until Podman resorts to `SIGKILL`: inspect
supervisor logs for `failed to signal entrypoint process group`. The
supervisor must retain `CAP_KILL` so its root process can forward `SIGTERM`
to a workload that runs as the sandbox user.

### Step 6: Check Kubernetes Helm Gateways

Expand Down Expand Up @@ -312,6 +316,13 @@ kubectl -n openshell get secret \
openshell-jwt-keys
```

When `server.tls.clientCaSecretName=""`, the chart intentionally omits
`client_ca_path` and the `tls-client-ca` mount, even with built-in PKI or
cert-manager. That is expected; do not treat a missing `tls-client-ca` pod
mount as a defect (`openshell-server-client-ca` may still exist from PKI).
User auth is OIDC or trusted proxy (`server.auth.allowUnauthenticatedUsers=true`);
supervisor transport still uses `openshell-client-tls`.

In cert-manager installs, `certManager.enabled=true` makes cert-manager own TLS
generation. The Helm chart should still render the `openshell-certgen`
pre-install/pre-upgrade hook in JWT-only mode to create `openshell-jwt-keys`,
Expand Down Expand Up @@ -634,6 +645,7 @@ openshell logs <sandbox-name>
| HTTPS ingress returns `Unauthenticated` after connecting | TLS terminates at Envoy, so the gateway never sees a client cert; no OIDC issuer is configured for identity | Configure `server.oidc.issuer` and register with `openshell gateway add https://<host> --oidc-issuer <url>`, or set `server.auth.allowUnauthenticatedUsers=true` for a trusted-proxy/dev cluster |
| External server `Certificate` never becomes Ready with `certManager.serverIssuerRef` set | ACME issuer rejected internal-only SANs, a loopback IP, or a `commonName` absent from the SANs | `kubectl -n openshell describe certificate openshell-server-external`; confirm `certManager.serverDnsNames` lists only real, externally-resolvable hostnames |
| Sandbox supervisors fail TLS handshake with `UnknownCA` after configuring `certManager.serverIssuerRef` | `server.grpcEndpoint` is set to the external hostname, forcing supervisors to receive the ACME cert (via SNI) which they can't verify against chart CA | Remove `server.grpcEndpoint` or set it to the internal service name; supervisors should connect via internal service name to receive the internal cert |
| Browser `ERR_BAD_SSL_CLIENT_AUTH_CERT` or gateway logs show client cert verification when OIDC or direct HTTPS is expected | Listener client-CA verification still enabled (`clientCaSecretName` unset or `client_ca_path` in ConfigMap) | Set `server.tls.clientCaSecretName=""`, upgrade chart, confirm ConfigMap omits `client_ca_path` |

## Reporting

Expand Down
42 changes: 27 additions & 15 deletions .agents/skills/openshell-cli/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,8 @@ The `--from-existing` flag discovers credentials from local state (e.g., `gh aut
### Create a provider with explicit credentials

```bash
openshell provider create --name my-api --type generic \
--credential API_KEY \
--config base_url=https://api.example.com
openshell provider create --name my-openai --type openai \
--credential OPENAI_API_KEY
```

Bare `KEY` reads the value from the environment variable of that name and avoids placing the secret in shell history. Use `KEY=VALUE` only when the user explicitly accepts that exposure.
Expand All @@ -143,14 +142,9 @@ must match. For a tunnel to `api.example.com:8443`, send
port and is rejected. An absolute-form request target must use the same
authority.

Profile-backed provider policy composition is controlled by the gateway-global
`providers_v2_enabled` setting. Static credential endpoint binding remains
active even when policy composition is disabled:

```bash
openshell settings get --global
openshell settings set --global --key providers_v2_enabled --value true
```
Profile-backed providers always contribute policy unless a gateway-global
policy is active. Static credential endpoint binding remains independently
enforced.

### Inspect and manage provider profiles

Expand All @@ -177,13 +171,13 @@ openshell provider delete my-github
Use refresh commands only when the provider profile and gateway support refreshable credentials:

```bash
openshell provider refresh status my-outlook
openshell provider refresh configure my-outlook \
openshell provider refresh status my-provider
openshell provider refresh configure my-provider \
--credential-key MS_GRAPH_ACCESS_TOKEN \
--strategy oauth2-refresh-token \
--secret-material-env REFRESH_TOKEN=MS_GRAPH_REFRESH_TOKEN \
--credential-expires-at 2026-07-16T00:00:00Z
openshell provider refresh rotate my-outlook --credential-key MS_GRAPH_ACCESS_TOKEN
openshell provider refresh rotate my-provider --credential-key ACCESS_TOKEN
```

Prefer `--secret-material-env KEY[=ENVVAR]` for secret refresh material. `--material KEY=VALUE` is for non-secret material; `--secret-material-key` marks supplied material keys as secret.
Expand Down Expand Up @@ -333,10 +327,15 @@ provider instead of passing API keys, tokens, or other secrets to `sandbox exec`

```bash
openshell sandbox provider list my-sandbox
openshell sandbox provider list my-sandbox --output json
openshell sandbox provider attach my-sandbox my-github
openshell sandbox provider detach my-sandbox my-github
```

Structured attachment output contains provider names, types, and sorted
credential and config key names. It never contains credential, handle, or
config values.

### View logs

```bash
Expand Down Expand Up @@ -498,6 +497,7 @@ View all revisions to understand how the policy evolved:

```bash
openshell policy list dev --limit 50
openshell policy list dev --output json
```

Fetch a specific historical revision:
Expand Down Expand Up @@ -576,6 +576,17 @@ openshell sandbox delete my-app
openshell sandbox create --from ./Dockerfile --name my-app --forward 8080
```

Use structured output when automation needs the tracked forward metadata and
validated process state:

```bash
openshell forward list --output json
```

Each record includes `sandbox`, `bind_address`, `port`, `pid`, and `alive`.
The `alive` boolean validates the tracked process identity; it does not probe
the forwarded socket.

Create and forward in one command:

```bash
Expand Down Expand Up @@ -712,7 +723,7 @@ openshell settings set work-session --key ocsf_json_enabled --value true
openshell settings delete work-session --key ocsf_json_enabled

openshell settings get --global --json
openshell settings set --global --key providers_v2_enabled --value true
openshell settings set --global --key ocsf_json_enabled --value true
```

Global mutations prompt for confirmation. Use `--yes` only in reviewed automation.
Expand All @@ -738,6 +749,7 @@ openshell forward service my-app --target-port 8000 --local 127.0.0.1:0
# Expose and manage an HTTP service through the gateway.
openshell service expose my-app 8080 web
openshell service list my-app
openshell service list my-app --output json
openshell service get my-app web
openshell service delete my-app web
```
Expand Down
58 changes: 48 additions & 10 deletions .agents/skills/openshell-cli/cli-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,25 +57,25 @@ openshell
│ ├── download <name> <path> [dest]
│ ├── ssh-config [name]
│ └── provider
│ ├── list [name]
│ ├── list [name] [-o table|yaml|json]
│ ├── attach <name> <provider>
│ └── detach <name> <provider>
├── forward
│ ├── start <port> [name] [-d]
│ ├── stop <port> [name]
│ ├── list
│ ├── list [-o table|yaml|json]
│ └── service [name] --target-port <port> [opts]
├── service
│ ├── expose <sandbox> <target-port> [service]
│ ├── list [sandbox]
│ ├── list [sandbox] [-o table|yaml|json]
│ ├── get <sandbox> [service]
│ └── delete <sandbox> [service]
├── logs [name] [opts]
├── policy
│ ├── set [name] --policy <path> [--global] [--wait]
│ ├── update [name] [opts]
│ ├── get [name] [--full|--base] [--global]
│ ├── list [name] [--global]
│ ├── list [name] [--global] [-o table|yaml|json]
│ ├── delete --global
│ └── prove --policy <path> --credentials <path> [opts]
├── settings
Expand Down Expand Up @@ -107,6 +107,15 @@ openshell
│ │ └── delete <id>
│ ├── update <name> [opts]
│ └── delete <name>...
├── workspace
│ ├── create <name>
│ ├── get <name>
│ ├── list [opts]
│ ├── delete <name>...
│ └── member
│ ├── add --workspace <name> --subject <subject> --role <role>
│ ├── remove --workspace <name> --subject <subject>
│ └── list --workspace <name> [-o table|yaml|json]
├── doctor
│ └── check
├── term
Expand Down Expand Up @@ -321,10 +330,13 @@ Print an SSH config `Host` block. The name defaults to the last-used sandbox.

Manage providers on an existing sandbox:

- `openshell sandbox provider list [name]`
- `openshell sandbox provider list [name] [--output table|yaml|json]`
- `openshell sandbox provider attach <name> <provider>`
- `openshell sandbox provider detach <name> <provider>`

Structured list output contains `name`, `type`, and sorted `credential_keys`
and `config_keys` arrays. It excludes all credential, handle, and config values.

---

## Port Forwarding Commands
Expand All @@ -343,9 +355,15 @@ Start forwarding a local port to a sandbox.

Stop a background port forward. When the sandbox name is omitted, it is inferred from active forwards.

### `openshell forward list`
### `openshell forward list [--output table|yaml|json]`

List all active port forwards (sandbox, port, PID, status).
List all tracked port forwards. Table output shows the sandbox, bind address,
port, PID, and status. JSON and YAML output expose `sandbox`, `bind_address`,
`port`, `pid`, and the boolean `alive`; an empty result is an empty collection.

| Flag | Default | Description |
|------|---------|-------------|
| `-o`, `--output <FORMAT>` | `table` | Output format: `table`, `yaml`, or `json` |

### `openshell forward service [name] --target-port <port>`

Expand All @@ -364,10 +382,13 @@ Forward a local TCP port to a loopback service inside a sandbox over the gRPC re
Gateway-managed HTTP service endpoints:

- `openshell service expose <sandbox> <target-port> [service]`
- `openshell service list [sandbox] [--limit N] [--offset N]`
- `openshell service list [sandbox] [--limit N] [--offset N] [--output table|yaml|json]`
- `openshell service get <sandbox> [service]`
- `openshell service delete <sandbox> [service]`

Structured list records contain `workspace`, `sandbox`, `service`,
`target_port`, and `url`. Empty lists serialize as empty collections.

---

## Logs Command
Expand Down Expand Up @@ -454,6 +475,11 @@ List policy revision history (version, hash, status, created, error).
|------|---------|-------------|
| `--limit <N>` | 20 | Max revisions to return |
| `--global` | false | List global policy revisions |
| `-o`, `--output <FORMAT>` | `table` | Output format: `table`, `yaml`, or `json` |

Structured records use the policy metadata contract from `policy get`: scope,
sandbox when applicable, version, full hash, normalized status, and available
timestamps, load error, and provenance.

### `openshell policy delete --global`

Expand Down Expand Up @@ -486,6 +512,16 @@ Sandbox names default to the last-used sandbox. The CLI fetches and submits each

---

## Workspace Member Commands

### `openshell workspace member list --workspace <name>`

List workspace members. Add `--output table|yaml|json` to select the format.
Structured records contain `subject` and a normalized `role` of `admin`,
`user`, or `unknown`; empty lists serialize as empty collections.

---

## Settings Commands

Settings support sandbox and gateway-global scopes:
Expand Down Expand Up @@ -516,7 +552,9 @@ Create a provider configuration.
| `--runtime-credentials` | Resolve required credentials at runtime in the gateway or sandbox |
| `--config KEY=VALUE` | Config key/value pair. Repeatable. |

Exactly one credential source is required. Credential-source flags conflict with one another.
Credential-source flags conflict with one another when supplied. A credential
source is optional when the selected profile declares no required static
credentials or can resolve its required credentials at runtime.

### `openshell provider get <name>`

Expand Down Expand Up @@ -555,7 +593,7 @@ Delete one or more providers by name.
- `openshell provider profile import (--file <path>|--from <dir>)`
- `openshell provider profile update <id> --file <path>`
- `openshell provider profile lint (--file <path>|--from <dir>)`
- `openshell provider profile delete <id>`
- `openshell provider profile delete <id>...`

### Provider credential refresh

Expand Down
Loading
Loading