@blade-hq/agent-client 2612.0.0-beta.7 → 2612.0.0-beta.71

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 (95) hide show
  1. package/README.md +352 -34
  2. package/dist/application-client.d.ts +19 -0
  3. package/dist/blade-client.d.ts +25 -9
  4. package/dist/{chunk-E7J2JBML.js → chunk-DMVWOTJB.js} +1588 -391
  5. package/dist/chunk-DMVWOTJB.js.map +1 -0
  6. package/dist/index.d.ts +18 -5
  7. package/dist/index.js +15 -1
  8. package/dist/internal.d.ts +12 -4
  9. package/dist/internal.js +29 -3
  10. package/dist/internal.js.map +1 -1
  11. package/dist/resources/auth.d.ts +9 -1
  12. package/dist/resources/computers.d.ts +2 -7
  13. package/dist/resources/connectors.d.ts +323 -0
  14. package/dist/resources/headless.d.ts +1 -1
  15. package/dist/resources/llm.d.ts +64 -0
  16. package/dist/resources/models.d.ts +6 -1
  17. package/dist/resources/phones.d.ts +109 -0
  18. package/dist/resources/plugins.d.ts +22 -0
  19. package/dist/resources/sandbox.d.ts +22 -0
  20. package/dist/resources/sessions.d.ts +105 -10
  21. package/dist/schemas/ask-user-question.d.ts +21 -0
  22. package/dist/schemas/context-attachments.d.ts +18 -0
  23. package/dist/schemas/message-utils.d.ts +3 -9
  24. package/dist/schemas/message.d.ts +16 -2
  25. package/dist/schemas/plugin-refs.d.ts +7 -0
  26. package/dist/schemas/projection.d.ts +14 -1
  27. package/dist/schemas/session.d.ts +2 -48
  28. package/dist/server-clock.d.ts +2 -0
  29. package/dist/session/agent-session.d.ts +44 -95
  30. package/dist/session/definition.d.ts +3 -0
  31. package/dist/session/events.d.ts +0 -1
  32. package/dist/session/hub.d.ts +0 -24
  33. package/dist/session/state.d.ts +8 -1
  34. package/dist/session/workflow.d.ts +10 -3
  35. package/dist/shared/projection/builder.d.ts +0 -2
  36. package/dist/shared/projection/index.d.ts +1 -0
  37. package/dist/shared/projection/workflow.d.ts +24 -0
  38. package/dist/tool-provider.d.ts +60 -0
  39. package/dist/types/socket-events.d.ts +167 -11
  40. package/dist/version.d.ts +0 -1
  41. package/node_modules/engine.io-client/build/cjs/globals.node.d.ts +2 -3
  42. package/node_modules/engine.io-client/build/cjs/index.d.ts +3 -3
  43. package/node_modules/engine.io-client/build/cjs/index.js +1 -4
  44. package/node_modules/engine.io-client/build/cjs/socket.d.ts +39 -82
  45. package/node_modules/engine.io-client/build/cjs/socket.js +151 -218
  46. package/node_modules/engine.io-client/build/cjs/transport.d.ts +1 -1
  47. package/node_modules/engine.io-client/build/cjs/transports/polling-xhr.d.ts +4 -4
  48. package/node_modules/engine.io-client/build/cjs/transports/polling-xhr.js +2 -2
  49. package/node_modules/engine.io-client/build/cjs/transports/polling-xhr.node.js +17 -7
  50. package/node_modules/engine.io-client/build/cjs/transports/websocket.node.js +17 -7
  51. package/node_modules/engine.io-client/build/esm/globals.node.d.ts +2 -3
  52. package/node_modules/engine.io-client/build/esm/index.d.ts +3 -3
  53. package/node_modules/engine.io-client/build/esm/index.js +1 -2
  54. package/node_modules/engine.io-client/build/esm/socket.d.ts +39 -82
  55. package/node_modules/engine.io-client/build/esm/socket.js +141 -206
  56. package/node_modules/engine.io-client/build/esm/transport.d.ts +1 -1
  57. package/node_modules/engine.io-client/build/esm/transports/polling-xhr.d.ts +4 -4
  58. package/node_modules/engine.io-client/build/esm/transports/polling-xhr.js +2 -2
  59. package/node_modules/engine.io-client/build/esm-debug/globals.node.d.ts +2 -3
  60. package/node_modules/engine.io-client/build/esm-debug/index.d.ts +3 -3
  61. package/node_modules/engine.io-client/build/esm-debug/index.js +1 -2
  62. package/node_modules/engine.io-client/build/esm-debug/socket.d.ts +39 -82
  63. package/node_modules/engine.io-client/build/esm-debug/socket.js +150 -215
  64. package/node_modules/engine.io-client/build/esm-debug/transport.d.ts +1 -1
  65. package/node_modules/engine.io-client/build/esm-debug/transports/polling-xhr.d.ts +4 -4
  66. package/node_modules/engine.io-client/build/esm-debug/transports/polling-xhr.js +2 -2
  67. package/node_modules/engine.io-client/dist/engine.io.esm.min.js +3 -3
  68. package/node_modules/engine.io-client/dist/engine.io.esm.min.js.map +1 -1
  69. package/node_modules/engine.io-client/dist/engine.io.js +164 -239
  70. package/node_modules/engine.io-client/dist/engine.io.js.map +1 -1
  71. package/node_modules/engine.io-client/dist/engine.io.min.js +3 -3
  72. package/node_modules/engine.io-client/dist/engine.io.min.js.map +1 -1
  73. package/node_modules/engine.io-client/package.json +2 -2
  74. package/node_modules/socket.io-parser/build/cjs/binary.js +4 -1
  75. package/node_modules/socket.io-parser/build/cjs/index.d.ts +14 -4
  76. package/node_modules/socket.io-parser/build/cjs/index.js +18 -11
  77. package/node_modules/socket.io-parser/build/esm/binary.js +4 -1
  78. package/node_modules/socket.io-parser/build/esm/index.d.ts +14 -4
  79. package/node_modules/socket.io-parser/build/esm/index.js +14 -10
  80. package/node_modules/socket.io-parser/build/esm-debug/binary.js +4 -1
  81. package/node_modules/socket.io-parser/build/esm-debug/index.d.ts +14 -4
  82. package/node_modules/socket.io-parser/build/esm-debug/index.js +14 -10
  83. package/node_modules/socket.io-parser/package.json +1 -1
  84. package/node_modules/ws/index.js +15 -6
  85. package/node_modules/ws/lib/constants.js +1 -0
  86. package/node_modules/ws/lib/permessage-deflate.js +9 -7
  87. package/node_modules/ws/lib/receiver.js +37 -0
  88. package/node_modules/ws/lib/sender.js +6 -1
  89. package/node_modules/ws/lib/websocket-server.js +18 -6
  90. package/node_modules/ws/lib/websocket.js +50 -17
  91. package/node_modules/ws/package.json +8 -3
  92. package/node_modules/ws/wrapper.mjs +14 -1
  93. package/package.json +4 -4
  94. package/public-api.md +662 -36
  95. package/dist/chunk-E7J2JBML.js.map +0 -1
