Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
385de4a
Prototype trusted() in R, with commons() accepting one
simonpcouch Oct 9, 2026
c1d97d6
Return plain values from trusted methods, without handles
simonpcouch Oct 9, 2026
88f6b99
Merge remote-tracking branch 'origin/main' into interop
simonpcouch Oct 23, 2026
f96fafe
Document using trusted() with coding agents through MCP Console
simonpcouch Oct 23, 2026
c7e0475
Point trusted's printout at $search() and a $context() query
simonpcouch Oct 23, 2026
192166b
Phrase trusted's search results as its own methods, not agent tools
simonpcouch Oct 23, 2026
fc23bec
Accept SQL-like strings and unnamed triples for trusted's `where`
simonpcouch Oct 23, 2026
b2ebb79
List trusted's method signatures and document setup per coding agent
simonpcouch Oct 23, 2026
1c6328c
rewrite docs
simonpcouch Oct 23, 2026
ef7e7c7
Only list trusted's calculation methods that have something to run
simonpcouch Oct 23, 2026
b61eee2
Rename `commons()` to `agent()` and `trusted()` to `commons()`
simonpcouch Oct 26, 2026
5edc0bf
rewrite NEWS.md
simonpcouch Oct 26, 2026
ee1da47
Document the MCP Console workaround for context search's fts extension
simonpcouch Oct 26, 2026
dec36ca
Fix quoted predicates and lazy pins in commons methods
simonpcouch Oct 26, 2026
befbef0
Replace commons' $connection() with $run_sql()
simonpcouch Oct 27, 2026
0a7131f
document `languages: [r]`
simonpcouch Oct 27, 2026
6df2acf
Address review: stricter where parsing, hide $context() when empty, c…
simonpcouch Oct 28, 2026
15aa5d0
Test $calculation(), $context(), and $describe() on commons objects
simonpcouch Oct 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pkg-r/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Imports:
jsonlite,
knitr,
later,
lifecycle,
processx,
promises (>= 1.5.0),
R6,
Expand Down
2 changes: 2 additions & 0 deletions pkg-r/NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Generated by roxygen2: do not edit by hand

S3method(print,commons_text)
export(agent)
export(commons)
export(commons_app)
export(commons_server)
Expand Down
20 changes: 19 additions & 1 deletion pkg-r/NEWS.md

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See here for the write-up of the changes.

Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
# commons (development version)

* `commons()` gains a `mode` argument. With `mode = "trusted only"`, the agent answers only with trusted calculations. It never writes its own SQL or R, and it tells the user when no trusted calculation answers a question. These answers carry no provenance markers.
* The `commons()` function was split into two. Calls to `commons()` previously looked like this:

```r
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.

```r
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()` 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.

* `agent()` (formerly `commons()`) gains a `mode` argument. With `mode = "trusted only"`, the agent answers only with trusted calculations. It never writes its own SQL or R, and it tells the user when no trusted calculation answers a question. These answers carry no provenance markers.


* `describe_table` reports complete table schemas and documentation without a sampled-row summary. DuckDB descriptions use database-native types. Snowflake and Databricks continue to use native metadata, while other DBI connections infer R column classes from five sampled rows, or zero rows in trusted-only mode (#319).

Expand Down
Loading
Loading