post-engineer-mcp 1.54.230 → 1.54.232

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 CHANGED
@@ -202,7 +202,7 @@ The server offers **18 intent tools**, not one tool per API endpoint. A tool is
202
202
  | `prompt_library` | `create`, `update`, `delete` | The account's own prompts, private by default; only the owner can change one. `visibility` `public` makes a prompt readable by anyone (no review while the product is in beta), `private` keeps it to the account. Read and follow prompts with `prompts`: `list` (optional `query` words and `source` official, own or community) and `get` return the official prompts, the account's own (private ones included) and other users' public ones, which come back with an unverified-content notice. |
203
203
  | `schedules` | `list`, `cancel`, `get_slot`, `update_slot_title`, `delete_slot` | Future slots. |
204
204
  | `posts` | `list`, `get` | Published and scheduled posts. |
205
- | `insights` | `post_metrics`, `retention_curve` | How posts performed. |
205
+ | `insights` | `post_metrics`, `retention_curve`, `share_link_create`, `share_link_list`, `share_link_revoke` | How posts performed, and a public read-only link to the metrics summary and this week's posts. |
206
206
  | `experiments` | `results` | Compares your prompts inside each publishing account: every video generated with a `promptVersionId` records its prompt version. |
207
207
  | `media` | `upload`, `check` | Images for video segments. |
208
208
  | `billing` | `balance`, `transactions` | Prepaid tokens. |
