@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,19 @@
|
|
|
1
|
+
import { AgentMCApi } from "@agentmc/api";
|
|
2
|
+
|
|
3
|
+
const client = new AgentMCApi({
|
|
4
|
+
agentToken: process.env.AGENTMC_AGENT_TOKEN
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
const result = await client.operations.deleteTask({
|
|
8
|
+
"params": {
|
|
9
|
+
"path": {
|
|
10
|
+
"task": 1
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
if (result.error) {
|
|
16
|
+
console.error(result.status, result.error);
|
|
17
|
+
} else {
|
|
18
|
+
console.log(result.data);
|
|
19
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AgentMCApi } from "@agentmc/api";
|
|
2
|
+
|
|
3
|
+
const client = new AgentMCApi({
|
|
4
|
+
agentToken: process.env.AGENTMC_AGENT_TOKEN
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
const result = await client.operations.deleteTaskComment({
|
|
8
|
+
"params": {
|
|
9
|
+
"path": {
|
|
10
|
+
"task": 1,
|
|
11
|
+
"comment": 1
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
if (result.error) {
|
|
17
|
+
console.error(result.status, result.error);
|
|
18
|
+
} else {
|
|
19
|
+
console.log(result.data);
|
|
20
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AgentMCApi } from "@agentmc/api";
|
|
2
|
+
|
|
3
|
+
const client = new AgentMCApi({
|
|
4
|
+
agentToken: process.env.AGENTMC_AGENT_TOKEN
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
const result = await client.operations.deleteWorkspaceCalendarItem({
|
|
8
|
+
"params": {
|
|
9
|
+
"path": {
|
|
10
|
+
"item": 1
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
if (result.error) {
|
|
16
|
+
console.error(result.status, result.error);
|
|
17
|
+
} else {
|
|
18
|
+
console.log(result.data);
|
|
19
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AgentMCApi } from "@agentmc/api";
|
|
2
|
+
|
|
3
|
+
const client = new AgentMCApi({
|
|
4
|
+
agentToken: process.env.AGENTMC_AGENT_TOKEN
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
const result = await client.operations.listAgentBriefs({
|
|
8
|
+
"params": {
|
|
9
|
+
"query": {
|
|
10
|
+
"search": "operations",
|
|
11
|
+
"external_key": "daily-operations",
|
|
12
|
+
"agent_id": 42,
|
|
13
|
+
"per_page": 25
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
if (result.error) {
|
|
19
|
+
console.error(result.status, result.error);
|
|
20
|
+
} else {
|
|
21
|
+
console.log(result.data);
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AgentMCApi } from "@agentmc/api";
|
|
2
|
+
|
|
3
|
+
const client = new AgentMCApi({
|
|
4
|
+
agentToken: process.env.AGENTMC_AGENT_TOKEN
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
const result = await client.operations.listAgentRealtimeRequestedSessions({
|
|
8
|
+
"params": {
|
|
9
|
+
"path": {
|
|
10
|
+
"agent": 1
|
|
11
|
+
},
|
|
12
|
+
"query": {
|
|
13
|
+
"limit": 20
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
if (result.error) {
|
|
19
|
+
console.error(result.status, result.error);
|
|
20
|
+
} else {
|
|
21
|
+
console.log(result.data);
|
|
22
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { AgentMCApi } from "@agentmc/api";
|
|
2
|
+
|
|
3
|
+
const client = new AgentMCApi({
|
|
4
|
+
agentToken: process.env.AGENTMC_AGENT_TOKEN
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
const result = await client.operations.listAgentRealtimeSignals({
|
|
8
|
+
"params": {
|
|
9
|
+
"path": {
|
|
10
|
+
"agent": 1,
|
|
11
|
+
"session": 1
|
|
12
|
+
},
|
|
13
|
+
"query": {
|
|
14
|
+
"after_id": 120,
|
|
15
|
+
"limit": 20,
|
|
16
|
+
"exclude_sender": "agent"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
if (result.error) {
|
|
22
|
+
console.error(result.status, result.error);
|
|
23
|
+
} else {
|
|
24
|
+
console.log(result.data);
|
|
25
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AgentMCApi } from "@agentmc/api";
|
|
2
|
+
|
|
3
|
+
const client = new AgentMCApi({
|
|
4
|
+
agentToken: process.env.AGENTMC_AGENT_TOKEN
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
const result = await client.operations.listAgents({
|
|
8
|
+
"params": {
|
|
9
|
+
"query": {
|
|
10
|
+
"per_page": 25,
|
|
11
|
+
"search": "operations"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
if (result.error) {
|
|
17
|
+
console.error(result.status, result.error);
|
|
18
|
+
} else {
|
|
19
|
+
console.log(result.data);
|
|
20
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AgentMCApi } from "@agentmc/api";
|
|
2
|
+
|
|
3
|
+
const client = new AgentMCApi({
|
|
4
|
+
agentToken: process.env.AGENTMC_AGENT_TOKEN
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
const result = await client.operations.listBoards({
|
|
8
|
+
"params": {
|
|
9
|
+
"query": {
|
|
10
|
+
"per_page": 25,
|
|
11
|
+
"scope": "all",
|
|
12
|
+
"personal_owner_user_id": 42
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
if (result.error) {
|
|
18
|
+
console.error(result.status, result.error);
|
|
19
|
+
} else {
|
|
20
|
+
console.log(result.data);
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AgentMCApi } from "@agentmc/api";
|
|
2
|
+
|
|
3
|
+
const client = new AgentMCApi({
|
|
4
|
+
agentToken: process.env.AGENTMC_AGENT_TOKEN
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
const result = await client.operations.listHosts({
|
|
8
|
+
"params": {
|
|
9
|
+
"query": {
|
|
10
|
+
"per_page": 25,
|
|
11
|
+
"status": "online",
|
|
12
|
+
"search": "operations"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
if (result.error) {
|
|
18
|
+
console.error(result.status, result.error);
|
|
19
|
+
} else {
|
|
20
|
+
console.log(result.data);
|
|
21
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AgentMCApi } from "@agentmc/api";
|
|
2
|
+
|
|
3
|
+
const client = new AgentMCApi({
|
|
4
|
+
agentToken: process.env.AGENTMC_AGENT_TOKEN
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
const result = await client.operations.listLogs({
|
|
8
|
+
"params": {
|
|
9
|
+
"query": {
|
|
10
|
+
"per_page": 25
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
if (result.error) {
|
|
16
|
+
console.error(result.status, result.error);
|
|
17
|
+
} else {
|
|
18
|
+
console.log(result.data);
|
|
19
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AgentMCApi } from "@agentmc/api";
|
|
2
|
+
|
|
3
|
+
const client = new AgentMCApi({
|
|
4
|
+
agentToken: process.env.AGENTMC_AGENT_TOKEN
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
const result = await client.operations.listNotifications({
|
|
8
|
+
"params": {
|
|
9
|
+
"query": {
|
|
10
|
+
"unread": true,
|
|
11
|
+
"per_page": 25
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
if (result.error) {
|
|
17
|
+
console.error(result.status, result.error);
|
|
18
|
+
} else {
|
|
19
|
+
console.log(result.data);
|
|
20
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AgentMCApi } from "@agentmc/api";
|
|
2
|
+
|
|
3
|
+
const client = new AgentMCApi({
|
|
4
|
+
agentToken: process.env.AGENTMC_AGENT_TOKEN
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
const result = await client.operations.listTaskComments({
|
|
8
|
+
"params": {
|
|
9
|
+
"path": {
|
|
10
|
+
"task": 1
|
|
11
|
+
},
|
|
12
|
+
"query": {
|
|
13
|
+
"per_page": 25
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
if (result.error) {
|
|
19
|
+
console.error(result.status, result.error);
|
|
20
|
+
} else {
|
|
21
|
+
console.log(result.data);
|
|
22
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AgentMCApi } from "@agentmc/api";
|
|
2
|
+
|
|
3
|
+
const client = new AgentMCApi({
|
|
4
|
+
agentToken: process.env.AGENTMC_AGENT_TOKEN
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
const result = await client.operations.listTasks({
|
|
8
|
+
"params": {
|
|
9
|
+
"query": {
|
|
10
|
+
"board_id": 42,
|
|
11
|
+
"status": "online",
|
|
12
|
+
"assigned_to_user_id": 42,
|
|
13
|
+
"assigned_to_agent": 1,
|
|
14
|
+
"agent_id": 42,
|
|
15
|
+
"due_from": "2026-02-22T17:21:00Z",
|
|
16
|
+
"due_to": "2026-02-22T17:21:00Z",
|
|
17
|
+
"per_page": 25
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
if (result.error) {
|
|
23
|
+
console.error(result.status, result.error);
|
|
24
|
+
} else {
|
|
25
|
+
console.log(result.data);
|
|
26
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AgentMCApi } from "@agentmc/api";
|
|
2
|
+
|
|
3
|
+
const client = new AgentMCApi({
|
|
4
|
+
agentToken: process.env.AGENTMC_AGENT_TOKEN
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
const result = await client.operations.listTeamMembers({
|
|
8
|
+
"params": {
|
|
9
|
+
"query": {
|
|
10
|
+
"per_page": 25,
|
|
11
|
+
"search": "operations"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
if (result.error) {
|
|
17
|
+
console.error(result.status, result.error);
|
|
18
|
+
} else {
|
|
19
|
+
console.log(result.data);
|
|
20
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AgentMCApi } from "@agentmc/api";
|
|
2
|
+
|
|
3
|
+
const client = new AgentMCApi({
|
|
4
|
+
agentToken: process.env.AGENTMC_AGENT_TOKEN
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
const result = await client.operations.markAllNotificationsRead({
|
|
8
|
+
"body": {}
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
if (result.error) {
|
|
12
|
+
console.error(result.status, result.error);
|
|
13
|
+
} else {
|
|
14
|
+
console.log(result.data);
|
|
15
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AgentMCApi } from "@agentmc/api";
|
|
2
|
+
|
|
3
|
+
const client = new AgentMCApi({
|
|
4
|
+
agentToken: process.env.AGENTMC_AGENT_TOKEN
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
const result = await client.operations.markNotificationRead({
|
|
8
|
+
"params": {
|
|
9
|
+
"path": {
|
|
10
|
+
"notification": "11111111-1111-4111-8111-111111111111"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"body": {}
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
if (result.error) {
|
|
17
|
+
console.error(result.status, result.error);
|
|
18
|
+
} else {
|
|
19
|
+
console.log(result.data);
|
|
20
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AgentMCApi } from "@agentmc/api";
|
|
2
|
+
|
|
3
|
+
const client = new AgentMCApi({
|
|
4
|
+
agentToken: process.env.AGENTMC_AGENT_TOKEN
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
const result = await client.operations.showBoard({
|
|
8
|
+
"params": {
|
|
9
|
+
"path": {
|
|
10
|
+
"id": 42
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
if (result.error) {
|
|
16
|
+
console.error(result.status, result.error);
|
|
17
|
+
} else {
|
|
18
|
+
console.log(result.data);
|
|
19
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AgentMCApi } from "@agentmc/api";
|
|
2
|
+
|
|
3
|
+
const client = new AgentMCApi({
|
|
4
|
+
agentToken: process.env.AGENTMC_AGENT_TOKEN
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
const result = await client.operations.showHost({
|
|
8
|
+
"params": {
|
|
9
|
+
"path": {
|
|
10
|
+
"id": 42
|
|
11
|
+
},
|
|
12
|
+
"query": {
|
|
13
|
+
"agents_per_page": 25
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
if (result.error) {
|
|
19
|
+
console.error(result.status, result.error);
|
|
20
|
+
} else {
|
|
21
|
+
console.log(result.data);
|
|
22
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AgentMCApi } from "@agentmc/api";
|
|
2
|
+
|
|
3
|
+
const client = new AgentMCApi({
|
|
4
|
+
agentToken: process.env.AGENTMC_AGENT_TOKEN
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
const result = await client.operations.showTask({
|
|
8
|
+
"params": {
|
|
9
|
+
"path": {
|
|
10
|
+
"task": 1
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
if (result.error) {
|
|
16
|
+
console.error(result.status, result.error);
|
|
17
|
+
} else {
|
|
18
|
+
console.log(result.data);
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AgentMCApi } from "@agentmc/api";
|
|
2
|
+
|
|
3
|
+
const client = new AgentMCApi({
|
|
4
|
+
agentToken: process.env.AGENTMC_AGENT_TOKEN
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
const result = await client.operations.showWorkspaceCalendarItem({
|
|
8
|
+
"params": {
|
|
9
|
+
"path": {
|
|
10
|
+
"item": 1
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
if (result.error) {
|
|
16
|
+
console.error(result.status, result.error);
|
|
17
|
+
} else {
|
|
18
|
+
console.log(result.data);
|
|
19
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { AgentMCApi } from "@agentmc/api";
|
|
2
|
+
|
|
3
|
+
const client = new AgentMCApi({
|
|
4
|
+
agentToken: process.env.AGENTMC_AGENT_TOKEN
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
const result = await client.operations.updateAgentBrief({
|
|
8
|
+
"params": {
|
|
9
|
+
"path": {
|
|
10
|
+
"id": 42
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"body": {
|
|
14
|
+
"brief": {
|
|
15
|
+
"name": "Daily Operations Brief",
|
|
16
|
+
"summary": "Operations handoff digest for the morning window.",
|
|
17
|
+
"timezone": "America/Los_Angeles",
|
|
18
|
+
"sections": [
|
|
19
|
+
{
|
|
20
|
+
"key": "incidents",
|
|
21
|
+
"label": "Incidents"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"key": "followups",
|
|
25
|
+
"label": "Follow-ups"
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"content_markdown": "## Updates\n- Incident queue cleared\n- Follow-up tasks assigned",
|
|
29
|
+
"meta": {
|
|
30
|
+
"external_source": "daily-ops-job",
|
|
31
|
+
"schedule": "0 7 * * *"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"source": {
|
|
35
|
+
"agent_id": 42,
|
|
36
|
+
"meta": {
|
|
37
|
+
"runtime": "codex"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
if (result.error) {
|
|
44
|
+
console.error(result.status, result.error);
|
|
45
|
+
} else {
|
|
46
|
+
console.log(result.data);
|
|
47
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { AgentMCApi } from "@agentmc/api";
|
|
2
|
+
|
|
3
|
+
const client = new AgentMCApi({
|
|
4
|
+
agentToken: process.env.AGENTMC_AGENT_TOKEN
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
const result = await client.operations.updateBoard({
|
|
8
|
+
"params": {
|
|
9
|
+
"path": {
|
|
10
|
+
"id": 42
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"body": {
|
|
14
|
+
"name": "Incident Response",
|
|
15
|
+
"description": "Updated board description with escalation runbook links.",
|
|
16
|
+
"visibility": "personal",
|
|
17
|
+
"personal_owner_user_id": 8
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
if (result.error) {
|
|
22
|
+
console.error(result.status, result.error);
|
|
23
|
+
} else {
|
|
24
|
+
console.log(result.data);
|
|
25
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { AgentMCApi } from "@agentmc/api";
|
|
2
|
+
|
|
3
|
+
const client = new AgentMCApi({
|
|
4
|
+
agentToken: process.env.AGENTMC_AGENT_TOKEN
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
const result = await client.operations.updateBoardColumn({
|
|
8
|
+
"params": {
|
|
9
|
+
"path": {
|
|
10
|
+
"board": 1
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"body": {
|
|
14
|
+
"column_id": 13,
|
|
15
|
+
"name": "Review",
|
|
16
|
+
"position": 3
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
if (result.error) {
|
|
21
|
+
console.error(result.status, result.error);
|
|
22
|
+
} else {
|
|
23
|
+
console.log(result.data);
|
|
24
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { AgentMCApi } from "@agentmc/api";
|
|
2
|
+
|
|
3
|
+
const client = new AgentMCApi({
|
|
4
|
+
agentToken: process.env.AGENTMC_AGENT_TOKEN
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
const result = await client.operations.updateTask({
|
|
8
|
+
"params": {
|
|
9
|
+
"path": {
|
|
10
|
+
"task": 1
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"body": {
|
|
14
|
+
"title": "Draft post-incident summary",
|
|
15
|
+
"status": "review",
|
|
16
|
+
"due_at": "2026-02-24T19:00:00Z",
|
|
17
|
+
"assigned_to_agent_id": 42
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
if (result.error) {
|
|
22
|
+
console.error(result.status, result.error);
|
|
23
|
+
} else {
|
|
24
|
+
console.log(result.data);
|
|
25
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AgentMCApi } from "@agentmc/api";
|
|
2
|
+
|
|
3
|
+
const client = new AgentMCApi({
|
|
4
|
+
agentToken: process.env.AGENTMC_AGENT_TOKEN
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
const result = await client.operations.updateTaskComment({
|
|
8
|
+
"params": {
|
|
9
|
+
"path": {
|
|
10
|
+
"task": 1,
|
|
11
|
+
"comment": 1
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"body": {
|
|
15
|
+
"body": "Updated handoff note with the latest timeline and log links."
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
if (result.error) {
|
|
20
|
+
console.error(result.status, result.error);
|
|
21
|
+
} else {
|
|
22
|
+
console.log(result.data);
|
|
23
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { AgentMCApi } from "@agentmc/api";
|
|
2
|
+
|
|
3
|
+
const client = new AgentMCApi({
|
|
4
|
+
agentToken: process.env.AGENTMC_AGENT_TOKEN
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
const result = await client.operations.updateWorkspaceCalendarItem({
|
|
8
|
+
"params": {
|
|
9
|
+
"path": {
|
|
10
|
+
"item": 1
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"body": {
|
|
14
|
+
"title": "Review outage timeline",
|
|
15
|
+
"description": "Add links to root-cause analysis notes.",
|
|
16
|
+
"due_at": "2026-02-24T11:00:00Z",
|
|
17
|
+
"status": "in_progress",
|
|
18
|
+
"priority": "urgent",
|
|
19
|
+
"visibility": "workspace"
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
if (result.error) {
|
|
24
|
+
console.error(result.status, result.error);
|
|
25
|
+
} else {
|
|
26
|
+
console.log(result.data);
|
|
27
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { AgentMCApi } from "@agentmc/api";
|
|
2
|
+
|
|
3
|
+
const client = new AgentMCApi({
|
|
4
|
+
agentToken: process.env.AGENTMC_AGENT_TOKEN
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
const result = await client.operations.workspaceCalendar({
|
|
8
|
+
"params": {
|
|
9
|
+
"query": {
|
|
10
|
+
"view": "month",
|
|
11
|
+
"start": "2026-02-22T17:21:00Z",
|
|
12
|
+
"end": "2026-02-22T17:21:00Z",
|
|
13
|
+
"type": "event",
|
|
14
|
+
"status": "todo",
|
|
15
|
+
"priority": "low",
|
|
16
|
+
"assignee": "example",
|
|
17
|
+
"q": "retro",
|
|
18
|
+
"per_page": 25
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
if (result.error) {
|
|
24
|
+
console.error(result.status, result.error);
|
|
25
|
+
} else {
|
|
26
|
+
console.log(result.data);
|
|
27
|
+
}
|