@prave/shared 0.3.3 → 0.4.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.
@@ -42,10 +42,10 @@ export declare const skillAiDescriptionSchema: z.ZodObject<{
42
42
  cached: z.ZodOptional<z.ZodBoolean>;
43
43
  }, "strip", z.ZodTypeAny, {
44
44
  id: string;
45
+ skill_id: string;
46
+ created_at: string;
45
47
  description: string;
46
48
  tags: string[];
47
- created_at: string;
48
- skill_id: string;
49
49
  summary: string | null;
50
50
  key_concepts: string[];
51
51
  model: string;
@@ -56,10 +56,10 @@ export declare const skillAiDescriptionSchema: z.ZodObject<{
56
56
  cached?: boolean | undefined;
57
57
  }, {
58
58
  id: string;
59
+ skill_id: string;
60
+ created_at: string;
59
61
  description: string;
60
62
  tags: string[];
61
- created_at: string;
62
- skill_id: string;
63
63
  summary: string | null;
64
64
  key_concepts: string[];
65
65
  model: string;
@@ -45,6 +45,59 @@ export declare const installRowSchema: z.ZodObject<{
45
45
  is_verified: z.ZodDefault<z.ZodBoolean>;
46
46
  price_cents: z.ZodDefault<z.ZodNumber>;
47
47
  currency: z.ZodDefault<z.ZodString>;
48
+ parent_skill_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
49
+ sub_skill_count: z.ZodOptional<z.ZodNumber>;
50
+ file_count: z.ZodOptional<z.ZodNumber>;
51
+ sub_skills: z.ZodOptional<z.ZodArray<z.ZodObject<{
52
+ id: z.ZodString;
53
+ slug: z.ZodString;
54
+ name: z.ZodString;
55
+ description: z.ZodNullable<z.ZodString>;
56
+ category: z.ZodNullable<z.ZodString>;
57
+ install_count: z.ZodNumber;
58
+ }, "strip", z.ZodTypeAny, {
59
+ id: string;
60
+ slug: string;
61
+ name: string;
62
+ description: string | null;
63
+ category: string | null;
64
+ install_count: number;
65
+ }, {
66
+ id: string;
67
+ slug: string;
68
+ name: string;
69
+ description: string | null;
70
+ category: string | null;
71
+ install_count: number;
72
+ }>, "many">>;
73
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
74
+ id: z.ZodString;
75
+ skill_id: z.ZodString;
76
+ path: z.ZodString;
77
+ content: z.ZodString;
78
+ language: z.ZodNullable<z.ZodString>;
79
+ size_bytes: z.ZodNumber;
80
+ created_at: z.ZodString;
81
+ updated_at: z.ZodString;
82
+ }, "strip", z.ZodTypeAny, {
83
+ path: string;
84
+ id: string;
85
+ skill_id: string;
86
+ content: string;
87
+ language: string | null;
88
+ size_bytes: number;
89
+ created_at: string;
90
+ updated_at: string;
91
+ }, {
92
+ path: string;
93
+ id: string;
94
+ skill_id: string;
95
+ content: string;
96
+ language: string | null;
97
+ size_bytes: number;
98
+ created_at: string;
99
+ updated_at: string;
100
+ }>, "many">>;
48
101
  purchased: z.ZodOptional<z.ZodBoolean>;
49
102
  is_owner: z.ZodOptional<z.ZodBoolean>;
50
103
  bookmarked: z.ZodOptional<z.ZodBoolean>;
@@ -72,20 +125,20 @@ export declare const installRowSchema: z.ZodObject<{
72
125
  }>>>;
73
126
  created_at: z.ZodString;
74
127
  updated_at: z.ZodString;
75
- }, "id" | "name" | "slug" | "description" | "visibility" | "license" | "updated_at">, "strip", z.ZodTypeAny, {
128
+ }, "id" | "updated_at" | "slug" | "name" | "description" | "visibility" | "license">, "strip", z.ZodTypeAny, {
76
129
  id: string;
77
- name: string;
130
+ updated_at: string;
78
131
  slug: string;
132
+ name: string;
79
133
  description: string | null;
80
134
  visibility: "public" | "private";
81
135
  license: string;
82
- updated_at: string;
83
136
  }, {
84
137
  id: string;
85
- name: string;
138
+ updated_at: string;
86
139
  slug: string;
140
+ name: string;
87
141
  description: string | null;
88
- updated_at: string;
89
142
  visibility?: "public" | "private" | undefined;
90
143
  license?: string | undefined;
91
144
  }>;
@@ -99,12 +152,12 @@ export declare const installRowSchema: z.ZodObject<{
99
152
  installed_at: string;
100
153
  skill: {
101
154
  id: string;
102
- name: string;
155
+ updated_at: string;
103
156
  slug: string;
157
+ name: string;
104
158
  description: string | null;
105
159
  visibility: "public" | "private";
106
160
  license: string;
107
- updated_at: string;
108
161
  };
109
162
  latest_version?: number | null | undefined;
110
163
  }, {
@@ -115,10 +168,10 @@ export declare const installRowSchema: z.ZodObject<{
115
168
  installed_at: string;
116
169
  skill: {
117
170
  id: string;
118
- name: string;
171
+ updated_at: string;
119
172
  slug: string;
173
+ name: string;
120
174
  description: string | null;
121
- updated_at: string;
122
175
  visibility?: "public" | "private" | undefined;
123
176
  license?: string | undefined;
124
177
  };
@@ -1 +1 @@
1
- {"version":3,"file":"install.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/install.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,4DAA4D;AAC5D,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;EAMxB,CAAA;AACF,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AAEnD,wDAAwD;AACxD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAU3B,iEAAiE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEjE,CAAA;AACF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAEzD,eAAO,MAAM,wBAAwB;IACnC,0EAA0E;;;;;;EAE1E,CAAA;AACF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA"}
1
+ {"version":3,"file":"install.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/install.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,4DAA4D;AAC5D,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;EAMxB,CAAA;AACF,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AAEnD,wDAAwD;AACxD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAU3B,iEAAiE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEjE,CAAA;AACF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAEzD,eAAO,MAAM,wBAAwB;IACnC,0EAA0E;;;;;;EAE1E,CAAA;AACF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA"}
@@ -53,9 +53,9 @@ export declare const skillPurchaseSchema: z.ZodObject<{
53
53
  }, "strip", z.ZodTypeAny, {
54
54
  status: "pending" | "paid" | "refunded" | "failed";
55
55
  id: string;
56
- currency: string;
57
- created_at: string;
58
56
  skill_id: string;
57
+ created_at: string;
58
+ currency: string;
59
59
  user_id: string | null;
60
60
  creator_id: string | null;
61
61
  amount_cents: number;
@@ -66,9 +66,9 @@ export declare const skillPurchaseSchema: z.ZodObject<{
66
66
  }, {
67
67
  status: "pending" | "paid" | "refunded" | "failed";
68
68
  id: string;
69
- currency: string;
70
- created_at: string;
71
69
  skill_id: string;
70
+ created_at: string;
71
+ currency: string;
72
72
  user_id: string | null;
73
73
  creator_id: string | null;
74
74
  amount_cents: number;
@@ -127,9 +127,9 @@ export declare const creatorStatsSchema: z.ZodObject<{
127
127
  }, "strip", z.ZodTypeAny, {
128
128
  status: "pending" | "paid" | "refunded" | "failed";
129
129
  id: string;
130
- currency: string;
131
- created_at: string;
132
130
  skill_id: string;
131
+ created_at: string;
132
+ currency: string;
133
133
  user_id: string | null;
134
134
  creator_id: string | null;
135
135
  amount_cents: number;
@@ -141,9 +141,9 @@ export declare const creatorStatsSchema: z.ZodObject<{
141
141
  }, {
142
142
  status: "pending" | "paid" | "refunded" | "failed";
143
143
  id: string;
144
- currency: string;
145
- created_at: string;
146
144
  skill_id: string;
145
+ created_at: string;
146
+ currency: string;
147
147
  user_id: string | null;
148
148
  creator_id: string | null;
149
149
  amount_cents: number;
@@ -162,9 +162,9 @@ export declare const creatorStatsSchema: z.ZodObject<{
162
162
  recent_sales: {
163
163
  status: "pending" | "paid" | "refunded" | "failed";
164
164
  id: string;
165
- currency: string;
166
- created_at: string;
167
165
  skill_id: string;
166
+ created_at: string;
167
+ currency: string;
168
168
  user_id: string | null;
169
169
  creator_id: string | null;
170
170
  amount_cents: number;
@@ -183,9 +183,9 @@ export declare const creatorStatsSchema: z.ZodObject<{
183
183
  recent_sales: {
184
184
  status: "pending" | "paid" | "refunded" | "failed";
185
185
  id: string;
186
- currency: string;
187
- created_at: string;
188
186
  skill_id: string;
187
+ created_at: string;
188
+ currency: string;
189
189
  user_id: string | null;
190
190
  creator_id: string | null;
191
191
  amount_cents: number;
@@ -20,6 +20,59 @@ export declare const skillSearchHitSchema: z.ZodObject<{
20
20
  is_verified: z.ZodDefault<z.ZodBoolean>;
21
21
  price_cents: z.ZodDefault<z.ZodNumber>;
22
22
  currency: z.ZodDefault<z.ZodString>;
23
+ parent_skill_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
24
+ sub_skill_count: z.ZodOptional<z.ZodNumber>;
25
+ file_count: z.ZodOptional<z.ZodNumber>;
26
+ sub_skills: z.ZodOptional<z.ZodArray<z.ZodObject<{
27
+ id: z.ZodString;
28
+ slug: z.ZodString;
29
+ name: z.ZodString;
30
+ description: z.ZodNullable<z.ZodString>;
31
+ category: z.ZodNullable<z.ZodString>;
32
+ install_count: z.ZodNumber;
33
+ }, "strip", z.ZodTypeAny, {
34
+ id: string;
35
+ slug: string;
36
+ name: string;
37
+ description: string | null;
38
+ category: string | null;
39
+ install_count: number;
40
+ }, {
41
+ id: string;
42
+ slug: string;
43
+ name: string;
44
+ description: string | null;
45
+ category: string | null;
46
+ install_count: number;
47
+ }>, "many">>;
48
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
49
+ id: z.ZodString;
50
+ skill_id: z.ZodString;
51
+ path: z.ZodString;
52
+ content: z.ZodString;
53
+ language: z.ZodNullable<z.ZodString>;
54
+ size_bytes: z.ZodNumber;
55
+ created_at: z.ZodString;
56
+ updated_at: z.ZodString;
57
+ }, "strip", z.ZodTypeAny, {
58
+ path: string;
59
+ id: string;
60
+ skill_id: string;
61
+ content: string;
62
+ language: string | null;
63
+ size_bytes: number;
64
+ created_at: string;
65
+ updated_at: string;
66
+ }, {
67
+ path: string;
68
+ id: string;
69
+ skill_id: string;
70
+ content: string;
71
+ language: string | null;
72
+ size_bytes: number;
73
+ created_at: string;
74
+ updated_at: string;
75
+ }>, "many">>;
23
76
  purchased: z.ZodOptional<z.ZodBoolean>;
24
77
  is_owner: z.ZodOptional<z.ZodBoolean>;
25
78
  bookmarked: z.ZodOptional<z.ZodBoolean>;
@@ -52,23 +105,44 @@ export declare const skillSearchHitSchema: z.ZodObject<{
52
105
  highlight: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
53
106
  }, "strip", z.ZodTypeAny, {
54
107
  id: string;
55
- owner_id: string;
56
- name: string;
108
+ content: string | null;
109
+ created_at: string;
110
+ updated_at: string;
57
111
  slug: string;
112
+ name: string;
58
113
  description: string | null;
59
- content: string | null;
114
+ category: string | null;
115
+ install_count: number;
116
+ owner_id: string;
60
117
  visibility: "public" | "private";
61
118
  source_repo: string | null;
62
119
  license: string;
63
- category: string | null;
64
120
  tags: string[];
65
- install_count: number;
66
121
  bookmark_count: number;
67
122
  is_verified: boolean;
68
123
  price_cents: number;
69
124
  currency: string;
70
- created_at: string;
71
- updated_at: string;
125
+ parent_skill_id: string | null;
126
+ sub_skill_count?: number | undefined;
127
+ file_count?: number | undefined;
128
+ sub_skills?: {
129
+ id: string;
130
+ slug: string;
131
+ name: string;
132
+ description: string | null;
133
+ category: string | null;
134
+ install_count: number;
135
+ }[] | undefined;
136
+ files?: {
137
+ path: string;
138
+ id: string;
139
+ skill_id: string;
140
+ content: string;
141
+ language: string | null;
142
+ size_bytes: number;
143
+ created_at: string;
144
+ updated_at: string;
145
+ }[] | undefined;
72
146
  purchased?: boolean | undefined;
73
147
  is_owner?: boolean | undefined;
74
148
  bookmarked?: boolean | undefined;
@@ -84,23 +158,44 @@ export declare const skillSearchHitSchema: z.ZodObject<{
84
158
  highlight?: Record<string, string[]> | undefined;
85
159
  }, {
86
160
  id: string;
87
- owner_id: string;
88
- name: string;
89
- slug: string;
90
- description: string | null;
91
161
  content: string | null;
92
- source_repo: string | null;
93
- category: string | null;
94
162
  created_at: string;
95
163
  updated_at: string;
164
+ slug: string;
165
+ name: string;
166
+ description: string | null;
167
+ category: string | null;
168
+ owner_id: string;
169
+ source_repo: string | null;
170
+ install_count?: number | undefined;
96
171
  visibility?: "public" | "private" | undefined;
97
172
  license?: string | undefined;
98
173
  tags?: string[] | undefined;
99
- install_count?: number | undefined;
100
174
  bookmark_count?: number | undefined;
101
175
  is_verified?: boolean | undefined;
102
176
  price_cents?: number | undefined;
103
177
  currency?: string | undefined;
178
+ parent_skill_id?: string | null | undefined;
179
+ sub_skill_count?: number | undefined;
180
+ file_count?: number | undefined;
181
+ sub_skills?: {
182
+ id: string;
183
+ slug: string;
184
+ name: string;
185
+ description: string | null;
186
+ category: string | null;
187
+ install_count: number;
188
+ }[] | undefined;
189
+ files?: {
190
+ path: string;
191
+ id: string;
192
+ skill_id: string;
193
+ content: string;
194
+ language: string | null;
195
+ size_bytes: number;
196
+ created_at: string;
197
+ updated_at: string;
198
+ }[] | undefined;
104
199
  purchased?: boolean | undefined;
105
200
  is_owner?: boolean | undefined;
106
201
  bookmarked?: boolean | undefined;
@@ -140,4 +235,42 @@ export declare const scanGithubJobSchema: z.ZodObject<{
140
235
  source?: "seed" | "manual" | "cron" | undefined;
141
236
  }>;
142
237
  export type ScanGithubJob = z.infer<typeof scanGithubJobSchema>;
238
+ /**
239
+ * Payload for the `describe-skill` BullMQ job. Fired by the GitHub
240
+ * scanner whenever it imports a Skill without a frontmatter description,
241
+ * and by the admin backfill endpoint for any Skill where the description
242
+ * is still null/empty after the fact.
243
+ */
244
+ export declare const describeSkillJobSchema: z.ZodObject<{
245
+ skill_id: z.ZodString;
246
+ /** Set by backfills so we keep going even when an obvious local hash matches. */
247
+ force: z.ZodDefault<z.ZodBoolean>;
248
+ }, "strip", z.ZodTypeAny, {
249
+ skill_id: string;
250
+ force: boolean;
251
+ }, {
252
+ skill_id: string;
253
+ force?: boolean | undefined;
254
+ }>;
255
+ export type DescribeSkillJob = z.infer<typeof describeSkillJobSchema>;
256
+ /**
257
+ * Payload for the `discover-github` BullMQ job. Runs on a daily cron and
258
+ * uses GitHub's code-search API to find any public repo containing one or
259
+ * more `SKILL.md` files, then enqueues a `github-scan` job per repo. The
260
+ * scanner's existing license filter + slug-based upsert ensure no
261
+ * duplicate skills land in the catalogue.
262
+ */
263
+ export declare const discoverGithubJobSchema: z.ZodObject<{
264
+ /** Max number of repos to enqueue per run. Cheap guard against API quota burn. */
265
+ max_repos: z.ZodDefault<z.ZodNumber>;
266
+ /** GitHub code-search query. Default targets any public SKILL.md file. */
267
+ query: z.ZodDefault<z.ZodString>;
268
+ }, "strip", z.ZodTypeAny, {
269
+ max_repos: number;
270
+ query: string;
271
+ }, {
272
+ max_repos?: number | undefined;
273
+ query?: string | undefined;
274
+ }>;
275
+ export type DiscoverGithubJob = z.infer<typeof discoverGithubJobSchema>;
143
276
  //# sourceMappingURL=search.schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"search.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/search.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;;;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,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAE/D;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB;;IAEjC,iFAAiF;;;;;;;;EAEjF,CAAA;AACF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAErE;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB;IAClC,kFAAkF;;IAElF,0EAA0E;;;;;;;;EAE1E,CAAA;AACF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA"}
@@ -18,3 +18,27 @@ export const scanGithubJobSchema = z.object({
18
18
  repo_url: z.string().url(),
19
19
  source: z.enum(['seed', 'manual', 'cron']).default('manual'),
20
20
  });
21
+ /**
22
+ * Payload for the `describe-skill` BullMQ job. Fired by the GitHub
23
+ * scanner whenever it imports a Skill without a frontmatter description,
24
+ * and by the admin backfill endpoint for any Skill where the description
25
+ * is still null/empty after the fact.
26
+ */
27
+ export const describeSkillJobSchema = z.object({
28
+ skill_id: z.string().uuid(),
29
+ /** Set by backfills so we keep going even when an obvious local hash matches. */
30
+ force: z.boolean().default(false),
31
+ });
32
+ /**
33
+ * Payload for the `discover-github` BullMQ job. Runs on a daily cron and
34
+ * uses GitHub's code-search API to find any public repo containing one or
35
+ * more `SKILL.md` files, then enqueues a `github-scan` job per repo. The
36
+ * scanner's existing license filter + slug-based upsert ensure no
37
+ * duplicate skills land in the catalogue.
38
+ */
39
+ export const discoverGithubJobSchema = z.object({
40
+ /** Max number of repos to enqueue per run. Cheap guard against API quota burn. */
41
+ max_repos: z.number().int().min(1).max(500).default(100),
42
+ /** GitHub code-search query. Default targets any public SKILL.md file. */
43
+ query: z.string().default('filename:SKILL.md'),
44
+ });
@@ -7,14 +7,14 @@ export declare const skillDependencySchema: z.ZodObject<{
7
7
  sort_order: z.ZodDefault<z.ZodNumber>;
8
8
  created_at: z.ZodString;
9
9
  }, "strip", z.ZodTypeAny, {
10
- created_at: string;
11
10
  skill_id: string;
11
+ created_at: string;
12
12
  depends_on_skill_id: string;
13
13
  version_pin: number | null;
14
14
  sort_order: number;
15
15
  }, {
16
- created_at: string;
17
16
  skill_id: string;
17
+ created_at: string;
18
18
  depends_on_skill_id: string;
19
19
  version_pin: number | null;
20
20
  sort_order?: number | undefined;
@@ -49,6 +49,59 @@ export declare const dependencyRowSchema: z.ZodObject<{
49
49
  is_verified: z.ZodDefault<z.ZodBoolean>;
50
50
  price_cents: z.ZodDefault<z.ZodNumber>;
51
51
  currency: z.ZodDefault<z.ZodString>;
52
+ parent_skill_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
53
+ sub_skill_count: z.ZodOptional<z.ZodNumber>;
54
+ file_count: z.ZodOptional<z.ZodNumber>;
55
+ sub_skills: z.ZodOptional<z.ZodArray<z.ZodObject<{
56
+ id: z.ZodString;
57
+ slug: z.ZodString;
58
+ name: z.ZodString;
59
+ description: z.ZodNullable<z.ZodString>;
60
+ category: z.ZodNullable<z.ZodString>;
61
+ install_count: z.ZodNumber;
62
+ }, "strip", z.ZodTypeAny, {
63
+ id: string;
64
+ slug: string;
65
+ name: string;
66
+ description: string | null;
67
+ category: string | null;
68
+ install_count: number;
69
+ }, {
70
+ id: string;
71
+ slug: string;
72
+ name: string;
73
+ description: string | null;
74
+ category: string | null;
75
+ install_count: number;
76
+ }>, "many">>;
77
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
78
+ id: z.ZodString;
79
+ skill_id: z.ZodString;
80
+ path: z.ZodString;
81
+ content: z.ZodString;
82
+ language: z.ZodNullable<z.ZodString>;
83
+ size_bytes: z.ZodNumber;
84
+ created_at: z.ZodString;
85
+ updated_at: z.ZodString;
86
+ }, "strip", z.ZodTypeAny, {
87
+ path: string;
88
+ id: string;
89
+ skill_id: string;
90
+ content: string;
91
+ language: string | null;
92
+ size_bytes: number;
93
+ created_at: string;
94
+ updated_at: string;
95
+ }, {
96
+ path: string;
97
+ id: string;
98
+ skill_id: string;
99
+ content: string;
100
+ language: string | null;
101
+ size_bytes: number;
102
+ created_at: string;
103
+ updated_at: string;
104
+ }>, "many">>;
52
105
  purchased: z.ZodOptional<z.ZodBoolean>;
53
106
  is_owner: z.ZodOptional<z.ZodBoolean>;
54
107
  bookmarked: z.ZodOptional<z.ZodBoolean>;
@@ -76,41 +129,41 @@ export declare const dependencyRowSchema: z.ZodObject<{
76
129
  }>>>;
77
130
  created_at: z.ZodString;
78
131
  updated_at: z.ZodString;
79
- }, "id" | "name" | "slug" | "description" | "visibility">, "strip", z.ZodTypeAny, {
132
+ }, "id" | "slug" | "name" | "description" | "visibility">, "strip", z.ZodTypeAny, {
80
133
  id: string;
81
- name: string;
82
134
  slug: string;
135
+ name: string;
83
136
  description: string | null;
84
137
  visibility: "public" | "private";
85
138
  }, {
86
139
  id: string;
87
- name: string;
88
140
  slug: string;
141
+ name: string;
89
142
  description: string | null;
90
143
  visibility?: "public" | "private" | undefined;
91
144
  }>;
92
145
  }, "strip", z.ZodTypeAny, {
93
- created_at: string;
94
146
  skill_id: string;
147
+ created_at: string;
95
148
  depends_on_skill_id: string;
96
149
  version_pin: number | null;
97
150
  sort_order: number;
98
151
  target: {
99
152
  id: string;
100
- name: string;
101
153
  slug: string;
154
+ name: string;
102
155
  description: string | null;
103
156
  visibility: "public" | "private";
104
157
  };
105
158
  }, {
106
- created_at: string;
107
159
  skill_id: string;
160
+ created_at: string;
108
161
  depends_on_skill_id: string;
109
162
  version_pin: number | null;
110
163
  target: {
111
164
  id: string;
112
- name: string;
113
165
  slug: string;
166
+ name: string;
114
167
  description: string | null;
115
168
  visibility?: "public" | "private" | undefined;
116
169
  };
@@ -1 +1 @@
1
- {"version":3,"file":"skill-dependency.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/skill-dependency.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;A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E,CAAC,CAAA;CAC3D;AAED,eAAO,MAAM,wBAAwB;;;;;;;;;;;;EAOnC,CAAA;AACF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA"}
@@ -42,9 +42,9 @@ export declare const skillPullRequestSchema: z.ZodObject<{
42
42
  }, "strip", z.ZodTypeAny, {
43
43
  status: "open" | "merged" | "closed";
44
44
  id: string;
45
+ skill_id: string;
45
46
  created_at: string;
46
47
  updated_at: string;
47
- skill_id: string;
48
48
  summary: string | null;
49
49
  author_id: string;
50
50
  title: string;
@@ -65,9 +65,9 @@ export declare const skillPullRequestSchema: z.ZodObject<{
65
65
  }, {
66
66
  status: "open" | "merged" | "closed";
67
67
  id: string;
68
+ skill_id: string;
68
69
  created_at: string;
69
70
  updated_at: string;
70
- skill_id: string;
71
71
  summary: string | null;
72
72
  author_id: string;
73
73
  title: string;
@@ -231,9 +231,9 @@ export declare const pullRequestPageSchema: z.ZodObject<{
231
231
  }, "strip", z.ZodTypeAny, {
232
232
  status: "open" | "merged" | "closed";
233
233
  id: string;
234
+ skill_id: string;
234
235
  created_at: string;
235
236
  updated_at: string;
236
- skill_id: string;
237
237
  summary: string | null;
238
238
  author_id: string;
239
239
  title: string;
@@ -254,9 +254,9 @@ export declare const pullRequestPageSchema: z.ZodObject<{
254
254
  }, {
255
255
  status: "open" | "merged" | "closed";
256
256
  id: string;
257
+ skill_id: string;
257
258
  created_at: string;
258
259
  updated_at: string;
259
- skill_id: string;
260
260
  summary: string | null;
261
261
  author_id: string;
262
262
  title: string;
@@ -339,9 +339,9 @@ export declare const pullRequestPageSchema: z.ZodObject<{
339
339
  pull_request: {
340
340
  status: "open" | "merged" | "closed";
341
341
  id: string;
342
+ skill_id: string;
342
343
  created_at: string;
343
344
  updated_at: string;
344
- skill_id: string;
345
345
  summary: string | null;
346
346
  author_id: string;
347
347
  title: string;
@@ -381,9 +381,9 @@ export declare const pullRequestPageSchema: z.ZodObject<{
381
381
  pull_request: {
382
382
  status: "open" | "merged" | "closed";
383
383
  id: string;
384
+ skill_id: string;
384
385
  created_at: string;
385
386
  updated_at: string;
386
- skill_id: string;
387
387
  summary: string | null;
388
388
  author_id: string;
389
389
  title: string;
@@ -472,26 +472,26 @@ export declare const myPullRequestSchema: z.ZodObject<{
472
472
  visibility: z.ZodEnum<["public", "private"]>;
473
473
  }, "strip", z.ZodTypeAny, {
474
474
  id: string;
475
- name: string;
476
475
  slug: string;
476
+ name: string;
477
477
  visibility: "public" | "private";
478
478
  }, {
479
479
  id: string;
480
- name: string;
481
480
  slug: string;
481
+ name: string;
482
482
  visibility: "public" | "private";
483
483
  }>;
484
484
  }, "strip", z.ZodTypeAny, {
485
485
  status: "open" | "merged" | "closed";
486
486
  id: string;
487
+ skill_id: string;
487
488
  created_at: string;
488
489
  updated_at: string;
489
- skill_id: string;
490
490
  summary: string | null;
491
491
  skill: {
492
492
  id: string;
493
- name: string;
494
493
  slug: string;
494
+ name: string;
495
495
  visibility: "public" | "private";
496
496
  };
497
497
  author_id: string;
@@ -513,14 +513,14 @@ export declare const myPullRequestSchema: z.ZodObject<{
513
513
  }, {
514
514
  status: "open" | "merged" | "closed";
515
515
  id: string;
516
+ skill_id: string;
516
517
  created_at: string;
517
518
  updated_at: string;
518
- skill_id: string;
519
519
  summary: string | null;
520
520
  skill: {
521
521
  id: string;
522
- name: string;
523
522
  slug: string;
523
+ name: string;
524
524
  visibility: "public" | "private";
525
525
  };
526
526
  author_id: string;
@@ -34,8 +34,8 @@ export declare const skillTestResultSchema: z.ZodObject<{
34
34
  }, "strip", z.ZodTypeAny, {
35
35
  status: "success" | "error" | "pending";
36
36
  id: string;
37
- created_at: string;
38
37
  skill_id: string;
38
+ created_at: string;
39
39
  model: string;
40
40
  input_tokens: number | null;
41
41
  output_tokens: number | null;
@@ -46,8 +46,8 @@ export declare const skillTestResultSchema: z.ZodObject<{
46
46
  }, {
47
47
  status: "success" | "error" | "pending";
48
48
  id: string;
49
- created_at: string;
50
49
  skill_id: string;
50
+ created_at: string;
51
51
  model: string;
52
52
  input_tokens: number | null;
53
53
  output_tokens: number | null;
@@ -14,18 +14,18 @@ export declare const skillVersionSchema: z.ZodObject<{
14
14
  created_at: z.ZodString;
15
15
  }, "strip", z.ZodTypeAny, {
16
16
  id: string;
17
+ skill_id: string;
17
18
  content: string;
18
19
  created_at: string;
19
20
  commit_message: string | null;
20
- skill_id: string;
21
21
  version: number;
22
22
  created_by: string | null;
23
23
  }, {
24
24
  id: string;
25
+ skill_id: string;
25
26
  content: string;
26
27
  created_at: string;
27
28
  commit_message: string | null;
28
- skill_id: string;
29
29
  version: number;
30
30
  created_by: string | null;
31
31
  }>;
@@ -41,16 +41,16 @@ export declare const skillVersionSummarySchema: z.ZodObject<Omit<{
41
41
  created_at: z.ZodString;
42
42
  }, "content">, "strip", z.ZodTypeAny, {
43
43
  id: string;
44
+ skill_id: string;
44
45
  created_at: string;
45
46
  commit_message: string | null;
46
- skill_id: string;
47
47
  version: number;
48
48
  created_by: string | null;
49
49
  }, {
50
50
  id: string;
51
+ skill_id: string;
51
52
  created_at: string;
52
53
  commit_message: string | null;
53
- skill_id: string;
54
54
  version: number;
55
55
  created_by: string | null;
56
56
  }>;
@@ -1,6 +1,63 @@
1
1
  import { z } from 'zod';
2
2
  export declare const skillVisibilitySchema: z.ZodEnum<["public", "private"]>;
3
3
  export type SkillVisibility = z.infer<typeof skillVisibilitySchema>;
4
+ /**
5
+ * Additional file inside a Skill bundle (anything beyond SKILL.md).
6
+ * `path` is relative to the Skill folder root and uses forward slashes.
7
+ */
8
+ export declare const skillFileSchema: z.ZodObject<{
9
+ id: z.ZodString;
10
+ skill_id: z.ZodString;
11
+ path: z.ZodString;
12
+ content: z.ZodString;
13
+ language: z.ZodNullable<z.ZodString>;
14
+ size_bytes: z.ZodNumber;
15
+ created_at: z.ZodString;
16
+ updated_at: z.ZodString;
17
+ }, "strip", z.ZodTypeAny, {
18
+ path: string;
19
+ id: string;
20
+ skill_id: string;
21
+ content: string;
22
+ language: string | null;
23
+ size_bytes: number;
24
+ created_at: string;
25
+ updated_at: string;
26
+ }, {
27
+ path: string;
28
+ id: string;
29
+ skill_id: string;
30
+ content: string;
31
+ language: string | null;
32
+ size_bytes: number;
33
+ created_at: string;
34
+ updated_at: string;
35
+ }>;
36
+ export type SkillFile = z.infer<typeof skillFileSchema>;
37
+ /** Compact descriptor used when a parent Skill is rendered with its children. */
38
+ export declare const subSkillRefSchema: z.ZodObject<{
39
+ id: z.ZodString;
40
+ slug: z.ZodString;
41
+ name: z.ZodString;
42
+ description: z.ZodNullable<z.ZodString>;
43
+ category: z.ZodNullable<z.ZodString>;
44
+ install_count: z.ZodNumber;
45
+ }, "strip", z.ZodTypeAny, {
46
+ id: string;
47
+ slug: string;
48
+ name: string;
49
+ description: string | null;
50
+ category: string | null;
51
+ install_count: number;
52
+ }, {
53
+ id: string;
54
+ slug: string;
55
+ name: string;
56
+ description: string | null;
57
+ category: string | null;
58
+ install_count: number;
59
+ }>;
60
+ export type SubSkillRef = z.infer<typeof subSkillRefSchema>;
4
61
  export declare const skillSchema: z.ZodObject<{
5
62
  id: z.ZodString;
6
63
  owner_id: z.ZodString;
@@ -18,6 +75,67 @@ export declare const skillSchema: z.ZodObject<{
18
75
  is_verified: z.ZodDefault<z.ZodBoolean>;
19
76
  price_cents: z.ZodDefault<z.ZodNumber>;
20
77
  currency: z.ZodDefault<z.ZodString>;
78
+ /**
79
+ * Sub-skill mechanics — set when the Skill is part of an umbrella.
80
+ * `parent_skill_id` references the umbrella; `sub_skill_count` and
81
+ * `file_count` are computed by the API and attached here so cards/lists
82
+ * can render badges without a fan-out query.
83
+ */
84
+ parent_skill_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
85
+ sub_skill_count: z.ZodOptional<z.ZodNumber>;
86
+ file_count: z.ZodOptional<z.ZodNumber>;
87
+ /** Attached by the API on detail GET when sub_skill_count > 0. */
88
+ sub_skills: z.ZodOptional<z.ZodArray<z.ZodObject<{
89
+ id: z.ZodString;
90
+ slug: z.ZodString;
91
+ name: z.ZodString;
92
+ description: z.ZodNullable<z.ZodString>;
93
+ category: z.ZodNullable<z.ZodString>;
94
+ install_count: z.ZodNumber;
95
+ }, "strip", z.ZodTypeAny, {
96
+ id: string;
97
+ slug: string;
98
+ name: string;
99
+ description: string | null;
100
+ category: string | null;
101
+ install_count: number;
102
+ }, {
103
+ id: string;
104
+ slug: string;
105
+ name: string;
106
+ description: string | null;
107
+ category: string | null;
108
+ install_count: number;
109
+ }>, "many">>;
110
+ /** Attached by the API on detail GET when file_count > 0. */
111
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
112
+ id: z.ZodString;
113
+ skill_id: z.ZodString;
114
+ path: z.ZodString;
115
+ content: z.ZodString;
116
+ language: z.ZodNullable<z.ZodString>;
117
+ size_bytes: z.ZodNumber;
118
+ created_at: z.ZodString;
119
+ updated_at: z.ZodString;
120
+ }, "strip", z.ZodTypeAny, {
121
+ path: string;
122
+ id: string;
123
+ skill_id: string;
124
+ content: string;
125
+ language: string | null;
126
+ size_bytes: number;
127
+ created_at: string;
128
+ updated_at: string;
129
+ }, {
130
+ path: string;
131
+ id: string;
132
+ skill_id: string;
133
+ content: string;
134
+ language: string | null;
135
+ size_bytes: number;
136
+ created_at: string;
137
+ updated_at: string;
138
+ }>, "many">>;
21
139
  /** Attached by the API on GET: true if the caller has paid for the Skill. */
22
140
  purchased: z.ZodOptional<z.ZodBoolean>;
23
141
  /** Attached by the API on GET: true if the caller is the owner. */
@@ -51,23 +169,44 @@ export declare const skillSchema: z.ZodObject<{
51
169
  updated_at: z.ZodString;
52
170
  }, "strip", z.ZodTypeAny, {
53
171
  id: string;
54
- owner_id: string;
55
- name: string;
172
+ content: string | null;
173
+ created_at: string;
174
+ updated_at: string;
56
175
  slug: string;
176
+ name: string;
57
177
  description: string | null;
58
- content: string | null;
178
+ category: string | null;
179
+ install_count: number;
180
+ owner_id: string;
59
181
  visibility: "public" | "private";
60
182
  source_repo: string | null;
61
183
  license: string;
62
- category: string | null;
63
184
  tags: string[];
64
- install_count: number;
65
185
  bookmark_count: number;
66
186
  is_verified: boolean;
67
187
  price_cents: number;
68
188
  currency: string;
69
- created_at: string;
70
- updated_at: string;
189
+ parent_skill_id: string | null;
190
+ sub_skill_count?: number | undefined;
191
+ file_count?: number | undefined;
192
+ sub_skills?: {
193
+ id: string;
194
+ slug: string;
195
+ name: string;
196
+ description: string | null;
197
+ category: string | null;
198
+ install_count: number;
199
+ }[] | undefined;
200
+ files?: {
201
+ path: string;
202
+ id: string;
203
+ skill_id: string;
204
+ content: string;
205
+ language: string | null;
206
+ size_bytes: number;
207
+ created_at: string;
208
+ updated_at: string;
209
+ }[] | undefined;
71
210
  purchased?: boolean | undefined;
72
211
  is_owner?: boolean | undefined;
73
212
  bookmarked?: boolean | undefined;
@@ -81,23 +220,44 @@ export declare const skillSchema: z.ZodObject<{
81
220
  } | null | undefined;
82
221
  }, {
83
222
  id: string;
84
- owner_id: string;
85
- name: string;
86
- slug: string;
87
- description: string | null;
88
223
  content: string | null;
89
- source_repo: string | null;
90
- category: string | null;
91
224
  created_at: string;
92
225
  updated_at: string;
226
+ slug: string;
227
+ name: string;
228
+ description: string | null;
229
+ category: string | null;
230
+ owner_id: string;
231
+ source_repo: string | null;
232
+ install_count?: number | undefined;
93
233
  visibility?: "public" | "private" | undefined;
94
234
  license?: string | undefined;
95
235
  tags?: string[] | undefined;
96
- install_count?: number | undefined;
97
236
  bookmark_count?: number | undefined;
98
237
  is_verified?: boolean | undefined;
99
238
  price_cents?: number | undefined;
100
239
  currency?: string | undefined;
240
+ parent_skill_id?: string | null | undefined;
241
+ sub_skill_count?: number | undefined;
242
+ file_count?: number | undefined;
243
+ sub_skills?: {
244
+ id: string;
245
+ slug: string;
246
+ name: string;
247
+ description: string | null;
248
+ category: string | null;
249
+ install_count: number;
250
+ }[] | undefined;
251
+ files?: {
252
+ path: string;
253
+ id: string;
254
+ skill_id: string;
255
+ content: string;
256
+ language: string | null;
257
+ size_bytes: number;
258
+ created_at: string;
259
+ updated_at: string;
260
+ }[] | undefined;
101
261
  purchased?: boolean | undefined;
102
262
  is_owner?: boolean | undefined;
103
263
  bookmarked?: boolean | undefined;
@@ -112,82 +272,136 @@ export declare const skillSchema: z.ZodObject<{
112
272
  }>;
113
273
  export type Skill = z.infer<typeof skillSchema>;
114
274
  export declare const createSkillInputSchema: z.ZodObject<{
115
- name: z.ZodString;
275
+ content: z.ZodOptional<z.ZodNullable<z.ZodString>>;
116
276
  slug: z.ZodString;
277
+ name: z.ZodString;
117
278
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
118
- content: z.ZodOptional<z.ZodNullable<z.ZodString>>;
279
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
119
280
  visibility: z.ZodOptional<z.ZodDefault<z.ZodEnum<["public", "private"]>>>;
120
281
  source_repo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
121
282
  license: z.ZodOptional<z.ZodDefault<z.ZodString>>;
122
- category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
123
283
  tags: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
124
284
  price_cents: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
125
285
  currency: z.ZodOptional<z.ZodDefault<z.ZodString>>;
286
+ parent_skill_id: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
287
+ } & {
288
+ /** Optional initial bundle of project files (anything beyond SKILL.md). */
289
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
290
+ path: z.ZodString;
291
+ content: z.ZodString;
292
+ language: z.ZodOptional<z.ZodNullable<z.ZodString>>;
293
+ }, "strip", z.ZodTypeAny, {
294
+ path: string;
295
+ content: string;
296
+ language?: string | null | undefined;
297
+ }, {
298
+ path: string;
299
+ content: string;
300
+ language?: string | null | undefined;
301
+ }>, "many">>;
126
302
  }, "strip", z.ZodTypeAny, {
127
- name: string;
128
303
  slug: string;
129
- description?: string | null | undefined;
304
+ name: string;
130
305
  content?: string | null | undefined;
306
+ description?: string | null | undefined;
307
+ category?: string | null | undefined;
131
308
  visibility?: "public" | "private" | undefined;
132
309
  source_repo?: string | null | undefined;
133
310
  license?: string | undefined;
134
- category?: string | null | undefined;
135
311
  tags?: string[] | undefined;
136
312
  price_cents?: number | undefined;
137
313
  currency?: string | undefined;
314
+ parent_skill_id?: string | null | undefined;
315
+ files?: {
316
+ path: string;
317
+ content: string;
318
+ language?: string | null | undefined;
319
+ }[] | undefined;
138
320
  }, {
139
- name: string;
140
321
  slug: string;
141
- description?: string | null | undefined;
322
+ name: string;
142
323
  content?: string | null | undefined;
324
+ description?: string | null | undefined;
325
+ category?: string | null | undefined;
143
326
  visibility?: "public" | "private" | undefined;
144
327
  source_repo?: string | null | undefined;
145
328
  license?: string | undefined;
146
- category?: string | null | undefined;
147
329
  tags?: string[] | undefined;
148
330
  price_cents?: number | undefined;
149
331
  currency?: string | undefined;
332
+ parent_skill_id?: string | null | undefined;
333
+ files?: {
334
+ path: string;
335
+ content: string;
336
+ language?: string | null | undefined;
337
+ }[] | undefined;
150
338
  }>;
151
339
  export type CreateSkillInput = z.infer<typeof createSkillInputSchema>;
152
340
  export declare const updateSkillInputSchema: z.ZodObject<{
153
- name: z.ZodOptional<z.ZodString>;
341
+ content: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
154
342
  slug: z.ZodOptional<z.ZodString>;
343
+ name: z.ZodOptional<z.ZodString>;
155
344
  description: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
156
- content: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
345
+ category: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
157
346
  visibility: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodEnum<["public", "private"]>>>>;
158
347
  source_repo: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
159
348
  license: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodString>>>;
160
- category: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
161
349
  tags: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>>;
162
350
  price_cents: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodNumber>>>;
163
351
  currency: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodString>>>;
352
+ parent_skill_id: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>>;
353
+ files: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
354
+ path: z.ZodString;
355
+ content: z.ZodString;
356
+ language: z.ZodOptional<z.ZodNullable<z.ZodString>>;
357
+ }, "strip", z.ZodTypeAny, {
358
+ path: string;
359
+ content: string;
360
+ language?: string | null | undefined;
361
+ }, {
362
+ path: string;
363
+ content: string;
364
+ language?: string | null | undefined;
365
+ }>, "many">>>;
164
366
  } & {
165
367
  commit_message: z.ZodOptional<z.ZodString>;
166
368
  }, "strip", z.ZodTypeAny, {
167
- name?: string | undefined;
369
+ content?: string | null | undefined;
168
370
  slug?: string | undefined;
371
+ name?: string | undefined;
169
372
  description?: string | null | undefined;
170
- content?: string | null | undefined;
373
+ category?: string | null | undefined;
171
374
  visibility?: "public" | "private" | undefined;
172
375
  source_repo?: string | null | undefined;
173
376
  license?: string | undefined;
174
- category?: string | null | undefined;
175
377
  tags?: string[] | undefined;
176
378
  price_cents?: number | undefined;
177
379
  currency?: string | undefined;
380
+ parent_skill_id?: string | null | undefined;
381
+ files?: {
382
+ path: string;
383
+ content: string;
384
+ language?: string | null | undefined;
385
+ }[] | undefined;
178
386
  commit_message?: string | undefined;
179
387
  }, {
180
- name?: string | undefined;
388
+ content?: string | null | undefined;
181
389
  slug?: string | undefined;
390
+ name?: string | undefined;
182
391
  description?: string | null | undefined;
183
- content?: string | null | undefined;
392
+ category?: string | null | undefined;
184
393
  visibility?: "public" | "private" | undefined;
185
394
  source_repo?: string | null | undefined;
186
395
  license?: string | undefined;
187
- category?: string | null | undefined;
188
396
  tags?: string[] | undefined;
189
397
  price_cents?: number | undefined;
190
398
  currency?: string | undefined;
399
+ parent_skill_id?: string | null | undefined;
400
+ files?: {
401
+ path: string;
402
+ content: string;
403
+ language?: string | null | undefined;
404
+ }[] | undefined;
191
405
  commit_message?: string | undefined;
192
406
  }>;
193
407
  export type UpdateSkillInput = z.infer<typeof updateSkillInputSchema>;
@@ -229,14 +443,14 @@ export declare const mySkillsQuerySchema: z.ZodObject<{
229
443
  sort: "trending" | "popular" | "newest" | "relevance";
230
444
  limit: number;
231
445
  offset: number;
232
- visibility?: "public" | "private" | undefined;
233
446
  category?: string | undefined;
447
+ visibility?: "public" | "private" | undefined;
234
448
  q?: string | undefined;
235
449
  tag?: string | undefined;
236
450
  }, {
237
451
  sort?: "trending" | "popular" | "newest" | "relevance" | undefined;
238
- visibility?: "public" | "private" | undefined;
239
452
  category?: string | undefined;
453
+ visibility?: "public" | "private" | undefined;
240
454
  q?: string | undefined;
241
455
  tag?: string | undefined;
242
456
  limit?: number | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"skill.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/skill.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,qBAAqB,kCAAgC,CAAA;AAClE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEnE,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;IAqBtB,6EAA6E;;IAE7E,mEAAmE;;IAEnE,+EAA+E;;IAE/E,gGAAgG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAchG,CAAA;AACF,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,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,OAAO,sBAAsB,CAAC,CAAA;AAErE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;EAE9B,CAAA;AACF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA"}
@@ -1,5 +1,28 @@
1
1
  import { z } from 'zod';
2
2
  export const skillVisibilitySchema = z.enum(['public', 'private']);
3
+ /**
4
+ * Additional file inside a Skill bundle (anything beyond SKILL.md).
5
+ * `path` is relative to the Skill folder root and uses forward slashes.
6
+ */
7
+ export const skillFileSchema = z.object({
8
+ id: z.string().uuid(),
9
+ skill_id: z.string().uuid(),
10
+ path: z.string().min(1).max(512),
11
+ content: z.string(),
12
+ language: z.string().nullable(),
13
+ size_bytes: z.number().int().nonnegative(),
14
+ created_at: z.string().datetime(),
15
+ updated_at: z.string().datetime(),
16
+ });
17
+ /** Compact descriptor used when a parent Skill is rendered with its children. */
18
+ export const subSkillRefSchema = z.object({
19
+ id: z.string().uuid(),
20
+ slug: z.string(),
21
+ name: z.string(),
22
+ description: z.string().nullable(),
23
+ category: z.string().nullable(),
24
+ install_count: z.number().int().nonnegative(),
25
+ });
3
26
  export const skillSchema = z.object({
4
27
  id: z.string().uuid(),
5
28
  owner_id: z.string().uuid(),
@@ -21,6 +44,19 @@ export const skillSchema = z.object({
21
44
  is_verified: z.boolean().default(false),
22
45
  price_cents: z.number().int().nonnegative().default(0),
23
46
  currency: z.string().default('EUR'),
47
+ /**
48
+ * Sub-skill mechanics — set when the Skill is part of an umbrella.
49
+ * `parent_skill_id` references the umbrella; `sub_skill_count` and
50
+ * `file_count` are computed by the API and attached here so cards/lists
51
+ * can render badges without a fan-out query.
52
+ */
53
+ parent_skill_id: z.string().uuid().nullable().default(null),
54
+ sub_skill_count: z.number().int().nonnegative().optional(),
55
+ file_count: z.number().int().nonnegative().optional(),
56
+ /** Attached by the API on detail GET when sub_skill_count > 0. */
57
+ sub_skills: z.array(subSkillRefSchema).optional(),
58
+ /** Attached by the API on detail GET when file_count > 0. */
59
+ files: z.array(skillFileSchema).optional(),
24
60
  /** Attached by the API on GET: true if the caller has paid for the Skill. */
25
61
  purchased: z.boolean().optional(),
26
62
  /** Attached by the API on GET: true if the caller is the owner. */
@@ -55,6 +91,7 @@ export const createSkillInputSchema = skillSchema
55
91
  tags: true,
56
92
  price_cents: true,
57
93
  currency: true,
94
+ parent_skill_id: true,
58
95
  })
59
96
  .partial({
60
97
  description: true,
@@ -66,6 +103,18 @@ export const createSkillInputSchema = skillSchema
66
103
  tags: true,
67
104
  price_cents: true,
68
105
  currency: true,
106
+ parent_skill_id: true,
107
+ })
108
+ .extend({
109
+ /** Optional initial bundle of project files (anything beyond SKILL.md). */
110
+ files: z
111
+ .array(z.object({
112
+ path: z.string().min(1).max(512),
113
+ content: z.string(),
114
+ language: z.string().nullable().optional(),
115
+ }))
116
+ .max(100)
117
+ .optional(),
69
118
  });
70
119
  export const updateSkillInputSchema = createSkillInputSchema.partial().extend({
71
120
  commit_message: z.string().max(200).optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prave/shared",
3
- "version": "0.3.3",
3
+ "version": "0.4.0",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"