@agentmc/api 0.2.5 → 0.2.8

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
@@ -6,32 +6,18 @@ export { operationsById } from './generated/operations.js';
6
6
  * Do not make direct changes to the file.
7
7
  */
8
8
  interface paths {
9
- "/agents/connect": {
9
+ "/agents/instructions": {
10
10
  parameters: {
11
11
  query?: never;
12
12
  header?: never;
13
13
  path?: never;
14
14
  cookie?: never;
15
15
  };
16
- get?: never;
17
- put?: never;
18
- /** Connect and register one agent using a short-lived connect token. */
19
- post: operations["connectAgent"];
20
- delete?: never;
21
- options?: never;
22
- head?: never;
23
- patch?: never;
24
- trace?: never;
25
- };
26
- "/agents/{agent}/agent-instructions": {
27
- parameters: {
28
- query?: never;
29
- header?: never;
30
- path?: never;
31
- cookie?: never;
32
- };
33
- /** Return agent instructions for a connected agent using bearer auth. */
34
- get: operations["agentInstructions"];
16
+ /**
17
+ * Fetch the AgentMC instruction bundle for the authenticated agent.
18
+ * @description Returns managed runtime files and bundle metadata. Send current_bundle_version to fetch files only when the bundle has changed.
19
+ */
20
+ get: operations["getAgentInstructions"];
35
21
  put?: never;
36
22
  post?: never;
37
23
  delete?: never;
@@ -699,7 +685,7 @@ interface components {
699
685
  * "active": true
700
686
  * }
701
687
  * ],
702
- * "path": "example",
688
+ * "path": ".agentmc/skills/skill.md",
703
689
  * "per_page": 25,
704
690
  * "total": 0
705
691
  * }
@@ -732,8 +718,8 @@ interface components {
732
718
  */
733
719
  links?: components["schemas"]["PaginationMetaLink"][];
734
720
  /**
735
- * @description Path.
736
- * @example example
721
+ * @description Local filesystem path where this file should be written.
722
+ * @example .agentmc/skills/skill.md
737
723
  */
738
724
  path: string;
739
725
  /**
@@ -877,7 +863,7 @@ interface components {
877
863
  * "active": true
878
864
  * }
879
865
  * ],
880
- * "path": "example",
866
+ * "path": ".agentmc/skills/skill.md",
881
867
  * "per_page": 25,
882
868
  * "total": 0
883
869
  * }
@@ -921,7 +907,7 @@ interface components {
921
907
  * "active": true
922
908
  * }
923
909
  * ],
924
- * "path": "example",
910
+ * "path": ".agentmc/skills/skill.md",
925
911
  * "per_page": 25,
926
912
  * "total": 0
927
913
  * }
@@ -977,7 +963,6 @@ interface components {
977
963
  * ]
978
964
  * },
979
965
  * "last_seen_at": "2026-02-24T02:11:00Z",
980
- * "first_sync_at": "2026-02-24T02:01:00Z",
981
966
  * "tasks_count": 3,
982
967
  * "created_at": "2026-02-24T01:56:00Z",
983
968
  * "updated_at": "2026-02-24T02:11:00Z"
@@ -1056,12 +1041,6 @@ interface components {
1056
1041
  * @example 2026-02-22T17:21:00Z
1057
1042
  */
1058
1043
  last_seen_at: string | null;
1059
- /**
1060
- * Format: date-time
1061
- * @description ISO-8601 timestamp when this agent first completed initial sync.
1062
- * @example 2026-02-22T17:21:00Z
1063
- */
1064
- first_sync_at: string | null;
1065
1044
  /**
1066
1045
  * @description Count of tasks currently assigned to this agent.
1067
1046
  * @example 0
@@ -1112,7 +1091,6 @@ interface components {
1112
1091
  * ]
1113
1092
  * },
1114
1093
  * "last_seen_at": "2026-02-24T02:11:00Z",
1115
- * "first_sync_at": "2026-02-24T02:01:00Z",
1116
1094
  * "tasks_count": 3,
1117
1095
  * "created_at": "2026-02-24T01:56:00Z",
1118
1096
  * "updated_at": "2026-02-24T02:11:00Z"
@@ -1135,7 +1113,7 @@ interface components {
1135
1113
  * "active": true
1136
1114
  * }
1137
1115
  * ],
1138
- * "path": "example",
1116
+ * "path": ".agentmc/skills/skill.md",
1139
1117
  * "per_page": 25,
1140
1118
  * "total": 0
1141
1119
  * }
@@ -1173,7 +1151,6 @@ interface components {
1173
1151
  * ]
1174
1152
  * },
1175
1153
  * "last_seen_at": "2026-02-24T02:11:00Z",
1176
- * "first_sync_at": "2026-02-24T02:01:00Z",
1177
1154
  * "tasks_count": 3,
1178
1155
  * "created_at": "2026-02-24T01:56:00Z",
1179
1156
  * "updated_at": "2026-02-24T02:11:00Z"
@@ -1204,7 +1181,7 @@ interface components {
1204
1181
  * "active": true
1205
1182
  * }
1206
1183
  * ],
1207
- * "path": "example",
1184
+ * "path": ".agentmc/skills/skill.md",
1208
1185
  * "per_page": 25,
1209
1186
  * "total": 0
1210
1187
  * }
@@ -1266,129 +1243,6 @@ interface components {
1266
1243
  [key: string]: unknown;
1267
1244
  };
1268
1245
  };
1269
- /**
1270
- * @description Connect/registration response with agent credentials, authenticated agent instructions endpoint, and OpenAPI URL.
1271
- * @example {
1272
- * "agent_id": 42,
1273
- * "agent_token": "mca_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
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
- * "agent_instructions_version": "32fe7fd14fca2d57c545f5f78f4a1c094f9ac1b3a1e8f6f9f8323b67a0ef9cc3",
1277
- * "openapi_url": "https://agentmc.example.com/api/openapi.json",
1278
- * "workspace": {
1279
- * "id": 7,
1280
- * "name": "AgentMC Demo Workspace"
1281
- * },
1282
- * "server_time": "2026-02-22T17:20:53Z",
1283
- * "first_sync_required": true
1284
- * }
1285
- */
1286
- AgentRegisterResponse: {
1287
- /**
1288
- * @description Identifier for agent.
1289
- * @example 42
1290
- */
1291
- agent_id: number;
1292
- /**
1293
- * @description Bearer token to use in `Authorization: Bearer <token>` headers.
1294
- * @example mca_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1295
- */
1296
- agent_token: string;
1297
- /**
1298
- * Format: uri
1299
- * @description Endpoint for agent instructions updates.
1300
- * @example https://agentmc.example.com/resource
1301
- */
1302
- agent_instructions_endpoint: string;
1303
- /**
1304
- * Format: uri
1305
- * @description Authenticated endpoint for agent instructions updates.
1306
- * @example https://agentmc.example.com/resource
1307
- */
1308
- agent_authenticated_instructions_endpoint: string;
1309
- /**
1310
- * @description Agent instructions version.
1311
- * @example example
1312
- */
1313
- agent_instructions_version: string;
1314
- /**
1315
- * @description Canonical OpenAPI specification URL.
1316
- * @example https://agentmc.example.com/api/openapi.json
1317
- */
1318
- openapi_url: string;
1319
- /**
1320
- * @description Workspace.
1321
- * @example {
1322
- * "id": 42,
1323
- * "name": "Example Name"
1324
- * }
1325
- */
1326
- workspace: components["schemas"]["TeamSummary"];
1327
- /**
1328
- * Format: date-time
1329
- * @description Current server timestamp.
1330
- * @example 2026-02-22T17:21:00Z
1331
- */
1332
- server_time: string;
1333
- /**
1334
- * @description Boolean flag for first sync required.
1335
- * @example true
1336
- */
1337
- first_sync_required: boolean;
1338
- };
1339
- /**
1340
- * @description Connected agent instructions payload returned after successful bearer authentication.
1341
- * @example {
1342
- * "agent_instructions": "# Agent Instructions",
1343
- * "agent_instructions_version": "32fe7fd14fca2d57c545f5f78f4a1c094f9ac1b3a1e8f6f9f8323b67a0ef9cc3",
1344
- * "docs": [],
1345
- * "schedules": [],
1346
- * "config": {}
1347
- * }
1348
- */
1349
- AgentInstructionsResponse: {
1350
- /**
1351
- * @description Agent instructions.
1352
- * @example example
1353
- */
1354
- agent_instructions: string;
1355
- /**
1356
- * @description Agent instructions version.
1357
- * @example example
1358
- */
1359
- agent_instructions_version: string;
1360
- /**
1361
- * @description Docs.
1362
- * @example [
1363
- * {
1364
- * "key": "value"
1365
- * }
1366
- * ]
1367
- */
1368
- docs: {
1369
- [key: string]: unknown;
1370
- }[];
1371
- /**
1372
- * @description Schedules.
1373
- * @example [
1374
- * {
1375
- * "key": "value"
1376
- * }
1377
- * ]
1378
- */
1379
- schedules: {
1380
- [key: string]: unknown;
1381
- }[];
1382
- /**
1383
- * @description Config.
1384
- * @example {
1385
- * "key": "value"
1386
- * }
1387
- */
1388
- config: {
1389
- [key: string]: unknown;
1390
- };
1391
- };
1392
1246
  /**
1393
1247
  * @description Heartbeat acknowledgement with optional resolved host record when runtime payload is provided.
1394
1248
  * @example {
@@ -2111,7 +1965,7 @@ interface components {
2111
1965
  * "active": true
2112
1966
  * }
2113
1967
  * ],
2114
- * "path": "example",
1968
+ * "path": ".agentmc/skills/skill.md",
2115
1969
  * "per_page": 25,
2116
1970
  * "total": 0
2117
1971
  * }
@@ -2202,7 +2056,7 @@ interface components {
2202
2056
  * "active": true
2203
2057
  * }
2204
2058
  * ],
2205
- * "path": "example",
2059
+ * "path": ".agentmc/skills/skill.md",
2206
2060
  * "per_page": 25,
2207
2061
  * "total": 0
2208
2062
  * }
@@ -2383,7 +2237,7 @@ interface components {
2383
2237
  * "host": "ip-10-0-3-42",
2384
2238
  * "port": 1,
2385
2239
  * "scheme": "example",
2386
- * "path": "example"
2240
+ * "path": ".agentmc/skills/skill.md"
2387
2241
  * },
2388
2242
  * "channel": "example",
2389
2243
  * "event": "example",
@@ -2400,7 +2254,7 @@ interface components {
2400
2254
  * "host": "ip-10-0-3-42",
2401
2255
  * "port": 1,
2402
2256
  * "scheme": "example",
2403
- * "path": "example"
2257
+ * "path": ".agentmc/skills/skill.md"
2404
2258
  * }
2405
2259
  */
2406
2260
  connection: {
@@ -2435,8 +2289,8 @@ interface components {
2435
2289
  */
2436
2290
  scheme: string;
2437
2291
  /**
2438
- * @description Path.
2439
- * @example example
2292
+ * @description Local filesystem path where this file should be written.
2293
+ * @example .agentmc/skills/skill.md
2440
2294
  */
2441
2295
  path: string;
2442
2296
  };
@@ -3689,6 +3543,128 @@ interface components {
3689
3543
  */
3690
3544
  agents_meta: components["schemas"]["HostAgentsMeta"];
3691
3545
  };
3546
+ /**
3547
+ * @description Agent Instruction File schema.
3548
+ * @example {
3549
+ * "id": "example",
3550
+ * "path": ".agentmc/skills/skill.md",
3551
+ * "content": "Example content.",
3552
+ * "sha256": "f96c95bd27dc9f3415cc0f4d817b5ec6f14185b6fcb5db9f6b6f14f648f8e9e4"
3553
+ * }
3554
+ */
3555
+ AgentInstructionFile: {
3556
+ /**
3557
+ * @description Unique identifier for this record.
3558
+ * @example example
3559
+ */
3560
+ id: string;
3561
+ /**
3562
+ * @description Local filesystem path where this file should be written.
3563
+ * @example .agentmc/skills/skill.md
3564
+ */
3565
+ path: string;
3566
+ /**
3567
+ * @description Content.
3568
+ * @example Example content.
3569
+ */
3570
+ content: string;
3571
+ /**
3572
+ * @description SHA-256 checksum for file content.
3573
+ * @example f96c95bd27dc9f3415cc0f4d817b5ec6f14185b6fcb5db9f6b6f14f648f8e9e4
3574
+ */
3575
+ sha256: string;
3576
+ };
3577
+ /**
3578
+ * @description Agent Instructions Response response schema.
3579
+ * @example {
3580
+ * "ok": true,
3581
+ * "changed": true,
3582
+ * "bundle_version": "bundle_2fa07fcadd6575cc",
3583
+ * "generated_at": "2026-02-25T14:10:00Z",
3584
+ * "defaults": {
3585
+ * "heartbeat_interval_seconds": 300
3586
+ * },
3587
+ * "agent": {
3588
+ * "id": 42,
3589
+ * "name": "Agent"
3590
+ * },
3591
+ * "files": [
3592
+ * {
3593
+ * "id": "skill.md",
3594
+ * "path": ".agentmc/skills/skill.md",
3595
+ * "content": "# AgentMC\n",
3596
+ * "sha256": "f96c95bd27dc9f3415cc0f4d817b5ec6f14185b6fcb5db9f6b6f14f648f8e9e4"
3597
+ * }
3598
+ * ]
3599
+ * }
3600
+ */
3601
+ AgentInstructionsResponse: {
3602
+ /**
3603
+ * @description Boolean flag for ok.
3604
+ * @example true
3605
+ */
3606
+ ok: boolean;
3607
+ /**
3608
+ * @description True when the runtime should rewrite local managed files from this response.
3609
+ * @example true
3610
+ */
3611
+ changed: boolean;
3612
+ /**
3613
+ * @description Current instruction bundle version.
3614
+ * @example bundle_2fa07fcadd6575cc
3615
+ */
3616
+ bundle_version: string;
3617
+ /**
3618
+ * Format: date-time
3619
+ * @description ISO-8601 generation timestamp.
3620
+ * @example 2026-02-22T17:21:00Z
3621
+ */
3622
+ generated_at: string;
3623
+ /**
3624
+ * @description Defaults.
3625
+ * @example {
3626
+ * "heartbeat_interval_seconds": 5
3627
+ * }
3628
+ */
3629
+ defaults: {
3630
+ /**
3631
+ * @description Heartbeat interval seconds.
3632
+ * @example 5
3633
+ */
3634
+ heartbeat_interval_seconds: number;
3635
+ };
3636
+ /**
3637
+ * @description Agent.
3638
+ * @example {
3639
+ * "id": 42,
3640
+ * "name": "Example Name"
3641
+ * }
3642
+ */
3643
+ agent: {
3644
+ /**
3645
+ * @description Unique identifier for this record.
3646
+ * @example 42
3647
+ */
3648
+ id: number;
3649
+ /**
3650
+ * @description Human-readable name.
3651
+ * @example Example Name
3652
+ */
3653
+ name: string;
3654
+ };
3655
+ /**
3656
+ * @description Managed instruction bundle files to write locally.
3657
+ * @example [
3658
+ * {
3659
+ * "id": "example",
3660
+ * "path": ".agentmc/skills/skill.md",
3661
+ * "content": "Example content.",
3662
+ * "sha256": "f96c95bd27dc9f3415cc0f4d817b5ec6f14185b6fcb5db9f6b6f14f648f8e9e4"
3663
+ * }
3664
+ * ]
3665
+ */
3666
+ files: components["schemas"]["AgentInstructionFile"][];
3667
+ };
3692
3668
  /**
3693
3669
  * @description Agent Realtime Requested Sessions Response response schema.
3694
3670
  * @example {
@@ -4450,7 +4426,7 @@ interface components {
4450
4426
  * "active": true
4451
4427
  * }
4452
4428
  * ],
4453
- * "path": "example",
4429
+ * "path": ".agentmc/skills/skill.md",
4454
4430
  * "per_page": 25,
4455
4431
  * "total": 0
4456
4432
  * }
@@ -4497,7 +4473,7 @@ interface components {
4497
4473
  * "active": true
4498
4474
  * }
4499
4475
  * ],
4500
- * "path": "example",
4476
+ * "path": ".agentmc/skills/skill.md",
4501
4477
  * "per_page": 25,
4502
4478
  * "total": 0
4503
4479
  * }
@@ -4543,7 +4519,7 @@ interface components {
4543
4519
  * "active": true
4544
4520
  * }
4545
4521
  * ],
4546
- * "path": "example",
4522
+ * "path": ".agentmc/skills/skill.md",
4547
4523
  * "per_page": 25,
4548
4524
  * "total": 0
4549
4525
  * }
@@ -4596,7 +4572,7 @@ interface components {
4596
4572
  * "active": true
4597
4573
  * }
4598
4574
  * ],
4599
- * "path": "example",
4575
+ * "path": ".agentmc/skills/skill.md",
4600
4576
  * "per_page": 25,
4601
4577
  * "total": 0
4602
4578
  * }
@@ -4645,7 +4621,7 @@ interface components {
4645
4621
  * "active": true
4646
4622
  * }
4647
4623
  * ],
4648
- * "path": "example",
4624
+ * "path": ".agentmc/skills/skill.md",
4649
4625
  * "per_page": 25,
4650
4626
  * "total": 0
4651
4627
  * }
@@ -4701,7 +4677,7 @@ interface components {
4701
4677
  * "active": true
4702
4678
  * }
4703
4679
  * ],
4704
- * "path": "example",
4680
+ * "path": ".agentmc/skills/skill.md",
4705
4681
  * "per_page": 25,
4706
4682
  * "total": 0
4707
4683
  * }
@@ -4743,7 +4719,7 @@ interface components {
4743
4719
  * "active": true
4744
4720
  * }
4745
4721
  * ],
4746
- * "path": "example",
4722
+ * "path": ".agentmc/skills/skill.md",
4747
4723
  * "per_page": 25,
4748
4724
  * "total": 0
4749
4725
  * }
@@ -4792,7 +4768,7 @@ interface components {
4792
4768
  * "active": true
4793
4769
  * }
4794
4770
  * ],
4795
- * "path": "example",
4771
+ * "path": ".agentmc/skills/skill.md",
4796
4772
  * "per_page": 25,
4797
4773
  * "total": 0
4798
4774
  * }
@@ -4853,7 +4829,7 @@ interface components {
4853
4829
  * "active": true
4854
4830
  * }
4855
4831
  * ],
4856
- * "path": "example",
4832
+ * "path": ".agentmc/skills/skill.md",
4857
4833
  * "per_page": 25,
4858
4834
  * "total": 0
4859
4835
  * }
@@ -4921,7 +4897,7 @@ interface components {
4921
4897
  * "active": true
4922
4898
  * }
4923
4899
  * ],
4924
- * "path": "example",
4900
+ * "path": ".agentmc/skills/skill.md",
4925
4901
  * "per_page": 25,
4926
4902
  * "total": 0
4927
4903
  * }
@@ -4975,7 +4951,7 @@ interface components {
4975
4951
  * "active": true
4976
4952
  * }
4977
4953
  * ],
4978
- * "path": "example",
4954
+ * "path": ".agentmc/skills/skill.md",
4979
4955
  * "per_page": 25,
4980
4956
  * "total": 0
4981
4957
  * }
@@ -5036,7 +5012,7 @@ interface components {
5036
5012
  * "active": true
5037
5013
  * }
5038
5014
  * ],
5039
- * "path": "example",
5015
+ * "path": ".agentmc/skills/skill.md",
5040
5016
  * "per_page": 25,
5041
5017
  * "total": 0
5042
5018
  * }
@@ -5096,7 +5072,7 @@ interface components {
5096
5072
  * "active": true
5097
5073
  * }
5098
5074
  * ],
5099
- * "path": "example",
5075
+ * "path": ".agentmc/skills/skill.md",
5100
5076
  * "per_page": 25,
5101
5077
  * "total": 0
5102
5078
  * }
@@ -5163,7 +5139,7 @@ interface components {
5163
5139
  * "active": true
5164
5140
  * }
5165
5141
  * ],
5166
- * "path": "example",
5142
+ * "path": ".agentmc/skills/skill.md",
5167
5143
  * "per_page": 25,
5168
5144
  * "total": 0
5169
5145
  * }
@@ -5223,291 +5199,6 @@ interface components {
5223
5199
  [key: string]: unknown;
5224
5200
  }[]) | null;
5225
5201
  };
5226
- /**
5227
- * @description One-time agent registration payload. Resolve this schema from OpenAPI at runtime instead of hardcoding fields.
5228
- * @example {
5229
- * "host": "ip-10-0-3-42",
5230
- * "runtime_version": "2026.02.1",
5231
- * "capabilities": [
5232
- * "tasks",
5233
- * "calendar",
5234
- * "realtime"
5235
- * ],
5236
- * "agents_md": "# Existing AGENTS.md\n\n## Runtime\n- Keep heartbeat alive.\n",
5237
- * "models": [
5238
- * {
5239
- * "model_id": "openai/gpt-5-codex",
5240
- * "provider": "openai"
5241
- * },
5242
- * {
5243
- * "model_id": "anthropic/claude-sonnet-4-20250514",
5244
- * "provider": "anthropic"
5245
- * }
5246
- * ],
5247
- * "identity": {
5248
- * "name": "Jarvis",
5249
- * "creature": "robot",
5250
- * "vibe": "calm",
5251
- * "emoji": "🤖"
5252
- * },
5253
- * "metadata": {
5254
- * "hostname": "worker-01",
5255
- * "ip": "10.0.2.15",
5256
- * "network": {
5257
- * "private_ip": "10.0.2.15",
5258
- * "public_ip": "34.201.22.9"
5259
- * },
5260
- * "os": "Ubuntu",
5261
- * "os_version": "22.04",
5262
- * "arch": "x86_64",
5263
- * "cpu": "Intel Xeon",
5264
- * "cpu_cores": 8,
5265
- * "ram_gb": 32,
5266
- * "disk": {
5267
- * "total_bytes": 512110190592,
5268
- * "free_bytes": 321102110720
5269
- * },
5270
- * "uptime_seconds": 86400,
5271
- * "runtime": {
5272
- * "name": "codex",
5273
- * "version": "2026.02.1"
5274
- * },
5275
- * "identity": {
5276
- * "name": "Jarvis",
5277
- * "creature": "robot",
5278
- * "vibe": "calm"
5279
- * }
5280
- * }
5281
- * }
5282
- */
5283
- RegisterAgentApiRequest: {
5284
- /**
5285
- * @description Runtime host identifier (hostname or machine name).
5286
- * @example ip-10-0-3-42
5287
- */
5288
- host: string;
5289
- /**
5290
- * @description Required runtime/client version string for diagnostics.
5291
- * @example 2026.02.1
5292
- */
5293
- runtime_version: string;
5294
- /**
5295
- * @description Required (nullable) capability tags supported by this runtime.
5296
- * @example [
5297
- * "tasks",
5298
- * "calendar",
5299
- * "realtime"
5300
- * ]
5301
- */
5302
- capabilities: string[] | null;
5303
- /**
5304
- * @description Required current local AGENTS.md content captured by the runtime before first sync.
5305
- * @example # Existing AGENTS.md
5306
- *
5307
- * ## Runtime
5308
- * - Keep heartbeat alive.
5309
- */
5310
- agents_md: string;
5311
- /**
5312
- * @description Optional runtime LLM inventory. Send an array of model refs/objects or a structured runtime snapshot object.
5313
- * @example [
5314
- * {
5315
- * "model_id": "openai/gpt-5-codex",
5316
- * "provider": "openai"
5317
- * },
5318
- * {
5319
- * "model_id": "anthropic/claude-sonnet-4-20250514",
5320
- * "provider": "anthropic"
5321
- * }
5322
- * ]
5323
- */
5324
- models?: ((string | {
5325
- /**
5326
- * @description Full model ID in provider/model format.
5327
- * @example openai/gpt-5-codex
5328
- */
5329
- model_id: string;
5330
- /**
5331
- * @description Model provider slug.
5332
- * @example openai
5333
- */
5334
- provider?: string;
5335
- /**
5336
- * @description Optional display name.
5337
- * @example GPT-5 Codex
5338
- */
5339
- name?: string;
5340
- })[] | {
5341
- [key: string]: unknown;
5342
- }) | null;
5343
- /**
5344
- * @description Optional full agent identity payload persisted in agent metadata.
5345
- * @example {
5346
- * "name": "Jarvis",
5347
- * "creature": "robot",
5348
- * "vibe": "calm",
5349
- * "emoji": "🤖"
5350
- * }
5351
- */
5352
- identity?: unknown;
5353
- /**
5354
- * @description Required host telemetry snapshot for registration. Mirrors heartbeat host metadata and is saved as host metadata.
5355
- * @example {
5356
- * "hostname": "worker-01",
5357
- * "ip": "10.0.2.15",
5358
- * "network": {
5359
- * "private_ip": "10.0.2.15",
5360
- * "public_ip": "34.201.22.9"
5361
- * },
5362
- * "os": "Ubuntu",
5363
- * "os_version": "22.04",
5364
- * "arch": "x86_64",
5365
- * "cpu": "Intel Xeon",
5366
- * "cpu_cores": 8,
5367
- * "ram_gb": 32,
5368
- * "disk": {
5369
- * "total_bytes": 512110190592,
5370
- * "free_bytes": 321102110720
5371
- * },
5372
- * "uptime_seconds": 86400,
5373
- * "runtime": {
5374
- * "name": "codex",
5375
- * "version": "2026.02.1"
5376
- * },
5377
- * "identity": {
5378
- * "name": "Jarvis",
5379
- * "creature": "robot",
5380
- * "vibe": "calm"
5381
- * }
5382
- * }
5383
- */
5384
- metadata: {
5385
- /**
5386
- * @description Hostname.
5387
- * @example Example Name
5388
- */
5389
- hostname: string;
5390
- /**
5391
- * Format: ipv4
5392
- * @description Ip.
5393
- * @example example
5394
- */
5395
- ip: string;
5396
- /**
5397
- * @description Network.
5398
- * @example {
5399
- * "private_ip": "example",
5400
- * "public_ip": "example"
5401
- * }
5402
- */
5403
- network: {
5404
- /**
5405
- * Format: ipv4
5406
- * @description Private ip.
5407
- * @example example
5408
- */
5409
- private_ip: string;
5410
- /**
5411
- * Format: ipv4
5412
- * @description Public ip.
5413
- * @example example
5414
- */
5415
- public_ip: string;
5416
- };
5417
- /**
5418
- * @description Os.
5419
- * @example example
5420
- */
5421
- os: string;
5422
- /**
5423
- * @description Os version.
5424
- * @example example
5425
- */
5426
- os_version: string;
5427
- /**
5428
- * @description Arch.
5429
- * @example example
5430
- */
5431
- arch: string;
5432
- /**
5433
- * @description Cpu.
5434
- * @example example
5435
- */
5436
- cpu: string | {
5437
- [key: string]: unknown;
5438
- };
5439
- /**
5440
- * @description Cpu cores.
5441
- * @example 8
5442
- */
5443
- cpu_cores: number;
5444
- /**
5445
- * @description Ram gb.
5446
- * @example 32
5447
- */
5448
- ram_gb: number;
5449
- /**
5450
- * @description Disk.
5451
- * @example {
5452
- * "total_bytes": 0,
5453
- * "free_bytes": 0
5454
- * }
5455
- */
5456
- disk: {
5457
- /**
5458
- * @description Total bytes.
5459
- * @example 0
5460
- */
5461
- total_bytes: number;
5462
- /**
5463
- * @description Free bytes.
5464
- * @example 0
5465
- */
5466
- free_bytes: number;
5467
- };
5468
- /**
5469
- * @description Uptime seconds.
5470
- * @example 86400
5471
- */
5472
- uptime_seconds: number;
5473
- /**
5474
- * @description Runtime.
5475
- * @example {
5476
- * "name": "Example Name",
5477
- * "version": "example"
5478
- * }
5479
- */
5480
- runtime: {
5481
- /**
5482
- * @description Human-readable name.
5483
- * @example Example Name
5484
- */
5485
- name: string;
5486
- /**
5487
- * @description Version.
5488
- * @example example
5489
- */
5490
- version: string;
5491
- };
5492
- /**
5493
- * @description Optional identity payload persisted as host metadata.
5494
- * @example {
5495
- * "name": "Jarvis"
5496
- * }
5497
- */
5498
- identity?: ({
5499
- /**
5500
- * @description Human-readable name.
5501
- * @example Jarvis
5502
- */
5503
- name?: string;
5504
- } & {
5505
- [key: string]: unknown;
5506
- }) | string;
5507
- } & {
5508
- [key: string]: unknown;
5509
- };
5510
- };
5511
5202
  /**
5512
5203
  * @description Heartbeat payload that accepts liveness pings and optional host + runtime state.
5513
5204
  * @example {
@@ -6612,49 +6303,6 @@ interface components {
6612
6303
  };
6613
6304
  };
6614
6305
  responses: {
6615
- /** @description Agent registered and bearer token issued. */
6616
- AgentRegisterResponse: {
6617
- headers: {
6618
- [name: string]: unknown;
6619
- };
6620
- content: {
6621
- /**
6622
- * @example {
6623
- * "agent_id": 42,
6624
- * "agent_token": "mca_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
6625
- * "agent_instructions_endpoint": "https://agentmc.example.com/api/v1/agents/42/agent-instructions",
6626
- * "agent_authenticated_instructions_endpoint": "https://agentmc.example.com/api/v1/agents/42/agent-instructions",
6627
- * "agent_instructions_version": "32fe7fd14fca2d57c545f5f78f4a1c094f9ac1b3a1e8f6f9f8323b67a0ef9cc3",
6628
- * "openapi_url": "https://agentmc.example.com/api/openapi.json",
6629
- * "workspace": {
6630
- * "id": 7,
6631
- * "name": "AgentMC Demo Workspace"
6632
- * },
6633
- * "server_time": "2026-02-22T17:20:53Z",
6634
- * "first_sync_required": true
6635
- * }
6636
- */
6637
- "application/json": components["schemas"]["AgentRegisterResponse"];
6638
- };
6639
- };
6640
- /** @description Agent instructions returned. */
6641
- AgentInstructionsResponse: {
6642
- headers: {
6643
- [name: string]: unknown;
6644
- };
6645
- content: {
6646
- /**
6647
- * @example {
6648
- * "agent_instructions": "# Agent Instructions",
6649
- * "agent_instructions_version": "32fe7fd14fca2d57c545f5f78f4a1c094f9ac1b3a1e8f6f9f8323b67a0ef9cc3",
6650
- * "docs": [],
6651
- * "schedules": [],
6652
- * "config": {}
6653
- * }
6654
- */
6655
- "application/json": components["schemas"]["AgentInstructionsResponse"];
6656
- };
6657
- };
6658
6306
  /** @description Heartbeat accepted. */
6659
6307
  AgentHeartbeatResponse: {
6660
6308
  headers: {
@@ -6910,7 +6558,7 @@ interface components {
6910
6558
  * "active": true
6911
6559
  * }
6912
6560
  * ],
6913
- * "path": "example",
6561
+ * "path": ".agentmc/skills/skill.md",
6914
6562
  * "per_page": 25,
6915
6563
  * "total": 0
6916
6564
  * }
@@ -7087,6 +6735,38 @@ interface components {
7087
6735
  "application/json": components["schemas"]["AgentRealtimeSocketAuthResponse"];
7088
6736
  };
7089
6737
  };
6738
+ /** @description Instruction bundle returned. */
6739
+ AgentInstructionsResponse: {
6740
+ headers: {
6741
+ [name: string]: unknown;
6742
+ };
6743
+ content: {
6744
+ /**
6745
+ * @example {
6746
+ * "ok": true,
6747
+ * "changed": true,
6748
+ * "bundle_version": "bundle_2fa07fcadd6575cc",
6749
+ * "generated_at": "2026-02-25T14:10:00Z",
6750
+ * "defaults": {
6751
+ * "heartbeat_interval_seconds": 300
6752
+ * },
6753
+ * "agent": {
6754
+ * "id": 42,
6755
+ * "name": "Agent"
6756
+ * },
6757
+ * "files": [
6758
+ * {
6759
+ * "id": "skill.md",
6760
+ * "path": ".agentmc/skills/skill.md",
6761
+ * "content": "# AgentMC\n",
6762
+ * "sha256": "f96c95bd27dc9f3415cc0f4d817b5ec6f14185b6fcb5db9f6b6f14f648f8e9e4"
6763
+ * }
6764
+ * ]
6765
+ * }
6766
+ */
6767
+ "application/json": components["schemas"]["AgentInstructionsResponse"];
6768
+ };
6769
+ };
7090
6770
  /** @description Host returned. */
7091
6771
  HostDetailResponse: {
7092
6772
  headers: {
@@ -7318,64 +6998,6 @@ interface components {
7318
6998
  "application/json": components["schemas"]["CloseAgentRealtimeSessionApiRequest"];
7319
6999
  };
7320
7000
  };
7321
- RegisterAgentApiRequest: {
7322
- content: {
7323
- /**
7324
- * @example {
7325
- * "host": "ip-10-0-3-42",
7326
- * "runtime_version": "2026.02.1",
7327
- * "capabilities": [
7328
- * "tasks",
7329
- * "calendar",
7330
- * "realtime"
7331
- * ],
7332
- * "agents_md": "# Existing AGENTS.md\n\n## Runtime\n- Keep heartbeat alive.\n",
7333
- * "models": [
7334
- * {
7335
- * "model_id": "openai/gpt-5-codex",
7336
- * "provider": "openai"
7337
- * },
7338
- * {
7339
- * "model_id": "anthropic/claude-sonnet-4-20250514",
7340
- * "provider": "anthropic"
7341
- * }
7342
- * ],
7343
- * "identity": {
7344
- * "name": "Jarvis",
7345
- * "creature": "robot",
7346
- * "vibe": "calm"
7347
- * },
7348
- * "metadata": {
7349
- * "hostname": "worker-01",
7350
- * "ip": "10.0.2.15",
7351
- * "network": {
7352
- * "private_ip": "10.0.2.15",
7353
- * "public_ip": "34.201.22.9"
7354
- * },
7355
- * "os": "Ubuntu",
7356
- * "os_version": "22.04",
7357
- * "arch": "x86_64",
7358
- * "cpu": "Intel Xeon",
7359
- * "cpu_cores": 8,
7360
- * "ram_gb": 32,
7361
- * "disk": {
7362
- * "total_bytes": 512110190592,
7363
- * "free_bytes": 321102110720
7364
- * },
7365
- * "uptime_seconds": 86400,
7366
- * "runtime": {
7367
- * "name": "codex",
7368
- * "version": "2026.02.1"
7369
- * },
7370
- * "identity": {
7371
- * "name": "Jarvis"
7372
- * }
7373
- * }
7374
- * }
7375
- */
7376
- "application/json": components["schemas"]["RegisterAgentApiRequest"];
7377
- };
7378
- };
7379
7001
  StoreAgentHeartbeatApiRequest: {
7380
7002
  content: {
7381
7003
  /**
@@ -7697,61 +7319,22 @@ interface components {
7697
7319
  pathItems: never;
7698
7320
  }
7699
7321
  interface operations {
7700
- connectAgent: {
7322
+ getAgentInstructions: {
7701
7323
  parameters: {
7702
- query?: never;
7703
- header?: never;
7704
- path?: never;
7705
- cookie?: never;
7706
- };
7707
- requestBody: components["requestBodies"]["RegisterAgentApiRequest"];
7708
- responses: {
7709
- /** @description Agent connected and bearer token issued. */
7710
- 201: {
7711
- headers: {
7712
- [name: string]: unknown;
7713
- };
7714
- content: {
7715
- /**
7716
- * @example {
7717
- * "agent_id": 42,
7718
- * "agent_token": "mca_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
7719
- * "agent_instructions_endpoint": "https://agentmc.example.com/api/v1/agents/42/agent-instructions",
7720
- * "agent_authenticated_instructions_endpoint": "https://agentmc.example.com/api/v1/agents/42/agent-instructions",
7721
- * "agent_instructions_version": "32fe7fd14fca2d57c545f5f78f4a1c094f9ac1b3a1e8f6f9f8323b67a0ef9cc3",
7722
- * "openapi_url": "https://agentmc.example.com/api/openapi.json",
7723
- * "workspace": {
7724
- * "id": 7,
7725
- * "name": "AgentMC Demo Workspace"
7726
- * },
7727
- * "server_time": "2026-02-22T17:20:53Z",
7728
- * "first_sync_required": true
7729
- * }
7730
- */
7731
- "application/json": components["schemas"]["AgentRegisterResponse"];
7732
- };
7733
- };
7734
- 401: components["responses"]["ApiError401"];
7735
- 403: components["responses"]["ApiError403"];
7736
- 422: components["responses"]["ApiError422"];
7737
- };
7738
- };
7739
- agentInstructions: {
7740
- parameters: {
7741
- query?: never;
7742
- header?: never;
7743
- path: {
7324
+ query?: {
7744
7325
  /**
7745
- * @description Agent identifier.
7746
- * @example 1
7326
+ * @description Last applied instruction bundle version from local runtime state.
7327
+ * @example bundle_2fa07fcadd6575cc
7747
7328
  */
7748
- agent: number;
7329
+ current_bundle_version?: string;
7749
7330
  };
7331
+ header?: never;
7332
+ path?: never;
7750
7333
  cookie?: never;
7751
7334
  };
7752
7335
  requestBody?: never;
7753
7336
  responses: {
7754
- /** @description Agent instructions returned. */
7337
+ /** @description Instruction bundle returned. */
7755
7338
  200: {
7756
7339
  headers: {
7757
7340
  [name: string]: unknown;
@@ -7759,11 +7342,25 @@ interface operations {
7759
7342
  content: {
7760
7343
  /**
7761
7344
  * @example {
7762
- * "agent_instructions": "# Agent Instructions",
7763
- * "agent_instructions_version": "32fe7fd14fca2d57c545f5f78f4a1c094f9ac1b3a1e8f6f9f8323b67a0ef9cc3",
7764
- * "docs": [],
7765
- * "schedules": [],
7766
- * "config": {}
7345
+ * "ok": true,
7346
+ * "changed": true,
7347
+ * "bundle_version": "bundle_2fa07fcadd6575cc",
7348
+ * "generated_at": "2026-02-25T14:10:00Z",
7349
+ * "defaults": {
7350
+ * "heartbeat_interval_seconds": 300
7351
+ * },
7352
+ * "agent": {
7353
+ * "id": 42,
7354
+ * "name": "Agent"
7355
+ * },
7356
+ * "files": [
7357
+ * {
7358
+ * "id": "skill.md",
7359
+ * "path": ".agentmc/skills/skill.md",
7360
+ * "content": "# AgentMC\n",
7361
+ * "sha256": "f96c95bd27dc9f3415cc0f4d817b5ec6f14185b6fcb5db9f6b6f14f648f8e9e4"
7362
+ * }
7363
+ * ]
7767
7364
  * }
7768
7365
  */
7769
7366
  "application/json": components["schemas"]["AgentInstructionsResponse"];
@@ -7771,7 +7368,7 @@ interface operations {
7771
7368
  };
7772
7369
  401: components["responses"]["ApiError401"];
7773
7370
  403: components["responses"]["ApiError403"];
7774
- 404: components["responses"]["ApiError404"];
7371
+ 422: components["responses"]["ApiError422"];
7775
7372
  };
7776
7373
  };
7777
7374
  agentHeartbeat: {
@@ -7975,7 +7572,7 @@ interface operations {
7975
7572
  * "active": true
7976
7573
  * }
7977
7574
  * ],
7978
- * "path": "example",
7575
+ * "path": ".agentmc/skills/skill.md",
7979
7576
  * "per_page": 25,
7980
7577
  * "total": 0
7981
7578
  * }
@@ -8184,7 +7781,7 @@ interface operations {
8184
7781
  * "active": true
8185
7782
  * }
8186
7783
  * ],
8187
- * "path": "example",
7784
+ * "path": ".agentmc/skills/skill.md",
8188
7785
  * "per_page": 25,
8189
7786
  * "total": 0
8190
7787
  * }
@@ -8863,7 +8460,7 @@ interface operations {
8863
8460
  * "active": true
8864
8461
  * }
8865
8462
  * ],
8866
- * "path": "example",
8463
+ * "path": ".agentmc/skills/skill.md",
8867
8464
  * "per_page": 25,
8868
8465
  * "total": 0
8869
8466
  * }
@@ -9280,7 +8877,7 @@ interface operations {
9280
8877
  * "active": true
9281
8878
  * }
9282
8879
  * ],
9283
- * "path": "example",
8880
+ * "path": ".agentmc/skills/skill.md",
9284
8881
  * "per_page": 25,
9285
8882
  * "total": 0
9286
8883
  * }
@@ -9556,7 +9153,7 @@ interface operations {
9556
9153
  * "active": true
9557
9154
  * }
9558
9155
  * ],
