SuperPi.Plugins.TranscriptLogger (super_pi v0.1.0)

Copy Markdown View Source

Dual-Write JSONL Transcript Logger & MCP/Plugin Manager (SuperPi.Extension behaviour).

Implements:

  • Dual-writes <appDataDir>/brain/<conversation-id>/.system_generated/logs/transcript.jsonl (compact, truncating fields over 4_096 bytes and setting truncated_fields) and transcript_full.jsonl (untruncated).
  • Synchronizes transcript automatically after agent runs or on explicit calls.
  • Manages <globalConfigDir>/mcp_config.json (add, remove, list, enable, disable).
  • Manages <globalConfigDir>/config.json and plugins/<name>/plugin.json (list, enable, disable, validate).

Summary

Functions

Enabled MCP servers from mcp_config.json as %{name => spec}. Disabled entries are left out.

Exports the derived conversation history to transcript.jsonl (compact) and transcript_full.jsonl under <appDataDir>/brain/<conversation_id>/.system_generated/logs/.

The steps of a conversation as sync_transcript!/2 writes them to transcript.jsonl: in order, each field cut at 4096 bytes. Served as the MCP superpi://conversation/{id}/transcript resource.

Functions

description()

id()

mcp_add(name, spec, opts \\ [])

mcp_list(opts \\ [])

mcp_remove(name, opts \\ [])

mcp_set_enabled(name, enabled?, opts \\ [])

mcp_specs(opts \\ [])

Enabled MCP servers from mcp_config.json as %{name => spec}. Disabled entries are left out.

name()

plugin_list(opts \\ [])

plugin_set_enabled(plugin_id, enabled?, opts \\ [])

plugin_validate(plugin_dir)

sync_transcript!(conversation_id, opts \\ [])

Exports the derived conversation history to transcript.jsonl (compact) and transcript_full.jsonl under <appDataDir>/brain/<conversation_id>/.system_generated/logs/.

transcript_steps(conversation_id)

@spec transcript_steps(integer()) :: [map()]

The steps of a conversation as sync_transcript!/2 writes them to transcript.jsonl: in order, each field cut at 4096 bytes. Served as the MCP superpi://conversation/{id}/transcript resource.