multicorn-shield 0.12.0 → 1.0.0

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 CHANGED
@@ -5,6 +5,23 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.0.0] - 2026-05-02
9
+
10
+ ### Changed
11
+
12
+ - CLI binary renamed from `multicorn-proxy` to `multicorn-shield`. The `multicorn-proxy` command still works but prints a deprecation warning. All user-facing documentation and dashboard references use `npx multicorn-shield`.
13
+
14
+ ### Deprecated
15
+
16
+ - `multicorn-proxy` binary alias. Use `multicorn-shield` instead.
17
+
18
+ ### Added
19
+
20
+ - Gemini CLI native plugin: BeforeTool/AfterTool hook scripts for full governance
21
+ - Gemini CLI hosted proxy support with httpUrl config field
22
+ - CLI wizard: Gemini CLI platform with native plugin and hosted proxy integration modes
23
+ - CLI wizard: platform prerequisite detection (warns if target platform is not installed)
24
+
8
25
  ## [X.Y.Z] - YYYY-MM-DD
9
26
 
10
27
  ### Added
@@ -63,13 +80,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
63
80
  ### Added
64
81
 
65
82
  - Windsurf native integration via Cascade Hooks (`pre_*` / `post_*` for reads, writes, terminal, and MCP). Hook scripts install to `~/.multicorn/windsurf-hooks/` and add entries to `~/.codeium/windsurf/hooks.json`.
66
- - `npx multicorn-proxy init`: when you pick Windsurf, choose Native plugin (recommended) or Hosted proxy. Native path registers Shield hooks and reminds you to restart Windsurf.
83
+ - `npx multicorn-shield init`: when you pick Windsurf, choose Native plugin (recommended) or Hosted proxy. Native path registers Shield hooks and reminds you to restart Windsurf.
67
84
 
68
85
  ## [0.8.0] - 2026-04-12
69
86
 
70
87
  ### Added
71
88
 
72
- - Windsurf IDE as a supported platform in `npx multicorn-proxy init`. Generates a proxy config and prints an `~/.codeium/windsurf/mcp_config.json` snippet using the Windsurf `mcpServers` / `serverUrl` schema.
89
+ - Windsurf IDE as a supported platform in `npx multicorn-shield init`. Generates a proxy config and prints an `~/.codeium/windsurf/mcp_config.json` snippet using the Windsurf `mcpServers` / `serverUrl` schema.
73
90
  - Auto-detection of existing Windsurf proxy entries (shows "● detected locally" in the platform selection list).
74
91
 
75
92
  ### Changed
@@ -80,23 +97,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
80
97
 
81
98
  ### Added
82
99
 
83
- - New `--api-key <key>` CLI flag on `multicorn-proxy --wrap`. Lets users run the proxy without first creating a config file.
100
+ - New `--api-key <key>` CLI flag on `multicorn-shield --wrap`. Lets users run the proxy without first creating a config file.
84
101
  - New `MULTICORN_API_KEY` environment variable support. Resolves with priority `--api-key` flag > `MULTICORN_API_KEY` env var > `~/.multicorn/config.json`.
85
- - New "Local MCP / Other" option in the `multicorn-proxy init` wizard. Skips the platform-specific setup steps and writes a minimal config suitable for wrapping any local MCP server with `--wrap`.
102
+ - New "Local MCP / Other" option in the `multicorn-shield init` wizard. Skips the platform-specific setup steps and writes a minimal config suitable for wrapping any local MCP server with `--wrap`.
86
103
  - SDK constructor now validates the API key format and rejects invalid keys (empty, wrong prefix, too short, or the literal placeholder `mcs_your_key_here`) with a clear error pointing at the settings page.
87
104
 
88
105
  ### Changed
89
106
 
