@extenshi/mcp 0.14.1 → 0.16.0
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 +15 -2
- package/dist/bff.d.ts +39 -0
- package/dist/bff.d.ts.map +1 -1
- package/dist/bff.js +7 -0
- package/dist/bff.js.map +1 -1
- package/dist/development-guide.d.ts +35 -30
- package/dist/development-guide.d.ts.map +1 -1
- package/dist/development-guide.js +45 -11
- package/dist/development-guide.js.map +1 -1
- package/dist/landing-workflow.js +2 -2
- package/dist/landing-workflow.js.map +1 -1
- package/dist/license-terms-tools.d.ts +3 -1
- package/dist/license-terms-tools.d.ts.map +1 -1
- package/dist/license-terms-tools.js +175 -1
- package/dist/license-terms-tools.js.map +1 -1
- package/dist/pay.d.ts +1 -1
- package/dist/pay.d.ts.map +1 -1
- package/dist/pay.js +4 -4
- package/dist/pay.js.map +1 -1
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +64 -9
- package/dist/tools.js.map +1 -1
- package/dist/uninstall-form-tools.d.ts.map +1 -1
- package/dist/uninstall-form-tools.js +2 -1
- package/dist/uninstall-form-tools.js.map +1 -1
- package/package.json +1 -1
package/dist/landing-workflow.js
CHANGED
|
@@ -66,7 +66,7 @@ export function landingNextSteps(homepageUrl) {
|
|
|
66
66
|
? `Confirm the page loads at ${homepageUrl} (the canonical/og:url tags already point there).`
|
|
67
67
|
: 'Once the final URL is known, regenerate with homepageUrl set to it so the canonical, og:url and JSON-LD url tags are filled in, and re-upload.',
|
|
68
68
|
'Register the URL on the project: upsert_hosted_page {projectId, kind: "homepage", url} (needs identity and hosted.write; the server fetches the public page and hashes it, so it has to be publicly reachable). CLI equivalent: npx @extenshi/cli@latest page register --project <id> --url <https-url>.',
|
|
69
|
-
'get_project_state now returns a regenerated integration.file (the content for integration.path) that carries the new HOMEPAGE_URL; updating the repository with
|
|
69
|
+
'get_project_state now returns a regenerated integration.file (the content for integration.path) that carries the new HOMEPAGE_URL, and manifests whose homepage_url is the same URL; updating the repository with them is the author’s choice.',
|
|
70
70
|
'After later edits to the hosted page, verify_hosted_artifact {projectId, kind: "homepage"} reports whether the live page still matches the registered hash.',
|
|
71
71
|
];
|
|
72
72
|
}
|
|
@@ -130,7 +130,7 @@ export function hostedLandingNextSteps(result) {
|
|
|
130
130
|
: [`Published at ${url}, not verified (this server does not check the public URL). ${verify}`];
|
|
131
131
|
steps.push(homepage.registered
|
|
132
132
|
? reachable
|
|
133
|
-
? 'It is now the project homepage. get_project_state returns an integration.file (the content for integration.path) that uses it as HOMEPAGE_URL; the repository is updated with
|
|
133
|
+
? 'It is now the project homepage. get_project_state returns an integration.file (the content for integration.path) that uses it as HOMEPAGE_URL, and manifests that use it as homepage_url; the repository is updated with them only when the author wants that.'
|
|
134
134
|
: 'It is registered as the project homepage, but until the URL serves the page HOMEPAGE_URL would send users to an error; get_project_state returns an integration.file that carries that URL.'
|
|
135
135
|
: 'The homepage registration was left unchanged (registerAsHomepage: false).');
|
|
136
136
|
if (reachable)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"landing-workflow.js","sourceRoot":"","sources":["../src/landing-workflow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EACN,oBAAoB,EAGpB,kBAAkB,EAClB,mBAAmB,GACnB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAGN,mBAAmB,EACnB,oBAAoB,GACpB,MAAM,uBAAuB,CAAA;AAyC9B,MAAM,OAAO,GAAG;IACf,UAAU;IACV,QAAQ;IACR,KAAK;IACL,eAAe;IACf,SAAS;IACT,IAAI;IACJ,cAAc;IACd,UAAU;CACD,CAAA;AAEV,MAAM,UAAU,mBAAmB,CAAC,IAAqB;IACxD,MAAM,IAAI,GAAgB;QACzB,GAAG,oBAAoB;QACvB,aAAa,EAAE,IAAI,CAAC,aAAa;QACjC,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,EAAE;QAC3B,WAAW,EAAE,I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AAoD,QAAQ,CAAC,WAAW,GAAG,CAAC,CAAA;IACxF,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAA;IACtE,IAAI,QAAQ,CAAC,MAAM;QAClB,KAAK,CAAC,IAAI,CAAC,6EAA6E,CAAC,CAAA;IAC1F,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAE,MAAM,CAAC,OAA6C,CAAC,CAAC,CAAC,EAAE,CAAA;IAC1G,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;QACrB,KAAK,CAAC,IAAI,CAAC,iBAAiB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IACtF,IAAI,OAAO,MAAM,CAAC,UAAU,KAAK,QAAQ;QAAE,KAAK,CAAC,IAAI,CAAC,yBAAyB,MAAM,CAAC,UAAU,GAAG,CAAC,CAAA;IACpG,KAAK,CAAC,IAAI,CACT,wLAAwL,CACxL,CAAA;IACD,OAAO,KAAK,CAAA;AACb,CAAC"}
|
|
@@ -12,6 +12,8 @@ import type { FastMCPSessionAuth, Tool, ToolParameters } from 'fastmcp';
|
|
|
12
12
|
import type { Bff } from './bff.js';
|
|
13
13
|
import type { ToolCallContext } from './tools.js';
|
|
14
14
|
type AddTool = <P extends ToolParameters>(tool: Tool<FastMCPSessionAuth, P>) => void;
|
|
15
|
-
export declare function registerLicenseTermsTools(add: AddTool, bff: (context: ToolCallContext) => Bff, fail: (err: unknown) => never
|
|
15
|
+
export declare function registerLicenseTermsTools(add: AddTool, bff: (context: ToolCallContext) => Bff, fail: (err: unknown) => never, opts?: {
|
|
16
|
+
oauth?: boolean;
|
|
17
|
+
}): void;
|
|
16
18
|
export {};
|
|
17
19
|
//# sourceMappingURL=license-terms-tools.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"license-terms-tools.d.ts","sourceRoot":"","sources":["../src/license-terms-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAEvE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAEjD,KAAK,OAAO,GAAG,CAAC,CAAC,SAAS,cAAc,EAAE,IAAI,EAAE,IAAI,CAAC,kBAAkB,EAAE,CAAC,CAAC,KAAK,IAAI,CAAA;
|
|
1
|
+
{"version":3,"file":"license-terms-tools.d.ts","sourceRoot":"","sources":["../src/license-terms-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAEvE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAEjD,KAAK,OAAO,GAAG,CAAC,CAAC,SAAS,cAAc,EAAE,IAAI,EAAE,IAAI,CAAC,kBAAkB,EAAE,CAAC,CAAC,KAAK,IAAI,CAAA;AAUpF,wBAAgB,yBAAyB,CACxC,GAAG,EAAE,OAAO,EACZ,GAAG,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,GAAG,EACtC,IAAI,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,KAAK,EAC7B,IAAI,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO,GAC5B,IAAI,CA0NN"}
|
|
@@ -10,7 +10,12 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { z } from 'zod';
|
|
12
12
|
const READ_ONLY = { readOnlyHint: true, idempotentHint: true, destructiveHint: false, openWorldHint: true };
|
|
13
|
-
|
|
13
|
+
const projectId = z.string().uuid().describe('Pay application id (appId) or its linked project id.');
|
|
14
|
+
const draftHash = z
|
|
15
|
+
.string()
|
|
16
|
+
.regex(/^[0-9a-f]{64}$/)
|
|
17
|
+
.describe('draftHash from get_license_terms or save_license_terms_draft: the draft you reviewed.');
|
|
18
|
+
export function registerLicenseTermsTools(add, bff, fail, opts = {}) {
|
|
14
19
|
add({
|
|
15
20
|
name: 'get_license_terms_questionnaire',
|
|
16
21
|
description: 'The questions of the project\'s "License terms & refunds" questionnaire as data: field, question, ' +
|
|
@@ -52,5 +57,174 @@ export function registerLicenseTermsTools(add, bff, fail) {
|
|
|
52
57
|
}
|
|
53
58
|
},
|
|
54
59
|
});
|
|
60
|
+
// Saved terms, publication and checks (plan 2026-10-18 §4). Saved answers name the seller: pay.read.
|
|
61
|
+
add({
|
|
62
|
+
name: 'get_license_terms',
|
|
63
|
+
description: 'The saved license terms & refunds of a Pay application: status (none, draft, published, outdated), ' +
|
|
64
|
+
'the draft answers and text with its draftHash, the published version {versionNumber, url, ' +
|
|
65
|
+
'versionUrl, contentHash, effectiveDate}, every version, missingRequired (unanswered fields that ' +
|
|
66
|
+
'block publishing), ownerInputRequired (seller identity fields only the owner fills in Dojo) and ' +
|
|
67
|
+
'problems. Requires pay.read. FREE.',
|
|
68
|
+
parameters: z.object({ projectId }),
|
|
69
|
+
annotations: { title: 'Read the saved license terms', ...READ_ONLY },
|
|
70
|
+
execute: async (args, context) => {
|
|
71
|
+
try {
|
|
72
|
+
return JSON.stringify(await bff(context).getLicenseTerms(args));
|
|
73
|
+
}
|
|
74
|
+
catch (err) {
|
|
75
|
+
return fail(err);
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
add({
|
|
80
|
+
name: 'save_license_terms_draft',
|
|
81
|
+
description: 'Save answers to the license terms questionnaire as the draft (field names from ' +
|
|
82
|
+
'get_license_terms_questionnaire). The seller identity answers (sellerLegalName, sellerCountry, ' +
|
|
83
|
+
'sellerAddress, sellerRegistration) stay as the owner saved them: send them empty or unchanged; a ' +
|
|
84
|
+
'different value is refused (OWNER_INPUT_ONLY), and empty ones are listed in ownerInputRequired. A ' +
|
|
85
|
+
'draft the owner edited by hand in Dojo is refused (DRAFT_HAND_EDITED). dryRun: true returns the ' +
|
|
86
|
+
'preview without saving. expectedDraftHash refuses the save when the draft changed since you read it ' +
|
|
87
|
+
'(DRAFT_CHANGED); saving the same answers again is a no-op (unchanged: true). Returns {draftHash, ' +
|
|
88
|
+
'preview {markdown, html}, missingRequired, ownerInputRequired, problems, publishable}. Nothing is ' +
|
|
89
|
+
'published. Requires pay.write.',
|
|
90
|
+
parameters: z.object({
|
|
91
|
+
projectId,
|
|
92
|
+
answers: z.record(z.unknown()).describe('Every answer, keyed by questionnaire field.'),
|
|
93
|
+
expectedDraftHash: draftHash.optional(),
|
|
94
|
+
dryRun: z.boolean().optional(),
|
|
95
|
+
idempotencyKey: z.string().uuid().optional(),
|
|
96
|
+
}),
|
|
97
|
+
annotations: {
|
|
98
|
+
title: 'Save the license terms draft',
|
|
99
|
+
readOnlyHint: false,
|
|
100
|
+
idempotentHint: true,
|
|
101
|
+
destructiveHint: false,
|
|
102
|
+
openWorldHint: true,
|
|
103
|
+
},
|
|
104
|
+
execute: async ({ answers, ...args }, context) => {
|
|
105
|
+
try {
|
|
106
|
+
return JSON.stringify(await bff(context).saveLicenseTermsDraft({ ...args, input: answers }));
|
|
107
|
+
}
|
|
108
|
+
catch (err) {
|
|
109
|
+
return fail(err);
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
});
|
|
113
|
+
add({
|
|
114
|
+
name: 'request_license_terms_publication',
|
|
115
|
+
description: 'Ask the owner to publish the draft with this draftHash. Returns {status: pending_approval, ' +
|
|
116
|
+
'approvalId, approvalUrl, expiresAt}: nothing is published until the owner approves it in Dojo, ' +
|
|
117
|
+
'where they see the text against the live version; get_approval returns the outcome (result ' +
|
|
118
|
+
"{versionNumber, url, sellerTermsDecided}). With alsoDecideSellerTerms (default true) the owner's " +
|
|
119
|
+
'approval also decides seller.terms as the published URL. Refused straight away when the draft ' +
|
|
120
|
+
'changed or has open questions. `followUps` names the sections and answers this version would leave ' +
|
|
121
|
+
'untranslated in the project languages (set_legal_translations, after approval). Requires pay.write.',
|
|
122
|
+
parameters: z.object({ projectId, draftHash, alsoDecideSellerTerms: z.boolean().optional() }),
|
|
123
|
+
annotations: {
|
|
124
|
+
title: 'Ask the owner to publish the license terms',
|
|
125
|
+
readOnlyHint: false,
|
|
126
|
+
idempotentHint: true,
|
|
127
|
+
destructiveHint: false,
|
|
128
|
+
openWorldHint: true,
|
|
129
|
+
},
|
|
130
|
+
execute: async (args, context) => {
|
|
131
|
+
try {
|
|
132
|
+
return JSON.stringify(await bff(context).requestLicenseTermsPublication(args));
|
|
133
|
+
}
|
|
134
|
+
catch (err) {
|
|
135
|
+
return fail(err);
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
});
|
|
139
|
+
// A direct publish exists only for a developer key the owner granted pay.legal.publish; the connector has none.
|
|
140
|
+
if (!opts.oauth)
|
|
141
|
+
add({
|
|
142
|
+
name: 'publish_license_terms',
|
|
143
|
+
description: 'Publish the draft with this draftHash as a new version of the public license terms page, without ' +
|
|
144
|
+
'an approval step. Needs an API key with the separate pay.legal.publish permission (granted at ' +
|
|
145
|
+
'dojo.extenshi.io/api-keys); otherwise PAY_LEGAL_PUBLISH_REQUIRED, and ' +
|
|
146
|
+
'request_license_terms_publication asks the owner instead. Returns {versionNumber, url, versionUrl, ' +
|
|
147
|
+
'contentHash, sellerTerms, followUps}; seller.terms is proposed as the URL for the owner to decide; ' +
|
|
148
|
+
'followUps names what to translate next with set_legal_translations. Changes ' +
|
|
149
|
+
'the page buyers read before they pay. Requires pay.write and pay.legal.publish.',
|
|
150
|
+
parameters: z.object({ projectId, draftHash }),
|
|
151
|
+
annotations: {
|
|
152
|
+
title: 'Publish the license terms',
|
|
153
|
+
readOnlyHint: false,
|
|
154
|
+
idempotentHint: false,
|
|
155
|
+
destructiveHint: true,
|
|
156
|
+
openWorldHint: true,
|
|
157
|
+
},
|
|
158
|
+
execute: async (args, context) => {
|
|
159
|
+
try {
|
|
160
|
+
return JSON.stringify(await bff(context).publishLicenseTerms(args));
|
|
161
|
+
}
|
|
162
|
+
catch (err) {
|
|
163
|
+
return fail(err);
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
});
|
|
167
|
+
add({
|
|
168
|
+
name: 'verify_license_terms_live',
|
|
169
|
+
description: 'Check that the published license terms are what buyers get: {ok, url, versionNumber, checks [{id, ' +
|
|
170
|
+
'ok, detail}]} for published, content_hash (stored text matches its hash), page_reachable, ' +
|
|
171
|
+
'page_serves_version (the public page shows this version), paywall_links (the paywall links ' +
|
|
172
|
+
'"License terms" and "Refund policy" to it) and seller_terms_decision (seller.terms is decided as ' +
|
|
173
|
+
'this URL). A failed check is a result, not an error. Requires project.read. FREE.',
|
|
174
|
+
parameters: z.object({ projectId }),
|
|
175
|
+
annotations: { title: 'Verify the live license terms', ...READ_ONLY },
|
|
176
|
+
execute: async (args, context) => {
|
|
177
|
+
try {
|
|
178
|
+
return JSON.stringify(await bff(context).verifyLicenseTermsLive(args));
|
|
179
|
+
}
|
|
180
|
+
catch (err) {
|
|
181
|
+
return fail(err);
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
});
|
|
185
|
+
add({
|
|
186
|
+
name: 'rollback_license_terms',
|
|
187
|
+
description: 'Bring back an earlier version of the license terms: its text becomes the draft, then it is ' +
|
|
188
|
+
'published as a new version (history stays). mode request (default) asks the owner exactly like ' +
|
|
189
|
+
'request_license_terms_publication and returns pending_approval; mode publish publishes directly ' +
|
|
190
|
+
'and needs an API key with pay.legal.publish. Returns {restored {draftHash, restoredFrom}, ' +
|
|
191
|
+
'publication}. Requires pay.write.',
|
|
192
|
+
parameters: z.object({
|
|
193
|
+
projectId,
|
|
194
|
+
versionNumber: z.number().int().positive().describe('From get_license_terms versions.'),
|
|
195
|
+
mode: z.enum(opts.oauth ? ['request'] : ['request', 'publish']).optional(),
|
|
196
|
+
alsoDecideSellerTerms: z.boolean().optional(),
|
|
197
|
+
}),
|
|
198
|
+
annotations: {
|
|
199
|
+
title: 'Restore an earlier license terms version',
|
|
200
|
+
readOnlyHint: false,
|
|
201
|
+
idempotentHint: false,
|
|
202
|
+
destructiveHint: false,
|
|
203
|
+
openWorldHint: true,
|
|
204
|
+
},
|
|
205
|
+
execute: async ({ mode, alsoDecideSellerTerms, ...args }, context) => {
|
|
206
|
+
try {
|
|
207
|
+
const client = bff(context);
|
|
208
|
+
// Check the direct-publish permission before the draft is replaced, so a refusal changes nothing.
|
|
209
|
+
if (mode === 'publish') {
|
|
210
|
+
const diagnostics = (await client.connectionDiagnostics());
|
|
211
|
+
if (!diagnostics.scopes?.includes('pay.legal.publish'))
|
|
212
|
+
return fail(new Error('PAY_LEGAL_PUBLISH_REQUIRED: this key cannot publish license terms directly; nothing was changed. Use mode request, or grant pay.legal.publish at dojo.extenshi.io/api-keys.'));
|
|
213
|
+
}
|
|
214
|
+
const restored = (await client.restoreLicenseTermsVersion(args));
|
|
215
|
+
const publication = mode === 'publish'
|
|
216
|
+
? await client.publishLicenseTerms({ projectId: args.projectId, draftHash: restored.draftHash })
|
|
217
|
+
: await client.requestLicenseTermsPublication({
|
|
218
|
+
projectId: args.projectId,
|
|
219
|
+
draftHash: restored.draftHash,
|
|
220
|
+
...(alsoDecideSellerTerms === undefined ? {} : { alsoDecideSellerTerms }),
|
|
221
|
+
});
|
|
222
|
+
return JSON.stringify({ restored, publication });
|
|
223
|
+
}
|
|
224
|
+
catch (err) {
|
|
225
|
+
return fail(err);
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
});
|
|
55
229
|
}
|
|
56
230
|
//# sourceMappingURL=license-terms-tools.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"license-terms-tools.js","sourceRoot":"","sources":["../src/license-terms-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAMvB,MAAM,SAAS,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,CAAA;AAE3G,MAAM,UAAU,yBAAyB,CACxC,GAAY,EACZ,GAAsC,EACtC,IAA6B;
|
|
1
|
+
{"version":3,"file":"license-terms-tools.js","sourceRoot":"","sources":["../src/license-terms-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAMvB,MAAM,SAAS,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,CAAA;AAE3G,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,sDAAsD,CAAC,CAAA;AACpG,MAAM,SAAS,GAAG,CAAC;KACjB,MAAM,EAAE;KACR,KAAK,CAAC,gBAAgB,CAAC;KACvB,QAAQ,CAAC,uFAAuF,CAAC,CAAA;AAEnG,MAAM,UAAU,yBAAyB,CACxC,GAAY,EACZ,GAAsC,EACtC,IAA6B,EAC7B,OAA4B,EAAE;IAE9B,GAAG,CAAC;QACH,IAAI,EAAE,iCAAiC;QACvC,WAAW,EACV,oGAAoG;YACpG,iGAAiG;YACjG,oGAAoG;YACpG,kEAAkE;QACnE,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC;QACtD,WAAW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AK,SAAS;oBACjB,CAAC,CAAC,MAAM,MAAM,CAAC,mBAAmB,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,CAAC,SAAS,EAAE,CAAC;oBAChG,CAAC,CAAC,MAAM,MAAM,CAAC,8BAA8B,CAAC;wBAC5C,SAAS,EAAE,IAAI,CAAC,SAAS;wBACzB,SAAS,EAAE,QAAQ,CAAC,SAAS;wBAC7B,GAAG,CAAC,qBAAqB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,qBAAqB,EAAE,CAAC;qBACzE,CAAC,CAAA;gBACL,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC,CAAA;YACjD,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACd,OAAO,IAAI,CAAC,GAAG,CAAC,CAAA;YACjB,CAAC;QACF,CAAC;KACD,CAAC,CAAA;AACH,CAAC"}
|
package/dist/pay.d.ts
CHANGED
|
@@ -239,7 +239,7 @@ export type PayMethod = keyof typeof paySchemas;
|
|
|
239
239
|
export type PayBff = {
|
|
240
240
|
[M in PayMethod]: (input: z.infer<(typeof paySchemas)[M]>) => Promise<unknown>;
|
|
241
241
|
};
|
|
242
|
-
export declare const PAY_OPERATIONS: readonly [readonly ["listPayApps", "list_pay_apps", "list", "payApp.list", false, "List your independent Pay applications. No development project required. Paginated: nextCursor is set while more results exist."], readonly ["createPayApp", "create_pay_app", "create", "payApp.create", true, "Create an independent Pay application; linking a development project is optional. Not idempotent: each call creates a new application, including a call repeated after a timeout."], readonly ["getPayApp", "get_pay_app", "get", "payApp.get", false, "Read your Pay application and optional project link."], readonly ["getPayReadiness", "get_pay_readiness", "readiness", "payApp.readiness", false, "Check current checkout and launch prerequisites. A passing checkout check does not prove a live external purchase or SDK publication."], readonly ["getPayPaymentEvidence", "get_pay_payment_evidence", "payment-evidence", "payApp.paymentEvidence", false, "Read what Extenshi's own payment ledger proves about this application's payment path, per mode: checkout completed, license issued, an installation received the signed license, restored on a second installation, refund revoked. Derived from provider-signed webhooks, not from any report; opaque IDs and timestamps only, no buyer data. Only a live-mode purchase can satisfy a release's payment requirement; test-mode purchases are listed without satisfying it."], readonly ["linkPayApp", "link_pay_app", "link", "payApp.link", true, "Link your Pay application to your development project. Existing purchases remain attached to the Pay application."], readonly ["unlinkPayApp", "unlink_pay_app", "unlink", "payApp.unlink", true, "Remove the optional development-project link without deleting Pay data."], readonly ["archivePayApp", "archive_pay_app", "archive", "payApp.archive", true, "Archive your application and stop new checkout. Payment records and existing entitlements are preserved."], readonly ["exportPayData", "export_pay_data", "export", "payApp.export", false, "Export one page of one resource (offers, payments, subscriptions, entitlements or customers). nextCursor is null on the last page. The output contains sensitive customer and payment data."], readonly ["getPaySeller", "get_pay_seller", "seller", "paySeller.get", false, "Read seller connection, public profile, offers, the publishable SDK key and the public entitlement verification key. Those two keys are the ones meant to be embedded in extension code; secret keys are not part of the response. Agreement signing and KYC take place in the browser."], readonly ["connectPaySeller", "connect_pay_seller", "connect", "paySeller.connect", true, "Start Stripe Connect onboarding and return a browser action URL. KYC and legal acceptance are completed by the author at that URL; this tool does not perform them."], readonly ["refreshPaySeller", "refresh_pay_seller", "refresh", "paySeller.refreshStatus", true, "Refresh current payment-provider onboarding status. This does not complete KYC or accept agreements."], readonly ["setPaySellerProfile", "set_pay_seller_profile", "profile", "paySeller.setPublicProfile", true, "Save the public seller profile: display name, support URL or email, and terms URL. The values are stored as provided and are publicly visible."], readonly ["upsertPayOffer", "upsert_pay_offer", "offer-upsert", "paySeller.upsertOffer", true, "Create or update an offer keyed by a stable SKU. Price is in minor currency units. Subscriptions keep the given billing interval; one-time and lifetime offers store no interval. Price and features are stored as provided."], readonly ["archivePayOffer", "archive_pay_offer", "offer-archive", "paySeller.archiveOffer", true, "Stop offering a SKU for new checkout; historical purchases are preserved."], readonly ["getPayOfferTranslations", "get_pay_offer_translations", "offer-translations", "paySeller.getOfferTranslations", false, "Read the translatable text of the application's active offers (title, description
|
|
242
|
+
export declare const PAY_OPERATIONS: readonly [readonly ["listPayApps", "list_pay_apps", "list", "payApp.list", false, "List your independent Pay applications. No development project required. Paginated: nextCursor is set while more results exist."], readonly ["createPayApp", "create_pay_app", "create", "payApp.create", true, "Create an independent Pay application; linking a development project is optional. Not idempotent: each call creates a new application, including a call repeated after a timeout."], readonly ["getPayApp", "get_pay_app", "get", "payApp.get", false, "Read your Pay application and optional project link."], readonly ["getPayReadiness", "get_pay_readiness", "readiness", "payApp.readiness", false, "Check current checkout and launch prerequisites. A passing checkout check does not prove a live external purchase or SDK publication. `warnings` are non-blocking (`ready` ignores them): offer_translations lists offer text not yet translated into the project's languages, with counts per language and fixWith (get_pay_offer_translations → set_pay_offer_translations)."], readonly ["getPayPaymentEvidence", "get_pay_payment_evidence", "payment-evidence", "payApp.paymentEvidence", false, "Read what Extenshi's own payment ledger proves about this application's payment path, per mode: checkout completed, license issued, an installation received the signed license, restored on a second installation, refund revoked. Derived from provider-signed webhooks, not from any report; opaque IDs and timestamps only, no buyer data. Only a live-mode purchase can satisfy a release's payment requirement; test-mode purchases are listed without satisfying it."], readonly ["linkPayApp", "link_pay_app", "link", "payApp.link", true, "Link your Pay application to your development project. Existing purchases remain attached to the Pay application."], readonly ["unlinkPayApp", "unlink_pay_app", "unlink", "payApp.unlink", true, "Remove the optional development-project link without deleting Pay data."], readonly ["archivePayApp", "archive_pay_app", "archive", "payApp.archive", true, "Archive your application and stop new checkout. Payment records and existing entitlements are preserved."], readonly ["exportPayData", "export_pay_data", "export", "payApp.export", false, "Export one page of one resource (offers, payments, subscriptions, entitlements or customers). nextCursor is null on the last page. The output contains sensitive customer and payment data."], readonly ["getPaySeller", "get_pay_seller", "seller", "paySeller.get", false, "Read seller connection, public profile, offers, the publishable SDK key and the public entitlement verification key. Those two keys are the ones meant to be embedded in extension code; secret keys are not part of the response. Agreement signing and KYC take place in the browser."], readonly ["connectPaySeller", "connect_pay_seller", "connect", "paySeller.connect", true, "Start Stripe Connect onboarding and return a browser action URL. KYC and legal acceptance are completed by the author at that URL; this tool does not perform them."], readonly ["refreshPaySeller", "refresh_pay_seller", "refresh", "paySeller.refreshStatus", true, "Refresh current payment-provider onboarding status. This does not complete KYC or accept agreements."], readonly ["setPaySellerProfile", "set_pay_seller_profile", "profile", "paySeller.setPublicProfile", true, "Save the public seller profile: display name, support URL or email, and terms URL. The values are stored as provided and are publicly visible."], readonly ["upsertPayOffer", "upsert_pay_offer", "offer-upsert", "paySeller.upsertOffer", true, "Create or update an offer keyed by a stable SKU. Price is in minor currency units. Subscriptions keep the given billing interval; one-time and lifetime offers store no interval. Price and features are stored as provided. `features` are entitlement keys (e.g. `full`): the SDK checks them with hasFeature and extensions match offers by them, so they stay untranslated; localized paywall bullets come from the extension, via showPaywall({ features }) with text from its _locales. `followUps` names the translations a changed title or description left missing or outdated (set_pay_offer_translations)."], readonly ["archivePayOffer", "archive_pay_offer", "offer-archive", "paySeller.archiveOffer", true, "Stop offering a SKU for new checkout; historical purchases are preserved."], readonly ["getPayOfferTranslations", "get_pay_offer_translations", "offer-translations", "paySeller.getOfferTranslations", false, "Read the translatable text of the application's active offers (title, description) keyed `<sku>/<field>`, with the project's languages and each language's translated, missing and outdated fields. Feature keys are entitlement keys, listed under `notTranslated` and not counted as missing. The paywall shows an offer in the buyer's browser language when the project ships it; the SDK's own buttons and labels are already translated. get_project_state `localization` summarizes this with every other translated surface."], readonly ["setPayOfferTranslations", "set_pay_offer_translations", "offer-translate", "paySeller.setOfferTranslations", true, "Save one language of the offers' translations: `translations` maps `<sku>/<field>` keys from get_pay_offer_translations to text; `sources` (optional) carries the original each was translated from, and a save whose original has changed since is refused. An empty string removes a translation; a `<sku>/feature:<n>` key is refused (TRANSLATIONS_INVALID: features are entitlement keys). Prices, SKUs, plans and feature keys are not changed."], readonly ["setPayEnabled", "set_pay_enabled", "enable", "paySeller.setEnabled", true, "Enable or disable new payments for the application; requires a connected payment provider. Enabling re-reads the seller status from the provider (charges and payouts). It does not verify the public profile, agreement or offer sync: buyers can check out only when every readiness check reported by get_pay_readiness passes. Enabling is a live commerce change."], readonly ["rotatePayKey", "rotate_pay_key", "rotate-key", "paySeller.rotatePublishableKey", true, "Generate a new publishable SDK key. Not idempotent: each call issues another key. Prior keys remain accepted for installed extension builds; this does not revoke any secret."]];
|
|
243
243
|
/** The legacy seller API uses projectId as the payment namespace. Never substitute a linked project ID. */
|
|
244
244
|
export declare function payWireInput(method: PayMethod, input: Record<string, unknown>): Record<string, unknown>;
|
|
245
245
|
//# sourceMappingURL=pay.d.ts.map
|
package/dist/pay.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pay.d.ts","sourceRoot":"","sources":["../src/pay.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAavB,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0Db,CAAA;AACV,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,UAAU,CAAA;AAC/C,MAAM,MAAM,MAAM,GAAG;KAAG,CAAC,IAAI,SAAS,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC;CAAE,CAAA;AACvG,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"pay.d.ts","sourceRoot":"","sources":["../src/pay.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAavB,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0Db,CAAA;AACV,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,UAAU,CAAA;AAC/C,MAAM,MAAM,MAAM,GAAG;KAAG,CAAC,IAAI,SAAS,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC;CAAE,CAAA;AACvG,eAAO,MAAM,cAAc,6rMAyJjB,CAAA;AAEV,2GAA2G;AAC3G,wBAAgB,YAAY,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAIvG"}
|
package/dist/pay.js
CHANGED
|
@@ -101,7 +101,7 @@ export const PAY_OPERATIONS = [
|
|
|
101
101
|
'readiness',
|
|
102
102
|
'payApp.readiness',
|
|
103
103
|
false,
|
|
104
|
-
|
|
104
|
+
"Check current checkout and launch prerequisites. A passing checkout check does not prove a live external purchase or SDK publication. `warnings` are non-blocking (`ready` ignores them): offer_translations lists offer text not yet translated into the project's languages, with counts per language and fixWith (get_pay_offer_translations → set_pay_offer_translations).",
|
|
105
105
|
],
|
|
106
106
|
[
|
|
107
107
|
'getPayPaymentEvidence',
|
|
@@ -181,7 +181,7 @@ export const PAY_OPERATIONS = [
|
|
|
181
181
|
'offer-upsert',
|
|
182
182
|
'paySeller.upsertOffer',
|
|
183
183
|
true,
|
|
184
|
-
'Create or update an offer keyed by a stable SKU. Price is in minor currency units. Subscriptions keep the given billing interval; one-time and lifetime offers store no interval. Price and features are stored as provided.',
|
|
184
|
+
'Create or update an offer keyed by a stable SKU. Price is in minor currency units. Subscriptions keep the given billing interval; one-time and lifetime offers store no interval. Price and features are stored as provided. `features` are entitlement keys (e.g. `full`): the SDK checks them with hasFeature and extensions match offers by them, so they stay untranslated; localized paywall bullets come from the extension, via showPaywall({ features }) with text from its _locales. `followUps` names the translations a changed title or description left missing or outdated (set_pay_offer_translations).',
|
|
185
185
|
],
|
|
186
186
|
[
|
|
187
187
|
'archivePayOffer',
|
|
@@ -197,7 +197,7 @@ export const PAY_OPERATIONS = [
|
|
|
197
197
|
'offer-translations',
|
|
198
198
|
'paySeller.getOfferTranslations',
|
|
199
199
|
false,
|
|
200
|
-
"Read the translatable text of the application's active offers (title, description
|
|
200
|
+
"Read the translatable text of the application's active offers (title, description) keyed `<sku>/<field>`, with the project's languages and each language's translated, missing and outdated fields. Feature keys are entitlement keys, listed under `notTranslated` and not counted as missing. The paywall shows an offer in the buyer's browser language when the project ships it; the SDK's own buttons and labels are already translated. get_project_state `localization` summarizes this with every other translated surface.",
|
|
201
201
|
],
|
|
202
202
|
[
|
|
203
203
|
'setPayOfferTranslations',
|
|
@@ -205,7 +205,7 @@ export const PAY_OPERATIONS = [
|
|
|
205
205
|
'offer-translate',
|
|
206
206
|
'paySeller.setOfferTranslations',
|
|
207
207
|
true,
|
|
208
|
-
"Save one language of the offers' translations: `translations` maps `<sku>/<field>` keys from get_pay_offer_translations to text; `sources` (optional) carries the original each was translated from, and a save whose original has changed since is refused. An empty string removes a translation. Prices, SKUs and
|
|
208
|
+
"Save one language of the offers' translations: `translations` maps `<sku>/<field>` keys from get_pay_offer_translations to text; `sources` (optional) carries the original each was translated from, and a save whose original has changed since is refused. An empty string removes a translation; a `<sku>/feature:<n>` key is refused (TRANSLATIONS_INVALID: features are entitlement keys). Prices, SKUs, plans and feature keys are not changed.",
|
|
209
209
|
],
|
|
210
210
|
[
|
|
211
211
|
'setPayEnabled',
|
package/dist/pay.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pay.js","sourceRoot":"","sources":["../src/pay.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,GAAG,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAA;AAC3D,MAAM,GAAG,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAA;AAC1D,MAAM,SAAS,GAAG,CAAC;KACjB,MAAM,EAAE;KACR,IAAI,EAAE;KACN,GAAG,CAAC,IAAI,CAAC;KACT,GAAG,EAAE;KACL,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE;IACjB,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,CAAA;IAC1B,OAAO,GAAG,CAAC,QAAQ,KAAK,QAAQ,IAAI,CAAC,GAAG,CAAC,QAAQ,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAA;AACnE,CAAC,EAAE,sCAAsC,CAAC,CAAA;AAC3C,MAAM,CAAC,MAAM,UAAU,GAAG;IACzB,WAAW,EAAE,CAAC;SACZ,MAAM,CAAC;QACP,eAAe,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;QACvC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;QACpC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CA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;;GAKG;AACH,MAAM,WAAW,eAAe;IAC/B,OAAO,CAAC,EAAE,kBAAkB,CAAA;IAC5B,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,QAAQ;IACxB,kEAAkE;IAClE,GAAG,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAA;IACzD,+BAA+B;IAC/B,YAAY,EAAE,WAAW,CAAC,UAAU,CAAC,CAAA;IACrC;;;;;OAKG;IACH,MAAM,EAAE,CAAC,GAAG,EAAE,eAAe,KAAK,GAAG,CAAA;IACrC;;;;;OAKG;IACH,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,eAAe,KAAK,MAAM,CAAA;IAChD;;;;OAIG;IACH,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,eAAe,KAAK,MAAM,GAAG,SAAS,CAAA;IACxD;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,qFAAqF;IACrF,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAC1B;AAiFD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,GAAE,MAA2B,GAAG,OAAO,CAGxF;AAquBD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,GAAG,IAAI,CA+1DnE"}
|
package/dist/tools.js
CHANGED
|
@@ -115,6 +115,21 @@ export const SERVER_INSTRUCTIONS = "Extenshi covers browser-extension developmen
|
|
|
115
115
|
'agreement acceptance and KYC take place in the browser, and only the publishable SDK key and the public verification key belong in extension code. ' +
|
|
116
116
|
'Hosted privacy-policy tools need a Pro project: publish_privacy_policy puts a policy on the live public page, update_privacy_policy_with_ai returns a proposal only. ' +
|
|
117
117
|
'Registered tools are not proof of account entitlements or a completed release.';
|
|
118
|
+
/**
|
|
119
|
+
* What happens to a payments or live-policy change made through the hosted connector (the owner approves it in
|
|
120
|
+
* Dojo). A statement of fact, only for the OAuth transport: an `ek_` key acts directly.
|
|
121
|
+
*/
|
|
122
|
+
const CONNECTOR_APPROVAL_FACT = 'Through this connector, payment, policy-publish and legal-translation changes are proposals; the owner approves them in Dojo, and get_approval returns the outcome.';
|
|
123
|
+
/** Appended to the descriptions of the tools whose connector call is a proposal, never an immediate change. */
|
|
124
|
+
const APPROVAL_NOTE = ' On the hosted connector the response is status pending_approval with an approvalId and approvalUrl, and nothing changes until the owner approves it in Dojo; get_approval returns the outcome.';
|
|
125
|
+
/** Pay tools whose hosted-connector call is proposed to the owner instead of applied. */
|
|
126
|
+
const APPROVAL_GATED_PAY = new Set([
|
|
127
|
+
'setPayEnabled',
|
|
128
|
+
'upsertPayOffer',
|
|
129
|
+
'archivePayApp',
|
|
130
|
+
'archivePayOffer',
|
|
131
|
+
'setPaySellerProfile',
|
|
132
|
+
]);
|
|
118
133
|
/** Match initialize instructions to the same capabilities used for registration. */
|
|
119
134
|
export function getServerInstructions(capabilities, auth = 'api-key') {
|
|
120
135
|
const local = [
|
|
@@ -125,7 +140,8 @@ export function getServerInstructions(capabilities, auth = 'api-key') {
|
|
|
125
140
|
(local.length
|
|
126
141
|
? ` This connection exposes ${local.join(' and ')} for local artifacts; they need valid credentials and publishing access.`
|
|
127
142
|
: ' This connection has no local artifact scan or store-publishing tool; the local stdio server and the CLI provide those stages.') +
|
|
128
|
-
(auth === 'api-key' ? ` API keys for the local package: ${KEY_PAGE}.` : '')
|
|
143
|
+
(auth === 'api-key' ? ` API keys for the local package: ${KEY_PAGE}.` : '') +
|
|
144
|
+
(auth === 'oauth' ? ` ${CONNECTOR_APPROVAL_FACT}` : ''));
|
|
129
145
|
}
|
|
130
146
|
// ── Internal helpers (ported from index.ts, now deps-parametrized) ───────────
|
|
131
147
|
/**
|
|
@@ -434,6 +450,12 @@ const TOOL_ANNOTATIONS = {
|
|
|
434
450
|
idempotentHint: true,
|
|
435
451
|
openWorldHint: true,
|
|
436
452
|
},
|
|
453
|
+
get_approval: {
|
|
454
|
+
title: 'Check a proposed change',
|
|
455
|
+
readOnlyHint: true,
|
|
456
|
+
idempotentHint: true,
|
|
457
|
+
openWorldHint: true,
|
|
458
|
+
},
|
|
437
459
|
get_development_guide: {
|
|
438
460
|
title: 'Extension development services and workflow',
|
|
439
461
|
readOnlyHint: true,
|
|
@@ -939,7 +961,7 @@ export function registerTools(server, deps) {
|
|
|
939
961
|
for (const [method, name, , , mutation, description] of PAY_OPERATIONS) {
|
|
940
962
|
add({
|
|
941
963
|
name,
|
|
942
|
-
description: `${description} Requires ${mutation ? 'pay.write' : 'pay.read'} permission.`,
|
|
964
|
+
description: `${description}${APPROVAL_GATED_PAY.has(method) ? APPROVAL_NOTE : ''} Requires ${mutation ? 'pay.write' : 'pay.read'} permission.`,
|
|
943
965
|
parameters: paySchemas[method],
|
|
944
966
|
annotations: {
|
|
945
967
|
readOnlyHint: !mutation,
|
|
@@ -1073,7 +1095,9 @@ export function registerTools(server, deps) {
|
|
|
1073
1095
|
'payment ledger proves (checkout, license, installation activation, recovery, refund). A live-mode purchase through ' +
|
|
1074
1096
|
"those stages passes the check with source 'platform'; test-mode purchases are listed without passing it. Clients cannot " +
|
|
1075
1097
|
"record source 'platform'. `warnings` lists what does not block but needs action before upload, such as a " +
|
|
1076
|
-
'decided license that is not an AMO slug and needs customLicense in the AMO listing
|
|
1098
|
+
'decided license that is not an AMO slug and needs customLicense in the AMO listing, and TRANSLATIONS_INCOMPLETE: ' +
|
|
1099
|
+
'server-side text (Pay offers, license terms, privacy policy, hosted pages, landing page) still missing or outdated ' +
|
|
1100
|
+
'in the project languages, each surface with its fixWith tools — the same counts as get_project_state `localization`.',
|
|
1077
1101
|
'getReleaseReadiness',
|
|
1078
1102
|
],
|
|
1079
1103
|
];
|
|
@@ -1234,7 +1258,8 @@ export function registerTools(server, deps) {
|
|
|
1234
1258
|
'may also be an inline SVG or a raster data: URL. After publishing, the server fetches the public URL: ' +
|
|
1235
1259
|
'live.status is verified (it serves these bytes), changed or unreachable (with live.detail, e.g. HTTP 404) — ' +
|
|
1236
1260
|
'only verified means visitors see the page. Returns JSON {url, publicCode, ' +
|
|
1237
|
-
'versionNumber, contentHash, bytes, warnings, homepage, live, nextSteps}
|
|
1261
|
+
'versionNumber, contentHash, bytes, warnings, homepage, live, nextSteps, followUps}; followUps names project languages ' +
|
|
1262
|
+
'the form has no locales.<tag> page for. Requires hosted.write. ' +
|
|
1238
1263
|
`API reference: ${HOSTED_PAGES_DOCS}`,
|
|
1239
1264
|
parameters: z.object({
|
|
1240
1265
|
projectId: z.string().uuid(),
|
|
@@ -1487,7 +1512,8 @@ export function registerTools(server, deps) {
|
|
|
1487
1512
|
'INSTRUCTIONS_INVALID and its field errors). Store URLs are the https listing links on ' +
|
|
1488
1513
|
'chromewebstore.google.com, addons.mozilla.org and microsoftedge.microsoft.com; browsers without one ' +
|
|
1489
1514
|
'are hidden unless none is set. The install steps are translated by Extenshi; `features` are ' +
|
|
1490
|
-
'translated with set_page_translations (surface instructions). Returns {publicCode, url}
|
|
1515
|
+
'translated with set_page_translations (surface instructions). Returns {publicCode, url, followUps}; ' +
|
|
1516
|
+
'followUps names the languages whose features translation is missing or outdated. Free. ' +
|
|
1491
1517
|
'Requires hosted.write.',
|
|
1492
1518
|
parameters: z.object({
|
|
1493
1519
|
projectId: z.string().uuid(),
|
|
@@ -1614,7 +1640,9 @@ export function registerTools(server, deps) {
|
|
|
1614
1640
|
'The server records which English text each translates, so a later edit marks it outdated; an ' +
|
|
1615
1641
|
'empty string removes one. Only the project’s languages are accepted (TRANSLATIONS_INVALID ' +
|
|
1616
1642
|
'otherwise). Nothing changes in the English original. privacy_policy needs hosted.write and a ' +
|
|
1617
|
-
'Pro project; license_terms needs pay.write.'
|
|
1643
|
+
'Pro project; license_terms needs pay.write. On the hosted connector, the texts are stored ' +
|
|
1644
|
+
'as a proposal (status pending_approval) and go live only when the owner approves them in Dojo; ' +
|
|
1645
|
+
'get_approval returns the outcome.',
|
|
1618
1646
|
parameters: z.object({
|
|
1619
1647
|
projectId: z.string().uuid(),
|
|
1620
1648
|
document: legalDocument,
|
|
@@ -1638,7 +1666,7 @@ export function registerTools(server, deps) {
|
|
|
1638
1666
|
},
|
|
1639
1667
|
});
|
|
1640
1668
|
// get_license_terms_questionnaire / draft_license_terms (project.read, read-only).
|
|
1641
|
-
registerLicenseTermsTools(add, bff, (err) => readError(err, missingKeyMessage));
|
|
1669
|
+
registerLicenseTermsTools(add, bff, (err) => readError(err, missingKeyMessage), { oauth });
|
|
1642
1670
|
// list/get/update/preview_uninstall_form + find_brand_mentions (project.read / hosted.write).
|
|
1643
1671
|
registerUninstallFormTools(add, bff, (err) => readError(err, missingKeyMessage));
|
|
1644
1672
|
// A local filesystem exists only where local artifacts do (stdio).
|
|
@@ -2089,6 +2117,24 @@ export function registerTools(server, deps) {
|
|
|
2089
2117
|
// being told it again in prose, and so what it builds matches what the
|
|
2090
2118
|
// developer already configured. Both are FREE: credits pay for catalog
|
|
2091
2119
|
// data about other people's extensions, never for your own work.
|
|
2120
|
+
add({
|
|
2121
|
+
name: 'get_approval',
|
|
2122
|
+
description: 'Report where a change proposed through the hosted connector stands: pending (waiting for the owner in Dojo), ' +
|
|
2123
|
+
'applying, applied, rejected, failed, expired or superseded, with a one-line summary and, once applied, the outcome. ' +
|
|
2124
|
+
'Takes the approvalId from a pending_approval response. Approving happens only in Dojo, by the owner; ' +
|
|
2125
|
+
'this tool only reads. FREE — spends no credit.',
|
|
2126
|
+
parameters: z.object({
|
|
2127
|
+
approvalId: z.string().uuid().describe('approvalId from a pending_approval response.'),
|
|
2128
|
+
}),
|
|
2129
|
+
execute: async (args, context) => {
|
|
2130
|
+
try {
|
|
2131
|
+
return JSON.stringify(await bff(context).getApproval(args), null, 2);
|
|
2132
|
+
}
|
|
2133
|
+
catch (err) {
|
|
2134
|
+
return readError(err, missingKeyMessage);
|
|
2135
|
+
}
|
|
2136
|
+
},
|
|
2137
|
+
});
|
|
2092
2138
|
add({
|
|
2093
2139
|
name: 'list_my_projects',
|
|
2094
2140
|
description: "List the extension projects owned by the signed-in Extenshi account — the developer's own workspaces on " +
|
|
@@ -2129,6 +2175,11 @@ export function registerTools(server, deps) {
|
|
|
2129
2175
|
'at most 20, each with the tool that fixes it; `total`, `truncated`) and a `warning` sentence — ' +
|
|
2130
2176
|
'find_brand_mentions with those names returns them all. License terms and Pay offers are ' +
|
|
2131
2177
|
'searched only with pay.read (otherwise listed in `skipped`). ' +
|
|
2178
|
+
'`localization` is every server-side translation the project still lacks: {defaultLocale, locales, complete, ' +
|
|
2179
|
+
'missing, outdated, next, surfaces [{kind (pay_offers | license_terms | privacy_policy | hosted_page | ' +
|
|
2180
|
+
'landing_page), name, missing, outdated, locales [{locale, total, missing, outdated}], fixWith {read, write, args}}]}; ' +
|
|
2181
|
+
'`next` is one sentence naming the largest gap and its tools. Pay surfaces need pay.read (otherwise `skipped`); ' +
|
|
2182
|
+
"the extension's own _locales files are not part of it (localize_workflow covers those). " +
|
|
2132
2183
|
'FREE — spends no credit. Type definitions are in list_extension_templates.',
|
|
2133
2184
|
parameters: z.object({
|
|
2134
2185
|
projectId: z.string().describe('Project id from list_my_projects.'),
|
|
@@ -2231,7 +2282,9 @@ export function registerTools(server, deps) {
|
|
|
2231
2282
|
'Without bodyMarkdown it generates the policy from the saved form and manifest (the first ' +
|
|
2232
2283
|
'version is produced this way); with bodyMarkdown it publishes that edited (or AI-updated) ' +
|
|
2233
2284
|
'draft at the same public URL. Once published, PRIVACY_POLICY_URL in the integration.file ' +
|
|
2234
|
-
'from get_project_state is the hosted URL. Pro only.'
|
|
2285
|
+
'from get_project_state is the hosted URL. Pro only.' +
|
|
2286
|
+
' On the hosted connector the text (generated now when bodyMarkdown is omitted) is stored as a proposal and shown to the owner in Dojo; nothing is published until they approve it, and get_approval returns the outcome.' +
|
|
2287
|
+
' `followUps` [{tool, readFirst, args, reason}] names the translations the new version leaves missing or outdated (set_legal_translations).',
|
|
2235
2288
|
parameters: z.object({
|
|
2236
2289
|
projectId: z.string().describe('Project id from list_my_projects.'),
|
|
2237
2290
|
bodyMarkdown: z
|
|
@@ -2344,7 +2397,9 @@ export function registerTools(server, deps) {
|
|
|
2344
2397
|
'_locales messages, translate with your own coding agent, apply validated translations ' +
|
|
2345
2398
|
'and check placeholders, protected terms and listing risks. Returns commands and the ' +
|
|
2346
2399
|
'JSON handoff contract. Static guidance only: no API key, network or Extenshi credits; ' +
|
|
2347
|
-
'translation uses your agent provider. Includes release availability and human review gates.'
|
|
2400
|
+
'translation uses your agent provider. Includes release availability and human review gates. ' +
|
|
2401
|
+
'Covers only the local _locales files: text stored on Extenshi (Pay offers, license terms, ' +
|
|
2402
|
+
'privacy policy, hosted pages, landing page) is listed in get_project_state `localization`.',
|
|
2348
2403
|
parameters: z.object({}),
|
|
2349
2404
|
execute: async () => renderLocalizeWorkflow(),
|
|
2350
2405
|
});
|