@equationalapplications/core-llm-wiki 7.2.0 → 7.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.
- package/README.md +23 -0
- package/dist/{chunk-TTECJ3S3.mjs → chunk-IAYO63DQ.mjs} +346 -41
- package/dist/chunk-IAYO63DQ.mjs.map +1 -0
- package/dist/index.d.mts +3 -5
- package/dist/index.d.ts +3 -5
- package/dist/index.js +388 -47
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +47 -11
- package/dist/index.mjs.map +1 -1
- package/dist/{testing-DYeMd9d1.d.mts → testing-ht1qOvcD.d.mts} +98 -6
- package/dist/{testing-DYeMd9d1.d.ts → testing-ht1qOvcD.d.ts} +98 -6
- package/dist/testing.d.mts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +336 -38
- package/dist/testing.js.map +1 -1
- package/dist/testing.mjs +1 -1
- package/package.json +5 -5
- package/dist/chunk-TTECJ3S3.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -504,6 +504,29 @@ Notes:
|
|
|
504
504
|
- A throwing callback is caught (logged via `console.error`) and does not block other subscribers or the underlying job.
|
|
505
505
|
- Subscriptions are scoped to a single `entityId`. There is no wildcard or "all entities" form.
|
|
506
506
|
|
|
507
|
+
## Diagnostics
|
|
508
|
+
|
|
509
|
+
Pass `onDiagnostic` to receive typed, content-free reports of events core used to drop silently or only log: failed chunks, rejected facts and tasks, dedupe drops, dropped edges, embedding and host-hook failures, heal skips, and background-job failures.
|
|
510
|
+
|
|
511
|
+
```ts
|
|
512
|
+
const wiki = createWiki(db, {
|
|
513
|
+
llmProvider,
|
|
514
|
+
onDiagnostic: (d) => {
|
|
515
|
+
// d.code, d.severity ('info' | 'warn' | 'error'), d.operation, d.trigger ('call' | 'auto'),
|
|
516
|
+
// d.entityId, d.at, d.message, d.detail?: { factId, sourceRef, chunkIndex, itemIndex,
|
|
517
|
+
// edgeType, sourceNodeType, targetNodeType, reason, count, chunkIndexes }
|
|
518
|
+
telemetry.record(d);
|
|
519
|
+
},
|
|
520
|
+
});
|
|
521
|
+
```
|
|
522
|
+
|
|
523
|
+
- **Content-free.** Diagnostics carry IDs, indexes, counts, ontology slugs and reason slugs only. They never carry titles, bodies, LLM output, provider error messages, or hashes of content.
|
|
524
|
+
- **Isolated.** The hook is called synchronously. A throwing or rejecting hook never affects the operation, and its failure is logged with `console.warn`.
|
|
525
|
+
- **After commit.** Transactional diagnostics are delivered after the operation's transaction commits. An operation that throws delivers none; the exception is the signal. `upsertGraph` runs in your transaction, so its diagnostics are delivered when it resolves. Disregard them if you roll back.
|
|
526
|
+
- **`trigger`.** `'auto'` marks work started by `autoLibrarianThreshold` / `autoHealThreshold`. A failed background job is reported as `background_job_failed` with `operation` set to the job.
|
|
527
|
+
- **Forward-compatible.** New codes may be added in minor releases; ignore codes you don't recognize.
|
|
528
|
+
- **Console output is unchanged** when a hook is set and succeeds: every existing core line is identical. A throwing or rejecting hook adds only its own `console.warn`, and a non-function `onDiagnostic` warns once.
|
|
529
|
+
|
|
507
530
|
## Per-Entity Seeded Ontology
|
|
508
531
|
|
|
509
532
|
Control how librarian and ingest passes classify facts and extract graph relationships. The system defaults to **`off`** so existing deployments behave unchanged.
|