Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

opportune

Latest version: v0.2.0

Overview

Last scanned
24 Nov 2026
Published
24 Nov 2026
npm package Publisher: kjw-azx, rich-azx
0 Stars
0 Forks
3 Versions
Rust Repo language

Scan summary

opportune was last scanned on 24 Nov 2026 at version 0.2.0. Risk score 5 of 100 (low). No malicious behavior was detected.

  • Releases: 3 versions, all published within 2 days (23 and 24 Nov 2026).
  • Findings: 2 rules fired in version 0.2.0 (2 low). The score describes this version only.

Versions

3 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.2.0 LATEST 24 Nov 2026 2 rules fired
0.1.0 23 Nov 2026 1 rule fired
0.0.0-stage 23 Nov 2026 Not shown

Rules fired in 0.2.0: 2

Findings

2 Low

Findings for v0.2.0. 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.

Maintainer or owner changed

The package's maintainer or owner differs from the previous version. This is usually benign, such as a transfer or reorganization, but account takeovers look the same at first. Shown for awareness.

LOW

WebAssembly module included

LOW
Checking access…

🔒 Create a free account to see all 2 findings with descriptions and instance counts

The score describes 0.2.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

opportune (npm)

Availability scheduling for Node, Bun, Cloudflare Workers, browsers and module Web Workers: the opportune engine — the same core exposed by the Rust and Python packages — compiled to WebAssembly and wrapped in a strict TypeScript surface. The IANA time zone database is bundled inside the module, so calls need no native toolchain and no TZif files on disk.

npm install opportune

Requires Node 24+ or Bun 1.4.2+, or a Cloudflare Worker, a browser or a module Web Worker. Node, Bun and Cloudflare Workers load the module themselves; a browser or module Web Worker calls init() from opportune/web first — see Runtimes.

Quickstart: one person, one meeting

import { Engine, businessHours, buffers, minNotice, offerStart, person, singleGoal } from "opportune";

const request = {
  now: "2027-06-14T07:00Z",
  goal: singleGoal("30m", { all: [person("rich")] }, {
    zone: "Europe/London",
    searchWindow: ["2027-06-13T23:00Z", "2027-06-18T23:00Z"],
  }),
  participants: [{ id: "rich", zone: "Europe/London", calendar: [] }],
  rules: [businessHours(), buffers(), minNotice()],
};

using engine = new Engine();
const [earliest] = engine.findAvailability(request).offers;
console.log(earliest === undefined ? "no offers" : offerStart(earliest));

using releases the engine's native handle when the block exits; without using, call engine.free(). Keep using inside a function or request handler — at ES module top level, using disposes as soon as module evaluation completes, before any exported handler runs. For a long-lived module-scope instance, use const engine = new Engine() or call the free functions (findAvailability, checkSlot, validate, requiredRanges), which share one engine automatically.

findAvailabilityJson, checkSlotJson, validateJson, and requiredRangesJson return the engine's canonical JSON string directly for routes that forward responses unchanged.

Errors

Every failure throws OpportuneError with a stable code, a message, an RFC 6901 path, and errors (per-field validation diagnostics). Handlers catching OpportuneError never receive a bare TypeError:

import { OpportuneError, findAvailability, person, singleGoal } from "opportune";

try {
  findAvailability({
    now: "2027-06-14T07:00Z",
    goal: singleGoal("30m", { all: [person("rich")] }, {
      zone: "Europe/London",
      searchWindow: ["2027-06-13T23:00Z", "2027-06-18T23:00Z"],
    }),
    participants: [{ id: "rich", zone: "Europe/London", calendar: [] }],
    rules: [],
    limit: Infinity,   // JSON serializes Infinity as `null`
  });
} catch (thrown) {
  if (thrown instanceof OpportuneError) {
    console.error(thrown.code, thrown.path, thrown.errors);   // invalid_json, null, []
  }
}

httpStatusForError(error) maps a rejection to the status a route should answer: 422 for a caller-fixable document (invalid_request, invalid_json, wire codes) and 500 for deployment/integration or package-argument failures (invalid_limits, payload_invalid, invalid_argument, argument_not_utf8, unsupported_schema_version, serialization_failed, tzdb_*, WASM codes). Use it in Express's error middleware, Hono's onError, or a Next.js NextResponse. new Engine(limits) throws invalid_limits for a limits document the engine cannot read; undefined and null mean the engine defaults.

Three generated unions are open so a newer engine's value still assigns: BlockStatus (free | tentative | busy | any provider string), OfferFlag ("calendar_unknown" plus a future flag), and OpportuneErrorCode. Use isKnownStatus(value: unknown) to narrow a provider status to the three the engine interprets before acting on free. On generated documents a null optional field means absent (the wire default applies); an options object itself must be an object, so null as a builder's options argument is invalid_type.

Presets, policies, and public answers

