@contextecf/guardian-cli 0.1.9 → 0.1.11
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.
|
@@ -23516,7 +23516,7 @@ var init_runtime = __esm({
|
|
|
23516
23516
|
"use strict";
|
|
23517
23517
|
init_src();
|
|
23518
23518
|
init_src2();
|
|
23519
|
-
GUARDIAN_CLI_VERSION = "0.1.
|
|
23519
|
+
GUARDIAN_CLI_VERSION = "0.1.11";
|
|
23520
23520
|
GUARDIAN_PROFILE_SCHEMA_VERSION = "contextecf/project-guardian-profile/v1";
|
|
23521
23521
|
GUARDIAN_NPM_PACKAGE_NAME = "@contextecf/guardian-cli";
|
|
23522
23522
|
GUARDIAN_NPM_REGISTRY = "https://registry.npmjs.org/";
|
|
@@ -25268,8 +25268,10 @@ async function startGuardianMcpStdioServer(server) {
|
|
|
25268
25268
|
continue;
|
|
25269
25269
|
}
|
|
25270
25270
|
const response = await resolvedServer.handleJsonRpc(request);
|
|
25271
|
-
|
|
25271
|
+
if (response !== void 0) {
|
|
25272
|
+
output.write(`${JSON.stringify(response)}
|
|
25272
25273
|
`);
|
|
25274
|
+
}
|
|
25273
25275
|
}
|
|
25274
25276
|
} finally {
|
|
25275
25277
|
owned?.close();
|
|
@@ -25461,7 +25463,7 @@ function stableId(...parts) {
|
|
|
25461
25463
|
function digest3(value) {
|
|
25462
25464
|
return `sha256:${createHash4("sha256").update(value).digest("hex")}`;
|
|
25463
25465
|
}
|
|
25464
|
-
var NonEmptyStringSchema3, HashSchema3, GuardianSurfaceInputSchema, GuardianProviderInputSchema, SourceTypeInputSchema, LocalActionTypeInputSchema, CheckPromptInputSchema, GetContextInputSchema, CoachPromptInputSchema, ApplyPolicyInputSchema, RequestLocalActionInputSchema, GetReceiptInputSchema, RecordOutcomeInputSchema, SearchGraphInputSchema, JsonRpcRequestSchema, RiskReportPayloadSchema, GUARDIAN_MCP_TOOL_DEFINITIONS, GuardianMcpServer, ToolsCallParamsSchema;
|
|
25466
|
+
var GUARDIAN_MCP_PROTOCOL_VERSION, GUARDIAN_MCP_SERVER_VERSION, NonEmptyStringSchema3, HashSchema3, GuardianSurfaceInputSchema, GuardianProviderInputSchema, SourceTypeInputSchema, LocalActionTypeInputSchema, CheckPromptInputSchema, GetContextInputSchema, CoachPromptInputSchema, ApplyPolicyInputSchema, RequestLocalActionInputSchema, GetReceiptInputSchema, RecordOutcomeInputSchema, SearchGraphInputSchema, JsonRpcRequestSchema, RiskReportPayloadSchema, GUARDIAN_MCP_TOOL_DEFINITIONS, GuardianMcpServer, ToolsCallParamsSchema;
|
|
25465
25467
|
var init_server = __esm({
|
|
25466
25468
|
"packages/guardian-mcp-server/src/server.ts"() {
|
|
25467
25469
|
"use strict";
|
|
@@ -25469,6 +25471,8 @@ var init_server = __esm({
|
|
|
25469
25471
|
init_src3();
|
|
25470
25472
|
init_src2();
|
|
25471
25473
|
init_zod();
|
|
25474
|
+
GUARDIAN_MCP_PROTOCOL_VERSION = "2025-06-18";
|
|
25475
|
+
GUARDIAN_MCP_SERVER_VERSION = "0.1.0";
|
|
25472
25476
|
NonEmptyStringSchema3 = external_exports.string().trim().min(1);
|
|
25473
25477
|
HashSchema3 = external_exports.string().regex(/^(sha256:)?[a-f0-9]{64}$/);
|
|
25474
25478
|
GuardianSurfaceInputSchema = external_exports.enum(["browser", "desktop", "mcp", "ide", "cli", "rest", "voice", "unknown"]).default("mcp");
|
|
@@ -25816,6 +25820,34 @@ var init_server = __esm({
|
|
|
25816
25820
|
error: { code: -32600, message: flattenZodError(parsed.error) }
|
|
25817
25821
|
};
|
|
25818
25822
|
}
|
|
25823
|
+
if (parsed.data.method === "notifications/initialized") {
|
|
25824
|
+
return void 0;
|
|
25825
|
+
}
|
|
25826
|
+
if (parsed.data.method === "initialize") {
|
|
25827
|
+
const params = external_exports.object({ protocolVersion: external_exports.string().optional() }).passthrough().optional().safeParse(parsed.data.params);
|
|
25828
|
+
return {
|
|
25829
|
+
jsonrpc: "2.0",
|
|
25830
|
+
id: parsed.data.id,
|
|
25831
|
+
result: {
|
|
25832
|
+
protocolVersion: params.success ? params.data?.protocolVersion ?? GUARDIAN_MCP_PROTOCOL_VERSION : GUARDIAN_MCP_PROTOCOL_VERSION,
|
|
25833
|
+
capabilities: {
|
|
25834
|
+
tools: {}
|
|
25835
|
+
},
|
|
25836
|
+
serverInfo: {
|
|
25837
|
+
name: "guardian",
|
|
25838
|
+
version: GUARDIAN_MCP_SERVER_VERSION
|
|
25839
|
+
},
|
|
25840
|
+
instructions: "Guardian checks prompts, policy, local context, receipts, and governed local action requests using the user local Guardian runtime."
|
|
25841
|
+
}
|
|
25842
|
+
};
|
|
25843
|
+
}
|
|
25844
|
+
if (parsed.data.method === "ping") {
|
|
25845
|
+
return {
|
|
25846
|
+
jsonrpc: "2.0",
|
|
25847
|
+
id: parsed.data.id,
|
|
25848
|
+
result: {}
|
|
25849
|
+
};
|
|
25850
|
+
}
|
|
25819
25851
|
if (parsed.data.method === "tools/list") {
|
|
25820
25852
|
return {
|
|
25821
25853
|
jsonrpc: "2.0",
|
|
@@ -16275,7 +16275,7 @@ function cloneList(values) {
|
|
|
16275
16275
|
}
|
|
16276
16276
|
|
|
16277
16277
|
// packages/guardian-cli/src/runtime.ts
|
|
16278
|
-
var GUARDIAN_CLI_VERSION = "0.1.
|
|
16278
|
+
var GUARDIAN_CLI_VERSION = "0.1.11";
|
|
16279
16279
|
var GUARDIAN_PROFILE_SCHEMA_VERSION = "contextecf/project-guardian-profile/v1";
|
|
16280
16280
|
var GUARDIAN_NPM_PACKAGE_NAME = "@contextecf/guardian-cli";
|
|
16281
16281
|
var GUARDIAN_NPM_REGISTRY = "https://registry.npmjs.org/";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Writable } from 'node:stream';
|
|
2
2
|
import { type PolicyPackMarketplaceManifest } from '@contextecf/personal-fabric-contracts';
|
|
3
3
|
import { SQLitePersonalFabricStore, type PersonalFabricDataImportResult, type PersonalFabricMutableDataDeleteResult, type SQLitePersonalFabricBackupResult } from '@contextecf/personal-fabric-store';
|
|
4
|
-
export declare const GUARDIAN_CLI_VERSION = "0.1.
|
|
4
|
+
export declare const GUARDIAN_CLI_VERSION = "0.1.11";
|
|
5
5
|
export declare const GUARDIAN_PROFILE_SCHEMA_VERSION = "contextecf/project-guardian-profile/v1";
|
|
6
6
|
export declare const GUARDIAN_NPM_PACKAGE_NAME = "@contextecf/guardian-cli";
|
|
7
7
|
export declare const GUARDIAN_NPM_REGISTRY = "https://registry.npmjs.org/";
|