@extenshi/mcp 0.5.2 → 0.7.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.
@@ -0,0 +1,273 @@
1
+ const docs = (page) => `https://docs.extenshi.io/developers/${page}`;
2
+ const toolPage = (key) => `https://dojo.extenshi.io/tools/${key}`;
3
+ export const DEVELOPMENT_GUIDE_URL = docs('development-workflow');
4
+ export const DEVELOPMENT_SERVICES = [
5
+ {
6
+ id: 'documentation',
7
+ purpose: 'Discover capabilities, extension shapes, exact CLI commands and reusable agent skills.',
8
+ tools: ['get_development_guide', 'search_docs', 'list_extension_templates'],
9
+ access: 'Free guidance; no API key. Hosted transport still requires connector sign-in.',
10
+ urls: [docs('mcp'), DEVELOPMENT_GUIDE_URL, docs('agent-skills')],
11
+ },
12
+ {
13
+ id: 'account',
14
+ purpose: 'Sign in, provision an API key for local tools and check credit pools before paid work.',
15
+ tools: ['get_credit_balance', 'connection_diagnostics'],
16
+ access: 'Balance lookup is free and requires identity; catalog reads and scans use credit pools.',
17
+ urls: [docs('scan-credits'), 'https://dojo.extenshi.io/api-keys', 'https://dojo.extenshi.io/billing'],
18
+ },
19
+ {
20
+ id: 'research',
21
+ purpose: 'Validate demand, competitors, user complaints, permissions and existing security findings.',
22
+ tools: [
23
+ 'search_extensions',
24
+ 'get_extension',
25
+ 'get_reviews',
26
+ 'get_security',
27
+ 'get_risk_by_store_ids',
28
+ 'market_overview',
29
+ ],
30
+ access: 'Identity required. Catalog tools cost 1 read per call; get_security costs 3. Bulk risk: up to 40 per call. Chrome review text is unavailable; use its aggregate.',
31
+ urls: [docs('mcp'), 'https://catalog.extenshi.io'],
32
+ },
33
+ {
34
+ id: 'projects',
35
+ purpose: 'Read an existing project, selected browser types, manifests, repository binding, saved tool state, hosted URLs and starter files.',
36
+ tools: [
37
+ 'list_my_projects',
38
+ 'get_project_state',
39
+ 'get_project_scaffold',
40
+ 'get_project_workspace',
41
+ 'import_manifest',
42
+ 'diff_project_state',
43
+ 'apply_project_patch',
44
+ 'record_project_evidence',
45
+ 'create_ci_ingest_secret',
46
+ 'upsert_hosted_page',
47
+ 'verify_hosted_artifact',
48
+ 'list_hosted_pages',
49
+ 'get_release_readiness',
50
+ ],
51
+ access: 'Own-project MCP reads are free and require identity. Create projects in the cabinet. Synchronize repository metadata, source/built manifests and scope with typed revisioned patches. project.write, evidence.write and hosted.write require explicit OAuth consent. Repository metadata does not grant GitHub access. CI evidence (source=ci) is written only by the verified ingest endpoint — create its secret with create_ci_ingest_secret. Automated release-readiness access requires a Pro project.',
52
+ urls: [
53
+ DEVELOPMENT_GUIDE_URL,
54
+ 'https://dojo.extenshi.io/projects',
55
+ 'https://dojo.extenshi.io/integrations',
56
+ ],
57
+ },
58
+ {
59
+ id: 'manifest',
60
+ purpose: 'Choose minimum permissions, target browsers and manifest entries; validate every referenced file.',
61
+ tools: ['list_extension_templates', 'get_project_state', 'get_project_scaffold'],
62
+ access: 'Free template guidance; project reads require identity. The cabinet also has a manifest editor.',
63
+ urls: [docs('manifest-generator'), toolPage('manifest-generator')],
64
+ },
65
+ {
66
+ id: 'localization',
67
+ purpose: 'Translate extension messages locally with your coding agent and validate the resulting locales.',
68
+ tools: ['localize_workflow'],
69
+ access: 'Free static workflow; local CLI validation requires no key or Extenshi credits. Translation uses your agent provider. Check CLI release availability before invoking commands.',
70
+ urls: [docs('localization')],
71
+ },
72
+ {
73
+ id: 'icons',
74
+ purpose: 'Design the SVG, preview at toolbar sizes and export store assets with the local CLI.',
75
+ tools: ['generate_icon_workflow'],
76
+ access: 'Free workflow. Drawing, browser preview and file export happen in the local agent environment; the cabinet offers its own icon generator subject to availability and credits.',
77
+ urls: [docs('icon-generator'), toolPage('icon-generator')],
78
+ },
79
+ {
80
+ id: 'privacy',
81
+ purpose: 'Describe actual data practices; generate/export a policy or maintain a hosted policy and its version history.',
82
+ tools: [
83
+ 'list_privacy_policy_versions',
84
+ 'get_privacy_policy_version',
85
+ 'update_privacy_policy_with_ai',
86
+ 'publish_privacy_policy',
87
+ ],
88
+ access: 'Hosted policy tools require an owned Pro project. Version reads spend no credit; AI updates have a per-project daily limit. publish_privacy_policy changes the live page. The browser generator supports export.',
89
+ urls: [docs('privacy-policy-generator'), docs('data-declaration'), toolPage('privacy-policy-generator')],
90
+ },
91
+ {
92
+ id: 'onboarding',
93
+ purpose: 'Prepare a welcome page, pin guide, install instructions and uninstall survey; wire verified URLs into the extension.',
94
+ tools: ['generate_welcome_page_workflow', 'get_project_state'],
95
+ access: 'Free welcome-page brief. Edit, host and inspect responses in the cabinet where enabled; account/project limits apply. MCP returns guidance and saved state, not a page-publishing tool.',
96
+ urls: [
97
+ DEVELOPMENT_GUIDE_URL,
98
+ docs('pin-guide'),
99
+ docs('uninstall-feedback'),
100
+ toolPage('onboarding-page'),
101
+ toolPage('instruction-generator'),
102
+ toolPage('install-instructions'),
103
+ toolPage('uninstall-feedback'),
104
+ ],
105
+ },
106
+ {
107
+ id: 'listing-and-marketing',
108
+ purpose: 'Prepare listing copy, screenshots, landing page, support links and AI discovery assets.',
109
+ tools: [],
110
+ access: 'Use CLI generate-listing / review-risk and cabinet tools where enabled. MCP has no listing, landing-page or SEO execution tool.',
111
+ urls: [
112
+ docs('cli'),
113
+ docs('ai-visibility'),
114
+ docs('store-policies'),
115
+ toolPage('page-generator'),
116
+ toolPage('seo-optimizer'),
117
+ toolPage('ai-visibility'),
118
+ ],
119
+ },
120
+ {
121
+ id: 'verification-and-ci',
122
+ purpose: 'Test the built extension in each target browser, review store risks, scan the final package and retain reports in CI.',
123
+ tools: ['scan_extension'],
124
+ access: 'Scan requires a local artifact and API key, and spends 1 scan credit. CLI review-risk is local. Configure GitHub Actions in the repository; browser tests use the agent environment.',
125
+ urls: [docs('cli'), docs('cli-github-actions'), docs('store-policies')],
126
+ },
127
+ {
128
+ id: 'publishing',
129
+ purpose: 'Validate store credentials, submit the exact tested package and verify review status and the public listing.',
130
+ tools: ['publish_extension'],
131
+ access: 'Local stdio or CLI with local store credentials; publishing access is checked. Store registration, disclosures and review are separate steps. Upload success alone does not establish a live release.',
132
+ urls: [docs('cli'), docs('publish-to-chrome-web-store'), toolPage('publish')],
133
+ },
134
+ {
135
+ id: 'maintenance',
136
+ purpose: 'Claim the listing, respond to findings, inspect reviews/uninstall feedback, update policies and maintain releases.',
137
+ tools: ['get_reviews', 'get_security', 'get_project_state'],
138
+ access: 'Catalog reads are metered. Ownership, declarations, responses, badges and feedback management use the cabinet; consult account access.',
139
+ urls: [
140
+ docs('claim-your-extension'),
141
+ docs('respond-to-findings'),
142
+ docs('security-badge'),
143
+ docs('uninstall-feedback'),
144
+ docs('data-declaration'),
145
+ ],
146
+ },
147
+ {
148
+ id: 'monetization',
149
+ purpose: 'Optional paid-feature integration: seller setup, offers, checkout, signed entitlements and purchase verification.',
150
+ tools: [
151
+ 'list_pay_apps',
152
+ 'create_pay_app',
153
+ 'get_pay_app',
154
+ 'get_pay_readiness',
155
+ 'link_pay_app',
156
+ 'unlink_pay_app',
157
+ 'archive_pay_app',
158
+ 'export_pay_data',
159
+ 'get_pay_seller',
160
+ 'connect_pay_seller',
161
+ 'refresh_pay_seller',
162
+ 'set_pay_seller_profile',
163
+ 'upsert_pay_offer',
164
+ 'archive_pay_offer',
165
+ 'set_pay_enabled',
166
+ 'rotate_pay_key',
167
+ ],
168
+ access: 'Pay applications work independently of development projects. Explicit pay.read/pay.write permission is required; older connections and API keys have no Pay grant. Check get_pay_readiness and actual SDK distribution before integrating. Author completes seller agreement and Stripe KYC in the browser. Configure offers and profile, then enable checkout only with explicit authorization. Registration does not prove production deployment or npm publication.',
169
+ urls: [docs('pay-sdk'), 'https://dojo.extenshi.io/payments'],
170
+ },
171
+ ];
172
+ const WORKFLOW = [
173
+ {
174
+ id: 'scope',
175
+ actions: 'Record the user problem, target sites and browsers, MVP, permissions/data needs, acceptance criteria, distribution and optional monetization. Inspect available tools with get_development_guide; use search_docs for current details. Keep deferred features out of release promises.',
176
+ doneWhen: 'A written scope and acceptance checklist cover implementation, testing, assets, release and maintenance.',
177
+ },
178
+ {
179
+ id: 'research',
180
+ actions: 'If market research is needed, check get_credit_balance, then search_extensions / market_overview, get_extension and get_reviews for a small relevant set. Use get_security for detailed findings or get_risk_by_store_ids for a batch. Record gaps and constraints.',
181
+ doneWhen: 'The chosen feature and supported surfaces have evidence; optional research is marked skipped with a reason.',
182
+ },
183
+ {
184
+ id: 'project-and-repository',
185
+ actions: 'With identity, call list_my_projects then get_project_state for the selected project. Reuse its repository. If no project exists, create/configure one in dojo where available; otherwise continue locally and record that integration is pending. Create or reuse a Git remote, preferably GitHub, before substantial implementation.',
186
+ doneWhen: 'Project ID (or explicit pending status), repository URL, branch, README, build commands and release checklist are recorded.',
187
+ },
188
+ {
189
+ id: 'architecture-and-scaffold',
190
+ actions: 'Call list_extension_templates, choose minimum permissions and browser-specific files. For a new project call get_project_scaffold once per browser into separate outputs; preserve existing code when integrating an existing repository. Read includeToolStates only for needed keys. Write integration.file verbatim to integration.path, review integration.unwired and re-read state after cabinet changes.',
191
+ doneWhen: 'Each manifest references real packaged files; browser variants and the project integration contract are preserved.',
192
+ },
193
+ {
194
+ id: 'implementation',
195
+ actions: 'Implement the MVP, accessible popup/options, storage and error handling. Test actual target sites and extension lifecycle, including service-worker restart and permission denial. Use localize_workflow for local message translation, structural validation and manual language/RTL review. If payments or user accounts are needed, verify the supported integration and complete its prerequisites before depending on it.',
196
+ doneWhen: 'Acceptance criteria pass on real target surfaces; optional integrations have end-to-end evidence or remain explicit blockers.',
197
+ },
198
+ {
199
+ id: 'assets-and-hosted-pages',
200
+ actions: "Use generate_icon_workflow and generate_welcome_page_workflow as needed. Prepare screenshots, pin/install instructions, a privacy policy, uninstall feedback, support and landing URLs. For an existing Pro policy, list/read versions, then update_privacy_policy_with_ai when needed, review proposedMarkdown and publish within the author's authorization. Re-read get_project_state and verify the returned URLs.",
201
+ doneWhen: 'Assets show the real product; hosted links load and match actual data practices; installation/uninstallation flows work.',
202
+ },
203
+ {
204
+ id: 'quality-and-listing',
205
+ actions: 'Build each browser package; run unit/integration checks and manual browser scenarios. Get exact review-risk and generate-listing commands from search_docs; review disclosures, permission justifications, listing copy and screenshots against the build. Run scan_extension if available, otherwise the local CLI. Add CI using cli-github-actions docs.',
206
+ doneWhen: 'The exact versioned artifact has passing checks, retained scan/review reports and truthful store materials; unresolved findings have a disposition.',
207
+ },
208
+ {
209
+ id: 'release',
210
+ actions: "Verify store accounts, credentials and submission access; use publish_extension with validate_only first when available. Submit the tested artifact within the user's publishing authorization through local MCP, CLI or the store console. Record upload, submission, approval and public-listing status separately.",
211
+ doneWhen: 'Store status and installed version are verified; pending store review is reported as pending, with artifact and source commit recorded.',
212
+ },
213
+ {
214
+ id: 'operate',
215
+ actions: 'Claim the catalog listing, maintain declarations and a security badge, review findings and uninstall feedback, verify optional purchase/license flows, and plan updates. Repeat build, review, scan, policy and release checks for later versions.',
216
+ doneWhen: 'A handoff records repository/commit, artifacts, URLs, checks, remaining blockers, support owner and follow-up work.',
217
+ },
218
+ ];
219
+ export function buildDevelopmentGuide(registeredTools) {
220
+ const names = new Set(registeredTools.map((tool) => tool.name));
221
+ return {
222
+ schemaVersion: 1,
223
+ documentation: DEVELOPMENT_GUIDE_URL,
224
+ availability: 'tools lists the tools registered on THIS connection. Registration does not prove account access, remaining credits or local prerequisites. Service URLs describe where work happens; check live account/project access. Use MCP tools/list for the exact input schemas. This guide makes no network calls.',
225
+ tools: registeredTools.map((tool) => ({
226
+ ...tool,
227
+ docs: [
228
+ ...new Set(DEVELOPMENT_SERVICES.filter((s) => s.tools.includes(tool.name)).flatMap((s) => s.urls.filter((url) => url.startsWith('https://docs.extenshi.io/')))),
229
+ ],
230
+ })),
231
+ localActions: ['scan_extension', 'publish_extension'].map((name) => ({
232
+ name,
233
+ availableInThisConnection: names.has(name),
234
+ fallback: 'Use local @extenshi/mcp (stdio), or npx @extenshi/cli@latest on the machine holding the artifact. Read search_docs for exact commands and prerequisites.',
235
+ docs: docs('cli'),
236
+ })),
237
+ services: DEVELOPMENT_SERVICES.map(({ tools, ...service }) => ({
238
+ ...service,
239
+ toolsInThisConnection: tools.filter((name) => names.has(name)),
240
+ })),
241
+ repository: {
242
+ recommendation: 'Keep source in a developer-owned Git repository; prefer GitHub for the existing dojo integration and GitHub Actions. Reuse the bound repository. GitLab, Bitbucket or self-hosted Git also work with local code and CI; their automatic dojo binding is not provided by these MCP tools.',
243
+ setup: "Choose repository owner and visibility with the developer; use a private repository unless public source is intended. Connect GitHub at https://dojo.extenshi.io/integrations and select the repository in the project where enabled. Repository creation/writes use GitHub, its connector/CLI or the cabinet, with the user's authorization.",
244
+ layout: [
245
+ 'README.md: setup, target browsers, build/test/release commands',
246
+ 'src/: extension logic and extenshi.config.js at the path supplied by the project',
247
+ 'assets/ and _locales/: icons and translations (follow the chosen framework layout)',
248
+ 'tests/: behavior and browser scenarios',
249
+ 'docs/: privacy source, listing copy, support and release checklist',
250
+ '.github/workflows/: build, tests and artifact scan',
251
+ 'dist/: generated per-browser packages; attach versioned artifacts to CI/releases',
252
+ ],
253
+ practice: 'Commit source, dependency lockfile and .env.example with placeholders. Keep tokens, store credentials, signing keys, .env and user data in local/CI secret storage. Use branches and reviewable pull requests; associate release artifacts with a source commit/tag.',
254
+ docs: [
255
+ 'https://docs.github.com/en/repositories/creating-and-managing-repositories/quickstart-for-repositories',
256
+ docs('cli-github-actions'),
257
+ DEVELOPMENT_GUIDE_URL,
258
+ ],
259
+ },
260
+ workflow: WORKFLOW,
261
+ handoff: [
262
+ 'scope and acceptance criteria',
263
+ 'project ID, repository URL, branch and commit',
264
+ 'completed/skipped/blocked stages with reasons',
265
+ 'per-browser artifact version and checks',
266
+ 'hosted policy/onboarding/support URLs',
267
+ 'store submission versus live status',
268
+ 'optional payment verification',
269
+ 'remaining actions and owners',
270
+ ],
271
+ };
272
+ }
273
+ //# sourceMappingURL=development-guide.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"development-guide.js","sourceRoot":"","sources":["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CAAC,CAAC;YAC9D,GAAG,OAAO;YACV,qBAAqB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;SAC9D,CAAC,CAAC;QACH,UAAU,EAAE;YACX,cAAc,EACb,0RAA0R;YAC3R,KAAK,EACJ,+UAA+U;YAChV,MAAM,EAAE;gBACP,gEAAgE;gBAChE,kFAAkF;gBAClF,oFAAoF;gBACpF,wCAAwC;gBACxC,oEAAoE;gBACpE,oDAAoD;gBACpD,kFAAkF;aAClF;YACD,QAAQ,EACP,sQAAsQ;YACvQ,IAAI,EAAE;gBACL,wGAAwG;gBACxG,IAAI,CAAC,oBAAoB,CAAC;gBAC1B,qBAAqB;aACrB;SACD;QACD,QAAQ,EAAE,QAAQ;QAClB,OAAO,EAAE;YACR,+BAA+B;YAC/B,+CAA+C;YAC/C,+CAA+C;YAC/C,yCAAyC;YACzC,uCAAuC;YACvC,qCAAqC;YACrC,+BAA+B;YAC/B,8BAA8B;SAC9B;KACD,CAAA;AACF,CAAC"}
package/dist/index.js CHANGED
@@ -25,7 +25,7 @@ import { makeBff } from './bff.js';
25
25
  import { loadConfig } from './config.js';
