@moltzap/client 2026.803.0 → 2026.804.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.
Files changed (49) hide show
  1. package/dist/channel-base/index.d.ts +0 -2
  2. package/dist/channel-base/index.d.ts.map +1 -1
  3. package/dist/channel-base/index.js +0 -2
  4. package/dist/channel-base/index.js.map +1 -1
  5. package/dist/channel-core.d.ts +45 -19
  6. package/dist/channel-core.d.ts.map +1 -1
  7. package/dist/channel-core.js +45 -18
  8. package/dist/channel-core.js.map +1 -1
  9. package/dist/harness/client-runtime.d.ts +24 -0
  10. package/dist/harness/client-runtime.d.ts.map +1 -0
  11. package/dist/harness/client-runtime.js +107 -0
  12. package/dist/harness/client-runtime.js.map +1 -0
  13. package/dist/harness/index.d.ts +5 -0
  14. package/dist/harness/index.d.ts.map +1 -0
  15. package/dist/harness/index.js +5 -0
  16. package/dist/harness/index.js.map +1 -0
  17. package/dist/harness/runtime.d.ts +149 -0
  18. package/dist/harness/runtime.d.ts.map +1 -0
  19. package/dist/harness/runtime.js +68 -0
  20. package/dist/harness/runtime.js.map +1 -0
  21. package/dist/harness-client.d.ts +43 -0
  22. package/dist/harness-client.d.ts.map +1 -0
  23. package/dist/harness-client.js +21 -0
  24. package/dist/harness-client.js.map +1 -0
  25. package/dist/harness-mcp-server.d.ts.map +1 -1
  26. package/dist/harness-mcp-server.js +107 -17
  27. package/dist/harness-mcp-server.js.map +1 -1
  28. package/dist/harness-mcp-subscription.d.ts +21 -0
  29. package/dist/harness-mcp-subscription.d.ts.map +1 -0
  30. package/dist/harness-mcp-subscription.js +324 -0
  31. package/dist/harness-mcp-subscription.js.map +1 -0
  32. package/dist/harness-mcp-wire.d.ts +9 -2
  33. package/dist/harness-mcp-wire.d.ts.map +1 -1
  34. package/dist/harness-mcp-wire.js +41 -10
  35. package/dist/harness-mcp-wire.js.map +1 -1
  36. package/dist/index.d.ts +2 -0
  37. package/dist/index.d.ts.map +1 -1
  38. package/dist/index.js +2 -0
  39. package/dist/index.js.map +1 -1
  40. package/dist/moltzapd.d.ts +2 -1
  41. package/dist/moltzapd.d.ts.map +1 -1
  42. package/dist/moltzapd.js +19 -5
  43. package/dist/moltzapd.js.map +1 -1
  44. package/dist/tsconfig.tsbuildinfo +1 -1
  45. package/package.json +8 -4
  46. package/dist/channel-base/reply-guard.d.ts +0 -52
  47. package/dist/channel-base/reply-guard.d.ts.map +0 -1
  48. package/dist/channel-base/reply-guard.js +0 -78
  49. package/dist/channel-base/reply-guard.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moltzap/client",
3
- "version": "2026.803.0",
3
+ "version": "2026.804.0",
4
4
  "description": "MoltZap client service — connection, conversation state, and cross-conversation context",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -33,6 +33,10 @@
33
33
  "types": "./dist/auth.d.ts",
34
34
  "import": "./dist/auth.js"
35
35
  },
36
+ "./harness-client": {
37
+ "types": "./dist/harness-client.d.ts",
38
+ "import": "./dist/harness-client.js"
39
+ },
36
40
  "./pagination": {
37
41
  "types": "./dist/pagination.d.ts",
38
42
  "import": "./dist/pagination.js"
@@ -75,21 +79,21 @@
75
79
  "@effect/printer-ansi": "^0.50.0",
76
80
  "@effect/rpc": "^0.76.0",
77
81
  "@effect/typeclass": "^0.41.0",
82
+ "@modelcontextprotocol/client": "2.0.0-beta.5",
78
83
  "@modelcontextprotocol/node": "2.0.0-beta.5",
79
84
  "@modelcontextprotocol/server": "2.0.0-beta.5",
80
85
  "effect": "^3.22.0",
81
- "@moltzap/protocol": "2026.803.0"
86
+ "@moltzap/protocol": "2026.804.0"
82
87
  },
83
88
  "devDependencies": {
84
89
  "@effect/vitest": "^0.30.0",
85
- "@modelcontextprotocol/client": "2.0.0-beta.5",
86
90
  "@typescript/native": "npm:typescript@^7.0.2",
87
91
  "eslint": "^9",
88
92
  "fast-check": "^3.23.1",
89
93
  "tsx": "^4.19.0",
90
94
  "typescript": "npm:@typescript/typescript6@^6.0.2",
91
95
  "vitest": "^3.2.0",
92
- "@moltzap/server-core": "2026.803.0"
96
+ "@moltzap/server-core": "2026.804.0"
93
97
  },
