Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

Configuration Reference

FieldTypeDefaultDescription
apiKeystringYour gck_* API key (required)
prismThresholdnumber4Advisor strictness knob (0–10). Higher values make the advisor more willing to flag prompts; it never blocks a prompt.
enableGatewaybooleantrueRoute Claude Code requests through the Optra gateway. Toggle with /prism:status.
showStatusLinebooleantrueShow the [Prism] status line after each turn. Toggle with /prism:status.

File permissions: 600 (owner read-write only) Directory permissions: 700 (owner only)

These fields are configurable when installing the plugin:

{
"userConfig": {
"apiKey": {
"title": "API Key",
"type": "string",
"description": "Your Optra API key (starts with gck_)",
"sensitive": true
},
"enableGateway": {
"title": "Enable Gateway",
"type": "boolean",
"description": "Route Claude Code API calls through Optra gateway for intelligence (default: true). Use /prism:status to toggle.",
"sensitive": false
},
"prismThreshold": {
"title": "PRISM Threshold",
"type": "number",
"description": "Minimum prompt quality score 0-10",
"sensitive": false
},
"showStatusLine": {
"title": "Show Status Line",
"type": "boolean",
"description": "Show the [Prism] status line after every turn (default: true). Use /prism:status to toggle.",
"sensitive": false
}
}
}

Session state (${CLAUDE_PLUGIN_DATA}/session-state.json)

Section titled “Session state (${CLAUDE_PLUGIN_DATA}/session-state.json)”

Managed automatically by the plugin hooks. sessionStart and sessionId are set at session start; the token/count fields are reset on /compact.

FieldTypeDescription
turnCountnumberCurrent turn number
sessionStartnumberSession start timestamp (ms). Set once at session start.
sessionIdstringUnique session identifier
totalInputTokensnumberCumulative input tokens
totalOutputTokensnumberCumulative output tokens
totalCostnumberCumulative session cost (USD)
firstTurnInputTokensnumberInput tokens on first turn (context baseline)
lastTurnInputTokensnumberInput tokens on most recent turn
lastPromptTimestampnumberTimestamp of last prompt (for response timing)
modelCountsobjectPer-model usage counts
opusLowOutputCountnumberCounter for Opus overkill detection
responseTimesnumber[]Last 50 response times (ms)
lastCacheDataobject | nullLast turn’s cache read/write counts
pendingStatusLinestring | null[Prism] status line queued for the next submit
pendingAlertsstring[] | nullAlerts queued for the next submit

The plugin syncs these environment variables on session start:

{
"env": {
"OTEL_EXPORTER_OTLP_LOGS_ENDPOINT": "https://ingest.prism.optra-ai.com/v1/logs",
"OTEL_EXPORTER_OTLP_METRICS_ENDPOINT": "https://ingest.prism.optra-ai.com/v1/metrics",
"OTEL_EXPORTER_OTLP_TRACES_ENDPOINT": "https://ingest.prism.optra-ai.com/v1/traces"
}
}

URLs are resolved from the config endpoint based on your API key.