90
- - `multicorn-proxy init` platform menu now labels detected platforms as "detected locally" instead of "connected", with a dimmed dot icon instead of a green checkmark. The previous label implied account-level connection state, but the underlying detection only checks for local config files.
91
- - Error message when no API key is configured now mentions all three sources: the `--api-key` flag, the `MULTICORN_API_KEY` environment variable, and the `npx multicorn-proxy init` config file path.
107
+ - `multicorn-shield init` platform menu now labels detected platforms as "detected locally" instead of "connected", with a dimmed dot icon instead of a green checkmark. The previous label implied account-level connection state, but the underlying detection only checks for local config files.
108
+ - Error message when no API key is configured now mentions all three sources: the `--api-key` flag, the `MULTICORN_API_KEY` environment variable, and the `npx multicorn-shield init` config file path.
92
109
  - All references to the API keys settings page now use the fragment URL `https://app.multicorn.ai/settings#api-keys` instead of the previous `/settings/api-keys` path which did not exist.
93
110
 
94
111
  ### Fixed
95
112
 
96
- - `multicorn-proxy --wrap` now fails immediately at startup with a clear error if the configured API key is rejected by the Multicorn service. Previously the proxy logged "Agent resolved" and "Proxy ready" with empty agent state and only blocked tool calls at runtime, leaving users confused about why their setup was not working.
97
- - `multicorn-proxy --wrap` now correctly accepts proxy flags (`--api-key`, `--base-url`, `--log-level`, `--dashboard-url`, `--agent-name`) when they appear between `--wrap` and the wrap command. Previously the parser bailed with "requires a command to run" because the early-exit guard rejected any flag-shaped token in that position before the stripping logic ran.
98
- - `multicorn-proxy init` exit summary no longer renders a trailing dash for the "Local MCP / Other" option (which has no agent name). The summary line now reads `✓ Local MCP / Other` instead of `✓ Local MCP / Other -`.
99
- - `multicorn-proxy init` no longer prints a misleading "Next steps" block referencing "Other MCP Agent" and `--agent-name` after the "Local MCP / Other" option. The "Try it" example printed inside the option 4 branch is sufficient guidance.
113
+ - `multicorn-shield --wrap` now fails immediately at startup with a clear error if the configured API key is rejected by the Multicorn service. Previously the proxy logged "Agent resolved" and "Proxy ready" with empty agent state and only blocked tool calls at runtime, leaving users confused about why their setup was not working.
114
+ - `multicorn-shield --wrap` now correctly accepts proxy flags (`--api-key`, `--base-url`, `--log-level`, `--dashboard-url`, `--agent-name`) when they appear between `--wrap` and the wrap command. Previously the parser bailed with "requires a command to run" because the early-exit guard rejected any flag-shaped token in that position before the stripping logic ran.
115
+ - `multicorn-shield init` exit summary no longer renders a trailing dash for the "Local MCP / Other" option (which has no agent name). The summary line now reads `✓ Local MCP / Other` instead of `✓ Local MCP / Other -`.
116
+ - `multicorn-shield init` no longer prints a misleading "Next steps" block referencing "Other MCP Agent" and `--agent-name` after the "Local MCP / Other" option. The "Try it" example printed inside the option 4 branch is sufficient guidance.
100
117
 
101
118
  ## [0.6.2] - 2026-04-09
102
119
 
@@ -131,7 +148,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
131
148
  ### Added
132
149
 
133
150
  - Multi-agent config support: `~/.multicorn/config.json` now stores an `agents` array with per-platform entries instead of a single `agentName`
134
- - New CLI commands: `npx multicorn-proxy agents` (list configured agents) and `npx multicorn-proxy delete-agent <name>` (remove an agent)
151
+ - New CLI commands: `npx multicorn-shield agents` (list configured agents) and `npx multicorn-shield delete-agent <name>` (remove an agent)
135
152
  - New exported helpers: `getAgentByPlatform()`, `getDefaultAgent()`, `collectAgentsFromConfig()`, `deleteAgentByName()`
136
153
  - `AgentEntry` interface exported from the SDK
137
154
  - Automatic migration: legacy single-agent configs are upgraded to the new format on first read and written back to disk
@@ -151,7 +168,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
151
168
 
