@acryldev/blends 1.7.28 → 1.7.30

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.
@@ -4,8 +4,7 @@ A plugin is a folder in `plugins/`. Another person's app takes it from a GitHub
4
4
  [cordisplugins.github.io](https://cordisplugins.github.io), from npm, or from a list your group keeps. To share a whole app instead, see [Share a Blend](share-blends.md).
5
5
 
6
6
  Every command and every output below was run on 2026-11-21 as two people, Ana (publishes) and Ben (pulls), each with an app and a home folder of their own, made with
7
- `@acryldev/blends` 1.7.21, against the GitHub organization `inboxxobni`. Outputs are pasted as they came, with the `npm run` banner lines left out. The npm steps
8
- ran in npm's own dry run (see "To npm"), so nothing was published to npm. Commands run in the app's folder with the app running (`npm run dev`, or the desktop
7
+ `@acryldev/blends` 1.7.21, against the GitHub organization `inboxxobni`. Outputs are pasted as they came, with the `npm run` banner lines left out. The npm steps (see "To npm") were a real publish to npm on 2026-11-22 of a throwaway package. Commands run in the app's folder with the app running (`npm run dev`, or the desktop
9
8
  app): a pull installs into the running app. You need `gh` signed in (`gh auth login`) to publish; pulling a public plugin needs no login.
10
9
 
11
10
  ## 1. Make the plugin
@@ -182,23 +181,61 @@ the same as the command.
182
181
  ## To npm
183
182
 
184
183
  ```sh
185
- npm run acryl -- plugin publish sh-guide-clock --to npm --scope guide-test
184
+ npm run acryl -- plugin publish sh-guide-clock --to npm --scope <your-npm-account>
186
185
  ```
187
186
 
188
- It uses **your own** npm login and nothing else: it asks `npm whoami`. The scope is the account of that login, or `--scope`; `--registry <address>` names another
189
- registry. A version npm already has makes it the next patch. The plan and the `yes` are the same as for GitHub:
187
+ It uses **your own** npm login and nothing else: it asks `npm whoami`. The package is named `@<scope>/<plugin folder>`: the scope is the account of that login,
188
+ or `--scope`. (The door publishes scoped names only; `plugin pull` also takes an unscoped package.) `--registry <address>` names another registry. A version npm
189
+ already has makes it the next patch. The plan and the `yes` are the same as for GitHub. This is the real run of 2026-11-22, a throwaway plugin
190
+ `acryl-share-proof-1122` published by the npm account `webboxescom` (nothing was simulated; the package was deprecated afterwards):
190
191
 
191
192
  ```
192
- Publish to npm as @guide-test/sh-guide-clock (registry https://registry.npmjs.org/, signed in as the account of your own npm login), public, version 0.1.1, license MIT.
193
+ Publish to npm as @webboxescom/acryl-share-proof-1122 (registry https://registry.npmjs.org/, signed in as the account of your own npm login), public, version 0.1.0, license MIT.
193
194
  Files: README.md, index.ts, package.json.
194
- A friend gets exactly these bytes with: npm run acryl -- plugin pull npm:@guide-test/sh-guide-clock@0.1.1@sha256:5af6caf8b8086985f0094c113aa81ce687e8fab1f204609e46ef69a8d5801e13
195
- Publish @guide-test/sh-guide-clock v0.1.1 under MIT? Type yes to send it: yes
196
- Published: https://www.npmjs.com/package/@guide-test/sh-guide-clock
195
+ A friend gets exactly these bytes with: npm run acryl -- plugin pull npm:@webboxescom/acryl-share-proof-1122@0.1.0@sha256:1e09c3ba3253cb78ac8457c75e5ec417a9fbddb30a2b84140f0e3a4daf42c6ec
196
+ Publish @webboxescom/acryl-share-proof-1122 v0.1.0 under MIT? Type yes to send it: yes
197
+ Published: https://www.npmjs.com/package/@webboxescom/acryl-share-proof-1122
197
198
  ```
198
199
 
199
- That run was a **dry run**: the app was started with `npm_config_dry_run=true` in its environment, which makes npm stop before it sends the package (the line
200
- `Published:` is the app's, and `npm view @guide-test/sh-guide-clock` still answered `E404 Not Found`). The computer had no npm login, so `npm whoami` was answered by
201
- a stand-in program first on the `PATH` that printed an account name; everything else was the real npm. Use the same two settings to try it without publishing.
200
+ npm answered the upload with `202` ("your package is being processed and may take a few minutes to become available"): the package was listed about five minutes
201
+ later (0.1.1 about three minutes later), and until then `npm view` and a pull say `404` / "npm has no ...". Wait, then pull. Ben, in his own app with no npm login:
202
+
203
+ ```sh
204
+ npm run acryl -- plugin pull npm:@webboxescom/acryl-share-proof-1122
205
+ ```
206
+
207
+ ```
208
+ {
209
+ "ok": true,
210
+ "name": "acryl-share-proof-1122",
211
+ "version": "0.1.0",
212
+ "integrity": "sha512-2UZh8hxoOnZoordA3z3/CgDv/S85t0VMfpo308q77ztkSiqOtPFDCXC7vXPqPqks1GctZ3uAC4JkEgAE1OzIwA==",
213
+ "digest": "1e09c3ba3253cb78ac8457c75e5ec417a9fbddb30a2b84140f0e3a4daf42c6ec",
214
+ "action": "installed",
215
+ "state": "active",
216
+ "remembered": true
217
+ }
218
+ ```
219
+
220
+ The digest is the one the publisher's plan printed, and the plugin answered at once (`{"text":"proof, v0.1.0"}`). An update works as for GitHub: Ana published 0.1.1 (the
221
+ plan named the next patch itself); Ben, who had added `BEN.md` and a comment line to `index.ts`, pulled again and kept both:
222
+
223
+ ```
224
+ {
225
+ "ok": true,
226
+ "name": "acryl-share-proof-1122",
227
+ "version": "0.1.1",
228
+ "integrity": "sha512-QGHk5W2SUip3AUGBO9UbI7kzMlJsLwLJvUoQtCICgVIJiV01rSA/6JCA7RILxiey1ddcHMemkbcOnd+Iz9oo0A==",
229
+ "digest": "0f4385f83e9efaa80430762ca89b6248a38fdff9bdd11f4243d3202f4c14fedd",
230
+ "action": "updated",
231
+ "state": "active",
232
+ "remembered": true,
233
+ "kept": [
234
+ "BEN.md",
235
+ "index.ts"
236
+ ]
237
+ }
238
+ ```
202
239
 
203
240
  Signed out, the plan is refused and says how to sign in:
204
241
 
@@ -207,8 +244,9 @@ refused: npm whoami failed: you are not signed in to npm on https://registry.npm
207
244
  ```
208
245
 
209
246
  In the app, Settings > Plugins > **Share...** > **Publish to npm** does the same (the account field is the scope), and the card then reads "Shared on npm" with a
210
- copyable pull line. `plugin pull npm:` was **not run** against the real npm registry: there is no public plugin in this form on npm yet. It is covered by tests,
211
- which publish and pull a package, check the integrity npm lists, refuse a wrong one, and update in place.
247
+ copyable pull line. Taking a package back: `npm unpublish <package> --force` works within 72 hours, but npm refuses it for an access token that skips two-factor
248
+ (`403 ... Granular access tokens that bypass two-factor authentication may not perform this action`), so run it signed in with two-factor, or use
249
+ `npm deprecate <package> "<message>"`, which that token may do.
212
250
 
213
251
  ## Try it without touching your own account
214
252
 
@@ -19,25 +19,38 @@ export function osVersion(packageVersion, blendVersion) {
19
19
  }
20
20
 
21
21
  /**
22
- * blend.yaml's text with `metadata.version` set to `version` (added under `metadata:` when missing), the rest of the text untouched. The packed copy
23
- * carries the version the OS shows, so the frame's top bar, the About window and Installed apps name the same one. Without a `metadata:` block the text
24
- * is returned as it is.
22
+ * blend.yaml's text with `metadata.<key>` set to `value` (added under `metadata:` when missing), the rest of the text untouched. Without a `metadata:`
23
+ * block the text is returned as it is.
25
24
  */
26
- export function withManifestVersion(text, version) {
25
+ function withMetadataField(text, key, value) {
27
26
  const lines = text.split('\n')
28
27
  const start = lines.findIndex((line) => /^metadata:\s*(#.*)?$/u.test(line))
29
28
  if (start === -1) return text
30
29
  let end = lines.findIndex((line, index) => index > start && /^\S/u.test(line))
31
30
  if (end === -1) end = lines.length
32
31
  const at = lines.findIndex(
33
- (line, index) => index > start && index < end && /^\s+version:/u.test(line),
32
+ (line, index) => index > start && index < end && new RegExp(`^\\s+${key}:`, 'u').test(line),
34
33
  )
35
34
  const indent =
36
35
  lines
37
36
  .slice(start + 1, end)
38
37
  .find((line) => /^\s+\S/u.test(line))
39
38
  ?.match(/^\s+/u)?.[0] ?? ' '
40
- if (at === -1) lines.splice(start + 1, 0, `${indent}version: ${version}`)
41
- else lines[at] = `${lines[at].match(/^\s+/u)[0]}version: ${version}`
39
+ if (at === -1) lines.splice(start + 1, 0, `${indent}${key}: ${value}`)
40
+ else lines[at] = `${lines[at].match(/^\s+/u)[0]}${key}: ${value}`
42
41
  return lines.join('\n')
43
42
  }
43
+
44
+ /**
45
+ * blend.yaml's text with `metadata.version` set to `version`. The packed copy carries the version the OS shows, so the frame's top bar, the About
46
+ * window and Installed apps name the same one.
47
+ */
48
+ export const withManifestVersion = (text, version) => withMetadataField(text, 'version', version)
49
+
50
+ /**
51
+ * blend.yaml's text with `metadata.name` set to the product's name, as a JSON string (a name may hold a colon or a quote). The packed copy is the
52
+ * scaffold's, named for its folder (`blend`); the instance names an app by this field, so the window's title, the About panel and the Dock say the
53
+ * product ("ACRYL Control Center").
54
+ */
55
+ export const withManifestName = (text, name) =>
56
+ withMetadataField(text, 'name', JSON.stringify(name))
@@ -35,7 +35,7 @@ import { fileURLToPath, pathToFileURL } from 'node:url'
35
35
  import { desktopEntry, launcherScript, tarballName } from './lib/arch-linux.mjs'
36
36
  import { createSource, repositoryOnlyIn } from './lib/create-source.mjs'
37
37
  import { DEB_DEPENDS, debPackageName } from './lib/deb.mjs'
38
- import { osVersion, withManifestVersion } from './lib/os-version.mjs'
38
+ import { osVersion, withManifestName, withManifestVersion } from './lib/os-version.mjs'
39
39
 
40
40
  const root = resolve(dirname(fileURLToPath(import.meta.url)), '..')
41
41
  /**
@@ -552,11 +552,13 @@ const blendVersion = await (async () => {
552
552
  }
553
553
  })()
554
554
  manifest.version = osVersion(manifest.version, blendVersion)
555
- // The frame's top bar reads blend.yaml: the packed copy names the same version as About and Installed apps (a release sets only package.json's).
556
- if (blendVersion !== manifest.version && existsSync(join(app, 'blend.yaml'))) {
555
+ // The packed blend.yaml is the scaffold's: it names the version the OS shows (the frame's top bar reads it, a release sets only package.json's) and the
556
+ // product (the instance names the app, so the window's title and the About panel, by it).
557
+ if (existsSync(join(app, 'blend.yaml'))) {
558
+ const written = readFileSync(join(app, 'blend.yaml'), 'utf8')
557
559
  writeFileSync(
558
560
  join(app, 'blend.yaml'),
559
- withManifestVersion(readFileSync(join(app, 'blend.yaml'), 'utf8'), manifest.version),
561
+ withManifestName(withManifestVersion(written, manifest.version), PRODUCT),
560
562
  )
561
563
  }
562
564
  log(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acryldev/blends",
3
- "version": "1.7.28",
3
+ "version": "1.7.30",
4
4
  "description": "The Acryl web framework (import { Acryl } from \"acrylblends\") and the acrylblends command that scaffolds Cordis apps.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acryldev/agent-panel",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "A chat panel inside the running app: the person writes what they want, the app's own agent (or Claude Code, Codex or pi started in the app folder) builds it through the same door, and the page reloads when a plugin was installed, with no restart. Development only; opt-in with acrylblends add agent-panel.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acryldev/app-settings",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Validated settings per namespace in one YAML file in the app's home: defaults, base and stored layers, watch, update.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acryldev/builder",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "The agent's tools for building the app it runs in: write, install, read, list and remove extensions, with real results.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acryldev/desktop-shell",
3
- "version": "0.1.10",
3
+ "version": "0.1.11",
4
4
  "description": "Run the app as a desktop app: an Electron window on the app's own server. `npm run desktop`; the app's code never imports electron.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acryldev/desktop-web",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Run a plain Acryl app (`export default app`) as a desktop app: an Electron window on the app's own server. `npm run desktop`; the app's code never imports electron. `acrylblends add desktop` picks this one for an app without the Blend plugins.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acryldev/driver-acp",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Any agent that speaks the Agent Client Protocol (ACP) as a chat in the agent panel, started in the app folder: DeepSeek Harness (dsh --profile acp) is the first preset, other ACP agents are added by config. Development only; needs the agent panel; opt-in with acrylblends add driver-acp.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acryldev/driver-pty",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "A coding agent (claude, codex, pi, any program) in a real terminal inside the running app: the panel gets a terminal tab, the agent builds through the door in its own interactive mode. Development only; needs the agent panel; opt-in with acrylblends add driver-pty.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acryldev/extensions",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Install, update, remove and reload plugins while the app runs; a failed update brings the previous version back; a ledger of every change.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acryldev/feedback",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Feedback from the people who use the app: a Feedback button on every page, in production too, that lets them pinpoint the element they mean (or choose \"Nothing specific\") and send a note; the ACRYL frame shows the notes in the builder's left panel.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -11,6 +11,7 @@ import { createHash } from 'node:crypto'
11
11
  import { readFileSync } from 'node:fs'
12
12
  import { basename, join, resolve } from 'node:path'
13
13
  import type { Context } from '@deepseek-ai/cordis'
14
+ import { parse } from 'yaml'
14
15
  import {
15
16
  AppInstanceError,
16
17
  appDataHome,
@@ -95,8 +96,20 @@ const plainName = (folder: string) =>
95
96
  .replace(/[^a-z0-9]+/g, '-')
96
97
  .replace(/^-+|-+$/g, '') || 'app'
97
98
 
98
- /** The name the app was made with (`init --name`, kept as package.json's name), or undefined when it has none. */
99
+ /**
100
+ * The name the person sees for the app (the window's title, the About panel, the Dock): its Blend's name when its `blend.yaml` has one ("ACRYL Control Center", made in a folder
101
+ * called `control-center`), else the name the app was made with (`init --name`, kept as package.json's name), or undefined when it has neither.
102
+ */
99
103
  function declaredName(root: string): string | undefined {
104
+ try {
105
+ const manifest = parse(readFileSync(join(root, 'blend.yaml'), 'utf8')) as {
106
+ metadata?: { name?: unknown }
107
+ } | null
108
+ const blend = manifest?.metadata?.name
109
+ if (typeof blend === 'string' && blend.trim() !== '') return blend.trim()
110
+ } catch {
111
+ // No blend.yaml, or one that cannot be read: the package names the app.
112
+ }
100
113
  try {
101
114
  const name = (
102
115
  JSON.parse(readFileSync(join(root, 'package.json'), 'utf8')) as { name?: unknown }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acryldev/instance",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Where the app keeps things (home, port, run lock), chosen once from the environment or the project folder.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acryldev/plugin-share",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "Share plugins between people. Pull one someone released into the running app: fetched without running anything, checked by digest and for every OS, then installed live. Publish one, only as a plan a person confirmed.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acryldev/showcase",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "The collective app's showcase: a page at /showcase with a card for every plugin in the app (name, author, version, where it came from, its state, and links to its pages, its home widget and its tool), updated live as plugins are pulled and removed.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acryldev/tasks",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Durable task records: id, owner, input, status, result, trace; appended to a log in the app's home and readable after a restart.",
5
5
  "license": "MIT",
6
6
  "repository": {