@agentmesh-md/mcp-server 0.0.0-stage → 0.1.1
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/LICENSE +41 -0
- package/README.md +119 -2
- package/dist/agent-operating-contract.txt +120 -0
- package/dist/client.js +241 -0
- package/dist/config.js +189 -0
- package/dist/context.js +36 -0
- package/dist/contract.js +10 -0
- package/dist/errors.js +117 -0
- package/dist/http.js +460 -0
- package/dist/index.js +123 -0
- package/dist/logger.js +36 -0
- package/dist/redact.js +92 -0
- package/dist/schemas.js +381 -0
- package/dist/server.js +135 -0
- package/dist/session.js +43 -0
- package/dist/tools.js +424 -0
- package/dist/wake-monitor.js +111 -0
- package/dist/wake.js +601 -0
- package/package.json +45 -4
- package/schemas/defs.json +121 -0
- package/schemas/tools.json +208 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
{
|
|
2
|
+
"card": {
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"id": {"type": "string", "format": "uuid"},
|
|
6
|
+
"column_id": {"type": "string", "format": "uuid"},
|
|
7
|
+
"title": {"type": "string"},
|
|
8
|
+
"body_md": {"anyOf": [{"type": "string"}, {"type": "null"}]},
|
|
9
|
+
"status": {"type": "string", "enum": ["open", "claimed", "done"]},
|
|
10
|
+
"claimed_by": {"anyOf": [{"type": "string"}, {"type": "null"}]},
|
|
11
|
+
"claimed_by_kind": {
|
|
12
|
+
"anyOf": [
|
|
13
|
+
{"type": "string", "enum": ["human", "agent"]},
|
|
14
|
+
{"type": "null"}
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"position": {"type": "integer"},
|
|
18
|
+
"updated_by": {"type": "string"},
|
|
19
|
+
"updated_at": {"type": "string", "format": "date-time"}
|
|
20
|
+
},
|
|
21
|
+
"required": [
|
|
22
|
+
"id", "column_id", "title", "body_md", "status", "claimed_by",
|
|
23
|
+
"claimed_by_kind", "position", "updated_by", "updated_at"
|
|
24
|
+
],
|
|
25
|
+
"additionalProperties": false
|
|
26
|
+
},
|
|
27
|
+
"message": {
|
|
28
|
+
"type": "object",
|
|
29
|
+
"properties": {
|
|
30
|
+
"id": {"type": "string", "format": "uuid"},
|
|
31
|
+
"channel": {"type": "string"},
|
|
32
|
+
"author_kind": {"type": "string", "enum": ["human", "agent"]},
|
|
33
|
+
"author_id": {"type": "string"},
|
|
34
|
+
"body_md": {"type": "string"},
|
|
35
|
+
"created_at": {"type": "string", "format": "date-time"}
|
|
36
|
+
},
|
|
37
|
+
"required": ["id", "channel", "author_kind", "author_id", "body_md", "created_at"],
|
|
38
|
+
"additionalProperties": false
|
|
39
|
+
},
|
|
40
|
+
"conversation": {
|
|
41
|
+
"type": "object",
|
|
42
|
+
"properties": {
|
|
43
|
+
"id": {"type": "string", "format": "uuid"},
|
|
44
|
+
"participants": {"type": "array", "items": {"type": "object", "properties": {"kind": {"type": "string", "enum": ["human", "agent"]}, "id": {"type": "string", "minLength": 1}}, "required": ["kind", "id"], "additionalProperties": false}},
|
|
45
|
+
"created_at": {"type": "string", "format": "date-time"}
|
|
46
|
+
},
|
|
47
|
+
"required": ["id", "participants", "created_at"],
|
|
48
|
+
"additionalProperties": false
|
|
49
|
+
},
|
|
50
|
+
"conversation_message": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"properties": {
|
|
53
|
+
"id": {"type": "string", "format": "uuid"},
|
|
54
|
+
"conversation_id": {"type": "string", "format": "uuid"},
|
|
55
|
+
"author_kind": {"type": "string", "enum": ["human", "agent"]},
|
|
56
|
+
"author_id": {"type": "string", "minLength": 1},
|
|
57
|
+
"body_md": {"type": "string"},
|
|
58
|
+
"created_at": {"type": "string", "format": "date-time"}
|
|
59
|
+
},
|
|
60
|
+
"required": ["id", "conversation_id", "author_kind", "author_id", "body_md", "created_at"],
|
|
61
|
+
"additionalProperties": false
|
|
62
|
+
},
|
|
63
|
+
"channel": {
|
|
64
|
+
"type": "object",
|
|
65
|
+
"properties": {
|
|
66
|
+
"id": {"type": "string", "format": "uuid"},
|
|
67
|
+
"name": {"type": "string"},
|
|
68
|
+
"created_at": {"type": "string", "format": "date-time"},
|
|
69
|
+
"archived_at": {
|
|
70
|
+
"anyOf": [
|
|
71
|
+
{"type": "string", "format": "date-time"},
|
|
72
|
+
{"type": "null"}
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"required": ["id", "name", "created_at", "archived_at"],
|
|
77
|
+
"additionalProperties": false
|
|
78
|
+
},
|
|
79
|
+
"ask": {
|
|
80
|
+
"type": "object",
|
|
81
|
+
"properties": {
|
|
82
|
+
"id": {"type": "string", "format": "uuid"},
|
|
83
|
+
"text": {"type": "string"},
|
|
84
|
+
"state": {"type": "string", "enum": ["open", "claimed", "resolved", "expired"]},
|
|
85
|
+
"ttl_minutes": {
|
|
86
|
+
"anyOf": [
|
|
87
|
+
{"type": "integer", "minimum": 1, "maximum": 10080},
|
|
88
|
+
{"type": "null"}
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
"created_by_kind": {"type": "string", "enum": ["human", "agent"]},
|
|
92
|
+
"created_by_id": {"type": "string"},
|
|
93
|
+
"claimed_by_kind": {
|
|
94
|
+
"anyOf": [
|
|
95
|
+
{"type": "string", "enum": ["human", "agent"]},
|
|
96
|
+
{"type": "null"}
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
"claimed_by_id": {"anyOf": [{"type": "string"}, {"type": "null"}]},
|
|
100
|
+
"claimed_at": {
|
|
101
|
+
"anyOf": [
|
|
102
|
+
{"type": "string", "format": "date-time"},
|
|
103
|
+
{"type": "null"}
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
"resolved_note": {"anyOf": [{"type": "string"}, {"type": "null"}]},
|
|
107
|
+
"resolved_at": {
|
|
108
|
+
"anyOf": [
|
|
109
|
+
{"type": "string", "format": "date-time"},
|
|
110
|
+
{"type": "null"}
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
"created_at": {"type": "string", "format": "date-time"}
|
|
114
|
+
},
|
|
115
|
+
"required": [
|
|
116
|
+
"id", "text", "state", "ttl_minutes", "created_by_kind", "created_by_id",
|
|
117
|
+
"claimed_by_kind", "claimed_by_id", "claimed_at", "resolved_note", "resolved_at", "created_at"
|
|
118
|
+
],
|
|
119
|
+
"additionalProperties": false
|
|
120
|
+
}
|
|
121
|
+
}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
{
|
|
2
|
+
"read_board": {
|
|
3
|
+
"inputSchema": {"type": "object", "properties": {}, "required": [], "additionalProperties": false},
|
|
4
|
+
"outputSchema": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"board": {
|
|
8
|
+
"anyOf": [
|
|
9
|
+
{
|
|
10
|
+
"type": "object",
|
|
11
|
+
"properties": {
|
|
12
|
+
"id": {"type": "string", "format": "uuid"},
|
|
13
|
+
"name": {"type": "string"}
|
|
14
|
+
},
|
|
15
|
+
"required": ["id", "name"],
|
|
16
|
+
"additionalProperties": false
|
|
17
|
+
},
|
|
18
|
+
{"type": "null"}
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
"columns": {
|
|
22
|
+
"type": "array",
|
|
23
|
+
"items": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"properties": {
|
|
26
|
+
"id": {"type": "string", "format": "uuid"},
|
|
27
|
+
"name": {"type": "string"},
|
|
28
|
+
"position": {"type": "integer"},
|
|
29
|
+
"cards": {"type": "array", "items": {"$ref": "#/$defs/card"}}
|
|
30
|
+
},
|
|
31
|
+
"required": ["id", "name", "position", "cards"],
|
|
32
|
+
"additionalProperties": false
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"required": ["board", "columns"],
|
|
37
|
+
"additionalProperties": false
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"read_channels": {
|
|
41
|
+
"inputSchema": {"type": "object", "properties": {}, "required": [], "additionalProperties": false},
|
|
42
|
+
"outputSchema": {
|
|
43
|
+
"type": "object",
|
|
44
|
+
"properties": {
|
|
45
|
+
"channels": {"type": "array", "items": {"$ref": "#/$defs/channel"}}
|
|
46
|
+
},
|
|
47
|
+
"required": ["channels"],
|
|
48
|
+
"additionalProperties": false
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"read_messages": {
|
|
52
|
+
"inputSchema": {
|
|
53
|
+
"type": "object",
|
|
54
|
+
"properties": {
|
|
55
|
+
"channel": {"type": "string", "pattern": "\\S"},
|
|
56
|
+
"limit": {"type": "integer", "minimum": 1, "maximum": 200},
|
|
57
|
+
"before_id": {"type": "string", "format": "uuid"}
|
|
58
|
+
},
|
|
59
|
+
"required": [],
|
|
60
|
+
"additionalProperties": false
|
|
61
|
+
},
|
|
62
|
+
"outputSchema": {
|
|
63
|
+
"type": "object",
|
|
64
|
+
"properties": {
|
|
65
|
+
"messages": {"type": "array", "items": {"$ref": "#/$defs/message"}},
|
|
66
|
+
"next_before_id": {
|
|
67
|
+
"anyOf": [
|
|
68
|
+
{"type": "string", "format": "uuid"},
|
|
69
|
+
{"type": "null"}
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"required": ["messages", "next_before_id"],
|
|
74
|
+
"additionalProperties": false
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"list_asks": {
|
|
78
|
+
"inputSchema": {
|
|
79
|
+
"type": "object",
|
|
80
|
+
"properties": {
|
|
81
|
+
"state": {"type": "string", "enum": ["open", "claimed", "resolved", "expired"]}
|
|
82
|
+
},
|
|
83
|
+
"required": [],
|
|
84
|
+
"additionalProperties": false
|
|
85
|
+
},
|
|
86
|
+
"outputSchema": {
|
|
87
|
+
"type": "object",
|
|
88
|
+
"properties": {
|
|
89
|
+
"asks": {"type": "array", "items": {"$ref": "#/$defs/ask"}}
|
|
90
|
+
},
|
|
91
|
+
"required": ["asks"],
|
|
92
|
+
"additionalProperties": false
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"whoami": {
|
|
96
|
+
"inputSchema": {"type": "object", "properties": {}, "required": [], "additionalProperties": false},
|
|
97
|
+
"outputSchema": {
|
|
98
|
+
"type": "object",
|
|
99
|
+
"properties": {
|
|
100
|
+
"principal": {
|
|
101
|
+
"type": "object",
|
|
102
|
+
"properties": {
|
|
103
|
+
"kind": {"type": "string", "const": "agent"},
|
|
104
|
+
"id": {"type": "string", "format": "uuid"},
|
|
105
|
+
"name": {"type": "string"},
|
|
106
|
+
"workspace_id": {"type": "string", "format": "uuid"},
|
|
107
|
+
"scopes": {"type": "array", "items": {"type": "string"}}
|
|
108
|
+
},
|
|
109
|
+
"required": ["kind", "id", "name", "workspace_id", "scopes"],
|
|
110
|
+
"additionalProperties": false
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"required": ["principal"],
|
|
114
|
+
"additionalProperties": false
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"post_message": {
|
|
118
|
+
"inputSchema": {
|
|
119
|
+
"type": "object",
|
|
120
|
+
"properties": {
|
|
121
|
+
"body_md": {"type": "string", "minLength": 1, "maxLength": 8192},
|
|
122
|
+
"channel": {"type": "string", "pattern": "\\S"}
|
|
123
|
+
},
|
|
124
|
+
"required": ["body_md"],
|
|
125
|
+
"additionalProperties": false
|
|
126
|
+
},
|
|
127
|
+
"outputSchema": {
|
|
128
|
+
"type": "object",
|
|
129
|
+
"properties": {"message": {"$ref": "#/$defs/message"}},
|
|
130
|
+
"required": ["message"],
|
|
131
|
+
"additionalProperties": false
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"claim_card": {
|
|
135
|
+
"inputSchema": {
|
|
136
|
+
"type": "object",
|
|
137
|
+
"properties": {"card_id": {"type": "string", "format": "uuid"}},
|
|
138
|
+
"required": ["card_id"],
|
|
139
|
+
"additionalProperties": false
|
|
140
|
+
},
|
|
141
|
+
"outputSchema": {
|
|
142
|
+
"type": "object",
|
|
143
|
+
"properties": {"card": {"$ref": "#/$defs/card"}},
|
|
144
|
+
"required": ["card"],
|
|
145
|
+
"additionalProperties": false
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
"complete_card": {
|
|
149
|
+
"inputSchema": {
|
|
150
|
+
"type": "object",
|
|
151
|
+
"properties": {"card_id": {"type": "string", "format": "uuid"}},
|
|
152
|
+
"required": ["card_id"],
|
|
153
|
+
"additionalProperties": false
|
|
154
|
+
},
|
|
155
|
+
"outputSchema": {
|
|
156
|
+
"type": "object",
|
|
157
|
+
"properties": {"card": {"$ref": "#/$defs/card"}},
|
|
158
|
+
"required": ["card"],
|
|
159
|
+
"additionalProperties": false
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"create_card": {
|
|
163
|
+
"inputSchema": {
|
|
164
|
+
"type": "object",
|
|
165
|
+
"properties": {
|
|
166
|
+
"title": {"type": "string", "pattern": "\\S"},
|
|
167
|
+
"body_md": {"type": "string", "maxLength": 16384},
|
|
168
|
+
"column_id": {"type": "string", "format": "uuid"}
|
|
169
|
+
},
|
|
170
|
+
"required": ["title"],
|
|
171
|
+
"additionalProperties": false
|
|
172
|
+
},
|
|
173
|
+
"outputSchema": {
|
|
174
|
+
"type": "object",
|
|
175
|
+
"properties": {"card": {"$ref": "#/$defs/card"}},
|
|
176
|
+
"required": ["card"],
|
|
177
|
+
"additionalProperties": false
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
"read_roster": {
|
|
181
|
+
"inputSchema": {"type": "object", "properties": {}, "required": [], "additionalProperties": false},
|
|
182
|
+
"outputSchema": {
|
|
183
|
+
"type": "object",
|
|
184
|
+
"properties": {
|
|
185
|
+
"humans": {"type": "array", "items": {"type": "object", "properties": {"user_uid": {"type": "string", "minLength": 1}, "display_name": {"type": "string"}, "role": {"type": "string"}, "last_seen_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}]}, "avatar_id": {"anyOf": [{"type": "string", "format": "uuid"}, {"type": "null"}]}}, "required": ["user_uid", "display_name", "role", "last_seen_at", "avatar_id"], "additionalProperties": false}},
|
|
186
|
+
"agents": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "format": "uuid"}, "name": {"type": "string"}, "role": {"type": "string"}, "key_display": {"type": "string"}, "model": {"anyOf": [{"type": "string"}, {"type": "null"}]}, "last_seen_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}]}, "avatar_id": {"anyOf": [{"type": "string", "format": "uuid"}, {"type": "null"}]}, "assignable": {"type": "boolean"}}, "required": ["id", "name", "role", "key_display", "model", "last_seen_at", "avatar_id", "assignable"], "additionalProperties": false}}
|
|
187
|
+
},
|
|
188
|
+
"required": ["humans", "agents"],
|
|
189
|
+
"additionalProperties": false
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"list_conversations": {
|
|
193
|
+
"inputSchema": {"type": "object", "properties": {"limit": {"type": "integer", "minimum": 1, "maximum": 200}, "before_id": {"type": "string", "format": "uuid"}}, "required": [], "additionalProperties": false},
|
|
194
|
+
"outputSchema": {"type": "object", "properties": {"conversations": {"type": "array", "items": {"$ref": "#/$defs/conversation"}}, "next_before_id": {"anyOf": [{"type": "string", "format": "uuid"}, {"type": "null"}]}}, "required": ["conversations", "next_before_id"], "additionalProperties": false}
|
|
195
|
+
},
|
|
196
|
+
"create_conversation": {
|
|
197
|
+
"inputSchema": {"type": "object", "properties": {"participants": {"type": "array", "items": {"type": "object", "properties": {"kind": {"type": "string", "enum": ["human", "agent"]}, "id": {"type": "string", "minLength": 1}}, "required": ["kind", "id"], "additionalProperties": false}}}, "required": ["participants"], "additionalProperties": false},
|
|
198
|
+
"outputSchema": {"type": "object", "properties": {"conversation": {"$ref": "#/$defs/conversation"}}, "required": ["conversation"], "additionalProperties": false}
|
|
199
|
+
},
|
|
200
|
+
"read_conversation_messages": {
|
|
201
|
+
"inputSchema": {"type": "object", "properties": {"conversation_id": {"type": "string", "format": "uuid"}, "limit": {"type": "integer", "minimum": 1, "maximum": 200}, "before_id": {"type": "string", "format": "uuid"}}, "required": ["conversation_id"], "additionalProperties": false},
|
|
202
|
+
"outputSchema": {"type": "object", "properties": {"messages": {"type": "array", "items": {"$ref": "#/$defs/conversation_message"}}, "next_before_id": {"anyOf": [{"type": "string", "format": "uuid"}, {"type": "null"}]}}, "required": ["messages", "next_before_id"], "additionalProperties": false}
|
|
203
|
+
},
|
|
204
|
+
"post_conversation_message": {
|
|
205
|
+
"inputSchema": {"type": "object", "properties": {"conversation_id": {"type": "string", "format": "uuid"}, "body_md": {"type": "string", "minLength": 1, "maxLength": 8192}}, "required": ["conversation_id", "body_md"], "additionalProperties": false},
|
|
206
|
+
"outputSchema": {"type": "object", "properties": {"message": {"$ref": "#/$defs/conversation_message"}}, "required": ["message"], "additionalProperties": false}
|
|
207
|
+
}
|
|
208
|
+
}
|