saktum 0.3.0 → 0.3.1
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/README.md +1 -1
- package/package.json +1 -1
- package/saktum.mjs +7 -6
package/README.md
CHANGED
|
@@ -65,7 +65,7 @@ grade. Every report ends with **OWASP MCP Top 10 coverage**: which categories th
|
|
|
65
65
|
|
|
66
66
|
```yaml
|
|
67
67
|
- uses: actions/checkout@v4
|
|
68
|
-
- uses: soodhere/saktum-check@v0.3.
|
|
68
|
+
- uses: soodhere/saktum-check@v0.3.1
|
|
69
69
|
with:
|
|
70
70
|
target: "-- node build/index.js" # or an https URL
|
|
71
71
|
args: "--active --tests saktum.tests.yaml" # optional; --active only for your own server
|
package/package.json
CHANGED
package/saktum.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// Saktum Check 0.3.
|
|
2
|
+
// Saktum Check 0.3.1 (private beta). Licensed Apache-2.0; bundled dependencies keep their own licences.
|
|
3
3
|
import { createRequire as __saktumCreateRequire } from "node:module";
|
|
4
4
|
const require = __saktumCreateRequire(import.meta.url);
|
|
5
5
|
var __create = Object.create;
|
|
@@ -20262,13 +20262,14 @@ var words = (name) => name.replace(/([a-z0-9])([A-Z])/g, "$1 $2").toLowerCase().
|
|
|
20262
20262
|
var READ = /* @__PURE__ */ new Set(["get", "list", "read", "search", "find", "fetch", "query", "describe", "show", "view", "lookup", "count", "check", "status", "retrieve", "browse", "inspect", "resolve", "validate", "analyze", "analyse", "summarize", "summarise", "explain", "compare", "preview", "info", "stats", "download", "export", "diff", "log", "history", "whoami", "ping", "health", "extract", "crawl", "scrape", "research", "map", "summary", "lookup", "tail", "watch"]);
|
|
20263
20263
|
var DESTROY = /* @__PURE__ */ new Set(["delete", "remove", "drop", "purge", "destroy", "reset", "revoke", "cancel", "terminate", "kill", "wipe", "truncate", "overwrite", "uninstall", "unpublish", "archive"]);
|
|
20264
20264
|
var WRITE = /* @__PURE__ */ new Set(["create", "add", "insert", "update", "set", "put", "patch", "edit", "write", "save", "upload", "send", "post", "publish", "deploy", "run", "execute", "exec", "start", "stop", "restart", "move", "rename", "merge", "commit", "push", "install", "enable", "disable", "assign", "invite", "approve", "pay", "charge", "refund", "transfer", "book", "order", "replace", "import", "sync", "trigger", "schedule", "close", "open", "submit", "apply", "generate", "upsert"]);
|
|
20265
|
+
var AMBIGUOUS = /* @__PURE__ */ new Set(["open", "close", "run", "start", "stop", "restart", "generate", "apply", "import", "sync", "trigger", "schedule", "submit", "execute", "exec", "export", "download", "log", "watch", "tail", "map"]);
|
|
20265
20266
|
var IDEMPOTENT_WRITE = /* @__PURE__ */ new Set(["set", "put", "update", "upsert", "enable", "disable", "replace"]);
|
|
20266
20267
|
function suggestAnnotations(tools) {
|
|
20267
20268
|
const caps = capabilityProfile(tools).capabilities;
|
|
20268
20269
|
const hasCap = (tool, c) => caps.some((x) => x.capability === c && x.tools.includes(sanitizeText(tool, 60)));
|
|
20269
20270
|
return tools.map((t) => {
|
|
20270
20271
|
const w = words(t.name);
|
|
20271
|
-
const verb = w.find((x) => READ.has(x) || DESTROY.has(x) || WRITE.has(x));
|
|
20272
|
+
const verb = w.find((x) => !AMBIGUOUS.has(x) && (READ.has(x) || DESTROY.has(x) || WRITE.has(x)));
|
|
20272
20273
|
const current = t.annotations && Object.keys(t.annotations).length ? t.annotations : void 0;
|
|
20273
20274
|
const openWorld = hasCap(t.name, "network") || hasCap(t.name, "untrusted-content") || hasCap(t.name, "sends-messages") ? true : void 0;
|
|
20274
20275
|
let suggested;
|
|
@@ -20305,7 +20306,7 @@ function renderFix(tools, format = "ts") {
|
|
|
20305
20306
|
const conflicts = s.filter((x) => x.conflict);
|
|
20306
20307
|
const lines = [];
|
|
20307
20308
|
lines.push(`Saktum fix: annotation suggestions for ${tools.length} tools (review each before applying; Saktum suggests, you decide).`);
|
|
20308
|
-
lines.push(`${todo.length} to add, ${review.length} need your judgement, ${conflicts.length} possible conflicts, ${s.filter((x) => x.current && !x.conflict).length} already annotated.`);
|
|
20309
|
+
lines.push(`${todo.length} to add, ${review.length} need your judgement, ${conflicts.length} possible conflict${conflicts.length === 1 ? "" : "s"}, ${s.filter((x) => x.current && !x.conflict).length} already annotated.`);
|
|
20309
20310
|
lines.push("");
|
|
20310
20311
|
if (format === "py")
|
|
20311
20312
|
lines.push("from mcp.types import ToolAnnotations", "");
|
|
@@ -32275,7 +32276,7 @@ var StreamableHTTPClientTransport = class {
|
|
|
32275
32276
|
};
|
|
32276
32277
|
|
|
32277
32278
|
// packages/transports/dist/index.js
|
|
32278
|
-
var USER_AGENT = "saktum-check/0.3.
|
|
32279
|
+
var USER_AGENT = "saktum-check/0.3.1 (+https://saktum.dev/check)";
|
|
32279
32280
|
var LIMITS = { requestTimeoutMs: 1e4, connectTimeoutMs: 6e4, maxResponseChars: 5e6 };
|
|
32280
32281
|
var LimitError = class extends Error {
|
|
32281
32282
|
};
|
|
@@ -32410,7 +32411,7 @@ var INIT_BODY = JSON.stringify({
|
|
|
32410
32411
|
jsonrpc: "2.0",
|
|
32411
32412
|
id: 1,
|
|
32412
32413
|
method: "initialize",
|
|
32413
|
-
params: { protocolVersion: "2025-06-18", capabilities: {}, clientInfo: { name: "saktum-trust-check-probe", version: "0.3.
|
|
32414
|
+
params: { protocolVersion: "2025-06-18", capabilities: {}, clientInfo: { name: "saktum-trust-check-probe", version: "0.3.1" } }
|
|
32414
32415
|
});
|
|
32415
32416
|
async function httpRequest(url2, init = {}) {
|
|
32416
32417
|
const t0 = Date.now();
|
|
@@ -33477,7 +33478,7 @@ async function measureLoad(session, op) {
|
|
|
33477
33478
|
}
|
|
33478
33479
|
|
|
33479
33480
|
// packages/testkit-core/dist/engine.js
|
|
33480
|
-
var ENGINE_VERSION = "0.3.
|
|
33481
|
+
var ENGINE_VERSION = "0.3.1";
|
|
33481
33482
|
var UNKNOWN_TOOL = "saktum_trust_check_no_such_tool";
|
|
33482
33483
|
var INVALID_TOKEN = "saktum-check-deliberately-invalid-token";
|
|
33483
33484
|
function isProtocolFailure(e) {
|