@lota-sdk/core 0.4.5 → 0.4.6

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lota-sdk/core",
3
- "version": "0.4.5",
3
+ "version": "0.4.6",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -32,7 +32,7 @@
32
32
  "@chat-adapter/slack": "^4.23.0",
33
33
  "@chat-adapter/state-ioredis": "^4.23.0",
34
34
  "@logtape/logtape": "^2.0.5",
35
- "@lota-sdk/shared": "0.4.5",
35
+ "@lota-sdk/shared": "0.4.6",
36
36
  "@mendable/firecrawl-js": "^4.18.1",
37
37
  "@surrealdb/node": "^3.0.3",
38
38
  "ai": "^6.0.145",
@@ -183,7 +183,7 @@ export function buildThreadAgentToolPolicy<TAgent extends string, TSkill extends
183
183
  includeMemoryRemember: !params.onboardingActive,
184
184
  includeOrgActionSearch: !params.onboardingActive,
185
185
  includeMemoryBlockAppend: true,
186
- includeReadFileParts: !params.onboardingActive,
186
+ includeReadFileParts: true,
187
187
  includeExecutionPlanTools: !params.onboardingActive,
188
188
  includeInspectWebsite: params.onboardingActive && params.agentId === onboardingOwnerAgentId,
189
189
  includeProceedInOnboarding: params.onboardingActive && params.agentId === onboardingOwnerAgentId,
@@ -25,3 +25,12 @@ export function assertSubstantiveAgentResult(value: string, label = 'Agent resul
25
25
 
26
26
  return normalized
27
27
  }
28
+
29
+ /**
30
+ * Returns the normalized text if substantive, otherwise returns the fallback.
31
+ * Useful for delegated agent results where the agent may end on a tool call without prose output.
32
+ */
33
+ export function resolveSubstantiveAgentResult(value: string, fallback: string): string {
34
+ const normalized = normalizeAgentResultText(value)
35
+ return isSubstantiveAgentResult(normalized) ? normalized : fallback
36
+ }
@@ -5,6 +5,7 @@ import {
5
5
  ExecutionPlanQueryArgsSchema,
6
6
  ExecutionPlanReplaceArgsSchema,
7
7
  ExecutionPlanResumeArgsSchema,
8
+ ExecutionPlanUpdateNodeArgsSchema,
8
9
  SubmitExecutionNodeResultArgsSchema,
9
10
  AgentPlanDraftSchema,
10
11
  expandAgentPlanDraft,
@@ -26,6 +27,7 @@ type ExecutionPlanExecutionPlanService = Pick<
26
27
  | 'createPlan'
27
28
  | 'replacePlan'
28
29
  | 'resumeRun'
30
+ | 'submitNodeResult'
29
31
  | 'listActivePlanSummaries'
30
32
  | 'getActivePlanToolResult'
31
33
  | 'getActivePlansForThread'
@@ -46,7 +48,7 @@ export function createExecutionPlanTool(params: {
46
48
 
47
49
  return tool({
48
50
  description:
49
- 'Manage execution plans. Actions: create (inline, 1-2 nodes), create-project (dedicated project thread, 3+ nodes), replace (swap active plan), resume (resume interrupted plan).',
51
+ 'Manage execution plans. Actions: create (inline, 1-2 nodes), create-project (dedicated project thread, 3+ nodes), replace (swap active plan), resume (resume interrupted plan), update-node (submit result for a specific node).',
50
52
  inputSchema: ExecutionPlanArgsSchema,
51
53
  execute: async (input) => {
52
54
  const parsed = parseExecutionPlanArgs(input)
@@ -148,6 +150,19 @@ export function createExecutionPlanTool(params: {
148
150
  input: { runId: parsed.runId },
149
151
  })
150
152
  break
153
+
154
+ case 'update-node':
155
+ result = await resolvedEpService.submitNodeResult({
156
+ threadId: params.threadId,
157
+ emittedBy: params.agentId,
158
+ input: {
159
+ runId: parsed.runId,
160
+ nodeId: parsed.node.id,
161
+ notes: parsed.node.latestNotes,
162
+ artifacts: parsed.node.deliverables ?? [],
163
+ },
164
+ })
165
+ break
151
166
  }
152
167
 
153
168
  params.onPlanChanged?.()
@@ -168,6 +183,8 @@ function parseExecutionPlanArgs(input: unknown): ExecutionPlanArgs {
168
183
  return ExecutionPlanReplaceArgsSchema.parse(parsed)
169
184
  case 'resume':
170
185
  return ExecutionPlanResumeArgsSchema.parse(parsed)
186
+ case 'update-node':
187
+ return ExecutionPlanUpdateNodeArgsSchema.parse(parsed)
171
188
  }
172
189
  }
173
190