@moltzap/client 2026.1002.0 → 2026.1005.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/NOTICE +1 -6
- package/README.md +2 -2
- package/bin/moltzapd +2 -2
- package/dist/{harness-mcp-contract.d.ts → delivery/history-export.d.ts} +96 -136
- package/dist/delivery/history-export.d.ts.map +1 -0
- package/dist/{daemon/runtime → delivery}/history-export.js +36 -3
- package/dist/delivery/history-export.js.map +1 -0
- package/dist/delivery/host-delivery.d.ts +51 -0
- package/dist/delivery/host-delivery.d.ts.map +1 -0
- package/dist/delivery/host-delivery.js +109 -0
- package/dist/delivery/host-delivery.js.map +1 -0
- package/dist/delivery/inbox.d.ts +142 -0
- package/dist/delivery/inbox.d.ts.map +1 -0
- package/dist/delivery/inbox.js +130 -0
- package/dist/delivery/inbox.js.map +1 -0
- package/dist/delivery/index.d.ts +4 -0
- package/dist/delivery/index.d.ts.map +1 -0
- package/dist/delivery/index.js +4 -0
- package/dist/delivery/index.js.map +1 -0
- package/dist/delivery/operations.d.ts +787 -0
- package/dist/delivery/operations.d.ts.map +1 -0
- package/dist/delivery/operations.js +162 -0
- package/dist/delivery/operations.js.map +1 -0
- package/dist/delivery/pass.d.ts +91 -0
- package/dist/delivery/pass.d.ts.map +1 -0
- package/dist/{daemon/runtime/pending-delivery.js → delivery/pass.js} +61 -34
- package/dist/delivery/pass.js.map +1 -0
- package/dist/delivery/send-invocations.d.ts +106 -0
- package/dist/delivery/send-invocations.d.ts.map +1 -0
- package/dist/delivery/send-invocations.js +109 -0
- package/dist/delivery/send-invocations.js.map +1 -0
- package/dist/endpoint/harness-endpoint/capability.d.ts +39 -0
- package/dist/endpoint/harness-endpoint/capability.d.ts.map +1 -0
- package/dist/endpoint/harness-endpoint/capability.js +9 -0
- package/dist/endpoint/harness-endpoint/capability.js.map +1 -0
- package/dist/endpoint/harness-endpoint/events.d.ts +12 -0
- package/dist/endpoint/harness-endpoint/events.d.ts.map +1 -0
- package/dist/endpoint/harness-endpoint/events.js +199 -0
- package/dist/endpoint/harness-endpoint/events.js.map +1 -0
- package/dist/{client-runtime.d.ts → endpoint/harness-endpoint/index.d.ts} +4 -2
- package/dist/endpoint/harness-endpoint/index.d.ts.map +1 -0
- package/dist/{client-runtime.js → endpoint/harness-endpoint/index.js} +115 -115
- package/dist/endpoint/harness-endpoint/index.js.map +1 -0
- package/dist/endpoint/implementation.d.ts +4 -0
- package/dist/endpoint/implementation.d.ts.map +1 -0
- package/dist/endpoint/implementation.js +5 -0
- package/dist/endpoint/implementation.js.map +1 -0
- package/dist/endpoint/mcp/auth.d.ts +31 -0
- package/dist/endpoint/mcp/auth.d.ts.map +1 -0
- package/dist/endpoint/mcp/auth.js +42 -0
- package/dist/endpoint/mcp/auth.js.map +1 -0
- package/dist/endpoint/mcp/event-schemas.d.ts +151 -0
- package/dist/endpoint/mcp/event-schemas.d.ts.map +1 -0
- package/dist/endpoint/mcp/event-schemas.js +72 -0
- package/dist/endpoint/mcp/event-schemas.js.map +1 -0
- package/dist/endpoint/mcp/event-signing.d.ts +62 -0
- package/dist/endpoint/mcp/event-signing.d.ts.map +1 -0
- package/dist/endpoint/mcp/event-signing.js +185 -0
- package/dist/endpoint/mcp/event-signing.js.map +1 -0
- package/dist/endpoint/mcp/events.d.ts +45 -0
- package/dist/endpoint/mcp/events.d.ts.map +1 -0
- package/dist/endpoint/mcp/events.js +308 -0
- package/dist/endpoint/mcp/events.js.map +1 -0
- package/dist/{harness-mcp-http.d.ts → endpoint/mcp/http.d.ts} +1 -1
- package/dist/endpoint/mcp/http.d.ts.map +1 -0
- package/dist/{harness-mcp-http.js → endpoint/mcp/http.js} +1 -1
- package/dist/endpoint/mcp/http.js.map +1 -0
- package/dist/endpoint/mcp/index.d.ts +10 -0
- package/dist/endpoint/mcp/index.d.ts.map +1 -0
- package/dist/endpoint/mcp/index.js +8 -0
- package/dist/endpoint/mcp/index.js.map +1 -0
- package/dist/endpoint/mcp/names.d.ts +18 -0
- package/dist/endpoint/mcp/names.d.ts.map +1 -0
- package/dist/endpoint/mcp/names.js +18 -0
- package/dist/endpoint/mcp/names.js.map +1 -0
- package/dist/{management-runtime.d.ts → endpoint/mcp/owner-tools.d.ts} +7 -7
- package/dist/endpoint/mcp/owner-tools.d.ts.map +1 -0
- package/dist/{management-runtime.js → endpoint/mcp/owner-tools.js} +2 -4
- package/dist/endpoint/mcp/owner-tools.js.map +1 -0
- package/dist/endpoint/mcp/schemas.d.ts +42 -0
- package/dist/endpoint/mcp/schemas.d.ts.map +1 -0
- package/dist/endpoint/mcp/schemas.js +89 -0
- package/dist/endpoint/mcp/schemas.js.map +1 -0
- package/dist/{harness-mcp-wire.d.ts → endpoint/mcp/tools.d.ts} +17 -14
- package/dist/endpoint/mcp/tools.d.ts.map +1 -0
- package/dist/{harness-mcp-wire.js → endpoint/mcp/tools.js} +230 -110
- package/dist/endpoint/mcp/tools.js.map +1 -0
- package/dist/endpoint/mcp/webhook.d.ts +15 -0
- package/dist/endpoint/mcp/webhook.d.ts.map +1 -0
- package/dist/endpoint/mcp/webhook.js +359 -0
- package/dist/endpoint/mcp/webhook.js.map +1 -0
- package/dist/identity/credentials.d.ts +46 -0
- package/dist/identity/credentials.d.ts.map +1 -0
- package/dist/identity/credentials.js +55 -0
- package/dist/identity/credentials.js.map +1 -0
- package/dist/identity/index.d.ts +4 -0
- package/dist/identity/index.d.ts.map +1 -0
- package/dist/identity/index.js +4 -0
- package/dist/identity/index.js.map +1 -0
- package/dist/index.d.ts +21 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -5
- package/dist/index.js.map +1 -1
- package/dist/{contract.types-check.d.ts → index.types-check.d.ts} +12 -7
- package/dist/index.types-check.d.ts.map +1 -0
- package/dist/{contract.types-check.js → index.types-check.js} +6 -5
- package/dist/index.types-check.js.map +1 -0
- package/dist/{daemon/runtime/activation.d.ts → service/activation/index.d.ts} +11 -13
- package/dist/service/activation/index.d.ts.map +1 -0
- package/dist/{daemon/runtime/activation.js → service/activation/index.js} +3 -3
- package/dist/service/activation/index.js.map +1 -0
- package/dist/{daemon/configuration.d.ts → service/bootstrap.d.ts} +9 -17
- package/dist/service/bootstrap.d.ts.map +1 -0
- package/dist/service/bootstrap.js +6 -0
- package/dist/service/bootstrap.js.map +1 -0
- package/dist/service/configuration.d.ts +13 -0
- package/dist/service/configuration.d.ts.map +1 -0
- package/dist/service/configuration.js +75 -0
- package/dist/service/configuration.js.map +1 -0
- package/dist/{daemon/runtime → service}/controller.d.ts +9 -7
- package/dist/service/controller.d.ts.map +1 -0
- package/dist/service/controller.js +106 -0
- package/dist/service/controller.js.map +1 -0
- package/dist/{server.d.ts → service/index.d.ts} +7 -4
- package/dist/service/index.d.ts.map +1 -0
- package/dist/{server.js → service/index.js} +17 -15
- package/dist/service/index.js.map +1 -0
- package/dist/{server.types-check.d.ts → service/index.types-check.d.ts} +7 -7
- package/dist/service/index.types-check.d.ts.map +1 -0
- package/dist/{server.types-check.js → service/index.types-check.js} +1 -1
- package/dist/service/index.types-check.js.map +1 -0
- package/dist/{daemon/runtime/index.d.ts → service/lifecycle.d.ts} +4 -4
- package/dist/service/lifecycle.d.ts.map +1 -0
- package/dist/{daemon/runtime/index.js → service/lifecycle.js} +29 -26
- package/dist/service/lifecycle.js.map +1 -0
- package/dist/{daemon → service}/management.d.ts +3 -3
- package/dist/service/management.d.ts.map +1 -0
- package/dist/{daemon → service}/management.js +4 -14
- package/dist/service/management.js.map +1 -0
- package/dist/{daemon/registration.d.ts → service/registration/index.d.ts} +3 -3
- package/dist/service/registration/index.d.ts.map +1 -0
- package/dist/{daemon/registration.js → service/registration/index.js} +2 -3
- package/dist/service/registration/index.js.map +1 -0
- package/dist/{daemon/runtime/protocol.d.ts → service/supervision.d.ts} +17 -25
- package/dist/service/supervision.d.ts.map +1 -0
- package/dist/{daemon/runtime/protocol.js → service/supervision.js} +34 -37
- package/dist/service/supervision.js.map +1 -0
- package/dist/store/anchors.d.ts.map +1 -0
- package/dist/store/anchors.js.map +1 -0
- package/dist/store/database/index.d.ts.map +1 -0
- package/dist/store/database/index.js.map +1 -0
- package/dist/store/database/schema.d.ts.map +1 -0
- package/dist/{endpoint/store → store}/database/schema.js +42 -6
- package/dist/store/database/schema.js.map +1 -0
- package/dist/store/database/values.d.ts.map +1 -0
- package/dist/store/database/values.js.map +1 -0
- package/dist/store/inbox.d.ts +86 -0
- package/dist/store/inbox.d.ts.map +1 -0
- package/dist/store/inbox.js +269 -0
- package/dist/store/inbox.js.map +1 -0
- package/dist/store/index.d.ts +12 -0
- package/dist/store/index.d.ts.map +1 -0
- package/dist/store/index.js +8 -0
- package/dist/store/index.js.map +1 -0
- package/dist/{endpoint/store → store/queues}/deliveries.d.ts +9 -1
- package/dist/store/queues/deliveries.d.ts.map +1 -0
- package/dist/{endpoint/store → store/queues}/deliveries.js +19 -3
- package/dist/store/queues/deliveries.js.map +1 -0
- package/dist/{endpoint/store → store/queues}/dissemination.d.ts +4 -2
- package/dist/store/queues/dissemination.d.ts.map +1 -0
- package/dist/{endpoint/store → store/queues}/dissemination.js +5 -4
- package/dist/store/queues/dissemination.js.map +1 -0
- package/dist/store/queues/index.d.ts +5 -0
- package/dist/store/queues/index.d.ts.map +1 -0
- package/dist/store/queues/index.js +7 -0
- package/dist/store/queues/index.js.map +1 -0
- package/dist/{endpoint/store → store/queues}/outbound.d.ts +1 -1
- package/dist/store/queues/outbound.d.ts.map +1 -0
- package/dist/{endpoint/store → store/queues}/outbound.js +1 -1
- package/dist/store/queues/outbound.js.map +1 -0
- package/dist/{endpoint/store/management.d.ts → store/reads.d.ts} +1 -1
- package/dist/store/reads.d.ts.map +1 -0
- package/dist/{endpoint/store/management.js → store/reads.js} +2 -4
- package/dist/store/reads.js.map +1 -0
- package/dist/store/records.d.ts.map +1 -0
- package/dist/{endpoint/store → store}/records.js +1 -2
- package/dist/store/records.js.map +1 -0
- package/dist/store/rows/index.d.ts.map +1 -0
- package/dist/store/rows/index.js.map +1 -0
- package/dist/store/runtime-codec.d.ts +17 -0
- package/dist/store/runtime-codec.d.ts.map +1 -0
- package/dist/store/runtime-codec.js +32 -0
- package/dist/store/runtime-codec.js.map +1 -0
- package/dist/{endpoint/store/index.d.ts → store/store.d.ts} +2 -2
- package/dist/store/store.d.ts.map +1 -0
- package/dist/{endpoint/store/index.js → store/store.js} +34 -7
- package/dist/store/store.js.map +1 -0
- package/dist/{endpoint/store → store}/types.d.ts +41 -0
- package/dist/store/types.d.ts.map +1 -0
- package/dist/store/types.js.map +1 -0
- package/dist/transport/collectives/answer-formats.d.ts +21 -0
- package/dist/transport/collectives/answer-formats.d.ts.map +1 -0
- package/dist/transport/collectives/answer-formats.js +127 -0
- package/dist/transport/collectives/answer-formats.js.map +1 -0
- package/dist/transport/collectives/failures.d.ts +34 -0
- package/dist/transport/collectives/failures.d.ts.map +1 -0
- package/dist/transport/collectives/failures.js +40 -0
- package/dist/transport/collectives/failures.js.map +1 -0
- package/dist/transport/collectives/forms.d.ts +260 -0
- package/dist/transport/collectives/forms.d.ts.map +1 -0
- package/dist/transport/collectives/forms.js +214 -0
- package/dist/transport/collectives/forms.js.map +1 -0
- package/dist/transport/collectives/inbound.d.ts +129 -0
- package/dist/transport/collectives/inbound.d.ts.map +1 -0
- package/dist/transport/collectives/inbound.js +81 -0
- package/dist/transport/collectives/inbound.js.map +1 -0
- package/dist/transport/collectives/index.d.ts +10 -0
- package/dist/transport/collectives/index.d.ts.map +1 -0
- package/dist/transport/collectives/index.js +8 -0
- package/dist/transport/collectives/index.js.map +1 -0
- package/dist/{message-text.d.ts → transport/collectives/message-text.d.ts} +8 -4
- package/dist/transport/collectives/message-text.d.ts.map +1 -0
- package/dist/{message-text.js → transport/collectives/message-text.js} +23 -47
- package/dist/transport/collectives/message-text.js.map +1 -0
- package/dist/{endpoint/collective → transport/collectives}/operation.d.ts +35 -24
- package/dist/transport/collectives/operation.d.ts.map +1 -0
- package/dist/{endpoint/collective → transport/collectives}/operation.js +70 -105
- package/dist/transport/collectives/operation.js.map +1 -0
- package/dist/transport/collectives/part/grammar.d.ts +175 -0
- package/dist/transport/collectives/part/grammar.d.ts.map +1 -0
- package/dist/transport/collectives/part/grammar.js +222 -0
- package/dist/transport/collectives/part/grammar.js.map +1 -0
- package/dist/{endpoint/collective/wire.d.ts → transport/collectives/part/index.d.ts} +38 -51
- package/dist/transport/collectives/part/index.d.ts.map +1 -0
- package/dist/{endpoint/collective/wire.js → transport/collectives/part/index.js} +20 -122
- package/dist/transport/collectives/part/index.js.map +1 -0
- package/dist/{endpoint/collective → transport/collectives}/received-request.d.ts +2 -1
- package/dist/transport/collectives/received-request.d.ts.map +1 -0
- package/dist/transport/collectives/received-request.js.map +1 -0
- package/dist/transport/collectives/render.d.ts +40 -0
- package/dist/transport/collectives/render.d.ts.map +1 -0
- package/dist/transport/collectives/render.js +74 -0
- package/dist/transport/collectives/render.js.map +1 -0
- package/dist/{endpoint/collective → transport/collectives}/request-sends.d.ts +3 -2
- package/dist/transport/collectives/request-sends.d.ts.map +1 -0
- package/dist/transport/collectives/request-sends.js.map +1 -0
- package/dist/{endpoint/collective → transport/collectives}/shared-answers.d.ts +4 -3
- package/dist/transport/collectives/shared-answers.d.ts.map +1 -0
- package/dist/transport/collectives/shared-answers.js.map +1 -0
- package/dist/transport/collectives/validation.d.ts +31 -0
- package/dist/transport/collectives/validation.d.ts.map +1 -0
- package/dist/transport/collectives/validation.js +239 -0
- package/dist/transport/collectives/validation.js.map +1 -0
- package/dist/{endpoint/addressing/index.d.ts → transport/messaging/address.d.ts} +7 -4
- package/dist/transport/messaging/address.d.ts.map +1 -0
- package/dist/{endpoint/addressing/index.js → transport/messaging/address.js} +30 -26
- package/dist/transport/messaging/address.js.map +1 -0
- package/dist/{endpoint/protocol/index.d.ts → transport/messaging/certification.d.ts} +4 -4
- package/dist/transport/messaging/certification.d.ts.map +1 -0
- package/dist/{endpoint/protocol/index.js → transport/messaging/certification.js} +15 -10
- package/dist/transport/messaging/certification.js.map +1 -0
- package/dist/{endpoint/engine-dissemination.d.ts → transport/messaging/dissemination.d.ts} +3 -3
- package/dist/transport/messaging/dissemination.d.ts.map +1 -0
- package/dist/{endpoint/engine-dissemination.js → transport/messaging/dissemination.js} +7 -6
- package/dist/transport/messaging/dissemination.js.map +1 -0
- package/dist/transport/messaging/errors.d.ts +50 -0
- package/dist/transport/messaging/errors.d.ts.map +1 -0
- package/dist/transport/messaging/errors.js +64 -0
- package/dist/transport/messaging/errors.js.map +1 -0
- package/dist/{endpoint/protocol → transport/messaging}/evidence.d.ts +3 -3
- package/dist/transport/messaging/evidence.d.ts.map +1 -0
- package/dist/{endpoint/protocol → transport/messaging}/evidence.js +1 -1
- package/dist/transport/messaging/evidence.js.map +1 -0
- package/dist/{endpoint/engine.d.ts → transport/messaging/index.d.ts} +4 -4
- package/dist/transport/messaging/index.d.ts.map +1 -0
- package/dist/{endpoint/engine.js → transport/messaging/index.js} +25 -9
- package/dist/transport/messaging/index.js.map +1 -0
- package/dist/transport/messaging/message.d.ts +112 -0
- package/dist/transport/messaging/message.d.ts.map +1 -0
- package/dist/transport/messaging/message.js +38 -0
- package/dist/transport/messaging/message.js.map +1 -0
- package/dist/{endpoint/recovery → transport/messaging}/reanchor/empty.d.ts +5 -5
- package/dist/transport/messaging/reanchor/empty.d.ts.map +1 -0
- package/dist/{endpoint/recovery → transport/messaging}/reanchor/empty.js +3 -3
- package/dist/transport/messaging/reanchor/empty.js.map +1 -0
- package/dist/{endpoint/recovery → transport/messaging}/reanchor/index.d.ts +3 -3
- package/dist/transport/messaging/reanchor/index.d.ts.map +1 -0
- package/dist/{endpoint/recovery → transport/messaging}/reanchor/index.js +27 -12
- package/dist/transport/messaging/reanchor/index.js.map +1 -0
- package/dist/{endpoint/engine-durability.d.ts → transport/messaging/records/index.d.ts} +9 -6
- package/dist/transport/messaging/records/index.d.ts.map +1 -0
- package/dist/{endpoint/engine-durability.js → transport/messaging/records/index.js} +9 -15
- package/dist/transport/messaging/records/index.js.map +1 -0
- package/dist/{endpoint → transport/messaging}/recovery/barrier.d.ts +1 -1
- package/dist/transport/messaging/recovery/barrier.d.ts.map +1 -0
- package/dist/transport/messaging/recovery/barrier.js.map +1 -0
- package/dist/{endpoint/recovery/store-evidence.d.ts → transport/messaging/recovery/evidence.d.ts} +5 -5
- package/dist/transport/messaging/recovery/evidence.d.ts.map +1 -0
- package/dist/{endpoint/recovery/store-evidence.js → transport/messaging/recovery/evidence.js} +3 -3
- package/dist/transport/messaging/recovery/evidence.js.map +1 -0
- package/dist/{endpoint → transport/messaging}/recovery/index.d.ts +4 -4
- package/dist/transport/messaging/recovery/index.d.ts.map +1 -0
- package/dist/{endpoint → transport/messaging}/recovery/index.js +41 -32
- package/dist/transport/messaging/recovery/index.js.map +1 -0
- package/dist/{endpoint/recovery/store.d.ts → transport/messaging/recovery/persistence.d.ts} +5 -5
- package/dist/transport/messaging/recovery/persistence.d.ts.map +1 -0
- package/dist/{endpoint/recovery/store.js → transport/messaging/recovery/persistence.js} +4 -4
- package/dist/transport/messaging/recovery/persistence.js.map +1 -0
- package/dist/{endpoint/recovery/state.d.ts → transport/messaging/recovery-session/index.d.ts} +6 -6
- package/dist/transport/messaging/recovery-session/index.d.ts.map +1 -0
- package/dist/{endpoint/recovery/state.js → transport/messaging/recovery-session/index.js} +3 -3
- package/dist/transport/messaging/recovery-session/index.js.map +1 -0
- package/dist/{endpoint/engine-types.d.ts → transport/messaging/runtime/index.d.ts} +22 -5
- package/dist/transport/messaging/runtime/index.d.ts.map +1 -0
- package/dist/{endpoint/engine-types.js → transport/messaging/runtime/index.js} +1 -1
- package/dist/transport/messaging/runtime/index.js.map +1 -0
- package/dist/{endpoint/engine-send.d.ts → transport/messaging/send.d.ts} +5 -4
- package/dist/transport/messaging/send.d.ts.map +1 -0
- package/dist/{endpoint/engine-send.js → transport/messaging/send.js} +4 -4
- package/dist/transport/messaging/send.js.map +1 -0
- package/dist/transport/router/index.d.ts.map +1 -0
- package/dist/{endpoint/router-worker → transport/router}/index.js +1 -1
- package/dist/transport/router/index.js.map +1 -0
- package/dist/transport/router/outage.d.ts.map +1 -0
- package/dist/transport/router/outage.js.map +1 -0
- package/dist/{endpoint/router-worker → transport/router}/types.d.ts +3 -4
- package/dist/transport/router/types.d.ts.map +1 -0
- package/dist/transport/router/types.js.map +1 -0
- package/dist/{endpoint/representation-canonical.d.ts → transport/wire/encoding/canonical.d.ts} +1 -2
- package/dist/transport/wire/encoding/canonical.d.ts.map +1 -0
- package/dist/{endpoint/representation-canonical.js → transport/wire/encoding/canonical.js} +2 -2
- package/dist/transport/wire/encoding/canonical.js.map +1 -0
- package/dist/{endpoint/representation-codec.d.ts → transport/wire/encoding/codec.d.ts} +5 -9
- package/dist/transport/wire/encoding/codec.d.ts.map +1 -0
- package/dist/{endpoint/representation-codec.js → transport/wire/encoding/codec.js} +7 -27
- package/dist/transport/wire/encoding/codec.js.map +1 -0
- package/dist/transport/wire/encoding/index.d.ts +4 -0
- package/dist/transport/wire/encoding/index.d.ts.map +1 -0
- package/dist/transport/wire/encoding/index.js +6 -0
- package/dist/transport/wire/encoding/index.js.map +1 -0
- package/dist/transport/wire/index.d.ts +6 -0
- package/dist/transport/wire/index.d.ts.map +1 -0
- package/dist/transport/wire/index.js +9 -0
- package/dist/transport/wire/index.js.map +1 -0
- package/dist/{endpoint/representation-schemas.d.ts → transport/wire/schemas.d.ts} +76 -98
- package/dist/transport/wire/schemas.d.ts.map +1 -0
- package/dist/{endpoint/representation-schemas.js → transport/wire/schemas.js} +7 -19
- package/dist/transport/wire/schemas.js.map +1 -0
- package/dist/transport/wire/values.d.ts +114 -0
- package/dist/transport/wire/values.d.ts.map +1 -0
- package/dist/transport/wire/values.js +192 -0
- package/dist/transport/wire/values.js.map +1 -0
- package/dist/{endpoint/representation-verification.d.ts → transport/wire/verification.d.ts} +3 -4
- package/dist/transport/wire/verification.d.ts.map +1 -0
- package/dist/{endpoint/representation-verification.js → transport/wire/verification.js} +4 -4
- package/dist/transport/wire/verification.js.map +1 -0
- package/package.json +6 -6
- package/dist/client-runtime.d.ts.map +0 -1
- package/dist/client-runtime.js.map +0 -1
- package/dist/contract.d.ts +0 -721
- package/dist/contract.d.ts.map +0 -1
- package/dist/contract.js +0 -441
- package/dist/contract.js.map +0 -1
- package/dist/contract.types-check.d.ts.map +0 -1
- package/dist/contract.types-check.js.map +0 -1
- package/dist/daemon/configuration.d.ts.map +0 -1
- package/dist/daemon/configuration.js +0 -75
- package/dist/daemon/configuration.js.map +0 -1
- package/dist/daemon/management.d.ts.map +0 -1
- package/dist/daemon/management.js.map +0 -1
- package/dist/daemon/registration.d.ts.map +0 -1
- package/dist/daemon/registration.js.map +0 -1
- package/dist/daemon/runtime/activation.d.ts.map +0 -1
- package/dist/daemon/runtime/activation.js.map +0 -1
- package/dist/daemon/runtime/controller.d.ts.map +0 -1
- package/dist/daemon/runtime/controller.js +0 -138
- package/dist/daemon/runtime/controller.js.map +0 -1
- package/dist/daemon/runtime/history-export.d.ts +0 -33
- package/dist/daemon/runtime/history-export.d.ts.map +0 -1
- package/dist/daemon/runtime/history-export.js.map +0 -1
- package/dist/daemon/runtime/index.d.ts.map +0 -1
- package/dist/daemon/runtime/index.js.map +0 -1
- package/dist/daemon/runtime/pending-delivery.d.ts +0 -49
- package/dist/daemon/runtime/pending-delivery.d.ts.map +0 -1
- package/dist/daemon/runtime/pending-delivery.js.map +0 -1
- package/dist/daemon/runtime/protocol.d.ts.map +0 -1
- package/dist/daemon/runtime/protocol.js.map +0 -1
- package/dist/endpoint/addressing/index.d.ts.map +0 -1
- package/dist/endpoint/addressing/index.js.map +0 -1
- package/dist/endpoint/collective/operation.d.ts.map +0 -1
- package/dist/endpoint/collective/operation.js.map +0 -1
- package/dist/endpoint/collective/received-request.d.ts.map +0 -1
- package/dist/endpoint/collective/received-request.js.map +0 -1
- package/dist/endpoint/collective/request-sends.d.ts.map +0 -1
- package/dist/endpoint/collective/request-sends.js.map +0 -1
- package/dist/endpoint/collective/shared-answers.d.ts.map +0 -1
- package/dist/endpoint/collective/shared-answers.js.map +0 -1
- package/dist/endpoint/collective/validation.d.ts +0 -49
- package/dist/endpoint/collective/validation.d.ts.map +0 -1
- package/dist/endpoint/collective/validation.js +0 -97
- package/dist/endpoint/collective/validation.js.map +0 -1
- package/dist/endpoint/collective/wire.d.ts.map +0 -1
- package/dist/endpoint/collective/wire.js.map +0 -1
- package/dist/endpoint/engine-dissemination.d.ts.map +0 -1
- package/dist/endpoint/engine-dissemination.js.map +0 -1
- package/dist/endpoint/engine-durability.d.ts.map +0 -1
- package/dist/endpoint/engine-durability.js.map +0 -1
- package/dist/endpoint/engine-send.d.ts.map +0 -1
- package/dist/endpoint/engine-send.js.map +0 -1
- package/dist/endpoint/engine-types.d.ts.map +0 -1
- package/dist/endpoint/engine-types.js.map +0 -1
- package/dist/endpoint/engine.d.ts.map +0 -1
- package/dist/endpoint/engine.js.map +0 -1
- package/dist/endpoint/protocol/evidence.d.ts.map +0 -1
- package/dist/endpoint/protocol/evidence.js.map +0 -1
- package/dist/endpoint/protocol/index.d.ts.map +0 -1
- package/dist/endpoint/protocol/index.js.map +0 -1
- package/dist/endpoint/recovery/barrier.d.ts.map +0 -1
- package/dist/endpoint/recovery/barrier.js.map +0 -1
- package/dist/endpoint/recovery/index.d.ts.map +0 -1
- package/dist/endpoint/recovery/index.js.map +0 -1
- package/dist/endpoint/recovery/reanchor/empty.d.ts.map +0 -1
- package/dist/endpoint/recovery/reanchor/empty.js.map +0 -1
- package/dist/endpoint/recovery/reanchor/index.d.ts.map +0 -1
- package/dist/endpoint/recovery/reanchor/index.js.map +0 -1
- package/dist/endpoint/recovery/state.d.ts.map +0 -1
- package/dist/endpoint/recovery/state.js.map +0 -1
- package/dist/endpoint/recovery/store-evidence.d.ts.map +0 -1
- package/dist/endpoint/recovery/store-evidence.js.map +0 -1
- package/dist/endpoint/recovery/store.d.ts.map +0 -1
- package/dist/endpoint/recovery/store.js.map +0 -1
- package/dist/endpoint/representation-canonical.d.ts.map +0 -1
- package/dist/endpoint/representation-canonical.js.map +0 -1
- package/dist/endpoint/representation-codec.d.ts.map +0 -1
- package/dist/endpoint/representation-codec.js.map +0 -1
- package/dist/endpoint/representation-schemas.d.ts.map +0 -1
- package/dist/endpoint/representation-schemas.js.map +0 -1
- package/dist/endpoint/representation-verification.d.ts.map +0 -1
- package/dist/endpoint/representation-verification.js.map +0 -1
- package/dist/endpoint/representation.d.ts +0 -6
- package/dist/endpoint/representation.d.ts.map +0 -1
- package/dist/endpoint/representation.js +0 -8
- package/dist/endpoint/representation.js.map +0 -1
- package/dist/endpoint/router-worker/index.d.ts.map +0 -1
- package/dist/endpoint/router-worker/index.js.map +0 -1
- package/dist/endpoint/router-worker/outage.d.ts.map +0 -1
- package/dist/endpoint/router-worker/outage.js.map +0 -1
- package/dist/endpoint/router-worker/types.d.ts.map +0 -1
- package/dist/endpoint/router-worker/types.js.map +0 -1
- package/dist/endpoint/store/anchors.d.ts.map +0 -1
- package/dist/endpoint/store/anchors.js.map +0 -1
- package/dist/endpoint/store/database/index.d.ts.map +0 -1
- package/dist/endpoint/store/database/index.js.map +0 -1
- package/dist/endpoint/store/database/schema.d.ts.map +0 -1
- package/dist/endpoint/store/database/schema.js.map +0 -1
- package/dist/endpoint/store/database/values.d.ts.map +0 -1
- package/dist/endpoint/store/database/values.js.map +0 -1
- package/dist/endpoint/store/deliveries.d.ts.map +0 -1
- package/dist/endpoint/store/deliveries.js.map +0 -1
- package/dist/endpoint/store/dissemination.d.ts.map +0 -1
- package/dist/endpoint/store/dissemination.js.map +0 -1
- package/dist/endpoint/store/index.d.ts.map +0 -1
- package/dist/endpoint/store/index.js.map +0 -1
- package/dist/endpoint/store/management.d.ts.map +0 -1
- package/dist/endpoint/store/management.js.map +0 -1
- package/dist/endpoint/store/outbound.d.ts.map +0 -1
- package/dist/endpoint/store/outbound.js.map +0 -1
- package/dist/endpoint/store/records.d.ts.map +0 -1
- package/dist/endpoint/store/records.js.map +0 -1
- package/dist/endpoint/store/rows/index.d.ts.map +0 -1
- package/dist/endpoint/store/rows/index.js.map +0 -1
- package/dist/endpoint/store/types.d.ts.map +0 -1
- package/dist/endpoint/store/types.js.map +0 -1
- package/dist/endpoint/store.d.ts +0 -10
- package/dist/endpoint/store.d.ts.map +0 -1
- package/dist/endpoint/store.js +0 -6
- package/dist/endpoint/store.js.map +0 -1
- package/dist/harness-mcp-contract.d.ts.map +0 -1
- package/dist/harness-mcp-contract.js +0 -113
- package/dist/harness-mcp-contract.js.map +0 -1
- package/dist/harness-mcp-http.d.ts.map +0 -1
- package/dist/harness-mcp-http.js.map +0 -1
- package/dist/harness-mcp-subscription.d.ts +0 -30
- package/dist/harness-mcp-subscription.d.ts.map +0 -1
- package/dist/harness-mcp-subscription.js +0 -361
- package/dist/harness-mcp-subscription.js.map +0 -1
- package/dist/harness-mcp-wire.d.ts.map +0 -1
- package/dist/harness-mcp-wire.js.map +0 -1
- package/dist/management-runtime.d.ts.map +0 -1
- package/dist/management-runtime.js.map +0 -1
- package/dist/message-text.d.ts.map +0 -1
- package/dist/message-text.js.map +0 -1
- package/dist/server.d.ts.map +0 -1
- package/dist/server.js.map +0 -1
- package/dist/server.types-check.d.ts.map +0 -1
- package/dist/server.types-check.js.map +0 -1
- /package/dist/{endpoint/store → store}/anchors.d.ts +0 -0
- /package/dist/{endpoint/store → store}/anchors.js +0 -0
- /package/dist/{endpoint/store → store}/database/index.d.ts +0 -0
- /package/dist/{endpoint/store → store}/database/index.js +0 -0
- /package/dist/{endpoint/store → store}/database/schema.d.ts +0 -0
- /package/dist/{endpoint/store → store}/database/values.d.ts +0 -0
- /package/dist/{endpoint/store → store}/database/values.js +0 -0
- /package/dist/{endpoint/store → store}/records.d.ts +0 -0
- /package/dist/{endpoint/store → store}/rows/index.d.ts +0 -0
- /package/dist/{endpoint/store → store}/rows/index.js +0 -0
- /package/dist/{endpoint/store → store}/types.js +0 -0
- /package/dist/{endpoint/collective → transport/collectives}/received-request.js +0 -0
- /package/dist/{endpoint/collective → transport/collectives}/request-sends.js +0 -0
- /package/dist/{endpoint/collective → transport/collectives}/shared-answers.js +0 -0
- /package/dist/{endpoint → transport/messaging}/recovery/barrier.js +0 -0
- /package/dist/{endpoint/router-worker → transport/router}/index.d.ts +0 -0
- /package/dist/{endpoint/router-worker → transport/router}/outage.d.ts +0 -0
- /package/dist/{endpoint/router-worker → transport/router}/outage.js +0 -0
- /package/dist/{endpoint/router-worker → transport/router}/types.js +0 -0
package/dist/index.js
CHANGED
|
@@ -1,10 +1,28 @@
|
|
|
1
1
|
/** @file Public barrel for the final endpoint runtime capability. */
|
|
2
|
+
// safer-arch-ignore no-folder-cycle: Importing package.json for the MCP implementation version places the package root in the endpoint's dependencies, while this facade re-exports from endpoint/harness-endpoint.
|
|
3
|
+
// safer-arch-ignore require-curated-public-facade: Each re-export names one domain's adapter-facing values; the root re-exports them from their owners instead of from a shared contract module.
|
|
2
4
|
// safer-arch-ignore no-large-public-surface: The root is the one adapter-facing boundary, and each operation and inbound item is a closed schema its adapters decode; splitting them behind narrower entrypoints would give adapters a second import path for one contract.
|
|
3
|
-
|
|
4
|
-
export {
|
|
5
|
-
/** Read the operation a model's message text states; every adapter uses it. */
|
|
6
|
-
export { MessageTextError, parseMessageText } from "./message-text.js";
|
|
5
|
+
/** The endpoint capability a host acquires, and its connect and delivery types. */
|
|
6
|
+
export { ConnectError, } from "./endpoint/harness-endpoint/index.js";
|
|
7
7
|
/** Acquire the structural endpoint for one loopback daemon endpoint. */
|
|
8
8
|
// safer-arch-ignore no-public-vendor-type-leak: URL is the platform-standard endpoint locator required by the public acquisition contract.
|
|
9
|
-
export { acquireHarnessEndpoint } from "./
|
|
9
|
+
export { acquireHarnessEndpoint } from "./endpoint/harness-endpoint/index.js";
|
|
10
|
+
/** One line of the daemon's optional history export. */
|
|
11
|
+
export { HistoryExportRecord } from "./delivery/history-export.js";
|
|
12
|
+
/** Send input and the closed error of a refused collective send. */
|
|
13
|
+
export { CollectiveError, SendInput, } from "./transport/collectives/forms.js";
|
|
14
|
+
/** The items an endpoint delivers to its host. */
|
|
15
|
+
export { InboundItem } from "./transport/collectives/inbound.js";
|
|
16
|
+
/** The text a host's model reads for each delivered message, question and result. */
|
|
17
|
+
export { groupMembers, renderCollectiveRequest, renderCollectiveResult, renderContent, } from "./transport/collectives/render.js";
|
|
18
|
+
/** The operation a native host's message text states. */
|
|
19
|
+
export { MessageTextError, parseMessageText, } from "./transport/collectives/message-text.js";
|
|
20
|
+
/** Explicit direct and group addresses. */
|
|
21
|
+
export { AgentAddress, GroupAddress, MessageAddressInput, } from "./transport/wire/values.js";
|
|
22
|
+
/** The closed errors of sending, listening, and acknowledging delivery. */
|
|
23
|
+
export { DeliveryAcknowledgeError, ListenError, SendError, } from "./transport/messaging/errors.js";
|
|
24
|
+
/** Certified inbound messages, direct or to a fixed group. */
|
|
25
|
+
export { InboundMessage, } from "./transport/messaging/message.js";
|
|
26
|
+
/** Post ids and the closed semantic content of a message. */
|
|
27
|
+
export { Content, ContentPart, JsonValue, PostId, } from "./transport/wire/values.js";
|
|
10
28
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,4QAA4Q;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,oNAAoN;AACpN,iMAAiM;AACjM,4QAA4Q;AAE5Q,mFAAmF;AACnF,OAAO,EACL,YAAY,GAGb,MAAM,sCAAsC,CAAC;AAC9C,wEAAwE;AACxE,2IAA2I;AAC3I,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,wDAAwD;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,oEAAoE;AACpE,OAAO,EACL,eAAe,EACf,SAAS,GAEV,MAAM,kCAAkC,CAAC;AAC1C,kDAAkD;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,qFAAqF;AACrF,OAAO,EACL,YAAY,EACZ,uBAAuB,EACvB,sBAAsB,EACtB,aAAa,GACd,MAAM,mCAAmC,CAAC;AAC3C,yDAAyD;AACzD,OAAO,EACL,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,yCAAyC,CAAC;AACjD,2CAA2C;AAC3C,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,mBAAmB,GACpB,MAAM,4BAA4B,CAAC;AACpC,2EAA2E;AAC3E,OAAO,EACL,wBAAwB,EACxB,WAAW,EACX,SAAS,GACV,MAAM,iCAAiC,CAAC;AACzC,8DAA8D;AAC9D,OAAO,EAGL,cAAc,GACf,MAAM,kCAAkC,CAAC;AAC1C,6DAA6D;AAC7D,OAAO,EACL,OAAO,EACP,WAAW,EACX,SAAS,EACT,MAAM,GACP,MAAM,4BAA4B,CAAC"}
|
|
@@ -5,13 +5,14 @@
|
|
|
5
5
|
* operation, multicast by default or a gather or all_gather with its deadline
|
|
6
6
|
* and schema; a response names the conversation whose open request it
|
|
7
7
|
* answers and no request id. One parser reads either from a message's text,
|
|
8
|
-
* so
|
|
8
|
+
* so the native channel adapters accept the same text. Each inbound
|
|
9
9
|
* delivery carries one item plus transport-only acknowledgment: a multicast
|
|
10
10
|
* with the certified direct or complete-group message, a collective request
|
|
11
|
-
* naming the conversation it arrived in, a collective result
|
|
12
|
-
*
|
|
11
|
+
* naming the conversation it arrived in, a collective result, each naming
|
|
12
|
+
* its operation, or an operation failure. A send returns a
|
|
13
13
|
* collecting operation's id and fails with a closed send reason or a
|
|
14
|
-
* collective failure.
|
|
14
|
+
* collective failure. Optional invocation identity preserves a retried send without
|
|
15
|
+
* executing a new collective operation.
|
|
15
16
|
*/
|
|
16
17
|
import type { DateTime, Effect, Either, Scope, Stream } from "effect";
|
|
17
18
|
import type { acquireHarnessEndpoint, AgentAddress, CollectiveError, ConnectError, Content, ContentPart, DeliveryAcknowledgeError, DirectMessage, GroupAddress, GroupMessage, HarnessEndpoint, HistoryExportRecord, InboundDelivery, InboundItem, InboundMessage, JsonValue, ListenError, MessageAddressInput, MessageTextError, parseMessageText, PostId, SendError, SendInput, SendResult } from "./index.js";
|
|
@@ -85,6 +86,7 @@ type ExpectedInboundItem = Readonly<{
|
|
|
85
86
|
message: InboundMessage;
|
|
86
87
|
}> | Readonly<{
|
|
87
88
|
kind: "collectiveRequest";
|
|
89
|
+
op: "gather" | "all_gather";
|
|
88
90
|
id: CollectiveId;
|
|
89
91
|
postId: PostId;
|
|
90
92
|
from: AgentAddress;
|
|
@@ -94,6 +96,7 @@ type ExpectedInboundItem = Readonly<{
|
|
|
94
96
|
deadlineAt: number;
|
|
95
97
|
}> | Readonly<{
|
|
96
98
|
kind: "collectiveResult";
|
|
99
|
+
op: "gather" | "all_gather";
|
|
97
100
|
id: CollectiveId;
|
|
98
101
|
to: MessageAddressInput;
|
|
99
102
|
question: string;
|
|
@@ -107,7 +110,6 @@ type ExpectedInboundItem = Readonly<{
|
|
|
107
110
|
outcome: ExpectedMemberOutcome;
|
|
108
111
|
}>>
|
|
109
112
|
];
|
|
110
|
-
closePostId?: PostId;
|
|
111
113
|
}> | Readonly<{
|
|
112
114
|
kind: "operationFailed";
|
|
113
115
|
id: CollectiveId;
|
|
@@ -121,6 +123,7 @@ type ExpectedDelivery = Readonly<{
|
|
|
121
123
|
type ExpectedEndpoint = Readonly<{
|
|
122
124
|
send: (input: SendInput, options?: Readonly<{
|
|
123
125
|
failureDelivery?: "result" | "inbound";
|
|
126
|
+
idempotencyKey?: string;
|
|
124
127
|
}>) => Effect.Effect<SendResult, SendError | CollectiveError>;
|
|
125
128
|
messages: Stream.Stream<InboundDelivery, ListenError>;
|
|
126
129
|
}>;
|
|
@@ -133,6 +136,7 @@ type DirectMessageIsExact = Expect<Equal<DirectMessage, ExpectedDirectMessage>>;
|
|
|
133
136
|
type GroupMessageIsExact = Expect<Equal<GroupMessage, ExpectedGroupMessage>>;
|
|
134
137
|
type InboundMessageIsExact = Expect<Equal<InboundMessage, DirectMessage | GroupMessage>>;
|
|
135
138
|
type DeliveryIsExact = Expect<Equal<InboundDelivery, ExpectedDelivery>>;
|
|
139
|
+
type SendOptionsAreExact = Expect<Equal<NonNullable<Parameters<HarnessEndpoint["send"]>[1]>, NonNullable<Parameters<ExpectedEndpoint["send"]>[1]>>>;
|
|
136
140
|
type EndpointIsExact = Expect<Equal<HarnessEndpoint, ExpectedEndpoint>>;
|
|
137
141
|
type ExpectedHistoryExportRecord = Readonly<{
|
|
138
142
|
kind: "inbound";
|
|
@@ -159,7 +163,7 @@ type HistoryExportRecordIsExact = Expect<Equal<HistoryExportRecord, ExpectedHist
|
|
|
159
163
|
type ContentIsNonempty = Expect<Content extends readonly [ContentPart, ...ContentPart[]] ? true : false>;
|
|
160
164
|
type AgentAddressIsInput = Expect<AgentAddress extends MessageAddressInput ? true : false>;
|
|
161
165
|
type GroupAddressIsInput = Expect<GroupAddress extends MessageAddressInput ? true : false>;
|
|
162
|
-
type SendReasonsAreExact = Expect<Equal<SendError["reason"], "invalid-address" | "unknown-agent" | "membership-invalid" | "content-invalid" | "not-registered" | "version-mismatch" | "certification-unavailable" | "persistence-failed" | "network-unavailable">>;
|
|
166
|
+
type SendReasonsAreExact = Expect<Equal<SendError["reason"], "invalid-address" | "unknown-agent" | "membership-invalid" | "content-invalid" | "not-registered" | "version-mismatch" | "certification-unavailable" | "persistence-failed" | "network-unavailable" | "idempotency-conflict" | "outcome-unknown">>;
|
|
163
167
|
type CollectiveFailureKindsAreExact = Expect<Equal<CollectiveError["failure"]["kind"], "members-unreachable" | "schema-invalid" | "answer-invalid" | "request-none" | "request-ambiguous" | "request-answered" | "request-expired">>;
|
|
164
168
|
type ListenReasonsAreExact = Expect<Equal<ListenError["reason"], "already-listening" | "incompatible-daemon" | "transport-failed" | "decode-failed">>;
|
|
165
169
|
type AcknowledgeReasonsAreExact = Expect<Equal<DeliveryAcknowledgeError["reason"], "unknown-delivery" | "delivery-conflict" | "persistence-failed" | "transport-failed">>;
|
|
@@ -178,6 +182,7 @@ export type HarnessEndpointCanaries = [
|
|
|
178
182
|
InboundMessageIsExact,
|
|
179
183
|
DeliveryIsExact,
|
|
180
184
|
EndpointIsExact,
|
|
185
|
+
SendOptionsAreExact,
|
|
181
186
|
ContentIsNonempty,
|
|
182
187
|
AgentAddressIsInput,
|
|
183
188
|
GroupAddressIsInput,
|
|
@@ -191,4 +196,4 @@ export type HarnessEndpointCanaries = [
|
|
|
191
196
|
AcquisitionResultIsExact
|
|
192
197
|
];
|
|
193
198
|
export {};
|
|
194
|
-
//# sourceMappingURL=
|
|
199
|
+
//# sourceMappingURL=index.types-check.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.types-check.d.ts","sourceRoot":"","sources":["../src/index.types-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACtE,OAAO,KAAK,EACV,sBAAsB,EACtB,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,OAAO,EACP,WAAW,EACX,wBAAwB,EACxB,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,WAAW,EACX,cAAc,EACd,SAAS,EACT,WAAW,EACX,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,MAAM,EACN,SAAS,EACT,SAAS,EACT,UAAU,EACX,MAAM,YAAY,CAAC;AAEpB,KAAK,KAAK,CAAC,IAAI,EAAE,KAAK,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,IAAI,GAAG,KAAK,CAAC;AAC7E,KAAK,MAAM,CAAC,KAAK,SAAS,IAAI,IAAI,KAAK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B,eAAe;IACf,eAAe;IACf,mBAAmB;IACnB,iBAAiB;IACjB,mBAAmB;IACnB,mBAAmB;IACnB,mBAAmB;IACnB,8BAA8B;IAC9B,0BAA0B;IAC1B,qBAAqB;IACrB,0BAA0B;IAC1B,sBAAsB;IACtB,mBAAmB;IACnB,wBAAwB;CACzB,CAAC"}
|
|
@@ -5,13 +5,14 @@
|
|
|
5
5
|
* operation, multicast by default or a gather or all_gather with its deadline
|
|
6
6
|
* and schema; a response names the conversation whose open request it
|
|
7
7
|
* answers and no request id. One parser reads either from a message's text,
|
|
8
|
-
* so
|
|
8
|
+
* so the native channel adapters accept the same text. Each inbound
|
|
9
9
|
* delivery carries one item plus transport-only acknowledgment: a multicast
|
|
10
10
|
* with the certified direct or complete-group message, a collective request
|
|
11
|
-
* naming the conversation it arrived in, a collective result
|
|
12
|
-
*
|
|
11
|
+
* naming the conversation it arrived in, a collective result, each naming
|
|
12
|
+
* its operation, or an operation failure. A send returns a
|
|
13
13
|
* collecting operation's id and fails with a closed send reason or a
|
|
14
|
-
* collective failure.
|
|
14
|
+
* collective failure. Optional invocation identity preserves a retried send without
|
|
15
|
+
* executing a new collective operation.
|
|
15
16
|
*/
|
|
16
17
|
export {};
|
|
17
|
-
//# sourceMappingURL=
|
|
18
|
+
//# sourceMappingURL=index.types-check.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.types-check.js","sourceRoot":"","sources":["../src/index.types-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG"}
|
|
@@ -3,17 +3,15 @@ import type { Registry } from "@moltzap/identity/registry";
|
|
|
3
3
|
import type { Router } from "@moltzap/router";
|
|
4
4
|
import { type VerifiedAgentCard } from "@moltzap/identity";
|
|
5
5
|
import { Deferred, Effect, type Scope } from "effect";
|
|
6
|
-
import type {
|
|
7
|
-
import type {
|
|
8
|
-
import type { EndpointStore } from "../../
|
|
9
|
-
import type {
|
|
10
|
-
import type {
|
|
11
|
-
import type {
|
|
12
|
-
import type
|
|
13
|
-
import type { HistoryExportPort } from "./history-export.js";
|
|
6
|
+
import type { HistoryExportPort } from "../../delivery/history-export.js";
|
|
7
|
+
import type { HarnessMcpEventHandler, makeHarnessMcpHttpHandler } from "../../endpoint/mcp/index.js";
|
|
8
|
+
import type { EndpointStore } from "../../store/index.js";
|
|
9
|
+
import type { EndpointEngine, EndpointEngineInput, EngineInitializationError } from "../../transport/messaging/index.js";
|
|
10
|
+
import type { RouterWorker, RouterWorkerInput, RouterWorkerProtocolError, RouterWorkerTransportError } from "../../transport/router/index.js";
|
|
11
|
+
import type { DaemonBootstrap } from "../bootstrap.js";
|
|
12
|
+
import { type DecodedOuterBody } from "../../transport/wire/index.js";
|
|
14
13
|
import { type DaemonManagementOperations } from "../management.js";
|
|
15
|
-
import { type DaemonRegistrationState } from "../registration.js";
|
|
16
|
-
type SubscriptionHandler = HarnessMcpSubscriptionHandler<HarnessMessageReadyEvent>;
|
|
14
|
+
import { type DaemonRegistrationState } from "../registration/index.js";
|
|
17
15
|
declare const DaemonRuntimeError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
18
16
|
readonly _tag: "DaemonRuntimeError";
|
|
19
17
|
} & Readonly<A>;
|
|
@@ -32,12 +30,12 @@ export declare class DaemonActivationError extends DaemonActivationError_base<{
|
|
|
32
30
|
}
|
|
33
31
|
/** Replaceable process edges used only by focused lifecycle tests. */
|
|
34
32
|
export interface DaemonRuntimeDependencies {
|
|
35
|
-
readonly makeWorker: (input: RouterWorkerInput) => Effect.Effect<RouterWorker, RouterWorkerTransportError | RouterWorkerProtocolError, Registry | Router>;
|
|
33
|
+
readonly makeWorker: (input: RouterWorkerInput<DecodedOuterBody>) => Effect.Effect<RouterWorker, RouterWorkerTransportError | RouterWorkerProtocolError, Registry | Router>;
|
|
36
34
|
readonly makeEngine: (input: EndpointEngineInput) => Effect.Effect<EndpointEngine, EngineInitializationError, Scope.Scope>;
|
|
37
35
|
readonly makeHandler: typeof makeHarnessMcpHttpHandler;
|
|
38
36
|
readonly acquireListener: (input: {
|
|
39
37
|
readonly port: number;
|
|
40
|
-
readonly handler:
|
|
38
|
+
readonly handler: HarnessMcpEventHandler;
|
|
41
39
|
}) => Effect.Effect<void, Error, Scope.Scope>;
|
|
42
40
|
/** Opens the operator-configured history export against one file. */
|
|
43
41
|
readonly makeHistoryExport: (path: string) => Effect.Effect<HistoryExportPort>;
|
|
@@ -92,4 +90,4 @@ export declare const prepareDaemonActivation: (input: {
|
|
|
92
90
|
readonly bootstrap: DaemonBootstrap;
|
|
93
91
|
}) => Effect.Effect<DaemonActivationPreparation, DaemonRuntimeError, Registry>;
|
|
94
92
|
export {};
|
|
95
|
-
//# sourceMappingURL=
|
|
93
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/service/activation/index.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAE/E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAGL,KAAK,iBAAiB,EACvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAQ,QAAQ,EAAE,MAAM,EAAE,KAAK,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,KAAK,EACV,sBAAsB,EACtB,yBAAyB,EAC1B,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,aAAa,EAAoB,MAAM,sBAAsB,CAAC;AAC5E,OAAO,KAAK,EACV,cAAc,EACd,mBAAmB,EACnB,yBAAyB,EAC1B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KA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B,UAAW;IAC7C,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC;CACrC,KAAG,MAAM,CAAC,MAAM,CAAC,2BAA2B,EAAE,kBAAkB,EAAE,QAAQ,CAOtB,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/** @file Private daemon activation, recovery, and registration preparation. */
|
|
2
2
|
import { AgentCard, } from "@moltzap/identity";
|
|
3
3
|
import { Data, Deferred, Effect } from "effect";
|
|
4
|
-
import { decodeCanonical, encodeCanonical, MembershipDescriptor, verifyMembershipDescriptor, } from "../../
|
|
4
|
+
import { decodeCanonical, encodeCanonical, MembershipDescriptor, verifyMembershipDescriptor, } from "../../transport/wire/index.js";
|
|
5
5
|
import { makeDaemonManagementOperations, } from "../management.js";
|
|
6
|
-
import { readDaemonRegistrationState, } from "../registration.js";
|
|
6
|
+
import { readDaemonRegistrationState, } from "../registration/index.js";
|
|
7
7
|
/** Closed private daemon failure projected onto the public startup phases. */
|
|
8
8
|
export class DaemonRuntimeError extends Data.TaggedError("DaemonRuntimeError") {
|
|
9
9
|
}
|
|
@@ -96,4 +96,4 @@ export const prepareDaemonActivation = (input) => Effect.gen(function* () {
|
|
|
96
96
|
const registration = yield* readDaemonRegistrationState(input).pipe(Effect.mapError(() => runtimeFailure("storage")));
|
|
97
97
|
return { management, registration };
|
|
98
98
|
}).pipe(Effect.withSpan("prepareDaemonActivation"));
|
|
99
|
-
//# sourceMappingURL=
|
|
99
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/service/activation/index.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAI/E,OAAO,EACL,SAAS,GAGV,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAc,MAAM,QAAQ,CAAC;AAmB5D,OAAO,EACL,e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AAK,CAAC,CACrD,EACD,MAAM,CAAC,QAAQ,CAAC,CAAC,KAAK,EAAE,EAAE,CACxB,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,wBAAwB,CAAC,KAAK,CAAC,CAAC,CAC5D,EACD,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,CAClB,CAAC;AACJ,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,KAGvC,EAA4E,EAAE,CAC7E,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAClB,MAAM,UAAU,GAAG,KAAK,CAAC,CAAC,8BAA8B,CAAC,KAAK,CAAC,CAAC;IAChE,MAAM,YAAY,GAAG,KAAK,CAAC,CAAC,2BAA2B,CAAC,KAAK,CAAC,CAAC,IAAI,CACjE,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CACjD,CAAC;IACF,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC;AACtC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,yBAAyB,CAAC,CAAC,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
/** @file
|
|
2
|
-
import { AgentSigningAuthority,
|
|
3
|
-
import { Effect, Redacted } from "effect";
|
|
1
|
+
/** @file The daemon's loaded configuration and bootstrap authority, and the closed failure that loading them returns. */
|
|
2
|
+
import type { AgentSigningAuthority, Ed25519PublicKey as Ed25519PublicKeyValue } from "@moltzap/identity";
|
|
3
|
+
import { type Effect, type Redacted } from "effect";
|
|
4
|
+
import type { HarnessMcpCredentials } from "../endpoint/mcp/index.js";
|
|
4
5
|
/** Closed reason that daemon configuration cannot become startup authority. */
|
|
5
|
-
export type DaemonConfigurationFailure = "environment" | "agent-private-key-file" | "agent-private-key" | "admission-credential-file" | "admission-credential";
|
|
6
|
+
export type DaemonConfigurationFailure = "environment" | "agent-private-key-file" | "agent-private-key" | "admission-credential-file" | "admission-credential" | "mcp-runtime-credential-file" | "mcp-owner-credential-file" | "mcp-credential";
|
|
6
7
|
declare const DaemonConfigurationError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
7
8
|
readonly _tag: "DaemonConfigurationError";
|
|
8
9
|
} & Readonly<A>;
|
|
@@ -30,6 +31,8 @@ export interface DaemonProcessConfiguration {
|
|
|
30
31
|
* line each, when the operator asks for that record.
|
|
31
32
|
*/
|
|
32
33
|
readonly historyExport?: string;
|
|
34
|
+
readonly mcpRuntimeCredentialFile?: Redacted.Redacted;
|
|
35
|
+
readonly mcpOwnerCredentialFile?: Redacted.Redacted;
|
|
33
36
|
}
|
|
34
37
|
/** Loaded private authority required by daemon registration and network calls. */
|
|
35
38
|
export interface DaemonBootstrap {
|
|
@@ -41,18 +44,7 @@ export interface DaemonBootstrap {
|
|
|
41
44
|
* replays that outcome. Loading the bootstrap never reads the file.
|
|
42
45
|
*/
|
|
43
46
|
readonly admissionCredential: Effect.Effect<Redacted.Redacted, DaemonConfigurationError>;
|
|
47
|
+
readonly mcpCredentials?: HarnessMcpCredentials;
|
|
44
48
|
}
|
|
45
|
-
/**
|
|
46
|
-
* Loads exactly the six required daemon process inputs, the optional
|
|
47
|
-
* admission credential file, and the optional export.
|
|
48
|
-
*/
|
|
49
|
-
export declare const loadDaemonProcessConfiguration: Effect.Effect<DaemonProcessConfiguration, DaemonConfigurationError>;
|
|
50
|
-
/**
|
|
51
|
-
* Reads the agent private key and constructs the configured Ed25519 authority.
|
|
52
|
-
*
|
|
53
|
-
* @param configuration Validated process configuration.
|
|
54
|
-
* @returns Opaque agent signing authority and a deferred admission credential.
|
|
55
|
-
*/
|
|
56
|
-
export declare const loadDaemonBootstrap: (configuration: DaemonProcessConfiguration) => Effect.Effect<DaemonBootstrap, DaemonConfigurationError>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Q,CAAC,QAAQ,CAAC;IACtD,QAAQ,CAAC,sBAAsB,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC;CACrD;AAED,kFAAkF;AAClF,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,aAAa,EAAE,0BAA0B,CAAC;IACnD,QAAQ,CAAC,gBAAgB,EAAE,qBAAqB,CAAC;IACjD,QAAQ,CAAC,cAAc,EAAE,qBAAqB,CAAC;IAC/C;;;OAGG;IACH,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC,MAAM,CACzC,QAAQ,CAAC,QAAQ,EACjB,wBAAwB,CACzB,CAAC;IACF,QAAQ,CAAC,cAAc,CAAC,EAAE,qBAAqB,CAAC;CACjD"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** @file The daemon's loaded configuration and bootstrap authority, and the closed failure that loading them returns. */
|
|
2
|
+
import { Data } from "effect";
|
|
3
|
+
/** One non-diagnostic daemon configuration failure. */
|
|
4
|
+
export class DaemonConfigurationError extends Data.TaggedError("DaemonConfigurationError") {
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=bootstrap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../../src/service/bootstrap.ts"],"names":[],"mappings":"AAAA,yHAAyH;AAMzH,OAAO,EAAE,IAAI,EAA8B,MAAM,QAAQ,CAAC;AAc1D,uDAAuD;AACvD,MAAM,OAAO,wBAAyB,SAAQ,IAAI,CAAC,WAAW,CAC5D,0BAA0B,CAG1B;CAAG"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** @file Loads the daemon process configuration and its redacted bootstrap material from the environment. */
|
|
2
|
+
import { Effect } from "effect";
|
|
3
|
+
import { type DaemonBootstrap, DaemonConfigurationError, type DaemonProcessConfiguration } from "./bootstrap.js";
|
|
4
|
+
/** Loads explicit daemon inputs with optional export and MCP authority separation. */
|
|
5
|
+
export declare const loadDaemonProcessConfiguration: Effect.Effect<DaemonProcessConfiguration, DaemonConfigurationError>;
|
|
6
|
+
/**
|
|
7
|
+
* Reads the agent private key and constructs the configured Ed25519 authority.
|
|
8
|
+
*
|
|
9
|
+
* @param configuration Validated process configuration and optional authority paths.
|
|
10
|
+
* @returns Opaque signing authority, MCP credentials, and deferred admission credential.
|
|
11
|
+
*/
|
|
12
|
+
export declare const loadDaemonBootstrap: (configuration: DaemonProcessConfiguration) => Effect.Effect<DaemonBootstrap, DaemonConfigurationError>;
|
|
13
|
+
//# sourceMappingURL=configuration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../src/service/configuration.ts"],"names":[],"mappings":"AAAA,6GAA6G;AAG7G,OAAO,EAAU,MAAM,EAAoB,MAAM,QAAQ,CAAC;AAY1D,OAAO,EACL,KAAK,eAAe,EACpB,wBAAwB,EAExB,KAAK,0BAA0B,EAChC,MAAM,gBAAgB,CAAC;AAsExB,sFAAsF;AACtF,eAAO,MAAM,8BAA8B,EAAE,MAAM,CAAC,MAAM,CACxD,0BAA0B,EAC1B,wBAAwB,CAKzB,CAAC;AAsDF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,kBACf,0BAA0B,KACxC,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE,wBAAwB,CAoBT,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/** @file Loads the daemon process configuration and its redacted bootstrap material from the environment. */
|
|
2
|
+
import { AgentSigningAuthority, Ed25519PublicKey } from "@moltzap/identity";
|
|
3
|
+
import { Config, Effect, Redacted, Schema } from "effect";
|
|
4
|
+
import { credentialMatches, } from "../endpoint/mcp/index.js";
|
|
5
|
+
import { credentialText, loadAdmissionCredential, loadSigningAuthority, readCredential, } from "../identity/index.js";
|
|
6
|
+
import { DaemonConfigurationError, } from "./bootstrap.js";
|
|
7
|
+
const canonicalUnsignedDecimal = Schema.String.pipe(Schema.pattern(/^(?:0|[1-9]\d*)$/u));
|
|
8
|
+
const port = canonicalUnsignedDecimal.pipe(Schema.compose(Schema.NumberFromString), Schema.int(), Schema.between(1, 65_535));
|
|
9
|
+
const configuredPath = Schema.String.pipe(Schema.minLength(1), Schema.filter((value) => !value.includes("\u0000")));
|
|
10
|
+
const optionalConfiguredPath = Schema.Union(Schema.Literal(""), configuredPath);
|
|
11
|
+
const isSerializedOrigin = (value) => {
|
|
12
|
+
if (!URL.canParse(value)) {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
const parsed = new URL(value);
|
|
16
|
+
return ((parsed.protocol === "http:" || parsed.protocol === "https:") &&
|
|
17
|
+
value === parsed.origin);
|
|
18
|
+
};
|
|
19
|
+
const origin = Schema.String.pipe(Schema.filter(isSerializedOrigin), Schema.compose(Schema.URL));
|
|
20
|
+
const compactPublicKeyJson = Schema.String.pipe(Schema.pattern(/^\{"crv":"Ed25519","kty":"OKP","x":"[A-Za-z0-9_-]{43}"\}$/u), Schema.compose(Schema.parseJson(Ed25519PublicKey)));
|
|
21
|
+
const configuredValues = Config.all({
|
|
22
|
+
stateDirectory: Schema.Config("MOLTZAPD_STATE_DIRECTORY", configuredPath),
|
|
23
|
+
mcpPort: Schema.Config("MOLTZAPD_MCP_PORT", port),
|
|
24
|
+
registryOrigin: Schema.Config("MOLTZAPD_REGISTRY_ORIGIN", origin),
|
|
25
|
+
registrySignerPublicKey: Schema.Config("MOLTZAPD_REGISTRY_SIGNER_PUBLIC_KEY", compactPublicKeyJson),
|
|
26
|
+
routerOrigin: Schema.Config("MOLTZAPD_ROUTER_ORIGIN", origin),
|
|
27
|
+
agentPrivateKeyFile: Config.redacted(Schema.Config("MOLTZAPD_AGENT_PRIVATE_KEY_FILE", configuredPath)),
|
|
28
|
+
admissionCredentialFile: Schema.Config("MOLTZAPD_ADMISSION_CREDENTIAL_FILE", optionalConfiguredPath).pipe(Config.withDefault(""), Config.map((path) => (path === "" ? undefined : Redacted.make(path)))),
|
|
29
|
+
historyExport: Schema.Config("MOLTZAPD_HISTORY_EXPORT", configuredPath).pipe(Config.withDefault(undefined)),
|
|
30
|
+
mcpRuntimeCredentialFile: Config.redacted(Schema.Config("MOLTZAPD_MCP_RUNTIME_CREDENTIAL_FILE", configuredPath)).pipe(Config.withDefault(undefined)),
|
|
31
|
+
mcpOwnerCredentialFile: Config.redacted(Schema.Config("MOLTZAPD_MCP_OWNER_CREDENTIAL_FILE", configuredPath)).pipe(Config.withDefault(undefined)),
|
|
32
|
+
});
|
|
33
|
+
const configurationError = (reason) => new DaemonConfigurationError({ reason });
|
|
34
|
+
/** Loads explicit daemon inputs with optional export and MCP authority separation. */
|
|
35
|
+
export const loadDaemonProcessConfiguration = configuredValues.pipe(Effect.map((configuration) => configuration), Effect.mapError(() => configurationError("environment")), Effect.withSpan("loadDaemonProcessConfiguration"));
|
|
36
|
+
const credentialFailure = (fileReason, valueReason) => (error) => configurationError(error.stage === "file" ? fileReason : valueReason);
|
|
37
|
+
const mcpCredential = credentialText.pipe(Schema.minLength(32));
|
|
38
|
+
const loadMcpCredentials = (configuration) => Effect.gen(function* () {
|
|
39
|
+
const runtimePath = configuration.mcpRuntimeCredentialFile;
|
|
40
|
+
const ownerPath = configuration.mcpOwnerCredentialFile;
|
|
41
|
+
if (runtimePath === undefined && ownerPath === undefined) {
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
if (runtimePath === undefined || ownerPath === undefined) {
|
|
45
|
+
return yield* Effect.fail(configurationError("mcp-credential"));
|
|
46
|
+
}
|
|
47
|
+
const runtime = yield* readCredential(runtimePath, mcpCredential).pipe(Effect.mapError(credentialFailure("mcp-runtime-credential-file", "mcp-credential")));
|
|
48
|
+
const owner = yield* readCredential(ownerPath, mcpCredential).pipe(Effect.mapError(credentialFailure("mcp-owner-credential-file", "mcp-credential")));
|
|
49
|
+
if (credentialMatches(Redacted.value(runtime), owner)) {
|
|
50
|
+
return yield* Effect.fail(configurationError("mcp-credential"));
|
|
51
|
+
}
|
|
52
|
+
return { runtime, owner };
|
|
53
|
+
});
|
|
54
|
+
const loadConfiguredAdmissionCredential = (configuration) => configuration.admissionCredentialFile === undefined
|
|
55
|
+
? Effect.fail(configurationError("admission-credential-file"))
|
|
56
|
+
: loadAdmissionCredential(configuration.admissionCredentialFile).pipe(Effect.mapError(credentialFailure("admission-credential-file", "admission-credential")));
|
|
57
|
+
/**
|
|
58
|
+
* Reads the agent private key and constructs the configured Ed25519 authority.
|
|
59
|
+
*
|
|
60
|
+
* @param configuration Validated process configuration and optional authority paths.
|
|
61
|
+
* @returns Opaque signing authority, MCP credentials, and deferred admission credential.
|
|
62
|
+
*/
|
|
63
|
+
export const loadDaemonBootstrap = (configuration) => Effect.gen(function* () {
|
|
64
|
+
const signingAuthority = yield* loadSigningAuthority(configuration.agentPrivateKeyFile).pipe(Effect.mapError(credentialFailure("agent-private-key-file", "agent-private-key")));
|
|
65
|
+
const admissionCredential = yield* Effect.cached(loadConfiguredAdmissionCredential(configuration));
|
|
66
|
+
const mcpCredentials = yield* loadMcpCredentials(configuration);
|
|
67
|
+
return Object.freeze({
|
|
68
|
+
configuration,
|
|
69
|
+
signingAuthority,
|
|
70
|
+
agentPublicKey: AgentSigningAuthority.publicKey(signingAuthority),
|
|
71
|
+
admissionCredential,
|
|
72
|
+
...(mcpCredentials === undefined ? {} : { mcpCredentials }),
|
|
73
|
+
});
|
|
74
|
+
}).pipe(Effect.withSpan("loadDaemonBootstrap"));
|
|
75
|
+
//# sourceMappingURL=configuration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../src/service/configuration.ts"],"names":[],"mappings":"AAAA,6GAA6G;AAE7G,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC1D,OAAO,EACL,iBA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C3B,sBAAsB,CACvB,CACF,CACF,CAAC;AAER;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,aAAyC,EACiB,EAAE,CAC5D,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAClB,MAAM,gBAAgB,GAAG,KAAK,CAAC,CAAC,oBAAoB,CAClD,aAAa,CAAC,mBAAmB,CAClC,CAAC,IAAI,CACJ,MAAM,CAAC,QAAQ,CACb,iBAAiB,CAAC,wBAAwB,EAAE,mBAAmB,CAAC,CACjE,CACF,CAAC;IACF,MAAM,mBAAmB,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM,CAC9C,iCAAiC,CAAC,aAAa,CAAC,CACjD,CAAC;IACF,MAAM,cAAc,GAAG,KAAK,CAAC,CAAC,kBAAkB,CAAC,aAAa,CAAC,CAAC;IAChE,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,aAAa;QACb,gBAAgB;QAChB,cAAc,EAAE,qBAAqB,CAAC,SAAS,CAAC,gBAAgB,CAAC;QACjE,mBAAmB;QACnB,GAAG,CAAC,cAAc,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,CAAC;KAC5D,CAAC,CAAC;AACL,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CAAC,CAAC"}
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
import { Registry } from "@moltzap/identity/registry";
|
|
3
3
|
import { Router } from "@moltzap/router";
|
|
4
4
|
import { Effect, Scope } from "effect";
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
7
|
-
import type {
|
|
8
|
-
import type {
|
|
9
|
-
import
|
|
10
|
-
import { type
|
|
5
|
+
import type { HistoryExportPort } from "../delivery/history-export.js";
|
|
6
|
+
import type { EventStore } from "../delivery/operations.js";
|
|
7
|
+
import type { HarnessMcpOperations } from "../endpoint/mcp/index.js";
|
|
8
|
+
import type { EndpointStore } from "../store/index.js";
|
|
9
|
+
import type { DaemonBootstrap } from "./bootstrap.js";
|
|
10
|
+
import { type DaemonActivationPreparation, type DaemonRuntimeDependencies, DaemonRuntimeError } from "./activation/index.js";
|
|
11
|
+
import { type RuntimeSubscriptionHandler } from "./supervision.js";
|
|
11
12
|
interface DaemonControllerInput {
|
|
12
13
|
readonly store: EndpointStore;
|
|
13
14
|
readonly bootstrap: DaemonBootstrap;
|
|
@@ -18,6 +19,7 @@ interface DaemonControllerInput {
|
|
|
18
19
|
/** Controller operations consumed by the daemon composition root. */
|
|
19
20
|
export interface DaemonController {
|
|
20
21
|
readonly operations: HarnessMcpOperations;
|
|
22
|
+
readonly eventStore: EventStore;
|
|
21
23
|
readonly subscriptionChanged: (active: boolean) => void;
|
|
22
24
|
readonly installHandler: (handler: RuntimeSubscriptionHandler) => Effect.Effect<void>;
|
|
23
25
|
readonly runSubscriptions: Effect.Effect<never, DaemonRuntimeError>;
|
|
@@ -29,6 +31,6 @@ export interface DaemonController {
|
|
|
29
31
|
* @param input Durable store, bootstrap configuration, and process dependencies.
|
|
30
32
|
* @returns Controller operations and supervised lifecycle effects.
|
|
31
33
|
*/
|
|
32
|
-
export declare const makeDaemonController: (input: DaemonControllerInput) => Effect.Effect<DaemonController,
|
|
34
|
+
export declare const makeDaemonController: (input: DaemonControllerInput) => Effect.Effect<DaemonController, DaemonRuntimeError, Registry | Router | Scope.Scope>;
|
|
33
35
|
export {};
|
|
34
36
|
//# sourceMappingURL=controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../src/service/controller.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAG7E,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAY,MAAM,EAAS,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC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iB,EAAE,CAC1B,KAAK,EAAE,2BAA2B,CAAC,cAAc,CAAC,KAC/C,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC;CAC9C;AAuID;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,UACxB,qBAAqB,KAC3B,MAAM,CAAC,MAAM,CACd,gBAAgB,EAChB,kBAAkB,EAClB,QAAQ,GAAG,MAAM,GAAG,KAAK,CAAC,KAAK,CAsCiB,CAAC"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/** @file MCP operations and subscription state for one daemon controller. */
|
|
2
|
+
import { Registry } from "@moltzap/identity/registry";
|
|
3
|
+
import { Router } from "@moltzap/router";
|
|
4
|
+
import { Deferred, Effect, Queue, Scope } from "effect";
|
|
5
|
+
import { makeHostDelivery } from "../delivery/index.js";
|
|
6
|
+
import { DaemonRuntimeError, finishRegistration, } from "./activation/index.js";
|
|
7
|
+
import { failFromBackgroundCause, initializeProtocol, publishPendingMessages, } from "./supervision.js";
|
|
8
|
+
const runtimeFailure = (phase) => new DaemonRuntimeError({ phase });
|
|
9
|
+
const activationRuntimeFailure = (error) => runtimeFailure(error.reason === "upstream" ? "listener" : "storage");
|
|
10
|
+
/**
|
|
11
|
+
* The register tool's closed reason for an activation failure: a local
|
|
12
|
+
* storage fault is persistence-failed; an upstream or representation fault
|
|
13
|
+
* is dependency-unavailable.
|
|
14
|
+
*/
|
|
15
|
+
const registerFailureReason = (reason) => {
|
|
16
|
+
switch (reason) {
|
|
17
|
+
case "persistence":
|
|
18
|
+
return "persistence-failed";
|
|
19
|
+
case "upstream":
|
|
20
|
+
case "representation":
|
|
21
|
+
return "dependency-unavailable";
|
|
22
|
+
default: {
|
|
23
|
+
const exhaustive = reason;
|
|
24
|
+
return exhaustive;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
const makeRegisterOperation = (environment, management, initialize) => (request) => Effect.uninterruptible(management.register(request).pipe(Effect.flatMap((result) => finishRegistration({
|
|
29
|
+
store: environment.store,
|
|
30
|
+
bootstrap: environment.bootstrap,
|
|
31
|
+
fatal: environment.fatal,
|
|
32
|
+
initialize,
|
|
33
|
+
}, result)), Effect.catchTag("DaemonActivationError", (error) => Effect.fail({ reason: registerFailureReason(error.reason) }))));
|
|
34
|
+
const runSubscriptionChanges = (environment, changes, reconciler) => Queue.take(changes).pipe(Effect.flatMap((active) => Effect.sync(() => {
|
|
35
|
+
environment.state.subscriptionActive = active;
|
|
36
|
+
}).pipe(Effect.zipRight(active ? Effect.void : environment.delivery.detach), Effect.zipRight(Effect.ignore(reconciler)))), Effect.forever, Effect.catchAllCause((cause) => failFromBackgroundCause(environment.fatal, cause)));
|
|
37
|
+
const initializeAtStart = (initialize, state) => {
|
|
38
|
+
if (state.kind === "unregistered") {
|
|
39
|
+
return Effect.void;
|
|
40
|
+
}
|
|
41
|
+
return initialize(state.agentCard).pipe(Effect.mapError(activationRuntimeFailure));
|
|
42
|
+
};
|
|
43
|
+
const controllerOperations = (input) => {
|
|
44
|
+
const register = makeRegisterOperation(input.environment, input.management, input.initialize);
|
|
45
|
+
return Object.freeze({
|
|
46
|
+
...input.management,
|
|
47
|
+
register,
|
|
48
|
+
...input.environment.delivery.operations,
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
const assembleDaemonController = (input) => ({
|
|
52
|
+
operations: controllerOperations(input),
|
|
53
|
+
eventStore: input.environment.delivery.eventStore,
|
|
54
|
+
subscriptionChanged: (active) => {
|
|
55
|
+
input.changes.unsafeOffer(active);
|
|
56
|
+
},
|
|
57
|
+
installHandler: (handler) => Effect.sync(() => {
|
|
58
|
+
input.environment.state.handler = handler;
|
|
59
|
+
input.changes.unsafeOffer(handler.hasActiveSubscription());
|
|
60
|
+
}),
|
|
61
|
+
runSubscriptions: runSubscriptionChanges(input.environment, input.changes, input.reconciler),
|
|
62
|
+
awaitFailure: Deferred.await(input.environment.fatal),
|
|
63
|
+
initializeAtStart: (state) => initializeAtStart(input.initialize, state),
|
|
64
|
+
});
|
|
65
|
+
/**
|
|
66
|
+
* Acquire the daemon's protocol controller without starting the MCP listener.
|
|
67
|
+
* @param input Durable store, bootstrap configuration, and process dependencies.
|
|
68
|
+
* @returns Controller operations and supervised lifecycle effects.
|
|
69
|
+
*/
|
|
70
|
+
export const makeDaemonController = (input) => Effect.gen(function* () {
|
|
71
|
+
const registry = yield* Registry;
|
|
72
|
+
const router = yield* Router;
|
|
73
|
+
const daemonScope = yield* Scope.Scope;
|
|
74
|
+
const activationGate = yield* Effect.makeSemaphore(1);
|
|
75
|
+
const changes = yield* Queue.unbounded();
|
|
76
|
+
const fatal = yield* Deferred.make();
|
|
77
|
+
const state = { subscriptionActive: false };
|
|
78
|
+
const delivery = yield* makeHostDelivery({
|
|
79
|
+
store: input.store,
|
|
80
|
+
historyExport: input.historyExport,
|
|
81
|
+
collectives: () => state.activeProtocol?.collectives,
|
|
82
|
+
scope: daemonScope,
|
|
83
|
+
}).pipe(Effect.mapError(() => runtimeFailure("storage")));
|
|
84
|
+
const environment = {
|
|
85
|
+
store: input.store,
|
|
86
|
+
bootstrap: input.bootstrap,
|
|
87
|
+
historyExport: input.historyExport,
|
|
88
|
+
dependencies: input.dependencies,
|
|
89
|
+
registry,
|
|
90
|
+
router,
|
|
91
|
+
daemonScope,
|
|
92
|
+
fatal,
|
|
93
|
+
state,
|
|
94
|
+
delivery,
|
|
95
|
+
};
|
|
96
|
+
const reconciler = publishPendingMessages(environment);
|
|
97
|
+
const initialize = (agentCard) => initializeProtocol(environment, activationGate, reconciler, agentCard);
|
|
98
|
+
return assembleDaemonController({
|
|
99
|
+
environment,
|
|
100
|
+
management: input.management,
|
|
101
|
+
changes,
|
|
102
|
+
reconciler,
|
|
103
|
+
initialize,
|
|
104
|
+
});
|
|
105
|
+
}).pipe(Effect.withSpan("makeDaemonController"));
|
|
106
|
+
//# sourceMappingURL=controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contro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