botnote 0.2.9 → 0.2.10

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 CHANGED
@@ -304,7 +304,7 @@ skills-only fallback for agents without a plugin system.
304
304
 
305
305
  ```text
306
306
  # In Claude Code
307
- /plugin marketplace add Jianhua-Wang/botnote
307
+ /plugin marketplace add botnote-dev/botnote
308
308
  /plugin install botnote@botnote
309
309
 
310
310
  # Claude Code will prompt for:
@@ -326,7 +326,7 @@ Slash commands:
326
326
  ```
327
327
 
328
328
  Plugin distribution lives at
329
- [Jianhua-Wang/botnote](https://github.com/Jianhua-Wang/botnote). The MCP server
329
+ [botnote-dev/botnote](https://github.com/botnote-dev/botnote). The MCP server
330
330
  inside the plugin uses the URL + token from the install prompt. A global
331
331
  `botnote` CLI install is optional: the plugin runs `npx -y botnote@<plugin-version> mcp`
332
332
  when no matching local CLI is available.
@@ -337,7 +337,7 @@ Add the plugin through `/settings -> plugin` in Codex, or add this marketplace
337
337
  from the public repository without a full source checkout:
338
338
 
339
339
  ```bash
340
- codex plugin marketplace add https://github.com/Jianhua-Wang/botnote.git \
340
+ codex plugin marketplace add https://github.com/botnote-dev/botnote.git \
341
341
  --sparse .agents/plugins \
342
342
  --sparse plugins/botnote
343
343
 
@@ -399,7 +399,7 @@ same MCP server and workflow skills without a second plugin implementation.
399
399
 
400
400
  ```bash
401
401
  # Marketplace root for Cursor plugin clients:
402
- https://github.com/Jianhua-Wang/botnote
402
+ https://github.com/botnote-dev/botnote
403
403
  ```
404
404
 
405
405
  The Cursor plugin manifest is `plugins/botnote/.cursor-plugin/plugin.json` and
@@ -413,7 +413,7 @@ For agents without a plugin system, the
413
413
  skills into 70+ agents:
414
414
 
415
415
  ```bash
416
- npx skills add Jianhua-Wang/botnote # install all 7 skills
416
+ npx skills add botnote-dev/botnote # install all 7 skills
417
417
  npx skills update # refresh to the latest version later
418
418
  npx skills list # see what is installed where
419
419
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "botnote",
3
- "version": "0.2.9",
3
+ "version": "0.2.10",
4
4
  "description": "Notion for bots. Lightweight project + notes + memory store, agent-first.",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@10.33.0",
@@ -8,10 +8,10 @@
8
8
  "homepage": "https://botnote.net",
9
9
  "repository": {
10
10
  "type": "git",
11
- "url": "https://github.com/Jianhua-Wang/botnote"
11
+ "url": "https://github.com/botnote-dev/botnote"
12
12
  },
13
13
  "bugs": {
14
- "url": "https://github.com/Jianhua-Wang/botnote/issues"
14
+ "url": "https://github.com/botnote-dev/botnote/issues"
15
15
  },
16
16
  "keywords": [
17
17
  "agents",
@@ -499,12 +499,12 @@ Error generating stack: `+v.message+`
499
499
  "category": "Productivity"
500
500
  }
501
501
  ]
502
- }`;function kG(){const[n,e]=M.useState("claude"),t=[{id:"claude",label:"Claude Code",icon:f6,subtitle:"Recommended for day-to-day work. Update through /plugin, then reload plugins in-session with /reload-plugins.",cards:[{title:"Install",steps:[{note:"In Claude Code, add the marketplace and install the plugin:",code:`/plugin marketplace add Jianhua-Wang/botnote
503
- /plugin install botnote@botnote`},{note:m.jsxs(m.Fragment,{children:["Claude Code prompts for ",m.jsx("code",{className:"text-ink",children:"botnote_url"})," — leave it empty on the daemon host (defaults to"," ",m.jsx("code",{className:"text-ink",children:"http://127.0.0.1:4280"}),"), enter"," ",m.jsx("code",{className:"text-ink",children:Sr})," elsewhere — and"," ",m.jsx("code",{className:"text-ink",children:"botnote_token"}),", a bearer from Settings → API tokens (skip on loopback)."]})}]},{title:"Update",steps:[{note:m.jsxs(m.Fragment,{children:["Not every build exposes auto-update. Try the marketplace update first: open"," ",m.jsx("code",{className:"text-ink",children:"/plugin"}),", then Marketplaces → botnote → Update, if your build shows it."]}),code:"/plugin"},{note:"If there is no Update action, remove botnote in /plugin, then install it again:",code:"/plugin install botnote@botnote"},{note:"Apply changes in the current session:",code:"/reload-plugins"}]}]},{id:"codex",label:"Codex",icon:mj,subtitle:"Git marketplace flow with sparse checkout — no full botnote source checkout. Restart Codex after install or update.",cards:[{title:"Install",steps:[{note:"Add the Git marketplace. Sparse checkout keeps it light:",code:`codex plugin marketplace add https://github.com/Jianhua-Wang/botnote.git \\
502
+ }`;function kG(){const[n,e]=M.useState("claude"),t=[{id:"claude",label:"Claude Code",icon:f6,subtitle:"Recommended for day-to-day work. Update through /plugin, then reload plugins in-session with /reload-plugins.",cards:[{title:"Install",steps:[{note:"In Claude Code, add the marketplace and install the plugin:",code:`/plugin marketplace add botnote-dev/botnote
503
+ /plugin install botnote@botnote`},{note:m.jsxs(m.Fragment,{children:["Claude Code prompts for ",m.jsx("code",{className:"text-ink",children:"botnote_url"})," — leave it empty on the daemon host (defaults to"," ",m.jsx("code",{className:"text-ink",children:"http://127.0.0.1:4280"}),"), enter"," ",m.jsx("code",{className:"text-ink",children:Sr})," elsewhere — and"," ",m.jsx("code",{className:"text-ink",children:"botnote_token"}),", a bearer from Settings → API tokens (skip on loopback)."]})}]},{title:"Update",steps:[{note:m.jsxs(m.Fragment,{children:["Not every build exposes auto-update. Try the marketplace update first: open"," ",m.jsx("code",{className:"text-ink",children:"/plugin"}),", then Marketplaces → botnote → Update, if your build shows it."]}),code:"/plugin"},{note:"If there is no Update action, remove botnote in /plugin, then install it again:",code:"/plugin install botnote@botnote"},{note:"Apply changes in the current session:",code:"/reload-plugins"}]}]},{id:"codex",label:"Codex",icon:mj,subtitle:"Git marketplace flow with sparse checkout — no full botnote source checkout. Restart Codex after install or update.",cards:[{title:"Install",steps:[{note:"Add the Git marketplace. Sparse checkout keeps it light:",code:`codex plugin marketplace add https://github.com/botnote-dev/botnote.git \\
504
504
  --sparse .agents/plugins \\
