@thenavidm/threads-mcp-cli 1.1.2 → 2.0.1

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.
@@ -7,164 +7,13 @@
7
7
  * has: invisible, valid for 24 hours, publishable later by id. That is exactly
8
8
  * what an agent needs when a human wants to see something before it is public.
9
9
  */
10
- import { z } from "zod";
11
- export declare const createPost: import("./kit.js").ToolSpec<{
12
- confirm: z.ZodOptional<z.ZodBoolean>;
13
- account: z.ZodOptional<z.ZodString>;
14
- link_attachment: z.ZodOptional<z.ZodString>;
15
- topic_tag: z.ZodOptional<z.ZodString>;
16
- reply_to_id: z.ZodOptional<z.ZodString>;
17
- quote_post_id: z.ZodOptional<z.ZodString>;
18
- reply_control: z.ZodOptional<z.ZodEnum<["everyone", "accounts_you_follow", "mentioned_only", "parent_post_author_only", "followers_only"]>>;
19
- allowlisted_country_codes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
20
- enable_reply_approvals: z.ZodOptional<z.ZodBoolean>;
21
- image_url: z.ZodOptional<z.ZodString>;
22
- video_url: z.ZodOptional<z.ZodString>;
23
- alt_text: z.ZodOptional<z.ZodString>;
24
- text: z.ZodOptional<z.ZodString>;
25
- }>;
26
- export declare const createThread: import("./kit.js").ToolSpec<{
27
- confirm: z.ZodOptional<z.ZodBoolean>;
28
- account: z.ZodOptional<z.ZodString>;
29
- link_attachment: z.ZodOptional<z.ZodString>;
30
- topic_tag: z.ZodOptional<z.ZodString>;
31
- reply_to_id: z.ZodOptional<z.ZodString>;
32
- reply_control: z.ZodOptional<z.ZodEnum<["everyone", "accounts_you_follow", "mentioned_only", "parent_post_author_only", "followers_only"]>>;
33
- image_url: z.ZodOptional<z.ZodString>;
34
- video_url: z.ZodOptional<z.ZodString>;
35
- alt_text: z.ZodOptional<z.ZodString>;
36
- posts: z.ZodArray<z.ZodString, "many">;
37
- }>;
38
- export declare const createCarousel: import("./kit.js").ToolSpec<{
39
- confirm: z.ZodOptional<z.ZodBoolean>;
40
- account: z.ZodOptional<z.ZodString>;
41
- items: z.ZodArray<z.ZodObject<{
42
- image_url: z.ZodOptional<z.ZodString>;
43
- video_url: z.ZodOptional<z.ZodString>;
44
- alt_text: z.ZodOptional<z.ZodString>;
45
- }, "strip", z.ZodTypeAny, {
46
- alt_text?: string | undefined;
47
- image_url?: string | undefined;
48
- video_url?: string | undefined;
49
- }, {
50
- alt_text?: string | undefined;
51
- image_url?: string | undefined;
52
- video_url?: string | undefined;
53
- }>, "many">;
54
- text: z.ZodOptional<z.ZodString>;
55
- topic_tag: z.ZodOptional<z.ZodString>;
56
- reply_control: z.ZodOptional<z.ZodEnum<["everyone", "accounts_you_follow", "mentioned_only", "parent_post_author_only", "followers_only"]>>;
57
- }>;
58
- export declare const stagePost: import("./kit.js").ToolSpec<{
59
- account: z.ZodOptional<z.ZodString>;
60
- link_attachment: z.ZodOptional<z.ZodString>;
61
- topic_tag: z.ZodOptional<z.ZodString>;
62
- reply_to_id: z.ZodOptional<z.ZodString>;
63
- quote_post_id: z.ZodOptional<z.ZodString>;
64
- reply_control: z.ZodOptional<z.ZodEnum<["everyone", "accounts_you_follow", "mentioned_only", "parent_post_author_only", "followers_only"]>>;
65
- allowlisted_country_codes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
66
- enable_reply_approvals: z.ZodOptional<z.ZodBoolean>;
67
- image_url: z.ZodOptional<z.ZodString>;
68
- video_url: z.ZodOptional<z.ZodString>;
69
- alt_text: z.ZodOptional<z.ZodString>;
70
- text: z.ZodOptional<z.ZodString>;
71
- }>;
72
- export declare const publishStaged: import("./kit.js").ToolSpec<{
73
- confirm: z.ZodOptional<z.ZodBoolean>;
74
- account: z.ZodOptional<z.ZodString>;
75
- container_id: z.ZodString;
76
- }>;
77
- export declare const getContainerStatus: import("./kit.js").ToolSpec<{
78
- account: z.ZodOptional<z.ZodString>;
79
- container_id: z.ZodString;
80
- }>;
81
- export declare const quotePost: import("./kit.js").ToolSpec<{
82
- confirm: z.ZodOptional<z.ZodBoolean>;
83
- account: z.ZodOptional<z.ZodString>;
84
- text: z.ZodString;
85
- quoted_post_id: z.ZodString;
86
- }>;
87
- export declare const repost: import("./kit.js").ToolSpec<{
88
- confirm: z.ZodOptional<z.ZodBoolean>;
89
- account: z.ZodOptional<z.ZodString>;
90
- id: z.ZodString;
91
- }>;
92
- export declare const deletePost: import("./kit.js").ToolSpec<{
93
- confirm: z.ZodOptional<z.ZodBoolean>;
94
- account: z.ZodOptional<z.ZodString>;
95
- id: z.ZodString;
96
- }>;
97
- export declare const POST_TOOLS: (import("./kit.js").ToolSpec<{
98
- confirm: z.ZodOptional<z.ZodBoolean>;
99
- account: z.ZodOptional<z.ZodString>;
100
- link_attachment: z.ZodOptional<z.ZodString>;
101
- topic_tag: z.ZodOptional<z.ZodString>;
102
- reply_to_id: z.ZodOptional<z.ZodString>;
103
- quote_post_id: z.ZodOptional<z.ZodString>;
104
- reply_control: z.ZodOptional<z.ZodEnum<["everyone", "accounts_you_follow", "mentioned_only", "parent_post_author_only", "followers_only"]>>;
105
- allowlisted_country_codes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
106
- enable_reply_approvals: z.ZodOptional<z.ZodBoolean>;
107
- image_url: z.ZodOptional<z.ZodString>;
108
- video_url: z.ZodOptional<z.ZodString>;
109
- alt_text: z.ZodOptional<z.ZodString>;
110
- text: z.ZodOptional<z.ZodString>;
111
- }> | import("./kit.js").ToolSpec<{
112
- confirm: z.ZodOptional<z.ZodBoolean>;
113
- account: z.ZodOptional<z.ZodString>;
114
- link_attachment: z.ZodOptional<z.ZodString>;
115
- topic_tag: z.ZodOptional<z.ZodString>;
116
- reply_to_id: z.ZodOptional<z.ZodString>;
117
- reply_control: z.ZodOptional<z.ZodEnum<["everyone", "accounts_you_follow", "mentioned_only", "parent_post_author_only", "followers_only"]>>;
118
- image_url: z.ZodOptional<z.ZodString>;
119
- video_url: z.ZodOptional<z.ZodString>;
120
- alt_text: z.ZodOptional<z.ZodString>;
121
- posts: z.ZodArray<z.ZodString, "many">;
122
- }> | import("./kit.js").ToolSpec<{
123
- confirm: z.ZodOptional<z.ZodBoolean>;
124
- account: z.ZodOptional<z.ZodString>;
125
- items: z.ZodArray<z.ZodObject<{
126
- image_url: z.ZodOptional<z.ZodString>;
127
- video_url: z.ZodOptional<z.ZodString>;
128
- alt_text: z.ZodOptional<z.ZodString>;
129
- }, "strip", z.ZodTypeAny, {
130
- alt_text?: string | undefined;
131
- image_url?: string | undefined;
132
- video_url?: string | undefined;
133
- }, {
134
- alt_text?: string | undefined;
135
- image_url?: string | undefined;
136
- video_url?: string | undefined;
137
- }>, "many">;
138
- text: z.ZodOptional<z.ZodString>;
139
- topic_tag: z.ZodOptional<z.ZodString>;
140
- reply_control: z.ZodOptional<z.ZodEnum<["everyone", "accounts_you_follow", "mentioned_only", "parent_post_author_only", "followers_only"]>>;
141
- }> | import("./kit.js").ToolSpec<{
142
- account: z.ZodOptional<z.ZodString>;
143
- link_attachment: z.ZodOptional<z.ZodString>;
144
- topic_tag: z.ZodOptional<z.ZodString>;
145
- reply_to_id: z.ZodOptional<z.ZodString>;
146
- quote_post_id: z.ZodOptional<z.ZodString>;
147
- reply_control: z.ZodOptional<z.ZodEnum<["everyone", "accounts_you_follow", "mentioned_only", "parent_post_author_only", "followers_only"]>>;
148
- allowlisted_country_codes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
149
- enable_reply_approvals: z.ZodOptional<z.ZodBoolean>;
150
- image_url: z.ZodOptional<z.ZodString>;
151
- video_url: z.ZodOptional<z.ZodString>;
152
- alt_text: z.ZodOptional<z.ZodString>;
153
- text: z.ZodOptional<z.ZodString>;
154
- }> | import("./kit.js").ToolSpec<{
155
- confirm: z.ZodOptional<z.ZodBoolean>;
156
- account: z.ZodOptional<z.ZodString>;
157
- container_id: z.ZodString;
158
- }> | import("./kit.js").ToolSpec<{
159
- account: z.ZodOptional<z.ZodString>;
160
- container_id: z.ZodString;
161
- }> | import("./kit.js").ToolSpec<{
162
- confirm: z.ZodOptional<z.ZodBoolean>;
163
- account: z.ZodOptional<z.ZodString>;
164
- text: z.ZodString;
165
- quoted_post_id: z.ZodString;
166
- }> | import("./kit.js").ToolSpec<{
167
- confirm: z.ZodOptional<z.ZodBoolean>;
168
- account: z.ZodOptional<z.ZodString>;
169
- id: z.ZodString;
170
- }>)[];
10
+ export declare const createPost: import("@thenavidm/slipway").Tool<import("./kit.js").ToolContext>;
11
+ export declare const createThread: import("@thenavidm/slipway").Tool<import("./kit.js").ToolContext>;
12
+ export declare const createCarousel: import("@thenavidm/slipway").Tool<import("./kit.js").ToolContext>;
13
+ export declare const stagePost: import("@thenavidm/slipway").Tool<import("./kit.js").ToolContext>;
14
+ export declare const publishStaged: import("@thenavidm/slipway").Tool<import("./kit.js").ToolContext>;
15
+ export declare const getContainerStatus: import("@thenavidm/slipway").Tool<import("./kit.js").ToolContext>;
16
+ export declare const quotePost: import("@thenavidm/slipway").Tool<import("./kit.js").ToolContext>;
17
+ export declare const repost: import("@thenavidm/slipway").Tool<import("./kit.js").ToolContext>;
18
+ export declare const deletePost: import("@thenavidm/slipway").Tool<import("./kit.js").ToolContext>;
19
+ export declare const POST_TOOLS: import("@thenavidm/slipway").Tool<import("./kit.js").ToolContext>[];
@@ -5,27 +5,6 @@
5
5
  * because "what did I post this week" is a question about time and turning it
