Capability first · transport second

ArcaneCommunicationBridge.js

Maps provider HTTP threads/messages/connect/disconnect endpoints to normalized communication entities.

SDK 0.5.18Runtime 0.8.12Protocol arcane/1
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

JavaScript
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

BindingFormDeclaration or signatureParameter syntax
defaultdefault · classclass ArcaneCommunicationBridge
CallableKindExact public signatureParameter syntax
ArcaneCommunicationBridge.requestpublic-memberasync request(path,options={})path,options={}
ArcaneCommunicationBridge.listThreadspublic-memberasync listThreads()
ArcaneCommunicationBridge.getMessagespublic-memberasync getMessages(threadId)threadId
ArcaneCommunicationBridge.sendpublic-memberasync send(input={})input={}
ArcaneCommunicationBridge.connectpublic-memberasync connect()
ArcaneCommunicationBridge.disconnectpublic-memberasync disconnect()
MemberKindExact public declarationParameter syntax
ArcaneCommunicationBridge.constructorconstructorconstructor({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.requestasync methodasync request(path,options={})path,options={}
ArcaneCommunicationBridge.listThreadsasync methodasync listThreads()
ArcaneCommunicationBridge.getMessagesasync methodasync getMessages(threadId)threadId
ArcaneCommunicationBridge.sendasync methodasync send(input={})input={}
ArcaneCommunicationBridge.connectasync methodasync connect()
ArcaneCommunicationBridge.disconnectasync methodasync 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

JavaScript
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'));

No direct Core call is claimed for this artifact. Any injected provider or consuming module retains its own documented authority.