actpkg.dev
Components

library/postgres

v0.1.3 Signed

Hardened PostgreSQL access for AI agents — capability-gated, tiered, bounded

by @library updated 2026-07-16 2.2 MB 0

Install

$ act pull actpkg.dev/library/postgres

Capabilities

Elevated host access

Requests: Scoped capability · Privileged operation · Raw sockets (scoped).

  • db:ddl Scoped capability

    Change schema (CREATE, ALTER, GRANT, REVOKE, ...).

  • db:drop Privileged operation

    Destructive operations (DROP, TRUNCATE).

  • db:read Scoped capability

    Read data (SELECT, EXPLAIN, SHOW, schema introspection).

  • db:write Privileged operation

    Modify rows (INSERT, UPDATE, DELETE, MERGE, COPY ... FROM).

  • wasi:sockets Raw sockets (scoped)

    *:5432,5433,5434,6432

Risk Low Medium High

Tools · 6

act:tools interface — expand a tool for its input schema.

  • query

    Execute a read-only SQL query (SELECT/CTE) and return rows. Rejected if it is not read-only or exceeds the session mode.

    ParameterTypeDescription
    sql*stringA single read-only SQL statement.
    paramsarray | nullBind values for $1, $2, ... (optional).
    max_rowsinteger | nullOverride the session's default row cap (optional).

    Returns content.

  • execute

    Execute a write/DDL SQL statement (INSERT/UPDATE/DELETE/CREATE/...). Each statement is classified and checked against the session mode.

    ParameterTypeDescription
    sql*stringA single SQL statement.
    paramsarray | nullBind values for $1, $2, ... (optional).

    Returns content.

  • list_schemas

    List non-system schemas in the database.

    No input parameters.

    Returns content.

  • list_tables

    List tables and views in a schema (default 'public').

    ParameterTypeDescription
    schemastring | nullSchema to inspect. Defaults to 'public'.

    Returns content.

  • describe_table

    Describe a table: columns, types, nullability, defaults.

    ParameterTypeDescription
    table*stringTable name.
    schemastring | nullSchema. Defaults to 'public'.

    Returns content.

  • explain_query

    Return the query plan via EXPLAIN. analyze=false (default) does NOT execute the query; analyze=true requires the statement's tier.

    ParameterTypeDescription
    sql*stringSQL statement to explain.
    formatstring | nullOutput format: text | json. Default text.
    analyzeboolean | nullRun EXPLAIN ANALYZE (executes the query). Default false.

    Returns content.

Readme

No README provided.