veryfront 0.1.214 → 0.1.215

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.214",
3
+ "version": "0.1.215",
4
4
  "license": "Apache-2.0",
5
5
  "nodeModulesDir": "auto",
6
6
  "exclude": [
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-loader.d.ts","sourceRoot":"","sources":["../../../src/src/provider/runtime-loader.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAEjE,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;CACjC;AAED,MAAM,WAAW,sBAAsB;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;CACjC;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;CACjC;AAuWD,eAAO,MAAM,+BAA+B,OAAQ,CAAC;AAoDrD,wBAAuB,8BAA8B,CACnD,MAAM,EAAE,aAAa,CAAC,OAAO,CAAC,EAC9B,WAAW,SAAkC,GAC5C,aAAa,CAAC,OAAO,CAAC,CAgJxB;AA+GD,KAAK,YAAY,GAAG,WAA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AgB,4BAA4B,CAC1C,MAAM,EAAE,mBAAmB,EAC3B,OAAO,EAAE,MAAM,GACd,gBAAgB,CA2ClB;AAED,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,mBAAmB,EAC3B,OAAO,EAAE,MAAM,GACd,gBAAgB,CAiDlB"}
@@ -16,13 +16,13 @@ function getToolCallIdFromStreamPart(part) {
16
16
  }
17
17
  return null;
18
18
  }
19
- function collectDueToolStatuses(toolStates, now) {
19
+ function collectDueToolStatuses(toolStates, now, thresholdMs) {
20
20
  const events = [];
21
21
  for (const [toolCallId, state] of toolStates.entries()) {
22
- if (state.dueAt === null || state.dueAt > now || state.lastStatus === "pending_input") {
22
+ if (state.dueAt === null || state.dueAt > now) {
23
23
  continue;
24
24
  }
25
- state.dueAt = null;
25
+ state.dueAt = now + thresholdMs;
26
26
  state.lastStatus = "pending_input";
27
27
  events.push({
28
28
  type: "data-tool-call-status",
@@ -134,12 +134,12 @@ export async function* withToolInputStatusTransitions(stream, thresholdMs = TOOL
134
134
  clearTimeout(timeoutId);
135
135
  }
136
136
  if (timeoutResult.kind === "timeout") {
137
- buffered.push(...collectDueToolStatuses(toolStates, Date.now()));
137
+ buffered.push(...collectDueToolStatuses(toolStates, Date.now(), thresholdMs));
138
138
  continue;
139
139
  }
140
140
  nextPartPromise = null;
141
141
  if (timeoutResult.result.done) {
142
- buffered.push(...collectDueToolStatuses(toolStates, Date.now()));
142
+ buffered.push(...collectDueToolStatuses(toolStates, Date.now(), thresholdMs));
143
143
  while (buffered.length > 0) {
144
144
  yield buffered.shift();
145
145
  }
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.1.214";
1
+ export declare const VERSION = "0.1.215";
2
2
  //# sourceMappingURL=version-constant.d.ts.map
@@ -1,3 +1,3 @@
1
1
  // Keep in sync with deno.json version.
2
2
  // scripts/release.ts updates this constant during releases.
3
- export const VERSION = "0.1.214";
3
+ export const VERSION = "0.1.215";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "veryfront",
3
- "version": "0.1.214",
3
+ "version": "0.1.215",
4
4
  "description": "The simplest way to build AI-powered apps",
5
5
  "keywords": [
6
6
  "react",
package/src/deno.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "veryfront",
3
- "version": "0.1.214",
3
+ "version": "0.1.215",
4
4
  "license": "Apache-2.0",
5
5
  "nodeModulesDir": "auto",
6
6
  "exclude": [
@@ -408,17 +408,18 @@ function getToolCallIdFromStreamPart(part: unknown): string | null {
408
408
  function collectDueToolStatuses(
409
409
  toolStates: Map<string, ToolInputStatusState>,
410
410
  now: number,
411
+ thresholdMs: number,
411
412
  ): Array<{ type: "data-tool-call-status"; data: { toolCallId: string; status: "pending_input" } }> {
412
413
  const events: Array<
413
414
  { type: "data-tool-call-status"; data: { toolCallId: string; status: "pending_input" } }
414
415
  > = [];
415
416
 
416
417
  for (const [toolCallId, state] of toolStates.entries()) {
417
- if (state.dueAt === null || state.dueAt > now || state.lastStatus === "pending_input") {
418
+ if (state.dueAt === null || state.dueAt > now) {
418
419
  continue;
419
420
  }
420
421
 
421
- state.dueAt = null;
422
+ state.dueAt = now + thresholdMs;
422
423
  state.lastStatus = "pending_input";
423
424
  events.push({
424
425
  type: "data-tool-call-status",
@@ -554,13 +555,13 @@ export async function* withToolInputStatusTransitions(
554
555
  }
555
556
 
556
557
  if (timeoutResult.kind === "timeout") {
557
- buffered.push(...collectDueToolStatuses(toolStates, Date.now()));
558
+ buffered.push(...collectDueToolStatuses(toolStates, Date.now(), thresholdMs));
558
559
  continue;
559
560
  }
560
561
 
561
562
  nextPartPromise = null;
562
563
  if (timeoutResult.result.done) {
563
- buffered.push(...collectDueToolStatuses(toolStates, Date.now()));
564
+ buffered.push(...collectDueToolStatuses(toolStates, Date.now(), thresholdMs));
564
565
  while (buffered.length > 0) {
565
566
  yield buffered.shift();
566
567
  }
@@ -1,3 +1,3 @@
1
1
  // Keep in sync with deno.json version.
2
2
  // scripts/release.ts updates this constant during releases.
3
- export const VERSION = "0.1.214";
3
+ export const VERSION = "0.1.215";