@centrali-io/centrali-mcp 4.4.8-rc.0 → 4.4.8-rc.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/tools/auth-providers.js +1 -1
- package/dist/tools/pages.js +1 -1
- package/dist/tools/service-accounts.js +1 -1
- package/dist/tools/structures.js +10 -5
- package/package.json +1 -1
- package/src/tools/auth-providers.ts +1 -1
- package/src/tools/pages.ts +1 -1
- package/src/tools/service-accounts.ts +1 -1
- package/src/tools/structures.ts +10 -4
|
@@ -41,7 +41,7 @@ function createIamClient(sdk, centraliUrl, workspaceId) {
|
|
|
41
41
|
? url.hostname
|
|
42
42
|
: `auth.${url.hostname.replace(/^api\./, '')}`;
|
|
43
43
|
const baseURL = `${url.protocol}//${hostname}/workspace/${workspaceId}/api/v1/external-auth-providers`;
|
|
44
|
-
const client = axios_1.default.create({ baseURL });
|
|
44
|
+
const client = axios_1.default.create({ baseURL, proxy: false });
|
|
45
45
|
client.interceptors.request.use((config) => __awaiter(this, void 0, void 0, function* () {
|
|
46
46
|
const token = yield ensureToken(sdk);
|
|
47
47
|
if (token) {
|
package/dist/tools/pages.js
CHANGED
|
@@ -80,7 +80,7 @@ function ensureToken(sdk) {
|
|
|
80
80
|
*/
|
|
81
81
|
function createPagesClient(sdk, centraliUrl, workspaceId) {
|
|
82
82
|
const baseURL = getPagesBaseUrl(centraliUrl);
|
|
83
|
-
const client = axios_1.default.create({ baseURL });
|
|
83
|
+
const client = axios_1.default.create({ baseURL, proxy: false });
|
|
84
84
|
// Attach the SDK's bearer token to every request
|
|
85
85
|
client.interceptors.request.use((config) => __awaiter(this, void 0, void 0, function* () {
|
|
86
86
|
const token = yield ensureToken(sdk);
|
|
@@ -41,7 +41,7 @@ function createIamClient(sdk, centraliUrl, workspaceId, baseSuffix) {
|
|
|
41
41
|
? url.hostname
|
|
42
42
|
: `auth.${url.hostname.replace(/^api\./, '')}`;
|
|
43
43
|
const baseURL = `${url.protocol}//${hostname}/workspace/${workspaceId}/api/v1/${baseSuffix}`;
|
|
44
|
-
const client = axios_1.default.create({ baseURL });
|
|
44
|
+
const client = axios_1.default.create({ baseURL, proxy: false });
|
|
45
45
|
client.interceptors.request.use((config) => __awaiter(this, void 0, void 0, function* () {
|
|
46
46
|
const token = yield ensureToken(sdk);
|
|
47
47
|
if (token) {
|
package/dist/tools/structures.js
CHANGED
|
@@ -79,7 +79,7 @@ function createDataClient(sdk, centraliUrl, workspaceId, pathSuffix) {
|
|
|
79
79
|
? url.hostname
|
|
80
80
|
: `api.${url.hostname}`;
|
|
81
81
|
const baseURL = `${url.protocol}//${hostname}/data/workspace/${workspaceId}/api/v1/${pathSuffix}`;
|
|
82
|
-
const client = axios_1.default.create({ baseURL });
|
|
82
|
+
const client = axios_1.default.create({ baseURL, proxy: false });
|
|
83
83
|
client.interceptors.request.use((config) => __awaiter(this, void 0, void 0, function* () {
|
|
84
84
|
const token = yield ensureToken(sdk);
|
|
85
85
|
if (token) {
|
|
@@ -291,7 +291,9 @@ RESPONSE FIELDS:
|
|
|
291
291
|
}, (_a) => __awaiter(this, [_a], void 0, function* ({ collectionId, properties }) {
|
|
292
292
|
try {
|
|
293
293
|
const client = getCollectionsClient();
|
|
294
|
-
|
|
294
|
+
// Auto-fill id: "new" for properties missing an id
|
|
295
|
+
const propsWithIds = properties.map((p) => p.id ? p : Object.assign(Object.assign({}, p), { id: "new" }));
|
|
296
|
+
const result = yield client.post(`/${collectionId}/analyze-update`, { properties: propsWithIds });
|
|
295
297
|
const data = result.data;
|
|
296
298
|
// Build a human-readable summary for the LLM
|
|
297
299
|
const lines = [];
|
|
@@ -339,7 +341,8 @@ WHEN TO USE: After analyze_collection_update returns suggestedFixes, call this t
|
|
|
339
341
|
}, (_a) => __awaiter(this, [_a], void 0, function* ({ collectionId, fixes, properties }) {
|
|
340
342
|
try {
|
|
341
343
|
const client = getCollectionsClient();
|
|
342
|
-
const
|
|
344
|
+
const propsWithIds = properties.map((p) => p.id ? p : Object.assign(Object.assign({}, p), { id: "new" }));
|
|
345
|
+
const result = yield client.post(`/${collectionId}/preview-fixes`, { fixes, properties: propsWithIds });
|
|
343
346
|
return {
|
|
344
347
|
content: [{ type: "text", text: JSON.stringify(result.data, null, 2) }],
|
|
345
348
|
};
|
|
@@ -406,8 +409,10 @@ Each fix is an object with: { fieldName, fixType, value?, expression?, applyToAl
|
|
|
406
409
|
body.name = name;
|
|
407
410
|
if (description !== undefined)
|
|
408
411
|
body.description = description;
|
|
409
|
-
if (properties !== undefined)
|
|
410
|
-
|
|
412
|
+
if (properties !== undefined) {
|
|
413
|
+
// Auto-fill id: "new" for properties missing an id (required by the backend)
|
|
414
|
+
body.properties = properties.map((p) => p.id ? p : Object.assign(Object.assign({}, p), { id: "new" }));
|
|
415
|
+
}
|
|
411
416
|
if (enableVersioning !== undefined)
|
|
412
417
|
body.enableVersioning = enableVersioning;
|
|
413
418
|
if (tags !== undefined)
|
package/package.json
CHANGED
|
@@ -27,7 +27,7 @@ function createIamClient(sdk: CentraliSDK, centraliUrl: string, workspaceId: str
|
|
|
27
27
|
: `auth.${url.hostname.replace(/^api\./, '')}`;
|
|
28
28
|
const baseURL = `${url.protocol}//${hostname}/workspace/${workspaceId}/api/v1/external-auth-providers`;
|
|
29
29
|
|
|
30
|
-
const client = axios.create({ baseURL });
|
|
30
|
+
const client = axios.create({ baseURL, proxy: false });
|
|
31
31
|
|
|
32
32
|
client.interceptors.request.use(async (config) => {
|
|
33
33
|
const token = await ensureToken(sdk);
|
package/src/tools/pages.ts
CHANGED
|
@@ -69,7 +69,7 @@ function createPagesClient(sdk: CentraliSDK, centraliUrl: string, workspaceId: s
|
|
|
69
69
|
workspaceId: string;
|
|
70
70
|
} {
|
|
71
71
|
const baseURL = getPagesBaseUrl(centraliUrl);
|
|
72
|
-
const client = axios.create({ baseURL });
|
|
72
|
+
const client = axios.create({ baseURL, proxy: false });
|
|
73
73
|
|
|
74
74
|
// Attach the SDK's bearer token to every request
|
|
75
75
|
client.interceptors.request.use(async (config) => {
|
|
@@ -27,7 +27,7 @@ function createIamClient(sdk: CentraliSDK, centraliUrl: string, workspaceId: str
|
|
|
27
27
|
: `auth.${url.hostname.replace(/^api\./, '')}`;
|
|
28
28
|
const baseURL = `${url.protocol}//${hostname}/workspace/${workspaceId}/api/v1/${baseSuffix}`;
|
|
29
29
|
|
|
30
|
-
const client = axios.create({ baseURL });
|
|
30
|
+
const client = axios.create({ baseURL, proxy: false });
|
|
31
31
|
|
|
32
32
|
client.interceptors.request.use(async (config) => {
|
|
33
33
|
const token = await ensureToken(sdk);
|
package/src/tools/structures.ts
CHANGED
|
@@ -63,7 +63,7 @@ function createDataClient(sdk: CentraliSDK, centraliUrl: string, workspaceId: st
|
|
|
63
63
|
: `api.${url.hostname}`;
|
|
64
64
|
const baseURL = `${url.protocol}//${hostname}/data/workspace/${workspaceId}/api/v1/${pathSuffix}`;
|
|
65
65
|
|
|
66
|
-
const client = axios.create({ baseURL });
|
|
66
|
+
const client = axios.create({ baseURL, proxy: false });
|
|
67
67
|
|
|
68
68
|
client.interceptors.request.use(async (config) => {
|
|
69
69
|
const token = await ensureToken(sdk);
|
|
@@ -310,7 +310,9 @@ RESPONSE FIELDS:
|
|
|
310
310
|
async ({ collectionId, properties }) => {
|
|
311
311
|
try {
|
|
312
312
|
const client = getCollectionsClient();
|
|
313
|
-
|
|
313
|
+
// Auto-fill id: "new" for properties missing an id
|
|
314
|
+
const propsWithIds = properties.map((p: Record<string, any>) => p.id ? p : { ...p, id: "new" });
|
|
315
|
+
const result = await client.post(`/${collectionId}/analyze-update`, { properties: propsWithIds });
|
|
314
316
|
const data = result.data;
|
|
315
317
|
|
|
316
318
|
// Build a human-readable summary for the LLM
|
|
@@ -366,7 +368,8 @@ WHEN TO USE: After analyze_collection_update returns suggestedFixes, call this t
|
|
|
366
368
|
async ({ collectionId, fixes, properties }) => {
|
|
367
369
|
try {
|
|
368
370
|
const client = getCollectionsClient();
|
|
369
|
-
const
|
|
371
|
+
const propsWithIds = properties.map((p: Record<string, any>) => p.id ? p : { ...p, id: "new" });
|
|
372
|
+
const result = await client.post(`/${collectionId}/preview-fixes`, { fixes, properties: propsWithIds });
|
|
370
373
|
return {
|
|
371
374
|
content: [{ type: "text", text: JSON.stringify(result.data, null, 2) }],
|
|
372
375
|
};
|
|
@@ -436,7 +439,10 @@ Each fix is an object with: { fieldName, fixType, value?, expression?, applyToAl
|
|
|
436
439
|
const body: Record<string, any> = {};
|
|
437
440
|
if (name !== undefined) body.name = name;
|
|
438
441
|
if (description !== undefined) body.description = description;
|
|
439
|
-
if (properties !== undefined)
|
|
442
|
+
if (properties !== undefined) {
|
|
443
|
+
// Auto-fill id: "new" for properties missing an id (required by the backend)
|
|
444
|
+
body.properties = properties.map((p: Record<string, any>) => p.id ? p : { ...p, id: "new" });
|
|
445
|
+
}
|
|
440
446
|
if (enableVersioning !== undefined) body.enableVersioning = enableVersioning;
|
|
441
447
|
if (tags !== undefined) body.tags = tags;
|
|
442
448
|
if (defaultTtlSeconds !== undefined) body.defaultTtlSeconds = defaultTtlSeconds;
|