@agentmc/api 0.2.2 → 0.2.4

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/dist/index.d.ts CHANGED
@@ -23,15 +23,15 @@ interface paths {
23
23
  patch?: never;
24
24
  trace?: never;
25
25
  };
26
- "/agents/{agent}/instructions": {
26
+ "/agents/{agent}/agent-instructions": {
27
27
  parameters: {
28
28
  query?: never;
29
29
  header?: never;
30
30
  path?: never;
31
31
  cookie?: never;
32
32
  };
33
- /** Return runtime instructions for a connected agent using bearer auth. */
34
- get: operations["agentConnectedInstructions"];
33
+ /** Return agent instructions for a connected agent using bearer auth. */
34
+ get: operations["agentInstructions"];
35
35
  put?: never;
36
36
  post?: never;
37
37
  delete?: never;
@@ -1267,12 +1267,12 @@ interface components {
1267
1267
  };
1268
1268
  };
1269
1269
  /**
1270
- * @description Connect/registration response with agent credentials, authenticated instructions endpoint, and OpenAPI URL.
1270
+ * @description Connect/registration response with agent credentials, authenticated agent instructions endpoint, and OpenAPI URL.
1271
1271
  * @example {
1272
1272
  * "agent_id": 42,
1273
1273
  * "agent_token": "mca_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
1274
- * "agent_instructions_endpoint": "https://agentmc.example.com/api/v1/agents/42/instructions",
1275
- * "agent_authenticated_instructions_endpoint": "https://agentmc.example.com/api/v1/agents/42/instructions",
1274
+ * "agent_instructions_endpoint": "https://agentmc.example.com/api/v1/agents/42/agent-instructions",
1275
+ * "agent_authenticated_instructions_endpoint": "https://agentmc.example.com/api/v1/agents/42/agent-instructions",
1276
1276
  * "agent_instructions_version": "32fe7fd14fca2d57c545f5f78f4a1c094f9ac1b3a1e8f6f9f8323b67a0ef9cc3",
1277
1277
  * "openapi_url": "https://agentmc.example.com/api/openapi.json",
1278
1278
  * "workspace": {
@@ -1297,13 +1297,13 @@ interface components {
1297
1297
  agent_token: string;
1298
1298
  /**
1299
1299
  * Format: uri
1300
- * @description Endpoint for agent runtime instructions.
1300
+ * @description Endpoint for agent instructions updates.
1301
1301
  * @example https://agentmc.example.com/resource
1302
1302
  */
1303
1303
  agent_instructions_endpoint: string;
1304
1304
  /**
1305
1305
  * Format: uri
1306
- * @description Authenticated endpoint for agent runtime instructions.
1306
+ * @description Authenticated endpoint for agent instructions updates.
1307
1307
  * @example https://agentmc.example.com/resource
1308
1308
  */
1309
1309
  agent_authenticated_instructions_endpoint: string;
@@ -1343,20 +1343,26 @@ interface components {
1343
1343
  first_sync_required: boolean;
1344
1344
  };
1345
1345
  /**
1346
- * @description Connected agent instruction payload returned after successful bearer authentication.
1346
+ * @description Connected agent instructions payload returned after successful bearer authentication.
1347
1347
  * @example {
1348
- * "instructions": "# AgentMC Agent Sync Skill",
1348
+ * "agent_instructions": "# Agent Instructions",
1349
+ * "agent_instructions_version": "32fe7fd14fca2d57c545f5f78f4a1c094f9ac1b3a1e8f6f9f8323b67a0ef9cc3",
1349
1350
  * "docs": [],
1350
1351
  * "schedules": [],
1351
1352
  * "config": {}
1352
1353
  * }
1353
1354
  */
1354
- ConnectedAgentInstructionsResponse: {
1355
+ AgentInstructionsResponse: {
1355
1356
  /**
1356
- * @description Instructions.
1357
+ * @description Agent instructions.
1357
1358
  * @example example
1358
1359
  */
1359
- instructions: string;
1360
+ agent_instructions: string;
1361
+ /**
1362
+ * @description Agent instructions version.
1363
+ * @example example
1364
+ */
1365
+ agent_instructions_version: string;
1360
1366
  /**
1361
1367
  * @description Docs.
1362
1368
  * @example [
@@ -5226,7 +5232,6 @@ interface components {
5226
5232
  /**
5227
5233
  * @description One-time agent registration payload. Resolve this schema from OpenAPI at runtime instead of hardcoding fields.
5228
5234
  * @example {
5229
- * "name": "openclaw-main",
5230
5235
  * "host": "ip-10-0-3-42",
5231
5236
  * "runtime_version": "2026.02.1",
5232
5237
  * "capabilities": [
@@ -5234,6 +5239,7 @@ interface components {
5234
5239
  * "calendar",
5235
5240
  * "realtime"
5236
5241
  * ],
5242
+ * "agents_md": "# Existing AGENTS.md\n\n## Runtime\n- Keep heartbeat alive.\n",
5237
5243
  * "models": [
5238
5244
  * {
5239
5245
  * "model_id": "openai/gpt-5-codex",
@@ -5281,11 +5287,6 @@ interface components {
5281
5287
  * }
5282
5288
  */
5283
5289
  RegisterAgentApiRequest: {
5284
- /**
5285
- * @description Runtime/client label fallback. AgentMC prefers identity name values from `identity.name` or `metadata.identity.name` when provided.
5286
- * @example openclaw-main
5287
- */
5288
- name: string;
5289
5290
  /**
5290
5291
  * @description Runtime host identifier (hostname or machine name).
5291
5292
  * @example ip-10-0-3-42
@@ -5305,6 +5306,14 @@ interface components {
5305
5306
  * ]
5306
5307
  */
5307
5308
  capabilities: string[] | null;
5309
+ /**
5310
+ * @description Required current local AGENTS.md content captured by the runtime before first sync.
5311
+ * @example # Existing AGENTS.md
5312
+ *
5313
+ * ## Runtime
5314
+ * - Keep heartbeat alive.
5315
+ */
5316
+ agents_md: string;
5308
5317
  /**
5309
5318
  * @description Optional runtime LLM inventory. Send an array of model refs/objects or a structured runtime snapshot object.
5310
5319
  * @example [
@@ -5338,7 +5347,7 @@ interface components {
5338
5347
  [key: string]: unknown;
5339
5348
  }) | null;
5340
5349
  /**
5341
- * @description Optional full agent identity payload. AgentMC uses `identity.name` as the registered agent name when provided.
5350
+ * @description Optional full agent identity payload persisted in agent metadata.
5342
5351
  * @example {
5343
5352
  * "name": "Jarvis",
5344
5353
  * "creature": "robot",
@@ -5487,7 +5496,7 @@ interface components {
5487
5496
  version: string;
5488
5497
  };
5489
5498
  /**
5490
- * @description Optional identity payload. When `identity.name` is present, AgentMC uses it as the registered agent name.
5499
+ * @description Optional identity payload persisted as host metadata.
5491
5500
  * @example {
5492
5501
  * "name": "Jarvis"
5493
5502
  * }
@@ -6619,8 +6628,8 @@ interface components {
6619
6628
  * @example {
6620
6629
  * "agent_id": 42,
6621
6630
  * "agent_token": "mca_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
6622
- * "agent_instructions_endpoint": "https://agentmc.example.com/api/v1/agents/42/instructions",
6623
- * "agent_authenticated_instructions_endpoint": "https://agentmc.example.com/api/v1/agents/42/instructions",
6631
+ * "agent_instructions_endpoint": "https://agentmc.example.com/api/v1/agents/42/agent-instructions",
6632
+ * "agent_authenticated_instructions_endpoint": "https://agentmc.example.com/api/v1/agents/42/agent-instructions",
6624
6633
  * "agent_instructions_version": "32fe7fd14fca2d57c545f5f78f4a1c094f9ac1b3a1e8f6f9f8323b67a0ef9cc3",
6625
6634
  * "openapi_url": "https://agentmc.example.com/api/openapi.json",
6626
6635
  * "workspace": {
@@ -6636,20 +6645,21 @@ interface components {
6636
6645
  };
6637
6646
  };
6638
6647
  /** @description Agent instructions returned. */
6639
- ConnectedAgentInstructionsResponse: {
6648
+ AgentInstructionsResponse: {
6640
6649
  headers: {
6641
6650
  [name: string]: unknown;
6642
6651
  };
6643
6652
  content: {
6644
6653
  /**
6645
6654
  * @example {
6646
- * "instructions": "# AgentMC Agent Sync Skill",
6655
+ * "agent_instructions": "# Agent Instructions",
6656
+ * "agent_instructions_version": "32fe7fd14fca2d57c545f5f78f4a1c094f9ac1b3a1e8f6f9f8323b67a0ef9cc3",
6647
6657
  * "docs": [],
6648
6658
  * "schedules": [],
6649
6659
  * "config": {}
6650
6660
  * }
6651
6661
  */
6652
- "application/json": components["schemas"]["ConnectedAgentInstructionsResponse"];
6662
+ "application/json": components["schemas"]["AgentInstructionsResponse"];
6653
6663
  };
6654
6664
  };
6655
6665
  /** @description Heartbeat accepted. */
@@ -7319,7 +7329,6 @@ interface components {
7319
7329
  content: {
7320
7330
  /**
7321
7331
  * @example {
7322
- * "name": "openclaw-main",
7323
7332
  * "host": "ip-10-0-3-42",
7324
7333
  * "runtime_version": "2026.02.1",
7325
7334
  * "capabilities": [
@@ -7327,6 +7336,7 @@ interface components {
7327
7336
  * "calendar",
7328
7337
  * "realtime"
7329
7338
  * ],
7339
+ * "agents_md": "# Existing AGENTS.md\n\n## Runtime\n- Keep heartbeat alive.\n",
7330
7340
  * "models": [
7331
7341
  * {
7332
7342
  * "model_id": "openai/gpt-5-codex",
@@ -7713,8 +7723,8 @@ interface operations {
7713
7723
  * @example {
7714
7724
  * "agent_id": 42,
7715
7725
  * "agent_token": "mca_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
7716
- * "agent_instructions_endpoint": "https://agentmc.example.com/api/v1/agents/42/instructions",
7717
- * "agent_authenticated_instructions_endpoint": "https://agentmc.example.com/api/v1/agents/42/instructions",
7726
+ * "agent_instructions_endpoint": "https://agentmc.example.com/api/v1/agents/42/agent-instructions",
7727
+ * "agent_authenticated_instructions_endpoint": "https://agentmc.example.com/api/v1/agents/42/agent-instructions",
7718
7728
  * "agent_instructions_version": "32fe7fd14fca2d57c545f5f78f4a1c094f9ac1b3a1e8f6f9f8323b67a0ef9cc3",
7719
7729
  * "openapi_url": "https://agentmc.example.com/api/openapi.json",
7720
7730
  * "workspace": {
@@ -7734,7 +7744,7 @@ interface operations {
7734
7744
  422: components["responses"]["ApiError422"];
7735
7745
  };
7736
7746
  };
7737
- agentConnectedInstructions: {
7747
+ agentInstructions: {
7738
7748
  parameters: {
7739
7749
  query?: never;
7740
7750
  header?: never;
@@ -7749,7 +7759,7 @@ interface operations {
7749
7759
  };
7750
7760
  requestBody?: never;
7751
7761
  responses: {
7752
- /** @description Instructions returned. */
7762
+ /** @description Agent instructions returned. */
7753
7763
  200: {
7754
7764
  headers: {
7755
7765
  [name: string]: unknown;
@@ -7757,13 +7767,14 @@ interface operations {
7757
7767
  content: {
7758
7768
  /**
7759
7769
  * @example {
7760
- * "instructions": "# AgentMC Agent Sync Skill",
7770
+ * "agent_instructions": "# Agent Instructions",
7771
+ * "agent_instructions_version": "32fe7fd14fca2d57c545f5f78f4a1c094f9ac1b3a1e8f6f9f8323b67a0ef9cc3",
7761
7772
  * "docs": [],
7762
7773
  * "schedules": [],
7763
7774
  * "config": {}
7764
7775
  * }
7765
7776
  */
7766
- "application/json": components["schemas"]["ConnectedAgentInstructionsResponse"];
7777
+ "application/json": components["schemas"]["AgentInstructionsResponse"];
7767
7778
  };
7768
7779
  };
7769
7780
  401: components["responses"]["ApiError401"];
package/dist/index.js CHANGED
@@ -4,103 +4,6 @@ import createClient from 'openapi-fetch';
4
4
 
5
5
  // src/generated/operations.ts
6
6
  var operations = [
7
- {
8
- "operationId": "agentConnectedInstructions",
9
- "method": "get",
10
- "path": "/agents/{agent}/instructions",
11
- "summary": "Return runtime instructions for a connected agent using bearer auth.",
12
- "description": "",
13
- "tags": [
14
- "Agents"
15
- ],
16
- "security": [
17
- [
18
- "AgentBearerAuth"
19
- ]
20
- ],
21
- "parameters": [
22
- {
23
- "name": "agent",
24
- "in": "path",
25
- "required": true,
26
- "description": "Agent identifier.",
27
- "example": 1
28
- }
29
- ],
30
- "requestBodyRequired": false,
31
- "requestExamples": [],
32
- "responses": [
33
- {
34
- "status": "200",
35
- "mediaType": "application/json",
36
- "description": "Instructions returned.",
37
- "hasContent": true,
38
- "example": {
39
- "instructions": "# AgentMC Agent Sync Skill",
40
- "docs": [],
41
- "schedules": [],
42
- "config": {}
43
- }
44
- },
45
- {
46
- "status": "401",
47
- "mediaType": "application/json",
48
- "description": "Missing or invalid credentials.",
49
- "hasContent": true,
50
- "example": {
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
- "status": "403",
66
- "mediaType": "application/json",
67
- "description": "Forbidden.",
68
- "hasContent": true,
69
- "example": {
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
- "status": "404",
85
- "mediaType": "application/json",
86
- "description": "Resource not found.",
87
- "hasContent": true,
88
- "example": {
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
7
  {
105
8
  "operationId": "agentHeartbeat",
106
9
  "method": "post",
@@ -307,6 +210,104 @@ var operations = [
307
210
  }
308
211
  ]
309
212
  },
213
+ {
214
+ "operationId": "agentInstructions",
215
+ "method": "get",
216
+ "path": "/agents/{agent}/agent-instructions",
217
+ "summary": "Return agent instructions for a connected agent using bearer auth.",
218
+ "description": "",
219
+ "tags": [
220
+ "Agents"
221
+ ],
222
+ "security": [
223
+ [
224
+ "AgentBearerAuth"
225
+ ]
226
+ ],
227
+ "parameters": [
228
+ {
229
+ "name": "agent",
230
+ "in": "path",
231
+ "required": true,
232
+ "description": "Agent identifier.",
233
+ "example": 1
234
+ }
235
+ ],
236
+ "requestBodyRequired": false,
237
+ "requestExamples": [],
238
+ "responses": [
239
+ {
240
+ "status": "200",
241
+ "mediaType": "application/json",
242
+ "description": "Agent instructions returned.",
243
+ "hasContent": true,
244
+ "example": {
245
+ "agent_instructions": "# Agent Instructions",
246
+ "agent_instructions_version": "32fe7fd14fca2d57c545f5f78f4a1c094f9ac1b3a1e8f6f9f8323b67a0ef9cc3",
247
+ "docs": [],
248
+ "schedules": [],
249
+ "config": {}
250
+ }
251
+ },
252
+ {
253
+ "status": "401",
254
+ "mediaType": "application/json",
255
+ "description": "Missing or invalid credentials.",
256
+ "hasContent": true,
257
+ "example": {
258
+ "error": {
259
+ "code": "validation.failed",
260
+ "message": "Validation failed.",
261
+ "details": {
262
+ "fields": {
263
+ "title": [
264
+ "The title field is required."
265
+ ]
266
+ }
267
+ }
268
+ }
269
+ }
270
+ },
271
+ {
272
+ "status": "403",
273
+ "mediaType": "application/json",
274
+ "description": "Forbidden.",
275
+ "hasContent": true,
276
+ "example": {
277
+ "error": {
278
+ "code": "validation.failed",
279
+ "message": "Validation failed.",
280
+ "details": {
281
+ "fields": {
282
+ "title": [
283
+ "The title field is required."
284
+ ]
285
+ }
286
+ }
287
+ }
288
+ }
289
+ },
290
+ {
291
+ "status": "404",
292
+ "mediaType": "application/json",
293
+ "description": "Resource not found.",
294
+ "hasContent": true,
295
+ "example": {
296
+ "error": {
297
+ "code": "validation.failed",
298
+ "message": "Validation failed.",
299
+ "details": {
300
+ "fields": {
301
+ "title": [
302
+ "The title field is required."
303
+ ]
304
+ }
305
+ }
306
+ }
307
+ }
308
+ }
309
+ ]
310
+ },
310
311
  {
311
312
  "operationId": "authenticateAgentRealtimeSocket",
312
313
  "method": "post",
@@ -936,7 +937,6 @@ var operations = [
936
937
  {
937
938
  "mediaType": "application/json",
938
939
  "example": {
939
- "name": "openclaw-main",
940
940
  "host": "ip-10-0-3-42",
941
941
  "runtime_version": "2026.02.1",
942
942
  "capabilities": [
@@ -944,6 +944,7 @@ var operations = [
944
944
  "calendar",
945
945
  "realtime"
946
946
  ],
947
+ "agents_md": "# Existing AGENTS.md\n\n## Runtime\n- Keep heartbeat alive.\n",
947
948
  "models": [
948
949
  {
949
950
  "model_id": "openai/gpt-5-codex",
@@ -997,8 +998,8 @@ var operations = [
997
998
  "example": {
998
999
  "agent_id": 42,
999
1000
  "agent_token": "mca_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
1000
- "agent_instructions_endpoint": "https://agentmc.example.com/api/v1/agents/42/instructions",
1001
- "agent_authenticated_instructions_endpoint": "https://agentmc.example.com/api/v1/agents/42/instructions",
1001
+ "agent_instructions_endpoint": "https://agentmc.example.com/api/v1/agents/42/agent-instructions",
1002
+ "agent_authenticated_instructions_endpoint": "https://agentmc.example.com/api/v1/agents/42/agent-instructions",
1002
1003
  "agent_instructions_version": "32fe7fd14fca2d57c545f5f78f4a1c094f9ac1b3a1e8f6f9f8323b67a0ef9cc3",
1003
1004
  "openapi_url": "https://agentmc.example.com/api/openapi.json",
1004
1005
  "workspace": {