opportune and opportune/presets export the same builders so browser bundles and servers share one vocabulary:

  • singleGoal(duration, requirement, options) accepts tags and candidates as one string or a readonly string[]; partId, displayZone, grid and travel are optional.
  • statusPolicy(entries, options) builds a status_policy rule from generated entries or wire mappings. Policies are tried first-match across rules in request order, so pass most-specific first ([host, team, org]).
  • unless(rule, selector) excludes a selector from the bookings a rule applies to (for example, unless(businessHours(), { tag: "vip" })), allowing a narrower tier to loosen a broader rule instead of intersecting with it.
  • andWho(rule, selector) is the participant-side twin: it intersects who instead of replacing it, so andWho(businessHours(), { kind: "person" }) keeps the default role: "host" clause and reaches human hosts alone — not attendees, not resource rooms. exceptWho(rule, selector) narrows by not(selector), so exceptWho(capPerDay({ tag: "interview" }, 2), { ids: ["ceo"] }) exempts the CEO while every other host stays subject.
  • { kind: "person" } scopes human-only rules (working hours, rest, caps, and status_policy) away from kind: "resource" conference rooms. It also matches attendees, so use andWho (or combine it with { role: "host" }) when the rule is about human hosts only. validate(request) warns with status_policy_ignores_resource at /rules/{index} if an unscoped ignore policy reaches a room.
  • exclude_event_keys on a request ignores events being rescheduled for blocking, rest, and cap counts so a booking can move even when a host is at their daily cap.
  • all_day blocks block the day they cover without consuming a cap's meeting budget.
  • publicResponse(response) and publicSlotCheck(check) strip operator-only fields (warnings, excluded reasons, and each offer's eligible, assignment, and reserve) for public booking routes. The full Response and SlotCheck remain unchanged for operator routes.

The engine is synchronous: a large search blocks the Node event loop and there is no *_async binding. Run heavy calls in a worker_threads worker or a separate process, and share one engine per worker rather than building one per request.

Subpaths

  • opportune — engine, presets, sugar helpers, and generated TypeScript types.
  • opportune/presets — pure TypeScript rule/goal/offer builders, OpportuneError, httpStatusForError, isKnownStatus, the open unions, publicResponse/publicSlotCheck, VERSION, marker constants, and generated types. Loads no WebAssembly and no node: modules — safe for browser, module Web Worker, and client component bundles.
  • opportune/adapters/graph — Microsoft Graph calendarView, getSchedule, and workingHours conversions.
  • opportune/adapters/google — Google Calendar events.list and freeBusy.query conversions.
  • opportune/web — explicit WASM initializer (init, initSync) for browsers and module Web Workers.
  • opportune/opportune_wasm_bg.wasm — the compiled WebAssembly binary for bundlers or CDNs serving it to init(...).
  • opportune/schema.json — the Draft 2020-12 JSON Schema the generated types derive from, exported directly from the package for consumers that validate a document before sending it. Read it with import schema from "opportune/schema.json" with { type: "json" } or require("opportune/schema.json"); make check-codegen-ts drift-checks it against the Rust export.

Provider conversions return an unavailable outcome for errored calendars instead of an empty block list, so an unreachable mailbox never reads as free.

Runtimes

The engine runs on Node 24+, Bun 1.4.2+, Cloudflare Workers (workerd), browsers, and module Web Workers — all backed by one .wasm binary selected through package.json#imports["#wasm"]:

  • Node 24+ / Bun 1.4.2+ (node, default): lazy synchronous load from disk on the first engine call (works with both ESM import and CommonJS require("opportune")).
  • Cloudflare Workers (workerd): static .wasm import compiled by Wrangler (CompiledWasm rule in wrangler.jsonc) and instantiated lazily on the first engine call, with zero runtime WebAssembly.compile. Reuse a single module-scoped Engine across requests in the isolate.
  • Browsers and module Web Workers (browser, worker): call await init(wasmUrl) (or initSync({ module })) from opportune/web once before creating an Engine, passing the .wasm asset URL (for example import wasmUrl from "opportune/opportune_wasm_bg.wasm?url" in Vite). Calling the engine before initialization throws OpportuneError with code wasm_unavailable.

Deno, the deprecated Next.js Edge runtime (edge-light), and browser engines beyond the Chromium, Firefox, and WebKit test matrix are untested and not claimed; see docs/wasm.md for the full runtime contract and non-claims.

A Cloudflare Worker compiles the module in its bundle (Wrangler CompiledWasm), and one module-scoped Engine serves every request in the isolate:

import { Engine } from "opportune";

const engine = new Engine();

export default {
  async fetch(request: Request): Promise<Response> {
    if (request.method !== "POST") {
      return new Response("POST a request document", { status: 405 });
    }
    return new Response(
      engine.findAvailabilityJson(
        (await request.json()) as Parameters<Engine["findAvailabilityJson"]>[0],
      ),
    );
  },
};

A browser or module Web Worker initializes the packaged module before its first engine call:

import { Engine } from "opportune";
import { init } from "opportune/web";
// Vite: resolve the package's .wasm as an asset URL.
import wasmUrl from "opportune/opportune_wasm_bg.wasm?url";

await init(wasmUrl);

const engine = new Engine();
console.log(engine.tzdbVersion);

In a Next.js App Router project, run the engine on the Node.js runtime (Vercel's recommended default):

export const runtime = "nodejs";

and list "opportune" in serverExternalPackages in next.config.mjs:

// next.config.mjs
export default { serverExternalPackages: ["opportune"] };

Import opportune/presets wherever a bundle only needs builders and types.

Documentation

Full guide — requests, responses, limits, provider adapters, presets, and bundle-size budget — at azx-pbc-oss.github.io/opportune/wasm/ (source in docs/wasm.md).

License

MIT OR Apache-2.0.

OX Radar and Response Center

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.

Where it’s listed

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).

  • npm opportune

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Microsoft's Official agent framework Hijacked
AI & VibeSec

BREAKING: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials

PolinRider Returns
Research

PolinRider Returns: Hijacked npm Packages Use Ethereum Blockchain to Conceal Malware Infrastructure

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

Frame 2085668439 (1)
Group 1261154229