screenpipe-mcp 0.18.8 → 0.18.9
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/index.js +39 -12
- package/package.json +1 -1
- package/src/index.ts +41 -11
package/dist/index.js
CHANGED
|
@@ -685,24 +685,46 @@ const TEAM_TOOLS = [
|
|
|
685
685
|
},
|
|
686
686
|
{
|
|
687
687
|
name: "team-records",
|
|
688
|
-
description: "Chronological
|
|
689
|
-
"
|
|
690
|
-
"
|
|
688
|
+
description: "Chronological dump of the org's data for a time window — both raw " +
|
|
689
|
+
"telemetry (frame/audio) and the structured outputs of the enterprise-" +
|
|
690
|
+
"worker pipes (sop/skill/trajectory/memory/workflow). " +
|
|
691
|
+
"Raw kinds return oldest → newest (vs team-search which is recency-ranked). " +
|
|
692
|
+
"Synthesized kinds return one record per device's latest run by default " +
|
|
693
|
+
"(set latest_only=false to walk run history). " +
|
|
694
|
+
"Use raw for ETL / \"walk me through X from Y to Z\". " +
|
|
695
|
+
"Use synthesized for \"what SOPs / skills / trajectories / memories did " +
|
|
696
|
+
"we extract from my team's work\" — each item carries evidence-cited " +
|
|
697
|
+
"event_ids/frame_ids that team-search can resolve back to raw records. " +
|
|
691
698
|
"Auth: enterprise admin token.",
|
|
692
699
|
annotations: { title: "Team Records", readOnlyHint: true, openWorldHint: true, idempotentHint: true },
|
|
693
700
|
inputSchema: {
|
|
694
701
|
type: "object",
|
|
695
702
|
properties: {
|
|
696
|
-
device_id: { type: "string", description: "Restrict to one device (optional)." },
|
|
697
|
-
kind: {
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
703
|
+
device_id: { type: "string", description: "Restrict to one device (optional). Raw kinds only." },
|
|
704
|
+
kind: {
|
|
705
|
+
type: "string",
|
|
706
|
+
enum: ["frame", "audio", "all", "sop", "skill", "trajectory", "memory", "workflow"],
|
|
707
|
+
description: "What to return. Raw: frame|audio|all (telemetry). " +
|
|
708
|
+
"Synthesized: sop|skill|trajectory|memory|workflow (pipe outputs). " +
|
|
709
|
+
"Default: all.",
|
|
710
|
+
default: "all",
|
|
711
|
+
},
|
|
712
|
+
since: { type: "string", description: "ISO 8601 lower bound. Raw kinds only." },
|
|
713
|
+
until: { type: "string", description: "ISO 8601 upper bound. Raw kinds only." },
|
|
714
|
+
since_hours_ago: { type: "integer", description: "Convenience: equivalent to since=now-N*h. Raw kinds only." },
|
|
715
|
+
limit: { type: "integer", description: "Max records (default 50, max 200). Raw kinds only.", default: 50 },
|
|
716
|
+
latest_only: {
|
|
717
|
+
type: "boolean",
|
|
718
|
+
description: "Synthesized kinds only: if true (default), collapse to the newest " +
|
|
719
|
+
"run per device. Set false to walk run history.",
|
|
720
|
+
default: true,
|
|
721
|
+
},
|
|
702
722
|
},
|
|
703
723
|
},
|
|
704
724
|
},
|
|
705
725
|
];
|
|
726
|
+
// Pipe-output kinds map to /workflows/generated, raw kinds map to /records.
|
|
727
|
+
const SYNTHESIZED_KINDS = new Set(["sop", "skill", "trajectory", "memory", "workflow"]);
|
|
706
728
|
server.setRequestHandler(types_js_1.ListToolsRequestSchema, async () => {
|
|
707
729
|
// Team tools only surface when an enterprise token was discovered at boot.
|
|
708
730
|
// No token = consumer / non-admin user; their MCP looks identical to today.
|
|
@@ -1556,7 +1578,7 @@ server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
|
|
|
1556
1578
|
};
|
|
1557
1579
|
}
|
|
1558
1580
|
const response = await callAPI(`/meetings/${meetingId}`, {
|
|
1559
|
-
method: "
|
|
1581
|
+
method: "PUT",
|
|
1560
1582
|
headers: { "Content-Type": "application/json" },
|
|
1561
1583
|
body: JSON.stringify(body),
|
|
1562
1584
|
});
|
|
@@ -1681,10 +1703,15 @@ server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
|
|
|
1681
1703
|
],
|
|
1682
1704
|
};
|
|
1683
1705
|
}
|
|
1684
|
-
// Map MCP tool name → /api/enterprise/v1 path
|
|
1706
|
+
// Map MCP tool name → /api/enterprise/v1 path. team-records also
|
|
1707
|
+
// routes synthesized pipe outputs (kind=sop|skill|...) to the
|
|
1708
|
+
// workflows endpoint so callers see one tool surface for "give me
|
|
1709
|
+
// the org's data."
|
|
1710
|
+
const kindArg = typeof args.kind === "string" ? args.kind : "";
|
|
1685
1711
|
const subpath = name === "team-search" ? "/search"
|
|
1686
1712
|
: name === "team-devices" ? "/devices"
|
|
1687
|
-
: "
|
|
1713
|
+
: name === "team-records" && SYNTHESIZED_KINDS.has(kindArg) ? "/workflows/generated"
|
|
1714
|
+
: "/records";
|
|
1688
1715
|
// Forward every primitive arg as a query param. The server validates;
|
|
1689
1716
|
// unknown params are ignored, so we don't need to gatekeep here.
|
|
1690
1717
|
const params = new URLSearchParams();
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -690,25 +690,50 @@ const TEAM_TOOLS: Tool[] = [
|
|
|
690
690
|
{
|
|
691
691
|
name: "team-records",
|
|
692
692
|
description:
|
|
693
|
-
"Chronological
|
|
694
|
-
"
|
|
695
|
-
"
|
|
693
|
+
"Chronological dump of the org's data for a time window — both raw " +
|
|
694
|
+
"telemetry (frame/audio) and the structured outputs of the enterprise-" +
|
|
695
|
+
"worker pipes (sop/skill/trajectory/memory/workflow). " +
|
|
696
|
+
"Raw kinds return oldest → newest (vs team-search which is recency-ranked). " +
|
|
697
|
+
"Synthesized kinds return one record per device's latest run by default " +
|
|
698
|
+
"(set latest_only=false to walk run history). " +
|
|
699
|
+
"Use raw for ETL / \"walk me through X from Y to Z\". " +
|
|
700
|
+
"Use synthesized for \"what SOPs / skills / trajectories / memories did " +
|
|
701
|
+
"we extract from my team's work\" — each item carries evidence-cited " +
|
|
702
|
+
"event_ids/frame_ids that team-search can resolve back to raw records. " +
|
|
696
703
|
"Auth: enterprise admin token.",
|
|
697
704
|
annotations: { title: "Team Records", readOnlyHint: true, openWorldHint: true, idempotentHint: true },
|
|
698
705
|
inputSchema: {
|
|
699
706
|
type: "object",
|
|
700
707
|
properties: {
|
|
701
|
-
device_id: { type: "string", description: "Restrict to one device (optional)." },
|
|
702
|
-
kind: {
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
708
|
+
device_id: { type: "string", description: "Restrict to one device (optional). Raw kinds only." },
|
|
709
|
+
kind: {
|
|
710
|
+
type: "string",
|
|
711
|
+
enum: ["frame", "audio", "all", "sop", "skill", "trajectory", "memory", "workflow"],
|
|
712
|
+
description:
|
|
713
|
+
"What to return. Raw: frame|audio|all (telemetry). " +
|
|
714
|
+
"Synthesized: sop|skill|trajectory|memory|workflow (pipe outputs). " +
|
|
715
|
+
"Default: all.",
|
|
716
|
+
default: "all",
|
|
717
|
+
},
|
|
718
|
+
since: { type: "string", description: "ISO 8601 lower bound. Raw kinds only." },
|
|
719
|
+
until: { type: "string", description: "ISO 8601 upper bound. Raw kinds only." },
|
|
720
|
+
since_hours_ago: { type: "integer", description: "Convenience: equivalent to since=now-N*h. Raw kinds only." },
|
|
721
|
+
limit: { type: "integer", description: "Max records (default 50, max 200). Raw kinds only.", default: 50 },
|
|
722
|
+
latest_only: {
|
|
723
|
+
type: "boolean",
|
|
724
|
+
description:
|
|
725
|
+
"Synthesized kinds only: if true (default), collapse to the newest " +
|
|
726
|
+
"run per device. Set false to walk run history.",
|
|
727
|
+
default: true,
|
|
728
|
+
},
|
|
707
729
|
},
|
|
708
730
|
},
|
|
709
731
|
},
|
|
710
732
|
];
|
|
711
733
|
|
|
734
|
+
// Pipe-output kinds map to /workflows/generated, raw kinds map to /records.
|
|
735
|
+
const SYNTHESIZED_KINDS = new Set(["sop", "skill", "trajectory", "memory", "workflow"]);
|
|
736
|
+
|
|
712
737
|
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
713
738
|
// Team tools only surface when an enterprise token was discovered at boot.
|
|
714
739
|
// No token = consumer / non-admin user; their MCP looks identical to today.
|
|
@@ -1695,7 +1720,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
1695
1720
|
};
|
|
1696
1721
|
}
|
|
1697
1722
|
const response = await callAPI(`/meetings/${meetingId}`, {
|
|
1698
|
-
method: "
|
|
1723
|
+
method: "PUT",
|
|
1699
1724
|
headers: { "Content-Type": "application/json" },
|
|
1700
1725
|
body: JSON.stringify(body),
|
|
1701
1726
|
});
|
|
@@ -1820,10 +1845,15 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
1820
1845
|
],
|
|
1821
1846
|
};
|
|
1822
1847
|
}
|
|
1823
|
-
// Map MCP tool name → /api/enterprise/v1 path
|
|
1848
|
+
// Map MCP tool name → /api/enterprise/v1 path. team-records also
|
|
1849
|
+
// routes synthesized pipe outputs (kind=sop|skill|...) to the
|
|
1850
|
+
// workflows endpoint so callers see one tool surface for "give me
|
|
1851
|
+
// the org's data."
|
|
1852
|
+
const kindArg = typeof args.kind === "string" ? args.kind : "";
|
|
1824
1853
|
const subpath =
|
|
1825
1854
|
name === "team-search" ? "/search"
|
|
1826
1855
|
: name === "team-devices" ? "/devices"
|
|
1856
|
+
: name === "team-records" && SYNTHESIZED_KINDS.has(kindArg) ? "/workflows/generated"
|
|
1827
1857
|
: "/records";
|
|
1828
1858
|
// Forward every primitive arg as a query param. The server validates;
|
|
1829
1859
|
// unknown params are ignored, so we don't need to gatekeep here.
|