@acryldev/blends 1.7.2 → 1.7.4

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 (55) hide show
  1. package/README.md +6 -6
  2. package/dist/index.js +34 -18
  3. package/dist/index.js.map +1 -1
  4. package/docs/framework/README.md +1 -1
  5. package/docs/framework/cordis/migration-to-1-0.md +4 -4
  6. package/docs/framework/getting-started/basic.md +4 -4
  7. package/docs/framework/getting-started/bun.md +2 -2
  8. package/docs/framework/getting-started/nodejs.md +3 -3
  9. package/docs/framework/guides/create-acrylblends.md +5 -5
  10. package/docs/framework/helpers/streaming.md +1 -1
  11. package/docs/framework/workshop/README.md +3 -3
  12. package/docs/framework/workshop/facilitator.md +3 -3
  13. package/package.json +1 -1
  14. package/plugins/agent/README.md +15 -0
  15. package/plugins/agent/package.json +1 -1
  16. package/plugins/agent-panel/README.md +15 -0
  17. package/plugins/agent-panel/package.json +1 -1
  18. package/plugins/app-settings/README.md +15 -0
  19. package/plugins/app-settings/package.json +1 -1
  20. package/plugins/builder/README.md +15 -0
  21. package/plugins/builder/package.json +1 -1
  22. package/plugins/desktop-shell/README.md +17 -0
  23. package/plugins/desktop-shell/package.json +3 -2
  24. package/plugins/desktop-web/README.md +15 -0
  25. package/plugins/desktop-web/package.json +1 -1
  26. package/plugins/driver-pty/README.md +15 -0
  27. package/plugins/driver-pty/package.json +1 -1
  28. package/plugins/drivers/README.md +13 -0
  29. package/plugins/drivers/package.json +1 -1
  30. package/plugins/extensions/README.md +15 -0
  31. package/plugins/extensions/package.json +1 -1
  32. package/plugins/feedback/README.md +15 -0
  33. package/plugins/feedback/package.json +1 -1
  34. package/plugins/home/README.md +15 -0
  35. package/plugins/home/package.json +1 -1
  36. package/plugins/instance/README.md +15 -0
  37. package/plugins/instance/package.json +3 -2
  38. package/plugins/manifest/README.md +15 -0
  39. package/plugins/manifest/package.json +1 -1
  40. package/plugins/openai/README.md +15 -0
  41. package/plugins/openai/package.json +1 -1
  42. package/plugins/page/LICENSE +21 -0
  43. package/plugins/page/package.json +4 -2
  44. package/plugins/plugin-share/plugin.json +1 -1
  45. package/plugins/sandbox/README.md +15 -0
  46. package/plugins/sandbox/package.json +1 -1
  47. package/plugins/save/README.md +15 -0
  48. package/plugins/save/package.json +1 -1
  49. package/plugins/save/plugin.json +1 -1
  50. package/plugins/save/share-cli.ts +22 -3
  51. package/plugins/save/share.ts +16 -5
  52. package/plugins/showcase/README.md +15 -0
  53. package/plugins/showcase/package.json +1 -1
  54. package/plugins/tasks/README.md +15 -0
  55. package/plugins/tasks/package.json +1 -1
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@acryldev/page",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
+ "license": "MIT",
4
5
  "description": "The page of a framework-hosted app: the ACRYL frame's own minimal document, its index taps applied per request, and the built client assets the client runtime boots from, served by @acryldev/web-server",
5
6
  "type": "module",
6
7
  "main": "lib/index.js",
@@ -14,7 +15,8 @@
14
15
  "files": [
15
16
  "lib",
16
17
  "README.md",
17
- "plugin.json"
18
+ "plugin.json",
19
+ "LICENSE"
18
20
  ],
