@lucern/sdk 0.3.0-alpha.3 → 0.3.0-alpha.5

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 (136) hide show
  1. package/README.md +47 -0
  2. package/dist/adminClient.js +4 -3
  3. package/dist/adminClient.js.map +1 -1
  4. package/dist/answersClient.js +4 -3
  5. package/dist/answersClient.js.map +1 -1
  6. package/dist/audiencesClient.js +4 -3
  7. package/dist/audiencesClient.js.map +1 -1
  8. package/dist/auditClient.js +4 -3
  9. package/dist/auditClient.js.map +1 -1
  10. package/dist/authContext.js +4 -3
  11. package/dist/authContext.js.map +1 -1
  12. package/dist/beliefs/index.d.ts +3 -1
  13. package/dist/beliefs/index.js +333 -7
  14. package/dist/beliefs/index.js.map +1 -1
  15. package/dist/beliefsClient.js +4 -3
  16. package/dist/beliefsClient.js.map +1 -1
  17. package/dist/client.d.ts +2981 -40
  18. package/dist/client.js +333 -7
  19. package/dist/client.js.map +1 -1
  20. package/dist/contextClient.js +4 -3
  21. package/dist/contextClient.js.map +1 -1
  22. package/dist/contracts/api-enums.contract.d.ts +1 -1
  23. package/dist/contracts/api-enums.contract.js.map +1 -1
  24. package/dist/contracts/index.js.map +1 -1
  25. package/dist/contradictions/index.d.ts +3 -1
  26. package/dist/contradictions/index.js +333 -7
  27. package/dist/contradictions/index.js.map +1 -1
  28. package/dist/coreClient.js +4 -3
  29. package/dist/coreClient.js.map +1 -1
  30. package/dist/decisions/index.d.ts +3 -1
  31. package/dist/decisions/index.js +333 -7
  32. package/dist/decisions/index.js.map +1 -1
  33. package/dist/decisionsClient.js +4 -3
  34. package/dist/decisionsClient.js.map +1 -1
  35. package/dist/edges/index.d.ts +3 -1
  36. package/dist/edges/index.js +333 -7
  37. package/dist/edges/index.js.map +1 -1
  38. package/dist/embeddingsClient.js +4 -3
  39. package/dist/embeddingsClient.js.map +1 -1
  40. package/dist/eventingClient.js +4 -3
  41. package/dist/eventingClient.js.map +1 -1
  42. package/dist/eventsCore.js +4 -3
  43. package/dist/eventsCore.js.map +1 -1
  44. package/dist/evidence/index.d.ts +3 -1
  45. package/dist/evidence/index.js +333 -7
  46. package/dist/evidence/index.js.map +1 -1
  47. package/dist/evidenceClient.js +4 -3
  48. package/dist/evidenceClient.js.map +1 -1
  49. package/dist/functionSurface.d.ts +129 -0
  50. package/dist/functionSurface.js +1118 -0
  51. package/dist/functionSurface.js.map +1 -0
  52. package/dist/functionSurfaceClient.d.ts +8 -0
  53. package/dist/functionSurfaceClient.js +1118 -0
  54. package/dist/functionSurfaceClient.js.map +1 -0
  55. package/dist/gatewayFacades.d.ts +34 -1
  56. package/dist/gatewayFacades.js +4 -3
  57. package/dist/gatewayFacades.js.map +1 -1
  58. package/dist/graphAnalysisClient.d.ts +53 -1
  59. package/dist/graphAnalysisClient.js +31 -4
  60. package/dist/graphAnalysisClient.js.map +1 -1
  61. package/dist/graphClient.js +4 -3
  62. package/dist/graphClient.js.map +1 -1
  63. package/dist/graphIntel.d.ts +3 -0
  64. package/dist/graphIntel.js +3 -0
  65. package/dist/graphIntel.js.map +1 -0
  66. package/dist/graphIntelligence.d.ts +2 -0
  67. package/dist/graphIntelligence.js +47 -0
  68. package/dist/graphIntelligence.js.map +1 -0
  69. package/dist/graphRecommendationsClient.js +4 -3
  70. package/dist/graphRecommendationsClient.js.map +1 -1
  71. package/dist/graphStateClassifierClient.js +4 -3
  72. package/dist/graphStateClassifierClient.js.map +1 -1
  73. package/dist/harnessClient.js +4 -3
  74. package/dist/harnessClient.js.map +1 -1
  75. package/dist/identityClient.js +4 -3
  76. package/dist/identityClient.js.map +1 -1
  77. package/dist/index.d.ts +8 -3
  78. package/dist/index.js +670 -8
  79. package/dist/index.js.map +1 -1
  80. package/dist/infisicalRuntime.d.ts +42 -0
  81. package/dist/infisicalRuntime.js +291 -0
  82. package/dist/infisicalRuntime.js.map +1 -0
  83. package/dist/jobsClient.js +4 -3
  84. package/dist/jobsClient.js.map +1 -1
  85. package/dist/learningClient.js +4 -3
  86. package/dist/learningClient.js.map +1 -1
  87. package/dist/lenses/index.d.ts +28 -2
  88. package/dist/lenses/index.js +333 -7
  89. package/dist/lenses/index.js.map +1 -1
  90. package/dist/mcpClient.js +4 -3
  91. package/dist/mcpClient.js.map +1 -1
  92. package/dist/modelRuntimeClient.js +4 -3
  93. package/dist/modelRuntimeClient.js.map +1 -1
  94. package/dist/nodes/index.d.ts +21 -1
  95. package/dist/nodes/index.js +333 -7
  96. package/dist/nodes/index.js.map +1 -1
  97. package/dist/ontologies/index.d.ts +3 -1
  98. package/dist/ontologies/index.js +333 -7
  99. package/dist/ontologies/index.js.map +1 -1
  100. package/dist/ontologyClient.js +4 -3
  101. package/dist/ontologyClient.js.map +1 -1
  102. package/dist/ontologyLinksClient.js +4 -3
  103. package/dist/ontologyLinksClient.js.map +1 -1
  104. package/dist/orgGraphSearchClient.js +4 -3
  105. package/dist/orgGraphSearchClient.js.map +1 -1
  106. package/dist/packRuntime.d.ts +2 -1
  107. package/dist/packsClient.js +4 -3
  108. package/dist/packsClient.js.map +1 -1
  109. package/dist/policyClient.js +4 -3
  110. package/dist/policyClient.js.map +1 -1
  111. package/dist/questions/index.d.ts +3 -1
  112. package/dist/questions/index.js +333 -7
  113. package/dist/questions/index.js.map +1 -1
  114. package/dist/reportsClient.js +4 -3
  115. package/dist/reportsClient.js.map +1 -1
  116. package/dist/schemaClient.js +4 -3
  117. package/dist/schemaClient.js.map +1 -1
  118. package/dist/sourcesClient.js +4 -3
  119. package/dist/sourcesClient.js.map +1 -1
  120. package/dist/telemetryClient.js +4 -3
  121. package/dist/telemetryClient.js.map +1 -1
  122. package/dist/toolRegistryClient.js +4 -3
  123. package/dist/toolRegistryClient.js.map +1 -1
  124. package/dist/topics/index.d.ts +3 -1
  125. package/dist/topics/index.js +333 -7
  126. package/dist/topics/index.js.map +1 -1
  127. package/dist/topicsClient.js +4 -3
  128. package/dist/topicsClient.js.map +1 -1
  129. package/dist/workflowClient.d.ts +41 -7
  130. package/dist/workflowClient.js +4 -3
  131. package/dist/workflowClient.js.map +1 -1
  132. package/dist/worktrees/index.d.ts +29 -3
  133. package/dist/worktrees/index.js +333 -7
  134. package/dist/worktrees/index.js.map +1 -1
  135. package/package.json +12 -3
  136. package/dist/client-EiG9nJOY.d.ts +0 -2911
