@allbluecn/web-app 0.27.34 → 0.27.35
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/package.json
CHANGED
|
@@ -112,7 +112,7 @@ export const SDK_GROUPS: SdkGroup[] = [
|
|
|
112
112
|
"items": [
|
|
113
113
|
{
|
|
114
114
|
"name": "@allbluecn/web-app",
|
|
115
|
-
"version": "v0.27.
|
|
115
|
+
"version": "v0.27.35",
|
|
116
116
|
"lastUpdate": "Nov 10, 2026",
|
|
117
117
|
"source": "apps/web/package.json",
|
|
118
118
|
"docsUrl": "https://github.com/allbluecn/allblue"
|
|
@@ -239,7 +239,7 @@ describe('sandboxExecution/mediaGeneration 下放(2026-11-07,tier oss 直放
|
|
|
239
239
|
expect(mockRequireAuth).not.toHaveBeenCalled()
|
|
240
240
|
})
|
|
241
241
|
|
|
242
|
-
it('desktop
|
|
242
|
+
it('desktop 豁免不扩及非豁免 paid 功能:largePageSize 仍走正常门控', async () => {
|
|
243
243
|
vi.stubEnv('DEPLOY_TARGET', 'desktop')
|
|
244
244
|
|
|
245
245
|
await expect(
|
|
@@ -248,6 +248,42 @@ describe('sandboxExecution/mediaGeneration 下放(2026-11-07,tier oss 直放
|
|
|
248
248
|
})
|
|
249
249
|
})
|
|
250
250
|
|
|
251
|
+
describe('customAgents 桌面豁免(2026-11-10,本地优先:桌面 guest 可建 harnessKind agent)', () => {
|
|
252
|
+
beforeEach(() => {
|
|
253
|
+
vi.clearAllMocks()
|
|
254
|
+
vi.unstubAllEnvs()
|
|
255
|
+
vi.stubEnv('DEPLOY_TARGET', 'web')
|
|
256
|
+
proSvc.billing = null
|
|
257
|
+
proSvc.hostedAi = null
|
|
258
|
+
mockRequireAuth.mockReset()
|
|
259
|
+
mockRequireAuth.mockResolvedValue({ user: { id: 'user-1' } })
|
|
260
|
+
})
|
|
261
|
+
|
|
262
|
+
it('desktop 部署 → customAgents 点式直放(本地 PGlite 存储 + 本地 ACP 执行,guest 可建)', async () => {
|
|
263
|
+
vi.stubEnv('DEPLOY_TARGET', 'desktop')
|
|
264
|
+
|
|
265
|
+
await expect(requireFeature(undefined, 'customAgents')).resolves.toBeUndefined()
|
|
266
|
+
// 与 sandboxExecution 同款:直放在权益解析之前,不查订阅、不需要会话
|
|
267
|
+
expect(mockRequireAuth).not.toHaveBeenCalled()
|
|
268
|
+
})
|
|
269
|
+
|
|
270
|
+
it('web 部署 customAgents 仍走 paid 门控(无权益 → Forbidden)', async () => {
|
|
271
|
+
vi.stubEnv('DEPLOY_TARGET', 'web')
|
|
272
|
+
// web/SaaS 非 desktop:customAgents 是 paid 特性,无权益(plan features 无
|
|
273
|
+
// customAgents)→ FeatureForbiddenError(largePageSize locked 同款口径)
|
|
274
|
+
proSvc.billing = {
|
|
275
|
+
getEffectivePlan: vi.fn().mockResolvedValue({
|
|
276
|
+
planName: 'free',
|
|
277
|
+
features: { customAgents: false },
|
|
278
|
+
}),
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
await expect(
|
|
282
|
+
requireFeature(undefined, 'customAgents'),
|
|
283
|
+
).rejects.toThrow(FeatureForbiddenError)
|
|
284
|
+
})
|
|
285
|
+
})
|
|
286
|
+
|
|
251
287
|
describe('mediaGeneration 门控(P4e 任务 2)', () => {
|
|
252
288
|
beforeEach(() => {
|
|
253
289
|
vi.clearAllMocks()
|
|
@@ -86,11 +86,14 @@ export async function requireFeature(
|
|
|
86
86
|
if (meta.tier === 'oss') return
|
|
87
87
|
|
|
88
88
|
// 点式豁免(P3/P4e):沙箱/媒体生成/AI 生成用例为 desktop 用户 BYOK 自担能力(P4c §8.5 承诺,
|
|
89
|
-
// testcase
|
|
89
|
+
// testcase 生成编排同款口径),桌面端无订阅体系。仅豁免这几个 key——不引入「desktop 全放行」的机制级旁路。
|
|
90
|
+
// customAgents(2026-11-10 用户裁决):自定义 agent 存本地 PGlite、经本地 ACP 执行,是桌面本地优先能力,
|
|
91
|
+
// 桌面未登录(guest)也应可建——否则 harnessKind agent(persona 走 ACP)在桌面 guest 下根本建不出来。
|
|
90
92
|
if (
|
|
91
93
|
(feature === 'sandboxExecution' ||
|
|
92
94
|
feature === 'mediaGeneration' ||
|
|
93
|
-
feature === 'testGeneration'
|
|
95
|
+
feature === 'testGeneration' ||
|
|
96
|
+
feature === 'customAgents') &&
|
|
94
97
|
isDesktopDeployment()
|
|
95
98
|
)
|
|
96
99
|
return
|