inter-agent-core 0.2.0__py3-none-any.whl
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.
- inter_agent/__init__.py +0 -0
- inter_agent/core/__init__.py +1 -0
- inter_agent/core/adapter_control.py +350 -0
- inter_agent/core/auth.py +279 -0
- inter_agent/core/channels.py +131 -0
- inter_agent/core/client.py +345 -0
- inter_agent/core/config.py +325 -0
- inter_agent/core/errors.py +31 -0
- inter_agent/core/kick.py +111 -0
- inter_agent/core/list.py +127 -0
- inter_agent/core/publish.py +146 -0
- inter_agent/core/router.py +8 -0
- inter_agent/core/send.py +265 -0
- inter_agent/core/server.py +765 -0
- inter_agent/core/shared.py +182 -0
- inter_agent/core/shutdown.py +92 -0
- inter_agent/core/status.py +291 -0
- inter_agent/core/tls.py +141 -0
- inter_agent/core/transport.py +37 -0
- inter_agent/py.typed +0 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/asyncapi.yaml +225 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/error-codes.md +28 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/auth_challenge.json +6 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/auth_response.json +4 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/broadcast.json +4 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/bye.json +3 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/channels.json +3 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/channels_ok.json +9 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/custom.unknown-pass-through.json +9 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/error.auth-failed.json +5 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/hello.agent-with-label.json +14 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/hello.agent.json +13 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/kick.json +4 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/kick_ok.json +5 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/list.json +3 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/list_ok.json +10 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/msg.custom.json +13 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/msg.text.json +9 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/ping.json +3 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/pong.json +3 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/publish.json +5 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/send.direct.json +5 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/shutdown.json +3 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/shutdown_ok.json +3 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/subscribe.json +4 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/subscribe_ok.json +4 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/unsubscribe.json +4 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/unsubscribe_ok.json +4 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/welcome.json +10 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/auth_challenge.json +13 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/auth_response.json +11 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/broadcast.json +18 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/bye.json +10 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/channels.json +10 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/channels_ok.json +26 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/custom.json +22 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/error.json +37 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/hello.json +59 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/kick.json +13 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/kick_ok.json +12 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/list.json +10 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/list_ok.json +24 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/msg.json +29 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/ping.json +10 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/pong.json +10 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/publish.json +23 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/send.json +22 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/shutdown.json +10 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/shutdown_ok.json +10 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/subscribe.json +15 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/subscribe_ok.json +11 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/unsubscribe.json +15 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/unsubscribe_ok.json +11 -0
- inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/welcome.json +36 -0
- inter_agent_core-0.2.0.dist-info/METADATA +85 -0
- inter_agent_core-0.2.0.dist-info/RECORD +80 -0
- inter_agent_core-0.2.0.dist-info/WHEEL +5 -0
- inter_agent_core-0.2.0.dist-info/entry_points.txt +10 -0
- inter_agent_core-0.2.0.dist-info/licenses/LICENSE.md +21 -0
- inter_agent_core-0.2.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "Error",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["op", "code", "message"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"op": { "const": "error" },
|
|
8
|
+
"code": {
|
|
9
|
+
"enum": [
|
|
10
|
+
"PROTOCOL_ERROR",
|
|
11
|
+
"AUTH_FAILED",
|
|
12
|
+
"TOO_MANY_CONNECTIONS",
|
|
13
|
+
"BAD_ROLE",
|
|
14
|
+
"BAD_SESSION",
|
|
15
|
+
"SESSION_TAKEN",
|
|
16
|
+
"BAD_NAME",
|
|
17
|
+
"BAD_LABEL",
|
|
18
|
+
"NAME_TAKEN",
|
|
19
|
+
"UNKNOWN_OP",
|
|
20
|
+
"BAD_TEXT",
|
|
21
|
+
"BAD_FROM_NAME",
|
|
22
|
+
"BAD_CUSTOM_TYPE",
|
|
23
|
+
"TEXT_TOO_LARGE",
|
|
24
|
+
"CUSTOM_PAYLOAD_TOO_LARGE",
|
|
25
|
+
"UNKNOWN_TARGET",
|
|
26
|
+
"AMBIGUOUS_TARGET",
|
|
27
|
+
"BAD_CHANNEL",
|
|
28
|
+
"CHANNEL_LIMIT_REACHED",
|
|
29
|
+
"NOT_SUBSCRIBED",
|
|
30
|
+
"UNKNOWN_CHANNEL",
|
|
31
|
+
"KICKED"
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
"message": { "type": "string" }
|
|
35
|
+
},
|
|
36
|
+
"additionalProperties": true
|
|
37
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "Hello",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["op", "auth", "role", "session_id", "capabilities"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"op": { "const": "hello" },
|
|
8
|
+
"auth": {
|
|
9
|
+
"type": "object",
|
|
10
|
+
"required": ["method", "client_nonce"],
|
|
11
|
+
"properties": {
|
|
12
|
+
"method": { "const": "hmac-sha256" },
|
|
13
|
+
"client_nonce": { "type": "string", "minLength": 1 }
|
|
14
|
+
},
|
|
15
|
+
"additionalProperties": false
|
|
16
|
+
},
|
|
17
|
+
"role": { "enum": ["agent", "control"] },
|
|
18
|
+
"session_id": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"minLength": 1,
|
|
21
|
+
"description": "Client session identifier. Active session IDs must be unique; duplicates are rejected."
|
|
22
|
+
},
|
|
23
|
+
"name": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"description": "Agent routing name, or optional control-connection display name."
|
|
26
|
+
},
|
|
27
|
+
"label": { "type": ["string", "null"] },
|
|
28
|
+
"capabilities": {
|
|
29
|
+
"type": "object",
|
|
30
|
+
"description": "Client-declared capabilities. Unknown keys are extension declarations and may be ignored by the server.",
|
|
31
|
+
"properties": {
|
|
32
|
+
"core": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"properties": {
|
|
35
|
+
"version": { "type": "string" }
|
|
36
|
+
},
|
|
37
|
+
"additionalProperties": true
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"additionalProperties": true
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"allOf": [
|
|
44
|
+
{
|
|
45
|
+
"if": { "properties": { "role": { "const": "agent" } } },
|
|
46
|
+
"then": {
|
|
47
|
+
"required": ["name"],
|
|
48
|
+
"properties": {
|
|
49
|
+
"name": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"pattern": "^[a-z0-9][a-z0-9-]{0,39}$",
|
|
52
|
+
"description": "Unique routing name for an agent session."
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"additionalProperties": true
|
|
59
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "Kick",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["op"],
|
|
6
|
+
"anyOf": [{ "required": ["name"] }, { "required": ["session_id"] }],
|
|
7
|
+
"properties": {
|
|
8
|
+
"op": { "const": "kick" },
|
|
9
|
+
"name": { "type": "string", "minLength": 1 },
|
|
10
|
+
"session_id": { "type": "string", "minLength": 1 }
|
|
11
|
+
},
|
|
12
|
+
"additionalProperties": true
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "KickOk",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["op", "name", "session_id"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"op": { "const": "kick_ok" },
|
|
8
|
+
"name": { "type": "string", "minLength": 1 },
|
|
9
|
+
"session_id": { "type": "string", "minLength": 1 }
|
|
10
|
+
},
|
|
11
|
+
"additionalProperties": true
|
|
12
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "ListOk",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["op", "sessions"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"op": { "const": "list_ok" },
|
|
8
|
+
"sessions": {
|
|
9
|
+
"type": "array",
|
|
10
|
+
"description": "Connected agent sessions sorted by routing name. Control sessions are excluded.",
|
|
11
|
+
"items": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"required": ["session_id", "name", "label"],
|
|
14
|
+
"properties": {
|
|
15
|
+
"session_id": { "type": "string", "description": "Stable session identifier from hello." },
|
|
16
|
+
"name": { "type": "string", "description": "Routing name used for direct targets." },
|
|
17
|
+
"label": { "type": ["string", "null"], "description": "Optional display-only label." }
|
|
18
|
+
},
|
|
19
|
+
"additionalProperties": true
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"additionalProperties": true
|
|
24
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "Msg",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["op", "msg_id", "from", "from_name", "ts"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"op": { "const": "msg" },
|
|
8
|
+
"msg_id": { "type": "string" },
|
|
9
|
+
"from": { "type": "string" },
|
|
10
|
+
"from_name": { "type": "string" },
|
|
11
|
+
"to": { "type": ["string", "null"] },
|
|
12
|
+
"channel": { "type": "string" },
|
|
13
|
+
"text": { "type": "string" },
|
|
14
|
+
"ts": { "type": "string" },
|
|
15
|
+
"custom_type": { "type": "string", "minLength": 1 },
|
|
16
|
+
"payload": {}
|
|
17
|
+
},
|
|
18
|
+
"oneOf": [
|
|
19
|
+
{
|
|
20
|
+
"required": ["text"],
|
|
21
|
+
"description": "Direct, broadcast, or channel text message."
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"required": ["custom_type", "payload"],
|
|
25
|
+
"description": "Custom pass-through message. Custom messages do not include text."
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"additionalProperties": true
|
|
29
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "Publish",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["op", "channel", "text"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"op": { "const": "publish" },
|
|
8
|
+
"channel": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"pattern": "^[a-z0-9][a-z0-9-]{0,39}$",
|
|
11
|
+
"description": "Channel name. The server also applies INTER_AGENT_CHANNEL_NAME_MAX as a UTF-8 byte limit."
|
|
12
|
+
},
|
|
13
|
+
"text": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "Publish message text. The server accepts UTF-8 encoded text bytes up to INTER_AGENT_BROADCAST_MAX."
|
|
16
|
+
},
|
|
17
|
+
"from_name": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "Optional display name for delivered messages; defaults to the sender routing name."
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"additionalProperties": true
|
|
23
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "Send",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["op", "to", "text"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"op": { "const": "send" },
|
|
8
|
+
"to": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "Target routing name or unambiguous routing-name prefix. Exact names are resolved before prefixes."
|
|
11
|
+
},
|
|
12
|
+
"text": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "Direct message text. The server accepts UTF-8 encoded text bytes up to INTER_AGENT_DIRECT_MAX."
|
|
15
|
+
},
|
|
16
|
+
"from_name": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "Optional display name for the delivered message; defaults to the sender routing name."
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"additionalProperties": true
|
|
22
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "Subscribe",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["op", "channel"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"op": { "const": "subscribe" },
|
|
8
|
+
"channel": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"pattern": "^[a-z0-9][a-z0-9-]{0,39}$",
|
|
11
|
+
"description": "Channel name. The server also applies INTER_AGENT_CHANNEL_NAME_MAX as a UTF-8 byte limit."
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"additionalProperties": true
|
|
15
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "SubscribeOk",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["op", "channel"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"op": { "const": "subscribe_ok" },
|
|
8
|
+
"channel": { "type": "string" }
|
|
9
|
+
},
|
|
10
|
+
"additionalProperties": true
|
|
11
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "Unsubscribe",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["op", "channel"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"op": { "const": "unsubscribe" },
|
|
8
|
+
"channel": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"pattern": "^[a-z0-9][a-z0-9-]{0,39}$",
|
|
11
|
+
"description": "Channel name. The server also applies INTER_AGENT_CHANNEL_NAME_MAX as a UTF-8 byte limit."
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"additionalProperties": true
|
|
15
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "UnsubscribeOk",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["op", "channel"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"op": { "const": "unsubscribe_ok" },
|
|
8
|
+
"channel": { "type": "string" }
|
|
9
|
+
},
|
|
10
|
+
"additionalProperties": true
|
|
11
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "Welcome",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["op", "session_id", "assigned_name", "capabilities"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"op": { "const": "welcome" },
|
|
8
|
+
"session_id": { "type": "string" },
|
|
9
|
+
"assigned_name": { "type": "string" },
|
|
10
|
+
"capabilities": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"description": "Server-supported capabilities. Unknown keys are extension declarations.",
|
|
13
|
+
"required": ["core", "channels", "rate_limit"],
|
|
14
|
+
"properties": {
|
|
15
|
+
"core": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"required": ["version"],
|
|
18
|
+
"properties": {
|
|
19
|
+
"version": { "const": "0.1" }
|
|
20
|
+
},
|
|
21
|
+
"additionalProperties": true
|
|
22
|
+
},
|
|
23
|
+
"channels": {
|
|
24
|
+
"const": true,
|
|
25
|
+
"description": "Channel routing is supported by the baseline server."
|
|
26
|
+
},
|
|
27
|
+
"rate_limit": {
|
|
28
|
+
"const": false,
|
|
29
|
+
"description": "Rate-limit negotiation is not supported by the baseline server."
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"additionalProperties": true
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"additionalProperties": true
|
|
36
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: inter-agent-core
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Local authenticated message bus runtime and command-line tools
|
|
5
|
+
Author-email: Nicholas Moen <arcanemachine@gmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/arcanemachine/inter-agent-core
|
|
8
|
+
Project-URL: Repository, https://github.com/arcanemachine/inter-agent-core
|
|
9
|
+
Project-URL: Issues, https://github.com/arcanemachine/inter-agent-core/issues
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Topic :: Communications
|
|
17
|
+
Requires-Python: >=3.10
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
License-File: LICENSE.md
|
|
20
|
+
Requires-Dist: cryptography==46.0.3
|
|
21
|
+
Requires-Dist: websockets==16.0
|
|
22
|
+
Dynamic: license-file
|
|
23
|
+
|
|
24
|
+
# inter-agent-core
|
|
25
|
+
|
|
26
|
+
This project provides a way for agentic applications (e.g. coding harnesses) to talk to each other.
|
|
27
|
+
|
|
28
|
+
`inter-agent-core` is a host-neutral Python runtime for a local, authenticated message bus. It provides the server, generic clients and commands, protocol contract, shared endpoint/secret state, routing, TLS, and lifecycle controls used by host extensions.
|
|
29
|
+
|
|
30
|
+
Pi and Claude Code integrations are separate repositories:
|
|
31
|
+
|
|
32
|
+
- [inter-agent-pi](https://github.com/arcanemachine/inter-agent-pi)
|
|
33
|
+
- [inter-agent-claude-code](https://github.com/arcanemachine/inter-agent-claude-code)
|
|
34
|
+
|
|
35
|
+
## Source checkout quick start
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
git clone https://github.com/arcanemachine/inter-agent-core.git
|
|
39
|
+
cd inter-agent-core
|
|
40
|
+
uv sync --locked
|
|
41
|
+
uv run inter-agent-server
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
In another terminal, inspect the local bus:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
uv run inter-agent-status
|
|
48
|
+
uv run inter-agent-list
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
The default endpoint is `127.0.0.1:16837`. Local clients share endpoint and secret discovery through the same configuration/state rules. Use `inter-agent-shutdown` only when you intend to stop the shared server; it affects every connected client.
|
|
52
|
+
|
|
53
|
+
## Generic commands
|
|
54
|
+
|
|
55
|
+
```text
|
|
56
|
+
inter-agent-server
|
|
57
|
+
inter-agent-connect
|
|
58
|
+
inter-agent-send
|
|
59
|
+
inter-agent-list
|
|
60
|
+
inter-agent-status
|
|
61
|
+
inter-agent-shutdown
|
|
62
|
+
inter-agent-kick
|
|
63
|
+
inter-agent-publish
|
|
64
|
+
inter-agent-channels
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Use `--help` on a command for its options. Host-specific setup and session UX belong to the extension repositories.
|
|
68
|
+
|
|
69
|
+
## Security
|
|
70
|
+
|
|
71
|
+
The default design is one user on one machine. Connections authenticate with a shared secret. Loopback connections default to plaintext WebSockets; non-loopback connections default to TLS. TLS encrypts transport but does not protect against hostile code running as the same operating-system user.
|
|
72
|
+
|
|
73
|
+
See [SECURITY.md](SECURITY.md) for the full model and [ARCHITECTURE.md](ARCHITECTURE.md) for protocol/runtime details.
|
|
74
|
+
|
|
75
|
+
## Development
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
./run-checks.sh
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Protocol schemas, examples, and canonical error codes are in [spec/](spec/).
|
|
82
|
+
|
|
83
|
+
## License
|
|
84
|
+
|
|
85
|
+
MIT
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
inter_agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
inter_agent/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
inter_agent/core/__init__.py,sha256=KMUaEbIdquwzf3jT5JQ-N8TRoFmcU3aJMPR_AkVq9tM,36
|
|
4
|
+
inter_agent/core/adapter_control.py,sha256=N4Y2m8CrzYmvcxTnT9VP-TOBm138b1hmr-Wv1Rt9hOI,13404
|
|
5
|
+
inter_agent/core/auth.py,sha256=O21wx2qNwvKGTQnxDYwdRPSB7l824qCH07HEi2AsDhc,7320
|
|
6
|
+
inter_agent/core/channels.py,sha256=NP4LXKgZTx_-KWcF0MezD37NHf-X35IGrCem6G9tTtk,4516
|
|
7
|
+
inter_agent/core/client.py,sha256=VMqWsGUIVaQWN3XJgbGsG0pzGGRtZUlm-CpFRxqz0sQ,11738
|
|
8
|
+
inter_agent/core/config.py,sha256=hiO2GP68Wx6pLKLxziFf70hSs1Oe_leAtvh3rKbd-e4,10152
|
|
9
|
+
inter_agent/core/errors.py,sha256=Y2uV8_2evpAlm5kzQYBluiImelSoL1uoqXyF7btplH4,952
|
|
10
|
+
inter_agent/core/kick.py,sha256=LRwqsYdycD9Oe4J7bzKmqyOEcJsQpVQne4E1lqBXWUE,3732
|
|
11
|
+
inter_agent/core/list.py,sha256=7JkH5mD1IESKTItMYmIfChsQGRXKHXjV6csofh_wsEc,4198
|
|
12
|
+
inter_agent/core/publish.py,sha256=ZujwfKwh_XwQ-qA0xRQjc95vPUHTk3TFnbqXOYkIR4o,4901
|
|
13
|
+
inter_agent/core/router.py,sha256=EP-X5TfCQTH8vIFTPVcqU4WRocsXhTBehowyjNC_8YI,239
|
|
14
|
+
inter_agent/core/send.py,sha256=F4U4Iy2VGL1Spa5Vz08pb9KJn0gBR8XfbgX1B7FM02k,7981
|
|
15
|
+
inter_agent/core/server.py,sha256=_q-XvqSkGwDtOAMIMaJAZTBXR4j2QnFguYISo8ktODA,31424
|
|
16
|
+
inter_agent/core/shared.py,sha256=MD97QyhfCU-ODKg5-bPc4giXBhVYtIogeKgloZY3gaU,5280
|
|
17
|
+
inter_agent/core/shutdown.py,sha256=fxLnmm08TtIVtV9jpS_u3LexbkSubrhCA7WxUP-sSkw,3051
|
|
18
|
+
inter_agent/core/status.py,sha256=jQVZq6DIx6pBFxuEonr7Ofy3grxWRP8AnjWcZMx3x_g,8957
|
|
19
|
+
inter_agent/core/tls.py,sha256=NTXF9O3VEFovB3tdOFlFSRKBJlt9CzWozMzxPyuFK8w,4593
|
|
20
|
+
inter_agent/core/transport.py,sha256=8Hbw8cFM1ZQvgzN7epzg6zh-c5BN4Mi1USGOH0ctfns,1139
|
|
21
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/asyncapi.yaml,sha256=INIjwH4tlBc5yg-DelHu-1lQ2IdhSfB3rvzQTQTKShU,6806
|
|
22
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/error-codes.md,sha256=pcvce9F9DpdaqsI0u-PM98VsJXtgkPR2FI6HW5OLFbI,4297
|
|
23
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/auth_challenge.json,sha256=UKPDs95a1cuYp9Pt4VAU2hhFtbUxxQUBNaW8GFMOG2o,128
|
|
24
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/auth_response.json,sha256=S5XMpYAaBrMR07QPYy35vlJt9048noI97DuVXl_184U,66
|
|
25
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/broadcast.json,sha256=V8XQY3oncS-_zWsYr6rUAUxnMhbr7it_qCeYkK3MrgY,52
|
|
26
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/bye.json,sha256=2xLd8J3AFld6zE_wKMKLnPEb_Wr6ffJCGwt6Rkmcu38,18
|
|
27
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/channels.json,sha256=DwDXCdazvW9DXNdLLmR5809tNlcQPCwbn__fZV3izFc,23
|
|
28
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/channels_ok.json,sha256=sbZ0lhQtrhu6fUX7vmIIwdfdVuX9qpvUx8k3EHUpt9M,126
|
|
29
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/custom.unknown-pass-through.json,sha256=w4k28IlQulsRkqx8MxwHrrdL9l6cvOvg7DGVT3kfKes,128
|
|
30
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/error.auth-failed.json,sha256=4P4wbba-8W10wMMuSKJaWT0fwERFZk8VmO7FOr--Zik,74
|
|
31
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/hello.agent-with-label.json,sha256=2n5Fdh68Pz0p0YhFMsQ0NEcRQVXpcnO91w8hUvuV25U,245
|
|
32
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/hello.agent.json,sha256=7VjSbqPvTVd-fugN_gTDYbnO1d-x6Ropzv4eEnQvFK0,223
|
|
33
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/kick.json,sha256=JHsjSTNvV6gxY_atMVqzdnCd02ZuyquuhCOz8whjC8s,40
|
|
34
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/kick_ok.json,sha256=Lcm3KldR7BrV3-Yv-HVtIhanQdMatpf9IOB9258BHUE,69
|
|
35
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/list.json,sha256=sbP1-Pbo4LzgzvFGwlzfq9fVJtmzV9-HjhECY2nV4Ss,19
|
|
36
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/list_ok.json,sha256=ERjZddSvuyllJgzr_2pW6cq6VJcO_YO7NmcZFJ93tis,135
|
|
37
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/msg.custom.json,sha256=TWEAfvW6sk0T0Y0tNON_-qOD6udIPiBILtb_WIVbap0,229
|
|
38
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/msg.text.json,sha256=nxUohKBeoHJ-ipVS9Da4CenqV5-MC-0-Btb0FiYLHuw,164
|
|
39
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/ping.json,sha256=S3eDfv1DMfxubblFBaxhzgD5m_qWDt51lS2BMxHkYtI,19
|
|
40
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/pong.json,sha256=GNQPqihN5x3WGEdvdWIoLzMJFk-KFJy1u9aZYzrTyCw,19
|
|
41
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/publish.json,sha256=ifzG266iHOq3-UKd7MWVlSxpcDuhwTZi1FJZyu8WB4Y,63
|
|
42
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/send.direct.json,sha256=b_aOe2syP8jI-eR7nGpmxUje6DpGiiHj2qxn5xwJ0SQ,61
|
|
43
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/shutdown.json,sha256=07_mOtokngmhVValC3g7pVayR3ikHnjDI8tEv5pLik8,23
|
|
44
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/shutdown_ok.json,sha256=u4RvNzIhvu7VJ_tV1xT1vxs3ONxYMotpuf9MghhNkRo,26
|
|
45
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/subscribe.json,sha256=AZLjH0owk94f-UpIGmGJ30_k16HUXtXUozHTc-up1Lo,46
|
|
46
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/subscribe_ok.json,sha256=25w7B2i3y9_GYWpGp_v3iuAAsmeKWDb0dnluWxfNlm8,49
|
|
47
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/unsubscribe.json,sha256=K2w_KXk1eM3GDsVzFLDaoa4hzyFpi1CuYY9gZk_yISo,48
|
|
48
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/unsubscribe_ok.json,sha256=eP10Afr09saBn8iElVUl_VI6YnRXOxFCYKdRAmU2Mwo,51
|
|
49
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/examples/welcome.json,sha256=0XRhSxXB7DNO9fgIZsStcUsTVLlurF7nf8Poi6RpFYE,181
|
|
50
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/auth_challenge.json,sha256=xT-hG1DSeo8Y5Fw27-aCOBEJiB2s07Y2u79SVMX3z_A,429
|
|
51
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/auth_response.json,sha256=RS1ocFBN6CR-EOnvRJPKHKGL7fHMWEWqKdfGfYlDT1s,301
|
|
52
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/broadcast.json,sha256=l91iRkw0xg_mdhQtfans7MotOJdXkVfub4wq-PLKEqo,553
|
|
53
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/bye.json,sha256=4GVveCFCUP9p_l0BdyFd81EtJM41FEUWE_6fINnHH9Y,208
|
|
54
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/channels.json,sha256=1JdAbVPaCiuwbNojysHYqxzY0vNeGnKRQ2XBEXVbP70,218
|
|
55
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/channels_ok.json,sha256=3nZyG5iAwlE4cIvPvQbQIcejlaDLJK5EiHdSTkl09Io,773
|
|
56
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/custom.json,sha256=HXLPdyIZOH8fKQNkQjjRiAFRcdAE-xujP1ClWlOnUhs,798
|
|
57
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/error.json,sha256=_u7EqpyBOJbSvQA8wsUqZ-0xkk4I2bu54LCu_wVWUR0,861
|
|
58
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/hello.json,sha256=UDaZHs_Vdis2sfN7n0SlLhIgjghTUIk_RgS_mf5urF8,1722
|
|
59
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/kick.json,sha256=6gRKIR5e5tNgReVGKXxJzsyEQgPx3p62gU93nMrPK9c,387
|
|
60
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/kick_ok.json,sha256=kfnoTIvAS_J3bMVMhKzaTQFEHbdwgrKgCWBksBAtpoE,343
|
|
61
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/list.json,sha256=XxN18-eNUF7nONbECKHxmgutXtw7raAvgHIIIZc-8lU,210
|
|
62
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/list_ok.json,sha256=kzQbpdyd_3zztvnyWO2-3eZrEFE_Zuj80IRrr4nfkPI,850
|
|
63
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/msg.json,sha256=JGjAsKqKGSTY8-HcdMl8sVrOt_g3GmqDaIjZfRTzwH8,848
|
|
64
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/ping.json,sha256=CO_CCTSam0ssFO3vOlHEku96_994rhHDfPObuzLzyr8,210
|
|
65
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/pong.json,sha256=fe-Im4KgBJd3DdWJRCL4022oHokilQ-QBoQMNUp2PZo,210
|
|
66
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/publish.json,sha256=EfncvJ-nk_kfELe7F6uNk_s7PTrwddlghUq8ksAQTE0,765
|
|
67
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/send.json,sha256=X090gEP45WRDvWXHPT-6igMko629BDCD2xeXE6i8wJg,710
|
|
68
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/shutdown.json,sha256=Q3p4IP2nU5uLrjnFPKT3QFC6KcjkDymaIzwydDnrxKs,218
|
|
69
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/shutdown_ok.json,sha256=mrVxgReEUWQw-rYnPZgIPtNfD5zrJg_Z1VSO5jNLdJY,223
|
|
70
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/subscribe.json,sha256=ryc9AzEuYqUcOboCmIYvt_9KASZAo_lXoW1tK-NOi3c,438
|
|
71
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/subscribe_ok.json,sha256=PJw6CeeCpfIelJQ1CrUNVyWht3zkkIo8x6_x3ifimdc,273
|
|
72
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/unsubscribe.json,sha256=BBvZJvAQOJ6exy1MUqAN30p10zpV4x2uVwsCPVQ174Y,442
|
|
73
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/unsubscribe_ok.json,sha256=If3RRfmDRaMnM227Shf-k1lcEAYqSlZBZK6UVIjQOws,277
|
|
74
|
+
inter_agent_core-0.2.0.data/data/share/inter-agent/spec/schemas/welcome.json,sha256=QFrvX3xFMZHgC0QRBCwsO8aiI8V29YerxpVWwLbXfC8,1116
|
|
75
|
+
inter_agent_core-0.2.0.dist-info/licenses/LICENSE.md,sha256=aqHfYBB0gyveY8spkKtDwaOHCO9OTEC0kfXjL2TDOZ8,1070
|
|
76
|
+
inter_agent_core-0.2.0.dist-info/METADATA,sha256=C5UT77ejLOujGR0Vykq8oa6jkejlXMYg7auBYgXqVlo,2955
|
|
77
|
+
inter_agent_core-0.2.0.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
|
|
78
|
+
inter_agent_core-0.2.0.dist-info/entry_points.txt,sha256=OaMZNadi7xZAjS7X-TXxCHZsvNth7W5g46Fl12EHaZY,467
|
|
79
|
+
inter_agent_core-0.2.0.dist-info/top_level.txt,sha256=2AcrKG-KLrjZIx3IXfsMqmU7mrv3Vf1OxYV71zrQjSM,12
|
|
80
|
+
inter_agent_core-0.2.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
[console_scripts]
|
|
2
|
+
inter-agent-channels = inter_agent.core.channels:main
|
|
3
|
+
inter-agent-connect = inter_agent.core.client:main
|
|
4
|
+
inter-agent-kick = inter_agent.core.kick:main
|
|
5
|
+
inter-agent-list = inter_agent.core.list:main
|
|
6
|
+
inter-agent-publish = inter_agent.core.publish:main
|
|
7
|
+
inter-agent-send = inter_agent.core.send:main
|
|
8
|
+
inter-agent-server = inter_agent.core.server:main
|
|
9
|
+
inter-agent-shutdown = inter_agent.core.shutdown:main
|
|
10
|
+
inter-agent-status = inter_agent.core.status:main
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 arcanemachine
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
inter_agent
|