152
169
  ### Fixed
153
170
 
154
- - Running `npx multicorn-proxy init` for a second platform no longer overwrites the first agent's config
171
+ - Running `npx multicorn-shield init` for a second platform no longer overwrites the first agent's config
155
172
  - `delete-agent` clears `defaultAgent` when deleting the default agent instead of leaving a dangling reference
156
173
 
157
174
  ### Security
package/README.md CHANGED
@@ -35,21 +35,21 @@ npm install -g multicorn-shield
35
35
  **Step 2: Set up your API key**
36
36
 
37
37
  ```bash
38
- npx multicorn-proxy init
38
+ npx multicorn-shield init
39
39
  ```
40
40
 
41
- The init wizard supports multiple agents. Run it again to add agents on different platforms (OpenClaw, Claude Code, Cursor) without losing existing config. Use `npx multicorn-proxy agents` to see configured agents.
41
+ The init wizard supports multiple agents. Run it again to add agents on different platforms (OpenClaw, Claude Code, Cursor) without losing existing config. Use `npx multicorn-shield agents` to see configured agents.
42
42
 
43
43
  **Step 3: Wrap your MCP server**
44
44
 
45
45
  ```bash
46
- npx multicorn-proxy --wrap <your-mcp-server>
46
+ npx multicorn-shield --wrap <your-mcp-server>
47
47
  ```
48
48
 
49
49
  For example, to wrap the MCP filesystem server:
50
50
 
51
51
  ```bash
52
- npx multicorn-proxy --wrap npx @modelcontextprotocol/server-filesystem /tmp
52
+ npx multicorn-shield --wrap npx @modelcontextprotocol/server-filesystem /tmp
53
53
  ```
54
54
 