@@ -8,7 +8,25 @@ 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 UpdateFormat = (("snapshot" | "diff") | null);
19
+ type Data = ({
20
+ [k: string]: unknown;
21
+ } | null);
22
+ /**
23
+ * @maxItems 20
24
+ */
25
+ 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];
26
+ type Name = string;
27
+ type SessionId = (string | null);
28
+ type Path = (string | null);
29
+ type SessionId1 = string;
12
30
  type ClientRequestId = (string | null);
13
31
  type Mode = (("planning" | "executing") | null);
14
32
  type AskuserAnswer = ({
@@ -32,25 +50,28 @@ export declare namespace ChatSendPayloadSchema {
32
50
  [k: string]: unknown;
33
51
  } | null);
34
52
  type CompactionRatio = (number | null);
35
- type NativeApprovalPolicy = (("unlessTrusted" | "never") | null);
36
53
  /**
37
54
  * @maxItems 20
38
55
  */
39
- type Refs = [] | [PluginRef] | [PluginRef, PluginRef] | [PluginRef, PluginRef, PluginRef] | [PluginRef, PluginRef, PluginRef, PluginRef] | [PluginRef, PluginRef, PluginRef, PluginRef, PluginRef] | [PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef] | [PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef] | [PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef] | [PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef] | [PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef] | [PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef] | [PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef] | [PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef] | [PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef] | [PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef] | [PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef] | [PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef] | [PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef] | [PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef] | [PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef, PluginRef];
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)];
40
57
  type Provider = "plugin";
