@lightsage/mcp 0.4.26 → 0.4.27
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/README.md +2 -2
- package/bin/mcp-server.js +521 -145
- package/bin/mcp-server.js.map +23 -18
- package/esm/funcs/promptsCreate.d.ts +1 -1
- package/esm/funcs/promptsCreate.js +1 -1
- package/esm/funcs/promptsTagsList.d.ts +15 -0
- package/esm/funcs/promptsTagsList.d.ts.map +1 -0
- package/esm/funcs/promptsTagsList.js +72 -0
- package/esm/funcs/promptsTagsList.js.map +1 -0
- package/esm/funcs/promptsUpdate.d.ts +1 -1
- package/esm/funcs/promptsUpdate.js +1 -1
- package/esm/landing-page.js +1 -1
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/mcp-server/mcp-server.js +1 -1
- package/esm/mcp-server/server.d.ts.map +1 -1
- package/esm/mcp-server/server.js +3 -1
- package/esm/mcp-server/server.js.map +1 -1
- package/esm/mcp-server/tools/promptsCreate.js +1 -1
- package/esm/mcp-server/tools/promptsCreate.js.map +1 -1
- package/esm/mcp-server/tools/promptsTagsList.d.ts +3 -0
- package/esm/mcp-server/tools/promptsTagsList.d.ts.map +1 -0
- package/esm/mcp-server/tools/promptsTagsList.js +30 -0
- package/esm/mcp-server/tools/promptsTagsList.js.map +1 -0
- package/esm/mcp-server/tools/promptsUpdate.js +1 -1
- package/esm/mcp-server/tools/promptsUpdate.js.map +1 -1
- package/esm/models/createv2promptrequest.d.ts +1 -0
- package/esm/models/createv2promptrequest.d.ts.map +1 -1
- package/esm/models/createv2promptrequest.js +1 -0
- package/esm/models/createv2promptrequest.js.map +1 -1
- package/esm/models/updatev2promptrequest.d.ts +1 -0
- package/esm/models/updatev2promptrequest.d.ts.map +1 -1
- package/esm/models/updatev2promptrequest.js +1 -0
- package/esm/models/updatev2promptrequest.js.map +1 -1
- package/esm/models/v2prompttagsresponse.d.ts +8 -0
- package/esm/models/v2prompttagsresponse.d.ts.map +1 -0
- package/esm/models/v2prompttagsresponse.js +12 -0
- package/esm/models/v2prompttagsresponse.js.map +1 -0
- package/esm/tool-names.d.ts.map +1 -1
- package/esm/tool-names.js +6 -2
- package/esm/tool-names.js.map +1 -1
- package/package.json +1 -1
- package/src/funcs/promptsCreate.ts +1 -1
- package/src/funcs/promptsTagsList.ts +124 -0
- package/src/funcs/promptsUpdate.ts +1 -1
- package/src/landing-page.ts +1 -1
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -1
- package/src/mcp-server/tools/promptsCreate.ts +1 -1
- package/src/mcp-server/tools/promptsTagsList.ts +36 -0
- package/src/mcp-server/tools/promptsUpdate.ts +1 -1
- package/src/models/createv2promptrequest.ts +4 -0
- package/src/models/updatev2promptrequest.ts +4 -0
- package/src/models/v2prompttagsresponse.ts +21 -0
- package/src/tool-names.ts +6 -2
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 75923fea23fb
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { LightsageMcpCore } from "../core.js";
|
|
7
|
+
import { compactMap } from "../lib/primitives.js";
|
|
8
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
9
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
10
|
+
import { pathToFunc } from "../lib/url.js";
|
|
11
|
+
import { APIError } from "../models/errors/apierror.js";
|
|
12
|
+
import {
|
|
13
|
+
ConnectionError,
|
|
14
|
+
InvalidRequestError,
|
|
15
|
+
RequestAbortedError,
|
|
16
|
+
RequestTimeoutError,
|
|
17
|
+
UnexpectedClientError,
|
|
18
|
+
} from "../models/errors/httpclienterrors.js";
|
|
19
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
20
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
21
|
+
import { Result } from "../types/fp.js";
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* List Tags
|
|
25
|
+
*
|
|
26
|
+
* @remarks
|
|
27
|
+
* Returns the organization's prompt tags. Set tags on a prompt by name with `tags` on `POST /v2/prompts` or `PATCH /v2/prompts/{prompt_id}`; a name with no match creates the tag.
|
|
28
|
+
*/
|
|
29
|
+
export function promptsTagsList(
|
|
30
|
+
client$: LightsageMcpCore,
|
|
31
|
+
options?: RequestOptions,
|
|
32
|
+
): APIPromise<
|
|
33
|
+
Result<
|
|
34
|
+
Response,
|
|
35
|
+
| APIError
|
|
36
|
+
| SDKValidationError
|
|
37
|
+
| UnexpectedClientError
|
|
38
|
+
| InvalidRequestError
|
|
39
|
+
| RequestAbortedError
|
|
40
|
+
| RequestTimeoutError
|
|
41
|
+
| ConnectionError
|
|
42
|
+
>
|
|
43
|
+
> {
|
|
44
|
+
return new APIPromise($do(
|
|
45
|
+
client$,
|
|
46
|
+
options,
|
|
47
|
+
));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
async function $do(
|
|
51
|
+
client$: LightsageMcpCore,
|
|
52
|
+
options?: RequestOptions,
|
|
53
|
+
): Promise<
|
|
54
|
+
[
|
|
55
|
+
Result<
|
|
56
|
+
Response,
|
|
57
|
+
| APIError
|
|
58
|
+
| SDKValidationError
|
|
59
|
+
| UnexpectedClientError
|
|
60
|
+
| InvalidRequestError
|
|
61
|
+
| RequestAbortedError
|
|
62
|
+
| RequestTimeoutError
|
|
63
|
+
| ConnectionError
|
|
64
|
+
>,
|
|
65
|
+
APICall,
|
|
66
|
+
]
|
|
67
|
+
> {
|
|
68
|
+
const path$ = pathToFunc("/v2/prompts/tags")();
|
|
69
|
+
|
|
70
|
+
const headers$ = new Headers(compactMap({
|
|
71
|
+
Accept: "application/json",
|
|
72
|
+
}));
|
|
73
|
+
const securityInput = await extractSecurity(client$._options.security);
|
|
74
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
75
|
+
|
|
76
|
+
const context = {
|
|
77
|
+
options: client$._options,
|
|
78
|
+
baseURL: options?.serverURL ?? client$._baseURL ?? "",
|
|
79
|
+
operationID: "v2_prompt_tags_list",
|
|
80
|
+
oAuth2Scopes: null,
|
|
81
|
+
resolvedSecurity: requestSecurity,
|
|
82
|
+
securitySource: client$._options.security,
|
|
83
|
+
retryConfig: options?.retries
|
|
84
|
+
|| client$._options.retryConfig
|
|
85
|
+
|| { strategy: "none" },
|
|
86
|
+
retryCodes: options?.retryCodes || [
|
|
87
|
+
"429",
|
|
88
|
+
"500",
|
|
89
|
+
"502",
|
|
90
|
+
"503",
|
|
91
|
+
"504",
|
|
92
|
+
],
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
const requestRes = client$._createRequest(context, {
|
|
96
|
+
security: requestSecurity,
|
|
97
|
+
method: "GET",
|
|
98
|
+
baseURL: options?.serverURL,
|
|
99
|
+
path: path$,
|
|
100
|
+
headers: headers$,
|
|
101
|
+
userAgent: client$._options.userAgent,
|
|
102
|
+
timeoutMs: options?.timeoutMs || client$._options.timeoutMs
|
|
103
|
+
|| -1,
|
|
104
|
+
}, options);
|
|
105
|
+
if (!requestRes.ok) {
|
|
106
|
+
return [requestRes, { status: "invalid" }];
|
|
107
|
+
}
|
|
108
|
+
const req$ = requestRes.value;
|
|
109
|
+
|
|
110
|
+
const doResult = await client$._do(req$, {
|
|
111
|
+
context,
|
|
112
|
+
errorCodes: [],
|
|
113
|
+
retryConfig: context.retryConfig,
|
|
114
|
+
retryCodes: context.retryCodes,
|
|
115
|
+
});
|
|
116
|
+
if (!doResult.ok) {
|
|
117
|
+
return [doResult, { status: "request-error", request: req$ }];
|
|
118
|
+
}
|
|
119
|
+
return [doResult, {
|
|
120
|
+
status: "complete",
|
|
121
|
+
"request": req$,
|
|
122
|
+
response: doResult.value,
|
|
123
|
+
}];
|
|
124
|
+
}
|
|
@@ -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, lifecycle status, or coding-agent run settings. Omitted fields remain unchanged.
|
|
33
|
+
* Updates a prompt's text, topic, platforms, tags, lifecycle status, or coding-agent run settings. Omitted fields remain unchanged; `tags` replaces the prompt's tags.
|
|
34
34
|
*/
|
|
35
35
|
export function promptsUpdate(
|
|
36
36
|
client$: LightsageMcpCore,
|
package/src/landing-page.ts
CHANGED
|
@@ -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.
|
|
934
|
+
<a href="https://github.com/lightsagehq/mcp/releases/download/v0.4.27/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.
|
|
69
|
+
sdkVersion: "0.4.27",
|
|
70
70
|
genVersion: "2.948.4",
|
|
71
|
-
userAgent: "speakeasy-sdk/mcp-typescript 0.4.
|
|
71
|
+
userAgent: "speakeasy-sdk/mcp-typescript 0.4.27 2.948.4 1.0.0 @lightsage/mcp",
|
|
72
72
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -69,6 +69,7 @@ import { tool$promptsRunCancel } from "./tools/promptsRunCancel.js";
|
|
|
69
69
|
import { tool$promptsRunsList } from "./tools/promptsRunsList.js";
|
|
70
70
|
import { tool$promptsRunsRetrieve } from "./tools/promptsRunsRetrieve.js";
|
|
71
71
|
import { tool$promptsRunStatus } from "./tools/promptsRunStatus.js";
|
|
72
|
+
import { tool$promptsTagsList } from "./tools/promptsTagsList.js";
|
|
72
73
|
import { tool$promptsTargetsList } from "./tools/promptsTargetsList.js";
|
|
73
74
|
import { tool$promptsTargetsSet } from "./tools/promptsTargetsSet.js";
|
|
74
75
|
import { tool$promptsTopicsCreate } from "./tools/promptsTopicsCreate.js";
|
|
@@ -115,7 +116,7 @@ export function createMCPServer(deps: {
|
|
|
115
116
|
sizes: ["any"],
|
|
116
117
|
}],
|
|
117
118
|
name: "LightsageMcp",
|
|
118
|
-
version: "0.4.
|
|
119
|
+
version: "0.4.27",
|
|
119
120
|
});
|
|
120
121
|
|
|
121
122
|
const getClient = deps.getSDK || (() =>
|
|
@@ -169,6 +170,7 @@ export function createMCPServer(deps: {
|
|
|
169
170
|
tool(tool$visibilityCitationsSummaryRetrieve);
|
|
170
171
|
tool(tool$promptsList);
|
|
171
172
|
tool(tool$promptsCreate);
|
|
173
|
+
tool(tool$promptsTagsList);
|
|
172
174
|
tool(tool$promptsTopicsList);
|
|
173
175
|
tool(tool$promptsTopicsCreate);
|
|
174
176
|
tool(tool$promptsTopicsUpdate);
|
|
@@ -15,7 +15,7 @@ export const tool$promptsCreate: ToolDefinition<typeof args> = {
|
|
|
15
15
|
name: "prompts-create",
|
|
16
16
|
description: `Create Prompts
|
|
17
17
|
|
|
18
|
-
Creates prompts in a batch. Each item is validated independently, so the response can contain both created prompts and individual errors.`,
|
|
18
|
+
Creates prompts in a batch. Each item is validated independently, so the response can contain both created prompts and individual errors. Tag names that match no existing prompt tag create new tags.`,
|
|
19
19
|
annotations: {
|
|
20
20
|
"title": "",
|
|
21
21
|
"destructiveHint": false,
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: f17854c03308
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { promptsTagsList } from "../../funcs/promptsTagsList.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
export const tool$promptsTagsList: ToolDefinition = {
|
|
10
|
+
name: "prompts-tags-list",
|
|
11
|
+
description: `List Tags
|
|
12
|
+
|
|
13
|
+
Returns the organization's prompt tags. Set tags on a prompt by name with \`tags\` on \`POST /v2/prompts\` or \`PATCH /v2/prompts/{prompt_id}\`; a name with no match creates the tag.`,
|
|
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 promptsTagsList(
|
|
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
|
+
};
|
|
@@ -15,7 +15,7 @@ export const tool$promptsUpdate: ToolDefinition<typeof args> = {
|
|
|
15
15
|
name: "prompts-update",
|
|
16
16
|
description: `Update Prompt
|
|
17
17
|
|
|
18
|
-
Updates a prompt's text, topic, platforms, lifecycle status, or coding-agent run settings. Omitted fields remain unchanged.`,
|
|
18
|
+
Updates a prompt's text, topic, platforms, tags, lifecycle status, or coding-agent run settings. Omitted fields remain unchanged; \`tags\` replaces the prompt's tags.`,
|
|
19
19
|
annotations: {
|
|
20
20
|
"title": "",
|
|
21
21
|
"destructiveHint": false,
|
|
@@ -13,6 +13,7 @@ export type CreateV2PromptRequest = {
|
|
|
13
13
|
topic_id: string;
|
|
14
14
|
text: string;
|
|
15
15
|
platform_ids?: Array<string> | undefined;
|
|
16
|
+
tags?: Array<string> | undefined;
|
|
16
17
|
run_settings?: V2PromptRunSettingsInput | null | undefined;
|
|
17
18
|
};
|
|
18
19
|
|
|
@@ -25,6 +26,9 @@ export const CreateV2PromptRequest$zodSchema: z.ZodType<CreateV2PromptRequest> =
|
|
|
25
26
|
.describe(
|
|
26
27
|
"Run settings that apply to coding-agent runs of this prompt. Omitted fields keep their current or default values.",
|
|
27
28
|
),
|
|
29
|
+
tags: z.array(z.string()).optional().describe(
|
|
30
|
+
"Tag names. A name matches an existing prompt tag of the organization regardless of case; a name with no match creates a new tag. CLI clients may expose this string array as a repeatable `--tag` flag. Omit to create the prompt untagged.",
|
|
31
|
+
),
|
|
28
32
|
text: z.string(),
|
|
29
33
|
topic_id: z.string().describe(
|
|
30
34
|
"Prompt topic ID from `GET /v2/prompts/topics`.",
|
|
@@ -29,6 +29,7 @@ export type UpdateV2PromptRequest = {
|
|
|
29
29
|
platform_ids?: Array<string> | null | undefined;
|
|
30
30
|
status?: UpdateV2PromptRequestStatus | undefined;
|
|
31
31
|
is_branded?: boolean | undefined;
|
|
32
|
+
tags?: Array<string> | null | undefined;
|
|
32
33
|
run_settings?: V2PromptRunSettingsInput | null | undefined;
|
|
33
34
|
};
|
|
34
35
|
|
|
@@ -45,6 +46,9 @@ export const UpdateV2PromptRequest$zodSchema: z.ZodType<UpdateV2PromptRequest> =
|
|
|
45
46
|
"Run settings that apply to coding-agent runs of this prompt. Omitted fields keep their current or default values.",
|
|
46
47
|
),
|
|
47
48
|
status: UpdateV2PromptRequestStatus$zodSchema.optional(),
|
|
49
|
+
tags: z.array(z.string()).nullable().optional().describe(
|
|
50
|
+
"Tag names. A name matches an existing prompt tag of the organization regardless of case; a name with no match creates a new tag. CLI clients may expose this string array as a repeatable `--tag` flag. Replaces the prompt's tags. Pass an empty array to clear them; omit to keep the current tags.",
|
|
51
|
+
),
|
|
48
52
|
text: z.string().optional(),
|
|
49
53
|
topic_id: z.string().optional().describe(
|
|
50
54
|
"Prompt topic ID from `GET /v2/prompts/topics`.",
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 7e7f898f3e77
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod";
|
|
7
|
+
import {
|
|
8
|
+
PublicPromptTag,
|
|
9
|
+
PublicPromptTag$zodSchema,
|
|
10
|
+
} from "./publicprompttag.js";
|
|
11
|
+
|
|
12
|
+
export type V2PromptTagsResponse = {
|
|
13
|
+
data?: Array<PublicPromptTag> | undefined;
|
|
14
|
+
count: number;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const V2PromptTagsResponse$zodSchema: z.ZodType<V2PromptTagsResponse> = z
|
|
18
|
+
.object({
|
|
19
|
+
count: z.int(),
|
|
20
|
+
data: z.array(PublicPromptTag$zodSchema).optional(),
|
|
21
|
+
});
|
package/src/tool-names.ts
CHANGED
|
@@ -34,7 +34,11 @@ export const toolNames: Array<{ name: string; description: string }>= [
|
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
"name": "prompts-create",
|
|
37
|
-
"description": "Create Prompts\n\nCreates prompts in a batch. Each item is validated independently, so the response can contain both created prompts and individual errors."
|
|
37
|
+
"description": "Create Prompts\n\nCreates prompts in a batch. Each item is validated independently, so the response can contain both created prompts and individual errors. Tag names that match no existing prompt tag create new tags."
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "prompts-tags-list",
|
|
41
|
+
"description": "List Tags\n\nReturns the organization's prompt tags. Set tags on a prompt by name with `tags` on `POST /v2/prompts` or `PATCH /v2/prompts/{prompt_id}`; a name with no match creates the tag."
|
|
38
42
|
},
|
|
39
43
|
{
|
|
40
44
|
"name": "prompts-topics-list",
|
|
@@ -74,7 +78,7 @@ export const toolNames: Array<{ name: string; description: string }>= [
|
|
|
74
78
|
},
|
|
75
79
|
{
|
|
76
80
|
"name": "prompts-update",
|
|
77
|
-
"description": "Update Prompt\n\nUpdates a prompt's text, topic, platforms, lifecycle status, or coding-agent run settings. Omitted fields remain unchanged."
|
|
81
|
+
"description": "Update Prompt\n\nUpdates a prompt's text, topic, platforms, tags, lifecycle status, or coding-agent run settings. Omitted fields remain unchanged; `tags` replaces the prompt's tags."
|
|
78
82
|
},
|
|
79
83
|
{
|
|
80
84
|
"name": "prompts-delete",
|