@parcha/agentrun-computer 0.1.0-beta.61 → 0.1.0-beta.63

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.
@@ -431,6 +431,10 @@ export function createSurface(client, hello, { cwd } = {}) {
431
431
  case "apps.open": {
432
432
  if (typeof args.id !== "string" || args.id === "")
433
433
  throw new SurfaceError("invalid", "id is the app's bundle id or package name");
434
+ // A Linux computerd older than its own url check would put this into the app's argv as a flag (Chromium's
435
+ // --renderer-cmd-prefix runs a command); no platform takes one as a url.
436
+ if (typeof args.url === "string" && /^[ \t\r\n\v\f]*-/.test(args.url))
437
+ throw new SurfaceError("invalid", `url ${JSON.stringify(args.url)} starts with "-": the app would take it as a flag, not a url`);
434
438
  await call("apps.launch", { id: args.id, ...(typeof args.url === "string" ? { url: args.url } : {}), ...(args.background === true ? { background: true } : {}) }, signal);
435
439
  return { value: { id: args.id }, text: `opened ${args.id}`, images: [] };
436
440
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parcha/agentrun-computer",
3
- "version": "0.1.0-beta.61",
3
+ "version": "0.1.0-beta.63",
4
4
  "description": "The open platform's computer protocol: a daemon in every computer, and one provisioner per vendor, starting with Docker.",
5
5
  "keywords": [
6
6
  "agentrun",
@@ -57,6 +57,10 @@
57
57
  "types": "./dist/fly.d.ts",
58
58
  "default": "./dist/fly.js"
59
59
  },
60
+ "./render": {
61
+ "types": "./dist/render.d.ts",
62
+ "default": "./dist/render.js"
63
+ },
60
64
  "./cloudflare": {
61
65
  "types": "./dist/cloudflare.d.ts",
62
66
  "default": "./dist/cloudflare.js"