@kya-os/mcp 1.16.2 → 1.18.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/AUDITABILITY.md +129 -8
- package/CHANGELOG.md +641 -0
- package/CONFORMANCE.md +12 -6
- package/README.md +67 -26
- package/SPEC.md +105 -18
- package/dist/audit/adapters/legacy-audit-log.d.ts +0 -1
- package/dist/audit/adapters/mcp.d.ts +0 -1
- package/dist/audit/adapters/mcp.js +35 -20
- package/dist/audit/adapters/mcp.js.map +1 -1
- package/dist/audit/adapters/references.d.ts +9 -0
- package/dist/audit/adapters/references.js +22 -0
- package/dist/audit/adapters/references.js.map +1 -0
- package/dist/audit/assurance.d.ts +0 -1
- package/dist/audit/checkpoint-coordinator.d.ts +0 -1
- package/dist/audit/checkpoint.d.ts +17 -1
- package/dist/audit/checkpoint.js +76 -21
- package/dist/audit/checkpoint.js.map +1 -1
- package/dist/audit/cli.d.ts +0 -1
- package/dist/audit/crypto.d.ts +0 -1
- package/dist/audit/crypto.js +12 -3
- package/dist/audit/crypto.js.map +1 -1
- package/dist/audit/errors.d.ts +0 -1
- package/dist/audit/evidence.d.ts +0 -1
- package/dist/audit/index.d.ts +0 -1
- package/dist/audit/integrity.d.ts +0 -1
- package/dist/audit/merkle.d.ts +0 -1
- package/dist/audit/mirror-service.d.ts +0 -1
- package/dist/audit/projection.d.ts +1 -1
- package/dist/audit/projection.js +23 -2
- package/dist/audit/projection.js.map +1 -1
- package/dist/audit/providers/anchor.d.ts +0 -1
- package/dist/audit/providers/evidence.d.ts +0 -1
- package/dist/audit/providers/journal.d.ts +0 -1
- package/dist/audit/providers/memory-journal.d.ts +0 -1
- package/dist/audit/providers/observer.d.ts +0 -1
- package/dist/audit/providers/outbox.d.ts +35 -6
- package/dist/audit/providers/outbox.js +46 -8
- package/dist/audit/providers/outbox.js.map +1 -1
- package/dist/audit/providers/recorder-client.d.ts +0 -1
- package/dist/audit/providers/source-state.d.ts +24 -2
- package/dist/audit/providers/source-state.js +65 -44
- package/dist/audit/providers/source-state.js.map +1 -1
- package/dist/audit/read-contract.d.ts +0 -1
- package/dist/audit/read-service.d.ts +2 -3
- package/dist/audit/read-service.js +17 -12
- package/dist/audit/read-service.js.map +1 -1
- package/dist/audit/recorder-service.d.ts +33 -5
- package/dist/audit/recorder-service.js +116 -20
- package/dist/audit/recorder-service.js.map +1 -1
- package/dist/audit/reference-recorder.d.ts +0 -1
- package/dist/audit/replay-bundle.d.ts +0 -1
- package/dist/audit/replay-bundle.js +143 -36
- package/dist/audit/replay-bundle.js.map +1 -1
- package/dist/audit/schemas.d.ts +0 -1
- package/dist/audit/service.d.ts +6 -3
- package/dist/audit/service.js +55 -24
- package/dist/audit/service.js.map +1 -1
- package/dist/audit/testing/index.d.ts +0 -1
- package/dist/audit/testing/provider-contracts.d.ts +1 -2
- package/dist/audit/testing/provider-contracts.js +32 -2
- package/dist/audit/testing/provider-contracts.js.map +1 -1
- package/dist/audit/types.d.ts +0 -1
- package/dist/audit/verifier.d.ts +57 -5
- package/dist/audit/verifier.js +240 -49
- package/dist/audit/verifier.js.map +1 -1
- package/dist/auth/handshake.d.ts +12 -1
- package/dist/auth/handshake.js +44 -11
- package/dist/auth/handshake.js.map +1 -1
- package/dist/auth/index.d.ts +0 -1
- package/dist/auth/types.d.ts +0 -1
- package/dist/authz/accountability.d.ts +0 -1
- package/dist/authz/adapter.d.ts +0 -1
- package/dist/authz/examples/inmemory-oidc.d.ts +0 -1
- package/dist/authz/index.d.ts +0 -1
- package/dist/authz/oidc/authorize.d.ts +0 -1
- package/dist/authz/oidc/metadata.d.ts +0 -1
- package/dist/authz/oidc/oidc-adapter.d.ts +0 -1
- package/dist/authz/oidc/oidc-adapter.js +51 -3
- package/dist/authz/oidc/oidc-adapter.js.map +1 -1
- package/dist/authz/oidc/pending-flow-store.d.ts +6 -1
- package/dist/authz/oidc/pending-flow-store.js +22 -2
- package/dist/authz/oidc/pending-flow-store.js.map +1 -1
- package/dist/authz/oidc/pkce.d.ts +0 -1
- package/dist/authz/registry.d.ts +0 -1
- package/dist/authz/requirement.d.ts +0 -1
- package/dist/card/build.d.ts +0 -1
- package/dist/card/builder.d.ts +0 -1
- package/dist/card/cimd.d.ts +19 -5
- package/dist/card/cimd.js +52 -7
- package/dist/card/cimd.js.map +1 -1
- package/dist/card/delegation.d.ts +12 -4
- package/dist/card/delegation.js +38 -22
- package/dist/card/delegation.js.map +1 -1
- package/dist/card/emit.d.ts +0 -1
- package/dist/card/index.d.ts +0 -1
- package/dist/card/middleware.d.ts +0 -1
- package/dist/card/proof/build.d.ts +0 -1
- package/dist/card/proof/canonical.d.ts +0 -1
- package/dist/card/proof/canonical.js +6 -1
- package/dist/card/proof/canonical.js.map +1 -1
- package/dist/card/proof/http-sig.d.ts +0 -1
- package/dist/card/proof/index.d.ts +0 -1
- package/dist/card/proof/nonce-cache.d.ts +15 -14
- package/dist/card/proof/nonce-cache.js +22 -20
- package/dist/card/proof/nonce-cache.js.map +1 -1
- package/dist/card/proof/signer.d.ts +0 -1
- package/dist/card/proof/types.d.ts +10 -4
- package/dist/card/proof/types.js +2 -2
- package/dist/card/proof/verify.d.ts +0 -1
- package/dist/card/proof/verify.js +17 -3
- package/dist/card/proof/verify.js.map +1 -1
- package/dist/card/resolve.d.ts +0 -1
- package/dist/card/resolve.js +13 -8
- package/dist/card/resolve.js.map +1 -1
- package/dist/card/revocation.d.ts +0 -1
- package/dist/card/revocation.js +18 -6
- package/dist/card/revocation.js.map +1 -1
- package/dist/card/schema.d.ts +7 -6
- package/dist/card/schema.js +7 -3
- package/dist/card/schema.js.map +1 -1
- package/dist/card/verify.d.ts +0 -1
- package/dist/delegation/audience-validator.d.ts +0 -1
- package/dist/delegation/bitstring.d.ts +0 -1
- package/dist/delegation/cascading-revocation.d.ts +1 -2
- package/dist/delegation/cascading-revocation.js +34 -36
- package/dist/delegation/cascading-revocation.js.map +1 -1
- package/dist/delegation/chain-enforcement.d.ts +42 -5
- package/dist/delegation/chain-enforcement.js +127 -34
- package/dist/delegation/chain-enforcement.js.map +1 -1
- package/dist/delegation/delegation-graph.d.ts +30 -1
- package/dist/delegation/delegation-graph.js +33 -0
- package/dist/delegation/delegation-graph.js.map +1 -1
- package/dist/delegation/delegation-registration.d.ts +22 -0
- package/dist/delegation/delegation-registration.js +51 -0
- package/dist/delegation/delegation-registration.js.map +1 -0
- package/dist/delegation/delegation-status-entry.d.ts +22 -0
- package/dist/delegation/delegation-status-entry.js +42 -0
- package/dist/delegation/delegation-status-entry.js.map +1 -0
- package/dist/delegation/did-key-resolver.d.ts +0 -1
- package/dist/delegation/did-key-resolver.js +15 -4
- package/dist/delegation/did-key-resolver.js.map +1 -1
- package/dist/delegation/did-linkage.d.ts +0 -1
- package/dist/delegation/did-resolver-registry.d.ts +0 -1
- package/dist/delegation/did-web-resolver.d.ts +0 -1
- package/dist/delegation/did-web-resolver.js +40 -5
- package/dist/delegation/did-web-resolver.js.map +1 -1
- package/dist/delegation/holder-binding.d.ts +11 -11
- package/dist/delegation/holder-binding.js +8 -17
- package/dist/delegation/holder-binding.js.map +1 -1
- package/dist/delegation/index.d.ts +0 -1
- package/dist/delegation/outbound-headers.d.ts +0 -1
- package/dist/delegation/outbound-proof.d.ts +0 -1
- package/dist/delegation/scope-matcher.d.ts +25 -2
- package/dist/delegation/scope-matcher.js +75 -5
- package/dist/delegation/scope-matcher.js.map +1 -1
- package/dist/delegation/status-cache.d.ts +0 -1
- package/dist/delegation/statuslist-manager.d.ts +18 -2
- package/dist/delegation/statuslist-manager.js +40 -14
- package/dist/delegation/statuslist-manager.js.map +1 -1
- package/dist/delegation/storage/memory-graph-storage.d.ts +9 -3
- package/dist/delegation/storage/memory-graph-storage.js +28 -14
- package/dist/delegation/storage/memory-graph-storage.js.map +1 -1
- package/dist/delegation/storage/memory-statuslist-storage.d.ts +0 -1
- package/dist/delegation/utils.d.ts +5 -5
- package/dist/delegation/utils.js +4 -4
- package/dist/delegation/utils.js.map +1 -1
- package/dist/delegation/vc-issuer.d.ts +0 -1
- package/dist/delegation/vc-jwt-verify.d.ts +7 -2
- package/dist/delegation/vc-jwt-verify.js +55 -3
- package/dist/delegation/vc-jwt-verify.js.map +1 -1
- package/dist/delegation/vc-verification-checks.d.ts +0 -1
- package/dist/delegation/vc-verification-checks.js +9 -5
- package/dist/delegation/vc-verification-checks.js.map +1 -1
- package/dist/delegation/vc-verifier.d.ts +0 -1
- package/dist/delegation/vc-verifier.types.d.ts +0 -1
- package/dist/delegation/verification-method-key.d.ts +0 -1
- package/dist/delegation/verification-method-key.js +4 -3
- package/dist/delegation/verification-method-key.js.map +1 -1
- package/dist/errors.d.ts +0 -1
- package/dist/extension/declaration.d.ts +0 -1
- package/dist/extension/gate.d.ts +0 -1
- package/dist/extension/index.d.ts +0 -1
- package/dist/extension/settings.d.ts +0 -1
- package/dist/index.d.ts +2 -3
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/integrations/cheqd/dlr.d.ts +0 -1
- package/dist/integrations/cheqd/dlr.js +6 -1
- package/dist/integrations/cheqd/dlr.js.map +1 -1
- package/dist/integrations/cheqd/index.d.ts +0 -1
- package/dist/integrations/cheqd/linkage.d.ts +0 -1
- package/dist/integrations/cheqd/registrar.d.ts +0 -1
- package/dist/integrations/cheqd/resolver.d.ts +0 -1
- package/dist/integrations/cheqd/statuslist-resolver.d.ts +0 -1
- package/dist/logging/index.d.ts +0 -1
- package/dist/logging/logger.d.ts +0 -1
- package/dist/middleware/index.d.ts +0 -1
- package/dist/middleware/kya-os-transport.d.ts +5 -3
- package/dist/middleware/kya-os-transport.js +58 -24
- package/dist/middleware/kya-os-transport.js.map +1 -1
- package/dist/middleware/with-kya-os-server.d.ts +30 -4
- package/dist/middleware/with-kya-os-server.js +19 -0
- package/dist/middleware/with-kya-os-server.js.map +1 -1
- package/dist/middleware/with-kya-os.config-types.d.ts +32 -4
- package/dist/middleware/with-kya-os.d.ts +0 -1
- package/dist/middleware/with-kya-os.delegation-gate.d.ts +2 -1
- package/dist/middleware/with-kya-os.delegation-gate.js +37 -9
- package/dist/middleware/with-kya-os.delegation-gate.js.map +1 -1
- package/dist/middleware/with-kya-os.delegation-verify.d.ts +1 -1
- package/dist/middleware/with-kya-os.delegation-verify.js +52 -9
- package/dist/middleware/with-kya-os.delegation-verify.js.map +1 -1
- package/dist/middleware/with-kya-os.deps.d.ts +0 -1
- package/dist/middleware/with-kya-os.grants.d.ts +13 -6
- package/dist/middleware/with-kya-os.grants.js +56 -18
- package/dist/middleware/with-kya-os.grants.js.map +1 -1
- package/dist/middleware/with-kya-os.helpers.d.ts +0 -1
- package/dist/middleware/with-kya-os.js +14 -4
- package/dist/middleware/with-kya-os.js.map +1 -1
- package/dist/middleware/with-kya-os.policy-gate.d.ts +0 -1
- package/dist/middleware/with-kya-os.policy-gate.js +18 -9
- package/dist/middleware/with-kya-os.policy-gate.js.map +1 -1
- package/dist/middleware/with-kya-os.protocol.d.ts +0 -1
- package/dist/middleware/with-kya-os.session.d.ts +28 -1
- package/dist/middleware/with-kya-os.session.js +146 -7
- package/dist/middleware/with-kya-os.session.js.map +1 -1
- package/dist/middleware/with-kya-os.types.d.ts +28 -5
- package/dist/policy/approval.d.ts +13 -2
- package/dist/policy/approval.js +15 -4
- package/dist/policy/approval.js.map +1 -1
- package/dist/policy/classifier.d.ts +0 -1
- package/dist/policy/default-engine.d.ts +5 -2
- package/dist/policy/default-engine.js +10 -2
- package/dist/policy/default-engine.js.map +1 -1
- package/dist/policy/engine.d.ts +0 -1
- package/dist/policy/index.d.ts +0 -1
- package/dist/policy/projection.d.ts +0 -1
- package/dist/policy/types.d.ts +0 -1
- package/dist/proof/covered-request.d.ts +46 -0
- package/dist/proof/covered-request.js +107 -0
- package/dist/proof/covered-request.js.map +1 -0
- package/dist/proof/errors.d.ts +3 -1
- package/dist/proof/errors.js +5 -0
- package/dist/proof/errors.js.map +1 -1
- package/dist/proof/generator.d.ts +51 -1
- package/dist/proof/generator.js +71 -13
- package/dist/proof/generator.js.map +1 -1
- package/dist/proof/index.d.ts +1 -2
- package/dist/proof/index.js.map +1 -1
- package/dist/proof/verifier.d.ts +50 -12
- package/dist/proof/verifier.js +164 -84
- package/dist/proof/verifier.js.map +1 -1
- package/dist/providers/audit-log.d.ts +0 -1
- package/dist/providers/base.d.ts +19 -1
- package/dist/providers/base.js.map +1 -1
- package/dist/providers/grant-store.d.ts +8 -2
- package/dist/providers/grant-store.js +5 -5
- package/dist/providers/grant-store.js.map +1 -1
- package/dist/providers/index.d.ts +0 -1
- package/dist/providers/memory.d.ts +19 -1
- package/dist/providers/memory.js +53 -7
- package/dist/providers/memory.js.map +1 -1
- package/dist/providers/node-crypto.d.ts +4 -1
- package/dist/providers/node-crypto.js +32 -9
- package/dist/providers/node-crypto.js.map +1 -1
- package/dist/providers/nonce-admission.d.ts +31 -0
- package/dist/providers/nonce-admission.js +47 -0
- package/dist/providers/nonce-admission.js.map +1 -0
- package/dist/providers/nonce-retention.d.ts +8 -0
- package/dist/providers/nonce-retention.js +15 -0
- package/dist/providers/nonce-retention.js.map +1 -0
- package/dist/providers/runtime-fetch.d.ts +0 -1
- package/dist/providers/system-clock.d.ts +0 -1
- package/dist/providers/web-crypto.d.ts +0 -1
- package/dist/providers/web-crypto.js +7 -1
- package/dist/providers/web-crypto.js.map +1 -1
- package/dist/session/index.d.ts +0 -1
- package/dist/session/manager.d.ts +13 -1
- package/dist/session/manager.js +25 -9
- package/dist/session/manager.js.map +1 -1
- package/dist/session/session-store.d.ts +0 -1
- package/dist/types/protocol.d.ts +11 -3
- package/dist/types/protocol.js +21 -14
- package/dist/types/protocol.js.map +1 -1
- package/dist/utils/base58.d.ts +16 -3
- package/dist/utils/base58.js +34 -12
- package/dist/utils/base58.js.map +1 -1
- package/dist/utils/base64.d.ts +0 -1
- package/dist/utils/canonical-json.d.ts +7 -1
- package/dist/utils/canonical-json.js +130 -60
- package/dist/utils/canonical-json.js.map +1 -1
- package/dist/utils/crypto-service.d.ts +0 -1
- package/dist/utils/crypto-service.js +22 -2
- package/dist/utils/crypto-service.js.map +1 -1
- package/dist/utils/did-helpers.d.ts +0 -1
- package/dist/utils/ed25519-constants.d.ts +0 -1
- package/dist/utils/ed25519-public-key.d.ts +27 -0
- package/dist/utils/ed25519-public-key.js +86 -0
- package/dist/utils/ed25519-public-key.js.map +1 -0
- package/dist/utils/guards.d.ts +0 -1
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/ip-classifier.d.ts +0 -1
- package/dist/utils/safe-fetch-transports.d.ts +0 -1
- package/dist/utils/safe-fetch-types.d.ts +0 -1
- package/dist/utils/safe-fetch.d.ts +0 -1
- package/dist/utils/statuslist-bits.d.ts +0 -1
- package/dist/utils/statuslist-purpose.d.ts +0 -1
- package/dist/utils/ttl-cache.d.ts +0 -1
- package/dist/utils/url.d.ts +0 -1
- package/package.json +24 -19
- package/schemas/card-delegation-credential.json +4 -1
- package/dist/audit/adapters/legacy-audit-log.d.ts.map +0 -1
- package/dist/audit/adapters/mcp.d.ts.map +0 -1
- package/dist/audit/assurance.d.ts.map +0 -1
- package/dist/audit/checkpoint-coordinator.d.ts.map +0 -1
- package/dist/audit/checkpoint.d.ts.map +0 -1
- package/dist/audit/cli.d.ts.map +0 -1
- package/dist/audit/crypto.d.ts.map +0 -1
- package/dist/audit/errors.d.ts.map +0 -1
- package/dist/audit/evidence.d.ts.map +0 -1
- package/dist/audit/index.d.ts.map +0 -1
- package/dist/audit/integrity.d.ts.map +0 -1
- package/dist/audit/merkle.d.ts.map +0 -1
- package/dist/audit/mirror-service.d.ts.map +0 -1
- package/dist/audit/projection.d.ts.map +0 -1
- package/dist/audit/providers/anchor.d.ts.map +0 -1
- package/dist/audit/providers/evidence.d.ts.map +0 -1
- package/dist/audit/providers/journal.d.ts.map +0 -1
- package/dist/audit/providers/memory-journal.d.ts.map +0 -1
- package/dist/audit/providers/observer.d.ts.map +0 -1
- package/dist/audit/providers/outbox.d.ts.map +0 -1
- package/dist/audit/providers/recorder-client.d.ts.map +0 -1
- package/dist/audit/providers/source-state.d.ts.map +0 -1
- package/dist/audit/read-contract.d.ts.map +0 -1
- package/dist/audit/read-service.d.ts.map +0 -1
- package/dist/audit/recorder-service.d.ts.map +0 -1
- package/dist/audit/reference-recorder.d.ts.map +0 -1
- package/dist/audit/replay-bundle.d.ts.map +0 -1
- package/dist/audit/schemas.d.ts.map +0 -1
- package/dist/audit/service.d.ts.map +0 -1
- package/dist/audit/testing/index.d.ts.map +0 -1
- package/dist/audit/testing/provider-contracts.d.ts.map +0 -1
- package/dist/audit/types.d.ts.map +0 -1
- package/dist/audit/verifier.d.ts.map +0 -1
- package/dist/auth/handshake.d.ts.map +0 -1
- package/dist/auth/index.d.ts.map +0 -1
- package/dist/auth/types.d.ts.map +0 -1
- package/dist/authz/accountability.d.ts.map +0 -1
- package/dist/authz/adapter.d.ts.map +0 -1
- package/dist/authz/examples/inmemory-oidc.d.ts.map +0 -1
- package/dist/authz/index.d.ts.map +0 -1
- package/dist/authz/oidc/authorize.d.ts.map +0 -1
- package/dist/authz/oidc/metadata.d.ts.map +0 -1
- package/dist/authz/oidc/oidc-adapter.d.ts.map +0 -1
- package/dist/authz/oidc/pending-flow-store.d.ts.map +0 -1
- package/dist/authz/oidc/pkce.d.ts.map +0 -1
- package/dist/authz/registry.d.ts.map +0 -1
- package/dist/authz/requirement.d.ts.map +0 -1
- package/dist/card/build.d.ts.map +0 -1
- package/dist/card/builder.d.ts.map +0 -1
- package/dist/card/cimd.d.ts.map +0 -1
- package/dist/card/delegation.d.ts.map +0 -1
- package/dist/card/emit.d.ts.map +0 -1
- package/dist/card/index.d.ts.map +0 -1
- package/dist/card/middleware.d.ts.map +0 -1
- package/dist/card/proof/build.d.ts.map +0 -1
- package/dist/card/proof/canonical.d.ts.map +0 -1
- package/dist/card/proof/http-sig.d.ts.map +0 -1
- package/dist/card/proof/index.d.ts.map +0 -1
- package/dist/card/proof/nonce-cache.d.ts.map +0 -1
- package/dist/card/proof/signer.d.ts.map +0 -1
- package/dist/card/proof/types.d.ts.map +0 -1
- package/dist/card/proof/verify.d.ts.map +0 -1
- package/dist/card/resolve.d.ts.map +0 -1
- package/dist/card/revocation.d.ts.map +0 -1
- package/dist/card/schema.d.ts.map +0 -1
- package/dist/card/verify.d.ts.map +0 -1
- package/dist/delegation/audience-validator.d.ts.map +0 -1
- package/dist/delegation/bitstring.d.ts.map +0 -1
- package/dist/delegation/cascading-revocation.d.ts.map +0 -1
- package/dist/delegation/chain-enforcement.d.ts.map +0 -1
- package/dist/delegation/delegation-graph.d.ts.map +0 -1
- package/dist/delegation/did-key-resolver.d.ts.map +0 -1
- package/dist/delegation/did-linkage.d.ts.map +0 -1
- package/dist/delegation/did-resolver-registry.d.ts.map +0 -1
- package/dist/delegation/did-web-resolver.d.ts.map +0 -1
- package/dist/delegation/holder-binding.d.ts.map +0 -1
- package/dist/delegation/index.d.ts.map +0 -1
- package/dist/delegation/outbound-headers.d.ts.map +0 -1
- package/dist/delegation/outbound-proof.d.ts.map +0 -1
- package/dist/delegation/scope-matcher.d.ts.map +0 -1
- package/dist/delegation/status-cache.d.ts.map +0 -1
- package/dist/delegation/statuslist-manager.d.ts.map +0 -1
- package/dist/delegation/storage/memory-graph-storage.d.ts.map +0 -1
- package/dist/delegation/storage/memory-statuslist-storage.d.ts.map +0 -1
- package/dist/delegation/utils.d.ts.map +0 -1
- package/dist/delegation/vc-issuer.d.ts.map +0 -1
- package/dist/delegation/vc-jwt-verify.d.ts.map +0 -1
- package/dist/delegation/vc-verification-checks.d.ts.map +0 -1
- package/dist/delegation/vc-verifier.d.ts.map +0 -1
- package/dist/delegation/vc-verifier.types.d.ts.map +0 -1
- package/dist/delegation/verification-method-key.d.ts.map +0 -1
- package/dist/errors.d.ts.map +0 -1
- package/dist/extension/declaration.d.ts.map +0 -1
- package/dist/extension/gate.d.ts.map +0 -1
- package/dist/extension/index.d.ts.map +0 -1
- package/dist/extension/settings.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/integrations/cheqd/dlr.d.ts.map +0 -1
- package/dist/integrations/cheqd/index.d.ts.map +0 -1
- package/dist/integrations/cheqd/linkage.d.ts.map +0 -1
- package/dist/integrations/cheqd/registrar.d.ts.map +0 -1
- package/dist/integrations/cheqd/resolver.d.ts.map +0 -1
- package/dist/integrations/cheqd/statuslist-resolver.d.ts.map +0 -1
- package/dist/logging/index.d.ts.map +0 -1
- package/dist/logging/logger.d.ts.map +0 -1
- package/dist/middleware/index.d.ts.map +0 -1
- package/dist/middleware/kya-os-transport.d.ts.map +0 -1
- package/dist/middleware/with-kya-os-server.d.ts.map +0 -1
- package/dist/middleware/with-kya-os.config-types.d.ts.map +0 -1
- package/dist/middleware/with-kya-os.d.ts.map +0 -1
- package/dist/middleware/with-kya-os.delegation-gate.d.ts.map +0 -1
- package/dist/middleware/with-kya-os.delegation-verify.d.ts.map +0 -1
- package/dist/middleware/with-kya-os.deps.d.ts.map +0 -1
- package/dist/middleware/with-kya-os.grants.d.ts.map +0 -1
- package/dist/middleware/with-kya-os.helpers.d.ts.map +0 -1
- package/dist/middleware/with-kya-os.policy-gate.d.ts.map +0 -1
- package/dist/middleware/with-kya-os.protocol.d.ts.map +0 -1
- package/dist/middleware/with-kya-os.session.d.ts.map +0 -1
- package/dist/middleware/with-kya-os.types.d.ts.map +0 -1
- package/dist/policy/approval.d.ts.map +0 -1
- package/dist/policy/classifier.d.ts.map +0 -1
- package/dist/policy/default-engine.d.ts.map +0 -1
- package/dist/policy/engine.d.ts.map +0 -1
- package/dist/policy/index.d.ts.map +0 -1
- package/dist/policy/projection.d.ts.map +0 -1
- package/dist/policy/types.d.ts.map +0 -1
- package/dist/proof/errors.d.ts.map +0 -1
- package/dist/proof/generator.d.ts.map +0 -1
- package/dist/proof/index.d.ts.map +0 -1
- package/dist/proof/verifier.d.ts.map +0 -1
- package/dist/providers/audit-log.d.ts.map +0 -1
- package/dist/providers/base.d.ts.map +0 -1
- package/dist/providers/grant-store.d.ts.map +0 -1
- package/dist/providers/index.d.ts.map +0 -1
- package/dist/providers/memory.d.ts.map +0 -1
- package/dist/providers/node-crypto.d.ts.map +0 -1
- package/dist/providers/runtime-fetch.d.ts.map +0 -1
- package/dist/providers/system-clock.d.ts.map +0 -1
- package/dist/providers/web-crypto.d.ts.map +0 -1
- package/dist/session/index.d.ts.map +0 -1
- package/dist/session/manager.d.ts.map +0 -1
- package/dist/session/session-store.d.ts.map +0 -1
- package/dist/types/protocol.d.ts.map +0 -1
- package/dist/utils/base58.d.ts.map +0 -1
- package/dist/utils/base64.d.ts.map +0 -1
- package/dist/utils/canonical-json.d.ts.map +0 -1
- package/dist/utils/crypto-service.d.ts.map +0 -1
- package/dist/utils/did-helpers.d.ts.map +0 -1
- package/dist/utils/ed25519-constants.d.ts.map +0 -1
- package/dist/utils/guards.d.ts.map +0 -1
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/ip-classifier.d.ts.map +0 -1
- package/dist/utils/safe-fetch-transports.d.ts.map +0 -1
- package/dist/utils/safe-fetch-types.d.ts.map +0 -1
- package/dist/utils/safe-fetch.d.ts.map +0 -1
- package/dist/utils/statuslist-bits.d.ts.map +0 -1
- package/dist/utils/statuslist-purpose.d.ts.map +0 -1
- package/dist/utils/ttl-cache.d.ts.map +0 -1
- package/dist/utils/url.d.ts.map +0 -1
package/AUDITABILITY.md
CHANGED
|
@@ -174,6 +174,16 @@ production adapter must provide:
|
|
|
174
174
|
- no ordinary update or delete operation;
|
|
175
175
|
- truthful durability and atomicity capabilities.
|
|
176
176
|
|
|
177
|
+
A head read is only a hint. When one is behind the highest head this recorder
|
|
178
|
+
has appended (a lagging read replica), the recorder compares-and-appends against
|
|
179
|
+
its own committed head instead, so a stale read costs a retry, as it always has.
|
|
180
|
+
If the journal's compare-and-append answer then reports a head below that
|
|
181
|
+
committed head, or a different digest at a sequence the journal already
|
|
182
|
+
reported (a failover to a lagging primary, or a restore), the recorder fails
|
|
183
|
+
closed with `AUDIT_JOURNAL_FAILURE` instead of signing a second entry at a
|
|
184
|
+
receipted sequence. Restoring a journal is an epoch transition, not a silent
|
|
185
|
+
rewind.
|
|
186
|
+
|
|
177
187
|
Run the provider contract kit for every adapter:
|
|
178
188
|
|
|
179
189
|
```ts
|
|
@@ -215,12 +225,19 @@ a caller that retries `record()` with a stable event ID must also pin
|
|
|
215
225
|
`occurredAt`, otherwise the recorder rejects the drifted content as an
|
|
216
226
|
event-identity conflict. Buffered outbox redelivery is always byte-stable, and
|
|
217
227
|
`flush()` receipts each delivered item against the item's own producer source.
|
|
228
|
+
An event without a caller-supplied ID gets a random `audit_<uuid>` ID, so two
|
|
229
|
+
trails sharing an outbox or a recorder never mint the same one.
|
|
218
230
|
|
|
219
231
|
Evidence is persisted write-ahead of its committing entry. If the append then
|
|
220
|
-
permanently fails, the recorder best-effort disposes the
|
|
221
|
-
after re-confirming that no committed entry claims the
|
|
222
|
-
|
|
223
|
-
|
|
232
|
+
permanently fails, the recorder best-effort disposes the ciphertext that this
|
|
233
|
+
submission newly stored, after re-confirming that no committed entry claims the
|
|
234
|
+
event identity. An object that already existed, such as an encrypted actor
|
|
235
|
+
reference shared by every event of a session, is never disposed, because a
|
|
236
|
+
committed entry may reference it. Nor is one that another submission to the
|
|
237
|
+
same recorder held while this one did: both may have seen it as new, and the
|
|
238
|
+
other may have committed a reference to it. A disposal failure retains the
|
|
239
|
+
orphan for operator retention tooling rather than risking a racing committed
|
|
240
|
+
reference.
|
|
224
241
|
|
|
225
242
|
The outbox contract persists an `attempts` count and yields only delivery-eligible
|
|
226
243
|
items. Retry cadence, attempt caps, and dead-letter routing are provider policy,
|
|
@@ -229,12 +246,39 @@ adapter must remove dead-lettered items from `pending()` while retaining them fo
|
|
|
229
246
|
operator inspection and recovery; the in-memory development adapter intentionally
|
|
230
247
|
has no retry cap.
|
|
231
248
|
|
|
249
|
+
Event IDs are unique only within a producer source. An outbox that declares
|
|
250
|
+
`capabilities.keyedBySource` deduplicates, acknowledges, and fails items by
|
|
251
|
+
`(sourceId, eventId)` (`AuditOutboxItemKey`, see `auditOutboxItemKey`), and the
|
|
252
|
+
trail passes it that key. An adapter without the capability keeps receiving the
|
|
253
|
+
bare event ID its `markDelivered(eventId: string)` signature expects; the
|
|
254
|
+
interface accepts either. `MemoryAuditOutbox` declares the capability, except
|
|
255
|
+
in a subclass that overrides `markDelivered` or `markFailed`: such a subclass
|
|
256
|
+
may have been written for the bare event ID, so it keeps receiving one unless
|
|
257
|
+
it declares the capability itself. It still accepts a bare event ID from direct
|
|
258
|
+
callers, but only while exactly one pending item carries it: with several
|
|
259
|
+
sources pending, it throws rather than guess whose item to acknowledge. Once
|
|
260
|
+
the recorder has committed an item, `flush()` counts
|
|
261
|
+
it as delivered: a failure to acknowledge it reaches `onAcknowledgementFailure`,
|
|
262
|
+
never `markFailed` or `onDeliveryFailure`, and the item's later redelivery
|
|
263
|
+
resolves to the same receipt.
|
|
264
|
+
|
|
232
265
|
Each producer event receives an atomically claimed source sequence. Consecutive
|
|
233
266
|
events also carry `previousSourceEventDigest`. `recordSourceHighWater()` emits
|
|
234
267
|
the producer's current high-water mark through the same recorder path. The
|
|
235
268
|
source-state provider tracks highest emitted, highest contiguously receipted,
|
|
236
269
|
and explicit pending gaps. AAP-3 requires durable source state.
|
|
237
270
|
|
|
271
|
+
The trail validates an event (schema, canonical JSON, evidence references)
|
|
272
|
+
before it claims a source sequence, so rejected input never consumes a sequence
|
|
273
|
+
or breaks predecessor linkage; a claim whose event then fails to build is
|
|
274
|
+
released through the optional `abandonClaim` where the provider supports it.
|
|
275
|
+
Re-claiming an event ID the provider still retains returns the original claim,
|
|
276
|
+
so an at-least-once redelivery of a stable event ID rebuilds the identical
|
|
277
|
+
event and resolves to its original receipt. `MemoryAuditSourceState` retains
|
|
278
|
+
receipted claims for a bounded redelivery window (`redeliveryWindow`, default
|
|
279
|
+
1024 per source) and otherwise keeps only pending events, so one unreceipted
|
|
280
|
+
gap does not stop it from releasing memory.
|
|
281
|
+
|
|
238
282
|
## Event and privacy model
|
|
239
283
|
|
|
240
284
|
The event catalog is the `AUDIT_EVENT_TYPES` constant. It covers session, tool,
|
|
@@ -244,8 +288,17 @@ Every detail payload is a strict discriminated union. Arbitrary integrity-core
|
|
|
244
288
|
metadata and unknown fields fail closed.
|
|
245
289
|
|
|
246
290
|
The MCP adapter excludes raw arguments, response bodies, error text, and tool
|
|
247
|
-
names by default. `includeToolNames` is an explicit policy decision.
|
|
248
|
-
|
|
291
|
+
names by default. `includeToolNames` is an explicit policy decision. References
|
|
292
|
+
a caller presents (delegation, grant, consent, scope, and policy references,
|
|
293
|
+
correlation and causation IDs, tool names) are untrusted: one that is empty,
|
|
294
|
+
over the schema bound, or not well-formed UTF-16 is recorded as the `sha256:`
|
|
295
|
+
digest of its UTF-8 encoding, so a hostile identifier cannot keep the event out
|
|
296
|
+
of the ledger, and a long reference handed to the adapter cannot collide with
|
|
297
|
+
another that shares its prefix. One caller still shortens a reference first:
|
|
298
|
+
`wrapWithDelegation` truncates the ID of a rejected delegation credential to
|
|
299
|
+
256 UTF-16 code units, so two rejected credentials whose IDs share that prefix
|
|
300
|
+
are recorded with the same `delegationRef`.
|
|
301
|
+
Identity and resource references declare their privacy form:
|
|
249
302
|
|
|
250
303
|
- `public_did` for intentionally public correlation;
|
|
251
304
|
- `pairwise_did` for relationship-specific identity;
|
|
@@ -288,6 +341,16 @@ consistency proofs. Checkpoint lifecycle events are appended only after the
|
|
|
288
341
|
snapshot is signed, so they can appear in a later checkpoint and cannot recurse
|
|
289
342
|
into the checkpoint they describe.
|
|
290
343
|
|
|
344
|
+
Before signing, the builder confirms that the journal still contains the latest
|
|
345
|
+
checkpoint's exact tree as its prefix; a rewritten or restored history fails
|
|
346
|
+
with `AUDIT_CHECKPOINT_CONFLICT` instead of producing a signed checkpoint that
|
|
347
|
+
chains to a tree it does not extend. A builder serializes its calls per ledger
|
|
348
|
+
epoch, so concurrent calls chain in tree-size order rather than both naming the
|
|
349
|
+
same predecessor. If `onCheckpointCreated` throws after the checkpoint was
|
|
350
|
+
stored, the builder's next `createCheckpoint` call runs the hook again for that
|
|
351
|
+
checkpoint, before any newer one, even when the ledger has grown in between;
|
|
352
|
+
the hook must therefore be idempotent on the checkpoint digest.
|
|
353
|
+
|
|
291
354
|
`AuditCheckpointCoordinator` publishes a committed checkpoint to independent
|
|
292
355
|
observers and supporting anchors. Publication is retryable and may enforce a
|
|
293
356
|
minimum observer count and required anchor kinds. Failure does not roll back the
|
|
@@ -326,6 +389,59 @@ nonce caches. It verifies:
|
|
|
326
389
|
- supporting-anchor trust and an injected adapter verifier;
|
|
327
390
|
- declared range completeness and explicit omission dispositions.
|
|
328
391
|
|
|
392
|
+
A subset export need not carry every leaf. A checkpoint whose complete prefix is
|
|
393
|
+
present has its root recomputed; otherwise its signature, digest, issuer trust,
|
|
394
|
+
and declared range are verified (`AuditArtifactVerifier.verifySignedCheckpoint`),
|
|
395
|
+
and every included entry it covers must carry a verified inclusion proof against
|
|
396
|
+
it (`AUDIT_MERKLE_PROOF_MISSING` otherwise). Two included checkpoints of one
|
|
397
|
+
epoch must either link directly through `previousCheckpointDigest`, or, when the
|
|
398
|
+
export omits checkpoints that could sit between them, be bound by a verified
|
|
399
|
+
consistency proof; the proof, not the chain link, is the split-view guarantee,
|
|
400
|
+
as for an observer catching up. A successor genesis commits where its
|
|
401
|
+
predecessor epoch ends, so a predecessor checkpoint over a larger tree than
|
|
402
|
+
that terminal checkpoint is reported as `AUDIT_CHECKPOINT_FORK_DETECTED`.
|
|
403
|
+
Predecessor entries past the terminal are not by themselves a fork: the
|
|
404
|
+
terminal checkpoint's own `checkpoint.created` event is appended after it is
|
|
405
|
+
signed.
|
|
406
|
+
|
|
407
|
+
The verifier enforces every verification-policy constraint it can evaluate and
|
|
408
|
+
never treats one it cannot evaluate as satisfied. No schema-valid policy is
|
|
409
|
+
rejected for the constraints it uses:
|
|
410
|
+
|
|
411
|
+
- `validFromCheckpoint` and `validUntilCheckpoint`, on a recorder or observer key
|
|
412
|
+
or on a trusted ledger epoch, are resolved by digest against supplied
|
|
413
|
+
checkpoints (`AuditVerificationContext`; a bundle supplies its own). An entry
|
|
414
|
+
at sequence `s` sits at tree position `s + 1`, a checkpoint or an observation
|
|
415
|
+
of one at its tree size; a key valid until checkpoint `C` covers positions up
|
|
416
|
+
to `C`'s tree size, and a key valid from `C` covers positions after it.
|
|
417
|
+
Outside the bound the signer is untrusted. A boundary that is absent, or that
|
|
418
|
+
belongs to another ledger epoch, makes the dimension `indeterminate`
|
|
419
|
+
(`AUDIT_KEY_BOUNDARY_UNRESOLVED`), never `valid`. An export has no ledger
|
|
420
|
+
position, so a checkpoint bound on the exporter key that authorizes a bundle
|
|
421
|
+
leaves cryptographic integrity `indeterminate` the same way.
|
|
422
|
+
- `requiredAuditProfile` marks every dimension the profile depends on
|
|
423
|
+
`invalid` (`AUDIT_REQUIRED_PROFILE_UNMET`) unless it is `valid`: AAP-1 needs
|
|
424
|
+
cryptographic integrity, AAP-2 adds chain integrity, AAP-3 checkpoint
|
|
425
|
+
integrity, and AAP-4 observation integrity plus at least one supporting
|
|
426
|
+
anchor receipt.
|
|
427
|
+
- `keyRevocationMode` selects when key status is evaluated. The integrity
|
|
428
|
+
dimensions always evaluate a key as observed, at the artifact's signing time
|
|
429
|
+
and ledger position, because revocation does not rewrite what was observed;
|
|
430
|
+
`as_observed` stops there. `current` and `both` also require every key that
|
|
431
|
+
signed an entry, checkpoint, observation, or the bundle manifest to be valid
|
|
432
|
+
at `verifiedAt` (within `validFrom`/`validUntil`, and without a
|
|
433
|
+
`validUntilCheckpoint`, which names a checkpoint the key was retired at), and
|
|
434
|
+
report the result in `currentAuthorization`: `invalid`
|
|
435
|
+
(`AUDIT_KEY_NOT_CURRENT`) when a key is no longer valid, `indeterminate`
|
|
436
|
+
(`AUDIT_NOT_EVALUATED`) when the verifier has no `verifiedAt` clock. As the
|
|
437
|
+
as-observed check is never waived, `current` and `both` evaluate the same
|
|
438
|
+
keys. Current key status alone never makes `currentAuthorization` `valid`;
|
|
439
|
+
that still takes the injected authorization verifier.
|
|
440
|
+
|
|
441
|
+
When a policy requires observation freshness, an observation dated more than
|
|
442
|
+
the verifier's clock-skew allowance (`maxClockSkewMs`, default 120 s) after
|
|
443
|
+
`verifiedAt` is `invalid` (`AUDIT_OBSERVATION_FUTURE_DATED`), not fresh.
|
|
444
|
+
|
|
329
445
|
The report keeps these dimensions separate: cryptographic integrity, chain
|
|
330
446
|
integrity, checkpoint integrity, anchor/observation integrity, committed-scope
|
|
331
447
|
completeness, authorization as observed, and current authorization. Missing
|
|
@@ -354,8 +470,13 @@ by the relying party's policy.
|
|
|
354
470
|
`AuditProjectionWorker` derives a minimal timeline projection with an atomic
|
|
355
471
|
offset. It supports incremental synchronization, deterministic reset/rebuild,
|
|
356
472
|
and head reconciliation with four honest states: `empty`, `pending`,
|
|
357
|
-
`verified`, and `gap_detected`.
|
|
358
|
-
|
|
473
|
+
`verified`, and `gap_detected`. A projection behind the journal is `pending`
|
|
474
|
+
only when its offset digest matches the journal entry at that sequence, and
|
|
475
|
+
synchronization refuses (`AUDIT_PROJECTION_CONFLICT`) to apply an entry whose
|
|
476
|
+
predecessor is not the projection offset; a projection built from a forked
|
|
477
|
+
history is never reported verified and must be rebuilt. The projection is
|
|
478
|
+
disposable. The journal plus declared enrichment inputs remain the source of
|
|
479
|
+
truth.
|
|
359
480
|
|
|
360
481
|
Checkpoint should ingest exact signed envelopes through the mirror or recorder
|
|
361
482
|
path, store raw integrity objects separately from query projections, and expose
|