@lucern/contracts 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 (180) hide show
  1. package/dist/component-host-boundary.contract.d.ts +41 -0
  2. package/dist/component-host-boundary.contract.js +54 -0
  3. package/dist/component-host-boundary.contract.js.map +1 -0
  4. package/dist/edge-policy-manifest-DpmTtjmm.d.ts +132 -0
  5. package/dist/function-registry/beliefs.d.ts +41 -41
  6. package/dist/function-registry/beliefs.js +274 -8
  7. package/dist/function-registry/beliefs.js.map +1 -1
  8. package/dist/function-registry/coding.js +259 -8
  9. package/dist/function-registry/coding.js.map +1 -1
  10. package/dist/function-registry/context.d.ts +13 -13
  11. package/dist/function-registry/context.js +259 -9
  12. package/dist/function-registry/context.js.map +1 -1
  13. package/dist/function-registry/contracts.js +230 -5
  14. package/dist/function-registry/contracts.js.map +1 -1
  15. package/dist/function-registry/coordination.js +230 -5
  16. package/dist/function-registry/coordination.js.map +1 -1
  17. package/dist/function-registry/edges.js +241 -6
  18. package/dist/function-registry/edges.js.map +1 -1
  19. package/dist/function-registry/evidence.d.ts +33 -33
  20. package/dist/function-registry/evidence.js +274 -9
  21. package/dist/function-registry/evidence.js.map +1 -1
  22. package/dist/function-registry/graph.d.ts +131 -53
  23. package/dist/function-registry/graph.js +346 -12
  24. package/dist/function-registry/graph.js.map +1 -1
  25. package/dist/function-registry/helpers.d.ts +1 -1
  26. package/dist/function-registry/helpers.js +230 -5
  27. package/dist/function-registry/helpers.js.map +1 -1
  28. package/dist/function-registry/identity.js +230 -5
  29. package/dist/function-registry/identity.js.map +1 -1
  30. package/dist/function-registry/index.d.ts +1 -1
  31. package/dist/function-registry/index.js +230 -5
  32. package/dist/function-registry/index.js.map +1 -1
  33. package/dist/function-registry/judgments.d.ts +9 -9
  34. package/dist/function-registry/judgments.js +242 -8
  35. package/dist/function-registry/judgments.js.map +1 -1
  36. package/dist/function-registry/legacy.js +230 -5
  37. package/dist/function-registry/legacy.js.map +1 -1
  38. package/dist/function-registry/lenses.d.ts +17 -17
  39. package/dist/function-registry/lenses.js +253 -8
  40. package/dist/function-registry/lenses.js.map +1 -1
  41. package/dist/function-registry/manifest.d.ts +5 -5
  42. package/dist/function-registry/manifest.js +3 -1
  43. package/dist/function-registry/manifest.js.map +1 -1
  44. package/dist/function-registry/ontologies.d.ts +45 -45
  45. package/dist/function-registry/ontologies.js +248 -11
  46. package/dist/function-registry/ontologies.js.map +1 -1
  47. package/dist/function-registry/pipeline.d.ts +13 -13
  48. package/dist/function-registry/pipeline.js +239 -8
  49. package/dist/function-registry/pipeline.js.map +1 -1
  50. package/dist/function-registry/questions.d.ts +49 -49
  51. package/dist/function-registry/questions.js +327 -13
  52. package/dist/function-registry/questions.js.map +1 -1
  53. package/dist/function-registry/tasks.js +230 -5
  54. package/dist/function-registry/tasks.js.map +1 -1
  55. package/dist/function-registry/topics.d.ts +21 -21
  56. package/dist/function-registry/topics.js +244 -8
  57. package/dist/function-registry/topics.js.map +1 -1
  58. package/dist/function-registry/types.d.ts +1 -1
  59. package/dist/function-registry/worktrees.d.ts +80 -41
  60. package/dist/function-registry/worktrees.js +364 -17
  61. package/dist/function-registry/worktrees.js.map +1 -1
  62. package/dist/function-registry-input-audit.d.ts +13 -0
  63. package/dist/function-registry-input-audit.js +164 -0
  64. package/dist/function-registry-input-audit.js.map +1 -0
  65. package/dist/gateway.contract.d.ts +1 -0
  66. package/dist/gateway.contract.js.map +1 -1
  67. package/dist/generated/convexSchemas.js +2 -2
  68. package/dist/generated/convexSchemas.js.map +1 -1
  69. package/dist/graph-intelligence.contract.d.ts +506 -0
  70. package/dist/graph-intelligence.contract.js +595 -0
  71. package/dist/graph-intelligence.contract.js.map +1 -0
  72. package/dist/graph-types/index.d.ts +5 -1
  73. package/dist/graph-types/index.js +15 -4
  74. package/dist/graph-types/index.js.map +1 -1
  75. package/dist/{index-CV-0_VWJ.d.ts → index-O09U2xHk.d.ts} +5 -2
  76. package/dist/index.d.ts +21 -667
  77. package/dist/index.js +2139 -52
  78. package/dist/index.js.map +1 -1
  79. package/dist/infisical-runtime.contract.d.ts +174 -0
  80. package/dist/infisical-runtime.contract.js +312 -0
  81. package/dist/infisical-runtime.contract.js.map +1 -0
  82. package/dist/manifests/edge-policy-manifest.d.ts +2 -0
  83. package/dist/manifests/edge-policy-manifest.data.d.ts +27 -0
  84. package/dist/manifests/edge-policy-manifest.data.js +34 -0
  85. package/dist/manifests/edge-policy-manifest.data.js.map +1 -0
  86. package/dist/manifests/edge-policy-manifest.js +65 -0
  87. package/dist/manifests/edge-policy-manifest.js.map +1 -0
  88. package/dist/manifests/infisical-runtime-manifest.d.ts +151 -0
  89. package/dist/manifests/infisical-runtime-manifest.js +311 -0
  90. package/dist/manifests/infisical-runtime-manifest.js.map +1 -0
  91. package/dist/manifests/invariant-manifest.d.ts +65 -0
  92. package/dist/manifests/invariant-manifest.js +18 -0
  93. package/dist/manifests/invariant-manifest.js.map +1 -0
  94. package/dist/manifests/invariants/ast-utils.d.ts +14 -0
  95. package/dist/manifests/invariants/ast-utils.js +54 -0
  96. package/dist/manifests/invariants/ast-utils.js.map +1 -0
  97. package/dist/manifests/invariants/index.d.ts +15 -0
  98. package/dist/manifests/invariants/index.js +183 -0
  99. package/dist/manifests/invariants/index.js.map +1 -0
  100. package/dist/manifests/invariants/inv-1-beliefs-append-only.d.ts +12 -0
  101. package/dist/manifests/invariants/inv-1-beliefs-append-only.js +94 -0
  102. package/dist/manifests/invariants/inv-1-beliefs-append-only.js.map +1 -0
  103. package/dist/manifests/invariants/inv-14-no-silent-transitions.d.ts +12 -0
  104. package/dist/manifests/invariants/inv-14-no-silent-transitions.js +99 -0
  105. package/dist/manifests/invariants/inv-14-no-silent-transitions.js.map +1 -0
  106. package/dist/manifests/invariants/manifest-1-projections-declare-audit.d.ts +12 -0
  107. package/dist/manifests/invariants/manifest-1-projections-declare-audit.js +42 -0
  108. package/dist/manifests/invariants/manifest-1-projections-declare-audit.js.map +1 -0
  109. package/dist/manifests/tenant-client-manifest.d.ts +303 -0
  110. package/dist/manifests/tenant-client-manifest.js +409 -0
  111. package/dist/manifests/tenant-client-manifest.js.map +1 -0
  112. package/dist/projections/check-convex-args-shape.d.ts +3 -0
  113. package/dist/projections/check-convex-args-shape.js +396 -0
  114. package/dist/projections/check-convex-args-shape.js.map +1 -0
  115. package/dist/projections/create-evidence.projection.d.ts +176 -0
  116. package/dist/projections/create-evidence.projection.js +128 -0
  117. package/dist/projections/create-evidence.projection.js.map +1 -0
  118. package/dist/projections/index.d.ts +102 -0
  119. package/dist/projections/index.js +345 -0
  120. package/dist/projections/index.js.map +1 -0
  121. package/dist/projections/list-beliefs.projection.d.ts +36 -0
  122. package/dist/projections/list-beliefs.projection.js +54 -0
  123. package/dist/projections/list-beliefs.projection.js.map +1 -0
  124. package/dist/projections/list-tasks.projection.d.ts +32 -0
  125. package/dist/projections/list-tasks.projection.js +52 -0
  126. package/dist/projections/list-tasks.projection.js.map +1 -0
  127. package/dist/projections/modulate-confidence.projection.d.ts +219 -0
  128. package/dist/projections/modulate-confidence.projection.js +148 -0
  129. package/dist/projections/modulate-confidence.projection.js.map +1 -0
  130. package/dist/projections/projection-dsl.d.ts +11 -0
  131. package/dist/projections/projection-dsl.js +8 -0
  132. package/dist/projections/projection-dsl.js.map +1 -0
  133. package/dist/schemas/enums.d.ts +5 -2
  134. package/dist/schemas/enums.js +5 -2
  135. package/dist/schemas/enums.js.map +1 -1
  136. package/dist/schemas/index.d.ts +1 -1
  137. package/dist/schemas/index.js +9 -4
  138. package/dist/schemas/index.js.map +1 -1
  139. package/dist/schemas/manifest.d.ts +940 -910
  140. package/dist/schemas/manifest.js +8 -3
  141. package/dist/schemas/manifest.js.map +1 -1
  142. package/dist/schemas/sl-opinion.d.ts +4 -4
  143. package/dist/schemas/tables/identity/platform.d.ts +10 -10
  144. package/dist/schemas/tables/kernel/epistemic.d.ts +6 -6
  145. package/dist/schemas/tables/kernel/infra.d.ts +4 -4
  146. package/dist/schemas/tables/kernel/intelligence.d.ts +10 -10
  147. package/dist/schemas/tables/kernel/lens.d.ts +4 -4
  148. package/dist/schemas/tables/kernel/platform.d.ts +12 -12
  149. package/dist/schemas/tables/kernel/spine.d.ts +3 -3
  150. package/dist/schemas/tables/kernel/spine.js +5 -2
  151. package/dist/schemas/tables/kernel/spine.js.map +1 -1
  152. package/dist/schemas/tables/kernel/task.d.ts +42 -42
  153. package/dist/schemas/tables/kernel/topic.js +4 -1
  154. package/dist/schemas/tables/kernel/topic.js.map +1 -1
  155. package/dist/schemas/tables/kernel/worktree.d.ts +62 -62
  156. package/dist/schemas/tables/mc/identity.d.ts +2 -2
  157. package/dist/schemas/tables/mc/pack.d.ts +20 -20
  158. package/dist/schemas/tables/mc/registry.d.ts +4 -4
  159. package/dist/schemas/tables/mc/workspace.d.ts +9 -3
  160. package/dist/schemas/tables/mc/workspace.js +3 -1
  161. package/dist/schemas/tables/mc/workspace.js.map +1 -1
  162. package/dist/sdk-methods.contract.d.ts +1 -1
  163. package/dist/{sdk-tools.contract-S4ia0TTo.d.ts → sdk-tools.contract-Ng8ULxjr.d.ts} +1 -1
  164. package/dist/sdk-tools.contract.d.ts +2 -2
  165. package/dist/sdk-tools.contract.js +227 -4
  166. package/dist/sdk-tools.contract.js.map +1 -1
  167. package/dist/tenant-bootstrap-seed.contract.d.ts +1101 -0
  168. package/dist/tenant-bootstrap-seed.contract.js +653 -0
  169. package/dist/tenant-bootstrap-seed.contract.js.map +1 -0
  170. package/dist/tenant-bootstrap-seed.defaults.d.ts +16 -0
  171. package/dist/tenant-bootstrap-seed.defaults.js +303 -0
  172. package/dist/tenant-bootstrap-seed.defaults.js.map +1 -0
  173. package/dist/tenant-client.contract.d.ts +69 -5
  174. package/dist/tenant-client.contract.js +65 -4
  175. package/dist/tenant-client.contract.js.map +1 -1
  176. package/dist/{tool-contracts-C92-9ueT.d.ts → tool-contracts-CYXVPN4K.d.ts} +8 -2
  177. package/dist/tool-contracts.d.ts +1 -1
  178. package/dist/tool-contracts.js +228 -5
  179. package/dist/tool-contracts.js.map +1 -1
  180. package/package.json +9 -1
