@sketric/favstash-mcp 0.4.1 → 0.5.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/CHANGELOG.md +21 -0
- package/bin/contracts.js +18 -0
- package/bin/contracts.json +87 -1
- package/bin/favstash.js +5 -2
- package/bin/remote.js +3 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @sketric/favstash-mcp
|
|
2
2
|
|
|
3
|
+
## 0.5.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 8729428: Preserve analytics refresh-capacity diagnostics in the generated MCP contract, including retry guidance on cached results.
|
|
8
|
+
- 052b5f4: Compare hosted output schemas as well as input schemas in `favstash doctor`. Report incompatible tools and skip the count-only read when either schema differs, including analytics freshness metadata.
|
|
9
|
+
- Identify the bridge to the hosted server with `X-FavStash-Bridge` and advertise open output schemas, so fields the server adds later no longer make hosts reject every reply.
|
|
10
|
+
|
|
11
|
+
## 0.5.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 25e5d25: Document shared Free posting and analytics allowances and additive analytics usage/reset fields returned by the hosted plan-usage tool. Cached analytics remain readable after the fresh-refresh allowance is exhausted.
|
|
16
|
+
- e34e5d1: Document verified saved-content search and remove uncalibrated match percentages from its ChatGPT gallery. Search ranking values remain available without implying probability.
|
|
17
|
+
|
|
18
|
+
## 0.5.0
|
|
19
|
+
|
|
20
|
+
### Minor Changes
|
|
21
|
+
|
|
22
|
+
- 74dc546: Social analytics results can include `freshness` (`fetchedAt`, `stale`, `refreshDeferred`) when FavStash serves cached analytics to stay within provider rate limits.
|
|
23
|
+
|
|
3
24
|
## 0.4.1
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
package/bin/contracts.js
CHANGED
|
@@ -80,10 +80,28 @@ function importSchema(schema) {
|
|
|
80
80
|
return result;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
+
// Hosts validate replies against the advertised output schema. Leave objects
|
|
84
|
+
// open so fields the hosted server adds later do not reject every reply, as
|
|
85
|
+
// closed schemas did for 0.4.x when analytics gained `freshness`.
|
|
86
|
+
export function openOutputSchema(schema) {
|
|
87
|
+
if (Array.isArray(schema)) return schema.map(openOutputSchema);
|
|
88
|
+
if (!schema || typeof schema !== "object") return schema;
|
|
89
|
+
const result = Object.fromEntries(
|
|
90
|
+
Object.entries(schema).map(([key, value]) => [
|
|
91
|
+
key,
|
|
92
|
+
openOutputSchema(value),
|
|
93
|
+
]),
|
|
94
|
+
);
|
|
95
|
+
if (result.additionalProperties === false) delete result.additionalProperties;
|
|
96
|
+
return result;
|
|
97
|
+
}
|
|
98
|
+
|
|
83
99
|
const extend = (name, schema) =>
|
|
84
100
|
name === "import_post_media" ? importSchema(schema) : withLocalMedia(schema);
|
|
85
101
|
export const localTools = contracts.tools.map((tool) => {
|
|
86
102
|
const result = { ...tool, inputSchema: extend(tool.name, tool.inputSchema) };
|
|
103
|
+
if (tool.outputSchema)
|
|
104
|
+
result.outputSchema = openOutputSchema(tool.outputSchema);
|
|
87
105
|
if (["create_social_post", "update_social_post"].includes(tool.name)) {
|
|
88
106
|
result.description =
|
|
89
107
|
tool.description +
|
package/bin/contracts.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"contractHash": "
|
|
2
|
+
"contractHash": "959ac5d4f31c131790350402ad4151afdb176490eff65fac787e62f79299ec36",
|
|
3
3
|
"tools": [
|
|
4
4
|
{
|
|
5
5
|
"name": "list_connected_social_accounts",
|
|
@@ -833,6 +833,49 @@
|
|
|
833
833
|
"type": "string"
|
|
834
834
|
}
|
|
835
835
|
},
|
|
836
|
+
"freshness": {
|
|
837
|
+
"type": "object",
|
|
838
|
+
"description": "When the provider data was fetched. stale or refreshDeferred mean FavStash returned stored analytics to stay within provider rate limits; do not retry immediately.",
|
|
839
|
+
"properties": {
|
|
840
|
+
"fetchedAt": {
|
|
841
|
+
"type": "string"
|
|
842
|
+
},
|
|
843
|
+
"stale": {
|
|
844
|
+
"type": "boolean"
|
|
845
|
+
},
|
|
846
|
+
"refreshDeferred": {
|
|
847
|
+
"type": "boolean"
|
|
848
|
+
},
|
|
849
|
+
"refreshDeferral": {
|
|
850
|
+
"type": "object",
|
|
851
|
+
"properties": {
|
|
852
|
+
"code": {
|
|
853
|
+
"type": "string"
|
|
854
|
+
},
|
|
855
|
+
"retryAfterSeconds": {
|
|
856
|
+
"type": "number"
|
|
857
|
+
},
|
|
858
|
+
"limitScope": {
|
|
859
|
+
"type": "string"
|
|
860
|
+
},
|
|
861
|
+
"retryAt": {
|
|
862
|
+
"type": "string"
|
|
863
|
+
}
|
|
864
|
+
},
|
|
865
|
+
"required": [
|
|
866
|
+
"code",
|
|
867
|
+
"retryAfterSeconds"
|
|
868
|
+
],
|
|
869
|
+
"additionalProperties": false
|
|
870
|
+
}
|
|
871
|
+
},
|
|
872
|
+
"required": [
|
|
873
|
+
"fetchedAt",
|
|
874
|
+
"stale",
|
|
875
|
+
"refreshDeferred"
|
|
876
|
+
],
|
|
877
|
+
"additionalProperties": false
|
|
878
|
+
},
|
|
836
879
|
"nextActions": {
|
|
837
880
|
"type": "array",
|
|
838
881
|
"items": {
|
|
@@ -1281,6 +1324,49 @@
|
|
|
1281
1324
|
"type": "string"
|
|
1282
1325
|
}
|
|
1283
1326
|
},
|
|
1327
|
+
"freshness": {
|
|
1328
|
+
"type": "object",
|
|
1329
|
+
"description": "When the provider data was fetched. stale or refreshDeferred mean FavStash returned stored analytics to stay within provider rate limits; do not retry immediately.",
|
|
1330
|
+
"properties": {
|
|
1331
|
+
"fetchedAt": {
|
|
1332
|
+
"type": "string"
|
|
1333
|
+
},
|
|
1334
|
+
"stale": {
|
|
1335
|
+
"type": "boolean"
|
|
1336
|
+
},
|
|
1337
|
+
"refreshDeferred": {
|
|
1338
|
+
"type": "boolean"
|
|
1339
|
+
},
|
|
1340
|
+
"refreshDeferral": {
|
|
1341
|
+
"type": "object",
|
|
1342
|
+
"properties": {
|
|
1343
|
+
"code": {
|
|
1344
|
+
"type": "string"
|
|
1345
|
+
},
|
|
1346
|
+
"retryAfterSeconds": {
|
|
1347
|
+
"type": "number"
|
|
1348
|
+
},
|
|
1349
|
+
"limitScope": {
|
|
1350
|
+
"type": "string"
|
|
1351
|
+
},
|
|
1352
|
+
"retryAt": {
|
|
1353
|
+
"type": "string"
|
|
1354
|
+
}
|
|
1355
|
+
},
|
|
1356
|
+
"required": [
|
|
1357
|
+
"code",
|
|
1358
|
+
"retryAfterSeconds"
|
|
1359
|
+
],
|
|
1360
|
+
"additionalProperties": false
|
|
1361
|
+
}
|
|
1362
|
+
},
|
|
1363
|
+
"required": [
|
|
1364
|
+
"fetchedAt",
|
|
1365
|
+
"stale",
|
|
1366
|
+
"refreshDeferred"
|
|
1367
|
+
],
|
|
1368
|
+
"additionalProperties": false
|
|
1369
|
+
},
|
|
1284
1370
|
"nextActions": {
|
|
1285
1371
|
"type": "array",
|
|
1286
1372
|
"items": {
|
package/bin/favstash.js
CHANGED
|
@@ -67,8 +67,11 @@ export async function doctor(remote = remoteClient()) {
|
|
|
67
67
|
);
|
|
68
68
|
return (
|
|
69
69
|
!actual ||
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
["inputSchema", "outputSchema"].some(
|
|
71
|
+
(schema) =>
|
|
72
|
+
JSON.stringify(canonical(actual[schema])) !==
|
|
73
|
+
JSON.stringify(canonical(expected[schema])),
|
|
74
|
+
)
|
|
72
75
|
);
|
|
73
76
|
})
|
|
74
77
|
.map((tool) => tool.name);
|
package/bin/remote.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { accessToken } from "./auth.js";
|
|
2
|
-
import { endpoint } from "./config.js";
|
|
2
|
+
import { PACKAGE, endpoint } from "./config.js";
|
|
3
3
|
|
|
4
4
|
export function remoteClient({
|
|
5
5
|
url = endpoint(),
|
|
@@ -36,6 +36,8 @@ export function remoteClient({
|
|
|
36
36
|
headers: {
|
|
37
37
|
"Content-Type": "application/json",
|
|
38
38
|
Accept: "application/json, text/event-stream",
|
|
39
|
+
// Tells the server this bridge does not need 0.4.x reply narrowing.
|
|
40
|
+
"X-FavStash-Bridge": PACKAGE.version,
|
|
39
41
|
...(protocolVersion ? { "MCP-Protocol-Version": protocolVersion } : {}),
|
|
40
42
|
...(sessionId ? { "Mcp-Session-Id": sessionId } : {}),
|
|
41
43
|
},
|