55
55
  That's it. Every tool call now goes through Shield's permission layer, and activity appears in your [Multicorn dashboard](https://app.multicorn.ai) in real time.
@@ -86,7 +86,7 @@ If you're running [OpenClaw](https://openclaw.ai), Shield integrates directly as
86
86
 
87
87
  ```bash
88
88
  npm install -g multicorn-shield
89
- npx multicorn-proxy init
89
+ npx multicorn-shield init
90
90
  ```
91
91
 
92
92
  Enter your API key when prompted. This saves your key to `~/.multicorn/config.json` and configures the OpenClaw hook environment.
package/dist/index.cjs CHANGED
@@ -14,6 +14,18 @@ var __decorateClass = (decorators, target, key, kind) => {
14
14
  };
15
15
 
16
16
  // src/types/index.ts
17
+ var AGENT_PLATFORM_SLUGS = [
18
+ "openclaw",
19
+ "claude-code",
20
+ "claude-desktop",
21
+ "cursor",
22
+ "windsurf",
23
+ "cline",
24
+ "gemini-cli",
25
+ "other-mcp",
26
+ "github-actions",
27
+ "unknown"
28
+ ];
17
29
  var AGENT_STATUSES = {
18
30
  Active: "active",
19
31
  Paused: "paused",
@@ -2893,6 +2905,7 @@ function validateApiKey(apiKey) {
2893
2905
  }
2894
2906
 
2895
2907
  exports.ACTION_STATUSES = ACTION_STATUSES;
2908
+ exports.AGENT_PLATFORM_SLUGS = AGENT_PLATFORM_SLUGS;
2896
2909
  exports.AGENT_STATUSES = AGENT_STATUSES;
2897
2910
  exports.BUILT_IN_SERVICES = BUILT_IN_SERVICES;
2898
2911
  exports.CONSENT_ELEMENT_TAG = CONSENT_ELEMENT_TAG;
package/dist/index.d.cts CHANGED
@@ -9,6 +9,11 @@ import { LitElement, PropertyValues, HTMLTemplateResult } from 'lit';
9
9
  *
10
10
  * @module types
11
11
  */
12
+ /**
13
+ * Agent client platforms supported by hosted proxy and native hooks (aligned with API validation).
14
+ */
15
+ declare const AGENT_PLATFORM_SLUGS: readonly ["openclaw", "claude-code", "claude-desktop", "cursor", "windsurf", "cline", "gemini-cli", "other-mcp", "github-actions", "unknown"];
16
+ type AgentPlatformSlug = (typeof AGENT_PLATFORM_SLUGS)[number];
12
17
  /**
13
18
  * Possible operational states for an agent.
14
19
  *
@@ -2310,4 +2315,4 @@ interface ContentReviewRequestPayload {
2310
2315
  */
2311
2316
  declare function requestContentReview(payload: ContentReviewRequestPayload, apiKey: string, baseUrl: string, logger?: PluginLogger): Promise<ContentReviewResult>;
2312
2317
 
2313
- export { ACTION_STATUSES, AGENT_STATUSES, type Action, type ActionInput, type ActionLogger, type ActionLoggerConfig, type ActionPayload, type ActionStatus, type Agent, type AgentStatus, type ApiError, BUILT_IN_SERVICES, type BatchModeConfig, type BuiltInServiceName, CONSENT_ELEMENT_TAG, type ConsentDecision, type ConsentDeniedEventDetail, type ConsentEventDetail, type ConsentEventMap, type ConsentEventName, type ConsentGrantedEventDetail, type ConsentOptions, type ConsentPartialEventDetail, type ContentReviewRequestPayload, type ContentReviewResult, type ContentReviewStatusResponse, type FocusTrap, type McpAdapter, type McpAdapterConfig, type McpAdapterResult, type McpBlockedResult, type McpToolCall, type McpToolHandler, type McpToolResult, MulticornBadge, MulticornConsent, MulticornShield, type MulticornShieldConfig, PERMISSION_LEVELS, type Permission, type PermissionLevel, type RemainingBudget, SERVICE_NAME_PATTERN, type Scope, ScopeParseError, type ScopeParseResult, type ScopeRegistry, type ScopeRequest, type ServiceDefinition, type SpendCheckResult, type SpendingCheckResult, type SpendingChecker, type SpendingLimit, type SpendingLimits, type SpendingTrackerConfig, type ValidationResult, centsToDollars, createActionLogger, createFocusTrap, createMcpAdapter, createScopeRegistry, createSpendingChecker, dollarsToCents, formatScope, getPermissionLabel, getScopeLabel, getScopeShortLabel, getServiceDisplayName, getServiceIcon, hasScope, isBlockedResult, isPublicContentAction, isValidScopeString, parseScope, parseScopes, requestContentReview, requiresContentReview, tryParseScope, validateAllScopesAccess, validateScopeAccess };
2318
+ export { ACTION_STATUSES, AGENT_PLATFORM_SLUGS, AGENT_STATUSES, type Action, type ActionInput, type ActionLogger, type ActionLoggerConfig, type ActionPayload, type ActionStatus, type Agent, type AgentPlatformSlug, type AgentStatus, type ApiError, BUILT_IN_SERVICES, type BatchModeConfig, type BuiltInServiceName, CONSENT_ELEMENT_TAG, type ConsentDecision, type ConsentDeniedEventDetail, type ConsentEventDetail, type ConsentEventMap, type ConsentEventName, type ConsentGrantedEventDetail, type ConsentOptions, type ConsentPartialEventDetail, type ContentReviewRequestPayload, type ContentReviewResult, type ContentReviewStatusResponse, type FocusTrap, type McpAdapter, type McpAdapterConfig, type McpAdapterResult, type McpBlockedResult, type McpToolCall, type McpToolHandler, type McpToolResult, MulticornBadge, MulticornConsent, MulticornShield, type MulticornShieldConfig, PERMISSION_LEVELS, type Permission, type PermissionLevel, type RemainingBudget, SERVICE_NAME_PATTERN, type Scope, ScopeParseError, type ScopeParseResult, type ScopeRegistry, type ScopeRequest, type ServiceDefinition, type SpendCheckResult, type SpendingCheckResult, type SpendingChecker, type SpendingLimit, type SpendingLimits, type SpendingTrackerConfig, type ValidationResult, centsToDollars, createActionLogger, createFocusTrap, createMcpAdapter, createScopeRegistry, createSpendingChecker, dollarsToCents, formatScope, getPermissionLabel, getScopeLabel, getScopeShortLabel, getServiceDisplayName, getServiceIcon, hasScope, isBlockedResult, isPublicContentAction, isValidScopeString, parseScope, parseScopes, requestContentReview, requiresContentReview, tryParseScope, validateAllScopesAccess, validateScopeAccess };
package/dist/index.d.ts CHANGED
@@ -9,6 +9,11 @@ import { LitElement, PropertyValues, HTMLTemplateResult } from 'lit';
9
9
  *
10
10
  * @module types
11
11
  */
12
+ /**
13
+ * Agent client platforms supported by hosted proxy and native hooks (aligned with API validation).
14
+ */
15
+ declare const AGENT_PLATFORM_SLUGS: readonly ["openclaw", "claude-code", "claude-desktop", "cursor", "windsurf", "cline", "gemini-cli", "other-mcp", "github-actions", "unknown"];
16
+ type AgentPlatformSlug = (typeof AGENT_PLATFORM_SLUGS)[number];
12
17
  /**
13
18
  * Possible operational states for an agent.
14
19
  *
@@ -2310,4 +2315,4 @@ interface ContentReviewRequestPayload {
2310
2315
  */
2311
2316
  declare function requestContentReview(payload: ContentReviewRequestPayload, apiKey: string, baseUrl: string, logger?: PluginLogger): Promise<ContentReviewResult>;
2312
2317
 
2313
- export { ACTION_STATUSES, AGENT_STATUSES, type Action, type ActionInput, type ActionLogger, type ActionLoggerConfig, type ActionPayload, type ActionStatus, type Agent, type AgentStatus, type ApiError, BUILT_IN_SERVICES, type BatchModeConfig, type BuiltInServiceName, CONSENT_ELEMENT_TAG, type ConsentDecision, type ConsentDeniedEventDetail, type ConsentEventDetail, type ConsentEventMap, type ConsentEventName, type ConsentGrantedEventDetail, type ConsentOptions, type ConsentPartialEventDetail, type ContentReviewRequestPayload, type ContentReviewResult, type ContentReviewStatusResponse, type FocusTrap, type McpAdapter, type McpAdapterConfig, type McpAdapterResult, type McpBlockedResult, type McpToolCall, type McpToolHandler, type McpToolResult, MulticornBadge, MulticornConsent, MulticornShield, type MulticornShieldConfig, PERMISSION_LEVELS, type Permission, type PermissionLevel, type RemainingBudget, SERVICE_NAME_PATTERN, type Scope, ScopeParseError, type ScopeParseResult, type ScopeRegistry, type ScopeRequest, type ServiceDefinition, type SpendCheckResult, type SpendingCheckResult, type SpendingChecker, type SpendingLimit, type SpendingLimits, type SpendingTrackerConfig, type ValidationResult, centsToDollars, createActionLogger, createFocusTrap, createMcpAdapter, createScopeRegistry, createSpendingChecker, dollarsToCents, formatScope, getPermissionLabel, getScopeLabel, getScopeShortLabel, getServiceDisplayName, getServiceIcon, hasScope, isBlockedResult, isPublicContentAction, isValidScopeString, parseScope, parseScopes, requestContentReview, requiresContentReview, tryParseScope, validateAllScopesAccess, validateScopeAccess };
2318
+ export { ACTION_STATUSES, AGENT_PLATFORM_SLUGS, AGENT_STATUSES, type Action, type ActionInput, type ActionLogger, type ActionLoggerConfig, type ActionPayload, type ActionStatus, type Agent, type AgentPlatformSlug, type AgentStatus, type ApiError, BUILT_IN_SERVICES, type BatchModeConfig, type BuiltInServiceName, CONSENT_ELEMENT_TAG, type ConsentDecision, type ConsentDeniedEventDetail, type ConsentEventDetail, type ConsentEventMap, type ConsentEventName, type ConsentGrantedEventDetail, type ConsentOptions, type ConsentPartialEventDetail, type ContentReviewRequestPayload, type ContentReviewResult, type ContentReviewStatusResponse, type FocusTrap, type McpAdapter, type McpAdapterConfig, type McpAdapterResult, type McpBlockedResult, type McpToolCall, type McpToolHandler, type McpToolResult, MulticornBadge, MulticornConsent, MulticornShield, type MulticornShieldConfig, PERMISSION_LEVELS, type Permission, type PermissionLevel, type RemainingBudget, SERVICE_NAME_PATTERN, type Scope, ScopeParseError, type ScopeParseResult, type ScopeRegistry, type ScopeRequest, type ServiceDefinition, type SpendCheckResult, type SpendingCheckResult, type SpendingChecker, type SpendingLimit, type SpendingLimits, type SpendingTrackerConfig, type ValidationResult, centsToDollars, createActionLogger, createFocusTrap, createMcpAdapter, createScopeRegistry, createSpendingChecker, dollarsToCents, formatScope, getPermissionLabel, getScopeLabel, getScopeShortLabel, getServiceDisplayName, getServiceIcon, hasScope, isBlockedResult, isPublicContentAction, isValidScopeString, parseScope, parseScopes, requestContentReview, requiresContentReview, tryParseScope, validateAllScopesAccess, validateScopeAccess };
package/dist/index.js CHANGED
@@ -12,6 +12,18 @@ var __decorateClass = (decorators, target, key, kind) => {
12
12
  };
13
13
 
14
14
  // src/types/index.ts
15
+ var AGENT_PLATFORM_SLUGS = [
16
+ "openclaw",
17
+ "claude-code",
18
+ "claude-desktop",
19
+ "cursor",
20
+ "windsurf",
21
+ "cline",
22
+ "gemini-cli",
23
+ "other-mcp",
24
+ "github-actions",
25
+ "unknown"
26
+ ];
15
27
  var AGENT_STATUSES = {
16
28
  Active: "active",
17
29
  Paused: "paused",
@@ -2890,4 +2902,4 @@ function validateApiKey(apiKey) {
2890
2902
  }
2891
2903
  }
2892
2904
 
2893
- export { ACTION_STATUSES, AGENT_STATUSES, BUILT_IN_SERVICES, CONSENT_ELEMENT_TAG, MulticornBadge, MulticornConsent, MulticornShield, PERMISSION_LEVELS, SERVICE_NAME_PATTERN, ScopeParseError, centsToDollars, createActionLogger, createFocusTrap, createMcpAdapter, createScopeRegistry, createSpendingChecker, dollarsToCents, formatScope, getPermissionLabel, getScopeLabel, getScopeShortLabel, getServiceDisplayName, getServiceIcon, hasScope, isBlockedResult, isPublicContentAction, isValidScopeString, parseScope, parseScopes, requestContentReview, requiresContentReview, tryParseScope, validateAllScopesAccess, validateScopeAccess };
2905
+ export { ACTION_STATUSES, AGENT_PLATFORM_SLUGS, AGENT_STATUSES, BUILT_IN_SERVICES, CONSENT_ELEMENT_TAG, MulticornBadge, MulticornConsent, MulticornShield, PERMISSION_LEVELS, SERVICE_NAME_PATTERN, ScopeParseError, centsToDollars, createActionLogger, createFocusTrap, createMcpAdapter, createScopeRegistry, createSpendingChecker, dollarsToCents, formatScope, getPermissionLabel, getScopeLabel, getScopeShortLabel, getServiceDisplayName, getServiceIcon, hasScope, isBlockedResult, isPublicContentAction, isValidScopeString, parseScope, parseScopes, requestContentReview, requiresContentReview, tryParseScope, validateAllScopesAccess, validateScopeAccess };