macp-sdk-typescript 0.16.0 → 0.16.1

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/CHANGELOG.md CHANGED
@@ -4,6 +4,14 @@ All notable changes to `macp-sdk-typescript` are documented here. The format
4
4
  follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the
5
5
  project uses [Semantic Versioning](https://semver.org/).
6
6
 
7
+ ## [0.16.1](https://github.com/multiagentcoordinationprotocol/macp-sdk-typescript/compare/v0.16.0...v0.16.1) (2026-10-18)
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * **watchers:** type PolicyChange.observedAtUnixMs as string ([#175](https://github.com/multiagentcoordinationprotocol/macp-sdk-typescript/issues/175)) ([3ff812b](https://github.com/multiagentcoordinationprotocol/macp-sdk-typescript/commit/3ff812b00b96c2088364c9e521a1440eee91ca0a))
13
+ * **watchers:** unwrap .change in ModeRegistryWatcher/RootsWatcher ([#163](https://github.com/multiagentcoordinationprotocol/macp-sdk-typescript/issues/163)) ([#174](https://github.com/multiagentcoordinationprotocol/macp-sdk-typescript/issues/174)) ([98cb23e](https://github.com/multiagentcoordinationprotocol/macp-sdk-typescript/commit/98cb23e9736ffd9c6eef24b85714f6faf5880b39))
14
+
7
15
  ## [0.16.0](https://github.com/multiagentcoordinationprotocol/macp-sdk-typescript/compare/v0.15.0...v0.16.0) (2026-10-18)
8
16
 
9
17
 
package/dist/version.d.ts CHANGED
@@ -4,4 +4,4 @@
4
4
  * Kept in sync with package.json by release-please (see the
5
5
  * `x-release-please-version` annotation).
6
6
  */
7
- export declare const VERSION = "0.16.0";
7
+ export declare const VERSION = "0.16.1";
package/dist/version.js CHANGED
@@ -7,4 +7,4 @@ exports.VERSION = void 0;
7
7
  * Kept in sync with package.json by release-please (see the
8
8
  * `x-release-please-version` annotation).
9
9
  */
10
- exports.VERSION = '0.16.0'; // x-release-please-version
10
+ exports.VERSION = '0.16.1'; // x-release-please-version
@@ -85,7 +85,12 @@ export declare class SignalWatcher {
85
85
  }
86
86
  export interface PolicyChange {
87
87
  descriptors: PolicyDescriptor[];
88
- observedAtUnixMs: number;
88
+ /**
89
+ * Unix ms as a decimal string — the proto field is `int64`, which the
90
+ * client decodes with `longs: String` (same as `RegistryChanged`,
91
+ * `RootsChanged` and `SessionLifecycleEvent`). Was mistyped `number`.
92
+ */
93
+ observedAtUnixMs: string;
89
94
  }
90
95
  export declare class PolicyWatcher {
91
96
  private readonly client;
package/dist/watchers.js CHANGED
@@ -116,11 +116,16 @@ class ModeRegistryWatcher {
116
116
  this.auth = options?.auth;
117
117
  }
118
118
  async *changes(signal) {
119
+ // The wire frame is `WatchModeRegistryResponse { RegistryChanged change = 1; }` — unwrap it
120
+ // (issue #163; yielding the frame itself left every field undefined).
119
121
  const stream = this.client.watchModeRegistry(this.auth);
120
122
  if (signal) {
121
123
  signal.addEventListener('abort', () => stream.cancel(), { once: true });
122
124
  }
123
- yield* serverStreamToAsyncGenerator(stream);
125
+ for await (const response of serverStreamToAsyncGenerator(stream)) {
126
+ if (response.change)
127
+ yield response.change;
128
+ }
124
129
  }
125
130
  async watch(handler) {
126
131
  for await (const change of this.changes()) {
@@ -145,11 +150,16 @@ class RootsWatcher {
145
150
  this.auth = options?.auth;
146
151
  }
147
152
  async *changes(signal) {
153
+ // The wire frame is `WatchRootsResponse { RootsChanged change = 1; }` — unwrap it
154
+ // (issue #163; yielding the frame itself left every field undefined).
148
155
  const stream = this.client.watchRoots(this.auth);
149
156
  if (signal) {
150
157
  signal.addEventListener('abort', () => stream.cancel(), { once: true });
151
158
  }
152
- yield* serverStreamToAsyncGenerator(stream);
159
+ for await (const response of serverStreamToAsyncGenerator(stream)) {
160
+ if (response.change)
161
+ yield response.change;
162
+ }
153
163
  }
154
164
  async watch(handler) {
155
165
  for await (const change of this.changes()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "macp-sdk-typescript",
3
- "version": "0.16.0",
3
+ "version": "0.16.1",
4
4
  "description": "TypeScript SDK for the MACP Rust runtime",
5
5
  "license": "Apache-2.0",
6
6
  "type": "commonjs",