@lightsage/mcp 0.4.15 → 0.4.17

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 (213) hide show
  1. package/README.md +2 -2
  2. package/api/mcp.js +30 -0
  3. package/bin/mcp-server.js +1766 -510
  4. package/bin/mcp-server.js.map +56 -25
  5. package/esm/funcs/agentAnalyticsCountriesList.d.ts +16 -0
  6. package/esm/funcs/agentAnalyticsCountriesList.d.ts.map +1 -0
  7. package/esm/funcs/agentAnalyticsCountriesList.js +94 -0
  8. package/esm/funcs/agentAnalyticsCountriesList.js.map +1 -0
  9. package/esm/funcs/agentAnalyticsErrorPagesList.d.ts +16 -0
  10. package/esm/funcs/agentAnalyticsErrorPagesList.d.ts.map +1 -0
  11. package/esm/funcs/agentAnalyticsErrorPagesList.js +96 -0
  12. package/esm/funcs/agentAnalyticsErrorPagesList.js.map +1 -0
  13. package/esm/funcs/agentAnalyticsPagesList.d.ts +16 -0
  14. package/esm/funcs/agentAnalyticsPagesList.d.ts.map +1 -0
  15. package/esm/funcs/agentAnalyticsPagesList.js +98 -0
  16. package/esm/funcs/agentAnalyticsPagesList.js.map +1 -0
  17. package/esm/funcs/agentAnalyticsSitesList.d.ts +15 -0
  18. package/esm/funcs/agentAnalyticsSitesList.d.ts.map +1 -0
  19. package/esm/funcs/agentAnalyticsSitesList.js +72 -0
  20. package/esm/funcs/agentAnalyticsSitesList.js.map +1 -0
  21. package/esm/funcs/agentAnalyticsSourcesList.d.ts +16 -0
  22. package/esm/funcs/agentAnalyticsSourcesList.d.ts.map +1 -0
  23. package/esm/funcs/agentAnalyticsSourcesList.js +93 -0
  24. package/esm/funcs/agentAnalyticsSourcesList.js.map +1 -0
  25. package/esm/funcs/agentAnalyticsSummaryRetrieve.d.ts +16 -0
  26. package/esm/funcs/agentAnalyticsSummaryRetrieve.d.ts.map +1 -0
  27. package/esm/funcs/agentAnalyticsSummaryRetrieve.js +93 -0
  28. package/esm/funcs/agentAnalyticsSummaryRetrieve.js.map +1 -0
  29. package/esm/funcs/tasksCreate.d.ts +16 -0
  30. package/esm/funcs/tasksCreate.d.ts.map +1 -0
  31. package/esm/funcs/tasksCreate.js +83 -0
  32. package/esm/funcs/tasksCreate.js.map +1 -0
  33. package/esm/landing-page.js +1 -1
  34. package/esm/lib/config.d.ts +2 -2
  35. package/esm/lib/config.js +2 -2
  36. package/esm/mcp-server/mcp-server.js +1 -1
  37. package/esm/mcp-server/server.d.ts.map +1 -1
  38. package/esm/mcp-server/server.js +15 -1
  39. package/esm/mcp-server/server.js.map +1 -1
  40. package/esm/mcp-server/tools/agentAnalyticsCountriesList.d.ts +7 -0
  41. package/esm/mcp-server/tools/agentAnalyticsCountriesList.d.ts.map +1 -0
  42. package/esm/mcp-server/tools/agentAnalyticsCountriesList.js +35 -0
  43. package/esm/mcp-server/tools/agentAnalyticsCountriesList.js.map +1 -0
  44. package/esm/mcp-server/tools/agentAnalyticsErrorPagesList.d.ts +7 -0
  45. package/esm/mcp-server/tools/agentAnalyticsErrorPagesList.d.ts.map +1 -0
  46. package/esm/mcp-server/tools/agentAnalyticsErrorPagesList.js +35 -0
  47. package/esm/mcp-server/tools/agentAnalyticsErrorPagesList.js.map +1 -0
  48. package/esm/mcp-server/tools/agentAnalyticsPagesList.d.ts +7 -0
  49. package/esm/mcp-server/tools/agentAnalyticsPagesList.d.ts.map +1 -0
  50. package/esm/mcp-server/tools/agentAnalyticsPagesList.js +35 -0
  51. package/esm/mcp-server/tools/agentAnalyticsPagesList.js.map +1 -0
  52. package/esm/mcp-server/tools/agentAnalyticsSitesList.d.ts +3 -0
  53. package/esm/mcp-server/tools/agentAnalyticsSitesList.d.ts.map +1 -0
  54. package/esm/mcp-server/tools/agentAnalyticsSitesList.js +30 -0
  55. package/esm/mcp-server/tools/agentAnalyticsSitesList.js.map +1 -0
  56. package/esm/mcp-server/tools/agentAnalyticsSourcesList.d.ts +7 -0
  57. package/esm/mcp-server/tools/agentAnalyticsSourcesList.d.ts.map +1 -0
  58. package/esm/mcp-server/tools/agentAnalyticsSourcesList.js +35 -0
  59. package/esm/mcp-server/tools/agentAnalyticsSourcesList.js.map +1 -0
  60. package/esm/mcp-server/tools/agentAnalyticsSummaryRetrieve.d.ts +7 -0
  61. package/esm/mcp-server/tools/agentAnalyticsSummaryRetrieve.d.ts.map +1 -0
  62. package/esm/mcp-server/tools/agentAnalyticsSummaryRetrieve.js +35 -0
  63. package/esm/mcp-server/tools/agentAnalyticsSummaryRetrieve.js.map +1 -0
  64. package/esm/mcp-server/tools/tasksCreate.d.ts +7 -0
  65. package/esm/mcp-server/tools/tasksCreate.d.ts.map +1 -0
  66. package/esm/mcp-server/tools/tasksCreate.js +35 -0
  67. package/esm/mcp-server/tools/tasksCreate.js.map +1 -0
  68. package/esm/models/createtaskrequest.d.ts +65 -0
  69. package/esm/models/createtaskrequest.d.ts.map +1 -0
  70. package/esm/models/createtaskrequest.js +64 -0
  71. package/esm/models/createtaskrequest.js.map +1 -0
  72. package/esm/models/graderdefinition.d.ts +15 -0
  73. package/esm/models/graderdefinition.d.ts.map +1 -1
  74. package/esm/models/graderdefinition.js +13 -0
  75. package/esm/models/graderdefinition.js.map +1 -1
  76. package/esm/models/publicagentanalyticscountrylistresponse.d.ts +10 -0
  77. package/esm/models/publicagentanalyticscountrylistresponse.d.ts.map +1 -0
  78. package/esm/models/publicagentanalyticscountrylistresponse.js +13 -0
  79. package/esm/models/publicagentanalyticscountrylistresponse.js.map +1 -0
  80. package/esm/models/publicagentanalyticserrorpagelistresponse.d.ts +11 -0
  81. package/esm/models/publicagentanalyticserrorpagelistresponse.d.ts.map +1 -0
  82. package/esm/models/publicagentanalyticserrorpagelistresponse.js +14 -0
  83. package/esm/models/publicagentanalyticserrorpagelistresponse.js.map +1 -0
  84. package/esm/models/publicagentanalyticspagelistresponse.d.ts +11 -0
  85. package/esm/models/publicagentanalyticspagelistresponse.d.ts.map +1 -0
  86. package/esm/models/publicagentanalyticspagelistresponse.js +14 -0
  87. package/esm/models/publicagentanalyticspagelistresponse.js.map +1 -0
  88. package/esm/models/publicagentanalyticssite.d.ts +9 -0
  89. package/esm/models/publicagentanalyticssite.d.ts.map +1 -0
  90. package/esm/models/publicagentanalyticssite.js +12 -0
  91. package/esm/models/publicagentanalyticssite.js.map +1 -0
  92. package/esm/models/publicagentanalyticssitelistresponse.d.ts +7 -0
  93. package/esm/models/publicagentanalyticssitelistresponse.d.ts.map +1 -0
  94. package/esm/models/publicagentanalyticssitelistresponse.js +10 -0
  95. package/esm/models/publicagentanalyticssitelistresponse.js.map +1 -0
  96. package/esm/models/publicagentanalyticssourcelistresponse.d.ts +10 -0
  97. package/esm/models/publicagentanalyticssourcelistresponse.d.ts.map +1 -0
  98. package/esm/models/publicagentanalyticssourcelistresponse.js +13 -0
  99. package/esm/models/publicagentanalyticssourcelistresponse.js.map +1 -0
  100. package/esm/models/publicagentanalyticssummary.d.ts +11 -0
  101. package/esm/models/publicagentanalyticssummary.d.ts.map +1 -0
  102. package/esm/models/publicagentanalyticssummary.js +14 -0
  103. package/esm/models/publicagentanalyticssummary.js.map +1 -0
  104. package/esm/models/publicagentcountry.d.ts +7 -0
  105. package/esm/models/publicagentcountry.d.ts.map +1 -0
  106. package/esm/models/publicagentcountry.js +11 -0
  107. package/esm/models/publicagentcountry.js.map +1 -0
  108. package/esm/models/publicagenterrorpage.d.ts +12 -0
  109. package/esm/models/publicagenterrorpage.d.ts.map +1 -0
  110. package/esm/models/publicagenterrorpage.js +16 -0
  111. package/esm/models/publicagenterrorpage.js.map +1 -0
  112. package/esm/models/publicagenterrorsource.d.ts +40 -0
  113. package/esm/models/publicagenterrorsource.d.ts.map +1 -0
  114. package/esm/models/publicagenterrorsource.js +40 -0
  115. package/esm/models/publicagenterrorsource.js.map +1 -0
  116. package/esm/models/publicagenttrafficpage.d.ts +14 -0
  117. package/esm/models/publicagenttrafficpage.d.ts.map +1 -0
  118. package/esm/models/publicagenttrafficpage.js +17 -0
  119. package/esm/models/publicagenttrafficpage.js.map +1 -0
  120. package/esm/models/publicagenttrafficsource.d.ts +47 -0
  121. package/esm/models/publicagenttrafficsource.d.ts.map +1 -0
  122. package/esm/models/publicagenttrafficsource.js +44 -0
  123. package/esm/models/publicagenttrafficsource.js.map +1 -0
  124. package/esm/models/publicagenttraffictotals.d.ts +13 -0
  125. package/esm/models/publicagenttraffictotals.d.ts.map +1 -0
  126. package/esm/models/publicagenttraffictotals.js +16 -0
  127. package/esm/models/publicagenttraffictotals.js.map +1 -0
  128. package/esm/models/updatetaskrequest.d.ts +8 -8
  129. package/esm/models/updatetaskrequest.d.ts.map +1 -1
  130. package/esm/models/updatetaskrequest.js +6 -6
  131. package/esm/models/updatetaskrequest.js.map +1 -1
  132. package/esm/models/v2agentanalyticscountrieslistop.d.ts +13 -0
  133. package/esm/models/v2agentanalyticscountrieslistop.d.ts.map +1 -0
  134. package/esm/models/v2agentanalyticscountrieslistop.js +18 -0
  135. package/esm/models/v2agentanalyticscountrieslistop.js.map +1 -0
  136. package/esm/models/v2agentanalyticserrorpageslistop.d.ts +39 -0
  137. package/esm/models/v2agentanalyticserrorpageslistop.d.ts.map +1 -0
  138. package/esm/models/v2agentanalyticserrorpageslistop.js +39 -0
  139. package/esm/models/v2agentanalyticserrorpageslistop.js.map +1 -0
  140. package/esm/models/v2agentanalyticspageslistop.d.ts +68 -0
  141. package/esm/models/v2agentanalyticspageslistop.d.ts.map +1 -0
  142. package/esm/models/v2agentanalyticspageslistop.js +65 -0
  143. package/esm/models/v2agentanalyticspageslistop.js.map +1 -0
  144. package/esm/models/v2agentanalyticssourceslistop.d.ts +12 -0
  145. package/esm/models/v2agentanalyticssourceslistop.d.ts.map +1 -0
  146. package/esm/models/v2agentanalyticssourceslistop.js +17 -0
  147. package/esm/models/v2agentanalyticssourceslistop.js.map +1 -0
  148. package/esm/models/v2agentanalyticssummaryretrieveop.d.ts +12 -0
  149. package/esm/models/v2agentanalyticssummaryretrieveop.d.ts.map +1 -0
  150. package/esm/models/v2agentanalyticssummaryretrieveop.js +17 -0
  151. package/esm/models/v2agentanalyticssummaryretrieveop.js.map +1 -0
  152. package/esm/models/v2inlinemcpdefinition.js +1 -1
  153. package/esm/models/v2inlinemcpdefinition.js.map +1 -1
  154. package/esm/models/v2publictask.js +1 -1
  155. package/esm/models/v2publictask.js.map +1 -1
  156. package/esm/models/v2repository.d.ts +4 -4
  157. package/esm/models/v2repository.d.ts.map +1 -1
  158. package/esm/models/v2repository.js +3 -3
  159. package/esm/models/v2repository.js.map +1 -1
  160. package/esm/models/v2taskscreateop.d.ts +13 -0
  161. package/esm/models/v2taskscreateop.d.ts.map +1 -0
  162. package/esm/models/v2taskscreateop.js +16 -0
  163. package/esm/models/v2taskscreateop.js.map +1 -0
  164. package/esm/tool-names.d.ts.map +1 -1
  165. package/esm/tool-names.js +28 -0
  166. package/esm/tool-names.js.map +1 -1
  167. package/lib/tracker.js +219 -0
  168. package/package.json +3 -1
  169. package/src/funcs/agentAnalyticsCountriesList.ts +159 -0
  170. package/src/funcs/agentAnalyticsErrorPagesList.ts +161 -0
  171. package/src/funcs/agentAnalyticsPagesList.ts +163 -0
  172. package/src/funcs/agentAnalyticsSitesList.ts +124 -0
  173. package/src/funcs/agentAnalyticsSourcesList.ts +158 -0
  174. package/src/funcs/agentAnalyticsSummaryRetrieve.ts +158 -0
  175. package/src/funcs/tasksCreate.ts +145 -0
  176. package/src/landing-page.ts +1 -1
  177. package/src/lib/config.ts +2 -2
  178. package/src/mcp-server/mcp-server.ts +1 -1
  179. package/src/mcp-server/server.ts +15 -1
  180. package/src/mcp-server/tools/agentAnalyticsCountriesList.ts +43 -0
  181. package/src/mcp-server/tools/agentAnalyticsErrorPagesList.ts +43 -0
  182. package/src/mcp-server/tools/agentAnalyticsPagesList.ts +43 -0
  183. package/src/mcp-server/tools/agentAnalyticsSitesList.ts +36 -0
  184. package/src/mcp-server/tools/agentAnalyticsSourcesList.ts +43 -0
  185. package/src/mcp-server/tools/agentAnalyticsSummaryRetrieve.ts +43 -0
  186. package/src/mcp-server/tools/tasksCreate.ts +43 -0
  187. package/src/models/createtaskrequest.ts +98 -0
  188. package/src/models/graderdefinition.ts +20 -0
  189. package/src/models/publicagentanalyticscountrylistresponse.ts +28 -0
  190. package/src/models/publicagentanalyticserrorpagelistresponse.ts +32 -0
  191. package/src/models/publicagentanalyticspagelistresponse.ts +30 -0
  192. package/src/models/publicagentanalyticssite.ts +26 -0
  193. package/src/models/publicagentanalyticssitelistresponse.ts +20 -0
  194. package/src/models/publicagentanalyticssourcelistresponse.ts +28 -0
  195. package/src/models/publicagentanalyticssummary.ts +28 -0
  196. package/src/models/publicagentcountry.ts +16 -0
  197. package/src/models/publicagenterrorpage.ts +35 -0
  198. package/src/models/publicagenterrorsource.ts +63 -0
  199. package/src/models/publicagenttrafficpage.ts +46 -0
  200. package/src/models/publicagenttrafficsource.ts +77 -0
  201. package/src/models/publicagenttraffictotals.ts +42 -0
  202. package/src/models/updatetaskrequest.ts +14 -10
  203. package/src/models/v2agentanalyticscountrieslistop.ts +45 -0
  204. package/src/models/v2agentanalyticserrorpageslistop.ts +79 -0
  205. package/src/models/v2agentanalyticspageslistop.ts +119 -0
  206. package/src/models/v2agentanalyticssourceslistop.ts +43 -0
  207. package/src/models/v2agentanalyticssummaryretrieveop.ts +43 -0
  208. package/src/models/v2inlinemcpdefinition.ts +1 -1
  209. package/src/models/v2publictask.ts +1 -1
  210. package/src/models/v2repository.ts +5 -5
  211. package/src/models/v2taskscreateop.ts +34 -0
  212. package/src/tool-names.ts +28 -0
  213. package/test/tracker.test.js +323 -0
