@tickernelz/paperclip-pro-adapter-utils 2026.1016.0 → 2026.1016.2

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 (54) hide show
  1. package/node_modules/@agentclientprotocol/sdk/dist/acp.d.ts +8 -191
  2. package/node_modules/@agentclientprotocol/sdk/dist/acp.js +10 -165
  3. package/node_modules/@agentclientprotocol/sdk/dist/acp.js.map +1 -1
  4. package/node_modules/@agentclientprotocol/sdk/dist/acp.test.js +132 -52
  5. package/node_modules/@agentclientprotocol/sdk/dist/acp.test.js.map +1 -1
  6. package/node_modules/@agentclientprotocol/sdk/dist/examples/dual-version-agent.js +29 -21
  7. package/node_modules/@agentclientprotocol/sdk/dist/examples/dual-version-agent.js.map +1 -1
  8. package/node_modules/@agentclientprotocol/sdk/dist/jsonrpc.d.ts +1 -0
  9. package/node_modules/@agentclientprotocol/sdk/dist/jsonrpc.js +6 -0
  10. package/node_modules/@agentclientprotocol/sdk/dist/jsonrpc.js.map +1 -1
  11. package/node_modules/@agentclientprotocol/sdk/dist/nes/acp.d.ts +563 -0
  12. package/node_modules/@agentclientprotocol/sdk/dist/nes/acp.js +106 -0
  13. package/node_modules/@agentclientprotocol/sdk/dist/nes/acp.js.map +1 -0
  14. package/node_modules/@agentclientprotocol/sdk/dist/nes/schema/types.gen.d.ts +1261 -0
  15. package/node_modules/@agentclientprotocol/sdk/dist/nes/schema/types.gen.js +4 -0
  16. package/node_modules/@agentclientprotocol/sdk/dist/nes/schema/types.gen.js.map +1 -0
  17. package/node_modules/@agentclientprotocol/sdk/dist/nes/schema/zod.gen.d.ts +962 -0
  18. package/node_modules/@agentclientprotocol/sdk/dist/nes/schema/zod.gen.js +526 -0
  19. package/node_modules/@agentclientprotocol/sdk/dist/nes/schema/zod.gen.js.map +1 -0
  20. package/node_modules/@agentclientprotocol/sdk/dist/protocol-router.d.ts +5 -6
  21. package/node_modules/@agentclientprotocol/sdk/dist/protocol-router.js +13 -25
  22. package/node_modules/@agentclientprotocol/sdk/dist/protocol-router.js.map +1 -1
  23. package/node_modules/@agentclientprotocol/sdk/dist/protocol-router.test.js +6 -6
  24. package/node_modules/@agentclientprotocol/sdk/dist/protocol-router.test.js.map +1 -1
  25. package/node_modules/@agentclientprotocol/sdk/dist/protocol.js +0 -9
  26. package/node_modules/@agentclientprotocol/sdk/dist/protocol.js.map +1 -1
  27. package/node_modules/@agentclientprotocol/sdk/dist/protocol.test.js +0 -10
  28. package/node_modules/@agentclientprotocol/sdk/dist/protocol.test.js.map +1 -1
  29. package/node_modules/@agentclientprotocol/sdk/dist/schema/index.d.ts +1 -11
  30. package/node_modules/@agentclientprotocol/sdk/dist/schema/index.js +0 -10
  31. package/node_modules/@agentclientprotocol/sdk/dist/schema/index.js.map +1 -1
  32. package/node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts +1675 -2753
  33. package/node_modules/@agentclientprotocol/sdk/dist/schema/zod.gen.d.ts +863 -1434
  34. package/node_modules/@agentclientprotocol/sdk/dist/schema/zod.gen.js +91 -534
  35. package/node_modules/@agentclientprotocol/sdk/dist/schema/zod.gen.js.map +1 -1
  36. package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.d.ts +42 -48
  37. package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.js +86 -139
  38. package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.js.map +1 -1
  39. package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.test.js +46 -17
  40. package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.test.js.map +1 -1
  41. package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/guards.gen.d.ts +55 -57
  42. package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/guards.gen.js +0 -59
  43. package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/guards.gen.js.map +1 -1
  44. package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/index.d.ts +1 -11
  45. package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/index.js +0 -10
  46. package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/index.js.map +1 -1
  47. package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/types.gen.d.ts +1870 -2874
  48. package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/zod.gen.d.ts +3373 -2844
  49. package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/zod.gen.js +191 -563
  50. package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/zod.gen.js.map +1 -1
  51. package/node_modules/@agentclientprotocol/sdk/package.json +7 -1
  52. package/node_modules/@agentclientprotocol/sdk/schema/schema.json +1541 -3196
  53. package/node_modules/@agentclientprotocol/sdk/schema/v2/schema.unstable.json +875 -2664
  54. package/package.json +2 -2
