@lucern/contracts 1.0.50 → 1.0.51

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 (66) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/dist/function-registry/beliefs.d.ts +77 -0
  3. package/dist/function-registry/beliefs.js +7 -2
  4. package/dist/function-registry/coding.d.ts +183 -0
  5. package/dist/function-registry/coding.js +60 -33
  6. package/dist/function-registry/context.d.ts +9 -0
  7. package/dist/function-registry/context.js +1 -0
  8. package/dist/function-registry/contracts.d.ts +16 -12
  9. package/dist/function-registry/contracts.js +5 -2
  10. package/dist/function-registry/coordination.d.ts +9 -0
  11. package/dist/function-registry/coordination.js +1 -0
  12. package/dist/function-registry/edges.d.ts +140 -0
  13. package/dist/function-registry/edges.js +6 -2
  14. package/dist/function-registry/embeddings.d.ts +4 -0
  15. package/dist/function-registry/embeddings.js +1 -0
  16. package/dist/function-registry/evidence.d.ts +251 -0
  17. package/dist/function-registry/evidence.js +94 -5
  18. package/dist/function-registry/graph.d.ts +15 -0
  19. package/dist/function-registry/graph.js +1 -0
  20. package/dist/function-registry/helpers.d.ts +2 -0
  21. package/dist/function-registry/helpers.js +1 -0
  22. package/dist/function-registry/hybrid.d.ts +6 -0
  23. package/dist/function-registry/hybrid.js +1 -0
  24. package/dist/function-registry/identity.d.ts +4 -0
  25. package/dist/function-registry/identity.js +1 -0
  26. package/dist/function-registry/index.js +1 -0
  27. package/dist/function-registry/judgments.d.ts +2 -0
  28. package/dist/function-registry/judgments.js +1 -0
  29. package/dist/function-registry/legacy.d.ts +1 -0
  30. package/dist/function-registry/legacy.js +1 -0
  31. package/dist/function-registry/lenses.d.ts +4 -0
  32. package/dist/function-registry/lenses.js +1 -0
  33. package/dist/function-registry/nodes.d.ts +203 -0
  34. package/dist/function-registry/nodes.js +9 -3
  35. package/dist/function-registry/ontologies.d.ts +11 -0
  36. package/dist/function-registry/ontologies.js +8 -2
  37. package/dist/function-registry/pipeline.d.ts +3 -0
  38. package/dist/function-registry/pipeline.js +1 -0
  39. package/dist/function-registry/policy.d.ts +1 -0
  40. package/dist/function-registry/policy.js +1 -0
  41. package/dist/function-registry/questions.d.ts +104 -0
  42. package/dist/function-registry/questions.js +10 -5
  43. package/dist/function-registry/tasks.d.ts +86 -0
  44. package/dist/function-registry/tasks.js +2 -1
  45. package/dist/function-registry/topics.d.ts +7 -0
  46. package/dist/function-registry/topics.js +7 -2
  47. package/dist/function-registry/types.d.ts +46 -0
  48. package/dist/function-registry/worktrees.d.ts +440 -0
  49. package/dist/function-registry/worktrees.js +9 -3
  50. package/dist/generated/convexSchemas.d.ts +10 -10
  51. package/dist/index.d.ts +1 -0
  52. package/dist/index.js +5 -0
  53. package/dist/infisical-runtime.base.js +5 -0
  54. package/dist/infisical-runtime.contract.js +5 -0
  55. package/dist/infisical-runtime.tenant-secrets.js +5 -0
  56. package/dist/manifests/infisical-runtime-manifest.js +5 -0
  57. package/dist/manifests/tenant-client-manifest.d.ts +5 -1
  58. package/dist/manifests/tenant-client-manifest.js +5 -0
  59. package/dist/operator-receipt.contract.d.ts +32 -0
  60. package/dist/operator-receipt.contract.js +1 -0
  61. package/dist/projections/create-evidence.projection.d.ts +12 -12
  62. package/dist/projections/index.d.ts +2 -2
  63. package/dist/proof-attestation.json +1 -1
  64. package/dist/tenant-client.contract.d.ts +5 -1
  65. package/dist/tenant-client.contract.js +5 -0
  66. package/package.json +1 -1
@@ -1,10 +1,103 @@
1
1
  import { z } from "zod";
