@lightsage/mcp 0.4.1 → 0.4.3

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 (158) hide show
  1. package/README.md +2 -2
  2. package/bin/mcp-server.js +527 -153
  3. package/bin/mcp-server.js.map +31 -22
  4. package/esm/funcs/promptsRun.d.ts +21 -0
  5. package/esm/funcs/promptsRun.d.ts.map +1 -0
  6. package/esm/funcs/promptsRun.js +88 -0
  7. package/esm/funcs/promptsRun.js.map +1 -0
  8. package/esm/funcs/promptsRunStatus.d.ts +19 -0
  9. package/esm/funcs/promptsRunStatus.d.ts.map +1 -0
  10. package/esm/funcs/promptsRunStatus.js +91 -0
  11. package/esm/funcs/promptsRunStatus.js.map +1 -0
  12. package/esm/funcs/promptsV2PromptsRetrieve.d.ts +1 -1
  13. package/esm/funcs/promptsV2PromptsRetrieve.js +1 -1
  14. package/esm/funcs/promptsV2PromptsUpdate.d.ts +1 -1
  15. package/esm/funcs/promptsV2PromptsUpdate.js +1 -1
  16. package/esm/landing-page.js +1 -1
  17. package/esm/lib/config.d.ts +2 -2
  18. package/esm/lib/config.js +2 -2
  19. package/esm/mcp-server/mcp-server.js +1 -1
  20. package/esm/mcp-server/server.d.ts.map +1 -1
  21. package/esm/mcp-server/server.js +5 -1
  22. package/esm/mcp-server/server.js.map +1 -1
  23. package/esm/mcp-server/tools/promptsRun.d.ts +7 -0
  24. package/esm/mcp-server/tools/promptsRun.d.ts.map +1 -0
  25. package/esm/mcp-server/tools/promptsRun.js +40 -0
  26. package/esm/mcp-server/tools/promptsRun.js.map +1 -0
  27. package/esm/mcp-server/tools/promptsRunStatus.d.ts +7 -0
  28. package/esm/mcp-server/tools/promptsRunStatus.d.ts.map +1 -0
  29. package/esm/mcp-server/tools/promptsRunStatus.js +38 -0
  30. package/esm/mcp-server/tools/promptsRunStatus.js.map +1 -0
  31. package/esm/mcp-server/tools/promptsV2PromptsRetrieve.js +1 -1
  32. package/esm/mcp-server/tools/promptsV2PromptsRetrieve.js.map +1 -1
  33. package/esm/mcp-server/tools/promptsV2PromptsUpdate.js +1 -1
  34. package/esm/mcp-server/tools/promptsV2PromptsUpdate.js.map +1 -1
  35. package/esm/models/createv2promptrequest.d.ts +2 -0
  36. package/esm/models/createv2promptrequest.d.ts.map +1 -1
  37. package/esm/models/createv2promptrequest.js +3 -0
  38. package/esm/models/createv2promptrequest.js.map +1 -1
  39. package/esm/models/createv2promptrunrequest.d.ts +7 -0
  40. package/esm/models/createv2promptrunrequest.d.ts.map +1 -0
  41. package/esm/models/createv2promptrunrequest.js +10 -0
  42. package/esm/models/createv2promptrunrequest.js.map +1 -0
  43. package/esm/models/updatev2promptrequest.d.ts +2 -0
  44. package/esm/models/updatev2promptrequest.d.ts.map +1 -1
  45. package/esm/models/updatev2promptrequest.js +3 -0
  46. package/esm/models/updatev2promptrequest.js.map +1 -1
  47. package/esm/models/v2evalrunscreateop.d.ts +3 -3
  48. package/esm/models/v2evalrunscreateop.d.ts.map +1 -1
  49. package/esm/models/v2evalrunscreateop.js +2 -2
  50. package/esm/models/v2evalrunscreateop.js.map +1 -1
  51. package/esm/models/v2listpromptsresponse.d.ts +8 -0
  52. package/esm/models/v2listpromptsresponse.d.ts.map +1 -0
  53. package/esm/models/v2listpromptsresponse.js +11 -0
  54. package/esm/models/v2listpromptsresponse.js.map +1 -0
  55. package/esm/models/v2promptbatchresponse.d.ts +10 -0
  56. package/esm/models/v2promptbatchresponse.d.ts.map +1 -0
  57. package/esm/models/v2promptbatchresponse.js +13 -0
  58. package/esm/models/v2promptbatchresponse.js.map +1 -0
  59. package/esm/models/{publicprompt.d.ts → v2promptresponse.d.ts} +9 -7
  60. package/esm/models/v2promptresponse.d.ts.map +1 -0
  61. package/esm/models/{publicprompt.js → v2promptresponse.js} +8 -6
  62. package/esm/models/v2promptresponse.js.map +1 -0
  63. package/esm/models/v2promptrundetail.d.ts +6 -0
  64. package/esm/models/v2promptrundetail.d.ts.map +1 -1
  65. package/esm/models/v2promptrundetail.js +7 -0
  66. package/esm/models/v2promptrundetail.js.map +1 -1
  67. package/esm/models/v2promptrunjobresponse.d.ts +46 -0
  68. package/esm/models/v2promptrunjobresponse.d.ts.map +1 -0
  69. package/esm/models/v2promptrunjobresponse.js +49 -0
  70. package/esm/models/v2promptrunjobresponse.js.map +1 -0
  71. package/esm/models/v2promptrunscreateop.d.ts +40 -0
  72. package/esm/models/v2promptrunscreateop.d.ts.map +1 -0
  73. package/esm/models/v2promptrunscreateop.js +33 -0
  74. package/esm/models/v2promptrunscreateop.js.map +1 -0
  75. package/esm/models/v2promptrunsettings.d.ts +26 -0
  76. package/esm/models/v2promptrunsettings.d.ts.map +1 -0
  77. package/esm/models/v2promptrunsettings.js +26 -0
  78. package/esm/models/v2promptrunsettings.js.map +1 -0
  79. package/esm/models/v2promptrunsettingsinput.d.ts +20 -0
  80. package/esm/models/v2promptrunsettingsinput.d.ts.map +1 -0
  81. package/esm/models/v2promptrunsettingsinput.js +23 -0
  82. package/esm/models/v2promptrunsettingsinput.js.map +1 -0
  83. package/esm/models/v2promptrunstatusretrieveop.d.ts +24 -0
  84. package/esm/models/v2promptrunstatusretrieveop.d.ts.map +1 -0
  85. package/esm/models/v2promptrunstatusretrieveop.js +23 -0
  86. package/esm/models/v2promptrunstatusretrieveop.js.map +1 -0
  87. package/esm/models/v2promptrunsummary.d.ts +6 -0
  88. package/esm/models/v2promptrunsummary.d.ts.map +1 -1
  89. package/esm/models/v2promptrunsummary.js +7 -0
  90. package/esm/models/v2promptrunsummary.js.map +1 -1
  91. package/esm/models/v2promptscreateop.d.ts +2 -2
  92. package/esm/models/v2promptscreateop.d.ts.map +1 -1
  93. package/esm/models/v2promptscreateop.js +2 -2
  94. package/esm/models/v2promptscreateop.js.map +1 -1
  95. package/esm/models/v2promptslistop.d.ts +2 -2
  96. package/esm/models/v2promptslistop.d.ts.map +1 -1
  97. package/esm/models/v2promptslistop.js +2 -2
  98. package/esm/models/v2promptslistop.js.map +1 -1
  99. package/esm/models/v2promptsretrieveop.d.ts +2 -2
  100. package/esm/models/v2promptsretrieveop.d.ts.map +1 -1
  101. package/esm/models/v2promptsretrieveop.js +2 -2
  102. package/esm/models/v2promptsretrieveop.js.map +1 -1
  103. package/esm/models/v2promptsupdateop.d.ts +2 -2
  104. package/esm/models/v2promptsupdateop.d.ts.map +1 -1
  105. package/esm/models/v2promptsupdateop.js +2 -2
  106. package/esm/models/v2promptsupdateop.js.map +1 -1
  107. package/esm/models/validationerror.d.ts +4 -0
  108. package/esm/models/validationerror.d.ts.map +1 -1
  109. package/esm/models/validationerror.js +3 -0
  110. package/esm/models/validationerror.js.map +1 -1
  111. package/esm/tool-names.d.ts.map +1 -1
  112. package/esm/tool-names.js +10 -2
  113. package/esm/tool-names.js.map +1 -1
  114. package/package.json +9 -4
  115. package/src/funcs/promptsRun.ts +150 -0
  116. package/src/funcs/promptsRunStatus.ts +156 -0
  117. package/src/funcs/promptsV2PromptsRetrieve.ts +1 -1
  118. package/src/funcs/promptsV2PromptsUpdate.ts +1 -1
  119. package/src/landing-page.ts +1 -1
  120. package/src/lib/config.ts +2 -2
  121. package/src/mcp-server/mcp-server.ts +1 -1
  122. package/src/mcp-server/server.ts +5 -1
  123. package/src/mcp-server/tools/promptsRun.ts +48 -0
  124. package/src/mcp-server/tools/promptsRunStatus.ts +46 -0
  125. package/src/mcp-server/tools/promptsV2PromptsRetrieve.ts +1 -1
  126. package/src/mcp-server/tools/promptsV2PromptsUpdate.ts +1 -1
  127. package/src/models/createv2promptrequest.ts +9 -0
  128. package/src/models/createv2promptrunrequest.ts +22 -0
  129. package/src/models/updatev2promptrequest.ts +9 -0
  130. package/src/models/v2evalrunscreateop.ts +12 -4
  131. package/src/models/v2listpromptsresponse.ts +21 -0
  132. package/src/models/v2promptbatchresponse.ts +27 -0
  133. package/src/models/{publicprompt.ts → v2promptresponse.ts} +29 -21
  134. package/src/models/v2promptrundetail.ts +21 -0
  135. package/src/models/v2promptrunjobresponse.ts +97 -0
  136. package/src/models/v2promptrunscreateop.ts +100 -0
  137. package/src/models/v2promptrunsettings.ts +50 -0
  138. package/src/models/v2promptrunsettingsinput.ts +47 -0
  139. package/src/models/v2promptrunstatusretrieveop.ts +64 -0
  140. package/src/models/v2promptrunsummary.ts +21 -0
  141. package/src/models/v2promptscreateop.ts +5 -5
  142. package/src/models/v2promptslistop.ts +5 -5
  143. package/src/models/v2promptsretrieveop.ts +6 -3
  144. package/src/models/v2promptsupdateop.ts +6 -3
  145. package/src/models/validationerror.ts +8 -0
  146. package/src/tool-names.ts +10 -2
  147. package/esm/models/listpromptsresponse.d.ts +0 -8
  148. package/esm/models/listpromptsresponse.d.ts.map +0 -1
  149. package/esm/models/listpromptsresponse.js +0 -12
  150. package/esm/models/listpromptsresponse.js.map +0 -1
  151. package/esm/models/publicprompt.d.ts.map +0 -1
  152. package/esm/models/publicprompt.js.map +0 -1
  153. package/esm/models/publicpromptbatchresponse.d.ts +0 -10
  154. package/esm/models/publicpromptbatchresponse.d.ts.map +0 -1
  155. package/esm/models/publicpromptbatchresponse.js +0 -13
  156. package/esm/models/publicpromptbatchresponse.js.map +0 -1
  157. package/src/models/listpromptsresponse.ts +0 -15
  158. package/src/models/publicpromptbatchresponse.ts +0 -25
