veryfront 0.1.755 → 0.1.756

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 (100) hide show
  1. package/esm/cli/auth/callback-server.d.ts +4 -1
  2. package/esm/cli/auth/callback-server.d.ts.map +1 -1
  3. package/esm/cli/auth/callback-server.js +52 -13
  4. package/esm/cli/auth/index.d.ts +1 -1
  5. package/esm/cli/auth/index.d.ts.map +1 -1
  6. package/esm/cli/auth/index.js +1 -1
  7. package/esm/cli/auth/login.d.ts +2 -0
  8. package/esm/cli/auth/login.d.ts.map +1 -1
  9. package/esm/cli/auth/login.js +18 -6
  10. package/esm/cli/commands/demo/demo.d.ts.map +1 -1
  11. package/esm/cli/commands/demo/demo.js +6 -7
  12. package/esm/deno.js +1 -1
  13. package/esm/src/agent/runtime/index.d.ts +3 -96
  14. package/esm/src/agent/runtime/index.d.ts.map +1 -1
  15. package/esm/src/agent/runtime/index.js +21 -341
  16. package/esm/src/agent/runtime/model-capabilities.d.ts +3 -0
  17. package/esm/src/agent/runtime/model-capabilities.d.ts.map +1 -0
  18. package/esm/src/agent/runtime/model-capabilities.js +18 -0
  19. package/esm/src/agent/runtime/runtime-tool-config.d.ts +14 -0
  20. package/esm/src/agent/runtime/runtime-tool-config.d.ts.map +1 -0
  21. package/esm/src/agent/runtime/runtime-tool-config.js +37 -0
  22. package/esm/src/agent/runtime/skill-policy-enforcement.d.ts +16 -0
  23. package/esm/src/agent/runtime/skill-policy-enforcement.d.ts.map +1 -0
  24. package/esm/src/agent/runtime/skill-policy-enforcement.js +55 -0
  25. package/esm/src/agent/runtime/tool-result-continuation.d.ts +34 -0
  26. package/esm/src/agent/runtime/tool-result-continuation.d.ts.map +1 -0
  27. package/esm/src/agent/runtime/tool-result-continuation.js +194 -0
  28. package/esm/src/agent/schemas/agent.schema.d.ts +7 -0
  29. package/esm/src/agent/schemas/agent.schema.d.ts.map +1 -1
  30. package/esm/src/agent/schemas/agent.schema.js +9 -3
  31. package/esm/src/agent/schemas/index.d.ts +1 -1
  32. package/esm/src/agent/schemas/index.d.ts.map +1 -1
  33. package/esm/src/agent/schemas/index.js +1 -1
  34. package/esm/src/modules/server/module-server.d.ts.map +1 -1
  35. package/esm/src/modules/server/module-server.js +31 -9
  36. package/esm/src/modules/server/rate-limiter.d.ts +3 -2
  37. package/esm/src/modules/server/rate-limiter.d.ts.map +1 -1
  38. package/esm/src/platform/adapters/base.d.ts +24 -3
  39. package/esm/src/platform/adapters/base.d.ts.map +1 -1
  40. package/esm/src/platform/adapters/base.js +15 -1
  41. package/esm/src/platform/adapters/runtime/bun/websocket-adapter.d.ts +2 -0
  42. package/esm/src/platform/adapters/runtime/bun/websocket-adapter.d.ts.map +1 -1
  43. package/esm/src/platform/adapters/runtime/bun/websocket-adapter.js +33 -1
  44. package/esm/src/platform/adapters/runtime/node/websocket-adapter.d.ts +1 -1
  45. package/esm/src/platform/adapters/runtime/node/websocket-adapter.d.ts.map +1 -1
  46. package/esm/src/platform/adapters/runtime/node/websocket-adapter.js +3 -10
  47. package/esm/src/proxy/handler.d.ts.map +1 -1
  48. package/esm/src/proxy/handler.js +25 -116
  49. package/esm/src/proxy/local-project-resolver.d.ts +18 -0
  50. package/esm/src/proxy/local-project-resolver.d.ts.map +1 -0
  51. package/esm/src/proxy/local-project-resolver.js +63 -0
  52. package/esm/src/proxy/proxy-token-resolution.d.ts +37 -0
  53. package/esm/src/proxy/proxy-token-resolution.d.ts.map +1 -0
  54. package/esm/src/proxy/proxy-token-resolution.js +51 -0
  55. package/esm/src/rendering/orchestrator/module-loader/index.d.ts +10 -0
  56. package/esm/src/rendering/orchestrator/module-loader/index.d.ts.map +1 -1
  57. package/esm/src/rendering/orchestrator/module-loader/index.js +23 -158
  58. package/esm/src/rendering/orchestrator/module-loader/module-persistence.d.ts +20 -0
  59. package/esm/src/rendering/orchestrator/module-loader/module-persistence.d.ts.map +1 -0
  60. package/esm/src/rendering/orchestrator/module-loader/module-persistence.js +80 -0
  61. package/esm/src/rendering/orchestrator/module-loader/module-transform-cache.d.ts +59 -0
  62. package/esm/src/rendering/orchestrator/module-loader/module-transform-cache.d.ts.map +1 -0
  63. package/esm/src/rendering/orchestrator/module-loader/module-transform-cache.js +97 -0
  64. package/esm/src/routing/api/handler.d.ts +2 -1
  65. package/esm/src/routing/api/handler.d.ts.map +1 -1
  66. package/esm/src/routing/api/handler.js +2 -1
  67. package/esm/src/routing/api/route-executor.d.ts +3 -0
  68. package/esm/src/routing/api/route-executor.d.ts.map +1 -1
  69. package/esm/src/routing/api/route-executor.js +28 -0
  70. package/esm/src/runtime/runtime-bridge.js +2 -2
  71. package/esm/src/security/http/base-handler.d.ts +3 -2
  72. package/esm/src/security/http/base-handler.d.ts.map +1 -1
  73. package/esm/src/security/http/base-handler.js +1 -1
  74. package/esm/src/security/sandbox/project-worker.d.ts +1 -0
  75. package/esm/src/security/sandbox/project-worker.d.ts.map +1 -1
  76. package/esm/src/security/sandbox/project-worker.js +17 -1
  77. package/esm/src/security/sandbox/worker-egress-guard.d.ts +15 -0
  78. package/esm/src/security/sandbox/worker-egress-guard.d.ts.map +1 -0
  79. package/esm/src/security/sandbox/worker-egress-guard.js +201 -0
  80. package/esm/src/security/sandbox/worker-permissions.d.ts +6 -2
  81. package/esm/src/security/sandbox/worker-permissions.d.ts.map +1 -1
  82. package/esm/src/security/sandbox/worker-permissions.js +34 -3
  83. package/esm/src/security/sandbox/worker-pool.d.ts +1 -1
  84. package/esm/src/security/sandbox/worker-pool.d.ts.map +1 -1
  85. package/esm/src/security/sandbox/worker-pool.js +35 -9
  86. package/esm/src/server/handlers/preview/hmr-client-manager.d.ts +3 -2
  87. package/esm/src/server/handlers/preview/hmr-client-manager.d.ts.map +1 -1
  88. package/esm/src/server/handlers/preview/hmr.handler.d.ts.map +1 -1
  89. package/esm/src/server/handlers/preview/hmr.handler.js +4 -1
  90. package/esm/src/server/handlers/request/api/api-handler-wrapper.js +1 -1
  91. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fallback.d.ts +32 -0
  92. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fallback.d.ts.map +1 -0
  93. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/http-fallback.js +27 -0
  94. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/import-rewriter.d.ts.map +1 -1
  95. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/import-rewriter.js +23 -3
  96. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/index.d.ts.map +1 -1
  97. package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/index.js +15 -15
  98. package/esm/src/utils/version-constant.d.ts +1 -1
  99. package/esm/src/utils/version-constant.js +1 -1
  100. package/package.json +1 -1
