@lota-sdk/shared 0.4.4 → 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/shared",
3
- "version": "0.4.4",
3
+ "version": "0.4.6",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -1,5 +1,3 @@
1
- export const SILENT_EXECUTION_VISIBILITY = 'silent' as const
2
-
3
1
  export const HUMAN_NODE_TYPES = ['human-input', 'human-approval', 'human-review-edit', 'human-decision'] as const
4
2
 
5
3
  export const STRUCTURAL_NODE_TYPES = ['switch', 'join', 'deliberation-fork'] as const
@@ -4,8 +4,6 @@ export const OPENROUTER_GEMINI_FLASH_MODEL_ID = 'openrouter/google/gemini-3-flas
4
4
  export const OPENROUTER_TEAM_AGENT_MODEL_ID = 'openrouter/google/gemini-3-flash-preview' as const
5
5
  export const OPENROUTER_WEB_RESEARCH_MODEL_ID = 'openrouter/stepfun/step-3.5-flash' as const
6
6
  export const OPENROUTER_FAST_REASONING_MODEL_ID = 'openrouter/qwen/qwen3.5-flash-02-23' as const
7
- export const OPENROUTER_STRUCTURED_REASONING_MODEL_ID = 'openrouter/google/gemini-3.1-pro-preview' as const
8
- export const OPENROUTER_MANAGER_MODEL_ID = 'openrouter/openai/gpt-oss-120b:nitro' as const
9
7
 
10
8
  export const AI_GATEWAY_REASONING_SUMMARY_LEVEL = 'detailed' as const
11
9
 
package/src/index.ts CHANGED
@@ -19,7 +19,6 @@ export * from './schemas/organization'
19
19
  export * from './schemas/organization-api'
20
20
  export * from './schemas/plan-board'
21
21
  export * from './schemas/playbook'
22
- export * from './schemas/plugin-coordination'
23
22
  export * from './schemas/queue-job'
24
23
  export * from './schemas/recent-activity'
25
24
  export * from './schemas/repository-structure'
@@ -63,10 +63,9 @@ export const paginationSchemaBase = z.object({
63
63
  take: paginationTakeSchema.default(THREAD.DEFAULT_PAGE_LIMIT),
64
64
  })
65
65
 
66
- export const paginationSchema = paginationSchemaBase.refine(
67
- (value) => !(value.page !== undefined && value.cursor !== undefined),
68
- { message: 'Provide either page or cursor, not both', path: ['cursor'] },
69
- )
66
+ export const paginationSchema = paginationSchemaBase.refine((data) => !(data.page && data.cursor), {
67
+ message: 'Cannot specify both page and cursor',
68
+ })
70
69
 
71
70
  export const installUrlResponseSchema = z.object({ url: z.string().url() }).meta({ id: 'InstallUrlResponseSchema' })
72
71
 
@@ -976,13 +976,6 @@ export const PlanCycleRecordSchema = z.object({
976
976
  })
977
977
  export type PlanCycleRecord = z.infer<typeof PlanCycleRecordSchema>
978
978
 