6
6
  * into a guess at a post count is how you end up missing half of it.
7
7
  */
8
- import { z } from "zod";
9
- export declare const getPosts: import("./kit.js").ToolSpec<{
10
- account: z.ZodOptional<z.ZodString>;
11
- limit: z.ZodOptional<z.ZodNumber>;
12
- cursor: z.ZodOptional<z.ZodString>;
13
- since_hours: z.ZodOptional<z.ZodNumber>;
14
- since: z.ZodOptional<z.ZodString>;
15
- until: z.ZodOptional<z.ZodString>;
16
- }>;
17
- export declare const getPost: import("./kit.js").ToolSpec<{
18
- account: z.ZodOptional<z.ZodString>;
19
- id: z.ZodString;
20
- }>;
21
- export declare const READ_TOOLS: (import("./kit.js").ToolSpec<{
22
- account: z.ZodOptional<z.ZodString>;
23
- limit: z.ZodOptional<z.ZodNumber>;
24
- cursor: z.ZodOptional<z.ZodString>;
25
- since_hours: z.ZodOptional<z.ZodNumber>;
26
- since: z.ZodOptional<z.ZodString>;
27
- until: z.ZodOptional<z.ZodString>;
28
- }> | import("./kit.js").ToolSpec<{
29
- account: z.ZodOptional<z.ZodString>;
30
- id: z.ZodString;
31
- }>)[];
8
+ export declare const getPosts: import("@thenavidm/slipway").Tool<import("./kit.js").ToolContext>;
9
+ export declare const getPost: import("@thenavidm/slipway").Tool<import("./kit.js").ToolContext>;
10
+ export declare const READ_TOOLS: import("@thenavidm/slipway").Tool<import("./kit.js").ToolContext>[];
@@ -11,82 +11,11 @@
11
11
  * The third is the one an agent actually wants when asked "what needs
