veryfront 0.1.498 → 0.1.499

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 (30) hide show
  1. package/esm/deno.js +1 -1
  2. package/esm/src/agent/index.d.ts +1 -0
  3. package/esm/src/agent/index.d.ts.map +1 -1
  4. package/esm/src/agent/index.js +1 -0
  5. package/esm/src/agent/veryfront-cloud-agent-service.d.ts +39 -0
  6. package/esm/src/agent/veryfront-cloud-agent-service.d.ts.map +1 -0
  7. package/esm/src/agent/veryfront-cloud-agent-service.js +482 -0
  8. package/esm/src/config/schemas/config.schema.d.ts +24 -0
  9. package/esm/src/config/schemas/config.schema.d.ts.map +1 -1
  10. package/esm/src/config/schemas/config.schema.js +48 -0
  11. package/esm/src/discovery/index.d.ts +1 -0
  12. package/esm/src/discovery/index.d.ts.map +1 -1
  13. package/esm/src/discovery/index.js +1 -0
  14. package/esm/src/discovery/project-discovery-config.d.ts +30 -0
  15. package/esm/src/discovery/project-discovery-config.d.ts.map +1 -0
  16. package/esm/src/discovery/project-discovery-config.js +33 -0
  17. package/esm/src/server/handlers/request/api/project-discovery.d.ts.map +1 -1
  18. package/esm/src/server/handlers/request/api/project-discovery.js +6 -22
  19. package/esm/src/utils/version-constant.d.ts +1 -1
  20. package/esm/src/utils/version-constant.js +1 -1
  21. package/esm/src/workflow/schemas/workflow.schema.d.ts +1 -1
  22. package/package.json +1 -1
  23. package/src/deno.js +1 -1
  24. package/src/src/agent/index.ts +8 -0
  25. package/src/src/agent/veryfront-cloud-agent-service.ts +761 -0
  26. package/src/src/config/schemas/config.schema.ts +48 -0
  27. package/src/src/discovery/index.ts +4 -0
  28. package/src/src/discovery/project-discovery-config.ts +89 -0
  29. package/src/src/server/handlers/request/api/project-discovery.ts +6 -27
  30. package/src/src/utils/version-constant.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  import { serverLogger } from "../../../../utils/index.js";
2
- import { clearTrackedAgents } from "../../../../discovery/index.js";
2
+ import { clearTrackedAgents, createProjectDiscoveryConfig } from "../../../../discovery/index.js";
3
3
  import { tryGetCacheKeyContext } from "../../../../cache/cache-key-builder.js";
4
4
  const logger = serverLogger.component("api-wrapper");
5
5
  /**
@@ -12,26 +12,6 @@ const logger = serverLogger.component("api-wrapper");
12
12
  * allows retry on failure (the key is deleted if discovery rejects).
13
13
  */
14
14
  const discoveredProjects = new Map();
15
- function isDiscoveryEnabled(discovery) {
16
- return discovery?.enabled ?? true;
17
- }
18
- function buildDiscoveryConfig(ctx) {
19
- const discoveryConfig = ctx.config?.ai;
20
- const toolDiscovery = discoveryConfig?.tools?.discovery;
21
- const agentDiscovery = discoveryConfig?.agents?.discovery;
22
- const skillDiscovery = discoveryConfig?.skills?.discovery;
23
- return {
24
- baseDir: ctx.projectDir,
25
- toolDirs: isDiscoveryEnabled(toolDiscovery) ? (toolDiscovery?.paths ?? ["tools"]) : [],
26
- agentDirs: isDiscoveryEnabled(agentDiscovery) ? (agentDiscovery?.paths ?? ["agents"]) : [],
27
- skillDirs: isDiscoveryEnabled(skillDiscovery) ? (skillDiscovery?.paths ?? ["skills"]) : [],
28
- resourceDirs: ["resources"],
29
- promptDirs: ["prompts"],
30
- workflowDirs: ["workflows"],
31
- fsAdapter: ctx.adapter.fs,
32
- verbose: false,
33
- };
34
- }
35
15
  /** Build a discovery cache key that incorporates the release/version. */
36
16
  function discoveryKey(ctx) {
37
17
  const cacheContext = tryGetCacheKeyContext();
@@ -79,7 +59,11 @@ export async function ensureProjectDiscovery(ctx) {
79
59
  clearTranspileCache();
80
60
  agentRegistry.clear();
81
61
  toolRegistry.clear();
82
- const discoveryOptions = buildDiscoveryConfig(ctx);
62
+ const discoveryOptions = createProjectDiscoveryConfig({
63
+ projectDir: ctx.projectDir,
64
+ config: ctx.config,
65
+ fsAdapter: ctx.adapter.fs,
66
+ });
83
67
  const result = await discoverAll(discoveryOptions);
84
68
  const shouldWarnOnEmptyAiDiscovery = discoveryOptions.toolDirs.length > 0 ||
85
69
  discoveryOptions.agentDirs.length > 0;
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.1.498";
1
+ export declare const VERSION = "0.1.499";
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.498";
3
+ export const VERSION = "0.1.499";
@@ -32,10 +32,10 @@ export declare const WorkflowNodeTypeSchema: z.ZodEnum<{
32
32
  map: "map";
33
33
  branch: "branch";
34
34
  step: "step";
35
- loop: "loop";
36
35
  parallel: "parallel";
37
36
  wait: "wait";
38
37
  subWorkflow: "subWorkflow";
38
+ loop: "loop";
39
39
  }>;
40
40
  /**
41
41
  * Backoff strategy schema
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "veryfront",
3
- "version": "0.1.498",
3
+ "version": "0.1.499",
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.498",
3
+ "version": "0.1.499",
4
4
  "license": "Apache-2.0",
5
5
  "nodeModulesDir": "auto",
6
6
  "workspace": [
@@ -323,6 +323,14 @@ export {
323
323
  type StartNodeHostedAgentServiceOptions,
324
324
  type StartNodeHostedAgentServiceResult,
325
325
  } from "./hosted-agent-service-runtime.js";
326
+ export {
327
+ createNodeVeryfrontCloudAgentServiceRuntime,
328
+ type NodeVeryfrontCloudAgentServiceOptions,
329
+ type NodeVeryfrontCloudAgentServicePreparedExecution,
330
+ type NodeVeryfrontCloudAgentServiceProcessTarget,
331
+ runNodeVeryfrontCloudAgentServiceMain,
332
+ startNodeVeryfrontCloudAgentService,
333
+ } from "./veryfront-cloud-agent-service.js";
326
334
  export {
327
335
  type AgentServiceConfig,
328
336
  type AgentServiceConfigInput,