posterly-mcp-server 0.43.2 → 0.43.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 +1 -1
- package/dist/lib/api-client.d.ts +27 -0
- package/dist/lib/version.d.ts +1 -1
- package/dist/lib/version.js +1 -1
- package/dist/tools/create-webhook.d.ts +2 -2
- package/dist/tools/get-agent-signup-info.js +2 -1
- package/dist/tools/get-signup-session.js +8 -1
- package/dist/tools/start-signup.js +13 -5
- package/dist/tools/update-webhook.d.ts +2 -2
- package/package.json +1 -1
- package/server.json +2 -2
- package/src/lib/api-client.ts +34 -0
- package/src/lib/version.ts +1 -1
- package/src/tools/get-agent-signup-info.ts +2 -1
- package/src/tools/get-signup-session.ts +8 -1
- package/src/tools/start-signup.ts +13 -5
package/README.md
CHANGED
|
@@ -122,7 +122,7 @@ Add the same server definition to your Cursor MCP settings:
|
|
|
122
122
|
|
|
123
123
|
## Available tools
|
|
124
124
|
|
|
125
|
-
`posterly-mcp-server@0.43.
|
|
125
|
+
`posterly-mcp-server@0.43.3` exposes 90 tools.
|
|
126
126
|
|
|
127
127
|
Public setup tools work before `POSTERLY_API_KEY` exists:
|
|
128
128
|
|
package/dist/lib/api-client.d.ts
CHANGED
|
@@ -842,6 +842,31 @@ export interface PublicSignupAgentPay {
|
|
|
842
842
|
requires_tos_acceptance?: boolean;
|
|
843
843
|
[key: string]: unknown;
|
|
844
844
|
}
|
|
845
|
+
export interface PublicSignupPaymentAgentWalletSpendRequest {
|
|
846
|
+
merchant_name?: string;
|
|
847
|
+
merchant_url?: string;
|
|
848
|
+
amount?: number | null;
|
|
849
|
+
currency?: string;
|
|
850
|
+
context?: string;
|
|
851
|
+
}
|
|
852
|
+
export interface PublicSignupPaymentAgentWallet {
|
|
853
|
+
supported?: boolean;
|
|
854
|
+
how?: string;
|
|
855
|
+
spend_request?: PublicSignupPaymentAgentWalletSpendRequest;
|
|
856
|
+
}
|
|
857
|
+
export interface PublicSignupPayment {
|
|
858
|
+
amount?: number | null;
|
|
859
|
+
currency?: string;
|
|
860
|
+
amount_display?: string | null;
|
|
861
|
+
billing?: string;
|
|
862
|
+
description?: string;
|
|
863
|
+
merchant_name?: string;
|
|
864
|
+
merchant_url?: string;
|
|
865
|
+
checkout_redirect_url?: string;
|
|
866
|
+
pay_with?: string;
|
|
867
|
+
agent_wallet?: PublicSignupPaymentAgentWallet;
|
|
868
|
+
[key: string]: unknown;
|
|
869
|
+
}
|
|
845
870
|
export interface PublicSignupSession {
|
|
846
871
|
id: string;
|
|
847
872
|
status: string;
|
|
@@ -858,6 +883,7 @@ export interface PublicSignupSession {
|
|
|
858
883
|
account?: Record<string, unknown>;
|
|
859
884
|
billing?: Record<string, unknown>;
|
|
860
885
|
agent_pay?: PublicSignupAgentPay | null;
|
|
886
|
+
payment?: PublicSignupPayment | null;
|
|
861
887
|
links?: Record<string, unknown>;
|
|
862
888
|
created_at?: string;
|
|
863
889
|
updated_at?: string;
|
|
@@ -878,6 +904,7 @@ export interface PublicSignupResponse {
|
|
|
878
904
|
account?: Record<string, unknown>;
|
|
879
905
|
billing?: Record<string, unknown>;
|
|
880
906
|
agent_pay?: PublicSignupAgentPay | null;
|
|
907
|
+
payment?: PublicSignupPayment | null;
|
|
881
908
|
[key: string]: unknown;
|
|
882
909
|
}
|
|
883
910
|
export interface PublicSignupSessionResponse {
|
package/dist/lib/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const POSTERLY_MCP_VERSION = "0.43.
|
|
1
|
+
export declare const POSTERLY_MCP_VERSION = "0.43.3";
|
package/dist/lib/version.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
// tool set (minus the intentional pre-auth signup tools that only this stdio
|
|
6
6
|
// package exposes). `npm run check:mcp-parity` enforces both the version match
|
|
7
7
|
// and the tool-list match, and runs in the pre-commit hook.
|
|
8
|
-
export const POSTERLY_MCP_VERSION = '0.43.
|
|
8
|
+
export const POSTERLY_MCP_VERSION = '0.43.3';
|
|
@@ -13,15 +13,15 @@ export declare const createWebhookTool: {
|
|
|
13
13
|
}, "strip", z.ZodTypeAny, {
|
|
14
14
|
url: string;
|
|
15
15
|
confirm: true;
|
|
16
|
-
workspace_id?: string | undefined;
|
|
17
16
|
description?: string | undefined;
|
|
17
|
+
workspace_id?: string | undefined;
|
|
18
18
|
events?: ("webhook.test" | "post.created" | "post.updated" | "post.deleted" | "post.publishing" | "post.published" | "post.failed" | "account.disconnected" | "analytics.synced")[] | undefined;
|
|
19
19
|
is_active?: boolean | undefined;
|
|
20
20
|
}, {
|
|
21
21
|
url: string;
|
|
22
22
|
confirm: true;
|
|
23
|
-
workspace_id?: string | undefined;
|
|
24
23
|
description?: string | undefined;
|
|
24
|
+
workspace_id?: string | undefined;
|
|
25
25
|
events?: ("webhook.test" | "post.created" | "post.updated" | "post.deleted" | "post.publishing" | "post.published" | "post.failed" | "account.disconnected" | "analytics.synced")[] | undefined;
|
|
26
26
|
is_active?: boolean | undefined;
|
|
27
27
|
}>;
|
|
@@ -30,7 +30,8 @@ export const getAgentSignupInfoTool = {
|
|
|
30
30
|
'- Do not narrate raw curl, HTTP, JSON, API keys, or implementation details unless the user explicitly asks for debugging.',
|
|
31
31
|
'',
|
|
32
32
|
'Boundaries:',
|
|
33
|
-
'- Payment
|
|
33
|
+
'- Payment happens on Stripe Checkout, either by the user in their browser or by the agent with its own approved payment credential (for example a Link agent wallet); never card details in chat.',
|
|
34
|
+
'- Where enabled, payment can instead be a one-time Link Agent Wallet virtual card (credential_type: card) on a prepaid PaymentIntent.',
|
|
34
35
|
'- Never send card numbers to posterly. Confirm the PaymentIntent with Stripe, or send checkout_redirect_url.',
|
|
35
36
|
'- The user sets their Posterly password in their browser.',
|
|
36
37
|
'- The user approves social OAuth in their browser.',
|
|
@@ -24,6 +24,7 @@ function formatSignupSession(session, includeRaw) {
|
|
|
24
24
|
const passwordUrl = stringFromRecord(session.links, 'password_setup_url');
|
|
25
25
|
const completeUrl = stringFromRecord(session.links, 'complete_url');
|
|
26
26
|
const agentPay = session.agent_pay;
|
|
27
|
+
const payment = session.payment;
|
|
27
28
|
const lines = [
|
|
28
29
|
`Posterly signup session: ${session.id}`,
|
|
29
30
|
`Status: ${session.status}`,
|
|
@@ -36,6 +37,12 @@ function formatSignupSession(session, includeRaw) {
|
|
|
36
37
|
agentPay?.requires_tos_acceptance ? 'Terms acceptance required before client_secret is released.' : '',
|
|
37
38
|
agentPay?.client_secret ? `PaymentIntent client_secret: ${agentPay.client_secret}` : '',
|
|
38
39
|
agentPay?.confirm_url ? `Confirm URL: ${agentPay.confirm_url}` : '',
|
|
40
|
+
!agentPay?.enabled && payment?.amount_display
|
|
41
|
+
? `Amount due: ${payment.amount_display} ${String(payment.currency || 'usd').toUpperCase()} to ${payment.merchant_name || 'posterly'} (${payment.billing || 'subscription'})`
|
|
42
|
+
: '',
|
|
43
|
+
!agentPay?.enabled && payment?.agent_wallet?.how
|
|
44
|
+
? `Agent wallet option: ${payment.agent_wallet.how}`
|
|
45
|
+
: '',
|
|
39
46
|
checkoutRedirectUrl ? `Checkout handoff URL: ${checkoutRedirectUrl}` : '',
|
|
40
47
|
checkoutUrl ? `Checkout URL: ${checkoutUrl}` : '',
|
|
41
48
|
passwordUrl ? `Password setup URL: ${passwordUrl}` : '',
|
|
@@ -61,7 +68,7 @@ function guidanceForStatus(status, agentPayAvailable = false, requiresTosAccepta
|
|
|
61
68
|
}
|
|
62
69
|
return agentPayAvailable
|
|
63
70
|
? 'Payment is still pending. Confirm the prepaid PaymentIntent with a Link virtual card (credential_type: card), or send the user the Checkout handoff URL. Keep polling; never ask for card numbers.'
|
|
64
|
-
: 'Tell the user checkout is still pending.
|
|
71
|
+
: 'Tell the user checkout is still pending. If you hold an approved payment credential such as a Link agent wallet, you may pay the Checkout handoff URL yourself instead of asking the user; otherwise keep polling. Never ask for card details.';
|
|
65
72
|
case 'checkout_expired':
|
|
66
73
|
return 'Tell the user checkout expired and offer to call start_signup again.';
|
|
67
74
|
case 'payment_confirmed':
|
|
@@ -70,6 +70,7 @@ function formatSignupStart(response, includeRaw) {
|
|
|
70
70
|
const status = session?.status || response.status || 'checkout_pending';
|
|
71
71
|
const message = session?.status_message || response.status_message;
|
|
72
72
|
const agentPay = response.agent_pay || session?.agent_pay;
|
|
73
|
+
const payment = response.payment || session?.payment;
|
|
73
74
|
const lines = [
|
|
74
75
|
'Posterly signup started.',
|
|
75
76
|
sessionId ? `Signup session: ${sessionId}` : '',
|
|
@@ -83,6 +84,12 @@ function formatSignupStart(response, includeRaw) {
|
|
|
83
84
|
agentPay?.client_secret ? `PaymentIntent client_secret: ${agentPay.client_secret}` : '',
|
|
84
85
|
agentPay?.confirm_url ? `Confirm URL: ${agentPay.confirm_url}` : '',
|
|
85
86
|
agentPay?.pay_instructions ? `Pay instructions: ${agentPay.pay_instructions}` : '',
|
|
87
|
+
!agentPay?.enabled && payment?.amount_display
|
|
88
|
+
? `Amount due: ${payment.amount_display} ${String(payment.currency || 'usd').toUpperCase()} to ${payment.merchant_name || 'posterly'} (${payment.billing || 'subscription'})`
|
|
89
|
+
: '',
|
|
90
|
+
!agentPay?.enabled && payment?.agent_wallet?.how
|
|
91
|
+
? `Agent wallet option: ${payment.agent_wallet.how}`
|
|
92
|
+
: '',
|
|
86
93
|
checkoutRedirectUrl ? `Checkout handoff URL (browser fallback): ${checkoutRedirectUrl}` : '',
|
|
87
94
|
checkoutUrl ? `Checkout URL: ${checkoutUrl}` : '',
|
|
88
95
|
pollUrl ? `Poll URL: ${pollUrl}` : '',
|
|
@@ -107,11 +114,12 @@ function formatSignupStart(response, includeRaw) {
|
|
|
107
114
|
'6. Do not ask for card details, the Posterly password, social passwords, or OAuth codes.',
|
|
108
115
|
]
|
|
109
116
|
: [
|
|
110
|
-
'1.
|
|
111
|
-
'2.
|
|
112
|
-
'3.
|
|
113
|
-
'4.
|
|
114
|
-
'5.
|
|
117
|
+
'1. If you hold an approved payment credential such as a Link agent wallet, you can pay the Checkout handoff URL yourself: create a spend request for the amount and merchant above, get the user\'s approval in the wallet, then complete the Checkout page with that credential. Never paste card numbers into chat or send them to posterly.',
|
|
118
|
+
'2. Otherwise, send the Checkout handoff URL to the user so they can pay securely in their browser. Use the raw Stripe checkout URL only if you preserve the full URL including any fragment. posterly does not email this link, so do not tell the user to check their inbox at this stage.',
|
|
119
|
+
'3. Call get_signup_session with the signup session ID until the status changes.',
|
|
120
|
+
'4. Tell the user when Posterly sends the password setup email.',
|
|
121
|
+
'5. If status becomes agent_access_required, ask the user to install or paste the Posterly MCP/API setup instructions into this trusted AI chat, then onboard them in this conversation (about you, connect, brand voice, first post). Do not send them to /onboarding-v2.',
|
|
122
|
+
'6. Do not ask for card details, the Posterly password, social passwords, or OAuth codes.',
|
|
115
123
|
]),
|
|
116
124
|
includeRaw ? `\nRaw signup response:\n${JSON.stringify(response, null, 2)}` : '',
|
|
117
125
|
];
|
|
@@ -14,17 +14,17 @@ export declare const updateWebhookTool: {
|
|
|
14
14
|
}, "strip", z.ZodTypeAny, {
|
|
15
15
|
confirm: true;
|
|
16
16
|
webhook_id: string;
|
|
17
|
+
description?: string | null | undefined;
|
|
17
18
|
workspace_id?: string | null | undefined;
|
|
18
19
|
url?: string | undefined;
|
|
19
|
-
description?: string | null | undefined;
|
|
20
20
|
events?: ("webhook.test" | "post.created" | "post.updated" | "post.deleted" | "post.publishing" | "post.published" | "post.failed" | "account.disconnected" | "analytics.synced")[] | undefined;
|
|
21
21
|
is_active?: boolean | undefined;
|
|
22
22
|
}, {
|
|
23
23
|
confirm: true;
|
|
24
24
|
webhook_id: string;
|
|
25
|
+
description?: string | null | undefined;
|
|
25
26
|
workspace_id?: string | null | undefined;
|
|
26
27
|
url?: string | undefined;
|
|
27
|
-
description?: string | null | undefined;
|
|
28
28
|
events?: ("webhook.test" | "post.created" | "post.updated" | "post.deleted" | "post.publishing" | "post.published" | "post.failed" | "account.disconnected" | "analytics.synced")[] | undefined;
|
|
29
29
|
is_active?: boolean | undefined;
|
|
30
30
|
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "posterly-mcp-server",
|
|
3
|
-
"version": "0.43.
|
|
3
|
+
"version": "0.43.3",
|
|
4
4
|
"mcpName": "io.github.awpthorp/posterly",
|
|
5
5
|
"description": "MCP server for posterly: schedule and publish social media posts across 18 platforms from any MCP client (Claude, ChatGPT, Cursor, Windsurf, Cline, and more)",
|
|
6
6
|
"license": "MIT",
|
package/server.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "io.github.awpthorp/posterly",
|
|
4
4
|
"title": "posterly",
|
|
5
5
|
"description": "Validate, schedule, publish, and analyze social content across 18 platforms with posterly.",
|
|
6
|
-
"version": "0.43.
|
|
6
|
+
"version": "0.43.3",
|
|
7
7
|
"websiteUrl": "https://www.poster.ly/mcp",
|
|
8
8
|
"repository": {
|
|
9
9
|
"url": "https://github.com/awpthorp/posterly",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
{
|
|
15
15
|
"registryType": "npm",
|
|
16
16
|
"identifier": "posterly-mcp-server",
|
|
17
|
-
"version": "0.43.
|
|
17
|
+
"version": "0.43.3",
|
|
18
18
|
"transport": {
|
|
19
19
|
"type": "stdio"
|
|
20
20
|
},
|
package/src/lib/api-client.ts
CHANGED
|
@@ -878,6 +878,38 @@ export interface PublicSignupAgentPay {
|
|
|
878
878
|
[key: string]: unknown;
|
|
879
879
|
}
|
|
880
880
|
|
|
881
|
+
export interface PublicSignupPaymentAgentWalletSpendRequest {
|
|
882
|
+
merchant_name?: string;
|
|
883
|
+
merchant_url?: string;
|
|
884
|
+
amount?: number | null;
|
|
885
|
+
currency?: string;
|
|
886
|
+
context?: string;
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
export interface PublicSignupPaymentAgentWallet {
|
|
890
|
+
supported?: boolean;
|
|
891
|
+
how?: string;
|
|
892
|
+
spend_request?: PublicSignupPaymentAgentWalletSpendRequest;
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
// Always present while checkout is open, regardless of agent_pay/ENABLE_AGENT_CARD_PAY.
|
|
896
|
+
// Describes the Stripe-hosted Checkout session itself so an agent with its own
|
|
897
|
+
// approved payment credential (for example a Link agent wallet) can pay it
|
|
898
|
+
// directly. null once payment is confirmed or checkout has expired.
|
|
899
|
+
export interface PublicSignupPayment {
|
|
900
|
+
amount?: number | null;
|
|
901
|
+
currency?: string;
|
|
902
|
+
amount_display?: string | null;
|
|
903
|
+
billing?: string;
|
|
904
|
+
description?: string;
|
|
905
|
+
merchant_name?: string;
|
|
906
|
+
merchant_url?: string;
|
|
907
|
+
checkout_redirect_url?: string;
|
|
908
|
+
pay_with?: string;
|
|
909
|
+
agent_wallet?: PublicSignupPaymentAgentWallet;
|
|
910
|
+
[key: string]: unknown;
|
|
911
|
+
}
|
|
912
|
+
|
|
881
913
|
export interface PublicSignupSession {
|
|
882
914
|
id: string;
|
|
883
915
|
status: string;
|
|
@@ -894,6 +926,7 @@ export interface PublicSignupSession {
|
|
|
894
926
|
account?: Record<string, unknown>;
|
|
895
927
|
billing?: Record<string, unknown>;
|
|
896
928
|
agent_pay?: PublicSignupAgentPay | null;
|
|
929
|
+
payment?: PublicSignupPayment | null;
|
|
897
930
|
links?: Record<string, unknown>;
|
|
898
931
|
created_at?: string;
|
|
899
932
|
updated_at?: string;
|
|
@@ -915,6 +948,7 @@ export interface PublicSignupResponse {
|
|
|
915
948
|
account?: Record<string, unknown>;
|
|
916
949
|
billing?: Record<string, unknown>;
|
|
917
950
|
agent_pay?: PublicSignupAgentPay | null;
|
|
951
|
+
payment?: PublicSignupPayment | null;
|
|
918
952
|
[key: string]: unknown;
|
|
919
953
|
}
|
|
920
954
|
|
package/src/lib/version.ts
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
// tool set (minus the intentional pre-auth signup tools that only this stdio
|
|
6
6
|
// package exposes). `npm run check:mcp-parity` enforces both the version match
|
|
7
7
|
// and the tool-list match, and runs in the pre-commit hook.
|
|
8
|
-
export const POSTERLY_MCP_VERSION = '0.43.
|
|
8
|
+
export const POSTERLY_MCP_VERSION = '0.43.3';
|
|
@@ -35,7 +35,8 @@ export const getAgentSignupInfoTool = {
|
|
|
35
35
|
'- Do not narrate raw curl, HTTP, JSON, API keys, or implementation details unless the user explicitly asks for debugging.',
|
|
36
36
|
'',
|
|
37
37
|
'Boundaries:',
|
|
38
|
-
'- Payment
|
|
38
|
+
'- Payment happens on Stripe Checkout, either by the user in their browser or by the agent with its own approved payment credential (for example a Link agent wallet); never card details in chat.',
|
|
39
|
+
'- Where enabled, payment can instead be a one-time Link Agent Wallet virtual card (credential_type: card) on a prepaid PaymentIntent.',
|
|
39
40
|
'- Never send card numbers to posterly. Confirm the PaymentIntent with Stripe, or send checkout_redirect_url.',
|
|
40
41
|
'- The user sets their Posterly password in their browser.',
|
|
41
42
|
'- The user approves social OAuth in their browser.',
|
|
@@ -29,6 +29,7 @@ function formatSignupSession(session: PublicSignupSession, includeRaw: boolean):
|
|
|
29
29
|
const passwordUrl = stringFromRecord(session.links, 'password_setup_url');
|
|
30
30
|
const completeUrl = stringFromRecord(session.links, 'complete_url');
|
|
31
31
|
const agentPay = session.agent_pay;
|
|
32
|
+
const payment = session.payment;
|
|
32
33
|
|
|
33
34
|
const lines = [
|
|
34
35
|
`Posterly signup session: ${session.id}`,
|
|
@@ -42,6 +43,12 @@ function formatSignupSession(session: PublicSignupSession, includeRaw: boolean):
|
|
|
42
43
|
agentPay?.requires_tos_acceptance ? 'Terms acceptance required before client_secret is released.' : '',
|
|
43
44
|
agentPay?.client_secret ? `PaymentIntent client_secret: ${agentPay.client_secret}` : '',
|
|
44
45
|
agentPay?.confirm_url ? `Confirm URL: ${agentPay.confirm_url}` : '',
|
|
46
|
+
!agentPay?.enabled && payment?.amount_display
|
|
47
|
+
? `Amount due: ${payment.amount_display} ${String(payment.currency || 'usd').toUpperCase()} to ${payment.merchant_name || 'posterly'} (${payment.billing || 'subscription'})`
|
|
48
|
+
: '',
|
|
49
|
+
!agentPay?.enabled && payment?.agent_wallet?.how
|
|
50
|
+
? `Agent wallet option: ${payment.agent_wallet.how}`
|
|
51
|
+
: '',
|
|
45
52
|
checkoutRedirectUrl ? `Checkout handoff URL: ${checkoutRedirectUrl}` : '',
|
|
46
53
|
checkoutUrl ? `Checkout URL: ${checkoutUrl}` : '',
|
|
47
54
|
passwordUrl ? `Password setup URL: ${passwordUrl}` : '',
|
|
@@ -74,7 +81,7 @@ function guidanceForStatus(status: string, agentPayAvailable = false, requiresTo
|
|
|
74
81
|
}
|
|
75
82
|
return agentPayAvailable
|
|
76
83
|
? 'Payment is still pending. Confirm the prepaid PaymentIntent with a Link virtual card (credential_type: card), or send the user the Checkout handoff URL. Keep polling; never ask for card numbers.'
|
|
77
|
-
: 'Tell the user checkout is still pending.
|
|
84
|
+
: 'Tell the user checkout is still pending. If you hold an approved payment credential such as a Link agent wallet, you may pay the Checkout handoff URL yourself instead of asking the user; otherwise keep polling. Never ask for card details.';
|
|
78
85
|
case 'checkout_expired':
|
|
79
86
|
return 'Tell the user checkout expired and offer to call start_signup again.';
|
|
80
87
|
case 'payment_confirmed':
|
|
@@ -91,6 +91,7 @@ function formatSignupStart(response: PublicSignupResponse, includeRaw: boolean):
|
|
|
91
91
|
const status = session?.status || response.status || 'checkout_pending';
|
|
92
92
|
const message = session?.status_message || response.status_message;
|
|
93
93
|
const agentPay = response.agent_pay || session?.agent_pay;
|
|
94
|
+
const payment = response.payment || session?.payment;
|
|
94
95
|
|
|
95
96
|
const lines = [
|
|
96
97
|
'Posterly signup started.',
|
|
@@ -105,6 +106,12 @@ function formatSignupStart(response: PublicSignupResponse, includeRaw: boolean):
|
|
|
105
106
|
agentPay?.client_secret ? `PaymentIntent client_secret: ${agentPay.client_secret}` : '',
|
|
106
107
|
agentPay?.confirm_url ? `Confirm URL: ${agentPay.confirm_url}` : '',
|
|
107
108
|
agentPay?.pay_instructions ? `Pay instructions: ${agentPay.pay_instructions}` : '',
|
|
109
|
+
!agentPay?.enabled && payment?.amount_display
|
|
110
|
+
? `Amount due: ${payment.amount_display} ${String(payment.currency || 'usd').toUpperCase()} to ${payment.merchant_name || 'posterly'} (${payment.billing || 'subscription'})`
|
|
111
|
+
: '',
|
|
112
|
+
!agentPay?.enabled && payment?.agent_wallet?.how
|
|
113
|
+
? `Agent wallet option: ${payment.agent_wallet.how}`
|
|
114
|
+
: '',
|
|
108
115
|
checkoutRedirectUrl ? `Checkout handoff URL (browser fallback): ${checkoutRedirectUrl}` : '',
|
|
109
116
|
checkoutUrl ? `Checkout URL: ${checkoutUrl}` : '',
|
|
110
117
|
pollUrl ? `Poll URL: ${pollUrl}` : '',
|
|
@@ -129,11 +136,12 @@ function formatSignupStart(response: PublicSignupResponse, includeRaw: boolean):
|
|
|
129
136
|
'6. Do not ask for card details, the Posterly password, social passwords, or OAuth codes.',
|
|
130
137
|
]
|
|
131
138
|
: [
|
|
132
|
-
'1.
|
|
133
|
-
'2.
|
|
134
|
-
'3.
|
|
135
|
-
'4.
|
|
136
|
-
'5.
|
|
139
|
+
'1. If you hold an approved payment credential such as a Link agent wallet, you can pay the Checkout handoff URL yourself: create a spend request for the amount and merchant above, get the user\'s approval in the wallet, then complete the Checkout page with that credential. Never paste card numbers into chat or send them to posterly.',
|
|
140
|
+
'2. Otherwise, send the Checkout handoff URL to the user so they can pay securely in their browser. Use the raw Stripe checkout URL only if you preserve the full URL including any fragment. posterly does not email this link, so do not tell the user to check their inbox at this stage.',
|
|
141
|
+
'3. Call get_signup_session with the signup session ID until the status changes.',
|
|
142
|
+
'4. Tell the user when Posterly sends the password setup email.',
|
|
143
|
+
'5. If status becomes agent_access_required, ask the user to install or paste the Posterly MCP/API setup instructions into this trusted AI chat, then onboard them in this conversation (about you, connect, brand voice, first post). Do not send them to /onboarding-v2.',
|
|
144
|
+
'6. Do not ask for card details, the Posterly password, social passwords, or OAuth codes.',
|
|
137
145
|
]),
|
|
138
146
|
includeRaw ? `\nRaw signup response:\n${JSON.stringify(response, null, 2)}` : '',
|
|
139
147
|
];
|