@@ -0,0 +1,10 @@
1
+ import type { PostEngineerClient } from './client.js';
2
+ import { createShareLink as createShareLinkContract, listShareLinks as listShareLinksContract, revokeShareLink as revokeShareLinkContract } from './contracts/share-links.js';
3
+ import type { ResponseOf } from './contracts/endpoint.js';
4
+ export interface CreateShareLinkInput {
5
+ personaId?: string;
6
+ expiresInDays?: number;
7
+ }
8
+ export declare function createShareLink(client: PostEngineerClient, input: CreateShareLinkInput): Promise<ResponseOf<typeof createShareLinkContract>>;
9
+ export declare function listShareLinks(client: PostEngineerClient): Promise<ResponseOf<typeof listShareLinksContract>>;
10
+ export declare function revokeShareLink(client: PostEngineerClient, id: string): Promise<ResponseOf<typeof revokeShareLinkContract>>;
@@ -0,0 +1,20 @@
1
+ import { parseContractResponse } from './contract-response.js';
2
+ import { createShareLink as createShareLinkContract, listShareLinks as listShareLinksContract, revokeShareLink as revokeShareLinkContract, } from './contracts/share-links.js';
3
+ export async function createShareLink(client, input) {
4
+ const body = {};
5
+ if (input.personaId !== undefined)
6
+ body.personaIds = [input.personaId];
7
+ if (input.expiresInDays !== undefined)
8
+ body.expiresInDays = input.expiresInDays;
9
+ const raw = await client.request('/api/share-links', { method: 'POST', headers: client.getHeaders(), body: JSON.stringify(body) }, 'create share link');
10
+ return parseContractResponse(createShareLinkContract, raw);
11
+ }
12
+ export async function listShareLinks(client) {
13
+ const raw = await client.request('/api/share-links', { method: 'GET', headers: client.getHeaders() }, 'list share links');
14
+ return parseContractResponse(listShareLinksContract, raw);
15
+ }
16
+ export async function revokeShareLink(client, id) {
17
+ const raw = await client.request(`/api/share-links/${encodeURIComponent(id)}`, { method: 'DELETE', headers: client.getHeaders() }, 'revoke share link');
18
+ return parseContractResponse(revokeShareLinkContract, raw);
19
+ }
20
+ //# sourceMappingURL=client-share-links.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client-share-links.js","sourceRoot":"","sources":["../src/client-share-links.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EACL,eAAe,IAAI,uBAAuB,EAC1C,cAAc,IAAI,sBAAsB,EACxC,eAAe,IAAI,uBAAuB,GAC3C,MAAM,4BAA4B,CAAC;AAQpC,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,MAA0B,EAC1B,KAA2B;IAE3B,MAAM,IAAI,GAA4B,EAAE,CAAC;IACzC,IAAI,KAAK,CAAC,SAAS,KAAK,SAAS;QAAE,IAAI,CAAC,UAAU,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IACvE,IAAI,KAAK,CAAC,aAAa,KAAK,SAAS;QAAE,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC,aAAa,CAAC;IAChF,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,OAAO,CAC9B,kBAAkB,EAClB,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,EAC5E,mBAAmB,CACpB,CAAC;IACF,OAAO,qBAAqB,CAAC,uBAAuB,EAAE,GAAG,CAAC,CAAC;AAC7D,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,MAA0B;IAC7D,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,OAAO,CAC9B,kBAAkB,EAClB,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,UAAU,EAAE,EAAE,EAC/C,kBAAkB,CACnB,CAAC;IACF,OAAO,qBAAqB,CAAC,sBAAsB,EAAE,GAAG,CAAC,CAAC;AAC5D,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,MAA0B,EAC1B,EAAU;IAEV,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,OAAO,CAC9B,oBAAoB,kBAAkB,CAAC,EAAE,CAAC,EAAE,EAC5C,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,UAAU,EAAE,EAAE,EAClD,mBAAmB,CACpB,CAAC;IACF,OAAO,qBAAqB,CAAC,uBAAuB,EAAE,GAAG,CAAC,CAAC;AAC7D,CAAC"}
@@ -0,0 +1,102 @@
1
+ import { z } from 'zod';
2
+ export type EndpointMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
3
+ export interface EndpointDefinition<Body extends z.ZodType | undefined, Query extends z.ZodType | undefined, Response extends z.ZodType, Path extends string> {
4
+ method: EndpointMethod;
5
+ path: Path;
6
+ body?: Body;
7
+ query?: Query;
8
+ response: Response;
9
+ }
10
+ export declare function defineEndpoint<Body extends z.ZodType | undefined = undefined, Query extends z.ZodType | undefined = undefined, Response extends z.ZodType = z.ZodType, Path extends string = string>(config: {
11
+ method: EndpointMethod;
12
+ path: Path;
13
+ body?: Body;
14
+ query?: Query;
15
+ response: Response;
16
+ }): EndpointDefinition<Body, Query, Response, Path>;
17
+ export type BodyOf<Endpoint extends {
18
+ body?: z.ZodType | undefined;
19
+ }> = [
20
+ Exclude<Endpoint['body'], undefined>
21
+ ] extends [never] ? never : Exclude<Endpoint['body'], undefined> extends z.ZodType ? z.input<Exclude<Endpoint['body'], undefined>> : never;
22
+ export type QueryOf<Endpoint extends {
23
+ query?: z.ZodType | undefined;
24
+ }> = [
25
+ Exclude<Endpoint['query'], undefined>
26
+ ] extends [never] ? never : Exclude<Endpoint['query'], undefined> extends z.ZodType ? z.input<Exclude<Endpoint['query'], undefined>> : never;
27
+ export type ResponseOf<Endpoint extends {
28
+ response: z.ZodType;
29
+ }> = Endpoint['response'] extends z.ZodType ? z.output<Endpoint['response']> : never;
30
+ export type ParamsOf<Path extends string> = Path extends `${string}:${infer Rest}` ? Rest extends `${infer Name}/${infer After}` ? {
31
+ [Key in Name]: string;
32
+ } & ParamsOf<`/${After}`> : {
33
+ [Key in Rest]: string;
34
+ } : Record<never, never>;
35
+ export declare const SHARE_LINK_MAX_ACTIVE = 10;
36
+ export declare const SHARE_LINK_MAX_EXPIRY_DAYS = 365;
37
+ export declare const SHARE_LINK_MAX_PERSONAS = 50;
38
+ export declare const CreateShareLinkBodySchema: z.ZodObject<{
39
+ personaIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
40
+ expiresInDays: z.ZodOptional<z.ZodNumber>;
41
+ }, z.core.$strict>;
42
+ export declare const ShareLinkSchema: z.ZodObject<{
43
+ id: z.ZodString;
44
+ personaIds: z.ZodNullable<z.ZodArray<z.ZodString>>;
45
+ createdAt: z.ZodString;
46
+ expiresAt: z.ZodNullable<z.ZodString>;
47
+ revokedAt: z.ZodNullable<z.ZodString>;
48
+ lastViewedAt: z.ZodNullable<z.ZodString>;
49
+ }, z.core.$strip>;
50
+ export declare const CreateShareLinkResponseSchema: z.ZodObject<{
51
+ success: z.ZodLiteral<true>;
52
+ id: z.ZodString;
53
+ token: z.ZodString;
54
+ path: z.ZodString;
55
+ url: z.ZodString;
56
+ personaIds: z.ZodNullable<z.ZodArray<z.ZodString>>;
57
+ createdAt: z.ZodString;
58
+ expiresAt: z.ZodNullable<z.ZodString>;
59
+ }, z.core.$strip>;
60
+ export declare const ListShareLinksResponseSchema: z.ZodObject<{
61
+ success: z.ZodLiteral<true>;
62
+ links: z.ZodArray<z.ZodObject<{
63
+ id: z.ZodString;
64
+ personaIds: z.ZodNullable<z.ZodArray<z.ZodString>>;
65
+ createdAt: z.ZodString;
66
+ expiresAt: z.ZodNullable<z.ZodString>;
67
+ revokedAt: z.ZodNullable<z.ZodString>;
68
+ lastViewedAt: z.ZodNullable<z.ZodString>;
69
+ }, z.core.$strip>>;
70
+ }, z.core.$strip>;
71
+ export declare const RevokeShareLinkResponseSchema: z.ZodObject<{
72
+ success: z.ZodLiteral<true>;
73
+ alreadyRevoked: z.ZodBoolean;
74
+ }, z.core.$strip>;
75
+ export declare const createShareLink: EndpointDefinition<z.ZodObject<{
76
+ personaIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
77
+ expiresInDays: z.ZodOptional<z.ZodNumber>;
78
+ }, z.core.$strict>, undefined, z.ZodObject<{
79
+ success: z.ZodLiteral<true>;
80
+ id: z.ZodString;
81
+ token: z.ZodString;
82
+ path: z.ZodString;
83
+ url: z.ZodString;
84
+ personaIds: z.ZodNullable<z.ZodArray<z.ZodString>>;
85
+ createdAt: z.ZodString;
86
+ expiresAt: z.ZodNullable<z.ZodString>;
87
+ }, z.core.$strip>, "/api/share-links">;
88
+ export declare const listShareLinks: EndpointDefinition<undefined, undefined, z.ZodObject<{
89
+ success: z.ZodLiteral<true>;
90
+ links: z.ZodArray<z.ZodObject<{
91
+ id: z.ZodString;
92
+ personaIds: z.ZodNullable<z.ZodArray<z.ZodString>>;
93
+ createdAt: z.ZodString;
94
+ expiresAt: z.ZodNullable<z.ZodString>;
95
+ revokedAt: z.ZodNullable<z.ZodString>;
96
+ lastViewedAt: z.ZodNullable<z.ZodString>;
97
+ }, z.core.$strip>>;
98
+ }, z.core.$strip>, "/api/share-links">;
99
+ export declare const revokeShareLink: EndpointDefinition<undefined, undefined, z.ZodObject<{
100
+ success: z.ZodLiteral<true>;
101
+ alreadyRevoked: z.ZodBoolean;
102
+ }, z.core.$strip>, "/api/share-links/:id">;
@@ -0,0 +1,58 @@
1
+ // GENERATED from shared/contracts — do not edit.
2
+ // Run `node scripts/sync-contracts.mjs` from the repo root to regenerate.
3
+ import { z } from 'zod';
4
+ export function defineEndpoint(config) {
5
+ return config;
6
+ }
7
+ export const SHARE_LINK_MAX_ACTIVE = 10;
8
+ export const SHARE_LINK_MAX_EXPIRY_DAYS = 365;
9
+ export const SHARE_LINK_MAX_PERSONAS = 50;
10
+ export const CreateShareLinkBodySchema = z
11
+ .object({
12
+ personaIds: z.array(z.string()).min(1).max(SHARE_LINK_MAX_PERSONAS).optional(),
13
+ expiresInDays: z.number().int().min(1).max(SHARE_LINK_MAX_EXPIRY_DAYS).optional(),
14
+ })
15
+ .strict();
16
+ export const ShareLinkSchema = z.object({
17
+ id: z.string(),
18
+ personaIds: z.array(z.string()).nullable(),
19
+ createdAt: z.string(),
20
+ expiresAt: z.string().nullable(),
21
+ revokedAt: z.string().nullable(),
22
+ lastViewedAt: z.string().nullable(),
23
+ });
24
+ export const CreateShareLinkResponseSchema = z.object({
25
+ success: z.literal(true),
26
+ id: z.string(),
27
+ token: z.string(),
28
+ path: z.string(),
29
+ url: z.string(),
30
+ personaIds: z.array(z.string()).nullable(),
31
+ createdAt: z.string(),
32
+ expiresAt: z.string().nullable(),
33
+ });
34
+ export const ListShareLinksResponseSchema = z.object({
35
+ success: z.literal(true),
36
+ links: z.array(ShareLinkSchema),
37
+ });
38
+ export const RevokeShareLinkResponseSchema = z.object({
39
+ success: z.literal(true),
40
+ alreadyRevoked: z.boolean(),
41
+ });
42
+ export const createShareLink = defineEndpoint({
43
+ method: 'POST',
44
+ path: '/api/share-links',
45
+ body: CreateShareLinkBodySchema,
46
+ response: CreateShareLinkResponseSchema,
47
+ });
48
+ export const listShareLinks = defineEndpoint({
49
+ method: 'GET',
50
+ path: '/api/share-links',
51
+ response: ListShareLinksResponseSchema,
52
+ });
53
+ export const revokeShareLink = defineEndpoint({
54
+ method: 'DELETE',
55
+ path: '/api/share-links/:id',
56
+ response: RevokeShareLinkResponseSchema,
57
+ });
58
+ //# sourceMappingURL=share-links.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"share-links.js","sourceRoot":"","sources":["../../src/contracts/share-links.ts"],"names":[],"mappings":"AAAA,iDAAiD;AACjD,0EAA0E;AAC1E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAkBxB,MAAM,UAAU,cAAc,CAK5B,MAMD;IACC,OAAO,MAAM,CAAC;AAChB,CAAC;AA0BD,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACxC,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,CAAC;AAC9C,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAE1C,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC;KACvC,MAAM,CAAC;IACN,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC,QAAQ,EAAE;IAC9E,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC,QAAQ,EAAE;CAClF,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,UAA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,CAAC;IAC5C,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,kBAAkB;IACxB,IAAI,EAAE,yBAAyB;IAC/B,QAAQ,EAAE,6BAA6B;CACxC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,cAAc,CAAC;IAC3C,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,kBAAkB;IACxB,QAAQ,EAAE,4BAA4B;CACvC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG,cAAc,CAAC;IAC5C,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,sBAAsB;IAC5B,QAAQ,EAAE,6BAA6B;CACxC,CAAC,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { actionDescription, actionShape, byAction } from './action-tool.js';
2
2
  import { withRecipeNudge } from './recipe-session.js';
