@lucern/contracts 1.0.12 → 1.0.13
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 -0
- package/dist/function-registry/beliefs.js +48 -11
- package/dist/function-registry/beliefs.js.map +1 -1
- package/dist/function-registry/coding.js +46 -9
- package/dist/function-registry/coding.js.map +1 -1
- package/dist/function-registry/context.js +46 -9
- package/dist/function-registry/context.js.map +1 -1
- package/dist/function-registry/contracts.js +46 -9
- package/dist/function-registry/contracts.js.map +1 -1
- package/dist/function-registry/coordination.js +46 -9
- package/dist/function-registry/coordination.js.map +1 -1
- package/dist/function-registry/edges.js +46 -9
- package/dist/function-registry/edges.js.map +1 -1
- package/dist/function-registry/evidence.js +166 -17
- package/dist/function-registry/evidence.js.map +1 -1
- package/dist/function-registry/graph.js +46 -9
- package/dist/function-registry/graph.js.map +1 -1
- package/dist/function-registry/helpers.js +46 -9
- package/dist/function-registry/helpers.js.map +1 -1
- package/dist/function-registry/identity.js +46 -9
- package/dist/function-registry/identity.js.map +1 -1
- package/dist/function-registry/index.js +46 -9
- package/dist/function-registry/index.js.map +1 -1
- package/dist/function-registry/judgments.js +46 -9
- package/dist/function-registry/judgments.js.map +1 -1
- package/dist/function-registry/legacy.js +46 -9
- package/dist/function-registry/legacy.js.map +1 -1
- package/dist/function-registry/lenses.js +46 -9
- package/dist/function-registry/lenses.js.map +1 -1
- package/dist/function-registry/manifest.d.ts +10 -4
- package/dist/function-registry/manifest.js +13 -1
- package/dist/function-registry/manifest.js.map +1 -1
- package/dist/function-registry/nodes.js +46 -9
- package/dist/function-registry/nodes.js.map +1 -1
- package/dist/function-registry/ontologies.js +46 -9
- package/dist/function-registry/ontologies.js.map +1 -1
- package/dist/function-registry/pipeline.js +46 -9
- package/dist/function-registry/pipeline.js.map +1 -1
- package/dist/function-registry/questions.js +46 -9
- package/dist/function-registry/questions.js.map +1 -1
- package/dist/function-registry/tasks.js +46 -9
- package/dist/function-registry/tasks.js.map +1 -1
- package/dist/function-registry/topics.js +46 -9
- package/dist/function-registry/topics.js.map +1 -1
- package/dist/function-registry/worktrees.js +46 -9
- package/dist/function-registry/worktrees.js.map +1 -1
- package/dist/index.js +111 -11
- package/dist/index.js.map +1 -1
- package/dist/manifests/invariants/index.js +24 -5
- package/dist/manifests/invariants/index.js.map +1 -1
- package/dist/manifests/invariants/inv-1-beliefs-append-only.js +24 -5
- package/dist/manifests/invariants/inv-1-beliefs-append-only.js.map +1 -1
- package/dist/projections/check-convex-args-shape.js +78 -3
- package/dist/projections/check-convex-args-shape.js.map +1 -1
- package/dist/projections/create-evidence.projection.d.ts +168 -0
- package/dist/projections/create-evidence.projection.js +78 -3
- package/dist/projections/create-evidence.projection.js.map +1 -1
- package/dist/projections/index.d.ts +28 -0
- package/dist/projections/index.js +78 -3
- package/dist/projections/index.js.map +1 -1
- package/dist/proof-attestation.json +1 -1
- package/dist/sdk-methods.contract.d.ts +3 -2
- package/dist/sdk-tools.contract.js +33 -8
- package/dist/sdk-tools.contract.js.map +1 -1
- package/dist/sdk-tools.contract.registry.js +33 -8
- package/dist/sdk-tools.contract.registry.js.map +1 -1
- package/dist/sdk-tools.contract.values.js +33 -8
- package/dist/sdk-tools.contract.values.js.map +1 -1
- package/dist/tool-contracts.context-orientation.js +2 -1
- package/dist/tool-contracts.context-orientation.js.map +1 -1
- package/dist/tool-contracts.intelligence-evidence.js +26 -4
- package/dist/tool-contracts.intelligence-evidence.js.map +1 -1
- package/dist/tool-contracts.js +33 -8
- package/dist/tool-contracts.js.map +1 -1
- package/dist/tool-contracts.lifecycle.js +2 -2
- package/dist/tool-contracts.lifecycle.js.map +1 -1
- package/dist/tool-contracts.questions-listing.js +3 -1
- package/dist/tool-contracts.questions-listing.js.map +1 -1
- package/dist/tool-contracts.values.js +33 -8
- package/dist/tool-contracts.values.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SurfaceClass, FunctionSurfaceIntent,
|
|
1
|
+
import { FunctionSurfaceMap, SurfaceClass, FunctionSurfaceIntent, SurfaceExposure } from './types.js';
|
|
2
2
|
import 'zod';
|
|
3
3
|
import '../defineFunction-DO97DKs4.js';
|
|
4
4
|
import '../tool-contracts.types.js';
|
|
@@ -10,7 +10,7 @@ type LucernOperationManifestEntry = {
|
|
|
10
10
|
surfaces: FunctionSurfaceMap;
|
|
11
11
|
rationale: string;
|
|
12
12
|
};
|
|
13
|
-
declare const MCP_CORE_OPERATION_NAMES: readonly ["lucern_orient", "compile_context", "identity_whoami", "resolve_interactive_principal", "check_permission", "filter_by_permission", "create_belief", "get_belief", "list_beliefs", "refine_belief", "
|
|
13
|
+
declare const MCP_CORE_OPERATION_NAMES: readonly ["lucern_orient", "compile_context", "identity_whoami", "resolve_interactive_principal", "check_permission", "filter_by_permission", "create_belief", "get_belief", "list_beliefs", "refine_belief", "fork_belief", "archive_belief", "search_beliefs", "bisect_confidence", "create_evidence", "get_evidence", "list_evidence", "search_evidence", "link_evidence_to_belief", "link_evidence_to_question", "create_question", "get_question", "list_questions", "refine_question", "update_question_status", "archive_question", "create_answer", "get_answer", "find_missing_questions", "get_high_priority_questions", "get_falsification_questions", "create_epistemic_node", "get_epistemic_node", "list_epistemic_nodes", "update_epistemic_node", "archive_epistemic_node", "verify_epistemic_node", "supersede_epistemic_node", "batch_create_epistemic_nodes", "create_topic", "get_topic", "list_topics", "update_topic", "get_topic_tree", "materialize_topic_graph", "get_topic_graph_spine"];
|
|
14
14
|
declare const MCP_ANALYSIS_PLATFORM_OPERATION_NAMES: readonly ["create_edge", "update_edge", "remove_edge", "remove_edges_between", "batch_create_edges", "query_lineage", "traverse_graph", "get_graph_neighborhood", "get_graph_structure_analysis", "list_graph_intelligence_queries", "run_graph_intelligence_query", "list_missing_embeddings", "search_embeddings", "get_embeddings_by_node_ids", "queue_embedding_backfill", "hybrid_discover", "resolve_topic_semantic", "expand_graph_neighborhood", "find_related_nodes", "analyze_graph_impact", "detect_graph_drift", "find_contradictions", "flag_contradiction", "detect_confirmation_bias", "get_topic_coverage", "get_graph_gaps"];
|
|
15
15
|
declare const MCP_ANALYSIS_TENANT_OPERATION_NAMES: readonly ["analyze_topic_density", "discover_entity_connections", "trace_entity_impact"];
|
|
16
16
|
declare const MCP_WORKFLOW_PLATFORM_OPERATION_NAMES: readonly ["list_lenses", "apply_lens_to_topic", "remove_lens_from_topic", "get_ontology", "list_ontologies", "apply_ontology", "match_entity_type", "resolve_effective_ontology", "add_worktree", "get_worktree", "activate_worktree", "list_worktrees", "list_all_worktrees", "list_campaigns", "update_worktree_targets", "update_worktree_metadata", "create_task", "list_tasks", "update_task", "complete_task"];
|
|
@@ -19,7 +19,7 @@ declare const MCP_GOVERNANCE_PLATFORM_OPERATION_NAMES: readonly ["create_lens",
|
|
|
19
19
|
declare const MCP_GOVERNANCE_TENANT_OPERATION_NAMES: readonly ["create_epistemic_contract", "evaluate_contract", "get_contract_status", "publish_ontology_version", "deprecate_ontology_version", "manage_write_policy"];
|
|
20
20
|
declare const MCP_AUTOMATION_OPERATION_NAMES: readonly ["apply_auto_branching", "trigger_belief_review"];
|
|
21
21
|
declare const DUPLICATE_OPERATION_NAMES: readonly ["link_evidence"];
|
|
22
|
-
declare const PLATFORM_PUBLIC_OPERATION_NAMES: readonly ["lucern_orient", "compile_context", "identity_whoami", "resolve_interactive_principal", "check_permission", "filter_by_permission", "create_belief", "get_belief", "list_beliefs", "refine_belief", "
|
|
22
|
+
declare const PLATFORM_PUBLIC_OPERATION_NAMES: readonly ["lucern_orient", "compile_context", "identity_whoami", "resolve_interactive_principal", "check_permission", "filter_by_permission", "create_belief", "get_belief", "list_beliefs", "refine_belief", "fork_belief", "archive_belief", "search_beliefs", "bisect_confidence", "create_evidence", "get_evidence", "list_evidence", "search_evidence", "link_evidence_to_belief", "link_evidence_to_question", "create_question", "get_question", "list_questions", "refine_question", "update_question_status", "archive_question", "create_answer", "get_answer", "find_missing_questions", "get_high_priority_questions", "get_falsification_questions", "create_epistemic_node", "get_epistemic_node", "list_epistemic_nodes", "update_epistemic_node", "archive_epistemic_node", "verify_epistemic_node", "supersede_epistemic_node", "batch_create_epistemic_nodes", "create_topic", "get_topic", "list_topics", "update_topic", "get_topic_tree", "materialize_topic_graph", "get_topic_graph_spine", "create_edge", "update_edge", "remove_edge", "remove_edges_between", "batch_create_edges", "query_lineage", "traverse_graph", "get_graph_neighborhood", "get_graph_structure_analysis", "list_graph_intelligence_queries", "run_graph_intelligence_query", "list_missing_embeddings", "search_embeddings", "get_embeddings_by_node_ids", "queue_embedding_backfill", "hybrid_discover", "resolve_topic_semantic", "expand_graph_neighborhood", "find_related_nodes", "analyze_graph_impact", "detect_graph_drift", "find_contradictions", "flag_contradiction", "detect_confirmation_bias", "get_topic_coverage", "get_graph_gaps", "list_lenses", "apply_lens_to_topic", "remove_lens_from_topic", "get_ontology", "list_ontologies", "apply_ontology", "match_entity_type", "resolve_effective_ontology", "add_worktree", "get_worktree", "activate_worktree", "list_worktrees", "list_all_worktrees", "list_campaigns", "update_worktree_targets", "update_worktree_metadata", "create_task", "list_tasks", "update_task", "complete_task", "create_lens", "create_ontology", "update_ontology", "archive_ontology", "create_ontology_version", "link_evidence"];
|
|
23
23
|
declare const TENANT_PUBLIC_OPERATION_NAMES: readonly ["analyze_topic_density", "discover_entity_connections", "trace_entity_impact", "resolve_effective_ontology", "get_observation_context", "ingest_observation", "merge", "create_epistemic_contract", "evaluate_contract", "get_contract_status", "publish_ontology_version", "deprecate_ontology_version", "manage_write_policy", "apply_auto_branching", "trigger_belief_review"];
|
|
24
24
|
declare const PLATFORM_INTERNAL_OPERATION_NAMES: readonly ["register_session", "heartbeat_session", "end_session", "list_active_sessions", "send_agent_message", "broadcast_message", "get_agent_inbox", "claim_files", "generate_session_handoff", "record_scope_learning", "pipeline_snapshot", "seed_belief_lattice", "get_lattice_coverage", "get_code_context", "get_change_history", "get_failure_log", "record_attempt", "begin_build_session", "push", "open_pull_request", "record_judgment", "get_audit_trail"];
|
|
25
25
|
declare const LEGACY_COMPAT_OPERATION_NAMES: readonly ["discover", "add_evidence", "answer_question", "get_confidence_history"];
|
|
@@ -27,7 +27,13 @@ declare const SDK_ONLY_OPERATION_NAMES: readonly ["start_worktree", "update_work
|
|
|
27
27
|
declare const MCP_ONLY_INTERNAL_OPERATION_NAMES: readonly ["evaluate_engineering_contract", "evaluate_research_contract"];
|
|
28
28
|
declare const FORBIDDEN_APPLICATION_OPERATION_NAMES: readonly ["execute_deep_research", "search_sources", "search_resources", "get_privileged_evidence", "get_privileged_signals", "get_thesis_artifacts"];
|
|
29
29
|
declare const LUCERN_OPERATION_MANIFEST: {
|
|
30
|
-
readonly
|
|
30
|
+
readonly modulate_confidence: {
|
|
31
|
+
readonly name: "modulate_confidence";
|
|
32
|
+
readonly surfaceClass: "platform_internal";
|
|
33
|
+
readonly surfaceIntent: "system";
|
|
34
|
+
readonly surfaces: FunctionSurfaceMap;
|
|
35
|
+
readonly rationale: "Internal SL ledger append primitive. Public callers attach evidence or contradiction relations; confidence is derived algorithmically.";
|
|
36
|
+
};
|
|
31
37
|
};
|
|
32
38
|
type LucernOperationName = keyof typeof LUCERN_OPERATION_MANIFEST;
|
|
33
39
|
declare function surfaceEnabled(exposure: SurfaceExposure): boolean;
|
|
@@ -11,6 +11,12 @@ var internalSystem = {
|
|
|
11
11
|
mcp: "internal",
|
|
12
12
|
cli: "internal"
|
|
13
13
|
};
|
|
14
|
+
var internalSdkRestOnly = {
|
|
15
|
+
sdk: "internal",
|
|
16
|
+
rest: "internal",
|
|
17
|
+
mcp: "none",
|
|
18
|
+
cli: "none"
|
|
19
|
+
};
|
|
14
20
|
var publicWithInternalMcp = {
|
|
15
21
|
sdk: "public",
|
|
16
22
|
rest: "public",
|
|
@@ -60,7 +66,6 @@ var MCP_CORE_OPERATION_NAMES = [
|
|
|
60
66
|
"get_belief",
|
|
61
67
|
"list_beliefs",
|
|
62
68
|
"refine_belief",
|
|
63
|
-
"modulate_confidence",
|
|
64
69
|
"fork_belief",
|
|
65
70
|
"archive_belief",
|
|
66
71
|
"search_beliefs",
|
|
@@ -349,6 +354,13 @@ var LUCERN_OPERATION_MANIFEST = {
|
|
|
349
354
|
internalSystem,
|
|
350
355
|
"Lucern system/background operation. Available to platform code paths, hidden from public MCP discovery."
|
|
351
356
|
),
|
|
357
|
+
modulate_confidence: {
|
|
358
|
+
name: "modulate_confidence",
|
|
359
|
+
surfaceClass: "platform_internal",
|
|
360
|
+
surfaceIntent: "system",
|
|
361
|
+
surfaces: internalSdkRestOnly,
|
|
362
|
+
rationale: "Internal SL ledger append primitive. Public callers attach evidence or contradiction relations; confidence is derived algorithmically."
|
|
363
|
+
},
|
|
352
364
|
...entries(
|
|
353
365
|
LEGACY_COMPAT_OPERATION_NAMES,
|
|
354
366
|
"legacy_compat",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/function-registry/manifest.ts"],"names":[],"mappings":";AAeA,IAAM,gBAAA,GAAuC;AAAA,EAC3C,GAAA,EAAK,QAAA;AAAA,EACL,IAAA,EAAM,QAAA;AAAA,EACN,GAAA,EAAK,QAAA;AAAA,EACL,GAAA,EAAK;AACP,CAAA;AAEA,IAAM,cAAA,GAAqC;AAAA,EACzC,GAAA,EAAK,UAAA;AAAA,EACL,IAAA,EAAM,UAAA;AAAA,EACN,GAAA,EAAK,UAAA;AAAA,EACL,GAAA,EAAK;AACP,CAAA;AAEA,IAAM,qBAAA,GAA4C;AAAA,EAChD,GAAA,EAAK,QAAA;AAAA,EACL,IAAA,EAAM,QAAA;AAAA,EACN,GAAA,EAAK,UAAA;AAAA,EACL,GAAA,EAAK;AACP,CAAA;AAEA,IAAM,gBAAA,GAAuC;AAAA,EAC3C,GAAA,EAAK,QAAA;AAAA,EACL,IAAA,EAAM,QAAA;AAAA,EACN,GAAA,EAAK,MAAA;AAAA,EACL,GAAA,EAAK;AACP,CAAA;AAEA,IAAM,aAAA,GAAoC;AAAA,EACxC,GAAA,EAAK,QA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AAA,MAAM,aAAuB,EAAC;AAC9B,EAAA,IAAI,MAAM,aAAA,KAAkB,QAAA,IAAY,KAAA,CAAM,QAAA,CAAS,QAAQ,QAAA,EAAU;AACvE,IAAA,UAAA,CAAW,KAAK,8CAA8C,CAAA;AAAA,EAChE;AACA,EAAA,IACE,MAAM,aAAA,KAAkB,eAAA,IACxB,KAAA,CAAM,QAAA,CAAS,QAAQ,MAAA,EACvB;AACA,IAAA,UAAA,CAAW,KAAK,gDAAgD,CAAA;AAAA,EAClE;AACA,EAAA,IAAI,MAAM,aAAA,KAAkB,cAAA,IAAkB,KAAA,CAAM,QAAA,CAAS,QAAQ,MAAA,EAAQ;AAC3E,IAAA,UAAA,CAAW,KAAK,+CAA+C,CAAA;AAAA,EACjE;AACA,EAAA,IACE,MAAM,aAAA,KAAkB,gBAAA,IACxB,KAAA,CAAM,QAAA,CAAS,QAAQ,QAAA,EACvB;AACA,IAAA,UAAA,CAAW,KAAK,2DAA2D,CAAA;AAAA,EAC7E;AACA,EAAA,OAAO,UAAA;AACT","file":"manifest.js","sourcesContent":["import type {\n FunctionSurfaceIntent,\n SurfaceClass,\n SurfaceExposure,\n FunctionSurfaceMap,\n} from \"./types.js\";\n\nexport type LucernOperationManifestEntry = {\n name: string;\n surfaceClass: SurfaceClass;\n surfaceIntent: FunctionSurfaceIntent;\n surfaces: FunctionSurfaceMap;\n rationale: string;\n};\n\nconst publicEverywhere: FunctionSurfaceMap = {\n sdk: \"public\",\n rest: \"public\",\n mcp: \"public\",\n cli: \"public\",\n};\n\nconst internalSystem: FunctionSurfaceMap = {\n sdk: \"internal\",\n rest: \"internal\",\n mcp: \"internal\",\n cli: \"internal\",\n};\n\nconst publicWithInternalMcp: FunctionSurfaceMap = {\n sdk: \"public\",\n rest: \"public\",\n mcp: \"internal\",\n cli: \"public\",\n};\n\nconst publicWithoutMcp: FunctionSurfaceMap = {\n sdk: \"public\",\n rest: \"public\",\n mcp: \"none\",\n cli: \"none\",\n};\n\nconst sdkOnlyPublic: FunctionSurfaceMap = {\n sdk: \"public\",\n rest: \"none\",\n mcp: \"none\",\n cli: \"none\",\n};\n\nconst mcpOnlyInternal: FunctionSurfaceMap = {\n sdk: \"none\",\n rest: \"none\",\n mcp: \"internal\",\n cli: \"none\",\n};\n\nfunction entries(\n names: readonly string[],\n surfaceClass: SurfaceClass,\n surfaceIntent: FunctionSurfaceIntent,\n surfaces: FunctionSurfaceMap,\n rationale: string\n): Record<string, LucernOperationManifestEntry> {\n return Object.fromEntries(\n names.map((name) => [\n name,\n {\n name,\n surfaceClass,\n surfaceIntent,\n surfaces,\n rationale,\n },\n ])\n );\n}\n\nexport const MCP_CORE_OPERATION_NAMES = [\n \"lucern_orient\",\n \"compile_context\",\n \"identity_whoami\",\n \"resolve_interactive_principal\",\n \"check_permission\",\n \"filter_by_permission\",\n \"create_belief\",\n \"get_belief\",\n \"list_beliefs\",\n \"refine_belief\",\n \"modulate_confidence\",\n \"fork_belief\",\n \"archive_belief\",\n \"search_beliefs\",\n \"bisect_confidence\",\n \"create_evidence\",\n \"get_evidence\",\n \"list_evidence\",\n \"search_evidence\",\n \"link_evidence_to_belief\",\n \"link_evidence_to_question\",\n \"create_question\",\n \"get_question\",\n \"list_questions\",\n \"refine_question\",\n \"update_question_status\",\n \"archive_question\",\n \"create_answer\",\n \"get_answer\",\n \"find_missing_questions\",\n \"get_high_priority_questions\",\n \"get_falsification_questions\",\n \"create_epistemic_node\",\n \"get_epistemic_node\",\n \"list_epistemic_nodes\",\n \"update_epistemic_node\",\n \"archive_epistemic_node\",\n \"verify_epistemic_node\",\n \"supersede_epistemic_node\",\n \"batch_create_epistemic_nodes\",\n \"create_topic\",\n \"get_topic\",\n \"list_topics\",\n \"update_topic\",\n \"get_topic_tree\",\n \"materialize_topic_graph\",\n \"get_topic_graph_spine\",\n] as const;\n\nexport const MCP_ANALYSIS_PLATFORM_OPERATION_NAMES = [\n \"create_edge\",\n \"update_edge\",\n \"remove_edge\",\n \"remove_edges_between\",\n \"batch_create_edges\",\n \"query_lineage\",\n \"traverse_graph\",\n \"get_graph_neighborhood\",\n \"get_graph_structure_analysis\",\n \"list_graph_intelligence_queries\",\n \"run_graph_intelligence_query\",\n \"list_missing_embeddings\",\n \"search_embeddings\",\n \"get_embeddings_by_node_ids\",\n \"queue_embedding_backfill\",\n \"hybrid_discover\",\n \"resolve_topic_semantic\",\n \"expand_graph_neighborhood\",\n \"find_related_nodes\",\n \"analyze_graph_impact\",\n \"detect_graph_drift\",\n \"find_contradictions\",\n \"flag_contradiction\",\n \"detect_confirmation_bias\",\n \"get_topic_coverage\",\n \"get_graph_gaps\",\n] as const;\n\nexport const MCP_ANALYSIS_TENANT_OPERATION_NAMES = [\n \"analyze_topic_density\",\n \"discover_entity_connections\",\n \"trace_entity_impact\",\n] as const;\n\nexport const MCP_WORKFLOW_PLATFORM_OPERATION_NAMES = [\n \"list_lenses\",\n \"apply_lens_to_topic\",\n \"remove_lens_from_topic\",\n \"get_ontology\",\n \"list_ontologies\",\n \"apply_ontology\",\n \"match_entity_type\",\n \"resolve_effective_ontology\",\n \"add_worktree\",\n \"get_worktree\",\n \"activate_worktree\",\n \"list_worktrees\",\n \"list_all_worktrees\",\n \"list_campaigns\",\n \"update_worktree_targets\",\n \"update_worktree_metadata\",\n \"create_task\",\n \"list_tasks\",\n \"update_task\",\n \"complete_task\",\n] as const;\n\nexport const MCP_WORKFLOW_TENANT_OPERATION_NAMES = [\n \"resolve_effective_ontology\",\n \"get_observation_context\",\n \"ingest_observation\",\n \"merge\",\n] as const;\n\nexport const MCP_GOVERNANCE_PLATFORM_OPERATION_NAMES = [\n \"create_lens\",\n \"create_ontology\",\n \"update_ontology\",\n \"archive_ontology\",\n \"create_ontology_version\",\n] as const;\n\nexport const MCP_GOVERNANCE_TENANT_OPERATION_NAMES = [\n \"create_epistemic_contract\",\n \"evaluate_contract\",\n \"get_contract_status\",\n \"publish_ontology_version\",\n \"deprecate_ontology_version\",\n \"manage_write_policy\",\n] as const;\n\nexport const MCP_AUTOMATION_OPERATION_NAMES = [\n \"apply_auto_branching\",\n \"trigger_belief_review\",\n] as const;\n\nexport const DUPLICATE_OPERATION_NAMES = [\n \"link_evidence\",\n] as const;\n\nexport const PLATFORM_PUBLIC_OPERATION_NAMES = [\n ...MCP_CORE_OPERATION_NAMES,\n ...MCP_ANALYSIS_PLATFORM_OPERATION_NAMES,\n ...MCP_WORKFLOW_PLATFORM_OPERATION_NAMES,\n ...MCP_GOVERNANCE_PLATFORM_OPERATION_NAMES,\n ...DUPLICATE_OPERATION_NAMES,\n] as const;\n\nexport const TENANT_PUBLIC_OPERATION_NAMES = [\n ...MCP_ANALYSIS_TENANT_OPERATION_NAMES,\n ...MCP_WORKFLOW_TENANT_OPERATION_NAMES,\n ...MCP_GOVERNANCE_TENANT_OPERATION_NAMES,\n ...MCP_AUTOMATION_OPERATION_NAMES,\n] as const;\n\nexport const PLATFORM_INTERNAL_OPERATION_NAMES = [\n \"register_session\",\n \"heartbeat_session\",\n \"end_session\",\n \"list_active_sessions\",\n \"send_agent_message\",\n \"broadcast_message\",\n \"get_agent_inbox\",\n \"claim_files\",\n \"generate_session_handoff\",\n \"record_scope_learning\",\n \"pipeline_snapshot\",\n \"seed_belief_lattice\",\n \"get_lattice_coverage\",\n \"get_code_context\",\n \"get_change_history\",\n \"get_failure_log\",\n \"record_attempt\",\n \"begin_build_session\",\n \"push\",\n \"open_pull_request\",\n \"record_judgment\",\n \"get_audit_trail\",\n] as const;\n\nexport const LEGACY_COMPAT_OPERATION_NAMES = [\n \"discover\",\n \"add_evidence\",\n \"answer_question\",\n \"get_confidence_history\",\n] as const;\n\nexport const SDK_ONLY_OPERATION_NAMES = [\n \"start_worktree\",\n \"update_worktree_phase\",\n \"advance_worktree_phase\",\n \"add_note_to_worktree\",\n \"link_document_to_worktree\",\n \"link_evidence_to_worktree\",\n \"link_question_to_worktree\",\n \"link_belief_to_worktree\",\n \"create_synthesized_belief\",\n \"complete_hypothesis_formation\",\n \"complete_evidence_review\",\n \"refine_worktree_belief\",\n \"trace_provenance\",\n \"get_belief_relationships\",\n \"get_belief_support_chain\",\n \"explore_connections\",\n \"get_deep_lineage\",\n \"graph_aware_search\",\n \"get_collection_conviction\",\n \"get_conviction_trend\",\n \"analyze_belief_criticality\",\n \"analyze_belief_cluster_candidates\",\n \"create_belief_conditional\",\n \"get_necessary_evidence\",\n \"analyze_reasoning_depth\",\n \"get_evidence_by_methodology\",\n \"create_evidence_task\",\n \"get_task_counts\",\n \"add_research_action\",\n \"get_predictions\",\n \"get_surprise_detection\",\n \"get_challenged_beliefs\",\n \"get_causal_chains\",\n \"get_non_consensus_beliefs\",\n \"get_beliefs_by_epistemic_status\",\n \"detect_anchoring_bias\",\n \"detect_source_concentration\",\n \"find_soft_contradictions\",\n \"find_semantic_bridges\",\n \"find_semantic_orphans\",\n] as const;\n\nexport const MCP_ONLY_INTERNAL_OPERATION_NAMES = [\n \"evaluate_engineering_contract\",\n \"evaluate_research_contract\",\n] as const;\n\nexport const FORBIDDEN_APPLICATION_OPERATION_NAMES = [\n \"execute_deep_research\",\n \"search_sources\",\n \"search_resources\",\n \"get_privileged_evidence\",\n \"get_privileged_signals\",\n \"get_thesis_artifacts\",\n] as const;\n\nexport const LUCERN_OPERATION_MANIFEST = {\n ...entries(\n MCP_CORE_OPERATION_NAMES,\n \"platform_public\",\n \"mcp_core\",\n publicEverywhere,\n \"Default conversational Lucern MCP primitive for reading, writing, and shaping the reasoning graph.\"\n ),\n ...entries(\n MCP_ANALYSIS_PLATFORM_OPERATION_NAMES,\n \"platform_public\",\n \"mcp_analysis\",\n publicEverywhere,\n \"High-signal graph analysis operation that belongs in chat/MCP because users naturally ask for gaps, contradictions, lineage, and coverage.\"\n ),\n ...entries(\n MCP_ANALYSIS_TENANT_OPERATION_NAMES,\n \"tenant_public\",\n \"mcp_analysis\",\n publicEverywhere,\n \"Tenant-scoped analysis operation that remains MCP-visible because agents can answer graph-quality and impact questions from chat.\"\n ),\n ...entries(\n MCP_WORKFLOW_PLATFORM_OPERATION_NAMES,\n \"platform_public\",\n \"mcp_workflow\",\n publicEverywhere,\n \"Workflow operation expected by coding agents and human MCP users managing Lucern worktrees, tasks, lenses, and observations.\"\n ),\n ...entries(\n MCP_WORKFLOW_TENANT_OPERATION_NAMES,\n \"tenant_public\",\n \"mcp_workflow\",\n publicEverywhere,\n \"Tenant-scoped workflow operation expected by coding agents and human MCP users managing observations and worktree lifecycle.\"\n ),\n ...entries(\n MCP_AUTOMATION_OPERATION_NAMES,\n \"tenant_public\",\n \"mcp_analysis\",\n publicEverywhere,\n \"Tenant-scoped automation that remains MCP-visible because agents can explicitly request review or branching assistance.\"\n ),\n ...entries(\n MCP_GOVERNANCE_PLATFORM_OPERATION_NAMES,\n \"platform_public\",\n \"mcp_governance\",\n publicWithInternalMcp,\n \"Governance/admin operation. SDK, REST, and CLI remain public, but MCP is internal by default to keep chat surfaces focused.\"\n ),\n ...entries(\n MCP_GOVERNANCE_TENANT_OPERATION_NAMES,\n \"tenant_public\",\n \"mcp_governance\",\n publicWithInternalMcp,\n \"Governance/admin operation. SDK, REST, and CLI remain public, but MCP is internal by default to keep chat surfaces focused.\"\n ),\n ...entries(\n DUPLICATE_OPERATION_NAMES,\n \"platform_public\",\n \"compatibility\",\n publicWithoutMcp,\n \"Duplicate compatibility operation kept for SDK/REST callers, removed from MCP/CLI discovery in favor of the canonical specific tool.\"\n ),\n ...entries(\n PLATFORM_INTERNAL_OPERATION_NAMES,\n \"platform_internal\",\n \"system\",\n internalSystem,\n \"Lucern system/background operation. Available to platform code paths, hidden from public MCP discovery.\"\n ),\n ...entries(\n LEGACY_COMPAT_OPERATION_NAMES,\n \"legacy_compat\",\n \"compatibility\",\n publicWithoutMcp,\n \"Temporary compatibility operation. Must name a canonical replacement before removal.\"\n ),\n ...entries(\n SDK_ONLY_OPERATION_NAMES,\n \"tenant_public\",\n \"sdk_granular\",\n sdkOnlyPublic,\n \"Granular Lucern SDK operation. Not an MCP, REST, or CLI tool until backed by the generated function pipe.\"\n ),\n ...entries(\n MCP_ONLY_INTERNAL_OPERATION_NAMES,\n \"platform_internal\",\n \"system\",\n mcpOnlyInternal,\n \"Lucern MCP-only platform operation for local agent/bootstrap or verification workflows. Hidden from public discovery.\"\n ),\n} as const satisfies Record<string, LucernOperationManifestEntry>;\n\nexport type LucernOperationName = keyof typeof LUCERN_OPERATION_MANIFEST;\n\nexport function surfaceEnabled(exposure: SurfaceExposure): boolean {\n return exposure !== \"none\";\n}\n\nexport function surfaceIntentGateViolations(\n entry: LucernOperationManifestEntry\n): string[] {\n const violations: string[] = [];\n if (entry.surfaceIntent === \"system\" && entry.surfaces.mcp === \"public\") {\n violations.push(\"system operations cannot be public MCP tools\");\n }\n if (\n entry.surfaceIntent === \"compatibility\" &&\n entry.surfaces.mcp !== \"none\"\n ) {\n violations.push(\"compatibility operations must not be MCP tools\");\n }\n if (entry.surfaceIntent === \"sdk_granular\" && entry.surfaces.mcp !== \"none\") {\n violations.push(\"SDK-granular operations must not be MCP tools\");\n }\n if (\n entry.surfaceIntent === \"mcp_governance\" &&\n entry.surfaces.mcp === \"public\"\n ) {\n violations.push(\"governance operations must be internal or absent from MCP\");\n }\n return violations;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/function-registry/manifest.ts"],"names":[],"mappings":";AAeA,IAAM,gBAAA,GAAuC;AAAA,EAC3C,GAAA,EAAK,QAAA;AAAA,EACL,IAAA,EAAM,QAAA;AAAA,EACN,GAAA,EAAK,QAAA;AAAA,EACL,GAAA,EAAK;AACP,CAAA;AAEA,IAAM,cAAA,GAAqC;AAAA,EACzC,GAAA,EAAK,UAAA;AAAA,EACL,IAAA,EAAM,UAAA;AAAA,EACN,GAAA,EAAK,UAAA;AAAA,EACL,GAAA,EAAK;AACP,CAAA;AAEA,IAAM,mBAAA,GAA0C;AAAA,EAC9C,GAAA,EAAK,UAAA;AAAA,EACL,IAAA,EAAM,UAAA;AAAA,EACN,GAAA,EAAK,MAAA;AAAA,EACL,GAAA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SurfaceExposure,\n FunctionSurfaceMap,\n} from \"./types.js\";\n\nexport type LucernOperationManifestEntry = {\n name: string;\n surfaceClass: SurfaceClass;\n surfaceIntent: FunctionSurfaceIntent;\n surfaces: FunctionSurfaceMap;\n rationale: string;\n};\n\nconst publicEverywhere: FunctionSurfaceMap = {\n sdk: \"public\",\n rest: \"public\",\n mcp: \"public\",\n cli: \"public\",\n};\n\nconst internalSystem: FunctionSurfaceMap = {\n sdk: \"internal\",\n rest: \"internal\",\n mcp: \"internal\",\n cli: \"internal\",\n};\n\nconst internalSdkRestOnly: FunctionSurfaceMap = {\n sdk: \"internal\",\n rest: \"internal\",\n mcp: \"none\",\n cli: \"none\",\n};\n\nconst publicWithInternalMcp: FunctionSurfaceMap = {\n sdk: \"public\",\n rest: \"public\",\n mcp: \"internal\",\n cli: \"public\",\n};\n\nconst publicWithoutMcp: FunctionSurfaceMap = {\n sdk: \"public\",\n rest: \"public\",\n mcp: \"none\",\n cli: \"none\",\n};\n\nconst sdkOnlyPublic: FunctionSurfaceMap = {\n sdk: \"public\",\n rest: \"none\",\n mcp: \"none\",\n cli: \"none\",\n};\n\nconst mcpOnlyInternal: FunctionSurfaceMap = {\n sdk: \"none\",\n rest: \"none\",\n mcp: \"internal\",\n cli: \"none\",\n};\n\nfunction entries(\n names: readonly string[],\n surfaceClass: SurfaceClass,\n surfaceIntent: FunctionSurfaceIntent,\n surfaces: FunctionSurfaceMap,\n rationale: string\n): Record<string, LucernOperationManifestEntry> {\n return Object.fromEntries(\n names.map((name) => [\n name,\n {\n name,\n surfaceClass,\n surfaceIntent,\n surfaces,\n rationale,\n },\n ])\n );\n}\n\nexport const MCP_CORE_OPERATION_NAMES = [\n \"lucern_orient\",\n \"compile_context\",\n \"identity_whoami\",\n \"resolve_interactive_principal\",\n \"check_permission\",\n \"filter_by_permission\",\n \"create_belief\",\n \"get_belief\",\n \"list_beliefs\",\n \"refine_belief\",\n \"fork_belief\",\n \"archive_belief\",\n \"search_beliefs\",\n \"bisect_confidence\",\n \"create_evidence\",\n \"get_evidence\",\n \"list_evidence\",\n \"search_evidence\",\n \"link_evidence_to_belief\",\n \"link_evidence_to_question\",\n \"create_question\",\n \"get_question\",\n \"list_questions\",\n \"refine_question\",\n \"update_question_status\",\n \"archive_question\",\n \"create_answer\",\n \"get_answer\",\n \"find_missing_questions\",\n \"get_high_priority_questions\",\n \"get_falsification_questions\",\n \"create_epistemic_node\",\n \"get_epistemic_node\",\n \"list_epistemic_nodes\",\n \"update_epistemic_node\",\n \"archive_epistemic_node\",\n \"verify_epistemic_node\",\n \"supersede_epistemic_node\",\n \"batch_create_epistemic_nodes\",\n \"create_topic\",\n \"get_topic\",\n \"list_topics\",\n \"update_topic\",\n \"get_topic_tree\",\n \"materialize_topic_graph\",\n \"get_topic_graph_spine\",\n] as const;\n\nexport const MCP_ANALYSIS_PLATFORM_OPERATION_NAMES = [\n \"create_edge\",\n \"update_edge\",\n \"remove_edge\",\n \"remove_edges_between\",\n \"batch_create_edges\",\n \"query_lineage\",\n \"traverse_graph\",\n \"get_graph_neighborhood\",\n \"get_graph_structure_analysis\",\n \"list_graph_intelligence_queries\",\n \"run_graph_intelligence_query\",\n \"list_missing_embeddings\",\n \"search_embeddings\",\n \"get_embeddings_by_node_ids\",\n \"queue_embedding_backfill\",\n \"hybrid_discover\",\n \"resolve_topic_semantic\",\n \"expand_graph_neighborhood\",\n \"find_related_nodes\",\n \"analyze_graph_impact\",\n \"detect_graph_drift\",\n \"find_contradictions\",\n \"flag_contradiction\",\n \"detect_confirmation_bias\",\n \"get_topic_coverage\",\n \"get_graph_gaps\",\n] as const;\n\nexport const MCP_ANALYSIS_TENANT_OPERATION_NAMES = [\n \"analyze_topic_density\",\n \"discover_entity_connections\",\n \"trace_entity_impact\",\n] as const;\n\nexport const MCP_WORKFLOW_PLATFORM_OPERATION_NAMES = [\n \"list_lenses\",\n \"apply_lens_to_topic\",\n \"remove_lens_from_topic\",\n \"get_ontology\",\n \"list_ontologies\",\n \"apply_ontology\",\n \"match_entity_type\",\n \"resolve_effective_ontology\",\n \"add_worktree\",\n \"get_worktree\",\n \"activate_worktree\",\n \"list_worktrees\",\n \"list_all_worktrees\",\n \"list_campaigns\",\n \"update_worktree_targets\",\n \"update_worktree_metadata\",\n \"create_task\",\n \"list_tasks\",\n \"update_task\",\n \"complete_task\",\n] as const;\n\nexport const MCP_WORKFLOW_TENANT_OPERATION_NAMES = [\n \"resolve_effective_ontology\",\n \"get_observation_context\",\n \"ingest_observation\",\n \"merge\",\n] as const;\n\nexport const MCP_GOVERNANCE_PLATFORM_OPERATION_NAMES = [\n \"create_lens\",\n \"create_ontology\",\n \"update_ontology\",\n \"archive_ontology\",\n \"create_ontology_version\",\n] as const;\n\nexport const MCP_GOVERNANCE_TENANT_OPERATION_NAMES = [\n \"create_epistemic_contract\",\n \"evaluate_contract\",\n \"get_contract_status\",\n \"publish_ontology_version\",\n \"deprecate_ontology_version\",\n \"manage_write_policy\",\n] as const;\n\nexport const MCP_AUTOMATION_OPERATION_NAMES = [\n \"apply_auto_branching\",\n \"trigger_belief_review\",\n] as const;\n\nexport const DUPLICATE_OPERATION_NAMES = [\n \"link_evidence\",\n] as const;\n\nexport const PLATFORM_PUBLIC_OPERATION_NAMES = [\n ...MCP_CORE_OPERATION_NAMES,\n ...MCP_ANALYSIS_PLATFORM_OPERATION_NAMES,\n ...MCP_WORKFLOW_PLATFORM_OPERATION_NAMES,\n ...MCP_GOVERNANCE_PLATFORM_OPERATION_NAMES,\n ...DUPLICATE_OPERATION_NAMES,\n] as const;\n\nexport const TENANT_PUBLIC_OPERATION_NAMES = [\n ...MCP_ANALYSIS_TENANT_OPERATION_NAMES,\n ...MCP_WORKFLOW_TENANT_OPERATION_NAMES,\n ...MCP_GOVERNANCE_TENANT_OPERATION_NAMES,\n ...MCP_AUTOMATION_OPERATION_NAMES,\n] as const;\n\nexport const PLATFORM_INTERNAL_OPERATION_NAMES = [\n \"register_session\",\n \"heartbeat_session\",\n \"end_session\",\n \"list_active_sessions\",\n \"send_agent_message\",\n \"broadcast_message\",\n \"get_agent_inbox\",\n \"claim_files\",\n \"generate_session_handoff\",\n \"record_scope_learning\",\n \"pipeline_snapshot\",\n \"seed_belief_lattice\",\n \"get_lattice_coverage\",\n \"get_code_context\",\n \"get_change_history\",\n \"get_failure_log\",\n \"record_attempt\",\n \"begin_build_session\",\n \"push\",\n \"open_pull_request\",\n \"record_judgment\",\n \"get_audit_trail\",\n] as const;\n\nexport const LEGACY_COMPAT_OPERATION_NAMES = [\n \"discover\",\n \"add_evidence\",\n \"answer_question\",\n \"get_confidence_history\",\n] as const;\n\nexport const SDK_ONLY_OPERATION_NAMES = [\n \"start_worktree\",\n \"update_worktree_phase\",\n \"advance_worktree_phase\",\n \"add_note_to_worktree\",\n \"link_document_to_worktree\",\n \"link_evidence_to_worktree\",\n \"link_question_to_worktree\",\n \"link_belief_to_worktree\",\n \"create_synthesized_belief\",\n \"complete_hypothesis_formation\",\n \"complete_evidence_review\",\n \"refine_worktree_belief\",\n \"trace_provenance\",\n \"get_belief_relationships\",\n \"get_belief_support_chain\",\n \"explore_connections\",\n \"get_deep_lineage\",\n \"graph_aware_search\",\n \"get_collection_conviction\",\n \"get_conviction_trend\",\n \"analyze_belief_criticality\",\n \"analyze_belief_cluster_candidates\",\n \"create_belief_conditional\",\n \"get_necessary_evidence\",\n \"analyze_reasoning_depth\",\n \"get_evidence_by_methodology\",\n \"create_evidence_task\",\n \"get_task_counts\",\n \"add_research_action\",\n \"get_predictions\",\n \"get_surprise_detection\",\n \"get_challenged_beliefs\",\n \"get_causal_chains\",\n \"get_non_consensus_beliefs\",\n \"get_beliefs_by_epistemic_status\",\n \"detect_anchoring_bias\",\n \"detect_source_concentration\",\n \"find_soft_contradictions\",\n \"find_semantic_bridges\",\n \"find_semantic_orphans\",\n] as const;\n\nexport const MCP_ONLY_INTERNAL_OPERATION_NAMES = [\n \"evaluate_engineering_contract\",\n \"evaluate_research_contract\",\n] as const;\n\nexport const FORBIDDEN_APPLICATION_OPERATION_NAMES = [\n \"execute_deep_research\",\n \"search_sources\",\n \"search_resources\",\n \"get_privileged_evidence\",\n \"get_privileged_signals\",\n \"get_thesis_artifacts\",\n] as const;\n\nexport const LUCERN_OPERATION_MANIFEST = {\n ...entries(\n MCP_CORE_OPERATION_NAMES,\n \"platform_public\",\n \"mcp_core\",\n publicEverywhere,\n \"Default conversational Lucern MCP primitive for reading, writing, and shaping the reasoning graph.\"\n ),\n ...entries(\n MCP_ANALYSIS_PLATFORM_OPERATION_NAMES,\n \"platform_public\",\n \"mcp_analysis\",\n publicEverywhere,\n \"High-signal graph analysis operation that belongs in chat/MCP because users naturally ask for gaps, contradictions, lineage, and coverage.\"\n ),\n ...entries(\n MCP_ANALYSIS_TENANT_OPERATION_NAMES,\n \"tenant_public\",\n \"mcp_analysis\",\n publicEverywhere,\n \"Tenant-scoped analysis operation that remains MCP-visible because agents can answer graph-quality and impact questions from chat.\"\n ),\n ...entries(\n MCP_WORKFLOW_PLATFORM_OPERATION_NAMES,\n \"platform_public\",\n \"mcp_workflow\",\n publicEverywhere,\n \"Workflow operation expected by coding agents and human MCP users managing Lucern worktrees, tasks, lenses, and observations.\"\n ),\n ...entries(\n MCP_WORKFLOW_TENANT_OPERATION_NAMES,\n \"tenant_public\",\n \"mcp_workflow\",\n publicEverywhere,\n \"Tenant-scoped workflow operation expected by coding agents and human MCP users managing observations and worktree lifecycle.\"\n ),\n ...entries(\n MCP_AUTOMATION_OPERATION_NAMES,\n \"tenant_public\",\n \"mcp_analysis\",\n publicEverywhere,\n \"Tenant-scoped automation that remains MCP-visible because agents can explicitly request review or branching assistance.\"\n ),\n ...entries(\n MCP_GOVERNANCE_PLATFORM_OPERATION_NAMES,\n \"platform_public\",\n \"mcp_governance\",\n publicWithInternalMcp,\n \"Governance/admin operation. SDK, REST, and CLI remain public, but MCP is internal by default to keep chat surfaces focused.\"\n ),\n ...entries(\n MCP_GOVERNANCE_TENANT_OPERATION_NAMES,\n \"tenant_public\",\n \"mcp_governance\",\n publicWithInternalMcp,\n \"Governance/admin operation. SDK, REST, and CLI remain public, but MCP is internal by default to keep chat surfaces focused.\"\n ),\n ...entries(\n DUPLICATE_OPERATION_NAMES,\n \"platform_public\",\n \"compatibility\",\n publicWithoutMcp,\n \"Duplicate compatibility operation kept for SDK/REST callers, removed from MCP/CLI discovery in favor of the canonical specific tool.\"\n ),\n ...entries(\n PLATFORM_INTERNAL_OPERATION_NAMES,\n \"platform_internal\",\n \"system\",\n internalSystem,\n \"Lucern system/background operation. Available to platform code paths, hidden from public MCP discovery.\"\n ),\n modulate_confidence: {\n name: \"modulate_confidence\",\n surfaceClass: \"platform_internal\",\n surfaceIntent: \"system\",\n surfaces: internalSdkRestOnly,\n rationale:\n \"Internal SL ledger append primitive. Public callers attach evidence or contradiction relations; confidence is derived algorithmically.\",\n },\n ...entries(\n LEGACY_COMPAT_OPERATION_NAMES,\n \"legacy_compat\",\n \"compatibility\",\n publicWithoutMcp,\n \"Temporary compatibility operation. Must name a canonical replacement before removal.\"\n ),\n ...entries(\n SDK_ONLY_OPERATION_NAMES,\n \"tenant_public\",\n \"sdk_granular\",\n sdkOnlyPublic,\n \"Granular Lucern SDK operation. Not an MCP, REST, or CLI tool until backed by the generated function pipe.\"\n ),\n ...entries(\n MCP_ONLY_INTERNAL_OPERATION_NAMES,\n \"platform_internal\",\n \"system\",\n mcpOnlyInternal,\n \"Lucern MCP-only platform operation for local agent/bootstrap or verification workflows. Hidden from public discovery.\"\n ),\n} as const satisfies Record<string, LucernOperationManifestEntry>;\n\nexport type LucernOperationName = keyof typeof LUCERN_OPERATION_MANIFEST;\n\nexport function surfaceEnabled(exposure: SurfaceExposure): boolean {\n return exposure !== \"none\";\n}\n\nexport function surfaceIntentGateViolations(\n entry: LucernOperationManifestEntry\n): string[] {\n const violations: string[] = [];\n if (entry.surfaceIntent === \"system\" && entry.surfaces.mcp === \"public\") {\n violations.push(\"system operations cannot be public MCP tools\");\n }\n if (\n entry.surfaceIntent === \"compatibility\" &&\n entry.surfaces.mcp !== \"none\"\n ) {\n violations.push(\"compatibility operations must not be MCP tools\");\n }\n if (entry.surfaceIntent === \"sdk_granular\" && entry.surfaces.mcp !== \"none\") {\n violations.push(\"SDK-granular operations must not be MCP tools\");\n }\n if (\n entry.surfaceIntent === \"mcp_governance\" &&\n entry.surfaces.mcp === \"public\"\n ) {\n violations.push(\"governance operations must be internal or absent from MCP\");\n }\n return violations;\n}\n"]}
|
|
@@ -5,7 +5,7 @@ import { z } from 'zod';
|
|
|
5
5
|
// src/tool-contracts.lifecycle.ts
|
|
6
6
|
var CREATE_BELIEF = {
|
|
7
7
|
name: "create_belief",
|
|
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)`;
|
|
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)`; attach supporting or contradicting evidence with create_evidence or link_evidence_to_belief to record evidential updates.",
|
|
9
9
|
parameters: {
|
|
10
10
|
canonicalText: {
|
|
11
11
|
type: "string",
|
|
@@ -91,7 +91,7 @@ var REFINE_BELIEF = {
|
|
|
91
91
|
};
|
|
92
92
|
var MODULATE_CONFIDENCE = {
|
|
93
93
|
name: "modulate_confidence",
|
|
94
|
-
description: "
|
|
94
|
+
description: "Internal-only subjective-logic ledger append. Like `git commit` to the credence log for the scoring engine \u2014 never an operator-facing way to assert confidence. Agents, SDK callers, CLI users, and MCP clients must instead create or link evidence with `evidenceRelation: supports|contradicts`; the kernel derives the next opinion from that evidence. This compatibility primitive is reserved for governed system scoring paths that already hold a full subjective-logic tuple and truth-bearing provenance.",
|
|
95
95
|
parameters: {
|
|
96
96
|
nodeId: { type: "string", description: "The belief to score" },
|
|
97
97
|
belief: {
|
|
@@ -1699,10 +1699,11 @@ var LUCERN_ORIENT = {
|
|
|
1699
1699
|
workflow: "array - recommended branch -> investigate -> prove gate -> merge workflow",
|
|
1700
1700
|
grammarMap: "array - primitive-to-git-analogy map for topics, campaigns, worktrees, beliefs, questions, evidence, edges, contradictions, and gates",
|
|
1701
1701
|
firstMoves: "array - recommended first tools for a cold-start agent",
|
|
1702
|
-
receiptRules: "array - how to interpret candidateCounts, broadening, coverageWarning, and noDefaultGlobalScan",
|
|
1702
|
+
receiptRules: "array - how to interpret candidateCounts, broadening, coverageWarning, narrativeCoverage, synthesisLints, and noDefaultGlobalScan",
|
|
1703
1703
|
safetyRules: "array - mutation and completion rules that preserve reasoning lineage",
|
|
1704
1704
|
toolMap: "array | undefined - situation-to-tool routing map when requested",
|
|
1705
1705
|
examples: "array | undefined - concrete tool-call examples when requested",
|
|
1706
|
+
futureCapabilities: "array | undefined - exemplar, gauntlet, trace-corpus, and native-model-training capabilities when requested",
|
|
1706
1707
|
suggestedNextCalls: "array - safe next tool calls for the current situation"
|
|
1707
1708
|
}
|
|
1708
1709
|
},
|
|
@@ -1865,7 +1866,7 @@ var SEARCH_EVIDENCE = {
|
|
|
1865
1866
|
};
|
|
1866
1867
|
var CREATE_EVIDENCE = {
|
|
1867
1868
|
name: "create_evidence",
|
|
1868
|
-
description: "Commit evidence to the reasoning graph. Like `git commit` \u2014 creates a traceable evidence record with canonical public IDs. Optionally links the evidence to a belief or question in the same operation.",
|
|
1869
|
+
description: "Commit evidence to the reasoning graph. Like `git commit` \u2014 creates a traceable evidence record with canonical public IDs. Optionally links the evidence to a belief or question in the same operation. When evidence bears on beliefs, state whether it supports or contradicts; SL confidence is derived from these evidence relations.",
|
|
1869
1870
|
parameters: {
|
|
1870
1871
|
topicId: { type: "string", description: "Topic scope" },
|
|
1871
1872
|
text: { type: "string", description: "Canonical evidence text" },
|
|
@@ -1876,7 +1877,20 @@ var CREATE_EVIDENCE = {
|
|
|
1876
1877
|
},
|
|
1877
1878
|
weight: {
|
|
1878
1879
|
type: "number",
|
|
1879
|
-
description: "
|
|
1880
|
+
description: "Optional support weight: -1.0 (contradicts) to +1.0 (supports). If omitted, evidenceRelation + confidence determine the weight."
|
|
1881
|
+
},
|
|
1882
|
+
evidenceRelation: {
|
|
1883
|
+
type: "string",
|
|
1884
|
+
enum: ["supports", "contradicts"],
|
|
1885
|
+
description: "Canonical relation to targetId/linkedBeliefNodeId. Prefer this over relying on signed weight inference."
|
|
1886
|
+
},
|
|
1887
|
+
confidence: {
|
|
1888
|
+
type: "number",
|
|
1889
|
+
description: "Confidence in the evidence relation, 0.0 to 1.0"
|
|
1890
|
+
},
|
|
1891
|
+
beliefRelations: {
|
|
1892
|
+
type: "array",
|
|
1893
|
+
description: "Optional additional belief relations: [{ beliefId|beliefNodeId|targetId, evidenceRelation|relation, confidence?, weight?, rationale? }]. Use one evidence node with multiple relations when the same fact supports or contradicts several beliefs."
|
|
1880
1894
|
},
|
|
1881
1895
|
metadata: {
|
|
1882
1896
|
type: "object",
|
|
@@ -1986,7 +2000,7 @@ var LINK_EVIDENCE = {
|
|
|
1986
2000
|
};
|
|
1987
2001
|
var LINK_EVIDENCE_TO_BELIEF = {
|
|
1988
2002
|
name: "link_evidence_to_belief",
|
|
1989
|
-
description: "Link evidence to a belief with a support weight. Like `git add` \u2014 stages evidence in support of (or against) a belief. The weight ranges from -1.0 (strongly contradicts) to +1.0 (strongly supports).",
|
|
2003
|
+
description: "Link evidence to a belief with a support weight. Like `git add` \u2014 stages evidence in support of (or against) a belief. The weight ranges from -1.0 (strongly contradicts) to +1.0 (strongly supports). This relation appends to the SL confidence ledger; do not hand-write confidence separately.",
|
|
1990
2004
|
parameters: {
|
|
1991
2005
|
evidenceId: { type: "string", description: "The evidence node ID" },
|
|
1992
2006
|
beliefId: { type: "string", description: "The belief node ID" },
|
|
@@ -1994,9 +2008,18 @@ var LINK_EVIDENCE_TO_BELIEF = {
|
|
|
1994
2008
|
type: "number",
|
|
1995
2009
|
description: "Support weight: -1.0 (contradicts) to +1.0 (supports)"
|
|
1996
2010
|
},
|
|
2011
|
+
evidenceRelation: {
|
|
2012
|
+
type: "string",
|
|
2013
|
+
enum: ["supports", "contradicts"],
|
|
2014
|
+
description: "Canonical semantic relation. If omitted, the sign of weight is used."
|
|
2015
|
+
},
|
|
2016
|
+
confidence: {
|
|
2017
|
+
type: "number",
|
|
2018
|
+
description: "Confidence in this evidence-to-belief relation, 0.0 to 1.0"
|
|
2019
|
+
},
|
|
1997
2020
|
rationale: { type: "string", description: "Why this evidence is relevant" }
|
|
1998
2021
|
},
|
|
1999
|
-
required: ["evidenceId", "beliefId"
|
|
2022
|
+
required: ["evidenceId", "beliefId"],
|
|
2000
2023
|
response: {
|
|
2001
2024
|
description: "The created edge linking evidence to belief",
|
|
2002
2025
|
fields: {
|
|
@@ -2824,7 +2847,9 @@ var COMPILE_CONTEXT = {
|
|
|
2824
2847
|
recentEvidence: "array \u2014 recent evidence ranked for this query",
|
|
2825
2848
|
contradictions: "array \u2014 unresolved contradiction records",
|
|
2826
2849
|
relatedEntities: "array | undefined \u2014 ranked ontological entities in scope",
|
|
2827
|
-
contextNarrative: "array \u2014
|
|
2850
|
+
contextNarrative: "array \u2014 ordered synthesis blocks with kind/text, starting with executive_summary and canonical narrative blocks before raw objects",
|
|
2851
|
+
retrievalReceipt: "object \u2014 candidateCounts, coverageWarning, narrativeCoverage, synthesisLints, and suggestedNextActions",
|
|
2852
|
+
narrativeCoverage: "object \u2014 recordsSynthesized, recordsNamed, recordsOmitted, and blocksEmitted for the narrative",
|
|
2828
2853
|
injectionPolicy: "object \u2014 token-budgeted section selections",
|
|
2829
2854
|
diagnostics: "object \u2014 scoring and utilization telemetry"
|
|
2830
2855
|
}
|
|
@@ -4772,6 +4797,12 @@ var internalSystem = {
|
|
|
4772
4797
|
mcp: "internal",
|
|
4773
4798
|
cli: "internal"
|
|
4774
4799
|
};
|
|
4800
|
+
var internalSdkRestOnly = {
|
|
4801
|
+
sdk: "internal",
|
|
4802
|
+
rest: "internal",
|
|
4803
|
+
mcp: "none",
|
|
4804
|
+
cli: "none"
|
|
4805
|
+
};
|
|
4775
4806
|
var publicWithInternalMcp = {
|
|
4776
4807
|
sdk: "public",
|
|
4777
4808
|
rest: "public",
|
|
@@ -4821,7 +4852,6 @@ var MCP_CORE_OPERATION_NAMES = [
|
|
|
4821
4852
|
"get_belief",
|
|
4822
4853
|
"list_beliefs",
|
|
4823
4854
|
"refine_belief",
|
|
4824
|
-
"modulate_confidence",
|
|
4825
4855
|
"fork_belief",
|
|
4826
4856
|
"archive_belief",
|
|
4827
4857
|
"search_beliefs",
|
|
@@ -5089,6 +5119,13 @@ var LUCERN_OPERATION_MANIFEST = {
|
|
|
5089
5119
|
internalSystem,
|
|
5090
5120
|
"Lucern system/background operation. Available to platform code paths, hidden from public MCP discovery."
|
|
5091
5121
|
),
|
|
5122
|
+
modulate_confidence: {
|
|
5123
|
+
name: "modulate_confidence",
|
|
5124
|
+
surfaceClass: "platform_internal",
|
|
5125
|
+
surfaceIntent: "system",
|
|
5126
|
+
surfaces: internalSdkRestOnly,
|
|
5127
|
+
rationale: "Internal SL ledger append primitive. Public callers attach evidence or contradiction relations; confidence is derived algorithmically."
|
|
5128
|
+
},
|
|
5092
5129
|
...entries(
|
|
5093
5130
|
LEGACY_COMPAT_OPERATION_NAMES,
|
|
5094
5131
|
"legacy_compat",
|