@aixyz/config 0.12.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 +20 -9
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -45,13 +45,19 @@ export type AixyzConfig = {
45
45
  */
46
46
  output?: "standalone" | "vercel" | "executable";
47
47
  /**
48
- * Glob pattern(s) for files to include in the build from the `app/` directory.
49
- * @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}"]
50
50
  */
51
- 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[];
52
58
  /**
53
59
  * Glob pattern(s) for files to exclude from the build.
54
- * @default ["**\/{_*,*.{test,spec,e2e}}.{js,jsx,ts,tsx}"]
60
+ * @default ["**\/{_*,*.{test,spec,e2e}}.{js,ts}"]
55
61
  */
56
62
  excludes?: string | string[];
57
63
  };
@@ -73,8 +79,9 @@ const NetworkSchema = z.custom<Network>((val) => {
73
79
 
74
80
  const defaultConfig = {
75
81
  build: {
76
- includes: ["**/*.{js,jsx,ts,tsx}"],
77
- excludes: ["**/{_*,*.{test,spec,e2e}}.{js,jsx,ts,tsx}"],
82
+ tools: ["**/*.{js,ts}"],
83
+ agents: ["**/*.{js,ts}"],
84
+ excludes: ["**/{_*,*.{test,spec,e2e}}.{js,ts}"],
78
85
  },
79
86
  vercel: { maxDuration: 60 },
80
87
  skills: [],
@@ -109,13 +116,17 @@ const AixyzConfigSchema = z.object({
109
116
  build: z
110
117
  .object({
111
118
  output: z.enum(["standalone", "vercel", "executable"]).optional(),
112
- includes: z
119
+ tools: z
120
+ .union([z.string(), z.array(z.string())])
121
+ .default(defaultConfig.build.tools)
122
+ .transform((v) => (Array.isArray(v) ? v : [v])),
123
+ agents: z
113
124
  .union([z.string(), z.array(z.string())])
114
- .default(["**/*.{js,jsx,ts,tsx}"])
125
+ .default(defaultConfig.build.agents)
115
126
  .transform((v) => (Array.isArray(v) ? v : [v])),
116
127
  excludes: z
117
128
  .union([z.string(), z.array(z.string())])
118
- .default(["**/{_*,*.{test,spec,e2e}}.{js,jsx,ts,tsx}"])
129
+ .default(defaultConfig.build.excludes)
119
130
  .transform((v) => (Array.isArray(v) ? v : [v])),
120
131
  })
121
132
  .default(defaultConfig.build),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aixyz/config",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "description": "Payment-native SDK for AI Agent",
5
5
  "keywords": [
6
6
  "ai",