@mindstudio-ai/agent 0.1.16 → 0.1.17

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.d.ts CHANGED
@@ -7562,6 +7562,14 @@ interface StepMethods {
7562
7562
  * - Source "system" echoes the message content directly (no AI call).
7563
7563
  * - Mode "background" saves the result to a variable. Mode "foreground" streams it to the user (not available in direct execution).
7564
7564
  * - Structured output (JSON/CSV) can be enforced via structuredOutputType and structuredOutputExample.
7565
+ * - When executed inside a v2 app method (managed sandbox or local dev tunnel),
7566
+ * LLM token output can be streamed to the frontend in real time via an SSE
7567
+ * side-channel. The frontend opts in by passing { stream: true } to the method
7568
+ * invocation via @mindstudio-ai/interface. Tokens are published to Redis
7569
+ * pub/sub as they arrive and forwarded as SSE events on the invoke response.
7570
+ * The method code itself is unchanged — streaming is transparent to the
7571
+ * developer. See V2ExecutionService.ts and the invoke handler in V2Apps for
7572
+ * the server-side plumbing.
7565
7573
  *
7566
7574
  * @example
7567
7575
  * ```typescript
package/dist/index.js CHANGED
@@ -3152,7 +3152,15 @@ var stepMetadata = {
3152
3152
  usageNotes: `- Source "user" sends the message to an LLM and returns the model's response.
3153
3153
  - Source "system" echoes the message content directly (no AI call).
3154
3154
  - Mode "background" saves the result to a variable. Mode "foreground" streams it to the user (not available in direct execution).
3155
- - Structured output (JSON/CSV) can be enforced via structuredOutputType and structuredOutputExample.`,
3155
+ - Structured output (JSON/CSV) can be enforced via structuredOutputType and structuredOutputExample.
3156
+ - When executed inside a v2 app method (managed sandbox or local dev tunnel),
3157
+ LLM token output can be streamed to the frontend in real time via an SSE
3158
+ side-channel. The frontend opts in by passing { stream: true } to the method
3159
+ invocation via @mindstudio-ai/interface. Tokens are published to Redis
3160
+ pub/sub as they arrive and forwarded as SSE events on the invoke response.
3161
+ The method code itself is unchanged \u2014 streaming is transparent to the
3162
+ developer. See V2ExecutionService.ts and the invoke handler in V2Apps for
3163
+ the server-side plumbing.`,
3156
3164
  inputSchema: { "type": "object", "properties": { "message": { "type": "string", "description": "The message to send (prompt for AI, or text for system echo)" }, "source": { "enum": ["user", "system"], "type": "string", "description": 'Message source: "user" sends to AI model, "system" echoes message content directly. Defaults to "user"' }, "modelOverride": { "type": "object", "properties": { "model": { "type": "string", "description": 'Model identifier (e.g. "gpt-4", "claude-3-opus")' }, "temperature": { "type": "number", "description": "Sampling temperature for the model (0-2)" }, "maxResponseTokens": { "type": "number", "description": "Maximum number of tokens in the model's response" }, "ignorePreamble": { "type": "boolean", "description": "Whether to skip the system preamble/instructions" }, "userMessagePreprocessor": { "type": "object", "properties": { "dataSource": { "type": "string", "description": "Data source identifier for the preprocessor" }, "messageTemplate": { "type": "string", "description": "Template string applied to user messages before sending to the model" }, "maxResults": { "type": "number", "description": "Maximum number of results to include from the data source" }, "enabled": { "type": "boolean", "description": "Whether the preprocessor is active" }, "shouldInherit": { "type": "boolean", "description": "Whether child steps should inherit this preprocessor configuration" } }, "description": "Preprocessor applied to user messages before sending to the model" }, "preamble": { "type": "string", "description": "System preamble/instructions for the model" }, "multiModelEnabled": { "type": "boolean", "description": "Whether multi-model candidate generation is enabled" }, "editResponseEnabled": { "type": "boolean", "description": "Whether the user can edit the model's response" }, "config": { "type": "object", "description": "Additional model-specific configuration" } }, "required": ["model", "temperature", "maxResponseTokens"], "description": "Model configuration override. Optional; uses the workflow's default model if not specified" }, "structuredOutputType": { "enum": ["text", "json", "csv"], "type": "string", "description": "Output format constraint for structured responses" }, "structuredOutputExample": { "type": "string", "description": "Sample showing the desired output shape (for JSON/CSV formats). A TypeScript interface is also useful here for more complex types." }, "chatHistoryMode": { "enum": ["include", "exclude"], "type": "string", "description": "Whether to include or exclude prior chat history in the AI context" } }, "required": ["message"], "description": "Configuration for the user message step" },
3157
3165
  outputSchema: { "type": "object", "properties": { "content": { "type": "string", "description": "The AI model's response or echoed system message content" } }, "required": ["content"] }
3158
3166
  },
