Scan your whole stack
From OX Research Newsroom
Are you using @xcitedbs/client?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.7.60
@xcitedbs/client was last scanned on 27 Nov 2026 at version 0.7.60. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.7.60 LATEST | 27 Nov 2026 | No rules fired |
| 0.7.59 | 27 Nov 2026 | No rules fired |
| 0.7.58 | 26 Nov 2026 | No rules fired |
| 0.7.52 | 11 Nov 2026 | Not shown |
| 0.7.49 | 6 Nov 2026 | Not shown |
Findings for v0.7.60. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.7.60; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
TypeScript/JavaScript client for the XCiteDB BaaS HTTP API and WebSocket notifications.
From npm:
npm install @xcitedbs/client
From this repo:
cd sdks/javascript && npm install && npm run build
Link or npm pack / publish as needed.
sk_live, sk_test, pk_*, app-user JWT, platform
admin) is accepted by each SDK method. Answers most "why am I getting
403?" questions before you read code.js
(buildFunction, JIT-versioned) vs component (deployFunction,
client-side build) deploy paths and their version-tracking contract.xcite.* host API surface, including xcite.api loopback scope and
binary-body channels.new XCiteDBClient({ baseUrl, apiKey, debug: true }) traces every
request and response to console.debug with auth headers and
password/secret/token fields redacted. Pass a function for
custom routing (Sentry, OTLP, etc.). Also enabled by
XCITEDB_DEBUG=1 env var. Toggle at runtime with client.setDebug(true).XCiteDBError (or one of the typed
subclasses); use isXCiteDBError(e) from @xcitedbs/client in
catch blocks to type-narrow without an instanceof quirk across
duplicate bundles.xcitedb bundle plan|ensure|apply|status (the CLI installed by this
package) prints the server's view of your ./xcitedb control-plane
bundle without writing — see xcitedb -h.import { XCiteDBClient } from '@xcitedbs/client';
const client = new XCiteDBClient({
baseUrl: 'http://localhost:8080',
apiKey: process.env.XCITEDB_API_KEY,
context: { branch: '', date: '' },
});
await client.health();
const docs = await client.queryByIdentifier('/test1', 'FirstMatch');
await client.put('app.settings', { theme: 'dark' });
smartDiff)client.smartDiff(from, to, target, metadata?, options?) compares two XML provision trees and writes the result as a single annotated diff document to target. Useful when you need both sides of a structural change rendered together (rather than a list of changed identifiers as compare returns).
Refs. Each of from / to / target is a SmartDiffRef: an identifier plus either a checkpoint_id/commit_id, or a branch + optional date/date_key. branch: "" (or "main") is the root timeline. Omitting date/date_key reads the branch's live tip.
How matching works. A "provision candidate" is an element carrying identifier, db:identifier, or db:xcitepath. Three passes:
db:doc_id. Candidates whose nearest UUID-matched ancestor differs across A and B are tagged MovedParent.tag + first 30 chars of plain text. LCS hits → Matched. UUID-matched pairs that broke order → MovedOrder. Remaining → Inserted (B-only) or Deleted (A-only).diff-match-patch runs over the concatenated plain text. Inline markup from B is preserved; <ins> wrappers are split at every tag boundary so they never cross inline markup.Output schema. The result document's root copies B's root tag and attrs, plus diff:document="true". Inside:
| Outcome | Emission |
|---|---|
| Matched | Copy of B's tag, recursing into children |
| Inserted (B-only) | <ins> wrapping a clone of the B subtree |
| Deleted (A-only) | <del> wrapping a clone of A; diff:src-xcitepath, diff:src-identifier |
| MovedParent (B side) | <move-to diff:src-xcitepath=… diff:dst-xcitepath=…> containing the matched body |
| MovedParent (A side) | <move-from diff:src-xcitepath=… diff:dst-xcitepath=… diff:src-identifier=…/> stub |
| MovedOrder | <move-to …> at B's position (no <move-from> — parent didn't change) |
| Text change in leaf | <ins> / <del> around plain text, with B's inline markup preserved |
Every <ins>, <del>, <move-to>, <move-from> element carries every caller-supplied metadata entry as diff:<key>="<value>" attributes — handy for tagging diffs by author, comment id, review round, etc.
await client.smartDiff(
{ identifier: '/book/ch1', branch: 'main', date: '2024-01-01' },
{ identifier: '/book/ch1', branch: 'main' }, // live tip
{ identifier: '/diffs/book/ch1@2024-01-01', branch: 'main' },
{ author: 'alice', review_round: '3' },
{ diffText: true, excludeTags: ['db:revisionMeta'], maxTextDiffBytes: 1 << 20 }
);
Tiny worked example (A → B → diff):
<!-- A -->
<chapter db:identifier="/book/ch1"><para>Old line.</para></chapter>
<!-- B -->
<chapter db:identifier="/book/ch1"><para>New line.</para></chapter>
<!-- diff output -->
<chapter db:identifier="/book/ch1" diff:document="true">
<para>
<del diff:author="alice">Old</del><ins diff:author="alice">New</ins> line.
</para>
</chapter>
stats. The 201 body includes per-category counters over provision candidates only (textual <ins>/<del> inside leaves are not counted):
| Field | Means |
|---|---|
matched |
Matched pairs at each tree level (cumulative across recursion) |
ins |
B-only candidates emitted as <ins> (+1 for pure-insert case where A is empty) |
del |
A-only candidates emitted as <del> (+1 for pure-delete case where B is empty) |
moved_parent |
Candidates that moved under a different UUID-matched ancestor; counted once on the B side |
moved_order |
Candidates that stayed under the same parent but broke sibling order |
Options.
| Option | Default | Effect |
|---|---|---|
diffText |
true |
When false, every leaf matched pair degrades to one <del> + one <ins> block (no per-character diff) |
excludeTags |
[] |
Element local-name strings to skip when collecting candidates. Matched by exact node.name() (namespace-prefix-sensitive) |
maxTextDiffBytes |
1 MiB | Per-leaf-pair byte threshold; oversize leaves degrade to whole-block <del> + <ins> |
maxSourceBytes |
8 MiB | Combined approx-size cap on A + B; over → 413 smart_diff_sources_too_large with limit_bytes / from_bytes / to_bytes |
Target lifecycle. The result is a regular XCiteDB XML document: shredded, ABAC-gated per descendant id, FTS-indexed where enabled. Read it back with queryByIdentifier(target.identifier). It does not auto-expire — delete with deleteDocument(). Re-running smartDiff on the same target silently overwrites if the existing document is itself a smart-diff (root has diff:document="true"); otherwise 409 target_not_smart_diff. Recognize a smart-diff document by checking that attribute.
ABAC interaction. Subtrees the requester is denied (PolicyAction::Read) are silently redacted from both sources before the diff runs — so denied content never echoes back via <del> or <ins>. Writes to the target are then ABAC-gated again per descendant identifier in the diff payload; one denial fails the whole call.
Errors: 400 (bad ref / unparseable date), 403 (read on source, write on target, reserved namespace), 404 no_source_content (both sources empty), 409 target_not_smart_diff, 413 smart_diff_sources_too_large, 423 lock conflict on target write, 503 admission/queue full.
client.search() accepts TextSearchQuery with optional at_date (point-in-time), date_from / date_to (range overlap), and mode: 'fts' for pure keyword search. Omit temporal fields for the default “current” posting view. Hits may include valid_from / valid_to (7-character internal date keys returned by the server).
await client.search({
query: 'installation guide',
mode: 'fts',
at_date: '2024-06-01',
limit: 20,
});
client.subscribe(
{ pattern: '/us/bills/*', event_type: '*' },
(ev) => console.log(ev)
);
With JWT in browsers, tokens are passed as access_token query parameter on the WebSocket URL. API keys can use api_key query parameter.
Call POST /api/v1/test/sessions with your normal API key or Bearer (same project context as usual). Use XCiteDBClient.createTestSession({ baseUrl, apiKey, … }) to get a client that sends X-Test-Session on requests.
_test/<uuid>/ (writes never touch production).overlay: true in createTestSession options (or POST body {"overlay":true}). The server layers a writable LMDB on top of the current project’s on-disk data opened read-only so you can debug against real data; changes still live only under _test/<uuid>/. Use project-scoped credentials or platform Bearer + X-Project-Id as when calling production APIs.createTestSession refuses by default when apiKey looks like a live credential (sk_live_… / pk_live_…). Test sessions ARE isolated server-side, but a buggy test that forgets X-Test-Session would write to production with a live key — test keys have a server-side gate that catches that mistake; live keys do not. Override with allowLiveKey: true on the call or XCITEDB_ALLOW_LIVE_KEY_IN_TESTS=1 in the env when you genuinely want live-key wet tests.Tear down with destroyTestSession() (or DELETE /api/v1/test/sessions/current with the session header). With the same API key / Bearer and no X-Test-Session, use listTestSessions(), destroyAllTestSessions(), and destroyTestSessionByToken(token) to clear leaked sessions before large suites (avoids the default per-credential concurrent cap). See llms.txt / llms-full.txt in this package for full behavior, limits, and auth notes.
Functions are provisioned by a server-side, idempotent script using an admin/editor key (never a browser bundle) — the same pass as your ABAC/trigger setup.
JS/TS — deploy the manifest, then compile source server-side (no toolchain or wasm artifact needed):
await client.deployFunction('greet', { runtime: 'js', identity_mode: 'as_caller' });
await client.buildFunction('greet', { source: tsSource }); // compiles + activates
Rust / compiled — runtime: 'component', precompiled off-platform
to wasm32-wasip2, bytes shipped inline:
await client.deployFunction('settle', {
runtime: 'component', identity_mode: 'as_role', role: 'billing',
wasm_b64: readFileSync('wasm/settle.wasm').toString('base64'),
});
buildFunction / activateFunctionVersion / listFunctionVersions
cover the JS build lifecycle; setFunctionSecrets sets declared secret
values. For the provisioning-script pattern, the JS-vs-component
trade-off, platform invariants, and a worked Vercel example (adaptable
to Netlify/Fly/Docker), see
docs/DEPLOY_FUNCTIONS.md.
Check a desired-state bundle in next to your app and reconcile it on every boot with one idempotent call — no Web UI or human CLI in the loop:
await client.controlPlane.ensure('./xcitedb'); // ~1 read when converged
Bundle layout (<root>/, human/AI-edited, always the truth):
xcitedb/
xcitedb.toml # scope + [auto_apply] profile (safe), prune=false
control-plane/ # full desired state
isolation.yaml security.yaml
policies/<id>.yaml triggers/<id>.yaml
settings/<area>.json # cors|rate_limits|search|doc_conf|asset_storage|email_provider|backup|…
functions/<name>/manifest.yaml (+ dist/<name>.wasm, src/)
shared-secrets.json # SDK-only deploy-env secret refs (see below)
migrations/0003_*.xmig # ordered imperative bridges (append-only)
xcitedb.lock # GENERATED — mirrors /_xcitedb/migrations
ensure(root, opts?) — read bundle → POST /api/v1/admin/migrate.
Idempotent; converged ⇒ one-read 200 noop; concurrent boots collapse onto a
single reconcile via a coordinator advisory lock.plan(root, opts?) — dry-run: classify + explain, writes nothing
(/api/v1/admin/migrate/plan).apply(root, { planHash?, allowPrune?, forceUnsafe?, scope? }) —
explicit (non-fast-path) apply with drift-revert. Safe profile auto-
applies additive/idempotent (GREEN) and drift-revert (YELLOW) changes;
destructive ones (RED, e.g. prune) are blocked-but-surfaced and require
explicit allowPrune/forceUnsafe (or xcitedb.toml [auto_apply]).control_plane_hash; a mismatch is refused with
hash_mismatch (don't put non-integral floats in the bundle — out of
contract). Auth: the client's key gates entry only; reconcile writes
execute server-side as type=system. Use an admin/editor key (server-side
script, never a browser bundle). Full design:
docs/CONTROL_PLANE_MIGRATIONS_PLAN.md.
secrets[]in amanifest.yaml/ settings area declares secret names only — values never enter the repo. The reconciler asserts presence and fails the plan naming any missing key; supply values out-of-band (the shared-secret surface below, the in-app settings forms, ordeploy-env:).
Unified tenant secrets. Every platform credential (SMTP password, S3 backup/mirror keys, embedding/LLM API keys, per-target asset-storage keys) lives in one tenant-wide store encrypted under a zero-conf per-tenant keyring. Values are write-only — the server never returns them. Manage them by canonical name:
await client.listSharedSecrets(); // inventory: {name,label,area,set}, never values
await client.setSharedSecret('search.llm.api_key', v); // write-only (also: rotate = re-set)
await client.deleteSharedSecret('email.smtp.password'); // clear (also clears any legacy copy)
await client.getSecretsKeyring(); // {provisioned, active_backend, slots[]}
await client.addSecretsKeyringPassphrase(pass); // optional off-disk operator unlock slot
Canonical shared-secret names you'll write by here:
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.