@forumviriumhelsinki/podio-mcp 2.5.4 → 2.5.5
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.
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { AppCoordinates } from '../types/api-types.js';
|
|
2
|
+
export interface ClearAppCacheArgs {
|
|
3
|
+
app_id?: number;
|
|
4
|
+
org_label?: string;
|
|
5
|
+
space_label?: string;
|
|
6
|
+
app_label?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ClearAppCacheDeps {
|
|
9
|
+
appStructures: {
|
|
10
|
+
resolveAppCoordinates(args: Record<string, string | undefined>): AppCoordinates | null;
|
|
11
|
+
clearAppCache(appId?: number): Promise<void>;
|
|
12
|
+
};
|
|
13
|
+
loadedApps: Map<string, unknown>;
|
|
14
|
+
getActiveAppKey(): string | null;
|
|
15
|
+
setActiveAppKey(key: string | null): void;
|
|
16
|
+
getCoordinateKey(coordinates: AppCoordinates): string;
|
|
17
|
+
}
|
|
18
|
+
export interface ClearAppCacheResult {
|
|
19
|
+
app_id: number | undefined;
|
|
20
|
+
coordinates: AppCoordinates | null;
|
|
21
|
+
}
|
|
22
|
+
export declare function performClearAppCache(deps: ClearAppCacheDeps, args: ClearAppCacheArgs): Promise<ClearAppCacheResult>;
|
|
23
|
+
export declare function buildClearAppCacheMessage(app_id: number | undefined, coordinates: AppCoordinates | null): string;
|
|
24
|
+
//# sourceMappingURL=clear-app-cache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clear-app-cache.d.ts","sourceRoot":"","sources":["../../src/handlers/clear-app-cache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,aAAa,EAAE;QACb,qBAAqB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GAAG,cAAc,GAAG,IAAI,CAAC;QACvF,aAAa,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;KAC9C,CAAC;IACF,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,eAAe,IAAI,MAAM,GAAG,IAAI,CAAC;IACjC,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1C,gBAAgB,CAAC,WAAW,EAAE,cAAc,GAAG,MAAM,CAAC;CACvD;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,WAAW,EAAE,cAAc,GAAG,IAAI,CAAC;CACpC;AAED,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,iBAAiB,EACvB,IAAI,EAAE,iBAAiB,GACtB,OAAO,CAAC,mBAAmB,CAAC,CAmB9B;AAkBD,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,WAAW,EAAE,cAAc,GAAG,IAAI,GACjC,MAAM,CASR"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export async function performClearAppCache(deps, args) {
|
|
2
|
+
const { app_id, org_label, space_label, app_label } = args;
|
|
3
|
+
const coordinates = deps.appStructures.resolveAppCoordinates({
|
|
4
|
+
org_label,
|
|
5
|
+
space_label,
|
|
6
|
+
app_label,
|
|
7
|
+
});
|
|
8
|
+
if (app_id) {
|
|
9
|
+
await deps.appStructures.clearAppCache(app_id);
|
|
10
|
+
}
|
|
11
|
+
else if (coordinates) {
|
|
12
|
+
clearLoadedAppByCoordinates(deps, coordinates);
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
await deps.appStructures.clearAppCache();
|
|
16
|
+
deps.loadedApps.clear();
|
|
17
|
+
deps.setActiveAppKey(null);
|
|
18
|
+
}
|
|
19
|
+
return { app_id, coordinates };
|
|
20
|
+
}
|
|
21
|
+
function clearLoadedAppByCoordinates(deps, coordinates) {
|
|
22
|
+
const coordinateKey = deps.getCoordinateKey(coordinates);
|
|
23
|
+
if (!deps.loadedApps.has(coordinateKey)) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
deps.loadedApps.delete(coordinateKey);
|
|
27
|
+
if (deps.getActiveAppKey() !== coordinateKey) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
const nextKey = deps.loadedApps.keys().next().value;
|
|
31
|
+
deps.setActiveAppKey(nextKey ?? null);
|
|
32
|
+
}
|
|
33
|
+
export function buildClearAppCacheMessage(app_id, coordinates) {
|
|
34
|
+
if (app_id) {
|
|
35
|
+
return `Cleared cache for app ID ${app_id}`;
|
|
36
|
+
}
|
|
37
|
+
if (coordinates) {
|
|
38
|
+
const { org_label, space_label, app_label } = coordinates;
|
|
39
|
+
return `Cleared cache for ${app_label} in ${space_label}/${org_label}`;
|
|
40
|
+
}
|
|
41
|
+
return 'Cleared all app caches';
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=clear-app-cache.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clear-app-cache.js","sourceRoot":"","sources":["../../src/handlers/clear-app-cache.ts"],"names":[],"mappings":"AAyBA,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,IAAuB,EACvB,IAAuB;IAEvB,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;IAC3D,MAAM,WAAW,GAAG,IAAI,CAAC,aAAa,CAAC,qBAAqB,CAAC;QAC3D,SAAS;QACT,WAAW;QACX,SAAS;KACV,CAAC,CAAC;IAEH,IAAI,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S,EAAE,CAAC;IACzE,CAAC;IACD,OAAO,wBAAwB,CAAC;AAClC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forumviriumhelsinki/podio-mcp",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.5",
|
|
4
4
|
"description": "Model Context Protocol server for Podio item and task management with AI-powered project/epic suggestions",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -89,6 +89,7 @@
|
|
|
89
89
|
"!build/cache/cache-test.*",
|
|
90
90
|
"build/errors/",
|
|
91
91
|
"build/fields/",
|
|
92
|
+
"build/handlers/",
|
|
92
93
|
"build/services/",
|
|
93
94
|
"build/tools/",
|
|
94
95
|
"build/config/",
|