@jclvsh/dropspace 2.7.3 → 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/personas.js +31 -0
- package/dist/index.js +1 -1
- package/dist/tools/personas.js +52 -0
- package/package.json +1 -1
|
@@ -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/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
|
}
|