@ainecto/mcp 0.16.10 → 0.16.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.
package/dist/bin/mcp.js CHANGED
@@ -220,8 +220,8 @@ function legacyRoleInput(flag, envVars = process.env) {
220
220
  }
221
221
 
222
222
  // src/core/version.ts
223
- var CLI_VERSION = true ? "0.16.10" : UNBUNDLED_VERSION;
224
- var CLI_BUILD = true ? "f0907dc" : void 0;
223
+ var CLI_VERSION = true ? "0.16.11" : UNBUNDLED_VERSION;
224
+ var CLI_BUILD = true ? "7d9df43" : void 0;
225
225
  function cliVersionLabel(version, build, release) {
226
226
  return release || build === void 0 ? version : `${version}-dev+${build}`;
227
227
  }
@@ -346,6 +346,7 @@ function isRecord4(value) {
346
346
  var CHANNEL_HEADER = "X-AiNecto-Channel";
347
347
  var AGENT_HEADER = "X-AiNecto-Agent";
348
348
  var AGENT_NAME_HEADER = "X-AiNecto-Agent-Name";
349
+ var CONNECT_TURN_HEADER = "X-Ainecto-Connect-Turn";
349
350
  var MAX_AGENT_NAME_LENGTH = 100;
350
351
  var McpRpcError = class extends Error {
351
352
  constructor(message, code, details) {
@@ -505,6 +506,9 @@ var McpRpcClient = class {
505
506
  if (this.options.agentName) {
506
507
  headers[AGENT_NAME_HEADER.toLowerCase()] = this.options.agentName;
507
508
  }
509
+ if (this.options.connectTurn) {
510
+ headers[CONNECT_TURN_HEADER.toLowerCase()] = "1";
511
+ }
508
512
  return this.fetchImpl(this.options.endpoint, {
509
513
  method: "POST",
510
514
  headers,
@@ -1216,7 +1220,8 @@ async function runConnector(options) {
1216
1220
  legacyRole,
1217
1221
  agentName: options.agentFlag ?? await readAgentName(options.cwd ?? process.cwd()),
1218
1222
  // 에이전트의 MCP 연결 — 에이전트 «종류»는 브리지가 호스트의 initialize 에서 읽어 싣는다(«이름»은 위 agentName).
1219
- channel: "mcp"
1223
+ channel: "mcp",
1224
+ ...options.connectTurn ? { connectTurn: true } : {}
1220
1225
  });
1221
1226
  await runStdioBridge({
1222
1227
  input: options.input,
@@ -1285,7 +1290,7 @@ function redactSecretString(value) {
1285
1290
 
1286
1291
  // src/adapters/mcp/args.ts
1287
1292
  function parseMcpArgs(argv) {
1288
- const result = { readOnly: false, help: false };
1293
+ const result = { readOnly: false, connectTurn: false, help: false };
1289
1294
  for (let index = 0; index < argv.length; index += 1) {
1290
1295
  const arg = argv[index];
1291
1296
  if (!arg) {
@@ -1303,6 +1308,8 @@ function parseMcpArgs(argv) {
1303
1308
  result.agent = name;
1304
1309
  } else if (arg === "--read-only") {
1305
1310
  result.readOnly = true;
1311
+ } else if (arg === "--connect-turn") {
1312
+ result.connectTurn = true;
1306
1313
  } else if (arg === "--role") {
1307
1314
  const value = argv[index + 1];
1308
1315
  if (value !== void 0 && !value.startsWith("--")) {
@@ -1337,6 +1344,7 @@ try {
1337
1344
  legacyRoleFlag: args.legacyRole,
1338
1345
  agentFlag: args.agent,
1339
1346
  readOnly: args.readOnly,
1347
+ connectTurn: args.connectTurn,
1340
1348
  input: process.stdin,
1341
1349
  output: process.stdout,
1342
1350
  errorOutput: process.stderr