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 +8 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/watchers.d.ts +6 -1
- package/dist/watchers.js +12 -2
- package/package.json +1 -1
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
package/dist/version.js
CHANGED
package/dist/watchers.d.ts
CHANGED
|
@@ -85,7 +85,12 @@ export declare class SignalWatcher {
|
|
|
85
85
|
}
|
|
86
86
|
export interface PolicyChange {
|
|
87
87
|
descriptors: PolicyDescriptor[];
|
|
88
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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()) {
|