@contentrain/mcp 1.8.0 → 1.9.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/README.md +5 -1
- package/dist/{annotations-BFJbfSKe.mjs → annotations-DSzewhL4.mjs} +42 -20
- package/dist/annotations-DSzewhL4.mjs.map +1 -0
- package/dist/{apply-manager-BRmB27H5.mjs → apply-manager-BnPbPXFG.mjs} +1 -1
- package/dist/{apply-manager-BRmB27H5.mjs.map → apply-manager-BnPbPXFG.mjs.map} +1 -1
- package/dist/{astro-parser-B-nLl0zE.mjs → astro-parser-BVoGjA6M.mjs} +3 -3
- package/dist/{astro-parser-B-nLl0zE.mjs.map → astro-parser-BVoGjA6M.mjs.map} +1 -1
- package/dist/availability-Bj9zOfEn.mjs +47 -0
- package/dist/availability-Bj9zOfEn.mjs.map +1 -0
- package/dist/{branch-lifecycle-7dQoF22r.d.mts → branch-lifecycle-AwBJIheA.d.mts} +1 -1
- package/dist/{branch-lifecycle-7dQoF22r.d.mts.map → branch-lifecycle-AwBJIheA.d.mts.map} +1 -1
- package/dist/{compiler-k4yttlzM.mjs → compiler-BZXAN4Ir.mjs} +2 -2
- package/dist/{compiler-k4yttlzM.mjs.map → compiler-BZXAN4Ir.mjs.map} +1 -1
- package/dist/{compiler-sfc.cjs-D0d_OicF.mjs → compiler-sfc.cjs-tFlmtjrJ.mjs} +2 -2
- package/dist/{compiler-sfc.cjs-D0d_OicF.mjs.map → compiler-sfc.cjs-tFlmtjrJ.mjs.map} +1 -1
- package/dist/{content-manager-DqDLSNQ-.d.mts → content-manager-BExZy6Eu.d.mts} +2 -2
- package/dist/{content-manager-DqDLSNQ-.d.mts.map → content-manager-BExZy6Eu.d.mts.map} +1 -1
- package/dist/core/apply-manager.mjs +1 -1
- package/dist/core/config.d.mts +1 -1
- package/dist/core/content-manager.d.mts +1 -1
- package/dist/core/context.d.mts +1 -1
- package/dist/core/contracts/index.d.mts +1 -1
- package/dist/core/doctor.mjs +2 -2
- package/dist/core/graph-builder.mjs +2 -2
- package/dist/core/model-manager.d.mts +1 -1
- package/dist/core/ops/index.d.mts +2 -2
- package/dist/core/overlay-reader.d.mts +1 -1
- package/dist/core/overlay-reader.mjs +1 -1
- package/dist/core/scan-config.mjs +1 -1
- package/dist/core/scanner.mjs +3 -3
- package/dist/core/validator/index.d.mts +1 -1
- package/dist/core/validator/index.mjs +1 -1
- package/dist/{detect-eWS6lvoH.mjs → detect-wVSI9VuY.mjs} +1 -1
- package/dist/{detect-eWS6lvoH.mjs.map → detect-wVSI9VuY.mjs.map} +1 -1
- package/dist/{doctor-qiUKCy9b.mjs → doctor-BTToHt0y.mjs} +2 -2
- package/dist/{doctor-qiUKCy9b.mjs.map → doctor-BTToHt0y.mjs.map} +1 -1
- package/dist/git/branch-lifecycle.d.mts +1 -1
- package/dist/git/transaction.d.mts +1 -1
- package/dist/{graph-builder-DXv2JEp-.mjs → graph-builder-CRUX_8mA.mjs} +2 -2
- package/dist/{graph-builder-DXv2JEp-.mjs.map → graph-builder-CRUX_8mA.mjs.map} +1 -1
- package/dist/index-6yasXNLQ.d.mts +2 -0
- package/dist/index.mjs +10 -10
- package/dist/{node-DN9hZeil.mjs → node-wC-z3NoZ.mjs} +1 -1
- package/dist/{node-DN9hZeil.mjs.map → node-wC-z3NoZ.mjs.map} +1 -1
- package/dist/{overlay-reader-CUs9jgqk.mjs → overlay-reader-BOb105gS.mjs} +1 -1
- package/dist/{overlay-reader-CUs9jgqk.mjs.map → overlay-reader-BOb105gS.mjs.map} +1 -1
- package/dist/{paths-C3xNyc7z.mjs → paths-BU6E-oDs.mjs} +1 -1
- package/dist/{paths-C3xNyc7z.mjs.map → paths-BU6E-oDs.mjs.map} +1 -1
- package/dist/providers/github/index.d.mts +1 -1
- package/dist/providers/github/index.mjs +32 -9
- package/dist/providers/github/index.mjs.map +1 -1
- package/dist/providers/gitlab/index.d.mts +1 -1
- package/dist/providers/gitlab/index.mjs +36 -11
- package/dist/providers/gitlab/index.mjs.map +1 -1
- package/dist/providers/local/index.d.mts +2 -2
- package/dist/providers/local/index.d.mts.map +1 -1
- package/dist/{scan-config-jC6XmiqF.mjs → scan-config-BGUflS8t.mjs} +1 -1
- package/dist/{scan-config-jC6XmiqF.mjs.map → scan-config-BGUflS8t.mjs.map} +1 -1
- package/dist/{scanner-DKMwc03k.mjs → scanner-VOwrKLGC.mjs} +6 -6
- package/dist/{scanner-DKMwc03k.mjs.map → scanner-VOwrKLGC.mjs.map} +1 -1
- package/dist/server/http/index.d.mts +11 -1
- package/dist/server/http/index.d.mts.map +1 -1
- package/dist/server/http/index.mjs +20 -12
- package/dist/server/http/index.mjs.map +1 -1
- package/dist/{server-DZBcZWhE.d.mts → server-B1KfvywF.d.mts} +25 -10
- package/dist/server-B1KfvywF.d.mts.map +1 -0
- package/dist/{server-tTuinKHD.mjs → server-B6_fzRmK.mjs} +47 -18
- package/dist/{server-tTuinKHD.mjs.map → server-B6_fzRmK.mjs.map} +1 -1
- package/dist/server.d.mts +2 -2
- package/dist/server.mjs +11 -11
- package/dist/{source-map-generator-BWDva49I.mjs → source-map-generator-BIEiz3If.mjs} +1 -1
- package/dist/{source-map-generator-BWDva49I.mjs.map → source-map-generator-BIEiz3If.mjs.map} +1 -1
- package/dist/{svelte-parser-Dr9mmZuk.mjs → svelte-parser-Bll-1SK0.mjs} +3 -3
- package/dist/{svelte-parser-Dr9mmZuk.mjs.map → svelte-parser-Bll-1SK0.mjs.map} +1 -1
- package/dist/templates/index.mjs +1 -1
- package/dist/{templates-VrLVqfe5.mjs → templates-D6EllixQ.mjs} +1 -1
- package/dist/{templates-VrLVqfe5.mjs.map → templates-D6EllixQ.mjs.map} +1 -1
- package/dist/tools/annotations.d.mts +3 -0
- package/dist/tools/annotations.d.mts.map +1 -1
- package/dist/tools/annotations.mjs +1 -1
- package/dist/tools/availability.d.mts +36 -0
- package/dist/tools/availability.d.mts.map +1 -0
- package/dist/tools/availability.mjs +2 -0
- package/dist/{tsx-parser-CQc6nr-o.mjs → tsx-parser-B_aI_C2r.mjs} +1 -1
- package/dist/{tsx-parser-CQc6nr-o.mjs.map → tsx-parser-B_aI_C2r.mjs.map} +1 -1
- package/dist/tsx-parser-ChduVwKJ.mjs +2 -0
- package/dist/util/detect.mjs +1 -1
- package/dist/{validator-Z3DGNWQ6.mjs → validator-8vaPxSba.mjs} +1 -1
- package/dist/{validator-Z3DGNWQ6.mjs.map → validator-8vaPxSba.mjs.map} +1 -1
- package/dist/{vue-parser-COgjArqv.mjs → vue-parser-COig4Y1a.mjs} +3 -3
- package/dist/{vue-parser-COgjArqv.mjs.map → vue-parser-COig4Y1a.mjs.map} +1 -1
- package/package.json +10 -4
- package/dist/annotations-BFJbfSKe.mjs.map +0 -1
- package/dist/index-D0wQJSgs.d.mts +0 -2
- package/dist/server-DZBcZWhE.d.mts.map +0 -1
- package/dist/tsx-parser-BOMZE_yQ.mjs +0 -2
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
//#region src/tools/availability.ts
|
|
2
|
+
const TOOL_REQUIREMENTS = {
|
|
3
|
+
contentrain_init: { projectRoot: true },
|
|
4
|
+
contentrain_scaffold: { projectRoot: true },
|
|
5
|
+
contentrain_doctor: { projectRoot: true },
|
|
6
|
+
contentrain_bulk: { projectRoot: true },
|
|
7
|
+
contentrain_submit: {
|
|
8
|
+
projectRoot: true,
|
|
9
|
+
capabilities: ["localWorktree", "pushRemote"]
|
|
10
|
+
},
|
|
11
|
+
contentrain_merge: {
|
|
12
|
+
projectRoot: true,
|
|
13
|
+
capabilities: ["localWorktree"]
|
|
14
|
+
},
|
|
15
|
+
contentrain_branch_list: {
|
|
16
|
+
projectRoot: true,
|
|
17
|
+
capabilities: ["localWorktree"]
|
|
18
|
+
},
|
|
19
|
+
contentrain_branch_delete: {
|
|
20
|
+
projectRoot: true,
|
|
21
|
+
capabilities: ["localWorktree"]
|
|
22
|
+
},
|
|
23
|
+
contentrain_scan: {
|
|
24
|
+
projectRoot: true,
|
|
25
|
+
capabilities: ["astScan"]
|
|
26
|
+
},
|
|
27
|
+
contentrain_apply: {
|
|
28
|
+
projectRoot: true,
|
|
29
|
+
capabilities: ["sourceRead"]
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Whether a tool can ever succeed for this provider + projectRoot pair.
|
|
34
|
+
* Used by `createServer` to filter registration; also exported for
|
|
35
|
+
* embedders (e.g. Studio) that want to reason about the effective tool
|
|
36
|
+
* surface without spinning up a server.
|
|
37
|
+
*/
|
|
38
|
+
function isToolAvailable(name, provider, projectRoot) {
|
|
39
|
+
const req = TOOL_REQUIREMENTS[name];
|
|
40
|
+
if (!req) return true;
|
|
41
|
+
if (req.projectRoot && !projectRoot) return false;
|
|
42
|
+
return (req.capabilities ?? []).every((cap) => provider.capabilities[cap]);
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
export { isToolAvailable as n, TOOL_REQUIREMENTS as t };
|
|
46
|
+
|
|
47
|
+
//# sourceMappingURL=availability-Bj9zOfEn.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"availability-Bj9zOfEn.mjs","names":[],"sources":["../src/tools/availability.ts"],"sourcesContent":["import type { ProviderCapabilities } from '@contentrain/types'\n\n/**\n * Declarative availability requirements for capability-gated tools.\n *\n * This is the single source of truth `createServer` uses to decide which\n * tools to register for a given provider + projectRoot combination. Tools\n * absent from this map are always available. The requirements mirror the\n * call-time guards inside each tool handler (`capabilityError`) — those\n * guards remain as defense in depth, but a client talking to a remote\n * provider no longer sees tools that could never succeed in `tools/list`.\n *\n * `contentrain_validate` is intentionally NOT listed: read-only validate\n * works over any provider; only `fix: true` needs a local worktree and\n * keeps its call-time guard.\n */\nexport interface ToolRequirements {\n /** Tool needs a local project root on disk (worktree git transactions, IDE config, AST scans). */\n projectRoot?: boolean\n /** Provider capability flags that must all be `true`. */\n capabilities?: readonly (keyof ProviderCapabilities)[]\n}\n\nexport const TOOL_REQUIREMENTS: Readonly<Record<string, ToolRequirements>> = {\n contentrain_init: { projectRoot: true },\n contentrain_scaffold: { projectRoot: true },\n contentrain_doctor: { projectRoot: true },\n contentrain_bulk: { projectRoot: true },\n contentrain_submit: { projectRoot: true, capabilities: ['localWorktree', 'pushRemote'] },\n contentrain_merge: { projectRoot: true, capabilities: ['localWorktree'] },\n contentrain_branch_list: { projectRoot: true, capabilities: ['localWorktree'] },\n contentrain_branch_delete: { projectRoot: true, capabilities: ['localWorktree'] },\n contentrain_scan: { projectRoot: true, capabilities: ['astScan'] },\n // Registration requires the extract path (sourceRead); reuse mode\n // additionally needs sourceWrite, which stays a call-time check because\n // it depends on the `mode` input.\n contentrain_apply: { projectRoot: true, capabilities: ['sourceRead'] },\n}\n\n/**\n * Whether a tool can ever succeed for this provider + projectRoot pair.\n * Used by `createServer` to filter registration; also exported for\n * embedders (e.g. Studio) that want to reason about the effective tool\n * surface without spinning up a server.\n */\nexport function isToolAvailable(\n name: string,\n provider: { capabilities: ProviderCapabilities },\n projectRoot: string | undefined,\n): boolean {\n const req = TOOL_REQUIREMENTS[name]\n if (!req) return true\n if (req.projectRoot && !projectRoot) return false\n return (req.capabilities ?? []).every(cap => provider.capabilities[cap])\n}\n"],"mappings":";AAuBA,MAAa,oBAAgE;CAC3E,kBAAkB,EAAE,aAAa,MAAM;CACvC,sBAAsB,EAAE,aAAa,MAAM;CAC3C,oBAAoB,EAAE,aAAa,MAAM;CACzC,kBAAkB,EAAE,aAAa,MAAM;CACvC,oBAAoB;EAAE,aAAa;EAAM,cAAc,CAAC,iBAAiB,aAAa;EAAE;CACxF,mBAAmB;EAAE,aAAa;EAAM,cAAc,CAAC,gBAAgB;EAAE;CACzE,yBAAyB;EAAE,aAAa;EAAM,cAAc,CAAC,gBAAgB;EAAE;CAC/E,2BAA2B;EAAE,aAAa;EAAM,cAAc,CAAC,gBAAgB;EAAE;CACjF,kBAAkB;EAAE,aAAa;EAAM,cAAc,CAAC,UAAU;EAAE;CAIlE,mBAAmB;EAAE,aAAa;EAAM,cAAc,CAAC,aAAa;EAAE;CACvE;;;;;;;AAQD,SAAgB,gBACd,MACA,UACA,aACS;CACT,MAAM,MAAM,kBAAkB;AAC9B,KAAI,CAAC,IAAK,QAAO;AACjB,KAAI,IAAI,eAAe,CAAC,YAAa,QAAO;AAC5C,SAAQ,IAAI,gBAAgB,EAAE,EAAE,OAAM,QAAO,SAAS,aAAa,KAAK"}
|
|
@@ -138,4 +138,4 @@ declare function pruneMergedRemoteBranches(projectRoot: string, opts?: {
|
|
|
138
138
|
}): Promise<RemotePruneResult>;
|
|
139
139
|
//#endregion
|
|
140
140
|
export { RemoteDeleteResult as a, checkBranchHealth as c, deleteRemoteBranch as d, isRefMerged as f, RemoteBranchList as i, classifyMergedBranches as l, pruneMergedRemoteBranches as m, BranchHealthCheck as n, RemotePruneResult as o, listRemoteCrBranches as p, CleanupResult as r, branchDiff as s, BranchDiffResult as t, cleanupMergedBranches as u };
|
|
141
|
-
//# sourceMappingURL=branch-lifecycle-
|
|
141
|
+
//# sourceMappingURL=branch-lifecycle-AwBJIheA.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"branch-lifecycle-
|
|
1
|
+
{"version":3,"file":"branch-lifecycle-AwBJIheA.d.mts","names":[],"sources":["../src/git/branch-lifecycle.ts"],"mappings":";;;;UAIiB,aAAA;EACf,OAAA;EACA,SAAA;EACA,eAAA;AAAA;AAAA,UAGe,iBAAA;EACf,KAAA;EACA,MAAA;EACA,QAAA;EACA,OAAA;EACA,OAAA;EACA,OAAA;AAAA;;;;;iBAOoB,qBAAA,CAAsB,WAAA,WAAsB,OAAA,CAAQ,aAAA;;;;;;iBAoEpD,iBAAA,CAAkB,WAAA,WAAsB,OAAA,CAAQ,iBAAA;AAAA,UAkDrD,gBAAA;;EAEf,MAAA;EAxH0C;EA0H1C,IAAA;EA1HwE;EA4HxE,IAAA;EA5HqF;EA8HrF,KAAA;EA1DqC;EA4DrC,YAAA;AAAA;;;;;;AAVF;;;;;;;;iBA0BsB,UAAA,CACpB,WAAA,UACA,IAAA;EAAQ,MAAA;EAAgB,IAAA;AAAA,IACvB,OAAA,CAAQ,gBAAA;;;;;;iBA0FW,WAAA,CACpB,GAAA,EAAK,SAAA,EACL,GAAA,UACA,IAAA,UACA,IAAA;EAAS,gBAAA;AAAA,IACR,OAAA;;;;AALH;;;;;;;;;;;iBAiCsB,sBAAA,CACpB,WAAA,UACA,QAAA,YACA,IAAA,WACA,IAAA;EAAS,iBAAA;AAAA,IACR,OAAA,CAAQ,GAAA;AAAA,UA4EM,kBAAA;EACf,OAAA;EA7EQ;EA+ER,OAAA;EAlFA;EAoFA,OAAA;AAAA;;;;;;AALF;;;iBAgBsB,kBAAA,CACpB,WAAA,UACA,MAAA,UACA,IAAA;EAAS,MAAA,GAAS,iBAAA;EAA0B,SAAA;AAAA,IAC3C,OAAA,CAAQ,kBAAA;AAAA,UAuBM,gBAAA;EACf,MAAA;EACA,QAAA;IAAY,IAAA;IAAc,GAAA;EAAA;EAzBjB;EA2BT,KAAA;AAAA;;;;;;iBAQoB,oBAAA,CACpB,WAAA,UACA,IAAA;EAAS,SAAA;AAAA,IACR,OAAA,CAAQ,gBAAA;AAAA,UAoBM,iBAAA;EA1DY;EA4D3B,OAAA;EACA,IAAA;EACA,MAAA;EACA,OAAA;AAAA;;;;;;;;iBAYoB,yBAAA,CACpB,WAAA,UACA,IAAA;EAAS,MAAA,GAAS,iBAAA;EAA0B,GAAA;EAAc,MAAA;EAAkB,SAAA;AAAA,IAC3E,OAAA,CAAQ,iBAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as __exportAll, t as __commonJSMin } from "./chunk-BEJ448es.mjs";
|
|
2
|
-
import { t as require_source_map_generator } from "./source-map-generator-
|
|
2
|
+
import { t as require_source_map_generator } from "./source-map-generator-BIEiz3If.mjs";
|
|
3
3
|
import { createRequire } from "module";
|
|
4
4
|
//#region ../../node_modules/.pnpm/svelte@4.2.20/node_modules/svelte/src/compiler/Stats.js
|
|
5
5
|
const now = () => performance.now();
|
|
@@ -44506,4 +44506,4 @@ async function preprocess(source, preprocessor, options) {
|
|
|
44506
44506
|
//#endregion
|
|
44507
44507
|
export { VERSION, compile, parse, preprocess, walk };
|
|
44508
44508
|
|
|
44509
|
-
//# sourceMappingURL=compiler-
|
|
44509
|
+
//# sourceMappingURL=compiler-BZXAN4Ir.mjs.map
|