@riddledc/openclaw-riddledc 0.5.3 → 0.5.5

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/CHECKSUMS.txt CHANGED
@@ -1,4 +1,4 @@
1
- 7b95ce94da8d78fc473eafbfd9103a4a71f9022345f9fe81c965d9e4096d1f81 dist/index.cjs
1
+ 21e09d68db3add27f41481e3ef75bdffa14bc4ae496285c7df2757590104f48b dist/index.cjs
2
2
  94ce04f0e2d84bf64dd68f0500dfdd2f951287a3deccec87f197261961927f6f dist/index.d.cts
3
3
  94ce04f0e2d84bf64dd68f0500dfdd2f951287a3deccec87f197261961927f6f dist/index.d.ts
4
- 3d661c3fc011ed382fa53058e3315d48f86d0f0663d543f3be22581816ddd906 dist/index.js
4
+ 63fe7e972b3fa5392e23902122409fbc6d59fa73e0751f0414fd06b9092a7fcd dist/index.js
package/dist/index.cjs CHANGED
@@ -78,7 +78,7 @@ async function writeArtifact(workspace, subdir, filename, content) {
78
78
  const filePath = (0, import_node_path.join)(dir, filename);
79
79
  const buf = Buffer.from(content, "utf8");
80
80
  await (0, import_promises.writeFile)(filePath, buf);
81
- return { path: `riddle/${subdir}/${filename}`, sizeBytes: buf.byteLength };
81
+ return { path: filePath, sizeBytes: buf.byteLength };
82
82
  }
