@lucern/contracts 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -1
- package/dist/dsl.d.ts +75 -4
- package/dist/dsl.values-rhsroqi0.d.ts +21 -0
- package/dist/dsl.values.d.ts +5 -0
- package/dist/dsl.values.js +675 -0
- package/dist/dsl.values.js.map +1 -0
- package/dist/function-registry/beliefs.d.ts +1 -17
- package/dist/function-registry/beliefs.js +155 -117
- package/dist/function-registry/beliefs.js.map +1 -1
- package/dist/function-registry/coding.d.ts +1 -17
- package/dist/function-registry/coding.js +155 -117
- package/dist/function-registry/coding.js.map +1 -1
- package/dist/function-registry/context.d.ts +1 -17
- package/dist/function-registry/context.js +155 -117
- package/dist/function-registry/context.js.map +1 -1
- package/dist/function-registry/contracts.d.ts +1 -17
- package/dist/function-registry/contracts.js +155 -117
- package/dist/function-registry/contracts.js.map +1 -1
- package/dist/function-registry/coordination.d.ts +1 -17
- package/dist/function-registry/coordination.js +155 -117
- package/dist/function-registry/coordination.js.map +1 -1
- package/dist/function-registry/edges.d.ts +1 -17
- package/dist/function-registry/edges.js +155 -117
- package/dist/function-registry/edges.js.map +1 -1
- package/dist/function-registry/evidence.d.ts +1 -17
- package/dist/function-registry/evidence.js +155 -117
- package/dist/function-registry/evidence.js.map +1 -1
- package/dist/function-registry/graph.d.ts +1 -17
- package/dist/function-registry/graph.js +155 -117
- package/dist/function-registry/graph.js.map +1 -1
- package/dist/function-registry/helpers.d.ts +1 -1
- package/dist/function-registry/helpers.js +155 -117
- package/dist/function-registry/helpers.js.map +1 -1
- package/dist/function-registry/identity.d.ts +1 -17
- package/dist/function-registry/identity.js +155 -117
- package/dist/function-registry/identity.js.map +1 -1
- package/dist/function-registry/index.d.ts +1 -1
- package/dist/function-registry/index.js +158 -118
- package/dist/function-registry/index.js.map +1 -1
- package/dist/function-registry/judgments.d.ts +1 -17
- package/dist/function-registry/judgments.js +155 -117
- package/dist/function-registry/judgments.js.map +1 -1
- package/dist/function-registry/legacy.d.ts +1 -17
- package/dist/function-registry/legacy.js +155 -117
- package/dist/function-registry/legacy.js.map +1 -1
- package/dist/function-registry/lenses.d.ts +1 -17
- package/dist/function-registry/lenses.js +155 -117
- package/dist/function-registry/lenses.js.map +1 -1
- package/dist/function-registry/manifest.d.ts +3 -3
- package/dist/function-registry/manifest.js +1 -0
- package/dist/function-registry/manifest.js.map +1 -1
- package/dist/function-registry/nodes.d.ts +1 -17
- package/dist/function-registry/nodes.js +155 -117
- package/dist/function-registry/nodes.js.map +1 -1
- package/dist/function-registry/ontologies.d.ts +1 -17
- package/dist/function-registry/ontologies.js +155 -117
- package/dist/function-registry/ontologies.js.map +1 -1
- package/dist/function-registry/pipeline.d.ts +1 -17
- package/dist/function-registry/pipeline.js +155 -117
- package/dist/function-registry/pipeline.js.map +1 -1
- package/dist/function-registry/questions.d.ts +1 -17
- package/dist/function-registry/questions.js +155 -117
- package/dist/function-registry/questions.js.map +1 -1
- package/dist/function-registry/tasks.d.ts +1 -17
- package/dist/function-registry/tasks.js +155 -117
- package/dist/function-registry/tasks.js.map +1 -1
- package/dist/function-registry/topics.d.ts +1 -17
- package/dist/function-registry/topics.js +155 -117
- package/dist/function-registry/topics.js.map +1 -1
- package/dist/function-registry/types.d.ts +2 -2
- package/dist/function-registry/worktrees.d.ts +41 -17
- package/dist/function-registry/worktrees.js +174 -117
- package/dist/function-registry/worktrees.js.map +1 -1
- package/dist/generated/lucernWebPublicEnv.js.map +1 -1
- package/dist/generated/lucernWebServerEnv.js.map +1 -1
- package/dist/{idOf-DR8tkhQS.d.ts → idOf-BmkVDhD8.d.ts} +1 -1
- package/dist/index.d.ts +47 -8
- package/dist/index.js +45072 -45005
- package/dist/index.js.map +1 -1
- package/dist/infisical-runtime.base.d.ts +444 -0
- package/dist/infisical-runtime.base.js +640 -0
- package/dist/infisical-runtime.base.js.map +1 -0
- package/dist/infisical-runtime.contract.d.ts +9 -440
- package/dist/infisical-runtime.contract.js +14 -1
- package/dist/infisical-runtime.contract.js.map +1 -1
- package/dist/infisical-runtime.platform-ops-secrets.d.ts +743 -0
- package/dist/infisical-runtime.platform-ops-secrets.js +962 -0
- package/dist/infisical-runtime.platform-ops-secrets.js.map +1 -0
- package/dist/infisical-runtime.platform-secrets.d.ts +598 -0
- package/dist/infisical-runtime.platform-secrets.js +726 -0
- package/dist/infisical-runtime.platform-secrets.js.map +1 -0
- package/dist/infisical-runtime.tenant-secrets.d.ts +486 -0
- package/dist/infisical-runtime.tenant-secrets.js +1131 -0
- package/dist/infisical-runtime.tenant-secrets.js.map +1 -0
- package/dist/manifests/edge-policy-manifest.d.ts +1 -1
- package/dist/manifests/infisical-runtime-manifest.d.ts +1 -1
- package/dist/manifests/infisical-runtime-manifest.js +14 -1
- package/dist/manifests/infisical-runtime-manifest.js.map +1 -1
- package/dist/manifests/tenant-client-manifest.d.ts +5 -1
- package/dist/manifests/tenant-client-manifest.js +5 -0
- package/dist/manifests/tenant-client-manifest.js.map +1 -1
- package/dist/proof-attestation.json +1 -1
- package/dist/schemas/index.d.ts +1 -1
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/manifest.d.ts +61 -61
- package/dist/schemas/manifest.js.map +1 -1
- package/dist/schemas/tables/kernel/config.js.map +1 -1
- package/dist/schemas/tables/kernel/coordination.js.map +1 -1
- package/dist/schemas/tables/kernel/decision.d.ts +1 -1
- package/dist/schemas/tables/kernel/decision.js.map +1 -1
- package/dist/schemas/tables/kernel/embedding.d.ts +1 -1
- package/dist/schemas/tables/kernel/embedding.js.map +1 -1
- package/dist/schemas/tables/kernel/epistemic.d.ts +1 -1
- package/dist/schemas/tables/kernel/epistemic.js.map +1 -1
- package/dist/schemas/tables/kernel/idempotency.js.map +1 -1
- package/dist/schemas/tables/kernel/infra.js.map +1 -1
- package/dist/schemas/tables/kernel/intelligence.d.ts +1 -1
- package/dist/schemas/tables/kernel/intelligence.js.map +1 -1
- package/dist/schemas/tables/kernel/lens.d.ts +5 -5
- package/dist/schemas/tables/kernel/lens.js.map +1 -1
- package/dist/schemas/tables/kernel/ontology.d.ts +1 -1
- package/dist/schemas/tables/kernel/ontology.js.map +1 -1
- package/dist/schemas/tables/kernel/platform.js.map +1 -1
- package/dist/schemas/tables/kernel/spine.d.ts +1 -1
- package/dist/schemas/tables/kernel/spine.js.map +1 -1
- package/dist/schemas/tables/kernel/task.d.ts +1 -1
- package/dist/schemas/tables/kernel/task.js.map +1 -1
- package/dist/schemas/tables/kernel/topic.d.ts +1 -1
- package/dist/schemas/tables/kernel/topic.js.map +1 -1
- package/dist/schemas/tables/kernel/workflow.d.ts +1 -1
- package/dist/schemas/tables/kernel/workflow.js.map +1 -1
- package/dist/schemas/tables/kernel/worktree.d.ts +1 -1
- package/dist/schemas/tables/kernel/worktree.js.map +1 -1
- package/dist/schemas/tables/mc/identity.d.ts +1 -1
- package/dist/schemas/tables/mc/methodology.d.ts +1 -1
- package/dist/schemas/tables/mc/pack.d.ts +9 -9
- package/dist/schemas/tables/mc/policy.d.ts +1 -1
- package/dist/schemas/tables/mc/registry.d.ts +1 -1
- package/dist/schemas/tables/mc/runtime.d.ts +1 -1
- package/dist/schemas/tables/mc/tenant.d.ts +1 -1
- package/dist/schemas/tables/mc/workspace.d.ts +1 -1
- package/dist/schemas.values-5J5oIK7z.d.ts +26 -0
- package/dist/schemas.values.d.ts +7 -0
- package/dist/schemas.values.js +5324 -0
- package/dist/schemas.values.js.map +1 -0
- package/dist/sdk-tools.contract.analytics.d.ts +27 -0
- package/dist/sdk-tools.contract.analytics.js +616 -0
- package/dist/sdk-tools.contract.analytics.js.map +1 -0
- package/dist/sdk-tools.contract.d.ts +43 -2
- package/dist/sdk-tools.contract.graph.d.ts +11 -0
- package/dist/sdk-tools.contract.graph.js +156 -0
- package/dist/sdk-tools.contract.graph.js.map +1 -0
- package/dist/sdk-tools.contract.js +4107 -4062
- package/dist/sdk-tools.contract.js.map +1 -1
- package/dist/sdk-tools.contract.registry.d.ts +25 -0
- package/dist/sdk-tools.contract.registry.js +5504 -0
- package/dist/sdk-tools.contract.registry.js.map +1 -0
- package/dist/sdk-tools.contract.types.d.ts +15 -0
- package/dist/sdk-tools.contract.types.js +3 -0
- package/dist/sdk-tools.contract.types.js.map +1 -0
- package/dist/sdk-tools.contract.values-LuBh95zg.d.ts +58 -0
- package/dist/sdk-tools.contract.values.d.ts +7 -0
- package/dist/sdk-tools.contract.values.js +5581 -0
- package/dist/sdk-tools.contract.values.js.map +1 -0
- package/dist/sdk-tools.contract.workflow.d.ts +17 -0
- package/dist/sdk-tools.contract.workflow.js +287 -0
- package/dist/sdk-tools.contract.workflow.js.map +1 -0
- package/dist/tenant-client.contract.d.ts +5 -1
- package/dist/tenant-client.contract.js +5 -0
- package/dist/tenant-client.contract.js.map +1 -1
- package/dist/tool-contracts.d.ts +34 -1
- package/dist/tool-contracts.graph.d.ts +18 -0
- package/dist/tool-contracts.graph.js +378 -0
- package/dist/tool-contracts.graph.js.map +1 -0
- package/dist/tool-contracts.intelligence-evidence.d.ts +15 -0
- package/dist/tool-contracts.intelligence-evidence.js +303 -0
- package/dist/tool-contracts.intelligence-evidence.js.map +1 -0
- package/dist/tool-contracts.js +155 -118
- package/dist/tool-contracts.js.map +1 -1
- package/dist/tool-contracts.lifecycle.d.ts +13 -0
- package/dist/tool-contracts.lifecycle.js +410 -0
- package/dist/tool-contracts.lifecycle.js.map +1 -0
- package/dist/tool-contracts.nodes-lenses.d.ts +17 -0
- package/dist/tool-contracts.nodes-lenses.js +334 -0
- package/dist/tool-contracts.nodes-lenses.js.map +1 -0
- package/dist/tool-contracts.ontology.d.ts +16 -0
- package/dist/tool-contracts.ontology.js +344 -0
- package/dist/tool-contracts.ontology.js.map +1 -0
- package/dist/tool-contracts.pipeline-coordination.d.ts +25 -0
- package/dist/tool-contracts.pipeline-coordination.js +684 -0
- package/dist/tool-contracts.pipeline-coordination.js.map +1 -0
- package/dist/tool-contracts.policy-observation-task-topic.d.ts +25 -0
- package/dist/tool-contracts.policy-observation-task-topic.js +740 -0
- package/dist/tool-contracts.policy-observation-task-topic.js.map +1 -0
- package/dist/tool-contracts.questions-listing.d.ts +27 -0
- package/dist/tool-contracts.questions-listing.js +782 -0
- package/dist/tool-contracts.questions-listing.js.map +1 -0
- package/dist/tool-contracts.types.d.ts +34 -0
- package/dist/tool-contracts.types.js +3 -0
- package/dist/tool-contracts.types.js.map +1 -0
- package/dist/tool-contracts.values-DjctSW7S.d.ts +147 -0
- package/dist/tool-contracts.values.d.ts +11 -0
- package/dist/tool-contracts.values.js +4398 -0
- package/dist/tool-contracts.values.js.map +1 -0
- package/dist/tool-contracts.worktrees.d.ts +8 -0
- package/dist/tool-contracts.worktrees.js +280 -0
- package/dist/tool-contracts.worktrees.js.map +1 -0
- package/package.json +3 -11
- package/dist/dsl-DVPthQGY.d.ts +0 -110
- package/dist/index-CM1Pl_vI.d.ts +0 -28
- package/dist/sdk-tools.contract-CKmSsrZ2.d.ts +0 -146
- package/dist/tool-contracts-C_xvM9q2.d.ts +0 -326
- package/dist/{edge-policy-manifest-Dw5IhT1L.d.ts → edge-policy-manifest-4KOSP4nk.d.ts} +2 -2
|
@@ -1,21 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* MCP Tool Contract Definitions
|
|
5
|
-
*
|
|
6
|
-
* Machine-readable source of truth for all Lucern MCP tool names,
|
|
7
|
-
* descriptions, parameters, and response schemas.
|
|
8
|
-
*
|
|
9
|
-
* CONTRACT SURFACE: These definitions are the external API for AI agents.
|
|
10
|
-
* Renaming a tool or changing its description is a BREAKING CHANGE.
|
|
11
|
-
*
|
|
12
|
-
* Git-native naming rules (enforced by lint):
|
|
13
|
-
* 1. Workflow tools use git verbs directly (add_worktree, merge, push, open_pull_request)
|
|
14
|
-
* 2. Knowledge tools use epistemic verbs (create_belief, fork_belief, modulate_confidence)
|
|
15
|
-
* 3. First sentence of description includes the git analog verb
|
|
16
|
-
* 4. Description includes "Like `git X`" parenthetical
|
|
17
|
-
* 5. Parameter names use domain terms (canonicalText, nodeId, baseRate)
|
|
18
|
-
*/
|
|
19
3
|
type McpToolContract = {
|
|
20
4
|
/** Stable tool name — breaking change to rename */
|
|
21
5
|
name: string;
|
|
@@ -84,7 +68,7 @@ type FunctionConvexTarget = {
|
|
|
84
68
|
outputProjection?: ContractOutputProjection;
|
|
85
69
|
};
|
|
86
70
|
type FunctionGatewayTarget = {
|
|
87
|
-
handler: "identity.whoami" | "beliefs.list" | "evidence.list" | "questions.list" | "tasks.create" | "tasks.list" | "tasks.update" | "tasks.complete";
|
|
71
|
+
handler: "identity.whoami" | "beliefs.list" | "evidence.list" | "questions.list" | "worktrees.get" | "tasks.create" | "tasks.list" | "tasks.update" | "tasks.complete";
|
|
88
72
|
};
|
|
89
73
|
|
|
90
74
|
declare const judgmentsContracts: readonly [{
|
|
@@ -2,30 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
|
|
3
3
|
// src/function-registry/helpers.ts
|
|
4
4
|
|
|
5
|
-
// src/
|
|
6
|
-
var REASONING_METHODS = [
|
|
7
|
-
"deductive",
|
|
8
|
-
"inductive",
|
|
9
|
-
"abductive",
|
|
10
|
-
"analogical",
|
|
11
|
-
"causal",
|
|
12
|
-
"correlational",
|
|
13
|
-
"testimonial",
|
|
14
|
-
"statistical",
|
|
15
|
-
"implicit",
|
|
16
|
-
"pattern_match"
|
|
17
|
-
];
|
|
18
|
-
|
|
19
|
-
// src/lens-workflow.contract.ts
|
|
20
|
-
var LENS_PERSPECTIVE_TYPES = [
|
|
21
|
-
"investigation",
|
|
22
|
-
"monitoring",
|
|
23
|
-
"analysis",
|
|
24
|
-
"comparison",
|
|
25
|
-
"taxonomy"
|
|
26
|
-
];
|
|
27
|
-
|
|
28
|
-
// src/tool-contracts.ts
|
|
5
|
+
// src/tool-contracts.lifecycle.ts
|
|
29
6
|
var CREATE_BELIEF = {
|
|
30
7
|
name: "create_belief",
|
|
31
8
|
description: "Commit a new belief (knowledge unit) to the reasoning graph. Like `git commit` \u2014 creates an atomic, traceable knowledge object with a prior. Creation stores the vacuous opinion `(0, 0, 1, a)`; use modulate_confidence to record the first evidential update.",
|
|
@@ -431,6 +408,8 @@ var FLAG_CONTRADICTION = {
|
|
|
431
408
|
ontologyPrimitive: "belief",
|
|
432
409
|
tier: "showcase"
|
|
433
410
|
};
|
|
411
|
+
|
|
412
|
+
// src/tool-contracts.worktrees.ts
|
|
434
413
|
var ADD_WORKTREE = {
|
|
435
414
|
name: "add_worktree",
|
|
436
415
|
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.",
|
|
@@ -646,6 +625,82 @@ var MERGE = {
|
|
|
646
625
|
ontologyPrimitive: "worktree",
|
|
647
626
|
tier: "showcase"
|
|
648
627
|
};
|
|
628
|
+
var PUSH = {
|
|
629
|
+
name: "push",
|
|
630
|
+
description: "Push scored beliefs from a merged worktree to other contexts. Like `git push` \u2014 makes local findings available on the remote. Only merged beliefs can be pushed. Publication makes findings visible to other projects, teams, or external consumers.",
|
|
631
|
+
parameters: {
|
|
632
|
+
worktreeId: {
|
|
633
|
+
type: "string",
|
|
634
|
+
description: "The merged worktree whose findings to push"
|
|
635
|
+
},
|
|
636
|
+
targetContext: {
|
|
637
|
+
type: "string",
|
|
638
|
+
description: "Where to push (e.g., 'portfolio', 'ic_review', 'external')"
|
|
639
|
+
},
|
|
640
|
+
beliefIds: {
|
|
641
|
+
type: "array",
|
|
642
|
+
description: "Optional subset of beliefs to push (default: all scored)"
|
|
643
|
+
}
|
|
644
|
+
},
|
|
645
|
+
required: ["worktreeId", "targetContext"],
|
|
646
|
+
response: {
|
|
647
|
+
description: "Push result",
|
|
648
|
+
fields: {
|
|
649
|
+
pushedCount: "number",
|
|
650
|
+
targetContext: "string",
|
|
651
|
+
pushedAt: "number"
|
|
652
|
+
}
|
|
653
|
+
},
|
|
654
|
+
ownerModule: "workflow-engine",
|
|
655
|
+
ontologyPrimitive: "worktree",
|
|
656
|
+
tier: "workhorse"
|
|
657
|
+
};
|
|
658
|
+
var OPEN_PULL_REQUEST = {
|
|
659
|
+
name: "open_pull_request",
|
|
660
|
+
description: "Open a pull request for peer review before merging a worktree. Like opening a `git pull request` \u2014 the worktree's findings are ready but await approval before merge. Reviewers can approve, request changes, or block the merge. This is the gate between draft work and scored knowledge.",
|
|
661
|
+
parameters: {
|
|
662
|
+
worktreeId: {
|
|
663
|
+
type: "string",
|
|
664
|
+
description: "The worktree to submit for review"
|
|
665
|
+
},
|
|
666
|
+
reviewers: {
|
|
667
|
+
type: "array",
|
|
668
|
+
description: "User IDs of requested reviewers"
|
|
669
|
+
},
|
|
670
|
+
summary: {
|
|
671
|
+
type: "string",
|
|
672
|
+
description: "Summary of findings and why they're ready for merge"
|
|
673
|
+
}
|
|
674
|
+
},
|
|
675
|
+
required: ["worktreeId", "summary"],
|
|
676
|
+
response: {
|
|
677
|
+
description: "The pull request",
|
|
678
|
+
fields: {
|
|
679
|
+
pullRequestId: "string",
|
|
680
|
+
worktreeId: "string",
|
|
681
|
+
status: "string \u2014 'pending_review'"
|
|
682
|
+
}
|
|
683
|
+
},
|
|
684
|
+
ownerModule: "workflow-engine",
|
|
685
|
+
ontologyPrimitive: "worktree",
|
|
686
|
+
tier: "showcase"
|
|
687
|
+
};
|
|
688
|
+
|
|
689
|
+
// src/types/reasoning-method.ts
|
|
690
|
+
var REASONING_METHODS = [
|
|
691
|
+
"deductive",
|
|
692
|
+
"inductive",
|
|
693
|
+
"abductive",
|
|
694
|
+
"analogical",
|
|
695
|
+
"causal",
|
|
696
|
+
"correlational",
|
|
697
|
+
"testimonial",
|
|
698
|
+
"statistical",
|
|
699
|
+
"implicit",
|
|
700
|
+
"pattern_match"
|
|
701
|
+
];
|
|
702
|
+
|
|
703
|
+
// src/tool-contracts.graph.ts
|
|
649
704
|
var QUERY_LINEAGE = {
|
|
650
705
|
name: "query_lineage",
|
|
651
706
|
description: "Trace a belief's full ancestry \u2014 every fork, score, and confidence modulation. Like `git log --graph`. Returns the complete evolution chain showing how understanding developed over time. Lineage is permanent and can never be erased (Invariant #3).",
|
|
@@ -845,6 +900,39 @@ var FIND_CONTRADICTIONS = {
|
|
|
845
900
|
ontologyPrimitive: "belief",
|
|
846
901
|
tier: "showcase"
|
|
847
902
|
};
|
|
903
|
+
var BISECT_CONFIDENCE = {
|
|
904
|
+
name: "bisect_confidence",
|
|
905
|
+
description: "Find when a belief's confidence diverged from reality. Like `git bisect` \u2014 binary search through the credence history to find the inflection point. Given a belief that is now known to be wrong (or right), traces back through confidence modulations to identify which evidence or event caused the divergence.",
|
|
906
|
+
parameters: {
|
|
907
|
+
nodeId: { type: "string", description: "The belief to bisect" },
|
|
908
|
+
expectedDirection: {
|
|
909
|
+
type: "string",
|
|
910
|
+
description: "Was confidence too high or too low?",
|
|
911
|
+
enum: ["overconfident", "underconfident"]
|
|
912
|
+
},
|
|
913
|
+
timeRange: {
|
|
914
|
+
type: "object",
|
|
915
|
+
description: "Optional time range to search within: { start: number, end: number }"
|
|
916
|
+
}
|
|
917
|
+
},
|
|
918
|
+
required: ["nodeId", "expectedDirection"],
|
|
919
|
+
response: {
|
|
920
|
+
description: "The inflection point in confidence history",
|
|
921
|
+
fields: {
|
|
922
|
+
beliefId: "string \u2014 canonical belief ID",
|
|
923
|
+
expectedDirection: "string \u2014 overconfident | underconfident",
|
|
924
|
+
inflectionEntry: "object \u2014 the confidence modulation where divergence began",
|
|
925
|
+
triggerEvent: "string | null \u2014 what caused the divergence",
|
|
926
|
+
confidenceBefore: "number | null",
|
|
927
|
+
confidenceAfter: "number | null",
|
|
928
|
+
totalEntries: "number",
|
|
929
|
+
inflectionIndex: "number | null"
|
|
930
|
+
}
|
|
931
|
+
},
|
|
932
|
+
ownerModule: "graph-search",
|
|
933
|
+
ontologyPrimitive: "belief",
|
|
934
|
+
tier: "showcase"
|
|
935
|
+
};
|
|
848
936
|
var CREATE_EDGE = {
|
|
849
937
|
name: "create_edge",
|
|
850
938
|
description: "Commit a typed relationship between two nodes in the reasoning graph. Like `git commit` \u2014 an atomic write that declares a dependency between nodes. Accepts any public epistemic edge type between public graph node refs so agents can author the full spine.",
|
|
@@ -972,6 +1060,17 @@ var BATCH_CREATE_EDGES = {
|
|
|
972
1060
|
ontologyPrimitive: "edge",
|
|
973
1061
|
tier: "workhorse"
|
|
974
1062
|
};
|
|
1063
|
+
|
|
1064
|
+
// src/lens-workflow.contract.ts
|
|
1065
|
+
var LENS_PERSPECTIVE_TYPES = [
|
|
1066
|
+
"investigation",
|
|
1067
|
+
"monitoring",
|
|
1068
|
+
"analysis",
|
|
1069
|
+
"comparison",
|
|
1070
|
+
"taxonomy"
|
|
1071
|
+
];
|
|
1072
|
+
|
|
1073
|
+
// src/tool-contracts.nodes-lenses.ts
|
|
975
1074
|
var CREATE_EPISTEMIC_NODE = {
|
|
976
1075
|
name: "create_epistemic_node",
|
|
977
1076
|
description: "Commit a generic epistemic graph node. Like `git commit` \u2014 creates a canonical node in the public spine for topics, beliefs, evidence, questions, answers, sources, and entities.",
|
|
@@ -1292,99 +1391,8 @@ var REMOVE_LENS_FROM_TOPIC = {
|
|
|
1292
1391
|
ontologyPrimitive: "lens",
|
|
1293
1392
|
tier: "workhorse"
|
|
1294
1393
|
};
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
description: "Push scored beliefs from a merged worktree to other contexts. Like `git push` \u2014 makes local findings available on the remote. Only merged beliefs can be pushed. Publication makes findings visible to other projects, teams, or external consumers.",
|
|
1298
|
-
parameters: {
|
|
1299
|
-
worktreeId: {
|
|
1300
|
-
type: "string",
|
|
1301
|
-
description: "The merged worktree whose findings to push"
|
|
1302
|
-
},
|
|
1303
|
-
targetContext: {
|
|
1304
|
-
type: "string",
|
|
1305
|
-
description: "Where to push (e.g., 'portfolio', 'ic_review', 'external')"
|
|
1306
|
-
},
|
|
1307
|
-
beliefIds: {
|
|
1308
|
-
type: "array",
|
|
1309
|
-
description: "Optional subset of beliefs to push (default: all scored)"
|
|
1310
|
-
}
|
|
1311
|
-
},
|
|
1312
|
-
required: ["worktreeId", "targetContext"],
|
|
1313
|
-
response: {
|
|
1314
|
-
description: "Push result",
|
|
1315
|
-
fields: {
|
|
1316
|
-
pushedCount: "number",
|
|
1317
|
-
targetContext: "string",
|
|
1318
|
-
pushedAt: "number"
|
|
1319
|
-
}
|
|
1320
|
-
},
|
|
1321
|
-
ownerModule: "workflow-engine",
|
|
1322
|
-
ontologyPrimitive: "worktree",
|
|
1323
|
-
tier: "workhorse"
|
|
1324
|
-
};
|
|
1325
|
-
var OPEN_PULL_REQUEST = {
|
|
1326
|
-
name: "open_pull_request",
|
|
1327
|
-
description: "Open a pull request for peer review before merging a worktree. Like opening a `git pull request` \u2014 the worktree's findings are ready but await approval before merge. Reviewers can approve, request changes, or block the merge. This is the gate between draft work and scored knowledge.",
|
|
1328
|
-
parameters: {
|
|
1329
|
-
worktreeId: {
|
|
1330
|
-
type: "string",
|
|
1331
|
-
description: "The worktree to submit for review"
|
|
1332
|
-
},
|
|
1333
|
-
reviewers: {
|
|
1334
|
-
type: "array",
|
|
1335
|
-
description: "User IDs of requested reviewers"
|
|
1336
|
-
},
|
|
1337
|
-
summary: {
|
|
1338
|
-
type: "string",
|
|
1339
|
-
description: "Summary of findings and why they're ready for merge"
|
|
1340
|
-
}
|
|
1341
|
-
},
|
|
1342
|
-
required: ["worktreeId", "summary"],
|
|
1343
|
-
response: {
|
|
1344
|
-
description: "The pull request",
|
|
1345
|
-
fields: {
|
|
1346
|
-
pullRequestId: "string",
|
|
1347
|
-
worktreeId: "string",
|
|
1348
|
-
status: "string \u2014 'pending_review'"
|
|
1349
|
-
}
|
|
1350
|
-
},
|
|
1351
|
-
ownerModule: "workflow-engine",
|
|
1352
|
-
ontologyPrimitive: "worktree",
|
|
1353
|
-
tier: "showcase"
|
|
1354
|
-
};
|
|
1355
|
-
var BISECT_CONFIDENCE = {
|
|
1356
|
-
name: "bisect_confidence",
|
|
1357
|
-
description: "Find when a belief's confidence diverged from reality. Like `git bisect` \u2014 binary search through the credence history to find the inflection point. Given a belief that is now known to be wrong (or right), traces back through confidence modulations to identify which evidence or event caused the divergence.",
|
|
1358
|
-
parameters: {
|
|
1359
|
-
nodeId: { type: "string", description: "The belief to bisect" },
|
|
1360
|
-
expectedDirection: {
|
|
1361
|
-
type: "string",
|
|
1362
|
-
description: "Was confidence too high or too low?",
|
|
1363
|
-
enum: ["overconfident", "underconfident"]
|
|
1364
|
-
},
|
|
1365
|
-
timeRange: {
|
|
1366
|
-
type: "object",
|
|
1367
|
-
description: "Optional time range to search within: { start: number, end: number }"
|
|
1368
|
-
}
|
|
1369
|
-
},
|
|
1370
|
-
required: ["nodeId", "expectedDirection"],
|
|
1371
|
-
response: {
|
|
1372
|
-
description: "The inflection point in confidence history",
|
|
1373
|
-
fields: {
|
|
1374
|
-
beliefId: "string \u2014 canonical belief ID",
|
|
1375
|
-
expectedDirection: "string \u2014 overconfident | underconfident",
|
|
1376
|
-
inflectionEntry: "object \u2014 the confidence modulation where divergence began",
|
|
1377
|
-
triggerEvent: "string | null \u2014 what caused the divergence",
|
|
1378
|
-
confidenceBefore: "number | null",
|
|
1379
|
-
confidenceAfter: "number | null",
|
|
1380
|
-
totalEntries: "number",
|
|
1381
|
-
inflectionIndex: "number | null"
|
|
1382
|
-
}
|
|
1383
|
-
},
|
|
1384
|
-
ownerModule: "graph-search",
|
|
1385
|
-
ontologyPrimitive: "belief",
|
|
1386
|
-
tier: "showcase"
|
|
1387
|
-
};
|
|
1394
|
+
|
|
1395
|
+
// src/tool-contracts.intelligence-evidence.ts
|
|
1388
1396
|
var DETECT_CONFIRMATION_BIAS = {
|
|
1389
1397
|
name: "detect_confirmation_bias",
|
|
1390
1398
|
description: "Detect confirmation bias in the evidence graph. Like `git diff --stat` for reasoning \u2014 analyzes the ratio of supporting vs challenging evidence per belief and flags beliefs where the evidence is suspiciously one-sided. Returns risk classification (critical/high/moderate/healthy).",
|
|
@@ -1683,6 +1691,8 @@ var LINK_EVIDENCE_TO_BELIEF = {
|
|
|
1683
1691
|
ontologyPrimitive: "edge",
|
|
1684
1692
|
tier: "workhorse"
|
|
1685
1693
|
};
|
|
1694
|
+
|
|
1695
|
+
// src/tool-contracts.questions-listing.ts
|
|
1686
1696
|
var CREATE_QUESTION = {
|
|
1687
1697
|
name: "create_question",
|
|
1688
1698
|
description: "Commit an investigation question to the reasoning graph. Like `git issue` \u2014 creates a traceable question that drives research and evidence collection. Questions test beliefs and guide worktree investigation.",
|
|
@@ -2141,6 +2151,24 @@ var LIST_ALL_WORKTREES = {
|
|
|
2141
2151
|
ontologyPrimitive: "worktree",
|
|
2142
2152
|
tier: "showcase"
|
|
2143
2153
|
};
|
|
2154
|
+
var GET_WORKTREE = {
|
|
2155
|
+
name: "get_worktree",
|
|
2156
|
+
description: "Get one worktree by ID. Like `git worktree list --porcelain <worktree>` \u2014 inspects one investigation branch without scanning the full pipeline inventory.",
|
|
2157
|
+
parameters: {
|
|
2158
|
+
worktreeId: { type: "string", description: "Canonical worktree ID to retrieve" },
|
|
2159
|
+
id: { type: "string", description: "Legacy alias for worktreeId" }
|
|
2160
|
+
},
|
|
2161
|
+
required: ["worktreeId"],
|
|
2162
|
+
response: {
|
|
2163
|
+
description: "Single worktree record with pipeline metadata",
|
|
2164
|
+
fields: {
|
|
2165
|
+
worktree: "object \u2014 { worktreeId, title, topicId, status, hypothesis, campaign, lane, laneOrderInCampaign, orderInLane, dependsOn, blocks, gate }"
|
|
2166
|
+
}
|
|
2167
|
+
},
|
|
2168
|
+
ownerModule: "workflow-engine",
|
|
2169
|
+
ontologyPrimitive: "worktree",
|
|
2170
|
+
tier: "workhorse"
|
|
2171
|
+
};
|
|
2144
2172
|
var LIST_CAMPAIGNS = {
|
|
2145
2173
|
name: "list_campaigns",
|
|
2146
2174
|
description: "List compact pipeline campaigns with their nested lanes. Use this to see the top-level campaign > lane > worktree shape without pulling the full worktree inventory.",
|
|
@@ -2442,6 +2470,8 @@ var COMPILE_CONTEXT = {
|
|
|
2442
2470
|
ontologyPrimitive: "graph",
|
|
2443
2471
|
tier: "showcase"
|
|
2444
2472
|
};
|
|
2473
|
+
|
|
2474
|
+
// src/tool-contracts.policy-observation-task-topic.ts
|
|
2445
2475
|
var CHECK_PERMISSION = {
|
|
2446
2476
|
name: "check_permission",
|
|
2447
2477
|
description: "Check whether a principal can read or mutate a topic scope. Like `git check-ref-format` for ACLs \u2014 validates whether the requested operation is allowed before execution.",
|
|
@@ -3177,6 +3207,8 @@ var GET_GRAPH_GAPS = {
|
|
|
3177
3207
|
ontologyPrimitive: "graph",
|
|
3178
3208
|
tier: "showcase"
|
|
3179
3209
|
};
|
|
3210
|
+
|
|
3211
|
+
// src/tool-contracts.ontology.ts
|
|
3180
3212
|
var MANAGE_WRITE_POLICY = {
|
|
3181
3213
|
name: "manage_write_policy",
|
|
3182
3214
|
description: "Manage write policies for MCP mutation tools. Like `git config` for write permissions \u2014 sets per-topic or global policies that control which roles can mutate the graph.",
|
|
@@ -3516,6 +3548,8 @@ var RESOLVE_EFFECTIVE_ONTOLOGY = {
|
|
|
3516
3548
|
ontologyPrimitive: "ontology",
|
|
3517
3549
|
tier: "workhorse"
|
|
3518
3550
|
};
|
|
3551
|
+
|
|
3552
|
+
// src/tool-contracts.pipeline-coordination.ts
|
|
3519
3553
|
var RECORD_SCOPE_LEARNING = {
|
|
3520
3554
|
name: "record_scope_learning",
|
|
3521
3555
|
description: "Write a structured learning entry into the epistemic spine. Like `git commit` for scope learnings \u2014 records evidence, can attach to a belief, and can open a follow-up belief/question in one atomic workflow.",
|
|
@@ -4195,6 +4229,8 @@ var BEGIN_BUILD_SESSION = {
|
|
|
4195
4229
|
tier: "showcase",
|
|
4196
4230
|
internal: true
|
|
4197
4231
|
};
|
|
4232
|
+
|
|
4233
|
+
// src/tool-contracts.ts
|
|
4198
4234
|
var MCP_TOOL_CONTRACTS = {
|
|
4199
4235
|
// Belief lifecycle (commit, amend, fork, archive)
|
|
4200
4236
|
create_belief: CREATE_BELIEF,
|
|
@@ -4277,6 +4313,7 @@ var MCP_TOOL_CONTRACTS = {
|
|
|
4277
4313
|
find_missing_questions: FIND_MISSING_QUESTIONS,
|
|
4278
4314
|
// Listing & query (workhorse)
|
|
4279
4315
|
list_beliefs: LIST_BELIEFS,
|
|
4316
|
+
get_worktree: GET_WORKTREE,
|
|
4280
4317
|
list_worktrees: LIST_WORKTREES,
|
|
4281
4318
|
list_all_worktrees: LIST_ALL_WORKTREES,
|
|
4282
4319
|
list_campaigns: LIST_CAMPAIGNS,
|
|
@@ -4480,6 +4517,7 @@ var MCP_WORKFLOW_PLATFORM_OPERATION_NAMES = [
|
|
|
4480
4517
|
"match_entity_type",
|
|
4481
4518
|
"resolve_effective_ontology",
|
|
4482
4519
|
"add_worktree",
|
|
4520
|
+
"get_worktree",
|
|
4483
4521
|
"activate_worktree",
|
|
4484
4522
|
"list_worktrees",
|
|
4485
4523
|
"list_all_worktrees",
|