@mgcrea/mcp-x-api 0.1.0 → 0.1.2
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/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { B as setupInstructions, I as hasAdsAccess, L as hasApiCredentials, R as loadConfig, T as startLoginFlow, a as openInBrowser, q as BUILD_INFO, r as createServer } from "./server-
|
|
2
|
+
import { B as setupInstructions, I as hasAdsAccess, L as hasApiCredentials, R as loadConfig, T as startLoginFlow, a as openInBrowser, q as BUILD_INFO, r as createServer } from "./server-Dsl12dsQ.js";
|
|
3
3
|
import { ZodError } from "zod";
|
|
4
4
|
import { StdioServerTransport } from "@modelcontextprotocol/server/stdio";
|
|
5
5
|
//#region src/cli.ts
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as AdsApiClient, C as compositeTokenProvider, D as fromMicro, E as MICRO, F as effectiveScopes, G as WritesDisabledError, H as BudgetExceededError, I as hasAdsAccess, K as XApiRequestError, M as DEFAULT_PRICING, N as SANDBOX_ADS_BASE_URL, O as shapeMoney, P as adsSetupInstructions, R as loadConfig, S as bearerTokenProvider, U as PreconditionError, V as AdsAccessError, W as UserContextRequiredError, _ as shapeUser, b as createDayCache, c as buildIntentUrl, d as TCO_URL_LENGTH, f as weightedLength, g as shapePostsResponse, h as shapePostResponse, i as registerTools, j as DEFAULT_ADS_BASE_URL, k as toMicro, l as validateIntent, m as buildIncludesIndex, n as SERVER_VERSION, o as INTENT_BASE_URL, p as XApiClient, q as BUILD_INFO, r as createServer, s as assembleComposerText, t as SERVER_NAME, u as MAX_WEIGHTED_LENGTH, v as shapeUsersResponse, w as staticTokenProvider, x as utcDay, y as createLedger, z as resolveConfigPath } from "./server-
|
|
1
|
+
import { A as AdsApiClient, C as compositeTokenProvider, D as fromMicro, E as MICRO, F as effectiveScopes, G as WritesDisabledError, H as BudgetExceededError, I as hasAdsAccess, K as XApiRequestError, M as DEFAULT_PRICING, N as SANDBOX_ADS_BASE_URL, O as shapeMoney, P as adsSetupInstructions, R as loadConfig, S as bearerTokenProvider, U as PreconditionError, V as AdsAccessError, W as UserContextRequiredError, _ as shapeUser, b as createDayCache, c as buildIntentUrl, d as TCO_URL_LENGTH, f as weightedLength, g as shapePostsResponse, h as shapePostResponse, i as registerTools, j as DEFAULT_ADS_BASE_URL, k as toMicro, l as validateIntent, m as buildIncludesIndex, n as SERVER_VERSION, o as INTENT_BASE_URL, p as XApiClient, q as BUILD_INFO, r as createServer, s as assembleComposerText, t as SERVER_NAME, u as MAX_WEIGHTED_LENGTH, v as shapeUsersResponse, w as staticTokenProvider, x as utcDay, y as createLedger, z as resolveConfigPath } from "./server-Dsl12dsQ.js";
|
|
2
2
|
export { AdsAccessError, AdsApiClient, BUILD_INFO, BudgetExceededError, DEFAULT_ADS_BASE_URL, DEFAULT_PRICING, INTENT_BASE_URL, MAX_WEIGHTED_LENGTH, MICRO, PreconditionError, SANDBOX_ADS_BASE_URL, SERVER_NAME, SERVER_VERSION, TCO_URL_LENGTH, UserContextRequiredError, WritesDisabledError, XApiClient, XApiRequestError, adsSetupInstructions, assembleComposerText, bearerTokenProvider, buildIncludesIndex, buildIntentUrl, compositeTokenProvider, createDayCache, createLedger, createServer, effectiveScopes, fromMicro, hasAdsAccess, loadConfig, registerTools, resolveConfigPath, shapeMoney, shapePostResponse, shapePostsResponse, shapeUser, shapeUsersResponse, staticTokenProvider, toMicro, utcDay, validateIntent, weightedLength };
|
|
@@ -23,8 +23,8 @@ const pkg = readPackageJson();
|
|
|
23
23
|
const BUILD_INFO = {
|
|
24
24
|
name: pkg.name,
|
|
25
25
|
version: pkg.version,
|
|
26
|
-
gitCommit: "
|
|
27
|
-
gitCommitDate: "2026-
|
|
26
|
+
gitCommit: "c3130be",
|
|
27
|
+
gitCommitDate: "2026-09-01T15:03:41+02:00"
|
|
28
28
|
};
|
|
29
29
|
//#endregion
|
|
30
30
|
//#region src/client/errors.ts
|
|
@@ -1986,9 +1986,15 @@ const createAccountResolver = (client, ads) => {
|
|
|
1986
1986
|
};
|
|
1987
1987
|
//#endregion
|
|
1988
1988
|
//#region src/tools/util.ts
|
|
1989
|
+
/**
|
|
1990
|
+
* Compact, not pretty-printed. `null, 2` adds 19-41% to every response — worst
|
|
1991
|
+
* on wide lists of short-keyed objects, which are exactly the replies already
|
|
1992
|
+
* big enough to hurt. No model needs the indentation, and every tool returns
|
|
1993
|
+
* through here. Files written to disk for humans stay pretty.
|
|
1994
|
+
*/
|
|
1989
1995
|
const ok = (data) => ({ content: [{
|
|
1990
1996
|
type: "text",
|
|
1991
|
-
text: JSON.stringify(data ?? { ok: true }
|
|
1997
|
+
text: JSON.stringify(data ?? { ok: true })
|
|
1992
1998
|
}] });
|
|
1993
1999
|
const fail = (message, extra) => ({
|
|
1994
2000
|
content: [{
|
|
@@ -1996,7 +2002,7 @@ const fail = (message, extra) => ({
|
|
|
1996
2002
|
text: JSON.stringify({
|
|
1997
2003
|
error: message,
|
|
1998
2004
|
...extra ? { details: extra } : {}
|
|
1999
|
-
}
|
|
2005
|
+
})
|
|
2000
2006
|
}],
|
|
2001
2007
|
isError: true
|
|
2002
2008
|
});
|
|
@@ -4005,4 +4011,4 @@ const createServer$1 = (opts) => {
|
|
|
4005
4011
|
//#endregion
|
|
4006
4012
|
export { AdsApiClient as A, setupInstructions as B, compositeTokenProvider as C, fromMicro as D, MICRO as E, effectiveScopes as F, WritesDisabledError as G, BudgetExceededError as H, hasAdsAccess as I, XApiRequestError as K, hasApiCredentials as L, DEFAULT_PRICING as M, SANDBOX_ADS_BASE_URL as N, shapeMoney as O, adsSetupInstructions as P, loadConfig as R, bearerTokenProvider as S, startLoginFlow as T, PreconditionError as U, AdsAccessError as V, UserContextRequiredError as W, shapeUser as _, openInBrowser as a, createDayCache as b, buildIntentUrl as c, TCO_URL_LENGTH as d, weightedLength as f, shapePostsResponse as g, shapePostResponse as h, registerTools as i, DEFAULT_ADS_BASE_URL as j, toMicro as k, validateIntent as l, buildIncludesIndex as m, SERVER_VERSION as n, INTENT_BASE_URL as o, XApiClient as p, BUILD_INFO as q, createServer$1 as r, assembleComposerText as s, SERVER_NAME as t, MAX_WEIGHTED_LENGTH as u, shapeUsersResponse as v, staticTokenProvider as w, utcDay as x, createLedger as y, resolveConfigPath as z };
|
|
4007
4013
|
|
|
4008
|
-
//# sourceMappingURL=server-
|
|
4014
|
+
//# sourceMappingURL=server-Dsl12dsQ.js.map
|