41
58
  type Plugin = string;
42
59
  type Server = string;
43
- type Id = string;
44
- type Label = string;
60
+ type Id1 = string;
61
+ type Label1 = string;
62
+ type Provider1 = "skill";
63
+ type Id2 = string;
64
+ type Label2 = string;
45
65
  /**
46
66
  * @maxItems 20
47
67
  */
48
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];
49
69
  type TopicId = string;
50
- type Path = string;
70
+ type Path1 = string;
51
71
  type QueueWhenRunning = boolean;
52
72
  interface ChatSendPayload {
53
- session_id: SessionId;
73
+ context_attachments?: ContextAttachments;
74
+ session_id: SessionId1;
54
75
  message: Message;
55
76
  client_request_id?: ClientRequestId;
56
77
  mode?: Mode;
@@ -65,12 +86,24 @@ export declare namespace ChatSendPayloadSchema {
65
86
  runtime_env?: RuntimeEnv;
66
87
  app_context?: AppContext;
67
88
  compaction_ratio?: CompactionRatio;
68
- native_approval_policy?: NativeApprovalPolicy;
69
89
  refs?: Refs;
70
90
  topic_asset_refs?: TopicAssetRefs;
71
91
  queue_when_running?: QueueWhenRunning;
72
92
  [k: string]: unknown;
73
93
  }
94
+ interface ContextAttachment {
95
+ id: Id;
96
+ label: Label;
97
+ content: Content;
98
+ update_format?: UpdateFormat;
99
+ data?: Data;
100
+ files?: Files;
101
+ }
102
+ interface ContextAttachmentFile {
103
+ name: Name;
104
+ session_id?: SessionId;
105
+ path?: Path;
106
+ }
74
107
  interface Message {
75
108
  [k: string]: unknown;
76
109
  }
@@ -84,13 +117,19 @@ export declare namespace ChatSendPayloadSchema {
84
117
  provider: Provider;
85
118
  plugin: Plugin;
86
119
  server: Server;
87
- id: Id;
88
- label: Label;
120
+ id: Id1;
121
+ label: Label1;
122
+ [k: string]: unknown;
123
+ }
124
+ interface SkillRef {
125
+ provider: Provider1;
126
+ id: Id2;
127
+ label: Label2;
89
128
  [k: string]: unknown;
90
129
  }
91
130
  interface TopicAssetRef {
92
131
  topic_id: TopicId;
93
- path: Path;
132
+ path: Path1;
94
133
  [k: string]: unknown;
95
134
  }
96
135
  }
@@ -109,14 +148,71 @@ export declare namespace ChatAppendPayloadSchema {
109
148
  type SessionId = string;
110
149
  type Message = string;
111
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 UpdateFormat = (("snapshot" | "diff") | null);
159
+ type Data = ({
160
+ [k: string]: unknown;
161
+ } | null);
162
+ /**
163
+ * @maxItems 20
164
+ */
165
+ 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];
166
+ type Name = string;
167
+ type SessionId1 = (string | null);
168
+ type Path = (string | null);
169
+ type Headless = (boolean | null);
170
+ type QueueWhenRunning = (boolean | null);
171
+ type Mode = (("planning" | "executing") | null);
172
+ type Model = (string | null);
173
+ type ThinkingOverride = (boolean | null);
174
+ type ReasoningLevel = (("off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max") | null);
112
175
  interface ChatAppendPayload {
113
176
  session_id: SessionId;
114
177
  message: Message;
115
178
  client_request_id?: ClientRequestId;
179
+ prepared_options?: (PreparedSendOptions | null);
116
180
  [k: string]: unknown;
117
181
  }
