@lucern/contracts 1.0.11 → 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 +7 -0
- package/dist/function-registry/beliefs.d.ts +1 -1
- package/dist/function-registry/beliefs.js +126 -10
- package/dist/function-registry/beliefs.js.map +1 -1
- package/dist/function-registry/coding.d.ts +1 -1
- package/dist/function-registry/coding.js +124 -8
- package/dist/function-registry/coding.js.map +1 -1
- package/dist/function-registry/context.d.ts +44 -4
- package/dist/function-registry/context.js +146 -8
- package/dist/function-registry/context.js.map +1 -1
- package/dist/function-registry/contracts.d.ts +1 -1
- package/dist/function-registry/contracts.js +124 -8
- package/dist/function-registry/contracts.js.map +1 -1
- package/dist/function-registry/coordination.d.ts +1 -1
- package/dist/function-registry/coordination.js +124 -8
- package/dist/function-registry/coordination.js.map +1 -1
- package/dist/function-registry/edges.d.ts +1 -1
- package/dist/function-registry/edges.js +124 -8
- package/dist/function-registry/edges.js.map +1 -1
- package/dist/function-registry/evidence.d.ts +1 -1
- package/dist/function-registry/evidence.js +309 -40
- package/dist/function-registry/evidence.js.map +1 -1
- package/dist/function-registry/graph.d.ts +1 -1
- package/dist/function-registry/graph.js +126 -12
- package/dist/function-registry/graph.js.map +1 -1
- package/dist/function-registry/helpers.js +124 -8
- package/dist/function-registry/helpers.js.map +1 -1
- package/dist/function-registry/identity.d.ts +1 -1
- package/dist/function-registry/identity.js +124 -8
- package/dist/function-registry/identity.js.map +1 -1
- package/dist/function-registry/index.js +124 -8
- package/dist/function-registry/index.js.map +1 -1
- package/dist/function-registry/judgments.d.ts +1 -1
- package/dist/function-registry/judgments.js +124 -8
- package/dist/function-registry/judgments.js.map +1 -1
- package/dist/function-registry/legacy.d.ts +1 -1
- package/dist/function-registry/legacy.js +124 -8
- package/dist/function-registry/legacy.js.map +1 -1
- package/dist/function-registry/lenses.d.ts +1 -1
- package/dist/function-registry/lenses.js +124 -8
- package/dist/function-registry/lenses.js.map +1 -1
- package/dist/function-registry/manifest.d.ts +10 -4
- package/dist/function-registry/manifest.js +14 -1
- package/dist/function-registry/manifest.js.map +1 -1
- package/dist/function-registry/nodes.d.ts +1 -1
- package/dist/function-registry/nodes.js +124 -8
- package/dist/function-registry/nodes.js.map +1 -1
- package/dist/function-registry/ontologies.d.ts +1 -1
- package/dist/function-registry/ontologies.js +124 -8
- package/dist/function-registry/ontologies.js.map +1 -1
- package/dist/function-registry/pipeline.d.ts +1 -1
- package/dist/function-registry/pipeline.js +124 -8
- package/dist/function-registry/pipeline.js.map +1 -1
- package/dist/function-registry/questions.d.ts +1 -1
- package/dist/function-registry/questions.js +124 -8
- package/dist/function-registry/questions.js.map +1 -1
- package/dist/function-registry/tasks.d.ts +1 -1
- package/dist/function-registry/tasks.js +124 -8
- package/dist/function-registry/tasks.js.map +1 -1
- package/dist/function-registry/topics.d.ts +1 -1
- package/dist/function-registry/topics.js +126 -12
- package/dist/function-registry/topics.js.map +1 -1
- package/dist/function-registry/types.d.ts +1 -1
- package/dist/function-registry/worktrees.d.ts +1 -1
- package/dist/function-registry/worktrees.js +124 -8
- package/dist/function-registry/worktrees.js.map +1 -1
- package/dist/generated/infisicalRuntimeEnv.js +536 -1
- package/dist/generated/infisicalRuntimeEnv.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +941 -14
- package/dist/index.js.map +1 -1
- package/dist/infisical-runtime.base.d.ts +42 -1
- package/dist/infisical-runtime.base.js +50 -1
- package/dist/infisical-runtime.base.js.map +1 -1
- package/dist/infisical-runtime.contract.d.ts +102 -0
- package/dist/infisical-runtime.contract.js +170 -1
- package/dist/infisical-runtime.contract.js.map +1 -1
- package/dist/infisical-runtime.platform-secrets.d.ts +102 -0
- package/dist/infisical-runtime.platform-secrets.js +120 -0
- package/dist/infisical-runtime.platform-secrets.js.map +1 -1
- package/dist/infisical-runtime.tenant-secrets.js.map +1 -1
- package/dist/manifests/infisical-runtime-manifest.d.ts +144 -1
- package/dist/manifests/infisical-runtime-manifest.js +170 -1
- package/dist/manifests/infisical-runtime-manifest.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 +138 -5
- 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 +138 -5
- package/dist/projections/create-evidence.projection.js.map +1 -1
- package/dist/projections/index.d.ts +28 -0
- package/dist/projections/index.js +138 -5
- package/dist/projections/index.js.map +1 -1
- package/dist/proof-attestation.json +1 -1
- package/dist/schemas/manifest.d.ts +20 -20
- package/dist/schemas/tables/kernel/platform.d.ts +4 -4
- package/dist/sdk-methods.contract.d.ts +3 -2
- package/dist/sdk-tools.contract.js +110 -7
- package/dist/sdk-tools.contract.js.map +1 -1
- package/dist/sdk-tools.contract.registry.js +110 -7
- package/dist/sdk-tools.contract.registry.js.map +1 -1
- package/dist/sdk-tools.contract.values.js +110 -7
- package/dist/sdk-tools.contract.values.js.map +1 -1
- package/dist/tool-contracts.context-orientation.d.ts +5 -0
- package/dist/tool-contracts.context-orientation.js +57 -0
- package/dist/tool-contracts.context-orientation.js.map +1 -0
- package/dist/tool-contracts.d.ts +1 -0
- package/dist/tool-contracts.intelligence-evidence.js +26 -4
- package/dist/tool-contracts.intelligence-evidence.js.map +1 -1
- package/dist/tool-contracts.js +111 -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 +27 -1
- package/dist/tool-contracts.questions-listing.js.map +1 -1
- package/dist/{tool-contracts.values-DjctSW7S.d.ts → tool-contracts.values-BhxfrXS5.d.ts} +3 -1
- package/dist/tool-contracts.values.d.ts +1 -0
- package/dist/tool-contracts.values.js +111 -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 ["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 ["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",
|
|
@@ -50,6 +56,7 @@ function entries(names, surfaceClass, surfaceIntent, surfaces, rationale) {
|
|
|
50
56
|
);
|
|
51
57
|
}
|
|
52
58
|
var MCP_CORE_OPERATION_NAMES = [
|
|
59
|
+
"lucern_orient",
|
|
53
60
|
"compile_context",
|
|
54
61
|
"identity_whoami",
|
|
55
62
|
"resolve_interactive_principal",
|
|
@@ -59,7 +66,6 @@ var MCP_CORE_OPERATION_NAMES = [
|
|
|
59
66
|
"get_belief",
|
|
60
67
|
"list_beliefs",
|
|
61
68
|
"refine_belief",
|
|
62
|
-
"modulate_confidence",
|
|
63
69
|
"fork_belief",
|
|
64
70
|
"archive_belief",
|
|
65
71
|
"search_beliefs",
|
|
@@ -348,6 +354,13 @@ var LUCERN_OPERATION_MANIFEST = {
|
|
|
348
354
|
internalSystem,
|
|
349
355
|
"Lucern system/background operation. Available to platform code paths, hidden from public MCP discovery."
|
|
350
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
|
+
},
|
|
351
364
|
...entries(
|
|
352
365
|
LEGACY_COMPAT_OPERATION_NAMES,
|
|
353
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,GA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,IACD,wBAAA;AAAA,IACA,eAAA;AAAA,IACA,cAAA;AAAA,IACA,aAAA;AAAA,IACA;AAAA,GACF;AAAA,EACA,GAAG,OAAA;AAAA,IACD,iCAAA;AAAA,IACA,mBAAA;AAAA,IACA,QAAA;AAAA,IACA,eAAA;AAAA,IACA;AAAA;AAEJ;AAIO,SAAS,eAAe,QAAA,EAAoC;AACjE,EAAA,OAAO,QAAA,KAAa,MAAA;AACtB;AAEO,SAAS,4BACd,KAAA,EACU;AACV,EAAA,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 \"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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AAQ;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 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"]}
|
|
@@ -69,7 +69,7 @@ type FunctionConvexTarget = {
|
|
|
69
69
|
outputProjection?: ContractOutputProjection;
|
|
70
70
|
};
|
|
71
71
|
type FunctionGatewayTarget = {
|
|
72
|
-
handler: "identity.whoami" | "beliefs.list" | "evidence.list" | "questions.list" | "worktrees.get" | "tasks.create" | "tasks.list" | "tasks.update" | "tasks.complete";
|
|
72
|
+
handler: "identity.whoami" | "beliefs.list" | "evidence.get" | "evidence.list" | "evidence.search" | "questions.list" | "worktrees.get" | "tasks.create" | "tasks.list" | "tasks.update" | "tasks.complete" | "context.lucernOrient" | "graph.listIntelligenceQueries" | "topics.graphSpine";
|
|
73
73
|
};
|
|
74
74
|
|
|
75
75
|
declare const nodesContracts: readonly [{
|
|
@@ -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: {
|
|
@@ -1658,6 +1658,60 @@ var REMOVE_LENS_FROM_TOPIC = {
|
|
|
1658
1658
|
tier: "workhorse"
|
|
1659
1659
|
};
|
|
1660
1660
|
|
|
1661
|
+
// src/tool-contracts.context-orientation.ts
|
|
1662
|
+
var LUCERN_ORIENT = {
|
|
1663
|
+
name: "lucern_orient",
|
|
1664
|
+
description: "Load the Lucern reasoning grammar before operating. Like `git help` plus a repository CONTRIBUTING guide for reasoning state - teaches the git-shaped model of topics, campaigns, lanes, worktrees, beliefs, questions, evidence, receipts, gates, and merges.",
|
|
1665
|
+
parameters: {
|
|
1666
|
+
audience: {
|
|
1667
|
+
type: "string",
|
|
1668
|
+
description: "Audience for the primer: agent, human, operator, or developer.",
|
|
1669
|
+
enum: ["agent", "human", "operator", "developer"]
|
|
1670
|
+
},
|
|
1671
|
+
depth: {
|
|
1672
|
+
type: "string",
|
|
1673
|
+
description: "Orientation depth: quick, standard, or deep.",
|
|
1674
|
+
enum: ["quick", "standard", "deep"]
|
|
1675
|
+
},
|
|
1676
|
+
situation: {
|
|
1677
|
+
type: "string",
|
|
1678
|
+
description: "Optional task or query context used to tailor suggested next calls."
|
|
1679
|
+
},
|
|
1680
|
+
includeExamples: {
|
|
1681
|
+
type: "boolean",
|
|
1682
|
+
description: "Whether to include concrete tool-call examples."
|
|
1683
|
+
},
|
|
1684
|
+
includeToolMap: {
|
|
1685
|
+
type: "boolean",
|
|
1686
|
+
description: "Whether to include situation-to-tool routing guidance."
|
|
1687
|
+
},
|
|
1688
|
+
includeFuture: {
|
|
1689
|
+
type: "boolean",
|
|
1690
|
+
description: "Whether to include future exemplar, gauntlet, and training-data capabilities."
|
|
1691
|
+
}
|
|
1692
|
+
},
|
|
1693
|
+
required: [],
|
|
1694
|
+
response: {
|
|
1695
|
+
description: "Canonical operator primer for Lucern's git-shaped reasoning substrate.",
|
|
1696
|
+
fields: {
|
|
1697
|
+
schemaVersion: "string - lucern_orientation.v1",
|
|
1698
|
+
canonicalMentalModel: "object - concise model of Lucern as git-shaped reasoning state",
|
|
1699
|
+
workflow: "array - recommended branch -> investigate -> prove gate -> merge workflow",
|
|
1700
|
+
grammarMap: "array - primitive-to-git-analogy map for topics, campaigns, worktrees, beliefs, questions, evidence, edges, contradictions, and gates",
|
|
1701
|
+
firstMoves: "array - recommended first tools for a cold-start agent",
|
|
1702
|
+
receiptRules: "array - how to interpret candidateCounts, broadening, coverageWarning, narrativeCoverage, synthesisLints, and noDefaultGlobalScan",
|
|
1703
|
+
safetyRules: "array - mutation and completion rules that preserve reasoning lineage",
|
|
1704
|
+
toolMap: "array | undefined - situation-to-tool routing map when requested",
|
|
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",
|
|
1707
|
+
suggestedNextCalls: "array - safe next tool calls for the current situation"
|
|
1708
|
+
}
|
|
1709
|
+
},
|
|
1710
|
+
ownerModule: "reasoning-kernel",
|
|
1711
|
+
ontologyPrimitive: "graph",
|
|
1712
|
+
tier: "showcase"
|
|
1713
|
+
};
|
|
1714
|
+
|
|
1661
1715
|
// src/tool-contracts.intelligence-evidence.ts
|
|
1662
1716
|
var DETECT_CONFIRMATION_BIAS = {
|
|
1663
1717
|
name: "detect_confirmation_bias",
|
|
@@ -1812,7 +1866,7 @@ var SEARCH_EVIDENCE = {
|
|
|
1812
1866
|
};
|
|
1813
1867
|
var CREATE_EVIDENCE = {
|
|
1814
1868
|
name: "create_evidence",
|
|
1815
|
-
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.",
|
|
1816
1870
|
parameters: {
|
|
1817
1871
|
topicId: { type: "string", description: "Topic scope" },
|
|
1818
1872
|
text: { type: "string", description: "Canonical evidence text" },
|
|
@@ -1823,7 +1877,20 @@ var CREATE_EVIDENCE = {
|
|
|
1823
1877
|
},
|
|
1824
1878
|
weight: {
|
|
1825
1879
|
type: "number",
|
|
1826
|
-
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."
|
|
1827
1894
|
},
|
|
1828
1895
|
metadata: {
|
|
1829
1896
|
type: "object",
|
|
@@ -1933,7 +2000,7 @@ var LINK_EVIDENCE = {
|
|
|
1933
2000
|
};
|
|
1934
2001
|
var LINK_EVIDENCE_TO_BELIEF = {
|
|
1935
2002
|
name: "link_evidence_to_belief",
|
|
1936
|
-
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.",
|
|
1937
2004
|
parameters: {
|
|
1938
2005
|
evidenceId: { type: "string", description: "The evidence node ID" },
|
|
1939
2006
|
beliefId: { type: "string", description: "The belief node ID" },
|
|
@@ -1941,9 +2008,18 @@ var LINK_EVIDENCE_TO_BELIEF = {
|
|
|
1941
2008
|
type: "number",
|
|
1942
2009
|
description: "Support weight: -1.0 (contradicts) to +1.0 (supports)"
|
|
1943
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
|
+
},
|
|
1944
2020
|
rationale: { type: "string", description: "Why this evidence is relevant" }
|
|
1945
2021
|
},
|
|
1946
|
-
required: ["evidenceId", "beliefId"
|
|
2022
|
+
required: ["evidenceId", "beliefId"],
|
|
1947
2023
|
response: {
|
|
1948
2024
|
description: "The created edge linking evidence to belief",
|
|
1949
2025
|
fields: {
|
|
@@ -2708,10 +2784,34 @@ var COMPILE_CONTEXT = {
|
|
|
2708
2784
|
type: "string",
|
|
2709
2785
|
description: "Optional source kind used as a resolver signal, such as cli, worktree, commit, or docs."
|
|
2710
2786
|
},
|
|
2787
|
+
campaign: {
|
|
2788
|
+
type: "number",
|
|
2789
|
+
description: "Optional campaign dimension seed. When supplied without topicId, the compiler fans out across all carrier topics for that campaign instead of resolving a single topic."
|
|
2790
|
+
},
|
|
2791
|
+
lane: {
|
|
2792
|
+
type: "string",
|
|
2793
|
+
description: "Optional lane dimension seed. When supplied without topicId, the compiler reads all matching worktrees and their carrier topics."
|
|
2794
|
+
},
|
|
2795
|
+
status: {
|
|
2796
|
+
type: "string",
|
|
2797
|
+
description: "Optional state/status dimension seed for worktrees and graph rows."
|
|
2798
|
+
},
|
|
2799
|
+
principalId: {
|
|
2800
|
+
type: "string",
|
|
2801
|
+
description: "Optional principal seed for work authored, touched, or owned by a human, agent, group, or service principal."
|
|
2802
|
+
},
|
|
2803
|
+
workspaceId: {
|
|
2804
|
+
type: "string",
|
|
2805
|
+
description: "Optional workspace seed used by hosted MCP and SDK clients when compiling tenant-scoped context."
|
|
2806
|
+
},
|
|
2711
2807
|
budget: {
|
|
2712
2808
|
type: "number",
|
|
2713
2809
|
description: "Token budget for prompt injection planning"
|
|
2714
2810
|
},
|
|
2811
|
+
tokenBudget: {
|
|
2812
|
+
type: "number",
|
|
2813
|
+
description: "Compatibility alias for budget. External MCP clients may send tokenBudget when requesting prompt injection planning."
|
|
2814
|
+
},
|
|
2715
2815
|
ranking: {
|
|
2716
2816
|
type: "string",
|
|
2717
2817
|
description: "Ranking profile for context ordering",
|
|
@@ -2747,7 +2847,9 @@ var COMPILE_CONTEXT = {
|
|
|
2747
2847
|
recentEvidence: "array \u2014 recent evidence ranked for this query",
|
|
2748
2848
|
contradictions: "array \u2014 unresolved contradiction records",
|
|
2749
2849
|
relatedEntities: "array | undefined \u2014 ranked ontological entities in scope",
|
|
2750
|
-
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",
|
|
2751
2853
|
injectionPolicy: "object \u2014 token-budgeted section selections",
|
|
2752
2854
|
diagnostics: "object \u2014 scoring and utilization telemetry"
|
|
2753
2855
|
}
|
|
@@ -4618,6 +4720,7 @@ var MCP_TOOL_CONTRACTS = {
|
|
|
4618
4720
|
update_worktree_metadata: UPDATE_WORKTREE_METADATA,
|
|
4619
4721
|
identity_whoami: IDENTITY_WHOAMI,
|
|
4620
4722
|
resolve_interactive_principal: RESOLVE_INTERACTIVE_PRINCIPAL,
|
|
4723
|
+
lucern_orient: LUCERN_ORIENT,
|
|
4621
4724
|
compile_context: COMPILE_CONTEXT,
|
|
4622
4725
|
record_scope_learning: RECORD_SCOPE_LEARNING,
|
|
4623
4726
|
pipeline_snapshot: PIPELINE_SNAPSHOT,
|
|
@@ -4694,6 +4797,12 @@ var internalSystem = {
|
|
|
4694
4797
|
mcp: "internal",
|
|
4695
4798
|
cli: "internal"
|
|
4696
4799
|
};
|
|
4800
|
+
var internalSdkRestOnly = {
|
|
4801
|
+
sdk: "internal",
|
|
4802
|
+
rest: "internal",
|
|
4803
|
+
mcp: "none",
|
|
4804
|
+
cli: "none"
|
|
4805
|
+
};
|
|
4697
4806
|
var publicWithInternalMcp = {
|
|
4698
4807
|
sdk: "public",
|
|
4699
4808
|
rest: "public",
|
|
@@ -4733,6 +4842,7 @@ function entries(names, surfaceClass, surfaceIntent, surfaces, rationale) {
|
|
|
4733
4842
|
);
|
|
4734
4843
|
}
|
|
4735
4844
|
var MCP_CORE_OPERATION_NAMES = [
|
|
4845
|
+
"lucern_orient",
|
|
4736
4846
|
"compile_context",
|
|
4737
4847
|
"identity_whoami",
|
|
4738
4848
|
"resolve_interactive_principal",
|
|
@@ -4742,7 +4852,6 @@ var MCP_CORE_OPERATION_NAMES = [
|
|
|
4742
4852
|
"get_belief",
|
|
4743
4853
|
"list_beliefs",
|
|
4744
4854
|
"refine_belief",
|
|
4745
|
-
"modulate_confidence",
|
|
4746
4855
|
"fork_belief",
|
|
4747
4856
|
"archive_belief",
|
|
4748
4857
|
"search_beliefs",
|
|
@@ -5010,6 +5119,13 @@ var LUCERN_OPERATION_MANIFEST = {
|
|
|
5010
5119
|
internalSystem,
|
|
5011
5120
|
"Lucern system/background operation. Available to platform code paths, hidden from public MCP discovery."
|
|
5012
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
|
+
},
|
|
5013
5129
|
...entries(
|
|
5014
5130
|
LEGACY_COMPAT_OPERATION_NAMES,
|
|
5015
5131
|
"legacy_compat",
|