@lucern/contracts 0.3.0-alpha.2 → 0.3.0-alpha.4

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 (127) hide show
  1. package/dist/component-boundary.contract.d.ts +14 -0
  2. package/dist/component-boundary.contract.js +155 -0
  3. package/dist/component-boundary.contract.js.map +1 -0
  4. package/dist/component-host-boundary.contract.d.ts +41 -0
  5. package/dist/component-host-boundary.contract.js +54 -0
  6. package/dist/component-host-boundary.contract.js.map +1 -0
  7. package/dist/function-registry/beliefs.d.ts +41 -41
  8. package/dist/function-registry/beliefs.js +202 -8
  9. package/dist/function-registry/beliefs.js.map +1 -1
  10. package/dist/function-registry/coding.js +187 -8
  11. package/dist/function-registry/coding.js.map +1 -1
  12. package/dist/function-registry/context.d.ts +13 -13
  13. package/dist/function-registry/context.js +187 -9
  14. package/dist/function-registry/context.js.map +1 -1
  15. package/dist/function-registry/contracts.js +158 -5
  16. package/dist/function-registry/contracts.js.map +1 -1
  17. package/dist/function-registry/coordination.js +158 -5
  18. package/dist/function-registry/coordination.js.map +1 -1
  19. package/dist/function-registry/edges.js +169 -6
  20. package/dist/function-registry/edges.js.map +1 -1
  21. package/dist/function-registry/evidence.d.ts +33 -33
  22. package/dist/function-registry/evidence.js +202 -9
  23. package/dist/function-registry/evidence.js.map +1 -1
  24. package/dist/function-registry/graph.d.ts +53 -53
  25. package/dist/function-registry/graph.js +217 -12
  26. package/dist/function-registry/graph.js.map +1 -1
  27. package/dist/function-registry/helpers.d.ts +1 -1
  28. package/dist/function-registry/helpers.js +158 -5
  29. package/dist/function-registry/helpers.js.map +1 -1
  30. package/dist/function-registry/identity.js +158 -5
  31. package/dist/function-registry/identity.js.map +1 -1
  32. package/dist/function-registry/index.d.ts +1 -1
  33. package/dist/function-registry/index.js +158 -5
  34. package/dist/function-registry/index.js.map +1 -1
  35. package/dist/function-registry/judgments.d.ts +9 -9
  36. package/dist/function-registry/judgments.js +170 -8
  37. package/dist/function-registry/judgments.js.map +1 -1
  38. package/dist/function-registry/legacy.js +158 -5
  39. package/dist/function-registry/legacy.js.map +1 -1
  40. package/dist/function-registry/lenses.d.ts +17 -17
  41. package/dist/function-registry/lenses.js +181 -8
  42. package/dist/function-registry/lenses.js.map +1 -1
  43. package/dist/function-registry/manifest.d.ts +3 -3
  44. package/dist/function-registry/manifest.js +1 -1
  45. package/dist/function-registry/manifest.js.map +1 -1
  46. package/dist/function-registry/ontologies.d.ts +45 -45
  47. package/dist/function-registry/ontologies.js +176 -11
  48. package/dist/function-registry/ontologies.js.map +1 -1
  49. package/dist/function-registry/pipeline.d.ts +13 -13
  50. package/dist/function-registry/pipeline.js +167 -8
  51. package/dist/function-registry/pipeline.js.map +1 -1
  52. package/dist/function-registry/questions.d.ts +49 -49
  53. package/dist/function-registry/questions.js +255 -13
  54. package/dist/function-registry/questions.js.map +1 -1
  55. package/dist/function-registry/tasks.js +158 -5
  56. package/dist/function-registry/tasks.js.map +1 -1
  57. package/dist/function-registry/topics.d.ts +21 -21
  58. package/dist/function-registry/topics.js +172 -8
  59. package/dist/function-registry/topics.js.map +1 -1
  60. package/dist/function-registry/types.d.ts +1 -1
  61. package/dist/function-registry/worktrees.d.ts +80 -41
  62. package/dist/function-registry/worktrees.js +292 -17
  63. package/dist/function-registry/worktrees.js.map +1 -1
  64. package/dist/function-registry-input-audit.d.ts +13 -0
  65. package/dist/function-registry-input-audit.js +164 -0
  66. package/dist/function-registry-input-audit.js.map +1 -0
  67. package/dist/gateway.contract.d.ts +2 -0
  68. package/dist/gateway.contract.js.map +1 -1
  69. package/dist/generated/convexSchemas.js +2 -1
  70. package/dist/generated/convexSchemas.js.map +1 -1
  71. package/dist/generated/schema-manifest.json +42 -3
  72. package/dist/generated/tableOwnership.d.ts +2 -1
  73. package/dist/generated/tableOwnership.js +2 -0
  74. package/dist/generated/tableOwnership.js.map +1 -1
  75. package/dist/generated/tier-expectations.json +4 -2
  76. package/dist/index.d.ts +445 -35
  77. package/dist/index.js +1987 -17
  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 +192 -0
  81. package/dist/infisical-runtime.contract.js.map +1 -0
  82. package/dist/mcp-gateway-boundary.contract.d.ts +181 -0
  83. package/dist/mcp-gateway-boundary.contract.js +43 -0
  84. package/dist/mcp-gateway-boundary.contract.js.map +1 -0
  85. package/dist/schemas/component-table-manifest.d.ts +2 -2
  86. package/dist/schemas/index.js +38 -1
  87. package/dist/schemas/index.js.map +1 -1
  88. package/dist/schemas/manifest.d.ts +1050 -910
  89. package/dist/schemas/manifest.js +38 -1
  90. package/dist/schemas/manifest.js.map +1 -1
  91. package/dist/schemas/sl-opinion.d.ts +4 -4
  92. package/dist/schemas/tables/identity/platform.d.ts +10 -10
  93. package/dist/schemas/tables/kernel/epistemic.d.ts +6 -6
  94. package/dist/schemas/tables/kernel/infra.d.ts +4 -4
  95. package/dist/schemas/tables/kernel/intelligence.d.ts +10 -10
  96. package/dist/schemas/tables/kernel/lens.d.ts +4 -4
  97. package/dist/schemas/tables/kernel/platform.d.ts +12 -12
  98. package/dist/schemas/tables/kernel/spine.d.ts +2 -2
  99. package/dist/schemas/tables/kernel/task.d.ts +42 -42
  100. package/dist/schemas/tables/kernel/worktree.d.ts +62 -62
  101. package/dist/schemas/tables/mc/identity.d.ts +26 -3
  102. package/dist/schemas/tables/mc/identity.js +35 -1
  103. package/dist/schemas/tables/mc/identity.js.map +1 -1
  104. package/dist/schemas/tables/mc/pack.d.ts +20 -20
  105. package/dist/schemas/tables/mc/registry.d.ts +4 -4
  106. package/dist/schemas/tables/mc/workspace.d.ts +9 -3
  107. package/dist/schemas/tables/mc/workspace.js +3 -1
  108. package/dist/schemas/tables/mc/workspace.js.map +1 -1
  109. package/dist/sdk-methods.contract.d.ts +1 -1
  110. package/dist/{sdk-tools.contract-S4ia0TTo.d.ts → sdk-tools.contract-CD-N1Jf7.d.ts} +1 -1
  111. package/dist/sdk-tools.contract.d.ts +2 -2
  112. package/dist/sdk-tools.contract.js +157 -4
  113. package/dist/sdk-tools.contract.js.map +1 -1
  114. package/dist/tenant-bootstrap-seed.contract.d.ts +1097 -0
  115. package/dist/tenant-bootstrap-seed.contract.js +651 -0
  116. package/dist/tenant-bootstrap-seed.contract.js.map +1 -0
  117. package/dist/tenant-bootstrap-seed.defaults.d.ts +16 -0
  118. package/dist/tenant-bootstrap-seed.defaults.js +303 -0
  119. package/dist/tenant-bootstrap-seed.defaults.js.map +1 -0
  120. package/dist/tenant-client.contract.d.ts +266 -0
  121. package/dist/tenant-client.contract.js +404 -0
  122. package/dist/tenant-client.contract.js.map +1 -0
  123. package/dist/{tool-contracts-C92-9ueT.d.ts → tool-contracts-BcKz-VGj.d.ts} +4 -2
  124. package/dist/tool-contracts.d.ts +1 -1
  125. package/dist/tool-contracts.js +158 -5
  126. package/dist/tool-contracts.js.map +1 -1
  127. package/package.json +1 -1