505
505
  --sparse plugins/botnote`},{note:"Install the plugin from it:",code:"codex plugin add botnote@botnote-plugins"},{note:m.jsxs(m.Fragment,{children:["Restart Codex — exit this session, then run"," ",m.jsx("code",{className:"text-ink",children:"codex"})," again. In the new session, check"," ",m.jsx("code",{className:"text-ink",children:"/mcp"}),"."]})}]},{title:"Update",steps:[{note:"Refresh the Git marketplace snapshot, then reinstall from it:",code:`codex plugin marketplace upgrade botnote-plugins
506
506
  codex plugin remove botnote@botnote-plugins
507
- codex plugin add botnote@botnote-plugins`},{note:"Open a new Codex session after updating."}]}]},{id:"cursor",label:"Cursor",icon:fj,subtitle:"Uses the same plugin bundle. Keep the CLI installed only if you want terminal commands or offline fallback.",cards:[{title:"Install",steps:[{note:m.jsxs(m.Fragment,{children:["Add the repository marketplace in Cursor's plugin UI — metadata lives at"," ",m.jsx("code",{className:"text-ink",children:".cursor-plugin/marketplace.json"}),":"]}),code:"https://github.com/Jianhua-Wang/botnote"},{note:"Then install:",code:"botnote@botnote-plugins"}]},{title:"Update",steps:[{note:"Refresh the marketplace in Cursor's plugin UI. If an explicit update action is unavailable, remove and install again from the same repository marketplace."},{note:"Keep the shared runtime current too:",code:"npm i -g botnote@latest"}]}]},{id:"skills",label:"Skills CLI",icon:gj,subtitle:"Skills-only alternative: installs the workflow skills into 70+ agents, but NOT the MCP server or hooks. Prefer the plugin install above; use this when your agent has no plugin system.",cards:[{title:"Install",steps:[{note:"Install all botnote skills straight from the GitHub repo:",code:"npx skills add Jianhua-Wang/botnote"},{note:m.jsx(m.Fragment,{children:"One-time MCP wiring — the skills call botnote MCP tools, which the skills CLI does not set up. Use the command for your client:"}),code:`# Claude Code
507
+ codex plugin add botnote@botnote-plugins`},{note:"Open a new Codex session after updating."}]}]},{id:"cursor",label:"Cursor",icon:fj,subtitle:"Uses the same plugin bundle. Keep the CLI installed only if you want terminal commands or offline fallback.",cards:[{title:"Install",steps:[{note:m.jsxs(m.Fragment,{children:["Add the repository marketplace in Cursor's plugin UI — metadata lives at"," ",m.jsx("code",{className:"text-ink",children:".cursor-plugin/marketplace.json"}),":"]}),code:"https://github.com/botnote-dev/botnote"},{note:"Then install:",code:"botnote@botnote-plugins"}]},{title:"Update",steps:[{note:"Refresh the marketplace in Cursor's plugin UI. If an explicit update action is unavailable, remove and install again from the same repository marketplace."},{note:"Keep the shared runtime current too:",code:"npm i -g botnote@latest"}]}]},{id:"skills",label:"Skills CLI",icon:gj,subtitle:"Skills-only alternative: installs the workflow skills into 70+ agents, but NOT the MCP server or hooks. Prefer the plugin install above; use this when your agent has no plugin system.",cards:[{title:"Install",steps:[{note:"Install all botnote skills straight from the GitHub repo:",code:"npx skills add botnote-dev/botnote"},{note:m.jsx(m.Fragment,{children:"One-time MCP wiring — the skills call botnote MCP tools, which the skills CLI does not set up. Use the command for your client:"}),code:`# Claude Code
508
508
  claude mcp add botnote \\
