Schema

Use this reference to inspect fields, methods, accepted values and failure outcomes. For setup and working examples, start with the API guide.

Definition: abstraction.storage.lend

Service Lending [DEF-S1]

Storage lending implemented by a provider and mediated by the runtime. The provider listens on the shared identity-bound transport and admits designated runtime executables of its own account. A call whose peer identity could not be obtained fails with caller_unavailable; insufficient program proof fails with identity_required; another account or program reads not_permitted. The runtime decides the application caller's right before forwarding. Providers keep a ledger of their placements and preserve source files. Symbolic and hard links require no model-byte reads; an explicitly requested copy reads the source bytes.

Wire identity: abstraction.storage/lend@1

Handler error codes, declared by lending_error_codes: caller_unavailable, identity_required. Generated bindings name each as a ServiceErrorCode member beside the dispatcher's own codes.

Frames carry version, service, method and typed arguments. Transport owns framing, associated exchanges, deadlines and connections. Unknown version/service/method and malformed arguments are rejected before invoking a handler. One-way WriteFrame success means local submission, not remote acceptance or persistence.

Request-response methods use ExchangeFrame. Replies carry version, service, method, ok and payload; success payload contains typed value (or an empty object for void). Error payload contains nonempty code and message, which may be empty. ServiceError preserves unknown codes. Unexpected handler failures become handler_error without private details; invalid results become invalid_result. Clients validate reply identity and result before exposing it. A malformed frame or transport failure remains a local error; the transport must associate each response with its exchange. C++ dispatchers are pure protocol bindings, not listening servers.

Place the named object in the engine's own directory by link, so that engine serves it. store and object are the inventory's naming: object is a manifest id, the name the store gives that manifest, or an object locator, and never a path. engine is a declared host name this provider supports. copy true asks for a copy where a link cannot be made and is counted as a copy; false refuses with link_refused instead. Gated by abstraction.storage/lend on resource engine:<name>, admitted through the runtime's first-use question. An object this provider's stores do not hold is unknown_object; an engine it does not support, or one whose own configuration cannot be pointed at the lent directory without a person editing its configuration file, is unsupported_engine; a link neither the operating system nor the volume allows is link_refused; an object already lent to that engine is already_lent with the entry in force. The original is never moved, renamed or deleted.

Lend

request-response LendResult

Remove exactly the link this entry created and the directories this provider made for it, and drop the entry. The source file is untouched. Gated by abstraction.storage/lend on the entry's own engine:<name>. The engine's own list may keep naming the model until that engine's idle-unload timer fires; the ledger is the answer to whether the lend is in force.

Unlend

request-response UnlendResult

The ledger. limit is 1..256. Continuations are at most 256 bytes and name a retained page position; an unknown one is invalid.

Lends

request-response LendPage

Encoding [DEF-E1]

settingvaluerule
escapeminimal[DEF-E2]
indent2[DEF-E3]
map_keysutf8-bytes[DEF-E4]
numbersinteger-decimal[DEF-E5]
opaqueverbatim[DEF-E6]
terminatornewline[DEF-E7]
duplicate_keysrefuse[DEF-E8]
depth_limit64[DEF-E9]

Types

kindtypes
built inLendOutcome LendsOutcome Link UnlendOutcome bool i64 string
declared belowLend
repeated record [DEF-A9]list<Lend>

Named types [DEF-T2]

One spelling is written [DEF-G2] and a wider set is read [DEF-G1]; the width between them is the interoperability guarantee.

nameiswrittenread
timestampstringrfc3339-microsrfc3339-wide

Structs [DEF-T1]

A field is required, or says when it is omitted [DEF-A4]. Each struct says on its own what it does with a field name it has never heard of [DEF-A7]. A wire name never moves; where a language must spell it differently the field says so [DEF-A2].

Lend

unknown fields refuse

idfieldtypepresencenamed elsewhere
1idstringrequired—
2enginestringrequired—
3storestringrequired—
4objectstringrequired—
5namestringrequired—
6linkstringrequired—
7kindLinkrequired—
8sizei64required—
9createdtimestamprequired—

LendResult

the document [DEF-A1] · unknown fields refuse

idfieldtypepresencenamed elsewhere
1outcomeLendOutcomerequired—
2lendLendoptional · omitted when absent—
3detailstringrequired—

UnlendResult

unknown fields refuse

idfieldtypepresencenamed elsewhere
1outcomeUnlendOutcomerequired—
2detailstringrequired—

LendPage

unknown fields refuse

idfieldtypepresencenamed elsewhere
1outcomeLendsOutcomerequired—
2lendslist<Lend>required—
3continuationstringrequired—
4completeboolrequired—

Enumerations [DEF-T5]

Enum fields carry JSON strings containing exact member wire spellings, never numeric IDs. Unknown names are preserved with grant and refused as bad_enum with refuse on read and write. Optional absent fields preserve presence separately from an empty string.

An enumeration is a closed vocabulary of wire names, and each one says on its own what a reader does with a member it has never heard of [DEF-A5].

a member this reader does not know is refuse

idmemberwire
1symbolicsymbolic
2hardhard
3copycopy

LendOutcome

a member this reader does not know is refuse

idmemberwire
1lentlent
2not_permittednot_permitted
3unsupported_engineunsupported_engine
4link_refusedlink_refused
5already_lentalready_lent
6unknown_objectunknown_object
7invalidinvalid
8unavailableunavailable

UnlendOutcome

a member this reader does not know is refuse

idmemberwire
1unlentunlent
2not_permittednot_permitted
3unknownunknown
4invalidinvalid
5unavailableunavailable

LendsOutcome

a member this reader does not know is refuse

idmemberwire
1pagepage
2not_permittednot_permitted
3invalidinvalid
4unavailableunavailable

Constants [DEF-A6]

nametypevalue
lending_error_codeslist<string>caller_unavailable, identity_required

Refusal words [DEF-R1]

orderwordstage
1malformedgrammar
2bad_stringgrammar
3number_spellinggrammar
4wrong_typegrammar
5bad_timestampgrammar
6depth_exceededgrammar
7duplicate_keygrammar
8duplicate_fieldstructure
9unknown_fieldstructure
10missing_fieldstructure
11bad_enumstructure
12trailing_bytesdocument