@@ -557,6 +557,7 @@ pub mod atomic {
557557 use super :: super :: super :: _rt;
558558 pub type ResourceJson = super :: super :: super :: atomic:: class_extender:: types:: ResourceJson ;
559559 #[ allow( unused_unsafe, clippy:: all) ]
560+ /// Returns a resource by subject.
560561 pub fn get_resource (
561562 subject : & str ,
562563 agent : Option < & str > ,
@@ -679,6 +680,7 @@ pub mod atomic {
679680 }
680681 }
681682 #[ allow( unused_unsafe, clippy:: all) ]
683+ /// Returns a list of resources that match the query.
682684 pub fn query (
683685 property : & str ,
684686 value : & str ,
@@ -866,6 +868,43 @@ pub mod atomic {
866868 result5
867869 }
868870 }
871+ #[ allow( unused_unsafe, clippy:: all) ]
872+ /// Returns the JSON config of the plugin as a string. The user can edit this config at any time.
873+ pub fn get_config ( ) -> _rt:: String {
874+ unsafe {
875+ #[ cfg_attr( target_pointer_width = "64" , repr( align( 8 ) ) ) ]
876+ #[ cfg_attr( target_pointer_width = "32" , repr( align( 4 ) ) ) ]
877+ struct RetArea (
878+ [ :: core:: mem:: MaybeUninit <
879+ u8 ,
880+ > ; 2 * :: core:: mem:: size_of :: < * const u8 > ( ) ] ,
881+ ) ;
882+ let mut ret_area = RetArea (
883+ [ :: core:: mem:: MaybeUninit :: uninit ( ) ; 2
884+ * :: core:: mem:: size_of :: < * const u8 > ( ) ] ,
885+ ) ;
886+ let ptr0 = ret_area. 0 . as_mut_ptr ( ) . cast :: < u8 > ( ) ;
887+ #[ cfg( target_arch = "wasm32" ) ]
888+ #[ link( wasm_import_module = "atomic:class-extender/[email protected] " ) ] 889+ unsafe extern "C" {
890+ #[ link_name = "get-config" ]
891+ fn wit_import1 ( _: * mut u8 ) ;
892+ }
893+ #[ cfg( not( target_arch = "wasm32" ) ) ]
894+ unsafe extern "C" fn wit_import1 ( _: * mut u8 ) {
895+ unreachable ! ( )
896+ }
897+ unsafe { wit_import1 ( ptr0) } ;
898+ let l2 = * ptr0. add ( 0 ) . cast :: < * mut u8 > ( ) ;
899+ let l3 = * ptr0
900+ . add ( :: core:: mem:: size_of :: < * const u8 > ( ) )
901+ . cast :: < usize > ( ) ;
902+ let len4 = l3;
903+ let bytes4 = _rt:: Vec :: from_raw_parts ( l2. cast ( ) , len4, len4) ;
904+ let result5 = _rt:: string_lift ( bytes4) ;
905+ result5
906+ }
907+ }
869908 }
870909 }
871910}
@@ -935,8 +974,8 @@ pub(crate) use __export_class_extender_impl as export;
935974#[ unsafe( link_section = "component-type:wit-bindgen:0.41.0:atomic:[email protected] :class-extender:encoded world" ) ] 936975#[ doc( hidden) ]
937976#[ allow( clippy:: octal_escapes) ]
938- pub static __WIT_BINDGEN_COMPONENT_TYPE: [ u8 ; 950 ] = * b"\
939- \0 asm\x0d \0 \x01 \0 \0 \x19 \x16 wit-component-encoding\x04 \0 \x07 \xb1 \x06 \x01 A\x02 \x01 \
977+ pub static __WIT_BINDGEN_COMPONENT_TYPE: [ u8 ; 965 ] = * b"\
978+ \0 asm\x0d \0 \x01 \0 \0 \x19 \x16 wit-component-encoding\x04 \0 \x07 \xc0 \x06 \x01 A\x02 \x01 \
940979 A\x17 \x01 B\x0b \x01 r\x01 \x07 subjects\x04 \0 \x0c atomic-agent\x03 \0 \0 \x01 r\x02 \x07 su\
941980 bjects\x07 json-ads\x04 \0 \x0d resource-json\x03 \0 \x02 \x01 p\x03 \x01 r\x02 \x07 primary\
942981\x03 \x0a referenced\x04 \x04 \0 \x11 resource-response\x03 \0 \x05 \x01 r\x04 \x0b request-\
@@ -945,18 +984,18 @@ t\x03\0\x07\x01r\x03\x07subjects\x0bcommit-jsons\x08snapshot\x03\x04\0\x0ecommit
945984 -context\x03 \0 \x09 \x03 \0 !atomic:class-extender/[email protected] \x05 \0 \x02 \x03 \0 \0 \x11 \ 946985 resource-response\x03 \0 \x11 resource-response\x03 \0 \x01 \x02 \x03 \0 \0 \x0b get-contex\
947986 t\x03 \0 \x0b get-context\x03 \0 \x03 \x02 \x03 \0 \0 \x0e commit-context\x03 \0 \x0e commit-c\
948- ontext\x03 \0 \x05 \x02 \x03 \0 \0 \x0d resource-json\x02 \x03 \0 \0 \x0c atomic-agent\x01 B\x0e \
987+ ontext\x03 \0 \x05 \x02 \x03 \0 \0 \x0d resource-json\x02 \x03 \0 \0 \x0c atomic-agent\x01 B\x0f \
949988\x02 \x03 \x02 \x01 \x07 \x04 \0 \x0d resource-json\x03 \0 \0 \x02 \x03 \x02 \x01 \x08 \x04 \0 \x0c \
950989 atomic-agent\x03 \0 \x02 \x01 ks\x01 j\x01 \x01 \x01 s\x01 @\x02 \x07 subjects\x05 agent\x04 \
951990\0 \x05 \x04 \0 \x0c get-resource\x01 \x06 \x01 p\x01 \x01 j\x01 \x07 \x01 s\x01 @\x03 \x08 prop\
952991 ertys\x05 values\x05 agent\x04 \0 \x08 \x04 \0 \x05 query\x01 \x09 \x01 @\0 \0 s\x04 \0 \x10 get\
953- -plugin-agent\x01 \x0a \x03 \0 \x20 atomic:class-extender/[email protected] \x05 \x09 \x01 ps \x01 \ 954- @ \ 0\0 \x0a \x04 \0 \x09 class-url\x01 \x0b \x01 k\x02 \x01 j\x01 \x0c \x01 s \x01 @ \x01 \x03 ctx \x04 \
955- \0 \x0d \x04 \0 \x0f on-resource-get\x01 \x0e \x01 j\0 \x01 s\x01 @ \x01 \x03 ctx \x06 \0 \x0f \x04 \
956- \0 \x0d before-commit \ x01\x10 \ x04\0 \x0c after -commit\x01 \x10 \x04 \0 *atomic:class-ext \
957- ender /[email protected] \x04 \0 \x0b \x14 \x01 \0 \x0e class-extender \x03 \0 \0 \0 G \x09 p \ 958- roducers \ x01\x0c processed-by\x02 \x0d wit-component\x07 0.227.1 \x10 wit-bindgen-rust \
959- \x06 0.41.0";
992+ -plugin-agent\x01 \x0a \x04 \0 \x0a get-config \x01 \x0a \ x03\0 \x20 atomic:class-extender\
993+ /[email protected] \x05 \x09 \x01 ps \x01 @ \ 0\0 \x0a \x04 \0 \x09 class-url\x01 \x0b \x01 k\x02 \x01 j\x01 \ 994+ \x0c \x01 s \x01 @ \x01 \x03 ctx \x04 \ 0\x0d \x04 \0 \x0f on-resource-get\x01 \x0e \x01 j\0 \x01 s\
995+ \x01 @ \ x01\x03 ctx \x06 \0 \x0f \ x04\0 \x0d before -commit\x01 \x10 \x04 \0 \x0c after-commit \x01 \
996+ \x10 \x04 \0 *atomic:class-extender /[email protected] \x04 \0 \x0b \x14 \x01 \0 \x0e cla \ 997+ ss-extender \x03 \0 \0 \0 G \x09 producers \ x01\x0c processed-by\x02 \x0d wit-component\x07 \
998+ 0.227.1 \x10 wit-bindgen-rust \x06 0.41.0";
960999#[ inline( never) ]
9611000#[ doc( hidden) ]
9621001pub fn __link_custom_section_describing_imports ( ) {
0 commit comments