@mindstudio-ai/agent 0.1.110 → 0.1.112
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/cli.js +20 -12
- package/dist/index.d.ts +83 -12
- package/dist/index.js +12 -6
- package/dist/index.js.map +1 -1
- package/dist/postinstall.js +20 -12
- package/llms.txt +8 -5
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2238,6 +2238,15 @@ interface Citation {
|
|
|
2238
2238
|
}
|
|
2239
2239
|
/** A metadata value as stored on a document: scalars only. */
|
|
2240
2240
|
type MetadataValue = string | number | boolean;
|
|
2241
|
+
/**
|
|
2242
|
+
* Numeric range over a metadata value (inclusive both ends). Numbers only —
|
|
2243
|
+
* to range on dates, store them as sortable integers at add time (epoch
|
|
2244
|
+
* seconds or `20240315`-style YYYYMMDD) and range on those.
|
|
2245
|
+
*/
|
|
2246
|
+
interface MetadataRange {
|
|
2247
|
+
gte?: number;
|
|
2248
|
+
lte?: number;
|
|
2249
|
+
}
|
|
2241
2250
|
/**
|
|
2242
2251
|
* Tags attached to a document when it's added — department, year, doc type,
|
|
2243
2252
|
* a per-user scope — and matched by {@link SearchFilter.metadata} at query
|
|
@@ -2261,10 +2270,11 @@ type SearchMode = 'hybrid' | 'semantic' | 'lexical';
|
|
|
2261
2270
|
interface SearchFilter {
|
|
2262
2271
|
/**
|
|
2263
2272
|
* Match document metadata set at add time. A scalar must equal; an array
|
|
2264
|
-
* matches any of its values. Keys
|
|
2265
|
-
*
|
|
2273
|
+
* matches any of its values; `{ gte?, lte? }` matches a numeric range. Keys
|
|
2274
|
+
* AND together:
|
|
2275
|
+
* `{ department: 'legal', year: [2025, 2026], publishedAt: { gte: 20250101 } }`.
|
|
2266
2276
|
*/
|
|
2267
|
-
metadata?: Record<string, MetadataValue | MetadataValue[]>;
|
|
2277
|
+
metadata?: Record<string, MetadataValue | MetadataValue[] | MetadataRange>;
|
|
2268
2278
|
/** Exact filename, or any of several. */
|
|
2269
2279
|
filename?: string | string[];
|
|
2270
2280
|
/** Restrict to specific documents (ids from {@link DataSource.documents}). */
|
|
@@ -2297,7 +2307,16 @@ interface SearchExplain {
|
|
|
2297
2307
|
matchedVia: 'dense' | 'lexical' | 'both';
|
|
2298
2308
|
}
|
|
2299
2309
|
interface SearchHit {
|
|
2300
|
-
/**
|
|
2310
|
+
/**
|
|
2311
|
+
* Relevance of this hit. Comparable within a response, not across them —
|
|
2312
|
+
* the scale depends on how the search ran (check {@link SearchRan}):
|
|
2313
|
+
* cosine similarity in `semantic` mode, an RRF rank reciprocal in `hybrid`
|
|
2314
|
+
* (small numbers that are not similarities), keyword-overlap weight in
|
|
2315
|
+
* `lexical`. When reranking ran, it's the reranker's 0–1 relevance instead,
|
|
2316
|
+
* with the retrieval value preserved as `retrievalScore` — so rerank-on
|
|
2317
|
+
* `score` is the one scale that's stable across modes, and the right place
|
|
2318
|
+
* for quality cutoffs.
|
|
2319
|
+
*/
|
|
2301
2320
|
score: number;
|
|
2302
2321
|
/** The matched chunk, prefixed with its heading path for context. */
|
|
2303
2322
|
text: string;
|
|
@@ -2367,7 +2386,14 @@ interface SearchRan {
|
|
|
2367
2386
|
interface SearchOptions {
|
|
2368
2387
|
/** Results to return. Default 5, capped at 50. */
|
|
2369
2388
|
topK?: number;
|
|
2370
|
-
/**
|
|
2389
|
+
/**
|
|
2390
|
+
* Floor on the RETRIEVAL score — applied to the retrieval branch, never to
|
|
2391
|
+
* the fused hybrid score or the reranker's score. In `semantic` and
|
|
2392
|
+
* `hybrid` modes it's a cosine floor on the embedding branch; in `lexical`,
|
|
2393
|
+
* a keyword-overlap floor. The scale depends on the embedding model, so
|
|
2394
|
+
* measure before using — and with reranking on, prefer cutting on each
|
|
2395
|
+
* hit's returned `score` (the reranker's 0–1 relevance) instead.
|
|
2396
|
+
*/
|
|
2371
2397
|
scoreThreshold?: number;
|
|
2372
2398
|
/**
|
|
2373
2399
|
* Narrow the search to matching chunks before ranking — by document
|
|
@@ -2950,6 +2976,17 @@ interface EmailStats {
|
|
|
2950
2976
|
counts: Record<string, number>;
|
|
2951
2977
|
}>;
|
|
2952
2978
|
}
|
|
2979
|
+
/**
|
|
2980
|
+
* Lifecycle of a QUEUED send. Large and marketing sends are accepted
|
|
2981
|
+
* immediately and delivered in the background, so a blast can legitimately be
|
|
2982
|
+
* observed mid-flight:
|
|
2983
|
+
*
|
|
2984
|
+
* `accepted` — queued, nothing delivered yet. `sending` — delivery in
|
|
2985
|
+
* progress. `completed` — every recipient was handed to the provider.
|
|
2986
|
+
* `partial` — finished, but some recipients were not sent to. `failed` —
|
|
2987
|
+
* finished and nothing was sent.
|
|
2988
|
+
*/
|
|
2989
|
+
type EmailBatchLifecycle = 'accepted' | 'sending' | 'completed' | 'partial' | 'failed';
|
|
2953
2990
|
/**
|
|
2954
2991
|
* One blast, aggregated.
|
|
2955
2992
|
*
|
|
@@ -2963,6 +3000,17 @@ interface EmailBatch {
|
|
|
2963
3000
|
recipients: number;
|
|
2964
3001
|
accepted: number;
|
|
2965
3002
|
counts: Record<EmailMessageStatus, number>;
|
|
3003
|
+
/**
|
|
3004
|
+
* Delivery lifecycle, when the send was QUEUED. `null` means the send was
|
|
3005
|
+
* delivered inline (small transactional sends) and already finished — treat
|
|
3006
|
+
* null as done, never as unknown.
|
|
3007
|
+
*/
|
|
3008
|
+
status: EmailBatchLifecycle | null;
|
|
3009
|
+
/** Delivery-chunk progress, when queued. Null otherwise. */
|
|
3010
|
+
chunksTotal: number | null;
|
|
3011
|
+
chunksDone: number | null;
|
|
3012
|
+
/** Recipients not yet attempted, when queued. Null otherwise. */
|
|
3013
|
+
pending: number | null;
|
|
2966
3014
|
}
|
|
2967
3015
|
interface EmailSuppression {
|
|
2968
3016
|
id: string;
|
|
@@ -3129,10 +3177,16 @@ interface Email {
|
|
|
3129
3177
|
* And a non-empty `suppressed` in the result is a **success**, not a failure: it
|
|
3130
3178
|
* lists people who had unsubscribed and were therefore skipped.
|
|
3131
3179
|
*
|
|
3132
|
-
* Delivery is
|
|
3133
|
-
*
|
|
3134
|
-
*
|
|
3135
|
-
* `email.
|
|
3180
|
+
* Delivery is split from acceptance: small transactional sends deliver before
|
|
3181
|
+
* this resolves; marketing and large sends are QUEUED — this resolves once the
|
|
3182
|
+
* send is accepted, and delivery continues in the background. Track progress
|
|
3183
|
+
* with `email.batch(batchId)` (`status`, `pending`, chunk counts); outcomes
|
|
3184
|
+
* (delivered, bounced, complained) arrive later on `email.messages({ batchId })`.
|
|
3185
|
+
*
|
|
3186
|
+
* Throws `outbound_daily_cap_exceeded` (429) over the app's daily recipient
|
|
3187
|
+
* quota — check `email.quota()` before a big send — and `sending_paused` (409)
|
|
3188
|
+
* when the app's sending is paused for reputation or by support; a 409 will
|
|
3189
|
+
* not succeed on retry.
|
|
3136
3190
|
*
|
|
3137
3191
|
* @example
|
|
3138
3192
|
* ```ts
|
|
@@ -3184,7 +3238,7 @@ interface Email {
|
|
|
3184
3238
|
}>;
|
|
3185
3239
|
/** One message, including bounce diagnostics. */
|
|
3186
3240
|
message(messageId: string): Promise<EmailMessage>;
|
|
3187
|
-
/** One row per blast, newest first. */
|
|
3241
|
+
/** One row per blast, newest first, with delivery lifecycle where queued. */
|
|
3188
3242
|
batches(options?: EmailWindowOptions & {
|
|
3189
3243
|
limit?: number;
|
|
3190
3244
|
offset?: number;
|
|
@@ -3192,7 +3246,11 @@ interface Email {
|
|
|
3192
3246
|
batches: EmailBatch[];
|
|
3193
3247
|
total: number;
|
|
3194
3248
|
}>;
|
|
3195
|
-
/**
|
|
3249
|
+
/**
|
|
3250
|
+
* Stats and delivery progress for a single blast — the id you passed to
|
|
3251
|
+
* `email.send()`, or the one it returned. Poll this to watch a queued send
|
|
3252
|
+
* drain (`status`, `pending`, chunk counts).
|
|
3253
|
+
*/
|
|
3196
3254
|
batch(batchId: string): Promise<EmailBatch>;
|
|
3197
3255
|
/** Your app's unsubscribe list, newest first. */
|
|
3198
3256
|
suppressions(options?: {
|
|
@@ -4099,6 +4157,11 @@ declare class MindStudioAgent$1 {
|
|
|
4099
4157
|
* page changes (e.g. a short URL's target). Omit `paths` (or pass an empty
|
|
4100
4158
|
* array) to purge every snapshot for the app.
|
|
4101
4159
|
*
|
|
4160
|
+
* `paths` are this app's OWN route paths (`/u/abc`), whatever host the page is
|
|
4161
|
+
* served on. If another app mounts this one under a path prefix, the copies
|
|
4162
|
+
* cached at that prefix are purged too — no need to know or pass the mount
|
|
4163
|
+
* path.
|
|
4164
|
+
*
|
|
4102
4165
|
* Raw hook-token call (mirrors `reportIssue`) — the appId comes from the
|
|
4103
4166
|
* token. Backend / managed-context only.
|
|
4104
4167
|
*
|
|
@@ -7377,6 +7440,8 @@ interface SendEmailStepInput {
|
|
|
7377
7440
|
references?: string[];
|
|
7378
7441
|
/** `marketing` (default) adds one-click unsubscribe headers and skips recipients who unsubscribed from this app. Use `transactional` for receipts, alerts and password resets: no unsubscribe header, never suppressed, and cc/bcc preserved on a single message. */
|
|
7379
7442
|
category?: "transactional" | "marketing";
|
|
7443
|
+
/** Groups this send's per-recipient rows into one blast, so per-campaign stats are readable afterwards. Pass your own campaign id (1-64 printable chars) to join our delivery stats onto your own tables with no mapping; omit it and one is generated. Either way it comes back in the output. */
|
|
7444
|
+
batchId?: string;
|
|
7380
7445
|
}
|
|
7381
7446
|
interface SendEmailStepOutput {
|
|
7382
7447
|
/** To addresses the message was sent to. */
|
|
@@ -7389,6 +7454,8 @@ interface SendEmailStepOutput {
|
|
|
7389
7454
|
from: string;
|
|
7390
7455
|
/** Recipients skipped because they unsubscribed from this app. Always empty for a `transactional` send. */
|
|
7391
7456
|
suppressed: string[];
|
|
7457
|
+
/** Groups this send's per-recipient rows into one blast — the caller's `batchId` if supplied, otherwise a generated one. Returned unconditionally so an app can read per-blast stats back without having had to pass anything. */
|
|
7458
|
+
batchId: string;
|
|
7392
7459
|
}
|
|
7393
7460
|
interface SendGmailDraftStepInput {
|
|
7394
7461
|
/** Gmail draft ID to send */
|
|
@@ -10476,6 +10543,7 @@ interface StepMethods {
|
|
|
10476
10543
|
* Send an email to one or more recipient addresses.
|
|
10477
10544
|
*
|
|
10478
10545
|
* @remarks
|
|
10546
|
+
* - If you are writing a backend method for a v2 app, prefer mindstudio.email.send({...}) — it takes the same fields, returns the batchId you read stats back with, and sits alongside email.messages / email.batch / email.suppress. This action remains fully supported and runs the same code; it is also the only way to use connectionId or generateHtml.
|
|
10479
10547
|
* - Use the "to" field to send to one or more specific recipient email addresses directly. Allowed recipients depend on the sender: when the app sends from a domain it owns (a verified custom domain or its <slug>.madewithremy.com subdomain) any recipient is allowed; when it falls back to the shared Remy address, recipients must be verified app users or members of the app's organization. (v1 apps cannot use a direct "to" — they must resolve recipients via a connection.)
|
|
10480
10548
|
* - Alternatively, recipient email addresses can be resolved from OAuth connections configured by the app creator via connectionId. The user running the workflow does not specify the recipient directly.
|
|
10481
10549
|
* - Use "cc" and "bcc" to add visible / hidden recipients (a string or an array). They are subject to the same recipient rules as "to".
|
|
@@ -10496,7 +10564,7 @@ interface StepMethods {
|
|
|
10496
10564
|
* - The special connectionId "trigger_email" uses the email address that triggered the workflow.
|
|
10497
10565
|
* - Sends default to category "marketing": every message carries a one-click unsubscribe header pointing at the app's own domain, and recipients who previously unsubscribed from this app are skipped and returned in "suppressed". Because the unsubscribe link is per-recipient, a marketing send delivers one separate message per recipient and cc/bcc are folded into that list.
|
|
10498
10566
|
* - Set category to "transactional" for receipts, alerts, password resets and anything a recipient must not be able to opt out of. Transactional sends carry no unsubscribe header, ignore the unsubscribe list, and keep cc/bcc on a single message — use it whenever cc/bcc semantics matter.
|
|
10499
|
-
* - The subject is stored verbatim in the app's delivery log, which every workspace member can read for 90 days. Never put a secret in the subject — no one-time codes, no magic-link tokens, no password-reset tokens. Put those in the body
|
|
10567
|
+
* - The subject is stored verbatim in the app's delivery log, which every workspace member can read for 90 days. Never put a secret in the subject — no one-time codes, no magic-link tokens, no password-reset tokens. Put those in the body of a "transactional" send: a small transactional send is delivered immediately and its body is never stored. A "marketing" send, or any large send, is queued for delivery, which means its body is held in internal storage until the send finishes — so do not put a secret in the body of one of those either.
|
|
10500
10568
|
*
|
|
10501
10569
|
* @example
|
|
10502
10570
|
* ```typescript
|
|
@@ -11481,6 +11549,9 @@ declare const reportIssue: (input: ReportIssueInput) => Promise<ReportedIssue>;
|
|
|
11481
11549
|
* on their next visit. Bound to the default singleton. Backend / managed-context
|
|
11482
11550
|
* only. Omit `paths` (or pass an empty array) to purge every snapshot.
|
|
11483
11551
|
*
|
|
11552
|
+
* Pass this app's own route paths; snapshots of those routes cached under
|
|
11553
|
+
* another app's mount prefix are purged along with them.
|
|
11554
|
+
*
|
|
11484
11555
|
* @example
|
|
11485
11556
|
* ```ts
|
|
11486
11557
|
* import { prerender } from '@mindstudio-ai/agent';
|
package/dist/index.js
CHANGED
|
@@ -478,7 +478,7 @@ var AuthContext = class {
|
|
|
478
478
|
constructor(ctx) {
|
|
479
479
|
this.userId = ctx.userId;
|
|
480
480
|
this._roleAssignments = ctx.roleAssignments;
|
|
481
|
-
this.roles = ctx.roleAssignments.filter((a) => a.userId === ctx.userId).map((a) => a.roleName);
|
|
481
|
+
this.roles = ctx.userId == null ? [] : ctx.roleAssignments.filter((a) => a.userId === ctx.userId).map((a) => a.roleName);
|
|
482
482
|
}
|
|
483
483
|
/**
|
|
484
484
|
* Check if the current user has **any** of the given roles.
|
|
@@ -4036,7 +4036,8 @@ var stepMetadata = {
|
|
|
4036
4036
|
"sendEmail": {
|
|
4037
4037
|
stepType: "sendEmail",
|
|
4038
4038
|
description: "Send an email to one or more recipient addresses.",
|
|
4039
|
-
usageNotes: `-
|
|
4039
|
+
usageNotes: `- If you are writing a backend method for a v2 app, prefer mindstudio.email.send({...}) \u2014 it takes the same fields, returns the batchId you read stats back with, and sits alongside email.messages / email.batch / email.suppress. This action remains fully supported and runs the same code; it is also the only way to use connectionId or generateHtml.
|
|
4040
|
+
- Use the "to" field to send to one or more specific recipient email addresses directly. Allowed recipients depend on the sender: when the app sends from a domain it owns (a verified custom domain or its <slug>.madewithremy.com subdomain) any recipient is allowed; when it falls back to the shared Remy address, recipients must be verified app users or members of the app's organization. (v1 apps cannot use a direct "to" \u2014 they must resolve recipients via a connection.)
|
|
4040
4041
|
- Alternatively, recipient email addresses can be resolved from OAuth connections configured by the app creator via connectionId. The user running the workflow does not specify the recipient directly.
|
|
4041
4042
|
- Use "cc" and "bcc" to add visible / hidden recipients (a string or an array). They are subject to the same recipient rules as "to".
|
|
4042
4043
|
- "to" is optional only in the sense that recipients can come from elsewhere \u2014 omit it and supply "cc"/"bcc" for a hidden-list send, or omit all three and recipients are resolved from an OAuth connection. Naming nobody at all is an error.
|
|
@@ -4056,9 +4057,9 @@ var stepMetadata = {
|
|
|
4056
4057
|
- The special connectionId "trigger_email" uses the email address that triggered the workflow.
|
|
4057
4058
|
- Sends default to category "marketing": every message carries a one-click unsubscribe header pointing at the app's own domain, and recipients who previously unsubscribed from this app are skipped and returned in "suppressed". Because the unsubscribe link is per-recipient, a marketing send delivers one separate message per recipient and cc/bcc are folded into that list.
|
|
4058
4059
|
- Set category to "transactional" for receipts, alerts, password resets and anything a recipient must not be able to opt out of. Transactional sends carry no unsubscribe header, ignore the unsubscribe list, and keep cc/bcc on a single message \u2014 use it whenever cc/bcc semantics matter.
|
|
4059
|
-
- The subject is stored verbatim in the app's delivery log, which every workspace member can read for 90 days. Never put a secret in the subject \u2014 no one-time codes, no magic-link tokens, no password-reset tokens. Put those in the body, which is
|
|
4060
|
-
inputSchema: { "type": "object", "properties": { "subject": { "type": "string", "description": "Email subject line" }, "body": { "type": "string", "description": "Email body content (plain text, markdown, HTML, or a CDN URL to an HTML file)" }, "to": { "anyOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }] }, "cc": { "anyOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }] }, "bcc": { "anyOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }] }, "connectionId": { "type": "string", "description": "OAuth connection ID(s) for the recipient(s), comma-separated for multiple" }, "generateHtml": { "type": "boolean", "description": "When true, auto-convert the body text into a styled HTML email using AI" }, "generateHtmlInstructions": { "type": "string", "description": "Natural language instructions for the HTML generation style" }, "generateHtmlModelOverride": { "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", "properties": {}, "required": [], "description": "Additional model-specific configuration" } }, "required": ["model", "temperature", "maxResponseTokens"], "description": "Model settings override for HTML generation" }, "attachments": { "type": "array", "items": { "anyOf": [{ "type": "string" }, { "type": "object", "properties": { "url": { "type": "string" }, "filename": { "type": "string" }, "contentType": { "type": "string" } }, "required": ["url"] }] }, "description": "Files to attach: each entry is a URL string, or an object `{ url, filename?, contentType? }` to control the displayed filename and MIME type." }, "from": { "type": "string", "description": "Custom sender handle \u2014 only for apps with a custom domain or subdomain. Bare handle (`support`), full `support@your-domain.com`, or `Name <support@your-domain.com>`. Must resolve to a domain the app owns." }, "bodyType": { "enum": ["auto", "html", "markdown", "text"], "type": "string", "description": "How to interpret `body`: `auto` (default \u2014 detect HTML, else render markdown), `html` (send as-is), `markdown` (render to HTML), or `text` (send as plain text only, no HTML part). Every send includes a text/plain alternative." }, "text": { "type": "string", "description": "Explicit text/plain alternative body. Auto-derived from `body` if omitted." }, "replyTo": { "type": "string", "description": "Reply-To address for the email." }, "inReplyTo": { "type": "string", "description": "Message-ID this email replies to, for inbox threading (In-Reply-To header)." }, "references": { "type": "array", "items": { "type": "string" }, "description": "Prior Message-IDs in the thread, for inbox threading (References header)." }, "category": { "enum": ["transactional", "marketing"], "type": "string", "description": "`marketing` (default) adds one-click unsubscribe headers and skips recipients who unsubscribed from this app. Use `transactional` for receipts, alerts and password resets: no unsubscribe header, never suppressed, and cc/bcc preserved on a single message." } }, "required": ["subject", "body"] },
|
|
4061
|
-
outputSchema: { "type": "object", "properties": { "recipients": { "type": "array", "items": { "type": "string" }, "description": "To addresses the message was sent to." }, "cc": { "type": "array", "items": { "type": "string" }, "description": "Cc addresses on the message (empty if none)." }, "bcc": { "type": "array", "items": { "type": "string" }, "description": "Bcc addresses on the message (empty if none)." }, "from": { "type": "string", "description": "The resolved sender address the message went out as (auto-selected when no `from` is given)." }, "suppressed": { "type": "array", "items": { "type": "string" }, "description": "Recipients skipped because they unsubscribed from this app. Always empty for a `transactional` send." } }, "required": ["recipients", "cc", "bcc", "from", "suppressed"] }
|
|
4060
|
+
- The subject is stored verbatim in the app's delivery log, which every workspace member can read for 90 days. Never put a secret in the subject \u2014 no one-time codes, no magic-link tokens, no password-reset tokens. Put those in the body of a "transactional" send: a small transactional send is delivered immediately and its body is never stored. A "marketing" send, or any large send, is queued for delivery, which means its body is held in internal storage until the send finishes \u2014 so do not put a secret in the body of one of those either.`,
|
|
4061
|
+
inputSchema: { "type": "object", "properties": { "subject": { "type": "string", "description": "Email subject line" }, "body": { "type": "string", "description": "Email body content (plain text, markdown, HTML, or a CDN URL to an HTML file)" }, "to": { "anyOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }] }, "cc": { "anyOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }] }, "bcc": { "anyOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }] }, "connectionId": { "type": "string", "description": "OAuth connection ID(s) for the recipient(s), comma-separated for multiple" }, "generateHtml": { "type": "boolean", "description": "When true, auto-convert the body text into a styled HTML email using AI" }, "generateHtmlInstructions": { "type": "string", "description": "Natural language instructions for the HTML generation style" }, "generateHtmlModelOverride": { "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", "properties": {}, "required": [], "description": "Additional model-specific configuration" } }, "required": ["model", "temperature", "maxResponseTokens"], "description": "Model settings override for HTML generation" }, "attachments": { "type": "array", "items": { "anyOf": [{ "type": "string" }, { "type": "object", "properties": { "url": { "type": "string" }, "filename": { "type": "string" }, "contentType": { "type": "string" } }, "required": ["url"] }] }, "description": "Files to attach: each entry is a URL string, or an object `{ url, filename?, contentType? }` to control the displayed filename and MIME type." }, "from": { "type": "string", "description": "Custom sender handle \u2014 only for apps with a custom domain or subdomain. Bare handle (`support`), full `support@your-domain.com`, or `Name <support@your-domain.com>`. Must resolve to a domain the app owns." }, "bodyType": { "enum": ["auto", "html", "markdown", "text"], "type": "string", "description": "How to interpret `body`: `auto` (default \u2014 detect HTML, else render markdown), `html` (send as-is), `markdown` (render to HTML), or `text` (send as plain text only, no HTML part). Every send includes a text/plain alternative." }, "text": { "type": "string", "description": "Explicit text/plain alternative body. Auto-derived from `body` if omitted." }, "replyTo": { "type": "string", "description": "Reply-To address for the email." }, "inReplyTo": { "type": "string", "description": "Message-ID this email replies to, for inbox threading (In-Reply-To header)." }, "references": { "type": "array", "items": { "type": "string" }, "description": "Prior Message-IDs in the thread, for inbox threading (References header)." }, "category": { "enum": ["transactional", "marketing"], "type": "string", "description": "`marketing` (default) adds one-click unsubscribe headers and skips recipients who unsubscribed from this app. Use `transactional` for receipts, alerts and password resets: no unsubscribe header, never suppressed, and cc/bcc preserved on a single message." }, "batchId": { "type": "string", "description": "Groups this send's per-recipient rows into one blast, so per-campaign stats are readable afterwards. Pass your own campaign id (1-64 printable chars) to join our delivery stats onto your own tables with no mapping; omit it and one is generated. Either way it comes back in the output." } }, "required": ["subject", "body"] },
|
|
4062
|
+
outputSchema: { "type": "object", "properties": { "recipients": { "type": "array", "items": { "type": "string" }, "description": "To addresses the message was sent to." }, "cc": { "type": "array", "items": { "type": "string" }, "description": "Cc addresses on the message (empty if none)." }, "bcc": { "type": "array", "items": { "type": "string" }, "description": "Bcc addresses on the message (empty if none)." }, "from": { "type": "string", "description": "The resolved sender address the message went out as (auto-selected when no `from` is given)." }, "suppressed": { "type": "array", "items": { "type": "string" }, "description": "Recipients skipped because they unsubscribed from this app. Always empty for a `transactional` send." }, "batchId": { "type": "string", "description": "Groups this send's per-recipient rows into one blast \u2014 the caller's `batchId` if supplied, otherwise a generated one. Returned unconditionally so an app can read per-blast stats back without having had to pass anything." } }, "required": ["recipients", "cc", "bcc", "from", "suppressed", "batchId"] }
|
|
4062
4063
|
},
|
|
4063
4064
|
"sendGmailDraft": {
|
|
4064
4065
|
stepType: "sendGmailDraft",
|
|
@@ -7397,6 +7398,11 @@ var MindStudioAgent = class {
|
|
|
7397
7398
|
* page changes (e.g. a short URL's target). Omit `paths` (or pass an empty
|
|
7398
7399
|
* array) to purge every snapshot for the app.
|
|
7399
7400
|
*
|
|
7401
|
+
* `paths` are this app's OWN route paths (`/u/abc`), whatever host the page is
|
|
7402
|
+
* served on. If another app mounts this one under a path prefix, the copies
|
|
7403
|
+
* cached at that prefix are purged too — no need to know or pass the mount
|
|
7404
|
+
* path.
|
|
7405
|
+
*
|
|
7400
7406
|
* Raw hook-token call (mirrors `reportIssue`) — the appId comes from the
|
|
7401
7407
|
* token. Backend / managed-context only.
|
|
7402
7408
|
*
|
|
@@ -7817,7 +7823,7 @@ var monacoSnippets = {
|
|
|
7817
7823
|
"searchXPosts": { fields: [["query", "string"], ["scope", ["recent", "all"]], ["options", "object"]], outputKeys: ["posts"] },
|
|
7818
7824
|
"searchYoutube": { fields: [["query", "string"], ["limitPages", "string"], ["filter", "string"], ["filterType", "string"]], outputKeys: ["results"] },
|
|
7819
7825
|
"searchYoutubeTrends": { fields: [["bp", ["now", "music", "gaming", "films"]], ["hl", "string"], ["gl", "string"]], outputKeys: [] },
|
|
7820
|
-
"sendEmail": { fields: [["subject", "string"], ["body", "string"]], outputKeys: ["recipients", "cc", "bcc", "from", "suppressed"] },
|
|
7826
|
+
"sendEmail": { fields: [["subject", "string"], ["body", "string"]], outputKeys: ["recipients", "cc", "bcc", "from", "suppressed", "batchId"] },
|
|
7821
7827
|
"sendGmailDraft": { fields: [["draftId", "string"]], outputKeys: [] },
|
|
7822
7828
|
"sendGmailMessage": { fields: [["to", "string"], ["subject", "string"], ["message", "string"], ["messageType", ["plain", "html", "markdown"]]], outputKeys: ["messageId"] },
|
|
7823
7829
|
"sendSlackDirectMessage": { fields: [["slackUserId", "string"], ["messageType", ["string", "blocks"]], ["message", "string"]], outputKeys: [] },
|