@adapt-toolkit/a2adapt 0.11.2 → 0.11.3

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.
@@ -3,7 +3,7 @@
3
3
  "name": "a2adapt",
4
4
  "displayName": "a2adapt",
5
5
  "description": "Secure agent-to-agent communication channel over ADAPT: self-sovereign pubkey identity, end-to-end encryption, plan-first execution.",
6
- "version": "0.11.2",
6
+ "version": "0.11.3",
7
7
  "author": {
8
8
  "name": "Adapt Toolkit"
9
9
  },
package/dist/index.js CHANGED
@@ -22512,7 +22512,7 @@ function writeIdentityFile(target, opts, overwrite = false) {
22512
22512
  }
22513
22513
 
22514
22514
  // src/index.ts
22515
- var VERSION = true ? "0.11.2" : "0.0.0-dev";
22515
+ var VERSION = true ? "0.11.3" : "0.0.0-dev";
22516
22516
  var CONFIG = loadConfig();
22517
22517
  var STATE_DIR = CONFIG.stateDir;
22518
22518
  var BROKER_URL = CONFIG.brokerUrl;
@@ -5,6 +5,12 @@
5
5
  // encrypted; the key exchange is handled for us by the stdlib `encrypted_channel`
6
6
  // library — we only ever address peers by their container id.
7
7
  //
8
+ // The wire-facing shapes and shared verification logic live in the shared
9
+ // a2adapt-mufl-core repo (checked out as the core/ subfolder of this
10
+ // directory): libraries `a2a_protocol` and `version`. They are shared with
11
+ // the web messenger — change them there, bump core_version, and recompile
12
+ // every consumer.
13
+ //
8
14
  // User transactions (each backs one MCP tool, except gc which the host fires):
9
15
  // set_my_name — set the display name peers see for me
10
16
  // set_my_bio — set my profile bio (free-text, self-asserted)
@@ -62,25 +68,13 @@ application actor loads libraries
62
68
  key_storage,
63
69
  continuation,
64
70
  encrypted_channel,
65
- current_transaction_info
71
+ current_transaction_info,
72
+ a2a_protocol,
73
+ version
66
74
  uses transactions
