@blade-hq/agent-client 2612.0.0-beta.2 → 2612.0.0-beta.21

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 (92) hide show
  1. package/README.md +203 -19
  2. package/dist/blade-client.d.ts +13 -1
  3. package/dist/{chunk-PWJJJATA.js → chunk-J3XXTHHK.js} +1723 -701
  4. package/dist/chunk-J3XXTHHK.js.map +1 -0
  5. package/dist/index.d.ts +12 -3
  6. package/dist/index.js +9 -1
  7. package/dist/internal.d.ts +9 -3
  8. package/dist/internal.js +13 -1
  9. package/dist/internal.js.map +1 -1
  10. package/dist/resources/auth.d.ts +3 -1
  11. package/dist/resources/chat-groups.d.ts +92 -0
  12. package/dist/resources/headless.d.ts +5 -0
  13. package/dist/resources/models.d.ts +6 -1
  14. package/dist/resources/plugins.d.ts +1 -0
  15. package/dist/resources/sessions.d.ts +96 -11
  16. package/dist/schemas/context-attachments.d.ts +16 -0
  17. package/dist/schemas/event.d.ts +2 -0
  18. package/dist/schemas/message-utils.d.ts +3 -9
  19. package/dist/schemas/message.d.ts +18 -1
  20. package/dist/schemas/plugin-refs.d.ts +15 -0
  21. package/dist/schemas/projection.d.ts +31 -0
  22. package/dist/schemas/session.d.ts +2 -42
  23. package/dist/schemas/topic-assets.d.ts +7 -0
  24. package/dist/server-clock.d.ts +2 -0
  25. package/dist/session/agent-session.d.ts +51 -7
  26. package/dist/session/background.d.ts +14 -0
  27. package/dist/session/events.d.ts +0 -1
  28. package/dist/session/hub.d.ts +3 -0
  29. package/dist/session/log-cursor.d.ts +14 -0
  30. package/dist/session/state.d.ts +2 -1
  31. package/dist/session/workflow.d.ts +10 -3
  32. package/dist/shared/projection/builder.d.ts +5 -0
  33. package/dist/shared/projection/helpers.d.ts +2 -0
  34. package/dist/shared/projection/index.d.ts +1 -0
  35. package/dist/shared/projection/workflow.d.ts +24 -0
  36. package/dist/tool-provider.d.ts +51 -0
  37. package/dist/types/socket-events.d.ts +179 -6
  38. package/node_modules/engine.io-client/build/cjs/globals.node.d.ts +2 -3
  39. package/node_modules/engine.io-client/build/cjs/index.d.ts +3 -3
  40. package/node_modules/engine.io-client/build/cjs/index.js +1 -4
  41. package/node_modules/engine.io-client/build/cjs/socket.d.ts +39 -82
  42. package/node_modules/engine.io-client/build/cjs/socket.js +151 -218
  43. package/node_modules/engine.io-client/build/cjs/transport.d.ts +1 -1
  44. package/node_modules/engine.io-client/build/cjs/transports/polling-xhr.d.ts +4 -4
  45. package/node_modules/engine.io-client/build/cjs/transports/polling-xhr.js +2 -2
  46. package/node_modules/engine.io-client/build/cjs/transports/polling-xhr.node.js +17 -7
  47. package/node_modules/engine.io-client/build/cjs/transports/websocket.node.js +17 -7
  48. package/node_modules/engine.io-client/build/esm/globals.node.d.ts +2 -3
  49. package/node_modules/engine.io-client/build/esm/index.d.ts +3 -3
  50. package/node_modules/engine.io-client/build/esm/index.js +1 -2
  51. package/node_modules/engine.io-client/build/esm/socket.d.ts +39 -82
  52. package/node_modules/engine.io-client/build/esm/socket.js +141 -206
  53. package/node_modules/engine.io-client/build/esm/transport.d.ts +1 -1
  54. package/node_modules/engine.io-client/build/esm/transports/polling-xhr.d.ts +4 -4
  55. package/node_modules/engine.io-client/build/esm/transports/polling-xhr.js +2 -2
  56. package/node_modules/engine.io-client/build/esm-debug/globals.node.d.ts +2 -3
  57. package/node_modules/engine.io-client/build/esm-debug/index.d.ts +3 -3
  58. package/node_modules/engine.io-client/build/esm-debug/index.js +1 -2
  59. package/node_modules/engine.io-client/build/esm-debug/socket.d.ts +39 -82
  60. package/node_modules/engine.io-client/build/esm-debug/socket.js +150 -215
  61. package/node_modules/engine.io-client/build/esm-debug/transport.d.ts +1 -1
  62. package/node_modules/engine.io-client/build/esm-debug/transports/polling-xhr.d.ts +4 -4
  63. package/node_modules/engine.io-client/build/esm-debug/transports/polling-xhr.js +2 -2
  64. package/node_modules/engine.io-client/dist/engine.io.esm.min.js +3 -3
  65. package/node_modules/engine.io-client/dist/engine.io.esm.min.js.map +1 -1
  66. package/node_modules/engine.io-client/dist/engine.io.js +164 -239
  67. package/node_modules/engine.io-client/dist/engine.io.js.map +1 -1
  68. package/node_modules/engine.io-client/dist/engine.io.min.js +3 -3
  69. package/node_modules/engine.io-client/dist/engine.io.min.js.map +1 -1
  70. package/node_modules/engine.io-client/package.json +2 -2
  71. package/node_modules/socket.io-parser/build/cjs/binary.js +4 -1
  72. package/node_modules/socket.io-parser/build/cjs/index.d.ts +14 -4
  73. package/node_modules/socket.io-parser/build/cjs/index.js +18 -11
  74. package/node_modules/socket.io-parser/build/esm/binary.js +4 -1
  75. package/node_modules/socket.io-parser/build/esm/index.d.ts +14 -4
  76. package/node_modules/socket.io-parser/build/esm/index.js +14 -10
  77. package/node_modules/socket.io-parser/build/esm-debug/binary.js +4 -1
  78. package/node_modules/socket.io-parser/build/esm-debug/index.d.ts +14 -4
  79. package/node_modules/socket.io-parser/build/esm-debug/index.js +14 -10
  80. package/node_modules/socket.io-parser/package.json +1 -1
  81. package/node_modules/ws/index.js +15 -6
  82. package/node_modules/ws/lib/constants.js +1 -0
  83. package/node_modules/ws/lib/permessage-deflate.js +9 -7
  84. package/node_modules/ws/lib/receiver.js +37 -0
  85. package/node_modules/ws/lib/sender.js +6 -1
  86. package/node_modules/ws/lib/websocket-server.js +18 -6
  87. package/node_modules/ws/lib/websocket.js +50 -17
  88. package/node_modules/ws/package.json +8 -3
  89. package/node_modules/ws/wrapper.mjs +14 -1
  90. package/package.json +4 -4
  91. package/public-api.md +335 -28
  92. package/dist/chunk-PWJJJATA.js.map +0 -1