@@ -0,0 +1,150 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 222d0e84db00
4
+ */
5
+
6
+ import { LightsageMcpCore } from "../core.js";
7
+ import { encodeJSON } from "../lib/encodings.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { RequestOptions } from "../lib/sdks.js";
11
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
+ import { pathToFunc } from "../lib/url.js";
13
+ import {
14
+ CreateV2PromptRunRequest,
15
+ CreateV2PromptRunRequest$zodSchema,
16
+ } from "../models/createv2promptrunrequest.js";
17
+ import { APIError } from "../models/errors/apierror.js";
18
+ import {
19
+ ConnectionError,
20
+ InvalidRequestError,
21
+ RequestAbortedError,
22
+ RequestTimeoutError,
23
+ UnexpectedClientError,
24
+ } from "../models/errors/httpclienterrors.js";
25
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
26
+ import { APICall, APIPromise } from "../types/async.js";
27
+ import { Result } from "../types/fp.js";
28
+
29
+ /**
30
+ * Run Prompts
31
+ *
32
+ * @remarks
33
+ * Queue saved prompts using the organization's configured targets.
34
+ *
35
+ * Provide `prompt_ids` to run selected prompts, or omit them to run all active
36
+ * prompts. Saved prompt run settings apply to coding-agent targets. The
37
+ * response returns a run ID to poll with
38
+ * `GET /v2/prompts/runs/{run_id}/status`.
39
+ */
40
+ export function promptsRun(
41
+ client$: LightsageMcpCore,
42
+ request: CreateV2PromptRunRequest,
43
+ options?: RequestOptions,
44
+ ): APIPromise<
45
+ Result<
46
+ Response,
47
+ | APIError
48
+ | SDKValidationError
49
+ | UnexpectedClientError
50
+ | InvalidRequestError
51
+ | RequestAbortedError
52
+ | RequestTimeoutError
53
+ | ConnectionError
54
+ >
55
+ > {
56
+ return new APIPromise($do(
57
+ client$,
58
+ request,
59
+ options,
60
+ ));
61
+ }
62
+
63
+ async function $do(
64
+ client$: LightsageMcpCore,
65
+ request: CreateV2PromptRunRequest,
66
+ options?: RequestOptions,
67
+ ): Promise<
68
+ [
69
+ Result<
70
+ Response,
71
+ | APIError
72
+ | SDKValidationError
73
+ | UnexpectedClientError
74
+ | InvalidRequestError
75
+ | RequestAbortedError
76
+ | RequestTimeoutError
77
+ | ConnectionError
78
+ >,
79
+ APICall,
80
+ ]
81
+ > {
82
+ const parsed$ = safeParse(
83
+ request,
84
+ (value$) => CreateV2PromptRunRequest$zodSchema.parse(value$),
85
+ "Input validation failed",
86
+ );
87
+ if (!parsed$.ok) {
88
+ return [parsed$, { status: "invalid" }];
89
+ }
90
+ const payload$ = parsed$.value;
91
+ const body$ = encodeJSON("body", payload$, { explode: true });
92
+ const path$ = pathToFunc("/v2/prompts/runs")();
93
+
94
+ const headers$ = new Headers(compactMap({
95
+ "Content-Type": "application/json",
96
+ Accept: "application/json",
97
+ }));
98
+ const securityInput = await extractSecurity(client$._options.security);
99
+ const requestSecurity = resolveGlobalSecurity(securityInput);
100
+
101
+ const context = {
102
+ options: client$._options,
103
+ baseURL: options?.serverURL ?? client$._baseURL ?? "",
104
+ operationID: "v2_prompt_runs_create",
105
+ oAuth2Scopes: null,
106
+ resolvedSecurity: requestSecurity,
107
+ securitySource: client$._options.security,
108
+ retryConfig: options?.retries
109
+ || client$._options.retryConfig
110
+ || { strategy: "none" },
111
+ retryCodes: options?.retryCodes || [
112
+ "429",
113
+ "500",
114
+ "502",
115
+ "503",
116
+ "504",
117
+ ],
118
+ };
119
+
120
+ const requestRes = client$._createRequest(context, {
121
+ security: requestSecurity,
122
+ method: "POST",
123
+ baseURL: options?.serverURL,
124
+ path: path$,
125
+ headers: headers$,
126
+ body: body$,
127
+ userAgent: client$._options.userAgent,
128
+ timeoutMs: options?.timeoutMs || client$._options.timeoutMs
129
+ || -1,
130
+ }, options);
131
+ if (!requestRes.ok) {
132
+ return [requestRes, { status: "invalid" }];
133
+ }
134
+ const req$ = requestRes.value;
135
+
136
+ const doResult = await client$._do(req$, {
137
+ context,
138
+ errorCodes: [],
139
+ retryConfig: context.retryConfig,
140
+ retryCodes: context.retryCodes,
141
+ });
142
+ if (!doResult.ok) {
143
+ return [doResult, { status: "request-error", request: req$ }];
144
+ }
145
+ return [doResult, {
146
+ status: "complete",
147
+ "request": req$,
148
+ response: doResult.value,
149
+ }];
150
+ }
@@ -0,0 +1,156 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: c7035627e653
4
+ */
5
+
6
+ import { LightsageMcpCore } from "../core.js";
7
+ import { encodeSimple } from "../lib/encodings.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { RequestOptions } from "../lib/sdks.js";
11
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
+ import { pathToFunc } from "../lib/url.js";
13
+ import { APIError } from "../models/errors/apierror.js";
14
+ import {
15
+ ConnectionError,
16
+ InvalidRequestError,
17
+ RequestAbortedError,
18
+ RequestTimeoutError,
19
+ UnexpectedClientError,
20
+ } from "../models/errors/httpclienterrors.js";
21
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
22
+ import {
23
+ V2PromptRunStatusRetrieveRequest,
24
+ V2PromptRunStatusRetrieveRequest$zodSchema,
25
+ } from "../models/v2promptrunstatusretrieveop.js";
26
+ import { APICall, APIPromise } from "../types/async.js";
27
+ import { Result } from "../types/fp.js";
28
+
29
+ /**
30
+ * Get Prompt Run Status
31
+ *
32
+ * @remarks
33
+ * Return status and progress for a queued prompt run.
34
+ *
35
+ * Poll this endpoint until `status` is `completed`, `failed`, or `cancelled`.
36
+ * Individual stored results are available from `GET /v2/prompts/runs`.
37
+ */
38
+ export function promptsRunStatus(
39
+ client$: LightsageMcpCore,
40
+ request: V2PromptRunStatusRetrieveRequest,
41
+ options?: RequestOptions,
42
+ ): APIPromise<
43
+ Result<
44
+ Response,
45
+ | APIError
46
+ | SDKValidationError
47
+ | UnexpectedClientError
48
+ | InvalidRequestError
49
+ | RequestAbortedError
50
+ | RequestTimeoutError
51
+ | ConnectionError
52
+ >
53
+ > {
54
+ return new APIPromise($do(
55
+ client$,
56
+ request,
57
+ options,
58
+ ));
59
+ }
60
+
61
+ async function $do(
62
+ client$: LightsageMcpCore,
63
+ request: V2PromptRunStatusRetrieveRequest,
64
+ options?: RequestOptions,
65
+ ): Promise<
66
+ [
67
+ Result<
68
+ Response,
69
+ | APIError
70
+ | SDKValidationError
71
+ | UnexpectedClientError
72
+ | InvalidRequestError
73
+ | RequestAbortedError
74
+ | RequestTimeoutError
75
+ | ConnectionError
76
+ >,
77
+ APICall,
78
+ ]
79
+ > {
80
+ const parsed$ = safeParse(
81
+ request,
82
+ (value$) => V2PromptRunStatusRetrieveRequest$zodSchema.parse(value$),
83
+ "Input validation failed",
84
+ );
85
+ if (!parsed$.ok) {
86
+ return [parsed$, { status: "invalid" }];
87
+ }
88
+ const payload$ = parsed$.value;
89
+ const body$ = null;
90
+
91
+ const pathParams$ = {
92
+ run_id: encodeSimple("run_id", payload$.run_id, {
93
+ explode: false,
94
+ charEncoding: "percent",
95
+ }),
96
+ };
97
+ const path$ = pathToFunc("/v2/prompts/runs/{run_id}/status")(
98
+ pathParams$,
99
+ );
100
+
101
+ const headers$ = new Headers(compactMap({
102
+ Accept: "application/json",
103
+ }));
104
+ const securityInput = await extractSecurity(client$._options.security);
105
+ const requestSecurity = resolveGlobalSecurity(securityInput);
106
+
107
+ const context = {
108
+ options: client$._options,
109
+ baseURL: options?.serverURL ?? client$._baseURL ?? "",
110
+ operationID: "v2_prompt_run_status_retrieve",
111
+ oAuth2Scopes: null,
112
+ resolvedSecurity: requestSecurity,
113
+ securitySource: client$._options.security,
114
+ retryConfig: options?.retries
115
+ || client$._options.retryConfig
116
+ || { strategy: "none" },
117
+ retryCodes: options?.retryCodes || [
118
+ "429",
119
+ "500",
120
+ "502",
121
+ "503",
122
+ "504",
123
+ ],
124
+ };
125
+
126
+ const requestRes = client$._createRequest(context, {
127
+ security: requestSecurity,
128
+ method: "GET",
129
+ baseURL: options?.serverURL,
130
+ path: path$,
131
+ headers: headers$,
132
+ body: body$,
133
+ userAgent: client$._options.userAgent,
134
+ timeoutMs: options?.timeoutMs || client$._options.timeoutMs
135
+ || -1,
136
+ }, options);
137
+ if (!requestRes.ok) {
138
+ return [requestRes, { status: "invalid" }];
139
+ }
140
+ const req$ = requestRes.value;
141
+
142
+ const doResult = await client$._do(req$, {
143
+ context,
144
+ errorCodes: [],
145
+ retryConfig: context.retryConfig,
146
+ retryCodes: context.retryCodes,
147
+ });
148
+ if (!doResult.ok) {
149
+ return [doResult, { status: "request-error", request: req$ }];
150
+ }
151
+ return [doResult, {
152
+ status: "complete",
153
+ "request": req$,
154
+ response: doResult.value,
155
+ }];
156
+ }
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
30
30
  * Retrieve Prompt