@@ -22,7 +22,7 @@ export { codingContracts } from './coding.js';
22
22
  export { legacyContracts } from './legacy.js';
23
23
  import 'zod';
24
24
  import '../defineFunction-DO97DKs4.js';
25
- import '../tool-contracts-C92-9ueT.js';
25
+ import '../tool-contracts-BcKz-VGj.js';
26
26
 
27
27
  declare const ALL_FUNCTION_CONTRACTS: readonly FunctionContract[];
28
28
  declare const FUNCTION_SURFACE_CONTRACTS: readonly FunctionContract[];
@@ -458,6 +458,14 @@ var ADD_WORKTREE = {
458
458
  description: "Check out a branch into an active worktree for investigation. Like `git worktree add <branch>` \u2014 creates independent working state on a thematic branch. Beliefs committed within the worktree can be freely amended (draft code on a feature branch). When investigation is complete, `merge` integrates findings into main.",
459
459
  parameters: {
460
460
  title: { type: "string", description: "Worktree name/objective" },
461
+ name: {
462
+ type: "string",
463
+ description: "Optional storage-name alias for callers that already use backend naming"
464
+ },
465
+ projectId: {
466
+ type: "string",
467
+ description: "Legacy topicId alias"
468
+ },
461
469
  topicId: { type: "string", description: "Optional topic scope hint" },
462
470
  branchId: {
463
471
  type: "string",
@@ -471,14 +479,87 @@ var ADD_WORKTREE = {
471
479
  type: "string",
472
480
  description: "The testable claim this worktree investigates"
473
481
  },
482
+ rationale: {
483
+ type: "string",
484
+ description: "Why this worktree exists and why it belongs in the campaign"
485
+ },
486
+ worktreeType: {
487
+ type: "string",
488
+ description: "Schema-enum worktree type used by the kernel lifecycle and retrieval layers"
489
+ },
490
+ gate: {
491
+ type: "string",
492
+ description: "Exit gate name for this worktree"
493
+ },
494
+ startDate: {
495
+ type: "number",
496
+ description: "Planned start timestamp in milliseconds since epoch"
497
+ },
498
+ endDate: {
499
+ type: "number",
500
+ description: "Planned end timestamp in milliseconds since epoch"
501
+ },
502
+ durationWeeks: {
503
+ type: "number",
504
+ description: "Planned duration in weeks"
505
+ },
506
+ confidenceImpact: {
507
+ type: "string",
508
+ description: "Expected confidence impact if the worktree succeeds",
509
+ enum: ["high", "medium", "low"]
510
+ },
511
+ beliefFocus: {
512
+ type: "string",
513
+ description: "Natural-language focus spanning the target belief neighborhood"
514
+ },
474
515
  beliefIds: {
475
516
  type: "array",
476
- description: "Beliefs to test in this worktree"
517
+ description: "Legacy alias for targetBeliefIds"
518
+ },
519
+ beliefs: {
520
+ type: "array",
521
+ description: "Legacy alias for targetBeliefIds"
522
+ },
523
+ targetBeliefIds: {
524
+ type: "array",
525
+ description: "Belief node IDs this worktree is expected to test or update"
526
+ },
527
+ targetQuestionIds: {
528
+ type: "array",
529
+ description: "Question node IDs this worktree is expected to answer"
530
+ },
531
+ keyQuestions: {
532
+ type: "array",
533
+ description: "Inline key question objects with question, optional status, answer, answerConfidence, and linkedQuestionId"
534
+ },
535
+ evidenceSignals: {
536
+ type: "array",
537
+ description: "Evidence signal objects with signal, optional collected state, progress, and notes"
538
+ },
539
+ decisionGate: {
540
+ type: "object",
541
+ description: "Decision gate object with goCriteria, noGoSignals, optional verdict, rationale, decidedAt, and decidedBy"
542
+ },
543
+ goCriteria: {
544
+ type: "array",
545
+ description: "Shorthand go criteria used to build decisionGate"
546
+ },
547
+ noGoSignals: {
548
+ type: "array",
549
+ description: "Shorthand no-go signals used to build decisionGate"
550
+ },
551
+ proofArtifacts: {
552
+ type: "array",
553
+ description: "Expected proof artifacts required to close the worktree"
477
554
  },
478
555
  autoShape: {
479
556
  type: "boolean",
480
557
  description: "Whether to invoke inquiry auto-shaping during worktree creation"
481
558
  },
559
+ autoFixPolicy: {
560
+ type: "object",
561
+ description: "Policy for permitted automatic remediation inside the worktree"
562
+ },
482
563
  domainPackId: {
483
564
  type: "string",
484
565
  description: "Optional domain pack whose shaping hooks should influence generated questions and tasks"
@@ -507,9 +588,17 @@ var ADD_WORKTREE = {
507
588
  type: "array",
508
589
  description: "Worktree IDs blocked by this worktree"
509
590
  },
510
- gate: {
591
+ staffingHint: {
511
592
  type: "string",
512
- description: "Exit gate name for this worktree"
593
+ description: "Suggested staffing or agent allocation note"
594
+ },
595
+ lensId: {
596
+ type: "string",
597
+ description: "Lens that scopes this worktree when applicable"
598
+ },
599
+ lastReconciledAt: {
600
+ type: "number",
601
+ description: "Timestamp when worktree metadata was last reconciled"
513
602
  }
514
603
  },
515
604
  required: ["title", "topicId"],
@@ -539,7 +628,7 @@ var MERGE = {
539
628
  worktreeId: { type: "string", description: "The worktree to merge" },
540
629
  outcomes: {
541
630
  type: "array",
542
- description: "Scoring outcomes for each belief: { beliefId, confidence, rationale }"
631
+ description: "Merge outcomes as key-finding strings, or scoring outcomes for beliefs: { beliefId, confidence, rationale }"
543
632
  },
544
633
  summary: { type: "string", description: "Overall findings summary" }
545
634
  },
@@ -3558,6 +3647,69 @@ var GENERATE_SESSION_HANDOFF = {
3558
3647
  tier: "showcase",
3559
3648
  internal: true
3560
3649
  };
3650
+ var BEGIN_BUILD_SESSION = {
3651
+ name: "begin_build_session",
3652
+ description: "Bootstrap a coding build session for a Lucern worktree. Like `git worktree add` plus `git status` \u2014 returns the compact context packet an agent needs before editing.",
3653
+ parameters: {
3654
+ worktreeId: {
3655
+ type: "string",
3656
+ description: "The Lucern worktree ID to bootstrap."
3657
+ },
3658
+ branch: {
3659
+ type: "string",
3660
+ description: "Optional git branch name. Auto-generated from the worktree name when omitted."
3661
+ },
3662
+ branchBase: {
3663
+ type: "string",
3664
+ description: 'Base branch for the feature branch. Default: "staging".'
3665
+ },
3666
+ prBase: {
3667
+ type: "string",
3668
+ description: 'Target branch for the PR. Default: "staging".'
3669
+ },
3670
+ sessionMode: {
3671
+ type: "string",
3672
+ description: 'Session mode: "async" for Codex/headless or "interactive" for live sessions.',
3673
+ enum: ["async", "interactive"]
3674
+ },
3675
+ activateIfPlanning: {
3676
+ type: "boolean",
3677
+ description: "When true, automatically activate a planning worktree during bootstrap."
3678
+ }
3679
+ },
3680
+ required: ["worktreeId"],
3681
+ response: {
3682
+ description: "A compact build-session packet with worktree metadata, graph anchors, questions, dependencies, and git defaults.",
3683
+ fields: {
3684
+ topicId: "string \u2014 canonical topic scope",
3685
+ topicName: "string \u2014 human-readable topic name",
3686
+ worktreeId: "string \u2014 worktree ID",
3687
+ worktreeName: "string \u2014 human-readable worktree name",
3688
+ branch: "string \u2014 git branch name",
3689
+ branchBase: "string \u2014 base branch",
3690
+ prBase: "string \u2014 PR target branch",
3691
+ campaign: "number | null \u2014 top-level pipeline campaign",
3692
+ lane: "string \u2014 campaign lane",
3693
+ gate: "string \u2014 exit gate",
3694
+ hypothesis: "string \u2014 worktree hypothesis",
3695
+ focus: "string \u2014 session focus",
3696
+ status: "string \u2014 worktree status after optional activation",
3697
+ sessionMode: "string \u2014 async | interactive",
3698
+ targetBeliefIds: "array \u2014 scoped belief IDs",
3699
+ targetQuestionIds: "array \u2014 scoped question IDs",
3700
+ topBeliefs: "array \u2014 highest-confidence scoped beliefs",
3701
+ openQuestions: "array \u2014 open scoped questions",
3702
+ resolvedDecisions: "array \u2014 answered questions summarized for the session",
3703
+ dependencies: "array \u2014 upstream worktrees",
3704
+ unblocks: "array \u2014 downstream worktrees",
3705
+ mergeOrderNotes: "string \u2014 merge ordering advisory"
3706
+ }
3707
+ },
3708
+ ownerModule: "bootstrap",
3709
+ ontologyPrimitive: "worktree",
3710
+ tier: "showcase",
3711
+ internal: true
3712
+ };
3561
3713
  var MCP_TOOL_CONTRACTS = {
3562
3714
  // Belief lifecycle (commit, amend, fork, archive)
3563
3715
  create_belief: CREATE_BELIEF,
@@ -3651,6 +3803,7 @@ var MCP_TOOL_CONTRACTS = {
3651
3803
  get_agent_inbox: GET_AGENT_INBOX,
3652
3804
  claim_files: CLAIM_FILES,
3653
3805
  generate_session_handoff: GENERATE_SESSION_HANDOFF,
3806
+ begin_build_session: BEGIN_BUILD_SESSION,
3654
3807
  // Policy / ACL (workhorse)
3655
3808
  check_permission: CHECK_PERMISSION,
3656
3809
  filter_by_permission: FILTER_BY_PERMISSION,
@@ -3877,6 +4030,7 @@ var PLATFORM_INTERNAL_OPERATION_NAMES = [
3877
4030
  "get_change_history",
3878
4031
  "get_failure_log",
3879
4032
  "record_attempt",
4033
+ "begin_build_session",
3880
4034
  "push",
3881
4035
  "open_pull_request",
3882
4036
  "record_judgment",
@@ -3931,7 +4085,6 @@ var SDK_ONLY_OPERATION_NAMES = [
3931
4085
  "find_semantic_orphans"
3932
4086
  ];
3933
4087
  var MCP_ONLY_INTERNAL_OPERATION_NAMES = [
3934
- "begin_build_session",
3935
4088
  "evaluate_engineering_contract",
3936
4089
  "evaluate_research_contract"
3937
4090
  ];