keri-ts 2.0.1 → 2.2.0
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/README.md +30 -2
- package/esm/keri/npm/src/acdc/authoring.js +195 -0
- package/esm/keri/npm/src/acdc/chaining.js +223 -89
- package/esm/keri/npm/src/acdc/custody.js +164 -0
- package/esm/keri/npm/src/acdc/dhking.js +244 -32
- package/esm/keri/npm/src/acdc/observing.js +2 -2
- package/esm/keri/npm/src/acdc/regbasing.js +30 -29
- package/esm/keri/npm/src/acdc/regengine.js +4 -6
- package/esm/keri/npm/src/acdc/registering.js +13 -10
- package/esm/keri/npm/src/acdc/registraring.js +4 -9
- package/esm/keri/npm/src/acdc/salting.js +143 -26
- package/esm/keri/npm/src/acdc/scheming.js +93 -54
- package/esm/keri/npm/src/acdc/unblinding.js +120 -99
- package/esm/keri/npm/src/app/bootstrap/authenticating.js +4 -6
- package/esm/keri/npm/src/app/bootstrap/oobi-resolving.js +41 -0
- package/esm/keri/npm/src/app/bootstrap/oobiery.js +5 -7
- package/esm/keri/npm/src/app/credentials/credential-revoking.js +1 -0
- package/esm/keri/npm/src/app/credentials/credential-workflows.js +2 -0
- package/esm/keri/npm/src/app/credentials/registry-settling.js +44 -0
- package/esm/keri/npm/src/app/credentials/root-replicating.js +131 -0
- package/esm/keri/npm/src/app/credentials/root-replicator.js +198 -0
- package/esm/keri/npm/src/app/credentials/tel-completion.js +36 -0
- package/esm/keri/npm/src/app/credentials/verifying.js +12 -3
- package/esm/keri/npm/src/app/delivery/forwarding.js +64 -9
- package/esm/keri/npm/src/app/exchanges/exchanging.js +24 -15
- package/esm/keri/npm/src/app/identity/challenging.js +50 -0
- package/esm/keri/npm/src/app/identity/configing.js +17 -43
- package/esm/keri/npm/src/app/identity/delegating.js +77 -77
- package/esm/keri/npm/src/app/identity/delegation-approval.js +333 -0
- package/esm/keri/npm/src/app/identity/event-completion.js +154 -0
- package/esm/keri/npm/src/app/identity/habbing.js +183 -41
- package/esm/keri/npm/src/app/identity/keeping.js +78 -5
- package/esm/keri/npm/src/app/identity/lmdb-habery.js +12 -0
- package/esm/keri/npm/src/app/ipex/group-ipex.js +327 -0
- package/esm/keri/npm/src/app/ipex/group-issuance.js +902 -0
- package/esm/keri/npm/src/app/ipex/ipex-admitting.js +120 -0
- package/esm/keri/npm/src/app/ipex/ipex-conversation.js +197 -0
- package/esm/keri/npm/src/app/ipex/ipex-discloser.js +591 -0
- package/esm/keri/npm/src/app/ipex/ipex-granting.js +93 -0
- package/esm/keri/npm/src/app/ipex/ipex-graph.js +7 -70
- package/esm/keri/npm/src/app/ipex/ipex-grouping.js +42 -16
- package/esm/keri/npm/src/app/ipex/ipex-v2.js +21 -5
- package/esm/keri/npm/src/app/ipex/ipexing.js +1 -1
- package/esm/keri/npm/src/app/ipex/issuance.js +888 -0
- package/esm/keri/npm/src/app/ipex/pending-presentations.js +46 -0
- package/esm/keri/npm/src/app/ipex/presentation-files.js +200 -0
- package/esm/keri/npm/src/app/ipex/presenting.js +401 -0
- package/esm/keri/npm/src/app/ipex/receive-issuance.js +86 -0
- package/esm/keri/npm/src/app/ipex/unblinding-workflow.js +660 -0
- package/esm/keri/npm/src/app/mailbox/ipex-arrival.js +103 -0
- package/esm/keri/npm/src/app/mailbox/kel-publisher.js +322 -0
- package/esm/keri/npm/src/app/mailbox/kel-publishing.js +65 -0
- package/esm/keri/npm/src/app/mailbox/kel-submission.js +24 -0
- package/esm/keri/npm/src/app/mailbox/mailbox-admin.js +208 -0
- package/esm/keri/npm/src/app/mailbox/mailbox-poller.js +212 -47
- package/esm/keri/npm/src/app/mailbox/mailboxing.js +15 -14
- package/esm/keri/npm/src/app/multisig/counseling.js +482 -0
- package/esm/keri/npm/src/app/multisig/group-members.js +32 -0
- package/esm/keri/npm/src/app/multisig/grouping.js +4 -3
- package/esm/keri/npm/src/app/multisig/multisig-workflows.js +101 -141
- package/esm/keri/npm/src/app/multisig/proposals.js +281 -0
- package/esm/keri/npm/src/app/multisig/proposing.js +122 -0
- package/esm/keri/npm/src/app/notifications/notifying.js +5 -9
- package/esm/keri/npm/src/app/notifications/signaling.js +5 -5
- package/esm/keri/npm/src/app/protocol/parsering.js +26 -1
- package/esm/keri/npm/src/app/protocol/protocol-processing.js +44 -6
- package/esm/keri/npm/src/app/queries/query-workflows.js +98 -0
- package/esm/keri/npm/src/app/queries/witness-inquisitor.js +2 -2
- package/esm/keri/npm/src/app/runtime/agent-runtime.js +113 -65
- package/esm/keri/npm/src/app/runtime/cue-runtime.js +3 -6
- package/esm/keri/npm/src/app/runtime/delivery-outbox.js +87 -0
- package/esm/keri/npm/src/app/runtime/doing.js +17 -0
- package/esm/keri/npm/src/app/runtime/ipex-auxiliaries.js +207 -0
- package/esm/keri/npm/src/app/runtime/operation-owners.js +151 -0
- package/esm/keri/npm/src/app/runtime/retry-backoff.js +93 -0
- package/esm/keri/npm/src/app/runtime/workflow-contract.js +80 -0
- package/esm/keri/npm/src/app/transport/byte-source.js +6 -42
- package/esm/keri/npm/src/app/transport/cesr-egress.js +77 -13
- package/esm/keri/npm/src/app/transport/file-bytes.js +41 -0
- package/esm/keri/npm/src/app/transport/http-client.js +25 -6
- package/esm/keri/npm/src/app/transport/http-messenger.js +14 -9
- package/esm/keri/npm/src/app/transport/message-source.js +1 -1
- package/esm/keri/npm/src/app/transport/messengering.js +3 -4
- package/esm/keri/npm/src/app/transport/node-http-client.js +21 -0
- package/esm/keri/npm/src/app/transport/tcp-dialer.js +14 -0
- package/esm/keri/npm/src/app/witness/http-endpoints.js +4 -4
- package/esm/keri/npm/src/app/witness/receipt-client.js +2 -2
- package/esm/keri/npm/src/cli/common/context.js +2 -2
- package/esm/keri/npm/src/cli/common/event-completion.js +49 -0
- package/esm/keri/npm/src/cli/common/existing.js +3 -5
- package/esm/keri/npm/src/cli/common/runtime-workers.js +23 -0
- package/esm/keri/npm/src/cli/credentials/ipex.js +159 -191
- package/esm/keri/npm/src/cli/credentials/vc.js +53 -72
- package/esm/keri/npm/src/cli/endpoints/did.js +12 -3
- package/esm/keri/npm/src/cli/endpoints/oobi-clean.js +4 -3
- package/esm/keri/npm/src/cli/endpoints/oobi.js +12 -15
- package/esm/keri/npm/src/cli/identity/challenge.js +9 -35
- package/esm/keri/npm/src/cli/identity/delegate.js +81 -258
- package/esm/keri/npm/src/cli/identity/incept.js +17 -34
- package/esm/keri/npm/src/cli/identity/init.js +4 -3
- package/esm/keri/npm/src/cli/identity/interact.js +7 -19
- package/esm/keri/npm/src/cli/identity/rotate.js +10 -38
- package/esm/keri/npm/src/cli/index.js +3 -1
- package/esm/keri/npm/src/cli/messaging/exchange.js +2 -2
- package/esm/keri/npm/src/cli/messaging/group-join.js +79 -0
- package/esm/keri/npm/src/cli/messaging/group-wait.js +88 -0
- package/esm/keri/npm/src/cli/messaging/multisig.js +187 -250
- package/esm/keri/npm/src/cli/messaging/root-copy-lines.js +31 -0
- package/esm/keri/npm/src/cli/tools/annotate.js +2 -1
- package/esm/keri/npm/src/cli/tools/benchmark.js +2 -1
- package/esm/keri/npm/src/cli/tools/db-dump.js +1 -4
- package/esm/keri/npm/src/core/bytes.js +9 -0
- package/esm/keri/npm/src/core/kel/delegation-ancestry.js +92 -0
- package/esm/keri/npm/src/core/kel/eventing.js +67 -12
- package/esm/keri/npm/src/core/kel/kever.js +11 -9
- package/esm/keri/npm/src/core/mailbox/kram-policy.js +41 -9
- package/esm/keri/npm/src/core/mailbox/kram-pruning.js +15 -22
- package/esm/keri/npm/src/core/mailbox/kram-staging.js +2 -2
- package/esm/keri/npm/src/core/mailbox/kraming.js +2 -0
- package/esm/keri/npm/src/core/records.js +23 -0
- package/esm/keri/npm/src/core/routing.js +15 -2
- package/esm/keri/npm/src/db/basing.js +183 -205
- package/esm/keri/npm/src/db/core/dber.js +1062 -0
- package/esm/keri/npm/src/db/core/index.js +4 -2
- package/esm/keri/npm/src/db/core/indexeddb-persistence.js +221 -0
- package/esm/keri/npm/src/db/core/lmdb-opener.js +30 -0
- package/esm/keri/npm/src/db/core/lmdber.js +199 -1067
- package/esm/keri/npm/src/db/core/memstore.js +532 -0
- package/esm/keri/npm/src/db/core/path-manager.js +109 -223
- package/esm/keri/npm/src/db/core/store-owner.js +104 -0
- package/esm/keri/npm/src/db/core/webdber.js +252 -0
- package/esm/keri/npm/src/db/escrowing.js +2 -2
- package/esm/keri/npm/src/db/exchange/exchange-nests.js +3 -2
- package/esm/keri/npm/src/db/indexeddb.js +98 -0
- package/esm/keri/npm/src/db/keeping.js +38 -123
- package/esm/keri/npm/src/db/koming.js +1 -1
- package/esm/keri/npm/src/db/lmdb-stores.js +68 -0
- package/esm/keri/npm/src/db/lmdb.js +6 -0
- package/esm/keri/npm/src/db/mailbox/mailboxing.js +12 -65
- package/esm/keri/npm/src/db/noting.js +11 -55
- package/esm/keri/npm/src/db/reger.js +43 -105
- package/esm/keri/npm/src/db/replay/witness-replay.js +2 -20
- package/esm/keri/npm/src/db/store-lock.js +150 -0
- package/esm/keri/npm/src/db/subing.js +1 -1
- package/esm/keri/npm/src/npm/db-indexeddb.browser.js +2 -0
- package/esm/keri/npm/src/npm/db-indexeddb.js +3 -0
- package/esm/keri/npm/src/npm/db-lmdb.js +3 -0
- package/esm/keri/npm/src/npm/db.browser.js +2 -0
- package/esm/keri/npm/src/npm/index.browser.js +9 -0
- package/esm/keri/npm/src/npm/runtime-node.js +3 -0
- package/esm/keri/npm/src/npm/runtime-web.browser.js +2 -0
- package/esm/keri/npm/src/npm/runtime-web.js +3 -0
- package/esm/keri/npm/src/npm/runtime.browser.js +2 -0
- package/esm/keri/npm/src/runtime/index.js +58 -12
- package/esm/keri/npm/src/runtime/node.js +14 -0
- package/esm/keri/npm/src/runtime/web/output-barrier.js +47 -0
- package/esm/keri/npm/src/runtime/web/persistent-storage.js +37 -0
- package/esm/keri/npm/src/runtime/web.js +10 -0
- package/esm/keri/npm/src/vdr/eventing.js +1 -1
- package/esm/keri/npm/src/vdr/tel-publication.js +19 -3
- package/esm/keri/npm/src/version.js +2 -2
- package/package.json +24 -4
- package/types/acdc/authoring.d.ts +54 -0
- package/types/acdc/authoring.d.ts.map +1 -0
- package/types/acdc/chaining.d.ts +56 -6
- package/types/acdc/chaining.d.ts.map +1 -1
- package/types/acdc/custody.d.ts +77 -0
- package/types/acdc/custody.d.ts.map +1 -0
- package/types/acdc/dhking.d.ts +94 -3
- package/types/acdc/dhking.d.ts.map +1 -1
- package/types/acdc/regbasing.d.ts +11 -6
- package/types/acdc/regbasing.d.ts.map +1 -1
- package/types/acdc/regengine.d.ts.map +1 -1
- package/types/acdc/registering.d.ts +8 -4
- package/types/acdc/registering.d.ts.map +1 -1
- package/types/acdc/registraring.d.ts.map +1 -1
- package/types/acdc/salting.d.ts +59 -7
- package/types/acdc/salting.d.ts.map +1 -1
- package/types/acdc/scheming.d.ts +2 -0
- package/types/acdc/scheming.d.ts.map +1 -1
- package/types/acdc/unblinding.d.ts +58 -19
- package/types/acdc/unblinding.d.ts.map +1 -1
- package/types/app/bootstrap/authenticating.d.ts +3 -1
- package/types/app/bootstrap/authenticating.d.ts.map +1 -1
- package/types/app/bootstrap/oobi-resolving.d.ts +92 -0
- package/types/app/bootstrap/oobi-resolving.d.ts.map +1 -0
- package/types/app/bootstrap/oobiery.d.ts +3 -1
- package/types/app/bootstrap/oobiery.d.ts.map +1 -1
- package/types/app/credentials/credential-revoking.d.ts +3 -0
- package/types/app/credentials/credential-revoking.d.ts.map +1 -1
- package/types/app/credentials/credential-workflows.d.ts +5 -0
- package/types/app/credentials/credential-workflows.d.ts.map +1 -1
- package/types/app/credentials/registry-settling.d.ts +85 -0
- package/types/app/credentials/registry-settling.d.ts.map +1 -0
- package/types/app/credentials/root-replicating.d.ts +97 -0
- package/types/app/credentials/root-replicating.d.ts.map +1 -0
- package/types/app/credentials/root-replicator.d.ts +105 -0
- package/types/app/credentials/root-replicator.d.ts.map +1 -0
- package/types/app/credentials/tel-completion.d.ts +55 -0
- package/types/app/credentials/tel-completion.d.ts.map +1 -0
- package/types/app/credentials/verifying.d.ts +2 -1
- package/types/app/credentials/verifying.d.ts.map +1 -1
- package/types/app/delivery/forwarding.d.ts +16 -0
- package/types/app/delivery/forwarding.d.ts.map +1 -1
- package/types/app/exchanges/exchanging.d.ts +2 -0
- package/types/app/exchanges/exchanging.d.ts.map +1 -1
- package/types/app/identity/challenging.d.ts +54 -0
- package/types/app/identity/challenging.d.ts.map +1 -1
- package/types/app/identity/configing.d.ts +7 -5
- package/types/app/identity/configing.d.ts.map +1 -1
- package/types/app/identity/delegating.d.ts +21 -4
- package/types/app/identity/delegating.d.ts.map +1 -1
- package/types/app/identity/delegation-approval.d.ts +228 -0
- package/types/app/identity/delegation-approval.d.ts.map +1 -0
- package/types/app/identity/event-completion.d.ts +151 -0
- package/types/app/identity/event-completion.d.ts.map +1 -0
- package/types/app/identity/habbing.d.ts +90 -7
- package/types/app/identity/habbing.d.ts.map +1 -1
- package/types/app/identity/keeping.d.ts +50 -4
- package/types/app/identity/keeping.d.ts.map +1 -1
- package/types/app/identity/lmdb-habery.d.ts +6 -0
- package/types/app/identity/lmdb-habery.d.ts.map +1 -0
- package/types/app/ipex/group-ipex.d.ts +247 -0
- package/types/app/ipex/group-ipex.d.ts.map +1 -0
- package/types/app/ipex/group-issuance.d.ts +281 -0
- package/types/app/ipex/group-issuance.d.ts.map +1 -0
- package/types/app/ipex/ipex-admitting.d.ts +47 -0
- package/types/app/ipex/ipex-admitting.d.ts.map +1 -0
- package/types/app/ipex/ipex-conversation.d.ts +195 -0
- package/types/app/ipex/ipex-conversation.d.ts.map +1 -0
- package/types/app/ipex/ipex-discloser.d.ts +156 -0
- package/types/app/ipex/ipex-discloser.d.ts.map +1 -0
- package/types/app/ipex/ipex-granting.d.ts +145 -0
- package/types/app/ipex/ipex-granting.d.ts.map +1 -0
- package/types/app/ipex/ipex-graph.d.ts +4 -4
- package/types/app/ipex/ipex-graph.d.ts.map +1 -1
- package/types/app/ipex/ipex-grouping.d.ts +18 -0
- package/types/app/ipex/ipex-grouping.d.ts.map +1 -1
- package/types/app/ipex/ipex-v2.d.ts +11 -2
- package/types/app/ipex/ipex-v2.d.ts.map +1 -1
- package/types/app/ipex/ipexing.d.ts +3 -0
- package/types/app/ipex/ipexing.d.ts.map +1 -1
- package/types/app/ipex/issuance.d.ts +443 -0
- package/types/app/ipex/issuance.d.ts.map +1 -0
- package/types/app/ipex/pending-presentations.d.ts +25 -0
- package/types/app/ipex/pending-presentations.d.ts.map +1 -0
- package/types/app/ipex/presentation-files.d.ts +47 -0
- package/types/app/ipex/presentation-files.d.ts.map +1 -0
- package/types/app/ipex/presenting.d.ts +298 -0
- package/types/app/ipex/presenting.d.ts.map +1 -0
- package/types/app/ipex/receive-issuance.d.ts +99 -0
- package/types/app/ipex/receive-issuance.d.ts.map +1 -0
- package/types/app/ipex/unblinding-workflow.d.ts +255 -0
- package/types/app/ipex/unblinding-workflow.d.ts.map +1 -0
- package/types/app/mailbox/ipex-arrival.d.ts +104 -0
- package/types/app/mailbox/ipex-arrival.d.ts.map +1 -0
- package/types/app/mailbox/kel-publisher.d.ts +141 -0
- package/types/app/mailbox/kel-publisher.d.ts.map +1 -0
- package/types/app/mailbox/kel-publishing.d.ts +70 -0
- package/types/app/mailbox/kel-publishing.d.ts.map +1 -0
- package/types/app/mailbox/kel-submission.d.ts +18 -0
- package/types/app/mailbox/kel-submission.d.ts.map +1 -0
- package/types/app/mailbox/mailbox-admin.d.ts +113 -0
- package/types/app/mailbox/mailbox-admin.d.ts.map +1 -0
- package/types/app/mailbox/mailbox-poller.d.ts +92 -3
- package/types/app/mailbox/mailbox-poller.d.ts.map +1 -1
- package/types/app/mailbox/mailboxing.d.ts +4 -1
- package/types/app/mailbox/mailboxing.d.ts.map +1 -1
- package/types/app/multisig/counseling.d.ts +196 -0
- package/types/app/multisig/counseling.d.ts.map +1 -0
- package/types/app/multisig/group-members.d.ts +20 -0
- package/types/app/multisig/group-members.d.ts.map +1 -1
- package/types/app/multisig/grouping.d.ts +39 -20
- package/types/app/multisig/grouping.d.ts.map +1 -1
- package/types/app/multisig/multisig-workflows.d.ts +93 -23
- package/types/app/multisig/multisig-workflows.d.ts.map +1 -1
- package/types/app/multisig/proposals.d.ts +129 -0
- package/types/app/multisig/proposals.d.ts.map +1 -0
- package/types/app/multisig/proposing.d.ts +125 -0
- package/types/app/multisig/proposing.d.ts.map +1 -0
- package/types/app/notifications/notifying.d.ts +1 -1
- package/types/app/notifications/notifying.d.ts.map +1 -1
- package/types/app/notifications/signaling.d.ts +3 -1
- package/types/app/notifications/signaling.d.ts.map +1 -1
- package/types/app/protocol/parsering.d.ts +16 -1
- package/types/app/protocol/parsering.d.ts.map +1 -1
- package/types/app/protocol/protocol-processing.d.ts +9 -1
- package/types/app/protocol/protocol-processing.d.ts.map +1 -1
- package/types/app/queries/query-workflows.d.ts +98 -0
- package/types/app/queries/query-workflows.d.ts.map +1 -0
- package/types/app/runtime/agent-runtime.d.ts +79 -25
- package/types/app/runtime/agent-runtime.d.ts.map +1 -1
- package/types/app/runtime/cue-runtime.d.ts +2 -1
- package/types/app/runtime/cue-runtime.d.ts.map +1 -1
- package/types/app/runtime/delivery-outbox.d.ts +68 -0
- package/types/app/runtime/delivery-outbox.d.ts.map +1 -0
- package/types/app/runtime/doing.d.ts +27 -0
- package/types/app/runtime/doing.d.ts.map +1 -0
- package/types/app/runtime/ipex-auxiliaries.d.ts +74 -0
- package/types/app/runtime/ipex-auxiliaries.d.ts.map +1 -0
- package/types/app/runtime/operation-owners.d.ts +137 -0
- package/types/app/runtime/operation-owners.d.ts.map +1 -0
- package/types/app/runtime/retry-backoff.d.ts +49 -0
- package/types/app/runtime/retry-backoff.d.ts.map +1 -0
- package/types/app/runtime/workflow-contract.d.ts +79 -0
- package/types/app/runtime/workflow-contract.d.ts.map +1 -0
- package/types/app/transport/byte-source.d.ts +13 -10
- package/types/app/transport/byte-source.d.ts.map +1 -1
- package/types/app/transport/cesr-egress.d.ts +21 -7
- package/types/app/transport/cesr-egress.d.ts.map +1 -1
- package/types/app/transport/file-bytes.d.ts +11 -0
- package/types/app/transport/file-bytes.d.ts.map +1 -0
- package/types/app/transport/http-client.d.ts +3 -0
- package/types/app/transport/http-client.d.ts.map +1 -1
- package/types/app/transport/http-messenger.d.ts +15 -10
- package/types/app/transport/http-messenger.d.ts.map +1 -1
- package/types/app/transport/message-source.d.ts +1 -1
- package/types/app/transport/messengering.d.ts +2 -2
- package/types/app/transport/messengering.d.ts.map +1 -1
- package/types/app/transport/node-http-client.d.ts +10 -0
- package/types/app/transport/node-http-client.d.ts.map +1 -0
- package/types/app/transport/tcp-dialer.d.ts +21 -0
- package/types/app/transport/tcp-dialer.d.ts.map +1 -0
- package/types/cli/common/event-completion.d.ts +26 -0
- package/types/cli/common/event-completion.d.ts.map +1 -0
- package/types/cli/common/existing.d.ts.map +1 -1
- package/types/cli/common/runtime-workers.d.ts +23 -0
- package/types/cli/common/runtime-workers.d.ts.map +1 -0
- package/types/cli/credentials/ipex.d.ts.map +1 -1
- package/types/cli/credentials/vc.d.ts +1 -1
- package/types/cli/credentials/vc.d.ts.map +1 -1
- package/types/cli/endpoints/did.d.ts.map +1 -1
- package/types/cli/endpoints/oobi-clean.d.ts.map +1 -1
- package/types/cli/endpoints/oobi.d.ts +3 -1
- package/types/cli/endpoints/oobi.d.ts.map +1 -1
- package/types/cli/identity/challenge.d.ts +1 -1
- package/types/cli/identity/challenge.d.ts.map +1 -1
- package/types/cli/identity/delegate.d.ts +14 -1
- package/types/cli/identity/delegate.d.ts.map +1 -1
- package/types/cli/identity/incept.d.ts.map +1 -1
- package/types/cli/identity/init.d.ts.map +1 -1
- package/types/cli/identity/interact.d.ts.map +1 -1
- package/types/cli/identity/rotate.d.ts.map +1 -1
- package/types/cli/index.d.ts +4 -2
- package/types/cli/index.d.ts.map +1 -1
- package/types/cli/messaging/group-join.d.ts +53 -0
- package/types/cli/messaging/group-join.d.ts.map +1 -0
- package/types/cli/messaging/group-wait.d.ts +34 -0
- package/types/cli/messaging/group-wait.d.ts.map +1 -0
- package/types/cli/messaging/multisig.d.ts +36 -4
- package/types/cli/messaging/multisig.d.ts.map +1 -1
- package/types/cli/messaging/root-copy-lines.d.ts +39 -0
- package/types/cli/messaging/root-copy-lines.d.ts.map +1 -0
- package/types/cli/tools/annotate.d.ts.map +1 -1
- package/types/cli/tools/benchmark.d.ts.map +1 -1
- package/types/cli/tools/db-dump.d.ts.map +1 -1
- package/types/core/bytes.d.ts +2 -0
- package/types/core/bytes.d.ts.map +1 -1
- package/types/core/cues.d.ts +11 -0
- package/types/core/cues.d.ts.map +1 -1
- package/types/core/kel/delegation-ancestry.d.ts +41 -0
- package/types/core/kel/delegation-ancestry.d.ts.map +1 -0
- package/types/core/kel/eventing.d.ts.map +1 -1
- package/types/core/kel/kever.d.ts +5 -4
- package/types/core/kel/kever.d.ts.map +1 -1
- package/types/core/mailbox/kram-policy.d.ts +14 -0
- package/types/core/mailbox/kram-policy.d.ts.map +1 -1
- package/types/core/mailbox/kram-pruning.d.ts +1 -3
- package/types/core/mailbox/kram-pruning.d.ts.map +1 -1
- package/types/core/mailbox/kraming.d.ts +1 -1
- package/types/core/mailbox/kraming.d.ts.map +1 -1
- package/types/core/records.d.ts +61 -0
- package/types/core/records.d.ts.map +1 -1
- package/types/core/routing.d.ts +6 -0
- package/types/core/routing.d.ts.map +1 -1
- package/types/db/basing.d.ts +22 -25
- package/types/db/basing.d.ts.map +1 -1
- package/types/db/core/dber.d.ts +505 -0
- package/types/db/core/dber.d.ts.map +1 -0
- package/types/db/core/index.d.ts +4 -2
- package/types/db/core/index.d.ts.map +1 -1
- package/types/db/core/indexeddb-persistence.d.ts +59 -0
- package/types/db/core/indexeddb-persistence.d.ts.map +1 -0
- package/types/db/core/lmdb-opener.d.ts +17 -0
- package/types/db/core/lmdb-opener.d.ts.map +1 -0
- package/types/db/core/lmdber.d.ts +60 -383
- package/types/db/core/lmdber.d.ts.map +1 -1
- package/types/db/core/memstore.d.ts +129 -0
- package/types/db/core/memstore.d.ts.map +1 -0
- package/types/db/core/path-manager.d.ts +22 -45
- package/types/db/core/path-manager.d.ts.map +1 -1
- package/types/db/core/store-owner.d.ts +59 -0
- package/types/db/core/store-owner.d.ts.map +1 -0
- package/types/db/core/webdber.d.ts +127 -0
- package/types/db/core/webdber.d.ts.map +1 -0
- package/types/db/escrowing.d.ts +3 -3
- package/types/db/escrowing.d.ts.map +1 -1
- package/types/db/exchange/exchange-nests.d.ts.map +1 -1
- package/types/db/indexeddb.d.ts +37 -0
- package/types/db/indexeddb.d.ts.map +1 -0
- package/types/db/keeping.d.ts +14 -25
- package/types/db/keeping.d.ts.map +1 -1
- package/types/db/koming.d.ts +7 -8
- package/types/db/koming.d.ts.map +1 -1
- package/types/db/lmdb-stores.d.ts +45 -0
- package/types/db/lmdb-stores.d.ts.map +1 -0
- package/types/db/lmdb.d.ts +7 -0
- package/types/db/lmdb.d.ts.map +1 -0
- package/types/db/mailbox/mailboxing.d.ts +7 -21
- package/types/db/mailbox/mailboxing.d.ts.map +1 -1
- package/types/db/noting.d.ts +7 -12
- package/types/db/noting.d.ts.map +1 -1
- package/types/db/reger.d.ts +7 -11
- package/types/db/reger.d.ts.map +1 -1
- package/types/db/replay/witness-replay.d.ts +0 -2
- package/types/db/replay/witness-replay.d.ts.map +1 -1
- package/types/db/store-lock.d.ts +72 -0
- package/types/db/store-lock.d.ts.map +1 -0
- package/types/db/subing.d.ts +24 -25
- package/types/db/subing.d.ts.map +1 -1
- package/types/npm/db-indexeddb.d.ts +4 -0
- package/types/npm/db-indexeddb.d.ts.map +1 -0
- package/types/npm/db-lmdb.d.ts +4 -0
- package/types/npm/db-lmdb.d.ts.map +1 -0
- package/types/npm/runtime-node.d.ts +4 -0
- package/types/npm/runtime-node.d.ts.map +1 -0
- package/types/npm/runtime-web.d.ts +4 -0
- package/types/npm/runtime-web.d.ts.map +1 -0
- package/types/runtime/index.d.ts +48 -14
- package/types/runtime/index.d.ts.map +1 -1
- package/types/runtime/node.d.ts +15 -0
- package/types/runtime/node.d.ts.map +1 -0
- package/types/runtime/web/output-barrier.d.ts +30 -0
- package/types/runtime/web/output-barrier.d.ts.map +1 -0
- package/types/runtime/web/persistent-storage.d.ts +36 -0
- package/types/runtime/web/persistent-storage.d.ts.map +1 -0
- package/types/runtime/web.d.ts +11 -0
- package/types/runtime/web.d.ts.map +1 -0
- package/types/vdr/tel-publication.d.ts +6 -0
- package/types/vdr/tel-publication.d.ts.map +1 -1
- package/types/version.d.ts +2 -2
- package/esm/keri/npm/src/acdc/relating.js +0 -59
- package/esm/keri/npm/src/cli/common/tel-completion.js +0 -24
- package/esm/keri/npm/src/db/baser-defaults.js +0 -11
- package/types/acdc/relating.d.ts +0 -21
- package/types/acdc/relating.d.ts.map +0 -1
- package/types/cli/common/tel-completion.d.ts +0 -8
- package/types/cli/common/tel-completion.d.ts.map +0 -1
- package/types/db/baser-defaults.d.ts +0 -5
- package/types/db/baser-defaults.d.ts.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Operation } from "effection";
|
|
2
|
-
import {
|
|
2
|
+
import { Noter, type NoterOptions, Notice, type NoticeAttrs } from "../../db/noting.js";
|
|
3
3
|
import type { Habery, Signator } from "../identity/habbing.js";
|
|
4
4
|
import { Signaler } from "./signaling.js";
|
|
5
5
|
export declare function notice<T extends NoticeAttrs = NoticeAttrs>(attrs: T, options?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifying.d.ts","sourceRoot":"","sources":["../../../src/app/notifications/notifying.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"notifying.d.ts","sourceRoot":"","sources":["../../../src/app/notifications/notifying.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAG3C,OAAO,EAAE,KAAK,EAAE,KAAK,YAAY,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,oB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AC,EAAE;IAMd,4DAA4D;IAC5D,KAAK,IAAI,MAAM;IAIf,wDAAwD;IACxD,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAc9B,qEAAqE;IACrE,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAO5B,OAAO,CAAC,aAAa;IAQrB,OAAO,CAAC,iBAAiB;IASzB,OAAO,CAAC,qBAAqB;CAY9B"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { type Operation } from "effection";
|
|
2
|
+
import { type DoerPacing } from "../runtime/doing.js";
|
|
3
|
+
import { type RuntimeClock } from "../runtime/runtime-clock.js";
|
|
2
4
|
export type SignalAttrs = Record<string, unknown>;
|
|
3
5
|
export interface SignalPad<T extends SignalAttrs = SignalAttrs> {
|
|
4
6
|
i: string;
|
|
@@ -63,6 +65,6 @@ export declare class Signaler {
|
|
|
63
65
|
clear(): void;
|
|
64
66
|
/** Stop this producer and discard its queued wakeups. */
|
|
65
67
|
close(): void;
|
|
66
|
-
signalDo(): Operation<never>;
|
|
68
|
+
signalDo(clock?: RuntimeClock, pacing?: Readonly<DoerPacing>): Operation<never>;
|
|
67
69
|
}
|
|
68
70
|
//# sourceMappingURL=signaling.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signaling.d.ts","sourceRoot":"","sources":["../../../src/app/notifications/signaling.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"signaling.d.ts","sourceRoot":"","sources":["../../../src/app/notifications/signaling.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,KAAK,UAAU,EAA4B,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAE,KAAK,YAAY,EAAe,MAAM,6BAA6B,CAAC;AAK7E,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,M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ACxD,KAAK,EAAE,CAAC,EACR,KAAK,EAAE,MAAM,EACb,OAAO,GAAE;IACP,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACf,GACL,MAAM,CAAC,CAAC,CAAC,CAaX;AAED,yEAAyE;AACzE,qBAAa,QAAQ;IACnB,MAAM,CAAC,QAAQ,CAAC,eAAe,SAAkB;IACjD,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC;IAC3B,OAAO,CAAC,MAAM,CAAS;gBAEX,EAAE,OAAY,EAAE,eAA0C,EAAE,GAAE;QACxE,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;QAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;KACrB;IAMN,0EAA0E;IAC1E,IAAI,CAAC,CAAC,SAAS,WAAW,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,GAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAO,GAAG,MAAM,CAAC,CAAC,CAAC;IASpH,IAAI,IAAI,MAAM,EAAE;IAGhB,KAAK,IAAI,MAAM;IAIf,WAAW,CAAC,GAAG,SAAa,GAAG,MAAM;IASrC,+DAA+D;IAC/D,KAAK,IAAI,IAAI;IAGb,yDAAyD;IACzD,KAAK,IAAI,IAAI;IAKZ,QAAQ,CAAC,KAAK,GAAE,YAA0B,EAAE,MAAM,GAAE,QAAQ,CAAC,UAAU,CAAmB,GAAG,SAAS,CAAC,KAAK,CAAC;CAS/G"}
|
|
@@ -68,7 +68,9 @@ export interface AcdcDispatchArgs {
|
|
|
68
68
|
/** A normal refusal before route processing; a parsed message is not accepted. */
|
|
69
69
|
export interface MessageDropDecision {
|
|
70
70
|
kind: "drop";
|
|
71
|
-
reason: "deniedSender" | "senderNotAllowed" | "missingAuthentication" | "unsupportedRoute" | "invalidQuery" | "missingProcessor" | "referenceStub";
|
|
71
|
+
reason: "deniedSender" | "senderNotAllowed" | "missingAuthentication" | "unsupportedRoute" | "invalidQuery" | "missingProcessor" | "referenceStub" | "invalidMessage";
|
|
72
|
+
/** Why validation refused an already-extracted message; present only for `invalidMessage`. */
|
|
73
|
+
detail?: string;
|
|
72
74
|
}
|
|
73
75
|
/** Route-specific results remain distinct from pre-dispatch refusal and unreported outcomes. */
|
|
74
76
|
export type DispatchDecision = KeverDecision | TelProcessDecision | VerifierDecision | RegistryObserverDecision | QueryProcessDecision | ReplyProcessDecision | ExchangeDecision | MessageDropDecision | KramRefusal | void;
|
|
@@ -81,6 +83,11 @@ export type DispatchDecision = KeverDecision | TelProcessDecision | VerifierDeci
|
|
|
81
83
|
export interface AuxiliaryQueryProcessor {
|
|
82
84
|
/** Concrete custom query route selected by composition before any replay-cache admission. */
|
|
83
85
|
readonly resource: string;
|
|
86
|
+
/**
|
|
87
|
+
* Overrides the single-`resource` check for receivers that own several routes or identifiers.
|
|
88
|
+
* Evaluated before KRAM, so a refused query leaves no cache state, as for a missing receiver.
|
|
89
|
+
*/
|
|
90
|
+
claims?(serder: SerderKERI): boolean;
|
|
84
91
|
processQuery(envelope: KeriDispatchEnvelope): DispatchDecision;
|
|
85
92
|
}
|
|
86
93
|
/**
|
|
@@ -123,6 +130,14 @@ messageKevery?: Kevery, registry?: RegistryObserver, qvy?: AuxiliaryQueryProcess
|
|
|
123
130
|
export declare function envelopeFromFrame(message: CesrFrame, local?: boolean): KeriDispatchEnvelope;
|
|
124
131
|
/** Own an auxiliary query's normalized full proof and public nested evidence beyond synchronous intake. */
|
|
125
132
|
export declare function copyAuxiliaryQuery(envelope: KeriDispatchEnvelope): KeriDispatchEnvelope;
|
|
133
|
+
/**
|
|
134
|
+
* Serialize an auxiliary query without nested evidence so a later process can rebuild it: its own frame with
|
|
135
|
+
* every attachment group (plus `children`, nested evidence already encoded as counted frames), then the
|
|
136
|
+
* normalized proof KRAM may have completed from earlier inputs.
|
|
137
|
+
*/
|
|
138
|
+
export declare function auxiliaryQueryWire(envelope: KeriDispatchEnvelope, children?: readonly Uint8Array[]): Uint8Array;
|
|
139
|
+
/** Rebuild the envelope {@link auxiliaryQueryWire} serialized. */
|
|
140
|
+
export declare function restoreAuxiliaryQuery(wire: Uint8Array, local?: boolean): KeriDispatchEnvelope;
|
|
126
141
|
/** Normalize the actual query endorsements for ingress and per-request authorization. */
|
|
127
142
|
export declare function queryEnvelopeFromDispatch(envelope: KeriDispatchEnvelope): QueryEnvelope;
|
|
128
143
|
//# sourceMappingURL=parsering.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parsering.d.ts","sourceRoot":"","sources":["../../../src/app/protocol/parsering.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,eAAe,EACpB,UAAU,EACV,UAAU,EACV,KAAK,SAAS,EACd,KAAK,EAKL,SAAS,EAUT,QAAQ,EAER,SAAS,EACT,QAAQ,EACR,UAAU,EACV,UAAU,EACV,UAAU,EACV,KAAK,EAEL,MAAM,EACN,SAAS,EAGT,KAAK,UAAU,EAChB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAC1F,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAC7F,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAEjE,OAAO,EAAE,KAAK,oBAAoB,EAAE,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,EAAE,CAExB;AAED,6FAA6F;AAC7F,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,QAAQ,EAAE,gBAAgB,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAiB,gBAAgB,CAC/B,QAAQ,EAAE,oBAAoB,EAC9B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,aAAa,EACzB,MAAM,CAAC,EAAE,MAAM,EACf,QAAQ,CAAC,EAAE,QAAQ,EACnB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI;AAC1B,qGAAqG;AACrG,aAAa,GAAE,MAAe,EAC9B,QAAQ,CAAC,EAAE,gBAAgB,EAC3B,GAAG,CAAC,EAAE,uBAAuB,GAC5B,SAAS,CAAC,cAAc,CAAC,CA+F3B;AAoVD,0FAA0F;AAC1F,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,SAAS,EAClB,KAAK,UAAQ,GACZ,oBAAoB,CA2BtB;AAED,2GAA2G;AAC3G,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,oBAAoB,GAAG,oBAAoB,CA0CvF;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,oBAAoB,EAAE,QAAQ,GAAE,SAAS,UAAU,EAAO,GAAG,UAAU,CAenH;AAED,kEAAkE;AAClE,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,UAAQ,GAAG,oBAAoB,CAM3F;AAED,yFAAyF;AACzF,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,oBAAoB,GAC7B,aAAa,CAaf"}
|
|
@@ -11,7 +11,13 @@ import type { Verifier } from "../credentials/verifying.js";
|
|
|
11
11
|
import { Exchanger } from "../exchanges/exchanging.js";
|
|
12
12
|
import type { Habery } from "../identity/habbing.js";
|
|
13
13
|
import { QueryReplies } from "../queries/query-replies.js";
|
|
14
|
+
import { type RuntimeClock } from "../runtime/runtime-clock.js";
|
|
14
15
|
import { type AuxiliaryQueryProcessor, type DispatchResult } from "./parsering.js";
|
|
16
|
+
/**
|
|
17
|
+
* Wait after every escrow pass, as KERIpy's Doist cycle (`tock` 0.03125 s, app/directing.py) paces its `escrowDo`,
|
|
18
|
+
* which runs one full pass per cycle. A pass is never skipped or shortened; this is the time others get between passes.
|
|
19
|
+
*/
|
|
20
|
+
export declare const ESCROW_TOCK_MS = 31.25;
|
|
15
21
|
/** Protocol choices for a frame; input owners separately own cancellation and parsing. */
|
|
16
22
|
export interface DispatchOptions {
|
|
17
23
|
/** Whether the frame arrived through local witness/controller intake. */
|
|
@@ -102,6 +108,8 @@ export declare class ProtocolProcessor {
|
|
|
102
108
|
* @param options Local intake policy, hosted mailbox provenance and whether to advance escrows.
|
|
103
109
|
* @param kvy Input-specific Kevery in this domain; defaults to the shared owner.
|
|
104
110
|
* @returns Exact dispatch result and current mailbox authorization at its synchronous query decision.
|
|
111
|
+
* A message refused by validation after extraction is an `invalidMessage` drop, so the caller
|
|
112
|
+
* continues with the next frame as KERIpy's parser does.
|
|
105
113
|
* @throws Domain mismatch, infrastructure/handler or cleanup errors propagate; publication still runs in the dispatch finalizer.
|
|
106
114
|
*/
|
|
107
115
|
dispatch(frame: CesrFrame, { local, mailboxAid, escrows }?: DispatchOptions, kvy?: Kevery): Operation<ProtocolDispatchResult>;
|
|
@@ -128,7 +136,7 @@ export declare class ProtocolProcessor {
|
|
|
128
136
|
* - mirrors the dedicated `escrowDo` loop rather than folding escrow
|
|
129
137
|
* processing into parser ingress
|
|
130
138
|
*/
|
|
131
|
-
escrowDo(): Operation<never>;
|
|
139
|
+
escrowDo(clock?: RuntimeClock): Operation<never>;
|
|
132
140
|
}
|
|
133
141
|
/**
|
|
134
142
|
* Compose minimal KEL/reply/exchange intake over an existing Habery; acquire no stores or workers.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol-processing.d.ts","sourceRoot":"","sources":["../../../src/app/protocol/protocol-processing.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"protocol-processing.d.ts","sourceRoot":"","sources":["../../../src/app/protocol/protocol-processing.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEpD,OAAO,EAA0B,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,KAAK,YAAY,EAAe,MAAM,6BAA6B,CAAC;AAE7E,OAAO,EACL,KAAK,uBAAuB,EAE5B,KAAK,cAAc,EAGpB,MAAM,gBAAgB,CAAC;AAExB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,GAAG,IAAI;IAC7B,6EAA6E;IACpE,QAAQ,EAAE,gBAAgB,GAAG,IAAI;IAC1C,sFAAsF;IACrE,YAAY,EAAE,IAAI,CAAC,QAAQ,CAAC;IAC7C,0EAA0E;IACjE,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC;IAC7B,mFAAmF;IAC1E,OAAO,EAAE,YAAY,EACrB,GAAG,CAAC,EAAE,uBAAuB,YAAA;IAaxC;;;;OAIG;IACH,UAAU,IAAI,MAAM;IAWpB;;;;;;;;;;OAUG;IACH,QAAQ,CACN,KAAK,EAAE,SAAS,EAChB,EAAE,KAAsB,EAAE,UAAU,EAAE,OAAe,EAAE,GAAE,eAAoB,EAC7E,GAAG,GAAE,MAAiB,GACrB,SAAS,CAAC,sBAAsB,CAAC;IAgDpC,mGAAmG;IACnG,OAAO,CAAC,WAAW;IASnB,yFAAyF;IACxF,kBAAkB,IAAI,SAAS,CAAC,IAAI,CAAC;IAQtC;;;;;;OAMG;IACH,0BAA0B,IAAI,IAAI;IAQlC,0FAA0F;IAC1F,OAAO,CAAC,sBAAsB;IAK9B,qFAAqF;IACrF,OAAO,CAAE,cAAc;IAUvB;;;;;;OAMG;IACF,QAAQ,CAAC,KAAK,GAAE,YAA0B,GAAG,SAAS,CAAC,KAAK,CAAC;CAM/D;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,GAAG,iBAAiB,CAMtE"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Library entry points for key-state and anchor queries.
|
|
3
|
+
*
|
|
4
|
+
* A query is a finite workflow (`KeyStateNoticer` or `AnchorQuerier`) that runs
|
|
5
|
+
* beside the host's runtime workers, which send the request and ingest the reply.
|
|
6
|
+
* These functions never start those workers: a wallet already runs them, and the
|
|
7
|
+
* CLI runs them around the call (`cli/common/runtime-workers.ts`). The host must
|
|
8
|
+
* have configured the sender with the signing hab (`runAgentRuntime` does) and,
|
|
9
|
+
* for key state, wired its cue owner to the `cues` Deck it passes here.
|
|
10
|
+
*
|
|
11
|
+
* Begin/status/wait split. `begin*` spawns the workflow in the caller's scope and
|
|
12
|
+
* returns a {@link QueryRun}; `wait` observes it against a deadline; `queryKeyState`
|
|
13
|
+
* and `queryAnchor` are begin + wait + halt. Tasks belong to the scope that began
|
|
14
|
+
* them, so a UI that begins a query keeps that scope open and halts the run.
|
|
15
|
+
*/
|
|
16
|
+
import type { SealEvent } from "cesr-ts";
|
|
17
|
+
import { type Operation } from "effection";
|
|
18
|
+
import type { AgentCue } from "../../core/cues.js";
|
|
19
|
+
import type { Deck } from "../../core/deck.js";
|
|
20
|
+
import type { Hab, Habery } from "../identity/habbing.js";
|
|
21
|
+
import type { ChangeSink, WaitResult } from "../runtime/workflow-contract.js";
|
|
22
|
+
import type { WitnessInquisitor } from "./witness-inquisitor.js";
|
|
23
|
+
/** One elapsed deadline covers query sending and independently received evidence. */
|
|
24
|
+
export declare const QUERY_TIMEOUT_MS = 10000;
|
|
25
|
+
/** Exact event seal sought by an anchor query. */
|
|
26
|
+
export type QueryAnchor = ReturnType<typeof SealEvent.toSad>;
|
|
27
|
+
/** Collaborators every query needs: accepted-state stores and the query sender. */
|
|
28
|
+
export interface QueryDeps {
|
|
29
|
+
readonly hby: Habery;
|
|
30
|
+
readonly querying: WitnessInquisitor;
|
|
31
|
+
/** Optional sink told `{kind:"query", id:"<prefix>"}` when a query starts and when it completes. */
|
|
32
|
+
readonly changes?: ChangeSink;
|
|
33
|
+
}
|
|
34
|
+
/** Key-state queries also need the Deck the host's cue owner fills with saved notices. */
|
|
35
|
+
export interface KeyStateQueryDeps extends QueryDeps {
|
|
36
|
+
readonly cues: Deck<AgentCue>;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Status of a query. `scope` says where the fact lives: `"process"` means it is
|
|
40
|
+
* held only by the running {@link QueryRun} and is lost on restart or reload
|
|
41
|
+
* (key-state completion rides a transient `keyStateSaved` cue that leaves no
|
|
42
|
+
* durable record); `"durable"` means it was recomputed from stores
|
|
43
|
+
* ({@link anchorQueryStatus}).
|
|
44
|
+
*/
|
|
45
|
+
export type QueryStatus = {
|
|
46
|
+
state: "active";
|
|
47
|
+
phase: "awaitingEvidence";
|
|
48
|
+
scope: "process" | "durable";
|
|
49
|
+
} | {
|
|
50
|
+
state: "completed";
|
|
51
|
+
scope: "process" | "durable";
|
|
52
|
+
};
|
|
53
|
+
/** Result of waiting on a query: settled once accepted evidence satisfied it, or the deadline won. */
|
|
54
|
+
export type QueryOutcome = WaitResult<QueryStatus>;
|
|
55
|
+
/** Wait budget for a blocking query. */
|
|
56
|
+
export interface QueryWaitOptions {
|
|
57
|
+
/** Wall-clock budget; defaults to {@link QUERY_TIMEOUT_MS}. */
|
|
58
|
+
timeoutMs?: number;
|
|
59
|
+
}
|
|
60
|
+
/** Inputs shared by key-state and anchor queries. */
|
|
61
|
+
export interface QueryTarget {
|
|
62
|
+
/** Local member or single-controller requester that signs the query. */
|
|
63
|
+
hab: Hab;
|
|
64
|
+
/** Subject AID being queried; distinct from the requester. */
|
|
65
|
+
prefix: string;
|
|
66
|
+
}
|
|
67
|
+
/** Handle on a started query; its tasks belong to the scope that began it. */
|
|
68
|
+
export interface QueryRun {
|
|
69
|
+
readonly prefix: string;
|
|
70
|
+
/** Process-local status (`scope: "process"`): completed once the workflow task has returned. */
|
|
71
|
+
status(): QueryStatus;
|
|
72
|
+
/** Observe completion against a fresh deadline; a timeout leaves the run going. */
|
|
73
|
+
wait(options?: QueryWaitOptions): Operation<QueryOutcome>;
|
|
74
|
+
/** Halt the workflow. Safe after completion. */
|
|
75
|
+
halt(): Operation<void>;
|
|
76
|
+
}
|
|
77
|
+
/** Reject group habs: a query must be signed by one member, not by a group needing more signatures. */
|
|
78
|
+
export declare function requireQueryRequester(hby: Habery, hab: Hab): void;
|
|
79
|
+
/** Durable anchor status (`scope: "durable"`): the accepted KEL of `prefix` already holds the exact seal. */
|
|
80
|
+
export declare function anchorQueryStatus(deps: Pick<QueryDeps, "hby">, prefix: string, anchor: QueryAnchor): QueryStatus;
|
|
81
|
+
/** Start a key-state query in the caller's scope. */
|
|
82
|
+
export declare function beginKeyStateQuery(deps: KeyStateQueryDeps, target: QueryTarget): Operation<QueryRun>;
|
|
83
|
+
/** Start an anchor query in the caller's scope. */
|
|
84
|
+
export declare function beginAnchorQuery(deps: QueryDeps, target: QueryTarget & {
|
|
85
|
+
anchor: QueryAnchor;
|
|
86
|
+
}): Operation<QueryRun>;
|
|
87
|
+
/**
|
|
88
|
+
* Query current key state for `prefix` and wait for accepted evidence.
|
|
89
|
+
*
|
|
90
|
+
* @returns `settled` (status `completed`), or `timed-out`; a timeout is not permission to treat
|
|
91
|
+
* stale local state as success. Workflow failures propagate.
|
|
92
|
+
*/
|
|
93
|
+
export declare function queryKeyState(deps: KeyStateQueryDeps, target: QueryTarget, options?: QueryWaitOptions): Operation<QueryOutcome>;
|
|
94
|
+
/** Query for an accepted KEL event holding the exact seal `target.anchor`; see {@link queryKeyState}. */
|
|
95
|
+
export declare function queryAnchor(deps: QueryDeps, target: QueryTarget & {
|
|
96
|
+
anchor: QueryAnchor;
|
|
97
|
+
}, options?: QueryWaitOptions): Operation<QueryOutcome>;
|
|
98
|
+
//# sourceMappingURL=query-workflows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-workflows.d.ts","sourceRoot":"","sources":["../../../src/app/queries/query-workflows.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAQ,KAAK,SAAS,EAAiC,MAAM,WAAW,CAAC;AAChF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,wBAAwB,C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c/chaining.js";
|
|
3
3
|
import { type Regery as AcdcRegery } from "../../acdc/registraring.js";
|
|
4
4
|
import { RegistryRoot } from "../../acdc/salting.js";
|
|
5
|
-
import { Unblind } from "../../acdc/unblinding.js";
|
|
6
5
|
import type { AgentCue } from "../../core/cues.js";
|
|
7
6
|
import { Deck } from "../../core/deck.js";
|
|
8
7
|
import type { KeriDispatchEnvelope, TransIdxSigGroup } from "../../core/dispatch.js";
|
|
@@ -14,14 +13,17 @@ import { Reger } from "../../db/reger.js";
|
|
|
14
13
|
import { Regery as VdrRegery } from "../../vdr/credentialing.js";
|
|
15
14
|
import { Authenticator } from "../bootstrap/authenticating.js";
|
|
16
15
|
import { Oobiery, type OobiJob } from "../bootstrap/oobiery.js";
|
|
16
|
+
import type { RootReplicator } from "../credentials/root-replicator.js";
|
|
17
17
|
import { Poster } from "../delivery/forwarding.js";
|
|
18
18
|
import { ReplyStreams } from "../delivery/reply-streams.js";
|
|
19
19
|
import { Respondant } from "../delivery/respondant.js";
|
|
20
20
|
import { Exchanger } from "../exchanges/exchanging.js";
|
|
21
21
|
import { Anchorer } from "../identity/delegating.js";
|
|
22
22
|
import type { Hab, Habery } from "../identity/habbing.js";
|
|
23
|
+
import { KelPublisher } from "../mailbox/kel-publisher.js";
|
|
23
24
|
import { MailboxDirector } from "../mailbox/mailbox-director.js";
|
|
24
|
-
import { type MailboxPollBatch, MailboxPoller } from "../mailbox/mailbox-poller.js";
|
|
25
|
+
import { type MailboxPollBatch, MailboxPoller, type MailboxPollingTimeoutPolicy } from "../mailbox/mailbox-poller.js";
|
|
26
|
+
import { Counselor } from "../multisig/counseling.js";
|
|
25
27
|
import { type Multiplexor } from "../multisig/grouping.js";
|
|
26
28
|
import { Notifier } from "../notifications/notifying.js";
|
|
27
29
|
import { Signaler } from "../notifications/signaling.js";
|
|
@@ -30,25 +32,12 @@ import { Reactor } from "../protocol/reactor.js";
|
|
|
30
32
|
import { QueryReplies } from "../queries/query-replies.js";
|
|
31
33
|
import { WitnessInquisitor } from "../queries/witness-inquisitor.js";
|
|
32
34
|
import type { HttpClient } from "../transport/http-client.js";
|
|
35
|
+
import { type DoerPacing } from "./doing.js";
|
|
36
|
+
import { IpexAuxiliaries } from "./ipex-auxiliaries.js";
|
|
37
|
+
import { type OperationStores, type RuntimeOperations } from "./operation-owners.js";
|
|
38
|
+
import type { RetryPolicy } from "./retry-backoff.js";
|
|
33
39
|
import type { RuntimeClock } from "./runtime-clock.js";
|
|
34
40
|
export type { KeriDispatchEnvelope, OobiJob, TransIdxSigGroup };
|
|
35
|
-
/** One explicitly selected local IPEX auxiliary owner; construction never approves a Grant. */
|
|
36
|
-
export type IpexAuxiliarySelection = {
|
|
37
|
-
kind: "dhke";
|
|
38
|
-
hab: Hab;
|
|
39
|
-
} | {
|
|
40
|
-
kind: "unblind";
|
|
41
|
-
hab: Hab;
|
|
42
|
-
states: readonly string[];
|
|
43
|
-
};
|
|
44
|
-
/** Concrete owner exposed only at composition for finite application orchestration. */
|
|
45
|
-
export type IpexAuxiliary = {
|
|
46
|
-
kind: "dhke";
|
|
47
|
-
owner: Dhke;
|
|
48
|
-
} | {
|
|
49
|
-
kind: "unblind";
|
|
50
|
-
owner: Unblind;
|
|
51
|
-
};
|
|
52
41
|
/**
|
|
53
42
|
* Shared runtime composition root owned by one `Habery`.
|
|
54
43
|
*
|
|
@@ -87,8 +76,19 @@ export interface AgentRuntime {
|
|
|
87
76
|
exc: Exchanger;
|
|
88
77
|
/** Group proposal coordinator behind the registered `/multisig/*` routes; owners share routes by child route. */
|
|
89
78
|
mux: Multiplexor;
|
|
90
|
-
/**
|
|
91
|
-
|
|
79
|
+
/**
|
|
80
|
+
* Per-identifier DH and Unblind owners, created on first use for any local identifier, including
|
|
81
|
+
* ones made after the runtime. Null only for a read-only Habery, which has no v2 registry store.
|
|
82
|
+
* Obtaining an owner grants no consent; with KRAM off `approve` throws a "requires KRAM" error.
|
|
83
|
+
*/
|
|
84
|
+
readonly ipex: IpexAuxiliaries | null;
|
|
85
|
+
/**
|
|
86
|
+
* Issuance, presentation and Unblind operations owners, composed whenever `ipex` is.
|
|
87
|
+
* `runAgentRuntime` runs them on one fiber with an adaptive cadence.
|
|
88
|
+
*/
|
|
89
|
+
readonly operations: RuntimeOperations | null;
|
|
90
|
+
/** Root copy replicator driven by the owners loop; null without `ipex` or under `registryRoots: "refuse"`. */
|
|
91
|
+
readonly rootReplicator: RootReplicator | null;
|
|
92
92
|
/** Durable OOBI job owner, independent of outgoing delivery. */
|
|
93
93
|
oobiery: Oobiery;
|
|
94
94
|
/** Well-known authentication jobs over the shared HTTP service. */
|
|
@@ -103,6 +103,21 @@ export interface AgentRuntime {
|
|
|
103
103
|
postman: Poster;
|
|
104
104
|
/** Delegation workflow state and delivery/accepted-state gates. */
|
|
105
105
|
delegating: Anchorer;
|
|
106
|
+
/**
|
|
107
|
+
* Group-event completion over `gpse`/`gdee`/`gpwe`/`cgms`. It acts only on events a
|
|
108
|
+
* caller registered with `start`/`supply`; `runAgentRuntime` runs its loop.
|
|
109
|
+
*/
|
|
110
|
+
counselor: Counselor;
|
|
111
|
+
/** Tells an identifier's mailboxes its KEL after a rotation; `runAgentRuntime` runs its fiber. */
|
|
112
|
+
kelPublisher: KelPublisher;
|
|
113
|
+
/** Pacing of the owners loop `runAgentRuntime` runs. */
|
|
114
|
+
readonly ownerPacing: Readonly<DoerPacing>;
|
|
115
|
+
/** Pacing of the KEL publisher loop `runAgentRuntime` runs. */
|
|
116
|
+
readonly publisherPacing: Readonly<DoerPacing>;
|
|
117
|
+
/** Pacing of the protocol-facing background loops `runAgentRuntime` runs. */
|
|
118
|
+
readonly protocolPacing: Readonly<DoerPacing>;
|
|
119
|
+
/** Pacing of the mailbox poller `runAgentRuntime` runs. */
|
|
120
|
+
readonly pollerPacing: Readonly<DoerPacing>;
|
|
106
121
|
/**
|
|
107
122
|
* Background unsigned-request sender, run independently of reply intake.
|
|
108
123
|
* Pending sender work excludes semantic query waits; their invoking operations
|
|
@@ -152,16 +167,44 @@ export interface AgentRuntimeOptions {
|
|
|
152
167
|
notifier?: Notifier;
|
|
153
168
|
/** Construct a provider mailbox store. Omitted leaves it absent; injected mailboxer stays borrowed. */
|
|
154
169
|
enableMailboxStore?: boolean;
|
|
170
|
+
/**
|
|
171
|
+
* Header and poll-window overrides, in milliseconds, for this runtime's mailbox poller. Omitted values keep
|
|
172
|
+
* the poller defaults; a short `maxPollDurationMs` makes polls turn over quickly for an embedder or test.
|
|
173
|
+
*/
|
|
174
|
+
mailboxPolling?: Partial<MailboxPollingTimeoutPolicy>;
|
|
175
|
+
/** Delivery retry delays of the issuance, presentation and Unblind operations; the production policy when absent. */
|
|
176
|
+
operationRetry?: Readonly<RetryPolicy>;
|
|
177
|
+
/** Milliseconds between issuer DH query resends of an individual issuance; one second when absent. */
|
|
178
|
+
issuanceQueryResendMs?: number;
|
|
179
|
+
/** Receipt retry delays of the Counselor; only `baseMs` and `maxMs` apply. Production policy when absent. */
|
|
180
|
+
counselorReceiptRetry?: Readonly<RetryPolicy>;
|
|
181
|
+
/** Retry delays and budget of KEL posts to mailboxes; the production policy when absent. */
|
|
182
|
+
kelPublishRetry?: Readonly<RetryPolicy>;
|
|
183
|
+
/** Tock and sweep interval of the operation owners loop; {@link OWNER_PACING} when absent. A host that must be gentler (a background tab, a battery) slows it. */
|
|
184
|
+
ownerPacing?: Readonly<DoerPacing>;
|
|
185
|
+
/** Tock and sweep interval of the KEL publisher loop; {@link KEL_PUBLISHER_PACING} when absent. */
|
|
186
|
+
publisherPacing?: Readonly<DoerPacing>;
|
|
187
|
+
/** Tock of the protocol-facing background loops (cues, OOBI, authentication, signals, TEL publication, delegation, group counseling); {@link PROTOCOL_PACING} when absent. */
|
|
188
|
+
protocolPacing?: Readonly<DoerPacing>;
|
|
189
|
+
/** Tock and sweep interval of the mailbox poller; {@link MAILBOX_POLLER_PACING} when absent: a sweep every five seconds. */
|
|
190
|
+
pollerPacing?: Readonly<DoerPacing>;
|
|
155
191
|
/** Borrowed legacy registry store; the runtime creates its processors and never closes this store. */
|
|
156
192
|
reger?: Reger;
|
|
157
193
|
/** An injected v2 manager and its backing store remain caller-owned. */
|
|
158
194
|
acdc?: AcdcRegery;
|
|
159
195
|
/** Sender filtering for v2 non-event ingress; denial always wins. */
|
|
160
196
|
messagePolicy?: MessagePolicy;
|
|
161
|
-
/**
|
|
197
|
+
/**
|
|
198
|
+
* Optional KRAM uses the trusted runtime receiver clock; enabled without `caches` uses `DEFAULT_KRAM_CACHES`.
|
|
199
|
+
* Omitting it leaves KRAM off, which KERIpy also does by default. DH and Unblind need it: with it off the
|
|
200
|
+
* owners still compose, but their `approve` throws a "requires KRAM" error.
|
|
201
|
+
*/
|
|
162
202
|
kram?: KramConfig;
|
|
163
|
-
/**
|
|
164
|
-
|
|
203
|
+
/**
|
|
204
|
+
* What an embedder may supply to the operation owners (the blind-derivation store and a change sink);
|
|
205
|
+
* the rest is composed. See {@link OperationStores}.
|
|
206
|
+
*/
|
|
207
|
+
operationStores?: OperationStores;
|
|
165
208
|
/**
|
|
166
209
|
* `/registry/root` policy. `"accept"` (default) registers `RegistryRoot` when
|
|
167
210
|
* a v2 registry is available, so copies are retained or escrowed on arrival.
|
|
@@ -169,6 +212,12 @@ export interface AgentRuntimeOptions {
|
|
|
169
212
|
* persisted; service roles that hold no registries use it.
|
|
170
213
|
*/
|
|
171
214
|
registryRoots?: "accept" | "refuse";
|
|
215
|
+
/**
|
|
216
|
+
* v2 Grant treatment of an undisclosed far node. `"open"` (default) refuses
|
|
217
|
+
* an AND group or sole Edge that needs it but lets a valid OR sibling hold;
|
|
218
|
+
* `"closed"` refuses any Grant missing a far node. Neither mode escrows.
|
|
219
|
+
*/
|
|
220
|
+
grantWalk?: AcdcWalkPolicy;
|
|
172
221
|
}
|
|
173
222
|
/** Summary of pending runtime-backed durable work for bounded command hosts. */
|
|
174
223
|
export interface RuntimePendingState {
|
|
@@ -204,6 +253,8 @@ export interface RuntimePendingState {
|
|
|
204
253
|
* Whether witness, unanchored or publication delegation escrow remains.
|
|
205
254
|
*/
|
|
206
255
|
delegationPending: boolean;
|
|
256
|
+
/** True while a group event awaits signatures, a delegator or witness receipts. */
|
|
257
|
+
groupPending: boolean;
|
|
207
258
|
/** True while unsigned query requests or their current transport attempt remain. */
|
|
208
259
|
queriesPending: boolean;
|
|
209
260
|
/** True while independently retained query/cue delivery owners remain. */
|
|
@@ -295,6 +346,9 @@ export declare function runtimePendingState(runtime: AgentRuntime): RuntimePendi
|
|
|
295
346
|
export declare function runtimeHasPendingWork(runtime: AgentRuntime): boolean;
|
|
296
347
|
/**
|
|
297
348
|
* Return true once OOBI acceptance and its ingress/query dependencies settle.
|
|
349
|
+
* This is a whole-runtime drain predicate: any unrelated pending cue, query,
|
|
350
|
+
* delegation or OOBI keeps it false. A command or request that asked for one
|
|
351
|
+
* OOBI must wait with `waitForOobi` (`app/bootstrap/oobi-resolving.ts`) instead.
|
|
298
352
|
* Background receipt delivery is not remote acknowledgement of OOBI acceptance;
|
|
299
353
|
* static OOBI servers may refuse unsolicited posts. Runtime close still joins I/O.
|
|
300
354
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-runtime.d.ts","sourceRoot":"","sources":["../../../src/app/runtime/agent-runtime.ts"],"names":[],"mappings":"AACA,OAAO,EAAQ,KAAK,SAAS,EAA4B,MAAM,WAAW,CAAC;AAC3E,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"agent-runtime.d.ts","sourceRoot":"","sources":["../../../src/app/runtime/agent-runtime.ts"],"names":[],"mappings":"AACA,OAAO,EAAQ,KAAK,SAAS,EAA4B,MAAM,WAAW,CAAC;AAC3E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE7D,OAAO,EAAoC,KAAK,MAAM,IAAI,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACzG,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,EAAE,QAAQ,EAA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tB,SAAS,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;CACvB,GACL,SAAS,CAAC,IAAI,CAAC,CAmEjB"}
|
|
@@ -3,6 +3,7 @@ import type { AgentCue } from "../../core/cues.js";
|
|
|
3
3
|
import type { Deck } from "../../core/deck.js";
|
|
4
4
|
import type { Hab } from "../identity/habbing.js";
|
|
5
5
|
import type { AgentRuntime } from "./agent-runtime.js";
|
|
6
|
+
import { type DoerPacing } from "./doing.js";
|
|
6
7
|
/**
|
|
7
8
|
* Route one initial cue batch to its concrete owners before removing source records.
|
|
8
9
|
*
|
|
@@ -29,5 +30,5 @@ export declare function processCuesOnce(runtime: AgentRuntime, { hab, queryCues
|
|
|
29
30
|
export declare function cueDo(runtime: AgentRuntime, options?: {
|
|
30
31
|
hab?: Hab;
|
|
31
32
|
queryCues?: Deck<AgentCue>;
|
|
32
|
-
}): Operation<never>;
|
|
33
|
+
}, pacing?: Readonly<DoerPacing>): Operation<never>;
|
|
33
34
|
//# sourceMappingURL=cue-runtime.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cue-runtime.d.ts","sourceRoot":"","sources":["../../../src/app/runtime/cue-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"cue-runtime.d.ts","sourceRoot":"","sources":["../../../src/app/runtime/cue-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,KAAK,UAAU,EAA4B,MAAM,YAAY,CAAC;AAgBvE;;;;;;;;;;;;GAYG;AACH,wBAAiB,eAAe,CAC9B,OAAO,EAAE,YAAY,EACrB,EAAE,GAAG,EAAE,SAAS,EAAE,GAAE;IAAE,GAAG,CAAC,EAAE,GAAG,CAAC;IAAC,SAAS,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;CAAO,GACjE,SAAS,CAAC,IAAI,CAAC,CAgBjB;AAED;;;;;GAKG;AACH,wBAAiB,KAAK,CACpB,OAAO,EAAE,YAAY,EACrB,OAAO,GAAE;IAAE,GAAG,CAAC,EAAE,GAAG,CAAC;IAAC,SAAS,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;CAAO,EACvD,MAAM,GAAE,QAAQ,CAAC,UAAU,CAAmB,GAC7C,SAAS,CAAC,KAAK,CAAC,CAElB"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ordered outbox of signed bytes an operation owes its peers, with retry.
|
|
3
|
+
*
|
|
4
|
+
* An operation's steps decide what to send and queue it here; the owner drains the queue each pass. A delivery
|
|
5
|
+
* that fails keeps its message at the head and is retried after a doubling delay ({@link RetryBackoff}), so a peer
|
|
6
|
+
* that is briefly offline delays an operation instead of ending it. The owner decides when retrying stops: an
|
|
7
|
+
* operation with a deadline ends at the deadline, and one without ends once failures have lasted the bound it
|
|
8
|
+
* states. Memory only: the signed messages themselves are durable in the protocol stores.
|
|
9
|
+
*/
|
|
10
|
+
import type { Operation } from "effection";
|
|
11
|
+
import { type RetryPolicy } from "./retry-backoff.js";
|
|
12
|
+
import type { RuntimeClock } from "./runtime-clock.js";
|
|
13
|
+
/** One message waiting for delivery. */
|
|
14
|
+
export interface Outbound {
|
|
15
|
+
src: string;
|
|
16
|
+
dest: string;
|
|
17
|
+
/** The signed bytes, or a producer called at delivery for a message that must be timely when it leaves (a query). */
|
|
18
|
+
msg: Uint8Array | (() => Uint8Array);
|
|
19
|
+
topic?: string;
|
|
20
|
+
}
|
|
21
|
+
/** Signed bytes handed to the transport. */
|
|
22
|
+
export interface DeliveryMessage {
|
|
23
|
+
src: string;
|
|
24
|
+
dest: string;
|
|
25
|
+
msg: Uint8Array;
|
|
26
|
+
topic?: string;
|
|
27
|
+
}
|
|
28
|
+
/** Delivery of signed bytes; resolves once the transport reports an outcome and throws when it failed. */
|
|
29
|
+
export interface OutboxDelivery {
|
|
30
|
+
deliver(message: DeliveryMessage): Operation<string[]>;
|
|
31
|
+
}
|
|
32
|
+
/** Why the head delivery is being retried; part of an active operation's status. */
|
|
33
|
+
export interface DeliveryFailure {
|
|
34
|
+
/** Consecutive failures of the head message. */
|
|
35
|
+
attempts: number;
|
|
36
|
+
/** The error's message followed by its `cause` chain, joined with " <- ". */
|
|
37
|
+
reason: string;
|
|
38
|
+
/** When the next attempt is due (ISO 8601). */
|
|
39
|
+
retryAt: string;
|
|
40
|
+
}
|
|
41
|
+
/** Flatten an error and its `cause` chain to one line of text, so a reader sees the transport's own reason. */
|
|
42
|
+
export declare function describeFailure(error: unknown): string;
|
|
43
|
+
/** The queue and its retry state for one live operation. */
|
|
44
|
+
export declare class DeliveryOutbox {
|
|
45
|
+
private readonly queue;
|
|
46
|
+
private readonly backoff;
|
|
47
|
+
/** Destinations the transport reported for everything delivered so far. */
|
|
48
|
+
readonly delivered: string[];
|
|
49
|
+
constructor(policy?: Readonly<RetryPolicy>);
|
|
50
|
+
/** Messages still waiting. */
|
|
51
|
+
get length(): number;
|
|
52
|
+
/** Consecutive delivery failures of the head message. */
|
|
53
|
+
get attempts(): number;
|
|
54
|
+
/** The latest delivery error, or null. */
|
|
55
|
+
get lastError(): unknown;
|
|
56
|
+
/** The retry state of the head message, or null while nothing is failing. */
|
|
57
|
+
get failure(): DeliveryFailure | null;
|
|
58
|
+
/** Queue a message behind the others. */
|
|
59
|
+
enqueue(message: Outbound): void;
|
|
60
|
+
/**
|
|
61
|
+
* Deliver the queued messages in order. A failure keeps the message and schedules a retry; it throws only when
|
|
62
|
+
* `boundMs` is given and failures have lasted that long.
|
|
63
|
+
*
|
|
64
|
+
* @returns True when the queue is empty, false while a message waits for its retry.
|
|
65
|
+
*/
|
|
66
|
+
drain(transport: OutboxDelivery, clock: RuntimeClock, boundMs?: number): Operation<boolean>;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=delivery-outbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delivery-outbox.d.ts","sourceRoot":"","sources":["../../../src/app/runtime/delivery-outbox.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAsC,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC1F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,wCAAwC;AACxC,MAAM,WAAW,QAAQ;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,qHAAqH;IACrH,GAAG,EAAE,UAAU,GAAG,CAAC,MAAM,UAAU,CAAC,CAAC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,4CAA4C;AAC5C,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,UAAU,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,0GAA0G;AAC1G,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,OAAO,EAAE,eAAe,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC;CACxD;AAED,oFAAoF;AACpF,MAAM,WAAW,eAAe;IAC9B,gDAAgD;IAChD,QAAQ,EAAE,MAAM,CAAC;IACjB,6EAA6E;IAC7E,MAAM,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,+GAA+G;AAC/G,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAOtD;AAED,4DAA4D;AAC5D,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAkB;IACxC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAe;IACvC,2EAA2E;IAC3E,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,CAAM;gBAEtB,MAAM,GAAE,QAAQ,CAAC,WAAW,CAAwB;IAIhE,8BAA8B;IAC9B,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,yDAAyD;IACzD,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,0CAA0C;IAC1C,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED,6EAA6E;IAC7E,IAAI,OAAO,IAAI,eAAe,GAAG,IAAI,CAQpC;IAED,yCAAyC;IACzC,OAAO,CAAC,OAAO,EAAE,QAAQ,GAAG,IAAI;IAIhC;;;;;OAKG;IACF,KAAK,CAAC,SAAS,EAAE,cAAc,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC,OAAO,CAAC;CAmB7F"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fixed-tock doers: a background loop is a pass that runs, then waits one tock on the runtime clock, as a HIO
|
|
3
|
+
* `Doer` is re-run every `tock` (`hio/base/doing.py`) and KERIpy's Doist cycles at 0.03125 s. A loop never
|
|
4
|
+
* sleeps for a variable time and is never woken early; work that arrives between tocks is seen on the next one.
|
|
5
|
+
* The wait follows the pass, not a fixed rate, because a pass awaits network I/O.
|
|
6
|
+
*/
|
|
7
|
+
import type { Operation } from "effection";
|
|
8
|
+
import type { RuntimeClock } from "./runtime-clock.js";
|
|
9
|
+
/** One pass of a doer; `tock` counts passes from 0, so a doer can do heavier work on tock 0 and every Nth. */
|
|
10
|
+
export type DoerPass = (tock: number) => Operation<unknown>;
|
|
11
|
+
/**
|
|
12
|
+
* How often a doer runs, in milliseconds, and how many tocks apart its full sweeps are. A host that must be
|
|
13
|
+
* gentler (a browser wallet in a background tab, a mobile wallet on battery) supplies longer values.
|
|
14
|
+
*/
|
|
15
|
+
export interface DoerPacing {
|
|
16
|
+
tockMs: number;
|
|
17
|
+
sweepTocks: number;
|
|
18
|
+
}
|
|
19
|
+
/** Milliseconds between passes of the protocol-facing background loops: KERIpy's Doist cycle, as the escrow loop uses. */
|
|
20
|
+
export declare const PROTOCOL_TOCK_MS = 31.25;
|
|
21
|
+
/** Tocks between full sweeps of a loop that has one: 1920 tocks of 31.25 ms is a minute. */
|
|
22
|
+
export declare const PROTOCOL_SWEEP_TOCKS = 1920;
|
|
23
|
+
/** The production pacing of the protocol-facing background loops. */
|
|
24
|
+
export declare const PROTOCOL_PACING: Readonly<DoerPacing>;
|
|
25
|
+
/** Run `pass` forever: pass 0, wait `tockMs` on `clock`, pass 1, and so on. A thrown error ends the doer. */
|
|
26
|
+
export declare function doEvery(clock: RuntimeClock, tockMs: number, pass: DoerPass): Operation<never>;
|
|
27
|
+
//# sourceMappingURL=doing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doing.d.ts","sourceRoot":"","sources":["../../../src/app/runtime/doing.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGvD,8GAA8G;AAC9G,MAAM,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,SAAS,CAAC,OAAO,CAAC,CAAC;AAE5D;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,0HAA0H;AAC1H,eAAO,MAAM,gBAAgB,QAAQ,CAAC;AACtC,4FAA4F;AAC5F,eAAO,MAAM,oBAAoB,OAAO,CAAC;AACzC,qEAAqE;AACrE,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,UAAU,CAG/C,CAAC;AAEH,6GAA6G;AAC7G,wBAAiB,OAAO,CAAC,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,SAAS,CAAC,KAAK,CAAC,CAK9F"}
|