@lucern/contracts 1.0.19 → 1.0.20

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 (62) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/dist/function-registry/beliefs.js +13 -20
  3. package/dist/function-registry/beliefs.js.map +1 -1
  4. package/dist/function-registry/coding.js +8 -9
  5. package/dist/function-registry/coding.js.map +1 -1
  6. package/dist/function-registry/context.js +8 -9
  7. package/dist/function-registry/context.js.map +1 -1
  8. package/dist/function-registry/contracts.js +8 -9
  9. package/dist/function-registry/contracts.js.map +1 -1
  10. package/dist/function-registry/coordination.js +8 -9
  11. package/dist/function-registry/coordination.js.map +1 -1
  12. package/dist/function-registry/edges.js +8 -9
  13. package/dist/function-registry/edges.js.map +1 -1
  14. package/dist/function-registry/evidence.js +8 -15
  15. package/dist/function-registry/evidence.js.map +1 -1
  16. package/dist/function-registry/graph.js +8 -9
  17. package/dist/function-registry/graph.js.map +1 -1
  18. package/dist/function-registry/helpers.d.ts +2 -1
  19. package/dist/function-registry/helpers.js +9 -10
  20. package/dist/function-registry/helpers.js.map +1 -1
  21. package/dist/function-registry/identity.js +8 -9
  22. package/dist/function-registry/identity.js.map +1 -1
  23. package/dist/function-registry/index.d.ts +1 -1
  24. package/dist/function-registry/index.js +9 -10
  25. package/dist/function-registry/index.js.map +1 -1
  26. package/dist/function-registry/judgments.js +8 -9
  27. package/dist/function-registry/judgments.js.map +1 -1
  28. package/dist/function-registry/legacy.js +8 -9
  29. package/dist/function-registry/legacy.js.map +1 -1
  30. package/dist/function-registry/lenses.js +8 -9
  31. package/dist/function-registry/lenses.js.map +1 -1
  32. package/dist/function-registry/nodes.js +8 -9
  33. package/dist/function-registry/nodes.js.map +1 -1
  34. package/dist/function-registry/ontologies.js +8 -9
  35. package/dist/function-registry/ontologies.js.map +1 -1
  36. package/dist/function-registry/pipeline.js +8 -9
  37. package/dist/function-registry/pipeline.js.map +1 -1
  38. package/dist/function-registry/questions.js +8 -9
  39. package/dist/function-registry/questions.js.map +1 -1
  40. package/dist/function-registry/tasks.js +8 -9
  41. package/dist/function-registry/tasks.js.map +1 -1
  42. package/dist/function-registry/topics.js +13 -11
  43. package/dist/function-registry/topics.js.map +1 -1
  44. package/dist/function-registry/worktrees.js +8 -9
  45. package/dist/function-registry/worktrees.js.map +1 -1
  46. package/dist/index.js +1 -9
  47. package/dist/index.js.map +1 -1
  48. package/dist/proof-attestation.json +1 -1
  49. package/dist/sdk-methods.contract.d.ts +1 -3
  50. package/dist/sdk-tools.contract.js +1 -9
  51. package/dist/sdk-tools.contract.js.map +1 -1
  52. package/dist/sdk-tools.contract.registry.js +1 -9
  53. package/dist/sdk-tools.contract.registry.js.map +1 -1
  54. package/dist/sdk-tools.contract.values.js +1 -9
  55. package/dist/sdk-tools.contract.values.js.map +1 -1
  56. package/dist/tool-contracts.js +1 -9
  57. package/dist/tool-contracts.js.map +1 -1
  58. package/dist/tool-contracts.lifecycle.js +1 -9
  59. package/dist/tool-contracts.lifecycle.js.map +1 -1
  60. package/dist/tool-contracts.values.js +1 -9
  61. package/dist/tool-contracts.values.js.map +1 -1
  62. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import { FunctionKind, FunctionIdempotency, FunctionSurfaceIntent, SurfaceClass, FunctionSurfaceMap, FunctionConvexTarget, FunctionGatewayTarget, FunctionContract } from './types.js';