12
12
  * answering", and it is the one nothing surfaces by default.
13
13
  */
14
- import { z } from "zod";
15
- export declare const replyToPost: import("./kit.js").ToolSpec<{
16
- confirm: z.ZodOptional<z.ZodBoolean>;
17
- account: z.ZodOptional<z.ZodString>;
18
- id: z.ZodString;
19
- text: z.ZodString;
20
- image_url: z.ZodOptional<z.ZodString>;
21
- video_url: z.ZodOptional<z.ZodString>;
22
- alt_text: z.ZodOptional<z.ZodString>;
23
- }>;
24
- export declare const getReplies: import("./kit.js").ToolSpec<{
25
- account: z.ZodOptional<z.ZodString>;
26
- limit: z.ZodOptional<z.ZodNumber>;
27
- cursor: z.ZodOptional<z.ZodString>;
28
- id: z.ZodString;
29
- reverse: z.ZodOptional<z.ZodBoolean>;
30
- }>;
31
- export declare const getConversation: import("./kit.js").ToolSpec<{
32
- account: z.ZodOptional<z.ZodString>;
33
- limit: z.ZodOptional<z.ZodNumber>;
34
- cursor: z.ZodOptional<z.ZodString>;
35
- id: z.ZodString;
36
- reverse: z.ZodOptional<z.ZodBoolean>;
37
- }>;
38
- export declare const getAllReplies: import("./kit.js").ToolSpec<{
39
- account: z.ZodOptional<z.ZodString>;
40
- limit: z.ZodOptional<z.ZodNumber>;
41
- cursor: z.ZodOptional<z.ZodString>;
42
- since_hours: z.ZodOptional<z.ZodNumber>;
43
- }>;
44
- export declare const hideReply: import("./kit.js").ToolSpec<{
45
- account: z.ZodOptional<z.ZodString>;
46
- reply_id: z.ZodString;
47
- hide: z.ZodOptional<z.ZodBoolean>;
48
- }>;
49
- export declare const getPendingReplies: import("./kit.js").ToolSpec<{
50
- account: z.ZodOptional<z.ZodString>;
51
- limit: z.ZodOptional<z.ZodNumber>;
52
- cursor: z.ZodOptional<z.ZodString>;
53
- }>;
54
- export declare const managePendingReply: import("./kit.js").ToolSpec<{
55
- confirm: z.ZodOptional<z.ZodBoolean>;
56
- account: z.ZodOptional<z.ZodString>;
57
- reply_id: z.ZodString;
58
- action: z.ZodEnum<["approve", "ignore"]>;
59
- }>;
60
- export declare const REPLY_TOOLS: (import("./kit.js").ToolSpec<{
61
- confirm: z.ZodOptional<z.ZodBoolean>;
62
- account: z.ZodOptional<z.ZodString>;
63
- id: z.ZodString;
64
- text: z.ZodString;
65
- image_url: z.ZodOptional<z.ZodString>;
66
- video_url: z.ZodOptional<z.ZodString>;
67
- alt_text: z.ZodOptional<z.ZodString>;
68
- }> | import("./kit.js").ToolSpec<{
69
- account: z.ZodOptional<z.ZodString>;
70
- limit: z.ZodOptional<z.ZodNumber>;
71
- cursor: z.ZodOptional<z.ZodString>;
72
- id: z.ZodString;
73
- reverse: z.ZodOptional<z.ZodBoolean>;
74
- }> | import("./kit.js").ToolSpec<{
75
- account: z.ZodOptional<z.ZodString>;
76
- limit: z.ZodOptional<z.ZodNumber>;
77
- cursor: z.ZodOptional<z.ZodString>;
78
- since_hours: z.ZodOptional<z.ZodNumber>;
79
- }> | import("./kit.js").ToolSpec<{
80
- account: z.ZodOptional<z.ZodString>;
81
- reply_id: z.ZodString;
82
- hide: z.ZodOptional<z.ZodBoolean>;
83
- }> | import("./kit.js").ToolSpec<{
84
- account: z.ZodOptional<z.ZodString>;
85
- limit: z.ZodOptional<z.ZodNumber>;
86
- cursor: z.ZodOptional<z.ZodString>;
87
- }> | import("./kit.js").ToolSpec<{
88
- confirm: z.ZodOptional<z.ZodBoolean>;
89
- account: z.ZodOptional<z.ZodString>;
90
- reply_id: z.ZodString;
91
- action: z.ZodEnum<["approve", "ignore"]>;
92
- }>)[];
14
+ export declare const replyToPost: import("@thenavidm/slipway").Tool<import("./kit.js").ToolContext>;
15
+ export declare const getReplies: import("@thenavidm/slipway").Tool<import("./kit.js").ToolContext>;
16
+ export declare const getConversation: import("@thenavidm/slipway").Tool<import("./kit.js").ToolContext>;
17
+ export declare const getAllReplies: import("@thenavidm/slipway").Tool<import("./kit.js").ToolContext>;
18
+ export declare const hideReply: import("@thenavidm/slipway").Tool<import("./kit.js").ToolContext>;
19
+ export declare const getPendingReplies: import("@thenavidm/slipway").Tool<import("./kit.js").ToolContext>;
20
+ export declare const managePendingReply: import("@thenavidm/slipway").Tool<import("./kit.js").ToolContext>;
21
+ export declare const REPLY_TOOLS: import("@thenavidm/slipway").Tool<import("./kit.js").ToolContext>[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thenavidm/threads-mcp-cli",
3
- "version": "1.1.2",
3
+ "version": "2.0.1",
4
4
  "description": "Threads MCP server and CLI for Claude Code and AI agents. 30 tools for posting, chained threads, carousels, replies and reply approvals, insights, keyword search and profile discovery.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -10,7 +10,7 @@
10
10
  "threads-mcp-cli": "dist/npx.js"
11
11
  },