26
26
  import { reportServerStarted } from './startup.js';
27
27
  import { flushTelemetry, initTelemetry } from './telemetry.js';
28
- import { MISSING_KEY_MESSAGE, registerTools, SERVER_INSTRUCTIONS, SERVER_NAME, } from './tools.js';
28
+ import { getServerInstructions, MISSING_KEY_MESSAGE, registerTools, SERVER_NAME, } from './tools.js';
29
29
  import { checkForUpdate } from './update-check.js';
30
30
  const require = createRequire(import.meta.url);
31
31
  const pkg = require('../package.json');
@@ -41,17 +41,18 @@ function requireKey() {
41
41
  function bff() {
42
42
  return makeBff(cfg.bffUrl, requireKey());
43
43
  }
44
+ const capabilities = new Set(['read', 'docs', 'scan', 'publish']);
44
45
  const server = new FastMCP({
45
46
  name: SERVER_NAME,
46
47
  // FastMCP types `version` as a semver template literal; package.json gives a plain string.
47
48
  version: pkg.version,
48
- instructions: SERVER_INSTRUCTIONS,
49
+ instructions: getServerInstructions(capabilities),
49
50
  });
50
51
  // stdio identity is fixed (env key) — the call context is ignored. ALL four
51
52
  // capabilities are enabled: the local client has a filesystem and store creds.
52
53
  const stdioDeps = {
53
54
  cfg: { bffUrl: cfg.bffUrl, scanUrl: cfg.scanUrl, docsUrl: cfg.docsUrl },
54
- capabilities: new Set(['read', 'docs', 'scan', 'publish']),
55
+ capabilities,
55
56
  getBff: () => bff(),
56
57
  requireApiKey: () => requireKey(),
57
58
  getApiKey: () => cfg.apiKey ?? undefined,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAC5C,OAAO,EAAY,OAAO,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAC9D,OAAO,EAEN,mBAAmB,EACnB,aAAa,EACb,mBAAmB,EACnB,WAAW,GAEX,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAElD,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AAC9C,MAAM,GAAG,GAAG,OAAO,CAAC,iBAAiB,CAAwB,CAAA;AAE7D,aAAa,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC,CAAA;AAEvD,MAAM,GAAG,GAA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AA+E;AAC/E,gFAAgF;AAChF,+EAA+E;AAC/E,6DAA6D;AAC7D,KAAK,MAAM,MAAM,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAU,EAAE,CAAC;IACrD,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE;QACzB,KAAK,cAAc,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;IAClD,CAAC,CAAC,CAAA;AACH,CAAC;AACD,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,GAAG,EAAE;IAC/B,KAAK,cAAc,EAAE,CAAA;AACtB,CAAC,CAAC,CAAA;AAEF,iFAAiF;AACjF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,2EAA2E;AAC3E,8EAA8E;AAC9E,gFAAgF;AAChF,kEAAkE;AAClE,MAAM,MAAM,CAAC,KAAK,CAAC,EAAE,aAAa,EAAE,OAAO,EAAE,CAAC,CAAA;AAE9C,+EAA+E;AAC/E,kFAAkF;AAClF,mFAAmF;AACnF,sEAAsE;AACtE,oCAAoC;AACpC,mBAAmB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;AAE/B,8EAA8E;AAC9E,oEAAoE;AACpE,KAAK,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ /** Static, keyless guidance; translation and filesystem changes belong to the caller's local agent. */
2
+ export declare function renderLocalizeWorkflow(): string;
3
+ //# sourceMappingURL=localize-workflow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"localize-workflow.d.ts","sourceRoot":"","sources":["../src/localize-workflow.ts"],"names":[],"mappings":"AAAA,uGAAuG;AACvG,wBAAgB,sBAAsB,IAAI,MAAM,CAoF/C"}
@@ -0,0 +1,87 @@
1
+ /** Static, keyless guidance; translation and filesystem changes belong to the caller's local agent. */
2
+ export function renderLocalizeWorkflow() {
3
+ return `# Local extension localization
4
+
5
+ This workflow is free of Extenshi credits and requires no API key. The MCP tool returns
6
+ static instructions. Your coding agent translates using its own provider and tokens;
7
+ the CLI prepares and validates local files offline after installation.
8
+
9
+ ## Availability
10
+
11
+ First run \`extenshi localize --help\` with the CLI installed in your environment.
12
+ Use a release that includes localize. A merged change is not proof that npm latest
13
+ contains it. When working from the Extenshi repository, build the CLI with
14
+ \`yarn workspace @extenshi/cli build\` and replace \`extenshi\` below with
15
+ \`node tools/extenshi-cli/dist/cli.js\` (from the repository root).
16
+
17
+ ## Prepare
18
+
19
+ Start from manifest.json with default_locale and
20
+ _locales/<default_locale>/messages.json. This workflow handles these messages,
21
+ including manifest name/description references. Full store descriptions and arbitrary
22
+ hardcoded UI strings need their own extraction and review.
23
+
24
+ \`\`\`bash
25
+ extenshi localize prepare ./extension --lang fr,de,es --output ./localization --protect MyBrand
26
+ \`\`\`
27
+
28
+ The output localization-request.json contains missing, stale or untracked messages, grouped by
29
+ locale. Use a fresh output directory on each run; prepare refuses to overwrite its request.
30
+ When localization.json supplies targetLocales, --lang is optional. Its protectedTerms
31
+ are combined with --protect. Keep the version, sourceLocale, locale keys and sourceHashes unchanged. Each
32
+ locale has this structure (the hash shown is illustrative; retain the actual prepared hash):
33
+
34
+ \`\`\`json
35
+ {
36
+ "version": 1,
37
+ "sourceLocale": "en",
38
+ "locales": {
39
+ "fr": {
40
+ "sourceHashes": { "greeting": "<prepared SHA-256>" },
41
+ "messages": { "greeting": { "message": "Hello", "description": "Greeting in popup" } }
42
+ }
43
+ }
44
+ }
45
+ \`\`\`
46
+
47
+ ## Translate and review
48
+
49
+ Translate only message text into each target language. Preserve keys, placeholder
50
+ names and definitions, positional substitutions, escaped dollar signs and protected
51
+ terms exactly. Keep descriptions as translation context. Use the actual product for
52
+ context; never invent features, guarantees or marketing claims. Save the edited bundle
53
+ as ./localization/translations.json. Preserve any removeKeys array: it lists translations whose source keys were
54
+ deleted. Review these removals together with the translated messages. A removal-only
55
+ locale has empty messages and sourceHashes objects and still requires reviewed: true.
56
+
57
+ Review the translations for meaning, tone, brand spelling and truthful claims before
58
+ applying, then add "reviewed": true inside each reviewed locale object alongside
59
+ sourceHashes and messages. Apply requires this explicit review marker. Source hashes detect edits to the source while translation was in progress;
60
+ if the source changed, prepare a fresh request and translate the changed entries again.
61
+
62
+ ## Apply and validate
63
+
64
+ \`\`\`bash
65
+ extenshi localize apply ./extension --translations ./localization/translations.json --protect MyBrand
66
+ extenshi localize check ./extension --protect MyBrand
67
+ \`\`\`
68
+
69
+ Apply validates the bundle before updating _locales. Keep .extenshi-localization.json
70
+ with the project: it records source and reviewed target hashes for incremental updates. Direct target edits require re-review. Re-run
71
+ prepare after changing source messages. Review the diff and resolve validation errors;
72
+ do not bypass placeholder, protected-term or listing-risk failures to get a green result.
73
+
74
+ ## Release review gates
75
+
76
+ - Run review-risk for every target locale using the exact command documented by your
77
+ installed CLI's help. Resolve listing risks against the real build and retain reports.
78
+ - Have a fluent reviewer inspect the copy and any full store descriptions/screenshots.
79
+ - Load the packaged extension under each target language. Check popup/options, long
80
+ strings, truncation and keyboard accessibility. For Arabic/Hebrew, inspect RTL direction,
81
+ layout and mixed text/numbers. A locale file or passing CLI check does not prove RTL UI support.
82
+ - Rebuild and check every browser artifact. Publish only within the developer's authorization.
83
+
84
+ Documentation: https://docs.extenshi.io/developers/localization
85
+ `;
86
+ }
87
+ //# sourceMappingURL=localize-workflow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"localize-workflow.js","sourceRoot":"","sources":["../src/localize-workflow.ts"],"names":[],"mappings":"AAAA,uGAAuG;AACvG,MAAM,UAAU,sBAAsB;IACrC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkFP,CAAA;AACD,CAAC"}
package/dist/pay.d.ts ADDED
@@ -0,0 +1,214 @@
1
+ /** Published packages deliberately carry this small contract locally; BFF validates again. */
2
+ import { z } from 'zod';
3
+ export declare const paySchemas: {
4
+ readonly listPayApps: z.ZodObject<{
5
+ includeArchived: z.ZodOptional<z.ZodBoolean>;
6
+ cursor: z.ZodOptional<z.ZodString>;
7
+ limit: z.ZodOptional<z.ZodNumber>;
8
+ }, "strict", z.ZodTypeAny, {
9
+ includeArchived?: boolean | undefined;
10
+ cursor?: string | undefined;
11
+ limit?: number | undefined;
12
+ }, {
13
+ includeArchived?: boolean | undefined;
14
+ cursor?: string | undefined;
15
+ limit?: number | undefined;
16
+ }>;
17
+ readonly createPayApp: z.ZodObject<{
18
+ name: z.ZodString;
19
+ linkedProjectId: z.ZodOptional<z.ZodString>;
20
+ }, "strict", z.ZodTypeAny, {
21
+ name: string;
22
+ linkedProjectId?: string | undefined;
23
+ }, {
24
+ name: string;
25
+ linkedProjectId?: string | undefined;
26
+ }>;
27
+ readonly getPayApp: z.ZodObject<{
28
+ appId: z.ZodString;
29
+ }, "strict", z.ZodTypeAny, {
30
+ appId: string;
31
+ }, {
32
+ appId: string;
33
+ }>;
34
+ readonly getPayReadiness: z.ZodObject<{
35
+ appId: z.ZodString;
36
+ }, "strict", z.ZodTypeAny, {
37
+ appId: string;
38
+ }, {
39
+ appId: string;
40
+ }>;
41
+ readonly linkPayApp: z.ZodObject<{
42
+ appId: z.ZodString;
43
+ } & {
44
+ projectId: z.ZodString;
45
+ }, "strict", z.ZodTypeAny, {
46
+ appId: string;
47
+ projectId: string;
48
+ }, {
49
+ appId: string;
50
+ projectId: string;
51
+ }>;
52
+ readonly unlinkPayApp: z.ZodObject<{
53
+ appId: z.ZodString;
54
+ }, "strict", z.ZodTypeAny, {
55
+ appId: string;
56
+ }, {
57
+ appId: string;
58
+ }>;
59
+ readonly archivePayApp: z.ZodObject<{
60
+ appId: z.ZodString;
61
+ }, "strict", z.ZodTypeAny, {
62
+ appId: string;
63
+ }, {
64
+ appId: string;
65
+ }>;
66
+ readonly exportPayData: z.ZodObject<{
67
+ appId: z.ZodString;
68
+ } & {
69
+ resource: z.ZodEnum<["offers", "payments", "subscriptions", "entitlements", "customers"]>;
70
+ cursor: z.ZodOptional<z.ZodString>;
71
+ limit: z.ZodOptional<z.ZodNumber>;
72
+ }, "strict", z.ZodTypeAny, {
73
+ appId: string;
74
+ resource: "offers" | "payments" | "subscriptions" | "entitlements" | "customers";
75
+ cursor?: string | undefined;
76
+ limit?: number | undefined;
77
+ }, {
78
+ appId: string;
79
+ resource: "offers" | "payments" | "subscriptions" | "entitlements" | "customers";
80
+ cursor?: string | undefined;
81
+ limit?: number | undefined;
82
+ }>;
83
+ readonly getPaySeller: z.ZodObject<{
84
+ appId: z.ZodString;
85
+ }, "strict", z.ZodTypeAny, {
86
+ appId: string;
87
+ }, {
88
+ appId: string;
89
+ }>;
90
+ readonly connectPaySeller: z.ZodObject<{
91
+ appId: z.ZodString;
92
+ } & {
93
+ provider: z.ZodDefault<z.ZodLiteral<"stripe">>;
94
+ accountKind: z.ZodDefault<z.ZodEnum<["standard", "express"]>>;
95
+ }, "strict", z.ZodTypeAny, {
96
+ appId: string;
97
+ provider: "stripe";
98
+ accountKind: "standard" | "express";
99
+ }, {
100
+ appId: string;
101
+ provider?: "stripe" | undefined;
102
+ accountKind?: "standard" | "express" | undefined;
103
+ }>;
104
+ readonly refreshPaySeller: z.ZodObject<{
105
+ appId: z.ZodString;
106
+ }, "strict", z.ZodTypeAny, {
107
+ appId: string;
108
+ }, {
109
+ appId: string;
110
+ }>;
111
+ readonly setPaySellerProfile: z.ZodObject<{
112
+ appId: z.ZodString;
113
+ } & {
114
+ profile: z.ZodObject<{
115
+ displayName: z.ZodString;
116
+ supportUrl: z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodString]>;
117
+ termsUrl: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
118
+ }, "strict", z.ZodTypeAny, {
119
+ displayName: string;
120
+ supportUrl: string;
121
+ termsUrl: string | null;
122
+ }, {
123
+ displayName: string;
124
+ supportUrl: string;
125
+ termsUrl: string | null;
126
+ }>;
127
+ }, "strict", z.ZodTypeAny, {
128
+ appId: string;
129
+ profile: {
130
+ displayName: string;
131
+ supportUrl: string;
132
+ termsUrl: string | null;
133
+ };
134
+ }, {
135
+ appId: string;
136
+ profile: {
137
+ displayName: string;
138
+ supportUrl: string;
139
+ termsUrl: string | null;
140
+ };
141
+ }>;
142
+ readonly upsertPayOffer: z.ZodObject<{
143
+ appId: z.ZodString;
144
+ } & {
145
+ sku: z.ZodString;
146
+ kind: z.ZodEnum<["one_time", "subscription", "lifetime"]>;
147
+ interval: z.ZodDefault<z.ZodNullable<z.ZodEnum<["month", "year"]>>>;
148
+ amountMinor: z.ZodNumber;
149
+ currency: z.ZodEnum<["usd", "eur", "gbp"]>;
150
+ title: z.ZodString;
151
+ description: z.ZodDefault<z.ZodNullable<z.ZodString>>;
152
+ features: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
153
+ sortOrder: z.ZodDefault<z.ZodNumber>;
154
+ }, "strict", z.ZodTypeAny, {
155
+ appId: string;
156
+ sku: string;
157
+ kind: "one_time" | "subscription" | "lifetime";
158
+ interval: "month" | "year" | null;
159
+ amountMinor: number;
160
+ currency: "usd" | "eur" | "gbp";
161
+ title: string;
162
+ description: string | null;
163
+ features: string[];
164
+ sortOrder: number;
165
+ }, {
166
+ appId: string;
167
+ sku: string;
168
+ kind: "one_time" | "subscription" | "lifetime";
169
+ amountMinor: number;
170
+ currency: "usd" | "eur" | "gbp";
171
+ title: string;
172
+ interval?: "month" | "year" | null | undefined;
173
+ description?: string | null | undefined;
174
+ features?: string[] | undefined;
175
+ sortOrder?: number | undefined;
176
+ }>;
177
+ readonly archivePayOffer: z.ZodObject<{
178
+ appId: z.ZodString;
179
+ } & {
180
+ sku: z.ZodString;
181
+ }, "strict", z.ZodTypeAny, {
182
+ appId: string;
183
+ sku: string;
184
+ }, {
185
+ appId: string;
186
+ sku: string;
187
+ }>;
188
+ readonly setPayEnabled: z.ZodObject<{
189
+ appId: z.ZodString;
190
+ } & {
191
+ enabled: z.ZodBoolean;
192
+ }, "strict", z.ZodTypeAny, {
193
+ appId: string;
194
+ enabled: boolean;
195
+ }, {
196
+ appId: string;
197
+ enabled: boolean;
198
+ }>;
199
+ readonly rotatePayKey: z.ZodObject<{
200
+ appId: z.ZodString;
201
+ }, "strict", z.ZodTypeAny, {
202
+ appId: string;
203
+ }, {
204
+ appId: string;
205
+ }>;
206
+ };
207
+ export type PayMethod = keyof typeof paySchemas;
208
+ export type PayBff = {
209
+ [M in PayMethod]: (input: z.infer<(typeof paySchemas)[M]>) => Promise<unknown>;
210
+ };
211
+ export declare const PAY_OPERATIONS: readonly [readonly ["listPayApps", "list_pay_apps", "list", "payApp.list", false, "List your independent Pay applications. No development project required. Follow nextCursor for more results."], readonly ["createPayApp", "create_pay_app", "create", "payApp.create", true, "Create an independent Pay application; linking a development project is optional. Creates a new application on every call: do not retry blindly 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 ["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. Preserve payment records and existing entitlements."], readonly ["exportPayData", "export_pay_data", "export", "payApp.export", false, "Export one page of your application data. Follow nextCursor until null for a complete export. Customer/payment data is sensitive: save only to an author-controlled destination; never paste into public issues."], readonly ["getPaySeller", "get_pay_seller", "seller", "paySeller.get", false, "Read seller connection, public profile, offers and publishable SDK key. Agreement signing and KYC require the author in the browser."], readonly ["connectPaySeller", "connect_pay_seller", "connect", "paySeller.connect", true, "Start Stripe Connect onboarding and return a browser action URL. The author must complete KYC and legal acceptance; never do these on their behalf."], 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 author-confirmed public seller identity, support and terms links. Never invent legal identity or terms."], readonly ["upsertPayOffer", "upsert_pay_offer", "offer-upsert", "paySeller.upsertOffer", true, "Create or update an offer by stable SKU. Price is in minor currency units. Use only the author-approved price, billing interval and features."], readonly ["archivePayOffer", "archive_pay_offer", "offer-archive", "paySeller.archiveOffer", true, "Stop offering a SKU for new checkout; preserve historical purchases."], readonly ["setPayEnabled", "set_pay_enabled", "enable", "paySeller.setEnabled", true, "Explicitly enable or disable new payments. Enabling is a live commerce change: only do so with author authorization and after checking readiness. Backend prerequisites remain enforced."], readonly ["rotatePayKey", "rotate_pay_key", "rotate-key", "paySeller.rotatePublishableKey", true, "Generate a new publishable SDK key. Prior keys remain accepted for installed extension builds; this is not secret revocation. Never retry blindly."]];
212
+ /** The legacy seller API uses projectId as the payment namespace. Never substitute a linked project ID. */
213
+ export declare function payWireInput(method: PayMethod, input: Record<string, unknown>): Record<string, unknown>;
214
+ //# sourceMappingURL=pay.d.ts.map