package/dist/index.d.ts CHANGED
@@ -1,691 +1,45 @@
1
1
  export { BELIEF_STATUSES, BRANCH_STATUSES, BeliefStatus, BranchStatus, CONFIDENCE_TRIGGERS, CONTRADICTION_SEVERITIES, CONTRADICTION_STATUSES, ConfidenceTrigger, ContradictionSeverity, ContradictionStatus, DEFEAT_TYPES, DefeatType, EPISTEMIC_LAYERS, EpistemicLayer, FORK_REASONS, ForkReason, INTEGRATION_EDGE_TYPES, IntegrationEdgeType, JUDGMENT_TYPES, JudgmentType, MERGE_OUTCOMES, MergeOutcome, PULL_REQUEST_STATUSES, PullRequestStatus, REASONING_METHODS, ReasoningMethod, WORKTREE_PHASES, WorktreePhase } from './api-enums.contract.js';
2
2
  export { AuthContext, LucernSdkClient, McpTransportKind, SESSION_AUTH_MODES, SESSION_LIFECYCLE_STATUSES, SESSION_PRINCIPAL_TYPES, SessionAuditEnvelope, SessionAuditOutcome, SessionAuthMode, SessionDelegationHop, SessionLifecycleStatus, SessionPrincipalType, inferSessionPrincipalType, lastDelegator, normalizeDelegationChain } from './auth.contract.js';
3
3
  export { COMPONENT_BOUNDARY_COMPONENT_LAYERS, COMPONENT_BOUNDARY_CONTRACT_VERSION, COMPONENT_BOUNDARY_DIRECT_DB_METHODS, COMPONENT_BOUNDARY_HIGH_RISK_TABLES, COMPONENT_BOUNDARY_HOST_SOURCE_ROOTS, ComponentBoundaryComponentLayer, ComponentBoundaryDirectDbMethod, ComponentBoundaryHighRiskTable, getComponentBoundaryTableLayer, isComponentBoundaryComponentOwnedTable } from './component-boundary.contract.js';
4
+ export { COMPONENT_HOST_BOUNDARY_CONTRACT_VERSION, COMPONENT_HOST_DB_READ_OPERATIONS, COMPONENT_HOST_DB_WRITE_OPERATIONS, COMPONENT_HOST_PROTECTED_TABLES, COMPONENT_HOST_PROTECTED_TABLE_OWNERS, COMPONENT_HOST_WRITE_ALLOWED_EXCEPTIONS, COMPONENT_HOST_WRITE_AUDIT_ROOTS, ComponentHostDbOperation, ComponentHostDbReadOperation, ComponentHostDbWriteOperation, ComponentHostProtectedTable, ComponentHostWriteAuditRoot } from './component-host-boundary.contract.js';
4
5
  export { ConvexAdminClient } from './convex-admin.contract.js';
5
6
  export { CutoverDomain, CutoverFlagState, GatewayAuthContext, GatewayAuthMode, GatewayEnvironment, GatewayErrorArgs, GatewayScope, GatewaySuccessArgs, KeyLifecycleStatus, PlatformApiErrorCode, requireActorPrincipalId } from './gateway.contract.js';
7
+ export { GRAPH_INTELLIGENCE_MODE_TOOL_NAMES, GRAPH_INTELLIGENCE_PUBLIC_TOOL_NAMES, GRAPH_INTELLIGENCE_QUERIES, GRAPH_INTELLIGENCE_QUERIES_WITH_TOOLS, GRAPH_INTELLIGENCE_QUERY_CATALOG_VERSION, GRAPH_INTELLIGENCE_QUERY_CATEGORIES, GRAPH_INTELLIGENCE_QUERY_MODES, GRAPH_INTELLIGENCE_QUICK_QUERIES, GraphIntelligenceCatalogFilter, GraphIntelligencePublicToolName, GraphIntelligenceQueryCategory, GraphIntelligenceQueryDefinition, GraphIntelligenceQueryId, GraphIntelligenceQueryInputType, GraphIntelligenceQueryMode, GraphIntelligenceQueryWithTools, GraphIntelligenceQuickQuery, fillGraphIntelligencePromptTemplate, getGraphIntelligenceQuery, isGraphIntelligenceQueryMode, listGraphIntelligenceQueries } from './graph-intelligence.contract.js';
6
8
  export { BELIEF_TYPE_BONUS, BeliefLatticeSeed, CONTEXT_PACK_SCHEMA_VERSION, CONTEXT_PACK_SECTION_KEYS, CONTEXT_RANKING_PROFILES, ContextCompilationMode, ContextPackBelief, ContextPackContradiction, ContextPackDeltaReport, ContextPackDiagnostics, ContextPackEntity, ContextPackEvidence, ContextPackFailure, ContextPackFailureContext, ContextPackInjectionPolicy, ContextPackQuestion, ContextPackRequestV1, ContextPackSectionKey, ContextPackSummary, ContextPackV1, ContextRankingProfile, DEFAULT_BELIEF_TYPE_BONUS, DEFAULT_COMPILATION_MODE, DEFAULT_ENTITY_LIMIT, DEFAULT_PRIORITY_SCORE, DEFAULT_RANKING_PROFILE, DEFAULT_SECTION_LIMIT, DEFAULT_SEVERITY_SCORE, DEFAULT_TOKEN_BUDGET, ENTITY_RANKING_WEIGHTS, MAX_ENTITY_LIMIT, MAX_SECTION_LIMIT, MAX_TOKEN_BUDGET, MIN_CONTRADICTION_BUDGET, MIN_TOKEN_BUDGET, MIN_TOKEN_ESTIMATE, PRIORITY_SCORES, PackWeightOverride, PublicCompiledContext, PublicContextBelief, PublicContextContradiction, PublicContextEntity, PublicContextEvidence, PublicContextInjectionPolicy, PublicContextQuestion, RANKING_WEIGHTS, RECENCY_HALF_LIFE_DAYS, RESOLVED_QUESTION_STATUSES, RankingWeightVector, SECTION_BUDGET_RATIOS, SEVERITY_SCORES, TOKENS_PER_WORD, VerificationObligation } from './context-pack.contract.js';
