@adapt-toolkit/a2adapt 0.2.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/README.md +34 -0
- package/dist/hooks/runner.js +25 -0
- package/dist/index.js +21179 -0
- package/dist/mufl_code/actor.mu +24 -0
- package/dist/mufl_code/config.mufl +19 -0
- package/package.json +44 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// a2adapt messenger packet — application.
|
|
2
|
+
//
|
|
3
|
+
// SCAFFOLD STATUS (v0): placeholder. Implemented in workspace task "3. MUFL
|
|
4
|
+
// messenger packet", modeled on the reference messenger:
|
|
5
|
+
// /home/shakhvit/work/adapt/messenger-demo/mufl_code/actor.mu (full, 290 lines)
|
|
6
|
+
// /home/shakhvit/work/adapt/basic-messenger-demo/mufl_code/actor.mu (minimal)
|
|
7
|
+
//
|
|
8
|
+
// Simplified to 1:1 direct contacts (no chat groups) for v0.
|
|
9
|
+
//
|
|
10
|
+
// State to hold in the packet:
|
|
11
|
+
// - my identity (address_document, via key_storage / get_my_address_document())
|
|
12
|
+
// - contacts: container_id ->> ( $name, $address_document )
|
|
13
|
+
// - pending_invites: invite_id ->> ( $secret_key, $default_name )
|
|
14
|
+
// - inbox: received decrypted messages with sender attribution
|
|
15
|
+
//
|
|
16
|
+
// Crypto/identity stdlib to use (see /home/shakhvit/work/adapt/mufl3/mufl_stdlib):
|
|
17
|
+
// cryptography/key_storage.mm default_encrypt / default_sign / decrypt_message
|
|
18
|
+
// _crypto_construct_encryption_keypair, _crypto_encrypt_message, _crypto_decrypt_message
|
|
19
|
+
// cryptography/address_document.mm, address_document_types.mm
|
|
20
|
+
// transactions/transaction.mm transaction::encrypt, transaction::action::send
|
|
21
|
+
// mufl_stdlib/current_transaction_info.mm validate_origin_or_abort, is_encrypted, is_signed
|
|
22
|
+
//
|
|
23
|
+
// Named-invite UX: generate_invite embeds $default_name in the invite payload;
|
|
24
|
+
// add_contact uses a custom name if supplied, else the embedded default.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// a2adapt messenger packet — build configuration.
|
|
2
|
+
//
|
|
3
|
+
// Loads the ADAPT standard library and declares the application entry module
|
|
4
|
+
// (actor.mu) plus the exported user transactions that the MCP server invokes.
|
|
5
|
+
//
|
|
6
|
+
// SCAFFOLD STATUS (v0): placeholder. The real config + actor are written in
|
|
7
|
+
// workspace task "3. MUFL messenger packet", modeled on
|
|
8
|
+
// /home/shakhvit/work/adapt/messenger-demo/mufl_code/{config.mufl,actor.mu}.
|
|
9
|
+
//
|
|
10
|
+
// Expected exported transactions (each maps to one MCP tool):
|
|
11
|
+
// ::actor::generate_invite (name) -> invite blob
|
|
12
|
+
// ::actor::add_contact (invite, name?) -> contact registered
|
|
13
|
+
// ::actor::accept_contact (inbound) -> reciprocal registration (TOFU)
|
|
14
|
+
// ::actor::send_message (contact, text) -> encrypted send
|
|
15
|
+
// ::actor::receive_message (inbound) -> append to inbox
|
|
16
|
+
// ::actor::list_contacts () -> contacts
|
|
17
|
+
// ::actor::list_incoming_messages () -> inbox
|
|
18
|
+
//
|
|
19
|
+
// Compile (task 3): mufl-compile -f config.mufl -repo <out> -> <hash>.muflo
|
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@adapt-toolkit/a2adapt",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "MCP server for a2adapt — a native ADAPT node hosting one packet, exposing secure agent-to-agent messaging tools over stdio.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "Adapt Toolkit",
|
|
8
|
+
"homepage": "https://github.com/adapt-toolkit/a2adapt/tree/main/plugin#readme",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/adapt-toolkit/a2adapt.git",
|
|
12
|
+
"directory": "plugin"
|
|
13
|
+
},
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/adapt-toolkit/a2adapt/issues"
|
|
16
|
+
},
|
|
17
|
+
"keywords": ["mcp", "model-context-protocol", "claude", "a2a", "adapt", "e2e", "messaging"],
|
|
18
|
+
"bin": {
|
|
19
|
+
"a2adapt-mcp": "dist/index.js"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"dist",
|
|
23
|
+
"README.md"
|
|
24
|
+
],
|
|
25
|
+
"publishConfig": {
|
|
26
|
+
"access": "public"
|
|
27
|
+
},
|
|
28
|
+
"scripts": {
|
|
29
|
+
"build": "node build.mjs",
|
|
30
|
+
"build:tsc": "tsc -p tsconfig.json",
|
|
31
|
+
"dev": "tsx src/index.ts",
|
|
32
|
+
"start": "node dist/index.js",
|
|
33
|
+
"prepublishOnly": "node build.mjs",
|
|
34
|
+
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@modelcontextprotocol/sdk": "^1.0.4",
|
|
38
|
+
"@types/node": "^20.14.0",
|
|
39
|
+
"esbuild": "^0.24.2",
|
|
40
|
+
"tsx": "^4.19.0",
|
|
41
|
+
"typescript": "^5.5.4",
|
|
42
|
+
"zod": "^3.23.8"
|
|
43
|
+
}
|
|
44
|
+
}
|