@kamrankhan027/probe-ai 1.1.1 → 1.1.3

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 (3) hide show
  1. package/README.md +22 -33
  2. package/dist/index.js +11 -13
  3. package/package.json +2 -1
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  [![npm version](https://img.shields.io/npm/v/@kamrankhan027/probe-ai.svg?style=for-the-badge&color=CB3837&logo=npm)](https://www.npmjs.com/package/@kamrankhan027/probe-ai)
8
8
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?style=for-the-badge)](https://opensource.org/licenses/MIT)
9
9
  [![LangGraph](https://img.shields.io/badge/LangGraph.js-1C3C3C?style=for-the-badge&logo=langchain&logoColor=white)](https://langchain-ai.github.io/langgraphjs/)
10
- [![Gemini](https://img.shields.io/badge/Gemini_3.6_Flash-8E75B2?style=for-the-badge&logo=google&logoColor=white)](https://ai.google.dev/)
10
+ [![Multi-Provider](https://img.shields.io/badge/AI_Engine-Universal-8E75B2?style=for-the-badge)](https://ai.google.dev/)
11
11
  [![TypeScript](https://img.shields.io/badge/TypeScript-3178C6?style=for-the-badge&logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
12
12
 
13
13
  </div>
@@ -18,7 +18,7 @@
18
18
 
19
19
  ### Option 1: Run Instantly via `npx` (Zero Installation Required)
20
20
  ```bash
21
- npx @kamrankhan027/probe-ai
21
+ npx @kamrankhan027/probe-ai@latest
22
22
  ```
23
23
 
24
24
  ---
@@ -30,13 +30,10 @@ npx @kamrankhan027/probe-ai
30
30
  npm install -g @kamrankhan027/probe-ai
31
31
  ```
32
32
 
33
- **Using pnpm:**
33
+ **Using pnpm / yarn:**
34
34
  ```bash
35
35
  pnpm add -g @kamrankhan027/probe-ai
36
- ```
37
-
38
- **Using yarn:**
39
- ```bash
36
+ # or
40
37
  yarn global add @kamrankhan027/probe-ai
41
38
  ```
42
39
 
@@ -47,13 +44,20 @@ probe-ai
47
44
 
48
45
  ---
49
46
 
50
- ## 🔑 API Key Setup
47
+ ## 🧠 Supported AI Models & Providers
48
+
49
+ ProbeAI is **universal and provider-agnostic**. On startup, select your preferred engine:
51
50
 
52
- ProbeAI uses Google Gemini for fast, structured reasoning.
53
- * **If you have a `.env` file**: Add `GEMINI_API_KEY=your_key_here`
54
- * **If running via `npx` without a `.env`**: ProbeAI will interactively prompt you to paste your free Gemini API key on startup.
51
+ | Provider | Supported Models | Environment Variable |
52
+ |---|---|---|
53
+ | **🔷 Google Gemini** | `gemini-3.6-flash`, `gemini-3.5-flash`, `gemini-2.5-flash`, `gemini-2.5-pro` | `GEMINI_API_KEY` |
54
+ | **🟢 OpenAI** | `gpt-5.6` (Sol/Terra/Luna), `gpt-4o`, `gpt-4o-mini`, `o3-mini`, `gpt-oss` | `OPENAI_API_KEY` |
55
+ | **🟣 Anthropic Claude** | `claude-sonnet-5`, `claude-opus-5`, `claude-3-5-sonnet-latest`, `claude-3-5-haiku` | `ANTHROPIC_API_KEY` |
56
+ | **⚡ Groq (LPU Engine)** | `llama-3.3-70b-versatile`, `gpt-oss-120b`, `qwen-3.6` (Free & Ultra-Fast) | `GROQ_API_KEY` |
57
+ | **🌐 OpenRouter** | `deepseek/deepseek-r1:free`, `qwen/qwen-2.5-coder-32b-instruct:free`, `mistral-large-3` | `OPENROUTER_API_KEY` |
58
+ | **🦙 Ollama (Local)** | `qwen2.5-coder:7b`, `deepseek-r1`, `llama3.3`, `gemma-4` (100% Offline & Free) | *None needed!* |
55
59
 
56
- *(Get a free key in 10 seconds at [aistudio.google.com](https://aistudio.google.com/)).*
60
+ > 💡 **Custom Model Overrides**: You can pass any custom model string directly via environment variables (e.g. `OPENAI_MODEL=gpt-5.6` or `ANTHROPIC_MODEL=claude-sonnet-5`) or during the interactive startup prompt.
57
61
 
58
62
  ---
59
63
 
@@ -70,25 +74,20 @@ ProbeAI uses Google Gemini for fast, structured reasoning.
70
74
  ## 💡 Example Prompts to Try
71
75
 
72
76
  ```text
73
- You: Inspect https://bookmark-agent-backend.onrender.com and export a Postman collection
77
+ inspect https://bookmark-agent-backend.onrender.com and export a Postman collection
74
78
  ```
75
79
  *Auto-maps all endpoints and creates `reports/postman_collection.json`.*
76
80
 
77
81
  ```text
78
- You: Test all endpoints on https://bookmark-agent-backend.onrender.com and save an HTML report
82
+ test all endpoints on https://bookmark-agent-backend.onrender.com and save an HTML report
79
83
  ```
80
84
  *Executes Happy Path, Query Filter, and Error test cases and saves `reports/audit_report.html`.*
81
85
 
82
86
  ```text
83
- You: Set auth Bearer my_jwt_token_123 and test protected endpoints
87
+ set auth Bearer my_jwt_token_123 and test protected endpoints
84
88
  ```
85
89
  *Injects your authorization header into session memory for all subsequent calls.*
86
90
 
87
- ```text
88
- You: Authenticate via POST https://api.example.com/login with {"email":"dev@example.com","password":"secret"}, then test /api/dashboard
89
- ```
90
- *Extracts the JWT from the login response and tests the protected dashboard route automatically.*
91
-
92
91
  ---
93
92
 
94
93
  ## 🏗️ Repository Architecture
@@ -97,7 +96,9 @@ You: Authenticate via POST https://api.example.com/login with {"email":"dev@exam
97
96
  probe-ai/
98
97
  ├── cli/ # 🚀 Native TypeScript NPM Package (@kamrankhan027/probe-ai)
99
98
  │ ├── src/
100
- │ │ ├── index.ts # Interactive CLI loop & Marked terminal styling
99
+ │ │ ├── index.ts # Interactive CLI loop & Modern UI
100
+ │ │ ├── wizard.ts # Multi-Provider Startup Wizard
101
+ │ │ ├── model-factory.ts # Universal LangChain chat model factory
101
102
  │ │ ├── agent.ts # @langchain/langgraph ReAct workflow
102
103
  │ │ └── tools/ # OpenAPI, HTTP, Auth, Postman & Report tools
103
104
  │ ├── dist/
@@ -111,18 +112,6 @@ probe-ai/
111
112
 
112
113
  ---
113
114
 
114
- ## 🛠️ Local Development
115
-
116
- ```bash
117
- git clone https://github.com/kamran-027/probe-ai.git
118
- cd probe-ai/cli
119
- npm install
120
- npm run build
121
- npm start
122
- ```
123
-
124
- ---
125
-
126
115
  <div align="center">
127
116
  Built by <b>Kamran Khan</b> as part of <b>Cadence Labs</b>.
128
117
  </div>
package/dist/index.js CHANGED
@@ -4243,9 +4243,9 @@ var authenticateViaLoginTool = tool2(
4243
4243
  description: "Execute a login or token generation endpoint (e.g. POST /auth/login with credentials), extract the bearer token from JSON response, and save it to the session headers.",
4244
4244
  schema: external_exports.object({
4245
4245
  loginUrl: external_exports.string().describe("The URL of the login/auth endpoint"),
4246
- method: external_exports.string().optional().describe("HTTP method (default: POST)"),
4247
- payloadJson: external_exports.string().optional().describe("JSON string payload with email/username/password"),
4248
- tokenField: external_exports.string().optional().describe("Field name containing the token in JSON response (default: access_token)")
4246
+ method: external_exports.string().default("POST").describe("HTTP method (default: POST)"),
4247
+ payloadJson: external_exports.string().default("{}").describe("JSON string payload with email/username/password"),
4248
+ tokenField: external_exports.string().default("access_token").describe("Field name containing the token in JSON response (default: access_token)")
4249
4249
  })
4250
4250
  }
4251
4251
  );
@@ -4362,9 +4362,9 @@ var executeHttpRequestTool = tool3(
4362
4362
  schema: external_exports.object({
4363
4363
  method: external_exports.string().describe("HTTP method, e.g. GET, POST, DELETE"),
4364
4364
  url: external_exports.string().describe("Target endpoint URL"),
4365
- headersJson: external_exports.string().optional().describe("Optional JSON string of custom headers"),
4366
- paramsJson: external_exports.string().optional().describe("Optional JSON string of query parameters"),
4367
- bodyJson: external_exports.string().optional().describe("Optional JSON string payload body")
4365
+ headersJson: external_exports.string().default("{}").describe("Optional JSON string of custom headers"),
4366
+ paramsJson: external_exports.string().default("{}").describe("Optional JSON string of query parameters"),
4367
+ bodyJson: external_exports.string().default("{}").describe("Optional JSON string payload body")
4368
4368
  })
4369
4369
  }
4370
4370
  );
@@ -4443,7 +4443,7 @@ var exportPostmanCollectionTool = tool4(
4443
4443
  description: "Generate a ready-to-import Postman Collection v2.1.0 JSON file directly from the base URL's OpenAPI spec.",
4444
4444
  schema: external_exports.object({
4445
4445
  baseUrl: external_exports.string().describe("The base URL of the API server"),
4446
- outputFilename: external_exports.string().optional().describe("Output filename (default: probe_collection.json)")
4446
+ outputFilename: external_exports.string().default("probe_collection.json").describe("Output filename (default: probe_collection.json)")
4447
4447
  })
4448
4448
  }
4449
4449
  );
@@ -4558,8 +4558,8 @@ var saveHtmlAuditReportTool = tool5(
4558
4558
  name: "save_html_audit_report",
4559
4559
  description: "Generate an executive standalone single-page HTML audit report with health scores, latency metrics, and expandable request/response inspection accordions.",
4560
4560
  schema: external_exports.object({
4561
- filename: external_exports.string().optional().describe("Report filename (default: audit_report.html)"),
4562
- reportTitle: external_exports.string().optional().describe("Title for the report")
4561
+ filename: external_exports.string().default("audit_report.html").describe("Report filename (default: audit_report.html)"),
4562
+ reportTitle: external_exports.string().default("ProbeAI API Audit Report").describe("Title for the report")
4563
4563
  })
4564
4564
  }
4565
4565
  );
@@ -4568,6 +4568,7 @@ var saveHtmlAuditReportTool = tool5(
4568
4568
  import { ChatGoogleGenerativeAI } from "@langchain/google-genai";
4569
4569
  import { ChatOpenAI } from "@langchain/openai";
4570
4570
  import { ChatAnthropic } from "@langchain/anthropic";
4571
+ import { ChatGroq } from "@langchain/groq";
4571
4572
  import { ChatOllama } from "@langchain/ollama";
4572
4573
  function createChatModel(config) {
4573
4574
  const { provider, apiKey = "", modelName, baseUrl } = config;
@@ -4594,13 +4595,10 @@ function createChatModel(config) {
4594
4595
  maxRetries: 3
4595
4596
  });
4596
4597
  case "groq":
4597
- return new ChatOpenAI({
4598
+ return new ChatGroq({
4598
4599
  model: modelName || process.env.GROQ_MODEL || "llama-3.3-70b-versatile",
4599
4600
  temperature: 0.2,
4600
4601
  apiKey,
4601
- configuration: {
4602
- baseURL: "https://api.groq.com/openai/v1"
4603
- },
4604
4602
  maxRetries: 3
4605
4603
  });
4606
4604
  case "openrouter":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kamrankhan027/probe-ai",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "description": "Autonomous API Schema & Reliability Inspector CLI. Probes OpenAPI specs, generates test suites, executes real-time HTTP calls, and exports Postman collections.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -32,6 +32,7 @@
32
32
  "@langchain/anthropic": "^0.3.34",
33
33
  "@langchain/core": "^0.3.40",
34
34
  "@langchain/google-genai": "^0.1.11",
35
+ "@langchain/groq": "^0.1.3",
35
36
  "@langchain/langgraph": "^0.2.54",
36
37
  "@langchain/ollama": "^0.1.6",
37
38
  "@langchain/openai": "^0.3.17",