textcast-chat-axi 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -0
- package/README.md +172 -2
- package/dist/chrome-client.js +3959 -0
- package/dist/chrome.css +1721 -0
- package/dist/cli.mjs +6894 -0
- package/dist/server.mjs +68 -0
- package/package.json +68 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Kun Chen
|
|
4
|
+
Copyright (c) 2026 veardk (textcast-chat-axi modifications)
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,173 @@
|
|
|
1
|
-
|
|
1
|
+
<h1 align="center">textcast-chat-axi</h1>
|
|
2
|
+
<p align="center">
|
|
3
|
+
<a href="https://github.com/veardk/textcast-chat-axi/actions/workflows/ci.yml"
|
|
4
|
+
><img alt="CI" src="https://img.shields.io/github/actions/workflow/status/veardk/textcast-chat-axi/ci.yml?style=flat-square&label=ci"
|
|
5
|
+
/></a>
|
|
6
|
+
<a href="https://github.com/veardk/textcast-chat-axi/actions/workflows/release-please.yml"
|
|
7
|
+
><img alt="Release" src="https://img.shields.io/github/actions/workflow/status/veardk/textcast-chat-axi/release-please.yml?style=flat-square&label=release"
|
|
8
|
+
/></a>
|
|
9
|
+
<a href="https://www.npmjs.com/package/textcast-chat-axi"
|
|
10
|
+
><img alt="npm" src="https://img.shields.io/npm/v/textcast-chat-axi?style=flat-square"
|
|
11
|
+
/></a>
|
|
12
|
+
</p>
|
|
2
13
|
|
|
3
|
-
|
|
14
|
+
<h3 align="center">Reading-companion and revision AXI for Textcast.</h3>
|
|
15
|
+
|
|
16
|
+
> **Local-first.** textcast-chat-axi opens a Textcast page in a local review window and keeps
|
|
17
|
+
> the page, conversation, and revision loop on your machine.
|
|
18
|
+
|
|
19
|
+
Textcast turns a video, podcast, or long text into a single HTML reading page.
|
|
20
|
+
textcast-chat-axi opens that page in a local review window where the reader can ask about or annotate any sentence or topic card and send it to the agent.
|
|
21
|
+
The agent edits the translation or analysis, republishes the page, and the review window reloads it in place.
|
|
22
|
+
|
|
23
|
+
- **Local-first** - A local CLI and a local server. Nothing leaves the machine.
|
|
24
|
+
- **Sentence-level notes** - Every Textcast segment and topic card has a stable id, so a note arrives at the agent as `span#seg<N>-<src|tgt>-<mode>` or `details#topic-<N>` and points at exactly one line.
|
|
25
|
+
- **One loop** - Open, poll, reply. The agent long-polls for the reader's notes and answers in the same conversation panel.
|
|
26
|
+
|
|
27
|
+
textcast-chat-axi is an [AXI](https://axi.md): its CLI output tells the agent what to do next.
|
|
28
|
+
|
|
29
|
+
## Quick Start
|
|
30
|
+
|
|
31
|
+
Textcast's skill runs these for you. By hand:
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
npx -y textcast-chat-axi output/<category>/NN-<slug>.html # open the review window
|
|
35
|
+
npx -y textcast-chat-axi poll output/<category>/NN-<slug>.html # wait for the reader's notes
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Node 22 or newer is required.
|
|
39
|
+
|
|
40
|
+
## How It Works
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
┌──────────────────────────┐
|
|
44
|
+
│ Textcast publishes │
|
|
45
|
+
│ NN-<slug>.html │
|
|
46
|
+
└────────────┬─────────────┘
|
|
47
|
+
▼
|
|
48
|
+
┌──────────────────────────┐
|
|
49
|
+
│ textcast-chat-axi <file> │
|
|
50
|
+
│ opens the review window │
|
|
51
|
+
└────────────┬─────────────┘
|
|
52
|
+
▼
|
|
53
|
+
┌──────────────────────────┐
|
|
54
|
+
│ Reader annotates a │
|
|
55
|
+
│ sentence or topic card, │
|
|
56
|
+
│ or sends a message │
|
|
57
|
+
└────────────┬─────────────┘
|
|
58
|
+
▼
|
|
59
|
+
┌──────────────────────────┐
|
|
60
|
+
│ textcast-chat-axi poll │
|
|
61
|
+
│ returns the notes; the │
|
|
62
|
+
│ agent edits, republishes │
|
|
63
|
+
└──────────────────────────┘
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
- **File-path identity** - Sessions are keyed by the canonical HTML file path, so agents do not need opaque IDs. Republishing a Textcast page keeps its path, so the session survives.
|
|
67
|
+
- **Sandboxed page** - The page runs in a sandboxed iframe while a small injected SDK handles annotations and feedback controls. The served page is otherwise byte-for-byte the file on disk, so it renders the same whether opened here or directly in a browser.
|
|
68
|
+
Author-defined links and popups open in top-level tabs, while the page itself stays sandboxed without same-origin access.
|
|
69
|
+
- **Moving between pages** - A link to another HTML page of the same site - the transcript, its summary, the index - keeps the review open: the chrome moves the session to that page, so asking about text keeps working there, and live reload follows it. The site is the nearest directory up to four levels above the opened file that holds a Textcast `textcast.json`, or else the file's own directory; links outside it, to other sites, or into new tabs behave as the page wrote them. A note written on another page carries that file's absolute path as its `page`, and the poll tells the agent to edit that file.
|
|
70
|
+
- **Video player** - A Textcast page cannot run a YouTube or Bilibili embed inside the sandbox, so clicking a timestamp hands the video id and start second to the review window, which plays it in a floating player. The window builds the embed URL itself; the page cannot point it anywhere else. On a page with a video, the More menu (⋮) has a "Play the video when a line is clicked" switch; off, clicking the transcript plays nothing and opens no tab. The choice is kept per browser.
|
|
71
|
+
- **Draggable launcher, panel, and player** - On desktop the round launcher, the conversation panel (by its header), and the player (by the grip at its top) can be dragged. The launcher settles against the nearer side edge and hides while the panel is open; an undragged panel opens beside the launcher. The player has no title bar: its grip and close button appear on hover, and dragging any edge or corner resizes it at 16:9, never below its default size or past the window. Positions and the player size are kept per browser. Phones keep the fixed bottom sheet.
|
|
72
|
+
- **Language** - The review window and the in-page Ask card follow the page's `<html lang>`: Simplified Chinese pages get Chinese controls, everything else English.
|
|
73
|
+
- **Load notice** - Nothing covers the page while it loads. If the review cannot load at all - the window's own script never runs, or the server does not answer after several retries - a small notice at the top names the problem and offers **Check and reload**. **Dismiss** always closes it.
|
|
74
|
+
A review already open in another tab is named the same way, with a **Take over here** button, because a page loads in one tab at a time. The takeover warning reads "Unsent answers stay in the tab or window where you entered them; taking over in another window does not bring them along."
|
|
75
|
+
- **Revisions legend** - Opt-in. The agent can declare what it changed in the page: one `<script type="application/json" data-textcast-revisions>` array of `{ id, label, timestamp, summary }` entries, plus `data-textcast-revision="<id>"` on each block it edited or added.
|
|
76
|
+
A **Revisions** button then appears in the top bar with a legend listing each round - colour swatch, label, time, and the agent's summary - and **Reveal** steps through that round's changed blocks, flashing them one at a time.
|
|
77
|
+
Each swatch carries a distinct border style and fill pattern as well as a colour. Pages with no registry show no button, a malformed registry is ignored, and at most 6 revisions are listed. The legend lives in the review window, never in the page.
|
|
78
|
+
- **Live tab title and icon** - The browser tab adopts the page's `<title>` and first `<link rel="icon">` when it loads. A page can update them afterwards with `window.textcast.setDocumentMeta({ title, icon })`: a string sets the field, `null` restores the load-time value, and an omitted field is left alone. The title is trimmed to 120 characters and shown as `<title> · Textcast Chat`; the icon must be a `data:image/svg+xml` URL of at most 8192 characters. Feature-detect with `window.textcast?.setDocumentMeta?.(...)`.
|
|
79
|
+
- **Local assets** - Images, CSS, fonts, and scripts next to the HTML file load through relative paths from that directory; root-prefixed paths such as `/assets/logo.png` do not resolve.
|
|
80
|
+
- **Live reload** - The HTML file is watched and the page reloads when it changes, keeping the iframe scroll position, an open annotation card's unsent text, and answers to `data-textcast-question` controls. Review state and the unsent queue are saved in that tab's `sessionStorage` and survive a full reload of the same tab; they are not shared with other tabs. To also reload on sibling asset changes, add `data-textcast-live-reload-root` to the root element or `<meta name="textcast-live-reload" content="root">`.
|
|
81
|
+
If the element an unsent annotation was attached to is gone for good, or the page replaces a queued note while you are editing it, your text is kept in the conversation panel under **Unsent annotation** - never written over anything you have typed, and kept across reloads.
|
|
82
|
+
- **Feedback controls** - Native controls (radios, checkboxes, inputs, selects, buttons, labels, disclosure summaries, contenteditable) and custom widgets with an interactive ARIA role (`button`, `checkbox`, `combobox`, `menuitem`, `menuitemcheckbox`, `menuitemradio`, `option`, `radio`, `switch`, `tab`, `treeitem`) stay interactive automatically. A link (`<a href>`) stays annotatable when it carries one of these roles or sits inside such a widget.
|
|
83
|
+
A page can start in explore mode with `data-textcast-annotate="off"` on the root `<html>` element. Annotation is on by default; the toolbar can override the page default, and the choice persists across reloads of the page.
|
|
84
|
+
A page can queue an answer itself with `window.textcast.queuePrompt()`. Mark custom (non-native) clickable elements with `data-textcast-action` so they are not annotated, and use `data-textcast-question` or `queueKey` when pre-send updates for the same question should replace each other.
|
|
85
|
+
Everything you send is part of the conversation: a note on an element, a text selection, or a composer message each becomes a bubble with an anchor line naming what it was attached to, a quoted excerpt, and the selector on hover. A queued, unsent note sits at the end as a dashed **Queued** bubble with edit and remove controls; clicking it opens its words for editing and scrolls the page to its element. While its batch is in flight it reads **Sending**, and once the server accepts it, it settles as a sent bubble in every tab of the session. The panel keeps the newest stored transcript up to 5 MiB. Agent replies render a small Markdown subset - paragraphs, line breaks, headings as bold lead lines, bullet and numbered lists, fenced and inline code, bold, italic, and http(s) links; your own messages are never parsed.
|
|
86
|
+
On wider screens the conversation and queued notes share one scrollable panel above a sticky composer. The sidebar button hides the panel so the page takes the full width; while hidden it counts queued notes or marks an unseen agent reply, and the choice is remembered in this browser.
|
|
87
|
+
The overflow menu holds copy path, reload, and end session; the composer has **Send & End** beside **Send to Agent**. Once **Send & End** starts, new feedback pauses, any open annotation draft is kept until delivery succeeds, and that exact final batch is held. A completed reservation survives a page reload. A transient delivery failure permits only retrying the same batch. An attachment rejection (HTTP 400) or an oversized batch (HTTP 413) cancels the reservation without ending the session and keeps the prompts queued for editing.
|
|
88
|
+
Unsent notes belong to the tab where you entered them. An empty **Send to Agent** reports "Nothing queued in this tab." Annotate mode alone does not queue a note; use the annotation card's **Queue** action first. A failed or unacknowledged send keeps the queue and shows recovery guidance unless the transcript proves the server already accepted it.
|
|
89
|
+
- **Reviewing on a phone** - Below 860px wide, the page takes the whole screen above a **Conversation** dock, and the conversation opens as a bottom sheet: tap the dock, swipe it up, or press the chevron to raise it; tap the dimmed page, swipe down, press the chevron, or press Escape to lower it. The dock shows queued prompts, an unread reply, or whether the agent is listening. The sheet sizes itself to the visible viewport and keeps the send actions above the keyboard.
|
|
90
|
+
- **Keyboard shortcuts** - In the composer, Enter sends queued prompts and Shift+Enter inserts a newline.
|
|
91
|
+
In the annotation card, Enter queues the note, Shift+Enter inserts a newline, and Ctrl+Enter (Cmd+Enter on macOS) queues it and sends everything queued. Escape closes an empty card and does nothing while it holds text or an attachment.
|
|
92
|
+
While editing a queued note, Enter saves it, Shift+Enter inserts a newline, and Escape discards the edit.
|
|
93
|
+
Cmd+I or Ctrl+I toggles annotate and explore mode from anywhere, including inside a textarea.
|
|
94
|
+
In annotate mode a plain click on a link annotates it; Ctrl+click (Cmd+click on macOS) follows it in a new tab.
|
|
95
|
+
- **Agent presence** - The window shows when no agent is listening and keeps feedback actions available while the agent works. Feedback accepted by **Send** stays queued on the server for the next `textcast-chat-axi poll`, even across reloads. An agent reply concludes delivered work and returns presence to waiting.
|
|
96
|
+
- **Delivery receipts** - Every sent note carries three emoji that light up in turn: 👀 **Seen** when a poll takes it, 🛠️ **Working** when the page file changes after that, and ✅ **Done** when the agent replies. A step that has not happened yet is greyed out. Until 👀 lights, the row says why: no agent is listening, or the agent is busy. A note answered without touching the page goes Seen to Done with Working still grey.
|
|
97
|
+
Closing the last review tab while a poll is active starts a reconnect grace period, 10 seconds by default. If every review stays disconnected, the poll returns `browser_disconnected` without ending the resumable session. Set `TEXTCAST_CHAT_AXI_DISCONNECT_GRACE_MS` on the server to a longer budget, or to `0` or `off` so a disconnect never ends the poll.
|
|
98
|
+
The no-timeout poll writes an immediate stderr banner and adds periodic wait ticks only in an interactive terminal. Stdout is reserved for the final response. If the poll is interrupted, re-run it: feedback stays queued until delivery.
|
|
99
|
+
In a Herdr-managed pane, `TEXTCAST_CHAT_AXI_HERDR_CHIME=1` requests a Herdr notification once an indefinite poll is waiting. It never blocks or fails the poll.
|
|
100
|
+
- **Session end etiquette** - A reader clicking **End session** (or **Send & End**) is a user-initiated end; `textcast-chat-axi end <html-file>` is agent-initiated.
|
|
101
|
+
When either side ends the session, every open review tab becomes read-only, and feedback sent after the end is refused.
|
|
102
|
+
A plain `textcast-chat-axi <html-file>` after a user-initiated end refuses to reopen and explains why; pass `--reopen` only when the reader asks for more review. Agent-initiated ends reopen normally.
|
|
103
|
+
- **Precise targets** - A note carries the CSS selector of the element it was attached to; Textcast's segment and topic-card ids make that selector name the exact line. Text selections also carry the selected text plus range anchors.
|
|
104
|
+
- **Image attachments** - Attach PNG, JPEG, or WebP images in the composer or an annotation card by pasting, drag-dropping, or using the picker; each shows a thumbnail chip with upload, remove, retry, and error states.
|
|
105
|
+
Images are stored under the state dir, and the queued prompt carries a server-generated absolute `path` and content-hash `id` (plus mime and dimensions), never the raw bytes.
|
|
106
|
+
Limits are `TEXTCAST_CHAT_AXI_MAX_ATTACHMENT_BYTES` (default 10 MiB per image), `TEXTCAST_CHAT_AXI_MAX_ATTACHMENTS_PER_PROMPT` (default 4), and `TEXTCAST_CHAT_AXI_MAX_PROMPT_ATTACHMENT_BYTES` (default 25 MiB per prompt). If any image is missing or any prompt breaches a cap, the whole batch is rejected, the queue is kept, and the reason is shown.
|
|
107
|
+
Each review page allows 30 upload attempts per rolling minute, 4 uploads in flight, and 256 MiB of attempted image bytes over its lifetime.
|
|
108
|
+
Unreferenced attachments expire after `TEXTCAST_CHAT_AXI_ATTACHMENT_TTL_MS` (default 7 days; `0`/`off` disables). `TEXTCAST_CHAT_AXI_MAX_ATTACHMENT_DISK_MB` (default 512 MiB; `0`/`off` disables) caps total attachment disk; an upload that still does not fit after reclaiming unreferenced files is refused with a storage-full error.
|
|
109
|
+
- **Server cleanup** - The detached server stops after the last session ends with nothing connected, or after `TEXTCAST_CHAT_AXI_IDLE_TIMEOUT_MS` (default 30 minutes) with no browser or poll connections. `0` or `off` disables idle self-shutdown.
|
|
110
|
+
- **Server upgrades** - One background server serves every session. Only a newer CLI replaces an older server; an older CLI uses a newer server as is. When a server is replaced, the review page for the file being opened reloads itself once the replacement answers (unless it holds unsent annotation text), and every other open review page shows "Textcast Chat was updated. This page is running the previous version." with **Check and reload** and **Dismiss**. A page whose server goes away shows the same banner after a few seconds of failed reconnects and clears it if the server returns.
|
|
111
|
+
Every **Check and reload** asks the server whether it is running before navigating. In-flight polls end with an interrupted-poll error and are safe to re-run.
|
|
112
|
+
- **Local-first state** - Session state lives under `~/.textcast-chat-axi/`, or `TEXTCAST_CHAT_AXI_STATE_DIR` when set.
|
|
113
|
+
- **Server port** - `TEXTCAST_CHAT_AXI_PORT` chooses the server port; the default is `4397`.
|
|
114
|
+
- **Network binding** - With Tailscale running, the server listens only on loopback (`127.0.0.1`) and this machine's Tailscale IPv4 address - never on `0.0.0.0`. The session link then uses the machine's MagicDNS name, so it opens from a phone on the same tailnet. Without Tailscale, it is loopback-only. Binding beyond loopback exposes an unauthenticated server that can read local files, so the tailnet must be trusted.
|
|
115
|
+
An explicit `TEXTCAST_CHAT_AXI_HOST` overrides automatic Tailscale binding; wildcard values are restricted to loopback, and the server always listens on loopback too. An address that cannot be bound is reported as `network_warning` in the open output and retried in the background. `TEXTCAST_CHAT_AXI_LINK_HOST` sets the link host when automatic Tailscale binding is off.
|
|
116
|
+
- **Running from a source checkout** - The server reads the chrome page, script, and stylesheet once when it starts, so a page and its script always come from the same code. `bin/textcast-chat-axi.js` replaces a running server whose source files changed after it started, and reloads the review window it opens; a published install never does this, since its files do not change under it.
|
|
117
|
+
- **One server per port** - CLIs with different `TEXTCAST_CHAT_AXI_HOST` settings share one server: a server not yet listening on a requested address is replaced once by one that listens on it plus every address the old one served, keeping all sessions. Run `textcast-chat-axi stop` first to drop an address. A server belonging to another state directory is never used, replaced, or stopped; pick another `TEXTCAST_CHAT_AXI_PORT`.
|
|
118
|
+
- **Allowed hosts** - The server rejects (`403`) any request whose `Host` header is not one it answers to: loopback names plus the bound Tailscale address and MagicDNS name. List reverse-proxy or other intentional hostnames in `TEXTCAST_CHAT_AXI_ALLOWED_HOSTS` (whitespace-separated); `X-Forwarded-Host` is validated against the same list. `*` disables the check and is only for a server behind your own authentication. Mutating routes also reject a foreign `Origin` or `Referer`.
|
|
119
|
+
- **Browser opening** - `TEXTCAST_CHAT_AXI_NO_OPEN=1`, like `--no-open`, creates or resumes a session without opening a browser window.
|
|
120
|
+
|
|
121
|
+
## CLI Reference
|
|
122
|
+
|
|
123
|
+
| Command | Description |
|
|
124
|
+
| ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
125
|
+
| `textcast-chat-axi` | Show current sessions and usage guidance. |
|
|
126
|
+
| `textcast-chat-axi update` | Check for or apply the latest npm release through the AXI SDK self-updater. |
|
|
127
|
+
| `textcast-chat-axi <html-file>` | Open or resume a review session. Refuses to reopen a session the reader ended from the browser unless `--reopen` is passed. |
|
|
128
|
+
| `textcast-chat-axi poll <html-file>` | Long-poll until the reader sends feedback, ends the session, or leaves every review disconnected past the reconnect grace period. On `browser_disconnected`, ask before reopening or ending the resumable session. On `ended` (and on the last batch before an end) the output carries `stop_polling: true`: stop polling and do not reopen uninvited. Reopening an ended session reloads any review tab still showing it. |
|
|
129
|
+
| `textcast-chat-axi reply <html-file>` | Post an agent reply and exit 0 only after the server accepts it, so the review stops showing Working. Use this when handing a result back without starting another poll. |
|
|
130
|
+
| `textcast-chat-axi end <html-file>` | End a session as the agent; unlike a reader-initiated end, this still allows a plain reopen later. |
|
|
131
|
+
| `textcast-chat-axi restart [<html-file>]` | Restart the background server. With a file, that review window reloads onto the new server; other open windows show a notice with a reload button. A poll waiting on the old server stops with an error and is run again. |
|
|
132
|
+
| `textcast-chat-axi stop` | Shut down the background server. |
|
|
133
|
+
| `textcast-chat-axi server` | Run the local review server. |
|
|
134
|
+
|
|
135
|
+
### Flags
|
|
136
|
+
|
|
137
|
+
| Command | Flag | Description |
|
|
138
|
+
| ------------------------------- | --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
139
|
+
| `textcast-chat-axi <html-file>` | `--no-open` | Ensure the server and session exist without opening another browser window. |
|
|
140
|
+
| `textcast-chat-axi <html-file>` | `--reopen` | Reopen a session the reader ended from the browser. |
|
|
141
|
+
| `textcast-chat-axi update` | `--check` | Report current vs latest npm version without installing. |
|
|
142
|
+
| `textcast-chat-axi poll` | `--owner <label>` | Name the process listening for this session; the label appears in the home listing. A second concurrent poll is refused. |
|
|
143
|
+
| `textcast-chat-axi poll` | `--takeover` | Displace the current poll listener. The displaced poll exits with `LISTENER_REPLACED`; without this flag the new poll fails with `LISTENER_ACTIVE`. |
|
|
144
|
+
| `textcast-chat-axi poll` | `--agent-reply "..."` | Show a concise reply in the conversation, mark every note the agent has seen as Done, and keep polling. |
|
|
145
|
+
| `textcast-chat-axi poll` | `--agent-reply-file <path>` | Read a longer Markdown reply from a file (`-` for stdin) so newlines survive quoting. Cannot be combined with `--agent-reply`. |
|
|
146
|
+
| `textcast-chat-axi poll` | `--timeout-ms <ms>` | Test and debug only; agents should omit it. |
|
|
147
|
+
| `textcast-chat-axi reply` | `--agent-reply "..."` | Reply text, required unless `--agent-reply-file` is set. Empty text is refused. |
|
|
148
|
+
| `textcast-chat-axi reply` | `--agent-reply-file <path>` | Read the reply from a file (`-` for stdin). Cannot be combined with `--agent-reply`. |
|
|
149
|
+
| `textcast-chat-axi stop` | `--port <port>` | Shut down a server on a non-default port. |
|
|
150
|
+
| `textcast-chat-axi server` | `--verbose` | Log session and watcher events to stderr (also `TEXTCAST_CHAT_AXI_DEBUG=1`). Detached server output is appended to `~/.textcast-chat-axi/server.log` (or `TEXTCAST_CHAT_AXI_STATE_DIR/server.log`). |
|
|
151
|
+
| `textcast-chat-axi server` | `--also-listen <host>` | Also listen on this concrete address (repeatable). The CLI passes it when replacing a running server; see One server per port. |
|
|
152
|
+
|
|
153
|
+
## Telemetry
|
|
154
|
+
|
|
155
|
+
textcast-chat-axi collects no telemetry and makes no analytics requests.
|
|
156
|
+
|
|
157
|
+
## Development
|
|
158
|
+
|
|
159
|
+
```sh
|
|
160
|
+
pnpm run check # build, lint, format check, typecheck, and tests
|
|
161
|
+
pnpm run build # bundle dist/cli.mjs and copy the review window assets
|
|
162
|
+
pnpm test # node:test tests
|
|
163
|
+
pnpm run lint # ESLint
|
|
164
|
+
pnpm run format:check # Prettier check
|
|
165
|
+
pnpm run typecheck # TypeScript checkJs validation
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Contributing
|
|
169
|
+
|
|
170
|
+
Please open an Issue before proposing a change. Pull Requests are currently limited to repository collaborators. See [CONTRIBUTING.md](CONTRIBUTING.md) for the local check and review expectations.
|
|
171
|
+
|
|
172
|
+
MIT. See [LICENSE](LICENSE). The local review architecture is derived from
|
|
173
|
+
[lavish-axi](https://github.com/kunchenguid/lavish-axi) by Kun Chen.
|