@vellumai/assistant 0.4.19 → 0.4.21
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 +1 -1
- package/src/__tests__/system-prompt.test.ts +2 -7
- package/src/__tests__/tool-execution-abort-cleanup.test.ts +0 -1
- package/src/agent/loop.ts +324 -163
- package/src/config/bundled-skills/app-builder/SKILL.md +7 -5
- package/src/config/bundled-skills/app-builder/TOOLS.json +2 -2
- package/src/config/system-prompt.ts +563 -539
- package/src/daemon/session-surfaces.ts +28 -0
- package/src/daemon/session.ts +255 -191
- package/src/daemon/tool-side-effects.ts +3 -13
- package/src/security/secure-keys.ts +27 -3
- package/src/tools/apps/definitions.ts +5 -0
- package/src/tools/apps/executors.ts +18 -22
- package/src/__tests__/response-tier.test.ts +0 -195
- package/src/daemon/response-tier.ts +0 -250
|
@@ -819,6 +819,7 @@ export async function surfaceProxyResolver(
|
|
|
819
819
|
if (toolName === 'app_open') {
|
|
820
820
|
const appId = input.app_id as string;
|
|
821
821
|
const preview = input.preview as DynamicPageSurfaceData['preview'];
|
|
822
|
+
const openMode = input.open_mode as string | undefined;
|
|
822
823
|
const app = getApp(appId);
|
|
823
824
|
if (!app) return { content: `App not found: ${appId}`, isError: true };
|
|
824
825
|
const seededHomeBase = findSeededHomeBaseApp();
|
|
@@ -837,6 +838,33 @@ export async function surfaceProxyResolver(
|
|
|
837
838
|
preview: { ...defaultPreview, ...preview, ...(storedPreview ? { previewImage: storedPreview } : {}) },
|
|
838
839
|
};
|
|
839
840
|
const surfaceId = uuid();
|
|
841
|
+
|
|
842
|
+
if (openMode === 'preview') {
|
|
843
|
+
// Inline-only preview card emitted during app_create — do not open a
|
|
844
|
+
// workspace panel and do not register surface state. The client renders
|
|
845
|
+
// this as a tappable inline card that opens the app on demand.
|
|
846
|
+
ctx.sendToClient({
|
|
847
|
+
type: 'ui_surface_show',
|
|
848
|
+
sessionId: ctx.conversationId,
|
|
849
|
+
surfaceId,
|
|
850
|
+
surfaceType: 'dynamic_page',
|
|
851
|
+
title: app.name,
|
|
852
|
+
data: surfaceData,
|
|
853
|
+
display: 'inline',
|
|
854
|
+
} as UiSurfaceShow);
|
|
855
|
+
|
|
856
|
+
// Track for message persistence so the inline card survives history reload.
|
|
857
|
+
ctx.currentTurnSurfaces.push({
|
|
858
|
+
surfaceId,
|
|
859
|
+
surfaceType: 'dynamic_page',
|
|
860
|
+
title: app.name,
|
|
861
|
+
data: surfaceData,
|
|
862
|
+
display: 'inline',
|
|
863
|
+
});
|
|
864
|
+
|
|
865
|
+
return { content: JSON.stringify({ surfaceId, appId }), isError: false };
|
|
866
|
+
}
|
|
867
|
+
|
|
840
868
|
ctx.surfaceState.set(surfaceId, {
|
|
841
869
|
surfaceType: 'dynamic_page',
|
|
842
870
|
data: surfaceData,
|