@toa.io/definitions 1.0.0-alpha.331 → 1.0.0-alpha.333
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/digest/extensions.chronicles.json +1 -0
- package/digest/extensions.exposition.json +1 -1
- package/package.json +12 -12
- package/schemas/extensions.chronicles/annotation.cos.yaml +52 -0
- package/schemas/extensions.chronicles/declaration.cos.yaml +60 -0
- package/schemas/extensions.exposition/annotation.cos.yaml +10 -17
- package/transpiled/definition.js +1 -0
- package/transpiled/definition.js.map +1 -1
- package/transpiled/digest/generate.js +1 -0
- package/transpiled/digest/generate.js.map +1 -1
- package/transpiled/extensions.chronicles/components.d.ts +7 -0
- package/transpiled/extensions.chronicles/components.js +10 -0
- package/transpiled/extensions.chronicles/components.js.map +1 -0
- package/transpiled/extensions.chronicles/const.d.ts +20 -0
- package/transpiled/extensions.chronicles/const.js +26 -0
- package/transpiled/extensions.chronicles/const.js.map +1 -0
- package/transpiled/extensions.chronicles/context.d.ts +3 -0
- package/transpiled/extensions.chronicles/context.js +11 -0
- package/transpiled/extensions.chronicles/context.js.map +1 -0
- package/transpiled/extensions.chronicles/contract.d.ts +7 -0
- package/transpiled/extensions.chronicles/contract.js +69 -0
- package/transpiled/extensions.chronicles/contract.js.map +1 -0
- package/transpiled/extensions.chronicles/deployment.d.ts +12 -0
- package/transpiled/extensions.chronicles/deployment.js +84 -0
- package/transpiled/extensions.chronicles/deployment.js.map +1 -0
- package/transpiled/extensions.chronicles/index.d.ts +7 -0
- package/transpiled/extensions.chronicles/index.js +7 -0
- package/transpiled/extensions.chronicles/index.js.map +1 -0
- package/transpiled/extensions.chronicles/manifest.d.ts +12 -0
- package/transpiled/extensions.chronicles/manifest.js +63 -0
- package/transpiled/extensions.chronicles/manifest.js.map +1 -0
- package/transpiled/extensions.chronicles/schemas.d.ts +4 -0
- package/transpiled/extensions.chronicles/schemas.js +7 -0
- package/transpiled/extensions.chronicles/schemas.js.map +1 -0
- package/transpiled/extensions.chronicles/types.d.ts +81 -0
- package/transpiled/extensions.chronicles/types.js +2 -0
- package/transpiled/extensions.chronicles/types.js.map +1 -0
- package/transpiled/extensions.exposition/Annotation.d.ts +5 -7
- package/transpiled/extensions.exposition/deployment.js +8 -0
- package/transpiled/extensions.exposition/deployment.js.map +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"label":"chronicles-encounters","manifest":{"namespace":"chronicles","name":"encounters","operations":{"anonymous":{"type":"effect","input":{"description":"`{ sent, visitor?, session?, events }` — `sent` when the client sends the batch, by its clock — at most 100 events, each `{ id, name, time, payload? }`, `time` when it happened, by the same clock; and the client's `ip`, `country`, `origin` and `agent`, which the gateway puts in; as JSON, or as the form `navigator.sendBeacon` sends, whose `events` is their JSON and `sent` its digits, which the extension parses and checks\n","type":"object"},"output":{"type":"object","properties":{"status":{"type":"integer"},"accepted":{"type":"integer"}}},"errors":["INVALID","OVERSIZED"],"scope":"none","bridge":"@toa.io/bridges.node","query":false,"bindings":["@toa.io/bindings.amqp"]},"identified":{"type":"effect","input":{"description":"`{ sent, visitor?, session?, events }` — `sent` when the client sends the batch, by its clock — at most 100 events, each `{ id, name, time, payload? }`, `time` when it happened, by the same clock; and the client's `ip`, `country`, `origin` and `agent`, which the gateway puts in; as JSON, or as the form `navigator.sendBeacon` sends, whose `events` is their JSON and `sent` its digits, which the extension parses and checks\n","type":"object"},"output":{"type":"object","properties":{"status":{"type":"integer"},"accepted":{"type":"integer"}}},"errors":["INVALID","OVERSIZED"],"scope":"none","bridge":"@toa.io/bridges.node","query":false,"bindings":["@toa.io/bindings.amqp"]},"describe":{"type":"computation","output":{"description":"What clients send, by name, as the configuration documents it","type":"object"},"scope":"none","bridge":"@toa.io/bridges.node","query":false,"bindings":["@toa.io/bindings.amqp"]}},"path":"@toa.io/extensions.chronicles/components/chronicles.encounters","bindings":["@toa.io/bindings.amqp"],"bridge":"@toa.io/bridges.node","prototype":null,"extensions":{"@toa.io/extensions.telemetry":{},"@toa.io/extensions.fetch":null,"@toa.io/extensions.introspection":{},"@toa.io/extensions.exposition":{"routes":[{"path":"/chronicles/encounters","node":{"routes":[{"path":"/","node":{"routes":[],"methods":[{"verb":"POST","mapping":{"endpoint":"anonymous","query":null,"paged":false,"streamed":false,"namespace":"chronicles","component":"encounters"},"directives":[{"family":"auth","name":"anonymous","value":true},{"family":"map","name":"ip","value":"ip"},{"family":"map","name":"country","value":"country"},{"family":"map","name":"headers","value":{"origin":"origin","agent":"user-agent"}},{"family":"io","name":"throttle","value":{"key":["ip"],"requests":60,"interval":60}},{"family":"io","name":"status","value":"status"},{"family":"io","name":"output","value":["status","accepted"]},{"family":"help","name":"method","value":null}]},{"verb":"GET","mapping":{"endpoint":"describe","query":null,"paged":false,"streamed":false,"namespace":"chronicles","component":"encounters"},"directives":[{"family":"auth","name":"role","value":"system:chronicles:encounters"},{"family":"mcp","name":"tool","value":true},{"family":"help","name":"method","value":{"title":"What clients send","description":"The encounters clients send, by name: what each tells, and what each field of its payload is. It documents, and holds nothing back: a name it does not tell is written as any other. A client sends a batch with `sent`, its clock as it sends, and each event with `time`, its clock as the event happened — both read as they are, never corrected, however wrong the clock is: what is kept is when the gateway received the batch, less the distance between the two.\n"}},{"family":"io","name":"output","value":true}]}],"directives":[]}},{"path":"/:identity","node":{"routes":[],"methods":[{"verb":"POST","mapping":{"endpoint":"identified","query":null,"paged":false,"streamed":false,"namespace":"chronicles","component":"encounters"},"directives":[{"family":"auth","name":"id","value":"identity"},{"family":"map","name":"segments","value":{"identity":"identity"}},{"family":"map","name":"ip","value":"ip"},{"family":"map","name":"country","value":"country"},{"family":"map","name":"headers","value":{"origin":"origin","agent":"user-agent"}},{"family":"io","name":"throttle","value":{"key":["identity"],"requests":60,"interval":60}},{"family":"io","name":"status","value":"status"},{"family":"io","name":"output","value":["status","accepted"]},{"family":"help","name":"method","value":null}]}],"directives":[]}}],"methods":[],"directives":[],"isolated":true}}],"methods":[],"directives":[]},"@toa.io/extensions.configuration":{"schema":{"type":"object","propertyNames":{"pattern":"^[a-z][a-z0-9_]{0,63}$"},"additionalProperties":{"type":"object","properties":{"description":{"description":"What the client tells by sending it","type":"string"},"fields":{"description":"What each field of its payload is, by path","type":"object","additionalProperties":{"type":"string"}}},"required":["description"],"additionalProperties":false}},"defaults":{}},"@toa.io/extensions.chronicles":{"events":{},"facts":{},"identity":"identity","timestamp":"UPDATED"}},"version":"9b6bcd1d"}},{"label":"chronicles-queries","manifest":{"namespace":"chronicles","name":"queries","operations":{"describe":{"type":"computation","output":{"type":"object","properties":{"guide":{"description":"How to read the log, and how its store is read","type":"string"},"labels":{"type":"array"},"states":{"type":"array"},"encounters":{"type":"array"},"views":{"type":"array"}}},"scope":"none","bridge":"@toa.io/bridges.node","query":false,"bindings":["@toa.io/bindings.amqp"]},"query":{"type":"computation","input":{"type":"object","properties":{"sql":{"description":"One statement over the log, as the guide `describe` answers says","type":"string","minLength":1,"maxLength":65536}},"required":["sql"]},"output":{"type":"object","properties":{"columns":{"type":"array"},"rows":{"type":"array"},"truncated":{"type":"boolean"}}},"errors":["REFUSED"],"scope":"none","bridge":"@toa.io/bridges.node","query":false,"bindings":["@toa.io/bindings.amqp"]},"define":{"type":"effect","input":{"type":"object","properties":{"name":{"description":"The view's name, which is what a query reads it by","type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"},"sql":{"description":"The statement the view is, one a query could run","type":"string","minLength":1,"maxLength":65536},"refresh":{"description":"Seconds between computations of a materialized view; absent, a plain view","type":"integer","minimum":3600},"title":{"description":"What the view is, in a few words","type":"string","minLength":1,"maxLength":100},"description":{"description":"What a row of the view is, and what each of its columns counts","type":"string","minLength":1,"maxLength":4096}},"required":["name","sql"]},"errors":["REFUSED","RESERVED","EXHAUSTED"],"scope":"none","bridge":"@toa.io/bridges.node","query":false,"output":{},"bindings":["@toa.io/bindings.amqp"]},"drop":{"type":"effect","input":{"type":"object","properties":{"name":{"description":"The view's name, which is what a query reads it by","type":"string","pattern":"^[a-z][a-z0-9_]{0,62}$"}},"required":["name"]},"errors":["NOT_FOUND"],"scope":"none","bridge":"@toa.io/bridges.node","query":false,"output":{},"bindings":["@toa.io/bindings.amqp"]}},"path":"@toa.io/extensions.chronicles/components/chronicles.queries","bindings":["@toa.io/bindings.amqp"],"bridge":"@toa.io/bridges.node","prototype":null,"extensions":{"@toa.io/extensions.telemetry":{},"@toa.io/extensions.fetch":null,"@toa.io/extensions.introspection":{},"@toa.io/extensions.exposition":{"routes":[{"path":"/chronicles/queries","node":{"routes":[{"path":"/","node":{"routes":[],"methods":[{"verb":"GET","mapping":{"endpoint":"describe","query":null,"paged":false,"streamed":false,"namespace":"chronicles","component":"queries"},"directives":[{"family":"help","name":"method","value":{"title":"What the log holds","description":"A guide to reading the log and its store, to read before a query — what each table and column means, and which time is which; the labels of `events` the components declare, each with what it means, the view that reads it in types, how many rows it has, the first and last time of them, and its fields with their types and what they mean; the components with a state in `states`, likewise; the names of `encounters` clients sent, with when the newest batch was received, the fields of their payloads as they were sent and what the context documents of them; and the views defined over the log, with their titles, descriptions and when a materialized one was last refreshed. `states` is each entity as it stands now: what it was before is read from its events.\n"}},{"family":"io","name":"output","value":true}]},{"verb":"POST","mapping":{"endpoint":"query","query":null,"paged":false,"streamed":false,"namespace":"chronicles","component":"queries"},"directives":[{"family":"help","name":"method","value":{"title":"Query the log","description":"One statement, as the guide `chronicles.queries.GET` answers says, over `events`, a row for everything a component did (id, label, component, time, entity, version, identity, trace, payload), `states`, each entity as it stands (component, entity, version, identity, time, payload), `encounters`, what clients sent (id, name, time, received, visitor, session, identity, ip, country, origin, agent, browser, os, device, payload), the view of each declared label and state, and the views. Every `time` is when it happened, by the server: a change when the component made it, a fact when it was sent, an encounter when the gateway received its batch less how long before sending the client measured it happened — never the client's clock as it reads, nor when the store wrote the row. An encounter's `received` is when the gateway received its batch. At most 30 seconds, 10000 rows and 64 MiB; at the rows, `truncated` is true.\n"}},{"family":"io","name":"output","value":true}]}],"directives":[{"family":"auth","name":"role","value":"system:chronicles:query"},{"family":"mcp","name":"tool","value":true}]}},{"path":"/views/:name","node":{"routes":[],"methods":[{"verb":"PUT","mapping":{"endpoint":"define","query":null,"paged":false,"streamed":false,"namespace":"chronicles","component":"queries"},"directives":[{"family":"help","name":"method","value":{"title":"Define a view","description":"A view over the log, by a statement a query could run, with a title and a description that tell whoever finds it what it counts. Without `refresh` it is computed when it is read; with `refresh`, in seconds and at least 3600, it is computed on that cycle and read as a table. Defining a name again replaces the view.\n"}},{"family":"help","name":"route","value":{"name":"The view's name"}}]},{"verb":"DELETE","mapping":{"endpoint":"drop","query":null,"paged":false,"streamed":false,"namespace":"chronicles","component":"queries"},"directives":[{"family":"help","name":"method","value":"Drop a view"},{"family":"help","name":"route","value":{"name":"The view's name"}}]}],"directives":[{"family":"auth","name":"role","value":"system:chronicles:views"},{"family":"mcp","name":"tool","value":true}]}}],"methods":[],"directives":[],"isolated":true}}],"methods":[],"directives":[]},"@toa.io/extensions.chronicles":{"events":{},"facts":{},"identity":"identity","timestamp":"UPDATED"}},"version":"c5aba6f0"}},{"label":"chronicles-relay","manifest":{"namespace":"chronicles","name":"relay","operations":{"record":{"type":"effect","input":{"description":"A fact a component sent, as the row it is published as","type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"component":{"type":"string"},"time":{"type":"integer"},"entity":{"type":"null"},"version":{"type":"null"},"identity":{"type":["string","null"]},"trace":{"type":["string","null"]},"payload":{"type":"object"}},"required":["id","label","component","time","payload"]},"scope":"none","bridge":"@toa.io/bridges.node","query":false,"output":{},"bindings":["@toa.io/bindings.amqp"]},"encounter":{"type":"effect","input":{"description":"The encounters of a batch a client sent, as the rows they are published as","type":"object","properties":{"encounters":{"type":"array","items":{"type":"object"}}},"required":["encounters"]},"scope":"none","bridge":"@toa.io/bridges.node","query":false,"output":{},"bindings":["@toa.io/bindings.amqp"]}},"path":"@toa.io/extensions.chronicles/components/chronicles.relay","bindings":["@toa.io/bindings.amqp"],"bridge":"@toa.io/bridges.node","prototype":null,"extensions":{"@toa.io/extensions.telemetry":{},"@toa.io/extensions.fetch":null,"@toa.io/extensions.introspection":{},"@toa.io/extensions.chronicles":{"events":{},"facts":{},"identity":"identity","timestamp":"UPDATED"}},"version":"c57ae219"}}]
|