@pritzlaff/nano-core 0.4.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/application/context.d.ts +8 -2
- package/application/emit.d.ts +2 -2
- package/application/index.d.ts +8 -1
- package/application/instances.d.ts +4 -0
- package/application/lookup.d.ts +1 -1
- package/application/messages.d.ts +2 -1
- package/application/resolve.d.ts +12 -2
- package/application/start.d.ts +30 -0
- package/application/stream.d.ts +14 -1
- package/context.d.ts +3 -1
- package/coord.d.ts +13 -4
- package/deployment-edit.d.ts +11 -0
- package/deployment-policy.d.ts +19 -0
- package/deployment.d.ts +3 -1
- package/iface.d.ts +3 -3
- package/implementation.d.ts +22 -8
- package/index.d.ts +3 -2
- package/index.js +344 -188
- package/index.js.map +28 -26
- package/op.d.ts +1 -1
- package/package.json +1 -1
- package/plain.d.ts +1 -1
- package/pod.d.ts +1 -1
- package/policy.d.ts +3 -3
- package/provider.d.ts +4 -1
- package/registry.d.ts +17 -3
- package/runtime.d.ts +4 -0
- package/selector.d.ts +10 -7
package/index.js.map
CHANGED
|
@@ -1,41 +1,43 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../src/schema.ts", "../src/op.ts", "../src/result.ts", "../src/plain.ts", "../src/selector.ts", "../src/implementation.ts", "../src/iface.ts", "../src/
|
|
3
|
+
"sources": ["../src/schema.ts", "../src/op.ts", "../src/coord.ts", "../src/result.ts", "../src/plain.ts", "../src/selector.ts", "../src/implementation.ts", "../src/iface.ts", "../src/provider.ts", "../src/registry.ts", "../src/policy.ts", "../src/deployment-policy.ts", "../src/pod.ts", "../src/pods.ts", "../src/runtime.ts", "../src/deployment.ts", "../src/deployment-edit.ts", "../src/application/apply.ts", "../src/application/load.ts", "../src/application/compose.ts", "../src/application/lookup.ts", "../src/application/messages.ts", "../src/application/emit.ts", "../src/application/connection.ts", "../src/application/iterate.ts", "../src/application/context.ts", "../src/application/sources.ts", "../src/application/instances.ts", "../src/application/pod-changes.ts", "../src/application/listen.ts", "../src/application/start.ts", "../src/application/resolve.ts", "../src/application/stream.ts", "../src/application/index.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"/**\n * Schema definitions: a TypeBox schema paired with its canonical hash, an optional label and a JSON codec. A definition\n * is itself the schema, so it nests in another directly.\n *\n * const Rec = Schema.define(Type.Object({ id: Type.String() }), 'Record')\n * Type.Array(Rec) // nests as it is; Static<typeof Rec> is its type\n * Rec.hash // 64-char blake3 hex of the canonical schema (the label does not count)\n * Rec.decode(Rec.encode(value)) // the value, or undefined if it doesn't fit\n */\nimport { blake3 } from '@noble/hashes/blake3'\nimport { utf8ToBytes, bytesToHex } from '@noble/hashes/utils'\nimport { canonicalize } from 'json-canonicalize'\nimport { Compile } from 'typebox/compile'\nimport type { Static, TSchema } from 'typebox'\n\nexport type SchemaDef<S extends TSchema = TSchema> = S & {\n readonly label?: string\n readonly schema: S\n readonly hash: string\n check(v: unknown): v is Static<S>\n encode(v: Static<S>): string\n decode(json: string): Static<S> | undefined\n}\n\n/** RFC 8785 canonical JSON. */\nexport const canonical = (value: unknown): string => canonicalize(value)\n\n/** blake3 of the UTF-8 text, lower-case hex. */\nexport const hashOf = (text: string): string => bytesToHex(blake3(utf8ToBytes(text)))\n\nconst NOTES = new Set(['description', 'title', 'examples', '$comment'])\n// Data values: copied as-is, so two schemas with different constants never hash equal.\nconst DATA = new Set(['const', 'enum', 'default'])\nconst MAPS = new Set(['properties', 'patternProperties', '$defs'])\n\n// Strip annotations at every depth; keys of a name map are property names, so they stay.\nfunction strip(node: unknown, isMap = false): unknown {\n if (Array.isArray(node)) return node.map(n => strip(n))\n if (node === null || typeof node !== 'object') return node\n const out: Record<string, unknown> = {}\n for (const [k, v] of Object.entries(node)) {\n if (!isMap && NOTES.has(k)) continue\n // `required` is a set: its order follows property order, which must not matter.\n out[k] = isMap ? strip(v) : DATA.has(k) ? v : k === 'required' && Array.isArray(v) ? [...v].sort() : strip(v, MAPS.has(k))\n }\n return out\n}\n\n/** Plain JSON data: null, booleans, finite numbers, strings, arrays and plain objects of them, without cycles. */\nexport function isJson(v: unknown, seen = new Set<unknown>()): boolean {\n if (v === null || typeof v === 'string' || typeof v === 'boolean') return true\n if (typeof v === 'number') return Number.isFinite(v)\n if (typeof v !== 'object' || seen.has(v)) return false\n const proto = Object.getPrototypeOf(v)\n if (!Array.isArray(v) && proto !== Object.prototype && proto !== null) return false\n seen.add(v)\n const ok = Object.values(v).every(x => isJson(x, seen))\n seen.delete(v)\n return ok\n}\n\nexport const canonicalSchema = (schema: TSchema): string => canonical(strip(schema))\n\n// A function anywhere (own keys, enumerable or not) means the schema can't be JSON: a Refine keeps its check in a hidden `~refine`.\n// A definition nested in another was checked when it was defined; its own methods don't count.\nconst defs = new WeakSet<object>()\nfunction hasFunction(node: unknown, seen = new Set<unknown>()): boolean {\n if (typeof node === 'function') return true\n if (node === null || typeof node !== 'object' || seen.has(node) || defs.has(node)) return false\n seen.add(node)\n return Reflect.ownKeys(node).some(k => hasFunction((node as Record<PropertyKey, unknown>)[k], seen))\n}\n\n/** A copy of `schema` (non-enumerable keys kept), with the definition's members added out of sight of hashing. */\nfunction define<S extends TSchema>(schema: S, label?: string): SchemaDef<S> {\n if (hasFunction(schema)) throw new Error(`${label ?? 'schema'}: schema is not JSON`)\n // Compiled on first use (JIT where the page allows `eval`, else TypeBox interprets): the same answer as Value.Check.\n let compiled: ReturnType<typeof Compile<S>> | undefined\n const check = (v: unknown): v is Static<S> => (compiled ??= Compile(schema)).Check(v)\n const members = {\n ...(label !== undefined && { label }),\n schema,\n hash: hashOf(canonicalSchema(schema)),\n check,\n encode: (v: Static<S>) => JSON.stringify(v),\n decode(json: string) {\n try {\n const v: unknown = JSON.parse(json)\n return check(v) ? v : undefined\n } catch {\n return undefined\n }\n },\n }\n const def = Object.defineProperties({}, Object.getOwnPropertyDescriptors(schema))\n for (const [k, value] of Object.entries(members)) Object.defineProperty(def, k, { value })\n defs.add(def)\n return def as SchemaDef<S>\n}\n\n/** `Schema.define(typeboxSchema, label?)`. */\nexport const Schema = { define }\n",
|
|
6
|
-
"/**\n * Ops: an action (input → output) or an event (data out, its `output`). An op is a signature, unnamed: the interface\n * names it by key, and its coordinate (hash of name and schemas) is computed there.\n *\n * const api = Interface.define('acme
|
|
6
|
+
"/**\n * Ops: an action (input → output) or an event (data out, its `output`). An op is a signature, unnamed: the interface\n * names it by key, and its coordinate (hash of name and schemas) is computed there.\n *\n * const api = Interface.define('acme.Db', { get: Op.action(Key, Value) }) // api.ops.get.name: 'get'\n * fits(Op.event(Num), Op.action(Num, Nothing)) // true\n */\nimport type { TSchema } from 'typebox'\nimport { canonicalSchema, Schema, type SchemaDef } from './schema.ts'\n\nexport type OpKind = 'action' | 'event'\n\n/** An op as an interface holds it: named by its key, with its coordinate. */\nexport type Op<I extends TSchema | undefined = TSchema | undefined, O extends TSchema | undefined = TSchema | undefined, K extends OpKind = OpKind> = {\n readonly name: string\n readonly kind: K\n readonly input?: SchemaDef<Exclude<I, undefined>>\n readonly output?: SchemaDef<Exclude<O, undefined>>\n readonly coord: string\n readonly description?: string\n}\n\ntype Opts = { description?: string }\n/** A `SchemaDef`, or a bare TypeBox schema (defined here, unlabelled). */\ntype Given = SchemaDef | TSchema\ntype Of<G> = G extends { readonly schema: infer S extends TSchema; readonly hash: string } ? S : G extends TSchema ? G : never\nconst def = (g: Given): SchemaDef => ('hash' in g && 'check' in g ? g as SchemaDef : Schema.define(g))\ntype Unnamed<I extends TSchema | undefined, O extends TSchema | undefined, K extends OpKind> = Omit<Op<I, O, K>, 'name' | 'coord'>\n\nfunction make<K extends OpKind>(kind: K, given: Given | undefined, out: Given, o?: Opts): Unnamed<any, any, K> {\n const input = given && def(given)\n return { kind, ...(input && { input }), output: def(out), ...(o?.description !== undefined && { description: o.description }) }\n}\n\nexport const Op = {\n action: <I extends Given, O extends Given>(input: I, output: O, o?: Opts): Unnamed<Of<I>, Of<O>, 'action'> => make('action', input, output, o),\n event: <O extends Given>(data: O, o?: Opts): Unnamed<undefined, Of<O>, 'event'> => make('event', undefined, data, o),\n}\n\n/** The source's data (an event's, or an action's result) is the target action's input, or the action takes anything. */\nexport function fits(source: Pick<Op, 'output'>, action: Pick<Op, 'input'>): boolean {\n if (!source.output || !action.input) return false\n return source.output.hash === action.input.hash || canonicalSchema(action.input.schema) === '{}'\n}\n",
|
|
7
|
+
"/**\n * Coordinates: typed, layered names for what a contract or a provider defines, and for a running instance. Each is a\n * frozen value whose `toString()` is the string form saved in deployments; `Coord.parse(kind, s)` reads one back.\n *\n * const kv = Coord.namespace('example.kv') // an author's namespace\n * const store = kv.interfaceId('KeyValueStore') // example.kv.KeyValueStore\n * const mem = kv.implementationId('memory') // example.kv/memory\n * Coord.port(store, 'get') // example.kv.KeyValueStore/get\n * const main = Coord.runtime('main') // main\n * Coord.pod(mem, main, 'store') // example.kv/memory@main/store\n */\nexport type Namespace = {\n readonly kind: 'namespace'\n readonly name: string\n interfaceId(name: string): InterfaceCoord\n implementationId(name: string): ImplCoord\n}\nexport type InterfaceCoord = { readonly kind: 'interface'; readonly ns: Namespace; readonly name: string }\nexport type ImplCoord = { readonly kind: 'implementation'; readonly ns: Namespace; readonly name: string }\nexport type PortCoord = { readonly kind: 'port'; readonly interface: InterfaceCoord; readonly op: string }\n/** A runtime, by its id: the same id `runtimes` keys and events carry as a plain string. */\nexport type RuntimeCoord = { readonly kind: 'runtime'; readonly id: string }\nexport type PodCoord = { readonly kind: 'pod'; readonly implementation: ImplCoord; readonly runtime: RuntimeCoord; readonly pod: string }\ntype Kinds = { namespace: Namespace; interface: InterfaceCoord; implementation: ImplCoord; port: PortCoord; runtime: RuntimeCoord; pod: PodCoord }\n\nconst NS = /^[a-zA-Z][a-zA-Z0-9-]*([./][a-zA-Z0-9-]+)*$/\nconst NAME = /^[a-zA-Z0-9-]+$/\nconst ID = /^[^/@\\s#\\x00-\\x1f\\x7f]{1,64}$/ // a runtime id (the id rule, and no `@`)\nconst POD = /^[^/@.\\s#\\x00-\\x1f\\x7f]{1,64}$/ // a pod name: also no `.`\n\nconst check = (ok: boolean, what: string, v: string) => { if (!ok) throw new Error(`bad ${what} ${JSON.stringify(v)}`) }\n/** A frozen coordinate: its string (and its JSON) is the saved form. */\nconst value = <T extends object>(v: T, text: string): T => Object.freeze(Object.assign(v, { toString: () => text, toJSON: () => text }))\n\nfunction namespace(name: string): Namespace {\n check(NS.test(name), 'namespace', name)\n const ns: Namespace = value({\n kind: 'namespace' as const, name,\n interfaceId: (n: string) => { check(NAME.test(n), 'name', n); return value({ kind: 'interface' as const, ns, name: n }, `${name}.${n}`) },\n implementationId: (n: string) => { check(NAME.test(n), 'name', n); return value({ kind: 'implementation' as const, ns, name: n }, `${name}/${n}`) },\n }, name)\n return ns\n}\n\nfunction port(i: InterfaceCoord, op: string): PortCoord {\n check(NAME.test(op), 'op name', op)\n return value({ kind: 'port' as const, interface: i, op }, `${i}/${op}`)\n}\n\nfunction runtime(id: string): RuntimeCoord {\n check(ID.test(id), 'runtime', id)\n return value({ kind: 'runtime' as const, id }, id)\n}\n\nfunction pod(implementation: ImplCoord, runtime: RuntimeCoord, name: string): PodCoord {\n check(POD.test(name), 'pod', name)\n return value({ kind: 'pod' as const, implementation, runtime, pod: name }, `${implementation}@${runtime}/${name}`)\n}\n\n/** `s` split at the last `sep`, or nothing. */\nconst cut = (s: string, sep: string): [string, string] | undefined => {\n const at = s.lastIndexOf(sep)\n return at > 0 ? [s.slice(0, at), s.slice(at + 1)] : undefined\n}\n\nfunction read<K extends keyof Kinds>(kind: K, s: string): Kinds[K] {\n const bad = (): never => { throw new Error(`bad ${kind} coordinate ${JSON.stringify(s)}`) }\n const attempt = (f: () => Kinds[keyof Kinds]) => { try { return f() } catch { return bad() } }\n switch (kind) {\n case 'namespace': return attempt(() => namespace(s)) as Kinds[K]\n case 'interface': { const [ns, n] = cut(s, '.') ?? bad(); return attempt(() => namespace(ns).interfaceId(n)) as Kinds[K] }\n case 'implementation': { const [ns, n] = cut(s, '/') ?? bad(); return attempt(() => namespace(ns).implementationId(n)) as Kinds[K] }\n case 'port': { const [i, op] = cut(s, '/') ?? bad(); return attempt(() => port(read('interface', i), op)) as Kinds[K] }\n case 'runtime': return attempt(() => runtime(s)) as Kinds[K]\n default: {\n const at = s.indexOf('@'), slash = s.indexOf('/', at)\n if (at < 0 || slash < 0) bad()\n return attempt(() => pod(read('implementation', s.slice(0, at)), runtime(s.slice(at + 1, slash)), s.slice(slash + 1))) as Kinds[K]\n }\n }\n}\n\n/** Layer 1's coordinates (the package's `Coord` adds a namespace's building methods, in provider.ts): `Coord.namespace(ns)`, `Coord.port(interface, op)`, `Coord.runtime(id)`, `Coord.pod(implementation, runtime, pod)`, `Coord.parse(kind, s)`. */\nexport const Coord = { namespace, port, runtime, pod, parse: read }\n",
|
|
7
8
|
"/**\n * NanoResult: the value-or-Fail result every platform call returns instead of throwing.\n *\n * const r = await client.get('k') // NanoResult<string>\n * if (!r.ok) console.log(r.fail.type) // 'denied', 'timeout', ...\n */\nexport type FailType =\n | 'threw' | 'timeout' | 'denied' | 'invalid-input' | 'invalid-output' | 'unknown-op' | 'not-unique' | 'not-found'\n\nexport type Fail = { type: FailType; reason: string; coord?: string }\nexport type NanoResult<T> = { ok: true; value: T } | { ok: false; fail: Fail }\n\nexport const success = <T>(value: T): NanoResult<T> => ({ ok: true, value })\n\nexport const failure = (type: FailType, reason: string, coord?: string): NanoResult<never> => ({\n ok: false,\n fail: coord === undefined ? { type, reason } : { type, reason, coord },\n})\n\nexport function isNanoResult(v: unknown): v is NanoResult<unknown> {\n if (v === null || typeof v !== 'object') return false\n const r = v as { ok?: unknown; fail?: { type?: unknown; reason?: unknown } | null }\n if (r.ok === true) return 'value' in r\n return r.ok === false && typeof r.fail?.type === 'string' && typeof r.fail.reason === 'string'\n}\n",
|
|
8
|
-
"/**\n * Plain TypeScript on both sides of nano (not exported from the package): a plain object's methods become an\n * interface's handlers, and a client becomes a plain object again (`Interface.Type`).\n *\n * provide(KV, handlers(KV, inMemory())) // a value is success (nothing is null), a throw is threw\n * const store = plain<KV>(KV, () => ctx.one(KV)) // await store.get('a'): a Fail throws an Error carrying it\n */\nimport { provide, type Handlers, type Provided, type Source } from './implementation.ts'\nimport { port, type Interface } from './iface.ts'\nimport type { Op } from './op.ts'\nimport { failure, success, type Fail, type NanoResult } from './result.ts'\n\ntype Call = (input: unknown) => Promise<NanoResult<unknown>>\n\n/** Each action of `i` calls the method of the same name: its value is `success` (nothing is `null`), a throw is `threw`. */\nexport function handlers<I extends Interface>(i: I, obj: object): Handlers<I> {\n const methods = obj as Record<string, (input: unknown) => unknown>\n const out: Record<string, Call> = {}\n for (const o of Object.values(i.ops)) {\n if (o.kind !== 'action' || typeof methods[o.name] !== 'function') continue\n out[o.name] = async input => {\n try { return success((await methods[o.name]!.call(obj, input)) ?? null) }\n catch (e) { // a Fail thrown by a plain caller below (err.fail) passes through as it is\n const fail = (e as { fail?: Fail } | null)?.fail\n return fail ? { ok: false, fail } : failure('threw', e instanceof Error ? e.message : String(e))\n }\n }\n }\n return out as Handlers<I>\n}\n\n/** What `plain` reads at each use: the client's calls, and its emissions of an op (`on`, or the host's `subscribe`). */\ntype Reached = { call: object; on(op: Op): AsyncIterable<{ output: unknown }> }\n\n/** An `Error` carrying `fail` (`err.fail`): how nano throws a `Fail` wherever it throws one. */\nexport const thrown = (fail: Fail) => Object.assign(new Error(`${fail.type}: ${fail.reason}`), { fail })\n\n/** A plain object over a client, resolved on every call (so a rewired edge is followed): a `Fail` throws an Error carrying\n * it. An event of `i` is a method giving the `output`s emitted from the call on (it connects at the call; see iterate.ts). */\nexport function plain<T>(i: Interface | undefined, client: () => NanoResult<Reached>): T {\n return new Proxy({}, {\n get: (_, name) => {\n if (typeof name !== 'string' || name === 'then') return undefined\n const ev = i?.ops[name]?.kind === 'event' ? i.ops[name] : undefined\n if (ev) return () => { // connected now, at the call: see iterate.ts\n const c = client()\n if (!c.ok) throw thrown(c.fail)\n const emissions = c.value.on(ev)\n return { async *[Symbol.asyncIterator]() { for await (const e of emissions) yield e.output } }\n }\n return async (input?: unknown) => {\n const c = client()\n if (!c.ok) throw thrown(c.fail)\n const r = await (c.value.call as Record<string, Call>)[name]!(input ?? null)\n if (r.ok) return r.value\n throw thrown(r.fail)\n }\n },\n }) as T\n}\n\n/** A plain object for `i` as a part: its actions' methods as handlers, its events' methods as sources. */\nexport function lift(i: Interface, obj: object): Provided {\n const methods = obj as Record<string, unknown>, sources = new Map<string, Source>()\n for (const o of Object.values(i.ops)) {\n const m = methods[o.name]\n if (o.kind === 'event' && typeof m === 'function') sources.set(port(i, o), { op: o, run: () => m.call(obj) as AsyncIterable<unknown> })\n }\n return { ...provide(i, handlers(i, obj)), sources }\n}\n",
|
|
9
|
-
"/**\n * Selectors: which call subscriptions a call may use — an interface, or data narrowing by tags, implementation,\n * provider, or the runtime the subscription is in.\n *\n * selectorData(DB) //
|
|
10
|
-
"/**\n * Implementations: code that provides whole interfaces. Its factory `make(ctx, config)` runs once per build and returns\n * the handlers by port; state is whatever the factory closes over
|
|
11
|
-
"/**\n * Interfaces: a coordinate plus a set of ops, each named by its key (its coordinate the hash of that name and its\n * schemas), indexed by name and by op coord. A port is one op as offered by one interface, written readably.\n *\n * const db = Interface.define('acme
|
|
12
|
-
"/**\n * Coordinates: typed, layered names for what a contract or a provider defines, and for a running instance. Each is a\n * frozen value whose `toString()` is the string form saved in deployments; `Coord.parse(kind, s)` reads one back.\n *\n * const kv = Coord.namespace('example.kv') // an author's namespace\n * const store = kv.interfaceId('KeyValueStore') // example.kv.KeyValueStore\n * const mem = kv.implementationId('memory') // example.kv/memory\n * Coord.port(store, 'get') // example.kv.KeyValueStore/get\n * Coord.pod(mem, 'main', 'store') // example.kv/memory@main/store\n */\nexport type Namespace = {\n readonly kind: 'namespace'\n readonly name: string\n interfaceId(name: string): InterfaceCoord\n implementationId(name: string): ImplCoord\n}\nexport type InterfaceCoord = { readonly kind: 'interface'; readonly ns: Namespace; readonly name: string }\nexport type ImplCoord = { readonly kind: 'implementation'; readonly ns: Namespace; readonly name: string }\nexport type PortCoord = { readonly kind: 'port'; readonly interface: InterfaceCoord; readonly op: string }\nexport type PodCoord = { readonly kind: 'pod'; readonly implementation: ImplCoord; readonly runtime: string; readonly pod: string }\ntype Kinds = { namespace: Namespace; interface: InterfaceCoord; implementation: ImplCoord; port: PortCoord; pod: PodCoord }\n\nconst NS = /^[a-zA-Z][a-zA-Z0-9-]*([./][a-zA-Z0-9-]+)*$/\nconst NAME = /^[a-zA-Z0-9-]+$/\nconst ID = /^[^/@\\s#\\x00-\\x1f\\x7f]{1,64}$/ // a runtime id (the id rule, and no `@`)\nconst POD = /^[^/@.\\s#\\x00-\\x1f\\x7f]{1,64}$/ // a pod name: also no `.`\n\nconst check = (ok: boolean, what: string, v: string) => { if (!ok) throw new Error(`bad ${what} ${JSON.stringify(v)}`) }\nconst value = <T extends object>(v: T, text: string): T => Object.freeze(Object.assign(v, { toString: () => text }))\n\nfunction namespace(name: string): Namespace {\n check(NS.test(name), 'namespace', name)\n const ns: Namespace = value({\n kind: 'namespace' as const, name,\n interfaceId: (n: string) => { check(NAME.test(n), 'name', n); return value({ kind: 'interface' as const, ns, name: n }, `${name}.${n}`) },\n implementationId: (n: string) => { check(NAME.test(n), 'name', n); return value({ kind: 'implementation' as const, ns, name: n }, `${name}/${n}`) },\n }, name)\n return ns\n}\n\nfunction port(i: InterfaceCoord, op: string): PortCoord {\n check(NAME.test(op), 'op name', op)\n return value({ kind: 'port' as const, interface: i, op }, `${i}/${op}`)\n}\n\nfunction pod(implementation: ImplCoord, runtime: string, name: string): PodCoord {\n check(ID.test(runtime), 'runtime', runtime)\n check(POD.test(name), 'pod', name)\n return value({ kind: 'pod' as const, implementation, runtime, pod: name }, `${implementation}@${runtime}/${name}`)\n}\n\n/** `s` split at the last `sep`, or nothing. */\nconst cut = (s: string, sep: string): [string, string] | undefined => {\n const at = s.lastIndexOf(sep)\n return at > 0 ? [s.slice(0, at), s.slice(at + 1)] : undefined\n}\n\nfunction read<K extends keyof Kinds>(kind: K, s: string): Kinds[K] {\n const bad = (): never => { throw new Error(`bad ${kind} coordinate ${JSON.stringify(s)}`) }\n const attempt = (f: () => Kinds[keyof Kinds]) => { try { return f() } catch { return bad() } }\n switch (kind) {\n case 'namespace': return attempt(() => namespace(s)) as Kinds[K]\n case 'interface': { const [ns, n] = cut(s, '.') ?? bad(); return attempt(() => namespace(ns).interfaceId(n)) as Kinds[K] }\n case 'implementation': { const [ns, n] = cut(s, '/') ?? bad(); return attempt(() => namespace(ns).implementationId(n)) as Kinds[K] }\n case 'port': { const [i, op] = cut(s, '/') ?? bad(); return attempt(() => port(read('interface', i), op)) as Kinds[K] }\n default: {\n const at = s.indexOf('@'), slash = s.indexOf('/', at)\n if (at < 0 || slash < 0) bad()\n return attempt(() => pod(read('implementation', s.slice(0, at)), s.slice(at + 1, slash), s.slice(slash + 1))) as Kinds[K]\n }\n }\n}\n\n/** Layer 1's coordinates (the package's `Coord` adds a namespace's building methods, in provider.ts): `Coord.namespace(ns)`, `Coord.port(interface, op)`, `Coord.pod(implementation, runtime, pod)`, `Coord.parse(kind, s)`. */\nexport const Coord = { namespace, port, pod, parse: read }\n",
|
|
9
|
+
"/**\n * Plain TypeScript on both sides of nano (not exported from the package): a plain object's methods become an\n * interface's handlers, and a client becomes a plain object again (`Interface.Type`).\n *\n * provide(KV, handlers(KV, inMemory())) // a value is success (nothing is null), a throw is threw\n * const store = plain<KV>(KV, () => ctx.one(KV)) // await store.get('a'): a Fail throws an Error carrying it\n */\nimport { provide, type Handlers, type Provided, type Source } from './implementation.ts'\nimport { port, type Interface } from './iface.ts'\nimport type { Op } from './op.ts'\nimport { failure, success, type Fail, type NanoResult } from './result.ts'\n\ntype Call = (input: unknown, ctx?: unknown) => Promise<NanoResult<unknown>>\n\n/** Each action of `i` calls the method of the same name (with the invocation context): its value is `success` (nothing is `null`), a throw is `threw`. */\nexport function handlers<I extends Interface>(i: I, obj: object): Handlers<I> {\n const methods = obj as Record<string, (input: unknown, ctx?: unknown) => unknown>\n const out: Record<string, Call> = {}\n for (const o of Object.values(i.ops)) {\n if (o.kind !== 'action' || typeof methods[o.name] !== 'function') continue\n out[o.name] = async (input, ctx) => {\n try { return success((await methods[o.name]!.call(obj, input, ctx)) ?? null) }\n catch (e) { // a Fail thrown by a plain caller below (err.fail) passes through as it is\n const fail = (e as { fail?: Fail } | null)?.fail\n return fail ? { ok: false, fail } : failure('threw', e instanceof Error ? e.message : String(e))\n }\n }\n }\n return out as Handlers<I>\n}\n\n/** What `plain` reads at each use: the client's calls, and its emissions of an op (`on`, or the host's `subscribe`). */\ntype Reached = { call: object; on(op: Op): AsyncIterable<{ output: unknown }> }\n\n/** An `Error` carrying `fail` (`err.fail`): how nano throws a `Fail` wherever it throws one. */\nexport const thrown = (fail: Fail) => Object.assign(new Error(`${fail.type}: ${fail.reason}`), { fail })\n\n/** A plain object over a client, resolved on every call (so a rewired edge is followed): a `Fail` throws an Error carrying\n * it. An event of `i` is a method giving the `output`s emitted from the call on (it connects at the call; see iterate.ts). */\nexport function plain<T>(i: Interface | undefined, client: () => NanoResult<Reached>): T {\n return new Proxy({}, {\n get: (_, name) => {\n if (typeof name !== 'string' || name === 'then') return undefined\n const ev = i?.ops[name]?.kind === 'event' ? i.ops[name] : undefined\n if (ev) return () => { // connected now, at the call: see iterate.ts\n const c = client()\n if (!c.ok) throw thrown(c.fail)\n const emissions = c.value.on(ev)\n return { async *[Symbol.asyncIterator]() { for await (const e of emissions) yield e.output } }\n }\n return async (input?: unknown) => {\n const c = client()\n if (!c.ok) throw thrown(c.fail)\n const r = await (c.value.call as Record<string, Call>)[name]!(input ?? null)\n if (r.ok) return r.value\n throw thrown(r.fail)\n }\n },\n }) as T\n}\n\n/** A plain object for `i` as a part: its actions' methods as handlers, its events' methods as sources. */\nexport function lift(i: Interface, obj: object): Provided {\n const methods = obj as Record<string, unknown>, sources = new Map<string, Source>()\n for (const o of Object.values(i.ops)) {\n const m = methods[o.name]\n if (o.kind === 'event' && typeof m === 'function') sources.set(port(i, o), { op: o, run: () => m.call(obj) as AsyncIterable<unknown> })\n }\n return { ...provide(i, handlers(i, obj)), sources }\n}\n",
|
|
10
|
+
"/**\n * Selectors: which call subscriptions a call may use — an interface, or data narrowing by tags, implementation,\n * provider, or the runtime the subscription is in.\n *\n * selectorData(DB) // its `implements` is DB's InterfaceCoord, acme.DB\n * matches({ implements: acme.interfaceId('DB'), tags: ['primary'] }, target)\n * Selector.of(DB, { runtime: Coord.runtime('v2') }) // still DB (typed clients survive), plus implements and runtime\n *\n * The fields are coordinates; written out (JSON, the registry manifest) each is its string.\n */\nimport { Coord, type ImplCoord, type InterfaceCoord, type Namespace, type RuntimeCoord } from './coord.ts'\nimport type { Interface } from './iface.ts'\n\nexport type SelectorData = { implements?: InterfaceCoord; tags?: string[]; implementation?: ImplCoord; provider?: Namespace; runtime?: RuntimeCoord }\nexport type Selector = Interface | SelectorData\n\n/** A pod as reached over one call subscription: its name, the runtime of that subscription, and what it is. */\nexport type Target = {\n name: string\n runtime: string\n implementation: string\n provider: string\n provides: ReadonlySet<string>\n tags: ReadonlySet<string>\n}\n\nconst isInterface = (s: Selector): s is Interface => 'byCoord' in s\n\n/** An interface (possibly narrowed by `Selector.of`) or plain selector data, as plain data. */\nexport function selectorData(s: Selector): SelectorData {\n if (!isInterface(s)) return s\n const { tags, implementation, provider, runtime } = s as SelectorData\n return {\n implements: Coord.parse('interface', s.coord), ...(tags && { tags }), ...(implementation !== undefined && { implementation }),\n ...(provider !== undefined && { provider }), ...(runtime !== undefined && { runtime }),\n }\n}\n\n/** An interface narrowed by tags, implementation, provider or runtime; still the interface, so a call's client stays typed. */\nconst of = <I extends Interface>(i: I, s: Omit<SelectorData, 'implements'> = {}): I & SelectorData => ({ ...i, ...s, implements: Coord.parse('interface', i.coord) })\n\n/** Every given field holds; all tags must be present on the target. */\nexport const matches = (s: SelectorData, t: Target): boolean =>\n (s.implements === undefined || t.provides.has(String(s.implements))) &&\n (s.tags ?? []).every(tag => t.tags.has(tag)) &&\n (s.implementation === undefined || String(s.implementation) === t.implementation) &&\n (s.provider === undefined || String(s.provider) === t.provider) &&\n (s.runtime === undefined || String(s.runtime) === t.runtime)\n\n/** `Selector.of(interface, narrowing?)`. */\nexport const Selector = { of }\n",
|
|
11
|
+
"/**\n * Implementations: code that provides whole interfaces. Its factory `make(ctx, config)` runs once per build and returns\n * the handlers by port; state is whatever the factory closes over. A handler takes its input and the invocation's\n * context (`ctx.callingOp`, `ctx.deps`): calls through it continue the invoking message's chain.\n *\n * const memDb = Implementation.define('acme/mem/db', {\n * provides: [DB],\n * make: (ctx, config) => { const m = new Map(); return [provide(DB, { get: async key => success(m.get(key)) })] },\n * })\n * Implementation.define('acme/mem/db', { provides: [DB], dependencies: { log: Log },\n * make: ({ deps }) => ({ get: async key => { await deps.log.record(key); return null } }) }) // one interface: a plain object\n */\nimport { COORD, port, type Client, type Interface } from './iface.ts'\n\nconst isInterface = (s: Selector) => ('ops' in s ? s as Interface : undefined)\nimport type { NanoContext } from './context.ts'\nimport type { ImplCoord } from './coord.ts'\nimport type { Op } from './op.ts'\nimport type { NanoResult } from './result.ts'\nimport type { SchemaDef } from './schema.ts'\nimport { lift, plain } from './plain.ts'\nimport { selectorData, type Selector, type SelectorData } from './selector.ts'\n\n/** A handler: its input, and the invocation's context (`callingOp`; its calls continue the invoking message's chain). */\nexport type Handler = (input: unknown, ctx: Omit<NanoContext, 'deps'>) => Promise<NanoResult<unknown>>\n\n/** One handler per action, typed as the Client's call, with the invocation's context. Events have none: they are published. */\nexport type Handlers<I extends Interface> = { [K in keyof Client<I>]: (input: Parameters<Client<I>[K]>[0], ctx: NanoContext) => ReturnType<Client<I>[K]> }\n\n/** A source: an event's method on a plain object, which the application runs once per build (`application/sources.ts`). */\nexport type Source = { readonly op: Op; run(): AsyncIterable<unknown> }\n\n/** One interface's handlers and sources, keyed by port. Opaque: only `implementation` reads it. */\nexport type Provided = { readonly iface: Interface; readonly handlers: ReadonlyMap<string, Handler>; readonly sources?: ReadonlyMap<string, Source> }\n\nexport function provide<I extends Interface>(i: I, handlers: Handlers<I>): Provided {\n const byName = handlers as unknown as Record<string, Handler | undefined>\n const out = new Map<string, Handler>()\n for (const o of Object.values(i.ops)) {\n const h = o.kind === 'event' ? undefined : byName[o.name]\n if (h) out.set(port(i, o), h)\n }\n return { iface: i, handlers: out }\n}\n\nexport type Implementation = {\n readonly coord: string\n readonly provider: string\n readonly provides: readonly Interface[]\n readonly dependencies: Readonly<Record<string, SelectorData>>\n readonly config?: SchemaDef\n readonly description?: string\n /** Declared calls: an op of a provided interface, by name, to the `'role.op'` dependency ops it may call. */\n readonly calls: Readonly<Record<string, readonly string[]>>\n /** `ctx` without `deps`: they are made here from `dependencies`. It gives the build's handlers (by port) and its\n * sources (by port), which the application starts, publishes, stops at close, and traces when they throw. */\n make(ctx: Omit<NanoContext, 'deps'>, config: unknown): Promise<{ handlers: ReadonlyMap<string, Handler>; sources: ReadonlyMap<string, Source> }>\n}\n\n/** A plain object for `I`: its event (source) methods are optional, as an event may be published through `ctx`. */\ntype Plain<I extends Interface, D extends Record<string, Selector>, T = Interface.Type<I>> =\n { [K in keyof T as I['ops'][K & string]['kind'] extends 'event' ? never : K]:\n T[K] extends (...a: infer A) => infer R ? (input: A extends [infer X] ? X : null, ctx: NanoContext<D>) => R : never } &\n { [K in keyof T as I['ops'][K & string]['kind'] extends 'event' ? K : never]?: T[K] }\n\n/** `provide(...)` parts, or for a single interface its plain object (lifted by `handlers`; sources published). */\ntype Made<P, D extends Record<string, Selector>> = Provided[] | (P extends readonly [infer One extends Interface] ? Plain<One, D> : never)\n\ntype OpName<I> = I extends Interface ? keyof I['ops'] & string : never\n/** A role's ops: its interface's, or any `Op` when the role is selector data. */\ntype OpOf<S> = S extends Interface ? S['ops'][keyof S['ops']] : Op\n\ntype Spec<P extends readonly Interface[], D extends Record<string, Selector>> = {\n provides: [...P]\n dependencies?: D\n config?: SchemaDef\n description?: string\n calls?: { [K in OpName<P[number]>]?: { [R in keyof D]?: OpOf<D[R]>[] } }\n make(ctx: NanoContext<D>, config: any): Made<P, D> | Promise<Made<P, D>>\n}\n\nfunction define<const P extends readonly Interface[], D extends Record<string, Selector> = {}>(at: string | ImplCoord, spec: Spec<P, D>): Implementation {\n const coord = String(at)\n const slash = coord.lastIndexOf('/')\n if (!COORD.test(coord) || slash < 0) throw new Error(`bad implementation coordinate ${coord}`)\n const calls: Record<string, string[]> = {}\n for (const [op, byRole] of Object.entries(spec.calls ?? {}) as [string, Record<string, Op[]>][]) {\n if (!spec.provides.some(i => op in i.ops)) throw new Error(`${coord}: ${op} is not an op this implementation provides`)\n calls[op] = Object.entries(byRole).flatMap(([role, ops]) => {\n const dep = (spec.dependencies as Record<string, Selector> | undefined)?.[role]\n if (!dep) throw new Error(`${coord}: ${role} is not a dependency`)\n const iface = isInterface(dep)\n return ops.map(o => {\n if (iface && !iface.byCoord.has(o.coord)) throw new Error(`${coord}: ${iface.coord} has no op ${o.name}`)\n return `${role}.${o.name}`\n })\n })\n }\n return {\n coord,\n calls,\n provider: coord.slice(0, slash),\n provides: spec.provides,\n dependencies: Object.fromEntries(Object.entries(spec.dependencies ?? {}).map(([role, s]) => [role, selectorData(s)])),\n ...(spec.config && { config: spec.config }),\n ...(spec.description !== undefined && { description: spec.description }),\n async make(base, config) {\n // The factory's ctx and each invocation's alike: `deps` over that context's `one`.\n const withDeps = (c: Omit<NanoContext, 'deps'>) => Object.assign(Object.create(c), { deps: Object.fromEntries(Object.keys(spec.dependencies ?? {}).map(role =>\n [role, plain(isInterface(spec.dependencies![role]), () => c.one(selectorData(spec.dependencies![role]!)))])) }) as NanoContext<D>\n const ctx = withDeps(base)\n const made = await spec.make(ctx, config)\n if (!Array.isArray(made) && spec.provides.length !== 1) throw new Error(`${coord}: a plain object provides exactly one interface`)\n const parts = Array.isArray(made) ? made : [lift(spec.provides[0]!, made as object)]\n const declared = new Set(spec.provides.map(i => i.coord))\n const given = new Set<string>()\n const out = new Map<string, Handler>(), sources = new Map<string, Source>()\n for (const part of parts) {\n const ic = part.iface.coord\n if (!declared.has(ic)) throw new Error(`${coord}: ${ic} is not provided`)\n if (given.has(ic)) throw new Error(`${coord}: ${ic} is provided twice`)\n given.add(ic)\n for (const [p, h] of part.handlers) out.set(p, (input, inv) => h(input, withDeps(inv)))\n for (const [p, src] of part.sources ?? []) sources.set(p, src)\n }\n for (const i of spec.provides)\n for (const o of Object.values(i.ops))\n if (o.kind !== 'event' && !out.has(port(i, o))) throw new Error(`${coord}: missing ${port(i, o)}`)\n return { handlers: out, sources }\n },\n }\n}\n\n/** `Implementation.define(coord, spec)`. */\nexport const Implementation = { define }\n",
|
|
12
|
+
"/**\n * Interfaces: a coordinate plus a set of ops, each named by its key (its coordinate the hash of that name and its\n * schemas), indexed by name and by op coord. A port is one op as offered by one interface, written readably.\n *\n * const db = Interface.define('acme.Db', { get: Op.action(Key, Value) })\n * port(db, db.ops.get) // 'acme.Db/get'\n *\n * An implementation starts from the contract it provides: `api.impl(coord)` is a builder (`needs`, `config`, each\n * optional, each typing the next step; `description(text)` too; `make` at every step; `create` all at once; `satisfies` for another interface\n * from the same build), ending in `Implementation.define`.\n *\n * db.impl(acme.implementationId('mem')).needs({ log: Log }).make(({ deps }) => memDb(deps.log))\n */\nimport type { Static, TSchema } from 'typebox'\nimport type { NanoContext } from './context.ts'\nimport { Coord, type ImplCoord, type InterfaceCoord } from './coord.ts'\nimport { Implementation } from './implementation.ts'\nimport { lift } from './plain.ts'\nimport type { Op } from './op.ts'\nimport { canonical, hashOf, Schema, type SchemaDef } from './schema.ts'\nimport type { NanoResult } from './result.ts'\nimport type { Selector } from './selector.ts'\n\nexport type Interface<Ops extends Record<string, Op> = Record<string, Op>> = {\n readonly coord: string\n readonly ops: Ops\n readonly byCoord: ReadonlyMap<string, Op>\n /** A builder of an implementation providing this interface, at `coord` (in the provider's namespace). */\n impl<Self extends Interface>(this: Self, coord: string | ImplCoord): Builder<Self, {}, undefined>\n}\n\ntype Deps = Record<string, Selector>\n/** What `make` gets: the pod's context, and its config. */\ntype Ctx<D extends Deps, C> = NanoContext<D> & { readonly config: C }\ntype Lift<I extends Interface, D extends Deps, C> = (ctx: Ctx<D, C>) => Interface.Type<I> | Promise<Interface.Type<I>>\ntype Built<D extends Deps, C> = Implementation & { satisfies<J extends Interface>(j: J, make: Lift<J, D, C>): Built<D, C> }\ntype Cfg<S> = S extends TSchema ? Static<S> : undefined\ntype Builder<I extends Interface, D extends Deps, C> = {\n needs<E extends Deps>(deps: E): Builder<I, E, C>\n config<S extends TSchema>(schema: S): Builder<I, D, Static<S>>\n description(text: string): Builder<I, D, C>\n make(fn: Lift<I, D, C>): Built<D, C>\n create<E extends Deps = {}, S extends TSchema | undefined = undefined>(spec: { needs?: E; config?: S; description?: string; make: Lift<I, E, Cfg<S>> }): Built<E, Cfg<S>>\n}\n\nconst asDef = (s: TSchema): SchemaDef => ('hash' in s && 'check' in s ? s as SchemaDef : Schema.define(s))\ntype AnyLift = (ctx: any) => object | Promise<object>\n\ntype Steps = { deps: Deps; config?: SchemaDef; description?: string }\n\nfunction builder(api: Interface, at: string | ImplCoord, steps: Steps = { deps: {} }): Builder<Interface, Deps, unknown> {\n const { deps, config, description } = steps\n const build = (lifts: [Interface, AnyLift][]): Built<Deps, unknown> => Object.assign(Implementation.define(at, {\n provides: lifts.map(([i]) => i),\n dependencies: deps,\n ...(config && { config }),\n ...(description !== undefined && { description }),\n async make(ctx, cfg) {\n const c = Object.assign(Object.create(ctx), { config: cfg })\n const parts = []\n for (const [i, f] of lifts) {\n parts.push(lift(i, await f(c)))\n }\n return parts\n },\n }), { satisfies: (j: Interface, f: AnyLift) => build([...lifts, [j, f]]) })\n return {\n needs: d => builder(api, at, { ...steps, deps: d }),\n config: s => builder(api, at, { ...steps, config: asDef(s) }),\n description: text => builder(api, at, { ...steps, description: text }),\n make: f => build([[api, f]]),\n create: spec => builder(api, at, {\n deps: spec.needs ?? {}, ...(spec.config && { config: asDef(spec.config) }), ...(spec.description !== undefined && { description: spec.description }),\n }).make(spec.make as never),\n } as Builder<Interface, Deps, unknown>\n}\n\nexport const COORD = /^[a-zA-Z][a-zA-Z0-9-]*([./][a-zA-Z0-9-]+)+$/\n\n/** A port: `<interface>/<op name>`. Handlers are keyed by it; op hashes only check that two ports fit. */\nexport const port = (i: Interface, o: Op): string => `${i.coord}/${o.name}`\n\ntype Unnamed = Omit<Op, 'name' | 'coord'>\ntype Named<U extends Record<string, Unnamed>> = { [K in keyof U]: U[K] & { readonly name: K & string; readonly coord: string } }\n\nfunction define<U extends Record<string, Unnamed>>(at: string | InterfaceCoord, unnamed: U): Interface<Named<U>> {\n const coord = String(at)\n try { Coord.parse('interface', coord) } catch { throw new Error(`bad interface coordinate ${coord}`) } // `ns.Name` only\n const ops = Object.fromEntries(Object.entries(unnamed).map(([name, o]) =>\n [name, { ...o, name, coord: hashOf(canonical({ name, input: o.input?.hash ?? null, output: o.output!.hash })) }])) as Named<U>\n const api: Interface<Named<U>> = { coord, ops, byCoord: new Map(Object.values(ops).map(o => [o.coord, o])), impl: at => builder(api, at) as never }\n return api\n}\n\ntype Data<D> = NonNullable<D> extends { schema: infer S extends TSchema } ? Static<S> : never\n\n/** Typed caller for an interface: each action is an async function. Events have none: they are published. */\nexport type Client<I extends Interface> = {\n [K in keyof I['ops'] as I['ops'][K]['kind'] extends 'event' ? never : K]: (input: Data<I['ops'][K]['input']>) => Promise<NanoResult<Data<I['ops'][K]['output']>>>\n}\n\ntype Ops<I extends Interface> = I['ops']\ntype In<I extends Interface, K extends keyof Ops<I>> = Data<Ops<I>[K]['input']>\ntype Out<I extends Interface, K extends keyof Ops<I>> = Data<Ops<I>[K]['output']>\n\n/** `Interface.define(coord, ops)`. */\nexport const Interface = { define }\n\nexport declare namespace Interface {\n /** The plain object an interface describes: an input that is only `null` is no argument, an output that is only\n * `null` is `void`. An event is a source: a method giving its data as an AsyncIterable. */\n type Type<I extends Interface> = {\n [K in keyof Ops<I>]: Ops<I>[K]['kind'] extends 'event' ? () => AsyncIterable<Out<I, K>>\n : (...args: [In<I, K>] extends [null] ? [] : [input: In<I, K>]) => Promise<[Out<I, K>] extends [null] ? void : Out<I, K>>\n }\n}\n",
|
|
13
13
|
"/**\n * Providers: a namespace of implementations, plus free-form metadata.\n *\n * const mem = Provider.define('acme/mem', [memDb, memLog], { author: 'acme' })\n * mem.implementations.get('acme/mem/db') // memDb\n *\n * The package's `Coord` is layer 1's with a namespace that also builds (layer 2): `ns.interface(name, ops)` is\n * `Interface.define(ns.interfaceId(name), ops)` and `ns.provider(impls, meta?)` is `Provider.define(ns, impls, meta)`.\n *\n * const acme = Coord.namespace('acme'); const DB = acme.interface('DB', { get: Op.action(Key, Value) })\n */\nimport { Coord as Pure, type Namespace } from './coord.ts'\nimport { Interface } from './iface.ts'\nimport type { Implementation } from './implementation.ts'\n\nexport type Provider = {\n readonly coord: string\n readonly implementations: ReadonlyMap<string, Implementation>\n readonly meta: Readonly<Record<string, string>>\n}\n\nfunction define(at: string | Namespace, implementations: Implementation[], meta: Record<string, string> = {}): Provider {\n const coord = String(at)\n const byCoord = new Map<string, Implementation>()\n for (const i of implementations) {\n if (i.provider !== coord) throw new Error(`${i.coord} is not under ${coord}`)\n if (byCoord.has(i.coord)) throw new Error(`${i.coord} is listed twice`)\n byCoord.set(i.coord, i)\n }\n return { coord, implementations: byCoord, meta }\n}\n\n/** `Provider.define(ns, implementations, meta?)`: `ns` a `Namespace` or its string. */\nexport const Provider = { define }\n\ntype Ops = Parameters<typeof Interface.define>[1]\nfunction namespace(name: string) {\n const pure = Pure.namespace(name)\n // Its coordinates point back at this namespace, not layer 1's.\n const ns = Object.freeze({\n ...pure,\n // Typed as layer 1's coordinates: their `ns` is this namespace at runtime, but a self-referencing type would be\n // elided to `any` in the emitted .d.ts (and the published types would break).\n interfaceId: (n: string): ReturnType<typeof pure.interfaceId> => Object.freeze({ ...pure.interfaceId(n), ns }),\n implementationId: (n: string): ReturnType<typeof pure.implementationId> => Object.freeze({ ...pure.implementationId(n), ns }),\n interface: <U extends Ops>(n: string, ops: U) => Interface.define<U>(ns.interfaceId(n), ops),\n provider: (implementations: Implementation[], meta?: Record<string, string>) => define(ns, implementations, meta),\n })\n return ns\n}\n\n/** Layer 1's `Coord`, its `namespace` also building interfaces and providers. */\nexport const Coord = { ...Pure, namespace }\n",
|
|
14
|
-
"/**\n * The registry: a pool of providers, answering lookups by coord in O(1) and describing itself as a plain-data manifest.\n *\n * const r = Registry.create()\n * r.add(mem) // NanoResult<void>; fails `invalid-input` on a clash\n * r.implementationsOf('acme
|
|
15
|
-
"/**\n * Policy: the yes/no check a runtime makes before it delivers a message or adds a subscription.\n *\n * const p = Policies.allowAll()\n * p.isAllowed(ask) // { approved: true }\n * PolicyRules([{ allow: 'call', outside: true, to: 'acme.Kv' }, { deny: '*' }]).isAllowed(ask) // first match wins\n */\nimport { Type, type Static } from 'typebox'\nexport type Verdict = { approved: true } | { approved: false; reason: string }\n/** What a policy is asked: a message's envelope. `outside` is true when `from` is not placed in `runtime` (the host, or another runtime's pod). */\nexport type Ask = { runtime: string; kind: 'call' | 'pipe' | 'on' | 'subscribe' | 'unsubscribe' | 'lifecycle'; from: string; to: string; port?: string; outside: boolean; data?: unknown }\nexport type Policy = { isAllowed(ask: Ask): Verdict }\n\nconst ALLOW_ALL: Policy = Object.freeze({ isAllowed: () => ({ approved: true as const }) })\n\n/** `allowAll()` is one shared policy, so saving can tell it apart from a custom one. */\nexport const Policies = {\n allowAll: (): Policy => ALLOW_ALL,\n}\n\nconst Kind = Type.Union([Type.Literal('call'), Type.Literal('pipe'), Type.Literal('on'), Type.Literal('subscribe'), Type.Literal('unsubscribe'), Type.Literal('lifecycle'), Type.Literal('*')])\nconst Kinds = Type.Union([Kind, Type.Array(Kind)])\nconst Match = { from: Type.Optional(Type.String()), toPod: Type.Optional(Type.String()), toInterface: Type.Optional(Type.String()),\n toPort: Type.Optional(Type.String()), outside: Type.Optional(Type.Boolean()) }\n/**\n * A rule: `allow` or `deny` these kinds of message, from a pod or 'host' (`from`), to a target named by its resource\n * type: `toPod` (a pod name), `toInterface` (an interface coordinate: any of its ops), `toPort` (a port coordinate,\n * `iface/op`: that op only). Each field absent or '*' matches anything; all given fields must match.\n */\nexport const Rule = Type.Union([\n Type.Object({ allow: Kinds, ...Match }, { additionalProperties: false }),\n Type.Object({ deny: Kinds, ...Match }, { additionalProperties: false }),\n])\nexport type Rule = Static<typeof Rule>\n\n/** A field matches when absent, `*`, or equal. */\nconst any = (v: string | undefined, x: string | undefined) => v === undefined || v === '*' || v === x\ntype Compiled = { i: number; allow: boolean; kinds: ReadonlySet<string>; r: Rule }\nconst fits = (c: Compiled, a: Ask, iface: string | undefined) =>\n (c.kinds.has('*') || c.kinds.has(a.kind)) && any(c.r.toPod, a.to) && any(c.r.toInterface, iface) && any(c.r.toPort, a.port)\n && (c.r.outside === undefined || c.r.outside === a.outside)\n\n/**\n * The first rule matching the ask decides; none denies (`no rule allows it`); a deny's reason is `rules[i]`.\n * Compiled once: rules are indexed by `from` (a named caller's rules, and those for any caller), so an ask looks only\n * at rules that could match its caller, still in their order.\n */\nexport function PolicyRules(rules: Rule[]): Policy {\n const byFrom = new Map<string, Compiled[]>(), anyFrom: Compiled[] = []\n rules.forEach((r, i) => {\n const c = { i, allow: 'allow' in r, kinds: new Set([('allow' in r ? r.allow : r.deny)].flat()), r }\n if (r.from === undefined || r.from === '*') anyFrom.push(c)\n else { const l = byFrom.get(r.from); if (l) l.push(c); else byFrom.set(r.from, [c]) }\n })\n return { isAllowed: ask => {\n const iface = ask.port?.slice(0, ask.port.lastIndexOf('/'))\n const named = byFrom.get(ask.from) ?? []\n let a = 0, b = 0, hit: Compiled | undefined\n while (!hit && (a < named.length || b < anyFrom.length)) { // both lists in rule order: merge them\n const c = b >= anyFrom.length || (a < named.length && named[a]!.i < anyFrom[b]!.i) ? named[a++]! : anyFrom[b++]!\n if (fits(c, ask, iface)) hit = c\n }\n if (!hit) return { approved: false, reason: 'no rule allows it' }\n return hit.allow ? { approved: true } : { approved: false, reason: `rules[${hit.i}]` }\n } }\n}\n",
|
|
16
|
-
"/**\n *
|
|
17
|
-
"/**\n * Pods:
|
|
18
|
-
"/**\n *
|
|
19
|
-
"/**\n *
|
|
20
|
-
"/**\n *
|
|
14
|
+
"/**\n * The registry: a pool of providers, answering lookups by coord in O(1) and describing itself as a plain-data manifest.\n *\n * const r = Registry.create()\n * r.add(mem) // NanoResult<void>; fails `invalid-input` on a clash\n * r.implementationsOf('acme.Db') // [memDb]\n */\nimport type { Interface } from './iface.ts'\nimport type { Implementation } from './implementation.ts'\nimport type { Op, OpKind } from './op.ts'\nimport type { Provider } from './provider.ts'\nimport { failure, success, type NanoResult } from './result.ts'\nimport type { SelectorData } from './selector.ts'\n\nexport type Manifest = {\n providers: { coord: string; implementations: string[] }[]\n /** Each dependency's selector written out: every coordinate as its string. */\n implementations: { coord: string; provides: string[]; dependencies: Record<string, { [K in keyof SelectorData]: K extends 'tags' ? string[] : string }> }[]\n interfaces: { coord: string; ops: { name: string; kind: OpKind; coord: string; input?: string; output?: string }[] }[]\n}\n\nexport type Registry = {\n add(p: Provider): NanoResult<void>\n manifest(): Manifest\n provider(coord: string): Provider | undefined\n implementation(coord: string): Implementation | undefined\n implementationsOf(ifaceCoord: string): readonly Implementation[]\n interface(coord: string): Interface | undefined\n op(coord: string): Op | undefined\n}\n\nconst opSet = (i: Interface) => [...i.byCoord.keys()].sort().join()\nconst byCoord = (a: { coord: string }, b: { coord: string }) => (a.coord < b.coord ? -1 : a.coord > b.coord ? 1 : 0)\n\nfunction create(): Registry {\n const providers = new Map<string, Provider>()\n const impls = new Map<string, Implementation>()\n const ifaces = new Map<string, Interface>()\n const ops = new Map<string, Op>()\n const implsOf = new Map<string, Implementation[]>()\n\n return {\n add(p) {\n // An implementation's coord fixes its provider and a provider lists each once, so a new provider brings no clashing implementation.\n if (providers.has(p.coord)) return failure('invalid-input', `provider ${p.coord} is already registered`)\n // Check everything before writing anything, so a clash adds nothing.\n const seen = new Map<string, Interface>()\n for (const impl of p.implementations.values()) {\n for (const i of impl.provides) {\n const known = ifaces.get(i.coord) ?? seen.get(i.coord)\n if (known && opSet(known) !== opSet(i)) return failure('invalid-input', `interface ${i.coord} differs`)\n seen.set(i.coord, known ?? i)\n }\n }\n providers.set(p.coord, p)\n for (const impl of p.implementations.values()) {\n impls.set(impl.coord, impl)\n for (const i of impl.provides) {\n if (!ifaces.has(i.coord)) ifaces.set(i.coord, i)\n for (const o of i.byCoord.values()) if (!ops.has(o.coord)) ops.set(o.coord, o)\n implsOf.set(i.coord, [...(implsOf.get(i.coord) ?? []), impl])\n }\n }\n return success(undefined)\n },\n manifest: () => ({\n providers: [...providers.values()].sort(byCoord).map(p => ({ coord: p.coord, implementations: [...p.implementations.keys()].sort() })),\n implementations: [...impls.values()].sort(byCoord).map(i => ({\n coord: i.coord,\n provides: i.provides.map(x => x.coord).sort(),\n dependencies: JSON.parse(JSON.stringify(i.dependencies)), // coordinates write as their strings\n })),\n interfaces: [...ifaces.values()].sort(byCoord).map(i => ({\n coord: i.coord,\n ops: Object.values(i.ops).map(o => ({\n name: o.name, kind: o.kind, coord: o.coord,\n ...(o.input && { input: o.input.hash }),\n ...(o.output && { output: o.output.hash }),\n })),\n })),\n }),\n provider: c => providers.get(c),\n implementation: c => impls.get(c),\n implementationsOf: c => implsOf.get(c) ?? [],\n interface: c => ifaces.get(c),\n op: c => ops.get(c),\n }\n}\n\n/**\n * `Registry.load(modules, base)`: import each module (a URL relative to `base`), add its default `Provider` to a new\n * registry, and return each module's namespace under its key. The first failure is the result, never a throw:\n * `not-found` (the import failed), `invalid-input` (no default Provider, or the registry refused it).\n * The modules are code that will run: load only trusted ones.\n */\nasync function load(modules: Record<string, string>, base: string | URL): Promise<NanoResult<{ registry: Registry; exports: Record<string, Record<string, unknown>> }>> {\n const registry = create()\n const exports: Record<string, Record<string, unknown>> = {}\n for (const [ns, path] of Object.entries(modules)) {\n let mod: Record<string, unknown>\n try { mod = await import(new URL(path, base).href) }\n catch (e) { return failure('not-found', `${ns} (${path}): ${e instanceof Error ? e.message : String(e)}`) }\n const p = mod.default\n // `add` throws on a default export that isn't shaped like a Provider, so shape-check first.\n const q = p as Partial<Provider> | null\n const added = q && typeof q.coord === 'string' && q.implementations instanceof Map ? registry.add(q as Provider) : failure('invalid-input', `${path} has no default Provider`)\n if (!added.ok) return added\n exports[ns] = mod\n }\n return success({ registry, exports })\n}\n\n/** `Registry.create()`; `Registry.load(modules, base)`. */\nexport const Registry = { create, load }\n",
|
|
15
|
+
"/**\n * Policy: the yes/no check a runtime makes before it delivers a message or adds a subscription.\n *\n * const p = Policies.allowAll()\n * p.isAllowed(ask) // { approved: true }\n * PolicyRules([{ allow: 'call', outside: true, to: 'acme.Kv' }, { deny: '*' }]).isAllowed(ask) // first match wins\n */\nimport { Type, type Static } from 'typebox'\nexport type Verdict = { approved: true } | { approved: false; reason: string }\n/** What a policy is asked: a message's envelope. `outside` is true when `from` is not placed in `runtime` (the host, or another runtime's pod). */\nexport type Ask = { runtime: string; kind: 'call' | 'pipe' | 'on' | 'subscribe' | 'unsubscribe' | 'lifecycle' | 'start'; from: string; to: string; port?: string; outside: boolean; data?: unknown }\nexport type Policy = { isAllowed(ask: Ask): Verdict }\n\nconst ALLOW_ALL: Policy = Object.freeze({ isAllowed: () => ({ approved: true as const }) })\n\n/** `allowAll()` is one shared policy, so saving can tell it apart from a custom one. */\nexport const Policies = {\n allowAll: (): Policy => ALLOW_ALL,\n}\n\nconst Kind = Type.Union([Type.Literal('call'), Type.Literal('pipe'), Type.Literal('on'), Type.Literal('subscribe'), Type.Literal('unsubscribe'), Type.Literal('lifecycle'), Type.Literal('start'), Type.Literal('*')])\nconst Kinds = Type.Union([Kind, Type.Array(Kind)])\nconst Match = { from: Type.Optional(Type.String()), toPod: Type.Optional(Type.String()), toInterface: Type.Optional(Type.String()),\n toPort: Type.Optional(Type.String()), outside: Type.Optional(Type.Boolean()) }\n/**\n * A rule: `allow` or `deny` these kinds of message, from a pod or 'host' (`from`), to a target named by its resource\n * type: `toPod` (a pod name), `toInterface` (an interface coordinate: any of its ops), `toPort` (a port coordinate,\n * `iface/op`: that op only). Each field absent or '*' matches anything; all given fields must match.\n */\nexport const Rule = Type.Union([\n Type.Object({ allow: Kinds, ...Match }, { additionalProperties: false }),\n Type.Object({ deny: Kinds, ...Match }, { additionalProperties: false }),\n])\nexport type Rule = Static<typeof Rule>\n\n/** A field matches when absent, `*`, or equal. */\nconst any = (v: string | undefined, x: string | undefined) => v === undefined || v === '*' || v === x\ntype Compiled = { i: number; allow: boolean; kinds: ReadonlySet<string>; r: Rule }\nconst fits = (c: Compiled, a: Ask, iface: string | undefined) =>\n (c.kinds.has('*') || c.kinds.has(a.kind)) && any(c.r.toPod, a.to) && any(c.r.toInterface, iface) && any(c.r.toPort, a.port)\n && (c.r.outside === undefined || c.r.outside === a.outside)\n\n/**\n * The first rule matching the ask decides; none denies (`no rule allows it`); a deny's reason is `rules[i]`.\n * Compiled once: rules are indexed by `from` (a named caller's rules, and those for any caller), so an ask looks only\n * at rules that could match its caller, still in their order.\n */\nexport function PolicyRules(rules: Rule[]): Policy {\n const byFrom = new Map<string, Compiled[]>(), anyFrom: Compiled[] = []\n rules.forEach((r, i) => {\n const c = { i, allow: 'allow' in r, kinds: new Set([('allow' in r ? r.allow : r.deny)].flat()), r }\n if (r.from === undefined || r.from === '*') anyFrom.push(c)\n else { const l = byFrom.get(r.from); if (l) l.push(c); else byFrom.set(r.from, [c]) }\n })\n return { isAllowed: ask => {\n const iface = ask.port?.slice(0, ask.port.lastIndexOf('/'))\n const named = byFrom.get(ask.from) ?? []\n let a = 0, b = 0, hit: Compiled | undefined\n while (!hit && (a < named.length || b < anyFrom.length)) { // both lists in rule order: merge them\n const c = b >= anyFrom.length || (a < named.length && named[a]!.i < anyFrom[b]!.i) ? named[a++]! : anyFrom[b++]!\n if (fits(c, ask, iface)) hit = c\n }\n if (!hit) return { approved: false, reason: 'no rule allows it' }\n return hit.allow ? { approved: true } : { approved: false, reason: `rules[${hit.i}]` }\n } }\n}\n",
|
|
16
|
+
"/**\n * DeploymentPolicy: the yes/no check the application makes before `apply` changes its deployment, like `Policy` for a message.\n *\n * const p = DeploymentPolicies.allowAll()\n * await p.isAllowed({ caller: 'host', deployment }) // { approved: true }\n */\nimport type { AppDeployment } from './deployment.ts'\nimport type { Verdict } from './policy.ts'\n\n/** What it is asked: who applies (`'host'` or a pod name) and the deployment they want. */\nexport type DeploymentAsk = { caller: string; deployment: AppDeployment }\nexport type DeploymentPolicy = { isAllowed(ask: DeploymentAsk): Verdict | Promise<Verdict> }\n\nconst ALLOW_ALL: DeploymentPolicy = Object.freeze({ isAllowed: () => ({ approved: true as const }) })\n\nexport const DeploymentPolicies = {\n allowAll: (): DeploymentPolicy => ALLOW_ALL,\n}\n",
|
|
17
|
+
"/**\n * Pods: a description of one component, as plain data — an implementation's coordinate, its config, and whether it is\n * built as soon as it is in an application (eager) or on its first call (lazy). No state, methods or instance.\n *\n * Pod.lazy(counter, { config: { start: 0 } }) // { implementation: 'acme/counter', config: { start: 0 }, eager: false }\n * Pod.eager(ticker) // { implementation: 'acme/ticker', eager: true }\n */\nimport type { Implementation } from './implementation.ts'\n\nexport type Pod = {\n implementation: string; config?: unknown; eager: boolean\n /** Where it runs; absent means `host`. */\n isolation?: 'host' | 'sandbox' | 'isolated-sandbox' | 'home-origin'\n}\n\nconst describe = (eager: boolean) => (impl: Implementation, opts: { config?: unknown; isolation?: Pod['isolation'] } = {}): Pod =>\n ({ implementation: impl.coord, ...(opts.config !== undefined && { config: opts.config }), eager,\n ...(opts.isolation !== undefined && opts.isolation !== 'host' && { isolation: opts.isolation }) })\n\nexport const Pod = { lazy: describe(false), eager: describe(true) }\n",
|
|
18
|
+
"/**\n * Pods: which components exist, as a checked, immutable lookup of pod descriptions by name. Building one builds\n * nothing; `select` gives a scope over the same descriptions.\n *\n * const pods = Pods.create({ a: Pod.lazy(counter), b: Pod.eager(ticker) }, { registry, tags: { a: ['primary'] } }) // NanoResult<Pods>\n * pods.value.select(['a']) // success(a Pods naming only 'a'); an unknown name is not-found\n */\nimport { Type, type TSchema } from 'typebox'\nimport { Value } from 'typebox/value'\nimport type { Pod } from './pod.ts'\nimport type { Registry } from './registry.ts'\nimport { failure, success, type NanoResult } from './result.ts'\n\nexport type PodDeployment = Record<string, Pod>\n\nexport type Pods = {\n names(): string[]\n get(name: string): Pod | undefined\n select(names: string[]): NanoResult<Pods>\n deployment(): PodDeployment\n}\n\n/** Pod names and runtime ids. */\nexport const Id = Type.String({ pattern: /^[^/\\s#\\x00-\\x1f\\x7f]{1,64}$/.source })\n/** A pod name: the id rule, and no `.`, so a pod name is never read as an interface or port coordinate (policy rules). */\nconst PodName = Type.String({ pattern: /^[^/.\\s#\\x00-\\x1f\\x7f]{1,64}$/.source })\nconst strict = { additionalProperties: false } as const\nconst Shape = Type.Record(PodName, Type.Object({ implementation: Type.String(), config: Type.Optional(Type.Unknown()), eager: Type.Boolean(),\n isolation: Type.Optional(Type.Union([Type.Literal('host'), Type.Literal('sandbox'), Type.Literal('isolated-sandbox'), Type.Literal('home-origin')])) }, strict),\n { ...strict, maxProperties: 5000 })\nconst Tags = Type.Record(Id, Type.Array(Type.String()), strict)\n\n/** The first way `d` breaks `schema`, as a reason naming `what`; or undefined. */\nexport function shapeError(schema: TSchema, d: unknown, what: string): string | undefined {\n const e = Value.Errors(schema, d)[0]\n if (!e) return undefined\n const why = e.message === 'schema is false' ? 'not allowed here (an unknown key, or a name breaking the id rule)' : e.message\n return `${what} ${e.instancePath || '/'}: ${why}`\n}\n\ntype Tags = Record<string, string[]>\n/**\n * Where a `Pods` comes from: the registry it was checked against, the `Pods.create` result it was selected from, and\n * the tags of its pods, when `Pods.create` was given tags; and its descriptions by name, to read without copying.\n */\ntype Origin = { readonly registry: Registry; readonly root: Pods; readonly tags?: Tags; readonly pods: ReadonlyMap<string, Pod> }\n/** Each `Pods`' origin, for `Runtime.create` and `Application.create`: carried, not a member. */\nconst origins = new WeakMap<Pods, Origin>()\nexport const originOf = (pods: Pods): Origin | undefined => origins.get(pods)\n\nfunction view(all: ReadonlyMap<string, Pod>, registry: Registry, root?: Pods, tags?: Tags): Pods {\n const pods: Pods = Object.freeze({\n names: () => [...all.keys()],\n get: (name: string) => structuredClone(all.get(name)),\n select(names: string[]) {\n if (!Array.isArray(names) || names.some(n => typeof n !== 'string')) return failure('invalid-input', 'select takes pod names')\n const seen = new Set<string>(), dup = names.find(n => seen.size === seen.add(n).size), unknown = names.find(n => !all.has(n))\n if (dup !== undefined) return failure('invalid-input', `pod ${dup} is selected twice`)\n if (unknown !== undefined) return failure('not-found', `no pod ${unknown}`)\n const kept = tags && Object.fromEntries(names.filter(n => Object.hasOwn(tags, n)).map(n => [n, tags[n]!]))\n return success(view(new Map(names.map(n => [n, all.get(n)!])), registry, root ?? pods, kept))\n },\n deployment: () => structuredClone(Object.fromEntries(all)),\n })\n origins.set(pods, Object.freeze({ registry, root: root ?? pods, ...(tags && { tags }), pods: all }))\n return pods\n}\n\n/** `d` as `Pods`, if its names, implementations, configs, size and `tags` (by pod name, each a pod of `d`) check out. Never throws. */\nfunction create(d: unknown, opts: { registry: Registry; tags?: Tags }): NanoResult<Pods> {\n try {\n const copy = structuredClone(d), tags = structuredClone(opts.tags)\n const why = shapeError(Shape, copy, 'pods') ?? (tags === undefined ? undefined : shapeError(Tags, tags, 'tags'))\n if (why) return failure('invalid-input', why)\n const stray = Object.keys(tags ?? {}).find(n => !Object.hasOwn(copy as object, n))\n if (stray !== undefined) return failure('invalid-input', `tags: no pod ${stray}`)\n for (const [name, p] of Object.entries(copy as PodDeployment)) {\n if (name === 'host') return failure('invalid-input', \"pod name 'host' is reserved for the host\")\n const impl = opts.registry.implementation(p.implementation)\n if (!impl) return failure('not-found', `pod ${name}: no implementation ${p.implementation}`)\n if (impl.config && !impl.config.check(p.config)) return failure('invalid-input', `pod ${name}: config does not fit ${impl.config.label ?? 'its schema'}`)\n }\n return success(view(new Map(Object.entries(copy as PodDeployment)), opts.registry, undefined, tags))\n } catch (e) {\n return failure('invalid-input', `unreadable pods: ${e instanceof Error ? e.message : String(e)}`)\n }\n}\n\nexport const Pods = { create }\n",
|
|
19
|
+
"/**\n * Runtime: which pods are placed together and how they are wired, checked over a `Pods` scope, as an immutable value.\n * A call edge says which pod a pod's code may reach (`from` may be placed in another runtime; its calls travel here); a pipe carries an event, or an action's results, of `from` into\n * an action of `to`. Pipes may form cycles.\n *\n * Runtime.create('chat', { pods: ['a', 'b'], subscriptions: [{ kind: 'call', from: 'a', to: 'b' }] }, scope)\n * // success({ id: 'chat', pods: scope, deployment() }), or invalid-input naming the offender; never throws\n */\nimport { Type } from 'typebox'\nimport { port } from './iface.ts'\nimport type { Implementation } from './implementation.ts'\nimport type { Op } from './op.ts'\nimport { fits } from './op.ts'\nimport { Rule } from './policy.ts'\nimport { originOf, shapeError, type Pods } from './pods.ts'\nimport { failure, success, type NanoResult } from './result.ts'\n\nexport type Subscription =\n | { kind: 'call'; from: string; to: string; ops?: { source: string; target: string }[] }\n | { kind: 'pipe'; from: string; source: string; to: string; target: string }\n\nexport type RuntimeDeployment = { pods: string[]; subscriptions: Subscription[]; policy?: { kind: 'allow-all' } | { kind: 'rules'; rules: Rule[] } }\n\nexport type Runtime = { readonly id: string; readonly pods: Pods; deployment(): RuntimeDeployment }\n\nconst strict = { additionalProperties: false } as const\nconst Shape = Type.Object({\n pods: Type.Array(Type.String()),\n subscriptions: Type.Array(Type.Union([\n Type.Object({ kind: Type.Literal('call'), from: Type.String(), to: Type.String(),\n ops: Type.Optional(Type.Array(Type.Object({ source: Type.String(), target: Type.String() }, strict), { maxItems: 2000 })) }, strict),\n Type.Object({ kind: Type.Literal('pipe'), from: Type.String(), source: Type.String(), to: Type.String(), target: Type.String() }, strict),\n ]), { maxItems: 2000 }),\n policy: Type.Optional(Type.Union([\n Type.Object({ kind: Type.Literal('allow-all') }, strict),\n Type.Object({ kind: Type.Literal('rules'), rules: Type.Array(Rule, { maxItems: 2000 }) }, strict),\n ])),\n}, strict)\n\nconst label = (s: Subscription) => (s.kind === 'call' ? `${s.from}->${s.to}` : `${s.from}->${s.to} (${s.source} to ${s.target})`)\n\n/** The op at port `p` among what `impl` provides (its ports mapped once per implementation). */\nconst ports = new WeakMap<Implementation, Map<string, Op>>()\nexport const opAt = (impl: Implementation, p: string): Op | undefined => {\n let m = ports.get(impl)\n if (!m) { m = new Map(); for (const i of impl.provides) for (const o of Object.values(i.ops)) if (!m.has(port(i, o))) m.set(port(i, o), o); ports.set(impl, m) }\n return m.get(p)\n}\n\n/** Why subscription `s` (both ends known) does not hold, or undefined. */\nfunction unfit(s: Subscription, from: Implementation, to: Implementation): string | undefined {\n if (s.kind === 'call') {\n const deps = Object.values(from.dependencies).flatMap(d => (d.implements === undefined ? [] : [String(d.implements)]))\n if (deps.length && !to.provides.some(i => deps.includes(i.coord))) return `${s.to} provides none of ${s.from}'s dependencies`\n const pairs = new Set<string>()\n for (const o of s.ops ?? []) {\n if (!opAt(from, o.source)) return `${o.source} is not an op of ${s.from}`\n if (opAt(to, o.target)?.kind !== 'action') return `${o.target} is not an action of ${s.to}`\n if (pairs.size === pairs.add(JSON.stringify([o.source, o.target])).size) return `${o.source} to ${o.target} is there twice`\n }\n return undefined\n }\n const source = opAt(from, s.source), target = opAt(to, s.target)\n if (!source) return `${s.source} is not an event or action of ${s.from}`\n if (target?.kind !== 'action') return `${s.target} is not an action of ${s.to}`\n return fits(source, target) ? undefined : `${s.source} does not fit ${s.target}`\n}\n\nfunction check(id: string, r: RuntimeDeployment, pods: Pods): string | undefined {\n const origin = originOf(pods)\n if (!origin) return `runtime ${id}: its pods do not come from Pods.create`\n const placed = new Set<string>(), seen = new Set<string>()\n for (const name of r.pods) {\n if (!origin.pods.has(name)) return `runtime ${id}: no pod ${name}`\n if (placed.size === placed.add(name).size) return `runtime ${id}: ${name} is placed twice`\n }\n for (const s of r.subscriptions) {\n if (!origin.pods.has(s.from)) return `runtime ${id}: ${label(s)}: no pod ${s.from}`\n const end = (s.kind === 'call' ? [s.to] : [s.from, s.to]).find(n => !placed.has(n)) // a call may come from outside\n if (end !== undefined) return `runtime ${id}: ${label(s)}: ${end} is not placed here`\n const key = JSON.stringify(s.kind === 'call' ? [s.from, s.to] : [s.from, s.to, s.source, s.target])\n if (seen.has(key)) return `runtime ${id}: ${label(s)} is there twice`\n seen.add(key)\n const impl = (n: string) => origin.registry.implementation(origin.pods.get(n)!.implementation)!\n const why = unfit(s, impl(s.from), impl(s.to))\n if (why) return `runtime ${id}: ${label(s)}: ${why}`\n }\n}\n\n/** Every value `Runtime.create` made: carried, not a member, so `Application.create` can tell a Runtime from a look-alike. */\nconst made = new WeakSet<Runtime>()\nexport const isRuntime = (r: unknown): r is Runtime => made.has(r as Runtime)\n\n/** Runtime `id` placing and wiring pods of `pods`, if `d` checks out. Never throws. */\nfunction create(id: string, d: unknown, pods: Pods): NanoResult<Runtime> {\n try {\n const copy = structuredClone(d)\n const why = shapeError(Shape, copy, `runtime ${id}`) ?? check(id, copy as RuntimeDeployment, pods)\n if (why) return failure('invalid-input', why)\n const runtime: Runtime = Object.freeze({ id, pods, deployment: () => structuredClone(copy as RuntimeDeployment) })\n made.add(runtime)\n return success(runtime)\n } catch (e) {\n return failure('invalid-input', `unreadable runtime ${id}: ${e instanceof Error ? e.message : String(e)}`)\n }\n}\n\nexport const Runtime = { create }\n",
|
|
20
|
+
"/**\n * AppDeployment: the whole system as data — pods by name, runtimes by id, tags. `nano.json` is one, serialised.\n * `assemble` checks it level by level: `Pods.create` of its pods, then `Runtime.create` of each runtime over its scope.\n *\n * const d = { pods: { db: Pod.lazy(kv) }, runtimes: { app: { pods: ['db'], subscriptions: [] } } }\n * AppDeployment.assemble(d, registry) // success({ app: Runtime }), or the first failure naming the offender; never throws\n */\nimport { Type } from 'typebox'\nimport { Id, Pods, shapeError, type PodDeployment } from './pods.ts'\nimport type { Registry } from './registry.ts'\nimport { failure, success, type NanoResult } from './result.ts'\nimport { Runtime, type RuntimeDeployment } from './runtime.ts'\nimport { edit } from './deployment-edit.ts'\n\nexport type AppDeployment = {\n pods: PodDeployment; runtimes: Record<string, RuntimeDeployment>; tags?: Record<string, string[]>\n /** Host-owned: nano shape-checks these and otherwise ignores them. `frames`: each provider's own page, for its\n * `home-origin` pods. */\n modules?: Record<string, string>; views?: Record<string, string>; frames?: Record<string, string>\n /** The deployer's choice, a plain object: nano shape-checks it and otherwise ignores it; `deployment()` omits it. */\n layout?: Record<string, unknown>\n}\n\nconst strict = { additionalProperties: false } as const\n/** A table by runtime id: ids follow the id rule, at most 50. */\nexport const RuntimeIds = Type.Record(Id, Type.Unknown(), { ...strict, maxProperties: 50 })\nconst Shape = Type.Object({\n pods: Type.Unknown(),\n runtimes: RuntimeIds,\n tags: Type.Optional(Type.Record(Id, Type.Array(Type.String()), strict)),\n modules: Type.Optional(Type.Record(Id, Type.String({ minLength: 1 }), strict)),\n views: Type.Optional(Type.Record(Id, Type.String({ minLength: 1 }), strict)),\n frames: Type.Optional(Type.Record(Id, Type.String({ minLength: 1 }), strict)),\n layout: Type.Optional(Type.Record(Type.String(), Type.Unknown())),\n}, strict)\n\n/** `d`'s runtimes, if every level of it checks out; the first failure otherwise. Pure; never throws. */\nfunction assemble(d: unknown, registry: Registry): NanoResult<Record<string, Runtime>> {\n try {\n const copy = structuredClone(d)\n const why = shapeError(Shape, copy, 'deployment')\n if (why) return failure('invalid-input', why)\n const { pods: podDeployment, runtimes, tags } = copy as AppDeployment\n const pods = Pods.create(podDeployment, { registry, tags })\n if (!pods.ok) return pods\n const out: Record<string, Runtime> = Object.create(null)\n for (const [id, r] of Object.entries(runtimes)) {\n // Over its distinct pod names only, so Runtime.create reports a bad shape or a pod placed twice in its own words.\n // ...and the callers of its call edges, which may be placed elsewhere.\n const froms = Array.isArray(r?.subscriptions) ? r.subscriptions.flatMap(s => (s?.kind === 'call' && pods.value.names().includes(s.from) ? [s.from] : [])) : []\n const scope = pods.value.select(Array.isArray(r?.pods) ? [...new Set([...r.pods.filter(n => typeof n === 'string'), ...froms])] : [])\n if (!scope.ok) return failure('invalid-input', `runtime ${id}: ${scope.fail.reason}`)\n const runtime = Runtime.create(id, r, scope.value)\n if (!runtime.ok) return runtime\n out[id] = runtime.value\n }\n return success(out)\n } catch (e) {\n return failure('invalid-input', `unreadable deployment: ${e instanceof Error ? e.message : String(e)}`)\n }\n}\n\n/** A whole deployment checked level by level into its runtimes: `AppDeployment.assemble(d, registry)`; and written at\n * the call site as data: `AppDeployment.edit(base, registry)` (deployment-edit.ts). */\nexport const AppDeployment = { assemble, edit }\n",
|
|
21
|
+
"/**\n * Writing a deployment at the call site, as data. `AppDeployment.edit(base, registry)` copies `base`; nothing runs.\n * The registry is read only to know what each pod's implementation provides.\n *\n * const d = AppDeployment.edit(app.deployment(), registry)\n * d.place(kvMemory, { pod: 'store', in: 'backend' })\n * const kvs = d.resolve('backend', KeyValueStoreDef.api) // { runtime, pod, implementation }; not-found / not-unique throw\n * kvs.create(todosKv, { pod: 'todos', in: 'frontend' }) // pod; edge todos→store in backend; a rule letting it in\n * await app.apply(d.deployment())\n *\n * `pipe(runtime, { from, source, to, target })` appends that pipe to the runtime (both pods placed there; an equal pipe\n * is `invalid-input`); `unpipe(runtime, same)` removes it (`not-found` when there is none).\n *\n * `create` records a call edge in the resolved pod's runtime and, when that runtime's policy is `rules`, prepends\n * `{ allow: ['call', 'subscribe'], from, outside, toInterface }` (the first match wins: the operator asked for this edge).\n */\nimport type { AppDeployment } from './deployment.ts'\nimport type { Interface } from './iface.ts'\nimport type { Implementation } from './implementation.ts'\nimport { thrown } from './plain.ts'\nimport type { Registry } from './registry.ts'\n\ntype Where = { pod: string; in: string; eager?: boolean }\ntype PipeEnds = { from: string; source: string; to: string; target: string }\ntype Handle = { readonly runtime: string; readonly pod: string; readonly implementation: string; create(impl: Implementation, where: Where): Handle }\n\nexport function edit(base: AppDeployment, registry: Registry) {\n const d: AppDeployment = structuredClone(base)\n const runtime = (id: string) => (d.runtimes[id] ??= { pods: [], subscriptions: [] })\n const fail = (type: 'not-found' | 'not-unique' | 'invalid-input', reason: string): never => { throw thrown({ type, reason }) }\n\n function place(impl: Implementation, w: Where) {\n if (Object.hasOwn(d.pods, w.pod)) fail('invalid-input', `pod ${w.pod} is already in the deployment`)\n d.pods[w.pod] = { implementation: impl.coord, eager: w.eager ?? false }\n runtime(w.in).pods.push(w.pod)\n }\n\n function handle(at: string, pod: string, api: Interface): Handle {\n return { runtime: at, pod, implementation: d.pods[pod]!.implementation, create(impl, w) {\n place(impl, w)\n const r = runtime(at)\n r.subscriptions.push({ kind: 'call', from: w.pod, to: pod })\n if (r.policy?.kind === 'rules')\n r.policy.rules.unshift({ allow: ['call', 'subscribe'], from: w.pod, outside: !r.pods.includes(w.pod), toInterface: api.coord })\n const own = impl.provides[0]\n return own ? handle(w.in, w.pod, own) : fail('invalid-input', `${impl.coord} provides no interface`)\n } }\n }\n\n function resolve(at: string, api: Interface): Handle {\n const found = (d.runtimes[at]?.pods ?? []).filter(p => registry.implementation(d.pods[p]?.implementation ?? '')?.provides.some(i => i.coord === api.coord))\n if (found.length === 0) return fail('not-found', `no pod provides ${api.coord} in ${at}`)\n if (found.length > 1) return fail('not-unique', `${found.length} pods provide ${api.coord} in ${at}`)\n return handle(at, found[0]!, api)\n }\n\n const same = (a: PipeEnds, s: { kind: string } & Partial<PipeEnds>) => s.kind === 'pipe' && s.from === a.from && s.source === a.source && s.to === a.to && s.target === a.target\n\n function pipe(at: string, p: PipeEnds) {\n const r = d.runtimes[at]\n if (!r) return fail('not-found', `no runtime ${at}`)\n for (const pod of [p.from, p.to]) if (!r.pods.includes(pod)) fail('not-found', `${pod} is not placed in ${at}`)\n if (r.subscriptions.some(s => same(p, s))) fail('invalid-input', `${p.from} ${p.source} is already piped to ${p.to} ${p.target} in ${at}`)\n r.subscriptions.push({ kind: 'pipe', ...p })\n }\n\n function unpipe(at: string, p: PipeEnds) {\n const r = d.runtimes[at], i = r ? r.subscriptions.findIndex(s => same(p, s)) : -1\n if (!r || i < 0) return fail('not-found', `no such pipe in ${at}`)\n r.subscriptions.splice(i, 1)\n }\n\n return { place, resolve, pipe, unpipe, deployment: (): AppDeployment => structuredClone(d) }\n}\n",
|
|
21
22
|
"/**\n * What `apply` changes between two deployments: pods by name, and the runtimes whose placing or wiring differs.\n *\n * diff(a, b) // { added: ['x'], removed: [], changed: ['c'], rewired: ['r'] }\n */\nimport { Value } from 'typebox/value'\nimport type { AppDeployment } from '../deployment.ts'\n\nexport function diff(a: AppDeployment, b: AppDeployment) {\n const names = (o: object, p: object) => Object.keys(o).filter(k => !(k in p))\n const runtimes = [...new Set([...Object.keys(a.runtimes), ...Object.keys(b.runtimes)])]\n return {\n added: names(b.pods, a.pods),\n removed: names(a.pods, b.pods),\n changed: Object.keys(b.pods).filter(k => k in a.pods && !Value.Equal(a.pods[k], b.pods[k])),\n rewired: runtimes.filter(id => !Value.Equal(a.runtimes[id]?.pods, b.runtimes[id]?.pods)\n || !Value.Equal(a.runtimes[id]?.subscriptions, b.runtimes[id]?.subscriptions)),\n }\n}\n",
|
|
22
|
-
"/**\n * What `Application.load(url)` reads: a `nano.json` and the providers its `modules` name (each a module whose default\n * export is a `Provider`, imported relative to the nano.json), as a registry. The first failure is the result.\n * The document's shape is checked before anything is imported. `modules` URLs are code that will run: load only\n * trusted documents.\n *\n * const r = await loaded(new URL('./nano.json', import.meta.url)) // success({ deployment, registry })\n */\nimport { AppDeployment } from '../deployment.ts'\nimport { Registry } from '../registry.ts'\nimport { failure, success, type NanoResult } from '../result.ts'\n\nconst why = (e: unknown) => (e instanceof Error ? e.message : String(e))\n\nexport async function loaded(url: string | URL): Promise<NanoResult<{ deployment: AppDeployment; registry: Registry }>> {\n let deployment: AppDeployment\n try {\n const res = await fetch(url)\n if (!res.ok) return failure('not-found', `${url}: ${res.status} ${res.statusText}`)\n deployment = await res.json() as AppDeployment\n } catch (e) { return failure('invalid-input', `${url}: ${why(e)}`) }\n // Its shape before any import: pods and runtimes need the providers, so they are checked as objects here, in full later.\n const d = deployment as Partial<AppDeployment> | null\n if (!d || typeof d.pods !== 'object' || !d.pods || typeof d.runtimes !== 'object' || !d.runtimes)\n return failure('invalid-input', `${url}: a deployment has pods and runtimes`)\n const { pods: _p, runtimes: _r, tags: _t, ...host } = d\n const top = AppDeployment.assemble({ ...host, pods: {}, runtimes: {} }, Registry.create())\n if (!top.ok) return failure('invalid-input', `${url}: ${top.fail.reason}`)\n const
|
|
23
|
+
"/**\n * What `Application.load(url)` reads: a `nano.json` and the providers its `modules` name (each a module whose default\n * export is a `Provider`, imported relative to the nano.json), as a registry. The first failure is the result.\n * The document's shape is checked before anything is imported. `modules` URLs are code that will run: load only\n * trusted documents.\n *\n * const r = await loaded(new URL('./nano.json', import.meta.url)) // success({ deployment, registry })\n */\nimport { AppDeployment } from '../deployment.ts'\nimport { Registry } from '../registry.ts'\nimport { failure, success, type NanoResult } from '../result.ts'\n\nconst why = (e: unknown) => (e instanceof Error ? e.message : String(e))\n\nexport async function loaded(url: string | URL): Promise<NanoResult<{ deployment: AppDeployment; registry: Registry }>> {\n let deployment: AppDeployment\n try {\n const res = await fetch(url)\n if (!res.ok) return failure('not-found', `${url}: ${res.status} ${res.statusText}`)\n deployment = await res.json() as AppDeployment\n } catch (e) { return failure('invalid-input', `${url}: ${why(e)}`) }\n // Its shape before any import: pods and runtimes need the providers, so they are checked as objects here, in full later.\n const d = deployment as Partial<AppDeployment> | null\n if (!d || typeof d.pods !== 'object' || !d.pods || typeof d.runtimes !== 'object' || !d.runtimes)\n return failure('invalid-input', `${url}: a deployment has pods and runtimes`)\n const { pods: _p, runtimes: _r, tags: _t, ...host } = d\n const top = AppDeployment.assemble({ ...host, pods: {}, runtimes: {} }, Registry.create())\n if (!top.ok) return failure('invalid-input', `${url}: ${top.fail.reason}`)\n const loadedModules = await Registry.load(deployment.modules ?? {}, url)\n if (!loadedModules.ok) return loadedModules\n const { registry } = loadedModules.value\n return success({ deployment, registry })\n}\n",
|
|
23
24
|
"/**\n * Runtimes composed into the application's deployment: the pods they place, described by their one `Pods` and in its\n * order, the runtimes' placing and wiring in the order given, and the tags their scopes carry. A pod in no runtime\n * is not in it, nor are its tags. Each runtime was checked by `Runtime.create`; this checks only what the application owns,\n * and that no runtime has both a code policy (in `policies`) and a `policy` in its deployment.\n *\n * compose({ chat, support }) // success({ deployment: { pods, runtimes, tags? }, registry }), or invalid-input naming the offender\n */\nimport { RuntimeIds, type AppDeployment } from '../deployment.ts'\nimport type { Pod } from '../pod.ts'\nimport type { Policy } from '../policy.ts'\nimport { originOf, shapeError, type Pods } from '../pods.ts'\nimport type { Registry } from '../registry.ts'\nimport { failure, success, type NanoResult } from '../result.ts'\nimport { isRuntime } from '../runtime.ts'\n\n/** Never throws; `registry` is that of the runtimes' `Pods`, absent when there are no runtimes. */\nexport function compose(runtimes: unknown, policies: Record<string, Policy> = {}): NanoResult<{ deployment: AppDeployment; registry?: Registry }> {\n try {\n const why = shapeError(RuntimeIds, runtimes, 'runtimes')\n if (why) return failure('invalid-input', why)\n const out: AppDeployment['runtimes'] = Object.create(null), placed = new Map<string, Pod>()\n const tags: Record<string, string[]> = Object.create(null)\n let root: Pods | undefined\n for (const [id, r] of Object.entries(runtimes as Record<string, unknown>)) {\n if (!isRuntime(r)) return failure('invalid-input', `runtime ${id}: not made by Runtime.create`)\n if (r.id !== id) return failure('invalid-input', `runtime ${id}: its id is ${r.id}`)\n const origin = originOf(r.pods)!\n if ((root ??= origin.root) !== origin.root) return failure('invalid-input', `runtime ${id}: its pods come from another Pods`)\n out[id] = r.deployment()\n if (out[id].policy && Object.hasOwn(policies, id)) return failure('invalid-input', `runtime ${id}: has a policy in code and in its deployment`)\n for (const n of out[id].pods) if (origin.tags && Object.hasOwn(origin.tags, n)) tags[n] = structuredClone(origin.tags[n]!)\n for (const name of out[id].pods) placed.set(name, origin.pods.get(name)!)\n }\n for (const [id, r] of Object.entries(out))\n for (const s of r.subscriptions) if (!placed.has(s.from)) return failure('invalid-input', `runtime ${id}: ${s.from}->${s.to}: ${s.from} is placed in no runtime`)\n const pods: AppDeployment['pods'] = Object.create(null)\n for (const name of root?.names() ?? []) if (placed.has(name)) pods[name] = structuredClone(placed.get(name)!)\n const from = root && originOf(root)!\n return success({ deployment: { pods, runtimes: out, ...(from?.tags && { tags }) }, registry: from?.registry })\n } catch (e) {\n return failure('invalid-input', `unreadable runtimes: ${e instanceof Error ? e.message : String(e)}`)\n }\n}\n",
|
|
24
|
-
"/**\n * What a message needs to know about a deployment, found once per deployment object rather than scanned per message:\n * where each pod is placed, the call edges and pipes from each pod, and each runtime's compiled policy. `apply` makes a\n * new deployment object, so the cache follows it.\n *\n * lookup(d).placed.get('backend')?.has('store') // placed there?\n * lookup(d).pipes.get(`${pod} ${port}`) // the pipes carrying that emission, runtimes then subscriptions in order\n */\nimport type { AppDeployment } from '../deployment.ts'\nimport { Policies, PolicyRules, type Policy } from '../policy.ts'\n\ntype Pipe = { runtime: string; to: string; target: string }\nexport type Lookup = {\n /** Pods placed in each runtime. */\n placed: ReadonlyMap<string, ReadonlySet<string>>\n /** For each pod, the runtimes it is placed in, in order. */\n placedIn: ReadonlyMap<string, readonly string[]>\n /** For each pod, its call edges (wherever listed): runtimes in order, then subscriptions in order. */\n callsFrom: ReadonlyMap<string, readonly { runtime: string; to: string }[]>\n /** `${runtime} ${from} ${to}` for each call edge. */\n calls: ReadonlySet<string>\n /** For `${from} ${port}`, its pipes. */\n pipes: ReadonlyMap<string, readonly Pipe[]>\n /** Each runtime's policy from the deployment (`allow-all` when it has none). */\n policy(runtime: string): Policy\n}\n\nconst cache = new WeakMap<AppDeployment, Lookup>()\nconst push = <K, V>(m: Map<K, V[]>, k: K, v: V) => { const l = m.get(k); if (l) l.push(v); else m.set(k, [v]) }\n\nexport function lookup(d: AppDeployment): Lookup {\n const hit = cache.get(d)\n if (hit) return hit\n const placed = new Map<string, Set<string>>(), placedIn = new Map<string, string[]>(), callsFrom = new Map<string, { runtime: string; to: string }[]>()\n const calls = new Set<string>(), pipes = new Map<string, Pipe[]>(), policies = new Map<string, Policy>()\n for (const [id, r] of Object.entries(d.runtimes)) {\n placed.set(id, new Set(r.pods))\n for (const p of r.pods) push(placedIn, p, id)\n for (const s of r.subscriptions) {\n if (s.kind === 'call') { calls.add(`${id} ${s.from} ${s.to}`); push(callsFrom, s.from, { runtime: id, to: s.to }) }\n else push(pipes, `${s.from} ${s.source}`, { runtime: id, to: s.to, target: s.target })\n }\n policies.set(id, r.policy?.kind === 'rules' ? PolicyRules(r.policy.rules) : Policies.allowAll())\n }\n const made: Lookup = { placed, placedIn, callsFrom, calls, pipes, policy: id => policies.get(id) ?? Policies.allowAll() }\n cache.set(d, made)\n return made\n}\n",
|
|
25
|
-
"/**\n * Messages: one message in one runtime — `sent` (with its kind and chain), policed, its input checked, the target built\n * or reused, run with the timeout, its output checked, then `delivered` (or `denied`). What follows from a message\n * (emissions) is `emit.ts`'s.\n *\n * await send(live, 'r', 'host', 'db', 'acme.KV/get', 'k') // NanoResult<unknown>; a call starting a chain\n * await attempt(live, 'db', 'closing db', fn) // fn within the timeout; a throw or timeout a `failure`\n */\nimport type { AppDeployment } from '../deployment.ts'\nimport type { Handler, Implementation } from '../implementation.ts'\nimport type { Pod } from '../pod.ts'\nimport type { Ask, Policy } from '../policy.ts'\nimport type { Registry } from '../registry.ts'\nimport type { NanoContext } from '../context.ts'\nimport { opAt } from '../runtime.ts'\nimport { lookup } from './lookup.ts'\nimport { failure, isNanoResult, success, type Fail, type NanoResult } from '../result.ts'\nimport type { stream } from './stream.ts'\n\n/** What a message needs of the application, read live. */\nexport type Live = {\n now(): AppDeployment\n readonly registry: Registry\n readonly policies: Record<string, Policy>\n readonly timeoutMs: number\n readonly trace: ReturnType<typeof stream>\n /** A build: the handlers by port,
|
|
26
|
-
"/**\n * A message and what follows from it. An action's successful result is an emission from its pod, as is an event it\n * publishes: delivered along every pipe from that pod and port in every runtime the pod is placed in (runtimes in\n * order, then pipes in order), then to every live `on` subscription to it (in the order made). Each delivery is its own\n * message, kept in `live.flying` until it settles; once the application is closing, nothing is delivered. The caller\n * of an action does not wait for its emission. And a client by op name over such messages.\n *\n * await client(live, 'r', 'host', 'db', () => undefined).get('k') // a call starting a chain; its result emitted\n * await emit(live, 'db', 'acme.Store/saved', { output: 'x' }) // a published event: one new chain\n */\nimport { port } from '../iface.ts'\nimport { failure, success, type NanoResult } from '../result.ts'\nimport { attempt, impl, send, type Live, type On } from './messages.ts'\nimport { lookup } from './lookup.ts'\n\ntype Chain = { id?: string; correlation?: string; cause?: string }\n\nconst fly = <T>(live: Live, p: Promise<T>): Promise<T> => {\n const done = () => { live.flying.delete(p) }\n live.flying.add(p)\n p.then(done, done)\n return p\n}\n\n/** An action message (a call or a pipe delivery), then the emission of its successful result, caused by it. */\nasync function act(live: Live, runtime: string, from: string, to: string, p: string, input: unknown, kind: 'call' | 'pipe', chain: Chain = {}) {\n const id = chain.id ?? live.trace.id(), correlation = chain.correlation ?? id\n const r = await send(live, runtime, from, to, p, input, { ...chain, kind, id, correlation })\n if (r.ok) void emit(live, to, p, { input, output: r.value }, { correlation, cause: id }, runtime)\n return r\n}\n\n/**\n * `from`'s emission at port `port`. With no `chain` (a published event) it starts one: the first delivery's id is the\n * correlation of every delivery, none with a cause. An action's emission (`travelled`: the runtime its call went in)\n * reaches only the `On`s in that runtime. Resolves once the pipe deliveries settle, not the `on` ones.\n */\nexport function emit(live: Live, from: string, port: string, e: Parameters<On['fn']>[0], chain?: Chain, travelled?: string): Promise<unknown> {\n if (live.closed()) return Promise.resolve()\n let first: string | undefined\n const link = (): Chain => chain ?? (first ? { correlation: first } : { id: (first = live.trace.id()), correlation: first })\n const pipes = (lookup(live.now()).pipes.get(`${from} ${port}`) ?? []).map(s => fly(live, act(live, s.runtime, from, s.to, s.target, e.output, 'pipe', link())))\n for (const o of [...(live.listeners.heard.get(`${from} ${port}`) ?? [])]) {\n if (o.from !== from || o.port !== port || (travelled !== undefined && o.runtime !== travelled)) continue\n const work = async () => { const r = await attempt(live, o.to, `${o.to} hearing ${port}`, () => o.fn(e)); return r.ok ? success(undefined) : r }\n fly(live, send(live, o.runtime, from, o.to, port, e.output, { kind: 'on', ...link(), work }))\n }\n return Promise.all(pipes)\n}\n\n/**\n * A client by op name from `from` to `to` in `runtime`. `gone()` is asked at each call, before anything is sent: a\n * Fail it gives is the call's result.\n */\nexport function client(live: Live, runtime: string, from: string, to: string, gone: () => NanoResult<never> | undefined): Record<string, (input: unknown) => Promise<NanoResult<unknown>>> {\n const call = async (name: string, input: unknown): Promise<NanoResult<unknown>> => {\n const why = gone()\n if (why) return why\n const provides = (impl(live, to)?.provides ?? []).filter(i => Object.values(i.ops).some(o => o.kind === 'action' && o.name === name))\n const ports = provides.map(i => port(i, i.ops[name]!))\n if (ports.length === 0) return failure('unknown-op', `${to} has no action ${name}`)\n if (ports.length > 1) return failure('not-unique', `${to}: ${name} is an action of more than one interface`)\n return act(live, runtime, from, to, ports[0]!, input, 'call')\n }\n // ponytail: any name reads as an op (a Proxy) except `then`, so awaiting a client is harmless; an op named `then` is unreachable.\n return new Proxy({}, { get: (_, name) => (typeof name === 'string' && name !== 'then' ? (input: unknown) => call(name, input) : undefined) })\n}\n",
|
|
25
|
+
"/**\n * What a message needs to know about a deployment, found once per deployment object rather than scanned per message:\n * where each pod is placed, the call edges and pipes from each pod, and each runtime's compiled policy. `apply` makes a\n * new deployment object, so the cache follows it. It caches by object identity: treat `d` as immutable once looked up.\n *\n * lookup(d).placed.get('backend')?.has('store') // placed there?\n * lookup(d).pipes.get(`${pod} ${port}`) // the pipes carrying that emission, runtimes then subscriptions in order\n */\nimport type { AppDeployment } from '../deployment.ts'\nimport { Policies, PolicyRules, type Policy } from '../policy.ts'\n\ntype Pipe = { runtime: string; to: string; target: string }\nexport type Lookup = {\n /** Pods placed in each runtime. */\n placed: ReadonlyMap<string, ReadonlySet<string>>\n /** For each pod, the runtimes it is placed in, in order. */\n placedIn: ReadonlyMap<string, readonly string[]>\n /** For each pod, its call edges (wherever listed): runtimes in order, then subscriptions in order. */\n callsFrom: ReadonlyMap<string, readonly { runtime: string; to: string }[]>\n /** `${runtime} ${from} ${to}` for each call edge. */\n calls: ReadonlySet<string>\n /** For `${from} ${port}`, its pipes. */\n pipes: ReadonlyMap<string, readonly Pipe[]>\n /** Each runtime's policy from the deployment (`allow-all` when it has none). */\n policy(runtime: string): Policy\n}\n\nconst cache = new WeakMap<AppDeployment, Lookup>()\nconst push = <K, V>(m: Map<K, V[]>, k: K, v: V) => { const l = m.get(k); if (l) l.push(v); else m.set(k, [v]) }\n\nexport function lookup(d: AppDeployment): Lookup {\n const hit = cache.get(d)\n if (hit) return hit\n const placed = new Map<string, Set<string>>(), placedIn = new Map<string, string[]>(), callsFrom = new Map<string, { runtime: string; to: string }[]>()\n const calls = new Set<string>(), pipes = new Map<string, Pipe[]>(), policies = new Map<string, Policy>()\n for (const [id, r] of Object.entries(d.runtimes)) {\n placed.set(id, new Set(r.pods))\n for (const p of r.pods) push(placedIn, p, id)\n for (const s of r.subscriptions) {\n if (s.kind === 'call') { calls.add(`${id} ${s.from} ${s.to}`); push(callsFrom, s.from, { runtime: id, to: s.to }) }\n else push(pipes, `${s.from} ${s.source}`, { runtime: id, to: s.to, target: s.target })\n }\n policies.set(id, r.policy?.kind === 'rules' ? PolicyRules(r.policy.rules) : Policies.allowAll())\n }\n const made: Lookup = { placed, placedIn, callsFrom, calls, pipes, policy: id => policies.get(id) ?? Policies.allowAll() }\n cache.set(d, made)\n return made\n}\n",
|
|
26
|
+
"/**\n * Messages: one message in one runtime — `sent` (with its kind and chain), policed, its input checked, the target built\n * or reused, run with the timeout, its output checked, then `delivered` (or `denied`). What follows from a message\n * (emissions) is `emit.ts`'s.\n *\n * await send(live, 'r', 'host', 'db', 'acme.KV/get', 'k') // NanoResult<unknown>; a call starting a chain\n * await attempt(live, 'db', 'closing db', fn) // fn within the timeout; a throw or timeout a `failure`\n */\nimport type { AppDeployment } from '../deployment.ts'\nimport type { Handler, Implementation } from '../implementation.ts'\nimport type { Pod } from '../pod.ts'\nimport type { Ask, Policy } from '../policy.ts'\nimport type { Registry } from '../registry.ts'\nimport type { NanoContext } from '../context.ts'\nimport { opAt } from '../runtime.ts'\nimport { lookup } from './lookup.ts'\nimport { contextFor } from './context.ts'\nimport { failure, isNanoResult, success, type Fail, type NanoResult } from '../result.ts'\nimport type { stream } from './stream.ts'\n\n/** What a message needs of the application, read live. */\nexport type Live = {\n now(): AppDeployment\n readonly registry: Registry\n readonly policies: Record<string, Policy>\n readonly timeoutMs: number\n readonly trace: ReturnType<typeof stream>\n /** A build: the handlers by port, the implementation they were made from, and its `addOnCloseListener`. */\n instance(pod: string): Promise<NanoResult<{ implementation: Implementation; handlers: ReadonlyMap<string, Handler>; onClose: NanoContext['addOnCloseListener'] }>>\n /** The live listeners, in the order made: `on` subscriptions (a pod's, or the host's; `heard` the same by `${from} ${port}`, what `emit` reads) and pod-change listeners (`ctx.addOnPodChangeListener`). */\n readonly listeners: { ons: Set<On>; heard: Map<string, Set<On>>; podChanges: Set<{ pod: string; fn: Parameters<NanoContext['addOnPodChangeListener']>[0] }> }\n /** Deliveries under way, so `close()` can let them settle. */\n readonly flying: Set<Promise<unknown>>\n /** Whether `close()` has been called: nothing new is delivered. */\n closed(): boolean\n /** The host's stand-in implementation for a pod whose isolation isn't 'host'. */\n readonly isolate?: (name: string, pod: Pod) => Implementation\n}\n\n/** A subscription made in code: `to` (a pod, or 'host') hears pod `from`'s port `port` in `runtime`, while `gone()` gives nothing. `end(fail?)` ends it: sends `unsubscribe` and ends its iteration (`connection.ts`). */\nexport type On = { runtime: string; from: string; port: string; to: string; gone(): unknown; fn(e: { input?: unknown; output: unknown }): unknown; end(fail?: Fail): void }\n\n/** A message's kind, its chain (`correlation`, `cause`), its id if already taken, and its `work` if not an action. */\ntype How = { kind: 'call' | 'pipe' | 'on'; id?: string; correlation?: string; cause?: string; work?: () => Promise<NanoResult<unknown>> }\n\nconst msg = (e: unknown) => (e instanceof Error ? e.message : String(e))\nconst TIMEOUT = Symbol('timeout')\n\n/** `work()` within `ms`: its value, or `threw` / `timeout` naming `what`. Never throws. */\nexport async function within<T>(work: () => T | Promise<T>, ms: number, what: string): Promise<NanoResult<T>> {\n let timer: ReturnType<typeof setTimeout> | undefined\n const late = new Promise<never>((_, reject) => { timer = setTimeout(() => reject(TIMEOUT), ms) })\n try {\n return success(await Promise.race([Promise.resolve().then(work), late]))\n } catch (e) {\n return e === TIMEOUT ? failure('timeout', `${what} took over ${ms}ms`) : failure('threw', `${what}: ${msg(e)}`)\n } finally {\n clearTimeout(timer)\n }\n}\n\n/** `work()` within the timeout, as `pod`'s: a throw or a timeout is also a `failure` on the stream. */\nexport async function attempt<T>(live: Live, pod: string, what: string, work: () => T | Promise<T>): Promise<NanoResult<T>> {\n const r = await within(work, live.timeoutMs, what)\n if (!r.ok) live.trace.emit({ type: 'failure', pod, reason: r.fail.reason })\n return r\n}\n\n/** The implementation of `pod` in the deployment now, if it has one. */\nexport const impl = (live: Live, pod: string) => live.registry.implementation(live.now().pods[pod]?.implementation ?? '')\n/** Every runtime `pod` is placed in, as [id, runtime deployment], in order. */\nexport const placedIn = (live: Live, pod: string) => { const d = live.now(); return (lookup(d).placedIn.get(pod) ?? []).map(id => [id, d.runtimes[id]!] as const) }\nconst action = (i: Implementation | undefined, p: string) => { const o = i && opAt(i, p); return o?.kind === 'action' ? o : undefined }\n\n/** Why the policy of `ask.runtime` in `d` (the deployment now, or the one `apply` brings) refuses `ask`, or undefined. A throw, a Promise or no verdict refuses. */\nexport function refusal(live: Live, ask: Omit<Ask, 'outside'>, d = live.now()): string | undefined {\n const l = lookup(d) // as it is in `d`, so `apply` changes it\n const policy = Object.hasOwn(live.policies, ask.runtime) ? live.policies[ask.runtime]! : l.policy(ask.runtime)\n try {\n const outside = ask.from === 'host' || !l.placed.get(ask.runtime)?.has(ask.from)\n const v = policy.isAllowed({ ...ask, outside }) as { approved?: unknown; reason?: unknown; then?: unknown } | undefined\n if (typeof v?.then === 'function') { Promise.resolve(v).catch(() => {}); return 'policy gave no verdict' }\n if (v?.approved === true) return undefined\n return v?.approved === false && typeof v.reason === 'string' ? v.reason : 'policy gave no verdict'\n } catch (e) {\n return `policy threw: ${msg(e)}`\n }\n}\n\nasync function deliver(live: Live, to: string, p: string, input: unknown, m: { id: string; correlation: string }): Promise<NanoResult<unknown>> {\n const asked = action(impl(live, to), p)\n if (!asked) return failure('unknown-op', `${to} has no action ${p}`)\n if (asked.input && !asked.input.check(input)) return failure('invalid-input', `${p}: input does not fit ${asked.input.label ?? 'its schema'}`)\n const made = await live.instance(to)\n if (!made.ok) return made\n // The op as the build knows it: an apply may have changed the pod while this build was under way.\n const o = action(made.value.implementation, p), h = made.value.handlers.get(p)\n if (!o || !h) return failure('unknown-op', `${to} has no action ${p}`)\n if (o.input && !o.input.check(input)) return failure('invalid-input', `${p}: input does not fit ${o.input.label ?? 'its schema'}`)\n const ran = await attempt(live, to, `${to} ${p}`, () => h(input, contextFor(live, to, made.value.onClose, { ...m, port: p })))\n if (!ran.ok) return ran\n const r = ran.value\n if (!isNanoResult(r)) return failure('invalid-output', `${p}: returned something other than a NanoResult`)\n if (r.ok && o.output && !o.output.check(r.value)) return failure('invalid-output', `${p}: output does not fit ${o.output.label ?? 'its schema'}`)\n return r\n}\n\n/**\n * One message from `from` to `to`'s port `p`, in runtime `runtime`: `sent` (as `how.id`, or a new id), policed by\n * `refusal`, carried by `how.work` (by default the action at `p`), then `delivered`. With no `correlation` it starts a\n * chain. It sends exactly this one message.\n */\nexport async function send(live: Live, runtime: string, from: string, to: string, p: string, input: unknown, how: How = { kind: 'call' }): Promise<NanoResult<unknown>> {\n const { trace } = live, { kind, id = trace.id(), cause, work } = how, correlation = how.correlation ?? id\n trace.emit({ type: 'sent', id, runtime, kind, from, to, port: p, correlation, ...(cause !== undefined && { cause }), ...(input !== undefined && { input }) })\n const reason = refusal(live, { runtime, kind, from, to, port: p, data: input })\n if (reason !== undefined) { trace.emit({ type: 'denied', id, reason }); return failure('denied', reason) }\n const t0 = performance.now()\n const r = await (work ? work() : deliver(live, to, p, input, { id, correlation })).catch(e => failure('invalid-input', `${p}: unreadable input: ${msg(e)}`))\n trace.emit({ type: 'delivered', id, result: r, ms: performance.now() - t0 })\n return r\n}\n",
|
|
27
|
+
"/**\n * A message and what follows from it. An action's successful result is an emission from its pod, as is an event it\n * publishes: delivered along every pipe from that pod and port in every runtime the pod is placed in (runtimes in\n * order, then pipes in order), then to every live `on` subscription to it (in the order made). Each delivery is its own\n * message, kept in `live.flying` until it settles; once the application is closing, nothing is delivered. The caller\n * of an action does not wait for its emission. And a client by op name over such messages.\n *\n * await client(live, 'r', 'host', 'db', () => undefined).get('k') // a call starting a chain; its result emitted\n * await emit(live, 'db', 'acme.Store/saved', { output: 'x' }) // a published event: one new chain\n */\nimport { port } from '../iface.ts'\nimport { failure, success, type NanoResult } from '../result.ts'\nimport { attempt, impl, send, type Live, type On } from './messages.ts'\nimport { lookup } from './lookup.ts'\n\ntype Chain = { id?: string; correlation?: string; cause?: string }\n\nconst fly = <T>(live: Live, p: Promise<T>): Promise<T> => {\n const done = () => { live.flying.delete(p) }\n live.flying.add(p)\n p.then(done, done)\n return p\n}\n\n/** An action message (a call or a pipe delivery), then the emission of its successful result, caused by it. */\nasync function act(live: Live, runtime: string, from: string, to: string, p: string, input: unknown, kind: 'call' | 'pipe', chain: Chain = {}) {\n const id = chain.id ?? live.trace.id(), correlation = chain.correlation ?? id\n const r = await send(live, runtime, from, to, p, input, { ...chain, kind, id, correlation })\n if (r.ok) void emit(live, to, p, { input, output: r.value }, { correlation, cause: id }, runtime)\n return r\n}\n\n/**\n * `from`'s emission at port `port`. With no `chain` (a published event) it starts one: the first delivery's id is the\n * correlation of every delivery, none with a cause. An action's emission (`travelled`: the runtime its call went in)\n * reaches only the `On`s in that runtime. Resolves once the pipe deliveries settle, not the `on` ones.\n */\nexport function emit(live: Live, from: string, port: string, e: Parameters<On['fn']>[0], chain?: Chain, travelled?: string): Promise<unknown> {\n if (live.closed()) return Promise.resolve()\n let first: string | undefined\n const link = (): Chain => chain ?? (first ? { correlation: first } : { id: (first = live.trace.id()), correlation: first })\n const pipes = (lookup(live.now()).pipes.get(`${from} ${port}`) ?? []).map(s => fly(live, act(live, s.runtime, from, s.to, s.target, e.output, 'pipe', link())))\n for (const o of [...(live.listeners.heard.get(`${from} ${port}`) ?? [])]) {\n if (o.from !== from || o.port !== port || (travelled !== undefined && o.runtime !== travelled)) continue\n const work = async () => { const r = await attempt(live, o.to, `${o.to} hearing ${port}`, () => o.fn(e)); return r.ok ? success(undefined) : r }\n fly(live, send(live, o.runtime, from, o.to, port, e.output, { kind: 'on', ...link(), work }))\n }\n return Promise.all(pipes)\n}\n\n/**\n * A client by op name from `from` to `to` in `runtime`. `gone()` is asked at each call, before anything is sent: a\n * Fail it gives is the call's result. With `chain` each call continues it (its `correlation`, `cause`).\n */\nexport function client(live: Live, runtime: string, from: string, to: string, gone: () => NanoResult<never> | undefined, chain?: Chain): Record<string, (input: unknown) => Promise<NanoResult<unknown>>> {\n const call = async (name: string, input: unknown): Promise<NanoResult<unknown>> => {\n const why = gone()\n if (why) return why\n const provides = (impl(live, to)?.provides ?? []).filter(i => Object.values(i.ops).some(o => o.kind === 'action' && o.name === name))\n const ports = provides.map(i => port(i, i.ops[name]!))\n if (ports.length === 0) return failure('unknown-op', `${to} has no action ${name}`)\n if (ports.length > 1) return failure('not-unique', `${to}: ${name} is an action of more than one interface`)\n return act(live, runtime, from, to, ports[0]!, input, 'call', chain)\n }\n // ponytail: any name reads as an op (a Proxy) except `then`, so awaiting a client is harmless; an op named `then` is unreachable.\n return new Proxy({}, { get: (_, name) => (typeof name === 'string' && name !== 'then' ? (input: unknown) => call(name, input) : undefined) })\n}\n",
|
|
27
28
|
"/**\n * Subscribing is a message. `connect` sends `subscribe` from the On's owner (`to`: a pod or 'host') to its source pod\n * in its runtime: `delivered` once live, or `denied` when the runtime's policy refuses (then nothing is added). The\n * On's `end`, which every way an On ends goes through, sends `unsubscribe` (caused by the subscribe): `delivered` with\n * `success` when stopped, or with the `Fail` that ended it (the policy refusing it on apply).\n *\n * const c = connect(live, { runtime, from: 'store', port, to: 'host', gone, fn }, fail => …) // c.ok: c.value is the live On\n */\nimport { failure, success, type Fail, type NanoResult } from '../result.ts'\nimport { refusal, type Live, type On } from './messages.ts'\n\nexport function connect(live: Live, w: Omit<On, 'end'>, ended: (fail?: Fail) => void = () => {}): NanoResult<On> {\n const { trace } = live, id = trace.id()\n const say = (kind: 'subscribe' | 'unsubscribe', mid: string) =>\n trace.emit({ type: 'sent', id: mid, runtime: w.runtime, kind, from: w.to, to: w.from, port: w.port, correlation: id, ...(mid !== id && { cause: id }) })\n say('subscribe', id)\n const why = refusal(live, { runtime: w.runtime, kind: 'subscribe', from: w.to, to: w.from, port: w.port })\n if (why !== undefined) { trace.emit({ type: 'denied', id, reason: why }); return failure('denied', why) }\n trace.emit({ type: 'delivered', id, result: success(undefined), ms: 0 })\n let open = true\n const key = `${w.from} ${w.port}`\n const on: On = { ...w, end(fail) {\n if (!open) return\n open = false\n live.listeners.ons.delete(on)\n const set = live.listeners.heard.get(key)\n if (set?.delete(on) && set.size === 0) live.listeners.heard.delete(key)\n const u = trace.id()\n say('unsubscribe', u)\n trace.emit({ type: 'delivered', id: u, result: fail ? { ok: false, fail } : success(undefined), ms: 0 })\n ended(fail)\n } }\n live.listeners.ons.add(on)\n const set = live.listeners.heard.get(key)\n if (set) set.add(on); else live.listeners.heard.set(key, new Set([on]))\n return success(on)\n}\n",
|
|
28
29
|
"import { thrown } from '../plain.ts'\nimport type { Fail } from '../result.ts'\n\n/**\n * The AsyncIterable form of a subscription (`on(op)`, `subscribe(op)` with no callback). Its behaviour, as a caller sees it:\n * - **It connects when it is made**, exactly like the callback form: it hears every emission from that line on, and a\n * refusal or a missing source throws there (from `listen`), not at the loop.\n * - **It is iterated once.** A second `for await` over the same iterable throws; subscribe again for another.\n * - **It ends in one of two ways.** `done` when it simply stops (the loop's `break`, the build or the application\n * closing, `apply` removing its source); or, after yielding what it had already received, by throwing an `Error`\n * carrying the `Fail` that ended it (a policy refusing it on a later `apply`).\n * - **It never ends by itself while nobody iterates it**: an iterable made and not looped over keeps its listener\n * until it is ended as above.\n *\n * `ended(stop)` hands over the way nano ends it (before connecting, so a listener dropped at once still ends);\n * `listen(fn)` connects and gives the unsubscribe that `break` calls.\n *\n * for await (const e of iterate(fn => on(op, fn), stop => …)) … // values pushed by `fn`, in order, until ended\n */\nexport function iterate<T>(listen: (fn: (v: T) => void) => () => void, ended: (stop: (fail?: Fail) => void) => void): AsyncIterable<T> {\n // ponytail: unbounded buffer for a slow reader; backpressure is decided with the performance work\n const queue: T[] = []\n let done = false, failed: Fail | undefined, wake: (() => void) | undefined, used = false\n const stop = (fail?: Fail) => { if (!done) failed = fail; done = true; wake?.() }\n ended(stop)\n const off = listen(v => { queue.push(v); wake?.() })\n return { [Symbol.asyncIterator]() {\n if (used) throw new Error('iterable: iterate once; subscribe again for another')\n used = true\n return {\n async next() {\n while (!queue.length && !done) await new Promise<void>(r => { wake = r })\n if (queue.length) return { done: false as const, value: queue.shift()! }\n if (failed) throw thrown(failed)\n return { done: true as const, value: undefined }\n },\n async return() { off(); stop(); return { done: true as const, value: undefined } },\n }\n } }\n}\n",
|
|
29
|
-
"/**\n * The context a pod's factory gets, for pod `name`: it reads the deployment as it is at each call, over the call\n * subscriptions from `name` in every runtime that lists one (placed there or not), each a `Selection`. `onClose` adds a listener to the\n * build this context belongs to; the `on` subscriptions this build made are dropped through it.\n *\n * const ctx = contextFor(live, 'send', fn => …)\n * ctx.one(KV) // success(the one KV wired from send, in whichever runtime), or not-found / not-unique\n * kv.call.put('k'); kv.on(KV.ops.put, fn) // sent in that runtime; hear its put calls ({ input, output }) there until this build closes\n * await ctx.publish(tick, 1) // emitted: one message per pipe from send with that source, and to `on` subscribers\n */\nimport type { NanoContext, Selection } from '../context.ts'\nimport type { Client, Interface } from '../iface.ts'\nimport { port } from '../iface.ts'\nimport type { Op } from '../op.ts'\nimport { failure, success, type Fail, type NanoResult } from '../result.ts'\nimport { matches, selectorData, type Selector, type SelectorData } from '../selector.ts'\nimport { client, emit } from './emit.ts'\nimport { connect as connectOn } from './connection.ts'\nimport { iterate } from './iterate.ts'\nimport { thrown } from '../plain.ts'\nimport { impl, placedIn, type Live, type On } from './messages.ts'\nimport { lookup } from './lookup.ts'\n\n/** The port of `o` on `pod`'s implementation, if it has `o`. */\nconst portOf = (live: Live, pod: string, o: Op) => {\n const i = impl(live, pod)?.provides.find(i => i.byCoord.has(o?.coord))\n return i && port(i, o)\n}\n\n/** `s` as selector data; undefined if it is no selector at all. */\nconst dataOf = (s: unknown) => (typeof s === 'object' && s ? selectorData(s as Selector) : undefined)\n\n/** Whether `data` fits event `o`'s schema; unreadable data does not. */\nconst fitsData = (o: Op, data: unknown) => { try { return !o.output || o.output.check(data) } catch { return false } }\n\
|
|
30
|
+
"/**\n * The context a pod's factory gets, for pod `name`: it reads the deployment as it is at each call, over the call\n * subscriptions from `name` in every runtime that lists one (placed there or not), each a `Selection`. `onClose` adds a listener to the\n * build this context belongs to; the `on` subscriptions this build made are dropped through it. With `invoked` it is a\n * handler invocation's: `callingOp` is its port, and its calls and publishes continue that message's chain\n * (`correlation`, `cause` = its id); `on` and listeners stay the build's.\n *\n * const ctx = contextFor(live, 'send', fn => …)\n * ctx.one(KV) // success(the one KV wired from send, in whichever runtime), or not-found / not-unique\n * kv.call.put('k'); kv.on(KV.ops.put, fn) // sent in that runtime; hear its put calls ({ input, output }) there until this build closes\n * await ctx.publish(tick, 1) // emitted: one message per pipe from send with that source, and to `on` subscribers\n */\nimport type { NanoContext, Selection } from '../context.ts'\nimport type { Client, Interface } from '../iface.ts'\nimport { port } from '../iface.ts'\nimport type { Op } from '../op.ts'\nimport { failure, success, type Fail, type NanoResult } from '../result.ts'\nimport { matches, selectorData, type Selector, type SelectorData } from '../selector.ts'\nimport { client, emit } from './emit.ts'\nimport { connect as connectOn } from './connection.ts'\nimport { iterate } from './iterate.ts'\nimport { thrown } from '../plain.ts'\nimport { impl, placedIn, type Live, type On } from './messages.ts'\nimport { lookup } from './lookup.ts'\n\n/** The port of `o` on `pod`'s implementation, if it has `o`. */\nconst portOf = (live: Live, pod: string, o: Op) => {\n const i = impl(live, pod)?.provides.find(i => i.byCoord.has(o?.coord))\n return i && port(i, o)\n}\n\n/** `s` as selector data; undefined if it is no selector at all. */\nconst dataOf = (s: unknown) => (typeof s === 'object' && s ? selectorData(s as Selector) : undefined)\n\n/** Whether `data` fits event `o`'s schema; unreadable data does not. */\nconst fitsData = (o: Op, data: unknown) => { try { return !o.output || o.output.check(data) } catch { return false } }\n\ntype Heard = { pod: string; fn: Parameters<NanoContext['addOnPodChangeListener']>[0] }\n/** Each build's `on` subscriptions (`mine`, undefined once it has closed) and pod-change listeners, by its `onClose`. */\nconst builds = new WeakMap<object, { mine?: Set<On>; heard: Set<Heard> }>()\n\n/** The build's state, made (and dropped at its close) the first time its `onClose` is seen. */\nfunction buildOf(live: Live, onClose: NanoContext['addOnCloseListener']) {\n const known = builds.get(onClose)\n if (known) return known\n const b: { mine?: Set<On>; heard: Set<Heard> } = { mine: new Set(), heard: new Set() }\n builds.set(onClose, b)\n onClose(() => { for (const o of [...b.mine!]) o.end(); b.mine = undefined; for (const h of b.heard) live.listeners.podChanges.delete(h) })\n return b\n}\n\nexport function contextFor(live: Live, name: string, onClose: NanoContext['addOnCloseListener'], invoked?: { id: string; correlation: string; port: string }): Omit<NanoContext, 'deps'> {\n const b = buildOf(live, onClose), chain = invoked && { correlation: invoked.correlation, cause: invoked.id }\n\n /** The call edge from `name` to `to` in `runtime`, read live: a call or delivery through it after `apply` removed it is not-found. */\n const selection = <I extends Interface>(runtime: string, to: string): Selection<I> => {\n const gone = () => lookup(live.now()).calls.has(`${runtime} ${name} ${to}`)\n ? undefined : failure('not-found', `${name}->${to} is no longer in ${runtime}`)\n return { pod: to, runtime, call: client(live, runtime, name, to, gone, chain) as Client<I>, on(o: Op, fn?: (e: never) => void | Promise<void>) {\n let stop: ((fail?: Fail) => void) | undefined\n const connect = (fn: On['fn']) => {\n const p = portOf(live, to, o)\n if (!p) throw thrown({ type: 'unknown-op', reason: `${name}: ${o?.name} is not an op of ${to}` })\n const why = !b.mine ? failure('not-found', `${name}: this build is closed`) : gone()\n if (why && !why.ok) throw thrown(why.fail)\n const c = connectOn(live, { runtime, from: to, port: p, to: name, gone, fn }, f => stop?.(f))\n if (!c.ok) throw thrown(c.fail)\n const sub = c.value\n b.mine!.add(sub)\n return () => { b.mine?.delete(sub); sub.end() }\n }\n return fn ? connect(fn as On['fn']) : iterate(connect, s => { stop = s })\n } } as Selection<I>\n }\n\n /** Every call subscription from `name` matching `s`: runtimes in order, then subscriptions in order. */\n const selections = <I extends Interface>(s: I | SelectorData): Selection<I>[] => {\n const want = dataOf(s), d = live.now()\n if (!want) return []\n return (lookup(d).callsFrom.get(name) ?? []).flatMap(({ runtime, to }) => {\n const sub = { to }\n const i = impl(live, sub.to)!\n const target = { name: sub.to, runtime, implementation: i.coord, provider: i.provider,\n provides: new Set(i.provides.map(i => i.coord)), tags: new Set(d.tags?.[sub.to] ?? []) }\n return matches(want, target) ? [selection<I>(runtime, sub.to)] : []\n })\n }\n\n const ctx: Omit<NanoContext, 'deps'> = {\n self: name,\n ...(invoked && { callingOp: invoked.port }),\n get runtimes() { return placedIn(live, name).map(([id]) => id) },\n one<I extends Interface>(s: I | SelectorData): NanoResult<Selection<I>> {\n const all = selections<I>(s), what = JSON.stringify(dataOf(s))\n if (all.length === 0) return failure('not-found', `${name}: nothing wired matches ${what}`)\n if (all.length > 1) return failure('not-unique', `${name}: ${all.length} wired match ${what}`)\n return success(all[0]!)\n },\n all: selections,\n async publish(o, data) {\n const p = portOf(live, name, o)\n if (!p || o.kind !== 'event') return live.trace.emit({ type: 'warning', reason: `${name}: ${o?.name} is not one of its events` })\n if (!fitsData(o, data)) return live.trace.emit({ type: 'failure', pod: name, reason: `${name}: ${o.name} data does not fit ${o.output?.label ?? 'its schema'}` })\n await emit(live, name, p, { output: data }, chain)\n },\n addOnPodChangeListener(fn) {\n if (!b.mine) return // closed build\n const h = { pod: name, fn }; b.heard.add(h); live.listeners.podChanges.add(h)\n },\n addOnCloseListener: onClose,\n }\n return ctx\n}\n",
|
|
30
31
|
"/**\n * A build's sources, run by the application as it runs handlers: each starts once, when its pod is built; each value\n * it yields is published as the pod's event (`ctx.publish`: checked against the event's schema, along pipes and to `on`\n * subscribers); it is stopped (`return()`) when the build closes; a throw is a `failure` of that pod on the stream, and\n * the pod's actions keep working.\n *\n * start(live, 'todos', ctx, built.sources, c.add) // after make succeeds\n */\nimport type { NanoContext } from '../context.ts'\nimport type { Source } from '../implementation.ts'\nimport type { Live } from './messages.ts'\n\nexport function start(live: Live, pod: string, ctx: Omit<NanoContext, 'deps'>, sources: ReadonlyMap<string, Source>, onClose: NanoContext['addOnCloseListener']) {\n for (const { op, run } of sources.values()) {\n const it = run()[Symbol.asyncIterator]()\n // `return()` queues behind a pending `next()`; that ends because the build's `on` iterations end at close.\n onClose(() => { void it.return?.() })\n void (async () => {\n try { for (let r = await it.next(); !r.done; r = await it.next()) await ctx.publish(op, r.value as never) }\n catch (e) { live.trace.emit({ type: 'failure', pod, reason: `${op.name} threw ${e instanceof Error ? e.message : String(e)}` }) }\n })()\n }\n}\n",
|
|
31
|
-
"/**\n * Instances: at most one build per pod name, shared by everyone who needs it meanwhile. Each build has its own close\n * listeners. A failed build closes (`closed`) and caches nothing, so the next need builds again; forgetting drops the\n * entry and closes that build at once, even one still under way (a listener it adds later runs as it is added), without\n * waiting for or touching calls already handed it. A pod being closed is built again only once its close has settled,\n * and a build forgotten meanwhile never starts. `close` also waits for builds under way, which then build nothing.\n *\n * const pods = instances(live)\n * await pods.get('db') // NanoResult<{ implementation, handlers by port }>: built now, or the build already made or under way\n * await pods.forget('db', 'restarted') // its listeners have run; the next get builds a fresh closure; calls in flight keep the old one\n * await pods.close() // every build closed (`closed`); every later get is not-found\n */\nimport type { NanoContext } from '../context.ts'\nimport type { Implementation } from '../implementation.ts'\nimport type { Pod } from '../pod.ts'\nimport { failure, success, type NanoResult } from '../result.ts'\nimport { contextFor } from './context.ts'\nimport { start } from './sources.ts'\nimport { attempt, within, type Live } from './messages.ts'\n\ntype Made = ReturnType<Live['instance']>\ntype OnClose = Parameters<NanoContext['addOnCloseListener']>[0]\ntype Reason = Parameters<OnClose>[0]['reason']\n\n/**\n * One build's close listeners. `close` runs them once, in the order added, each within the timeout, a throw or a\n * timeout a `failure`; then `closed`. A listener added once closing has begun runs at once.\n */\nfunction closer(live: Live, pod: string) {\n const listeners: OnClose[] = []\n let reason: Reason | undefined, closing: Promise<void> | undefined\n const run = (fn: OnClose) => attempt(live, pod, `closing ${pod}`, () => fn({ reason: reason! }))\n return {\n add(fn: OnClose) { if (reason) void run(fn); else listeners.push(fn) },\n began: () => reason !== undefined,\n close: (why: Reason) => closing ??= (async () => {\n reason = why\n for (const fn of listeners) await run(fn)\n live.trace.emit({ type: 'closed', pod, reason: why })\n })(),\n }\n}\n\n/** `pod`'s implementation: the registry's for a host pod, else `live.isolate`'s stand-in, which must keep its coord. */\nasync function implementationOf(live: Live, name: string, pod: Pod): Promise<NanoResult<Implementation> | undefined> {\n if ((pod.isolation ?? 'host') === 'host') { const i = live.registry.implementation(pod.implementation); return i && success(i) }\n const { isolate } = live\n if (!isolate) return failure('invalid-input', `no host for isolation ${pod.isolation}`)\n const r = await within(() => isolate(name, structuredClone(pod)), live.timeoutMs, `isolating ${name}`)\n if (!r.ok || r.value.coord === pod.implementation) return r\n return failure('invalid-input', `isolate gave ${r.value.coord} for ${pod.implementation}`)\n}\n\nexport function instances(live: Live) {\n const made = new Map<string, { build: Made; close: (why: Reason) => Promise<void> }>()\n const closing = new Map<string, Promise<void>>()\n let closed = false\n\n async function build(name: string, c: ReturnType<typeof closer>): Made {\n await closing.get(name)\n if (c.began()) return failure('not-found', `${name} was closed before it was built`)\n const pod = live.now().pods[name]\n const found = pod && await implementationOf(live, name, pod)\n if (!pod || !found) return failure('not-found', `no pod ${name}`)\n if (!found.ok) { live.trace.emit({ type: 'failure', pod: name, reason: found.fail.reason }); await c.close('closed'); return found }\n const impl = found.value\n const ctx = contextFor(live, name, c.add)\n const r = await within(() => impl.make(ctx, pod.config), live.timeoutMs, `building ${name}`)\n // Closed while `make` ran: its listeners have run as added; nothing is built after `closed`.\n if (closed) return failure('not-found', 'application is closed')\n live.trace.emit(r.ok ? { type: 'built', pod: name } : { type: 'failure', pod: name, reason: r.fail.reason })\n if (!r.ok) await c.close('closed')\n if (!r.ok) return r\n start(live, name, ctx, r.value.sources, c.add) // sources run as handlers do: from here until the build closes\n return success({ implementation: impl, handlers: r.value.handlers })\n }\n\n async function forget(name: string, why: Reason) {\n const e = made.get(name)\n if (!e) return\n made.delete(name)\n // Chained: a build waits for every close of its name still settling, not only the latest.\n const p = Promise.all([closing.get(name), e.close(why)]).then(() => {})\n closing.set(name, p)\n await p\n if (closing.get(name) === p) closing.delete(name)\n }\n\n return {\n get(name: string): Made {\n if (closed) return Promise.resolve(failure('not-found', 'application is closed'))\n let e = made.get(name)\n if (!e) {\n const c = closer(live, name), mine = { build: build(name, c), close: c.close }\n made.set(name, (e = mine))\n void mine.build.then(r => {
|
|
32
|
+
"/**\n * Instances: at most one build per pod name, shared by everyone who needs it meanwhile. Each build has its own close\n * listeners. A failed build closes (`closed`) and caches nothing, so the next need builds again; forgetting drops the\n * entry and closes that build at once, even one still under way (a listener it adds later runs as it is added), without\n * waiting for or touching calls already handed it. A pod being closed is built again only once its close has settled,\n * and a build forgotten meanwhile never starts. `close` also waits for builds under way, which then build nothing.\n *\n * const pods = instances(live)\n * await pods.get('db') // NanoResult<{ implementation, handlers by port }>: built now, or the build already made or under way\n * await pods.forget('db', 'restarted') // its listeners have run; the next get builds a fresh closure; calls in flight keep the old one\n * await pods.close() // every build closed (`closed`); every later get is not-found\n * pods.status('db') // 'running', 'not started', 'stopped' or 'failed'\n */\nimport type { NanoContext } from '../context.ts'\nimport type { Implementation } from '../implementation.ts'\nimport type { Pod } from '../pod.ts'\nimport { failure, success, type NanoResult } from '../result.ts'\nimport { contextFor } from './context.ts'\nimport { start } from './sources.ts'\nimport { attempt, within, type Live } from './messages.ts'\n\ntype Made = ReturnType<Live['instance']>\ntype OnClose = Parameters<NanoContext['addOnCloseListener']>[0]\ntype Reason = Parameters<OnClose>[0]['reason']\n/** A placed pod's lifecycle now: built, never built (or forgotten since), closed with the application, or its last build failed. */\nexport type PodStatus = 'running' | 'not started' | 'stopped' | 'failed'\n\n/**\n * One build's close listeners. `close` runs them once, in the order added, each within the timeout, a throw or a\n * timeout a `failure`; then `closed`. A listener added once closing has begun runs at once.\n */\nfunction closer(live: Live, pod: string) {\n const listeners: OnClose[] = []\n let reason: Reason | undefined, closing: Promise<void> | undefined\n const run = (fn: OnClose) => attempt(live, pod, `closing ${pod}`, () => fn({ reason: reason! }))\n return {\n add(fn: OnClose) { if (reason) void run(fn); else listeners.push(fn) },\n began: () => reason !== undefined,\n close: (why: Reason) => closing ??= (async () => {\n reason = why\n for (const fn of listeners) await run(fn)\n live.trace.emit({ type: 'closed', pod, reason: why })\n })(),\n }\n}\n\n/** `pod`'s implementation: the registry's for a host pod, else `live.isolate`'s stand-in, which must keep its coord. */\nasync function implementationOf(live: Live, name: string, pod: Pod): Promise<NanoResult<Implementation> | undefined> {\n if ((pod.isolation ?? 'host') === 'host') { const i = live.registry.implementation(pod.implementation); return i && success(i) }\n const { isolate } = live\n if (!isolate) return failure('invalid-input', `no host for isolation ${pod.isolation}`)\n const r = await within(() => isolate(name, structuredClone(pod)), live.timeoutMs, `isolating ${name}`)\n if (!r.ok || r.value.coord === pod.implementation) return r\n return failure('invalid-input', `isolate gave ${r.value.coord} for ${pod.implementation}`)\n}\n\nexport function instances(live: Live) {\n const made = new Map<string, { build: Made; close: (why: Reason) => Promise<void> }>()\n const closing = new Map<string, Promise<void>>()\n /** The outcome of each name's current build; none: not built since placed or forgotten. */\n const outcome = new Map<string, 'running' | 'failed'>()\n let closed = false\n\n async function build(name: string, c: ReturnType<typeof closer>): Made {\n await closing.get(name)\n if (c.began()) return failure('not-found', `${name} was closed before it was built`)\n const pod = live.now().pods[name]\n const found = pod && await implementationOf(live, name, pod)\n if (!pod || !found) return failure('not-found', `no pod ${name}`)\n if (!found.ok) { live.trace.emit({ type: 'failure', pod: name, reason: found.fail.reason }); await c.close('closed'); return found }\n const impl = found.value\n const ctx = contextFor(live, name, c.add)\n const r = await within(() => impl.make(ctx, pod.config), live.timeoutMs, `building ${name}`)\n // Closed while `make` ran: its listeners have run as added; nothing is built after `closed`.\n if (closed) return failure('not-found', 'application is closed')\n live.trace.emit(r.ok ? { type: 'built', pod: name } : { type: 'failure', pod: name, reason: r.fail.reason })\n if (!r.ok) await c.close('closed')\n if (!r.ok) return r\n start(live, name, ctx, r.value.sources, c.add) // sources run as handlers do: from here until the build closes\n return success({ implementation: impl, handlers: r.value.handlers, onClose: c.add })\n }\n\n async function forget(name: string, why: Reason) {\n const e = made.get(name)\n outcome.delete(name)\n if (!e) return\n made.delete(name)\n // Chained: a build waits for every close of its name still settling, not only the latest.\n const p = Promise.all([closing.get(name), e.close(why)]).then(() => {})\n closing.set(name, p)\n await p\n if (closing.get(name) === p) closing.delete(name)\n }\n\n return {\n get(name: string): Made {\n if (closed) return Promise.resolve(failure('not-found', 'application is closed'))\n let e = made.get(name)\n if (!e) {\n const c = closer(live, name), mine = { build: build(name, c), close: c.close }\n made.set(name, (e = mine))\n void mine.build.then(r => {\n if (made.get(name) !== mine) return\n outcome.set(name, r.ok ? 'running' : 'failed')\n if (!r.ok) made.delete(name)\n })\n }\n return e.build\n },\n forget,\n status: (name: string): PodStatus => closed ? 'stopped' : outcome.get(name) ?? 'not started',\n async close() {\n closed = true\n const builds = [...made.values()].map(e => e.build)\n await Promise.all([...[...made.keys()].map(n => forget(n, 'closed')), ...builds])\n },\n }\n}\n",
|
|
32
33
|
"/**\n * Pod changes: after an apply, each pod listening (`ctx.addOnPodChangeListener`) hears the other pods added to or\n * removed from the runtimes it is placed in, if that runtime's policy allows `'lifecycle'`.\n *\n * await notifyPodChanges(live, before) // `before`: the deployment the apply replaced; `live.now()` is the new one\n */\nimport type { AppDeployment } from '../deployment.ts'\nimport { attempt, refusal, type Live } from './messages.ts'\n\nexport async function notifyPodChanges(live: Live, before: AppDeployment): Promise<void> {\n const after = live.now(), told = new Set<unknown>()\n for (const id of new Set([...Object.keys(before.runtimes), ...Object.keys(after.runtimes)])) {\n const was = before.runtimes[id]?.pods ?? [], is = after.runtimes[id]?.pods ?? []\n const changes = [...is.filter(p => !was.includes(p)).map(p => ({ type: 'added' as const, p, d: after })),\n ...was.filter(p => !is.includes(p)).map(p => ({ type: 'removed' as const, p, d: before }))]\n for (const l of [...live.listeners.podChanges]) {\n if (!is.includes(l.pod)) continue\n for (const c of changes) {\n if (c.p === l.pod) continue\n const why = refusal(live, { runtime: id, kind: 'lifecycle', from: l.pod, to: c.p })\n if (why !== undefined) {\n if (!told.has(l)) { told.add(l); live.trace.emit({ type: 'denied', id: live.trace.id(), reason: why }) } // once per listener per apply\n continue\n }\n const implementation = live.registry.implementation(c.d.pods[c.p]?.implementation ?? '')?.coord ?? ''\n const p = attempt(live, l.pod, `${l.pod} hearing ${c.type} ${c.p}`, () => l.fn({ type: c.type, runtime: id, pod: c.p, implementation }))\n const done = () => { live.flying.delete(p) } // in flight, not awaited: a callback may itself apply or restart\n live.flying.add(p); p.then(done, done)\n }\n }\n }\n}\n",
|
|
33
|
-
"/**\n * `runtimeView.listen`: the one stream (`trace`) filtered to runtime `runtime`: its `sent` messages and their\n * `delivered`/`denied`, `applied` narrowed to the pods placed there (now or before), and the lifecycle of those pods, even as `apply` removes\n * them. Warnings are the operator's: `app.listen` only. A subscribe is a message too, so a refused one shows here.\n *\n * const off = listen(live, 'front', e => …) // nothing from another runtime\n */\nimport type { Live } from './messages.ts'\nimport type { AppEvent } from './stream.ts'\n\nexport function listen(live: Live, runtime: string, fn: (e: AppEvent) => void): () => void {\n const mine = new Set<string>() // ids sent here, not yet answered\n const seen = new Set<string>() // placed here, until an apply has moved them out and been heard\n const refresh = () => { for (const p of live.now().runtimes[runtime]?.pods ?? []) seen.add(p) }\n refresh()\n return live.trace.listen(e => {\n refresh()\n if (e.type === 'sent') { if (e.runtime === runtime) { mine.add(e.id); fn(e) } }\n else if (e.type === 'delivered' || e.type === 'denied') { if (mine.delete(e.id)) fn(e) }\n else if (e.type === 'applied') {\n const keep = (l: string[]) => l.filter(p => seen.has(p))\n const n = { added: keep(e.added), removed: keep(e.removed), changed: keep(e.changed), rewired: keep(e.rewired) }\n if (Object.values(n).some(l => l.length)) fn({ type: 'applied', ...n })\n const here = live.now().runtimes[runtime]?.pods ?? []\n for (const p of seen) if (!here.includes(p)) seen.delete(p) // its removal and closing are delivered\n }\n else if (e.type !== 'warning' && e.pod !== undefined && seen.has(e.pod)) fn(e)\n })\n}\n",
|
|
34
|
-
"/**\n * A
|
|
35
|
-
"/**\n *
|
|
36
|
-
"/**\n * The
|
|
34
|
+
"/**\n * `runtimeView.listen`: the one stream (`trace`) filtered to runtime `runtime`: its `sent` messages and their\n * `delivered`/`denied`, `applied` narrowed to the pods placed there (now or before), and the lifecycle of those pods, even as `apply` removes\n * them. Warnings are the operator's: `app.listen` only. A subscribe is a message too, so a refused one shows here.\n *\n * const off = listen(live, 'front', e => …) // nothing from another runtime\n */\nimport type { Live } from './messages.ts'\nimport type { AppEvent } from './stream.ts'\n\nexport function listen(live: Live, runtime: string, fn: (e: AppEvent) => void): () => void {\n const mine = new Set<string>() // ids sent here, not yet answered\n const seen = new Set<string>() // placed here, until an apply has moved them out and been heard\n const refresh = () => { for (const p of live.now().runtimes[runtime]?.pods ?? []) seen.add(p) }\n refresh()\n return live.trace.listen(e => {\n refresh()\n if (e.type === 'sent') { if (e.runtime === runtime) { mine.add(e.id); fn(e) } }\n else if (e.type === 'delivered' || e.type === 'denied') { if (mine.delete(e.id)) fn(e) }\n else if (e.type === 'applied') {\n const keep = (l: string[]) => l.filter(p => seen.has(p))\n const n = { added: keep(e.added), removed: keep(e.removed), changed: keep(e.changed), rewired: keep(e.rewired) }\n if (Object.values(n).some(l => l.length)) fn({ type: 'applied', caller: e.caller, ...n })\n const here = live.now().runtimes[runtime]?.pods ?? []\n for (const p of seen) if (!here.includes(p)) seen.delete(p) // its removal and closing are delivered\n }\n else if (e.type !== 'warning' && e.pod !== undefined && seen.has(e.pod)) fn(e)\n })\n}\n",
|
|
35
|
+
"/**\n * A pod started explicitly, in one runtime (ADR-0031). `start(pod)` is a message of kind `start` from the host, with no\n * port: `sent`, asked of the runtime's policy, then `delivered` with the build's result (or `denied`). It builds through\n * `live.instance`, the one build per pod however many ask. `getOrCreate(pod)` reuses a running pod, or starts it, and\n * gives `call(pod)`'s client. Of callers racing on one pod in one runtime, one starts it; the rest find it started once it settles.\n *\n * const s = starter(live, at, status, call)\n * await s.start('db') // NanoResult<void>: not-found, invalid-input \"already running\", denied, or the build's Fail\n * await s.getOrCreate('db') // NanoResult<{ started, pod }>\n */\nimport { failure, success, type Fail, type NanoResult } from '../result.ts'\nimport type { client } from './emit.ts'\nimport type { PodStatus } from './instances.ts'\nimport { lookup } from './lookup.ts'\nimport { refusal, type Live } from './messages.ts'\n\ntype Client = ReturnType<typeof client>\ntype At = () => { ok: true; value: string } | { ok: false; fail: Fail }\n\n/** Starts under way, by application and `runtime|pod`: a caller in another runtime is asked its own policy (the build is still one per pod). */\nconst pending = new WeakMap<Live, Map<string, Promise<NanoResult<void>>>>()\n\nexport function starter(live: Live, at: At, status: (pod: string) => PodStatus, call: (pod: string) => Client) {\n const under = pending.get(live) ?? new Map<string, Promise<NanoResult<void>>>()\n pending.set(live, under)\n\n /** The message itself: sent, policed, the build, delivered. */\n async function send(runtime: string, pod: string): Promise<NanoResult<void>> {\n const id = live.trace.id()\n live.trace.emit({ type: 'sent', id, runtime, kind: 'start', from: 'host', to: pod, correlation: id })\n const reason = refusal(live, { runtime, kind: 'start', from: 'host', to: pod })\n if (reason !== undefined) { live.trace.emit({ type: 'denied', id, reason }); return failure('denied', reason) }\n const t0 = performance.now()\n const made = await live.instance(pod)\n const r: NanoResult<void> = made.ok ? success(undefined) : made\n live.trace.emit({ type: 'delivered', id, result: r, ms: performance.now() - t0 })\n return r\n }\n\n /** `started`: whether this caller started it (else it was running, or another caller's start built it). */\n async function begin(pod: string): Promise<NanoResult<{ started: boolean }>> {\n const r = at()\n if (!r.ok) return r\n if (live.closed()) return failure('not-found', 'application is closed')\n if (!lookup(live.now()).placed.get(r.value)?.has(pod)) return failure('not-found', `${pod} is not placed in ${r.value}`)\n const key = `${r.value}|${pod}`, other = under.get(key)\n if (other) { const o = await other; return o.ok ? success({ started: false }) : o }\n if (status(pod) === 'running') return success({ started: false })\n const mine = send(r.value, pod)\n under.set(key, mine)\n try { const m = await mine; return m.ok ? success({ started: true }) : m } finally { if (under.get(key) === mine) under.delete(key) }\n }\n\n return {\n async start(pod: string): Promise<NanoResult<void>> {\n const r = await begin(pod)\n return !r.ok ? r : r.value.started ? success(undefined) : failure('invalid-input', `${pod} is already running`)\n },\n async getOrCreate(pod: string): Promise<NanoResult<{ started: boolean; pod: Client }>> {\n const r = await begin(pod)\n return r.ok ? success({ started: r.value.started, pod: call(pod) }) : r\n },\n }\n}\n",
|
|
36
|
+
"/**\n * A runtime as the host sees it (`app.runtime(id)`): only the pods placed there, every message\n * policed by its policy. `resolve(api, where?)` answers the one pod providing `api` there, narrowed by `where.pod`, with\n * the implementation found and the plain object over it; or why not (`not-found`, `not-unique`). A call the policy refuses is `denied` at the call.\n *\n * const r = app.runtime('frontend').resolve(TodoList) // r.ok: r.pod, r.runtime, r.implementation, r.value; else r.reason\n * const todos = r.getOrThrow() // the plain object, or an Error carrying r.fail\n */\nimport type { Static, TSchema } from 'typebox'\nimport { port, type Interface } from '../iface.ts'\nimport type { Op } from '../op.ts'\nimport { plain, thrown } from '../plain.ts'\nimport { failure, success, type Fail, type NanoResult } from '../result.ts'\nimport { client } from './emit.ts'\nimport { connect as connectOn } from './connection.ts'\nimport { iterate } from './iterate.ts'\nimport { listen } from './listen.ts'\nimport type { AppEvent } from './stream.ts'\nimport { impl, refusal, type Live, type On } from './messages.ts'\nimport { lookup } from './lookup.ts'\nimport { starter } from './start.ts'\nimport type { PodStatus } from './instances.ts'\n\ntype Reason = 'not-found' | 'not-unique' | 'denied'\nexport type Resolution<T> =\n | { readonly ok: true; readonly runtime: string; readonly pod: string; readonly implementation: string; readonly value: T; getOrThrow(): T }\n | { readonly ok: false; readonly reason: Reason; readonly fail: Fail; getOrThrow(): never }\n\n/** A success, or a Fail whose type is one of the resolution reasons. */\ntype Found<T> = { ok: true; value: T } | { ok: false; fail: Fail & { type: Reason } }\nconst miss = (type: Reason, reason: string) => ({ ok: false as const, fail: { type, reason } })\n\ntype Where = { pod?: string }\ntype Placed = { pod: string; runtime: string; implementation: string }\ntype Client = Record<string, (input: unknown) => Promise<NanoResult<unknown>>>\n\n/** A runtime as the host sees it. */\nexport type RuntimeView = {\n resolve<I extends Interface>(api: I, where?: Where): Resolution<Interface.Type<I>>\n get<I extends Interface>(api: I, where?: Where): Interface.Type<I>\n call(pod: string): Client\n /**\n * Each successful call of action `op` travelling in this runtime, as `{ input, output }`, after it returns; gives an\n * unsubscribe. Like a pod's `on`: it connects at the call, and throws there an `Error` carrying the `Fail` when it\n * can't (`not-found`, `not-unique`, `denied`).\n */\n subscribe<O extends Op>(op: O, fn: (call: { input: In<O>; output: Out<O> }) => unknown): () => void\n /** The same calls as an AsyncIterable, connected and checked at the call, iterated once: `break` unsubscribes; `done`\n * when the source or the application goes; the `Fail` thrown when a later `apply`'s policy refuses it. */\n subscribe<O extends Op>(op: O): AsyncIterable<{ input: In<O>; output: Out<O> }>\n /** The application's one stream, filtered to this runtime: its messages and their outcomes, `applied`, and the lifecycle of its pods; gives an unsubscribe. */\n listen(fn: (e: AppEvent) => void): () => void\n /** `pod`'s lifecycle now (`running`, `not started`, `stopped`, `failed`); `not-found` if it is not placed here. */\n status(pod: string): NanoResult<PodStatus>\n /** Build `pod`, placed here and not running, by a `start` message from the host (ADR-0031): `not-found`, `invalid-input` \"already running\", `denied`, or the build's `Fail`. */\n start(pod: string): Promise<NanoResult<void>>\n /** `pod` running, reused (`started: false`) or started now (`true`), with `call(pod)`'s client; or `start`'s `Fail`. */\n getOrCreate(pod: string): Promise<NanoResult<{ started: boolean; pod: Client }>>\n}\ntype DataOf<S> = S extends TSchema ? Static<S> : unknown\ntype In<O> = O extends Op<infer I, any> ? DataOf<I> : unknown\ntype Out<O> = O extends Op<any, infer S> ? DataOf<S> : unknown\n\n/** The one pod placed in `runtime` providing `api` now, narrowed by `where`. */\nexport function placement(live: Live, runtime: string, api: Interface, where: Where): Found<Placed> {\n const found: Placed[] = []\n const named = where.pod !== undefined && lookup(live.now()).placed.get(runtime)?.has(where.pod) ? [where.pod] : undefined // a named pod: no scan\n for (const pod of named ?? (where.pod !== undefined ? [] : live.now().runtimes[runtime]?.pods ?? [])) {\n const i = impl(live, pod)\n if ((where.pod ?? pod) === pod && i?.provides.some(x => x.coord === api.coord)) found.push({ pod, runtime, implementation: i.coord })\n }\n const what = `${api.coord} in ${runtime}${where.pod ? ` at ${where.pod}` : ''}`\n if (!found.length) return miss('not-found', `no pod provides ${what}`)\n return found.length === 1 ? { ok: true, value: found[0]! } : miss('not-unique', `${found.length} pods provide ${what}`)\n}\n\nconst throws = (fail: Fail) => (): never => { throw thrown(fail) }\n\n/**\n * Runtime `id` (or, absent, the application's one runtime) as the host sees it, looked up again at each use, so one\n * added later by `apply` works and a missing one is `not-found`.\n * Its plain objects resolve again at each call, so a rewired placement is followed. `status` is the instances'; `start` and `getOrCreate` are `start.ts`'s.\n */\nexport function runtimeView(live: Live, status: (pod: string) => PodStatus, id?: string): RuntimeView {\n const at = () => id === undefined ? only(live) : named(live, id)\n const call = (pod: string): Client => {\n const r = at(), id = r.ok ? r.value : ''\n return client(live, id, 'host', pod, () => { const now = at(); return !now.ok ? now\n : now.value !== id ? failure('not-found', `runtime ${now.value} is not the one this client was made for`)\n : live.closed() ? failure('not-found', 'application is closed')\n : lookup(live.now()).placed.get(id)?.has(pod) ? undefined : failure('not-found', `${pod} is not placed in ${id}`) })\n }\n /** Placed, and reachable: the runtime's policy lets the host reach at least one op of `api` there (an action by\n * `call`, an event by `subscribe`); else `denied`, so nothing is learned of a runtime the host may not use. */\n const found = (api: Interface, where: Where): Found<Placed> => {\n const r = at()\n if (!r.ok) return r\n const p = placement(live, r.value, api, where)\n if (!p.ok) return p\n const reachable = Object.values(api.ops).some(o =>\n refusal(live, { runtime: r.value, kind: o.kind === 'event' ? 'subscribe' : 'call', from: 'host', to: p.value.pod, port: port(api, o) }) === undefined)\n return reachable ? p : miss('denied', `${r.value}'s policy lets the host reach no op of ${api.coord}`)\n }\n const resolve = <I extends Interface>(api: I, where: Where = {}): Resolution<Interface.Type<I>> => {\n const now = found(api, where)\n if (!now.ok) return { ok: false, reason: now.fail.type, fail: now.fail, getOrThrow: throws(now.fail) }\n const value = plain<Interface.Type<I>>(api, () => {\n const p = found(api, where)\n return p.ok ? success({ call: call(p.value.pod), on: (op: Op) => hear(op, undefined, { pod: p.value.pod }) as AsyncIterable<{ output: unknown }> }) : p // the resolved pod's, not any\n })\n return { ok: true, ...now.value, value, getOrThrow: () => value }\n }\n /** The host's `On` to the one pod providing `op` in this runtime; asked 'subscribe' once, now. */\n /** `subscribe`, narrowed by `where.pod` (a plain object's source methods hear the pod it resolved). */\n const hear = (op: Op, fn: On['fn'] | undefined, where: Where) => {\n let stop: ((fail?: Fail) => void) | undefined\n const connect = (fn: On['fn']) => {\n const r = at()\n if (!r.ok) return throws(r.fail)()\n const runtime = r.value\n const api = (live.now().runtimes[runtime]?.pods ?? []).flatMap(p => impl(live, p)?.provides ?? []).find(i => i.byCoord.has(op.coord))\n if (!api) return throws(miss('not-found', `no pod provides ${op.coord} in ${runtime}`).fail)()\n const p = placement(live, runtime, api, where)\n if (!p.ok) return throws(p.fail)()\n const from = p.value.pod\n const gone = () => !lookup(live.now()).placed.get(runtime)?.has(from)\n const c = connectOn(live, { runtime, from, port: port(api, op), to: 'host', gone, fn }, f => stop?.(f))\n if (!c.ok) throw thrown(c.fail)\n return () => c.value.end()\n }\n return fn ? connect(fn) : iterate(connect, s => { stop = s })\n }\n const subscribe = ((op: Op, fn?: On['fn']) => hear(op, fn, {})) as RuntimeView['subscribe']\n const watch = (fn: (e: AppEvent) => void) => { const r = at(); return r.ok ? listen(live, r.value, fn) : throws(r.fail)() }\n const statusOf = (pod: string): NanoResult<PodStatus> => { const r = at(); return !r.ok ? r\n : lookup(live.now()).placed.get(r.value)?.has(pod) ? success(status(pod)) : failure('not-found', `${pod} is not placed in ${r.value}`) }\n return { resolve, get: (api, where) => resolve(api, where).getOrThrow(), call, subscribe, listen: watch, status: statusOf, ...starter(live, at, status, call) }\n}\n\n/** Runtime `id` if the application has it now, else `not-found`. */\nconst named = (live: Live, id: string): Found<string> =>\n Object.hasOwn(live.now().runtimes, id) ? { ok: true, value: id } : miss('not-found', `no runtime ${id}`)\n\n/** The application's one runtime, or `not-unique` (\"name a runtime\") when it has several. */\nconst only = (live: Live): Found<string> => {\n const ids = Object.keys(live.now().runtimes)\n return ids.length === 1 ? { ok: true, value: ids[0]! } : miss(ids.length ? 'not-unique' : 'not-found', `${ids.length} runtimes: name a runtime`)\n}\n",
|
|
37
|
+
"/**\n * The application's one stream: builds, closes, restarts, changes, messages (`sent`, then `delivered` or `denied`) and problems,\n * in order, synchronously. A `sent` names its kind and its chain (a `start` has no port, ADR-0031): `correlation` is the first message's id, `cause` the\n * message that led to it. A throwing listener is swallowed.\n *\n * const s = stream()\n * const off = s.listen(e => { if (e.type === 'denied') log(e.id, e.reason) })\n * s.emit({ type: 'warning', reason: '…' }); s.id() // 'm1', then 'm2', …\n */\nimport type { NanoContext } from '../context.ts'\nimport type { NanoResult } from '../result.ts'\n\ntype Reason = Parameters<Parameters<NanoContext['addOnCloseListener']>[0]>[0]['reason']\n\nexport type AppEvent =\n | { type: 'built'; pod: string }\n | { type: 'closed'; pod: string; reason: Reason }\n | { type: 'restarted'; pod: string }\n | { type: 'applied'; caller: string; added: string[]; removed: string[]; changed: string[]; rewired: string[] }\n | { type: 'sent'; id: string; runtime: string; kind: 'call' | 'pipe' | 'on' | 'subscribe' | 'unsubscribe'; from: string; to: string; port: string; correlation: string; cause?: string; input?: unknown }\n | { type: 'sent'; id: string; runtime: string; kind: 'start'; from: 'host'; to: string; correlation: string; port?: never; cause?: never; input?: never }\n | { type: 'delivered'; id: string; result: NanoResult<unknown>; ms: number }\n | { type: 'denied'; id: string; reason: string }\n | { type: 'failure'; pod?: string; reason: string }\n | { type: 'warning'; reason: string }\n\nexport function stream() {\n const listeners = new Set<(e: AppEvent) => void>()\n let n = 0\n return {\n emit(e: AppEvent) { for (const fn of [...listeners]) try { fn(e) } catch { /* a listener never breaks the application */ } },\n listen(fn: (e: AppEvent) => void) { listeners.add(fn); return () => { listeners.delete(fn) } },\n id: () => `m${++n}`,\n }\n}\n",
|
|
38
|
+
"/**\n * The Application: the one live thing. It is created from runtimes (values), builds eager pods at once and lazy ones\n * on first need, carries every message through the runtime it travels in, and reports all of it on one stream.\n *\n * const app = (await Application.create(AppDeployment.assemble(appDeployment, registry).value, {})).value\n * const front = app.runtime('front') // the host as a member of runtime 'front': what it places, policed by its policy\n * await front.call('counter').inc(null) // from 'host', through runtime 'front' (app.call('front', 'counter') too)\n * await front.get(Counter).inc() // the one pod there providing Counter, as a plain object; a Fail throws\n * app.resolve(Counter) // app.runtime(the one runtime).resolve(Counter); several: not-unique\n * const app = await Application.load(new URL('./nano.json', import.meta.url)) // modules loaded, assembled, created\n * app.listen(e => …) // built, sent, delivered, denied, failure, …\n * await app.close() // every instance closed, deliveries under way settled; later calls not-found\n */\nimport { AppDeployment } from '../deployment.ts'\nimport type { Implementation } from '../implementation.ts'\nimport type { Pod } from '../pod.ts'\nimport type { Policy, Verdict } from '../policy.ts'\nimport { DeploymentPolicies, type DeploymentPolicy } from '../deployment-policy.ts'\nimport { Registry } from '../registry.ts'\nimport { failure, success, type NanoResult } from '../result.ts'\nimport type { Runtime } from '../runtime.ts'\nimport { diff } from './apply.ts'\nimport { loaded } from './load.ts'\nimport { compose } from './compose.ts'\nimport { instances } from './instances.ts'\nimport { notifyPodChanges } from './pod-changes.ts'\nimport { refusal, type Live } from './messages.ts'\nimport { runtimeView, type RuntimeView } from './resolve.ts'\nimport { stream, type AppEvent } from './stream.ts'\n\nexport type { AppEvent } from './stream.ts'\nexport type { Resolution } from './resolve.ts'\nexport type { PodStatus } from './instances.ts'\nexport { lookup, type Lookup } from './lookup.ts'\n\nexport type Application = {\n /** The runtime `id` as the host sees it; `resolve`, `get`, `call` and `subscribe` below are those of the one runtime (else `not-unique`). */\n runtime(id: string): RuntimeView\n /** `app.call(pod)`; `app.call(runtime, pod)` is `app.runtime(runtime).call(pod)`. */\n call(...at: [pod: string] | [runtime: string, pod: string]): ReturnType<RuntimeView['call']>\n get: RuntimeView['get']\n resolve: RuntimeView['resolve']\n subscribe: RuntimeView['subscribe']\n /** `caller` (default `'host'`) is asked of the deployment policy and recorded on `applied`. */\n apply(next: AppDeployment, opts?: { caller?: string }): Promise<NanoResult<void>>\n restart(pod: string): Promise<NanoResult<void>>\n deployment(): AppDeployment\n listen(fn: (e: AppEvent) => void): () => void\n close(): Promise<NanoResult<void>>\n}\n\n/** `isolate` gives the host's stand-in for a pod whose isolation isn't 'host' (same coord); without it such a pod fails. */\ntype Opts = { policies?: Record<string, Policy>; deploymentPolicy?: DeploymentPolicy; timeoutMs?: number; isolate?: (name: string, pod: Pod) => Implementation }\n\n/**\n * `runtimes` live. The application's deployment is its own: nobody else holds it, so only `apply` changes it; and its\n * maps have no prototype, so a pod or runtime named `constructor` or `toString` is only ever a name.\n */\nasync function create(runtimes: Record<string, Runtime>, opts: Opts = {}): Promise<NanoResult<Application>> {\n const composed = compose(runtimes, opts.policies)\n if (!composed.ok) return composed\n // No runtimes, no Pods and so no registry: such an application can only apply deployments naming no implementation.\n const registry = composed.value.registry ?? Registry.create()\n let current = composed.value.deployment, queue: Promise<unknown> = Promise.resolve()\n /** Set when `close()` is called: from then on `apply` and `restart` are refused; work queued before still runs. */\n let closing: Promise<NanoResult<void>> | undefined\n const trace = stream()\n const live: Live = {\n now: () => current, registry, policies: opts.policies ?? {}, timeoutMs: opts.timeoutMs ?? 30_000, trace,\n instance: name => pods.get(name), listeners: { ons: new Set(), heard: new Map(), podChanges: new Set() }, flying: new Set(), closed: () => closing !== undefined, isolate: opts.isolate,\n }\n const pods = instances(live)\n const buildEager = (names: string[]) => Promise.all(names.filter(n => current.pods[n]!.eager).map(n => pods.get(n)))\n await buildEager(Object.keys(current.pods))\n\n /** `d` assembled with the application's registry, then composed. */\n function adopt(d: AppDeployment): NanoResult<AppDeployment> {\n const assembled = AppDeployment.assemble(d, registry)\n if (!assembled.ok) return assembled\n const next = compose(assembled.value, live.policies)\n return next.ok ? success(next.value.deployment) : next\n }\n\n const shut = () => failure('invalid-input', 'application is closed')\n /** `work` after every change (apply, restart, close) queued before it. */\n function queued<T>(work: () => Promise<T>): Promise<T> {\n const done = queue.then(work)\n queue = done.catch(() => undefined)\n return done\n }\n\n async function reconcile(d: AppDeployment, caller: string): Promise<NanoResult<void>> {\n const checked = adopt(d)\n if (!checked.ok) return checked\n // As for a message: a throw, a rejection or no verdict refuses (`refusal` is per-Ask and sync, so it does not fit).\n const verdict = await Promise.resolve().then(() => (opts.deploymentPolicy ?? DeploymentPolicies.allowAll()).isAllowed({ caller, deployment: d }))\n .catch((e): Verdict => ({ approved: false, reason: `policy threw: ${e instanceof Error ? e.message : String(e)}` }))\n if (verdict?.approved !== true) return failure('denied', verdict?.approved === false && typeof verdict.reason === 'string' ? verdict.reason : 'policy gave no verdict')\n const changes = diff(current, checked.value), before = current\n current = checked.value\n for (const o of [...live.listeners.ons]) {\n if (o.gone()) { o.end(); continue } // an edge removed now stays gone if re-added\n const why = refusal(live, { runtime: o.runtime, kind: 'subscribe', from: o.to, to: o.from, port: o.port }) // asked again on apply; a refused one is dropped\n if (why !== undefined) o.end({ type: 'denied', reason: why })\n }\n await Promise.all([...changes.removed.map(n => pods.forget(n, 'removed')), ...changes.changed.map(n => pods.forget(n, 'changed'))])\n await buildEager([...changes.added, ...changes.changed])\n await notifyPodChanges(live, before)\n trace.emit({ type: 'applied', caller, ...changes })\n return success(undefined)\n }\n\n const one = runtimeView(live, pods.status)\n const app: Application = {\n runtime: id => runtimeView(live, pods.status, id),\n resolve: (api, where) => one.resolve(api, where),\n get: (api, where) => one.get(api, where),\n subscribe: one.subscribe,\n call: (...at) => at.length === 1 ? one.call(at[0]) : app.runtime(at[0]).call(at[1]),\n apply: (next, o) => closing ? Promise.resolve(shut()) : queued(() => reconcile(next, o?.caller ?? 'host')),\n restart: pod => closing ? Promise.resolve(shut()) : queued(async () => {\n if (!current.pods[pod]) return failure('not-found', `no pod ${pod}`)\n await pods.forget(pod, 'restarted')\n trace.emit({ type: 'restarted', pod })\n if (current.pods[pod].eager) await pods.get(pod)\n return success(undefined)\n }),\n deployment: () => structuredClone(current),\n listen: trace.listen,\n // Deliveries under way settle; nothing new is delivered once `closing` is set.\n close: () => closing ??= queued(async () => { await Promise.all([pods.close(), ...live.flying]); for (const o of [...live.listeners.ons]) o.end(); live.listeners.podChanges.clear(); return success(undefined) }),\n }\n return success(app)\n}\n\n/** `create` from a nano.json: its `modules` loaded, assembled and created; the first failure throws an Error carrying it. */\nasync function load(url: string | URL, opts: Opts = {}): Promise<Application> {\n const l = await loaded(url)\n const r = l.ok ? AppDeployment.assemble(l.value.deployment, l.value.registry) : l\n const app = r.ok ? await create(r.value, opts) : r\n if (!app.ok) throw Object.assign(new Error(`${app.fail.type}: ${app.fail.reason}`), { fail: app.fail })\n return app.value\n}\n\nexport const Application = { create, load }\n"
|
|
37
39
|
],
|
|
38
|
-
"mappings": ";AAS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