pilotswarm-sdk 0.5.19 → 0.5.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 (201) hide show
  1. package/api/src/http-api-transport.js +4 -0
  2. package/api/src/protocol.js +2 -0
  3. package/dist/blob-store.d.ts +42 -11
  4. package/dist/blob-store.d.ts.map +1 -1
  5. package/dist/blob-store.js +163 -53
  6. package/dist/blob-store.js.map +1 -1
  7. package/dist/cms-migrations.d.ts.map +1 -1
  8. package/dist/cms-migrations.js +231 -0
  9. package/dist/cms-migrations.js.map +1 -1
  10. package/dist/cms.d.ts +62 -0
  11. package/dist/cms.d.ts.map +1 -1
  12. package/dist/cms.js +81 -4
  13. package/dist/cms.js.map +1 -1
  14. package/dist/distiller-tools.d.ts +9 -0
  15. package/dist/distiller-tools.d.ts.map +1 -0
  16. package/dist/distiller-tools.js +102 -0
  17. package/dist/distiller-tools.js.map +1 -0
  18. package/dist/footprint.d.ts +129 -0
  19. package/dist/footprint.d.ts.map +1 -0
  20. package/dist/footprint.js +254 -0
  21. package/dist/footprint.js.map +1 -0
  22. package/dist/inspect-tools.d.ts.map +1 -1
  23. package/dist/inspect-tools.js +63 -2
  24. package/dist/inspect-tools.js.map +1 -1
  25. package/dist/managed-session.d.ts.map +1 -1
  26. package/dist/managed-session.js +140 -14
  27. package/dist/managed-session.js.map +1 -1
  28. package/dist/management-client.d.ts +32 -0
  29. package/dist/management-client.d.ts.map +1 -1
  30. package/dist/management-client.js +93 -0
  31. package/dist/management-client.js.map +1 -1
  32. package/dist/orchestration/agents.d.ts +18 -0
  33. package/dist/orchestration/agents.d.ts.map +1 -1
  34. package/dist/orchestration/agents.js +63 -3
  35. package/dist/orchestration/agents.js.map +1 -1
  36. package/dist/orchestration/index.d.ts +2 -2
  37. package/dist/orchestration/index.js +1 -1
  38. package/dist/orchestration/lifecycle.d.ts +1 -0
  39. package/dist/orchestration/lifecycle.d.ts.map +1 -1
  40. package/dist/orchestration/lifecycle.js +349 -1
  41. package/dist/orchestration/lifecycle.js.map +1 -1
  42. package/dist/orchestration/queue.d.ts.map +1 -1
  43. package/dist/orchestration/queue.js +61 -2
  44. package/dist/orchestration/queue.js.map +1 -1
  45. package/dist/orchestration/runtime.d.ts +1 -1
  46. package/dist/orchestration/runtime.d.ts.map +1 -1
  47. package/dist/orchestration/runtime.js +31 -1
  48. package/dist/orchestration/runtime.js.map +1 -1
  49. package/dist/orchestration/state.d.ts +29 -0
  50. package/dist/orchestration/state.d.ts.map +1 -1
  51. package/dist/orchestration/state.js +11 -0
  52. package/dist/orchestration/state.js.map +1 -1
  53. package/dist/orchestration/turn.d.ts.map +1 -1
  54. package/dist/orchestration/turn.js +68 -1
  55. package/dist/orchestration/turn.js.map +1 -1
  56. package/dist/orchestration-registry.d.ts.map +1 -1
  57. package/dist/orchestration-registry.js +8 -2
  58. package/dist/orchestration-registry.js.map +1 -1
  59. package/dist/orchestration-version.d.ts +1 -1
  60. package/dist/orchestration-version.js +1 -1
  61. package/dist/orchestration.d.ts +2 -2
  62. package/dist/orchestration.js +1 -1
  63. package/dist/orchestration_1_0_46.d.ts +1 -1
  64. package/dist/orchestration_1_0_47.d.ts +1 -1
  65. package/dist/orchestration_1_0_48.d.ts +1 -1
  66. package/dist/orchestration_1_0_49.d.ts +1 -1
  67. package/dist/orchestration_1_0_50.d.ts +1 -1
  68. package/dist/orchestration_1_0_65/agents.d.ts +43 -0
  69. package/dist/orchestration_1_0_65/agents.d.ts.map +1 -0
  70. package/dist/orchestration_1_0_65/agents.js +780 -0
  71. package/dist/orchestration_1_0_65/agents.js.map +1 -0
  72. package/dist/orchestration_1_0_65/index.d.ts +24 -0
  73. package/dist/orchestration_1_0_65/index.d.ts.map +1 -0
  74. package/dist/orchestration_1_0_65/index.js +13 -0
  75. package/dist/orchestration_1_0_65/index.js.map +1 -0
  76. package/dist/orchestration_1_0_65/lifecycle.d.ts +48 -0
  77. package/dist/orchestration_1_0_65/lifecycle.d.ts.map +1 -0
  78. package/dist/orchestration_1_0_65/lifecycle.js +572 -0
  79. package/dist/orchestration_1_0_65/lifecycle.js.map +1 -0
  80. package/dist/orchestration_1_0_65/queue.d.ts +7 -0
  81. package/dist/orchestration_1_0_65/queue.d.ts.map +1 -0
  82. package/dist/orchestration_1_0_65/queue.js +745 -0
  83. package/dist/orchestration_1_0_65/queue.js.map +1 -0
  84. package/dist/orchestration_1_0_65/runtime.d.ts +29 -0
  85. package/dist/orchestration_1_0_65/runtime.d.ts.map +1 -0
  86. package/dist/orchestration_1_0_65/runtime.js +195 -0
  87. package/dist/orchestration_1_0_65/runtime.js.map +1 -0
  88. package/dist/orchestration_1_0_65/state.d.ts +147 -0
  89. package/dist/orchestration_1_0_65/state.d.ts.map +1 -0
  90. package/dist/orchestration_1_0_65/state.js +147 -0
  91. package/dist/orchestration_1_0_65/state.js.map +1 -0
  92. package/dist/orchestration_1_0_65/turn.d.ts +34 -0
  93. package/dist/orchestration_1_0_65/turn.d.ts.map +1 -0
  94. package/dist/orchestration_1_0_65/turn.js +1144 -0
  95. package/dist/orchestration_1_0_65/turn.js.map +1 -0
  96. package/dist/orchestration_1_0_65/utils.d.ts +39 -0
  97. package/dist/orchestration_1_0_65/utils.d.ts.map +1 -0
  98. package/dist/orchestration_1_0_65/utils.js +316 -0
  99. package/dist/orchestration_1_0_65/utils.js.map +1 -0
  100. package/dist/orchestration_1_0_66/agents.d.ts +52 -0
  101. package/dist/orchestration_1_0_66/agents.d.ts.map +1 -0
  102. package/dist/orchestration_1_0_66/agents.js +825 -0
  103. package/dist/orchestration_1_0_66/agents.js.map +1 -0
  104. package/dist/orchestration_1_0_66/index.d.ts +24 -0
  105. package/dist/orchestration_1_0_66/index.d.ts.map +1 -0
  106. package/dist/orchestration_1_0_66/index.js +13 -0
  107. package/dist/orchestration_1_0_66/index.js.map +1 -0
  108. package/dist/orchestration_1_0_66/lifecycle.d.ts +48 -0
  109. package/dist/orchestration_1_0_66/lifecycle.d.ts.map +1 -0
  110. package/dist/orchestration_1_0_66/lifecycle.js +573 -0
  111. package/dist/orchestration_1_0_66/lifecycle.js.map +1 -0
  112. package/dist/orchestration_1_0_66/queue.d.ts +7 -0
  113. package/dist/orchestration_1_0_66/queue.d.ts.map +1 -0
  114. package/dist/orchestration_1_0_66/queue.js +776 -0
  115. package/dist/orchestration_1_0_66/queue.js.map +1 -0
  116. package/dist/orchestration_1_0_66/runtime.d.ts +29 -0
  117. package/dist/orchestration_1_0_66/runtime.d.ts.map +1 -0
  118. package/dist/orchestration_1_0_66/runtime.js +198 -0
  119. package/dist/orchestration_1_0_66/runtime.js.map +1 -0
  120. package/dist/orchestration_1_0_66/state.d.ts +149 -0
  121. package/dist/orchestration_1_0_66/state.d.ts.map +1 -0
  122. package/dist/orchestration_1_0_66/state.js +148 -0
  123. package/dist/orchestration_1_0_66/state.js.map +1 -0
  124. package/dist/orchestration_1_0_66/turn.d.ts +34 -0
  125. package/dist/orchestration_1_0_66/turn.d.ts.map +1 -0
  126. package/dist/orchestration_1_0_66/turn.js +1169 -0
  127. package/dist/orchestration_1_0_66/turn.js.map +1 -0
  128. package/dist/orchestration_1_0_66/utils.d.ts +39 -0
  129. package/dist/orchestration_1_0_66/utils.d.ts.map +1 -0
  130. package/dist/orchestration_1_0_66/utils.js +316 -0
  131. package/dist/orchestration_1_0_66/utils.js.map +1 -0
  132. package/dist/orchestration_1_0_67/agents.d.ts +52 -0
  133. package/dist/orchestration_1_0_67/agents.d.ts.map +1 -0
  134. package/dist/orchestration_1_0_67/agents.js +825 -0
  135. package/dist/orchestration_1_0_67/agents.js.map +1 -0
  136. package/dist/orchestration_1_0_67/index.d.ts +28 -0
  137. package/dist/orchestration_1_0_67/index.d.ts.map +1 -0
  138. package/dist/orchestration_1_0_67/index.js +13 -0
  139. package/dist/orchestration_1_0_67/index.js.map +1 -0
  140. package/dist/orchestration_1_0_67/lifecycle.d.ts +49 -0
  141. package/dist/orchestration_1_0_67/lifecycle.d.ts.map +1 -0
  142. package/dist/orchestration_1_0_67/lifecycle.js +807 -0
  143. package/dist/orchestration_1_0_67/lifecycle.js.map +1 -0
  144. package/dist/orchestration_1_0_67/queue.d.ts +7 -0
  145. package/dist/orchestration_1_0_67/queue.d.ts.map +1 -0
  146. package/dist/orchestration_1_0_67/queue.js +804 -0
  147. package/dist/orchestration_1_0_67/queue.js.map +1 -0
  148. package/dist/orchestration_1_0_67/runtime.d.ts +29 -0
  149. package/dist/orchestration_1_0_67/runtime.d.ts.map +1 -0
  150. package/dist/orchestration_1_0_67/runtime.js +228 -0
  151. package/dist/orchestration_1_0_67/runtime.js.map +1 -0
  152. package/dist/orchestration_1_0_67/state.d.ts +176 -0
  153. package/dist/orchestration_1_0_67/state.d.ts.map +1 -0
  154. package/dist/orchestration_1_0_67/state.js +158 -0
  155. package/dist/orchestration_1_0_67/state.js.map +1 -0
  156. package/dist/orchestration_1_0_67/turn.d.ts +34 -0
  157. package/dist/orchestration_1_0_67/turn.d.ts.map +1 -0
  158. package/dist/orchestration_1_0_67/turn.js +1208 -0
  159. package/dist/orchestration_1_0_67/turn.js.map +1 -0
  160. package/dist/orchestration_1_0_67/utils.d.ts +39 -0
  161. package/dist/orchestration_1_0_67/utils.d.ts.map +1 -0
  162. package/dist/orchestration_1_0_67/utils.js +316 -0
  163. package/dist/orchestration_1_0_67/utils.js.map +1 -0
  164. package/dist/regen-worker.d.ts +167 -0
  165. package/dist/regen-worker.d.ts.map +1 -0
  166. package/dist/regen-worker.js +512 -0
  167. package/dist/regen-worker.js.map +1 -0
  168. package/dist/resourcemgr-tools.d.ts.map +1 -1
  169. package/dist/resourcemgr-tools.js +33 -2
  170. package/dist/resourcemgr-tools.js.map +1 -1
  171. package/dist/session-lifecycle.d.ts +8 -0
  172. package/dist/session-lifecycle.d.ts.map +1 -1
  173. package/dist/session-lifecycle.js +35 -17
  174. package/dist/session-lifecycle.js.map +1 -1
  175. package/dist/session-manager.d.ts +21 -0
  176. package/dist/session-manager.d.ts.map +1 -1
  177. package/dist/session-manager.js +104 -11
  178. package/dist/session-manager.js.map +1 -1
  179. package/dist/session-proxy.d.ts +34 -0
  180. package/dist/session-proxy.d.ts.map +1 -1
  181. package/dist/session-proxy.js +407 -5
  182. package/dist/session-proxy.js.map +1 -1
  183. package/dist/session-store.d.ts +50 -15
  184. package/dist/session-store.d.ts.map +1 -1
  185. package/dist/session-store.js +143 -30
  186. package/dist/session-store.js.map +1 -1
  187. package/dist/snapshot-protocol.d.ts +34 -3
  188. package/dist/snapshot-protocol.d.ts.map +1 -1
  189. package/dist/snapshot-protocol.js +25 -0
  190. package/dist/snapshot-protocol.js.map +1 -1
  191. package/dist/types.d.ts +101 -1
  192. package/dist/types.d.ts.map +1 -1
  193. package/dist/types.js.map +1 -1
  194. package/dist/web/web-management-client.d.ts +11 -0
  195. package/dist/web/web-management-client.d.ts.map +1 -1
  196. package/dist/web/web-management-client.js +8 -0
  197. package/dist/web/web-management-client.js.map +1 -1
  198. package/dist/worker.d.ts.map +1 -1
  199. package/dist/worker.js +7 -0
  200. package/dist/worker.js.map +1 -1
  201. package/package.json +1 -1
