@lucern/mcp 0.3.0-alpha.0 → 0.3.0-alpha.10

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/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { McpToolContract, GatewayClientConfig, MCP_TOOL_CONTRACTS } from '@lucern/sdk';
2
+ export { runLucernMcpCli } from './cli.js';
2
3
  import { IncomingMessage, ServerResponse } from 'node:http';
3
4
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
4
5
  import { Client } from '@modelcontextprotocol/sdk/client/index.js';
5
- import { ConvexHttpClient } from 'convex/browser';
6
6
 
7
7
  type ObservationKind = "claim" | "evidence" | "question" | "contradiction" | "judgment" | "note";
8
8
  type ObservationRecord = {
@@ -137,8 +137,6 @@ declare const LUCERN_OBSERVER_PROMPT_NAME = "lucern-observer";
137
137
  declare const LUCERN_AGENT_MD = "# Lucern \u2014 Reasoning Intelligence\n\nYou are connected to a Lucern reasoning graph. Lucern tracks beliefs, evidence,\nquestions, judgments, and contradictions as structured reasoning state.\n\n## Behavioral Mode\n\nOperate in active observation mode:\n\n1. Watch for claims, evidence, questions, and contradictions.\n2. Suggest graph updates when reasoning-relevant events appear.\n3. Always request user confirmation before mutating graph state.\n4. Preserve uncertainty explicitly; unresolved contradictions are valid.\n\nUse this suggestion format:\n\n`\uD83D\uDD0D Lucern detected: [what changed] -> Want me to log this?`\n\n## Tool Use Defaults\n\n1. Read context first for substantive questions.\n2. Prefer atomic writes: create belief/evidence/question separately, then link edges.\n3. Use worktree lifecycle for investigations: add_worktree -> merge -> push.\n4. Never auto-score confidence without explicit rationale.\n\n## Safety Defaults\n\n1. Do not fabricate evidence.\n2. Do not collapse contradictions automatically.\n3. Keep provenance and rationale in every write path.\n";
138
138
  declare function buildLucernObserverPrompt(topicId?: string): string;
139
139
 
140
- declare function runLucernMcpCli(argv?: readonly string[]): Promise<void>;
141
-
142
140
  type ResourceUri = (typeof LUCERN_MCP_RESOURCE_URIS)[number];
143
141
  type BuiltinToolName = keyof typeof MCP_TOOL_CONTRACTS;
144
142
  type ToolName = string;
@@ -293,9 +291,9 @@ declare const SCOPE_MCP_TOOLS: Record<string, McpToolContract>;
293
291
 
294
292
  type JsonRecord = Record<string, unknown>;
295
293
  declare function initializeLucernScriptEnv(): void;
294
+ declare function initializeLucernScriptEnvAsync(): Promise<void>;
296
295
  declare function readArg(name: string, fallback?: string): string | undefined;
297
296
  declare function createLucernMcpClient(): Promise<Client>;
298
- declare function createLucernAdminClient(): ConvexHttpClient;
299
297
  declare function resolveMcpSessionTenantId(): Promise<string | undefined>;
300
298
  declare function callMcpTool<T extends JsonRecord = JsonRecord>(client: Client, toolName: string, args: JsonRecord): Promise<T>;
301
299
  declare function closeMcpClient(client: Client): Promise<void>;
@@ -307,4 +305,4 @@ type ValidationResult = {
307
305
  };
308
306
  declare function validateContextPackSchema(payload: unknown): ValidationResult;
309
307
 
310
- export { type AuthenticatedGatewayHandler, BOOTSTRAP_MCP_TOOLS, COORDINATION_MCP_TOOLS, type ContextRankingProfile, EPISTEMIC_CONTRACT_MCP_TOOLS, type JsonRecord, LUCERN_AGENT_MD, LUCERN_MCP_RESOURCE_URIS, LUCERN_MCP_TOOL_NAMES, LUCERN_OBSERVER_PROMPT_NAME, LUCERN_PUBLIC_MCP_TOOL_NAMES, type McpAuthContext, McpObservationStore, type RemoteMcpServerOptions, SCOPE_MCP_TOOLS, type StandaloneMcpServerOptions, type ToolExecutionAuditEvent, type ToolExecutionAuthMode, type ToolExecutionEnvelope, type ToolExecutionTransportKind, type TransportParityDriftKind, buildAuthenticatedHandlerMap, buildLucernObserverPrompt, callMcpTool, classifyTransportParityDrift, closeMcpClient, createLucernAdminClient, createLucernMcpClient, createLucernMcpHttpRequestHandler, createLucernMcpServer, createLucernStandaloneMcpServer, createMcpHandlerRegistry, createToolExecutionEnvelope, executeToolWithEnvelope, initializeLucernScriptEnv, loadDiscoveryHandlers, parseToolExecutionMetadata, readArg, resolveMcpCredentials, resolveMcpSessionTenantId, runLucernMcpCli, startLucernMcpHttpServer, startLucernMcpStdioServer, validateContextPackSchema };
308
+ export { type AuthenticatedGatewayHandler, BOOTSTRAP_MCP_TOOLS, COORDINATION_MCP_TOOLS, type ContextRankingProfile, EPISTEMIC_CONTRACT_MCP_TOOLS, type JsonRecord, LUCERN_AGENT_MD, LUCERN_MCP_RESOURCE_URIS, LUCERN_MCP_TOOL_NAMES, LUCERN_OBSERVER_PROMPT_NAME, LUCERN_PUBLIC_MCP_TOOL_NAMES, type McpAuthContext, McpObservationStore, type RemoteMcpServerOptions, SCOPE_MCP_TOOLS, type StandaloneMcpServerOptions, type ToolExecutionAuditEvent, type ToolExecutionAuthMode, type ToolExecutionEnvelope, type ToolExecutionTransportKind, type TransportParityDriftKind, buildAuthenticatedHandlerMap, buildLucernObserverPrompt, callMcpTool, classifyTransportParityDrift, closeMcpClient, createLucernMcpClient, createLucernMcpHttpRequestHandler, createLucernMcpServer, createLucernStandaloneMcpServer, createMcpHandlerRegistry, createToolExecutionEnvelope, executeToolWithEnvelope, initializeLucernScriptEnv, initializeLucernScriptEnvAsync, loadDiscoveryHandlers, parseToolExecutionMetadata, readArg, resolveMcpCredentials, resolveMcpSessionTenantId, startLucernMcpHttpServer, startLucernMcpStdioServer, validateContextPackSchema };