19
21
  "scripts": {
20
22
  "build": "node scripts/clean.mjs && tsdown && tsc -p tsconfig.json --emitDeclarationOnly",
@@ -6,7 +6,7 @@
6
6
  "provides": ["pluginShare"],
7
7
  "dependencies": {
8
8
  "@deepseek-ai/cordis": "4.0.4",
9
- "@acryldev/app-persistence": "0.1.2",
9
+ "@acryldev/app-persistence": "0.1.3",
10
10
  "@acryldev/blends-core": "0.6.0",
11
11
  "@acryldev/plugin-hub-core": "0.2.2",
12
12
  "yaml": "2.9.0"
@@ -0,0 +1,15 @@
1
+ # @acryldev/sandbox
2
+
3
+ Run untrusted code (agent-written tools) in a child process under Node's permission model: read only its own folder, no child processes, no env, time and memory limits.
4
+
5
+ ## Install
6
+
7
+ ```sh
8
+ npm install @acryldev/sandbox
9
+ ```
10
+
11
+ It is a Cordis plugin: its peer dependency is `@deepseek-ai/cordis`, and an app registers it as a row of its `blend.yaml`.
12
+
13
+ ## Source and license
14
+
15
+ Part of [ACRYL](https://github.com/acryldev/acryl): [`plugins/sandbox`](https://github.com/acryldev/acryl/tree/main/plugins/sandbox). MIT license.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acryldev/sandbox",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Run untrusted code (agent-written tools) in a child process under Node's permission model: read only its own folder, no child processes, no env, time and memory limits.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -0,0 +1,15 @@
1
+ # @acryldev/save
2
+
3
+ Save the app to its own git repository, and share it: a repository of its own on GitHub, created and pushed only after a person confirms the plan. Refuses a file that holds a secret, and a private app going to a public remote.
4
+
5
+ ## Install
6
+
7
+ ```sh
8
+ npm install @acryldev/save
9
+ ```
10
+
11
+ It is a Cordis plugin: its peer dependency is `@deepseek-ai/cordis`, and an app registers it as a row of its `blend.yaml`.
12
+
13
+ ## Source and license
14
+
15
+ Part of [ACRYL](https://github.com/acryldev/acryl): [`plugins/save`](https://github.com/acryldev/acryl/tree/main/plugins/save). MIT license.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acryldev/save",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Save the app to its own git repository, and share it: a repository of its own on GitHub, created and pushed only after a person confirms the plan. Refuses a file that holds a secret, and a private app going to a public remote.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -6,7 +6,7 @@
6
6
  "provides": [],
7
7
  "dependencies": {
8
8
  "@deepseek-ai/cordis": "4.0.4",
9
- "@acryldev/app-persistence": "0.1.2"
9
+ "@acryldev/app-persistence": "0.1.3"
10
10
  },
11
11
  "mount": "add the scripts \"save\": \"node plugins/save/cli.ts\" and \"share\": \"node plugins/save/share-cli.ts\" to package.json; mount the plugin to give the agent a save_app tool",
12
12
  "entries": {
@@ -1,5 +1,6 @@
1
1
  /**
2
- * `npm run share [-- --owner <account>]`: show what sharing this app would send, and ask. Only a plain yes at the terminal sends it.
2
+ * `npm run share [-- --owner <account>] [--visibility private|public]`: show what sharing this app would send, and ask. Only a plain yes at the
3
+ * terminal sends it. --visibility decides who may see a new repository and is kept in blend.yaml (metadata.visibility).
3
4
  * --json print the plan as JSON and send nothing (what a program, or an agent, reads)
4
5
  * --confirm <plan> send exactly this plan (the JSON `--json` printed, as it is or base64url-encoded so no shell can change it), and nothing when
5
6
  * the app no longer matches it: for a person's own surface that showed them the plan and took their yes (the ACRYL
@@ -48,9 +49,27 @@ async function main(argv: readonly string[]): Promise<number> {
48
49
  const { values } = parseArgs({
49
50
  args: [...argv],
50
51
  strict: true,
51
- options: { owner: { type: 'string' }, json: { type: 'boolean' }, confirm: { type: 'string' } },
52
+ options: {
53
+ owner: { type: 'string' },
54
+ visibility: { type: 'string' },
55
+ json: { type: 'boolean' },
56
+ confirm: { type: 'string' },
57
+ },
52
58
  })
53
- const options = values.owner === undefined ? {} : { owner: values.owner }
59
+ if (
60
+ values.visibility !== undefined &&
61
+ values.visibility !== 'private' &&
62
+ values.visibility !== 'public'
63
+ ) {
64
+ console.error('not shared: --visibility is private or public')
65
+ return 1
66
+ }
67
+ const options = {
68
+ ...(values.owner === undefined ? {} : { owner: values.owner }),
69
+ ...(values.visibility === undefined
70
+ ? {}
71
+ : { visibility: values.visibility as 'private' | 'public' }),
72
+ }
54
73
  if (values.confirm !== undefined) {
55
74
  const confirmed = readPlan(values.confirm)
56
75
  if (!isPlan(confirmed)) {
@@ -5,7 +5,7 @@
5
5
  * same guards hold: no file that holds a secret, and a private app never goes to a public repository.
6
6
  */
7
7
  import { spawnSync } from 'node:child_process'
8
- import { readFileSync } from 'node:fs'
8
+ import { readFileSync, writeFileSync } from 'node:fs'
9
9
  import { basename, join } from 'node:path'
10
10
  import {
11
11
  connectRemote,
@@ -18,6 +18,7 @@ import {
18
18
  type SecretFinding,
19
19
  saveApp,
20
20
  type Visibility,
21
+ withVisibility,
21
22
  } from '@acryldev/app-persistence'
22
23
 
23
24
  /** What a share would send, and where. */
@@ -50,6 +51,8 @@ export type ShareResult =
50
51
  export interface ShareOptions {
51
52
  /** The GitHub account or organization for a new repository; the signed-in account when absent. */
52
53
  readonly owner?: string
54
+ /** Who may see a new repository; blend.yaml's metadata.visibility when absent. A share with it records it there, so later saves agree. */
55
+ readonly visibility?: Visibility
53
56
  }
54
57
 
55
58
  /** What a share needs from the computer; tests give their own. */
@@ -100,18 +103,19 @@ export function planShare(
100
103
  ports: SharePorts = sharePorts(appRoot),
101
104
  ): SharePlan | ShareRefused {
102
105
  const identity = readAppIdentity(manifestOf(appRoot))
106
+ const visibility = options.visibility ?? identity.visibility
103
107
  const changes = ports.pending()
104
108
  const remote = ports.git.remoteUrl()
105
109
  if (remote !== undefined) {
106
110
  const known = ports.hosting.visibilityOf(remote)
107
- if (identity.visibility === 'private' && known === 'public')
111
+ if (visibility === 'private' && known === 'public')
108
112
  return refused(
109
113
  `this app is private (blend.yaml metadata.visibility) but its remote ${remote} is public. Make the remote private, or set visibility: public if you mean to open it`,
110
114
  )
111
115
  return {
112
116
  repository: remote,
113
117
  create: false,
114
- visibility: known === 'unknown' ? identity.visibility : known,
118
+ visibility: known === 'unknown' ? visibility : known,
115
119
  changes,
116
120
  }
117
121
  }
@@ -125,7 +129,7 @@ export function planShare(
125
129
  const name = repositoryName(identity.name ?? basename(appRoot))
126
130
  if (name === '')
127
131
  return refused('the app has no name to call its repository by (blend.yaml metadata.name)')
128
- return { repository: `${owner}/${name}`, create: true, visibility: identity.visibility, changes }
132
+ return { repository: `${owner}/${name}`, create: true, visibility, changes }
129
133
  }
130
134
 
131
135
  export const sameSharePlan = (a: SharePlan, b: SharePlan): boolean =>
@@ -147,7 +151,14 @@ export function shareApp(
147
151
  return refused(
148
152
  'the app changed since this plan was shown, so nothing was sent. Read the new plan and confirm it',
149
153
  )
150
- const manifestText = manifestOf(appRoot)
154
+ let manifestText = manifestOf(appRoot)
155
+ if (
156
+ options.visibility !== undefined &&
157
+ readAppIdentity(manifestText).visibility !== options.visibility
158
+ ) {
159
+ manifestText = withVisibility(manifestText, options.visibility)
160
+ writeFileSync(join(appRoot, 'blend.yaml'), manifestText)
161
+ }
151
162
  try {
152
163
  let remote = now.repository
153
164
  if (now.create) {
@@ -0,0 +1,15 @@
1
+ # @acryldev/showcase
2
+
3
+ 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.
4
+
5
+ ## Install
6
+
7
+ ```sh
8
+ npm install @acryldev/showcase
9
+ ```
10
+
11
+ It is a Cordis plugin: its peer dependency is `@deepseek-ai/cordis`, and an app registers it as a row of its `blend.yaml`.
12
+
13
+ ## Source and license
14
+
15
+ Part of [ACRYL](https://github.com/acryldev/acryl): [`plugins/showcase`](https://github.com/acryldev/acryl/tree/main/plugins/showcase). MIT license.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acryldev/showcase",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
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": {
@@ -0,0 +1,15 @@
1
+ # @acryldev/tasks
2
+
3
+ Durable task records: id, owner, input, status, result, trace; appended to a log in the app's home and readable after a restart.
4
+
5
+ ## Install
6
+
7
+ ```sh
8
+ npm install @acryldev/tasks
9
+ ```
10
+
11
+ It is a Cordis plugin: its peer dependency is `@deepseek-ai/cordis`, and an app registers it as a row of its `blend.yaml`.
12
+
13
+ ## Source and license
14
+
15
+ Part of [ACRYL](https://github.com/acryldev/acryl): [`plugins/tasks`](https://github.com/acryldev/acryl/tree/main/plugins/tasks). MIT license.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acryldev/tasks",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
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": {