@allbluecn/kernel 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/index.d.ts +85 -3
- package/dist/index.js +2 -2
- package/dist/{src-CWDhdYs-.js → src-uNL2aozQ.js} +410 -24
- package/package.json +4 -4
package/dist/bin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import { $ as resolvePluginOrder, J as dumpModules, X as generateAssemblyFiles, Y as generateAssemblyCode, Z as parseProfileImports } from "./src-uNL2aozQ.js";
|
|
3
3
|
import { parseArgs } from "node:util";
|
|
4
4
|
import { pathToFileURL } from "node:url";
|
|
5
5
|
import { dirname, relative, resolve } from "node:path";
|
package/dist/index.d.ts
CHANGED
|
@@ -620,8 +620,10 @@ declare const LOAD_MORE_STEP = 200;
|
|
|
620
620
|
declare const DND_STICKY_THRESHOLD = 500;
|
|
621
621
|
//#endregion
|
|
622
622
|
//#region src/contract/modules/ai-providers/types.d.ts
|
|
623
|
-
type AdapterKind = 'openai' | 'anthropic' | 'gemini' | 'groq' | 'grok' | 'openrouter' | 'ollama' | 'openai-compatible'
|
|
624
|
-
|
|
623
|
+
type AdapterKind = 'openai' | 'anthropic' | 'gemini' | 'groq' | 'grok' | 'openrouter' | 'ollama' | 'openai-compatible' | 'mistral' | 'bedrock' | 'byteplus' | 'fal' |
|
|
624
|
+
/** harness 型 provider(需沙箱上下文,不走 createProviderAdapter 普通路径) */
|
|
625
|
+
'harness-claude-code' | 'harness-codex' | 'harness-acp' | 'harness-opencode';
|
|
626
|
+
type ProviderCategory = 'recommended' | 'popular' | 'local' | 'harness' | 'hosted';
|
|
625
627
|
type ModelCapability = 'text' | 'vision' | 'tools' | 'reasoning' | 'audio';
|
|
626
628
|
interface AiModelMeta {
|
|
627
629
|
/** 模型 ID(传给 adapter 的 model 字符串) */
|
|
@@ -676,6 +678,9 @@ interface AiProviderRow extends AiProviderMeta {
|
|
|
676
678
|
createdAt: string;
|
|
677
679
|
updatedAt: string;
|
|
678
680
|
}
|
|
681
|
+
/** 模型来源模式:平台托管 / 本地 Agent / 使用自己的 Key */
|
|
682
|
+
type AiSourceMode = 'hosted' | 'local-agent' | 'byok';
|
|
683
|
+
declare const AI_SOURCE_MODES: readonly ['hosted', 'local-agent', 'byok'];
|
|
679
684
|
/** 卡片角标的预设颜色(按文案匹配),admin 也可自由输入文案 */
|
|
680
685
|
declare const PROVIDER_BADGE_STYLES: Record<string, string>;
|
|
681
686
|
//#endregion
|
|
@@ -714,6 +719,44 @@ declare const LOBE_ICON_MAP: Record<string, string>;
|
|
|
714
719
|
/** 10 个最受欢迎 AI 服务商的种子数据,admin 可在其基础上增删改 */
|
|
715
720
|
declare const SEED_AI_PROVIDERS: AiProviderMeta[];
|
|
716
721
|
//#endregion
|
|
722
|
+
//#region src/contract/modules/ai-prompts/types.d.ts
|
|
723
|
+
interface SystemPromptSectionDTO {
|
|
724
|
+
id: string;
|
|
725
|
+
order: number;
|
|
726
|
+
template: string;
|
|
727
|
+
}
|
|
728
|
+
interface PromptVariableDefDTO {
|
|
729
|
+
name: string;
|
|
730
|
+
description: string;
|
|
731
|
+
}
|
|
732
|
+
interface SystemPromptTemplateDTO {
|
|
733
|
+
id: string;
|
|
734
|
+
key: string;
|
|
735
|
+
name: string;
|
|
736
|
+
description: string | null;
|
|
737
|
+
sections: SystemPromptSectionDTO[];
|
|
738
|
+
variables: PromptVariableDefDTO[];
|
|
739
|
+
version: number;
|
|
740
|
+
isActive: boolean;
|
|
741
|
+
isProtected: boolean;
|
|
742
|
+
updatedAt: string;
|
|
743
|
+
}
|
|
744
|
+
interface SystemPromptVersionDTO {
|
|
745
|
+
id: string;
|
|
746
|
+
version: number;
|
|
747
|
+
sections: SystemPromptSectionDTO[];
|
|
748
|
+
note: string | null;
|
|
749
|
+
createdBy: string | null;
|
|
750
|
+
createdAt: string;
|
|
751
|
+
}
|
|
752
|
+
//#endregion
|
|
753
|
+
//#region src/contract/modules/ai-prompts/interpolate.d.ts
|
|
754
|
+
declare class UnknownPromptVariableError extends Error {
|
|
755
|
+
readonly variable: string;
|
|
756
|
+
constructor(variable: string);
|
|
757
|
+
}
|
|
758
|
+
declare function interpolateTemplate(template: string, vars: Record<string, string>): string;
|
|
759
|
+
//#endregion
|
|
717
760
|
//#region src/contract/modules/dependencies/index.d.ts
|
|
718
761
|
/** 依赖分类 */
|
|
719
762
|
type DependencyCategory = 'framework' | 'ui' | 'editor' | 'ai' | 'state' | 'auth' | 'tool' | 'other';
|
|
@@ -1007,6 +1050,19 @@ declare const FeatureRegistry: {
|
|
|
1007
1050
|
readonly tier: 'paid';
|
|
1008
1051
|
readonly module: null;
|
|
1009
1052
|
};
|
|
1053
|
+
/** 沙箱执行(P3)。module 为 null:沙箱是开源代码自带的平台能力,仅权益门控——
|
|
1054
|
+
* 因此 OSS 部署得到的是 FeatureForbiddenError 而非 FeatureUnavailableError。
|
|
1055
|
+
* desktop 部署无订阅体系,走 requireFeature 内的点式直放分支。 */
|
|
1056
|
+
readonly sandboxExecution: {
|
|
1057
|
+
readonly tier: 'paid';
|
|
1058
|
+
readonly module: null;
|
|
1059
|
+
};
|
|
1060
|
+
/** 媒体生成(P4c)。module 为 null:媒体生成是开源代码自带的平台能力(TanStack AI adapter 调用),
|
|
1061
|
+
* 仅权益门控。OSS 部署得到 FeatureForbiddenError,desktop BYOK 场景豁免。 */
|
|
1062
|
+
readonly mediaGeneration: {
|
|
1063
|
+
readonly tier: 'paid';
|
|
1064
|
+
readonly module: null;
|
|
1065
|
+
};
|
|
1010
1066
|
};
|
|
1011
1067
|
type FeatureKey = keyof typeof FeatureRegistry;
|
|
1012
1068
|
declare const FEATURE_KEYS: FeatureKey[];
|
|
@@ -1026,7 +1082,9 @@ declare const PlanFeaturesSchema: z.ZodRecord<z.ZodEnum<{
|
|
|
1026
1082
|
globalSearch: "globalSearch";
|
|
1027
1083
|
hostedAi: "hostedAi";
|
|
1028
1084
|
largePageSize: "largePageSize";
|
|
1085
|
+
mediaGeneration: "mediaGeneration";
|
|
1029
1086
|
multiProvider: "multiProvider";
|
|
1087
|
+
sandboxExecution: "sandboxExecution";
|
|
1030
1088
|
sso: "sso";
|
|
1031
1089
|
templates: "templates";
|
|
1032
1090
|
versionHistory: "versionHistory";
|
|
@@ -1081,6 +1139,30 @@ declare const ResourceRegistry: {
|
|
|
1081
1139
|
readonly purchasable: false;
|
|
1082
1140
|
readonly step: 1;
|
|
1083
1141
|
};
|
|
1142
|
+
/** 沙箱执行时长配额(P3)。按 AiUsageLog.activity='sandbox' 的 durationMs 汇总,
|
|
1143
|
+
* 分钟粒度向上取整;null 限额 = 不限量。purchasable false:不可加购,只能升档。 */
|
|
1144
|
+
readonly sandboxMinutesMonthly: {
|
|
1145
|
+
readonly tier: 'paid';
|
|
1146
|
+
readonly unit: 'minutes/month';
|
|
1147
|
+
readonly purchasable: false;
|
|
1148
|
+
readonly step: 1;
|
|
1149
|
+
};
|
|
1150
|
+
/** 媒体生成次数配额(P4c)。按 AiUsageLog.activity IN (image, video, speech, transcription) 本月 count 汇总;
|
|
1151
|
+
* null 限额 = 不限量。purchasable false:不可加购,只能升档。 */
|
|
1152
|
+
readonly mediaGenerationsMonthly: {
|
|
1153
|
+
readonly tier: 'paid';
|
|
1154
|
+
readonly unit: 'generations/month';
|
|
1155
|
+
readonly purchasable: false;
|
|
1156
|
+
readonly step: 1;
|
|
1157
|
+
};
|
|
1158
|
+
/** 画廊存储配额(P4c)。按 GenerationRun.artifacts 持久化的 blob size 汇总(MB);
|
|
1159
|
+
* null 限额 = 不限量。purchasable false:不可加购,只能升档。 */
|
|
1160
|
+
readonly galleryStorageMb: {
|
|
1161
|
+
readonly tier: 'paid';
|
|
1162
|
+
readonly unit: 'MB';
|
|
1163
|
+
readonly purchasable: false;
|
|
1164
|
+
readonly step: 1;
|
|
1165
|
+
};
|
|
1084
1166
|
};
|
|
1085
1167
|
type ResourceKey = keyof typeof ResourceRegistry;
|
|
1086
1168
|
declare const RESOURCE_KEYS: ResourceKey[];
|
|
@@ -1287,4 +1369,4 @@ declare const ICON_MAP: Record<string, React.ComponentType<{
|
|
|
1287
1369
|
className?: string;
|
|
1288
1370
|
}>>;
|
|
1289
1371
|
//#endregion
|
|
1290
|
-
export { ADAPTER_KINDS, ADAPTER_KIND_VALUES, type AICommandContext, type AICommandDef, type AICommandHandler, type AICommandResult, type ActivationResult, AdapterKind, type AiAdapter, AiModelMeta, AiProviderMeta, AiProviderRow, type AiQuota, type AllBlueModule, type AnalyticsQuery, type AnalyticsResult, type AnalyticsService, type AssembleInput, type AssemblyFiles, type AuditLogEntry, type AuditQuery, type AuditService, type AutomationRule, type AutomationService, type AvatarConfig, type AvatarPart, type BillingService, BillingUnavailableError, type CLIAgentInfo, type CanvasElement, CategoryEmailFlags, CategoryFrequencies, type CheckoutParams, type ComplianceJobSummary, type ComplianceService, type ComponentCategory, type ComponentSource, type CustomDashboard, DEFAULT_CATEGORIES, DEFAULT_EMAIL_CATEGORIES, DEFAULT_WATCHED_DEPENDENCIES, DEPENDENCY_CATEGORIES, DEPENDENCY_PRIORITIES, DEVICE_SIZES, DND_STICKY_THRESHOLD, DependencyCategory, DependencyPriority, DependencySeed, DependencyUsage, type DeveloperLogEntry, type DeviceType, type DocumentTemplate, type DocumentVersion, type EditableFieldType, type EditablePropField, type EntityDef, type EntityUpdateEvent, FEATURE_KEYS, type FeatureContribution, type FeatureKey, type FeatureMeta, FeatureRegistry, type GlobalSearchService, type HostSession, type HostedAiChatParams, type HostedAiChatResult, HostedAiError, type HostedAiModel, type HostedAiService, ICON_MAP, type InvoiceInfo, LOAD_MORE_STEP, LOBE_ICON_MAP, type LicenseInfo, type LicenseIssueParams, type LicenseIssueResult, type LicenseService, type LicenseStatus, MODEL_CAPABILITY_OPTIONS, MODEL_TABS, type Middleware, ModelCapability, ModelTab, NOTIFICATION_CATEGORIES, NOTIFICATION_FREQUENCIES, NotificationCategory, NotificationFrequency, NotificationItem, NotificationListResult, NotificationPreferences, NotificationSsePayload, NotificationSseValue, OSS_BASE_FEATURES, type OutlineNode, type PRD, type PRDDetail, type PRDVersionWithPages, type PRDVersionWithSemver, PROVIDER_BADGE_STYLES, PROVIDER_CATEGORIES, PROVIDER_CATEGORY_VALUES, type ParsedUA, type PermissionLevel, type PermissionsService, type PlanFeatures, PlanFeaturesSchema, type PlanInfo, type PluginContributions, type PluginDefinition, type PluginRouteContext, type PortalSessionParams, type PrismaContribution, type PrismaSeam, type ProEdition, type ProFeature, type ProModule, type ProServiceMap, type ProfileDefinition, type PrototypeComponentConfig, ProviderCategory, type QueryFactoryMap, RESOURCE_KEYS, type RealtimeTransport, type RefDisplay, type Reference, type ReferenceDisplayFn, type ResizeDirection, type ResizeMode, type ResolveResult, type ResolvedRef, type ResourceKey, type ResourceMeta, ResourceRegistry, type ResourceSnapshot, type ResourceSnapshots, type RoleDefinition, type RouteContribution, SEED_AI_PROVIDERS, type SearchParams, type SearchResult, type SeatCheckResult, SeatsExceededError, type ServerSeam, type SettingsTabContribution, type ShapeType, type SsoProvider, type SsoService, type SubscriptionInfo, SyncDependencyResult, type TemplatesService, ThirdPartyDependencyRow, type UiSlotContributions, UnreadSnapshotPayload, UpdateDependencyInput, VIRTUALIZE_THRESHOLD, type VersionHistoryService, VersionStatus, WebhookSignatureError, definePlugin, defineProfile, dumpModules, formatParsedUA, generateAssemblyCode, generateAssemblyFiles, getClientIp, getServerSeam, isInDndWindow, isOssFeature, isResourceDefined, moduleRegistry, normalizeCategoryFrequencies, normalizeEmailCategories, parseProfileImports, parseUserAgent, registerPrismaSeam, registerServerSeam, resolveImportSpecifiers, resolveIpLocation, resolvePluginOrder };
|
|
1372
|
+
export { ADAPTER_KINDS, ADAPTER_KIND_VALUES, type AICommandContext, type AICommandDef, type AICommandHandler, type AICommandResult, AI_SOURCE_MODES, type ActivationResult, AdapterKind, type AiAdapter, AiModelMeta, AiProviderMeta, AiProviderRow, type AiQuota, AiSourceMode, type AllBlueModule, type AnalyticsQuery, type AnalyticsResult, type AnalyticsService, type AssembleInput, type AssemblyFiles, type AuditLogEntry, type AuditQuery, type AuditService, type AutomationRule, type AutomationService, type AvatarConfig, type AvatarPart, type BillingService, BillingUnavailableError, type CLIAgentInfo, type CanvasElement, CategoryEmailFlags, CategoryFrequencies, type CheckoutParams, type ComplianceJobSummary, type ComplianceService, type ComponentCategory, type ComponentSource, type CustomDashboard, DEFAULT_CATEGORIES, DEFAULT_EMAIL_CATEGORIES, DEFAULT_WATCHED_DEPENDENCIES, DEPENDENCY_CATEGORIES, DEPENDENCY_PRIORITIES, DEVICE_SIZES, DND_STICKY_THRESHOLD, DependencyCategory, DependencyPriority, DependencySeed, DependencyUsage, type DeveloperLogEntry, type DeviceType, type DocumentTemplate, type DocumentVersion, type EditableFieldType, type EditablePropField, type EntityDef, type EntityUpdateEvent, FEATURE_KEYS, type FeatureContribution, type FeatureKey, type FeatureMeta, FeatureRegistry, type GlobalSearchService, type HostSession, type HostedAiChatParams, type HostedAiChatResult, HostedAiError, type HostedAiModel, type HostedAiService, ICON_MAP, type InvoiceInfo, LOAD_MORE_STEP, LOBE_ICON_MAP, type LicenseInfo, type LicenseIssueParams, type LicenseIssueResult, type LicenseService, type LicenseStatus, MODEL_CAPABILITY_OPTIONS, MODEL_TABS, type Middleware, ModelCapability, ModelTab, NOTIFICATION_CATEGORIES, NOTIFICATION_FREQUENCIES, NotificationCategory, NotificationFrequency, NotificationItem, NotificationListResult, NotificationPreferences, NotificationSsePayload, NotificationSseValue, OSS_BASE_FEATURES, type OutlineNode, type PRD, type PRDDetail, type PRDVersionWithPages, type PRDVersionWithSemver, PROVIDER_BADGE_STYLES, PROVIDER_CATEGORIES, PROVIDER_CATEGORY_VALUES, type ParsedUA, type PermissionLevel, type PermissionsService, type PlanFeatures, PlanFeaturesSchema, type PlanInfo, type PluginContributions, type PluginDefinition, type PluginRouteContext, type PortalSessionParams, type PrismaContribution, type PrismaSeam, type ProEdition, type ProFeature, type ProModule, type ProServiceMap, type ProfileDefinition, PromptVariableDefDTO, type PrototypeComponentConfig, ProviderCategory, type QueryFactoryMap, RESOURCE_KEYS, type RealtimeTransport, type RefDisplay, type Reference, type ReferenceDisplayFn, type ResizeDirection, type ResizeMode, type ResolveResult, type ResolvedRef, type ResourceKey, type ResourceMeta, ResourceRegistry, type ResourceSnapshot, type ResourceSnapshots, type RoleDefinition, type RouteContribution, SEED_AI_PROVIDERS, type SearchParams, type SearchResult, type SeatCheckResult, SeatsExceededError, type ServerSeam, type SettingsTabContribution, type ShapeType, type SsoProvider, type SsoService, type SubscriptionInfo, SyncDependencyResult, SystemPromptSectionDTO, SystemPromptTemplateDTO, SystemPromptVersionDTO, type TemplatesService, ThirdPartyDependencyRow, type UiSlotContributions, UnknownPromptVariableError, UnreadSnapshotPayload, UpdateDependencyInput, VIRTUALIZE_THRESHOLD, type VersionHistoryService, VersionStatus, WebhookSignatureError, definePlugin, defineProfile, dumpModules, formatParsedUA, generateAssemblyCode, generateAssemblyFiles, getClientIp, getServerSeam, interpolateTemplate, isInDndWindow, isOssFeature, isResourceDefined, moduleRegistry, normalizeCategoryFrequencies, normalizeEmailCategories, parseProfileImports, parseUserAgent, registerPrismaSeam, registerServerSeam, resolveImportSpecifiers, resolveIpLocation, resolvePluginOrder };
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
export { ADAPTER_KINDS, ADAPTER_KIND_VALUES, BillingUnavailableError, DEFAULT_CATEGORIES, DEFAULT_EMAIL_CATEGORIES, DEFAULT_WATCHED_DEPENDENCIES, DEPENDENCY_CATEGORIES, DEPENDENCY_PRIORITIES, DEVICE_SIZES, DND_STICKY_THRESHOLD, FEATURE_KEYS, FeatureRegistry, HostedAiError, ICON_MAP, LOAD_MORE_STEP, LOBE_ICON_MAP, MODEL_CAPABILITY_OPTIONS, MODEL_TABS, NOTIFICATION_CATEGORIES, NOTIFICATION_FREQUENCIES, OSS_BASE_FEATURES, PROVIDER_BADGE_STYLES, PROVIDER_CATEGORIES, PROVIDER_CATEGORY_VALUES, PlanFeaturesSchema, RESOURCE_KEYS, ResourceRegistry, SEED_AI_PROVIDERS, SeatsExceededError, VIRTUALIZE_THRESHOLD, WebhookSignatureError, definePlugin, defineProfile, dumpModules, formatParsedUA, generateAssemblyCode, generateAssemblyFiles, getClientIp, getServerSeam, isInDndWindow, isOssFeature, isResourceDefined, moduleRegistry, normalizeCategoryFrequencies, normalizeEmailCategories, parseProfileImports, parseUserAgent, registerPrismaSeam, registerServerSeam, resolveImportSpecifiers, resolveIpLocation, resolvePluginOrder };
|
|
1
|
+
import { $ as resolvePluginOrder, A as ADAPTER_KIND_VALUES, B as VIRTUALIZE_THRESHOLD, C as DEFAULT_WATCHED_DEPENDENCIES, D as interpolateTemplate, E as UnknownPromptVariableError, F as PROVIDER_CATEGORY_VALUES, G as BillingUnavailableError, H as registerPrismaSeam, I as AI_SOURCE_MODES, J as dumpModules, K as SeatsExceededError, L as PROVIDER_BADGE_STYLES, M as MODEL_CAPABILITY_OPTIONS, N as MODEL_TABS, O as SEED_AI_PROVIDERS, P as PROVIDER_CATEGORIES, Q as resolveImportSpecifiers, R as DND_STICKY_THRESHOLD, S as resolveIpLocation, T as DEPENDENCY_PRIORITIES, U as registerServerSeam, V as getServerSeam, W as HostedAiError, X as generateAssemblyFiles, Y as generateAssemblyCode, Z as parseProfileImports, _ as OSS_BASE_FEATURES, a as DEFAULT_EMAIL_CATEGORIES, b as parseUserAgent, c as normalizeEmailCategories, d as RESOURCE_KEYS, et as defineProfile, f as ResourceRegistry, g as FeatureRegistry, h as FEATURE_KEYS, i as DEFAULT_CATEGORIES, j as LOBE_ICON_MAP, k as ADAPTER_KINDS, l as NOTIFICATION_CATEGORIES, m as PlanFeaturesSchema, n as DEVICE_SIZES, o as isInDndWindow, p as isResourceDefined, q as WebhookSignatureError, r as moduleRegistry, s as normalizeCategoryFrequencies, t as ICON_MAP, tt as definePlugin, u as NOTIFICATION_FREQUENCIES, v as isOssFeature, w as DEPENDENCY_CATEGORIES, x as getClientIp, y as formatParsedUA, z as LOAD_MORE_STEP } from "./src-uNL2aozQ.js";
|
|
2
|
+
export { ADAPTER_KINDS, ADAPTER_KIND_VALUES, AI_SOURCE_MODES, BillingUnavailableError, DEFAULT_CATEGORIES, DEFAULT_EMAIL_CATEGORIES, DEFAULT_WATCHED_DEPENDENCIES, DEPENDENCY_CATEGORIES, DEPENDENCY_PRIORITIES, DEVICE_SIZES, DND_STICKY_THRESHOLD, FEATURE_KEYS, FeatureRegistry, HostedAiError, ICON_MAP, LOAD_MORE_STEP, LOBE_ICON_MAP, MODEL_CAPABILITY_OPTIONS, MODEL_TABS, NOTIFICATION_CATEGORIES, NOTIFICATION_FREQUENCIES, OSS_BASE_FEATURES, PROVIDER_BADGE_STYLES, PROVIDER_CATEGORIES, PROVIDER_CATEGORY_VALUES, PlanFeaturesSchema, RESOURCE_KEYS, ResourceRegistry, SEED_AI_PROVIDERS, SeatsExceededError, UnknownPromptVariableError, VIRTUALIZE_THRESHOLD, WebhookSignatureError, definePlugin, defineProfile, dumpModules, formatParsedUA, generateAssemblyCode, generateAssemblyFiles, getClientIp, getServerSeam, interpolateTemplate, isInDndWindow, isOssFeature, isResourceDefined, moduleRegistry, normalizeCategoryFrequencies, normalizeEmailCategories, parseProfileImports, parseUserAgent, registerPrismaSeam, registerServerSeam, resolveImportSpecifiers, resolveIpLocation, resolvePluginOrder };
|
|
@@ -323,12 +323,18 @@ const LOAD_MORE_STEP = 200;
|
|
|
323
323
|
const DND_STICKY_THRESHOLD = 500;
|
|
324
324
|
//#endregion
|
|
325
325
|
//#region src/contract/modules/ai-providers/types.ts
|
|
326
|
+
const AI_SOURCE_MODES = [
|
|
327
|
+
"hosted",
|
|
328
|
+
"local-agent",
|
|
329
|
+
"byok"
|
|
330
|
+
];
|
|
326
331
|
/** 卡片角标的预设颜色(按文案匹配),admin 也可自由输入文案 */
|
|
327
332
|
const PROVIDER_BADGE_STYLES = {
|
|
328
333
|
推荐: "bg-primary/10 text-primary border-primary/30",
|
|
329
334
|
热门: "bg-orange-500/10 text-orange-600 dark:text-orange-400 border-orange-500/30",
|
|
330
335
|
NEW: "bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 border-emerald-500/30",
|
|
331
|
-
本地: "bg-blue-500/10 text-blue-600 dark:text-blue-400 border-blue-500/30"
|
|
336
|
+
本地: "bg-blue-500/10 text-blue-600 dark:text-blue-400 border-blue-500/30",
|
|
337
|
+
免费: "bg-green-500/10 text-green-600 dark:text-green-400 border-green-500/30"
|
|
332
338
|
};
|
|
333
339
|
//#endregion
|
|
334
340
|
//#region src/contract/modules/ai-providers/constants.ts
|
|
@@ -372,6 +378,26 @@ const ADAPTER_KINDS = [
|
|
|
372
378
|
value: "openai-compatible",
|
|
373
379
|
label: "OpenAI 兼容",
|
|
374
380
|
description: "DeepSeek/Moonshot/Mistral 等兼容协议"
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
value: "mistral",
|
|
384
|
+
label: "Mistral 官方",
|
|
385
|
+
description: "Mistral 自有协议,含 Magistral 推理模型"
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
value: "bedrock",
|
|
389
|
+
label: "Amazon Bedrock",
|
|
390
|
+
description: "AWS Bedrock Converse,支持 Bearer Key 与 SigV4"
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
value: "byteplus",
|
|
394
|
+
label: "BytePlus ModelArk",
|
|
395
|
+
description: "字节跳动 ModelArk,含 Seed LLM / Seedance / Seedream / Seed Speech"
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
value: "fal",
|
|
399
|
+
label: "fal.ai",
|
|
400
|
+
description: "fal.ai 聚合平台,image / video / audio / speech"
|
|
375
401
|
}
|
|
376
402
|
];
|
|
377
403
|
const PROVIDER_CATEGORIES = [
|
|
@@ -451,10 +477,15 @@ const LOBE_ICON_MAP = {
|
|
|
451
477
|
xai: "XAI",
|
|
452
478
|
openrouter: "OpenRouter",
|
|
453
479
|
mistral: "Mistral",
|
|
480
|
+
bedrock: "Bedrock",
|
|
481
|
+
byteplus: "Volcengine",
|
|
454
482
|
ollama: "Ollama",
|
|
455
483
|
moonshot: "Moonshot",
|
|
456
484
|
sensenova: "SenseNova",
|
|
457
|
-
agnes: "AgnesAI"
|
|
485
|
+
agnes: "AgnesAI",
|
|
486
|
+
"harness-claude-code": "ClaudeCode",
|
|
487
|
+
"harness-codex": "Codex",
|
|
488
|
+
"harness-opencode": "OpenCode"
|
|
458
489
|
};
|
|
459
490
|
//#endregion
|
|
460
491
|
//#region src/contract/modules/ai-providers/seed-data.ts
|
|
@@ -768,33 +799,233 @@ const SEED_AI_PROVIDERS = [
|
|
|
768
799
|
providerId: "mistral",
|
|
769
800
|
displayName: "Mistral AI",
|
|
770
801
|
brandName: "Mistral",
|
|
771
|
-
description: "
|
|
802
|
+
description: "欧洲开源大模型,擅长多语言与代码,Magistral 支持推理链路",
|
|
772
803
|
category: "popular",
|
|
773
804
|
iconSlug: "mistralai",
|
|
774
805
|
brandColor: "#FF7000",
|
|
775
806
|
badge: "热门",
|
|
776
|
-
adapterKind: "
|
|
807
|
+
adapterKind: "mistral",
|
|
777
808
|
defaultBaseUrl: "https://api.mistral.ai/v1",
|
|
778
809
|
keyUrl: "https://console.mistral.ai/api-keys",
|
|
779
810
|
docsUrl: "https://docs.mistral.ai",
|
|
780
811
|
keyPlaceholder: "...",
|
|
781
|
-
models: [
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
812
|
+
models: [
|
|
813
|
+
{
|
|
814
|
+
id: "mistral-large-latest",
|
|
815
|
+
displayName: "Mistral Large",
|
|
816
|
+
contextWindow: 128e3,
|
|
817
|
+
capabilities: [
|
|
818
|
+
"text",
|
|
819
|
+
"vision",
|
|
820
|
+
"tools"
|
|
821
|
+
],
|
|
822
|
+
defaultEnabled: true
|
|
823
|
+
},
|
|
824
|
+
{
|
|
825
|
+
id: "mistral-small-latest",
|
|
826
|
+
displayName: "Mistral Small",
|
|
827
|
+
contextWindow: 32e3,
|
|
828
|
+
capabilities: ["text", "tools"],
|
|
829
|
+
defaultEnabled: true
|
|
830
|
+
},
|
|
831
|
+
{
|
|
832
|
+
id: "codestral-latest",
|
|
833
|
+
displayName: "Codestral",
|
|
834
|
+
contextWindow: 256e3,
|
|
835
|
+
capabilities: ["text", "tools"]
|
|
836
|
+
},
|
|
837
|
+
{
|
|
838
|
+
id: "pixtral-large-latest",
|
|
839
|
+
displayName: "Pixtral Large",
|
|
840
|
+
contextWindow: 128e3,
|
|
841
|
+
capabilities: [
|
|
842
|
+
"text",
|
|
843
|
+
"vision",
|
|
844
|
+
"tools"
|
|
845
|
+
]
|
|
846
|
+
},
|
|
847
|
+
{
|
|
848
|
+
id: "magistral-medium-latest",
|
|
849
|
+
displayName: "Magistral Medium",
|
|
850
|
+
contextWindow: 128e3,
|
|
851
|
+
capabilities: [
|
|
852
|
+
"text",
|
|
853
|
+
"reasoning",
|
|
854
|
+
"tools"
|
|
855
|
+
]
|
|
856
|
+
}
|
|
857
|
+
]
|
|
858
|
+
},
|
|
859
|
+
{
|
|
860
|
+
providerId: "byteplus",
|
|
861
|
+
displayName: "BytePlus ModelArk",
|
|
862
|
+
brandName: "BytePlus",
|
|
863
|
+
description: "字节跳动 ModelArk,含 Seed LLM 大模型、Seedream 图像、Seedance 视频、Seed Speech 语音",
|
|
864
|
+
category: "popular",
|
|
865
|
+
iconSlug: "volcengine",
|
|
866
|
+
brandColor: "#FF4500",
|
|
867
|
+
badge: "热门",
|
|
868
|
+
adapterKind: "byteplus",
|
|
869
|
+
defaultBaseUrl: "https://ark.cn-beijing.volces.com/api/v3",
|
|
870
|
+
keyUrl: "https://console.volcengine.com/ark",
|
|
871
|
+
docsUrl: "https://www.volcengine.com/docs/82379",
|
|
872
|
+
keyPlaceholder: "ark-...",
|
|
873
|
+
models: [
|
|
874
|
+
{
|
|
875
|
+
id: "dola-seed-2-1-turbo-260628",
|
|
876
|
+
displayName: "Dola Seed 2.1 Turbo",
|
|
877
|
+
contextWindow: 2e5,
|
|
878
|
+
capabilities: [
|
|
879
|
+
"text",
|
|
880
|
+
"vision",
|
|
881
|
+
"tools",
|
|
882
|
+
"reasoning"
|
|
883
|
+
],
|
|
884
|
+
defaultEnabled: true
|
|
885
|
+
},
|
|
886
|
+
{
|
|
887
|
+
id: "seed-2-0-pro-260328",
|
|
888
|
+
displayName: "Seed 2.0 Pro",
|
|
889
|
+
contextWindow: 2e5,
|
|
890
|
+
capabilities: [
|
|
891
|
+
"text",
|
|
892
|
+
"vision",
|
|
893
|
+
"tools",
|
|
894
|
+
"reasoning"
|
|
895
|
+
],
|
|
896
|
+
defaultEnabled: true
|
|
897
|
+
},
|
|
898
|
+
{
|
|
899
|
+
id: "seed-2-0-lite-260428",
|
|
900
|
+
displayName: "Seed 2.0 Lite",
|
|
901
|
+
contextWindow: 2e5,
|
|
902
|
+
capabilities: [
|
|
903
|
+
"text",
|
|
904
|
+
"vision",
|
|
905
|
+
"tools",
|
|
906
|
+
"reasoning"
|
|
907
|
+
]
|
|
908
|
+
},
|
|
909
|
+
{
|
|
910
|
+
id: "seed-2-0-mini-260428",
|
|
911
|
+
displayName: "Seed 2.0 Mini",
|
|
912
|
+
contextWindow: 2e5,
|
|
913
|
+
capabilities: [
|
|
914
|
+
"text",
|
|
915
|
+
"vision",
|
|
916
|
+
"tools",
|
|
917
|
+
"reasoning"
|
|
918
|
+
]
|
|
919
|
+
},
|
|
920
|
+
{
|
|
921
|
+
id: "seed-2-0-code-preview-260328",
|
|
922
|
+
displayName: "Seed 2.0 Code Preview",
|
|
923
|
+
contextWindow: 2e5,
|
|
924
|
+
capabilities: ["text", "tools"]
|
|
925
|
+
},
|
|
926
|
+
{
|
|
927
|
+
id: "glm-5-2-260617",
|
|
928
|
+
displayName: "GLM 5.2",
|
|
929
|
+
contextWindow: 2e5,
|
|
930
|
+
capabilities: ["text", "tools"]
|
|
931
|
+
},
|
|
932
|
+
{
|
|
933
|
+
id: "deepseek-v4-pro-260425",
|
|
934
|
+
displayName: "DeepSeek V4 Pro",
|
|
935
|
+
contextWindow: 2e5,
|
|
936
|
+
capabilities: ["text", "tools"]
|
|
937
|
+
},
|
|
938
|
+
{
|
|
939
|
+
id: "seedream-5-0-260128",
|
|
940
|
+
displayName: "Seedream 5.0",
|
|
941
|
+
contextWindow: 4e3,
|
|
942
|
+
capabilities: ["text"]
|
|
943
|
+
},
|
|
944
|
+
{
|
|
945
|
+
id: "seedream-4-5-251128",
|
|
946
|
+
displayName: "Seedream 4.5",
|
|
947
|
+
contextWindow: 4e3,
|
|
948
|
+
capabilities: ["text"]
|
|
949
|
+
},
|
|
950
|
+
{
|
|
951
|
+
id: "seedance-1-5-pro-251215",
|
|
952
|
+
displayName: "Seedance 1.5 Pro",
|
|
953
|
+
contextWindow: 4e3,
|
|
954
|
+
capabilities: ["text"]
|
|
955
|
+
},
|
|
956
|
+
{
|
|
957
|
+
id: "seed-audio-1.0",
|
|
958
|
+
displayName: "Seed Audio 1.0",
|
|
959
|
+
contextWindow: 4e3,
|
|
960
|
+
capabilities: ["audio"]
|
|
961
|
+
},
|
|
962
|
+
{
|
|
963
|
+
id: "seed-asr",
|
|
964
|
+
displayName: "Seed ASR",
|
|
965
|
+
contextWindow: 4e3,
|
|
966
|
+
capabilities: ["audio"]
|
|
967
|
+
}
|
|
968
|
+
]
|
|
969
|
+
},
|
|
970
|
+
{
|
|
971
|
+
providerId: "bedrock",
|
|
972
|
+
displayName: "Amazon Bedrock",
|
|
973
|
+
brandName: "Bedrock",
|
|
974
|
+
description: "AWS 托管多模型网关,支持 Bedrock Bearer Key 或 SigV4 凭据链",
|
|
975
|
+
category: "popular",
|
|
976
|
+
iconSlug: "aws",
|
|
977
|
+
brandColor: "#FF9900",
|
|
978
|
+
badge: "热门",
|
|
979
|
+
adapterKind: "bedrock",
|
|
980
|
+
keyUrl: "https://console.aws.amazon.com/bedrock",
|
|
981
|
+
docsUrl: "https://docs.aws.amazon.com/bedrock",
|
|
982
|
+
keyPlaceholder: "AKIA...",
|
|
983
|
+
models: [
|
|
984
|
+
{
|
|
985
|
+
id: "us.anthropic.claude-sonnet-4-5-20250929-v1:0",
|
|
986
|
+
displayName: "Claude Sonnet 4.5",
|
|
987
|
+
contextWindow: 2e5,
|
|
988
|
+
capabilities: [
|
|
989
|
+
"text",
|
|
990
|
+
"vision",
|
|
991
|
+
"tools",
|
|
992
|
+
"reasoning"
|
|
993
|
+
],
|
|
994
|
+
defaultEnabled: true
|
|
995
|
+
},
|
|
996
|
+
{
|
|
997
|
+
id: "us.anthropic.claude-haiku-4-5-20251001-v1:0",
|
|
998
|
+
displayName: "Claude Haiku 4.5",
|
|
999
|
+
contextWindow: 2e5,
|
|
1000
|
+
capabilities: [
|
|
1001
|
+
"text",
|
|
1002
|
+
"vision",
|
|
1003
|
+
"tools"
|
|
1004
|
+
]
|
|
1005
|
+
},
|
|
1006
|
+
{
|
|
1007
|
+
id: "us.amazon.nova-pro-v1:0",
|
|
1008
|
+
displayName: "Nova Pro",
|
|
1009
|
+
contextWindow: 3e5,
|
|
1010
|
+
capabilities: [
|
|
1011
|
+
"text",
|
|
1012
|
+
"vision",
|
|
1013
|
+
"tools",
|
|
1014
|
+
"reasoning"
|
|
1015
|
+
],
|
|
1016
|
+
defaultEnabled: true
|
|
1017
|
+
},
|
|
1018
|
+
{
|
|
1019
|
+
id: "us.amazon.nova-lite-v1:0",
|
|
1020
|
+
displayName: "Nova Lite",
|
|
1021
|
+
contextWindow: 3e5,
|
|
1022
|
+
capabilities: [
|
|
1023
|
+
"text",
|
|
1024
|
+
"vision",
|
|
1025
|
+
"tools"
|
|
1026
|
+
]
|
|
1027
|
+
}
|
|
1028
|
+
]
|
|
798
1029
|
},
|
|
799
1030
|
{
|
|
800
1031
|
providerId: "moonshot",
|
|
@@ -832,7 +1063,7 @@ const SEED_AI_PROVIDERS = [
|
|
|
832
1063
|
category: "popular",
|
|
833
1064
|
iconSlug: "sensenova",
|
|
834
1065
|
brandColor: "#6B4EFF",
|
|
835
|
-
badge: "
|
|
1066
|
+
badge: "免费",
|
|
836
1067
|
adapterKind: "openai-compatible",
|
|
837
1068
|
defaultBaseUrl: "https://token.sensenova.cn/v1",
|
|
838
1069
|
keyUrl: "https://platform.sensenova.cn/console/keys",
|
|
@@ -876,7 +1107,7 @@ const SEED_AI_PROVIDERS = [
|
|
|
876
1107
|
category: "popular",
|
|
877
1108
|
iconSlug: "agnesai",
|
|
878
1109
|
brandColor: "#7C3AED",
|
|
879
|
-
badge: "
|
|
1110
|
+
badge: "免费",
|
|
880
1111
|
adapterKind: "openai-compatible",
|
|
881
1112
|
defaultBaseUrl: "https://apihub.agnes-ai.com/v1",
|
|
882
1113
|
keyUrl: "https://agnes-ai.com/api-keys",
|
|
@@ -955,9 +1186,127 @@ const SEED_AI_PROVIDERS = [
|
|
|
955
1186
|
capabilities: ["text", "reasoning"]
|
|
956
1187
|
}
|
|
957
1188
|
]
|
|
1189
|
+
},
|
|
1190
|
+
{
|
|
1191
|
+
providerId: "harness-claude-code",
|
|
1192
|
+
displayName: "Claude Code(沙箱)",
|
|
1193
|
+
brandName: "Claude Code",
|
|
1194
|
+
description: "Anthropic Claude Code 命令行助手,在沙箱内自主运行,适合代码任务委派",
|
|
1195
|
+
category: "harness",
|
|
1196
|
+
iconSlug: "claude",
|
|
1197
|
+
brandColor: "#7C3AED",
|
|
1198
|
+
badge: "沙箱",
|
|
1199
|
+
adapterKind: "harness-claude-code",
|
|
1200
|
+
isLocal: false,
|
|
1201
|
+
models: [{
|
|
1202
|
+
id: "claude-sonnet-4-6",
|
|
1203
|
+
displayName: "Claude Sonnet 4.6",
|
|
1204
|
+
contextWindow: 2e5,
|
|
1205
|
+
capabilities: [
|
|
1206
|
+
"text",
|
|
1207
|
+
"tools",
|
|
1208
|
+
"reasoning"
|
|
1209
|
+
],
|
|
1210
|
+
defaultEnabled: true
|
|
1211
|
+
}, {
|
|
1212
|
+
id: "claude-opus-4-8",
|
|
1213
|
+
displayName: "Claude Opus 4.8",
|
|
1214
|
+
contextWindow: 2e5,
|
|
1215
|
+
capabilities: [
|
|
1216
|
+
"text",
|
|
1217
|
+
"tools",
|
|
1218
|
+
"reasoning"
|
|
1219
|
+
]
|
|
1220
|
+
}]
|
|
1221
|
+
},
|
|
1222
|
+
{
|
|
1223
|
+
providerId: "harness-codex",
|
|
1224
|
+
displayName: "Codex(沙箱)",
|
|
1225
|
+
brandName: "Codex",
|
|
1226
|
+
description: "OpenAI Codex 命令行助手,在沙箱内执行代码任务",
|
|
1227
|
+
category: "harness",
|
|
1228
|
+
iconSlug: "openai",
|
|
1229
|
+
brandColor: "#10A37F",
|
|
1230
|
+
badge: "沙箱",
|
|
1231
|
+
adapterKind: "harness-codex",
|
|
1232
|
+
isLocal: false,
|
|
1233
|
+
models: [{
|
|
1234
|
+
id: "gpt-5.1",
|
|
1235
|
+
displayName: "GPT-5.1",
|
|
1236
|
+
contextWindow: 1e6,
|
|
1237
|
+
capabilities: ["text", "tools"],
|
|
1238
|
+
defaultEnabled: true
|
|
1239
|
+
}, {
|
|
1240
|
+
id: "gpt-5.1-codex",
|
|
1241
|
+
displayName: "GPT-5.1 Codex",
|
|
1242
|
+
contextWindow: 1e6,
|
|
1243
|
+
capabilities: ["text", "tools"]
|
|
1244
|
+
}]
|
|
1245
|
+
},
|
|
1246
|
+
{
|
|
1247
|
+
providerId: "harness-acp",
|
|
1248
|
+
displayName: "ACP Harness(沙箱)",
|
|
1249
|
+
brandName: "ACP",
|
|
1250
|
+
description: "Agent Communication Protocol 通用 harness,支持任意 ACP 兼容服务端",
|
|
1251
|
+
category: "harness",
|
|
1252
|
+
iconSlug: "acp",
|
|
1253
|
+
brandColor: "#0EA5E9",
|
|
1254
|
+
badge: "沙箱",
|
|
1255
|
+
adapterKind: "harness-acp",
|
|
1256
|
+
isLocal: false,
|
|
1257
|
+
models: [{
|
|
1258
|
+
id: "acp-default",
|
|
1259
|
+
displayName: "ACP Default",
|
|
1260
|
+
contextWindow: 2e5,
|
|
1261
|
+
capabilities: ["text", "tools"],
|
|
1262
|
+
defaultEnabled: true
|
|
1263
|
+
}]
|
|
1264
|
+
},
|
|
1265
|
+
{
|
|
1266
|
+
providerId: "harness-opencode",
|
|
1267
|
+
displayName: "OpenCode(沙箱)",
|
|
1268
|
+
brandName: "OpenCode",
|
|
1269
|
+
description: "OpenCode 命令行助手,支持多 provider 路由,在沙箱内自主运行",
|
|
1270
|
+
category: "harness",
|
|
1271
|
+
iconSlug: "opencode",
|
|
1272
|
+
brandColor: "#6366F1",
|
|
1273
|
+
badge: "沙箱",
|
|
1274
|
+
adapterKind: "harness-opencode",
|
|
1275
|
+
isLocal: false,
|
|
1276
|
+
models: [{
|
|
1277
|
+
id: "anthropic/claude-sonnet-4-5",
|
|
1278
|
+
displayName: "Claude Sonnet 4.5",
|
|
1279
|
+
contextWindow: 2e5,
|
|
1280
|
+
capabilities: ["text", "tools"],
|
|
1281
|
+
defaultEnabled: true
|
|
1282
|
+
}, {
|
|
1283
|
+
id: "openai/gpt-5.1",
|
|
1284
|
+
displayName: "GPT-5.1",
|
|
1285
|
+
contextWindow: 1e6,
|
|
1286
|
+
capabilities: ["text", "tools"]
|
|
1287
|
+
}]
|
|
958
1288
|
}
|
|
959
1289
|
];
|
|
960
1290
|
//#endregion
|
|
1291
|
+
//#region src/contract/modules/ai-prompts/interpolate.ts
|
|
1292
|
+
var UnknownPromptVariableError = class extends Error {
|
|
1293
|
+
variable;
|
|
1294
|
+
constructor(variable) {
|
|
1295
|
+
super(`Unknown prompt variable "${variable}"`);
|
|
1296
|
+
this.name = "UnknownPromptVariableError";
|
|
1297
|
+
this.variable = variable;
|
|
1298
|
+
}
|
|
1299
|
+
};
|
|
1300
|
+
const TEMPLATE_VAR_RE = /\{\{\s*([^{}]+?)\s*\}\}/g;
|
|
1301
|
+
const VALID_VAR_NAME_RE = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
1302
|
+
function interpolateTemplate(template, vars) {
|
|
1303
|
+
return template.replace(TEMPLATE_VAR_RE, (_match, rawName) => {
|
|
1304
|
+
const name = rawName.trim();
|
|
1305
|
+
if (!VALID_VAR_NAME_RE.test(name) || !(name in vars)) throw new UnknownPromptVariableError(name);
|
|
1306
|
+
return vars[name];
|
|
1307
|
+
});
|
|
1308
|
+
}
|
|
1309
|
+
//#endregion
|
|
961
1310
|
//#region src/contract/modules/dependencies/index.ts
|
|
962
1311
|
/** 依赖分类元信息 */
|
|
963
1312
|
const DEPENDENCY_CATEGORIES = [
|
|
@@ -1463,6 +1812,19 @@ const FeatureRegistry = {
|
|
|
1463
1812
|
customAgents: {
|
|
1464
1813
|
tier: "paid",
|
|
1465
1814
|
module: null
|
|
1815
|
+
},
|
|
1816
|
+
/** 沙箱执行(P3)。module 为 null:沙箱是开源代码自带的平台能力,仅权益门控——
|
|
1817
|
+
* 因此 OSS 部署得到的是 FeatureForbiddenError 而非 FeatureUnavailableError。
|
|
1818
|
+
* desktop 部署无订阅体系,走 requireFeature 内的点式直放分支。 */
|
|
1819
|
+
sandboxExecution: {
|
|
1820
|
+
tier: "paid",
|
|
1821
|
+
module: null
|
|
1822
|
+
},
|
|
1823
|
+
/** 媒体生成(P4c)。module 为 null:媒体生成是开源代码自带的平台能力(TanStack AI adapter 调用),
|
|
1824
|
+
* 仅权益门控。OSS 部署得到 FeatureForbiddenError,desktop BYOK 场景豁免。 */
|
|
1825
|
+
mediaGeneration: {
|
|
1826
|
+
tier: "paid",
|
|
1827
|
+
module: null
|
|
1466
1828
|
}
|
|
1467
1829
|
};
|
|
1468
1830
|
const FEATURE_KEYS = Object.keys(FeatureRegistry);
|
|
@@ -1514,6 +1876,30 @@ const ResourceRegistry = {
|
|
|
1514
1876
|
unit: "workspaces",
|
|
1515
1877
|
purchasable: false,
|
|
1516
1878
|
step: 1
|
|
1879
|
+
},
|
|
1880
|
+
/** 沙箱执行时长配额(P3)。按 AiUsageLog.activity='sandbox' 的 durationMs 汇总,
|
|
1881
|
+
* 分钟粒度向上取整;null 限额 = 不限量。purchasable false:不可加购,只能升档。 */
|
|
1882
|
+
sandboxMinutesMonthly: {
|
|
1883
|
+
tier: "paid",
|
|
1884
|
+
unit: "minutes/month",
|
|
1885
|
+
purchasable: false,
|
|
1886
|
+
step: 1
|
|
1887
|
+
},
|
|
1888
|
+
/** 媒体生成次数配额(P4c)。按 AiUsageLog.activity IN (image, video, speech, transcription) 本月 count 汇总;
|
|
1889
|
+
* null 限额 = 不限量。purchasable false:不可加购,只能升档。 */
|
|
1890
|
+
mediaGenerationsMonthly: {
|
|
1891
|
+
tier: "paid",
|
|
1892
|
+
unit: "generations/month",
|
|
1893
|
+
purchasable: false,
|
|
1894
|
+
step: 1
|
|
1895
|
+
},
|
|
1896
|
+
/** 画廊存储配额(P4c)。按 GenerationRun.artifacts 持久化的 blob size 汇总(MB);
|
|
1897
|
+
* null 限额 = 不限量。purchasable false:不可加购,只能升档。 */
|
|
1898
|
+
galleryStorageMb: {
|
|
1899
|
+
tier: "paid",
|
|
1900
|
+
unit: "MB",
|
|
1901
|
+
purchasable: false,
|
|
1902
|
+
step: 1
|
|
1517
1903
|
}
|
|
1518
1904
|
};
|
|
1519
1905
|
const RESOURCE_KEYS = Object.keys(ResourceRegistry);
|
|
@@ -1664,4 +2050,4 @@ const ICON_MAP = {
|
|
|
1664
2050
|
music4: Music4
|
|
1665
2051
|
};
|
|
1666
2052
|
//#endregion
|
|
1667
|
-
export {
|
|
2053
|
+
export { resolvePluginOrder as $, ADAPTER_KIND_VALUES as A, VIRTUALIZE_THRESHOLD as B, DEFAULT_WATCHED_DEPENDENCIES as C, interpolateTemplate as D, UnknownPromptVariableError as E, PROVIDER_CATEGORY_VALUES as F, BillingUnavailableError as G, registerPrismaSeam as H, AI_SOURCE_MODES as I, dumpModules as J, SeatsExceededError as K, PROVIDER_BADGE_STYLES as L, MODEL_CAPABILITY_OPTIONS as M, MODEL_TABS as N, SEED_AI_PROVIDERS as O, PROVIDER_CATEGORIES as P, resolveImportSpecifiers as Q, DND_STICKY_THRESHOLD as R, resolveIpLocation as S, DEPENDENCY_PRIORITIES as T, registerServerSeam as U, getServerSeam as V, HostedAiError as W, generateAssemblyFiles as X, generateAssemblyCode as Y, parseProfileImports as Z, OSS_BASE_FEATURES as _, DEFAULT_EMAIL_CATEGORIES as a, parseUserAgent as b, normalizeEmailCategories as c, RESOURCE_KEYS as d, defineProfile as et, ResourceRegistry as f, FeatureRegistry as g, FEATURE_KEYS as h, DEFAULT_CATEGORIES as i, LOBE_ICON_MAP as j, ADAPTER_KINDS as k, NOTIFICATION_CATEGORIES as l, PlanFeaturesSchema as m, DEVICE_SIZES as n, isInDndWindow as o, isResourceDefined as p, WebhookSignatureError as q, moduleRegistry as r, normalizeCategoryFrequencies as s, ICON_MAP as t, definePlugin as tt, NOTIFICATION_FREQUENCIES as u, isOssFeature as v, DEPENDENCY_CATEGORIES as w, getClientIp as x, formatParsedUA as y, LOAD_MORE_STEP as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allbluecn/kernel",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"license": "AGPL-3.0-or-later",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "AllBlue 插件协议:类型定义 + 构建期装配器(零运行时)",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"dist"
|
|
40
40
|
],
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@tanstack/ai": "^0.43.0 || ^0.47.0 || ^0.52.0",
|
|
42
|
+
"@tanstack/ai": "^0.43.0 || ^0.47.0 || ^0.52.0 || ^0.54.0",
|
|
43
43
|
"@tanstack/react-start": "^1.168.49",
|
|
44
44
|
"react": "^19",
|
|
45
|
-
"lucide-react": "^1.
|
|
45
|
+
"lucide-react": "^1.47.0",
|
|
46
46
|
"zod": "^3.25 || ^4",
|
|
47
47
|
"@tanstack/react-router": "^1.168.0"
|
|
48
48
|
},
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@tanstack/react-start": "^1.168.49",
|
|
53
53
|
"@types/node": "^24.13.3",
|
|
54
54
|
"@types/react": "^19",
|
|
55
|
-
"lucide-react": "^1.
|
|
55
|
+
"lucide-react": "^1.47.0",
|
|
56
56
|
"react": "^19",
|
|
57
57
|
"tsdown": "^0.22.0",
|
|
58
58
|
"typescript": "^7",
|