@taurgis/bonsai 3.1.0 → 3.2.2
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 +21 -4
- package/agents/agents/salesforce-docs-researcher.agent.md +14 -1
- package/agents/instructions/salesforce-research.instructions.md +2 -1
- package/bin/cli.mjs +9 -17
- package/dist/base-command.d.ts +37 -10
- package/dist/base-command.js +113 -46
- package/dist/commands/config/base.js +11 -2
- package/dist/commands/config/get.js +8 -12
- package/dist/commands/config/index.js +2 -2
- package/dist/commands/config/list.js +10 -16
- package/dist/commands/config/set.d.ts +2 -1
- package/dist/commands/config/set.js +34 -27
- package/dist/commands/config/unset.d.ts +2 -1
- package/dist/commands/config/unset.js +25 -24
- package/dist/commands/fetch.d.ts +7 -15
- package/dist/commands/fetch.js +58 -401
- package/dist/commands/import.d.ts +4 -9
- package/dist/commands/import.js +56 -280
- package/dist/commands/inspect.d.ts +7 -1
- package/dist/commands/inspect.js +103 -52
- package/dist/commands/list.d.ts +13 -1
- package/dist/commands/list.js +79 -32
- package/dist/commands/prune.d.ts +4 -1
- package/dist/commands/prune.js +56 -65
- package/dist/commands/status.d.ts +3 -2
- package/dist/commands/status.js +52 -79
- package/dist/hooks/command-not-found/suggest.d.ts +1 -0
- package/dist/hooks/command-not-found/suggest.js +66 -39
- package/dist/lib/argv.d.ts +24 -3
- package/dist/lib/argv.js +124 -53
- package/dist/lib/batch.d.ts +41 -0
- package/dist/lib/batch.js +39 -0
- package/dist/lib/cache-view.d.ts +21 -0
- package/dist/lib/cache-view.js +30 -0
- package/dist/lib/cli-emit.d.ts +28 -0
- package/dist/lib/cli-emit.js +44 -0
- package/dist/lib/cli-error-policy.d.ts +57 -0
- package/dist/lib/cli-error-policy.js +74 -0
- package/dist/lib/cli-flag-manifest.d.ts +5 -0
- package/dist/lib/cli-flag-manifest.js +8 -0
- package/dist/lib/cli-presentation.d.ts +39 -0
- package/dist/lib/cli-presentation.js +50 -0
- package/dist/lib/cli-result-types.d.ts +88 -0
- package/dist/lib/cli-result-types.js +2 -0
- package/dist/lib/config/index.d.ts +22 -4
- package/dist/lib/config/index.js +59 -4
- package/dist/lib/config/resolve.d.ts +21 -0
- package/dist/lib/config/resolve.js +55 -6
- package/dist/lib/config-persist.d.ts +28 -0
- package/dist/lib/config-persist.js +29 -0
- package/dist/lib/envelope.d.ts +41 -3
- package/dist/lib/envelope.js +147 -4
- package/dist/lib/help-preflight.d.ts +5 -8
- package/dist/lib/help-preflight.js +13 -32
- package/dist/lib/json-meta.d.ts +0 -2
- package/dist/lib/json-meta.js +21 -25
- package/dist/lib/limit-flag.d.ts +11 -1
- package/dist/lib/limit-flag.js +19 -6
- package/dist/lib/parse-error-ux.d.ts +5 -0
- package/dist/lib/parse-error-ux.js +73 -0
- package/dist/lib/prune-flags.d.ts +28 -0
- package/dist/lib/prune-flags.js +74 -0
- package/dist/lib/research/artifact-index.d.ts +11 -2
- package/dist/lib/research/artifact-index.js +7 -4
- package/dist/lib/research/browser.d.ts +41 -2
- package/dist/lib/research/browser.js +139 -50
- package/dist/lib/research/capture.d.ts +24 -2
- package/dist/lib/research/capture.js +24 -4
- package/dist/lib/research/cli-io.d.ts +33 -0
- package/dist/lib/research/cli-io.js +27 -0
- package/dist/lib/research/compress.d.ts +7 -0
- package/dist/lib/research/compress.js +7 -3
- package/dist/lib/research/docs/capabilities.d.ts +15 -0
- package/dist/lib/research/docs/capabilities.js +5 -0
- package/dist/lib/research/docs/clean-dom.d.ts +2 -0
- package/dist/lib/research/docs/clean-dom.js +2 -0
- package/dist/lib/research/docs/code-blocks.d.ts +2 -0
- package/dist/lib/research/docs/code-blocks.js +2 -0
- package/dist/lib/research/docs/detect.d.ts +4 -0
- package/dist/lib/research/docs/detect.js +4 -0
- package/dist/lib/research/docs/machine-readable.d.ts +18 -0
- package/dist/lib/research/docs/machine-readable.js +10 -0
- package/dist/lib/research/docs/markdown-source.d.ts +20 -0
- package/dist/lib/research/docs/markdown-source.js +19 -2
- package/dist/lib/research/docs/quality-gates.d.ts +5 -0
- package/dist/lib/research/docs/quality-gates.js +4 -0
- package/dist/lib/research/docs/rsc.d.ts +9 -2
- package/dist/lib/research/docs/rsc.js +5 -2
- package/dist/lib/research/docs/section-artifacts.d.ts +12 -0
- package/dist/lib/research/docs/section-artifacts.js +12 -0
- package/dist/lib/research/docs/sections.d.ts +18 -0
- package/dist/lib/research/docs/sections.js +17 -1
- package/dist/lib/research/docs/source-map.d.ts +28 -0
- package/dist/lib/research/docs/source-map.js +27 -0
- package/dist/lib/research/docs/validate.d.ts +35 -2
- package/dist/lib/research/docs/validate.js +47 -2
- package/dist/lib/research/extract.d.ts +16 -0
- package/dist/lib/research/extract.js +12 -1
- package/dist/lib/research/fetch-command-service.d.ts +36 -0
- package/dist/lib/research/fetch-command-service.js +310 -0
- package/dist/lib/research/fetch-result.d.ts +114 -0
- package/dist/lib/research/fetch-result.js +212 -0
- package/dist/lib/research/fetcher.d.ts +46 -8
- package/dist/lib/research/fetcher.js +58 -30
- package/dist/lib/research/freshness.d.ts +54 -11
- package/dist/lib/research/freshness.js +91 -31
- package/dist/lib/research/import-command-service.d.ts +56 -0
- package/dist/lib/research/import-command-service.js +381 -0
- package/dist/lib/research/keywords.js +5 -1
- package/dist/lib/research/markdown.d.ts +12 -1
- package/dist/lib/research/markdown.js +13 -5
- package/dist/lib/research/persist-artifact.d.ts +23 -0
- package/dist/lib/research/persist-artifact.js +27 -0
- package/dist/lib/research/prompt-injection.d.ts +8 -0
- package/dist/lib/research/prompt-injection.js +42 -13
- package/dist/lib/research/proxy.d.ts +14 -8
- package/dist/lib/research/proxy.js +14 -10
- package/dist/lib/research/revalidate.d.ts +49 -20
- package/dist/lib/research/revalidate.js +80 -15
- package/dist/lib/research/schema.d.ts +7 -0
- package/dist/lib/research/schema.js +2 -0
- package/dist/lib/research/secret-scan.d.ts +6 -0
- package/dist/lib/research/secret-scan.js +8 -0
- package/dist/lib/research/secure-write.d.ts +11 -1
- package/dist/lib/research/secure-write.js +38 -7
- package/dist/lib/research/storage.d.ts +5 -1
- package/dist/lib/research/storage.js +8 -3
- package/dist/lib/research/summarize.d.ts +15 -0
- package/dist/lib/research/summarize.js +11 -0
- package/dist/lib/research/url.d.ts +9 -6
- package/dist/lib/research/url.js +33 -21
- package/dist/lib/text.d.ts +7 -2
- package/dist/lib/text.js +13 -2
- package/dist/lib/value-flags.d.ts +14 -0
- package/dist/lib/value-flags.js +28 -0
- package/dist/sites/coveo.d.ts +10 -0
- package/dist/sites/coveo.js +10 -0
- package/dist/sites/index.d.ts +16 -0
- package/dist/sites/index.js +16 -4
- package/dist/sites/markdown-twin.d.ts +31 -0
- package/dist/sites/markdown-twin.js +56 -0
- package/dist/sites/salesforce/fetch-page.d.ts +8 -2
- package/dist/sites/salesforce/fetch-page.js +14 -3
- package/dist/sites/salesforce/help-tooling-markdown.d.ts +30 -0
- package/dist/sites/salesforce/help-tooling-markdown.js +74 -0
- package/dist/sites/salesforce/index.d.ts +1 -0
- package/dist/sites/salesforce/index.js +1 -0
- package/dist/sites/salesforce-developer/fetch-page.d.ts +6 -1
- package/dist/sites/salesforce-developer/fetch-page.js +6 -1
- package/dist/sites/salesforce-developer/index.d.ts +1 -0
- package/dist/sites/salesforce-developer/index.js +1 -0
- package/dist/sites/salesforce-developer/route-markdown.d.ts +18 -6
- package/dist/sites/salesforce-developer/route-markdown.js +29 -67
- package/dist/sites/salesforce-doc-fetch.d.ts +39 -5
- package/dist/sites/salesforce-doc-fetch.js +52 -7
- package/dist/sites/salesforce-dom-probe.d.ts +20 -2
- package/dist/sites/salesforce-dom-probe.js +20 -2
- package/dist/sites/types.d.ts +14 -8
- package/dist/sites/types.js +3 -0
- package/oclif.manifest.json +192 -87
- package/package.json +19 -7
- package/agents/agents/official-docs-researcher.agent.md +0 -87
- package/agents/instructions/web-research.instructions.md +0 -44
- package/agents/skills/web-research/SKILL.md +0 -118
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taurgis/bonsai",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.2",
|
|
4
4
|
"description": "Bonsai is a standalone local research cache CLI for AI agents",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -20,9 +20,18 @@
|
|
|
20
20
|
"README.md"
|
|
21
21
|
],
|
|
22
22
|
"lint-staged": {
|
|
23
|
-
"src/**/*.ts":
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
"src/**/*.ts": [
|
|
24
|
+
"prettier --write",
|
|
25
|
+
"eslint --fix --max-warnings 0"
|
|
26
|
+
],
|
|
27
|
+
"scripts/**/*.ts": [
|
|
28
|
+
"prettier --write",
|
|
29
|
+
"eslint --fix --max-warnings 0"
|
|
30
|
+
],
|
|
31
|
+
"tests/**/*.ts": [
|
|
32
|
+
"prettier --write",
|
|
33
|
+
"eslint --fix --max-warnings 0"
|
|
34
|
+
]
|
|
26
35
|
},
|
|
27
36
|
"dependencies": {
|
|
28
37
|
"@mozilla/readability": "^0.5.0",
|
|
@@ -40,6 +49,7 @@
|
|
|
40
49
|
"@types/node": "^22.10.0",
|
|
41
50
|
"@types/turndown": "^5.0.5",
|
|
42
51
|
"@vitest/coverage-istanbul": "^4.0.18",
|
|
52
|
+
"eslint": "^10.7.0",
|
|
43
53
|
"fallow": "^2.102.0",
|
|
44
54
|
"husky": "^9.1.7",
|
|
45
55
|
"jsdom": "^26.0.0",
|
|
@@ -47,6 +57,7 @@
|
|
|
47
57
|
"oclif": "^4.23.21",
|
|
48
58
|
"prettier": "^3.8.1",
|
|
49
59
|
"typescript": "^5.9.3",
|
|
60
|
+
"typescript-eslint": "^8.64.0",
|
|
50
61
|
"vitepress": "^1.6.4",
|
|
51
62
|
"vitest": "^4.0.17",
|
|
52
63
|
"vue": "^3.5.39"
|
|
@@ -61,7 +72,7 @@
|
|
|
61
72
|
"oclif": {
|
|
62
73
|
"bin": "bonsai",
|
|
63
74
|
"dirname": "bonsai",
|
|
64
|
-
"description": "Bonsai is a standalone local research cache CLI for AI agents.\nResearch and cache a web page by passing its URL directly:\n\n $ bonsai https://nodejs.org/api/url.html\n\nThe URL form is shorthand for fetching and caching the page; run `bonsai help fetch` for
|
|
75
|
+
"description": "Bonsai is a standalone local research cache CLI for AI agents.\nResearch and cache a web page by passing its URL directly:\n\n $ bonsai https://nodejs.org/api/url.html\n\nThe URL form is shorthand for fetching and caching the page; run `bonsai help fetch` for URL-form flags. Commands below inspect, list, import, and prune the local research cache.\n\nShort flags are command-local; check each command's --help before reusing -f, -g, -t, or -l.",
|
|
65
76
|
"plugins": [
|
|
66
77
|
"@oclif/plugin-autocomplete"
|
|
67
78
|
],
|
|
@@ -76,7 +87,7 @@
|
|
|
76
87
|
},
|
|
77
88
|
"topics": {
|
|
78
89
|
"config": {
|
|
79
|
-
"description": "Manage research cache
|
|
90
|
+
"description": "Manage research cache configuration"
|
|
80
91
|
}
|
|
81
92
|
}
|
|
82
93
|
},
|
|
@@ -86,7 +97,8 @@
|
|
|
86
97
|
"changeset:status": "changeset status --verbose",
|
|
87
98
|
"format": "prettier --write \"src/**/*.ts\" \"tests/**/*.ts\" \"scripts/**/*.ts\"",
|
|
88
99
|
"format:check": "prettier --check \"src/**/*.ts\" \"tests/**/*.ts\" \"scripts/**/*.ts\"",
|
|
89
|
-
"lint": "pnpm lint:line-counts && pnpm lint:health",
|
|
100
|
+
"lint": "pnpm lint:eslint && pnpm lint:line-counts && pnpm lint:health",
|
|
101
|
+
"lint:eslint": "eslint \"src/**/*.ts\" \"tests/**/*.ts\" \"scripts/**/*.ts\" --max-warnings 0",
|
|
90
102
|
"lint:line-counts": "node scripts/check-line-counts.ts --all",
|
|
91
103
|
"lint:health": "pnpm test:coverage && pnpm exec fallow health --format human",
|
|
92
104
|
"postinstall": "node -e \"if (process.env.CI || process.env.FORWARD_NEXUS_SKIP_SYNC) { console.log('Skipping forward-nexus sync.'); process.exit(0); } require('node:child_process').execFileSync('npx', ['forward-nexus', 'sync', '--pull'], { stdio: 'inherit' });\"",
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: 'Official Docs Researcher'
|
|
3
|
-
description: 'Researches official documentation through Bonsai and returns source-cited findings'
|
|
4
|
-
model: 'Auto'
|
|
5
|
-
tools: ['vscode/askQuestions', 'execute', 'read', 'search', 'web', 'vscode/memory']
|
|
6
|
-
argument-hint: 'What topic should I research in official docs?'
|
|
7
|
-
metadata:
|
|
8
|
-
version: '4.0.0'
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# Official Docs Researcher Agent
|
|
12
|
-
|
|
13
|
-
You are a Forward documentation research specialist. Your job is to find current official documentation, cache it through Bonsai, and return concise source-cited findings that another agent can apply safely.
|
|
14
|
-
|
|
15
|
-
## Scope
|
|
16
|
-
|
|
17
|
-
Use this agent for technical changes, platform behavior, APIs, SDKs, standards, release notes, changelogs, beta docs, security advisories, and other documentation-sensitive work.
|
|
18
|
-
|
|
19
|
-
Do not research from memory alone. Training-data knowledge does not satisfy this workflow.
|
|
20
|
-
|
|
21
|
-
## Invocation
|
|
22
|
-
|
|
23
|
-
Run Bonsai as `npx @taurgis/bonsai ...`. Add `--json` when you need structured output.
|
|
24
|
-
|
|
25
|
-
## Default Workflow
|
|
26
|
-
|
|
27
|
-
1. Identify the product, version, edition, and source authority needed for the request.
|
|
28
|
-
2. Locate official source URLs. Prefer vendor docs, standards bodies, API references, and official release notes. Use your native web/search tools when you do not yet know the URL.
|
|
29
|
-
3. Capture each source through Bonsai:
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
npx @taurgis/bonsai <official-url> --format detailed
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
4. Use `--rendered` for SPAs or pages where static extraction is incomplete:
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
npx @taurgis/bonsai <official-url> --rendered --format detailed
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
5. Summarize only what the official sources support. Include source URLs, validation time when available, version notes, and any important limitations.
|
|
42
|
-
|
|
43
|
-
For structured output:
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
npx @taurgis/bonsai <official-url> --format detailed --json
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
## Freshness Policy
|
|
50
|
-
|
|
51
|
-
Choose the freshness tier based on the source:
|
|
52
|
-
|
|
53
|
-
- `stable`: standards, specs, MDN reference pages, pinned major-version docs.
|
|
54
|
-
- `standard`: vendor API docs, SDK docs, normal technical references.
|
|
55
|
-
- `volatile`: release notes, changelogs, latest pages, security advisories, beta docs.
|
|
56
|
-
|
|
57
|
-
Stale volatile sources must be revalidated before they are trusted. Never overwrite a good cache entry with an error response.
|
|
58
|
-
|
|
59
|
-
## Fallbacks
|
|
60
|
-
|
|
61
|
-
If direct web access was unavoidable because Bonsai could not fetch the content, import the synthesized notes back into Bonsai before returning:
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
npx @taurgis/bonsai import <url> --file <path>
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
For multi-source synthesis:
|
|
68
|
-
|
|
69
|
-
```bash
|
|
70
|
-
npx @taurgis/bonsai import \
|
|
71
|
-
--topic "<descriptive topic>" \
|
|
72
|
-
--source-url <url1> \
|
|
73
|
-
--source-url <url2> \
|
|
74
|
-
--file <path>
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
## Response Contract
|
|
78
|
-
|
|
79
|
-
Return:
|
|
80
|
-
|
|
81
|
-
- Answer summary.
|
|
82
|
-
- Official source URLs used.
|
|
83
|
-
- Version, edition, or date constraints.
|
|
84
|
-
- Cache status or validation timestamp when Bonsai output provides it.
|
|
85
|
-
- Gaps or uncertainty where official docs do not answer the question.
|
|
86
|
-
|
|
87
|
-
Keep stdout clean when using `--json`; warnings and diagnostic notes belong in stderr or in the final prose summary.
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: 'Verify current official docs before technical repo changes — inline via the web-research skill for minor research, via the Official Docs Researcher subagent for extensive research.'
|
|
3
|
-
applyTo: '**'
|
|
4
|
-
skills:
|
|
5
|
-
- web-research
|
|
6
|
-
metadata:
|
|
7
|
-
version: '4.0.0'
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# Web Research Requirement
|
|
11
|
-
|
|
12
|
-
## Mandatory Pre-Step
|
|
13
|
-
|
|
14
|
-
- Verify the relevant current official documentation **in the same task** before creating, updating, refactoring, scaffolding, or deleting technical content.
|
|
15
|
-
- Apply what you find — cite official source URLs when the change relies on platform behavior or standards.
|
|
16
|
-
- Research is the requirement; how you run it scales with scope (below). Training-data knowledge never satisfies this — only docs fetched in the current task do.
|
|
17
|
-
|
|
18
|
-
## Choose How to Research by Scope
|
|
19
|
-
|
|
20
|
-
- **Minor research — run it inline.** For a single known page, one platform, or a quick flag/API/version check, the main agent invokes the **web-research** skill directly. A separate subagent is not required.
|
|
21
|
-
- **Extensive research — delegate to a subagent.** For multiple sources or platforms, unfamiliar territory, broad audits, or anything that produces verbose output you do not want in the main context, run the **Official Docs Researcher** subagent and apply its findings.
|
|
22
|
-
- The main agent may always use the **web-research** skill directly — choose the subagent to isolate large research, not because inline research is disallowed.
|
|
23
|
-
- When unsure, start inline and escalate to the subagent once the work spans several sources.
|
|
24
|
-
|
|
25
|
-
## Shared Cache
|
|
26
|
-
|
|
27
|
-
- **Invocation**: Run Bonsai as `npx @taurgis/bonsai ...`.
|
|
28
|
-
- **URL discovery**: When you do not yet know the official URL, discover it with your native web/search tools, then fetch the page through Bonsai so it is cached for future agents.
|
|
29
|
-
- If Bonsai is configured for project storage and `.bonsai/research/` is not ignored by git, treat those cache artifacts as intentional shared project files. It is OK to check them in, and agents must not delete them as incidental generated output without an explicit request.
|
|
30
|
-
- Re-running on a recent topic is cheap — research the topic rather than skipping it to "save" a fetch.
|
|
31
|
-
|
|
32
|
-
## When Not to Use
|
|
33
|
-
|
|
34
|
-
- No technical content is being modified (purely editorial changes).
|
|
35
|
-
- You already fetched and applied official docs **in the current task**. Training-data knowledge does not satisfy this — only docs fetched in the same task do.
|
|
36
|
-
- The request is too simple to warrant research (typo, lint fix not involving platform behavior).
|
|
37
|
-
|
|
38
|
-
## Examples
|
|
39
|
-
|
|
40
|
-
- ✅ Confirming one platform's current flag or frontmatter field before a small edit → run the web-research skill inline.
|
|
41
|
-
- ✅ Comparing conventions across several platforms, or auditing/refactoring source broadly → delegate to the Official Docs Researcher subagent.
|
|
42
|
-
- ✅ Before editing instructions, prompts, agents, skills, workflows, or docs — reading source code does not replace checking current platform guidance.
|
|
43
|
-
- ✅ Include official source URLs when the change references platform behavior or standards.
|
|
44
|
-
- ❌ Don't modify technical content without researching first, and don't treat cached or training knowledge as equivalent — official guidance evolves and must be verified per task.
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: web-research
|
|
3
|
-
description: 'Bonsai-backed official documentation and web research workflow. Use before technical changes that depend on platform behavior, when fetching documentation or web pages, when listing/pruning the local research cache, or when importing manually gathered notes.'
|
|
4
|
-
license: Forward Proprietary
|
|
5
|
-
compatibility: VS Code 1.x+, GitHub Copilot
|
|
6
|
-
metadata:
|
|
7
|
-
version: '3.0.0'
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# Web Research Skill
|
|
11
|
-
|
|
12
|
-
Use Bonsai as the cache-first research path for official documentation and web content. Prefer current official sources, keep research reusable, and avoid direct one-off web fetches when Bonsai can capture the same page.
|
|
13
|
-
|
|
14
|
-
## Invocation
|
|
15
|
-
|
|
16
|
-
Always run Bonsai through the published npm package:
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
npx @taurgis/bonsai <command> [flags]
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
Add `--json` when you need machine-readable output for agent callers.
|
|
23
|
-
|
|
24
|
-
## Required Pre-Step
|
|
25
|
-
|
|
26
|
-
Before creating, updating, refactoring, scaffolding, or deleting technical content, verify relevant current official documentation in the same task.
|
|
27
|
-
|
|
28
|
-
When you do not yet know the official URL, discover it with your native web/search tools first. Once you have a URL, capture it through Bonsai:
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
npx @taurgis/bonsai <official-url> --format detailed
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
For agent callers that need structured output:
|
|
35
|
-
|
|
36
|
-
```bash
|
|
37
|
-
npx @taurgis/bonsai <official-url> --format detailed --json
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
## Source Rules
|
|
41
|
-
|
|
42
|
-
- Prefer official vendor docs, standards, API references, SDK docs, release notes, changelogs, and security advisories.
|
|
43
|
-
- Include official source URLs when the change relies on platform behavior or standards.
|
|
44
|
-
- Use `--tier stable`, `--tier standard`, or `--tier volatile` when the source class is clear.
|
|
45
|
-
- Treat volatile sources as needing fresh validation before trusting them.
|
|
46
|
-
- Do not use the retired manual `artifacts/online-research/` protocol for new research.
|
|
47
|
-
|
|
48
|
-
## Fetch Rules
|
|
49
|
-
|
|
50
|
-
Use `--format compressed` for context-budgeted reading and `--format detailed` for exact technical details, links, tables, and code examples.
|
|
51
|
-
|
|
52
|
-
Use `--rendered` when static extraction is incomplete or the page is an SPA:
|
|
53
|
-
|
|
54
|
-
```bash
|
|
55
|
-
npx @taurgis/bonsai <official-url> --rendered --format detailed
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
Never reach for direct `WebFetch` or `WebSearch` to retrieve a specific page when Bonsai can fetch it. Bonsai returns reusable Markdown and keeps it cached for future agents.
|
|
59
|
-
|
|
60
|
-
## Manual Fallbacks
|
|
61
|
-
|
|
62
|
-
If direct web access was unavoidable because of authentication, browser interaction, or a tool constraint, import the result into Bonsai before returning.
|
|
63
|
-
|
|
64
|
-
Single-source import:
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
npx @taurgis/bonsai import <url> --file path/to/notes.md
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
Stdin import:
|
|
71
|
-
|
|
72
|
-
```bash
|
|
73
|
-
echo "# My Synthesis Note" | npx @taurgis/bonsai import <url> --stdin
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
Multi-source synthesis:
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
npx @taurgis/bonsai import \
|
|
80
|
-
--topic "<descriptive topic>" \
|
|
81
|
-
--source-url <url1> \
|
|
82
|
-
--source-url <url2> \
|
|
83
|
-
--file path/to/synthesized-notes.md
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
## Cache Operations
|
|
87
|
-
|
|
88
|
-
Check status without fetching:
|
|
89
|
-
|
|
90
|
-
```bash
|
|
91
|
-
npx @taurgis/bonsai status <url>
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
Inspect stored metadata:
|
|
95
|
-
|
|
96
|
-
```bash
|
|
97
|
-
npx @taurgis/bonsai inspect <url>
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
List cached entries by metadata:
|
|
101
|
-
|
|
102
|
-
```bash
|
|
103
|
-
npx @taurgis/bonsai list --tags node
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
Preview pruning before deleting:
|
|
107
|
-
|
|
108
|
-
```bash
|
|
109
|
-
npx @taurgis/bonsai prune --older-than 90d --dry-run
|
|
110
|
-
npx @taurgis/bonsai prune --older-than 90d --yes
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
## When This Does Not Apply
|
|
114
|
-
|
|
115
|
-
- No technical content or web content is involved.
|
|
116
|
-
- You already fetched and applied current official docs in the current task.
|
|
117
|
-
- The request is a trivial typo or formatting fix that does not involve platform behavior.
|
|
118
|
-
- `npx @taurgis/bonsai` is unavailable in the environment; use the best available official-source workflow and import notes later.
|