@salesforcedevs/dx-components 1.19.4-test → 1.20.0-rnb-scroll

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.
@@ -1300,56 +1300,64 @@ const ampscriptGrammar = {
1300
1300
  }
1301
1301
  };
1302
1302
 
1303
- const afscriptGrammar = {
1304
- name: "afscript",
1305
- scopeName: "source.afscript",
1306
- fileTypes: ["afscript"],
1303
+ const agentscriptGrammar = {
1304
+ name: "agentscript",
1305
+ scopeName: "source.agentscript",
1306
+ fileTypes: ["agent"],
1307
1307
  patterns: [
1308
1308
  {
1309
- name: "comment.line.afscript",
1310
- match: "#.*$"
1309
+ name: "comment.line.agentscript",
1310
+ match: "(^|[ \t]+)#.*$"
1311
1311
  },
1312
1312
  {
1313
- name: "meta.config.afscript",
1313
+ name: "meta.config.agentscript",
1314
1314
  begin: "^(config):",
1315
1315
  beginCaptures: {
1316
- "1": { name: "keyword.control.block.afscript" }
1316
+ "1": { name: "keyword.control.block.agentscript" }
1317
1317
  },
1318
1318
  end: "^(?=topic|variables|start_agent|system|$)",
1319
1319
  patterns: [
1320
1320
  {
1321
- name: "keyword.config.key.afscript",
1322
- match: "^\\s+(model_provider|user_locale|locale|agent_id|agent_name|agent_version|agent_type|default_agent_user|language|developer_name|description)(?=:)"
1321
+ name: "comment.line.agentscript",
1322
+ match: "(^|[ \t]+)#.*$"
1323
1323
  },
1324
1324
  {
1325
- name: "entity.name.config.afscript",
1325
+ name: "keyword.config.key.agentscript",
1326
+ match: "^\\s+(model_provider|user_locale|locale|agent_id|agent_name|agent_version|agent_type|agent_label|default_agent_user|language|developer_name|agent_description|enable_enhanced_event_logs)(?=:)"
1327
+ },
1328
+ {
1329
+ name: "entity.name.config.agentscript",
1326
1330
  match: "^\\s+([a-zA-Z_][a-zA-Z0-9_]*)(?=:)"
1327
1331
  },
1328
1332
  { include: "#values" }
1329
1333
  ]
1330
1334
  },
1331
1335
  {
1332
- name: "meta.variables.afscript",
1336
+ name: "meta.variables.agentscript",
1333
1337
  begin: "^(variables):",
1334
1338
  beginCaptures: {
1335
- "1": { name: "keyword.control.block.afscript" }
1339
+ "1": { name: "keyword.control.block.agentscript" }
1336
1340
  },
1337
1341
  end: "^(?=topic|config|start_agent|system|$)",
1338
1342
  patterns: [
1339
1343
  {
1340
- name: "keyword.variable.metadata.afscript",
1344
+ name: "comment.line.agentscript",
1345
+ match: "(^|[ \t]+)#.*$"
1346
+ },
1347
+ {
1348
+ name: "keyword.variable.metadata.agentscript",
1341
1349
  match: "^\\s{8}(description|source)(?=:)"
1342
1350
  },
1343
1351
  {
1344
- name: "variable.definition.afscript",
1352
+ name: "variable.definition.agentscript",
1345
1353
  match: "^\\s+([a-zA-Z_][a-zA-Z0-9_]*)(?=:)"
1346
1354
  },
1347
1355
  {
1348
- name: "keyword.variable.source.afscript",
1356
+ name: "keyword.variable.source.agentscript",
1349
1357
  match: "\\b(custom|context)\\b"
1350
1358
  },
1351
1359
  {
1352
- name: "storage.type.afscript",
1360
+ name: "storage.type.agentscript",
1353
1361
  match: "\\b(string|number|boolean|object|date|timestamp|currency|id|list)\\b"
1354
1362
  },
1355
1363
  { include: "#json-structures" },
@@ -1357,19 +1365,23 @@ const afscriptGrammar = {
1357
1365
  ]
1358
1366
  },
1359
1367
  {
1360
- name: "meta.system.afscript",
1368
+ name: "meta.system.agentscript",
1361
1369
  begin: "^(system):",
1362
1370
  beginCaptures: {
1363
- "1": { name: "keyword.control.block.afscript" }
1371
+ "1": { name: "keyword.control.block.agentscript" }
1364
1372
  },
1365
1373
  end: "^(?=topic|config|variables|start_agent|$)",
1366
1374
  patterns: [
1367
1375
  {
1368
- name: "keyword.system.afscript",
1376
+ name: "comment.line.agentscript",
1377
+ match: "(^|[ \t]+)#.*$"
1378
+ },
1379
+ {
1380
+ name: "keyword.system.agentscript",
1369
1381
  match: "\\b(instructions|messages|prompt)(?=:)"
1370
1382
  },
1371
1383
  {
1372
- name: "keyword.system.message-type.afscript",
1384
+ name: "keyword.system.message-type.agentscript",
1373
1385
  match: "\\b(error|welcome)(?=:)"
1374
1386
  },
1375
1387
  { include: "#multiline-instructions" },
@@ -1377,35 +1389,33 @@ const afscriptGrammar = {
1377
1389
  ]
1378
1390
  },
1379
1391
  {
1380
- name: "meta.topic.afscript",
1392
+ name: "meta.topic.agentscript",
1381
1393
  begin: "^(topic)\\s+([a-zA-Z_][a-zA-Z0-9_]*):",
1382
1394
  beginCaptures: {
1383
- "1": { name: "keyword.control.block.afscript" },
1384
- "2": { name: "entity.name.topic.afscript" }
1395
+ "1": { name: "keyword.control.block.agentscript" },
1396
+ "2": { name: "entity.name.topic.agentscript" }
1385
1397
  },
1386
1398
  end: "^(?=topic|config|variables|start_agent|system|$)",
1387
1399
  patterns: [
1400
+ {
1401
+ name: "comment.line.agentscript",
1402
+ match: "(^|[ \t]+)#.*$"
1403
+ },
1388
1404
  { include: "#action-definitions" },
1389
1405
  { include: "#agent-task" },
1390
1406
  { include: "#task-content" },
1407
+ { include: "#description-section" },
1391
1408
  { include: "#override-instructions" },
1409
+ { include: "#before-reasoning" },
1392
1410
  { include: "#reasoning-instructions" },
1393
1411
  { include: "#reasoning-actions" },
1394
1412
  { include: "#directives" },
1395
1413
  {
1396
- name: "keyword.topic.section.afscript",
1397
- match: "\\b(actions|action_definitions|before_reasoning|after_reasoning|reasoning_actions|override|variables|instructions)(?=:)"
1398
- },
1399
- {
1400
- name: "keyword.topic.section.afscript",
1401
- match: "^\\s{4}(description)(?=:)"
1402
- },
1403
- {
1404
- name: "keyword.override.path.afscript",
1405
- match: "\\b(system\\.instructions)\\b"
1414
+ name: "keyword.topic.section.agentscript",
1415
+ match: "\\b(action_definitions|after_reasoning|reasoning_actions|override|variables|instructions)(?=:)"
1406
1416
  },
1407
1417
  {
1408
- name: "storage.type.afscript",
1418
+ name: "storage.type.agentscript",
1409
1419
  match: "\\b(string|number|boolean|object|date|timestamp|currency|id|list)\\b"
1410
1420
  },
1411
1421
  { include: "#operators" },
@@ -1414,31 +1424,33 @@ const afscriptGrammar = {
1414
1424
  ]
1415
1425
  },
1416
1426
  {
1417
- name: "meta.start-agent.afscript",
1427
+ name: "meta.start-agent.agentscript",
1418
1428
  begin: "^(start_agent)(?:\\s+([a-zA-Z_][a-zA-Z0-9_]*))?",
1419
1429
  beginCaptures: {
1420
- "1": { name: "keyword.control.block.afscript" },
1421
- "2": { name: "entity.name.agent.afscript" }
1430
+ "1": { name: "keyword.control.block.agentscript" },
1431
+ "2": { name: "entity.name.agent.agentscript" }
1422
1432
  },
1423
1433
  end: "^(?=topic|config|variables|start_agent|system|$)",
1424
1434
  patterns: [
1435
+ {
1436
+ name: "comment.line.agentscript",
1437
+ match: "(^|[ \t]+)#.*$"
1438
+ },
1425
1439
  { include: "#action-definitions" },
1426
1440
  { include: "#agent-task" },
1427
1441
  { include: "#task-content" },
1442
+ { include: "#description-section" },
1428
1443
  { include: "#override-instructions" },
1444
+ { include: "#before-reasoning" },
1429
1445
  { include: "#reasoning-instructions" },
1430
1446
  { include: "#reasoning-actions" },
1431
1447
  { include: "#directives" },
1432
1448
  {
1433
- name: "keyword.topic.section.afscript",
1434
- match: "\\b(actions|action_definitions|before_reasoning|after_reasoning|reasoning_actions|override|variables|instructions)(?=:)"
1449
+ name: "keyword.topic.section.agentscript",
1450
+ match: "\\b(actions|action_definitions|after_reasoning|reasoning_actions|reasoning_instructions|override|variables|instructions)(?=:)"
1435
1451
  },
1436
1452
  {
1437
- name: "keyword.topic.section.afscript",
1438
- match: "^\\s{4}(description)(?=:)"
1439
- },
1440
- {
1441
- name: "storage.type.afscript",
1453
+ name: "storage.type.agentscript",
1442
1454
  match: "\\b(string|number|boolean|object|date|timestamp|currency|id|list)\\b"
1443
1455
  },
1444
1456
  { include: "#operators" },
@@ -1447,94 +1459,94 @@ const afscriptGrammar = {
1447
1459
  ]
1448
1460
  },
1449
1461
  {
1450
- name: "keyword.control.conditional.available.afscript",
1462
+ name: "keyword.control.conditional.available.agentscript",
1451
1463
  match: "\\bavailable when\\b"
1452
1464
  },
1453
1465
  {
1454
- name: "meta.alias.assignment.afscript",
1466
+ name: "meta.alias.assignment.agentscript",
1455
1467
  match: "\\b(as)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\b",
1456
1468
  captures: {
1457
- "1": { name: "keyword.control.afscript" },
1458
- "2": { name: "entity.name.alias.afscript" }
1469
+ "1": { name: "keyword.control.agentscript" },
1470
+ "2": { name: "entity.name.alias.agentscript" }
1459
1471
  }
1460
1472
  },
1461
1473
  {
1462
- name: "keyword.control.afscript",
1474
+ name: "keyword.control.agentscript",
1463
1475
  match: "\\b(if|else|run|set|with|and|or|implementation)\\b|\\btransition to\\b"
1464
1476
  },
1465
1477
  {
1466
- name: "constant.language.afscript",
1478
+ name: "constant.language.agentscript",
1467
1479
  match: "\\b(True|False)\\b"
1468
1480
  },
1469
1481
  {
1470
- name: "constant.other.timestamp.afscript",
1482
+ name: "constant.other.timestamp.agentscript",
1471
1483
  match: "(?<=\\s|=|,|\\[)\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d+)?)?Z?\\b"
1472
1484
  },
1473
1485
  {
1474
- name: "constant.other.date.afscript",
1486
+ name: "constant.other.date.agentscript",
1475
1487
  match: "(?<=\\s|=|,|\\[)\\d{4}-\\d{2}-\\d{2}(?!T)\\b"
1476
1488
  },
1477
1489
  {
1478
- name: "constant.numeric.afscript",
1490
+ name: "constant.numeric.agentscript",
1479
1491
  match: "\\b\\d+(\\.\\d+)?\\b"
1480
1492
  },
1481
1493
  {
1482
- name: "string.quoted.double.afscript",
1494
+ name: "string.quoted.double.agentscript",
1483
1495
  begin: '"',
1484
1496
  end: '"',
1485
1497
  patterns: [
1486
1498
  { include: "#template-expression" },
1487
1499
  {
1488
- name: "constant.character.escape.afscript",
1500
+ name: "constant.character.escape.agentscript",
1489
1501
  match: "\\\\."
1490
1502
  }
1491
1503
  ]
1492
1504
  },
1493
1505
  {
1494
- name: "meta.utils.call.afscript",
1506
+ name: "meta.utils.call.agentscript",
1495
1507
  match: "(@utils)(\\.)([a-zA-Z_][a-zA-Z0-9_]*)\\b",
1496
1508
  captures: {
1497
- "1": { name: "support.class.afscript" },
1498
- "2": { name: "punctuation.accessor.dot.afscript" },
1499
- "3": { name: "entity.name.function.afscript" }
1509
+ "1": { name: "support.class.agentscript" },
1510
+ "2": { name: "punctuation.accessor.dot.agentscript" },
1511
+ "3": { name: "entity.name.function.agentscript" }
1500
1512
  }
1501
1513
  },
1502
1514
  {
1503
- name: "keyword.control.transition.afscript",
1515
+ name: "keyword.control.transition.agentscript",
1504
1516
  match: "\\s+to\\s+"
1505
1517
  },
1506
1518
  {
1507
- name: "meta.variable.reference.afscript",
1519
+ name: "meta.variable.reference.agentscript",
1508
1520
  match: "(@)(variable|result|input|topic|action)(\\.)([a-zA-Z_][a-zA-Z0-9_]*)",
1509
1521
  captures: {
1510
- "1": { name: "support.class.afscript" },
1511
- "2": { name: "support.class.afscript" },
1512
- "3": { name: "punctuation.accessor.dot.afscript" },
1513
- "4": { name: "variable.other.member.afscript" }
1522
+ "1": { name: "support.class.agentscript" },
1523
+ "2": { name: "support.class.agentscript" },
1524
+ "3": { name: "punctuation.accessor.dot.agentscript" },
1525
+ "4": { name: "variable.other.member.agentscript" }
1514
1526
  }
1515
1527
  },
1516
1528
  {
1517
- name: "support.class.afscript",
1529
+ name: "support.class.agentscript",
1518
1530
  match: "@[a-zA-Z_][a-zA-Z0-9_]*"
1519
1531
  },
1520
1532
  {
1521
- name: "variable.other.member.afscript",
1533
+ name: "variable.other.member.agentscript",
1522
1534
  match: "(?<=@(?:variable|topic|input|action|result)\\.)\\b[a-zA-Z_][a-zA-Z0-9_]*\\b"
1523
1535
  },
1524
1536
  {
1525
- name: "operator.arithmetic.afscript",
1537
+ name: "operator.arithmetic.agentscript",
1526
1538
  match: "[+\\-\\*/%]"
1527
1539
  },
1528
1540
  {
1529
- name: "operator.comparison.afscript",
1541
+ name: "operator.comparison.agentscript",
1530
1542
  match: "==|!=|<=|>=|<|>"
1531
1543
  },
1532
1544
  {
1533
- name: "operator.assignment.afscript",
1545
+ name: "operator.assignment.agentscript",
1534
1546
  match: "(?<![=!<>])=(?!=)"
1535
1547
  },
1536
1548
  {
1537
- name: "punctuation.definition.afscript",
1549
+ name: "punctuation.definition.agentscript",
1538
1550
  match: "[{}\\[\\]()]"
1539
1551
  },
1540
1552
  { include: "#punctuation" },
@@ -1543,39 +1555,43 @@ const afscriptGrammar = {
1543
1555
  repository: {
1544
1556
  values: {
1545
1557
  patterns: [
1558
+ {
1559
+ name: "comment.line.agentscript",
1560
+ match: "(^|[ \t]+)#.*$"
1561
+ },
1546
1562
  { include: "#operators" },
1547
1563
  { include: "#template-expression" },
1548
1564
  { include: "#punctuation" },
1549
1565
  {
1550
- name: "string.quoted.double.afscript",
1566
+ name: "string.quoted.double.agentscript",
1551
1567
  begin: '"',
1552
1568
  end: '"',
1553
1569
  patterns: [
1554
1570
  { include: "#template-expression" },
1555
1571
  {
1556
- name: "constant.character.escape.afscript",
1572
+ name: "constant.character.escape.agentscript",
1557
1573
  match: "\\\\."
1558
1574
  }
1559
1575
  ]
1560
1576
  },
1561
1577
  {
1562
- name: "constant.language.afscript",
1578
+ name: "constant.language.agentscript",
1563
1579
  match: "\\b(True|False)\\b"
1564
1580
  },
1565
1581
  {
1566
- name: "constant.other.timestamp.afscript",
1582
+ name: "constant.other.timestamp.agentscript",
1567
1583
  match: "(?<=\\s|=|,|\\[)\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d+)?)?Z?\\b"
1568
1584
  },
1569
1585
  {
1570
- name: "constant.other.date.afscript",
1586
+ name: "constant.other.date.agentscript",
1571
1587
  match: "(?<=\\s|=|,|\\[)\\d{4}-\\d{2}-\\d{2}(?!T)\\b"
1572
1588
  },
1573
1589
  {
1574
- name: "constant.numeric.afscript",
1590
+ name: "constant.numeric.agentscript",
1575
1591
  match: "\\b\\d+(\\.\\d+)?\\b"
1576
1592
  },
1577
1593
  {
1578
- name: "variable.other.member.afscript",
1594
+ name: "variable.other.member.agentscript",
1579
1595
  match: "(?<=@(?:variable|topic|input|action|result)\\.)\\b[a-zA-Z_][a-zA-Z0-9_]*\\b"
1580
1596
  }
1581
1597
  ]
@@ -1583,37 +1599,37 @@ const afscriptGrammar = {
1583
1599
  "json-structures": {
1584
1600
  patterns: [
1585
1601
  {
1586
- name: "constant.language.json.afscript",
1602
+ name: "constant.language.json.agentscript",
1587
1603
  match: "=\\s*\\{\\}"
1588
1604
  },
1589
1605
  {
1590
- name: "meta.structure.dictionary.json.afscript",
1606
+ name: "meta.structure.dictionary.json.agentscript",
1591
1607
  begin: "=\\s*(\\{)",
1592
1608
  beginCaptures: {
1593
1609
  "1": {
1594
- name: "punctuation.definition.dictionary.begin.json.afscript"
1610
+ name: "punctuation.definition.dictionary.begin.json.agentscript"
1595
1611
  }
1596
1612
  },
1597
1613
  end: "(\\})",
1598
1614
  endCaptures: {
1599
1615
  "1": {
1600
- name: "punctuation.definition.dictionary.end.json.afscript"
1616
+ name: "punctuation.definition.dictionary.end.json.agentscript"
1601
1617
  }
1602
1618
  },
1603
1619
  patterns: [{ include: "#json-value" }]
1604
1620
  },
1605
1621
  {
1606
- name: "meta.structure.array.json.afscript",
1622
+ name: "meta.structure.array.json.agentscript",
1607
1623
  begin: "=\\s*(\\[)",
1608
1624
  beginCaptures: {
1609
1625
  "1": {
1610
- name: "punctuation.definition.array.begin.json.afscript"
1626
+ name: "punctuation.definition.array.begin.json.agentscript"
1611
1627
  }
1612
1628
  },
1613
1629
  end: "(\\])",
1614
1630
  endCaptures: {
1615
1631
  "1": {
1616
- name: "punctuation.definition.array.end.json.afscript"
1632
+ name: "punctuation.definition.array.end.json.agentscript"
1617
1633
  }
1618
1634
  },
1619
1635
  patterns: [{ include: "#json-value" }]
@@ -1621,36 +1637,40 @@ const afscriptGrammar = {
1621
1637
  ]
1622
1638
  },
1623
1639
  "multiline-instructions": {
1624
- name: "meta.multiline.instructions.afscript",
1640
+ name: "meta.multiline.instructions.agentscript",
1625
1641
  begin: "^(\\s+)(instructions:)\\s*$",
1626
1642
  beginCaptures: {
1627
- "2": { name: "keyword.system.afscript" }
1643
+ "2": { name: "keyword.system.agentscript" }
1628
1644
  },
1629
1645
  end: "^(?=\\s{4}(messages|prompt)\\b)|^(?=\\S)|^(?=topic\\b|config\\b|variables\\b|start_agent\\b|system\\b)",
1630
1646
  patterns: [
1631
1647
  {
1632
- name: "string.heredoc.afscript",
1648
+ name: "comment.line.agentscript",
1649
+ match: "(^|[ \t]+)#.*$"
1650
+ },
1651
+ {
1652
+ name: "string.heredoc.agentscript",
1633
1653
  begin: "(>>)\\s*$",
1634
1654
  beginCaptures: {
1635
- "1": { name: "keyword.operator.heredoc.afscript" }
1655
+ "1": { name: "keyword.operator.heredoc.agentscript" }
1636
1656
  },
1637
1657
  end: "^(?=\\s{4}(messages|prompt)\\b)|^(?=\\S)|^(?=topic\\b|config\\b|variables\\b|start_agent\\b|system\\b)",
1638
1658
  patterns: [
1639
1659
  { include: "#template-expression" },
1640
1660
  {
1641
- name: "string.unquoted.heredoc.afscript",
1661
+ name: "string.unquoted.heredoc.agentscript",
1642
1662
  match: "."
1643
1663
  }
1644
1664
  ]
1645
1665
  },
1646
1666
  {
1647
- name: "string.unquoted.multiline.afscript",
1667
+ name: "string.unquoted.multiline.agentscript",
1648
1668
  begin: "^\\s+",
1649
1669
  end: "^(?=\\s{4}(messages|prompt)\\b)|^(?=\\S)|^(?=topic\\b|config\\b|variables\\b|start_agent\\b|system\\b)",
1650
1670
  patterns: [
1651
1671
  { include: "#template-expression" },
1652
1672
  {
1653
- name: "string.unquoted.instructions.afscript",
1673
+ name: "string.unquoted.instructions.agentscript",
1654
1674
  match: ".*"
1655
1675
  }
1656
1676
  ]
@@ -1660,31 +1680,35 @@ const afscriptGrammar = {
1660
1680
  "agent-task": {
1661
1681
  patterns: [
1662
1682
  {
1663
- name: "string.heredoc.afscript",
1683
+ name: "comment.line.agentscript",
1684
+ match: "(^|[ \t]+)#.*$"
1685
+ },
1686
+ {
1687
+ name: "string.heredoc.agentscript",
1664
1688
  begin: "(>>)\\s*$",
1665
1689
  beginCaptures: {
1666
- "1": { name: "keyword.operator.heredoc.afscript" }
1690
+ "1": { name: "keyword.operator.heredoc.agentscript" }
1667
1691
  },
1668
1692
  end: "^(?=\\S)",
1669
1693
  patterns: [
1670
1694
  { include: "#template-expression" },
1671
1695
  {
1672
- name: "string.unquoted.heredoc.afscript",
1696
+ name: "string.unquoted.heredoc.agentscript",
1673
1697
  match: ".*"
1674
1698
  }
1675
1699
  ]
1676
1700
  },
1677
1701
  {
1678
- name: "string.heredoc.quoted.afscript",
1702
+ name: "string.heredoc.quoted.agentscript",
1679
1703
  begin: '(>>)\\s*"',
1680
1704
  beginCaptures: {
1681
- "1": { name: "keyword.operator.heredoc.afscript" }
1705
+ "1": { name: "keyword.operator.heredoc.agentscript" }
1682
1706
  },
1683
1707
  end: '"',
1684
1708
  patterns: [
1685
1709
  { include: "#template-expression" },
1686
1710
  {
1687
- name: "constant.character.escape.afscript",
1711
+ name: "constant.character.escape.agentscript",
1688
1712
  match: "\\\\."
1689
1713
  }
1690
1714
  ]
@@ -1692,118 +1716,211 @@ const afscriptGrammar = {
1692
1716
  ]
1693
1717
  },
1694
1718
  "task-content": {
1695
- name: "meta.task.content.afscript",
1719
+ name: "meta.task.content.agentscript",
1696
1720
  begin: "\\b(task):\\s*$",
1697
1721
  beginCaptures: {
1698
- "1": { name: "keyword.topic.section.afscript" }
1722
+ "1": { name: "keyword.topic.section.agentscript" }
1699
1723
  },
1700
1724
  end: "^(?=\\S)",
1701
1725
  patterns: [
1726
+ {
1727
+ name: "comment.line.agentscript",
1728
+ match: "(^|[ \t]+)#.*$"
1729
+ },
1702
1730
  { include: "#template-expression" },
1703
1731
  {
1704
- name: "string.unquoted.task.afscript",
1732
+ name: "string.unquoted.task.agentscript",
1705
1733
  match: ".*"
1706
1734
  }
1707
1735
  ]
1708
1736
  },
1737
+ "description-section": {
1738
+ name: "meta.description.section.agentscript",
1739
+ begin: "^(\\s{4})(description):\\s*",
1740
+ beginCaptures: {
1741
+ "2": { name: "keyword.topic.section.agentscript" }
1742
+ },
1743
+ end: "^(?=\\s{4}(reasoning_instructions|reasoning_actions|actions|before_reasoning|after_reasoning|variables|instructions)\\b)|^(?=\\s{4}override\\s+system\\.instructions:)|^(?=topic\\b|config\\b|variables\\b|start_agent\\b|system\\b)",
1744
+ patterns: [
1745
+ {
1746
+ name: "comment.line.agentscript",
1747
+ match: "(^|[ \t]+)#.*$"
1748
+ },
1749
+ {
1750
+ name: "string.quoted.double.agentscript",
1751
+ begin: '"',
1752
+ end: '"',
1753
+ patterns: [{ include: "#template-expression" }]
1754
+ },
1755
+ { include: "#values" }
1756
+ ]
1757
+ },
1709
1758
  "override-instructions": {
1710
- name: "meta.override.instructions.afscript",
1711
- begin: "^(\\s+)(override system\\.instructions):\\s*$",
1759
+ name: "meta.override.instructions.agentscript",
1760
+ begin: "^(\\s+)(override system\\.instructions):\\s*(.*)$",
1712
1761
  beginCaptures: {
1713
- "2": { name: "keyword.override.path.afscript" }
1762
+ "2": { name: "keyword.override.path.agentscript" },
1763
+ "3": { name: "string.quoted.double.agentscript" }
1714
1764
  },
1715
- end: "^(?=\\s{4}(reasoning_actions|actions|before_reasoning|after_reasoning|description|variables|instructions|override)\\b)|^(?=\\s*$)|^(?=topic\\b|config\\b|variables\\b|start_agent\\b|system\\b)",
1765
+ end: "^(?=\\s{4}(reasoning_instructions|reasoning_actions|actions|before_reasoning|after_reasoning|description|variables|instructions)\\b)|^(?=\\s{4}override\\s+system\\.instructions:)|^(?=topic\\b|config\\b|variables\\b|start_agent\\b|system\\b)",
1716
1766
  patterns: [
1717
1767
  {
1718
- name: "string.heredoc.afscript",
1768
+ name: "comment.line.agentscript",
1769
+ match: "(^|[ \t]+)#.*$"
1770
+ },
1771
+ {
1772
+ name: "string.heredoc.agentscript",
1719
1773
  begin: "(>>)\\s*$",
1720
1774
  beginCaptures: {
1721
- "1": { name: "keyword.operator.heredoc.afscript" }
1775
+ "1": { name: "keyword.operator.heredoc.agentscript" }
1722
1776
  },
1723
- end: "^(?=\\s{4}(reasoning_actions|actions|before_reasoning|after_reasoning|description|variables|instructions|override)\\b)|^(?=\\s*$)|^(?=topic\\b|config\\b|variables\\b|start_agent\\b|system\\b)",
1777
+ end: "^(?=\\s{0,4}\\S)|^(?=\\s{4}(reasoning_actions|actions|before_reasoning|after_reasoning|description|variables|instructions|override|reasoning_instructions)\\b)|^(?=topic\\b|config\\b|variables\\b|start_agent\\b|system\\b)",
1724
1778
  patterns: [
1725
1779
  { include: "#template-expression" },
1726
1780
  {
1727
- name: "string.unquoted.heredoc.afscript",
1781
+ name: "string.unquoted.heredoc.agentscript",
1728
1782
  match: "."
1729
1783
  }
1730
1784
  ]
1731
1785
  },
1732
1786
  {
1733
- name: "string.heredoc.quoted.afscript",
1787
+ name: "string.heredoc.quoted.agentscript",
1734
1788
  begin: '(>>)\\s*"',
1735
1789
  beginCaptures: {
1736
- "1": { name: "keyword.operator.heredoc.afscript" }
1790
+ "1": { name: "keyword.operator.heredoc.agentscript" }
1737
1791
  },
1738
1792
  end: '"',
1739
1793
  patterns: [
1740
1794
  { include: "#template-expression" },
1741
1795
  {
1742
- name: "string.unquoted.heredoc.afscript",
1796
+ name: "string.unquoted.heredoc.agentscript",
1743
1797
  match: "."
1744
1798
  }
1745
1799
  ]
1746
1800
  },
1747
1801
  {
1748
- name: "string.unquoted.multiline.afscript",
1802
+ name: "string.unquoted.multiline.agentscript",
1749
1803
  begin: "^\\s+",
1750
- end: "^(?=\\s{4}(reasoning_actions|actions|before_reasoning|after_reasoning|description|variables|instructions|override)\\b)|^(?=\\s*$)|^(?=topic\\b|config\\b|variables\\b|start_agent\\b|system\\b)",
1804
+ end: "^(?=\\s{4}(reasoning_instructions|reasoning_actions|actions|before_reasoning|after_reasoning|description|variables|instructions)\\b)|^(?=\\s{4}override\\s+system\\.instructions:)|^(?=topic\\b|config\\b|variables\\b|start_agent\\b|system\\b)|^\\s*$",
1751
1805
  patterns: [
1752
1806
  { include: "#template-expression" },
1753
1807
  {
1754
- name: "string.unquoted.instructions.afscript",
1808
+ name: "string.unquoted.instructions.agentscript",
1755
1809
  match: ".*"
1756
1810
  }
1757
1811
  ]
1758
1812
  }
1759
1813
  ]
1760
1814
  },
1815
+ "before-reasoning": {
1816
+ name: "meta.before-reasoning.agentscript",
1817
+ begin: "^(\\s+)(before_reasoning):",
1818
+ beginCaptures: {
1819
+ "2": { name: "keyword.topic.section.agentscript" }
1820
+ },
1821
+ end: "^(?=\\s{4}(reasoning_instructions|reasoning_actions|actions|after_reasoning|description|variables|instructions|override)\\b)|^(?=\\s{4}override\\s+system\\.instructions:)|^(?=topic\\b|config\\b|variables\\b|start_agent\\b|system\\b)",
1822
+ patterns: [
1823
+ {
1824
+ name: "comment.line.agentscript",
1825
+ match: "(^|[ \t]+)#.*$"
1826
+ },
1827
+ { include: "#directives" },
1828
+ {
1829
+ name: "meta.utils.call.agentscript",
1830
+ match: "(@utils)(\\.)([a-zA-Z_][a-zA-Z0-9_]*)\\b",
1831
+ captures: {
1832
+ "1": { name: "support.class.agentscript" },
1833
+ "2": { name: "punctuation.accessor.dot.agentscript" },
1834
+ "3": { name: "entity.name.function.agentscript" }
1835
+ }
1836
+ },
1837
+ {
1838
+ name: "meta.variable.reference.agentscript",
1839
+ match: "(@)(action|topic|variable|result|input)(\\.)([a-zA-Z_][a-zA-Z0-9_]*)",
1840
+ captures: {
1841
+ "1": { name: "support.class.agentscript" },
1842
+ "2": { name: "support.class.agentscript" },
1843
+ "3": { name: "punctuation.accessor.dot.agentscript" },
1844
+ "4": { name: "variable.other.member.agentscript" }
1845
+ }
1846
+ },
1847
+ {
1848
+ name: "meta.alias.assignment.agentscript",
1849
+ match: "\\b(as)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\b",
1850
+ captures: {
1851
+ "1": { name: "keyword.control.agentscript" },
1852
+ "2": { name: "entity.name.alias.agentscript" }
1853
+ }
1854
+ },
1855
+ {
1856
+ name: "keyword.control.transition.reasoning.agentscript",
1857
+ match: "\\s+to\\s+"
1858
+ },
1859
+ {
1860
+ name: "keyword.reasoning.description.agentscript",
1861
+ match: "^\\s{12}(description)(?=:)"
1862
+ },
1863
+ {
1864
+ name: "keyword.control.agentscript",
1865
+ match: "\\b(setVariables)\\b"
1866
+ },
1867
+ {
1868
+ name: "entity.name.action.agentscript",
1869
+ match: "\\b[a-zA-Z_][a-zA-Z0-9_]*\\b"
1870
+ },
1871
+ { include: "#values" }
1872
+ ]
1873
+ },
1761
1874
  "reasoning-instructions": {
1762
- name: "meta.reasoning.instructions.afscript",
1875
+ name: "meta.reasoning.instructions.agentscript",
1763
1876
  begin: "^(\\s+)(reasoning_instructions):\\s*$",
1764
1877
  beginCaptures: {
1765
- "2": { name: "keyword.topic.section.afscript" }
1878
+ "2": { name: "keyword.topic.section.agentscript" }
1766
1879
  },
1767
- end: "^(?=\\s{4}(reasoning_actions|actions|before_reasoning|after_reasoning|description|variables|instructions|override)\\b)|^(?=\\s*$)|^(?=topic\\b|config\\b|variables\\b|start_agent\\b|system\\b)",
1880
+ end: "^(?=\\s{4}(reasoning_actions|actions|before_reasoning|after_reasoning|description|variables|instructions|override)\\b)|^(?=topic\\b|config\\b|variables\\b|start_agent\\b|system\\b)",
1768
1881
  patterns: [
1769
1882
  {
1770
- name: "string.heredoc.afscript",
1883
+ name: "comment.line.agentscript",
1884
+ match: "(^|[ \t]+)#.*$"
1885
+ },
1886
+ {
1887
+ name: "string.heredoc.agentscript",
1771
1888
  begin: "(>>)\\s*$",
1772
1889
  beginCaptures: {
1773
- "1": { name: "keyword.operator.heredoc.afscript" }
1890
+ "1": { name: "keyword.operator.heredoc.agentscript" }
1774
1891
  },
1775
- end: "^(?=\\s{4}(reasoning_actions|actions|before_reasoning|after_reasoning|description|variables|instructions|override)\\b)|^(?=\\s*$)|^(?=topic\\b|config\\b|variables\\b|start_agent\\b|system\\b)",
1892
+ end: "^(?=\\s{0,4}\\S)|^(?=\\s{4}(reasoning_actions|actions|before_reasoning|after_reasoning|description|variables|instructions|override)\\b)|^(?=topic\\b|config\\b|variables\\b|start_agent\\b|system\\b)",
1776
1893
  patterns: [
1777
1894
  { include: "#template-expression" },
1778
1895
  {
1779
- name: "string.unquoted.heredoc.afscript",
1896
+ name: "string.unquoted.heredoc.agentscript",
1780
1897
  match: "."
1781
1898
  }
1782
1899
  ]
1783
1900
  },
1784
1901
  {
1785
- name: "string.heredoc.quoted.afscript",
1902
+ name: "string.heredoc.quoted.agentscript",
1786
1903
  begin: '(>>)\\s*"',
1787
1904
  beginCaptures: {
1788
- "1": { name: "keyword.operator.heredoc.afscript" }
1905
+ "1": { name: "keyword.operator.heredoc.agentscript" }
1789
1906
  },
1790
1907
  end: '"',
1791
1908
  patterns: [
1792
1909
  { include: "#template-expression" },
1793
1910
  {
1794
- name: "string.unquoted.heredoc.afscript",
1911
+ name: "string.unquoted.heredoc.agentscript",
1795
1912
  match: "."
1796
1913
  }
1797
1914
  ]
1798
1915
  },
1799
1916
  {
1800
- name: "string.heredoc.afscript",
1917
+ name: "string.heredoc.agentscript",
1801
1918
  begin: '"',
1802
1919
  end: '"',
1803
1920
  patterns: [
1804
1921
  { include: "#template-expression" },
1805
1922
  {
1806
- name: "string.unquoted.heredoc.afscript",
1923
+ name: "string.unquoted.heredoc.agentscript",
1807
1924
  match: "."
1808
1925
  }
1809
1926
  ]
@@ -1811,23 +1928,27 @@ const afscriptGrammar = {
1811
1928
  ]
1812
1929
  },
1813
1930
  "action-definitions": {
1814
- name: "meta.actions.afscript",
1931
+ name: "meta.actions.agentscript",
1815
1932
  begin: "^(\\s+)(actions|action_definitions):",
1816
1933
  beginCaptures: {
1817
- "2": { name: "keyword.topic.section.afscript" }
1934
+ "2": { name: "keyword.topic.section.agentscript" }
1818
1935
  },
1819
- end: "^(?=\\s{4}(reasoning_instructions|reasoning_actions|before_reasoning|after_reasoning|description|variables|instructions|override)\\b)|^(?=\\s*$)|^(?=topic\\b|config\\b|variables\\b|start_agent\\b|system\\b)",
1936
+ end: "^(?=\\s{4}(reasoning_instructions|reasoning_actions|before_reasoning|after_reasoning|description|variables|instructions|override)\\b)|^(?=topic\\b|config\\b|variables\\b|start_agent\\b|system\\b)",
1820
1937
  patterns: [
1821
1938
  {
1822
- name: "entity.name.action.afscript",
1939
+ name: "comment.line.agentscript",
1940
+ match: "(^|[ \t]+)#.*$"
1941
+ },
1942
+ {
1943
+ name: "entity.name.action.agentscript",
1823
1944
  match: "^\\s{4,8}([a-zA-Z_][a-zA-Z0-9_]*)(?=:)"
1824
1945
  },
1825
1946
  {
1826
- name: "keyword.action.property.afscript",
1947
+ name: "keyword.action.property.agentscript",
1827
1948
  match: "^\\s{12}(description|target|inputs|outputs|parameters|returns|implementation|label|require_user_confirmation|include_in_progress_indicator|progress_indicator_message|is_required|is_user_input|developer_name|complex_data_type_name|is_used_by_planner|is_displayable)(?=:)"
1828
1949
  },
1829
1950
  {
1830
- name: "storage.type.afscript",
1951
+ name: "storage.type.agentscript",
1831
1952
  match: "\\b(string|number|boolean|object|date|timestamp|currency|id|list)\\b"
1832
1953
  },
1833
1954
  { include: "#operators" },
@@ -1836,55 +1957,59 @@ const afscriptGrammar = {
1836
1957
  ]
1837
1958
  },
1838
1959
  "reasoning-actions": {
1839
- name: "meta.reasoning-actions.afscript",
1960
+ name: "meta.reasoning-actions.agentscript",
1840
1961
  begin: "^(\\s+)(reasoning_actions):",
1841
1962
  beginCaptures: {
1842
- "2": { name: "keyword.topic.section.afscript" }
1963
+ "2": { name: "keyword.topic.section.agentscript" }
1843
1964
  },
1844
- end: "^(?=\\s{4}(reasoning_instructions|actions|before_reasoning|after_reasoning|description|variables|instructions|override)\\b)|^(?=\\s*$)|^(?=topic\\b|config\\b|variables\\b|start_agent\\b|system\\b)",
1965
+ end: "^(?=\\s{4}(reasoning_instructions|actions|before_reasoning|after_reasoning|description|variables|instructions|override)\\b)|^(?=topic\\b|config\\b|variables\\b|start_agent\\b|system\\b)",
1845
1966
  patterns: [
1967
+ {
1968
+ name: "comment.line.agentscript",
1969
+ match: "(^|[ \t]+)#.*$"
1970
+ },
1846
1971
  { include: "#directives" },
1847
1972
  {
1848
- name: "meta.utils.call.afscript",
1973
+ name: "meta.utils.call.agentscript",
1849
1974
  match: "(@utils)(\\.)([a-zA-Z_][a-zA-Z0-9_]*)\\b",
1850
1975
  captures: {
1851
- "1": { name: "support.class.afscript" },
1852
- "2": { name: "punctuation.accessor.dot.afscript" },
1853
- "3": { name: "entity.name.function.afscript" }
1976
+ "1": { name: "support.class.agentscript" },
1977
+ "2": { name: "punctuation.accessor.dot.agentscript" },
1978
+ "3": { name: "entity.name.function.agentscript" }
1854
1979
  }
1855
1980
  },
1856
1981
  {
1857
- name: "meta.variable.reference.afscript",
1982
+ name: "meta.variable.reference.agentscript",
1858
1983
  match: "(@)(action|topic|variable|result|input)(\\.)([a-zA-Z_][a-zA-Z0-9_]*)",
1859
1984
  captures: {
1860
- "1": { name: "support.class.afscript" },
1861
- "2": { name: "support.class.afscript" },
1862
- "3": { name: "punctuation.accessor.dot.afscript" },
1863
- "4": { name: "variable.other.member.afscript" }
1985
+ "1": { name: "support.class.agentscript" },
1986
+ "2": { name: "support.class.agentscript" },
1987
+ "3": { name: "punctuation.accessor.dot.agentscript" },
1988
+ "4": { name: "variable.other.member.agentscript" }
1864
1989
  }
1865
1990
  },
1866
1991
  {
1867
- name: "meta.alias.assignment.afscript",
1992
+ name: "meta.alias.assignment.agentscript",
1868
1993
  match: "\\b(as)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\b",
1869
1994
  captures: {
1870
- "1": { name: "keyword.control.afscript" },
1871
- "2": { name: "entity.name.alias.afscript" }
1995
+ "1": { name: "keyword.control.agentscript" },
1996
+ "2": { name: "entity.name.alias.agentscript" }
1872
1997
  }
1873
1998
  },
1874
1999
  {
1875
- name: "keyword.control.transition.reasoning.afscript",
2000
+ name: "keyword.control.transition.reasoning.agentscript",
1876
2001
  match: "\\s+to\\s+"
1877
2002
  },
1878
2003
  {
1879
- name: "keyword.reasoning.description.afscript",
2004
+ name: "keyword.reasoning.description.agentscript",
1880
2005
  match: "^\\s{12}(description)(?=:)"
1881
2006
  },
1882
2007
  {
1883
- name: "keyword.control.afscript",
2008
+ name: "keyword.control.agentscript",
1884
2009
  match: "\\b(setVariables)\\b"
1885
2010
  },
1886
2011
  {
1887
- name: "entity.name.action.afscript",
2012
+ name: "entity.name.action.agentscript",
1888
2013
  match: "\\b[a-zA-Z_][a-zA-Z0-9_]*\\b"
1889
2014
  },
1890
2015
  { include: "#values" }
@@ -1893,63 +2018,67 @@ const afscriptGrammar = {
1893
2018
  directives: {
1894
2019
  patterns: [
1895
2020
  {
1896
- name: "keyword.control.conditional.available.afscript",
2021
+ name: "comment.line.agentscript",
2022
+ match: "(^|[ \t]+)#.*$"
2023
+ },
2024
+ {
2025
+ name: "keyword.control.conditional.available.agentscript",
1897
2026
  match: "\\bavailable when\\b"
1898
2027
  },
1899
2028
  {
1900
- name: "meta.alias.assignment.afscript",
2029
+ name: "meta.alias.assignment.agentscript",
1901
2030
  match: "\\b(as)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\b",
1902
2031
  captures: {
1903
- "1": { name: "keyword.control.afscript" },
1904
- "2": { name: "entity.name.alias.afscript" }
2032
+ "1": { name: "keyword.control.agentscript" },
2033
+ "2": { name: "entity.name.alias.agentscript" }
1905
2034
  }
1906
2035
  },
1907
2036
  {
1908
- name: "keyword.control.directive.afscript",
2037
+ name: "keyword.control.directive.agentscript",
1909
2038
  match: "\\b(run|set|if|else|after|with|and|or)\\b|\\btransition to\\b"
1910
2039
  },
1911
2040
  {
1912
- name: "keyword.action-call.afscript",
2041
+ name: "keyword.action-call.agentscript",
1913
2042
  match: "(@action)(\\.)",
1914
2043
  captures: {
1915
- "1": { name: "support.class.afscript" },
1916
- "2": { name: "punctuation.accessor.dot.afscript" }
2044
+ "1": { name: "support.class.agentscript" },
2045
+ "2": { name: "punctuation.accessor.dot.agentscript" }
1917
2046
  }
1918
2047
  },
1919
2048
  {
1920
- name: "keyword.variable-set.afscript",
2049
+ name: "keyword.variable-set.agentscript",
1921
2050
  match: "(@variable)(\\.)",
1922
2051
  captures: {
1923
- "1": { name: "support.class.afscript" },
1924
- "2": { name: "punctuation.accessor.dot.afscript" }
2052
+ "1": { name: "support.class.agentscript" },
2053
+ "2": { name: "punctuation.accessor.dot.agentscript" }
1925
2054
  }
1926
2055
  },
1927
2056
  {
1928
- name: "keyword.topic-ref.afscript",
2057
+ name: "keyword.topic-ref.agentscript",
1929
2058
  match: "(@topic)(\\.)",
1930
2059
  captures: {
1931
- "1": { name: "support.class.afscript" },
1932
- "2": { name: "punctuation.accessor.dot.afscript" }
2060
+ "1": { name: "support.class.agentscript" },
2061
+ "2": { name: "punctuation.accessor.dot.agentscript" }
1933
2062
  }
1934
2063
  },
1935
2064
  {
1936
- name: "keyword.result-ref.afscript",
2065
+ name: "keyword.result-ref.agentscript",
1937
2066
  match: "(@result)(\\.)",
1938
2067
  captures: {
1939
- "1": { name: "support.class.afscript" },
1940
- "2": { name: "punctuation.accessor.dot.afscript" }
2068
+ "1": { name: "support.class.agentscript" },
2069
+ "2": { name: "punctuation.accessor.dot.agentscript" }
1941
2070
  }
1942
2071
  },
1943
2072
  {
1944
- name: "keyword.input-ref.afscript",
2073
+ name: "keyword.input-ref.agentscript",
1945
2074
  match: "(@input)(\\.)",
1946
2075
  captures: {
1947
- "1": { name: "support.class.afscript" },
1948
- "2": { name: "punctuation.accessor.dot.afscript" }
2076
+ "1": { name: "support.class.agentscript" },
2077
+ "2": { name: "punctuation.accessor.dot.agentscript" }
1949
2078
  }
1950
2079
  },
1951
2080
  {
1952
- name: "variable.other.member.afscript",
2081
+ name: "variable.other.member.agentscript",
1953
2082
  match: "(?<=@(?:variable|topic|input|action|result)\\.)\\b[a-zA-Z_][a-zA-Z0-9_]*\\b"
1954
2083
  },
1955
2084
  { include: "#operators" },
@@ -1957,76 +2086,80 @@ const afscriptGrammar = {
1957
2086
  ]
1958
2087
  },
1959
2088
  "template-expression": {
1960
- name: "meta.template.expression.afscript",
2089
+ name: "meta.template.expression.agentscript",
1961
2090
  begin: "\\{\\{",
1962
2091
  beginCaptures: {
1963
2092
  "0": {
1964
- name: "punctuation.definition.template.begin.afscript"
2093
+ name: "punctuation.definition.template.begin.agentscript"
1965
2094
  }
1966
2095
  },
1967
2096
  end: "\\}\\}",
1968
2097
  endCaptures: {
1969
- "0": { name: "punctuation.definition.template.end.afscript" }
2098
+ "0": { name: "punctuation.definition.template.end.agentscript" }
1970
2099
  },
1971
2100
  patterns: [
1972
2101
  {
1973
- name: "string.quoted.single.expression.afscript",
2102
+ name: "comment.line.agentscript",
2103
+ match: "(^|[ \t]+)#.*$"
2104
+ },
2105
+ {
2106
+ name: "string.quoted.single.expression.agentscript",
1974
2107
  begin: "'",
1975
2108
  end: "'",
1976
2109
  patterns: [
1977
2110
  {
1978
- name: "constant.character.escape.afscript",
2111
+ name: "constant.character.escape.agentscript",
1979
2112
  match: "\\\\."
1980
2113
  }
1981
2114
  ]
1982
2115
  },
1983
2116
  {
1984
- name: "string.quoted.double.expression.afscript",
2117
+ name: "string.quoted.double.expression.agentscript",
1985
2118
  begin: '"',
1986
2119
  end: '"',
1987
2120
  patterns: [
1988
2121
  {
1989
- name: "constant.character.escape.afscript",
2122
+ name: "constant.character.escape.agentscript",
1990
2123
  match: "\\\\."
1991
2124
  }
1992
2125
  ]
1993
2126
  },
1994
2127
  {
1995
- name: "constant.numeric.expression.afscript",
2128
+ name: "constant.numeric.expression.agentscript",
1996
2129
  match: "\\b\\d+(\\.\\d+)?\\b"
1997
2130
  },
1998
2131
  {
1999
- name: "constant.language.expression.afscript",
2132
+ name: "constant.language.expression.agentscript",
2000
2133
  match: "\\b(True|False)\\b"
2001
2134
  },
2002
2135
  {
2003
- name: "keyword.operator.expression.afscript",
2136
+ name: "keyword.operator.expression.agentscript",
2004
2137
  match: "\\b(and|or|if|else)\\b"
2005
2138
  },
2006
2139
  {
2007
- name: "operator.comparison.expression.afscript",
2140
+ name: "operator.comparison.expression.agentscript",
2008
2141
  match: "==|!=|<=|>=|<|>"
2009
2142
  },
2010
2143
  {
2011
- name: "operator.arithmetic.expression.afscript",
2144
+ name: "operator.arithmetic.expression.agentscript",
2012
2145
  match: "[+\\-\\*/%]"
2013
2146
  },
2014
2147
  {
2015
- name: "meta.variable.reference.expression.afscript",
2148
+ name: "meta.variable.reference.expression.agentscript",
2016
2149
  match: "(@)([a-zA-Z_][a-zA-Z0-9_]*)(\\.)([a-zA-Z_][a-zA-Z0-9_]*)\\b",
2017
2150
  captures: {
2018
- "1": { name: "support.class.afscript" },
2019
- "2": { name: "support.class.afscript" },
2020
- "3": { name: "punctuation.accessor.dot.afscript" },
2021
- "4": { name: "variable.other.member.afscript" }
2151
+ "1": { name: "support.class.agentscript" },
2152
+ "2": { name: "support.class.agentscript" },
2153
+ "3": { name: "punctuation.accessor.dot.agentscript" },
2154
+ "4": { name: "variable.other.member.agentscript" }
2022
2155
  }
2023
2156
  },
2024
2157
  {
2025
- name: "variable.other.expression.afscript",
2158
+ name: "variable.other.expression.agentscript",
2026
2159
  match: "\\b[a-zA-Z_][a-zA-Z0-9_]*\\b"
2027
2160
  },
2028
2161
  {
2029
- name: "punctuation.definition.expression.afscript",
2162
+ name: "punctuation.definition.expression.agentscript",
2030
2163
  match: "[()\\[\\]@.,]"
2031
2164
  }
2032
2165
  ]
@@ -2034,78 +2167,82 @@ const afscriptGrammar = {
2034
2167
  "json-value": {
2035
2168
  patterns: [
2036
2169
  {
2037
- name: "constant.language.json.afscript",
2170
+ name: "comment.line.agentscript",
2171
+ match: "(^|[ \t]+)#.*$"
2172
+ },
2173
+ {
2174
+ name: "constant.language.json.agentscript",
2038
2175
  match: "\\b(true|false|null)\\b"
2039
2176
  },
2040
2177
  {
2041
- name: "constant.numeric.json.afscript",
2178
+ name: "constant.numeric.json.agentscript",
2042
2179
  match: "-?\\d+(\\.\\d+)?([eE][+-]?\\d+)?"
2043
2180
  },
2044
2181
  {
2045
- name: "string.quoted.double.json.afscript",
2182
+ name: "string.quoted.double.json.agentscript",
2046
2183
  begin: '"',
2047
2184
  end: '"',
2048
2185
  patterns: [
2049
2186
  {
2050
- name: "constant.character.escape.json.afscript",
2187
+ name: "constant.character.escape.json.agentscript",
2051
2188
  match: "\\\\."
2052
2189
  }
2053
2190
  ]
2054
2191
  },
2055
2192
  {
2056
- name: "meta.structure.dictionary.json.afscript",
2193
+ name: "meta.structure.dictionary.json.agentscript",
2057
2194
  begin: "\\{",
2058
2195
  beginCaptures: {
2059
2196
  "0": {
2060
- name: "punctuation.definition.dictionary.begin.json.afscript"
2197
+ name: "punctuation.definition.dictionary.begin.json.agentscript"
2061
2198
  }
2062
2199
  },
2063
2200
  end: "\\}",
2064
2201
  endCaptures: {
2065
2202
  "0": {
2066
- name: "punctuation.definition.dictionary.end.json.afscript"
2203
+ name: "punctuation.definition.dictionary.end.json.agentscript"
2067
2204
  }
2068
2205
  },
2069
2206
  patterns: [
2070
2207
  {
2071
- name: "meta.structure.dictionary.key.json.afscript",
2208
+ name: "meta.structure.dictionary.key.json.agentscript",
2072
2209
  begin: '"',
2073
2210
  end: '"',
2074
2211
  patterns: [
2075
2212
  {
2076
- name: "constant.character.escape.json.afscript",
2213
+ name: "constant.character.escape.json.agentscript",
2077
2214
  match: "\\\\."
2078
2215
  }
2079
2216
  ]
2080
2217
  },
2081
2218
  {
2082
- name: "punctuation.separator.dictionary.key-value.json.afscript",
2219
+ name: "punctuation.separator.dictionary.key-value.json.agentscript",
2083
2220
  match: ":"
2084
2221
  },
2085
2222
  {
2086
- name: "punctuation.separator.dictionary.pair.json.afscript",
2223
+ name: "punctuation.separator.dictionary.pair.json.agentscript",
2087
2224
  match: ","
2088
2225
  },
2089
2226
  { include: "#json-value" }
2090
2227
  ]
2091
2228
  },
2092
2229
  {
2093
- name: "meta.structure.array.json.afscript",
2230
+ name: "meta.structure.array.json.agentscript",
2094
2231
  begin: "\\[",
2095
2232
  beginCaptures: {
2096
2233
  "0": {
2097
- name: "punctuation.definition.array.begin.json.afscript"
2234
+ name: "punctuation.definition.array.begin.json.agentscript"
2098
2235
  }
2099
2236
  },
2100
2237
  end: "\\]",
2101
2238
  endCaptures: {
2102
2239
  "0": {
2103
- name: "punctuation.definition.array.end.json.afscript"
2240
+ name: "punctuation.definition.array.end.json.agentscript"
2104
2241
  }
2105
2242
  },
2106
2243
  patterns: [
2107
2244
  {
2108
- name: "punctuation.separator.array.json.afscript",
2245
+ name: "punctuation.separator.array.json.agentscript",
2109
2246
  match: ","
2110
2247
  },
2111
2248
  { include: "#json-value" }
@@ -2116,19 +2253,19 @@ const afscriptGrammar = {
2116
2253
  punctuation: {
2117
2254
  patterns: [
2118
2255
  {
2119
- name: "punctuation.separator.key-value.afscript",
2256
+ name: "punctuation.separator.key-value.agentscript",
2120
2257
  match: ":"
2121
2258
  },
2122
2259
  {
2123
- name: "punctuation.separator.list.afscript",
2260
+ name: "punctuation.separator.list.agentscript",
2124
2261
  match: ","
2125
2262
  },
2126
2263
  {
2127
- name: "punctuation.definition.brackets.afscript",
2264
+ name: "punctuation.definition.brackets.agentscript",
2128
2265
  match: "[{}\\[\\]()]"
2129
2266
  },
2130
2267
  {
2131
- name: "punctuation.accessor.dot.afscript",
2268
+ name: "punctuation.accessor.dot.agentscript",
2132
2269
  match: "\\."
2133
2270
  }
2134
2271
  ]
@@ -2136,19 +2273,19 @@ const afscriptGrammar = {
2136
2273
  operators: {
2137
2274
  patterns: [
2138
2275
  {
2139
- name: "operator.comparison.afscript",
2276
+ name: "operator.comparison.agentscript",
2140
2277
  match: "==|!=|<=|>=|<|>"
2141
2278
  },
2142
2279
  {
2143
- name: "operator.assignment.afscript",
2280
+ name: "operator.assignment.agentscript",
2144
2281
  match: '\\s=\\s|\\s=(?=[\\{\\["\\d])|(?<=[a-zA-Z_])\\s*=\\s*'
2145
2282
  },
2146
2283
  {
2147
- name: "operator.arithmetic.afscript",
2284
+ name: "operator.arithmetic.agentscript",
2148
2285
  match: "[+\\-\\*%]"
2149
2286
  },
2150
2287
  {
2151
- name: "punctuation.separator.path.afscript",
2288
+ name: "punctuation.separator.path.agentscript",
2152
2289
  match: "/"
2153
2290
  }
2154
2291
  ]
@@ -2160,6 +2297,6 @@ export function getCustomLanguageGrammars() {
2160
2297
  return {
2161
2298
  dataweave: dataweaveGrammar,
2162
2299
  ampscript: ampscriptGrammar,
2163
- afscript: afscriptGrammar
2300
+ agentscript: agentscriptGrammar
2164
2301
  };
2165
2302
  }