@juspay/neurolink 7.30.1 → 7.32.0
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/CHANGELOG.md +12 -0
- package/dist/cli/factories/commandFactory.js +16 -2
- package/dist/core/baseProvider.d.ts +6 -6
- package/dist/core/baseProvider.js +30 -34
- package/dist/core/types.d.ts +2 -0
- package/dist/index.d.ts +1 -1
- package/dist/lib/core/baseProvider.d.ts +6 -6
- package/dist/lib/core/baseProvider.js +30 -34
- package/dist/lib/core/types.d.ts +2 -0
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/middleware/builtin/analytics.d.ts +1 -1
- package/dist/lib/middleware/builtin/guardrails.d.ts +1 -1
- package/dist/lib/middleware/factory.d.ts +1 -1
- package/dist/lib/middleware/index.d.ts +1 -1
- package/dist/lib/middleware/registry.d.ts +1 -1
- package/dist/lib/neurolink.js +32 -18
- package/dist/lib/providers/googleAiStudio.d.ts +1 -0
- package/dist/lib/providers/googleAiStudio.js +196 -0
- package/dist/lib/providers/googleVertex.js +4 -1
- package/dist/lib/types/streamTypes.d.ts +20 -1
- package/dist/lib/utils/optionsConversion.js +1 -1
- package/dist/middleware/builtin/analytics.d.ts +1 -1
- package/dist/middleware/builtin/guardrails.d.ts +1 -1
- package/dist/middleware/factory.d.ts +1 -1
- package/dist/middleware/index.d.ts +1 -1
- package/dist/middleware/registry.d.ts +1 -1
- package/dist/neurolink.js +32 -18
- package/dist/providers/googleAiStudio.d.ts +1 -0
- package/dist/providers/googleAiStudio.js +196 -0
- package/dist/providers/googleVertex.js +4 -1
- package/dist/types/streamTypes.d.ts +20 -1
- package/dist/utils/optionsConversion.js +1 -1
- package/package.json +3 -1
- /package/dist/lib/{middleware/types.d.ts → types/middlewareTypes.d.ts} +0 -0
- /package/dist/lib/{middleware/types.js → types/middlewareTypes.js} +0 -0
- /package/dist/{middleware/types.d.ts → types/middlewareTypes.d.ts} +0 -0
- /package/dist/{middleware/types.js → types/middlewareTypes.js} +0 -0
|
@@ -834,6 +834,7 @@ export class GoogleVertexProvider extends BaseProvider {
|
|
|
834
834
|
message: "Message array built successfully",
|
|
835
835
|
});
|
|
836
836
|
}
|
|
837
|
+
/* eslint-disable-next-line max-lines-per-function */
|
|
837
838
|
async executeStream(options, analysisSchema) {
|
|
838
839
|
// Initialize stream execution tracking
|
|
839
840
|
const streamExecutionId = `vertex-stream-${Date.now()}-${Math.random().toString(36).substring(2, 11)}`;
|
|
@@ -863,7 +864,9 @@ export class GoogleVertexProvider extends BaseProvider {
|
|
|
863
864
|
streamExecutionId,
|
|
864
865
|
streamRequestDetails: {
|
|
865
866
|
modelName: this.modelName,
|
|
866
|
-
promptLength: options.input
|
|
867
|
+
promptLength: typeof options.input?.text === "string"
|
|
868
|
+
? options.input.text.length
|
|
869
|
+
: 0,
|
|
867
870
|
hasSchema: !!analysisSchema,
|
|
868
871
|
messagesCount: Array.isArray(messages) ? messages.length : 0,
|
|
869
872
|
temperature: options?.temperature,
|
|
@@ -5,6 +5,7 @@ import type { EvaluationData } from "../index.js";
|
|
|
5
5
|
import type { TokenUsage } from "./providers.js";
|
|
6
6
|
import type { UnknownRecord, JsonValue } from "./common.js";
|
|
7
7
|
import type { ChatMessage } from "./conversationTypes.js";
|
|
8
|
+
import type { MiddlewareFactoryOptions } from "../types/middlewareTypes.js";
|
|
8
9
|
/**
|
|
9
10
|
* Interface for tool execution calls (AI SDK compatible)
|
|
10
11
|
*/
|
|
@@ -65,9 +66,23 @@ export interface StreamAnalyticsData {
|
|
|
65
66
|
* Stream function options interface - Primary method for streaming content
|
|
66
67
|
* Future-ready for multi-modal capabilities while maintaining text focus
|
|
67
68
|
*/
|
|
69
|
+
export type PCMEncoding = "PCM16LE";
|
|
70
|
+
export interface AudioInputSpec {
|
|
71
|
+
frames: AsyncIterable<Buffer>;
|
|
72
|
+
sampleRateHz?: number;
|
|
73
|
+
encoding?: PCMEncoding;
|
|
74
|
+
channels?: 1;
|
|
75
|
+
}
|
|
76
|
+
export interface AudioChunk {
|
|
77
|
+
data: Buffer;
|
|
78
|
+
sampleRateHz: number;
|
|
79
|
+
channels: number;
|
|
80
|
+
encoding: PCMEncoding;
|
|
81
|
+
}
|
|
68
82
|
export interface StreamOptions {
|
|
69
83
|
input: {
|
|
70
|
-
text
|
|
84
|
+
text?: string;
|
|
85
|
+
audio?: AudioInputSpec;
|
|
71
86
|
};
|
|
72
87
|
output?: {
|
|
73
88
|
format?: "text" | "structured" | "json";
|
|
@@ -111,6 +126,7 @@ export interface StreamOptions {
|
|
|
111
126
|
fallbackToGenerate?: boolean;
|
|
112
127
|
};
|
|
113
128
|
conversationMessages?: ChatMessage[];
|
|
129
|
+
middleware?: MiddlewareFactoryOptions;
|
|
114
130
|
}
|
|
115
131
|
/**
|
|
116
132
|
* Stream function result interface - Primary output format for streaming
|
|
@@ -119,6 +135,9 @@ export interface StreamOptions {
|
|
|
119
135
|
export interface StreamResult {
|
|
120
136
|
stream: AsyncIterable<{
|
|
121
137
|
content: string;
|
|
138
|
+
} | {
|
|
139
|
+
type: "audio";
|
|
140
|
+
audio: AudioChunk;
|
|
122
141
|
}>;
|
|
123
142
|
provider?: string;
|
|
124
143
|
model?: string;
|
|
@@ -44,7 +44,7 @@ export function convertGenerateToStreamOptions(generateOptions) {
|
|
|
44
44
|
export function convertStreamToGenerateOptions(streamOptions) {
|
|
45
45
|
const generateOptions = {
|
|
46
46
|
// Core input mapping
|
|
47
|
-
input: streamOptions.input,
|
|
47
|
+
input: { text: (streamOptions.input && streamOptions.input.text) || "" },
|
|
48
48
|
// Provider and model settings
|
|
49
49
|
provider: streamOptions.provider,
|
|
50
50
|
model: streamOptions.model,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juspay/neurolink",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.32.0",
|
|
4
4
|
"description": "Universal AI Development Platform with working MCP integration, multi-provider support, and professional CLI. Built-in tools operational, 58+ external MCP servers discoverable. Connect to filesystem, GitHub, database operations, and more. Build, test, and deploy AI applications with 9 major providers: OpenAI, Anthropic, Google AI, AWS Bedrock, Azure, Hugging Face, Ollama, and Mistral AI.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Juspay Technologies",
|
|
@@ -78,6 +78,7 @@
|
|
|
78
78
|
"dev:full": "node tools/development/dev-server.js",
|
|
79
79
|
"dev:health": "node tools/development/healthMonitor.js",
|
|
80
80
|
"dev:demo": "concurrently \"pnpm run dev\" \"node neurolink-demo/complete-enhanced-server.js\"",
|
|
81
|
+
"demo:voice": "pnpm build && node examples/voice-demo/server.mjs",
|
|
81
82
|
"// Build & Deploy (Complete Pipeline)": "",
|
|
82
83
|
"build:complete": "node tools/automation/buildSystem.js",
|
|
83
84
|
"build:analyze": "node tools/development/dependency-analyzer.js",
|
|
@@ -151,6 +152,7 @@
|
|
|
151
152
|
"@aws-sdk/credential-provider-node": "^3.876.0",
|
|
152
153
|
"@aws-sdk/types": "^3.862.0",
|
|
153
154
|
"@google-cloud/vertexai": "^1.10.0",
|
|
155
|
+
"@google/genai": "^1.16.0",
|
|
154
156
|
"@google/generative-ai": "^0.24.1",
|
|
155
157
|
"@huggingface/inference": "^2.8.0",
|
|
156
158
|
"@modelcontextprotocol/sdk": "^1.13.0",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|