@bike4mind/cli 3.2.0 → 3.4.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.
@@ -22,6 +22,49 @@ import { homedir as homedir$1 } from "node:os";
22
22
  const APP_NAME = process.env.APP_NAME || "";
23
23
  const WEBSITE_URL = process.env.WEBSITE_URL || "";
24
24
  //#endregion
25
+ //#region ../../b4m-core/common/dist/skillMdSource-DL0mQJK_.mjs
26
+ /**
27
+ * The marker an exported SKILL.md carries so Bike4Mind can recognize its own exports. The B4M
28
+ * CLI/desktop loader (packages/cli CustomCommandStore) skips stamped files, and a future CLI sync
29
+ * keys off it to find files it owns - keep the `# Bike4Mind-Source: <url>` line format stable.
30
+ *
31
+ * Deliberately import-free so the stamp check never needs a YAML parser. skillMd.ts, which does need
32
+ * one, sits behind `@bike4mind/common/utils/skillMd` rather than the barrel the CLI imports.
33
+ */
34
+ const SKILL_MD_SOURCE_MARKER = "Bike4Mind-Source:";
35
+ /** Opening `---<lang>` fence, the frontmatter text, then the closing `---` line. */
36
+ const FRONTMATTER = /^---([^\r\n]*)\r?\n(?:([\s\S]*?)\r?\n)?---[ \t]*(?:\r?\n|$)/;
37
+ const SOURCE_LINE = new RegExp(`^[ \\t]*#[ \\t]*${SKILL_MD_SOURCE_MARKER}[ \\t]*(\\S*)`);
38
+ /** Splits a SKILL.md into its raw frontmatter and the rest; null when there is no closed fence. */
39
+ function splitSkillMdFrontmatter(text) {
40
+ if (text.charCodeAt(0) === 65279) text = text.slice(1);
41
+ const match = text.match(FRONTMATTER);
42
+ if (!match) return null;
43
+ return {
44
+ lang: match[1].trim().toLowerCase(),
45
+ frontmatter: match[2] ?? "",
46
+ rest: text.slice(match[0].length)
47
+ };
48
+ }
49
+ /** The source URL in the leading comment header, before any YAML data or scalar content. */
50
+ function readSkillMdSourceUrl(frontmatter) {
51
+ for (const line of frontmatter.split(/\r?\n/)) {
52
+ const trimmed = line.trim();
53
+ if (!trimmed) continue;
54
+ if (!trimmed.startsWith("#")) return void 0;
55
+ const match = line.match(SOURCE_LINE);
56
+ if (match) return match[1];
57
+ }
58
+ }
59
+ /**
60
+ * True when the file's frontmatter carries the source stamp. Reads the raw fence text because the
61
+ * stamp is a YAML comment, which every YAML parser (gray-matter included) discards.
62
+ */
63
+ function frontmatterHasSourceStamp(text) {
64
+ const split = splitSkillMdFrontmatter(text);
65
+ return !!split && readSkillMdSourceUrl(split.frontmatter) !== void 0;
66
+ }
67
+ //#endregion
25
68
  //#region ../../b4m-core/hearth/dist/index.mjs
