macp-sdk-typescript 0.17.0 → 0.17.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,13 @@ 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.17.1](https://github.com/multiagentcoordinationprotocol/macp-sdk-typescript/compare/v0.17.0...v0.17.1) (2026-10-20)
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * **validation:** accept an empty participant list on a Decision SessionStart ([#186](https://github.com/multiagentcoordinationprotocol/macp-sdk-typescript/issues/186)) ([543a86c](https://github.com/multiagentcoordinationprotocol/macp-sdk-typescript/commit/543a86c1a0996130baae709c6f31687b3bf490b8))
13
+
7
14
  ## [0.17.0](https://github.com/multiagentcoordinationprotocol/macp-sdk-typescript/compare/v0.16.1...v0.17.0) (2026-10-18)
8
15
 
9
16
 
package/dist/decision.js CHANGED
@@ -43,6 +43,9 @@ class DecisionSession {
43
43
  maxSuspendMs: input.maxSuspendMs,
44
44
  modeVersion: this.modeVersion,
45
45
  configurationVersion: this.configurationVersion,
46
+ // The runtime accepts an empty roster for Decision only (an inert
47
+ // session: no Proposal is ever admitted); the other modes reject it.
48
+ allowEmptyParticipants: true,
46
49
  });
47
50
  const payload = (0, envelope_1.buildSessionStartPayload)({
48
51
  intent: input.intent,
@@ -41,7 +41,18 @@ export declare function validateSignalType(signalType: string, data?: Buffer | U
41
41
  export declare function validateProgressScope(sessionId: string, mode: string): void;
42
42
  export declare function validateTtlMs(ttlMs: number): void;
43
43
  export declare function validateMaxSuspendMs(maxSuspendMs: number): void;
44
- export declare function validateParticipants(participants: string[]): void;
44
+ /**
45
+ * `allowEmpty` skips the non-empty check only -- the duplicate check and the
46
+ * count limit still apply. Decision mode is the sole caller of
47
+ * `allowEmpty: true` (via `validateSessionStart`): the runtime accepts an empty
48
+ * `participants` list for a Decision `SessionStart` and rejects it for every
49
+ * other mode (macp-runtime `allows_empty_participants`; spec fixture
50
+ * `decision_zero_participants.json`). Same shape as macp-sdk-python's
51
+ * `validate_participants(..., allow_empty=...)`.
52
+ */
53
+ export declare function validateParticipants(participants: string[], options?: {
54
+ allowEmpty?: boolean;
55
+ }): void;
45
56
  export declare function validateRequiredField(fieldName: string, value: string): void;
46
57
  export declare function validateCommitmentHash(value: string, field?: string): void;
47
58
  export declare function validateSessionStart(input: {
@@ -51,4 +62,5 @@ export declare function validateSessionStart(input: {
51
62
  maxSuspendMs?: number;
52
63
  modeVersion: string;
53
64
  configurationVersion: string;
65
+ allowEmptyParticipants?: boolean;
54
66
  }): void;
@@ -139,8 +139,17 @@ function validateMaxSuspendMs(maxSuspendMs) {
139
139
  throw new errors_1.MacpSessionError(`max_suspend_ms must be >= 0 (0 = runtime default), got ${maxSuspendMs}`);
140
140
  }
141
141
  }
142
- function validateParticipants(participants) {
143
- if (!participants.length) {
142
+ /**
143
+ * `allowEmpty` skips the non-empty check only -- the duplicate check and the
144
+ * count limit still apply. Decision mode is the sole caller of
145
+ * `allowEmpty: true` (via `validateSessionStart`): the runtime accepts an empty
146
+ * `participants` list for a Decision `SessionStart` and rejects it for every
147
+ * other mode (macp-runtime `allows_empty_participants`; spec fixture
148
+ * `decision_zero_participants.json`). Same shape as macp-sdk-python's
149
+ * `validate_participants(..., allow_empty=...)`.
150
+ */
151
+ function validateParticipants(participants, options = {}) {
152
+ if (!participants.length && !options.allowEmpty) {
144
153
  throw new errors_1.MacpSessionError('participants must be non-empty');
145
154
  }
146
155
  const seen = new Set();
@@ -169,7 +178,7 @@ function validateSessionStart(input) {
169
178
  // RFC-MACP-0001 §7.1 states a runtime "MUST NOT reject a SessionStart
170
179
  // solely because intent is empty" -- no client-side non-empty check here
171
180
  // (issue #124 item 3).
172
- validateParticipants(input.participants);
181
+ validateParticipants(input.participants, { allowEmpty: input.allowEmptyParticipants });
173
182
  validateTtlMs(input.ttlMs);
174
183
  if (input.maxSuspendMs !== undefined)
175
184
  validateMaxSuspendMs(input.maxSuspendMs);
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.17.0";
7
+ export declare const VERSION = "0.17.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.17.0'; // x-release-please-version
10
+ exports.VERSION = '0.17.1'; // x-release-please-version
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "macp-sdk-typescript",
3
- "version": "0.17.0",
3
+ "version": "0.17.1",
4
4
  "description": "TypeScript SDK for the MACP Rust runtime",
5
5
  "license": "Apache-2.0",
6
6
  "type": "commonjs",