@@ -62,20 +62,6 @@ export declare const methods: {
62
62
  readonly prompt: "session/prompt";
63
63
  readonly cancel: "session/cancel";
64
64
  };
65
- readonly nes: {
66
- readonly start: "nes/start";
67
- readonly suggest: "nes/suggest";
68
- readonly accept: "nes/accept";
69
- readonly reject: "nes/reject";
70
- readonly close: "nes/close";
71
- };
72
- readonly document: {
73
- readonly didOpen: "document/didOpen";
74
- readonly didChange: "document/didChange";
75
- readonly didClose: "document/didClose";
76
- readonly didSave: "document/didSave";
77
- readonly didFocus: "document/didFocus";
78
- };
79
65
  };
80
66
  readonly client: {
81
67
  readonly session: {
@@ -496,9 +482,6 @@ export type AgentRequestHandlersByMethod = {
496
482
  [schema.AGENT_METHODS.providers_disable]: AgentRequestHandler<schema.DisableProviderRequest, schema.DisableProviderResponse | void>;
497
483
  [schema.AGENT_METHODS.logout]: AgentRequestHandler<schema.LogoutRequest, schema.LogoutResponse | void>;
498
484
  [schema.AGENT_METHODS.session_prompt]: AgentRequestHandler<schema.PromptRequest, schema.PromptResponse>;
499
- [schema.AGENT_METHODS.nes_start]: AgentRequestHandler<schema.StartNesRequest, schema.StartNesResponse>;
500
- [schema.AGENT_METHODS.nes_suggest]: AgentRequestHandler<schema.SuggestNesRequest, schema.SuggestNesResponse>;
501
- [schema.AGENT_METHODS.nes_close]: AgentRequestHandler<schema.CloseNesRequest, schema.CloseNesResponse | void>;
502
485
  };
503
486
  /**
504
487
  * ACP request methods that can be handled by an `AgentApp`.
@@ -510,20 +493,6 @@ export type AgentRequestMethod = keyof AgentRequestHandlersByMethod & string;
510
493
  export type AgentNotificationHandlersByMethod = {
511
494
  [schema.AGENT_METHODS
512
495
  .session_cancel]: AgentNotificationHandler<schema.CancelNotification>;
513
- [schema.AGENT_METHODS
514
- .document_did_open]: AgentNotificationHandler<schema.DidOpenDocumentNotification>;
515
- [schema.AGENT_METHODS
516
- .document_did_change]: AgentNotificationHandler<schema.DidChangeDocumentNotification>;
517
- [schema.AGENT_METHODS
518
- .document_did_close]: AgentNotificationHandler<schema.DidCloseDocumentNotification>;
519
- [schema.AGENT_METHODS
520
- .document_did_save]: AgentNotificationHandler<schema.DidSaveDocumentNotification>;
521
- [schema.AGENT_METHODS
522
- .document_did_focus]: AgentNotificationHandler<schema.DidFocusDocumentNotification>;
523
- [schema.AGENT_METHODS
524
- .nes_accept]: AgentNotificationHandler<schema.AcceptNesNotification>;
525
- [schema.AGENT_METHODS
526
- .nes_reject]: AgentNotificationHandler<schema.RejectNesNotification>;
527
496
  };
528
497
  /**
529
498
  * ACP notification methods that can be handled by an `AgentApp`.
@@ -1075,6 +1044,10 @@ export declare class ClientSideConnection implements Agent {
1075
1044
  * The request may include `additionalDirectories` to set the complete list of
1076
1045
  * additional workspace roots for the forked session.
1077
1046
  *
1047
+ * The forked session is active when the response arrives, using the request's
1048
+ * `cwd`, `additionalDirectories`, and `mcpServers`. Prompt it directly without
1049
+ * first calling `resumeSession`.
1050
+ *
1078
1051
  * This method is only available if the agent advertises the `session.fork` capability.
1079
1052
  *
1080
1053
  * @experimental
@@ -1220,86 +1193,6 @@ export declare class ClientSideConnection implements Agent {
1220
1193
  * See protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/prompt-turn#cancellation)
1221
1194
  */
1222
1195
  cancel(params: schema.CancelNotification): Promise<void>;
1223
- /**
1224
- * **UNSTABLE**: This capability is not part of the spec yet, and may be removed or changed at any point.
1225
- *
1226
- * Starts a NES (Next Edit Suggestions) session.
1227
- *
1228
- * @experimental
1229
- */
1230
- unstable_startNes(params: schema.StartNesRequest): Promise<schema.StartNesResponse>;
1231
- /**
1232
- * **UNSTABLE**: This capability is not part of the spec yet, and may be removed or changed at any point.
1233
- *
1234
- * Sends a NES suggestion request.
1235
- *
1236
- * @experimental
1237
- */
1238
- unstable_suggestNes(params: schema.SuggestNesRequest): Promise<schema.SuggestNesResponse>;
1239
- /**
1240
- * **UNSTABLE**: This capability is not part of the spec yet, and may be removed or changed at any point.
1241
- *
1242
- * Closes a NES session.
1243
- *
1244
- * @experimental
1245
- */
1246
- unstable_closeNes(params: schema.CloseNesRequest): Promise<schema.CloseNesResponse>;
1247
- /**
1248
- * **UNSTABLE**: This capability is not part of the spec yet, and may be removed or changed at any point.
1249
- *
1250
- * Notifies the agent that a document was opened.
1251
- *
1252
- * @experimental
1253
- */
1254
- unstable_didOpenDocument(params: schema.DidOpenDocumentNotification): Promise<void>;
1255
- /**
1256
- * **UNSTABLE**: This capability is not part of the spec yet, and may be removed or changed at any point.
1257
- *
1258
- * Notifies the agent that a document was changed.
1259
- *
1260
- * @experimental
1261
- */
1262
- unstable_didChangeDocument(params: schema.DidChangeDocumentNotification): Promise<void>;
1263
- /**
1264
- * **UNSTABLE**: This capability is not part of the spec yet, and may be removed or changed at any point.
1265
- *
1266
- * Notifies the agent that a document was closed.
1267
- *
1268
- * @experimental
1269
- */
1270
- unstable_didCloseDocument(params: schema.DidCloseDocumentNotification): Promise<void>;
1271
- /**
1272
- * **UNSTABLE**: This capability is not part of the spec yet, and may be removed or changed at any point.
1273
- *
1274
- * Notifies the agent that a document was saved.
1275
- *
1276
- * @experimental
1277
- */
1278
- unstable_didSaveDocument(params: schema.DidSaveDocumentNotification): Promise<void>;
1279
- /**
1280
- * **UNSTABLE**: This capability is not part of the spec yet, and may be removed or changed at any point.
1281
- *
1282
- * Notifies the agent that a document received focus.
1283
- *
1284
- * @experimental
1285
- */
1286
- unstable_didFocusDocument(params: schema.DidFocusDocumentNotification): Promise<void>;
1287
- /**
1288
- * **UNSTABLE**: This capability is not part of the spec yet, and may be removed or changed at any point.
1289
- *
1290
- * Notifies the agent that a NES suggestion was accepted.
1291
- *
1292
- * @experimental
1293
- */
1294
- unstable_acceptNes(params: schema.AcceptNesNotification): Promise<void>;
1295
- /**
1296
- * **UNSTABLE**: This capability is not part of the spec yet, and may be removed or changed at any point.
1297
- *
1298
- * Notifies the agent that a NES suggestion was rejected.
1299
- *
1300
- * @experimental
1301
- */
1302
- unstable_rejectNes(params: schema.RejectNesNotification): Promise<void>;
1303
1196
  /**
1304
1197
  * Sends a request to the agent by ACP method name.
1305
1198
  *
@@ -1573,6 +1466,10 @@ export interface Agent {
1573
1466
  * The request may include `additionalDirectories` to set the complete list of
1574
1467
  * additional workspace roots for the forked session.
1575
1468
  *
1469
+ * The forked session is active when the response arrives, using the request's
1470
+ * `cwd`, `additionalDirectories`, and `mcpServers`. Prompt it directly without
1471
+ * first calling `resumeSession`.
1472
+ *
1576
1473
  * This method is only available if the agent advertises the `session.fork` capability.
1577
1474
  *
1578
1475
  * @experimental
@@ -1718,86 +1615,6 @@ export interface Agent {
1718
1615
  * See protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/prompt-turn#cancellation)
1719
1616
  */
1720
1617
  cancel(params: schema.CancelNotification): MaybePromise<void>;
1721
- /**
1722
- * **UNSTABLE**: This capability is not part of the spec yet, and may be removed or changed at any point.
1723
- *
1724
- * Starts a NES (Next Edit Suggestions) session.
1725
- *
1726
- * @experimental
1727
- */
1728
- unstable_startNes?(params: schema.StartNesRequest): MaybePromise<schema.StartNesResponse>;
1729
- /**
1730
- * **UNSTABLE**: This capability is not part of the spec yet, and may be removed or changed at any point.
1731
- *
1732
- * Sends a NES suggestion request.
1733
- *
1734
- * @experimental
1735
- */
1736
- unstable_suggestNes?(params: schema.SuggestNesRequest): MaybePromise<schema.SuggestNesResponse>;
1737
- /**
1738
- * **UNSTABLE**: This capability is not part of the spec yet, and may be removed or changed at any point.
1739
- *
1740
- * Closes a NES session.
1741
- *
1742
- * @experimental
1743
- */
1744
- unstable_closeNes?(params: schema.CloseNesRequest): MaybePromise<schema.CloseNesResponse | void>;
1745
- /**
1746
- * **UNSTABLE**: This capability is not part of the spec yet, and may be removed or changed at any point.
1747
- *
1748
- * Called when a document is opened.
1749
- *
1750
- * @experimental
1751
- */
1752
- unstable_didOpenDocument?(params: schema.DidOpenDocumentNotification): MaybePromise<void>;
1753
- /**
1754
- * **UNSTABLE**: This capability is not part of the spec yet, and may be removed or changed at any point.
1755
- *
1756
- * Called when a document is changed.
1757
- *
1758
- * @experimental
1759
- */
1760
- unstable_didChangeDocument?(params: schema.DidChangeDocumentNotification): MaybePromise<void>;
1761
- /**
1762
- * **UNSTABLE**: This capability is not part of the spec yet, and may be removed or changed at any point.
1763
- *
1764
- * Called when a document is closed.
1765
- *
1766
- * @experimental
1767
- */
1768
- unstable_didCloseDocument?(params: schema.DidCloseDocumentNotification): MaybePromise<void>;
1769
- /**
1770
- * **UNSTABLE**: This capability is not part of the spec yet, and may be removed or changed at any point.
1771
- *
1772
- * Called when a document is saved.
1773
- *
1774
- * @experimental
1775
- */
1776
- unstable_didSaveDocument?(params: schema.DidSaveDocumentNotification): MaybePromise<void>;
1777
- /**
1778
- * **UNSTABLE**: This capability is not part of the spec yet, and may be removed or changed at any point.
1779
- *
1780
- * Called when a document receives focus.
1781
- *
1782
- * @experimental
1783
- */
1784
- unstable_didFocusDocument?(params: schema.DidFocusDocumentNotification): MaybePromise<void>;
1785
- /**
1786
- * **UNSTABLE**: This capability is not part of the spec yet, and may be removed or changed at any point.
1787
- *
1788
- * Called when a NES suggestion is accepted.
1789
- *
1790
- * @experimental
1791
- */
1792
- unstable_acceptNes?(params: schema.AcceptNesNotification): MaybePromise<void>;
1793
- /**
1794
- * **UNSTABLE**: This capability is not part of the spec yet, and may be removed or changed at any point.
1795
- *
1796
- * Called when a NES suggestion is rejected.
1797
- *
1798
- * @experimental
1799
- */
1800
- unstable_rejectNes?(params: schema.RejectNesNotification): MaybePromise<void>;
1801
1618
  /**
1802
1619
  * Handles a request that is not otherwise registered by the legacy agent.
1803
1620
  *
@@ -76,20 +76,6 @@ export const methods = {
76
76
  prompt: schema.AGENT_METHODS.session_prompt,
77
77
  cancel: schema.AGENT_METHODS.session_cancel,
78
78
  },
79
- nes: {
80
- start: schema.AGENT_METHODS.nes_start,
81
- suggest: schema.AGENT_METHODS.nes_suggest,
82
- accept: schema.AGENT_METHODS.nes_accept,
83
- reject: schema.AGENT_METHODS.nes_reject,
84
- close: schema.AGENT_METHODS.nes_close,
85
- },
86
- document: {
87
- didOpen: schema.AGENT_METHODS.document_did_open,
88
- didChange: schema.AGENT_METHODS.document_did_change,
89
- didClose: schema.AGENT_METHODS.document_did_close,
90
- didSave: schema.AGENT_METHODS.document_did_save,
91
- didFocus: schema.AGENT_METHODS.document_did_focus,
92
- },
93
79
  },
94
80
  client: {
95
81
  session: {
@@ -568,7 +554,12 @@ function parseParams(parser, params) {
568
554
  return parser.parse(params);
569
555
  }
570
556
  function requestSpec(method, params, mapResponse) {
571
- return { method, params, mapResponse };
557
+ return {
558
+ method,
559
+ // Match Rust's empty-payload handling without bypassing required fields.
560
+ params: (value) => parseParams(params, value ?? {}),
561
+ mapResponse,
562
+ };
572
563
  }
573
564
  function notificationSpec(method, params) {
574
565
  return { method, params };
@@ -608,19 +599,9 @@ const agentRequestSpecs = {
608
599
  unstable_disableProvider: requestSpec(schema.AGENT_METHODS.providers_disable, validate.zDisableProviderRequest, emptyObjectResponse),
609
600
  logout: requestSpec(schema.AGENT_METHODS.logout, validate.zLogoutRequest, emptyObjectResponse),
610
601
  prompt: requestSpec(schema.AGENT_METHODS.session_prompt, validate.zPromptRequest),
611
- unstable_startNes: requestSpec(schema.AGENT_METHODS.nes_start, validate.zStartNesRequest),
612
- unstable_suggestNes: requestSpec(schema.AGENT_METHODS.nes_suggest, validate.zSuggestNesRequest),
613
- unstable_closeNes: requestSpec(schema.AGENT_METHODS.nes_close, validate.zCloseNesRequest, emptyObjectResponse),
614
602
  };
615
603
  const agentNotificationSpecs = {
616
604
  cancel: notificationSpec(schema.AGENT_METHODS.session_cancel, validate.zCancelNotification),
617
- unstable_didOpenDocument: notificationSpec(schema.AGENT_METHODS.document_did_open, validate.zDidOpenDocumentNotification),
618
- unstable_didChangeDocument: notificationSpec(schema.AGENT_METHODS.document_did_change, validate.zDidChangeDocumentNotification),
619
- unstable_didCloseDocument: notificationSpec(schema.AGENT_METHODS.document_did_close, validate.zDidCloseDocumentNotification),
620
- unstable_didSaveDocument: notificationSpec(schema.AGENT_METHODS.document_did_save, validate.zDidSaveDocumentNotification),
621
- unstable_didFocusDocument: notificationSpec(schema.AGENT_METHODS.document_did_focus, validate.zDidFocusDocumentNotification),
622
- unstable_acceptNes: notificationSpec(schema.AGENT_METHODS.nes_accept, validate.zAcceptNesNotification),
623
- unstable_rejectNes: notificationSpec(schema.AGENT_METHODS.nes_reject, validate.zRejectNesNotification),
624
605
  };
625
606
  const clientRequestSpecs = {
626
607
  requestPermission: requestSpec(schema.CLIENT_METHODS.session_request_permission, validate.zRequestPermissionRequest),
@@ -988,19 +969,9 @@ const legacyAgentRequestMethods = new Set([
988
969
  schema.AGENT_METHODS.session_resume,
989
970
  schema.AGENT_METHODS.session_close,
990
971
  schema.AGENT_METHODS.logout,
991
- schema.AGENT_METHODS.nes_start,
992
- schema.AGENT_METHODS.nes_suggest,
993
- schema.AGENT_METHODS.nes_close,
994
972
  ]);
995
973
  const legacyAgentNotificationMethods = new Set([
996
974
  schema.AGENT_METHODS.session_cancel,
997
- schema.AGENT_METHODS.nes_accept,
998
- schema.AGENT_METHODS.nes_reject,
999
- schema.AGENT_METHODS.document_did_open,
1000
- schema.AGENT_METHODS.document_did_change,
1001
- schema.AGENT_METHODS.document_did_close,
1002
- schema.AGENT_METHODS.document_did_save,
1003
- schema.AGENT_METHODS.document_did_focus,
1004
975
  ]);
1005
976
  const legacyClientRequestMethods = new Set([
1006
977
  schema.CLIENT_METHODS.session_request_permission,
@@ -1060,36 +1031,6 @@ function legacyAgentApp(implementation) {
1060
1031
  if (implementation.logout) {
1061
1032
  app.onRequest(schema.AGENT_METHODS.logout, async (ctx) => (await implementation.logout(ctx.params)) ?? {});
1062
1033
  }
1063
- if (implementation.unstable_startNes) {
1064
- app.onRequest(schema.AGENT_METHODS.nes_start, (ctx) => implementation.unstable_startNes(ctx.params));
1065
- }
1066
- if (implementation.unstable_suggestNes) {
1067
- app.onRequest(schema.AGENT_METHODS.nes_suggest, (ctx) => implementation.unstable_suggestNes(ctx.params));
1068
- }
1069
- if (implementation.unstable_closeNes) {
1070
- app.onRequest(schema.AGENT_METHODS.nes_close, async (ctx) => (await implementation.unstable_closeNes(ctx.params)) ?? {});
1071
- }
1072
- if (implementation.unstable_didOpenDocument) {
1073
- app.onNotification(schema.AGENT_METHODS.document_did_open, (ctx) => implementation.unstable_didOpenDocument(ctx.params));
1074
- }
1075
- if (implementation.unstable_didChangeDocument) {
1076
- app.onNotification(schema.AGENT_METHODS.document_did_change, (ctx) => implementation.unstable_didChangeDocument(ctx.params));
1077
- }
1078
- if (implementation.unstable_didCloseDocument) {
1079
- app.onNotification(schema.AGENT_METHODS.document_did_close, (ctx) => implementation.unstable_didCloseDocument(ctx.params));
1080
- }
1081
- if (implementation.unstable_didSaveDocument) {
1082
- app.onNotification(schema.AGENT_METHODS.document_did_save, (ctx) => implementation.unstable_didSaveDocument(ctx.params));
1083
- }
1084
- if (implementation.unstable_didFocusDocument) {
1085
- app.onNotification(schema.AGENT_METHODS.document_did_focus, (ctx) => implementation.unstable_didFocusDocument(ctx.params));
1086
- }
1087
- if (implementation.unstable_acceptNes) {
1088
- app.onNotification(schema.AGENT_METHODS.nes_accept, (ctx) => implementation.unstable_acceptNes(ctx.params));
1089
- }
1090
- if (implementation.unstable_rejectNes) {
1091
- app.onNotification(schema.AGENT_METHODS.nes_reject, (ctx) => implementation.unstable_rejectNes(ctx.params));
1092
- }
1093
1034
  if (implementation.extMethod) {
1094
1035
  app[appBuilder]().withHandler({
1095
1036
  handleMessage: async (message) => {
@@ -1535,6 +1476,10 @@ export class ClientSideConnection {
1535
1476
  * The request may include `additionalDirectories` to set the complete list of
1536
1477
  * additional workspace roots for the forked session.
1537
1478
  *
1479
+ * The forked session is active when the response arrives, using the request's
1480
+ * `cwd`, `additionalDirectories`, and `mcpServers`. Prompt it directly without
1481
+ * first calling `resumeSession`.
1482
+ *
1538
1483
  * This method is only available if the agent advertises the `session.fork` capability.
1539
1484
  *
1540
1485
  * @experimental
@@ -1708,106 +1653,6 @@ export class ClientSideConnection {
1708
1653
  cancel(params) {
1709
1654
  return this.connection.sendNotification(schema.AGENT_METHODS.session_cancel, params);
1710
1655
  }
1711
- /**
1712
- * **UNSTABLE**: This capability is not part of the spec yet, and may be removed or changed at any point.
1713
- *
1714
- * Starts a NES (Next Edit Suggestions) session.
1715
- *
1716
- * @experimental
1717
- */
1718
- unstable_startNes(params) {
1719
- return this.connection.sendRequest(schema.AGENT_METHODS.nes_start, params);
1720
- }
1721
- /**
1722
- * **UNSTABLE**: This capability is not part of the spec yet, and may be removed or changed at any point.
1723
- *
1724
- * Sends a NES suggestion request.
1725
- *
1726
- * @experimental
1727
- */
1728
- unstable_suggestNes(params) {
1729
- return this.connection.sendRequest(schema.AGENT_METHODS.nes_suggest, params);
1730
- }
1731
- /**
1732
- * **UNSTABLE**: This capability is not part of the spec yet, and may be removed or changed at any point.
1733
- *
1734
- * Closes a NES session.
1735
- *
1736
- * @experimental
1737
- */
1738
- unstable_closeNes(params) {
1739
- return this.connection.sendRequest(schema.AGENT_METHODS.nes_close, params, emptyObjectResponse);
1740
- }
1741
- /**
1742
- * **UNSTABLE**: This capability is not part of the spec yet, and may be removed or changed at any point.
1743
- *
1744
- * Notifies the agent that a document was opened.
1745
- *
1746
- * @experimental
1747
- */
1748
- unstable_didOpenDocument(params) {
1749
- return this.connection.sendNotification(schema.AGENT_METHODS.document_did_open, params);
1750
- }
1751
- /**
1752
- * **UNSTABLE**: This capability is not part of the spec yet, and may be removed or changed at any point.
1753
- *
1754
- * Notifies the agent that a document was changed.
1755
- *
1756
- * @experimental
1757
- */
1758
- unstable_didChangeDocument(params) {
1759
- return this.connection.sendNotification(schema.AGENT_METHODS.document_did_change, params);
1760
- }
1761
- /**
1762
- * **UNSTABLE**: This capability is not part of the spec yet, and may be removed or changed at any point.
1763
- *
1764
- * Notifies the agent that a document was closed.
1765
- *
1766
- * @experimental
1767
- */
1768
- unstable_didCloseDocument(params) {
1769
- return this.connection.sendNotification(schema.AGENT_METHODS.document_did_close, params);
1770
- }
1771
- /**
1772
- * **UNSTABLE**: This capability is not part of the spec yet, and may be removed or changed at any point.
1773
- *
1774
- * Notifies the agent that a document was saved.
1775
- *
1776
- * @experimental
1777
- */
1778
- unstable_didSaveDocument(params) {
1779
- return this.connection.sendNotification(schema.AGENT_METHODS.document_did_save, params);
1780
- }
1781
- /**
1782
- * **UNSTABLE**: This capability is not part of the spec yet, and may be removed or changed at any point.
1783
- *
1784
- * Notifies the agent that a document received focus.
1785
- *
1786
- * @experimental
1787
- */
1788
- unstable_didFocusDocument(params) {
1789
- return this.connection.sendNotification(schema.AGENT_METHODS.document_did_focus, params);
1790
- }
1791
- /**
1792
- * **UNSTABLE**: This capability is not part of the spec yet, and may be removed or changed at any point.
1793
- *
1794
- * Notifies the agent that a NES suggestion was accepted.
1795
- *
1796
- * @experimental
1797
- */
1798
- unstable_acceptNes(params) {
1799
- return this.connection.sendNotification(schema.AGENT_METHODS.nes_accept, params);
1800
- }
1801
- /**
1802
- * **UNSTABLE**: This capability is not part of the spec yet, and may be removed or changed at any point.
1803
- *
1804
- * Notifies the agent that a NES suggestion was rejected.
1805
- *
1806
- * @experimental
1807
- */
1808
- unstable_rejectNes(params) {
1809
- return this.connection.sendNotification(schema.AGENT_METHODS.nes_reject, params);
1810
- }
1811
1656
  request(method, params, options) {
1812
1657
  const spec = agentRequestSpecsByMethod[method];
1813
1658
  return this.connection.sendRequest(method, params, spec?.mapResponse, options);