agent-yes 1.303.1 → 1.304.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/README.md +54 -0
- package/default.config.yaml +5 -5
- package/dist/{JsonlStore-BpYZZTap.js → JsonlStore-CB_0sfdT.js} +5 -4
- package/dist/{SUPPORTED_CLIS-Dq9Lq9WJ.js → SUPPORTED_CLIS-C_1IiOj3.js} +2 -2
- package/dist/SUPPORTED_CLIS-Do3GHAY1.js +12 -0
- package/dist/{agentShare-suB6yPgO.js → agentShare-BvpEm-Fr.js} +10 -9
- package/dist/{askCli-BU3CNCLU.js → askCli-KmMf-3wA.js} +6 -6
- package/dist/{browser-BmxN1Ur9.js → browser-BAFPmEvN.js} +2 -2
- package/dist/{callback-Ctj3_Wxp.js → callback-BiSUhjw7.js} +6 -6
- package/dist/callback-SqLD2mMX.js +17 -0
- package/dist/{callbackCore-DSJWhqAe.js → callbackCore-BZ_10zyc.js} +1 -1
- package/dist/{callbackCore-BesbQ6-Z.js → callbackCore-Deve5pv3.js} +1 -1
- package/dist/{channels-j5nWuzlQ.js → channels-Y36S0ccW.js} +2 -2
- package/dist/cli.js +118 -13
- package/dist/{cmdDsh-2LP0grim.js → cmdDsh-DZ8bLsH7.js} +1 -1
- package/dist/cmdKill-CzSBfWmx.js +116 -0
- package/dist/{cmdPs-wc1j85fi.js → cmdPs-DBt23Qz0.js} +11 -10
- package/dist/{cwdConflictWarn-skQSMwEh.js → cwdConflictWarn-y-epQyOj.js} +21 -5
- package/dist/{cwdPassthroughHint-BUbWMoz0.js → cwdPassthroughHint-CzWh0hrw.js} +1 -1
- package/dist/{expose-Dawq1LxC.js → expose-Bhsn5yUz.js} +2 -2
- package/dist/forceKill-BDqxx4uQ.js +44 -0
- package/dist/{forkNested-CavHyWzA.js → forkNested-3heLs5XC.js} +45 -5
- package/dist/{globalPidIndex-CRB5KtyL.js → globalPidIndex-BsjlId-h.js} +6 -5
- package/dist/{globalPidIndex-BftWlg2V.js → globalPidIndex-uoz8Esqz.js} +2 -2
- package/dist/{hist-Cs0KFSUW.js → hist-DY16wm7g.js} +1 -1
- package/dist/{identity-DA7YI9km.js → identity-C0MxfwI2.js} +1 -1
- package/dist/{identity-Bk-aG_xl.js → identity-Ckav3-Up.js} +1 -1
- package/dist/index.js +7 -7
- package/dist/{initMsg-CcTqFtsp.js → initMsg-BEVDWYnv.js} +1 -1
- package/dist/{initMsg-D9KJnfgC.js → initMsg-GPU52N-j.js} +1 -1
- package/dist/liagent/box-BSIrRRc_.js +2320 -0
- package/dist/liagent/box-DloywR57.d.ts +409 -0
- package/dist/liagent/box.d.ts +3 -0
- package/dist/liagent/box.js +3 -0
- package/dist/liagent/cli.d.ts +1 -0
- package/dist/liagent/cli.js +908 -0
- package/dist/liagent/client.d.ts +28 -0
- package/dist/liagent/client.js +240 -0
- package/dist/liagent/echo-BvzPSI0x.js +86 -0
- package/dist/liagent/echo-W2RcMEny.d.ts +38 -0
- package/dist/liagent/hub.d.ts +405 -0
- package/dist/liagent/hub.js +1831 -0
- package/dist/liagent/index.d.ts +14 -0
- package/dist/liagent/index.js +10 -0
- package/dist/liagent/liagent.js +339 -0
- package/dist/liagent/mic-audio-C3Shud_F.js +754 -0
- package/dist/liagent/mic-audio-DMCWtEI-.d.ts +317 -0
- package/dist/liagent/mic-button-CtZHFBSG.js +651 -0
- package/dist/liagent/mic-button-Y0ioPetQ.d.ts +248 -0
- package/dist/liagent/mic.d.ts +3 -0
- package/dist/liagent/mic.js +4 -0
- package/dist/liagent/progress-CJs08bXb.js +473 -0
- package/dist/liagent/progress-CfE-meHr.d.ts +205 -0
- package/dist/liagent/progress.d.ts +2 -0
- package/dist/liagent/progress.js +3 -0
- package/dist/liagent/protocol.d.ts +324 -0
- package/dist/liagent/protocol.js +504 -0
- package/dist/liagent/speech-rate-DXeJjRTc.js +42 -0
- package/dist/liagent/state-tree-BZCmAknI.js +353 -0
- package/dist/liagent/tree-BrR7NwMf.js +710 -0
- package/dist/liagent/tree-HB9RhX_H.d.ts +295 -0
- package/dist/liagent/tree.d.ts +2 -0
- package/dist/liagent/tree.js +4 -0
- package/dist/liagent/ui-strings-B03le3fh.d.ts +27 -0
- package/dist/liagent/ui-strings-CJIwW5Gf.js +794 -0
- package/dist/liagent/ui.d.ts +394 -0
- package/dist/liagent/ui.js +5 -0
- package/dist/liagent/voice-D7yeS9VM.js +802 -0
- package/dist/liagent/voice-Qo7SCgi8.d.ts +308 -0
- package/dist/liagent/voice.d.ts +3 -0
- package/dist/liagent/voice.js +4 -0
- package/dist/{notifyDaemon-C7GlfJ1E.js → notifyDaemon-DkUB7GV2.js} +10 -9
- package/dist/{openBrowser-1cIo4dJL.js → openBrowser-CQAOIrD6.js} +1 -1
- package/dist/oxmgrService-DlYHmqyI.js +37 -0
- package/dist/oxmgrService-o9L3I6FX.js +3 -0
- package/dist/{parentLink-DoEWVGld.js → parentLink-BcAYcO9L.js} +2 -2
- package/dist/{parentLink-B58V1RVd.js → parentLink-MBUD3oY2.js} +2 -2
- package/dist/{parentPingLoop-C73bbmCE.js → parentPingLoop-DDO592Wh.js} +5 -5
- package/dist/{pidStore-433kvh9D.js → pidStore-C50VPk3E.js} +3 -3
- package/dist/pidStore-COkPjpW8.js +6 -0
- package/dist/{procStats-BvmrBrOs.js → procStats-DwTxj3rs.js} +1 -1
- package/dist/{remotes-MfdV9M8u.js → remotes-BqLoB5GR.js} +2 -2
- package/dist/{remotes-DevcBeLl.js → remotes-BsMGvAay.js} +3 -3
- package/dist/{roomReplyAlias-DFqg_6IU.js → roomReplyAlias-B-v76TA8.js} +3 -3
- package/dist/roomReplyAlias-BzWUBkQy.js +6 -0
- package/dist/{rustBinary-7VK7oLlW.js → rustBinary-BrJ2p8wy.js} +2 -2
- package/dist/{rustBinary-BV4LxMMn.js → rustBinary-vpfpWj1q.js} +2 -2
- package/dist/{schedule-Dp0qkNO1.js → schedule-Bzjhl6-h.js} +15 -44
- package/dist/schedulesCli-CLqieyQZ.js +784 -0
- package/dist/senderAncestry-CVHeKk1Y.js +173 -0
- package/dist/senderAncestry-KhAUPCQs.js +3 -0
- package/dist/{serve-BpOIIOVc.js → serve-XwFYE0cE.js} +67 -69
- package/dist/{serveRust-CbBrcUrg.js → serveRust-BfWkeL6T.js} +31 -4
- package/dist/{setup-DdIBk6Iv.js → setup-D4-s2VZw.js} +5 -5
- package/dist/{share-w5oRbvlj.js → share-CbFetL5H.js} +1 -1
- package/dist/{share-DrS3LYqf.js → share-_TPYAGWC.js} +1 -1
- package/dist/{shareCmd-DDENkBW2.js → shareCmd-DUBsVI3e.js} +10 -10
- package/dist/spawnGate-Dfj9V76w.js +5 -0
- package/dist/{spawnGate-lr3tvA6U.js → spawnGate-Dj_WaS29.js} +3 -3
- package/dist/{subcommands-DxgvDmZX.js → subcommands-B7YZJL8n.js} +471 -307
- package/dist/subcommands-BZPxFgkT.js +15 -0
- package/dist/{systemPathLink-SjUzgSiq.js → systemPathLink-Y3iC7bYV.js} +1 -1
- package/dist/{terminal-C2h7tpe0.js → terminal-13cGj3h6.js} +2 -2
- package/dist/terminal.js +1 -1
- package/dist/{todoAutomation-TTp_Qz9G.js → todoAutomation-CKlrxuZv.js} +2 -2
- package/dist/{todoCli-BWm5nZE0.js → todoCli-CU9vSJSJ.js} +6 -6
- package/dist/{todoIdentity-BvXZKWJI.js → todoIdentity-CzS1e7VL.js} +2 -2
- package/dist/{todoStore-C9RTz0Vs.js → todoStore-msRCEUi1.js} +2 -2
- package/dist/{tray-BeRSozJz.js → tray-CLktEN3G.js} +1 -1
- package/dist/{trayApp-QQjqhDv1.js → trayApp-5_OlvQcz.js} +2 -2
- package/dist/trayApp-DkAPo0m6.js +5 -0
- package/dist/{ts-6LF7f4fx.js → ts-njuddXQz.js} +126 -57
- package/dist/{versionChecker-Bc62HNf6.js → versionChecker-BJycAanp.js} +2 -2
- package/dist/{webrtcLink-va_gAR77.js → webrtcLink-DcvacEci.js} +1 -1
- package/dist/{webrtcLink-SsInrVHU.js → webrtcLink-WxS1nTIs.js} +1 -1
- package/dist/{webrtcRemote-BlGyNZDC.js → webrtcRemote-C3xQyf3u.js} +2 -2
- package/dist/{widget-Crb5zeHL.js → widget-DmRwOlco.js} +3 -3
- package/dist/widgets.js +1 -1
- package/dist/{workspaceConfig-BLWB5Wu9.js → workspaceConfig-DBgsu81B.js} +1 -1
- package/dist/{ws-DIbwNz8Z.js → ws-ByO6JO6m.js} +3 -3
- package/dist/{ws-BRhPG1Vy.js → ws-D0-Jg88z.js} +9 -8
- package/lab/ui/index.html +1 -1
- package/lab/ui/lab/posts/2026-08-11-slack-term-safe-writes.md +1 -1
- package/package.json +73 -8
- package/ts/JsonlStore.ts +10 -3
- package/ts/cli-idle.bun.spec.ts +1 -1
- package/ts/cli-idle.spec.ts +1 -1
- package/ts/cli.ts +35 -0
- package/ts/cmdKill.bun.spec.ts +155 -0
- package/ts/cmdKill.spec.ts +155 -0
- package/ts/cmdKill.ts +183 -0
- package/ts/composerGuard.edges.spec.ts +91 -0
- package/ts/composerGuard.spec.ts +53 -6
- package/ts/composerGuard.ts +42 -13
- package/ts/conptyModeFilter.spec.ts +30 -0
- package/ts/conptyModeFilter.ts +53 -0
- package/ts/copyLiagent.ts +42 -0
- package/ts/cwdConflictWarn.io.spec.ts +50 -0
- package/ts/cwdConflictWarn.spec.ts +34 -1
- package/ts/cwdConflictWarn.ts +43 -5
- package/ts/cwdGuard.spec.ts +110 -0
- package/ts/cwdGuard.ts +118 -0
- package/ts/forceKill.ts +52 -0
- package/ts/forkNested.bun.spec.ts +41 -0
- package/ts/forkNested.spec.ts +41 -0
- package/ts/forkNested.ts +48 -1
- package/ts/globalPidIndex.edges.spec.ts +125 -0
- package/ts/globalPidIndex.ts +6 -2
- package/ts/index.ts +13 -1
- package/ts/interruptSend.bun.spec.ts +99 -0
- package/ts/interruptSend.spec.ts +99 -0
- package/ts/interruptSend.ts +51 -0
- package/ts/lockRegistry.spec.ts +49 -0
- package/ts/lsRenderCache.spec.ts +58 -0
- package/ts/needsInput.edges.spec.ts +23 -0
- package/ts/parseCliArgs.ts +7 -0
- package/ts/pushGatePlan.spec.ts +147 -0
- package/ts/roomReplyAlias.io.spec.ts +81 -0
- package/ts/schedule.ts +5 -1
- package/ts/schedules.bun.spec.ts +397 -0
- package/ts/schedules.spec.ts +397 -0
- package/ts/schedules.ts +517 -0
- package/ts/schedulesCli.ts +386 -0
- package/ts/sendControl.bun.spec.ts +12 -0
- package/ts/senderAncestry.ts +1 -3
- package/ts/serve.ts +22 -33
- package/ts/serveRust.spec.ts +29 -2
- package/ts/serveRust.ts +27 -2
- package/ts/sizeNego.bun.spec.ts +9 -2
- package/ts/sizeNego.spec.ts +9 -2
- package/ts/sizeNego.ts +10 -5
- package/ts/subcommands.spec.ts +348 -9
- package/ts/subcommands.ts +513 -93
- package/ts/suggestAgents.spec.ts +33 -0
- package/ts/terminal/browser.ts +1 -1
- package/ts/todoParse.spec.ts +22 -1
- package/ts/todoParse.ts +19 -0
- package/dist/SUPPORTED_CLIS-ByO5twge.js +0 -12
- package/dist/callback-D7qfh_7p.js +0 -16
- package/dist/pidStore-BRlKRHXY.js +0 -6
- package/dist/roomReplyAlias-DuEkSSDI.js +0 -6
- package/dist/spawnGate-DeQBTX-o.js +0 -5
- package/dist/subcommands-DmiswRy4.js +0 -14
- package/dist/trayApp-C4TAvRvU.js +0 -5
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
import { AvatarSrc, ChatMessage, EditedEvent, MessageSource, PageInfo, PairInfo, Sender } from "./protocol.js";
|
|
2
|
+
import { a as TreeSource, o as TreeStrings } from "./tree-HB9RhX_H.js";
|
|
3
|
+
import { i as UiStrings } from "./ui-strings-B03le3fh.js";
|
|
4
|
+
|
|
5
|
+
//#region src/avatar.d.ts
|
|
6
|
+
/** What a line's avatar shows, as box.ts draws it. */
|
|
7
|
+
type LineAvatar = {
|
|
8
|
+
/** URLs to try in order (empty: the element, or the initial). */srcs: string[]; /** The agent's logo as an element (cloned per line), when it is not a URL. */
|
|
9
|
+
node?: Element; /** The alt text and the screen-reader name: the sender's name, or "you". */
|
|
10
|
+
name: string; /** Whose initial the fallback shows (the viewer's own name on "you" lines). */
|
|
11
|
+
initialFrom: string;
|
|
12
|
+
seed: string;
|
|
13
|
+
mine: boolean;
|
|
14
|
+
};
|
|
15
|
+
/** A short, stable hash (FNV-1a, 32 bits, base 36). */
|
|
16
|
+
declare function hashId(s: string): string;
|
|
17
|
+
/** The URLs in an AvatarSrc, in order, empty ones dropped. */
|
|
18
|
+
declare function avatarSrcs(src: AvatarSrc | null | undefined): string[];
|
|
19
|
+
/** The fallback's letter: the name's first grapheme, upper-cased; "?" for none. */
|
|
20
|
+
declare function initialOf(name: string | undefined): string;
|
|
21
|
+
/**
|
|
22
|
+
* The fallback's colours for a seed: oklch(0.7 0.12 <hue>), the hue from a
|
|
23
|
+
* hash so a person keeps one colour, the letter in whichever ink contrasts
|
|
24
|
+
* more (at least 4.5:1 on every hue).
|
|
25
|
+
*/
|
|
26
|
+
declare function avatarColors(seed: string): {
|
|
27
|
+
bg: string;
|
|
28
|
+
fg: string;
|
|
29
|
+
hue: number;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* A line's avatar. The agent's is `agentAvatar` (the host app's logo, a URL
|
|
33
|
+
* or an element) named by its label. Anyone else's comes from `avatarFor`
|
|
34
|
+
* (the host's resolver), else the line's own `sender`; the viewer's own
|
|
35
|
+
* lines (owner lines on the owner's page, friend lines on a friend's) fill
|
|
36
|
+
* the gaps from `user` and are named "you".
|
|
37
|
+
*/
|
|
38
|
+
declare function lineAvatar(m: ChatMessage, opts: {
|
|
39
|
+
friend?: boolean;
|
|
40
|
+
user?: Sender;
|
|
41
|
+
agentAvatar?: AvatarSrc | Element | null;
|
|
42
|
+
avatarFor?: (m: ChatMessage) => Sender | null | undefined;
|
|
43
|
+
}): LineAvatar;
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region src/box.d.ts
|
|
46
|
+
type AnswerType = "allow" | "deny";
|
|
47
|
+
/**
|
|
48
|
+
* What the user chose in a pairing request: the pages to allow (their ids,
|
|
49
|
+
* or "all", including pages that open later), and — for an older agent that
|
|
50
|
+
* did not say which scope it wants — "chat" when they tapped the 30-day chat
|
|
51
|
+
* button rather than the hour.
|
|
52
|
+
*/
|
|
53
|
+
type Answer = {
|
|
54
|
+
pages?: string[] | "all";
|
|
55
|
+
scope?: "chat";
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* A voice output the host plugs in (box.voice): replies are read through it
|
|
59
|
+
* instead of speechSynthesis. `id` is the message's id; `stop` gets why
|
|
60
|
+
* ("typing", "off").
|
|
61
|
+
*/
|
|
62
|
+
type ChatVoice = {
|
|
63
|
+
speak(text: string, id?: string): void;
|
|
64
|
+
stop(why?: string): void;
|
|
65
|
+
};
|
|
66
|
+
/** A page's label is "<path> <user agent>": the path and a short device hint. */
|
|
67
|
+
declare function pageHint(label: string): string;
|
|
68
|
+
declare const Base: typeof HTMLElement;
|
|
69
|
+
/** HH:MM:SS today, YYYY-MM-DD HH:MM before — local time, ISO order. */
|
|
70
|
+
declare function when(at: number, now?: Date): string;
|
|
71
|
+
/** The chat box element. Plain properties in, callbacks out; see the file header. */
|
|
72
|
+
declare class ChatBox extends Base {
|
|
73
|
+
static get observedAttributes(): string[];
|
|
74
|
+
/**
|
|
75
|
+
* Called with each draft that goes out, and the state-tree node it is
|
|
76
|
+
* addressed to (absent = the main thread); `opts.source` is "stt" when the
|
|
77
|
+
* line is dictation, sent unchanged. Return false if it could not be sent
|
|
78
|
+
* (the draft is kept).
|
|
79
|
+
*/
|
|
80
|
+
onSend?: (text: string, to?: string, opts?: {
|
|
81
|
+
source?: MessageSource;
|
|
82
|
+
}) => boolean;
|
|
83
|
+
/** The user answered a pairing request. */
|
|
84
|
+
onAnswer?: (type: AnswerType, p: PairInfo, answer: Answer) => void;
|
|
85
|
+
/** End was pressed on a session in the menu. */
|
|
86
|
+
onEnd?: (s: PairInfo) => void;
|
|
87
|
+
/** End was pressed (and, for this page, confirmed) on one of the user's pages in the menu. */
|
|
88
|
+
onEndPage?: (id: string) => void;
|
|
89
|
+
/**
|
|
90
|
+
* The host's avatar for a line that is not the agent's: its pictures are
|
|
91
|
+
* tried first, its name and id fill in. Return nothing to use the line's
|
|
92
|
+
* `sender` (and, on the user's own lines, `userAvatar`).
|
|
93
|
+
*/
|
|
94
|
+
avatarFor?: (m: ChatMessage) => Sender | null | undefined;
|
|
95
|
+
/**
|
|
96
|
+
* A voice output (`{ speak(text, id?), stop(why?) }`): replies are read
|
|
97
|
+
* through it instead of speechSynthesis. Typing calls `stop("typing")`.
|
|
98
|
+
*/
|
|
99
|
+
voice?: ChatVoice | null;
|
|
100
|
+
private _messages;
|
|
101
|
+
private _live;
|
|
102
|
+
private _listeners;
|
|
103
|
+
private _sessions;
|
|
104
|
+
private _pending;
|
|
105
|
+
private _evalRan;
|
|
106
|
+
private _busy;
|
|
107
|
+
private busyTimer?;
|
|
108
|
+
private lastReplyAt;
|
|
109
|
+
private _pages;
|
|
110
|
+
private _self;
|
|
111
|
+
/** The pages ticked in the pairing request, per pair id. */
|
|
112
|
+
private picked;
|
|
113
|
+
/** The page whose End was tapped once (this page needs a second tap). */
|
|
114
|
+
private confirmEnd;
|
|
115
|
+
private _friend;
|
|
116
|
+
private _notice;
|
|
117
|
+
private _warning;
|
|
118
|
+
private _defaultOpen;
|
|
119
|
+
private _placeholder;
|
|
120
|
+
private _treeSource?;
|
|
121
|
+
/** `owner/repo` that a bare `#123` in the tree links to. */
|
|
122
|
+
treeRepo?: string;
|
|
123
|
+
/** The tree's strings (English defaults; Chinese on a zh page). */
|
|
124
|
+
treeStrings: Partial<TreeStrings>;
|
|
125
|
+
private _strings;
|
|
126
|
+
private _agentAvatar;
|
|
127
|
+
private _user;
|
|
128
|
+
/** The nodes agents listen at: "@/…" completions. */
|
|
129
|
+
private _nodes;
|
|
130
|
+
/** The node the next line goes to ("/" = the main thread, no chip). */
|
|
131
|
+
private _target;
|
|
132
|
+
/** Polished lines shown as first heard (their mark tapped). */
|
|
133
|
+
private rawIds;
|
|
134
|
+
private root?;
|
|
135
|
+
private open;
|
|
136
|
+
private panel;
|
|
137
|
+
private offline;
|
|
138
|
+
private pos;
|
|
139
|
+
private _draft;
|
|
140
|
+
/** The draft as dictation left it while nothing typed is in it (else null). */
|
|
141
|
+
private pure;
|
|
142
|
+
private _partial;
|
|
143
|
+
private _micActive;
|
|
144
|
+
/** The input has focus: the log opens. */
|
|
145
|
+
private typing;
|
|
146
|
+
/** The mark is held: the input shows how to use it. */
|
|
147
|
+
private holding;
|
|
148
|
+
private settledLen;
|
|
149
|
+
private composing;
|
|
150
|
+
private shiftEnter;
|
|
151
|
+
private timer?;
|
|
152
|
+
private els;
|
|
153
|
+
private markDrag;
|
|
154
|
+
private taps;
|
|
155
|
+
private atEnd;
|
|
156
|
+
private arrivals;
|
|
157
|
+
private readSeq;
|
|
158
|
+
private wasOpen;
|
|
159
|
+
private floats;
|
|
160
|
+
private floatHover;
|
|
161
|
+
/** The frontier group opened by a tap (closed again on each minimize). */
|
|
162
|
+
private frontierOpen;
|
|
163
|
+
private place;
|
|
164
|
+
private ro?;
|
|
165
|
+
private treeStop?;
|
|
166
|
+
private treeRoot;
|
|
167
|
+
private treeError;
|
|
168
|
+
private navIx;
|
|
169
|
+
private nav;
|
|
170
|
+
private treeAxis;
|
|
171
|
+
private treeDragged;
|
|
172
|
+
private treePress;
|
|
173
|
+
private userScrollAt;
|
|
174
|
+
get messages(): ChatMessage[];
|
|
175
|
+
/** Replace the log (history on connect): never read aloud. */
|
|
176
|
+
set messages(v: ChatMessage[]);
|
|
177
|
+
/** One message that arrived live: kept once per id; an agent's is read aloud. */
|
|
178
|
+
push(m: ChatMessage): void;
|
|
179
|
+
/**
|
|
180
|
+
* The agent polished a voice line ({type:"edited"}): it changes in place,
|
|
181
|
+
* and is never read aloud again.
|
|
182
|
+
*/
|
|
183
|
+
edit(e: Omit<EditedEvent, "type">): void;
|
|
184
|
+
/**
|
|
185
|
+
* One busy beat from the agent: the spinner shows for BUSY_MS unless the
|
|
186
|
+
* next beat renews it or a reply ends it. A beat right after a reply
|
|
187
|
+
* (BUSY_AFTER_REPLY_MS) is that work's tail, and ignored.
|
|
188
|
+
*/
|
|
189
|
+
beat(at?: number): void;
|
|
190
|
+
set live(v: boolean);
|
|
191
|
+
get live(): boolean;
|
|
192
|
+
/** The state-tree nodes agents listen at (the hub's `state.nodes`): "@/…" completions. */
|
|
193
|
+
set nodes(v: string[]);
|
|
194
|
+
/** The node the next line goes to ("/" = the main thread). */
|
|
195
|
+
get target(): string;
|
|
196
|
+
/** Address the next lines to a state-tree node ("/" = back to the main thread). */
|
|
197
|
+
setTarget(path: string): void;
|
|
198
|
+
/** Agents listening now (shown in the status). */
|
|
199
|
+
set listeners(v: number);
|
|
200
|
+
/** Approved sessions: a count on the tree button for eval, and a line with End in the menu. */
|
|
201
|
+
set sessions(v: PairInfo[]);
|
|
202
|
+
/** A pairing waiting for the owner's answer. */
|
|
203
|
+
set pending(v: PairInfo | null);
|
|
204
|
+
/** Code just ran on this page: the eval count pulses. */
|
|
205
|
+
set evalRan(v: boolean);
|
|
206
|
+
/** The agent is working: a spinner in the input. */
|
|
207
|
+
set busy(v: boolean);
|
|
208
|
+
get busy(): boolean;
|
|
209
|
+
/** The user's connected pages (the hub's state.pages): offered when allowing, ended from the menu. */
|
|
210
|
+
set pages(v: PageInfo[]);
|
|
211
|
+
/** Which of `pages` this page is (the hub's state.self). */
|
|
212
|
+
set self(v: string);
|
|
213
|
+
/** A friend's page (not the user's): pairings are previews, with no chat scope to grant. */
|
|
214
|
+
set friend(v: boolean);
|
|
215
|
+
/** Shown instead of the input when this viewer cannot chat. */
|
|
216
|
+
set notice(v: string | undefined);
|
|
217
|
+
/** A one-line note above the input (say, a message dropped by a rate limit). */
|
|
218
|
+
set warning(v: string | undefined);
|
|
219
|
+
/** Open or minimized on first visit (later visits remember). Attribute: collapsed. */
|
|
220
|
+
set defaultOpen(v: boolean);
|
|
221
|
+
/**
|
|
222
|
+
* The state tree (src/tree.ts): a URL serving its markdown, a function
|
|
223
|
+
* returning markdown or nodes, or a feed `{subscribe(onUpdate) → unsubscribe}`.
|
|
224
|
+
* The tree button shows it; it loads again each time the tree opens, and
|
|
225
|
+
* its frontier fills the minimized bar's lines. Unset: "No tree source".
|
|
226
|
+
*/
|
|
227
|
+
set treeSource(v: TreeSource | undefined);
|
|
228
|
+
get treeSource(): TreeSource | undefined;
|
|
229
|
+
/** Show the state tree (true) or hide it (false). */
|
|
230
|
+
setTree(v: boolean): void;
|
|
231
|
+
/** The box's own strings (English, or Chinese on a zh page, under these). */
|
|
232
|
+
set strings(v: Partial<UiStrings> | undefined);
|
|
233
|
+
/**
|
|
234
|
+
* The agent's avatar: your app's logo, as a URL (or URLs in fallback
|
|
235
|
+
* order) or an element (cloned onto each line). Attribute: agent-avatar.
|
|
236
|
+
* Unset: the agent name's initial.
|
|
237
|
+
*/
|
|
238
|
+
set agentAvatar(v: AvatarSrc | Element | null | undefined);
|
|
239
|
+
get agentAvatar(): AvatarSrc | Element | null | undefined;
|
|
240
|
+
/**
|
|
241
|
+
* The user's picture on their own lines: a URL, or URLs in fallback order
|
|
242
|
+
* (the app's own avatar, then the sign-in provider's image). Attribute:
|
|
243
|
+
* user-avatar.
|
|
244
|
+
*/
|
|
245
|
+
set userAvatar(v: AvatarSrc | null | undefined);
|
|
246
|
+
/** The user's name: their fallback avatar's initial. Attribute: user-name. */
|
|
247
|
+
set userName(v: string | null | undefined);
|
|
248
|
+
/** A stable id (or a hash of one, never an email): the user's fallback colour. */
|
|
249
|
+
set userId(v: string | null | undefined);
|
|
250
|
+
/** Re-render the log only when the value changed (wrappers set props on every render). */
|
|
251
|
+
private setUser;
|
|
252
|
+
set placeholder(v: string);
|
|
253
|
+
/** The draft in the input. */
|
|
254
|
+
get draft(): string;
|
|
255
|
+
/**
|
|
256
|
+
* Set the draft. With `source: "stt"` it is dictation: sent unchanged, the
|
|
257
|
+
* line goes out with source "stt" (anything typed into it makes it the
|
|
258
|
+
* user's own). It is never sent by itself while a mic is on.
|
|
259
|
+
*/
|
|
260
|
+
setDraft(text: string, opts?: {
|
|
261
|
+
source?: "stt";
|
|
262
|
+
}): void;
|
|
263
|
+
/** A live transcript, shown dimmed after the draft and never committed (null: none). */
|
|
264
|
+
setPartial(text: string | null): void;
|
|
265
|
+
/** A mic is on: treated as focus (the log opens, the box is opaque). Attribute: mic-active. */
|
|
266
|
+
get micActive(): boolean;
|
|
267
|
+
set micActive(v: boolean);
|
|
268
|
+
attributeChangedCallback(name: string): void;
|
|
269
|
+
private applyMic;
|
|
270
|
+
/** Per-device settings live under this prefix (attribute storage-key; default "liagent"). */
|
|
271
|
+
private key;
|
|
272
|
+
private read;
|
|
273
|
+
private write;
|
|
274
|
+
/** The speed setting under this box's storage key. */
|
|
275
|
+
private rateStore;
|
|
276
|
+
/** Whether agent replies are read aloud on this device (on unless turned off). */
|
|
277
|
+
get speaking(): boolean;
|
|
278
|
+
/** How fast replies are read (1, 1.25, 1.5 or 2; per device, picked in the menu). */
|
|
279
|
+
get speechRate(): number;
|
|
280
|
+
/**
|
|
281
|
+
* Read a reply aloud, after any still being read (always while a mic is on):
|
|
282
|
+
* through `voice` if set, else speechSynthesis, in the language its script
|
|
283
|
+
* suggests (with a matching installed voice), at `speechRate`.
|
|
284
|
+
*/
|
|
285
|
+
speak(text: string, id?: string): void;
|
|
286
|
+
private stopSpeech;
|
|
287
|
+
connectedCallback(): void;
|
|
288
|
+
disconnectedCallback(): void;
|
|
289
|
+
/** A tap anywhere outside the menu and the mark closes the menu. */
|
|
290
|
+
private outside;
|
|
291
|
+
/** Escape closes the open panel (caught first, so a mic's own Escape never sees it). */
|
|
292
|
+
private escape;
|
|
293
|
+
/** A resize (window, rotation, the visual viewport): the bar stays on screen, the float box re-placed. */
|
|
294
|
+
private relayout;
|
|
295
|
+
private get ui();
|
|
296
|
+
private get treeText();
|
|
297
|
+
private build;
|
|
298
|
+
/** The log is click-through, so it can't be swiped: a vertical swipe on the empty input scrolls it. */
|
|
299
|
+
private swipeScrollsLog;
|
|
300
|
+
/**
|
|
301
|
+
* Drag the box by `el` anywhere on screen: an offset from its bottom-right
|
|
302
|
+
* home, the bar kept on screen (up to the notch) and remembered. A press
|
|
303
|
+
* that moves under 5 px is still a click.
|
|
304
|
+
*/
|
|
305
|
+
private dragHandle;
|
|
306
|
+
private setHolding;
|
|
307
|
+
/**
|
|
308
|
+
* Bring the bar back on screen (after expanding where the minimized bar
|
|
309
|
+
* was, or on a smaller screen). Expanded, the bar spans the box, so the
|
|
310
|
+
* box's own edges count.
|
|
311
|
+
*/
|
|
312
|
+
private fit;
|
|
313
|
+
/**
|
|
314
|
+
* The tree button: a tap opens or closes the tree; a horizontal drag (axis
|
|
315
|
+
* locked after 8 px) moves the focused node through its detents — right
|
|
316
|
+
* opens it a level per cell, left folds it (src/tree-nav.ts) — with a live
|
|
317
|
+
* preview, resisting past a limit, committed on release. A vertical drag
|
|
318
|
+
* does nothing. Arrow keys on it move in the open tree.
|
|
319
|
+
*/
|
|
320
|
+
private treeGestures;
|
|
321
|
+
/** While dragging: the focused node and the depth it would open to, following the finger. */
|
|
322
|
+
private showTreeHint;
|
|
323
|
+
/** (Re)load the tree: once for a URL or function, a subscription for a feed. Never polls. */
|
|
324
|
+
private loadTree;
|
|
325
|
+
private setRoot;
|
|
326
|
+
private setNav;
|
|
327
|
+
/**
|
|
328
|
+
* One nav step. After it, an expand brings the focused node and its new
|
|
329
|
+
* children into view (unless the user is scrolling); a fold keeps the
|
|
330
|
+
* focused row where it was.
|
|
331
|
+
*/
|
|
332
|
+
private navTo;
|
|
333
|
+
private renderTree;
|
|
334
|
+
/** The floating tree overflows (or is scrolled): its top edge fades, as the log's. */
|
|
335
|
+
private treeFade;
|
|
336
|
+
private disarm;
|
|
337
|
+
private arm;
|
|
338
|
+
/**
|
|
339
|
+
* Send the draft now, as Enter would; true if it went out. Kept (and the
|
|
340
|
+
* status says so) if it could not.
|
|
341
|
+
*/
|
|
342
|
+
submit(): boolean;
|
|
343
|
+
private clearDraft;
|
|
344
|
+
/**
|
|
345
|
+
* The input grows with its text up to INPUT_MAX_PX, then scrolls inside
|
|
346
|
+
* itself. Empty, it is one line (nothing measured: a placeholder measured
|
|
347
|
+
* in a narrow slot wraps to several lines).
|
|
348
|
+
*/
|
|
349
|
+
private fitInput;
|
|
350
|
+
/** The draft's "@/…" while it is typed: the listening nodes under it. */
|
|
351
|
+
private completions;
|
|
352
|
+
private pick;
|
|
353
|
+
private renderPlaceholder;
|
|
354
|
+
/** The live transcript: a mirror of the draft, invisible, then the partial text dimmed. */
|
|
355
|
+
private renderPartial;
|
|
356
|
+
/** The target chip (× back to the main thread) and the "@/…" completions. */
|
|
357
|
+
private renderAim;
|
|
358
|
+
private setOpen;
|
|
359
|
+
private setPanel;
|
|
360
|
+
/** The log opens to 30vh while the input has focus, a mic is on, or the tree is open. */
|
|
361
|
+
private wide;
|
|
362
|
+
private status;
|
|
363
|
+
private renderAll;
|
|
364
|
+
/** Open or minimized, which panel, the column's size: the box's frame. */
|
|
365
|
+
private renderLayout;
|
|
366
|
+
private renderStatus;
|
|
367
|
+
/** The eval/preview sessions on the tree button: their count, pulsing when code just ran. */
|
|
368
|
+
private renderEvals;
|
|
369
|
+
/** The spinner in the input while the agent works. */
|
|
370
|
+
private renderBusy;
|
|
371
|
+
/** A pairing request above the bar. */
|
|
372
|
+
private renderAsks;
|
|
373
|
+
/**
|
|
374
|
+
* A pairing request, compact: its code, what it asks for, Allow and ✕ —
|
|
375
|
+
* and, for code on a user with more than one page open, a checkbox per
|
|
376
|
+
* page (this one ticked) plus "all pages". Chat is always every page. An agent that did not say what
|
|
377
|
+
* it wants (an older client) gets the two old answers: code (8h) and chat.
|
|
378
|
+
*/
|
|
379
|
+
private renderAsk;
|
|
380
|
+
/** A polished line's body (its text, or tapped, the raw STT text) and its sparkle. */
|
|
381
|
+
private lineBody;
|
|
382
|
+
private renderLog;
|
|
383
|
+
private toEnd;
|
|
384
|
+
private onColumnScroll;
|
|
385
|
+
/**
|
|
386
|
+
* After the messages (or open/minimized) changed: what arrived (by id, on
|
|
387
|
+
* this device's clock), what is read, and what floats. Expanded, everything
|
|
388
|
+
* is read and nothing floats; just minimized, the latest floats again;
|
|
389
|
+
* minimized, every new line floats — never the history loading in.
|
|
390
|
+
*/
|
|
391
|
+
private messagesChanged;
|
|
392
|
+
private clearFloats;
|
|
393
|
+
private addFloat;
|
|
394
|
+
private dropFloat;
|
|
395
|
+
/** "who: text" (the latest copy: an edit changes it in place), and a polished line's sparkle. */
|
|
396
|
+
private fillFloat;
|
|
397
|
+
private renderFloatTexts;
|
|
398
|
+
/** Hovered or touched: every line's timer waits; released, they go on. */
|
|
399
|
+
private holdFloats;
|
|
400
|
+
private renderFrontier;
|
|
401
|
+
/** The float box on the bar's side of the screen, inside the viewport and its safe areas (anchor.ts). */
|
|
402
|
+
private placeFloat;
|
|
403
|
+
private renderInput;
|
|
404
|
+
private renderMenu;
|
|
405
|
+
}
|
|
406
|
+
declare function defineChatBox(tag?: string): typeof ChatBox;
|
|
407
|
+
//#endregion
|
|
408
|
+
export { defineChatBox as a, avatarColors as c, initialOf as d, lineAvatar as f, ChatVoice as i, avatarSrcs as l, AnswerType as n, pageHint as o, ChatBox as r, when as s, Answer as t, hashId as u };
|
|
409
|
+
//# sourceMappingURL=box-DloywR57.d.ts.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { AvatarSrc, Sender } from "./protocol.js";
|
|
2
|
+
import { a as defineChatBox, c as avatarColors, d as initialOf, f as lineAvatar, i as ChatVoice, l as avatarSrcs, n as AnswerType, o as pageHint, r as ChatBox, s as when, t as Answer, u as hashId } from "./box-DloywR57.js";
|
|
3
|
+
export { Answer, AnswerType, AvatarSrc, ChatBox, ChatVoice, Sender, avatarColors, avatarSrcs, defineChatBox, hashId, initialOf, lineAvatar, pageHint, when };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { a as avatarColors, c as initialOf, i as when, l as lineAvatar, n as defineChatBox, o as avatarSrcs, r as pageHint, s as hashId, t as ChatBox } from "./box-BSIrRRc_.js";
|
|
2
|
+
|
|
3
|
+
export { ChatBox, avatarColors, avatarSrcs, defineChatBox, hashId, initialOf, lineAvatar, pageHint, when };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|