@supyagent/sdk 0.1.13 → 0.1.15
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 +91 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +34 -1
- package/dist/index.d.ts +34 -1
- package/dist/index.js +90 -2
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +13 -0
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +13 -0
- package/dist/react.js.map +1 -1
- package/package.json +3 -2
package/dist/react.d.cts
CHANGED
|
@@ -21,7 +21,7 @@ declare function getProviderLabel(provider: string): string;
|
|
|
21
21
|
/**
|
|
22
22
|
* Determine which formatter to use based on tool name prefix.
|
|
23
23
|
*/
|
|
24
|
-
type FormatterType = "email" | "calendar" | "slack" | "github" | "drive" | "search" | "docs" | "sheets" | "slides" | "hubspot" | "linear" | "pipedrive" | "compute" | "resend" | "inbox" | "discord" | "notion" | "twitter" | "telegram" | "stripe" | "jira" | "salesforce" | "brevo" | "calendly" | "twilio" | "linkedin" | "generic";
|
|
24
|
+
type FormatterType = "email" | "calendar" | "slack" | "github" | "drive" | "search" | "docs" | "sheets" | "slides" | "hubspot" | "linear" | "pipedrive" | "compute" | "resend" | "inbox" | "discord" | "notion" | "twitter" | "telegram" | "stripe" | "jira" | "salesforce" | "brevo" | "calendly" | "twilio" | "linkedin" | "bash" | "generic";
|
|
25
25
|
declare function getFormatterType(toolName: string): FormatterType;
|
|
26
26
|
|
|
27
27
|
interface ToolResultPart {
|
package/dist/react.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ declare function getProviderLabel(provider: string): string;
|
|
|
21
21
|
/**
|
|
22
22
|
* Determine which formatter to use based on tool name prefix.
|
|
23
23
|
*/
|
|
24
|
-
type FormatterType = "email" | "calendar" | "slack" | "github" | "drive" | "search" | "docs" | "sheets" | "slides" | "hubspot" | "linear" | "pipedrive" | "compute" | "resend" | "inbox" | "discord" | "notion" | "twitter" | "telegram" | "stripe" | "jira" | "salesforce" | "brevo" | "calendly" | "twilio" | "linkedin" | "generic";
|
|
24
|
+
type FormatterType = "email" | "calendar" | "slack" | "github" | "drive" | "search" | "docs" | "sheets" | "slides" | "hubspot" | "linear" | "pipedrive" | "compute" | "resend" | "inbox" | "discord" | "notion" | "twitter" | "telegram" | "stripe" | "jira" | "salesforce" | "brevo" | "calendly" | "twilio" | "linkedin" | "bash" | "generic";
|
|
25
25
|
declare function getFormatterType(toolName: string): FormatterType;
|
|
26
26
|
|
|
27
27
|
interface ToolResultPart {
|
package/dist/react.js
CHANGED
|
@@ -114,6 +114,9 @@ function getFormatterType(toolName) {
|
|
|
114
114
|
return "twilio";
|
|
115
115
|
case "linkedin":
|
|
116
116
|
return "linkedin";
|
|
117
|
+
case "bash":
|
|
118
|
+
case "shell":
|
|
119
|
+
return "bash";
|
|
117
120
|
default:
|
|
118
121
|
return "generic";
|
|
119
122
|
}
|
|
@@ -548,6 +551,15 @@ function getLinkedinSummary(data) {
|
|
|
548
551
|
}
|
|
549
552
|
return { text: "LinkedIn result" };
|
|
550
553
|
}
|
|
554
|
+
function getBashSummary(data) {
|
|
555
|
+
if (typeof data !== "object" || data === null) return { text: "Command executed" };
|
|
556
|
+
const d = data;
|
|
557
|
+
const exitCode = d.exitCode ?? d.exit_code ?? 0;
|
|
558
|
+
const timedOut = d.timedOut ?? d.timed_out;
|
|
559
|
+
if (timedOut) return { text: "Command timed out", badge: { text: "timeout", variant: "warning" } };
|
|
560
|
+
if (exitCode === 0) return { text: "Command succeeded", badge: { text: "exit 0", variant: "success" } };
|
|
561
|
+
return { text: `Command failed`, badge: { text: `exit ${exitCode}`, variant: "error" } };
|
|
562
|
+
}
|
|
551
563
|
function getGenericSummary(_data, toolName) {
|
|
552
564
|
return { text: humanizeToolName(toolName) };
|
|
553
565
|
}
|
|
@@ -578,6 +590,7 @@ var SUMMARY_MAP = {
|
|
|
578
590
|
calendly: getCalendlySummary,
|
|
579
591
|
twilio: getTwilioSummary,
|
|
580
592
|
linkedin: getLinkedinSummary,
|
|
593
|
+
bash: getBashSummary,
|
|
581
594
|
generic: getGenericSummary
|
|
582
595
|
};
|
|
583
596
|
function getSummary(formatterType, data, toolName) {
|