2
+ export declare const createQuestionArgs: z.ZodEffects<z.ZodObject<{
3
+ text: z.ZodOptional<z.ZodString>;
4
+ questionText: z.ZodOptional<z.ZodString>;
5
+ question: z.ZodOptional<z.ZodString>;
6
+ topicId: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
7
+ priority: z.ZodOptional<z.ZodEnum<["urgent", "high", "medium", "low"]>>;
8
+ linkedBeliefId: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
9
+ linkedBeliefNodeId: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
10
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
11
+ category: z.ZodOptional<z.ZodString>;
12
+ source: z.ZodOptional<z.ZodString>;
13
+ testType: z.ZodOptional<z.ZodEnum<["validates", "invalidates", "clarifies"]>>;
14
+ importance: z.ZodOptional<z.ZodNumber>;
15
+ epistemicUnlock: z.ZodOptional<z.ZodString>;
16
+ sourceQuestionIds: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
17
+ linkedWorktreeId: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
18
+ questionType: z.ZodOptional<z.ZodEnum<["validation", "falsification", "assumption_probe", "prediction_test", "counterfactual", "discovery", "clarification", "comparison", "causal", "mechanism", "general"]>>;
19
+ questionPriority: z.ZodOptional<z.ZodEnum<["critical", "high", "medium", "low"]>>;
20
+ }, "strip", z.ZodTypeAny, {
21
+ source?: string | undefined;
22
+ priority?: "high" | "low" | "medium" | "urgent" | undefined;
23
+ metadata?: Record<string, unknown> | undefined;
24
+ text?: string | undefined;
25
+ question?: string | undefined;
26
+ topicId?: string | undefined;
27
+ linkedBeliefNodeId?: string | undefined;
28
+ linkedWorktreeId?: string | undefined;
29
+ linkedBeliefId?: string | undefined;
30
+ questionText?: string | undefined;
31
+ category?: string | undefined;
32
+ testType?: "validates" | "invalidates" | "clarifies" | undefined;
33
+ importance?: number | undefined;
34
+ epistemicUnlock?: string | undefined;
35
+ sourceQuestionIds?: string[] | undefined;
36
+ questionType?: "validation" | "comparison" | "causal" | "general" | "discovery" | "clarification" | "falsification" | "assumption_probe" | "prediction_test" | "counterfactual" | "mechanism" | undefined;
37
+ questionPriority?: "high" | "low" | "medium" | "critical" | undefined;
38
+ }, {
39
+ source?: string | undefined;
40
+ priority?: "high" | "low" | "medium" | "urgent" | undefined;
41
+ metadata?: Record<string, unknown> | undefined;
42
+ text?: string | undefined;
43
+ question?: string | undefined;
44
+ topicId?: string | undefined;
45
+ linkedBeliefNodeId?: string | undefined;
46
+ linkedWorktreeId?: string | undefined;
47
+ linkedBeliefId?: string | undefined;
48
+ questionText?: string | undefined;
49
+ category?: string | undefined;
50
+ testType?: "validates" | "invalidates" | "clarifies" | undefined;
51
+ importance?: number | undefined;
52
+ epistemicUnlock?: string | undefined;
53
+ sourceQuestionIds?: string[] | undefined;
54
+ questionType?: "validation" | "comparison" | "causal" | "general" | "discovery" | "clarification" | "falsification" | "assumption_probe" | "prediction_test" | "counterfactual" | "mechanism" | undefined;
55
+ questionPriority?: "high" | "low" | "medium" | "critical" | undefined;
56
+ }>, {
57
+ source?: string | undefined;
58
+ priority?: "high" | "low" | "medium" | "urgent" | undefined;
59
+ metadata?: Record<string, unknown> | undefined;
60
+ text?: string | undefined;
61
+ question?: string | undefined;
62
+ topicId?: string | undefined;
63
+ linkedBeliefNodeId?: string | undefined;
64
+ linkedWorktreeId?: string | undefined;
65
+ linkedBeliefId?: string | undefined;
66
+ questionText?: string | undefined;
67
+ category?: string | undefined;
68
+ testType?: "validates" | "invalidates" | "clarifies" | undefined;
69
+ importance?: number | undefined;
70
+ epistemicUnlock?: string | undefined;
71
+ sourceQuestionIds?: string[] | undefined;
72
+ questionType?: "validation" | "comparison" | "causal" | "general" | "discovery" | "clarification" | "falsification" | "assumption_probe" | "prediction_test" | "counterfactual" | "mechanism" | undefined;
73
+ questionPriority?: "high" | "low" | "medium" | "critical" | undefined;
74
+ }, {
75
+ source?: string | undefined;
76
+ priority?: "high" | "low" | "medium" | "urgent" | undefined;
77
+ metadata?: Record<string, unknown> | undefined;
78
+ text?: string | undefined;
79
+ question?: string | undefined;
80
+ topicId?: string | undefined;
81
+ linkedBeliefNodeId?: string | undefined;
82
+ linkedWorktreeId?: string | undefined;
83
+ linkedBeliefId?: string | undefined;
84
+ questionText?: string | undefined;
85
+ category?: string | undefined;
86
+ testType?: "validates" | "invalidates" | "clarifies" | undefined;
87
+ importance?: number | undefined;
88
+ epistemicUnlock?: string | undefined;
89
+ sourceQuestionIds?: string[] | undefined;
90
+ questionType?: "validation" | "comparison" | "causal" | "general" | "discovery" | "clarification" | "falsification" | "assumption_probe" | "prediction_test" | "counterfactual" | "mechanism" | undefined;
91
+ questionPriority?: "high" | "low" | "medium" | "critical" | undefined;
92
+ }>;
93
+ export type CreateQuestionArgs = z.infer<typeof createQuestionArgs>;
2
94
  export declare const questionsContracts: readonly [{
3
95
  name: string;
4
96
  kind: import("./types.js").FunctionKind;
5
97
  idempotent: import("./types.js").FunctionIdempotency;
6
98
  effects: readonly import("../dsl.js").FunctionEffect[];
7
99
  invariants: readonly string[] | undefined;
100
+ boundary: import("./types.js").BoundarySpec | undefined;
8
101
  surfaceIntent: import("./types.js").FunctionSurfaceIntent;
9
102
  domain: string;
10
103
  surfaceClass: import("./types.js").SurfaceClass;
@@ -50,6 +143,7 @@ export declare const questionsContracts: readonly [{
50
143
  idempotent: import("./types.js").FunctionIdempotency;
51
144
  effects: readonly import("../dsl.js").FunctionEffect[];
52
145
  invariants: readonly string[] | undefined;
146
+ boundary: import("./types.js").BoundarySpec | undefined;
53
147
  surfaceIntent: import("./types.js").FunctionSurfaceIntent;
54
148
  domain: string;
55
149
  surfaceClass: import("./types.js").SurfaceClass;
@@ -95,6 +189,7 @@ export declare const questionsContracts: readonly [{
95
189
  idempotent: import("./types.js").FunctionIdempotency;
96
190
  effects: readonly import("../dsl.js").FunctionEffect[];
97
191
  invariants: readonly string[] | undefined;
192
+ boundary: import("./types.js").BoundarySpec | undefined;
98
193
  surfaceIntent: import("./types.js").FunctionSurfaceIntent;
99
194
  domain: string;
100
195
  surfaceClass: import("./types.js").SurfaceClass;
@@ -140,6 +235,7 @@ export declare const questionsContracts: readonly [{
140
235
  idempotent: import("./types.js").FunctionIdempotency;
141
236
  effects: readonly import("../dsl.js").FunctionEffect[];
142
237
  invariants: readonly string[] | undefined;
238
+ boundary: import("./types.js").BoundarySpec | undefined;
143
239
  surfaceIntent: import("./types.js").FunctionSurfaceIntent;
144
240
  domain: string;
145
241
  surfaceClass: import("./types.js").SurfaceClass;
@@ -185,6 +281,7 @@ export declare const questionsContracts: readonly [{
185
281
  idempotent: import("./types.js").FunctionIdempotency;
186
282
  effects: readonly import("../dsl.js").FunctionEffect[];
187
283
  invariants: readonly string[] | undefined;
284
+ boundary: import("./types.js").BoundarySpec | undefined;
188
285
  surfaceIntent: import("./types.js").FunctionSurfaceIntent;
189
286
  domain: string;
190
287
  surfaceClass: import("./types.js").SurfaceClass;
@@ -230,6 +327,7 @@ export declare const questionsContracts: readonly [{
230
327
  idempotent: import("./types.js").FunctionIdempotency;
231
328
  effects: readonly import("../dsl.js").FunctionEffect[];
232
329
  invariants: readonly string[] | undefined;
330
+ boundary: import("./types.js").BoundarySpec | undefined;
233
331
  surfaceIntent: import("./types.js").FunctionSurfaceIntent;
234
332
  domain: string;
235
333
  surfaceClass: import("./types.js").SurfaceClass;
@@ -275,6 +373,7 @@ export declare const questionsContracts: readonly [{
275
373
  idempotent: import("./types.js").FunctionIdempotency;
276
374
  effects: readonly import("../dsl.js").FunctionEffect[];
277
375
  invariants: readonly string[] | undefined;
376
+ boundary: import("./types.js").BoundarySpec | undefined;
278
377
  surfaceIntent: import("./types.js").FunctionSurfaceIntent;
279
378
  domain: string;
280
379
  surfaceClass: import("./types.js").SurfaceClass;
@@ -320,6 +419,7 @@ export declare const questionsContracts: readonly [{
320
419
  idempotent: import("./types.js").FunctionIdempotency;
321
420
  effects: readonly import("../dsl.js").FunctionEffect[];
322
421
  invariants: readonly string[] | undefined;
422
+ boundary: import("./types.js").BoundarySpec | undefined;
323
423
  surfaceIntent: import("./types.js").FunctionSurfaceIntent;
324
424
  domain: string;
325
425
  surfaceClass: import("./types.js").SurfaceClass;
@@ -365,6 +465,7 @@ export declare const questionsContracts: readonly [{
365
465
  idempotent: import("./types.js").FunctionIdempotency;
366
466
  effects: readonly import("../dsl.js").FunctionEffect[];
367
467
  invariants: readonly string[] | undefined;
468
+ boundary: import("./types.js").BoundarySpec | undefined;
368
469
  surfaceIntent: import("./types.js").FunctionSurfaceIntent;
369
470
  domain: string;
370
471
  surfaceClass: import("./types.js").SurfaceClass;
@@ -410,6 +511,7 @@ export declare const questionsContracts: readonly [{
410
511
  idempotent: import("./types.js").FunctionIdempotency;
411
512
  effects: readonly import("../dsl.js").FunctionEffect[];
412
513
  invariants: readonly string[] | undefined;
514
+ boundary: import("./types.js").BoundarySpec | undefined;
413
515
  surfaceIntent: import("./types.js").FunctionSurfaceIntent;
414
516
  domain: string;
415
517
  surfaceClass: import("./types.js").SurfaceClass;
@@ -455,6 +557,7 @@ export declare const questionsContracts: readonly [{
455
557
  idempotent: import("./types.js").FunctionIdempotency;
456
558
  effects: readonly import("../dsl.js").FunctionEffect[];
457
559
  invariants: readonly string[] | undefined;
560
+ boundary: import("./types.js").BoundarySpec | undefined;
458
561
  surfaceIntent: import("./types.js").FunctionSurfaceIntent;
459
562
  domain: string;
460
563
  surfaceClass: import("./types.js").SurfaceClass;
@@ -500,6 +603,7 @@ export declare const questionsContracts: readonly [{
500
603
  idempotent: import("./types.js").FunctionIdempotency;
501
604
  effects: readonly import("../dsl.js").FunctionEffect[];
502
605
  invariants: readonly string[] | undefined;
606
+ boundary: import("./types.js").BoundarySpec | undefined;
503
607
  surfaceIntent: import("./types.js").FunctionSurfaceIntent;
504
608
  domain: string;
505
609
  surfaceClass: import("./types.js").SurfaceClass;
@@ -6153,6 +6153,7 @@ function surfaceContract(args) {
6153
6153
  idempotent: args.idempotent ?? args.kind !== "query",
6154
6154
  effects: resolvedEffects,
6155
6155
  invariants: args.invariants,
6156
+ boundary: args.boundary,
6156
6157
  surfaceIntent: manifestEntry.surfaceIntent,
6157
6158
  domain: args.domain,
6158
6159
  surfaceClass: manifestEntry.surfaceClass,
@@ -6306,7 +6307,7 @@ var falsificationQuestionsArgs = z.object({
6306
6307
  });
6307
6308
  var questionNodeInput = (input) => compactRecord({
6308
6309
  nodeId: input.nodeId ?? input.id ?? input.questionId,
6309
- questionId: input.questionId
6310
+ questionId: input.questionId ?? input.id ?? input.nodeId
6310
6311
  });
6311
6312
  var questionTopicInput = (input) => compactRecord({
6312
6313
  topicId: input.topicId,
@@ -6356,7 +6357,10 @@ var questionsContracts = [
6356
6357
  kind: "mutation",
6357
6358
  inputProjection: createQuestionInput
6358
6359
  },
6359
- args: createQuestionArgs
6360
+ args: createQuestionArgs,
6361
+ boundary: {
6362
+ admission: ["source-span", "uuidv7-endpoints"]
6363
+ }
6360
6364
  }),
6361
6365
  surfaceContract({
6362
6366
  name: "get_question",
@@ -6430,7 +6434,7 @@ var questionsContracts = [
6430
6434
  inputProjection: (input, context) => withUserId(
6431
6435
  compactRecord({
6432
6436
  questionId: input.questionId ?? input.id,
6433
- nodeId: input.nodeId,
6437
+ nodeId: input.nodeId ?? input.id ?? input.questionId,
6434
6438
  status: input.status,
6435
6439
  answer: input.answer,
6436
6440
  answerStatus: input.answerStatus
@@ -6570,7 +6574,8 @@ var questionsContracts = [
6570
6574
  ...questionTopicInput(input),
6571
6575
  status: input.includeAnswered === true ? void 0 : "open"
6572
6576
  })
6573
- }
6577
+ },
6578
+ args: missingQuestionsArgs.extend({ includeAnswered: z.boolean().optional() }).omit({ status: true })
6574
6579
  }),
6575
6580
  surfaceContract({
6576
6581
  name: "get_falsification_questions",
@@ -6591,4 +6596,4 @@ var questionsContracts = [
6591
6596
  })
6592
6597
  ];
6593
6598
 
6594
- export { questionsContracts };
6599
+ export { createQuestionArgs, questionsContracts };
@@ -1,10 +1,93 @@
1
1
  import { z } from "zod";
2
+ export declare const createTaskArgs: z.ZodObject<{
3
+ title: z.ZodString;
4
+ topicId: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
5
+ description: z.ZodOptional<z.ZodString>;
6
+ taskType: z.ZodOptional<z.ZodEnum<["general", "find_evidence", "verify_claim", "research", "review", "interview", "analysis", "track_metrics"]>>;
7
+ priority: z.ZodOptional<z.ZodEnum<["urgent", "high", "medium", "low"]>>;
8
+ status: z.ZodOptional<z.ZodEnum<["todo", "in_progress", "blocked", "done"]>>;
9
+ linkedWorktreeId: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
10
+ linkedBeliefId: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
11
+ linkedQuestionId: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
12
+ assigneeId: z.ZodOptional<z.ZodString>;
13
+ dueDate: z.ZodOptional<z.ZodNumber>;
14
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
15
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
16
+ }, "strip", z.ZodTypeAny, {
17
+ title: string;
18
+ priority?: "high" | "low" | "medium" | "urgent" | undefined;
19
+ metadata?: Record<string, unknown> | undefined;
20
+ description?: string | undefined;
21
+ status?: "done" | "blocked" | "todo" | "in_progress" | undefined;
22
+ topicId?: string | undefined;
23
+ tags?: string[] | undefined;
24
+ taskType?: "analysis" | "general" | "find_evidence" | "verify_claim" | "research" | "review" | "interview" | "track_metrics" | undefined;
25
+ linkedWorktreeId?: string | undefined;
26
+ linkedBeliefId?: string | undefined;
27
+ linkedQuestionId?: string | undefined;
28
+ assigneeId?: string | undefined;
29
+ dueDate?: number | undefined;
30
+ }, {
31
+ title: string;
32
+ priority?: "high" | "low" | "medium" | "urgent" | undefined;
33
+ metadata?: Record<string, unknown> | undefined;
34
+ description?: string | undefined;
35
+ status?: "done" | "blocked" | "todo" | "in_progress" | undefined;
36
+ topicId?: string | undefined;
37
+ tags?: string[] | undefined;
38
+ taskType?: "analysis" | "general" | "find_evidence" | "verify_claim" | "research" | "review" | "interview" | "track_metrics" | undefined;
39
+ linkedWorktreeId?: string | undefined;
40
+ linkedBeliefId?: string | undefined;
41
+ linkedQuestionId?: string | undefined;
42
+ assigneeId?: string | undefined;
43
+ dueDate?: number | undefined;
44
+ }>;
45
+ export type CreateTaskArgs = z.infer<typeof createTaskArgs>;
46
+ export declare const updateTaskArgs: z.ZodObject<{
47
+ taskId: z.ZodString;
48
+ title: z.ZodOptional<z.ZodString>;
49
+ description: z.ZodOptional<z.ZodString>;
50
+ priority: z.ZodOptional<z.ZodEnum<["urgent", "high", "medium", "low"]>>;
51
+ status: z.ZodOptional<z.ZodEnum<["todo", "in_progress", "blocked", "done"]>>;
52
+ linkedWorktreeId: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
53
+ linkedBeliefId: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
54
+ linkedQuestionId: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
55
+ assigneeId: z.ZodOptional<z.ZodString>;
56
+ blockedReason: z.ZodOptional<z.ZodString>;
57
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
58
+ }, "strip", z.ZodTypeAny, {
59
+ taskId: string;
60
+ priority?: "high" | "low" | "medium" | "urgent" | undefined;
61
+ title?: string | undefined;
62
+ metadata?: Record<string, unknown> | undefined;
63
+ description?: string | undefined;
64
+ status?: "done" | "blocked" | "todo" | "in_progress" | undefined;
65
+ linkedWorktreeId?: string | undefined;
66
+ linkedBeliefId?: string | undefined;
67
+ linkedQuestionId?: string | undefined;
68
+ assigneeId?: string | undefined;
69
+ blockedReason?: string | undefined;
70
+ }, {
71
+ taskId: string;
72
+ priority?: "high" | "low" | "medium" | "urgent" | undefined;
73
+ title?: string | undefined;
74
+ metadata?: Record<string, unknown> | undefined;
75
+ description?: string | undefined;
76
+ status?: "done" | "blocked" | "todo" | "in_progress" | undefined;
77
+ linkedWorktreeId?: string | undefined;
78
+ linkedBeliefId?: string | undefined;
79
+ linkedQuestionId?: string | undefined;
80
+ assigneeId?: string | undefined;
81
+ blockedReason?: string | undefined;
82
+ }>;
83
+ export type UpdateTaskArgs = z.infer<typeof updateTaskArgs>;
2
84
  export declare const tasksContracts: readonly [{
3
85
  name: string;
4
86
  kind: import("./types.js").FunctionKind;
5
87
  idempotent: import("./types.js").FunctionIdempotency;
6
88
  effects: readonly import("../dsl.js").FunctionEffect[];
7
89
  invariants: readonly string[] | undefined;
90
+ boundary: import("./types.js").BoundarySpec | undefined;
8
91
  surfaceIntent: import("./types.js").FunctionSurfaceIntent;
9
92
  domain: string;
10
93
  surfaceClass: import("./types.js").SurfaceClass;
@@ -50,6 +133,7 @@ export declare const tasksContracts: readonly [{
50
133
  idempotent: import("./types.js").FunctionIdempotency;
51
134
  effects: readonly import("../dsl.js").FunctionEffect[];
52
135
  invariants: readonly string[] | undefined;
136
+ boundary: import("./types.js").BoundarySpec | undefined;
53
137
  surfaceIntent: import("./types.js").FunctionSurfaceIntent;
54
138
  domain: string;
55
139
  surfaceClass: import("./types.js").SurfaceClass;
@@ -95,6 +179,7 @@ export declare const tasksContracts: readonly [{
95
179
  idempotent: import("./types.js").FunctionIdempotency;
96
180
  effects: readonly import("../dsl.js").FunctionEffect[];
97
181
  invariants: readonly string[] | undefined;
182
+ boundary: import("./types.js").BoundarySpec | undefined;
98
183
  surfaceIntent: import("./types.js").FunctionSurfaceIntent;
99
184
  domain: string;
100
185
  surfaceClass: import("./types.js").SurfaceClass;
@@ -140,6 +225,7 @@ export declare const tasksContracts: readonly [{
140
225
  idempotent: import("./types.js").FunctionIdempotency;
141
226
  effects: readonly import("../dsl.js").FunctionEffect[];
142
227
  invariants: readonly string[] | undefined;
228
+ boundary: import("./types.js").BoundarySpec | undefined;
143
229
  surfaceIntent: import("./types.js").FunctionSurfaceIntent;
144
230
  domain: string;
145
231
  surfaceClass: import("./types.js").SurfaceClass;
@@ -6194,6 +6194,7 @@ function surfaceContract(args) {
6194
6194
  idempotent: args.idempotent ?? args.kind !== "query",
6195
6195
  effects: resolvedEffects,
6196
6196
  invariants: args.invariants,
6197
+ boundary: args.boundary,
6197
6198
  surfaceIntent: manifestEntry.surfaceIntent,
6198
6199
  domain: args.domain,
6199
6200
  surfaceClass: manifestEntry.surfaceClass,
@@ -6387,4 +6388,4 @@ var tasksContracts = [
6387
6388
  })
6388
6389
  ];
6389
6390
 
6390
- export { tasksContracts };
6391
+ export { createTaskArgs, tasksContracts, updateTaskArgs };
@@ -5,6 +5,7 @@ export declare const topicsContracts: readonly [{
5
5
  idempotent: import("./types.js").FunctionIdempotency;
6
6
  effects: readonly import("../dsl.js").FunctionEffect[];
7
7
  invariants: readonly string[] | undefined;
8
+ boundary: import("./types.js").BoundarySpec | undefined;
8
9
  surfaceIntent: import("./types.js").FunctionSurfaceIntent;
9
10
  domain: string;
10
11
  surfaceClass: import("./types.js").SurfaceClass;
@@ -50,6 +51,7 @@ export declare const topicsContracts: readonly [{
50
51
  idempotent: import("./types.js").FunctionIdempotency;
51
52
  effects: readonly import("../dsl.js").FunctionEffect[];
52
53
  invariants: readonly string[] | undefined;
54
+ boundary: import("./types.js").BoundarySpec | undefined;
53
55
  surfaceIntent: import("./types.js").FunctionSurfaceIntent;
54
56
  domain: string;
55
57
  surfaceClass: import("./types.js").SurfaceClass;
@@ -95,6 +97,7 @@ export declare const topicsContracts: readonly [{
95
97
  idempotent: import("./types.js").FunctionIdempotency;
96
98
  effects: readonly import("../dsl.js").FunctionEffect[];
97
99
  invariants: readonly string[] | undefined;
100
+ boundary: import("./types.js").BoundarySpec | undefined;
98
101
  surfaceIntent: import("./types.js").FunctionSurfaceIntent;
99
102
  domain: string;
100
103
  surfaceClass: import("./types.js").SurfaceClass;
@@ -140,6 +143,7 @@ export declare const topicsContracts: readonly [{
140
143
  idempotent: import("./types.js").FunctionIdempotency;
141
144
  effects: readonly import("../dsl.js").FunctionEffect[];
142
145
  invariants: readonly string[] | undefined;
146
+ boundary: import("./types.js").BoundarySpec | undefined;
143
147
  surfaceIntent: import("./types.js").FunctionSurfaceIntent;
144
148
  domain: string;
145
149
  surfaceClass: import("./types.js").SurfaceClass;
@@ -185,6 +189,7 @@ export declare const topicsContracts: readonly [{
185
189
  idempotent: import("./types.js").FunctionIdempotency;
186
190
  effects: readonly import("../dsl.js").FunctionEffect[];
187
191
  invariants: readonly string[] | undefined;
192
+ boundary: import("./types.js").BoundarySpec | undefined;
188
193
  surfaceIntent: import("./types.js").FunctionSurfaceIntent;
189
194
  domain: string;
190
195
  surfaceClass: import("./types.js").SurfaceClass;
@@ -230,6 +235,7 @@ export declare const topicsContracts: readonly [{
230
235
  idempotent: import("./types.js").FunctionIdempotency;
231
236
  effects: readonly import("../dsl.js").FunctionEffect[];
232
237
  invariants: readonly string[] | undefined;
238
+ boundary: import("./types.js").BoundarySpec | undefined;
233
239
  surfaceIntent: import("./types.js").FunctionSurfaceIntent;
234
240
  domain: string;
235
241
  surfaceClass: import("./types.js").SurfaceClass;
@@ -275,6 +281,7 @@ export declare const topicsContracts: readonly [{
275
281
  idempotent: import("./types.js").FunctionIdempotency;
276
282
  effects: readonly import("../dsl.js").FunctionEffect[];
277
283
  invariants: readonly string[] | undefined;
284
+ boundary: import("./types.js").BoundarySpec | undefined;
278
285
  surfaceIntent: import("./types.js").FunctionSurfaceIntent;
279
286
  domain: string;
280
287
  surfaceClass: import("./types.js").SurfaceClass;
@@ -6161,6 +6161,7 @@ function surfaceContract(args) {
6161
6161
  idempotent: args.idempotent ?? args.kind !== "query",
6162
6162
  effects: resolvedEffects,
6163
6163
  invariants: args.invariants,
6164
+ boundary: args.boundary,
6164
6165
  surfaceIntent: manifestEntry.surfaceIntent,
6165
6166
  domain: args.domain,
6166
6167
  surfaceClass: manifestEntry.surfaceClass,
@@ -6210,6 +6211,8 @@ var topicVisibilitySchema = z.enum([
6210
6211
  "public"
6211
6212
  ]);
6212
6213
  var topicStatusSchema = z.enum(["active", "archived", "watching"]);
6214
+ var topicListReturns = z.array(z.record(z.unknown()));
6215
+ var topicTreeReturns = z.union([topicListReturns, z.null()]);
6213
6216
  var topicTypeSchema = z.enum(TOPIC_TYPE_VALUES);
6214
6217
  var createTopicArgs = z.object({
6215
6218
  globalId: uuidV7StringSchema.optional().describe(
@@ -6338,7 +6341,8 @@ var topicsContracts = [
6338
6341
  kind: "query",
6339
6342
  inputProjection: listTopicsInput
6340
6343
  },
6341
- args: listTopicsArgs
6344
+ args: listTopicsArgs,
6345
+ returns: topicListReturns
6342
6346
  }),
6343
6347
  surfaceContract({
6344
6348
  name: "update_topic",
@@ -6374,7 +6378,8 @@ var topicsContracts = [
6374
6378
  kind: "query",
6375
6379
  inputProjection: topicTreeInput
6376
6380
  },
6377
- args: getTopicTreeArgs
6381
+ args: getTopicTreeArgs,
6382
+ returns: topicTreeReturns
6378
6383
  }),
6379
6384
  surfaceContract({
6380
6385
  name: "materialize_topic_graph",
@@ -42,6 +42,45 @@ export type FunctionMcpContract = McpToolContract & {
42
42
  exposed: boolean;
43
43
  toolName: string;
44
44
  };
45
+ /**
46
+ * The kinds of graph node a public identity can reference. Canonical home for
47
+ * the set the boundary's `UuidV7`/`GraphIdentity` brand and the resolver share.
48
+ */
49
+ export type GraphIdentityKind = "topic" | "node" | "belief" | "question" | "evidence" | "edge" | "worktree" | "task" | "contradiction" | "ontology";
50
+ /** How a graph identity reference is resolved at the boundary. */
51
+ export type GraphIdentityResolveMode = "public-runtime" | "internal-migration";
52
+ /** One graph-identity argument the boundary must brand + resolve. */
53
+ export interface IdentityRefSpec {
54
+ array?: boolean;
55
+ kind: GraphIdentityKind;
56
+ /** Defaults to "public-runtime" (UUIDv7 globalId only; legacy _id forbidden). */
57
+ mode?: GraphIdentityResolveMode;
58
+ optional?: boolean;
59
+ /** Dot-path to the field in the contract args (e.g. "worktreeId", "beliefRelations.beliefId"). */
60
+ path: string;
61
+ }
62
+ export type ScopeRuleKey = "topic-required" | "worktree" | "task" | "global";
63
+ export interface ScopeSpec {
64
+ path?: string;
65
+ rule: ScopeRuleKey;
66
+ }
67
+ export type AdmissionRuleKey = "signed-evidence" | "no-floating-evidence" | "source-span" | "ontology-release" | "projection-parity" | "uuidv7-endpoints";
68
+ export type ReceiptRuleKey = "operator-v1" | "retrieval" | "write";
69
+ export interface ReceiptSpec {
70
+ rule: ReceiptRuleKey;
71
+ }
72
+ /**
73
+ * Declarative boundary semantics for a contract. The canonical Effect boundary
74
+ * codec (`@lucern/boundary`) reads this to compose identity → scope → admission
75
+ * → receipt refinements on top of the contract's Zod. This is the manifest
76
+ * self-describing its boundary; refinements are never hand-wired per surface.
77
+ */
78
+ export interface BoundarySpec {
79
+ admission?: readonly AdmissionRuleKey[];
80
+ identity?: readonly IdentityRefSpec[];
81
+ receipts?: readonly ReceiptSpec[];
82
+ scope?: readonly ScopeSpec[];
83
+ }
45
84
  export interface FunctionContract {
46
85
  args: z.ZodTypeAny;
47
86
  auth: {
@@ -67,6 +106,13 @@ export interface FunctionContract {
67
106
  grantCore: "checkProjectAccessDetailed";
68
107
  };
69
108
  };
109
+ /**
110
+ * Declarative boundary semantics consumed by the canonical Effect boundary
111
+ * (`@lucern/boundary`). Optional during migration; the
112
+ * `all-contracts-have-boundary-codec` gate requires every graph-writing
113
+ * contract to populate it before the legacy facet decoders are deleted.
114
+ */
115
+ boundary?: BoundarySpec;
70
116
  cli?: {
71
117
  subcommand: string;
72
118
  description: string;