26
69
  /**
27
70
  * Zod validation for data crossing the Hearth boundary (API routes, CLI
@@ -354,6 +397,7 @@ const b4mLLMTools = z$1.enum([
354
397
  "retrieve_knowledge_content",
355
398
  "count_knowledge_base",
356
399
  "describe_knowledge_base",
400
+ "decide",
357
401
  "list_my_data_lakes",
358
402
  "create_data_lake",
359
403
  "save_content_to_data_lake",
@@ -963,6 +1007,7 @@ let ChatModels = /* @__PURE__ */ function(ChatModels) {
963
1007
  ChatModels["GPT5_2_CHAT_LATEST"] = "gpt-5.2-chat-latest";
964
1008
  ChatModels["GPT5_4"] = "gpt-5.4";
965
1009
  ChatModels["GPT5_4_MINI"] = "gpt-5.4-mini";
1010
+ ChatModels["GPT5_4_MINI_2026_03_17"] = "gpt-5.4-mini-2026-03-17";
966
1011
  ChatModels["GPT5_4_NANO"] = "gpt-5.4-nano";
967
1012
  ChatModels["GPT5_5"] = "gpt-5.5";
968
1013
  ChatModels["GPT5_6_SOL"] = "gpt-5.6-sol";
@@ -1058,8 +1103,8 @@ let ChatModels = /* @__PURE__ */ function(ChatModels) {
1058
1103
  ChatModels["DEEPSEEK_V4_PRO"] = "deepseek-v4-pro";
1059
1104
  return ChatModels;
1060
1105
  }({});
1061
- const CHAT_MODELS = Object.values(ChatModels);
1062
- const supportedChatModels = z$1.enum(ChatModels);
1106
+ const supportedChatModels = z$1.enum(ChatModels).exclude(["GPT5_4_MINI_2026_03_17"]);
1107
+ const CHAT_MODELS = [...supportedChatModels.options];
1063
1108
  new RegExp(`^${BEDROCK_ANTHROPIC_PREFIX}claude-`);
1064
1109
  /**
1065
1110
  * Models that support OpenAI's `reasoning_effort` request parameter.
@@ -1081,6 +1126,7 @@ const REASONING_SUPPORTED_MODELS = /* @__PURE__ */ new Set([
1081
1126
  "gpt-5.2",
1082
1127
  "gpt-5.4",
1083
1128
  "gpt-5.4-mini",
1129
+ "gpt-5.4-mini-2026-03-17",
1084
1130
  "gpt-5.4-nano",
1085
1131
  "gpt-5.6-sol",
1086
1132
  "gpt-5.6-luna",
@@ -2906,6 +2952,106 @@ const WORK_ITEM_STATUSES = [
2906
2952
  "blocked",
2907
2953
  "closed"
2908
2954
  ];
2955
+ const AuditActorSchema = z$1.object({
2956
+ kind: z$1.enum([
2957
+ "user",
2958
+ "apiKey",
2959
+ "system",
2960
+ "script"
2961
+ ]),
2962
+ scope: z$1.enum(["platform", "organization"]),
2963
+ userId: z$1.string().optional(),
2964
+ apiKeyId: z$1.string().optional(),
2965
+ email: z$1.string().optional(),
2966
+ name: z$1.string(),
2967
+ wasAdmin: z$1.boolean(),
2968
+ impersonatedUserId: z$1.string().optional()
2969
+ });
2970
+ const AuditTargetSchema = z$1.object({
2971
+ kind: z$1.enum([
2972
+ "user",
2973
+ "organization",
2974
+ "settings",
2975
+ "oauthClient",
2976
+ "apiKey",
2977
+ "system"
2978
+ ]),
2979
+ id: z$1.string(),
2980
+ displayName: z$1.string()
2981
+ });
2982
+ const AuditChangeSchema = z$1.object({
2983
+ field: z$1.string(),
2984
+ before: z$1.unknown(),
2985
+ after: z$1.unknown()
2986
+ });
2987
+ const AuditContextSchema = z$1.object({
2988
+ ip: z$1.string().optional(),
2989
+ userAgent: z$1.string().optional(),
2990
+ requestId: z$1.string().optional(),
2991
+ source: z$1.enum([
2992
+ "admin_ui",
2993
+ "api_key",
2994
+ "script",
2995
+ "worker"
2996
+ ]),
2997
+ route: z$1.string().optional()
2998
+ });
2999
+ const AdminAuditCategorySchema = z$1.enum([
3000
+ "credits",
3001
+ "access",
3002
+ "identity",
3003
+ "account",
3004
+ "org",
3005
+ "settings",
3006
+ "support"
3007
+ ]);
3008
+ const AdminAuditSeveritySchema = z$1.enum([
3009
+ "info",
3010
+ "notice",
3011
+ "critical"
3012
+ ]);
3013
+ z$1.object({
3014
+ id: z$1.string(),
3015
+ source: z$1.enum([
3016
+ "admin",
3017
+ "auth",
3018
+ "apiKey",
3019
+ "supportAccess"
3020
+ ]),
3021
+ occurredAt: z$1.date(),
3022
+ action: z$1.string(),
3023
+ category: AdminAuditCategorySchema,
3024
+ severity: AdminAuditSeveritySchema,
3025
+ actor: AuditActorSchema,
3026
+ target: AuditTargetSchema,
3027
+ organizationId: z$1.string().optional(),
3028
+ summary: z$1.string(),
3029
+ reason: z$1.string().optional(),
3030
+ changes: z$1.array(AuditChangeSchema).optional(),
3031
+ details: z$1.record(z$1.string(), z$1.unknown()).optional(),
3032
+ context: AuditContextSchema,
3033
+ related: z$1.object({
3034
+ creditTransactionId: z$1.string().optional(),
3035
+ impersonationSessionId: z$1.string().optional()
3036
+ }).optional(),
3037
+ backfilled: z$1.boolean().optional()
3038
+ });
3039
+ z$1.string({ error: "A reason is required" }).trim().min(5, `A reason of at least 5 characters is required`).max(500);
3040
+ z$1.object({
3041
+ category: AdminAuditCategorySchema.optional(),
3042
+ severity: AdminAuditSeveritySchema.optional(),
3043
+ action: z$1.string().regex(/^[a-z_]+(\.[a-z_]+)+$/).optional(),
3044
+ verb: z$1.string().regex(/^[a-z_]+$/).optional(),
3045
+ actorUserId: z$1.string().min(1).optional(),
3046
+ targetKind: AuditTargetSchema.shape.kind.optional(),
3047
+ targetId: z$1.string().min(1).optional(),
3048
+ source: AuditContextSchema.shape.source.optional(),
3049
+ actorScope: AuditActorSchema.shape.scope.optional(),
3050
+ from: z$1.iso.datetime().optional(),
3051
+ to: z$1.iso.datetime().optional(),
3052
+ requestId: z$1.string().min(1).optional(),
3053
+ impersonationSessionId: z$1.string().min(1).optional()
3054
+ });
2909
3055
  let SupportedFabFileMimeTypes = /* @__PURE__ */ function(SupportedFabFileMimeTypes) {
2910
3056
  SupportedFabFileMimeTypes["PDF"] = "application/pdf";
2911
3057
  SupportedFabFileMimeTypes["DOCX"] = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
@@ -3134,6 +3280,21 @@ const CREDITS_PER_USD_COST = (() => {
3134
3280
  console.warn(`[pricing] Env-configured margin/rate derive ${derived} credits per USD cost; using defaults`);
3135
3281
  return Math.round(DEFAULT_PRICE_MARGIN / DEFAULT_USD_TO_CREDITS_RATE);
3136
3282
  })();
3283
+ const DEFAULT_PROVIDER_COST_PER_CREDIT_USD = 1 / Math.round(DEFAULT_PRICE_MARGIN / DEFAULT_USD_TO_CREDITS_RATE);
3284
+ /**
3285
+ * Lowest USD price a credit may be sold for: the provider cost one credit stands for, times the
3286
+ * markup - the same sale price usage is billed at - and never less than what a credit costs us at
3287
+ * the built-in rate. The admin `pricePerCredit` save (apps/client/pages/api/settings/update.ts)
3288
+ * refuses a price below it, and per-credit purchases re-check it at charge time
3289
+ * (apps/client/lib/credits/utils.ts).
3290
+ */
3291
+ const MIN_PRICE_PER_CREDIT_USD = (() => {
3292
+ const derived = PRICE_MARGIN / CREDITS_PER_USD_COST;
3293
+ if (!Number.isFinite(derived)) return DEFAULT_USD_TO_CREDITS_RATE;
3294
+ return Math.max(derived, DEFAULT_PROVIDER_COST_PER_CREDIT_USD);
3295
+ })();
3296
+ /** USD price per credit for display, without float noise (0.0006, not 0.0006000000000000001). */
3297
+ const formatUsdPerCredit = (usd) => `$${Number(usd.toPrecision(6))}`;
3137
3298
  z.enum([
3138
3299
  "openai",
3139
3300
  "test",
@@ -3656,6 +3817,12 @@ z$1.enum([
3656
3817
  "investigate_soon",
3657
3818
  "immediate_action"
3658
3819
  ]);
3820
+ /**
3821
+ * Largest legacy thinking budget (`budget_tokens`) a request may ask for. Anthropic rejects rather
3822
+ * than clamps an oversized budget, and the budget raises the max_tokens a turn is sent with, so it
3823
+ * is bounded both at the request schemas and where the adapter consumes it (buildThinkingParams).
3824
+ */
3825
+ const MAX_THINKING_BUDGET_TOKENS = 32e3;
3659
3826
  const CompletionReasoningEffortSchema = z$1.enum([
3660
3827
  "none",
3661
3828
  "minimal",
@@ -3705,9 +3872,24 @@ const COMPLETION_TOOL_ERROR_CODES = [
3705
3872
  "tool_search_unsupported",
3706
3873
  "all_tools_deferred",
3707
3874
  "deferred_tool_cache_control",
3708
- "unknown_tool_reference"
3875
+ "unknown_tool_reference",
3876
+ "tool_changes_unsupported",
3877
+ "invalid_tool_change"
3709
3878
  ];
3710
3879
  /**
3880
+ * One block of a mid-conversation tool change: a `system`-role message whose content holds only these.
3881
+ * Strict on purpose: the provider takes a name reference to a tool already in `tools`, never an inline
3882
+ * definition or an MCP reference.
3883
+ */
3884
+ const ToolChangeBlockSchema = z$1.object({
3885
+ type: z$1.enum(["tool_addition", "tool_removal"]),
3886
+ tool: z$1.object({
3887
+ type: z$1.literal("tool_reference"),
3888
+ name: z$1.string().min(1)
3889
+ }).strict()
3890
+ }).strict();
3891
+ z$1.array(ToolChangeBlockSchema).min(1);
3892
+ /**
3711
3893
  * JSON Schema definition for structured output. The `schema` field is a full
3712
3894
  * JSON Schema document (we don't try to validate JSON Schema with Zod - that's
3713
3895
  * the caller's contract with the model). `strict: true` is the default, matching
@@ -3733,7 +3915,7 @@ const CompletionMessageSchema = z$1.object({
3733
3915
  "assistant",
3734
3916
  "system"
3735
3917
  ]),
3736
- content: z$1.union([z$1.string(), z$1.array(z$1.any())]),
3918
+ content: z$1.union([z$1.string(), z$1.array(z$1.any())]).describe("A string, or an array of content blocks. A `system` message may instead hold only `tool_addition` / `tool_removal` blocks (`{ type, tool: { type: \"tool_reference\", name } }`) to load or unload a tool named in `tools` mid-conversation without invalidating the prompt cache. It must follow a user turn or an assistant turn ending in a tool search result, and be the last message or precede an assistant turn. Only on models whose `supports_tool_changes` is true and that are served by the direct Anthropic API; otherwise refused with `errorCode: \"tool_changes_unsupported\"` (or `invalid_tool_change` / `unknown_tool_reference` when malformed)."),
3737
3919
  cache: z$1.boolean().optional()
3738
3920
  });
3739
3921
  /**
@@ -3763,8 +3945,8 @@ const CompletionRequestSchema = z$1.object({
3763
3945
  reasoningEffort: CompletionReasoningEffortSchema.optional().describe("Reasoning effort hint. Honoured by the OpenAI (reasoning models only, and not alongside tools on some of them), Kimi (K3 only), DeepSeek and Anthropic Claude (direct and Bedrock) adapters; each maps it onto its own scale. On Claude, `none` turns thinking off where the model allows it (otherwise it runs at the lowest effort), so short `max_tokens` replies stream visible text from the start; `minimal` maps to `low`. When `thinking.enabled` is also set on a Claude model, thinking stays on and this sets its effort instead, with `none` and `minimal` mapping to `low`. Claude models that reason inside `max_tokens` never have that ceiling raised, and on older Claude models any level above `none` turns thinking on (it is off by default there), forces temperature to 1 and drops top_p, and a thinking budget that cannot fit under `max_tokens` is skipped. On the direct Anthropic API, a json_schema `response_format` with no tools is served by a forced tool on models that support forced tool use, and that tool cannot run alongside thinking, so there only `none` is honoured; models served by native structured outputs honour every level. Silently ignored by every other adapter (Gemini, xAI, Ollama) and by non-reasoning models, so sending it there is a no-op."),
3764
3946
  thinking: z$1.object({
3765
3947
  enabled: z$1.boolean(),
3766
- budget_tokens: z$1.number().int().min(1024).optional()
3767
- }).optional().describe("Ask a model that can think to think on this turn. On Claude, `reasoningEffort` then sets how much it thinks, and `budget_tokens` (default 16000, minimum 1024) sizes thinking on older Claude models. Ignored by models that cannot think, and on the direct Anthropic API when a json_schema `response_format` is served by a forced tool, which cannot run alongside thinking.")
3948
+ budget_tokens: z$1.number().int().min(1024).max(MAX_THINKING_BUDGET_TOKENS).optional()
3949
+ }).optional().describe("Ask a model that can think to think on this turn. On Claude, `reasoningEffort` then sets how much it thinks, and `budget_tokens` (default 16000, minimum 1024, maximum 32000) sizes thinking on older Claude models. Ignored by models that cannot think, and on the direct Anthropic API when a json_schema `response_format` is served by a forced tool, which cannot run alongside thinking.")
3768
3950
  }).optional()
3769
3951
  });
3770
3952
  const CompletionUsageSchema = z$1.object({
@@ -3918,7 +4100,7 @@ function createThinkMarkerEscaper() {
3918
4100
  * The visible remainder of one reply slot, with hidden reasoning removed.
3919
4101
  *
3920
4102
  * This is the rule the chat transcript renders by - `extractReplies` in
3921
- * apps/client/shared/replyUtils.ts calls straight into it, so the two cannot drift.
4103
+ * packages/server-utils/src/shared/replyUtils.ts calls straight into it, so the two cannot drift.
3922
4104
  * Anything deriving "did the user see something yet" (latency metrics in particular) must
3923
4105
  * use this and not a looser non-empty check: a metric built on a looser rule reports text
3924
4106
  * as seen while the UI is still hiding it.
@@ -5294,8 +5476,9 @@ const ScopeForbiddenErrorSchema = ApiErrorSchema.extend({
5294
5476
  also_required_scopes: z$1.array(z$1.string()).optional().describe("API key scopes this route also requires. Every one must be held, on top of `required_scopes`.")
5295
5477
  });
5296
5478
  /**
5297
- * 403 on the v1 media create routes: the scope refusal above, or an organization-billed API key sent with
5298
- * another billing organization (apps/client/server/billing/resolveMediaBillingOrgId.ts).
5479
+ * 403 on the v1 media create routes and POST /api/v1/agent-executions: the scope refusal above, or an
5480
+ * organization-billed API key sent with another billing organization
5481
+ * (apps/client/server/billing/resolveMediaBillingOrgId.ts).
5299
5482
  */
5300
5483
  const BillingOrganizationForbiddenErrorSchema = ScopeForbiddenErrorSchema.extend({ errorCode: z$1.literal(BILLING_ORGANIZATION_MISMATCH_ERROR_CODE).optional() });
5301
5484
  const supportedVoiceGenerationVendor = z.enum(["openai", "elevenlabs"]);
@@ -5322,6 +5505,7 @@ const ttsRequestSchema = z.object({
5322
5505
  stability: z.number().min(0).max(1).optional(),
5323
5506
  similarityBoost: z.number().min(0).max(1).optional(),
5324
5507
  languageCode: ttsLanguageCodeSchema.optional(),
5508
+ organization_id: z.string().trim().min(1).nullable().optional().describe("The organization to bill: one you belong to, or null for your personal credits. Omitted bills your personal credits, as this endpoint always has. An organization-billed API key always bills its own organization: omit this or set it to the key's organization; any other value, null included, is rejected with a 403 (`errorCode: billing_organization_mismatch`)."),
5325
5509
  ...generatedAudioRequestFields
5326
5510
  });
5327
5511
  /**
@@ -5337,6 +5521,21 @@ const ttsBase64ResponseSchema = extendGeneratedAudioResponseSchema({
5337
5521
  fallbackFrom: supportedVoiceGenerationVendor.optional()
5338
5522
  });
5339
5523
  /**
5524
+ * The classifiers `POST /api/ai/tts` can emit - a narrowing of the platform-wide
5525
+ * `API_ERROR_CODES`, not a parallel vocabulary (CONVENTIONS.md section 1). The
5526
+ * `satisfies` fails the build if a code here is not in the shared union.
5527
+ *
5528
+ * `insufficient_credits` rides the 422 and means the same thing it does on
5529
+ * /api/ai/music and every other credit-metered endpoint. The two provider codes
5530
+ * are easy to invert: `provider_not_configured` means WE have no usable key,
5531
+ * `provider_rejected` means the provider REFUSED the key we sent.
5532
+ */
5533
+ const TTS_ERROR_CODES = [
5534
+ "insufficient_credits",
5535
+ "provider_not_configured",
5536
+ "provider_rejected"
5537
+ ];
5538
+ /**
5340
5539
  * Error body for `POST /api/ai/tts`, shared by the 401, 422, 429 and 502; the 413
5341
5540
  * has a shape of its own (`ttsResponseTooLargeSchema`). `errorCode` is present only
5342
5541
  * on the conditions that carry a classifier; an ordinary validation 422 has none.
@@ -5362,13 +5561,11 @@ const ttsBase64ResponseSchema = extendGeneratedAudioResponseSchema({
5362
5561
  * this handler's written bodies is a gap in the handler rather than something to
5363
5562
  * enshrine in a schema.
5364
5563
  */
5564
+ /** 403 body: the `ai:generate` scope refusal (`required_scopes`), or a billing refusal. */
5565
+ const ttsForbiddenResponseSchema = BillingOrganizationForbiddenErrorSchema.extend({ provider: supportedVoiceGenerationVendor.optional() });
5365
5566
  const ttsErrorResponseSchema = ApiErrorSchema.extend({
5366
5567
  provider: supportedVoiceGenerationVendor.optional(),
5367
- errorCode: z.enum([
5368
- "insufficient_credits",
5369
- "provider_not_configured",
5370
- "provider_rejected"
5371
- ]).optional()
5568
+ errorCode: z.enum(TTS_ERROR_CODES).optional()
5372
5569
  });
5373
5570
  /**
5374
5571
  * TTS 413 body: `generatedAudioTooLargeSchema` plus the provider. The handler never
@@ -5462,6 +5659,8 @@ const MUSIC_VALIDATION_ERROR_CODES = [
5462
5659
  "lyrics_with_instrumental",
5463
5660
  "lyrics_too_long"
5464
5661
  ];
5662
+ const SECONDS = String.raw`\d+(?:\.\d+)?`;
5663
+ String.raw`\[(?:${SECONDS}:${SECONDS}|:)\]`;
5465
5664
  /**
5466
5665
  * Building blocks for entity response schemas held to an entity's key list (see
5467
5666
  * selfUserResponseSchema in ./user.ts for the full rationale). A passthrough value is
@@ -6704,8 +6903,11 @@ If the full deliverable genuinely will not fit, do NOT stub the difference. REDU
6704
6903
  * public "Help Center" data lake, so when the knowledge-base search tool is available the model
6705
6904
  * can GROUND its answer in the real docs; the prompt still forbids inventing UI paths it can't
6706
6905
  * verify (relevant when that tool isn't enabled for the session).
6906
+ *
6907
+ * Ships in open-core builds too, so it names only host surfaces, never an overlay feature. A quoted
6908
+ * name in a sentence about the sidebar must be a real sidenav row: SidenavNav.test.tsx enforces it.
6707
6909
  */
6708
- const HELP_CENTER_PROMPT = `HELP CENTER: Bike4Mind has a built-in Help Center that documents how to use the app. Users reach it from the "Help Center" item in the left sidebar, the help (?) icons beside feature titles, or the ? keyboard shortcut. When the user is clearly asking how to DO something in Bike4Mind itself (navigation, settings, files, the data lake, OptiHashi, agents, projects, sharing, billing, etc.) — as opposed to asking you to perform a task — give a brief, helpful answer and point them to the Help Center for full, up-to-date steps. If a knowledge-base/help search tool is available, use it to ground your answer in the actual help docs first. Do NOT invent menu paths, button names, or features you are not sure exist; if unsure, say so and direct them to the Help Center rather than guessing.`;
6910
+ const HELP_CENTER_PROMPT = `HELP CENTER: Bike4Mind has a built-in Help Center that documents how to use the app. Users reach it from the Help Center button on the "Gears" page (open "Gears" in the left sidebar), the help (?) icons beside feature titles, or the ? keyboard shortcut. When the user is clearly asking how to DO something in Bike4Mind itself (navigation, settings, files, the data lake, agents, projects, sharing, billing, etc.) - as opposed to asking you to perform a task - give a brief, helpful answer and point them to the Help Center for full, up-to-date steps. If a knowledge-base/help search tool is available, use it to ground your answer in the actual help docs first. Do NOT invent menu paths, button names, or features you are not sure exist; if unsure, say so and direct them to the Help Center rather than guessing.`;
6709
6911
  /**
6710
6912
  * Default text for the abstention licence. Single source of truth used BOTH as the
6711
6913
  * `AbstentionPrompt` admin setting's default AND as the runtime fallback in ChatCompletionProcess -
@@ -6869,6 +7071,7 @@ z$1.enum([
6869
7071
  "BedrockGuardrailId",
6870
7072
  "BedrockGuardrailVersion",
6871
7073
  "ImageModerationEnabled",
7074
+ "ImageModerationReviewerEmails",
6872
7075
  "tagLineMain",
6873
7076
  "tagLineSub",
6874
7077
  "defaultTags",
@@ -9368,6 +9571,14 @@ const settingsMap = {
9368
9571
  description: "Whether to run generated images through content moderation (Rekognition) and block explicit content. Legal-safety control (#9776) — default ON.",
9369
9572
  category: "AI Moderation"
9370
9573
  }),
9574
+ ImageModerationReviewerEmails: makeObjectSetting({
9575
+ key: "ImageModerationReviewerEmails",
9576
+ name: "Image Moderation Reviewer Emails",
9577
+ defaultValue: [],
9578
+ description: "Email addresses alerted when an image moderation incident needs review, one per line. The alert carries incident metadata and an admin link only, never the image or user content. Empty sends no alert.",
9579
+ category: "AI Moderation",
9580
+ schema: z$1.array(z$1.string())
9581
+ }),
9371
9582
  SkillMarketHighRiskTools: makeStringSetting({
9372
9583
  key: "SkillMarketHighRiskTools",
9373
9584
  name: "Skill Market High-Risk Tools",
@@ -9513,7 +9724,7 @@ const settingsMap = {
9513
9724
  userReadable: true,
9514
9725
  name: "Price Per Credit",
9515
9726
  defaultValue: 50,
9516
- description: "The price per credit for purchasing credits.",
9727
+ description: `The price in USD of one credit bought pay-as-you-go. Cannot be set below ${formatUsdPerCredit(MIN_PRICE_PER_CREDIT_USD)}, the per-credit sale price including markup.`,
9517
9728
  category: "Users",
9518
9729
  group: API_SERVICE_GROUPS.CREDITS.id,
9519
9730
  order: 1
@@ -9945,7 +10156,7 @@ const settingsMap = {
9945
10156
  userReadable: true,
9946
10157
  name: "Default Free Credits",
9947
10158
  defaultValue: 0,
9948
- description: `Credits granted to a user who registers WITHOUT an invite code (only applies when Allow Open Registration is ON). Granted after the user verifies their email, NOT at signup - an unverified throwaway account gets 0 credits (anti-spam). A free user can never spend more than this - their hard ceiling of real model cost is roughly credits / ${CREDITS_PER_USD_COST} USD.`,
10159
+ description: "Base credits granted after email verification to a user who registers WITHOUT an invite code, including eligible partner signups when Allow Open Registration is OFF. Partner-rule credits are added on top of this amount. An unverified account receives no credits. A free user cannot spend beyond their total granted balance.",
9949
10160
  group: API_SERVICE_GROUPS.CREDITS.id,
9950
10161
  category: "Users"
9951
10162
  }),
@@ -11770,6 +11981,17 @@ z$1.looseObject({
11770
11981
  param: z$1.string().optional()
11771
11982
  });
11772
11983
  /**
11984
+ * The client-chosen billing organization on the v1 media request bodies (image generations and edits,
11985
+ * video and music generations). Blank is a 422 rather than an omission: billing must never fall
11986
+ * through to a different payer on an empty string. The server side of this contract is
11987
+ * resolveMediaBillingOrgId (apps/client/server/billing); keep these descriptions in step with it.
11988
+ */
11989
+ const BillingOrganizationIdSchema = z$1.string().trim().min(1).nullable().optional().describe(`The organization to bill: one you belong to, or null for your personal credits. Omitted bills your home organization, or your personal credits if you have none. An organization-billed API key always bills its own organization: omit this or set it to the key's organization; any other value, null included, is rejected with a 403 (\`errorCode: ${BILLING_ORGANIZATION_MISMATCH_ERROR_CODE}\`).`);
11990
+ /** The billing-organization clause of a v1 media create route's 403 description. */
11991
+ const BILLING_ORGANIZATION_FORBIDDEN_DESCRIPTION = `the billing organization names one you do not belong to (or is not a valid id), or an organization-billed API key names any organization but its own (\`errorCode: ${BILLING_ORGANIZATION_MISMATCH_ERROR_CODE}\`).`;
11992
+ /** A v1 media create route's 400 for an org-billed key that no longer speaks for its organization. */
11993
+ const BILLING_ORGANIZATION_STALE_KEY_DESCRIPTION = "An organization-billed API key bills an organization that no longer exists, or one its owner is no longer a member of; re-mint the key.";
11994
+ /**
11773
11995
  * Supported sound-effects generation vendors. Currently only ElevenLabs.
11774
11996
  * New vendors are added here and in the `aiSoundService` factory.
11775
11997
  */
@@ -11788,6 +12010,7 @@ const soundEffectsRequestSchema = z.object({
11788
12010
  durationSeconds: z.number().min(.5).max(30).optional(),
11789
12011
  promptInfluence: z.number().min(0).max(1).optional(),
11790
12012
  format: z.string().optional(),
12013
+ organization_id: BillingOrganizationIdSchema,
11791
12014
  ...generatedAudioRequestFields
11792
12015
  });
11793
12016
  /**
@@ -13299,6 +13522,16 @@ const PermissionRequestAction = z$1.object({
13299
13522
  */
13300
13523
  toolCallId: z$1.string().optional()
13301
13524
  });
13525
+ const ConfidenceGateAction = z$1.object({
13526
+ action: z$1.literal("confidence_gate"),
13527
+ executionId: z$1.string(),
13528
+ /** 0-indexed wire convention, matching `permission_request` and `IterationStream`. */
13529
+ iteration: z$1.number(),
13530
+ /** 0..1, the agent's reported confidence for the paused iteration. */
13531
+ confidence: z$1.number(),
13532
+ /** Pre-formatted server copy, e.g. "Iteration confidence 42% below threshold 60%". */
13533
+ reason: z$1.string()
13534
+ });
13302
13535
  const ChildExecutionSnapshotSchema = z$1.lazy(() => z$1.object({
13303
13536
  executionId: z$1.string(),
13304
13537
  agentName: z$1.string(),
@@ -13313,6 +13546,7 @@ const ChildExecutionSnapshotSchema = z$1.lazy(() => z$1.object({
13313
13546
  }));
13314
13547
  const ReconnectResultAction = z$1.object({
13315
13548
  action: z$1.literal("reconnect_result"),
13549
+ requestId: z$1.string().optional(),
13316
13550
  found: z$1.boolean(),
13317
13551
  executionId: z$1.string().optional(),
13318
13552
  sessionId: z$1.string().optional(),
@@ -13323,6 +13557,13 @@ const ReconnectResultAction = z$1.object({
13323
13557
  requestedAt: z$1.union([z$1.string(), z$1.date()]),
13324
13558
  toolCallId: z$1.string().optional()
13325
13559
  }).optional(),
13560
+ pendingGate: z$1.object({
13561
+ /** 0-indexed wire convention, matching `ConfidenceGateAction` and `IterationStream`. */
13562
+ iteration: z$1.number(),
13563
+ confidence: z$1.number(),
13564
+ reason: z$1.string(),
13565
+ requestedAt: z$1.union([z$1.string(), z$1.date()])
13566
+ }).optional(),
13326
13567
  totalCreditsUsed: z$1.number().optional(),
13327
13568
  iterationCount: z$1.number().optional(),
13328
13569
  steps: z$1.array(AgentStepSchema).optional(),
@@ -13414,6 +13655,7 @@ z$1.discriminatedUnion("action", [
13414
13655
  SubagentFailedAction,
13415
13656
  SubagentProgressAction,
13416
13657
  PermissionRequestAction,
13658
+ ConfidenceGateAction,
13417
13659
  ReconnectResultAction
13418
13660
  ]);
13419
13661
  const FLEET_USAGE_MAX_ROWS = 1e4;
@@ -13531,11 +13773,7 @@ const AgentExecutionStartRequestSchema = z$1.object({
13531
13773
  * is what reproduces the product UI's Agent Mode toggle.
13532
13774
  */
13533
13775
  agent_id: z$1.string().optional(),
13534
- /**
13535
- * Bill this run to an organization's credit pool. The caller must belong to it; a
13536
- * non-member gets 404. Omit to bill the caller personally.
13537
- */
13538
- organization_id: z$1.string().optional(),
13776
+ organization_id: z$1.string().optional().describe("The organization whose credit pool pays for this run. You must belong to it; a non-member gets 404. Omit it to bill your personal credits. An organization-billed API key always bills its own organization: omit this or set it to the key's; any other value is a 403 (`errorCode: billing_organization_mismatch`)."),
13539
13777
  /**
13540
13778
  * Tool-id allowlist for the run. Omit to use the resolved profile's own list.
13541
13779
  *
@@ -13553,8 +13791,7 @@ const AgentExecutionStartRequestSchema = z$1.object({
13553
13791
  max_tokens: z$1.number().int().positive().optional(),
13554
13792
  thinking: z$1.object({
13555
13793
  enabled: z$1.boolean(),
13556
- /** Bounded at 32000: Anthropic rejects rather than clamps an oversized budget. */
13557
- budget_tokens: z$1.number().int().positive().max(32e3).optional()
13794
+ budget_tokens: z$1.number().int().positive().max(MAX_THINKING_BUDGET_TOKENS).optional()
13558
13795
  }).optional(),
13559
13796
  /** Per-message file attachments (fabFile ids), materialized into the first iteration. */
13560
13797
  file_ids: z$1.array(z$1.string()).optional(),
@@ -13657,13 +13894,14 @@ const AgentExecutionIdParamSchema = z$1.object({ id: z$1.string().min(1) });
13657
13894
  *
13658
13895
  * Plain Zod (no `.openapi()`) so any runtime can import them; the OpenAPI layer
13659
13896
  * annotates them via the contract. The tool-name enum MUST stay in sync with
13660
- * SUPPORTED_TOOLS in apps/client/server/cli/toolsHandler.shared.ts.
13897
+ * SUPPORTED_TOOLS in packages/server-utils/src/cli/toolsHandler.shared.ts.
13661
13898
  */
13662
13899
  const ToolExecutionRequestSchema = z$1.object({
13663
13900
  toolName: z$1.enum([
13664
13901
  "weather_info",
13665
13902
  "web_search",
13666
- "web_fetch"
13903
+ "web_fetch",
13904
+ "decide"
13667
13905
  ]),
13668
13906
  input: z$1.record(z$1.string(), z$1.unknown())
13669
13907
  });
@@ -14313,7 +14551,7 @@ const ChatCompletionCreateInputSchema = z$1.object({
14313
14551
  stream: z$1.boolean().optional(),
14314
14552
  thinking: z$1.object({
14315
14553
  enabled: z$1.boolean(),
14316
- budget_tokens: z$1.number().optional()
14554
+ budget_tokens: z$1.number().int().positive().max(MAX_THINKING_BUDGET_TOKENS).optional()
14317
14555
  }).optional(),
14318
14556
  messages: z$1.array(z$1.object({
14319
14557
  role: z$1.enum([
@@ -14972,7 +15210,7 @@ const CreateSessionRequestSchema = z$1.object({
14972
15210
  retrievalVectorizedOnly: z$1.boolean().optional(),
14973
15211
  citationStyle: z$1.enum(["named", "indexed"]).optional(),
14974
15212
  temperature: z$1.number().optional(),
14975
- maxToolCalls: z$1.number().int().positive().optional(),
15213
+ maxToolCalls: z$1.number().int().positive().max(50).optional(),
14976
15214
  autoNamePlaceholder: z$1.string().optional(),
14977
15215
  tags: z$1.array(SessionTagSchema).optional(),
14978
15216
  lastUsedModel: z$1.string().nullish()
@@ -15038,6 +15276,47 @@ z$2.object(passthroughShape({
15038
15276
  uiSideEffects: true,
15039
15277
  jupyterNotebook: true
15040
15278
  }));
15279
+ const ENV_VARIABLE_RESPONSE_FIELDS = { key: z$2.string() };
15280
+ const envVariableResponseSchema = z$2.preprocess((value) => Array.isArray(value) ? value.flatMap((item) => {
15281
+ const key = item?.key;
15282
+ return typeof key === "string" ? [{ key }] : [];
15283
+ }) : [], z$2.array(z$2.object(ENV_VARIABLE_RESPONSE_FIELDS)));
15284
+ const GITHUB_WEBHOOK_RESPONSE_FIELDS = {
15285
+ routingToken: true,
15286
+ subscribedEvents: true,
15287
+ repos: true,
15288
+ createdAt: true,
15289
+ lastDeliveryAt: true
15290
+ };
15291
+ const metadataResponseSchema = z$2.object({
15292
+ ...passthroughShape({
15293
+ githubLogin: true,
15294
+ githubUserId: true,
15295
+ scope: true,
15296
+ connectedAt: true,
15297
+ disconnectedAt: true,
15298
+ selectedRepositories: true,
15299
+ webhooks: true
15300
+ }),
15301
+ webhooks: z$2.object({ github: z$2.object(passthroughShape(GITHUB_WEBHOOK_RESPONSE_FIELDS)).nullish() }).nullish()
15302
+ });
15303
+ z$2.object({
15304
+ ...passthroughShape({
15305
+ id: true,
15306
+ createdAt: true,
15307
+ updatedAt: true,
15308
+ name: true,
15309
+ userId: true,
15310
+ envVariables: true,
15311
+ tools: true,
15312
+ toolSchemas: true,
15313
+ toolSchemasFetchedAt: true,
15314
+ enabled: true,
15315
+ metadata: true
15316
+ }),
15317
+ envVariables: envVariableResponseSchema,
15318
+ metadata: metadataResponseSchema.nullish()
15319
+ });
15041
15320
  const questMasterPlanResponseSchema = z$2.object(passthroughShape({
15042
15321
  id: true,
15043
15322
  createdAt: true,
@@ -15064,6 +15343,86 @@ z$2.object({
15064
15343
  success: z$2.literal(true),
15065
15344
  plan: questMasterPlanResponseSchema
15066
15345
  }).extend({ metrics: passthroughField });
15346
+ /** A lake document as returned by the SPA data-lake routes (editor document or reader projection). */
15347
+ const dataLakeResponseSchema = z$2.object(passthroughShape({
15348
+ id: true,
15349
+ createdAt: true,
15350
+ updatedAt: true,
15351
+ name: true,
15352
+ slug: true,
15353
+ description: true,
15354
+ systemPrompt: true,
15355
+ injectPromptForReaders: true,
15356
+ preferredSystemPromptId: true,
15357
+ groundingMode: true,
15358
+ requiredPassageTokenTarget: true,
15359
+ inconsistencyReport: true,
15360
+ inconsistencyComputedAt: true,
15361
+ lastInconsistencyScanAt: true,
15362
+ fileTagPrefix: true,
15363
+ datalakeTag: true,
15364
+ requiredUserTag: true,
15365
+ requiredEntitlement: true,
15366
+ createdByUserId: true,
15367
+ lastUpdatedByUserId: true,
15368
+ organizationId: true,
15369
+ isPublic: true,
15370
+ auditQueryTextEnabled: true,
15371
+ status: true,
15372
+ fileCount: true,
15373
+ totalSizeBytes: true,
15374
+ totalChunkedChars: true,
15375
+ embeddingSpendMicroUsd: true,
15376
+ lastSyncAt: true,
15377
+ lastHealthCheckedAt: true,
15378
+ filesDeletedAt: true,
15379
+ filesArchivedAt: true,
15380
+ purgeClaimId: true,
15381
+ purgeStartedAt: true,
15382
+ lakeMemoryEnabled: true,
15383
+ lakeMemoryExtractionAt: true,
15384
+ lakeMemoryCursor: true,
15385
+ lakeMemoryPurgedAt: true,
15386
+ origin: true,
15387
+ pendingConnector: true,
15388
+ modelInconsistencyRunAt: true
15389
+ }));
15390
+ z$2.object({ data: z$2.array(dataLakeResponseSchema) });
15391
+ z$2.object({ data: z$2.array(z$2.object(passthroughShape({
15392
+ id: true,
15393
+ slug: true,
15394
+ name: true,
15395
+ requiredUserTag: true,
15396
+ requiredEntitlement: true,
15397
+ fileTagPrefix: true,
15398
+ datalakeTag: true,
15399
+ organizationId: true,
15400
+ description: true,
15401
+ isPublic: true,
15402
+ lakeMemoryEnabled: true,
15403
+ injectPromptForReaders: true,
15404
+ canManage: true,
15405
+ status: true,
15406
+ origin: true,
15407
+ systemPrompt: true,
15408
+ requiredPassageTokenTarget: true,
15409
+ isOwn: true,
15410
+ isCreator: true,
15411
+ canPreauthorize: true,
15412
+ ownerDisplayName: true,
15413
+ ownerUserId: true,
15414
+ ownerUsername: true,
15415
+ preferredSystemPromptId: true,
15416
+ pendingProposalCount: true,
15417
+ groundingMode: true,
15418
+ pendingConnector: true,
15419
+ hasGitHubConnection: true,
15420
+ embeddingSpendMicroUsd: true,
15421
+ canRebuild: true,
15422
+ canManageSettings: true,
15423
+ canManageMemory: true,
15424
+ retrievable: true
15425
+ }))) });
15067
15426
  z$1.preprocess((val) => {
15068
15427
  if (typeof val === "string") {
15069
15428
  if (val.toLowerCase() === "true") return true;
@@ -15203,7 +15562,10 @@ const CreateFileUploadRequestSchema = z$1.object({
15203
15562
  file_name: z$1.string().min(1),
15204
15563
  /** Declared MIME type, e.g. `image/png`. Unsupported types are rejected with 400. */
15205
15564
  mime_type: z$1.string().min(1),
15206
- /** Size in bytes of the file you will PUT. Checked against the upload limit and your storage quota. */
15565
+ /**
15566
+ * Size in bytes of the file you will PUT. Checked against the upload limit and your storage quota,
15567
+ * and bound into `upload_url`: a PUT of any other length is refused.
15568
+ */
15207
15569
  file_size: z$1.number().int().positive()
15208
15570
  });
15209
15571
  const FILE_MODERATION_STATUSES = [
@@ -15432,6 +15794,7 @@ const CORE_TOOL_SIDE_EFFECTS = {
15432
15794
  fmp_financial_data: "none",
15433
15795
  bob_panel_read: "none",
15434
15796
  skill: "none",
15797
+ decide: "none",
15435
15798
  recharts: "local",
15436
15799
  mermaid_chart: "local",
15437
15800
  navigate_view: "local",
@@ -16436,17 +16799,6 @@ const GENERATION_CALLBACK_DESCRIPTION = "Optional `callbackUrl`: an https URL th
16436
16799
  * in sync with the rejections in apps/client/server/generationCallback/armGenerationCallback.ts.
16437
16800
  */
16438
16801
  const GENERATION_CALLBACK_REJECTED_DESCRIPTION = "`callbackUrl` was rejected: the request is not API-key authenticated, the key has no callback signing secret, the URL resolves to a private address, or the deployment does not deliver callbacks.";
16439
- /**
16440
- * The client-chosen billing organization on the v1 media request bodies (image generations and edits,
16441
- * video and music generations). Blank is a 422 rather than an omission: billing must never fall
16442
- * through to a different payer on an empty string. The server side of this contract is
16443
- * resolveMediaBillingOrgId (apps/client/server/billing); keep these descriptions in step with it.
16444
- */
16445
- const BillingOrganizationIdSchema = z$1.string().trim().min(1).nullable().optional().describe(`The organization to bill: one you belong to, or null for your personal credits. Omitted bills your home organization, or your personal credits if you have none. An organization-billed API key always bills its own organization: omit this or set it to the key's organization; any other value, null included, is rejected with a 403 (\`errorCode: ${BILLING_ORGANIZATION_MISMATCH_ERROR_CODE}\`).`);
16446
- /** The billing-organization clause of a v1 media create route's 403 description. */
16447
- const BILLING_ORGANIZATION_FORBIDDEN_DESCRIPTION = `the billing organization names one you do not belong to (or is not a valid id), or an organization-billed API key names any organization but its own (\`errorCode: ${BILLING_ORGANIZATION_MISMATCH_ERROR_CODE}\`).`;
16448
- /** A v1 media create route's 400 for an org-billed key that no longer speaks for its organization. */
16449
- const BILLING_ORGANIZATION_STALE_KEY_DESCRIPTION = "An organization-billed API key bills an organization that no longer exists, or one its owner is no longer a member of; re-mint the key.";
16450
16802
  const DashboardParamsSchema = z$1.object({
16451
16803
  dashboardDataSources: z$1.array(z$1.object({
16452
16804
  sourceName: z$1.string(),
@@ -16487,7 +16839,7 @@ const PromptIntentSchema = z$1.enum(["fresh", "continuation"]);
16487
16839
  * (pages/api/v1/image-generations.ts); `literal` sends it unchanged apart from truncation to the model's prompt limit.
16488
16840
  */
16489
16841
  const ImagePromptResolutionSchema = z$1.enum(["auto", "literal"]);
16490
- const GenerateImageRequestBodySchema = OpenAIImageGenerationInput.extend({
16842
+ const GenerateImageIvokeParamsSchema = OpenAIImageGenerationInput.extend({
16491
16843
  sessionId: z$1.string(),
16492
16844
  questId: z$1.string().optional(),
16493
16845
  organizationId: z$1.string().nullable().optional(),
@@ -16520,13 +16872,21 @@ const GenerateImageRequestBodySchema = OpenAIImageGenerationInput.extend({
16520
16872
  /** Resolver intent - drives the banner's framing (continuation = "context applied" vs fresh = "enhanced"). */
16521
16873
  intent: PromptIntentSchema.optional()
16522
16874
  }).optional()
16523
- }).omit({
16875
+ });
16876
+ /**
16877
+ * snake_case alias of `organizationId` on the public image request bodies. The route maps it
16878
+ * (`resolveBillingOrgInput`) rather than the schema, which a public request schema may not
16879
+ * `.transform()`. Same rules as `organizationId`: null bills personal, blank is a 422.
16880
+ */
16881
+ const BillingOrgIdAliasSchema = BillingOrganizationIdSchema.describe("Alias of `organizationId`, for callers used to the snake_case video and music bodies. Sending both with different values is a 422.");
16882
+ const GenerateImageRequestBodySchema = GenerateImageIvokeParamsSchema.omit({
16524
16883
  intent: true,
16525
16884
  promptEnhancement: true
16526
16885
  }).extend({
16527
16886
  sessionId: z$1.string().optional(),
16528
16887
  sessionName: z$1.string().optional(),
16529
16888
  organizationId: BillingOrganizationIdSchema,
16889
+ organization_id: BillingOrgIdAliasSchema,
16530
16890
  callbackUrl: GenerationCallbackUrlSchema.optional(),
16531
16891
  projectId: z$1.string().optional(),
16532
16892
  prompt_resolution: ImagePromptResolutionSchema.optional().describe("How the prompt is treated before it reaches the image model. `\"auto\"` (the default) resolves it against the session history, so a follow-up such as \"make it darker\" is rewritten to carry the previous subject and the prior image is fed back as input. `\"literal\"` skips that step: the prompt is sent unchanged (apart from truncation to the model's prompt limit), `intent` is `\"fresh\"`, `promptWasEnhanced` is `false`, and a prior session image is carried forward only for models that cannot run without an input image. Use `\"literal\"` when the prompt is already self-contained, for example when an agent or pipeline builds it.")
@@ -16569,6 +16929,7 @@ const EditImageRequestBodySchema = OpenAIImageGenerationInput.extend({
16569
16929
  sessionId: z$1.string(),
16570
16930
  questId: z$1.string().optional(),
16571
16931
  organizationId: BillingOrganizationIdSchema,
16932
+ organization_id: BillingOrgIdAliasSchema,
16572
16933
  aspect_ratio: z$1.string().optional(),
16573
16934
  fabFileIds: z$1.array(z$1.string()).prefault([]),
16574
16935
  /**
@@ -16603,8 +16964,8 @@ z$1.object({
16603
16964
  imageConfig: GenerateImageToolCallSchema.optional(),
16604
16965
  audioConfig: AudioGenerationToolCallSchema.optional(),
16605
16966
  deepResearchConfig: z$1.object({
16606
- maxDepth: z$1.number().optional(),
16607
- duration: z$1.number().optional(),
16967
+ maxDepth: z$1.number().int().min(1).max(10).optional(),
16968
+ duration: z$1.number().positive().max(10).optional(),
16608
16969
  searchers: z$1.array(z$1.any()).optional()
16609
16970
  }).optional(),
16610
16971
  fabFileIds: z$1.array(z$1.string()),
@@ -17170,9 +17531,13 @@ defineEndpoint({
17170
17531
  schema: AgentExecutionAckSchema
17171
17532
  },
17172
17533
  400: {
17173
- description: "No usable default chat model is configured and none was supplied.",
17534
+ description: `No usable default chat model is configured and none was supplied. ${BILLING_ORGANIZATION_STALE_KEY_DESCRIPTION}`,
17174
17535
  schema: ApiErrorSchema
17175
17536
  },
17537
+ 403: {
17538
+ description: `The API key holds neither the \`ai:chat\` nor the \`ai:generate\` scope, or an organization-billed API key names any organization but its own (\`errorCode: ${BILLING_ORGANIZATION_MISMATCH_ERROR_CODE}\`).`,
17539
+ schema: BillingOrganizationForbiddenErrorSchema
17540
+ },
17176
17541
  404: {
17177
17542
  description: "No session with the given `session_id` is owned by the caller, or `organization_id` names an organization the caller does not belong to. \"Exists but is not yours\" is reported as 404 too, so neither session ids nor org membership can be probed through this endpoint.",
17178
17543
  schema: ApiErrorSchema
@@ -17382,7 +17747,7 @@ defineEndpoint({
17382
17747
  path: "/api/ai/v1/tools",
17383
17748
  operationId: "executeTool",
17384
17749
  summary: "Execute a server-side tool",
17385
- description: "Runs one of the built-in server-side tools (`weather_info`, `web_search`, `web_fetch`) and returns its result as JSON. Authenticate with a JWT access token only - API keys are NOT accepted on this endpoint. Rate-limited to 100 requests/hour per user, counted separately from other endpoints. `request_id` echoes the X-Request-ID response header.",
17750
+ description: "Runs one of the built-in server-side tools (`weather_info`, `web_search`, `web_fetch`, `decide`) and returns its result as JSON. Authenticate with a JWT access token only - API keys are NOT accepted on this endpoint. Rate-limited to 100 requests/hour per user, counted separately from other endpoints. `request_id` echoes the X-Request-ID response header.",
17386
17751
  tags: ["AI"],
17387
17752
  auth: "jwtOnly",
17388
17753
  request: ToolExecutionRequestSchema,
@@ -17471,7 +17836,7 @@ defineEndpoint({
17471
17836
  }
17472
17837
  },
17473
17838
  400: {
17474
- description: "Malformed or otherwise invalid request (no `errorCode`), or a `model` the caller cannot use (`errorCode: \"unknown_model\"`): not in the catalog or not available to the caller. List valid ids with `GET /api/v1/models`. Tool search requests are refused with: `tool_search_unsupported` (a server tool, `tool_reference` or echoed tool search block on a model that cannot serve tool search here), `all_tools_deferred` (every tool deferred and no server tool), `deferred_tool_cache_control` (`cache_control` on a deferred tool), `unknown_tool_reference` (a `tool_reference` naming a tool not in `tools`, or carrying no string `tool_name`).",
17839
+ description: "Malformed or otherwise invalid request (no `errorCode`), or a `model` the caller cannot use (`errorCode: \"unknown_model\"`): not in the catalog or not available to the caller. List valid ids with `GET /api/v1/models`. Tool search requests are refused with: `tool_search_unsupported` (a server tool, `tool_reference` or echoed tool search block on a model that cannot serve tool search here), `all_tools_deferred` (every tool deferred and no server tool), `deferred_tool_cache_control` (`cache_control` on a deferred tool), `unknown_tool_reference` (a `tool_reference` naming a tool not in `tools`, or carrying no string `tool_name`). Mid-conversation tool changes are refused with: `tool_changes_unsupported` (a `tool_addition` / `tool_removal` system message on a model that cannot serve it here), `invalid_tool_change` (a malformed block, or one placed where the provider does not accept it), and `unknown_tool_reference` (a changed tool not in `tools`).",
17475
17840
  schema: CompletionsBadRequestErrorSchema
17476
17841
  },
17477
17842
  413: {
@@ -17568,7 +17933,7 @@ defineEndpoint({
17568
17933
  path: "/api/ai/tts",
17569
17934
  operationId: "synthesizeSpeech",
17570
17935
  summary: "Synthesize speech from text",
17571
- description: "Generates speech from text using OpenAI or ElevenLabs. When the requested provider has no usable key (or the provider rejects it), another configured provider stands in and the substitution is reported via `provider`/`fallbackFrom` and the `X-B4M-Tts-Provider*` headers. Input length is capped per provider (OpenAI 4096 characters, ElevenLabs 10000), and an output `format` the chosen provider cannot produce is rejected with a 422 before any provider cost is incurred. " + GENERATED_AUDIO_DESCRIPTION,
17936
+ description: "Generates speech from text using OpenAI or ElevenLabs. When the requested provider has no usable key (or the provider rejects it), another configured provider stands in and the substitution is reported via `provider`/`fallbackFrom` and the `X-B4M-Tts-Provider*` headers. Input length is capped per provider (OpenAI 4096 characters, ElevenLabs 10000), and an output `format` the chosen provider cannot produce is rejected with a 422 before any provider cost is incurred. `organization_id` picks the payer: an organization you belong to, or null for your personal credits; omitted bills your personal credits, as this endpoint always has. " + GENERATED_AUDIO_DESCRIPTION,
17572
17937
  tags: ["Audio"],
17573
17938
  auth: "apiKeyOrJwt",
17574
17939
  scopes: ["ai:generate"],
@@ -17611,6 +17976,18 @@ defineEndpoint({
17611
17976
  description: "Missing/invalid credentials, no provider has a usable key (`provider_not_configured`), or the provider refused the key we sent and no alternate could stand in (`provider_rejected`).",
17612
17977
  schema: ttsErrorResponseSchema
17613
17978
  },
17979
+ 400: {
17980
+ description: `The billing organization could not be resolved. ${BILLING_ORGANIZATION_STALE_KEY_DESCRIPTION}`,
17981
+ schema: ttsErrorResponseSchema
17982
+ },
17983
+ 403: {
17984
+ description: `The API key lacks the \`ai:generate\` scope (\`required_scopes\` names it), or ${BILLING_ORGANIZATION_FORBIDDEN_DESCRIPTION}`,
17985
+ schema: ttsForbiddenResponseSchema
17986
+ },
17987
+ 404: {
17988
+ description: "A nonexistent `organization_id`, for an admin caller; for anyone else it is `403`.",
17989
+ schema: ttsErrorResponseSchema
17990
+ },
17614
17991
  422: {
17615
17992
  description: "Request body failed validation, the text exceeds the provider character limit, the provider cannot produce the requested `format`, the provider rejected the request (e.g. an unknown voice), or the caller cannot afford the synthesis - the last of those is the only one tagged `errorCode: \"insufficient_credits\"`, so match on the classifier rather than the status to tell a billing failure from a bad request.",
17616
17993
  schema: ttsErrorResponseSchema
@@ -17704,7 +18081,7 @@ defineEndpoint({
17704
18081
  path: "/api/ai/sound-effects",
17705
18082
  operationId: "generateSoundEffect",
17706
18083
  summary: "Generate a sound effect",
17707
- description: "Generates a short sound effect from a text description. Omitting `durationSeconds` lets the provider pick the length (and bills at its default); `promptInfluence` trades prompt fidelity (1) against variation (0). Credits are reserved before generation and refunded if it fails. " + GENERATED_AUDIO_DESCRIPTION,
18084
+ description: "Generates a short sound effect from a text description. Omitting `durationSeconds` lets the provider pick the length (and bills at its default); `promptInfluence` trades prompt fidelity (1) against variation (0). Credits are reserved before generation and refunded if it fails. `organization_id` picks the payer: an organization you belong to, or null for your personal credits; omitted bills your home organization (or personal credits if you have none). " + GENERATED_AUDIO_DESCRIPTION,
17708
18085
  tags: ["Audio"],
17709
18086
  auth: "apiKeyOrJwt",
17710
18087
  scopes: ["ai:generate"],
@@ -17730,7 +18107,15 @@ defineEndpoint({
17730
18107
  tooLargeSchema: generatedAudioTooLargeSchema
17731
18108
  }),
17732
18109
  400: {
17733
- description: "The billing user or organization could not be resolved.",
18110
+ description: `The billing user or organization could not be resolved. ${BILLING_ORGANIZATION_STALE_KEY_DESCRIPTION}`,
18111
+ schema: ApiErrorSchema
18112
+ },
18113
+ 403: {
18114
+ description: `The API key lacks the \`ai:generate\` scope (\`required_scopes\` names it), or ${BILLING_ORGANIZATION_FORBIDDEN_DESCRIPTION}`,
18115
+ schema: BillingOrganizationForbiddenErrorSchema
18116
+ },
18117
+ 404: {
18118
+ description: "A nonexistent `organization_id`, for an admin caller; for anyone else it is `403`.",
17734
18119
  schema: ApiErrorSchema
17735
18120
  },
17736
18121
  422: {
@@ -17871,9 +18256,9 @@ defineEndpoint({
17871
18256
  replaced_by: null,
17872
18257
  image: null,
17873
18258
  credits_per_1m_tokens: {
17874
- input: 6e3,
17875
- output: 3e4,
17876
- cached_input: 600
18259
+ input: 4e3,
18260
+ output: 2e4,
18261
+ cached_input: 400
17877
18262
  }
17878
18263
  }, {
17879
18264
  id: "gpt-image-1",
@@ -17955,7 +18340,7 @@ defineEndpoint({
17955
18340
  path: "/api/v1/image-generations",
17956
18341
  operationId: "generateImage",
17957
18342
  summary: "Generate an image",
17958
- description: "Queues an image generation and returns immediately with the quest that will carry the result - no image yet, and the call never blocks on the render. Poll `GET /api/v1/quests/{id}` until `status` is `\"done\"` (see the `generateImage200PollResult` schema). Omit `sessionId` to create a new session. The prompt is resolved against the session history first, so a follow-up such as \"make it darker\" binds to the previous image; `enhancedPrompt` reports the prompt actually sent to the model. Send `prompt_resolution: \"literal\"` to skip that step and have the prompt sent as written (apart from truncation to the model's prompt limit). `referenceImageFabFileIds` passes up to 15 already-uploaded images as style anchors, after the input image taken from `fabFileIds`. Only gpt-image models accept them: sending any with another model is rejected with a 400 rather than ignored. Which `size` values a model accepts, and whether it honours `background`, `seed`, `quality`, `n` and reference images, is listed per model in the `image` block of `GET /api/v1/models`. Credits are checked when the render runs, so insufficient credits arrive on the polled quest rather than as a 422. `POST /api/ai/generate-image` is a legacy alias of this endpoint. Authenticate with an API key (`b4m_live_`) or a JWT.\n\n" + GENERATION_CALLBACK_DESCRIPTION,
18343
+ description: "Queues an image generation and returns immediately with the quest that will carry the result - no image yet, and the call never blocks on the render. Poll `GET /api/v1/quests/{id}` until `status` is `\"done\"` (see the `generateImage200PollResult` schema). Omit `sessionId` to create a new session. The prompt is resolved against the session history first, so a follow-up such as \"make it darker\" binds to the previous image; `enhancedPrompt` reports the prompt actually sent to the model. Send `prompt_resolution: \"literal\"` to skip that step and have the prompt sent as written (apart from truncation to the model's prompt limit). `referenceImageFabFileIds` passes up to 15 already-uploaded images as style anchors, after the input image taken from `fabFileIds`. Only gpt-image models accept them: sending any with another model is rejected with a 400 rather than ignored. Which `size` values a model accepts, and whether it honours `background`, `seed`, `quality`, `n` and reference images, is listed per model in the `image` block of `GET /api/v1/models`. Credits are checked when the render runs, so insufficient credits arrive on the polled quest rather than as a 422. `organization_id` is accepted as an alias of `organizationId`, for callers used to the snake_case video and music bodies; `null` bills the personal account. `POST /api/ai/generate-image` is a legacy alias of this endpoint. Authenticate with an API key (`b4m_live_`) or a JWT.\n\n" + GENERATION_CALLBACK_DESCRIPTION,
17959
18344
  tags: ["Images"],
17960
18345
  auth: "apiKeyOrJwt",
17961
18346
  scopes: ["ai:generate"],
@@ -17982,6 +18367,10 @@ defineEndpoint({
17982
18367
  404: {
17983
18368
  description: "The session, or the quest being retried, does not exist or is not accessible to the caller. A nonexistent billing `organizationId` is `404` only for an admin caller; for anyone else, an invalid or inaccessible `organizationId` is `403` instead.",
17984
18369
  schema: ApiErrorSchema
18370
+ },
18371
+ 422: {
18372
+ description: "The body is malformed, or it names the billing organization ambiguously. Both `organizationId` and `organization_id` sent with different values is a `422`; so is an empty or blank value for either (a blank is never treated as an omission, which would bill a different payer), and so is any other billing-org-shaped key such as `billing_org_id` or `payerOrgId`, which would otherwise be stripped and silently bill the caller's home organization.",
18373
+ schema: ApiErrorSchema
17985
18374
  }
17986
18375
  },
17987
18376
  emitsRateLimitHeaders: true,
@@ -18000,7 +18389,7 @@ defineEndpoint({
18000
18389
  path: "/api/v1/image-edits",
18001
18390
  operationId: "editImage",
18002
18391
  summary: "Edit an image",
18003
- description: "Queues an edit of an existing image and returns the quest that will carry the result, before the render runs. Poll `GET /api/v1/quests/{id}` until `status` is `\"done\"` (see the `editImage200PollResult` schema). `image` is the URL of the source image; `fabFileIds` must name at least one file, and the first is the inpainting mask. `referenceImageFabFileIds` adds up to 15 style anchors after the source image, so the mask always applies to the source; only gpt-image models accept them, and sending any with another model is rejected with a 400 rather than ignored. Both id fields take ids from `POST /api/v1/files`: upload each file, poll `GET /api/v1/files/{id}` until `moderation_status` is `clean`, then pass its `id`. An id that is not yet `clean` fails the edit on the polled quest. `image` takes a URL rather than an id, so a source uploaded the same way is passed as its `download_url`, which must still be unexpired when the render runs. The edited image is not a file id: read it from `files[].url` on the polled quest, not from `GET /api/v1/files/{id}`. `seed` makes an edit reproducible on BFL (FLUX) models only; gpt-image and Gemini models ignore it. Credits are checked when the render runs, so insufficient credits arrive on the polled quest rather than as a 422. `POST /api/ai/edit-image` is a legacy alias of this endpoint. Authenticate with an API key (`b4m_live_`) or a JWT.\n\n" + GENERATION_CALLBACK_DESCRIPTION,
18392
+ description: "Queues an edit of an existing image and returns the quest that will carry the result, before the render runs. Poll `GET /api/v1/quests/{id}` until `status` is `\"done\"` (see the `editImage200PollResult` schema). `image` is the URL of the source image; `fabFileIds` must name at least one file, and the first is the inpainting mask. `referenceImageFabFileIds` adds up to 15 style anchors after the source image, so the mask always applies to the source; only gpt-image models accept them, and sending any with another model is rejected with a 400 rather than ignored. Both id fields take ids from `POST /api/v1/files`: upload each file, poll `GET /api/v1/files/{id}` until `moderation_status` is `clean`, then pass its `id`. An id that is not yet `clean` fails the edit on the polled quest. `image` takes a URL rather than an id, so a source uploaded the same way is passed as its `download_url`, which must still be unexpired when the render runs. The edited image is not a file id: read it from `files[].url` on the polled quest, not from `GET /api/v1/files/{id}`. `seed` makes an edit reproducible on BFL (FLUX) models only; gpt-image and Gemini models ignore it. Credits are checked when the render runs, so insufficient credits arrive on the polled quest rather than as a 422. `organization_id` is accepted as an alias of `organizationId`, for callers used to the snake_case video and music bodies; `null` bills the personal account. `POST /api/ai/edit-image` is a legacy alias of this endpoint. Authenticate with an API key (`b4m_live_`) or a JWT.\n\n" + GENERATION_CALLBACK_DESCRIPTION,
18004
18393
  tags: ["Images"],
18005
18394
  auth: "apiKeyOrJwt",
18006
18395
  scopes: ["ai:generate"],
@@ -18029,6 +18418,10 @@ defineEndpoint({
18029
18418
  404: {
18030
18419
  description: "The session, or the quest being retried, does not exist or is not accessible to the caller. A nonexistent billing `organizationId` is `404` only for an admin caller; for anyone else, an invalid or inaccessible `organizationId` is `403` instead.",
18031
18420
  schema: ApiErrorSchema
18421
+ },
18422
+ 422: {
18423
+ description: "The body is malformed, or it names the billing organization ambiguously. Both `organizationId` and `organization_id` sent with different values is a `422`; so is an empty or blank value for either (a blank is never treated as an omission, which would bill a different payer), and so is any other billing-org-shaped key such as `billing_org_id` or `payerOrgId`, which would otherwise be stripped and silently bill the caller's home organization.",
18424
+ schema: ApiErrorSchema
18032
18425
  }
18033
18426
  },
18034
18427
  emitsRateLimitHeaders: true,
@@ -18060,7 +18453,7 @@ defineEndpoint({
18060
18453
  path: "/api/v1/files",
18061
18454
  operationId: "createFileUpload",
18062
18455
  summary: "Start a file upload",
18063
- description: "Registers a file and returns a presigned `upload_url`. Uploading is three steps: (1) call this endpoint with the file name, MIME type, and size in bytes; (2) `PUT` the raw bytes to `upload_url` before `upload_url_expires_at` - send no `Authorization` header, the URL signature is the credential, and do send a `Content-Type` matching `mime_type`; (3) poll `GET /api/v1/files/{id}` until `moderation_status` is `clean` (usually a few seconds after the PUT), then pass `id` wherever an endpoint takes a file id (for example `fabFileIds` and `referenceImageFabFileIds` on `POST /api/v1/image-edits`). Unsupported types, a size over the upload limit, or a size that would exceed your storage quota are rejected with 400 before any URL is issued. Authenticate with an API key (`b4m_live_`) carrying `files:write`, or a JWT.",
18456
+ description: "Registers a file and returns a presigned `upload_url`. Uploading is three steps: (1) call this endpoint with the file name, MIME type, and size in bytes; (2) `PUT` the raw bytes to `upload_url` before `upload_url_expires_at` - send no `Authorization` header, the URL signature is the credential, and do send a `Content-Type` matching `mime_type`; the URL is bound to `file_size`, so the body must be exactly that many bytes or storage refuses it with 403; (3) poll `GET /api/v1/files/{id}` until `moderation_status` is `clean` (usually a few seconds after the PUT), then pass `id` wherever an endpoint takes a file id (for example `fabFileIds` and `referenceImageFabFileIds` on `POST /api/v1/image-edits`). Unsupported types, a size over the upload limit, or a size that would exceed your storage quota are rejected with 400 before any URL is issued. Authenticate with an API key (`b4m_live_`) carrying `files:write`, or a JWT.",
18064
18457
  tags: ["Files"],
18065
18458
  auth: "apiKeyOrJwt",
18066
18459
  scopes: ["files:write"],
@@ -21214,6 +21607,11 @@ const INCIDENT_REVIEW_STATUSES = [
21214
21607
  "reported"
21215
21608
  ];
21216
21609
  const INCIDENT_REPORT_CHANNELS = ["manual"];
21610
+ const INCIDENT_SURFACES = [
21611
+ "generation",
21612
+ "edit",
21613
+ "upload"
21614
+ ];
21217
21615
  const ModerationLabelHitSchema = z$1.object({
21218
21616
  name: z$1.string(),
21219
21617
  parentName: z$1.string(),
@@ -21227,6 +21625,7 @@ z$1.object({
21227
21625
  fabFileId: z$1.string().optional(),
21228
21626
  provider: z$1.string(),
21229
21627
  model: z$1.string(),
21628
+ surface: z$1.enum(INCIDENT_SURFACES).optional(),
21230
21629
  labels: z$1.array(ModerationLabelHitSchema),
21231
21630
  reviewStatus: z$1.enum(INCIDENT_REVIEW_STATUSES).optional(),
21232
21631
  ncmecReportId: z$1.string().optional(),
@@ -21236,9 +21635,11 @@ z$1.object({
21236
21635
  previousReviewStatus: z$1.literal("false_positive").optional(),
21237
21636
  falsePositiveBy: z$1.string().optional(),
21238
21637
  falsePositiveAt: z$1.union([z$1.string(), z$1.date()]).optional(),
21638
+ alertedAt: z$1.union([z$1.string(), z$1.date()]).optional(),
21239
21639
  createdAt: z$1.union([z$1.string(), z$1.date()]).optional(),
21240
21640
  updatedAt: z$1.union([z$1.string(), z$1.date()]).optional()
21241
21641
  });
21642
+ z$1.string().email();
21242
21643
  new RegExp(`[аеорсхуіјѕԁһӏαονικρτυ]`, "g");
21243
21644
  const OPENER_STICKY = /<artifact/iy;
21244
21645
  const WHITESPACE$1 = /\s/;
@@ -24005,7 +24406,8 @@ const CORE_TOOL_DESCRIPTORS = new Map(Object.entries({
24005
24406
  effect: "execute",
24006
24407
  approval: "prompt_always",
24007
24408
  openWorld: true,
24008
- commandArg: "command"
24409
+ commandArg: "command",
24410
+ sandbox: "command"
24009
24411
  },
24010
24412
  shell_execute: {
24011
24413
  source: CORE,
@@ -24043,6 +24445,7 @@ const CORE_TOOL_DESCRIPTORS = new Map(Object.entries({
24043
24445
  weather_info: reader(CORE, { openWorld: true }),
24044
24446
  web_search: reader(CORE, { openWorld: true }),
24045
24447
  web_fetch: reader(CORE, { openWorld: true }),
24448
+ decide: reader(CORE, { openWorld: true }),
24046
24449
  deep_research: reader(CORE, { openWorld: true }),
24047
24450
  check_shell_output: reader(),
24048
24451
  list_background_shells: reader(),
@@ -24114,6 +24517,15 @@ function isReadOnlyTool(descriptor) {
24114
24517
  function commandTextOf(descriptor, args) {
24115
24518
  return stringArg(args, descriptor?.commandArg);
24116
24519
  }
24520
+ /**
24521
+ * The argument holding the command the OS sandbox wraps, or undefined when the tool is not
24522
+ * sandboxed. Only core tools may declare it: a sandboxed call can skip the prompt in
24523
+ * auto-allow mode, so a plugin or MCP descriptor must not be able to claim it.
24524
+ */
24525
+ function sandboxedCommandArg(descriptor) {
24526
+ if (descriptor?.sandbox !== "command" || descriptor.source.kind !== "core") return void 0;
24527
+ return descriptor.commandArg;
24528
+ }
24117
24529
  /** The path a file-writing tool will write, when the tool declares one and `args` carries it. */
24118
24530
  function writePathOf(descriptor, args) {
24119
24531
  const writePath = stringArg(args, descriptor?.writePathArg);
@@ -25603,4 +26015,4 @@ var ConfigStore = class {
25603
26015
  }
25604
26016
  };
25605
26017
  //#endregion
25606
- export { PermissionDeniedError as $, ApiKeyType as A, stripToolArtifactMarkup as At, DEFAULT_TTS_PROVIDER as B, actorKindMarker as Bt, htmlFirstH1 as C, obfuscateApiKey as Ct, AGENT_QUEST_MCP_URI as D, signImageUrl as Dt, AGENT_QUEST_MANIFEST as E, secureParameters as Et, CONTEXT_WINDOW_SAFETY_BUFFER_TOKENS as F, ttsResponseTooLargeSchema as Ft, LOCATION_MAP_LANGUAGE as G, WEBSITE_URL as Gt, GENERATED_IMAGE_EXTENSION_RE as H, delegationPayloadSchema as Ht, CREDIT_DEDUCT_TRANSACTION_TYPES as I, withRetry as It, ModelBackend as J, MODEL_INFO_FIELD_GROUP_OF as K, ChatModels as L, ACTOR_COLOR_SLOTS as Lt, BRIEFCASE_CATALOG_QUERIES as M, tokenEstimateMultiplier as Mt, BedrockEmbeddingModel as N, ttsBase64ResponseSchema as Nt, ARTIFACT_DELIVERED_PLACEHOLDER as O, splitEquals as Ot, BriefcasePromptIdSchema as P, ttsRequestSchema as Pt, PROMPT_TEXT_MAX as Q, CompletionReasoningEffortSchema as R, DELEGATION_PAYLOAD_SCHEMA_NAME as Rt, htmlErrorTitle as S, joinReplySlots as St, AGENT_QUEST_ID as T, replacePromptVariables as Tt, ImageModels as U, selfClaimedActorKindSchema as Ut, DEGENERATE_FINISH_REASON as V, actorKindSchema as Vt, ImagePromptResolutionSchema as W, APP_NAME as Wt, OllamaEmbeddingModel as X, NotFoundError as Y, OpenAIEmbeddingModel as Z, NotAuthenticatedError as _, hasDeliverablePinnedArtifact as _t, commandTextOf as a, VisibilitySchema as at, SESSION_ID_PATTERN as b, isRetryableError as bt, writePathOf as c, assertAuthOriginMatchesApiKey as ct, getEnvironmentName as d, escapeThinkMarkers as dt, REVIEW_GATE_STATUS_VALUES as et, requireApiUrl as f, filterToolArtifactMarkup as ft, LOCAL_DEV_URL as g, googleMapsSearchUrl as gt, DeviceFlowClient as h, getQuestErrorCode as ht, ToolCatalog as i, SupportedFabFileMimeTypes as it, ArtifactTypeSchema as j, supportedVoiceGenerationVendor as jt, ARTIFACT_REMOVED_PLACEHOLDER as k, stripDeliveredArtifactBlocks as kt, ApiEndpointUnconfiguredError as l, buildPromptContext as lt, AuthenticatedApiClient as m, getMcpProviderMetadata as mt, extractCompactInstructions as n, SLUG_OWNED_BY_OTHER as nt, isReadOnlyTool as o, VoyageAIEmbeddingModel as ot, resolveApiEndpoint as p, generatedAudioResponseSchema as pt, McpServerName as q, loadContextFiles as r, SUBQUEST_STATUS_VALUES as rt, toolCategory as s, WORK_ITEM_STATUSES as st, ConfigStore as t, SEARCH_RESULT_CARDS_LANGUAGE as tt, getCreditsUrl as u, createThinkMarkerEscaper as ut, parseApiUrl as v, isEarlyStop as vt, escapeArtifactBodyJson as w, questReplyText as wt, isValidSessionId as x, isUserInitiatedAbort as xt, logger as y, isPlaceholderImageSigningSecret as yt, CreateArtifactRequestSchema as z, actorColorIndex as zt };
26018
+ export { OllamaEmbeddingModel as $, ARTIFACT_REMOVED_PLACEHOLDER as A, secureParameters as At, CreateArtifactRequestSchema as B, withRetry as Bt, htmlErrorTitle as C, isPlaceholderImageSigningSecret as Ct, AGENT_QUEST_MANIFEST as D, obfuscateApiKey as Dt, AGENT_QUEST_ID as E, joinReplySlots as Et, BriefcasePromptIdSchema as F, supportedVoiceGenerationVendor as Ft, GENERATED_IMAGE_EXTENSION_RE as G, actorKindSchema as Gt, DEGENERATE_FINISH_REASON as H, DELEGATION_PAYLOAD_SCHEMA_NAME as Ht, CONTEXT_WINDOW_SAFETY_BUFFER_TOKENS as I, tokenEstimateMultiplier as It, LOCATION_MAP_LANGUAGE as J, frontmatterHasSourceStamp as Jt, ImageModels as K, delegationPayloadSchema as Kt, CREDIT_DEDUCT_TRANSACTION_TYPES as L, ttsBase64ResponseSchema as Lt, ArtifactTypeSchema as M, splitEquals as Mt, BRIEFCASE_CATALOG_QUERIES as N, stripDeliveredArtifactBlocks as Nt, AGENT_QUEST_MCP_URI as O, questReplyText as Ot, BedrockEmbeddingModel as P, stripToolArtifactMarkup as Pt, NotFoundError as Q, ChatModels as R, ttsRequestSchema as Rt, isValidSessionId as S, isEarlyStop as St, escapeArtifactBodyJson as T, isUserInitiatedAbort as Tt, DecisionTextPartSchema as U, actorColorIndex as Ut, DEFAULT_TTS_PROVIDER as V, ACTOR_COLOR_SLOTS as Vt, DecisionsRequestSchema as W, actorKindMarker as Wt, McpServerName as X, WEBSITE_URL as Xt, MODEL_INFO_FIELD_GROUP_OF as Y, APP_NAME as Yt, ModelBackend as Z, LOCAL_DEV_URL as _, generatedAudioResponseSchema as _t, commandTextOf as a, SLUG_OWNED_BY_OTHER as at, logger as b, googleMapsSearchUrl as bt, toolCategory as c, UnprocessableEntityError as ct, getCreditsUrl as d, WORK_ITEM_STATUSES as dt, OpenAIEmbeddingModel as et, getEnvironmentName as f, assertAuthOriginMatchesApiKey as ft, DeviceFlowClient as g, filterToolArtifactMarkup as gt, AuthenticatedApiClient as h, escapeThinkMarkers as ht, ToolCatalog as i, SEARCH_RESULT_CARDS_LANGUAGE as it, ApiKeyType as j, signImageUrl as jt, ARTIFACT_DELIVERED_PLACEHOLDER as k, replacePromptVariables as kt, writePathOf as l, VisibilitySchema as lt, resolveApiEndpoint as m, createThinkMarkerEscaper as mt, extractCompactInstructions as n, PermissionDeniedError as nt, isReadOnlyTool as o, SUBQUEST_STATUS_VALUES as ot, requireApiUrl as p, buildPromptContext as pt, ImagePromptResolutionSchema as q, selfClaimedActorKindSchema as qt, loadContextFiles as r, REVIEW_GATE_STATUS_VALUES as rt, sandboxedCommandArg as s, SupportedFabFileMimeTypes as st, ConfigStore as t, PROMPT_TEXT_MAX as tt, ApiEndpointUnconfiguredError as u, VoyageAIEmbeddingModel as ut, NotAuthenticatedError as v, getMcpProviderMetadata as vt, htmlFirstH1 as w, isRetryableError as wt, SESSION_ID_PATTERN as x, hasDeliverablePinnedArtifact as xt, parseApiUrl as y, getQuestErrorCode as yt, CompletionReasoningEffortSchema as z, ttsResponseTooLargeSchema as zt };