@intelli-1113/stratos-sdk 1.3.3 → 1.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +33 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intelli-1113/stratos-sdk",
3
- "version": "1.3.3",
3
+ "version": "1.3.4",
4
4
  "description": "Stratos AI agent telemetry (OpenLLMetry), Vercel AI auto-spans, LangChain inspect/fix, MCP proxy.",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
package/src/index.js CHANGED
@@ -90,6 +90,35 @@ function detectFramework() {
90
90
  return null;
91
91
  }
92
92
 
93
+ /**
94
+ * Warn user if no supported framework is detected.
95
+ * Provide list of supported frameworks and docs link.
96
+ */
97
+ function warnUnsupportedFramework(detectedFramework) {
98
+ if (detectedFramework) return false; // Framework detected, no warning needed
99
+
100
+ const supportedFrameworks = [
101
+ "LangChain (@langchain/core, @langchain/langgraph)",
102
+ "OpenAI (@openai/agents, openai)",
103
+ "Anthropic (@anthropic-ai/sdk)",
104
+ "Vercel AI (ai)",
105
+ "Google GenAI (@google/genai, @google/generative-ai)",
106
+ "LlamaIndex (llamaindex)",
107
+ "CrewAI (crewai)",
108
+ "Google ADK (@google/adk, google-adk)",
109
+ "OpenAI Agents (@openai/agents)",
110
+ ];
111
+
112
+ const message = [
113
+ "[stratos] ⚠ No supported framework detected.",
114
+ "[stratos] Supported frameworks:",
115
+ ...supportedFrameworks.map((fw) => `[stratos] • ${fw}`),
116
+ "[stratos] To add your framework: https://docs.stratos.ai/integrate",
117
+ ].join("\n");
118
+
119
+ console.warn(message);
120
+ return true; // Flag indicating unsupported framework
121
+ }
93
122
 
94
123
  function detectModel(opts) {
95
124
  return (
@@ -183,6 +212,10 @@ export function start(opts = {}) {
183
212
  tools: toolsEnv,
184
213
  };
185
214
 
215
+ // Warn if no supported framework is detected
216
+ const isUnsupportedFramework = warnUnsupportedFramework(meta.framework);
217
+ meta.frameworkSupported = !isUnsupportedFramework;
218
+
186
219
  // Heartbeat is also how the network guard (enforcement.js) learns whether to
187
220
  // freeze this agent — budget exhausted, period crossed, or the agent
188
221
  // manually disabled from the Control Tower all collapse into the same