@hop-top/kit 0.5.0-alpha.8 → 0.5.0-alpha.9
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 +22 -0
- package/dist/{chunk-263IZ6Z6.js → chunk-B4ULGCCN.js} +43 -154
- package/dist/{chunk-JTMPNXVQ.js → chunk-P6GRX4RV.js} +486 -83
- package/dist/chunk-UZ65A27P.js +147 -0
- package/dist/{index-B-pqGHhU.d.ts → index-CaOXdl38.d.ts} +337 -24
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -3
- package/dist/mcp/index.d.ts +2 -1
- package/dist/mcp/index.js +31 -2
- package/dist/{toolspec-UrWnoJ3Y.d.ts → toolspec-96rkLfsh.d.ts} +7 -2
- package/dist/toolspec.d.ts +1 -1
- package/dist/toolspec.js +3 -2
- package/package.json +1 -1
- package/src/mcp/README.md +6 -0
- package/src/mcp/args-separator.test.ts +164 -0
- package/src/mcp/args.test.ts +223 -0
- package/src/mcp/args.ts +160 -0
- package/src/mcp/audit.test.ts +520 -0
- package/src/mcp/audit.ts +70 -0
- package/src/mcp/bridge.test.ts +72 -0
- package/src/mcp/bridge.ts +50 -5
- package/src/mcp/conformance.test.ts +1 -1
- package/src/mcp/dispatch.ts +48 -2
- package/src/mcp/index.ts +33 -1
- package/src/mcp/legacy-notify.test.ts +59 -0
- package/src/mcp/legacy.ts +55 -15
- package/src/mcp/modern-confirm.ts +42 -10
- package/src/mcp/modern.ts +99 -35
- package/src/mcp/stdio.test.ts +313 -0
- package/src/mcp/stdio.ts +254 -0
- package/src/mcp/toolname.test.ts +147 -0
- package/src/mcp/types.ts +125 -18
- package/src/toolspec-internal.ts +24 -0
- package/src/toolspec-manifest.test.ts +25 -0
- package/src/toolspec-manifest.ts +5 -1
- package/src/toolspec.from-command.test.ts +51 -0
- package/src/toolspec.ts +29 -15
package/dist/mcp/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export { C as CommanderBridgeOptions, D as DEFAULT_MCP_PATH, a as DEFAULT_MCP_SERVER_NAME, b as DEFAULT_MCP_SERVER_VERSION, c as DestructiveBlockedError, E as ElicitationConfirmGate, F as FlagSchema, H as HEADER_MCP_METHOD,
|
|
1
|
+
export { C as CommanderBridgeOptions, D as DEFAULT_MCP_PATH, a as DEFAULT_MCP_SERVER_NAME, b as DEFAULT_MCP_SERVER_VERSION, c as DEFAULT_TOOL_NAME_SEPARATOR, d as DestructiveBlockedError, E as ElicitationConfirmGate, F as FlagSchema, H as HEADER_MCP_METHOD, e as HEADER_MCP_NAME, f as HEADER_MCP_PROTOCOL_VERSION, I as Invocation, g as InvocationMeta, h as InvokeResult, J as JsonRpcErrorObject, j as JsonRpcRequest, L as Leaf, k as LeafArg, l as LegacyMcpHandler, M as MCP_ARGS_PROPERTY, m as MCP_AUDIT_AUTH_REFUSED, n as MCP_AUDIT_CONFIRMATION_DECLINED, o as MCP_AUDIT_CONFIRMATION_REQUIRED, p as MCP_AUDIT_CONFIRMATION_STATE_REJECTED, q as MCP_AUDIT_DESTRUCTIVE_BLOCKED, r as MCP_AUTH_CHALLENGE, s as MCP_CONFIRM_KEY, t as MCP_CONFIRM_REJECTION_STATE, u as MCP_CONFIRM_STATE_TTL_SECONDS, v as MCP_CONFIRM_STATE_VERSION, w as MCP_ERR_HEADER_MISMATCH, x as MCP_ERR_INTERNAL, y as MCP_ERR_INVALID_PARAMS, z as MCP_ERR_INVALID_REQUEST, A as MCP_ERR_METHOD_NOT_FOUND, B as MCP_ERR_MISSING_CLIENT_CAPABILITY, G as MCP_ERR_PARSE, K as MCP_ERR_UNSUPPORTED_VERSION, N as MCP_SPEC_2024_11_05, O as MCP_SPEC_2026_07_28, P as META_KEY_CLIENT_CAPABILITIES, Q as META_KEY_CLIENT_INFO, R as META_KEY_PROTOCOL_VERSION, S as META_KEY_SERVER_INFO, T as McpAuditHook, U as McpAuditRecord, V as McpBridge, W as McpCacheScope, X as McpConfirmBinding, Y as McpConfirmDecision, Z as McpConfirmRejection, _ as McpConfirmStateStatus, $ as McpDispatcher, a0 as McpEra, a1 as McpEstablishment, a2 as McpHandler, a3 as McpHttpRequest, a4 as McpHttpResponse, a5 as McpIdentity, a6 as McpMountOptions, a7 as McpSpecVersion, a8 as McpSplitResult, a9 as McpStdioOptions, aa as McpStdioServer, ab as McpTransport, ac as McpVerifier, ad as ModernMcpHandler, ae as ModernRequestMeta, af as Policy, ag as RESULT_TYPE_COMPLETE, ah as RESULT_TYPE_INPUT_REQUIRED, ai as RawJSON, aj as ResolvedMcpConfig, ak as SCOPES_EXTRA_KEY, al as SURFACE_CLI, am as SURFACE_LIB, an as SURFACE_MCP, ao as SafetyClass, ap as Surface, aq as SurfaceNotEnabledError, ar as TASKS_EXTENSION, as as TASKS_SUPPORTED, at as TASK_METHODS, au as TaskMethod, av as UnknownCommandError, aw as auditRefusal, ax as buildToolEnvelope, ay as canonicalJSONStringify, az as clientSupportsFormElicitation, aA as commanderBridge, aB as createMcpHandler, aC as decodeMcpSentinel, aD as defaultPolicy, aE as detectMcpEra, aF as discoverCapabilities, aG as encodeEnvelope, aH as errorResultBlock, aI as establishCaller, aJ as hasModernMetaMarker, aK as headerConfirmationGate, aL as invocationMeta, aM as isTaskMethod, aN as mcpArgsPublished, aO as mcpConfirmArgsDigest, aP as mcpConfirmPrincipal, aQ as mcpInputSchema, aR as mcpMountConfig, aS as mcpSplitArguments, aT as mcpToolDescription, aU as methodNotAllowedResponse, aV as mintMcpConfirmState, aW as modernInvocationExtra, aX as parseJsonRpcRequest, aY as parseMcpConfirmRetry, aZ as parseModernMeta, a_ as pathFromToolName, a$ as policyAllowed, b0 as rawToolCallName, b1 as renderCallResult, b2 as resolveMcpConfig, b3 as serveStdio, b4 as singleHeaderValue, b5 as toolName, b6 as validModernRequestId, b7 as verifyMcpConfirmState } from '../index-CaOXdl38.js';
|
|
2
2
|
import '@modelcontextprotocol/server';
|
|
3
|
+
import 'node:stream';
|
|
3
4
|
import 'commander';
|
package/dist/mcp/index.js
CHANGED
|
@@ -74,7 +74,22 @@
|
|
|
74
74
|
|
|
75
75
|
|
|
76
76
|
|
|
77
|
-
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
var _chunkP6GRX4RVjs = require('../chunk-P6GRX4RV.js');
|
|
92
|
+
require('../chunk-UZ65A27P.js');
|
|
78
93
|
require('../chunk-R5U7XKVJ.js');
|
|
79
94
|
|
|
80
95
|
|
|
@@ -152,4 +167,18 @@ require('../chunk-R5U7XKVJ.js');
|
|
|
152
167
|
|
|
153
168
|
|
|
154
169
|
|
|
155
|
-
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
exports.DEFAULT_MCP_PATH = _chunkP6GRX4RVjs.DEFAULT_MCP_PATH; exports.DEFAULT_MCP_SERVER_NAME = _chunkP6GRX4RVjs.DEFAULT_MCP_SERVER_NAME; exports.DEFAULT_MCP_SERVER_VERSION = _chunkP6GRX4RVjs.DEFAULT_MCP_SERVER_VERSION; exports.DEFAULT_TOOL_NAME_SEPARATOR = _chunkP6GRX4RVjs.DEFAULT_TOOL_NAME_SEPARATOR; exports.DestructiveBlockedError = _chunkP6GRX4RVjs.DestructiveBlockedError; exports.ElicitationConfirmGate = _chunkP6GRX4RVjs.ElicitationConfirmGate; exports.HEADER_MCP_METHOD = _chunkP6GRX4RVjs.HEADER_MCP_METHOD; exports.HEADER_MCP_NAME = _chunkP6GRX4RVjs.HEADER_MCP_NAME; exports.HEADER_MCP_PROTOCOL_VERSION = _chunkP6GRX4RVjs.HEADER_MCP_PROTOCOL_VERSION; exports.LegacyMcpHandler = _chunkP6GRX4RVjs.LegacyMcpHandler; exports.MCP_ARGS_PROPERTY = _chunkP6GRX4RVjs.MCP_ARGS_PROPERTY; exports.MCP_AUDIT_AUTH_REFUSED = _chunkP6GRX4RVjs.MCP_AUDIT_AUTH_REFUSED; exports.MCP_AUDIT_CONFIRMATION_DECLINED = _chunkP6GRX4RVjs.MCP_AUDIT_CONFIRMATION_DECLINED; exports.MCP_AUDIT_CONFIRMATION_REQUIRED = _chunkP6GRX4RVjs.MCP_AUDIT_CONFIRMATION_REQUIRED; exports.MCP_AUDIT_CONFIRMATION_STATE_REJECTED = _chunkP6GRX4RVjs.MCP_AUDIT_CONFIRMATION_STATE_REJECTED; exports.MCP_AUDIT_DESTRUCTIVE_BLOCKED = _chunkP6GRX4RVjs.MCP_AUDIT_DESTRUCTIVE_BLOCKED; exports.MCP_AUTH_CHALLENGE = _chunkP6GRX4RVjs.MCP_AUTH_CHALLENGE; exports.MCP_CONFIRM_KEY = _chunkP6GRX4RVjs.MCP_CONFIRM_KEY; exports.MCP_CONFIRM_REJECTION_STATE = _chunkP6GRX4RVjs.MCP_CONFIRM_REJECTION_STATE; exports.MCP_CONFIRM_STATE_TTL_SECONDS = _chunkP6GRX4RVjs.MCP_CONFIRM_STATE_TTL_SECONDS; exports.MCP_CONFIRM_STATE_VERSION = _chunkP6GRX4RVjs.MCP_CONFIRM_STATE_VERSION; exports.MCP_ERR_HEADER_MISMATCH = _chunkP6GRX4RVjs.MCP_ERR_HEADER_MISMATCH; exports.MCP_ERR_INTERNAL = _chunkP6GRX4RVjs.MCP_ERR_INTERNAL; exports.MCP_ERR_INVALID_PARAMS = _chunkP6GRX4RVjs.MCP_ERR_INVALID_PARAMS; exports.MCP_ERR_INVALID_REQUEST = _chunkP6GRX4RVjs.MCP_ERR_INVALID_REQUEST; exports.MCP_ERR_METHOD_NOT_FOUND = _chunkP6GRX4RVjs.MCP_ERR_METHOD_NOT_FOUND; exports.MCP_ERR_MISSING_CLIENT_CAPABILITY = _chunkP6GRX4RVjs.MCP_ERR_MISSING_CLIENT_CAPABILITY; exports.MCP_ERR_PARSE = _chunkP6GRX4RVjs.MCP_ERR_PARSE; exports.MCP_ERR_UNSUPPORTED_VERSION = _chunkP6GRX4RVjs.MCP_ERR_UNSUPPORTED_VERSION; exports.MCP_SPEC_2024_11_05 = _chunkP6GRX4RVjs.MCP_SPEC_2024_11_05; exports.MCP_SPEC_2026_07_28 = _chunkP6GRX4RVjs.MCP_SPEC_2026_07_28; exports.META_KEY_CLIENT_CAPABILITIES = _chunkP6GRX4RVjs.META_KEY_CLIENT_CAPABILITIES; exports.META_KEY_CLIENT_INFO = _chunkP6GRX4RVjs.META_KEY_CLIENT_INFO; exports.META_KEY_PROTOCOL_VERSION = _chunkP6GRX4RVjs.META_KEY_PROTOCOL_VERSION; exports.META_KEY_SERVER_INFO = _chunkP6GRX4RVjs.META_KEY_SERVER_INFO; exports.McpDispatcher = _chunkP6GRX4RVjs.McpDispatcher; exports.ModernMcpHandler = _chunkP6GRX4RVjs.ModernMcpHandler; exports.RESULT_TYPE_COMPLETE = _chunkP6GRX4RVjs.RESULT_TYPE_COMPLETE; exports.RESULT_TYPE_INPUT_REQUIRED = _chunkP6GRX4RVjs.RESULT_TYPE_INPUT_REQUIRED; exports.RawJSON = _chunkP6GRX4RVjs.RawJSON; exports.SCOPES_EXTRA_KEY = _chunkP6GRX4RVjs.SCOPES_EXTRA_KEY; exports.SURFACE_CLI = _chunkP6GRX4RVjs.SURFACE_CLI; exports.SURFACE_LIB = _chunkP6GRX4RVjs.SURFACE_LIB; exports.SURFACE_MCP = _chunkP6GRX4RVjs.SURFACE_MCP; exports.SurfaceNotEnabledError = _chunkP6GRX4RVjs.SurfaceNotEnabledError; exports.TASKS_EXTENSION = _chunkP6GRX4RVjs.TASKS_EXTENSION; exports.TASKS_SUPPORTED = _chunkP6GRX4RVjs.TASKS_SUPPORTED; exports.TASK_METHODS = _chunkP6GRX4RVjs.TASK_METHODS; exports.UnknownCommandError = _chunkP6GRX4RVjs.UnknownCommandError; exports.auditRefusal = _chunkP6GRX4RVjs.auditRefusal; exports.buildToolEnvelope = _chunkP6GRX4RVjs.buildToolEnvelope; exports.canonicalJSONStringify = _chunkP6GRX4RVjs.canonicalJSONStringify; exports.clientSupportsFormElicitation = _chunkP6GRX4RVjs.clientSupportsFormElicitation; exports.commanderBridge = _chunkP6GRX4RVjs.commanderBridge; exports.createMcpHandler = _chunkP6GRX4RVjs.createMcpHandler; exports.decodeMcpSentinel = _chunkP6GRX4RVjs.decodeMcpSentinel; exports.defaultPolicy = _chunkP6GRX4RVjs.defaultPolicy; exports.detectMcpEra = _chunkP6GRX4RVjs.detectMcpEra; exports.discoverCapabilities = _chunkP6GRX4RVjs.discoverCapabilities; exports.encodeEnvelope = _chunkP6GRX4RVjs.encodeEnvelope; exports.errorResultBlock = _chunkP6GRX4RVjs.errorResultBlock; exports.establishCaller = _chunkP6GRX4RVjs.establishCaller; exports.hasModernMetaMarker = _chunkP6GRX4RVjs.hasModernMetaMarker; exports.headerConfirmationGate = _chunkP6GRX4RVjs.headerConfirmationGate; exports.invocationMeta = _chunkP6GRX4RVjs.invocationMeta; exports.isTaskMethod = _chunkP6GRX4RVjs.isTaskMethod; exports.mcpArgsPublished = _chunkP6GRX4RVjs.mcpArgsPublished; exports.mcpConfirmArgsDigest = _chunkP6GRX4RVjs.mcpConfirmArgsDigest; exports.mcpConfirmPrincipal = _chunkP6GRX4RVjs.mcpConfirmPrincipal; exports.mcpInputSchema = _chunkP6GRX4RVjs.mcpInputSchema; exports.mcpMountConfig = _chunkP6GRX4RVjs.mcpMountConfig; exports.mcpSplitArguments = _chunkP6GRX4RVjs.mcpSplitArguments; exports.mcpToolDescription = _chunkP6GRX4RVjs.mcpToolDescription; exports.methodNotAllowedResponse = _chunkP6GRX4RVjs.methodNotAllowedResponse; exports.mintMcpConfirmState = _chunkP6GRX4RVjs.mintMcpConfirmState; exports.modernInvocationExtra = _chunkP6GRX4RVjs.modernInvocationExtra; exports.parseJsonRpcRequest = _chunkP6GRX4RVjs.parseJsonRpcRequest; exports.parseMcpConfirmRetry = _chunkP6GRX4RVjs.parseMcpConfirmRetry; exports.parseModernMeta = _chunkP6GRX4RVjs.parseModernMeta; exports.pathFromToolName = _chunkP6GRX4RVjs.pathFromToolName; exports.policyAllowed = _chunkP6GRX4RVjs.policyAllowed; exports.rawToolCallName = _chunkP6GRX4RVjs.rawToolCallName; exports.renderCallResult = _chunkP6GRX4RVjs.renderCallResult; exports.resolveMcpConfig = _chunkP6GRX4RVjs.resolveMcpConfig; exports.serveStdio = _chunkP6GRX4RVjs.serveStdio; exports.singleHeaderValue = _chunkP6GRX4RVjs.singleHeaderValue; exports.toolName = _chunkP6GRX4RVjs.toolName; exports.validModernRequestId = _chunkP6GRX4RVjs.validModernRequestId; exports.verifyMcpConfirmState = _chunkP6GRX4RVjs.verifyMcpConfirmState;
|
|
@@ -281,12 +281,17 @@ interface FromCommandOptions {
|
|
|
281
281
|
annotations?: Record<string, CommandAnnotation>;
|
|
282
282
|
/** Defaults to "1", the version the YAML toolspecs declare. */
|
|
283
283
|
schemaVersion?: string;
|
|
284
|
+
/** Keep hidden commands (Go WithIncludeHidden). Hidden options stay omitted. */
|
|
285
|
+
includeHidden?: boolean;
|
|
284
286
|
}
|
|
285
287
|
/**
|
|
286
288
|
* Build a ToolSpec from a constructed commander tree, so CLIs with
|
|
287
289
|
* dynamically registered subcommands need no hand-synced YAML.
|
|
288
|
-
* Mirrors Go's WalkCobra projection: hidden commands
|
|
289
|
-
*
|
|
290
|
+
* Mirrors Go's WalkCobra projection: hidden commands (unless
|
|
291
|
+
* includeHidden) and hidden options are omitted, framework builtins
|
|
292
|
+
* (help, completion and its shells, man, __complete,
|
|
293
|
+
* __completeNoDesc) and kit/spec-command commands are skipped, flag
|
|
294
|
+
* names are undashed, root options become spec.flags.
|
|
290
295
|
*/
|
|
291
296
|
declare function toolSpecFromCommand(program: Command$1, opts?: FromCommandOptions): ToolSpec;
|
|
292
297
|
|
package/dist/toolspec.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import 'commander';
|
|
2
|
-
export { A as Arg, B as BuildManifestOptions, C as Command, a as CommandAnnotation, b as Contract, c as CoverageOptions, d as CoverageReport, E as ErrorPattern, F as Flag, e as FromCommandOptions, I as IDEMPOTENT_UNKNOWN, f as Intent, L as LATEST_SCHEMA_VERSION, M as Manifest, g as ManifestArg, h as ManifestCommand, i as ManifestExample, j as ManifestFlag, k as ManifestNextStep, O as OutputSchema, P as Provenance, R as RegisterSpecOptions, S as SCHEMA_VERSION_ENV, l as SIDE_EFFECT_UNKNOWN, m as SPEC_COMMAND_ANNOTATION, n as Safety, o as SafetyLevel, p as StateIntrospection, T as ToolSpec, W as Workflow, q as buildManifest, r as coverageOf, s as findCommand, u as loadToolSpec, v as negotiateSchemaVersion, w as registerSpecCommand, x as renderManifestJSON, y as toolSpecFromCommand, z as validateToolSpec } from './toolspec-
|
|
2
|
+
export { A as Arg, B as BuildManifestOptions, C as Command, a as CommandAnnotation, b as Contract, c as CoverageOptions, d as CoverageReport, E as ErrorPattern, F as Flag, e as FromCommandOptions, I as IDEMPOTENT_UNKNOWN, f as Intent, L as LATEST_SCHEMA_VERSION, M as Manifest, g as ManifestArg, h as ManifestCommand, i as ManifestExample, j as ManifestFlag, k as ManifestNextStep, O as OutputSchema, P as Provenance, R as RegisterSpecOptions, S as SCHEMA_VERSION_ENV, l as SIDE_EFFECT_UNKNOWN, m as SPEC_COMMAND_ANNOTATION, n as Safety, o as SafetyLevel, p as StateIntrospection, T as ToolSpec, W as Workflow, q as buildManifest, r as coverageOf, s as findCommand, u as loadToolSpec, v as negotiateSchemaVersion, w as registerSpecCommand, x as renderManifestJSON, y as toolSpecFromCommand, z as validateToolSpec } from './toolspec-96rkLfsh.js';
|
package/dist/toolspec.js
CHANGED
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _chunkB4ULGCCNjs = require('./chunk-B4ULGCCN.js');
|
|
17
|
+
require('./chunk-UZ65A27P.js');
|
|
17
18
|
require('./chunk-IXVQ62NZ.js');
|
|
18
19
|
require('./chunk-72XZWQX7.js');
|
|
19
20
|
require('./chunk-POR5L2DG.js');
|
|
@@ -33,4 +34,4 @@ require('./chunk-R5U7XKVJ.js');
|
|
|
33
34
|
|
|
34
35
|
|
|
35
36
|
|
|
36
|
-
exports.IDEMPOTENT_UNKNOWN =
|
|
37
|
+
exports.IDEMPOTENT_UNKNOWN = _chunkB4ULGCCNjs.IDEMPOTENT_UNKNOWN; exports.LATEST_SCHEMA_VERSION = _chunkB4ULGCCNjs.LATEST_SCHEMA_VERSION; exports.SCHEMA_VERSION_ENV = _chunkB4ULGCCNjs.SCHEMA_VERSION_ENV; exports.SIDE_EFFECT_UNKNOWN = _chunkB4ULGCCNjs.SIDE_EFFECT_UNKNOWN; exports.SPEC_COMMAND_ANNOTATION = _chunkB4ULGCCNjs.SPEC_COMMAND_ANNOTATION; exports.buildManifest = _chunkB4ULGCCNjs.buildManifest; exports.coverageOf = _chunkB4ULGCCNjs.coverageOf; exports.findCommand = _chunkB4ULGCCNjs.findCommand; exports.loadToolSpec = _chunkB4ULGCCNjs.loadToolSpec; exports.negotiateSchemaVersion = _chunkB4ULGCCNjs.negotiateSchemaVersion; exports.registerSpecCommand = _chunkB4ULGCCNjs.registerSpecCommand; exports.renderManifestJSON = _chunkB4ULGCCNjs.renderManifestJSON; exports.toolSpecFromCommand = _chunkB4ULGCCNjs.toolSpecFromCommand; exports.validateToolSpec = _chunkB4ULGCCNjs.validateToolSpec;
|
package/package.json
CHANGED
package/src/mcp/README.md
CHANGED
|
@@ -8,8 +8,11 @@ How a Commander command tree is served over the Model Context Protocol from one
|
|
|
8
8
|
|
|
9
9
|
- expose leaves as MCP tools: `commanderBridge(root, { run })` then `createMcpHandler(bridge, opts)`
|
|
10
10
|
- bind to your own HTTP stack: the handler is `(McpHttpRequest) => Promise<McpHttpResponse>`; node:http, hono, express, fastify or a Worker is your call
|
|
11
|
+
- serve a host that spawns the tool: `serveStdio(bridge)` (or `serveStdio(handler)`), newline-delimited JSON-RPC on stdin/stdout, `done` resolves when stdin ends
|
|
11
12
|
- gate destructive tools: `policy` option, `defaultPolicy()` blocks remote destructive calls
|
|
12
13
|
- require confirmation on the modern era: `headerConfirmationGate` or `ElicitationConfirmGate`
|
|
14
|
+
- name tools for a host that refuses dots (`widget_add`, not `widget.add`): `toolNameSeparator: '_'`
|
|
15
|
+
- record every refusal the mount makes (auth, confirmation, destructive ceiling): `audit: (record: McpAuditRecord) => void`
|
|
13
16
|
|
|
14
17
|
## Quick start
|
|
15
18
|
|
|
@@ -38,9 +41,12 @@ console.log(res.status, res.body);
|
|
|
38
41
|
- Wire bytes are pinned by [`sdk/tests/cross-lang/fixtures/mcp-wire.json`](../../../tests/cross-lang/fixtures/mcp-wire.json), compared as raw bytes; [`conformance.test.ts`](conformance.test.ts) replays both `cases` and `sequences`.
|
|
39
42
|
- Protocol layer is `@modelcontextprotocol/core` + `@modelcontextprotocol/server` (v2). The v1 `@modelcontextprotocol/sdk` cannot serve `2026-07-28` and is not a dependency.
|
|
40
43
|
- Era detection follows the marker set and precedence chain in [`dispatch.ts`](dispatch.ts), not the SDK's own classifier.
|
|
44
|
+
- stdio ([`stdio.ts`](stdio.ts)) drives the same era dispatch with no header layer: the `2026-07-28` header checks are skipped, notifications are never answered, batches are refused.
|
|
41
45
|
- `tools/list` re-reads the bridge's leaves per request; caching the leaf set fails the sequence fixture.
|
|
42
46
|
- `commanderBridge` requires `run`: kit does not capture a command's output for you.
|
|
47
|
+
- Tool names join the leaf path with `toolNameSeparator` (default `.`) and split back on it. The mount throws on an empty separator and, for any other than `.`, on a command name containing it (`data_sync` under `_`). Names are not otherwise rewritten or length-checked.
|
|
43
48
|
- Tasks extension: `TASKS_SUPPORTED` is `false`; `discoverCapabilities` reports it.
|
|
49
|
+
- `audit` ([`audit.ts`](audit.ts)) is the port of Go's bridge sinks for this surface: called after a refusal is decided and before the response is written, never changing the wire bytes; a throw is swallowed. `error` is Go's sentinel string (`MCP_AUDIT_*`).
|
|
44
50
|
- Parity: [`contracts/parity/README.md`](../../../../contracts/parity/README.md), section "MCP wire contract".
|
|
45
51
|
|
|
46
52
|
## Neighbours
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Positional arguments under a non-default toolNameSeparator, on both
|
|
3
|
+
* eras over HTTP and over serveStdio: the separator only renames the
|
|
4
|
+
* tool, the "args" array still reaches Invocation.args in order.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { PassThrough } from 'node:stream';
|
|
8
|
+
import { Command } from 'commander';
|
|
9
|
+
import { describe, expect, it } from 'vitest';
|
|
10
|
+
|
|
11
|
+
import { commanderBridge } from './bridge.js';
|
|
12
|
+
import { createMcpHandler } from './dispatch.js';
|
|
13
|
+
import { serveStdio } from './stdio.js';
|
|
14
|
+
import type { Invocation, InvokeResult, McpBridge } from './types.js';
|
|
15
|
+
|
|
16
|
+
const MODERN_META = {
|
|
17
|
+
'io.modelcontextprotocol/clientCapabilities': {},
|
|
18
|
+
'io.modelcontextprotocol/protocolVersion': '2026-07-28',
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** root -> item -> add <name> [note] --count <n> */
|
|
22
|
+
function bridge(): McpBridge {
|
|
23
|
+
const root = new Command('root');
|
|
24
|
+
root
|
|
25
|
+
.command('item')
|
|
26
|
+
.command('add')
|
|
27
|
+
.description('Add an item')
|
|
28
|
+
.argument('<name>')
|
|
29
|
+
.argument('[note]')
|
|
30
|
+
.option('--count <n>', 'how many');
|
|
31
|
+
const run = (inv: Invocation): InvokeResult => ({
|
|
32
|
+
stdout: `${inv.path.join(' ')} ${JSON.stringify(inv.args ?? [])} ${JSON.stringify(inv.flags ?? {})}\n`,
|
|
33
|
+
exitCode: 0,
|
|
34
|
+
});
|
|
35
|
+
return commanderBridge(root, { run });
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function text(result: Record<string, unknown>): string {
|
|
39
|
+
return (result.content as Array<{ text: string }>).map((c) => c.text).join('');
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
describe('positional args with toolNameSeparator', () => {
|
|
43
|
+
const handler = createMcpHandler(bridge(), { toolNameSeparator: '_' });
|
|
44
|
+
const post = (body: unknown, headers: Record<string, string> = {}) =>
|
|
45
|
+
handler({ method: 'POST', headers, body: JSON.stringify(body) });
|
|
46
|
+
|
|
47
|
+
it('publishes the args property under the separated name', async () => {
|
|
48
|
+
const res = await post({ jsonrpc: '2.0', id: 1, method: 'tools/list' });
|
|
49
|
+
const tools = JSON.parse(res.body).result.tools as Array<{
|
|
50
|
+
name: string;
|
|
51
|
+
inputSchema: { properties: Record<string, unknown>; required?: string[] };
|
|
52
|
+
}>;
|
|
53
|
+
const add = tools.find((t) => t.name === 'item_add');
|
|
54
|
+
expect(add).toBeDefined();
|
|
55
|
+
expect(add?.inputSchema.properties.args).toMatchObject({ type: 'array', minItems: 1 });
|
|
56
|
+
expect(add?.inputSchema.required).toContain('args');
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
it('splits args out on a legacy call', async () => {
|
|
60
|
+
const res = await post({
|
|
61
|
+
jsonrpc: '2.0',
|
|
62
|
+
id: 2,
|
|
63
|
+
method: 'tools/call',
|
|
64
|
+
params: { name: 'item_add', arguments: { args: ['bolt', '-x'], count: '2' } },
|
|
65
|
+
});
|
|
66
|
+
const body = JSON.parse(res.body);
|
|
67
|
+
expect(body.result.isError).toBe(false);
|
|
68
|
+
expect(text(body.result)).toBe('item add ["bolt","-x"] {"count":"2"}\n');
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
it('splits args out on a modern call', async () => {
|
|
72
|
+
const res = await post(
|
|
73
|
+
{
|
|
74
|
+
jsonrpc: '2.0',
|
|
75
|
+
id: 3,
|
|
76
|
+
method: 'tools/call',
|
|
77
|
+
params: { name: 'item_add', arguments: { args: ['bolt'] }, _meta: MODERN_META },
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
'MCP-Protocol-Version': '2026-07-28',
|
|
81
|
+
'Mcp-Method': 'tools/call',
|
|
82
|
+
'Mcp-Name': 'item_add',
|
|
83
|
+
},
|
|
84
|
+
);
|
|
85
|
+
const body = JSON.parse(res.body);
|
|
86
|
+
expect(body.error).toBeUndefined();
|
|
87
|
+
expect(body.result.isError).toBe(false);
|
|
88
|
+
expect(text(body.result)).toBe('item add ["bolt"] {}\n');
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
it('refuses a missing required argument on both eras', async () => {
|
|
92
|
+
const legacy = JSON.parse(
|
|
93
|
+
(
|
|
94
|
+
await post({
|
|
95
|
+
jsonrpc: '2.0',
|
|
96
|
+
id: 4,
|
|
97
|
+
method: 'tools/call',
|
|
98
|
+
params: { name: 'item_add', arguments: {} },
|
|
99
|
+
})
|
|
100
|
+
).body,
|
|
101
|
+
);
|
|
102
|
+
expect(legacy.result.isError).toBe(true);
|
|
103
|
+
expect(text(legacy.result)).toContain('missing required argument: name');
|
|
104
|
+
|
|
105
|
+
const modern = JSON.parse(
|
|
106
|
+
(
|
|
107
|
+
await post(
|
|
108
|
+
{
|
|
109
|
+
jsonrpc: '2.0',
|
|
110
|
+
id: 5,
|
|
111
|
+
method: 'tools/call',
|
|
112
|
+
params: { name: 'item_add', arguments: {}, _meta: MODERN_META },
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
'MCP-Protocol-Version': '2026-07-28',
|
|
116
|
+
'Mcp-Method': 'tools/call',
|
|
117
|
+
'Mcp-Name': 'item_add',
|
|
118
|
+
},
|
|
119
|
+
)
|
|
120
|
+
).body,
|
|
121
|
+
);
|
|
122
|
+
expect(modern.result.isError).toBe(true);
|
|
123
|
+
expect(text(modern.result)).toContain('missing required argument: name');
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
it('carries args over serveStdio on both eras', async () => {
|
|
127
|
+
const input = new PassThrough();
|
|
128
|
+
const output = new PassThrough();
|
|
129
|
+
let out = '';
|
|
130
|
+
output.on('data', (c: Buffer) => (out += c.toString('utf8')));
|
|
131
|
+
const server = serveStdio(bridge(), {
|
|
132
|
+
input,
|
|
133
|
+
output,
|
|
134
|
+
log: new PassThrough(),
|
|
135
|
+
mount: { toolNameSeparator: '_' },
|
|
136
|
+
});
|
|
137
|
+
input.write(
|
|
138
|
+
`${JSON.stringify({
|
|
139
|
+
jsonrpc: '2.0',
|
|
140
|
+
id: 1,
|
|
141
|
+
method: 'tools/call',
|
|
142
|
+
params: { name: 'item_add', arguments: { args: ['bolt', 'spare'] } },
|
|
143
|
+
})}\n`,
|
|
144
|
+
);
|
|
145
|
+
input.write(
|
|
146
|
+
`${JSON.stringify({
|
|
147
|
+
jsonrpc: '2.0',
|
|
148
|
+
id: 2,
|
|
149
|
+
method: 'tools/call',
|
|
150
|
+
params: { name: 'item_add', arguments: { args: ['nut'] }, _meta: MODERN_META },
|
|
151
|
+
})}\n`,
|
|
152
|
+
);
|
|
153
|
+
input.end();
|
|
154
|
+
await server.done;
|
|
155
|
+
const got = new Map<number, Record<string, unknown>>();
|
|
156
|
+
for (const line of out.split('\n').filter((l) => l !== '')) {
|
|
157
|
+
const m = JSON.parse(line) as { id: number; result: Record<string, unknown> };
|
|
158
|
+
got.set(m.id, m.result);
|
|
159
|
+
}
|
|
160
|
+
expect(text(got.get(1) ?? {})).toBe('item add ["bolt","spare"] {}\n');
|
|
161
|
+
expect(got.get(2)).toMatchObject({ resultType: 'complete', isError: false });
|
|
162
|
+
expect(text(got.get(2) ?? {})).toBe('item add ["nut"] {}\n');
|
|
163
|
+
});
|
|
164
|
+
});
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Positional arguments over MCP (mcp/args), on both protocol eras:
|
|
3
|
+
* the "args" property tools/list publishes for a commander leaf's
|
|
4
|
+
* declared arguments, and the mapping of a tools/call "args" array
|
|
5
|
+
* back onto Invocation.args. Mirrors the Go reference's
|
|
6
|
+
* surface_mcp_args_test.go case for case, wording included.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { Command } from 'commander';
|
|
10
|
+
import { describe, expect, it } from 'vitest';
|
|
11
|
+
|
|
12
|
+
import { commanderBridge, type AnnotatedCommand } from './bridge.js';
|
|
13
|
+
import { createMcpHandler } from './dispatch.js';
|
|
14
|
+
import type { Invocation, InvokeResult } from './types.js';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* root
|
|
18
|
+
* └── item
|
|
19
|
+
* ├── add <name> [note]; --count
|
|
20
|
+
* ├── pin <id>; an --args flag holds the name
|
|
21
|
+
* ├── approve <name>; kit/requires-confirmation
|
|
22
|
+
* └── tag <files...> variadic, required
|
|
23
|
+
*/
|
|
24
|
+
function argsTree(): Command {
|
|
25
|
+
const root = new Command('root');
|
|
26
|
+
const item = root.command('item');
|
|
27
|
+
const ann = (cmd: Command, a: Record<string, string>) => {
|
|
28
|
+
(cmd as AnnotatedCommand).annotations = a;
|
|
29
|
+
return cmd;
|
|
30
|
+
};
|
|
31
|
+
ann(
|
|
32
|
+
item.command('add').description('Add an item').argument('<name>').argument('[note]')
|
|
33
|
+
.option('--count <n>', 'how many'),
|
|
34
|
+
{ 'kit/side-effect': 'write' },
|
|
35
|
+
);
|
|
36
|
+
ann(
|
|
37
|
+
item.command('pin').description('Pin an item').argument('<id>')
|
|
38
|
+
.option('--args <v>', 'extra arguments'),
|
|
39
|
+
{ 'kit/side-effect': 'write' },
|
|
40
|
+
);
|
|
41
|
+
ann(item.command('approve').description('Approve an item').argument('<name>'), {
|
|
42
|
+
'kit/side-effect': 'write',
|
|
43
|
+
'kit/requires-confirmation': 'true',
|
|
44
|
+
});
|
|
45
|
+
item.command('tag').description('Tag files').argument('<files...>');
|
|
46
|
+
return root;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function echo(inv: Invocation): InvokeResult {
|
|
50
|
+
const verb = inv.path[inv.path.length - 1];
|
|
51
|
+
let extra = '';
|
|
52
|
+
if (inv.flags?.count !== undefined) extra = ` x${String(inv.flags.count)}`;
|
|
53
|
+
if (inv.flags?.args !== undefined) extra = ` --args=${String(inv.flags.args)}`;
|
|
54
|
+
return { stdout: `${verb} ${JSON.stringify(inv.args ?? [])}${extra}\n`, exitCode: 0 };
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const MODERN_META = {
|
|
58
|
+
'io.modelcontextprotocol/clientCapabilities': {},
|
|
59
|
+
'io.modelcontextprotocol/protocolVersion': '2026-07-28',
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
interface Tool {
|
|
63
|
+
name: string;
|
|
64
|
+
description: string;
|
|
65
|
+
inputSchema: { properties: Record<string, Record<string, unknown>>; required?: string[] };
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
interface Era {
|
|
69
|
+
name: string;
|
|
70
|
+
list(): Promise<Record<string, Tool>>;
|
|
71
|
+
call(
|
|
72
|
+
tool: string,
|
|
73
|
+
args: Record<string, unknown>,
|
|
74
|
+
): Promise<{ status: number; text: string; isError: boolean }>;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function eras(): Era[] {
|
|
78
|
+
const handler = createMcpHandler(commanderBridge(argsTree(), { run: echo }));
|
|
79
|
+
const send = async (body: unknown, headers: Record<string, string> = {}) => {
|
|
80
|
+
const res = await handler({ method: 'POST', headers, body: JSON.stringify(body) });
|
|
81
|
+
return { status: res.status, body: JSON.parse(res.body) as { result: Record<string, unknown> } };
|
|
82
|
+
};
|
|
83
|
+
const tools = (r: Record<string, unknown>) =>
|
|
84
|
+
Object.fromEntries((r.tools as Tool[]).map((t) => [t.name, t]));
|
|
85
|
+
const outcome = (status: number, r: Record<string, unknown>) => ({
|
|
86
|
+
status,
|
|
87
|
+
text: (r.content as Array<{ text: string }>).map((c) => c.text).join(''),
|
|
88
|
+
isError: r.isError === true,
|
|
89
|
+
});
|
|
90
|
+
return [
|
|
91
|
+
{
|
|
92
|
+
name: '2024-11-05',
|
|
93
|
+
async list() {
|
|
94
|
+
const { body } = await send({ jsonrpc: '2.0', id: 1, method: 'tools/list', params: {} });
|
|
95
|
+
return tools(body.result);
|
|
96
|
+
},
|
|
97
|
+
async call(tool, args) {
|
|
98
|
+
const { status, body } = await send({
|
|
99
|
+
jsonrpc: '2.0', id: 1, method: 'tools/call', params: { name: tool, arguments: args },
|
|
100
|
+
});
|
|
101
|
+
return outcome(status, body.result);
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
name: '2026-07-28',
|
|
106
|
+
async list() {
|
|
107
|
+
const { body } = await send(
|
|
108
|
+
{ jsonrpc: '2.0', id: 1, method: 'tools/list', params: { _meta: MODERN_META } },
|
|
109
|
+
{ 'MCP-Protocol-Version': '2026-07-28', 'Mcp-Method': 'tools/list' },
|
|
110
|
+
);
|
|
111
|
+
return tools(body.result);
|
|
112
|
+
},
|
|
113
|
+
async call(tool, args) {
|
|
114
|
+
const { status, body } = await send(
|
|
115
|
+
{
|
|
116
|
+
jsonrpc: '2.0', id: 1, method: 'tools/call',
|
|
117
|
+
params: { name: tool, arguments: args, _meta: MODERN_META },
|
|
118
|
+
},
|
|
119
|
+
{ 'MCP-Protocol-Version': '2026-07-28', 'Mcp-Method': 'tools/call', 'Mcp-Name': tool },
|
|
120
|
+
);
|
|
121
|
+
return outcome(status, body.result);
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
];
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
describe.each(eras())('positional args over MCP ($name)', (era) => {
|
|
128
|
+
it('tools/list publishes declared positionals as one args array', async () => {
|
|
129
|
+
const tools = await era.list();
|
|
130
|
+
|
|
131
|
+
const add = tools['item.add']!;
|
|
132
|
+
expect(add.description).toBe('Add an item');
|
|
133
|
+
expect(add.inputSchema.properties.args).toEqual({
|
|
134
|
+
type: 'array',
|
|
135
|
+
items: { type: 'string' },
|
|
136
|
+
description: 'Positional arguments in order: name, note?',
|
|
137
|
+
minItems: 1,
|
|
138
|
+
});
|
|
139
|
+
expect(add.inputSchema.properties).toHaveProperty('count');
|
|
140
|
+
expect(add.inputSchema.required).toEqual(['args']);
|
|
141
|
+
|
|
142
|
+
const pin = tools['item.pin']!;
|
|
143
|
+
expect(pin.inputSchema.properties.args?.type).toBe('string');
|
|
144
|
+
expect(pin.inputSchema.required).toBeUndefined();
|
|
145
|
+
expect(pin.description).toBe(
|
|
146
|
+
'Pin an item Takes positional arguments that cannot be passed over MCP: its --args flag holds the "args" property.',
|
|
147
|
+
);
|
|
148
|
+
|
|
149
|
+
expect(tools['item.tag']!.inputSchema.properties.args).toEqual({
|
|
150
|
+
type: 'array',
|
|
151
|
+
items: { type: 'string' },
|
|
152
|
+
description: 'Positional arguments in order: files',
|
|
153
|
+
minItems: 1,
|
|
154
|
+
});
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
it('tools/call maps args onto positionals in order', async () => {
|
|
158
|
+
let r = await era.call('item.add', { args: ['bolt', 'spare'], count: '2' });
|
|
159
|
+
expect(r).toEqual({ status: 200, text: 'add ["bolt","spare"] x2\n', isError: false });
|
|
160
|
+
|
|
161
|
+
r = await era.call('item.add', { args: ['nut'] });
|
|
162
|
+
expect(r.text).toBe('add ["nut"]\n');
|
|
163
|
+
|
|
164
|
+
r = await era.call('item.tag', { args: ['a', 'b', 'c'] });
|
|
165
|
+
expect(r.text).toBe('tag ["a","b","c"]\n');
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
it('refuses missing or malformed args', async () => {
|
|
169
|
+
for (const args of [{ count: '2' }, { args: [] }]) {
|
|
170
|
+
expect(await era.call('item.add', args)).toEqual({
|
|
171
|
+
status: 200, text: 'missing required argument: name', isError: true,
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
for (const args of [{ args: 'bolt' }, { args: [1] }]) {
|
|
175
|
+
const r = await era.call('item.add', args);
|
|
176
|
+
expect(r.isError).toBe(true);
|
|
177
|
+
expect(r.text).toBe('"args" must be an array of strings');
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
it('checks arguments before the confirmation gate', async () => {
|
|
182
|
+
let r = await era.call('item.approve', {});
|
|
183
|
+
expect(r).toEqual({ status: 200, text: 'missing required argument: name', isError: true });
|
|
184
|
+
|
|
185
|
+
r = await era.call('item.approve', { args: ['bolt'] });
|
|
186
|
+
expect(r.status).toBe(428);
|
|
187
|
+
expect(r.isError).toBe(true);
|
|
188
|
+
expect(r.text).toContain('confirmation required');
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
it('an --args flag keeps the name and gets the value as a flag', async () => {
|
|
192
|
+
const r = await era.call('item.pin', { args: 'x' });
|
|
193
|
+
expect(r).toEqual({ status: 200, text: 'pin [] --args=x\n', isError: false });
|
|
194
|
+
});
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
describe('commanderBridge without positionals', () => {
|
|
198
|
+
it('publishes no args property and passes no Invocation.args', async () => {
|
|
199
|
+
const root = new Command('root');
|
|
200
|
+
root.command('ping').description('Ping').option('--count <n>', 'how many');
|
|
201
|
+
let seen: Invocation | undefined;
|
|
202
|
+
const handler = createMcpHandler(
|
|
203
|
+
commanderBridge(root, {
|
|
204
|
+
run: (inv) => {
|
|
205
|
+
seen = inv;
|
|
206
|
+
return { stdout: '', exitCode: 0 };
|
|
207
|
+
},
|
|
208
|
+
}),
|
|
209
|
+
);
|
|
210
|
+
const list = await handler({
|
|
211
|
+
method: 'POST', headers: {}, body: '{"jsonrpc":"2.0","id":1,"method":"tools/list"}',
|
|
212
|
+
});
|
|
213
|
+
expect(list.body).toContain(
|
|
214
|
+
'"inputSchema":{"properties":{"count":{"description":"how many","type":"string"}},"type":"object"}',
|
|
215
|
+
);
|
|
216
|
+
await handler({
|
|
217
|
+
method: 'POST', headers: {},
|
|
218
|
+
body: '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"ping","arguments":{"count":"3"}}}',
|
|
219
|
+
});
|
|
220
|
+
expect(seen?.args).toBeUndefined();
|
|
221
|
+
expect(seen?.flags).toEqual({ count: '3' });
|
|
222
|
+
});
|
|
223
|
+
});
|