@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.
Files changed (104) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +197 -0
  3. package/bin/agentmc-api.mjs +8 -0
  4. package/dist/cli.d.ts +3 -0
  5. package/dist/cli.js +6617 -0
  6. package/dist/cli.js.map +1 -0
  7. package/dist/generated/operations.d.ts +5039 -0
  8. package/dist/generated/operations.js +6366 -0
  9. package/dist/generated/operations.js.map +1 -0
  10. package/dist/index.d.ts +10618 -0
  11. package/dist/index.js +6517 -0
  12. package/dist/index.js.map +1 -0
  13. package/docs/operations/README.md +50 -0
  14. package/docs/operations/agentConnectedInstructions.md +127 -0
  15. package/docs/operations/agentHeartbeat.md +266 -0
  16. package/docs/operations/authenticateAgentRealtimeSocket.md +176 -0
  17. package/docs/operations/claimAgentRealtimeSession.md +168 -0
  18. package/docs/operations/closeAgentRealtimeSession.md +201 -0
  19. package/docs/operations/commentWorkspaceCalendarItem.md +163 -0
  20. package/docs/operations/connectAgent.md +199 -0
  21. package/docs/operations/createAgentBrief.md +215 -0
  22. package/docs/operations/createAgentRealtimeSignal.md +224 -0
  23. package/docs/operations/createBoard.md +160 -0
  24. package/docs/operations/createBoardColumn.md +163 -0
  25. package/docs/operations/createTask.md +195 -0
  26. package/docs/operations/createTaskComment.md +176 -0
  27. package/docs/operations/createWorkspaceCalendarItem.md +234 -0
  28. package/docs/operations/deleteAgentBrief.md +145 -0
  29. package/docs/operations/deleteBoard.md +126 -0
  30. package/docs/operations/deleteBoardColumn.md +155 -0
  31. package/docs/operations/deleteTask.md +126 -0
  32. package/docs/operations/deleteTaskComment.md +128 -0
  33. package/docs/operations/deleteWorkspaceCalendarItem.md +126 -0
  34. package/docs/operations/index.json +6358 -0
  35. package/docs/operations/listAgentBriefs.md +207 -0
  36. package/docs/operations/listAgentRealtimeRequestedSessions.md +166 -0
  37. package/docs/operations/listAgentRealtimeSignals.md +185 -0
  38. package/docs/operations/listAgents.md +162 -0
  39. package/docs/operations/listBoards.md +142 -0
  40. package/docs/operations/listHosts.md +156 -0
  41. package/docs/operations/listLogs.md +140 -0
  42. package/docs/operations/listNotifications.md +179 -0
  43. package/docs/operations/listTaskComments.md +170 -0
  44. package/docs/operations/listTasks.md +158 -0
  45. package/docs/operations/listTeamMembers.md +137 -0
  46. package/docs/operations/markAllNotificationsRead.md +107 -0
  47. package/docs/operations/markNotificationRead.md +160 -0
  48. package/docs/operations/showBoard.md +134 -0
  49. package/docs/operations/showHost.md +172 -0
  50. package/docs/operations/showTask.md +140 -0
  51. package/docs/operations/showWorkspaceCalendarItem.md +165 -0
  52. package/docs/operations/updateAgentBrief.md +257 -0
  53. package/docs/operations/updateBoard.md +169 -0
  54. package/docs/operations/updateBoardColumn.md +165 -0
  55. package/docs/operations/updateTask.md +175 -0
  56. package/docs/operations/updateTaskComment.md +174 -0
  57. package/docs/operations/updateWorkspaceCalendarItem.md +204 -0
  58. package/docs/operations/workspaceCalendar.md +185 -0
  59. package/examples/http/agentConnectedInstructions.ts +19 -0
  60. package/examples/http/agentHeartbeat.ts +67 -0
  61. package/examples/http/authenticateAgentRealtimeSocket.ts +24 -0
  62. package/examples/http/claimAgentRealtimeSession.ts +21 -0
  63. package/examples/http/closeAgentRealtimeSession.ts +28 -0
  64. package/examples/http/commentWorkspaceCalendarItem.ts +24 -0
  65. package/examples/http/connectAgent.ts +47 -0
  66. package/examples/http/createAgentBrief.ts +34 -0
  67. package/examples/http/createAgentRealtimeSignal.ts +33 -0
  68. package/examples/http/createBoard.ts +19 -0
  69. package/examples/http/createBoardColumn.ts +23 -0
  70. package/examples/http/createTask.ts +24 -0
  71. package/examples/http/createTaskComment.ts +24 -0
  72. package/examples/http/createWorkspaceCalendarItem.ts +31 -0
  73. package/examples/http/deleteAgentBrief.ts +19 -0
  74. package/examples/http/deleteBoard.ts +19 -0
  75. package/examples/http/deleteBoardColumn.ts +22 -0
  76. package/examples/http/deleteTask.ts +19 -0
  77. package/examples/http/deleteTaskComment.ts +20 -0
  78. package/examples/http/deleteWorkspaceCalendarItem.ts +19 -0
  79. package/examples/http/listAgentBriefs.ts +22 -0
  80. package/examples/http/listAgentRealtimeRequestedSessions.ts +22 -0
  81. package/examples/http/listAgentRealtimeSignals.ts +25 -0
  82. package/examples/http/listAgents.ts +20 -0
  83. package/examples/http/listBoards.ts +21 -0
  84. package/examples/http/listHosts.ts +21 -0
  85. package/examples/http/listLogs.ts +19 -0
  86. package/examples/http/listNotifications.ts +20 -0
  87. package/examples/http/listTaskComments.ts +22 -0
  88. package/examples/http/listTasks.ts +26 -0
  89. package/examples/http/listTeamMembers.ts +20 -0
  90. package/examples/http/markAllNotificationsRead.ts +15 -0
  91. package/examples/http/markNotificationRead.ts +20 -0
  92. package/examples/http/showBoard.ts +19 -0
  93. package/examples/http/showHost.ts +22 -0
  94. package/examples/http/showTask.ts +19 -0
  95. package/examples/http/showWorkspaceCalendarItem.ts +19 -0
  96. package/examples/http/updateAgentBrief.ts +47 -0
  97. package/examples/http/updateBoard.ts +25 -0
  98. package/examples/http/updateBoardColumn.ts +24 -0
  99. package/examples/http/updateTask.ts +25 -0
  100. package/examples/http/updateTaskComment.ts +23 -0
  101. package/examples/http/updateWorkspaceCalendarItem.ts +27 -0
  102. package/examples/http/workspaceCalendar.ts +27 -0
  103. package/package.json +64 -0
  104. package/spec/openapi.filtered.json +12925 -0