@@ -89,14 +89,15 @@ function normalizeCanonicalLucernAuthContext(input) {
89
89
  );
90
90
  const roles = cleanStringList(input.roles);
91
91
  const scopes = cleanStringList(input.scopes);
92
- if (roles.length === 0 || scopes.length === 0) {
92
+ const principalType = requirePrincipalType(input.principalType);
93
+ const authMode = requireAuthMode(input.authMode);
94
+ const roleBasedInteractiveAuth = authMode === "interactive_user" && roles.length > 0;
95
+ if (roles.length === 0 || scopes.length === 0 && !roleBasedInteractiveAuth) {
93
96
  throw new LucernSdkAuthContextError(
94
97
  "membership_missing",
95
98
  "Canonical Lucern SDK auth context requires non-empty roles and scopes."
96
99
  );
97
100
  }
98
- const principalType = requirePrincipalType(input.principalType);
99
- const authMode = requireAuthMode(input.authMode);
100
101
  const subject = cleanString(input.permit?.subject) ?? principalId;
101
102
  const tenant = cleanString(input.permit?.tenant) ?? tenantId;
102
103
  const workspace = cleanString(input.permit?.workspace) ?? workspaceId;
@@ -4119,9 +4120,33 @@ function graphAnalysisQuery(input) {
4119
4120
  cursor: input.cursor
4120
4121
  };
4121
4122
  }