182
+ interface PreparedSendOptions {
183
+ context_attachments?: ContextAttachments;
184
+ headless?: Headless;
185
+ queue_when_running?: QueueWhenRunning;
186
+ mode?: Mode;
187
+ model?: Model;
188
+ thinking_override?: ThinkingOverride;
189
+ reasoning_level?: ReasoningLevel;
190
+ }
191
+ interface ContextAttachment {
192
+ id: Id;
193
+ label: Label;
194
+ content: Content;
195
+ update_format?: UpdateFormat;
196
+ data?: Data;
197
+ files?: Files;
198
+ }
199
+ interface ContextAttachmentFile {
200
+ name: Name;
201
+ session_id?: SessionId1;
202
+ path?: Path;
203
+ }
118
204
  }
119
205
  export type ChatAppendPayload = ChatAppendPayloadSchema.ChatAppendPayload;
206
+ export declare namespace ChatQueueRequestPayloadSchema {
207
+ type SessionId = string;
208
+ type ClientRequestId = string;
209
+ interface ChatQueueRequestPayload {
210
+ session_id: SessionId;
211
+ client_request_id: ClientRequestId;
212
+ [k: string]: unknown;
213
+ }
214
+ }
215
+ export type ChatQueueRequestPayload = ChatQueueRequestPayloadSchema.ChatQueueRequestPayload;
120
216
  export declare namespace ChatCompactPayloadSchema {
121
217
  type SessionId = string;
122
218
  interface ChatCompactPayload {
@@ -125,6 +221,16 @@ export declare namespace ChatCompactPayloadSchema {
125
221
  }
126
222
  }
127
223
  export type ChatCompactPayload = ChatCompactPayloadSchema.ChatCompactPayload;
224
+ export declare namespace ChatModelPayloadSchema {
225
+ type SessionId = string;
226
+ type Model = string;
227
+ interface ChatModelPayload {
228
+ session_id: SessionId;
229
+ model: Model;
230
+ [k: string]: unknown;
231
+ }
232
+ }
233
+ export type ChatModelPayload = ChatModelPayloadSchema.ChatModelPayload;
128
234
  export declare namespace ChatQueueListPayloadSchema {
129
235
  type SessionId = string;
130
236
  interface ChatQueueListPayload {
@@ -421,6 +527,7 @@ export declare namespace SystemNotificationPayloadSchema {
421
527
  }
422
528
  export type SystemNotificationPayload = SystemNotificationPayloadSchema.SystemNotificationPayload;
423
529
  export declare namespace TurnEventsPayloadSchema {
530
+ type ServerTime = (string | null);
424
531
  type SessionId = string;
425
532
  type Type = string;
426
533
  type StreamSequence = (number | null);
@@ -429,6 +536,7 @@ export declare namespace TurnEventsPayloadSchema {
429
536
  type DeltaSeq = (number | null);
430
537
  type Events = RawWireEvent[];
431
538
  interface TurnEventsPayload {
539
+ server_time?: ServerTime;
432
540
  session_id: SessionId;
433
541
  events: Events;
434
542
  [k: string]: unknown;
@@ -581,6 +689,18 @@ export declare namespace ChatCompactAckSchema {
581
689
  }
582
690
  }
583
691
  export type ChatCompactAck = ChatCompactAckSchema.ChatCompactAck;
692
+ export declare namespace ChatModelAckSchema {
693
+ type Status = string;
694
+ type Model = (string | null);
695
+ type Message = (string | null);
696
+ interface ChatModelAck {
697
+ status: Status;
698
+ model?: Model;
699
+ message?: Message;
700
+ [k: string]: unknown;
701
+ }
702
+ }
703
+ export type ChatModelAck = ChatModelAckSchema.ChatModelAck;
584
704
  export declare namespace ChatQueueAckSchema {
585
705
  type SessionId = string;
586
706
  type Revision = number;
@@ -598,6 +718,12 @@ export declare namespace ChatQueueAckSchema {
598
718
  type Items = ChatQueueItem[];
599
719
  type Status1 = string;
600
720
  type Message = (string | null);
721
+ type Status2 = ("accepted" | "not_found" | "error");
722
+ type RequestId = (string | null);
723
+ type ItemId = (string | null);
724
+ type QueueStatus = (string | null);
725
+ type ExecutionId = (string | null);
726
+ type Message1 = (string | null);
601
727
  interface ChatQueueAck {
602
728
  session_id: SessionId;
603
729
  revision: Revision;
@@ -606,6 +732,7 @@ export declare namespace ChatQueueAckSchema {
606
732
  items?: Items;
607
733
  status?: Status1;
608
734
  message?: Message;
735
+ delivery?: (ChatDeliveryAck | null);
609
736
  [k: string]: unknown;
610
737
  }
611
738
  interface ChatQueueItem {
@@ -620,13 +747,42 @@ export declare namespace ChatQueueAckSchema {
620
747
  error?: Error;
621
748
  [k: string]: unknown;
622
749
  }
750
+ interface ChatDeliveryAck {
751
+ status: Status2;
752
+ request_id?: RequestId;
753
+ item_id?: ItemId;
754
+ queue_status?: QueueStatus;
755
+ execution_id?: ExecutionId;
756
+ message?: Message1;
757
+ [k: string]: unknown;
758
+ }
623
759
  }
624
760
  export type ChatQueueAck = ChatQueueAckSchema.ChatQueueAck;
761
+ export declare namespace ChatDeliveryAckSchema {
762
+ type Status = ("accepted" | "not_found" | "error");
763
+ type RequestId = (string | null);
764
+ type ItemId = (string | null);
765
+ type QueueStatus = (string | null);
766
+ type ExecutionId = (string | null);
767
+ type Message = (string | null);
768
+ interface ChatDeliveryAck {
769
+ status: Status;
770
+ request_id?: RequestId;
771
+ item_id?: ItemId;
772
+ queue_status?: QueueStatus;
773
+ execution_id?: ExecutionId;
774
+ message?: Message;
775
+ [k: string]: unknown;
776
+ }
777
+ }
778
+ export type ChatDeliveryAck = ChatDeliveryAckSchema.ChatDeliveryAck;
625
779
  export interface ClientToServerEvents {
626
780
  "chat:send": (payload: ChatSendPayload, ack: (response: ChatSendAck) => void) => void;
627
781
  "chat:stop": (payload: ChatStopPayload, ack: (response: ChatStopAck) => void) => void;
628
782
  "chat:append": (payload: ChatAppendPayload, ack: (response: ChatQueueAck) => void) => void;
783
+ "chat:queue:request": (payload: ChatQueueRequestPayload, ack: (response: ChatDeliveryAck) => void) => void;
629
784
  "chat:compact": (payload: ChatCompactPayload, ack: (response: ChatCompactAck) => void) => void;
785
+ "chat:model": (payload: ChatModelPayload, ack: (response: ChatModelAck) => void) => void;
630
786
  "chat:queue:list": (payload: ChatQueueListPayload, ack: (response: ChatQueueAck) => void) => void;
631
787
  "chat:queue:update": (payload: ChatQueueUpdatePayload, ack: (response: ChatQueueAck) => void) => void;
632
788
  "chat:queue:reorder": (payload: ChatQueueReorderPayload, ack: (response: ChatQueueAck) => void) => void;
package/dist/version.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /** Socket.IO 握手使用的 SDK 身份。Server 只校验 1.1.1 这次破坏性变更。 */
2
1
  /**
3
2
  * 本 SDK 的 npm 包版本,随 Socket.IO 握手一并声明。
4
3
  * Release 构建由 Git Tag 注入;本地开发回退到当前源码版本。
@@ -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 {};