@lucern/contracts 0.3.0-alpha.6 → 0.3.0-alpha.7

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.
Files changed (93) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/{dsl-BgpoVOVQ.d.ts → dsl-djCRfuWC.d.ts} +1 -1
  3. package/dist/dsl.d.ts +1 -1
  4. package/dist/dsl.js +1 -4
  5. package/dist/dsl.js.map +1 -1
  6. package/dist/{edge-policy-manifest-DpmTtjmm.d.ts → edge-policy-manifest-Byv6cQPP.d.ts} +1 -1
  7. package/dist/function-registry/beliefs.js +73 -10
  8. package/dist/function-registry/beliefs.js.map +1 -1
  9. package/dist/function-registry/coding.js +73 -10
  10. package/dist/function-registry/coding.js.map +1 -1
  11. package/dist/function-registry/context.js +78 -12
  12. package/dist/function-registry/context.js.map +1 -1
  13. package/dist/function-registry/contracts.js +73 -10
  14. package/dist/function-registry/contracts.js.map +1 -1
  15. package/dist/function-registry/coordination.js +73 -10
  16. package/dist/function-registry/coordination.js.map +1 -1
  17. package/dist/function-registry/edges.js +73 -10
  18. package/dist/function-registry/edges.js.map +1 -1
  19. package/dist/function-registry/evidence.js +77 -11
  20. package/dist/function-registry/evidence.js.map +1 -1
  21. package/dist/function-registry/graph.js +73 -10
  22. package/dist/function-registry/graph.js.map +1 -1
  23. package/dist/function-registry/helpers.d.ts +3 -3
  24. package/dist/function-registry/helpers.js +73 -10
  25. package/dist/function-registry/helpers.js.map +1 -1
  26. package/dist/function-registry/identity.js +73 -10
  27. package/dist/function-registry/identity.js.map +1 -1
  28. package/dist/function-registry/index.d.ts +2 -2
  29. package/dist/function-registry/index.js +76 -13
  30. package/dist/function-registry/index.js.map +1 -1
  31. package/dist/function-registry/judgments.js +73 -10
  32. package/dist/function-registry/judgments.js.map +1 -1
  33. package/dist/function-registry/legacy.js +73 -10
  34. package/dist/function-registry/legacy.js.map +1 -1
  35. package/dist/function-registry/lenses.js +73 -10
  36. package/dist/function-registry/lenses.js.map +1 -1
  37. package/dist/function-registry/manifest.d.ts +1 -1
  38. package/dist/function-registry/ontologies.js +73 -10
  39. package/dist/function-registry/ontologies.js.map +1 -1
  40. package/dist/function-registry/pipeline.js +73 -10
  41. package/dist/function-registry/pipeline.js.map +1 -1
  42. package/dist/function-registry/questions.js +73 -10
  43. package/dist/function-registry/questions.js.map +1 -1
  44. package/dist/function-registry/tasks.d.ts +17 -17
  45. package/dist/function-registry/tasks.js +117 -12
  46. package/dist/function-registry/tasks.js.map +1 -1
  47. package/dist/function-registry/topics.js +73 -10
  48. package/dist/function-registry/topics.js.map +1 -1
  49. package/dist/function-registry/types.d.ts +1 -1
  50. package/dist/function-registry/worktrees.js +81 -13
  51. package/dist/function-registry/worktrees.js.map +1 -1
  52. package/dist/function-registry-input-audit.js +4 -2
  53. package/dist/function-registry-input-audit.js.map +1 -1
  54. package/dist/index.d.ts +5 -5
  55. package/dist/index.js +100 -12
  56. package/dist/index.js.map +1 -1
  57. package/dist/infisical-runtime.contract.js +5 -0
  58. package/dist/infisical-runtime.contract.js.map +1 -1
  59. package/dist/lens-filter.contract.js +4 -3
  60. package/dist/lens-filter.contract.js.map +1 -1
  61. package/dist/lens-workflow.contract.js +4 -3
  62. package/dist/lens-workflow.contract.js.map +1 -1
  63. package/dist/manifests/edge-policy-manifest.d.ts +1 -1
  64. package/dist/manifests/infisical-runtime-manifest.js +5 -0
  65. package/dist/manifests/infisical-runtime-manifest.js.map +1 -1
  66. package/dist/manifests/tenant-client-manifest.d.ts +20 -1
  67. package/dist/manifests/tenant-client-manifest.js +23 -0
  68. package/dist/manifests/tenant-client-manifest.js.map +1 -1
  69. package/dist/projections/check-convex-args-shape.js +4 -1
  70. package/dist/projections/check-convex-args-shape.js.map +1 -1
  71. package/dist/projections/create-evidence.projection.js +4 -1
  72. package/dist/projections/create-evidence.projection.js.map +1 -1
  73. package/dist/projections/index.js +4 -1
  74. package/dist/projections/index.js.map +1 -1
  75. package/dist/schema-helpers/enumValidation.js +2 -5
  76. package/dist/schema-helpers/enumValidation.js.map +1 -1
  77. package/dist/schema-helpers/spine/nodes/decision.js +2 -1
  78. package/dist/schema-helpers/spine/nodes/decision.js.map +1 -1
  79. package/dist/schema-helpers/spine/tables/epistemicNodes.js +27 -27
  80. package/dist/schema-helpers/spine/tables/epistemicNodes.js.map +1 -1
  81. package/dist/sdk-methods.contract.d.ts +1 -1
  82. package/dist/{sdk-tools.contract-Ng8ULxjr.d.ts → sdk-tools.contract-Ci8bkoai.d.ts} +2 -2
  83. package/dist/sdk-tools.contract.d.ts +2 -2
  84. package/dist/sdk-tools.contract.js +72 -7
  85. package/dist/sdk-tools.contract.js.map +1 -1
  86. package/dist/tenant-client.contract.d.ts +20 -1
  87. package/dist/tenant-client.contract.js +23 -0
  88. package/dist/tenant-client.contract.js.map +1 -1
  89. package/dist/{tool-contracts-CYXVPN4K.d.ts → tool-contracts-B4iWhejG.d.ts} +1 -1
  90. package/dist/tool-contracts.d.ts +1 -1
  91. package/dist/tool-contracts.js +72 -7
  92. package/dist/tool-contracts.js.map +1 -1
  93. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import * as zod from 'zod';
