Skip to contents

Current consumer contract

## $contract
## [1] "4.2.0"
## 
## $artifact
## [1] "1"
## 
## $manifest
## [1] "graft-artifact-manifest/1"
## 
## $replacement
## [1] "graft-artifact-replacement/1"
## 
## $backup
## [1] "graft-artifact-backup/1"
## 
## $selection
## [1] "1"
## 
## $decision
## [1] "1"
## 
## $vocabulary
## [1] "graft-vocabulary/1"
## 
## $bindings
## [1] "graft-bindings/1"
## 
## $vocabulary_release
## [1] "graft-vocabulary-release/1"

Graft requires R 4.3 or later and imports S7, digest, fs, jsonlite, and rlang. Publishing vocabulary also requires the data-dict R package and CLI. Reading a published release requires neither the CLI nor the original dictionary files.

The consumer contract is 4.1.0. Everyday work uses the task verbs graft_store(), graft_save(), graft_read(), graft_accept(), graft_withdraw(), graft_recall(), graft_history(), and graft_streams(), along with the S7 store and value classes. The old artifact-prefixed exports have been removed, and no compatibility aliases exist. Artifact bytes, selection formats, and content identities remain unchanged. Contract 4.1.0 adds graft_streams() and the lock_timeout argument of graft_store(), which bounds the wait for a stream’s decision lock on a local store.

DESCRIPTION pins the dictionary integration to the validated data-dict source revision. Commons is application-owned. Pass retained vocabulary context and validated data to its public source API. Graft does not maintain a Commons connection adapter or copy executable agent tools.

Applications such as Tempest and Rill adopt this public API in their integration layers. They choose which evidence to retain, validate their domain results, and authorize reuse. Issue #91 tracks their contract 4 migration.

Native chat classes

graft_tool() returns an ordinary ellmer::ToolDef. Register it with an ellmer chat using chat$register_tool(). Each invocation returns a native ellmer::ContentToolResult and may include shinychat::tool_result_display() metadata. The tool fixes the store, stream, and purpose when it is constructed, then calls the application’s eligibility function on every invocation.

The adapter receives Graft’s S7 store as a separate object. The store does not inherit from ellmer’s chat class or implement shinychat’s conversation store. Those packages retain control of model calls, tool execution, and conversation state. The store persists only explicit artifact bytes and canonical records. It never serializes live chats, tools, or database connections.

Hard cut from native graph APIs

The graph store, schema compiler, plans, receipts, snapshots, calculation engine, and managed OKF tree have been removed. This package cannot open native graph stores or snapshots. Consumer upgrades remove those paths and old persisted product schemas. Graft artifact, selection, decision, and vocabulary formats retain their existing content identities. Historical ADRs and migration notes describe the earlier architecture. They remain historical records and are not supported recipes.