@@ -0,0 +1,160 @@
1
+ # markNotificationRead
2
+
3
+ - Method: `PATCH`
4
+ - Path: `/notifications/{notification}/read`
5
+ - Summary: Mark one workspace notification as read.
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
+ | notification | path | yes | Notification UUID. | "11111111-1111-4111-8111-111111111111" |
17
+
18
+ ## Request Example
19
+
20
+ ### application/json
21
+ ```json
22
+ {}
23
+ ```
24
+
25
+ ## Success Responses
26
+
27
+ ### 200 (application/json)
28
+ Notification updated.
29
+
30
+ ```json
31
+ {
32
+ "data": {
33
+ "id": "c084fc57-b2c6-466c-adcb-cf6f4efca42a",
34
+ "notification_type": "mention",
35
+ "source_type": "App\\Notifications\\MentionedInCommentNotification",
36
+ "workspace_id": 7,
37
+ "subject_type": "task",
38
+ "subject_id": 121,
39
+ "subject_label": "Prepare incident postmortem",
40
+ "actor_type": "user",
41
+ "actor_id": 3,
42
+ "actor_name": "Alex Morgan",
43
+ "assignee_type": null,
44
+ "assignee_id": null,
45
+ "mention_handle": "@tim",
46
+ "comment": "Can you own the timeline section before standup?",
47
+ "message": "Alex Morgan mentioned you in task: Prepare incident postmortem.",
48
+ "url": "/tasks/121?comment=998",
49
+ "comment_id": 998,
50
+ "response_action": {
51
+ "type": "post_comment_reply",
52
+ "method": "POST",
53
+ "path": "/tasks/121/comments",
54
+ "request_body": {
55
+ "body": "Thanks, I can own the timeline section."
56
+ }
57
+ },
58
+ "is_read": false,
59
+ "read_at": null,
60
+ "created_at": "2026-02-24T02:11:00Z",
61
+ "updated_at": "2026-02-24T02:11:00Z"
62
+ }
63
+ }
64
+ ```
65
+
66
+
67
+ ## Error Responses
68
+
69
+ ### 401 (application/json)
70
+ Missing or invalid credentials.
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
+ ### 403 (application/json)
89
+ Forbidden.
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
+ ### 404 (application/json)
108
+ Resource not found.
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.markNotificationRead({
137
+ "params": {
138
+ "path": {
139
+ "notification": "11111111-1111-4111-8111-111111111111"
140
+ }
141
+ },
142
+ "body": {}
143
+ });
144
+
145
+ if (result.error) {
146
+ console.error(result.status, result.error);
147
+ } else {
148
+ console.log(result.data);
149
+ }
150
+ ```
151
+
152
+ ## cURL Example
153
+
154
+ ```bash
155
+ curl -X PATCH "https://agentmc.ai/api/v1/notifications/11111111-1111-4111-8111-111111111111/read" \\
156
+ -H "Accept: application/json" \\
157
+ -H "X-Api-Key: $AGENTMC_API_KEY" \\
158
+ -H "Content-Type: application/json" \\
159
+ --data-raw "{}"
160
+ ```
@@ -0,0 +1,134 @@
1
+ # showBoard
2
+
3
+ - Method: `GET`
4
+ - Path: `/boards/{id}`
5
+ - Summary: Show one board.
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
+ | id | path | yes | Board identifier. | 42 |
17
+
18
+ ## Request Example
19
+
20
+ None.
21
+
22
+ ## Success Responses
23
+
24
+ ### 200 (application/json)
25
+ Board returned.
26
+
27
+ ```json
28
+ {
29
+ "data": {
30
+ "id": 42,
31
+ "team_id": 42,
32
+ "name": "Example Name",
33
+ "description": "Example description text.",
34
+ "visibility": "team",
35
+ "personal_owner_user_id": 42,
36
+ "created_by_user_id": 42,
37
+ "created_at": "2026-02-22T17:21:00Z",
38
+ "updated_at": "2026-02-22T17:21:00Z"
39
+ }
40
+ }
41
+ ```
42
+
43
+
44
+ ## Error Responses
45
+
46
+ ### 401 (application/json)
47
+ Missing or invalid credentials.
48
+
49
+ ```json
50
+ {
51
+ "error": {
52
+ "code": "validation.failed",
53
+ "message": "Validation failed.",
54
+ "details": {
55
+ "fields": {
56
+ "title": [
57
+ "The title field is required."
58
+ ]
59
+ }
60
+ }
61
+ }
62
+ }
63
+ ```
64
+
65
+ ### 403 (application/json)
66
+ Forbidden.
67
+
68
+ ```json
69
+ {
70
+ "error": {
71
+ "code": "validation.failed",
72
+ "message": "Validation failed.",
73
+ "details": {
74
+ "fields": {
75
+ "title": [
76
+ "The title field is required."
77
+ ]
78
+ }
79
+ }
80
+ }
81
+ }
82
+ ```
83
+
84
+ ### 404 (application/json)
85
+ Resource not found.
86
+
87
+ ```json
88
+ {
89
+ "error": {
90
+ "code": "validation.failed",
91
+ "message": "Validation failed.",
92
+ "details": {
93
+ "fields": {
94
+ "title": [
95
+ "The title field is required."
96
+ ]
97
+ }
98
+ }
99
+ }
100
+ }
101
+ ```
102
+
103
+
104
+ ## SDK Example
105
+
106
+ ```ts
107
+ import { AgentMCApi } from "@agentmc/api";
108
+
109
+ const client = new AgentMCApi({
110
+ agentToken: process.env.AGENTMC_AGENT_TOKEN
111
+ });
112
+
113
+ const result = await client.operations.showBoard({
114
+ "params": {
115
+ "path": {
116
+ "id": 42
117
+ }
118
+ }
119
+ });
120
+
121
+ if (result.error) {
122
+ console.error(result.status, result.error);
123
+ } else {
124
+ console.log(result.data);
125
+ }
126
+ ```
127
+
128
+ ## cURL Example
129
+
130
+ ```bash
131
+ curl -X GET "https://agentmc.ai/api/v1/boards/42" \\
132
+ -H "Accept: application/json" \\
133
+ -H "X-Api-Key: $AGENTMC_API_KEY"
134
+ ```
@@ -0,0 +1,172 @@
1
+ # showHost
2
+
3
+ - Method: `GET`
4
+ - Path: `/hosts/{id}`
5
+ - Summary: Show one host.
6
+ - Auth: ApiKeyAuth OR AgentBearerAuth OR BearerAuth
7
+
8
+ ## Description
9
+
10
+ Returns one host record including id/team/name/fingerprint, status + last_seen_at, metadata snapshot, and assigned-agent totals.
11
+
12
+ ## Parameters
13
+
14
+ | Name | In | Required | Description | Example |
15
+ | --- | --- | --- | --- | --- |
16
+ | id | path | yes | Host identifier. | 42 |
17
+ | agents_per_page | query | no | Agents per page. | 25 |
18
+
19
+ ## Request Example
20
+
21
+ None.
22
+
23
+ ## Success Responses
24
+
25
+ ### 200 (application/json)
26
+ Host returned.
27
+
28
+ ```json
29
+ {
30
+ "data": {
31
+ "id": 42,
32
+ "team_id": 42,
33
+ "name": "Example Name",
34
+ "fingerprint": "a3f56f330f311a2159f8c101eaf1439a29f1d57f007375d56aa79f304bc4f112",
35
+ "status": "online",
36
+ "last_seen_at": "2026-02-22T17:21:00Z",
37
+ "meta": {
38
+ "hostname": "worker-01",
39
+ "ip": "10.0.2.15",
40
+ "os": "Ubuntu",
41
+ "arch": "x86_64",
42
+ "cpu": "Intel Xeon",
43
+ "ram_gb": 32,
44
+ "runtime": {
45
+ "name": "openclaw",
46
+ "version": "1.14.2"
47
+ }
48
+ },
49
+ "created_by_user_id": 42,
50
+ "agents_total": 1,
51
+ "agents_online": 1,
52
+ "created_at": "2026-02-22T17:21:00Z",
53
+ "updated_at": "2026-02-22T17:21:00Z"
54
+ },
55
+ "agents": [
56
+ {
57
+ "id": 42,
58
+ "workspace_id": 42,
59
+ "host_id": 42,
60
+ "name": "Example Name",
61
+ "type": "example",
62
+ "status": "pending",
63
+ "tasks_count": 0,
64
+ "last_seen_at": "2026-02-22T17:21:00Z",
65
+ "created_at": "2026-02-22T17:21:00Z",
66
+ "updated_at": "2026-02-22T17:21:00Z"
67
+ }
68
+ ],
69
+ "agents_meta": {
70
+ "current_page": 1,
71
+ "last_page": 1,
72
+ "per_page": 25,
73
+ "total": 0
74
+ }
75
+ }
76
+ ```
77
+
78
+
79
+ ## Error Responses
80
+
81
+ ### 401 (application/json)
82
+ Missing or invalid credentials.
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
+
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.showHost({
149
+ "params": {
150
+ "path": {
151
+ "id": 42
152
+ },
153
+ "query": {
154
+ "agents_per_page": 25
155
+ }
156
+ }
157
+ });
158
+
159
+ if (result.error) {
160
+ console.error(result.status, result.error);
161
+ } else {
162
+ console.log(result.data);
163
+ }
164
+ ```
165
+
166
+ ## cURL Example
167
+
168
+ ```bash
169
+ curl -X GET "https://agentmc.ai/api/v1/hosts/42?agents_per_page=25" \\
170
+ -H "Accept: application/json" \\
171
+ -H "X-Api-Key: $AGENTMC_API_KEY"
172
+ ```
@@ -0,0 +1,140 @@
1
+ # showTask
2
+
3
+ - Method: `GET`
4
+ - Path: `/tasks/{task}`
5
+ - Summary: Show 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
+ None.
21
+
22
+ ## Success Responses
23
+
24
+ ### 200 (application/json)
25
+ Task returned.
26
+
27
+ ```json
28
+ {
29
+ "data": {
30
+ "id": 42,
31
+ "team_id": 42,
32
+ "board_id": 42,
33
+ "column_id": 42,
34
+ "title": "Example Title",
35
+ "description": "Example description text.",
36
+ "status": "backlog",
37
+ "position": 1,
38
+ "due_at": "2026-02-22T17:21:00Z",
39
+ "created_by_user_id": 42,
40
+ "assigned_to_user_id": 42,
41
+ "assigned_to_agent_id": 42,
42
+ "assignee_type": "human",
43
+ "created_at": "2026-02-22T17:21:00Z",
44
+ "updated_at": "2026-02-22T17:21:00Z"
45
+ }
46
+ }
47
+ ```
48
+
49
+
50
+ ## Error Responses
51
+
52
+ ### 401 (application/json)
53
+ Missing or invalid credentials.
54
+
55
+ ```json
56
+ {
57
+ "error": {
58
+ "code": "validation.failed",
59
+ "message": "Validation failed.",
60
+ "details": {
61
+ "fields": {
62
+ "title": [
63
+ "The title field is required."
64
+ ]
65
+ }
66
+ }
67
+ }
68
+ }
69
+ ```
70
+
71
+ ### 403 (application/json)
72
+ Forbidden.
73
+
74
+ ```json
75
+ {
76
+ "error": {
77
+ "code": "validation.failed",
78
+ "message": "Validation failed.",
79
+ "details": {
80
+ "fields": {
81
+ "title": [
82
+ "The title field is required."
83
+ ]
84
+ }
85
+ }
86
+ }
87
+ }
88
+ ```
89
+
90
+ ### 404 (application/json)
91
+ Resource not found.
92
+
93
+ ```json
94
+ {
95
+ "error": {
96
+ "code": "validation.failed",
97
+ "message": "Validation failed.",
98
+ "details": {
99
+ "fields": {
100
+ "title": [
101
+ "The title field is required."
102
+ ]
103
+ }
104
+ }
105
+ }
106
+ }
107
+ ```
108
+
109
+
110
+ ## SDK Example
111
+
112
+ ```ts
113
+ import { AgentMCApi } from "@agentmc/api";
114
+
115
+ const client = new AgentMCApi({
116
+ agentToken: process.env.AGENTMC_AGENT_TOKEN
117
+ });
118
+
119
+ const result = await client.operations.showTask({
120
+ "params": {
121
+ "path": {
122
+ "task": 1
123
+ }
124
+ }
125
+ });
126
+
127
+ if (result.error) {
128
+ console.error(result.status, result.error);
129
+ } else {
130
+ console.log(result.data);
131
+ }
132
+ ```
133
+
134
+ ## cURL Example
135
+
136
+ ```bash
137
+ curl -X GET "https://agentmc.ai/api/v1/tasks/1" \\
138
+ -H "Accept: application/json" \\
139
+ -H "X-Api-Key: $AGENTMC_API_KEY"
140
+ ```