83
83
  async function writeArtifactBinary(workspace, subdir, filename, base64Content) {
84
84
  const dir = (0, import_node_path.join)(workspace, "riddle", subdir);
@@ -86,7 +86,7 @@ async function writeArtifactBinary(workspace, subdir, filename, base64Content) {
86
86
  const filePath = (0, import_node_path.join)(dir, filename);
87
87
  const buf = Buffer.from(base64Content, "base64");
88
88
  await (0, import_promises.writeFile)(filePath, buf);
89
- return { path: `riddle/${subdir}/${filename}`, sizeBytes: buf.byteLength };
89
+ return { path: filePath, sizeBytes: buf.byteLength };
90
90
  }
91
91
  async function applySafetySpec(result, opts) {
92
92
  const jobId = result.job_id ?? "unknown";
@@ -99,7 +99,8 @@ async function applySafetySpec(result, opts) {
99
99
  }
100
100
  if (base64Data) {
101
101
  const ref = await writeArtifactBinary(opts.workspace, "screenshots", `${jobId}.png`, base64Data);
102
- result.screenshot = { saved: ref.path, sizeBytes: ref.sizeBytes };
102
+ const cdnUrl = typeof result.screenshot === "object" ? result.screenshot.url : void 0;
103
+ result.screenshot = { saved: ref.path, sizeBytes: ref.sizeBytes, ...cdnUrl ? { url: cdnUrl } : {} };
103
104
  }
104
105
  }
105
106
  if (Array.isArray(result.screenshots)) {
@@ -107,6 +108,7 @@ async function applySafetySpec(result, opts) {
107
108
  for (let i = 0; i < result.screenshots.length; i++) {
108
109
  const ss = result.screenshots[i];
109
110
  let base64Data = null;
111
+ const cdnUrl = typeof ss === "object" ? ss.url : void 0;
110
112
  if (typeof ss === "string") {
111
113
  base64Data = ss;
112
114
  } else if (typeof ss === "object" && ss.data) {
@@ -114,7 +116,7 @@ async function applySafetySpec(result, opts) {
114
116
  }
115
117
  if (base64Data) {
116
118
  const ref = await writeArtifactBinary(opts.workspace, "screenshots", `${jobId}-${i}.png`, base64Data);
117
- savedRefs.push({ saved: ref.path, sizeBytes: ref.sizeBytes });
119
+ savedRefs.push({ saved: ref.path, sizeBytes: ref.sizeBytes, ...cdnUrl ? { url: cdnUrl } : {} });
118
120
  }
119
121
  }
120
122
  result.screenshots = savedRefs;
package/dist/index.js CHANGED
@@ -54,7 +54,7 @@ async function writeArtifact(workspace, subdir, filename, content) {
54
54
  const filePath = join(dir, filename);
55
55
  const buf = Buffer.from(content, "utf8");
56
56
  await writeFile(filePath, buf);
57
- return { path: `riddle/${subdir}/${filename}`, sizeBytes: buf.byteLength };
57
+ return { path: filePath, sizeBytes: buf.byteLength };
58
58
  }
59
59
  async function writeArtifactBinary(workspace, subdir, filename, base64Content) {
60
60
  const dir = join(workspace, "riddle", subdir);
@@ -62,7 +62,7 @@ async function writeArtifactBinary(workspace, subdir, filename, base64Content) {
62
62
  const filePath = join(dir, filename);
63
63
  const buf = Buffer.from(base64Content, "base64");
64
64
  await writeFile(filePath, buf);
65
- return { path: `riddle/${subdir}/${filename}`, sizeBytes: buf.byteLength };
65
+ return { path: filePath, sizeBytes: buf.byteLength };
66
66
  }
67
67
  async function applySafetySpec(result, opts) {
68
68
  const jobId = result.job_id ?? "unknown";
@@ -75,7 +75,8 @@ async function applySafetySpec(result, opts) {
75
75
  }
76
76
  if (base64Data) {
77
77
  const ref = await writeArtifactBinary(opts.workspace, "screenshots", `${jobId}.png`, base64Data);
78
- result.screenshot = { saved: ref.path, sizeBytes: ref.sizeBytes };
78
+ const cdnUrl = typeof result.screenshot === "object" ? result.screenshot.url : void 0;
79
+ result.screenshot = { saved: ref.path, sizeBytes: ref.sizeBytes, ...cdnUrl ? { url: cdnUrl } : {} };
79
80
  }
80
81
  }
81
82
  if (Array.isArray(result.screenshots)) {
@@ -83,6 +84,7 @@ async function applySafetySpec(result, opts) {
83
84
  for (let i = 0; i < result.screenshots.length; i++) {
84
85
  const ss = result.screenshots[i];
85
86
  let base64Data = null;
87
+ const cdnUrl = typeof ss === "object" ? ss.url : void 0;
86
88
  if (typeof ss === "string") {
87
89
  base64Data = ss;
88
90
  } else if (typeof ss === "object" && ss.data) {
@@ -90,7 +92,7 @@ async function applySafetySpec(result, opts) {
90
92
  }
91
93
  if (base64Data) {
92
94
  const ref = await writeArtifactBinary(opts.workspace, "screenshots", `${jobId}-${i}.png`, base64Data);
93
- savedRefs.push({ saved: ref.path, sizeBytes: ref.sizeBytes });
95
+ savedRefs.push({ saved: ref.path, sizeBytes: ref.sizeBytes, ...cdnUrl ? { url: cdnUrl } : {} });
94
96
  }
95
97
  }
96
98
  result.screenshots = savedRefs;
@@ -2,7 +2,7 @@
2
2
  "id": "openclaw-riddledc",
3
3
  "name": "Riddle",
4
4
  "description": "Riddle (riddledc.com) hosted browser API tools for OpenClaw agents.",
5
- "version": "0.5.3",
5
+ "version": "0.5.5",
6
6
  "notes": "0.4.0: Added riddle_scrape, riddle_map, riddle_crawl convenience tools. Updated riddle_steps and riddle_script descriptions with data extraction capabilities.",
7
7
  "type": "plugin",
8
8
  "bundledSkills": [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riddledc/openclaw-riddledc",
3
- "version": "0.5.3",
3
+ "version": "0.5.5",
4
4
  "description": "OpenClaw integration package for RiddleDC (no secrets).",
5
5
  "license": "MIT",
6
6
  "author": "RiddleDC",