ICECHAT NX v1.6.5 - ATDT BRIDGE NOTES
=====================================

IceChat NX does not modify ATDT core files.

The bridge uses ATDT's existing private SysOp chat facilities:

* Atdt\Chat::post() for private kind=sysop messages.
* ATDT's existing chat_msgs queue.
* ATDT's normal caller/browser polling, which notices a direct SysOp message
  addressed to a caller node and opens the built-in SysopChat screen.
* SysopChatScreen polling for subsequent SysOp-to-caller messages.
* ATDT's existing sysophup marker when the Windows SysOp ends the line.

IceChat NX's API remains contained in:

  /doors/icechatnx/api.php

and writable IceChat NX files remain in:

  /data/doorstore/icechatnx/

The bridge reads the active ATDT session and private chat queue through ATDT's
existing bootstrap/classes. It does not write or patch api.php, term.js, or
anything under ATDT lib/.

A page records the caller user id, node, session id, and session-created stamp.
The API requires the same session to still be active before Accept Chat may
post the direct private-line message. This is important because ATDT node
numbers are reused by later callers.

COMPATIBILITY
-------------

IceChat NX requires an ATDT build that includes the native private SysOp chat
components used by this bridge: Atdt\Chat, the private chat_msgs queue,
SysopChatScreen, caller background polling, and the sysophup hang-up behavior.

The bridge is intentionally documented by capability rather than by ATDT
version number so the notes remain valid as ATDT releases are updated. IceChat
NX does not patch ATDT to provide these features; it uses the implementations
already supplied by ATDT.


SECURITY / ENDPOINT DISCOVERY
-----------------------------

The IceChat NX Admin Panel uses ATDT's explicitly configured base_url when it
displays the Windows-client API endpoint. It does not infer that endpoint from
HTTP Host or X-Forwarded-* request headers. Configure ATDT's public Base URL
before linking a Windows client. Remote Windows clients require HTTPS.

IceChat NX API POST bodies must be application/json and are capped at 64 KiB.
The private doorstore directory is hardened to 0750 and its JSON/transcript
files to 0640 where the host filesystem supports POSIX permissions.
