@acryldev/blends 1.7.10 → 1.7.12

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 (37) hide show
  1. package/dist/index.d.ts +13 -1
  2. package/dist/index.js +24 -5
  3. package/dist/index.js.map +1 -1
  4. package/lib/{audit-B2H3sUfg.d.ts → audit-D0McL8hN.d.ts} +1 -1
  5. package/lib/cordis/door.d.ts +4 -4
  6. package/lib/cordis/door.js +52 -3
  7. package/lib/door/host.d.ts +2 -2
  8. package/lib/door/host.js +1 -1
  9. package/lib/door/page.d.ts +5 -1
  10. package/lib/door/page.js +28 -5
  11. package/lib/door/protocol.d.ts +2 -2
  12. package/lib/door/protocol.js +2 -2
  13. package/lib/{protocol-8HjYa5OX.js → protocol-BKXK53WF.js} +39 -3
  14. package/lib/{protocol-DdQgl224.d.ts → protocol-CbLZdkJ5.d.ts} +31 -2
  15. package/lib/{snapshot-text-Cyl69OKv.js → snapshot-text-BYY2gA98.js} +2 -2
  16. package/pack/lib/create-source.mjs +12 -0
  17. package/pack/pack-blank-mac.mjs +693 -0
  18. package/package.json +3 -2
  19. package/plugins/door/package.json +1 -1
  20. package/plugins/door/src/cli/acryl.ts +12 -1
  21. package/plugins/door/src/host/door.ts +6 -0
  22. package/plugins/door/src/host/verbs.ts +15 -2
  23. package/plugins/door/src/page/driver/driver.ts +23 -2
  24. package/plugins/door/src/page/index.ts +11 -0
  25. package/plugins/door/src/page/protocol.ts +37 -2
  26. package/plugins/door/src/page/snapshot-text.ts +2 -1
  27. package/plugins/plugin-share/package.json +1 -1
  28. package/plugins/plugin-share/plugin.json +1 -1
  29. package/plugins/save/cli.ts +2 -0
  30. package/plugins/save/package.json +1 -1
  31. package/plugins/save/plugin.json +2 -4
  32. package/plugins/save/share-cli.ts +8 -1
  33. package/plugins/save/share.ts +123 -36
  34. package/shared/AGENTS.core.md +9 -0
  35. package/shared/library-history-versions.json +3 -1
  36. package/shared/library-history.json +9 -3
  37. package/shared/skills/acryl-app/SKILL.md +4 -3
package/dist/index.d.ts CHANGED
@@ -34,8 +34,20 @@ export declare const HELP: string;
34
34
  * Run the CLI and return the exit code: 0 done, 1 failed or refused, 2 a usage error. Never calls `process.exit`.
35
35
  */
36
36
  export declare function runCli(argv: readonly string[], io?: Io): Promise<number>;
37
+ /** The app's desktop shell: where its files are and its Electron entry, relative to the app (POSIX separators, as package.json `main` wants). */
38
+ type DesktopShell = {
39
+ readonly kind: 'copy';
40
+ readonly root: string;
41
+ readonly main: string;
42
+ } | {
43
+ readonly kind: 'package';
44
+ readonly root: string;
45
+ readonly main: string;
46
+ };
47
+ /** The app's desktop shell, or undefined for an app without one (a web-only app). A copy wins over the package: it is what the app runs. */
48
+ export declare function findDesktopShell(appDir: string): DesktopShell | undefined;
37
49
  /**
38
- * Whether the app is in the frame already, by its packages: it depends on the desktop shell package and its `cordis.patch.yml` mounts the Blends frame. A starter
50
+ * Whether the app is in the frame already, by its packages: it depends on the desktop shell package and its `cordis.patch.yml` mounts the Blends frame or the workbench. A starter
39
51
  * built that way (ACRYL ADE and Control Center, made from the monorepo) needs neither `add desktop-shell` nor the framing `upgrade`: both would refuse it (the
40
52
  * shell is declared, and its library plugin copies are newer than the lock) and nothing is missing. `create` asks here.
41
53
  */
package/dist/index.js CHANGED
@@ -87,7 +87,7 @@ var packages = {
87
87
  "path": "../plugins/system-prompt"
88
88
  },
89
89
  "@acryldev/app-context": {
90
- "version": "0.2.0",
90
+ "version": "0.2.1",
91
91
  "path": "../plugins/app-context"
92
92
  },
93
93
  "@acryldev/versions": {
@@ -95,7 +95,7 @@ var packages = {
95
95
  "path": "../plugins/versions"
96
96
  },
97
97
  "@acryldev/blends-frame": {
98
- "version": "0.2.8",
98
+ "version": "0.2.9",
99
99
  "path": "../plugins/blends-frame"
100
100
  }
101
101
  };
@@ -1337,14 +1337,15 @@ function frameProfileForApp(root) {
1337
1337
  return findDesktopShell(root) !== void 0 || dependsOn(root, "@acryldev/desktop-shell") ? publishedFrameProfile() : void 0;
1338
1338
  }
1339
1339
  /**
1340
- * Whether the app is in the frame already, by its packages: it depends on the desktop shell package and its `cordis.patch.yml` mounts the Blends frame. A starter
1340
+ * Whether the app is in the frame already, by its packages: it depends on the desktop shell package and its `cordis.patch.yml` mounts the Blends frame or the workbench. A starter
1341
1341
  * built that way (ACRYL ADE and Control Center, made from the monorepo) needs neither `add desktop-shell` nor the framing `upgrade`: both would refuse it (the
1342
1342
  * shell is declared, and its library plugin copies are newer than the lock) and nothing is missing. `create` asks here.
1343
1343
  */
