@extenshi/mcp 0.7.0 → 0.8.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 +4 -3
- package/dist/bff.d.ts +5 -0
- package/dist/bff.d.ts.map +1 -1
- package/dist/bff.js +1 -0
- package/dist/bff.js.map +1 -1
- package/dist/development-guide.d.ts +108 -78
- package/dist/development-guide.d.ts.map +1 -1
- package/dist/development-guide.js +123 -44
- package/dist/development-guide.js.map +1 -1
- package/dist/docs.d.ts +45 -4
- package/dist/docs.d.ts.map +1 -1
- package/dist/docs.js +162 -17
- package/dist/docs.js.map +1 -1
- package/dist/icon-workflow.d.ts +5 -4
- package/dist/icon-workflow.d.ts.map +1 -1
- package/dist/icon-workflow.js +33 -32
- package/dist/icon-workflow.js.map +1 -1
- package/dist/localize-workflow.d.ts +6 -1
- package/dist/localize-workflow.d.ts.map +1 -1
- package/dist/localize-workflow.js +65 -47
- package/dist/localize-workflow.js.map +1 -1
- package/dist/pay.d.ts +1 -1
- package/dist/pay.d.ts.map +1 -1
- package/dist/pay.js +11 -11
- package/dist/pay.js.map +1 -1
- package/dist/search-filters.js +1 -1
- package/dist/search-filters.js.map +1 -1
- package/dist/shape.d.ts +34 -0
- package/dist/shape.d.ts.map +1 -1
- package/dist/shape.js +150 -3
- package/dist/shape.js.map +1 -1
- package/dist/templates.js +5 -5
- package/dist/templates.js.map +1 -1
- package/dist/tools.d.ts +1 -0
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +199 -111
- package/dist/tools.js.map +1 -1
- package/dist/welcome-agent-brief.d.ts +9 -9
- package/dist/welcome-agent-brief.d.ts.map +1 -1
- package/dist/welcome-agent-brief.js +32 -32
- package/dist/welcome-agent-brief.js.map +1 -1
- package/dist/welcome-workflow.d.ts +5 -5
- package/dist/welcome-workflow.d.ts.map +1 -1
- package/dist/welcome-workflow.js +13 -14
- package/dist/welcome-workflow.js.map +1 -1
- package/package.json +3 -2
|
@@ -4,21 +4,21 @@ export const DEVELOPMENT_GUIDE_URL = docs('development-workflow');
|
|
|
4
4
|
export const DEVELOPMENT_SERVICES = [
|
|
5
5
|
{
|
|
6
6
|
id: 'documentation',
|
|
7
|
-
purpose: '
|
|
7
|
+
purpose: 'Capabilities, extension shapes, exact CLI commands and reusable skill packages.',
|
|
8
8
|
tools: ['get_development_guide', 'search_docs', 'list_extension_templates'],
|
|
9
|
-
access: 'Free
|
|
9
|
+
access: 'Free reference; no API key. Hosted transport still requires connector sign-in.',
|
|
10
10
|
urls: [docs('mcp'), DEVELOPMENT_GUIDE_URL, docs('agent-skills')],
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
13
|
id: 'account',
|
|
14
|
-
purpose: 'Sign
|
|
14
|
+
purpose: 'Sign-in, API keys for local tools and credit-pool balances ahead of paid work.',
|
|
15
15
|
tools: ['get_credit_balance', 'connection_diagnostics'],
|
|
16
16
|
access: 'Balance lookup is free and requires identity; catalog reads and scans use credit pools.',
|
|
17
17
|
urls: [docs('scan-credits'), 'https://dojo.extenshi.io/api-keys', 'https://dojo.extenshi.io/billing'],
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
id: 'research',
|
|
21
|
-
purpose: '
|
|
21
|
+
purpose: 'Demand, competitors, user complaints, permissions and existing security findings.',
|
|
22
22
|
tools: [
|
|
23
23
|
'search_extensions',
|
|
24
24
|
'get_extension',
|
|
@@ -27,12 +27,12 @@ export const DEVELOPMENT_SERVICES = [
|
|
|
27
27
|
'get_risk_by_store_ids',
|
|
28
28
|
'market_overview',
|
|
29
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;
|
|
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; its aggregate rating is available.',
|
|
31
31
|
urls: [docs('mcp'), 'https://catalog.extenshi.io'],
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
id: 'projects',
|
|
35
|
-
purpose: '
|
|
35
|
+
purpose: 'Existing projects: selected browser types, manifests, repository binding, saved tool state, hosted URLs and starter files.',
|
|
36
36
|
tools: [
|
|
37
37
|
'list_my_projects',
|
|
38
38
|
'get_project_state',
|
|
@@ -45,10 +45,11 @@ export const DEVELOPMENT_SERVICES = [
|
|
|
45
45
|
'create_ci_ingest_secret',
|
|
46
46
|
'upsert_hosted_page',
|
|
47
47
|
'verify_hosted_artifact',
|
|
48
|
+
'remove_hosted_page',
|
|
48
49
|
'list_hosted_pages',
|
|
49
50
|
'get_release_readiness',
|
|
50
51
|
],
|
|
51
|
-
access: 'Own-project MCP reads are free and require identity.
|
|
52
|
+
access: 'Own-project MCP reads are free and require identity. Projects are created in the cabinet. Repository metadata, source/built manifests and scope synchronize through 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, which authenticates with a secret from create_ci_ingest_secret. Automated release-readiness access requires a Pro project.',
|
|
52
53
|
urls: [
|
|
53
54
|
DEVELOPMENT_GUIDE_URL,
|
|
54
55
|
'https://dojo.extenshi.io/projects',
|
|
@@ -57,28 +58,28 @@ export const DEVELOPMENT_SERVICES = [
|
|
|
57
58
|
},
|
|
58
59
|
{
|
|
59
60
|
id: 'manifest',
|
|
60
|
-
purpose: '
|
|
61
|
+
purpose: 'Minimum permissions, target browsers and manifest entries, with every referenced file present.',
|
|
61
62
|
tools: ['list_extension_templates', 'get_project_state', 'get_project_scaffold'],
|
|
62
|
-
access: 'Free template
|
|
63
|
+
access: 'Free template reference; project reads require identity. The cabinet also has a manifest editor.',
|
|
63
64
|
urls: [docs('manifest-generator'), toolPage('manifest-generator')],
|
|
64
65
|
},
|
|
65
66
|
{
|
|
66
67
|
id: 'localization',
|
|
67
|
-
purpose: '
|
|
68
|
+
purpose: 'Local translation of extension messages and validation of the resulting locales.',
|
|
68
69
|
tools: ['localize_workflow'],
|
|
69
|
-
access:
|
|
70
|
+
access: "Free static reference; local CLI validation requires no key or Extenshi credits. Translation uses the developer's own provider. CLI release availability is part of the reference.",
|
|
70
71
|
urls: [docs('localization')],
|
|
71
72
|
},
|
|
72
73
|
{
|
|
73
74
|
id: 'icons',
|
|
74
|
-
purpose: '
|
|
75
|
+
purpose: 'SVG icon design, toolbar-size preview and store-asset export with the local CLI.',
|
|
75
76
|
tools: ['generate_icon_workflow'],
|
|
76
|
-
access: 'Free
|
|
77
|
+
access: 'Free. Drawing, browser preview and file export happen locally; the cabinet offers its own icon generator subject to availability and credits.',
|
|
77
78
|
urls: [docs('icon-generator'), toolPage('icon-generator')],
|
|
78
79
|
},
|
|
79
80
|
{
|
|
80
81
|
id: 'privacy',
|
|
81
|
-
purpose: '
|
|
82
|
+
purpose: 'A policy that reflects actual data practices: generated and exported, or hosted with version history.',
|
|
82
83
|
tools: [
|
|
83
84
|
'list_privacy_policy_versions',
|
|
84
85
|
'get_privacy_policy_version',
|
|
@@ -90,9 +91,9 @@ export const DEVELOPMENT_SERVICES = [
|
|
|
90
91
|
},
|
|
91
92
|
{
|
|
92
93
|
id: 'onboarding',
|
|
93
|
-
purpose: '
|
|
94
|
+
purpose: 'Welcome page, pin guide, install instructions and uninstall survey, with verified URLs wired into the extension.',
|
|
94
95
|
tools: ['generate_welcome_page_workflow', 'get_project_state'],
|
|
95
|
-
access: 'Free welcome-page
|
|
96
|
+
access: 'Free welcome-page specification. Editing, hosting and responses live in the cabinet where enabled; account/project limits apply. MCP returns specifications and saved state; it has no page-publishing tool.',
|
|
96
97
|
urls: [
|
|
97
98
|
DEVELOPMENT_GUIDE_URL,
|
|
98
99
|
docs('pin-guide'),
|
|
@@ -105,9 +106,9 @@ export const DEVELOPMENT_SERVICES = [
|
|
|
105
106
|
},
|
|
106
107
|
{
|
|
107
108
|
id: 'listing-and-marketing',
|
|
108
|
-
purpose: '
|
|
109
|
+
purpose: 'Listing copy, screenshots, landing page, support links and AI discovery assets.',
|
|
109
110
|
tools: [],
|
|
110
|
-
access: '
|
|
111
|
+
access: 'Covered by CLI generate-listing / review-risk and cabinet tools where enabled. MCP has no listing, landing-page or SEO execution tool.',
|
|
111
112
|
urls: [
|
|
112
113
|
docs('cli'),
|
|
113
114
|
docs('ai-visibility'),
|
|
@@ -119,23 +120,23 @@ export const DEVELOPMENT_SERVICES = [
|
|
|
119
120
|
},
|
|
120
121
|
{
|
|
121
122
|
id: 'verification-and-ci',
|
|
122
|
-
purpose: '
|
|
123
|
+
purpose: 'Testing the built extension in each target browser, store-risk review, final package scan and CI report retention.',
|
|
123
124
|
tools: ['scan_extension'],
|
|
124
|
-
access: 'Scan requires a local artifact and API key, and spends 1 scan credit. CLI review-risk is local.
|
|
125
|
+
access: 'Scan requires a local artifact and API key, and spends 1 scan credit. CLI review-risk is local. GitHub Actions is configured in the repository; browser tests run in the local environment.',
|
|
125
126
|
urls: [docs('cli'), docs('cli-github-actions'), docs('store-policies')],
|
|
126
127
|
},
|
|
127
128
|
{
|
|
128
129
|
id: 'publishing',
|
|
129
|
-
purpose: '
|
|
130
|
+
purpose: 'Store credential validation, submission of the exact tested package, and verification of review status and the public listing.',
|
|
130
131
|
tools: ['publish_extension'],
|
|
131
132
|
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
133
|
urls: [docs('cli'), docs('publish-to-chrome-web-store'), toolPage('publish')],
|
|
133
134
|
},
|
|
134
135
|
{
|
|
135
136
|
id: 'maintenance',
|
|
136
|
-
purpose: '
|
|
137
|
+
purpose: 'Listing claims, finding responses, reviews and uninstall feedback, policy updates and ongoing releases.',
|
|
137
138
|
tools: ['get_reviews', 'get_security', 'get_project_state'],
|
|
138
|
-
access: 'Catalog reads are metered. Ownership, declarations, responses, badges and feedback management
|
|
139
|
+
access: 'Catalog reads are metered. Ownership, declarations, responses, badges and feedback management live in the cabinet and depend on account access.',
|
|
139
140
|
urls: [
|
|
140
141
|
docs('claim-your-extension'),
|
|
141
142
|
docs('respond-to-findings'),
|
|
@@ -165,63 +166,108 @@ export const DEVELOPMENT_SERVICES = [
|
|
|
165
166
|
'set_pay_enabled',
|
|
166
167
|
'rotate_pay_key',
|
|
167
168
|
],
|
|
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.
|
|
169
|
+
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. Readiness (get_pay_readiness) and the actual SDK distribution determine whether integration is possible. The author completes the seller agreement and Stripe KYC in the browser. Checkout is enabled only after offers and profile are configured, and only with explicit authorization. Registration does not prove production deployment or npm publication.',
|
|
169
170
|
urls: [docs('pay-sdk'), 'https://dojo.extenshi.io/payments'],
|
|
170
171
|
},
|
|
171
172
|
];
|
|
173
|
+
/**
|
|
174
|
+
* The development lifecycle as a process description. `actions` describes what
|
|
175
|
+
* the stage consists of; `relatedTools` is a factual list of the tools that
|
|
176
|
+
* cover it (not an instruction to call them); `doneWhen` is the exit criterion.
|
|
177
|
+
*/
|
|
172
178
|
const WORKFLOW = [
|
|
173
179
|
{
|
|
174
180
|
id: 'scope',
|
|
175
|
-
actions: '
|
|
181
|
+
actions: 'Stage 1 — Scope: the user problem, target sites and browsers, MVP, permissions/data needs, acceptance criteria, distribution and optional monetization are written down. Deferred features stay out of release promises.',
|
|
182
|
+
relatedTools: ['get_development_guide', 'search_docs'],
|
|
176
183
|
doneWhen: 'A written scope and acceptance checklist cover implementation, testing, assets, release and maintenance.',
|
|
177
184
|
},
|
|
178
185
|
{
|
|
179
186
|
id: 'research',
|
|
180
|
-
actions: '
|
|
181
|
-
|
|
187
|
+
actions: 'Stage 2 — Research (optional): demand, competitors, user complaints and security findings for a small relevant set of existing extensions; gaps and constraints are recorded. Catalog reads are metered, so the credit balance matters here.',
|
|
188
|
+
relatedTools: [
|
|
189
|
+
'get_credit_balance',
|
|
190
|
+
'search_extensions',
|
|
191
|
+
'market_overview',
|
|
192
|
+
'get_extension',
|
|
193
|
+
'get_reviews',
|
|
194
|
+
'get_security',
|
|
195
|
+
'get_risk_by_store_ids',
|
|
196
|
+
],
|
|
197
|
+
doneWhen: 'The chosen feature and supported surfaces have evidence; skipped research is recorded as skipped with a reason.',
|
|
182
198
|
},
|
|
183
199
|
{
|
|
184
200
|
id: 'project-and-repository',
|
|
185
|
-
actions: '
|
|
201
|
+
actions: 'Stage 3 — Project and repository: an existing dojo project and its bound repository are reused. Without a project, one is created in dojo where available, or work continues locally with integration recorded as pending. A Git remote (GitHub preferred) exists before substantial implementation.',
|
|
202
|
+
relatedTools: ['list_my_projects', 'get_project_state'],
|
|
186
203
|
doneWhen: 'Project ID (or explicit pending status), repository URL, branch, README, build commands and release checklist are recorded.',
|
|
187
204
|
},
|
|
188
205
|
{
|
|
189
206
|
id: 'architecture-and-scaffold',
|
|
190
|
-
actions: '
|
|
207
|
+
actions: 'Stage 4 — Architecture and scaffold: extension types, minimum permissions and browser-specific files are chosen. A new project gets one scaffold per browser in separate outputs; an existing repository keeps its code. Tool states are read only for the keys the extension needs. integration.file is written verbatim to integration.path, integration.unwired lists what is still unconnected, and project state is re-read after cabinet changes.',
|
|
208
|
+
relatedTools: ['list_extension_templates', 'get_project_scaffold', 'get_project_state'],
|
|
191
209
|
doneWhen: 'Each manifest references real packaged files; browser variants and the project integration contract are preserved.',
|
|
192
210
|
},
|
|
193
211
|
{
|
|
194
212
|
id: 'implementation',
|
|
195
|
-
actions: '
|
|
213
|
+
actions: 'Stage 5 — Implementation: the MVP, accessible popup/options, storage and error handling, tested on the actual target sites and across the extension lifecycle, including service-worker restart and permission denial. Localization covers message translation, structural validation and manual language/RTL review. Payments or user accounts depend on a verified supported integration with its prerequisites complete.',
|
|
214
|
+
relatedTools: ['localize_workflow'],
|
|
196
215
|
doneWhen: 'Acceptance criteria pass on real target surfaces; optional integrations have end-to-end evidence or remain explicit blockers.',
|
|
197
216
|
},
|
|
198
217
|
{
|
|
199
218
|
id: 'assets-and-hosted-pages',
|
|
200
|
-
actions: "
|
|
219
|
+
actions: "Stage 6 — Assets and hosted pages: icon, welcome page, screenshots, pin/install instructions, privacy policy, uninstall feedback, support and landing URLs. An existing Pro policy is updated as a reviewed proposal (proposedMarkdown) and published within the author's authorization. Returned URLs are verified against project state.",
|
|
220
|
+
relatedTools: [
|
|
221
|
+
'generate_icon_workflow',
|
|
222
|
+
'generate_welcome_page_workflow',
|
|
223
|
+
'list_privacy_policy_versions',
|
|
224
|
+
'get_privacy_policy_version',
|
|
225
|
+
'update_privacy_policy_with_ai',
|
|
226
|
+
'publish_privacy_policy',
|
|
227
|
+
'get_project_state',
|
|
228
|
+
],
|
|
201
229
|
doneWhen: 'Assets show the real product; hosted links load and match actual data practices; installation/uninstallation flows work.',
|
|
202
230
|
},
|
|
203
231
|
{
|
|
204
232
|
id: 'quality-and-listing',
|
|
205
|
-
actions: '
|
|
233
|
+
actions: 'Stage 7 — Quality and listing: each browser package is built; unit/integration checks and manual browser scenarios run. Disclosures, permission justifications, listing copy and screenshots are reviewed against the build (CLI review-risk and generate-listing; exact commands in the CLI docs). The final package is scanned, and CI follows the cli-github-actions docs.',
|
|
234
|
+
relatedTools: ['search_docs', 'scan_extension'],
|
|
206
235
|
doneWhen: 'The exact versioned artifact has passing checks, retained scan/review reports and truthful store materials; unresolved findings have a disposition.',
|
|
207
236
|
},
|
|
208
237
|
{
|
|
209
238
|
id: 'release',
|
|
210
|
-
actions: "
|
|
239
|
+
actions: "Stage 8 — Release: store accounts, credentials and submission access are verified; a validate-only run precedes submission where available. The tested artifact is submitted within the user's publishing authorization through local MCP, CLI or the store console. Upload, submission, approval and public-listing status are recorded separately.",
|
|
240
|
+
relatedTools: ['publish_extension'],
|
|
211
241
|
doneWhen: 'Store status and installed version are verified; pending store review is reported as pending, with artifact and source commit recorded.',
|
|
212
242
|
},
|
|
213
243
|
{
|
|
214
244
|
id: 'operate',
|
|
215
|
-
actions: '
|
|
245
|
+
actions: 'Stage 9 — Operate: catalog listing claim, declarations and security badge, findings and uninstall feedback, optional purchase/license flow checks, and planned updates. Later versions repeat the build, review, scan, policy and release checks.',
|
|
246
|
+
relatedTools: ['get_reviews', 'get_security', 'get_project_state'],
|
|
216
247
|
doneWhen: 'A handoff records repository/commit, artifacts, URLs, checks, remaining blockers, support owner and follow-up work.',
|
|
217
248
|
},
|
|
218
249
|
];
|
|
219
|
-
|
|
250
|
+
/** Top-level sections of the full guide, selectable via the `sections` parameter. */
|
|
251
|
+
export const GUIDE_SECTIONS = [
|
|
252
|
+
'tools',
|
|
253
|
+
'localActions',
|
|
254
|
+
'services',
|
|
255
|
+
'repository',
|
|
256
|
+
'workflow',
|
|
257
|
+
'handoff',
|
|
258
|
+
];
|
|
259
|
+
const SECTION_SUMMARIES = {
|
|
260
|
+
tools: 'Every tool registered on this connection: description, read-only/destructive hints and docs links.',
|
|
261
|
+
localActions: 'Artifact scan and store publishing: availability on this connection and the local fallback.',
|
|
262
|
+
services: 'Service directory: purpose, related tools, access requirements and URLs per lifecycle area.',
|
|
263
|
+
repository: 'Git repository recommendation, setup, layout and secret-handling practice.',
|
|
264
|
+
workflow: 'The nine lifecycle stages with descriptions, related tools and exit criteria.',
|
|
265
|
+
handoff: 'Items a completed handoff records.',
|
|
266
|
+
};
|
|
267
|
+
const AVAILABILITY = 'Tool lists describe the tools registered on THIS connection. Registration does not prove account access, remaining credits or local prerequisites. Service URLs describe where work happens; account/project access is checked live. Exact input schemas come from MCP tools/list. This guide makes no network calls.';
|
|
268
|
+
function buildSections(registeredTools) {
|
|
220
269
|
const names = new Set(registeredTools.map((tool) => tool.name));
|
|
221
270
|
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
271
|
tools: registeredTools.map((tool) => ({
|
|
226
272
|
...tool,
|
|
227
273
|
docs: [
|
|
@@ -231,7 +277,7 @@ export function buildDevelopmentGuide(registeredTools) {
|
|
|
231
277
|
localActions: ['scan_extension', 'publish_extension'].map((name) => ({
|
|
232
278
|
name,
|
|
233
279
|
availableInThisConnection: names.has(name),
|
|
234
|
-
fallback: '
|
|
280
|
+
fallback: 'Available through local @extenshi/mcp (stdio), or npx @extenshi/cli@latest on the machine holding the artifact. Exact commands and prerequisites: the CLI documentation.',
|
|
235
281
|
docs: docs('cli'),
|
|
236
282
|
})),
|
|
237
283
|
services: DEVELOPMENT_SERVICES.map(({ tools, ...service }) => ({
|
|
@@ -239,18 +285,18 @@ export function buildDevelopmentGuide(registeredTools) {
|
|
|
239
285
|
toolsInThisConnection: tools.filter((name) => names.has(name)),
|
|
240
286
|
})),
|
|
241
287
|
repository: {
|
|
242
|
-
recommendation: '
|
|
243
|
-
setup: "
|
|
288
|
+
recommendation: 'Source lives in a developer-owned Git repository; GitHub fits the existing dojo integration and GitHub Actions. An already-bound repository is reused. GitLab, Bitbucket or self-hosted Git also work with local code and CI; automatic dojo binding for them is not provided by these MCP tools.',
|
|
289
|
+
setup: "Repository owner and visibility are the developer's choice; private unless public source is intended. GitHub connects at https://dojo.extenshi.io/integrations, and the repository is selected in the project where enabled. Repository creation and writes go through GitHub, its connector/CLI or the cabinet, with the user's authorization.",
|
|
244
290
|
layout: [
|
|
245
291
|
'README.md: setup, target browsers, build/test/release commands',
|
|
246
292
|
'src/: extension logic and extenshi.config.js at the path supplied by the project',
|
|
247
|
-
'assets/ and _locales/: icons and translations (
|
|
293
|
+
'assets/ and _locales/: icons and translations (following the chosen framework layout)',
|
|
248
294
|
'tests/: behavior and browser scenarios',
|
|
249
295
|
'docs/: privacy source, listing copy, support and release checklist',
|
|
250
296
|
'.github/workflows/: build, tests and artifact scan',
|
|
251
|
-
'dist/: generated per-browser packages;
|
|
297
|
+
'dist/: generated per-browser packages; versioned artifacts attached to CI/releases',
|
|
252
298
|
],
|
|
253
|
-
practice: '
|
|
299
|
+
practice: 'Committed: source, dependency lockfile and .env.example with placeholders. Kept in local/CI secret storage: tokens, store credentials, signing keys, .env and user data. Changes go through branches and reviewable pull requests; release artifacts are associated with a source commit/tag.',
|
|
254
300
|
docs: [
|
|
255
301
|
'https://docs.github.com/en/repositories/creating-and-managing-repositories/quickstart-for-repositories',
|
|
256
302
|
docs('cli-github-actions'),
|
|
@@ -270,4 +316,37 @@ export function buildDevelopmentGuide(registeredTools) {
|
|
|
270
316
|
],
|
|
271
317
|
};
|
|
272
318
|
}
|
|
319
|
+
/** Normalise a caller's `sections` argument: unknown ids are dropped, `all` expands. */
|
|
320
|
+
export function resolveGuideSections(requested) {
|
|
321
|
+
if (!requested || requested.length === 0)
|
|
322
|
+
return [];
|
|
323
|
+
if (requested.includes('all'))
|
|
324
|
+
return [...GUIDE_SECTIONS];
|
|
325
|
+
return GUIDE_SECTIONS.filter((section) => requested.includes(section));
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* Build the guide. With no `sections`, returns the compact overview: tool names,
|
|
329
|
+
* workflow stage ids with exit criteria, and a table of contents. Listed
|
|
330
|
+
* sections (or `all`) are returned in full.
|
|
331
|
+
*/
|
|
332
|
+
export function buildDevelopmentGuide(registeredTools, requested) {
|
|
333
|
+
const sections = resolveGuideSections(requested);
|
|
334
|
+
const full = buildSections(registeredTools);
|
|
335
|
+
const base = { schemaVersion: 2, documentation: DEVELOPMENT_GUIDE_URL, availability: AVAILABILITY };
|
|
336
|
+
if (sections.length > 0) {
|
|
337
|
+
return { ...base, ...Object.fromEntries(sections.map((section) => [section, full[section]])) };
|
|
338
|
+
}
|
|
339
|
+
return {
|
|
340
|
+
...base,
|
|
341
|
+
overview: 'Extenshi development lifecycle reference: idea and research, project and repository, scaffold, implementation, assets and hosted pages, quality and listing, store release, maintenance.',
|
|
342
|
+
toolNames: registeredTools.map((tool) => tool.name),
|
|
343
|
+
workflowStages: WORKFLOW.map(({ id, doneWhen }) => ({ id, doneWhen })),
|
|
344
|
+
contents: GUIDE_SECTIONS.map((id) => ({
|
|
345
|
+
section: id,
|
|
346
|
+
summary: SECTION_SUMMARIES[id],
|
|
347
|
+
entries: Array.isArray(full[id]) ? full[id].length : undefined,
|
|
348
|
+
})),
|
|
349
|
+
sectionsParameter: 'Full sections are included when named in the `sections` argument (e.g. ["workflow", "services"]); "all" returns every section.',
|
|
350
|
+
};
|
|
351
|
+
}
|
|
273
352
|
//# sourceMappingURL=development-guide.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"development-guide.js","sourceRoot":"","sources":["../src/development-guide.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"development-guide.js","sourceRoot":"","sources":["../src/development-guide.ts"],"names":[],"mappings":"AAoBA,MAAM,IAAI,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,uCAAuC,IAAI,EAAE,CAAA;AAC5E,MAAM,QAAQ,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,kCAAkC,GAAG,EAAE,CAAA;AAEzE,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,CAAC,sBAAsB,CAAC,CAAA;AAEjE,MAAM,CAAC,MAAM,oBAAoB,GAAG;IACnC;QACC,EAAE,EAAE,eAAe;QACnB,OAAO,EAAE,iFAAiF;QAC1F,KAAK,EAAE,CAAC,uBAAuB,EAAE,aAAa,EAAE,0BAA0B,CAAC;QAC3E,MAAM,EAAE,gFAAgF;QACxF,IAAI,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,qBAAqB,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;KAChE;IACD;QACC,EAAE,EAAE,SAAS;QACb,OAAO,EAAE,gFAAgF;QACzF,KAAK,EAAE,CAAC,oBAAoB,EAAE,wBAAwB,CAAC;QACvD,MAAM,EAAE,yFAAyF;QACjG,IAAI,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,mCAAmC,EAAE,kCAA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+38,53 @@ export declare function splitSections(full: string): DocSection[];
|
|
|
38
38
|
* the body. Pure (no I/O) so it is unit-testable with a fixture.
|
|
39
39
|
*/
|
|
40
40
|
export declare function rankSections(full: string, query: string, limit: number): DocSection[];
|
|
41
|
+
/**
|
|
42
|
+
* One searchable passage: a `##` subsection of a docs page (or the page intro
|
|
43
|
+
* before its first `##`). Returning passages instead of whole pages keeps a
|
|
44
|
+
* search result proportional to the question — a page can run to 8k+ chars,
|
|
45
|
+
* while the answer usually lives in one subsection.
|
|
46
|
+
*/
|
|
47
|
+
export interface DocPassage {
|
|
48
|
+
page: string;
|
|
49
|
+
heading?: string;
|
|
50
|
+
url?: string;
|
|
51
|
+
body: string;
|
|
52
|
+
}
|
|
53
|
+
/** Split `llms-full.txt` into `##`-level passages, fence-aware, carrying the page source URL. */
|
|
54
|
+
export declare function splitPassages(full: string): DocPassage[];
|
|
55
|
+
/**
|
|
56
|
+
* Rank passages against a query with BM25 over passage bodies, so a long
|
|
57
|
+
* passage that merely repeats common words does not outrank a short one that
|
|
58
|
+
* answers the question. Heading and page-title matches add a bonus; hyphenated
|
|
59
|
+
* or long tokens (command and flag names) get a phrase boost. Pure (no I/O) so
|
|
60
|
+
* it is unit-testable with a fixture.
|
|
61
|
+
*/
|
|
62
|
+
export declare function rankPassages(full: string, query: string, limit: number): DocPassage[];
|
|
63
|
+
/** Default and bounds for the per-result excerpt length (characters). */
|
|
64
|
+
export declare const DEFAULT_EXCERPT_CHARS = 1500;
|
|
65
|
+
export declare const MIN_EXCERPT_CHARS = 200;
|
|
66
|
+
export declare const MAX_EXCERPT_CHARS = 8000;
|
|
67
|
+
/**
|
|
68
|
+
* Cut a passage to `maxChars` on a line boundary. An unterminated code fence is
|
|
69
|
+
* closed so the rest of the response still renders as prose.
|
|
70
|
+
*/
|
|
71
|
+
export declare function excerpt(body: string, maxChars: number): {
|
|
72
|
+
text: string;
|
|
73
|
+
truncated: boolean;
|
|
74
|
+
};
|
|
41
75
|
/** Fetch the docs index (`llms.txt`) — the page list returned when no query is given. */
|
|
42
76
|
export declare function getDocsIndex(docsUrl: string): Promise<string>;
|
|
77
|
+
export interface SearchDocsOptions {
|
|
78
|
+
/** Max passages returned. */
|
|
79
|
+
limit: number;
|
|
80
|
+
/** Max characters per passage excerpt. */
|
|
81
|
+
maxChars?: number;
|
|
82
|
+
}
|
|
83
|
+
/** Render ranked passages: page › heading, source URL, bounded excerpt. Pure. */
|
|
84
|
+
export declare function renderPassages(query: string, matches: DocPassage[], maxChars: number): string;
|
|
43
85
|
/**
|
|
44
|
-
* Search the docs and return
|
|
45
|
-
*
|
|
46
|
-
* note pointing at the index.
|
|
86
|
+
* Search the docs and return the top matching passages, each with its source
|
|
87
|
+
* link and a bounded excerpt. Falls back to a "nothing matched" note.
|
|
47
88
|
*/
|
|
48
|
-
export declare function searchDocs(docsUrl: string, query: string,
|
|
89
|
+
export declare function searchDocs(docsUrl: string, query: string, options: SearchDocsOptions): Promise<string>;
|
|
49
90
|
//# sourceMappingURL=docs.d.ts.map
|
package/dist/docs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../src/docs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,qEAAqE;AACrE,qBAAa,SAAU,SAAQ,KAAK;gBACvB,OAAO,EAAE,MAAM;CAI3B;AAED,4EAA4E;AAC5E,MAAM,WAAW,UAAU;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;CACZ;AAkDD,mEAAmE;AACnE,wBAAgB,cAAc,IAAI,IAAI,CAErC;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,EAAE,CAyBxD;AAoCD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,UAAU,E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