7
9
  export { CreateDomainEventInput, DOMAIN_EVENT_TYPES, DOMAIN_EVENT_VERSION, DomainActorType, DomainEvent, DomainEventData, DomainEventType, DomainResourceType, EVENT_RETENTION_DEFAULT_DAYS, EventCursor, EventListQuery, EventListResult, ReplayEventsInput, ReplayEventsResult, WEBHOOK_MAX_ATTEMPTS, WEBHOOK_RETRY_DELAYS_MS, WebhookCreateInput, WebhookDeliveriesResult, WebhookDeliveryAttemptRecord, WebhookDeliveryRecord, WebhookDeliveryStatus, WebhookHealthResult, WebhookRecord, WebhookSecretMode, WebhookTestResult, WebhookUpdateInput, buildDomainEvent, compareEventCursor, createEventId, decodeEventCursor, emitDomainEvent, encodeEventCursor, inferActorType, isAfterCursor, normalizeRetentionDays, sortEventsByCursor } from './events.contract.js';
8
10
  export { DecodedPrefixedId, decodePrefixedId, encodePrefixedId, hasPrefixedIdPrefix } from './ids.contract.js';
9
11
  export { d as contractDsl } from './dsl-BgpoVOVQ.js';
10
- export { i as schemaContracts } from './index-CV-0_VWJ.js';
12
+ export { i as schemaContracts } from './index-O09U2xHk.js';
11
13
  export { ComponentTableManifest, ComponentTableManifestSchema } from './schemas/component-table-manifest.js';
12
14
  export { SLOpinionInput, SLOpinionInputSchema } from './schemas/sl-opinion.js';
13
- import * as zod from 'zod';
14
- import { z } from 'zod';
15
- import { TENANT_CLIENT_CONTRACT_VERSION, TENANT_CLIENT_AUTH_MODES, TENANT_CLIENT_PRINCIPAL_TYPES, TENANT_CLIENT_REQUIRED_CONTEXT_FIELDS, TENANT_CLIENT_OPTIONAL_CONTEXT_FIELDS, TENANT_CLIENT_INSTALL_TOKEN_ENV, TENANT_CLIENT_INSTALL_TOKEN_INFISICAL_PATH, TENANT_CLIENT_FORBIDDEN_INSTALL_TOKEN_INFISICAL_PATHS, TENANT_CLIENT_FORBIDDEN_SECRET_ENV, TENANT_CLIENT_INSTALLABLE_PACKAGES, TENANT_CLIENT_PUBLIC_IMPORTS, TENANT_CLIENT_COMPONENT_CONFIG_IMPORTS, TENANT_CLIENT_REQUIRED_SDK_NAMESPACES, TENANT_CLIENT_CAPABILITIES, TENANT_CLIENT_ISOLATION_RULES, TENANT_CLIENT_FORBIDDEN_IMPORT_PATTERNS } from './tenant-client.contract.js';
16
- export { TenantClientAllowedImport, TenantClientAuthMode, TenantClientCapability, TenantClientCapabilityId, TenantClientComponentConfigImport, TenantClientForbiddenImportPattern, TenantClientForbiddenImportPatternId, TenantClientForbiddenInstallTokenInfisicalPath, TenantClientForbiddenSecretEnv, TenantClientImportClassification, TenantClientImportDecision, TenantClientInstallablePackage, TenantClientInstallablePackageName, TenantClientIsolationRule, TenantClientOptionalContextField, TenantClientPackageRole, TenantClientPrincipalType, TenantClientPublicImport, TenantClientPublicPackage, TenantClientPublicSurface, TenantClientRequiredContextField, TenantClientRequiredSdkNamespace, assertTenantClientImportAllowed, classifyTenantClientImport, findTenantClientInstallablePackage, formatTenantClientImportViolation, isTenantClientAllowedImport, isTenantClientComponentConfigImport, isTenantClientInstallablePackage, isTenantClientPublicImport } from './tenant-client.contract.js';
15
+ export { e as EdgePolicyEntry, c as EdgePolicyEntrySchema, f as EdgePolicyManifest, d as EdgePolicyManifestSchema, g as EdgePolicyViolation, a as EpistemicNodeType, E as EpistemicNodeTypeSchema, G as GraphRef, b as GraphRefSchema, i as assertEdgePolicyAllowed, h as findEdgePolicy } from './edge-policy-manifest-DpmTtjmm.js';
16
+ export { edgePolicyManifest } from './manifests/edge-policy-manifest.data.js';
17
+ export { INFISICAL_RUNTIME_MANIFEST, InfisicalRuntimeManifest } from './manifests/infisical-runtime-manifest.js';
18
+ export { CheckContext, CheckerKind, InvariantId, InvariantManifest, InvariantManifestSchema, InvariantResult, InvariantRule, InvariantSeverity } from './manifests/invariant-manifest.js';
19
+ export { TENANT_CLIENT_MANIFEST, TenantClientManifest } from './manifests/tenant-client-manifest.js';
20
+ export { ProjectionRegistry, projections } from './projections/index.js';
17
21
  export * from './function-registry/index.js';
18
- export { t as mcpToolsContract } from './tool-contracts-C92-9ueT.js';
22
+ export { t as mcpToolsContract } from './tool-contracts-CYXVPN4K.js';
19
23
  export { EntityConnectionMatch, EntityMatchCandidate, EntityTypeMatch, OntologyEntityType, rankEntityConnections, rankEntityTypeMatches, scoreEntityConnection, scoreEntityTypeMatch } from './v1/ontologies/v1.js';
20
24
  export { LucernPrompt, LucernPromptModelHint, isLucernPrompt } from './prompt.contract.js';
21
25
  export { AddEvidenceInput, AddWorktreeInput, BeliefResult, BisectConfidenceInput, BisectResult, BranchResult, CompileContextInput, CompiledContextResult, ConfidenceResult, ContradictionResult, CreateBeliefInput, CreateBranchInput, CreateEdgeInput, EdgeResult, EvidenceResult, FlagContradictionInput, ForkBeliefInput, ForkResult, JudgmentResult, LineageResult, LucernClient, LucernClientConfig, LucernGraphMethods, LucernWorkflowMethods, MergeInput, MergeResult, ModulateConfidenceInput, OpenPullRequestInput, PullRequestResult, PushInput, PushResult, QueryLineageInput, RecordJudgmentInput, RefineBeliefInput, SearchBeliefsInput, WorktreeResult } from './sdk-methods.contract.js';
