@skaleagents/swarm 0.6.3 → 0.6.4

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/review.js CHANGED
@@ -107,6 +107,30 @@ export function architectureFindings(content, focus) {
107
107
  detail: "Detected an explicit compute size. Compare the selected size with observed utilization and set a review point for scale-up and scale-down decisions.",
108
108
  });
109
109
  }
110
+ if (shouldInclude(focusValue, "reliability") &&
111
+ /(?:^|[^.\w])(?:timeout|read_timeout|connect_timeout|request_timeout|readTimeout|connectTimeout)\s*[:=]\s*(?:0|false|none)\b/i.test(content)) {
112
+ findings.push({
113
+ severity: "medium",
114
+ title: "Outbound call has no timeout",
115
+ detail: "A timeout is set to zero, false, or none. Set a finite timeout so a stalled dependency cannot hold the process open.",
116
+ });
117
+ }
118
+ if (shouldInclude(focusValue, "reliability") &&
119
+ /(?:pool_size|max_connections|connectionLimit|maxPoolSize|maximumPoolSize|max_pool_size)\s*[:=]\s*1\b/.test(content)) {
120
+ findings.push({
121
+ severity: "high",
122
+ title: "Connection pool is capped at one",
123
+ detail: "The pool allows one connection. Concurrent requests will queue behind that single connection.",
124
+ });
125
+ }
126
+ if (shouldInclude(focusValue, "reliability") &&
127
+ /(?:max_?retries|retry_?count|retries)\s*[:=]\s*(?:-1|Infinity)\b/i.test(content)) {
128
+ findings.push({
129
+ severity: "medium",
130
+ title: "Retry limit is unbounded",
131
+ detail: "Retries are set to unlimited. Cap retries and add backoff so a failing dependency cannot amplify load.",
132
+ });
133
+ }
110
134
  return findings.map((finding, index) => {
111
135
  if (index === 0)
112
136
  return finding;
@@ -122,6 +146,9 @@ export function architectureFindings(content, focus) {
122
146
  "Public data access pattern": /(?:public-read|publicRead|allUsers)/i,
123
147
  "Debug mode enabled": /(?:debug|app_debug)\s*[:=]\s*["']?(?:true|1|yes)/i,
124
148
  "Compute sizing needs review": /(?:instance_type|machine_type|vm_size)\s*[:=]/i,
149
+ "Outbound call has no timeout": /(?:^|[^.\w])(?:timeout|read_timeout|connect_timeout|request_timeout|readTimeout|connectTimeout)\s*[:=]\s*(?:0|false|none)\b/i,
150
+ "Connection pool is capped at one": /(?:pool_size|max_connections|connectionLimit|maxPoolSize|maximumPoolSize|max_pool_size)\s*[:=]\s*1\b/,
151
+ "Retry limit is unbounded": /(?:max_?retries|retry_?count|retries)\s*[:=]\s*(?:-1|Infinity)\b/i,
125
152
  };
126
153
  const pattern = matchers[finding.title];
127
154
  const matches = pattern
@@ -142,7 +169,13 @@ export function architectureFindings(content, focus) {
142
169
  ruleId: `APP${String(ruleIndex).padStart(3, "0")}`,
143
170
  category: (finding.title === "Compute sizing needs review"
144
171
  ? "cost"
145
- : ["Debug mode enabled", "Unpinned container image"].includes(finding.title)
172
+ : [
173
+ "Debug mode enabled",
174
+ "Unpinned container image",
175
+ "Outbound call has no timeout",
176
+ "Connection pool is capped at one",
177
+ "Retry limit is unbounded",
178
+ ].includes(finding.title)
146
179
  ? "reliability"
147
180
  : "security"),
148
181
  remediation: finding.detail,
package/dist/server.js CHANGED
@@ -56,7 +56,7 @@ export function createServer(remote = false) {
56
56
  registerConsultation(server, remote);
57
57
  server.registerTool("review_architecture", {
58
58
  title: "Review architecture",
59
- description: "Review individual source snippets or parsed infrastructure for security, reliability, and cost risks. For a whole application or Next.js architecture consultation, use plan_architecture_review and review_application_architecture instead.",
59
+ description: "Review individual source snippets or parsed infrastructure for security, reliability, and cost risks. Application checks include infrastructure bottlenecks: a disabled timeout, a one-connection pool, and an unbounded retry limit. For a whole application or Next.js architecture consultation, use plan_architecture_review and review_application_architecture instead.",
60
60
  annotations: {
61
61
  readOnlyHint: true,
62
62
  destructiveHint: false,
@@ -108,6 +108,7 @@ export function createServer(remote = false) {
108
108
  truncated: findings.length > maxFindings,
109
109
  limitations: [
110
110
  "Application checks are text patterns, not a language-aware or runtime analysis. Findings do not establish that code is safe.",
111
+ "Infrastructure bottleneck checks cover a disabled timeout, a one-connection pool, and an unbounded retry limit.",
111
112
  ],
112
113
  botHints: await botHints,
113
114
  });
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "0.6.3";
1
+ export declare const VERSION = "0.6.4";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "0.6.3";
1
+ export const VERSION = "0.6.4";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skaleagents/swarm",
3
- "version": "0.6.3",
3
+ "version": "0.6.4",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"