@aixyz/config 0.11.0 → 0.13.0

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 (2) hide show
  1. package/index.ts +39 -11
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -40,20 +40,36 @@ export type AixyzConfig = {
40
40
  * Output format for `aixyz build`.
41
41
  * - `"standalone"`: Bundles into a single executable file (default).
42
42
  * - `"vercel"`: Generates Vercel Build Output API v3 structure.
43
+ * - `"executable"`: Compiles into a self-contained binary (no Bun runtime required).
43
44
  * Overrides the `VERCEL=1` environment variable, but is overridden by the `--output` CLI flag.
44
45
  */
45
- output?: "standalone" | "vercel";
46
+ output?: "standalone" | "vercel" | "executable";
46
47
  /**
47
- * Glob pattern(s) for files to include in the build from the `app/` directory.
48
- * @default ["**\/*.{js,jsx,ts,tsx}"]
48
+ * Glob pattern(s) for tool files to include in the build from the `app/tools/` directory.
49
+ * @default ["**\/*.{js,ts}"]
49
50
  */
50
- includes?: string | string[];
51
+ tools?: string | string[];
52
+ /**
53
+ * Glob pattern(s) for agent files to include in the build.
54
+ * Matched against `agent.ts` and files under the `agents/` directory.
55
+ * @default ["**\/*.{js,ts}"]
56
+ */
57
+ agents?: string | string[];
51
58
  /**
52
59
  * Glob pattern(s) for files to exclude from the build.
53
- * @default ["**\/{_*,*.{test,spec,e2e}}.{js,jsx,ts,tsx}"]
60
+ * @default ["**\/{_*,*.{test,spec,e2e}}.{js,ts}"]
54
61
  */
55
62
  excludes?: string | string[];
56
63
  };
64
+ vercel?: {
65
+ /**
66
+ * Maximum execution duration for the Vercel serverless function in seconds.
67
+ * Vercel Hobby plan supports up to 60s, Pro up to 300s, Enterprise up to 900s.
68
+ * AI agents typically need more than the Vercel default of 10s.
69
+ * @default 60
70
+ */
71
+ maxDuration?: number;
72
+ };
57
73
  skills?: InferredAixyzConfig["skills"];
58
74
  };
59
75
 
@@ -63,9 +79,11 @@ const NetworkSchema = z.custom<Network>((val) => {
63
79
 
64
80
  const defaultConfig = {
65
81
  build: {
66
- includes: ["**/*.{js,jsx,ts,tsx}"],
67
- excludes: ["**/{_*,*.{test,spec,e2e}}.{js,jsx,ts,tsx}"],
82
+ tools: ["**/*.{js,ts}"],
83
+ agents: ["**/*.{js,ts}"],
84
+ excludes: ["**/{_*,*.{test,spec,e2e}}.{js,ts}"],
68
85
  },
86
+ vercel: { maxDuration: 60 },
69
87
  skills: [],
70
88
  };
71
89
 
@@ -97,17 +115,27 @@ const AixyzConfigSchema = z.object({
97
115
  }),
98
116
  build: z
99
117
  .object({
100
- output: z.enum(["standalone", "vercel"]).optional(),
101
- includes: z
118
+ output: z.enum(["standalone", "vercel", "executable"]).optional(),
119
+ tools: z
102
120
  .union([z.string(), z.array(z.string())])
103
- .default(["**/*.{js,jsx,ts,tsx}"])
121
+ .default(defaultConfig.build.tools)
122
+ .transform((v) => (Array.isArray(v) ? v : [v])),
123
+ agents: z
124
+ .union([z.string(), z.array(z.string())])
125
+ .default(defaultConfig.build.agents)
104
126
  .transform((v) => (Array.isArray(v) ? v : [v])),
105
127
  excludes: z
106
128
  .union([z.string(), z.array(z.string())])
107
- .default(["**/{_*,*.{test,spec,e2e}}.{js,jsx,ts,tsx}"])
129
+ .default(defaultConfig.build.excludes)
108
130
  .transform((v) => (Array.isArray(v) ? v : [v])),
109
131
  })
110
132
  .default(defaultConfig.build),
133
+ vercel: z
134
+ .object({
135
+ maxDuration: z.number().int().positive().max(900).optional().default(defaultConfig.vercel.maxDuration),
136
+ })
137
+ .optional()
138
+ .default(defaultConfig.vercel),
111
139
  skills: z
112
140
  .array(
113
141
  z.object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aixyz/config",
3
- "version": "0.11.0",
3
+ "version": "0.13.0",
4
4
  "description": "Payment-native SDK for AI Agent",
5
5
  "keywords": [
6
6
  "ai",