@lota-sdk/shared 0.1.32 → 0.1.33
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.
- package/package.json +1 -1
- package/src/schemas/tools.ts +56 -8
package/package.json
CHANGED
package/src/schemas/tools.ts
CHANGED
|
@@ -8,14 +8,25 @@ import { PlanNodeResultSubmissionSchema, PlanRunStatusSchema, SerializableExecut
|
|
|
8
8
|
export const USER_QUESTIONS_TOOL_NAME = 'userQuestions' as const
|
|
9
9
|
export const CONSULT_SPECIALIST_TOOL_NAME = 'consultSpecialist' as const
|
|
10
10
|
export const CONSULT_TEAM_TOOL_NAME = 'consultTeam' as const
|
|
11
|
+
export const EXECUTION_PLAN_TOOL_NAME = 'executionPlan' as const
|
|
12
|
+
export const EXECUTION_PLAN_QUERY_TOOL_NAME = 'executionPlanQuery' as const
|
|
13
|
+
export const SUBMIT_PLAN_TURN_RESULT_TOOL_NAME = 'submitPlanTurnResult' as const
|
|
14
|
+
|
|
15
|
+
/** @deprecated Use EXECUTION_PLAN_TOOL_NAME */
|
|
11
16
|
export const CREATE_EXECUTION_PLAN_TOOL_NAME = 'createExecutionPlan' as const
|
|
17
|
+
/** @deprecated Use EXECUTION_PLAN_TOOL_NAME */
|
|
12
18
|
export const CREATE_PROJECT_WITH_PLAN_TOOL_NAME = 'createProjectWithPlan' as const
|
|
19
|
+
/** @deprecated Use EXECUTION_PLAN_TOOL_NAME */
|
|
13
20
|
export const REPLACE_EXECUTION_PLAN_TOOL_NAME = 'replaceExecutionPlan' as const
|
|
21
|
+
/** @deprecated Use EXECUTION_PLAN_TOOL_NAME */
|
|
14
22
|
export const SUBMIT_EXECUTION_NODE_RESULT_TOOL_NAME = 'submitExecutionNodeResult' as const
|
|
15
|
-
|
|
23
|
+
/** @deprecated Use EXECUTION_PLAN_QUERY_TOOL_NAME */
|
|
16
24
|
export const LIST_EXECUTION_PLANS_TOOL_NAME = 'listExecutionPlans' as const
|
|
25
|
+
/** @deprecated Use EXECUTION_PLAN_QUERY_TOOL_NAME */
|
|
17
26
|
export const GET_EXECUTION_PLAN_DETAILS_TOOL_NAME = 'getExecutionPlanDetails' as const
|
|
27
|
+
/** @deprecated Use EXECUTION_PLAN_QUERY_TOOL_NAME */
|
|
18
28
|
export const GET_ACTIVE_EXECUTION_PLAN_TOOL_NAME = 'getActiveExecutionPlan' as const
|
|
29
|
+
/** @deprecated Use EXECUTION_PLAN_TOOL_NAME */
|
|
19
30
|
export const RESUME_EXECUTION_PLAN_RUN_TOOL_NAME = 'resumeExecutionPlanRun' as const
|
|
20
31
|
|
|
21
32
|
const UserQuestionItemSchema = z
|
|
@@ -100,6 +111,45 @@ export const GetActiveExecutionPlanArgsSchema = z
|
|
|
100
111
|
|
|
101
112
|
export const ResumeExecutionPlanRunArgsSchema = z.object({ runId: z.string().trim().min(1) }).strict()
|
|
102
113
|
|
|
114
|
+
export const ExecutionPlanActionSchema = z
|
|
115
|
+
.enum(['create', 'create-project', 'replace', 'resume'])
|
|
116
|
+
.describe(
|
|
117
|
+
'create: inline plan (1-2 nodes). create-project: plan in a dedicated project workstream (3+ nodes). replace: replace active plan. resume: resume interrupted plan.',
|
|
118
|
+
)
|
|
119
|
+
export type ExecutionPlanAction = z.infer<typeof ExecutionPlanActionSchema>
|
|
120
|
+
|
|
121
|
+
export const ExecutionPlanArgsSchema = AgentPlanDraftSchema.extend({
|
|
122
|
+
action: ExecutionPlanActionSchema,
|
|
123
|
+
projectTitle: z
|
|
124
|
+
.string()
|
|
125
|
+
.trim()
|
|
126
|
+
.min(1)
|
|
127
|
+
.max(200)
|
|
128
|
+
.optional()
|
|
129
|
+
.describe('Required for create-project when creating a new workstream.'),
|
|
130
|
+
targetWorkstreamId: z
|
|
131
|
+
.string()
|
|
132
|
+
.trim()
|
|
133
|
+
.min(1)
|
|
134
|
+
.optional()
|
|
135
|
+
.describe('Target existing workstream. For create-project, provide either this or projectTitle.'),
|
|
136
|
+
runId: z.string().trim().min(1).optional().describe('Required for replace and resume.'),
|
|
137
|
+
reason: z.string().trim().min(1).max(1000).optional().describe('Required for replace.'),
|
|
138
|
+
}).strict()
|
|
139
|
+
export type ExecutionPlanArgs = z.infer<typeof ExecutionPlanArgsSchema>
|
|
140
|
+
|
|
141
|
+
export const ExecutionPlanQueryArgsSchema = z
|
|
142
|
+
.object({
|
|
143
|
+
runId: z.string().trim().min(1).optional().describe('Specific plan run to load. Omit to list all active plans.'),
|
|
144
|
+
includeEvents: z.boolean().default(true).optional(),
|
|
145
|
+
includeArtifacts: z.boolean().default(true).optional(),
|
|
146
|
+
includeApprovals: z.boolean().default(true).optional(),
|
|
147
|
+
includeCheckpoints: z.boolean().default(false).optional(),
|
|
148
|
+
includeValidationIssues: z.boolean().default(true).optional(),
|
|
149
|
+
})
|
|
150
|
+
.strict()
|
|
151
|
+
export type ExecutionPlanQueryArgs = z.infer<typeof ExecutionPlanQueryArgsSchema>
|
|
152
|
+
|
|
103
153
|
export const PlanSummarySchema = z
|
|
104
154
|
.object({ runId: z.string(), title: z.string(), status: PlanRunStatusSchema })
|
|
105
155
|
.strict()
|
|
@@ -166,12 +216,10 @@ export type CoreChatTools = {
|
|
|
166
216
|
userQuestions: { input: UserQuestionsArgs; output: unknown }
|
|
167
217
|
consultSpecialist: { input: ConsultSpecialistArgs; output: ConsultSpecialistResultData }
|
|
168
218
|
consultTeam: { input: ConsultTeamArgs; output: ConsultTeamResultData }
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
219
|
+
executionPlan: { input: ExecutionPlanArgs; output: ExecutionPlanToolResultData }
|
|
220
|
+
executionPlanQuery: {
|
|
221
|
+
input: ExecutionPlanQueryArgs
|
|
222
|
+
output: ExecutionPlanToolResultData | ListExecutionPlansToolResultData
|
|
223
|
+
}
|
|
173
224
|
submitPlanTurnResult: { input: SubmitPlanTurnResultArgs; output: ExecutionPlanToolResultData }
|
|
174
|
-
listExecutionPlans: { input: ListExecutionPlansArgs; output: ListExecutionPlansToolResultData }
|
|
175
|
-
getExecutionPlanDetails: { input: GetActiveExecutionPlanArgs; output: ExecutionPlanToolResultData }
|
|
176
|
-
resumeExecutionPlanRun: { input: ResumeExecutionPlanRunArgs; output: ExecutionPlanToolResultData }
|
|
177
225
|
}
|