cursor-buddy 0.0.9 → 0.0.10-beta.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.
@@ -1,54 +0,0 @@
1
- import { tool } from "ai";
2
- import { z } from "zod";
3
- const pointTool = tool({
4
- description: "Visually point at something on the user's screen. Use this tool when the user asks you to locate, indicate, highlight, or show a specific visible target on screen. Prefer type 'marker' for interactive elements that have a marker. Use type 'coordinates' only for visible non-interactive content without a marker. Do not describe a pointing action in plain text instead of calling this tool. Call this tool at most once per response, and only after your spoken reply.",
5
- inputSchema: z.object({
6
- type: z.enum(["marker", "coordinates"]).describe("How to point. Use 'marker' for interactive elements that have a marker. Use 'coordinates' only for visible non-interactive content without a marker."),
7
- markerId: z.number().int().min(0).optional().describe("Required when type is 'marker'. The marker ID of the interactive element to point at."),
8
- x: z.number().int().min(0).optional().describe("Required when type is 'coordinates'. The horizontal pixel coordinate from the left edge of the screenshot (0 = leftmost). Must be within the screenshot width."),
9
- y: z.number().int().min(0).optional().describe("Required when type is 'coordinates'. The vertical pixel coordinate from the top edge of the screenshot (0 = topmost). Must be within the screenshot height."),
10
- label: z.string().min(1).max(24).describe("A very short label for the pointer bubble, ideally 2 to 4 words.")
11
- }).superRefine((value, ctx) => {
12
- if (value.type === "marker") {
13
- if (value.markerId == null) ctx.addIssue({
14
- code: z.ZodIssueCode.custom,
15
- path: ["markerId"],
16
- message: "markerId is required when type is 'marker'."
17
- });
18
- if (value.x != null) ctx.addIssue({
19
- code: z.ZodIssueCode.custom,
20
- path: ["x"],
21
- message: "x must not be provided when type is 'marker'."
22
- });
23
- if (value.y != null) ctx.addIssue({
24
- code: z.ZodIssueCode.custom,
25
- path: ["y"],
26
- message: "y must not be provided when type is 'marker'."
27
- });
28
- }
29
- if (value.type === "coordinates") {
30
- if (value.x == null) ctx.addIssue({
31
- code: z.ZodIssueCode.custom,
32
- path: ["x"],
33
- message: "x is required when type is 'coordinates'."
34
- });
35
- if (value.y == null) ctx.addIssue({
36
- code: z.ZodIssueCode.custom,
37
- path: ["y"],
38
- message: "y is required when type is 'coordinates'."
39
- });
40
- if (value.markerId != null) ctx.addIssue({
41
- code: z.ZodIssueCode.custom,
42
- path: ["markerId"],
43
- message: "markerId must not be provided when type is 'coordinates'."
44
- });
45
- }
46
- }),
47
- execute: async (params) => {
48
- return `Pointed at "${params.label}" on the user's screen.`;
49
- }
50
- });
51
- //#endregion
52
- export { pointTool as t };
53
-
54
- //# sourceMappingURL=point-tool-Cv39qylv.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"point-tool-Cv39qylv.mjs","names":[],"sources":["../src/shared/point-tool.ts"],"sourcesContent":["import { tool } from \"ai\"\nimport { z } from \"zod\"\n\nexport const pointToolInputSchema = z\n .object({\n type: z\n .enum([\"marker\", \"coordinates\"])\n .describe(\n \"How to point. Use 'marker' for interactive elements that have a marker. Use 'coordinates' only for visible non-interactive content without a marker.\",\n ),\n\n markerId: z\n .number()\n .int()\n .min(0)\n .optional()\n .describe(\n \"Required when type is 'marker'. The marker ID of the interactive element to point at.\",\n ),\n\n x: z\n .number()\n .int()\n .min(0)\n .optional()\n .describe(\n \"Required when type is 'coordinates'. The horizontal pixel coordinate from the left edge of the screenshot (0 = leftmost). Must be within the screenshot width.\",\n ),\n\n y: z\n .number()\n .int()\n .min(0)\n .optional()\n .describe(\n \"Required when type is 'coordinates'. The vertical pixel coordinate from the top edge of the screenshot (0 = topmost). Must be within the screenshot height.\",\n ),\n\n label: z\n .string()\n .min(1)\n .max(24)\n .describe(\n \"A very short label for the pointer bubble, ideally 2 to 4 words.\",\n ),\n })\n .superRefine((value, ctx) => {\n if (value.type === \"marker\") {\n if (value.markerId == null) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: [\"markerId\"],\n message: \"markerId is required when type is 'marker'.\",\n })\n }\n\n if (value.x != null) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: [\"x\"],\n message: \"x must not be provided when type is 'marker'.\",\n })\n }\n\n if (value.y != null) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: [\"y\"],\n message: \"y must not be provided when type is 'marker'.\",\n })\n }\n }\n\n if (value.type === \"coordinates\") {\n if (value.x == null) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: [\"x\"],\n message: \"x is required when type is 'coordinates'.\",\n })\n }\n\n if (value.y == null) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: [\"y\"],\n message: \"y is required when type is 'coordinates'.\",\n })\n }\n\n if (value.markerId != null) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: [\"markerId\"],\n message: \"markerId must not be provided when type is 'coordinates'.\",\n })\n }\n }\n })\n\nexport type PointToolInput = z.infer<typeof pointToolInputSchema>\n\nexport const pointTool = tool({\n description:\n \"Visually point at something on the user's screen. \" +\n \"Use this tool when the user asks you to locate, indicate, highlight, or show a specific visible target on screen. \" +\n \"Prefer type 'marker' for interactive elements that have a marker. \" +\n \"Use type 'coordinates' only for visible non-interactive content without a marker. \" +\n \"Do not describe a pointing action in plain text instead of calling this tool. \" +\n \"Call this tool at most once per response, and only after your spoken reply.\",\n\n inputSchema: pointToolInputSchema,\n\n execute: async (params) => {\n return `Pointed at \"${params.label}\" on the user's screen.`\n },\n})\n"],"mappings":";;AAsGA,MAAa,YAAY,KAAK;CAC5B,aACE;CAOF,aA5GkC,EACjC,OAAO;EACN,MAAM,EACH,KAAK,CAAC,UAAU,cAAc,CAAC,CAC/B,SACC,uJACD;EAEH,UAAU,EACP,QAAQ,CACR,KAAK,CACL,IAAI,EAAE,CACN,UAAU,CACV,SACC,wFACD;EAEH,GAAG,EACA,QAAQ,CACR,KAAK,CACL,IAAI,EAAE,CACN,UAAU,CACV,SACC,iKACD;EAEH,GAAG,EACA,QAAQ,CACR,KAAK,CACL,IAAI,EAAE,CACN,UAAU,CACV,SACC,8JACD;EAEH,OAAO,EACJ,QAAQ,CACR,IAAI,EAAE,CACN,IAAI,GAAG,CACP,SACC,mEACD;EACJ,CAAC,CACD,aAAa,OAAO,QAAQ;AAC3B,MAAI,MAAM,SAAS,UAAU;AAC3B,OAAI,MAAM,YAAY,KACpB,KAAI,SAAS;IACX,MAAM,EAAE,aAAa;IACrB,MAAM,CAAC,WAAW;IAClB,SAAS;IACV,CAAC;AAGJ,OAAI,MAAM,KAAK,KACb,KAAI,SAAS;IACX,MAAM,EAAE,aAAa;IACrB,MAAM,CAAC,IAAI;IACX,SAAS;IACV,CAAC;AAGJ,OAAI,MAAM,KAAK,KACb,KAAI,SAAS;IACX,MAAM,EAAE,aAAa;IACrB,MAAM,CAAC,IAAI;IACX,SAAS;IACV,CAAC;;AAIN,MAAI,MAAM,SAAS,eAAe;AAChC,OAAI,MAAM,KAAK,KACb,KAAI,SAAS;IACX,MAAM,EAAE,aAAa;IACrB,MAAM,CAAC,IAAI;IACX,SAAS;IACV,CAAC;AAGJ,OAAI,MAAM,KAAK,KACb,KAAI,SAAS;IACX,MAAM,EAAE,aAAa;IACrB,MAAM,CAAC,IAAI;IACX,SAAS;IACV,CAAC;AAGJ,OAAI,MAAM,YAAY,KACpB,KAAI,SAAS;IACX,MAAM,EAAE,aAAa;IACrB,MAAM,CAAC,WAAW;IAClB,SAAS;IACV,CAAC;;GAGN;CAeF,SAAS,OAAO,WAAW;AACzB,SAAO,eAAe,OAAO,MAAM;;CAEtC,CAAC"}
@@ -1,46 +0,0 @@
1
- import * as _$ai from "ai";
2
- import { z } from "zod";
3
-
4
- //#region src/shared/point-tool.d.ts
5
- declare const pointToolInputSchema: z.ZodEffects<z.ZodObject<{
6
- type: z.ZodEnum<["marker", "coordinates"]>;
7
- markerId: z.ZodOptional<z.ZodNumber>;
8
- x: z.ZodOptional<z.ZodNumber>;
9
- y: z.ZodOptional<z.ZodNumber>;
10
- label: z.ZodString;
11
- }, "strip", z.ZodTypeAny, {
12
- type: "marker" | "coordinates";
13
- label: string;
14
- markerId?: number | undefined;
15
- x?: number | undefined;
16
- y?: number | undefined;
17
- }, {
18
- type: "marker" | "coordinates";
19
- label: string;
20
- markerId?: number | undefined;
21
- x?: number | undefined;
22
- y?: number | undefined;
23
- }>, {
24
- type: "marker" | "coordinates";
25
- label: string;
26
- markerId?: number | undefined;
27
- x?: number | undefined;
28
- y?: number | undefined;
29
- }, {
30
- type: "marker" | "coordinates";
31
- label: string;
32
- markerId?: number | undefined;
33
- x?: number | undefined;
34
- y?: number | undefined;
35
- }>;
36
- type PointToolInput = z.infer<typeof pointToolInputSchema>;
37
- declare const pointTool: _$ai.Tool<{
38
- type: "marker" | "coordinates";
39
- label: string;
40
- markerId?: number | undefined;
41
- x?: number | undefined;
42
- y?: number | undefined;
43
- }, string>;
44
- //#endregion
45
- export { pointTool as n, PointToolInput as t };
46
- //# sourceMappingURL=point-tool-kIviMn1q.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"point-tool-kIviMn1q.d.mts","names":[],"sources":["../src/shared/point-tool.ts"],"mappings":";;;;cAGa,oBAAA,EAAoB,CAAA,CAAA,UAAA,CAAA,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAiGrB,cAAA,GAAiB,CAAA,CAAE,KAAA,QAAa,oBAAA;AAAA,cAE/B,SAAA,EAcX,IAAA,CAdoB,IAAA"}