@lucern/mcp 0.3.0-alpha.2 → 0.3.0-alpha.3
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/README.md +12 -7
- package/bin/lucern-mcp.js +1 -1
- package/dist/cli.d.ts +3 -0
- package/dist/cli.js +23370 -0
- package/dist/cli.js.map +1 -0
- package/dist/gateway.d.ts +117 -1
- package/dist/gateway.js +658 -53
- package/dist/gateway.js.map +1 -1
- package/dist/hosted-route.js +2586 -517
- package/dist/hosted-route.js.map +1 -1
- package/dist/index.d.ts +2 -5
- package/dist/index.js +2854 -618
- package/dist/index.js.map +1 -1
- package/dist/runtime.d.ts +2 -34
- package/dist/runtime.js +145 -686
- package/dist/runtime.js.map +1 -1
- package/package.json +6 -6
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;
|
|
@@ -295,7 +293,6 @@ type JsonRecord = Record<string, unknown>;
|
|
|
295
293
|
declare function initializeLucernScriptEnv(): void;
|
|
296
294
|
declare function readArg(name: string, fallback?: string): string | undefined;
|
|
297
295
|
declare function createLucernMcpClient(): Promise<Client>;
|
|
298
|
-
declare function createLucernAdminClient(): ConvexHttpClient;
|
|
299
296
|
declare function resolveMcpSessionTenantId(): Promise<string | undefined>;
|
|
300
297
|
declare function callMcpTool<T extends JsonRecord = JsonRecord>(client: Client, toolName: string, args: JsonRecord): Promise<T>;
|
|
301
298
|
declare function closeMcpClient(client: Client): Promise<void>;
|
|
@@ -307,4 +304,4 @@ type ValidationResult = {
|
|
|
307
304
|
};
|
|
308
305
|
declare function validateContextPackSchema(payload: unknown): ValidationResult;
|
|
309
306
|
|
|
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,
|
|
307
|
+
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, loadDiscoveryHandlers, parseToolExecutionMetadata, readArg, resolveMcpCredentials, resolveMcpSessionTenantId, startLucernMcpHttpServer, startLucernMcpStdioServer, validateContextPackSchema };
|