modularob-connectors 0.0.0-stage → 0.6.8
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/LICENSE +21 -0
- package/README.md +219 -2
- package/README.zh.md +220 -0
- package/client.js +1577 -0
- package/cordis.patch.yml +3 -0
- package/docs/PUBLISHING.md +57 -0
- package/icon.svg +8 -0
- package/index.js +135 -0
- package/lib/api.js +194 -0
- package/lib/cli.js +144 -0
- package/lib/obsidian.js +735 -0
- package/lib/profile-model.js +305 -0
- package/lib/profile.js +131 -0
- package/lib/skills.js +273 -0
- package/lib/tool.js +122 -0
- package/lib/update.js +268 -0
- package/lib/vendor/yaml/LICENSE +13 -0
- package/lib/vendor/yaml/dist/cli.d.ts +8 -0
- package/lib/vendor/yaml/dist/cli.mjs +201 -0
- package/lib/vendor/yaml/dist/compose/compose-collection.d.ts +11 -0
- package/lib/vendor/yaml/dist/compose/compose-collection.js +90 -0
- package/lib/vendor/yaml/dist/compose/compose-doc.d.ts +7 -0
- package/lib/vendor/yaml/dist/compose/compose-doc.js +45 -0
- package/lib/vendor/yaml/dist/compose/compose-node.d.ts +29 -0
- package/lib/vendor/yaml/dist/compose/compose-node.js +112 -0
- package/lib/vendor/yaml/dist/compose/compose-scalar.d.ts +5 -0
- package/lib/vendor/yaml/dist/compose/compose-scalar.js +88 -0
- package/lib/vendor/yaml/dist/compose/composer.d.ts +63 -0
- package/lib/vendor/yaml/dist/compose/composer.js +224 -0
- package/lib/vendor/yaml/dist/compose/resolve-block-map.d.ts +6 -0
- package/lib/vendor/yaml/dist/compose/resolve-block-map.js +117 -0
- package/lib/vendor/yaml/dist/compose/resolve-block-scalar.d.ts +11 -0
- package/lib/vendor/yaml/dist/compose/resolve-block-scalar.js +200 -0
- package/lib/vendor/yaml/dist/compose/resolve-block-seq.d.ts +6 -0
- package/lib/vendor/yaml/dist/compose/resolve-block-seq.js +51 -0
- package/lib/vendor/yaml/dist/compose/resolve-end.d.ts +6 -0
- package/lib/vendor/yaml/dist/compose/resolve-end.js +39 -0
- package/lib/vendor/yaml/dist/compose/resolve-flow-collection.d.ts +7 -0
- package/lib/vendor/yaml/dist/compose/resolve-flow-collection.js +209 -0
- package/lib/vendor/yaml/dist/compose/resolve-flow-scalar.d.ts +10 -0
- package/lib/vendor/yaml/dist/compose/resolve-flow-scalar.js +228 -0
- package/lib/vendor/yaml/dist/compose/resolve-props.d.ts +23 -0
- package/lib/vendor/yaml/dist/compose/resolve-props.js +148 -0
- package/lib/vendor/yaml/dist/compose/util-contains-newline.d.ts +2 -0
- package/lib/vendor/yaml/dist/compose/util-contains-newline.js +36 -0
- package/lib/vendor/yaml/dist/compose/util-empty-scalar-position.d.ts +2 -0
- package/lib/vendor/yaml/dist/compose/util-empty-scalar-position.js +28 -0
- package/lib/vendor/yaml/dist/compose/util-flow-indent-check.d.ts +3 -0
- package/lib/vendor/yaml/dist/compose/util-flow-indent-check.js +17 -0
- package/lib/vendor/yaml/dist/compose/util-map-includes.d.ts +4 -0
- package/lib/vendor/yaml/dist/compose/util-map-includes.js +15 -0
- package/lib/vendor/yaml/dist/doc/Document.d.ts +141 -0
- package/lib/vendor/yaml/dist/doc/Document.js +337 -0
- package/lib/vendor/yaml/dist/doc/anchors.d.ts +24 -0
- package/lib/vendor/yaml/dist/doc/anchors.js +76 -0
- package/lib/vendor/yaml/dist/doc/applyReviver.d.ts +9 -0
- package/lib/vendor/yaml/dist/doc/applyReviver.js +57 -0
- package/lib/vendor/yaml/dist/doc/createNode.d.ts +17 -0
- package/lib/vendor/yaml/dist/doc/createNode.js +90 -0
- package/lib/vendor/yaml/dist/doc/directives.d.ts +49 -0
- package/lib/vendor/yaml/dist/doc/directives.js +178 -0
- package/lib/vendor/yaml/dist/errors.d.ts +21 -0
- package/lib/vendor/yaml/dist/errors.js +62 -0
- package/lib/vendor/yaml/dist/index.d.ts +25 -0
- package/lib/vendor/yaml/dist/index.js +50 -0
- package/lib/vendor/yaml/dist/log.d.ts +3 -0
- package/lib/vendor/yaml/dist/log.js +19 -0
- package/lib/vendor/yaml/dist/nodes/Alias.d.ts +29 -0
- package/lib/vendor/yaml/dist/nodes/Alias.js +120 -0
- package/lib/vendor/yaml/dist/nodes/Collection.d.ts +73 -0
- package/lib/vendor/yaml/dist/nodes/Collection.js +151 -0
- package/lib/vendor/yaml/dist/nodes/Node.d.ts +53 -0
- package/lib/vendor/yaml/dist/nodes/Node.js +40 -0
- package/lib/vendor/yaml/dist/nodes/Pair.d.ts +22 -0
- package/lib/vendor/yaml/dist/nodes/Pair.js +39 -0
- package/lib/vendor/yaml/dist/nodes/Scalar.d.ts +47 -0
- package/lib/vendor/yaml/dist/nodes/Scalar.js +27 -0
- package/lib/vendor/yaml/dist/nodes/YAMLMap.d.ts +53 -0
- package/lib/vendor/yaml/dist/nodes/YAMLMap.js +147 -0
- package/lib/vendor/yaml/dist/nodes/YAMLSeq.d.ts +60 -0
- package/lib/vendor/yaml/dist/nodes/YAMLSeq.js +115 -0
- package/lib/vendor/yaml/dist/nodes/addPairToJSMap.d.ts +4 -0
- package/lib/vendor/yaml/dist/nodes/addPairToJSMap.js +65 -0
- package/lib/vendor/yaml/dist/nodes/identity.d.ts +23 -0
- package/lib/vendor/yaml/dist/nodes/identity.js +53 -0
- package/lib/vendor/yaml/dist/nodes/toJS.d.ts +29 -0
- package/lib/vendor/yaml/dist/nodes/toJS.js +39 -0
- package/lib/vendor/yaml/dist/options.d.ts +350 -0
- package/lib/vendor/yaml/dist/parse/cst-scalar.d.ts +64 -0
- package/lib/vendor/yaml/dist/parse/cst-scalar.js +218 -0
- package/lib/vendor/yaml/dist/parse/cst-stringify.d.ts +8 -0
- package/lib/vendor/yaml/dist/parse/cst-stringify.js +63 -0
- package/lib/vendor/yaml/dist/parse/cst-visit.d.ts +39 -0
- package/lib/vendor/yaml/dist/parse/cst-visit.js +99 -0
- package/lib/vendor/yaml/dist/parse/cst.d.ts +109 -0
- package/lib/vendor/yaml/dist/parse/cst.js +112 -0
- package/lib/vendor/yaml/dist/parse/lexer.d.ts +87 -0
- package/lib/vendor/yaml/dist/parse/lexer.js +723 -0
- package/lib/vendor/yaml/dist/parse/line-counter.d.ts +22 -0
- package/lib/vendor/yaml/dist/parse/line-counter.js +41 -0
- package/lib/vendor/yaml/dist/parse/parser.d.ts +84 -0
- package/lib/vendor/yaml/dist/parse/parser.js +980 -0
- package/lib/vendor/yaml/dist/public-api.d.ts +44 -0
- package/lib/vendor/yaml/dist/public-api.js +107 -0
- package/lib/vendor/yaml/dist/schema/Schema.d.ts +17 -0
- package/lib/vendor/yaml/dist/schema/Schema.js +39 -0
- package/lib/vendor/yaml/dist/schema/common/map.d.ts +2 -0
- package/lib/vendor/yaml/dist/schema/common/map.js +19 -0
- package/lib/vendor/yaml/dist/schema/common/null.d.ts +4 -0
- package/lib/vendor/yaml/dist/schema/common/null.js +17 -0
- package/lib/vendor/yaml/dist/schema/common/seq.d.ts +2 -0
- package/lib/vendor/yaml/dist/schema/common/seq.js +19 -0
- package/lib/vendor/yaml/dist/schema/common/string.d.ts +2 -0
- package/lib/vendor/yaml/dist/schema/common/string.js +16 -0
- package/lib/vendor/yaml/dist/schema/core/bool.d.ts +4 -0
- package/lib/vendor/yaml/dist/schema/core/bool.js +21 -0
- package/lib/vendor/yaml/dist/schema/core/float.d.ts +4 -0
- package/lib/vendor/yaml/dist/schema/core/float.js +47 -0
- package/lib/vendor/yaml/dist/schema/core/int.d.ts +4 -0
- package/lib/vendor/yaml/dist/schema/core/int.js +42 -0
- package/lib/vendor/yaml/dist/schema/core/schema.d.ts +1 -0
- package/lib/vendor/yaml/dist/schema/core/schema.js +25 -0
- package/lib/vendor/yaml/dist/schema/json/schema.d.ts +2 -0
- package/lib/vendor/yaml/dist/schema/json/schema.js +64 -0
- package/lib/vendor/yaml/dist/schema/json-schema.d.ts +69 -0
- package/lib/vendor/yaml/dist/schema/tags.d.ts +48 -0
- package/lib/vendor/yaml/dist/schema/tags.js +99 -0
- package/lib/vendor/yaml/dist/schema/types.d.ts +92 -0
- package/lib/vendor/yaml/dist/schema/yaml-1.1/binary.d.ts +2 -0
- package/lib/vendor/yaml/dist/schema/yaml-1.1/binary.js +70 -0
- package/lib/vendor/yaml/dist/schema/yaml-1.1/bool.d.ts +7 -0
- package/lib/vendor/yaml/dist/schema/yaml-1.1/bool.js +29 -0
- package/lib/vendor/yaml/dist/schema/yaml-1.1/float.d.ts +4 -0
- package/lib/vendor/yaml/dist/schema/yaml-1.1/float.js +50 -0
- package/lib/vendor/yaml/dist/schema/yaml-1.1/int.d.ts +5 -0
- package/lib/vendor/yaml/dist/schema/yaml-1.1/int.js +76 -0
- package/lib/vendor/yaml/dist/schema/yaml-1.1/merge.d.ts +9 -0
- package/lib/vendor/yaml/dist/schema/yaml-1.1/merge.js +71 -0
- package/lib/vendor/yaml/dist/schema/yaml-1.1/omap.d.ts +22 -0
- package/lib/vendor/yaml/dist/schema/yaml-1.1/omap.js +77 -0
- package/lib/vendor/yaml/dist/schema/yaml-1.1/pairs.d.ts +10 -0
- package/lib/vendor/yaml/dist/schema/yaml-1.1/pairs.js +82 -0
- package/lib/vendor/yaml/dist/schema/yaml-1.1/schema.d.ts +1 -0
- package/lib/vendor/yaml/dist/schema/yaml-1.1/schema.js +41 -0
- package/lib/vendor/yaml/dist/schema/yaml-1.1/set.d.ts +28 -0
- package/lib/vendor/yaml/dist/schema/yaml-1.1/set.js +96 -0
- package/lib/vendor/yaml/dist/schema/yaml-1.1/timestamp.d.ts +6 -0
- package/lib/vendor/yaml/dist/schema/yaml-1.1/timestamp.js +105 -0
- package/lib/vendor/yaml/dist/stringify/foldFlowLines.d.ts +34 -0
- package/lib/vendor/yaml/dist/stringify/foldFlowLines.js +151 -0
- package/lib/vendor/yaml/dist/stringify/stringify.d.ts +21 -0
- package/lib/vendor/yaml/dist/stringify/stringify.js +132 -0
- package/lib/vendor/yaml/dist/stringify/stringifyCollection.d.ts +17 -0
- package/lib/vendor/yaml/dist/stringify/stringifyCollection.js +155 -0
- package/lib/vendor/yaml/dist/stringify/stringifyComment.d.ts +10 -0
- package/lib/vendor/yaml/dist/stringify/stringifyComment.js +24 -0
- package/lib/vendor/yaml/dist/stringify/stringifyDocument.d.ts +4 -0
- package/lib/vendor/yaml/dist/stringify/stringifyDocument.js +87 -0
- package/lib/vendor/yaml/dist/stringify/stringifyNumber.d.ts +2 -0
- package/lib/vendor/yaml/dist/stringify/stringifyNumber.js +27 -0
- package/lib/vendor/yaml/dist/stringify/stringifyPair.d.ts +3 -0
- package/lib/vendor/yaml/dist/stringify/stringifyPair.js +152 -0
- package/lib/vendor/yaml/dist/stringify/stringifyString.d.ts +9 -0
- package/lib/vendor/yaml/dist/stringify/stringifyString.js +338 -0
- package/lib/vendor/yaml/dist/test-events.d.ts +4 -0
- package/lib/vendor/yaml/dist/test-events.js +134 -0
- package/lib/vendor/yaml/dist/util.d.ts +16 -0
- package/lib/vendor/yaml/dist/util.js +28 -0
- package/lib/vendor/yaml/dist/visit.d.ts +102 -0
- package/lib/vendor/yaml/dist/visit.js +236 -0
- package/lib/vendor/yaml/package.json +97 -0
- package/lib/web-runtime.cjs +53 -0
- package/locale/en.json +7 -0
- package/locale/zh.json +7 -0
- package/package.json +63 -4
- package/profile/VAULT.md +221 -0
- package/skills/LICENSE +21 -0
- package/skills/defuddle/SKILL.md +43 -0
- package/skills/json-canvas/SKILL.md +253 -0
- package/skills/json-canvas/references/EXAMPLES.md +329 -0
- package/skills/knap/SKILL.md +102 -0
- package/skills/obsidian-bases/SKILL.md +601 -0
- package/skills/obsidian-bases/references/FUNCTIONS_REFERENCE.md +173 -0
- package/skills/obsidian-cli/SKILL.md +141 -0
- package/skills/obsidian-headless/SKILL.md +79 -0
- package/skills/obsidian-markdown/SKILL.md +202 -0
- package/skills/obsidian-markdown/references/CALLOUTS.md +58 -0
- package/skills/obsidian-markdown/references/EMBEDS.md +70 -0
- package/skills/obsidian-markdown/references/PROPERTIES.md +63 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,220 @@
|
|
|
1
|
-
|
|
1
|
+
English | [简体中文](README.zh.md)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# ModularOB Connectors for DeepSeek Harness
|
|
4
|
+
|
|
5
|
+
Current release: **0.6.8**.
|
|
6
|
+
|
|
7
|
+
Three things, nothing else:
|
|
8
|
+
|
|
9
|
+
1. **A vault picker in the native model menu.** The list comes from Obsidian's own registry (`obsidian.json`). The choice is stored per conversation.
|
|
10
|
+
2. **A DSH-native vault profile.** `profile/VAULT.md` ships the author's vault map and workflow. It is sent as part of the system prompt only in conversations that selected a vault. Edit it with the tabbed settings form; it is not FlowText's file and has no FlowText-only fields.
|
|
11
|
+
3. **The official Obsidian connector skills.** Markdown, Bases, Canvas, CLI, Headless, Defuddle, and Knap are registered as DSH skills, and the **SKILLS** tab lets you enable or disable each one. Changes apply immediately and persist across restarts.
|
|
12
|
+
|
|
13
|
+
One small tool, `obsidian_file`, gives the agent vault-relative read/list/search/write access to the selected vault. It exists because a sandboxed shell cannot write files outside the conversation workspace; the skills do the rest.
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
Pick the profile that matches the DSH UI you use. The desktop app uses `desktop`; `dsh web` uses `web`.
|
|
18
|
+
|
|
19
|
+
### Install method by network
|
|
20
|
+
|
|
21
|
+
A `github:owner/repo` shorthand **without a commit** makes pnpm resolve the branch using `git ls-remote` over HTTPS, which stalls for about 75 seconds and then fails with
|
|
22
|
+
`ERR_PNPM_GIT_RESOLVE_FAILED` where GitHub is unreachable. Pick a method below.
|
|
23
|
+
|
|
24
|
+
**1. npm registry (recommended; mirrors work)**
|
|
25
|
+
|
|
26
|
+
```sh
|
|
27
|
+
dsh plugin --profile desktop add modularob-connectors --registry=https://registry.npmmirror.com/
|
|
28
|
+
dsh plugin --profile web add modularob-connectors --registry=https://registry.npmmirror.com/
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
If the mirror has not synced yet, retry with `--registry=https://registry.npmjs.org/`. The npm method requires the package to have been published first.
|
|
32
|
+
|
|
33
|
+
CLI Commander installers shipped with this release use a bundled, checksum-verified connector tarball, so this step needs no network. Without that bundle, the installer tries npmmirror then npm official. DSH CLI / pnpm still require network on first installation. Installer sources are in `installers/`; `scripts/patch-cli-commander.mjs` updates both embedded platform scripts and copies the release tarball. No blanket build approval is needed for this connector.
|
|
34
|
+
|
|
35
|
+
**2. Offline tarball (requires DSH and pnpm already installed)**
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
dsh plugin --profile web add /absolute/path/modularob-connectors-<version>.tgz
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
**3. Source archive (no Git)**
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
dsh plugin --profile web add https://codeload.github.com/ytmaps/ModularOB-connectors/tar.gz/<40-char-commit>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
You can also ask a DSH conversation to install it:
|
|
48
|
+
|
|
49
|
+
> Install the Obsidian connector from `modularob-connectors`.
|
|
50
|
+
|
|
51
|
+
Then open **Plugins**, enable **Obsidian connector**, and reload once if the vault row does not appear.
|
|
52
|
+
|
|
53
|
+
### Use with `dsh web`
|
|
54
|
+
|
|
55
|
+
`dsh web` uses a separate `web` profile. CLI Commander starts it with `--host 127.0.0.1 --port 0 --no-open`: the OS assigns a free port, so Desktop can stay open. It records the actual token URL under `~/.dsh/obsidian-web/url` and verifies authentication before reusing it. Legacy port 3080 URLs are ignored; no process is terminated.
|
|
56
|
+
|
|
57
|
+
[Official CLI flags](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/cli-help.md) also support a chosen port, for example `dsh web --port 3081`. For manual setup:
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
dsh web --host 127.0.0.1 --port 0 --no-open
|
|
61
|
+
|
|
62
|
+
dsh plugin --profile web add modularob-connectors
|
|
63
|
+
|
|
64
|
+
dsh web --host 127.0.0.1 --port 0 --no-open
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
The host runs on the same machine as Obsidian, so vault discovery, `obsidian_file`, the Obsidian CLI, and the active note work as they do in the desktop app. `dsh web` listens on `127.0.0.1` only.
|
|
68
|
+
|
|
69
|
+
The connector's sidebar entry and settings page are part of the web client. 0.6.4 and later export `./package.json`, which the DSH web client-module graph needs to resolve the plugin; older installs can load the host half but silently miss the sidebar/settings client half. Use 0.6.5 or later.
|
|
70
|
+
|
|
71
|
+
### From a release tarball (no Git needed)
|
|
72
|
+
|
|
73
|
+
Download the `.tgz` from the latest release, then install it for the same profile:
|
|
74
|
+
|
|
75
|
+
```sh
|
|
76
|
+
dsh plugin --profile <profile> add /absolute/path/to/modularob-connectors-0.6.8.tgz
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
For `dsh web`:
|
|
80
|
+
|
|
81
|
+
```sh
|
|
82
|
+
dsh plugin --profile web add /absolute/path/to/modularob-connectors-0.6.8.tgz
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
You can also choose the tarball in the Plugins page.
|
|
86
|
+
|
|
87
|
+
### From the GitHub source archive (no Git needed)
|
|
88
|
+
|
|
89
|
+
```sh
|
|
90
|
+
dsh plugin --profile <profile> add https://github.com/ytmaps/ModularOB-connectors/archive/refs/heads/main.tar.gz
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
For `dsh web`:
|
|
94
|
+
|
|
95
|
+
```sh
|
|
96
|
+
dsh plugin --profile web add https://github.com/ytmaps/ModularOB-connectors/archive/refs/heads/main.tar.gz
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
The archive path works without Git and without a GitHub Release. After installing, restart `dsh web` so the profile is composed again.
|
|
100
|
+
|
|
101
|
+
## Sidebar entry and master switch
|
|
102
|
+
|
|
103
|
+
The left sidebar shows an **Obsidian Connector** row next to Plugins and Automation. The row label follows the UI language: English shows **Obsidian Connector**, Chinese shows **Obsidian 连接器**. It opens this connector's tabbed settings page in the main column, so you do not have to go through Settings → Plugins.
|
|
104
|
+
|
|
105
|
+
The settings page starts with an **Enabled** switch:
|
|
106
|
+
|
|
107
|
+
- On: the `obsidian_file` tool, connector skills, vault menu/logo, and prompt context are active.
|
|
108
|
+
- Off: those features stop, but this settings page stays available so you can switch it back on.
|
|
109
|
+
|
|
110
|
+
This is a functional switch, not an uninstall. To unload the DSH bundle itself, use Settings → Plugins and disable the bundle there.
|
|
111
|
+
|
|
112
|
+
## One-click update
|
|
113
|
+
|
|
114
|
+
The settings toolbar has an **Update** button. It does not require the current install to be Git:
|
|
115
|
+
|
|
116
|
+
- npm installs check and update through the configured package registry without GitHub. Other installs read the latest GitHub release and prefer its `.tgz` asset. This works for Git, tarball, registry, local-path, and linked installs.
|
|
117
|
+
- If the latest release has no tarball asset, it falls back to GitHub's source archive at the latest commit. pnpm handles that archive, so **no Git binary or Git install is required**.
|
|
118
|
+
- The update may switch the install source to the release tarball, but it never changes personal settings.
|
|
119
|
+
- A release `.tgz` is preferred when present, but it is optional: the source archive is always available.
|
|
120
|
+
- Personal settings are preserved. The updater copies `profile.md`, `state.json`, and `skills.json` to `$DSH_HOME/obsidian-connector/backups/update-<timestamp>/` first, and only replaces plugin code.
|
|
121
|
+
- A profile customized in the settings page is stored as `profile.md` and is never replaced by the bundled default.
|
|
122
|
+
- The universal updater landed in 0.6.2; the current release is 0.6.8. Users on 0.6.1 or earlier must update once manually, preferably with the archive or tarball command above; after that the button handles future releases without Git.
|
|
123
|
+
|
|
124
|
+
## Use
|
|
125
|
+
|
|
126
|
+
1. Install the bundle and open a conversation.
|
|
127
|
+
2. Open the model menu in the composer (the row showing the model and reasoning level) and pick **Obsidian vault**.
|
|
128
|
+
3. Ask the agent to work with your notes. It receives the vault name, path, and the bundled vault profile, and can load the relevant Obsidian skill.
|
|
129
|
+
|
|
130
|
+
Edit the vault profile from the left-sidebar **Obsidian Connector** row, or from the sidebar **Plugins** page: open **Obsidian connector**, then click the **Obsidian connector** row (the row title with a chevron). Saving takes effect on the next message; no restart is needed.
|
|
131
|
+
|
|
132
|
+
The skills use the Obsidian CLI through `bash` (Obsidian must be open with its CLI enabled), and Obsidian Headless (`ob`) for Sync/Publish. Defuddle and Knap are installed by the agent from npm only when the user agrees.
|
|
133
|
+
|
|
134
|
+
## Skills
|
|
135
|
+
|
|
136
|
+
The connector ships seven official skills. Open the **SKILLS** tab to see each skill's name and description and switch it on or off. Toggles take effect immediately for the next model step and are stored in `$DSH_HOME/obsidian-connector/skills.json`; this version does not add or delete skills.
|
|
137
|
+
|
|
138
|
+
## Vault profile and settings editor
|
|
139
|
+
|
|
140
|
+
Open the **Obsidian Connector** row in the left sidebar to edit this page. The same page remains reachable from Settings → Plugins.
|
|
141
|
+
|
|
142
|
+
- `profile/VAULT.md` is the bundled default. This repository ships the author's complete profile; replace the file or edit it in settings before using the plugin with a different vault.
|
|
143
|
+
- It is injected as a system-prompt section **only when the conversation's selected vault is present**; sessions without a vault pay nothing.
|
|
144
|
+
- Edits are saved to `$DSH_HOME/obsidian-connector/profile.md` (0600), replacing the bundled text. **Restore default** deletes that override.
|
|
145
|
+
- The profile is one global text: it applies to whichever vault the conversation selects. If you switch primary vaults, edit it for the new one.
|
|
146
|
+
- The limit is 64,000 characters. The text is sent with `interpolate: false`, so `{{...}}` is not treated as a prompt variable.
|
|
147
|
+
|
|
148
|
+
The settings page is a tabbed editor, not a raw text box:
|
|
149
|
+
|
|
150
|
+
| Tab | What it edits |
|
|
151
|
+
|---|---|
|
|
152
|
+
| Collections | title, ID, folders, aliases, date rule |
|
|
153
|
+
| Path rules | path globs and one multi-line rules block |
|
|
154
|
+
| Templates | template title, ID, file path, aliases |
|
|
155
|
+
| Creation | default new-note folder, image/attachment folder, default template, and a live summary of the bound folder/template |
|
|
156
|
+
| Body & workflow | free-Markdown sections such as vault overview and the Luhmann workflow |
|
|
157
|
+
| SKILLS | enable or disable each of the 7 bundled connector skills; changes apply immediately |
|
|
158
|
+
| Advanced | raw source mode, parser warnings, active-note toggle |
|
|
159
|
+
|
|
160
|
+
- Each card and list has `+` / `−` controls; deleting asks for confirmation.
|
|
161
|
+
- Path fields have a **Choose** button that lists folders from a selected validation vault.
|
|
162
|
+
- **Source** mode shows the exact saved profile; switching back to the form reparses it.
|
|
163
|
+
- The header has **Read the active note** (on by default). When the selected vault is active in Obsidian, the next turn's prompt context includes the current note path, so path rules can apply.
|
|
164
|
+
|
|
165
|
+
The profile is DSH-native: FlowText-only fields such as `search-mode`, `search`, and `imports` are not part of the schema.
|
|
166
|
+
|
|
167
|
+
## Vault discovery
|
|
168
|
+
|
|
169
|
+
Obsidian stores its vault list at:
|
|
170
|
+
|
|
171
|
+
- macOS: `~/Library/Application Support/obsidian/obsidian.json`
|
|
172
|
+
- Windows: `%APPDATA%/obsidian/obsidian.json`
|
|
173
|
+
- Linux: `${XDG_CONFIG_HOME:-~/.config}/obsidian/obsidian.json`
|
|
174
|
+
|
|
175
|
+
Set `obsidianConfigFile` or `OBSIDIAN_CONFIG_PATH` to use another file. Vaults from the config are added to the discovered list.
|
|
176
|
+
|
|
177
|
+
## Configuration
|
|
178
|
+
|
|
179
|
+
| Field | Default | Meaning |
|
|
180
|
+
|---|---|---|
|
|
181
|
+
| `vaults` | `[]` | Extra vaults: paths or `{ name, path }` objects. |
|
|
182
|
+
| `obsidianConfigFile` | platform path | Obsidian registry file override. |
|
|
183
|
+
| `allowWrite` | `true` | Set `false` to make `obsidian_file` read-only. |
|
|
184
|
+
| `maxReadBytes` | `400000` | Text returned by one read before truncation. |
|
|
185
|
+
| `maxWriteBytes` | `1048576` | Largest `obsidian_file` write (capped at 5 MiB). |
|
|
186
|
+
| `stateFile` | `$DSH_HOME/obsidian-connector/state.json` | Per-conversation vault choices. |
|
|
187
|
+
|
|
188
|
+
## The `obsidian_file` tool
|
|
189
|
+
|
|
190
|
+
| Action | Behavior |
|
|
191
|
+
|---|---|
|
|
192
|
+
| `read` | Return one `.md`, `.canvas`, `.base`, or `.txt` file. |
|
|
193
|
+
| `write` | Create, overwrite, or append one of those files. |
|
|
194
|
+
| `list` | List document paths, optionally under a folder. |
|
|
195
|
+
| `search` | Find literal text in notes and return `path:line: text`. |
|
|
196
|
+
|
|
197
|
+
Paths are vault-relative. `..`, hidden paths, and symlinks out of the vault are refused. Writes are atomic and gated by `allowWrite`. Other text files (for example a `.md` note) can be read through DSH's normal read tool as well; writes outside the workspace go through `obsidian_file`.
|
|
198
|
+
|
|
199
|
+
## Skill sources
|
|
200
|
+
|
|
201
|
+
The `skills/` directory is the official [obsidianmd/obsidian-skills](https://github.com/obsidianmd/obsidian-skills) plugin content (MIT), including the reference files its links point to. Each skill is registered with its directory as the resource base, so `references/...` links resolve.
|
|
202
|
+
|
|
203
|
+
## Limits
|
|
204
|
+
|
|
205
|
+
- A conversation has no vault until the user picks one; `obsidian_file` reports that instead of guessing.
|
|
206
|
+
- The picker sits in the model menu, which the harness renders once a conversation has a session. In a brand-new conversation, send the first message, then pick the vault; the choice then applies to the rest of that conversation.
|
|
207
|
+
- The vault profile is injected only after a vault is selected. It is one text for all vaults, not a per-vault profile.
|
|
208
|
+
- The choice is stored beside the plugin (`stateFile`), not in the session log. A forked conversation starts without a vault until the picker is used, and replay does not reconstruct the choice.
|
|
209
|
+
- The CLI skill needs the Obsidian desktop app running and its CLI enabled. The Headless skill needs Node.js 22+ and its own sign-in; Sync and Publish need a subscription.
|
|
210
|
+
- Defuddle and Knap are not bundled; the skills explain their installation.
|
|
211
|
+
- The composer picker needs the harness Web GUI served over `http://`. If its API is unreachable, the control stays hidden.
|
|
212
|
+
|
|
213
|
+
## Development
|
|
214
|
+
|
|
215
|
+
```sh
|
|
216
|
+
npm test
|
|
217
|
+
npm run pack:check
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
See [docs/PUBLISHING.md](docs/PUBLISHING.md) for packaging and publishing.
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
[English](README.md) | 简体中文
|
|
2
|
+
|
|
3
|
+
# DeepSeek Harness 的 ModularOB 连接器
|
|
4
|
+
|
|
5
|
+
当前版本:**0.6.8**。
|
|
6
|
+
|
|
7
|
+
只做三件事:
|
|
8
|
+
|
|
9
|
+
1. **原生模型菜单里的仓库选择器。** 列表来自 Obsidian 自己的仓库注册表(`obsidian.json`),选择按对话保存。
|
|
10
|
+
2. **DSH 原生的仓库说明。** `profile/VAULT.md` 内置了作者自己的仓库结构和工作流,只会在“已选择仓库”的对话中作为系统提示词的一部分发送。用分页表单编辑;它不是 FlowText 的文件,也不包含 FlowText 专用字段。
|
|
11
|
+
3. **官方 Obsidian 连接器技能。** Markdown、Bases、Canvas、CLI、Headless、Defuddle、Knap 注册为 DSH 技能;**SKILLS** 页签可以逐个开启或关闭,立即生效并在重启后保留。
|
|
12
|
+
|
|
13
|
+
还有一个 `obsidian_file` 工具,让代理用仓库相对路径读取、列出、搜索、创建或更新文件。它存在的原因是:受沙箱限制的 shell 不能写会话工作区之外的文件;其余工作交给技能。
|
|
14
|
+
|
|
15
|
+
## 安装
|
|
16
|
+
|
|
17
|
+
先选择与 DSH 界面一致的 profile:桌面版用 `desktop`,`dsh web` 用 `web`。
|
|
18
|
+
|
|
19
|
+
### 安装方式(按网络环境选择)
|
|
20
|
+
|
|
21
|
+
`github:owner/repo` 这种简写**不带提交号**时,pnpm 需要通过 HTTPS 执行 `git ls-remote` 解析分支引用,
|
|
22
|
+
GitHub 访问受限时会卡约 75 秒再报 `ERR_PNPM_GIT_RESOLVE_FAILED`。请按下面的顺序选择:
|
|
23
|
+
|
|
24
|
+
**1. npm registry(推荐,可用国内镜像)**
|
|
25
|
+
|
|
26
|
+
```sh
|
|
27
|
+
dsh plugin --profile desktop add modularob-connectors --registry=https://registry.npmmirror.com/
|
|
28
|
+
dsh plugin --profile web add modularob-connectors --registry=https://registry.npmmirror.com/
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
镜像未同步时使用 `--registry=https://registry.npmjs.org/` 重试。npm 方式需先完成发布。
|
|
32
|
+
|
|
33
|
+
本次发布配套的 CLI Commander 安装器优先使用内附且校验 SHA256 的连接器安装包,这一步无需联网;没有内附包时依次尝试 npmmirror 和 npm 官方源。首次安装 DSH CLI / pnpm 仍需联网。安装器源码在 `installers/`,`scripts/patch-cli-commander.mjs` 可同步两个平台的嵌入脚本和安装包。连接器不需要全量批准构建脚本。
|
|
34
|
+
|
|
35
|
+
**2. 离线 tarball(已安装 DSH 和 pnpm 时无需联网)**
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
dsh plugin --profile web add /绝对路径/modularob-connectors-<版本>.tgz
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
**3. 源码归档(无 git)**
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
dsh plugin --profile web add https://codeload.github.com/ytmaps/ModularOB-connectors/tar.gz/<40位提交号>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
也可以在 DSH 对话里让代理安装:
|
|
48
|
+
|
|
49
|
+
> 安装 Obsidian 连接器,来源 `modularob-connectors`。
|
|
50
|
+
|
|
51
|
+
安装后打开 **插件**,启用 **Obsidian connector**;如果仓库行没有出现,重新加载一次。
|
|
52
|
+
|
|
53
|
+
### 配合 `dsh web` 使用
|
|
54
|
+
|
|
55
|
+
`dsh web` 使用独立的 `web` profile。CLI Commander 以 `--host 127.0.0.1 --port 0 --no-open` 启动,由系统分配空闲端口,可与桌面端同时运行。实际 token URL 保存在 `~/.dsh/obsidian-web/url`,重用前验证认证结果;旧的 3080 地址会被忽略,不再停止其他进程。
|
|
56
|
+
|
|
57
|
+
[官方 CLI 参数](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/cli-help.md)也支持指定端口,如 `dsh web --port 3081`。手动安装示例:
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
dsh web --host 127.0.0.1 --port 0 --no-open
|
|
61
|
+
|
|
62
|
+
dsh plugin --profile web add modularob-connectors
|
|
63
|
+
|
|
64
|
+
dsh web --host 127.0.0.1 --port 0 --no-open
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Host 与 Obsidian 在同一台电脑上运行,因此仓库发现、`obsidian_file`、Obsidian CLI 和活动笔记与桌面版一致。`dsh web` 只监听 `127.0.0.1`。
|
|
68
|
+
|
|
69
|
+
连接器的左侧栏入口和设置页属于 Web 客户端。0.6.4 及之后导出了 `./package.json`,Web 的 client-module 图才能解析插件;更早的安装可能只加载 Host 半边,而静默缺少左侧栏/设置页。请使用 0.6.5 或更新版本。
|
|
70
|
+
|
|
71
|
+
### 从 release 压缩包安装(不需要 Git)
|
|
72
|
+
|
|
73
|
+
下载最新 release 的 `.tgz`,为对应 profile 安装:
|
|
74
|
+
|
|
75
|
+
```sh
|
|
76
|
+
dsh plugin --profile <profile> add /绝对路径/modularob-connectors-0.6.8.tgz
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
`dsh web` 使用:
|
|
80
|
+
|
|
81
|
+
```sh
|
|
82
|
+
dsh plugin --profile web add /绝对路径/modularob-connectors-0.6.8.tgz
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
也可以在“插件”页直接选择压缩包。
|
|
86
|
+
|
|
87
|
+
### 从 GitHub 源码归档安装(不需要 Git)
|
|
88
|
+
|
|
89
|
+
```sh
|
|
90
|
+
dsh plugin --profile <profile> add https://github.com/ytmaps/ModularOB-connectors/archive/refs/heads/main.tar.gz
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
`dsh web` 使用:
|
|
94
|
+
|
|
95
|
+
```sh
|
|
96
|
+
dsh plugin --profile web add https://github.com/ytmaps/ModularOB-connectors/archive/refs/heads/main.tar.gz
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
源码归档不需要 Git,也不需要 GitHub Release。安装后重启 `dsh web`,让 profile 重新组合。
|
|
100
|
+
|
|
101
|
+
## 左侧栏入口与总开关
|
|
102
|
+
|
|
103
|
+
左侧栏现在会在“插件”“自动化任务”旁边显示 **Obsidian 连接器** 行(英文界面为 **Obsidian Connector**)。点击后会在主区域打开连接器的分页设置页,不必再绕到“设置 → 插件”。
|
|
104
|
+
|
|
105
|
+
设置页顶部有 **启用** 开关:
|
|
106
|
+
|
|
107
|
+
- 开启:`obsidian_file` 工具、连接器技能、仓库菜单/logo、提示词上下文都生效。
|
|
108
|
+
- 关闭:这些功能停止,但设置页仍然保留,可以随时重新开启。
|
|
109
|
+
|
|
110
|
+
这是功能开关,不是卸载。若要真正卸载 DSH bundle,请到“设置 → 插件”里关闭对应 bundle。
|
|
111
|
+
|
|
112
|
+
## 一键更新
|
|
113
|
+
|
|
114
|
+
设置页工具栏有 **更新** 按钮,不要求当前安装是 Git:
|
|
115
|
+
|
|
116
|
+
- npm 安装通过配置的 registry 检查和更新,不再访问 GitHub;其他安装读取 GitHub 最新 release,优先使用其中的 `.tgz` 资产。Git、压缩包、registry、本地路径、链接安装都可以用。
|
|
117
|
+
- 如果最新 release 没有压缩包资产,会回退到 GitHub 最新提交的源码归档;pnpm 可以直接处理该归档,**不需要 Git 二进制,也不要求当前是 Git 安装**。
|
|
118
|
+
- 更新可能把安装源切换为 release 压缩包,但不会修改个人设置。
|
|
119
|
+
- 有 release `.tgz` 时优先使用,但不是必需;源码归档始终可用。
|
|
120
|
+
- 个人设置会保留。更新前会把 `profile.md`、`state.json`、`skills.json` 复制到 `$DSH_HOME/obsidian-connector/backups/update-<时间戳>/`,更新只替换插件代码。
|
|
121
|
+
- 在设置页自定义过的 profile 保存为 `profile.md`,不会被新版内置默认值覆盖。
|
|
122
|
+
- 通用更新器从 0.6.2 开始;当前版本是 0.6.8。0.6.1 及更早用户需要先手动更新一次,建议直接用上面的源码归档或压缩包命令;之后即可不依赖 Git 一键更新。
|
|
123
|
+
|
|
124
|
+
## 使用
|
|
125
|
+
|
|
126
|
+
1. 安装 bundle 并打开一个对话。
|
|
127
|
+
2. 打开输入框的模型菜单(显示模型和推理等级的那一行),选择 **Obsidian 仓库**。
|
|
128
|
+
3. 让代理处理笔记。它会收到仓库名称、路径和内置仓库说明,并按需加载相应的 Obsidian 技能。
|
|
129
|
+
|
|
130
|
+
也可以在左侧栏 **Obsidian 连接器** 行编辑仓库说明;或从 **插件** 页进入 **Obsidian connector**,点击带箭头的行标题。保存后下一条消息生效,不需要重启。
|
|
131
|
+
|
|
132
|
+
技能通过 `bash` 调用 Obsidian CLI(需要 Obsidian 桌面版打开并启用 CLI),Sync/Publish 使用 Obsidian Headless(`ob`)。Defuddle 和 Knap 只在用户同意时由代理从 npm 安装。
|
|
133
|
+
|
|
134
|
+
## 技能
|
|
135
|
+
|
|
136
|
+
连接器内置 7 个官方技能。打开 **SKILLS** 页签可以查看每个技能的名称、描述并开关。开关对下一条模型请求生效,状态保存在 `$DSH_HOME/obsidian-connector/skills.json`。当前版本不提供新增或删除技能。
|
|
137
|
+
|
|
138
|
+
## 仓库说明与设置编辑器
|
|
139
|
+
|
|
140
|
+
左侧栏的 **Obsidian 连接器** 行打开的就是设置页;也可以从“设置 → 插件”进入。
|
|
141
|
+
|
|
142
|
+
- `profile/VAULT.md` 是内置默认值。仓库里带的是作者自己的完整说明;换仓库使用前请替换文件或在设置页编辑。
|
|
143
|
+
- 只有在当前对话**已选择仓库**时,它才会作为系统提示词 section 注入;未选择仓库的会话不产生额外 token。
|
|
144
|
+
- 编辑后保存到 `$DSH_HOME/obsidian-connector/profile.md`(0600),覆盖内置文本。**恢复默认**会删除这份覆盖。
|
|
145
|
+
- 仓库说明是一份全局文本,应用到当前对话所选的任意仓库。切换主仓库时请按新仓库修改。
|
|
146
|
+
- 上限 64,000 字符。发送时使用 `interpolate: false`,所以 `{{...}}` 不会被当作提示词变量。
|
|
147
|
+
|
|
148
|
+
设置页是分页表单,不是原始文本框:
|
|
149
|
+
|
|
150
|
+
| 页签 | 编辑内容 |
|
|
151
|
+
|---|---|
|
|
152
|
+
| 资料类型 | 标题、ID、目录、别名、日期规则 |
|
|
153
|
+
| 路径规则 | 路径 glob 和一段多行规则 |
|
|
154
|
+
| 模板 | 模板标题、ID、文件路径、别名 |
|
|
155
|
+
| 创建默认 | 默认新建目录、图片/附件目录、默认模板,以及目录/模板绑定摘要 |
|
|
156
|
+
| 正文 / 工作流 | 自由 Markdown 章节,例如仓库概览和卢曼工作流 |
|
|
157
|
+
| SKILLS | 开启/关闭 7 个内置连接器技能,立即生效 |
|
|
158
|
+
| 高级 | 源码模式、解析警告、活动笔记开关 |
|
|
159
|
+
|
|
160
|
+
- 每张卡片和列表都有 `+` / `−`,删除会二次确认。
|
|
161
|
+
- 路径字段有 **选择** 按钮,从选定的校验仓库中列出文件夹。
|
|
162
|
+
- **源码** 模式显示精确的已保存 profile;切回表单会重新解析。
|
|
163
|
+
- 顶部有 **读取当前活动笔记**(默认开启)。当选中的仓库在 Obsidian 中处于活动状态时,下一轮提示词上下文会包含当前笔记路径,路径规则才能生效。
|
|
164
|
+
|
|
165
|
+
仓库说明是 DSH 原生格式:`search-mode`、`search`、`imports` 等 FlowText 专用字段不属于该 schema。
|
|
166
|
+
|
|
167
|
+
## 仓库发现
|
|
168
|
+
|
|
169
|
+
Obsidian 的仓库列表位于:
|
|
170
|
+
|
|
171
|
+
- macOS:`~/Library/Application Support/obsidian/obsidian.json`
|
|
172
|
+
- Windows:`%APPDATA%/obsidian/obsidian.json`
|
|
173
|
+
- Linux:`${XDG_CONFIG_HOME:-~/.config}/obsidian/obsidian.json`
|
|
174
|
+
|
|
175
|
+
可以用 `obsidianConfigFile` 或 `OBSIDIAN_CONFIG_PATH` 指定其他文件。配置中的仓库会加入发现列表。
|
|
176
|
+
|
|
177
|
+
## 配置
|
|
178
|
+
|
|
179
|
+
| 字段 | 默认值 | 含义 |
|
|
180
|
+
|---|---|---|
|
|
181
|
+
| `vaults` | `[]` | 额外仓库:路径或 `{ name, path }` 对象。 |
|
|
182
|
+
| `obsidianConfigFile` | 平台路径 | 覆盖 Obsidian 注册表文件。 |
|
|
183
|
+
| `allowWrite` | `true` | 设为 `false` 时 `obsidian_file` 只读。 |
|
|
184
|
+
| `maxReadBytes` | `400000` | 单次读取返回的最大文本,超出会截断。 |
|
|
185
|
+
| `maxWriteBytes` | `1048576` | 单次写入上限(最高 5 MiB)。 |
|
|
186
|
+
| `stateFile` | `$DSH_HOME/obsidian-connector/state.json` | 按对话保存的仓库选择。 |
|
|
187
|
+
|
|
188
|
+
## `obsidian_file` 工具
|
|
189
|
+
|
|
190
|
+
| 动作 | 行为 |
|
|
191
|
+
|---|---|
|
|
192
|
+
| `read` | 读取一个 `.md`、`.canvas`、`.base` 或 `.txt` 文件。 |
|
|
193
|
+
| `write` | 创建、覆盖或追加这些类型的文件。 |
|
|
194
|
+
| `list` | 列出文档路径,可限定文件夹。 |
|
|
195
|
+
| `search` | 在笔记中查找字面文本,返回 `path:line: text`。 |
|
|
196
|
+
|
|
197
|
+
路径都是仓库相对路径。拒绝 `..`、隐藏路径和指向仓库外部的符号链接。写入是原子的,并受 `allowWrite` 控制。其他文本文件(例如 `.md` 笔记)也可以用 DSH 的普通 read 工具读取;工作区外的写入通过 `obsidian_file`。
|
|
198
|
+
|
|
199
|
+
## 技能来源
|
|
200
|
+
|
|
201
|
+
`skills/` 目录是官方 [obsidianmd/obsidian-skills](https://github.com/obsidianmd/obsidian-skills) 插件内容(MIT),包含其链接指向的参考文件。每个技能以所在目录作为 resource base,所以 `references/...` 链接可以解析。
|
|
202
|
+
|
|
203
|
+
## 限制
|
|
204
|
+
|
|
205
|
+
- 对话在用户选择之前没有仓库;`obsidian_file` 会明确报告,而不是猜测。
|
|
206
|
+
- 选择器位于模型菜单,harness 只有在对话已有 session 时才渲染它。全新对话请先发一条消息,再选择仓库;选择对本次对话剩余部分生效。
|
|
207
|
+
- 仓库说明只有选择仓库后才会注入。它是一份全局文本,不是按仓库区分。
|
|
208
|
+
- 选择保存在插件旁边(`stateFile`),不在会话日志里。fork 的对话在再次选择前没有仓库,replay 也不会重建选择。
|
|
209
|
+
- CLI 技能需要 Obsidian 桌面版运行并启用 CLI。Headless 技能需要 Node.js 22+ 和单独登录;Sync/Publish 需要订阅。
|
|
210
|
+
- Defuddle 和 Knap 不内置;技能里说明了安装方式。
|
|
211
|
+
- 输入框选择器需要 harness Web GUI 通过 `http://` 提供。API 不可达时控件保持隐藏。
|
|
212
|
+
|
|
213
|
+
## 开发
|
|
214
|
+
|
|
215
|
+
```sh
|
|
216
|
+
npm test
|
|
217
|
+
npm run pack:check
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
打包和发布见 [docs/PUBLISHING.md](docs/PUBLISHING.md)。
|