979
- export const ContextEnrichmentSchema = z.object({
980
- domain: z.string().trim().min(1).max(200),
981
- data: z.record(z.string(), z.unknown()),
982
- confidence: z.number().min(0).max(1),
983
- })
984
- export type ContextEnrichment = z.infer<typeof ContextEnrichmentSchema>
985
-
986
979
  export const EvidenceRecordSchema = z.object({
987
980
  sourceType: z.enum(['artifact', 'metric', 'pattern', 'external']),
988
981
  sourceId: z.string().trim().min(1).max(200),
@@ -4,6 +4,7 @@ import { AgentPlanDraftSchema, AgentPlanEdgeDraftSchema } from './agent-plan-dra
4
4
  import { baseChatMessageSchema } from './chat-api'
5
5
  import type { AnyChatMessage } from './chat-message'
6
6
  import {
7
+ PlanArtifactSubmissionSchema,
7
8
  PlanEdgeSpecSchema,
8
9
  PlanNodeResultSubmissionSchema,
9
10
  PlanNodeRunStatusSchema,
@@ -67,9 +68,9 @@ export const SubmitExecutionNodeResultArgsSchema = PlanNodeResultSubmissionSchem
67
68
  export const SubmitPlanTurnResultArgsSchema = PlanNodeResultSubmissionSchema
68
69
 
69
70
  export const ExecutionPlanActionSchema = z
70
- .enum(['create', 'create-project', 'replace', 'resume'])
71
+ .enum(['create', 'create-project', 'replace', 'resume', 'update-node'])
71
72
  .describe(
72
- 'create: inline plan (1-2 nodes). create-project: plan in a dedicated project thread (3+ nodes). replace: replace active plan. resume: resume interrupted plan.',
73
+ 'create: inline plan (1-2 nodes). create-project: plan in a dedicated project thread (3+ nodes). replace: replace active plan. resume: resume interrupted plan. update-node: submit result for a specific plan node.',
73
74
  )
74
75
  export type ExecutionPlanAction = z.infer<typeof ExecutionPlanActionSchema>
75
76
 
@@ -117,6 +118,22 @@ export const ExecutionPlanResumeArgsSchema = z
117
118
  .object({ action: z.literal('resume'), runId: runIdSchema.describe('Required for replace and resume.') })
118
119
  .strict()
119
120
 
121
+ const ExecutionPlanNodeUpdateSchema = z
122
+ .object({
123
+ id: z.string().trim().min(1).describe('The node ID to update.'),
124
+ latestNotes: z.string().trim().min(1).max(4000).describe('Summary of what was accomplished.'),
125
+ deliverables: z.array(PlanArtifactSubmissionSchema).optional().describe('Artifacts produced by the node.'),
126
+ })
127
+ .strict()
128
+
129
+ export const ExecutionPlanUpdateNodeArgsSchema = z
130
+ .object({
131
+ action: z.literal('update-node'),
132
+ runId: runIdSchema.describe('The plan run containing the node.'),
133
+ node: ExecutionPlanNodeUpdateSchema,
134
+ })
135
+ .strict()
136
+
120
137
  const ExecutionPlanBaseArgsSchema = z
121
138
  .object({
122
139
  action: ExecutionPlanActionSchema,
@@ -127,8 +144,9 @@ const ExecutionPlanBaseArgsSchema = z
127
144
  projectTitle: projectTitleSchema.optional(),
128
145
  targetThreadId: targetThreadIdSchema.optional(),
129
146
  requireApproval: requireApprovalSchema,
130
- runId: runIdSchema.describe('Required for replace and resume.').optional(),
147
+ runId: runIdSchema.describe('Required for replace, resume, and update-node.').optional(),
131
148
  reason: replaceReasonSchema.describe('Required for replace.').optional(),
149
+ node: ExecutionPlanNodeUpdateSchema.optional().describe('Required for update-node.'),
132
150
  })
133
151
  .strict()
134
152
 
@@ -221,6 +239,43 @@ export const ExecutionPlanArgsSchema = ExecutionPlanBaseArgsSchema.superRefine((
221
239
  }
222
240
  }
223
241
  }
242
+
243
+ if (value.action === 'update-node') {
244
+ if (value.runId === undefined) {
245
+ addMissingExecutionPlanFieldIssue(ctx, 'runId', 'runId is required for update-node.')
246
+ }
247
+ if (value.node === undefined) {
248
+ addMissingExecutionPlanFieldIssue(ctx, 'node', 'node is required for update-node.')
249
+ }
250
+ for (const path of [
251
+ 'title',
252
+ 'objective',
253
+ 'nodes',
254
+ 'edges',
255
+ 'projectTitle',
256
+ 'targetThreadId',
257
+ 'reason',
258
+ ] as const) {
259
+ if (value[path] !== undefined) {
260
+ addUnexpectedExecutionPlanFieldIssue(
261
+ ctx,
262
+ path,
263
+ `${path} is not allowed when action is "update-node". Use only action, runId, and node.`,
264
+ )
265
+ }
266
+ }
267
+ if (value.requireApproval !== undefined) {
268
+ addUnexpectedExecutionPlanFieldIssue(
269
+ ctx,
270
+ 'requireApproval',
271
+ 'requireApproval is not allowed when action is "update-node".',
272
+ )
273
+ }
274
+ }
275
+
276
+ if (value.action !== 'update-node' && value.node !== undefined) {
277
+ addUnexpectedExecutionPlanFieldIssue(ctx, 'node', 'node is only allowed when action is "update-node".')
278
+ }
224
279
  })
225
280
 
226
281
  export type ExecutionPlanArgs =
@@ -228,6 +283,7 @@ export type ExecutionPlanArgs =
228
283
  | z.infer<typeof ExecutionPlanCreateProjectArgsSchema>
229
284
  | z.infer<typeof ExecutionPlanReplaceArgsSchema>
230
285
  | z.infer<typeof ExecutionPlanResumeArgsSchema>
286
+ | z.infer<typeof ExecutionPlanUpdateNodeArgsSchema>
231
287
 
232
288
  export const ExecutionPlanQueryArgsSchema = z
233
289
  .object({
@@ -1,11 +0,0 @@
1
- import { z } from 'zod'
2
-
3
- export const SignalDirectionSchema = z.enum(['produces', 'consumes'])
4
- export type SignalDirection = z.infer<typeof SignalDirectionSchema>
5
-
6
- export const SignalDeclarationSchema = z.object({
7
- signalName: z.string().trim().min(1).max(200),
8
- direction: SignalDirectionSchema,
9
- description: z.string().trim().min(1).max(500).optional(),
10
- })
11
- export type SignalDeclaration = z.infer<typeof SignalDeclarationSchema>