@allbluecn/kernel 0.12.0 → 0.12.2
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 +15 -13
- package/dist/index.js +1 -1
- package/dist/{src-DfASzRKC.js → src-yc_A73De.js} +22 -20
- package/package.json +9 -7
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-yc_A73De.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,13 @@ 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
|
+
*/
|
|
96
102
|
/**
|
|
97
103
|
* S43:邮件链路独立验签(纯签名校验 + 事件解析,不触幂等存储)。
|
|
98
104
|
* optional:OSS stub 不实现(邮件链路同被 gate 拦截),Pro 端实现——
|
|
@@ -175,13 +181,6 @@ interface SsoProvider {
|
|
|
175
181
|
}
|
|
176
182
|
interface SsoService {
|
|
177
183
|
listProviders(workspaceId: string): Promise<SsoProvider[]>;
|
|
178
|
-
initiateLogin(providerId: string, returnUrl: string): Promise<{
|
|
179
|
-
url: string;
|
|
180
|
-
}>;
|
|
181
|
-
handleCallback(providerId: string, code: string, state: string): Promise<{
|
|
182
|
-
userId: string;
|
|
183
|
-
workspaceId: string;
|
|
184
|
-
}>;
|
|
185
184
|
}
|
|
186
185
|
//#endregion
|
|
187
186
|
//#region src/pro-contract/audit.d.ts
|
|
@@ -1112,17 +1111,20 @@ declare const FeatureRegistry: {
|
|
|
1112
1111
|
readonly tier: 'paid';
|
|
1113
1112
|
readonly module: null;
|
|
1114
1113
|
};
|
|
1115
|
-
/** 沙箱执行(P3)。module 为 null
|
|
1116
|
-
*
|
|
1117
|
-
*
|
|
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。 */
|
|
1118
1119
|
readonly sandboxExecution: {
|
|
1119
|
-
readonly tier: '
|
|
1120
|
+
readonly tier: 'oss';
|
|
1120
1121
|
readonly module: null;
|
|
1121
1122
|
};
|
|
1122
1123
|
/** 媒体生成(P4c)。module 为 null:媒体生成是开源代码自带的平台能力(TanStack AI adapter 调用),
|
|
1123
|
-
* 仅权益门控。
|
|
1124
|
+
* 仅权益门控。2026-11-07 用户裁决下放免费(harness Phase 0):tier 'oss' 免订阅直接放行,
|
|
1125
|
+
* OSS_BASE_FEATURES 同步收录。desktop BYOK 场景原点式豁免分支保留(幂等)。 */
|
|
1124
1126
|
readonly mediaGeneration: {
|
|
1125
|
-
readonly tier: '
|
|
1127
|
+
readonly tier: 'oss';
|
|
1126
1128
|
readonly module: null;
|
|
1127
1129
|
};
|
|
1128
1130
|
/** BUG 自动 AI 修复(P4)。module 为 null:入队是开源代码自带的平台能力(webhook + MCP 工具链),
|
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-yc_A73De.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 };
|
|
@@ -1482,7 +1482,7 @@ const PROMPT_DEFINITIONS = [
|
|
|
1482
1482
|
{
|
|
1483
1483
|
key: "story.generate",
|
|
1484
1484
|
name: "需求生成",
|
|
1485
|
-
description: "敏捷需求分析师:生成/拆解 Story(
|
|
1485
|
+
description: "敏捷需求分析师:生成/拆解 Story(JSON 结构化输出)",
|
|
1486
1486
|
sections: [
|
|
1487
1487
|
{
|
|
1488
1488
|
id: "role",
|
|
@@ -1493,12 +1493,12 @@ const PROMPT_DEFINITIONS = [
|
|
|
1493
1493
|
id: "rules",
|
|
1494
1494
|
order: 2,
|
|
1495
1495
|
template: `输出要求(严格遵守):
|
|
1496
|
-
1.
|
|
1497
|
-
2.
|
|
1496
|
+
1. 输出一个 JSON 对象:{"items":[...]},items 为 2-5 个需求对象的数组。
|
|
1497
|
+
2. 每个需求对象仅允许字段:name(必填,2-50 字)。
|
|
1498
1498
|
3. 可选字段:description、priority、labelNames。
|
|
1499
1499
|
4. priority 仅限:urgent | high | medium | low | none。
|
|
1500
1500
|
5. {{labelHint}}。
|
|
1501
|
-
6. 不要使用 markdown
|
|
1501
|
+
6. 不要使用 markdown 代码块包裹,不要输出其他解释文字。`
|
|
1502
1502
|
},
|
|
1503
1503
|
{
|
|
1504
1504
|
id: "parent-story",
|
|
@@ -1642,16 +1642,16 @@ const PROMPT_DEFINITIONS = [
|
|
|
1642
1642
|
{
|
|
1643
1643
|
key: "design.prototype.stream",
|
|
1644
1644
|
name: "设计稿流式生成",
|
|
1645
|
-
description: "以
|
|
1645
|
+
description: "以 ops 数组 JSON 对象协议输出画布操作流(frame/nodes/replace/done),供 SSE 路由 /api/design/prototype 消费",
|
|
1646
1646
|
sections: [{
|
|
1647
1647
|
id: "contract",
|
|
1648
1648
|
order: 1,
|
|
1649
|
-
template:
|
|
1649
|
+
template: `你是设计画布流式生成助手。根据用户的自然语言描述,输出一个 JSON 对象,形如 {"ops":[...]},ops 数组按时间序包含画布操作。
|
|
1650
1650
|
|
|
1651
1651
|
【输出契约(必须严格遵守)】
|
|
1652
|
-
1.
|
|
1653
|
-
2.
|
|
1654
|
-
{"op":"frame","node":{
|
|
1652
|
+
1. 只输出一个 JSON 对象:{"ops":[操作, 操作, ...]};不要输出 markdown 代码块标记,不要输出任何解释文字
|
|
1653
|
+
2. 每个操作只能是以下四种之一:
|
|
1654
|
+
{"op":"frame","node":{...}}
|
|
1655
1655
|
{"op":"nodes","nodes":[{...},{...}]}
|
|
1656
1656
|
{"op":"replace","removeIds":["节点id"],"nodes":[{...}]}
|
|
1657
1657
|
{"op":"done","message":"给用户的中文完成说明"}
|
|
@@ -1682,10 +1682,7 @@ const PROMPT_DEFINITIONS = [
|
|
|
1682
1682
|
示例:
|
|
1683
1683
|
用户:一个登录页
|
|
1684
1684
|
输出:
|
|
1685
|
-
{"op":"frame","node":{"name":"登录页","x":0,"y":0,"width":375,"height":812}}
|
|
1686
|
-
{"op":"nodes","nodes":[{"type":"text","name":"标题","x":24,"y":60,"width":200,"height":32,"props":{"text":"欢迎回来"}},{"type":"input","name":"用户名","x":16,"y":120,"width":343,"height":40,"props":{"text":"用户名"}}]}
|
|
1687
|
-
{"op":"nodes","nodes":[{"type":"input","name":"密码","x":16,"y":176,"width":343,"height":40,"props":{"text":"密码"}},{"type":"button","name":"登录","x":16,"y":240,"width":343,"height":44,"props":{"text":"登录"}}]}
|
|
1688
|
-
{"op":"done","message":"已生成登录页:标题、两个输入框与主按钮"}`
|
|
1685
|
+
{"ops":[{"op":"frame","node":{"name":"登录页","x":0,"y":0,"width":375,"height":812}},{"op":"nodes","nodes":[{"type":"text","name":"标题","x":24,"y":60,"width":200,"height":32,"props":{"text":"欢迎回来"}},{"type":"input","name":"用户名","x":16,"y":120,"width":343,"height":40,"props":{"text":"用户名"}}]},{"op":"nodes","nodes":[{"type":"input","name":"密码","x":16,"y":176,"width":343,"height":40,"props":{"text":"密码"}},{"type":"button","name":"登录","x":16,"y":240,"width":343,"height":44,"props":{"text":"登录"}}]},{"op":"done","message":"已生成登录页:标题、两个输入框与主按钮"}]}`
|
|
1689
1686
|
}],
|
|
1690
1687
|
variables: [
|
|
1691
1688
|
{
|
|
@@ -2645,17 +2642,20 @@ const FeatureRegistry = {
|
|
|
2645
2642
|
tier: "paid",
|
|
2646
2643
|
module: null
|
|
2647
2644
|
},
|
|
2648
|
-
/** 沙箱执行(P3)。module 为 null
|
|
2649
|
-
*
|
|
2650
|
-
*
|
|
2645
|
+
/** 沙箱执行(P3)。module 为 null:沙箱是开源代码自带的平台能力,仅权益门控。
|
|
2646
|
+
* 2026-11-07 用户裁决下放免费(harness TanStack AI 原生化 Phase 0):tier 'oss'
|
|
2647
|
+
* 免订阅直接放行(testGeneration 同款口径),OSS_BASE_FEATURES 同步收录供客户端
|
|
2648
|
+
* 权益快照。desktop 部署无订阅体系,走 requireFeature 内的点式直放分支(幂等)。
|
|
2649
|
+
* 恢复 Pro 化 = tier 回 'paid' + 移出 OSS_BASE_FEATURES + seed 限额回 0。 */
|
|
2651
2650
|
sandboxExecution: {
|
|
2652
|
-
tier: "
|
|
2651
|
+
tier: "oss",
|
|
2653
2652
|
module: null
|
|
2654
2653
|
},
|
|
2655
2654
|
/** 媒体生成(P4c)。module 为 null:媒体生成是开源代码自带的平台能力(TanStack AI adapter 调用),
|
|
2656
|
-
* 仅权益门控。
|
|
2655
|
+
* 仅权益门控。2026-11-07 用户裁决下放免费(harness Phase 0):tier 'oss' 免订阅直接放行,
|
|
2656
|
+
* OSS_BASE_FEATURES 同步收录。desktop BYOK 场景原点式豁免分支保留(幂等)。 */
|
|
2657
2657
|
mediaGeneration: {
|
|
2658
|
-
tier: "
|
|
2658
|
+
tier: "oss",
|
|
2659
2659
|
module: null
|
|
2660
2660
|
},
|
|
2661
2661
|
/** BUG 自动 AI 修复(P4)。module 为 null:入队是开源代码自带的平台能力(webhook + MCP 工具链),
|
|
@@ -2680,7 +2680,9 @@ const FEATURE_KEYS = Object.keys(FeatureRegistry);
|
|
|
2680
2680
|
const OSS_BASE_FEATURES = [
|
|
2681
2681
|
"byokAi",
|
|
2682
2682
|
"customAgents",
|
|
2683
|
-
"testGeneration"
|
|
2683
|
+
"testGeneration",
|
|
2684
|
+
"sandboxExecution",
|
|
2685
|
+
"mediaGeneration"
|
|
2684
2686
|
];
|
|
2685
2687
|
function isOssFeature(key) {
|
|
2686
2688
|
return FeatureRegistry[key].tier === "oss";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allbluecn/kernel",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.2",
|
|
4
4
|
"license": "AGPL-3.0-or-later",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "AllBlue 插件协议:类型定义 + 构建期装配器(零运行时)",
|
|
@@ -39,18 +39,20 @@
|
|
|
39
39
|
"dist"
|
|
40
40
|
],
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@tanstack/ai": "^
|
|
43
|
-
"@tanstack/
|
|
42
|
+
"@tanstack/ai": "^1.8.0",
|
|
43
|
+
"@tanstack/ai-openai": "^1.2.0",
|
|
44
|
+
"@tanstack/react-start": "^1.169.7",
|
|
44
45
|
"react": "^19",
|
|
45
46
|
"lucide-react": "^1.47.0",
|
|
46
47
|
"zod": "^3.25 || ^4",
|
|
47
|
-
"@tanstack/react-router": "^1.
|
|
48
|
+
"@tanstack/react-router": "^1.170.46"
|
|
48
49
|
},
|
|
49
50
|
"devDependencies": {
|
|
50
|
-
"@tanstack/ai": "1.
|
|
51
|
+
"@tanstack/ai": "1.8.0",
|
|
52
|
+
"@tanstack/ai-openai": "1.2.0",
|
|
51
53
|
"@tanstack/react-router": "1.170.46",
|
|
52
|
-
"@tanstack/react-start": "1.169.
|
|
53
|
-
"@types/node": "^
|
|
54
|
+
"@tanstack/react-start": "1.169.7",
|
|
55
|
+
"@types/node": "^26.6.6",
|
|
54
56
|
"@types/react": "^19",
|
|
55
57
|
"lucide-react": "^1.47.0",
|
|
56
58
|
"react": "^19",
|