@actcore/act 0.14.0 → 0.14.2
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/README.md +51 -27
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ Host and build [ACT](https://actcore.dev) (Agent Component Tools) WebAssembly co
|
|
|
4
4
|
|
|
5
5
|
This repo contains two tools:
|
|
6
6
|
|
|
7
|
-
- **`act`** — run, call, inspect, and serve ACT components from local files, HTTP URLs, or OCI registries
|
|
7
|
+
- **`act`** — run, call, inspect, and serve ACT components from local files, HTTP URLs, or OCI registries. Components built for `wasm32-wasip2` (with async) and `wasm32-wasip3` run the same way, under the same capability grants
|
|
8
8
|
- **`act-build`** — post-process compiled WASM components: embed metadata, skills, and custom sections
|
|
9
9
|
|
|
10
10
|
## Install
|
|
@@ -27,23 +27,24 @@ Pre-built binaries available on [GitHub Releases](https://github.com/actcore/act
|
|
|
27
27
|
|
|
28
28
|
```bash
|
|
29
29
|
# Discover tools in a component
|
|
30
|
-
act info --tools
|
|
30
|
+
act info --tools actpkg.dev/library/sqlite
|
|
31
31
|
|
|
32
|
-
# Call a tool
|
|
33
|
-
|
|
32
|
+
# Call a tool. sqlite is session-based: --session-args opens a session for
|
|
33
|
+
# this one call. --allow lets it touch /data and nothing else.
|
|
34
|
+
act call actpkg.dev/library/sqlite query \
|
|
34
35
|
--args '{"sql":"SELECT sqlite_version()"}' \
|
|
35
|
-
-
|
|
36
|
-
--
|
|
37
|
-
|
|
38
|
-
# Serve over HTTP
|
|
39
|
-
act run -l ghcr.io/actpkg/sqlite:0.1.0
|
|
36
|
+
--session-args '{"database_path":"/data/app.db"}' \
|
|
37
|
+
--allow 'fs=/data/**'
|
|
40
38
|
|
|
41
39
|
# Serve over MCP stdio
|
|
42
|
-
act run --mcp
|
|
40
|
+
act run --mcp actpkg.dev/library/sqlite --allow 'fs=/data/**'
|
|
41
|
+
|
|
42
|
+
# Serve over MCP Streamable HTTP, at http://[::1]:3000/mcp
|
|
43
|
+
act run --mcp --http -l '[::1]:3000' actpkg.dev/library/sqlite --allow 'fs=/data/**'
|
|
43
44
|
```
|
|
44
45
|
|
|
45
46
|
Components can be referenced as:
|
|
46
|
-
- **OCI refs:** `
|
|
47
|
+
- **OCI refs:** `actpkg.dev/library/sqlite` (a tag or `@sha256:` digest is optional)
|
|
47
48
|
- **HTTP URLs:** `https://example.com/component.wasm`
|
|
48
49
|
- **Local paths:** `./component.wasm`
|
|
49
50
|
|
|
@@ -53,32 +54,55 @@ Remote components are cached in `~/.cache/act/components/`.
|
|
|
53
54
|
|
|
54
55
|
| Command | Description |
|
|
55
56
|
|---------|-------------|
|
|
56
|
-
| `run`
|
|
57
|
-
| `call`
|
|
58
|
-
| `info`
|
|
59
|
-
| `
|
|
57
|
+
| `run` | Serve a component over MCP — stdio (`--mcp`) or Streamable HTTP (`--mcp --http -l`) |
|
|
58
|
+
| `call` | Call a tool directly, print result to stdout |
|
|
59
|
+
| `info` | Show component metadata, tools, and schemas (`--tools`, `--format text\|json\|toon`) |
|
|
60
|
+
| `skill` | Extract the Agent Skills a component embeds |
|
|
61
|
+
| `pull` | Download a component from OCI or HTTP to a local file |
|
|
62
|
+
| `session` | Show a session-based component's `open-args-schema` |
|
|
63
|
+
| `store` | Manage the local component store (`list`, `update`, `gc`) |
|
|
64
|
+
| `inspect` | Read a component's raw manifest or tool list without instantiating it |
|
|
65
|
+
| `secret` | Store credentials a component declares (there is no `get`) |
|
|
66
|
+
| `login` | Provision a declared credential by prompting |
|
|
67
|
+
|
|
68
|
+
### Granting capabilities
|
|
69
|
+
|
|
70
|
+
The default mode is `ask`: an interactive run prompts, a headless one denies.
|
|
71
|
+
Grants come from flags, or per profile in `~/.config/act/config.toml`.
|
|
72
|
+
|
|
73
|
+
| Flag | Effect |
|
|
74
|
+
|---|---|
|
|
75
|
+
| `--allow fs` | the whole declared ceiling of `wasi:filesystem` |
|
|
76
|
+
| `--allow 'fs=/data/**'` | only `/data/**`, read-write (`fs=/data/**:ro` for read-only) |
|
|
77
|
+
| `--allow 'http=https://api.example.com'` | one host (and scheme) |
|
|
78
|
+
| `--allow 'sockets=db.local:5432/tcp'` | one host, port and protocol |
|
|
79
|
+
| `--allow 'db:drop=test_*'` | a component-defined class, narrowed by key |
|
|
80
|
+
| `--deny 'fs=/data/secret/**'` | carve a rule out of whatever else was granted |
|
|
81
|
+
| `--grant '<json>'` | the full form, for anything the shorthand doesn't cover |
|
|
82
|
+
|
|
83
|
+
Aliases: `fs` = `wasi:filesystem`, `http` = `wasi:http`, `sockets` = `wasi:sockets`,
|
|
84
|
+
`creds` = `act:credentials`; output always shows the full id. IPv6 goes in
|
|
85
|
+
brackets (`http=[::1]:8080`). A rule never exceeds what the component declared.
|
|
86
|
+
`act run --help` lists every class and its shorthand.
|
|
60
87
|
|
|
61
88
|
### Audit trail
|
|
62
89
|
|
|
63
90
|
`run` and `call` write a structured audit trail to stderr: what component is running and under what capability modes, every capability decision as it resolves, and a per-call summary. It is on by default and independent of `RUST_LOG` — only `--no-audit` (or `[audit] enabled = false` in the config file) turns it off.
|
|
64
91
|
|
|
65
92
|
```
|
|
66
|
-
audit: act-cli/tests/fixtures/fs-canary.wasm sha256:
|
|
93
|
+
audit: act-cli/tests/fixtures/fs-canary.wasm sha256:f17cda │ act:credentials=deny wasi:filesystem=ask wasi:http=deny wasi:sockets=deny
|
|
67
94
|
audit: ⚠ declared ask, no prompt channel — every access will be denied: wasi:filesystem
|
|
68
|
-
audit: ? ask-deny wasi:filesystem /tmp/probe.txt
|
|
69
|
-
audit: ● read tool-error 1ms args:43ebc7 req:
|
|
95
|
+
audit: ? ask-deny wasi:filesystem /tmp/probe.txt no prompt channel mode:ask
|
|
96
|
+
audit: ● read tool-error 1ms args:43ebc7 req:0005a4
|
|
70
97
|
```
|
|
71
98
|
|
|
72
99
|
That's a real, captured transcript of one headless call with no `--grant`: the first line is the instantiation header (component, digest, resolved mode per capability class); the second warns that a declared `ask` capability has no prompt channel to answer it, so every access degrades to deny; the third is the immediate denial (denials and asks print the moment they resolve, never batched); the fourth is the per-call rollup — outcome, duration, an `args:` digest of the tool arguments (or the full values with `--audit-args`), and a `req:` id for joining this line back to a client log. Allowed operations coalesce into that rollup line instead of one line each, e.g. `filesystem: 12 read under /data/**`.
|
|
73
100
|
|
|
74
|
-
### HTTP
|
|
101
|
+
### MCP over HTTP (`run --mcp --http`)
|
|
75
102
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
| `POST` | `/metadata-schema` | JSON Schema for metadata |
|
|
80
|
-
| `POST/QUERY` | `/tools` | List tools |
|
|
81
|
-
| `POST/QUERY` | `/tools/{name}` | Call a tool (SSE with `Accept: text/event-stream`) |
|
|
103
|
+
`act run --mcp --http -l <addr>` serves the same MCP server as stdio over
|
|
104
|
+
Streamable HTTP, at one endpoint: `/mcp`. `--http` requires `--mcp`. The
|
|
105
|
+
earlier REST binding (`/info`, `/tools`, …) was removed in 0.12.0.
|
|
82
106
|
|
|
83
107
|
## act-build — Component Build Tool
|
|
84
108
|
|
|
@@ -90,7 +114,7 @@ act-build pack target/wasm32-wasip2/release/my_component.wasm
|
|
|
90
114
|
act-build validate target/wasm32-wasip2/release/my_component.wasm
|
|
91
115
|
|
|
92
116
|
# Publish as a CNCF Wasm OCI Artifact
|
|
93
|
-
act-build push my_component.wasm ghcr.io/
|
|
117
|
+
act-build push my_component.wasm ghcr.io/you/my-component:0.1.0 \
|
|
94
118
|
--also-tag latest \
|
|
95
119
|
--source https://github.com/actpkg/my-component \
|
|
96
120
|
--skip-if-identical
|
|
@@ -99,7 +123,7 @@ act-build push my_component.wasm ghcr.io/actpkg/my-component:0.1.0 \
|
|
|
99
123
|
Metadata is resolved via merge-patch from project manifests:
|
|
100
124
|
|
|
101
125
|
1. **Base** from `Cargo.toml`, `pyproject.toml`, or `package.json` (name, version, description)
|
|
102
|
-
2. **Inline patch** from the same manifest (`[package.metadata.act
|
|
126
|
+
2. **Inline patch** from the same manifest (`[package.metadata.act]`, `[tool.act]`, or `"act"` in `package.json`)
|
|
103
127
|
3. **`act.toml`** — highest priority, applied last
|
|
104
128
|
|
|
105
129
|
`act-build push` produces artifacts conformant with the [CNCF
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@actcore/act",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.2",
|
|
4
4
|
"description": "CLI host for ACT (Agent Component Tools) WebAssembly components",
|
|
5
5
|
"license": "MIT OR Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
},
|
|
15
15
|
"files": ["bin"],
|
|
16
16
|
"optionalDependencies": {
|
|
17
|
-
"@actcore/act-cli-linux-x64": "0.14.
|
|
18
|
-
"@actcore/act-cli-linux-arm64": "0.14.
|
|
19
|
-
"@actcore/act-cli-linux-riscv64": "0.14.
|
|
20
|
-
"@actcore/act-cli-darwin-x64": "0.14.
|
|
21
|
-
"@actcore/act-cli-darwin-arm64": "0.14.
|
|
22
|
-
"@actcore/act-cli-win32-x64": "0.14.
|
|
23
|
-
"@actcore/act-cli-win32-arm64": "0.14.
|
|
17
|
+
"@actcore/act-cli-linux-x64": "0.14.2",
|
|
18
|
+
"@actcore/act-cli-linux-arm64": "0.14.2",
|
|
19
|
+
"@actcore/act-cli-linux-riscv64": "0.14.2",
|
|
20
|
+
"@actcore/act-cli-darwin-x64": "0.14.2",
|
|
21
|
+
"@actcore/act-cli-darwin-arm64": "0.14.2",
|
|
22
|
+
"@actcore/act-cli-win32-x64": "0.14.2",
|
|
23
|
+
"@actcore/act-cli-win32-arm64": "0.14.2"
|
|
24
24
|
},
|
|
25
25
|
"publishConfig": {
|
|
26
26
|
"access": "public",
|