1
+ import { z } from 'zod';
2
2
 
3
3
  /**
4
4
  * MCP Tool Contract Definitions
@@ -115,10 +115,10 @@ declare const tasksContracts: readonly [{
115
115
  allowedPrincipalTypes: ("user" | "service" | "agent")[];
116
116
  };
117
117
  convex: FunctionConvexTarget | undefined;
118
- args: zod.ZodTypeAny;
119
- returns: zod.ZodTypeAny;
120
- input: zod.ZodTypeAny;
121
- output: zod.ZodTypeAny;
118
+ args: z.ZodTypeAny;
119
+ returns: z.ZodTypeAny;
120
+ input: z.ZodTypeAny;
121
+ output: z.ZodTypeAny;
122
122
  openapi: {
123
123
  summary: string;
124
124
  tags: string[];
@@ -154,10 +154,10 @@ declare const tasksContracts: readonly [{
154
154
  allowedPrincipalTypes: ("user" | "service" | "agent")[];
155
155
  };
156
156
  convex: FunctionConvexTarget | undefined;
157
- args: zod.ZodTypeAny;
158
- returns: zod.ZodTypeAny;
159
- input: zod.ZodTypeAny;
160
- output: zod.ZodTypeAny;
157
+ args: z.ZodTypeAny;
158
+ returns: z.ZodTypeAny;
159
+ input: z.ZodTypeAny;
160
+ output: z.ZodTypeAny;
161
161
  openapi: {
162
162
  summary: string;
163
163
  tags: string[];
@@ -193,10 +193,10 @@ declare const tasksContracts: readonly [{
193
193
  allowedPrincipalTypes: ("user" | "service" | "agent")[];
194
194
  };
195
195
  convex: FunctionConvexTarget | undefined;
196
- args: zod.ZodTypeAny;
197
- returns: zod.ZodTypeAny;
198
- input: zod.ZodTypeAny;
199
- output: zod.ZodTypeAny;
196
+ args: z.ZodTypeAny;
197
+ returns: z.ZodTypeAny;
198
+ input: z.ZodTypeAny;
199
+ output: z.ZodTypeAny;
200
200
  openapi: {
201
201
  summary: string;
202
202
  tags: string[];
@@ -232,10 +232,10 @@ declare const tasksContracts: readonly [{
232
232
  allowedPrincipalTypes: ("user" | "service" | "agent")[];
233
233
  };
234
234
  convex: FunctionConvexTarget | undefined;
235
- args: zod.ZodTypeAny;
236
- returns: zod.ZodTypeAny;
237
- input: zod.ZodTypeAny;
238
- output: zod.ZodTypeAny;
235
+ args: z.ZodTypeAny;
236
+ returns: z.ZodTypeAny;
237
+ input: z.ZodTypeAny;
238
+ output: z.ZodTypeAny;
239
239
  openapi: {
240
240
  summary: string;
241
241
  tags: string[];
@@ -429,9 +429,16 @@ var ADD_WORKTREE = {
429
429
  },
430
430
  projectId: {
431
431
  type: "string",
432
- description: "Legacy topicId alias"
432
+ description: "Legacy topicId alias or resolver hint"
433
+ },
434
+ topicId: {
435
+ type: "string",
436
+ description: "Optional topic scope hint for resolver validation"
437
+ },
438
+ topicHint: {
439
+ type: "string",
440
+ description: "Natural-language topic hint for automatic topic resolution"
433
441
  },
434
- topicId: { type: "string", description: "Optional topic scope hint" },
435
442
  branchId: {
436
443
  type: "string",
437
444
  description: "The branch this worktree investigates"
@@ -529,6 +536,22 @@ var ADD_WORKTREE = {
529
536
  type: "string",
530
537
  description: "Optional domain pack whose shaping hooks should influence generated questions and tasks"
531
538
  },
539
+ tags: {
540
+ type: "array",
541
+ description: "Additional topic-resolution tags for the worktree"
542
+ },
543
+ touchedPaths: {
544
+ type: "array",
545
+ description: "File paths used as topic-resolution signals"
546
+ },
547
+ sourceRef: {
548
+ type: "string",
549
+ description: "Source reference used as a topic-resolution signal"
550
+ },
551
+ sourceKind: {
552
+ type: "string",
553
+ description: "Source kind used as a topic-resolution signal"
554
+ },
532
555
  campaign: {
533
556
  type: "number",
534
557
  description: "Top-level pipeline campaign number. Campaigns define the outer execution slice."
@@ -566,7 +589,7 @@ var ADD_WORKTREE = {
566
589
  description: "Timestamp when worktree metadata was last reconciled"
567
590
  }
568
591
  },
569
- required: ["title", "topicId"],
592
+ required: ["title"],
570
593
  response: {
571
594
  description: "The created worktree",
572
595
  fields: {
@@ -2269,18 +2292,60 @@ var CREATE_TASK = {
2269
2292
  name: "create_task",
2270
2293
  description: "Create an execution task tied to the reasoning state. Like `git task` \u2014 tracks concrete work items (calls to make, data to gather, analyses to run) linked to questions, beliefs, or worktrees.",
2271
2294
  parameters: {
2272
- title: { type: "string", description: "Task description" },
2295
+ title: { type: "string", description: "Task title" },
2273
2296
  topicId: { type: "string", description: "Topic scope" },
2297
+ description: {
2298
+ type: "string",
2299
+ description: "Long-form task description"
2300
+ },
2274
2301
  taskType: {
2275
2302
  type: "string",
2276
- description: "Type: research, interview, analysis, data_collection",
2277
- enum: ["research", "interview", "analysis", "data_collection"]
2303
+ description: "Task taxonomy",
2304
+ enum: [
2305
+ "general",
2306
+ "find_evidence",
2307
+ "verify_claim",
2308
+ "research",
2309
+ "review",
2310
+ "interview",
2311
+ "analysis",
2312
+ "track_metrics"
2313
+ ]
2314
+ },
2315
+ priority: {
2316
+ type: "string",
2317
+ description: "Priority",
2318
+ enum: ["urgent", "high", "medium", "low"]
2319
+ },
2320
+ status: {
2321
+ type: "string",
2322
+ description: "Initial status (defaults to todo)",
2323
+ enum: ["todo", "in_progress", "blocked", "done"]
2324
+ },
2325
+ linkedWorktreeId: {
2326
+ type: "string",
2327
+ description: "Worktree this task belongs to"
2328
+ },
2329
+ linkedBeliefId: {
2330
+ type: "string",
2331
+ description: "Belief this task supports"
2278
2332
  },
2279
2333
  linkedQuestionId: {
2280
2334
  type: "string",
2281
2335
  description: "Question this task addresses"
2282
2336
  },
2283
- linkedWorktreeId: { type: "string", description: "Worktree scope" }
2337
+ assigneeId: {
2338
+ type: "string",
2339
+ description: "Principal assigned to the task"
2340
+ },
2341
+ dueDate: {
2342
+ type: "number",
2343
+ description: "Due date as epoch milliseconds"
2344
+ },
2345
+ tags: {
2346
+ type: "array",
2347
+ description: "Free-form string tags"
2348
+ }
2284
2349
  },
2285
2350
  required: ["title"],
2286
2351
  response: {
@@ -4363,9 +4428,7 @@ function mcpContractFromArgsSchema(base, args, contractName) {
4363
4428
  required: converted.filter(([, field]) => field.required).map(([fieldName]) => fieldName)
4364
4429
  };
4365
4430
  }
4366
- function defineFunctionContract(contract) {
4367
- return contract;
4368
- }
4431
+ var defineFunctionContract = (contract) => contract;
4369
4432
  function compactRecord(input) {
4370
4433
  return Object.fromEntries(
4371
4434
  Object.entries(input).filter(([, value]) => value !== void 0)
@@ -4506,6 +4569,46 @@ var listTasksProjection = defineProjection({
4506
4569
  });
4507
4570
 
4508
4571
  // src/function-registry/tasks.ts
4572
+ var taskPrioritySchema = z.enum(["urgent", "high", "medium", "low"]);
4573
+ var taskStatusSchema2 = z.enum(["todo", "in_progress", "blocked", "done"]);
4574
+ var taskTypeSchema = z.enum([
4575
+ "general",
4576
+ "find_evidence",
4577
+ "verify_claim",
4578
+ "research",
4579
+ "review",
4580
+ "interview",
4581
+ "analysis",
4582
+ "track_metrics"
4583
+ ]);
4584
+ var createTaskArgs = z.object({
4585
+ title: z.string().describe("Task title."),
4586
+ topicId: z.string().optional().describe("Topic scope."),
4587
+ description: z.string().optional().describe("Long-form task description."),
4588
+ taskType: taskTypeSchema.optional().describe("Task taxonomy."),
4589
+ priority: taskPrioritySchema.optional().describe("Priority. Defaults to medium when omitted by the server."),
4590
+ status: taskStatusSchema2.optional().describe("Initial status. Defaults to todo."),
4591
+ linkedWorktreeId: z.string().optional().describe("Worktree this task belongs to."),
4592
+ linkedBeliefId: z.string().optional().describe("Belief this task supports."),
4593
+ linkedQuestionId: z.string().optional().describe("Question this task addresses."),
4594
+ assigneeId: z.string().optional().describe("Principal assigned to the task."),
4595
+ dueDate: z.number().optional().describe("Due date as epoch milliseconds."),
4596
+ tags: z.array(z.string()).optional().describe("Free-form tags.")
4597
+ });
4598
+ var createTaskInput = (input) => compactRecord({
4599
+ title: input.title,
4600
+ topicId: input.topicId,
4601
+ description: input.description,
4602
+ taskType: input.taskType,
4603
+ priority: input.priority ?? "medium",
4604
+ status: input.status ?? "todo",
4605
+ linkedWorktreeId: input.linkedWorktreeId,
4606
+ linkedBeliefId: input.linkedBeliefId,
4607
+ linkedQuestionId: input.linkedQuestionId,
4608
+ assigneeId: input.assigneeId,
4609
+ dueDate: input.dueDate,
4610
+ tags: input.tags
4611
+ });
4509
4612
  var taskInput = (input) => compactRecord({
4510
4613
  ...input,
4511
4614
  taskId: input.taskId ?? input.id
@@ -4537,8 +4640,10 @@ var tasksContracts = [
4537
4640
  convex: {
4538
4641
  module: "tasks",
4539
4642
  functionName: "create",
4540
- kind: "mutation"
4541
- }
4643
+ kind: "mutation",
4644
+ inputProjection: createTaskInput
4645
+ },
4646
+ args: createTaskArgs
4542
4647
  }),
4543
4648
  surfaceContract({
4544
4649
  name: "list_tasks",