pilotswarm-sdk 0.2.1 → 0.3.0

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 (94) hide show
  1. package/dist/agent-loader.d.ts +8 -6
  2. package/dist/agent-loader.d.ts.map +1 -1
  3. package/dist/agent-loader.js +5 -1
  4. package/dist/agent-loader.js.map +1 -1
  5. package/dist/facts-migrations.d.ts.map +1 -1
  6. package/dist/facts-migrations.js +176 -0
  7. package/dist/facts-migrations.js.map +1 -1
  8. package/dist/facts-store.d.ts +41 -14
  9. package/dist/facts-store.d.ts.map +1 -1
  10. package/dist/facts-store.js +83 -29
  11. package/dist/facts-store.js.map +1 -1
  12. package/dist/facts-tools.d.ts +4 -0
  13. package/dist/facts-tools.d.ts.map +1 -1
  14. package/dist/facts-tools.js +24 -16
  15. package/dist/facts-tools.js.map +1 -1
  16. package/dist/graph-store.d.ts +1 -1
  17. package/dist/graph-store.js +1 -1
  18. package/dist/graph-tools.d.ts +8 -6
  19. package/dist/graph-tools.d.ts.map +1 -1
  20. package/dist/graph-tools.js +37 -26
  21. package/dist/graph-tools.js.map +1 -1
  22. package/dist/index.d.ts +1 -1
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js.map +1 -1
  25. package/dist/orchestration/index.d.ts +2 -2
  26. package/dist/orchestration/index.js +1 -1
  27. package/dist/orchestration/lifecycle.d.ts.map +1 -1
  28. package/dist/orchestration/lifecycle.js +1 -0
  29. package/dist/orchestration/lifecycle.js.map +1 -1
  30. package/dist/orchestration/runtime.d.ts +1 -1
  31. package/dist/orchestration/runtime.d.ts.map +1 -1
  32. package/dist/orchestration/runtime.js +4 -0
  33. package/dist/orchestration/runtime.js.map +1 -1
  34. package/dist/orchestration-registry.d.ts.map +1 -1
  35. package/dist/orchestration-registry.js +4 -2
  36. package/dist/orchestration-registry.js.map +1 -1
  37. package/dist/orchestration-version.d.ts +1 -1
  38. package/dist/orchestration-version.js +1 -1
  39. package/dist/orchestration.d.ts +2 -2
  40. package/dist/orchestration.js +1 -1
  41. package/dist/orchestration_1_0_46.d.ts +1 -1
  42. package/dist/orchestration_1_0_47.d.ts +1 -1
  43. package/dist/orchestration_1_0_48.d.ts +1 -1
  44. package/dist/orchestration_1_0_49.d.ts +1 -1
  45. package/dist/orchestration_1_0_50.d.ts +1 -1
  46. package/dist/orchestration_1_0_53/agents.d.ts +41 -0
  47. package/dist/orchestration_1_0_53/agents.d.ts.map +1 -0
  48. package/dist/orchestration_1_0_53/agents.js +758 -0
  49. package/dist/orchestration_1_0_53/agents.js.map +1 -0
  50. package/dist/orchestration_1_0_53/index.d.ts +24 -0
  51. package/dist/orchestration_1_0_53/index.d.ts.map +1 -0
  52. package/dist/orchestration_1_0_53/index.js +13 -0
  53. package/dist/orchestration_1_0_53/index.js.map +1 -0
  54. package/dist/orchestration_1_0_53/lifecycle.d.ts +41 -0
  55. package/dist/orchestration_1_0_53/lifecycle.d.ts.map +1 -0
  56. package/dist/orchestration_1_0_53/lifecycle.js +509 -0
  57. package/dist/orchestration_1_0_53/lifecycle.js.map +1 -0
  58. package/dist/orchestration_1_0_53/queue.d.ts +7 -0
  59. package/dist/orchestration_1_0_53/queue.d.ts.map +1 -0
  60. package/dist/orchestration_1_0_53/queue.js +644 -0
  61. package/dist/orchestration_1_0_53/queue.js.map +1 -0
  62. package/dist/orchestration_1_0_53/runtime.d.ts +29 -0
  63. package/dist/orchestration_1_0_53/runtime.d.ts.map +1 -0
  64. package/dist/orchestration_1_0_53/runtime.js +190 -0
  65. package/dist/orchestration_1_0_53/runtime.js.map +1 -0
  66. package/dist/orchestration_1_0_53/state.d.ts +125 -0
  67. package/dist/orchestration_1_0_53/state.d.ts.map +1 -0
  68. package/dist/orchestration_1_0_53/state.js +105 -0
  69. package/dist/orchestration_1_0_53/state.js.map +1 -0
  70. package/dist/orchestration_1_0_53/turn.d.ts +6 -0
  71. package/dist/orchestration_1_0_53/turn.d.ts.map +1 -0
  72. package/dist/orchestration_1_0_53/turn.js +864 -0
  73. package/dist/orchestration_1_0_53/turn.js.map +1 -0
  74. package/dist/orchestration_1_0_53/utils.d.ts +22 -0
  75. package/dist/orchestration_1_0_53/utils.d.ts.map +1 -0
  76. package/dist/orchestration_1_0_53/utils.js +226 -0
  77. package/dist/orchestration_1_0_53/utils.js.map +1 -0
  78. package/dist/session-manager.d.ts.map +1 -1
  79. package/dist/session-manager.js +3 -2
  80. package/dist/session-manager.js.map +1 -1
  81. package/dist/session-proxy.d.ts +22 -17
  82. package/dist/session-proxy.d.ts.map +1 -1
  83. package/dist/session-proxy.js +27 -23
  84. package/dist/session-proxy.js.map +1 -1
  85. package/dist/types.d.ts +11 -8
  86. package/dist/types.d.ts.map +1 -1
  87. package/dist/types.js.map +1 -1
  88. package/dist/worker.d.ts +8 -3
  89. package/dist/worker.d.ts.map +1 -1
  90. package/dist/worker.js +75 -5
  91. package/dist/worker.js.map +1 -1
  92. package/package.json +10 -1
  93. package/plugins/default-agents/agents/generic-crawler.agent.md +162 -0
  94. package/plugins/mgmt/agents/facts-manager.agent.md +2 -1
