act-cli 0.3.10__tar.gz → 0.4.0__tar.gz
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.
- {act_cli-0.3.10 → act_cli-0.4.0}/Cargo.lock +75 -48
- {act_cli-0.3.10 → act_cli-0.4.0}/Cargo.toml +3 -3
- {act_cli-0.3.10 → act_cli-0.4.0}/PKG-INFO +1 -1
- {act_cli-0.3.10 → act_cli-0.4.0}/act-cli/src/http.rs +5 -5
- {act_cli-0.3.10 → act_cli-0.4.0}/act-cli/src/main.rs +3 -3
- {act_cli-0.3.10 → act_cli-0.4.0}/act-cli/src/mcp.rs +2 -2
- {act_cli-0.3.10 → act_cli-0.4.0}/act-cli/src/runtime.rs +44 -28
- {act_cli-0.3.10 → act_cli-0.4.0}/act-cli/wit/deps/act-core/act-core.wit +32 -11
- {act_cli-0.3.10 → act_cli-0.4.0}/act-cli/wit/deps/act-core/act-events.wit +9 -1
- {act_cli-0.3.10 → act_cli-0.4.0}/act-cli/wit/deps/act-core/act-resources.wit +10 -1
- act_cli-0.4.0/act-cli/wit/deps.lock +4 -0
- {act_cli-0.3.10 → act_cli-0.4.0}/act-cli/wit/world.wit +1 -1
- act_cli-0.3.10/act-cli/wit/deps.lock +0 -4
- {act_cli-0.3.10 → act_cli-0.4.0}/README.md +0 -0
- {act_cli-0.3.10 → act_cli-0.4.0}/act-cli/Cargo.toml +0 -0
- {act_cli-0.3.10 → act_cli-0.4.0}/act-cli/README.md +0 -0
- {act_cli-0.3.10 → act_cli-0.4.0}/act-cli/src/bindings/mod.rs +0 -0
- {act_cli-0.3.10 → act_cli-0.4.0}/act-cli/src/config.rs +0 -0
- {act_cli-0.3.10 → act_cli-0.4.0}/act-cli/src/format.rs +0 -0
- {act_cli-0.3.10 → act_cli-0.4.0}/act-cli/src/resolve.rs +0 -0
- {act_cli-0.3.10 → act_cli-0.4.0}/act-cli/wit/deps.toml +0 -0
- {act_cli-0.3.10 → act_cli-0.4.0}/pyproject.toml +0 -0
|
@@ -4,7 +4,7 @@ version = 4
|
|
|
4
4
|
|
|
5
5
|
[[package]]
|
|
6
6
|
name = "act-build"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.4.0"
|
|
8
8
|
dependencies = [
|
|
9
9
|
"act-types",
|
|
10
10
|
"anyhow",
|
|
@@ -18,13 +18,13 @@ dependencies = [
|
|
|
18
18
|
"toml 1.1.2+spec-1.1.0",
|
|
19
19
|
"tracing",
|
|
20
20
|
"tracing-subscriber",
|
|
21
|
-
"wasm-encoder 0.
|
|
22
|
-
"wasmparser 0.
|
|
21
|
+
"wasm-encoder 0.247.0",
|
|
22
|
+
"wasmparser 0.247.0",
|
|
23
23
|
]
|
|
24
24
|
|
|
25
25
|
[[package]]
|
|
26
26
|
name = "act-cli"
|
|
27
|
-
version = "0.
|
|
27
|
+
version = "0.4.0"
|
|
28
28
|
dependencies = [
|
|
29
29
|
"act-types",
|
|
30
30
|
"anyhow",
|
|
@@ -51,7 +51,7 @@ dependencies = [
|
|
|
51
51
|
"tracing",
|
|
52
52
|
"tracing-subscriber",
|
|
53
53
|
"url",
|
|
54
|
-
"wasmparser 0.
|
|
54
|
+
"wasmparser 0.247.0",
|
|
55
55
|
"wasmtime",
|
|
56
56
|
"wasmtime-wasi",
|
|
57
57
|
"wasmtime-wasi-http",
|
|
@@ -59,9 +59,9 @@ dependencies = [
|
|
|
59
59
|
|
|
60
60
|
[[package]]
|
|
61
61
|
name = "act-types"
|
|
62
|
-
version = "0.
|
|
62
|
+
version = "0.4.0"
|
|
63
63
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
64
|
-
checksum = "
|
|
64
|
+
checksum = "62e9cc180d148c385c5c7f85aa5b349a6406faf8c67dc8a556d9a6cccab66826"
|
|
65
65
|
dependencies = [
|
|
66
66
|
"base64",
|
|
67
67
|
"ciborium",
|
|
@@ -196,9 +196,9 @@ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
|
|
|
196
196
|
|
|
197
197
|
[[package]]
|
|
198
198
|
name = "aws-lc-rs"
|
|
199
|
-
version = "1.16.
|
|
199
|
+
version = "1.16.3"
|
|
200
200
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
201
|
-
checksum = "
|
|
201
|
+
checksum = "0ec6fb3fe69024a75fa7e1bfb48aa6cf59706a101658ea01bfd33b2b248a038f"
|
|
202
202
|
dependencies = [
|
|
203
203
|
"aws-lc-sys",
|
|
204
204
|
"zeroize",
|
|
@@ -206,9 +206,9 @@ dependencies = [
|
|
|
206
206
|
|
|
207
207
|
[[package]]
|
|
208
208
|
name = "aws-lc-sys"
|
|
209
|
-
version = "0.
|
|
209
|
+
version = "0.40.0"
|
|
210
210
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
211
|
-
checksum = "
|
|
211
|
+
checksum = "f50037ee5e1e41e7b8f9d161680a725bd1626cb6f8c7e901f91f942850852fe7"
|
|
212
212
|
dependencies = [
|
|
213
213
|
"cc",
|
|
214
214
|
"cmake",
|
|
@@ -371,7 +371,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
371
371
|
checksum = "d8144c22e24bbcf26ade86cb6501a0916c46b7e4787abdb0045a467eb1645a1d"
|
|
372
372
|
dependencies = [
|
|
373
373
|
"ambient-authority",
|
|
374
|
-
"rand 0.8.
|
|
374
|
+
"rand 0.8.6",
|
|
375
375
|
]
|
|
376
376
|
|
|
377
377
|
[[package]]
|
|
@@ -473,9 +473,9 @@ dependencies = [
|
|
|
473
473
|
|
|
474
474
|
[[package]]
|
|
475
475
|
name = "clap"
|
|
476
|
-
version = "4.6.
|
|
476
|
+
version = "4.6.1"
|
|
477
477
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
478
|
-
checksum = "
|
|
478
|
+
checksum = "1ddb117e43bbf7dacf0a4190fef4d345b9bad68dfc649cb349e7d17d28428e51"
|
|
479
479
|
dependencies = [
|
|
480
480
|
"clap_builder",
|
|
481
481
|
"clap_derive",
|
|
@@ -495,9 +495,9 @@ dependencies = [
|
|
|
495
495
|
|
|
496
496
|
[[package]]
|
|
497
497
|
name = "clap_derive"
|
|
498
|
-
version = "4.6.
|
|
498
|
+
version = "4.6.1"
|
|
499
499
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
500
|
-
checksum = "
|
|
500
|
+
checksum = "f2ce8604710f6733aa641a2b3731eaa1e8b3d9973d5e3565da11800813f997a9"
|
|
501
501
|
dependencies = [
|
|
502
502
|
"heck",
|
|
503
503
|
"proc-macro2",
|
|
@@ -565,11 +565,12 @@ checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c"
|
|
|
565
565
|
|
|
566
566
|
[[package]]
|
|
567
567
|
name = "const_format"
|
|
568
|
-
version = "0.2.
|
|
568
|
+
version = "0.2.36"
|
|
569
569
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
570
|
-
checksum = "
|
|
570
|
+
checksum = "4481a617ad9a412be3b97c5d403fef8ed023103368908b9c50af598ff467cc1e"
|
|
571
571
|
dependencies = [
|
|
572
572
|
"const_format_proc_macros",
|
|
573
|
+
"konst",
|
|
573
574
|
]
|
|
574
575
|
|
|
575
576
|
[[package]]
|
|
@@ -1390,6 +1391,11 @@ name = "hashbrown"
|
|
|
1390
1391
|
version = "0.17.0"
|
|
1391
1392
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1392
1393
|
checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51"
|
|
1394
|
+
dependencies = [
|
|
1395
|
+
"foldhash 0.2.0",
|
|
1396
|
+
"serde",
|
|
1397
|
+
"serde_core",
|
|
1398
|
+
]
|
|
1393
1399
|
|
|
1394
1400
|
[[package]]
|
|
1395
1401
|
name = "heck"
|
|
@@ -1890,6 +1896,21 @@ dependencies = [
|
|
|
1890
1896
|
"signature",
|
|
1891
1897
|
]
|
|
1892
1898
|
|
|
1899
|
+
[[package]]
|
|
1900
|
+
name = "konst"
|
|
1901
|
+
version = "0.2.20"
|
|
1902
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1903
|
+
checksum = "128133ed7824fcd73d6e7b17957c5eb7bacb885649bd8c69708b2331a10bcefb"
|
|
1904
|
+
dependencies = [
|
|
1905
|
+
"konst_macro_rules",
|
|
1906
|
+
]
|
|
1907
|
+
|
|
1908
|
+
[[package]]
|
|
1909
|
+
name = "konst_macro_rules"
|
|
1910
|
+
version = "0.2.19"
|
|
1911
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1912
|
+
checksum = "a4933f3f57a8e9d9da04db23fb153356ecaf00cbd14aee46279c33dc80925c37"
|
|
1913
|
+
|
|
1893
1914
|
[[package]]
|
|
1894
1915
|
name = "lazy_static"
|
|
1895
1916
|
version = "1.5.0"
|
|
@@ -2389,9 +2410,9 @@ checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
|
|
|
2389
2410
|
|
|
2390
2411
|
[[package]]
|
|
2391
2412
|
name = "rand"
|
|
2392
|
-
version = "0.8.
|
|
2413
|
+
version = "0.8.6"
|
|
2393
2414
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2394
|
-
checksum = "
|
|
2415
|
+
checksum = "5ca0ecfa931c29007047d1bc58e623ab12e5590e8c7cc53200d5202b69266d8a"
|
|
2395
2416
|
dependencies = [
|
|
2396
2417
|
"libc",
|
|
2397
2418
|
"rand_chacha 0.3.1",
|
|
@@ -2537,13 +2558,13 @@ dependencies = [
|
|
|
2537
2558
|
|
|
2538
2559
|
[[package]]
|
|
2539
2560
|
name = "regalloc2"
|
|
2540
|
-
version = "0.15.
|
|
2561
|
+
version = "0.15.1"
|
|
2541
2562
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2542
|
-
checksum = "
|
|
2563
|
+
checksum = "de2c52737737f8609e94f975dee22854a2d5c125772d4b1cf292120f4d45c186"
|
|
2543
2564
|
dependencies = [
|
|
2544
2565
|
"allocator-api2",
|
|
2545
2566
|
"bumpalo",
|
|
2546
|
-
"hashbrown 0.
|
|
2567
|
+
"hashbrown 0.17.0",
|
|
2547
2568
|
"log",
|
|
2548
2569
|
"rustc-hash",
|
|
2549
2570
|
"smallvec",
|
|
@@ -3322,9 +3343,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
|
|
|
3322
3343
|
|
|
3323
3344
|
[[package]]
|
|
3324
3345
|
name = "tokio"
|
|
3325
|
-
version = "1.52.
|
|
3346
|
+
version = "1.52.1"
|
|
3326
3347
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3327
|
-
checksum = "
|
|
3348
|
+
checksum = "b67dee974fe86fd92cc45b7a95fdd2f99a36a6d7b0d431a231178d3d670bbcc6"
|
|
3328
3349
|
dependencies = [
|
|
3329
3350
|
"bytes",
|
|
3330
3351
|
"libc",
|
|
@@ -3653,9 +3674,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
|
|
|
3653
3674
|
|
|
3654
3675
|
[[package]]
|
|
3655
3676
|
name = "uuid"
|
|
3656
|
-
version = "1.23.
|
|
3677
|
+
version = "1.23.1"
|
|
3657
3678
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3658
|
-
checksum = "
|
|
3679
|
+
checksum = "ddd74a9687298c6858e9b88ec8935ec45d22e8fd5e6394fa1bd4e99a87789c76"
|
|
3659
3680
|
dependencies = [
|
|
3660
3681
|
"js-sys",
|
|
3661
3682
|
"wasm-bindgen",
|
|
@@ -3700,11 +3721,11 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
|
|
|
3700
3721
|
|
|
3701
3722
|
[[package]]
|
|
3702
3723
|
name = "wasip2"
|
|
3703
|
-
version = "1.0.
|
|
3724
|
+
version = "1.0.3+wasi-0.2.9"
|
|
3704
3725
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3705
|
-
checksum = "
|
|
3726
|
+
checksum = "20064672db26d7cdc89c7798c48a0fdfac8213434a1186e5ef29fd560ae223d6"
|
|
3706
3727
|
dependencies = [
|
|
3707
|
-
"wit-bindgen",
|
|
3728
|
+
"wit-bindgen 0.57.1",
|
|
3708
3729
|
]
|
|
3709
3730
|
|
|
3710
3731
|
[[package]]
|
|
@@ -3713,7 +3734,7 @@ version = "0.4.0+wasi-0.3.0-rc-2026-01-06"
|
|
|
3713
3734
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3714
3735
|
checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5"
|
|
3715
3736
|
dependencies = [
|
|
3716
|
-
"wit-bindgen",
|
|
3737
|
+
"wit-bindgen 0.51.0",
|
|
3717
3738
|
]
|
|
3718
3739
|
|
|
3719
3740
|
[[package]]
|
|
@@ -3814,12 +3835,12 @@ dependencies = [
|
|
|
3814
3835
|
|
|
3815
3836
|
[[package]]
|
|
3816
3837
|
name = "wasm-encoder"
|
|
3817
|
-
version = "0.
|
|
3838
|
+
version = "0.247.0"
|
|
3818
3839
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3819
|
-
checksum = "
|
|
3840
|
+
checksum = "30b6733b8b91d010a6ac5b0fb237dc46a19650bc4c67db66857e2e787d437204"
|
|
3820
3841
|
dependencies = [
|
|
3821
3842
|
"leb128fmt",
|
|
3822
|
-
"wasmparser 0.
|
|
3843
|
+
"wasmparser 0.247.0",
|
|
3823
3844
|
]
|
|
3824
3845
|
|
|
3825
3846
|
[[package]]
|
|
@@ -3874,12 +3895,12 @@ dependencies = [
|
|
|
3874
3895
|
|
|
3875
3896
|
[[package]]
|
|
3876
3897
|
name = "wasmparser"
|
|
3877
|
-
version = "0.
|
|
3898
|
+
version = "0.247.0"
|
|
3878
3899
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3879
|
-
checksum = "
|
|
3900
|
+
checksum = "8e6fb4c2bee46c5ea4d40f8cdb5c131725cd976718ec56f1c8e82fbde5fa2a80"
|
|
3880
3901
|
dependencies = [
|
|
3881
3902
|
"bitflags",
|
|
3882
|
-
"hashbrown 0.
|
|
3903
|
+
"hashbrown 0.17.0",
|
|
3883
3904
|
"indexmap 2.14.0",
|
|
3884
3905
|
"semver",
|
|
3885
3906
|
"serde",
|
|
@@ -4232,24 +4253,24 @@ dependencies = [
|
|
|
4232
4253
|
|
|
4233
4254
|
[[package]]
|
|
4234
4255
|
name = "wast"
|
|
4235
|
-
version = "
|
|
4256
|
+
version = "247.0.0"
|
|
4236
4257
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
4237
|
-
checksum = "
|
|
4258
|
+
checksum = "579d2d47eb33b0cdf9b14723cb115f1e1b7d6e77aac6f0816e5b7c7aeaa418ff"
|
|
4238
4259
|
dependencies = [
|
|
4239
4260
|
"bumpalo",
|
|
4240
4261
|
"leb128fmt",
|
|
4241
4262
|
"memchr",
|
|
4242
4263
|
"unicode-width",
|
|
4243
|
-
"wasm-encoder 0.
|
|
4264
|
+
"wasm-encoder 0.247.0",
|
|
4244
4265
|
]
|
|
4245
4266
|
|
|
4246
4267
|
[[package]]
|
|
4247
4268
|
name = "wat"
|
|
4248
|
-
version = "1.
|
|
4269
|
+
version = "1.247.0"
|
|
4249
4270
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
4250
|
-
checksum = "
|
|
4271
|
+
checksum = "f3f4091c56437e86f2b57fa2fac72c4f528957a605b3f44f7c0b3b19a17ac5ee"
|
|
4251
4272
|
dependencies = [
|
|
4252
|
-
"wast
|
|
4273
|
+
"wast 247.0.0",
|
|
4253
4274
|
]
|
|
4254
4275
|
|
|
4255
4276
|
[[package]]
|
|
@@ -4274,9 +4295,9 @@ dependencies = [
|
|
|
4274
4295
|
|
|
4275
4296
|
[[package]]
|
|
4276
4297
|
name = "webpki-root-certs"
|
|
4277
|
-
version = "1.0.
|
|
4298
|
+
version = "1.0.7"
|
|
4278
4299
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
4279
|
-
checksum = "
|
|
4300
|
+
checksum = "f31141ce3fc3e300ae89b78c0dd67f9708061d1d2eda54b8209346fd6be9a92c"
|
|
4280
4301
|
dependencies = [
|
|
4281
4302
|
"rustls-pki-types",
|
|
4282
4303
|
]
|
|
@@ -4287,14 +4308,14 @@ version = "0.26.11"
|
|
|
4287
4308
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
4288
4309
|
checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9"
|
|
4289
4310
|
dependencies = [
|
|
4290
|
-
"webpki-roots 1.0.
|
|
4311
|
+
"webpki-roots 1.0.7",
|
|
4291
4312
|
]
|
|
4292
4313
|
|
|
4293
4314
|
[[package]]
|
|
4294
4315
|
name = "webpki-roots"
|
|
4295
|
-
version = "1.0.
|
|
4316
|
+
version = "1.0.7"
|
|
4296
4317
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
4297
|
-
checksum = "
|
|
4318
|
+
checksum = "52f5ee44c96cf55f1b349600768e3ece3a8f26010c05265ab73f945bb1a2eb9d"
|
|
4298
4319
|
dependencies = [
|
|
4299
4320
|
"rustls-pki-types",
|
|
4300
4321
|
]
|
|
@@ -4710,6 +4731,12 @@ dependencies = [
|
|
|
4710
4731
|
"wit-bindgen-rust-macro",
|
|
4711
4732
|
]
|
|
4712
4733
|
|
|
4734
|
+
[[package]]
|
|
4735
|
+
name = "wit-bindgen"
|
|
4736
|
+
version = "0.57.1"
|
|
4737
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
4738
|
+
checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e"
|
|
4739
|
+
|
|
4713
4740
|
[[package]]
|
|
4714
4741
|
name = "wit-bindgen-core"
|
|
4715
4742
|
version = "0.51.0"
|
|
@@ -3,7 +3,7 @@ members = ["act-cli"]
|
|
|
3
3
|
resolver = "3"
|
|
4
4
|
|
|
5
5
|
[workspace.package]
|
|
6
|
-
version = "0.
|
|
6
|
+
version = "0.4.0"
|
|
7
7
|
edition = "2024"
|
|
8
8
|
license = "MIT OR Apache-2.0"
|
|
9
9
|
repository = "https://github.com/actcore/act-cli"
|
|
@@ -11,8 +11,8 @@ homepage = "https://actcore.dev"
|
|
|
11
11
|
readme = "README.md"
|
|
12
12
|
|
|
13
13
|
[workspace.dependencies]
|
|
14
|
-
act-types = "0.
|
|
15
|
-
wasmparser = "0.
|
|
14
|
+
act-types = "0.4"
|
|
15
|
+
wasmparser = "0.247.0"
|
|
16
16
|
|
|
17
17
|
[profile.release]
|
|
18
18
|
lto = "thin"
|
|
@@ -88,7 +88,7 @@ fn internal_error_response(message: &str) -> axum::response::Response {
|
|
|
88
88
|
fn sse_event_to_axum(event: runtime::SseEvent) -> Option<Result<Event, std::convert::Infallible>> {
|
|
89
89
|
match event {
|
|
90
90
|
runtime::SseEvent::Stream(stream_event) => match stream_event {
|
|
91
|
-
runtime::act::core::types::
|
|
91
|
+
runtime::act::core::types::ToolEvent::Content(part) => {
|
|
92
92
|
let data = cbor::decode_content_data(&part.data, part.mime_type.as_deref());
|
|
93
93
|
let json = serde_json::json!({
|
|
94
94
|
"data": data,
|
|
@@ -99,7 +99,7 @@ fn sse_event_to_axum(event: runtime::SseEvent) -> Option<Result<Event, std::conv
|
|
|
99
99
|
.json_data(json)
|
|
100
100
|
.expect("json_data with serde_json::Value is infallible")))
|
|
101
101
|
}
|
|
102
|
-
runtime::act::core::types::
|
|
102
|
+
runtime::act::core::types::ToolEvent::Error(err) => {
|
|
103
103
|
let ls = act_types::types::LocalizedString::from(&err.message);
|
|
104
104
|
let message = ls.any_text().to_string();
|
|
105
105
|
tracing::warn!(kind = %err.kind, %message, "Stream error (SSE)");
|
|
@@ -258,7 +258,7 @@ async fn call_tool_buffered(
|
|
|
258
258
|
.events
|
|
259
259
|
.iter()
|
|
260
260
|
.filter_map(|event| match event {
|
|
261
|
-
runtime::act::core::types::
|
|
261
|
+
runtime::act::core::types::ToolEvent::Content(part) => {
|
|
262
262
|
let data = cbor::decode_content_data(&part.data, part.mime_type.as_deref());
|
|
263
263
|
Some(act_http::ContentPart {
|
|
264
264
|
data,
|
|
@@ -266,12 +266,12 @@ async fn call_tool_buffered(
|
|
|
266
266
|
metadata: None,
|
|
267
267
|
})
|
|
268
268
|
}
|
|
269
|
-
runtime::act::core::types::
|
|
269
|
+
runtime::act::core::types::ToolEvent::Error(_) => None,
|
|
270
270
|
})
|
|
271
271
|
.collect();
|
|
272
272
|
|
|
273
273
|
let stream_error = result.events.iter().find_map(|event| match event {
|
|
274
|
-
runtime::act::core::types::
|
|
274
|
+
runtime::act::core::types::ToolEvent::Error(e) => Some(e),
|
|
275
275
|
_ => None,
|
|
276
276
|
});
|
|
277
277
|
|
|
@@ -44,7 +44,7 @@ enum OutputFormat {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
#[derive(Parser)]
|
|
47
|
-
#[command(name = "act", about = "ACT — Agent Component Tools CLI")]
|
|
47
|
+
#[command(name = "act", version, about = "ACT — Agent Component Tools CLI")]
|
|
48
48
|
enum Cli {
|
|
49
49
|
/// Load a .wasm component and serve it (HTTP or MCP)
|
|
50
50
|
Run {
|
|
@@ -369,7 +369,7 @@ async fn cmd_call(
|
|
|
369
369
|
Ok(result) => {
|
|
370
370
|
for event in &result.events {
|
|
371
371
|
match event {
|
|
372
|
-
runtime::act::core::types::
|
|
372
|
+
runtime::act::core::types::ToolEvent::Content(part) => {
|
|
373
373
|
let mime = part.mime_type.as_deref().unwrap_or("application/cbor");
|
|
374
374
|
if mime.starts_with("text/")
|
|
375
375
|
|| mime == "application/json"
|
|
@@ -397,7 +397,7 @@ async fn cmd_call(
|
|
|
397
397
|
std::io::stdout().write_all(&part.data)?;
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
|
-
runtime::act::core::types::
|
|
400
|
+
runtime::act::core::types::ToolEvent::Error(err) => {
|
|
401
401
|
let ls = act_types::types::LocalizedString::from(&err.message);
|
|
402
402
|
anyhow::bail!("{}: {}", err.kind, ls.any_text());
|
|
403
403
|
}
|
|
@@ -265,10 +265,10 @@ async fn handle_tools_call(
|
|
|
265
265
|
|
|
266
266
|
for event in &result.events {
|
|
267
267
|
match event {
|
|
268
|
-
runtime::act::core::types::
|
|
268
|
+
runtime::act::core::types::ToolEvent::Content(part) => {
|
|
269
269
|
content.push(map_content_part(part));
|
|
270
270
|
}
|
|
271
|
-
runtime::act::core::types::
|
|
271
|
+
runtime::act::core::types::ToolEvent::Error(err) => {
|
|
272
272
|
is_error = true;
|
|
273
273
|
let message = act_types::types::LocalizedString::from(&err.message)
|
|
274
274
|
.any_text()
|
|
@@ -205,12 +205,12 @@ pub enum ComponentRequest {
|
|
|
205
205
|
|
|
206
206
|
/// Collected result from call-tool (stream already consumed).
|
|
207
207
|
pub struct CallToolResult {
|
|
208
|
-
pub events: Vec<act::core::types::
|
|
208
|
+
pub events: Vec<act::core::types::ToolEvent>,
|
|
209
209
|
}
|
|
210
210
|
|
|
211
211
|
/// Events sent through the SSE channel. Wraps stream events plus a terminal Done signal.
|
|
212
212
|
pub enum SseEvent {
|
|
213
|
-
Stream(act::core::types::
|
|
213
|
+
Stream(act::core::types::ToolEvent),
|
|
214
214
|
Done,
|
|
215
215
|
Error(ComponentError),
|
|
216
216
|
}
|
|
@@ -301,28 +301,34 @@ pub fn spawn_component_actor(instance: ActWorld, mut store: Store<HostState>) ->
|
|
|
301
301
|
ComponentRequest::CallTool { call, reply } => {
|
|
302
302
|
let provider = instance.act_core_tool_provider().clone();
|
|
303
303
|
|
|
304
|
-
let collected
|
|
304
|
+
let collected: std::sync::Arc<
|
|
305
|
+
std::sync::Mutex<Vec<act::core::types::ToolEvent>>,
|
|
306
|
+
> = std::sync::Arc::new(std::sync::Mutex::new(Vec::new()));
|
|
305
307
|
let collected2 = collected.clone();
|
|
306
308
|
let (done_tx, done_rx) = oneshot::channel::<()>();
|
|
307
309
|
|
|
308
310
|
let result = store
|
|
309
311
|
.run_concurrent(async |accessor| {
|
|
310
|
-
let
|
|
311
|
-
|
|
312
|
-
accessor.with(|access| {
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
312
|
+
let tool_result = provider.call_call_tool(accessor, call).await?;
|
|
313
|
+
|
|
314
|
+
accessor.with(|access| match tool_result {
|
|
315
|
+
act::core::types::ToolResult::Streaming(stream) => {
|
|
316
|
+
let consumer = CollectingConsumer {
|
|
317
|
+
collected,
|
|
318
|
+
done_tx: Some(done_tx),
|
|
319
|
+
};
|
|
320
|
+
let _ = stream.pipe(access, consumer);
|
|
321
|
+
}
|
|
322
|
+
act::core::types::ToolResult::Immediate(events) => {
|
|
323
|
+
collected
|
|
324
|
+
.lock()
|
|
325
|
+
.unwrap_or_else(|e| e.into_inner())
|
|
326
|
+
.extend(events);
|
|
327
|
+
let _ = done_tx.send(());
|
|
328
|
+
}
|
|
318
329
|
});
|
|
319
330
|
|
|
320
|
-
|
|
321
|
-
.await
|
|
322
|
-
.is_err()
|
|
323
|
-
{
|
|
324
|
-
tracing::warn!("stream consumption timed out after 30s");
|
|
325
|
-
}
|
|
331
|
+
let _ = done_rx.await;
|
|
326
332
|
|
|
327
333
|
Ok::<_, wasmtime::Error>(())
|
|
328
334
|
})
|
|
@@ -352,14 +358,24 @@ pub fn spawn_component_actor(instance: ActWorld, mut store: Store<HostState>) ->
|
|
|
352
358
|
|
|
353
359
|
let result = store
|
|
354
360
|
.run_concurrent(async |accessor| {
|
|
355
|
-
let
|
|
356
|
-
|
|
357
|
-
accessor.with(|access| {
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
361
|
+
let tool_result = provider.call_call_tool(accessor, call).await?;
|
|
362
|
+
|
|
363
|
+
accessor.with(|access| match tool_result {
|
|
364
|
+
act::core::types::ToolResult::Streaming(stream) => {
|
|
365
|
+
let consumer = ForwardingConsumer {
|
|
366
|
+
event_tx: event_tx.clone(),
|
|
367
|
+
done_tx: Some(done_tx),
|
|
368
|
+
};
|
|
369
|
+
let _ = stream.pipe(access, consumer);
|
|
370
|
+
}
|
|
371
|
+
act::core::types::ToolResult::Immediate(events) => {
|
|
372
|
+
for event in events {
|
|
373
|
+
if event_tx.try_send(SseEvent::Stream(event)).is_err() {
|
|
374
|
+
break;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
let _ = done_tx.send(());
|
|
378
|
+
}
|
|
363
379
|
});
|
|
364
380
|
|
|
365
381
|
let _ = done_rx.await;
|
|
@@ -388,12 +404,12 @@ pub fn spawn_component_actor(instance: ActWorld, mut store: Store<HostState>) ->
|
|
|
388
404
|
|
|
389
405
|
/// A StreamConsumer that collects all items into a Vec and signals completion.
|
|
390
406
|
struct CollectingConsumer {
|
|
391
|
-
collected: std::sync::Arc<std::sync::Mutex<Vec<act::core::types::
|
|
407
|
+
collected: std::sync::Arc<std::sync::Mutex<Vec<act::core::types::ToolEvent>>>,
|
|
392
408
|
done_tx: Option<oneshot::Sender<()>>,
|
|
393
409
|
}
|
|
394
410
|
|
|
395
411
|
impl StreamConsumer<HostState> for CollectingConsumer {
|
|
396
|
-
type Item = act::core::types::
|
|
412
|
+
type Item = act::core::types::ToolEvent;
|
|
397
413
|
|
|
398
414
|
fn poll_consume(
|
|
399
415
|
mut self: Pin<&mut Self>,
|
|
@@ -430,7 +446,7 @@ struct ForwardingConsumer {
|
|
|
430
446
|
}
|
|
431
447
|
|
|
432
448
|
impl StreamConsumer<HostState> for ForwardingConsumer {
|
|
433
|
-
type Item = act::core::types::
|
|
449
|
+
type Item = act::core::types::ToolEvent;
|
|
434
450
|
|
|
435
451
|
fn poll_consume(
|
|
436
452
|
mut self: Pin<&mut Self>,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
package act:core@0.
|
|
1
|
+
package act:core@0.3.0;
|
|
2
2
|
|
|
3
3
|
interface types {
|
|
4
4
|
|
|
@@ -34,8 +34,7 @@ interface types {
|
|
|
34
34
|
/// detected via the `$schema` field.
|
|
35
35
|
parameters-schema: string,
|
|
36
36
|
/// Well-known keys: std:read-only, std:idempotent, std:destructive,
|
|
37
|
-
/// std:usage-hints, std:anti-usage-hints, std:examples, std:tags, std:timeout-ms
|
|
38
|
-
/// std:streaming.
|
|
37
|
+
/// std:usage-hints, std:anti-usage-hints, std:examples, std:tags, std:timeout-ms.
|
|
39
38
|
metadata: metadata,
|
|
40
39
|
}
|
|
41
40
|
|
|
@@ -77,13 +76,33 @@ interface types {
|
|
|
77
76
|
metadata: metadata,
|
|
78
77
|
}
|
|
79
78
|
|
|
80
|
-
/// A single event in
|
|
81
|
-
/// A `
|
|
82
|
-
variant
|
|
79
|
+
/// A single event in a tool's result.
|
|
80
|
+
/// A `tool-event::error` is terminal — no further events follow.
|
|
81
|
+
variant tool-event {
|
|
83
82
|
content(content-part),
|
|
84
83
|
error(tool-error),
|
|
85
84
|
}
|
|
86
85
|
|
|
86
|
+
/// The result of a tool call.
|
|
87
|
+
///
|
|
88
|
+
/// Two shapes exist to accommodate different guest capabilities; they are
|
|
89
|
+
/// semantically equivalent. Both carry an ordered sequence of `tool-event`s
|
|
90
|
+
/// with identical terminal-error semantics (`tool-event::error` is terminal).
|
|
91
|
+
/// Hosts, intermediaries, and callers MUST treat both variants as equivalent
|
|
92
|
+
/// event sequences.
|
|
93
|
+
///
|
|
94
|
+
/// - `immediate` — the complete event list is materialized when the tool
|
|
95
|
+
/// returns. Natural for sync guest bodies and languages without an async
|
|
96
|
+
/// runtime. An early failure is encoded as a single `tool-event::error`.
|
|
97
|
+
/// - `streaming` — events are emitted to a stream as they are produced.
|
|
98
|
+
/// Natural for incremental producers and I/O-bound bridges.
|
|
99
|
+
///
|
|
100
|
+
/// Intermediaries (bridges, adapters) MAY freely convert between variants.
|
|
101
|
+
variant tool-result {
|
|
102
|
+
immediate(list<tool-event>),
|
|
103
|
+
streaming(stream<tool-event>),
|
|
104
|
+
}
|
|
105
|
+
|
|
87
106
|
|
|
88
107
|
// ──────────────────────────────────────────────
|
|
89
108
|
// Response wrappers
|
|
@@ -104,7 +123,7 @@ interface tool-provider {
|
|
|
104
123
|
use types.{
|
|
105
124
|
tool-definition,
|
|
106
125
|
tool-call,
|
|
107
|
-
|
|
126
|
+
tool-result,
|
|
108
127
|
list-tools-response,
|
|
109
128
|
tool-error,
|
|
110
129
|
metadata,
|
|
@@ -126,9 +145,11 @@ interface tool-provider {
|
|
|
126
145
|
/// Async because bridge components may need to fetch remote schemas.
|
|
127
146
|
list-tools: async func(metadata: metadata) -> result<list-tools-response, tool-error>;
|
|
128
147
|
|
|
129
|
-
/// Invokes a tool
|
|
130
|
-
///
|
|
131
|
-
///
|
|
132
|
-
|
|
148
|
+
/// Invokes a tool. Metadata is carried inside `tool-call.metadata`.
|
|
149
|
+
///
|
|
150
|
+
/// Returns either `immediate` (bounded, sync-friendly) or `streaming`
|
|
151
|
+
/// (unbounded or incremental). Both carry `tool-event`s with the same
|
|
152
|
+
/// semantics: `tool-event::error` is terminal.
|
|
153
|
+
call-tool: async func(call: tool-call) -> tool-result;
|
|
133
154
|
}
|
|
134
155
|
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
package act:core@0.
|
|
1
|
+
package act:core@0.3.0;
|
|
2
|
+
|
|
3
|
+
// STATUS: Informative / Request for Comments.
|
|
4
|
+
//
|
|
5
|
+
// This interface is a design sketch for push-style event notifications from
|
|
6
|
+
// components. It is NOT normative in act:core@0.3.0. No production components
|
|
7
|
+
// currently implement event-provider. The interface is retained in the package
|
|
8
|
+
// to solicit feedback; future versions may stabilize, restructure, or remove it.
|
|
9
|
+
// Implementations MAY experiment with it but MUST NOT rely on its stability.
|
|
2
10
|
|
|
3
11
|
interface event-types {
|
|
4
12
|
use types.{localized-string, metadata};
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
package act:core@0.
|
|
1
|
+
package act:core@0.3.0;
|
|
2
|
+
|
|
3
|
+
// STATUS: Informative / Request for Comments.
|
|
4
|
+
//
|
|
5
|
+
// This interface is a design sketch for component-provided resources (skills,
|
|
6
|
+
// schemas, remote data). It is NOT normative in act:core@0.3.0. No production
|
|
7
|
+
// components currently implement resource-provider. The interface is retained
|
|
8
|
+
// in the package to solicit feedback; future versions may stabilize,
|
|
9
|
+
// restructure, or remove it. Implementations MAY experiment with it but
|
|
10
|
+
// MUST NOT rely on its stability.
|
|
2
11
|
|
|
3
12
|
interface resource-types {
|
|
4
13
|
use types.{localized-string, metadata};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
[act-core]
|
|
2
|
+
url = "https://github.com/actcore/act-spec/archive/main.tar.gz"
|
|
3
|
+
sha256 = "edb064c68aa6f3b2b8666bbab1c254ba716390aa3053d02e3eb86bbda640dab3"
|
|
4
|
+
sha512 = "d894aa4aa43d79f89d363dd47346af5ecde692b4ea5b2a6485d78d86383c86080f4cff40dbd2f150309faec7c2b44a204ae5cedcd395880cad9c3dd622cacfca"
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
[act-core]
|
|
2
|
-
url = "https://github.com/actcore/act-spec/archive/main.tar.gz"
|
|
3
|
-
sha256 = "2f099c8558f3f64c6d80546386c5dbcbe5e379c3c1e8af16dae378184162f719"
|
|
4
|
-
sha512 = "c721dc6d2247bad5fde0d10e27fd78e96402853d12b6ffdc1fddd209c93fc91b3f289bc07634f5eb6b9ba085884cd12106abaa6a2020d6040ab56f18982ca45f"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|