@lucern/contracts 0.3.0-alpha.0 → 0.3.0-alpha.1

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 (117) hide show
  1. package/dist/dsl.js +3 -0
  2. package/dist/dsl.js.map +1 -1
  3. package/dist/function-registry/beliefs.d.ts +11 -51
  4. package/dist/function-registry/beliefs.js +445 -94
  5. package/dist/function-registry/beliefs.js.map +1 -1
  6. package/dist/function-registry/coding.d.ts +7 -31
  7. package/dist/function-registry/coding.js +264 -81
  8. package/dist/function-registry/coding.js.map +1 -1
  9. package/dist/function-registry/context.d.ts +4 -16
  10. package/dist/function-registry/context.js +223 -62
  11. package/dist/function-registry/context.js.map +1 -1
  12. package/dist/function-registry/contracts.d.ts +4 -16
  13. package/dist/function-registry/contracts.js +195 -54
  14. package/dist/function-registry/contracts.js.map +1 -1
  15. package/dist/function-registry/coordination.d.ts +10 -46
  16. package/dist/function-registry/coordination.js +208 -57
  17. package/dist/function-registry/coordination.js.map +1 -1
  18. package/dist/function-registry/edges.d.ts +10 -18
  19. package/dist/function-registry/edges.js +343 -68
  20. package/dist/function-registry/edges.js.map +1 -1
  21. package/dist/function-registry/evidence.d.ts +17 -49
  22. package/dist/function-registry/evidence.js +395 -99
  23. package/dist/function-registry/evidence.js.map +1 -1
  24. package/dist/function-registry/graph.d.ts +14 -66
  25. package/dist/function-registry/graph.js +225 -65
  26. package/dist/function-registry/graph.js.map +1 -1
  27. package/dist/function-registry/helpers.d.ts +6 -8
  28. package/dist/function-registry/helpers.js +204 -55
  29. package/dist/function-registry/helpers.js.map +1 -1
  30. package/dist/function-registry/identity.d.ts +4 -16
  31. package/dist/function-registry/identity.js +195 -54
  32. package/dist/function-registry/identity.js.map +1 -1
  33. package/dist/function-registry/index.d.ts +2 -2
  34. package/dist/function-registry/index.js +204 -55
  35. package/dist/function-registry/index.js.map +1 -1
  36. package/dist/function-registry/judgments.d.ts +5 -13
  37. package/dist/function-registry/judgments.js +214 -63
  38. package/dist/function-registry/judgments.js.map +1 -1
  39. package/dist/function-registry/legacy.d.ts +2 -6
  40. package/dist/function-registry/legacy.js +195 -54
  41. package/dist/function-registry/legacy.js.map +1 -1
  42. package/dist/function-registry/lenses.d.ts +5 -21
  43. package/dist/function-registry/lenses.js +241 -58
  44. package/dist/function-registry/lenses.js.map +1 -1
  45. package/dist/function-registry/manifest.d.ts +3 -3
  46. package/dist/function-registry/manifest.js +1 -0
  47. package/dist/function-registry/manifest.js.map +1 -1
  48. package/dist/function-registry/ontologies.d.ts +12 -56
  49. package/dist/function-registry/ontologies.js +227 -77
  50. package/dist/function-registry/ontologies.js.map +1 -1
  51. package/dist/function-registry/pipeline.d.ts +4 -16
  52. package/dist/function-registry/pipeline.js +207 -55
  53. package/dist/function-registry/pipeline.js.map +1 -1
  54. package/dist/function-registry/questions.d.ts +13 -61
  55. package/dist/function-registry/questions.js +281 -82
  56. package/dist/function-registry/questions.js.map +1 -1
  57. package/dist/function-registry/tasks.d.ts +5 -21
  58. package/dist/function-registry/tasks.js +265 -58
  59. package/dist/function-registry/tasks.js.map +1 -1
  60. package/dist/function-registry/topics.d.ts +6 -26
  61. package/dist/function-registry/topics.js +214 -57
  62. package/dist/function-registry/topics.js.map +1 -1
  63. package/dist/function-registry/types.d.ts +2 -2
  64. package/dist/function-registry/worktrees.d.ts +49 -46
  65. package/dist/function-registry/worktrees.js +326 -81
  66. package/dist/function-registry/worktrees.js.map +1 -1
  67. package/dist/generated/convexSchemas.js +4 -3
  68. package/dist/generated/convexSchemas.js.map +1 -1
  69. package/dist/generated/schema-manifest.json +55 -3
  70. package/dist/generated/tableOwnership.d.ts +2 -1
  71. package/dist/generated/tableOwnership.js +2 -0
  72. package/dist/generated/tableOwnership.js.map +1 -1
  73. package/dist/generated/tier-expectations.json +6 -3
  74. package/dist/index-CV-0_VWJ.d.ts +25 -0
  75. package/dist/index.d.ts +414 -4
  76. package/dist/index.js +665 -62
  77. package/dist/index.js.map +1 -1
  78. package/dist/schema-helpers/validators.d.ts +1 -1
  79. package/dist/schema-helpers/validators.js +1 -1
  80. package/dist/schema-helpers/validators.js.map +1 -1
  81. package/dist/schemas/component-table-manifest.d.ts +74 -0
  82. package/dist/schemas/component-table-manifest.js +26 -0
  83. package/dist/schemas/component-table-manifest.js.map +1 -0
  84. package/dist/schemas/index.d.ts +2 -0
  85. package/dist/schemas/index.js +68 -10
  86. package/dist/schemas/index.js.map +1 -1
  87. package/dist/schemas/manifest.d.ts +110 -45
  88. package/dist/schemas/manifest.js +36 -9
  89. package/dist/schemas/manifest.js.map +1 -1
  90. package/dist/schemas/sl-opinion.d.ts +31 -0
  91. package/dist/schemas/sl-opinion.js +19 -0
  92. package/dist/schemas/sl-opinion.js.map +1 -0
  93. package/dist/schemas/tables/kernel/epistemic.d.ts +6 -4
  94. package/dist/schemas/tables/kernel/epistemic.js +6 -4
  95. package/dist/schemas/tables/kernel/epistemic.js.map +1 -1
  96. package/dist/schemas/tables/kernel/infra.d.ts +13 -1
  97. package/dist/schemas/tables/kernel/infra.js +23 -1
  98. package/dist/schemas/tables/kernel/infra.js.map +1 -1
  99. package/dist/schemas/tables/kernel/worktree.d.ts +4 -4
  100. package/dist/schemas/tables/kernel/worktree.js +6 -4
  101. package/dist/schemas/tables/kernel/worktree.js.map +1 -1
  102. package/dist/schemas/tables/mc/runtime.d.ts +1 -1
  103. package/dist/schemas/tables/mc/runtime.js +1 -1
  104. package/dist/schemas/tables/mc/runtime.js.map +1 -1
  105. package/dist/sdk-methods.contract.d.ts +5 -2
  106. package/dist/{sdk-tools.contract-C2kQN_Xk.d.ts → sdk-tools.contract-S4ia0TTo.d.ts} +1 -1
  107. package/dist/sdk-tools.contract.d.ts +2 -2
  108. package/dist/sdk-tools.contract.js +154 -51
  109. package/dist/sdk-tools.contract.js.map +1 -1
  110. package/dist/{tool-contracts-WCnuE9DW.d.ts → tool-contracts-C92-9ueT.d.ts} +5 -3
  111. package/dist/tool-contracts.d.ts +1 -1
  112. package/dist/tool-contracts.js +155 -52
  113. package/dist/tool-contracts.js.map +1 -1
  114. package/dist/workflow-runtime.contract.js +1 -1
  115. package/dist/workflow-runtime.contract.js.map +1 -1
  116. package/package.json +19 -1
  117. package/dist/index-DoDXl8KS.d.ts +0 -19
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { F as FunctionEffect } from '../defineFunction-DO97DKs4.js';
3
- import { M as McpToolContract } from '../tool-contracts-WCnuE9DW.js';
3
+ import { M as McpToolContract } from '../tool-contracts-C92-9ueT.js';
4
4
 