@@ -12,6 +12,6 @@ import type { OrchestrationInput } from "./types.js";
12
12
  *
13
13
  * @internal
14
14
  */
15
- export declare const CURRENT_ORCHESTRATION_VERSION = "1.0.53";
15
+ export declare const CURRENT_ORCHESTRATION_VERSION = "1.0.54";
16
16
  export declare function durableSessionOrchestration_1_0_47(ctx: any, input: OrchestrationInput): Generator<any, string, any>;
17
17
  //# sourceMappingURL=orchestration_1_0_47.d.ts.map
@@ -15,6 +15,6 @@ import type { OrchestrationInput } from "./types.js";
15
15
  *
16
16
  * @internal
17
17
  */
18
- export declare const CURRENT_ORCHESTRATION_VERSION = "1.0.53";
18
+ export declare const CURRENT_ORCHESTRATION_VERSION = "1.0.54";
19
19
  export declare function durableSessionOrchestration_1_0_48(ctx: any, input: OrchestrationInput): Generator<any, string, any>;
20
20
  //# sourceMappingURL=orchestration_1_0_48.d.ts.map
@@ -25,6 +25,6 @@ import type { OrchestrationInput } from "./types.js";
25
25
  *
26
26
  * @internal
27
27
  */
28
- export declare const CURRENT_ORCHESTRATION_VERSION = "1.0.53";
28
+ export declare const CURRENT_ORCHESTRATION_VERSION = "1.0.54";
29
29
  export declare function durableSessionOrchestration_1_0_49(ctx: any, input: OrchestrationInput): Generator<any, string, any>;
30
30
  //# sourceMappingURL=orchestration_1_0_49.d.ts.map
@@ -29,6 +29,6 @@ import type { OrchestrationInput } from "./types.js";
29
29
  *
30
30
  * @internal
31
31
  */