1344
1344
  function isFramedByPackages(appDir) {
1345
1345
  if (!dependsOn(appDir, "@acryldev/desktop-shell")) return false;
1346
1346
  try {
1347
- return readFileSync(join(appDir, "cordis.patch.yml"), "utf8").includes("@acryldev/blends-frame");
1347
+ const patch = readFileSync(join(appDir, "cordis.patch.yml"), "utf8");
1348
+ return patch.includes("@acryldev/blends-frame") || patch.includes("@acryldev/workspace");
1348
1349
  } catch {
1349
1350
  return false;
1350
1351
  }
@@ -3206,6 +3207,20 @@ async function kvImport(options, io) {
3206
3207
  await source.close();
3207
3208
  }
3208
3209
  }
3210
+ // src/pack.ts
3211
+ /**
3212
+ * `acrylblends pack`: the app in a folder as an installer for this machine's OS (a DMG, an NSIS installer or a Debian package), made with the published
3213
+ * packages, so a Blend's own repository releases its product without ACRYL's source. The packer is ACRYL's framework/scripts/pack-blank-mac.mjs, which
3214
+ * the published package carries in pack/ (scripts-pack.mjs copies it); in ACRYL's checkout the CLI runs it from there.
3215
+ */
3216
+ function pack(args, io) {
3217
+ const script = [new URL("../pack/pack-blank-mac.mjs", import.meta.url), new URL("../../../scripts/pack-blank-mac.mjs", import.meta.url)].map((url) => fileURLToPath(url)).find((file) => existsSync(file));
3218
+ if (script === void 0) {
3219
+ io.stderr.write("error: this copy of @acryldev/blends carries no packer (pack/pack-blank-mac.mjs)\n");
3220
+ return 1;
3221
+ }
3222
+ return spawnSync(process.execPath, [script, ...args], { stdio: "inherit" }).status ?? 1;
3223
+ }
3209
3224
  // src/preflight.ts
3210
3225
  /** The Node the framework needs (the bin refuses an older one before loading anything). */
3211
3226
  const NODE_MINIMUM = [22, 19];
@@ -4465,6 +4480,9 @@ Usage:
4465
4480
  for a page that has to be opened again after its session ended
4466
4481
  acrylblends preflight Check this machine for the workshop: Node, npm, git, a coding agent, a free port
4467
4482
  (and on Windows PowerShell and long paths); one line per check, PASS or the fix
4483
+ acrylblends pack --from <dir> [--product "Name"] [--arch arm64|x64] [--out d]
4484
+ The app in <dir> as an installer for this OS (DMG, NSIS .exe, .deb), made
4485
+ with the published packages; updates come from <dir>'s GitHub releases
4468
4486
  acrylblends build-client [root] [out] Compile the client modules once for production (src/client to dist/client)
4469
4487
  acrylblends kv import <kv.json> <db> Move a JSON-file kv store into the kv table of a SQLite database [--overwrite] [--table t] [--migrations dir]
4470
4488
  acrylblends check-deps [dir] Fail when app code imports a database driver or opener outside the file named in
@@ -4509,6 +4527,7 @@ async function runCli(argv, io = processIo()) {
4509
4527
  if (command === "plugins") return listPlugins(io);
4510
4528
  if (command === "open") return await openFrame(args, io);
4511
4529
  if (command === "preflight") return await runPreflight(io);
4530
+ if (command === "pack") return pack(args, io);
4512
4531
  throw new UsageError(`unknown command "${command}"`);
4513
4532
  } catch (error) {
4514
4533
  if (error instanceof UsageError) {
@@ -4529,6 +4548,6 @@ function parseCheckDeps(args) {
4529
4548
  function parseKv(args) {
4530
4549
  return parseKvOptions(args);
4531
4550
  }
4532
- export { FRAME_URL_FILE, HELP, TEMPLATES, TEMPLATE_ALIASES, TEMPLATE_SUMMARY, TargetNotEmptyError, UsageError, VERSION, add, assertTargetFree, closure, copyPlugin, copyTemplate, frameHome, frameUrlPath, init, isFramedByPackages, isOmitted, isTemplate, isValidName, libraryRoot, listPlugins, lookUpFrameUrl, mergeDependencies, mergeTooling, nameFrom, openFrame, parseAddOptions, parseInitOptions, parseUpdateOptions, parseUpgradeOptions, readFrameUrl, readLibrary, readTemplatePlugins, removeFrameUrl, resolveTemplate, runCli, templateDir, templatesRoot, tokenOfFrameUrl, update, upgrade, writeFrameUrl };
4551
+ export { FRAME_URL_FILE, HELP, TEMPLATES, TEMPLATE_ALIASES, TEMPLATE_SUMMARY, TargetNotEmptyError, UsageError, VERSION, add, assertTargetFree, closure, copyPlugin, copyTemplate, findDesktopShell, frameHome, frameUrlPath, init, isFramedByPackages, isOmitted, isTemplate, isValidName, libraryRoot, listPlugins, lookUpFrameUrl, mergeDependencies, mergeTooling, nameFrom, openFrame, parseAddOptions, parseInitOptions, parseUpdateOptions, parseUpgradeOptions, readFrameUrl, readLibrary, readTemplatePlugins, removeFrameUrl, resolveTemplate, runCli, templateDir, templatesRoot, tokenOfFrameUrl, update, upgrade, writeFrameUrl };
4533
4552
 
4534
4553
  //# sourceMappingURL=index.js.map