sha256:89f4c882ba5566a10cf5e9942122395bb59b7f790d2854d7dd15915bffc6d21b
Last pushed
about 12 hours by sbx
Type
Sandbox Kit
Manifest digest
sha256:89f4c882ba5566a10cf5e9942122395bb59b7f790d2854d7dd15915bffc6d21b
schemaVersion: "3"
displayName: goose
description: 'goose, the open-source agent now under the Linux Foundation''s Agentic AI Foundation, as a mixin: the static CLI in an overlay, with optional proxy-managed credentials for Anthropic, OpenAI (API key or ChatGPT login), Google and OpenRouter, and the config goose needs to start. Layer it onto any base and run `goose`.'
sourceUrl: https://github.com/aaif-goose/goose
version: 1.54.0
licenses:
- Apache-2.0
kind: mixin
provides:
- [email protected]
capabilities:
- type: com.docker.sandbox/network-policy@1
config:
runtime:
allow:
- api.anthropic.com
- api.openai.com
- auth.openai.com
- chatgpt.com
- generativelanguage.googleapis.com
- openrouter.ai
- type: com.docker.sandbox/credential@1
optional: true
config:
apiKey:
inject:
- domain: api.anthropic.com
format: '%s'
header: x-api-key
name: ANTHROPIC_API_KEY
proxyManaged: true
phase: runtime
service: anthropic
description: Anthropic API access
- type: com.docker.sandbox/credential@1
optional: true
config:
apiKey:
inject:
- domain: api.openai.com
format: Bearer %s
header: Authorization
name: OPENAI_API_KEY
proxyManaged: true
oauth:
resourceHosts:
- chatgpt.com
sentinels:
accessToken: oai-oat01-proxy-managed
refreshToken: oai-ort01-proxy-managed
tokenEndpoint:
host: auth.openai.com
path: /oauth/token
phase: runtime
service: openai
description: OpenAI API access (API key or ChatGPT OAuth)
- type: com.docker.sandbox/credential@1
optional: true
config:
apiKey:
inject:
- domain: generativelanguage.googleapis.com
format: '%s'
header: x-goog-api-key
name: GOOGLE_API_KEY
proxyManaged: true
phase: runtime
service: google
description: Google Gemini API access
- type: com.docker.sandbox/credential@1
optional: true
config:
apiKey:
inject:
- domain: openrouter.ai
format: Bearer %s
header: Authorization
name: OPENROUTER_API_KEY
proxyManaged: true
phase: runtime
service: openrouter
description: OpenRouter API access
- type: com.docker.sandbox/lifecycle@1
config:
files:
- content: |
This sandbox runs goose, Block's open-source agent (now under the
Linux Foundation's Agentic AI Foundation), inside a Docker
Sandboxes microVM.
- The sandbox is the isolation boundary. Outbound network access
is limited by the sandbox's network policy, and the goose kit
itself only opens the model providers. If a request is blocked,
say so rather than working around it.
- Model provider keys are never present in the sandbox. The
provider env vars hold placeholder values and the host proxy
swaps in the real key on outbound calls to the provider's API
host. Do not try to read, print or "fix" them.
- goose is configured in ~/.config/goose/config.yaml. The
provider, model and mode come from the kit's arguments. goose
does not read API keys from that file.
- Local stdio MCP servers that goose launches (for example
npx-launched extensions) run inside this sandbox, subject to
the same network policy.
description: Sandbox guidance for goose
overwrite: false
path: /home/agent/.config/goose/.goosehints
install:
- command: |
set -e
mkdir -p "$HOME/.config/goose"
cfg="$HOME/.config/goose/config.yaml"
[ -f "$cfg" ] && exit 0
cat > "$cfg" <<'EOF'
GOOSE_PROVIDER: "${{ kit.args.provider }}"
GOOSE_MODEL: "${{ kit.args.model }}"
GOOSE_MODE: "${{ kit.args.mode }}"
GOOSE_DISABLE_KEYRING: true
GOOSE_TELEMETRY_ENABLED: false
EOF
description: Seed goose config.yaml from the provider, model and mode args
user: agent
- command: |
set -e
[ "${SBX_CRED_OPENAI_MODE:-none}" = oauth ] || exit 0
dir="$HOME/.config/goose/chatgpt_codex"
mkdir -p "$dir"
acct='${{ kit.args.chatgptAccountId }}'
if [ -n "$acct" ]; then acct="\"$acct\""; else acct=null; fi
umask 077
cat > "$dir/tokens.json" <<EOF
{"access_token":"oai-oat01-proxy-managed","refresh_token":"oai-ort01-proxy-managed","id_token":null,"expires_at":"2099-01-01T00:00:00Z","account_id":$acct}
EOF
description: Seed the goose ChatGPT token file with proxy sentinels when OAuth is bound
env:
- SBX_CRED_OPENAI_MODE
user: agent
startup:
- command: |
set -e
[ -n "$MCP_GATEWAY_URL" ] || exit 0
cfg="$HOME/.config/goose/config.yaml"
mkdir -p "$(dirname "$cfg")"
touch "$cfg"
grep -q '^ mcp-gateway:' "$cfg" && exit 0
entry=" mcp-gateway: {type: streamable_http, name: mcp-gateway, enabled: true, uri: \"$MCP_GATEWAY_URL\", headers: {Authorization: \"Bearer $MCP_SENTINEL_TOKEN_NAME\"}, envs: {}, env_keys: [], timeout: 300}"
if grep -q '^extensions:[[:space:]]*$' "$cfg"; then
awk -v e="$entry" '{print} /^extensions:[ \t]*$/{print e}' "$cfg" > "$cfg.tmp"
elif grep -q '^extensions:' "$cfg"; then
echo "goose kit: extensions is not a block map in $cfg, skipping gateway registration" >&2
exit 0
else
{ cat "$cfg"; printf 'extensions:\n%s\n' "$entry"; } > "$cfg.tmp"
fi
mv "$cfg.tmp" "$cfg"
description: Register the sandbox MCP gateway as a goose extension
env:
- MCP_GATEWAY_URL
- MCP_SENTINEL_TOKEN_NAME
user: agent
- type: com.docker.sandbox/agent-skills@1
optional: true
config:
path: /home/agent/.agents/skills
args:
chatgptAccountId:
default: ""
description: ChatGPT account id (account_id in the host's ~/.codex/auth.json) for provider=chatgpt_codex; empty omits it
pattern: ^[A-Za-z0-9-]*$
mode:
default: auto
description: goose permission mode (GOOSE_MODE). The sandbox is the boundary, so the default is auto.
enum:
- auto
- approve
- smart_approve
- chat
model:
default: claude-sonnet-5-5
description: Model name for the provider (GOOSE_MODEL)
pattern: ^[A-Za-z0-9._:/-]+$
provider:
default: anthropic
description: goose provider (GOOSE_PROVIDER), e.g. anthropic, openai, chatgpt_codex, google, openrouter
pattern: ^[a-z0-9_-]+$
version:
default: 1.54.0
description: goose release to install (update the dockerfile's SHA-256 ARGs with it)
pattern: ^[0-9]+\.[0-9]+\.[0-9]+$
buildArg: GOOSE_VERSION