@gendigital/sage-openclaw 0.12.0 → 0.13.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.
Files changed (35) hide show
  1. package/dist/index.cjs +222 -39
  2. package/dist/index.cjs.map +3 -3
  3. package/dist/mcp-server.cjs +38 -10
  4. package/dist/mcp-server.cjs.map +2 -2
  5. package/dist/model-download-worker.cjs +4 -2
  6. package/dist/model-download-worker.cjs.map +2 -2
  7. package/dist/skill-upload-worker.cjs +15 -9
  8. package/dist/skill-upload-worker.cjs.map +2 -2
  9. package/openclaw.plugin.json +1 -1
  10. package/package.json +3 -3
  11. package/resources/threats/_macros.yaml +193 -0
  12. package/resources/threats/agent-layer.yaml +19 -1
  13. package/resources/threats/commands.yaml +165 -31
  14. package/resources/threats/credentials.yaml +24 -4
  15. package/resources/threats/dummy.yaml +30 -0
  16. package/resources/threats/files.yaml +38 -0
  17. package/resources/threats/mac-commands.yaml +118 -27
  18. package/resources/threats/mac-credentials.yaml +34 -8
  19. package/resources/threats/mac-files.yaml +20 -0
  20. package/resources/threats/mac-obfuscation.yaml +28 -6
  21. package/resources/threats/mac-persistence.yaml +30 -4
  22. package/resources/threats/mac-supply-chain.yaml +12 -3
  23. package/resources/threats/mitre.yaml +325 -62
  24. package/resources/threats/obfuscation.yaml +33 -8
  25. package/resources/threats/persistence.yaml +40 -5
  26. package/resources/threats/prompt-injection.yaml +58 -0
  27. package/resources/threats/self-defense.yaml +15 -2
  28. package/resources/threats/supply_chain.yaml +6 -1
  29. package/resources/threats/urls.yaml +10 -0
  30. package/resources/threats/win-commands.yaml +294 -60
  31. package/resources/threats/win-credentials.yaml +68 -9
  32. package/resources/threats/win-files.yaml +20 -0
  33. package/resources/threats/win-obfuscation.yaml +56 -8
  34. package/resources/threats/win-persistence.yaml +45 -7
  35. package/resources/threats/win-supply-chain.yaml +5 -1
@@ -4190,7 +4190,8 @@ var ArtifactSchema = external_exports.object({
4190
4190
  var VerdictSeveritySchema = external_exports.enum(["info", "warning", "critical"]);
4191
4191
  var ThreatSchema = external_exports.object({
4192
4192
  id: external_exports.string(),
4193
- version: external_exports.number().int().optional(),
4193
+ version: external_exports.number().int().positive(),
4194
+ detectionName: external_exports.string(),
4194
4195
  category: external_exports.string(),
4195
4196
  severity: VerdictSeveritySchema,
4196
4197
  confidence: external_exports.number(),
@@ -4289,6 +4290,7 @@ var ConfigSchema = external_exports.object({
4289
4290
  sensitivity: SensitivitySchema.default("balanced"),
4290
4291
  disabled_threats: external_exports.array(external_exports.string()).default([]),
4291
4292
  announce_clean_scans: external_exports.boolean().default(true),
4293
+ manage_status_line: external_exports.boolean().default(true),
4292
4294
  brand_key: external_exports.string().min(1).max(32).regex(/^[a-z0-9_-]+$/u).optional(),
4293
4295
  community_iq: external_exports.boolean().default(true)
4294
4296
  });
@@ -4535,7 +4537,7 @@ var import_node_path4 = require("node:path");
4535
4537
  var import_node_url = require("node:url");
4536
4538
  var import_meta = {};
4537
4539
  function resolveVersion() {
4538
- if (true) return "0.12.0";
4540
+ if (true) return "0.13.0";
4539
4541
  try {
4540
4542
  const pkgPath = (0, import_node_path4.join)((0, import_node_path4.dirname)((0, import_node_url.fileURLToPath)(import_meta.url)), "..", "package.json");
4541
4543
  const pkg = JSON.parse(getFileContentSync(pkgPath));
@@ -5471,6 +5473,10 @@ function chunk(arr, size) {
5471
5473
  async function zipAndUpload(folder, skillId, client, logger) {
5472
5474
  try {
5473
5475
  const entries = await entriesFromDirectory(folder, MAX_ZIP_BYTES);
5476
+ if (entries.length === 0) {
5477
+ logger.warn("Skill has no readable entries; skipping upload", { skillId, folder });
5478
+ return { tag: "empty" };
5479
+ }
5474
5480
  const zip = zipEntriesWithLimit(entries, MAX_ZIP_BYTES);
5475
5481
  const result = await client.analyzeZip(zip, { skillId, slug: (0, import_node_path8.basename)(folder) });
5476
5482
  if (!result || !result.verdict) return { tag: "no_verdict" };
@@ -5500,7 +5506,7 @@ async function runSkillUploadWorker(args = {}) {
5500
5506
  }))
5501
5507
  );
5502
5508
  const successes = [];
5503
- const oversized = [];
5509
+ const terminal = [];
5504
5510
  for (const {
5505
5511
  skill,
5506
5512
  skill: { skillId },
@@ -5525,15 +5531,15 @@ async function runSkillUploadWorker(args = {}) {
5525
5531
  }
5526
5532
  } else if (outcome.tag === "ok") {
5527
5533
  successes.push({ skill, result: outcome.result });
5528
- } else if (outcome.tag === "too_large") {
5529
- oversized.push(skillId);
5534
+ } else if (outcome.tag === "too_large" || outcome.tag === "empty") {
5535
+ terminal.push(skillId);
5530
5536
  if (loggingConfig) {
5531
- logSkillVerdict(loggingConfig, skillId, "too_large").catch(() => {
5537
+ logSkillVerdict(loggingConfig, skillId, outcome.tag).catch(() => {
5532
5538
  });
5533
5539
  }
5534
5540
  }
5535
5541
  }
5536
- if (successes.length === 0 && oversized.length === 0) continue;
5542
+ if (successes.length === 0 && terminal.length === 0) continue;
5537
5543
  const cache = await loadSkillVerdictCache(args.verdictCachePath, args.verdictTtlMs, logger);
5538
5544
  for (const { skill, result } of successes) {
5539
5545
  putVerdict(cache, skill.skillId, {
@@ -5548,7 +5554,7 @@ async function runSkillUploadWorker(args = {}) {
5548
5554
  ]
5549
5555
  });
5550
5556
  }
5551
- for (const skillId of oversized) {
5557
+ for (const skillId of terminal) {
5552
5558
  putVerdict(cache, skillId, {});
5553
5559
  }
5554
5560
  await saveSkillVerdictCache(cache, args.verdictCachePath, logger);
@@ -5556,7 +5562,7 @@ async function runSkillUploadWorker(args = {}) {
5556
5562
  for (const { skill } of successes) {
5557
5563
  removePending(fresh, skill.skillId);
5558
5564
  }
5559
- for (const skillId of oversized) {
5565
+ for (const skillId of terminal) {
5560
5566
  removePending(fresh, skillId);
5561
5567
  }
5562
5568
  await savePendingMarker(fresh, args.pendingPath, logger);