@fgv/ts-extras-mcp 5.1.0-36 → 5.1.0-39
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/.rush/temp/{2577843c5e34e6afdd66a491b876db932e6402dc.tar.log → 28abef25194b96c733b5ec1c8816ab85532589aa.tar.log} +2 -2
- package/.rush/temp/chunked-rush-logs/ts-extras-mcp.build.chunks.jsonl +4 -4
- package/.rush/temp/operation/build/all.log +4 -4
- package/.rush/temp/operation/build/log-chunks.jsonl +4 -4
- package/.rush/temp/operation/build/state.json +1 -1
- package/.rush/temp/shrinkwrap-deps.json +227 -226
- package/config/jest.config.json +1 -1
- package/dist/packlets/mcp/adapter.js +2 -7
- package/dist/packlets/mcp/adapter.js.map +1 -1
- package/dist/packlets/mcp/model.js.map +1 -1
- package/dist/packlets/mcp/operations.js +31 -6
- package/dist/packlets/mcp/operations.js.map +1 -1
- package/dist/packlets/mcp/sdk.js.map +1 -1
- package/dist/test/unit/mcp.test.js +113 -0
- package/dist/test/unit/mcp.test.js.map +1 -1
- package/dist/ts-extras-mcp.d.ts +31 -0
- package/dist/tsdoc-metadata.json +1 -1
- package/etc/ts-extras-mcp.api.md +10 -0
- package/lib/packlets/mcp/adapter.d.ts.map +1 -1
- package/lib/packlets/mcp/adapter.js +2 -7
- package/lib/packlets/mcp/adapter.js.map +1 -1
- package/lib/packlets/mcp/model.d.ts +30 -0
- package/lib/packlets/mcp/model.d.ts.map +1 -1
- package/lib/packlets/mcp/model.js.map +1 -1
- package/lib/packlets/mcp/operations.d.ts.map +1 -1
- package/lib/packlets/mcp/operations.js +30 -5
- package/lib/packlets/mcp/operations.js.map +1 -1
- package/lib/packlets/mcp/sdk.d.ts +6 -0
- package/lib/packlets/mcp/sdk.d.ts.map +1 -1
- package/lib/packlets/mcp/sdk.js.map +1 -1
- package/lib/test/unit/mcp.test.js +113 -0
- package/lib/test/unit/mcp.test.js.map +1 -1
- package/package.json +9 -9
- package/rush-logs/ts-extras-mcp.build.cache.log +1 -1
- package/rush-logs/ts-extras-mcp.build.log +4 -4
- package/src/packlets/mcp/adapter.ts +5 -2
- package/src/packlets/mcp/model.ts +31 -0
- package/src/packlets/mcp/operations.ts +46 -3
- package/src/packlets/mcp/sdk.ts +6 -0
- package/src/test/unit/mcp.test.ts +128 -0
- package/temp/build/lint/_eslint-5eVG3S6w.json +6 -6
- package/temp/build/typescript/ts_8nwakTlr.json +1 -1
- package/temp/ts-extras-mcp.api.json +182 -1
- package/temp/ts-extras-mcp.api.md +10 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"metadata": {
|
|
3
3
|
"toolPackage": "@microsoft/api-extractor",
|
|
4
|
-
"toolVersion": "7.58.
|
|
4
|
+
"toolVersion": "7.58.9",
|
|
5
5
|
"schemaVersion": 1011,
|
|
6
6
|
"oldestForwardsCompatibleVersion": 1001,
|
|
7
7
|
"tsdocConfig": {
|
|
@@ -1388,6 +1388,159 @@
|
|
|
1388
1388
|
],
|
|
1389
1389
|
"extendsTokenRanges": []
|
|
1390
1390
|
},
|
|
1391
|
+
{
|
|
1392
|
+
"kind": "Interface",
|
|
1393
|
+
"canonicalReference": "@fgv/ts-extras-mcp!IMcpToolAnnotations:interface",
|
|
1394
|
+
"docComment": "/**\n * Normalized MCP `Tool.annotations` — the five known host-advisory behavior hints.\n *\n * @remarks\n *\n * Field names mirror MCP's `ToolAnnotations` 1:1 (and map straight onto `AiAssist.IAiToolAnnotations`). Per the MCP spec these are hints only, and per the untrusted-server warning they are validated/normalized (known fields kept, malformed or unknown fields dropped) before they reach {@link IMcpToolDescriptor} — the raw server blob is never propagated.\n *\n * @public\n */\n",
|
|
1395
|
+
"excerptTokens": [
|
|
1396
|
+
{
|
|
1397
|
+
"kind": "Content",
|
|
1398
|
+
"text": "export interface IMcpToolAnnotations "
|
|
1399
|
+
}
|
|
1400
|
+
],
|
|
1401
|
+
"fileUrlPath": "src/packlets/mcp/model.ts",
|
|
1402
|
+
"releaseTag": "Public",
|
|
1403
|
+
"name": "IMcpToolAnnotations",
|
|
1404
|
+
"preserveMemberOrder": false,
|
|
1405
|
+
"members": [
|
|
1406
|
+
{
|
|
1407
|
+
"kind": "PropertySignature",
|
|
1408
|
+
"canonicalReference": "@fgv/ts-extras-mcp!IMcpToolAnnotations#destructiveHint:member",
|
|
1409
|
+
"docComment": "/**\n * Hint: the tool may perform destructive updates (only meaningful when not read-only).\n */\n",
|
|
1410
|
+
"excerptTokens": [
|
|
1411
|
+
{
|
|
1412
|
+
"kind": "Content",
|
|
1413
|
+
"text": "readonly destructiveHint?: "
|
|
1414
|
+
},
|
|
1415
|
+
{
|
|
1416
|
+
"kind": "Content",
|
|
1417
|
+
"text": "boolean"
|
|
1418
|
+
},
|
|
1419
|
+
{
|
|
1420
|
+
"kind": "Content",
|
|
1421
|
+
"text": ";"
|
|
1422
|
+
}
|
|
1423
|
+
],
|
|
1424
|
+
"isReadonly": true,
|
|
1425
|
+
"isOptional": true,
|
|
1426
|
+
"releaseTag": "Public",
|
|
1427
|
+
"name": "destructiveHint",
|
|
1428
|
+
"propertyTypeTokenRange": {
|
|
1429
|
+
"startIndex": 1,
|
|
1430
|
+
"endIndex": 2
|
|
1431
|
+
}
|
|
1432
|
+
},
|
|
1433
|
+
{
|
|
1434
|
+
"kind": "PropertySignature",
|
|
1435
|
+
"canonicalReference": "@fgv/ts-extras-mcp!IMcpToolAnnotations#idempotentHint:member",
|
|
1436
|
+
"docComment": "/**\n * Hint: repeated calls with the same arguments have no additional effect.\n */\n",
|
|
1437
|
+
"excerptTokens": [
|
|
1438
|
+
{
|
|
1439
|
+
"kind": "Content",
|
|
1440
|
+
"text": "readonly idempotentHint?: "
|
|
1441
|
+
},
|
|
1442
|
+
{
|
|
1443
|
+
"kind": "Content",
|
|
1444
|
+
"text": "boolean"
|
|
1445
|
+
},
|
|
1446
|
+
{
|
|
1447
|
+
"kind": "Content",
|
|
1448
|
+
"text": ";"
|
|
1449
|
+
}
|
|
1450
|
+
],
|
|
1451
|
+
"isReadonly": true,
|
|
1452
|
+
"isOptional": true,
|
|
1453
|
+
"releaseTag": "Public",
|
|
1454
|
+
"name": "idempotentHint",
|
|
1455
|
+
"propertyTypeTokenRange": {
|
|
1456
|
+
"startIndex": 1,
|
|
1457
|
+
"endIndex": 2
|
|
1458
|
+
}
|
|
1459
|
+
},
|
|
1460
|
+
{
|
|
1461
|
+
"kind": "PropertySignature",
|
|
1462
|
+
"canonicalReference": "@fgv/ts-extras-mcp!IMcpToolAnnotations#openWorldHint:member",
|
|
1463
|
+
"docComment": "/**\n * Hint: the tool interacts with an open world of external entities.\n */\n",
|
|
1464
|
+
"excerptTokens": [
|
|
1465
|
+
{
|
|
1466
|
+
"kind": "Content",
|
|
1467
|
+
"text": "readonly openWorldHint?: "
|
|
1468
|
+
},
|
|
1469
|
+
{
|
|
1470
|
+
"kind": "Content",
|
|
1471
|
+
"text": "boolean"
|
|
1472
|
+
},
|
|
1473
|
+
{
|
|
1474
|
+
"kind": "Content",
|
|
1475
|
+
"text": ";"
|
|
1476
|
+
}
|
|
1477
|
+
],
|
|
1478
|
+
"isReadonly": true,
|
|
1479
|
+
"isOptional": true,
|
|
1480
|
+
"releaseTag": "Public",
|
|
1481
|
+
"name": "openWorldHint",
|
|
1482
|
+
"propertyTypeTokenRange": {
|
|
1483
|
+
"startIndex": 1,
|
|
1484
|
+
"endIndex": 2
|
|
1485
|
+
}
|
|
1486
|
+
},
|
|
1487
|
+
{
|
|
1488
|
+
"kind": "PropertySignature",
|
|
1489
|
+
"canonicalReference": "@fgv/ts-extras-mcp!IMcpToolAnnotations#readOnlyHint:member",
|
|
1490
|
+
"docComment": "/**\n * Hint: the tool does not modify its environment (read-only).\n */\n",
|
|
1491
|
+
"excerptTokens": [
|
|
1492
|
+
{
|
|
1493
|
+
"kind": "Content",
|
|
1494
|
+
"text": "readonly readOnlyHint?: "
|
|
1495
|
+
},
|
|
1496
|
+
{
|
|
1497
|
+
"kind": "Content",
|
|
1498
|
+
"text": "boolean"
|
|
1499
|
+
},
|
|
1500
|
+
{
|
|
1501
|
+
"kind": "Content",
|
|
1502
|
+
"text": ";"
|
|
1503
|
+
}
|
|
1504
|
+
],
|
|
1505
|
+
"isReadonly": true,
|
|
1506
|
+
"isOptional": true,
|
|
1507
|
+
"releaseTag": "Public",
|
|
1508
|
+
"name": "readOnlyHint",
|
|
1509
|
+
"propertyTypeTokenRange": {
|
|
1510
|
+
"startIndex": 1,
|
|
1511
|
+
"endIndex": 2
|
|
1512
|
+
}
|
|
1513
|
+
},
|
|
1514
|
+
{
|
|
1515
|
+
"kind": "PropertySignature",
|
|
1516
|
+
"canonicalReference": "@fgv/ts-extras-mcp!IMcpToolAnnotations#title:member",
|
|
1517
|
+
"docComment": "/**\n * Optional human-readable display title for the tool.\n */\n",
|
|
1518
|
+
"excerptTokens": [
|
|
1519
|
+
{
|
|
1520
|
+
"kind": "Content",
|
|
1521
|
+
"text": "readonly title?: "
|
|
1522
|
+
},
|
|
1523
|
+
{
|
|
1524
|
+
"kind": "Content",
|
|
1525
|
+
"text": "string"
|
|
1526
|
+
},
|
|
1527
|
+
{
|
|
1528
|
+
"kind": "Content",
|
|
1529
|
+
"text": ";"
|
|
1530
|
+
}
|
|
1531
|
+
],
|
|
1532
|
+
"isReadonly": true,
|
|
1533
|
+
"isOptional": true,
|
|
1534
|
+
"releaseTag": "Public",
|
|
1535
|
+
"name": "title",
|
|
1536
|
+
"propertyTypeTokenRange": {
|
|
1537
|
+
"startIndex": 1,
|
|
1538
|
+
"endIndex": 2
|
|
1539
|
+
}
|
|
1540
|
+
}
|
|
1541
|
+
],
|
|
1542
|
+
"extendsTokenRanges": []
|
|
1543
|
+
},
|
|
1391
1544
|
{
|
|
1392
1545
|
"kind": "Interface",
|
|
1393
1546
|
"canonicalReference": "@fgv/ts-extras-mcp!IMcpToolCallResult:interface",
|
|
@@ -1448,6 +1601,34 @@
|
|
|
1448
1601
|
"name": "IMcpToolDescriptor",
|
|
1449
1602
|
"preserveMemberOrder": false,
|
|
1450
1603
|
"members": [
|
|
1604
|
+
{
|
|
1605
|
+
"kind": "PropertySignature",
|
|
1606
|
+
"canonicalReference": "@fgv/ts-extras-mcp!IMcpToolDescriptor#annotations:member",
|
|
1607
|
+
"docComment": "/**\n * The tool's normalized behavior annotations, when the server provided any usable ones. Absent when the server declared no annotations (or only malformed/unknown fields). See {@link IMcpToolAnnotations}.\n */\n",
|
|
1608
|
+
"excerptTokens": [
|
|
1609
|
+
{
|
|
1610
|
+
"kind": "Content",
|
|
1611
|
+
"text": "readonly annotations?: "
|
|
1612
|
+
},
|
|
1613
|
+
{
|
|
1614
|
+
"kind": "Reference",
|
|
1615
|
+
"text": "IMcpToolAnnotations",
|
|
1616
|
+
"canonicalReference": "@fgv/ts-extras-mcp!IMcpToolAnnotations:interface"
|
|
1617
|
+
},
|
|
1618
|
+
{
|
|
1619
|
+
"kind": "Content",
|
|
1620
|
+
"text": ";"
|
|
1621
|
+
}
|
|
1622
|
+
],
|
|
1623
|
+
"isReadonly": true,
|
|
1624
|
+
"isOptional": true,
|
|
1625
|
+
"releaseTag": "Public",
|
|
1626
|
+
"name": "annotations",
|
|
1627
|
+
"propertyTypeTokenRange": {
|
|
1628
|
+
"startIndex": 1,
|
|
1629
|
+
"endIndex": 2
|
|
1630
|
+
}
|
|
1631
|
+
},
|
|
1451
1632
|
{
|
|
1452
1633
|
"kind": "PropertySignature",
|
|
1453
1634
|
"canonicalReference": "@fgv/ts-extras-mcp!IMcpToolDescriptor#description:member",
|
|
@@ -81,6 +81,15 @@ export interface IMcpStdioTransportParams {
|
|
|
81
81
|
readonly env?: Record<string, string>;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
+
// @public
|
|
85
|
+
export interface IMcpToolAnnotations {
|
|
86
|
+
readonly destructiveHint?: boolean;
|
|
87
|
+
readonly idempotentHint?: boolean;
|
|
88
|
+
readonly openWorldHint?: boolean;
|
|
89
|
+
readonly readOnlyHint?: boolean;
|
|
90
|
+
readonly title?: string;
|
|
91
|
+
}
|
|
92
|
+
|
|
84
93
|
// @public
|
|
85
94
|
export interface IMcpToolCallResult {
|
|
86
95
|
readonly content: string;
|
|
@@ -88,6 +97,7 @@ export interface IMcpToolCallResult {
|
|
|
88
97
|
|
|
89
98
|
// @public
|
|
90
99
|
export interface IMcpToolDescriptor {
|
|
100
|
+
readonly annotations?: IMcpToolAnnotations;
|
|
91
101
|
readonly description: string | undefined;
|
|
92
102
|
readonly inputSchema: JsonValue;
|
|
93
103
|
readonly name: string;
|