@hyperstar/mcp 0.1.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.
Files changed (44) hide show
  1. package/README.md +186 -0
  2. package/dist/auth/cli-auth-client.d.ts +48 -0
  3. package/dist/auth/cli-auth-client.js +214 -0
  4. package/dist/auth/cli-auth-client.js.map +1 -0
  5. package/dist/auth/cli-auth-state.d.ts +26 -0
  6. package/dist/auth/cli-auth-state.js +176 -0
  7. package/dist/auth/cli-auth-state.js.map +1 -0
  8. package/dist/auth/local-callback.d.ts +18 -0
  9. package/dist/auth/local-callback.js +90 -0
  10. package/dist/auth/local-callback.js.map +1 -0
  11. package/dist/auth/pkce.d.ts +8 -0
  12. package/dist/auth/pkce.js +14 -0
  13. package/dist/auth/pkce.js.map +1 -0
  14. package/dist/cli.d.ts +18 -0
  15. package/dist/cli.js +326 -0
  16. package/dist/cli.js.map +1 -0
  17. package/dist/config.d.ts +35 -0
  18. package/dist/config.js +101 -0
  19. package/dist/config.js.map +1 -0
  20. package/dist/http.d.ts +24 -0
  21. package/dist/http.js +131 -0
  22. package/dist/http.js.map +1 -0
  23. package/dist/index.d.ts +2 -0
  24. package/dist/index.js +16 -0
  25. package/dist/index.js.map +1 -0
  26. package/dist/schemas.d.ts +61 -0
  27. package/dist/schemas.js +57 -0
  28. package/dist/schemas.js.map +1 -0
  29. package/dist/server.d.ts +4 -0
  30. package/dist/server.js +12 -0
  31. package/dist/server.js.map +1 -0
  32. package/dist/tool-inputs.d.ts +254 -0
  33. package/dist/tool-inputs.js +239 -0
  34. package/dist/tool-inputs.js.map +1 -0
  35. package/dist/tool-result.d.ts +4 -0
  36. package/dist/tool-result.js +23 -0
  37. package/dist/tool-result.js.map +1 -0
  38. package/dist/tools.d.ts +8 -0
  39. package/dist/tools.js +259 -0
  40. package/dist/tools.js.map +1 -0
  41. package/dist/workspaces.d.ts +11 -0
  42. package/dist/workspaces.js +77 -0
  43. package/dist/workspaces.js.map +1 -0
  44. package/package.json +41 -0
