mirror of
https://github.com/hanzoai/base.git
synced 2026-10-21 03:41:50 +00:00
Both halves of this existed and neither was a function: one runtime knew how to invoke by name and bound no host, the other bound every host and could not invoke. They are joined through the runtime interface that was already here and used by nothing outside its own tests. A function lives in a collection, so it is the tenant's own file, its rules are the rules, and the two doors — the collection and /v1/functions — refuse in the same words because there is one rule. The source is the server's: a caller who may see that a function exists does not get what it says. What a function may ask for is two reads of the Base it is running in, and that is the whole host. Not the app, not a process, not a file, not the network — a name bound in a first version is bound for good, so the list is what a function needs and nothing anticipated. It reads as its caller. The collection comes from the Base the credential already resolved, and the rule from the caller's own identity, so a function renders what the caller could have read and is never a way around them. The payload does not answer a rule: `@request.body` is about a write, and letting an invocation body speak for it would let a caller satisfy a read rule by naming a field they sent. Invoking counts under its own action, because running code is the cost. A function that does not finish is stopped. Co-authored-by: Hanzo Dev <[email protected]>