@@ -0,0 +1,36 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: d95f6428bdb2
4
+ */
5
+
6
+ import { agentAnalyticsSitesList } from "../../funcs/agentAnalyticsSitesList.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ export const tool$agentAnalyticsSitesList: ToolDefinition = {
10
+ name: "agent-analytics-sites-list",
11
+ description: `List Agent Analytics Sites
12
+
13
+ Returns every site with tracked visits. Use a \`site_id\` from this list to read that site's agent traffic.`,
14
+ annotations: {
15
+ "title": "",
16
+ "destructiveHint": false,
17
+ "idempotentHint": false,
18
+ "openWorldHint": false,
19
+ "readOnlyHint": true,
20
+ },
21
+ tool: async (client, ctx) => {
22
+ const [result] = await agentAnalyticsSitesList(
23
+ client,
24
+ { fetchOptions: { signal: ctx.signal } },
25
+ ).$inspect();
26
+
27
+ if (!result.ok) {
28
+ return {
29
+ content: [{ type: "text", text: result.error.message }],
30
+ isError: true,
31
+ };
32
+ }
33
+
34
+ return formatResult(result.value);
35
+ },
36
+ };
@@ -0,0 +1,43 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 866f96a4dbca
4
+ */
5
+
6
+ import { agentAnalyticsSourcesList } from "../../funcs/agentAnalyticsSourcesList.js";
7
+ import { V2AgentAnalyticsSourcesListRequest$zodSchema } from "../../models/v2agentanalyticssourceslistop.js";
8
+ import { formatResult, ToolDefinition } from "../tools.js";
9
+
10
+ const args = {
11
+ request: V2AgentAnalyticsSourcesListRequest$zodSchema,
12
+ };
13
+
14
+ export const tool$agentAnalyticsSourcesList: ToolDefinition<typeof args> = {
15
+ name: "agent-analytics-sources-list",
16
+ description: `List Agent Analytics Sources
17
+
18
+ Returns every coding agent and bot that visited a site in the date range, with its traffic type and visit count, most visits first. Human visits are one \`people\` row.`,
19
+ annotations: {
20
+ "title": "",
21
+ "destructiveHint": false,
22
+ "idempotentHint": false,
23
+ "openWorldHint": false,
24
+ "readOnlyHint": true,
25
+ },
26
+ args,
27
+ tool: async (client, args, ctx) => {
28
+ const [result] = await agentAnalyticsSourcesList(
29
+ client,
30
+ args.request,
31
+ { fetchOptions: { signal: ctx.signal } },
32
+ ).$inspect();
33
+
34
+ if (!result.ok) {
35
+ return {
36
+ content: [{ type: "text", text: result.error.message }],
37
+ isError: true,
38
+ };
39
+ }
40
+
41
+ return formatResult(result.value);
42
+ },
43
+ };
@@ -0,0 +1,43 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 40ea59809461
4
+ */
5
+
6
+ import { agentAnalyticsSummaryRetrieve } from "../../funcs/agentAnalyticsSummaryRetrieve.js";
7
+ import { V2AgentAnalyticsSummaryRetrieveRequest$zodSchema } from "../../models/v2agentanalyticssummaryretrieveop.js";
8
+ import { formatResult, ToolDefinition } from "../tools.js";
9
+
10
+ const args = {
11
+ request: V2AgentAnalyticsSummaryRetrieveRequest$zodSchema,
12
+ };
13
+
14
+ export const tool$agentAnalyticsSummaryRetrieve: ToolDefinition<typeof args> = {
15
+ name: "agent-analytics-summary-retrieve",
16
+ description: `Retrieve Agent Analytics Summary
17
+
18
+ Returns a site's visits by traffic type (coding agents, user-requested AI fetches, AI search, AI training, other bots, and people) for the date range and for the same number of days before it.`,
19
+ annotations: {
20
+ "title": "",
21
+ "destructiveHint": false,
22
+ "idempotentHint": false,
23
+ "openWorldHint": false,
24
+ "readOnlyHint": true,
25
+ },
26
+ args,
27
+ tool: async (client, args, ctx) => {
28
+ const [result] = await agentAnalyticsSummaryRetrieve(
29
+ client,
30
+ args.request,
31
+ { fetchOptions: { signal: ctx.signal } },
32
+ ).$inspect();
33
+
34
+ if (!result.ok) {
35
+ return {
36
+ content: [{ type: "text", text: result.error.message }],
37
+ isError: true,
38
+ };
39
+ }
40
+
41
+ return formatResult(result.value);
42
+ },
43
+ };
@@ -0,0 +1,43 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 6713b53d6c00
4
+ */
5
+
6
+ import { tasksCreate } from "../../funcs/tasksCreate.js";
7
+ import { CreateTaskRequest$zodSchema } from "../../models/createtaskrequest.js";
8
+ import { formatResult, ToolDefinition } from "../tools.js";
9
+
10
+ const args = {
11
+ request: CreateTaskRequest$zodSchema,
12
+ };
13
+
14
+ export const tool$tasksCreate: ToolDefinition<typeof args> = {
15
+ name: "tasks-create",
16
+ description: `Create Task
17
+
18
+ Adds a task to today's queue and returns it with its execution prompt. New tasks start as \`new\`.`,
19
+ annotations: {
20
+ "title": "",
21
+ "destructiveHint": false,
22
+ "idempotentHint": false,
23
+ "openWorldHint": false,
24
+ "readOnlyHint": false,
25
+ },
26
+ args,
27
+ tool: async (client, args, ctx) => {
28
+ const [result] = await tasksCreate(
29
+ client,
30
+ args.request,
31
+ { fetchOptions: { signal: ctx.signal } },
32
+ ).$inspect();
33
+
34
+ if (!result.ok) {
35
+ return {
36
+ content: [{ type: "text", text: result.error.message }],
37
+ isError: true,
38
+ };
39
+ }
40
+
41
+ return formatResult(result.value);
42
+ },
43
+ };
@@ -0,0 +1,98 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 1f765de65bb3
4
+ */
5
+
6
+ import * as z from "zod";
7
+ import { ClosedEnum } from "../types/enums.js";
8
+
9
+ export const TaskType = {
10
+ Create: "Create",
11
+ Refresh: "Refresh",
12
+ WinBack: "Win back",
13
+ Outreach: "Outreach",
14
+ Community: "Community",
15
+ Docs: "Docs",
16
+ Redirect: "Redirect",
17
+ } as const;
18
+ export type TaskType = ClosedEnum<typeof TaskType>;
19
+
20
+ export const TaskType$zodSchema = z.enum([
21
+ "Create",
22
+ "Refresh",
23
+ "Win back",
24
+ "Outreach",
25
+ "Community",
26
+ "Docs",
27
+ "Redirect",
28
+ ]);
29
+
30
+ export const Effort = {
31
+ Low: "Low",
32
+ Medium: "Medium",
33
+ High: "High",
34
+ } as const;
35
+ export type Effort = ClosedEnum<typeof Effort>;
36
+
37
+ export const Effort$zodSchema = z.enum([
38
+ "Low",
39
+ "Medium",
40
+ "High",
41
+ ]);
42
+
43
+ export const CreateTaskRequestPriority = {
44
+ Urgent: "urgent",
45
+ High: "high",
46
+ Medium: "medium",
47
+ Low: "low",
48
+ } as const;
49
+ export type CreateTaskRequestPriority = ClosedEnum<
50
+ typeof CreateTaskRequestPriority
51
+ >;
52
+
53
+ export const CreateTaskRequestPriority$zodSchema = z.enum([
54
+ "urgent",
55
+ "high",
56
+ "medium",
57
+ "low",
58
+ ]);
59
+
60
+ export const CreateTaskRequestActionType = {
61
+ AgentDiscovery: "agent_discovery",
62
+ AgentUsability: "agent_usability",
63
+ } as const;
64
+ export type CreateTaskRequestActionType = ClosedEnum<
65
+ typeof CreateTaskRequestActionType
66
+ >;
67
+
68
+ export const CreateTaskRequestActionType$zodSchema = z.enum([
69
+ "agent_discovery",
70
+ "agent_usability",
71
+ ]);
72
+
73
+ export type CreateTaskRequest = {
74
+ title: string;
75
+ description?: string | undefined;
76
+ task_type?: TaskType | undefined;
77
+ effort?: Effort | undefined;
78
+ priority?: CreateTaskRequestPriority | undefined;
79
+ action_type?: CreateTaskRequestActionType | undefined;
80
+ assignee_user_id?: string | undefined;
81
+ };
82
+
83
+ export const CreateTaskRequest$zodSchema: z.ZodType<CreateTaskRequest> = z
84
+ .object({
85
+ action_type: CreateTaskRequestActionType$zodSchema.default(
86
+ "agent_discovery",
87
+ ),
88
+ assignee_user_id: z.string().optional().describe(
89
+ "A member of your organization to assign the task to. They are emailed unless they have turned off task notifications.",
90
+ ),
91
+ description: z.string().optional().describe(
92
+ "A Markdown description of what to do and why.",
93
+ ),
94
+ effort: Effort$zodSchema.default("Medium"),
95
+ priority: CreateTaskRequestPriority$zodSchema.default("medium"),
96
+ task_type: TaskType$zodSchema.default("Create"),
97
+ title: z.string(),
98
+ });
@@ -4,6 +4,20 @@
4
4
  */
