Summary
Adds an optional host.tableStorage capability — a structured-record store with user-defined schemas, query, and count. Sibling to host.kvStorage (RFC 0015) for cases where workflows want column-typed records (Make Data Store with a Data Structure).
Motivation
host.kvStorage covers opaque-value cases. Many workflows need typed columns (e.g., logging conversation turns, persisting form submissions, cross-run dedupe by a primary key). Building this as a sibling capability keeps both surfaces simple and lets hosts back them with different stores (Redis for kv, Postgres/SQLite for table).
Proposal
§A Capability schema
{
"tableStorage": {
"type": "object",
"properties": {
"supported": { "type": "boolean" },
"maxRowsPerTable": { "type": "integer" },
"maxColumnsPerRow": { "type": "integer" },
"indexable": { "type": "boolean", "description": "Host supports declarative indexes on columns." },
"fullTextSearch": { "type": "boolean" }
},
"additionalProperties": false
}
}
§B Host-contract MUSTs
- Cross-tenant isolation (mirrors RFC 0015 invariant).
- Schema declaration on first
insertto a table; subsequent rows MUST conform. queryMUST support filter + cursor pagination.
§C Conformance
table-cross-tenant-isolation.test.ts.table-cursor-pagination.test.ts.table-schema-enforcement.test.ts(wrong-type insert rejected).
Compatibility
Additive. Optional. core.openwop.storage table-\* nodes refuse registration without advertisement.
Implementation notes (non-normative)
- Schema diff in §A lands in
schemas/capabilities.schema.jsonon Active promotion, not at Draft. - Cross-tenant invariant row lands in
SECURITY/invariants.yamlalongsidetable-cross-tenant-isolation.test.ts. - Reference impl candidate: sqlite-backed table store in
examples/hosts/sqlite/.
Acceptance criteria
- [x] Capability block.
- [x] Prose section. (Landed at commit c5831fe.)
- [x] 3 conformance scenarios.
- [x] CHANGELOG entry.
References
- Make Data Store + Data Structure (prior art).
- RFC 0015 host.kvStorage (sibling).