@docsector/docsector-reader 4.1.0 → 4.3.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 +16 -6
- package/bin/docsector.js +1 -1
- package/docsector.config.js +15 -0
- package/package.json +1 -1
- package/public/.well-known/agent-skills/docsector-documentation-authoring/SKILL.md +118 -0
- package/public/.well-known/agent-skills/docsector-documentation-authoring/references/authoring-patterns.md +98 -0
- package/public/.well-known/agent-skills/docsector-documentation-authoring/references/block-catalog.md +321 -0
- package/public/.well-known/agent-skills/docsector-documentation-authoring/references/mcp-webmcp.md +90 -0
- package/public/.well-known/agent-skills/docsector-documentation-authoring/references/page-structure.md +101 -0
- package/public/api/manual/http-client.json +91 -0
- package/public/quasar-api/QSeparator.json +39 -0
- package/src/components/DBlockApi.vue +634 -0
- package/src/components/DBlockApiEntry.js +623 -0
- package/src/components/DBlockCodeExample.vue +22 -0
- package/src/components/DBlockSourceCode.vue +2 -4
- package/src/components/DMenu.vue +70 -25
- package/src/components/DPageTokens.vue +8 -0
- package/src/components/api-block-model.js +326 -0
- package/src/components/page-section-tokens.js +53 -1
- package/src/components/source-code-lines.js +17 -0
- package/src/pages/manual/basic/agent-skills.overview.en-US.md +77 -0
- package/src/pages/manual/basic/agent-skills.overview.pt-BR.md +77 -0
- package/src/pages/manual/content/blocks/api-reference.overview.en-US.md +40 -0
- package/src/pages/manual/content/blocks/api-reference.overview.pt-BR.md +40 -0
- package/src/pages/manual/content/blocks/api-reference.showcase.en-US.md +33 -0
- package/src/pages/manual/content/blocks/api-reference.showcase.pt-BR.md +33 -0
- package/src/pages/manual.index.js +57 -0
package/public/.well-known/agent-skills/docsector-documentation-authoring/references/mcp-webmcp.md
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# MCP and WebMCP Reference
|
|
2
|
+
|
|
3
|
+
Docsector can expose documentation to agents through MCP, WebMCP, Markdown negotiation, and `llms.txt`. Use these sources when an assistant needs current docs instead of only the static guidance in this skill.
|
|
4
|
+
|
|
5
|
+
## MCP Server
|
|
6
|
+
|
|
7
|
+
When configured, Docsector generates an MCP endpoint at:
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
/mcp
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
The server exposes tools named with the configured suffix:
|
|
14
|
+
|
|
15
|
+
| Tool | Purpose |
|
|
16
|
+
| ------------------- | ------------------------------------- |
|
|
17
|
+
| `search_{suffix}` | Search documentation pages by keyword |
|
|
18
|
+
| `get_page_{suffix}` | Fetch raw Markdown for a page path |
|
|
19
|
+
|
|
20
|
+
This repository configures `toolSuffix: 'docsector'`, so connected MCP clients should see:
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
search_docsector
|
|
24
|
+
get_page_docsector
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## MCP Page Paths
|
|
28
|
+
|
|
29
|
+
`get_page_{suffix}` expects paths without a leading slash, trailing slash, or `.md` suffix. It can try an `/overview` fallback when the primary path is not found.
|
|
30
|
+
|
|
31
|
+
Useful examples:
|
|
32
|
+
|
|
33
|
+
```text
|
|
34
|
+
manual/content/blocks/quick-links/overview
|
|
35
|
+
manual/content/blocks/cards/overview
|
|
36
|
+
manual/content/blocks/code-examples/overview
|
|
37
|
+
manual/content/blocks/api-reference/overview
|
|
38
|
+
manual/content/blocks/timeline/showcase
|
|
39
|
+
guide/getting-started/overview
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Recommended Agent Flow
|
|
43
|
+
|
|
44
|
+
1. Use `search_{suffix}` for discovery, such as `search_docsector` with `"timeline block"`.
|
|
45
|
+
2. Use `get_page_{suffix}` with the best matching path.
|
|
46
|
+
3. Read the returned Markdown examples before authoring or changing a custom element.
|
|
47
|
+
4. Prefer the live manual page when it conflicts with this static skill.
|
|
48
|
+
5. If MCP is not connected, use Markdown URLs, `llms.txt`, or the references bundled with this skill.
|
|
49
|
+
|
|
50
|
+
## WebMCP Browser Tools
|
|
51
|
+
|
|
52
|
+
When `navigator.modelContext` is available in a secure browser context, Docsector can register browser-side tools. Typical tool names are:
|
|
53
|
+
|
|
54
|
+
| Tool | Purpose |
|
|
55
|
+
| ------------------------ | ----------------------------------------------------------------- |
|
|
56
|
+
| `docs.search_docs` | Search docs through the MCP bridge |
|
|
57
|
+
| `docs.get_page` | Fetch page Markdown through the MCP bridge |
|
|
58
|
+
| `docs.navigate_to` | Navigate the single-page app to a route and optional hash |
|
|
59
|
+
| `docs.copy_current_page` | Return the current page path, Markdown URL, and optionally source |
|
|
60
|
+
|
|
61
|
+
Use these tools when working inside a Docsector page with a browser agent. Use MCP tools directly when working from an editor or external assistant.
|
|
62
|
+
|
|
63
|
+
## Markdown and LLM Discovery
|
|
64
|
+
|
|
65
|
+
Docsector pages can expose raw Markdown in several ways:
|
|
66
|
+
|
|
67
|
+
- Append `.md` to a page URL.
|
|
68
|
+
- Send `Accept: text/markdown` to use Markdown negotiation.
|
|
69
|
+
- Use `/llms.txt` for an index of pages when `siteUrl` is configured.
|
|
70
|
+
- Use `/llms-full.txt` for concatenated full content when generated.
|
|
71
|
+
|
|
72
|
+
These are useful fallbacks when MCP is unavailable.
|
|
73
|
+
|
|
74
|
+
## Discovery Artifacts
|
|
75
|
+
|
|
76
|
+
Docsector can also publish machine-readable discovery files:
|
|
77
|
+
|
|
78
|
+
| Artifact | Purpose |
|
|
79
|
+
| -------------------------------------- | ---------------------------- |
|
|
80
|
+
| `/.well-known/mcp/server-card.json` | MCP server discovery |
|
|
81
|
+
| `/.well-known/agent-skills/index.json` | Agent Skills Discovery index |
|
|
82
|
+
| `/.well-known/api-catalog` | API catalog Linkset JSON |
|
|
83
|
+
|
|
84
|
+
## Caveats
|
|
85
|
+
|
|
86
|
+
- MCP search indexes pages, not individual component schemas.
|
|
87
|
+
- Public API JSON files under `/api/...` and `/quasar-api/...` are static assets and may not be directly searchable through MCP page search.
|
|
88
|
+
- WebMCP requires browser support for `navigator.modelContext` and a secure context, except where localhost is allowed by the browser.
|
|
89
|
+
- Generated MCP indexes are build artifacts, so a production build is required after source changes.
|
|
90
|
+
- If multiple Docsector sites are connected to the same assistant, each site should use a unique MCP tool suffix.
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Docsector Page Structure
|
|
2
|
+
|
|
3
|
+
Use this reference when adding or editing Docsector content files, assets, examples, and API reference data.
|
|
4
|
+
|
|
5
|
+
## Page Sources
|
|
6
|
+
|
|
7
|
+
Docsector pages are registered in index files such as `src/pages/manual.index.js` and backed by localized Markdown files under `src/pages/`.
|
|
8
|
+
|
|
9
|
+
Manual content blocks follow this pattern:
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
src/pages/manual/content/blocks/{block}.overview.en-US.md
|
|
13
|
+
src/pages/manual/content/blocks/{block}.showcase.en-US.md
|
|
14
|
+
src/pages/manual/content/blocks/{block}.overview.pt-BR.md
|
|
15
|
+
src/pages/manual/content/blocks/{block}.showcase.pt-BR.md
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
The route path maps to MCP/page paths such as:
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
manual/content/blocks/cards/overview
|
|
22
|
+
manual/content/blocks/cards/showcase
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Overview and Showcase
|
|
26
|
+
|
|
27
|
+
Use `overview` for conceptual explanation, syntax, attributes, and authoring notes. Use `showcase` for varied examples that demonstrate the block in realistic content.
|
|
28
|
+
|
|
29
|
+
Most block docs should include both subpages. Structure docs such as page, subpage, or books may use different subpage rules depending on their registry configuration.
|
|
30
|
+
|
|
31
|
+
## Localization
|
|
32
|
+
|
|
33
|
+
Localized Markdown files use locale suffixes such as `.en-US.md` and `.pt-BR.md`. Keep route structure and headings aligned across locales when possible so translation progress and navigation remain useful.
|
|
34
|
+
|
|
35
|
+
New repository-facing documentation and AI customization files should be written in English unless the file is explicitly a locale-specific translation.
|
|
36
|
+
|
|
37
|
+
## Assets
|
|
38
|
+
|
|
39
|
+
Use public site paths in Markdown:
|
|
40
|
+
|
|
41
|
+
| Asset Type | Repo Location | Public Path |
|
|
42
|
+
| --------------- | ----------------------- | ----------------- |
|
|
43
|
+
| Images | `public/images/...` | `/images/...` |
|
|
44
|
+
| Files | `public/files/...` | `/files/...` |
|
|
45
|
+
| Manual API JSON | `public/api/manual/...` | `/api/manual/...` |
|
|
46
|
+
| Quasar API JSON | `public/quasar-api/...` | `/quasar-api/...` |
|
|
47
|
+
|
|
48
|
+
Prefer absolute public paths in documentation so pages keep working when routes move.
|
|
49
|
+
|
|
50
|
+
## Code Examples
|
|
51
|
+
|
|
52
|
+
Live code examples are Vue SFC files discovered from `src/examples/**/*.vue`.
|
|
53
|
+
|
|
54
|
+
Reference them with:
|
|
55
|
+
|
|
56
|
+
```html
|
|
57
|
+
<d-block-code-example
|
|
58
|
+
src="manual/code-examples/basic-counter"
|
|
59
|
+
title="Basic counter"
|
|
60
|
+
/>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
The `src` value is normalized to kebab-case and resolves to a PascalCase `.vue` file. For example, `manual/code-examples/basic-counter` resolves to `src/examples/manual/code-examples/BasicCounter.vue`.
|
|
64
|
+
|
|
65
|
+
Use `file` as an alias for `src` only when migrating from Quasar Docs-style examples.
|
|
66
|
+
|
|
67
|
+
## API Reference JSON
|
|
68
|
+
|
|
69
|
+
API blocks fetch JSON from same-origin public assets:
|
|
70
|
+
|
|
71
|
+
```html
|
|
72
|
+
<d-block-api
|
|
73
|
+
src="/api/manual/http-client.json"
|
|
74
|
+
title="HTTP Client API"
|
|
75
|
+
page-link="true"
|
|
76
|
+
/>
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
The JSON can follow Quasar's API schema. Useful sections include `props`, `methods`, `events`, `value`, `arg`, and `quasarConfOptions`. Entries marked `internal: true` are hidden.
|
|
80
|
+
|
|
81
|
+
## Navigation and Metadata
|
|
82
|
+
|
|
83
|
+
Page registry entries in `src/pages/*.index.js` define titles, status, icons, books, menu placement, subpage availability, descriptions, and search tags.
|
|
84
|
+
|
|
85
|
+
When adding new content, check the nearest existing entry and keep metadata consistent with that section.
|
|
86
|
+
|
|
87
|
+
## Authoring Rules
|
|
88
|
+
|
|
89
|
+
- Prefer Markdown for simple content.
|
|
90
|
+
- Use custom elements only when they add structure, interaction, or a clearer reading path.
|
|
91
|
+
- Use `to` for internal Docsector routes and `href` for external URLs.
|
|
92
|
+
- Avoid repeating the same Markdown source in multiple routes.
|
|
93
|
+
- Keep page headings outside Expandable, Stepper, and Timeline bodies when they are meant to appear in the page-level table of contents.
|
|
94
|
+
- Avoid unsupported nested custom block combinations unless current manual docs explicitly show the pattern.
|
|
95
|
+
|
|
96
|
+
## Validation Pointers
|
|
97
|
+
|
|
98
|
+
- Parser behavior is centered in `src/components/page-section-tokens.js`.
|
|
99
|
+
- Rendering is dispatched by `src/components/DPageTokens.vue`.
|
|
100
|
+
- Manual block registration is covered by `tests/manual-content-showcases.spec.js`.
|
|
101
|
+
- Parser and block edge cases are covered by focused tests such as `tests/page-section-tokens.spec.js`, `tests/code-example-source.spec.js`, `tests/embedded-url-providers.spec.js`, and `tests/api-block-model.spec.js`.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"docsUrl": "https://example.com/sdk/http-client"
|
|
4
|
+
},
|
|
5
|
+
"props": {
|
|
6
|
+
"baseUrl": {
|
|
7
|
+
"type": "String",
|
|
8
|
+
"desc": "Base URL used by the client.",
|
|
9
|
+
"default": "https://api.example.com",
|
|
10
|
+
"examples": ["https://api.example.com", "https://staging.example.com"],
|
|
11
|
+
"category": "configuration"
|
|
12
|
+
},
|
|
13
|
+
"timeout": {
|
|
14
|
+
"type": "Number",
|
|
15
|
+
"desc": "Request timeout in milliseconds.",
|
|
16
|
+
"default": 10000,
|
|
17
|
+
"category": "configuration"
|
|
18
|
+
},
|
|
19
|
+
"retries": {
|
|
20
|
+
"type": "Number",
|
|
21
|
+
"desc": "Retry attempts for idempotent calls.",
|
|
22
|
+
"default": 2,
|
|
23
|
+
"category": "behavior"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"methods": {
|
|
27
|
+
"request": {
|
|
28
|
+
"desc": "Perform an HTTP request.",
|
|
29
|
+
"params": {
|
|
30
|
+
"options": {
|
|
31
|
+
"type": "Object",
|
|
32
|
+
"desc": "Request options.",
|
|
33
|
+
"required": true,
|
|
34
|
+
"definition": {
|
|
35
|
+
"url": {
|
|
36
|
+
"type": "String",
|
|
37
|
+
"desc": "Absolute or relative URL.",
|
|
38
|
+
"required": true,
|
|
39
|
+
"examples": ["/status", "https://example.com/health"]
|
|
40
|
+
},
|
|
41
|
+
"method": {
|
|
42
|
+
"type": "String",
|
|
43
|
+
"desc": "HTTP method.",
|
|
44
|
+
"default": "GET",
|
|
45
|
+
"examples": ["GET", "POST"]
|
|
46
|
+
},
|
|
47
|
+
"headers": {
|
|
48
|
+
"type": "Object",
|
|
49
|
+
"desc": "Additional request headers.",
|
|
50
|
+
"required": false
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"returns": {
|
|
56
|
+
"type": "Promise<ResponseLike>",
|
|
57
|
+
"desc": "Resolves with the parsed response wrapper."
|
|
58
|
+
},
|
|
59
|
+
"examples": ["client.request({ url: '/status' })"]
|
|
60
|
+
},
|
|
61
|
+
"cancelAll": {
|
|
62
|
+
"desc": "Abort all in-flight requests.",
|
|
63
|
+
"returns": {
|
|
64
|
+
"type": "void",
|
|
65
|
+
"desc": "No return value."
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"events": {
|
|
70
|
+
"response": {
|
|
71
|
+
"desc": "Emitted after a response is resolved.",
|
|
72
|
+
"params": {
|
|
73
|
+
"payload": {
|
|
74
|
+
"type": "Object",
|
|
75
|
+
"desc": "Resolved response payload.",
|
|
76
|
+
"required": true
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"error": {
|
|
81
|
+
"desc": "Emitted when a request fails.",
|
|
82
|
+
"params": {
|
|
83
|
+
"error": {
|
|
84
|
+
"type": "Error",
|
|
85
|
+
"desc": "The original request error.",
|
|
86
|
+
"required": true
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"docsUrl": "https://v2.quasar.dev/vue-components/separator"
|
|
4
|
+
},
|
|
5
|
+
|
|
6
|
+
"props": {
|
|
7
|
+
"dark": {
|
|
8
|
+
"extends": "dark"
|
|
9
|
+
},
|
|
10
|
+
|
|
11
|
+
"spaced": {
|
|
12
|
+
"type": ["Boolean", "String"],
|
|
13
|
+
"desc": "If set to true, the corresponding direction margins will be set to 8px; It can also be set to a size in CSS units, including unit name, or one of the xs|sm|md|lg|xl predefined sizes",
|
|
14
|
+
"examples": ["'12px'", "'sm'", "'md'"],
|
|
15
|
+
"category": "content"
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
"inset": {
|
|
19
|
+
"type": ["Boolean", "String"],
|
|
20
|
+
"desc": "If set to Boolean true, the left and right margins will be set to 16px. If set to 'item' then it will match a QItem's design. If set to 'item-thumbnail' then it will match the design of a QItem with a thumbnail on the left side",
|
|
21
|
+
"values": ["true", "false", "'item'", "'item-thumbnail'"],
|
|
22
|
+
"category": "content"
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
"vertical": {
|
|
26
|
+
"type": "Boolean",
|
|
27
|
+
"desc": "If set to true, the separator will be vertical.",
|
|
28
|
+
"category": "content"
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
"size": {
|
|
32
|
+
"extends": "size"
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
"color": {
|
|
36
|
+
"extends": "color"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|