latitude-mcp-server 2.2.7 → 3.0.1

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/api.d.ts CHANGED
@@ -52,10 +52,6 @@ interface PushResponse {
52
52
  * This is the CLI-style push that sends all changes at once
53
53
  */
54
54
  export declare function pushChanges(versionUuid: string, changes: DocumentChange[]): Promise<PushResponse>;
55
- /**
56
- * Compute hash of content for diff comparison
57
- */
58
- export declare function hashContent(content: string): string;
59
55
  /**
60
56
  * Compute diff between incoming prompts and existing prompts
61
57
  * Returns only the changes that need to be made
package/dist/api.js CHANGED
@@ -24,7 +24,6 @@ exports.getDocument = getDocument;
24
24
  exports.createOrUpdateDocument = createOrUpdateDocument;
25
25
  exports.deleteDocument = deleteDocument;
26
26
  exports.pushChanges = pushChanges;
27
- exports.hashContent = hashContent;
28
27
  exports.computeDiff = computeDiff;
29
28
  exports.runDocument = runDocument;
30
29
  exports.validatePromptLContent = validatePromptLContent;
@@ -67,9 +66,6 @@ async function request(endpoint, options = {}) {
67
66
  const body = options.body && method === 'POST'
68
67
  ? { ...options.body, __internal: { source: 'api' } }
69
68
  : options.body;
70
- if (body) {
71
- logger.debug(`Request body: ${JSON.stringify(body, null, 2)}`);
72
- }
73
69
  const response = await fetch(url, {
74
70
  method,
75
71
  headers: {
@@ -333,19 +329,6 @@ async function pushChanges(versionUuid, changes) {
333
329
  body: { changes: apiChanges },
334
330
  });
335
331
  }
336
- /**
337
- * Compute hash of content for diff comparison
338
- */
339
- function hashContent(content) {
340
- // Simple hash - in production you might want crypto
341
- let hash = 0;
342
- for (let i = 0; i < content.length; i++) {
343
- const char = content.charCodeAt(i);
344
- hash = ((hash << 5) - hash) + char;
345
- hash = hash & hash; // Convert to 32bit integer
346
- }
347
- return hash.toString(16);
348
- }
349
332
  /**
350
333
  * Compute diff between incoming prompts and existing prompts
351
334
  * Returns only the changes that need to be made
@@ -706,7 +689,6 @@ async function deployToLive(changes, _versionName) {
706
689
  logger.info(`Draft created: ${draft.uuid}`);
707
690
  // Step 2: Push all changes to the draft in ONE batch
708
691
  logger.info(`Pushing ${actualChanges.length} change(s) to draft...`);
709
- logger.debug(`Changes payload: ${JSON.stringify(actualChanges, null, 2)}`);
710
692
  const pushResult = await pushChanges(draft.uuid, actualChanges);
711
693
  logger.info(`Push complete: ${pushResult.documentsProcessed} documents processed`);
712
694
  // Step 3: Publish the draft to make it LIVE
package/dist/tools.d.ts CHANGED
@@ -5,9 +5,9 @@
5
5
  * - list_prompts : List all prompt names in LIVE
6
6
  * - get_prompt : Get full prompt content by name
7
7
  * - run_prompt : Execute a prompt with parameters
8
- * - push_prompts : Replace ALL LIVE prompts (creates branch merge)
9
- * - append_prompts : Add prompts to LIVE (creates branch merge)
10
- * - pull_prompts : Download LIVE prompts to local ./prompts/*.promptl
8
+ * - push_prompts : FULL SYNC to remote (adds, modifies, DELETES remote prompts not in local)
9
+ * - pull_prompts : FULL SYNC from remote (deletes ALL local, downloads ALL from LIVE)
10
+ * - append_prompts : ADDITIVE only (adds new, optionally updates existing, NEVER deletes)
11
11
  * - replace_prompt : Replace/create a single prompt (supports file path)
12
12
  * - docs : Documentation (help, get topic, find query)
13
13
  */
package/dist/tools.js CHANGED
@@ -6,9 +6,9 @@
6
6
  * - list_prompts : List all prompt names in LIVE
7
7
  * - get_prompt : Get full prompt content by name
8
8
  * - run_prompt : Execute a prompt with parameters
9
- * - push_prompts : Replace ALL LIVE prompts (creates branch merge)
10
- * - append_prompts : Add prompts to LIVE (creates branch merge)
11
- * - pull_prompts : Download LIVE prompts to local ./prompts/*.promptl
9
+ * - push_prompts : FULL SYNC to remote (adds, modifies, DELETES remote prompts not in local)
10
+ * - pull_prompts : FULL SYNC from remote (deletes ALL local, downloads ALL from LIVE)
11
+ * - append_prompts : ADDITIVE only (adds new, optionally updates existing, NEVER deletes)
12
12
  * - replace_prompt : Replace/create a single prompt (supports file path)
13
13
  * - docs : Documentation (help, get topic, find query)
14
14
  */
@@ -221,11 +221,11 @@ const PushPromptsSchema = zod_1.z.object({
221
221
  content: zod_1.z.string().describe('Full prompt content'),
222
222
  }))
223
223
  .optional()
224
- .describe('Prompts to push (replaces ALL existing prompts in LIVE)'),
224
+ .describe('Prompts to push - FULL SYNC: replaces ALL existing prompts in LIVE'),
225
225
  filePaths: zod_1.z
226
226
  .array(zod_1.z.string())
227
227
  .optional()
228
- .describe('File paths to .promptl files (alternative to prompts array)'),
228
+ .describe('File paths to .promptl files - FULL SYNC: deletes remote prompts not in this list'),
229
229
  });
230
230
  async function handlePushPrompts(args) {
231
231
  try {
@@ -310,16 +310,16 @@ const AppendPromptsSchema = zod_1.z.object({
310
310
  content: zod_1.z.string().describe('Prompt content'),
311
311
  }))
312
312
  .optional()
313
- .describe('Prompts to append'),
313
+ .describe('Prompts to append - ADDITIVE: keeps existing prompts, adds new ones'),
314
314
  filePaths: zod_1.z
315
315
  .array(zod_1.z.string())
316
316
  .optional()
317
- .describe('File paths to .promptl files (alternative to prompts array)'),
317
+ .describe('File paths to .promptl files - ADDITIVE: never deletes existing prompts'),
318
318
  overwrite: zod_1.z
319
319
  .boolean()
320
320
  .optional()
321
321
  .default(false)
322
- .describe('If true, overwrite existing prompts with same name'),
322
+ .describe('If true, update existing prompts with same name (still no deletions)'),
323
323
  });
324
324
  async function handleAppendPrompts(args) {
325
325
  try {
@@ -436,7 +436,7 @@ const PullPromptsSchema = zod_1.z.object({
436
436
  outputDir: zod_1.z
437
437
  .string()
438
438
  .optional()
439
- .describe('Output directory (default: ./prompts)'),
439
+ .describe('Output directory (default: ./prompts) - FULL SYNC: deletes ALL local .promptl files first'),
440
440
  });
441
441
  async function handlePullPrompts(args) {
442
442
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "latitude-mcp-server",
3
- "version": "2.2.7",
3
+ "version": "3.0.1",
4
4
  "description": "Simplified MCP server for Latitude.so prompt management - 8 focused tools for push, pull, run, and manage prompts",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",