22
- export { s as sdkToolsContract } from './sdk-tools.contract-S4ia0TTo.js';
26
+ export { s as sdkToolsContract } from './sdk-tools.contract-Ng8ULxjr.js';
27
+ export { INFISICAL_RUNTIME_BOOTSTRAP_ENV, INFISICAL_RUNTIME_CONTRACT_VERSION, INFISICAL_RUNTIME_DEFAULT_API_URL, INFISICAL_RUNTIME_DEFAULT_PROJECT_ID, INFISICAL_RUNTIME_DELIVERY_MODES, INFISICAL_RUNTIME_ENVIRONMENTS, INFISICAL_RUNTIME_PATHS, INFISICAL_RUNTIME_SURFACES, INFISICAL_RUNTIME_SURFACE_IDS, InfisicalRuntimeBootstrapEnv, InfisicalRuntimeDeliveryMode, InfisicalRuntimeEnvironment, InfisicalRuntimePath, InfisicalRuntimePathDefinition, InfisicalRuntimePathId, InfisicalRuntimeSurface, InfisicalRuntimeSurfaceDefinition, InfisicalRuntimeSurfaceId, InfisicalRuntimeVariable, findInfisicalRuntimePath, findInfisicalRuntimeSurface } from './infisical-runtime.contract.js';
28
+ export { TENANT_CLIENT_AUTH_MODES, TENANT_CLIENT_CAPABILITIES, TENANT_CLIENT_COMPONENT_CONFIG_IMPORTS, TENANT_CLIENT_CONTRACT_VERSION, TENANT_CLIENT_FORBIDDEN_IMPORT_PATTERNS, TENANT_CLIENT_FORBIDDEN_INSTALL_TOKEN_INFISICAL_PATHS, TENANT_CLIENT_FORBIDDEN_SECRET_ENV, TENANT_CLIENT_FULL_SUITE_PACKAGE_NAMES, TENANT_CLIENT_INSTALLABLE_PACKAGES, TENANT_CLIENT_INSTALL_PROFILES, TENANT_CLIENT_INSTALL_TOKEN_ENV, TENANT_CLIENT_INSTALL_TOKEN_INFISICAL_PATH, TENANT_CLIENT_ISOLATION_RULES, TENANT_CLIENT_OPTIONAL_CONTEXT_FIELDS, TENANT_CLIENT_PRINCIPAL_TYPES, TENANT_CLIENT_PUBLIC_IMPORTS, TENANT_CLIENT_REQUIRED_CONTEXT_FIELDS, TENANT_CLIENT_REQUIRED_SDK_NAMESPACES, TenantClientAllowedImport, TenantClientAuthMode, TenantClientCapability, TenantClientCapabilityId, TenantClientComponentConfigImport, TenantClientForbiddenImportPattern, TenantClientForbiddenImportPatternId, TenantClientForbiddenInstallTokenInfisicalPath, TenantClientForbiddenSecretEnv, TenantClientImportClassification, TenantClientImportDecision, TenantClientInstallProfile, TenantClientInstallProfileId, TenantClientInstallablePackage, TenantClientInstallablePackageName, TenantClientIsolationRule, TenantClientOptionalContextField, TenantClientPackageRole, TenantClientPrincipalType, TenantClientPublicImport, TenantClientPublicPackage, TenantClientPublicSurface, TenantClientRequiredContextField, TenantClientRequiredSdkNamespace, assertTenantClientImportAllowed, classifyTenantClientImport, findTenantClientInstallablePackage, formatTenantClientImportViolation, isTenantClientAllowedImport, isTenantClientComponentConfigImport, isTenantClientInstallablePackage, isTenantClientPublicImport } from './tenant-client.contract.js';
29
+ export { TENANT_BOOTSTRAP_FORBIDDEN_SEED_TABLES, TENANT_BOOTSTRAP_SEED_AUTH_METADATA_FIELDS, TENANT_BOOTSTRAP_SEED_COMPONENTS, TENANT_BOOTSTRAP_SEED_CONTRACT_VERSION, TENANT_BOOTSTRAP_SEED_MANIFEST, TENANT_BOOTSTRAP_SEED_TABLES, TENANT_BOOTSTRAP_TABLE_REQUIREMENTS, TenantBootstrapCopyMode, TenantBootstrapForbiddenSeedTable, TenantBootstrapPrepopulation, TenantBootstrapSeedAuthMetadataField, TenantBootstrapSeedComponent, TenantBootstrapSeedScope, TenantBootstrapSeedTable, TenantBootstrapSeedTableName, TenantBootstrapTableRequirement, findTenantBootstrapSeedTable, findTenantBootstrapTableRequirement, isTenantBootstrapForbiddenSeedTable, isTenantBootstrapSeedTable } from './tenant-bootstrap-seed.contract.js';
30
+ export { TENANT_BOOTSTRAP_TEMPLATE_ACTOR, TENANT_BOOTSTRAP_TEMPLATE_SEED_VERSION, TENANT_BOOTSTRAP_TEMPLATE_TENANT_ID, TenantBootstrapTemplateSeedOptions, TenantBootstrapTemplateSeedRows, buildTenantBootstrapTemplateSeedRows } from './tenant-bootstrap-seed.defaults.js';
23
31
  export { LexicalRerankOptions, LexicalSignal, LexicalStrategy, PreparedLexicalQuery, bigramTokenize, jaccardSimilarity, prepareLexicalQuery, rankWindowScore, rerankLexicalWindow, scoreLexicalSignal, scoreLexicalSignals, stemToken, tokenOverlapScore, tokenizeSearchText, wordOverlapScore, wordTokenize } from './text-matching.contract.js';
24
32
  export { ROOT_TOPIC_ID, TopicDoc, collectTopicNeighborhood } from './v1/topics/v1.js';
25
33
  export { CANONICAL_WORKFLOW_DEFINITIONS, DEFAULT_TIER_APPROVAL_MODE, DEFAULT_WORKFLOW_AUTO_FIX_POLICY, EngineeringBriefOutput, InboxSummaryOutput, MORNING_BRIEF_WORKFLOW_ID, NIGHTLY_RECONCILIATION_WORKFLOW_ID, PipelineBriefOutput, ResearchMemoOutput, StrategyArtifactOutput, StructuredPayloadOutput, WORKFLOW_ACTION_KINDS, WORKFLOW_APPROVAL_MODES, WORKFLOW_AUTO_FIX_MODES, WORKFLOW_HOOK_EVENTS, WORKFLOW_INTEGRITY_CHECKS, WORKFLOW_MUTATION_TIERS, WORKFLOW_OUTPUT_KINDS, WORKFLOW_PROOF_ARTIFACT_KINDS, WORKFLOW_RUNTIME_SCHEMA_VERSION, WORKFLOW_RUN_STATUSES, WORKFLOW_STAFFING_HINTS, WORKFLOW_TRIGGER_KINDS, WorkflowActionContract, WorkflowActionKind, WorkflowApprovalMode, WorkflowApprovalPolicy, WorkflowAutoFixMode, WorkflowAutoFixPolicy, WorkflowDefinitionV1, WorkflowHookContract, WorkflowHookEvent, WorkflowIntegrityCheckId, WorkflowMutationTier, WorkflowOutputBase, WorkflowOutputContract, WorkflowOutputKind, WorkflowProofArtifact, WorkflowProofArtifactKind, WorkflowRunReceiptV1, WorkflowRunStatus, WorkflowStaffingHint, WorkflowTriggerContract, WorkflowTriggerKind } from './workflow-runtime.contract.js';
34
+ export { createEvidenceProjection } from './projections/create-evidence.projection.js';
35
+ export { listBeliefsProjection } from './projections/list-beliefs.projection.js';
36
+ export { listTasksProjection } from './projections/list-tasks.projection.js';
37
+ export { modulateConfidenceProjection } from './projections/modulate-confidence.projection.js';
38
+ export { ProjectionDef, defineProjection } from './projections/projection-dsl.js';
26
39
  import './generated/tableOwnership.js';
27
40
  import './defineFunction-DO97DKs4.js';
41
+ import 'zod';
28
42
  import './defineTable-CBQ03FXl.js';
29
43
  import './idOf-DR8tkhQS.js';
30
44
  import './schemas/enums.js';
31
45
  import './schemas/manifest.js';
