veryfront 0.1.217 → 0.1.219

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.
Files changed (66) hide show
  1. package/esm/cli/commands/init/config-generator.d.ts +13 -1
  2. package/esm/cli/commands/init/config-generator.d.ts.map +1 -1
  3. package/esm/cli/commands/init/config-generator.js +15 -1
  4. package/esm/cli/commands/init/init-command.d.ts.map +1 -1
  5. package/esm/cli/commands/init/init-command.js +9 -2
  6. package/esm/deno.d.ts +1 -3
  7. package/esm/deno.js +6 -5
  8. package/esm/src/agent/ag-ui-detached-start.d.ts +84 -0
  9. package/esm/src/agent/ag-ui-detached-start.d.ts.map +1 -0
  10. package/esm/src/agent/ag-ui-detached-start.js +273 -0
  11. package/esm/src/agent/index.d.ts +1 -0
  12. package/esm/src/agent/index.d.ts.map +1 -1
  13. package/esm/src/agent/index.js +1 -0
  14. package/esm/src/extensions/interfaces/auth-provider.d.ts +30 -3
  15. package/esm/src/extensions/interfaces/auth-provider.d.ts.map +1 -1
  16. package/esm/src/extensions/interfaces/index.d.ts +2 -1
  17. package/esm/src/extensions/interfaces/index.d.ts.map +1 -1
  18. package/esm/src/extensions/interfaces/token-cache-store.d.ts +56 -0
  19. package/esm/src/extensions/interfaces/token-cache-store.d.ts.map +1 -0
  20. package/esm/src/extensions/interfaces/token-cache-store.js +12 -0
  21. package/esm/src/extensions/recommendations.d.ts.map +1 -1
  22. package/esm/src/extensions/recommendations.js +1 -0
  23. package/esm/src/integrations/_data.js +1 -1
  24. package/esm/src/integrations/schema.d.ts +1 -0
  25. package/esm/src/integrations/schema.d.ts.map +1 -1
  26. package/esm/src/integrations/schema.js +8 -0
  27. package/esm/src/proxy/cache/index.d.ts +1 -1
  28. package/esm/src/proxy/cache/index.d.ts.map +1 -1
  29. package/esm/src/proxy/cache/index.js +25 -15
  30. package/esm/src/proxy/cache/tracing-cache.d.ts +31 -0
  31. package/esm/src/proxy/cache/tracing-cache.d.ts.map +1 -0
  32. package/esm/src/proxy/cache/tracing-cache.js +44 -0
  33. package/esm/src/proxy/cache/types.d.ts +1 -1
  34. package/esm/src/proxy/cache/types.js +1 -1
  35. package/esm/src/proxy/handler.d.ts +7 -0
  36. package/esm/src/proxy/handler.d.ts.map +1 -1
  37. package/esm/src/proxy/handler.js +50 -29
  38. package/esm/src/server/runtime-handler/request-tracker.d.ts.map +1 -1
  39. package/esm/src/server/runtime-handler/request-tracker.js +5 -6
  40. package/esm/src/server/runtime-handler/request-utils.d.ts.map +1 -1
  41. package/esm/src/server/runtime-handler/request-utils.js +1 -0
  42. package/esm/src/utils/version-constant.d.ts +1 -1
  43. package/esm/src/utils/version-constant.js +1 -1
  44. package/package.json +66 -35
  45. package/src/cli/commands/init/config-generator.ts +33 -0
  46. package/src/cli/commands/init/init-command.ts +9 -2
  47. package/src/deno.js +6 -5
  48. package/src/src/agent/ag-ui-detached-start.ts +397 -0
  49. package/src/src/agent/index.ts +8 -0
  50. package/src/src/extensions/interfaces/auth-provider.ts +35 -3
  51. package/src/src/extensions/interfaces/index.ts +10 -1
  52. package/src/src/extensions/interfaces/token-cache-store.ts +58 -0
  53. package/src/src/extensions/recommendations.ts +1 -0
  54. package/src/src/integrations/_data.ts +1 -1
  55. package/src/src/integrations/schema.ts +8 -0
  56. package/src/src/proxy/cache/index.ts +27 -15
  57. package/src/src/proxy/cache/tracing-cache.ts +77 -0
  58. package/src/src/proxy/cache/types.ts +1 -1
  59. package/src/src/proxy/handler.ts +57 -31
  60. package/src/src/server/runtime-handler/request-tracker.ts +5 -7
  61. package/src/src/server/runtime-handler/request-utils.ts +1 -0
  62. package/src/src/utils/version-constant.ts +1 -1
  63. package/esm/src/proxy/cache/redis-cache.d.ts +0 -25
  64. package/esm/src/proxy/cache/redis-cache.d.ts.map +0 -1
  65. package/esm/src/proxy/cache/redis-cache.js +0 -219
  66. package/src/src/proxy/cache/redis-cache.ts +0 -255
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "veryfront",
3
- "version": "0.1.217",
3
+ "version": "0.1.219",
4
4
  "description": "The simplest way to build AI-powered apps",
