@allbluecn/kernel 0.12.4 → 0.12.6
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 +37 -1
- package/dist/index.js +2 -2
- package/dist/{src-DyETlluZ.js → src-BZujYr_r.js} +105 -1
- package/package.json +2 -1
package/dist/bin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import { ct as generateAssemblyFiles, dt as parseProfileImports, ot as dumpModules, pt as resolvePluginOrder, st as generateAssemblyCode, ut as extractPluginLocalNames } from "./src-BZujYr_r.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
|
@@ -692,6 +692,18 @@ declare const FeatureRegistry: {
|
|
|
692
692
|
readonly tier: 'paid';
|
|
693
693
|
readonly module: 'telemetry';
|
|
694
694
|
};
|
|
695
|
+
/** 团队协作(云地协同阶段 2,规格 §5/§8.2):需经服务器的协作与分享的高级功能键。
|
|
696
|
+
* module null:判定完全靠有效档位(部署形态 + 订阅/团队继承),不依赖 pro 服务。
|
|
697
|
+
* 不进 OSS_BASE_FEATURES——开源部署靠部署形态判定(resolveEffectivePlan 的无计费分支恒开)。 */
|
|
698
|
+
readonly teamCollaboration: {
|
|
699
|
+
readonly tier: 'paid';
|
|
700
|
+
readonly module: null;
|
|
701
|
+
};
|
|
702
|
+
/** 外链分享(同上):guest 席位只继承 teamCollaboration,不继承本键(访客不能创建分享)。 */
|
|
703
|
+
readonly externalSharing: {
|
|
704
|
+
readonly tier: 'paid';
|
|
705
|
+
readonly module: null;
|
|
706
|
+
};
|
|
695
707
|
};
|
|
696
708
|
type FeatureKey = keyof typeof FeatureRegistry;
|
|
697
709
|
declare const FEATURE_KEYS: FeatureKey[];
|
|
@@ -1263,6 +1275,28 @@ interface RealtimeTransport {
|
|
|
1263
1275
|
type AvatarPart = "face" | "eyes" | "eyebrows" | "mouth" | "nose" | "glasses" | "hair" | "accessories" | "details" | "beard";
|
|
1264
1276
|
type AvatarConfig = Record<AvatarPart, number>;
|
|
1265
1277
|
type ShapeType = "circle" | "rounded" | "square";
|
|
1278
|
+
/**
|
|
1279
|
+
* 各部件索引上限(含):与 `public/avatar/preview/<part>/` 的文件数一一对应(数量 - 1)。
|
|
1280
|
+
* 超上限的索引在渲染时会被跳过(少画一层),不会裂图。
|
|
1281
|
+
*/
|
|
1282
|
+
declare const AVATAR_PART_MAX: Record<AvatarPart, number>;
|
|
1283
|
+
/** 图层顺序(自下而上):脸 → 五官 → 遮挡物 → 装饰。服务端拼装与编辑器预览必须同序。 */
|
|
1284
|
+
declare const AVATAR_PART_ORDER: readonly AvatarPart[];
|
|
1285
|
+
/** 这些图层 index=0 表示「不戴」,渲染时整段跳过(不产出空 <g>)。 */
|
|
1286
|
+
declare const AVATAR_NONE_PARTS: readonly AvatarPart[];
|
|
1287
|
+
/** 全 0 配置(DB 列默认值同形;hasAvatarConfig 视其为「未配置」) */
|
|
1288
|
+
declare const DEFAULT_AVATAR_CONFIG: AvatarConfig;
|
|
1289
|
+
/** 预设底色(注册、OAuth 首登、admin 建号、会话回填共用) */
|
|
1290
|
+
declare const AVATAR_PRESET_BG_COLORS: readonly string[];
|
|
1291
|
+
/**
|
|
1292
|
+
* 随机头像配置:注册后自动生成,保证「新账号一定有头像」这一产品口径。
|
|
1293
|
+
* 每个部件在 [0, AVATAR_PART_MAX[part]] 内均匀取值。
|
|
1294
|
+
*/
|
|
1295
|
+
declare function getRandomAvatarConfig(): AvatarConfig;
|
|
1296
|
+
/**
|
|
1297
|
+
* 按种子(用户名/邮箱)取预设底色:同一用户恒定同色,避免每次回填换底色。
|
|
1298
|
+
*/
|
|
1299
|
+
declare function pickAvatarBgColor(seed: string): string;
|
|
1266
1300
|
//#endregion
|
|
1267
1301
|
//#region src/contract/modules/billing/plan-features-schema.d.ts
|
|
1268
1302
|
declare const PlanFeaturesSchema: z.ZodRecord<z.ZodEnum<{
|
|
@@ -1274,6 +1308,7 @@ declare const PlanFeaturesSchema: z.ZodRecord<z.ZodEnum<{
|
|
|
1274
1308
|
byokAi: "byokAi";
|
|
1275
1309
|
compliance: "compliance";
|
|
1276
1310
|
customAgents: "customAgents";
|
|
1311
|
+
externalSharing: "externalSharing";
|
|
1277
1312
|
globalSearch: "globalSearch";
|
|
1278
1313
|
harnessConnectors: "harnessConnectors";
|
|
1279
1314
|
harnessMarketPrivateIndex: "harnessMarketPrivateIndex";
|
|
@@ -1284,6 +1319,7 @@ declare const PlanFeaturesSchema: z.ZodRecord<z.ZodEnum<{
|
|
|
1284
1319
|
multiProvider: "multiProvider";
|
|
1285
1320
|
sandboxExecution: "sandboxExecution";
|
|
1286
1321
|
sso: "sso";
|
|
1322
|
+
teamCollaboration: "teamCollaboration";
|
|
1287
1323
|
templates: "templates";
|
|
1288
1324
|
testGeneration: "testGeneration";
|
|
1289
1325
|
versionHistory: "versionHistory";
|
|
@@ -1605,4 +1641,4 @@ declare const ICON_MAP: Record<string, ComponentType<{
|
|
|
1605
1641
|
className?: string;
|
|
1606
1642
|
}>>;
|
|
1607
1643
|
//#endregion
|
|
1608
|
-
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 ConnectorDescriptorSummary, type ConnectorsService, type CustomDashboard, DEFAULT_CATEGORIES, DEFAULT_EMAIL_CATEGORIES, DEFAULT_WATCHED_DEPENDENCIES, DEPENDENCY_CATEGORIES, DEPENDENCY_PRIORITIES, DEVICE_SIZES, DND_STICKY_THRESHOLD, DependencyCategory, DependencyPriority, DependencySeed, DependencyUsage, type Design, type DesignDetail, type DesignVersionFull, type DesignVersionWithPages, type DesignVersionWithSemver, 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 SearchResult as GlobalSearchResult, type GlobalSearchService, type HarnessContribution, type HostSession, type HostedAiChatParams, type HostedAiChatResult, HostedAiError, type HostedAiModel, type HostedAiService, type HostedProviderAccess, 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 ManagedIndexEntry, type ManagedIndexSource, type MarketIndexService, type Middleware, ModelCapability, ModelTab, NOTIFICATION_CATEGORIES, NOTIFICATION_FREQUENCIES, NotificationCategory, NotificationFrequency, NotificationItem, NotificationListResult, NotificationPreferences, NotificationSsePayload, NotificationSseValue, OSS_BASE_FEATURES, type OutlineNode, PROMPT_DEFINITIONS, PROVIDER_BADGE_STYLES, PROVIDER_CATEGORIES, PROVIDER_CATEGORY_VALUES, PRO_FEATURES, 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, PromptDefinition, PromptSection, PromptVariableDef, 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$1 as SearchResult, type SeatCheckResult, type SeatUpdateParams, SeatsExceededError, type ServerSeam, type SettingsTabContribution, type ShapeType, type SsoProvider, type SsoService, type SubscriptionInfo, SyncDependencyResult, SystemPromptSectionDTO, SystemPromptTemplateDTO, SystemPromptVersionDTO, TIPTAP_ACTION_INSTRUCTIONS, type TelemetryService, type TemplatesService, ThirdPartyDependencyRow, type UiSlotContributions, UnknownPromptVariableError, UnreadSnapshotPayload, UpdateDependencyInput, VIRTUALIZE_THRESHOLD, type VersionHistoryService, VersionStatus, WebhookSignatureError, definePlugin, defineProfile, dumpModules, formatParsedUA, generateAssemblyCode, generateAssemblyFiles, getClientIp, getPromptDefinition, getServerSeam, interpolateTemplate, isInDndWindow, isOssFeature, isResourceDefined, listPromptDefinitions, moduleRegistry, normalizeCategoryFrequencies, normalizeEmailCategories, parseProfileImports, parseUserAgent, promptDefinitionKeys, registerPrismaSeam, registerServerSeam, resolveImportSpecifiers, resolveIpLocation, resolvePluginOrder };
|
|
1644
|
+
export { ADAPTER_KINDS, ADAPTER_KIND_VALUES, type AICommandContext, type AICommandDef, type AICommandHandler, type AICommandResult, AI_SOURCE_MODES, AVATAR_NONE_PARTS, AVATAR_PART_MAX, AVATAR_PART_ORDER, AVATAR_PRESET_BG_COLORS, 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 ConnectorDescriptorSummary, type ConnectorsService, type CustomDashboard, DEFAULT_AVATAR_CONFIG, DEFAULT_CATEGORIES, DEFAULT_EMAIL_CATEGORIES, DEFAULT_WATCHED_DEPENDENCIES, DEPENDENCY_CATEGORIES, DEPENDENCY_PRIORITIES, DEVICE_SIZES, DND_STICKY_THRESHOLD, DependencyCategory, DependencyPriority, DependencySeed, DependencyUsage, type Design, type DesignDetail, type DesignVersionFull, type DesignVersionWithPages, type DesignVersionWithSemver, 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 SearchResult as GlobalSearchResult, type GlobalSearchService, type HarnessContribution, type HostSession, type HostedAiChatParams, type HostedAiChatResult, HostedAiError, type HostedAiModel, type HostedAiService, type HostedProviderAccess, 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 ManagedIndexEntry, type ManagedIndexSource, type MarketIndexService, type Middleware, ModelCapability, ModelTab, NOTIFICATION_CATEGORIES, NOTIFICATION_FREQUENCIES, NotificationCategory, NotificationFrequency, NotificationItem, NotificationListResult, NotificationPreferences, NotificationSsePayload, NotificationSseValue, OSS_BASE_FEATURES, type OutlineNode, PROMPT_DEFINITIONS, PROVIDER_BADGE_STYLES, PROVIDER_CATEGORIES, PROVIDER_CATEGORY_VALUES, PRO_FEATURES, 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, PromptDefinition, PromptSection, PromptVariableDef, 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$1 as SearchResult, type SeatCheckResult, type SeatUpdateParams, SeatsExceededError, type ServerSeam, type SettingsTabContribution, type ShapeType, type SsoProvider, type SsoService, type SubscriptionInfo, SyncDependencyResult, SystemPromptSectionDTO, SystemPromptTemplateDTO, SystemPromptVersionDTO, TIPTAP_ACTION_INSTRUCTIONS, type TelemetryService, type TemplatesService, ThirdPartyDependencyRow, type UiSlotContributions, UnknownPromptVariableError, UnreadSnapshotPayload, UpdateDependencyInput, VIRTUALIZE_THRESHOLD, type VersionHistoryService, VersionStatus, WebhookSignatureError, definePlugin, defineProfile, dumpModules, formatParsedUA, generateAssemblyCode, generateAssemblyFiles, getClientIp, getPromptDefinition, getRandomAvatarConfig, getServerSeam, interpolateTemplate, isInDndWindow, isOssFeature, isResourceDefined, listPromptDefinitions, moduleRegistry, normalizeCategoryFrequencies, normalizeEmailCategories, parseProfileImports, parseUserAgent, pickAvatarBgColor, promptDefinitionKeys, registerPrismaSeam, registerServerSeam, resolveImportSpecifiers, resolveIpLocation, resolvePluginOrder };
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as
|
|
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, PROMPT_DEFINITIONS, PROVIDER_BADGE_STYLES, PROVIDER_CATEGORIES, PROVIDER_CATEGORY_VALUES, PRO_FEATURES, PlanFeaturesSchema, RESOURCE_KEYS, ResourceRegistry, SEED_AI_PROVIDERS, SeatsExceededError, TIPTAP_ACTION_INSTRUCTIONS, UnknownPromptVariableError, VIRTUALIZE_THRESHOLD, WebhookSignatureError, definePlugin, defineProfile, dumpModules, formatParsedUA, generateAssemblyCode, generateAssemblyFiles, getClientIp, getPromptDefinition, getServerSeam, interpolateTemplate, isInDndWindow, isOssFeature, isResourceDefined, listPromptDefinitions, moduleRegistry, normalizeCategoryFrequencies, normalizeEmailCategories, parseProfileImports, parseUserAgent, promptDefinitionKeys, registerPrismaSeam, registerServerSeam, resolveImportSpecifiers, resolveIpLocation, resolvePluginOrder };
|
|
1
|
+
import { $ as getServerSeam, A as DEFAULT_WATCHED_DEPENDENCIES, B as SEED_AI_PROVIDERS, C as DEFAULT_AVATAR_CONFIG, D as parseUserAgent, E as formatParsedUA, F as getPromptDefinition, G as MODEL_TABS, H as ADAPTER_KIND_VALUES, I as listPromptDefinitions, J as AI_SOURCE_MODES, K as PROVIDER_CATEGORIES, L as promptDefinitionKeys, M as DEPENDENCY_PRIORITIES, N as PROMPT_DEFINITIONS, O as getClientIp, P as TIPTAP_ACTION_INSTRUCTIONS, Q as VIRTUALIZE_THRESHOLD, R as UnknownPromptVariableError, S as AVATAR_PRESET_BG_COLORS, T as pickAvatarBgColor, U as LOBE_ICON_MAP, V as ADAPTER_KINDS, W as MODEL_CAPABILITY_OPTIONS, X as DND_STICKY_THRESHOLD, Y as PROVIDER_BADGE_STYLES, Z as LOAD_MORE_STEP, _ as OSS_BASE_FEATURES, a as DEFAULT_EMAIL_CATEGORIES, at as WebhookSignatureError, b as AVATAR_PART_MAX, c as normalizeEmailCategories, ct as generateAssemblyFiles, d as RESOURCE_KEYS, dt as parseProfileImports, et as registerPrismaSeam, f as ResourceRegistry, ft as resolveImportSpecifiers, g as FeatureRegistry, h as FEATURE_KEYS, ht as definePlugin, i as DEFAULT_CATEGORIES, it as SeatsExceededError, j as DEPENDENCY_CATEGORIES, k as resolveIpLocation, l as NOTIFICATION_CATEGORIES, lt as PRO_FEATURES, m as PlanFeaturesSchema, mt as defineProfile, n as DEVICE_SIZES, nt as HostedAiError, o as isInDndWindow, ot as dumpModules, p as isResourceDefined, pt as resolvePluginOrder, q as PROVIDER_CATEGORY_VALUES, r as moduleRegistry, rt as BillingUnavailableError, s as normalizeCategoryFrequencies, st as generateAssemblyCode, t as ICON_MAP, tt as registerServerSeam, u as NOTIFICATION_FREQUENCIES, v as isOssFeature, w as getRandomAvatarConfig, x as AVATAR_PART_ORDER, y as AVATAR_NONE_PARTS, z as interpolateTemplate } from "./src-BZujYr_r.js";
|
|
2
|
+
export { ADAPTER_KINDS, ADAPTER_KIND_VALUES, AI_SOURCE_MODES, AVATAR_NONE_PARTS, AVATAR_PART_MAX, AVATAR_PART_ORDER, AVATAR_PRESET_BG_COLORS, BillingUnavailableError, DEFAULT_AVATAR_CONFIG, 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, PROMPT_DEFINITIONS, PROVIDER_BADGE_STYLES, PROVIDER_CATEGORIES, PROVIDER_CATEGORY_VALUES, PRO_FEATURES, PlanFeaturesSchema, RESOURCE_KEYS, ResourceRegistry, SEED_AI_PROVIDERS, SeatsExceededError, TIPTAP_ACTION_INSTRUCTIONS, UnknownPromptVariableError, VIRTUALIZE_THRESHOLD, WebhookSignatureError, definePlugin, defineProfile, dumpModules, formatParsedUA, generateAssemblyCode, generateAssemblyFiles, getClientIp, getPromptDefinition, getRandomAvatarConfig, getServerSeam, interpolateTemplate, isInDndWindow, isOssFeature, isResourceDefined, listPromptDefinitions, moduleRegistry, normalizeCategoryFrequencies, normalizeEmailCategories, parseProfileImports, parseUserAgent, pickAvatarBgColor, promptDefinitionKeys, registerPrismaSeam, registerServerSeam, resolveImportSpecifiers, resolveIpLocation, resolvePluginOrder };
|
|
@@ -2587,6 +2587,98 @@ function formatParsedUA(parsed) {
|
|
|
2587
2587
|
].filter((s) => s && s !== "Unknown").join(" / ");
|
|
2588
2588
|
}
|
|
2589
2589
|
//#endregion
|
|
2590
|
+
//#region src/contract/interfaces/avatar.ts
|
|
2591
|
+
/**
|
|
2592
|
+
* 各部件索引上限(含):与 `public/avatar/preview/<part>/` 的文件数一一对应(数量 - 1)。
|
|
2593
|
+
* 超上限的索引在渲染时会被跳过(少画一层),不会裂图。
|
|
2594
|
+
*/
|
|
2595
|
+
const AVATAR_PART_MAX = {
|
|
2596
|
+
face: 15,
|
|
2597
|
+
eyes: 13,
|
|
2598
|
+
eyebrows: 15,
|
|
2599
|
+
mouth: 19,
|
|
2600
|
+
nose: 13,
|
|
2601
|
+
glasses: 14,
|
|
2602
|
+
hair: 58,
|
|
2603
|
+
accessories: 14,
|
|
2604
|
+
details: 13,
|
|
2605
|
+
beard: 16
|
|
2606
|
+
};
|
|
2607
|
+
/** 图层顺序(自下而上):脸 → 五官 → 遮挡物 → 装饰。服务端拼装与编辑器预览必须同序。 */
|
|
2608
|
+
const AVATAR_PART_ORDER = [
|
|
2609
|
+
"face",
|
|
2610
|
+
"nose",
|
|
2611
|
+
"mouth",
|
|
2612
|
+
"eyes",
|
|
2613
|
+
"eyebrows",
|
|
2614
|
+
"glasses",
|
|
2615
|
+
"hair",
|
|
2616
|
+
"accessories",
|
|
2617
|
+
"details",
|
|
2618
|
+
"beard"
|
|
2619
|
+
];
|
|
2620
|
+
/** 这些图层 index=0 表示「不戴」,渲染时整段跳过(不产出空 <g>)。 */
|
|
2621
|
+
const AVATAR_NONE_PARTS = [
|
|
2622
|
+
"glasses",
|
|
2623
|
+
"hair",
|
|
2624
|
+
"accessories",
|
|
2625
|
+
"details",
|
|
2626
|
+
"beard"
|
|
2627
|
+
];
|
|
2628
|
+
/** 全 0 配置(DB 列默认值同形;hasAvatarConfig 视其为「未配置」) */
|
|
2629
|
+
const DEFAULT_AVATAR_CONFIG = {
|
|
2630
|
+
face: 0,
|
|
2631
|
+
eyes: 0,
|
|
2632
|
+
eyebrows: 0,
|
|
2633
|
+
mouth: 0,
|
|
2634
|
+
nose: 0,
|
|
2635
|
+
glasses: 0,
|
|
2636
|
+
hair: 0,
|
|
2637
|
+
accessories: 0,
|
|
2638
|
+
details: 0,
|
|
2639
|
+
beard: 0
|
|
2640
|
+
};
|
|
2641
|
+
/** 预设底色(注册、OAuth 首登、admin 建号、会话回填共用) */
|
|
2642
|
+
const AVATAR_PRESET_BG_COLORS = [
|
|
2643
|
+
"#fff",
|
|
2644
|
+
"#fa541c",
|
|
2645
|
+
"#faad14",
|
|
2646
|
+
"#fadb14",
|
|
2647
|
+
"#a0d911",
|
|
2648
|
+
"#52c41a",
|
|
2649
|
+
"#1890ff",
|
|
2650
|
+
"#2f54eb",
|
|
2651
|
+
"#722ed1",
|
|
2652
|
+
"#eb2f96",
|
|
2653
|
+
"#bfbfbf",
|
|
2654
|
+
"#f0d5c0",
|
|
2655
|
+
"#debaba",
|
|
2656
|
+
"#babae1",
|
|
2657
|
+
"#e1bae1",
|
|
2658
|
+
"#bae1e1",
|
|
2659
|
+
"#c0d5f0",
|
|
2660
|
+
"#d5f0c0",
|
|
2661
|
+
"#e0e0e0",
|
|
2662
|
+
"#f5c6c6"
|
|
2663
|
+
];
|
|
2664
|
+
/**
|
|
2665
|
+
* 随机头像配置:注册后自动生成,保证「新账号一定有头像」这一产品口径。
|
|
2666
|
+
* 每个部件在 [0, AVATAR_PART_MAX[part]] 内均匀取值。
|
|
2667
|
+
*/
|
|
2668
|
+
function getRandomAvatarConfig() {
|
|
2669
|
+
const config = {};
|
|
2670
|
+
for (const part of Object.keys(AVATAR_PART_MAX)) config[part] = Math.floor(Math.random() * (AVATAR_PART_MAX[part] + 1));
|
|
2671
|
+
return config;
|
|
2672
|
+
}
|
|
2673
|
+
/**
|
|
2674
|
+
* 按种子(用户名/邮箱)取预设底色:同一用户恒定同色,避免每次回填换底色。
|
|
2675
|
+
*/
|
|
2676
|
+
function pickAvatarBgColor(seed) {
|
|
2677
|
+
let hash = 0;
|
|
2678
|
+
for (let i = 0; i < seed.length; i++) hash = seed.charCodeAt(i) + ((hash << 5) - hash);
|
|
2679
|
+
return AVATAR_PRESET_BG_COLORS[Math.abs(hash) % AVATAR_PRESET_BG_COLORS.length];
|
|
2680
|
+
}
|
|
2681
|
+
//#endregion
|
|
2590
2682
|
//#region src/contract/modules/billing/feature-registry.ts
|
|
2591
2683
|
const FeatureRegistry = {
|
|
2592
2684
|
byokAi: {
|
|
@@ -2703,6 +2795,18 @@ const FeatureRegistry = {
|
|
|
2703
2795
|
harnessTelemetryUpload: {
|
|
2704
2796
|
tier: "paid",
|
|
2705
2797
|
module: "telemetry"
|
|
2798
|
+
},
|
|
2799
|
+
/** 团队协作(云地协同阶段 2,规格 §5/§8.2):需经服务器的协作与分享的高级功能键。
|
|
2800
|
+
* module null:判定完全靠有效档位(部署形态 + 订阅/团队继承),不依赖 pro 服务。
|
|
2801
|
+
* 不进 OSS_BASE_FEATURES——开源部署靠部署形态判定(resolveEffectivePlan 的无计费分支恒开)。 */
|
|
2802
|
+
teamCollaboration: {
|
|
2803
|
+
tier: "paid",
|
|
2804
|
+
module: null
|
|
2805
|
+
},
|
|
2806
|
+
/** 外链分享(同上):guest 席位只继承 teamCollaboration,不继承本键(访客不能创建分享)。 */
|
|
2807
|
+
externalSharing: {
|
|
2808
|
+
tier: "paid",
|
|
2809
|
+
module: null
|
|
2706
2810
|
}
|
|
2707
2811
|
};
|
|
2708
2812
|
const FEATURE_KEYS = Object.keys(FeatureRegistry);
|
|
@@ -2978,4 +3082,4 @@ const ICON_MAP = {
|
|
|
2978
3082
|
music4: Music4
|
|
2979
3083
|
};
|
|
2980
3084
|
//#endregion
|
|
2981
|
-
export {
|
|
3085
|
+
export { getServerSeam as $, DEFAULT_WATCHED_DEPENDENCIES as A, SEED_AI_PROVIDERS as B, DEFAULT_AVATAR_CONFIG as C, parseUserAgent as D, formatParsedUA as E, getPromptDefinition as F, MODEL_TABS as G, ADAPTER_KIND_VALUES as H, listPromptDefinitions as I, AI_SOURCE_MODES as J, PROVIDER_CATEGORIES as K, promptDefinitionKeys as L, DEPENDENCY_PRIORITIES as M, PROMPT_DEFINITIONS as N, getClientIp as O, TIPTAP_ACTION_INSTRUCTIONS as P, VIRTUALIZE_THRESHOLD as Q, UnknownPromptVariableError as R, AVATAR_PRESET_BG_COLORS as S, pickAvatarBgColor as T, LOBE_ICON_MAP as U, ADAPTER_KINDS as V, MODEL_CAPABILITY_OPTIONS as W, DND_STICKY_THRESHOLD as X, PROVIDER_BADGE_STYLES as Y, LOAD_MORE_STEP as Z, OSS_BASE_FEATURES as _, DEFAULT_EMAIL_CATEGORIES as a, WebhookSignatureError as at, AVATAR_PART_MAX as b, normalizeEmailCategories as c, generateAssemblyFiles as ct, RESOURCE_KEYS as d, parseProfileImports as dt, registerPrismaSeam as et, ResourceRegistry as f, resolveImportSpecifiers as ft, FeatureRegistry as g, FEATURE_KEYS as h, definePlugin as ht, DEFAULT_CATEGORIES as i, SeatsExceededError as it, DEPENDENCY_CATEGORIES as j, resolveIpLocation as k, NOTIFICATION_CATEGORIES as l, PRO_FEATURES as lt, PlanFeaturesSchema as m, defineProfile as mt, DEVICE_SIZES as n, HostedAiError as nt, isInDndWindow as o, dumpModules as ot, isResourceDefined as p, resolvePluginOrder as pt, PROVIDER_CATEGORY_VALUES as q, moduleRegistry as r, BillingUnavailableError as rt, normalizeCategoryFrequencies as s, generateAssemblyCode as st, ICON_MAP as t, registerServerSeam as tt, NOTIFICATION_FREQUENCIES as u, extractPluginLocalNames as ut, isOssFeature as v, getRandomAvatarConfig as w, AVATAR_PART_ORDER as x, AVATAR_NONE_PARTS as y, interpolateTemplate as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allbluecn/kernel",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.6",
|
|
4
4
|
"license": "AGPL-3.0-or-later",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "AllBlue 插件协议:类型定义 + 构建期装配器(零运行时)",
|
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
},
|
|
68
68
|
"scripts": {
|
|
69
69
|
"build": "tsdown",
|
|
70
|
+
"dev": "tsdown --watch",
|
|
70
71
|
"lint": "tsc --noEmit",
|
|
71
72
|
"test": "vitest",
|
|
72
73
|
"test:run": "vitest run",
|