5
5
  type FunctionKind = "query" | "mutation" | "action";
6
6
  type FunctionIdempotency = boolean | "required";
@@ -71,7 +71,7 @@ type FunctionContract = {
71
71
  allowedPrincipalTypes: FunctionPrincipalType[];
72
72
  };
73
73
  convex?: FunctionConvexTarget;
74
- args: z.ZodObject<z.ZodRawShape>;
74
+ args: z.ZodTypeAny;
75
75
  returns: z.ZodTypeAny;
76
76
  input: z.ZodTypeAny;
77
77
  output: z.ZodTypeAny;
@@ -14,7 +14,7 @@ import * as zod from 'zod';
14
14
  * 2. Knowledge tools use epistemic verbs (create_belief, fork_belief, modulate_confidence)
15
15
  * 3. First sentence of description includes the git analog verb
16
16
  * 4. Description includes "Like `git X`" parenthetical
17
- * 5. Parameter names use domain terms (canonicalText, nodeId, confidence)
17
+ * 5. Parameter names use domain terms (canonicalText, nodeId, baseRate)
18
18
  */
19
19
  type McpToolContract = {
20
20
  /** Stable tool name — breaking change to rename */
@@ -115,11 +115,7 @@ declare const worktreesContracts: readonly [{
115
115
  allowedPrincipalTypes: ("user" | "service" | "agent")[];
116
116
  };
117
117
  convex: FunctionConvexTarget | undefined;
118
- args: zod.ZodObject<zod.ZodRawShape, zod.UnknownKeysParam, zod.ZodTypeAny, {
119
- [x: string]: any;
120
- }, {
121
- [x: string]: any;
122
- }>;
118
+ args: zod.ZodTypeAny;
123
119
  returns: zod.ZodTypeAny;
124
120
  input: zod.ZodTypeAny;
125
121
  output: zod.ZodTypeAny;
@@ -158,11 +154,7 @@ declare const worktreesContracts: readonly [{
158
154
  allowedPrincipalTypes: ("user" | "service" | "agent")[];
159
155
  };
160
156
  convex: FunctionConvexTarget | undefined;
161
- args: zod.ZodObject<zod.ZodRawShape, zod.UnknownKeysParam, zod.ZodTypeAny, {
162
- [x: string]: any;
163
- }, {
164
- [x: string]: any;
165
- }>;
157
+ args: zod.ZodTypeAny;
166
158
  returns: zod.ZodTypeAny;
167
159
  input: zod.ZodTypeAny;
168
160
  output: zod.ZodTypeAny;
@@ -201,11 +193,7 @@ declare const worktreesContracts: readonly [{
201
193
  allowedPrincipalTypes: ("user" | "service" | "agent")[];
202
194
  };
203
195
  convex: FunctionConvexTarget | undefined;
204
- args: zod.ZodObject<zod.ZodRawShape, zod.UnknownKeysParam, zod.ZodTypeAny, {
205
- [x: string]: any;
206
- }, {
207
- [x: string]: any;
208
- }>;
196
+ args: zod.ZodTypeAny;
209
197
  returns: zod.ZodTypeAny;
210
198
  input: zod.ZodTypeAny;
211
199
  output: zod.ZodTypeAny;
@@ -244,11 +232,7 @@ declare const worktreesContracts: readonly [{
244
232
  allowedPrincipalTypes: ("user" | "service" | "agent")[];
245
233
  };
246
234
  convex: FunctionConvexTarget | undefined;
247
- args: zod.ZodObject<zod.ZodRawShape, zod.UnknownKeysParam, zod.ZodTypeAny, {
248
- [x: string]: any;
249
- }, {
250
- [x: string]: any;
251
- }>;
235
+ args: zod.ZodTypeAny;
252
236
  returns: zod.ZodTypeAny;
253
237
  input: zod.ZodTypeAny;
254
238
  output: zod.ZodTypeAny;
@@ -287,11 +271,7 @@ declare const worktreesContracts: readonly [{
287
271
  allowedPrincipalTypes: ("user" | "service" | "agent")[];
288
272
  };
289
273
  convex: FunctionConvexTarget | undefined;
290
- args: zod.ZodObject<zod.ZodRawShape, zod.UnknownKeysParam, zod.ZodTypeAny, {
291
- [x: string]: any;
292
- }, {
293
- [x: string]: any;
294
- }>;
274
+ args: zod.ZodTypeAny;
295
275
  returns: zod.ZodTypeAny;
296
276
  input: zod.ZodTypeAny;
297
277
  output: zod.ZodTypeAny;
@@ -330,11 +310,7 @@ declare const worktreesContracts: readonly [{
330
310
  allowedPrincipalTypes: ("user" | "service" | "agent")[];
331
311
  };
332
312
  convex: FunctionConvexTarget | undefined;
333
- args: zod.ZodObject<zod.ZodRawShape, zod.UnknownKeysParam, zod.ZodTypeAny, {
334
- [x: string]: any;
335
- }, {
336
- [x: string]: any;
337
- }>;
313
+ args: zod.ZodTypeAny;
338
314
  returns: zod.ZodTypeAny;
339
315
  input: zod.ZodTypeAny;
340
316
  output: zod.ZodTypeAny;
@@ -373,11 +349,7 @@ declare const worktreesContracts: readonly [{
373
349
  allowedPrincipalTypes: ("user" | "service" | "agent")[];
374
350
  };
375
351
  convex: FunctionConvexTarget | undefined;
376
- args: zod.ZodObject<zod.ZodRawShape, zod.UnknownKeysParam, zod.ZodTypeAny, {
377
- [x: string]: any;
378
- }, {
379
- [x: string]: any;
380
- }>;
352
+ args: zod.ZodTypeAny;
381
353
  returns: zod.ZodTypeAny;
382
354
  input: zod.ZodTypeAny;
383
355
  output: zod.ZodTypeAny;
@@ -416,11 +388,7 @@ declare const worktreesContracts: readonly [{
416
388
  allowedPrincipalTypes: ("user" | "service" | "agent")[];
417
389
  };
418
390
  convex: FunctionConvexTarget | undefined;
419
- args: zod.ZodObject<zod.ZodRawShape, zod.UnknownKeysParam, zod.ZodTypeAny, {
420
- [x: string]: any;
421
- }, {
422
- [x: string]: any;
423
- }>;
391
+ args: zod.ZodTypeAny;
424
392
  returns: zod.ZodTypeAny;
425
393
  input: zod.ZodTypeAny;
426
394
  output: zod.ZodTypeAny;
@@ -459,11 +427,46 @@ declare const worktreesContracts: readonly [{
459
427
  allowedPrincipalTypes: ("user" | "service" | "agent")[];
460
428
  };
461
429
  convex: FunctionConvexTarget | undefined;
462
- args: zod.ZodObject<zod.ZodRawShape, zod.UnknownKeysParam, zod.ZodTypeAny, {
463
- [x: string]: any;
464
- }, {
465
- [x: string]: any;
466
- }>;
430
+ args: zod.ZodTypeAny;
431
+ returns: zod.ZodTypeAny;
432
+ input: zod.ZodTypeAny;
433
+ output: zod.ZodTypeAny;
434
+ openapi: {
435
+ summary: string;
436
+ tags: string[];
437
+ };
438
+ }, {
439
+ name: string;
440
+ kind: FunctionKind;
441
+ idempotent: FunctionIdempotency;
442
+ effects: readonly FunctionEffect[];
443
+ invariants: readonly string[] | undefined;
444
+ surfaceIntent: FunctionSurfaceIntent;
445
+ domain: string;
446
+ surfaceClass: SurfaceClass;
447
+ surfaces: FunctionSurfaceMap;
448
+ replacedBy: string | undefined;
449
+ rest: {
450
+ method: "GET" | "POST" | "PATCH" | "DELETE";
451
+ path: string;
452
+ };
453
+ sdk: {
454
+ namespace: string;
455
+ method: string;
456
+ };
457
+ mcp: {
458
+ exposed: boolean;
459
+ toolName: string;
460
+ } & McpToolContract & {
461
+ exposed: boolean;
462
+ toolName: string;
463
+ };
464
+ auth: {
465
+ scopes: string[];
466
+ allowedPrincipalTypes: ("user" | "service" | "agent")[];
467
+ };
468
+ convex: FunctionConvexTarget | undefined;
469
+ args: zod.ZodTypeAny;
467
470
  returns: zod.ZodTypeAny;
468
471
  input: zod.ZodTypeAny;
469
472
  output: zod.ZodTypeAny;