@@ -3868,7 +3876,15 @@ var stepMetadata = {
3868
3876
  usageNotes: `- Source "user" sends the message to an LLM and returns the model's response.
3869
3877
  - Source "system" echoes the message content directly (no AI call).
3870
3878
  - Mode "background" saves the result to a variable. Mode "foreground" streams it to the user (not available in direct execution).
3871
- - Structured output (JSON/CSV) can be enforced via structuredOutputType and structuredOutputExample.`,
3879
+ - Structured output (JSON/CSV) can be enforced via structuredOutputType and structuredOutputExample.
3880
+ - When executed inside a v2 app method (managed sandbox or local dev tunnel),
3881
+ LLM token output can be streamed to the frontend in real time via an SSE
3882
+ side-channel. The frontend opts in by passing { stream: true } to the method
3883
+ invocation via @mindstudio-ai/interface. Tokens are published to Redis
3884
+ pub/sub as they arrive and forwarded as SSE events on the invoke response.
3885
+ The method code itself is unchanged \u2014 streaming is transparent to the
3886
+ developer. See V2ExecutionService.ts and the invoke handler in V2Apps for
3887
+ the server-side plumbing.`,
3872
3888
  inputSchema: { "type": "object", "properties": { "message": { "type": "string", "description": "The message to send (prompt for AI, or text for system echo)" }, "source": { "enum": ["user", "system"], "type": "string", "description": 'Message source: "user" sends to AI model, "system" echoes message content directly. Defaults to "user"' }, "modelOverride": { "type": "object", "properties": { "model": { "type": "string", "description": 'Model identifier (e.g. "gpt-4", "claude-3-opus")' }, "temperature": { "type": "number", "description": "Sampling temperature for the model (0-2)" }, "maxResponseTokens": { "type": "number", "description": "Maximum number of tokens in the model's response" }, "ignorePreamble": { "type": "boolean", "description": "Whether to skip the system preamble/instructions" }, "userMessagePreprocessor": { "type": "object", "properties": { "dataSource": { "type": "string", "description": "Data source identifier for the preprocessor" }, "messageTemplate": { "type": "string", "description": "Template string applied to user messages before sending to the model" }, "maxResults": { "type": "number", "description": "Maximum number of results to include from the data source" }, "enabled": { "type": "boolean", "description": "Whether the preprocessor is active" }, "shouldInherit": { "type": "boolean", "description": "Whether child steps should inherit this preprocessor configuration" } }, "description": "Preprocessor applied to user messages before sending to the model" }, "preamble": { "type": "string", "description": "System preamble/instructions for the model" }, "multiModelEnabled": { "type": "boolean", "description": "Whether multi-model candidate generation is enabled" }, "editResponseEnabled": { "type": "boolean", "description": "Whether the user can edit the model's response" }, "config": { "type": "object", "description": "Additional model-specific configuration" } }, "required": ["model", "temperature", "maxResponseTokens"], "description": "Model configuration override. Optional; uses the workflow's default model if not specified" }, "structuredOutputType": { "enum": ["text", "json", "csv"], "type": "string", "description": "Output format constraint for structured responses" }, "structuredOutputExample": { "type": "string", "description": "Sample showing the desired output shape (for JSON/CSV formats). A TypeScript interface is also useful here for more complex types." }, "chatHistoryMode": { "enum": ["include", "exclude"], "type": "string", "description": "Whether to include or exclude prior chat history in the AI context" } }, "required": ["message"], "description": "Configuration for the user message step" },
3873
3889
  outputSchema: { "type": "object", "properties": { "content": { "type": "string", "description": "The AI model's response or echoed system message content" } }, "required": ["content"] }
3874
3890
  },