12
12
  "engines": {
13
- "node": ">=20"
13
+ "node": ">=22"
14
14
  },
15
15
  "scripts": {
16
16
  "build": "tsc",
@@ -23,12 +23,12 @@
23
23
  "build:mcpb": "bash desktop-extension/build.sh"
24
24
  },
25
25
  "dependencies": {
26
- "@modelcontextprotocol/sdk": "^1.18.0",
27
- "zod": "^3.23.8",
28
- "zod-to-json-schema": "^3.24.1"
26
+ "@thenavidm/slipway": "^0.1.17",
27
+ "zod": "^4.2.0"
29
28
  },
30
29
  "devDependencies": {
31
30
  "@types/node": "^22.10.0",
31
+ "ajv": "^8.20.0",
32
32
  "typescript": "^5.7.0",
33
33
  "vitest": "^2.1.0"
34
34
  },
@@ -52,7 +52,12 @@
52
52
  "claude",
53
53
  "claude-code",
54
54
  "ai-agents",
55
- "llm-tools"
55
+ "llm-tools",
56
+ "cli",
57
+ "social-media",
58
+ "codex",
59
+ "slipway",
60
+ "meta-threads"
56
61
  ],
57
62
  "files": [
58
63
  "dist",
package/dist/cli.d.ts DELETED
@@ -1,59 +0,0 @@
1
- /**
2
- * The CLI adapter.
3
- *
4
- * `register()` in tools/kit.ts turns a `ToolSpec` into an MCP tool. This turns
5
- * the same spec into a shell command, from the same `ALL_TOOLS` array, through
6
- * the same handler and the same `WriteGuard`. Nothing is described twice, so a
7
- * tool added tomorrow is a command tomorrow and the two surfaces cannot drift.
8
- *
9
- * The command IS the tool name. `create_post` runs as `create-post`, and the
10
- * underscore form works too. Inventing a prettier command tree would mean a
11
- * hand-written mapping, which is exactly the drift this avoids, and it would
12
- * force anyone reading the SKILL.md to learn two vocabularies for one action.
13
- *
14
- * Zod is the only schema: every flag, its placeholder, its help text and its
15
- * validation come from the shape the MCP tool already declares.
16
- */
17
- import { type ZodRawShape } from "zod";
18
- /** How a value reaches the parser, once the Zod wrappers are peeled off. */
19
- type FlagKind = "string" | "number" | "boolean" | "enum" | "json";
20
- type Flag = {
21
- /** The schema key, e.g. `reply_control`. */
22
- key: string;
23
- /** The long flag, e.g. `--reply-control`. */
24
- flag: string;
25
- kind: FlagKind;
26
- required: boolean;
27
- repeatable: boolean;
28
- choices?: string[];
29
- help: string;
30
- };
31
- export declare function flagsFor(shape: ZodRawShape): Flag[];
32
- /**
33
- * Parse argv against a tool's flags.
34
- *
35
- * Zod does the real validation afterwards, so this only has to get the values
36
- * into the right JavaScript types and catch the mistakes Zod would report in
37
- * terms of a schema the person at the terminal never sees.
38
- */
39
- export declare function parseArgs(argv: string[], flags: Flag[]): Record<string, unknown>;
40
- /** Exit codes, so a script can branch without parsing the message. */
41
- export declare const EXIT: {
42
- readonly ok: 0;
43
- readonly usage: 2;
44
- readonly notFound: 3;
45
- readonly auth: 4;
46
- readonly api: 5;
47
- readonly rateLimited: 7;
48
- readonly config: 10;
49
- };
50
- /** Map a thrown error onto one of those, from the shape the API gave back. */
51
- export declare function exitCodeFor(error: unknown): number;
52
- /**
53
- * `--select id,post.title` keeps only the named fields. Dotted paths descend,
54
- * arrays are traversed element-wise. This is what makes a long feed affordable.
55
- */
56
- export declare function selectFields(data: unknown, paths: string[]): unknown;
57
- export declare function isCliCommand(argv: string[]): boolean;
58
- export declare function runCli(argv: string[]): Promise<number>;
59
- export {};