botnote 0.1.10 → 0.1.11
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
|
@@ -160,7 +160,7 @@ Slash commands:
|
|
|
160
160
|
/botnote:today # today + overdue
|
|
161
161
|
/botnote:remember "..." # capture a note via MCP
|
|
162
162
|
/botnote:recall "..." # hybrid search
|
|
163
|
-
/botnote:start-work DEMO
|
|
163
|
+
/botnote:start-work DEMO-12 # pick up a task with project context
|
|
164
164
|
/botnote:done # mark current focus done
|
|
165
165
|
/botnote:add-task "..." # capture a task without starting it
|
|
166
166
|
/botnote:show-todo # workspace task/context summary
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "botnote",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "Notion for bots. Lightweight project + notes + memory store, agent-first.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "pnpm@10.33.0",
|
|
@@ -42,7 +42,13 @@
|
|
|
42
42
|
"clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true}); require('node:fs').rmSync('web/dist',{recursive:true,force:true})\"",
|
|
43
43
|
"build": "pnpm clean && pnpm --dir web build && pnpm build:server",
|
|
44
44
|
"build:server": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.json && mkdir -p dist/db/migrations && cp -R src/db/migrations/. dist/db/migrations/ && chmod +x dist/bin.js",
|
|
45
|
-
"
|
|
45
|
+
"check:plugin-versions": "node scripts/check-plugin-versions.mjs",
|
|
46
|
+
"sync:plugin-versions": "node scripts/sync-plugin-versions.mjs",
|
|
47
|
+
"prepack": "pnpm check:plugin-versions && pnpm build",
|
|
48
|
+
"version": "pnpm sync:plugin-versions && pnpm check:plugin-versions && git add package.json .claude-plugin/marketplace.json .cursor-plugin/marketplace.json plugins/botnote/.claude-plugin/plugin.json plugins/botnote/.codex-plugin/plugin.json plugins/botnote/.cursor-plugin/plugin.json",
|
|
49
|
+
"bump:patch": "pnpm version patch",
|
|
50
|
+
"bump:minor": "pnpm version minor",
|
|
51
|
+
"bump:major": "pnpm version major",
|
|
46
52
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
47
53
|
"test": "vitest run --no-file-parallelism",
|
|
48
54
|
"db:generate": "drizzle-kit generate",
|
|
@@ -539,7 +539,7 @@ npm i -g botnote@latest`})]}),y.jsx(ko,{icon:Ox,title:"Advanced",subtitle:"Only
|
|
|
539
539
|
}`}),y.jsx(ko,{icon:BT,title:"Slash commands",subtitle:"Available after the plugin is installed and the client reloads plugins."}),y.jsx(on,{title:"Commands",code:`/botnote:today # today + overdue
|
|
540
540
|
/botnote:show-todo # open work across projects
|
|
541
541
|
/botnote:add-task "..." # create a task
|
|
542
|
-
/botnote:start-work DEMO
|
|
542
|
+
/botnote:start-work DEMO-12 # pick up a task with project context
|
|
543
543
|
/botnote:remember "..." # capture a note
|
|
544
544
|
/botnote:recall "..." # hybrid search
|
|
545
545
|
/botnote:done # mark current focus done`}),y.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:[y.jsx(zT,{size:13,className:"mt-0.5 shrink-0 text-accent"}),y.jsxs("div",{children:["Plugin distribution lives at"," ",y.jsx("a",{href:"https://github.com/jianhua-wang/botnote",target:"_blank",className:"text-accent hover:underline",rel:"noreferrer",children:"jianhua-wang/botnote"}),". ","Claude Code can auto-update third-party marketplaces when enabled; after an update, run"," ",y.jsx("code",{className:"text-ink",children:"/reload-plugins"}),". Codex currently refreshes Git marketplace snapshots with"," ",y.jsx("code",{className:"text-ink",children:"codex plugin marketplace upgrade"}),"."]})]})]})}function yO({icon:n,title:e,body:t}){return y.jsxs("div",{className:"border border-line rounded-md bg-surface px-4 py-3 min-h-[104px]",children:[y.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold text-ink",children:[y.jsx("span",{className:"w-6 h-6 rounded-md bg-accentSoft text-accent flex items-center justify-center shrink-0",children:y.jsx(n,{size:13})}),e]}),y.jsx("p",{className:"mt-2 text-xs text-muted leading-relaxed",children:t})]})}function ko({icon:n,title:e,subtitle:t}){return y.jsxs("div",{className:"pt-2 border-t border-lineSoft flex items-start gap-2",children:[y.jsx("span",{className:"mt-0.5 w-6 h-6 rounded-md bg-sidebar text-muted border border-line flex items-center justify-center shrink-0",children:y.jsx(n,{size:13})}),y.jsxs("div",{children:[y.jsx("h2",{className:"text-sm font-semibold text-ink",children:e}),y.jsx("p",{className:"text-xs text-muted leading-relaxed mt-0.5",children:t})]})]})}function rU(){const{data:n,isLoading:e}=Lq(),t=_q(),r=Dq(),[i,s]=L.useState(!0),[l,o]=L.useState("openai"),[u,h]=L.useState("text-embedding-3-small"),[f,p]=L.useState(""),[m,O]=L.useState(""),[k,b]=L.useState(!1),[w,S]=L.useState(null);L.useEffect(()=>{n&&(s(n.enabled),o(n.provider),h(n.model),p(n.baseUrl??""),O(""),b(!1))},[n]);async function C(j){j.preventDefault(),S(null);const Z=m.trim(),q={enabled:i,provider:l,model:u.trim(),baseUrl:l==="openai_compatible"&&f.trim()||null,...Z?{apiKey:Z}:k?{apiKey:null}:{}},J=await t.mutateAsync(q);O(""),b(!1),S(J.effectiveEnabled?"Embedding search is ready.":DP(J.statusReason))}async function Q(){S(null);const j=Math.min((n==null?void 0:n.missingCount)??OO,OO),Z=await r.mutateAsync(j),q=n&&n.missingCount>OO;S(q?`Queued ${Z.enqueued} item(s), the maximum per request. Pending queue: ${Z.pendingCount}.`:`Queued all ${Z.enqueued} missing item(s). Pending queue: ${Z.pendingCount}.`)}const R=n&&n.totalCount>0?Math.round(n.embeddedCount/n.totalCount*100):0,I=!!(n!=null&&n.effectiveEnabled&&n.missingCount>0);return y.jsxs(y.Fragment,{children:[y.jsx(Bl,{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."}),y.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?y.jsxs(y.Fragment,{children:["Semantic search is enabled via ",y.jsx("strong",{children:iU(n.provider)})," using"," ",y.jsx("code",{children:n.model}),". Search merges BM25 + cosine + time decay."]}):y.jsxs(y.Fragment,{children:["Semantic search is not active: ",DP((n==null?void 0:n.statusReason)??"not_loaded"),". Text search still works through BM25."]})}),y.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-2",children:[y.jsx(Tf,{label:"Status",value:n!=null&&n.effectiveEnabled?"On":"Off"}),y.jsx(Tf,{label:"Embedded",value:`${(n==null?void 0:n.embeddedCount)??0}/${(n==null?void 0:n.totalCount)??0}`}),y.jsx(Tf,{label:"Missing",value:`${(n==null?void 0:n.missingCount)??0}`}),y.jsx(Tf,{label:"Queue",value:`${(n==null?void 0:n.pendingCount)??0}`})]}),y.jsxs("div",{className:"border border-line rounded-md bg-surface px-4 py-3 space-y-2",children:[y.jsxs("div",{className:"flex items-center justify-between gap-3",children:[y.jsxs("div",{children:[y.jsx("div",{className:"text-xs font-semibold text-ink",children:"Vector coverage"}),y.jsxs("div",{className:"text-xxs text-muted",children:[R,"% of task/note records have embeddings."]})]}),y.jsxs("button",{type:"button",className:"btn",disabled:!I||r.isPending,onClick:Q,title:n!=null&&n.effectiveEnabled?"Queue embeddings for all existing records without body_vec":"Enable embeddings before backfilling",children:[y.jsx(VT,{size:11})," ",r.isPending?"Queueing...":"Backfill all missing"]})]}),y.jsx("div",{className:"h-2 rounded bg-sidebar overflow-hidden border border-lineSoft",children:y.jsx("div",{className:"h-full bg-accent",style:{width:`${R}%`}})})]}),y.jsxs("form",{onSubmit:C,className:"border border-line rounded-md bg-surface px-4 py-4 space-y-4",children:[y.jsxs("label",{className:"flex items-center gap-2 text-sm text-ink",children:[y.jsx("input",{type:"checkbox",checked:i,onChange:j=>s(j.target.checked)}),"Enable semantic search"]}),y.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[y.jsxs("label",{className:"space-y-1",children:[y.jsx("span",{className:"block text-xxs uppercase tracking-wider text-muted",children:"Provider"}),y.jsxs("select",{className:"input",value:l,onChange:j=>o(j.target.value),children:[y.jsx("option",{value:"openai",children:"OpenAI"}),y.jsx("option",{value:"openai_compatible",children:"OpenAI-compatible"})]})]}),y.jsxs("label",{className:"space-y-1",children:[y.jsx("span",{className:"block text-xxs uppercase tracking-wider text-muted",children:"Model"}),y.jsx("input",{className:"input font-mono",list:"embedding-models",value:u,onChange:j=>h(j.target.value),placeholder:"text-embedding-3-small"}),y.jsxs("datalist",{id:"embedding-models",children:[y.jsx("option",{value:"text-embedding-3-small"}),y.jsx("option",{value:"text-embedding-3-large"})]})]})]}),l==="openai_compatible"&&y.jsxs("label",{className:"space-y-1 block",children:[y.jsx("span",{className:"block text-xxs uppercase tracking-wider text-muted",children:"Base URL"}),y.jsx("input",{className:"input font-mono",value:f,onChange:j=>p(j.target.value),placeholder:"https://api.example.com/v1"})]}),y.jsxs("label",{className:"space-y-1 block",children:[y.jsx("span",{className:"block text-xxs uppercase tracking-wider text-muted",children:"API key"}),y.jsx("input",{className:"input font-mono",type:"password",value:m,onChange:j=>{O(j.target.value),j.target.value&&b(!1)},placeholder:n!=null&&n.apiKeyConfigured?`Configured (${n.apiKeySource??"unknown"}${n.apiKeyPreview?` · ${n.apiKeyPreview}`:""})`:"sk-..."}),y.jsxs("div",{className:"flex items-center justify-between gap-3 text-xxs text-muted",children:[y.jsx("span",{children:"Full keys are stored server-side and are not returned to the browser after save."}),(n==null?void 0:n.settingsApiKeyConfigured)&&y.jsxs("label",{className:"inline-flex items-center gap-1.5",children:[y.jsx("input",{type:"checkbox",checked:k,onChange:j=>{b(j.target.checked),j.target.checked&&O("")}}),"Clear stored key"]})]})]}),y.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"," ",y.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&&y.jsx("div",{className:"text-xs text-accentText bg-accentSoft/50 border border-accent/20 rounded-md px-3 py-2",children:w}),t.error&&y.jsx("div",{className:"text-xs text-danger",children:t.error instanceof Error?t.error.message:String(t.error)}),r.error&&y.jsx("div",{className:"text-xs text-danger",children:r.error instanceof Error?r.error.message:String(r.error)}),y.jsx("div",{className:"flex justify-end",children:y.jsxs("button",{type:"submit",className:"btn btn-primary",disabled:t.isPending||u.trim().length===0,children:[y.jsx(np,{size:11})," ",t.isPending?"Saving...":"Save embedding settings"]})})]})]})}function Tf({label:n,value:e}){return y.jsxs("div",{className:"border border-line rounded-md bg-surface px-3 py-2",children:[y.jsx("div",{className:"text-xxs uppercase tracking-wider text-muted",children:n}),y.jsx("div",{className:"text-lg font-semibold text-ink mt-0.5",children:e})]})}function iU(n){return n==="openai_compatible"?"OpenAI-compatible":"OpenAI"}function DP(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 sU(){const n=`{
|
package/web/dist/index.html
CHANGED
|
@@ -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-
|
|
11
|
+
<script type="module" crossorigin src="/assets/index-OW9iHpVr.js"></script>
|
|
12
12
|
<link rel="stylesheet" crossorigin href="/assets/index-C9pVWWZo.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|