@allbluecn/kernel 0.11.0 → 0.12.1
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 +42 -16
- package/dist/index.js +1 -1
- package/dist/{src-CyBj_lD7.js → src-JIal4BUB.js} +29 -7
- package/package.json +2 -2
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-
|
|
2
|
+
import { $ as dumpModules, et as generateAssemblyCode, it as parseProfileImports, ot as resolvePluginOrder, rt as extractPluginLocalNames, tt as generateAssemblyFiles } from "./src-JIal4BUB.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
|
@@ -92,7 +92,20 @@ interface BillingService {
|
|
|
92
92
|
checkSeatAvailability(userId: string): Promise<SeatCheckResult>;
|
|
93
93
|
handleWebhookEvent(rawBody: string, signature: string): Promise<{
|
|
94
94
|
received: boolean;
|
|
95
|
+
alreadyProcessed?: boolean;
|
|
95
96
|
}>;
|
|
97
|
+
/**
|
|
98
|
+
* alreadyProcessed(审计 M13,Pro 端 2026-10-29 起返回):幂等命中的重投事件
|
|
99
|
+
* 如实上报,webhook route 据此跳过幂等门外的邮件链路,防重复收据邮件。
|
|
100
|
+
* optional:旧版 Pro 包不返回该字段,route 按未命中处理(行为不变)。
|
|
101
|
+
*/
|
|
102
|
+
/**
|
|
103
|
+
* S43:邮件链路独立验签(纯签名校验 + 事件解析,不触幂等存储)。
|
|
104
|
+
* optional:OSS stub 不实现(邮件链路同被 gate 拦截),Pro 端实现——
|
|
105
|
+
* sendBillingEmailForEvent 在 JSON.parse 前调用,消除对「上游已验签」
|
|
106
|
+
* 顺序契约的信任依赖。
|
|
107
|
+
*/
|
|
108
|
+
verifyWebhookSignatureRaw?(rawBody: string, signature: string): Promise<unknown>;
|
|
96
109
|
syncSubscription(userId: string): Promise<SubscriptionInfo>;
|
|
97
110
|
getEffectivePlan(userId: string): Promise<{
|
|
98
111
|
planName: string;
|
|
@@ -168,13 +181,6 @@ interface SsoProvider {
|
|
|
168
181
|
}
|
|
169
182
|
interface SsoService {
|
|
170
183
|
listProviders(workspaceId: string): Promise<SsoProvider[]>;
|
|
171
|
-
initiateLogin(providerId: string, returnUrl: string): Promise<{
|
|
172
|
-
url: string;
|
|
173
|
-
}>;
|
|
174
|
-
handleCallback(providerId: string, code: string, state: string): Promise<{
|
|
175
|
-
userId: string;
|
|
176
|
-
workspaceId: string;
|
|
177
|
-
}>;
|
|
178
184
|
}
|
|
179
185
|
//#endregion
|
|
180
186
|
//#region src/pro-contract/audit.d.ts
|
|
@@ -1105,17 +1111,20 @@ declare const FeatureRegistry: {
|
|
|
1105
1111
|
readonly tier: 'paid';
|
|
1106
1112
|
readonly module: null;
|
|
1107
1113
|
};
|
|
1108
|
-
/** 沙箱执行(P3)。module 为 null
|
|
1109
|
-
*
|
|
1110
|
-
*
|
|
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。 */
|
|
1111
1119
|
readonly sandboxExecution: {
|
|
1112
|
-
readonly tier: '
|
|
1120
|
+
readonly tier: 'oss';
|
|
1113
1121
|
readonly module: null;
|
|
1114
1122
|
};
|
|
1115
1123
|
/** 媒体生成(P4c)。module 为 null:媒体生成是开源代码自带的平台能力(TanStack AI adapter 调用),
|
|
1116
|
-
* 仅权益门控。
|
|
1124
|
+
* 仅权益门控。2026-11-07 用户裁决下放免费(harness Phase 0):tier 'oss' 免订阅直接放行,
|
|
1125
|
+
* OSS_BASE_FEATURES 同步收录。desktop BYOK 场景原点式豁免分支保留(幂等)。 */
|
|
1117
1126
|
readonly mediaGeneration: {
|
|
1118
|
-
readonly tier: '
|
|
1127
|
+
readonly tier: 'oss';
|
|
1119
1128
|
readonly module: null;
|
|
1120
1129
|
};
|
|
1121
1130
|
/** BUG 自动 AI 修复(P4)。module 为 null:入队是开源代码自带的平台能力(webhook + MCP 工具链),
|
|
@@ -1236,6 +1245,23 @@ declare const ResourceRegistry: {
|
|
|
1236
1245
|
readonly purchasable: false;
|
|
1237
1246
|
readonly step: 1;
|
|
1238
1247
|
};
|
|
1248
|
+
/** AnyHub 应用安装数(S6)。按 AnyHubApp 行数(含 installing/failed,防滥用
|
|
1249
|
+
* 口径按尝试计)汇总;null 限额 = 不限量(OSS 自部署默认)。 */
|
|
1250
|
+
readonly installQuota: {
|
|
1251
|
+
readonly tier: 'paid';
|
|
1252
|
+
readonly unit: 'installs';
|
|
1253
|
+
readonly purchasable: false;
|
|
1254
|
+
readonly step: 1;
|
|
1255
|
+
};
|
|
1256
|
+
/** 附件 blob 存储配额(S6)。按 Blob.size(userId 归属)求和(MB,1MB=1MiB);
|
|
1257
|
+
* null 限额 = 不限量(OSS 自部署默认)。强制点在 db-blob-store.put(存储汇点,
|
|
1258
|
+
* 覆盖全部上传路径)。 */
|
|
1259
|
+
readonly blobStorageMb: {
|
|
1260
|
+
readonly tier: 'paid';
|
|
1261
|
+
readonly unit: 'MB';
|
|
1262
|
+
readonly purchasable: false;
|
|
1263
|
+
readonly step: 1;
|
|
1264
|
+
};
|
|
1239
1265
|
};
|
|
1240
1266
|
type ResourceKey = keyof typeof ResourceRegistry;
|
|
1241
1267
|
declare const RESOURCE_KEYS: ResourceKey[];
|
|
@@ -1435,9 +1461,9 @@ interface DesignVersionWithPages extends DesignVersionBase {
|
|
|
1435
1461
|
type?: "folder" | "page";
|
|
1436
1462
|
parentId?: string | null;
|
|
1437
1463
|
version: number;
|
|
1438
|
-
pageVersionId?: string | null;
|
|
1439
|
-
canvas?:
|
|
1440
|
-
content?:
|
|
1464
|
+
pageVersionId?: string | null; /** leafer JSON 快照(leafer-json 权威格式) */
|
|
1465
|
+
canvas?: unknown; /** PRD TipTap {html,markdown} */
|
|
1466
|
+
content?: unknown;
|
|
1441
1467
|
isPlaceholder?: boolean;
|
|
1442
1468
|
}[];
|
|
1443
1469
|
}
|
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-
|
|
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-JIal4BUB.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 };
|
|
@@ -2645,17 +2645,20 @@ const FeatureRegistry = {
|
|
|
2645
2645
|
tier: "paid",
|
|
2646
2646
|
module: null
|
|
2647
2647
|
},
|
|
2648
|
-
/** 沙箱执行(P3)。module 为 null
|
|
2649
|
-
*
|
|
2650
|
-
*
|
|
2648
|
+
/** 沙箱执行(P3)。module 为 null:沙箱是开源代码自带的平台能力,仅权益门控。
|
|
2649
|
+
* 2026-11-07 用户裁决下放免费(harness TanStack AI 原生化 Phase 0):tier 'oss'
|
|
2650
|
+
* 免订阅直接放行(testGeneration 同款口径),OSS_BASE_FEATURES 同步收录供客户端
|
|
2651
|
+
* 权益快照。desktop 部署无订阅体系,走 requireFeature 内的点式直放分支(幂等)。
|
|
2652
|
+
* 恢复 Pro 化 = tier 回 'paid' + 移出 OSS_BASE_FEATURES + seed 限额回 0。 */
|
|
2651
2653
|
sandboxExecution: {
|
|
2652
|
-
tier: "
|
|
2654
|
+
tier: "oss",
|
|
2653
2655
|
module: null
|
|
2654
2656
|
},
|
|
2655
2657
|
/** 媒体生成(P4c)。module 为 null:媒体生成是开源代码自带的平台能力(TanStack AI adapter 调用),
|
|
2656
|
-
* 仅权益门控。
|
|
2658
|
+
* 仅权益门控。2026-11-07 用户裁决下放免费(harness Phase 0):tier 'oss' 免订阅直接放行,
|
|
2659
|
+
* OSS_BASE_FEATURES 同步收录。desktop BYOK 场景原点式豁免分支保留(幂等)。 */
|
|
2657
2660
|
mediaGeneration: {
|
|
2658
|
-
tier: "
|
|
2661
|
+
tier: "oss",
|
|
2659
2662
|
module: null
|
|
2660
2663
|
},
|
|
2661
2664
|
/** BUG 自动 AI 修复(P4)。module 为 null:入队是开源代码自带的平台能力(webhook + MCP 工具链),
|
|
@@ -2680,7 +2683,9 @@ const FEATURE_KEYS = Object.keys(FeatureRegistry);
|
|
|
2680
2683
|
const OSS_BASE_FEATURES = [
|
|
2681
2684
|
"byokAi",
|
|
2682
2685
|
"customAgents",
|
|
2683
|
-
"testGeneration"
|
|
2686
|
+
"testGeneration",
|
|
2687
|
+
"sandboxExecution",
|
|
2688
|
+
"mediaGeneration"
|
|
2684
2689
|
];
|
|
2685
2690
|
function isOssFeature(key) {
|
|
2686
2691
|
return FeatureRegistry[key].tier === "oss";
|
|
@@ -2752,6 +2757,23 @@ const ResourceRegistry = {
|
|
|
2752
2757
|
unit: "MB",
|
|
2753
2758
|
purchasable: false,
|
|
2754
2759
|
step: 1
|
|
2760
|
+
},
|
|
2761
|
+
/** AnyHub 应用安装数(S6)。按 AnyHubApp 行数(含 installing/failed,防滥用
|
|
2762
|
+
* 口径按尝试计)汇总;null 限额 = 不限量(OSS 自部署默认)。 */
|
|
2763
|
+
installQuota: {
|
|
2764
|
+
tier: "paid",
|
|
2765
|
+
unit: "installs",
|
|
2766
|
+
purchasable: false,
|
|
2767
|
+
step: 1
|
|
2768
|
+
},
|
|
2769
|
+
/** 附件 blob 存储配额(S6)。按 Blob.size(userId 归属)求和(MB,1MB=1MiB);
|
|
2770
|
+
* null 限额 = 不限量(OSS 自部署默认)。强制点在 db-blob-store.put(存储汇点,
|
|
2771
|
+
* 覆盖全部上传路径)。 */
|
|
2772
|
+
blobStorageMb: {
|
|
2773
|
+
tier: "paid",
|
|
2774
|
+
unit: "MB",
|
|
2775
|
+
purchasable: false,
|
|
2776
|
+
step: 1
|
|
2755
2777
|
}
|
|
2756
2778
|
};
|
|
2757
2779
|
const RESOURCE_KEYS = Object.keys(ResourceRegistry);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allbluecn/kernel",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.1",
|
|
4
4
|
"license": "AGPL-3.0-or-later",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "AllBlue 插件协议:类型定义 + 构建期装配器(零运行时)",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@tanstack/react-router": "^1.168.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@tanstack/ai": "1.
|
|
50
|
+
"@tanstack/ai": "1.2.0",
|
|
51
51
|
"@tanstack/react-router": "1.170.46",
|
|
52
52
|
"@tanstack/react-start": "1.169.4",
|
|
53
53
|
"@types/node": "^24.13.3",
|