509
509
  -e BOTNOTE_URL=${Sr} \\
510
510
  -e BOTNOTE_TOKEN=<token> \\
@@ -516,7 +516,7 @@ codex mcp add botnote \\
516
516
  --env BOTNOTE_TOKEN=<token> \\
517
517
  -- npx -y botnote mcp`},{note:m.jsxs(m.Fragment,{children:["On the daemon host use ",m.jsx("code",{className:"text-ink",children:"http://127.0.0.1:4280"})," and skip the token. Want the bundled MCP prompts and the session-close feedback hook? Use the Claude Code plugin tab instead."]})}]},{title:"Update",steps:[{note:"Refresh every installed skill from its source repo:",code:"npx skills update"},{note:"Inspect or prune what is installed:",code:`npx skills list
518
518
  npx skills remove <name>`}]}]},{id:"cli",label:"CLI runtime",icon:M6,subtitle:"Optional helper for login, manual CLI commands, and offline fallback. Plugin MCP can run through npx without a global CLI.",cards:[{title:"Install runtime",steps:[{note:"Global install on any machine with node + npm:",code:"npm i -g botnote@latest"},{note:m.jsxs(m.Fragment,{children:["One-time login. Remote clients: save"," ",m.jsx("code",{className:"text-ink",children:Sr})," plus a bearer token from Settings → API tokens. On the daemon host, keep the default"," ",m.jsx("code",{className:"text-ink",children:"http://127.0.0.1:4280"})," and skip the token."]}),code:"botnote login"}]},{title:"Update runtime",steps:[{note:"If you installed the optional helper CLI, keep it current:",code:`npm i -g botnote@latest
