bc-observatory 0.1.1 → 0.3.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.
Files changed (3) hide show
  1. package/README.md +23 -1
  2. package/dist/server.js +1240 -189
  3. package/package.json +6 -3
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # bc-observatory (MCP server)
2
2
 
3
3
  [BC Observatory](https://waldo1001.github.io/waldo.BCObservatory/) for agents: an agent-first, cross-referenced knowledge base of
4
- Microsoft Dynamics 365 Business Central (Learn topic hubs, AL objects extracted from the code for BC28-30, country localizations,
4
+ Microsoft Dynamics 365 Business Central (Learn topic hubs, AL objects extracted from the code for BC28-30 with history back to BC23, country localizations,
5
5
  Microsoft 365 roadmap features, videos and community posts), every claim with a trust tier and evidence.
6
6
 
7
7
  ```bash
@@ -16,4 +16,26 @@ The server downloads the site's search index (cached by hash in `~/.cache/bc-obs
16
16
  markdown. `BC_OBSERVATORY_LOCAL=<checkout of waldo1001/waldo.BCObservatory>` reads everything from disk instead;
17
17
  `BC_OBSERVATORY_SITE` points at another deployment.
18
18
 
19
+ `search` ranks with the site's own scorer (`packages/search`, bundled into `dist/server.js`), so an agent and a reader get the
20
+ same order: references (`t36`, `cu 80`, `table 11300 BE`) and bare ids (`36`) go straight to the object; per query word
21
+ the title and an AL object's caption weigh 3, tags 2, summary 1, through the exact word, a prefix, the plural, a synonym
22
+ (`client` is Customer, `G/L` is general ledger) or one typo; a name equal to the query adds 10; base app before
23
+ first-party app before country layer, then what references, calls and documents an object; topic hubs by their size and
24
+ review state, so "subscription" returns the Subscription billing hub before the codeunits that share the word. Fields,
25
+ events, global procedures and enum values are searchable too (`OnAfterPostSalesDoc`, `field: Posting Date`); their path
26
+ ends in an anchor (`objects/codeunit/80#event-OnAfterPostSalesDoc`). Filters: `type`, `tier`, `system`, `country`,
27
+ `app`, `object_type`, `kind`. Each result says where it sits (`in:` the Learn TOC path, the app, the channel) and, for a
28
+ hub, its size and review state.
29
+
30
+ The search is hybrid by default: the exact band (references and exact names) stays on top and the rest is fused with a
31
+ meaning ranking, so "who is allowed to see what" finds the permission sets; each hit says `[keyword]`, `[meaning]` or
32
+ `[both]`. Meaning comes from static embeddings ([model2vec](https://github.com/MinishLab/model2vec) `minishlab/potion-base-8M`, MIT) computed locally in
33
+ plain JavaScript; the 30 MB model is downloaded once on the first search, pinned by revision and checked by SHA-256. Pass
34
+ `mode: "keyword"` for the scorer alone. `BC_OBSERVATORY_EMBEDDINGS=0` turns it off, and
35
+ `BC_OBSERVATORY_MODEL_DIR=<dir with config.json, tokenizer.json, model.safetensors>` uses a model on disk (offline). Without a
36
+ model, search is keyword-only and says so.
37
+
38
+ `get_object` takes an id, a reference (`t36`, `36-be`), a name or a caption, and a `country`; `whats_new` lists nothing
39
+ dated after today unless `include_future: true`.
40
+
19
41
  MIT. Content: see the repository's CONTENT-NOTICE.md (Microsoft content attributed; community content derived only).