3
3
  import { DESTRUCTIVE, READ_ONLY } from './tool-annotations.js';
4
+ import { CreateShareLinkShape, ListShareLinksShape, RevokeShareLinkShape, handleCreateShareLink, handleListShareLinks, handleRevokeShareLink, } from './tools-share-links.js';
4
5
  import { CancelScheduleShape, DeleteSlotShape, GetSlotShape, ListPostsShape, ListSchedulesShape, ListTokenTransactionsShape, UpdateSlotTitleShape, handleCancelSchedule, handleDeleteSlot, handleGetSlot, handleListSchedules, handleListTokenTransactions, handleUpdateSlotTitle, handleGetTokenBalance, } from './tools.js';
5
6
  import { GetPostMetricsShape, GetPostShape, GetYouTubeRetentionCurveShape, handleGetPost, handleGetPostMetrics, handleGetYouTubeRetentionCurve, handleListPosts, } from './tools-posts.js';
6
7
  const SCHEDULES_SPECS = {
@@ -11,7 +12,13 @@ const SCHEDULES_SPECS = {
11
12
  delete_slot: DeleteSlotShape,
12
13
  };
13
14
  const POSTS_SPECS = { list: ListPostsShape, get: GetPostShape };
14
- const INSIGHTS_SPECS = { post_metrics: GetPostMetricsShape, retention_curve: GetYouTubeRetentionCurveShape };
15
+ const INSIGHTS_SPECS = {
16
+ post_metrics: GetPostMetricsShape,
17
+ retention_curve: GetYouTubeRetentionCurveShape,
18
+ share_link_create: CreateShareLinkShape,
19
+ share_link_list: ListShareLinksShape,
20
+ share_link_revoke: RevokeShareLinkShape,
21
+ };
15
22
  const BILLING_SPECS = { balance: {}, transactions: ListTokenTransactionsShape };
16
23
  export function registerLibraryTools(server, client, session) {
17
24
  server.tool('schedules', actionDescription('Your scheduled videos (future slots). list: the schedules. get_slot / update_slot_title / delete_slot: one slot of a schedule. cancel: cancels a whole schedule: unpublished slots are removed, but only slots whose generation never ran get their prepaid tokens back (a generating or ready slot keeps its charge, the GPU cost is spent); a post already publishing or published is not recalled; a cancelled video of a discounted batch gives back the discount the batch no longer earns.', SCHEDULES_SPECS), actionShape(SCHEDULES_SPECS), DESTRUCTIVE, byAction({
@@ -25,9 +32,12 @@ export function registerLibraryTools(server, client, session) {
25
32
  list: async (args) => handleListPosts(client, args),
26
33
  get: async (args) => handleGetPost(client, args),
27
34
  }, POSTS_SPECS, 'posts'));
28
- server.tool('insights', actionDescription('How your posts performed. post_metrics: per-network metrics of published posts (views, likes, comments, average view duration, published date), filterable by persona, network, account and window. retention_curve: the YouTube audience retention curve of one post.', INSIGHTS_SPECS), actionShape(INSIGHTS_SPECS), READ_ONLY, byAction({
35
+ server.tool('insights', actionDescription('How your posts performed. post_metrics: per-network metrics of published posts (views, likes, comments, average view duration, published date), filterable by persona, network, account and window. retention_curve: the YouTube audience retention curve of one post. share_link_create: a public read-only link (no login) to the metrics summary of the first 7 days and this week\'s posts, optionally limited to one persona and an expiry; the url is returned once and only its hash is stored. share_link_list: your links with their scope, expiry, revocation and last view, never the url. share_link_revoke: stops a link at once.', INSIGHTS_SPECS), actionShape(INSIGHTS_SPECS), DESTRUCTIVE, byAction({
29
36
  post_metrics: async (args) => handleGetPostMetrics(client, args),
30
37
  retention_curve: async (args) => handleGetYouTubeRetentionCurve(client, args),
38
+ share_link_create: (args) => handleCreateShareLink(client, args),
39
+ share_link_list: async () => handleListShareLinks(client),
40
+ share_link_revoke: async (args) => handleRevokeShareLink(client, args),
31
41
  }, INSIGHTS_SPECS, 'insights'));
32
42
  server.tool('billing', actionDescription('Your prepaid tokens. balance: the current balance. transactions: the ledger of spends and credits, newest first.', BILLING_SPECS), actionShape(BILLING_SPECS), READ_ONLY, byAction({
33
43
  balance: withRecipeNudge(session, 'billing_balance', async () => handleGetTokenBalance(client)),
@@ -1 +1 @@
1
- {"version":3,"file":"intent-library.js","sourceRoot":"","sources":["../src/intent-library.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5E,OAAO,EAAE,eAAe,EAAsB,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,0BAA0B,EAC1B,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACnB,2BAA2B,EAC3B,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,mBAAmB,EACnB,YAAY,EACZ,6BAA6B,EAC7B,aAAa,EACb,oBAAoB,EACpB,8BAA8B,EAC9B,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,eAAe,GAAG;IACtB,IAAI,EAAE,kBAAkB;IACxB,MAAM,EAAE,mBAAmB;IAC3B,QAAQ,EAAE,YAAY;IACtB,iBAAiB,EAAE,oBAAoB;IACvC,WAAW,EAAE,eAAe;CAC7B,CAAC;AAEF,MAAM,WAAW,GAAG,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,EAAE,YAAY,EAAE,CAAC;AAEhE,MAAM,cAAc,GAAG,EAAE,YAAY,EAAE,mBAAmB,EAAE,eAAe,EAAE,6BAA6B,EAAE,CAAC;AAE7G,MAAM,aAAa,GAA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W,CAAC,aAAa,CAAC,EAC1B,SAAS,EACT,QAAQ,CACN;QACE,OAAO,EAAE,eAAe,CAAC,OAAO,EAAE,iBAAiB,EAAE,KAAK,IAAI,EAAE,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC;QAC/F,YAAY,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,2BAA2B,CAAC,MAAM,EAAE,IAAI,CAAC;KACxE,EACD,aAAa,EACb,SAAS,CACV,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { z } from 'zod';
2
+ import type { PostEngineerClient } from './client.js';
3
+ import { type McpToolResponse } from './tools-call.js';
4
+ export declare const CreateShareLinkShape: {
5
+ persona: z.ZodOptional<typeof import("./refs.js").PERSONA_REF>;
6
+ } & Omit<{
7
+ personaId: z.ZodOptional<z.ZodString>;
8
+ expiresInDays: z.ZodOptional<z.ZodNumber>;
9
+ }, "personaId">;
10
+ export declare const CreateShareLinkSchema: z.ZodObject<{
11
+ persona: z.ZodOptional<typeof import("./refs.js").PERSONA_REF>;
12
+ expiresInDays: z.ZodOptional<z.ZodNumber>;
13
+ }, z.core.$strip>;
14
+ export declare const ListShareLinksShape: {};
15
+ export declare const RevokeShareLinkShape: {
16
+ id: z.ZodString;
17
+ };
18
+ export declare const RevokeShareLinkSchema: z.ZodObject<{
19
+ id: z.ZodString;
20
+ }, z.core.$strip>;
21
+ export declare function handleCreateShareLink(client: PostEngineerClient, args: z.infer<typeof CreateShareLinkSchema>): Promise<McpToolResponse>;
22
+ export declare function handleListShareLinks(client: PostEngineerClient): Promise<McpToolResponse>;
23
+ export declare function handleRevokeShareLink(client: PostEngineerClient, args: z.infer<typeof RevokeShareLinkSchema>): Promise<McpToolResponse>;
@@ -0,0 +1,31 @@
1
+ import { z } from 'zod';
2
+ import { createShareLink, listShareLinks, revokeShareLink } from './client-share-links.js';
3
+ import { SHARE_LINK_MAX_EXPIRY_DAYS } from './contracts/share-links.js';
4
+ import { optionalPersonaRefShape, withOptionalPersona } from './refs.js';
5
+ import { handleLibraryCall } from './tools-call.js';
6
+ export const CreateShareLinkShape = optionalPersonaRefShape({
7
+ personaId: z.string().optional(),
8
+ expiresInDays: z
9
+ .number()
10
+ .int()
11
+ .min(1)
12
+ .max(SHARE_LINK_MAX_EXPIRY_DAYS)
13
+ .optional()
14
+ .describe(`Optional lifetime of the link in days (1-${SHARE_LINK_MAX_EXPIRY_DAYS}). Without it the link never expires.`),
15
+ });
16
+ export const CreateShareLinkSchema = z.object(CreateShareLinkShape);
17
+ export const ListShareLinksShape = {};
18
+ export const RevokeShareLinkShape = {
19
+ id: z.string().min(1, 'id is required').describe('The share link id (id from insights (action: share_link_list)).'),
20
+ };
21
+ export const RevokeShareLinkSchema = z.object(RevokeShareLinkShape);
22
+ export async function handleCreateShareLink(client, args) {
23
+ return withOptionalPersona(client, args, (resolved) => handleLibraryCall(() => createShareLink(client, { personaId: resolved.personaId, expiresInDays: resolved.expiresInDays }), 'creating share link'));
24
+ }
25
+ export async function handleListShareLinks(client) {
26
+ return handleLibraryCall(() => listShareLinks(client), 'listing share links');
27
+ }
28
+ export async function handleRevokeShareLink(client, args) {
29
+ return handleLibraryCall(() => revokeShareLink(client, args.id), 'revoking share link');
30
+ }
31
+ //# sourceMappingURL=tools-share-links.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools-share-links.js","sourceRoot":"","sources":["../src/tools-share-links.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC3F,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAwB,MAAM,iBAAiB,CAAC;AAE1E,MAAM,CAAC,MAAM,oBAAoB,GAAG,u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AE3C,OAAO,iBAAiB,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,EAAE,qBAAqB,CAAC,CAAC;AAC1F,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "post-engineer-mcp",
3
3
  "mcpName": "io.github.Ryan-Carloso/post-engineer",
4
- "version": "1.54.230",
4
+ "version": "1.54.232",
5
5
  "engines": {
6
6
  "node": ">=20.10"
7
7
  },