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,295 @@
|
|
|
1
|
+
import { S as ProgressView, m as ProgressEntry } from "./progress-CfE-meHr.js";
|
|
2
|
+
|
|
3
|
+
//#region src/state-tree.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* The state tree: a hand-edited markdown outline of what is in flight and
|
|
6
|
+
* what waits on the owner, parsed into nodes for a read-only view
|
|
7
|
+
* (tree.ts, <liagent-state-tree>) and a three-line frontier (done / doing / next). Pure and
|
|
8
|
+
* generic — no app specifics, no imports.
|
|
9
|
+
*
|
|
10
|
+
* Syntax:
|
|
11
|
+
* ## Heading a top-level node
|
|
12
|
+
* - item a node, nested by indent under the item above it
|
|
13
|
+
* - [ ] / [~] / [!] / [x] open / in progress / blocked / done
|
|
14
|
+
* (!) anywhere in an item: it waits on the owner
|
|
15
|
+
* (any order) anywhere in an item: its children are unordered
|
|
16
|
+
* (done 2026-10-30T01:12) on a done item: when (the latest is "most recent")
|
|
17
|
+
* … @name a trailing token: the assignee. `@owner` is the
|
|
18
|
+
* human owner, any other `@slug` an agent. Children
|
|
19
|
+
* without their own inherit the nearest ancestor's.
|
|
20
|
+
* … @slug#id an agent with an opaque id ([A-Za-z0-9_-], up to
|
|
21
|
+
* 40; anything else is dropped). Humans get none.
|
|
22
|
+
* → command or URL a line under an item: its action (several join with "\n")
|
|
23
|
+
* ≈ done: … · doing: … · next: …
|
|
24
|
+
* a line under a node (or before the first `##`, for
|
|
25
|
+
* the whole tree): one-phrase summaries of its done,
|
|
26
|
+
* doing and next groups, written by the agent that
|
|
27
|
+
* edits the tree. Bare `≈` is zh (a 4-character
|
|
28
|
+
* 成语); `≈en`, `≈ja`, … are other locales.
|
|
29
|
+
* #123 a PR in `opts.repo` (no repo: not a link)
|
|
30
|
+
* owner/repo#45 a PR in that repo
|
|
31
|
+
* https://… a link
|
|
32
|
+
* <!-- … --> a comment: ignored
|
|
33
|
+
* Other lines under an item are its note (unindented after a heading's list:
|
|
34
|
+
* the heading's note); other text outside any `##` or list
|
|
35
|
+
* (a `#` title, a legend paragraph) is ignored. Siblings are in sequence: file
|
|
36
|
+
* order is the order of work, unless the parent is `(any order)`.
|
|
37
|
+
*/
|
|
38
|
+
type TreeLink = {
|
|
39
|
+
text: string;
|
|
40
|
+
url: string;
|
|
41
|
+
};
|
|
42
|
+
type TreeStatus = "open" | "doing" | "blocked" | "done";
|
|
43
|
+
type Assignee = {
|
|
44
|
+
type: "human" | "agent";
|
|
45
|
+
name: string; /** An agent's opaque id from `@name#id` ([A-Za-z0-9_-], up to 40); never a human's. */
|
|
46
|
+
id?: string;
|
|
47
|
+
};
|
|
48
|
+
/** One status group's summary per locale. */
|
|
49
|
+
type TreeSummary = {
|
|
50
|
+
done?: string;
|
|
51
|
+
doing?: string;
|
|
52
|
+
next?: string;
|
|
53
|
+
};
|
|
54
|
+
type TreeNode = {
|
|
55
|
+
title: string; /** From the box: undefined when the item has none. */
|
|
56
|
+
status?: TreeStatus; /** true `[x]`, false any other box, undefined when the item has none. */
|
|
57
|
+
done?: boolean; /** Marked `(!)`: waits on the owner. */
|
|
58
|
+
needsOwner?: boolean; /** Marked `(any order)`: the children are not in sequence. */
|
|
59
|
+
unordered?: boolean; /** `(done …)` on a done item, as written (ISO, so it sorts as text). */
|
|
60
|
+
doneAt?: string; /** Its own trailing `@name`, or the nearest ancestor's. */
|
|
61
|
+
assignee?: Assignee; /** The `→ ` lines under the item: a command or a URL (several join with "\n"). */
|
|
62
|
+
action?: string; /** Any other text under the item. */
|
|
63
|
+
note?: string; /** The `≈` lines, by locale (bare `≈` is "zh"). */
|
|
64
|
+
summaries?: Record<string, TreeSummary>;
|
|
65
|
+
links: TreeLink[];
|
|
66
|
+
children: TreeNode[];
|
|
67
|
+
};
|
|
68
|
+
type ParseOptions = {
|
|
69
|
+
/** `owner/repo` that a bare `#123` points at. */repo?: string; /** Default https://github.com. */
|
|
70
|
+
host?: string;
|
|
71
|
+
};
|
|
72
|
+
/** Name of the human owner as an assignee token: `@owner`. */
|
|
73
|
+
declare const OWNER_NAME = "owner";
|
|
74
|
+
/** PR refs and URLs in `text`, in order, each once. */
|
|
75
|
+
declare function findLinks(text: string, opts?: ParseOptions): TreeLink[];
|
|
76
|
+
/** `@owner` is the human; anything else an agent. */
|
|
77
|
+
declare function assigneeOf(name: string, id?: string): Assignee;
|
|
78
|
+
/**
|
|
79
|
+
* Parse the whole document into a root node (title "") whose children are the
|
|
80
|
+
* top-level nodes and whose summaries are the `≈` lines before the first `##`.
|
|
81
|
+
* Never throws: odd indentation nests under the nearest shallower item.
|
|
82
|
+
*/
|
|
83
|
+
declare function parseTreeDoc(md: string, opts?: ParseOptions): TreeNode;
|
|
84
|
+
/** The top-level nodes (parseTreeDoc's root children). */
|
|
85
|
+
declare function parseTree(md: string, opts?: ParseOptions): TreeNode[];
|
|
86
|
+
/** Open (not done) items below `n`, and those of them that wait on the owner. */
|
|
87
|
+
declare function countOpen(n: TreeNode): {
|
|
88
|
+
open: number;
|
|
89
|
+
needsOwner: number;
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* Only the open `(!)` items and their ancestors (the "Needs me" view). A
|
|
93
|
+
* matching item keeps only those of its children that match too.
|
|
94
|
+
*/
|
|
95
|
+
declare function filterNeedsOwner(nodes: TreeNode[]): TreeNode[];
|
|
96
|
+
/** An item and the titles of its ancestors (its breadcrumb). */
|
|
97
|
+
type FrontierItem = {
|
|
98
|
+
node: TreeNode;
|
|
99
|
+
path: string[];
|
|
100
|
+
title: string;
|
|
101
|
+
assignee?: Assignee;
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* One frontier line. `node`/`path` is the one item it shows without a
|
|
105
|
+
* summary (done: the most recent; doing: the first, an open `(!)` item before
|
|
106
|
+
* any `[~]`; next: the first not started after it). With several items and a
|
|
107
|
+
* `≈` summary for the UI locale (or zh, or en), `summary` is that phrase.
|
|
108
|
+
* `items` lists the group in order, each with its own assignee.
|
|
109
|
+
*/
|
|
110
|
+
type FrontierEntry = FrontierItem & {
|
|
111
|
+
count: number;
|
|
112
|
+
summary?: string;
|
|
113
|
+
items: FrontierItem[];
|
|
114
|
+
};
|
|
115
|
+
type Frontier = {
|
|
116
|
+
done?: FrontierEntry;
|
|
117
|
+
doing?: FrontierEntry;
|
|
118
|
+
next?: FrontierEntry;
|
|
119
|
+
};
|
|
120
|
+
type FrontierOptions = {
|
|
121
|
+
/** The UI locale, e.g. "ja" or "zh-CN". Summaries fall back to zh, then en. */locale?: string; /** Titles from the top down to the subtree to look at (default: all). */
|
|
122
|
+
scope?: string[];
|
|
123
|
+
};
|
|
124
|
+
/** The summary list to try: the locale, its language, zh, en. */
|
|
125
|
+
declare function localeChain(locale?: string): string[];
|
|
126
|
+
/**
|
|
127
|
+
* The three lines: ✓ the most recently done, ▶ in progress (an open `(!)`
|
|
128
|
+
* item before any `[~]`), › the next not yet started. Blocked items are on
|
|
129
|
+
* none of them, unless they wait on the owner.
|
|
130
|
+
*/
|
|
131
|
+
declare function frontier(input: TreeNode | TreeNode[], opts?: FrontierOptions): Frontier;
|
|
132
|
+
/** `/words › Learning Partner` */
|
|
133
|
+
declare const crumbs: (path: string[]) => string;
|
|
134
|
+
//#endregion
|
|
135
|
+
//#region src/progress-tree.d.ts
|
|
136
|
+
/** The live part of a node's note: "40% · ETA 15m · needs: … · <latest note>". */
|
|
137
|
+
declare function liveNote(e: ProgressEntry): string;
|
|
138
|
+
type OverlayOptions = ParseOptions & {
|
|
139
|
+
/** The heading that slug ids (no path) go under. Default "Live". */liveTitle?: string;
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* Lay the hub's nodes over the outline (parseTreeDoc's root). Path ids walk
|
|
143
|
+
* the outline segment by segment ("/words" is the heading whose first word
|
|
144
|
+
* is /words; deeper segments match an item's first word or its whole title
|
|
145
|
+
* as a slug), adding what is missing; a slug id goes under a "Live" heading.
|
|
146
|
+
* Groups and people are structure only. `opts.repo` makes `pr` a link. The
|
|
147
|
+
* input is not changed.
|
|
148
|
+
*/
|
|
149
|
+
declare function overlayProgress(base: TreeNode, entries: readonly ProgressEntry[], opts?: OverlayOptions): TreeNode;
|
|
150
|
+
/** The slice of a WebSocket the feed uses (a browser's, or a fake in tests). */
|
|
151
|
+
type FeedSocket = {
|
|
152
|
+
onopen: ((ev: unknown) => void) | null;
|
|
153
|
+
onmessage: ((ev: {
|
|
154
|
+
data: unknown;
|
|
155
|
+
}) => void) | null;
|
|
156
|
+
onclose: ((ev: unknown) => void) | null;
|
|
157
|
+
onerror: ((ev: unknown) => void) | null;
|
|
158
|
+
send?(data: string): void;
|
|
159
|
+
close(): void;
|
|
160
|
+
};
|
|
161
|
+
type FeedOptions = {
|
|
162
|
+
/** The hub's reader WebSocket URL (ws:// or wss://; http(s):// is converted). */url: string;
|
|
163
|
+
socket?: (url: string) => FeedSocket;
|
|
164
|
+
setTimeout?: (fn: () => void, ms: number) => unknown;
|
|
165
|
+
clearTimeout?: (t: unknown) => void; /** Called with a function to run when the network or the tab comes back; returns its remover. */
|
|
166
|
+
onWake?: (fn: () => void) => () => void;
|
|
167
|
+
};
|
|
168
|
+
/**
|
|
169
|
+
* A live progress feed: `subscribe` gets the view on every hub message (and
|
|
170
|
+
* `live` false when the socket is lost); `resolve` checks a node off on an
|
|
171
|
+
* open socket ({type:"resolve", id, note?}) — false when none is open.
|
|
172
|
+
*/
|
|
173
|
+
type ProgressFeed = {
|
|
174
|
+
subscribe(onView: (view: ProgressView, live: boolean) => void): () => void;
|
|
175
|
+
resolve(id: string, note?: string): boolean;
|
|
176
|
+
};
|
|
177
|
+
/** Reconnect delays: 1 s doubling to 60 s; after GIVE_UP failures in a row, wait for a wake. */
|
|
178
|
+
declare const FEED_MAX_DELAY_MS = 60000;
|
|
179
|
+
declare const GIVE_UP = 10;
|
|
180
|
+
/** ws(s):// for an http(s):// URL; a relative path resolves against the page. */
|
|
181
|
+
declare function progressSocketUrl(url: string, base?: string): string;
|
|
182
|
+
/** Wake on `online` and on the tab becoming visible (a no-op outside a browser). */
|
|
183
|
+
declare const browserWake: (fn: () => void) => (() => void);
|
|
184
|
+
/** The reader's side of the progress hub: one socket per subscriber, reconnecting with backoff. */
|
|
185
|
+
declare function progressFeed(opts: FeedOptions): ProgressFeed;
|
|
186
|
+
//#endregion
|
|
187
|
+
//#region src/tree.d.ts
|
|
188
|
+
/** What a source yields: markdown, top-level nodes, or a document root (parseTreeDoc's). */
|
|
189
|
+
type TreeValue = string | TreeNode[] | TreeNode;
|
|
190
|
+
/**
|
|
191
|
+
* Where the tree comes from: a URL (fetched as markdown), a function
|
|
192
|
+
* returning markdown or nodes, or a feed that pushes: `subscribe(onUpdate)`
|
|
193
|
+
* returns its unsubscribe. `meta.live` marks data from a live source.
|
|
194
|
+
*/
|
|
195
|
+
type TreeSource = string | (() => TreeValue | Promise<TreeValue>) | {
|
|
196
|
+
subscribe: (onUpdate: (v: TreeValue, meta?: {
|
|
197
|
+
live?: boolean;
|
|
198
|
+
}) => void, onError?: (e: unknown) => void) => () => void;
|
|
199
|
+
};
|
|
200
|
+
type TreeStrings = {
|
|
201
|
+
tree: string;
|
|
202
|
+
back: string;
|
|
203
|
+
needsMe: string;
|
|
204
|
+
needsYou: string; /** On a collapsed branch: "{n} open", "{n} need you". */
|
|
205
|
+
openCount: string;
|
|
206
|
+
needsYouCount: string;
|
|
207
|
+
copy: string;
|
|
208
|
+
copied: string;
|
|
209
|
+
loading: string;
|
|
210
|
+
failed: string;
|
|
211
|
+
empty: string;
|
|
212
|
+
nothingNeedsYou: string;
|
|
213
|
+
you: string;
|
|
214
|
+
lastDone: string;
|
|
215
|
+
nowDoing: string;
|
|
216
|
+
upNext: string;
|
|
217
|
+
live: string;
|
|
218
|
+
};
|
|
219
|
+
declare const TREE_STRINGS_EN: TreeStrings;
|
|
220
|
+
/** Load a URL or function source once into its document root. */
|
|
221
|
+
declare function loadTree(source: Exclude<TreeSource, {
|
|
222
|
+
subscribe: unknown;
|
|
223
|
+
}>, opts?: ParseOptions): Promise<TreeNode>;
|
|
224
|
+
/**
|
|
225
|
+
* Watch any TreeSource: `onRoot` gets each version (a URL or function once, a
|
|
226
|
+
* feed on every push). Returns the stop function. Never polls.
|
|
227
|
+
*/
|
|
228
|
+
declare function watchTree(source: TreeSource, opts: ParseOptions, onRoot: (root: TreeNode, live: boolean) => void, onError: (e: unknown) => void): () => void;
|
|
229
|
+
type LiveTreeOptions = OverlayOptions & {
|
|
230
|
+
/** The hand-edited outline: any TreeSource (a feed too: each push is overlaid again). */base: TreeSource; /** The progress hub's reader socket URL, a ProgressFeed, or the feed's options. */
|
|
231
|
+
progress: string | ProgressFeed | FeedOptions;
|
|
232
|
+
};
|
|
233
|
+
/**
|
|
234
|
+
* The outline with live progress laid over it: the base as it loads, then
|
|
235
|
+
* the overlay again on every hub message, with `meta.live` while the hub's
|
|
236
|
+
* socket is up. Without the hub (not deployed, not a reader) the outline
|
|
237
|
+
* shows as it is. Never polls.
|
|
238
|
+
*/
|
|
239
|
+
declare function liveTreeSource(opts: LiveTreeOptions): TreeSource;
|
|
240
|
+
/** localStorage: "1" while the Needs me filter is on (per device). */
|
|
241
|
+
declare const NEEDS_ME_KEY = "liagent:tree-needs-me";
|
|
242
|
+
declare const Base: typeof HTMLElement;
|
|
243
|
+
/** The read-only outline element. Properties in; `onBack` adds a back control. */
|
|
244
|
+
declare class StateTreeElement extends Base {
|
|
245
|
+
static observedAttributes: string[];
|
|
246
|
+
/** Set: a ‹ control in the header calls it (the chat box's tree view). */
|
|
247
|
+
onBack?: () => void;
|
|
248
|
+
repo?: string;
|
|
249
|
+
locale?: string;
|
|
250
|
+
strings: Partial<TreeStrings>;
|
|
251
|
+
storageKey: string;
|
|
252
|
+
private _source?;
|
|
253
|
+
private _progress?;
|
|
254
|
+
private _root;
|
|
255
|
+
private live;
|
|
256
|
+
private error;
|
|
257
|
+
private stop?;
|
|
258
|
+
private collapsed;
|
|
259
|
+
private shadow?;
|
|
260
|
+
/** The data: a URL, a function returning markdown or nodes, or a feed. (Re)loads it. */
|
|
261
|
+
set source(v: TreeSource | undefined);
|
|
262
|
+
get source(): TreeSource | undefined;
|
|
263
|
+
/**
|
|
264
|
+
* Live progress over the source: a progress hub's reader socket URL
|
|
265
|
+
* (attribute `progress`) or a ProgressFeed. (Re)loads.
|
|
266
|
+
*/
|
|
267
|
+
set progress(v: string | ProgressFeed | undefined);
|
|
268
|
+
get progress(): string | ProgressFeed | undefined;
|
|
269
|
+
/** Set the parsed tree directly (parseTreeDoc's root). */
|
|
270
|
+
set root(v: TreeNode | null);
|
|
271
|
+
get root(): TreeNode | null;
|
|
272
|
+
attributeChangedCallback(n: string, _o: string | null, v: string | null): void;
|
|
273
|
+
/** Load the source again (the chat box calls this each time its menu opens). */
|
|
274
|
+
reload(): void;
|
|
275
|
+
connectedCallback(): void;
|
|
276
|
+
disconnectedCallback(): void;
|
|
277
|
+
private get t();
|
|
278
|
+
private get needsMe();
|
|
279
|
+
render(): void;
|
|
280
|
+
private list;
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* The frontier in three lines — ✓ the most recently done, ▶ in progress, ›
|
|
284
|
+
* next — each a ≈ summary (several items) or one item with its context. A
|
|
285
|
+
* group shows 〔N〕 and lists its items on tap. Plain DOM, text only.
|
|
286
|
+
*/
|
|
287
|
+
declare function frontierLines(root: TreeNode, opts?: {
|
|
288
|
+
locale?: string;
|
|
289
|
+
strings?: Partial<TreeStrings>;
|
|
290
|
+
}): HTMLElement;
|
|
291
|
+
/** Register the element (once) under `tag`. Returns the class. */
|
|
292
|
+
declare function defineStateTree(tag?: string): typeof StateTreeElement;
|
|
293
|
+
//#endregion
|
|
294
|
+
export { ParseOptions as A, frontier as B, progressSocketUrl as C, FrontierItem as D, FrontierEntry as E, assigneeOf as F, parseTree as H, countOpen as I, crumbs as L, TreeNode as M, TreeStatus as N, FrontierOptions as O, TreeSummary as P, filterNeedsOwner as R, progressFeed as S, Frontier as T, parseTreeDoc as U, localeChain as V, OverlayOptions as _, TreeSource as a, liveNote as b, defineStateTree as c, loadTree as d, watchTree as f, GIVE_UP as g, FeedSocket as h, TREE_STRINGS_EN as i, TreeLink as j, OWNER_NAME as k, frontierLines as l, FeedOptions as m, NEEDS_ME_KEY as n, TreeStrings as o, FEED_MAX_DELAY_MS as p, StateTreeElement as r, TreeValue as s, LiveTreeOptions as t, liveTreeSource as u, ProgressFeed as v, Assignee as w, overlayProgress as x, browserWake as y, findLinks as z };
|
|
295
|
+
//# sourceMappingURL=tree-HB9RhX_H.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { A as ParseOptions, B as frontier, C as progressSocketUrl, D as FrontierItem, E as FrontierEntry, F as assigneeOf, H as parseTree, I as countOpen, L as crumbs, M as TreeNode, N as TreeStatus, O as FrontierOptions, P as TreeSummary, R as filterNeedsOwner, S as progressFeed, T as Frontier, U as parseTreeDoc, V as localeChain, _ as OverlayOptions, a as TreeSource, b as liveNote, c as defineStateTree, d as loadTree, f as watchTree, g as GIVE_UP, h as FeedSocket, i as TREE_STRINGS_EN, j as TreeLink, k as OWNER_NAME, l as frontierLines, m as FeedOptions, n as NEEDS_ME_KEY, o as TreeStrings, p as FEED_MAX_DELAY_MS, r as StateTreeElement, s as TreeValue, t as LiveTreeOptions, u as liveTreeSource, v as ProgressFeed, w as Assignee, x as overlayProgress, y as browserWake, z as findLinks } from "./tree-HB9RhX_H.js";
|
|
2
|
+
export { Assignee, FEED_MAX_DELAY_MS, FeedOptions, FeedSocket, Frontier, FrontierEntry, FrontierItem, FrontierOptions, GIVE_UP, LiveTreeOptions, NEEDS_ME_KEY, OWNER_NAME, OverlayOptions, ParseOptions, ProgressFeed, StateTreeElement, TREE_STRINGS_EN, TreeLink, TreeNode, TreeSource, TreeStatus, TreeStrings, TreeSummary, TreeValue, assigneeOf, browserWake, countOpen, crumbs, defineStateTree, filterNeedsOwner, findLinks, frontier, frontierLines, liveNote, liveTreeSource, loadTree, localeChain, overlayProgress, parseTree, parseTreeDoc, progressFeed, progressSocketUrl, watchTree };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { a as filterNeedsOwner, c as localeChain, i as crumbs, l as parseTree, n as assigneeOf, o as findLinks, r as countOpen, s as frontier, t as OWNER_NAME, u as parseTreeDoc } from "./state-tree-BZCmAknI.js";
|
|
2
|
+
import { a as frontierLines, c as watchTree, d as browserWake, f as liveNote, h as progressSocketUrl, i as defineStateTree, l as FEED_MAX_DELAY_MS, m as progressFeed, n as StateTreeElement, o as liveTreeSource, p as overlayProgress, r as TREE_STRINGS_EN, s as loadTree, t as NEEDS_ME_KEY, u as GIVE_UP } from "./tree-BrR7NwMf.js";
|
|
3
|
+
|
|
4
|
+
export { FEED_MAX_DELAY_MS, GIVE_UP, NEEDS_ME_KEY, OWNER_NAME, StateTreeElement, TREE_STRINGS_EN, assigneeOf, browserWake, countOpen, crumbs, defineStateTree, filterNeedsOwner, findLinks, frontier, frontierLines, liveNote, liveTreeSource, loadTree, localeChain, overlayProgress, parseTree, parseTreeDoc, progressFeed, progressSocketUrl, watchTree };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { o as TreeStrings } from "./tree-HB9RhX_H.js";
|
|
2
|
+
|
|
3
|
+
//#region src/ui-strings.d.ts
|
|
4
|
+
type UiStrings = {
|
|
5
|
+
stateTree: string;
|
|
6
|
+
closeTree: string;
|
|
7
|
+
noTreeSource: string;
|
|
8
|
+
lastDone: string;
|
|
9
|
+
nowDoing: string;
|
|
10
|
+
upNext: string;
|
|
11
|
+
needsYou: string;
|
|
12
|
+
items: string; /** The mark on a voice line the agent polished (its tooltip and label). */
|
|
13
|
+
polished: string;
|
|
14
|
+
};
|
|
15
|
+
declare const UI_EN: UiStrings;
|
|
16
|
+
declare const UI_ZH: UiStrings;
|
|
17
|
+
/** The tree's strings in Chinese (tree.ts TreeStrings). */
|
|
18
|
+
declare const TREE_ZH: TreeStrings;
|
|
19
|
+
/** The page's language is Chinese. */
|
|
20
|
+
declare function isZh(lang?: string | null | undefined): boolean;
|
|
21
|
+
/** The box's strings for the page's language. */
|
|
22
|
+
declare const uiStrings: (lang?: string | null) => UiStrings;
|
|
23
|
+
/** The tree's defaults for the page's language, under the host's own. */
|
|
24
|
+
declare const treeDefaults: (lang?: string | null) => Partial<TreeStrings>;
|
|
25
|
+
//#endregion
|
|
26
|
+
export { isZh as a, UiStrings as i, UI_EN as n, treeDefaults as o, UI_ZH as r, uiStrings as s, TREE_ZH as t };
|
|
27
|
+
//# sourceMappingURL=ui-strings-B03le3fh.d.ts.map
|