32
-
33
- declare const EpistemicNodeTypeSchema: z.ZodEnum<["belief", "evidence", "question", "answer", "topic", "edge", "ontology", "lens", "contradiction"]>;
34
- type EpistemicNodeType = z.infer<typeof EpistemicNodeTypeSchema>;
35
- type GraphRef = {
36
- kind: "epistemic_node";
37
- nodeId: string;
38
- nodeType: EpistemicNodeType;
39
- } | {
40
- kind: "external_belief";
41
- ref: {
42
- tenantId: string;
43
- beliefId: string;
44
- };
45
- };
46
- declare const GraphRefSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
47
- kind: z.ZodLiteral<"epistemic_node">;
48
- nodeId: z.ZodString;
49
- nodeType: z.ZodEnum<["belief", "evidence", "question", "answer", "topic", "edge", "ontology", "lens", "contradiction"]>;
50
- }, "strip", z.ZodTypeAny, {
51
- nodeType: "belief" | "evidence" | "question" | "edge" | "contradiction" | "topic" | "ontology" | "answer" | "lens";
52
- nodeId: string;
53
- kind: "epistemic_node";
54
- }, {
55
- nodeType: "belief" | "evidence" | "question" | "edge" | "contradiction" | "topic" | "ontology" | "answer" | "lens";
56
- nodeId: string;
57
- kind: "epistemic_node";
58
- }>, z.ZodObject<{
59
- kind: z.ZodLiteral<"external_belief">;
60
- ref: z.ZodObject<{
61
- tenantId: z.ZodString;
62
- beliefId: z.ZodString;
63
- }, "strip", z.ZodTypeAny, {
64
- tenantId: string;
65
- beliefId: string;
66
- }, {
67
- tenantId: string;
68
- beliefId: string;
69
- }>;
70
- }, "strip", z.ZodTypeAny, {
71
- kind: "external_belief";
72
- ref: {
73
- tenantId: string;
74
- beliefId: string;
75
- };
76
- }, {
77
- kind: "external_belief";
78
- ref: {
79
- tenantId: string;
80
- beliefId: string;
81
- };
82
- }>]>;
83
-
84
- declare const EdgePolicyEntrySchema: z.ZodObject<{
85
- edgeType: z.ZodString;
86
- fromKinds: z.ZodArray<z.ZodEnum<["epistemic_node", "external_belief"]>, "many">;
87
- fromNodeTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<["belief", "evidence", "question", "answer", "topic", "edge", "ontology", "lens", "contradiction"]>, "many">>;
88
- toKinds: z.ZodArray<z.ZodEnum<["epistemic_node", "external_belief"]>, "many">;
89
- toNodeTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<["belief", "evidence", "question", "answer", "topic", "edge", "ontology", "lens", "contradiction"]>, "many">>;
90
- description: z.ZodString;
91
- }, "strip", z.ZodTypeAny, {
92
- description: string;
93
- edgeType: string;
94
- fromKinds: ("epistemic_node" | "external_belief")[];
95
- toKinds: ("epistemic_node" | "external_belief")[];
96
- fromNodeTypes?: ("belief" | "evidence" | "question" | "edge" | "contradiction" | "topic" | "ontology" | "answer" | "lens")[] | undefined;
97
- toNodeTypes?: ("belief" | "evidence" | "question" | "edge" | "contradiction" | "topic" | "ontology" | "answer" | "lens")[] | undefined;
98
- }, {
99
- description: string;
100
- edgeType: string;
101
- fromKinds: ("epistemic_node" | "external_belief")[];
102
- toKinds: ("epistemic_node" | "external_belief")[];
103
- fromNodeTypes?: ("belief" | "evidence" | "question" | "edge" | "contradiction" | "topic" | "ontology" | "answer" | "lens")[] | undefined;
104
- toNodeTypes?: ("belief" | "evidence" | "question" | "edge" | "contradiction" | "topic" | "ontology" | "answer" | "lens")[] | undefined;
105
- }>;
106
- declare const EdgePolicyManifestSchema: z.ZodObject<{
107
- manifestVersion: z.ZodLiteral<"1.0.0">;
108
- policies: z.ZodArray<z.ZodObject<{
109
- edgeType: z.ZodString;
110
- fromKinds: z.ZodArray<z.ZodEnum<["epistemic_node", "external_belief"]>, "many">;
111
- fromNodeTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<["belief", "evidence", "question", "answer", "topic", "edge", "ontology", "lens", "contradiction"]>, "many">>;
112
- toKinds: z.ZodArray<z.ZodEnum<["epistemic_node", "external_belief"]>, "many">;
113
- toNodeTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<["belief", "evidence", "question", "answer", "topic", "edge", "ontology", "lens", "contradiction"]>, "many">>;
114
- description: z.ZodString;
115
- }, "strip", z.ZodTypeAny, {
116
- description: string;
117
- edgeType: string;
118
- fromKinds: ("epistemic_node" | "external_belief")[];
119
- toKinds: ("epistemic_node" | "external_belief")[];
120
- fromNodeTypes?: ("belief" | "evidence" | "question" | "edge" | "contradiction" | "topic" | "ontology" | "answer" | "lens")[] | undefined;
121
- toNodeTypes?: ("belief" | "evidence" | "question" | "edge" | "contradiction" | "topic" | "ontology" | "answer" | "lens")[] | undefined;
122
- }, {
123
- description: string;
124
- edgeType: string;
125
- fromKinds: ("epistemic_node" | "external_belief")[];
126
- toKinds: ("epistemic_node" | "external_belief")[];
127
- fromNodeTypes?: ("belief" | "evidence" | "question" | "edge" | "contradiction" | "topic" | "ontology" | "answer" | "lens")[] | undefined;
128
- toNodeTypes?: ("belief" | "evidence" | "question" | "edge" | "contradiction" | "topic" | "ontology" | "answer" | "lens")[] | undefined;
129
- }>, "many">;
130
- }, "strip", z.ZodTypeAny, {
131
- manifestVersion: "1.0.0";
132
- policies: {
133
- description: string;
134
- edgeType: string;
135
- fromKinds: ("epistemic_node" | "external_belief")[];
136
- toKinds: ("epistemic_node" | "external_belief")[];
137
- fromNodeTypes?: ("belief" | "evidence" | "question" | "edge" | "contradiction" | "topic" | "ontology" | "answer" | "lens")[] | undefined;
138
- toNodeTypes?: ("belief" | "evidence" | "question" | "edge" | "contradiction" | "topic" | "ontology" | "answer" | "lens")[] | undefined;
139
- }[];
140
- }, {
141
- manifestVersion: "1.0.0";
142
- policies: {
143
- description: string;
144
- edgeType: string;
145
- fromKinds: ("epistemic_node" | "external_belief")[];
146
- toKinds: ("epistemic_node" | "external_belief")[];
147
- fromNodeTypes?: ("belief" | "evidence" | "question" | "edge" | "contradiction" | "topic" | "ontology" | "answer" | "lens")[] | undefined;
148
- toNodeTypes?: ("belief" | "evidence" | "question" | "edge" | "contradiction" | "topic" | "ontology" | "answer" | "lens")[] | undefined;
149
- }[];
150
- }>;
151
- type EdgePolicyEntry = z.infer<typeof EdgePolicyEntrySchema>;
152
- type EdgePolicyManifest = z.infer<typeof EdgePolicyManifestSchema>;
153
- type EdgePolicyViolation = {
154
- code: "POLICY_VIOLATION";
155
- edgeType: string;
156
- from: GraphRef;
157
- to: GraphRef;
158
- };
159
- declare function findEdgePolicy(manifest: EdgePolicyManifest, edgeType: string): EdgePolicyEntry | undefined;
160
- declare function assertEdgePolicyAllowed(manifest: EdgePolicyManifest, edgeType: string, from: GraphRef, to: GraphRef): void;
161
-
162
- declare const edgePolicyManifest: {
163
- manifestVersion: "1.0.0";
164
- policies: ({
165
- edgeType: string;
166
- fromKinds: "epistemic_node"[];
167
- fromNodeTypes: "evidence"[];
168
- toKinds: "epistemic_node"[];
169
- toNodeTypes: "evidence"[];
170
- description: string;
171
- } | {
172
- edgeType: string;
173
- fromKinds: "epistemic_node"[];
174
- fromNodeTypes: "evidence"[];
175
- toKinds: "epistemic_node"[];
176
- toNodeTypes: "belief"[];
177
- description: string;
178
- } | {
179
- edgeType: string;
180
- fromKinds: "epistemic_node"[];
181
- fromNodeTypes: "evidence"[];
182
- toKinds: "epistemic_node"[];
183
- toNodeTypes: "question"[];
184
- description: string;
185
- })[];
186
- };
187
-
188
- interface ProjectionDef<TInput, TConvexArgs> {
189
- contractName: string;
190
- inputSchema: z.ZodSchema<TInput>;
191
- project: (input: TInput) => TConvexArgs;
192
- convexArgsValidator: unknown;
193
- }
194
- declare function defineProjection<I, C>(def: ProjectionDef<I, C>): ProjectionDef<I, C>;
195
-
196
- declare const createEvidenceProjection: ProjectionDef<z.objectInputType<{
197
- projectId: z.ZodOptional<z.ZodString>;
198
- topicId: z.ZodOptional<z.ZodString>;
199
- text: z.ZodOptional<z.ZodString>;
200
- canonicalText: z.ZodOptional<z.ZodString>;
201
- title: z.ZodOptional<z.ZodString>;
202
- content: z.ZodOptional<z.ZodString>;
203
- contentType: z.ZodOptional<z.ZodString>;
204
- kind: z.ZodOptional<z.ZodString>;
205
- tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
206
- source: z.ZodOptional<z.ZodString>;
207
- sourceUrl: z.ZodOptional<z.ZodString>;
208
- sourceType: z.ZodOptional<z.ZodString>;
209
- externalSourceType: z.ZodOptional<z.ZodString>;
210
- sourceQuestionId: z.ZodOptional<z.ZodString>;
211
- methodology: z.ZodOptional<z.ZodString>;
212
- informationAsymmetry: z.ZodOptional<z.ZodString>;
213
- sourceDescription: z.ZodOptional<z.ZodString>;
214
- targetId: z.ZodOptional<z.ZodString>;
215
- targetNodeId: z.ZodOptional<z.ZodString>;
216
- linkedBeliefNodeId: z.ZodOptional<z.ZodString>;
217
- evidenceRelation: z.ZodOptional<z.ZodEnum<["supports", "contradicts", "neutral"]>>;
218
- confidence: z.ZodOptional<z.ZodNumber>;
219
- weight: z.ZodOptional<z.ZodNumber>;
220
- reasoning: z.ZodOptional<z.ZodString>;
221
- rationale: z.ZodString;
222
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
223
- trustedBypassAccessCheck: z.ZodOptional<z.ZodBoolean>;
224
- }, z.ZodTypeAny, "passthrough">, Record<string, unknown>>;
225
-
226
- declare const listBeliefsProjection: ProjectionDef<{
227
- topicId: string;
228
- status?: "active" | "archived" | "unscored" | "scored" | "superseded" | undefined;
229
- worktreeId?: string | undefined;
230
- limit?: number | undefined;
231
- minConfidence?: number | undefined;
232
- includeEdgeAssociated?: boolean | undefined;
233
- }, Record<string, unknown>>;
234
-
235
- declare const listTasksProjection: ProjectionDef<{
236
- topicId: string;
237
- status?: "blocked" | "in_progress" | "todo" | "done" | undefined;
238
- worktreeId?: string | undefined;
239
- limit?: number | undefined;
240
- linkedWorktreeId?: string | undefined;
241
- }, Record<string, unknown>>;
242
-
243
- declare const modulateConfidenceProjection: ProjectionDef<{
244
- trigger: "evidence_added" | "evidence_removed" | "contradiction_detected" | "contradiction_resolved" | "agent_assessment" | "worktree_outcome" | "worktree_completed" | "fusion" | "discount" | "deduction" | "backfill_synthetic" | "answer_recorded";
245
- rationale: string;
246
- belief?: number | undefined;
247
- worktreeId?: string | undefined;
248
- disbelief?: number | undefined;
249
- uncertainty?: number | undefined;
250
- baseRate?: number | undefined;
251
- triggeringEvidenceId?: string | undefined;
252
- triggeringQuestionId?: string | undefined;
253
- triggeringAnswerId?: string | undefined;
254
- triggeringContradictionId?: string | undefined;
255
- triggeringWorktreeId?: string | undefined;
256
- beliefNodeId?: string | undefined;
257
- nodeId?: string | undefined;
258
- trustedBypassAccessCheck?: boolean | undefined;
259
- opinion?: {
260
- belief: number;
261
- disbelief: number;
262
- uncertainty: number;
263
- baseRate: number;
264
- } | undefined;
265
- provenance?: {
266
- evidence?: string | undefined;
267
- question?: string | undefined;
268
- contradiction?: string | undefined;
269
- worktree?: string | undefined;
270
- answer?: string | undefined;
271
- } | undefined;
272
- }, {
273
- nodeId: string;
274
- worktreeId: string | undefined;
275
- belief: number;
276
- disbelief: number;
277
- uncertainty: number;
278
- baseRate: number;
279
- trigger: "evidence_added" | "evidence_removed" | "contradiction_detected" | "contradiction_resolved" | "agent_assessment" | "worktree_outcome" | "worktree_completed" | "fusion" | "discount" | "deduction" | "backfill_synthetic";
280
- triggeringEvidenceId: string | undefined;
281
- triggeringQuestionId: string | undefined;
282
- triggeringAnswerId: string | undefined;
283
- triggeringContradictionId: string | undefined;
284
- triggeringWorktreeId: string | undefined;
285
- rationale: string;
286
- trustedBypassAccessCheck: boolean;
287
- }>;
288
-
289
- declare const projections: {
290
- readonly create_evidence: ProjectionDef<zod.objectInputType<{
291
- projectId: zod.ZodOptional<zod.ZodString>;
292
- topicId: zod.ZodOptional<zod.ZodString>;
293
- text: zod.ZodOptional<zod.ZodString>;
294
- canonicalText: zod.ZodOptional<zod.ZodString>;
295
- title: zod.ZodOptional<zod.ZodString>;
296
- content: zod.ZodOptional<zod.ZodString>;
297
- contentType: zod.ZodOptional<zod.ZodString>;
298
- kind: zod.ZodOptional<zod.ZodString>;
299
- tags: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
300
- source: zod.ZodOptional<zod.ZodString>;
301
- sourceUrl: zod.ZodOptional<zod.ZodString>;
302
- sourceType: zod.ZodOptional<zod.ZodString>;
303
- externalSourceType: zod.ZodOptional<zod.ZodString>;
304
- sourceQuestionId: zod.ZodOptional<zod.ZodString>;
305
- methodology: zod.ZodOptional<zod.ZodString>;
306
- informationAsymmetry: zod.ZodOptional<zod.ZodString>;
307
- sourceDescription: zod.ZodOptional<zod.ZodString>;
308
- targetId: zod.ZodOptional<zod.ZodString>;
309
- targetNodeId: zod.ZodOptional<zod.ZodString>;
310
- linkedBeliefNodeId: zod.ZodOptional<zod.ZodString>;
311
- evidenceRelation: zod.ZodOptional<zod.ZodEnum<["supports", "contradicts", "neutral"]>>;
312
- confidence: zod.ZodOptional<zod.ZodNumber>;
313
- weight: zod.ZodOptional<zod.ZodNumber>;
314
- reasoning: zod.ZodOptional<zod.ZodString>;
315
- rationale: zod.ZodString;
316
- metadata: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
317
- trustedBypassAccessCheck: zod.ZodOptional<zod.ZodBoolean>;
318
- }, zod.ZodTypeAny, "passthrough">, Record<string, unknown>>;
319
- readonly list_beliefs: ProjectionDef<{
320
- topicId: string;
321
- status?: "active" | "archived" | "unscored" | "scored" | "superseded" | undefined;
322
- worktreeId?: string | undefined;
323
- limit?: number | undefined;
324
- minConfidence?: number | undefined;
325
- includeEdgeAssociated?: boolean | undefined;
326
- }, Record<string, unknown>>;
327
- readonly list_tasks: ProjectionDef<{
328
- topicId: string;
329
- status?: "blocked" | "in_progress" | "todo" | "done" | undefined;
330
- worktreeId?: string | undefined;
331
- limit?: number | undefined;
332
- linkedWorktreeId?: string | undefined;
333
- }, Record<string, unknown>>;
334
- readonly modulate_confidence: ProjectionDef<{
335
- trigger: "evidence_added" | "evidence_removed" | "contradiction_detected" | "contradiction_resolved" | "agent_assessment" | "worktree_outcome" | "worktree_completed" | "fusion" | "discount" | "deduction" | "backfill_synthetic" | "answer_recorded";
336
- rationale: string;
337
- belief?: number | undefined;
338
- worktreeId?: string | undefined;
339
- disbelief?: number | undefined;
340
- uncertainty?: number | undefined;
341
- baseRate?: number | undefined;
342
- triggeringEvidenceId?: string | undefined;
343
- triggeringQuestionId?: string | undefined;
344
- triggeringAnswerId?: string | undefined;
345
- triggeringContradictionId?: string | undefined;
346
- triggeringWorktreeId?: string | undefined;
347
- beliefNodeId?: string | undefined;
348
- nodeId?: string | undefined;
349
- trustedBypassAccessCheck?: boolean | undefined;
350
- opinion?: {
351
- belief: number;
352
- disbelief: number;
353
- uncertainty: number;
354
- baseRate: number;
355
- } | undefined;
356
- provenance?: {
357
- evidence?: string | undefined;
358
- question?: string | undefined;
359
- contradiction?: string | undefined;
360
- worktree?: string | undefined;
361
- answer?: string | undefined;
362
- } | undefined;
363
- }, {
364
- nodeId: string;
365
- worktreeId: string | undefined;
366
- belief: number;
367
- disbelief: number;
368
- uncertainty: number;
369
- baseRate: number;
370
- trigger: "evidence_added" | "evidence_removed" | "contradiction_detected" | "contradiction_resolved" | "agent_assessment" | "worktree_outcome" | "worktree_completed" | "fusion" | "discount" | "deduction" | "backfill_synthetic";
371
- triggeringEvidenceId: string | undefined;
372
- triggeringQuestionId: string | undefined;
373
- triggeringAnswerId: string | undefined;
374
- triggeringContradictionId: string | undefined;
375
- triggeringWorktreeId: string | undefined;
376
- rationale: string;
377
- trustedBypassAccessCheck: boolean;
378
- }>;
379
- };
380
- type ProjectionRegistry = typeof projections;
381
-
382
- type InvariantId = string;
383
- type CheckerKind = "ast" | "manifest" | "runtime";
384
- type InvariantSeverity = "block_publish" | "block_pr" | "warn";
385
- interface CheckContext {
386
- repoRoot: string;
387
- projections: ProjectionRegistry;
388
- }
389
- interface InvariantResult {
390
- status: "passed" | "failed" | "skipped";
391
- evidenceRefs: string[];
392
- reason?: string;
393
- }
394
- interface InvariantRule {
395
- invariant: InvariantId;
396
- description: string;
397
- checker: CheckerKind;
398
- severity: InvariantSeverity;
399
- evaluate: (ctx: CheckContext) => Promise<InvariantResult>;
400
- }
401
- declare const InvariantManifestSchema: z.ZodObject<{
402
- manifestVersion: z.ZodLiteral<"1.0.0">;
403
- rules: z.ZodArray<z.ZodObject<{
404
- invariant: z.ZodString;
405
- description: z.ZodString;
406
- checker: z.ZodEnum<["ast", "manifest", "runtime"]>;
407
- severity: z.ZodEnum<["block_publish", "block_pr", "warn"]>;
408
- }, "strip", z.ZodTypeAny, {
409
- invariant: string;
410
- description: string;
411
- severity: "warn" | "block_publish" | "block_pr";
412
- checker: "runtime" | "ast" | "manifest";
413
- }, {
414
- invariant: string;
415
- description: string;
416
- severity: "warn" | "block_publish" | "block_pr";
417
- checker: "runtime" | "ast" | "manifest";
418
- }>, "many">;
419
- }, "strip", z.ZodTypeAny, {
420
- rules: {
421
- invariant: string;
422
- description: string;
423
- severity: "warn" | "block_publish" | "block_pr";
424
- checker: "runtime" | "ast" | "manifest";
425
- }[];
426
- manifestVersion: "1.0.0";
427
- }, {
428
- rules: {
429
- invariant: string;
430
- description: string;
431
- severity: "warn" | "block_publish" | "block_pr";
432
- checker: "runtime" | "ast" | "manifest";
433
- }[];
434
- manifestVersion: "1.0.0";
435
- }>;
436
- type InvariantManifest = z.infer<typeof InvariantManifestSchema>;
437
-
438
- type TenantClientManifest = {
439
- readonly manifestVersion: "1.0.0";
440
- readonly contractVersion: typeof TENANT_CLIENT_CONTRACT_VERSION;
441
- readonly auth: {
442
- readonly modes: typeof TENANT_CLIENT_AUTH_MODES;
443
- readonly principalTypes: typeof TENANT_CLIENT_PRINCIPAL_TYPES;
444
- readonly requiredContextFields: typeof TENANT_CLIENT_REQUIRED_CONTEXT_FIELDS;
445
- readonly optionalContextFields: typeof TENANT_CLIENT_OPTIONAL_CONTEXT_FIELDS;
446
- };
447
- readonly installToken: {
448
- readonly env: typeof TENANT_CLIENT_INSTALL_TOKEN_ENV;
449
- readonly infisicalPath: typeof TENANT_CLIENT_INSTALL_TOKEN_INFISICAL_PATH;
450
- readonly forbiddenInfisicalPaths: typeof TENANT_CLIENT_FORBIDDEN_INSTALL_TOKEN_INFISICAL_PATHS;
451
- readonly forbiddenSecretEnv: typeof TENANT_CLIENT_FORBIDDEN_SECRET_ENV;
452
- };
453
- readonly packages: {
454
- readonly installable: typeof TENANT_CLIENT_INSTALLABLE_PACKAGES;
455
- readonly directImports: typeof TENANT_CLIENT_PUBLIC_IMPORTS;
456
- readonly componentConfigImports: typeof TENANT_CLIENT_COMPONENT_CONFIG_IMPORTS;
457
- };
458
- readonly sdk: {
459
- readonly requiredNamespaces: typeof TENANT_CLIENT_REQUIRED_SDK_NAMESPACES;
460
- };
461
- readonly capabilities: typeof TENANT_CLIENT_CAPABILITIES;
462
- readonly isolationRules: typeof TENANT_CLIENT_ISOLATION_RULES;
463
- readonly forbiddenImportPatterns: typeof TENANT_CLIENT_FORBIDDEN_IMPORT_PATTERNS;
464
- };
465
- declare const TENANT_CLIENT_MANIFEST: {
466
- readonly manifestVersion: "1.0.0";
467
- readonly contractVersion: "2026-04-27";
468
- readonly auth: {
469
- readonly modes: readonly ["interactive_user", "service_principal", "tenant_api_key", "session_token"];
470
- readonly principalTypes: readonly ["human", "service", "agent"];
471
- readonly requiredContextFields: readonly ["tenantId", "workspaceId", "principalId", "authMode", "scopes"];
472
- readonly optionalContextFields: readonly ["principalType", "roles", "sessionId", "delegationChain"];
473
- };
474
- readonly installToken: {
475
- readonly env: "INSTALL_LUCERN_NPM";
476
- readonly infisicalPath: "tenants/shared";
477
- readonly forbiddenInfisicalPaths: readonly ["/platform/publish"];
478
- readonly forbiddenSecretEnv: readonly ["NPM_TOKEN"];
479
- };
480
- readonly packages: {
481
- readonly installable: readonly [{
482
- readonly packageName: "@lucern/access-control";
483
- readonly role: "sdk_dependency";
484
- readonly directTenantImport: false;
485
- }, {
486
- readonly packageName: "@lucern/agent";
487
- readonly role: "platform_runtime";
488
- readonly directTenantImport: false;
489
- }, {
490
- readonly packageName: "@lucern/auth";
491
- readonly role: "sdk_dependency";
492
- readonly directTenantImport: false;
493
- }, {
494
- readonly packageName: "@lucern/cli";
495
- readonly role: "developer_tool";
496
- readonly directTenantImport: false;
497
- }, {
498
- readonly packageName: "@lucern/client-core";
499
- readonly role: "sdk_dependency";
500
- readonly directTenantImport: false;
501
- }, {
502
- readonly packageName: "@lucern/confidence";
503
- readonly role: "sdk_dependency";
504
- readonly directTenantImport: false;
505
- }, {
506
- readonly packageName: "@lucern/config";
507
- readonly role: "configuration";
508
- readonly directTenantImport: false;
509
- }, {
510
- readonly packageName: "@lucern/contracts";
511
- readonly role: "contract_entrypoint";
512
- readonly directTenantImport: true;
513
- }, {
514
- readonly packageName: "@lucern/control-plane";
515
- readonly role: "platform_runtime";
516
- readonly directTenantImport: false;
517
- }, {
518
- readonly packageName: "@lucern/developer-kit";
519
- readonly role: "developer_tool";
520
- readonly directTenantImport: false;
521
- }, {
522
- readonly packageName: "@lucern/events";
523
- readonly role: "sdk_dependency";
524
- readonly directTenantImport: false;
525
- }, {
526
- readonly packageName: "@lucern/graph-primitives";
527
- readonly role: "sdk_dependency";
528
- readonly directTenantImport: false;
529
- }, {
530
- readonly packageName: "@lucern/identity";
531
- readonly role: "component_runtime";
532
- readonly directTenantImport: false;
533
- }, {
534
- readonly packageName: "@lucern/mcp";
535
- readonly role: "runtime_entrypoint";
536
- readonly directTenantImport: true;
537
- }, {
538
- readonly packageName: "@lucern/pack-host";
539
- readonly role: "platform_runtime";
540
- readonly directTenantImport: false;
541
- }, {
542
- readonly packageName: "@lucern/pack-installer";
543
- readonly role: "developer_tool";
544
- readonly directTenantImport: false;
545
- }, {
546
- readonly packageName: "@lucern/proof-compiler";
547
- readonly role: "developer_tool";
548
- readonly directTenantImport: false;
549
- }, {
550
- readonly packageName: "@lucern/react";
551
- readonly role: "runtime_entrypoint";
552
- readonly directTenantImport: true;
553
- }, {
554
- readonly packageName: "@lucern/reasoning-kernel";
555
- readonly role: "component_runtime";
556
- readonly directTenantImport: false;
557
- }, {
558
- readonly packageName: "@lucern/sdk";
559
- readonly role: "runtime_entrypoint";
560
- readonly directTenantImport: true;
561
- }, {
562
- readonly packageName: "@lucern/server-core";
563
- readonly role: "platform_runtime";
564
- readonly directTenantImport: false;
565
- }, {
566
- readonly packageName: "@lucern/testing";
567
- readonly role: "test_support";
568
- readonly directTenantImport: false;
569
- }, {
570
- readonly packageName: "@lucern/types";
571
- readonly role: "contract_entrypoint";
572
- readonly directTenantImport: true;
573
- }];
574
- readonly directImports: readonly [{
575
- readonly packageName: "@lucern/sdk";
576
- readonly surface: "runtime";
577
- readonly subpaths: "published_exports";
578
- readonly description: "TypeScript SDK runtime and generated operation namespaces.";
579
- }, {
580
- readonly packageName: "@lucern/react";
581
- readonly surface: "runtime";
582
- readonly subpaths: "published_exports";
583
- readonly description: "React bindings for tenant-owned UI applications.";
584
- }, {
585
- readonly packageName: "@lucern/mcp";
586
- readonly surface: "runtime";
587
- readonly subpaths: "published_exports";
588
- readonly description: "MCP client/server entry points and hosted route helpers.";
589
- }, {
590
- readonly packageName: "@lucern/contracts";
591
- readonly surface: "contract";
592
- readonly subpaths: "published_exports";
593
- readonly description: "Published type and manifest contracts.";
594
- }, {
595
- readonly packageName: "@lucern/types";
596
- readonly surface: "contract";
597
- readonly subpaths: "published_exports";
598
- readonly description: "Published type-only helpers for tenant integration code.";
599
- }];
600
- readonly componentConfigImports: readonly [{
601
- readonly packageName: "@lucern/identity";
602
- readonly importPath: "@lucern/identity/convex.config";
603
- readonly surface: "component_config";
604
- readonly description: "Convex component binding config for tenant deployments that install Lucern identity.";
605
- }, {
606
- readonly packageName: "@lucern/reasoning-kernel";
607
- readonly importPath: "@lucern/reasoning-kernel/convex.config";
608
- readonly surface: "component_config";
609
- readonly description: "Convex component binding config for tenant deployments that install the Lucern reasoning kernel.";
610
- }, {
611
- readonly packageName: "@lucern/reasoning-kernel";
612
- readonly importPath: "@lucern/reasoning-kernel/runtime.config";
613
- readonly surface: "component_config";
614
- readonly description: "Runtime config alias for tenant deployments that install the Lucern reasoning kernel.";
615
- }];
616
- };
617
- readonly sdk: {
618
- readonly requiredNamespaces: readonly ["bootstrap", "context", "beliefs", "evidence", "questions", "graph", "worktrees", "topics", "edges", "contradictions", "contracts", "graphAnalysis", "graphRecommendations", "orgGraphSearch", "embeddings", "ontologyLinks", "graphStateClassifier", "tools", "identity", "modelRuntime", "events", "jobs", "telemetry"];
619
- };
620
- readonly capabilities: readonly [{
621
- readonly id: "identity.bootstrap_session";
622
- readonly description: "Start a scoped Lucern session for a tenant principal.";
623
- readonly surfaces: readonly ["@lucern/sdk", "@lucern/mcp"];
624
- readonly requiredContextFields: readonly ["tenantId", "workspaceId", "principalId", "authMode", "scopes"];
625
- }, {
626
- readonly id: "reasoning.context.compile";
627
- readonly description: "Compile tenant and workspace scoped reasoning context.";
628
- readonly surfaces: readonly ["@lucern/sdk", "@lucern/react", "@lucern/mcp"];
629
- readonly requiredContextFields: readonly ["tenantId", "workspaceId", "principalId", "authMode", "scopes"];
630
- }, {
631
- readonly id: "reasoning.graph.read";
632
- readonly description: "Read beliefs, evidence, questions, topics, and lineage.";
633
- readonly surfaces: readonly ["@lucern/sdk", "@lucern/react", "@lucern/mcp"];
634
- readonly requiredContextFields: readonly ["tenantId", "workspaceId", "principalId", "authMode", "scopes"];
635
- }, {
636
- readonly id: "reasoning.graph.write";
637
- readonly description: "Create and update graph objects through authorized APIs.";
638
- readonly surfaces: readonly ["@lucern/sdk", "@lucern/mcp"];
639
- readonly requiredContextFields: readonly ["tenantId", "workspaceId", "principalId", "authMode", "scopes"];
640
- }, {
641
- readonly id: "workflow.worktree_lifecycle";
642
- readonly description: "Create, review, merge, and close scoped worktrees.";
643
- readonly surfaces: readonly ["@lucern/sdk", "@lucern/react", "@lucern/mcp"];
644
- readonly requiredContextFields: readonly ["tenantId", "workspaceId", "principalId", "authMode", "scopes"];
645
- }];
646
- readonly isolationRules: readonly [{
647
- readonly id: "tenant_workspace_scope_required";
648
- readonly description: "Runtime operations must resolve both tenantId and workspaceId before reaching Lucern reasoning state.";
649
- }, {
650
- readonly id: "principal_audit_required";
651
- readonly description: "Runtime operations must carry principalId, authMode, and scopes for audit attribution.";
652
- }, {
653
- readonly id: "no_private_lucern_imports";
654
- readonly description: "Tenant code must not import Lucern source, Convex internals, generated adapters, or unpublished package internals.";
655
- }];
656
- readonly forbiddenImportPatterns: readonly [{
657
- readonly id: "deep_src_import";
658
- readonly pattern: "^@lucern/[^/]+/src(?:/|$)";
659
- readonly description: "Published packages must not be bypassed through src paths.";
660
- }, {
661
- readonly id: "deep_dist_import";
662
- readonly pattern: "^@lucern/[^/]+/dist(?:/|$)";
663
- readonly description: "Published package exports must be used instead of dist file paths.";
664
- }, {
665
- readonly id: "generated_adapter_import";
666
- readonly pattern: "^@lucern/[^/]+/(?:adapters/)?_generated(?:/|$)";
667
- readonly description: "Generated Lucern adapters are internal deployment artifacts.";
668
- }, {
669
- readonly id: "private_runtime_import";
670
- readonly pattern: "^@lucern/[^/]+/(?:internal|private)(?:/|$)";
671
- readonly description: "Internal and private package subpaths are not public SDK API.";
672
- }, {
673
- readonly id: "workspace_source_import";
674
- readonly pattern: "^(?:packages|modules|services|lucern|apps)/(?:.+/)?src(?:/|$)";
675
- readonly description: "Tenant clients must not import source files from the Lucern monorepo.";
676
- }, {
677
- readonly id: "root_alias_lucern_import";
678
- readonly pattern: "^@/(?:lucern|packages|modules|services|apps)(?:/|$)";
679
- readonly description: "Tenant clients must not depend on Lucern repo-local path aliases.";
680
- }, {
681
- readonly id: "relative_lucern_source_import";
682
- readonly pattern: "^\\.\\.?/(?:.+/)?(?:packages|modules|services|lucern|apps)(?:/|$)";
683
- readonly description: "Tenant clients must not reach back into Lucern source through relative paths.";
684
- }, {
685
- readonly id: "monorepo_path_import";
686
- readonly pattern: "lucern-repo";
687
- readonly description: "Absolute imports that name the Lucern repository are not portable tenant code.";
688
- }];
689
- };
690
-
691
- export { type CheckContext, type CheckerKind, type EdgePolicyEntry, EdgePolicyEntrySchema, type EdgePolicyManifest, EdgePolicyManifestSchema, type EdgePolicyViolation, type EpistemicNodeType, EpistemicNodeTypeSchema, type GraphRef, GraphRefSchema, type InvariantId, type InvariantManifest, InvariantManifestSchema, type InvariantResult, type InvariantRule, type InvariantSeverity, type ProjectionDef, type ProjectionRegistry, TENANT_CLIENT_AUTH_MODES, TENANT_CLIENT_CAPABILITIES, TENANT_CLIENT_COMPONENT_CONFIG_IMPORTS, TENANT_CLIENT_CONTRACT_VERSION, TENANT_CLIENT_FORBIDDEN_IMPORT_PATTERNS, TENANT_CLIENT_FORBIDDEN_INSTALL_TOKEN_INFISICAL_PATHS, TENANT_CLIENT_FORBIDDEN_SECRET_ENV, TENANT_CLIENT_INSTALLABLE_PACKAGES, TENANT_CLIENT_INSTALL_TOKEN_ENV, TENANT_CLIENT_INSTALL_TOKEN_INFISICAL_PATH, TENANT_CLIENT_ISOLATION_RULES, TENANT_CLIENT_MANIFEST, TENANT_CLIENT_OPTIONAL_CONTEXT_FIELDS, TENANT_CLIENT_PRINCIPAL_TYPES, TENANT_CLIENT_PUBLIC_IMPORTS, TENANT_CLIENT_REQUIRED_CONTEXT_FIELDS, TENANT_CLIENT_REQUIRED_SDK_NAMESPACES, type TenantClientManifest, assertEdgePolicyAllowed, createEvidenceProjection, defineProjection, edgePolicyManifest, findEdgePolicy, listBeliefsProjection, listTasksProjection, modulateConfidenceProjection, projections };