@lota-sdk/shared 0.1.33 → 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
|
import { z } from 'zod'
|
|
2
2
|
|
|
3
|
-
import { STRUCTURAL_NODE_TYPES } from '../constants/execution-plan'
|
|
3
|
+
import { HUMAN_NODE_TYPES, STRUCTURAL_NODE_TYPES } from '../constants/execution-plan'
|
|
4
4
|
import type { PlanArtifactSpec, PlanCompletionCheck, PlanDraft, PlanNodeOwner, PlanNodeType } from './execution-plan'
|
|
5
5
|
import {
|
|
6
6
|
ExecutionModeSchema,
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
} from './execution-plan'
|
|
18
18
|
|
|
19
19
|
const STRUCTURAL_NODE_TYPE_SET = new Set<PlanNodeType>(STRUCTURAL_NODE_TYPES)
|
|
20
|
+
const HUMAN_NODE_TYPE_SET = new Set<PlanNodeType>(HUMAN_NODE_TYPES)
|
|
20
21
|
|
|
21
22
|
const agentPlanOwnerStringSchema = z.string().trim().min(1).max(200)
|
|
22
23
|
|
|
@@ -201,7 +202,9 @@ export function expandAgentPlanDraft(draft: AgentPlanDraft): PlanDraft {
|
|
|
201
202
|
id: node.id,
|
|
202
203
|
type: node.type,
|
|
203
204
|
label: node.label,
|
|
204
|
-
owner:
|
|
205
|
+
owner: HUMAN_NODE_TYPE_SET.has(node.type)
|
|
206
|
+
? ({ executorType: 'user', ref: 'user' } as const)
|
|
207
|
+
: normalizeOwner(node.owner),
|
|
205
208
|
objective: node.objective,
|
|
206
209
|
instructions: node.instructions,
|
|
207
210
|
deliverables,
|