On this page
Overview
Maps provider HTTP threads/messages/connect/disconnect endpoints to normalized communication entities.
- Artifact
ArcaneCommunicationBridge.js· esm - Classification
public first party - Availability
Browser / native WebView / server with fetch - Normalization
Entity results are normalized; provider/transport failures remain mixed.
Import and lifecycle
import arcaneCommunicationBridge from '/arcane/modules/ArcaneCommunicationBridge.js';
Methods perform JSON HTTP requests against one configured provider endpoint; construction itself has no I/O.
Application-facing behavior: default ArcaneCommunicationBridge; request(), listThreads(), getMessages(), send(), connect(), disconnect().
Protocol and host implementation
JSON HTTP(S), default loopback 127.0.0.1:8020 This detail does not widen the application-facing API or grant authority.
Exports, signatures, parameters, and results
| Binding | Form | Declaration or signature | Parameter syntax |
|---|---|---|---|
default | default · class | class ArcaneCommunicationBridge | — |
| Callable | Kind | Exact public signature | Parameter syntax |
|---|---|---|---|
ArcaneCommunicationBridge.request | public-member | async request(path,options={}) | path,options={} |
ArcaneCommunicationBridge.listThreads | public-member | async listThreads() | — |
ArcaneCommunicationBridge.getMessages | public-member | async getMessages(threadId) | threadId |
ArcaneCommunicationBridge.send | public-member | async send(input={}) | input={} |
ArcaneCommunicationBridge.connect | public-member | async connect() | — |
ArcaneCommunicationBridge.disconnect | public-member | async disconnect() | — |
| Member | Kind | Exact public declaration | Parameter syntax |
|---|---|---|---|
ArcaneCommunicationBridge.constructor | constructor | constructor({id,label,channels,endpoint='http://127.0.0.1:8020',fetchImpl=globalThis.fetch}={}) | {id,label,channels,endpoint='http://127.0.0.1:8020',fetchImpl=globalThis.fetch}={} |
ArcaneCommunicationBridge.request | async method | async request(path,options={}) | path,options={} |
ArcaneCommunicationBridge.listThreads | async method | async listThreads() | — |
ArcaneCommunicationBridge.getMessages | async method | async getMessages(threadId) | threadId |
ArcaneCommunicationBridge.send | async method | async send(input={}) | input={} |
ArcaneCommunicationBridge.connect | async method | async connect() | — |
ArcaneCommunicationBridge.disconnect | async method | async disconnect() | — |
Parameter meanings and results
The constructor accepts id, label, channels, endpoint, and fetchImpl. request returns parsed JSON; listThreads and getMessages return normalized entities; send returns an outbound CommunicationMessage; connect and disconnect return provider JSON.
Events, side effects, and errors
Source-literal CustomEvent dispatches
No source-literal CustomEvent dispatch is part of this artifact.
Lifecycle and event flow
This artifact has no additional documented lifecycle event flow.
Direct coded failures
This artifact directly assigns no stable coded failure.
Exported Error subclasses
This artifact exports no Error subclass.
Documented failure behavior
- TypeError for a non-HTTP(S) endpoint
- network unavailable
- invalid JSON
- non-2xx bridge response
Availability and capabilities
Browser / native WebView / server with fetch. Entity results are normalized; provider/transport failures remain mixed.
Normalizes a provider HTTP service, loopback by default; it is not itself a Core capability.
Contract example
import ArcaneCommunicationBridge from '/arcane/modules/ArcaneCommunicationBridge.js';
const bridge=new ArcaneCommunicationBridge({
endpoint:'https://bridge.test',
fetchImpl:async()=>new Response('{"ok":true}',{status:200})
});
console.log(await bridge.request('/health'));
Related reference
No direct Core call is claimed for this artifact. Any injected provider or consuming module retains its own documented authority.