@prave/shared 1.5.1 → 1.5.2
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.
- package/dist/schemas/advisor.schema.d.ts +10 -0
- package/dist/schemas/advisor.schema.d.ts.map +1 -1
- package/dist/schemas/advisor.schema.js +8 -0
- package/dist/schemas/hook.schema.d.ts +12 -0
- package/dist/schemas/hook.schema.d.ts.map +1 -1
- package/dist/schemas/hook.schema.js +10 -0
- package/package.json +1 -1
|
@@ -63,6 +63,14 @@ export declare const advisorResponseSchema: z.ZodObject<{
|
|
|
63
63
|
slug: string;
|
|
64
64
|
reason: string;
|
|
65
65
|
}>, "many">;
|
|
66
|
+
/**
|
|
67
|
+
* BM25 top-5 fallback slugs. Always populated so the UI can render
|
|
68
|
+
* clickable Skill cards even when `recommendations` is empty (Haiku
|
|
69
|
+
* said "no fit" or hallucinated unknown slugs). When this list backs
|
|
70
|
+
* the result, the server also refunds the rate-limit slot — the
|
|
71
|
+
* user wasn't billed for a zero-reasoned response.
|
|
72
|
+
*/
|
|
73
|
+
candidate_slugs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
66
74
|
/**
|
|
67
75
|
* Echoed for telemetry + cache-bust debugging. The UI doesn't render
|
|
68
76
|
* this but the analytics layer does.
|
|
@@ -95,6 +103,7 @@ export declare const advisorResponseSchema: z.ZodObject<{
|
|
|
95
103
|
slug: string;
|
|
96
104
|
reason: string;
|
|
97
105
|
}[];
|
|
106
|
+
candidate_slugs: string[];
|
|
98
107
|
quota: {
|
|
99
108
|
limit: number;
|
|
100
109
|
plan: "free" | "pro" | "max";
|
|
@@ -114,6 +123,7 @@ export declare const advisorResponseSchema: z.ZodObject<{
|
|
|
114
123
|
used: number;
|
|
115
124
|
remaining: number;
|
|
116
125
|
};
|
|
126
|
+
candidate_slugs?: string[] | undefined;
|
|
117
127
|
}>;
|
|
118
128
|
export type AdvisorResponse = z.infer<typeof advisorResponseSchema>;
|
|
119
129
|
export declare const advisorQuotaResponseSchema: z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"advisor.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/advisor.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;;;;;GAMG;AAEH,eAAO,MAAM,iBAAiB,+BAA6B,CAAA;AAC3D,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAE3D,eAAO,MAAM,oBAAoB;;IAG7B;;;;;OAKG;;;;;;;;;;;;;;EAWH,CAAA;AACJ,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEjE;;;;GAIG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;EAGtC,CAAA;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAA;AAE/E,eAAO,MAAM,qBAAqB;IAChC;;;OAGG;;;;;;;;;;;;IAGH;;;OAGG;;IAEH;;;OAGG
|
|
1
|
+
{"version":3,"file":"advisor.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/advisor.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;;;;;GAMG;AAEH,eAAO,MAAM,iBAAiB,+BAA6B,CAAA;AAC3D,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAE3D,eAAO,MAAM,oBAAoB;;IAG7B;;;;;OAKG;;;;;;;;;;;;;;EAWH,CAAA;AACJ,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEjE;;;;GAIG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;EAGtC,CAAA;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAA;AAE/E,eAAO,MAAM,qBAAqB;IAChC;;;OAGG;;;;;;;;;;;;IAGH;;;;;;OAMG;;IAEH;;;OAGG;;IAEH;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOH,CAAA;AACF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEnE,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;EAAoC,CAAA;AAC3E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAA;AAE7E;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;EAUjC,CAAA;AACF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA"}
|
|
@@ -43,6 +43,14 @@ export const advisorResponseSchema = z.object({
|
|
|
43
43
|
*/
|
|
44
44
|
prose: z.string().min(1).max(2400),
|
|
45
45
|
recommendations: z.array(advisorRecommendationSchema).max(5),
|
|
46
|
+
/**
|
|
47
|
+
* BM25 top-5 fallback slugs. Always populated so the UI can render
|
|
48
|
+
* clickable Skill cards even when `recommendations` is empty (Haiku
|
|
49
|
+
* said "no fit" or hallucinated unknown slugs). When this list backs
|
|
50
|
+
* the result, the server also refunds the rate-limit slot — the
|
|
51
|
+
* user wasn't billed for a zero-reasoned response.
|
|
52
|
+
*/
|
|
53
|
+
candidate_slugs: z.array(z.string()).default([]),
|
|
46
54
|
/**
|
|
47
55
|
* Echoed for telemetry + cache-bust debugging. The UI doesn't render
|
|
48
56
|
* this but the analytics layer does.
|
|
@@ -30,6 +30,16 @@ export declare const hookSchema: z.ZodObject<{
|
|
|
30
30
|
command: z.ZodString;
|
|
31
31
|
/** Optional per-hook timeout in seconds (1–600). */
|
|
32
32
|
timeout_seconds: z.ZodNullable<z.ZodNumber>;
|
|
33
|
+
/**
|
|
34
|
+
* Agents whose runtime exposes a compatible lifecycle-event
|
|
35
|
+
* contract. Today the answer is always `['claude']` because no
|
|
36
|
+
* other coding agent (Codex, Gemini, Cursor, Continue, Cline, Amp,
|
|
37
|
+
* Aider) ships a comparable `PreToolUse`/`PostToolUse` API. The
|
|
38
|
+
* field exists so we can fan out — without a schema change — the
|
|
39
|
+
* moment those runtimes catch up. Attached server-side on every
|
|
40
|
+
* hook GET; not stored in the DB.
|
|
41
|
+
*/
|
|
42
|
+
supported_agents: z.ZodDefault<z.ZodArray<z.ZodEnum<["claude"]>, "many">>;
|
|
33
43
|
visibility: z.ZodDefault<z.ZodEnum<["public", "private"]>>;
|
|
34
44
|
source_repo: z.ZodNullable<z.ZodString>;
|
|
35
45
|
license: z.ZodDefault<z.ZodString>;
|
|
@@ -87,6 +97,7 @@ export declare const hookSchema: z.ZodObject<{
|
|
|
87
97
|
matcher: string | null;
|
|
88
98
|
command: string;
|
|
89
99
|
timeout_seconds: number | null;
|
|
100
|
+
supported_agents: "claude"[];
|
|
90
101
|
bookmarked?: boolean | undefined;
|
|
91
102
|
owner?: {
|
|
92
103
|
id: string;
|
|
@@ -127,6 +138,7 @@ export declare const hookSchema: z.ZodObject<{
|
|
|
127
138
|
} | null | undefined;
|
|
128
139
|
security_rating?: "trusted" | "low_risk" | "med_risk" | "critical" | "pending" | null | undefined;
|
|
129
140
|
version?: number | undefined;
|
|
141
|
+
supported_agents?: "claude"[] | undefined;
|
|
130
142
|
installed?: boolean | undefined;
|
|
131
143
|
}>;
|
|
132
144
|
export type Hook = z.infer<typeof hookSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hook.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/hook.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;;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AAA;IACzB,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB"}
|
|
@@ -41,6 +41,16 @@ export const hookSchema = z.object({
|
|
|
41
41
|
command: z.string().min(1).max(4000),
|
|
42
42
|
/** Optional per-hook timeout in seconds (1–600). */
|
|
43
43
|
timeout_seconds: z.number().int().min(1).max(600).nullable(),
|
|
44
|
+
/**
|
|
45
|
+
* Agents whose runtime exposes a compatible lifecycle-event
|
|
46
|
+
* contract. Today the answer is always `['claude']` because no
|
|
47
|
+
* other coding agent (Codex, Gemini, Cursor, Continue, Cline, Amp,
|
|
48
|
+
* Aider) ships a comparable `PreToolUse`/`PostToolUse` API. The
|
|
49
|
+
* field exists so we can fan out — without a schema change — the
|
|
50
|
+
* moment those runtimes catch up. Attached server-side on every
|
|
51
|
+
* hook GET; not stored in the DB.
|
|
52
|
+
*/
|
|
53
|
+
supported_agents: z.array(z.enum(['claude'])).default(['claude']),
|
|
44
54
|
visibility: hookVisibilitySchema.default('public'),
|
|
45
55
|
source_repo: z.string().url().nullable(),
|
|
46
56
|
license: z.string().default('MIT'),
|