@yawlabs/aws-mcp 1.2.1 → 1.2.2
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/index.js +12 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -55453,6 +55453,13 @@ function isValidStatistic(s) {
|
|
|
55453
55453
|
if (SIMPLE_STATS.some((stat) => stat.toLowerCase() === lower)) return true;
|
|
55454
55454
|
return EXTENDED_STAT_RE.test(s);
|
|
55455
55455
|
}
|
|
55456
|
+
function canonicalizeStatistic(s) {
|
|
55457
|
+
const lower = s.toLowerCase();
|
|
55458
|
+
for (const stat of SIMPLE_STATS) {
|
|
55459
|
+
if (stat.toLowerCase() === lower) return stat;
|
|
55460
|
+
}
|
|
55461
|
+
return s;
|
|
55462
|
+
}
|
|
55456
55463
|
var QUERY_ID_RE = /^[a-z][A-Za-z0-9_]*$/;
|
|
55457
55464
|
var MAX_QUERIES = 100;
|
|
55458
55465
|
var PERIOD_3H_MS = 3 * 60 * 60 * 1e3;
|
|
@@ -55505,7 +55512,7 @@ function buildMetricDataQueries(inputs, autoPeriod) {
|
|
|
55505
55512
|
...dimensions ? { Dimensions: dimensions } : {}
|
|
55506
55513
|
},
|
|
55507
55514
|
Period: q.period ?? autoPeriod,
|
|
55508
|
-
Stat: q.statistic
|
|
55515
|
+
Stat: q.statistic !== void 0 ? canonicalizeStatistic(q.statistic) : "Average"
|
|
55509
55516
|
};
|
|
55510
55517
|
if (q.unit !== void 0) stat.Unit = q.unit;
|
|
55511
55518
|
base.MetricStat = stat;
|
|
@@ -55682,7 +55689,6 @@ var metricsTools = [
|
|
|
55682
55689
|
var DEFAULT_CONCURRENCY = 8;
|
|
55683
55690
|
var MAX_CONCURRENCY = 32;
|
|
55684
55691
|
var MAX_REGIONS = 32;
|
|
55685
|
-
var REGION_RE = /^[a-z][a-z0-9-]{2,30}$/;
|
|
55686
55692
|
async function runWithConcurrency(inputs, concurrency, fn) {
|
|
55687
55693
|
const results = new Array(inputs.length);
|
|
55688
55694
|
let next = 0;
|
|
@@ -55735,11 +55741,11 @@ var multiRegionTools = [
|
|
|
55735
55741
|
}
|
|
55736
55742
|
const concurrency = i.concurrency ?? DEFAULT_CONCURRENCY;
|
|
55737
55743
|
const results = await runWithConcurrency(regions, concurrency, async (region) => {
|
|
55738
|
-
if (!
|
|
55744
|
+
if (!isValidRegionName(region)) {
|
|
55739
55745
|
return {
|
|
55740
55746
|
region,
|
|
55741
55747
|
ok: false,
|
|
55742
|
-
error: `Invalid region '${region}'. Must match
|
|
55748
|
+
error: `Invalid region '${region}'. Must match ${REGION_NAME_RE} (e.g. 'us-east-1').`,
|
|
55743
55749
|
errorKind: "bad_input"
|
|
55744
55750
|
};
|
|
55745
55751
|
}
|
|
@@ -56813,7 +56819,7 @@ var scriptTools = [
|
|
|
56813
56819
|
},
|
|
56814
56820
|
inputSchema: external_exports3.object({
|
|
56815
56821
|
code: external_exports3.string().min(1).describe(
|
|
56816
|
-
"JavaScript snippet evaluated inside `(async () => { ... })()`. Use `return <value>` to surface a result. Bound globals: aws.call, aws.paginate, aws.paginateAll, aws.resource.{get,list,create,update,delete,status}, aws.logsTail, console (capture), JSON, Math, Date, Promise, Array, Object, String, Number, Boolean, Error, Intl, Atomics, SharedArrayBuffer, WebAssembly (compile blocked). Shadowed (undefined): require, import, process, fs, fetch + family, BroadcastChannel, setTimeout/Interval, queueMicrotask, Buffer, global, globalThis. NOT available (ReferenceError if used): URL, URLSearchParams, TextEncoder, TextDecoder, crypto, structuredClone, EventTarget, MessageChannel, performance. eval/Function are disabled (codeGeneration off). Tool helpers throw on failure -- wrap in try/catch when you want to handle errors per-call."
|
|
56822
|
+
"JavaScript snippet evaluated inside `(async () => { ... })()`. Use `return <value>` to surface a result. Bound globals: aws.call, aws.paginate, aws.paginateAll, aws.resource.{get,list,create,update,delete,status}, aws.logsTail, console (capture), JSON, Math, Date, Promise, Array, Object, String, Number, Boolean, Error, Intl, Atomics, SharedArrayBuffer, WebAssembly (compile blocked). Intentionally NOT bound (call as sibling MCP tools instead): aws_metrics_query, aws_iam_simulate, aws_multi_region, aws_assume_role, aws_docs_search, aws_docs_read, aws_list_profiles, the auth/session tools, and aws_script itself. Shadowed (undefined): require, import, process, fs, fetch + family, BroadcastChannel, setTimeout/Interval, queueMicrotask, Buffer, global, globalThis. NOT available (ReferenceError if used): URL, URLSearchParams, TextEncoder, TextDecoder, crypto, structuredClone, EventTarget, MessageChannel, performance. eval/Function are disabled (codeGeneration off). Tool helpers throw on failure -- wrap in try/catch when you want to handle errors per-call."
|
|
56817
56823
|
),
|
|
56818
56824
|
timeoutMs: external_exports3.number().int().positive().max(MAX_TIMEOUT_MS).optional().describe(
|
|
56819
56825
|
`Wall-clock timeout in milliseconds. Default ${DEFAULT_TIMEOUT_MS2}; max ${MAX_TIMEOUT_MS}. Covers evaluation plus every awaited aws.* call. On timeout the script stops being awaited and the tool returns an error, but any aws.* call already in flight is NOT cancelled -- it continues until its own per-call timeout (default 60s). Plan retries accordingly: a script that timed out mid 'resource.delete' may have completed the delete; re-issuing the same script can double-mutate.`
|
|
@@ -56914,7 +56920,7 @@ var sessionTools = [
|
|
|
56914
56920
|
];
|
|
56915
56921
|
|
|
56916
56922
|
// src/index.ts
|
|
56917
|
-
var version2 = true ? "1.2.
|
|
56923
|
+
var version2 = true ? "1.2.2" : (await null).createRequire(import.meta.url)("../package.json").version;
|
|
56918
56924
|
var subcommand = process.argv[2];
|
|
56919
56925
|
if (subcommand === "version" || subcommand === "--version") {
|
|
56920
56926
|
console.log(version2);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yawlabs/aws-mcp",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"mcpName": "io.github.YawLabs/aws-mcp",
|
|
5
5
|
"description": "AWS MCP server — call any AWS API from AI assistants, with first-class SSO re-login (no more 'browser won't open' dead ends)",
|
|
6
6
|
"license": "MIT",
|