67
75
  {
68
76
  hidden
69
77
  {
70
- metadef contact_t: ($name -> str, $container_id -> global_id).
71
- // Slim invite. Short keys (no field-name bloat), no outer wrapper, and
72
- // only the cryptographically load-bearing parts travel: the inviter's
73
- // signed identity (public keys) + its self-signatures. inviter_id is NOT
74
- // carried separately — it is the identity's own container_id. version is
75
- // a constant reconstructed on the receiver. (See generate_invite /
76
- // add_contact: the embedded identity is kept byte-for-byte so its
77
- // _value_id — what the signatures are over — stays valid.)
78
- // $d invite_id $n inviter_name $c container_id
79
- // $k public keys $a authorizations
80
- // default_keys is NOT carried — the receiver rebuilds it from the keys
81
- // (each key knows its own function + id), so the reconstructed identity is
82
- // byte-identical to the signed one and the self-signatures still verify.
83
- metadef invite_t: ($d -> global_id, $n -> str, $c -> global_id, $k -> key_utils::t_publickey(,), $a -> crypto_signature(,)).
84
78
  // A received message carries a stable per-packet id and a lifecycle status:
85
79
  // "unread" (just arrived) -> "processed" (handed to the agent via
86
80
  // get_messages) -> "ready_to_delete" (first gc tick) -> deleted (next gc
@@ -92,71 +86,13 @@ application actor loads libraries
92
86
  // migrates blobs in this shape forward — see below.
93
87
  metadef legacy_message_t: ($sender_id -> global_id, $sender_name -> str, $text -> str, $date -> time).
94
88
 
95
- // ---- local contact book wire shapes ---------------------------------
96
- // Introduction credential, minted PER CONNECT ATTEMPT by the host's
97
- // registrar packet (never stored in the book). It binds the joiner's
98
- // identity AND address document to one target, with freshness + a nonce,
99
- // so possession of book material alone authorizes nothing: only the
100
- // registrar (whose key never leaves the host) can mint one, which is
101
- // what makes "local" a cryptographic property rather than a convention.
102
- metadef intro_t: (
103
- $version -> int,
104
- $joiner_cid -> global_id,
105
- $joiner_ad_hash -> hash_code,
106
- $target_cid -> global_id,
107
- $iat -> time,
108
- $nonce -> global_id
109
- ).
110
- metadef signed_intro_t: ($i -> intro_t, $s -> crypto_signature).
111
- // What the registrar signs for a contact-book entry (tamper-evidence for
112
- // the host-side book file; verified by the SENDER in connect_local).
113
- metadef book_entry_t: ($version -> int, $name -> str, $ad_hash -> hash_code).
114
89
  // A not-yet-approved local introduction, with its bounded message queue.
90
+ // (The local-book WIRE shapes — intro_t, signed_intro_t, book_entry_t —
91
+ // live in a2a_protocol; these three are packet-local state/view shapes.)
115
92
  metadef pending_msg_t: ($text -> str, $date -> time).
116
93
  metadef pending_intro_t: ($name -> str, $ad -> address_document_types::t_address_document, $messages -> pending_msg_t[]).
117
94
  metadef pending_view_t: ($name -> str, $queued -> int).
118
95
 
119
- // ---- identity hierarchy wire shapes ---------------------------------
120
- // Delegation certificate: "role X belongs to root Y, signed by Y". The
121
- // signature is over the core's _value_id, binding the role's container
122
- // id AND its full key material (the address-document hash) to one root.
123
- // An identity carrying NIL here is a root (or a legacy flat identity) —
124
- // detection is structural, not a flag. v1 revocation == delete the role.
125
- metadef delegation_core_t: (
126
- $version -> int,
127
- $role_cid -> global_id,
128
- $role_ad_hash -> hash_code,
129
- $role_id -> str,
130
- $root_cid -> global_id,
131
- $issued_at -> time
132
- ).
133
- metadef delegation_cert_t: ($c -> delegation_core_t, $s -> crypto_signature).
134
- // Self-signed root profile, carried in role invites so an external peer
135
- // learns WHO is behind the role. It includes the root's key list, so the
136
- // receiver can verify both this signature and the delegation cert with
137
- // no prior knowledge of the root.
138
- metadef root_profile_core_t: (
139
- $version -> int,
140
- $root_cid -> global_id,
141
- $name -> str,
142
- $bio -> str,
143
- $keys -> key_utils::t_publickey(,)
144
- ).
145
- metadef root_profile_t: ($p -> root_profile_core_t, $s -> crypto_signature).
146
- // Verified root linkage learned about a contact (from its role invite or
147
- // a sibling introduction). Kept beside `contacts` so old state blobs
148
- // (whose contact_t has no such fields) import unchanged.
149
- metadef contact_root_t: ($root_cid -> global_id, $root_name -> str, $role_id -> str).
150
- // Role invite: the slim invite plus the delegation chain and the role's
151
- // self-asserted bio. Roots and legacy identities keep emitting the old
152
- // invite_t shape byte-for-byte, so their invites stay redeemable by old
153
- // clients; only role invites require a hierarchy-aware receiver.
154
- metadef invite_role_t: (
155
- $d -> global_id, $n -> str, $c -> global_id,
156
- $k -> key_utils::t_publickey(,), $a -> crypto_signature(,),
157
- $b -> str, $dc -> delegation_cert_t, $rp -> root_profile_t
158
- ).
159
-
160
96
  // Acceptance window for an introduction credential (seconds since mint;
161
97
  // small negative slack for clock oddities) and the matching nonce-table
162
98
  // retention horizon (window + slack, so a nonce outlives its credential).
@@ -174,7 +110,7 @@ application actor loads libraries
174
110
  // The display name peers see for me (set via set_my_name).
175
111
  my_name is str = "".
176
112
  // Known contacts, keyed by their container id.
177
- contacts is (global_id ->> contact_t) = (,).
113
+ contacts is (global_id ->> a2a_protocol::contact_t) = (,).
178
114
  // Invites I generated, keyed by invite id -> the name I assigned the peer.
179
115
  pending_invites is (global_id ->> str) = (,).
180
116
  // Received messages. Each carries its own lifecycle status (see
@@ -210,14 +146,14 @@ application actor loads libraries
210
146
  // My profile bio (free-text, self-asserted; carried in role invites).
211
147
  my_bio is str = "".
212
148
  // My delegation cert. NIL == I am a root or a legacy flat identity.
213
- delegation_cert is delegation_cert_t+ = NIL.
149
+ delegation_cert is a2a_protocol::delegation_cert_t+ = NIL.
214
150
  // My root's address document (set with the cert; its key list is what
215
151
  // sibling introductions and my own cert are verified against).
216
152
  root_ad is address_document_types::t_address_document+ = NIL.
217
153
  // My root's self-signed profile, embedded in the invites I generate.
218
- root_profile is root_profile_t+ = NIL.
154
+ root_profile is a2a_protocol::root_profile_t+ = NIL.
219
155
  // Verified root linkage per contact, keyed by the contact's container id.
220
- contact_roots is (global_id ->> contact_root_t) = (,).
156
+ contact_roots is (global_id ->> a2a_protocol::contact_root_t) = (,).
221
157
 
222
158
  // Signal the host to persist the packet. Only emitted at the end of a
223
159
  // complete procedure — intermediate states (e.g. channel handshake) are
@@ -255,25 +191,6 @@ application actor loads libraries
255
191
  return mid.
256
192
  }
257
193
 
258
- // Verify a delegation chain presented by a peer: the root profile is
259
- // internally consistent and the cert binds the peer's container id AND
260
- // its address document to that root, both signed by the root's keys.
261
- // The chain is self-contained (the profile carries the root's key list),
262
- // so it proves "this role belongs to the root that signed it" — it does
263
- // NOT vouch for who the root is (root verification is deferred to v2).
264
- // Aborts on any mismatch; returns the linkage to record.
265
- fn verify_peer_delegation (peer_cid: global_id, peer_ad_hash: hash_code, cert: delegation_cert_t, rp: root_profile_t) -> contact_root_t
266
- {
267
- abort "Unsupported delegation certificate version." when (cert $c $version) != 1.
268
- abort "Unsupported root profile version." when (rp $p $version) != 1.
269
- abort "Delegation certificate was issued for a different identity." when (cert $c $role_cid) != peer_cid.
270
- abort "Delegation certificate does not match the peer's address document." when (cert $c $role_ad_hash) != peer_ad_hash.
271
- abort "Root profile does not match the delegation certificate's root." when (rp $p $root_cid) != (cert $c $root_cid).
272
- abort "Root profile signature is invalid." when key_storage::check_signature_new_container (_value_id (rp $p)) (rp $s) (rp $p $keys) != TRUE.
273
- abort "Delegation certificate was not signed by its root." when key_storage::check_signature_new_container (_value_id (cert $c)) (cert $s) (rp $p $keys) != TRUE.
274
- return ($root_cid -> cert $c $root_cid, $root_name -> rp $p $name, $role_id -> cert $c $role_id).
275
- }
276
-
277
194
  // Resolve a pending introduction by joiner name or stringified container
278
195
  // id; aborts when nothing matches.
279
196
  fn resolve_pending (ref: str) -> global_id
@@ -336,7 +253,7 @@ application actor loads libraries
336
253
  // byte-for-byte, so those invites stay redeemable by old clients.
337
254
  if delegation_cert != NIL && root_profile != NIL
338
255
  {
339
- role_invite is invite_role_t = (
256
+ role_invite is a2a_protocol::invite_role_t = (
340
257
  $d -> invite_id,
341
258
  $n -> my_name,
342
259
  $c -> my_identity $container_id,
@@ -356,7 +273,7 @@ application actor loads libraries
356
273
  ].
357
274
  }
358
275
 
359
- invite is invite_t = (
276
+ invite is a2a_protocol::invite_t = (
360
277
  $d -> invite_id,
361
278
  $n -> my_name,
362
279
  $c -> my_identity $container_id,
@@ -390,39 +307,23 @@ application actor loads libraries
390
307
  inviter_keys = (raw $k) safe (key_utils::t_publickey(,)).
391
308
  inviter_auths = (raw $a) safe (crypto_signature(,)).
392
309
 
393
- // Rebuild default_keys from the carried public keys: each key reports its
394
- // own function and id, so this reproduces the inviter's default-key map
395
- // exactly. With it we reconstruct the full identity (and hence its
396
- // _value_id, which the self-signatures sign over) byte-for-byte, then the
397
- // full address document. import_state later replays this reconstructed
398
- // document through process_address_document to re-register the inviter's
399
- // keys after a code upgrade — so it must validate, and it does.
400
- inviter_default_keys is (key_utils::t_function ->> key_utils::t_key_id) = (,).
401
- sc inviter_keys -- (key -> )
402
- {
403
- inviter_default_keys (key_utils::key_get_function key) -> (_crypto_get_key_id key).
404
- }
405
- inviter_identity is key_storage::t_container_identity = (
406
- $key_list -> inviter_keys,
407
- $default_keys -> inviter_default_keys,
408
- $container_id -> inviter_id
409
- ).
410
- inviter_ad is address_document_types::t_address_document = (
411
- $version -> 1,
412
- $identity -> inviter_identity,
413
- $authorizations -> inviter_auths
414
- ).
310
+ // Rebuild the inviter's full address document from the carried material
311
+ // (see a2a_protocol::rebuild_peer_address_document the reconstructed
312
+ // identity is byte-for-byte the signed one). import_state later replays
313
+ // this document through process_address_document to re-register the
314
+ // inviter's keys after a code upgrade so it must validate, and it does.
315
+ inviter_ad = a2a_protocol::rebuild_peer_address_document inviter_id inviter_keys inviter_auths.
415
316
 
416
317
  // A role invite carries a delegation chain — verify it BEFORE anything
417
318
  // is registered (an invalid chain rejects the whole invite), and record
418
319
  // the root linkage. A legacy/root invite has no chain; nothing to check.
419
- inviter_root is contact_root_t+ = NIL.
320
+ inviter_root is a2a_protocol::contact_root_t+ = NIL.
420
321
  inviter_bio is str = "".
421
322
  if (raw $dc) != NIL
422
323
  {
423
- cert = (raw $dc) safe delegation_cert_t.
424
- rp = (raw $rp) safe root_profile_t.
425
- inviter_root -> verify_peer_delegation inviter_id (_value_id inviter_ad) cert rp.
324
+ cert = (raw $dc) safe a2a_protocol::delegation_cert_t.
325
+ rp = (raw $rp) safe a2a_protocol::root_profile_t.
326
+ inviter_root -> a2a_protocol::verify_peer_delegation inviter_id (_value_id inviter_ad) cert rp.
426
327
  inviter_bio -> (raw $b) safe str.
427
328
  }
428
329
 
@@ -720,7 +621,7 @@ application actor loads libraries
720
621
 
721
622
  joiner_ad = (_read_or_abort joiner_ad_blob) safe address_document_types::t_address_document.
722
623
  target_ad = (_read_or_abort target_ad_blob) safe address_document_types::t_address_document.
723
- intro is intro_t = (
624
+ intro is a2a_protocol::intro_t = (
724
625
  $version -> 1,
725
626
  $joiner_cid -> joiner_ad $identity $container_id,
726
627
  $joiner_ad_hash -> _value_id joiner_ad,
@@ -728,7 +629,7 @@ application actor loads libraries
728
629
  $iat -> (current_transaction_info::get_transaction_time())?,
729
630
  $nonce -> _new_id "a2adapt local introduction"
730
631
  ).
731
- signed is signed_intro_t = ($i -> intro, $s -> key_storage::default_sign (_value_id intro)).
632
+ signed is a2a_protocol::signed_intro_t = ($i -> intro, $s -> key_storage::default_sign (_value_id intro)).
732
633
  return transaction::success [
733
634
  _return_data ($intro -> (_write signed))
734
635
  ].
@@ -742,7 +643,7 @@ application actor loads libraries
742
643
  current_transaction_info::validate_origin_or_abort (transaction::envelope::origin::user,).
743
644
 
744
645
  ad = (_read_or_abort ad_blob) safe address_document_types::t_address_document.
745
- entry is book_entry_t = ($version -> 1, $name -> name, $ad_hash -> _value_id ad).
646
+ entry is a2a_protocol::book_entry_t = ($version -> 1, $name -> name, $ad_hash -> _value_id ad).
746
647
  return transaction::success [
747
648
  _return_data ($sig -> (_write (key_storage::default_sign (_value_id entry))))
748
649
  ].
@@ -763,7 +664,7 @@ application actor loads libraries
763
664
  target_id = target_ad $identity $container_id.
764
665
  abort "This contact-book entry is your own identity." when target_id == _get_container_id().
765
666
 
766
- entry is book_entry_t = ($version -> 1, $name -> name, $ad_hash -> _value_id target_ad).
667
+ entry is a2a_protocol::book_entry_t = ($version -> 1, $name -> name, $ad_hash -> _value_id target_ad).
767
668
  entry_sig = (_read_or_abort entry_sig_blob) safe crypto_signature.
768
669
  abort "Contact-book entry failed registrar verification." when key_storage::check_signature_new_container (_value_id entry) entry_sig (registrar_ad? $identity $key_list) != TRUE.
769
670
 
@@ -856,7 +757,7 @@ application actor loads libraries
856
757
  role_cid = role_ad $identity $container_id.
857
758
  abort "Cannot issue a delegation certificate to myself." when role_cid == _get_container_id().
858
759
 
859
- core is delegation_core_t = (
760
+ core is a2a_protocol::delegation_core_t = (
860
761
  $version -> 1,
861
762
  $role_cid -> role_cid,
862
763
  $role_ad_hash -> _value_id role_ad,
@@ -864,7 +765,7 @@ application actor loads libraries
864
765
  $root_cid -> _get_container_id(),
865
766
  $issued_at -> (current_transaction_info::get_transaction_time())?
866
767
  ).
867
- cert is delegation_cert_t = ($c -> core, $s -> key_storage::default_sign (_value_id core)).
768
+ cert is a2a_protocol::delegation_cert_t = ($c -> core, $s -> key_storage::default_sign (_value_id core)).
868
769
  return transaction::success [
869
770
  _return_data ($cert -> (_write cert))
870
771
  ].
@@ -879,14 +780,14 @@ application actor loads libraries
879
780
  abort "Only a root identity can export a root profile." when delegation_cert != NIL.
880
781
 
881
782
  my_ad = address_document::get_my_address_document().
882
- core is root_profile_core_t = (
783
+ core is a2a_protocol::root_profile_core_t = (
883
784
  $version -> 1,
884
785
  $root_cid -> _get_container_id(),
885
786
  $name -> my_name,
886
787
  $bio -> my_bio,
887
788
  $keys -> my_ad $identity $key_list
888
789
  ).
889
- profile is root_profile_t = ($p -> core, $s -> key_storage::default_sign (_value_id core)).
790
+ profile is a2a_protocol::root_profile_t = ($p -> core, $s -> key_storage::default_sign (_value_id core)).
890
791
  return transaction::success [
891
792
  _return_data ($profile -> (_write profile))
892
793
  ].
@@ -901,9 +802,9 @@ application actor loads libraries
901
802
  {
902
803
  current_transaction_info::validate_origin_or_abort (transaction::envelope::origin::user,).
903
804
 
904
- cert = (_read_or_abort cert_blob) safe delegation_cert_t.
805
+ cert = (_read_or_abort cert_blob) safe a2a_protocol::delegation_cert_t.
905
806
  new_root_ad = (_read_or_abort root_ad_blob) safe address_document_types::t_address_document.
906
- rp = (_read_or_abort rp_blob) safe root_profile_t.
807
+ rp = (_read_or_abort rp_blob) safe a2a_protocol::root_profile_t.
907
808
 
908
809
  abort "Unsupported delegation certificate version." when (cert $c $version) != 1.
909
810
  abort "This delegation certificate was issued to a different identity." when (cert $c $role_cid) != _get_container_id().
@@ -950,6 +851,12 @@ application actor loads libraries
950
851
  return contact_roots.
951
852
  }
952
853
 
854
+ // The shared-core version this packet was compiled with (see core/version.mm).
855
+ trn readonly get_version _
856
+ {
857
+ return ($core -> version::get_core_version()).
858
+ }
859
+
953
860
  // Connect to an intra-root sibling (Ring 1): register it as a contact and
954
861
  // introduce myself over the encrypted channel, presenting my delegation
955
862
  // cert (NIL when I am the root itself — the channel proves I control the
@@ -1033,7 +940,7 @@ application actor loads libraries
1033
940
  // The fields that did not change across the schema bump are validated the
1034
941
  // same way for any version of the blob.
1035
942
  my_name -> (data $my_name) safe str.
1036
- contacts -> (data $contacts) safe (global_id ->> contact_t).
943
+ contacts -> (data $contacts) safe (global_id ->> a2a_protocol::contact_t).
1037
944
  pending_invites -> (data $pending_invites) safe (global_id ->> str).
1038
945
  peer_ads -> (data $peer_ads) safe (global_id ->> address_document_types::t_address_document).
1039
946
 
@@ -1114,7 +1021,7 @@ application actor loads libraries
1114
1021
  }
1115
1022
  if (data $delegation_cert) != NIL
1116
1023
  {
1117
- delegation_cert -> (data $delegation_cert) safe delegation_cert_t.
1024
+ delegation_cert -> (data $delegation_cert) safe a2a_protocol::delegation_cert_t.
1118
1025
  }
1119
1026
  if (data $root_ad) != NIL
1120
1027
  {
@@ -1122,11 +1029,11 @@ application actor loads libraries
1122
1029
  }
1123
1030
  if (data $root_profile) != NIL
1124
1031
  {
1125
- root_profile -> (data $root_profile) safe root_profile_t.
1032
+ root_profile -> (data $root_profile) safe a2a_protocol::root_profile_t.
1126
1033
  }
1127
1034
  if (data $contact_roots) != NIL
1128
1035
  {
1129
- contact_roots -> (data $contact_roots) safe (global_id ->> contact_root_t).
1036
+ contact_roots -> (data $contact_roots) safe (global_id ->> a2a_protocol::contact_root_t).
1130
1037
  }
1131
1038
 
1132
1039
  // Re-register every peer's keys so encrypted channels keep working after
@@ -1180,12 +1087,12 @@ application actor loads libraries
1180
1087
 
1181
1088
  // A delegated-role joiner carries its chain so I learn its root linkage
1182
1089
  // symmetrically; an invalid chain rejects the redemption outright.
1183
- joiner_root is contact_root_t+ = NIL.
1090
+ joiner_root is a2a_protocol::contact_root_t+ = NIL.
1184
1091
  if (args $joiner_cert) != NIL
1185
1092
  {
1186
- cert = (_read_or_abort ((args $joiner_cert) safe bin)) safe delegation_cert_t.
1187
- rp = (_read_or_abort ((args $joiner_root_profile) safe bin)) safe root_profile_t.
1188
- joiner_root -> verify_peer_delegation sender_id (_value_id joiner_ad) cert rp.
1093
+ cert = (_read_or_abort ((args $joiner_cert) safe bin)) safe a2a_protocol::delegation_cert_t.
1094
+ rp = (_read_or_abort ((args $joiner_root_profile) safe bin)) safe a2a_protocol::root_profile_t.
1095
+ joiner_root -> a2a_protocol::verify_peer_delegation sender_id (_value_id joiner_ad) cert rp.
1189
1096
  }
1190
1097
 
1191
1098
  contacts sender_id -> ($name -> contact_name, $container_id -> sender_id).
@@ -1263,7 +1170,7 @@ application actor loads libraries
1263
1170
  sender_id = current_transaction_info::get_external_envelope_or_abort() $from.
1264
1171
  abort "This identity does not accept local-contact-book introductions." when registrar_ad == NIL.
1265
1172
 
1266
- signed = (_read_or_abort intro_blob) safe signed_intro_t.
1173
+ signed = (_read_or_abort intro_blob) safe a2a_protocol::signed_intro_t.
1267
1174
  intro = signed $i.
1268
1175
  abort "Unsupported introduction credential version." when (intro $version) != 1.
1269
1176
  abort "Introduction credential was not signed by this host's registrar." when key_storage::check_signature_new_container (_value_id intro) (signed $s) (registrar_ad? $identity $key_list) != TRUE.
@@ -1356,7 +1263,7 @@ application actor loads libraries
1356
1263
  sender_id = current_transaction_info::get_external_envelope_or_abort() $from.
1357
1264
  now = (current_transaction_info::get_transaction_time())?.
1358
1265
 
1359
- link is contact_root_t+ = NIL.
1266
+ link is a2a_protocol::contact_root_t+ = NIL.
1360
1267
  if cert_blob == NIL
1361
1268
  {
1362
1269
  // Sender claims to be my root.
@@ -1366,7 +1273,7 @@ application actor loads libraries
1366
1273
  }
1367
1274
  else
1368
1275
  {
1369
- cert = (_read_or_abort cert_blob?) safe delegation_cert_t.
1276
+ cert = (_read_or_abort cert_blob?) safe a2a_protocol::delegation_cert_t.
1370
1277
  abort "Unsupported delegation certificate version." when (cert $c $version) != 1.
1371
1278
  abort "Sibling certificate was issued for a different sender." when (cert $c $role_cid) != sender_id.
1372
1279
  abort "Sibling certificate does not match the sender's address document." when (cert $c $role_ad_hash) != (_value_id joiner_ad).
@@ -1,20 +1,25 @@
1
1
  // a2adapt messenger packet — compile configuration.
2
2
  //
3
- // Pulls in the full ADAPT standard library so `actor.mu` can `loads libraries`
4
- // the crypto / identity / transport modules by name. No app-private libraries
5
- // (everything we need lives in the stdlib, including `encrypted_channel`, which
6
- // does the peer key-exchange for us).
3
+ // Pulls in the full ADAPT standard library plus the shared a2adapt mufl core
4
+ // (the a2adapt-mufl-core repo, checked out as the core/ subfolder) so
5
+ // `actor.mu` can `loads libraries` the crypto / identity / transport modules
6
+ // and the shared protocol libraries (`a2a_protocol`, `version`) by name.
7
7
  //
8
- // Compile:
9
- // MUFL_STDLIB_PATH=<adapt-toolkit>/mufl_stdlib \
10
- // mufl-compile -mp <adapt-toolkit>/meta -mp <adapt-toolkit>/transactions -d-c actor.mu
11
- // -> emits <content-hash>.muflo in the cwd.
8
+ // Compile: scripts/compile-mufl.sh (copies actor.mu, this file, and core/
9
+ // into a temp dir and runs mufl-compile there).
12
10
 
13
11
  config script
14
12
  {
13
+ stdlib_config = (config_load #$MUFL_STDLIB_PATH).
14
+ core_config = (config_load #"core").
15
+
15
16
  (
16
- $imports -> ((config_load #$MUFL_STDLIB_PATH) $exports),
17
- $exports -> (
17
+ $imports ->
18
+ (
19
+ $libraries -> (stdlib_config $exports $libraries)'(core_config $exports $libraries),
20
+ ),
21
+ $exports ->
22
+ (
18
23
  $libraries -> (,),
19
24
  $applications -> (,)
20
25
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adapt-toolkit/a2adapt",
3
- "version": "0.11.2",
3
+ "version": "0.11.3",
4
4
  "description": "MCP server daemon for a2adapt — one native ADAPT wrapper hosting N self-sovereign identities, exposing secure agent-to-agent messaging tools over HTTP (Streamable HTTP). Run `a2adapt-mcp start`.",
5
5
  "type": "module",
6
6
  "license": "MIT",