94
98
  "scripts": {
95
99
  "build": "nx run @moltzap/client:build",
@@ -1,52 +0,0 @@
1
- /**
2
- * Channel-base `ReplyGuard` — per-turn single-shot duplicate-reply detection.
3
- *
4
- * One `ReplyGuard` instance per inbound turn (created inside the deliver
5
- * wrapper). This is the only enforcement of "one final reply per inbound
6
- * turn": the server accepts every well-formed send, so a runtime that
7
- * delivers twice would otherwise double-post.
8
- *
9
- * The send a guard protects is asynchronous, so a bare consumed check is a
10
- * race: two concurrent delivers can both observe "not consumed" before
11
- * either send completes. `begin()` therefore claims the guard in one
12
- * synchronous step BEFORE the send; `consume()` stamps after a successful
13
- * send; `abort()` reopens the guard after a failed send so a retried
14
- * deliver can still go through. A deliver arriving while another is
15
- * mid-send is a duplicate, not a queued retry.
16
- */
17
- import { Effect, Option } from "effect";
18
- /** Implements reply guard. */
19
- export declare class ReplyGuard {
20
- private consumedAtMillis;
21
- private inFlight;
22
- /**
23
- * Claim the guard for one send attempt. `true` exactly once per open
24
- * window: `false` when the guard is already consumed OR another send is
25
- * mid-flight. The claim is taken synchronously, so concurrent callers
26
- * cannot both win.
27
- * @returns Whether this caller owns the send attempt.
28
- */
29
- begin(): Effect.Effect<boolean>;
30
- /**
31
- * Reopen the guard after a failed send so a retried deliver can claim it
32
- * again. No-op when the guard is already consumed.
33
- * @returns Completion of the reopen.
34
- */
35
- abort(): Effect.Effect<void>;
36
- /**
37
- * Returns `true` on first call (transitions internal state from
38
- * "not-consumed" to "consumed-at-now") and releases any in-flight claim;
39
- * returns `false` on every later call. Reads `Clock.currentTimeMillis`
40
- * inside the Effect on first call.
41
- * @returns The ts result.
42
- */
43
- consume(): Effect.Effect<boolean>;
44
- /**
45
- * `Option.none` before the first `consume`; `Option.some(epochMs)` after,
46
- * where `epochMs` is the value Clock returned at the first-consume moment.
47
- * Idempotent on second-and-later reads.
48
- * @returns The consumed at result.
49
- */
50
- get consumedAt(): Effect.Effect<Option.Option<number>>;
51
- }
52
- //# sourceMappingURL=reply-guard.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reply-guard.d.ts","sourceRoot":"","sources":["../../src/channel-base/reply-guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAS,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE/C,8BAA8B;AAC9B,qBAAa,UAAU;IACrB,OAAO,CAAC,gBAAgB,CAAuB;IAC/C,OAAO,CAAC,QAAQ,CAAS;IAEzB;;;;;;OAMG;IACH,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAQ9B;IAED;;;;OAIG;IACH,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAI3B;IAED;;;;;;OAMG;IACH,OAAO,IAAI,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAYhC;IAED;;;;;OAKG;IACH,IAAI,UAAU,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAMrD;CACF"}
@@ -1,78 +0,0 @@
1
- /**
2
- * Channel-base `ReplyGuard` — per-turn single-shot duplicate-reply detection.
3
- *
4
- * One `ReplyGuard` instance per inbound turn (created inside the deliver
5
- * wrapper). This is the only enforcement of "one final reply per inbound
6
- * turn": the server accepts every well-formed send, so a runtime that
7
- * delivers twice would otherwise double-post.
8
- *
9
- * The send a guard protects is asynchronous, so a bare consumed check is a
10
- * race: two concurrent delivers can both observe "not consumed" before
11
- * either send completes. `begin()` therefore claims the guard in one
12
- * synchronous step BEFORE the send; `consume()` stamps after a successful
13
- * send; `abort()` reopens the guard after a failed send so a retried
14
- * deliver can still go through. A deliver arriving while another is
15
- * mid-send is a duplicate, not a queued retry.
16
- */
17
- import { Clock, Effect, Option } from "effect";
18
- /** Implements reply guard. */
19
- export class ReplyGuard {
20
- consumedAtMillis = null;
21
- inFlight = false;
22
- /**
23
- * Claim the guard for one send attempt. `true` exactly once per open
24
- * window: `false` when the guard is already consumed OR another send is
25
- * mid-flight. The claim is taken synchronously, so concurrent callers
26
- * cannot both win.
27
- * @returns Whether this caller owns the send attempt.
28
- */
29
- begin() {
30
- return Effect.sync(() => {
31
- if (this.consumedAtMillis !== null || this.inFlight) {
32
- return false;
33
- }
34
- this.inFlight = true;
35
- return true;
36
- });
37
- }
38
- /**
39
- * Reopen the guard after a failed send so a retried deliver can claim it
40
- * again. No-op when the guard is already consumed.
41
- * @returns Completion of the reopen.
42
- */
43
- abort() {
44
- return Effect.sync(() => {
45
- this.inFlight = false;
46
- });
47
- }
48
- /**
49
- * Returns `true` on first call (transitions internal state from
50
- * "not-consumed" to "consumed-at-now") and releases any in-flight claim;
51
- * returns `false` on every later call. Reads `Clock.currentTimeMillis`
52
- * inside the Effect on first call.
53
- * @returns The ts result.
54
- */
55
- consume() {
56
- return Effect.gen(function* () {
57
- if (this.consumedAtMillis !== null) {
58
- return false;
59
- }
60
- const ts = yield* Clock.currentTimeMillis;
61
- this.consumedAtMillis = ts;
62
- this.inFlight = false;
63
- return true;
64
- }.bind(this));
65
- }
66
- /**
67
- * `Option.none` before the first `consume`; `Option.some(epochMs)` after,
68
- * where `epochMs` is the value Clock returned at the first-consume moment.
69
- * Idempotent on second-and-later reads.
70
- * @returns The consumed at result.
71
- */
72
- get consumedAt() {
73
- return Effect.sync(() => this.consumedAtMillis === null
74
- ? Option.none()
75
- : Option.some(this.consumedAtMillis));
76
- }
77
- }
78
- //# sourceMappingURL=reply-guard.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reply-guard.js","sourceRoot":"","sources":["../../src/channel-base/reply-guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;A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