2
2
  export { ContractInputProjection, ContractOutputProjection, ContractProjectionContext, FunctionMcpContract, FunctionPrincipalType, SurfaceExposure } from './types.js';
3
- export { argsSchemaFromMcpContract, assertSurfaceCoverage, authUserId, classifyContract, compactRecord, defineFunctionContract, inputSchemaFromMcpContract, jsonObjectSchema, publicPrefixedId, recordValue, surfaceContract, surfaceMcpContract, withCreatedBy, withUserId } from './helpers.js';
3
+ export { argsSchemaFromMcpContract, assertSurfaceCoverage, authUserId, classifyContract, compactRecord, defineFunctionContract, inputSchemaFromMcpContract, jsonObjectSchema, publicPrefixedId, recordValue, surfaceContract, surfaceMcpContract, uuidV7StringSchema, withCreatedBy, withUserId } from './helpers.js';
4
4
  export { DUPLICATE_OPERATION_NAMES, FORBIDDEN_APPLICATION_OPERATION_NAMES, LEGACY_COMPAT_OPERATION_NAMES, LUCERN_OPERATION_MANIFEST, LucernOperationManifestEntry, LucernOperationName, MCP_ANALYSIS_PLATFORM_OPERATION_NAMES, MCP_ANALYSIS_TENANT_OPERATION_NAMES, MCP_AUTOMATION_OPERATION_NAMES, MCP_CORE_OPERATION_NAMES, MCP_GOVERNANCE_PLATFORM_OPERATION_NAMES, MCP_GOVERNANCE_TENANT_OPERATION_NAMES, MCP_ONLY_INTERNAL_OPERATION_NAMES, MCP_WORKFLOW_PLATFORM_OPERATION_NAMES, MCP_WORKFLOW_TENANT_OPERATION_NAMES, PLATFORM_INTERNAL_OPERATION_NAMES, PLATFORM_PUBLIC_OPERATION_NAMES, SDK_ONLY_OPERATION_NAMES, TENANT_PUBLIC_OPERATION_NAMES, surfaceEnabled, surfaceIntentGateViolations } from './manifest.js';
5
5
  export { contextContracts } from './context.js';
6
6
  export { identityContracts } from './identity.js';
@@ -40,6 +40,12 @@ export { legacyContracts } from './legacy.js';
40
40
 
41
41
  // src/function-registry/index.ts
42
42
 
43
+ // src/ids/index.ts
44
+ var UUID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
45
+ function isUuidV7(value) {
46
+ return UUID_PATTERN.test(value) && value[14]?.toLowerCase() === "7";
47
+ }
48
+
43
49
  // src/ids.contract.ts