package/dist/http.d.ts ADDED
@@ -0,0 +1,24 @@
1
+ import { type HyperstarMcpConfig } from "./config.js";
2
+ export type JsonValue = null | boolean | number | string | readonly JsonValue[] | {
3
+ readonly [key: string]: JsonValue;
4
+ };
5
+ export type JsonObject = {
6
+ readonly [key: string]: JsonValue;
7
+ };
8
+ export declare class HyperstarApiError extends Error {
9
+ readonly status: number;
10
+ readonly detail: JsonValue;
11
+ readonly retryable: boolean;
12
+ constructor(status: number, detail: JsonValue);
13
+ }
14
+ export type HyperstarClient = {
15
+ readonly get: (path: string, query?: URLSearchParams) => Promise<JsonValue>;
16
+ readonly post: (path: string, body?: JsonObject, headers?: Record<string, string>) => Promise<JsonValue>;
17
+ readonly patch: (path: string, body?: JsonObject) => Promise<JsonValue>;
18
+ };
19
+ type Fetcher = (input: URL, init: RequestInit) => Promise<Response>;
20
+ export declare function createHyperstarClient(options: {
21
+ readonly config: HyperstarMcpConfig;
22
+ readonly fetcher?: Fetcher | undefined;
23
+ }): HyperstarClient;
24
+ export {};
package/dist/http.js ADDED
@@ -0,0 +1,131 @@
1
+ import { redactSecret } from "./config.js";
2
+ export class HyperstarApiError extends Error {
3
+ status;
4
+ detail;
5
+ retryable;
6
+ constructor(status, detail) {
7
+ super(typeof detail === "string"
8
+ ? detail
9
+ : `Hyperstar API request failed with status ${status}`);
10
+ this.name = "HyperstarApiError";
11
+ this.status = status;
12
+ this.detail = detail;
13
+ this.retryable = status === 429 || status >= 500;
14
+ }
15
+ }
16
+ export function createHyperstarClient(options) {
17
+ const fetcher = options.fetcher ?? fetch;
18
+ async function request(method, path, body, extraHeaders = {}, query) {
19
+ const url = buildApiUrl(options.config.apiBaseUrl, path);
20
+ if (query !== undefined) {
21
+ url.search = query.toString();
22
+ }
23
+ const baseHeaders = {
24
+ ...extraHeaders,
25
+ accept: "application/json",
26
+ };
27
+ const secretsToRedact = [];
28
+ let retryCliAccessToken;
29
+ if (options.config.authMode === "service_account") {
30
+ baseHeaders["x-hyperstar-api-key"] = options.config.apiKey;
31
+ secretsToRedact.push(options.config.apiKey);
32
+ }
33
+ else {
34
+ const selectedOrganizationId = await options.config.workspaceSelection.getSelectedOrganizationId();
35
+ assertSelectedWorkspace(selectedOrganizationId, path);
36
+ const accessToken = await options.config.accessTokenProvider.getAccessToken();
37
+ baseHeaders.Authorization = `Bearer ${accessToken}`;
38
+ secretsToRedact.push(accessToken, `Bearer ${accessToken}`);
39
+ if (selectedOrganizationId !== undefined) {
40
+ baseHeaders["X-Hyperstar-Organization-Id"] = selectedOrganizationId;
41
+ }
42
+ retryCliAccessToken =
43
+ options.config.accessTokenProvider.refreshAccessToken;
44
+ }
45
+ const init = { method, headers: baseHeaders };
46
+ if (body !== undefined) {
47
+ baseHeaders["content-type"] = "application/json";
48
+ init.body = JSON.stringify(body);
49
+ }
50
+ let response = await fetcher(url, init);
51
+ const payload = await readJson(response);
52
+ if (response.status === 401 && retryCliAccessToken !== undefined) {
53
+ const refreshedAccessToken = await retryCliAccessToken();
54
+ const retryHeaders = {
55
+ ...baseHeaders,
56
+ Authorization: `Bearer ${refreshedAccessToken}`,
57
+ };
58
+ secretsToRedact.push(refreshedAccessToken, `Bearer ${refreshedAccessToken}`);
59
+ response = await fetcher(url, { ...init, headers: retryHeaders });
60
+ const retryPayload = await readJson(response);
61
+ if (response.ok) {
62
+ return retryPayload;
63
+ }
64
+ throw new HyperstarApiError(response.status, redactSecrets(extractDetail(retryPayload), secretsToRedact));
65
+ }
66
+ if (!response.ok) {
67
+ throw new HyperstarApiError(response.status, redactSecrets(extractDetail(payload), secretsToRedact));
68
+ }
69
+ return payload;
70
+ }
71
+ return {
72
+ get: (path, query) => request("GET", path, undefined, {}, query),
73
+ post: (path, body, headers) => request("POST", path, body, headers),
74
+ patch: (path, body) => request("PATCH", path, body),
75
+ };
76
+ }
77
+ function buildApiUrl(apiBaseUrl, path) {
78
+ if (!path.startsWith("/") || path.startsWith("//") || path.includes("\\")) {
79
+ throw new Error("Hyperstar API path must be root-relative");
80
+ }
81
+ const baseUrl = new URL(apiBaseUrl);
82
+ const url = new URL(path, `${apiBaseUrl}/`);
83
+ if (url.origin !== baseUrl.origin) {
84
+ throw new Error("Hyperstar API path must preserve the configured origin");
85
+ }
86
+ return url;
87
+ }
88
+ /** Require an explicit workspace for CLI-authenticated Product API routes. */
89
+ function assertSelectedWorkspace(selectedOrganizationId, path) {
90
+ if (selectedOrganizationId !== undefined || path === "/v1/workspaces") {
91
+ return;
92
+ }
93
+ throw new Error("Run `hyperstar workspaces use <workspace_id>` before calling Product API routes");
94
+ }
95
+ async function readJson(response) {
96
+ const text = await response.text();
97
+ if (text.trim().length === 0) {
98
+ return null;
99
+ }
100
+ try {
101
+ return JSON.parse(text);
102
+ }
103
+ catch {
104
+ return text;
105
+ }
106
+ }
107
+ function extractDetail(payload) {
108
+ if (isJsonObject(payload) && "detail" in payload) {
109
+ return payload.detail;
110
+ }
111
+ return payload;
112
+ }
113
+ function isJsonObject(value) {
114
+ return value !== null && typeof value === "object" && !Array.isArray(value);
115
+ }
116
+ function redactSecrets(value, secrets) {
117
+ if (typeof value === "string") {
118
+ return secrets.reduce((redacted, secret) => redacted.split(secret).join(redactSecret(secret)), value);
119
+ }
120
+ if (Array.isArray(value)) {
121
+ return value.map((item) => redactSecrets(item, secrets));
122
+ }
123
+ if (isJsonObject(value)) {
124
+ return Object.fromEntries(Object.entries(value).map(([key, item]) => [
125
+ redactSecrets(key, secrets),
126
+ redactSecrets(item, secrets),
127
+ ]));
128
+ }
129
+ return value;
130
+ }
131
+ //# sourceMappingURL=http.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http.js","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAA2B,MAAM,aAAa,CAAC;AAYpE,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IACjC,MAAM,CAAS;IACf,MAAM,CAAY;IAClB,SAAS,CAAU;IAE5B,YAAY,MAAc,EAAE,MAA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OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,OAAO,CAAC,MAAM,CACnB,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,EACvE,KAAK,CACN,CAAC;IACJ,CAAC;IAED,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;IAC3D,CAAC;IAED,IAAI,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC;QACxB,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC;YACzC,aAAa,CAAC,GAAG,EAAE,OAAO,CAAC;YAC3B,aAAa,CAAC,IAAI,EAAE,OAAO,CAAC;SAC7B,CAAC,CACW,CAAC;IAClB,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
package/dist/index.js ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env node
2
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
3
+ import { loadConfig } from "./config.js";
4
+ import { createHyperstarMcpServer } from "./server.js";
5
+ /** Start the stdio MCP server process. */
6
+ async function main() {
7
+ const config = loadConfig();
8
+ const server = createHyperstarMcpServer(config);
9
+ await server.connect(new StdioServerTransport());
10
+ }
11
+ main().catch((error) => {
12
+ const message = error instanceof Error ? error.message : String(error);
13
+ process.stderr.write(`Failed to start Hyperstar MCP server: ${message}\n`);
14
+ process.exitCode = 1;
15
+ });
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEjF,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAEvD,0CAA0C;AAC1C,KAAK,UAAU,IAAI;IACjB,MAAM,MAAM,GAAG,UAAU,EAAE,CAAC;IAC5B,MAAM,MAAM,GAAG,wBAAwB,CAAC,MAAM,CAAC,CAAC;IAChD,MAAM,MAAM,CAAC,OAAO,CAAC,IAAI,oBAAoB,EAAE,CAAC,CAAC;AACnD,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;IAC9B,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,yCAAyC,OAAO,IAAI,CAAC,CAAC;IAC3E,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACvB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,61 @@
1
+ import { z } from "zod";
2
+ export type JsonValue = null | boolean | number | string | readonly JsonValue[] | {
3
+ readonly [key: string]: JsonValue;
4
+ };
5
+ export type JsonObject = {
6
+ readonly [key: string]: JsonValue;
7
+ };
8
+ export declare const JsonValueSchema: z.ZodType<JsonValue>;
9
+ export declare const JsonObjectSchema: z.ZodType<JsonObject>;
10
+ export declare const WhoamiResponseSchema: z.ZodObject<{
11
+ actor_type: z.ZodEnum<{
12
+ service_account: "service_account";
13
+ user: "user";
14
+ }>;
15
+ user_id: z.ZodNullable<z.ZodString>;
16
+ service_account_id: z.ZodNullable<z.ZodString>;
17
+ organization_id: z.ZodString;
18
+ scopes: z.ZodArray<z.ZodString>;
19
+ capabilities: z.ZodObject<{
20
+ search: z.ZodBoolean;
21
+ campaigns_read: z.ZodBoolean;
22
+ campaigns_write: z.ZodBoolean;
23
+ bulk_email: z.ZodBoolean;
24
+ inbox_read: z.ZodBoolean;
25
+ inbox_write: z.ZodBoolean;
26
+ }, z.core.$strip>;
27
+ }, z.core.$strip>;
28
+ export type WhoamiResponse = z.infer<typeof WhoamiResponseSchema>;
29
+ export declare const WorkspaceSchema: z.ZodObject<{
30
+ organization_id: z.ZodString;
31
+ name: z.ZodOptional<z.ZodString>;
32
+ role: z.ZodOptional<z.ZodString>;
33
+ }, z.core.$strip>;
34
+ export declare const WorkspaceListResponseSchema: z.ZodObject<{
35
+ workspaces: z.ZodArray<z.ZodObject<{
36
+ organization_id: z.ZodString;
37
+ name: z.ZodOptional<z.ZodString>;
38
+ role: z.ZodOptional<z.ZodString>;
39
+ }, z.core.$strip>>;
40
+ }, z.core.$strip>;
41
+ export declare const SearchCreatedResponseSchema: z.ZodObject<{
42
+ search_id: z.ZodUUID;
43
+ }, z.core.$strip>;
44
+ export declare const SearchResultsResponseSchema: z.ZodObject<{
45
+ creators: z.ZodArray<z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>>;
46
+ total: z.ZodNumber;
47
+ offset: z.ZodNumber;
48
+ limit: z.ZodNumber;
49
+ }, z.core.$strip>;
50
+ export declare const CampaignCreatorsResponseSchema: z.ZodObject<{
51
+ influencers: z.ZodArray<z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>>;
52
+ total: z.ZodNumber;
53
+ limit: z.ZodNumber;
54
+ offset: z.ZodNumber;
55
+ }, z.core.$strip>;
56
+ export declare const CampaignImportResponseSchema: z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>;
57
+ export declare const BulkEmailReadinessResponseSchema: z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>;
58
+ export declare const BulkEmailJobResponseSchema: z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>;
59
+ export declare const InboxThreadPageResponseSchema: z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>;
60
+ export declare const InboxAggregatesResponseSchema: z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>;
61
+ export declare const InboxWorkspaceStateResponseSchema: z.ZodType<JsonObject, unknown, z.core.$ZodTypeInternals<JsonObject, unknown>>;
@@ -0,0 +1,57 @@
1
+ import { z } from "zod";
2
+ export const JsonValueSchema = z.lazy(() => z.union([
3
+ z.null(),
4
+ z.boolean(),
5
+ z.number().finite(),
6
+ z.string(),
7
+ z.array(JsonValueSchema),
8
+ JsonObjectSchema,
9
+ ]));
10
+ export const JsonObjectSchema = z.record(z.string(), JsonValueSchema);
11
+ const NonNegativeIntegerSchema = z.number().int().min(0);
12
+ const PositiveIntegerSchema = z.number().int().min(1);
13
+ export const WhoamiResponseSchema = z.object({
14
+ actor_type: z.enum(["user", "service_account"]),
15
+ user_id: z.string().nullable(),
16
+ service_account_id: z.string().nullable(),
17
+ organization_id: z.string(),
18
+ scopes: z.array(z.string()),
19
+ capabilities: z.object({
20
+ search: z.boolean(),
21
+ campaigns_read: z.boolean(),
22
+ campaigns_write: z.boolean(),
23
+ bulk_email: z.boolean(),
24
+ inbox_read: z.boolean(),
25
+ inbox_write: z.boolean(),
26
+ }),
27
+ });
28
+ export const WorkspaceSchema = z.object({
29
+ organization_id: z.string().min(1),
30
+ name: z.string().min(1).optional(),
31
+ role: z.string().min(1).optional(),
32
+ });
33
+ export const WorkspaceListResponseSchema = z.object({
34
+ workspaces: z.array(WorkspaceSchema),
35
+ });
36
+ export const SearchCreatedResponseSchema = z.object({
37
+ search_id: z.uuid(),
38
+ });
39
+ export const SearchResultsResponseSchema = z.object({
40
+ creators: z.array(JsonObjectSchema),
41
+ total: NonNegativeIntegerSchema,
42
+ offset: NonNegativeIntegerSchema,
43
+ limit: PositiveIntegerSchema,
44
+ });
45
+ export const CampaignCreatorsResponseSchema = z.object({
46
+ influencers: z.array(JsonObjectSchema),
47
+ total: NonNegativeIntegerSchema,
48
+ limit: PositiveIntegerSchema,
49
+ offset: NonNegativeIntegerSchema,
50
+ });
51
+ export const CampaignImportResponseSchema = JsonObjectSchema;
52
+ export const BulkEmailReadinessResponseSchema = JsonObjectSchema;
53
+ export const BulkEmailJobResponseSchema = JsonObjectSchema;
54
+ export const InboxThreadPageResponseSchema = JsonObjectSchema;
55
+ export const InboxAggregatesResponseSchema = JsonObjectSchema;
56
+ export const InboxWorkspaceStateResponseSchema = JsonObjectSchema;
57
+ //# sourceMappingURL=schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,MAAM,CAAC,MAAM,eAAe,GAAyB,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAC/D,CAAC,CAAC,KAAK,CAAC;IACN,CAAC,CAAC,IAAI,EAAE;IACR,CAAC,CAAC,OAAO,EAAE;IACX,CAAC,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE;IACnB,CAAC,CAAC,MAAM,EAAE;IACV,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC;IACxB,gBAAgB;CACjB,CAAC,CACH,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAA0B,CAAC,CAAC,MAAM,CAC7D,CAAC,CAAC,MAAM,EAAE,EACV,eAAe,CAChB,CAAC;AAEF,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACzD,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAEtD,MAAM,CAAC,MAAM,oBAA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E,CAAC,CAAC,IAAI,EAAE;CACpB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAClD,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC;IACnC,KAAK,EAAE,wBAAwB;IAC/B,MAAM,EAAE,wBAAwB;IAChC,KAAK,EAAE,qBAAqB;CAC7B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC;IACrD,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC;IACtC,KAAK,EAAE,wBAAwB;IAC/B,KAAK,EAAE,qBAAqB;IAC5B,MAAM,EAAE,wBAAwB;CACjC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,4BAA4B,GAAG,gBAAgB,CAAC;AAC7D,MAAM,CAAC,MAAM,gCAAgC,GAAG,gBAAgB,CAAC;AACjE,MAAM,CAAC,MAAM,0BAA0B,GAAG,gBAAgB,CAAC;AAC3D,MAAM,CAAC,MAAM,6BAA6B,GAAG,gBAAgB,CAAC;AAC9D,MAAM,CAAC,MAAM,6BAA6B,GAAG,gBAAgB,CAAC;AAC9D,MAAM,CAAC,MAAM,iCAAiC,GAAG,gBAAgB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import type { HyperstarMcpConfig } from "./config.js";
3
+ /** Create the Hyperstar MCP server and register HTTP-backed workflow tools. */
4
+ export declare function createHyperstarMcpServer(config: HyperstarMcpConfig): McpServer;
package/dist/server.js ADDED
@@ -0,0 +1,12 @@
1
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import { createHyperstarClient } from "./http.js";
3
+ import { registerHyperstarTools } from "./tools.js";
4
+ /** Create the Hyperstar MCP server and register HTTP-backed workflow tools. */
5
+ export function createHyperstarMcpServer(config) {
6
+ const server = new McpServer({ name: "hyperstar", version: "0.1.0" });
7
+ registerHyperstarTools(server, createHyperstarClient({ config }), config.authMode === "cli"
8
+ ? { workspaceSelection: config.workspaceSelection }
9
+ : {});
10
+ return server;
11
+ }
12
+ //# sourceMappingURL=server.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEpD,+EAA+E;AAC/E,MAAM,UAAU,wBAAwB,CACtC,MAA0B;IAE1B,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;IACtE,sBAAsB,CACpB,MAAM,EACN,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC,EACjC,MAAM,CAAC,QAAQ,KAAK,KAAK;QACvB,CAAC,CAAC,EAAE,kBAAkB,EAAE,MAAM,CAAC,kBAAkB,EAAE;QACnD,CAAC,CAAC,EAAE,CACP,CAAC;IACF,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,254 @@
1
+ import { z } from "zod";
2
+ import type { JsonObject } from "./http.js";
3
+ export declare const SearchCreatorsInputSchema: z.ZodObject<{
4
+ kind: z.ZodEnum<{
5
+ semantic: "semantic";
6
+ reference: "reference";
7
+ }>;
8
+ platform: z.ZodEnum<{
9
+ tiktok: "tiktok";
10
+ instagram: "instagram";
11
+ }>;
12
+ region: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
13
+ query: z.ZodOptional<z.ZodString>;
14
+ filters: z.ZodOptional<z.ZodType<import("./schemas.js").JsonObject, unknown, z.core.$ZodTypeInternals<import("./schemas.js").JsonObject, unknown>>>;
15
+ limit: z.ZodOptional<z.ZodNumber>;
16
+ reference: z.ZodOptional<z.ZodType<import("./schemas.js").JsonObject, unknown, z.core.$ZodTypeInternals<import("./schemas.js").JsonObject, unknown>>>;
17
+ sort_by: z.ZodOptional<z.ZodEnum<{
18
+ relevance: "relevance";
19
+ matchScore: "matchScore";
20
+ follower_count: "follower_count";
21
+ engagement_rate: "engagement_rate";
22
+ avg_views: "avg_views";
23
+ views_growth_rate: "views_growth_rate";
24
+ gmv: "gmv";
25
+ gpm: "gpm";
26
+ }>>;
27
+ sort_order: z.ZodOptional<z.ZodEnum<{
28
+ asc: "asc";
29
+ desc: "desc";
30
+ }>>;
31
+ }, z.core.$strict>;
32
+ export declare const WhoamiInputSchema: z.ZodObject<{}, z.core.$strict>;
33
+ export declare const ListWorkspacesInputSchema: z.ZodObject<{}, z.core.$strict>;
34
+ export declare const SelectWorkspaceInputSchema: z.ZodObject<{
35
+ organization_id: z.ZodString;
36
+ }, z.core.$strict>;
37
+ export declare const WorkflowGuideInputSchema: z.ZodObject<{}, z.core.$strict>;
38
+ export declare const GetSearchResultsInputSchema: z.ZodObject<{
39
+ search_id: z.ZodUUID;
40
+ limit: z.ZodOptional<z.ZodNumber>;
41
+ offset: z.ZodOptional<z.ZodNumber>;
42
+ }, z.core.$strict>;
43
+ export declare const SaveSearchResultsToCampaignInputSchema: z.ZodObject<{
44
+ campaign_id: z.ZodNumber;
45
+ search_id: z.ZodUUID;
46
+ excluded_origin_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
47
+ limit: z.ZodOptional<z.ZodNumber>;
48
+ reference_id: z.ZodOptional<z.ZodString>;
49
+ }, z.core.$strict>;
50
+ export declare const CampaignCreatorsInputSchema: z.ZodObject<{
51
+ campaign_id: z.ZodNumber;
52
+ limit: z.ZodOptional<z.ZodNumber>;
53
+ offset: z.ZodOptional<z.ZodNumber>;
54
+ }, z.core.$strict>;
55
+ export declare const CheckBulkEmailReadinessInputSchema: z.ZodObject<{
56
+ campaign_id: z.ZodNumber;
57
+ campaign_creator_ids: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
58
+ campaign_creator_selection: z.ZodOptional<z.ZodObject<{
59
+ workflow_filter: z.ZodOptional<z.ZodEnum<{
60
+ email: "email";
61
+ content: "content";
62
+ all: "all";
63
+ email_not_sent: "email_not_sent";
64
+ email_sent: "email_sent";
65
+ replied: "replied";
66
+ negotiating: "negotiating";
67
+ rejected_hold: "rejected_hold";
68
+ rejected: "rejected";
69
+ hold: "hold";
70
+ contract: "contract";
71
+ contracted: "contracted";
72
+ draft: "draft";
73
+ final_approved: "final_approved";
74
+ posted: "posted";
75
+ }>>;
76
+ outreach_stage: z.ZodOptional<z.ZodString>;
77
+ platform: z.ZodOptional<z.ZodEnum<{
78
+ tiktok: "tiktok";
79
+ instagram: "instagram";
80
+ }>>;
81
+ country: z.ZodOptional<z.ZodString>;
82
+ has_video: z.ZodOptional<z.ZodBoolean>;
83
+ source_type: z.ZodOptional<z.ZodEnum<{
84
+ saved_list: "saved_list";
85
+ file_upload: "file_upload";
86
+ manual_add: "manual_add";
87
+ form_submission: "form_submission";
88
+ discovery_search: "discovery_search";
89
+ }>>;
90
+ search: z.ZodOptional<z.ZodString>;
91
+ excluded_ids: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
92
+ }, z.core.$strict>>;
93
+ }, z.core.$strict>;
94
+ export declare const StartBulkEmailInputSchema: z.ZodObject<{
95
+ campaign_id: z.ZodNumber;
96
+ subject: z.ZodString;
97
+ body_text: z.ZodString;
98
+ from_email: z.ZodOptional<z.ZodString>;
99
+ attachments: z.ZodOptional<z.ZodArray<z.ZodString>>;
100
+ campaign_creator_ids: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
101
+ campaign_creator_selection: z.ZodOptional<z.ZodObject<{
102
+ workflow_filter: z.ZodOptional<z.ZodEnum<{
103
+ email: "email";
104
+ content: "content";
105
+ all: "all";
106
+ email_not_sent: "email_not_sent";
107
+ email_sent: "email_sent";
108
+ replied: "replied";
109
+ negotiating: "negotiating";
110
+ rejected_hold: "rejected_hold";
111
+ rejected: "rejected";
112
+ hold: "hold";
113
+ contract: "contract";
114
+ contracted: "contracted";
115
+ draft: "draft";
116
+ final_approved: "final_approved";
117
+ posted: "posted";
118
+ }>>;
119
+ outreach_stage: z.ZodOptional<z.ZodString>;
120
+ platform: z.ZodOptional<z.ZodEnum<{
121
+ tiktok: "tiktok";
122
+ instagram: "instagram";
123
+ }>>;
124
+ country: z.ZodOptional<z.ZodString>;
125
+ has_video: z.ZodOptional<z.ZodBoolean>;
126
+ source_type: z.ZodOptional<z.ZodEnum<{
127
+ saved_list: "saved_list";
128
+ file_upload: "file_upload";
129
+ manual_add: "manual_add";
130
+ form_submission: "form_submission";
131
+ discovery_search: "discovery_search";
132
+ }>>;
133
+ search: z.ZodOptional<z.ZodString>;
134
+ excluded_ids: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
135
+ }, z.core.$strict>>;
136
+ form_id: z.ZodOptional<z.ZodNumber>;
137
+ form_language: z.ZodOptional<z.ZodEnum<{
138
+ en: "en";
139
+ ko: "ko";
140
+ jp: "jp";
141
+ }>>;
142
+ idempotency_key: z.ZodString;
143
+ }, z.core.$strict>;
144
+ export declare const BulkEmailJobInputSchema: z.ZodObject<{
145
+ job_id: z.ZodString;
146
+ }, z.core.$strict>;
147
+ export declare const InboxFiltersInputSchema: z.ZodObject<{
148
+ platforms: z.ZodOptional<z.ZodArray<z.ZodEnum<{
149
+ tiktok: "tiktok";
150
+ instagram: "instagram";
151
+ buyer: "buyer";
152
+ }>>>;
153
+ campaign_ids: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
154
+ outreach_stages: z.ZodOptional<z.ZodArray<z.ZodString>>;
155
+ label_ids: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
156
+ bulk_job_ids: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
157
+ unread_only: z.ZodOptional<z.ZodBoolean>;
158
+ actionable_only: z.ZodOptional<z.ZodBoolean>;
159
+ attention: z.ZodOptional<z.ZodBoolean>;
160
+ archived: z.ZodOptional<z.ZodBoolean>;
161
+ snoozed: z.ZodOptional<z.ZodBoolean>;
162
+ has_attachments: z.ZodOptional<z.ZodBoolean>;
163
+ search: z.ZodOptional<z.ZodString>;
164
+ last_message_at_from: z.ZodOptional<z.ZodISODateTime>;
165
+ last_message_at_to: z.ZodOptional<z.ZodISODateTime>;
166
+ }, z.core.$strict>;
167
+ export declare const ListInboxThreadsInputSchema: z.ZodObject<{
168
+ platforms: z.ZodOptional<z.ZodArray<z.ZodEnum<{
169
+ tiktok: "tiktok";
170
+ instagram: "instagram";
171
+ buyer: "buyer";
172
+ }>>>;
173
+ campaign_ids: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
174
+ outreach_stages: z.ZodOptional<z.ZodArray<z.ZodString>>;
175
+ label_ids: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
176
+ bulk_job_ids: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
177
+ unread_only: z.ZodOptional<z.ZodBoolean>;
178
+ actionable_only: z.ZodOptional<z.ZodBoolean>;
179
+ attention: z.ZodOptional<z.ZodBoolean>;
180
+ archived: z.ZodOptional<z.ZodBoolean>;
181
+ snoozed: z.ZodOptional<z.ZodBoolean>;
182
+ has_attachments: z.ZodOptional<z.ZodBoolean>;
183
+ search: z.ZodOptional<z.ZodString>;
184
+ last_message_at_from: z.ZodOptional<z.ZodISODateTime>;
185
+ last_message_at_to: z.ZodOptional<z.ZodISODateTime>;
186
+ sort_field: z.ZodOptional<z.ZodEnum<{
187
+ last_message_at: "last_message_at";
188
+ }>>;
189
+ sort_descending: z.ZodOptional<z.ZodBoolean>;
190
+ limit: z.ZodOptional<z.ZodNumber>;
191
+ offset: z.ZodOptional<z.ZodNumber>;
192
+ }, z.core.$strict>;
193
+ export declare const UpdateInboxThreadStateInputSchema: z.ZodObject<{
194
+ platform: z.ZodEnum<{
195
+ tiktok: "tiktok";
196
+ instagram: "instagram";
197
+ buyer: "buyer";
198
+ }>;
199
+ thread_id: z.ZodNumber;
200
+ archived: z.ZodOptional<z.ZodBoolean>;
201
+ snoozed_until: z.ZodOptional<z.ZodISODateTime>;
202
+ clear_snooze: z.ZodOptional<z.ZodBoolean>;
203
+ starred: z.ZodOptional<z.ZodBoolean>;
204
+ read_state: z.ZodOptional<z.ZodEnum<{
205
+ read: "read";
206
+ unread: "unread";
207
+ }>>;
208
+ clear_read_state: z.ZodOptional<z.ZodBoolean>;
209
+ }, z.core.$strict>;
210
+ export declare const SendInboxReplyInputSchema: z.ZodObject<{
211
+ platform: z.ZodEnum<{
212
+ tiktok: "tiktok";
213
+ instagram: "instagram";
214
+ buyer: "buyer";
215
+ }>;
216
+ thread_id: z.ZodNumber;
217
+ subject: z.ZodString;
218
+ body_text: z.ZodString;
219
+ attachments: z.ZodOptional<z.ZodArray<z.ZodString>>;
220
+ campaign_creator_id: z.ZodOptional<z.ZodNumber>;
221
+ idempotency_key: z.ZodString;
222
+ }, z.core.$strict>;
223
+ type SearchCreatorsInput = z.infer<typeof SearchCreatorsInputSchema>;
224
+ type ListWorkspacesInput = z.infer<typeof ListWorkspacesInputSchema>;
225
+ type SelectWorkspaceInput = z.infer<typeof SelectWorkspaceInputSchema>;
226
+ type WorkflowGuideInput = z.infer<typeof WorkflowGuideInputSchema>;
227
+ type GetSearchResultsInput = z.infer<typeof GetSearchResultsInputSchema>;
228
+ type SaveSearchResultsToCampaignInput = z.infer<typeof SaveSearchResultsToCampaignInputSchema>;
229
+ type CampaignCreatorsInput = z.infer<typeof CampaignCreatorsInputSchema>;
230
+ type CheckBulkEmailReadinessInput = z.infer<typeof CheckBulkEmailReadinessInputSchema>;
231
+ type StartBulkEmailInput = z.infer<typeof StartBulkEmailInputSchema>;
232
+ type BulkEmailJobInput = z.infer<typeof BulkEmailJobInputSchema>;
233
+ type InboxFiltersInput = z.infer<typeof InboxFiltersInputSchema>;
234
+ type ListInboxThreadsInput = z.infer<typeof ListInboxThreadsInputSchema>;
235
+ type UpdateInboxThreadStateInput = z.infer<typeof UpdateInboxThreadStateInputSchema>;
236
+ type SendInboxReplyInput = z.infer<typeof SendInboxReplyInputSchema>;
237
+ export type HyperstarToolHandlers = {
238
+ readonly hyperstarWhoami: () => Promise<JsonObject>;
239
+ readonly listWorkspaces: (input?: ListWorkspacesInput) => Promise<JsonObject>;
240
+ readonly selectWorkspace: (input: SelectWorkspaceInput) => Promise<JsonObject>;
241
+ readonly getHyperstarWorkflowGuide: (input?: WorkflowGuideInput) => Promise<JsonObject>;
242
+ readonly searchCreators: (input: SearchCreatorsInput) => Promise<JsonObject>;
243
+ readonly getSearchResults: (input: GetSearchResultsInput) => Promise<JsonObject>;
244
+ readonly saveSearchResultsToCampaign: (input: SaveSearchResultsToCampaignInput) => Promise<JsonObject>;
245
+ readonly listCampaignCreators: (input: CampaignCreatorsInput) => Promise<JsonObject>;
246
+ readonly checkBulkEmailReadiness: (input: CheckBulkEmailReadinessInput) => Promise<JsonObject>;
247
+ readonly startBulkEmail: (input: StartBulkEmailInput) => Promise<JsonObject>;
248
+ readonly getBulkEmailJob: (input: BulkEmailJobInput) => Promise<JsonObject>;
249
+ readonly listInboxThreads: (input: ListInboxThreadsInput) => Promise<JsonObject>;
250
+ readonly getInboxAggregates: (input: InboxFiltersInput) => Promise<JsonObject>;
251
+ readonly updateInboxThreadState: (input: UpdateInboxThreadStateInput) => Promise<JsonObject>;
252
+ readonly sendInboxReply: (input: SendInboxReplyInput) => Promise<JsonObject>;
253
+ };
254
+ export {};