G C-2, C-3: a value larger than one chunk is put and got by session through the tool runner

buscalls.ChunkBytes (512 KiB), mesh/objects.put-chunk and get-chunk with the store named in each chunk, the digest and size
of a get checked, the capability word put-sessions required, and a bundle's refusal of a value over 8 MiB gone.

Builds: design 47 G §518, §345, §490, §620, A-21
Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
This commit is contained in:
2026-11-11 21:54:31 +01:00
parent 141b34d29d
commit 48706563c3
9 changed files with 362 additions and 23 deletions
+3 -6
View File
@@ -50,12 +50,9 @@ func (b BundleKV) Keys() ([]string, error) { return b.State.Keys() }
// BundleObjects is an object store as a bundle reaches it.
type BundleObjects struct{ Store busstate.Objects }
// BundleObjectMost is the largest object a bundle puts in one call: the runtime's channel carries a message of 16 MiB, and
// the bytes travel in it as base64.
const BundleObjectMost = 8 << 20
// MostBytes is BundleObjectMost: a larger value is refused, loudly, until the design decides how a bundle keeps one.
func (BundleObjects) MostBytes() int { return BundleObjectMost }
// MostBytes is zero: a bundle's value of any size is put by a session of chunks, bounded by its store's cap, which the tool
// runner refuses at the chunk that passes it (design 47 G §518).
func (BundleObjects) MostBytes() int { return 0 }
func (b BundleObjects) Put(name string, data []byte) error {
_, err := b.Store.Put(name, data, "a value kept beside its key")