@@ -0,0 +1,34 @@
1
+ import type { MessageSender } from "../message-sender.js";
2
+ import type { PromptAttachmentRef } from "../types.js";
3
+ import type { TurnResult } from "../types.js";
4
+ import { type DurableSessionRuntime } from "./state.js";
5
+ /**
6
+ * Scan a finished turn's captured events for a failed `set_session_model` tool
7
+ * call. The inline control tool returns its outcome as a plain string (see
8
+ * session-proxy `setSessionModel`), so `tool.execution_complete.data.result`
9
+ * is usually a string; some transports wrap it as `{ content }`. We match the
10
+ * `set_session_model failed` marker across both shapes. Exported for unit tests.
11
+ */
12
+ export declare function detectFailedModelSwitch(events: Array<{
13
+ eventType?: string;
14
+ data?: any;
15
+ }> | undefined): string | null;
16
+ /** @internal Project a non-retryable credential failure without terminating the orchestration. */
17
+ export declare function projectAuthFailure(runtime: DurableSessionRuntime, errorMessage: string): Generator<any, void, any>;
18
+ export declare function processPrompt(runtime: DurableSessionRuntime, promptText: string, isBootstrap: boolean, requiredTool?: string, clientMessageIds?: string[], cycleOrigin?: "cron" | "cron_at", sender?: MessageSender, attachments?: PromptAttachmentRef[]): Generator<any, void, any>;
19
+ /**
20
+ * Normalize a raced runTurn branch value. The duroxide-node select bridge
21
+ * flattens activity failures into their raw error string (make_select_future:
22
+ * `Ok(v) => v, Err(e) => e`) instead of throwing into the generator, so the
23
+ * caller must distinguish a TurnResult payload from an error message.
24
+ */
25
+ export declare function normalizeRacedTurnValue(value: any): {
26
+ kind: "result";
27
+ result: any;
28
+ } | {
29
+ kind: "error";
30
+ message: string;
31
+ };
32
+ export declare function handleTurnResult(runtime: DurableSessionRuntime, result: TurnResult, sourcePrompt: string, cycleOrigin?: "cron" | "cron_at", clientMessageIds?: string[]): Generator<any, void, any>;
33
+ export declare function processTimer(runtime: DurableSessionRuntime, timerItem: any): Generator<any, void, any>;
34
+ //# sourceMappingURL=turn.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"turn.d.ts","sourceRoot":"","sources":["../../src/orchestration_1_0_65/turn.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,KAAK,EAAsB,UAAU,EAAE,MAAM,aAAa,CAAC;AA8BlE,OAAO,EAKH,KAAK,qBAAqB,EAC7B,MAAM,YAAY,CAAC;AAkCpB;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,KAAK,CAAC;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,GAAG,CAAA;CAAE,CAAC,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAYpH;AA8GD,kGAAkG;AAClG,wBAAiB,kBAAkB,CAC/B,OAAO,EAAE,qBAAqB,EAC9B,YAAY,EAAE,MAAM,GACrB,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,CAAC,CAe3B;AAwCD,wBAAiB,aAAa,CAC1B,OAAO,EAAE,qBAAqB,EAC9B,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,OAAO,EACpB,YAAY,CAAC,EAAE,MAAM,EACrB,gBAAgB,CAAC,EAAE,MAAM,EAAE,EAC3B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,EAChC,MAAM,CAAC,EAAE,aAAa,EACtB,WAAW,CAAC,EAAE,mBAAmB,EAAE,GACpC,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,CAAC,CAsO3B;AAID;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,GAAG,GAAG;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,GAAG,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAaxH;AA+TD,wBAAiB,gBAAgB,CAC7B,OAAO,EAAE,qBAAqB,EAC9B,MAAM,EAAE,UAAU,EAClB,YAAY,EAAE,MAAM,EACpB,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,EAChC,gBAAgB,CAAC,EAAE,MAAM,EAAE,GAC5B,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,CAAC,CAmR3B;AAID,wBAAiB,YAAY,CACzB,OAAO,EAAE,qBAAqB,EAC9B,SAAS,EAAE,GAAG,GACf,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,CAAC,CAoN3B"}