4123
+ function normalizeRunQueryPayload(input) {
4124
+ return {
4125
+ ...input,
4126
+ topicId: requireTopicId2(input),
4127
+ projectId: void 0
4128
+ };
4129
+ }
4122
4130
  function createGraphAnalysisClient(config = {}) {
4123
4131
  const gateway = createGatewayRequestClient(config);
4124
4132
  return {
4133
+ listGraphIntelligenceQueries(input = {}) {
4134
+ return gateway.request({
4135
+ path: "/api/platform/v1/graph-intelligence/queries",
4136
+ method: "POST",
4137
+ body: {
4138
+ categoryId: input.categoryId,
4139
+ mode: input.mode
4140
+ }
4141
+ });
4142
+ },
4143
+ runGraphIntelligenceQuery(input) {
4144
+ return gateway.request({
4145
+ path: "/api/platform/v1/graph-intelligence/run",
4146
+ method: "POST",
4147
+ body: normalizeRunQueryPayload(input)
4148
+ });
4149
+ },
4125
4150
  saveAnalysis(input, idempotencyKey) {
4126
4151
  return gateway.request({
4127
4152
  path: "/api/platform/v1/graph-analysis/analyses",
@@ -4203,7 +4228,9 @@ function createGraphAnalysisClient(config = {}) {
4203
4228
  topicId: requireTopicId2(input),
4204
4229
  workspaceId: input.workspaceId,
4205
4230
  analysisId: input.analysisId,
4206
- since: input.since,
4231
+ minimumCreatedAt: input.minimumCreatedAt ?? input.since ?? input.createdAt ?? input.analysisCreatedAt,
4232
+ sourceNodeIds: input.sourceNodeIds?.join(",") ?? (input.nodeId ? input.nodeId : void 0),
4233
+ sourceEdgeIds: input.sourceEdgeIds?.join(",") ?? (input.edgeId ? input.edgeId : void 0),
4207
4234
  limit: input.limit,
4208
4235
  cursor: input.cursor
4209
4236
  })}`
@@ -4959,6 +4986,7 @@ var CONTRACTS = {
4959
4986
  "archive_belief": { method: "DELETE", path: "/beliefs", kind: "mutation", idempotent: true, surfaceIntent: "mcp_core" },
4960
4987
  "archive_ontology": { method: "DELETE", path: "/ontologies", kind: "mutation", idempotent: true, surfaceIntent: "mcp_governance" },
4961
4988
  "archive_question": { method: "DELETE", path: "/questions", kind: "mutation", idempotent: true, surfaceIntent: "mcp_core" },
4989
+ "begin_build_session": { method: "POST", path: "/mcp/build-session/begin", kind: "mutation", idempotent: true, surfaceIntent: "system" },
4962
4990
  "bisect_confidence": { method: "POST", path: "/beliefs/confidence/bisect", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
4963
4991
  "broadcast_message": { method: "POST", path: "/coordination/messages/broadcast", kind: "mutation", idempotent: true, surfaceIntent: "system" },
4964
4992
  "check_permission": { method: "POST", path: "/identity/check-permission", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
@@ -5021,6 +5049,7 @@ var CONTRACTS = {
5021
5049
  "list_beliefs": { method: "GET", path: "/beliefs", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
5022
5050
  "list_campaigns": { method: "GET", path: "/worktrees/campaigns", kind: "query", idempotent: false, surfaceIntent: "mcp_workflow" },
5023
5051
  "list_evidence": { method: "GET", path: "/evidence", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
5052
+ "list_graph_intelligence_queries": { method: "POST", path: "/graph-intelligence/queries", kind: "query", idempotent: false, surfaceIntent: "mcp_analysis" },
5024
5053
  "list_lenses": { method: "GET", path: "/lenses", kind: "query", idempotent: false, surfaceIntent: "mcp_workflow" },
5025
5054
  "list_ontologies": { method: "GET", path: "/ontologies", kind: "query", idempotent: false, surfaceIntent: "mcp_workflow" },
5026
5055
  "list_questions": { method: "GET", path: "/questions", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
@@ -5044,6 +5073,7 @@ var CONTRACTS = {
5044
5073
  "register_session": { method: "POST", path: "/coordination/register-session", kind: "mutation", idempotent: true, surfaceIntent: "system" },
5045
5074
  "remove_lens_from_topic": { method: "DELETE", path: "/lenses/apply", kind: "mutation", idempotent: true, surfaceIntent: "mcp_workflow" },
5046
5075
  "resolve_effective_ontology": { method: "POST", path: "/ontologies/effective", kind: "query", idempotent: false, surfaceIntent: "mcp_workflow" },
5076
+ "run_graph_intelligence_query": { method: "POST", path: "/graph-intelligence/run", kind: "query", idempotent: false, surfaceIntent: "mcp_analysis" },
5047
5077
  "search_beliefs": { method: "POST", path: "/beliefs/search", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
5048
5078
  "search_evidence": { method: "POST", path: "/evidence/search", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
5049
5079
  "seed_belief_lattice": { method: "POST", path: "/scope/belief-lattice/seed", kind: "mutation", idempotent: true, surfaceIntent: "system" },
@@ -5130,6 +5160,9 @@ function createFunctionSurfaceClient(config = {}) {
5130
5160
  archiveQuestion(input = {}, idempotencyKey) {
5131
5161
  return execute("archive_question", input, idempotencyKey);
5132
5162
  },
5163
+ beginBuildSession(input = {}, idempotencyKey) {
5164
+ return execute("begin_build_session", input, idempotencyKey);
5165
+ },
5133
5166
  bisectConfidence(input = {}, idempotencyKey) {
5134
5167
  return execute("bisect_confidence", input, idempotencyKey);
5135
5168
  },
@@ -5316,6 +5349,9 @@ function createFunctionSurfaceClient(config = {}) {
5316
5349
  listEvidence(input = {}, idempotencyKey) {
5317
5350
  return execute("list_evidence", input, idempotencyKey);
5318
5351
  },
5352
+ listGraphIntelligenceQueries(input = {}, idempotencyKey) {
5353
+ return execute("list_graph_intelligence_queries", input, idempotencyKey);
5354
+ },
5319
5355
  listLenses(input = {}, idempotencyKey) {
5320
5356
  return execute("list_lenses", input, idempotencyKey);
5321
5357
  },
@@ -5385,6 +5421,9 @@ function createFunctionSurfaceClient(config = {}) {
5385
5421
  resolveEffectiveOntology(input = {}, idempotencyKey) {
5386
5422
  return execute("resolve_effective_ontology", input, idempotencyKey);
5387
5423
  },
5424
+ runGraphIntelligenceQuery(input = {}, idempotencyKey) {
5425
+ return execute("run_graph_intelligence_query", input, idempotencyKey);
5426
+ },
5388
5427
  searchBeliefs(input = {}, idempotencyKey) {
5389
5428
  return execute("search_beliefs", input, idempotencyKey);
5390
5429
  },
@@ -7064,6 +7103,13 @@ function requireTopicId4(args) {
7064
7103
  }
7065
7104
  return topicId;
7066
7105
  }
7106
+ function requireTopicOrProjectId(args) {
7107
+ const topicId = args.topicId?.trim() || args.projectId?.trim() || void 0;
7108
+ if (!topicId) {
7109
+ throw new Error("topicId is required");
7110
+ }
7111
+ return topicId;
7112
+ }
7067
7113
  var AUDIT_NODE_REFERENCE_KEY_PATTERN = /(^|_)(id|nodeid|beliefid|resourceid|targetid|sourceid|subjectid|globalid|entityid|recordid|fromnodeid|tonodeid|linkednodeid|linkedbeliefid|nodeids|beliefids|resourceids)$/i;
7068
7114
  function matchesAuditNodeReference(value, nodeId) {
7069
7115
  if (Array.isArray(value)) {
@@ -7099,6 +7145,23 @@ function requireBaseRate(args) {
7099
7145
  function exposeGatewayData(response) {
7100
7146
  return Object.assign({}, response, response.data);
7101
7147
  }
7148
+ function sdkQueryString(input) {
7149
+ const params = new URLSearchParams();
7150
+ for (const [key, value] of Object.entries(input)) {
7151
+ if (value === void 0 || value === null) {
7152
+ continue;
7153
+ }
7154
+ if (Array.isArray(value)) {
7155
+ if (value.length > 0) {
7156
+ params.set(key, value.join(","));
7157
+ }
7158
+ continue;
7159
+ }
7160
+ params.set(key, String(value));
7161
+ }
7162
+ const serialized = params.toString();
7163
+ return serialized ? `?${serialized}` : "";
7164
+ }
7102
7165
  function createLucernClient(config = {}) {
7103
7166
  const gatewayConfig = toGatewayConfig(config);
7104
7167
  const beliefsClient = createBeliefsClient(gatewayConfig);
@@ -7519,6 +7582,30 @@ function createLucernClient(config = {}) {
7519
7582
  batchCreate(input, idempotencyKey) {
7520
7583
  return graphClient.batchCreateNodes(input, idempotencyKey);
7521
7584
  },
7585
+ listByTopicAndType(input) {
7586
+ return gateway.request({
7587
+ path: `/api/platform/v1/nodes${sdkQueryString({
7588
+ topicId: requireTopicOrProjectId(input),
7589
+ nodeType: input.nodeType,
7590
+ nodeTypes: input.nodeTypes,
7591
+ query: input.query,
7592
+ sourceText: input.sourceText,
7593
+ limit: input.limit,
7594
+ cursor: input.cursor
7595
+ })}`
7596
+ }).then(exposeGatewayData);
7597
+ },
7598
+ countByTopicAndType(input) {
7599
+ return gateway.request({
7600
+ path: `/api/platform/v1/nodes/count${sdkQueryString({
7601
+ topicId: requireTopicOrProjectId(input),
7602
+ nodeType: input.nodeType,
7603
+ nodeTypes: input.nodeTypes,
7604
+ query: input.query,
7605
+ limit: input.limit
7606
+ })}`
7607
+ }).then(exposeGatewayData);
7608
+ },
7522
7609
  supersede(input, idempotencyKey) {
7523
7610
  return graphClient.supersedeNode(input, idempotencyKey);
7524
7611
  },
@@ -7529,6 +7616,78 @@ function createLucernClient(config = {}) {
7529
7616
  return graphClient.hardDeleteNode(input, idempotencyKey);
7530
7617
  }
7531
7618
  };
7619
+ const publicationNamespace = {
7620
+ create(input, idempotencyKey) {
7621
+ return gateway.request({
7622
+ path: "/api/platform/v1/publication",
7623
+ method: "POST",
7624
+ body: input,
7625
+ idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
7626
+ }).then(exposeGatewayData);
7627
+ },
7628
+ update(publicationId, input, idempotencyKey) {
7629
+ return gateway.request({
7630
+ path: `/api/platform/v1/publication/${encodeURIComponent(
7631
+ publicationId
7632
+ )}`,
7633
+ method: "PATCH",
7634
+ body: input,
7635
+ idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
7636
+ }).then(exposeGatewayData);
7637
+ },
7638
+ list(input = {}) {
7639
+ return gateway.request({
7640
+ path: `/api/platform/v1/publication${sdkQueryString(input)}`
7641
+ }).then(exposeGatewayData);
7642
+ },
7643
+ getByTopic(input) {
7644
+ const topicId = typeof input === "string" ? input : input.topicId;
7645
+ const workspaceId = typeof input === "string" ? void 0 : input.workspaceId;
7646
+ return gateway.request({
7647
+ path: `/api/platform/v1/publication/by-topic/${encodeURIComponent(
7648
+ topicId
7649
+ )}${sdkQueryString({ workspaceId })}`
7650
+ }).then(exposeGatewayData);
7651
+ },
7652
+ publish(publicationId, input = {}, idempotencyKey) {
7653
+ return gateway.request({
7654
+ path: `/api/platform/v1/publication/${encodeURIComponent(
7655
+ publicationId
7656
+ )}/publish`,
7657
+ method: "POST",
7658
+ body: input,
7659
+ idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
7660
+ }).then(exposeGatewayData);
7661
+ },
7662
+ unpublish(publicationId, input = {}, idempotencyKey) {
7663
+ return gateway.request({
7664
+ path: `/api/platform/v1/publication/${encodeURIComponent(
7665
+ publicationId
7666
+ )}/unpublish`,
7667
+ method: "POST",
7668
+ body: input,
7669
+ idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
7670
+ }).then(exposeGatewayData);
7671
+ },
7672
+ remove(publicationId, input = {}) {
7673
+ return gateway.request({
7674
+ path: `/api/platform/v1/publication/${encodeURIComponent(
7675
+ publicationId
7676
+ )}${sdkQueryString(input)}`,
7677
+ method: "DELETE"
7678
+ }).then(exposeGatewayData);
7679
+ }
7680
+ };
7681
+ const ontologyLinksNamespace = {
7682
+ ...ontologyLinksClient,
7683
+ resolveThemeSource(input) {
7684
+ return gateway.request({
7685
+ path: "/api/platform/v1/ontology-links/theme-source",
7686
+ method: "POST",
7687
+ body: input
7688
+ }).then(exposeGatewayData);
7689
+ }
7690
+ };
7532
7691
  return {
7533
7692
  config,
7534
7693
  version: LUCERN_SDK_VERSION,
@@ -8010,6 +8169,54 @@ function createLucernClient(config = {}) {
8010
8169
  }));
8011
8170
  }
8012
8171
  },
8172
+ themes: {
8173
+ listByTopic(input) {
8174
+ return gateway.request({
8175
+ path: `/api/platform/v1/themes${sdkQueryString({
8176
+ topicId: requireTopicOrProjectId(input),
8177
+ query: input.query,
8178
+ limit: input.limit,
8179
+ cursor: input.cursor
8180
+ })}`
8181
+ }).then(exposeGatewayData);
8182
+ }
8183
+ },
8184
+ graphSearch: {
8185
+ keywordSearchNodes(input) {
8186
+ return gateway.request({
8187
+ path: "/api/platform/v1/graph-search/keyword-nodes",
8188
+ method: "POST",
8189
+ body: {
8190
+ ...input,
8191
+ topicId: requireTopicOrProjectId(input),
8192
+ projectId: void 0
8193
+ }
8194
+ }).then(exposeGatewayData);
8195
+ }
8196
+ },
8197
+ classifiers: {
8198
+ listBeliefCandidates(input) {
8199
+ return gateway.request({
8200
+ path: `/api/platform/v1/classifiers/belief-candidates${sdkQueryString({
8201
+ topicId: requireTopicOrProjectId(input),
8202
+ classifierKey: input.classifierKey,
8203
+ query: input.query,
8204
+ limit: input.limit,
8205
+ cursor: input.cursor
8206
+ })}`
8207
+ }).then(exposeGatewayData);
8208
+ }
8209
+ },
8210
+ archetypes: {
8211
+ getJudgmentSignature(input) {
8212
+ return gateway.request({
8213
+ path: `/api/platform/v1/archetypes/judgment-signature${sdkQueryString({
8214
+ topicId: requireTopicOrProjectId(input),
8215
+ principalId: input.principalId
8216
+ })}`
8217
+ }).then(exposeGatewayData);
8218
+ }
8219
+ },
8013
8220
  judgments: {
8014
8221
  create(input) {
8015
8222
  return decisionsClient.createJudgment(input);
@@ -8051,6 +8258,52 @@ function createLucernClient(config = {}) {
8051
8258
  });
8052
8259
  }
8053
8260
  },
8261
+ decisions: {
8262
+ create(input) {
8263
+ return decisionsClient.createJudgment(input);
8264
+ },
8265
+ record(input) {
8266
+ return decisionsClient.recordJudgment(input);
8267
+ },
8268
+ list(query5) {
8269
+ return decisionsClient.listJudgments(query5);
8270
+ },
8271
+ get(decisionId) {
8272
+ return decisionsClient.getJudgment(decisionId);
8273
+ },
8274
+ recordOutcome(decisionId, input) {
8275
+ return decisionsClient.recordJudgmentOutcome(decisionId, input);
8276
+ },
8277
+ lessons(decisionId, input, idempotencyKey) {
8278
+ return gateway.request({
8279
+ path: `/api/platform/v1/decisions/${encodeURIComponent(
8280
+ decisionId
8281
+ )}/lessons`,
8282
+ method: "POST",
8283
+ body: input,
8284
+ idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
8285
+ }).then(exposeGatewayData);
8286
+ },
8287
+ archive(decisionId, input = {}, idempotencyKey) {
8288
+ return gateway.request({
8289
+ path: `/api/platform/v1/decisions/${encodeURIComponent(
8290
+ decisionId
8291
+ )}/archive`,
8292
+ method: "POST",
8293
+ body: input,
8294
+ idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
8295
+ }).then(exposeGatewayData);
8296
+ },
8297
+ readiness(topicId) {
8298
+ return decisionsClient.getJudgmentReadiness({ topicId });
8299
+ },
8300
+ calibration(topicId) {
8301
+ return decisionsClient.getJudgmentCalibration({ topicId });
8302
+ },
8303
+ pendingOutcomeReview(topicId) {
8304
+ return decisionsClient.listPendingJudgmentOutcomeReview({ topicId });
8305
+ }
8306
+ },
8054
8307
  worktrees: {
8055
8308
  createBranch(input) {
8056
8309
  return workflowClient.createBranch(input);
@@ -8073,7 +8326,21 @@ function createLucernClient(config = {}) {
8073
8326
  topicId: requireTopicId4(input),
8074
8327
  objective: input.objective,
8075
8328
  hypothesis: input.hypothesis,
8329
+ rationale: input.rationale,
8330
+ worktreeType: input.worktreeType,
8331
+ startDate: input.startDate,
8332
+ endDate: input.endDate,
8333
+ durationWeeks: input.durationWeeks,
8334
+ confidenceImpact: input.confidenceImpact,
8335
+ beliefFocus: input.beliefFocus,
8076
8336
  beliefIds: input.beliefIds,
8337
+ targetBeliefIds: input.targetBeliefIds,
8338
+ targetQuestionIds: input.targetQuestionIds,
8339
+ keyQuestions: input.keyQuestions,
8340
+ evidenceSignals: input.evidenceSignals,
8341
+ decisionGate: input.decisionGate,
8342
+ goCriteria: input.goCriteria,
8343
+ noGoSignals: input.noGoSignals,
8077
8344
  autoShape: input.autoShape,
8078
8345
  domainPackId: input.domainPackId,
8079
8346
  campaign: input.campaign,
@@ -8086,7 +8353,8 @@ function createLucernClient(config = {}) {
8086
8353
  proofArtifacts: input.proofArtifacts,
8087
8354
  staffingHint: typeof input.staffingHint === "string" ? input.staffingHint : void 0,
8088
8355
  lastReconciledAt: input.lastReconciledAt,
8089
- autoFixPolicy: input.autoFixPolicy
8356
+ autoFixPolicy: input.autoFixPolicy,
8357
+ lensId: input.lensId
8090
8358
  });
8091
8359
  },
8092
8360
  add(input) {
@@ -8095,7 +8363,21 @@ function createLucernClient(config = {}) {
8095
8363
  topicId: requireTopicId4(input),
8096
8364
  objective: input.objective,
8097
8365
  hypothesis: input.hypothesis,
8366
+ rationale: input.rationale,
8367
+ worktreeType: input.worktreeType,
8368
+ startDate: input.startDate,
8369
+ endDate: input.endDate,
8370
+ durationWeeks: input.durationWeeks,
8371
+ confidenceImpact: input.confidenceImpact,
8372
+ beliefFocus: input.beliefFocus,
8098
8373
  beliefIds: input.beliefIds,
8374
+ targetBeliefIds: input.targetBeliefIds,
8375
+ targetQuestionIds: input.targetQuestionIds,
8376
+ keyQuestions: input.keyQuestions,
8377
+ evidenceSignals: input.evidenceSignals,
8378
+ decisionGate: input.decisionGate,
8379
+ goCriteria: input.goCriteria,
8380
+ noGoSignals: input.noGoSignals,
8099
8381
  autoShape: input.autoShape,
8100
8382
  domainPackId: input.domainPackId,
8101
8383
  campaign: input.campaign,
@@ -8108,7 +8390,8 @@ function createLucernClient(config = {}) {
8108
8390
  proofArtifacts: input.proofArtifacts,
8109
8391
  staffingHint: typeof input.staffingHint === "string" ? input.staffingHint : void 0,
8110
8392
  lastReconciledAt: input.lastReconciledAt,
8111
- autoFixPolicy: input.autoFixPolicy
8393
+ autoFixPolicy: input.autoFixPolicy,
8394
+ lensId: input.lensId
8112
8395
  });
8113
8396
  },
8114
8397
  list(query5) {
@@ -8118,6 +8401,22 @@ function createLucernClient(config = {}) {
8118
8401
  limit: query5.limit
8119
8402
  });
8120
8403
  },
8404
+ listByTopic(query5) {
8405
+ return worktreesFacade.list({
8406
+ topicId: requireTopicId4(query5),
8407
+ status: query5.status,
8408
+ limit: query5.limit
8409
+ });
8410
+ },
8411
+ findByPairedSprint(input) {
8412
+ return gateway.request({
8413
+ path: `/api/platform/v1/worktrees/paired-sprint${sdkQueryString({
8414
+ sprintId: input.sprintId,
8415
+ topicId: input.topicId ?? input.projectId,
8416
+ limit: input.limit
8417
+ })}`
8418
+ }).then(exposeGatewayData);
8419
+ },
8121
8420
  activate(worktreeId) {
8122
8421
  return worktreesFacade.activate({ id: worktreeId });
8123
8422
  },
@@ -8269,6 +8568,31 @@ function createLucernClient(config = {}) {
8269
8568
  status: typeof input.status === "string" ? input.status : void 0,
8270
8569
  limit: typeof input.limit === "number" ? input.limit : void 0
8271
8570
  });
8571
+ },
8572
+ listByTopic(input) {
8573
+ return tasksFacade.list({
8574
+ topicId: requireTopicId4(input),
8575
+ status: typeof input.status === "string" ? input.status : void 0,
8576
+ limit: typeof input.limit === "number" ? input.limit : void 0
8577
+ });
8578
+ },
8579
+ listByWorktree(input) {
8580
+ return tasksFacade.list({
8581
+ topicId: typeof input.topicId === "string" ? input.topicId : void 0,
8582
+ worktreeId: input.worktreeId,
8583
+ status: typeof input.status === "string" ? input.status : void 0,
8584
+ limit: typeof input.limit === "number" ? input.limit : void 0
8585
+ });
8586
+ },
8587
+ linkChat(taskId, input, idempotencyKey) {
8588
+ return gateway.request({
8589
+ path: `/api/platform/v1/tasks/${encodeURIComponent(
8590
+ taskId
8591
+ )}/link-chat`,
8592
+ method: "POST",
8593
+ body: input,
8594
+ idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
8595
+ }).then(exposeGatewayData);
8272
8596
  }
8273
8597
  },
8274
8598
  topics: {
@@ -8553,11 +8877,13 @@ function createLucernClient(config = {}) {
8553
8877
  graphAnalysis: graphAnalysisClient,
8554
8878
  graphRecommendations: graphRecommendationsClient,
8555
8879
  orgGraphSearch: orgGraphSearchClient,
8556
- ontologyLinks: ontologyLinksClient,
8880
+ ontologyLinks: ontologyLinksNamespace,
8557
8881
  graphStateClassifier: graphStateClassifierClient,
8558
8882
  modelRuntime: modelRuntimeClient,
8559
8883
  jobs: jobsClient,
8560
8884
  telemetry: telemetryClient,
8885
+ publication: publicationNamespace,
8886
+ contentPublication: publicationNamespace,
8561
8887
  tools: {
8562
8888
  listCatalog: toolRegistryClient.listCatalog,
8563
8889
  listExecutable: toolRegistryClient.listExecutable,