@deepagents/orchestrator 0.1.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 (73) hide show
  1. package/dist/index.d.ts +1 -0
  2. package/dist/index.d.ts.map +1 -0
  3. package/dist/index.js +1 -0
  4. package/dist/index.js.map +7 -0
  5. package/dist/lib/arxiv/arxiv.d.ts +8 -0
  6. package/dist/lib/arxiv/arxiv.d.ts.map +1 -0
  7. package/dist/lib/deepplan/deepplan.d.ts +2 -0
  8. package/dist/lib/deepplan/deepplan.d.ts.map +1 -0
  9. package/dist/lib/deepplan/executor-agent.d.ts +53 -0
  10. package/dist/lib/deepplan/executor-agent.d.ts.map +1 -0
  11. package/dist/lib/deepplan/jordan-research-demo.d.ts +2 -0
  12. package/dist/lib/deepplan/jordan-research-demo.d.ts.map +1 -0
  13. package/dist/lib/deepplan/plan-and-solve.d.ts +131 -0
  14. package/dist/lib/deepplan/plan-and-solve.d.ts.map +1 -0
  15. package/dist/lib/deepplan/plan.d.ts +2 -0
  16. package/dist/lib/deepplan/plan.d.ts.map +1 -0
  17. package/dist/lib/deepplan/planner-agent.d.ts +39 -0
  18. package/dist/lib/deepplan/planner-agent.d.ts.map +1 -0
  19. package/dist/lib/deepplan/product-manager-executor.d.ts +13 -0
  20. package/dist/lib/deepplan/product-manager-executor.d.ts.map +1 -0
  21. package/dist/lib/deepplan/replanner-agent.d.ts +47 -0
  22. package/dist/lib/deepplan/replanner-agent.d.ts.map +1 -0
  23. package/dist/lib/deepplan/research-executor.d.ts +12 -0
  24. package/dist/lib/deepplan/research-executor.d.ts.map +1 -0
  25. package/dist/lib/deepplan/synthesizer.d.ts +2 -0
  26. package/dist/lib/deepplan/synthesizer.d.ts.map +1 -0
  27. package/dist/lib/deepresearch.v0.d.ts +3 -0
  28. package/dist/lib/deepresearch.v0.d.ts.map +1 -0
  29. package/dist/lib/deepresearch.v1.d.ts +30 -0
  30. package/dist/lib/deepresearch.v1.d.ts.map +1 -0
  31. package/dist/lib/deepwiki/complete-wiki.d.ts +20 -0
  32. package/dist/lib/deepwiki/complete-wiki.d.ts.map +1 -0
  33. package/dist/lib/deepwiki/deepwiki.d.ts +2 -0
  34. package/dist/lib/deepwiki/deepwiki.d.ts.map +1 -0
  35. package/dist/lib/deepwiki/gitignore-agent.d.ts +4 -0
  36. package/dist/lib/deepwiki/gitignore-agent.d.ts.map +1 -0
  37. package/dist/lib/deepwiki/outline-agent.d.ts +22 -0
  38. package/dist/lib/deepwiki/outline-agent.d.ts.map +1 -0
  39. package/dist/lib/deepwiki/tools.d.ts +62 -0
  40. package/dist/lib/deepwiki/tools.d.ts.map +1 -0
  41. package/dist/lib/deepwiki/wiki-writer.d.ts +9 -0
  42. package/dist/lib/deepwiki/wiki-writer.d.ts.map +1 -0
  43. package/dist/lib/deepwiki/writer.d.ts +12 -0
  44. package/dist/lib/deepwiki/writer.d.ts.map +1 -0
  45. package/dist/lib/graph.d.ts +5 -0
  46. package/dist/lib/graph.d.ts.map +1 -0
  47. package/dist/lib/openai-deepresearch/clarrify-agent.d.ts +17 -0
  48. package/dist/lib/openai-deepresearch/clarrify-agent.d.ts.map +1 -0
  49. package/dist/lib/openai-deepresearch/lead-research.d.ts +7 -0
  50. package/dist/lib/openai-deepresearch/lead-research.d.ts.map +1 -0
  51. package/dist/lib/openai-deepresearch/openai-deepresearch.d.ts +2 -0
  52. package/dist/lib/openai-deepresearch/openai-deepresearch.d.ts.map +1 -0
  53. package/dist/lib/openai-deepresearch/reasearcher.d.ts +2 -0
  54. package/dist/lib/openai-deepresearch/reasearcher.d.ts.map +1 -0
  55. package/dist/lib/openai-deepresearch/research-brief.d.ts +11 -0
  56. package/dist/lib/openai-deepresearch/research-brief.d.ts.map +1 -0
  57. package/dist/lib/pipe.d.ts +2 -0
  58. package/dist/lib/pipe.d.ts.map +1 -0
  59. package/dist/lib/plan-and-solve/examples.d.ts +98 -0
  60. package/dist/lib/plan-and-solve/examples.d.ts.map +1 -0
  61. package/dist/lib/plan-and-solve/index.d.ts +14 -0
  62. package/dist/lib/plan-and-solve/index.d.ts.map +1 -0
  63. package/dist/lib/plan-and-solve/plan-and-solve-agent.d.ts +37 -0
  64. package/dist/lib/plan-and-solve/plan-and-solve-agent.d.ts.map +1 -0
  65. package/dist/lib/plan-and-solve/run-demo.d.ts +2 -0
  66. package/dist/lib/plan-and-solve/run-demo.d.ts.map +1 -0
  67. package/dist/lib/plan-and-solve/self-consistency.d.ts +24 -0
  68. package/dist/lib/plan-and-solve/self-consistency.d.ts.map +1 -0
  69. package/dist/lib/plan-and-solve/types.d.ts +70 -0
  70. package/dist/lib/plan-and-solve/types.d.ts.map +1 -0
  71. package/dist/pro-mode.d.ts +6 -0
  72. package/dist/pro-mode.d.ts.map +1 -0
  73. package/package.json +43 -0
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,8 @@
1
+ interface ArxivAgentContext {
2
+ pdf_url: string;
3
+ store_path: string;
4
+ }
5
+ export declare function queryArxivPaper(query: string, pdfUrl: string, storePath: string): Promise<any[]>;
6
+ export declare const arxivAgent: import("@deepagents/agent").Agent<unknown, ArxivAgentContext>;
7
+ export {};
8
+ //# sourceMappingURL=arxiv.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arxiv.d.ts","sourceRoot":"","sources":["../../../src/lib/arxiv/arxiv.ts"],"names":[],"mappings":"AAyCA,UAAU,iBAAiB;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,wBAAsB,eAAe,CACnC,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,kBASlB;AAuDD,eAAO,MAAM,UAAU,+DAiBrB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=deepplan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deepplan.d.ts","sourceRoot":"","sources":["../../../src/lib/deepplan/deepplan.ts"],"names":[],"mappings":""}
@@ -0,0 +1,53 @@
1
+ import type { PlanStep, PlannerOutput } from './planner-agent.ts';
2
+ /**
3
+ * Executor Agent
4
+ *
5
+ * Executes individual plan steps while:
6
+ * 1. Tracking what information is gathered
7
+ * 2. Extracting numerical variables from results
8
+ * 3. Calculating intermediate results with attention to accuracy
9
+ * 4. Paying attention to correct numerical calculation and commonsense
10
+ * 5. Making observations about findings
11
+ * 6. Noting any issues or unexpected results
12
+ */
13
+ export declare const executorAgent: import("@deepagents/agent").Agent<unknown, import("@deepagents/agent").ContextVariables>;
14
+ /**
15
+ * Format step for executor with full context
16
+ */
17
+ export declare function formatStepForExecutor(step: PlanStep, context: ExecutionContext): string;
18
+ export interface ExecutionContext {
19
+ original_request: string;
20
+ understanding: string;
21
+ initial_plan: PlanStep[];
22
+ current_plan: PlanStep[];
23
+ variables: Record<string, string | number | boolean>;
24
+ step_results: string[];
25
+ is_complete: boolean;
26
+ success_criteria_met?: boolean;
27
+ }
28
+ export declare function createExecutionContext(request: string, plannerOutput: PlannerOutput): ExecutionContext;
29
+ /**
30
+ * Final result of the entire planning and execution process
31
+ */
32
+ export interface AdaptivePlanResult {
33
+ original_request: string;
34
+ understanding: string;
35
+ success: boolean;
36
+ completion_status: 'completed' | 'partial' | 'failed';
37
+ final_data: Record<string, unknown>;
38
+ execution_history: string[];
39
+ execution_context: ExecutionContext;
40
+ }
41
+ export declare function run(step: PlanStep, context: ExecutionContext): Promise<{
42
+ variables: {
43
+ [x: string]: string | number | boolean;
44
+ };
45
+ step_results: string[];
46
+ original_request: string;
47
+ understanding: string;
48
+ initial_plan: PlanStep[];
49
+ current_plan: PlanStep[];
50
+ is_complete: boolean;
51
+ success_criteria_met?: boolean;
52
+ }>;
53
+ //# sourceMappingURL=executor-agent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executor-agent.d.ts","sourceRoot":"","sources":["../../../src/lib/deepplan/executor-agent.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAElE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa,0FAmJxB,CAAC;AAEH;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,QAAQ,EACd,OAAO,EAAE,gBAAgB,GACxB,MAAM,CAqBR;AAED,MAAM,WAAW,gBAAgB;IAE/B,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IAGtB,YAAY,EAAE,QAAQ,EAAE,CAAC;IACzB,YAAY,EAAE,QAAQ,EAAE,CAAC;IAGzB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;IAGrD,YAAY,EAAE,MAAM,EAAE,CAAC;IAGvB,WAAW,EAAE,OAAO,CAAC;IACrB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,aAAa,GAC3B,gBAAgB,CAUlB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAEjC,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IAGtB,OAAO,EAAE,OAAO,CAAC;IACjB,iBAAiB,EAAE,WAAW,GAAG,SAAS,GAAG,QAAQ,CAAC;IAGtD,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEpC,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAG5B,iBAAiB,EAAE,gBAAgB,CAAC;CACrC;AAED,wBAAsB,GAAG,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,gBAAgB;;;;;sBAtD/C,MAAM;mBACT,MAAM;kBAGP,QAAQ,EAAE;kBACV,QAAQ,EAAE;iBASX,OAAO;2BACG,OAAO;GAkD/B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=jordan-research-demo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jordan-research-demo.d.ts","sourceRoot":"","sources":["../../../src/lib/deepplan/jordan-research-demo.ts"],"names":[],"mappings":""}
@@ -0,0 +1,131 @@
1
+ import { type Agent, type ContextVariables } from '@deepagents/agent';
2
+ import { type ExecutionContext } from './executor-agent.ts';
3
+ /**
4
+ * Lifecycle hooks for Plan-and-Solve execution.
5
+ *
6
+ * These hooks allow you to intercept and react to key points in the execution lifecycle,
7
+ * enabling progress tracking, persistence, notifications, and custom logic injection.
8
+ *
9
+ * **Important:** You can manually terminate the execution loop by setting `context.is_complete = true`
10
+ * in either hook. This allows you to stop execution early based on custom conditions (e.g., user cancellation,
11
+ * resource limits, or completion detection).
12
+ */
13
+ export interface PlanHooks {
14
+ /**
15
+ * Hook executed immediately after the initial plan is created.
16
+ *
17
+ * **When to use:**
18
+ * - Review and validate the initial plan
19
+ * - Persist the initial plan to storage
20
+ * - Log the planned steps for auditing
21
+ * - Modify the plan before execution starts
22
+ * - Display the plan to users for confirmation
23
+ * - Estimate total execution time or cost
24
+ * - **Terminate execution before it starts** by setting `context.is_complete = true`
25
+ *
26
+ * **Timing:** After the planner agent creates the initial plan, before any step execution
27
+ *
28
+ * @param context - Initial execution context with the complete plan
29
+ * @returns Modified context (or undefined to keep current context)
30
+ *
31
+ * @example
32
+ * ```typescript
33
+ * onInitialPlan: async (context) => {
34
+ * // Log the initial plan
35
+ * console.log(`Plan created with ${context.current_plan.length} steps`);
36
+ *
37
+ * // Save for later review
38
+ * await writeFile('initial_plan.json', JSON.stringify(context, null, 2));
39
+ *
40
+ * // Validate plan isn't too complex
41
+ * if (context.current_plan.length > 20) {
42
+ * console.error('Plan too complex, aborting');
43
+ * context.is_complete = true;
44
+ * }
45
+ *
46
+ * return context;
47
+ * }
48
+ * ```
49
+ */
50
+ onInitialPlan?: (context: ExecutionContext) => Promise<ExecutionContext | void> | ExecutionContext | void;
51
+ /**
52
+ * Hook executed before replanning occurs (after a step completes).
53
+ *
54
+ * **When to use:**
55
+ * - Save execution progress/checkpoints
56
+ * - Log intermediate results for auditing
57
+ * - Modify context before the replanner evaluates it
58
+ * - Track execution metrics
59
+ * - Stream progress updates to a client/UI
60
+ * - **Terminate execution early** by setting `context.is_complete = true`
61
+ *
62
+ * **Timing:** After a step executes, before the replanner agent runs
63
+ *
64
+ * @param context - Current execution state including completed step results
65
+ * @returns Modified context (or undefined to keep current context)
66
+ */
67
+ beforeReplan?: (context: ExecutionContext) => Promise<ExecutionContext | void> | ExecutionContext | void;
68
+ /**
69
+ * Hook executed after replanning occurs and the plan is updated.
70
+ *
71
+ * **When to use:**
72
+ * - Persist the updated plan to storage
73
+ * - Log plan changes and reasoning
74
+ * - Notify users of plan adjustments
75
+ * - Update progress indicators
76
+ * - Implement custom plan filtering/validation
77
+ * - Stream plan updates to a dashboard
78
+ * - Send alerts if major changes occur
79
+ * - **Terminate execution early** by setting `context.is_complete = true`
80
+ *
81
+ * **Timing:** After the replanner agent has updated the plan, before next step execution
82
+ *
83
+ * @param context - Current execution state with updated plan
84
+ * @returns Modified context (or undefined to keep current context)
85
+ */
86
+ afterReplan?: (context: ExecutionContext) => Promise<ExecutionContext | void> | ExecutionContext | void;
87
+ }
88
+ /**
89
+ * Executes a Plan-and-Solve Plus (PS+) workflow with adaptive replanning.
90
+ *
91
+ * This function creates a complete autonomous task execution pipeline:
92
+ * 1. Plans the task into specific steps
93
+ * 2. Executes each step sequentially
94
+ * 3. Replans after each execution to adapt based on results
95
+ * 4. Synthesizes results into a final output
96
+ *
97
+ * @param options - Configuration for the plan-and-solve execution
98
+ * @param options.input - The user's request or task description
99
+ * @param options.executor - The agent that will execute individual plan steps
100
+ * @param options.state - Execution context variables (e.g., repo_path, API keys)
101
+ * @param options.hooks - Optional lifecycle hooks for extensibility (see {@link PlanHooks})
102
+ *
103
+ * @example
104
+ * ```typescript
105
+ * const result = await planAndSolve({
106
+ * input: "Find all AI startups that raised Series A",
107
+ * executor: myExecutor,
108
+ * state: { repo_path: process.cwd() },
109
+ * hooks: {
110
+ * beforeReplan: async (context) => {
111
+ * // Save progress before replanning
112
+ * await saveCheckpoint(context);
113
+ * return context;
114
+ * },
115
+ * afterReplan: async (context) => {
116
+ * // Log plan updates
117
+ * console.log(`Updated plan: ${context.current_plan.length} steps remaining`);
118
+ * return context;
119
+ * }
120
+ * }
121
+ * });
122
+ * ```
123
+ */
124
+ export declare function planAndSolve(options: {
125
+ input: string;
126
+ executor: Agent<any, any>;
127
+ synthesizer?: Agent<any, any>;
128
+ state: ContextVariables;
129
+ hooks?: PlanHooks;
130
+ }): Promise<string>;
131
+ //# sourceMappingURL=plan-and-solve.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plan-and-solve.d.ts","sourceRoot":"","sources":["../../../src/lib/deepplan/plan-and-solve.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,KAAK,EACV,KAAK,gBAAgB,EAGtB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,KAAK,gBAAgB,EAEtB,MAAM,qBAAqB,CAAC;AAK7B;;;;;;;;;GASG;AACH,MAAM,WAAW,SAAS;IACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IACH,aAAa,CAAC,EAAE,CACd,OAAO,EAAE,gBAAgB,KACtB,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,GAAG,gBAAgB,GAAG,IAAI,CAAC;IAEhE;;;;;;;;;;;;;;;OAeG;IACH,YAAY,CAAC,EAAE,CACb,OAAO,EAAE,gBAAgB,KACtB,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,GAAG,gBAAgB,GAAG,IAAI,CAAC;IAEhE;;;;;;;;;;;;;;;;;OAiBG;IACH,WAAW,CAAC,EAAE,CACZ,OAAO,EAAE,gBAAgB,KACtB,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,GAAG,gBAAgB,GAAG,IAAI,CAAC;CACjE;AAoBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAC1B,WAAW,CAAC,EAAE,KAAK,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAC9B,KAAK,EAAE,gBAAgB,CAAC;IACxB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,mBAkDA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=plan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../src/lib/deepplan/plan.ts"],"names":[],"mappings":""}
@@ -0,0 +1,39 @@
1
+ import z from 'zod';
2
+ declare const PlanStepSchema: z.ZodObject<{
3
+ description: z.ZodString;
4
+ expected_outcome: z.ZodString;
5
+ }, z.core.$strip>;
6
+ export declare const PlannerOutputSchema: z.ZodObject<{
7
+ understanding: z.ZodString;
8
+ variables: z.ZodRecord<z.ZodString, z.ZodAny>;
9
+ constraints: z.ZodDefault<z.ZodArray<z.ZodString>>;
10
+ success_criteria: z.ZodString;
11
+ steps: z.ZodArray<z.ZodObject<{
12
+ description: z.ZodString;
13
+ expected_outcome: z.ZodString;
14
+ }, z.core.$strip>>;
15
+ }, z.core.$strip>;
16
+ export type PlanStep = z.infer<typeof PlanStepSchema>;
17
+ export type PlannerOutput = z.infer<typeof PlannerOutputSchema>;
18
+ /**
19
+ * Planner agent that creates structured execution plans:
20
+ * 1. Understanding Phase: Deeply understand the user's request
21
+ * 2. Variable Extraction: Extract relevant variables and their corresponding numerical values
22
+ * 3. Plan Devising: Break down into specific, actionable steps
23
+ * 4. Success Criteria: Define how to know when the task is complete
24
+ *
25
+ * Enhanced with adaptive replanning for dynamic task execution.
26
+ */
27
+ export declare const plannerAgent: import("@deepagents/agent").Agent<{
28
+ understanding: string;
29
+ variables: Record<string, any>;
30
+ constraints: string[];
31
+ success_criteria: string;
32
+ steps: {
33
+ description: string;
34
+ expected_outcome: string;
35
+ }[];
36
+ }, import("@deepagents/agent").ContextVariables>;
37
+ export declare function plan(userRequest: string): Promise<import("./executor-agent.ts").ExecutionContext>;
38
+ export {};
39
+ //# sourceMappingURL=planner-agent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"planner-agent.d.ts","sourceRoot":"","sources":["../../../src/lib/deepplan/planner-agent.ts"],"names":[],"mappings":"AACA,OAAO,CAAC,MAAM,KAAK,CAAC;AAMpB,QAAA,MAAM,cAAc;;;iBAOlB,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;iBAqB9B,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACtD,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY;;;;;;;;;gDAoIvB,CAAC;AAEH,wBAAsB,IAAI,CAAC,WAAW,EAAE,MAAM,2DAO7C"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Product Manager Executor Agent
3
+ *
4
+ * Specialized executor that approaches tasks from a Product Management perspective.
5
+ * Primary responsibilities:
6
+ * 1. Analyzing codebases to understand features and functionality
7
+ * 2. Generating comprehensive user stories with acceptance criteria
8
+ * 3. Identifying technical dependencies and complexity
9
+ * 4. Prioritizing work based on business value and technical constraints
10
+ * 5. Creating product documentation that bridges business and technical domains
11
+ */
12
+ export declare const productManagerExecutor: import("@deepagents/agent").Agent<unknown, import("@deepagents/agent").ContextVariables>;
13
+ //# sourceMappingURL=product-manager-executor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-manager-executor.d.ts","sourceRoot":"","sources":["../../../src/lib/deepplan/product-manager-executor.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB,0FAoNjC,CAAC"}
@@ -0,0 +1,47 @@
1
+ import z from 'zod';
2
+ import { type ExecutionContext } from './executor-agent.ts';
3
+ import type { PlanStep } from './planner-agent.ts';
4
+ export declare const ReplanDecisionSchema: z.ZodObject<{
5
+ reasoning: z.ZodString;
6
+ should_continue: z.ZodBoolean;
7
+ remaining_steps: z.ZodArray<z.ZodObject<{
8
+ description: z.ZodString;
9
+ expected_outcome: z.ZodString;
10
+ }, z.core.$strip>>;
11
+ new_insights: z.ZodDefault<z.ZodArray<z.ZodString>>;
12
+ }, z.core.$strip>;
13
+ export type ReplanDecision = z.infer<typeof ReplanDecisionSchema>;
14
+ /**
15
+ * Replanner Agent
16
+ *
17
+ * After each step execution, the replanner:
18
+ * 1. Reviews what was accomplished vs what was expected
19
+ * 2. Analyzes how this affects the remaining plan
20
+ * 3. Decides if the plan needs adjustment
21
+ * 4. Updates remaining steps based on new information
22
+ *
23
+ * This creates an adaptive planning system that learns as it executes.
24
+ */
25
+ export declare const replannerAgent: import("@deepagents/agent").Agent<{
26
+ reasoning: string;
27
+ should_continue: boolean;
28
+ remaining_steps: {
29
+ description: string;
30
+ expected_outcome: string;
31
+ }[];
32
+ new_insights: string[];
33
+ }, import("@deepagents/agent").ContextVariables>;
34
+ export declare function replan(context: ExecutionContext): Promise<{
35
+ current_plan: {
36
+ description: string;
37
+ expected_outcome: string;
38
+ }[];
39
+ is_complete: boolean;
40
+ original_request: string;
41
+ understanding: string;
42
+ initial_plan: PlanStep[];
43
+ variables: Record<string, string | number | boolean>;
44
+ step_results: string[];
45
+ success_criteria_met?: boolean;
46
+ }>;
47
+ //# sourceMappingURL=replanner-agent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"replanner-agent.d.ts","sourceRoot":"","sources":["../../../src/lib/deepplan/replanner-agent.ts"],"names":[],"mappings":"AACA,OAAO,CAAC,MAAM,KAAK,CAAC;AAIpB,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAUnD,eAAO,MAAM,oBAAoB;;;;;;;;iBAW/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc;;;;;;;;gDA6JzB,CAAC;AAkDH,wBAAsB,MAAM,CAAC,OAAO,EAAE,gBAAgB;;;;;;;;;;;;GAarD"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Research Executor Agent
3
+ *
4
+ * Specialized for socioeconomic and market research tasks:
5
+ * - Gathering data from multiple sources
6
+ * - Extracting numerical data with precision
7
+ * - Cross-verifying information
8
+ * - Tracking source credibility
9
+ * - Identifying data gaps and contradictions
10
+ */
11
+ export declare const researchExecutor: import("@deepagents/agent").Agent<unknown, import("@deepagents/agent").ContextVariables>;
12
+ //# sourceMappingURL=research-executor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"research-executor.d.ts","sourceRoot":"","sources":["../../../src/lib/deepplan/research-executor.ts"],"names":[],"mappings":"AAKA;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,0FAsL3B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function synthesize(stepResults: string[], originalRequest: string): Promise<string>;
2
+ //# sourceMappingURL=synthesizer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"synthesizer.d.ts","sourceRoot":"","sources":["../../../src/lib/deepplan/synthesizer.ts"],"names":[],"mappings":"AAgEA,wBAAgB,UAAU,CAAC,WAAW,EAAE,MAAM,EAAE,EAAE,eAAe,EAAE,MAAM,mBAexE"}
@@ -0,0 +1,3 @@
1
+ export declare function getNewSearchQueries(userQuery: string, previousSearchQueries: string[], allContexts: string[], repoContext: string): Promise<string[]>;
2
+ export declare function generateFinalReport(userQuery: string, formatting: string, allContexts: string[]): Promise<string>;
3
+ //# sourceMappingURL=deepresearch.v0.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deepresearch.v0.d.ts","sourceRoot":"","sources":["../../src/lib/deepresearch.v0.ts"],"names":[],"mappings":"AAuHA,wBAAsB,mBAAmB,CACvC,SAAS,EAAE,MAAM,EACjB,qBAAqB,EAAE,MAAM,EAAE,EAC/B,WAAW,EAAE,MAAM,EAAE,EACrB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,MAAM,EAAE,CAAC,CAwCnB;AAED,wBAAsB,mBAAmB,CACvC,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,EAAE,GACpB,OAAO,CAAC,MAAM,CAAC,CAUjB"}
@@ -0,0 +1,30 @@
1
+ export interface SearchEntry {
2
+ title: string;
3
+ url: string;
4
+ content: string;
5
+ query: string;
6
+ }
7
+ export interface ParagraphResearchState {
8
+ searchHistory: SearchEntry[];
9
+ latestSummary: string;
10
+ reflectionIteration: number;
11
+ }
12
+ export interface ParagraphPlan {
13
+ title: string;
14
+ content: string;
15
+ research: ParagraphResearchState;
16
+ }
17
+ export interface ResearchState {
18
+ reportTitle: string;
19
+ paragraphs: ParagraphPlan[];
20
+ }
21
+ export interface ResearchOptions {
22
+ maxReflections?: number;
23
+ stopOnDuplicateQuery?: boolean;
24
+ }
25
+ export declare function researchParagraph(userQuery: string, paragraph: ParagraphPlan, options?: ResearchOptions): Promise<void>;
26
+ export declare function deepresearch(userQuery: string, options?: ResearchOptions): Promise<{
27
+ state: ResearchState;
28
+ markdown: string;
29
+ }>;
30
+ //# sourceMappingURL=deepresearch.v1.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deepresearch.v1.d.ts","sourceRoot":"","sources":["../../src/lib/deepresearch.v1.ts"],"names":[],"mappings":"AAiBA,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,sBAAsB;IACrC,aAAa,EAAE,WAAW,EAAE,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,sBAAsB,CAAC;CAClC;AAED,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,aAAa,EAAE,CAAC;CAC7B;AAgMD,MAAM,WAAW,eAAe;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAOD,wBAAsB,iBAAiB,CACrC,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,aAAa,EACxB,OAAO,GAAE,eAAoB,iBA6C9B;AAED,wBAAsB,YAAY,CAChC,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE,eAAoB,GAC5B,OAAO,CAAC;IAAE,KAAK,EAAE,aAAa,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CAmBrD"}
@@ -0,0 +1,20 @@
1
+ import { type Outline } from './outline-agent.ts';
2
+ type WikiResult = {
3
+ files: Record<string, string>;
4
+ index: string;
5
+ };
6
+ /**
7
+ * Generate a complete multi-page wiki from an outline
8
+ *
9
+ * This function creates separate markdown files for each section:
10
+ * - Leaf sections get comprehensive content written by agents
11
+ * - Parent sections get TOC-style pages with introductions and links to children
12
+ * - All files use flat naming with full hierarchical path
13
+ */
14
+ export declare function completeWiki(state: {
15
+ repo_path: string;
16
+ outline: Outline;
17
+ tree: string;
18
+ }): Promise<WikiResult>;
19
+ export {};
20
+ //# sourceMappingURL=complete-wiki.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"complete-wiki.d.ts","sourceRoot":"","sources":["../../../src/lib/deepwiki/complete-wiki.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,KAAK,OAAO,EAAY,MAAM,oBAAoB,CAAC;AA2C5D,KAAK,UAAU,GAAG;IAChB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAyJF;;;;;;;GAOG;AACH,wBAAsB,YAAY,CAAC,KAAK,EAAE;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,OAAO,CAAC,UAAU,CAAC,CAoCtB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=deepwiki.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deepwiki.d.ts","sourceRoot":"","sources":["../../../src/lib/deepwiki/deepwiki.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export declare const ignoreAgent: import("@deepagents/agent").Agent<{
2
+ repo_path: string;
3
+ }, import("@deepagents/agent").ContextVariables>;
4
+ //# sourceMappingURL=gitignore-agent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gitignore-agent.d.ts","sourceRoot":"","sources":["../../../src/lib/deepwiki/gitignore-agent.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,WAAW;eAAsB,MAAM;gDAkClD,CAAC"}
@@ -0,0 +1,22 @@
1
+ import z from 'zod';
2
+ declare const BaseOutlineItem: z.ZodObject<{
3
+ title: z.ZodString;
4
+ }, z.core.$strip>;
5
+ type OutlineItem = z.output<typeof BaseOutlineItem> & {
6
+ sections?: z.output<typeof OutlineItemSchema>[];
7
+ };
8
+ declare const OutlineItemSchema: z.ZodType<OutlineItem>;
9
+ declare const OutlineSchema: z.ZodArray<z.ZodType<OutlineItem, unknown, z.core.$ZodTypeInternals<OutlineItem, unknown>>>;
10
+ export type Outline = z.output<typeof OutlineSchema>;
11
+ export type OutlineAgentContext = {
12
+ repo_path: string;
13
+ outline: z.output<typeof OutlineSchema>;
14
+ scratchpad: string;
15
+ tree: string;
16
+ };
17
+ export declare const outlineAgent: import("@deepagents/agent").Agent<unknown, OutlineAgentContext>;
18
+ export declare const outlineCondensedAgent: import("@deepagents/agent").Agent<unknown, OutlineAgentContext>;
19
+ export declare function generateOutline(state: OutlineAgentContext): Promise<unknown>;
20
+ export declare function buildToc(items: OutlineItem[], baseDepth?: number, prefix?: string[]): string[];
21
+ export {};
22
+ //# sourceMappingURL=outline-agent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outline-agent.d.ts","sourceRoot":"","sources":["../../../src/lib/deepwiki/outline-agent.ts"],"names":[],"mappings":"AAIA,OAAO,CAAC,MAAM,KAAK,CAAC;AAsBpB,QAAA,MAAM,eAAe;;iBAEnB,CAAC;AACH,KAAK,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,eAAe,CAAC,GAAG;IACpD,QAAQ,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,iBAAiB,CAAC,EAAE,CAAC;CACjD,CAAC;AACF,QAAA,MAAM,iBAAiB,EAAE,CAAC,CAAC,OAAO,CAAC,WAAW,CAI7C,CAAC;AACF,QAAA,MAAM,aAAa,6FAA6B,CAAC;AACjD,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,aAAa,CAAC,CAAC;AACrD,MAAM,MAAM,mBAAmB,GAAG;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,aAAa,CAAC,CAAC;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,eAAO,MAAM,YAAY,iEAsEvB,CAAC;AAEH,eAAO,MAAM,qBAAqB,iEA2BhC,CAAC;AAEH,wBAAsB,eAAe,CAAC,KAAK,EAAE,mBAAmB,oBAwC/D;AAWD,wBAAgB,QAAQ,CACtB,KAAK,EAAE,WAAW,EAAE,EACpB,SAAS,SAAI,EACb,MAAM,GAAE,MAAM,EAAO,YAatB"}
@@ -0,0 +1,62 @@
1
+ export declare const read_file_tool: import("ai").Tool<{
2
+ filePath: string;
3
+ lineStart?: number | undefined;
4
+ lineEnd?: number | undefined;
5
+ }, string>;
6
+ export declare const read_dir_tool: import("ai").Tool<{
7
+ dir_path: string;
8
+ }, string[]>;
9
+ export declare const glob_tool: import("ai").Tool<{
10
+ pattern: string;
11
+ }, string[]>;
12
+ export declare const search_files_tool: import("ai").Tool<{
13
+ pattern: string;
14
+ max_results: number;
15
+ depth: number;
16
+ }, string[]>;
17
+ export declare const file_exists_tool: import("ai").Tool<{
18
+ filePath: string;
19
+ }, boolean>;
20
+ export declare const search_content_tool: ({
21
+ description?: string;
22
+ providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
23
+ inputSchema: import("@ai-sdk/provider-utils").FlexibleSchema<unknown>;
24
+ onInputStart?: (options: import("ai").ToolCallOptions) => void | PromiseLike<void>;
25
+ onInputDelta?: (options: {
26
+ inputTextDelta: string;
27
+ } & import("ai").ToolCallOptions) => void | PromiseLike<void>;
28
+ onInputAvailable?: ((options: {
29
+ input: unknown;
30
+ } & import("ai").ToolCallOptions) => void | PromiseLike<void>) | undefined;
31
+ } & {
32
+ outputSchema: import("@ai-sdk/provider-utils").FlexibleSchema<unknown>;
33
+ execute?: never;
34
+ } & {
35
+ toModelOutput?: ((output: unknown) => import("@ai-sdk/provider").LanguageModelV2ToolResultPart["output"]) | undefined;
36
+ } & {
37
+ type: "dynamic";
38
+ } & {
39
+ type: "dynamic";
40
+ }) | ({
41
+ description?: string;
42
+ providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
43
+ inputSchema: import("@ai-sdk/provider-utils").FlexibleSchema<unknown>;
44
+ onInputStart?: (options: import("ai").ToolCallOptions) => void | PromiseLike<void>;
45
+ onInputDelta?: (options: {
46
+ inputTextDelta: string;
47
+ } & import("ai").ToolCallOptions) => void | PromiseLike<void>;
48
+ onInputAvailable?: ((options: {
49
+ input: unknown;
50
+ } & import("ai").ToolCallOptions) => void | PromiseLike<void>) | undefined;
51
+ } & {
52
+ execute: import("ai").ToolExecuteFunction<unknown, unknown>;
53
+ outputSchema?: import("@ai-sdk/provider-utils").FlexibleSchema<unknown> | undefined;
54
+ } & {
55
+ toModelOutput?: ((output: unknown) => import("@ai-sdk/provider").LanguageModelV2ToolResultPart["output"]) | undefined;
56
+ } & {
57
+ type: "dynamic";
58
+ } & {
59
+ type: "dynamic";
60
+ });
61
+ export declare function repoTree(dir_path: string): Promise<string>;
62
+ //# sourceMappingURL=tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/lib/deepwiki/tools.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,cAAc;;;;UAiEzB,CAAC;AAEH,eAAO,MAAM,aAAa;;YAcxB,CAAC;AAEH,eAAO,MAAM,SAAS;;YAoBpB,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;YAwB5B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;WAS3B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2C9B,CAAC;AAEH,wBAAsB,QAAQ,CAAC,QAAQ,EAAE,MAAM,mBAK9C"}
@@ -0,0 +1,9 @@
1
+ type OutlineItem = {
2
+ title: string;
3
+ sections?: OutlineItem[];
4
+ };
5
+ export declare function generateWiki(outline: OutlineItem[], options: {
6
+ repo_path: string;
7
+ }): Promise<string>;
8
+ export {};
9
+ //# sourceMappingURL=wiki-writer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wiki-writer.d.ts","sourceRoot":"","sources":["../../../src/lib/deepwiki/wiki-writer.ts"],"names":[],"mappings":"AAeA,KAAK,WAAW,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAA;CAAE,CAAC;AAqF/D,wBAAsB,YAAY,CAChC,OAAO,EAAE,WAAW,EAAE,EACtB,OAAO,EAAE;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,mBAe/B"}
@@ -0,0 +1,12 @@
1
+ import { type Outline } from './outline-agent.ts';
2
+ export declare function generateWiki(options: {
3
+ repo_path: string;
4
+ outline: Outline;
5
+ tree: string;
6
+ }): Promise<string>;
7
+ export declare function singlePageWiki(state: {
8
+ repo_path: string;
9
+ outline: Outline;
10
+ tree: string;
11
+ }): Promise<string>;
12
+ //# sourceMappingURL=writer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"writer.d.ts","sourceRoot":"","sources":["../../../src/lib/deepwiki/writer.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,KAAK,OAAO,EAAY,MAAM,oBAAoB,CAAC;AAyI5D,wBAAsB,YAAY,CAAC,OAAO,EAAE;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd,mBA6CA;AAqKD,wBAAsB,cAAc,CAAC,KAAK,EAAE;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd,mBAiDA"}
@@ -0,0 +1,5 @@
1
+ import type { Outline } from './deepwiki/outline-agent.ts';
2
+ export declare function fold(item: Outline[number], parent: Outline[number], write: (section: Outline[number]) => Promise<string>, store: {
3
+ set: (key: string, value: string) => Promise<void>;
4
+ }): Promise<void>;
5
+ //# sourceMappingURL=graph.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../src/lib/graph.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AA2B3D,wBAAsB,IAAI,CACxB,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,EACrB,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,EACvB,KAAK,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK,OAAO,CAAC,MAAM,CAAC,EACpD,KAAK,EAAE;IACL,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACpD,iBAOF"}
@@ -0,0 +1,17 @@
1
+ import z from 'zod';
2
+ export declare const ClarrifyQuestion: z.ZodObject<{
3
+ need_clarification: z.ZodBoolean;
4
+ question: z.ZodString;
5
+ verification: z.ZodString;
6
+ }, z.core.$strip>;
7
+ export declare const clarrifyAgent: import("@deepagents/agent").Agent<{
8
+ need_clarification: boolean;
9
+ question: string;
10
+ verification: string;
11
+ }, import("@deepagents/agent").ContextVariables>;
12
+ export declare function clarrifyUserQuery(state: any, query: string): Promise<{
13
+ need_clarification: boolean;
14
+ question: string;
15
+ verification: string;
16
+ }>;
17
+ //# sourceMappingURL=clarrify-agent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clarrify-agent.d.ts","sourceRoot":"","sources":["../../../src/lib/openai-deepresearch/clarrify-agent.ts"],"names":[],"mappings":"AACA,OAAO,CAAC,MAAM,KAAK,CAAC;AA8CpB,eAAO,MAAM,gBAAgB;;;;iBAY3B,CAAC;AAEH,eAAO,MAAM,aAAa;;;;gDAMxB,CAAC;AAEH,wBAAsB,iBAAiB,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM;;;;GAQhE"}
@@ -0,0 +1,7 @@
1
+ export type LeadResearcherState = {
2
+ max_researcher_iterations: number;
3
+ max_concurrent_research_units: number;
4
+ research_iterations: number;
5
+ };
6
+ export declare const leadResearcherAgent: import("@deepagents/agent").Agent<unknown, LeadResearcherState>;
7
+ //# sourceMappingURL=lead-research.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lead-research.d.ts","sourceRoot":"","sources":["../../../src/lib/openai-deepresearch/lead-research.ts"],"names":[],"mappings":"AAwEA,MAAM,MAAM,mBAAmB,GAAG;IAChC,yBAAyB,EAAE,MAAM,CAAC;IAClC,6BAA6B,EAAE,MAAM,CAAC;IACtC,mBAAmB,EAAE,MAAM,CAAC;CAC7B,CAAC;AACF,eAAO,MAAM,mBAAmB,iEAwC9B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=openai-deepresearch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openai-deepresearch.d.ts","sourceRoot":"","sources":["../../../src/lib/openai-deepresearch/openai-deepresearch.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export declare const researcherAgent: import("@deepagents/agent").Agent<unknown, import("@deepagents/agent").ContextVariables>;
2
+ //# sourceMappingURL=reasearcher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reasearcher.d.ts","sourceRoot":"","sources":["../../../src/lib/openai-deepresearch/reasearcher.ts"],"names":[],"mappings":"AAmDA,eAAO,MAAM,eAAe,0FAQ1B,CAAC"}
@@ -0,0 +1,11 @@
1
+ import z from 'zod';
2
+ export declare const ResearchTopic: z.ZodObject<{
3
+ research_brief: z.ZodString;
4
+ }, z.core.$strip>;
5
+ export declare const researchTopicAgent: import("@deepagents/agent").Agent<{
6
+ research_brief: string;
7
+ }, import("@deepagents/agent").ContextVariables>;
8
+ export declare function transformMessagesIntoResearchTopic(userQuery: string): Promise<{
9
+ research_brief: string;
10
+ }>;
11
+ //# sourceMappingURL=research-brief.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"research-brief.d.ts","sourceRoot":"","sources":["../../../src/lib/openai-deepresearch/research-brief.ts"],"names":[],"mappings":"AACA,OAAO,CAAC,MAAM,KAAK,CAAC;AAgCpB,eAAO,MAAM,aAAa;;iBAIxB,CAAC;AAEH,eAAO,MAAM,kBAAkB;;gDAK7B,CAAC;AAEH,wBAAsB,kCAAkC,CAAC,SAAS,EAAE,MAAM;;GAYzE"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=pipe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipe.d.ts","sourceRoot":"","sources":["../../src/lib/pipe.ts"],"names":[],"mappings":""}
@@ -0,0 +1,98 @@
1
+ /**
2
+ * Example problems from different reasoning categories
3
+ * Based on the paper's evaluation datasets
4
+ */
5
+ export declare const EXAMPLE_PROBLEMS: {
6
+ arithmetic: {
7
+ simple: string;
8
+ complex: string;
9
+ multistep: string;
10
+ };
11
+ symbolic: {
12
+ pattern: string;
13
+ sequence: string;
14
+ logic: string;
15
+ };
16
+ commonsense: {
17
+ physical: string;
18
+ temporal: string;
19
+ social: string;
20
+ };
21
+ };
22
+ /**
23
+ * Run a single problem with PS+ (deterministic, temperature=0)
24
+ */
25
+ export declare function runSinglePath(problem: string): Promise<{
26
+ understanding?: string | undefined;
27
+ plan?: (string | undefined)[] | undefined;
28
+ variables?: {
29
+ [x: string]: any;
30
+ } | undefined;
31
+ reasoning_steps?: ({
32
+ step_number?: number | undefined;
33
+ description?: string | undefined;
34
+ reasoning?: string | undefined;
35
+ result?: string | undefined;
36
+ } | undefined)[] | undefined;
37
+ final_answer?: string | number | undefined;
38
+ calculations?: ({
39
+ expression?: string | undefined;
40
+ result?: string | number | undefined;
41
+ } | undefined)[] | undefined;
42
+ }>;
43
+ /**
44
+ * Run a problem with self-consistency (multiple paths, temperature=0.7)
45
+ */
46
+ export declare function runSelfConsistency(problem: string, numPaths?: number): Promise<{
47
+ answers: {
48
+ answer: string | number;
49
+ reasoning_path: string;
50
+ confidence?: number | undefined;
51
+ }[];
52
+ majority_answer: string | number;
53
+ confidence_score: number;
54
+ vote_distribution: Record<string, number>;
55
+ }>;
56
+ /**
57
+ * Compare single-path vs self-consistency for a given problem
58
+ */
59
+ export declare function compareApproaches(problem: string, numPaths?: number): Promise<{
60
+ singlePath: {
61
+ understanding?: string | undefined;
62
+ plan?: (string | undefined)[] | undefined;
63
+ variables?: {
64
+ [x: string]: any;
65
+ } | undefined;
66
+ reasoning_steps?: ({
67
+ step_number?: number | undefined;
68
+ description?: string | undefined;
69
+ reasoning?: string | undefined;
70
+ result?: string | undefined;
71
+ } | undefined)[] | undefined;
72
+ final_answer?: string | number | undefined;
73
+ calculations?: ({
74
+ expression?: string | undefined;
75
+ result?: string | number | undefined;
76
+ } | undefined)[] | undefined;
77
+ };
78
+ selfConsistency: {
79
+ answers: {
80
+ answer: string | number;
81
+ reasoning_path: string;
82
+ confidence?: number | undefined;
83
+ }[];
84
+ majority_answer: string | number;
85
+ confidence_score: number;
86
+ vote_distribution: Record<string, number>;
87
+ };
88
+ answersMatch: boolean;
89
+ }>;
90
+ /**
91
+ * Run all example problems (useful for testing)
92
+ */
93
+ export declare function runAllExamples(): Promise<void>;
94
+ /**
95
+ * Demonstrate self-consistency on a challenging problem
96
+ */
97
+ export declare function demonstrateSelfConsistency(): Promise<void>;
98
+ //# sourceMappingURL=examples.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"examples.d.ts","sourceRoot":"","sources":["../../../src/lib/plan-and-solve/examples.ts"],"names":[],"mappings":"AASA;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;CAqB5B,CAAC;AAEF;;GAEG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE,MAAM;;;;;;;;;;;;;;;;;GAYlD;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,SAAK;;;;;;;;;GAoBtE;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,SAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BpE;AAED;;GAEG;AACH,wBAAsB,cAAc,kBAiBnC;AAED;;GAEG;AACH,wBAAsB,0BAA0B,kBAO/C"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Plan-and-Solve Plus (PS+) Implementation
3
+ *
4
+ * Implements the enhanced PS+ prompting technique from the paper:
5
+ * "Plan-and-Solve Prompting: Improving Zero-Shot Chain-of-Thought Reasoning by Large Language Models"
6
+ * (arXiv:2305.04091)
7
+ *
8
+ * @module plan-and-solve
9
+ */
10
+ export { planAndSolveAgent, createPlanAndSolveAgent, } from './plan-and-solve-agent.ts';
11
+ export { planAndSolveWithSelfConsistency, analyzeReasoningDiversity, } from './self-consistency.ts';
12
+ export type { ReasoningStep, PlanAndSolveOutput, SelfConsistencyResult, PlanAndSolveConfig, } from './types.ts';
13
+ export { EXAMPLE_PROBLEMS, runSinglePath, runSelfConsistency, compareApproaches, runAllExamples, demonstrateSelfConsistency, } from './examples.ts';
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/plan-and-solve/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EACL,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EACL,+BAA+B,EAC/B,yBAAyB,GAC1B,MAAM,uBAAuB,CAAC;AAG/B,YAAY,EACV,aAAa,EACb,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,0BAA0B,GAC3B,MAAM,eAAe,CAAC"}
@@ -0,0 +1,37 @@
1
+ export declare const planAndSolveAgent: import("@deepagents/agent").Agent<{
2
+ understanding: string;
3
+ plan: string[];
4
+ variables: Record<string, any>;
5
+ reasoning_steps: {
6
+ step_number: number;
7
+ description: string;
8
+ reasoning: string;
9
+ result?: string | undefined;
10
+ }[];
11
+ final_answer: string | number;
12
+ calculations?: {
13
+ expression: string;
14
+ result: string | number;
15
+ }[] | undefined;
16
+ }, import("@deepagents/agent").ContextVariables>;
17
+ /**
18
+ * Creates a Plan-and-Solve Plus agent with custom temperature
19
+ * Useful for self-consistency where higher temperature (0.7) is needed
20
+ */
21
+ export declare function createPlanAndSolveAgent(temperature?: number): import("@deepagents/agent").Agent<{
22
+ understanding: string;
23
+ plan: string[];
24
+ variables: Record<string, any>;
25
+ reasoning_steps: {
26
+ step_number: number;
27
+ description: string;
28
+ reasoning: string;
29
+ result?: string | undefined;
30
+ }[];
31
+ final_answer: string | number;
32
+ calculations?: {
33
+ expression: string;
34
+ result: string | number;
35
+ }[] | undefined;
36
+ }, import("@deepagents/agent").ContextVariables>;
37
+ //# sourceMappingURL=plan-and-solve-agent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plan-and-solve-agent.d.ts","sourceRoot":"","sources":["../../../src/lib/plan-and-solve/plan-and-solve-agent.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;gDAiG5B,CAAC;AAEH;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,WAAW,SAAI;;;;;;;;;;;;;;;iDAEtD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=run-demo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-demo.d.ts","sourceRoot":"","sources":["../../../src/lib/plan-and-solve/run-demo.ts"],"names":[],"mappings":""}
@@ -0,0 +1,24 @@
1
+ import type { SelfConsistencyResult } from './types.ts';
2
+ /**
3
+ * Implements self-consistency for Plan-and-Solve Plus
4
+ *
5
+ * Self-consistency improves reasoning by:
6
+ * 1. Generating multiple diverse reasoning paths (with temperature > 0)
7
+ * 2. Extracting the final answer from each path
8
+ * 3. Selecting the most consistent answer via majority voting
9
+ *
10
+ * Based on the paper's configuration:
11
+ * - Temperature: 0.7 (for diversity)
12
+ * - Number of paths: 10 (default, configurable)
13
+ */
14
+ export declare function planAndSolveWithSelfConsistency(problem: string, numPaths?: number): Promise<SelfConsistencyResult>;
15
+ /**
16
+ * Analyzes the diversity of reasoning paths
17
+ * Useful for understanding how different the generated paths are
18
+ */
19
+ export declare function analyzeReasoningDiversity(results: SelfConsistencyResult): {
20
+ uniqueAnswers: number;
21
+ entropy: number;
22
+ diversityScore: number;
23
+ };
24
+ //# sourceMappingURL=self-consistency.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"self-consistency.d.ts","sourceRoot":"","sources":["../../../src/lib/plan-and-solve/self-consistency.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAsB,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAE5E;;;;;;;;;;;GAWG;AACH,wBAAsB,+BAA+B,CACnD,OAAO,EAAE,MAAM,EACf,QAAQ,SAAK,GACZ,OAAO,CAAC,qBAAqB,CAAC,CAsGhC;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,qBAAqB,GAAG;IACzE,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;CACxB,CAuBA"}
@@ -0,0 +1,70 @@
1
+ import z from 'zod';
2
+ /**
3
+ * Schema for a single reasoning step in the plan
4
+ */
5
+ export declare const ReasoningStepSchema: z.ZodObject<{
6
+ step_number: z.ZodNumber;
7
+ description: z.ZodString;
8
+ reasoning: z.ZodString;
9
+ result: z.ZodOptional<z.ZodString>;
10
+ }, z.core.$strip>;
11
+ /**
12
+ * Schema for the complete Plan-and-Solve Plus output
13
+ */
14
+ export declare const PlanAndSolveOutputSchema: z.ZodObject<{
15
+ understanding: z.ZodString;
16
+ plan: z.ZodArray<z.ZodString>;
17
+ variables: z.ZodRecord<z.ZodString, z.ZodAny>;
18
+ reasoning_steps: z.ZodArray<z.ZodObject<{
19
+ step_number: z.ZodNumber;
20
+ description: z.ZodString;
21
+ reasoning: z.ZodString;
22
+ result: z.ZodOptional<z.ZodString>;
23
+ }, z.core.$strip>>;
24
+ calculations: z.ZodOptional<z.ZodArray<z.ZodObject<{
25
+ expression: z.ZodString;
26
+ result: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
27
+ }, z.core.$strip>>>;
28
+ final_answer: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
29
+ }, z.core.$strip>;
30
+ /**
31
+ * Schema for self-consistency result
32
+ */
33
+ export declare const SelfConsistencyResultSchema: z.ZodObject<{
34
+ answers: z.ZodArray<z.ZodObject<{
35
+ answer: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
36
+ reasoning_path: z.ZodString;
37
+ confidence: z.ZodOptional<z.ZodNumber>;
38
+ }, z.core.$strip>>;
39
+ majority_answer: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
40
+ confidence_score: z.ZodNumber;
41
+ vote_distribution: z.ZodRecord<z.ZodString, z.ZodNumber>;
42
+ }, z.core.$strip>;
43
+ export type ReasoningStep = z.infer<typeof ReasoningStepSchema>;
44
+ export type PlanAndSolveOutput = z.infer<typeof PlanAndSolveOutputSchema>;
45
+ export type SelfConsistencyResult = z.infer<typeof SelfConsistencyResultSchema>;
46
+ /**
47
+ * Input configuration for Plan-and-Solve Plus
48
+ */
49
+ export interface PlanAndSolveConfig {
50
+ /**
51
+ * The problem/question to solve
52
+ */
53
+ problem: string;
54
+ /**
55
+ * Temperature for generation (0 for deterministic, 0.7 for self-consistency)
56
+ * @default 0
57
+ */
58
+ temperature?: number;
59
+ /**
60
+ * Whether to use self-consistency (multiple reasoning paths)
61
+ * @default false
62
+ */
63
+ useSelfConsistency?: boolean;
64
+ /**
65
+ * Number of reasoning paths to generate for self-consistency
66
+ * @default 10
67
+ */
68
+ numPaths?: number;
69
+ }
70
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/plan-and-solve/types.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;iBAU9B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;iBA6BnC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;iBAqBtC,CAAC;AAGH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,6 @@
1
+ export interface ProModeResult {
2
+ final: string;
3
+ candidates: string[];
4
+ }
5
+ export declare function proMode(prompt: string, runs: number): Promise<ProModeResult>;
6
+ //# sourceMappingURL=pro-mode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pro-mode.d.ts","sourceRoot":"","sources":["../src/pro-mode.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAkFD,wBAAsB,OAAO,CAC3B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,aAAa,CAAC,CAgBxB"}
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "@deepagents/orchestrator",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "main": "./dist/index.js",
6
+ "module": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ "./package.json": "./package.json",
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js",
13
+ "default": "./dist/index.js"
14
+ },
15
+ "./*": {
16
+ "types": "./dist/lib/*",
17
+ "import": "./dist/lib/*",
18
+ "default": "./dist/lib/*"
19
+ }
20
+ },
21
+ "files": [
22
+ "dist",
23
+ "!**/*.tsbuildinfo",
24
+ "!**/*.test.*"
25
+ ],
26
+ "publishConfig": {
27
+ "access": "public"
28
+ },
29
+ "dependencies": {
30
+ "@deepagents/agent": "0.1.0",
31
+ "@ai-sdk/groq": "2.0.24",
32
+ "zod": "^3.25.76 || ^4.0.0",
33
+ "ai": "^5.0.65",
34
+ "lodash-es": "^4.17.21",
35
+ "@deepagents/retrieval": "0.1.0",
36
+ "@deepagents/toolbox": "0.1.0",
37
+ "p-limit": "^6.1.0"
38
+ },
39
+ "peerDependencies": {},
40
+ "devDependencies": {
41
+ "@types/debug": "^4.1.12"
42
+ }
43
+ }