{
"$schema": "https://cmn.dev/schemas/v1/spore-core.json",
"id": "agent-first-psql",
"name": "Agent-First PSQL",
"version": "0.8.0",
"domain": "agentfirstkit.com",
"key": "ed25519.BwbSzqdDYyMN1pPW5snRk3afrJAovHn8aueMvDpfNKVw",
"synopsis": "A PostgreSQL interface for AI agents: reliable, structured, explicit, and read-only by default.",
"intent": [
"Give AI agents a persistent PostgreSQL client that reuses long-lived database connections and sessions, so agents send SQL requests as JSONL and receive structured JSONL responses without managing connection setup",
"Bridge ad-hoc psql shell usage and protocol-specific integrations by providing transport-neutral, agent-native request and response framing",
"Provide predictable machine-readable outputs for row sets, command status, and errors so agent workflows can branch without parsing human-formatted terminal output"
],
"license": "MIT",
"mutations": [
"Accept --dsn-secret and --conninfo-secret with --ssh and --container: afpsql parses the connection string locally in-process and derives the transport's internal PostgreSQL endpoint from it, so agents never split or reveal a DSN in shell code",
"Preserve the full parsed connection across an SSH tunnel — authentication, database, startup options, timeouts, keepalives, channel binding and TLS settings survive the local port forward, with the original hostname retained for PostgreSQL TLS",
"Encrypt both the SSH and container stdio bridges with the supported TLS modes instead of forcing an unencrypted connection, deriving a non-empty TLS server name from the resolved endpoint so a hostless DSN cannot fail the handshake",
"Reject a DSN or conninfo that resolves to a multi-host failover list under SSH/container transport with an explicit single-endpoint error and a recovery hint instead of silently picking one target",
"Route events by consumption mode: a finite query sends its result to stdout and diagnostics to stderr, while --mode pipe and --stream-rows keep their whole ordered event stream on stdout so streamed row batches are never stranded on the diagnostic stream",
"Add --output-to split|stdout|stderr to override the event destination, resolved before argument parsing so startup failures, --help and --version honor it, and reject split for a streaming invocation rather than silently reordering it",
"Stop a locked readonly profile from reading connection environment variables, so an administrator-pinned endpoint can no longer be redirected by AFPSQL_DSN_SECRET or PGHOST, nor have its TLS downgraded by PGSSLMODE",
"Drop short aliases from the canonical CLI surface (-h, -V, -o), confining psql-compatible shorts to --mode psql and the managed psql wrapper",
"Reject psql's -o and --output output-file flags in psql mode instead of silently reinterpreting them as afpsql's rendering format",
"Delegate --help and --version to Agent-First Data's unified handler, emitting a structured version event and removing the auto-generated help subcommand",
"Rename runtime config secret metadata fields to config_file_path and dot_path to match the Agent-First Data naming convention",
"Move the test entrypoint into the project as scripts/test.sh so CI and the release gate run the same modes, and widen both to exercise the live-PostgreSQL suite that CI previously skipped",
"Upgrade to agent-first-data 0.26.1"
],
"bonds": [
{
"relation": "depends_on",
"uri": "cmn://agentfirstkit.com/b3.3JvaoXaDbsCT6z16jtvCD1oGrPZEsEXGn6g1CWqKCpJF",
"id": "agent-first-data",
"reason": "All request/response fields use Agent-First Data suffix conventions and output formats"
}
],
"tree": {
"algorithm": "blob_tree_blake3_nfc",
"exclude_names": [
".git",
".cmn"
],
"follow_rules": [
".gitignore"
]
}
}