@lota-sdk/core 0.1.34 → 0.1.35

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.1.34",
3
+ "version": "0.1.35",
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.1.34",
35
+ "@lota-sdk/shared": "0.1.35",
36
36
  "@mendable/firecrawl-js": "^4.18.0",
37
37
  "@surrealdb/node": "^3.0.3",
38
38
  "ai": "^6.0.141",
@@ -336,14 +336,9 @@ class ExecutionPlanService {
336
336
  input: PlanDraft & { runId: string; reason: string }
337
337
  }): Promise<ExecutionPlanToolResultData> {
338
338
  const activeRun = await planRunService.getRunById(params.input.runId)
339
- if (
340
- recordIdToString(activeRun.workstreamId, TABLES.WORKSTREAM) !==
341
- recordIdToString(params.workstreamId, TABLES.WORKSTREAM)
342
- ) {
343
- throw new Error('Execution run belongs to a different workstream.')
344
- }
339
+ const resolvedWorkstreamId = activeRun.workstreamId
345
340
 
346
- const activeRuns = await planRunService.getActiveRunRecords(params.workstreamId)
341
+ const activeRuns = await planRunService.getActiveRunRecords(resolvedWorkstreamId)
347
342
  if (activeRuns.length === 0) {
348
343
  throw new Error('No active execution run exists for this workstream.')
349
344
  }
@@ -404,7 +399,7 @@ class ExecutionPlanService {
404
399
  .content(
405
400
  buildCompiledSpecCreateData({
406
401
  organizationId: params.organizationId,
407
- workstreamId: params.workstreamId,
402
+ workstreamId: resolvedWorkstreamId,
408
403
  leadAgentId: params.leadAgentId,
409
404
  compiled,
410
405
  version: supersededSpec.version + 1,
@@ -418,7 +413,7 @@ class ExecutionPlanService {
418
413
  runId,
419
414
  spec,
420
415
  organizationId: params.organizationId,
421
- workstreamId: params.workstreamId,
416
+ workstreamId: resolvedWorkstreamId,
422
417
  leadAgentId: params.leadAgentId,
423
418
  nodes: compiled.nodes,
424
419
  emittedEvents,
@@ -986,11 +986,6 @@ class PlanExecutorService {
986
986
  emittedBy: string
987
987
  }): Promise<ExecutionPlanToolResultData> {
988
988
  const run = await planRunService.getRunById(params.runId)
989
- if (
990
- recordIdToString(run.workstreamId, TABLES.WORKSTREAM) !== recordIdToString(params.workstreamId, TABLES.WORKSTREAM)
991
- ) {
992
- throw new Error('Execution run belongs to a different workstream.')
993
- }
994
989
 
995
990
  const spec = await planRunService.getPlanSpecById(run.planSpecId)
996
991
  const nodeSpecs = await planRunService.listNodeSpecs(spec.id)
@@ -1119,11 +1114,6 @@ class PlanExecutorService {
1119
1114
  failureClass: PlanFailureClass
1120
1115
  }): Promise<SerializableExecutionPlan> {
1121
1116
  const run = await planRunService.getRunById(params.runId)
1122
- if (
1123
- recordIdToString(run.workstreamId, TABLES.WORKSTREAM) !== recordIdToString(params.workstreamId, TABLES.WORKSTREAM)
1124
- ) {
1125
- throw new Error('Execution run belongs to a different workstream.')
1126
- }
1127
1117
 
1128
1118
  const spec = await planRunService.getPlanSpecById(run.planSpecId)
1129
1119
  const nodeSpec = await planRunService.getNodeSpecByNodeId(spec.id, params.nodeId)