5
5
  "keywords": [
6
6
  "react",
@@ -26,100 +26,132 @@
26
26
  "module": "./esm/src/index.js",
27
27
  "exports": {
28
28
  ".": {
29
- "import": "./esm/src/index.js"
29
+ "import": "./esm/src/index.js",
30
+ "types": "./esm/src/index.d.ts"
30
31
  },
31
32
  "./head": {
32
- "import": "./esm/src/react/components/Head.js"
33
+ "import": "./esm/src/react/components/Head.js",
34
+ "types": "./esm/src/react/components/Head.d.ts"
33
35
  },
34
36
  "./router": {
35
- "import": "./esm/src/react/router/index.js"
37
+ "import": "./esm/src/react/router/index.js",
38
+ "types": "./esm/src/react/router/index.d.ts"
36
39
  },
37
40
  "./context": {
38
- "import": "./esm/src/react/context/index.js"
41
+ "import": "./esm/src/react/context/index.js",
42
+ "types": "./esm/src/react/context/index.d.ts"
39
43
  },
40
44
  "./fonts": {
41
- "import": "./esm/src/react/fonts/index.js"
45
+ "import": "./esm/src/react/fonts/index.js",
46
+ "types": "./esm/src/react/fonts/index.d.ts"
42
47
  },
43
48
  "./chat": {
44
- "import": "./esm/src/chat/index.js"
49
+ "import": "./esm/src/chat/index.js",
50
+ "types": "./esm/src/chat/index.d.ts"
45
51
  },
46
52
  "./chat/ag-ui": {
47
- "import": "./esm/src/chat/ag-ui.js"
53
+ "import": "./esm/src/chat/ag-ui.js",
54
+ "types": "./esm/src/chat/ag-ui.d.ts"
48
55
  },
49
56
  "./chat/protocol": {
50
- "import": "./esm/src/chat/protocol.js"
57
+ "import": "./esm/src/chat/protocol.js",
58
+ "types": "./esm/src/chat/protocol.d.ts"
51
59
  },
52
60
  "./markdown": {
53
- "import": "./esm/src/markdown/index.js"
61
+ "import": "./esm/src/markdown/index.js",
62
+ "types": "./esm/src/markdown/index.d.ts"
54
63
  },
55
64
  "./mdx": {
56
- "import": "./esm/src/mdx/index.js"
65
+ "import": "./esm/src/mdx/index.js",
66
+ "types": "./esm/src/mdx/index.d.ts"
57
67
  },
58
68
  "./agent": {
59
- "import": "./esm/src/agent/index.js"
69
+ "import": "./esm/src/agent/index.js",
70
+ "types": "./esm/src/agent/index.d.ts"
60
71
  },
61
72
  "./tool": {
62
- "import": "./esm/src/tool/index.js"
73
+ "import": "./esm/src/tool/index.js",
74
+ "types": "./esm/src/tool/index.d.ts"
63
75
  },
64
76
  "./workflow": {
65
- "import": "./esm/src/workflow/index.js"
77
+ "import": "./esm/src/workflow/index.js",
78
+ "types": "./esm/src/workflow/index.d.ts"
66
79
  },
67
80
  "./workflow/worker": {
68
- "import": "./esm/src/workflow/worker/index.js"
81
+ "import": "./esm/src/workflow/worker/index.js",
82
+ "types": "./esm/src/workflow/worker/index.d.ts"
69
83
  },
70
84
  "./workflow/claude-code": {
71
- "import": "./esm/src/workflow/claude-code/index.js"
85
+ "import": "./esm/src/workflow/claude-code/index.js",
86
+ "types": "./esm/src/workflow/claude-code/index.d.ts"
72
87
  },
73
88
  "./workflow/claude-code/react": {
74
- "import": "./esm/src/workflow/claude-code/react/index.js"
89
+ "import": "./esm/src/workflow/claude-code/react/index.js",
90
+ "types": "./esm/src/workflow/claude-code/react/index.d.ts"
75
91
  },
76
92
  "./workflow/discovery": {
77
- "import": "./esm/src/workflow/discovery/index.js"
93
+ "import": "./esm/src/workflow/discovery/index.js",
94
+ "types": "./esm/src/workflow/discovery/index.d.ts"
78
95
  },
79
96
  "./prompt": {
80
- "import": "./esm/src/prompt/index.js"
97
+ "import": "./esm/src/prompt/index.js",
98
+ "types": "./esm/src/prompt/index.d.ts"
81
99
  },
82
100
  "./resource": {
83
- "import": "./esm/src/resource/index.js"
101
+ "import": "./esm/src/resource/index.js",
102
+ "types": "./esm/src/resource/index.d.ts"
84
103
  },
85
104
  "./jobs": {
86
- "import": "./esm/src/jobs/index.js"
105
+ "import": "./esm/src/jobs/index.js",
106
+ "types": "./esm/src/jobs/index.d.ts"
87
107
  },
88
108
  "./mcp": {
89
- "import": "./esm/src/mcp/index.js"
109
+ "import": "./esm/src/mcp/index.js",
110
+ "types": "./esm/src/mcp/index.d.ts"
90
111
  },
91
112
  "./middleware": {
92
- "import": "./esm/src/middleware/index.js"
113
+ "import": "./esm/src/middleware/index.js",
114
+ "types": "./esm/src/middleware/index.d.ts"
93
115
  },
94
116
  "./utils": {
95
- "import": "./esm/src/utils/index.js"
117
+ "import": "./esm/src/utils/index.js",
118
+ "types": "./esm/src/utils/index.d.ts"
96
119
  },
97
120
  "./oauth": {
98
- "import": "./esm/src/oauth/index.js"
121
+ "import": "./esm/src/oauth/index.js",
122
+ "types": "./esm/src/oauth/index.d.ts"
99
123
  },
100
124
  "./provider": {
101
- "import": "./esm/src/provider/index.js"
125
+ "import": "./esm/src/provider/index.js",
126
+ "types": "./esm/src/provider/index.d.ts"
102
127
  },
103
128
  "./fs": {
104
- "import": "./esm/src/fs/index.js"
129
+ "import": "./esm/src/fs/index.js",
130
+ "types": "./esm/src/fs/index.d.ts"
105
131
  },
106
132
  "./integrations": {
107
- "import": "./esm/src/integrations/index.js"
133
+ "import": "./esm/src/integrations/index.js",
134
+ "types": "./esm/src/integrations/index.d.ts"
108
135
  },
109
136
  "./sandbox": {
110
- "import": "./esm/src/sandbox/index.js"
137
+ "import": "./esm/src/sandbox/index.js",
138
+ "types": "./esm/src/sandbox/index.d.ts"
111
139
  },
112
140
  "./embedding": {
113
- "import": "./esm/src/embedding/index.js"
141
+ "import": "./esm/src/embedding/index.js",
142
+ "types": "./esm/src/embedding/index.d.ts"
114
143
  },
115
144
  "./extensions": {
116
- "import": "./esm/src/extensions/index.js"
145
+ "import": "./esm/src/extensions/index.js",
146
+ "types": "./esm/src/extensions/index.d.ts"
117
147
  },
118
148
  "./extensions/interfaces": {
119
- "import": "./esm/src/extensions/interfaces/index.js"
149
+ "import": "./esm/src/extensions/interfaces/index.js",
150
+ "types": "./esm/src/extensions/interfaces/index.d.ts"
120
151
  },
121
152
  "./cli": {
122
- "import": "./esm/cli/main.js"
153
+ "import": "./esm/cli/main.js",
154
+ "types": "./esm/cli/main.d.ts"
123
155
  },
124
156
  "./tsconfig.json": "./tsconfig.json"
125
157
  },
@@ -158,12 +190,10 @@
158
190
  "esbuild": "0.27.4",
159
191
  "github-slugger": "2.0.0",
160
192
  "gray-matter": "4.0.3",
161
- "jose": "5.9.6",
162
193
  "mdast-util-to-string": "4.0.0",
163
194
  "mime-types": "3.0.2",
164
195
  "react": "19.2.4",
165
196
  "react-dom": "19.2.4",
166
- "redis": "5.11.0",
167
197
  "rehype-highlight": "7.0.2",
168
198
  "rehype-raw": "7.0.0",
169
199
  "rehype-sanitize": "6.0.0",
@@ -199,6 +229,7 @@
199
229
  },