@@ -8,7 +8,24 @@ export type AsrAudioPayload = ArrayBuffer | Uint8Array | {
8
8
  request_id?: string;
9
9
  };
10
10
  export declare namespace ChatSendPayloadSchema {
11
- type SessionId = string;
11
+ /**
12
+ * @maxItems 20
13
+ */
14
+ type ContextAttachments = [] | [ContextAttachment] | [ContextAttachment, ContextAttachment] | [ContextAttachment, ContextAttachment, ContextAttachment] | [ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment] | [ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment] | [ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment] | [ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment] | [ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment] | [ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment] | [ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment] | [ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment] | [ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment] | [ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment] | [ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment] | [ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment] | [ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment] | [ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment] | [ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment] | [ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment] | [ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment];
15
+ type Id = string;
16
+ type Label = string;
17
+ type Content = string;
18
+ type Data = ({
19
+ [k: string]: unknown;
20
+ } | null);
21
+ /**
22
+ * @maxItems 20
23
+ */
24
+ type Files = [] | [ContextAttachmentFile] | [ContextAttachmentFile, ContextAttachmentFile] | [ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile] | [ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile] | [ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile] | [ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile] | [ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile] | [ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile] | [ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile] | [ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile] | [ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile] | [ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile] | [ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile] | [ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile] | [ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile] | [ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile] | [ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile] | [ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile] | [ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile] | [ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile];
25
+ type Name = string;
26
+ type SessionId = (string | null);
27
+ type Path = (string | null);
28
+ type SessionId1 = string;
12
29
  type ClientRequestId = (string | null);
13
30
  type Mode = (("planning" | "executing") | null);
14
31
  type AskuserAnswer = ({
@@ -33,10 +50,28 @@ export declare namespace ChatSendPayloadSchema {
33
50
  } | null);
34
51
  type CompactionRatio = (number | null);
35
52
  type NativeApprovalPolicy = (("unlessTrusted" | "never") | null);
36
- type KbIds = (number[] | null);
53
+ /**
54
+ * @maxItems 20
55
+ */
56
+ type Refs = [] | [(PluginRef | SkillRef)] | [(PluginRef | SkillRef), (PluginRef | SkillRef)] | [(PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef)] | [(PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef)] | [(PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef)] | [(PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef)] | [(PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef)] | [(PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef)] | [(PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef)] | [(PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef)] | [(PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef)] | [(PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef)] | [(PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef)] | [(PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef)] | [(PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef)] | [(PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef)] | [(PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef)] | [(PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef)] | [(PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef)] | [(PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef), (PluginRef | SkillRef)];
57
+ type Provider = "plugin";
58
+ type Plugin = string;
59
+ type Server = string;
60
+ type Id1 = string;
61
+ type Label1 = string;
62
+ type Provider1 = "skill";
63
+ type Id2 = string;
64
+ type Label2 = string;
65
+ /**
66
+ * @maxItems 20
67
+ */
68
+ type TopicAssetRefs = [] | [TopicAssetRef] | [TopicAssetRef, TopicAssetRef] | [TopicAssetRef, TopicAssetRef, TopicAssetRef] | [TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef] | [TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef] | [TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef] | [TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef] | [TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef] | [TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef] | [TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef] | [TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef] | [TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef] | [TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef] | [TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef] | [TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef] | [TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef] | [TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef] | [TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef] | [TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef] | [TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef, TopicAssetRef];
69
+ type TopicId = string;
70
+ type Path1 = string;
37
71
  type QueueWhenRunning = boolean;
38
72
  interface ChatSendPayload {
39
- session_id: SessionId;
73
+ context_attachments?: ContextAttachments;
74
+ session_id: SessionId1;
40
75
  message: Message;
41
76
  client_request_id?: ClientRequestId;
42
77
  mode?: Mode;
@@ -52,10 +87,23 @@ export declare namespace ChatSendPayloadSchema {
52
87
  app_context?: AppContext;
53
88
  compaction_ratio?: CompactionRatio;
54
89
  native_approval_policy?: NativeApprovalPolicy;
55
- kb_ids?: KbIds;
90
+ refs?: Refs;
91
+ topic_asset_refs?: TopicAssetRefs;
56
92
  queue_when_running?: QueueWhenRunning;
57
93
  [k: string]: unknown;
58
94
  }
95
+ interface ContextAttachment {
96
+ id: Id;
97
+ label: Label;
98
+ content: Content;
99
+ data?: Data;
100
+ files?: Files;
101
+ }
102
+ interface ContextAttachmentFile {
103
+ name: Name;
104
+ session_id?: SessionId;
105
+ path?: Path;
106
+ }
59
107
  interface Message {
60
108
  [k: string]: unknown;
61
109
  }
@@ -65,12 +113,33 @@ export declare namespace ChatSendPayloadSchema {
65
113
  deprecate_entry_ids?: DeprecateEntryIds;
66
114
  [k: string]: unknown;
67
115
  }
116
+ interface PluginRef {
117
+ provider: Provider;
118
+ plugin: Plugin;
119
+ server: Server;
120
+ id: Id1;
121
+ label: Label1;
122
+ [k: string]: unknown;
123
+ }
124
+ interface SkillRef {
125
+ provider: Provider1;
126
+ id: Id2;
127
+ label: Label2;
128
+ [k: string]: unknown;
129
+ }
130
+ interface TopicAssetRef {
131
+ topic_id: TopicId;
132
+ path: Path1;
133
+ [k: string]: unknown;
134
+ }
68
135
  }
69
136
  export type ChatSendPayload = ChatSendPayloadSchema.ChatSendPayload;
70
137
  export declare namespace ChatStopPayloadSchema {
71
138
  type SessionId = string;
139
+ type ChatRunId = (string | null);
72
140
  interface ChatStopPayload {
73
141
  session_id: SessionId;
142
+ chat_run_id?: ChatRunId;
74
143
  [k: string]: unknown;
75
144
  }
76
145
  }
@@ -79,14 +148,65 @@ export declare namespace ChatAppendPayloadSchema {
79
148
  type SessionId = string;
80
149
  type Message = string;
81
150
  type ClientRequestId = (string | null);
151
+ /**
152
+ * @maxItems 20
153
+ */
154
+ type ContextAttachments = [] | [ContextAttachment] | [ContextAttachment, ContextAttachment] | [ContextAttachment, ContextAttachment, ContextAttachment] | [ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment] | [ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment] | [ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment] | [ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment] | [ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment] | [ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment] | [ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment] | [ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment] | [ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment] | [ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment] | [ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment] | [ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment] | [ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment] | [ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment] | [ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment] | [ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment] | [ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment, ContextAttachment];
155
+ type Id = string;
156
+ type Label = string;
157
+ type Content = string;
158
+ type Data = ({
159
+ [k: string]: unknown;
160
+ } | null);
161
+ /**
162
+ * @maxItems 20
163
+ */
164
+ type Files = [] | [ContextAttachmentFile] | [ContextAttachmentFile, ContextAttachmentFile] | [ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile] | [ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile] | [ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile] | [ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile] | [ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile] | [ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile] | [ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile] | [ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile] | [ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile] | [ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile] | [ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile] | [ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile] | [ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile] | [ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile] | [ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile] | [ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile] | [ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile] | [ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile, ContextAttachmentFile];
165
+ type Name = string;
166
+ type SessionId1 = (string | null);
167
+ type Path = (string | null);
168
+ type Mode = (("planning" | "executing") | null);
169
+ type Model = (string | null);
170
+ type ThinkingOverride = (boolean | null);
171
+ type ReasoningLevel = (("off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max") | null);
82
172
  interface ChatAppendPayload {
83
173
  session_id: SessionId;
84
174
  message: Message;
85
175
  client_request_id?: ClientRequestId;
176
+ prepared_options?: (PreparedSendOptions | null);
86
177
  [k: string]: unknown;
87
178
  }
179
+ interface PreparedSendOptions {
180
+ context_attachments?: ContextAttachments;
181
+ mode?: Mode;
182
+ model?: Model;
183
+ thinking_override?: ThinkingOverride;
184
+ reasoning_level?: ReasoningLevel;
185
+ }
186
+ interface ContextAttachment {
187
+ id: Id;
188
+ label: Label;
189
+ content: Content;
190
+ data?: Data;
191
+ files?: Files;
192
+ }
193
+ interface ContextAttachmentFile {
194
+ name: Name;
195
+ session_id?: SessionId1;
196
+ path?: Path;
197
+ }
88
198
  }
89
199
  export type ChatAppendPayload = ChatAppendPayloadSchema.ChatAppendPayload;
200
+ export declare namespace ChatQueueRequestPayloadSchema {
201
+ type SessionId = string;
202
+ type ClientRequestId = string;
203
+ interface ChatQueueRequestPayload {
204
+ session_id: SessionId;
205
+ client_request_id: ClientRequestId;
206
+ [k: string]: unknown;
207
+ }
208
+ }
209
+ export type ChatQueueRequestPayload = ChatQueueRequestPayloadSchema.ChatQueueRequestPayload;
90
210
  export declare namespace ChatCompactPayloadSchema {
91
211
  type SessionId = string;
92
212
  interface ChatCompactPayload {
@@ -163,15 +283,17 @@ export declare namespace ChatQueueResumePayloadSchema {
163
283
  export type ChatQueueResumePayload = ChatQueueResumePayloadSchema.ChatQueueResumePayload;
164
284
  export declare namespace SessionSubscribePayloadSchema {
165
285
  type SessionId = string;
166
- type Mode = string;
286
+ type Mode = ("full" | "status");
167
287
  type EventFormat = "raw";
168
288
  type AfterSequence = number;
289
+ type AfterLogSeq = (number | null);
169
290
  type Resume = boolean;
170
291
  interface SessionSubscribePayload {
171
292
  session_id: SessionId;
172
293
  mode?: Mode;
173
294
  event_format?: EventFormat;
174
295
  after_sequence?: AfterSequence;
296
+ after_log_seq?: AfterLogSeq;
175
297
  resume?: Resume;
176
298
  [k: string]: unknown;
177
299
  }
@@ -184,9 +306,10 @@ export declare namespace SessionSubscribeBatchPayloadSchema {
184
306
  */
185
307
  type Sessions = [SessionSubscribe, ...(SessionSubscribe)[]];
186
308
  type SessionId = string;
187
- type Mode = string;
309
+ type Mode = ("full" | "status");
188
310
  type EventFormat = "raw";
189
311
  type AfterSequence = number;
312
+ type AfterLogSeq = (number | null);
190
313
  type Resume = boolean;
191
314
  interface SessionSubscribeBatchPayload {
192
315
  sessions: Sessions;
@@ -197,6 +320,7 @@ export declare namespace SessionSubscribeBatchPayloadSchema {
197
320
  mode?: Mode;
198
321
  event_format?: EventFormat;
199
322
  after_sequence?: AfterSequence;
323
+ after_log_seq?: AfterLogSeq;
200
324
  resume?: Resume;
201
325
  [k: string]: unknown;
202
326
  }
@@ -350,10 +474,12 @@ export declare namespace MCPAppChangedPayloadSchema {
350
474
  export type MCPAppChangedPayload = MCPAppChangedPayloadSchema.MCPAppChangedPayload;
351
475
  export declare namespace SystemErrorPayloadSchema {
352
476
  type Message = string;
477
+ type ChatRunId = (string | null);
353
478
  type SessionId = (string | null);
354
479
  type Code = (string | number | null);
355
480
  interface SystemErrorPayload {
356
481
  message: Message;
482
+ chat_run_id?: ChatRunId;
357
483
  session_id?: SessionId;
358
484
  code?: Code;
359
485
  detail?: Detail;
@@ -385,11 +511,16 @@ export declare namespace SystemNotificationPayloadSchema {
385
511
  }
386
512
  export type SystemNotificationPayload = SystemNotificationPayloadSchema.SystemNotificationPayload;
387
513
  export declare namespace TurnEventsPayloadSchema {
514
+ type ServerTime = (string | null);
388
515
  type SessionId = string;
389
516
  type Type = string;
390
517
  type StreamSequence = (number | null);
518
+ type LogSeq = (number | null);
519
+ type StepLogSeq = (number | null);
520
+ type DeltaSeq = (number | null);
391
521
  type Events = RawWireEvent[];
392
522
  interface TurnEventsPayload {
523
+ server_time?: ServerTime;
393
524
  session_id: SessionId;
394
525
  events: Events;
395
526
  [k: string]: unknown;
@@ -398,6 +529,9 @@ export declare namespace TurnEventsPayloadSchema {
398
529
  type: Type;
399
530
  payload: Payload;
400
531
  stream_sequence?: StreamSequence;
532
+ log_seq?: LogSeq;
533
+ step_log_seq?: StepLogSeq;
534
+ delta_seq?: DeltaSeq;
401
535
  [k: string]: unknown;
402
536
  }
403
537
  interface Payload {
@@ -501,10 +635,12 @@ export declare namespace AgentBoardFileOpPayloadSchema {
501
635
  export type AgentBoardFileOpPayload = AgentBoardFileOpPayloadSchema.AgentBoardFileOpPayload;
502
636
  export declare namespace ChatSendAckSchema {
503
637
  type Status = string;
638
+ type ChatRunId = (string | null);
504
639
  type Message = (string | null);
505
640
  type Code = (string | number | null);
506
641
  interface ChatSendAck {
507
642
  status: Status;
643
+ chat_run_id?: ChatRunId;
508
644
  message?: Message;
509
645
  code?: Code;
510
646
  [k: string]: unknown;
@@ -525,10 +661,12 @@ export declare namespace ChatStopAckSchema {
525
661
  export type ChatStopAck = ChatStopAckSchema.ChatStopAck;
526
662
  export declare namespace ChatCompactAckSchema {
527
663
  type Status = string;
664
+ type RunId = (string | null);
528
665
  type Message = (string | null);
529
666
  type Code = (string | number | null);
530
667
  interface ChatCompactAck {
531
668
  status: Status;
669
+ run_id?: RunId;
532
670
  message?: Message;
533
671
  code?: Code;
534
672
  [k: string]: unknown;
@@ -552,6 +690,12 @@ export declare namespace ChatQueueAckSchema {
552
690
  type Items = ChatQueueItem[];
553
691
  type Status1 = string;
554
692
  type Message = (string | null);
693
+ type Status2 = ("accepted" | "not_found" | "error");
694
+ type RequestId = (string | null);
695
+ type ItemId = (string | null);
696
+ type QueueStatus = (string | null);
697
+ type ExecutionId = (string | null);
698
+ type Message1 = (string | null);
555
699
  interface ChatQueueAck {
556
700
  session_id: SessionId;
557
701
  revision: Revision;
@@ -560,6 +704,7 @@ export declare namespace ChatQueueAckSchema {
560
704
  items?: Items;
561
705
  status?: Status1;
562
706
  message?: Message;
707
+ delivery?: (ChatDeliveryAck | null);
563
708
  [k: string]: unknown;
564
709
  }
565
710
  interface ChatQueueItem {
@@ -574,12 +719,40 @@ export declare namespace ChatQueueAckSchema {
574
719
  error?: Error;
575
720
  [k: string]: unknown;
576
721
  }
722
+ interface ChatDeliveryAck {
723
+ status: Status2;
724
+ request_id?: RequestId;
725
+ item_id?: ItemId;
726
+ queue_status?: QueueStatus;
727
+ execution_id?: ExecutionId;
728
+ message?: Message1;
729
+ [k: string]: unknown;
730
+ }
577
731
  }
578
732
  export type ChatQueueAck = ChatQueueAckSchema.ChatQueueAck;
733
+ export declare namespace ChatDeliveryAckSchema {
734
+ type Status = ("accepted" | "not_found" | "error");
735
+ type RequestId = (string | null);
736
+ type ItemId = (string | null);
737
+ type QueueStatus = (string | null);
738
+ type ExecutionId = (string | null);
739
+ type Message = (string | null);
740
+ interface ChatDeliveryAck {
741
+ status: Status;
742
+ request_id?: RequestId;
743
+ item_id?: ItemId;
744
+ queue_status?: QueueStatus;
745
+ execution_id?: ExecutionId;
746
+ message?: Message;
747
+ [k: string]: unknown;
748
+ }
749
+ }
750
+ export type ChatDeliveryAck = ChatDeliveryAckSchema.ChatDeliveryAck;
579
751
  export interface ClientToServerEvents {
580
752
  "chat:send": (payload: ChatSendPayload, ack: (response: ChatSendAck) => void) => void;
581
753
  "chat:stop": (payload: ChatStopPayload, ack: (response: ChatStopAck) => void) => void;
582
754
  "chat:append": (payload: ChatAppendPayload, ack: (response: ChatQueueAck) => void) => void;
755
+ "chat:queue:request": (payload: ChatQueueRequestPayload, ack: (response: ChatDeliveryAck) => void) => void;
583
756
  "chat:compact": (payload: ChatCompactPayload, ack: (response: ChatCompactAck) => void) => void;
584
757
  "chat:queue:list": (payload: ChatQueueListPayload, ack: (response: ChatQueueAck) => void) => void;
585
758
  "chat:queue:update": (payload: ChatQueueUpdatePayload, ack: (response: ChatQueueAck) => void) => void;
@@ -2,7 +2,7 @@ export declare const nextTick: (callback: Function, ...args: any[]) => void;
2
2
  export declare const globalThisShim: typeof globalThis;
3
3
  export declare const defaultBinaryType = "nodebuffer";
4
4
  export declare function createCookieJar(): CookieJar;
5
- interface Cookie {
5
+ export interface Cookie {
6
6
  name: string;
7
7
  value: string;
8
8
  expires?: Date;
@@ -14,8 +14,7 @@ export declare function parse(setCookieString: string): Cookie;
14
14
  export declare class CookieJar {
15
15
  private _cookies;
16
16
  parseCookies(values: string[]): void;
17
- get cookies(): IterableIterator<[string, Cookie]>;
17
+ get cookies(): MapIterator<[string, Cookie]>;
18
18
  addCookies(xhr: any): void;
19
19
  appendCookies(headers: Headers): void;
20
20
  }
21
- export {};
@@ -1,12 +1,12 @@
1
1
  import { Socket } from "./socket.js";
2
2
  export { Socket };
3
- export { SocketOptions, SocketWithoutUpgrade, SocketWithUpgrade, } from "./socket.js";
3
+ export { HandshakeData, SocketOptions, SocketReservedEvents, WriteOptions, TransportCtor, TransportName, } from "./socket.js";
4
4
  export declare const protocol: number;
5
- export { Transport, TransportError } from "./transport.js";
5
+ export { Transport, TransportError, TransportReservedEvents, } from "./transport.js";
6
6
  export { transports } from "./transports/index.js";
7
7
  export { installTimerFunctions } from "./util.js";
8
8
  export { parse } from "./contrib/parseuri.js";
9
- export { nextTick } from "./globals.node.js";
9
+ export { Cookie, nextTick } from "./globals.node.js";
10
10
  export { Fetch } from "./transports/polling-fetch.js";
11
11
  export { XHR as NodeXHR } from "./transports/polling-xhr.node.js";
12
12
  export { XHR } from "./transports/polling-xhr.js";
@@ -1,11 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WebTransport = exports.WebSocket = exports.NodeWebSocket = exports.XHR = exports.NodeXHR = exports.Fetch = exports.nextTick = exports.parse = exports.installTimerFunctions = exports.transports = exports.TransportError = exports.Transport = exports.protocol = exports.SocketWithUpgrade = exports.SocketWithoutUpgrade = exports.Socket = void 0;
3
+ exports.WebTransport = exports.WebSocket = exports.NodeWebSocket = exports.XHR = exports.NodeXHR = exports.Fetch = exports.nextTick = exports.parse = exports.installTimerFunctions = exports.transports = exports.TransportError = exports.Transport = exports.protocol = exports.Socket = void 0;
4
4
  const socket_js_1 = require("./socket.js");
5
5
  Object.defineProperty(exports, "Socket", { enumerable: true, get: function () { return socket_js_1.Socket; } });
6
- var socket_js_2 = require("./socket.js");
7
- Object.defineProperty(exports, "SocketWithoutUpgrade", { enumerable: true, get: function () { return socket_js_2.SocketWithoutUpgrade; } });
8
- Object.defineProperty(exports, "SocketWithUpgrade", { enumerable: true, get: function () { return socket_js_2.SocketWithUpgrade; } });
9
6
  exports.protocol = socket_js_1.Socket.protocol;
10
7
  var transport_js_1 = require("./transport.js");
11
8
  Object.defineProperty(exports, "Transport", { enumerable: true, get: function () { return transport_js_1.Transport; } });
@@ -64,7 +64,20 @@ export interface SocketOptions {
64
64
  *
65
65
  * @default ['polling','websocket', 'webtransport']
66
66
  */
67
- transports?: ("polling" | "websocket" | "webtransport" | string)[] | TransportCtor[];
67
+ transports?: TransportName[] | TransportCtor[];
68
+ /**
69
+ * A list of low-level transport implementations to use instead of the defaults.
70
+ *
71
+ * The order of the array determines the order in which transports are tried.
72
+ *
73
+ * @example
74
+ * import { Fetch, WebSocket } from "engine.io-client";
75
+ *
76
+ * const socket = new Socket({
77
+ * transportImplementations: [Fetch, WebSocket]
78
+ * });
79
+ */
80
+ transportImplementations?: TransportCtor[];
68
81
  /**
69
82
  * Whether all the transports should be tested, instead of just the first one.
70
83
  *
@@ -197,20 +210,18 @@ export interface SocketOptions {
197
210
  */
198
211
  protocols?: string | string[];
199
212
  }
200
- type TransportCtor = {
213
+ export type TransportName = "polling" | "websocket" | "webtransport" | (string & {});
214
+ export type TransportCtor = {
201
215
  new (o: any): Transport;
202
216
  };
203
- type BaseSocketOptions = Omit<SocketOptions, "transports"> & {
204
- transports: TransportCtor[];
205
- };
206
- interface HandshakeData {
217
+ export interface HandshakeData {
207
218
  sid: string;
208
219
  upgrades: string[];
209
220
  pingInterval: number;
210
221
  pingTimeout: number;
211
222
  maxPayload: number;
212
223
  }
213
- interface SocketReservedEvents {
224
+ export interface SocketReservedEvents {
214
225
  open: () => void;
215
226
  handshake: (data: HandshakeData) => void;
216
227
  packet: (packet: Packet) => void;
@@ -229,43 +240,38 @@ interface SocketReservedEvents {
229
240
  close: (reason: string, description?: CloseDetails | Error) => void;
230
241
  }
231
242
  type SocketState = "opening" | "open" | "closing" | "closed";
232
- interface WriteOptions {
243
+ export interface WriteOptions {
233
244
  compress?: boolean;
234
245
  }
235
246
  /**
236
247
  * This class provides a WebSocket-like interface to connect to an Engine.IO server. The connection will be established
237
- * with one of the available low-level transports, like HTTP long-polling, WebSocket or WebTransport.
248
+ * with one of the available low-level transports, like HTTP long-polling, WebSocket, or WebTransport.
238
249
  *
239
- * This class comes without upgrade mechanism, which means that it will keep the first low-level transport that
240
- * successfully establishes the connection.
241
- *
242
- * In order to allow tree-shaking, there are no transports included, that's why the `transports` option is mandatory.
250
+ * This class comes with an upgrade mechanism, which means that once the connection is established with the first
251
+ * low-level transport, it will try to upgrade to a better transport.
243
252
  *
244
253
  * @example
245
- * import { SocketWithoutUpgrade, WebSocket } from "engine.io-client";
254
+ * import { Socket } from "engine.io-client";
246
255
  *
247
- * const socket = new SocketWithoutUpgrade({
248
- * transports: [WebSocket]
249
- * });
256
+ * const socket = new Socket();
250
257
  *
251
258
  * socket.on("open", () => {
252
259
  * socket.send("hello");
253
260
  * });
254
261
  *
255
- * @see SocketWithUpgrade
256
- * @see Socket
257
262
  */
258
- export declare class SocketWithoutUpgrade extends Emitter<Record<never, never>, Record<never, never>, SocketReservedEvents> {
263
+ export declare class Socket extends Emitter<Record<never, never>, Record<never, never>, SocketReservedEvents> {
259
264
  id: string;
260
265
  transport: Transport;
261
266
  binaryType: BinaryType;
262
267
  readyState: SocketState;
263
268
  writeBuffer: Packet[];
264
- protected readonly opts: BaseSocketOptions;
265
- protected readonly transports: string[];
269
+ protected readonly opts: SocketOptions;
270
+ protected readonly transports: TransportName[];
266
271
  protected upgrading: boolean;
267
272
  protected setTimeoutFn: typeof setTimeout;
268
273
  private _prevBufferLen;
274
+ private _upgrades;
269
275
  private _pingInterval;
270
276
  private _pingTimeout;
271
277
  private _maxPayload?;
@@ -294,7 +300,9 @@ export declare class SocketWithoutUpgrade extends Emitter<Record<never, never>,
294
300
  * @param {String|Object} uri - uri or options
295
301
  * @param {Object} opts - options
296
302
  */
297
- constructor(uri: string | BaseSocketOptions, opts: BaseSocketOptions);
303
+ constructor();
304
+ constructor(uri: string, opts?: SocketOptions);
305
+ constructor(opts: SocketOptions);
298
306
  /**
299
307
  * Creates transport of the given type.
300
308
  *
@@ -315,6 +323,13 @@ export declare class SocketWithoutUpgrade extends Emitter<Record<never, never>,
315
323
  * @private
316
324
  */
317
325
  protected setTransport(transport: Transport): void;
326
+ /**
327
+ * Probes a transport.
328
+ *
329
+ * @param {String} name - transport name
330
+ * @private
331
+ */
332
+ private _probe;
318
333
  /**
319
334
  * Called when connection is deemed open.
320
335
  *
@@ -390,7 +405,7 @@ export declare class SocketWithoutUpgrade extends Emitter<Record<never, never>,
390
405
  /**
391
406
  * Sends a packet.
392
407
  *
393
- * @param {String} type: packet type.
408
+ * @param {String} type - packet type.
394
409
  * @param {String} data.
395
410
  * @param {Object} options.
396
411
  * @param {Function} fn - callback function.
@@ -413,41 +428,6 @@ export declare class SocketWithoutUpgrade extends Emitter<Record<never, never>,
413
428
  * @private
414
429
  */
415
430
  private _onClose;
416
- }
417
- /**
418
- * This class provides a WebSocket-like interface to connect to an Engine.IO server. The connection will be established
419
- * with one of the available low-level transports, like HTTP long-polling, WebSocket or WebTransport.
420
- *
421
- * This class comes with an upgrade mechanism, which means that once the connection is established with the first
422
- * low-level transport, it will try to upgrade to a better transport.
423
- *
424
- * In order to allow tree-shaking, there are no transports included, that's why the `transports` option is mandatory.
425
- *
426
- * @example
427
- * import { SocketWithUpgrade, WebSocket } from "engine.io-client";
428
- *
429
- * const socket = new SocketWithUpgrade({
430
- * transports: [WebSocket]
431
- * });
432
- *
433
- * socket.on("open", () => {
434
- * socket.send("hello");
435
- * });
436
- *
437
- * @see SocketWithoutUpgrade
438
- * @see Socket
439
- */
440
- export declare class SocketWithUpgrade extends SocketWithoutUpgrade {
441
- private _upgrades;
442
- onOpen(): void;
443
- /**
444
- * Probes a transport.
445
- *
446
- * @param {String} name - transport name
447
- * @private
448
- */
449
- private _probe;
450
- onHandshake(data: HandshakeData): void;
451
431
  /**
452
432
  * Filters upgrades, returning only those matching client transports.
453
433
  *
@@ -456,27 +436,4 @@ export declare class SocketWithUpgrade extends SocketWithoutUpgrade {
456
436
  */
457
437
  private _filterUpgrades;
458
438
  }
459
- /**
460
- * This class provides a WebSocket-like interface to connect to an Engine.IO server. The connection will be established
461
- * with one of the available low-level transports, like HTTP long-polling, WebSocket or WebTransport.
462
- *
463
- * This class comes with an upgrade mechanism, which means that once the connection is established with the first
464
- * low-level transport, it will try to upgrade to a better transport.
465
- *
466
- * @example
467
- * import { Socket } from "engine.io-client";
468
- *
469
- * const socket = new Socket();
470
- *
471
- * socket.on("open", () => {
472
- * socket.send("hello");
473
- * });
474
- *
475
- * @see SocketWithoutUpgrade
476
- * @see SocketWithUpgrade
477
- */
478
- export declare class Socket extends SocketWithUpgrade {
479
- constructor(uri?: string, opts?: SocketOptions);
480
- constructor(opts: SocketOptions);
481
- }
482
439
  export {};