@allbluecn/kernel 0.12.2 → 0.12.4

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 CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { $ as dumpModules, et as generateAssemblyCode, it as parseProfileImports, ot as resolvePluginOrder, rt as extractPluginLocalNames, tt as generateAssemblyFiles } from "./src-yc_A73De.js";
2
+ import { $ as dumpModules, et as generateAssemblyCode, it as parseProfileImports, ot as resolvePluginOrder, rt as extractPluginLocalNames, tt as generateAssemblyFiles } from "./src-DyETlluZ.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
@@ -165,11 +165,22 @@ interface HostedAiModel {
165
165
  provider: string;
166
166
  streaming: boolean;
167
167
  }
168
+ interface HostedProviderAccess {
169
+ provider: string;
170
+ baseUrl: string;
171
+ apiKey: string;
172
+ modelIds: string[];
173
+ expiresAt: string;
174
+ }
168
175
  interface HostedAiService {
169
176
  chatStream(params: HostedAiChatParams, signal?: AbortSignal): AsyncIterable<StreamChunk>;
170
177
  chat(params: HostedAiChatParams, signal?: AbortSignal): Promise<HostedAiChatResult>;
171
178
  getQuota(workspaceId: string): Promise<AiQuota>;
172
179
  listAvailableModels(): Promise<HostedAiModel[]>;
180
+ getHarnessProvider?(args: {
181
+ userId: string;
182
+ workspaceId: string;
183
+ }): Promise<HostedProviderAccess | null>;
173
184
  }
174
185
  //#endregion
175
186
  //#region src/pro-contract/sso.d.ts
@@ -231,6 +242,7 @@ interface PermissionsService {
231
242
  updateRole(roleId: string, updates: Partial<RoleDefinition>): Promise<void>;
232
243
  deleteRole(roleId: string): Promise<void>;
233
244
  checkPermission(userId: string, resource: string, action: string): Promise<PermissionLevel>;
245
+ checkWorkspacePermission?(userId: string, workspaceId: string, resource: string, action: string): Promise<PermissionLevel>;
234
246
  }
235
247
  //#endregion
236
248
  //#region src/pro-contract/license.d.ts
@@ -467,13 +479,74 @@ interface ComplianceService {
467
479
  }>;
468
480
  }
469
481
  //#endregion
482
+ //#region src/pro-contract/connectors.d.ts
483
+ /** 连接器摘要(客户端可展示的最小面;OAuth metadata 细节不出此契约)。 */
484
+ interface ConnectorDescriptorSummary {
485
+ /** 厂商 id(如 'notion'),路由与账号行的 provider 键 */
486
+ id: string;
487
+ /** 展示名(如 'Notion') */
488
+ label: string;
489
+ /** 该厂商暴露的资源清单 id(T21 经 MCP 动态发现前后的静态声明) */
490
+ resourceIds: string[];
491
+ }
492
+ interface ConnectorsService {
493
+ /** 已注册连接器描述符摘要(部署内可用厂商;探针失败/未注册厂商不出现在此列表)。 */
494
+ listDescriptorSummaries(): ConnectorDescriptorSummary[];
495
+ }
496
+ //#endregion
497
+ //#region src/pro-contract/market.d.ts
498
+ /** 托管索引条目安装来源(与自建索引 schema 的 source 联合成员一致)。 */
499
+ type ManagedIndexSource = {
500
+ kind: 'registry';
501
+ spec: string;
502
+ } | {
503
+ kind: 'git';
504
+ url: string;
505
+ committish?: string;
506
+ } | {
507
+ kind: 'tgz';
508
+ url: string;
509
+ };
510
+ /** 托管索引条目(浏览器安全摘要面:展示 + 安装 spec 派生所需最小字段)。 */
511
+ interface ManagedIndexEntry {
512
+ /** 插件包名(安装产物 bundle 名提示;真实名以安装器 inspect 为准) */
513
+ name: string;
514
+ /** 语义化版本(可更新检测与已装版本对比用) */
515
+ version?: string;
516
+ summary?: string;
517
+ risk?: 'low' | 'medium' | 'high';
518
+ homepage?: string;
519
+ source: ManagedIndexSource;
520
+ }
521
+ interface MarketIndexService {
522
+ /**
523
+ * 托管索引条目全集(Pro 侧自管拉取与缓存;探针失败返回空数组 = 区块缺席语义,
524
+ * 不抛错拖垮面板)。
525
+ */
526
+ listIndexEntries(): Promise<ManagedIndexEntry[]>;
527
+ /** 托管索引展示名(面板来源徽章用,如「官方精选」)。 */
528
+ label(): string;
529
+ }
530
+ //#endregion
531
+ //#region src/pro-contract/telemetry.d.ts
532
+ interface TelemetryService {
533
+ /**
534
+ * 托管 telemetry ingest 端点(POST JSON 载荷目标)。返回 null = 托管端点
535
+ * 未配置(缺席语义:harnessTelemetryUpload 门内但环境未就绪,调用方降级
536
+ * 提示用户自配 URL,不重试不抛错拖垮设置面)。
537
+ */
538
+ ingestUrl(): string | null;
539
+ /** 托管端点展示名(设置面来源徽章用,如「AllBlue 托管」)。 */
540
+ label(): string;
541
+ }
542
+ //#endregion
470
543
  //#region src/pro-contract/module.d.ts
