Configuration Reference
Plugin config (~/.prism/config.json)
Section titled “Plugin config (~/.prism/config.json)”| Field | Type | Default | Description |
|---|---|---|---|
apiKey | string | — | Your gck_* API key (required) |
prismThreshold | number | 4 | Advisor strictness knob (0–10). Higher values make the advisor more willing to flag prompts; it never blocks a prompt. |
enableGateway | boolean | true | Route Claude Code requests through the Optra gateway. Toggle with /prism:status. |
showStatusLine | boolean | true | Show the [Prism] status line after each turn. Toggle with /prism:status. |
File permissions: 600 (owner read-write only) Directory permissions: 700 (owner only)
Plugin userConfig (plugin.json)
Section titled “Plugin userConfig (plugin.json)”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.
| Field | Type | Description |
|---|---|---|
turnCount | number | Current turn number |
sessionStart | number | Session start timestamp (ms). Set once at session start. |
sessionId | string | Unique session identifier |
totalInputTokens | number | Cumulative input tokens |
totalOutputTokens | number | Cumulative output tokens |
totalCost | number | Cumulative session cost (USD) |
firstTurnInputTokens | number | Input tokens on first turn (context baseline) |
lastTurnInputTokens | number | Input tokens on most recent turn |
lastPromptTimestamp | number | Timestamp of last prompt (for response timing) |
modelCounts | object | Per-model usage counts |
opusLowOutputCount | number | Counter for Opus overkill detection |
responseTimes | number[] | Last 50 response times (ms) |
lastCacheData | object | null | Last turn’s cache read/write counts |
pendingStatusLine | string | null | [Prism] status line queued for the next submit |
pendingAlerts | string[] | null | Alerts queued for the next submit |
OTEL settings (~/.claude/settings.json)
Section titled “OTEL settings (~/.claude/settings.json)”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.