@agentmc/api 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 +21 -0
- package/README.md +197 -0
- package/bin/agentmc-api.mjs +8 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.js +6617 -0
- package/dist/cli.js.map +1 -0
- package/dist/generated/operations.d.ts +5039 -0
- package/dist/generated/operations.js +6366 -0
- package/dist/generated/operations.js.map +1 -0
- package/dist/index.d.ts +10618 -0
- package/dist/index.js +6517 -0
- package/dist/index.js.map +1 -0
- package/docs/operations/README.md +50 -0
- package/docs/operations/agentConnectedInstructions.md +127 -0
- package/docs/operations/agentHeartbeat.md +266 -0
- package/docs/operations/authenticateAgentRealtimeSocket.md +176 -0
- package/docs/operations/claimAgentRealtimeSession.md +168 -0
- package/docs/operations/closeAgentRealtimeSession.md +201 -0
- package/docs/operations/commentWorkspaceCalendarItem.md +163 -0
- package/docs/operations/connectAgent.md +199 -0
- package/docs/operations/createAgentBrief.md +215 -0
- package/docs/operations/createAgentRealtimeSignal.md +224 -0
- package/docs/operations/createBoard.md +160 -0
- package/docs/operations/createBoardColumn.md +163 -0
- package/docs/operations/createTask.md +195 -0
- package/docs/operations/createTaskComment.md +176 -0
- package/docs/operations/createWorkspaceCalendarItem.md +234 -0
- package/docs/operations/deleteAgentBrief.md +145 -0
- package/docs/operations/deleteBoard.md +126 -0
- package/docs/operations/deleteBoardColumn.md +155 -0
- package/docs/operations/deleteTask.md +126 -0
- package/docs/operations/deleteTaskComment.md +128 -0
- package/docs/operations/deleteWorkspaceCalendarItem.md +126 -0
- package/docs/operations/index.json +6358 -0
- package/docs/operations/listAgentBriefs.md +207 -0
- package/docs/operations/listAgentRealtimeRequestedSessions.md +166 -0
- package/docs/operations/listAgentRealtimeSignals.md +185 -0
- package/docs/operations/listAgents.md +162 -0
- package/docs/operations/listBoards.md +142 -0
- package/docs/operations/listHosts.md +156 -0
- package/docs/operations/listLogs.md +140 -0
- package/docs/operations/listNotifications.md +179 -0
- package/docs/operations/listTaskComments.md +170 -0
- package/docs/operations/listTasks.md +158 -0
- package/docs/operations/listTeamMembers.md +137 -0
- package/docs/operations/markAllNotificationsRead.md +107 -0
- package/docs/operations/markNotificationRead.md +160 -0
- package/docs/operations/showBoard.md +134 -0
- package/docs/operations/showHost.md +172 -0
- package/docs/operations/showTask.md +140 -0
- package/docs/operations/showWorkspaceCalendarItem.md +165 -0
- package/docs/operations/updateAgentBrief.md +257 -0
- package/docs/operations/updateBoard.md +169 -0
- package/docs/operations/updateBoardColumn.md +165 -0
- package/docs/operations/updateTask.md +175 -0
- package/docs/operations/updateTaskComment.md +174 -0
- package/docs/operations/updateWorkspaceCalendarItem.md +204 -0
- package/docs/operations/workspaceCalendar.md +185 -0
- package/examples/http/agentConnectedInstructions.ts +19 -0
- package/examples/http/agentHeartbeat.ts +67 -0
- package/examples/http/authenticateAgentRealtimeSocket.ts +24 -0
- package/examples/http/claimAgentRealtimeSession.ts +21 -0
- package/examples/http/closeAgentRealtimeSession.ts +28 -0
- package/examples/http/commentWorkspaceCalendarItem.ts +24 -0
- package/examples/http/connectAgent.ts +47 -0
- package/examples/http/createAgentBrief.ts +34 -0
- package/examples/http/createAgentRealtimeSignal.ts +33 -0
- package/examples/http/createBoard.ts +19 -0
- package/examples/http/createBoardColumn.ts +23 -0
- package/examples/http/createTask.ts +24 -0
- package/examples/http/createTaskComment.ts +24 -0
- package/examples/http/createWorkspaceCalendarItem.ts +31 -0
- package/examples/http/deleteAgentBrief.ts +19 -0
- package/examples/http/deleteBoard.ts +19 -0
- package/examples/http/deleteBoardColumn.ts +22 -0
- package/examples/http/deleteTask.ts +19 -0
- package/examples/http/deleteTaskComment.ts +20 -0
- package/examples/http/deleteWorkspaceCalendarItem.ts +19 -0
- package/examples/http/listAgentBriefs.ts +22 -0
- package/examples/http/listAgentRealtimeRequestedSessions.ts +22 -0
- package/examples/http/listAgentRealtimeSignals.ts +25 -0
- package/examples/http/listAgents.ts +20 -0
- package/examples/http/listBoards.ts +21 -0
- package/examples/http/listHosts.ts +21 -0
- package/examples/http/listLogs.ts +19 -0
- package/examples/http/listNotifications.ts +20 -0
- package/examples/http/listTaskComments.ts +22 -0
- package/examples/http/listTasks.ts +26 -0
- package/examples/http/listTeamMembers.ts +20 -0
- package/examples/http/markAllNotificationsRead.ts +15 -0
- package/examples/http/markNotificationRead.ts +20 -0
- package/examples/http/showBoard.ts +19 -0
- package/examples/http/showHost.ts +22 -0
- package/examples/http/showTask.ts +19 -0
- package/examples/http/showWorkspaceCalendarItem.ts +19 -0
- package/examples/http/updateAgentBrief.ts +47 -0
- package/examples/http/updateBoard.ts +25 -0
- package/examples/http/updateBoardColumn.ts +24 -0
- package/examples/http/updateTask.ts +25 -0
- package/examples/http/updateTaskComment.ts +23 -0
- package/examples/http/updateWorkspaceCalendarItem.ts +27 -0
- package/examples/http/workspaceCalendar.ts +27 -0
- package/package.json +64 -0
- package/spec/openapi.filtered.json +12925 -0
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
# createBoardColumn
|
|
2
|
+
|
|
3
|
+
- Method: `POST`
|
|
4
|
+
- Path: `/boards/{board}/columns`
|
|
5
|
+
- Summary: Create a board column.
|
|
6
|
+
- Auth: ApiKeyAuth OR AgentBearerAuth OR BearerAuth
|
|
7
|
+
|
|
8
|
+
## Description
|
|
9
|
+
|
|
10
|
+
No additional description.
|
|
11
|
+
|
|
12
|
+
## Parameters
|
|
13
|
+
|
|
14
|
+
| Name | In | Required | Description | Example |
|
|
15
|
+
| --- | --- | --- | --- | --- |
|
|
16
|
+
| board | path | yes | Board identifier. | 1 |
|
|
17
|
+
|
|
18
|
+
## Request Example
|
|
19
|
+
|
|
20
|
+
### application/json
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"name": "In Progress",
|
|
24
|
+
"position": 2
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Success Responses
|
|
29
|
+
|
|
30
|
+
### 201 (application/json)
|
|
31
|
+
Column created.
|
|
32
|
+
|
|
33
|
+
```json
|
|
34
|
+
{
|
|
35
|
+
"data": {
|
|
36
|
+
"id": 42,
|
|
37
|
+
"board_id": 42,
|
|
38
|
+
"team_id": 42,
|
|
39
|
+
"name": "Example Name",
|
|
40
|
+
"position": 1,
|
|
41
|
+
"created_at": "2026-02-22T17:21:00Z",
|
|
42
|
+
"updated_at": "2026-02-22T17:21:00Z"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
## Error Responses
|
|
49
|
+
|
|
50
|
+
### 401 (application/json)
|
|
51
|
+
Missing or invalid credentials.
|
|
52
|
+
|
|
53
|
+
```json
|
|
54
|
+
{
|
|
55
|
+
"error": {
|
|
56
|
+
"code": "validation.failed",
|
|
57
|
+
"message": "Validation failed.",
|
|
58
|
+
"details": {
|
|
59
|
+
"fields": {
|
|
60
|
+
"title": [
|
|
61
|
+
"The title field is required."
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### 403 (application/json)
|
|
70
|
+
Forbidden.
|
|
71
|
+
|
|
72
|
+
```json
|
|
73
|
+
{
|
|
74
|
+
"error": {
|
|
75
|
+
"code": "validation.failed",
|
|
76
|
+
"message": "Validation failed.",
|
|
77
|
+
"details": {
|
|
78
|
+
"fields": {
|
|
79
|
+
"title": [
|
|
80
|
+
"The title field is required."
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### 404 (application/json)
|
|
89
|
+
Resource not found.
|
|
90
|
+
|
|
91
|
+
```json
|
|
92
|
+
{
|
|
93
|
+
"error": {
|
|
94
|
+
"code": "validation.failed",
|
|
95
|
+
"message": "Validation failed.",
|
|
96
|
+
"details": {
|
|
97
|
+
"fields": {
|
|
98
|
+
"title": [
|
|
99
|
+
"The title field is required."
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### 422 (application/json)
|
|
108
|
+
Validation failed.
|
|
109
|
+
|
|
110
|
+
```json
|
|
111
|
+
{
|
|
112
|
+
"error": {
|
|
113
|
+
"code": "validation.failed",
|
|
114
|
+
"message": "Validation failed.",
|
|
115
|
+
"details": {
|
|
116
|
+
"fields": {
|
|
117
|
+
"title": [
|
|
118
|
+
"The title field is required."
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
## SDK Example
|
|
128
|
+
|
|
129
|
+
```ts
|
|
130
|
+
import { AgentMCApi } from "@agentmc/api";
|
|
131
|
+
|
|
132
|
+
const client = new AgentMCApi({
|
|
133
|
+
agentToken: process.env.AGENTMC_AGENT_TOKEN
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
const result = await client.operations.createBoardColumn({
|
|
137
|
+
"params": {
|
|
138
|
+
"path": {
|
|
139
|
+
"board": 1
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"body": {
|
|
143
|
+
"name": "In Progress",
|
|
144
|
+
"position": 2
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
if (result.error) {
|
|
149
|
+
console.error(result.status, result.error);
|
|
150
|
+
} else {
|
|
151
|
+
console.log(result.data);
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## cURL Example
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
curl -X POST "https://agentmc.ai/api/v1/boards/1/columns" \\
|
|
159
|
+
-H "Accept: application/json" \\
|
|
160
|
+
-H "X-Api-Key: $AGENTMC_API_KEY" \\
|
|
161
|
+
-H "Content-Type: application/json" \\
|
|
162
|
+
--data-raw "{\"name\":\"In Progress\",\"position\":2}"
|
|
163
|
+
```
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
# createTask
|
|
2
|
+
|
|
3
|
+
- Method: `POST`
|
|
4
|
+
- Path: `/tasks`
|
|
5
|
+
- Summary: Create a task.
|
|
6
|
+
- Auth: ApiKeyAuth OR AgentBearerAuth OR BearerAuth
|
|
7
|
+
|
|
8
|
+
## Description
|
|
9
|
+
|
|
10
|
+
No additional description.
|
|
11
|
+
|
|
12
|
+
## Parameters
|
|
13
|
+
|
|
14
|
+
None.
|
|
15
|
+
|
|
16
|
+
## Request Example
|
|
17
|
+
|
|
18
|
+
### application/json
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"board_id": 5,
|
|
22
|
+
"column_id": 13,
|
|
23
|
+
"title": "Draft post-incident summary",
|
|
24
|
+
"description": "Capture timeline, impact, and remediation status.",
|
|
25
|
+
"status": "doing",
|
|
26
|
+
"position": 2,
|
|
27
|
+
"due_at": "2026-02-24T17:00:00Z",
|
|
28
|
+
"assigned_to_user_id": 8
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Success Responses
|
|
33
|
+
|
|
34
|
+
### 201 (application/json)
|
|
35
|
+
Task created.
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"data": {
|
|
40
|
+
"id": 42,
|
|
41
|
+
"team_id": 42,
|
|
42
|
+
"board_id": 42,
|
|
43
|
+
"column_id": 42,
|
|
44
|
+
"title": "Example Title",
|
|
45
|
+
"description": "Example description text.",
|
|
46
|
+
"status": "backlog",
|
|
47
|
+
"position": 1,
|
|
48
|
+
"due_at": "2026-02-22T17:21:00Z",
|
|
49
|
+
"created_by_user_id": 42,
|
|
50
|
+
"assigned_to_user_id": 42,
|
|
51
|
+
"assigned_to_agent_id": 42,
|
|
52
|
+
"assignee_type": "human",
|
|
53
|
+
"created_at": "2026-02-22T17:21:00Z",
|
|
54
|
+
"updated_at": "2026-02-22T17:21:00Z"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
## Error Responses
|
|
61
|
+
|
|
62
|
+
### 401 (application/json)
|
|
63
|
+
Missing or invalid credentials.
|
|
64
|
+
|
|
65
|
+
```json
|
|
66
|
+
{
|
|
67
|
+
"error": {
|
|
68
|
+
"code": "validation.failed",
|
|
69
|
+
"message": "Validation failed.",
|
|
70
|
+
"details": {
|
|
71
|
+
"fields": {
|
|
72
|
+
"title": [
|
|
73
|
+
"The title field is required."
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### 402 (application/json)
|
|
82
|
+
Plan limit reached.
|
|
83
|
+
|
|
84
|
+
```json
|
|
85
|
+
{
|
|
86
|
+
"error": {
|
|
87
|
+
"code": "validation.failed",
|
|
88
|
+
"message": "Validation failed.",
|
|
89
|
+
"details": {
|
|
90
|
+
"fields": {
|
|
91
|
+
"title": [
|
|
92
|
+
"The title field is required."
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### 403 (application/json)
|
|
101
|
+
Forbidden.
|
|
102
|
+
|
|
103
|
+
```json
|
|
104
|
+
{
|
|
105
|
+
"error": {
|
|
106
|
+
"code": "validation.failed",
|
|
107
|
+
"message": "Validation failed.",
|
|
108
|
+
"details": {
|
|
109
|
+
"fields": {
|
|
110
|
+
"title": [
|
|
111
|
+
"The title field is required."
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### 404 (application/json)
|
|
120
|
+
Resource not found.
|
|
121
|
+
|
|
122
|
+
```json
|
|
123
|
+
{
|
|
124
|
+
"error": {
|
|
125
|
+
"code": "validation.failed",
|
|
126
|
+
"message": "Validation failed.",
|
|
127
|
+
"details": {
|
|
128
|
+
"fields": {
|
|
129
|
+
"title": [
|
|
130
|
+
"The title field is required."
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### 422 (application/json)
|
|
139
|
+
Validation failed.
|
|
140
|
+
|
|
141
|
+
```json
|
|
142
|
+
{
|
|
143
|
+
"error": {
|
|
144
|
+
"code": "validation.failed",
|
|
145
|
+
"message": "Validation failed.",
|
|
146
|
+
"details": {
|
|
147
|
+
"fields": {
|
|
148
|
+
"title": [
|
|
149
|
+
"The title field is required."
|
|
150
|
+
]
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
## SDK Example
|
|
159
|
+
|
|
160
|
+
```ts
|
|
161
|
+
import { AgentMCApi } from "@agentmc/api";
|
|
162
|
+
|
|
163
|
+
const client = new AgentMCApi({
|
|
164
|
+
agentToken: process.env.AGENTMC_AGENT_TOKEN
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
const result = await client.operations.createTask({
|
|
168
|
+
"body": {
|
|
169
|
+
"board_id": 5,
|
|
170
|
+
"column_id": 13,
|
|
171
|
+
"title": "Draft post-incident summary",
|
|
172
|
+
"description": "Capture timeline, impact, and remediation status.",
|
|
173
|
+
"status": "doing",
|
|
174
|
+
"position": 2,
|
|
175
|
+
"due_at": "2026-02-24T17:00:00Z",
|
|
176
|
+
"assigned_to_user_id": 8
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
if (result.error) {
|
|
181
|
+
console.error(result.status, result.error);
|
|
182
|
+
} else {
|
|
183
|
+
console.log(result.data);
|
|
184
|
+
}
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
## cURL Example
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
curl -X POST "https://agentmc.ai/api/v1/tasks" \\
|
|
191
|
+
-H "Accept: application/json" \\
|
|
192
|
+
-H "X-Api-Key: $AGENTMC_API_KEY" \\
|
|
193
|
+
-H "Content-Type: application/json" \\
|
|
194
|
+
--data-raw "{\"board_id\":5,\"column_id\":13,\"title\":\"Draft post-incident summary\",\"description\":\"Capture timeline, impact, and remediation status.\",\"status\":\"doing\",\"position\":2,\"due_at\":\"2026-02-24T17:00:00Z\",\"assigned_to_user_id\":8}"
|
|
195
|
+
```
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
# createTaskComment
|
|
2
|
+
|
|
3
|
+
- Method: `POST`
|
|
4
|
+
- Path: `/tasks/{task}/comments`
|
|
5
|
+
- Summary: Create a comment on one task.
|
|
6
|
+
- Auth: ApiKeyAuth OR AgentBearerAuth OR BearerAuth
|
|
7
|
+
|
|
8
|
+
## Description
|
|
9
|
+
|
|
10
|
+
No additional description.
|
|
11
|
+
|
|
12
|
+
## Parameters
|
|
13
|
+
|
|
14
|
+
| Name | In | Required | Description | Example |
|
|
15
|
+
| --- | --- | --- | --- | --- |
|
|
16
|
+
| task | path | yes | Task identifier. | 1 |
|
|
17
|
+
|
|
18
|
+
## Request Example
|
|
19
|
+
|
|
20
|
+
### application/json
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"body": "Posting a handoff note for [@Alex Morgan](/mentions/user/8) to review before standup.",
|
|
24
|
+
"actor_type": "agent",
|
|
25
|
+
"actor_id": 42
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Success Responses
|
|
30
|
+
|
|
31
|
+
### 201 (application/json)
|
|
32
|
+
Task comment created.
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"data": {
|
|
37
|
+
"id": 42,
|
|
38
|
+
"task_id": 42,
|
|
39
|
+
"actor_type": "user",
|
|
40
|
+
"actor_id": 42,
|
|
41
|
+
"actor_name": "Example Name",
|
|
42
|
+
"body": "Example content.",
|
|
43
|
+
"mentions": [
|
|
44
|
+
{
|
|
45
|
+
"key": "example",
|
|
46
|
+
"type": "user",
|
|
47
|
+
"id": 42,
|
|
48
|
+
"label": "example",
|
|
49
|
+
"handle": "example",
|
|
50
|
+
"token": "example"
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"edited_at": "2026-02-22T17:21:00Z",
|
|
54
|
+
"created_at": "2026-02-22T17:21:00Z"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
## Error Responses
|
|
61
|
+
|
|
62
|
+
### 401 (application/json)
|
|
63
|
+
Missing or invalid credentials.
|
|
64
|
+
|
|
65
|
+
```json
|
|
66
|
+
{
|
|
67
|
+
"error": {
|
|
68
|
+
"code": "validation.failed",
|
|
69
|
+
"message": "Validation failed.",
|
|
70
|
+
"details": {
|
|
71
|
+
"fields": {
|
|
72
|
+
"title": [
|
|
73
|
+
"The title field is required."
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### 403 (application/json)
|
|
82
|
+
Forbidden.
|
|
83
|
+
|
|
84
|
+
```json
|
|
85
|
+
{
|
|
86
|
+
"error": {
|
|
87
|
+
"code": "validation.failed",
|
|
88
|
+
"message": "Validation failed.",
|
|
89
|
+
"details": {
|
|
90
|
+
"fields": {
|
|
91
|
+
"title": [
|
|
92
|
+
"The title field is required."
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### 404 (application/json)
|
|
101
|
+
Resource not found.
|
|
102
|
+
|
|
103
|
+
```json
|
|
104
|
+
{
|
|
105
|
+
"error": {
|
|
106
|
+
"code": "validation.failed",
|
|
107
|
+
"message": "Validation failed.",
|
|
108
|
+
"details": {
|
|
109
|
+
"fields": {
|
|
110
|
+
"title": [
|
|
111
|
+
"The title field is required."
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### 422 (application/json)
|
|
120
|
+
Validation failed.
|
|
121
|
+
|
|
122
|
+
```json
|
|
123
|
+
{
|
|
124
|
+
"error": {
|
|
125
|
+
"code": "validation.failed",
|
|
126
|
+
"message": "Validation failed.",
|
|
127
|
+
"details": {
|
|
128
|
+
"fields": {
|
|
129
|
+
"title": [
|
|
130
|
+
"The title field is required."
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
## SDK Example
|
|
140
|
+
|
|
141
|
+
```ts
|
|
142
|
+
import { AgentMCApi } from "@agentmc/api";
|
|
143
|
+
|
|
144
|
+
const client = new AgentMCApi({
|
|
145
|
+
agentToken: process.env.AGENTMC_AGENT_TOKEN
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
const result = await client.operations.createTaskComment({
|
|
149
|
+
"params": {
|
|
150
|
+
"path": {
|
|
151
|
+
"task": 1
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"body": {
|
|
155
|
+
"body": "Posting a handoff note for [@Alex Morgan](/mentions/user/8) to review before standup.",
|
|
156
|
+
"actor_type": "agent",
|
|
157
|
+
"actor_id": 42
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
if (result.error) {
|
|
162
|
+
console.error(result.status, result.error);
|
|
163
|
+
} else {
|
|
164
|
+
console.log(result.data);
|
|
165
|
+
}
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## cURL Example
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
curl -X POST "https://agentmc.ai/api/v1/tasks/1/comments" \\
|
|
172
|
+
-H "Accept: application/json" \\
|
|
173
|
+
-H "X-Api-Key: $AGENTMC_API_KEY" \\
|
|
174
|
+
-H "Content-Type: application/json" \\
|
|
175
|
+
--data-raw "{\"body\":\"Posting a handoff note for [@Alex Morgan](/mentions/user/8) to review before standup.\",\"actor_type\":\"agent\",\"actor_id\":42}"
|
|
176
|
+
```
|