@flashbacktech/tsclient 0.4.38 → 0.4.42
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.cjs +114 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +28 -2
- package/dist/index.d.ts +28 -2
- package/dist/index.js +114 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1188,6 +1188,7 @@ var CAP_STORAGE = 1;
|
|
|
1188
1188
|
var CAP_AI = 2;
|
|
1189
1189
|
var CAP_COMPUTE = 4;
|
|
1190
1190
|
var CAP_VCS = 8;
|
|
1191
|
+
var CAP_NOTIFY = 16;
|
|
1191
1192
|
var CAP_GENERAL = 255;
|
|
1192
1193
|
var PROVIDER_CATALOG = {
|
|
1193
1194
|
AWS: {
|
|
@@ -1575,9 +1576,113 @@ var PROVIDER_CATALOG = {
|
|
|
1575
1576
|
help: "Override for proxies or regional endpoints. Most users leave blank to use the default Gemini API base URL."
|
|
1576
1577
|
}
|
|
1577
1578
|
]
|
|
1579
|
+
},
|
|
1580
|
+
SLACK: {
|
|
1581
|
+
id: "SLACK",
|
|
1582
|
+
displayName: "Slack",
|
|
1583
|
+
capabilities: CAP_NOTIFY,
|
|
1584
|
+
fields: [
|
|
1585
|
+
{
|
|
1586
|
+
path: "secret",
|
|
1587
|
+
label: "Incoming Webhook URL",
|
|
1588
|
+
type: "password",
|
|
1589
|
+
required: true,
|
|
1590
|
+
secret: true,
|
|
1591
|
+
placeholder: "https://hooks.slack.com/services/T000/B000/xxxxxxxx",
|
|
1592
|
+
help: "A Slack Incoming Webhook URL. The target channel is fixed by the webhook. Encrypted at rest; never injected into the sandbox."
|
|
1593
|
+
},
|
|
1594
|
+
{
|
|
1595
|
+
path: "metadata.channelHint",
|
|
1596
|
+
label: "Channel Hint (optional)",
|
|
1597
|
+
type: "text",
|
|
1598
|
+
required: false,
|
|
1599
|
+
placeholder: "#oncall",
|
|
1600
|
+
help: "Display-only label for the channel this webhook posts to. Does not change routing \u2014 the webhook URL controls the destination."
|
|
1601
|
+
}
|
|
1602
|
+
]
|
|
1603
|
+
},
|
|
1604
|
+
TEAMS: {
|
|
1605
|
+
id: "TEAMS",
|
|
1606
|
+
displayName: "Microsoft Teams",
|
|
1607
|
+
capabilities: CAP_NOTIFY,
|
|
1608
|
+
fields: [
|
|
1609
|
+
{
|
|
1610
|
+
path: "secret",
|
|
1611
|
+
label: "Incoming Webhook URL",
|
|
1612
|
+
type: "password",
|
|
1613
|
+
required: true,
|
|
1614
|
+
secret: true,
|
|
1615
|
+
placeholder: "https://outlook.office.com/webhook/...",
|
|
1616
|
+
help: "A Teams Incoming Webhook (connector) URL. The target channel is fixed by the webhook. Encrypted at rest; never injected into the sandbox."
|
|
1617
|
+
}
|
|
1618
|
+
]
|
|
1619
|
+
},
|
|
1620
|
+
PAGERDUTY: {
|
|
1621
|
+
id: "PAGERDUTY",
|
|
1622
|
+
displayName: "PagerDuty",
|
|
1623
|
+
capabilities: CAP_NOTIFY,
|
|
1624
|
+
fields: [
|
|
1625
|
+
{
|
|
1626
|
+
path: "secret",
|
|
1627
|
+
label: "Integration / Routing Key",
|
|
1628
|
+
type: "password",
|
|
1629
|
+
required: true,
|
|
1630
|
+
secret: true,
|
|
1631
|
+
placeholder: "R0XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
|
|
1632
|
+
help: "An Events API v2 integration (routing) key from a PagerDuty service. Encrypted at rest; never injected into the sandbox."
|
|
1633
|
+
}
|
|
1634
|
+
]
|
|
1635
|
+
},
|
|
1636
|
+
SMTP: {
|
|
1637
|
+
id: "SMTP",
|
|
1638
|
+
displayName: "Email (SMTP)",
|
|
1639
|
+
capabilities: CAP_NOTIFY,
|
|
1640
|
+
fields: [
|
|
1641
|
+
{
|
|
1642
|
+
path: "metadata.host",
|
|
1643
|
+
label: "SMTP Host",
|
|
1644
|
+
type: "text",
|
|
1645
|
+
required: true,
|
|
1646
|
+
placeholder: "smtp.example.com",
|
|
1647
|
+
help: "Hostname of the SMTP relay."
|
|
1648
|
+
},
|
|
1649
|
+
{
|
|
1650
|
+
path: "metadata.port",
|
|
1651
|
+
label: "Port",
|
|
1652
|
+
type: "number",
|
|
1653
|
+
required: false,
|
|
1654
|
+
default: 587,
|
|
1655
|
+
placeholder: "587",
|
|
1656
|
+
help: "SMTP port. Defaults to 587 (STARTTLS). TLS is always required."
|
|
1657
|
+
},
|
|
1658
|
+
{
|
|
1659
|
+
path: "metadata.fromAddress",
|
|
1660
|
+
label: "From Address",
|
|
1661
|
+
type: "text",
|
|
1662
|
+
required: true,
|
|
1663
|
+
placeholder: "alerts@example.com",
|
|
1664
|
+
help: "Envelope-from / From header for messages the agent sends. Also used as the SMTP AUTH username."
|
|
1665
|
+
},
|
|
1666
|
+
{
|
|
1667
|
+
path: "metadata.toAddresses",
|
|
1668
|
+
label: "To Addresses",
|
|
1669
|
+
type: "stringList",
|
|
1670
|
+
required: true,
|
|
1671
|
+
placeholder: "oncall@example.com",
|
|
1672
|
+
help: "One or more recipient addresses. Every notify message is sent to all of them."
|
|
1673
|
+
},
|
|
1674
|
+
{
|
|
1675
|
+
path: "secret",
|
|
1676
|
+
label: "Password",
|
|
1677
|
+
type: "password",
|
|
1678
|
+
required: true,
|
|
1679
|
+
secret: true,
|
|
1680
|
+
help: "SMTP AUTH password for the From address. Encrypted at rest; never injected into the sandbox."
|
|
1681
|
+
}
|
|
1682
|
+
]
|
|
1578
1683
|
}
|
|
1579
1684
|
};
|
|
1580
|
-
var PROVIDER_ORDER = ["AWS", "BEDROCK", "GCP", "AZURE", "SSH", "GITHUB", "GITLAB", "AZURE_DEVOPS", "OPENAI", "ANTHROPIC", "GEMINI"];
|
|
1685
|
+
var PROVIDER_ORDER = ["AWS", "BEDROCK", "GCP", "AZURE", "SSH", "GITHUB", "GITLAB", "AZURE_DEVOPS", "OPENAI", "ANTHROPIC", "GEMINI", "SLACK", "TEAMS", "PAGERDUTY", "SMTP"];
|
|
1581
1686
|
function listProviders() {
|
|
1582
1687
|
return PROVIDER_ORDER.flatMap((id) => PROVIDER_CATALOG[id] ? [PROVIDER_CATALOG[id]] : []);
|
|
1583
1688
|
}
|
|
@@ -1789,6 +1894,13 @@ function computeDisplayHint(providerId, metadata) {
|
|
|
1789
1894
|
const prefix = str(metadata["tokenPrefix"]);
|
|
1790
1895
|
return prefix ? `${prefix}\u2026` : "";
|
|
1791
1896
|
}
|
|
1897
|
+
case "SLACK":
|
|
1898
|
+
return str(metadata["channelHint"]);
|
|
1899
|
+
case "SMTP": {
|
|
1900
|
+
const from = str(metadata["fromAddress"]);
|
|
1901
|
+
const host = str(metadata["host"]);
|
|
1902
|
+
return from + (host ? ` @ ${host}` : "");
|
|
1903
|
+
}
|
|
1792
1904
|
default:
|
|
1793
1905
|
return "";
|
|
1794
1906
|
}
|
|
@@ -1822,6 +1934,7 @@ exports.BudgetsClient = BudgetsClient;
|
|
|
1822
1934
|
exports.CAP_AI = CAP_AI;
|
|
1823
1935
|
exports.CAP_COMPUTE = CAP_COMPUTE;
|
|
1824
1936
|
exports.CAP_GENERAL = CAP_GENERAL;
|
|
1937
|
+
exports.CAP_NOTIFY = CAP_NOTIFY;
|
|
1825
1938
|
exports.CAP_STORAGE = CAP_STORAGE;
|
|
1826
1939
|
exports.CAP_VCS = CAP_VCS;
|
|
1827
1940
|
exports.CloudAgentClient = CloudAgentClient;
|