519
- botnote --version`}]}]}],r=[{code:"/botnote:today",desc:"today + overdue"},{code:"/botnote:show-todo",desc:"open work across projects"},{code:'/botnote:add-task "..."',desc:"create a task"},{code:"/botnote:start-work DEMO-12",desc:"pick up a task with project context"},{code:'/botnote:remember "..."',desc:"capture a note"},{code:'/botnote:recall "..."',desc:"hybrid search"},{code:"/botnote:done",desc:"mark current focus done"}],i=t.find(s=>s.id===n)??t[0];return m.jsxs(m.Fragment,{children:[m.jsx(Kl,{title:"Plugin",blurb:"Add botnote as the plugin-backed MCP + workflow layer for each agent client. Letheia / Plane MCP setup should stay retired."}),m.jsxs("ol",{className:"grid grid-cols-1 md:grid-cols-3 gap-2",children:[m.jsx(EO,{n:1,title:"Optional CLI",body:"Install the npm binary when you want botnote login or terminal commands. Plugins can run without it via npx."}),m.jsx(EO,{n:2,title:"Install the plugin",body:"Install the marketplace plugin for your client — it bundles MCP wiring, hooks, and skills. The Skills CLI tab is a skills-only fallback for agents without a plugin system."}),m.jsx(EO,{n:3,title:"Reload client",body:"Claude Code reloads plugins in-session. Codex needs a new session after install or update."})]}),m.jsxs("div",{className:"border border-accent/20 bg-accentSoft/50 rounded-md px-4 py-3 text-xs text-accentText leading-relaxed",children:["Use ",m.jsx("code",{className:"text-ink",children:Sr})," with an API token from this settings page on remote devices. On the daemon host, leave the URL empty (defaults to"," ",m.jsx("code",{className:"text-ink",children:"http://127.0.0.1:4280"}),") and skip the token."]}),m.jsxs("section",{className:"space-y-3",children:[m.jsx("div",{className:"flex items-center border-b border-line",children:t.map(s=>m.jsxs("button",{onClick:()=>e(s.id),className:`flex items-center gap-1.5 px-3 py-2 -mb-px text-xs font-medium border-b-2 transition-colors ${n===s.id?"border-accent text-ink":"border-transparent text-muted hover:text-ink"}`,children:[m.jsx(s.icon,{size:12,className:n===s.id?"text-accent":""}),s.label]},s.id))}),m.jsx("p",{className:"text-xs text-muted leading-relaxed",children:i.subtitle}),i.cards.map(s=>m.jsx($c,{title:s.title,steps:s.steps},`${i.id}-${s.title}`))]}),m.jsx(mG,{title:"Slash commands",blurb:"Available after Claude Code reloads plugins or Codex starts a new session with the plugin installed."}),m.jsx(tM,{title:"Commands",items:r}),m.jsxs("details",{className:"border border-line rounded-md bg-surface group open:pb-4",children:[m.jsxs("summary",{className:"px-4 py-3 text-sm text-ink cursor-pointer select-none flex items-center gap-2 list-none [&::-webkit-details-marker]:hidden",children:[m.jsx(ja,{size:13,className:"text-faint transition-transform group-open:rotate-90"}),m.jsx("span",{className:"font-medium",children:"Advanced: repo-local marketplace entry"}),m.jsx("span",{className:"text-xxs text-faint ml-1",children:"only when a repo vendors the plugin files"})]}),m.jsxs("div",{className:"px-4 space-y-2",children:[m.jsxs("p",{className:"text-xs text-muted leading-relaxed",children:["Marketplace entry for ",m.jsx("code",{className:"text-ink",children:".agents/plugins/marketplace.json"}),". Use this only when the repo already vendors"," ",m.jsx("code",{className:"text-ink",children:"./plugins/botnote"}),"."]}),m.jsx(eM,{code:yG})]})]}),m.jsxs("div",{className:"border border-line rounded-md bg-surface px-4 py-3 text-xs text-muted leading-relaxed flex items-start gap-3",children:[m.jsx(d6,{size:13,className:"mt-0.5 shrink-0 text-accent"}),m.jsxs("div",{children:["Plugin distribution lives at"," ",m.jsx("a",{href:"https://github.com/Jianhua-Wang/botnote",target:"_blank",className:"text-accent hover:underline",rel:"noreferrer",children:"Jianhua-Wang/botnote"}),". ","Claude Code updates through ",m.jsx("code",{className:"text-ink",children:"/plugin"}),"; after updating or reinstalling, run ",m.jsx("code",{className:"text-ink",children:"/reload-plugins"}),". Codex has no reload command: refresh Git marketplace snapshots with"," ",m.jsx("code",{className:"text-ink",children:"codex plugin marketplace upgrade"}),", reinstall the plugin, then start a new Codex session."]})]})]})}function EO({n,title:e,body:t}){return m.jsxs("li",{className:"border border-line rounded-md bg-surface px-4 py-3",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("span",{className:"w-5 h-5 rounded-full bg-accentSoft text-accent text-xxs font-semibold flex items-center justify-center shrink-0",children:n}),m.jsx("span",{className:"text-sm font-medium text-ink",children:e})]}),m.jsx("p",{className:"mt-1.5 text-xs text-muted leading-relaxed",children:t})]})}function vG(){const{data:n,isLoading:e}=EF(),t=MF(),r=AF(),[i,s]=M.useState(!0),[l,o]=M.useState("openai"),[u,h]=M.useState("text-embedding-3-small"),[f,p]=M.useState(""),[g,x]=M.useState(""),[k,b]=M.useState(!1),[w,S]=M.useState(null);M.useEffect(()=>{n&&(s(n.enabled),o(n.provider),h(n.model),p(n.baseUrl??""),x(""),b(!1))},[n]);async function Q(T){T.preventDefault(),S(null);const X=g.trim(),Z={enabled:i,provider:l,model:u.trim(),baseUrl:l==="openai_compatible"&&f.trim()||null,...X?{apiKey:X}:k?{apiKey:null}:{}},K=await t.mutateAsync(Z);x(""),b(!1),S(K.effectiveEnabled?"Embedding search is ready.":sC(K.statusReason))}async function $(){S(null);const T=Math.min((n==null?void 0:n.missingCount)??jO,jO),X=await r.mutateAsync(T),Z=n&&n.missingCount>jO;S(Z?`Queued ${X.enqueued} item(s), the maximum per request. Pending queue: ${X.pendingCount}.`:`Queued all ${X.enqueued} missing item(s). Pending queue: ${X.pendingCount}.`)}const R=n&&n.totalCount>0?Math.round(n.embeddedCount/n.totalCount*100):0,I=!!(n!=null&&n.effectiveEnabled&&n.missingCount>0);return m.jsxs(m.Fragment,{children:[m.jsx(Kl,{title:"Embeddings",blurb:"Configure semantic search for botnote. The database vector column is fixed at 384 dimensions, so provider models must return 384-dimensional embeddings."}),m.jsx("div",{className:`border rounded-md px-4 py-3 text-xs leading-relaxed ${n!=null&&n.effectiveEnabled?"border-success/30 bg-success/10 text-ink":"border-warn/30 bg-warn/10 text-ink"}`,children:e?"Loading embedding settings...":n!=null&&n.effectiveEnabled?m.jsxs(m.Fragment,{children:["Semantic search is enabled via ",m.jsx("strong",{children:bG(n.provider)})," using"," ",m.jsx("code",{children:n.model}),". Search merges BM25 + cosine + time decay."]}):m.jsxs(m.Fragment,{children:["Semantic search is not active: ",sC((n==null?void 0:n.statusReason)??"not_loaded"),". Text search still works through BM25."]})}),m.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-2",children:[m.jsx(Df,{label:"Status",value:n!=null&&n.effectiveEnabled?"On":"Off"}),m.jsx(Df,{label:"Embedded",value:`${(n==null?void 0:n.embeddedCount)??0}/${(n==null?void 0:n.totalCount)??0}`}),m.jsx(Df,{label:"Missing",value:`${(n==null?void 0:n.missingCount)??0}`}),m.jsx(Df,{label:"Queue",value:`${(n==null?void 0:n.pendingCount)??0}`})]}),m.jsxs("div",{className:"border border-line rounded-md bg-surface px-4 py-3 space-y-2",children:[m.jsxs("div",{className:"flex items-center justify-between gap-3",children:[m.jsxs("div",{children:[m.jsx("div",{className:"text-xs font-semibold text-ink",children:"Vector coverage"}),m.jsxs("div",{className:"text-xxs text-muted",children:[R,"% of task/note records have embeddings."]})]}),m.jsxs("button",{type:"button",className:"btn",disabled:!I||r.isPending,onClick:$,title:n!=null&&n.effectiveEnabled?"Queue embeddings for all existing records without body_vec":"Enable embeddings before backfilling",children:[m.jsx(N6,{size:11})," ",r.isPending?"Queueing...":"Backfill all missing"]})]}),m.jsx("div",{className:"h-2 rounded bg-sidebar overflow-hidden border border-lineSoft",children:m.jsx("div",{className:"h-full bg-accent",style:{width:`${R}%`}})})]}),m.jsxs("form",{onSubmit:Q,className:"border border-line rounded-md bg-surface px-4 py-4 space-y-4",children:[m.jsxs("label",{className:"flex items-center gap-2 text-sm text-ink",children:[m.jsx("input",{type:"checkbox",checked:i,onChange:T=>s(T.target.checked)}),"Enable semantic search"]}),m.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[m.jsxs("label",{className:"space-y-1",children:[m.jsx("span",{className:"block text-xxs uppercase tracking-wider text-muted",children:"Provider"}),m.jsxs("select",{className:"input",value:l,onChange:T=>o(T.target.value),children:[m.jsx("option",{value:"openai",children:"OpenAI"}),m.jsx("option",{value:"openai_compatible",children:"OpenAI-compatible"})]})]}),m.jsxs("label",{className:"space-y-1",children:[m.jsx("span",{className:"block text-xxs uppercase tracking-wider text-muted",children:"Model"}),m.jsx("input",{className:"input font-mono",list:"embedding-models",value:u,onChange:T=>h(T.target.value),placeholder:"text-embedding-3-small"}),m.jsxs("datalist",{id:"embedding-models",children:[m.jsx("option",{value:"text-embedding-3-small"}),m.jsx("option",{value:"text-embedding-3-large"})]})]})]}),l==="openai_compatible"&&m.jsxs("label",{className:"space-y-1 block",children:[m.jsx("span",{className:"block text-xxs uppercase tracking-wider text-muted",children:"Base URL"}),m.jsx("input",{className:"input font-mono",value:f,onChange:T=>p(T.target.value),placeholder:"https://api.example.com/v1"})]}),m.jsxs("label",{className:"space-y-1 block",children:[m.jsx("span",{className:"block text-xxs uppercase tracking-wider text-muted",children:"API key"}),m.jsx("input",{className:"input font-mono",type:"password",value:g,onChange:T=>{x(T.target.value),T.target.value&&b(!1)},placeholder:n!=null&&n.apiKeyConfigured?`Configured (${n.apiKeySource??"unknown"}${n.apiKeyPreview?` · ${n.apiKeyPreview}`:""})`:"sk-..."}),m.jsxs("div",{className:"flex items-center justify-between gap-3 text-xxs text-muted",children:[m.jsx("span",{children:"Full keys are stored server-side and are not returned to the browser after save."}),(n==null?void 0:n.settingsApiKeyConfigured)&&m.jsxs("label",{className:"inline-flex items-center gap-1.5",children:[m.jsx("input",{type:"checkbox",checked:k,onChange:T=>{b(T.target.checked),T.target.checked&&x("")}}),"Clear stored key"]})]})]}),m.jsxs("div",{className:"border border-lineSoft rounded-md bg-sidebar/30 px-3 py-2 text-xs text-muted leading-relaxed",children:["OpenAI-compatible providers must accept the OpenAI embeddings API and return"," ",m.jsx("code",{className:"text-ink",children:"384"})," dimensions for the selected model. Existing vectors are not automatically regenerated when provider or model changes; use Backfill all missing to queue every record that does not have a vector yet."]}),w&&m.jsx("div",{className:"text-xs text-accentText bg-accentSoft/50 border border-accent/20 rounded-md px-3 py-2",children:w}),t.error&&m.jsx("div",{className:"text-xs text-danger",children:t.error instanceof Error?t.error.message:String(t.error)}),r.error&&m.jsx("div",{className:"text-xs text-danger",children:r.error instanceof Error?r.error.message:String(r.error)}),m.jsx("div",{className:"flex justify-end",children:m.jsxs("button",{type:"submit",className:"btn btn-primary",disabled:t.isPending||u.trim().length===0,children:[m.jsx(Ki,{size:11})," ",t.isPending?"Saving...":"Save embedding settings"]})})]})]})}function Df({label:n,value:e}){return m.jsxs("div",{className:"border border-line rounded-md bg-surface px-3 py-2",children:[m.jsx("div",{className:"text-xxs uppercase tracking-wider text-muted",children:n}),m.jsx("div",{className:"text-lg font-semibold text-ink mt-0.5",children:e})]})}function bG(n){return n==="openai_compatible"?"OpenAI-compatible":"OpenAI"}function sC(n){switch(n){case"ready":return"ready";case"disabled":return"disabled";case"missing_api_key":return"missing API key";case"missing_base_url":return"missing base URL";case"injected":return"using injected test embedder";case"not_loaded":return"configuration not loaded yet"}}function wG(){const n=`{
519
+ botnote --version`}]}]}],r=[{code:"/botnote:today",desc:"today + overdue"},{code:"/botnote:show-todo",desc:"open work across projects"},{code:'/botnote:add-task "..."',desc:"create a task"},{code:"/botnote:start-work DEMO-12",desc:"pick up a task with project context"},{code:'/botnote:remember "..."',desc:"capture a note"},{code:'/botnote:recall "..."',desc:"hybrid search"},{code:"/botnote:done",desc:"mark current focus done"}],i=t.find(s=>s.id===n)??t[0];return m.jsxs(m.Fragment,{children:[m.jsx(Kl,{title:"Plugin",blurb:"Add botnote as the plugin-backed MCP + workflow layer for each agent client. Letheia / Plane MCP setup should stay retired."}),m.jsxs("ol",{className:"grid grid-cols-1 md:grid-cols-3 gap-2",children:[m.jsx(EO,{n:1,title:"Optional CLI",body:"Install the npm binary when you want botnote login or terminal commands. Plugins can run without it via npx."}),m.jsx(EO,{n:2,title:"Install the plugin",body:"Install the marketplace plugin for your client — it bundles MCP wiring, hooks, and skills. The Skills CLI tab is a skills-only fallback for agents without a plugin system."}),m.jsx(EO,{n:3,title:"Reload client",body:"Claude Code reloads plugins in-session. Codex needs a new session after install or update."})]}),m.jsxs("div",{className:"border border-accent/20 bg-accentSoft/50 rounded-md px-4 py-3 text-xs text-accentText leading-relaxed",children:["Use ",m.jsx("code",{className:"text-ink",children:Sr})," with an API token from this settings page on remote devices. On the daemon host, leave the URL empty (defaults to"," ",m.jsx("code",{className:"text-ink",children:"http://127.0.0.1:4280"}),") and skip the token."]}),m.jsxs("section",{className:"space-y-3",children:[m.jsx("div",{className:"flex items-center border-b border-line",children:t.map(s=>m.jsxs("button",{onClick:()=>e(s.id),className:`flex items-center gap-1.5 px-3 py-2 -mb-px text-xs font-medium border-b-2 transition-colors ${n===s.id?"border-accent text-ink":"border-transparent text-muted hover:text-ink"}`,children:[m.jsx(s.icon,{size:12,className:n===s.id?"text-accent":""}),s.label]},s.id))}),m.jsx("p",{className:"text-xs text-muted leading-relaxed",children:i.subtitle}),i.cards.map(s=>m.jsx($c,{title:s.title,steps:s.steps},`${i.id}-${s.title}`))]}),m.jsx(mG,{title:"Slash commands",blurb:"Available after Claude Code reloads plugins or Codex starts a new session with the plugin installed."}),m.jsx(tM,{title:"Commands",items:r}),m.jsxs("details",{className:"border border-line rounded-md bg-surface group open:pb-4",children:[m.jsxs("summary",{className:"px-4 py-3 text-sm text-ink cursor-pointer select-none flex items-center gap-2 list-none [&::-webkit-details-marker]:hidden",children:[m.jsx(ja,{size:13,className:"text-faint transition-transform group-open:rotate-90"}),m.jsx("span",{className:"font-medium",children:"Advanced: repo-local marketplace entry"}),m.jsx("span",{className:"text-xxs text-faint ml-1",children:"only when a repo vendors the plugin files"})]}),m.jsxs("div",{className:"px-4 space-y-2",children:[m.jsxs("p",{className:"text-xs text-muted leading-relaxed",children:["Marketplace entry for ",m.jsx("code",{className:"text-ink",children:".agents/plugins/marketplace.json"}),". Use this only when the repo already vendors"," ",m.jsx("code",{className:"text-ink",children:"./plugins/botnote"}),"."]}),m.jsx(eM,{code:yG})]})]}),m.jsxs("div",{className:"border border-line rounded-md bg-surface px-4 py-3 text-xs text-muted leading-relaxed flex items-start gap-3",children:[m.jsx(d6,{size:13,className:"mt-0.5 shrink-0 text-accent"}),m.jsxs("div",{children:["Plugin distribution lives at"," ",m.jsx("a",{href:"https://github.com/botnote-dev/botnote",target:"_blank",className:"text-accent hover:underline",rel:"noreferrer",children:"botnote-dev/botnote"}),". ","Claude Code updates through ",m.jsx("code",{className:"text-ink",children:"/plugin"}),"; after updating or reinstalling, run ",m.jsx("code",{className:"text-ink",children:"/reload-plugins"}),". Codex has no reload command: refresh Git marketplace snapshots with"," ",m.jsx("code",{className:"text-ink",children:"codex plugin marketplace upgrade"}),", reinstall the plugin, then start a new Codex session."]})]})]})}function EO({n,title:e,body:t}){return m.jsxs("li",{className:"border border-line rounded-md bg-surface px-4 py-3",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("span",{className:"w-5 h-5 rounded-full bg-accentSoft text-accent text-xxs font-semibold flex items-center justify-center shrink-0",children:n}),m.jsx("span",{className:"text-sm font-medium text-ink",children:e})]}),m.jsx("p",{className:"mt-1.5 text-xs text-muted leading-relaxed",children:t})]})}function vG(){const{data:n,isLoading:e}=EF(),t=MF(),r=AF(),[i,s]=M.useState(!0),[l,o]=M.useState("openai"),[u,h]=M.useState("text-embedding-3-small"),[f,p]=M.useState(""),[g,x]=M.useState(""),[k,b]=M.useState(!1),[w,S]=M.useState(null);M.useEffect(()=>{n&&(s(n.enabled),o(n.provider),h(n.model),p(n.baseUrl??""),x(""),b(!1))},[n]);async function Q(T){T.preventDefault(),S(null);const X=g.trim(),Z={enabled:i,provider:l,model:u.trim(),baseUrl:l==="openai_compatible"&&f.trim()||null,...X?{apiKey:X}:k?{apiKey:null}:{}},K=await t.mutateAsync(Z);x(""),b(!1),S(K.effectiveEnabled?"Embedding search is ready.":sC(K.statusReason))}async function $(){S(null);const T=Math.min((n==null?void 0:n.missingCount)??jO,jO),X=await r.mutateAsync(T),Z=n&&n.missingCount>jO;S(Z?`Queued ${X.enqueued} item(s), the maximum per request. Pending queue: ${X.pendingCount}.`:`Queued all ${X.enqueued} missing item(s). Pending queue: ${X.pendingCount}.`)}const R=n&&n.totalCount>0?Math.round(n.embeddedCount/n.totalCount*100):0,I=!!(n!=null&&n.effectiveEnabled&&n.missingCount>0);return m.jsxs(m.Fragment,{children:[m.jsx(Kl,{title:"Embeddings",blurb:"Configure semantic search for botnote. The database vector column is fixed at 384 dimensions, so provider models must return 384-dimensional embeddings."}),m.jsx("div",{className:`border rounded-md px-4 py-3 text-xs leading-relaxed ${n!=null&&n.effectiveEnabled?"border-success/30 bg-success/10 text-ink":"border-warn/30 bg-warn/10 text-ink"}`,children:e?"Loading embedding settings...":n!=null&&n.effectiveEnabled?m.jsxs(m.Fragment,{children:["Semantic search is enabled via ",m.jsx("strong",{children:bG(n.provider)})," using"," ",m.jsx("code",{children:n.model}),". Search merges BM25 + cosine + time decay."]}):m.jsxs(m.Fragment,{children:["Semantic search is not active: ",sC((n==null?void 0:n.statusReason)??"not_loaded"),". Text search still works through BM25."]})}),m.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-2",children:[m.jsx(Df,{label:"Status",value:n!=null&&n.effectiveEnabled?"On":"Off"}),m.jsx(Df,{label:"Embedded",value:`${(n==null?void 0:n.embeddedCount)??0}/${(n==null?void 0:n.totalCount)??0}`}),m.jsx(Df,{label:"Missing",value:`${(n==null?void 0:n.missingCount)??0}`}),m.jsx(Df,{label:"Queue",value:`${(n==null?void 0:n.pendingCount)??0}`})]}),m.jsxs("div",{className:"border border-line rounded-md bg-surface px-4 py-3 space-y-2",children:[m.jsxs("div",{className:"flex items-center justify-between gap-3",children:[m.jsxs("div",{children:[m.jsx("div",{className:"text-xs font-semibold text-ink",children:"Vector coverage"}),m.jsxs("div",{className:"text-xxs text-muted",children:[R,"% of task/note records have embeddings."]})]}),m.jsxs("button",{type:"button",className:"btn",disabled:!I||r.isPending,onClick:$,title:n!=null&&n.effectiveEnabled?"Queue embeddings for all existing records without body_vec":"Enable embeddings before backfilling",children:[m.jsx(N6,{size:11})," ",r.isPending?"Queueing...":"Backfill all missing"]})]}),m.jsx("div",{className:"h-2 rounded bg-sidebar overflow-hidden border border-lineSoft",children:m.jsx("div",{className:"h-full bg-accent",style:{width:`${R}%`}})})]}),m.jsxs("form",{onSubmit:Q,className:"border border-line rounded-md bg-surface px-4 py-4 space-y-4",children:[m.jsxs("label",{className:"flex items-center gap-2 text-sm text-ink",children:[m.jsx("input",{type:"checkbox",checked:i,onChange:T=>s(T.target.checked)}),"Enable semantic search"]}),m.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[m.jsxs("label",{className:"space-y-1",children:[m.jsx("span",{className:"block text-xxs uppercase tracking-wider text-muted",children:"Provider"}),m.jsxs("select",{className:"input",value:l,onChange:T=>o(T.target.value),children:[m.jsx("option",{value:"openai",children:"OpenAI"}),m.jsx("option",{value:"openai_compatible",children:"OpenAI-compatible"})]})]}),m.jsxs("label",{className:"space-y-1",children:[m.jsx("span",{className:"block text-xxs uppercase tracking-wider text-muted",children:"Model"}),m.jsx("input",{className:"input font-mono",list:"embedding-models",value:u,onChange:T=>h(T.target.value),placeholder:"text-embedding-3-small"}),m.jsxs("datalist",{id:"embedding-models",children:[m.jsx("option",{value:"text-embedding-3-small"}),m.jsx("option",{value:"text-embedding-3-large"})]})]})]}),l==="openai_compatible"&&m.jsxs("label",{className:"space-y-1 block",children:[m.jsx("span",{className:"block text-xxs uppercase tracking-wider text-muted",children:"Base URL"}),m.jsx("input",{className:"input font-mono",value:f,onChange:T=>p(T.target.value),placeholder:"https://api.example.com/v1"})]}),m.jsxs("label",{className:"space-y-1 block",children:[m.jsx("span",{className:"block text-xxs uppercase tracking-wider text-muted",children:"API key"}),m.jsx("input",{className:"input font-mono",type:"password",value:g,onChange:T=>{x(T.target.value),T.target.value&&b(!1)},placeholder:n!=null&&n.apiKeyConfigured?`Configured (${n.apiKeySource??"unknown"}${n.apiKeyPreview?` · ${n.apiKeyPreview}`:""})`:"sk-..."}),m.jsxs("div",{className:"flex items-center justify-between gap-3 text-xxs text-muted",children:[m.jsx("span",{children:"Full keys are stored server-side and are not returned to the browser after save."}),(n==null?void 0:n.settingsApiKeyConfigured)&&m.jsxs("label",{className:"inline-flex items-center gap-1.5",children:[m.jsx("input",{type:"checkbox",checked:k,onChange:T=>{b(T.target.checked),T.target.checked&&x("")}}),"Clear stored key"]})]})]}),m.jsxs("div",{className:"border border-lineSoft rounded-md bg-sidebar/30 px-3 py-2 text-xs text-muted leading-relaxed",children:["OpenAI-compatible providers must accept the OpenAI embeddings API and return"," ",m.jsx("code",{className:"text-ink",children:"384"})," dimensions for the selected model. Existing vectors are not automatically regenerated when provider or model changes; use Backfill all missing to queue every record that does not have a vector yet."]}),w&&m.jsx("div",{className:"text-xs text-accentText bg-accentSoft/50 border border-accent/20 rounded-md px-3 py-2",children:w}),t.error&&m.jsx("div",{className:"text-xs text-danger",children:t.error instanceof Error?t.error.message:String(t.error)}),r.error&&m.jsx("div",{className:"text-xs text-danger",children:r.error instanceof Error?r.error.message:String(r.error)}),m.jsx("div",{className:"flex justify-end",children:m.jsxs("button",{type:"submit",className:"btn btn-primary",disabled:t.isPending||u.trim().length===0,children:[m.jsx(Ki,{size:11})," ",t.isPending?"Saving...":"Save embedding settings"]})})]})]})}function Df({label:n,value:e}){return m.jsxs("div",{className:"border border-line rounded-md bg-surface px-3 py-2",children:[m.jsx("div",{className:"text-xxs uppercase tracking-wider text-muted",children:n}),m.jsx("div",{className:"text-lg font-semibold text-ink mt-0.5",children:e})]})}function bG(n){return n==="openai_compatible"?"OpenAI-compatible":"OpenAI"}function sC(n){switch(n){case"ready":return"ready";case"disabled":return"disabled";case"missing_api_key":return"missing API key";case"missing_base_url":return"missing base URL";case"injected":return"using injected test embedder";case"not_loaded":return"configuration not loaded yet"}}function wG(){const n=`{
520
520
  "mcpServers": {
521
521
  "botnote": {
522
522
  "command": "botnote",
@@ -8,7 +8,7 @@
8
8
  <link rel="preconnect" href="https://fonts.googleapis.com" />
9
9
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
10
10
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />
11
- <script type="module" crossorigin src="/assets/index-DbRXqvqa.js"></script>
11
+ <script type="module" crossorigin src="/assets/index-B2KaS2LE.js"></script>
12
12
  <link rel="stylesheet" crossorigin href="/assets/index-BVnFx-5k.css">
13
13
  </head>
14
14
  <body>