@@ -7,6 +7,9 @@ export interface CallbackServer {
7
7
  waitForCallback(timeoutMs?: number): Promise<CallbackResult>;
8
8
  stop(): Promise<void>;
9
9
  }
10
- export declare function startCallbackServer(preferredPort?: number): Promise<CallbackServer>;
10
+ export interface CallbackServerOptions {
11
+ expectedState?: string;
12
+ }
13
+ export declare function startCallbackServer(preferredPort?: number, options?: CallbackServerOptions): Promise<CallbackServer>;
11
14
  export declare function getCallbackUrl(port: number): string;
12
15
  //# sourceMappingURL=callback-server.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"callback-server.d.ts","sourceRoot":"","sources":["../../../src/cli/auth/callback-server.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IAC7D,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACvB;AA6QD,wBAAsB,mBAAmB,CACvC,aAAa,GAAE,MAA8B,GAC5C,OAAO,CAAC,cAAc,CAAC,CAGzB;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEnD"}
1
+ {"version":3,"file":"callback-server.d.ts","sourceRoot":"","sources":["../../../src/cli/auth/callback-server.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IAC7D,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACvB;AAED,MAAM,WAAW,qBAAqB;IACpC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAoUD,wBAAsB,mBAAmB,CACvC,aAAa,GAAE,MAA8B,EAC7C,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,cAAc,CAAC,CAGzB;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEnD"}
@@ -144,17 +144,42 @@ function isAddrInUseError(error) {
144
144
  }
145
145
  return false;
146
146
  }
