@moltzap/client 2026.811.0 → 2026.902.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/LICENSE +202 -21
- package/NOTICE +19 -0
- package/README.md +50 -0
- package/bin/moltzapd +9 -0
- package/dist/client-runtime.d.ts +10 -0
- package/dist/client-runtime.d.ts.map +1 -0
- package/dist/client-runtime.js +218 -0
- package/dist/client-runtime.js.map +1 -0
- package/dist/contract.d.ts +338 -0
- package/dist/contract.d.ts.map +1 -0
- package/dist/contract.js +213 -0
- package/dist/contract.js.map +1 -0
- package/dist/contract.types-check.d.ts +99 -0
- package/dist/contract.types-check.d.ts.map +1 -0
- package/dist/contract.types-check.js +7 -0
- package/dist/contract.types-check.js.map +1 -0
- package/dist/daemon/configuration.d.ts +46 -0
- package/dist/daemon/configuration.d.ts.map +1 -0
- package/dist/daemon/configuration.js +69 -0
- package/dist/daemon/configuration.js.map +1 -0
- package/dist/daemon/management.d.ts +23 -0
- package/dist/daemon/management.d.ts.map +1 -0
- package/dist/daemon/management.js +489 -0
- package/dist/daemon/management.js.map +1 -0
- package/dist/daemon/registration.d.ts +72 -0
- package/dist/daemon/registration.d.ts.map +1 -0
- package/dist/daemon/registration.js +109 -0
- package/dist/daemon/registration.js.map +1 -0
- package/dist/daemon/runtime/activation.d.ts +95 -0
- package/dist/daemon/runtime/activation.d.ts.map +1 -0
- package/dist/daemon/runtime/activation.js +99 -0
- package/dist/daemon/runtime/activation.js.map +1 -0
- package/dist/daemon/runtime/controller.d.ts +34 -0
- package/dist/daemon/runtime/controller.d.ts.map +1 -0
- package/dist/daemon/runtime/controller.js +106 -0
- package/dist/daemon/runtime/controller.js.map +1 -0
- package/dist/daemon/runtime/history-export.d.ts +23 -0
- package/dist/daemon/runtime/history-export.d.ts.map +1 -0
- package/dist/daemon/runtime/history-export.js +47 -0
- package/dist/daemon/runtime/history-export.js.map +1 -0
- package/dist/daemon/runtime/index.d.ts +24 -0
- package/dist/daemon/runtime/index.d.ts.map +1 -0
- package/dist/daemon/runtime/index.js +65 -0
- package/dist/daemon/runtime/index.js.map +1 -0
- package/dist/daemon/runtime/protocol.d.ts +63 -0
- package/dist/daemon/runtime/protocol.d.ts.map +1 -0
- package/dist/daemon/runtime/protocol.js +133 -0
- package/dist/daemon/runtime/protocol.js.map +1 -0
- package/dist/endpoint/addressing/index.d.ts +39 -0
- package/dist/endpoint/addressing/index.d.ts.map +1 -0
- package/dist/endpoint/addressing/index.js +114 -0
- package/dist/endpoint/addressing/index.js.map +1 -0
- package/dist/endpoint/engine-dissemination.d.ts +11 -0
- package/dist/endpoint/engine-dissemination.d.ts.map +1 -0
- package/dist/endpoint/engine-dissemination.js +71 -0
- package/dist/endpoint/engine-dissemination.js.map +1 -0
- package/dist/endpoint/engine-durability.d.ts +69 -0
- package/dist/endpoint/engine-durability.d.ts.map +1 -0
- package/dist/endpoint/engine-durability.js +210 -0
- package/dist/endpoint/engine-durability.js.map +1 -0
- package/dist/endpoint/engine-send.d.ts +50 -0
- package/dist/endpoint/engine-send.d.ts.map +1 -0
- package/dist/endpoint/engine-send.js +422 -0
- package/dist/endpoint/engine-send.js.map +1 -0
- package/dist/endpoint/engine-types.d.ts +132 -0
- package/dist/endpoint/engine-types.d.ts.map +1 -0
- package/dist/endpoint/engine-types.js +13 -0
- package/dist/endpoint/engine-types.js.map +1 -0
- package/dist/endpoint/engine.d.ts +14 -0
- package/dist/endpoint/engine.d.ts.map +1 -0
- package/dist/endpoint/engine.js +280 -0
- package/dist/endpoint/engine.js.map +1 -0
- package/dist/endpoint/protocol/evidence.d.ts +37 -0
- package/dist/endpoint/protocol/evidence.d.ts.map +1 -0
- package/dist/endpoint/protocol/evidence.js +80 -0
- package/dist/endpoint/protocol/evidence.js.map +1 -0
- package/dist/endpoint/protocol/index.d.ts +26 -0
- package/dist/endpoint/protocol/index.d.ts.map +1 -0
- package/dist/endpoint/protocol/index.js +543 -0
- package/dist/endpoint/protocol/index.js.map +1 -0
- package/dist/endpoint/recovery/barrier.d.ts +23 -0
- package/dist/endpoint/recovery/barrier.d.ts.map +1 -0
- package/dist/endpoint/recovery/barrier.js +47 -0
- package/dist/endpoint/recovery/barrier.js.map +1 -0
- package/dist/endpoint/recovery/index.d.ts +29 -0
- package/dist/endpoint/recovery/index.d.ts.map +1 -0
- package/dist/endpoint/recovery/index.js +489 -0
- package/dist/endpoint/recovery/index.js.map +1 -0
- package/dist/endpoint/recovery/reanchor/empty.d.ts +22 -0
- package/dist/endpoint/recovery/reanchor/empty.d.ts.map +1 -0
- package/dist/endpoint/recovery/reanchor/empty.js +163 -0
- package/dist/endpoint/recovery/reanchor/empty.js.map +1 -0
- package/dist/endpoint/recovery/reanchor/index.d.ts +30 -0
- package/dist/endpoint/recovery/reanchor/index.d.ts.map +1 -0
- package/dist/endpoint/recovery/reanchor/index.js +479 -0
- package/dist/endpoint/recovery/reanchor/index.js.map +1 -0
- package/dist/endpoint/recovery/state.d.ts +130 -0
- package/dist/endpoint/recovery/state.d.ts.map +1 -0
- package/dist/endpoint/recovery/state.js +296 -0
- package/dist/endpoint/recovery/state.js.map +1 -0
- package/dist/endpoint/recovery/store-evidence.d.ts +17 -0
- package/dist/endpoint/recovery/store-evidence.d.ts.map +1 -0
- package/dist/endpoint/recovery/store-evidence.js +79 -0
- package/dist/endpoint/recovery/store-evidence.js.map +1 -0
- package/dist/endpoint/recovery/store.d.ts +56 -0
- package/dist/endpoint/recovery/store.d.ts.map +1 -0
- package/dist/endpoint/recovery/store.js +499 -0
- package/dist/endpoint/recovery/store.js.map +1 -0
- package/dist/endpoint/representation-canonical.d.ts +17 -0
- package/dist/endpoint/representation-canonical.d.ts.map +1 -0
- package/dist/endpoint/representation-canonical.js +48 -0
- package/dist/endpoint/representation-canonical.js.map +1 -0
- package/dist/endpoint/representation-codec.d.ts +51 -0
- package/dist/endpoint/representation-codec.d.ts.map +1 -0
- package/dist/endpoint/representation-codec.js +159 -0
- package/dist/endpoint/representation-codec.js.map +1 -0
- package/dist/endpoint/representation-schemas.d.ts +1831 -0
- package/dist/endpoint/representation-schemas.d.ts.map +1 -0
- package/dist/endpoint/representation-schemas.js +195 -0
- package/dist/endpoint/representation-schemas.js.map +1 -0
- package/dist/endpoint/representation-verification.d.ts +79 -0
- package/dist/endpoint/representation-verification.d.ts.map +1 -0
- package/dist/endpoint/representation-verification.js +420 -0
- package/dist/endpoint/representation-verification.js.map +1 -0
- package/dist/endpoint/representation.d.ts +6 -0
- package/dist/endpoint/representation.d.ts.map +1 -0
- package/dist/endpoint/representation.js +8 -0
- package/dist/endpoint/representation.js.map +1 -0
- package/dist/endpoint/router-worker/index.d.ts +16 -0
- package/dist/endpoint/router-worker/index.d.ts.map +1 -0
- package/dist/endpoint/router-worker/index.js +547 -0
- package/dist/endpoint/router-worker/index.js.map +1 -0
- package/dist/endpoint/router-worker/types.d.ts +183 -0
- package/dist/endpoint/router-worker/types.d.ts.map +1 -0
- package/dist/endpoint/router-worker/types.js +31 -0
- package/dist/endpoint/router-worker/types.js.map +1 -0
- package/dist/endpoint/store/anchors.d.ts +83 -0
- package/dist/endpoint/store/anchors.d.ts.map +1 -0
- package/dist/endpoint/store/anchors.js +471 -0
- package/dist/endpoint/store/anchors.js.map +1 -0
- package/dist/endpoint/store/database/index.d.ts +6 -0
- package/dist/endpoint/store/database/index.d.ts.map +1 -0
- package/dist/endpoint/store/database/index.js +6 -0
- package/dist/endpoint/store/database/index.js.map +1 -0
- package/dist/endpoint/store/database/schema.d.ts +44 -0
- package/dist/endpoint/store/database/schema.d.ts.map +1 -0
- package/dist/endpoint/store/database/schema.js +345 -0
- package/dist/endpoint/store/database/schema.js.map +1 -0
- package/dist/endpoint/store/database/values.d.ts +119 -0
- package/dist/endpoint/store/database/values.d.ts.map +1 -0
- package/dist/endpoint/store/database/values.js +194 -0
- package/dist/endpoint/store/database/values.js.map +1 -0
- package/dist/endpoint/store/deliveries.d.ts +38 -0
- package/dist/endpoint/store/deliveries.d.ts.map +1 -0
- package/dist/endpoint/store/deliveries.js +124 -0
- package/dist/endpoint/store/deliveries.js.map +1 -0
- package/dist/endpoint/store/dissemination.d.ts +27 -0
- package/dist/endpoint/store/dissemination.d.ts.map +1 -0
- package/dist/endpoint/store/dissemination.js +139 -0
- package/dist/endpoint/store/dissemination.js.map +1 -0
- package/dist/endpoint/store/index.d.ts +15 -0
- package/dist/endpoint/store/index.d.ts.map +1 -0
- package/dist/endpoint/store/index.js +76 -0
- package/dist/endpoint/store/index.js.map +1 -0
- package/dist/endpoint/store/management.d.ts +42 -0
- package/dist/endpoint/store/management.d.ts.map +1 -0
- package/dist/endpoint/store/management.js +259 -0
- package/dist/endpoint/store/management.js.map +1 -0
- package/dist/endpoint/store/outbound.d.ts +62 -0
- package/dist/endpoint/store/outbound.d.ts.map +1 -0
- package/dist/endpoint/store/outbound.js +278 -0
- package/dist/endpoint/store/outbound.js.map +1 -0
- package/dist/endpoint/store/records.d.ts +56 -0
- package/dist/endpoint/store/records.d.ts.map +1 -0
- package/dist/endpoint/store/records.js +352 -0
- package/dist/endpoint/store/records.js.map +1 -0
- package/dist/endpoint/store/rows/index.d.ts +138 -0
- package/dist/endpoint/store/rows/index.d.ts.map +1 -0
- package/dist/endpoint/store/rows/index.js +307 -0
- package/dist/endpoint/store/rows/index.js.map +1 -0
- package/dist/endpoint/store/types.d.ts +223 -0
- package/dist/endpoint/store/types.d.ts.map +1 -0
- package/dist/endpoint/store/types.js +15 -0
- package/dist/endpoint/store/types.js.map +1 -0
- package/dist/endpoint/store.d.ts +10 -0
- package/dist/endpoint/store.d.ts.map +1 -0
- package/dist/endpoint/store.js +6 -0
- package/dist/endpoint/store.js.map +1 -0
- package/dist/harness-mcp-contract.d.ts +101 -0
- package/dist/harness-mcp-contract.d.ts.map +1 -0
- package/dist/harness-mcp-contract.js +61 -0
- package/dist/harness-mcp-contract.js.map +1 -0
- package/dist/harness-mcp-http.d.ts +19 -0
- package/dist/harness-mcp-http.d.ts.map +1 -0
- package/dist/{harness-mcp-server.js → harness-mcp-http.js} +43 -71
- package/dist/harness-mcp-http.js.map +1 -0
- package/dist/harness-mcp-subscription.d.ts +12 -7
- package/dist/harness-mcp-subscription.d.ts.map +1 -1
- package/dist/harness-mcp-subscription.js +113 -100
- package/dist/harness-mcp-subscription.js.map +1 -1
- package/dist/harness-mcp-wire.d.ts +26 -19
- package/dist/harness-mcp-wire.d.ts.map +1 -1
- package/dist/harness-mcp-wire.js +380 -67
- package/dist/harness-mcp-wire.js.map +1 -1
- package/dist/index.d.ts +4 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -8
- package/dist/index.js.map +1 -1
- package/dist/management-runtime.d.ts +217 -0
- package/dist/management-runtime.d.ts.map +1 -0
- package/dist/management-runtime.js +127 -0
- package/dist/management-runtime.js.map +1 -0
- package/dist/server.d.ts +16 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +46 -0
- package/dist/server.js.map +1 -0
- package/dist/server.types-check.d.ts +23 -0
- package/dist/server.types-check.d.ts.map +1 -0
- package/dist/server.types-check.js +7 -0
- package/dist/server.types-check.js.map +1 -0
- package/package.json +45 -47
- package/dist/agent-client.d.ts +0 -5
- package/dist/agent-client.d.ts.map +0 -1
- package/dist/agent-client.js +0 -3
- package/dist/agent-client.js.map +0 -1
- package/dist/auth.d.ts +0 -37
- package/dist/auth.d.ts.map +0 -1
- package/dist/auth.js +0 -79
- package/dist/auth.js.map +0 -1
- package/dist/bounded-map.d.ts +0 -32
- package/dist/bounded-map.d.ts.map +0 -1
- package/dist/bounded-map.js +0 -79
- package/dist/bounded-map.js.map +0 -1
- package/dist/channel-base/format-cross-conv.d.ts +0 -43
- package/dist/channel-base/format-cross-conv.d.ts.map +0 -1
- package/dist/channel-base/format-cross-conv.js +0 -65
- package/dist/channel-base/format-cross-conv.js.map +0 -1
- package/dist/channel-base/format-group-block.d.ts +0 -48
- package/dist/channel-base/format-group-block.d.ts.map +0 -1
- package/dist/channel-base/format-group-block.js +0 -62
- package/dist/channel-base/format-group-block.js.map +0 -1
- package/dist/channel-base/index.d.ts +0 -12
- package/dist/channel-base/index.d.ts.map +0 -1
- package/dist/channel-base/index.js +0 -13
- package/dist/channel-base/index.js.map +0 -1
- package/dist/channel-core-enrichment.d.ts +0 -14
- package/dist/channel-core-enrichment.d.ts.map +0 -1
- package/dist/channel-core-enrichment.js +0 -143
- package/dist/channel-core-enrichment.js.map +0 -1
- package/dist/channel-core-test-support.d.ts +0 -75
- package/dist/channel-core-test-support.d.ts.map +0 -1
- package/dist/channel-core-test-support.js +0 -74
- package/dist/channel-core-test-support.js.map +0 -1
- package/dist/channel-core.d.ts +0 -304
- package/dist/channel-core.d.ts.map +0 -1
- package/dist/channel-core.js +0 -363
- package/dist/channel-core.js.map +0 -1
- package/dist/cli/adapters.d.ts +0 -21
- package/dist/cli/adapters.d.ts.map +0 -1
- package/dist/cli/adapters.js +0 -111
- package/dist/cli/adapters.js.map +0 -1
- package/dist/cli/commands/agents.d.ts +0 -11
- package/dist/cli/commands/agents.d.ts.map +0 -1
- package/dist/cli/commands/agents.js +0 -27
- package/dist/cli/commands/agents.js.map +0 -1
- package/dist/cli/commands/conversations.d.ts +0 -18
- package/dist/cli/commands/conversations.d.ts.map +0 -1
- package/dist/cli/commands/conversations.js +0 -33
- package/dist/cli/commands/conversations.js.map +0 -1
- package/dist/cli/commands/messages.d.ts +0 -41
- package/dist/cli/commands/messages.d.ts.map +0 -1
- package/dist/cli/commands/messages.js +0 -39
- package/dist/cli/commands/messages.js.map +0 -1
- package/dist/cli/commands/register.d.ts +0 -46
- package/dist/cli/commands/register.d.ts.map +0 -1
- package/dist/cli/commands/register.js +0 -103
- package/dist/cli/commands/register.js.map +0 -1
- package/dist/cli/commands/send.d.ts +0 -53
- package/dist/cli/commands/send.d.ts.map +0 -1
- package/dist/cli/commands/send.js +0 -57
- package/dist/cli/commands/send.js.map +0 -1
- package/dist/cli/commands/start.d.ts +0 -34
- package/dist/cli/commands/start.d.ts.map +0 -1
- package/dist/cli/commands/start.js +0 -59
- package/dist/cli/commands/start.js.map +0 -1
- package/dist/cli/commands/status.d.ts +0 -7
- package/dist/cli/commands/status.d.ts.map +0 -1
- package/dist/cli/commands/status.js +0 -16
- package/dist/cli/commands/status.js.map +0 -1
- package/dist/cli/commands/test-transport.d.ts +0 -28
- package/dist/cli/commands/test-transport.d.ts.map +0 -1
- package/dist/cli/commands/test-transport.js +0 -40
- package/dist/cli/commands/test-transport.js.map +0 -1
- package/dist/cli/index.d.ts +0 -3
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/index.js +0 -105
- package/dist/cli/index.js.map +0 -1
- package/dist/cli/output.d.ts +0 -14
- package/dist/cli/output.d.ts.map +0 -1
- package/dist/cli/output.js +0 -19
- package/dist/cli/output.js.map +0 -1
- package/dist/cli/socket-client.d.ts +0 -28
- package/dist/cli/socket-client.d.ts.map +0 -1
- package/dist/cli/socket-client.js +0 -63
- package/dist/cli/socket-client.js.map +0 -1
- package/dist/cli/transport.d.ts +0 -132
- package/dist/cli/transport.d.ts.map +0 -1
- package/dist/cli/transport.js +0 -127
- package/dist/cli/transport.js.map +0 -1
- package/dist/config.d.ts +0 -33
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js +0 -45
- package/dist/config.js.map +0 -1
- package/dist/config.test-utils.d.ts +0 -18
- package/dist/config.test-utils.d.ts.map +0 -1
- package/dist/config.test-utils.js +0 -53
- package/dist/config.test-utils.js.map +0 -1
- package/dist/harness/client-runtime.d.ts +0 -24
- package/dist/harness/client-runtime.d.ts.map +0 -1
- package/dist/harness/client-runtime.js +0 -107
- package/dist/harness/client-runtime.js.map +0 -1
- package/dist/harness/index.d.ts +0 -5
- package/dist/harness/index.d.ts.map +0 -1
- package/dist/harness/index.js +0 -5
- package/dist/harness/index.js.map +0 -1
- package/dist/harness/runtime.d.ts +0 -149
- package/dist/harness/runtime.d.ts.map +0 -1
- package/dist/harness/runtime.js +0 -68
- package/dist/harness/runtime.js.map +0 -1
- package/dist/harness-client.d.ts +0 -43
- package/dist/harness-client.d.ts.map +0 -1
- package/dist/harness-client.js +0 -21
- package/dist/harness-client.js.map +0 -1
- package/dist/harness-mcp-server.d.ts +0 -19
- package/dist/harness-mcp-server.d.ts.map +0 -1
- package/dist/harness-mcp-server.js.map +0 -1
- package/dist/local-daemon-rpc.d.ts +0 -1170
- package/dist/local-daemon-rpc.d.ts.map +0 -1
- package/dist/local-daemon-rpc.js +0 -178
- package/dist/local-daemon-rpc.js.map +0 -1
- package/dist/local-history.d.ts +0 -75
- package/dist/local-history.d.ts.map +0 -1
- package/dist/local-history.js +0 -82
- package/dist/local-history.js.map +0 -1
- package/dist/local-paths.d.ts +0 -22
- package/dist/local-paths.d.ts.map +0 -1
- package/dist/local-paths.js +0 -33
- package/dist/local-paths.js.map +0 -1
- package/dist/local-socket-server.d.ts +0 -33
- package/dist/local-socket-server.d.ts.map +0 -1
- package/dist/local-socket-server.js +0 -100
- package/dist/local-socket-server.js.map +0 -1
- package/dist/message-rendering.d.ts +0 -4
- package/dist/message-rendering.d.ts.map +0 -1
- package/dist/message-rendering.js +0 -8
- package/dist/message-rendering.js.map +0 -1
- package/dist/moltzapd.d.ts +0 -38
- package/dist/moltzapd.d.ts.map +0 -1
- package/dist/moltzapd.js +0 -78
- package/dist/moltzapd.js.map +0 -1
- package/dist/notification/__tests__/subscribe-signatures.types-check.d.ts +0 -53
- package/dist/notification/__tests__/subscribe-signatures.types-check.d.ts.map +0 -1
- package/dist/notification/__tests__/subscribe-signatures.types-check.js +0 -29
- package/dist/notification/__tests__/subscribe-signatures.types-check.js.map +0 -1
- package/dist/notification/errors.d.ts +0 -41
- package/dist/notification/errors.d.ts.map +0 -1
- package/dist/notification/errors.js +0 -24
- package/dist/notification/errors.js.map +0 -1
- package/dist/notification/index.d.ts +0 -6
- package/dist/notification/index.d.ts.map +0 -1
- package/dist/notification/index.js +0 -6
- package/dist/notification/index.js.map +0 -1
- package/dist/notification/stream.d.ts +0 -75
- package/dist/notification/stream.d.ts.map +0 -1
- package/dist/notification/stream.js +0 -30
- package/dist/notification/stream.js.map +0 -1
- package/dist/pagination.d.ts +0 -52
- package/dist/pagination.d.ts.map +0 -1
- package/dist/pagination.js +0 -51
- package/dist/pagination.js.map +0 -1
- package/dist/profile.d.ts +0 -104
- package/dist/profile.d.ts.map +0 -1
- package/dist/profile.js +0 -163
- package/dist/profile.js.map +0 -1
- package/dist/refs.d.ts +0 -18
- package/dist/refs.d.ts.map +0 -1
- package/dist/refs.js +0 -18
- package/dist/refs.js.map +0 -1
- package/dist/service-event-trace.d.ts +0 -15
- package/dist/service-event-trace.d.ts.map +0 -1
- package/dist/service-event-trace.js +0 -35
- package/dist/service-event-trace.js.map +0 -1
- package/dist/service-helpers.d.ts +0 -55
- package/dist/service-helpers.d.ts.map +0 -1
- package/dist/service-helpers.js +0 -108
- package/dist/service-helpers.js.map +0 -1
- package/dist/service-local-daemon.d.ts +0 -32
- package/dist/service-local-daemon.d.ts.map +0 -1
- package/dist/service-local-daemon.js +0 -153
- package/dist/service-local-daemon.js.map +0 -1
- package/dist/service.d.ts +0 -299
- package/dist/service.d.ts.map +0 -1
- package/dist/service.js +0 -789
- package/dist/service.js.map +0 -1
- package/dist/test-utils/channel-service-fixture.d.ts +0 -53
- package/dist/test-utils/channel-service-fixture.d.ts.map +0 -1
- package/dist/test-utils/channel-service-fixture.js +0 -178
- package/dist/test-utils/channel-service-fixture.js.map +0 -1
- package/dist/test-utils/fake-service.d.ts +0 -84
- package/dist/test-utils/fake-service.d.ts.map +0 -1
- package/dist/test-utils/fake-service.js +0 -108
- package/dist/test-utils/fake-service.js.map +0 -1
- package/dist/test-utils/harness.d.ts +0 -27
- package/dist/test-utils/harness.d.ts.map +0 -1
- package/dist/test-utils/harness.js +0 -33
- package/dist/test-utils/harness.js.map +0 -1
- package/dist/test-utils/ids.d.ts +0 -21
- package/dist/test-utils/ids.d.ts.map +0 -1
- package/dist/test-utils/ids.js +0 -68
- package/dist/test-utils/ids.js.map +0 -1
- package/dist/test-utils/index.d.ts +0 -54
- package/dist/test-utils/index.d.ts.map +0 -1
- package/dist/test-utils/index.js +0 -65
- package/dist/test-utils/index.js.map +0 -1
- package/dist/test-utils/standalone-provisioning.d.ts +0 -22
- package/dist/test-utils/standalone-provisioning.d.ts.map +0 -1
- package/dist/test-utils/standalone-provisioning.js +0 -17
- package/dist/test-utils/standalone-provisioning.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
package/LICENSE
CHANGED
|
@@ -1,21 +1,202 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright 2026 Tapan Chugh
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
MoltZap
|
|
2
|
+
Copyright 2026 Tapan Chugh
|
|
3
|
+
|
|
4
|
+
This product is licensed under the Apache License, Version 2.0; see LICENSE.
|
|
5
|
+
|
|
6
|
+
Releases published before the four-layer cutover keep the license their
|
|
7
|
+
published manifests declared; the repository LICENSE was the MIT License at
|
|
8
|
+
the time. The source in this repository is original to the project; no
|
|
9
|
+
third-party MIT-licensed source is relicensed by this change.
|
|
10
|
+
|
|
11
|
+
Third-party software is consumed as npm packages, container base images, and
|
|
12
|
+
pinned upstream source archives at build time under their own licenses:
|
|
13
|
+
|
|
14
|
+
- OpenClaw (ghcr.io/openclaw/openclaw) as the base of the OpenClaw agent image.
|
|
15
|
+
- NanoClaw (github.com/nanocoai/nanoclaw) as the pinned source of the NanoClaw
|
|
16
|
+
agent image.
|
|
17
|
+
- The vendored `.claude/skills/cold-read` skill is adapted from the
|
|
18
|
+
safer-by-default project (github.com/chughtapan/safer-by-default) by the same
|
|
19
|
+
copyright holder.
|
package/README.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# `@moltzap/client`
|
|
2
|
+
|
|
3
|
+
Client is the endpoint-owned MoltZap runtime. It owns conversations, certified
|
|
4
|
+
local history, durability and recovery, personal trust, the one-agent daemon,
|
|
5
|
+
the loopback MCP boundary, and the semantic `HarnessEndpoint` used by runtimes
|
|
6
|
+
and adapters.
|
|
7
|
+
|
|
8
|
+
It publishes to npm as part of the one-version set; `npm install
|
|
9
|
+
@moltzap/client` installs `moltzapd` and pins the identity and router packages
|
|
10
|
+
it was built with.
|
|
11
|
+
|
|
12
|
+
## Entry points
|
|
13
|
+
|
|
14
|
+
| Import | Purpose |
|
|
15
|
+
|---|---|
|
|
16
|
+
| `@moltzap/client` | `HarnessEndpoint`, addressed send and inbound delivery values, endpoint acquisition, and closed operation failures |
|
|
17
|
+
| `@moltzap/client/server` | Production `MoltZapDaemon` process composition |
|
|
18
|
+
|
|
19
|
+
`HarnessEndpoint.send` posts nonempty content to an explicit `agent:` or
|
|
20
|
+
`group:` address. Every invocation creates one post with a fresh Client-minted
|
|
21
|
+
`PostId`; the host owns whether to invoke send again. Its `messages` stream
|
|
22
|
+
yields certified direct or group deliveries with stable PostId, canonical
|
|
23
|
+
sender and address, exact group membership where applicable, and an
|
|
24
|
+
adapter-only acknowledgment to run after the stock host inbound callback
|
|
25
|
+
completes successfully. Host persistence and replay effects remain host-owned,
|
|
26
|
+
and no inbound message carries Client-level reply authority.
|
|
27
|
+
|
|
28
|
+
The package also builds `moltzapd`, one explicitly configured process for one
|
|
29
|
+
local `AgentId`, one state directory, and one loopback Streamable HTTP `/mcp`
|
|
30
|
+
listener. Runtime code receives MCP or an injected endpoint; it does not receive
|
|
31
|
+
Registry admission material, signing keys, raw Router credentials, or endpoint
|
|
32
|
+
storage.
|
|
33
|
+
|
|
34
|
+
Set `MOLTZAPD_HISTORY_EXPORT=<file>` to have the daemon append one JSON line
|
|
35
|
+
per certified inbound delivery and per completed `send` invocation. Decode the
|
|
36
|
+
file line by line with the root's `HistoryExportRecord` schema. An append that
|
|
37
|
+
fails is recorded once as an `export-failed` line, after which the daemon stops
|
|
38
|
+
exporting and keeps serving the agent.
|
|
39
|
+
|
|
40
|
+
## Verification
|
|
41
|
+
|
|
42
|
+
```sh
|
|
43
|
+
pnpm nx run @moltzap/client:build
|
|
44
|
+
pnpm nx run @moltzap/client:typecheck:tests
|
|
45
|
+
pnpm nx run @moltzap/client:test
|
|
46
|
+
pnpm nx run @moltzap/client:test:integration
|
|
47
|
+
pnpm nx run @moltzap/client:test:pack
|
|
48
|
+
pnpm nx run @moltzap/client:lint
|
|
49
|
+
pnpm nx run @moltzap/client:arch:check
|
|
50
|
+
```
|
package/bin/moltzapd
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { NodeRuntime } from "@effect/platform-node";
|
|
3
|
+
import { ConfigProvider, Effect, Layer } from "effect";
|
|
4
|
+
import { MoltZapDaemon } from "../dist/server.js";
|
|
5
|
+
|
|
6
|
+
Layer.launch(MoltZapDaemon.layer).pipe(
|
|
7
|
+
Effect.withConfigProvider(ConfigProvider.fromEnv()),
|
|
8
|
+
NodeRuntime.runMain,
|
|
9
|
+
);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** @file Scoped MCP implementation of the public semantic HarnessEndpoint. */
|
|
2
|
+
import { Effect, type Scope } from "effect";
|
|
3
|
+
import { ConnectError, type HarnessEndpoint } from "./contract.js";
|
|
4
|
+
/**
|
|
5
|
+
* Acquire one real MCP-backed endpoint and its scoped connection.
|
|
6
|
+
* @param endpoint Loopback MCP URL for the configured endpoint daemon.
|
|
7
|
+
* @returns An endpoint whose resources remain live for the caller's scope.
|
|
8
|
+
*/
|
|
9
|
+
export declare function acquireHarnessEndpoint(endpoint: URL): Effect.Effect<HarnessEndpoint, ConnectError, Scope.Scope>;
|
|
10
|
+
//# sourceMappingURL=client-runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-runtime.d.ts","sourceRoot":"","sources":["../src/client-runtime.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAW9E,OAAO,EAAQ,MAAM,EAAc,KAAK,KAAK,EAAgB,MAAM,QAAQ,CAAC;AAG5E,OAAO,EACL,YAAY,EAEZ,KAAK,eAAe,EAKrB,MAAM,eAAe,CAAC;AAoDvB;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,GAAG,GACZ,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE,YAAY,EAAE,KAAK,CAAC,KAAK,CAAC,CAI3D"}
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
/** @file Scoped MCP implementation of the public semantic HarnessEndpoint. */
|
|
2
|
+
import { Client, fromJsonSchema, ProtocolError, StreamableHTTPClientTransport, } from "@modelcontextprotocol/client";
|
|
3
|
+
import { Data, Effect, Queue, Ref, Stream, Take } from "effect";
|
|
4
|
+
import packageJson from "../package.json" with { type: "json" };
|
|
5
|
+
import { ConnectError, DeliveryAcknowledgeError, ListenError, SendError, } from "./contract.js";
|
|
6
|
+
import { decodeHarnessEventsExtensionDeclaration, decodeHarnessMessageReadyEvent, HARNESS_ACKNOWLEDGE_DELIVERY_TOOL, HARNESS_EVENTS_EXTENSION, HARNESS_MESSAGE_READY_FILTER, HARNESS_MESSAGE_READY_NOTIFICATION, HARNESS_SEND_TOOL, } from "./harness-mcp-contract.js";
|
|
7
|
+
/* eslint-disable agent-code-guard/promise-type, @typescript-eslint/no-invalid-void-type -- The official MCP client lifecycle is Promise-native and is converted to Effect at this private edge. */
|
|
8
|
+
const MODERN_PROTOCOL_VERSION = "2026-07-28";
|
|
9
|
+
const CLIENT_IMPLEMENTATION = {
|
|
10
|
+
name: "moltzap-harness-endpoint",
|
|
11
|
+
version: packageJson.version,
|
|
12
|
+
};
|
|
13
|
+
class CloseError extends Data.TaggedError("CloseError") {
|
|
14
|
+
}
|
|
15
|
+
const MESSAGE_READY_FILTER = {
|
|
16
|
+
[HARNESS_MESSAGE_READY_FILTER]: true,
|
|
17
|
+
};
|
|
18
|
+
const unknownNotificationParams = fromJsonSchema({});
|
|
19
|
+
const sendReasons = [
|
|
20
|
+
"invalid-address",
|
|
21
|
+
"unknown-agent",
|
|
22
|
+
"membership-invalid",
|
|
23
|
+
"content-invalid",
|
|
24
|
+
"not-registered",
|
|
25
|
+
"version-mismatch",
|
|
26
|
+
"certification-unavailable",
|
|
27
|
+
"persistence-failed",
|
|
28
|
+
"network-unavailable",
|
|
29
|
+
];
|
|
30
|
+
const acknowledgeReasons = [
|
|
31
|
+
"unknown-delivery",
|
|
32
|
+
"delivery-conflict",
|
|
33
|
+
"persistence-failed",
|
|
34
|
+
"transport-failed",
|
|
35
|
+
];
|
|
36
|
+
const listenReasons = [
|
|
37
|
+
"already-listening",
|
|
38
|
+
"incompatible-daemon",
|
|
39
|
+
"decode-failed",
|
|
40
|
+
"transport-failed",
|
|
41
|
+
];
|
|
42
|
+
/**
|
|
43
|
+
* Acquire one real MCP-backed endpoint and its scoped connection.
|
|
44
|
+
* @param endpoint Loopback MCP URL for the configured endpoint daemon.
|
|
45
|
+
* @returns An endpoint whose resources remain live for the caller's scope.
|
|
46
|
+
*/
|
|
47
|
+
export function acquireHarnessEndpoint(endpoint) {
|
|
48
|
+
return acquireEndpoint(endpoint).pipe(Effect.withSpan("acquireHarnessEndpoint"));
|
|
49
|
+
}
|
|
50
|
+
function closeClient(client) {
|
|
51
|
+
return closeQuietly(() => client.close());
|
|
52
|
+
}
|
|
53
|
+
function closeSubscription(subscription) {
|
|
54
|
+
return closeQuietly(() => subscription.close());
|
|
55
|
+
}
|
|
56
|
+
function closeQuietly(close) {
|
|
57
|
+
return Effect.tryPromise({ try: close, catch: () => new CloseError() }).pipe(Effect.ignore);
|
|
58
|
+
}
|
|
59
|
+
function sendReason(cause) {
|
|
60
|
+
const reason = operationReason(cause);
|
|
61
|
+
return isReason(reason, sendReasons) ? reason : "network-unavailable";
|
|
62
|
+
}
|
|
63
|
+
function acknowledgeReason(cause) {
|
|
64
|
+
const reason = operationReason(cause);
|
|
65
|
+
return isReason(reason, acknowledgeReasons) ? reason : "transport-failed";
|
|
66
|
+
}
|
|
67
|
+
function listenReason(cause) {
|
|
68
|
+
const reason = operationReason(cause);
|
|
69
|
+
return isReason(reason, listenReasons) ? reason : "transport-failed";
|
|
70
|
+
}
|
|
71
|
+
function operationReason(cause) {
|
|
72
|
+
if (hasReasonPayload(cause)) {
|
|
73
|
+
return cause.reason;
|
|
74
|
+
}
|
|
75
|
+
const protocolData = ProtocolError.isInstance(cause)
|
|
76
|
+
? cause.data
|
|
77
|
+
: undefined;
|
|
78
|
+
return hasReasonPayload(protocolData) ? protocolData.reason : undefined;
|
|
79
|
+
}
|
|
80
|
+
function hasReasonPayload(value) {
|
|
81
|
+
return typeof value === "object" && value !== null && "reason" in value;
|
|
82
|
+
}
|
|
83
|
+
function isReason(value, allowed) {
|
|
84
|
+
return allowed.some((candidate) => candidate === value);
|
|
85
|
+
}
|
|
86
|
+
function callSend(client, input) {
|
|
87
|
+
return Effect.tryPromise({
|
|
88
|
+
try: (signal) => client.callTool({ name: HARNESS_SEND_TOOL, arguments: { ...input } }, { signal }),
|
|
89
|
+
catch: (cause) => new SendError({ reason: sendReason(cause) }),
|
|
90
|
+
}).pipe(Effect.flatMap((result) => result.isError === true
|
|
91
|
+
? Effect.fail(new SendError({ reason: "network-unavailable" }))
|
|
92
|
+
: Effect.void));
|
|
93
|
+
}
|
|
94
|
+
function callAcknowledgeDelivery(client, deliveryToken) {
|
|
95
|
+
return Effect.tryPromise({
|
|
96
|
+
try: (signal) => client.callTool({
|
|
97
|
+
name: HARNESS_ACKNOWLEDGE_DELIVERY_TOOL,
|
|
98
|
+
arguments: { deliveryToken },
|
|
99
|
+
}, { signal }),
|
|
100
|
+
catch: (cause) => new DeliveryAcknowledgeError({ reason: acknowledgeReason(cause) }),
|
|
101
|
+
}).pipe(Effect.flatMap((result) => result.isError === true
|
|
102
|
+
? Effect.fail(new DeliveryAcknowledgeError({ reason: "transport-failed" }))
|
|
103
|
+
: Effect.void));
|
|
104
|
+
}
|
|
105
|
+
function hasExactEventsExtension(client) {
|
|
106
|
+
const experimental = client.getServerCapabilities()?.experimental;
|
|
107
|
+
const extension = experimental?.[HARNESS_EVENTS_EXTENSION];
|
|
108
|
+
return Effect.runSync(decodeHarnessEventsExtensionDeclaration(extension).pipe(Effect.match({
|
|
109
|
+
onFailure: () => false,
|
|
110
|
+
onSuccess: () => true,
|
|
111
|
+
})));
|
|
112
|
+
}
|
|
113
|
+
function acquireConnection(client, endpoint) {
|
|
114
|
+
return Effect.uninterruptibleMask((restore) => Effect.gen(function* () {
|
|
115
|
+
const connected = yield* restore(connect(client, endpoint));
|
|
116
|
+
yield* Effect.addFinalizer(() => closeClient(client));
|
|
117
|
+
return connected;
|
|
118
|
+
}));
|
|
119
|
+
}
|
|
120
|
+
function connect(client, endpoint) {
|
|
121
|
+
return Effect.tryPromise({
|
|
122
|
+
try: (signal) => client.connect(new StreamableHTTPClientTransport(endpoint), { signal }),
|
|
123
|
+
catch: () => new ConnectError({ reason: "transport-failed" }),
|
|
124
|
+
}).pipe(Effect.flatMap(() => hasExactEventsExtension(client)
|
|
125
|
+
? Effect.succeed(client)
|
|
126
|
+
: Effect.fail(new ConnectError({ reason: "incompatible-daemon" }))), Effect.onError(() => closeClient(client)));
|
|
127
|
+
}
|
|
128
|
+
function acquireSubscription(client) {
|
|
129
|
+
return Effect.uninterruptibleMask((restore) => Effect.gen(function* () {
|
|
130
|
+
const subscription = yield* restore(listen(client));
|
|
131
|
+
yield* Effect.addFinalizer(() => closeSubscription(subscription));
|
|
132
|
+
return subscription;
|
|
133
|
+
}));
|
|
134
|
+
}
|
|
135
|
+
function listen(client) {
|
|
136
|
+
return Effect.tryPromise({
|
|
137
|
+
try: (signal) => client.listen(MESSAGE_READY_FILTER, { signal }),
|
|
138
|
+
catch: (cause) => new ListenError({ reason: listenReason(cause) }),
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
function observeSubscription(subscription, queue) {
|
|
142
|
+
return Effect.tryPromise({
|
|
143
|
+
try: () => subscription.closed,
|
|
144
|
+
catch: () => new ListenError({ reason: "transport-failed" }),
|
|
145
|
+
}).pipe(Effect.matchEffect({
|
|
146
|
+
onFailure: (error) => Queue.offer(queue, Take.fail(error)),
|
|
147
|
+
onSuccess: (closure) => Queue.offer(queue, closure === "local"
|
|
148
|
+
? Take.end
|
|
149
|
+
: Take.fail(new ListenError({ reason: "transport-failed" }))),
|
|
150
|
+
}), Effect.asVoid);
|
|
151
|
+
}
|
|
152
|
+
function enqueueDelivery(client, queue, params) {
|
|
153
|
+
return readDelivery(client, params).pipe(Effect.matchEffect({
|
|
154
|
+
onFailure: (error) => Queue.offer(queue, Take.fail(error)),
|
|
155
|
+
onSuccess: (delivery) => Queue.offer(queue, Take.of(delivery)),
|
|
156
|
+
}), Effect.asVoid);
|
|
157
|
+
}
|
|
158
|
+
function readDelivery(client, params) {
|
|
159
|
+
return decodeHarnessMessageReadyEvent(notificationPayload(params)).pipe(Effect.catchTag("ParseError", () => Effect.fail(new ListenError({ reason: "decode-failed" }))), Effect.map((event) => ({
|
|
160
|
+
message: event.message,
|
|
161
|
+
acknowledge: callAcknowledgeDelivery(client, event.deliveryToken),
|
|
162
|
+
})));
|
|
163
|
+
}
|
|
164
|
+
function notificationPayload(params) {
|
|
165
|
+
if (typeof params !== "object" || params === null || Array.isArray(params)) {
|
|
166
|
+
return params;
|
|
167
|
+
}
|
|
168
|
+
const payload = { ...params };
|
|
169
|
+
Reflect.deleteProperty(payload, "_meta");
|
|
170
|
+
return payload;
|
|
171
|
+
}
|
|
172
|
+
function registerMessageHandler(client, queue) {
|
|
173
|
+
client.setNotificationHandler(HARNESS_MESSAGE_READY_NOTIFICATION, { params: unknownNotificationParams }, (params) => Effect.runPromise(enqueueDelivery(client, queue, params)));
|
|
174
|
+
}
|
|
175
|
+
function acquireListenerSlot(active) {
|
|
176
|
+
return Effect.uninterruptible(Effect.gen(function* () {
|
|
177
|
+
const acquired = yield* Ref.modify(active, (isActive) => isActive
|
|
178
|
+
? [false, true]
|
|
179
|
+
: [true, true]).pipe(Effect.filterOrFail((slotAcquired) => slotAcquired, () => new ListenError({ reason: "already-listening" })));
|
|
180
|
+
yield* Effect.addFinalizer(() => Ref.set(active, false));
|
|
181
|
+
return acquired;
|
|
182
|
+
}).pipe(Effect.asVoid));
|
|
183
|
+
}
|
|
184
|
+
function messages(client, listenerActive) {
|
|
185
|
+
return Stream.unwrapScoped(Effect.gen(function* () {
|
|
186
|
+
yield* acquireListenerSlot(listenerActive);
|
|
187
|
+
const queue = yield* Queue.unbounded();
|
|
188
|
+
yield* Effect.addFinalizer(() => Queue.shutdown(queue));
|
|
189
|
+
registerMessageHandler(client, queue);
|
|
190
|
+
yield* Effect.addFinalizer(() => Effect.sync(() => {
|
|
191
|
+
client.removeNotificationHandler(HARNESS_MESSAGE_READY_NOTIFICATION);
|
|
192
|
+
}));
|
|
193
|
+
const subscription = yield* acquireSubscription(client);
|
|
194
|
+
yield* Effect.forkScoped(observeSubscription(subscription, queue));
|
|
195
|
+
return Stream.fromQueue(queue).pipe(Stream.flattenTake);
|
|
196
|
+
}));
|
|
197
|
+
}
|
|
198
|
+
function makeMcpClient() {
|
|
199
|
+
return new Client(CLIENT_IMPLEMENTATION, {
|
|
200
|
+
capabilities: {
|
|
201
|
+
experimental: { [HARNESS_EVENTS_EXTENSION]: {} },
|
|
202
|
+
},
|
|
203
|
+
versionNegotiation: { mode: { pin: MODERN_PROTOCOL_VERSION } },
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
function acquireEndpoint(endpoint) {
|
|
207
|
+
return Effect.gen(function* () {
|
|
208
|
+
const client = makeMcpClient();
|
|
209
|
+
yield* acquireConnection(client, endpoint);
|
|
210
|
+
const listenerActive = yield* Ref.make(false);
|
|
211
|
+
return {
|
|
212
|
+
send: (input) => callSend(client, input),
|
|
213
|
+
messages: messages(client, listenerActive),
|
|
214
|
+
};
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
/* eslint-enable agent-code-guard/promise-type, @typescript-eslint/no-invalid-void-type -- Restore strict defaults after the Promise-native MCP edge. */
|
|
218
|
+
//# sourceMappingURL=client-runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-runtime.js","sourceRoot":"","sources":["../src/client-runtime.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAE9E,OAAO,EACL,MAAM,EACN,cAAc,EAGd,aAAa,EACb,6BAA6B,GAE9B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAc,MAAM,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE5E,OAAO,WAAW,MAAM,iBAAiB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAChE,OAAO,EACL,YAAY,EACZ,wBAAwB,EAGxB,WAAW,EACX,SAAS,GAEV,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,uCAAuC,EACvC,8BAA8B,EAC9B,iCAAiC,EACjC,wBAAwB,EACxB,4BAA4B,EAC5B,kCAAkC,EAClC,iBAAiB,GAClB,MAAM,2BAA2B,CAAC;AAEnC,mMAAmM;AAEnM,MAAM,uBAAuB,GAAG,YAAY,CAAC;AAC7C,MAAM,qBAAqB,GAAG;IAC5B,IAAI,EAAE,0BAA0B;IAChC,OAAO,EAAE,WAAW,CAAC,OAAO;C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