acrylblends 0.7.7 → 0.8.0
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/dist/index.d.ts +14 -6
- package/dist/index.js +130 -31
- package/dist/index.js.map +1 -1
- package/docs/framework/README.md +3 -3
- package/docs/framework/UPSTREAM.md +1 -1
- package/docs/framework/agents/index.md +18 -3
- package/docs/framework/getting-started/basic.md +1 -2
- package/docs/framework/getting-started/desktop.md +3 -3
- package/docs/framework/guides/bring-your-own-tool.md +216 -0
- package/docs/framework/guides/client-modules.md +4 -3
- package/docs/framework/guides/create-acrylblends.md +5 -4
- package/docs/framework/guides/data.md +7 -6
- package/docs/framework/helpers/streaming.md +12 -27
- package/docs/framework/upstream.json +3 -3
- package/lib/browser/read-sse.js +84 -0
- package/lib/db/sqlite.d.ts +1 -1
- package/lib/db.d.ts +1 -84
- package/lib/index-BLTYsyc1.d.ts +93 -0
- package/lib/index-D4FAsBZu.d.ts +85 -0
- package/lib/kv/db.d.ts +2 -2
- package/lib/kv/json.d.ts +1 -1
- package/lib/kv/json.js +87 -24
- package/lib/kv.d.ts +1 -92
- package/lib/node-server.d.ts +3 -3
- package/lib/node-server.js +14 -8
- package/lib/read-sse.d.ts +33 -0
- package/lib/read-sse.js +84 -0
- package/package.json +5 -1
- package/plugins/acryl-db/plugin.json +7 -2
- package/plugins/acryl-db/src/conformance.ts +224 -0
- package/plugins/acryl-db/upstream.json +2 -2
- package/plugins/acryl-db-sqlite/plugin.json +4 -1
- package/plugins/acryl-db-sqlite/upstream.json +1 -1
- package/plugins/acryl-door/LICENSE +47 -0
- package/plugins/acryl-door/plugin.json +14 -0
- package/plugins/acryl-door/src/cli/acryl.ts +207 -0
- package/plugins/acryl-door/src/host/api.ts +9 -0
- package/plugins/acryl-door/src/host/audit.ts +64 -0
- package/plugins/acryl-door/src/host/channel.ts +142 -0
- package/plugins/acryl-door/src/host/chat-tools.ts +39 -0
- package/plugins/acryl-door/src/host/door-file.ts +94 -0
- package/plugins/acryl-door/src/host/door.ts +195 -0
- package/plugins/acryl-door/src/host/http.ts +80 -0
- package/plugins/acryl-door/src/host/mcp-routes.ts +83 -0
- package/plugins/acryl-door/src/host/operator-routes.ts +38 -0
- package/plugins/acryl-door/src/host/page-routes.ts +65 -0
- package/plugins/acryl-door/src/host/shim.ts +65 -0
- package/plugins/acryl-door/src/host/verbs.ts +109 -0
- package/plugins/acryl-door/src/index.ts +133 -0
- package/plugins/acryl-door/src/page/api.ts +9 -0
- package/plugins/acryl-door/src/page/channel.ts +135 -0
- package/plugins/acryl-door/src/page/driver/accessibility.ts +163 -0
- package/plugins/acryl-door/src/page/driver/actions.ts +186 -0
- package/plugins/acryl-door/src/page/driver/driver.ts +153 -0
- package/plugins/acryl-door/src/page/driver/ref-table.ts +78 -0
- package/plugins/acryl-door/src/page/driver/sensitivity.ts +49 -0
- package/plugins/acryl-door/src/page/driver/snapshot.ts +132 -0
- package/plugins/acryl-door/src/page/index.ts +40 -0
- package/plugins/acryl-door/src/page/indicator.ts +72 -0
- package/plugins/acryl-door/src/page/main.ts +7 -0
- package/plugins/acryl-door/src/page/protocol.ts +213 -0
- package/plugins/acryl-door/src/page/snapshot-text.ts +18 -0
- package/plugins/acryl-door/src/page/user-input.ts +24 -0
- package/plugins/acryl-door/upstream.json +28 -0
- package/plugins/acryl-inspect/upstream.json +1 -1
- package/plugins/acryl-kv/plugin.json +7 -2
- package/plugins/acryl-kv/src/conformance.ts +226 -0
- package/plugins/acryl-kv/upstream.json +1 -1
- package/plugins/acryl-kv-db/plugin.json +4 -1
- package/plugins/acryl-kv-db/upstream.json +1 -1
- package/plugins/acryl-kv-json/plugin.json +4 -1
- package/plugins/acryl-kv-json/src/open.ts +86 -22
- package/plugins/acryl-kv-json/upstream.json +2 -2
- package/plugins/acryl-node-server/src/adapter/listener.ts +5 -0
- package/plugins/acryl-node-server/src/client-modules.ts +10 -9
- package/plugins/acryl-node-server/upstream.json +2 -2
- package/plugins/acryl-router/src/browser/read-sse.ts +3 -0
- package/plugins/acryl-router/src/helpers/read-sse.ts +111 -0
- package/plugins/acryl-router/src/service.ts +3 -0
- package/plugins/acryl-router/upstream.json +2 -2
- package/plugins/acryl-router-http/upstream.json +1 -1
- package/plugins/acryl-state/upstream.json +1 -1
- package/plugins/agent-panel/client/main.ts +159 -0
- package/plugins/agent-panel/index.ts +232 -0
- package/plugins/agent-panel/plugin.json +21 -0
- package/plugins/builder/index.ts +2 -2
- package/plugins/builder/plugin.json +1 -1
- package/plugins/desktop/main.ts +3 -3
- package/plugins/desktop/plugin.json +2 -2
- package/plugins/desktop/upstream.json +1 -1
- package/plugins/desktop-web/main.ts +2 -2
- package/plugins/desktop-web/plugin.json +2 -2
- package/plugins/desktop-web/upstream.json +1 -1
- package/plugins/extensions/index.ts +19 -1
- package/plugins/extensions/plugin.json +1 -1
- package/plugins/extensions/resolve.ts +17 -3
- package/plugins/manifest/lock.ts +7 -3
- package/plugins/manifest/upgrade-cli.ts +1 -1
- package/plugins/save/cli.ts +1 -1
- package/plugins/save/plugin.json +1 -1
- package/plugins/tsconfig.json +6 -0
- package/shared/AGENTS.core.md +10 -10
- package/shared/DEFAULTS.md +45 -0
- package/shared/SKILL.md +14 -0
- package/templates/agent/AGENTS.md +1 -1
- package/templates/agent/README.md +6 -6
- package/templates/agent/blend.yaml +3 -0
- package/templates/agent/gitignore +1 -0
- package/templates/agent/package.json +8 -8
- package/templates/agent/src/app.ts +46 -17
- package/templates/agent/src/main.ts +2 -2
- package/templates/agent/src/routes.ts +19 -6
- package/templates/agent/template.json +2 -1
- package/templates/agent/test/agent.test.ts +11 -5
- package/templates/agent/test/app.test.ts +30 -9
- package/templates/agent/test/builder.test.ts +35 -24
- package/templates/agent/test/model.test.ts +25 -20
- package/templates/agent/tsconfig.json +48 -50
- package/templates/blank/AGENTS.md +1 -1
- package/templates/blank/README.md +2 -2
- package/templates/blank/gitignore +1 -0
- package/templates/blank/package.json +8 -8
- package/templates/blank/src/about.tsx +2 -2
- package/templates/blank/src/app.ts +29 -9
- package/templates/blank/src/main.ts +1 -1
- package/templates/blank/src/routes.ts +1 -1
- package/templates/blank/test/app.test.ts +29 -10
- package/templates/blank/tsconfig.json +1 -1
- package/templates/chat/AGENTS.md +16 -0
- package/templates/chat/blend.yaml +29 -0
- package/templates/chat/gitignore +6 -0
- package/templates/chat/migrations/001-chat.sql +12 -0
- package/templates/chat/package.json +33 -0
- package/templates/chat/src/app.ts +106 -0
- package/templates/chat/src/chat-app.ts +101 -0
- package/templates/chat/src/client/chat.tsx +115 -0
- package/templates/chat/src/client/tsconfig.json +26 -0
- package/templates/chat/src/db.ts +43 -0
- package/templates/chat/src/door.ts +7 -0
- package/templates/chat/src/llm.ts +42 -0
- package/templates/chat/src/main.ts +28 -0
- package/templates/chat/src/page.tsx +40 -0
- package/templates/chat/src/routes.ts +15 -0
- package/templates/chat/src/runtime.ts +17 -0
- package/templates/chat/template.json +11 -0
- package/templates/chat/test/chat.test.ts +198 -0
- package/templates/chat/test/server.test.ts +78 -0
- package/templates/chat/tsconfig.json +20 -0
- package/templates/nodejs/AGENTS.md +9 -0
- package/templates/nodejs/blend.yaml +26 -0
- package/templates/nodejs/gitignore +3 -0
- package/templates/nodejs/package.json +30 -0
- package/templates/nodejs/src/app.ts +92 -0
- package/templates/nodejs/src/client/counter.tsx +12 -0
- package/templates/nodejs/src/client/tsconfig.json +26 -0
- package/templates/nodejs/src/door.ts +7 -0
- package/templates/nodejs/src/main.ts +25 -0
- package/templates/nodejs/src/page.tsx +29 -0
- package/templates/nodejs/src/routes.ts +40 -0
- package/templates/nodejs/template.json +3 -0
- package/templates/nodejs/test/app.test.ts +78 -0
- package/templates/nodejs/test/server.test.ts +83 -0
- package/templates/nodejs/tsconfig.json +20 -0
- package/templates/notes/AGENTS.md +26 -0
- package/templates/notes/blend.yaml +29 -0
- package/templates/notes/gitignore +6 -0
- package/templates/notes/migrations/001-notes.sql +18 -0
- package/templates/notes/package.json +33 -0
- package/templates/notes/src/app.ts +106 -0
- package/templates/notes/src/auth.ts +57 -0
- package/templates/notes/src/client/counter.tsx +21 -0
- package/templates/notes/src/client/tsconfig.json +26 -0
- package/templates/notes/src/db.ts +50 -0
- package/templates/notes/src/door.ts +7 -0
- package/templates/notes/src/main.ts +28 -0
- package/templates/notes/src/notes-app.ts +205 -0
- package/templates/notes/src/routes.ts +14 -0
- package/templates/notes/src/runtime.ts +17 -0
- package/templates/notes/src/schema.ts +38 -0
- package/templates/notes/src/views.tsx +136 -0
- package/templates/notes/template.json +11 -0
- package/templates/notes/test/notes.test.ts +280 -0
- package/templates/notes/test/server.test.ts +78 -0
- package/templates/notes/tsconfig.json +20 -0
- package/templates/todo/README.md +1 -1
- package/templates/todo/gitignore +1 -0
- package/templates/todo/package.json +8 -8
- package/templates/todo/src/app.ts +32 -12
- package/templates/todo/src/main.ts +1 -1
- package/templates/todo/src/todo.ts +4 -4
- package/templates/todo/test/todo.test.ts +48 -23
- package/templates/todo/tsconfig.json +1 -1
- package/templates/todo/upstream.json +2 -2
- package/lib/database-D_UN6We8.d.ts +0 -44
- package/lib/kv-DWDm0Lja.d.ts +0 -39
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
"examples/acryl-todo/src/index.ts": "src/todo.ts",
|
|
6
6
|
"examples/acryl-todo/src/page.ts": "src/page.ts"
|
|
7
7
|
},
|
|
8
|
-
"commit": "
|
|
8
|
+
"commit": "20bdc263d6f0f8febbd967007bda4cf4a802efd2"
|
|
9
9
|
},
|
|
10
10
|
"rewrittenSpecifiers": 4,
|
|
11
|
-
"digest": "sha256:
|
|
11
|
+
"digest": "sha256:48d10af77d542ea0bf18cd3476ec9dc1f1225c8e7644c21492236de8c1d4a73c"
|
|
12
12
|
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
//#region ../../plugins/acryl-db/lib/types/facade/database.d.ts
|
|
2
|
-
/** Values supported by the portable SQL drivers. */
|
|
3
|
-
type SqlValue = null | number | bigint | string | Uint8Array;
|
|
4
|
-
/**
|
|
5
|
-
* Asynchronous SQL operations shared by a database and its transaction handles.
|
|
6
|
-
*
|
|
7
|
-
* `exec` runs SQL text without bindings and may contain several statements. `run`, `get`, and `all`
|
|
8
|
-
* execute one statement with positional bindings. Adapters may cache prepared statements by SQL text,
|
|
9
|
-
* so callers pass values as bindings instead of interpolating them. `run` resolves the number of rows
|
|
10
|
-
* the statement changed.
|
|
11
|
-
*/
|
|
12
|
-
interface DbExecutor {
|
|
13
|
-
exec(sql: string): Promise<void>;
|
|
14
|
-
run(sql: string, ...params: SqlValue[]): Promise<{
|
|
15
|
-
readonly changes: number;
|
|
16
|
-
}>;
|
|
17
|
-
get<T extends object>(sql: string, ...params: SqlValue[]): Promise<T | undefined>;
|
|
18
|
-
all<T extends object>(sql: string, ...params: SqlValue[]): Promise<T[]>;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Minimal portable SQL database facade.
|
|
22
|
-
*
|
|
23
|
-
* All operations are asynchronous so adapters may execute outside the caller's runtime.
|
|
24
|
-
*
|
|
25
|
-
* `transaction` passes the callback a transaction handle. All work in the transaction
|
|
26
|
-
* must use that handle; the handle is invalid after the callback settles. Adapters must
|
|
27
|
-
* queue unrelated operations and other transactions until the transaction finishes. The
|
|
28
|
-
* returned promise settles after commit or rollback. Calling the database itself (including
|
|
29
|
-
* `transaction`) from inside a callback therefore waits for that transaction and
|
|
30
|
-
* never settles.
|
|
31
|
-
*
|
|
32
|
-
* When the callback rejects, the adapter must roll the transaction back before rejecting
|
|
33
|
-
* with that same error. If rollback fails, it must reject with a different error (for
|
|
34
|
-
* example an `AggregateError`) so callers cannot mistake the callback error for a
|
|
35
|
-
* guaranteed rollback.
|
|
36
|
-
*
|
|
37
|
-
* Closing is the adapter's: the plugin that opened a database closes it, so the facade an
|
|
38
|
-
* app receives has no `close`.
|
|
39
|
-
*/
|
|
40
|
-
interface Db extends DbExecutor {
|
|
41
|
-
transaction<T>(callback: (transaction: DbExecutor) => Promise<T>): Promise<T>;
|
|
42
|
-
}
|
|
43
|
-
//#endregion
|
|
44
|
-
export { DbExecutor as n, SqlValue as r, Db as t };
|
package/lib/kv-DWDm0Lja.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
//#region ../../plugins/acryl-kv/lib/types/kv.d.ts
|
|
2
|
-
/** `T`, except a promise: the callback of `update` is synchronous, and an async one is a type error. */
|
|
3
|
-
type NotPromise<T> = T extends PromiseLike<unknown> ? never : T;
|
|
4
|
-
/** Anything JSON can hold. */
|
|
5
|
-
type JsonValue = null | boolean | number | string | JsonValue[] | {
|
|
6
|
-
[key: string]: JsonValue;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Named JSON documents. Every call returns a promise, so a file, SQLite and Postgres answer alike.
|
|
10
|
-
*
|
|
11
|
-
* Keys are non-empty strings. Values are JSON: `undefined`, functions, symbols, bigints and non-finite numbers are refused with a
|
|
12
|
-
* `TypeError` before anything is written, and a value read back is a copy.
|
|
13
|
-
*
|
|
14
|
-
* There is no `close`: the code that opened a store closes it (see {@link KvOpened}), so a plugin cannot close the store another uses.
|
|
15
|
-
*/
|
|
16
|
-
interface Kv {
|
|
17
|
-
/** The value stored under the key, or `undefined`. */
|
|
18
|
-
get<T = JsonValue>(key: string): Promise<T | undefined>;
|
|
19
|
-
/** Store a value under the key, replacing any. Resolves once it is durable. */
|
|
20
|
-
set<T = JsonValue>(key: string, value: T): Promise<void>;
|
|
21
|
-
/**
|
|
22
|
-
* Replace the value under the key by `change(current)`, atomically: `current` is `undefined` when the key is missing, `change` is
|
|
23
|
-
* synchronous (an `async` function is a type error, and a returned promise is rejected at run time: read what you need first, then update), and no other write to the key happens between reading it and writing the result. Resolves the new value. A `change` that
|
|
24
|
-
* throws, or returns something that is not JSON, leaves the value as it was and rejects with its error.
|
|
25
|
-
*/
|
|
26
|
-
update<T = JsonValue>(key: string, change: (current: T | undefined) => NotPromise<T>): Promise<T>;
|
|
27
|
-
/** Remove the key. A missing key is not an error. */
|
|
28
|
-
delete(key: string): Promise<void>;
|
|
29
|
-
/** The keys that start with the prefix (all of them without one), sorted by code point (the order of their UTF-8 bytes, not of UTF-16 units). */
|
|
30
|
-
list(prefix?: string): Promise<string[]>;
|
|
31
|
-
}
|
|
32
|
-
/** An open store and the one function that closes it. */
|
|
33
|
-
interface KvOpened {
|
|
34
|
-
readonly kv: Kv;
|
|
35
|
-
/** Waits for the writes in flight, then releases the storage. Calling it again does nothing; calls on `kv` after it reject. */
|
|
36
|
-
close(): Promise<void>;
|
|
37
|
-
}
|
|
38
|
-
//#endregion
|
|
39
|
-
export { KvOpened as n, Kv as t };
|