commons 0.2.0

commons 0.2.0 introduces three big features in addition to a number of minor improvements and big fixes.

New features

Interoperability

The commons() function was split into two, enabling users to use commons with other coding agents and to reuse trusted code across multiple projects. Calls to commons() previously looked like this:

commons <- commons(client, data_sources, semantic_layer, context_layer)

The construction of the data structure that holds the data sources, semantic layer, and context layer and the construction of the agent harness that makes that information available to an LLM are now split into two pieces.

commons <- commons(data_sources = ..., semantic_layer = ..., context_layer = ...)
agent <- agent(client, commons = commons)

We call that first data structure “the commons.” The commons can be used to invoke trusted code and search trusted context directly from R and is intended for use with other coding agents. See ?commons() and the new sharing vignette at vignette("sharing", package = "commons") to learn more. agent() returns what commons() used to return—a commons agent.

This transition was implemented backward-compatibly; existing calls to commons() will raise a deprecation warning with migration instructions.

Sharable documents

commons agents can now write self-contained, sharable reports as Quarto documents. When users mention writing reports or creating something sharable, the agent can load an agent skill and then stream document code directly into a chat drawer. Documents get their data by calling commons() methods in their code, and the agent revises them with a new edit_artifact tool.

Sharing

On Posit Connect, users can now share conversations, documents, plots, or tables as static content they own. Existing apps need no changes to enable this feature. Shared content includes the code that made it, the date it was created, and a link back to the original agent.

Miscellaneous features and bug fixes

commons 0.1.1

commons 0.1.0