threadnote 0.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.
@@ -0,0 +1,107 @@
1
+ # Troubleshooting
2
+
3
+ ## `openviking-server` Missing
4
+
5
+ Run:
6
+
7
+ ```bash
8
+ threadnote install
9
+ ```
10
+
11
+ The installer prefers `pipx`, then `uv`, then `python3 -m pip install --user`.
12
+
13
+ ## Local Embedding Extra Missing
14
+
15
+ The default OpenViking config uses the local embedding backend. If the server log says `llama-cpp-python` is missing,
16
+ rerun:
17
+
18
+ ```bash
19
+ threadnote install
20
+ ```
21
+
22
+ The installer repairs this by installing `openviking[local-embed]`.
23
+
24
+ ## Server Health Fails
25
+
26
+ Check whether the server is running:
27
+
28
+ ```bash
29
+ curl http://127.0.0.1:1933/health
30
+ ```
31
+
32
+ For detached starts, logs are written to:
33
+
34
+ ```text
35
+ ~/.openviking/logs/server.log
36
+ ```
37
+
38
+ ## Port Already In Use
39
+
40
+ The default bind address is `127.0.0.1:1933`. This does not conflict with projects serving `localhost:80`,
41
+ `localhost:443`, or custom hostnames from `/etc/hosts`; those are different host and port bindings.
42
+
43
+ If another process already uses port `1933`, pick a different port:
44
+
45
+ ```bash
46
+ THREADNOTE_PORT=1934 threadnote start
47
+ THREADNOTE_PORT=1934 threadnote mcp-install codex --apply
48
+ ```
49
+
50
+ Keep the same port in the agent MCP configuration and in future `threadnote` invocations.
51
+
52
+ ## Seed Skips Files
53
+
54
+ Skipped files usually matched a secret detector after redaction. Inspect the file manually and either remove the risky
55
+ content or leave it out of the manifest.
56
+
57
+ ## `seed-skills --native` Fails With `[INTERNAL]`
58
+
59
+ Native OpenViking skill ingestion generates skill overviews with the configured VLM provider. If the server log shows an
60
+ OpenAI quota, rate-limit, or authentication error, run `seed-skills` without `--native`. The default mode stores
61
+ `SKILL.md` files as searchable resources and does not require native skill overview generation.
62
+
63
+ After changing `~/.openviking/ov.conf`, restart the server:
64
+
65
+ ```bash
66
+ threadnote stop
67
+ threadnote start
68
+ ```
69
+
70
+ ## Claude MCP Fails While Health Is OK
71
+
72
+ OpenViking `0.3.12` can be healthy at `/health` while returning `404` at `/mcp`. That means the stable server does not
73
+ expose the native HTTP MCP endpoint.
74
+
75
+ Use the default stdio adapter:
76
+
77
+ ```bash
78
+ threadnote mcp-install claude --apply
79
+ claude mcp list
80
+ ```
81
+
82
+ `mcp-install claude` writes user-scoped Claude config by default. This is intentional: local-scoped config only applies
83
+ to one repo/project, and the `threadnote` shim runs the implementation from the checkout that installed it.
84
+
85
+ Only use `--native-http` with an OpenViking build that actually exposes `/mcp`.
86
+
87
+ ## Worktree Was Deleted
88
+
89
+ Memories live in `~/.openviking/data`, so deleting a branch or worktree does not delete stored memories. The launcher
90
+ configuration can still point at scripts inside the deleted worktree, though.
91
+
92
+ From any fresh checkout, run:
93
+
94
+ ```bash
95
+ threadnote repair
96
+ ```
97
+
98
+ `repair` reinstalls the `threadnote` shim, repairs generated config files, starts OpenViking if needed, and rewrites
99
+ Codex/Claude MCP configs to point at the current checkout.
100
+
101
+ ## MCP Install Is Only Printing Commands
102
+
103
+ This is expected. Run with `--apply` after reviewing the command:
104
+
105
+ ```bash
106
+ threadnote mcp-install codex --apply
107
+ ```
package/package.json ADDED
@@ -0,0 +1,67 @@
1
+ {
2
+ "name": "threadnote",
3
+ "version": "0.1.0",
4
+ "type": "commonjs",
5
+ "main": "dist/threadnote.cjs",
6
+ "description": "Shared local context and handoffs for development agents",
7
+ "license": "GPL-3.0-or-later",
8
+ "homepage": "https://github.com/Kashkovsky/threadnote#readme",
9
+ "bugs": {
10
+ "url": "https://github.com/Kashkovsky/threadnote/issues"
11
+ },
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/Kashkovsky/threadnote.git"
15
+ },
16
+ "publishConfig": {
17
+ "access": "public",
18
+ "registry": "https://registry.npmjs.org/"
19
+ },
20
+ "keywords": [
21
+ "agent",
22
+ "context",
23
+ "handoff",
24
+ "mcp",
25
+ "openviking"
26
+ ],
27
+ "bin": {
28
+ "threadnote": "bin/threadnote.cjs",
29
+ "threadnote-mcp-server": "bin/threadnote-mcp-server.cjs"
30
+ },
31
+ "files": [
32
+ ".threadnoteignore",
33
+ "bin/",
34
+ "config/",
35
+ "dist/",
36
+ "docs/",
37
+ "LICENSE",
38
+ "README.md",
39
+ "scripts/"
40
+ ],
41
+ "scripts": {
42
+ "build": "npm run clean --silent && esbuild threadnote.ts --bundle --platform=node --format=cjs --target=node20 --outfile=dist/threadnote.cjs && esbuild mcp_server.ts --bundle --platform=node --format=cjs --target=node20 --outfile=dist/mcp_server.cjs",
43
+ "clean": "rm -rf dist",
44
+ "dev": "tsx threadnote.ts",
45
+ "dev:mcp-server": "tsx mcp_server.ts",
46
+ "prepack": "npm run build",
47
+ "threadnote": "npm run build --silent && node ./bin/threadnote.cjs",
48
+ "doctor": "npm run build --silent && node ./bin/threadnote.cjs doctor",
49
+ "mcp-server": "npm run build --silent && node ./bin/threadnote-mcp-server.cjs",
50
+ "pack:dry-run": "npm pack --dry-run",
51
+ "typecheck": "tsc --noEmit"
52
+ },
53
+ "engines": {
54
+ "node": ">=20"
55
+ },
56
+ "devDependencies": {
57
+ "@modelcontextprotocol/sdk": "^1.29.0",
58
+ "@types/js-yaml": "^4.0.9",
59
+ "@types/node": "^25.6.0",
60
+ "commander": "^14.0.3",
61
+ "esbuild": "^0.27.7",
62
+ "js-yaml": "^4.1.1",
63
+ "tsx": "^4.21.0",
64
+ "typescript": "^6.0.3",
65
+ "zod": "^4.4.3"
66
+ }
67
+ }
@@ -0,0 +1,128 @@
1
+ #!/usr/bin/env sh
2
+ set -eu
3
+
4
+ PACKAGE="${THREADNOTE_PACKAGE:-threadnote@latest}"
5
+ REGISTRY="${THREADNOTE_NPM_REGISTRY:-https://registry.npmjs.org/}"
6
+ RUNTIME="${THREADNOTE_RUNTIME:-auto}"
7
+
8
+ say() {
9
+ printf '%s\n' "$*"
10
+ }
11
+
12
+ die() {
13
+ say "ERROR: $*" >&2
14
+ exit 1
15
+ }
16
+
17
+ have() {
18
+ command -v "$1" >/dev/null 2>&1
19
+ }
20
+
21
+ select_runtime() {
22
+ case "$RUNTIME" in
23
+ npm | bun | deno)
24
+ have "$RUNTIME" || die "$RUNTIME was requested but was not found on PATH."
25
+ say "$RUNTIME"
26
+ ;;
27
+ auto | "")
28
+ if have npm; then
29
+ say npm
30
+ elif have bun; then
31
+ say bun
32
+ elif have deno; then
33
+ say deno
34
+ else
35
+ die "Install Node/npm, Bun, or Deno, then rerun this installer."
36
+ fi
37
+ ;;
38
+ *)
39
+ die "THREADNOTE_RUNTIME must be npm, bun, deno, or auto."
40
+ ;;
41
+ esac
42
+ }
43
+
44
+ npm_global_bin() {
45
+ prefix="$(npm prefix --global 2>/dev/null || true)"
46
+ if [ -n "$prefix" ]; then
47
+ say "$prefix/bin"
48
+ fi
49
+ }
50
+
51
+ bun_global_bin() {
52
+ bun pm bin -g 2>/dev/null || true
53
+ }
54
+
55
+ runtime_threadnote_bin() {
56
+ runtime="$1"
57
+ dir=""
58
+ case "$runtime" in
59
+ npm) dir="$(npm_global_bin)" ;;
60
+ bun) dir="$(bun_global_bin)" ;;
61
+ deno) dir="${DENO_INSTALL:-$HOME/.deno}/bin" ;;
62
+ esac
63
+ if [ -n "$dir" ]; then
64
+ say "$dir/threadnote"
65
+ fi
66
+ }
67
+
68
+ find_threadnote() {
69
+ runtime="$1"
70
+ preferred="$(runtime_threadnote_bin "$runtime")"
71
+ if [ -n "$preferred" ] && [ -x "$preferred" ]; then
72
+ say "$preferred"
73
+ return 0
74
+ fi
75
+
76
+ for dir in "$(npm_global_bin)" "$(bun_global_bin)" "${DENO_INSTALL:-$HOME/.deno}/bin" "$HOME/.local/bin"; do
77
+ if [ -n "$dir" ] && [ -x "$dir/threadnote" ]; then
78
+ say "$dir/threadnote"
79
+ return 0
80
+ fi
81
+ done
82
+
83
+ if have threadnote; then
84
+ command -v threadnote
85
+ return 0
86
+ fi
87
+
88
+ return 1
89
+ }
90
+
91
+ install_package() {
92
+ runtime="$1"
93
+ case "$runtime" in
94
+ npm)
95
+ npm install --global "$PACKAGE" --registry="$REGISTRY"
96
+ ;;
97
+ bun)
98
+ bun install --global "$PACKAGE" --registry="$REGISTRY"
99
+ ;;
100
+ deno)
101
+ case "$PACKAGE" in
102
+ npm:*) deno_package="$PACKAGE" ;;
103
+ *) deno_package="npm:$PACKAGE" ;;
104
+ esac
105
+ NPM_CONFIG_REGISTRY="$REGISTRY" deno install --global --name threadnote \
106
+ --allow-read --allow-write --allow-run --allow-env --allow-net \
107
+ "$deno_package"
108
+ ;;
109
+ esac
110
+ }
111
+
112
+ runtime="$(select_runtime)"
113
+ say "Installing $PACKAGE with $runtime from $REGISTRY"
114
+ install_package "$runtime"
115
+
116
+ threadnote_bin="$(find_threadnote "$runtime")" || die "Installed $PACKAGE, but could not find the threadnote command."
117
+
118
+ say "Running threadnote install"
119
+ "$threadnote_bin" install "$@"
120
+
121
+ if ! have threadnote; then
122
+ say ""
123
+ say "threadnote is installed, but it is not on PATH in this shell."
124
+ say "Add ~/.local/bin or your package-manager global bin directory to PATH."
125
+ fi
126
+
127
+ say ""
128
+ say "Threadnote is installed. Run: threadnote doctor --dry-run"