32
- export declare const CURRENT_ORCHESTRATION_VERSION = "1.0.53";
32
+ export declare const CURRENT_ORCHESTRATION_VERSION = "1.0.54";
33
33
  export declare function durableSessionOrchestration_1_0_50(ctx: any, input: OrchestrationInput): Generator<any, string, any>;
34
34
  //# sourceMappingURL=orchestration_1_0_50.d.ts.map
@@ -0,0 +1,41 @@
1
+ import type { CommandMessage, ChildSessionVerdict, SubAgentEntry } from "../types.js";
2
+ import { type DurableSessionRuntime, type PendingShutdownState, type ShutdownMode } from "./state.js";
3
+ export type { PendingShutdownState, ShutdownMode };
4
+ export declare function isSubAgentTerminalStatus(status?: string): boolean;
5
+ export declare function parseChildUpdate(promptText?: string): {
6
+ sessionId: string;
7
+ updateType: string;
8
+ content: string;
9
+ cycleOrigin?: "cron" | "cron_at";
10
+ cycleStatus?: "quiet" | "material" | "blocked";
11
+ verdict?: ChildSessionVerdict;
12
+ } | null;
13
+ export declare function defaultShutdownReason(mode: ShutdownMode): string;
14
+ export declare function buildShutdownWaitReason(shutdown: PendingShutdownState): string;
15
+ export declare function findTrackedAgentByOrchId(subAgents: SubAgentEntry[], orchId: string): SubAgentEntry | undefined;
16
+ export declare function areTrackedAgentsTerminal(subAgents: SubAgentEntry[], agentIds: string[]): boolean;
17
+ export declare function getStillRunningAgentIds(subAgents: SubAgentEntry[], agentIds: string[]): string[];
18
+ export declare function buildWaitForAgentsFollowup(subAgents: SubAgentEntry[], targetIds: string[]): string;
19
+ export declare function buildSubAgentSystemMessage(options: {
20
+ parentSessionId: string;
21
+ childNestingLevel: number;
22
+ maxNestingLevel: number;
23
+ agentTask: string;
24
+ agentIsSystem: boolean;
25
+ parentSystemMessage: string;
26
+ }): string;
27
+ export declare function applyChildUpdate(runtime: DurableSessionRuntime, update: {
28
+ sessionId: string;
29
+ updateType: string;
30
+ content: string;
31
+ }): Generator<any, boolean, any>;
32
+ export declare function refreshTrackedSubAgents(runtime: DurableSessionRuntime): Generator<any, void, any>;
33
+ export declare function notifyParentOfTerminalState(runtime: DurableSessionRuntime, updateType: "completed" | "cancelled", reason: string): Generator<any, void, any>;
34
+ export declare function completeSession(runtime: DurableSessionRuntime, reason: string, commandId?: string): Generator<any, void, any>;
35
+ export declare function cancelSession(runtime: DurableSessionRuntime, reason: string, commandId?: string, deleteAfterCancel?: boolean): Generator<any, void, any>;
36
+ export declare function failPendingShutdown(runtime: DurableSessionRuntime, errorMessage: string): Generator<any, void, any>;
37
+ export declare function finalizePendingShutdown(runtime: DurableSessionRuntime): Generator<any, void, any>;
38
+ export declare function maybeResolveAgentWaitCompletion(runtime: DurableSessionRuntime): Generator<any, boolean, any>;
39
+ export declare function beginGracefulShutdown(runtime: DurableSessionRuntime, mode: ShutdownMode, cmdMsg: CommandMessage): Generator<any, void, any>;
40
+ export declare function handleSubAgentAction(runtime: DurableSessionRuntime, result: any): Generator<any, boolean, any>;
41
+ //# sourceMappingURL=agents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../src/orchestration_1_0_53/agents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,cAAc,EAGd,mBAAmB,EACnB,aAAa,EAChB,MAAM,aAAa,CAAC;AAOrB,OAAO,EAKH,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,YAAY,EACpB,MAAM,YAAY,CAAC;AAEpB,YAAY,EAAE,oBAAoB,EAAE,YAAY,EAAE,CAAC;AAInD,wBAAgB,wBAAwB,CAAC,MAAM,CAA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