@gendigital/sage-openclaw 0.14.0 → 0.15.0
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.cjs +870 -282
- package/dist/index.cjs.map +4 -4
- package/dist/mcp-server.cjs +42 -10
- package/dist/mcp-server.cjs.map +4 -4
- package/dist/model-download-worker.cjs +1 -1
- package/dist/model-download-worker.cjs.map +2 -2
- package/dist/skill-upload-worker.cjs +1 -1
- package/dist/skill-upload-worker.cjs.map +2 -2
- package/openclaw.plugin.json +1 -1
- package/package.json +3 -3
- package/resources/threats/credentials.yaml +1 -1
- package/resources/threats/dummy.yaml +37 -4
- package/resources/threats/prompt-injection.yaml +13 -0
package/dist/mcp-server.cjs
CHANGED
|
@@ -4241,7 +4241,7 @@ var init_zod = __esm({
|
|
|
4241
4241
|
});
|
|
4242
4242
|
|
|
4243
4243
|
// ../core/dist/types.js
|
|
4244
|
-
var nullLogger, ArtifactTypeSchema, ArtifactSchema, VerdictSeveritySchema, ThreatSchema, DecisionSchema, SensitivitySchema, UrlCheckConfigSchema, CacheConfigSchema, LoggingConfigSchema, OperationalLogLevelSchema, OperationalLoggingConfigSchema, FileCheckConfigSchema, PackageCheckConfigSchema, AmsiCheckConfigSchema, SkillCheckConfigSchema, PiCheckConfigSchema, ExceptionDecisionSchema, ExceptionMatchSchema, ExceptionRuleSchema, ExceptionsFileSchema, ExceptionsConfigSchema, ConfigSchema, HookTypeSchema;
|
|
4244
|
+
var nullLogger, ArtifactTypeSchema, ArtifactSchema, VerdictSeveritySchema, ThreatSchema, DecisionSchema, SensitivitySchema, UrlCheckConfigSchema, CacheConfigSchema, LoggingConfigSchema, OperationalLogLevelSchema, OperationalLoggingConfigSchema, FileCheckConfigSchema, PackageCheckConfigSchema, AmsiCheckConfigSchema, SkillCheckConfigSchema, DEFAULT_PI_MEDIUM_RISK_THRESHOLD, PiCheckConfigSchema, ExceptionDecisionSchema, ExceptionMatchSchema, ExceptionRuleSchema, ExceptionsFileSchema, ExceptionsConfigSchema, ConfigSchema, HookTypeSchema;
|
|
4245
4245
|
var init_types2 = __esm({
|
|
4246
4246
|
"../core/dist/types.js"() {
|
|
4247
4247
|
"use strict";
|
|
@@ -4330,6 +4330,7 @@ var init_types2 = __esm({
|
|
|
4330
4330
|
*/
|
|
4331
4331
|
upload_enabled: external_exports.boolean().default(true)
|
|
4332
4332
|
});
|
|
4333
|
+
DEFAULT_PI_MEDIUM_RISK_THRESHOLD = 0.5;
|
|
4333
4334
|
PiCheckConfigSchema = external_exports.object({
|
|
4334
4335
|
enabled: external_exports.boolean().default(false),
|
|
4335
4336
|
max_content_length: external_exports.number().default(16384),
|
|
@@ -20593,7 +20594,11 @@ function safeTruncate(value, maxLen) {
|
|
|
20593
20594
|
return value.slice(0, cutIndex);
|
|
20594
20595
|
}
|
|
20595
20596
|
|
|
20597
|
+
// ../core/dist/model-storage.js
|
|
20598
|
+
init_config();
|
|
20599
|
+
|
|
20596
20600
|
// ../core/dist/detection-names.js
|
|
20601
|
+
init_types2();
|
|
20597
20602
|
var REPORTING_ENGINE_SHORTHANDS = {
|
|
20598
20603
|
package: "sgpk",
|
|
20599
20604
|
amsi: "sgam",
|
|
@@ -20876,7 +20881,7 @@ init_file_utils();
|
|
|
20876
20881
|
var import_meta = {};
|
|
20877
20882
|
function resolveVersion() {
|
|
20878
20883
|
if (true)
|
|
20879
|
-
return "0.
|
|
20884
|
+
return "0.15.0";
|
|
20880
20885
|
try {
|
|
20881
20886
|
const pkgPath = (0, import_node_path4.join)((0, import_node_path4.dirname)((0, import_node_url.fileURLToPath)(import_meta.url)), "..", "package.json");
|
|
20882
20887
|
const pkg = JSON.parse(getFileContentSync(pkgPath));
|
|
@@ -20888,9 +20893,6 @@ function resolveVersion() {
|
|
|
20888
20893
|
}
|
|
20889
20894
|
var VERSION = resolveVersion();
|
|
20890
20895
|
|
|
20891
|
-
// ../core/dist/model-storage.js
|
|
20892
|
-
init_config();
|
|
20893
|
-
|
|
20894
20896
|
// ../core/dist/clients/model-downloader.js
|
|
20895
20897
|
init_types2();
|
|
20896
20898
|
var STALE_LOCK_MS = 60 * 60 * 1e3;
|
|
@@ -21214,6 +21216,12 @@ init_types2();
|
|
|
21214
21216
|
// ../core/dist/evaluator.js
|
|
21215
21217
|
init_config();
|
|
21216
21218
|
|
|
21219
|
+
// ../core/dist/extractors.js
|
|
21220
|
+
var MAX_CONTENT_SIZE = 64 * 1024;
|
|
21221
|
+
|
|
21222
|
+
// ../core/dist/deobfuscate.js
|
|
21223
|
+
var REPLACEMENT_CHAR = String.fromCharCode(65533);
|
|
21224
|
+
|
|
21217
21225
|
// ../core/dist/exceptions.js
|
|
21218
21226
|
init_config();
|
|
21219
21227
|
init_file_utils();
|
|
@@ -21226,9 +21234,6 @@ init_types2();
|
|
|
21226
21234
|
// ../core/dist/exceptions.js
|
|
21227
21235
|
init_types2();
|
|
21228
21236
|
|
|
21229
|
-
// ../core/dist/extractors.js
|
|
21230
|
-
var MAX_CONTENT_SIZE = 64 * 1024;
|
|
21231
|
-
|
|
21232
21237
|
// ../core/dist/package-checker.js
|
|
21233
21238
|
init_types2();
|
|
21234
21239
|
|
|
@@ -21236,17 +21241,43 @@ init_types2();
|
|
|
21236
21241
|
init_config();
|
|
21237
21242
|
init_file_utils();
|
|
21238
21243
|
|
|
21244
|
+
// ../core/dist/submit-limits.js
|
|
21245
|
+
init_config();
|
|
21246
|
+
init_file_utils();
|
|
21247
|
+
init_types2();
|
|
21248
|
+
var SUBMIT_WINDOW_MS = 24 * 60 * 60 * 1e3;
|
|
21249
|
+
|
|
21239
21250
|
// ../core/dist/threat-loader.js
|
|
21240
21251
|
var import_yaml2 = __toESM(require_dist(), 1);
|
|
21252
|
+
init_config();
|
|
21241
21253
|
init_file_utils();
|
|
21242
21254
|
init_types2();
|
|
21243
21255
|
|
|
21244
21256
|
// ../core/dist/evaluator.js
|
|
21245
21257
|
init_types2();
|
|
21258
|
+
function hasReportableDetectionSignals(value) {
|
|
21259
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
21260
|
+
return false;
|
|
21261
|
+
const signals = value;
|
|
21262
|
+
const hasEntries = (key) => {
|
|
21263
|
+
const entries = signals[key];
|
|
21264
|
+
return Array.isArray(entries) && entries.length > 0;
|
|
21265
|
+
};
|
|
21266
|
+
return Boolean(hasEntries("heuristics") || hasEntries("url_checks") || hasEntries("file_checks") || hasEntries("package_checks") || hasEntries("amsi_checks") || Array.isArray(signals.pi_checks) && signals.pi_checks.some((result) => {
|
|
21267
|
+
if (!result || typeof result !== "object" || Array.isArray(result))
|
|
21268
|
+
return false;
|
|
21269
|
+
const risk = result.risk;
|
|
21270
|
+
return typeof risk === "number" && Number.isFinite(risk) && risk >= DEFAULT_PI_MEDIUM_RISK_THRESHOLD;
|
|
21271
|
+
}));
|
|
21272
|
+
}
|
|
21246
21273
|
|
|
21247
21274
|
// ../core/dist/index.js
|
|
21248
21275
|
init_file_utils();
|
|
21249
21276
|
|
|
21277
|
+
// ../core/dist/format.js
|
|
21278
|
+
var FP_REPORT_TOOL_NAME = "sage_report_false_positive";
|
|
21279
|
+
var SESSION_START_FP_HINT = `If this is a false positive, ask your agent to report it with the ${FP_REPORT_TOOL_NAME} MCP tool.`;
|
|
21280
|
+
|
|
21250
21281
|
// ../core/dist/guard.js
|
|
21251
21282
|
init_config();
|
|
21252
21283
|
init_types2();
|
|
@@ -31641,7 +31672,8 @@ function readContentSnippet(entry) {
|
|
|
31641
31672
|
function isRuntimeVerdictEntry(v) {
|
|
31642
31673
|
if (!v || typeof v !== "object" || Array.isArray(v))
|
|
31643
31674
|
return false;
|
|
31644
|
-
|
|
31675
|
+
const entry = v;
|
|
31676
|
+
return entry.type === "runtime_verdict" && (entry.custom_threat_matched !== true || entry.non_custom_detection_matched === true || hasReportableDetectionSignals(parseRuntimeAuditSignals(entry.signals)));
|
|
31645
31677
|
}
|
|
31646
31678
|
function isAnalyzedSkillVerdictEntry(v) {
|
|
31647
31679
|
if (!v || typeof v !== "object" || Array.isArray(v))
|
|
@@ -32192,7 +32224,7 @@ async function main() {
|
|
|
32192
32224
|
);
|
|
32193
32225
|
const branding = resolveBranding(config2.brand_key, logger);
|
|
32194
32226
|
await runSageMcpServerStdio({
|
|
32195
|
-
version: "0.
|
|
32227
|
+
version: "0.15.0",
|
|
32196
32228
|
logger,
|
|
32197
32229
|
branding
|
|
32198
32230
|
});
|