latitude-mcp-server 3.3.0 → 3.3.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.
Files changed (2) hide show
  1. package/dist/api.js +14 -1
  2. package/package.json +1 -1
package/dist/api.js CHANGED
@@ -279,7 +279,20 @@ async function publishVersion(versionUuid, title) {
279
279
  }
280
280
  async function listDocuments(versionUuid = 'live') {
281
281
  const projectId = getProjectId();
282
- return request(`/projects/${projectId}/versions/${versionUuid}/documents`);
282
+ try {
283
+ return await request(`/projects/${projectId}/versions/${versionUuid}/documents`);
284
+ }
285
+ catch (error) {
286
+ // Handle new projects with no LIVE version yet
287
+ // The API returns 404 "NotFoundError" with "head commit not found" message
288
+ if (error instanceof LatitudeApiError &&
289
+ error.statusCode === 404 &&
290
+ versionUuid === 'live') {
291
+ logger.info('No LIVE version exists yet (new project) - treating as empty');
292
+ return [];
293
+ }
294
+ throw error;
295
+ }
283
296
  }
284
297
  /**
285
298
  * Compute SHA-256 hash of content (matches Latitude's contentHash)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "latitude-mcp-server",
3
- "version": "3.3.0",
3
+ "version": "3.3.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",