147
- function handleCallback(url) {
147
+ function callbackError(message) {
148
+ return { result: { token: "", error: message }, html: renderErrorPage(message) };
149
+ }
150
+ function headerOrigin(value) {
151
+ try {
152
+ return new URL(value).origin;
153
+ }
154
+ catch {
155
+ return null;
156
+ }
157
+ }
158
+ function hasCrossOriginHeader(headers, url) {
159
+ const expectedOrigin = url.origin;
160
+ const origin = headers.get("origin");
161
+ if (origin && headerOrigin(origin) !== expectedOrigin)
162
+ return true;
163
+ const referer = headers.get("referer");
164
+ if (referer && headerOrigin(referer) !== expectedOrigin)
165
+ return true;
166
+ return false;
167
+ }
168
+ function handleCallback(url, headers, options = {}) {
169
+ if (hasCrossOriginHeader(headers, url))
170
+ return callbackError("Invalid callback origin");
171
+ if (options.expectedState && url.searchParams.get("state") !== options.expectedState) {
172
+ return callbackError("Invalid OAuth state");
173
+ }
148
174
  const token = url.searchParams.get("token");
149
175
  const error = url.searchParams.get("error");
150
176
  if (error)
151
177
  return { result: { token: "", error }, html: renderErrorPage(error) };
152
178
  if (token)
153
179
  return { result: { token }, html: renderSuccessPage() };
154
- const message = "No token received";
155
- return { result: { token: "", error: message }, html: renderErrorPage(message) };
180
+ return callbackError("No token received");
156
181
  }
157
- function tryStartDenoServer(port) {
182
+ function tryStartDenoServer(port, options = {}) {
158
183
  let resolveCallback = () => { };
159
184
  const callbackPromise = new Promise((resolve) => {
160
185
  resolveCallback = resolve;
@@ -166,7 +191,7 @@ function tryStartDenoServer(port) {
166
191
  if (url.pathname !== "/callback") {
167
192
  return new Response("Not Found", { status: 404, headers: { Connection: "close" } });
168
193
  }
169
- const { result, html } = handleCallback(url);
194
+ const { result, html } = handleCallback(url, request.headers, options);
170
195
  resolveCallback(result);
171
196
  // Close connection immediately to allow clean server shutdown
172
197
  return new Response(html, {
@@ -181,10 +206,10 @@ function tryStartDenoServer(port) {
181
206
  },
182
207
  };
183
208
  }
184
- function startDenoServer(startPort) {
209
+ function startDenoServer(startPort, options = {}) {
185
210
  for (let port = startPort, i = 0; i < MAX_PORT_ATTEMPTS; i++, port++) {
186
211
  try {
187
- return tryStartDenoServer(port);
212
+ return tryStartDenoServer(port, options);
188
213
  }
189
214
  catch (error) {
190
215
  if (!isAddrInUseError(error) || i === MAX_PORT_ATTEMPTS - 1) {
@@ -195,7 +220,21 @@ function startDenoServer(startPort) {
195
220
  }
196
221
  throw new Error("Could not find an available port");
197
222
  }
198
- async function tryStartNodeServer(port) {
223
+ function nodeHeadersToHeaders(headers) {
224
+ const result = new Headers();
225
+ for (const [name, value] of Object.entries(headers)) {
226
+ if (value === undefined)
227
+ continue;
228
+ if (Array.isArray(value)) {
229
+ for (const item of value)
230
+ result.append(name, item);
231
+ continue;
232
+ }
233
+ result.set(name, value);
234
+ }
235
+ return result;
236
+ }
237
+ async function tryStartNodeServer(port, options = {}) {
199
238
  const http = await import("node:http");
200
239
  let resolveCallback = () => { };
201
240
  const callbackPromise = new Promise((resolve) => {
@@ -208,7 +247,7 @@ async function tryStartNodeServer(port) {
208
247
  res.end("Not Found");
209
248
  return;
210
249
  }
211
- const { result, html } = handleCallback(url);
250
+ const { result, html } = handleCallback(url, nodeHeadersToHeaders(req.headers), options);
212
251
  resolveCallback(result);
213
252
  res.setHeader("Content-Type", "text/html; charset=utf-8");
214
253
  res.end(html);
@@ -228,10 +267,10 @@ async function tryStartNodeServer(port) {
228
267
  },
229
268
  };
230
269
  }
231
- async function startNodeServer(startPort) {
270
+ async function startNodeServer(startPort, options = {}) {
232
271
  for (let port = startPort, i = 0; i < MAX_PORT_ATTEMPTS; i++, port++) {
233
272
  try {
234
- return await tryStartNodeServer(port);
273
+ return await tryStartNodeServer(port, options);
235
274
  }
236
275
  catch (error) {
237
276
  if (!isAddrInUseError(error) || i === MAX_PORT_ATTEMPTS - 1) {
@@ -242,9 +281,9 @@ async function startNodeServer(startPort) {
242
281
  }
243
282
  throw new Error("Could not find an available port");
244
283
  }
245
- export async function startCallbackServer(preferredPort = DEFAULT_CALLBACK_PORT) {
284
+ export async function startCallbackServer(preferredPort = DEFAULT_CALLBACK_PORT, options = {}) {
246
285
  // Server functions handle port retry internally to avoid race conditions
247
- return isDeno ? startDenoServer(preferredPort) : startNodeServer(preferredPort);
286
+ return isDeno ? startDenoServer(preferredPort, options) : startNodeServer(preferredPort, options);
248
287
  }
249
288
  export function getCallbackUrl(port) {
250
289
  return `http://localhost:${port}/callback`;
@@ -1,4 +1,4 @@
1
- export { type AuthMethod, deleteToken, ensureAuthenticated, hasToken, login, logout, readToken, saveToken, type UserInfo, validateToken, whoami, } from "./login.js";
1
+ export { type AuthMethod, createOAuthAuthorizationUrl, createOAuthState, deleteToken, ensureAuthenticated, hasToken, login, logout, readToken, saveToken, type UserInfo, validateToken, whoami, } from "./login.js";
2
2
  export { type CallbackServer, getCallbackUrl, startCallbackServer } from "./callback-server.js";
3
3
  export { getTokenLocation } from "./token-store.js";
4
4
  export { canOpenBrowser, openBrowser } from "./browser.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/auth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,UAAU,EACf,WAAW,EACX,mBAAmB,EACnB,QAAQ,EACR,KAAK,EACL,MAAM,EACN,SAAS,EACT,SAAS,EACT,KAAK,QAAQ,EACb,aAAa,EACb,MAAM,GACP,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,KAAK,cAAc,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChG,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/auth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,UAAU,EACf,2BAA2B,EAC3B,gBAAgB,EAChB,WAAW,EACX,mBAAmB,EACnB,QAAQ,EACR,KAAK,EACL,MAAM,EACN,SAAS,EACT,SAAS,EACT,KAAK,QAAQ,EACb,aAAa,EACb,MAAM,GACP,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,KAAK,cAAc,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChG,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC"}
@@ -1,4 +1,4 @@
1
- export { deleteToken, ensureAuthenticated, hasToken, login, logout, readToken, saveToken, validateToken, whoami, } from "./login.js";
1
+ export { createOAuthAuthorizationUrl, createOAuthState, deleteToken, ensureAuthenticated, hasToken, login, logout, readToken, saveToken, validateToken, whoami, } from "./login.js";
2
2
  export { getCallbackUrl, startCallbackServer } from "./callback-server.js";
3
3
  export { getTokenLocation } from "./token-store.js";
4
4
  export { canOpenBrowser, openBrowser } from "./browser.js";
@@ -6,6 +6,8 @@ export interface UserInfo {
6
6
  email: string;
7
7
  name?: string;
8
8
  }
9
+ export declare function createOAuthState(): string;
10
+ export declare function createOAuthAuthorizationUrl(provider: "google" | "github" | "microsoft", callbackUrl: string, state: string): string;
9
11
  export declare function validateToken(token: string): Promise<UserInfo | null>;
10
12
  export declare function login(method?: AuthMethod): Promise<UserInfo | null>;
11
13
  export declare function ensureAuthenticated(env?: EnvironmentConfig): Promise<UserInfo | null>;
@@ -1 +1 @@
1
- {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../src/cli/auth/login.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,iBAAiB,EAAwB,MAAM,2BAA2B,CAAC;AACzF,OAAO,EAAE,WAAW,EAAoB,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAQjG,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,GAAG,OAAO,CAAC;AAErE,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AASD,wBAAsB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAgB3E;AA8ID,wBAAsB,KAAK,CAAC,MAAM,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CA8BzE;AAED,wBAAsB,mBAAmB,CACvC,GAAG,GAAE,iBAA0C,GAC9C,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAqB1B;AAED,wBAAsB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAI5C;AAED,wBAAsB,MAAM,CAC1B,GAAG,GAAE,iBAA0C,GAC9C,OAAO,CA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,SAAS,EAAE,CAAC"}
@@ -1,3 +1,4 @@
1
+ import * as dntShim from "../../_dnt.shims.js";
1
2
  import { cliLogger } from "../utils/index.js";
2
3
  import { getStdinReader, setRawMode, writeStdout } from "../../src/platform/index.js";
3
4
  import { getEnvironmentConfig } from "../../src/config/index.js";
@@ -6,7 +7,7 @@ import { getCallbackUrl, startCallbackServer } from "./callback-server.js";
6
7
  import { canOpenBrowser, openBrowser } from "./browser.js";
7
8
  import { isTTY, promptUser } from "../utils/index.js";
8
9
  import { brand, dim, error, muted, success, warning } from "../ui/colors.js";
9
- import { DEFAULT_LOGIN_TIMEOUT_MS, getApiUrl } from "../shared/constants.js";
10
+ import { DEFAULT_CALLBACK_PORT, DEFAULT_LOGIN_TIMEOUT_MS, getApiUrl } from "../shared/constants.js";
10
11
  import { createSuccessEnvelope, isJsonMode, outputJson } from "../shared/json-output.js";
11
12
  const AUTH_OPTIONS = [
12
13
  { id: "google", label: "Google" },
@@ -14,6 +15,18 @@ const AUTH_OPTIONS = [
14
15
  { id: "microsoft", label: "Microsoft" },
15
16
  { id: "token", label: "API Token" },
16
17
  ];
18
+ export function createOAuthState() {
19
+ const bytes = new Uint8Array(32);
20
+ dntShim.crypto.getRandomValues(bytes);
21
+ return Array.from(bytes, (byte) => byte.toString(16).padStart(2, "0")).join("");
22
+ }
23
+ export function createOAuthAuthorizationUrl(provider, callbackUrl, state) {
24
+ // The hosted auth endpoint must echo `state` back to the loopback callback.
25
+ const authUrl = new URL(`${getApiUrl().replace(/\/$/, "")}/auth/${provider}`);
26
+ authUrl.searchParams.set("redirect_uri", callbackUrl);
27
+ authUrl.searchParams.set("state", state);
28
+ return authUrl.toString();
29
+ }
17
30
  export async function validateToken(token) {
18
31
  try {
19
32
  const response = await fetch(`${getApiUrl()}/me`, {
@@ -91,26 +104,25 @@ async function loginWithOAuth(provider) {
91
104
  return null;
92
105
  }
93
106
  console.log(" " + dim("Starting authentication server..."));
107
+ const state = createOAuthState();
94
108
  let server;
95
109
  try {
96
- server = await startCallbackServer();
110
+ server = await startCallbackServer(DEFAULT_CALLBACK_PORT, { expectedState: state });
97
111
  }
98
112
  catch (e) {
99
113
  console.log(" " + error(`Failed to start server: ${e}`));
100
114
  return null;
101
115
  }
102
116
  const callbackUrl = getCallbackUrl(server.port);
103
- const authUrl = `${getApiUrl()}/auth/${provider}?redirect_uri=${encodeURIComponent(callbackUrl)}`;
117
+ const authUrl = createOAuthAuthorizationUrl(provider, callbackUrl, state);
104
118
  console.log(" " + brand("Opening browser to log in..."));
105
119
  console.log();
106
- console.log(" " + dim("If the browser doesn't open, visit:"));
107
- console.log(" " + dim(authUrl));
108
- console.log();
109
120
  try {
110
121
  await openBrowser(authUrl);
111
122
  }
112
123
  catch {
113
124
  console.log(" " + dim("Could not open browser automatically."));
125
+ console.log(" " + dim("Please use the API token option instead."));
114
126
  }
115
127
  console.log(" " + muted("Waiting for login..."));
116
128
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"demo.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/demo/demo.ts"],"names":[],"mappings":"AAqDA,KAAK,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,GAAG,OAAO,CAAC;AA8Y9D,MAAM,WAAW,WAAW;IAC1B,yDAAyD;IACzD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iDAAiD;IACjD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,8CAA8C;IAC9C,WAAW,CAAC,EAAE,UAAU,CAAC;CAC1B;AA+DD,wBAAsB,WAAW,CAAC,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CA4G1E"}
1
+ {"version":3,"file":"demo.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/demo/demo.ts"],"names":[],"mappings":"AA2DA,KAAK,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,GAAG,OAAO,CAAC;AA6Y9D,MAAM,WAAW,WAAW;IAC1B,yDAAyD;IACzD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iDAAiD;IACjD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,8CAA8C;IAC9C,WAAW,CAAC,EAAE,UAAU,CAAC;CAC1B;AA+DD,wBAAsB,WAAW,CAAC,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CA4G1E"}
@@ -9,10 +9,10 @@ import { getStdinReader, setRawMode } from "../../../src/platform/index.js";
9
9
  import { join } from "../../../src/platform/compat/path/index.js";
10
10
  import { AnimatedDotMatrix, bold, brand, dim, error, formatDuration, HIDE_CURSOR, muted, SHOW_CURSOR, success, successBanner, typeCommand, typeLine, } from "../../ui/index.js";
11
11
  import { exitProcess, isTTY } from "../../utils/index.js";
12
- import { readToken, saveToken, validateToken } from "../../auth/index.js";
12
+ import { createOAuthAuthorizationUrl, createOAuthState, readToken, saveToken, validateToken, } from "../../auth/index.js";
13
13
  import { canOpenBrowser, openBrowser } from "../../auth/browser.js";
14
14
  import { getCallbackUrl, startCallbackServer } from "../../auth/callback-server.js";
15
- import { DEFAULT_LOGIN_TIMEOUT_MS, getApiUrl } from "../../shared/constants.js";
15
+ import { DEFAULT_CALLBACK_PORT, DEFAULT_LOGIN_TIMEOUT_MS } from "../../shared/constants.js";
16
16
  import { initCommand } from "../init/index.js";
17
17
  import { writeProjectSlug } from "../../shared/config.js";
18
18
  import { randomSuffix } from "../../shared/slug.js";
@@ -146,26 +146,25 @@ async function demoLogin(preselectedMethod) {
146
146
  return false;
147
147
  }
148
148
  console.log(` ${dim("Starting authentication server...")}`);
149
+ const state = createOAuthState();
149
150
  let server;
150
151
  try {
151
- server = await startCallbackServer();
152
+ server = await startCallbackServer(DEFAULT_CALLBACK_PORT, { expectedState: state });
152
153
  }
153
154
  catch (e) {
154
155
  console.log(` ${error(`Failed to start server: ${e}`)}`);
155
156
  return false;
156
157
  }
157
158
  const callbackUrl = getCallbackUrl(server.port);
158
- const authUrl = `${getApiUrl()}/auth/${method}?redirect_uri=${encodeURIComponent(callbackUrl)}`;
159
+ const authUrl = createOAuthAuthorizationUrl(method, callbackUrl, state);
159
160
  console.log(` ${brand("Opening browser to log in...")}`);
160
161
  console.log();
161
- console.log(` ${dim("If the browser doesn't open, visit:")}`);
162
- console.log(` ${dim(authUrl)}`);
163
- console.log();
164
162
  try {
165
163
  await openBrowser(authUrl);
166
164
  }
167
165
  catch {
168
166
  console.log(` ${dim("Could not open browser automatically.")}`);
167
+ console.log(` ${dim("Please use the API token option instead.")}`);
169
168
  }
170
169
  console.log(` ${muted("Waiting for login...")}`);
171
170
  try {
package/esm/deno.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "veryfront",
3
- "version": "0.1.755",
3
+ "version": "0.1.756",
4
4
  "license": "Apache-2.0",
5
5
  "nodeModulesDir": "auto",
6
6
  "minimumDependencyAge": "P2D",
@@ -10,9 +10,8 @@
10
10
  *
11
11
  * @module ai/agent/runtime
12
12
  */
13
- import { type AgentConfig, type AgentResponse, type Message, type MessagePart, type ToolCall, type ToolResultPart } from "../types.js";
13
+ import { type AgentConfig, type AgentResponse, type Message, type ToolCall } from "../types.js";
14
14
  import { type Memory } from "../memory/index.js";
15
- import { type ChatStreamState, type StreamingToolCall, type StreamingToolResult } from "./chat-stream-handler.js";
16
15
  export { closeSSEStream, generateMessageId, sendSSE } from "./sse-utils.js";
17
16
  export { RunAlreadyExistsError, RunCancelledError, RunNotActiveError, RunResumeSessionManager, WaitConflictError, WaitNotPendingError, } from "./resume-session.js";
18
17
  export type { RunResumeSessionManagerOptions, RunSessionStatus, SubmitResumeValueOutcome, } from "./resume-session.js";
@@ -23,100 +22,8 @@ export { accumulateUsage, getMaxSteps, normalizeInput } from "./input-utils.js";
23
22
  export { createStreamState, processStream } from "./chat-stream-handler.js";
24
23
  export type { ChatStreamCallbacks, ChatStreamState, StreamingToolCall, } from "./chat-stream-handler.js";
25
24
  export { DEFAULT_MAX_STEPS, DEFAULT_MAX_TOKENS, DEFAULT_TEMPERATURE, MAX_STREAM_BUFFER_SIZE, } from "./constants.js";
26
- import type { RuntimeGenerateToolResult } from "./runtime-tool-types.js";
27
- export declare function collectFinalStreamToolResults(state: Pick<ChatStreamState, "toolResults">): Map<string, StreamingToolResult>;
28
- export declare function collectPersistedToolResults(messages: Message[]): Map<string, ToolResultPart>;
29
- export declare function collectGeneratedToolResults(toolResults: RuntimeGenerateToolResult[] | undefined): Map<string, RuntimeGenerateToolResult>;
30
- export declare function shouldContinueAfterStreamStep(state: Pick<ChatStreamState, "accumulatedText" | "finishReason" | "toolCalls" | "toolResults">): boolean;
31
- export declare function captureStreamedToolCallInput(toolCall: Pick<StreamingToolCall, "arguments">): {
32
- args: Record<string, unknown>;
33
- inputText?: string;
34
- parseError?: string;
35
- };
36
- /**
37
- * A streamed tool call is "incomplete" when the provider stream terminated
38
- * (abort, stall, timeout, transport error) before the SDK emitted the
39
- * finalizing `tool-call` event that sets `inputAvailable: true`. In that state
40
- * `arguments` only holds partial JSON fragments from `tool-input-delta` events,
41
- * so the tool call is NOT a committed model choice and must not be parsed or
42
- * executed. This is semantically distinct from a parse failure on a finalized
43
- * tool call (`inputAvailable: true` but malformed JSON — which only happens on
44
- * genuine provider bugs) and needs to be reported as a stream-termination
45
- * error rather than a tool-argument error.
46
- */
47
- export declare function isStreamedToolCallIncomplete(toolCall: Pick<StreamingToolCall, "inputAvailable">): boolean;
48
- /**
49
- * A non-finalized streamed tool call is a "recoverable placeholder" when its
50
- * accumulated `arguments` are empty or only the transient empty-object
51
- * placeholder `"{}"` (after stripping leading placeholders). This happens when
52
- * a provider emits `tool-input-start` + a `"{}"` `tool-input-delta` and then
53
- * finishes the step WITHOUT ever sending the finalizing `tool-call` /
54
- * `tool-input-end` event — the model never actually committed any arguments.
55
- *
56
- * Unlike an incomplete-dead tool call (which carries real truncated partial
57
- * JSON and must stop the loop to avoid retry storms), a recoverable
58
- * placeholder carries no committed intent, so the runtime can safely re-call
59
- * the model to recover the real tool call. Such placeholders must NOT be
60
- * executed and must NOT surface a stream-termination error.
61
- */
62
- export declare function isRecoverablePlaceholderToolCall(toolCall: Pick<StreamingToolCall, "inputAvailable" | "arguments">): boolean;
63
- /**
64
- * Classification of a streamed tool call when we reach end-of-stream and need
65
- * to persist it into the assistant message. Three distinct cases, each with
66
- * different semantics downstream:
67
- *
68
- * - `complete`: provider emitted the finalizing `tool-call` event and the
69
- * arguments parsed cleanly. Execute the tool normally.
70
- * - `parse-error`: provider emitted the finalizing `tool-call` event but the
71
- * arguments are not valid JSON. This is a provider/SDK bug; record it as a
72
- * tool-argument error so the step can recover.
73
- * - `incomplete`: stream terminated before the finalizing event fired. The
74
- * model never committed this tool use; record it as a stream-termination
75
- * error so the parent (e.g. child-fork watchdog) can decide whether to
76
- * retry the step cleanly instead of seeing a malformed tool call.
77
- */
78
- export type StreamedToolCallMaterialization = {
79
- readonly kind: "complete";
80
- readonly part: MessagePart;
81
- } | {
82
- readonly kind: "parse-error";
83
- readonly part: MessagePart;
84
- readonly parseError: string;
85
- } | {
86
- readonly kind: "incomplete";
87
- readonly part: MessagePart;
88
- readonly partialArgumentsLength: number;
89
- readonly partialArgumentsPreview: string;
90
- };
91
- /**
92
- * Classify and build the persisted `MessagePart` for a single streamed tool
93
- * call. Pure function — no logging, no SSE, no memory. Callers decide what to
94
- * do with the result so this stays unit-testable.
95
- *
96
- * The resulting `part` is always pushed into the assistant message so the
97
- * conversation history is transparent: even incomplete tool calls leave a
98
- * visible trace with their partial `inputText`. What differs is the caller's
99
- * error-surfacing behavior (log warning, SSE event, tool-result error).
100
- */
101
- export declare function materializeStreamedToolCall(tc: StreamingToolCall): StreamedToolCallMaterialization;
102
- /**
103
- * Extract and validate the skill policy from a load_skill tool result.
104
- * Returns `[]` (no tools allowed) for invalid/missing policies instead of
105
- * `undefined` (no restrictions), preventing accidental policy bypass.
106
- */
107
- export declare function extractSkillPolicy(result: unknown): string[] | undefined;
108
- /** Result of skill policy enforcement for a single tool call */
109
- type SkillPolicyResult = {
110
- allowed: true;
111
- } | {
112
- allowed: false;
113
- error: string;
114
- };
115
- /**
116
- * Enforce skill policy on a single tool call.
117
- * Shared between generate() and stream() paths.
118
- */
119
- export declare function enforceSkillPolicy(toolName: string, activeSkillPolicy: string[] | undefined, mustLoadSkillFirst: boolean): SkillPolicyResult;
25
+ export { captureStreamedToolCallInput, collectFinalStreamToolResults, collectGeneratedToolResults, collectPersistedToolResults, isRecoverablePlaceholderToolCall, isStreamedToolCallIncomplete, materializeStreamedToolCall, shouldContinueAfterStreamStep, type StreamedToolCallMaterialization, } from "./tool-result-continuation.js";
26
+ export { enforceSkillPolicy, extractSkillPolicy, type SkillPolicyResult, } from "./skill-policy-enforcement.js";
120
27
  /** Implement agent runtime. */
121
28
  export declare class AgentRuntime {
122
29
  private id;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/runtime/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,aAAa,EAGlB,KAAK,OAAO,EACZ,KAAK,WAAW,EAEhB,KAAK,QAAQ,EAEb,KAAK,cAAc,EACpB,MAAM,aAAa,CAAC;AAIrB,OAAO,EAAgB,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAc/D,OAAO,EACL,KAAK,eAAe,EAGpB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACzB,MAAM,0BAA0B,CAAC;AAYlC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EACjB,uBAAuB,EACvB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,8BAA8B,EAC9B,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB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