@jclvsh/dropspace 2.7.2 → 2.8.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.
- package/dist/commands/launches.js +3 -0
- package/dist/commands/personas.js +31 -0
- package/dist/index.js +1 -1
- package/dist/tools/launches.js +13 -2
- package/dist/tools/personas.js +52 -0
- package/package.json +1 -1
|
@@ -66,6 +66,9 @@ export function registerLaunchCommands(program, client) {
|
|
|
66
66
|
body.publish = true;
|
|
67
67
|
if (opts.wait)
|
|
68
68
|
body.wait = true;
|
|
69
|
+
if (!body.product_description && !body.product_url && !body.custom_content && !body.platform_contents) {
|
|
70
|
+
throw new Error("provide --url or --description (or --custom-content / --platform-contents)");
|
|
71
|
+
}
|
|
69
72
|
const result = await client.post("/launches", body);
|
|
70
73
|
formatOutput(result, getFormat(program.opts()));
|
|
71
74
|
}
|
|
@@ -113,4 +113,35 @@ export function registerPersonaCommands(program, client) {
|
|
|
113
113
|
handleError(error);
|
|
114
114
|
}
|
|
115
115
|
});
|
|
116
|
+
personas
|
|
117
|
+
.command("finalize <id>")
|
|
118
|
+
.description("commit a persona's pending analysis after review")
|
|
119
|
+
.option("--analysis <text>", "optionally edited analysis text")
|
|
120
|
+
.option("--analysis-structured <json>", "optionally edited structured analysis as JSON")
|
|
121
|
+
.action(async (id, opts) => {
|
|
122
|
+
try {
|
|
123
|
+
const body = {};
|
|
124
|
+
if (opts.analysis)
|
|
125
|
+
body.persona_analysis = opts.analysis;
|
|
126
|
+
if (opts.analysisStructured)
|
|
127
|
+
body.persona_analysis_structured = JSON.parse(opts.analysisStructured);
|
|
128
|
+
const result = await client.post(`/personas/${id}/finalize`, body);
|
|
129
|
+
formatOutput(result, getFormat(program.opts()));
|
|
130
|
+
}
|
|
131
|
+
catch (error) {
|
|
132
|
+
handleError(error);
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
personas
|
|
136
|
+
.command("discard <id>")
|
|
137
|
+
.description("discard a persona's pending analysis without committing")
|
|
138
|
+
.action(async (id) => {
|
|
139
|
+
try {
|
|
140
|
+
const result = await client.post(`/personas/${id}/discard`, {});
|
|
141
|
+
formatOutput(result, getFormat(program.opts()));
|
|
142
|
+
}
|
|
143
|
+
catch (error) {
|
|
144
|
+
handleError(error);
|
|
145
|
+
}
|
|
146
|
+
});
|
|
116
147
|
}
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import { registerBoostTools } from "./tools/boosts.js";
|
|
|
15
15
|
import { registerAutopilotTools } from "./tools/autopilot.js";
|
|
16
16
|
const server = new McpServer({
|
|
17
17
|
name: "dropspace",
|
|
18
|
-
version: "2.
|
|
18
|
+
version: "2.8.0",
|
|
19
19
|
});
|
|
20
20
|
const client = new DropspaceClient();
|
|
21
21
|
registerLaunchTools(server, client);
|
package/dist/tools/launches.js
CHANGED
|
@@ -77,14 +77,14 @@ export function registerLaunchTools(server, client) {
|
|
|
77
77
|
product_description: z
|
|
78
78
|
.string()
|
|
79
79
|
.optional()
|
|
80
|
-
.describe("product description
|
|
80
|
+
.describe("product description — required unless product_url, custom_content, or platform_contents is provided"),
|
|
81
81
|
platforms: z
|
|
82
82
|
.array(z.enum(PLATFORMS))
|
|
83
83
|
.min(1)
|
|
84
84
|
.max(10)
|
|
85
85
|
.optional()
|
|
86
86
|
.describe("target platforms - required unless dropspace_platforms or user_platform_accounts is provided (inferred from their union)"),
|
|
87
|
-
product_url: z.string().url().optional().describe("product URL"),
|
|
87
|
+
product_url: z.string().url().optional().describe("product URL — scraped to generate content; can substitute for product_description"),
|
|
88
88
|
scheduled_date: z
|
|
89
89
|
.string()
|
|
90
90
|
.optional()
|
|
@@ -141,6 +141,17 @@ export function registerLaunchTools(server, client) {
|
|
|
141
141
|
.optional()
|
|
142
142
|
.describe("wait for publishing to complete and return post URLs inline (returns 200). requires publish: true"),
|
|
143
143
|
}, async (args) => {
|
|
144
|
+
if (!args.product_description && !args.product_url && !args.custom_content && !args.platform_contents) {
|
|
145
|
+
return {
|
|
146
|
+
content: [
|
|
147
|
+
{
|
|
148
|
+
type: "text",
|
|
149
|
+
text: "error: provide a product_url or product_description (or custom_content / platform_contents) so dropspace can generate the launch.",
|
|
150
|
+
},
|
|
151
|
+
],
|
|
152
|
+
isError: true,
|
|
153
|
+
};
|
|
154
|
+
}
|
|
144
155
|
try {
|
|
145
156
|
const result = await client.post("/launches", args);
|
|
146
157
|
return {
|
package/dist/tools/personas.js
CHANGED
|
@@ -149,4 +149,56 @@ export function registerPersonaTools(server, client) {
|
|
|
149
149
|
};
|
|
150
150
|
}
|
|
151
151
|
});
|
|
152
|
+
server.tool("finalize_persona", "commit a persona's pending analysis after review (the analyzed voice becomes usable)", {
|
|
153
|
+
id: z.string().uuid().describe("persona ID"),
|
|
154
|
+
persona_analysis: z.string().max(2000).optional().describe("optionally edited analysis text"),
|
|
155
|
+
persona_analysis_structured: z
|
|
156
|
+
.record(z.string(), z.unknown())
|
|
157
|
+
.optional()
|
|
158
|
+
.describe("optionally edited structured analysis"),
|
|
159
|
+
}, async ({ id, persona_analysis, persona_analysis_structured }) => {
|
|
160
|
+
try {
|
|
161
|
+
const body = {};
|
|
162
|
+
if (persona_analysis !== undefined)
|
|
163
|
+
body.persona_analysis = persona_analysis;
|
|
164
|
+
if (persona_analysis_structured !== undefined)
|
|
165
|
+
body.persona_analysis_structured = persona_analysis_structured;
|
|
166
|
+
const result = await client.post(`/personas/${id}/finalize`, body);
|
|
167
|
+
return {
|
|
168
|
+
content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
catch (error) {
|
|
172
|
+
return {
|
|
173
|
+
content: [
|
|
174
|
+
{
|
|
175
|
+
type: "text",
|
|
176
|
+
text: `error: ${error instanceof Error ? error.message : String(error)}`,
|
|
177
|
+
},
|
|
178
|
+
],
|
|
179
|
+
isError: true,
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
server.tool("discard_persona_analysis", "discard a persona's pending analysis without committing (preserves any previously saved analysis)", {
|
|
184
|
+
id: z.string().uuid().describe("persona ID"),
|
|
185
|
+
}, async ({ id }) => {
|
|
186
|
+
try {
|
|
187
|
+
const result = await client.post(`/personas/${id}/discard`, {});
|
|
188
|
+
return {
|
|
189
|
+
content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
catch (error) {
|
|
193
|
+
return {
|
|
194
|
+
content: [
|
|
195
|
+
{
|
|
196
|
+
type: "text",
|
|
197
|
+
text: `error: ${error instanceof Error ? error.message : String(error)}`,
|
|
198
|
+
},
|
|
199
|
+
],
|
|
200
|
+
isError: true,
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
});
|
|
152
204
|
}
|