@lucern/mcp 0.3.0-alpha.16 → 0.3.0-alpha.2

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';
3
2
  import { IncomingMessage, ServerResponse } from 'node:http';
4
3
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
5
4
  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,6 +137,8 @@ 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
+
140
142
  type ResourceUri = (typeof LUCERN_MCP_RESOURCE_URIS)[number];
141
143
  type BuiltinToolName = keyof typeof MCP_TOOL_CONTRACTS;
142
144
  type ToolName = string;
@@ -291,9 +293,9 @@ declare const SCOPE_MCP_TOOLS: Record<string, McpToolContract>;
291
293
 
292
294
  type JsonRecord = Record<string, unknown>;
293
295
  declare function initializeLucernScriptEnv(): void;
294
- declare function initializeLucernScriptEnvAsync(): Promise<void>;
295
296
  declare function readArg(name: string, fallback?: string): string | undefined;
296
297
  declare function createLucernMcpClient(): Promise<Client>;
298
+ declare function createLucernAdminClient(): ConvexHttpClient;
297
299
  declare function resolveMcpSessionTenantId(): Promise<string | undefined>;
298
300
  declare function callMcpTool<T extends JsonRecord = JsonRecord>(client: Client, toolName: string, args: JsonRecord): Promise<T>;
299
301
  declare function closeMcpClient(client: Client): Promise<void>;
@@ -305,4 +307,4 @@ type ValidationResult = {
305
307
  };
306
308
  declare function validateContextPackSchema(payload: unknown): ValidationResult;
307
309
 
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 };
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 };