471
544
  type ProEdition = 'oss' | 'pro';
472
545
  /**
473
546
  * Pro 功能键单一来源(generate-assembly 的 implementedModules 生成亦消费此常量)。
474
547
  * 新增 feature 只改这里;ProFeature 联合类型由本数组派生,杜绝双维护漂移。
475
548
  */
476
- declare const PRO_FEATURES: readonly ['billing', 'hostedAi', 'sso', 'audit', 'permissions', 'license', 'versionHistory', 'automation', 'templates', 'analytics', 'globalSearch', 'compliance'];
549
+ declare const PRO_FEATURES: readonly ['billing', 'hostedAi', 'sso', 'audit', 'permissions', 'license', 'versionHistory', 'automation', 'templates', 'analytics', 'globalSearch', 'compliance', 'connectors', 'market', 'telemetry'];
477
550
  type ProFeature = (typeof PRO_FEATURES)[number];
478
551
  interface ProModule {
479
552
  readonly isAvailable: boolean;
@@ -491,8 +564,143 @@ interface ProModule {
491
564
  readonly analytics: AnalyticsService | null;
492
565
  readonly globalSearch: GlobalSearchService | null;
493
566
  readonly compliance: ComplianceService | null;
567
+ readonly connectors: ConnectorsService | null;
568
+ readonly market: MarketIndexService | null;
569
+ readonly telemetry: TelemetryService | null;
494
570
  }
495
571
  //#endregion
572
+ //#region src/contract/modules/billing/feature-registry.d.ts
573
+ interface FeatureMeta {
574
+ /** oss = 开源免费;paid = 付费;enterprise = 企业版专属 */
575
+ tier: 'oss' | 'paid' | 'enterprise';
576
+ /** 该功能依赖的 proModule 服务名;null = 开源代码自带(仅权益门控) */
577
+ module: 'billing' | 'hostedAi' | 'sso' | 'audit' | 'permissions' | 'license' | 'versionHistory' | 'automation' | 'templates' | 'analytics' | 'globalSearch' | 'compliance' | 'connectors' | 'market' | 'telemetry' | null;
578
+ }
579
+ declare const FeatureRegistry: {
580
+ readonly byokAi: {
581
+ readonly tier: 'oss';
582
+ readonly module: null;
583
+ };
584
+ readonly hostedAi: {
585
+ readonly tier: 'paid';
586
+ readonly module: 'hostedAi';
587
+ };
588
+ readonly multiProvider: {
589
+ readonly tier: 'paid';
590
+ readonly module: null;
591
+ };
592
+ readonly largePageSize: {
593
+ readonly tier: 'paid';
594
+ readonly module: null;
595
+ };
596
+ readonly versionHistory: {
597
+ readonly tier: 'paid';
598
+ readonly module: 'versionHistory';
599
+ };
600
+ readonly automation: {
601
+ readonly tier: 'paid';
602
+ readonly module: 'automation';
603
+ };
604
+ readonly templates: {
605
+ readonly tier: 'paid';
606
+ readonly module: 'templates';
607
+ };
608
+ readonly globalSearch: {
609
+ readonly tier: 'paid';
610
+ readonly module: 'globalSearch';
611
+ };
612
+ readonly analytics: {
613
+ readonly tier: 'enterprise';
614
+ readonly module: 'analytics';
615
+ };
616
+ readonly sso: {
617
+ readonly tier: 'enterprise';
618
+ readonly module: 'sso';
619
+ };
620
+ readonly audit: {
621
+ readonly tier: 'enterprise';
622
+ readonly module: 'audit';
623
+ };
624
+ readonly advancedPermissions: {
625
+ readonly tier: 'enterprise';
626
+ readonly module: 'permissions';
627
+ };
628
+ readonly compliance: {
629
+ readonly tier: 'enterprise';
630
+ readonly module: 'compliance';
631
+ };
632
+ readonly customAgents: {
633
+ readonly tier: 'paid';
634
+ readonly module: null;
635
+ };
636
+ /** 沙箱执行(P3)。module 为 null:沙箱是开源代码自带的平台能力,仅权益门控。
637
+ * 2026-11-07 用户裁决下放免费(harness TanStack AI 原生化 Phase 0):tier 'oss'
638
+ * 免订阅直接放行(testGeneration 同款口径),OSS_BASE_FEATURES 同步收录供客户端
639
+ * 权益快照。desktop 部署无订阅体系,走 requireFeature 内的点式直放分支(幂等)。
640
+ * 恢复 Pro 化 = tier 回 'paid' + 移出 OSS_BASE_FEATURES + seed 限额回 0。 */
641
+ readonly sandboxExecution: {
642
+ readonly tier: 'oss';
643
+ readonly module: null;
644
+ };
645
+ /** 媒体生成(P4c)。module 为 null:媒体生成是开源代码自带的平台能力(TanStack AI adapter 调用),
646
+ * 仅权益门控。2026-11-07 用户裁决下放免费(harness Phase 0):tier 'oss' 免订阅直接放行,
647
+ * OSS_BASE_FEATURES 同步收录。desktop BYOK 场景原点式豁免分支保留(幂等)。 */
648
+ readonly mediaGeneration: {
649
+ readonly tier: 'oss';
650
+ readonly module: null;
651
+ };
652
+ /** BUG 自动 AI 修复(P4)。module 为 null:入队是开源代码自带的平台能力(webhook + MCP 工具链),
653
+ * 本期全开源不设 requireFeature 门槛——仅入注册表防 CI check-feature-keys.ts 漂移(规格 §14.5)。 */
654
+ readonly bugAutoFix: {
655
+ readonly tier: 'paid';
656
+ readonly module: null;
657
+ };
658
+ /** AI 生成测试用例(testcase 模块 P3,规格 §12)。module 为 null:生成编排是开源代码自带的
659
+ * BYOK 平台能力(runChatAsAgent 消费用户自配 Key)。2026-10-10 起下放免费:tier 'oss'
660
+ * 免订阅直接放行(byokAi 同款口径),OSS_BASE_FEATURES 同步收录供客户端权益快照。
661
+ * desktop BYOK 场景原点式豁免分支保留(幂等)。 */
662
+ readonly testGeneration: {
663
+ readonly tier: 'oss';
664
+ readonly module: null;
665
+ };
666
+ /** Harness 连接器(P4 任务 20:Notion/Linear/飞书/钉钉/企业微信/腾讯会议六厂商 OAuth
667
+ * 连接与资源面)。module 'connectors':六厂商描述符注册表是 Pro 商业实现
668
+ * (packages/pro connectors 模块经 pro-patches 注入 web-saas),OSS 部署注册表为空
669
+ * → FeatureUnavailableError(连接器框架契约是开源的,厂商生态缺席)。
670
+ * tier 'paid':连接器是 Pro/Enterprise 档商业价值(open-source/free 档不含)。 */
671
+ readonly harnessConnectors: {
672
+ readonly tier: 'paid';
673
+ readonly module: 'connectors';
674
+ };
675
+ /** Harness 插件市场 Pro 托管索引(P4 任务 24,裁决 14)。module 'market':托管索引源是
676
+ * Pro 商业实现(packages/pro market 模块经 contributes.services.market 注入 web-saas),
677
+ * OSS 部署服务缺席 → FeatureUnavailableError。**用户自建索引源不收费**——本 key 只挡
678
+ * Pro 提供的托管索引区块;用户自配 HarnessPluginMarketSource 零门控(市场面板基础面
679
+ * 全开源)。tier 'paid':托管索引是 Pro/Enterprise 档商业价值。 */
680
+ readonly harnessMarketPrivateIndex: {
681
+ readonly tier: 'paid';
682
+ readonly module: 'market';
683
+ };
684
+ /** Harness telemetry 托管上传端点(P4 任务 25,裁决 14:新建 key,命名沿用
685
+ * harness<Capability> 既有风格)。module 'telemetry':托管 ingest 端点是 Pro 商业
686
+ * 实现(packages/pro telemetry 模块经 contributes.services.telemetry 注入),
687
+ * OSS 部署服务缺席 → FeatureUnavailableError。**用户自配上传 URL 不收费**——本 key
688
+ * 只挡 Pro 托管端点(HARNESS_TELEMETRY_ENDPOINT 语义的 service 形态);匿名计数与
689
+ * opt-in 日志上传本身全开源(HARNESS_TELEMETRY env 主闸默认关闭)。tier 'paid':
690
+ * 托管遥测接收面是 Pro/Enterprise 档商业价值。 */
691
+ readonly harnessTelemetryUpload: {
692
+ readonly tier: 'paid';
693
+ readonly module: 'telemetry';
694
+ };
695
+ };
696
+ type FeatureKey = keyof typeof FeatureRegistry;
697
+ declare const FEATURE_KEYS: FeatureKey[];
698
+ /** OSS 部署(billing 模块缺失)的基础白名单——唯一允许「无订阅即放行」的集合。
699
+ * testGeneration 虽有 tier 'oss'(requireFeature 直放),客户端权益快照走本集合构建
700
+ * features map,故须显式收录,否则 UI 入口(useFeature)仍判 locked。 */
701
+ declare const OSS_BASE_FEATURES: readonly FeatureKey[];
702
+ declare function isOssFeature(key: FeatureKey): boolean;
703
+ //#endregion
496
704
  //#region src/contributions.d.ts
497
705
  type Middleware = unknown;
498
706
  type PluginRouteContext = {
@@ -527,6 +735,14 @@ type ProServiceMap = Partial<Record<ProFeature, unknown>>;
527
735
  interface PrismaContribution {
528
736
  models: string[];
529
737
  }
738
+ interface HarnessContribution {
739
+ id: string;
740
+ factory: string;
741
+ config: Record<string, unknown>;
742
+ requiredServices: ProFeature[];
743
+ entitlements: FeatureKey[];
744
+ deployments: Array<'saas' | 'desktop'>;
745
+ }
530
746
  interface PluginContributions {
531
747
  routes?: RouteContribution[];
532
748
  serverMiddleware?: Middleware[];
@@ -536,6 +752,7 @@ interface PluginContributions {
536
752
  aiTools?: unknown[];
537
753
  prisma?: PrismaContribution;
538
754
  services?: ProServiceMap;
755
+ harness?: HarnessContribution[];
539
756
  }
540
757
  //#endregion
541
758
  //#region src/types.d.ts
@@ -1047,109 +1264,6 @@ type AvatarPart = "face" | "eyes" | "eyebrows" | "mouth" | "nose" | "glasses" |
1047
1264
  type AvatarConfig = Record<AvatarPart, number>;
1048
1265
  type ShapeType = "circle" | "rounded" | "square";
1049
1266
  //#endregion
1050
- //#region src/contract/modules/billing/feature-registry.d.ts
1051
- interface FeatureMeta {
1052
- /** oss = 开源免费;paid = 付费;enterprise = 企业版专属 */
1053
- tier: 'oss' | 'paid' | 'enterprise';
1054
- /** 该功能依赖的 proModule 服务名;null = 开源代码自带(仅权益门控) */
1055
- module: 'billing' | 'hostedAi' | 'sso' | 'audit' | 'permissions' | 'license' | 'versionHistory' | 'automation' | 'templates' | 'analytics' | 'globalSearch' | 'compliance' | null;
1056
- }
1057
- declare const FeatureRegistry: {
1058
- readonly byokAi: {
1059
- readonly tier: 'oss';
1060
- readonly module: null;
1061
- };
1062
- readonly hostedAi: {
1063
- readonly tier: 'paid';
1064
- readonly module: 'hostedAi';
1065
- };
1066
- readonly multiProvider: {
1067
- readonly tier: 'paid';
1068
- readonly module: null;
1069
- };
1070
- readonly largePageSize: {
1071
- readonly tier: 'paid';
1072
- readonly module: null;
1073
- };
1074
- readonly versionHistory: {
1075
- readonly tier: 'paid';
1076
- readonly module: 'versionHistory';
1077
- };
1078
- readonly automation: {
1079
- readonly tier: 'paid';
1080
- readonly module: 'automation';
1081
- };
1082
- readonly templates: {
1083
- readonly tier: 'paid';
1084
- readonly module: 'templates';
1085
- };
1086
- readonly globalSearch: {
1087
- readonly tier: 'paid';
1088
- readonly module: 'globalSearch';
1089
- };
1090
- readonly analytics: {
1091
- readonly tier: 'enterprise';
1092
- readonly module: 'analytics';
1093
- };
1094
- readonly sso: {
1095
- readonly tier: 'enterprise';
1096
- readonly module: 'sso';
1097
- };
1098
- readonly audit: {
1099
- readonly tier: 'enterprise';
1100
- readonly module: 'audit';
1101
- };
1102
- readonly advancedPermissions: {
1103
- readonly tier: 'enterprise';
1104
- readonly module: 'permissions';
1105
- };
1106
- readonly compliance: {
1107
- readonly tier: 'enterprise';
1108
- readonly module: 'compliance';
1109
- };
1110
- readonly customAgents: {
1111
- readonly tier: 'paid';
1112
- readonly module: null;
1113
- };
1114
- /** 沙箱执行(P3)。module 为 null:沙箱是开源代码自带的平台能力,仅权益门控。
1115
- * 2026-11-07 用户裁决下放免费(harness TanStack AI 原生化 Phase 0):tier 'oss'
1116
- * 免订阅直接放行(testGeneration 同款口径),OSS_BASE_FEATURES 同步收录供客户端
1117
- * 权益快照。desktop 部署无订阅体系,走 requireFeature 内的点式直放分支(幂等)。
1118
- * 恢复 Pro 化 = tier 回 'paid' + 移出 OSS_BASE_FEATURES + seed 限额回 0。 */
1119
- readonly sandboxExecution: {
1120
- readonly tier: 'oss';
1121
- readonly module: null;
1122
- };
1123
- /** 媒体生成(P4c)。module 为 null:媒体生成是开源代码自带的平台能力(TanStack AI adapter 调用),
1124
- * 仅权益门控。2026-11-07 用户裁决下放免费(harness Phase 0):tier 'oss' 免订阅直接放行,
1125
- * OSS_BASE_FEATURES 同步收录。desktop BYOK 场景原点式豁免分支保留(幂等)。 */
1126
- readonly mediaGeneration: {
1127
- readonly tier: 'oss';
1128
- readonly module: null;
1129
- };
1130
- /** BUG 自动 AI 修复(P4)。module 为 null:入队是开源代码自带的平台能力(webhook + MCP 工具链),
1131
- * 本期全开源不设 requireFeature 门槛——仅入注册表防 CI check-feature-keys.ts 漂移(规格 §14.5)。 */
1132
- readonly bugAutoFix: {
1133
- readonly tier: 'paid';
1134
- readonly module: null;
1135
- };
1136
- /** AI 生成测试用例(testcase 模块 P3,规格 §12)。module 为 null:生成编排是开源代码自带的
1137
- * BYOK 平台能力(runChatAsAgent 消费用户自配 Key)。2026-10-10 起下放免费:tier 'oss'
1138
- * 免订阅直接放行(byokAi 同款口径),OSS_BASE_FEATURES 同步收录供客户端权益快照。
1139
- * desktop BYOK 场景原点式豁免分支保留(幂等)。 */
1140
- readonly testGeneration: {
1141
- readonly tier: 'oss';
1142
- readonly module: null;
1143
- };
1144
- };
1145
- type FeatureKey = keyof typeof FeatureRegistry;
1146
- declare const FEATURE_KEYS: FeatureKey[];
1147
- /** OSS 部署(billing 模块缺失)的基础白名单——唯一允许「无订阅即放行」的集合。
1148
- * testGeneration 虽有 tier 'oss'(requireFeature 直放),客户端权益快照走本集合构建
1149
- * features map,故须显式收录,否则 UI 入口(useFeature)仍判 locked。 */
1150
- declare const OSS_BASE_FEATURES: readonly FeatureKey[];
1151
- declare function isOssFeature(key: FeatureKey): boolean;
1152
- //#endregion
1153
1267
  //#region src/contract/modules/billing/plan-features-schema.d.ts
1154
1268
  declare const PlanFeaturesSchema: z.ZodRecord<z.ZodEnum<{
1155
1269
  advancedPermissions: "advancedPermissions";
@@ -1161,6 +1275,9 @@ declare const PlanFeaturesSchema: z.ZodRecord<z.ZodEnum<{
1161
1275
  compliance: "compliance";
1162
1276
  customAgents: "customAgents";
1163
1277
  globalSearch: "globalSearch";
1278
+ harnessConnectors: "harnessConnectors";
1279
+ harnessMarketPrivateIndex: "harnessMarketPrivateIndex";
1280
+ harnessTelemetryUpload: "harnessTelemetryUpload";
1164
1281
  hostedAi: "hostedAi";
1165
1282
  largePageSize: "largePageSize";
1166
1283
  mediaGeneration: "mediaGeneration";
@@ -1488,4 +1605,4 @@ declare const ICON_MAP: Record<string, ComponentType<{
1488
1605
  className?: string;
1489
1606
  }>>;
1490
1607
  //#endregion
1491
- 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 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 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, 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 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 };
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 };
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { $ as dumpModules, A as promptDefinitionKeys, B as PROVIDER_CATEGORY_VALUES, C as DEFAULT_WATCHED_DEPENDENCIES, D as TIPTAP_ACTION_INSTRUCTIONS, E as PROMPT_DEFINITIONS, F as ADAPTER_KIND_VALUES, G as VIRTUALIZE_THRESHOLD, H as PROVIDER_BADGE_STYLES, I as LOBE_ICON_MAP, J as registerServerSeam, K as getServerSeam, L as MODEL_CAPABILITY_OPTIONS, M as interpolateTemplate, N as SEED_AI_PROVIDERS, O as getPromptDefinition, P as ADAPTER_KINDS, Q as WebhookSignatureError, R as MODEL_TABS, S as resolveIpLocation, T as DEPENDENCY_PRIORITIES, U as DND_STICKY_THRESHOLD, V as AI_SOURCE_MODES, W as LOAD_MORE_STEP, X as BillingUnavailableError, Y as HostedAiError, Z as SeatsExceededError, _ as OSS_BASE_FEATURES, a as DEFAULT_EMAIL_CATEGORIES, at as resolveImportSpecifiers, b as parseUserAgent, c as normalizeEmailCategories, ct as definePlugin, d as RESOURCE_KEYS, et as generateAssemblyCode, f as ResourceRegistry, g as FeatureRegistry, h as FEATURE_KEYS, i as DEFAULT_CATEGORIES, it as parseProfileImports, j as UnknownPromptVariableError, k as listPromptDefinitions, l as NOTIFICATION_CATEGORIES, m as PlanFeaturesSchema, n as DEVICE_SIZES, nt as PRO_FEATURES, o as isInDndWindow, ot as resolvePluginOrder, p as isResourceDefined, q as registerPrismaSeam, r as moduleRegistry, s as normalizeCategoryFrequencies, st as defineProfile, t as ICON_MAP, tt as generateAssemblyFiles, u as NOTIFICATION_FREQUENCIES, v as isOssFeature, w as DEPENDENCY_CATEGORIES, x as getClientIp, y as formatParsedUA, z as PROVIDER_CATEGORIES } from "./src-yc_A73De.js";
1
+ import { $ as dumpModules, A as promptDefinitionKeys, B as PROVIDER_CATEGORY_VALUES, C as DEFAULT_WATCHED_DEPENDENCIES, D as TIPTAP_ACTION_INSTRUCTIONS, E as PROMPT_DEFINITIONS, F as ADAPTER_KIND_VALUES, G as VIRTUALIZE_THRESHOLD, H as PROVIDER_BADGE_STYLES, I as LOBE_ICON_MAP, J as registerServerSeam, K as getServerSeam, L as MODEL_CAPABILITY_OPTIONS, M as interpolateTemplate, N as SEED_AI_PROVIDERS, O as getPromptDefinition, P as ADAPTER_KINDS, Q as WebhookSignatureError, R as MODEL_TABS, S as resolveIpLocation, T as DEPENDENCY_PRIORITIES, U as DND_STICKY_THRESHOLD, V as AI_SOURCE_MODES, W as LOAD_MORE_STEP, X as BillingUnavailableError, Y as HostedAiError, Z as SeatsExceededError, _ as OSS_BASE_FEATURES, a as DEFAULT_EMAIL_CATEGORIES, at as resolveImportSpecifiers, b as parseUserAgent, c as normalizeEmailCategories, ct as definePlugin, d as RESOURCE_KEYS, et as generateAssemblyCode, f as ResourceRegistry, g as FeatureRegistry, h as FEATURE_KEYS, i as DEFAULT_CATEGORIES, it as parseProfileImports, j as UnknownPromptVariableError, k as listPromptDefinitions, l as NOTIFICATION_CATEGORIES, m as PlanFeaturesSchema, n as DEVICE_SIZES, nt as PRO_FEATURES, o as isInDndWindow, ot as resolvePluginOrder, p as isResourceDefined, q as registerPrismaSeam, r as moduleRegistry, s as normalizeCategoryFrequencies, st as defineProfile, t as ICON_MAP, tt as generateAssemblyFiles, u as NOTIFICATION_FREQUENCIES, v as isOssFeature, w as DEPENDENCY_CATEGORIES, x as getClientIp, y as formatParsedUA, z as PROVIDER_CATEGORIES } from "./src-DyETlluZ.js";
2
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 };
@@ -184,7 +184,10 @@ const PRO_FEATURES = [
184
184
  "templates",
185
185
  "analytics",
186
186
  "globalSearch",
187
- "compliance"
187
+ "compliance",
188
+ "connectors",
189
+ "market",
190
+ "telemetry"
188
191
  ];
189
192
  //#endregion
190
193
  //#region src/generate-assembly.ts
@@ -2671,6 +2674,35 @@ const FeatureRegistry = {
2671
2674
  testGeneration: {
2672
2675
  tier: "oss",
2673
2676
  module: null
2677
+ },
2678
+ /** Harness 连接器(P4 任务 20:Notion/Linear/飞书/钉钉/企业微信/腾讯会议六厂商 OAuth
2679
+ * 连接与资源面)。module 'connectors':六厂商描述符注册表是 Pro 商业实现
2680
+ * (packages/pro connectors 模块经 pro-patches 注入 web-saas),OSS 部署注册表为空
2681
+ * → FeatureUnavailableError(连接器框架契约是开源的,厂商生态缺席)。
2682
+ * tier 'paid':连接器是 Pro/Enterprise 档商业价值(open-source/free 档不含)。 */
2683
+ harnessConnectors: {
2684
+ tier: "paid",
2685
+ module: "connectors"
2686
+ },
2687
+ /** Harness 插件市场 Pro 托管索引(P4 任务 24,裁决 14)。module 'market':托管索引源是
2688
+ * Pro 商业实现(packages/pro market 模块经 contributes.services.market 注入 web-saas),
2689
+ * OSS 部署服务缺席 → FeatureUnavailableError。**用户自建索引源不收费**——本 key 只挡
2690
+ * Pro 提供的托管索引区块;用户自配 HarnessPluginMarketSource 零门控(市场面板基础面
2691
+ * 全开源)。tier 'paid':托管索引是 Pro/Enterprise 档商业价值。 */
2692
+ harnessMarketPrivateIndex: {
2693
+ tier: "paid",
2694
+ module: "market"
2695
+ },
2696
+ /** Harness telemetry 托管上传端点(P4 任务 25,裁决 14:新建 key,命名沿用
2697
+ * harness<Capability> 既有风格)。module 'telemetry':托管 ingest 端点是 Pro 商业
2698
+ * 实现(packages/pro telemetry 模块经 contributes.services.telemetry 注入),
2699
+ * OSS 部署服务缺席 → FeatureUnavailableError。**用户自配上传 URL 不收费**——本 key
2700
+ * 只挡 Pro 托管端点(HARNESS_TELEMETRY_ENDPOINT 语义的 service 形态);匿名计数与
2701
+ * opt-in 日志上传本身全开源(HARNESS_TELEMETRY env 主闸默认关闭)。tier 'paid':
2702
+ * 托管遥测接收面是 Pro/Enterprise 档商业价值。 */
2703
+ harnessTelemetryUpload: {
2704
+ tier: "paid",
2705
+ module: "telemetry"
2674
2706
  }
2675
2707
  };
2676
2708
  const FEATURE_KEYS = Object.keys(FeatureRegistry);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allbluecn/kernel",
3
- "version": "0.12.2",
3
+ "version": "0.12.4",
4
4
  "license": "AGPL-3.0-or-later",
5
5
  "type": "module",
6
6
  "description": "AllBlue 插件协议:类型定义 + 构建期装配器(零运行时)",