@framers/agentos-ext-tool-social-analytics 0.1.2 → 0.1.3
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/README.md +49 -0
- package/manifest.json +1 -1
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Social analytics
|
|
2
|
+
|
|
3
|
+
This pack gives an agent a tool that aggregates engagement metrics from social platforms. It calls platform analytics tools through a tool executor callback and combines their results into per-platform data and totals.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @framers/agentos-ext-tool-social-analytics
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Peer dependency: `@framers/agentos` with range `>=0.10.40`.
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import { AgentOS } from '@framers/agentos';
|
|
17
|
+
|
|
18
|
+
const agentos = await AgentOS.create({
|
|
19
|
+
extensionManifest: {
|
|
20
|
+
packs: [{ package: '@framers/agentos-ext-tool-social-analytics' }],
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Tools
|
|
26
|
+
|
|
27
|
+
| Tool | What it does |
|
|
28
|
+
| --- | --- |
|
|
29
|
+
| `crossPlatformAnalytics` | Aggregates likes, comments, shares, impressions and engagement metrics across social platforms. |
|
|
30
|
+
|
|
31
|
+
### `crossPlatformAnalytics` parameters
|
|
32
|
+
|
|
33
|
+
| Parameter | Type | Required | Description |
|
|
34
|
+
| --- | --- | --- | --- |
|
|
35
|
+
| `platforms` | `array<string>` | Yes | Platforms to query analytics from |
|
|
36
|
+
| `postIds` | `object<string, string>` | No | Platform-to-`postId` mapping (e.g., `{ twitter: "123", linkedin: "456" }`) |
|
|
37
|
+
| `timeRange` | `string`, enum: `24h`, `7d`, `30d`, `90d` | No | Time range for analytics (default: `7d`) |
|
|
38
|
+
|
|
39
|
+
## Notes
|
|
40
|
+
|
|
41
|
+
The factory does not attach a tool executor. The host attaches one through `CrossPlatformAnalyticsTool.setToolExecutor` on the tool payload and supplies tools named `<platform>Analytics`. Each query passes the platform's `postId` and `timeRange` to its analytics tool.
|
|
42
|
+
|
|
43
|
+
Although `postIds` is optional in the schema, a platform without a post ID returns an error instead of metrics. A platform with a post ID but no executor returns a missing executor error. Platform errors appear in the returned platform data, and the overall tool result remains successful even when every platform fails.
|
|
44
|
+
|
|
45
|
+
The tool is marked as having no side effects and queries platforms sequentially. It normalizes alternate metric fields such as `favouritesCount`, `repliesCount`, `retweets`, `reblogsCount`, `reposts` and `views` for the totals. Overall engagement is the sum of likes, comments and shares divided by impressions, expressed as a percentage.
|
|
46
|
+
|
|
47
|
+
## License
|
|
48
|
+
|
|
49
|
+
Apache-2.0
|
package/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://agentos.sh/schemas/extension-manifest-v1.json",
|
|
3
3
|
"id": "com.framers.tools.social-analytics",
|
|
4
4
|
"name": "Cross-Platform Social Analytics Tool",
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.3",
|
|
6
6
|
"description": "Aggregate engagement metrics (likes, comments, shares, impressions, engagement rate) across multiple social platforms in a single query.",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "Frame.dev",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@framers/agentos-ext-tool-social-analytics",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Cross-platform social analytics tool — aggregate engagement metrics from multiple platforms in a single query.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"rimraf": "^5.0.7",
|
|
53
53
|
"typescript": "^5.4.5",
|
|
54
54
|
"vitest": "^3.2.7",
|
|
55
|
-
"@framers/agentos": "^0.13.
|
|
55
|
+
"@framers/agentos": "^0.13.47"
|
|
56
56
|
},
|
|
57
57
|
"homepage": "https://github.com/framerslab/agentos-extensions/tree/master/registry/curated/tools/social-analytics#readme",
|
|
58
58
|
"bugs": {
|