44
50
  function encodePrefixedId(prefix, value) {
45
51
  const normalizedPrefix = prefix.trim();
@@ -61,15 +67,7 @@ var CREATE_BELIEF = {
61
67
  },
62
68
  topicGlobalId: {
63
69
  type: "string",
64
- description: "Required globalId (UUID) of the topic node in epistemicNodes that anchors the belief"
65
- },
66
- topicNodeId: {
67
- type: "string",
68
- description: "Optional internal epistemicNodes _id for the topic anchor. Prefer topicGlobalId for public callers."
69
- },
70
- topicId: {
71
- type: "string",
72
- description: "Deprecated compatibility alias for topicGlobalId. Must identify a topic epistemicNode, not a legacy topics-table row."
70
+ description: "Required UUIDv7 globalId of the topic node in epistemicNodes that anchors the belief. Legacy topics-table ids, Convex storage locators, and UUIDv4 values are refused."
73
71
  },
74
72
  baseRate: {
75
73
  type: "number",
@@ -5400,6 +5398,7 @@ z.enum(["private", "team", "firm", "external", "public"]);
5400
5398
 
5401
5399
  // src/function-registry/helpers.ts
5402
5400
  var jsonObjectSchema = z.record(z.unknown());
5401
+ var uuidV7StringSchema = z.string().refine(isUuidV7, "must be UUIDv7");
5403
5402
  var sdkSessionIdSchema = z.string().optional();
5404
5403
  function publicPrefixedId(prefix, rawId) {
5405
5404
  return rawId.startsWith(`${prefix}_`) ? rawId : encodePrefixedId(prefix, rawId);
@@ -5989,6 +5988,6 @@ var getFunctionContract = FUNCTION_CONTRACTS_BY_NAME.get.bind(
5989
5988
  FUNCTION_CONTRACTS_BY_NAME
5990
5989
  );
5991
5990
 
5992
- export { ALL_FUNCTION_CONTRACTS, DUPLICATE_OPERATION_NAMES, FORBIDDEN_APPLICATION_OPERATION_NAMES, FUNCTION_CONTRACTS_BY_NAME, FUNCTION_SURFACE_CONTRACTS, LEGACY_COMPAT_OPERATION_NAMES, LUCERN_OPERATION_MANIFEST, MCP_ANALYSIS_PLATFORM_OPERATION_NAMES, MCP_ANALYSIS_TENANT_OPERATION_NAMES, MCP_AUTOMATION_OPERATION_NAMES, MCP_CORE_OPERATION_NAMES, MCP_GOVERNANCE_PLATFORM_OPERATION_NAMES, MCP_GOVERNANCE_TENANT_OPERATION_NAMES, MCP_ONLY_INTERNAL_OPERATION_NAMES, MCP_WORKFLOW_PLATFORM_OPERATION_NAMES, MCP_WORKFLOW_TENANT_OPERATION_NAMES, NODE_TYPE, PLATFORM_INTERNAL_OPERATION_NAMES, PLATFORM_PUBLIC_OPERATION_NAMES, SDK_ONLY_OPERATION_NAMES, TENANT_PUBLIC_OPERATION_NAMES, argsSchemaFromMcpContract, assertSurfaceCoverage, authUserId, classifyContract, compactRecord, defineFunctionContract, embeddingsContracts, getFunctionContract, hybridContracts, inputSchemaFromMcpContract, jsonObjectSchema, policyContracts, publicPrefixedId, recordValue, surfaceContract, surfaceEnabled, surfaceIntentGateViolations, surfaceMcpContract, withCreatedBy, withUserId };
5991
+ export { ALL_FUNCTION_CONTRACTS, DUPLICATE_OPERATION_NAMES, FORBIDDEN_APPLICATION_OPERATION_NAMES, FUNCTION_CONTRACTS_BY_NAME, FUNCTION_SURFACE_CONTRACTS, LEGACY_COMPAT_OPERATION_NAMES, LUCERN_OPERATION_MANIFEST, MCP_ANALYSIS_PLATFORM_OPERATION_NAMES, MCP_ANALYSIS_TENANT_OPERATION_NAMES, MCP_AUTOMATION_OPERATION_NAMES, MCP_CORE_OPERATION_NAMES, MCP_GOVERNANCE_PLATFORM_OPERATION_NAMES, MCP_GOVERNANCE_TENANT_OPERATION_NAMES, MCP_ONLY_INTERNAL_OPERATION_NAMES, MCP_WORKFLOW_PLATFORM_OPERATION_NAMES, MCP_WORKFLOW_TENANT_OPERATION_NAMES, NODE_TYPE, PLATFORM_INTERNAL_OPERATION_NAMES, PLATFORM_PUBLIC_OPERATION_NAMES, SDK_ONLY_OPERATION_NAMES, TENANT_PUBLIC_OPERATION_NAMES, argsSchemaFromMcpContract, assertSurfaceCoverage, authUserId, classifyContract, compactRecord, defineFunctionContract, embeddingsContracts, getFunctionContract, hybridContracts, inputSchemaFromMcpContract, jsonObjectSchema, policyContracts, publicPrefixedId, recordValue, surfaceContract, surfaceEnabled, surfaceIntentGateViolations, surfaceMcpContract, uuidV7StringSchema, withCreatedBy, withUserId };
5993
5992
  //# sourceMappingURL=index.js.map
5994
5993
  //# sourceMappingURL=index.js.map