@nextclaw/ui 0.22.5 → 0.23.0
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/CHANGELOG.md +11 -0
- package/dist/assets/{api-aEu9cEI8.js → api-n96IfCKb.js} +2 -2
- package/dist/assets/{appearance-settings-page-z4DaHc_E.js → appearance-settings-page-C_AqxSF_.js} +1 -1
- package/dist/assets/{channels-list-page-x07sGqsT.js → channels-list-page-uR-M4Ls8.js} +1 -1
- package/dist/assets/{confirm-dialog-BALTnP33.js → confirm-dialog-CHVBMpla.js} +1 -1
- package/dist/assets/{desktop-capabilities-page-4-v3wKLV.js → desktop-capabilities-page-phMuNq1B.js} +1 -1
- package/dist/assets/{desktop-update-config-Cl-_XHqU.js → desktop-update-config-C77hkbor.js} +1 -1
- package/dist/assets/{extensions-DFQXmSwG.js → extensions-CQKXTqTI.js} +1 -1
- package/dist/assets/{index-zuqzAvNx.js → index-CLw9DuCJ.js} +4 -4
- package/dist/assets/mcp-marketplace-page-CbWOamyW.js +1 -0
- package/dist/assets/{mcp-marketplace-page-COUopIOc.js → mcp-marketplace-page-s9PTnSDT.js} +1 -1
- package/dist/assets/{model-config-page-g9_-hZqZ.js → model-config-page-CxnCUWRW.js} +1 -1
- package/dist/assets/{privacy-settings-page-pNhQQT4r.js → privacy-settings-page-D8HZHHjL.js} +1 -1
- package/dist/assets/{providers-config-page-DftW_6KU.js → providers-config-page-C0GIoGxm.js} +1 -1
- package/dist/assets/remote-DvTCSAxQ.js +1 -0
- package/dist/assets/{runtime-config-page-Cd9sOYvn.js → runtime-config-page-VNJZui5f.js} +1 -1
- package/dist/assets/{search-config-page-BqoDbKpM.js → search-config-page-D3_qNXbB.js} +1 -1
- package/dist/assets/{secrets-config-page-GsahsEVw.js → secrets-config-page-Be4P1E8o.js} +1 -1
- package/dist/assets/security-config-BtcpKIhQ.js +1 -0
- package/dist/assets/{tag-chip-ClBWeQ4p.js → tag-chip-Dc_NcCEe.js} +1 -1
- package/dist/index.html +5 -5
- package/package.json +2 -2
- package/src/features/panel-apps/managers/__tests__/panel-app-bridge.manager.test.ts +51 -0
- package/src/features/panel-apps/managers/panel-app-bridge.manager.ts +37 -2
- package/dist/assets/mcp-marketplace-page-DxPPmYqh.js +0 -1
- package/dist/assets/remote-DS2TkMPm.js +0 -1
- package/dist/assets/security-config-BnHQyrtG.js +0 -1
|
@@ -11,6 +11,9 @@ const mocks = vi.hoisted(() => ({
|
|
|
11
11
|
grantServiceActions: vi.fn(),
|
|
12
12
|
invokeServiceAction: vi.fn(),
|
|
13
13
|
listServiceActions: vi.fn(),
|
|
14
|
+
listVerificationRecords: vi.fn(),
|
|
15
|
+
getPortableRuntimeAcceptanceStatus: vi.fn(),
|
|
16
|
+
exportPortableRuntimeAcceptance: vi.fn(),
|
|
14
17
|
sendAgentMessage: vi.fn(),
|
|
15
18
|
requestAuthorization: vi.fn(),
|
|
16
19
|
}));
|
|
@@ -27,6 +30,9 @@ vi.mock('@/shared/lib/api', () => ({
|
|
|
27
30
|
grantServiceActions: mocks.grantServiceActions,
|
|
28
31
|
invokeServiceAction: mocks.invokeServiceAction,
|
|
29
32
|
listServiceActions: mocks.listServiceActions,
|
|
33
|
+
listVerificationRecords: mocks.listVerificationRecords,
|
|
34
|
+
getPortableRuntimeAcceptanceStatus: mocks.getPortableRuntimeAcceptanceStatus,
|
|
35
|
+
exportPortableRuntimeAcceptance: mocks.exportPortableRuntimeAcceptance,
|
|
30
36
|
revokeServiceAction: vi.fn(),
|
|
31
37
|
},
|
|
32
38
|
},
|
|
@@ -231,4 +237,49 @@ describe('PanelAppBridgeManager', () => {
|
|
|
231
237
|
bridgeSessionToken: 'token-3',
|
|
232
238
|
});
|
|
233
239
|
});
|
|
240
|
+
|
|
241
|
+
it('projects sandbox-safe verification and acceptance reads through the host bridge', async () => {
|
|
242
|
+
const manager = createManager();
|
|
243
|
+
const { postMessage, send } = createIframeHarness(manager);
|
|
244
|
+
mocks.listVerificationRecords.mockResolvedValue({ entries: [{ acceptanceId: 'PRT-ENTRY-001' }] });
|
|
245
|
+
mocks.getPortableRuntimeAcceptanceStatus.mockResolvedValue({ schemaVersion: 1, entries: [] });
|
|
246
|
+
mocks.exportPortableRuntimeAcceptance.mockResolvedValue({ schemaVersion: 1, entries: [] });
|
|
247
|
+
|
|
248
|
+
send({
|
|
249
|
+
method: 'verification.list',
|
|
250
|
+
payload: { appId: 'nextclaw.portable-runtime-lab', limit: 500 },
|
|
251
|
+
requestId: 'verification-1',
|
|
252
|
+
type: 'nextclaw:panel-app-service-actions:request',
|
|
253
|
+
});
|
|
254
|
+
send({
|
|
255
|
+
method: 'acceptance.status',
|
|
256
|
+
payload: { locale: 'zh-CN' },
|
|
257
|
+
requestId: 'acceptance-1',
|
|
258
|
+
type: 'nextclaw:panel-app-service-actions:request',
|
|
259
|
+
});
|
|
260
|
+
send({
|
|
261
|
+
method: 'acceptance.export',
|
|
262
|
+
payload: { locale: 'zh-CN' },
|
|
263
|
+
requestId: 'acceptance-2',
|
|
264
|
+
type: 'nextclaw:panel-app-service-actions:request',
|
|
265
|
+
});
|
|
266
|
+
|
|
267
|
+
await waitFor(() => expect(postMessage).toHaveBeenCalledTimes(3));
|
|
268
|
+
expect(mocks.listVerificationRecords).toHaveBeenCalledWith({
|
|
269
|
+
acceptanceId: undefined,
|
|
270
|
+
appId: 'nextclaw.portable-runtime-lab',
|
|
271
|
+
bridgeSessionToken: 'token-1',
|
|
272
|
+
limit: 500,
|
|
273
|
+
});
|
|
274
|
+
expect(mocks.getPortableRuntimeAcceptanceStatus).toHaveBeenCalledWith({
|
|
275
|
+
appId: undefined,
|
|
276
|
+
bridgeSessionToken: 'token-1',
|
|
277
|
+
locale: 'zh-CN',
|
|
278
|
+
});
|
|
279
|
+
expect(mocks.exportPortableRuntimeAcceptance).toHaveBeenCalledWith({
|
|
280
|
+
appId: undefined,
|
|
281
|
+
bridgeSessionToken: 'token-1',
|
|
282
|
+
locale: 'zh-CN',
|
|
283
|
+
});
|
|
284
|
+
});
|
|
234
285
|
});
|
|
@@ -9,6 +9,9 @@ import type {
|
|
|
9
9
|
ServiceActionGrantView,
|
|
10
10
|
ServiceActionInvokeResultView,
|
|
11
11
|
ServiceActionListView,
|
|
12
|
+
PortableRuntimeAcceptanceExportApiView,
|
|
13
|
+
PortableRuntimeAcceptanceStatusApiView,
|
|
14
|
+
RuntimeVerificationRecordListView,
|
|
12
15
|
} from '@nextclaw/client-sdk';
|
|
13
16
|
import type { ServiceActionAuthorizationManager } from '@/features/service-apps';
|
|
14
17
|
import { nextclawClient } from '@/shared/lib/api';
|
|
@@ -26,13 +29,20 @@ type PanelAppBridgeRequest = {
|
|
|
26
29
|
method:
|
|
27
30
|
| 'agent.generateObject'
|
|
28
31
|
| 'agent.send'
|
|
32
|
+
| 'acceptance.export'
|
|
33
|
+
| 'acceptance.status'
|
|
29
34
|
| 'invoke'
|
|
30
35
|
| 'list'
|
|
31
36
|
| 'requestGrant'
|
|
32
|
-
| 'revokeGrant'
|
|
37
|
+
| 'revokeGrant'
|
|
38
|
+
| 'verification.list';
|
|
33
39
|
payload?: {
|
|
40
|
+
acceptanceId?: string;
|
|
34
41
|
actionId?: string;
|
|
42
|
+
appId?: string;
|
|
35
43
|
input?: unknown;
|
|
44
|
+
limit?: number;
|
|
45
|
+
locale?: string;
|
|
36
46
|
request?: unknown;
|
|
37
47
|
};
|
|
38
48
|
};
|
|
@@ -103,6 +113,9 @@ export class PanelAppBridgeManager {
|
|
|
103
113
|
| PanelAppAgentGenerateObjectResultView
|
|
104
114
|
| PanelAppAgentSendResultView
|
|
105
115
|
| PanelAppCapabilityGrantView
|
|
116
|
+
| PortableRuntimeAcceptanceExportApiView
|
|
117
|
+
| PortableRuntimeAcceptanceStatusApiView
|
|
118
|
+
| RuntimeVerificationRecordListView
|
|
106
119
|
| ServiceActionGrantView
|
|
107
120
|
| ServiceActionInvokeResultView
|
|
108
121
|
| ServiceActionListView
|
|
@@ -126,6 +139,25 @@ export class PanelAppBridgeManager {
|
|
|
126
139
|
return await this.sendAgentMessageWithAuthorization(session, request);
|
|
127
140
|
case 'agent.generateObject':
|
|
128
141
|
return await this.generateAgentObjectWithAuthorization(session, request);
|
|
142
|
+
case 'verification.list':
|
|
143
|
+
return await nextclawClient.serviceApps.listVerificationRecords({
|
|
144
|
+
acceptanceId: request.payload?.acceptanceId,
|
|
145
|
+
appId: request.payload?.appId,
|
|
146
|
+
limit: request.payload?.limit,
|
|
147
|
+
bridgeSessionToken: session.token,
|
|
148
|
+
});
|
|
149
|
+
case 'acceptance.status':
|
|
150
|
+
return await nextclawClient.serviceApps.getPortableRuntimeAcceptanceStatus({
|
|
151
|
+
appId: request.payload?.appId,
|
|
152
|
+
locale: request.payload?.locale,
|
|
153
|
+
bridgeSessionToken: session.token,
|
|
154
|
+
});
|
|
155
|
+
case 'acceptance.export':
|
|
156
|
+
return await nextclawClient.serviceApps.exportPortableRuntimeAcceptance({
|
|
157
|
+
appId: request.payload?.appId,
|
|
158
|
+
locale: request.payload?.locale,
|
|
159
|
+
bridgeSessionToken: session.token,
|
|
160
|
+
});
|
|
129
161
|
default:
|
|
130
162
|
throw new Error(`Unsupported panel bridge method: ${String(request.method)}`);
|
|
131
163
|
}
|
|
@@ -378,9 +410,12 @@ export class PanelAppBridgeManager {
|
|
|
378
410
|
(candidate.method === 'invoke' ||
|
|
379
411
|
candidate.method === 'agent.send' ||
|
|
380
412
|
candidate.method === 'agent.generateObject' ||
|
|
413
|
+
candidate.method === 'acceptance.export' ||
|
|
414
|
+
candidate.method === 'acceptance.status' ||
|
|
381
415
|
candidate.method === 'list' ||
|
|
382
416
|
candidate.method === 'requestGrant' ||
|
|
383
|
-
candidate.method === 'revokeGrant'
|
|
417
|
+
candidate.method === 'revokeGrant' ||
|
|
418
|
+
candidate.method === 'verification.list')
|
|
384
419
|
);
|
|
385
420
|
};
|
|
386
421
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./mcp-marketplace-page-COUopIOc.js";export{e as McpMarketplacePage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ft as e}from"./index-zuqzAvNx.js";export{e as RemoteAccessPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Rt as e}from"./api-aEu9cEI8.js";export{e as SecurityConfig};
|