200
230
  "_generatedBy": "dnt@dev",
201
231
  "type": "module",
232
+ "types": "./esm/src/index.d.ts",
202
233
  "bin": {
203
234
  "veryfront": "bin/veryfront.js"
204
235
  },
@@ -5,9 +5,23 @@ import { createFileSystem } from "../../../src/platform/index.js";
5
5
  // Keep init scaffold aligned with current framework default React major/minor.
6
6
  const DEFAULT_INIT_REACT_VERSION = "19.1.1";
7
7
 
8
+ export interface CreatePackageJsonOptions {
9
+ /**
10
+ * Selected integrations whose `connector.json#npmDependencies` should be
11
+ * merged into the generated project's `package.json#dependencies`.
12
+ * First declaration wins on version collisions; framework pins
13
+ * (react, react-dom, veryfront, zod) always take precedence.
14
+ */
15
+ integrations?: Array<{
16
+ name: string;
17
+ npmDependencies?: Record<string, string>;
18
+ }>;
19
+ }
20
+
8
21
  export async function createPackageJson(
9
22
  projectDir: string,
10
23
  projectName?: string,
24
+ options: CreatePackageJsonOptions = {},
11
25
  ): Promise<void> {
12
26
  const fs = createFileSystem();
13
27
 
@@ -19,6 +33,24 @@ export async function createPackageJson(
19
33
  templateDeps = existing.dependencies ?? {};
20
34
  }
21
35
 
36
+ // Merge per-integration deps. First declaration wins; collisions are logged.
37
+ const integrationDeps: Record<string, string> = {};
38
+ for (const integration of options.integrations ?? []) {
39
+ for (const [pkg, range] of Object.entries(integration.npmDependencies ?? {})) {
40
+ if (pkg in integrationDeps) {
41
+ if (integrationDeps[pkg] !== range) {
42
+ logger.warn(
43
+ `[init] ${integration.name} requested ${pkg}@${range} but ${pkg}@${
44
+ integrationDeps[pkg]
45
+ } is already pinned by an earlier integration - keeping the earlier pin`,
46
+ );
47
+ }
48
+ continue;
49
+ }
50
+ integrationDeps[pkg] = range;
51
+ }
52
+ }
53
+
22
54
  const dirName = projectDir.split(/[/\\]/).pop();
23
55
  const packageJson = {
24
56
  name: projectName ?? dirName ?? "veryfront-project",
@@ -34,6 +66,7 @@ export async function createPackageJson(
34
66
  },
35
67
  dependencies: {
36
68
  ...templateDeps,
69
+ ...integrationDeps,
37
70
  react: `^${DEFAULT_INIT_REACT_VERSION}`,
38
71
  "react-dom": `^${DEFAULT_INIT_REACT_VERSION}`,
39
72
  veryfront: `^${VERSION}`,
@@ -269,6 +269,7 @@ export async function initCommand(options: InitOptions): Promise<void> {
269
269
 
270
270
  const allEnvVars: EnvVarConfig[] = templateConfig?.envVars ? [...templateConfig.envVars] : [];
271
271
  const featureTips: string[] = [];
272
+ let loadedIntegrations: ResolvedIntegration[] = [];
272
273
 
273
274
  if (features.length) {
274
275
  const { ordered, errors } = await resolveFeatures(features);
@@ -309,10 +310,11 @@ export async function initCommand(options: InitOptions): Promise<void> {
309
310
  if (baseConfig?.envVars) allEnvVars.push(...baseConfig.envVars);
310
311
 
311
312
  const {
312
- integrations: loadedIntegrations,
313
+ integrations: resolvedIntegrations,
313
314
  files: integrationFiles,
314
315
  errors: integrationErrors,
315
316
  } = await loadIntegrations(integrations);
317
+ loadedIntegrations = resolvedIntegrations;
316
318
 
317
319
  if (integrationErrors.length) {
318
320
  for (const error of integrationErrors) logger.warn(error);
@@ -359,7 +361,12 @@ export async function initCommand(options: InitOptions): Promise<void> {
359
361
 
360
362
  // Skip in quiet/TUI mode since local dev uses CDN and package.json can cause hydration issues
361
363
  if (!options.quiet) {
362
- await createPackageJson(projectDir, projectName);
364
+ await createPackageJson(projectDir, projectName, {
365
+ integrations: loadedIntegrations.map((integration) => ({
366
+ name: integration.config.name,
367
+ npmDependencies: integration.config.npmDependencies,
368
+ })),
369
+ });
363
370
  }
364
371
 
365
372
  if (allEnvVars.length) {
package/src/deno.js CHANGED
@@ -1,8 +1,11 @@
1
1
  export default {
2
2
  "name": "veryfront",
3
- "version": "0.1.217",
3
+ "version": "0.1.219",
4
4
  "license": "Apache-2.0",
5
5
  "nodeModulesDir": "auto",
6
+ "workspace": [
7
+ "./extensions/ext-redis"
8
+ ],
6
9
  "exclude": [
7
10
  "npm/",
8
11
  "dist/",
@@ -12,7 +15,8 @@ export default {
12
15
  "data/",
13
16
  ".deno_cache/",
14
17
  "cli/templates/files/",
15
- "cli/templates/integrations/"
18
+ "cli/templates/integrations/",
19
+ "extensions/"
16
20
  ],
17
21
  "exports": {
18
22
  ".": "./src/index.ts",
@@ -260,9 +264,6 @@ export default {
260
264
  "tailwindcss/plugin": "https://esm.sh/tailwindcss@4.2.2/plugin",
261
265
  "tailwindcss/defaultTheme": "https://esm.sh/tailwindcss@4.2.2/defaultTheme",
262
266
  "tailwindcss/colors": "https://esm.sh/tailwindcss@4.2.2/colors",
263
- "redis": "npm:redis@5.11.0",
264
- "pg": "npm:pg@8.13.1",
265
- "jose": "npm:jose@5.9.6",
266
267
  "@opentelemetry/api": "npm:@opentelemetry/api@1.9.0",
267
268
  "@opentelemetry/core": "npm:@opentelemetry/core@2.6.0",
268
269
  "@opentelemetry/context-async-hooks": "npm:@opentelemetry/context-async-hooks@2.6.0",