emdash-emit 0.1.8 → 0.1.9
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/README.md +58 -23
- package/dist/cli/commands/profile.d.ts.map +1 -1
- package/dist/cli/commands/profile.js +67 -13
- package/dist/cli/commands/profile.js.map +1 -1
- package/dist/cli/commands/pull.d.ts +5 -0
- package/dist/cli/commands/pull.d.ts.map +1 -1
- package/dist/cli/commands/pull.js +96 -39
- package/dist/cli/commands/pull.js.map +1 -1
- package/dist/cli/commands/push.d.ts.map +1 -1
- package/dist/cli/commands/push.js +16 -1
- package/dist/cli/commands/push.js.map +1 -1
- package/dist/cli/commands/status.d.ts +19 -0
- package/dist/cli/commands/status.d.ts.map +1 -1
- package/dist/cli/commands/status.js +69 -3
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/context.d.ts +35 -0
- package/dist/cli/context.d.ts.map +1 -1
- package/dist/cli/context.js +112 -10
- package/dist/cli/context.js.map +1 -1
- package/dist/client/auth.d.ts +1 -0
- package/dist/client/auth.d.ts.map +1 -1
- package/dist/client/auth.js +1 -0
- package/dist/client/auth.js.map +1 -1
- package/dist/client/http.d.ts.map +1 -1
- package/dist/client/http.js +27 -10
- package/dist/client/http.js.map +1 -1
- package/dist/mcp/context.d.ts +1 -0
- package/dist/mcp/context.d.ts.map +1 -1
- package/dist/mcp/server.d.ts +8 -0
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +52 -13
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/tool-errors.d.ts +11 -0
- package/dist/mcp/tool-errors.d.ts.map +1 -0
- package/dist/mcp/tool-errors.js +62 -0
- package/dist/mcp/tool-errors.js.map +1 -0
- package/dist/mcp/tools/profile.d.ts +9 -2
- package/dist/mcp/tools/profile.d.ts.map +1 -1
- package/dist/mcp/tools/profile.js +49 -36
- package/dist/mcp/tools/profile.js.map +1 -1
- package/dist/mcp/tools/sync-diff.d.ts.map +1 -1
- package/dist/mcp/tools/sync-diff.js +20 -7
- package/dist/mcp/tools/sync-diff.js.map +1 -1
- package/dist/mcp/tools/sync-new.d.ts.map +1 -1
- package/dist/mcp/tools/sync-new.js +35 -22
- package/dist/mcp/tools/sync-new.js.map +1 -1
- package/dist/mcp/tools/sync-pull.d.ts.map +1 -1
- package/dist/mcp/tools/sync-pull.js +101 -72
- package/dist/mcp/tools/sync-pull.js.map +1 -1
- package/dist/mcp/tools/sync-push.d.ts.map +1 -1
- package/dist/mcp/tools/sync-push.js +24 -32
- package/dist/mcp/tools/sync-push.js.map +1 -1
- package/dist/mcp/tools/sync-status.d.ts.map +1 -1
- package/dist/mcp/tools/sync-status.js +55 -4
- package/dist/mcp/tools/sync-status.js.map +1 -1
- package/dist/sync/orchestrator.d.ts +6 -0
- package/dist/sync/orchestrator.d.ts.map +1 -1
- package/dist/sync/orchestrator.js +52 -27
- package/dist/sync/orchestrator.js.map +1 -1
- package/dist/sync/pull.d.ts +47 -0
- package/dist/sync/pull.d.ts.map +1 -1
- package/dist/sync/pull.js +148 -8
- package/dist/sync/pull.js.map +1 -1
- package/dist/sync/push.d.ts +2 -0
- package/dist/sync/push.d.ts.map +1 -1
- package/dist/sync/push.js +30 -3
- package/dist/sync/push.js.map +1 -1
- package/dist/sync/status.d.ts +11 -1
- package/dist/sync/status.d.ts.map +1 -1
- package/dist/sync/status.js +40 -6
- package/dist/sync/status.js.map +1 -1
- package/dist/sync/taxonomies.d.ts.map +1 -1
- package/dist/sync/taxonomies.js +39 -4
- package/dist/sync/taxonomies.js.map +1 -1
- package/dist/utils/config.d.ts +11 -0
- package/dist/utils/config.d.ts.map +1 -1
- package/dist/utils/config.js +14 -4
- package/dist/utils/config.js.map +1 -1
- package/dist/utils/frontmatter.d.ts +13 -1
- package/dist/utils/frontmatter.d.ts.map +1 -1
- package/dist/utils/frontmatter.js +49 -7
- package/dist/utils/frontmatter.js.map +1 -1
- package/dist/utils/profile.d.ts +3 -3
- package/dist/utils/profile.d.ts.map +1 -1
- package/dist/utils/profile.js +105 -8
- package/dist/utils/profile.js.map +1 -1
- package/package.json +1 -1
package/dist/client/http.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.js","sourceRoot":"","sources":["../../src/client/http.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,kBAAkB,EAAqB,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"http.js","sourceRoot":"","sources":["../../src/client/http.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,kBAAkB,EAAqB,MAAM,WAAW,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAsBtC;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAkC;IAClE,OAAO,CAAC,KAA6B,EAAE,IAAkB,EAAE,EAAE,CAC3D,kBAAkB,CAAC,KAAK,EAAE;QACxB,GAAG,IAAI;QACP,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,YAAY,EAAE,OAAO,CAAC,YAAY;QAClC,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;QAC1C,OAAO,EAAE,OAAO,CAAC,OAAO;KACzB,CAAC,CAAC;AACP,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,KAA6B,EAC7B,OAAO,GAA8B,EAAE;IAEvC,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,KAAK,CAAC;IACzC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,gBAAgB,EAAE,GAAG,WAAW,EAAE,GAAG,OAAO,CAAC;IAExF,MAAM,cAAc,GAAG,IAAI,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Q,GAAG,MAAM,YAAY,CAAC,YAAY,CAAC,CAAC;QAC9C,CAAC;QAAC,MAAM,CAAC;YACP,sEAAsE;QACxE,CAAC;IACH,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
package/dist/mcp/context.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/mcp/context.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,cAAc,CAAC;IACtB,KAAK,EAAE,aAAa,CAAC;IACrB,MAAM,EAAE,UAAU,CAAC;IACnB,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/mcp/context.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,cAAc,CAAC;IACtB,KAAK,EAAE,aAAa,CAAC;IACrB,MAAM,EAAE,UAAU,CAAC;IACnB,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,MAAM,eAAe,GAAG,CAAC,aAAa,CAAC,EAAE,MAAM,KAAK,aAAa,CAAC"}
|
package/dist/mcp/server.d.ts
CHANGED
|
@@ -3,6 +3,14 @@ import { CacheDatabase } from '../db/cache.js';
|
|
|
3
3
|
export interface CreateMcpServerOptions {
|
|
4
4
|
workspaceRoot?: string;
|
|
5
5
|
cache?: CacheDatabase;
|
|
6
|
+
/**
|
|
7
|
+
* Optional custom profiles.yaml path. When provided, every profile lookup performed by this
|
|
8
|
+
* server (explicit profile, cwd-matched profile, and auth resolution) reads only this file
|
|
9
|
+
* instead of the user-level ~/.config/emit/profiles.yaml. This keeps embedded usage and CI
|
|
10
|
+
* runs deterministic: results no longer depend on which sites happen to be configured on the
|
|
11
|
+
* machine executing the process.
|
|
12
|
+
*/
|
|
13
|
+
profilesPath?: string;
|
|
6
14
|
}
|
|
7
15
|
export declare const EMIT_MCP_INSTRUCTIONS: string;
|
|
8
16
|
export declare function createMcpServer(options?: CreateMcpServerOptions): McpServer;
|
package/dist/mcp/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGpE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGpE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAkB/C,MAAM,WAAW,sBAAsB;IACrC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,qBAAqB,QA8B1B,CAAC;AAET,wBAAgB,eAAe,CAAC,OAAO,CAAC,EAAE,sBAAsB,GAAG,SAAS,CA8G3E;AAED;;GAEG;AACH,wBAAsB,YAAY,CAAC,OAAO,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAIlF"}
|
package/dist/mcp/server.js
CHANGED
|
@@ -23,9 +23,10 @@ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
|
23
23
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
24
24
|
import { resolveAuth } from '../client/auth.js';
|
|
25
25
|
import { CacheDatabase } from '../db/cache.js';
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
26
|
+
import { resolveOriginPriority } from '../cli/context.js';
|
|
27
|
+
import { DEFAULT_ORIGIN, getEnvOrigin, loadConfig } from '../utils/config.js';
|
|
28
|
+
import { findWorkspaceRoot, getWorkspacePaths, requireWorkspaceRoot } from '../utils/workspace.js';
|
|
29
|
+
import { findProfileByDirectory, loadProfilesFile, AmbiguousProfileError, } from '../utils/profile.js';
|
|
29
30
|
import { registerProfileTools } from './tools/profile.js';
|
|
30
31
|
import { registerSyncNewTool } from './tools/sync-new.js';
|
|
31
32
|
import { registerSyncPullTools } from './tools/sync-pull.js';
|
|
@@ -41,11 +42,17 @@ Emit manages articles, taxonomies, and media as plain files on your local filesy
|
|
|
41
42
|
## Local Directory Structure
|
|
42
43
|
- posts/published/YYYYMMDD_<ulid>-<title>.md : Published articles in Markdown
|
|
43
44
|
- posts/draft/YYYYMMDD_<ulid>-<title>.md : Draft articles in Markdown
|
|
45
|
+
- posts/conflicts/<name>.conflict.md : Preserved divergent local copies (read-only rescue content; never an article)
|
|
44
46
|
- categories/<id>-<name>.yaml : Category definitions
|
|
45
47
|
- tags/<id>-<name>.yaml : Tag definitions
|
|
46
48
|
- media/<yyyyMMdd>_<id>-<name>.<ext> & .yaml : Media assets & companion metadata
|
|
47
49
|
- media/drafts/<filename> : Staging folder for offline draft images (auto-uploaded on sync_push)
|
|
48
50
|
|
|
51
|
+
## Rescue Copy Rule (posts/conflicts/)
|
|
52
|
+
- sync_pull moves a local file whose content diverged from the remote into posts/conflicts/ before overwriting it, so unpushed writing is never discarded.
|
|
53
|
+
- Read rescue copies and merge any valuable content into the canonical article, then delete the copy.
|
|
54
|
+
- Never pass a posts/conflicts/ path to sync_push: it is refused with QUARANTINED_COPY_NOT_PUSHABLE because it would overwrite the canonical article with stale content.
|
|
55
|
+
|
|
49
56
|
## Media & Image Rules (Two Distinct ID Spaces)
|
|
50
57
|
- Frontmatter featuredImage uses the 26-character media record id (e.g. "01M67P0MBMJQQXH2K95HHCYRYB") or null.
|
|
51
58
|
- Markdown body images use the storageKey-based URL: . Never put a media record id in /_emdash/api/media/file/.
|
|
@@ -63,9 +70,30 @@ export function createMcpServer(options) {
|
|
|
63
70
|
// Helper to resolve workspace context based on optional profile
|
|
64
71
|
const resolveContext = (targetProfile) => {
|
|
65
72
|
const profileToUse = targetProfile || activeProfileOverride;
|
|
73
|
+
const profilesData = loadProfilesFile(options?.profilesPath);
|
|
74
|
+
const explicitProf = profileToUse ? profilesData.profiles[profileToUse] : undefined;
|
|
75
|
+
const cwdProf = !profileToUse
|
|
76
|
+
? findProfileByDirectory(process.cwd(), options?.profilesPath)
|
|
77
|
+
: null;
|
|
78
|
+
const nearestEmitRoot = !profileToUse ? findWorkspaceRoot(process.cwd()) : null;
|
|
79
|
+
const envOrigin = getEnvOrigin();
|
|
80
|
+
const preResolvedWorkspace = options?.workspaceRoot ||
|
|
81
|
+
explicitProf?.workspace ||
|
|
82
|
+
cwdProf?.config.workspace ||
|
|
83
|
+
nearestEmitRoot ||
|
|
84
|
+
process.env.EMDASH_WORKSPACE;
|
|
85
|
+
const preConfig = preResolvedWorkspace ? loadConfig(preResolvedWorkspace) : undefined;
|
|
86
|
+
const preConfiguredOrigin = preConfig && preConfig.origin !== DEFAULT_ORIGIN ? preConfig.origin : undefined;
|
|
87
|
+
// An explicit EMDASH_ORIGIN is also a valid disambiguation hint for multi-profile setups.
|
|
88
|
+
const preOriginHint = preConfiguredOrigin || envOrigin;
|
|
66
89
|
let auth;
|
|
67
90
|
try {
|
|
68
|
-
auth = resolveAuth({
|
|
91
|
+
auth = resolveAuth({
|
|
92
|
+
profile: profileToUse,
|
|
93
|
+
cwd: preResolvedWorkspace || process.cwd(),
|
|
94
|
+
origin: preOriginHint,
|
|
95
|
+
customProfilesPath: options?.profilesPath,
|
|
96
|
+
});
|
|
69
97
|
if (!auth) {
|
|
70
98
|
throw new Error('No authentication token found. Please run emit profile add or set EMDASH_TOKEN.');
|
|
71
99
|
}
|
|
@@ -76,23 +104,33 @@ export function createMcpServer(options) {
|
|
|
76
104
|
}
|
|
77
105
|
throw err;
|
|
78
106
|
}
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
requireWorkspaceRoot();
|
|
107
|
+
const resolvedProf = explicitProf ||
|
|
108
|
+
(auth.profileName ? profilesData.profiles[auth.profileName] : undefined) ||
|
|
109
|
+
cwdProf?.config;
|
|
110
|
+
// An auto-resolved profile may only override the workspace config when none was requested.
|
|
111
|
+
const autoProf = profileToUse ? undefined : resolvedProf;
|
|
112
|
+
const workspaceRoot = preResolvedWorkspace || resolvedProf?.workspace || auth.workspace || requireWorkspaceRoot();
|
|
86
113
|
const paths = getWorkspacePaths(workspaceRoot);
|
|
87
114
|
const cache = options?.cache || new CacheDatabase(paths.dbPath);
|
|
88
|
-
const config = loadConfig(
|
|
115
|
+
const config = preConfig && preResolvedWorkspace === workspaceRoot ? preConfig : loadConfig(workspaceRoot);
|
|
116
|
+
const configuredOrigin = config.origin !== DEFAULT_ORIGIN ? config.origin : undefined;
|
|
117
|
+
const resolution = resolveOriginPriority({
|
|
118
|
+
explicitProfileName: profileToUse,
|
|
119
|
+
explicitProfileOrigin: explicitProf?.origin,
|
|
120
|
+
envOrigin,
|
|
121
|
+
configuredOrigin,
|
|
122
|
+
autoProfileOrigin: autoProf?.origin,
|
|
123
|
+
autoProfileName: auth.profileName || cwdProf?.name,
|
|
124
|
+
authOrigin: auth.origin,
|
|
125
|
+
});
|
|
89
126
|
return {
|
|
90
127
|
root: workspaceRoot,
|
|
91
128
|
paths,
|
|
92
129
|
cache,
|
|
93
130
|
config,
|
|
94
131
|
auth,
|
|
95
|
-
origin,
|
|
132
|
+
origin: resolution.origin,
|
|
133
|
+
originWarning: resolution.warning || undefined,
|
|
96
134
|
};
|
|
97
135
|
};
|
|
98
136
|
const server = new McpServer({
|
|
@@ -107,6 +145,7 @@ export function createMcpServer(options) {
|
|
|
107
145
|
setActiveOverride: (name) => {
|
|
108
146
|
activeProfileOverride = name;
|
|
109
147
|
},
|
|
148
|
+
profilesPath: options?.profilesPath,
|
|
110
149
|
});
|
|
111
150
|
registerSyncNewTool(server, resolveContext);
|
|
112
151
|
registerSyncPullTools(server, resolveContext);
|
package/dist/mcp/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,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CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IACpD,YAAY,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;QAC3B,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,GAAG,CAAC,CAAC;QAC9C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Formats a known Emit error into a structured MCP tool result.
|
|
4
|
+
*
|
|
5
|
+
* Without this, the MCP SDK converts a thrown error into `createToolError(String(error))`,
|
|
6
|
+
* which keeps only `error.message` and silently drops the structured diagnostics
|
|
7
|
+
* (`[CODE]`, HTTP status, endpoint, suggestion) that CLI users receive through
|
|
8
|
+
* `ApiError.toActionableString()`. AI agents need the same actionable detail.
|
|
9
|
+
*/
|
|
10
|
+
export declare function formatToolError(error: unknown): CallToolResult;
|
|
11
|
+
//# sourceMappingURL=tool-errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-errors.d.ts","sourceRoot":"","sources":["../../src/mcp/tool-errors.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAkBzE;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,cAAc,CAyB9D"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2026 SPORT-SERVICE RS★R
|
|
3
|
+
*
|
|
4
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
6
|
+
* in the Software without restriction, including without limitation the rights
|
|
7
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
9
|
+
* furnished to do so, subject to the following conditions:
|
|
10
|
+
*
|
|
11
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
12
|
+
* copies or substantial portions of the Software.
|
|
13
|
+
*
|
|
14
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
+
* SOFTWARE.
|
|
21
|
+
*/
|
|
22
|
+
import { ApiError } from '../client/error.js';
|
|
23
|
+
import { SyncPruneConflictError } from '../sync/orchestrator.js';
|
|
24
|
+
import { PushValidationError } from '../sync/push.js';
|
|
25
|
+
import { AmbiguousProfileError } from '../utils/profile.js';
|
|
26
|
+
function toolError(text) {
|
|
27
|
+
return {
|
|
28
|
+
isError: true,
|
|
29
|
+
content: [
|
|
30
|
+
{
|
|
31
|
+
type: 'text',
|
|
32
|
+
text,
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Formats a known Emit error into a structured MCP tool result.
|
|
39
|
+
*
|
|
40
|
+
* Without this, the MCP SDK converts a thrown error into `createToolError(String(error))`,
|
|
41
|
+
* which keeps only `error.message` and silently drops the structured diagnostics
|
|
42
|
+
* (`[CODE]`, HTTP status, endpoint, suggestion) that CLI users receive through
|
|
43
|
+
* `ApiError.toActionableString()`. AI agents need the same actionable detail.
|
|
44
|
+
*/
|
|
45
|
+
export function formatToolError(error) {
|
|
46
|
+
if (error instanceof ApiError) {
|
|
47
|
+
return toolError(error.toActionableString());
|
|
48
|
+
}
|
|
49
|
+
if (error instanceof PushValidationError) {
|
|
50
|
+
return toolError(JSON.stringify({
|
|
51
|
+
error: 'PREFLIGHT_VALIDATION_FAILED',
|
|
52
|
+
message: error.message,
|
|
53
|
+
errors: error.errors,
|
|
54
|
+
}, null, 2));
|
|
55
|
+
}
|
|
56
|
+
if (error instanceof SyncPruneConflictError || error instanceof AmbiguousProfileError) {
|
|
57
|
+
return toolError(`❌ ${error.message}`);
|
|
58
|
+
}
|
|
59
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
60
|
+
return toolError(`❌ ${message}`);
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=tool-errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-errors.js","sourceRoot":"","sources":["../../src/mcp/tool-errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,SAAS,SAAS,CAAC,IAAY;IAC7B,OAAO;QACL,OAAO,EAAE,IAAI;QACb,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI;aACL;SACF;KACF,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe,CAAC,KAAc;IAC5C,IAAI,KAAK,YAAY,QAAQ,EAAE,CAAC;QAC9B,OAAO,SAAS,CAAC,KAAK,CAAC,kBAAkB,EAAE,CAAC,CAAC;IAC/C,CAAC;IAED,IAAI,KAAK,YAAY,mBAAmB,EAAE,CAAC;QACzC,OAAO,SAAS,CACd,IAAI,CAAC,SAAS,CACZ;YACE,KAAK,EAAE,6BAA6B;YACpC,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,MAAM,EAAE,KAAK,CAAC,MAAM;SACrB,EACD,IAAI,EACJ,CAAC,CACF,CACF,CAAC;IACJ,CAAC;IAED,IAAI,KAAK,YAAY,sBAAsB,IAAI,KAAK,YAAY,qBAAqB,EAAE,CAAC;QACtF,OAAO,SAAS,CAAC,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IACzC,CAAC;IAED,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvE,OAAO,SAAS,CAAC,KAAK,OAAO,EAAE,CAAC,CAAC;AACnC,CAAC"}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
-
export
|
|
2
|
+
export interface ProfileToolOptions {
|
|
3
3
|
getActiveOverride: () => string | undefined;
|
|
4
4
|
setActiveOverride: (name: string | undefined) => void;
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Custom profiles.yaml path forwarded from createMcpServer. When set, profile tools read and
|
|
7
|
+
* write exactly the same file the sync tools resolve against, so an embedded server never
|
|
8
|
+
* reports profiles it cannot actually use.
|
|
9
|
+
*/
|
|
10
|
+
profilesPath?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function registerProfileTools(server: McpServer, options: ProfileToolOptions): void;
|
|
6
13
|
//# sourceMappingURL=profile.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/profile.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/profile.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIzE,MAAM,WAAW,kBAAkB;IACjC,iBAAiB,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;IAC5C,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IACtD;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,kBAAkB,GAAG,IAAI,CAoFzF"}
|
|
@@ -21,28 +21,34 @@
|
|
|
21
21
|
*/
|
|
22
22
|
import { z } from 'zod';
|
|
23
23
|
import { loadProfilesFile, setActiveProfile } from '../../utils/profile.js';
|
|
24
|
+
import { formatToolError } from '../tool-errors.js';
|
|
24
25
|
export function registerProfileTools(server, options) {
|
|
25
26
|
// profile_list: List available profiles and indicate active one
|
|
26
|
-
server.tool('profile_list', 'List configured site profiles from ~/.config/emit/profiles.yaml, showing their origin URLs, workspace roots, and active selection.', {}, async () => {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
name,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
27
|
+
server.tool('profile_list', 'List configured site profiles from the Emit profiles file (~/.config/emit/profiles.yaml by default), showing their origin URLs, workspace roots, and active selection.', {}, async () => {
|
|
28
|
+
try {
|
|
29
|
+
const data = loadProfilesFile(options.profilesPath);
|
|
30
|
+
const currentActive = options.getActiveOverride() || data.active;
|
|
31
|
+
const profiles = Object.entries(data.profiles).map(([name, p]) => ({
|
|
32
|
+
name,
|
|
33
|
+
origin: p.origin,
|
|
34
|
+
workspace: p.workspace,
|
|
35
|
+
active: name === currentActive,
|
|
36
|
+
}));
|
|
37
|
+
return {
|
|
38
|
+
content: [
|
|
39
|
+
{
|
|
40
|
+
type: 'text',
|
|
41
|
+
text: JSON.stringify({
|
|
42
|
+
activeProfile: currentActive,
|
|
43
|
+
profiles,
|
|
44
|
+
}, null, 2),
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
catch (error) {
|
|
50
|
+
return formatToolError(error);
|
|
51
|
+
}
|
|
46
52
|
});
|
|
47
53
|
// profile_switch: Switch active profile for this session or globally
|
|
48
54
|
server.tool('profile_switch', 'Switch the active site profile for the current MCP session (or globally with persist: true) when managing multiple EmDash instances.', {
|
|
@@ -50,32 +56,39 @@ export function registerProfileTools(server, options) {
|
|
|
50
56
|
persist: z
|
|
51
57
|
.boolean()
|
|
52
58
|
.optional()
|
|
53
|
-
.describe('If true, updates active profile in
|
|
59
|
+
.describe('If true, updates active profile in profiles.yaml permanently'),
|
|
54
60
|
}, async (args) => {
|
|
55
|
-
|
|
56
|
-
|
|
61
|
+
try {
|
|
62
|
+
const data = loadProfilesFile(options.profilesPath);
|
|
63
|
+
if (!data.profiles[args.name]) {
|
|
64
|
+
// Marked as a tool error so clients/agents can branch on isError instead of scraping text.
|
|
65
|
+
return {
|
|
66
|
+
isError: true,
|
|
67
|
+
content: [
|
|
68
|
+
{
|
|
69
|
+
type: 'text',
|
|
70
|
+
text: `❌ Profile "${args.name}" not found. Available profiles: ${Object.keys(data.profiles).join(', ') || 'none'}.`,
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
if (args.persist) {
|
|
76
|
+
setActiveProfile(args.name, options.profilesPath);
|
|
77
|
+
}
|
|
78
|
+
options.setActiveOverride(args.name);
|
|
79
|
+
const p = data.profiles[args.name];
|
|
57
80
|
return {
|
|
58
81
|
content: [
|
|
59
82
|
{
|
|
60
83
|
type: 'text',
|
|
61
|
-
text:
|
|
84
|
+
text: `✅ Switched active profile to "${args.name}" (origin: ${p.origin}, workspace: ${p.workspace}${args.persist ? ', persisted to profiles.yaml' : ''}).`,
|
|
62
85
|
},
|
|
63
86
|
],
|
|
64
87
|
};
|
|
65
88
|
}
|
|
66
|
-
|
|
67
|
-
|
|
89
|
+
catch (error) {
|
|
90
|
+
return formatToolError(error);
|
|
68
91
|
}
|
|
69
|
-
options.setActiveOverride(args.name);
|
|
70
|
-
const p = data.profiles[args.name];
|
|
71
|
-
return {
|
|
72
|
-
content: [
|
|
73
|
-
{
|
|
74
|
-
type: 'text',
|
|
75
|
-
text: `✅ Switched active profile to "${args.name}" (origin: ${p.origin}, workspace: ${p.workspace}${args.persist ? ', persisted to profiles.yaml' : ''}).`,
|
|
76
|
-
},
|
|
77
|
-
],
|
|
78
|
-
};
|
|
79
92
|
});
|
|
80
93
|
}
|
|
81
94
|
//# sourceMappingURL=profile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile.js","sourceRoot":"","sources":["../../../src/mcp/tools/profile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"profile.js","sourceRoot":"","sources":["../../../src/mcp/tools/profile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAapD,MAAM,UAAU,oBAAoB,CAAC,MAAiB,EAA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zE,OAAO,KAAK,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"sync-diff.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/sync-diff.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,eAAe,EAAiB,MAAM,eAAe,CAAC;AAIpE,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,eAAe,GAAG,IAAI,CA2C7F"}
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
*/
|
|
22
22
|
import { z } from 'zod';
|
|
23
23
|
import { inspectArticleDiff } from '../../sync/diff.js';
|
|
24
|
+
import { formatToolError } from '../tool-errors.js';
|
|
24
25
|
export function registerSyncDiffTool(server, resolveContext) {
|
|
25
26
|
server.tool('sync_diff', 'Display line-by-line differences between local article edits and the baseline snapshot/remote version before pushing. Useful for reviewing changes or diagnosing unpushed modifications.', {
|
|
26
27
|
filePath: z
|
|
@@ -30,13 +31,25 @@ export function registerSyncDiffTool(server, resolveContext) {
|
|
|
30
31
|
id: z.string().optional().describe('Article ID (ULID) to inspect'),
|
|
31
32
|
profile: z.string().optional().describe('Target profile name for multi-site setups'),
|
|
32
33
|
}, async (args) => {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
34
|
+
let ctx;
|
|
35
|
+
try {
|
|
36
|
+
ctx = resolveContext(args.profile);
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
return formatToolError(error);
|
|
40
|
+
}
|
|
41
|
+
let inspection;
|
|
42
|
+
try {
|
|
43
|
+
inspection = inspectArticleDiff({
|
|
44
|
+
workspaceRoot: ctx.root,
|
|
45
|
+
cache: ctx.cache,
|
|
46
|
+
filePath: args.filePath,
|
|
47
|
+
id: args.id,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
return formatToolError(error);
|
|
52
|
+
}
|
|
40
53
|
return {
|
|
41
54
|
content: [
|
|
42
55
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync-diff.js","sourceRoot":"","sources":["../../../src/mcp/tools/sync-diff.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"sync-diff.js","sourceRoot":"","sources":["../../../src/mcp/tools/sync-diff.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,kBAAkB,EAA8B,MAAM,oBAAoB,CAAC;AACpF,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,UAAU,oBAAoB,CAAC,MAAiB,EAAE,cAA+B;IACrF,MAAM,CAAC,IAAI,CACT,WAAW,EACX,0LAA0L,EAC1L;QACE,QAAQ,EAAE,CAAC;aACR,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,iGAAiG,CAClG;QACH,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,8BAA8B,CAAC;QAClE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,2CAA2C,CAAC;KACrF,EACD,KAAK,EAAE,IAAI,EAAE,EAAE;QACb,IAAI,GAAkB,CAAC;QACvB,IAAI,CAAC;YACH,GAAG,GAAG,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACrC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,eAAe,CAAC,KAAK,CAAC,CAAC;QAChC,CAAC;QACD,IAAI,UAAiC,CAAC;QACtC,IAAI,CAAC;YACH,UAAU,GAAG,kBAAkB,CAAC;gBAC9B,aAAa,EAAE,GAAG,CAAC,IAAI;gBACvB,KAAK,EAAE,GAAG,CAAC,KAAK;gBAChB,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,EAAE,EAAE,IAAI,CAAC,EAAE;aACZ,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,eAAe,CAAC,KAAK,CAAC,CAAC;QAChC,CAAC;QAED,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,UAAU,CAAC,eAAe;iBACjC;aACF;SACF,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync-new.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/sync-new.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"sync-new.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/sync-new.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,eAAe,EAAiB,MAAM,eAAe,CAAC;AAKpE,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,eAAe,GAAG,IAAI,CAwD5F"}
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
import { z } from 'zod';
|
|
23
23
|
import { createArticleScaffold } from '../../sync/new.js';
|
|
24
24
|
import { getLocalTaxonomiesSummary, formatTaxonomiesHint } from '../../sync/taxonomies.js';
|
|
25
|
+
import { formatToolError } from '../tool-errors.js';
|
|
25
26
|
export function registerSyncNewTool(server, resolveContext) {
|
|
26
27
|
server.tool('sync_new', 'Create a new article draft scaffold in posts/draft/ with standardized frontmatter (ULID, slug, title, default bylines). Returns the created relative file path and available categories/tags hints (sorted by usage) so you can edit the Markdown file directly before pushing.', {
|
|
27
28
|
slug: z.string().describe('URL slug for the new article'),
|
|
@@ -37,28 +38,40 @@ export function registerSyncNewTool(server, resolveContext) {
|
|
|
37
38
|
.describe('Author byline slug (defaults to first cached non-guest author by slug)'),
|
|
38
39
|
profile: z.string().optional().describe('Target profile name for multi-site setups'),
|
|
39
40
|
}, async (args) => {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
41
|
+
let ctx;
|
|
42
|
+
try {
|
|
43
|
+
ctx = resolveContext(args.profile);
|
|
44
|
+
}
|
|
45
|
+
catch (error) {
|
|
46
|
+
return formatToolError(error);
|
|
47
|
+
}
|
|
48
|
+
try {
|
|
49
|
+
const collection = args.collection || ctx.config.defaultCollection;
|
|
50
|
+
const res = createArticleScaffold({
|
|
51
|
+
slug: args.slug,
|
|
52
|
+
workspaceRoot: ctx.root,
|
|
53
|
+
collection,
|
|
54
|
+
title: args.title,
|
|
55
|
+
locale: args.locale || ctx.config.defaultLocale,
|
|
56
|
+
byline: args.byline,
|
|
57
|
+
cache: ctx.cache,
|
|
58
|
+
});
|
|
59
|
+
const taxSummary = getLocalTaxonomiesSummary(ctx.root);
|
|
60
|
+
const taxHint = formatTaxonomiesHint(taxSummary, { maxTags: 60 });
|
|
61
|
+
const hintBlock = taxHint ? `\n\n${taxHint}` : '';
|
|
62
|
+
return {
|
|
63
|
+
content: [
|
|
64
|
+
{
|
|
65
|
+
type: 'text',
|
|
66
|
+
text: `✅ Created new draft article '${args.slug}' (ID: ${res.id}) at ${res.filePath}.${hintBlock}\n\nYou can now edit the file directly and sync it with sync_push.`,
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
catch (error) {
|
|
72
|
+
// Slug validation, byline resolution, and taxonomy hint reads all fail here.
|
|
73
|
+
return formatToolError(error);
|
|
74
|
+
}
|
|
62
75
|
});
|
|
63
76
|
}
|
|
64
77
|
//# sourceMappingURL=sync-new.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync-new.js","sourceRoot":"","sources":["../../../src/mcp/tools/sync-new.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"sync-new.js","sourceRoot":"","sources":["../../../src/mcp/tools/sync-new.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAC3F,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,UAAU,mBAAmB,CAAC,MAAiB,EAAE,cAA+B;IACpF,MAAM,CAAC,IAAI,CACT,UAAU,EACV,iRAAiR,EACjR;QACE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,8BAA8B,CAAC;QACzD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,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E,MAAM,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAElD,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,gCAAgC,IAAI,CAAC,IAAI,UAAU,GAAG,CAAC,EAAE,QAAQ,GAAG,CAAC,QAAQ,IAAI,SAAS,oEAAoE;qBACrK;iBACF;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,6EAA6E;YAC7E,OAAO,eAAe,CAAC,KAAK,CAAC,CAAC;QAChC,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync-pull.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/sync-pull.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"sync-pull.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/sync-pull.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,eAAe,EAAiB,MAAM,eAAe,CAAC;AAapE,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,eAAe,GAAG,IAAI,CA2R9F"}
|