@taurgis/bonsai 4.0.0 → 4.1.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 +24 -1
- package/agents/agents/official-docs-researcher.agent.md +102 -0
- package/agents/agents/salesforce-docs-researcher.agent.md +16 -14
- package/agents/hooks/README.md +18 -2
- package/agents/hooks/claude-code/hooks/bonsai-web-fetch.sh +1 -1
- package/agents/hooks/codex/hooks/bonsai-user-prompt-context.sh +1 -1
- package/agents/hooks/codex/hooks/bonsai-web-fetch.sh +1 -1
- package/agents/hooks/cursor/hooks/bonsai-web-fetch.sh +1 -1
- package/agents/hooks/github-copilot/bonsai-web-fetch.sh +1 -1
- package/agents/instructions/salesforce-research.instructions.md +5 -4
- package/agents/instructions/web-research.instructions.md +45 -0
- package/agents/skills/web-research/SKILL.md +139 -0
- package/dist/base-command.d.ts +5 -0
- package/dist/base-command.js +9 -0
- package/dist/commands/config/base.d.ts +2 -7
- package/dist/commands/config/base.js +4 -18
- package/dist/commands/context.d.ts +20 -0
- package/dist/commands/context.js +65 -0
- package/dist/commands/list.d.ts +12 -3
- package/dist/commands/list.js +61 -100
- package/dist/commands/search.d.ts +43 -0
- package/dist/commands/search.js +233 -0
- package/dist/commands/setup.d.ts +27 -0
- package/dist/commands/setup.js +148 -0
- package/dist/commands.d.ts +6 -0
- package/dist/commands.js +6 -0
- package/dist/lib/argv.js +4 -1
- package/dist/lib/cli-presentation.d.ts +19 -0
- package/dist/lib/cli-presentation.js +27 -0
- package/dist/lib/cli-result-types.d.ts +59 -0
- package/dist/lib/color.d.ts +2 -0
- package/dist/lib/color.js +6 -0
- package/dist/lib/common-metadata-filter-flags.d.ts +14 -0
- package/dist/lib/common-metadata-filter-flags.js +37 -0
- package/dist/lib/next-command.d.ts +15 -0
- package/dist/lib/next-command.js +40 -0
- package/dist/lib/research/context-dashboard.d.ts +19 -0
- package/dist/lib/research/context-dashboard.js +43 -0
- package/dist/lib/research/fetch-command-service.js +10 -0
- package/dist/lib/research/fetch-result.d.ts +1 -0
- package/dist/lib/research/fetch-result.js +4 -0
- package/dist/lib/research/list-row.d.ts +15 -0
- package/dist/lib/research/list-row.js +31 -0
- package/dist/lib/research/metadata-filters.d.ts +22 -1
- package/dist/lib/research/metadata-filters.js +34 -0
- package/dist/lib/research/schema.d.ts +2 -0
- package/dist/lib/research/schema.js +4 -0
- package/dist/lib/research/search-match.d.ts +39 -0
- package/dist/lib/research/search-match.js +134 -0
- package/dist/lib/scope-flags.d.ts +19 -0
- package/dist/lib/scope-flags.js +27 -0
- package/dist/lib/setup/agents.d.ts +16 -0
- package/dist/lib/setup/agents.js +20 -0
- package/dist/lib/setup/bin-command.d.ts +14 -0
- package/dist/lib/setup/bin-command.js +42 -0
- package/dist/lib/setup/hook-file-io.d.ts +37 -0
- package/dist/lib/setup/hook-file-io.js +80 -0
- package/dist/lib/text.d.ts +6 -0
- package/dist/lib/text.js +11 -0
- package/oclif.manifest.json +288 -3
- package/package.json +1 -1
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,54 @@
|
|
|
1
1
|
{
|
|
2
2
|
"commands": {
|
|
3
|
+
"context": {
|
|
4
|
+
"aliases": [],
|
|
5
|
+
"args": {},
|
|
6
|
+
"description": "Print a short summary of the current research cache: total entries, a freshness breakdown, and the most recently touched pages. This is what `bonsai setup` wires into a SessionStart hook, so a session starts with the cache's state already visible.",
|
|
7
|
+
"examples": [
|
|
8
|
+
{
|
|
9
|
+
"description": "preview what a SessionStart hook would show",
|
|
10
|
+
"command": "<%= config.bin %> context"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"description": "get the dashboard as JSON",
|
|
14
|
+
"command": "<%= config.bin %> context --json"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"flags": {
|
|
18
|
+
"json": {
|
|
19
|
+
"description": "Format output as json.",
|
|
20
|
+
"helpGroup": "GLOBAL",
|
|
21
|
+
"name": "json",
|
|
22
|
+
"allowNo": false,
|
|
23
|
+
"type": "boolean"
|
|
24
|
+
},
|
|
25
|
+
"read-only": {
|
|
26
|
+
"aliases": [
|
|
27
|
+
"plan"
|
|
28
|
+
],
|
|
29
|
+
"description": "(alias: --plan) block filesystem writes/deletes; network fetches still run; also honored via BONSAI_READ_ONLY/BONSAI_PLAN_MODE",
|
|
30
|
+
"name": "read-only",
|
|
31
|
+
"allowNo": false,
|
|
32
|
+
"type": "boolean"
|
|
33
|
+
},
|
|
34
|
+
"toon": {
|
|
35
|
+
"description": "emit the same envelope as --json, encoded as TOON (fewer tokens); cannot be combined with --json",
|
|
36
|
+
"name": "toon",
|
|
37
|
+
"allowNo": false,
|
|
38
|
+
"type": "boolean"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"hasDynamicHelp": false,
|
|
42
|
+
"hiddenAliases": [],
|
|
43
|
+
"id": "context",
|
|
44
|
+
"pluginAlias": "@taurgis/bonsai",
|
|
45
|
+
"pluginName": "@taurgis/bonsai",
|
|
46
|
+
"pluginType": "core",
|
|
47
|
+
"strict": true,
|
|
48
|
+
"summary": "Show a compact cache dashboard for ambient session context",
|
|
49
|
+
"enableJsonFlag": true,
|
|
50
|
+
"stdoutIsPrimaryData": true
|
|
51
|
+
},
|
|
3
52
|
"fetch": {
|
|
4
53
|
"aliases": [],
|
|
5
54
|
"args": {
|
|
@@ -472,9 +521,9 @@
|
|
|
472
521
|
"type": "option"
|
|
473
522
|
},
|
|
474
523
|
"limit": {
|
|
475
|
-
"description": "result count (max 100)",
|
|
524
|
+
"description": "result count (max 100, default 10)",
|
|
476
525
|
"name": "limit",
|
|
477
|
-
"default":
|
|
526
|
+
"default": 10,
|
|
478
527
|
"hasDynamicHelp": false,
|
|
479
528
|
"multiple": false,
|
|
480
529
|
"type": "option"
|
|
@@ -484,6 +533,12 @@
|
|
|
484
533
|
"name": "full",
|
|
485
534
|
"allowNo": false,
|
|
486
535
|
"type": "boolean"
|
|
536
|
+
},
|
|
537
|
+
"identity": {
|
|
538
|
+
"hidden": true,
|
|
539
|
+
"name": "identity",
|
|
540
|
+
"allowNo": false,
|
|
541
|
+
"type": "boolean"
|
|
487
542
|
}
|
|
488
543
|
},
|
|
489
544
|
"hasDynamicHelp": false,
|
|
@@ -617,6 +672,236 @@
|
|
|
617
672
|
"enableJsonFlag": true,
|
|
618
673
|
"stdoutIsPrimaryData": true
|
|
619
674
|
},
|
|
675
|
+
"search": {
|
|
676
|
+
"aliases": [],
|
|
677
|
+
"args": {},
|
|
678
|
+
"description": "Rank cached page-level artifacts by a --query matched against topic, tags, summary, and compressed content, plus the same metadata filters as `list` (topic, tags, URL, freshness, artifact type, capture method). Reads only the token-cheap indexed summary/compressed text, never the full detailed body, so ranking a large cache stays fast. Pass --full for every metadata field.",
|
|
679
|
+
"examples": [
|
|
680
|
+
{
|
|
681
|
+
"description": "search content and tags for a keyword",
|
|
682
|
+
"command": "<%= config.bin %> search --query \"suspense boundary\""
|
|
683
|
+
},
|
|
684
|
+
{
|
|
685
|
+
"description": "match any of several terms instead of requiring all",
|
|
686
|
+
"command": "<%= config.bin %> search --query \"suspense streaming\" --match-any"
|
|
687
|
+
},
|
|
688
|
+
{
|
|
689
|
+
"description": "combine a query with metadata filters",
|
|
690
|
+
"command": "<%= config.bin %> search --query cache --tags react --freshness fresh"
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
"description": "filter by tags/topic alone, ranked like list (no --query)",
|
|
694
|
+
"command": "<%= config.bin %> search --tags node --json"
|
|
695
|
+
}
|
|
696
|
+
],
|
|
697
|
+
"flags": {
|
|
698
|
+
"json": {
|
|
699
|
+
"description": "Format output as json.",
|
|
700
|
+
"helpGroup": "GLOBAL",
|
|
701
|
+
"name": "json",
|
|
702
|
+
"allowNo": false,
|
|
703
|
+
"type": "boolean"
|
|
704
|
+
},
|
|
705
|
+
"read-only": {
|
|
706
|
+
"aliases": [
|
|
707
|
+
"plan"
|
|
708
|
+
],
|
|
709
|
+
"description": "(alias: --plan) block filesystem writes/deletes; network fetches still run; also honored via BONSAI_READ_ONLY/BONSAI_PLAN_MODE",
|
|
710
|
+
"name": "read-only",
|
|
711
|
+
"allowNo": false,
|
|
712
|
+
"type": "boolean"
|
|
713
|
+
},
|
|
714
|
+
"toon": {
|
|
715
|
+
"description": "emit the same envelope as --json, encoded as TOON (fewer tokens); cannot be combined with --json",
|
|
716
|
+
"name": "toon",
|
|
717
|
+
"allowNo": false,
|
|
718
|
+
"type": "boolean"
|
|
719
|
+
},
|
|
720
|
+
"query": {
|
|
721
|
+
"char": "q",
|
|
722
|
+
"description": "keyword(s) to search across topic, tags, summary, and compressed content (case-insensitive); every term must match somewhere unless --match-any is set",
|
|
723
|
+
"name": "query",
|
|
724
|
+
"hasDynamicHelp": false,
|
|
725
|
+
"multiple": false,
|
|
726
|
+
"type": "option"
|
|
727
|
+
},
|
|
728
|
+
"match-any": {
|
|
729
|
+
"description": "match any query term instead of requiring all of them (OR instead of AND)",
|
|
730
|
+
"name": "match-any",
|
|
731
|
+
"allowNo": false,
|
|
732
|
+
"type": "boolean"
|
|
733
|
+
},
|
|
734
|
+
"topic": {
|
|
735
|
+
"char": "t",
|
|
736
|
+
"description": "exact topic (case-insensitive)",
|
|
737
|
+
"name": "topic",
|
|
738
|
+
"hasDynamicHelp": false,
|
|
739
|
+
"multiple": false,
|
|
740
|
+
"type": "option"
|
|
741
|
+
},
|
|
742
|
+
"tags": {
|
|
743
|
+
"char": "g",
|
|
744
|
+
"description": "tags to require (must match all)",
|
|
745
|
+
"name": "tags",
|
|
746
|
+
"hasDynamicHelp": false,
|
|
747
|
+
"multiple": true,
|
|
748
|
+
"type": "option"
|
|
749
|
+
},
|
|
750
|
+
"url": {
|
|
751
|
+
"description": "source URL glob (case-insensitive, supports * wildcard)",
|
|
752
|
+
"name": "url",
|
|
753
|
+
"hasDynamicHelp": false,
|
|
754
|
+
"multiple": false,
|
|
755
|
+
"type": "option"
|
|
756
|
+
},
|
|
757
|
+
"freshness": {
|
|
758
|
+
"description": "freshness state",
|
|
759
|
+
"name": "freshness",
|
|
760
|
+
"hasDynamicHelp": false,
|
|
761
|
+
"multiple": false,
|
|
762
|
+
"options": [
|
|
763
|
+
"fresh",
|
|
764
|
+
"stale_grace",
|
|
765
|
+
"stale_expired"
|
|
766
|
+
],
|
|
767
|
+
"type": "option"
|
|
768
|
+
},
|
|
769
|
+
"artifact-type": {
|
|
770
|
+
"description": "artifact type; section children are omitted from search - use inspect to see them",
|
|
771
|
+
"name": "artifact-type",
|
|
772
|
+
"hasDynamicHelp": false,
|
|
773
|
+
"multiple": false,
|
|
774
|
+
"options": [
|
|
775
|
+
"source",
|
|
776
|
+
"research_note",
|
|
777
|
+
"index"
|
|
778
|
+
],
|
|
779
|
+
"type": "option"
|
|
780
|
+
},
|
|
781
|
+
"capture-method": {
|
|
782
|
+
"description": "capture method",
|
|
783
|
+
"name": "capture-method",
|
|
784
|
+
"hasDynamicHelp": false,
|
|
785
|
+
"multiple": false,
|
|
786
|
+
"options": [
|
|
787
|
+
"static_fetch",
|
|
788
|
+
"browser_fallback",
|
|
789
|
+
"agent_supplied",
|
|
790
|
+
"route_markdown",
|
|
791
|
+
"github_source"
|
|
792
|
+
],
|
|
793
|
+
"type": "option"
|
|
794
|
+
},
|
|
795
|
+
"limit": {
|
|
796
|
+
"description": "result count (max 100, default 10)",
|
|
797
|
+
"name": "limit",
|
|
798
|
+
"default": 10,
|
|
799
|
+
"hasDynamicHelp": false,
|
|
800
|
+
"multiple": false,
|
|
801
|
+
"type": "option"
|
|
802
|
+
},
|
|
803
|
+
"full": {
|
|
804
|
+
"description": "include every metadata field (cache key, path, artifact type, tags, capture method, quality notes, timestamps) alongside score/matchedFields/snippet; default output is a minimal row (source URLs, topic, freshness, token estimate, score, matchedFields, snippet)",
|
|
805
|
+
"name": "full",
|
|
806
|
+
"allowNo": false,
|
|
807
|
+
"type": "boolean"
|
|
808
|
+
}
|
|
809
|
+
},
|
|
810
|
+
"hasDynamicHelp": false,
|
|
811
|
+
"hiddenAliases": [],
|
|
812
|
+
"id": "search",
|
|
813
|
+
"pluginAlias": "@taurgis/bonsai",
|
|
814
|
+
"pluginName": "@taurgis/bonsai",
|
|
815
|
+
"pluginType": "core",
|
|
816
|
+
"strict": true,
|
|
817
|
+
"summary": "Search cached research artifacts by tags and content",
|
|
818
|
+
"enableJsonFlag": true,
|
|
819
|
+
"stdoutIsPrimaryData": true
|
|
820
|
+
},
|
|
821
|
+
"setup": {
|
|
822
|
+
"aliases": [],
|
|
823
|
+
"args": {
|
|
824
|
+
"agent": {
|
|
825
|
+
"description": "agent to install the hook for (claude-code, codex)",
|
|
826
|
+
"name": "agent",
|
|
827
|
+
"required": true
|
|
828
|
+
}
|
|
829
|
+
},
|
|
830
|
+
"description": "Writes (or repairs) a SessionStart hook entry that runs `bonsai context` at the start of every session, so the agent sees the cache state before doing anything. Project-scoped by default (shareable via version control); pass --global for a user-level, machine-only install. Re-running is idempotent: an unchanged install is a no-op, and a stale executable path is repaired.",
|
|
831
|
+
"examples": [
|
|
832
|
+
{
|
|
833
|
+
"description": "install the hook for this project (Claude Code)",
|
|
834
|
+
"command": "<%= config.bin %> setup claude-code"
|
|
835
|
+
},
|
|
836
|
+
{
|
|
837
|
+
"description": "install the hook for this project (Codex)",
|
|
838
|
+
"command": "<%= config.bin %> setup codex"
|
|
839
|
+
},
|
|
840
|
+
{
|
|
841
|
+
"description": "preview a user-level install without writing anything",
|
|
842
|
+
"command": "<%= config.bin %> setup claude-code --global --dry-run --json"
|
|
843
|
+
}
|
|
844
|
+
],
|
|
845
|
+
"flags": {
|
|
846
|
+
"json": {
|
|
847
|
+
"description": "Format output as json.",
|
|
848
|
+
"helpGroup": "GLOBAL",
|
|
849
|
+
"name": "json",
|
|
850
|
+
"allowNo": false,
|
|
851
|
+
"type": "boolean"
|
|
852
|
+
},
|
|
853
|
+
"read-only": {
|
|
854
|
+
"aliases": [
|
|
855
|
+
"plan"
|
|
856
|
+
],
|
|
857
|
+
"description": "(alias: --plan) block filesystem writes/deletes; network fetches still run; also honored via BONSAI_READ_ONLY/BONSAI_PLAN_MODE",
|
|
858
|
+
"name": "read-only",
|
|
859
|
+
"allowNo": false,
|
|
860
|
+
"type": "boolean"
|
|
861
|
+
},
|
|
862
|
+
"toon": {
|
|
863
|
+
"description": "emit the same envelope as --json, encoded as TOON (fewer tokens); cannot be combined with --json",
|
|
864
|
+
"name": "toon",
|
|
865
|
+
"allowNo": false,
|
|
866
|
+
"type": "boolean"
|
|
867
|
+
},
|
|
868
|
+
"global": {
|
|
869
|
+
"char": "g",
|
|
870
|
+
"description": "install to the user-level config instead of the project (default: project)",
|
|
871
|
+
"name": "global",
|
|
872
|
+
"allowNo": false,
|
|
873
|
+
"type": "boolean"
|
|
874
|
+
},
|
|
875
|
+
"local": {
|
|
876
|
+
"aliases": [
|
|
877
|
+
"project"
|
|
878
|
+
],
|
|
879
|
+
"charAliases": [
|
|
880
|
+
"p"
|
|
881
|
+
],
|
|
882
|
+
"description": "install to the project config (default; explicit form of the default)",
|
|
883
|
+
"name": "local",
|
|
884
|
+
"allowNo": false,
|
|
885
|
+
"type": "boolean"
|
|
886
|
+
},
|
|
887
|
+
"dry-run": {
|
|
888
|
+
"description": "preview the install without writing anything",
|
|
889
|
+
"name": "dry-run",
|
|
890
|
+
"allowNo": false,
|
|
891
|
+
"type": "boolean"
|
|
892
|
+
}
|
|
893
|
+
},
|
|
894
|
+
"hasDynamicHelp": false,
|
|
895
|
+
"hiddenAliases": [],
|
|
896
|
+
"id": "setup",
|
|
897
|
+
"pluginAlias": "@taurgis/bonsai",
|
|
898
|
+
"pluginName": "@taurgis/bonsai",
|
|
899
|
+
"pluginType": "core",
|
|
900
|
+
"strict": true,
|
|
901
|
+
"summary": "Install a SessionStart hook that shows live cache context",
|
|
902
|
+
"enableJsonFlag": true,
|
|
903
|
+
"stdoutIsPrimaryData": true
|
|
904
|
+
},
|
|
620
905
|
"status": {
|
|
621
906
|
"aliases": [],
|
|
622
907
|
"args": {
|
|
@@ -1056,5 +1341,5 @@
|
|
|
1056
1341
|
"stdoutIsPrimaryData": true
|
|
1057
1342
|
}
|
|
1058
1343
|
},
|
|
1059
|
-
"version": "4.
|
|
1344
|
+
"version": "4.1.0"
|
|
1060
1345
|
}
|