5
5
 
6
6
  import * as z from "zod";
7
+ import { ClosedEnum } from "../types/enums.js";
8
+
9
+ export const Metric = {
10
+ ToolCalls: "tool_calls",
11
+ Time: "time",
12
+ Cost: "cost",
13
+ } as const;
14
+ export type Metric = ClosedEnum<typeof Metric>;
15
+
16
+ export const Metric$zodSchema = z.enum([
17
+ "tool_calls",
18
+ "time",
19
+ "cost",
20
+ ]);
7
21
 
8
22
  export type GraderDefinition = {
9
23
  name: string;
@@ -13,6 +27,9 @@ export type GraderDefinition = {
13
27
  pattern?: string | null | undefined;
14
28
  case_sensitive?: boolean | undefined;
15
29
  criteria?: string | null | undefined;
30
+ metric?: Metric | null | undefined;
31
+ min_score?: number | null | undefined;
32
+ max_value?: number | null | undefined;
16
33
  weight?: number | undefined;
17
34
  blocking?: boolean | undefined;
18
35
  };
@@ -24,6 +41,9 @@ export const GraderDefinition$zodSchema: z.ZodType<GraderDefinition> = z.object(
24
41
  ),
25
42
  case_sensitive: z.boolean().default(false),
26
43
  criteria: z.string().nullable().optional(),
44
+ max_value: z.number().nullable().optional(),
45
+ metric: Metric$zodSchema.nullable().optional(),
46
+ min_score: z.number().nullable().optional(),
27
47
  name: z.string(),
28
48
  needle: z.string().nullable().optional(),
29
49
  needles: z.array(z.string()).nullable().optional(),
@@ -0,0 +1,28 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 86f3c9d1075f
4
+ */
5
+
6
+ import * as z from "zod";
7
+ import {
8
+ PublicAgentCountry,
9
+ PublicAgentCountry$zodSchema,
10
+ } from "./publicagentcountry.js";
11
+
12
+ export type PublicAgentAnalyticsCountryListResponse = {
13
+ site_id: string;
14
+ start_date: string;
15
+ end_date: string;
16
+ countries?: Array<PublicAgentCountry> | undefined;
17
+ };
18
+
19
+ export const PublicAgentAnalyticsCountryListResponse$zodSchema: z.ZodType<
20
+ PublicAgentAnalyticsCountryListResponse
21
+ > = z.object({
22
+ countries: z.array(PublicAgentCountry$zodSchema).optional().describe(
23
+ "Visits from coding agents and AI assistants per country, most visits first. The country is located from the IP address the request came from. For hosted assistants such as ChatGPT that is usually the provider's servers, not the person who asked; for coding agents it is usually the developer's machine.",
24
+ ),
25
+ end_date: z.string().date(),
26
+ site_id: z.string(),
27
+ start_date: z.string().date(),
28
+ });
@@ -0,0 +1,32 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: add3275aa752
4
+ */
5
+
6
+ import * as z from "zod";
7
+ import {
8
+ PublicAgentErrorPage,
9
+ PublicAgentErrorPage$zodSchema,
10
+ } from "./publicagenterrorpage.js";
11
+
12
+ export type PublicAgentAnalyticsErrorPageListResponse = {
13
+ site_id: string;
14
+ start_date: string;
15
+ end_date: string;
16
+ status_codes_tracked: boolean;
17
+ pages?: Array<PublicAgentErrorPage> | undefined;
18
+ };
19
+
20
+ export const PublicAgentAnalyticsErrorPageListResponse$zodSchema: z.ZodType<
21
+ PublicAgentAnalyticsErrorPageListResponse
22
+ > = z.object({
23
+ end_date: z.string().date(),
24
+ pages: z.array(PublicAgentErrorPage$zodSchema).optional().describe(
25
+ "Most error requests first.",
26
+ ),
27
+ site_id: z.string(),
28
+ start_date: z.string().date(),
29
+ status_codes_tracked: z.boolean().describe(
30
+ "Whether any request to the site in the date range reported a status code. Status codes come from server-side tracking such as a log drain or middleware; when this is false, an empty `pages` list does not mean there were no errors.",
31
+ ),
32
+ });
@@ -0,0 +1,30 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 3c92a38d9c87
4
+ */
5
+
6
+ import * as z from "zod";
7
+ import {
8
+ PublicAgentTrafficPage,
9
+ PublicAgentTrafficPage$zodSchema,
10
+ } from "./publicagenttrafficpage.js";
11
+
12
+ export type PublicAgentAnalyticsPageListResponse = {
13
+ site_id: string;
14
+ start_date: string;
15
+ end_date: string;
16
+ agent?: string | null | undefined;
17
+ pages?: Array<PublicAgentTrafficPage> | undefined;
18
+ };
19
+
20
+ export const PublicAgentAnalyticsPageListResponse$zodSchema: z.ZodType<
21
+ PublicAgentAnalyticsPageListResponse
22
+ > = z.object({
23
+ agent: z.string().nullable().optional().describe(
24
+ "The coding agent the pages were filtered to, when `agent` was set. Its visits are in `coding` and `ai_total`; the other counts are 0.",
25
+ ),
26
+ end_date: z.string().date(),
27
+ pages: z.array(PublicAgentTrafficPage$zodSchema).optional(),
28
+ site_id: z.string(),
29
+ start_date: z.string().date(),
30
+ });
@@ -0,0 +1,26 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 89d624aea6b6
4
+ */
5
+
6
+ import * as z from "zod";
7
+
8
+ export type PublicAgentAnalyticsSite = {
9
+ site_id: string;
10
+ domain: string;
11
+ source?: string | null | undefined;
12
+ created_at?: string | null | undefined;
13
+ };
14
+
15
+ export const PublicAgentAnalyticsSite$zodSchema: z.ZodType<
16
+ PublicAgentAnalyticsSite
17
+ > = z.object({
18
+ created_at: z.string().nullable().optional().describe(
19
+ "When the first tracked visit created the site.",
20
+ ),
21
+ domain: z.string(),
22
+ site_id: z.string(),
23
+ source: z.string().nullable().optional().describe(
24
+ "Kind of site: `website`, `docs`, `app`, or `blog`.",
25
+ ),
26
+ });
@@ -0,0 +1,20 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 3e8ea7d7a375
4
+ */
5
+
6
+ import * as z from "zod";
7
+ import {
8
+ PublicAgentAnalyticsSite,
9
+ PublicAgentAnalyticsSite$zodSchema,
10
+ } from "./publicagentanalyticssite.js";
11
+
12
+ export type PublicAgentAnalyticsSiteListResponse = {
13
+ sites?: Array<PublicAgentAnalyticsSite> | undefined;
14
+ };
15
+
16
+ export const PublicAgentAnalyticsSiteListResponse$zodSchema: z.ZodType<
17
+ PublicAgentAnalyticsSiteListResponse
18
+ > = z.object({
19
+ sites: z.array(PublicAgentAnalyticsSite$zodSchema).optional(),
20
+ });
@@ -0,0 +1,28 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 10a8263b1d4c
4
+ */
5
+
6
+ import * as z from "zod";
7
+ import {
8
+ PublicAgentTrafficSource,
9
+ PublicAgentTrafficSource$zodSchema,
10
+ } from "./publicagenttrafficsource.js";
11
+
12
+ export type PublicAgentAnalyticsSourceListResponse = {
13
+ site_id: string;
14
+ start_date: string;
15
+ end_date: string;
16
+ sources?: Array<PublicAgentTrafficSource> | undefined;
17
+ };
18
+
19
+ export const PublicAgentAnalyticsSourceListResponse$zodSchema: z.ZodType<
20
+ PublicAgentAnalyticsSourceListResponse
21
+ > = z.object({
22
+ end_date: z.string().date(),
23
+ site_id: z.string(),
24
+ sources: z.array(PublicAgentTrafficSource$zodSchema).optional().describe(
25
+ "Most visits first.",
26
+ ),
27
+ start_date: z.string().date(),
28
+ });
@@ -0,0 +1,28 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 6705efe0cd12
4
+ */
5
+
6
+ import * as z from "zod";
7
+ import {
8
+ PublicAgentTrafficTotals,
9
+ PublicAgentTrafficTotals$zodSchema,
10
+ } from "./publicagenttraffictotals.js";
11
+
12
+ export type PublicAgentAnalyticsSummary = {
13
+ site_id: string;
14
+ start_date: string;
15
+ end_date: string;
16
+ current: PublicAgentTrafficTotals;
17
+ previous: PublicAgentTrafficTotals;
18
+ };
19
+
20
+ export const PublicAgentAnalyticsSummary$zodSchema: z.ZodType<
21
+ PublicAgentAnalyticsSummary
22
+ > = z.object({
23
+ current: PublicAgentTrafficTotals$zodSchema,
24
+ end_date: z.string().date(),
25
+ previous: PublicAgentTrafficTotals$zodSchema,
26
+ site_id: z.string(),
27
+ start_date: z.string().date(),
28
+ });
@@ -0,0 +1,16 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: d45f08c86764
4
+ */
5
+
6
+ import * as z from "zod";
7
+
8
+ export type PublicAgentCountry = { country: string; visits: number };
9
+
10
+ export const PublicAgentCountry$zodSchema: z.ZodType<PublicAgentCountry> = z
11
+ .object({
12
+ country: z.string().describe(
13
+ "Two-letter ISO country code of the request, or `unknown`.",
14
+ ),
15
+ visits: z.int(),
16
+ });
@@ -0,0 +1,35 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: b42d4a9d83b6
4
+ */
5
+
6
+ import * as z from "zod";
7
+ import {
8
+ PublicAgentErrorSource,
9
+ PublicAgentErrorSource$zodSchema,
10
+ } from "./publicagenterrorsource.js";
11
+
12
+ export type PublicAgentErrorPage = {
13
+ path: string;
14
+ status_code: number;
15
+ visits: number;
16
+ ai_visits: number;
17
+ last_seen?: string | null | undefined;
18
+ sources?: Array<PublicAgentErrorSource> | undefined;
19
+ };
20
+
21
+ export const PublicAgentErrorPage$zodSchema: z.ZodType<PublicAgentErrorPage> = z
22
+ .object({
23
+ ai_visits: z.int().describe(
24
+ "Of `visits`, those from coding agents and AI bots.",
25
+ ),
26
+ last_seen: z.string().nullable().optional().describe(
27
+ "Time of the latest error.",
28
+ ),
29
+ path: z.string(),
30
+ sources: z.array(PublicAgentErrorSource$zodSchema).optional().describe(
31
+ "Who got the error, most requests first.",
32
+ ),
33
+ status_code: z.int().describe("HTTP status returned, such as 404."),
34
+ visits: z.int().describe("Requests to this path that got this status."),
35
+ });
@@ -0,0 +1,63 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 3682193b0636
4
+ */
5
+
6
+ import * as z from "zod";
7
+ import { ClosedEnum } from "../types/enums.js";
8
+
9
+ export const PublicAgentErrorSourceKind = {
10
+ Agent: "agent",
11
+ Bot: "bot",
12
+ Other: "other",
13
+ People: "people",
14
+ } as const;
15
+ export type PublicAgentErrorSourceKind = ClosedEnum<
16
+ typeof PublicAgentErrorSourceKind
17
+ >;
18
+
19
+ export const PublicAgentErrorSourceKind$zodSchema = z.enum([
20
+ "agent",
21
+ "bot",
22
+ "other",
23
+ "people",
24
+ ]);
25
+
26
+ export const PublicAgentErrorSourceType = {
27
+ Coding: "coding",
28
+ User: "user",
29
+ Search: "search",
30
+ Training: "training",
31
+ Other: "other",
32
+ People: "people",
33
+ } as const;
34
+ export type PublicAgentErrorSourceType = ClosedEnum<
35
+ typeof PublicAgentErrorSourceType
36
+ >;
37
+
38
+ export const PublicAgentErrorSourceType$zodSchema = z.enum([
39
+ "coding",
40
+ "user",
41
+ "search",
42
+ "training",
43
+ "other",
44
+ "people",
45
+ ]);
46
+
47
+ export type PublicAgentErrorSource = {
48
+ name: string;
49
+ kind: PublicAgentErrorSourceKind;
50
+ type: PublicAgentErrorSourceType;
51
+ visits: number;
52
+ };
53
+
54
+ export const PublicAgentErrorSource$zodSchema: z.ZodType<
55
+ PublicAgentErrorSource
56
+ > = z.object({
57
+ kind: PublicAgentErrorSourceKind$zodSchema,
58
+ name: z.string().describe(
59
+ "Agent or bot name, as in the traffic sources list, or `people`.",
60
+ ),
61
+ type: PublicAgentErrorSourceType$zodSchema,
62
+ visits: z.int().describe("Requests from this source that got the error."),
63
+ });
@@ -0,0 +1,46 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 017b350c494c
4
+ */
5
+
6
+ import * as z from "zod";
7
+
8
+ export type PublicAgentTrafficPage = {
9
+ path: string;
10
+ coding: number;
11
+ user: number;
12
+ search: number;
13
+ training: number;
14
+ other: number;
15
+ people: number;
16
+ ai_total: number;
17
+ last_seen?: string | null | undefined;
18
+ };
19
+
20
+ export const PublicAgentTrafficPage$zodSchema: z.ZodType<
21
+ PublicAgentTrafficPage
22
+ > = z.object({
23
+ ai_total: z.int().describe(
24
+ "Sum of `coding`, `user`, `search`, and `training` visits.",
25
+ ),
26
+ coding: z.int().describe(
27
+ "Visits from coding agents such as Claude Code, Codex, and Cursor.",
28
+ ),
29
+ last_seen: z.string().nullable().optional().describe(
30
+ "Day of the latest visit, in `YYYY-MM-DD` format.",
31
+ ),
32
+ other: z.int().describe(
33
+ "Visits from bots with no AI purpose, such as search engine crawlers.",
34
+ ),
35
+ path: z.string(),
36
+ people: z.int().describe("Visits from people."),
37
+ search: z.int().describe(
38
+ "Visits from AI search indexers such as OAI-SearchBot.",
39
+ ),
40
+ training: z.int().describe(
41
+ "Visits from AI training crawlers such as GPTBot.",
42
+ ),
43
+ user: z.int().describe(
44
+ "Visits from AI assistants fetching a page because a user asked, such as ChatGPT-User.",
45
+ ),
46
+ });