31
31
  *
32
32
  * @remarks
33
- * Returns a prompt with its topic, platforms, tags, and lifecycle status.
33
+ * Returns a prompt with its topic, platforms, tags, lifecycle status, and coding-agent run settings.
34
34
  */
35
35
  export function promptsV2PromptsRetrieve(
36
36
  client$: LightsageMcpCore,
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
30
30
  * Update Prompt
31
31
  *
32
32
  * @remarks
33
- * Updates a prompt's text, topic, platforms, or lifecycle status. Omitted fields remain unchanged.
33
+ * Updates a prompt's text, topic, platforms, lifecycle status, or coding-agent run settings. Omitted fields remain unchanged.
34
34
  */
35
35
  export function promptsV2PromptsUpdate(
36
36
  client$: LightsageMcpCore,
@@ -931,7 +931,7 @@ http_headers = { "lightsage-api-key-auth" = "YOUR_LIGHTSAGE_API_KEY_AUTH" }`;
931
931
  <h1>Instructions</h1>
932
932
  <p>One-click installation for Claude Desktop users</p>
933
933
  <div class="instruction-item">
934
- <a href="https://github.com/lightsagehq/mcp/releases/download/v0.4.1/mcp-server.mcpb" download="mcp-server.mcpb" class="action-button header-action" style="display: inline-flex; margin-bottom: 16px;">
934
+ <a href="https://github.com/lightsagehq/mcp/releases/download/v0.4.3/mcp-server.mcpb" download="mcp-server.mcpb" class="action-button header-action" style="display: inline-flex; margin-bottom: 16px;">
935
935
  📥 Download MCP Bundle
936
936
  </a>
937
937
  </div>
package/src/lib/config.ts CHANGED
@@ -66,7 +66,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
66
66
  export const SDK_METADATA = {
67
67
  language: "typescript",
68
68
  openapiDocVersion: "1.0.0",
69
- sdkVersion: "0.4.1",
69
+ sdkVersion: "0.4.3",
70
70
  genVersion: "2.941.0",
71
- userAgent: "speakeasy-sdk/mcp-typescript 0.4.1 2.941.0 1.0.0 @lightsage/mcp",
71
+ userAgent: "speakeasy-sdk/mcp-typescript 0.4.3 2.941.0 1.0.0 @lightsage/mcp",
72
72
  } as const;
@@ -22,7 +22,7 @@ const routes = buildRouteMap({
22
22
  export const app = buildApplication(routes, {
23
23
  name: "mcp",
24
24
  versionInfo: {
25
- currentVersion: "0.4.1",
25
+ currentVersion: "0.4.3",
26
26
  },
27
27
  });
28
28
 
@@ -48,6 +48,8 @@ import { tool$evalTemplatesV2EvalTemplatesUpdate } from "./tools/evalTemplatesV2
48
48
  import { tool$mcpServersV2MCPServersList } from "./tools/mcpServersV2MCPServersList.js";
49
49
  import { tool$opportunitiesV2OpportunitiesList } from "./tools/opportunitiesV2OpportunitiesList.js";
50
50
  import { tool$opportunitiesV2OpportunitiesRetrieve } from "./tools/opportunitiesV2OpportunitiesRetrieve.js";
51
+ import { tool$promptsRun } from "./tools/promptsRun.js";
52
+ import { tool$promptsRunStatus } from "./tools/promptsRunStatus.js";
51
53
  import { tool$promptsV2PromptRunsList } from "./tools/promptsV2PromptRunsList.js";
52
54
  import { tool$promptsV2PromptRunsRetrieve } from "./tools/promptsV2PromptRunsRetrieve.js";
53
55
  import { tool$promptsV2PromptsCreate } from "./tools/promptsV2PromptsCreate.js";
@@ -96,7 +98,7 @@ export function createMCPServer(deps: {
96
98
  sizes: ["any"],
97
99
  }],
98
100
  name: "LightsageMcp",
99
- version: "0.4.1",
101
+ version: "0.4.3",
100
102
  });
101
103
 
102
104
  const getClient = deps.getSDK || (() =>
@@ -158,6 +160,8 @@ export function createMCPServer(deps: {
158
160
  tool(tool$promptsV2PromptsRetrieve);
159
161
  tool(tool$promptsV2PromptsUpdate);
160
162
  tool(tool$promptsV2PromptsDelete);
163
+ tool(tool$promptsRun);
164
+ tool(tool$promptsRunStatus);
161
165
  tool(tool$opportunitiesV2OpportunitiesList);
162
166
  tool(tool$opportunitiesV2OpportunitiesRetrieve);
163
167
  tool(tool$tasksV2TasksList);
@@ -0,0 +1,48 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: e0ae54886903
4
+ */
5
+
6
+ import { promptsRun } from "../../funcs/promptsRun.js";
7
+ import { CreateV2PromptRunRequest$zodSchema } from "../../models/createv2promptrunrequest.js";
8
+ import { formatResult, ToolDefinition } from "../tools.js";
9
+
10
+ const args = {
11
+ request: CreateV2PromptRunRequest$zodSchema,
12
+ };
13
+
14
+ export const tool$promptsRun: ToolDefinition<typeof args> = {
15
+ name: "prompts-run",
16
+ description: `Run Prompts
17
+
18
+ Queue saved prompts using the organization's configured targets.
19
+
20
+ Provide \`prompt_ids\` to run selected prompts, or omit them to run all active
21
+ prompts. Saved prompt run settings apply to coding-agent targets. The
22
+ response returns a run ID to poll with
23
+ \`GET /v2/prompts/runs/{run_id}/status\`.`,
24
+ annotations: {
25
+ "title": "",
26
+ "destructiveHint": false,
27
+ "idempotentHint": false,
28
+ "openWorldHint": false,
29
+ "readOnlyHint": false,
30
+ },
31
+ args,
32
+ tool: async (client, args, ctx) => {
33
+ const [result] = await promptsRun(
34
+ client,
35
+ args.request,
36
+ { fetchOptions: { signal: ctx.signal } },
37
+ ).$inspect();
38
+
39
+ if (!result.ok) {
40
+ return {
41
+ content: [{ type: "text", text: result.error.message }],
42
+ isError: true,
43
+ };
44
+ }
45
+
46
+ return formatResult(result.value);
47
+ },
48
+ };
@@ -0,0 +1,46 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 6ee310f41b65
4
+ */
5
+
6
+ import { promptsRunStatus } from "../../funcs/promptsRunStatus.js";
7
+ import { V2PromptRunStatusRetrieveRequest$zodSchema } from "../../models/v2promptrunstatusretrieveop.js";
8
+ import { formatResult, ToolDefinition } from "../tools.js";
9
+
10
+ const args = {
11
+ request: V2PromptRunStatusRetrieveRequest$zodSchema,
12
+ };
13
+
14
+ export const tool$promptsRunStatus: ToolDefinition<typeof args> = {
15
+ name: "prompts-run-status",
16
+ description: `Get Prompt Run Status
17
+
18
+ Return status and progress for a queued prompt run.
19
+
20
+ Poll this endpoint until \`status\` is \`completed\`, \`failed\`, or \`cancelled\`.
21
+ Individual stored results are available from \`GET /v2/prompts/runs\`.`,
22
+ annotations: {
23
+ "title": "",
24
+ "destructiveHint": false,
25
+ "idempotentHint": false,
26
+ "openWorldHint": false,
27
+ "readOnlyHint": true,
28
+ },
29
+ args,
30
+ tool: async (client, args, ctx) => {
31
+ const [result] = await promptsRunStatus(
32
+ client,
33
+ args.request,
34
+ { fetchOptions: { signal: ctx.signal } },
35
+ ).$inspect();
36
+
37
+ if (!result.ok) {
38
+ return {
39
+ content: [{ type: "text", text: result.error.message }],
40
+ isError: true,
41
+ };
42
+ }
43
+
44
+ return formatResult(result.value);
45
+ },
46
+ };
@@ -15,7 +15,7 @@ export const tool$promptsV2PromptsRetrieve: ToolDefinition<typeof args> = {
15
15
  name: "prompts-v2-prompts-retrieve",
16
16
  description: `Retrieve Prompt
17
17
 
18
- Returns a prompt with its topic, platforms, tags, and lifecycle status.`,
18
+ Returns a prompt with its topic, platforms, tags, lifecycle status, and coding-agent run settings.`,
19
19
  annotations: {
20
20
  "title": "",
21
21
  "destructiveHint": false,
@@ -15,7 +15,7 @@ export const tool$promptsV2PromptsUpdate: ToolDefinition<typeof args> = {
15
15
  name: "prompts-v2-prompts-update",
16
16
  description: `Update Prompt
17
17
 
18
- Updates a prompt's text, topic, platforms, or lifecycle status. Omitted fields remain unchanged.`,
18
+ Updates a prompt's text, topic, platforms, lifecycle status, or coding-agent run settings. Omitted fields remain unchanged.`,
19
19
  annotations: {
20
20
  "title": "",
21
21
  "destructiveHint": false,
@@ -4,11 +4,16 @@
4
4
  */
5
5
 
6
6
  import * as z from "zod";
7
+ import {
8
+ V2PromptRunSettingsInput,
9
+ V2PromptRunSettingsInput$zodSchema,
10
+ } from "./v2promptrunsettingsinput.js";
7
11
 
8
12
  export type CreateV2PromptRequest = {
9
13
  topic_id: string;
10
14
  text: string;
11
15
  platform_ids?: Array<string> | undefined;
16
+ run_settings?: V2PromptRunSettingsInput | null | undefined;
12
17
  };
13
18
 
14
19
  export const CreateV2PromptRequest$zodSchema: z.ZodType<CreateV2PromptRequest> =
@@ -16,6 +21,10 @@ export const CreateV2PromptRequest$zodSchema: z.ZodType<CreateV2PromptRequest> =
16
21
  platform_ids: z.array(z.string()).optional().describe(
17
22
  "Answer-platform IDs from the prompt configuration. Omit to attach none.",
18
23
  ),
24
+ run_settings: V2PromptRunSettingsInput$zodSchema.nullable().optional()
25
+ .describe(
26
+ "Run settings that apply to coding-agent runs of this prompt. Omitted fields keep their current or default values.",
27
+ ),
19
28
  text: z.string(),
20
29
  topic_id: z.string().describe(
21
30
  "Prompt topic ID from `GET /v2/prompts/topics`.",
@@ -0,0 +1,22 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: b7b72bfe20d1
4
+ */
5
+
6
+ import * as z from "zod";
7
+
8
+ export type CreateV2PromptRunRequest = {
9
+ prompt_ids?: Array<string> | null | undefined;
10
+ force?: boolean | undefined;
11
+ };
12
+
13
+ export const CreateV2PromptRunRequest$zodSchema: z.ZodType<
14
+ CreateV2PromptRunRequest
15
+ > = z.object({
16
+ force: z.boolean().default(false).describe(
17
+ "Run even when a prompt already ran today on the configured platform and model.",
18
+ ),
19
+ prompt_ids: z.array(z.string()).nullable().optional().describe(
20
+ "Prompt IDs from `GET /v2/prompts`. Omit this field to run all active prompts.",
21
+ ),
22
+ });
@@ -5,6 +5,10 @@
5
5
 
6
6
  import * as z from "zod";
7
7
  import { ClosedEnum } from "../types/enums.js";
8
+ import {
9
+ V2PromptRunSettingsInput,
10
+ V2PromptRunSettingsInput$zodSchema,
11
+ } from "./v2promptrunsettingsinput.js";
8
12
 
9
13
  export const UpdateV2PromptRequestStatus = {
10
14
  Active: "active",
@@ -24,6 +28,7 @@ export type UpdateV2PromptRequest = {
24
28
  topic_id?: string | undefined;
25
29
  platform_ids?: Array<string> | null | undefined;
26
30
  status?: UpdateV2PromptRequestStatus | undefined;
31
+ run_settings?: V2PromptRunSettingsInput | null | undefined;
27
32
  };
28
33
 
29
34
  export const UpdateV2PromptRequest$zodSchema: z.ZodType<UpdateV2PromptRequest> =
@@ -31,6 +36,10 @@ export const UpdateV2PromptRequest$zodSchema: z.ZodType<UpdateV2PromptRequest> =
31
36
  platform_ids: z.array(z.string()).nullable().optional().describe(
32
37
  "Replacement list of answer-platform IDs.",
33
38
  ),
39
+ run_settings: V2PromptRunSettingsInput$zodSchema.nullable().optional()
40
+ .describe(
41
+ "Run settings that apply to coding-agent runs of this prompt. Omitted fields keep their current or default values.",
42
+ ),
34
43
  status: UpdateV2PromptRequestStatus$zodSchema.optional(),
35
44
  text: z.string().optional(),
36
45
  topic_id: z.string().optional().describe(
@@ -23,9 +23,15 @@ export const V2EvalRunsCreateForbiddenResponseBody$zodSchema: z.ZodType<
23
23
  "The requested coding agent is unavailable on the organization's current plan.",
24
24
  );
25
25
 
26
- export type Detail = { error: string; required: number; balance: number };
26
+ export type V2EvalRunsCreateDetail = {
27
+ error: string;
28
+ required: number;
29
+ balance: number;
30
+ };
27
31
 
28
- export const Detail$zodSchema: z.ZodType<Detail> = z.object({
32
+ export const V2EvalRunsCreateDetail$zodSchema: z.ZodType<
33
+ V2EvalRunsCreateDetail
34
+ > = z.object({
29
35
  balance: z.number().describe("The organization's current credit balance."),
30
36
  error: z.string(),
31
37
  required: z.number().describe("Usage-based credits the requested run needs."),
@@ -34,12 +40,14 @@ export const Detail$zodSchema: z.ZodType<Detail> = z.object({
34
40
  /**
35
41
  * The organization does not currently have enough credits for the requested run.
36
42
  */
37
- export type V2EvalRunsCreatePaymentRequiredResponseBody = { detail: Detail };
43
+ export type V2EvalRunsCreatePaymentRequiredResponseBody = {
44
+ detail: V2EvalRunsCreateDetail;
45
+ };
38
46
 
39
47
  export const V2EvalRunsCreatePaymentRequiredResponseBody$zodSchema: z.ZodType<
40
48
  V2EvalRunsCreatePaymentRequiredResponseBody
41
49
  > = z.object({
42
- detail: z.lazy(() => Detail$zodSchema),
50
+ detail: z.lazy(() => V2EvalRunsCreateDetail$zodSchema),
43
51
  }).describe(
44
52
  "The organization does not currently have enough credits for the requested run.",
45
53
  );
@@ -0,0 +1,21 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 48a5d5271d92
4
+ */
5
+
6
+ import * as z from "zod";
7
+ import {
8
+ V2PromptResponse,
9
+ V2PromptResponse$zodSchema,
10
+ } from "./v2promptresponse.js";
11
+
12
+ export type V2ListPromptsResponse = {
13
+ data: Array<V2PromptResponse>;
14
+ count: number;
15
+ };
16
+
17
+ export const V2ListPromptsResponse$zodSchema: z.ZodType<V2ListPromptsResponse> =
18
+ z.object({
19
+ count: z.int(),
20
+ data: z.array(V2PromptResponse$zodSchema),
21
+ });
@@ -0,0 +1,27 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: d9c010826345
4
+ */
5
+
6
+ import * as z from "zod";
7
+ import {
8
+ PromptBatchError,
9
+ PromptBatchError$zodSchema,
10
+ } from "./promptbatcherror.js";
11
+ import {
12
+ V2PromptResponse,
13
+ V2PromptResponse$zodSchema,
14
+ } from "./v2promptresponse.js";
15
+
16
+ export type V2PromptBatchResponse = {
17
+ created: Array<V2PromptResponse>;
18
+ count: number;
19
+ errors?: Array<PromptBatchError> | undefined;
20
+ };
21
+
22
+ export const V2PromptBatchResponse$zodSchema: z.ZodType<V2PromptBatchResponse> =
23
+ z.object({
24
+ count: z.int(),
25
+ created: z.array(V2PromptResponse$zodSchema),
26
+ errors: z.array(PromptBatchError$zodSchema).optional(),
27
+ });