veryfront 0.1.799 → 0.1.800

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/esm/deno.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "veryfront",
3
- "version": "0.1.799",
3
+ "version": "0.1.800",
4
4
  "license": "Apache-2.0",
5
5
  "nodeModulesDir": "auto",
6
6
  "minimumDependencyAge": {
@@ -1 +1 @@
1
- {"version":3,"file":"text-generation-runtime-message-converter.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/runtime/text-generation-runtime-message-converter.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAGV,4BAA4B,EAK7B,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAGL,KAAK,OAAO,EAGb,MAAM,aAAa,CAAC;AAwMrB;;GAEG;AACH,wBAAgB,qCAAqC,CACnD,GAAG,EAAE,OAAO,EACZ,OAAO,GAAE;IAAE,2BAA2B,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAAO,GAC1D,4BAA4B,CAgG9B;AAuHD;;GAEG;AACH,wBAAgB,sCAAsC,CACpD,QAAQ,EAAE,OAAO,EAAE,GAClB,4BAA4B,EAAE,CAyChC"}
1
+ {"version":3,"file":"text-generation-runtime-message-converter.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/runtime/text-generation-runtime-message-converter.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAGV,4BAA4B,EAK7B,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAAsC,KAAK,OAAO,EAAqB,MAAM,aAAa,CAAC;AAwMlG;;GAEG;AACH,wBAAgB,qCAAqC,CACnD,GAAG,EAAE,OAAO,EACZ,OAAO,GAAE;IAAE,2BAA2B,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAAO,GAC1D,4BAA4B,CA6F9B;AAuHD;;GAEG;AACH,wBAAgB,sCAAsC,CACpD,QAAQ,EAAE,OAAO,EAAE,GAClB,4BAA4B,EAAE,CAyChC"}
@@ -7,7 +7,7 @@
7
7
  * @module ai/agent/runtime/text-generation-runtime-message-converter
8
8
  */
9
9
  import { buildDataFileAnnotation } from "../../chat/types.js";
10
- import { getTextFromParts, getToolArguments, } from "../types.js";
10
+ import { getTextFromParts, getToolArguments } from "../types.js";
11
11
  function getStringPartField(part, key) {
12
12
  if (!part || typeof part !== "object" || Array.isArray(part))
13
13
  return undefined;
@@ -228,19 +228,15 @@ export function convertToTextGenerationRuntimeMessage(msg, options = {}) {
228
228
  }
229
229
  case "tool": {
230
230
  const content = [];
231
+ const toolNamesById = new Map();
231
232
  for (const part of msg.parts) {
232
- if (part.type !== "tool-result")
233
- continue;
234
- const resultPart = part;
235
- if (shouldSkipProviderExecutedToolResult(resultPart, providerExecutedToolCallIds)) {
233
+ if (shouldSkipProviderExecutedToolResult(part, providerExecutedToolCallIds)) {
236
234
  continue;
237
235
  }
238
- content.push({
239
- type: "tool-result",
240
- toolCallId: resultPart.toolCallId,
241
- toolName: resultPart.toolName ?? "unknown",
242
- output: { type: "json", value: resultPart.result },
243
- });
236
+ const toolResultPart = getTextGenerationToolResultPart(part, toolNamesById);
237
+ if (toolResultPart) {
238
+ content.push(toolResultPart);
239
+ }
244
240
  }
245
241
  const toolMessage = { role: "tool", content };
246
242
  return toolMessage;
@@ -1 +1 @@
1
- {"version":3,"file":"html-shell-generator.d.ts","sourceRoot":"","sources":["../../../src/src/html/html-shell-generator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AA2BxE,OAAO,EAGL,aAAa,EACd,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAqCxD,KAAK,gBAAgB,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC,GAAG,IAAI,CA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AAkB,CAAC,EAAE,MAAM,EAC3B,iBAAiB,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAC5C,OAAO,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,CAmBzC;AAqRD,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,cAAc,EACpB,OAAO,EAAE,qBAAqB,EAC9B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,EAC1C,KAAK,CAAC,EAAE,cAAc,EACtB,iBAAiB,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAC5C,OAAO,CAAC,MAAM,CAAC,CAoBjB"}
@@ -135,11 +135,12 @@ async function generateHTMLShellPartsImpl(meta, options, params, props, contentF
135
135
  // Enable dev scripts for local dev OR preview mode (for HMR support in Studio),
136
136
  // unless a caller explicitly forces production client scripts for fair benchmarking.
137
137
  const useDevScripts = !options.forceProductionScripts && (isLocalProject || isPreviewMode);
138
+ const explicitReleaseManifest = options
139
+ .releaseAssetManifest;
138
140
  const releaseManifest = options.studioEmbed
139
141
  ? null
140
- : "releaseAssetManifest" in options
141
- ? options
142
- .releaseAssetManifest ?? null
142
+ : explicitReleaseManifest !== undefined
143
+ ? explicitReleaseManifest
143
144
  : await profilePhase("html.release_asset_manifest", () => getReadyManifestForRenderAsync(options.releaseId));
144
145
  const importMapPromise = buildImportMap({
145
146
  projectDir: options.projectDir,
@@ -1 +1 @@
1
- {"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../../../../src/src/rendering/orchestrator/html.ts"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAClF,YAAY,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AA4ElF,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAsB;gBAExB,MAAM,EAAE,mBAAmB;IAIjC,gBAAgB,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,MAAM,CAAC;IA0BjE,kBAAkB,CACtB,WAAW,EAAE,cAAc,EAC3B,OAAO,EAAE,IAAI,CAAC,qBAAqB,EAAE,MAAM,CAAC,GAC3C,OAAO,CAAC,cAAc,CAAC;YAqEZ,sBAAsB;YAsDtB,4BAA4B;YAiB5B,wBAAwB;YAmBxB,gBAAgB;YAyBhB,kBAAkB;IAwDhC,OAAO,CAAC,cAAc;YAQR,eAAe;YAaf,gBAAgB;IAkF9B;;;;OAIG;YACW,gBAAgB;CAc/B"}
1
+ {"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../../../../src/src/rendering/orchestrator/html.ts"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAClF,YAAY,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AA+FlF,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAsB;gBAExB,MAAM,EAAE,mBAAmB;IAIjC,gBAAgB,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,MAAM,CAAC;IA0BjE,kBAAkB,CACtB,WAAW,EAAE,cAAc,EAC3B,OAAO,EAAE,IAAI,CAAC,qBAAqB,EAAE,MAAM,CAAC,GAC3C,OAAO,CAAC,cAAc,CAAC;YAqEZ,sBAAsB;YAuDtB,4BAA4B;YAiB5B,wBAAwB;YAmBxB,gBAAgB;YAyBhB,kBAAkB;IAwDhC,OAAO,CAAC,cAAc;YAQR,eAAe;YAaf,gBAAgB;IAoF9B;;;;OAIG;YACW,gBAAgB;CAc/B"}
@@ -7,6 +7,7 @@ import { addNonceToHtmlTags } from "../../html/nonce-injection.js";
7
7
  import { injectElementSelectors } from "../../studio/element-selector-injector.js";
8
8
  import { computeSourceHash } from "../../studio/hash-utils.js";
9
9
  import { extractRelativePath } from "../../utils/route-path-utils.js";
10
+ import { getReadyManifestForRenderAsync } from "../../release-assets/manifest-cache.js";
10
11
  import { resolveAppComponentPath } from "../layouts/utils/app-resolver.js";
11
12
  import { StreamTimeoutError, streamToString } from "../utils/stream-utils.js";
12
13
  import { profilePhase, profileSyncPhase } from "../../observability/request-profiler.js";
@@ -29,6 +30,13 @@ function resolveReleaseId(options) {
29
30
  return source.slice("release-".length);
30
31
  return undefined;
31
32
  }
33
+ async function resolveReleaseAssetManifestForHTML(options) {
34
+ if (options?.studioEmbed)
35
+ return null;
36
+ if (options?.releaseAssetManifest !== undefined)
37
+ return options.releaseAssetManifest;
38
+ return await profilePhase("html.release_asset_manifest", () => getReadyManifestForRenderAsync(resolveReleaseId(options)));
39
+ }
32
40
  function applyExplicitThemeToDocument(html, colorScheme, enabled) {
33
41
  if (!enabled || !colorScheme)
34
42
  return html;
@@ -137,14 +145,15 @@ export class HTMLGenerator {
137
145
  async handleFullHTMLDocument(context, projectCSSPromise) {
138
146
  const metadata = extractHTMLMetadata((context.pageInfo.entity.frontmatter || {}), (context.layoutBundle?.frontmatter || {}));
139
147
  const pagePath = context.pageInfo.entity.path;
140
- const [isClientPage, importMapJson] = await Promise.all([
148
+ const [isClientPage, releaseAssetManifest] = await Promise.all([
141
149
  this.detectUseClientDirective(pagePath),
142
- buildImportMapJson({
143
- projectDir: this.config.projectDir,
144
- config: this.config.config,
145
- releaseAssetManifest: context.options?.releaseAssetManifest,
146
- }),
150
+ resolveReleaseAssetManifestForHTML(context.options),
147
151
  ]);
152
+ const importMapJson = await buildImportMapJson({
153
+ projectDir: this.config.projectDir,
154
+ config: this.config.config,
155
+ releaseAssetManifest,
156
+ });
148
157
  const themedHtml = injectThemePersistenceScript(applyExplicitThemeToDocument(context.html, context.options?.colorScheme, context.options?.colorSchemeFromParam), context.options?.colorScheme, context.options?.colorSchemeFromParam, context.options?.nonce);
149
158
  const projectStylesheetHref = await this.resolveProjectStylesheetHref(context, projectCSSPromise);
150
159
  const injectedHtml = injectHTMLContent(themedHtml, "", metadata, {
@@ -307,7 +316,9 @@ export class HTMLGenerator {
307
316
  isLocalProject: this.config.mode === "development",
308
317
  noHmr: context.options?.noHmr,
309
318
  forceProductionScripts: context.options?.forceProductionScripts,
310
- releaseAssetManifest: context.options?.releaseAssetManifest,
319
+ ...(context.options?.releaseAssetManifest !== undefined
320
+ ? { releaseAssetManifest: context.options.releaseAssetManifest }
321
+ : {}),
311
322
  }));
312
323
  }
313
324
  /**
@@ -186,8 +186,8 @@ export class Renderer {
186
186
  });
187
187
  }
188
188
  async resolveReleaseAssetManifest(ctx, options) {
189
- if (options && "releaseAssetManifest" in options) {
190
- return options.releaseAssetManifest ?? null;
189
+ if (options?.releaseAssetManifest !== undefined) {
190
+ return options.releaseAssetManifest;
191
191
  }
192
192
  if (options?.studioEmbed || ctx.environment !== "production")
193
193
  return null;
@@ -1,3 +1,3 @@
1
1
  /** Shared version value. */
2
- export declare const VERSION = "0.1.799";
2
+ export declare const VERSION = "0.1.800";
3
3
  //# sourceMappingURL=version-constant.d.ts.map
@@ -1,4 +1,4 @@
1
1
  // Keep in sync with deno.json version.
2
2
  // scripts/release.ts updates this constant during releases.
3
3
  /** Shared version value. */
4
- export const VERSION = "0.1.799";
4
+ export const VERSION = "0.1.800";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "veryfront",
3
- "version": "0.1.799",
3
+ "version": "0.1.800",
4
4
  "description": "The simplest way to build AI-powered apps",
5
5
  "keywords": [
6
6
  "react",