9559
- * "path": "example",
9156
+ * "path": ".agentmc/skills/skill.md",
9560
9157
  * "per_page": 25,
9561
9158
  * "total": 0
9562
9159
  * }
@@ -9781,7 +9378,6 @@ interface operations {
9781
9378
  * ]
9782
9379
  * },
9783
9380
  * "last_seen_at": "2026-02-24T02:11:00Z",
9784
- * "first_sync_at": "2026-02-24T02:01:00Z",
9785
9381
  * "tasks_count": 3,
9786
9382
  * "created_at": "2026-02-24T01:56:00Z",
9787
9383
  * "updated_at": "2026-02-24T02:11:00Z"
@@ -9804,7 +9400,7 @@ interface operations {
9804
9400
  * "active": true
9805
9401
  * }
9806
9402
  * ],
9807
- * "path": "example",
9403
+ * "path": ".agentmc/skills/skill.md",
9808
9404
  * "per_page": 25,
9809
9405
  * "total": 0
9810
9406
  * }
@@ -9872,7 +9468,7 @@ interface operations {
9872
9468
  * "active": true
9873
9469
  * }
9874
9470
  * ],
9875
- * "path": "example",
9471
+ * "path": ".agentmc/skills/skill.md",
9876
9472
  * "per_page": 25,
9877
9473
  * "total": 0
9878
9474
  * }
@@ -9940,7 +9536,7 @@ interface operations {
9940
9536
  * "active": true
9941
9537
  * }
9942
9538
  * ],
9943
- * "path": "example",
9539
+ * "path": ".agentmc/skills/skill.md",
9944
9540
  * "per_page": 25,
9945
9541
  * "total": 0
9946
9542
  * }
@@ -10031,7 +9627,7 @@ interface operations {
10031
9627
  * "active": true
10032
9628
  * }
10033
9629
  * ],
10034
- * "path": "example",
9630
+ * "path": ".agentmc/skills/skill.md",
10035
9631
  * "per_page": 25,
10036
9632
  * "total": 0
10037
9633
  * }
@@ -10263,7 +9859,7 @@ interface operations {
10263
9859
  * "active": true
10264
9860
  * }
10265
9861
  * ],
10266
- * "path": "example",
9862
+ * "path": ".agentmc/skills/skill.md",
10267
9863
  * "per_page": 25,
10268
9864
  * "total": 0
10269
9865
  * }